view-contracts 0.5.12 → 0.5.13

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,128 +1,128 @@
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 M_=Object.create;var La=Object.defineProperty;var V_=Object.getOwnPropertyDescriptor;var L_=Object.getOwnPropertyNames;var j_=Object.getPrototypeOf,D_=Object.prototype.hasOwnProperty;var wt=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof require<"u"?require:e)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var K=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var S=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},$n=(t,e)=>{for(var n in e)La(t,n,{get:e[n],enumerable:!0})},F_=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of L_(e))!D_.call(t,i)&&i!==n&&La(t,i,{get:()=>e[i],enumerable:!(r=V_(e,i))||r.enumerable});return t};var ja=(t,e,n)=>(n=t!=null?M_(j_(t)):{},F_(e||!t||!t.__esModule?La(n,"default",{value:t,enumerable:!0}):n,t));var ii=S(Fa=>{var To=class extends Error{constructor(e,n,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=n,this.exitCode=e,this.nestedError=void 0}},Da=class extends To{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Fa.CommanderError=To;Fa.InvalidArgumentError=Da});var Oo=S(Ba=>{var{InvalidArgumentError:q_}=ii(),qa=class{constructor(e,n){switch(this.description=n||"",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,n){return n===this.defaultValue||!Array.isArray(n)?[e]:(n.push(e),n)}default(e,n){return this.defaultValue=e,this.defaultValueDescription=n,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(n,r)=>{if(!this.argChoices.includes(n))throw new q_(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(n,r):n},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function B_(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}Ba.Argument=qa;Ba.humanReadableArgName=B_});var Ua=S(Wa=>{var{humanReadableArgName:H_}=Oo(),Ha=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 n=e.commands.filter(i=>!i._hidden),r=e._getHelpCommand();return r&&!r._hidden&&n.push(r),this.sortSubcommands&&n.sort((i,o)=>i.name().localeCompare(o.name())),n}compareOptions(e,n){let r=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return r(e).localeCompare(r(n))}visibleOptions(e){let n=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?n.push(r):r.long&&!o?n.push(e.createOption(r.long,r.description)):r.short&&!i&&n.push(e.createOption(r.short,r.description))}return this.sortOptions&&n.sort(this.compareOptions),n}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let n=[];for(let r=e.parent;r;r=r.parent){let i=r.options.filter(o=>!o.hidden);n.push(...i)}return this.sortOptions&&n.sort(this.compareOptions),n}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(n=>{n.description=n.description||e._argsDescription[n.name()]||""}),e.registeredArguments.find(n=>n.description)?e.registeredArguments:[]}subcommandTerm(e){let n=e.registeredArguments.map(r=>H_(r)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(n?" "+n:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,n){return n.visibleCommands(e).reduce((r,i)=>Math.max(r,this.displayWidth(n.styleSubcommandTerm(n.subcommandTerm(i)))),0)}longestOptionTermLength(e,n){return n.visibleOptions(e).reduce((r,i)=>Math.max(r,this.displayWidth(n.styleOptionTerm(n.optionTerm(i)))),0)}longestGlobalOptionTermLength(e,n){return n.visibleGlobalOptions(e).reduce((r,i)=>Math.max(r,this.displayWidth(n.styleOptionTerm(n.optionTerm(i)))),0)}longestArgumentTermLength(e,n){return n.visibleArguments(e).reduce((r,i)=>Math.max(r,this.displayWidth(n.styleArgumentTerm(n.argumentTerm(i)))),0)}commandUsage(e){let n=e._name;e._aliases[0]&&(n=n+"|"+e._aliases[0]);let r="";for(let i=e.parent;i;i=i.parent)r=i.name()+" "+r;return r+n+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let n=[];if(e.argChoices&&n.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&n.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&n.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&n.push(`env: ${e.envVar}`),n.length>0){let r=`(${n.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}argumentDescription(e){let n=[];if(e.argChoices&&n.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&n.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),n.length>0){let r=`(${n.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}formatItemList(e,n,r){return n.length===0?[]:[r.styleTitle(e),...n,""]}groupItems(e,n,r){let i=new Map;return e.forEach(o=>{let s=r(o);i.has(s)||i.set(s,[])}),n.forEach(o=>{let s=r(o);i.has(s)||i.set(s,[]),i.get(s).push(o)}),i}formatHelp(e,n){let r=n.padWidth(e,n),i=n.helpWidth??80;function o(p,f){return n.formatItem(p,r,f,n)}let s=[`${n.styleTitle("Usage:")} ${n.styleUsage(n.commandUsage(e))}`,""],a=n.commandDescription(e);a.length>0&&(s=s.concat([n.boxWrap(n.styleCommandDescription(a),i),""]));let c=n.visibleArguments(e).map(p=>o(n.styleArgumentTerm(n.argumentTerm(p)),n.styleArgumentDescription(n.argumentDescription(p))));if(s=s.concat(this.formatItemList("Arguments:",c,n)),this.groupItems(e.options,n.visibleOptions(e),p=>p.helpGroupHeading??"Options:").forEach((p,f)=>{let m=p.map(y=>o(n.styleOptionTerm(n.optionTerm(y)),n.styleOptionDescription(n.optionDescription(y))));s=s.concat(this.formatItemList(f,m,n))}),n.showGlobalOptions){let p=n.visibleGlobalOptions(e).map(f=>o(n.styleOptionTerm(n.optionTerm(f)),n.styleOptionDescription(n.optionDescription(f))));s=s.concat(this.formatItemList("Global Options:",p,n))}return this.groupItems(e.commands,n.visibleCommands(e),p=>p.helpGroup()||"Commands:").forEach((p,f)=>{let m=p.map(y=>o(n.styleSubcommandTerm(n.subcommandTerm(y)),n.styleSubcommandDescription(n.subcommandDescription(y))));s=s.concat(this.formatItemList(f,m,n))}),s.join(`
5
- `)}displayWidth(e){return Od(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(n=>n==="[options]"?this.styleOptionText(n):n==="[command]"?this.styleSubcommandText(n):n[0]==="["||n[0]==="<"?this.styleArgumentText(n):this.styleCommandText(n)).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(n=>n==="[options]"?this.styleOptionText(n):n[0]==="["||n[0]==="<"?this.styleArgumentText(n):this.styleSubcommandText(n)).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,n){return Math.max(n.longestOptionTermLength(e,n),n.longestGlobalOptionTermLength(e,n),n.longestSubcommandTermLength(e,n),n.longestArgumentTermLength(e,n))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,n,r,i){let s=" ".repeat(2);if(!r)return s+e;let a=e.padEnd(n+e.length-i.displayWidth(e)),c=2,d=(this.helpWidth??80)-n-c-2,p;return d<this.minWidthToWrap||i.preformatted(r)?p=r:p=i.boxWrap(r,d).replace(/\n/g,`
6
- `+" ".repeat(n+c)),s+a+" ".repeat(c)+p.replace(/\n/g,`
7
- ${s}`)}boxWrap(e,n){if(n<this.minWidthToWrap)return e;let r=e.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,o=[];return r.forEach(s=>{let a=s.match(i);if(a===null){o.push("");return}let c=[a.shift()],l=this.displayWidth(c[0]);a.forEach(d=>{let p=this.displayWidth(d);if(l+p<=n){c.push(d),l+=p;return}o.push(c.join(""));let f=d.trimStart();c=[f],l=this.displayWidth(f)}),o.push(c.join(""))}),o.join(`
8
- `)}};function Od(t){let e=/\x1b\[\d*(;\d*)*m/g;return t.replace(e,"")}Wa.Help=Ha;Wa.stripColor=Od});var Ka=S(Ja=>{var{InvalidArgumentError:W_}=ii(),za=class{constructor(e,n){this.flags=e,this.description=n||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let r=U_(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,n){return this.defaultValue=e,this.defaultValueDescription=n,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let n=e;return typeof e=="string"&&(n={[e]:!0}),this.implied=Object.assign(this.implied||{},n),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,n){return n===this.defaultValue||!Array.isArray(n)?[e]:(n.push(e),n)}choices(e){return this.argChoices=e.slice(),this.parseArg=(n,r)=>{if(!this.argChoices.includes(n))throw new W_(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(n,r):n},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Nd(this.name().replace(/^no-/,"")):Nd(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}},Ga=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(n=>{n.negate?this.negativeOptions.set(n.attributeName(),n):this.positiveOptions.set(n.attributeName(),n)}),this.negativeOptions.forEach((n,r)=>{this.positiveOptions.has(r)&&this.dualOptions.add(r)})}valueFromOption(e,n){let r=n.attributeName();if(!this.dualOptions.has(r))return!0;let i=this.negativeOptions.get(r).presetArg,o=i!==void 0?i:!1;return n.negate===(o===e)}};function Nd(t){return t.split("-").reduce((e,n)=>e+n[0].toUpperCase()+n.slice(1))}function U_(t){let e,n,r=/^-[^-]$/,i=/^--[^-]/,o=t.split(/[ |,]+/).concat("guard");if(r.test(o[0])&&(e=o.shift()),i.test(o[0])&&(n=o.shift()),!e&&r.test(o[0])&&(e=o.shift()),!e&&i.test(o[0])&&(e=n,n=o.shift()),o[0].startsWith("-")){let s=o[0],a=`option creation failed due to '${s}' in option flags '${t}'`;throw/^-[^-][^-]/.test(s)?new Error(`${a}
4
+ var B_=Object.create;var qa=Object.defineProperty;var H_=Object.getOwnPropertyDescriptor;var W_=Object.getOwnPropertyNames;var U_=Object.getPrototypeOf,z_=Object.prototype.hasOwnProperty;var _t=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof require<"u"?require:e)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var K=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var S=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},kn=(t,e)=>{for(var n in e)qa(t,n,{get:e[n],enumerable:!0})},G_=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of W_(e))!z_.call(t,i)&&i!==n&&qa(t,i,{get:()=>e[i],enumerable:!(r=H_(e,i))||r.enumerable});return t};var Ba=(t,e,n)=>(n=t!=null?B_(U_(t)):{},G_(e||!t||!t.__esModule?qa(n,"default",{value:t,enumerable:!0}):n,t));var ai=S(Wa=>{var Mo=class extends Error{constructor(e,n,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=n,this.exitCode=e,this.nestedError=void 0}},Ha=class extends Mo{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Wa.CommanderError=Mo;Wa.InvalidArgumentError=Ha});var Vo=S(za=>{var{InvalidArgumentError:J_}=ai(),Ua=class{constructor(e,n){switch(this.description=n||"",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,n){return n===this.defaultValue||!Array.isArray(n)?[e]:(n.push(e),n)}default(e,n){return this.defaultValue=e,this.defaultValueDescription=n,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(n,r)=>{if(!this.argChoices.includes(n))throw new J_(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(n,r):n},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function K_(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}za.Argument=Ua;za.humanReadableArgName=K_});var Ka=S(Ja=>{var{humanReadableArgName:Y_}=Vo(),Ga=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 n=e.commands.filter(i=>!i._hidden),r=e._getHelpCommand();return r&&!r._hidden&&n.push(r),this.sortSubcommands&&n.sort((i,o)=>i.name().localeCompare(o.name())),n}compareOptions(e,n){let r=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return r(e).localeCompare(r(n))}visibleOptions(e){let n=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?n.push(r):r.long&&!o?n.push(e.createOption(r.long,r.description)):r.short&&!i&&n.push(e.createOption(r.short,r.description))}return this.sortOptions&&n.sort(this.compareOptions),n}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let n=[];for(let r=e.parent;r;r=r.parent){let i=r.options.filter(o=>!o.hidden);n.push(...i)}return this.sortOptions&&n.sort(this.compareOptions),n}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(n=>{n.description=n.description||e._argsDescription[n.name()]||""}),e.registeredArguments.find(n=>n.description)?e.registeredArguments:[]}subcommandTerm(e){let n=e.registeredArguments.map(r=>Y_(r)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(n?" "+n:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,n){return n.visibleCommands(e).reduce((r,i)=>Math.max(r,this.displayWidth(n.styleSubcommandTerm(n.subcommandTerm(i)))),0)}longestOptionTermLength(e,n){return n.visibleOptions(e).reduce((r,i)=>Math.max(r,this.displayWidth(n.styleOptionTerm(n.optionTerm(i)))),0)}longestGlobalOptionTermLength(e,n){return n.visibleGlobalOptions(e).reduce((r,i)=>Math.max(r,this.displayWidth(n.styleOptionTerm(n.optionTerm(i)))),0)}longestArgumentTermLength(e,n){return n.visibleArguments(e).reduce((r,i)=>Math.max(r,this.displayWidth(n.styleArgumentTerm(n.argumentTerm(i)))),0)}commandUsage(e){let n=e._name;e._aliases[0]&&(n=n+"|"+e._aliases[0]);let r="";for(let i=e.parent;i;i=i.parent)r=i.name()+" "+r;return r+n+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let n=[];if(e.argChoices&&n.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&n.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&n.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&n.push(`env: ${e.envVar}`),n.length>0){let r=`(${n.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}argumentDescription(e){let n=[];if(e.argChoices&&n.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&n.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),n.length>0){let r=`(${n.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}formatItemList(e,n,r){return n.length===0?[]:[r.styleTitle(e),...n,""]}groupItems(e,n,r){let i=new Map;return e.forEach(o=>{let s=r(o);i.has(s)||i.set(s,[])}),n.forEach(o=>{let s=r(o);i.has(s)||i.set(s,[]),i.get(s).push(o)}),i}formatHelp(e,n){let r=n.padWidth(e,n),i=n.helpWidth??80;function o(d,f){return n.formatItem(d,r,f,n)}let s=[`${n.styleTitle("Usage:")} ${n.styleUsage(n.commandUsage(e))}`,""],a=n.commandDescription(e);a.length>0&&(s=s.concat([n.boxWrap(n.styleCommandDescription(a),i),""]));let l=n.visibleArguments(e).map(d=>o(n.styleArgumentTerm(n.argumentTerm(d)),n.styleArgumentDescription(n.argumentDescription(d))));if(s=s.concat(this.formatItemList("Arguments:",l,n)),this.groupItems(e.options,n.visibleOptions(e),d=>d.helpGroupHeading??"Options:").forEach((d,f)=>{let m=d.map(y=>o(n.styleOptionTerm(n.optionTerm(y)),n.styleOptionDescription(n.optionDescription(y))));s=s.concat(this.formatItemList(f,m,n))}),n.showGlobalOptions){let d=n.visibleGlobalOptions(e).map(f=>o(n.styleOptionTerm(n.optionTerm(f)),n.styleOptionDescription(n.optionDescription(f))));s=s.concat(this.formatItemList("Global Options:",d,n))}return this.groupItems(e.commands,n.visibleCommands(e),d=>d.helpGroup()||"Commands:").forEach((d,f)=>{let m=d.map(y=>o(n.styleSubcommandTerm(n.subcommandTerm(y)),n.styleSubcommandDescription(n.subcommandDescription(y))));s=s.concat(this.formatItemList(f,m,n))}),s.join(`
5
+ `)}displayWidth(e){return Bd(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(n=>n==="[options]"?this.styleOptionText(n):n==="[command]"?this.styleSubcommandText(n):n[0]==="["||n[0]==="<"?this.styleArgumentText(n):this.styleCommandText(n)).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(n=>n==="[options]"?this.styleOptionText(n):n[0]==="["||n[0]==="<"?this.styleArgumentText(n):this.styleSubcommandText(n)).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,n){return Math.max(n.longestOptionTermLength(e,n),n.longestGlobalOptionTermLength(e,n),n.longestSubcommandTermLength(e,n),n.longestArgumentTermLength(e,n))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,n,r,i){let s=" ".repeat(2);if(!r)return s+e;let a=e.padEnd(n+e.length-i.displayWidth(e)),l=2,p=(this.helpWidth??80)-n-l-2,d;return p<this.minWidthToWrap||i.preformatted(r)?d=r:d=i.boxWrap(r,p).replace(/\n/g,`
6
+ `+" ".repeat(n+l)),s+a+" ".repeat(l)+d.replace(/\n/g,`
7
+ ${s}`)}boxWrap(e,n){if(n<this.minWidthToWrap)return e;let r=e.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,o=[];return r.forEach(s=>{let a=s.match(i);if(a===null){o.push("");return}let l=[a.shift()],c=this.displayWidth(l[0]);a.forEach(p=>{let d=this.displayWidth(p);if(c+d<=n){l.push(p),c+=d;return}o.push(l.join(""));let f=p.trimStart();l=[f],c=this.displayWidth(f)}),o.push(l.join(""))}),o.join(`
8
+ `)}};function Bd(t){let e=/\x1b\[\d*(;\d*)*m/g;return t.replace(e,"")}Ja.Help=Ga;Ja.stripColor=Bd});var Za=S(Qa=>{var{InvalidArgumentError:X_}=ai(),Ya=class{constructor(e,n){this.flags=e,this.description=n||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let r=Q_(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,n){return this.defaultValue=e,this.defaultValueDescription=n,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let n=e;return typeof e=="string"&&(n={[e]:!0}),this.implied=Object.assign(this.implied||{},n),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,n){return n===this.defaultValue||!Array.isArray(n)?[e]:(n.push(e),n)}choices(e){return this.argChoices=e.slice(),this.parseArg=(n,r)=>{if(!this.argChoices.includes(n))throw new X_(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(n,r):n},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Hd(this.name().replace(/^no-/,"")):Hd(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}},Xa=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(n=>{n.negate?this.negativeOptions.set(n.attributeName(),n):this.positiveOptions.set(n.attributeName(),n)}),this.negativeOptions.forEach((n,r)=>{this.positiveOptions.has(r)&&this.dualOptions.add(r)})}valueFromOption(e,n){let r=n.attributeName();if(!this.dualOptions.has(r))return!0;let i=this.negativeOptions.get(r).presetArg,o=i!==void 0?i:!1;return n.negate===(o===e)}};function Hd(t){return t.split("-").reduce((e,n)=>e+n[0].toUpperCase()+n.slice(1))}function Q_(t){let e,n,r=/^-[^-]$/,i=/^--[^-]/,o=t.split(/[ |,]+/).concat("guard");if(r.test(o[0])&&(e=o.shift()),i.test(o[0])&&(n=o.shift()),!e&&r.test(o[0])&&(e=o.shift()),!e&&i.test(o[0])&&(e=n,n=o.shift()),o[0].startsWith("-")){let s=o[0],a=`option creation failed due to '${s}' in option flags '${t}'`;throw/^-[^-][^-]/.test(s)?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
11
  - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):r.test(s)?new Error(`${a}
12
12
  - too many short flags`):i.test(s)?new Error(`${a}
13
13
  - too many long flags`):new Error(`${a}
14
- - unrecognised flag format`)}if(e===void 0&&n===void 0)throw new Error(`option creation failed due to no flags found in '${t}'.`);return{shortFlag:e,longFlag:n}}Ja.Option=za;Ja.DualOptions=Ga});var Vd=S(Md=>{function z_(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let n=[];for(let r=0;r<=t.length;r++)n[r]=[r];for(let r=0;r<=e.length;r++)n[0][r]=r;for(let r=1;r<=e.length;r++)for(let i=1;i<=t.length;i++){let o=1;t[i-1]===e[r-1]?o=0:o=1,n[i][r]=Math.min(n[i-1][r]+1,n[i][r-1]+1,n[i-1][r-1]+o),i>1&&r>1&&t[i-1]===e[r-2]&&t[i-2]===e[r-1]&&(n[i][r]=Math.min(n[i][r],n[i-2][r-2]+1))}return n[t.length][e.length]}function G_(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let n=t.startsWith("--");n&&(t=t.slice(2),e=e.map(s=>s.slice(2)));let r=[],i=3,o=.4;return e.forEach(s=>{if(s.length<=1)return;let a=z_(t,s),c=Math.max(t.length,s.length);(c-a)/c>o&&(a<i?(i=a,r=[s]):a===i&&r.push(s))}),r.sort((s,a)=>s.localeCompare(a)),n&&(r=r.map(s=>`--${s}`)),r.length>1?`
14
+ - unrecognised flag format`)}if(e===void 0&&n===void 0)throw new Error(`option creation failed due to no flags found in '${t}'.`);return{shortFlag:e,longFlag:n}}Qa.Option=Ya;Qa.DualOptions=Xa});var Ud=S(Wd=>{function Z_(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let n=[];for(let r=0;r<=t.length;r++)n[r]=[r];for(let r=0;r<=e.length;r++)n[0][r]=r;for(let r=1;r<=e.length;r++)for(let i=1;i<=t.length;i++){let o=1;t[i-1]===e[r-1]?o=0:o=1,n[i][r]=Math.min(n[i-1][r]+1,n[i][r-1]+1,n[i-1][r-1]+o),i>1&&r>1&&t[i-1]===e[r-2]&&t[i-2]===e[r-1]&&(n[i][r]=Math.min(n[i][r],n[i-2][r-2]+1))}return n[t.length][e.length]}function e0(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let n=t.startsWith("--");n&&(t=t.slice(2),e=e.map(s=>s.slice(2)));let r=[],i=3,o=.4;return e.forEach(s=>{if(s.length<=1)return;let a=Z_(t,s),l=Math.max(t.length,s.length);(l-a)/l>o&&(a<i?(i=a,r=[s]):a===i&&r.push(s))}),r.sort((s,a)=>s.localeCompare(a)),n&&(r=r.map(s=>`--${s}`)),r.length>1?`
15
15
  (Did you mean one of ${r.join(", ")}?)`:r.length===1?`
16
- (Did you mean ${r[0]}?)`:""}Md.suggestSimilar=G_});var Fd=S(ec=>{var J_=wt("node:events").EventEmitter,Ya=wt("node:child_process"),qt=wt("node:path"),No=wt("node:fs"),le=wt("node:process"),{Argument:K_,humanReadableArgName:Y_}=Oo(),{CommanderError:Xa}=ii(),{Help:X_,stripColor:Q_}=Ua(),{Option:Ld,DualOptions:Z_}=Ka(),{suggestSimilar:jd}=Vd(),Qa=class t extends J_{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:n=>le.stdout.write(n),writeErr:n=>le.stderr.write(n),outputError:(n,r)=>r(n),getOutHelpWidth:()=>le.stdout.isTTY?le.stdout.columns:void 0,getErrHelpWidth:()=>le.stderr.isTTY?le.stderr.columns:void 0,getOutHasColors:()=>Za()??(le.stdout.isTTY&&le.stdout.hasColors?.()),getErrHasColors:()=>Za()??(le.stderr.isTTY&&le.stderr.hasColors?.()),stripColor:n=>Q_(n)},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 n=this;n;n=n.parent)e.push(n);return e}command(e,n,r){let i=n,o=r;typeof i=="object"&&i!==null&&(o=i,i=null),o=o||{};let[,s,a]=e.match(/([^ ]+) *(.*)/),c=this.createCommand(s);return i&&(c.description(i),c._executableHandler=!0),o.isDefault&&(this._defaultCommandName=c._name),c._hidden=!!(o.noHelp||o.hidden),c._executableFile=o.executableFile||null,a&&c.arguments(a),this._registerCommand(c),c.parent=this,c.copyInheritedSettings(this),i?this:c}createCommand(e){return new t(e)}createHelp(){return Object.assign(new X_,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,n){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 n=n||{},n.isDefault&&(this._defaultCommandName=e._name),(n.noHelp||n.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,n){return new K_(e,n)}argument(e,n,r,i){let o=this.createArgument(e,n);return typeof r=="function"?o.default(i).argParser(r):o.default(r),this.addArgument(o),this}arguments(e){return e.trim().split(/ +/).forEach(n=>{this.argument(n)}),this}addArgument(e){let n=this.registeredArguments.slice(-1)[0];if(n?.variadic)throw new Error(`only the last argument can be variadic '${n.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,n){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(/([^ ]+) *(.*)/),s=n??"display help for command",a=this.createCommand(i);return a.helpOption(!1),o&&a.arguments(o),s&&a.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=a,(e||n)&&this._initCommandGroup(a),this}addHelpCommand(e,n){return typeof e!="object"?(this.helpCommand(e,n),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,n){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(n):this._lifeCycleHooks[e]=[n],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=n=>{if(n.code!=="commander.executeSubCommandAsync")throw n},this}_exit(e,n,r){this._exitCallback&&this._exitCallback(new Xa(e,n,r)),le.exit(e)}action(e){let n=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=n,this}createOption(e,n){return new Ld(e,n)}_callParseArg(e,n,r,i){try{return e.parseArg(n,r)}catch(o){if(o.code==="commander.invalidArgument"){let s=`${i} ${o.message}`;this.error(s,{exitCode:o.exitCode,code:o.code})}throw o}}_registerOption(e){let n=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(n){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 '${n.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let n=i=>[i.name()].concat(i.aliases()),r=n(e).find(i=>this._findCommand(i));if(r){let i=n(this._findCommand(r)).join("|"),o=n(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 n=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,s,a)=>{o==null&&e.presetArg!==void 0&&(o=e.presetArg);let c=this.getOptionValue(r);o!==null&&e.parseArg?o=this._callParseArg(e,o,c,s):o!==null&&e.variadic&&(o=e._collectValue(o,c)),o==null&&(e.negate?o=!1:e.isBoolean()||e.optional?o=!0:o=""),this.setOptionValueWithSource(r,o,a)};return this.on("option:"+n,o=>{let s=`error: option '${e.flags}' argument '${o}' is invalid.`;i(o,s,"cli")}),e.envVar&&this.on("optionEnv:"+n,o=>{let s=`error: option '${e.flags}' value '${o}' from env '${e.envVar}' is invalid.`;i(o,s,"env")}),this}_optionEx(e,n,r,i,o){if(typeof n=="object"&&n instanceof Ld)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(n,r);if(s.makeOptionMandatory(!!e.mandatory),typeof i=="function")s.default(o).argParser(i);else if(i instanceof RegExp){let a=i;i=(c,l)=>{let d=a.exec(c);return d?d[0]:l},s.default(o).argParser(i)}else s.default(i);return this.addOption(s)}option(e,n,r,i){return this._optionEx({},e,n,r,i)}requiredOption(e,n,r,i){return this._optionEx({mandatory:!0},e,n,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,n){return this.setOptionValueWithSource(e,n,void 0)}setOptionValueWithSource(e,n,r){return this._storeOptionsAsProperties?this[e]=n:this._optionValues[e]=n,this._optionValueSources[e]=r,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let n;return this._getCommandAndAncestors().forEach(r=>{r.getOptionValueSource(e)!==void 0&&(n=r.getOptionValueSource(e))}),n}_prepareUserArgs(e,n){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(n=n||{},e===void 0&&n.from===void 0){le.versions?.electron&&(n.from="electron");let i=le.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(n.from="eval")}e===void 0&&(e=le.argv),this.rawArgs=e.slice();let r;switch(n.from){case void 0:case"node":this._scriptPath=e[1],r=e.slice(2);break;case"electron":le.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: '${n.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",r}parse(e,n){this._prepareForParse();let r=this._prepareUserArgs(e,n);return this._parseCommand([],r),this}async parseAsync(e,n){this._prepareForParse();let r=this._prepareUserArgs(e,n);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,n,r){if(No.existsSync(e))return;let i=n?`searched for local subcommand relative to directory '${n}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",o=`'${e}' does not exist
16
+ (Did you mean ${r[0]}?)`:""}Wd.suggestSimilar=e0});var Kd=S(ic=>{var t0=_t("node:events").EventEmitter,ec=_t("node:child_process"),Bt=_t("node:path"),Lo=_t("node:fs"),le=_t("node:process"),{Argument:n0,humanReadableArgName:r0}=Vo(),{CommanderError:tc}=ai(),{Help:i0,stripColor:o0}=Ka(),{Option:zd,DualOptions:s0}=Za(),{suggestSimilar:Gd}=Ud(),nc=class t extends t0{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:n=>le.stdout.write(n),writeErr:n=>le.stderr.write(n),outputError:(n,r)=>r(n),getOutHelpWidth:()=>le.stdout.isTTY?le.stdout.columns:void 0,getErrHelpWidth:()=>le.stderr.isTTY?le.stderr.columns:void 0,getOutHasColors:()=>rc()??(le.stdout.isTTY&&le.stdout.hasColors?.()),getErrHasColors:()=>rc()??(le.stderr.isTTY&&le.stderr.hasColors?.()),stripColor:n=>o0(n)},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 n=this;n;n=n.parent)e.push(n);return e}command(e,n,r){let i=n,o=r;typeof i=="object"&&i!==null&&(o=i,i=null),o=o||{};let[,s,a]=e.match(/([^ ]+) *(.*)/),l=this.createCommand(s);return i&&(l.description(i),l._executableHandler=!0),o.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(o.noHelp||o.hidden),l._executableFile=o.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 i0,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,n){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 n=n||{},n.isDefault&&(this._defaultCommandName=e._name),(n.noHelp||n.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,n){return new n0(e,n)}argument(e,n,r,i){let o=this.createArgument(e,n);return typeof r=="function"?o.default(i).argParser(r):o.default(r),this.addArgument(o),this}arguments(e){return e.trim().split(/ +/).forEach(n=>{this.argument(n)}),this}addArgument(e){let n=this.registeredArguments.slice(-1)[0];if(n?.variadic)throw new Error(`only the last argument can be variadic '${n.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,n){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(/([^ ]+) *(.*)/),s=n??"display help for command",a=this.createCommand(i);return a.helpOption(!1),o&&a.arguments(o),s&&a.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=a,(e||n)&&this._initCommandGroup(a),this}addHelpCommand(e,n){return typeof e!="object"?(this.helpCommand(e,n),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,n){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(n):this._lifeCycleHooks[e]=[n],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=n=>{if(n.code!=="commander.executeSubCommandAsync")throw n},this}_exit(e,n,r){this._exitCallback&&this._exitCallback(new tc(e,n,r)),le.exit(e)}action(e){let n=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=n,this}createOption(e,n){return new zd(e,n)}_callParseArg(e,n,r,i){try{return e.parseArg(n,r)}catch(o){if(o.code==="commander.invalidArgument"){let s=`${i} ${o.message}`;this.error(s,{exitCode:o.exitCode,code:o.code})}throw o}}_registerOption(e){let n=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(n){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 '${n.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let n=i=>[i.name()].concat(i.aliases()),r=n(e).find(i=>this._findCommand(i));if(r){let i=n(this._findCommand(r)).join("|"),o=n(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 n=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,s,a)=>{o==null&&e.presetArg!==void 0&&(o=e.presetArg);let l=this.getOptionValue(r);o!==null&&e.parseArg?o=this._callParseArg(e,o,l,s):o!==null&&e.variadic&&(o=e._collectValue(o,l)),o==null&&(e.negate?o=!1:e.isBoolean()||e.optional?o=!0:o=""),this.setOptionValueWithSource(r,o,a)};return this.on("option:"+n,o=>{let s=`error: option '${e.flags}' argument '${o}' is invalid.`;i(o,s,"cli")}),e.envVar&&this.on("optionEnv:"+n,o=>{let s=`error: option '${e.flags}' value '${o}' from env '${e.envVar}' is invalid.`;i(o,s,"env")}),this}_optionEx(e,n,r,i,o){if(typeof n=="object"&&n instanceof zd)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(n,r);if(s.makeOptionMandatory(!!e.mandatory),typeof i=="function")s.default(o).argParser(i);else if(i instanceof RegExp){let a=i;i=(l,c)=>{let p=a.exec(l);return p?p[0]:c},s.default(o).argParser(i)}else s.default(i);return this.addOption(s)}option(e,n,r,i){return this._optionEx({},e,n,r,i)}requiredOption(e,n,r,i){return this._optionEx({mandatory:!0},e,n,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,n){return this.setOptionValueWithSource(e,n,void 0)}setOptionValueWithSource(e,n,r){return this._storeOptionsAsProperties?this[e]=n:this._optionValues[e]=n,this._optionValueSources[e]=r,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let n;return this._getCommandAndAncestors().forEach(r=>{r.getOptionValueSource(e)!==void 0&&(n=r.getOptionValueSource(e))}),n}_prepareUserArgs(e,n){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(n=n||{},e===void 0&&n.from===void 0){le.versions?.electron&&(n.from="electron");let i=le.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(n.from="eval")}e===void 0&&(e=le.argv),this.rawArgs=e.slice();let r;switch(n.from){case void 0:case"node":this._scriptPath=e[1],r=e.slice(2);break;case"electron":le.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: '${n.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",r}parse(e,n){this._prepareForParse();let r=this._prepareUserArgs(e,n);return this._parseCommand([],r),this}async parseAsync(e,n){this._prepareForParse();let r=this._prepareUserArgs(e,n);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,n,r){if(Lo.existsSync(e))return;let i=n?`searched for local subcommand relative to directory '${n}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",o=`'${e}' does not exist
21
21
  - if '${r}' 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,n){n=n.slice();let r=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function o(d,p){let f=qt.resolve(d,p);if(No.existsSync(f))return f;if(i.includes(qt.extname(p)))return;let m=i.find(y=>No.existsSync(`${f}${y}`));if(m)return`${f}${m}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let d;try{d=No.realpathSync(this._scriptPath)}catch{d=this._scriptPath}a=qt.resolve(qt.dirname(d),a)}if(a){let d=o(a,s);if(!d&&!e._executableFile&&this._scriptPath){let p=qt.basename(this._scriptPath,qt.extname(this._scriptPath));p!==this._name&&(d=o(a,`${p}-${e._name}`))}s=d||s}r=i.includes(qt.extname(s));let c;le.platform!=="win32"?r?(n.unshift(s),n=Dd(le.execArgv).concat(n),c=Ya.spawn(le.argv[0],n,{stdio:"inherit"})):c=Ya.spawn(s,n,{stdio:"inherit"}):(this._checkForMissingExecutable(s,a,e._name),n.unshift(s),n=Dd(le.execArgv).concat(n),c=Ya.spawn(le.execPath,n,{stdio:"inherit"})),c.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(p=>{le.on(p,()=>{c.killed===!1&&c.exitCode===null&&c.kill(p)})});let l=this._exitCallback;c.on("close",d=>{d=d??1,l?l(new Xa(d,"commander.executeSubCommandAsync","(close)")):le.exit(d)}),c.on("error",d=>{if(d.code==="ENOENT")this._checkForMissingExecutable(s,a,e._name);else if(d.code==="EACCES")throw new Error(`'${s}' not executable`);if(!l)le.exit(1);else{let p=new Xa(1,"commander.executeSubCommandAsync","(error)");p.nestedError=d,l(p)}}),this.runningCommand=c}_dispatchSubcommand(e,n,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,n.concat(r));else return i._parseCommand(n,r)}),o}_dispatchHelpCommand(e){e||this.help();let n=this._findCommand(e);return n&&!n._executableHandler&&n.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,n)=>{e.required&&this.args[n]==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 s=i;if(i!==null&&r.parseArg){let a=`error: command-argument value '${i}' is invalid for argument '${r.name()}'.`;s=this._callParseArg(r,i,o,a)}return s};this._checkNumberOfArguments();let n=[];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((s,a)=>e(r,a,s),r.defaultValue))):o===void 0&&(o=[]):i<this.args.length&&(o=this.args[i],r.parseArg&&(o=e(r,o,r.defaultValue))),n[i]=o}),this.processedArgs=n}_chainOrCall(e,n){return e?.then&&typeof e.then=="function"?e.then(()=>n()):n()}_chainOrCallHooks(e,n){let r=e,i=[];return this._getCommandAndAncestors().reverse().filter(o=>o._lifeCycleHooks[n]!==void 0).forEach(o=>{o._lifeCycleHooks[n].forEach(s=>{i.push({hookedCommand:o,callback:s})})}),n==="postAction"&&i.reverse(),i.forEach(o=>{r=this._chainOrCall(r,()=>o.callback(o.hookedCommand,this))}),r}_chainOrCallSubCommandHook(e,n,r){let i=e;return this._lifeCycleHooks[r]!==void 0&&this._lifeCycleHooks[r].forEach(o=>{i=this._chainOrCall(i,()=>o(this,n))}),i}_parseCommand(e,n){let r=this.parseOptions(n);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(r.operands),n=r.unknown,this.args=e.concat(n),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),n);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(n),this._dispatchSubcommand(this._defaultCommandName,e,n);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 s;return s=this._chainOrCallHooks(s,"preAction"),s=this._chainOrCall(s,()=>this._actionHandler(this.processedArgs)),this.parent&&(s=this._chainOrCall(s,()=>{this.parent.emit(o,e,n)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent?.listenerCount(o))i(),this._processArguments(),this.parent.emit(o,e,n);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,n);this.listenerCount("command:*")?this.emit("command:*",e,n):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(n=>n._name===e||n._aliases.includes(e))}_findOption(e){return this.options.find(n=>n.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(n=>{n.mandatory&&e.getOptionValue(n.attributeName())===void 0&&e.missingMandatoryOptionValue(n)})})}_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 n=[],r=[],i=n;function o(d){return d.length>1&&d[0]==="-"}let s=d=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(d)?!this._getCommandAndAncestors().some(p=>p.options.map(f=>f.short).some(f=>/^-\d$/.test(f))):!1,a=null,c=null,l=0;for(;l<e.length||c;){let d=c??e[l++];if(c=null,d==="--"){i===r&&i.push(d),i.push(...e.slice(l));break}if(a&&(!o(d)||s(d))){this.emit(`option:${a.name()}`,d);continue}if(a=null,o(d)){let p=this._findOption(d);if(p){if(p.required){let f=e[l++];f===void 0&&this.optionMissingArgument(p),this.emit(`option:${p.name()}`,f)}else if(p.optional){let f=null;l<e.length&&(!o(e[l])||s(e[l]))&&(f=e[l++]),this.emit(`option:${p.name()}`,f)}else this.emit(`option:${p.name()}`);a=p.variadic?p:null;continue}}if(d.length>2&&d[0]==="-"&&d[1]!=="-"){let p=this._findOption(`-${d[1]}`);if(p){p.required||p.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${p.name()}`,d.slice(2)):(this.emit(`option:${p.name()}`),c=`-${d.slice(2)}`);continue}}if(/^--[^=]+=/.test(d)){let p=d.indexOf("="),f=this._findOption(d.slice(0,p));if(f&&(f.required||f.optional)){this.emit(`option:${f.name()}`,d.slice(p+1));continue}}if(i===n&&o(d)&&!(this.commands.length===0&&s(d))&&(i=r),(this._enablePositionalOptions||this._passThroughOptions)&&n.length===0&&r.length===0){if(this._findCommand(d)){n.push(d),r.push(...e.slice(l));break}else if(this._getHelpCommand()&&d===this._getHelpCommand().name()){n.push(d,...e.slice(l));break}else if(this._defaultCommandName){r.push(d,...e.slice(l));break}}if(this._passThroughOptions){i.push(d,...e.slice(l));break}i.push(d)}return{operands:n,unknown:r}}opts(){if(this._storeOptionsAsProperties){let e={},n=this.options.length;for(let r=0;r<n;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,n)=>Object.assign(e,n.opts()),{})}error(e,n){this._outputConfiguration.outputError(`${e}
23
+ - ${i}`;throw new Error(o)}_executeSubCommand(e,n){n=n.slice();let r=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function o(p,d){let f=Bt.resolve(p,d);if(Lo.existsSync(f))return f;if(i.includes(Bt.extname(d)))return;let m=i.find(y=>Lo.existsSync(`${f}${y}`));if(m)return`${f}${m}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let p;try{p=Lo.realpathSync(this._scriptPath)}catch{p=this._scriptPath}a=Bt.resolve(Bt.dirname(p),a)}if(a){let p=o(a,s);if(!p&&!e._executableFile&&this._scriptPath){let d=Bt.basename(this._scriptPath,Bt.extname(this._scriptPath));d!==this._name&&(p=o(a,`${d}-${e._name}`))}s=p||s}r=i.includes(Bt.extname(s));let l;le.platform!=="win32"?r?(n.unshift(s),n=Jd(le.execArgv).concat(n),l=ec.spawn(le.argv[0],n,{stdio:"inherit"})):l=ec.spawn(s,n,{stdio:"inherit"}):(this._checkForMissingExecutable(s,a,e._name),n.unshift(s),n=Jd(le.execArgv).concat(n),l=ec.spawn(le.execPath,n,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(d=>{le.on(d,()=>{l.killed===!1&&l.exitCode===null&&l.kill(d)})});let c=this._exitCallback;l.on("close",p=>{p=p??1,c?c(new tc(p,"commander.executeSubCommandAsync","(close)")):le.exit(p)}),l.on("error",p=>{if(p.code==="ENOENT")this._checkForMissingExecutable(s,a,e._name);else if(p.code==="EACCES")throw new Error(`'${s}' not executable`);if(!c)le.exit(1);else{let d=new tc(1,"commander.executeSubCommandAsync","(error)");d.nestedError=p,c(d)}}),this.runningCommand=l}_dispatchSubcommand(e,n,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,n.concat(r));else return i._parseCommand(n,r)}),o}_dispatchHelpCommand(e){e||this.help();let n=this._findCommand(e);return n&&!n._executableHandler&&n.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,n)=>{e.required&&this.args[n]==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 s=i;if(i!==null&&r.parseArg){let a=`error: command-argument value '${i}' is invalid for argument '${r.name()}'.`;s=this._callParseArg(r,i,o,a)}return s};this._checkNumberOfArguments();let n=[];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((s,a)=>e(r,a,s),r.defaultValue))):o===void 0&&(o=[]):i<this.args.length&&(o=this.args[i],r.parseArg&&(o=e(r,o,r.defaultValue))),n[i]=o}),this.processedArgs=n}_chainOrCall(e,n){return e?.then&&typeof e.then=="function"?e.then(()=>n()):n()}_chainOrCallHooks(e,n){let r=e,i=[];return this._getCommandAndAncestors().reverse().filter(o=>o._lifeCycleHooks[n]!==void 0).forEach(o=>{o._lifeCycleHooks[n].forEach(s=>{i.push({hookedCommand:o,callback:s})})}),n==="postAction"&&i.reverse(),i.forEach(o=>{r=this._chainOrCall(r,()=>o.callback(o.hookedCommand,this))}),r}_chainOrCallSubCommandHook(e,n,r){let i=e;return this._lifeCycleHooks[r]!==void 0&&this._lifeCycleHooks[r].forEach(o=>{i=this._chainOrCall(i,()=>o(this,n))}),i}_parseCommand(e,n){let r=this.parseOptions(n);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(r.operands),n=r.unknown,this.args=e.concat(n),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),n);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(n),this._dispatchSubcommand(this._defaultCommandName,e,n);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 s;return s=this._chainOrCallHooks(s,"preAction"),s=this._chainOrCall(s,()=>this._actionHandler(this.processedArgs)),this.parent&&(s=this._chainOrCall(s,()=>{this.parent.emit(o,e,n)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent?.listenerCount(o))i(),this._processArguments(),this.parent.emit(o,e,n);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,n);this.listenerCount("command:*")?this.emit("command:*",e,n):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(n=>n._name===e||n._aliases.includes(e))}_findOption(e){return this.options.find(n=>n.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(n=>{n.mandatory&&e.getOptionValue(n.attributeName())===void 0&&e.missingMandatoryOptionValue(n)})})}_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 n=[],r=[],i=n;function o(p){return p.length>1&&p[0]==="-"}let s=p=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(p)?!this._getCommandAndAncestors().some(d=>d.options.map(f=>f.short).some(f=>/^-\d$/.test(f))):!1,a=null,l=null,c=0;for(;c<e.length||l;){let p=l??e[c++];if(l=null,p==="--"){i===r&&i.push(p),i.push(...e.slice(c));break}if(a&&(!o(p)||s(p))){this.emit(`option:${a.name()}`,p);continue}if(a=null,o(p)){let d=this._findOption(p);if(d){if(d.required){let f=e[c++];f===void 0&&this.optionMissingArgument(d),this.emit(`option:${d.name()}`,f)}else if(d.optional){let f=null;c<e.length&&(!o(e[c])||s(e[c]))&&(f=e[c++]),this.emit(`option:${d.name()}`,f)}else this.emit(`option:${d.name()}`);a=d.variadic?d:null;continue}}if(p.length>2&&p[0]==="-"&&p[1]!=="-"){let d=this._findOption(`-${p[1]}`);if(d){d.required||d.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${d.name()}`,p.slice(2)):(this.emit(`option:${d.name()}`),l=`-${p.slice(2)}`);continue}}if(/^--[^=]+=/.test(p)){let d=p.indexOf("="),f=this._findOption(p.slice(0,d));if(f&&(f.required||f.optional)){this.emit(`option:${f.name()}`,p.slice(d+1));continue}}if(i===n&&o(p)&&!(this.commands.length===0&&s(p))&&(i=r),(this._enablePositionalOptions||this._passThroughOptions)&&n.length===0&&r.length===0){if(this._findCommand(p)){n.push(p),r.push(...e.slice(c));break}else if(this._getHelpCommand()&&p===this._getHelpCommand().name()){n.push(p,...e.slice(c));break}else if(this._defaultCommandName){r.push(p,...e.slice(c));break}}if(this._passThroughOptions){i.push(p,...e.slice(c));break}i.push(p)}return{operands:n,unknown:r}}opts(){if(this._storeOptionsAsProperties){let e={},n=this.options.length;for(let r=0;r<n;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,n)=>Object.assign(e,n.opts()),{})}error(e,n){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=n||{},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 le.env){let n=e.attributeName();(this.getOptionValue(n)===void 0||["default","config","env"].includes(this.getOptionValueSource(n)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,le.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Z_(this.options),n=r=>this.getOptionValue(r)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(r));this.options.filter(r=>r.implied!==void 0&&n(r.attributeName())&&e.valueFromOption(this.getOptionValue(r.attributeName()),r)).forEach(r=>{Object.keys(r.implied).filter(i=>!n(i)).forEach(i=>{this.setOptionValueWithSource(i,r.implied[i],"implied")})})}missingArgument(e){let n=`error: missing required argument '${e}'`;this.error(n,{code:"commander.missingArgument"})}optionMissingArgument(e){let n=`error: option '${e.flags}' argument missing`;this.error(n,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let n=`error: required option '${e.flags}' not specified`;this.error(n,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,n){let r=s=>{let a=s.attributeName(),c=this.getOptionValue(a),l=this.options.find(p=>p.negate&&a===p.attributeName()),d=this.options.find(p=>!p.negate&&a===p.attributeName());return l&&(l.presetArg===void 0&&c===!1||l.presetArg!==void 0&&c===l.presetArg)?l:d||s},i=s=>{let a=r(s),c=a.attributeName();return this.getOptionValueSource(c)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},o=`error: ${i(e)} cannot be used with ${i(n)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let n="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],o=this;do{let s=o.createHelp().visibleOptions(o).filter(a=>a.long).map(a=>a.long);i=i.concat(s),o=o.parent}while(o&&!o._enablePositionalOptions);n=jd(e,i)}let r=`error: unknown option '${e}'${n}`;this.error(r,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let n=this.registeredArguments.length,r=n===1?"":"s",o=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${n} argument${r} but got ${e.length}.`;this.error(o,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],n="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(o=>{i.push(o.name()),o.alias()&&i.push(o.alias())}),n=jd(e,i)}let r=`error: unknown command '${e}'${n}`;this.error(r,{code:"commander.unknownCommand"})}version(e,n,r){if(e===void 0)return this._version;this._version=e,n=n||"-V, --version",r=r||"output the version number";let i=this.createOption(n,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,n){return e===void 0&&n===void 0?this._description:(this._description=e,n&&(this._argsDescription=n),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let n=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(n=this.commands[this.commands.length-1]),e===n._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 n._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(n=>this.alias(n)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let n=this.registeredArguments.map(r=>Y_(r));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?n:[]).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=qt.basename(e,qt.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let n=this.createHelp(),r=this._getOutputContext(e);n.prepareContext({error:r.error,helpWidth:r.helpWidth,outputHasColors:r.hasColors});let i=n.formatHelp(this,n);return r.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(e){e=e||{};let n=!!e.error,r,i,o;return n?(r=a=>this._outputConfiguration.writeErr(a),i=this._outputConfiguration.getErrHasColors(),o=this._outputConfiguration.getErrHelpWidth()):(r=a=>this._outputConfiguration.writeOut(a),i=this._outputConfiguration.getOutHasColors(),o=this._outputConfiguration.getOutHelpWidth()),{error:n,write:a=>(i||(a=this._outputConfiguration.stripColor(a)),r(a)),hasColors:i,helpWidth:o}}outputHelp(e){let n;typeof e=="function"&&(n=e,e=void 0);let r=this._getOutputContext(e),i={error:r.error,write:r.write,command:this};this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let o=this.helpInformation({error:r.error});if(n&&(o=n(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(s=>s.emit("afterAllHelp",i))}helpOption(e,n){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",n??"display help for command"),(e||n)&&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 n=Number(le.exitCode??0);n===0&&e&&typeof e!="function"&&e.error&&(n=1),this._exit(n,"commander.help","(outputHelp)")}addHelpText(e,n){let r=["beforeAll","before","after","afterAll"];if(!r.includes(e))throw new Error(`Unexpected value for position to addHelpText.
26
+ `),this.outputHelp({error:!0}));let r=n||{},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 le.env){let n=e.attributeName();(this.getOptionValue(n)===void 0||["default","config","env"].includes(this.getOptionValueSource(n)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,le.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new s0(this.options),n=r=>this.getOptionValue(r)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(r));this.options.filter(r=>r.implied!==void 0&&n(r.attributeName())&&e.valueFromOption(this.getOptionValue(r.attributeName()),r)).forEach(r=>{Object.keys(r.implied).filter(i=>!n(i)).forEach(i=>{this.setOptionValueWithSource(i,r.implied[i],"implied")})})}missingArgument(e){let n=`error: missing required argument '${e}'`;this.error(n,{code:"commander.missingArgument"})}optionMissingArgument(e){let n=`error: option '${e.flags}' argument missing`;this.error(n,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let n=`error: required option '${e.flags}' not specified`;this.error(n,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,n){let r=s=>{let a=s.attributeName(),l=this.getOptionValue(a),c=this.options.find(d=>d.negate&&a===d.attributeName()),p=this.options.find(d=>!d.negate&&a===d.attributeName());return c&&(c.presetArg===void 0&&l===!1||c.presetArg!==void 0&&l===c.presetArg)?c:p||s},i=s=>{let a=r(s),l=a.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},o=`error: ${i(e)} cannot be used with ${i(n)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let n="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],o=this;do{let s=o.createHelp().visibleOptions(o).filter(a=>a.long).map(a=>a.long);i=i.concat(s),o=o.parent}while(o&&!o._enablePositionalOptions);n=Gd(e,i)}let r=`error: unknown option '${e}'${n}`;this.error(r,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let n=this.registeredArguments.length,r=n===1?"":"s",o=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${n} argument${r} but got ${e.length}.`;this.error(o,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],n="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(o=>{i.push(o.name()),o.alias()&&i.push(o.alias())}),n=Gd(e,i)}let r=`error: unknown command '${e}'${n}`;this.error(r,{code:"commander.unknownCommand"})}version(e,n,r){if(e===void 0)return this._version;this._version=e,n=n||"-V, --version",r=r||"output the version number";let i=this.createOption(n,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,n){return e===void 0&&n===void 0?this._description:(this._description=e,n&&(this._argsDescription=n),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let n=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(n=this.commands[this.commands.length-1]),e===n._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 n._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(n=>this.alias(n)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let n=this.registeredArguments.map(r=>r0(r));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?n:[]).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=Bt.basename(e,Bt.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let n=this.createHelp(),r=this._getOutputContext(e);n.prepareContext({error:r.error,helpWidth:r.helpWidth,outputHasColors:r.hasColors});let i=n.formatHelp(this,n);return r.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(e){e=e||{};let n=!!e.error,r,i,o;return n?(r=a=>this._outputConfiguration.writeErr(a),i=this._outputConfiguration.getErrHasColors(),o=this._outputConfiguration.getErrHelpWidth()):(r=a=>this._outputConfiguration.writeOut(a),i=this._outputConfiguration.getOutHasColors(),o=this._outputConfiguration.getOutHelpWidth()),{error:n,write:a=>(i||(a=this._outputConfiguration.stripColor(a)),r(a)),hasColors:i,helpWidth:o}}outputHelp(e){let n;typeof e=="function"&&(n=e,e=void 0);let r=this._getOutputContext(e),i={error:r.error,write:r.write,command:this};this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let o=this.helpInformation({error:r.error});if(n&&(o=n(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(s=>s.emit("afterAllHelp",i))}helpOption(e,n){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",n??"display help for command"),(e||n)&&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 n=Number(le.exitCode??0);n===0&&e&&typeof e!="function"&&e.error&&(n=1),this._exit(n,"commander.help","(outputHelp)")}addHelpText(e,n){let r=["beforeAll","before","after","afterAll"];if(!r.includes(e))throw new Error(`Unexpected value for position to addHelpText.
28
28
  Expecting one of '${r.join("', '")}'`);let i=`${e}Help`;return this.on(i,o=>{let s;typeof n=="function"?s=n({error:o.error,command:o.command}):s=n,s&&o.write(`${s}
29
- `)}),this}_outputHelpIfRequested(e){let n=this._getHelpOption();n&&e.find(i=>n.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Dd(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let n,r="127.0.0.1",i="9229",o;return(o=e.match(/^(--inspect(-brk)?)$/))!==null?n=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(n=o[1],/^\d+$/.test(o[3])?i=o[3]:r=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(n=o[1],r=o[3],i=o[4]),n&&i!=="0"?`${n}=${r}:${parseInt(i)+1}`:e})}function Za(){if(le.env.NO_COLOR||le.env.FORCE_COLOR==="0"||le.env.FORCE_COLOR==="false")return!1;if(le.env.FORCE_COLOR||le.env.CLICOLOR_FORCE!==void 0)return!0}ec.Command=Qa;ec.useColor=Za});var Wd=S(st=>{var{Argument:qd}=Oo(),{Command:tc}=Fd(),{CommanderError:e0,InvalidArgumentError:Bd}=ii(),{Help:t0}=Ua(),{Option:Hd}=Ka();st.program=new tc;st.createCommand=t=>new tc(t);st.createOption=(t,e)=>new Hd(t,e);st.createArgument=(t,e)=>new qd(t,e);st.Command=tc;st.Option=Hd;st.Argument=qd;st.Help=t0;st.CommanderError=e0;st.InvalidArgumentError=Bd;st.InvalidOptionArgumentError=Bd});function Yd(t){return Mo[t]?.properties??[]}function Xd(t,e){let n=Mo[e];return n?n.properties.includes(t):!1}var oi,Mo,at,rr,rO,vt=K(()=>{"use strict";oi={id:{type:"string",category:"identity",lowering:"attribute",description:"Stable identifier for tests and diff updates"},role:{type:"string",category:"identity",lowering:"attribute",enum:"role",description:"Accessibility semantics (not HTML tag names)"},label:{type:"string",category:"identity",lowering:"attribute",description:"Accessible name; required for IconButton"},visible:{type:"boolean",category:"state",lowering:"none",description:"Show or omit from render tree"},enabled:{type:"boolean",category:"state",lowering:"attribute"},selected:{type:"boolean",category:"state",lowering:"attribute"},checked:{type:"boolean",category:"state",lowering:"attribute"},readonly:{type:"boolean",category:"state",lowering:"attribute"},required:{type:"boolean",category:"state",lowering:"attribute"},width:{type:["string","number"],category:"size",lowering:"inline-css",enum:"widthSize",notes:"string: wrap|fill; number: fixed px/dp/pt; flex ratio uses weight property"},height:{type:["string","number"],category:"size",lowering:"inline-css",enum:"heightSize",notes:"string: wrap|fill; number: fixed px/dp/pt; flex ratio uses weight property"},minWidth:{type:"number",category:"size",lowering:"inline-css"},maxWidth:{type:["string","number"],category:"size",lowering:"inline-css",notes:"number or fill"},minHeight:{type:"number",category:"size",lowering:"inline-css"},maxHeight:{type:["string","number"],category:"size",lowering:"inline-css",notes:"number or fill"},aspectRatio:{type:"number",category:"size",lowering:"inline-css"},weight:{type:"number",category:"size",lowering:"inline-css",notes:"Flex ratio among Row/Column direct children; Spacer is the primary use case"},padding:{type:["string","number"],category:"spacing",lowering:"inline-css",notes:"space token or per-side"},gap:{type:["string","number"],category:"spacing",lowering:"inline-css"},align:{type:"string",category:"alignment",lowering:"inline-css",enum:"align"},justify:{type:"string",category:"alignment",lowering:"inline-css",enum:"justify"},selfAlign:{type:"string",category:"alignment",lowering:"inline-css",enum:"align"},contentAlign:{type:"string",category:"alignment",lowering:"inline-css",enum:"contentAlign"},axis:{type:"string",category:"direction",lowering:"inline-css",enum:"axis"},direction:{type:"string",category:"direction",lowering:"attribute",enum:"direction",description:"Text/layout direction; set at app or screen root, not per layout container"},scroll:{type:"string",category:"overflow",lowering:"inline-css",enum:"scroll"},background:{type:"string",category:"visual",lowering:"inline-css",notes:"color token"},foreground:{type:"string",category:"visual",lowering:"inline-css",notes:"color token"},border:{type:["string","object"],category:"visual",lowering:"inline-css",enum:"border",notes:"none|token|{width,color}"},separator:{type:"number",category:"visual",lowering:"inline-css",notes:"Row separator width in px/dp/pt (0=off)"},separatorColor:{type:"string",category:"visual",lowering:"inline-css",notes:"Row separator color token"},radius:{type:"string",category:"visual",lowering:"inline-css",notes:"radius token"},shadow:{type:"string",category:"visual",lowering:"inline-css",enum:"shadow"},opacity:{type:"number",category:"visual",lowering:"inline-css",notes:"0..1"},clip:{type:"string",category:"visual",lowering:"inline-css",enum:"clip"},textStyle:{type:"string",category:"text",lowering:"inline-css",notes:"typography token"},textAlign:{type:"string",category:"text",lowering:"inline-css",enum:"textAlign"},lineLimit:{type:["string","number"],category:"text",lowering:"inline-css",enum:"lineLimit"},textOverflow:{type:"string",category:"text",lowering:"inline-css",enum:"textOverflow"},fontWeight:{type:"string",category:"text",lowering:"inline-css",enum:"fontWeight"},size:{type:"number",category:"text",lowering:"inline-css",notes:"Font size shorthand (px/dp/pt)"},fit:{type:"string",category:"image",lowering:"inline-css",enum:"imageFit"},src:{type:"string",category:"image",lowering:"attribute",description:"Image source URL or asset reference"},alt:{type:"string",category:"image",lowering:"attribute",description:"Alternative text; not a source reference"},name:{type:"string",category:"identity",lowering:"attribute",description:"Form field name (for FormData) or icon token in the renderer icon set"},action:{type:"action",category:"interaction",lowering:"none",description:"Action descriptor { name, params? }; the element's click/submit action (takes precedence over onClick/onSubmit)"},onClick:{type:"action",category:"interaction",lowering:"none",description:"Action id, not arbitrary code"},onSubmit:{type:"action",category:"interaction",lowering:"none",description:"Form submit/validation action id"},onChange:{type:"action",category:"interaction",lowering:"none"},focusable:{type:"boolean",category:"interaction",lowering:"attribute"},autoFocus:{type:"boolean",category:"interaction",lowering:"attribute"},keyboardType:{type:"string",category:"interaction",lowering:"attribute",enum:"keyboardType"},inputType:{type:"string",category:"interaction",lowering:"attribute",enum:"inputType",description:"HTML input type variant (text, password, email, url, tel)"},value:{type:["string","number","boolean"],category:"data",lowering:"attribute"},binding:{type:"string",category:"data",lowering:"none",description:"ViewModel or form state field identifier"},placeholder:{type:"string",category:"data",lowering:"attribute"},options:{type:"array",category:"data",lowering:"none",notes:"array<{value,label}>"},error:{type:["string","null"],category:"validation",lowering:"none"},help:{type:["string","null"],category:"validation",lowering:"none"},variant:{type:"string",category:"visual",lowering:"class-name",notes:"design token variant"},theme:{type:"string",category:"visual",lowering:"class-name",notes:"active theme id for runtime theme switching"},display:{type:"string",category:"layout",lowering:"inline-css",notes:"CSS display value (grid, flex, etc.)"},gridTemplateColumns:{type:"string",category:"layout",lowering:"inline-css",notes:"CSS grid-template-columns"},flexDirection:{type:"string",category:"layout",lowering:"inline-css",notes:"CSS flex-direction"},alignItems:{type:"string",category:"alignment",lowering:"inline-css",notes:"CSS align-items"},margin:{type:["string","number"],category:"spacing",lowering:"inline-css",notes:"space token or per-side"},borderColor:{type:"string",category:"visual",lowering:"inline-css",notes:"border color token"},fontSize:{type:["string","number"],category:"text",lowering:"inline-css",notes:"CSS font-size"},flex:{type:"number",category:"size",lowering:"inline-css",description:"Flex grow ratio for proportional sizing in table columns/cells"},each:{type:"string",category:"data",lowering:"none",description:"Iterator variable name for data-bound row repetition"},source:{type:"string",category:"data",lowering:"none",description:"ViewModel array binding for data-driven elements"},headerVisible:{type:"boolean",category:"state",lowering:"attribute"}},Mo={App:{description:"App root; holds theme/token/navigation context",tier:"core",category:"structure",notes:"Optional; not required for single-screen DSL",properties:["id","padding","direction","theme","variant"],children:{kind:"list",items:["Page"]}},Page:{description:"Screen root; viewport and safe-area boundary",tier:"core",category:"structure",properties:["id","visible","padding","direction","variant"],children:{kind:"list",items:["Column","Row","Stack","Box"]}},SafeArea:{description:"Insets for OS/browser safe areas",tier:"core",category:"structure",properties:["id","padding","variant"],children:{kind:"list",items:["Box","Column","Row"]}},Box:{description:"Single region; background, bounds, child placement",tier:"core",category:"layout",properties:["id","visible","width","height","minWidth","maxWidth","minHeight","maxHeight","padding","margin","gap","contentAlign","background","foreground","border","borderColor","radius","shadow","opacity","clip","selfAlign","display","gridTemplateColumns","flexDirection","variant"],children:{kind:"any"}},Row:{description:"Horizontal child layout",tier:"core",category:"layout",properties:["id","visible","gap","align","justify","padding","width","height","minWidth","maxWidth","minHeight","maxHeight","variant"],children:{kind:"any"}},Column:{description:"Vertical child layout",tier:"core",category:"layout",properties:["id","visible","gap","align","justify","padding","width","height","minWidth","maxWidth","minHeight","maxHeight","variant"],children:{kind:"any"}},Stack:{description:"Overlay children by z-order (not absolute positioning)",tier:"core",category:"layout",properties:["id","visible","gap","contentAlign","padding","width","height","background","variant"],children:{kind:"any"}},Spacer:{description:"Occupies remaining flex space",tier:"core",category:"layout",notes:"Direct child of Row/Column only",properties:["id","width","height","weight","variant"],children:{kind:"none"}},Divider:{description:"Horizontal or vertical separator",tier:"core",category:"layout",properties:["id","axis","variant"],children:{kind:"none"}},ScrollArea:{description:"Internal scroll boundary",tier:"core",category:"scroll",properties:["id","axis","scroll","width","height","minHeight","maxHeight","padding","variant"],children:{kind:"single"}},List:{description:"Homogeneous list of items",tier:"core",category:"scroll",properties:["id","gap","axis","role","visible","variant"],children:{kind:"list",items:["ListItem"]}},ListItem:{description:"One row/cell in a list",tier:"core",category:"scroll",properties:["id","selected","padding","gap","role","visible","variant"],children:{kind:"any"}},Text:{description:"Text display",tier:"core",category:"text",properties:["id","visible","textStyle","textAlign","lineLimit","textOverflow","fontWeight","fontSize","size","foreground","background","opacity","padding","radius","display","alignItems","role","variant"],children:{kind:"text"}},Link:{description:"Navigable text or region",tier:"optional",category:"text",properties:["id","visible","action","onClick","label","foreground","role","variant"],children:{kind:"text"}},Image:{description:"Image display",tier:"core",category:"media",properties:["id","visible","src","fit","alt","width","height","aspectRatio","radius","variant"],children:{kind:"none"}},Icon:{description:"Icon display; asset set referenced by name token at renderer",tier:"core",category:"media",properties:["id","visible","name","alt","foreground","opacity","variant"],children:{kind:"none"}},Button:{description:"Pressable action; label or children required (label is a11y name when both present)",tier:"core",category:"input",properties:["id","visible","enabled","action","onClick","label","foreground","background","radius","padding","shadow","border","borderColor","fontWeight","fontSize","variant","role"],children:{kind:"list",items:["Text","Icon","Row"]}},IconButton:{description:"Icon-primary button; label required for accessibility",tier:"optional",category:"input",properties:["id","visible","enabled","action","onClick","label","foreground","background","radius","padding","variant"],children:{kind:"list",items:["Icon"]}},TextInput:{description:"Single-line text input",tier:"core",category:"input",properties:["id","visible","enabled","readonly","required","name","value","binding","placeholder","onChange","error","help","keyboardType","inputType","focusable","autoFocus","width","label","foreground","background","radius","padding","border","borderColor","minHeight","fontSize","variant"],children:{kind:"none"}},TextArea:{description:"Multi-line text input",tier:"core",category:"input",properties:["id","visible","enabled","readonly","required","name","value","binding","placeholder","onChange","error","help","focusable","width","minHeight","label","foreground","background","radius","padding","border","borderColor","fontSize","variant"],children:{kind:"none"}},Select:{description:"Single selection",tier:"core",category:"input",properties:["id","visible","enabled","required","name","value","binding","options","onChange","error","help","width","label","foreground","background","radius","padding","border","borderColor","minHeight","fontSize","variant"],children:{kind:"none"}},Checkbox:{description:"Boolean or multi-select toggle",tier:"core",category:"input",properties:["id","visible","enabled","checked","required","binding","label","onChange","variant"],children:{kind:"none"}},Radio:{description:"Single choice in a group (use Row/Column to group; binding identifies group)",tier:"core",category:"input",notes:"RadioGroup is expressed via layout Group, not a separate element",properties:["id","visible","enabled","checked","binding","label","value","onChange","variant"],children:{kind:"none"}},Switch:{description:"On/off toggle",tier:"core",category:"input",properties:["id","visible","enabled","checked","binding","label","onChange","variant"],children:{kind:"none"}},Form:{description:"Input group submit/validation boundary",tier:"core",category:"form",properties:["id","visible","gap","action","onSubmit","variant"],children:{kind:"any"}},Field:{description:"label/help/error/input unit",tier:"core",category:"form",properties:["id","visible","label","help","error","required","gap","variant"],children:{kind:"any"}},Modal:{description:"Primary transient dialog",tier:"core",category:"overlay",notes:"Direct child of Page or App; role defaults to dialog at renderer",properties:["id","visible","role","autoFocus","variant"],children:{kind:"list",items:["Box","Column"]}},Drawer:{description:"Edge panel overlay",tier:"extension",category:"overlay",notes:"Placement limited to start/end/bottom at renderer",properties:["id","visible","variant"],children:{kind:"list",items:["Box","Column"]}},Popover:{description:"Small anchored panel",tier:"extension",category:"overlay",properties:["id","visible","variant"],children:{kind:"list",items:["Box","Column"]}},Tooltip:{description:"Supplementary description",tier:"extension",category:"overlay",properties:["id","visible","label","variant"],children:{kind:"text"}},Progress:{description:"Determinate progress",tier:"core",category:"feedback",properties:["id","visible","value","variant"],children:{kind:"none"}},Spinner:{description:"Indeterminate loading",tier:"core",category:"feedback",properties:["id","visible","variant"],children:{kind:"none"}},Table:{description:"Data table with header and repeated rows",tier:"core",category:"data",properties:["id","visible","source","gap","border","borderColor","separator","separatorColor","variant"],children:{kind:"list",items:["TableHeader","TableRow"]}},TableHeader:{description:"Table header row defining column labels",tier:"core",category:"data",properties:["height","border","borderColor","background","alignItems","variant"],children:{kind:"list",items:["TableColumn"]}},TableColumn:{description:"Header cell definition; children override label text",tier:"core",category:"data",properties:["label","width","flex","align","border","borderColor","padding","fontSize","fontWeight","foreground","variant"],children:{kind:"any"}},TableRow:{description:"Row template repeated for each source item",tier:"core",category:"data",properties:["each","height","border","borderColor","alignItems","variant"],children:{kind:"list",items:["TableCell"]}},TableCell:{description:"Data cell; children define cell content",tier:"core",category:"data",properties:["width","flex","align","border","borderColor","padding","fontSize","foreground","variant"],children:{kind:"any"}}},at=new Set(Object.keys(Mo)),rr=new Set(Object.entries(oi).filter(([,t])=>t.lowering==="inline-css").map(([t])=>t)),rO=new Set(Object.entries(oi).filter(([,t])=>t.lowering==="class-name").map(([t])=>t))});function S0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ui(){if(mf)return an;mf=1;function t(s){return typeof s>"u"||s===null}function e(s){return typeof s=="object"&&s!==null}function n(s){return Array.isArray(s)?s:t(s)?[]:[s]}function r(s,a){if(a){let c=Object.keys(a);for(let l=0,d=c.length;l<d;l+=1){let p=c[l];s[p]=a[p]}}return s}function i(s,a){let c="";for(let l=0;l<a;l+=1)c+=s;return c}function o(s){return s===0&&Number.NEGATIVE_INFINITY===1/s}return an.isNothing=t,an.isObject=e,an.toArray=n,an.repeat=i,an.isNegativeZero=o,an.extend=r,an}function pi(){if(gf)return pc;gf=1;function t(n,r){let i="",o=n.reason||"(unknown reason)";return n.mark?(n.mark.name&&(i+='in "'+n.mark.name+'" '),i+="("+(n.mark.line+1)+":"+(n.mark.column+1)+")",!r&&n.mark.snippet&&(i+=`
29
+ `)}),this}_outputHelpIfRequested(e){let n=this._getHelpOption();n&&e.find(i=>n.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Jd(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let n,r="127.0.0.1",i="9229",o;return(o=e.match(/^(--inspect(-brk)?)$/))!==null?n=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(n=o[1],/^\d+$/.test(o[3])?i=o[3]:r=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(n=o[1],r=o[3],i=o[4]),n&&i!=="0"?`${n}=${r}:${parseInt(i)+1}`:e})}function rc(){if(le.env.NO_COLOR||le.env.FORCE_COLOR==="0"||le.env.FORCE_COLOR==="false")return!1;if(le.env.FORCE_COLOR||le.env.CLICOLOR_FORCE!==void 0)return!0}ic.Command=nc;ic.useColor=rc});var Zd=S(ct=>{var{Argument:Yd}=Vo(),{Command:oc}=Kd(),{CommanderError:a0,InvalidArgumentError:Xd}=ai(),{Help:c0}=Ka(),{Option:Qd}=Za();ct.program=new oc;ct.createCommand=t=>new oc(t);ct.createOption=(t,e)=>new Qd(t,e);ct.createArgument=(t,e)=>new Yd(t,e);ct.Command=oc;ct.Option=Qd;ct.Argument=Yd;ct.Help=c0;ct.CommanderError=a0;ct.InvalidArgumentError=Xd;ct.InvalidOptionArgumentError=Xd});function sc(t){return ci[t]?.properties??[]}function ac(t,e){let n=ci[e];return n?n.properties.includes(t):!1}var jo,ci,lt,sr,yO,nt=K(()=>{"use strict";jo={id:{type:"string",category:"identity",lowering:"attribute",description:"Stable identifier for tests and diff updates"},data:{type:"object",category:"identity",lowering:"attribute",description:"Custom data attributes { key: value }; web only (data-<kebab-key>), not rendered on native"},title:{type:"string",category:"identity",lowering:"attribute",description:"Screen title; accessible name of the page"},role:{type:"string",category:"identity",lowering:"attribute",enum:"role",description:"Accessibility semantics (not HTML tag names)"},label:{type:"string",category:"identity",lowering:"attribute",description:"Accessible name; required for IconButton"},visible:{type:"boolean",category:"state",lowering:"none",description:"Show or omit from render tree"},enabled:{type:"boolean",category:"state",lowering:"attribute"},selected:{type:"boolean",category:"state",lowering:"attribute"},checked:{type:"boolean",category:"state",lowering:"attribute"},readonly:{type:"boolean",category:"state",lowering:"attribute"},required:{type:"boolean",category:"state",lowering:"attribute"},width:{type:["string","number"],category:"size",lowering:"inline-css",enum:"widthSize",notes:"string: wrap|fill; number: fixed px/dp/pt; flex ratio uses weight property"},height:{type:["string","number"],category:"size",lowering:"inline-css",enum:"heightSize",notes:"string: wrap|fill; number: fixed px/dp/pt; flex ratio uses weight property"},minWidth:{type:"number",category:"size",lowering:"inline-css"},maxWidth:{type:["string","number"],category:"size",lowering:"inline-css",notes:"number or fill"},minHeight:{type:"number",category:"size",lowering:"inline-css"},maxHeight:{type:["string","number"],category:"size",lowering:"inline-css",notes:"number or fill"},aspectRatio:{type:"number",category:"size",lowering:"inline-css"},weight:{type:"number",category:"size",lowering:"inline-css",notes:"Flex ratio among Row/Column direct children; Spacer is the primary use case"},padding:{type:["string","number"],category:"spacing",lowering:"inline-css",notes:"space token or per-side"},gap:{type:["string","number"],category:"spacing",lowering:"inline-css"},align:{type:"string",category:"alignment",lowering:"inline-css",enum:"align"},justify:{type:"string",category:"alignment",lowering:"inline-css",enum:"justify"},selfAlign:{type:"string",category:"alignment",lowering:"inline-css",enum:"align"},contentAlign:{type:"string",category:"alignment",lowering:"inline-css",enum:"contentAlign"},axis:{type:"string",category:"direction",lowering:"inline-css",enum:"axis"},direction:{type:"string",category:"direction",lowering:"attribute",enum:"direction",description:"Text/layout direction; set at app or screen root, not per layout container"},scroll:{type:"string",category:"overflow",lowering:"inline-css",enum:"scroll"},background:{type:"string",category:"visual",lowering:"inline-css",notes:"color token"},foreground:{type:"string",category:"visual",lowering:"inline-css",notes:"color token"},border:{type:["string","object"],category:"visual",lowering:"inline-css",enum:"border",notes:"none|token|{width,color}"},separator:{type:"number",category:"visual",lowering:"inline-css",notes:"Row separator width in px/dp/pt (0=off)"},separatorColor:{type:"string",category:"visual",lowering:"inline-css",notes:"Row separator color token"},radius:{type:"string",category:"visual",lowering:"inline-css",notes:"radius token"},shadow:{type:"string",category:"visual",lowering:"inline-css",enum:"shadow"},opacity:{type:"number",category:"visual",lowering:"inline-css",notes:"0..1"},clip:{type:"string",category:"visual",lowering:"inline-css",enum:"clip"},textStyle:{type:"string",category:"text",lowering:"inline-css",notes:"typography token"},textAlign:{type:"string",category:"text",lowering:"inline-css",enum:"textAlign"},lineLimit:{type:["string","number"],category:"text",lowering:"inline-css",enum:"lineLimit"},textOverflow:{type:"string",category:"text",lowering:"inline-css",enum:"textOverflow"},fontWeight:{type:"string",category:"text",lowering:"inline-css",enum:"fontWeight"},size:{type:"number",category:"text",lowering:"inline-css",notes:"Font size shorthand (px/dp/pt)"},fit:{type:"string",category:"image",lowering:"inline-css",enum:"imageFit"},src:{type:"string",category:"image",lowering:"attribute",description:"Image source URL or asset reference"},alt:{type:"string",category:"image",lowering:"attribute",description:"Alternative text; not a source reference"},name:{type:"string",category:"identity",lowering:"attribute",description:"Form field name (for FormData) or icon token in the renderer icon set"},action:{type:"action",category:"interaction",lowering:"none",description:"Action descriptor { name, params? }; the element's click/submit action (takes precedence over onClick/onSubmit)"},href:{type:"string",category:"interaction",lowering:"attribute",description:"Navigation target URL"},type:{type:"string",category:"interaction",lowering:"attribute",enum:"buttonType",description:"Button behavior inside a Form; default button"},onClick:{type:"action",category:"interaction",lowering:"none",description:"Action id, not arbitrary code"},onSubmit:{type:"action",category:"interaction",lowering:"none",description:"Form submit/validation action id"},onChange:{type:"action",category:"interaction",lowering:"none"},focusable:{type:"boolean",category:"interaction",lowering:"attribute"},autoFocus:{type:"boolean",category:"interaction",lowering:"attribute"},keyboardType:{type:"string",category:"interaction",lowering:"attribute",enum:"keyboardType"},inputType:{type:"string",category:"interaction",lowering:"attribute",enum:"inputType",description:"HTML input type variant (text, password, email, url, tel)"},value:{type:["string","number","boolean"],category:"data",lowering:"attribute"},binding:{type:"string",category:"data",lowering:"none",description:"ViewModel or form state field identifier"},placeholder:{type:"string",category:"data",lowering:"attribute"},rows:{type:"number",category:"size",lowering:"attribute",description:"Visible text lines"},wrap:{type:"boolean",category:"layout",lowering:"none",description:"Wrap children onto new lines when they overflow"},options:{type:"array",category:"data",lowering:"none",notes:"array<{value,label}>"},error:{type:["string","null"],category:"validation",lowering:"none"},help:{type:["string","null"],category:"validation",lowering:"none"},variant:{type:"string",category:"visual",lowering:"class-name",notes:"design token variant"},theme:{type:"string",category:"visual",lowering:"class-name",notes:"active theme id for runtime theme switching"},display:{type:"string",category:"layout",lowering:"inline-css",notes:"CSS display value (grid, flex, etc.)"},gridTemplateColumns:{type:"string",category:"layout",lowering:"inline-css",notes:"CSS grid-template-columns"},flexDirection:{type:"string",category:"layout",lowering:"inline-css",notes:"CSS flex-direction"},alignItems:{type:"string",category:"alignment",lowering:"inline-css",notes:"CSS align-items"},margin:{type:["string","number"],category:"spacing",lowering:"inline-css",notes:"space token or per-side"},borderColor:{type:"string",category:"visual",lowering:"inline-css",notes:"border color token"},fontSize:{type:["string","number"],category:"text",lowering:"inline-css",notes:"CSS font-size"},flex:{type:"number",category:"size",lowering:"inline-css",description:"Flex grow ratio for proportional sizing in table columns/cells"},each:{type:"string",category:"data",lowering:"none",description:"Iterator variable name for data-bound row repetition"},source:{type:"string",category:"data",lowering:"none",description:"ViewModel array binding for data-driven elements"},headerVisible:{type:"boolean",category:"state",lowering:"attribute"}},ci={App:{description:"App root; holds theme/token/navigation context",tier:"core",category:"structure",notes:"Optional; not required for single-screen DSL",properties:["id","data","visible","padding","direction","theme","variant"],children:{kind:"list",items:["Page"]}},Page:{description:"Screen root; viewport and safe-area boundary",tier:"core",category:"structure",properties:["id","title","data","visible","padding","direction","variant"],children:{kind:"list",items:["Column","Row","Stack","Box"]}},SafeArea:{description:"Insets for OS/browser safe areas",tier:"core",category:"structure",properties:["id","data","visible","padding","variant"],children:{kind:"list",items:["Box","Column","Row"]}},Box:{description:"Single region; background, bounds, child placement",tier:"core",category:"layout",properties:["id","data","visible","role","label","width","height","minWidth","maxWidth","minHeight","maxHeight","padding","margin","gap","contentAlign","background","foreground","border","borderColor","radius","shadow","opacity","clip","selfAlign","display","gridTemplateColumns","flexDirection","variant"],children:{kind:"any"}},Row:{description:"Horizontal child layout",tier:"core",category:"layout",properties:["id","data","visible","role","label","gap","wrap","align","justify","padding","width","height","minWidth","maxWidth","minHeight","maxHeight","variant"],children:{kind:"any"}},Column:{description:"Vertical child layout",tier:"core",category:"layout",properties:["id","data","visible","role","label","gap","align","justify","padding","width","height","minWidth","maxWidth","minHeight","maxHeight","variant"],children:{kind:"any"}},Stack:{description:"Overlay children by z-order (not absolute positioning)",tier:"core",category:"layout",properties:["id","data","visible","role","label","gap","contentAlign","padding","width","height","background","variant"],children:{kind:"any"}},Spacer:{description:"Occupies remaining flex space",tier:"core",category:"layout",notes:"Direct child of Row/Column only",properties:["id","data","visible","width","height","weight","variant"],children:{kind:"none"}},Divider:{description:"Horizontal or vertical separator",tier:"core",category:"layout",properties:["id","data","visible","axis","variant"],children:{kind:"none"}},ScrollArea:{description:"Internal scroll boundary",tier:"core",category:"scroll",properties:["id","data","visible","axis","scroll","width","height","minHeight","maxHeight","padding","variant"],children:{kind:"single"}},List:{description:"Homogeneous list of items",tier:"core",category:"scroll",properties:["id","data","gap","axis","role","visible","variant"],children:{kind:"list",items:["ListItem"]}},ListItem:{description:"One row/cell in a list",tier:"core",category:"scroll",properties:["id","data","selected","padding","gap","role","visible","variant"],children:{kind:"any"}},Text:{description:"Text display",tier:"core",category:"text",properties:["id","data","visible","textStyle","textAlign","lineLimit","textOverflow","fontWeight","fontSize","size","foreground","background","opacity","padding","radius","display","alignItems","role","variant"],children:{kind:"text"}},Link:{description:"Navigable text or region",tier:"optional",category:"text",properties:["id","data","visible","action","onClick","href","label","foreground","role","variant"],children:{kind:"text"}},Image:{description:"Image display",tier:"core",category:"media",properties:["id","data","visible","src","fit","alt","width","height","aspectRatio","radius","variant"],children:{kind:"none"}},Icon:{description:"Icon display; asset set referenced by name token at renderer",tier:"core",category:"media",properties:["id","data","visible","name","alt","foreground","opacity","variant"],children:{kind:"none"}},Button:{description:"Pressable action; label or children required (label is a11y name when both present)",tier:"core",category:"input",properties:["id","data","visible","enabled","action","onClick","type","label","foreground","background","radius","padding","shadow","border","borderColor","fontWeight","fontSize","variant","role"],children:{kind:"list",items:["Text","Icon","Row"]}},IconButton:{description:"Icon-primary button; label required for accessibility",tier:"optional",category:"input",properties:["id","data","visible","enabled","action","onClick","type","label","foreground","background","radius","padding","variant"],children:{kind:"list",items:["Icon"]}},TextInput:{description:"Single-line text input",tier:"core",category:"input",properties:["id","data","visible","enabled","readonly","required","name","value","binding","placeholder","onChange","error","help","keyboardType","inputType","focusable","autoFocus","width","label","foreground","background","radius","padding","border","borderColor","minHeight","fontSize","variant"],children:{kind:"none"}},TextArea:{description:"Multi-line text input",tier:"core",category:"input",properties:["id","data","visible","enabled","readonly","required","name","value","binding","placeholder","onChange","error","help","focusable","width","minHeight","rows","label","foreground","background","radius","padding","border","borderColor","fontSize","variant"],children:{kind:"none"}},Select:{description:"Single selection",tier:"core",category:"input",properties:["id","data","visible","enabled","required","name","value","binding","options","onChange","error","help","width","label","foreground","background","radius","padding","border","borderColor","minHeight","fontSize","variant"],children:{kind:"none"}},Checkbox:{description:"Boolean or multi-select toggle",tier:"core",category:"input",properties:["id","data","visible","enabled","checked","required","binding","name","label","onChange","variant"],children:{kind:"none"}},Radio:{description:"Single choice in a group (use Row/Column to group; binding identifies group)",tier:"core",category:"input",notes:"RadioGroup is expressed via layout Group, not a separate element",properties:["id","data","visible","enabled","checked","binding","name","label","value","onChange","variant"],children:{kind:"none"}},Switch:{description:"On/off toggle",tier:"core",category:"input",properties:["id","data","visible","enabled","checked","binding","name","label","onChange","variant"],children:{kind:"none"}},Form:{description:"Input group submit/validation boundary",tier:"core",category:"form",properties:["id","data","visible","role","label","gap","action","onSubmit","variant"],children:{kind:"any"}},Field:{description:"label/help/error/input unit",tier:"core",category:"form",properties:["id","data","visible","label","help","error","required","gap","variant"],children:{kind:"any"}},Modal:{description:"Primary transient dialog",tier:"core",category:"overlay",notes:"Direct child of Page or App; role defaults to dialog at renderer",properties:["id","data","visible","role","autoFocus","variant"],children:{kind:"list",items:["Box","Column"]}},Drawer:{description:"Edge panel overlay",tier:"extension",category:"overlay",notes:"Placement limited to start/end/bottom at renderer",properties:["id","data","visible","variant"],children:{kind:"list",items:["Box","Column"]}},Popover:{description:"Small anchored panel",tier:"extension",category:"overlay",properties:["id","data","visible","variant"],children:{kind:"list",items:["Box","Column"]}},Tooltip:{description:"Supplementary description",tier:"extension",category:"overlay",properties:["id","data","visible","label","variant"],children:{kind:"text"}},Progress:{description:"Determinate progress",tier:"core",category:"feedback",properties:["id","data","visible","value","variant"],children:{kind:"none"}},Spinner:{description:"Indeterminate loading",tier:"core",category:"feedback",properties:["id","data","visible","role","variant"],children:{kind:"none"}},Table:{description:"Data table with header and repeated rows",tier:"core",category:"data",properties:["id","data","visible","source","gap","border","borderColor","separator","separatorColor","variant"],children:{kind:"list",items:["TableHeader","TableRow"]}},TableHeader:{description:"Table header row defining column labels",tier:"core",category:"data",properties:["id","data","visible","height","border","borderColor","background","alignItems","variant"],children:{kind:"list",items:["TableColumn"]}},TableColumn:{description:"Header cell definition; children override label text",tier:"core",category:"data",properties:["id","data","visible","label","width","flex","align","border","borderColor","padding","fontSize","fontWeight","foreground","variant"],children:{kind:"any"}},TableRow:{description:"Row template repeated for each source item",tier:"core",category:"data",properties:["id","data","visible","each","height","border","borderColor","alignItems","variant"],children:{kind:"list",items:["TableCell"]}},TableCell:{description:"Data cell; children define cell content",tier:"core",category:"data",properties:["id","data","visible","width","flex","align","border","borderColor","padding","fontSize","foreground","variant"],children:{kind:"any"}}},lt=new Set(Object.keys(ci)),sr=new Set(Object.entries(jo).filter(([,t])=>t.lowering==="inline-css").map(([t])=>t)),yO=new Set(Object.entries(jo).filter(([,t])=>t.lowering==="class-name").map(([t])=>t))});function T0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function fi(){if(xf)return ln;xf=1;function t(s){return typeof s>"u"||s===null}function e(s){return typeof s=="object"&&s!==null}function n(s){return Array.isArray(s)?s:t(s)?[]:[s]}function r(s,a){if(a){let l=Object.keys(a);for(let c=0,p=l.length;c<p;c+=1){let d=l[c];s[d]=a[d]}}return s}function i(s,a){let l="";for(let c=0;c<a;c+=1)l+=s;return l}function o(s){return s===0&&Number.NEGATIVE_INFINITY===1/s}return ln.isNothing=t,ln.isObject=e,ln.toArray=n,ln.repeat=i,ln.isNegativeZero=o,ln.extend=r,ln}function hi(){if($f)return wc;$f=1;function t(n,r){let i="",o=n.reason||"(unknown reason)";return n.mark?(n.mark.name&&(i+='in "'+n.mark.name+'" '),i+="("+(n.mark.line+1)+":"+(n.mark.column+1)+")",!r&&n.mark.snippet&&(i+=`
30
30
 
31
- `+n.mark.snippet),o+" "+i):o}function e(n,r){Error.call(this),this.name="YAMLException",this.reason=n,this.mark=r,this.message=t(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=function(r){return this.name+": "+t(this,r)},pc=e,pc}function C0(){if(yf)return dc;yf=1;let t=ui();function e(i,o,s,a,c){let l="",d="",p=Math.floor(c/2)-1;return a-o>p&&(l=" ... ",o=a-p+l.length),s-a>p&&(d=" ...",s=a+p-d.length),{str:l+i.slice(o,s).replace(/\t/g,"\u2192")+d,pos:a-o+l.length}}function n(i,o){return t.repeat(" ",o-i.length)+i}function r(i,o){if(o=Object.create(o||null),!i.buffer)return null;o.maxLength||(o.maxLength=79),typeof o.indent!="number"&&(o.indent=1),typeof o.linesBefore!="number"&&(o.linesBefore=3),typeof o.linesAfter!="number"&&(o.linesAfter=2);let s=/\r?\n|\r|\0/g,a=[0],c=[],l,d=-1;for(;l=s.exec(i.buffer);)c.push(l.index),a.push(l.index+l[0].length),i.position<=l.index&&d<0&&(d=a.length-2);d<0&&(d=a.length-1);let p="",f=Math.min(i.line+o.linesAfter,c.length).toString().length,m=o.maxLength-(o.indent+f+3);for(let g=1;g<=o.linesBefore&&!(d-g<0);g++){let w=e(i.buffer,a[d-g],c[d-g],i.position-(a[d]-a[d-g]),m);p=t.repeat(" ",o.indent)+n((i.line-g+1).toString(),f)+" | "+w.str+`
32
- `+p}let y=e(i.buffer,a[d],c[d],i.position,m);p+=t.repeat(" ",o.indent)+n((i.line+1).toString(),f)+" | "+y.str+`
33
- `,p+=t.repeat("-",o.indent+f+3+y.pos)+`^
34
- `;for(let g=1;g<=o.linesAfter&&!(d+g>=c.length);g++){let w=e(i.buffer,a[d+g],c[d+g],i.position-(a[d]-a[d+g]),m);p+=t.repeat(" ",o.indent)+n((i.line+g+1).toString(),f)+" | "+w.str+`
35
- `}return p.replace(/\n$/,"")}return dc=r,dc}function qe(){if(wf)return fc;wf=1;let t=pi(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],n=["scalar","sequence","mapping"];function r(o){let s={};return o!==null&&Object.keys(o).forEach(function(a){o[a].forEach(function(c){s[String(c)]=a})}),s}function i(o,s){if(s=s||{},Object.keys(s).forEach(function(a){if(e.indexOf(a)===-1)throw new t('Unknown option "'+a+'" is met in definition of "'+o+'" YAML type.')}),this.options=s,this.tag=o,this.kind=s.kind||null,this.resolve=s.resolve||function(){return!0},this.construct=s.construct||function(a){return a},this.instanceOf=s.instanceOf||null,this.predicate=s.predicate||null,this.represent=s.represent||null,this.representName=s.representName||null,this.defaultStyle=s.defaultStyle||null,this.multi=s.multi||!1,this.styleAliases=r(s.styleAliases||null),n.indexOf(this.kind)===-1)throw new t('Unknown kind "'+this.kind+'" is specified for "'+o+'" YAML type.')}return fc=i,fc}function Ff(){if(vf)return hc;vf=1;let t=pi(),e=qe();function n(o,s){let a=[];return o[s].forEach(function(c){let l=a.length;a.forEach(function(d,p){d.tag===c.tag&&d.kind===c.kind&&d.multi===c.multi&&(l=p)}),a[l]=c}),a}function r(){let o={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function s(a){a.multi?(o.multi[a.kind].push(a),o.multi.fallback.push(a)):o[a.kind][a.tag]=o.fallback[a.tag]=a}for(let a=0,c=arguments.length;a<c;a+=1)arguments[a].forEach(s);return o}function i(o){return this.extend(o)}return i.prototype.extend=function(s){let a=[],c=[];if(s instanceof e)c.push(s);else if(Array.isArray(s))c=c.concat(s);else if(s&&(Array.isArray(s.implicit)||Array.isArray(s.explicit)))s.implicit&&(a=a.concat(s.implicit)),s.explicit&&(c=c.concat(s.explicit));else throw new t("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");a.forEach(function(d){if(!(d instanceof e))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.")}),c.forEach(function(d){if(!(d instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let l=Object.create(i.prototype);return l.implicit=(this.implicit||[]).concat(a),l.explicit=(this.explicit||[]).concat(c),l.compiledImplicit=n(l,"implicit"),l.compiledExplicit=n(l,"explicit"),l.compiledTypeMap=r(l.compiledImplicit,l.compiledExplicit),l},hc=i,hc}function qf(){if(bf)return mc;bf=1;let t=qe();return mc=new t("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),mc}function Bf(){if(_f)return gc;_f=1;let t=qe();return gc=new t("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),gc}function Hf(){if(xf)return yc;xf=1;let t=qe();return yc=new t("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),yc}function Wf(){if($f)return wc;$f=1;let t=Ff();return wc=new t({explicit:[qf(),Bf(),Hf()]}),wc}function Uf(){if(Sf)return vc;Sf=1;let t=qe();function e(i){if(i===null)return!0;let o=i.length;return o===1&&i==="~"||o===4&&(i==="null"||i==="Null"||i==="NULL")}function n(){return null}function r(i){return i===null}return vc=new t("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:n,predicate:r,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),vc}function zf(){if(Cf)return bc;Cf=1;let t=qe();function e(i){if(i===null)return!1;let o=i.length;return o===4&&(i==="true"||i==="True"||i==="TRUE")||o===5&&(i==="false"||i==="False"||i==="FALSE")}function n(i){return i==="true"||i==="True"||i==="TRUE"}function r(i){return Object.prototype.toString.call(i)==="[object Boolean]"}return bc=new t("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:n,predicate:r,represent:{lowercase:function(i){return i?"true":"false"},uppercase:function(i){return i?"TRUE":"FALSE"},camelcase:function(i){return i?"True":"False"}},defaultStyle:"lowercase"}),bc}function Gf(){if(kf)return _c;kf=1;let t=ui(),e=qe();function n(l){return l>=48&&l<=57||l>=65&&l<=70||l>=97&&l<=102}function r(l){return l>=48&&l<=55}function i(l){return l>=48&&l<=57}function o(l){if(l===null)return!1;let d=l.length,p=0,f=!1;if(!d)return!1;let m=l[p];if((m==="-"||m==="+")&&(m=l[++p]),m==="0"){if(p+1===d)return!0;if(m=l[++p],m==="b"){for(p++;p<d;p++){if(m=l[p],m!=="0"&&m!=="1")return!1;f=!0}return f&&isFinite(s(l))}if(m==="x"){for(p++;p<d;p++){if(!n(l.charCodeAt(p)))return!1;f=!0}return f&&isFinite(s(l))}if(m==="o"){for(p++;p<d;p++){if(!r(l.charCodeAt(p)))return!1;f=!0}return f&&isFinite(s(l))}}for(;p<d;p++){if(!i(l.charCodeAt(p)))return!1;f=!0}return f?isFinite(s(l)):!1}function s(l){let d=l,p=1,f=d[0];if((f==="-"||f==="+")&&(f==="-"&&(p=-1),d=d.slice(1),f=d[0]),d==="0")return 0;if(f==="0"){if(d[1]==="b")return p*parseInt(d.slice(2),2);if(d[1]==="x")return p*parseInt(d.slice(2),16);if(d[1]==="o")return p*parseInt(d.slice(2),8)}return p*parseInt(d,10)}function a(l){return s(l)}function c(l){return Object.prototype.toString.call(l)==="[object Number]"&&l%1===0&&!t.isNegativeZero(l)}return _c=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:o,construct:a,predicate:c,represent:{binary:function(l){return l>=0?"0b"+l.toString(2):"-0b"+l.toString(2).slice(1)},octal:function(l){return l>=0?"0o"+l.toString(8):"-0o"+l.toString(8).slice(1)},decimal:function(l){return l.toString(10)},hexadecimal:function(l){return l>=0?"0x"+l.toString(16).toUpperCase():"-0x"+l.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),_c}function Jf(){if(Ef)return xc;Ef=1;let t=ui(),e=qe(),n=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),r=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function i(l){return l===null||!n.test(l)?!1:isFinite(parseFloat(l,10))?!0:r.test(l)}function o(l){let d=l.toLowerCase(),p=d[0]==="-"?-1:1;return"+-".indexOf(d[0])>=0&&(d=d.slice(1)),d===".inf"?p===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:d===".nan"?NaN:p*parseFloat(d,10)}let s=/^[-+]?[0-9]+e/;function a(l,d){if(isNaN(l))switch(d){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===l)switch(d){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===l)switch(d){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(t.isNegativeZero(l))return"-0.0";let p=l.toString(10);return s.test(p)?p.replace("e",".e"):p}function c(l){return Object.prototype.toString.call(l)==="[object Number]"&&(l%1!==0||t.isNegativeZero(l))}return xc=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:o,predicate:c,represent:a,defaultStyle:"lowercase"}),xc}function Kf(){return Pf||(Pf=1,$c=Wf().extend({implicit:[Uf(),zf(),Gf(),Jf()]})),$c}function Yf(){return If||(If=1,Sc=Kf()),Sc}function Xf(){if(Rf)return Cc;Rf=1;let t=qe(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),n=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 r(s){return s===null?!1:e.exec(s)!==null||n.exec(s)!==null}function i(s){let a=0,c=null,l=e.exec(s);if(l===null&&(l=n.exec(s)),l===null)throw new Error("Date resolve error");let d=+l[1],p=+l[2]-1,f=+l[3];if(!l[4])return new Date(Date.UTC(d,p,f));let m=+l[4],y=+l[5],g=+l[6];if(l[7]){for(a=l[7].slice(0,3);a.length<3;)a+="0";a=+a}if(l[9]){let b=+l[10],P=+(l[11]||0);c=(b*60+P)*6e4,l[9]==="-"&&(c=-c)}let w=new Date(Date.UTC(d,p,f,m,y,g,a));return c&&w.setTime(w.getTime()-c),w}function o(s){return s.toISOString()}return Cc=new t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r,construct:i,instanceOf:Date,represent:o}),Cc}function Qf(){if(Af)return kc;Af=1;let t=qe();function e(n){return n==="<<"||n===null}return kc=new t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),kc}function Zf(){if(Tf)return Ec;Tf=1;let t=qe(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
36
- \r`;function n(s){if(s===null)return!1;let a=0,c=s.length,l=e;for(let d=0;d<c;d++){let p=l.indexOf(s.charAt(d));if(!(p>64)){if(p<0)return!1;a+=6}}return a%8===0}function r(s){let a=s.replace(/[\r\n=]/g,""),c=a.length,l=e,d=0,p=[];for(let m=0;m<c;m++)m%4===0&&m&&(p.push(d>>16&255),p.push(d>>8&255),p.push(d&255)),d=d<<6|l.indexOf(a.charAt(m));let f=c%4*6;return f===0?(p.push(d>>16&255),p.push(d>>8&255),p.push(d&255)):f===18?(p.push(d>>10&255),p.push(d>>2&255)):f===12&&p.push(d>>4&255),new Uint8Array(p)}function i(s){let a="",c=0,l=s.length,d=e;for(let f=0;f<l;f++)f%3===0&&f&&(a+=d[c>>18&63],a+=d[c>>12&63],a+=d[c>>6&63],a+=d[c&63]),c=(c<<8)+s[f];let p=l%3;return p===0?(a+=d[c>>18&63],a+=d[c>>12&63],a+=d[c>>6&63],a+=d[c&63]):p===2?(a+=d[c>>10&63],a+=d[c>>4&63],a+=d[c<<2&63],a+=d[64]):p===1&&(a+=d[c>>2&63],a+=d[c<<4&63],a+=d[64],a+=d[64]),a}function o(s){return Object.prototype.toString.call(s)==="[object Uint8Array]"}return Ec=new t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:n,construct:r,predicate:o,represent:i}),Ec}function eh(){if(Of)return Pc;Of=1;let t=qe(),e=Object.prototype.hasOwnProperty,n=Object.prototype.toString;function r(o){if(o===null)return!0;let s={},a=o;for(let c=0,l=a.length;c<l;c+=1){let d=a[c],p=!1;if(n.call(d)!=="[object Object]")return!1;let f;for(f in d)if(e.call(d,f))if(!p)p=!0;else return!1;if(!p||e.call(s,f))return!1;Object.defineProperty(s,f,{value:!0})}return!0}function i(o){return o!==null?o:[]}return Pc=new t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:r,construct:i}),Pc}function th(){if(Nf)return Ic;Nf=1;let t=qe(),e=Object.prototype.toString;function n(i){if(i===null)return!0;let o=i,s=new Array(o.length);for(let a=0,c=o.length;a<c;a+=1){let l=o[a];if(e.call(l)!=="[object Object]")return!1;let d=Object.keys(l);if(d.length!==1)return!1;s[a]=[d[0],l[d[0]]]}return!0}function r(i){if(i===null)return[];let o=i,s=new Array(o.length);for(let a=0,c=o.length;a<c;a+=1){let l=o[a],d=Object.keys(l);s[a]=[d[0],l[d[0]]]}return s}return Ic=new t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:n,construct:r}),Ic}function nh(){if(Mf)return Rc;Mf=1;let t=qe(),e=Object.prototype.hasOwnProperty;function n(i){if(i===null)return!0;let o=i;for(let s in o)if(e.call(o,s)&&o[s]!==null)return!1;return!0}function r(i){return i!==null?i:{}}return Rc=new t("tag:yaml.org,2002:set",{kind:"mapping",resolve:n,construct:r}),Rc}function Oc(){return Vf||(Vf=1,Ac=Yf().extend({implicit:[Xf(),Qf()],explicit:[Zf(),eh(),th(),nh()]})),Ac}function k0(){if(Lf)return jo;Lf=1;let t=ui(),e=pi(),n=C0(),r=Oc(),i=Object.prototype.hasOwnProperty,o=1,s=2,a=3,c=4,l=1,d=2,p=3,f=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,m=/[\x85\u2028\u2029]/,y=/[,\[\]{}]/,g=/^(?:!|!!|![0-9A-Za-z-]+!)$/,w=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function b(u){return Object.prototype.toString.call(u)}function P(u){return u===10||u===13}function x(u){return u===9||u===32}function R(u){return u===9||u===32||u===10||u===13}function O(u){return u===44||u===91||u===93||u===123||u===125}function j(u){if(u>=48&&u<=57)return u-48;let v=u|32;return v>=97&&v<=102?v-97+10:-1}function U(u){return u===120?2:u===117?4:u===85?8:0}function oe(u){return u>=48&&u<=57?u-48:-1}function ge(u){switch(u){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
37
- `;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 xe(u){return u<=65535?String.fromCharCode(u):String.fromCharCode((u-65536>>10)+55296,(u-65536&1023)+56320)}function Re(u,v,E){v==="__proto__"?Object.defineProperty(u,v,{configurable:!0,enumerable:!0,writable:!0,value:E}):u[v]=E}let _e=new Array(256),Ge=new Array(256);for(let u=0;u<256;u++)_e[u]=ge(u)?1:0,Ge[u]=ge(u);function de(u,v){this.input=u,this.filename=v.filename||null,this.schema=v.schema||r,this.onWarning=v.onWarning||null,this.legacy=v.legacy||!1,this.json=v.json||!1,this.listener=v.listener||null,this.maxDepth=typeof v.maxDepth=="number"?v.maxDepth:100,this.maxTotalMergeKeys=typeof v.maxTotalMergeKeys=="number"?v.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=u.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function Y(u,v){let E={name:u.filename,buffer:u.input.slice(0,-1),position:u.position,line:u.line,column:u.position-u.lineStart};return E.snippet=n(E),new e(v,E)}function D(u,v){throw Y(u,v)}function er(u,v){u.onWarning&&u.onWarning.call(null,Y(u,v))}function Dt(u,v,E){let I=u.anchorMapTransactions;if(I.length!==0){let C=I[I.length-1];i.call(C,v)||(C[v]={existed:i.call(u.anchorMap,v),value:u.anchorMap[v]})}u.anchorMap[v]=E}function Aa(u){u.anchorMapTransactions.push(Object.create(null))}function xn(u){let v=u.anchorMapTransactions.pop(),E=u.anchorMapTransactions;if(E.length===0)return;let I=E[E.length-1],C=Object.keys(v);for(let h=0,_=C.length;h<_;h+=1){let $=C[h];i.call(I,$)||(I[$]=v[$])}}function Ta(u){let v=u.anchorMapTransactions.pop(),E=Object.keys(v);for(let I=E.length-1;I>=0;I-=1){let C=v[E[I]];C.existed?u.anchorMap[E[I]]=C.value:delete u.anchorMap[E[I]]}}function Xr(u){return{position:u.position,line:u.line,lineStart:u.lineStart,lineIndent:u.lineIndent,firstTabInLine:u.firstTabInLine,tag:u.tag,anchor:u.anchor,kind:u.kind,result:u.result}}function tr(u,v){u.position=v.position,u.line=v.line,u.lineStart=v.lineStart,u.lineIndent=v.lineIndent,u.firstTabInLine=v.firstTabInLine,u.tag=v.tag,u.anchor=v.anchor,u.kind=v.kind,u.result=v.result}let $o={YAML:function(v,E,I){v.version!==null&&D(v,"duplication of %YAML directive"),I.length!==1&&D(v,"YAML directive accepts exactly one argument");let C=/^([0-9]+)\.([0-9]+)$/.exec(I[0]);C===null&&D(v,"ill-formed argument of the YAML directive");let h=parseInt(C[1],10),_=parseInt(C[2],10);h!==1&&D(v,"unacceptable YAML version of the document"),v.version=I[0],v.checkLineBreaks=_<2,_!==1&&_!==2&&er(v,"unsupported YAML version of the document")},TAG:function(v,E,I){let C;I.length!==2&&D(v,"TAG directive accepts exactly two arguments");let h=I[0];C=I[1],g.test(h)||D(v,"ill-formed tag handle (first argument) of the TAG directive"),i.call(v.tagMap,h)&&D(v,'there is a previously declared suffix for "'+h+'" tag handle'),w.test(C)||D(v,"ill-formed tag prefix (second argument) of the TAG directive");try{C=decodeURIComponent(C)}catch{D(v,"tag prefix is malformed: "+C)}v.tagMap[h]=C}};function et(u,v,E,I){if(v<E){let C=u.input.slice(v,E);if(I)for(let h=0,_=C.length;h<_;h+=1){let $=C.charCodeAt(h);$===9||$>=32&&$<=1114111||D(u,"expected valid JSON character")}else f.test(C)&&D(u,"the stream contains non-printable characters");u.result+=C}}function nn(u){u.totalMergeKeys++,u.maxTotalMergeKeys!==-1&&u.totalMergeKeys>u.maxTotalMergeKeys&&D(u,"merge keys exceeded maxTotalMergeKeys ("+u.maxTotalMergeKeys+")")}function Qr(u,v,E,I){t.isObject(E)||D(u,"cannot merge mappings; the provided source object is unacceptable"),nn(u);let C=Object.keys(E);for(let h=0,_=C.length;h<_;h+=1){let $=C[h];nn(u),i.call(v,$)||(Re(v,$,E[$]),I[$]=!0)}}function Ft(u,v,E,I,C,h,_,$,A){if(Array.isArray(C)){C=Array.prototype.slice.call(C);for(let T=0,N=C.length;T<N;T+=1)Array.isArray(C[T])&&D(u,"nested arrays are not supported inside keys"),typeof C=="object"&&b(C[T])==="[object Object]"&&(C[T]="[object Object]")}if(typeof C=="object"&&b(C)==="[object Object]"&&(C="[object Object]"),C=String(C),v===null&&(v={}),I==="tag:yaml.org,2002:merge")if(Array.isArray(h)){h.length>100&&D(u,"abnormal merge sequence size");for(let T=0,N=h.length;T<N;T+=1)Qr(u,v,h[T],E)}else Qr(u,v,h,E);else!u.json&&!i.call(E,C)&&i.call(v,C)&&(u.line=_||u.line,u.lineStart=$||u.lineStart,u.position=A||u.position,D(u,"duplicated mapping key")),Re(v,C,h),delete E[C];return v}function Zr(u){let v=u.input.charCodeAt(u.position);v===10?u.position++:v===13?(u.position++,u.input.charCodeAt(u.position)===10&&u.position++):D(u,"a line break is expected"),u.line+=1,u.lineStart=u.position,u.firstTabInLine=-1}function $e(u,v,E){let I=0,C=u.input.charCodeAt(u.position);for(;C!==0;){for(;x(C);)C===9&&u.firstTabInLine===-1&&(u.firstTabInLine=u.position),C=u.input.charCodeAt(++u.position);if(v&&C===35)do C=u.input.charCodeAt(++u.position);while(C!==10&&C!==13&&C!==0);if(P(C))for(Zr(u),C=u.input.charCodeAt(u.position),I++,u.lineIndent=0;C===32;)u.lineIndent++,C=u.input.charCodeAt(++u.position);else break}return E!==-1&&I!==0&&u.lineIndent<E&&er(u,"deficient indentation"),I}function Pt(u){let v=u.position,E=u.input.charCodeAt(v);return!!((E===45||E===46)&&E===u.input.charCodeAt(v+1)&&E===u.input.charCodeAt(v+2)&&(v+=3,E=u.input.charCodeAt(v),E===0||R(E)))}function nr(u,v){v===1?u.result+=" ":v>1&&(u.result+=t.repeat(`
38
- `,v-1))}function So(u,v,E){let I,C,h,_,$,A,T=u.kind,N=u.result,k=u.input.charCodeAt(u.position);if(R(k)||O(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 M=u.input.charCodeAt(u.position+1);if(R(M)||E&&O(M))return!1}for(u.kind="scalar",u.result="",I=C=u.position,h=!1;k!==0;){if(k===58){let M=u.input.charCodeAt(u.position+1);if(R(M)||E&&O(M))break}else if(k===35){let M=u.input.charCodeAt(u.position-1);if(R(M))break}else{if(u.position===u.lineStart&&Pt(u)||E&&O(k))break;if(P(k))if(_=u.line,$=u.lineStart,A=u.lineIndent,$e(u,!1,-1),u.lineIndent>=v){h=!0,k=u.input.charCodeAt(u.position);continue}else{u.position=C,u.line=_,u.lineStart=$,u.lineIndent=A;break}}h&&(et(u,I,C,!1),nr(u,u.line-_),I=C=u.position,h=!1),x(k)||(C=u.position+1),k=u.input.charCodeAt(++u.position)}return et(u,I,C,!1),u.result?!0:(u.kind=T,u.result=N,!1)}function ei(u,v){let E,I,C=u.input.charCodeAt(u.position);if(C!==39)return!1;for(u.kind="scalar",u.result="",u.position++,E=I=u.position;(C=u.input.charCodeAt(u.position))!==0;)if(C===39)if(et(u,E,u.position,!0),C=u.input.charCodeAt(++u.position),C===39)E=u.position,u.position++,I=u.position;else return!0;else P(C)?(et(u,E,I,!0),nr(u,$e(u,!1,v)),E=I=u.position):u.position===u.lineStart&&Pt(u)?D(u,"unexpected end of the document within a single quoted scalar"):(u.position++,x(C)||(I=u.position));D(u,"unexpected end of the stream within a single quoted scalar")}function Co(u,v){let E,I,C,h=u.input.charCodeAt(u.position);if(h!==34)return!1;for(u.kind="scalar",u.result="",u.position++,E=I=u.position;(h=u.input.charCodeAt(u.position))!==0;){if(h===34)return et(u,E,u.position,!0),u.position++,!0;if(h===92){if(et(u,E,u.position,!0),h=u.input.charCodeAt(++u.position),P(h))$e(u,!1,v);else if(h<256&&_e[h])u.result+=Ge[h],u.position++;else if((C=U(h))>0){let _=C,$=0;for(;_>0;_--)h=u.input.charCodeAt(++u.position),(C=j(h))>=0?$=($<<4)+C:D(u,"expected hexadecimal character");u.result+=xe($),u.position++}else D(u,"unknown escape sequence");E=I=u.position}else P(h)?(et(u,E,I,!0),nr(u,$e(u,!1,v)),E=I=u.position):u.position===u.lineStart&&Pt(u)?D(u,"unexpected end of the document within a double quoted scalar"):(u.position++,x(h)||(I=u.position))}D(u,"unexpected end of the stream within a double quoted scalar")}function ko(u,v){let E=!0,I,C,h,_=u.tag,$,A=u.anchor,T,N,k,M,q=Object.create(null),z,J,Q,te=u.input.charCodeAt(u.position);if(te===91)T=93,M=!1,$=[];else if(te===123)T=125,M=!0,$={};else return!1;for(u.anchor!==null&&Dt(u,u.anchor,$),te=u.input.charCodeAt(++u.position);te!==0;){if($e(u,!0,v),te=u.input.charCodeAt(u.position),te===T)return u.position++,u.tag=_,u.anchor=A,u.kind=M?"mapping":"sequence",u.result=$,!0;if(E?te===44&&D(u,"expected the node content, but found ','"):D(u,"missed comma between flow collection entries"),J=z=Q=null,N=k=!1,te===63){let sn=u.input.charCodeAt(u.position+1);R(sn)&&(N=k=!0,u.position++,$e(u,!0,v))}I=u.line,C=u.lineStart,h=u.position,on(u,v,o,!1,!0),J=u.tag,z=u.result,$e(u,!0,v),te=u.input.charCodeAt(u.position),(k||u.line===I)&&te===58&&(N=!0,te=u.input.charCodeAt(++u.position),$e(u,!0,v),on(u,v,o,!1,!0),Q=u.result),M?Ft(u,$,q,J,z,Q,I,C,h):N?$.push(Ft(u,null,q,J,z,Q,I,C,h)):$.push(z),$e(u,!0,v),te=u.input.charCodeAt(u.position),te===44?(E=!0,te=u.input.charCodeAt(++u.position)):E=!1}D(u,"unexpected end of the stream within a flow collection")}function rn(u,v){let E,I=l,C=!1,h=!1,_=v,$=0,A=!1,T,N=u.input.charCodeAt(u.position);if(N===124)E=!1;else if(N===62)E=!0;else return!1;for(u.kind="scalar",u.result="";N!==0;)if(N=u.input.charCodeAt(++u.position),N===43||N===45)l===I?I=N===43?p:d:D(u,"repeat of a chomping mode identifier");else if((T=oe(N))>=0)T===0?D(u,"bad explicit indentation width of a block scalar; it cannot be less than one"):h?D(u,"repeat of an indentation width identifier"):(_=v+T-1,h=!0);else break;if(x(N)){do N=u.input.charCodeAt(++u.position);while(x(N));if(N===35)do N=u.input.charCodeAt(++u.position);while(!P(N)&&N!==0)}for(;N!==0;){for(Zr(u),u.lineIndent=0,N=u.input.charCodeAt(u.position);(!h||u.lineIndent<_)&&N===32;)u.lineIndent++,N=u.input.charCodeAt(++u.position);if(!h&&u.lineIndent>_&&(_=u.lineIndent),P(N)){$++;continue}if(!h&&_===0&&D(u,"missing indentation for block scalar"),u.lineIndent<_){I===p?u.result+=t.repeat(`
39
- `,C?1+$:$):I===l&&C&&(u.result+=`
31
+ `+n.mark.snippet),o+" "+i):o}function e(n,r){Error.call(this),this.name="YAMLException",this.reason=n,this.mark=r,this.message=t(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=function(r){return this.name+": "+t(this,r)},wc=e,wc}function O0(){if(Sf)return vc;Sf=1;let t=fi();function e(i,o,s,a,l){let c="",p="",d=Math.floor(l/2)-1;return a-o>d&&(c=" ... ",o=a-d+c.length),s-a>d&&(p=" ...",s=a+d-p.length),{str:c+i.slice(o,s).replace(/\t/g,"\u2192")+p,pos:a-o+c.length}}function n(i,o){return t.repeat(" ",o-i.length)+i}function r(i,o){if(o=Object.create(o||null),!i.buffer)return null;o.maxLength||(o.maxLength=79),typeof o.indent!="number"&&(o.indent=1),typeof o.linesBefore!="number"&&(o.linesBefore=3),typeof o.linesAfter!="number"&&(o.linesAfter=2);let s=/\r?\n|\r|\0/g,a=[0],l=[],c,p=-1;for(;c=s.exec(i.buffer);)l.push(c.index),a.push(c.index+c[0].length),i.position<=c.index&&p<0&&(p=a.length-2);p<0&&(p=a.length-1);let d="",f=Math.min(i.line+o.linesAfter,l.length).toString().length,m=o.maxLength-(o.indent+f+3);for(let g=1;g<=o.linesBefore&&!(p-g<0);g++){let w=e(i.buffer,a[p-g],l[p-g],i.position-(a[p]-a[p-g]),m);d=t.repeat(" ",o.indent)+n((i.line-g+1).toString(),f)+" | "+w.str+`
32
+ `+d}let y=e(i.buffer,a[p],l[p],i.position,m);d+=t.repeat(" ",o.indent)+n((i.line+1).toString(),f)+" | "+y.str+`
33
+ `,d+=t.repeat("-",o.indent+f+3+y.pos)+`^
34
+ `;for(let g=1;g<=o.linesAfter&&!(p+g>=l.length);g++){let w=e(i.buffer,a[p+g],l[p+g],i.position-(a[p]-a[p+g]),m);d+=t.repeat(" ",o.indent)+n((i.line+g+1).toString(),f)+" | "+w.str+`
35
+ `}return d.replace(/\n$/,"")}return vc=r,vc}function qe(){if(Cf)return bc;Cf=1;let t=hi(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],n=["scalar","sequence","mapping"];function r(o){let s={};return o!==null&&Object.keys(o).forEach(function(a){o[a].forEach(function(l){s[String(l)]=a})}),s}function i(o,s){if(s=s||{},Object.keys(s).forEach(function(a){if(e.indexOf(a)===-1)throw new t('Unknown option "'+a+'" is met in definition of "'+o+'" YAML type.')}),this.options=s,this.tag=o,this.kind=s.kind||null,this.resolve=s.resolve||function(){return!0},this.construct=s.construct||function(a){return a},this.instanceOf=s.instanceOf||null,this.predicate=s.predicate||null,this.represent=s.represent||null,this.representName=s.representName||null,this.defaultStyle=s.defaultStyle||null,this.multi=s.multi||!1,this.styleAliases=r(s.styleAliases||null),n.indexOf(this.kind)===-1)throw new t('Unknown kind "'+this.kind+'" is specified for "'+o+'" YAML type.')}return bc=i,bc}function Gf(){if(kf)return _c;kf=1;let t=hi(),e=qe();function n(o,s){let a=[];return o[s].forEach(function(l){let c=a.length;a.forEach(function(p,d){p.tag===l.tag&&p.kind===l.kind&&p.multi===l.multi&&(c=d)}),a[c]=l}),a}function r(){let o={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function s(a){a.multi?(o.multi[a.kind].push(a),o.multi.fallback.push(a)):o[a.kind][a.tag]=o.fallback[a.tag]=a}for(let a=0,l=arguments.length;a<l;a+=1)arguments[a].forEach(s);return o}function i(o){return this.extend(o)}return i.prototype.extend=function(s){let a=[],l=[];if(s instanceof e)l.push(s);else if(Array.isArray(s))l=l.concat(s);else if(s&&(Array.isArray(s.implicit)||Array.isArray(s.explicit)))s.implicit&&(a=a.concat(s.implicit)),s.explicit&&(l=l.concat(s.explicit));else throw new t("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");a.forEach(function(p){if(!(p instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(p.loadKind&&p.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(p.multi)throw new t("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),l.forEach(function(p){if(!(p instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let c=Object.create(i.prototype);return c.implicit=(this.implicit||[]).concat(a),c.explicit=(this.explicit||[]).concat(l),c.compiledImplicit=n(c,"implicit"),c.compiledExplicit=n(c,"explicit"),c.compiledTypeMap=r(c.compiledImplicit,c.compiledExplicit),c},_c=i,_c}function Jf(){if(Ef)return xc;Ef=1;let t=qe();return xc=new t("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),xc}function Kf(){if(Pf)return $c;Pf=1;let t=qe();return $c=new t("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),$c}function Yf(){if(If)return Sc;If=1;let t=qe();return Sc=new t("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Sc}function Xf(){if(Rf)return Cc;Rf=1;let t=Gf();return Cc=new t({explicit:[Jf(),Kf(),Yf()]}),Cc}function Qf(){if(Af)return kc;Af=1;let t=qe();function e(i){if(i===null)return!0;let o=i.length;return o===1&&i==="~"||o===4&&(i==="null"||i==="Null"||i==="NULL")}function n(){return null}function r(i){return i===null}return kc=new t("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:n,predicate:r,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),kc}function Zf(){if(Tf)return Ec;Tf=1;let t=qe();function e(i){if(i===null)return!1;let o=i.length;return o===4&&(i==="true"||i==="True"||i==="TRUE")||o===5&&(i==="false"||i==="False"||i==="FALSE")}function n(i){return i==="true"||i==="True"||i==="TRUE"}function r(i){return Object.prototype.toString.call(i)==="[object Boolean]"}return Ec=new t("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:n,predicate:r,represent:{lowercase:function(i){return i?"true":"false"},uppercase:function(i){return i?"TRUE":"FALSE"},camelcase:function(i){return i?"True":"False"}},defaultStyle:"lowercase"}),Ec}function eh(){if(Of)return Pc;Of=1;let t=fi(),e=qe();function n(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}function r(c){return c>=48&&c<=55}function i(c){return c>=48&&c<=57}function o(c){if(c===null)return!1;let p=c.length,d=0,f=!1;if(!p)return!1;let m=c[d];if((m==="-"||m==="+")&&(m=c[++d]),m==="0"){if(d+1===p)return!0;if(m=c[++d],m==="b"){for(d++;d<p;d++){if(m=c[d],m!=="0"&&m!=="1")return!1;f=!0}return f&&isFinite(s(c))}if(m==="x"){for(d++;d<p;d++){if(!n(c.charCodeAt(d)))return!1;f=!0}return f&&isFinite(s(c))}if(m==="o"){for(d++;d<p;d++){if(!r(c.charCodeAt(d)))return!1;f=!0}return f&&isFinite(s(c))}}for(;d<p;d++){if(!i(c.charCodeAt(d)))return!1;f=!0}return f?isFinite(s(c)):!1}function s(c){let p=c,d=1,f=p[0];if((f==="-"||f==="+")&&(f==="-"&&(d=-1),p=p.slice(1),f=p[0]),p==="0")return 0;if(f==="0"){if(p[1]==="b")return d*parseInt(p.slice(2),2);if(p[1]==="x")return d*parseInt(p.slice(2),16);if(p[1]==="o")return d*parseInt(p.slice(2),8)}return d*parseInt(p,10)}function a(c){return s(c)}function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&c%1===0&&!t.isNegativeZero(c)}return Pc=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:o,construct:a,predicate:l,represent:{binary:function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},octal:function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},decimal:function(c){return c.toString(10)},hexadecimal:function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Pc}function th(){if(Nf)return Ic;Nf=1;let t=fi(),e=qe(),n=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),r=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function i(c){return c===null||!n.test(c)?!1:isFinite(parseFloat(c,10))?!0:r.test(c)}function o(c){let p=c.toLowerCase(),d=p[0]==="-"?-1:1;return"+-".indexOf(p[0])>=0&&(p=p.slice(1)),p===".inf"?d===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:p===".nan"?NaN:d*parseFloat(p,10)}let s=/^[-+]?[0-9]+e/;function a(c,p){if(isNaN(c))switch(p){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(p){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(p){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(t.isNegativeZero(c))return"-0.0";let d=c.toString(10);return s.test(d)?d.replace("e",".e"):d}function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||t.isNegativeZero(c))}return Ic=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:o,predicate:l,represent:a,defaultStyle:"lowercase"}),Ic}function nh(){return Mf||(Mf=1,Rc=Xf().extend({implicit:[Qf(),Zf(),eh(),th()]})),Rc}function rh(){return Vf||(Vf=1,Ac=nh()),Ac}function ih(){if(Lf)return Tc;Lf=1;let t=qe(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),n=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 r(s){return s===null?!1:e.exec(s)!==null||n.exec(s)!==null}function i(s){let a=0,l=null,c=e.exec(s);if(c===null&&(c=n.exec(s)),c===null)throw new Error("Date resolve error");let p=+c[1],d=+c[2]-1,f=+c[3];if(!c[4])return new Date(Date.UTC(p,d,f));let m=+c[4],y=+c[5],g=+c[6];if(c[7]){for(a=c[7].slice(0,3);a.length<3;)a+="0";a=+a}if(c[9]){let b=+c[10],P=+(c[11]||0);l=(b*60+P)*6e4,c[9]==="-"&&(l=-l)}let w=new Date(Date.UTC(p,d,f,m,y,g,a));return l&&w.setTime(w.getTime()-l),w}function o(s){return s.toISOString()}return Tc=new t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r,construct:i,instanceOf:Date,represent:o}),Tc}function oh(){if(jf)return Oc;jf=1;let t=qe();function e(n){return n==="<<"||n===null}return Oc=new t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),Oc}function sh(){if(Df)return Nc;Df=1;let t=qe(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
36
+ \r`;function n(s){if(s===null)return!1;let a=0,l=s.length,c=e;for(let p=0;p<l;p++){let d=c.indexOf(s.charAt(p));if(!(d>64)){if(d<0)return!1;a+=6}}return a%8===0}function r(s){let a=s.replace(/[\r\n=]/g,""),l=a.length,c=e,p=0,d=[];for(let m=0;m<l;m++)m%4===0&&m&&(d.push(p>>16&255),d.push(p>>8&255),d.push(p&255)),p=p<<6|c.indexOf(a.charAt(m));let f=l%4*6;return f===0?(d.push(p>>16&255),d.push(p>>8&255),d.push(p&255)):f===18?(d.push(p>>10&255),d.push(p>>2&255)):f===12&&d.push(p>>4&255),new Uint8Array(d)}function i(s){let a="",l=0,c=s.length,p=e;for(let f=0;f<c;f++)f%3===0&&f&&(a+=p[l>>18&63],a+=p[l>>12&63],a+=p[l>>6&63],a+=p[l&63]),l=(l<<8)+s[f];let d=c%3;return d===0?(a+=p[l>>18&63],a+=p[l>>12&63],a+=p[l>>6&63],a+=p[l&63]):d===2?(a+=p[l>>10&63],a+=p[l>>4&63],a+=p[l<<2&63],a+=p[64]):d===1&&(a+=p[l>>2&63],a+=p[l<<4&63],a+=p[64],a+=p[64]),a}function o(s){return Object.prototype.toString.call(s)==="[object Uint8Array]"}return Nc=new t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:n,construct:r,predicate:o,represent:i}),Nc}function ah(){if(Ff)return Mc;Ff=1;let t=qe(),e=Object.prototype.hasOwnProperty,n=Object.prototype.toString;function r(o){if(o===null)return!0;let s={},a=o;for(let l=0,c=a.length;l<c;l+=1){let p=a[l],d=!1;if(n.call(p)!=="[object Object]")return!1;let f;for(f in p)if(e.call(p,f))if(!d)d=!0;else return!1;if(!d||e.call(s,f))return!1;Object.defineProperty(s,f,{value:!0})}return!0}function i(o){return o!==null?o:[]}return Mc=new t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:r,construct:i}),Mc}function ch(){if(qf)return Vc;qf=1;let t=qe(),e=Object.prototype.toString;function n(i){if(i===null)return!0;let o=i,s=new Array(o.length);for(let a=0,l=o.length;a<l;a+=1){let c=o[a];if(e.call(c)!=="[object Object]")return!1;let p=Object.keys(c);if(p.length!==1)return!1;s[a]=[p[0],c[p[0]]]}return!0}function r(i){if(i===null)return[];let o=i,s=new Array(o.length);for(let a=0,l=o.length;a<l;a+=1){let c=o[a],p=Object.keys(c);s[a]=[p[0],c[p[0]]]}return s}return Vc=new t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:n,construct:r}),Vc}function lh(){if(Bf)return Lc;Bf=1;let t=qe(),e=Object.prototype.hasOwnProperty;function n(i){if(i===null)return!0;let o=i;for(let s in o)if(e.call(o,s)&&o[s]!==null)return!1;return!0}function r(i){return i!==null?i:{}}return Lc=new t("tag:yaml.org,2002:set",{kind:"mapping",resolve:n,construct:r}),Lc}function Fc(){return Hf||(Hf=1,jc=rh().extend({implicit:[ih(),oh()],explicit:[sh(),ah(),ch(),lh()]})),jc}function N0(){if(Wf)return qo;Wf=1;let t=fi(),e=hi(),n=O0(),r=Fc(),i=Object.prototype.hasOwnProperty,o=1,s=2,a=3,l=4,c=1,p=2,d=3,f=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,m=/[\x85\u2028\u2029]/,y=/[,\[\]{}]/,g=/^(?:!|!!|![0-9A-Za-z-]+!)$/,w=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function b(u){return Object.prototype.toString.call(u)}function P(u){return u===10||u===13}function x(u){return u===9||u===32}function R(u){return u===9||u===32||u===10||u===13}function O(u){return u===44||u===91||u===93||u===123||u===125}function j(u){if(u>=48&&u<=57)return u-48;let v=u|32;return v>=97&&v<=102?v-97+10:-1}function U(u){return u===120?2:u===117?4:u===85?8:0}function oe(u){return u>=48&&u<=57?u-48:-1}function ge(u){switch(u){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
37
+ `;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 xe(u){return u<=65535?String.fromCharCode(u):String.fromCharCode((u-65536>>10)+55296,(u-65536&1023)+56320)}function Re(u,v,E){v==="__proto__"?Object.defineProperty(u,v,{configurable:!0,enumerable:!0,writable:!0,value:E}):u[v]=E}let _e=new Array(256),Ge=new Array(256);for(let u=0;u<256;u++)_e[u]=ge(u)?1:0,Ge[u]=ge(u);function de(u,v){this.input=u,this.filename=v.filename||null,this.schema=v.schema||r,this.onWarning=v.onWarning||null,this.legacy=v.legacy||!1,this.json=v.json||!1,this.listener=v.listener||null,this.maxDepth=typeof v.maxDepth=="number"?v.maxDepth:100,this.maxTotalMergeKeys=typeof v.maxTotalMergeKeys=="number"?v.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=u.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function Y(u,v){let E={name:u.filename,buffer:u.input.slice(0,-1),position:u.position,line:u.line,column:u.position-u.lineStart};return E.snippet=n(E),new e(v,E)}function D(u,v){throw Y(u,v)}function rr(u,v){u.onWarning&&u.onWarning.call(null,Y(u,v))}function Ft(u,v,E){let I=u.anchorMapTransactions;if(I.length!==0){let C=I[I.length-1];i.call(C,v)||(C[v]={existed:i.call(u.anchorMap,v),value:u.anchorMap[v]})}u.anchorMap[v]=E}function Ma(u){u.anchorMapTransactions.push(Object.create(null))}function Cn(u){let v=u.anchorMapTransactions.pop(),E=u.anchorMapTransactions;if(E.length===0)return;let I=E[E.length-1],C=Object.keys(v);for(let h=0,_=C.length;h<_;h+=1){let $=C[h];i.call(I,$)||(I[$]=v[$])}}function Va(u){let v=u.anchorMapTransactions.pop(),E=Object.keys(v);for(let I=E.length-1;I>=0;I-=1){let C=v[E[I]];C.existed?u.anchorMap[E[I]]=C.value:delete u.anchorMap[E[I]]}}function ei(u){return{position:u.position,line:u.line,lineStart:u.lineStart,lineIndent:u.lineIndent,firstTabInLine:u.firstTabInLine,tag:u.tag,anchor:u.anchor,kind:u.kind,result:u.result}}function ir(u,v){u.position=v.position,u.line=v.line,u.lineStart=v.lineStart,u.lineIndent=v.lineIndent,u.firstTabInLine=v.firstTabInLine,u.tag=v.tag,u.anchor=v.anchor,u.kind=v.kind,u.result=v.result}let ko={YAML:function(v,E,I){v.version!==null&&D(v,"duplication of %YAML directive"),I.length!==1&&D(v,"YAML directive accepts exactly one argument");let C=/^([0-9]+)\.([0-9]+)$/.exec(I[0]);C===null&&D(v,"ill-formed argument of the YAML directive");let h=parseInt(C[1],10),_=parseInt(C[2],10);h!==1&&D(v,"unacceptable YAML version of the document"),v.version=I[0],v.checkLineBreaks=_<2,_!==1&&_!==2&&rr(v,"unsupported YAML version of the document")},TAG:function(v,E,I){let C;I.length!==2&&D(v,"TAG directive accepts exactly two arguments");let h=I[0];C=I[1],g.test(h)||D(v,"ill-formed tag handle (first argument) of the TAG directive"),i.call(v.tagMap,h)&&D(v,'there is a previously declared suffix for "'+h+'" tag handle'),w.test(C)||D(v,"ill-formed tag prefix (second argument) of the TAG directive");try{C=decodeURIComponent(C)}catch{D(v,"tag prefix is malformed: "+C)}v.tagMap[h]=C}};function tt(u,v,E,I){if(v<E){let C=u.input.slice(v,E);if(I)for(let h=0,_=C.length;h<_;h+=1){let $=C.charCodeAt(h);$===9||$>=32&&$<=1114111||D(u,"expected valid JSON character")}else f.test(C)&&D(u,"the stream contains non-printable characters");u.result+=C}}function on(u){u.totalMergeKeys++,u.maxTotalMergeKeys!==-1&&u.totalMergeKeys>u.maxTotalMergeKeys&&D(u,"merge keys exceeded maxTotalMergeKeys ("+u.maxTotalMergeKeys+")")}function ti(u,v,E,I){t.isObject(E)||D(u,"cannot merge mappings; the provided source object is unacceptable"),on(u);let C=Object.keys(E);for(let h=0,_=C.length;h<_;h+=1){let $=C[h];on(u),i.call(v,$)||(Re(v,$,E[$]),I[$]=!0)}}function qt(u,v,E,I,C,h,_,$,A){if(Array.isArray(C)){C=Array.prototype.slice.call(C);for(let T=0,N=C.length;T<N;T+=1)Array.isArray(C[T])&&D(u,"nested arrays are not supported inside keys"),typeof C=="object"&&b(C[T])==="[object Object]"&&(C[T]="[object Object]")}if(typeof C=="object"&&b(C)==="[object Object]"&&(C="[object Object]"),C=String(C),v===null&&(v={}),I==="tag:yaml.org,2002:merge")if(Array.isArray(h)){h.length>100&&D(u,"abnormal merge sequence size");for(let T=0,N=h.length;T<N;T+=1)ti(u,v,h[T],E)}else ti(u,v,h,E);else!u.json&&!i.call(E,C)&&i.call(v,C)&&(u.line=_||u.line,u.lineStart=$||u.lineStart,u.position=A||u.position,D(u,"duplicated mapping key")),Re(v,C,h),delete E[C];return v}function ni(u){let v=u.input.charCodeAt(u.position);v===10?u.position++:v===13?(u.position++,u.input.charCodeAt(u.position)===10&&u.position++):D(u,"a line break is expected"),u.line+=1,u.lineStart=u.position,u.firstTabInLine=-1}function Se(u,v,E){let I=0,C=u.input.charCodeAt(u.position);for(;C!==0;){for(;x(C);)C===9&&u.firstTabInLine===-1&&(u.firstTabInLine=u.position),C=u.input.charCodeAt(++u.position);if(v&&C===35)do C=u.input.charCodeAt(++u.position);while(C!==10&&C!==13&&C!==0);if(P(C))for(ni(u),C=u.input.charCodeAt(u.position),I++,u.lineIndent=0;C===32;)u.lineIndent++,C=u.input.charCodeAt(++u.position);else break}return E!==-1&&I!==0&&u.lineIndent<E&&rr(u,"deficient indentation"),I}function Rt(u){let v=u.position,E=u.input.charCodeAt(v);return!!((E===45||E===46)&&E===u.input.charCodeAt(v+1)&&E===u.input.charCodeAt(v+2)&&(v+=3,E=u.input.charCodeAt(v),E===0||R(E)))}function or(u,v){v===1?u.result+=" ":v>1&&(u.result+=t.repeat(`
38
+ `,v-1))}function Eo(u,v,E){let I,C,h,_,$,A,T=u.kind,N=u.result,k=u.input.charCodeAt(u.position);if(R(k)||O(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 M=u.input.charCodeAt(u.position+1);if(R(M)||E&&O(M))return!1}for(u.kind="scalar",u.result="",I=C=u.position,h=!1;k!==0;){if(k===58){let M=u.input.charCodeAt(u.position+1);if(R(M)||E&&O(M))break}else if(k===35){let M=u.input.charCodeAt(u.position-1);if(R(M))break}else{if(u.position===u.lineStart&&Rt(u)||E&&O(k))break;if(P(k))if(_=u.line,$=u.lineStart,A=u.lineIndent,Se(u,!1,-1),u.lineIndent>=v){h=!0,k=u.input.charCodeAt(u.position);continue}else{u.position=C,u.line=_,u.lineStart=$,u.lineIndent=A;break}}h&&(tt(u,I,C,!1),or(u,u.line-_),I=C=u.position,h=!1),x(k)||(C=u.position+1),k=u.input.charCodeAt(++u.position)}return tt(u,I,C,!1),u.result?!0:(u.kind=T,u.result=N,!1)}function ri(u,v){let E,I,C=u.input.charCodeAt(u.position);if(C!==39)return!1;for(u.kind="scalar",u.result="",u.position++,E=I=u.position;(C=u.input.charCodeAt(u.position))!==0;)if(C===39)if(tt(u,E,u.position,!0),C=u.input.charCodeAt(++u.position),C===39)E=u.position,u.position++,I=u.position;else return!0;else P(C)?(tt(u,E,I,!0),or(u,Se(u,!1,v)),E=I=u.position):u.position===u.lineStart&&Rt(u)?D(u,"unexpected end of the document within a single quoted scalar"):(u.position++,x(C)||(I=u.position));D(u,"unexpected end of the stream within a single quoted scalar")}function Po(u,v){let E,I,C,h=u.input.charCodeAt(u.position);if(h!==34)return!1;for(u.kind="scalar",u.result="",u.position++,E=I=u.position;(h=u.input.charCodeAt(u.position))!==0;){if(h===34)return tt(u,E,u.position,!0),u.position++,!0;if(h===92){if(tt(u,E,u.position,!0),h=u.input.charCodeAt(++u.position),P(h))Se(u,!1,v);else if(h<256&&_e[h])u.result+=Ge[h],u.position++;else if((C=U(h))>0){let _=C,$=0;for(;_>0;_--)h=u.input.charCodeAt(++u.position),(C=j(h))>=0?$=($<<4)+C:D(u,"expected hexadecimal character");u.result+=xe($),u.position++}else D(u,"unknown escape sequence");E=I=u.position}else P(h)?(tt(u,E,I,!0),or(u,Se(u,!1,v)),E=I=u.position):u.position===u.lineStart&&Rt(u)?D(u,"unexpected end of the document within a double quoted scalar"):(u.position++,x(h)||(I=u.position))}D(u,"unexpected end of the stream within a double quoted scalar")}function Io(u,v){let E=!0,I,C,h,_=u.tag,$,A=u.anchor,T,N,k,M,q=Object.create(null),z,J,Q,te=u.input.charCodeAt(u.position);if(te===91)T=93,M=!1,$=[];else if(te===123)T=125,M=!0,$={};else return!1;for(u.anchor!==null&&Ft(u,u.anchor,$),te=u.input.charCodeAt(++u.position);te!==0;){if(Se(u,!0,v),te=u.input.charCodeAt(u.position),te===T)return u.position++,u.tag=_,u.anchor=A,u.kind=M?"mapping":"sequence",u.result=$,!0;if(E?te===44&&D(u,"expected the node content, but found ','"):D(u,"missed comma between flow collection entries"),J=z=Q=null,N=k=!1,te===63){let cn=u.input.charCodeAt(u.position+1);R(cn)&&(N=k=!0,u.position++,Se(u,!0,v))}I=u.line,C=u.lineStart,h=u.position,an(u,v,o,!1,!0),J=u.tag,z=u.result,Se(u,!0,v),te=u.input.charCodeAt(u.position),(k||u.line===I)&&te===58&&(N=!0,te=u.input.charCodeAt(++u.position),Se(u,!0,v),an(u,v,o,!1,!0),Q=u.result),M?qt(u,$,q,J,z,Q,I,C,h):N?$.push(qt(u,null,q,J,z,Q,I,C,h)):$.push(z),Se(u,!0,v),te=u.input.charCodeAt(u.position),te===44?(E=!0,te=u.input.charCodeAt(++u.position)):E=!1}D(u,"unexpected end of the stream within a flow collection")}function sn(u,v){let E,I=c,C=!1,h=!1,_=v,$=0,A=!1,T,N=u.input.charCodeAt(u.position);if(N===124)E=!1;else if(N===62)E=!0;else return!1;for(u.kind="scalar",u.result="";N!==0;)if(N=u.input.charCodeAt(++u.position),N===43||N===45)c===I?I=N===43?d:p:D(u,"repeat of a chomping mode identifier");else if((T=oe(N))>=0)T===0?D(u,"bad explicit indentation width of a block scalar; it cannot be less than one"):h?D(u,"repeat of an indentation width identifier"):(_=v+T-1,h=!0);else break;if(x(N)){do N=u.input.charCodeAt(++u.position);while(x(N));if(N===35)do N=u.input.charCodeAt(++u.position);while(!P(N)&&N!==0)}for(;N!==0;){for(ni(u),u.lineIndent=0,N=u.input.charCodeAt(u.position);(!h||u.lineIndent<_)&&N===32;)u.lineIndent++,N=u.input.charCodeAt(++u.position);if(!h&&u.lineIndent>_&&(_=u.lineIndent),P(N)){$++;continue}if(!h&&_===0&&D(u,"missing indentation for block scalar"),u.lineIndent<_){I===d?u.result+=t.repeat(`
39
+ `,C?1+$:$):I===c&&C&&(u.result+=`
40
40
  `);break}E?x(N)?(A=!0,u.result+=t.repeat(`
41
41
  `,C?1+$:$)):A?(A=!1,u.result+=t.repeat(`
42
42
  `,$+1)):$===0?C&&(u.result+=" "):u.result+=t.repeat(`
43
43
  `,$):u.result+=t.repeat(`
44
- `,C?1+$:$),C=!0,h=!0,$=0;let k=u.position;for(;!P(N)&&N!==0;)N=u.input.charCodeAt(++u.position);et(u,k,u.position,!1)}return!0}function Eo(u,v){let E=u.tag,I=u.anchor,C=[],h=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&Dt(u,u.anchor,C);let _=u.input.charCodeAt(u.position);for(;_!==0&&(u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,D(u,"tab characters must not be used in indentation")),_===45);){let $=u.input.charCodeAt(u.position+1);if(!R($))break;if(h=!0,u.position++,$e(u,!0,-1)&&u.lineIndent<=v){C.push(null),_=u.input.charCodeAt(u.position);continue}let A=u.line;if(on(u,v,a,!1,!0),C.push(u.result),$e(u,!0,-1),_=u.input.charCodeAt(u.position),(u.line===A||u.lineIndent>v)&&_!==0)D(u,"bad indentation of a sequence entry");else if(u.lineIndent<v)break}return h?(u.tag=E,u.anchor=I,u.kind="sequence",u.result=C,!0):!1}function Po(u,v,E){let I,C,h,_,$=u.tag,A=u.anchor,T={},N=Object.create(null),k=null,M=null,q=null,z=!1,J=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&Dt(u,u.anchor,T);let Q=u.input.charCodeAt(u.position);for(;Q!==0;){!z&&u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,D(u,"tab characters must not be used in indentation"));let te=u.input.charCodeAt(u.position+1),sn=u.line;if((Q===63||Q===58)&&R(te))Q===63?(z&&(Ft(u,T,N,k,M,null,C,h,_),k=M=q=null),J=!0,z=!0,I=!0):z?(z=!1,I=!0):D(u,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),u.position+=1,Q=te;else{if(C=u.line,h=u.lineStart,_=u.position,!on(u,E,s,!1,!0))break;if(u.line===sn){for(Q=u.input.charCodeAt(u.position);x(Q);)Q=u.input.charCodeAt(++u.position);if(Q===58)Q=u.input.charCodeAt(++u.position),R(Q)||D(u,"a whitespace character is expected after the key-value separator within a block mapping"),z&&(Ft(u,T,N,k,M,null,C,h,_),k=M=q=null),J=!0,z=!1,I=!1,k=u.tag,M=u.result;else if(J)D(u,"can not read an implicit mapping pair; a colon is missed");else return u.tag=$,u.anchor=A,!0}else if(J)D(u,"can not read a block mapping entry; a multiline key may not be an implicit key");else return u.tag=$,u.anchor=A,!0}if((u.line===sn||u.lineIndent>v)&&(z&&(C=u.line,h=u.lineStart,_=u.position),on(u,v,c,!0,I)&&(z?M=u.result:q=u.result),z||(Ft(u,T,N,k,M,q,C,h,_),k=M=q=null),$e(u,!0,-1),Q=u.input.charCodeAt(u.position)),(u.line===sn||u.lineIndent>v)&&Q!==0)D(u,"bad indentation of a mapping entry");else if(u.lineIndent<v)break}return z&&Ft(u,T,N,k,M,null,C,h,_),J&&(u.tag=$,u.anchor=A,u.kind="mapping",u.result=T),J}function Io(u){let v=!1,E=!1,I,C,h=u.input.charCodeAt(u.position);if(h!==33)return!1;u.tag!==null&&D(u,"duplication of a tag property"),h=u.input.charCodeAt(++u.position),h===60?(v=!0,h=u.input.charCodeAt(++u.position)):h===33?(E=!0,I="!!",h=u.input.charCodeAt(++u.position)):I="!";let _=u.position;if(v){do h=u.input.charCodeAt(++u.position);while(h!==0&&h!==62);u.position<u.length?(C=u.input.slice(_,u.position),h=u.input.charCodeAt(++u.position)):D(u,"unexpected end of the stream within a verbatim tag")}else{for(;h!==0&&!R(h);)h===33&&(E?D(u,"tag suffix cannot contain exclamation marks"):(I=u.input.slice(_-1,u.position+1),g.test(I)||D(u,"named tag handle cannot contain such characters"),E=!0,_=u.position+1)),h=u.input.charCodeAt(++u.position);C=u.input.slice(_,u.position),y.test(C)&&D(u,"tag suffix cannot contain flow indicator characters")}C&&!w.test(C)&&D(u,"tag name cannot contain such characters: "+C);try{C=decodeURIComponent(C)}catch{D(u,"tag name is malformed: "+C)}return v?u.tag=C:i.call(u.tagMap,I)?u.tag=u.tagMap[I]+C:I==="!"?u.tag="!"+C:I==="!!"?u.tag="tag:yaml.org,2002:"+C:D(u,'undeclared tag handle "'+I+'"'),!0}function Ro(u){let v=u.input.charCodeAt(u.position);if(v!==38)return!1;u.anchor!==null&&D(u,"duplication of an anchor property"),v=u.input.charCodeAt(++u.position);let E=u.position;for(;v!==0&&!R(v)&&!O(v);)v=u.input.charCodeAt(++u.position);return u.position===E&&D(u,"name of an anchor node must contain at least one character"),u.anchor=u.input.slice(E,u.position),!0}function Oa(u){let v=u.input.charCodeAt(u.position);if(v!==42)return!1;v=u.input.charCodeAt(++u.position);let E=u.position;for(;v!==0&&!R(v)&&!O(v);)v=u.input.charCodeAt(++u.position);u.position===E&&D(u,"name of an alias node must contain at least one character");let I=u.input.slice(E,u.position);return i.call(u.anchorMap,I)||D(u,'unidentified alias "'+I+'"'),u.result=u.anchorMap[I],$e(u,!0,-1),!0}function Ao(u,v,E,I){let C=Xr(u);return Aa(u),tr(u,v),u.tag=null,u.anchor=null,u.kind=null,u.result=null,Po(u,E,I)&&u.kind==="mapping"?(xn(u),!0):(Ta(u),tr(u,C),!1)}function on(u,v,E,I,C){let h,_,$=1,A=!1,T=!1,N=null,k,M,q;u.depth>=u.maxDepth&&D(u,"nesting exceeded maxDepth ("+u.maxDepth+")"),u.depth+=1,u.listener!==null&&u.listener("open",u),u.tag=null,u.anchor=null,u.kind=null,u.result=null;let z=h=_=c===E||a===E;if(I&&$e(u,!0,-1)&&(A=!0,u.lineIndent>v?$=1:u.lineIndent===v?$=0:u.lineIndent<v&&($=-1)),$===1)for(;;){let J=u.input.charCodeAt(u.position),Q=Xr(u);if(A&&(J===33&&u.tag!==null||J===38&&u.anchor!==null)||!Io(u)&&!Ro(u))break;N===null&&(N=Q),$e(u,!0,-1)?(A=!0,_=z,u.lineIndent>v?$=1:u.lineIndent===v?$=0:u.lineIndent<v&&($=-1)):_=!1}if(_&&(_=A||C),$===1||c===E)if(o===E||s===E?M=v:M=v+1,q=u.position-u.lineStart,$===1)if(_&&(Eo(u,q)||Po(u,q,M))||ko(u,M))T=!0;else{let J=u.input.charCodeAt(u.position);N!==null&&z&&!_&&J!==124&&J!==62&&Ao(u,N,N.position-N.lineStart,M)||h&&rn(u,M)||ei(u,M)||Co(u,M)?T=!0:Oa(u)?(T=!0,(u.tag!==null||u.anchor!==null)&&D(u,"alias node should not have any properties")):So(u,M,o===E)&&(T=!0,u.tag===null&&(u.tag="?")),u.anchor!==null&&Dt(u,u.anchor,u.result)}else $===0&&(T=_&&Eo(u,q));if(u.tag===null)u.anchor!==null&&Dt(u,u.anchor,u.result);else if(u.tag==="?"){u.result!==null&&u.kind!=="scalar"&&D(u,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+u.kind+'"');for(let J=0,Q=u.implicitTypes.length;J<Q;J+=1)if(k=u.implicitTypes[J],k.resolve(u.result)){u.result=k.construct(u.result),u.tag=k.tag,u.anchor!==null&&Dt(u,u.anchor,u.result);break}}else if(u.tag!=="!"){if(i.call(u.typeMap[u.kind||"fallback"],u.tag))k=u.typeMap[u.kind||"fallback"][u.tag];else{k=null;let J=u.typeMap.multi[u.kind||"fallback"];for(let Q=0,te=J.length;Q<te;Q+=1)if(u.tag.slice(0,J[Q].tag.length)===J[Q].tag){k=J[Q];break}}k||D(u,"unknown tag !<"+u.tag+">"),u.result!==null&&k.kind!==u.kind&&D(u,"unacceptable node kind for !<"+u.tag+'> tag; it should be "'+k.kind+'", not "'+u.kind+'"'),k.resolve(u.result,u.tag)?(u.result=k.construct(u.result,u.tag),u.anchor!==null&&Dt(u,u.anchor,u.result)):D(u,"cannot resolve a node with !<"+u.tag+"> explicit tag")}return u.listener!==null&&u.listener("close",u),u.depth-=1,u.tag!==null||u.anchor!==null||T}function Na(u){let v=u.position,E=!1,I;for(u.version=null,u.checkLineBreaks=u.legacy,u.tagMap=Object.create(null),u.anchorMap=Object.create(null);(I=u.input.charCodeAt(u.position))!==0&&($e(u,!0,-1),I=u.input.charCodeAt(u.position),!(u.lineIndent>0||I!==37));){E=!0,I=u.input.charCodeAt(++u.position);let C=u.position;for(;I!==0&&!R(I);)I=u.input.charCodeAt(++u.position);let h=u.input.slice(C,u.position),_=[];for(h.length<1&&D(u,"directive name must not be less than one character in length");I!==0;){for(;x(I);)I=u.input.charCodeAt(++u.position);if(I===35){do I=u.input.charCodeAt(++u.position);while(I!==0&&!P(I));break}if(P(I))break;for(C=u.position;I!==0&&!R(I);)I=u.input.charCodeAt(++u.position);_.push(u.input.slice(C,u.position))}I!==0&&Zr(u),i.call($o,h)?$o[h](u,h,_):er(u,'unknown document directive "'+h+'"')}if($e(u,!0,-1),u.lineIndent===0&&u.input.charCodeAt(u.position)===45&&u.input.charCodeAt(u.position+1)===45&&u.input.charCodeAt(u.position+2)===45?(u.position+=3,$e(u,!0,-1)):E&&D(u,"directives end mark is expected"),on(u,u.lineIndent-1,c,!1,!0),$e(u,!0,-1),u.checkLineBreaks&&m.test(u.input.slice(v,u.position))&&er(u,"non-ASCII line breaks are interpreted as content"),u.documents.push(u.result),u.position===u.lineStart&&Pt(u)){u.input.charCodeAt(u.position)===46&&(u.position+=3,$e(u,!0,-1));return}u.position<u.length-1&&D(u,"end of the stream or a document separator is expected")}function ti(u,v){u=String(u),v=v||{},u.length!==0&&(u.charCodeAt(u.length-1)!==10&&u.charCodeAt(u.length-1)!==13&&(u+=`
45
- `),u.charCodeAt(0)===65279&&(u=u.slice(1)));let E=new de(u,v),I=u.indexOf("\0");for(I!==-1&&(E.position=I,D(E,"null byte is not allowed in input")),E.input+="\0";E.input.charCodeAt(E.position)===32;)E.lineIndent+=1,E.position+=1;for(;E.position<E.length-1;)Na(E);return E.documents}function Ma(u,v,E){v!==null&&typeof v=="object"&&typeof E>"u"&&(E=v,v=null);let I=ti(u,E);if(typeof v!="function")return I;for(let C=0,h=I.length;C<h;C+=1)v(I[C])}function Va(u,v){let E=ti(u,v);if(E.length!==0){if(E.length===1)return E[0];throw new e("expected a single document in the stream, but found more")}}return jo.loadAll=Ma,jo.load=Va,jo}function E0(){if(jf)return Tc;jf=1;let t=ui(),e=pi(),n=Oc(),r=Object.prototype.toString,i=Object.prototype.hasOwnProperty,o=65279,s=9,a=10,c=13,l=32,d=33,p=34,f=35,m=37,y=38,g=39,w=42,b=44,P=45,x=58,R=61,O=62,j=63,U=64,oe=91,ge=93,xe=96,Re=123,_e=124,Ge=125,de={};de[0]="\\0",de[7]="\\a",de[8]="\\b",de[9]="\\t",de[10]="\\n",de[11]="\\v",de[12]="\\f",de[13]="\\r",de[27]="\\e",de[34]='\\"',de[92]="\\\\",de[133]="\\N",de[160]="\\_",de[8232]="\\L",de[8233]="\\P";let Y=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],D=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function er(h,_){if(_===null)return{};let $={},A=Object.keys(_);for(let T=0,N=A.length;T<N;T+=1){let k=A[T],M=String(_[k]);k.slice(0,2)==="!!"&&(k="tag:yaml.org,2002:"+k.slice(2));let q=h.compiledTypeMap.fallback[k];q&&i.call(q.styleAliases,M)&&(M=q.styleAliases[M]),$[k]=M}return $}function Dt(h){let _,$,A=h.toString(16).toUpperCase();if(h<=255)_="x",$=2;else if(h<=65535)_="u",$=4;else if(h<=4294967295)_="U",$=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+_+t.repeat("0",$-A.length)+A}let Aa=1,xn=2;function Ta(h){this.schema=h.schema||n,this.indent=Math.max(1,h.indent||2),this.noArrayIndent=h.noArrayIndent||!1,this.skipInvalid=h.skipInvalid||!1,this.flowLevel=t.isNothing(h.flowLevel)?-1:h.flowLevel,this.styleMap=er(this.schema,h.styles||null),this.sortKeys=h.sortKeys||!1,this.lineWidth=h.lineWidth||80,this.noRefs=h.noRefs||!1,this.noCompatMode=h.noCompatMode||!1,this.condenseFlow=h.condenseFlow||!1,this.quotingType=h.quotingType==='"'?xn:Aa,this.forceQuotes=h.forceQuotes||!1,this.replacer=typeof h.replacer=="function"?h.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Xr(h,_){let $=t.repeat(" ",_),A=0,T="",N=h.length;for(;A<N;){let k,M=h.indexOf(`
44
+ `,C?1+$:$),C=!0,h=!0,$=0;let k=u.position;for(;!P(N)&&N!==0;)N=u.input.charCodeAt(++u.position);tt(u,k,u.position,!1)}return!0}function Ro(u,v){let E=u.tag,I=u.anchor,C=[],h=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&Ft(u,u.anchor,C);let _=u.input.charCodeAt(u.position);for(;_!==0&&(u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,D(u,"tab characters must not be used in indentation")),_===45);){let $=u.input.charCodeAt(u.position+1);if(!R($))break;if(h=!0,u.position++,Se(u,!0,-1)&&u.lineIndent<=v){C.push(null),_=u.input.charCodeAt(u.position);continue}let A=u.line;if(an(u,v,a,!1,!0),C.push(u.result),Se(u,!0,-1),_=u.input.charCodeAt(u.position),(u.line===A||u.lineIndent>v)&&_!==0)D(u,"bad indentation of a sequence entry");else if(u.lineIndent<v)break}return h?(u.tag=E,u.anchor=I,u.kind="sequence",u.result=C,!0):!1}function Ao(u,v,E){let I,C,h,_,$=u.tag,A=u.anchor,T={},N=Object.create(null),k=null,M=null,q=null,z=!1,J=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&Ft(u,u.anchor,T);let Q=u.input.charCodeAt(u.position);for(;Q!==0;){!z&&u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,D(u,"tab characters must not be used in indentation"));let te=u.input.charCodeAt(u.position+1),cn=u.line;if((Q===63||Q===58)&&R(te))Q===63?(z&&(qt(u,T,N,k,M,null,C,h,_),k=M=q=null),J=!0,z=!0,I=!0):z?(z=!1,I=!0):D(u,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),u.position+=1,Q=te;else{if(C=u.line,h=u.lineStart,_=u.position,!an(u,E,s,!1,!0))break;if(u.line===cn){for(Q=u.input.charCodeAt(u.position);x(Q);)Q=u.input.charCodeAt(++u.position);if(Q===58)Q=u.input.charCodeAt(++u.position),R(Q)||D(u,"a whitespace character is expected after the key-value separator within a block mapping"),z&&(qt(u,T,N,k,M,null,C,h,_),k=M=q=null),J=!0,z=!1,I=!1,k=u.tag,M=u.result;else if(J)D(u,"can not read an implicit mapping pair; a colon is missed");else return u.tag=$,u.anchor=A,!0}else if(J)D(u,"can not read a block mapping entry; a multiline key may not be an implicit key");else return u.tag=$,u.anchor=A,!0}if((u.line===cn||u.lineIndent>v)&&(z&&(C=u.line,h=u.lineStart,_=u.position),an(u,v,l,!0,I)&&(z?M=u.result:q=u.result),z||(qt(u,T,N,k,M,q,C,h,_),k=M=q=null),Se(u,!0,-1),Q=u.input.charCodeAt(u.position)),(u.line===cn||u.lineIndent>v)&&Q!==0)D(u,"bad indentation of a mapping entry");else if(u.lineIndent<v)break}return z&&qt(u,T,N,k,M,null,C,h,_),J&&(u.tag=$,u.anchor=A,u.kind="mapping",u.result=T),J}function To(u){let v=!1,E=!1,I,C,h=u.input.charCodeAt(u.position);if(h!==33)return!1;u.tag!==null&&D(u,"duplication of a tag property"),h=u.input.charCodeAt(++u.position),h===60?(v=!0,h=u.input.charCodeAt(++u.position)):h===33?(E=!0,I="!!",h=u.input.charCodeAt(++u.position)):I="!";let _=u.position;if(v){do h=u.input.charCodeAt(++u.position);while(h!==0&&h!==62);u.position<u.length?(C=u.input.slice(_,u.position),h=u.input.charCodeAt(++u.position)):D(u,"unexpected end of the stream within a verbatim tag")}else{for(;h!==0&&!R(h);)h===33&&(E?D(u,"tag suffix cannot contain exclamation marks"):(I=u.input.slice(_-1,u.position+1),g.test(I)||D(u,"named tag handle cannot contain such characters"),E=!0,_=u.position+1)),h=u.input.charCodeAt(++u.position);C=u.input.slice(_,u.position),y.test(C)&&D(u,"tag suffix cannot contain flow indicator characters")}C&&!w.test(C)&&D(u,"tag name cannot contain such characters: "+C);try{C=decodeURIComponent(C)}catch{D(u,"tag name is malformed: "+C)}return v?u.tag=C:i.call(u.tagMap,I)?u.tag=u.tagMap[I]+C:I==="!"?u.tag="!"+C:I==="!!"?u.tag="tag:yaml.org,2002:"+C:D(u,'undeclared tag handle "'+I+'"'),!0}function Oo(u){let v=u.input.charCodeAt(u.position);if(v!==38)return!1;u.anchor!==null&&D(u,"duplication of an anchor property"),v=u.input.charCodeAt(++u.position);let E=u.position;for(;v!==0&&!R(v)&&!O(v);)v=u.input.charCodeAt(++u.position);return u.position===E&&D(u,"name of an anchor node must contain at least one character"),u.anchor=u.input.slice(E,u.position),!0}function La(u){let v=u.input.charCodeAt(u.position);if(v!==42)return!1;v=u.input.charCodeAt(++u.position);let E=u.position;for(;v!==0&&!R(v)&&!O(v);)v=u.input.charCodeAt(++u.position);u.position===E&&D(u,"name of an alias node must contain at least one character");let I=u.input.slice(E,u.position);return i.call(u.anchorMap,I)||D(u,'unidentified alias "'+I+'"'),u.result=u.anchorMap[I],Se(u,!0,-1),!0}function No(u,v,E,I){let C=ei(u);return Ma(u),ir(u,v),u.tag=null,u.anchor=null,u.kind=null,u.result=null,Ao(u,E,I)&&u.kind==="mapping"?(Cn(u),!0):(Va(u),ir(u,C),!1)}function an(u,v,E,I,C){let h,_,$=1,A=!1,T=!1,N=null,k,M,q;u.depth>=u.maxDepth&&D(u,"nesting exceeded maxDepth ("+u.maxDepth+")"),u.depth+=1,u.listener!==null&&u.listener("open",u),u.tag=null,u.anchor=null,u.kind=null,u.result=null;let z=h=_=l===E||a===E;if(I&&Se(u,!0,-1)&&(A=!0,u.lineIndent>v?$=1:u.lineIndent===v?$=0:u.lineIndent<v&&($=-1)),$===1)for(;;){let J=u.input.charCodeAt(u.position),Q=ei(u);if(A&&(J===33&&u.tag!==null||J===38&&u.anchor!==null)||!To(u)&&!Oo(u))break;N===null&&(N=Q),Se(u,!0,-1)?(A=!0,_=z,u.lineIndent>v?$=1:u.lineIndent===v?$=0:u.lineIndent<v&&($=-1)):_=!1}if(_&&(_=A||C),$===1||l===E)if(o===E||s===E?M=v:M=v+1,q=u.position-u.lineStart,$===1)if(_&&(Ro(u,q)||Ao(u,q,M))||Io(u,M))T=!0;else{let J=u.input.charCodeAt(u.position);N!==null&&z&&!_&&J!==124&&J!==62&&No(u,N,N.position-N.lineStart,M)||h&&sn(u,M)||ri(u,M)||Po(u,M)?T=!0:La(u)?(T=!0,(u.tag!==null||u.anchor!==null)&&D(u,"alias node should not have any properties")):Eo(u,M,o===E)&&(T=!0,u.tag===null&&(u.tag="?")),u.anchor!==null&&Ft(u,u.anchor,u.result)}else $===0&&(T=_&&Ro(u,q));if(u.tag===null)u.anchor!==null&&Ft(u,u.anchor,u.result);else if(u.tag==="?"){u.result!==null&&u.kind!=="scalar"&&D(u,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+u.kind+'"');for(let J=0,Q=u.implicitTypes.length;J<Q;J+=1)if(k=u.implicitTypes[J],k.resolve(u.result)){u.result=k.construct(u.result),u.tag=k.tag,u.anchor!==null&&Ft(u,u.anchor,u.result);break}}else if(u.tag!=="!"){if(i.call(u.typeMap[u.kind||"fallback"],u.tag))k=u.typeMap[u.kind||"fallback"][u.tag];else{k=null;let J=u.typeMap.multi[u.kind||"fallback"];for(let Q=0,te=J.length;Q<te;Q+=1)if(u.tag.slice(0,J[Q].tag.length)===J[Q].tag){k=J[Q];break}}k||D(u,"unknown tag !<"+u.tag+">"),u.result!==null&&k.kind!==u.kind&&D(u,"unacceptable node kind for !<"+u.tag+'> tag; it should be "'+k.kind+'", not "'+u.kind+'"'),k.resolve(u.result,u.tag)?(u.result=k.construct(u.result,u.tag),u.anchor!==null&&Ft(u,u.anchor,u.result)):D(u,"cannot resolve a node with !<"+u.tag+"> explicit tag")}return u.listener!==null&&u.listener("close",u),u.depth-=1,u.tag!==null||u.anchor!==null||T}function ja(u){let v=u.position,E=!1,I;for(u.version=null,u.checkLineBreaks=u.legacy,u.tagMap=Object.create(null),u.anchorMap=Object.create(null);(I=u.input.charCodeAt(u.position))!==0&&(Se(u,!0,-1),I=u.input.charCodeAt(u.position),!(u.lineIndent>0||I!==37));){E=!0,I=u.input.charCodeAt(++u.position);let C=u.position;for(;I!==0&&!R(I);)I=u.input.charCodeAt(++u.position);let h=u.input.slice(C,u.position),_=[];for(h.length<1&&D(u,"directive name must not be less than one character in length");I!==0;){for(;x(I);)I=u.input.charCodeAt(++u.position);if(I===35){do I=u.input.charCodeAt(++u.position);while(I!==0&&!P(I));break}if(P(I))break;for(C=u.position;I!==0&&!R(I);)I=u.input.charCodeAt(++u.position);_.push(u.input.slice(C,u.position))}I!==0&&ni(u),i.call(ko,h)?ko[h](u,h,_):rr(u,'unknown document directive "'+h+'"')}if(Se(u,!0,-1),u.lineIndent===0&&u.input.charCodeAt(u.position)===45&&u.input.charCodeAt(u.position+1)===45&&u.input.charCodeAt(u.position+2)===45?(u.position+=3,Se(u,!0,-1)):E&&D(u,"directives end mark is expected"),an(u,u.lineIndent-1,l,!1,!0),Se(u,!0,-1),u.checkLineBreaks&&m.test(u.input.slice(v,u.position))&&rr(u,"non-ASCII line breaks are interpreted as content"),u.documents.push(u.result),u.position===u.lineStart&&Rt(u)){u.input.charCodeAt(u.position)===46&&(u.position+=3,Se(u,!0,-1));return}u.position<u.length-1&&D(u,"end of the stream or a document separator is expected")}function ii(u,v){u=String(u),v=v||{},u.length!==0&&(u.charCodeAt(u.length-1)!==10&&u.charCodeAt(u.length-1)!==13&&(u+=`
45
+ `),u.charCodeAt(0)===65279&&(u=u.slice(1)));let E=new de(u,v),I=u.indexOf("\0");for(I!==-1&&(E.position=I,D(E,"null byte is not allowed in input")),E.input+="\0";E.input.charCodeAt(E.position)===32;)E.lineIndent+=1,E.position+=1;for(;E.position<E.length-1;)ja(E);return E.documents}function Da(u,v,E){v!==null&&typeof v=="object"&&typeof E>"u"&&(E=v,v=null);let I=ii(u,E);if(typeof v!="function")return I;for(let C=0,h=I.length;C<h;C+=1)v(I[C])}function Fa(u,v){let E=ii(u,v);if(E.length!==0){if(E.length===1)return E[0];throw new e("expected a single document in the stream, but found more")}}return qo.loadAll=Da,qo.load=Fa,qo}function M0(){if(Uf)return Dc;Uf=1;let t=fi(),e=hi(),n=Fc(),r=Object.prototype.toString,i=Object.prototype.hasOwnProperty,o=65279,s=9,a=10,l=13,c=32,p=33,d=34,f=35,m=37,y=38,g=39,w=42,b=44,P=45,x=58,R=61,O=62,j=63,U=64,oe=91,ge=93,xe=96,Re=123,_e=124,Ge=125,de={};de[0]="\\0",de[7]="\\a",de[8]="\\b",de[9]="\\t",de[10]="\\n",de[11]="\\v",de[12]="\\f",de[13]="\\r",de[27]="\\e",de[34]='\\"',de[92]="\\\\",de[133]="\\N",de[160]="\\_",de[8232]="\\L",de[8233]="\\P";let Y=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],D=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function rr(h,_){if(_===null)return{};let $={},A=Object.keys(_);for(let T=0,N=A.length;T<N;T+=1){let k=A[T],M=String(_[k]);k.slice(0,2)==="!!"&&(k="tag:yaml.org,2002:"+k.slice(2));let q=h.compiledTypeMap.fallback[k];q&&i.call(q.styleAliases,M)&&(M=q.styleAliases[M]),$[k]=M}return $}function Ft(h){let _,$,A=h.toString(16).toUpperCase();if(h<=255)_="x",$=2;else if(h<=65535)_="u",$=4;else if(h<=4294967295)_="U",$=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+_+t.repeat("0",$-A.length)+A}let Ma=1,Cn=2;function Va(h){this.schema=h.schema||n,this.indent=Math.max(1,h.indent||2),this.noArrayIndent=h.noArrayIndent||!1,this.skipInvalid=h.skipInvalid||!1,this.flowLevel=t.isNothing(h.flowLevel)?-1:h.flowLevel,this.styleMap=rr(this.schema,h.styles||null),this.sortKeys=h.sortKeys||!1,this.lineWidth=h.lineWidth||80,this.noRefs=h.noRefs||!1,this.noCompatMode=h.noCompatMode||!1,this.condenseFlow=h.condenseFlow||!1,this.quotingType=h.quotingType==='"'?Cn:Ma,this.forceQuotes=h.forceQuotes||!1,this.replacer=typeof h.replacer=="function"?h.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function ei(h,_){let $=t.repeat(" ",_),A=0,T="",N=h.length;for(;A<N;){let k,M=h.indexOf(`
46
46
  `,A);M===-1?(k=h.slice(A),A=N):(k=h.slice(A,M+1),A=M+1),k.length&&k!==`
47
- `&&(T+=$),T+=k}return T}function tr(h,_){return`
48
- `+t.repeat(" ",h.indent*_)}function $o(h,_){for(let $=0,A=h.implicitTypes.length;$<A;$+=1)if(h.implicitTypes[$].resolve(_))return!0;return!1}function et(h){return h===l||h===s}function nn(h){return h>=32&&h<=126||h>=161&&h<=55295&&h!==8232&&h!==8233||h>=57344&&h<=65533&&h!==o||h>=65536&&h<=1114111}function Qr(h){return nn(h)&&h!==o&&h!==c&&h!==a}function Ft(h,_,$){let A=Qr(h),T=A&&!et(h);return($?A:A&&h!==b&&h!==oe&&h!==ge&&h!==Re&&h!==Ge)&&h!==f&&!(_===x&&!T)||Qr(_)&&!et(_)&&h===f||_===x&&T}function Zr(h){return nn(h)&&h!==o&&!et(h)&&h!==P&&h!==j&&h!==x&&h!==b&&h!==oe&&h!==ge&&h!==Re&&h!==Ge&&h!==f&&h!==y&&h!==w&&h!==d&&h!==_e&&h!==R&&h!==O&&h!==g&&h!==p&&h!==m&&h!==U&&h!==xe}function $e(h){return!et(h)&&h!==x}function Pt(h,_){let $=h.charCodeAt(_),A;return $>=55296&&$<=56319&&_+1<h.length&&(A=h.charCodeAt(_+1),A>=56320&&A<=57343)?($-55296)*1024+A-56320+65536:$}function nr(h){return/^\n* /.test(h)}let So=1,ei=2,Co=3,ko=4,rn=5;function Eo(h,_,$,A,T,N,k,M){let q,z=0,J=null,Q=!1,te=!1,sn=A!==-1,ni=-1,ri=Zr(Pt(h,0))&&$e(Pt(h,h.length-1));if(_||k)for(q=0;q<h.length;z>=65536?q+=2:q++){if(z=Pt(h,q),!nn(z))return rn;ri=ri&&Ft(z,J,M),J=z}else{for(q=0;q<h.length;z>=65536?q+=2:q++){if(z=Pt(h,q),z===a)Q=!0,sn&&(te=te||q-ni-1>A&&h[ni+1]!==" ",ni=q);else if(!nn(z))return rn;ri=ri&&Ft(z,J,M),J=z}te=te||sn&&q-ni-1>A&&h[ni+1]!==" "}return!Q&&!te?ri&&!k&&!T(h)?So:N===xn?rn:ei:$>9&&nr(h)?rn:k?N===xn?rn:ei:te?ko:Co}function Po(h,_,$,A,T){h.dump=(function(){if(_.length===0)return h.quotingType===xn?'""':"''";if(!h.noCompatMode&&(Y.indexOf(_)!==-1||D.test(_)))return h.quotingType===xn?'"'+_+'"':"'"+_+"'";let N=h.indent*Math.max(1,$),k=h.lineWidth===-1?-1:Math.max(Math.min(h.lineWidth,40),h.lineWidth-N),M=A||h.flowLevel>-1&&$>=h.flowLevel;function q(z){return $o(h,z)}switch(Eo(_,M,h.indent,k,q,h.quotingType,h.forceQuotes&&!A,T)){case So:return _;case ei:return"'"+_.replace(/'/g,"''")+"'";case Co:return"|"+Io(_,h.indent)+Ro(Xr(_,N));case ko:return">"+Io(_,h.indent)+Ro(Xr(Oa(_,k),N));case rn:return'"'+on(_)+'"';default:throw new e("impossible error: invalid scalar style")}})()}function Io(h,_){let $=nr(h)?String(_):"",A=h[h.length-1]===`
47
+ `&&(T+=$),T+=k}return T}function ir(h,_){return`
48
+ `+t.repeat(" ",h.indent*_)}function ko(h,_){for(let $=0,A=h.implicitTypes.length;$<A;$+=1)if(h.implicitTypes[$].resolve(_))return!0;return!1}function tt(h){return h===c||h===s}function on(h){return h>=32&&h<=126||h>=161&&h<=55295&&h!==8232&&h!==8233||h>=57344&&h<=65533&&h!==o||h>=65536&&h<=1114111}function ti(h){return on(h)&&h!==o&&h!==l&&h!==a}function qt(h,_,$){let A=ti(h),T=A&&!tt(h);return($?A:A&&h!==b&&h!==oe&&h!==ge&&h!==Re&&h!==Ge)&&h!==f&&!(_===x&&!T)||ti(_)&&!tt(_)&&h===f||_===x&&T}function ni(h){return on(h)&&h!==o&&!tt(h)&&h!==P&&h!==j&&h!==x&&h!==b&&h!==oe&&h!==ge&&h!==Re&&h!==Ge&&h!==f&&h!==y&&h!==w&&h!==p&&h!==_e&&h!==R&&h!==O&&h!==g&&h!==d&&h!==m&&h!==U&&h!==xe}function Se(h){return!tt(h)&&h!==x}function Rt(h,_){let $=h.charCodeAt(_),A;return $>=55296&&$<=56319&&_+1<h.length&&(A=h.charCodeAt(_+1),A>=56320&&A<=57343)?($-55296)*1024+A-56320+65536:$}function or(h){return/^\n* /.test(h)}let Eo=1,ri=2,Po=3,Io=4,sn=5;function Ro(h,_,$,A,T,N,k,M){let q,z=0,J=null,Q=!1,te=!1,cn=A!==-1,oi=-1,si=ni(Rt(h,0))&&Se(Rt(h,h.length-1));if(_||k)for(q=0;q<h.length;z>=65536?q+=2:q++){if(z=Rt(h,q),!on(z))return sn;si=si&&qt(z,J,M),J=z}else{for(q=0;q<h.length;z>=65536?q+=2:q++){if(z=Rt(h,q),z===a)Q=!0,cn&&(te=te||q-oi-1>A&&h[oi+1]!==" ",oi=q);else if(!on(z))return sn;si=si&&qt(z,J,M),J=z}te=te||cn&&q-oi-1>A&&h[oi+1]!==" "}return!Q&&!te?si&&!k&&!T(h)?Eo:N===Cn?sn:ri:$>9&&or(h)?sn:k?N===Cn?sn:ri:te?Io:Po}function Ao(h,_,$,A,T){h.dump=(function(){if(_.length===0)return h.quotingType===Cn?'""':"''";if(!h.noCompatMode&&(Y.indexOf(_)!==-1||D.test(_)))return h.quotingType===Cn?'"'+_+'"':"'"+_+"'";let N=h.indent*Math.max(1,$),k=h.lineWidth===-1?-1:Math.max(Math.min(h.lineWidth,40),h.lineWidth-N),M=A||h.flowLevel>-1&&$>=h.flowLevel;function q(z){return ko(h,z)}switch(Ro(_,M,h.indent,k,q,h.quotingType,h.forceQuotes&&!A,T)){case Eo:return _;case ri:return"'"+_.replace(/'/g,"''")+"'";case Po:return"|"+To(_,h.indent)+Oo(ei(_,N));case Io:return">"+To(_,h.indent)+Oo(ei(La(_,k),N));case sn:return'"'+an(_)+'"';default:throw new e("impossible error: invalid scalar style")}})()}function To(h,_){let $=or(h)?String(_):"",A=h[h.length-1]===`
49
49
  `,N=A&&(h[h.length-2]===`
50
50
  `||h===`
51
51
  `)?"+":A?"":"-";return $+N+`
52
- `}function Ro(h){return h[h.length-1]===`
53
- `?h.slice(0,-1):h}function Oa(h,_){let $=/(\n+)([^\n]*)/g,A=(function(){let M=h.indexOf(`
54
- `);return M=M!==-1?M:h.length,$.lastIndex=M,Ao(h.slice(0,M),_)})(),T=h[0]===`
52
+ `}function Oo(h){return h[h.length-1]===`
53
+ `?h.slice(0,-1):h}function La(h,_){let $=/(\n+)([^\n]*)/g,A=(function(){let M=h.indexOf(`
54
+ `);return M=M!==-1?M:h.length,$.lastIndex=M,No(h.slice(0,M),_)})(),T=h[0]===`
55
55
  `||h[0]===" ",N,k;for(;k=$.exec(h);){let M=k[1],q=k[2];N=q[0]===" ",A+=M+(!T&&!N&&q!==""?`
56
- `:"")+Ao(q,_),T=N}return A}function Ao(h,_){if(h===""||h[0]===" ")return h;let $=/ [^ ]/g,A,T=0,N,k=0,M=0,q="";for(;A=$.exec(h);)M=A.index,M-T>_&&(N=k>T?k:M,q+=`
56
+ `:"")+No(q,_),T=N}return A}function No(h,_){if(h===""||h[0]===" ")return h;let $=/ [^ ]/g,A,T=0,N,k=0,M=0,q="";for(;A=$.exec(h);)M=A.index,M-T>_&&(N=k>T?k:M,q+=`
57
57
  `+h.slice(T,N),T=N+1),k=M;return q+=`
58
58
  `,h.length-T>_&&k>T?q+=h.slice(T,k)+`
59
- `+h.slice(k+1):q+=h.slice(T),q.slice(1)}function on(h){let _="",$=0;for(let A=0;A<h.length;$>=65536?A+=2:A++){$=Pt(h,A);let T=de[$];!T&&nn($)?(_+=h[A],$>=65536&&(_+=h[A+1])):_+=T||Dt($)}return _}function Na(h,_,$){let A="",T=h.tag;for(let N=0,k=$.length;N<k;N+=1){let M=$[N];h.replacer&&(M=h.replacer.call($,String(N),M)),(v(h,_,M,!1,!1)||typeof M>"u"&&v(h,_,null,!1,!1))&&(A!==""&&(A+=","+(h.condenseFlow?"":" ")),A+=h.dump)}h.tag=T,h.dump="["+A+"]"}function ti(h,_,$,A){let T="",N=h.tag;for(let k=0,M=$.length;k<M;k+=1){let q=$[k];h.replacer&&(q=h.replacer.call($,String(k),q)),(v(h,_+1,q,!0,!0,!1,!0)||typeof q>"u"&&v(h,_+1,null,!0,!0,!1,!0))&&((!A||T!=="")&&(T+=tr(h,_)),h.dump&&a===h.dump.charCodeAt(0)?T+="-":T+="- ",T+=h.dump)}h.tag=N,h.dump=T||"[]"}function Ma(h,_,$){let A="",T=h.tag,N=Object.keys($);for(let k=0,M=N.length;k<M;k+=1){let q="";A!==""&&(q+=", "),h.condenseFlow&&(q+='"');let z=N[k],J=$[z];h.replacer&&(J=h.replacer.call($,z,J)),v(h,_,z,!1,!1)&&(h.dump.length>1024&&(q+="? "),q+=h.dump+(h.condenseFlow?'"':"")+":"+(h.condenseFlow?"":" "),v(h,_,J,!1,!1)&&(q+=h.dump,A+=q))}h.tag=T,h.dump="{"+A+"}"}function Va(h,_,$,A){let T="",N=h.tag,k=Object.keys($);if(h.sortKeys===!0)k.sort();else if(typeof h.sortKeys=="function")k.sort(h.sortKeys);else if(h.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let M=0,q=k.length;M<q;M+=1){let z="";(!A||T!=="")&&(z+=tr(h,_));let J=k[M],Q=$[J];if(h.replacer&&(Q=h.replacer.call($,J,Q)),!v(h,_+1,J,!0,!0,!0))continue;let te=h.tag!==null&&h.tag!=="?"||h.dump&&h.dump.length>1024;te&&(h.dump&&a===h.dump.charCodeAt(0)?z+="?":z+="? "),z+=h.dump,te&&(z+=tr(h,_)),v(h,_+1,Q,!0,te)&&(h.dump&&a===h.dump.charCodeAt(0)?z+=":":z+=": ",z+=h.dump,T+=z)}h.tag=N,h.dump=T||"{}"}function u(h,_,$){let A=$?h.explicitTypes:h.implicitTypes;for(let T=0,N=A.length;T<N;T+=1){let k=A[T];if((k.instanceOf||k.predicate)&&(!k.instanceOf||typeof _=="object"&&_ instanceof k.instanceOf)&&(!k.predicate||k.predicate(_))){if($?k.multi&&k.representName?h.tag=k.representName(_):h.tag=k.tag:h.tag="?",k.represent){let M=h.styleMap[k.tag]||k.defaultStyle,q;if(r.call(k.represent)==="[object Function]")q=k.represent(_,M);else if(i.call(k.represent,M))q=k.represent[M](_,M);else throw new e("!<"+k.tag+'> tag resolver accepts not "'+M+'" style');h.dump=q}return!0}}return!1}function v(h,_,$,A,T,N,k){h.tag=null,h.dump=$,u(h,$,!1)||u(h,$,!0);let M=r.call(h.dump),q=A;A&&(A=h.flowLevel<0||h.flowLevel>_);let z=M==="[object Object]"||M==="[object Array]",J,Q;if(z&&(J=h.duplicates.indexOf($),Q=J!==-1),(h.tag!==null&&h.tag!=="?"||Q||h.indent!==2&&_>0)&&(T=!1),Q&&h.usedDuplicates[J])h.dump="*ref_"+J;else{if(z&&Q&&!h.usedDuplicates[J]&&(h.usedDuplicates[J]=!0),M==="[object Object]")A&&Object.keys(h.dump).length!==0?(Va(h,_,h.dump,T),Q&&(h.dump="&ref_"+J+h.dump)):(Ma(h,_,h.dump),Q&&(h.dump="&ref_"+J+" "+h.dump));else if(M==="[object Array]")A&&h.dump.length!==0?(h.noArrayIndent&&!k&&_>0?ti(h,_-1,h.dump,T):ti(h,_,h.dump,T),Q&&(h.dump="&ref_"+J+h.dump)):(Na(h,_,h.dump),Q&&(h.dump="&ref_"+J+" "+h.dump));else if(M==="[object String]")h.tag!=="?"&&Po(h,h.dump,_,N,q);else{if(M==="[object Undefined]")return!1;if(h.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+M)}if(h.tag!==null&&h.tag!=="?"){let te=encodeURI(h.tag[0]==="!"?h.tag.slice(1):h.tag).replace(/!/g,"%21");h.tag[0]==="!"?te="!"+te:te.slice(0,18)==="tag:yaml.org,2002:"?te="!!"+te.slice(18):te="!<"+te+">",h.dump=te+" "+h.dump}}return!0}function E(h,_){let $=[],A=[];I(h,$,A);let T=A.length;for(let N=0;N<T;N+=1)_.duplicates.push($[A[N]]);_.usedDuplicates=new Array(T)}function I(h,_,$){if(h!==null&&typeof h=="object"){let A=_.indexOf(h);if(A!==-1)$.indexOf(A)===-1&&$.push(A);else if(_.push(h),Array.isArray(h))for(let T=0,N=h.length;T<N;T+=1)I(h[T],_,$);else{let T=Object.keys(h);for(let N=0,k=T.length;N<k;N+=1)I(h[T[N]],_,$)}}}function C(h,_){_=_||{};let $=new Ta(_);$.noRefs||E(h,$);let A=h;return $.replacer&&(A=$.replacer.call({"":A},"",A)),v($,0,A,!0,!0)?$.dump+`
60
- `:""}return Tc.dump=C,Tc}function P0(){if(Df)return Me;Df=1;let t=k0(),e=E0();function n(r,i){return function(){throw new Error("Function yaml."+r+" is removed in js-yaml 4. Use yaml."+i+" instead, which is now safe by default.")}}return Me.Type=qe(),Me.Schema=Ff(),Me.FAILSAFE_SCHEMA=Wf(),Me.JSON_SCHEMA=Kf(),Me.CORE_SCHEMA=Yf(),Me.DEFAULT_SCHEMA=Oc(),Me.load=t.load,Me.loadAll=t.loadAll,Me.dump=e.dump,Me.YAMLException=pi(),Me.types={binary:Zf(),float:Jf(),map:Hf(),null:Uf(),pairs:th(),set:nh(),timestamp:Xf(),bool:zf(),int:Gf(),merge:Qf(),omap:eh(),seq:Bf(),str:qf()},Me.safeLoad=n("safeLoad","load"),Me.safeLoadAll=n("safeLoadAll","loadAll"),Me.safeDump=n("safeDump","dump"),Me}var Me,jo,an,mf,pc,gf,dc,yf,fc,wf,hc,vf,mc,bf,gc,_f,yc,xf,wc,$f,vc,Sf,bc,Cf,_c,kf,xc,Ef,$c,Pf,Sc,If,Cc,Rf,kc,Af,Ec,Tf,Pc,Of,Ic,Nf,Rc,Mf,Ac,Vf,Lf,Tc,jf,Df,I0,lt,AO,TO,OO,NO,MO,VO,LO,jO,DO,FO,qO,BO,HO,WO,ir=K(()=>{Me={},jo={},an={};Tc={};I0=P0(),lt=S0(I0),{Type:AO,Schema:TO,FAILSAFE_SCHEMA:OO,JSON_SCHEMA:NO,CORE_SCHEMA:MO,DEFAULT_SCHEMA:VO,load:LO,loadAll:jO,dump:DO,YAMLException:FO,types:qO,safeLoad:BO,safeLoadAll:HO,safeDump:WO}=lt});import{access as R0,readFile as rh}from"node:fs/promises";import{dirname as ih,relative as JO,resolve as Se}from"node:path";async function A0(t=process.cwd()){let e=Se(t);for(;;){let n=Se(e,"view-contracts.config.yaml");try{return await R0(n),n}catch{let r=ih(e);if(r===e)return null;e=r}}}async function cn(t){if(t)return Se(t);let e=await A0();if(!e)throw new Error("view-contracts.config.yaml not found. Pass -c <path> or run from a project directory.");return e}async function Je(t){let e=Se(t),n=await rh(e,"utf-8"),r=lt.load(n);return T0(e,r)}function T0(t,e){let n=ye(t);return{...e,openapi:Se(n,e.openapi),bindings:Se(n,e.bindings),microContractsConfig:Se(n,e.microContractsConfig),viewsDir:Se(n,e.viewsDir),generated:{contractDir:Se(n,e.generated.contractDir),actions:Se(n,e.generated.actions),bridge:Se(n,e.generated.bridge),reactDir:Se(n,e.generated.reactDir)},runtimeModule:e.runtimeModule?Se(n,e.runtimeModule):e.componentsModule?Se(n,e.componentsModule):void 0,themeModule:e.themeModule?Se(n,e.themeModule):void 0,design:e.design?{tokens:e.design.tokens?Se(n,e.design.tokens):void 0,theme:e.design.theme?Se(n,e.design.theme):void 0,extensionsCss:e.design.extensionsCss?Se(n,e.design.extensionsCss):void 0}:void 0,extensions:e.extensions?Se(n,e.extensions):void 0}}async function It(t){let e=await rh(Se(t),"utf-8");return lt.load(e)}function oh(t,e){return Se(t.generated.reactDir,"components",`${e.screenName}.generated.tsx`)}function ye(t){return ih(Se(t))}function ln(t){let e=t.design?.tokens,n=t.design?.theme;if(!e)throw new Error("view-contracts.config.yaml must define design.tokens (project tokens file path).");if(!n)throw new Error("view-contracts.config.yaml must define design.theme (project theme file path).");return{tokensPath:e,themePath:n}}var bt=K(()=>{"use strict";ir()});var hi=S(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.regexpCode=ce.getEsmExportName=ce.getProperty=ce.safeStringify=ce.stringify=ce.strConcat=ce.addCodeArg=ce.str=ce._=ce.nil=ce._Code=ce.Name=ce.IDENTIFIER=ce._CodeOrName=void 0;var di=class{};ce._CodeOrName=di;ce.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Sn=class extends di{constructor(e){if(super(),!ce.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}}};ce.Name=Sn;var ut=class extends di{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((n,r)=>`${n}${r}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((n,r)=>(r instanceof Sn&&(n[r.str]=(n[r.str]||0)+1),n),{})}};ce._Code=ut;ce.nil=new ut("");function sh(t,...e){let n=[t[0]],r=0;for(;r<e.length;)Mc(n,e[r]),n.push(t[++r]);return new ut(n)}ce._=sh;var Nc=new ut("+");function ah(t,...e){let n=[fi(t[0])],r=0;for(;r<e.length;)n.push(Nc),Mc(n,e[r]),n.push(Nc,fi(t[++r]));return O0(n),new ut(n)}ce.str=ah;function Mc(t,e){e instanceof ut?t.push(...e._items):e instanceof Sn?t.push(e):t.push(V0(e))}ce.addCodeArg=Mc;function O0(t){let e=1;for(;e<t.length-1;){if(t[e]===Nc){let n=N0(t[e-1],t[e+1]);if(n!==void 0){t.splice(e-1,3,n);continue}t[e++]="+"}e++}}function N0(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof Sn||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 Sn))return`"${t}${e.slice(1)}`}function M0(t,e){return e.emptyStr()?t:t.emptyStr()?e:ah`${t}${e}`}ce.strConcat=M0;function V0(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:fi(Array.isArray(t)?t.join(","):t)}function L0(t){return new ut(fi(t))}ce.stringify=L0;function fi(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ce.safeStringify=fi;function j0(t){return typeof t=="string"&&ce.IDENTIFIER.test(t)?new ut(`.${t}`):sh`[${t}]`}ce.getProperty=j0;function D0(t){if(typeof t=="string"&&ce.IDENTIFIER.test(t))return new ut(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}ce.getEsmExportName=D0;function F0(t){return new ut(t.toString())}ce.regexpCode=F0});var jc=S(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.ValueScope=Ye.ValueScopeName=Ye.Scope=Ye.varKinds=Ye.UsedValueState=void 0;var Ke=hi(),Vc=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Do;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Do||(Ye.UsedValueState=Do={}));Ye.varKinds={const:new Ke.Name("const"),let:new Ke.Name("let"),var:new Ke.Name("var")};var Fo=class{constructor({prefixes:e,parent:n}={}){this._names={},this._prefixes=e,this._parent=n}toName(e){return e instanceof Ke.Name?e:this.name(e)}name(e){return new Ke.Name(this._newName(e))}_newName(e){let n=this._names[e]||this._nameGroup(e);return`${e}${n.index++}`}_nameGroup(e){var n,r;if(!((r=(n=this._parent)===null||n===void 0?void 0:n._prefixes)===null||r===void 0)&&r.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}}};Ye.Scope=Fo;var qo=class extends Ke.Name{constructor(e,n){super(n),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,Ke._)`.${new Ke.Name(n)}[${r}]`}};Ye.ValueScopeName=qo;var q0=(0,Ke._)`\n`,Lc=class extends Fo{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?q0:Ke.nil}}get(){return this._scope}name(e){return new qo(e,this._newName(e))}value(e,n){var r;if(n.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,s=(r=n.key)!==null&&r!==void 0?r:n.ref,a=this._values[o];if(a){let d=a.get(s);if(d)return d}else a=this._values[o]=new Map;a.set(s,i);let c=this._scope[o]||(this._scope[o]=[]),l=c.length;return c[l]=n.ref,i.setValue(n,{property:o,itemIndex:l}),i}getValue(e,n){let r=this._values[e];if(r)return r.get(n)}scopeRefs(e,n=this._values){return this._reduceValues(n,r=>{if(r.scopePath===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return(0,Ke._)`${e}${r.scopePath}`})}scopeCode(e=this._values,n,r){return this._reduceValues(e,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},n,r)}_reduceValues(e,n,r={},i){let o=Ke.nil;for(let s in e){let a=e[s];if(!a)continue;let c=r[s]=r[s]||new Map;a.forEach(l=>{if(c.has(l))return;c.set(l,Do.Started);let d=n(l);if(d){let p=this.opts.es5?Ye.varKinds.var:Ye.varKinds.const;o=(0,Ke._)`${o}${p} ${l} = ${d};${this.opts._n}`}else if(d=i?.(l))o=(0,Ke._)`${o}${d}${this.opts._n}`;else throw new Vc(l);c.set(l,Do.Completed)})}return o}};Ye.ValueScope=Lc});var Z=S(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.or=ne.and=ne.not=ne.CodeGen=ne.operators=ne.varKinds=ne.ValueScopeName=ne.ValueScope=ne.Scope=ne.Name=ne.regexpCode=ne.stringify=ne.getProperty=ne.nil=ne.strConcat=ne.str=ne._=void 0;var se=hi(),_t=jc(),un=hi();Object.defineProperty(ne,"_",{enumerable:!0,get:function(){return un._}});Object.defineProperty(ne,"str",{enumerable:!0,get:function(){return un.str}});Object.defineProperty(ne,"strConcat",{enumerable:!0,get:function(){return un.strConcat}});Object.defineProperty(ne,"nil",{enumerable:!0,get:function(){return un.nil}});Object.defineProperty(ne,"getProperty",{enumerable:!0,get:function(){return un.getProperty}});Object.defineProperty(ne,"stringify",{enumerable:!0,get:function(){return un.stringify}});Object.defineProperty(ne,"regexpCode",{enumerable:!0,get:function(){return un.regexpCode}});Object.defineProperty(ne,"Name",{enumerable:!0,get:function(){return un.Name}});var Uo=jc();Object.defineProperty(ne,"Scope",{enumerable:!0,get:function(){return Uo.Scope}});Object.defineProperty(ne,"ValueScope",{enumerable:!0,get:function(){return Uo.ValueScope}});Object.defineProperty(ne,"ValueScopeName",{enumerable:!0,get:function(){return Uo.ValueScopeName}});Object.defineProperty(ne,"varKinds",{enumerable:!0,get:function(){return Uo.varKinds}});ne.operators={GT:new se._Code(">"),GTE:new se._Code(">="),LT:new se._Code("<"),LTE:new se._Code("<="),EQ:new se._Code("==="),NEQ:new se._Code("!=="),NOT:new se._Code("!"),OR:new se._Code("||"),AND:new se._Code("&&"),ADD:new se._Code("+")};var Bt=class{optimizeNodes(){return this}optimizeNames(e,n){return this}},Dc=class extends Bt{constructor(e,n,r){super(),this.varKind=e,this.name=n,this.rhs=r}render({es5:e,_n:n}){let r=e?_t.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${i};`+n}optimizeNames(e,n){if(e[this.name.str])return this.rhs&&(this.rhs=sr(this.rhs,e,n)),this}get names(){return this.rhs instanceof se._CodeOrName?this.rhs.names:{}}},Bo=class extends Bt{constructor(e,n,r){super(),this.lhs=e,this.rhs=n,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof se.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=sr(this.rhs,e,n),this}get names(){let e=this.lhs instanceof se.Name?{}:{...this.lhs.names};return Wo(e,this.rhs)}},Fc=class extends Bo{constructor(e,n,r,i){super(e,r,i),this.op=n}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},qc=class extends Bt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Bc=class extends Bt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Hc=class extends Bt{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Wc=class extends Bt{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,n){return this.code=sr(this.code,e,n),this}get names(){return this.code instanceof se._CodeOrName?this.code.names:{}}},mi=class extends Bt{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((n,r)=>n+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,n=e.length;for(;n--;){let r=e[n].optimizeNodes();Array.isArray(r)?e.splice(n,1,...r):r?e[n]=r:e.splice(n,1)}return e.length>0?this:void 0}optimizeNames(e,n){let{nodes:r}=this,i=r.length;for(;i--;){let o=r[i];o.optimizeNames(e,n)||(B0(e,o.names),r.splice(i,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,n)=>En(e,n.names),{})}},Ht=class extends mi{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Uc=class extends mi{},or=class extends Ht{};or.kind="else";var Cn=class t extends Ht{constructor(e,n){super(n),this.condition=e}render(e){let n=`if(${this.condition})`+super.render(e);return this.else&&(n+="else "+this.else.render(e)),n}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let n=this.else;if(n){let r=n.optimizeNodes();n=this.else=Array.isArray(r)?new or(r):r}if(n)return e===!1?n instanceof t?n:n.nodes:this.nodes.length?this:new t(ch(e),n instanceof t?[n]:n.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,n){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,n),!!(super.optimizeNames(e,n)||this.else))return this.condition=sr(this.condition,e,n),this}get names(){let e=super.names;return Wo(e,this.condition),this.else&&En(e,this.else.names),e}};Cn.kind="if";var kn=class extends Ht{};kn.kind="for";var zc=class extends kn{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,n){if(super.optimizeNames(e,n))return this.iteration=sr(this.iteration,e,n),this}get names(){return En(super.names,this.iteration.names)}},Gc=class extends kn{constructor(e,n,r,i){super(),this.varKind=e,this.name=n,this.from=r,this.to=i}render(e){let n=e.es5?_t.varKinds.var:this.varKind,{name:r,from:i,to:o}=this;return`for(${n} ${r}=${i}; ${r}<${o}; ${r}++)`+super.render(e)}get names(){let e=Wo(super.names,this.from);return Wo(e,this.to)}},Ho=class extends kn{constructor(e,n,r,i){super(),this.loop=e,this.varKind=n,this.name=r,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,n){if(super.optimizeNames(e,n))return this.iterable=sr(this.iterable,e,n),this}get names(){return En(super.names,this.iterable.names)}},gi=class extends Ht{constructor(e,n,r){super(),this.name=e,this.args=n,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};gi.kind="func";var yi=class extends mi{render(e){return"return "+super.render(e)}};yi.kind="return";var Jc=class extends Ht{render(e){let n="try"+super.render(e);return this.catch&&(n+=this.catch.render(e)),this.finally&&(n+=this.finally.render(e)),n}optimizeNodes(){var e,n;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(n=this.finally)===null||n===void 0||n.optimizeNodes(),this}optimizeNames(e,n){var r,i;return super.optimizeNames(e,n),(r=this.catch)===null||r===void 0||r.optimizeNames(e,n),(i=this.finally)===null||i===void 0||i.optimizeNames(e,n),this}get names(){let e=super.names;return this.catch&&En(e,this.catch.names),this.finally&&En(e,this.finally.names),e}},wi=class extends Ht{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};wi.kind="catch";var vi=class extends Ht{render(e){return"finally"+super.render(e)}};vi.kind="finally";var Kc=class{constructor(e,n={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...n,_n:n.lines?`
61
- `:""},this._extScope=e,this._scope=new _t.Scope({parent:e}),this._nodes=[new Uc]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,n){let r=this._extScope.value(e,n);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,n){return this._extScope.getValue(e,n)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,n,r,i){let o=this._scope.toName(n);return r!==void 0&&i&&(this._constants[o.str]=r),this._leafNode(new Dc(e,o,r)),o}const(e,n,r){return this._def(_t.varKinds.const,e,n,r)}let(e,n,r){return this._def(_t.varKinds.let,e,n,r)}var(e,n,r){return this._def(_t.varKinds.var,e,n,r)}assign(e,n,r){return this._leafNode(new Bo(e,n,r))}add(e,n){return this._leafNode(new Fc(e,ne.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==se.nil&&this._leafNode(new Wc(e)),this}object(...e){let n=["{"];for(let[r,i]of e)n.length>1&&n.push(","),n.push(r),(r!==i||this.opts.es5)&&(n.push(":"),(0,se.addCodeArg)(n,i));return n.push("}"),new se._Code(n)}if(e,n,r){if(this._blockNode(new Cn(e)),n&&r)this.code(n).else().code(r).endIf();else if(n)this.code(n).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Cn(e))}else(){return this._elseNode(new or)}endIf(){return this._endBlockNode(Cn,or)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new zc(e),n)}forRange(e,n,r,i,o=this.opts.es5?_t.varKinds.var:_t.varKinds.let){let s=this._scope.toName(e);return this._for(new Gc(o,s,n,r),()=>i(s))}forOf(e,n,r,i=_t.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let s=n instanceof se.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,se._)`${s}.length`,a=>{this.var(o,(0,se._)`${s}[${a}]`),r(o)})}return this._for(new Ho("of",i,o,n),()=>r(o))}forIn(e,n,r,i=this.opts.es5?_t.varKinds.var:_t.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,se._)`Object.keys(${n})`,r);let o=this._scope.toName(e);return this._for(new Ho("in",i,o,n),()=>r(o))}endFor(){return this._endBlockNode(kn)}label(e){return this._leafNode(new qc(e))}break(e){return this._leafNode(new Bc(e))}return(e){let n=new yi;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(yi)}try(e,n,r){if(!n&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new Jc;if(this._blockNode(i),this.code(e),n){let o=this.name("e");this._currNode=i.catch=new wi(o),n(o)}return r&&(this._currNode=i.finally=new vi,this.code(r)),this._endBlockNode(wi,vi)}throw(e){return this._leafNode(new Hc(e))}block(e,n){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(n),this}endBlock(e){let n=this._blockStarts.pop();if(n===void 0)throw new Error("CodeGen: not in self-balancing block");let r=this._nodes.length-n;if(r<0||e!==void 0&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=n,this}func(e,n=se.nil,r,i){return this._blockNode(new gi(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(gi)}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,n){let r=this._currNode;if(r instanceof e||n&&r instanceof n)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${n?`${e.kind}/${n.kind}`:e.kind}"`)}_elseNode(e){let n=this._currNode;if(!(n instanceof Cn))throw new Error('CodeGen: "else" without "if"');return this._currNode=n.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let n=this._nodes;n[n.length-1]=e}};ne.CodeGen=Kc;function En(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function Wo(t,e){return e instanceof se._CodeOrName?En(t,e.names):t}function sr(t,e,n){if(t instanceof se.Name)return r(t);if(!i(t))return t;return new se._Code(t._items.reduce((o,s)=>(s instanceof se.Name&&(s=r(s)),s instanceof se._Code?o.push(...s._items):o.push(s),o),[]));function r(o){let s=n[o.str];return s===void 0||e[o.str]!==1?o:(delete e[o.str],s)}function i(o){return o instanceof se._Code&&o._items.some(s=>s instanceof se.Name&&e[s.str]===1&&n[s.str]!==void 0)}}function B0(t,e){for(let n in e)t[n]=(t[n]||0)-(e[n]||0)}function ch(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,se._)`!${Yc(t)}`}ne.not=ch;var H0=lh(ne.operators.AND);function W0(...t){return t.reduce(H0)}ne.and=W0;var U0=lh(ne.operators.OR);function z0(...t){return t.reduce(U0)}ne.or=z0;function lh(t){return(e,n)=>e===se.nil?n:n===se.nil?e:(0,se._)`${Yc(e)} ${t} ${Yc(n)}`}function Yc(t){return t instanceof se.Name?t:(0,se._)`(${t})`}});var ie=S(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.checkStrictMode=re.getErrorPath=re.Type=re.useFunc=re.setEvaluated=re.evaluatedPropsToName=re.mergeEvaluated=re.eachItem=re.unescapeJsonPointer=re.escapeJsonPointer=re.escapeFragment=re.unescapeFragment=re.schemaRefOrVal=re.schemaHasRulesButRef=re.schemaHasRules=re.checkUnknownRules=re.alwaysValidSchema=re.toHash=void 0;var he=Z(),G0=hi();function J0(t){let e={};for(let n of t)e[n]=!0;return e}re.toHash=J0;function K0(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(dh(t,e),!fh(e,t.self.RULES.all))}re.alwaysValidSchema=K0;function dh(t,e=t.schema){let{opts:n,self:r}=t;if(!n.strictSchema||typeof e=="boolean")return;let i=r.RULES.keywords;for(let o in e)i[o]||gh(t,`unknown keyword: "${o}"`)}re.checkUnknownRules=dh;function fh(t,e){if(typeof t=="boolean")return!t;for(let n in t)if(e[n])return!0;return!1}re.schemaHasRules=fh;function Y0(t,e){if(typeof t=="boolean")return!t;for(let n in t)if(n!=="$ref"&&e.all[n])return!0;return!1}re.schemaHasRulesButRef=Y0;function X0({topSchemaRef:t,schemaPath:e},n,r,i){if(!i){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,he._)`${n}`}return(0,he._)`${t}${e}${(0,he.getProperty)(r)}`}re.schemaRefOrVal=X0;function Q0(t){return hh(decodeURIComponent(t))}re.unescapeFragment=Q0;function Z0(t){return encodeURIComponent(Qc(t))}re.escapeFragment=Z0;function Qc(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}re.escapeJsonPointer=Qc;function hh(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}re.unescapeJsonPointer=hh;function ex(t,e){if(Array.isArray(t))for(let n of t)e(n);else e(t)}re.eachItem=ex;function uh({mergeNames:t,mergeToName:e,mergeValues:n,resultToName:r}){return(i,o,s,a)=>{let c=s===void 0?o:s instanceof he.Name?(o instanceof he.Name?t(i,o,s):e(i,o,s),s):o instanceof he.Name?(e(i,s,o),o):n(o,s);return a===he.Name&&!(c instanceof he.Name)?r(i,c):c}}re.mergeEvaluated={props:uh({mergeNames:(t,e,n)=>t.if((0,he._)`${n} !== true && ${e} !== undefined`,()=>{t.if((0,he._)`${e} === true`,()=>t.assign(n,!0),()=>t.assign(n,(0,he._)`${n} || {}`).code((0,he._)`Object.assign(${n}, ${e})`))}),mergeToName:(t,e,n)=>t.if((0,he._)`${n} !== true`,()=>{e===!0?t.assign(n,!0):(t.assign(n,(0,he._)`${n} || {}`),Zc(t,n,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:mh}),items:uh({mergeNames:(t,e,n)=>t.if((0,he._)`${n} !== true && ${e} !== undefined`,()=>t.assign(n,(0,he._)`${e} === true ? true : ${n} > ${e} ? ${n} : ${e}`)),mergeToName:(t,e,n)=>t.if((0,he._)`${n} !== true`,()=>t.assign(n,e===!0?!0:(0,he._)`${n} > ${e} ? ${n} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function mh(t,e){if(e===!0)return t.var("props",!0);let n=t.var("props",(0,he._)`{}`);return e!==void 0&&Zc(t,n,e),n}re.evaluatedPropsToName=mh;function Zc(t,e,n){Object.keys(n).forEach(r=>t.assign((0,he._)`${e}${(0,he.getProperty)(r)}`,!0))}re.setEvaluated=Zc;var ph={};function tx(t,e){return t.scopeValue("func",{ref:e,code:ph[e.code]||(ph[e.code]=new G0._Code(e.code))})}re.useFunc=tx;var Xc;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(Xc||(re.Type=Xc={}));function nx(t,e,n){if(t instanceof he.Name){let r=e===Xc.Num;return n?r?(0,he._)`"[" + ${t} + "]"`:(0,he._)`"['" + ${t} + "']"`:r?(0,he._)`"/" + ${t}`:(0,he._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,he.getProperty)(t).toString():"/"+Qc(t)}re.getErrorPath=nx;function gh(t,e,n=t.opts.strictSchema){if(n){if(e=`strict mode: ${e}`,n===!0)throw new Error(e);t.self.logger.warn(e)}}re.checkStrictMode=gh});var pt=S(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});var Ve=Z(),rx={data:new Ve.Name("data"),valCxt:new Ve.Name("valCxt"),instancePath:new Ve.Name("instancePath"),parentData:new Ve.Name("parentData"),parentDataProperty:new Ve.Name("parentDataProperty"),rootData:new Ve.Name("rootData"),dynamicAnchors:new Ve.Name("dynamicAnchors"),vErrors:new Ve.Name("vErrors"),errors:new Ve.Name("errors"),this:new Ve.Name("this"),self:new Ve.Name("self"),scope:new Ve.Name("scope"),json:new Ve.Name("json"),jsonPos:new Ve.Name("jsonPos"),jsonLen:new Ve.Name("jsonLen"),jsonPart:new Ve.Name("jsonPart")};el.default=rx});var bi=S(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.extendErrors=Le.resetErrorsCount=Le.reportExtraError=Le.reportError=Le.keyword$DataError=Le.keywordError=void 0;var ae=Z(),zo=ie(),Be=pt();Le.keywordError={message:({keyword:t})=>(0,ae.str)`must pass "${t}" keyword validation`};Le.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,ae.str)`"${t}" keyword must be ${e} ($data)`:(0,ae.str)`"${t}" keyword is invalid ($data)`};function ix(t,e=Le.keywordError,n,r){let{it:i}=t,{gen:o,compositeRule:s,allErrors:a}=i,c=vh(t,e,n);r??(s||a)?yh(o,c):wh(i,(0,ae._)`[${c}]`)}Le.reportError=ix;function ox(t,e=Le.keywordError,n){let{it:r}=t,{gen:i,compositeRule:o,allErrors:s}=r,a=vh(t,e,n);yh(i,a),o||s||wh(r,Be.default.vErrors)}Le.reportExtraError=ox;function sx(t,e){t.assign(Be.default.errors,e),t.if((0,ae._)`${Be.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,ae._)`${Be.default.vErrors}.length`,e),()=>t.assign(Be.default.vErrors,null)))}Le.resetErrorsCount=sx;function ax({gen:t,keyword:e,schemaValue:n,data:r,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let s=t.name("err");t.forRange("i",i,Be.default.errors,a=>{t.const(s,(0,ae._)`${Be.default.vErrors}[${a}]`),t.if((0,ae._)`${s}.instancePath === undefined`,()=>t.assign((0,ae._)`${s}.instancePath`,(0,ae.strConcat)(Be.default.instancePath,o.errorPath))),t.assign((0,ae._)`${s}.schemaPath`,(0,ae.str)`${o.errSchemaPath}/${e}`),o.opts.verbose&&(t.assign((0,ae._)`${s}.schema`,n),t.assign((0,ae._)`${s}.data`,r))})}Le.extendErrors=ax;function yh(t,e){let n=t.const("err",e);t.if((0,ae._)`${Be.default.vErrors} === null`,()=>t.assign(Be.default.vErrors,(0,ae._)`[${n}]`),(0,ae._)`${Be.default.vErrors}.push(${n})`),t.code((0,ae._)`${Be.default.errors}++`)}function wh(t,e){let{gen:n,validateName:r,schemaEnv:i}=t;i.$async?n.throw((0,ae._)`new ${t.ValidationError}(${e})`):(n.assign((0,ae._)`${r}.errors`,e),n.return(!1))}var Pn={keyword:new ae.Name("keyword"),schemaPath:new ae.Name("schemaPath"),params:new ae.Name("params"),propertyName:new ae.Name("propertyName"),message:new ae.Name("message"),schema:new ae.Name("schema"),parentSchema:new ae.Name("parentSchema")};function vh(t,e,n){let{createErrors:r}=t.it;return r===!1?(0,ae._)`{}`:cx(t,e,n)}function cx(t,e,n={}){let{gen:r,it:i}=t,o=[lx(i,n),ux(t,n)];return px(t,e,o),r.object(...o)}function lx({errorPath:t},{instancePath:e}){let n=e?(0,ae.str)`${t}${(0,zo.getErrorPath)(e,zo.Type.Str)}`:t;return[Be.default.instancePath,(0,ae.strConcat)(Be.default.instancePath,n)]}function ux({keyword:t,it:{errSchemaPath:e}},{schemaPath:n,parentSchema:r}){let i=r?e:(0,ae.str)`${e}/${t}`;return n&&(i=(0,ae.str)`${i}${(0,zo.getErrorPath)(n,zo.Type.Str)}`),[Pn.schemaPath,i]}function px(t,{params:e,message:n},r){let{keyword:i,data:o,schemaValue:s,it:a}=t,{opts:c,propertyName:l,topSchemaRef:d,schemaPath:p}=a;r.push([Pn.keyword,i],[Pn.params,typeof e=="function"?e(t):e||(0,ae._)`{}`]),c.messages&&r.push([Pn.message,typeof n=="function"?n(t):n]),c.verbose&&r.push([Pn.schema,s],[Pn.parentSchema,(0,ae._)`${d}${p}`],[Be.default.data,o]),l&&r.push([Pn.propertyName,l])}});var _h=S(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.boolOrEmptySchema=ar.topBoolOrEmptySchema=void 0;var dx=bi(),fx=Z(),hx=pt(),mx={message:"boolean schema is false"};function gx(t){let{gen:e,schema:n,validateName:r}=t;n===!1?bh(t,!1):typeof n=="object"&&n.$async===!0?e.return(hx.default.data):(e.assign((0,fx._)`${r}.errors`,null),e.return(!0))}ar.topBoolOrEmptySchema=gx;function yx(t,e){let{gen:n,schema:r}=t;r===!1?(n.var(e,!1),bh(t)):n.var(e,!0)}ar.boolOrEmptySchema=yx;function bh(t,e){let{gen:n,data:r}=t,i={gen:n,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,dx.reportError)(i,mx,void 0,e)}});var tl=S(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.getRules=cr.isJSONType=void 0;var wx=["string","number","integer","boolean","null","object","array"],vx=new Set(wx);function bx(t){return typeof t=="string"&&vx.has(t)}cr.isJSONType=bx;function _x(){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:{}}}cr.getRules=_x});var nl=S(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.shouldUseRule=pn.shouldUseGroup=pn.schemaHasRulesForType=void 0;function xx({schema:t,self:e},n){let r=e.RULES.types[n];return r&&r!==!0&&xh(t,r)}pn.schemaHasRulesForType=xx;function xh(t,e){return e.rules.some(n=>$h(t,n))}pn.shouldUseGroup=xh;function $h(t,e){var n;return t[e.keyword]!==void 0||((n=e.definition.implements)===null||n===void 0?void 0:n.some(r=>t[r]!==void 0))}pn.shouldUseRule=$h});var _i=S(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.reportTypeError=je.checkDataTypes=je.checkDataType=je.coerceAndCheckDataType=je.getJSONTypes=je.getSchemaTypes=je.DataType=void 0;var $x=tl(),Sx=nl(),Cx=bi(),ee=Z(),Sh=ie(),lr;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(lr||(je.DataType=lr={}));function kx(t){let e=Ch(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}je.getSchemaTypes=kx;function Ch(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every($x.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}je.getJSONTypes=Ch;function Ex(t,e){let{gen:n,data:r,opts:i}=t,o=Px(e,i.coerceTypes),s=e.length>0&&!(o.length===0&&e.length===1&&(0,Sx.schemaHasRulesForType)(t,e[0]));if(s){let a=il(e,r,i.strictNumbers,lr.Wrong);n.if(a,()=>{o.length?Ix(t,e,o):ol(t)})}return s}je.coerceAndCheckDataType=Ex;var kh=new Set(["string","number","integer","boolean","null"]);function Px(t,e){return e?t.filter(n=>kh.has(n)||e==="array"&&n==="array"):[]}function Ix(t,e,n){let{gen:r,data:i,opts:o}=t,s=r.let("dataType",(0,ee._)`typeof ${i}`),a=r.let("coerced",(0,ee._)`undefined`);o.coerceTypes==="array"&&r.if((0,ee._)`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>r.assign(i,(0,ee._)`${i}[0]`).assign(s,(0,ee._)`typeof ${i}`).if(il(e,i,o.strictNumbers),()=>r.assign(a,i))),r.if((0,ee._)`${a} !== undefined`);for(let l of n)(kh.has(l)||l==="array"&&o.coerceTypes==="array")&&c(l);r.else(),ol(t),r.endIf(),r.if((0,ee._)`${a} !== undefined`,()=>{r.assign(i,a),Rx(t,a)});function c(l){switch(l){case"string":r.elseIf((0,ee._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,ee._)`"" + ${i}`).elseIf((0,ee._)`${i} === null`).assign(a,(0,ee._)`""`);return;case"number":r.elseIf((0,ee._)`${s} == "boolean" || ${i} === null
59
+ `+h.slice(k+1):q+=h.slice(T),q.slice(1)}function an(h){let _="",$=0;for(let A=0;A<h.length;$>=65536?A+=2:A++){$=Rt(h,A);let T=de[$];!T&&on($)?(_+=h[A],$>=65536&&(_+=h[A+1])):_+=T||Ft($)}return _}function ja(h,_,$){let A="",T=h.tag;for(let N=0,k=$.length;N<k;N+=1){let M=$[N];h.replacer&&(M=h.replacer.call($,String(N),M)),(v(h,_,M,!1,!1)||typeof M>"u"&&v(h,_,null,!1,!1))&&(A!==""&&(A+=","+(h.condenseFlow?"":" ")),A+=h.dump)}h.tag=T,h.dump="["+A+"]"}function ii(h,_,$,A){let T="",N=h.tag;for(let k=0,M=$.length;k<M;k+=1){let q=$[k];h.replacer&&(q=h.replacer.call($,String(k),q)),(v(h,_+1,q,!0,!0,!1,!0)||typeof q>"u"&&v(h,_+1,null,!0,!0,!1,!0))&&((!A||T!=="")&&(T+=ir(h,_)),h.dump&&a===h.dump.charCodeAt(0)?T+="-":T+="- ",T+=h.dump)}h.tag=N,h.dump=T||"[]"}function Da(h,_,$){let A="",T=h.tag,N=Object.keys($);for(let k=0,M=N.length;k<M;k+=1){let q="";A!==""&&(q+=", "),h.condenseFlow&&(q+='"');let z=N[k],J=$[z];h.replacer&&(J=h.replacer.call($,z,J)),v(h,_,z,!1,!1)&&(h.dump.length>1024&&(q+="? "),q+=h.dump+(h.condenseFlow?'"':"")+":"+(h.condenseFlow?"":" "),v(h,_,J,!1,!1)&&(q+=h.dump,A+=q))}h.tag=T,h.dump="{"+A+"}"}function Fa(h,_,$,A){let T="",N=h.tag,k=Object.keys($);if(h.sortKeys===!0)k.sort();else if(typeof h.sortKeys=="function")k.sort(h.sortKeys);else if(h.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let M=0,q=k.length;M<q;M+=1){let z="";(!A||T!=="")&&(z+=ir(h,_));let J=k[M],Q=$[J];if(h.replacer&&(Q=h.replacer.call($,J,Q)),!v(h,_+1,J,!0,!0,!0))continue;let te=h.tag!==null&&h.tag!=="?"||h.dump&&h.dump.length>1024;te&&(h.dump&&a===h.dump.charCodeAt(0)?z+="?":z+="? "),z+=h.dump,te&&(z+=ir(h,_)),v(h,_+1,Q,!0,te)&&(h.dump&&a===h.dump.charCodeAt(0)?z+=":":z+=": ",z+=h.dump,T+=z)}h.tag=N,h.dump=T||"{}"}function u(h,_,$){let A=$?h.explicitTypes:h.implicitTypes;for(let T=0,N=A.length;T<N;T+=1){let k=A[T];if((k.instanceOf||k.predicate)&&(!k.instanceOf||typeof _=="object"&&_ instanceof k.instanceOf)&&(!k.predicate||k.predicate(_))){if($?k.multi&&k.representName?h.tag=k.representName(_):h.tag=k.tag:h.tag="?",k.represent){let M=h.styleMap[k.tag]||k.defaultStyle,q;if(r.call(k.represent)==="[object Function]")q=k.represent(_,M);else if(i.call(k.represent,M))q=k.represent[M](_,M);else throw new e("!<"+k.tag+'> tag resolver accepts not "'+M+'" style');h.dump=q}return!0}}return!1}function v(h,_,$,A,T,N,k){h.tag=null,h.dump=$,u(h,$,!1)||u(h,$,!0);let M=r.call(h.dump),q=A;A&&(A=h.flowLevel<0||h.flowLevel>_);let z=M==="[object Object]"||M==="[object Array]",J,Q;if(z&&(J=h.duplicates.indexOf($),Q=J!==-1),(h.tag!==null&&h.tag!=="?"||Q||h.indent!==2&&_>0)&&(T=!1),Q&&h.usedDuplicates[J])h.dump="*ref_"+J;else{if(z&&Q&&!h.usedDuplicates[J]&&(h.usedDuplicates[J]=!0),M==="[object Object]")A&&Object.keys(h.dump).length!==0?(Fa(h,_,h.dump,T),Q&&(h.dump="&ref_"+J+h.dump)):(Da(h,_,h.dump),Q&&(h.dump="&ref_"+J+" "+h.dump));else if(M==="[object Array]")A&&h.dump.length!==0?(h.noArrayIndent&&!k&&_>0?ii(h,_-1,h.dump,T):ii(h,_,h.dump,T),Q&&(h.dump="&ref_"+J+h.dump)):(ja(h,_,h.dump),Q&&(h.dump="&ref_"+J+" "+h.dump));else if(M==="[object String]")h.tag!=="?"&&Ao(h,h.dump,_,N,q);else{if(M==="[object Undefined]")return!1;if(h.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+M)}if(h.tag!==null&&h.tag!=="?"){let te=encodeURI(h.tag[0]==="!"?h.tag.slice(1):h.tag).replace(/!/g,"%21");h.tag[0]==="!"?te="!"+te:te.slice(0,18)==="tag:yaml.org,2002:"?te="!!"+te.slice(18):te="!<"+te+">",h.dump=te+" "+h.dump}}return!0}function E(h,_){let $=[],A=[];I(h,$,A);let T=A.length;for(let N=0;N<T;N+=1)_.duplicates.push($[A[N]]);_.usedDuplicates=new Array(T)}function I(h,_,$){if(h!==null&&typeof h=="object"){let A=_.indexOf(h);if(A!==-1)$.indexOf(A)===-1&&$.push(A);else if(_.push(h),Array.isArray(h))for(let T=0,N=h.length;T<N;T+=1)I(h[T],_,$);else{let T=Object.keys(h);for(let N=0,k=T.length;N<k;N+=1)I(h[T[N]],_,$)}}}function C(h,_){_=_||{};let $=new Va(_);$.noRefs||E(h,$);let A=h;return $.replacer&&(A=$.replacer.call({"":A},"",A)),v($,0,A,!0,!0)?$.dump+`
60
+ `:""}return Dc.dump=C,Dc}function V0(){if(zf)return Me;zf=1;let t=N0(),e=M0();function n(r,i){return function(){throw new Error("Function yaml."+r+" is removed in js-yaml 4. Use yaml."+i+" instead, which is now safe by default.")}}return Me.Type=qe(),Me.Schema=Gf(),Me.FAILSAFE_SCHEMA=Xf(),Me.JSON_SCHEMA=nh(),Me.CORE_SCHEMA=rh(),Me.DEFAULT_SCHEMA=Fc(),Me.load=t.load,Me.loadAll=t.loadAll,Me.dump=e.dump,Me.YAMLException=hi(),Me.types={binary:sh(),float:th(),map:Yf(),null:Qf(),pairs:ch(),set:lh(),timestamp:ih(),bool:Zf(),int:eh(),merge:oh(),omap:ah(),seq:Kf(),str:Jf()},Me.safeLoad=n("safeLoad","load"),Me.safeLoadAll=n("safeLoadAll","loadAll"),Me.safeDump=n("safeDump","dump"),Me}var Me,qo,ln,xf,wc,$f,vc,Sf,bc,Cf,_c,kf,xc,Ef,$c,Pf,Sc,If,Cc,Rf,kc,Af,Ec,Tf,Pc,Of,Ic,Nf,Rc,Mf,Ac,Vf,Tc,Lf,Oc,jf,Nc,Df,Mc,Ff,Vc,qf,Lc,Bf,jc,Hf,Wf,Dc,Uf,zf,L0,dt,HO,WO,UO,zO,GO,JO,KO,YO,XO,QO,ZO,eN,tN,nN,ar=K(()=>{Me={},qo={},ln={};Dc={};L0=V0(),dt=T0(L0),{Type:HO,Schema:WO,FAILSAFE_SCHEMA:UO,JSON_SCHEMA:zO,CORE_SCHEMA:GO,DEFAULT_SCHEMA:JO,load:KO,loadAll:YO,dump:XO,YAMLException:QO,types:ZO,safeLoad:eN,safeLoadAll:tN,safeDump:nN}=dt});import{access as j0,readFile as uh}from"node:fs/promises";import{dirname as ph,resolve as $e}from"node:path";async function D0(t=process.cwd()){let e=$e(t);for(;;){let n=$e(e,"view-contracts.config.yaml");try{return await j0(n),n}catch{let r=ph(e);if(r===e)return null;e=r}}}async function un(t){if(t)return $e(t);let e=await D0();if(!e)throw new Error("view-contracts.config.yaml not found. Pass -c <path> or run from a project directory.");return e}async function Je(t){let e=$e(t),n=await uh(e,"utf-8"),r=dt.load(n);return F0(e,r)}function F0(t,e){let n=ye(t);return{...e,openapi:$e(n,e.openapi),bindings:$e(n,e.bindings),microContractsConfig:$e(n,e.microContractsConfig),viewsDir:$e(n,e.viewsDir),generated:{contractDir:$e(n,e.generated.contractDir),actions:$e(n,e.generated.actions),bridge:$e(n,e.generated.bridge),reactDir:$e(n,e.generated.reactDir)},runtimeModule:e.runtimeModule?$e(n,e.runtimeModule):e.componentsModule?$e(n,e.componentsModule):void 0,themeModule:e.themeModule?$e(n,e.themeModule):void 0,design:e.design?{tokens:e.design.tokens?$e(n,e.design.tokens):void 0,theme:e.design.theme?$e(n,e.design.theme):void 0,extensionsCss:e.design.extensionsCss?$e(n,e.design.extensionsCss):void 0}:void 0,extensions:e.extensions?$e(n,e.extensions):void 0}}async function At(t){let e=await uh($e(t),"utf-8");return dt.load(e)}function Bo(t,e){return $e(t.generated.reactDir,"components",`${e.screenName}.generated.tsx`)}function cr(t){return $e(t.generated.reactDir,"runtime.ts")}function ye(t){return ph($e(t))}function pn(t){let e=t.design?.tokens,n=t.design?.theme;if(!e)throw new Error("view-contracts.config.yaml must define design.tokens (project tokens file path).");if(!n)throw new Error("view-contracts.config.yaml must define design.theme (project theme file path).");return{tokensPath:e,themePath:n}}var xt=K(()=>{"use strict";ar()});var yi=S(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.regexpCode=ce.getEsmExportName=ce.getProperty=ce.safeStringify=ce.stringify=ce.strConcat=ce.addCodeArg=ce.str=ce._=ce.nil=ce._Code=ce.Name=ce.IDENTIFIER=ce._CodeOrName=void 0;var mi=class{};ce._CodeOrName=mi;ce.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var En=class extends mi{constructor(e){if(super(),!ce.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}}};ce.Name=En;var ft=class extends mi{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((n,r)=>`${n}${r}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((n,r)=>(r instanceof En&&(n[r.str]=(n[r.str]||0)+1),n),{})}};ce._Code=ft;ce.nil=new ft("");function dh(t,...e){let n=[t[0]],r=0;for(;r<e.length;)Bc(n,e[r]),n.push(t[++r]);return new ft(n)}ce._=dh;var qc=new ft("+");function fh(t,...e){let n=[gi(t[0])],r=0;for(;r<e.length;)n.push(qc),Bc(n,e[r]),n.push(qc,gi(t[++r]));return q0(n),new ft(n)}ce.str=fh;function Bc(t,e){e instanceof ft?t.push(...e._items):e instanceof En?t.push(e):t.push(W0(e))}ce.addCodeArg=Bc;function q0(t){let e=1;for(;e<t.length-1;){if(t[e]===qc){let n=B0(t[e-1],t[e+1]);if(n!==void 0){t.splice(e-1,3,n);continue}t[e++]="+"}e++}}function B0(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof En||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 En))return`"${t}${e.slice(1)}`}function H0(t,e){return e.emptyStr()?t:t.emptyStr()?e:fh`${t}${e}`}ce.strConcat=H0;function W0(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:gi(Array.isArray(t)?t.join(","):t)}function U0(t){return new ft(gi(t))}ce.stringify=U0;function gi(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ce.safeStringify=gi;function z0(t){return typeof t=="string"&&ce.IDENTIFIER.test(t)?new ft(`.${t}`):dh`[${t}]`}ce.getProperty=z0;function G0(t){if(typeof t=="string"&&ce.IDENTIFIER.test(t))return new ft(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}ce.getEsmExportName=G0;function J0(t){return new ft(t.toString())}ce.regexpCode=J0});var Uc=S(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.ValueScope=Ye.ValueScopeName=Ye.Scope=Ye.varKinds=Ye.UsedValueState=void 0;var Ke=yi(),Hc=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Ho;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Ho||(Ye.UsedValueState=Ho={}));Ye.varKinds={const:new Ke.Name("const"),let:new Ke.Name("let"),var:new Ke.Name("var")};var Wo=class{constructor({prefixes:e,parent:n}={}){this._names={},this._prefixes=e,this._parent=n}toName(e){return e instanceof Ke.Name?e:this.name(e)}name(e){return new Ke.Name(this._newName(e))}_newName(e){let n=this._names[e]||this._nameGroup(e);return`${e}${n.index++}`}_nameGroup(e){var n,r;if(!((r=(n=this._parent)===null||n===void 0?void 0:n._prefixes)===null||r===void 0)&&r.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}}};Ye.Scope=Wo;var Uo=class extends Ke.Name{constructor(e,n){super(n),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,Ke._)`.${new Ke.Name(n)}[${r}]`}};Ye.ValueScopeName=Uo;var K0=(0,Ke._)`\n`,Wc=class extends Wo{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?K0:Ke.nil}}get(){return this._scope}name(e){return new Uo(e,this._newName(e))}value(e,n){var r;if(n.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,s=(r=n.key)!==null&&r!==void 0?r:n.ref,a=this._values[o];if(a){let p=a.get(s);if(p)return p}else a=this._values[o]=new Map;a.set(s,i);let l=this._scope[o]||(this._scope[o]=[]),c=l.length;return l[c]=n.ref,i.setValue(n,{property:o,itemIndex:c}),i}getValue(e,n){let r=this._values[e];if(r)return r.get(n)}scopeRefs(e,n=this._values){return this._reduceValues(n,r=>{if(r.scopePath===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return(0,Ke._)`${e}${r.scopePath}`})}scopeCode(e=this._values,n,r){return this._reduceValues(e,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},n,r)}_reduceValues(e,n,r={},i){let o=Ke.nil;for(let s in e){let a=e[s];if(!a)continue;let l=r[s]=r[s]||new Map;a.forEach(c=>{if(l.has(c))return;l.set(c,Ho.Started);let p=n(c);if(p){let d=this.opts.es5?Ye.varKinds.var:Ye.varKinds.const;o=(0,Ke._)`${o}${d} ${c} = ${p};${this.opts._n}`}else if(p=i?.(c))o=(0,Ke._)`${o}${p}${this.opts._n}`;else throw new Hc(c);l.set(c,Ho.Completed)})}return o}};Ye.ValueScope=Wc});var Z=S(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.or=ne.and=ne.not=ne.CodeGen=ne.operators=ne.varKinds=ne.ValueScopeName=ne.ValueScope=ne.Scope=ne.Name=ne.regexpCode=ne.stringify=ne.getProperty=ne.nil=ne.strConcat=ne.str=ne._=void 0;var se=yi(),$t=Uc(),dn=yi();Object.defineProperty(ne,"_",{enumerable:!0,get:function(){return dn._}});Object.defineProperty(ne,"str",{enumerable:!0,get:function(){return dn.str}});Object.defineProperty(ne,"strConcat",{enumerable:!0,get:function(){return dn.strConcat}});Object.defineProperty(ne,"nil",{enumerable:!0,get:function(){return dn.nil}});Object.defineProperty(ne,"getProperty",{enumerable:!0,get:function(){return dn.getProperty}});Object.defineProperty(ne,"stringify",{enumerable:!0,get:function(){return dn.stringify}});Object.defineProperty(ne,"regexpCode",{enumerable:!0,get:function(){return dn.regexpCode}});Object.defineProperty(ne,"Name",{enumerable:!0,get:function(){return dn.Name}});var Ko=Uc();Object.defineProperty(ne,"Scope",{enumerable:!0,get:function(){return Ko.Scope}});Object.defineProperty(ne,"ValueScope",{enumerable:!0,get:function(){return Ko.ValueScope}});Object.defineProperty(ne,"ValueScopeName",{enumerable:!0,get:function(){return Ko.ValueScopeName}});Object.defineProperty(ne,"varKinds",{enumerable:!0,get:function(){return Ko.varKinds}});ne.operators={GT:new se._Code(">"),GTE:new se._Code(">="),LT:new se._Code("<"),LTE:new se._Code("<="),EQ:new se._Code("==="),NEQ:new se._Code("!=="),NOT:new se._Code("!"),OR:new se._Code("||"),AND:new se._Code("&&"),ADD:new se._Code("+")};var Ht=class{optimizeNodes(){return this}optimizeNames(e,n){return this}},zc=class extends Ht{constructor(e,n,r){super(),this.varKind=e,this.name=n,this.rhs=r}render({es5:e,_n:n}){let r=e?$t.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${i};`+n}optimizeNames(e,n){if(e[this.name.str])return this.rhs&&(this.rhs=ur(this.rhs,e,n)),this}get names(){return this.rhs instanceof se._CodeOrName?this.rhs.names:{}}},zo=class extends Ht{constructor(e,n,r){super(),this.lhs=e,this.rhs=n,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof se.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=ur(this.rhs,e,n),this}get names(){let e=this.lhs instanceof se.Name?{}:{...this.lhs.names};return Jo(e,this.rhs)}},Gc=class extends zo{constructor(e,n,r,i){super(e,r,i),this.op=n}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Jc=class extends Ht{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Kc=class extends Ht{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Yc=class extends Ht{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Xc=class extends Ht{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,n){return this.code=ur(this.code,e,n),this}get names(){return this.code instanceof se._CodeOrName?this.code.names:{}}},wi=class extends Ht{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((n,r)=>n+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,n=e.length;for(;n--;){let r=e[n].optimizeNodes();Array.isArray(r)?e.splice(n,1,...r):r?e[n]=r:e.splice(n,1)}return e.length>0?this:void 0}optimizeNames(e,n){let{nodes:r}=this,i=r.length;for(;i--;){let o=r[i];o.optimizeNames(e,n)||(Y0(e,o.names),r.splice(i,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,n)=>Rn(e,n.names),{})}},Wt=class extends wi{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Qc=class extends wi{},lr=class extends Wt{};lr.kind="else";var Pn=class t extends Wt{constructor(e,n){super(n),this.condition=e}render(e){let n=`if(${this.condition})`+super.render(e);return this.else&&(n+="else "+this.else.render(e)),n}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let n=this.else;if(n){let r=n.optimizeNodes();n=this.else=Array.isArray(r)?new lr(r):r}if(n)return e===!1?n instanceof t?n:n.nodes:this.nodes.length?this:new t(hh(e),n instanceof t?[n]:n.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,n){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,n),!!(super.optimizeNames(e,n)||this.else))return this.condition=ur(this.condition,e,n),this}get names(){let e=super.names;return Jo(e,this.condition),this.else&&Rn(e,this.else.names),e}};Pn.kind="if";var In=class extends Wt{};In.kind="for";var Zc=class extends In{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,n){if(super.optimizeNames(e,n))return this.iteration=ur(this.iteration,e,n),this}get names(){return Rn(super.names,this.iteration.names)}},el=class extends In{constructor(e,n,r,i){super(),this.varKind=e,this.name=n,this.from=r,this.to=i}render(e){let n=e.es5?$t.varKinds.var:this.varKind,{name:r,from:i,to:o}=this;return`for(${n} ${r}=${i}; ${r}<${o}; ${r}++)`+super.render(e)}get names(){let e=Jo(super.names,this.from);return Jo(e,this.to)}},Go=class extends In{constructor(e,n,r,i){super(),this.loop=e,this.varKind=n,this.name=r,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,n){if(super.optimizeNames(e,n))return this.iterable=ur(this.iterable,e,n),this}get names(){return Rn(super.names,this.iterable.names)}},vi=class extends Wt{constructor(e,n,r){super(),this.name=e,this.args=n,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};vi.kind="func";var bi=class extends wi{render(e){return"return "+super.render(e)}};bi.kind="return";var tl=class extends Wt{render(e){let n="try"+super.render(e);return this.catch&&(n+=this.catch.render(e)),this.finally&&(n+=this.finally.render(e)),n}optimizeNodes(){var e,n;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(n=this.finally)===null||n===void 0||n.optimizeNodes(),this}optimizeNames(e,n){var r,i;return super.optimizeNames(e,n),(r=this.catch)===null||r===void 0||r.optimizeNames(e,n),(i=this.finally)===null||i===void 0||i.optimizeNames(e,n),this}get names(){let e=super.names;return this.catch&&Rn(e,this.catch.names),this.finally&&Rn(e,this.finally.names),e}},_i=class extends Wt{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};_i.kind="catch";var xi=class extends Wt{render(e){return"finally"+super.render(e)}};xi.kind="finally";var nl=class{constructor(e,n={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...n,_n:n.lines?`
61
+ `:""},this._extScope=e,this._scope=new $t.Scope({parent:e}),this._nodes=[new Qc]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,n){let r=this._extScope.value(e,n);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,n){return this._extScope.getValue(e,n)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,n,r,i){let o=this._scope.toName(n);return r!==void 0&&i&&(this._constants[o.str]=r),this._leafNode(new zc(e,o,r)),o}const(e,n,r){return this._def($t.varKinds.const,e,n,r)}let(e,n,r){return this._def($t.varKinds.let,e,n,r)}var(e,n,r){return this._def($t.varKinds.var,e,n,r)}assign(e,n,r){return this._leafNode(new zo(e,n,r))}add(e,n){return this._leafNode(new Gc(e,ne.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==se.nil&&this._leafNode(new Xc(e)),this}object(...e){let n=["{"];for(let[r,i]of e)n.length>1&&n.push(","),n.push(r),(r!==i||this.opts.es5)&&(n.push(":"),(0,se.addCodeArg)(n,i));return n.push("}"),new se._Code(n)}if(e,n,r){if(this._blockNode(new Pn(e)),n&&r)this.code(n).else().code(r).endIf();else if(n)this.code(n).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Pn(e))}else(){return this._elseNode(new lr)}endIf(){return this._endBlockNode(Pn,lr)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new Zc(e),n)}forRange(e,n,r,i,o=this.opts.es5?$t.varKinds.var:$t.varKinds.let){let s=this._scope.toName(e);return this._for(new el(o,s,n,r),()=>i(s))}forOf(e,n,r,i=$t.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let s=n instanceof se.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,se._)`${s}.length`,a=>{this.var(o,(0,se._)`${s}[${a}]`),r(o)})}return this._for(new Go("of",i,o,n),()=>r(o))}forIn(e,n,r,i=this.opts.es5?$t.varKinds.var:$t.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,se._)`Object.keys(${n})`,r);let o=this._scope.toName(e);return this._for(new Go("in",i,o,n),()=>r(o))}endFor(){return this._endBlockNode(In)}label(e){return this._leafNode(new Jc(e))}break(e){return this._leafNode(new Kc(e))}return(e){let n=new bi;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(bi)}try(e,n,r){if(!n&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new tl;if(this._blockNode(i),this.code(e),n){let o=this.name("e");this._currNode=i.catch=new _i(o),n(o)}return r&&(this._currNode=i.finally=new xi,this.code(r)),this._endBlockNode(_i,xi)}throw(e){return this._leafNode(new Yc(e))}block(e,n){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(n),this}endBlock(e){let n=this._blockStarts.pop();if(n===void 0)throw new Error("CodeGen: not in self-balancing block");let r=this._nodes.length-n;if(r<0||e!==void 0&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=n,this}func(e,n=se.nil,r,i){return this._blockNode(new vi(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(vi)}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,n){let r=this._currNode;if(r instanceof e||n&&r instanceof n)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${n?`${e.kind}/${n.kind}`:e.kind}"`)}_elseNode(e){let n=this._currNode;if(!(n instanceof Pn))throw new Error('CodeGen: "else" without "if"');return this._currNode=n.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let n=this._nodes;n[n.length-1]=e}};ne.CodeGen=nl;function Rn(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function Jo(t,e){return e instanceof se._CodeOrName?Rn(t,e.names):t}function ur(t,e,n){if(t instanceof se.Name)return r(t);if(!i(t))return t;return new se._Code(t._items.reduce((o,s)=>(s instanceof se.Name&&(s=r(s)),s instanceof se._Code?o.push(...s._items):o.push(s),o),[]));function r(o){let s=n[o.str];return s===void 0||e[o.str]!==1?o:(delete e[o.str],s)}function i(o){return o instanceof se._Code&&o._items.some(s=>s instanceof se.Name&&e[s.str]===1&&n[s.str]!==void 0)}}function Y0(t,e){for(let n in e)t[n]=(t[n]||0)-(e[n]||0)}function hh(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,se._)`!${rl(t)}`}ne.not=hh;var X0=mh(ne.operators.AND);function Q0(...t){return t.reduce(X0)}ne.and=Q0;var Z0=mh(ne.operators.OR);function ex(...t){return t.reduce(Z0)}ne.or=ex;function mh(t){return(e,n)=>e===se.nil?n:n===se.nil?e:(0,se._)`${rl(e)} ${t} ${rl(n)}`}function rl(t){return t instanceof se.Name?t:(0,se._)`(${t})`}});var ie=S(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.checkStrictMode=re.getErrorPath=re.Type=re.useFunc=re.setEvaluated=re.evaluatedPropsToName=re.mergeEvaluated=re.eachItem=re.unescapeJsonPointer=re.escapeJsonPointer=re.escapeFragment=re.unescapeFragment=re.schemaRefOrVal=re.schemaHasRulesButRef=re.schemaHasRules=re.checkUnknownRules=re.alwaysValidSchema=re.toHash=void 0;var he=Z(),tx=yi();function nx(t){let e={};for(let n of t)e[n]=!0;return e}re.toHash=nx;function rx(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(wh(t,e),!vh(e,t.self.RULES.all))}re.alwaysValidSchema=rx;function wh(t,e=t.schema){let{opts:n,self:r}=t;if(!n.strictSchema||typeof e=="boolean")return;let i=r.RULES.keywords;for(let o in e)i[o]||xh(t,`unknown keyword: "${o}"`)}re.checkUnknownRules=wh;function vh(t,e){if(typeof t=="boolean")return!t;for(let n in t)if(e[n])return!0;return!1}re.schemaHasRules=vh;function ix(t,e){if(typeof t=="boolean")return!t;for(let n in t)if(n!=="$ref"&&e.all[n])return!0;return!1}re.schemaHasRulesButRef=ix;function ox({topSchemaRef:t,schemaPath:e},n,r,i){if(!i){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,he._)`${n}`}return(0,he._)`${t}${e}${(0,he.getProperty)(r)}`}re.schemaRefOrVal=ox;function sx(t){return bh(decodeURIComponent(t))}re.unescapeFragment=sx;function ax(t){return encodeURIComponent(ol(t))}re.escapeFragment=ax;function ol(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}re.escapeJsonPointer=ol;function bh(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}re.unescapeJsonPointer=bh;function cx(t,e){if(Array.isArray(t))for(let n of t)e(n);else e(t)}re.eachItem=cx;function gh({mergeNames:t,mergeToName:e,mergeValues:n,resultToName:r}){return(i,o,s,a)=>{let l=s===void 0?o:s instanceof he.Name?(o instanceof he.Name?t(i,o,s):e(i,o,s),s):o instanceof he.Name?(e(i,s,o),o):n(o,s);return a===he.Name&&!(l instanceof he.Name)?r(i,l):l}}re.mergeEvaluated={props:gh({mergeNames:(t,e,n)=>t.if((0,he._)`${n} !== true && ${e} !== undefined`,()=>{t.if((0,he._)`${e} === true`,()=>t.assign(n,!0),()=>t.assign(n,(0,he._)`${n} || {}`).code((0,he._)`Object.assign(${n}, ${e})`))}),mergeToName:(t,e,n)=>t.if((0,he._)`${n} !== true`,()=>{e===!0?t.assign(n,!0):(t.assign(n,(0,he._)`${n} || {}`),sl(t,n,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:_h}),items:gh({mergeNames:(t,e,n)=>t.if((0,he._)`${n} !== true && ${e} !== undefined`,()=>t.assign(n,(0,he._)`${e} === true ? true : ${n} > ${e} ? ${n} : ${e}`)),mergeToName:(t,e,n)=>t.if((0,he._)`${n} !== true`,()=>t.assign(n,e===!0?!0:(0,he._)`${n} > ${e} ? ${n} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function _h(t,e){if(e===!0)return t.var("props",!0);let n=t.var("props",(0,he._)`{}`);return e!==void 0&&sl(t,n,e),n}re.evaluatedPropsToName=_h;function sl(t,e,n){Object.keys(n).forEach(r=>t.assign((0,he._)`${e}${(0,he.getProperty)(r)}`,!0))}re.setEvaluated=sl;var yh={};function lx(t,e){return t.scopeValue("func",{ref:e,code:yh[e.code]||(yh[e.code]=new tx._Code(e.code))})}re.useFunc=lx;var il;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(il||(re.Type=il={}));function ux(t,e,n){if(t instanceof he.Name){let r=e===il.Num;return n?r?(0,he._)`"[" + ${t} + "]"`:(0,he._)`"['" + ${t} + "']"`:r?(0,he._)`"/" + ${t}`:(0,he._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,he.getProperty)(t).toString():"/"+ol(t)}re.getErrorPath=ux;function xh(t,e,n=t.opts.strictSchema){if(n){if(e=`strict mode: ${e}`,n===!0)throw new Error(e);t.self.logger.warn(e)}}re.checkStrictMode=xh});var ht=S(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});var Ve=Z(),px={data:new Ve.Name("data"),valCxt:new Ve.Name("valCxt"),instancePath:new Ve.Name("instancePath"),parentData:new Ve.Name("parentData"),parentDataProperty:new Ve.Name("parentDataProperty"),rootData:new Ve.Name("rootData"),dynamicAnchors:new Ve.Name("dynamicAnchors"),vErrors:new Ve.Name("vErrors"),errors:new Ve.Name("errors"),this:new Ve.Name("this"),self:new Ve.Name("self"),scope:new Ve.Name("scope"),json:new Ve.Name("json"),jsonPos:new Ve.Name("jsonPos"),jsonLen:new Ve.Name("jsonLen"),jsonPart:new Ve.Name("jsonPart")};al.default=px});var $i=S(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.extendErrors=Le.resetErrorsCount=Le.reportExtraError=Le.reportError=Le.keyword$DataError=Le.keywordError=void 0;var ae=Z(),Yo=ie(),Be=ht();Le.keywordError={message:({keyword:t})=>(0,ae.str)`must pass "${t}" keyword validation`};Le.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,ae.str)`"${t}" keyword must be ${e} ($data)`:(0,ae.str)`"${t}" keyword is invalid ($data)`};function dx(t,e=Le.keywordError,n,r){let{it:i}=t,{gen:o,compositeRule:s,allErrors:a}=i,l=Ch(t,e,n);r??(s||a)?$h(o,l):Sh(i,(0,ae._)`[${l}]`)}Le.reportError=dx;function fx(t,e=Le.keywordError,n){let{it:r}=t,{gen:i,compositeRule:o,allErrors:s}=r,a=Ch(t,e,n);$h(i,a),o||s||Sh(r,Be.default.vErrors)}Le.reportExtraError=fx;function hx(t,e){t.assign(Be.default.errors,e),t.if((0,ae._)`${Be.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,ae._)`${Be.default.vErrors}.length`,e),()=>t.assign(Be.default.vErrors,null)))}Le.resetErrorsCount=hx;function mx({gen:t,keyword:e,schemaValue:n,data:r,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let s=t.name("err");t.forRange("i",i,Be.default.errors,a=>{t.const(s,(0,ae._)`${Be.default.vErrors}[${a}]`),t.if((0,ae._)`${s}.instancePath === undefined`,()=>t.assign((0,ae._)`${s}.instancePath`,(0,ae.strConcat)(Be.default.instancePath,o.errorPath))),t.assign((0,ae._)`${s}.schemaPath`,(0,ae.str)`${o.errSchemaPath}/${e}`),o.opts.verbose&&(t.assign((0,ae._)`${s}.schema`,n),t.assign((0,ae._)`${s}.data`,r))})}Le.extendErrors=mx;function $h(t,e){let n=t.const("err",e);t.if((0,ae._)`${Be.default.vErrors} === null`,()=>t.assign(Be.default.vErrors,(0,ae._)`[${n}]`),(0,ae._)`${Be.default.vErrors}.push(${n})`),t.code((0,ae._)`${Be.default.errors}++`)}function Sh(t,e){let{gen:n,validateName:r,schemaEnv:i}=t;i.$async?n.throw((0,ae._)`new ${t.ValidationError}(${e})`):(n.assign((0,ae._)`${r}.errors`,e),n.return(!1))}var An={keyword:new ae.Name("keyword"),schemaPath:new ae.Name("schemaPath"),params:new ae.Name("params"),propertyName:new ae.Name("propertyName"),message:new ae.Name("message"),schema:new ae.Name("schema"),parentSchema:new ae.Name("parentSchema")};function Ch(t,e,n){let{createErrors:r}=t.it;return r===!1?(0,ae._)`{}`:gx(t,e,n)}function gx(t,e,n={}){let{gen:r,it:i}=t,o=[yx(i,n),wx(t,n)];return vx(t,e,o),r.object(...o)}function yx({errorPath:t},{instancePath:e}){let n=e?(0,ae.str)`${t}${(0,Yo.getErrorPath)(e,Yo.Type.Str)}`:t;return[Be.default.instancePath,(0,ae.strConcat)(Be.default.instancePath,n)]}function wx({keyword:t,it:{errSchemaPath:e}},{schemaPath:n,parentSchema:r}){let i=r?e:(0,ae.str)`${e}/${t}`;return n&&(i=(0,ae.str)`${i}${(0,Yo.getErrorPath)(n,Yo.Type.Str)}`),[An.schemaPath,i]}function vx(t,{params:e,message:n},r){let{keyword:i,data:o,schemaValue:s,it:a}=t,{opts:l,propertyName:c,topSchemaRef:p,schemaPath:d}=a;r.push([An.keyword,i],[An.params,typeof e=="function"?e(t):e||(0,ae._)`{}`]),l.messages&&r.push([An.message,typeof n=="function"?n(t):n]),l.verbose&&r.push([An.schema,s],[An.parentSchema,(0,ae._)`${p}${d}`],[Be.default.data,o]),c&&r.push([An.propertyName,c])}});var Eh=S(pr=>{"use strict";Object.defineProperty(pr,"__esModule",{value:!0});pr.boolOrEmptySchema=pr.topBoolOrEmptySchema=void 0;var bx=$i(),_x=Z(),xx=ht(),$x={message:"boolean schema is false"};function Sx(t){let{gen:e,schema:n,validateName:r}=t;n===!1?kh(t,!1):typeof n=="object"&&n.$async===!0?e.return(xx.default.data):(e.assign((0,_x._)`${r}.errors`,null),e.return(!0))}pr.topBoolOrEmptySchema=Sx;function Cx(t,e){let{gen:n,schema:r}=t;r===!1?(n.var(e,!1),kh(t)):n.var(e,!0)}pr.boolOrEmptySchema=Cx;function kh(t,e){let{gen:n,data:r}=t,i={gen:n,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,bx.reportError)(i,$x,void 0,e)}});var cl=S(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.getRules=dr.isJSONType=void 0;var kx=["string","number","integer","boolean","null","object","array"],Ex=new Set(kx);function Px(t){return typeof t=="string"&&Ex.has(t)}dr.isJSONType=Px;function Ix(){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:{}}}dr.getRules=Ix});var ll=S(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.shouldUseRule=fn.shouldUseGroup=fn.schemaHasRulesForType=void 0;function Rx({schema:t,self:e},n){let r=e.RULES.types[n];return r&&r!==!0&&Ph(t,r)}fn.schemaHasRulesForType=Rx;function Ph(t,e){return e.rules.some(n=>Ih(t,n))}fn.shouldUseGroup=Ph;function Ih(t,e){var n;return t[e.keyword]!==void 0||((n=e.definition.implements)===null||n===void 0?void 0:n.some(r=>t[r]!==void 0))}fn.shouldUseRule=Ih});var Si=S(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.reportTypeError=je.checkDataTypes=je.checkDataType=je.coerceAndCheckDataType=je.getJSONTypes=je.getSchemaTypes=je.DataType=void 0;var Ax=cl(),Tx=ll(),Ox=$i(),ee=Z(),Rh=ie(),fr;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(fr||(je.DataType=fr={}));function Nx(t){let e=Ah(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}je.getSchemaTypes=Nx;function Ah(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(Ax.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}je.getJSONTypes=Ah;function Mx(t,e){let{gen:n,data:r,opts:i}=t,o=Vx(e,i.coerceTypes),s=e.length>0&&!(o.length===0&&e.length===1&&(0,Tx.schemaHasRulesForType)(t,e[0]));if(s){let a=pl(e,r,i.strictNumbers,fr.Wrong);n.if(a,()=>{o.length?Lx(t,e,o):dl(t)})}return s}je.coerceAndCheckDataType=Mx;var Th=new Set(["string","number","integer","boolean","null"]);function Vx(t,e){return e?t.filter(n=>Th.has(n)||e==="array"&&n==="array"):[]}function Lx(t,e,n){let{gen:r,data:i,opts:o}=t,s=r.let("dataType",(0,ee._)`typeof ${i}`),a=r.let("coerced",(0,ee._)`undefined`);o.coerceTypes==="array"&&r.if((0,ee._)`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>r.assign(i,(0,ee._)`${i}[0]`).assign(s,(0,ee._)`typeof ${i}`).if(pl(e,i,o.strictNumbers),()=>r.assign(a,i))),r.if((0,ee._)`${a} !== undefined`);for(let c of n)(Th.has(c)||c==="array"&&o.coerceTypes==="array")&&l(c);r.else(),dl(t),r.endIf(),r.if((0,ee._)`${a} !== undefined`,()=>{r.assign(i,a),jx(t,a)});function l(c){switch(c){case"string":r.elseIf((0,ee._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,ee._)`"" + ${i}`).elseIf((0,ee._)`${i} === null`).assign(a,(0,ee._)`""`);return;case"number":r.elseIf((0,ee._)`${s} == "boolean" || ${i} === null
62
62
  || (${s} == "string" && ${i} && ${i} == +${i})`).assign(a,(0,ee._)`+${i}`);return;case"integer":r.elseIf((0,ee._)`${s} === "boolean" || ${i} === null
63
63
  || (${s} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(a,(0,ee._)`+${i}`);return;case"boolean":r.elseIf((0,ee._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(a,!1).elseIf((0,ee._)`${i} === "true" || ${i} === 1`).assign(a,!0);return;case"null":r.elseIf((0,ee._)`${i} === "" || ${i} === 0 || ${i} === false`),r.assign(a,null);return;case"array":r.elseIf((0,ee._)`${s} === "string" || ${s} === "number"
64
- || ${s} === "boolean" || ${i} === null`).assign(a,(0,ee._)`[${i}]`)}}}function Rx({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,ee._)`${e} !== undefined`,()=>t.assign((0,ee._)`${e}[${n}]`,r))}function rl(t,e,n,r=lr.Correct){let i=r===lr.Correct?ee.operators.EQ:ee.operators.NEQ,o;switch(t){case"null":return(0,ee._)`${e} ${i} null`;case"array":o=(0,ee._)`Array.isArray(${e})`;break;case"object":o=(0,ee._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=s((0,ee._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=s();break;default:return(0,ee._)`typeof ${e} ${i} ${t}`}return r===lr.Correct?o:(0,ee.not)(o);function s(a=ee.nil){return(0,ee.and)((0,ee._)`typeof ${e} == "number"`,a,n?(0,ee._)`isFinite(${e})`:ee.nil)}}je.checkDataType=rl;function il(t,e,n,r){if(t.length===1)return rl(t[0],e,n,r);let i,o=(0,Sh.toHash)(t);if(o.array&&o.object){let s=(0,ee._)`typeof ${e} != "object"`;i=o.null?s:(0,ee._)`!${e} || ${s}`,delete o.null,delete o.array,delete o.object}else i=ee.nil;o.number&&delete o.integer;for(let s in o)i=(0,ee.and)(i,rl(s,e,n,r));return i}je.checkDataTypes=il;var Ax={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,ee._)`{type: ${t}}`:(0,ee._)`{type: ${e}}`};function ol(t){let e=Tx(t);(0,Cx.reportError)(e,Ax)}je.reportTypeError=ol;function Tx(t){let{gen:e,data:n,schema:r}=t,i=(0,Sh.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:t}}});var Ph=S(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.assignDefaults=void 0;var ur=Z(),Ox=ie();function Nx(t,e){let{properties:n,items:r}=t.schema;if(e==="object"&&n)for(let i in n)Eh(t,i,n[i].default);else e==="array"&&Array.isArray(r)&&r.forEach((i,o)=>Eh(t,o,i.default))}Go.assignDefaults=Nx;function Eh(t,e,n){let{gen:r,compositeRule:i,data:o,opts:s}=t;if(n===void 0)return;let a=(0,ur._)`${o}${(0,ur.getProperty)(e)}`;if(i){(0,Ox.checkStrictMode)(t,`default is ignored for: ${a}`);return}let c=(0,ur._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,ur._)`${c} || ${a} === null || ${a} === ""`),r.if(c,(0,ur._)`${a} = ${(0,ur.stringify)(n)}`)}});var dt=S(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.validateUnion=fe.validateArray=fe.usePattern=fe.callValidateCode=fe.schemaProperties=fe.allSchemaProperties=fe.noPropertyInData=fe.propertyInData=fe.isOwnProperty=fe.hasPropFunc=fe.reportMissingProp=fe.checkMissingProp=fe.checkReportMissingProp=void 0;var we=Z(),sl=ie(),dn=pt(),Mx=ie();function Vx(t,e){let{gen:n,data:r,it:i}=t;n.if(cl(n,r,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,we._)`${e}`},!0),t.error()})}fe.checkReportMissingProp=Vx;function Lx({gen:t,data:e,it:{opts:n}},r,i){return(0,we.or)(...r.map(o=>(0,we.and)(cl(t,e,o,n.ownProperties),(0,we._)`${i} = ${o}`)))}fe.checkMissingProp=Lx;function jx(t,e){t.setParams({missingProperty:e},!0),t.error()}fe.reportMissingProp=jx;function Ih(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,we._)`Object.prototype.hasOwnProperty`})}fe.hasPropFunc=Ih;function al(t,e,n){return(0,we._)`${Ih(t)}.call(${e}, ${n})`}fe.isOwnProperty=al;function Dx(t,e,n,r){let i=(0,we._)`${e}${(0,we.getProperty)(n)} !== undefined`;return r?(0,we._)`${i} && ${al(t,e,n)}`:i}fe.propertyInData=Dx;function cl(t,e,n,r){let i=(0,we._)`${e}${(0,we.getProperty)(n)} === undefined`;return r?(0,we.or)(i,(0,we.not)(al(t,e,n))):i}fe.noPropertyInData=cl;function Rh(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}fe.allSchemaProperties=Rh;function Fx(t,e){return Rh(e).filter(n=>!(0,sl.alwaysValidSchema)(t,e[n]))}fe.schemaProperties=Fx;function qx({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:i,errorPath:o},it:s},a,c,l){let d=l?(0,we._)`${t}, ${e}, ${r}${i}`:e,p=[[dn.default.instancePath,(0,we.strConcat)(dn.default.instancePath,o)],[dn.default.parentData,s.parentData],[dn.default.parentDataProperty,s.parentDataProperty],[dn.default.rootData,dn.default.rootData]];s.opts.dynamicRef&&p.push([dn.default.dynamicAnchors,dn.default.dynamicAnchors]);let f=(0,we._)`${d}, ${n.object(...p)}`;return c!==we.nil?(0,we._)`${a}.call(${c}, ${f})`:(0,we._)`${a}(${f})`}fe.callValidateCode=qx;var Bx=(0,we._)`new RegExp`;function Hx({gen:t,it:{opts:e}},n){let r=e.unicodeRegExp?"u":"",{regExp:i}=e.code,o=i(n,r);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,we._)`${i.code==="new RegExp"?Bx:(0,Mx.useFunc)(t,i)}(${n}, ${r})`})}fe.usePattern=Hx;function Wx(t){let{gen:e,data:n,keyword:r,it:i}=t,o=e.name("valid");if(i.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(o,!0),s(()=>e.break()),o;function s(a){let c=e.const("len",(0,we._)`${n}.length`);e.forRange("i",0,c,l=>{t.subschema({keyword:r,dataProp:l,dataPropType:sl.Type.Num},o),e.if((0,we.not)(o),a)})}}fe.validateArray=Wx;function Ux(t){let{gen:e,schema:n,keyword:r,it:i}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(c=>(0,sl.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let s=e.let("valid",!1),a=e.name("_valid");e.block(()=>n.forEach((c,l)=>{let d=t.subschema({keyword:r,schemaProp:l,compositeRule:!0},a);e.assign(s,(0,we._)`${s} || ${a}`),t.mergeValidEvaluated(d,a)||e.if((0,we.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}fe.validateUnion=Ux});var Oh=S(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.validateKeywordUsage=Rt.validSchemaType=Rt.funcKeywordCode=Rt.macroKeywordCode=void 0;var He=Z(),In=pt(),zx=dt(),Gx=bi();function Jx(t,e){let{gen:n,keyword:r,schema:i,parentSchema:o,it:s}=t,a=e.macro.call(s.self,i,o,s),c=Th(n,r,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let l=n.name("valid");t.subschema({schema:a,schemaPath:He.nil,errSchemaPath:`${s.errSchemaPath}/${r}`,topSchemaRef:c,compositeRule:!0},l),t.pass(l,()=>t.error(!0))}Rt.macroKeywordCode=Jx;function Kx(t,e){var n;let{gen:r,keyword:i,schema:o,parentSchema:s,$data:a,it:c}=t;Xx(c,e);let l=!a&&e.compile?e.compile.call(c.self,o,s,c):e.validate,d=Th(r,i,l),p=r.let("valid");t.block$data(p,f),t.ok((n=e.valid)!==null&&n!==void 0?n:p);function f(){if(e.errors===!1)g(),e.modifying&&Ah(t),w(()=>t.error());else{let b=e.async?m():y();e.modifying&&Ah(t),w(()=>Yx(t,b))}}function m(){let b=r.let("ruleErrs",null);return r.try(()=>g((0,He._)`await `),P=>r.assign(p,!1).if((0,He._)`${P} instanceof ${c.ValidationError}`,()=>r.assign(b,(0,He._)`${P}.errors`),()=>r.throw(P))),b}function y(){let b=(0,He._)`${d}.errors`;return r.assign(b,null),g(He.nil),b}function g(b=e.async?(0,He._)`await `:He.nil){let P=c.opts.passContext?In.default.this:In.default.self,x=!("compile"in e&&!a||e.schema===!1);r.assign(p,(0,He._)`${b}${(0,zx.callValidateCode)(t,d,P,x)}`,e.modifying)}function w(b){var P;r.if((0,He.not)((P=e.valid)!==null&&P!==void 0?P:p),b)}}Rt.funcKeywordCode=Kx;function Ah(t){let{gen:e,data:n,it:r}=t;e.if(r.parentData,()=>e.assign(n,(0,He._)`${r.parentData}[${r.parentDataProperty}]`))}function Yx(t,e){let{gen:n}=t;n.if((0,He._)`Array.isArray(${e})`,()=>{n.assign(In.default.vErrors,(0,He._)`${In.default.vErrors} === null ? ${e} : ${In.default.vErrors}.concat(${e})`).assign(In.default.errors,(0,He._)`${In.default.vErrors}.length`),(0,Gx.extendErrors)(t)},()=>t.error())}function Xx({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function Th(t,e,n){if(n===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof n=="function"?{ref:n}:{ref:n,code:(0,He.stringify)(n)})}function Qx(t,e,n=!1){return!e.length||e.some(r=>r==="array"?Array.isArray(t):r==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==r||n&&typeof t>"u")}Rt.validSchemaType=Qx;function Zx({schema:t,opts:e,self:n,errSchemaPath:r},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");let s=i.dependencies;if(s?.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[o])){let c=`keyword "${o}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")n.logger.error(c);else throw new Error(c)}}Rt.validateKeywordUsage=Zx});var Mh=S(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.extendSubschemaMode=fn.extendSubschemaData=fn.getSubschema=void 0;var At=Z(),Nh=ie();function e$(t,{keyword:e,schemaProp:n,schema:r,schemaPath:i,errSchemaPath:o,topSchemaRef:s}){if(e!==void 0&&r!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let a=t.schema[e];return n===void 0?{schema:a,schemaPath:(0,At._)`${t.schemaPath}${(0,At.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[n],schemaPath:(0,At._)`${t.schemaPath}${(0,At.getProperty)(e)}${(0,At.getProperty)(n)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,Nh.escapeFragment)(n)}`}}if(r!==void 0){if(i===void 0||o===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:r,schemaPath:i,topSchemaRef:s,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}fn.getSubschema=e$;function t$(t,e,{dataProp:n,dataPropType:r,data:i,dataTypes:o,propertyName:s}){if(i!==void 0&&n!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(n!==void 0){let{errorPath:l,dataPathArr:d,opts:p}=e,f=a.let("data",(0,At._)`${e.data}${(0,At.getProperty)(n)}`,!0);c(f),t.errorPath=(0,At.str)`${l}${(0,Nh.getErrorPath)(n,r,p.jsPropertySyntax)}`,t.parentDataProperty=(0,At._)`${n}`,t.dataPathArr=[...d,t.parentDataProperty]}if(i!==void 0){let l=i instanceof At.Name?i:a.let("data",i,!0);c(l),s!==void 0&&(t.propertyName=s)}o&&(t.dataTypes=o);function c(l){t.data=l,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,l]}}fn.extendSubschemaData=t$;function n$(t,{jtdDiscriminator:e,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:o}){r!==void 0&&(t.compositeRule=r),i!==void 0&&(t.createErrors=i),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=n}fn.extendSubschemaMode=n$});var ll=S((pN,Vh)=>{"use strict";Vh.exports=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}});var jh=S((dN,Lh)=>{"use strict";var hn=Lh.exports=function(t,e,n){typeof e=="function"&&(n=e,e={}),n=e.cb||n;var r=typeof n=="function"?n:n.pre||function(){},i=n.post||function(){};Jo(e,r,i,t,"",t)};hn.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};hn.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};hn.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};hn.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 Jo(t,e,n,r,i,o,s,a,c,l){if(r&&typeof r=="object"&&!Array.isArray(r)){e(r,i,o,s,a,c,l);for(var d in r){var p=r[d];if(Array.isArray(p)){if(d in hn.arrayKeywords)for(var f=0;f<p.length;f++)Jo(t,e,n,p[f],i+"/"+d+"/"+f,o,i,d,r,f)}else if(d in hn.propsKeywords){if(p&&typeof p=="object")for(var m in p)Jo(t,e,n,p[m],i+"/"+d+"/"+r$(m),o,i,d,r,m)}else(d in hn.keywords||t.allKeys&&!(d in hn.skipKeywords))&&Jo(t,e,n,p,i+"/"+d,o,i,d,r)}n(r,i,o,s,a,c,l)}}function r$(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var xi=S(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.getSchemaRefs=Xe.resolveUrl=Xe.normalizeId=Xe._getFullPath=Xe.getFullPath=Xe.inlineRef=void 0;var i$=ie(),o$=ll(),s$=jh(),a$=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function c$(t,e=!0){return typeof t=="boolean"?!0:e===!0?!ul(t):e?Dh(t)<=e:!1}Xe.inlineRef=c$;var l$=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function ul(t){for(let e in t){if(l$.has(e))return!0;let n=t[e];if(Array.isArray(n)&&n.some(ul)||typeof n=="object"&&ul(n))return!0}return!1}function Dh(t){let e=0;for(let n in t){if(n==="$ref")return 1/0;if(e++,!a$.has(n)&&(typeof t[n]=="object"&&(0,i$.eachItem)(t[n],r=>e+=Dh(r)),e===1/0))return 1/0}return e}function Fh(t,e="",n){n!==!1&&(e=pr(e));let r=t.parse(e);return qh(t,r)}Xe.getFullPath=Fh;function qh(t,e){return t.serialize(e).split("#")[0]+"#"}Xe._getFullPath=qh;var u$=/#\/?$/;function pr(t){return t?t.replace(u$,""):""}Xe.normalizeId=pr;function p$(t,e,n){return n=pr(n),t.resolve(e,n)}Xe.resolveUrl=p$;var d$=/^[a-z_][-a-z0-9._]*$/i;function f$(t,e){if(typeof t=="boolean")return{};let{schemaId:n,uriResolver:r}=this.opts,i=pr(t[n]||e),o={"":i},s=Fh(r,i,!1),a={},c=new Set;return s$(t,{allKeys:!0},(p,f,m,y)=>{if(y===void 0)return;let g=s+f,w=o[y];typeof p[n]=="string"&&(w=b.call(this,p[n])),P.call(this,p.$anchor),P.call(this,p.$dynamicAnchor),o[f]=w;function b(x){let R=this.opts.uriResolver.resolve;if(x=pr(w?R(w,x):x),c.has(x))throw d(x);c.add(x);let O=this.refs[x];return typeof O=="string"&&(O=this.refs[O]),typeof O=="object"?l(p,O.schema,x):x!==pr(g)&&(x[0]==="#"?(l(p,a[x],x),a[x]=p):this.refs[x]=g),x}function P(x){if(typeof x=="string"){if(!d$.test(x))throw new Error(`invalid anchor "${x}"`);b.call(this,`#${x}`)}}}),a;function l(p,f,m){if(f!==void 0&&!o$(p,f))throw d(m)}function d(p){return new Error(`reference "${p}" resolves to more than one schema`)}}Xe.getSchemaRefs=f$});var Ci=S(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.getData=mn.KeywordCxt=mn.validateFunctionCode=void 0;var zh=_h(),Bh=_i(),dl=nl(),Ko=_i(),h$=Ph(),Si=Oh(),pl=Mh(),W=Z(),X=pt(),m$=xi(),Wt=ie(),$i=bi();function g$(t){if(Kh(t)&&(Yh(t),Jh(t))){v$(t);return}Gh(t,()=>(0,zh.topBoolOrEmptySchema)(t))}mn.validateFunctionCode=g$;function Gh({gen:t,validateName:e,schema:n,schemaEnv:r,opts:i},o){i.code.es5?t.func(e,(0,W._)`${X.default.data}, ${X.default.valCxt}`,r.$async,()=>{t.code((0,W._)`"use strict"; ${Hh(n,i)}`),w$(t,i),t.code(o)}):t.func(e,(0,W._)`${X.default.data}, ${y$(i)}`,r.$async,()=>t.code(Hh(n,i)).code(o))}function y$(t){return(0,W._)`{${X.default.instancePath}="", ${X.default.parentData}, ${X.default.parentDataProperty}, ${X.default.rootData}=${X.default.data}${t.dynamicRef?(0,W._)`, ${X.default.dynamicAnchors}={}`:W.nil}}={}`}function w$(t,e){t.if(X.default.valCxt,()=>{t.var(X.default.instancePath,(0,W._)`${X.default.valCxt}.${X.default.instancePath}`),t.var(X.default.parentData,(0,W._)`${X.default.valCxt}.${X.default.parentData}`),t.var(X.default.parentDataProperty,(0,W._)`${X.default.valCxt}.${X.default.parentDataProperty}`),t.var(X.default.rootData,(0,W._)`${X.default.valCxt}.${X.default.rootData}`),e.dynamicRef&&t.var(X.default.dynamicAnchors,(0,W._)`${X.default.valCxt}.${X.default.dynamicAnchors}`)},()=>{t.var(X.default.instancePath,(0,W._)`""`),t.var(X.default.parentData,(0,W._)`undefined`),t.var(X.default.parentDataProperty,(0,W._)`undefined`),t.var(X.default.rootData,X.default.data),e.dynamicRef&&t.var(X.default.dynamicAnchors,(0,W._)`{}`)})}function v$(t){let{schema:e,opts:n,gen:r}=t;Gh(t,()=>{n.$comment&&e.$comment&&Qh(t),S$(t),r.let(X.default.vErrors,null),r.let(X.default.errors,0),n.unevaluated&&b$(t),Xh(t),E$(t)})}function b$(t){let{gen:e,validateName:n}=t;t.evaluated=e.const("evaluated",(0,W._)`${n}.evaluated`),e.if((0,W._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,W._)`${t.evaluated}.props`,(0,W._)`undefined`)),e.if((0,W._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,W._)`${t.evaluated}.items`,(0,W._)`undefined`))}function Hh(t,e){let n=typeof t=="object"&&t[e.schemaId];return n&&(e.code.source||e.code.process)?(0,W._)`/*# sourceURL=${n} */`:W.nil}function _$(t,e){if(Kh(t)&&(Yh(t),Jh(t))){x$(t,e);return}(0,zh.boolOrEmptySchema)(t,e)}function Jh({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let n in t)if(e.RULES.all[n])return!0;return!1}function Kh(t){return typeof t.schema!="boolean"}function x$(t,e){let{schema:n,gen:r,opts:i}=t;i.$comment&&n.$comment&&Qh(t),C$(t),k$(t);let o=r.const("_errs",X.default.errors);Xh(t,o),r.var(e,(0,W._)`${o} === ${X.default.errors}`)}function Yh(t){(0,Wt.checkUnknownRules)(t),$$(t)}function Xh(t,e){if(t.opts.jtd)return Wh(t,[],!1,e);let n=(0,Bh.getSchemaTypes)(t.schema),r=(0,Bh.coerceAndCheckDataType)(t,n);Wh(t,n,!r,e)}function $$(t){let{schema:e,errSchemaPath:n,opts:r,self:i}=t;e.$ref&&r.ignoreKeywordsWithRef&&(0,Wt.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function S$(t){let{schema:e,opts:n}=t;e.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,Wt.checkStrictMode)(t,"default is ignored in the schema root")}function C$(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,m$.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function k$(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Qh({gen:t,schemaEnv:e,schema:n,errSchemaPath:r,opts:i}){let o=n.$comment;if(i.$comment===!0)t.code((0,W._)`${X.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let s=(0,W.str)`${r}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,W._)`${X.default.self}.opts.$comment(${o}, ${s}, ${a}.schema)`)}}function E$(t){let{gen:e,schemaEnv:n,validateName:r,ValidationError:i,opts:o}=t;n.$async?e.if((0,W._)`${X.default.errors} === 0`,()=>e.return(X.default.data),()=>e.throw((0,W._)`new ${i}(${X.default.vErrors})`)):(e.assign((0,W._)`${r}.errors`,X.default.vErrors),o.unevaluated&&P$(t),e.return((0,W._)`${X.default.errors} === 0`))}function P$({gen:t,evaluated:e,props:n,items:r}){n instanceof W.Name&&t.assign((0,W._)`${e}.props`,n),r instanceof W.Name&&t.assign((0,W._)`${e}.items`,r)}function Wh(t,e,n,r){let{gen:i,schema:o,data:s,allErrors:a,opts:c,self:l}=t,{RULES:d}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,Wt.schemaHasRulesButRef)(o,d))){i.block(()=>em(t,"$ref",d.all.$ref.definition));return}c.jtd||I$(t,e),i.block(()=>{for(let f of d.rules)p(f);p(d.post)});function p(f){(0,dl.shouldUseGroup)(o,f)&&(f.type?(i.if((0,Ko.checkDataType)(f.type,s,c.strictNumbers)),Uh(t,f),e.length===1&&e[0]===f.type&&n&&(i.else(),(0,Ko.reportTypeError)(t)),i.endIf()):Uh(t,f),a||i.if((0,W._)`${X.default.errors} === ${r||0}`))}}function Uh(t,e){let{gen:n,schema:r,opts:{useDefaults:i}}=t;i&&(0,h$.assignDefaults)(t,e.type),n.block(()=>{for(let o of e.rules)(0,dl.shouldUseRule)(r,o)&&em(t,o.keyword,o.definition,e.type)})}function I$(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(R$(t,e),t.opts.allowUnionTypes||A$(t,e),T$(t,t.dataTypes))}function R$(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(n=>{Zh(t.dataTypes,n)||fl(t,`type "${n}" not allowed by context "${t.dataTypes.join(",")}"`)}),N$(t,e)}}function A$(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&fl(t,"use allowUnionTypes to allow union type keyword")}function T$(t,e){let n=t.self.RULES.all;for(let r in n){let i=n[r];if(typeof i=="object"&&(0,dl.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(s=>O$(e,s))&&fl(t,`missing type "${o.join(",")}" for keyword "${r}"`)}}}function O$(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Zh(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function N$(t,e){let n=[];for(let r of t.dataTypes)Zh(e,r)?n.push(r):e.includes("integer")&&r==="number"&&n.push("integer");t.dataTypes=n}function fl(t,e){let n=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${n}" (strictTypes)`,(0,Wt.checkStrictMode)(t,e,t.opts.strictTypes)}var Yo=class{constructor(e,n,r){if((0,Si.validateKeywordUsage)(e,n,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=n.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Wt.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=n.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=n,this.$data)this.schemaCode=e.gen.const("vSchema",tm(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Si.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(n.schemaType)}`);("code"in n?n.trackErrors:n.errors!==!1)&&(this.errsCount=e.gen.const("_errs",X.default.errors))}result(e,n,r){this.failResult((0,W.not)(e),n,r)}failResult(e,n,r){this.gen.if(e),r?r():this.error(),n?(this.gen.else(),n(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,n){this.failResult((0,W.not)(e),void 0,n)}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:n}=this;this.fail((0,W._)`${n} !== undefined && (${(0,W.or)(this.invalid$data(),e)})`)}error(e,n,r){if(n){this.setParams(n),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,n){(e?$i.reportExtraError:$i.reportError)(this,this.def.error,n)}$dataError(){(0,$i.reportError)(this,this.def.$dataError||$i.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,$i.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,n){n?Object.assign(this.params,e):this.params=e}block$data(e,n,r=W.nil){this.gen.block(()=>{this.check$data(e,r),n()})}check$data(e=W.nil,n=W.nil){if(!this.$data)return;let{gen:r,schemaCode:i,schemaType:o,def:s}=this;r.if((0,W.or)((0,W._)`${i} === undefined`,n)),e!==W.nil&&r.assign(e,!0),(o.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==W.nil&&r.assign(e,!1)),r.else()}invalid$data(){let{gen:e,schemaCode:n,schemaType:r,def:i,it:o}=this;return(0,W.or)(s(),a());function s(){if(r.length){if(!(n instanceof W.Name))throw new Error("ajv implementation error");let c=Array.isArray(r)?r:[r];return(0,W._)`${(0,Ko.checkDataTypes)(c,n,o.opts.strictNumbers,Ko.DataType.Wrong)}`}return W.nil}function a(){if(i.validateSchema){let c=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,W._)`!${c}(${n})`}return W.nil}}subschema(e,n){let r=(0,pl.getSubschema)(this.it,e);(0,pl.extendSubschemaData)(r,this.it,e),(0,pl.extendSubschemaMode)(r,e);let i={...this.it,...r,items:void 0,props:void 0};return _$(i,n),i}mergeEvaluated(e,n){let{it:r,gen:i}=this;r.opts.unevaluated&&(r.props!==!0&&e.props!==void 0&&(r.props=Wt.mergeEvaluated.props(i,e.props,r.props,n)),r.items!==!0&&e.items!==void 0&&(r.items=Wt.mergeEvaluated.items(i,e.items,r.items,n)))}mergeValidEvaluated(e,n){let{it:r,gen:i}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return i.if(n,()=>this.mergeEvaluated(e,W.Name)),!0}};mn.KeywordCxt=Yo;function em(t,e,n,r){let i=new Yo(t,n,e);"code"in n?n.code(i,r):i.$data&&n.validate?(0,Si.funcKeywordCode)(i,n):"macro"in n?(0,Si.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,Si.funcKeywordCode)(i,n)}var M$=/^\/(?:[^~]|~0|~1)*$/,V$=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function tm(t,{dataLevel:e,dataNames:n,dataPathArr:r}){let i,o;if(t==="")return X.default.rootData;if(t[0]==="/"){if(!M$.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=X.default.rootData}else{let l=V$.exec(t);if(!l)throw new Error(`Invalid JSON-pointer: ${t}`);let d=+l[1];if(i=l[2],i==="#"){if(d>=e)throw new Error(c("property/index",d));return r[e-d]}if(d>e)throw new Error(c("data",d));if(o=n[e-d],!i)return o}let s=o,a=i.split("/");for(let l of a)l&&(o=(0,W._)`${o}${(0,W.getProperty)((0,Wt.unescapeJsonPointer)(l))}`,s=(0,W._)`${s} && ${o}`);return s;function c(l,d){return`Cannot access ${l} ${d} levels up, current level is ${e}`}}mn.getData=tm});var Xo=S(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});var hl=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};ml.default=hl});var ki=S(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});var gl=xi(),yl=class extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,gl.resolveUrl)(e,n,r),this.missingSchema=(0,gl.normalizeId)((0,gl.getFullPath)(e,this.missingRef))}};wl.default=yl});var Ei=S(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.resolveSchema=ft.getCompilingSchema=ft.resolveRef=ft.compileSchema=ft.SchemaEnv=void 0;var xt=Z(),L$=Xo(),Rn=pt(),$t=xi(),nm=ie(),j$=Ci(),dr=class{constructor(e){var n;this.refs={},this.dynamicAnchors={};let r;typeof e.schema=="object"&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(n=e.baseId)!==null&&n!==void 0?n:(0,$t.normalizeId)(r?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=r?.$async,this.refs={}}};ft.SchemaEnv=dr;function bl(t){let e=rm.call(this,t);if(e)return e;let n=(0,$t.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:r,lines:i}=this.opts.code,{ownProperties:o}=this.opts,s=new xt.CodeGen(this.scope,{es5:r,lines:i,ownProperties:o}),a;t.$async&&(a=s.scopeValue("Error",{ref:L$.default,code:(0,xt._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");t.validateName=c;let l={gen:s,allErrors:this.opts.allErrors,data:Rn.default.data,parentData:Rn.default.parentData,parentDataProperty:Rn.default.parentDataProperty,dataNames:[Rn.default.data],dataPathArr:[xt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,xt.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:n,baseId:t.baseId||n,schemaPath:xt.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,xt._)`""`,opts:this.opts,self:this},d;try{this._compilations.add(t),(0,j$.validateFunctionCode)(l),s.optimize(this.opts.code.optimize);let p=s.toString();d=`${s.scopeRefs(Rn.default.scope)}return ${p}`,this.opts.code.process&&(d=this.opts.code.process(d,t));let m=new Function(`${Rn.default.self}`,`${Rn.default.scope}`,d)(this,this.scope.get());if(this.scope.value(c,{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:c,validateCode:p,scopeValues:s._values}),this.opts.unevaluated){let{props:y,items:g}=l;m.evaluated={props:y instanceof xt.Name?void 0:y,items:g instanceof xt.Name?void 0:g,dynamicProps:y instanceof xt.Name,dynamicItems:g instanceof xt.Name},m.source&&(m.source.evaluated=(0,xt.stringify)(m.evaluated))}return t.validate=m,t}catch(p){throw delete t.validate,delete t.validateName,d&&this.logger.error("Error compiling schema, function code:",d),p}finally{this._compilations.delete(t)}}ft.compileSchema=bl;function D$(t,e,n){var r;n=(0,$t.resolveUrl)(this.opts.uriResolver,e,n);let i=t.refs[n];if(i)return i;let o=B$.call(this,t,n);if(o===void 0){let s=(r=t.localRefs)===null||r===void 0?void 0:r[n],{schemaId:a}=this.opts;s&&(o=new dr({schema:s,schemaId:a,root:t,baseId:e}))}if(o!==void 0)return t.refs[n]=F$.call(this,o)}ft.resolveRef=D$;function F$(t){return(0,$t.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:bl.call(this,t)}function rm(t){for(let e of this._compilations)if(q$(e,t))return e}ft.getCompilingSchema=rm;function q$(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function B$(t,e){let n;for(;typeof(n=this.refs[e])=="string";)e=n;return n||this.schemas[e]||Qo.call(this,t,e)}function Qo(t,e){let n=this.opts.uriResolver.parse(e),r=(0,$t._getFullPath)(this.opts.uriResolver,n),i=(0,$t.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&r===i)return vl.call(this,n,t);let o=(0,$t.normalizeId)(r),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){let a=Qo.call(this,t,s);return typeof a?.schema!="object"?void 0:vl.call(this,n,a)}if(typeof s?.schema=="object"){if(s.validate||bl.call(this,s),o===(0,$t.normalizeId)(e)){let{schema:a}=s,{schemaId:c}=this.opts,l=a[c];return l&&(i=(0,$t.resolveUrl)(this.opts.uriResolver,i,l)),new dr({schema:a,schemaId:c,root:t,baseId:i})}return vl.call(this,n,s)}}ft.resolveSchema=Qo;var H$=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function vl(t,{baseId:e,schema:n,root:r}){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 n=="boolean")return;let c=n[(0,nm.unescapeFragment)(a)];if(c===void 0)return;n=c;let l=typeof n=="object"&&n[this.opts.schemaId];!H$.has(a)&&l&&(e=(0,$t.resolveUrl)(this.opts.uriResolver,e,l))}let o;if(typeof n!="boolean"&&n.$ref&&!(0,nm.schemaHasRulesButRef)(n,this.RULES)){let a=(0,$t.resolveUrl)(this.opts.uriResolver,e,n.$ref);o=Qo.call(this,r,a)}let{schemaId:s}=this.opts;if(o=o||new dr({schema:n,schemaId:s,root:r,baseId:e}),o.schema!==o.root.schema)return o}});var im=S((wN,W$)=>{W$.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 kl=S((vN,pm)=>{"use strict";var U$=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),xl=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),z$=RegExp.prototype.test.bind(/^\d*$/u),An=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),$l=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),sm=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),Sl=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),G$=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),Qe=new Array(256);{let t="0123456789ABCDEF";for(let e=0;e<256;e++)Qe[e]="%"+t[e>>4]+t[e&15]}function De(t){return t<2048?Qe[192|t>>6]+Qe[128|t&63]:t<65536?Qe[224|t>>12]+Qe[128|t>>6&63]+Qe[128|t&63]:Qe[240|t>>18]+Qe[128|t>>12&63]+Qe[128|t>>6&63]+Qe[128|t&63]}function J$(t){let e="",n=0,r=0;for(r=0;r<t.length;r++)if(n=t[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";e+=t[r];break}for(r+=1;r<t.length;r++){if(n=t[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";e+=t[r]}return e}var K$=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),Y$=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),X$=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),Q$=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Z$(t){if(t.length===0)return!1;for(let e=0;e<t.length;e++)if(!X$(t[e])){if(t[e]==="%"&&e+2<t.length&&An(t.slice(e+1,e+3))){e+=2;continue}return!1}return!0}function om(t){let e=-1,n=0,r=-1,i=0;for(let a=0;a<t.length;a++)t[a]==="0"?(r===-1&&(r=a),i++,i>n&&(n=i,e=r)):(r=-1,i=0);if(n<2)return t.join(":");let o=t.slice(0,e).join(":"),s=t.slice(e+n).join(":");return o+"::"+s}function e1(t){let e=t.indexOf("::");if(e!==-1&&t.indexOf("::",e+1)!==-1)return;let n=e===-1?t.split(":"):t.slice(0,e).split(":"),r=e===-1?[]:t.slice(e+2).split(":");e!==-1&&(n.length===1&&n[0]===""&&(n.length=0),r.length===1&&r[0]===""&&(r.length=0));let i=n.concat(r),o=0;for(let a=0;a<i.length;a++){let c=i[a];if(c==="")return;if(c.indexOf(".")!==-1){if(a!==i.length-1||e!==-1&&r.length===0||!xl(c))return;o+=2;continue}if(!K$(c))return;i[a]=parseInt(c,16).toString(16),o++}if(e===-1)return o!==8?void 0:om(i);if(o>=8)return;let s=i.slice(0,n.length);for(let a=o;a<8;a++)s.push("0");for(let a=n.length;a<i.length;a++)s.push(i[a]);return om(s)}function _l(t){let e=t[0]==="["&&t[t.length-1]==="]";if((t[0]==="["||t[t.length-1]==="]")&&!e)return{host:t,isIPV6:!1,error:!0};let r=e?t.slice(1,-1):t;if(e&&Y$(r))return r=r.toLowerCase(),{host:`[${r}]`,escapedHost:r,isIPV6:!1,isIPVFuture:!0};if(t1(r,":")<2)return{host:t,isIPV6:!1,error:e};let i="",o=r.indexOf("%");if(o!==-1){let a=r.slice(o,o+3).toLowerCase()==="%25"?3:1;if(i=r.slice(o+a),!Z$(i))return{host:t,isIPV6:!1,error:!0};r=r.slice(0,o)}let s=e1(r);return s===void 0?{host:t,isIPV6:!1,error:!0}:{host:s+(i?"%"+i:""),escapedHost:s+(i?"%25"+i:""),isIPV6:!0}}function t1(t,e){let n=0;for(let r=0;r<t.length;r++)t[r]===e&&n++;return n}function n1(t){let e=t,n=[],r=-1,i=0;for(;i=e.length;){if(i===1){if(e===".")break;if(e==="/"){n.push("/");break}else{n.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]==="/")){n.push("/");break}}else if(i===3&&e==="/.."){n.length!==0&&n.pop(),n.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),n.length!==0&&n.pop();continue}}if((r=e.indexOf("/",1))===-1){n.push(e);break}else n.push(e.slice(0,r)),e=e.slice(r)}return n.join("")}var r1={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},i1=/[@/?#:]/g,o1=/[@/?#]/g;function am(t,e){let n=e?o1:i1;return n.lastIndex=0,t.replace(n,r=>r1[r])}function cm(t,e=!1){if(t.indexOf("%")===-1)return t;let n="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let i=t.slice(r+1,r+3);if(An(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));e&&$l(s)?n+=s:n+="%"+o,r+=2;continue}}n+=t[r]}return n}function s1(t){let e="";for(let n=0;n<t.length;n++){let r=t[n];if(r==="%"&&n+2<t.length){let i=t.slice(n+1,n+3);if(An(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));s!=="."&&$l(s)?e+=s:e+="%"+o,n+=2;continue}}if(sm(r))e+=r;else{let i=t.charCodeAt(n);if(i<128)e+=um(i)?r:Qe[i];else if(i<55296||i>57343)e+=De(i);else if(i<=56319&&n+1<t.length){let o=t.charCodeAt(n+1);o>=56320&&o<=57343?(e+=De(65536+(i-55296<<10)+(o-56320)),n++):e+=De(65533)}else e+=De(65533)}}return e}function a1(t,e=!1){let n="",r=e&&t[0]!=="/";for(let i=0;i<t.length;i++){let o=t[i];if(o==="%"&&i+2<t.length){let s=t.slice(i+1,i+3);if(An(s)){n+="%"+s.toUpperCase(),i+=2;continue}}if(o==="/"&&(r=!1),sm(o)&&(o!==":"||!r))n+=o;else{let s=t.charCodeAt(i);if(s<128)n+=Qe[s];else if(s<55296||s>57343)n+=De(s);else if(s<=56319&&i+1<t.length){let a=t.charCodeAt(i+1);a>=56320&&a<=57343?(n+=De(65536+(s-55296<<10)+(a-56320)),i++):n+=De(65533)}else n+=De(65533)}}return n}function Cl(t,e){let n="";for(let r=0;r<t.length;r++){let i=t[r];if(i==="%"&&r+2<t.length){let o=t.slice(r+1,r+3);if(An(o)){n+="%"+o.toUpperCase(),r+=2;continue}}if(e(i))n+=i;else{let o=t.charCodeAt(r);if(o<128)n+=Qe[o];else if(o<55296||o>57343)n+=De(o);else if(o<=56319&&r+1<t.length){let s=t.charCodeAt(r+1);s>=56320&&s<=57343?(n+=De(65536+(o-55296<<10)+(s-56320)),r++):n+=De(65533)}else n+=De(65533)}}return n}function lm(t){return Cl(t,G$)}function c1(t){return Cl(t,Sl)}function l1(t){return Cl(t,Sl)}function um(t){return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===42||t===43||t===45||t===46||t===47||t===64||t===95}function u1(t){let e="";for(let n=0;n<t.length;n++){let r=t[n];if(r==="%"&&n+2<t.length){let i=t.slice(n+1,n+3);if(An(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));$l(s)?e+=s:e+="%"+o,n+=2;continue}}if(Sl(r))e+=r;else{let i=t.charCodeAt(n);if(i<128)e+=um(i)?r:Qe[i];else if(i<55296||i>57343)e+=De(i);else if(i<=56319&&n+1<t.length){let o=t.charCodeAt(n+1);o>=56320&&o<=57343?(e+=De(65536+(i-55296<<10)+(o-56320)),n++):e+=De(65533)}else e+=De(65533)}}return e}function p1(t){let e="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){let r=t.slice(n+1,n+3);if(An(r)){e+="%"+r.toUpperCase(),n+=2;continue}}e+=escape(t[n])}return e}function d1(t){let e=[];if(t.userinfo!==void 0&&(e.push(lm(t.userinfo)),e.push("@")),t.host!==void 0){let n=t.host;if(!xl(n)){let r=_l(n);r.isIPV6!==!0&&r.isIPVFuture!==!0&&(n=cm(n,!0),r=_l(n)),r.isIPV6===!0||r.isIPVFuture===!0?n=`[${r.escapedHost}]`:n=am(n,!1)}e.push(n)}if(typeof t.port=="number"||typeof t.port=="string"){let n=String(t.port);if(!z$(n))throw new TypeError("URI port is malformed.");e.push(":"),e.push(n)}return e.length?e.join(""):void 0}pm.exports={nonSimpleDomain:Q$,recomposeAuthority:d1,reescapeHostDelimiters:am,normalizePercentEncoding:cm,normalizePathEncoding:s1,serializePathEncoding:a1,normalizeQueryFragmentEncoding:u1,encodeUserinfo:lm,encodeQuery:c1,encodeFragment:l1,escapePreservingEscapes:p1,removeDotSegments:n1,isIPv4:xl,isUUID:U$,normalizeIPv6:_l,stringArrayToHexStripped:J$}});var gm=S((bN,mm)=>{"use strict";var{isUUID:f1}=kl(),h1=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,m1=["http","https","ws","wss","urn","urn:uuid"];function g1(t){return m1.indexOf(t)!==-1}function El(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 dm(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function fm(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 y1(t){return t.secure=El(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function w1(t){if((t.port===(El(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=t.resourceName.indexOf("?"),n=e===-1?t.resourceName:t.resourceName.slice(0,e);t.path=n&&n!=="/"?n:void 0,t.query=e===-1?void 0:t.resourceName.slice(e+1),t.resourceName=void 0}return t.fragment=void 0,t}function v1(t,e){if(!t.path)return t.error="URN can not be parsed",t;let n=t.path.match(h1);if(n&&n[0]===t.path){let r=e.scheme||t.scheme||"urn";t.nid=n[1].toLowerCase(),t.nss=n[2];let i=`${r}:${e.nid||t.nid}`,o=Pl(i);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function b1(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let n=e.scheme||t.scheme||"urn",r=t.nid.toLowerCase(),i=`${n}:${e.nid||r}`,o=Pl(i);o&&(t=o.serialize(t,e));let s=t,a=t.nss;return s.path=`${r||e.nid}:${a}`,e.skipEscape=!0,s}function _1(t,e){let n=t;return n.uuid=n.nss,n.nss=void 0,!e.tolerant&&(!n.uuid||!f1(n.uuid))&&(n.error=n.error||"UUID is not valid."),n}function x1(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var hm={scheme:"http",domainHost:!0,parse:dm,serialize:fm},$1={scheme:"https",domainHost:hm.domainHost,parse:dm,serialize:fm},Zo={scheme:"ws",domainHost:!0,parse:y1,serialize:w1},S1={scheme:"wss",domainHost:Zo.domainHost,parse:Zo.parse,serialize:Zo.serialize},C1={scheme:"urn",parse:v1,serialize:b1,skipNormalize:!0},k1={scheme:"urn:uuid",parse:_1,serialize:x1,skipNormalize:!0},es={http:hm,https:$1,ws:Zo,wss:S1,urn:C1,"urn:uuid":k1};Object.setPrototypeOf(es,null);function Pl(t){return t&&(es[t]||es[t.toLowerCase()])||void 0}mm.exports={wsIsSecure:El,SCHEMES:es,isValidSchemeName:g1,getSchemeHandler:Pl}});var Rm=S((_N,rs)=>{"use strict";var{normalizeIPv6:_m,removeDotSegments:Ii,recomposeAuthority:E1,normalizePercentEncoding:xm,normalizePathEncoding:P1,serializePathEncoding:ym,normalizeQueryFragmentEncoding:wm,encodeQuery:I1,encodeFragment:R1,reescapeHostDelimiters:A1,isIPv4:$m,nonSimpleDomain:T1}=kl(),{SCHEMES:Sm,getSchemeHandler:Il}=gm(),Cm=/^[A-Za-z][A-Za-z0-9+.-]*$/u,km="URI scheme is malformed.";function vm(t){let e=unescape(String(t));if(!Cm.test(e))throw new TypeError(km);return e}function O1(t,e){return typeof t=="string"?t=q1(t,e):typeof t=="object"&&(t=ns(Tn(t,e),e)),t}function N1(t,e,n){let r=n?Object.assign({scheme:"null"},n):{scheme:"null"},{parsed:i,malformedAuthorityOrPort:o,malformedPercentEncoding:s,malformedSchemeSpecific:a,malformedHost:c,malformedScheme:l}=ts(t,r),{parsed:d,malformedAuthorityOrPort:p,malformedPercentEncoding:f,malformedSchemeSpecific:m,malformedHost:y,malformedScheme:g}=ts(e,r);if(o||p||s||f||a||m||c||y||l||g)throw new Error(i.error||d.error||"URI is malformed.");let w=Em(i,d,r,!0),b=Il(n&&n.scheme||w.scheme),P=w.host,x=P!==void 0&&P!==""&&($m(P)||_m(P).isIPV6);Pm(w,n||{},b,x);let R=P&&P.indexOf("%")!==-1&&!new RegExp("\\P{ASCII}","u").test(P);if(w.error&&!R)throw new Error(w.error);return r.skipEscape=!0,Tn(w,r)}function Em(t,e,n,r){let i={};return r||(t=ns(Tn(t,n),n),e=ns(Tn(e,n),n)),n=n||{},!n.tolerant&&e.scheme?(i.scheme=e.scheme,i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=Ii(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=Ii(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=Ii(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=Ii(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 M1(t,e,n){let r=bm(t,n),i=bm(e,n);return r!==void 0&&i!==void 0&&r===i}function Tn(t,e){let n={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:""},r=Object.assign({},e),i=[];n.scheme&&(n.scheme=vm(n.scheme));let o=Il(r.scheme||n.scheme);o&&o.serialize&&o.serialize(n,r);let s=n.userinfo!==void 0||n.host!==void 0||n.port!==void 0,a=!r.skipEscape&&n.scheme===void 0&&!s;n.path!==void 0&&(r.skipEscape?n.path=xm(n.path):n.path=ym(n.path,a)),r.reference!=="suffix"&&n.scheme&&(n.scheme=vm(n.scheme),i.push(n.scheme,":"));let c=E1(n);if(c!==void 0&&(r.reference!=="suffix"&&i.push("//"),i.push(c),n.path&&n.path[0]!=="/"&&i.push("/")),n.path!==void 0){let l=n.path;!r.absolutePath&&(!o||!o.absolutePath)&&(l=Ii(l)),a&&(l=ym(l,!0)),c===void 0&&l[0]==="/"&&l[1]==="/"&&(l="/%2F"+l.slice(2)),i.push(l)}return n.query!==void 0&&i.push("?",I1(n.query)),n.fragment!==void 0&&i.push("#",R1(n.fragment)),i.join("")}var V1=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,L1=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,j1=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function D1(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 Pi(t){if(t===void 0)return!1;let e=t.indexOf("%");for(;e!==-1;){if(e+2>=t.length||!/^[\da-f]{2}$/iu.test(t.slice(e+1,e+3)))return!0;e=t.indexOf("%",e+3)}return!1}function Rl(t){return t[0]==="["&&t[t.length-1]==="]"}function F1(t){let e=t[4];return Pi(t[3])||e!==void 0&&!Rl(e)&&Pi(e)||Pi(t[6])||Pi(t[7])||Pi(t[8])}function Pm(t,e,n,r){if(!e.unicodeSupport&&(!n||!n.unicodeSupport)&&t.host&&!Rl(t.host)&&(e.domainHost||n&&n.domainHost)&&r===!1&&T1(t.host))try{t.host=new URL("http://"+t.host).hostname}catch(i){return t.error=t.error||"Host's domain name can not be converted to ASCII: "+i,!0}return!1}function ts(t,e){let n=Object.assign({},e),r={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1,o=!1,s=!1,a=!1,c=!1,l=!1,d=!1;n.reference==="suffix"&&(n.scheme?t=n.scheme+":"+t:t="//"+t);let p=t.match(L1);p!==null&&p[1].indexOf("\\")!==-1&&(r.error="URI authority must not contain a literal backslash.",i=!0);let f=t.match(j1);if(f!==null){let y=f[1],g=y.replace(/[\t\n\r]/g,"");g.length>=2&&(g.slice(0,2)!=="//"?(r.error=r.error||"URI authority must not contain a literal backslash.",i=!0):y.length!==g.length&&(r.error=r.error||"URI authority introducer must not contain whitespace.",i=!0))}let m=t.match(V1);if(m){if(r.scheme=m[1],r.userinfo=m[3],r.host=m[4],r.port=parseInt(m[5],10),r.path=m[6]||"",r.query=m[7],r.fragment=m[8],r.scheme!==void 0){let w=unescape(r.scheme);Cm.test(w)?r.scheme=w.toLowerCase():(r.error=r.error||km,l=!0)}o=F1(m),o&&(r.error=r.error||"URI contains malformed percent-encoding."),isNaN(r.port)&&(r.port=m[5]);let y=D1(r,m);if(y!==void 0&&(r.error=r.error||y,i=!0),r.host)if($m(r.host)===!1){let b=Rl(r.host),P=r.host.indexOf("[")!==-1||r.host.indexOf("]")!==-1,x=_m(r.host);d=x.isIPV6||x.isIPVFuture===!0,c=P&&(!b||x.error===!0),r.host=d?x.host:x.host.toLowerCase(),c&&(r.error=r.error||"URI host is malformed.",i=!0)}else d=!0;r.scheme===void 0&&r.userinfo===void 0&&r.host===void 0&&r.port===void 0&&r.query===void 0&&!r.path?r.reference="same-document":r.scheme===void 0?r.reference="relative":r.fragment===void 0?r.reference="absolute":r.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==r.reference&&(r.error=r.error||"URI is not a "+n.reference+" reference.");let g=Il(n.scheme||r.scheme);if(c||(a=Pm(r,n,g,d)),!g||g&&!g.skipNormalize){if(t.indexOf("%")!==-1&&r.host!==void 0&&!c){let w=d?r.host:xm(r.host,!0);r.host=A1(w,d)}r.path&&(r.path=P1(r.path)),r.query&&(r.query=wm(r.query)),r.fragment&&(r.fragment=wm(r.fragment))}g&&g.parse&&(g.parse(r,n),g===Sm.urn&&r.nid===void 0&&(s=!0))}else r.error=r.error||"URI can not be parsed.";return{parsed:r,malformedAuthorityOrPort:i,malformedPercentEncoding:o,malformedSchemeSpecific:s,malformedHost:a,malformedScheme:l}}function ns(t,e){return ts(t,e).parsed}function q1(t,e){return Im(t,e).normalized}function Im(t,e){let{parsed:n,malformedAuthorityOrPort:r,malformedPercentEncoding:i,malformedSchemeSpecific:o,malformedHost:s,malformedScheme:a}=ts(t,e);return{normalized:r||i||o||s||a?t:Tn(n,e),malformedAuthorityOrPort:r,malformedPercentEncoding:i,malformedSchemeSpecific:o,malformedHost:s,malformedScheme:a}}function bm(t,e){if(typeof t!="string"&&typeof t!="object")return;let n;try{n=typeof t=="string"?t:Tn(t,e)}catch{return}let{normalized:r,malformedAuthorityOrPort:i,malformedPercentEncoding:o,malformedSchemeSpecific:s,malformedHost:a,malformedScheme:c}=Im(n,e);return i||o||s||a||c?void 0:r}var Al={SCHEMES:Sm,normalize:O1,resolve:N1,resolveComponent:Em,equal:M1,serialize:Tn,parse:ns};rs.exports=Al;rs.exports.default=Al;rs.exports.fastUri=Al});var Tm=S(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});var Am=Rm();Am.code='require("ajv/dist/runtime/uri").default';Tl.default=Am});var Fm=S(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.CodeGen=Ae.Name=Ae.nil=Ae.stringify=Ae.str=Ae._=Ae.KeywordCxt=void 0;var B1=Ci();Object.defineProperty(Ae,"KeywordCxt",{enumerable:!0,get:function(){return B1.KeywordCxt}});var fr=Z();Object.defineProperty(Ae,"_",{enumerable:!0,get:function(){return fr._}});Object.defineProperty(Ae,"str",{enumerable:!0,get:function(){return fr.str}});Object.defineProperty(Ae,"stringify",{enumerable:!0,get:function(){return fr.stringify}});Object.defineProperty(Ae,"nil",{enumerable:!0,get:function(){return fr.nil}});Object.defineProperty(Ae,"Name",{enumerable:!0,get:function(){return fr.Name}});Object.defineProperty(Ae,"CodeGen",{enumerable:!0,get:function(){return fr.CodeGen}});var H1=Xo(),Lm=ki(),W1=tl(),Ri=Ei(),U1=Z(),Ai=xi(),is=_i(),Nl=ie(),Om=im(),z1=Tm(),jm=(t,e)=>new RegExp(t,e);jm.code="new RegExp";var G1=["removeAdditional","useDefaults","coerceTypes"],J1=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),K1={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."},Y1={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Nm=200;function X1(t){var e,n,r,i,o,s,a,c,l,d,p,f,m,y,g,w,b,P,x,R,O,j,U,oe,ge;let xe=t.strict,Re=(e=t.code)===null||e===void 0?void 0:e.optimize,_e=Re===!0||Re===void 0?1:Re||0,Ge=(r=(n=t.code)===null||n===void 0?void 0:n.regExp)!==null&&r!==void 0?r:jm,de=(i=t.uriResolver)!==null&&i!==void 0?i:z1.default;return{strictSchema:(s=(o=t.strictSchema)!==null&&o!==void 0?o:xe)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=t.strictNumbers)!==null&&a!==void 0?a:xe)!==null&&c!==void 0?c:!0,strictTypes:(d=(l=t.strictTypes)!==null&&l!==void 0?l:xe)!==null&&d!==void 0?d:"log",strictTuples:(f=(p=t.strictTuples)!==null&&p!==void 0?p:xe)!==null&&f!==void 0?f:"log",strictRequired:(y=(m=t.strictRequired)!==null&&m!==void 0?m:xe)!==null&&y!==void 0?y:!1,code:t.code?{...t.code,optimize:_e,regExp:Ge}:{optimize:_e,regExp:Ge},loopRequired:(g=t.loopRequired)!==null&&g!==void 0?g:Nm,loopEnum:(w=t.loopEnum)!==null&&w!==void 0?w:Nm,meta:(b=t.meta)!==null&&b!==void 0?b:!0,messages:(P=t.messages)!==null&&P!==void 0?P:!0,inlineRefs:(x=t.inlineRefs)!==null&&x!==void 0?x:!0,schemaId:(R=t.schemaId)!==null&&R!==void 0?R:"$id",addUsedSchema:(O=t.addUsedSchema)!==null&&O!==void 0?O:!0,validateSchema:(j=t.validateSchema)!==null&&j!==void 0?j:!0,validateFormats:(U=t.validateFormats)!==null&&U!==void 0?U:!0,unicodeRegExp:(oe=t.unicodeRegExp)!==null&&oe!==void 0?oe:!0,int32range:(ge=t.int32range)!==null&&ge!==void 0?ge:!0,uriResolver:de}}var Ti=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,...X1(e)};let{es5:n,lines:r}=this.opts.code;this.scope=new U1.ValueScope({scope:{},prefixes:J1,es5:n,lines:r}),this.logger=rS(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,W1.getRules)(),Mm.call(this,K1,e,"NOT SUPPORTED"),Mm.call(this,Y1,e,"DEPRECATED","warn"),this._metaOpts=tS.call(this),e.formats&&Z1.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&eS.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),Q1.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:n,schemaId:r}=this.opts,i=Om;r==="id"&&(i={...Om},i.id=i.$id,delete i.$id),n&&e&&this.addMetaSchema(i,i[r],!1)}defaultMeta(){let{meta:e,schemaId:n}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[n]||e:void 0}validate(e,n){let r;if(typeof e=="string"){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let i=r(n);return"$async"in r||(this.errors=r.errors),i}compile(e,n){let r=this._addSchema(e,n);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,n){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return i.call(this,e,n);async function i(d,p){await o.call(this,d.$schema);let f=this._addSchema(d,p);return f.validate||s.call(this,f)}async function o(d){d&&!this.getSchema(d)&&await i.call(this,{$ref:d},!0)}async function s(d){try{return this._compileSchemaEnv(d)}catch(p){if(!(p instanceof Lm.default))throw p;return a.call(this,p),await c.call(this,p.missingSchema),s.call(this,d)}}function a({missingSchema:d,missingRef:p}){if(this.refs[d])throw new Error(`AnySchema ${d} is loaded but ${p} cannot be resolved`)}async function c(d){let p=await l.call(this,d);this.refs[d]||await o.call(this,p.$schema),this.refs[d]||this.addSchema(p,d,n)}async function l(d){let p=this._loading[d];if(p)return p;try{return await(this._loading[d]=r(d))}finally{delete this._loading[d]}}}addSchema(e,n,r,i=this.opts.validateSchema){if(Array.isArray(e)){for(let s of e)this.addSchema(s,void 0,r,i);return this}let o;if(typeof e=="object"){let{schemaId:s}=this.opts;if(o=e[s],o!==void 0&&typeof o!="string")throw new Error(`schema ${s} must be string`)}return n=(0,Ai.normalizeId)(n||o),this._checkUnique(n),this.schemas[n]=this._addSchema(e,r,n,i,!0),this}addMetaSchema(e,n,r=this.opts.validateSchema){return this.addSchema(e,n,!0,r),this}validateSchema(e,n){if(typeof e=="boolean")return!0;let r;if(r=e.$schema,r!==void 0&&typeof r!="string")throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(r,e);if(!i&&n){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return i}getSchema(e){let n;for(;typeof(n=Vm.call(this,e))=="string";)e=n;if(n===void 0){let{schemaId:r}=this.opts,i=new Ri.SchemaEnv({schema:{},schemaId:r});if(n=Ri.resolveSchema.call(this,i,e),!n)return;this.refs[e]=n}return n.validate||this._compileSchemaEnv(n)}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 n=Vm.call(this,e);return typeof n=="object"&&this._cache.delete(n.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let n=e;this._cache.delete(n);let r=e[this.opts.schemaId];return r&&(r=(0,Ai.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let n of e)this.addKeyword(n);return this}addKeyword(e,n){let r;if(typeof e=="string")r=e,typeof n=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),n.keyword=r);else if(typeof e=="object"&&n===void 0){if(n=e,r=n.keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(oS.call(this,r,n),!n)return(0,Nl.eachItem)(r,o=>Ol.call(this,o)),this;aS.call(this,n);let i={...n,type:(0,is.getJSONTypes)(n.type),schemaType:(0,is.getJSONTypes)(n.schemaType)};return(0,Nl.eachItem)(r,i.type.length===0?o=>Ol.call(this,o,i):o=>i.type.forEach(s=>Ol.call(this,o,i,s))),this}getKeyword(e){let n=this.RULES.all[e];return typeof n=="object"?n.definition:!!n}removeKeyword(e){let{RULES:n}=this;delete n.keywords[e],delete n.all[e];for(let r of n.rules){let i=r.rules.findIndex(o=>o.keyword===e);i>=0&&r.rules.splice(i,1)}return this}addFormat(e,n){return typeof n=="string"&&(n=new RegExp(n)),this.formats[e]=n,this}errorsText(e=this.errors,{separator:n=", ",dataVar:r="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${r}${i.instancePath} ${i.message}`).reduce((i,o)=>i+n+o)}$dataMetaSchema(e,n){let r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of n){let o=i.split("/").slice(1),s=e;for(let a of o)s=s[a];for(let a in r){let c=r[a];if(typeof c!="object")continue;let{$data:l}=c.definition,d=s[a];l&&d&&(s[a]=Dm(d))}}return e}_removeAllSchemas(e,n){for(let r in e){let i=e[r];(!n||n.test(r))&&(typeof i=="string"?delete e[r]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[r]))}}_addSchema(e,n,r,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof e=="object")s=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 c=this._cache.get(e);if(c!==void 0)return c;r=(0,Ai.normalizeId)(s||r);let l=Ai.getSchemaRefs.call(this,e,r);return c=new Ri.SchemaEnv({schema:e,schemaId:a,meta:n,baseId:r,localRefs:l}),this._cache.set(c.schema,c),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=c),i&&this.validateSchema(e,!0),c}_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):Ri.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let n=this.opts;this.opts=this._metaOpts;try{Ri.compileSchema.call(this,e)}finally{this.opts=n}}};Ti.ValidationError=H1.default;Ti.MissingRefError=Lm.default;Ae.default=Ti;function Mm(t,e,n,r="error"){for(let i in t){let o=i;o in e&&this.logger[r](`${n}: option ${i}. ${t[o]}`)}}function Vm(t){return t=(0,Ai.normalizeId)(t),this.schemas[t]||this.refs[t]}function Q1(){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 Z1(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function eS(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 n=t[e];n.keyword||(n.keyword=e),this.addKeyword(n)}}function tS(){let t={...this.opts};for(let e of G1)delete t[e];return t}var nS={log(){},warn(){},error(){}};function rS(t){if(t===!1)return nS;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 iS=/^[a-z_$][a-z0-9_$:-]*$/i;function oS(t,e){let{RULES:n}=this;if((0,Nl.eachItem)(t,r=>{if(n.keywords[r])throw new Error(`Keyword ${r} is already defined`);if(!iS.test(r))throw new Error(`Keyword ${r} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function Ol(t,e,n){var r;let i=e?.post;if(n&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,s=i?o.post:o.rules.find(({type:c})=>c===n);if(s||(s={type:n,rules:[]},o.rules.push(s)),o.keywords[t]=!0,!e)return;let a={keyword:t,definition:{...e,type:(0,is.getJSONTypes)(e.type),schemaType:(0,is.getJSONTypes)(e.schemaType)}};e.before?sS.call(this,s,a,e.before):s.rules.push(a),o.all[t]=a,(r=e.implements)===null||r===void 0||r.forEach(c=>this.addKeyword(c))}function sS(t,e,n){let r=t.rules.findIndex(i=>i.keyword===n);r>=0?t.rules.splice(r,0,e):(t.rules.push(e),this.logger.warn(`rule ${n} is not defined`))}function aS(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=Dm(e)),t.validateSchema=this.compile(e,!0))}var cS={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Dm(t){return{anyOf:[t,cS]}}});var qm=S(Ml=>{"use strict";Object.defineProperty(Ml,"__esModule",{value:!0});var lS={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Ml.default=lS});var as=S(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.callRef=On.getValidate=void 0;var uS=ki(),Bm=dt(),Ze=Z(),hr=pt(),Hm=Ei(),os=ie(),pS={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:n,it:r}=t,{baseId:i,schemaEnv:o,validateName:s,opts:a,self:c}=r,{root:l}=o;if((n==="#"||n==="#/")&&i===l.baseId)return p();let d=Hm.resolveRef.call(c,l,i,n);if(d===void 0)throw new uS.default(r.opts.uriResolver,i,n);if(d instanceof Hm.SchemaEnv)return f(d);return m(d);function p(){if(o===l)return ss(t,s,o,o.$async);let y=e.scopeValue("root",{ref:l});return ss(t,(0,Ze._)`${y}.validate`,l,l.$async)}function f(y){let g=Wm(t,y);ss(t,g,y,y.$async)}function m(y){let g=e.scopeValue("schema",a.code.source===!0?{ref:y,code:(0,Ze.stringify)(y)}:{ref:y}),w=e.name("valid"),b=t.subschema({schema:y,dataTypes:[],schemaPath:Ze.nil,topSchemaRef:g,errSchemaPath:n},w);t.mergeEvaluated(b),t.ok(w)}}};function Wm(t,e){let{gen:n}=t;return e.validate?n.scopeValue("validate",{ref:e.validate}):(0,Ze._)`${n.scopeValue("wrapper",{ref:e})}.validate`}On.getValidate=Wm;function ss(t,e,n,r){let{gen:i,it:o}=t,{allErrors:s,schemaEnv:a,opts:c}=o,l=c.passContext?hr.default.this:Ze.nil;r?d():p();function d(){if(!a.$async)throw new Error("async schema referenced by sync schema");let y=i.let("valid");i.try(()=>{i.code((0,Ze._)`await ${(0,Bm.callValidateCode)(t,e,l)}`),m(e),s||i.assign(y,!0)},g=>{i.if((0,Ze._)`!(${g} instanceof ${o.ValidationError})`,()=>i.throw(g)),f(g),s||i.assign(y,!1)}),t.ok(y)}function p(){t.result((0,Bm.callValidateCode)(t,e,l),()=>m(e),()=>f(e))}function f(y){let g=(0,Ze._)`${y}.errors`;i.assign(hr.default.vErrors,(0,Ze._)`${hr.default.vErrors} === null ? ${g} : ${hr.default.vErrors}.concat(${g})`),i.assign(hr.default.errors,(0,Ze._)`${hr.default.vErrors}.length`)}function m(y){var g;if(!o.opts.unevaluated)return;let w=(g=n?.validate)===null||g===void 0?void 0:g.evaluated;if(o.props!==!0)if(w&&!w.dynamicProps)w.props!==void 0&&(o.props=os.mergeEvaluated.props(i,w.props,o.props));else{let b=i.var("props",(0,Ze._)`${y}.evaluated.props`);o.props=os.mergeEvaluated.props(i,b,o.props,Ze.Name)}if(o.items!==!0)if(w&&!w.dynamicItems)w.items!==void 0&&(o.items=os.mergeEvaluated.items(i,w.items,o.items));else{let b=i.var("items",(0,Ze._)`${y}.evaluated.items`);o.items=os.mergeEvaluated.items(i,b,o.items,Ze.Name)}}}On.callRef=ss;On.default=pS});var Um=S(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});var dS=qm(),fS=as(),hS=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",dS.default,fS.default];Vl.default=hS});var zm=S(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});var cs=Z(),gn=cs.operators,ls={maximum:{okStr:"<=",ok:gn.LTE,fail:gn.GT},minimum:{okStr:">=",ok:gn.GTE,fail:gn.LT},exclusiveMaximum:{okStr:"<",ok:gn.LT,fail:gn.GTE},exclusiveMinimum:{okStr:">",ok:gn.GT,fail:gn.LTE}},mS={message:({keyword:t,schemaCode:e})=>(0,cs.str)`must be ${ls[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,cs._)`{comparison: ${ls[t].okStr}, limit: ${e}}`},gS={keyword:Object.keys(ls),type:"number",schemaType:"number",$data:!0,error:mS,code(t){let{keyword:e,data:n,schemaCode:r}=t;t.fail$data((0,cs._)`${n} ${ls[e].fail} ${r} || isNaN(${n})`)}};Ll.default=gS});var Gm=S(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});var Oi=Z(),yS={message:({schemaCode:t})=>(0,Oi.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Oi._)`{multipleOf: ${t}}`},wS={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:yS,code(t){let{gen:e,data:n,schemaCode:r,it:i}=t,o=i.opts.multipleOfPrecision,s=e.let("res"),a=o?(0,Oi._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,Oi._)`${s} !== parseInt(${s})`;t.fail$data((0,Oi._)`(${r} === 0 || (${s} = ${n}/${r}, ${a}))`)}};jl.default=wS});var Km=S(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});function Jm(t){let e=t.length,n=0,r=0,i;for(;r<e;)n++,i=t.charCodeAt(r++),i>=55296&&i<=56319&&r<e&&(i=t.charCodeAt(r),(i&64512)===56320&&r++);return n}Dl.default=Jm;Jm.code='require("ajv/dist/runtime/ucs2length").default'});var Ym=S(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});var Nn=Z(),vS=ie(),bS=Km(),_S={message({keyword:t,schemaCode:e}){let n=t==="maxLength"?"more":"fewer";return(0,Nn.str)`must NOT have ${n} than ${e} characters`},params:({schemaCode:t})=>(0,Nn._)`{limit: ${t}}`},xS={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:_S,code(t){let{keyword:e,data:n,schemaCode:r,it:i}=t,o=e==="maxLength"?Nn.operators.GT:Nn.operators.LT,s=i.opts.unicode===!1?(0,Nn._)`${n}.length`:(0,Nn._)`${(0,vS.useFunc)(t.gen,bS.default)}(${n})`;t.fail$data((0,Nn._)`${s} ${o} ${r}`)}};Fl.default=xS});var Xm=S(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});var $S=dt(),SS=ie(),mr=Z(),CS={message:({schemaCode:t})=>(0,mr.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,mr._)`{pattern: ${t}}`},kS={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:CS,code(t){let{gen:e,data:n,$data:r,schema:i,schemaCode:o,it:s}=t,a=s.opts.unicodeRegExp?"u":"";if(r){let{regExp:c}=s.opts.code,l=c.code==="new RegExp"?(0,mr._)`new RegExp`:(0,SS.useFunc)(e,c),d=e.let("valid");e.try(()=>e.assign(d,(0,mr._)`${l}(${o}, ${a}).test(${n})`),()=>e.assign(d,!1)),t.fail$data((0,mr._)`!${d}`)}else{let c=(0,$S.usePattern)(t,i);t.fail$data((0,mr._)`!${c}.test(${n})`)}}};ql.default=kS});var Qm=S(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});var Ni=Z(),ES={message({keyword:t,schemaCode:e}){let n=t==="maxProperties"?"more":"fewer";return(0,Ni.str)`must NOT have ${n} than ${e} properties`},params:({schemaCode:t})=>(0,Ni._)`{limit: ${t}}`},PS={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:ES,code(t){let{keyword:e,data:n,schemaCode:r}=t,i=e==="maxProperties"?Ni.operators.GT:Ni.operators.LT;t.fail$data((0,Ni._)`Object.keys(${n}).length ${i} ${r}`)}};Bl.default=PS});var Zm=S(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});var Mi=dt(),Vi=Z(),IS=ie(),RS={message:({params:{missingProperty:t}})=>(0,Vi.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Vi._)`{missingProperty: ${t}}`},AS={keyword:"required",type:"object",schemaType:"array",$data:!0,error:RS,code(t){let{gen:e,schema:n,schemaCode:r,data:i,$data:o,it:s}=t,{opts:a}=s;if(!o&&n.length===0)return;let c=n.length>=a.loopRequired;if(s.allErrors?l():d(),a.strictRequired){let m=t.parentSchema.properties,{definedProperties:y}=t.it;for(let g of n)if(m?.[g]===void 0&&!y.has(g)){let w=s.schemaEnv.baseId+s.errSchemaPath,b=`required property "${g}" is not defined at "${w}" (strictRequired)`;(0,IS.checkStrictMode)(s,b,s.opts.strictRequired)}}function l(){if(c||o)t.block$data(Vi.nil,p);else for(let m of n)(0,Mi.checkReportMissingProp)(t,m)}function d(){let m=e.let("missing");if(c||o){let y=e.let("valid",!0);t.block$data(y,()=>f(m,y)),t.ok(y)}else e.if((0,Mi.checkMissingProp)(t,n,m)),(0,Mi.reportMissingProp)(t,m),e.else()}function p(){e.forOf("prop",r,m=>{t.setParams({missingProperty:m}),e.if((0,Mi.noPropertyInData)(e,i,m,a.ownProperties),()=>t.error())})}function f(m,y){t.setParams({missingProperty:m}),e.forOf(m,r,()=>{e.assign(y,(0,Mi.propertyInData)(e,i,m,a.ownProperties)),e.if((0,Vi.not)(y),()=>{t.error(),e.break()})},Vi.nil)}}};Hl.default=AS});var eg=S(Wl=>{"use strict";Object.defineProperty(Wl,"__esModule",{value:!0});var Li=Z(),TS={message({keyword:t,schemaCode:e}){let n=t==="maxItems"?"more":"fewer";return(0,Li.str)`must NOT have ${n} than ${e} items`},params:({schemaCode:t})=>(0,Li._)`{limit: ${t}}`},OS={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:TS,code(t){let{keyword:e,data:n,schemaCode:r}=t,i=e==="maxItems"?Li.operators.GT:Li.operators.LT;t.fail$data((0,Li._)`${n}.length ${i} ${r}`)}};Wl.default=OS});var us=S(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});var tg=ll();tg.code='require("ajv/dist/runtime/equal").default';Ul.default=tg});var ng=S(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});var zl=_i(),Te=Z(),NS=ie(),MS=us(),VS={message:({params:{i:t,j:e}})=>(0,Te.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Te._)`{i: ${t}, j: ${e}}`},LS={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:VS,code(t){let{gen:e,data:n,$data:r,schema:i,parentSchema:o,schemaCode:s,it:a}=t;if(!r&&!i)return;let c=e.let("valid"),l=o.items?(0,zl.getSchemaTypes)(o.items):[];t.block$data(c,d,(0,Te._)`${s} === false`),t.ok(c);function d(){let y=e.let("i",(0,Te._)`${n}.length`),g=e.let("j");t.setParams({i:y,j:g}),e.assign(c,!0),e.if((0,Te._)`${y} > 1`,()=>(p()?f:m)(y,g))}function p(){return l.length>0&&!l.some(y=>y==="object"||y==="array")}function f(y,g){let w=e.name("item"),b=(0,zl.checkDataTypes)(l,w,a.opts.strictNumbers,zl.DataType.Wrong),P=e.const("indices",(0,Te._)`{}`);e.for((0,Te._)`;${y}--;`,()=>{e.let(w,(0,Te._)`${n}[${y}]`),e.if(b,(0,Te._)`continue`),l.length>1&&e.if((0,Te._)`typeof ${w} == "string"`,(0,Te._)`${w} += "_"`),e.if((0,Te._)`typeof ${P}[${w}] == "number"`,()=>{e.assign(g,(0,Te._)`${P}[${w}]`),t.error(),e.assign(c,!1).break()}).code((0,Te._)`${P}[${w}] = ${y}`)})}function m(y,g){let w=(0,NS.useFunc)(e,MS.default),b=e.name("outer");e.label(b).for((0,Te._)`;${y}--;`,()=>e.for((0,Te._)`${g} = ${y}; ${g}--;`,()=>e.if((0,Te._)`${w}(${n}[${y}], ${n}[${g}])`,()=>{t.error(),e.assign(c,!1).break(b)})))}}};Gl.default=LS});var rg=S(Kl=>{"use strict";Object.defineProperty(Kl,"__esModule",{value:!0});var Jl=Z(),jS=ie(),DS=us(),FS={message:"must be equal to constant",params:({schemaCode:t})=>(0,Jl._)`{allowedValue: ${t}}`},qS={keyword:"const",$data:!0,error:FS,code(t){let{gen:e,data:n,$data:r,schemaCode:i,schema:o}=t;r||o&&typeof o=="object"?t.fail$data((0,Jl._)`!${(0,jS.useFunc)(e,DS.default)}(${n}, ${i})`):t.fail((0,Jl._)`${o} !== ${n}`)}};Kl.default=qS});var ig=S(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});var ji=Z(),BS=ie(),HS=us(),WS={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,ji._)`{allowedValues: ${t}}`},US={keyword:"enum",schemaType:"array",$data:!0,error:WS,code(t){let{gen:e,data:n,$data:r,schema:i,schemaCode:o,it:s}=t;if(!r&&i.length===0)throw new Error("enum must have non-empty array");let a=i.length>=s.opts.loopEnum,c,l=()=>c??(c=(0,BS.useFunc)(e,HS.default)),d;if(a||r)d=e.let("valid"),t.block$data(d,p);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=e.const("vSchema",o);d=(0,ji.or)(...i.map((y,g)=>f(m,g)))}t.pass(d);function p(){e.assign(d,!1),e.forOf("v",o,m=>e.if((0,ji._)`${l()}(${n}, ${m})`,()=>e.assign(d,!0).break()))}function f(m,y){let g=i[y];return typeof g=="object"&&g!==null?(0,ji._)`${l()}(${n}, ${m}[${y}])`:(0,ji._)`${n} === ${g}`}}};Yl.default=US});var og=S(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});var zS=zm(),GS=Gm(),JS=Ym(),KS=Xm(),YS=Qm(),XS=Zm(),QS=eg(),ZS=ng(),e2=rg(),t2=ig(),n2=[zS.default,GS.default,JS.default,KS.default,YS.default,XS.default,QS.default,ZS.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},e2.default,t2.default];Xl.default=n2});var Zl=S(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.validateAdditionalItems=void 0;var Mn=Z(),Ql=ie(),r2={message:({params:{len:t}})=>(0,Mn.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Mn._)`{limit: ${t}}`},i2={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:r2,code(t){let{parentSchema:e,it:n}=t,{items:r}=e;if(!Array.isArray(r)){(0,Ql.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}sg(t,r)}};function sg(t,e){let{gen:n,schema:r,data:i,keyword:o,it:s}=t;s.items=!0;let a=n.const("len",(0,Mn._)`${i}.length`);if(r===!1)t.setParams({len:e.length}),t.pass((0,Mn._)`${a} <= ${e.length}`);else if(typeof r=="object"&&!(0,Ql.alwaysValidSchema)(s,r)){let l=n.var("valid",(0,Mn._)`${a} <= ${e.length}`);n.if((0,Mn.not)(l),()=>c(l)),t.ok(l)}function c(l){n.forRange("i",e.length,a,d=>{t.subschema({keyword:o,dataProp:d,dataPropType:Ql.Type.Num},l),s.allErrors||n.if((0,Mn.not)(l),()=>n.break())})}}Di.validateAdditionalItems=sg;Di.default=i2});var eu=S(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.validateTuple=void 0;var ag=Z(),ps=ie(),o2=dt(),s2={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:n}=t;if(Array.isArray(e))return cg(t,"additionalItems",e);n.items=!0,!(0,ps.alwaysValidSchema)(n,e)&&t.ok((0,o2.validateArray)(t))}};function cg(t,e,n=t.schema){let{gen:r,parentSchema:i,data:o,keyword:s,it:a}=t;d(i),a.opts.unevaluated&&n.length&&a.items!==!0&&(a.items=ps.mergeEvaluated.items(r,n.length,a.items));let c=r.name("valid"),l=r.const("len",(0,ag._)`${o}.length`);n.forEach((p,f)=>{(0,ps.alwaysValidSchema)(a,p)||(r.if((0,ag._)`${l} > ${f}`,()=>t.subschema({keyword:s,schemaProp:f,dataProp:f},c)),t.ok(c))});function d(p){let{opts:f,errSchemaPath:m}=a,y=n.length,g=y===p.minItems&&(y===p.maxItems||p[e]===!1);if(f.strictTuples&&!g){let w=`"${s}" is ${y}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,ps.checkStrictMode)(a,w,f.strictTuples)}}}Fi.validateTuple=cg;Fi.default=s2});var lg=S(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});var a2=eu(),c2={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,a2.validateTuple)(t,"items")};tu.default=c2});var pg=S(nu=>{"use strict";Object.defineProperty(nu,"__esModule",{value:!0});var ug=Z(),l2=ie(),u2=dt(),p2=Zl(),d2={message:({params:{len:t}})=>(0,ug.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,ug._)`{limit: ${t}}`},f2={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:d2,code(t){let{schema:e,parentSchema:n,it:r}=t,{prefixItems:i}=n;r.items=!0,!(0,l2.alwaysValidSchema)(r,e)&&(i?(0,p2.validateAdditionalItems)(t,i):t.ok((0,u2.validateArray)(t)))}};nu.default=f2});var dg=S(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});var ht=Z(),ds=ie(),h2={message:({params:{min:t,max:e}})=>e===void 0?(0,ht.str)`must contain at least ${t} valid item(s)`:(0,ht.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,ht._)`{minContains: ${t}}`:(0,ht._)`{minContains: ${t}, maxContains: ${e}}`},m2={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:h2,code(t){let{gen:e,schema:n,parentSchema:r,data:i,it:o}=t,s,a,{minContains:c,maxContains:l}=r;o.opts.next?(s=c===void 0?1:c,a=l):s=1;let d=e.const("len",(0,ht._)`${i}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,ds.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,ds.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,ds.alwaysValidSchema)(o,n)){let g=(0,ht._)`${d} >= ${s}`;a!==void 0&&(g=(0,ht._)`${g} && ${d} <= ${a}`),t.pass(g);return}o.items=!0;let p=e.name("valid");a===void 0&&s===1?m(p,()=>e.if(p,()=>e.break())):s===0?(e.let(p,!0),a!==void 0&&e.if((0,ht._)`${i}.length > 0`,f)):(e.let(p,!1),f()),t.result(p,()=>t.reset());function f(){let g=e.name("_valid"),w=e.let("count",0);m(g,()=>e.if(g,()=>y(w)))}function m(g,w){e.forRange("i",0,d,b=>{t.subschema({keyword:"contains",dataProp:b,dataPropType:ds.Type.Num,compositeRule:!0},g),w()})}function y(g){e.code((0,ht._)`${g}++`),a===void 0?e.if((0,ht._)`${g} >= ${s}`,()=>e.assign(p,!0).break()):(e.if((0,ht._)`${g} > ${a}`,()=>e.assign(p,!1).break()),s===1?e.assign(p,!0):e.if((0,ht._)`${g} >= ${s}`,()=>e.assign(p,!0)))}}};ru.default=m2});var fs=S(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.validateSchemaDeps=Tt.validatePropertyDeps=Tt.error=void 0;var iu=Z(),g2=ie(),qi=dt();Tt.error={message:({params:{property:t,depsCount:e,deps:n}})=>{let r=e===1?"property":"properties";return(0,iu.str)`must have ${r} ${n} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:n,missingProperty:r}})=>(0,iu._)`{property: ${t},
64
+ || ${s} === "boolean" || ${i} === null`).assign(a,(0,ee._)`[${i}]`)}}}function jx({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,ee._)`${e} !== undefined`,()=>t.assign((0,ee._)`${e}[${n}]`,r))}function ul(t,e,n,r=fr.Correct){let i=r===fr.Correct?ee.operators.EQ:ee.operators.NEQ,o;switch(t){case"null":return(0,ee._)`${e} ${i} null`;case"array":o=(0,ee._)`Array.isArray(${e})`;break;case"object":o=(0,ee._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=s((0,ee._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=s();break;default:return(0,ee._)`typeof ${e} ${i} ${t}`}return r===fr.Correct?o:(0,ee.not)(o);function s(a=ee.nil){return(0,ee.and)((0,ee._)`typeof ${e} == "number"`,a,n?(0,ee._)`isFinite(${e})`:ee.nil)}}je.checkDataType=ul;function pl(t,e,n,r){if(t.length===1)return ul(t[0],e,n,r);let i,o=(0,Rh.toHash)(t);if(o.array&&o.object){let s=(0,ee._)`typeof ${e} != "object"`;i=o.null?s:(0,ee._)`!${e} || ${s}`,delete o.null,delete o.array,delete o.object}else i=ee.nil;o.number&&delete o.integer;for(let s in o)i=(0,ee.and)(i,ul(s,e,n,r));return i}je.checkDataTypes=pl;var Dx={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,ee._)`{type: ${t}}`:(0,ee._)`{type: ${e}}`};function dl(t){let e=Fx(t);(0,Ox.reportError)(e,Dx)}je.reportTypeError=dl;function Fx(t){let{gen:e,data:n,schema:r}=t,i=(0,Rh.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:t}}});var Nh=S(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.assignDefaults=void 0;var hr=Z(),qx=ie();function Bx(t,e){let{properties:n,items:r}=t.schema;if(e==="object"&&n)for(let i in n)Oh(t,i,n[i].default);else e==="array"&&Array.isArray(r)&&r.forEach((i,o)=>Oh(t,o,i.default))}Xo.assignDefaults=Bx;function Oh(t,e,n){let{gen:r,compositeRule:i,data:o,opts:s}=t;if(n===void 0)return;let a=(0,hr._)`${o}${(0,hr.getProperty)(e)}`;if(i){(0,qx.checkStrictMode)(t,`default is ignored for: ${a}`);return}let l=(0,hr._)`${a} === undefined`;s.useDefaults==="empty"&&(l=(0,hr._)`${l} || ${a} === null || ${a} === ""`),r.if(l,(0,hr._)`${a} = ${(0,hr.stringify)(n)}`)}});var mt=S(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.validateUnion=fe.validateArray=fe.usePattern=fe.callValidateCode=fe.schemaProperties=fe.allSchemaProperties=fe.noPropertyInData=fe.propertyInData=fe.isOwnProperty=fe.hasPropFunc=fe.reportMissingProp=fe.checkMissingProp=fe.checkReportMissingProp=void 0;var we=Z(),fl=ie(),hn=ht(),Hx=ie();function Wx(t,e){let{gen:n,data:r,it:i}=t;n.if(ml(n,r,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,we._)`${e}`},!0),t.error()})}fe.checkReportMissingProp=Wx;function Ux({gen:t,data:e,it:{opts:n}},r,i){return(0,we.or)(...r.map(o=>(0,we.and)(ml(t,e,o,n.ownProperties),(0,we._)`${i} = ${o}`)))}fe.checkMissingProp=Ux;function zx(t,e){t.setParams({missingProperty:e},!0),t.error()}fe.reportMissingProp=zx;function Mh(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,we._)`Object.prototype.hasOwnProperty`})}fe.hasPropFunc=Mh;function hl(t,e,n){return(0,we._)`${Mh(t)}.call(${e}, ${n})`}fe.isOwnProperty=hl;function Gx(t,e,n,r){let i=(0,we._)`${e}${(0,we.getProperty)(n)} !== undefined`;return r?(0,we._)`${i} && ${hl(t,e,n)}`:i}fe.propertyInData=Gx;function ml(t,e,n,r){let i=(0,we._)`${e}${(0,we.getProperty)(n)} === undefined`;return r?(0,we.or)(i,(0,we.not)(hl(t,e,n))):i}fe.noPropertyInData=ml;function Vh(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}fe.allSchemaProperties=Vh;function Jx(t,e){return Vh(e).filter(n=>!(0,fl.alwaysValidSchema)(t,e[n]))}fe.schemaProperties=Jx;function Kx({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:i,errorPath:o},it:s},a,l,c){let p=c?(0,we._)`${t}, ${e}, ${r}${i}`:e,d=[[hn.default.instancePath,(0,we.strConcat)(hn.default.instancePath,o)],[hn.default.parentData,s.parentData],[hn.default.parentDataProperty,s.parentDataProperty],[hn.default.rootData,hn.default.rootData]];s.opts.dynamicRef&&d.push([hn.default.dynamicAnchors,hn.default.dynamicAnchors]);let f=(0,we._)`${p}, ${n.object(...d)}`;return l!==we.nil?(0,we._)`${a}.call(${l}, ${f})`:(0,we._)`${a}(${f})`}fe.callValidateCode=Kx;var Yx=(0,we._)`new RegExp`;function Xx({gen:t,it:{opts:e}},n){let r=e.unicodeRegExp?"u":"",{regExp:i}=e.code,o=i(n,r);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,we._)`${i.code==="new RegExp"?Yx:(0,Hx.useFunc)(t,i)}(${n}, ${r})`})}fe.usePattern=Xx;function Qx(t){let{gen:e,data:n,keyword:r,it:i}=t,o=e.name("valid");if(i.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(o,!0),s(()=>e.break()),o;function s(a){let l=e.const("len",(0,we._)`${n}.length`);e.forRange("i",0,l,c=>{t.subschema({keyword:r,dataProp:c,dataPropType:fl.Type.Num},o),e.if((0,we.not)(o),a)})}}fe.validateArray=Qx;function Zx(t){let{gen:e,schema:n,keyword:r,it:i}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(l=>(0,fl.alwaysValidSchema)(i,l))&&!i.opts.unevaluated)return;let s=e.let("valid",!1),a=e.name("_valid");e.block(()=>n.forEach((l,c)=>{let p=t.subschema({keyword:r,schemaProp:c,compositeRule:!0},a);e.assign(s,(0,we._)`${s} || ${a}`),t.mergeValidEvaluated(p,a)||e.if((0,we.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}fe.validateUnion=Zx});var Dh=S(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.validateKeywordUsage=Tt.validSchemaType=Tt.funcKeywordCode=Tt.macroKeywordCode=void 0;var He=Z(),Tn=ht(),e$=mt(),t$=$i();function n$(t,e){let{gen:n,keyword:r,schema:i,parentSchema:o,it:s}=t,a=e.macro.call(s.self,i,o,s),l=jh(n,r,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let c=n.name("valid");t.subschema({schema:a,schemaPath:He.nil,errSchemaPath:`${s.errSchemaPath}/${r}`,topSchemaRef:l,compositeRule:!0},c),t.pass(c,()=>t.error(!0))}Tt.macroKeywordCode=n$;function r$(t,e){var n;let{gen:r,keyword:i,schema:o,parentSchema:s,$data:a,it:l}=t;o$(l,e);let c=!a&&e.compile?e.compile.call(l.self,o,s,l):e.validate,p=jh(r,i,c),d=r.let("valid");t.block$data(d,f),t.ok((n=e.valid)!==null&&n!==void 0?n:d);function f(){if(e.errors===!1)g(),e.modifying&&Lh(t),w(()=>t.error());else{let b=e.async?m():y();e.modifying&&Lh(t),w(()=>i$(t,b))}}function m(){let b=r.let("ruleErrs",null);return r.try(()=>g((0,He._)`await `),P=>r.assign(d,!1).if((0,He._)`${P} instanceof ${l.ValidationError}`,()=>r.assign(b,(0,He._)`${P}.errors`),()=>r.throw(P))),b}function y(){let b=(0,He._)`${p}.errors`;return r.assign(b,null),g(He.nil),b}function g(b=e.async?(0,He._)`await `:He.nil){let P=l.opts.passContext?Tn.default.this:Tn.default.self,x=!("compile"in e&&!a||e.schema===!1);r.assign(d,(0,He._)`${b}${(0,e$.callValidateCode)(t,p,P,x)}`,e.modifying)}function w(b){var P;r.if((0,He.not)((P=e.valid)!==null&&P!==void 0?P:d),b)}}Tt.funcKeywordCode=r$;function Lh(t){let{gen:e,data:n,it:r}=t;e.if(r.parentData,()=>e.assign(n,(0,He._)`${r.parentData}[${r.parentDataProperty}]`))}function i$(t,e){let{gen:n}=t;n.if((0,He._)`Array.isArray(${e})`,()=>{n.assign(Tn.default.vErrors,(0,He._)`${Tn.default.vErrors} === null ? ${e} : ${Tn.default.vErrors}.concat(${e})`).assign(Tn.default.errors,(0,He._)`${Tn.default.vErrors}.length`),(0,t$.extendErrors)(t)},()=>t.error())}function o$({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function jh(t,e,n){if(n===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof n=="function"?{ref:n}:{ref:n,code:(0,He.stringify)(n)})}function s$(t,e,n=!1){return!e.length||e.some(r=>r==="array"?Array.isArray(t):r==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==r||n&&typeof t>"u")}Tt.validSchemaType=s$;function a$({schema:t,opts:e,self:n,errSchemaPath:r},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");let s=i.dependencies;if(s?.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[o])){let l=`keyword "${o}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")n.logger.error(l);else throw new Error(l)}}Tt.validateKeywordUsage=a$});var qh=S(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.extendSubschemaMode=mn.extendSubschemaData=mn.getSubschema=void 0;var Ot=Z(),Fh=ie();function c$(t,{keyword:e,schemaProp:n,schema:r,schemaPath:i,errSchemaPath:o,topSchemaRef:s}){if(e!==void 0&&r!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let a=t.schema[e];return n===void 0?{schema:a,schemaPath:(0,Ot._)`${t.schemaPath}${(0,Ot.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[n],schemaPath:(0,Ot._)`${t.schemaPath}${(0,Ot.getProperty)(e)}${(0,Ot.getProperty)(n)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,Fh.escapeFragment)(n)}`}}if(r!==void 0){if(i===void 0||o===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:r,schemaPath:i,topSchemaRef:s,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}mn.getSubschema=c$;function l$(t,e,{dataProp:n,dataPropType:r,data:i,dataTypes:o,propertyName:s}){if(i!==void 0&&n!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(n!==void 0){let{errorPath:c,dataPathArr:p,opts:d}=e,f=a.let("data",(0,Ot._)`${e.data}${(0,Ot.getProperty)(n)}`,!0);l(f),t.errorPath=(0,Ot.str)`${c}${(0,Fh.getErrorPath)(n,r,d.jsPropertySyntax)}`,t.parentDataProperty=(0,Ot._)`${n}`,t.dataPathArr=[...p,t.parentDataProperty]}if(i!==void 0){let c=i instanceof Ot.Name?i:a.let("data",i,!0);l(c),s!==void 0&&(t.propertyName=s)}o&&(t.dataTypes=o);function l(c){t.data=c,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,c]}}mn.extendSubschemaData=l$;function u$(t,{jtdDiscriminator:e,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:o}){r!==void 0&&(t.compositeRule=r),i!==void 0&&(t.createErrors=i),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=n}mn.extendSubschemaMode=u$});var gl=S((xN,Bh)=>{"use strict";Bh.exports=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}});var Wh=S(($N,Hh)=>{"use strict";var gn=Hh.exports=function(t,e,n){typeof e=="function"&&(n=e,e={}),n=e.cb||n;var r=typeof n=="function"?n:n.pre||function(){},i=n.post||function(){};Qo(e,r,i,t,"",t)};gn.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};gn.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};gn.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};gn.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 Qo(t,e,n,r,i,o,s,a,l,c){if(r&&typeof r=="object"&&!Array.isArray(r)){e(r,i,o,s,a,l,c);for(var p in r){var d=r[p];if(Array.isArray(d)){if(p in gn.arrayKeywords)for(var f=0;f<d.length;f++)Qo(t,e,n,d[f],i+"/"+p+"/"+f,o,i,p,r,f)}else if(p in gn.propsKeywords){if(d&&typeof d=="object")for(var m in d)Qo(t,e,n,d[m],i+"/"+p+"/"+p$(m),o,i,p,r,m)}else(p in gn.keywords||t.allKeys&&!(p in gn.skipKeywords))&&Qo(t,e,n,d,i+"/"+p,o,i,p,r)}n(r,i,o,s,a,l,c)}}function p$(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Ci=S(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.getSchemaRefs=Xe.resolveUrl=Xe.normalizeId=Xe._getFullPath=Xe.getFullPath=Xe.inlineRef=void 0;var d$=ie(),f$=gl(),h$=Wh(),m$=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function g$(t,e=!0){return typeof t=="boolean"?!0:e===!0?!yl(t):e?Uh(t)<=e:!1}Xe.inlineRef=g$;var y$=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function yl(t){for(let e in t){if(y$.has(e))return!0;let n=t[e];if(Array.isArray(n)&&n.some(yl)||typeof n=="object"&&yl(n))return!0}return!1}function Uh(t){let e=0;for(let n in t){if(n==="$ref")return 1/0;if(e++,!m$.has(n)&&(typeof t[n]=="object"&&(0,d$.eachItem)(t[n],r=>e+=Uh(r)),e===1/0))return 1/0}return e}function zh(t,e="",n){n!==!1&&(e=mr(e));let r=t.parse(e);return Gh(t,r)}Xe.getFullPath=zh;function Gh(t,e){return t.serialize(e).split("#")[0]+"#"}Xe._getFullPath=Gh;var w$=/#\/?$/;function mr(t){return t?t.replace(w$,""):""}Xe.normalizeId=mr;function v$(t,e,n){return n=mr(n),t.resolve(e,n)}Xe.resolveUrl=v$;var b$=/^[a-z_][-a-z0-9._]*$/i;function _$(t,e){if(typeof t=="boolean")return{};let{schemaId:n,uriResolver:r}=this.opts,i=mr(t[n]||e),o={"":i},s=zh(r,i,!1),a={},l=new Set;return h$(t,{allKeys:!0},(d,f,m,y)=>{if(y===void 0)return;let g=s+f,w=o[y];typeof d[n]=="string"&&(w=b.call(this,d[n])),P.call(this,d.$anchor),P.call(this,d.$dynamicAnchor),o[f]=w;function b(x){let R=this.opts.uriResolver.resolve;if(x=mr(w?R(w,x):x),l.has(x))throw p(x);l.add(x);let O=this.refs[x];return typeof O=="string"&&(O=this.refs[O]),typeof O=="object"?c(d,O.schema,x):x!==mr(g)&&(x[0]==="#"?(c(d,a[x],x),a[x]=d):this.refs[x]=g),x}function P(x){if(typeof x=="string"){if(!b$.test(x))throw new Error(`invalid anchor "${x}"`);b.call(this,`#${x}`)}}}),a;function c(d,f,m){if(f!==void 0&&!f$(d,f))throw p(m)}function p(d){return new Error(`reference "${d}" resolves to more than one schema`)}}Xe.getSchemaRefs=_$});var Pi=S(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.getData=yn.KeywordCxt=yn.validateFunctionCode=void 0;var Qh=Eh(),Jh=Si(),vl=ll(),Zo=Si(),x$=Nh(),Ei=Dh(),wl=qh(),W=Z(),X=ht(),$$=Ci(),Ut=ie(),ki=$i();function S$(t){if(tm(t)&&(nm(t),em(t))){E$(t);return}Zh(t,()=>(0,Qh.topBoolOrEmptySchema)(t))}yn.validateFunctionCode=S$;function Zh({gen:t,validateName:e,schema:n,schemaEnv:r,opts:i},o){i.code.es5?t.func(e,(0,W._)`${X.default.data}, ${X.default.valCxt}`,r.$async,()=>{t.code((0,W._)`"use strict"; ${Kh(n,i)}`),k$(t,i),t.code(o)}):t.func(e,(0,W._)`${X.default.data}, ${C$(i)}`,r.$async,()=>t.code(Kh(n,i)).code(o))}function C$(t){return(0,W._)`{${X.default.instancePath}="", ${X.default.parentData}, ${X.default.parentDataProperty}, ${X.default.rootData}=${X.default.data}${t.dynamicRef?(0,W._)`, ${X.default.dynamicAnchors}={}`:W.nil}}={}`}function k$(t,e){t.if(X.default.valCxt,()=>{t.var(X.default.instancePath,(0,W._)`${X.default.valCxt}.${X.default.instancePath}`),t.var(X.default.parentData,(0,W._)`${X.default.valCxt}.${X.default.parentData}`),t.var(X.default.parentDataProperty,(0,W._)`${X.default.valCxt}.${X.default.parentDataProperty}`),t.var(X.default.rootData,(0,W._)`${X.default.valCxt}.${X.default.rootData}`),e.dynamicRef&&t.var(X.default.dynamicAnchors,(0,W._)`${X.default.valCxt}.${X.default.dynamicAnchors}`)},()=>{t.var(X.default.instancePath,(0,W._)`""`),t.var(X.default.parentData,(0,W._)`undefined`),t.var(X.default.parentDataProperty,(0,W._)`undefined`),t.var(X.default.rootData,X.default.data),e.dynamicRef&&t.var(X.default.dynamicAnchors,(0,W._)`{}`)})}function E$(t){let{schema:e,opts:n,gen:r}=t;Zh(t,()=>{n.$comment&&e.$comment&&im(t),T$(t),r.let(X.default.vErrors,null),r.let(X.default.errors,0),n.unevaluated&&P$(t),rm(t),M$(t)})}function P$(t){let{gen:e,validateName:n}=t;t.evaluated=e.const("evaluated",(0,W._)`${n}.evaluated`),e.if((0,W._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,W._)`${t.evaluated}.props`,(0,W._)`undefined`)),e.if((0,W._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,W._)`${t.evaluated}.items`,(0,W._)`undefined`))}function Kh(t,e){let n=typeof t=="object"&&t[e.schemaId];return n&&(e.code.source||e.code.process)?(0,W._)`/*# sourceURL=${n} */`:W.nil}function I$(t,e){if(tm(t)&&(nm(t),em(t))){R$(t,e);return}(0,Qh.boolOrEmptySchema)(t,e)}function em({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let n in t)if(e.RULES.all[n])return!0;return!1}function tm(t){return typeof t.schema!="boolean"}function R$(t,e){let{schema:n,gen:r,opts:i}=t;i.$comment&&n.$comment&&im(t),O$(t),N$(t);let o=r.const("_errs",X.default.errors);rm(t,o),r.var(e,(0,W._)`${o} === ${X.default.errors}`)}function nm(t){(0,Ut.checkUnknownRules)(t),A$(t)}function rm(t,e){if(t.opts.jtd)return Yh(t,[],!1,e);let n=(0,Jh.getSchemaTypes)(t.schema),r=(0,Jh.coerceAndCheckDataType)(t,n);Yh(t,n,!r,e)}function A$(t){let{schema:e,errSchemaPath:n,opts:r,self:i}=t;e.$ref&&r.ignoreKeywordsWithRef&&(0,Ut.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function T$(t){let{schema:e,opts:n}=t;e.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,Ut.checkStrictMode)(t,"default is ignored in the schema root")}function O$(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,$$.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function N$(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function im({gen:t,schemaEnv:e,schema:n,errSchemaPath:r,opts:i}){let o=n.$comment;if(i.$comment===!0)t.code((0,W._)`${X.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let s=(0,W.str)`${r}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,W._)`${X.default.self}.opts.$comment(${o}, ${s}, ${a}.schema)`)}}function M$(t){let{gen:e,schemaEnv:n,validateName:r,ValidationError:i,opts:o}=t;n.$async?e.if((0,W._)`${X.default.errors} === 0`,()=>e.return(X.default.data),()=>e.throw((0,W._)`new ${i}(${X.default.vErrors})`)):(e.assign((0,W._)`${r}.errors`,X.default.vErrors),o.unevaluated&&V$(t),e.return((0,W._)`${X.default.errors} === 0`))}function V$({gen:t,evaluated:e,props:n,items:r}){n instanceof W.Name&&t.assign((0,W._)`${e}.props`,n),r instanceof W.Name&&t.assign((0,W._)`${e}.items`,r)}function Yh(t,e,n,r){let{gen:i,schema:o,data:s,allErrors:a,opts:l,self:c}=t,{RULES:p}=c;if(o.$ref&&(l.ignoreKeywordsWithRef||!(0,Ut.schemaHasRulesButRef)(o,p))){i.block(()=>sm(t,"$ref",p.all.$ref.definition));return}l.jtd||L$(t,e),i.block(()=>{for(let f of p.rules)d(f);d(p.post)});function d(f){(0,vl.shouldUseGroup)(o,f)&&(f.type?(i.if((0,Zo.checkDataType)(f.type,s,l.strictNumbers)),Xh(t,f),e.length===1&&e[0]===f.type&&n&&(i.else(),(0,Zo.reportTypeError)(t)),i.endIf()):Xh(t,f),a||i.if((0,W._)`${X.default.errors} === ${r||0}`))}}function Xh(t,e){let{gen:n,schema:r,opts:{useDefaults:i}}=t;i&&(0,x$.assignDefaults)(t,e.type),n.block(()=>{for(let o of e.rules)(0,vl.shouldUseRule)(r,o)&&sm(t,o.keyword,o.definition,e.type)})}function L$(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(j$(t,e),t.opts.allowUnionTypes||D$(t,e),F$(t,t.dataTypes))}function j$(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(n=>{om(t.dataTypes,n)||bl(t,`type "${n}" not allowed by context "${t.dataTypes.join(",")}"`)}),B$(t,e)}}function D$(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&bl(t,"use allowUnionTypes to allow union type keyword")}function F$(t,e){let n=t.self.RULES.all;for(let r in n){let i=n[r];if(typeof i=="object"&&(0,vl.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(s=>q$(e,s))&&bl(t,`missing type "${o.join(",")}" for keyword "${r}"`)}}}function q$(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function om(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function B$(t,e){let n=[];for(let r of t.dataTypes)om(e,r)?n.push(r):e.includes("integer")&&r==="number"&&n.push("integer");t.dataTypes=n}function bl(t,e){let n=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${n}" (strictTypes)`,(0,Ut.checkStrictMode)(t,e,t.opts.strictTypes)}var es=class{constructor(e,n,r){if((0,Ei.validateKeywordUsage)(e,n,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=n.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Ut.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=n.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=n,this.$data)this.schemaCode=e.gen.const("vSchema",am(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Ei.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(n.schemaType)}`);("code"in n?n.trackErrors:n.errors!==!1)&&(this.errsCount=e.gen.const("_errs",X.default.errors))}result(e,n,r){this.failResult((0,W.not)(e),n,r)}failResult(e,n,r){this.gen.if(e),r?r():this.error(),n?(this.gen.else(),n(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,n){this.failResult((0,W.not)(e),void 0,n)}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:n}=this;this.fail((0,W._)`${n} !== undefined && (${(0,W.or)(this.invalid$data(),e)})`)}error(e,n,r){if(n){this.setParams(n),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,n){(e?ki.reportExtraError:ki.reportError)(this,this.def.error,n)}$dataError(){(0,ki.reportError)(this,this.def.$dataError||ki.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,ki.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,n){n?Object.assign(this.params,e):this.params=e}block$data(e,n,r=W.nil){this.gen.block(()=>{this.check$data(e,r),n()})}check$data(e=W.nil,n=W.nil){if(!this.$data)return;let{gen:r,schemaCode:i,schemaType:o,def:s}=this;r.if((0,W.or)((0,W._)`${i} === undefined`,n)),e!==W.nil&&r.assign(e,!0),(o.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==W.nil&&r.assign(e,!1)),r.else()}invalid$data(){let{gen:e,schemaCode:n,schemaType:r,def:i,it:o}=this;return(0,W.or)(s(),a());function s(){if(r.length){if(!(n instanceof W.Name))throw new Error("ajv implementation error");let l=Array.isArray(r)?r:[r];return(0,W._)`${(0,Zo.checkDataTypes)(l,n,o.opts.strictNumbers,Zo.DataType.Wrong)}`}return W.nil}function a(){if(i.validateSchema){let l=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,W._)`!${l}(${n})`}return W.nil}}subschema(e,n){let r=(0,wl.getSubschema)(this.it,e);(0,wl.extendSubschemaData)(r,this.it,e),(0,wl.extendSubschemaMode)(r,e);let i={...this.it,...r,items:void 0,props:void 0};return I$(i,n),i}mergeEvaluated(e,n){let{it:r,gen:i}=this;r.opts.unevaluated&&(r.props!==!0&&e.props!==void 0&&(r.props=Ut.mergeEvaluated.props(i,e.props,r.props,n)),r.items!==!0&&e.items!==void 0&&(r.items=Ut.mergeEvaluated.items(i,e.items,r.items,n)))}mergeValidEvaluated(e,n){let{it:r,gen:i}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return i.if(n,()=>this.mergeEvaluated(e,W.Name)),!0}};yn.KeywordCxt=es;function sm(t,e,n,r){let i=new es(t,n,e);"code"in n?n.code(i,r):i.$data&&n.validate?(0,Ei.funcKeywordCode)(i,n):"macro"in n?(0,Ei.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,Ei.funcKeywordCode)(i,n)}var H$=/^\/(?:[^~]|~0|~1)*$/,W$=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function am(t,{dataLevel:e,dataNames:n,dataPathArr:r}){let i,o;if(t==="")return X.default.rootData;if(t[0]==="/"){if(!H$.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=X.default.rootData}else{let c=W$.exec(t);if(!c)throw new Error(`Invalid JSON-pointer: ${t}`);let p=+c[1];if(i=c[2],i==="#"){if(p>=e)throw new Error(l("property/index",p));return r[e-p]}if(p>e)throw new Error(l("data",p));if(o=n[e-p],!i)return o}let s=o,a=i.split("/");for(let c of a)c&&(o=(0,W._)`${o}${(0,W.getProperty)((0,Ut.unescapeJsonPointer)(c))}`,s=(0,W._)`${s} && ${o}`);return s;function l(c,p){return`Cannot access ${c} ${p} levels up, current level is ${e}`}}yn.getData=am});var ts=S(xl=>{"use strict";Object.defineProperty(xl,"__esModule",{value:!0});var _l=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};xl.default=_l});var Ii=S(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});var $l=Ci(),Sl=class extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,$l.resolveUrl)(e,n,r),this.missingSchema=(0,$l.normalizeId)((0,$l.getFullPath)(e,this.missingRef))}};Cl.default=Sl});var Ri=S(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.resolveSchema=gt.getCompilingSchema=gt.resolveRef=gt.compileSchema=gt.SchemaEnv=void 0;var St=Z(),U$=ts(),On=ht(),Ct=Ci(),cm=ie(),z$=Pi(),gr=class{constructor(e){var n;this.refs={},this.dynamicAnchors={};let r;typeof e.schema=="object"&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(n=e.baseId)!==null&&n!==void 0?n:(0,Ct.normalizeId)(r?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=r?.$async,this.refs={}}};gt.SchemaEnv=gr;function El(t){let e=lm.call(this,t);if(e)return e;let n=(0,Ct.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:r,lines:i}=this.opts.code,{ownProperties:o}=this.opts,s=new St.CodeGen(this.scope,{es5:r,lines:i,ownProperties:o}),a;t.$async&&(a=s.scopeValue("Error",{ref:U$.default,code:(0,St._)`require("ajv/dist/runtime/validation_error").default`}));let l=s.scopeName("validate");t.validateName=l;let c={gen:s,allErrors:this.opts.allErrors,data:On.default.data,parentData:On.default.parentData,parentDataProperty:On.default.parentDataProperty,dataNames:[On.default.data],dataPathArr:[St.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,St.stringify)(t.schema)}:{ref:t.schema}),validateName:l,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:n,baseId:t.baseId||n,schemaPath:St.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,St._)`""`,opts:this.opts,self:this},p;try{this._compilations.add(t),(0,z$.validateFunctionCode)(c),s.optimize(this.opts.code.optimize);let d=s.toString();p=`${s.scopeRefs(On.default.scope)}return ${d}`,this.opts.code.process&&(p=this.opts.code.process(p,t));let m=new Function(`${On.default.self}`,`${On.default.scope}`,p)(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:d,scopeValues:s._values}),this.opts.unevaluated){let{props:y,items:g}=c;m.evaluated={props:y instanceof St.Name?void 0:y,items:g instanceof St.Name?void 0:g,dynamicProps:y instanceof St.Name,dynamicItems:g instanceof St.Name},m.source&&(m.source.evaluated=(0,St.stringify)(m.evaluated))}return t.validate=m,t}catch(d){throw delete t.validate,delete t.validateName,p&&this.logger.error("Error compiling schema, function code:",p),d}finally{this._compilations.delete(t)}}gt.compileSchema=El;function G$(t,e,n){var r;n=(0,Ct.resolveUrl)(this.opts.uriResolver,e,n);let i=t.refs[n];if(i)return i;let o=Y$.call(this,t,n);if(o===void 0){let s=(r=t.localRefs)===null||r===void 0?void 0:r[n],{schemaId:a}=this.opts;s&&(o=new gr({schema:s,schemaId:a,root:t,baseId:e}))}if(o!==void 0)return t.refs[n]=J$.call(this,o)}gt.resolveRef=G$;function J$(t){return(0,Ct.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:El.call(this,t)}function lm(t){for(let e of this._compilations)if(K$(e,t))return e}gt.getCompilingSchema=lm;function K$(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function Y$(t,e){let n;for(;typeof(n=this.refs[e])=="string";)e=n;return n||this.schemas[e]||ns.call(this,t,e)}function ns(t,e){let n=this.opts.uriResolver.parse(e),r=(0,Ct._getFullPath)(this.opts.uriResolver,n),i=(0,Ct.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&r===i)return kl.call(this,n,t);let o=(0,Ct.normalizeId)(r),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){let a=ns.call(this,t,s);return typeof a?.schema!="object"?void 0:kl.call(this,n,a)}if(typeof s?.schema=="object"){if(s.validate||El.call(this,s),o===(0,Ct.normalizeId)(e)){let{schema:a}=s,{schemaId:l}=this.opts,c=a[l];return c&&(i=(0,Ct.resolveUrl)(this.opts.uriResolver,i,c)),new gr({schema:a,schemaId:l,root:t,baseId:i})}return kl.call(this,n,s)}}gt.resolveSchema=ns;var X$=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function kl(t,{baseId:e,schema:n,root:r}){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 n=="boolean")return;let l=n[(0,cm.unescapeFragment)(a)];if(l===void 0)return;n=l;let c=typeof n=="object"&&n[this.opts.schemaId];!X$.has(a)&&c&&(e=(0,Ct.resolveUrl)(this.opts.uriResolver,e,c))}let o;if(typeof n!="boolean"&&n.$ref&&!(0,cm.schemaHasRulesButRef)(n,this.RULES)){let a=(0,Ct.resolveUrl)(this.opts.uriResolver,e,n.$ref);o=ns.call(this,r,a)}let{schemaId:s}=this.opts;if(o=o||new gr({schema:n,schemaId:s,root:r,baseId:e}),o.schema!==o.root.schema)return o}});var um=S((IN,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 Ol=S((RN,ym)=>{"use strict";var Z$=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Il=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),e1=RegExp.prototype.test.bind(/^\d*$/u),Nn=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Rl=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),dm=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),Al=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),t1=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),Qe=new Array(256);{let t="0123456789ABCDEF";for(let e=0;e<256;e++)Qe[e]="%"+t[e>>4]+t[e&15]}function De(t){return t<2048?Qe[192|t>>6]+Qe[128|t&63]:t<65536?Qe[224|t>>12]+Qe[128|t>>6&63]+Qe[128|t&63]:Qe[240|t>>18]+Qe[128|t>>12&63]+Qe[128|t>>6&63]+Qe[128|t&63]}function n1(t){let e="",n=0,r=0;for(r=0;r<t.length;r++)if(n=t[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";e+=t[r];break}for(r+=1;r<t.length;r++){if(n=t[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";e+=t[r]}return e}var r1=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),i1=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),o1=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),s1=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function a1(t){if(t.length===0)return!1;for(let e=0;e<t.length;e++)if(!o1(t[e])){if(t[e]==="%"&&e+2<t.length&&Nn(t.slice(e+1,e+3))){e+=2;continue}return!1}return!0}function pm(t){let e=-1,n=0,r=-1,i=0;for(let a=0;a<t.length;a++)t[a]==="0"?(r===-1&&(r=a),i++,i>n&&(n=i,e=r)):(r=-1,i=0);if(n<2)return t.join(":");let o=t.slice(0,e).join(":"),s=t.slice(e+n).join(":");return o+"::"+s}function c1(t){let e=t.indexOf("::");if(e!==-1&&t.indexOf("::",e+1)!==-1)return;let n=e===-1?t.split(":"):t.slice(0,e).split(":"),r=e===-1?[]:t.slice(e+2).split(":");e!==-1&&(n.length===1&&n[0]===""&&(n.length=0),r.length===1&&r[0]===""&&(r.length=0));let i=n.concat(r),o=0;for(let a=0;a<i.length;a++){let l=i[a];if(l==="")return;if(l.indexOf(".")!==-1){if(a!==i.length-1||e!==-1&&r.length===0||!Il(l))return;o+=2;continue}if(!r1(l))return;i[a]=parseInt(l,16).toString(16),o++}if(e===-1)return o!==8?void 0:pm(i);if(o>=8)return;let s=i.slice(0,n.length);for(let a=o;a<8;a++)s.push("0");for(let a=n.length;a<i.length;a++)s.push(i[a]);return pm(s)}function Pl(t){let e=t[0]==="["&&t[t.length-1]==="]";if((t[0]==="["||t[t.length-1]==="]")&&!e)return{host:t,isIPV6:!1,error:!0};let r=e?t.slice(1,-1):t;if(e&&i1(r))return r=r.toLowerCase(),{host:`[${r}]`,escapedHost:r,isIPV6:!1,isIPVFuture:!0};if(l1(r,":")<2)return{host:t,isIPV6:!1,error:e};let i="",o=r.indexOf("%");if(o!==-1){let a=r.slice(o,o+3).toLowerCase()==="%25"?3:1;if(i=r.slice(o+a),!a1(i))return{host:t,isIPV6:!1,error:!0};r=r.slice(0,o)}let s=c1(r);return s===void 0?{host:t,isIPV6:!1,error:!0}:{host:s+(i?"%"+i:""),escapedHost:s+(i?"%25"+i:""),isIPV6:!0}}function l1(t,e){let n=0;for(let r=0;r<t.length;r++)t[r]===e&&n++;return n}function u1(t){let e=t,n=[],r=-1,i=0;for(;i=e.length;){if(i===1){if(e===".")break;if(e==="/"){n.push("/");break}else{n.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]==="/")){n.push("/");break}}else if(i===3&&e==="/.."){n.length!==0&&n.pop(),n.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),n.length!==0&&n.pop();continue}}if((r=e.indexOf("/",1))===-1){n.push(e);break}else n.push(e.slice(0,r)),e=e.slice(r)}return n.join("")}var p1={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},d1=/[@/?#:]/g,f1=/[@/?#]/g;function fm(t,e){let n=e?f1:d1;return n.lastIndex=0,t.replace(n,r=>p1[r])}function hm(t,e=!1){if(t.indexOf("%")===-1)return t;let n="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let i=t.slice(r+1,r+3);if(Nn(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));e&&Rl(s)?n+=s:n+="%"+o,r+=2;continue}}n+=t[r]}return n}function h1(t){let e="";for(let n=0;n<t.length;n++){let r=t[n];if(r==="%"&&n+2<t.length){let i=t.slice(n+1,n+3);if(Nn(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));s!=="."&&Rl(s)?e+=s:e+="%"+o,n+=2;continue}}if(dm(r))e+=r;else{let i=t.charCodeAt(n);if(i<128)e+=gm(i)?r:Qe[i];else if(i<55296||i>57343)e+=De(i);else if(i<=56319&&n+1<t.length){let o=t.charCodeAt(n+1);o>=56320&&o<=57343?(e+=De(65536+(i-55296<<10)+(o-56320)),n++):e+=De(65533)}else e+=De(65533)}}return e}function m1(t,e=!1){let n="",r=e&&t[0]!=="/";for(let i=0;i<t.length;i++){let o=t[i];if(o==="%"&&i+2<t.length){let s=t.slice(i+1,i+3);if(Nn(s)){n+="%"+s.toUpperCase(),i+=2;continue}}if(o==="/"&&(r=!1),dm(o)&&(o!==":"||!r))n+=o;else{let s=t.charCodeAt(i);if(s<128)n+=Qe[s];else if(s<55296||s>57343)n+=De(s);else if(s<=56319&&i+1<t.length){let a=t.charCodeAt(i+1);a>=56320&&a<=57343?(n+=De(65536+(s-55296<<10)+(a-56320)),i++):n+=De(65533)}else n+=De(65533)}}return n}function Tl(t,e){let n="";for(let r=0;r<t.length;r++){let i=t[r];if(i==="%"&&r+2<t.length){let o=t.slice(r+1,r+3);if(Nn(o)){n+="%"+o.toUpperCase(),r+=2;continue}}if(e(i))n+=i;else{let o=t.charCodeAt(r);if(o<128)n+=Qe[o];else if(o<55296||o>57343)n+=De(o);else if(o<=56319&&r+1<t.length){let s=t.charCodeAt(r+1);s>=56320&&s<=57343?(n+=De(65536+(o-55296<<10)+(s-56320)),r++):n+=De(65533)}else n+=De(65533)}}return n}function mm(t){return Tl(t,t1)}function g1(t){return Tl(t,Al)}function y1(t){return Tl(t,Al)}function gm(t){return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===42||t===43||t===45||t===46||t===47||t===64||t===95}function w1(t){let e="";for(let n=0;n<t.length;n++){let r=t[n];if(r==="%"&&n+2<t.length){let i=t.slice(n+1,n+3);if(Nn(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));Rl(s)?e+=s:e+="%"+o,n+=2;continue}}if(Al(r))e+=r;else{let i=t.charCodeAt(n);if(i<128)e+=gm(i)?r:Qe[i];else if(i<55296||i>57343)e+=De(i);else if(i<=56319&&n+1<t.length){let o=t.charCodeAt(n+1);o>=56320&&o<=57343?(e+=De(65536+(i-55296<<10)+(o-56320)),n++):e+=De(65533)}else e+=De(65533)}}return e}function v1(t){let e="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){let r=t.slice(n+1,n+3);if(Nn(r)){e+="%"+r.toUpperCase(),n+=2;continue}}e+=escape(t[n])}return e}function b1(t){let e=[];if(t.userinfo!==void 0&&(e.push(mm(t.userinfo)),e.push("@")),t.host!==void 0){let n=t.host;if(!Il(n)){let r=Pl(n);r.isIPV6!==!0&&r.isIPVFuture!==!0&&(n=hm(n,!0),r=Pl(n)),r.isIPV6===!0||r.isIPVFuture===!0?n=`[${r.escapedHost}]`:n=fm(n,!1)}e.push(n)}if(typeof t.port=="number"||typeof t.port=="string"){let n=String(t.port);if(!e1(n))throw new TypeError("URI port is malformed.");e.push(":"),e.push(n)}return e.length?e.join(""):void 0}ym.exports={nonSimpleDomain:s1,recomposeAuthority:b1,reescapeHostDelimiters:fm,normalizePercentEncoding:hm,normalizePathEncoding:h1,serializePathEncoding:m1,normalizeQueryFragmentEncoding:w1,encodeUserinfo:mm,encodeQuery:g1,encodeFragment:y1,escapePreservingEscapes:v1,removeDotSegments:u1,isIPv4:Il,isUUID:Z$,normalizeIPv6:Pl,stringArrayToHexStripped:n1}});var xm=S((AN,_m)=>{"use strict";var{isUUID:_1}=Ol(),x1=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,$1=["http","https","ws","wss","urn","urn:uuid"];function S1(t){return $1.indexOf(t)!==-1}function Nl(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 wm(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function vm(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 C1(t){return t.secure=Nl(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function k1(t){if((t.port===(Nl(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=t.resourceName.indexOf("?"),n=e===-1?t.resourceName:t.resourceName.slice(0,e);t.path=n&&n!=="/"?n:void 0,t.query=e===-1?void 0:t.resourceName.slice(e+1),t.resourceName=void 0}return t.fragment=void 0,t}function E1(t,e){if(!t.path)return t.error="URN can not be parsed",t;let n=t.path.match(x1);if(n&&n[0]===t.path){let r=e.scheme||t.scheme||"urn";t.nid=n[1].toLowerCase(),t.nss=n[2];let i=`${r}:${e.nid||t.nid}`,o=Ml(i);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function P1(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let n=e.scheme||t.scheme||"urn",r=t.nid.toLowerCase(),i=`${n}:${e.nid||r}`,o=Ml(i);o&&(t=o.serialize(t,e));let s=t,a=t.nss;return s.path=`${r||e.nid}:${a}`,e.skipEscape=!0,s}function I1(t,e){let n=t;return n.uuid=n.nss,n.nss=void 0,!e.tolerant&&(!n.uuid||!_1(n.uuid))&&(n.error=n.error||"UUID is not valid."),n}function R1(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var bm={scheme:"http",domainHost:!0,parse:wm,serialize:vm},A1={scheme:"https",domainHost:bm.domainHost,parse:wm,serialize:vm},rs={scheme:"ws",domainHost:!0,parse:C1,serialize:k1},T1={scheme:"wss",domainHost:rs.domainHost,parse:rs.parse,serialize:rs.serialize},O1={scheme:"urn",parse:E1,serialize:P1,skipNormalize:!0},N1={scheme:"urn:uuid",parse:I1,serialize:R1,skipNormalize:!0},is={http:bm,https:A1,ws:rs,wss:T1,urn:O1,"urn:uuid":N1};Object.setPrototypeOf(is,null);function Ml(t){return t&&(is[t]||is[t.toLowerCase()])||void 0}_m.exports={wsIsSecure:Nl,SCHEMES:is,isValidSchemeName:S1,getSchemeHandler:Ml}});var Mm=S((TN,as)=>{"use strict";var{normalizeIPv6:Em,removeDotSegments:Ti,recomposeAuthority:M1,normalizePercentEncoding:Vl,normalizePathEncoding:V1,serializePathEncoding:$m,normalizeQueryFragmentEncoding:Sm,encodeQuery:L1,encodeFragment:j1,reescapeHostDelimiters:D1,isIPv4:Pm,nonSimpleDomain:F1}=Ol(),{SCHEMES:Im,getSchemeHandler:Ll}=xm(),Rm=/^[A-Za-z][A-Za-z0-9+.-]*$/u,Am="URI scheme is malformed.";function Cm(t){let e=unescape(String(t));if(!Rm.test(e))throw new TypeError(Am);return e}function q1(t,e){return typeof t=="string"?t=K1(t,e):typeof t=="object"&&(t=ss(Mn(t,e),e)),t}function B1(t,e,n){let r=n?Object.assign({scheme:"null"},n):{scheme:"null"},{parsed:i,malformedAuthorityOrPort:o,malformedPercentEncoding:s,malformedSchemeSpecific:a,malformedHost:l,malformedScheme:c}=os(t,r),{parsed:p,malformedAuthorityOrPort:d,malformedPercentEncoding:f,malformedSchemeSpecific:m,malformedHost:y,malformedScheme:g}=os(e,r);if(o||d||s||f||a||m||l||y||c||g)throw new Error(i.error||p.error||"URI is malformed.");let w=Tm(i,p,r,!0),b=Ll(n&&n.scheme||w.scheme),P=w.host,x=P!==void 0&&P!==""&&(Pm(P)||Em(P).isIPV6);Om(w,n||{},b,x);let R=P&&P.indexOf("%")!==-1&&!new RegExp("\\P{ASCII}","u").test(P);if(w.error&&!R)throw new Error(w.error);return r.skipEscape=!0,Mn(w,r)}function Tm(t,e,n,r){let i={};return r||(t=ss(Mn(t,n),n),e=ss(Mn(e,n),n)),n=n||{},!n.tolerant&&e.scheme?(i.scheme=e.scheme,i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=Ti(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=Ti(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=Ti(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=Ti(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 H1(t,e,n){let r=km(t,n),i=km(e,n);return r!==void 0&&i!==void 0&&r===i}function Mn(t,e){let n={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:""},r=Object.assign({},e),i=[];n.scheme&&(n.scheme=Cm(n.scheme));let o=Ll(r.scheme||n.scheme);o&&o.serialize&&o.serialize(n,r);let s=n.userinfo!==void 0||n.host!==void 0||n.port!==void 0,a=!r.skipEscape&&n.scheme===void 0&&!s;n.path!==void 0&&(r.skipEscape?n.path=Vl(n.path):n.path=$m(n.path,a)),r.reference!=="suffix"&&n.scheme&&(n.scheme=Cm(n.scheme),i.push(n.scheme,":"));let l=M1(n);if(l!==void 0&&(r.reference!=="suffix"&&i.push("//"),i.push(l),n.path&&n.path[0]!=="/"&&i.push("/")),n.path!==void 0){let c=n.path;!r.absolutePath&&(!o||!o.absolutePath)&&(c=Ti(c)),a&&(c=$m(c,!0)),l===void 0&&c[0]==="/"&&c[1]==="/"&&(c="/%2F"+c.slice(2)),i.push(c)}return n.query!==void 0&&i.push("?",L1(n.query)),n.fragment!==void 0&&i.push("#",j1(n.fragment)),i.join("")}var W1=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,U1=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,z1=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function G1(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 Ai(t){if(t===void 0)return!1;let e=t.indexOf("%");for(;e!==-1;){if(e+2>=t.length||!/^[\da-f]{2}$/iu.test(t.slice(e+1,e+3)))return!0;e=t.indexOf("%",e+3)}return!1}function jl(t){return t[0]==="["&&t[t.length-1]==="]"}function J1(t){let e=t[4];return Ai(t[3])||e!==void 0&&!jl(e)&&Ai(e)||Ai(t[6])||Ai(t[7])||Ai(t[8])}function Om(t,e,n,r){if(!e.unicodeSupport&&(!n||!n.unicodeSupport)&&t.host&&!jl(t.host)&&(e.domainHost||n&&n.domainHost)&&r===!1&&F1(t.host))try{t.host=new URL("http://"+t.host).hostname}catch(i){return t.error=t.error||"Host's domain name can not be converted to ASCII: "+i,!0}return!1}function os(t,e){let n=Object.assign({},e),r={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1,o=!1,s=!1,a=!1,l=!1,c=!1,p=!1;n.reference==="suffix"&&(n.scheme?t=n.scheme+":"+t:t="//"+t);let d=t.match(U1);d!==null&&d[1].indexOf("\\")!==-1&&(r.error="URI authority must not contain a literal backslash.",i=!0);let f=t.match(z1);if(f!==null){let y=f[1],g=y.replace(/[\t\n\r]/g,"");g.length>=2&&(g.slice(0,2)!=="//"?(r.error=r.error||"URI authority must not contain a literal backslash.",i=!0):y.length!==g.length&&(r.error=r.error||"URI authority introducer must not contain whitespace.",i=!0))}let m=t.match(W1);if(m){if(r.scheme=m[1],r.userinfo=m[3],r.host=m[4],r.port=parseInt(m[5],10),r.path=m[6]||"",r.query=m[7],r.fragment=m[8],r.scheme!==void 0){let w=unescape(r.scheme);Rm.test(w)?r.scheme=w.toLowerCase():(r.error=r.error||Am,c=!0)}o=J1(m),o&&(r.error=r.error||"URI contains malformed percent-encoding."),isNaN(r.port)&&(r.port=m[5]);let y=G1(r,m);if(y!==void 0&&(r.error=r.error||y,i=!0),r.host)if(Pm(r.host)===!1){let b=jl(r.host),P=r.host.indexOf("[")!==-1||r.host.indexOf("]")!==-1,x=Em(r.host);p=x.isIPV6||x.isIPVFuture===!0,l=P&&(!b||x.error===!0),r.host=p?x.host:x.host.toLowerCase(),l&&(r.error=r.error||"URI host is malformed.",i=!0)}else p=!0;r.scheme===void 0&&r.userinfo===void 0&&r.host===void 0&&r.port===void 0&&r.query===void 0&&!r.path?r.reference="same-document":r.scheme===void 0?r.reference="relative":r.fragment===void 0?r.reference="absolute":r.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==r.reference&&(r.error=r.error||"URI is not a "+n.reference+" reference.");let g=Ll(n.scheme||r.scheme);if(l||(a=Om(r,n,g,p)),t.indexOf("%")!==-1&&r.host!==void 0&&!l){let w=p?r.host:Vl(r.host,!0);p||(w=Vl(w.toLowerCase())),r.host=D1(w,p)}(!g||g&&!g.skipNormalize)&&(r.path&&(r.path=V1(r.path)),r.query&&(r.query=Sm(r.query)),r.fragment&&(r.fragment=Sm(r.fragment))),g&&g.parse&&(g.parse(r,n),g===Im.urn&&r.nid===void 0&&(s=!0))}else r.error=r.error||"URI can not be parsed.";return{parsed:r,malformedAuthorityOrPort:i,malformedPercentEncoding:o,malformedSchemeSpecific:s,malformedHost:a,malformedScheme:c}}function ss(t,e){return os(t,e).parsed}function K1(t,e){return Nm(t,e).normalized}function Nm(t,e){let{parsed:n,malformedAuthorityOrPort:r,malformedPercentEncoding:i,malformedSchemeSpecific:o,malformedHost:s,malformedScheme:a}=os(t,e);return{normalized:r||i||o||s||a?t:Mn(n,e),malformedAuthorityOrPort:r,malformedPercentEncoding:i,malformedSchemeSpecific:o,malformedHost:s,malformedScheme:a}}function km(t,e){if(typeof t!="string"&&typeof t!="object")return;let n;try{n=typeof t=="string"?t:Mn(t,e)}catch{return}let{normalized:r,malformedAuthorityOrPort:i,malformedPercentEncoding:o,malformedSchemeSpecific:s,malformedHost:a,malformedScheme:l}=Nm(n,e);return i||o||s||a||l?void 0:r}var Dl={SCHEMES:Im,normalize:q1,resolve:B1,resolveComponent:Tm,equal:H1,serialize:Mn,parse:ss};as.exports=Dl;as.exports.default=Dl;as.exports.fastUri=Dl});var Lm=S(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});var Vm=Mm();Vm.code='require("ajv/dist/runtime/uri").default';Fl.default=Vm});var Um=S(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.CodeGen=Ae.Name=Ae.nil=Ae.stringify=Ae.str=Ae._=Ae.KeywordCxt=void 0;var Y1=Pi();Object.defineProperty(Ae,"KeywordCxt",{enumerable:!0,get:function(){return Y1.KeywordCxt}});var yr=Z();Object.defineProperty(Ae,"_",{enumerable:!0,get:function(){return yr._}});Object.defineProperty(Ae,"str",{enumerable:!0,get:function(){return yr.str}});Object.defineProperty(Ae,"stringify",{enumerable:!0,get:function(){return yr.stringify}});Object.defineProperty(Ae,"nil",{enumerable:!0,get:function(){return yr.nil}});Object.defineProperty(Ae,"Name",{enumerable:!0,get:function(){return yr.Name}});Object.defineProperty(Ae,"CodeGen",{enumerable:!0,get:function(){return yr.CodeGen}});var X1=ts(),Bm=Ii(),Q1=cl(),Oi=Ri(),Z1=Z(),Ni=Ci(),cs=Si(),Bl=ie(),jm=um(),eS=Lm(),Hm=(t,e)=>new RegExp(t,e);Hm.code="new RegExp";var tS=["removeAdditional","useDefaults","coerceTypes"],nS=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),rS={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."},iS={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Dm=200;function oS(t){var e,n,r,i,o,s,a,l,c,p,d,f,m,y,g,w,b,P,x,R,O,j,U,oe,ge;let xe=t.strict,Re=(e=t.code)===null||e===void 0?void 0:e.optimize,_e=Re===!0||Re===void 0?1:Re||0,Ge=(r=(n=t.code)===null||n===void 0?void 0:n.regExp)!==null&&r!==void 0?r:Hm,de=(i=t.uriResolver)!==null&&i!==void 0?i:eS.default;return{strictSchema:(s=(o=t.strictSchema)!==null&&o!==void 0?o:xe)!==null&&s!==void 0?s:!0,strictNumbers:(l=(a=t.strictNumbers)!==null&&a!==void 0?a:xe)!==null&&l!==void 0?l:!0,strictTypes:(p=(c=t.strictTypes)!==null&&c!==void 0?c:xe)!==null&&p!==void 0?p:"log",strictTuples:(f=(d=t.strictTuples)!==null&&d!==void 0?d:xe)!==null&&f!==void 0?f:"log",strictRequired:(y=(m=t.strictRequired)!==null&&m!==void 0?m:xe)!==null&&y!==void 0?y:!1,code:t.code?{...t.code,optimize:_e,regExp:Ge}:{optimize:_e,regExp:Ge},loopRequired:(g=t.loopRequired)!==null&&g!==void 0?g:Dm,loopEnum:(w=t.loopEnum)!==null&&w!==void 0?w:Dm,meta:(b=t.meta)!==null&&b!==void 0?b:!0,messages:(P=t.messages)!==null&&P!==void 0?P:!0,inlineRefs:(x=t.inlineRefs)!==null&&x!==void 0?x:!0,schemaId:(R=t.schemaId)!==null&&R!==void 0?R:"$id",addUsedSchema:(O=t.addUsedSchema)!==null&&O!==void 0?O:!0,validateSchema:(j=t.validateSchema)!==null&&j!==void 0?j:!0,validateFormats:(U=t.validateFormats)!==null&&U!==void 0?U:!0,unicodeRegExp:(oe=t.unicodeRegExp)!==null&&oe!==void 0?oe:!0,int32range:(ge=t.int32range)!==null&&ge!==void 0?ge:!0,uriResolver:de}}var Mi=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,...oS(e)};let{es5:n,lines:r}=this.opts.code;this.scope=new Z1.ValueScope({scope:{},prefixes:nS,es5:n,lines:r}),this.logger=pS(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,Q1.getRules)(),Fm.call(this,rS,e,"NOT SUPPORTED"),Fm.call(this,iS,e,"DEPRECATED","warn"),this._metaOpts=lS.call(this),e.formats&&aS.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&cS.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),sS.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:n,schemaId:r}=this.opts,i=jm;r==="id"&&(i={...jm},i.id=i.$id,delete i.$id),n&&e&&this.addMetaSchema(i,i[r],!1)}defaultMeta(){let{meta:e,schemaId:n}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[n]||e:void 0}validate(e,n){let r;if(typeof e=="string"){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let i=r(n);return"$async"in r||(this.errors=r.errors),i}compile(e,n){let r=this._addSchema(e,n);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,n){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return i.call(this,e,n);async function i(p,d){await o.call(this,p.$schema);let f=this._addSchema(p,d);return f.validate||s.call(this,f)}async function o(p){p&&!this.getSchema(p)&&await i.call(this,{$ref:p},!0)}async function s(p){try{return this._compileSchemaEnv(p)}catch(d){if(!(d instanceof Bm.default))throw d;return a.call(this,d),await l.call(this,d.missingSchema),s.call(this,p)}}function a({missingSchema:p,missingRef:d}){if(this.refs[p])throw new Error(`AnySchema ${p} is loaded but ${d} cannot be resolved`)}async function l(p){let d=await c.call(this,p);this.refs[p]||await o.call(this,d.$schema),this.refs[p]||this.addSchema(d,p,n)}async function c(p){let d=this._loading[p];if(d)return d;try{return await(this._loading[p]=r(p))}finally{delete this._loading[p]}}}addSchema(e,n,r,i=this.opts.validateSchema){if(Array.isArray(e)){for(let s of e)this.addSchema(s,void 0,r,i);return this}let o;if(typeof e=="object"){let{schemaId:s}=this.opts;if(o=e[s],o!==void 0&&typeof o!="string")throw new Error(`schema ${s} must be string`)}return n=(0,Ni.normalizeId)(n||o),this._checkUnique(n),this.schemas[n]=this._addSchema(e,r,n,i,!0),this}addMetaSchema(e,n,r=this.opts.validateSchema){return this.addSchema(e,n,!0,r),this}validateSchema(e,n){if(typeof e=="boolean")return!0;let r;if(r=e.$schema,r!==void 0&&typeof r!="string")throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(r,e);if(!i&&n){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return i}getSchema(e){let n;for(;typeof(n=qm.call(this,e))=="string";)e=n;if(n===void 0){let{schemaId:r}=this.opts,i=new Oi.SchemaEnv({schema:{},schemaId:r});if(n=Oi.resolveSchema.call(this,i,e),!n)return;this.refs[e]=n}return n.validate||this._compileSchemaEnv(n)}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 n=qm.call(this,e);return typeof n=="object"&&this._cache.delete(n.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let n=e;this._cache.delete(n);let r=e[this.opts.schemaId];return r&&(r=(0,Ni.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let n of e)this.addKeyword(n);return this}addKeyword(e,n){let r;if(typeof e=="string")r=e,typeof n=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),n.keyword=r);else if(typeof e=="object"&&n===void 0){if(n=e,r=n.keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(fS.call(this,r,n),!n)return(0,Bl.eachItem)(r,o=>ql.call(this,o)),this;mS.call(this,n);let i={...n,type:(0,cs.getJSONTypes)(n.type),schemaType:(0,cs.getJSONTypes)(n.schemaType)};return(0,Bl.eachItem)(r,i.type.length===0?o=>ql.call(this,o,i):o=>i.type.forEach(s=>ql.call(this,o,i,s))),this}getKeyword(e){let n=this.RULES.all[e];return typeof n=="object"?n.definition:!!n}removeKeyword(e){let{RULES:n}=this;delete n.keywords[e],delete n.all[e];for(let r of n.rules){let i=r.rules.findIndex(o=>o.keyword===e);i>=0&&r.rules.splice(i,1)}return this}addFormat(e,n){return typeof n=="string"&&(n=new RegExp(n)),this.formats[e]=n,this}errorsText(e=this.errors,{separator:n=", ",dataVar:r="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${r}${i.instancePath} ${i.message}`).reduce((i,o)=>i+n+o)}$dataMetaSchema(e,n){let r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of n){let o=i.split("/").slice(1),s=e;for(let a of o)s=s[a];for(let a in r){let l=r[a];if(typeof l!="object")continue;let{$data:c}=l.definition,p=s[a];c&&p&&(s[a]=Wm(p))}}return e}_removeAllSchemas(e,n){for(let r in e){let i=e[r];(!n||n.test(r))&&(typeof i=="string"?delete e[r]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[r]))}}_addSchema(e,n,r,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof e=="object")s=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;r=(0,Ni.normalizeId)(s||r);let c=Ni.getSchemaRefs.call(this,e,r);return l=new Oi.SchemaEnv({schema:e,schemaId:a,meta:n,baseId:r,localRefs:c}),this._cache.set(l.schema,l),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=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):Oi.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let n=this.opts;this.opts=this._metaOpts;try{Oi.compileSchema.call(this,e)}finally{this.opts=n}}};Mi.ValidationError=X1.default;Mi.MissingRefError=Bm.default;Ae.default=Mi;function Fm(t,e,n,r="error"){for(let i in t){let o=i;o in e&&this.logger[r](`${n}: option ${i}. ${t[o]}`)}}function qm(t){return t=(0,Ni.normalizeId)(t),this.schemas[t]||this.refs[t]}function sS(){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 aS(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function cS(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 n=t[e];n.keyword||(n.keyword=e),this.addKeyword(n)}}function lS(){let t={...this.opts};for(let e of tS)delete t[e];return t}var uS={log(){},warn(){},error(){}};function pS(t){if(t===!1)return uS;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 dS=/^[a-z_$][a-z0-9_$:-]*$/i;function fS(t,e){let{RULES:n}=this;if((0,Bl.eachItem)(t,r=>{if(n.keywords[r])throw new Error(`Keyword ${r} is already defined`);if(!dS.test(r))throw new Error(`Keyword ${r} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function ql(t,e,n){var r;let i=e?.post;if(n&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,s=i?o.post:o.rules.find(({type:l})=>l===n);if(s||(s={type:n,rules:[]},o.rules.push(s)),o.keywords[t]=!0,!e)return;let a={keyword:t,definition:{...e,type:(0,cs.getJSONTypes)(e.type),schemaType:(0,cs.getJSONTypes)(e.schemaType)}};e.before?hS.call(this,s,a,e.before):s.rules.push(a),o.all[t]=a,(r=e.implements)===null||r===void 0||r.forEach(l=>this.addKeyword(l))}function hS(t,e,n){let r=t.rules.findIndex(i=>i.keyword===n);r>=0?t.rules.splice(r,0,e):(t.rules.push(e),this.logger.warn(`rule ${n} is not defined`))}function mS(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=Wm(e)),t.validateSchema=this.compile(e,!0))}var gS={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Wm(t){return{anyOf:[t,gS]}}});var zm=S(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});var yS={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Hl.default=yS});var ps=S(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.callRef=Vn.getValidate=void 0;var wS=Ii(),Gm=mt(),Ze=Z(),wr=ht(),Jm=Ri(),ls=ie(),vS={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:n,it:r}=t,{baseId:i,schemaEnv:o,validateName:s,opts:a,self:l}=r,{root:c}=o;if((n==="#"||n==="#/")&&i===c.baseId)return d();let p=Jm.resolveRef.call(l,c,i,n);if(p===void 0)throw new wS.default(r.opts.uriResolver,i,n);if(p instanceof Jm.SchemaEnv)return f(p);return m(p);function d(){if(o===c)return us(t,s,o,o.$async);let y=e.scopeValue("root",{ref:c});return us(t,(0,Ze._)`${y}.validate`,c,c.$async)}function f(y){let g=Km(t,y);us(t,g,y,y.$async)}function m(y){let g=e.scopeValue("schema",a.code.source===!0?{ref:y,code:(0,Ze.stringify)(y)}:{ref:y}),w=e.name("valid"),b=t.subschema({schema:y,dataTypes:[],schemaPath:Ze.nil,topSchemaRef:g,errSchemaPath:n},w);t.mergeEvaluated(b),t.ok(w)}}};function Km(t,e){let{gen:n}=t;return e.validate?n.scopeValue("validate",{ref:e.validate}):(0,Ze._)`${n.scopeValue("wrapper",{ref:e})}.validate`}Vn.getValidate=Km;function us(t,e,n,r){let{gen:i,it:o}=t,{allErrors:s,schemaEnv:a,opts:l}=o,c=l.passContext?wr.default.this:Ze.nil;r?p():d();function p(){if(!a.$async)throw new Error("async schema referenced by sync schema");let y=i.let("valid");i.try(()=>{i.code((0,Ze._)`await ${(0,Gm.callValidateCode)(t,e,c)}`),m(e),s||i.assign(y,!0)},g=>{i.if((0,Ze._)`!(${g} instanceof ${o.ValidationError})`,()=>i.throw(g)),f(g),s||i.assign(y,!1)}),t.ok(y)}function d(){t.result((0,Gm.callValidateCode)(t,e,c),()=>m(e),()=>f(e))}function f(y){let g=(0,Ze._)`${y}.errors`;i.assign(wr.default.vErrors,(0,Ze._)`${wr.default.vErrors} === null ? ${g} : ${wr.default.vErrors}.concat(${g})`),i.assign(wr.default.errors,(0,Ze._)`${wr.default.vErrors}.length`)}function m(y){var g;if(!o.opts.unevaluated)return;let w=(g=n?.validate)===null||g===void 0?void 0:g.evaluated;if(o.props!==!0)if(w&&!w.dynamicProps)w.props!==void 0&&(o.props=ls.mergeEvaluated.props(i,w.props,o.props));else{let b=i.var("props",(0,Ze._)`${y}.evaluated.props`);o.props=ls.mergeEvaluated.props(i,b,o.props,Ze.Name)}if(o.items!==!0)if(w&&!w.dynamicItems)w.items!==void 0&&(o.items=ls.mergeEvaluated.items(i,w.items,o.items));else{let b=i.var("items",(0,Ze._)`${y}.evaluated.items`);o.items=ls.mergeEvaluated.items(i,b,o.items,Ze.Name)}}}Vn.callRef=us;Vn.default=vS});var Ym=S(Wl=>{"use strict";Object.defineProperty(Wl,"__esModule",{value:!0});var bS=zm(),_S=ps(),xS=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",bS.default,_S.default];Wl.default=xS});var Xm=S(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});var ds=Z(),wn=ds.operators,fs={maximum:{okStr:"<=",ok:wn.LTE,fail:wn.GT},minimum:{okStr:">=",ok:wn.GTE,fail:wn.LT},exclusiveMaximum:{okStr:"<",ok:wn.LT,fail:wn.GTE},exclusiveMinimum:{okStr:">",ok:wn.GT,fail:wn.LTE}},$S={message:({keyword:t,schemaCode:e})=>(0,ds.str)`must be ${fs[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,ds._)`{comparison: ${fs[t].okStr}, limit: ${e}}`},SS={keyword:Object.keys(fs),type:"number",schemaType:"number",$data:!0,error:$S,code(t){let{keyword:e,data:n,schemaCode:r}=t;t.fail$data((0,ds._)`${n} ${fs[e].fail} ${r} || isNaN(${n})`)}};Ul.default=SS});var Qm=S(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});var Vi=Z(),CS={message:({schemaCode:t})=>(0,Vi.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Vi._)`{multipleOf: ${t}}`},kS={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:CS,code(t){let{gen:e,data:n,schemaCode:r,it:i}=t,o=i.opts.multipleOfPrecision,s=e.let("res"),a=o?(0,Vi._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,Vi._)`${s} !== parseInt(${s})`;t.fail$data((0,Vi._)`(${r} === 0 || (${s} = ${n}/${r}, ${a}))`)}};zl.default=kS});var eg=S(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});function Zm(t){let e=t.length,n=0,r=0,i;for(;r<e;)n++,i=t.charCodeAt(r++),i>=55296&&i<=56319&&r<e&&(i=t.charCodeAt(r),(i&64512)===56320&&r++);return n}Gl.default=Zm;Zm.code='require("ajv/dist/runtime/ucs2length").default'});var tg=S(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});var Ln=Z(),ES=ie(),PS=eg(),IS={message({keyword:t,schemaCode:e}){let n=t==="maxLength"?"more":"fewer";return(0,Ln.str)`must NOT have ${n} than ${e} characters`},params:({schemaCode:t})=>(0,Ln._)`{limit: ${t}}`},RS={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:IS,code(t){let{keyword:e,data:n,schemaCode:r,it:i}=t,o=e==="maxLength"?Ln.operators.GT:Ln.operators.LT,s=i.opts.unicode===!1?(0,Ln._)`${n}.length`:(0,Ln._)`${(0,ES.useFunc)(t.gen,PS.default)}(${n})`;t.fail$data((0,Ln._)`${s} ${o} ${r}`)}};Jl.default=RS});var ng=S(Kl=>{"use strict";Object.defineProperty(Kl,"__esModule",{value:!0});var AS=mt(),TS=ie(),vr=Z(),OS={message:({schemaCode:t})=>(0,vr.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,vr._)`{pattern: ${t}}`},NS={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:OS,code(t){let{gen:e,data:n,$data:r,schema:i,schemaCode:o,it:s}=t,a=s.opts.unicodeRegExp?"u":"";if(r){let{regExp:l}=s.opts.code,c=l.code==="new RegExp"?(0,vr._)`new RegExp`:(0,TS.useFunc)(e,l),p=e.let("valid");e.try(()=>e.assign(p,(0,vr._)`${c}(${o}, ${a}).test(${n})`),()=>e.assign(p,!1)),t.fail$data((0,vr._)`!${p}`)}else{let l=(0,AS.usePattern)(t,i);t.fail$data((0,vr._)`!${l}.test(${n})`)}}};Kl.default=NS});var rg=S(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});var Li=Z(),MS={message({keyword:t,schemaCode:e}){let n=t==="maxProperties"?"more":"fewer";return(0,Li.str)`must NOT have ${n} than ${e} properties`},params:({schemaCode:t})=>(0,Li._)`{limit: ${t}}`},VS={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:MS,code(t){let{keyword:e,data:n,schemaCode:r}=t,i=e==="maxProperties"?Li.operators.GT:Li.operators.LT;t.fail$data((0,Li._)`Object.keys(${n}).length ${i} ${r}`)}};Yl.default=VS});var ig=S(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});var ji=mt(),Di=Z(),LS=ie(),jS={message:({params:{missingProperty:t}})=>(0,Di.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Di._)`{missingProperty: ${t}}`},DS={keyword:"required",type:"object",schemaType:"array",$data:!0,error:jS,code(t){let{gen:e,schema:n,schemaCode:r,data:i,$data:o,it:s}=t,{opts:a}=s;if(!o&&n.length===0)return;let l=n.length>=a.loopRequired;if(s.allErrors?c():p(),a.strictRequired){let m=t.parentSchema.properties,{definedProperties:y}=t.it;for(let g of n)if(m?.[g]===void 0&&!y.has(g)){let w=s.schemaEnv.baseId+s.errSchemaPath,b=`required property "${g}" is not defined at "${w}" (strictRequired)`;(0,LS.checkStrictMode)(s,b,s.opts.strictRequired)}}function c(){if(l||o)t.block$data(Di.nil,d);else for(let m of n)(0,ji.checkReportMissingProp)(t,m)}function p(){let m=e.let("missing");if(l||o){let y=e.let("valid",!0);t.block$data(y,()=>f(m,y)),t.ok(y)}else e.if((0,ji.checkMissingProp)(t,n,m)),(0,ji.reportMissingProp)(t,m),e.else()}function d(){e.forOf("prop",r,m=>{t.setParams({missingProperty:m}),e.if((0,ji.noPropertyInData)(e,i,m,a.ownProperties),()=>t.error())})}function f(m,y){t.setParams({missingProperty:m}),e.forOf(m,r,()=>{e.assign(y,(0,ji.propertyInData)(e,i,m,a.ownProperties)),e.if((0,Di.not)(y),()=>{t.error(),e.break()})},Di.nil)}}};Xl.default=DS});var og=S(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});var Fi=Z(),FS={message({keyword:t,schemaCode:e}){let n=t==="maxItems"?"more":"fewer";return(0,Fi.str)`must NOT have ${n} than ${e} items`},params:({schemaCode:t})=>(0,Fi._)`{limit: ${t}}`},qS={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:FS,code(t){let{keyword:e,data:n,schemaCode:r}=t,i=e==="maxItems"?Fi.operators.GT:Fi.operators.LT;t.fail$data((0,Fi._)`${n}.length ${i} ${r}`)}};Ql.default=qS});var hs=S(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});var sg=gl();sg.code='require("ajv/dist/runtime/equal").default';Zl.default=sg});var ag=S(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});var eu=Si(),Te=Z(),BS=ie(),HS=hs(),WS={message:({params:{i:t,j:e}})=>(0,Te.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Te._)`{i: ${t}, j: ${e}}`},US={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:WS,code(t){let{gen:e,data:n,$data:r,schema:i,parentSchema:o,schemaCode:s,it:a}=t;if(!r&&!i)return;let l=e.let("valid"),c=o.items?(0,eu.getSchemaTypes)(o.items):[];t.block$data(l,p,(0,Te._)`${s} === false`),t.ok(l);function p(){let y=e.let("i",(0,Te._)`${n}.length`),g=e.let("j");t.setParams({i:y,j:g}),e.assign(l,!0),e.if((0,Te._)`${y} > 1`,()=>(d()?f:m)(y,g))}function d(){return c.length>0&&!c.some(y=>y==="object"||y==="array")}function f(y,g){let w=e.name("item"),b=(0,eu.checkDataTypes)(c,w,a.opts.strictNumbers,eu.DataType.Wrong),P=e.const("indices",(0,Te._)`{}`);e.for((0,Te._)`;${y}--;`,()=>{e.let(w,(0,Te._)`${n}[${y}]`),e.if(b,(0,Te._)`continue`),c.length>1&&e.if((0,Te._)`typeof ${w} == "string"`,(0,Te._)`${w} += "_"`),e.if((0,Te._)`typeof ${P}[${w}] == "number"`,()=>{e.assign(g,(0,Te._)`${P}[${w}]`),t.error(),e.assign(l,!1).break()}).code((0,Te._)`${P}[${w}] = ${y}`)})}function m(y,g){let w=(0,BS.useFunc)(e,HS.default),b=e.name("outer");e.label(b).for((0,Te._)`;${y}--;`,()=>e.for((0,Te._)`${g} = ${y}; ${g}--;`,()=>e.if((0,Te._)`${w}(${n}[${y}], ${n}[${g}])`,()=>{t.error(),e.assign(l,!1).break(b)})))}}};tu.default=US});var cg=S(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});var nu=Z(),zS=ie(),GS=hs(),JS={message:"must be equal to constant",params:({schemaCode:t})=>(0,nu._)`{allowedValue: ${t}}`},KS={keyword:"const",$data:!0,error:JS,code(t){let{gen:e,data:n,$data:r,schemaCode:i,schema:o}=t;r||o&&typeof o=="object"?t.fail$data((0,nu._)`!${(0,zS.useFunc)(e,GS.default)}(${n}, ${i})`):t.fail((0,nu._)`${o} !== ${n}`)}};ru.default=KS});var lg=S(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});var qi=Z(),YS=ie(),XS=hs(),QS={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,qi._)`{allowedValues: ${t}}`},ZS={keyword:"enum",schemaType:"array",$data:!0,error:QS,code(t){let{gen:e,data:n,$data:r,schema:i,schemaCode:o,it:s}=t;if(!r&&i.length===0)throw new Error("enum must have non-empty array");let a=i.length>=s.opts.loopEnum,l,c=()=>l??(l=(0,YS.useFunc)(e,XS.default)),p;if(a||r)p=e.let("valid"),t.block$data(p,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=e.const("vSchema",o);p=(0,qi.or)(...i.map((y,g)=>f(m,g)))}t.pass(p);function d(){e.assign(p,!1),e.forOf("v",o,m=>e.if((0,qi._)`${c()}(${n}, ${m})`,()=>e.assign(p,!0).break()))}function f(m,y){let g=i[y];return typeof g=="object"&&g!==null?(0,qi._)`${c()}(${n}, ${m}[${y}])`:(0,qi._)`${n} === ${g}`}}};iu.default=ZS});var ug=S(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});var e2=Xm(),t2=Qm(),n2=tg(),r2=ng(),i2=rg(),o2=ig(),s2=og(),a2=ag(),c2=cg(),l2=lg(),u2=[e2.default,t2.default,n2.default,r2.default,i2.default,o2.default,s2.default,a2.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c2.default,l2.default];ou.default=u2});var au=S(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.validateAdditionalItems=void 0;var jn=Z(),su=ie(),p2={message:({params:{len:t}})=>(0,jn.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,jn._)`{limit: ${t}}`},d2={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:p2,code(t){let{parentSchema:e,it:n}=t,{items:r}=e;if(!Array.isArray(r)){(0,su.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}pg(t,r)}};function pg(t,e){let{gen:n,schema:r,data:i,keyword:o,it:s}=t;s.items=!0;let a=n.const("len",(0,jn._)`${i}.length`);if(r===!1)t.setParams({len:e.length}),t.pass((0,jn._)`${a} <= ${e.length}`);else if(typeof r=="object"&&!(0,su.alwaysValidSchema)(s,r)){let c=n.var("valid",(0,jn._)`${a} <= ${e.length}`);n.if((0,jn.not)(c),()=>l(c)),t.ok(c)}function l(c){n.forRange("i",e.length,a,p=>{t.subschema({keyword:o,dataProp:p,dataPropType:su.Type.Num},c),s.allErrors||n.if((0,jn.not)(c),()=>n.break())})}}Bi.validateAdditionalItems=pg;Bi.default=d2});var cu=S(Hi=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.validateTuple=void 0;var dg=Z(),ms=ie(),f2=mt(),h2={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:n}=t;if(Array.isArray(e))return fg(t,"additionalItems",e);n.items=!0,!(0,ms.alwaysValidSchema)(n,e)&&t.ok((0,f2.validateArray)(t))}};function fg(t,e,n=t.schema){let{gen:r,parentSchema:i,data:o,keyword:s,it:a}=t;p(i),a.opts.unevaluated&&n.length&&a.items!==!0&&(a.items=ms.mergeEvaluated.items(r,n.length,a.items));let l=r.name("valid"),c=r.const("len",(0,dg._)`${o}.length`);n.forEach((d,f)=>{(0,ms.alwaysValidSchema)(a,d)||(r.if((0,dg._)`${c} > ${f}`,()=>t.subschema({keyword:s,schemaProp:f,dataProp:f},l)),t.ok(l))});function p(d){let{opts:f,errSchemaPath:m}=a,y=n.length,g=y===d.minItems&&(y===d.maxItems||d[e]===!1);if(f.strictTuples&&!g){let w=`"${s}" is ${y}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,ms.checkStrictMode)(a,w,f.strictTuples)}}}Hi.validateTuple=fg;Hi.default=h2});var hg=S(lu=>{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});var m2=cu(),g2={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,m2.validateTuple)(t,"items")};lu.default=g2});var gg=S(uu=>{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});var mg=Z(),y2=ie(),w2=mt(),v2=au(),b2={message:({params:{len:t}})=>(0,mg.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,mg._)`{limit: ${t}}`},_2={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:b2,code(t){let{schema:e,parentSchema:n,it:r}=t,{prefixItems:i}=n;r.items=!0,!(0,y2.alwaysValidSchema)(r,e)&&(i?(0,v2.validateAdditionalItems)(t,i):t.ok((0,w2.validateArray)(t)))}};uu.default=_2});var yg=S(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});var yt=Z(),gs=ie(),x2={message:({params:{min:t,max:e}})=>e===void 0?(0,yt.str)`must contain at least ${t} valid item(s)`:(0,yt.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,yt._)`{minContains: ${t}}`:(0,yt._)`{minContains: ${t}, maxContains: ${e}}`},$2={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:x2,code(t){let{gen:e,schema:n,parentSchema:r,data:i,it:o}=t,s,a,{minContains:l,maxContains:c}=r;o.opts.next?(s=l===void 0?1:l,a=c):s=1;let p=e.const("len",(0,yt._)`${i}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,gs.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,gs.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,gs.alwaysValidSchema)(o,n)){let g=(0,yt._)`${p} >= ${s}`;a!==void 0&&(g=(0,yt._)`${g} && ${p} <= ${a}`),t.pass(g);return}o.items=!0;let d=e.name("valid");a===void 0&&s===1?m(d,()=>e.if(d,()=>e.break())):s===0?(e.let(d,!0),a!==void 0&&e.if((0,yt._)`${i}.length > 0`,f)):(e.let(d,!1),f()),t.result(d,()=>t.reset());function f(){let g=e.name("_valid"),w=e.let("count",0);m(g,()=>e.if(g,()=>y(w)))}function m(g,w){e.forRange("i",0,p,b=>{t.subschema({keyword:"contains",dataProp:b,dataPropType:gs.Type.Num,compositeRule:!0},g),w()})}function y(g){e.code((0,yt._)`${g}++`),a===void 0?e.if((0,yt._)`${g} >= ${s}`,()=>e.assign(d,!0).break()):(e.if((0,yt._)`${g} > ${a}`,()=>e.assign(d,!1).break()),s===1?e.assign(d,!0):e.if((0,yt._)`${g} >= ${s}`,()=>e.assign(d,!0)))}}};pu.default=$2});var ys=S(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.validateSchemaDeps=Nt.validatePropertyDeps=Nt.error=void 0;var du=Z(),S2=ie(),Wi=mt();Nt.error={message:({params:{property:t,depsCount:e,deps:n}})=>{let r=e===1?"property":"properties";return(0,du.str)`must have ${r} ${n} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:n,missingProperty:r}})=>(0,du._)`{property: ${t},
65
65
  missingProperty: ${r},
66
66
  depsCount: ${e},
67
- deps: ${n}}`};var y2={keyword:"dependencies",type:"object",schemaType:"object",error:Tt.error,code(t){let[e,n]=w2(t);fg(t,e),hg(t,n)}};function w2({schema:t}){let e={},n={};for(let r in t){if(r==="__proto__")continue;let i=Array.isArray(t[r])?e:n;i[r]=t[r]}return[e,n]}function fg(t,e=t.schema){let{gen:n,data:r,it:i}=t;if(Object.keys(e).length===0)return;let o=n.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let c=(0,qi.propertyInData)(n,r,s,i.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),i.allErrors?n.if(c,()=>{for(let l of a)(0,qi.checkReportMissingProp)(t,l)}):(n.if((0,iu._)`${c} && (${(0,qi.checkMissingProp)(t,a,o)})`),(0,qi.reportMissingProp)(t,o),n.else())}}Tt.validatePropertyDeps=fg;function hg(t,e=t.schema){let{gen:n,data:r,keyword:i,it:o}=t,s=n.name("valid");for(let a in e)(0,g2.alwaysValidSchema)(o,e[a])||(n.if((0,qi.propertyInData)(n,r,a,o.opts.ownProperties),()=>{let c=t.subschema({keyword:i,schemaProp:a},s);t.mergeValidEvaluated(c,s)},()=>n.var(s,!0)),t.ok(s))}Tt.validateSchemaDeps=hg;Tt.default=y2});var gg=S(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});var mg=Z(),v2=ie(),b2={message:"property name must be valid",params:({params:t})=>(0,mg._)`{propertyName: ${t.propertyName}}`},_2={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:b2,code(t){let{gen:e,schema:n,data:r,it:i}=t;if((0,v2.alwaysValidSchema)(i,n))return;let o=e.name("valid");e.forIn("key",r,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),e.if((0,mg.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};ou.default=_2});var au=S(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});var hs=dt(),St=Z(),x2=pt(),ms=ie(),$2={message:"must NOT have additional properties",params:({params:t})=>(0,St._)`{additionalProperty: ${t.additionalProperty}}`},S2={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:$2,code(t){let{gen:e,schema:n,parentSchema:r,data:i,errsCount:o,it:s}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,ms.alwaysValidSchema)(s,n))return;let l=(0,hs.allSchemaProperties)(r.properties),d=(0,hs.allSchemaProperties)(r.patternProperties);p(),t.ok((0,St._)`${o} === ${x2.default.errors}`);function p(){e.forIn("key",i,w=>{!l.length&&!d.length?y(w):e.if(f(w),()=>y(w))})}function f(w){let b;if(l.length>8){let P=(0,ms.schemaRefOrVal)(s,r.properties,"properties");b=(0,hs.isOwnProperty)(e,P,w)}else l.length?b=(0,St.or)(...l.map(P=>(0,St._)`${w} === ${P}`)):b=St.nil;return d.length&&(b=(0,St.or)(b,...d.map(P=>(0,St._)`${(0,hs.usePattern)(t,P)}.test(${w})`))),(0,St.not)(b)}function m(w){e.code((0,St._)`delete ${i}[${w}]`)}function y(w){if(c.removeAdditional==="all"||c.removeAdditional&&n===!1){m(w);return}if(n===!1){t.setParams({additionalProperty:w}),t.error(),a||e.break();return}if(typeof n=="object"&&!(0,ms.alwaysValidSchema)(s,n)){let b=e.name("valid");c.removeAdditional==="failing"?(g(w,b,!1),e.if((0,St.not)(b),()=>{t.reset(),m(w)})):(g(w,b),a||e.if((0,St.not)(b),()=>e.break()))}}function g(w,b,P){let x={keyword:"additionalProperties",dataProp:w,dataPropType:ms.Type.Str};P===!1&&Object.assign(x,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(x,b)}}};su.default=S2});var vg=S(lu=>{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});var C2=Ci(),yg=dt(),cu=ie(),wg=au(),k2={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,parentSchema:r,data:i,it:o}=t;o.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&wg.default.code(new C2.KeywordCxt(o,wg.default,"additionalProperties"));let s=(0,yg.allSchemaProperties)(n);for(let p of s)o.definedProperties.add(p);o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=cu.mergeEvaluated.props(e,(0,cu.toHash)(s),o.props));let a=s.filter(p=>!(0,cu.alwaysValidSchema)(o,n[p]));if(a.length===0)return;let c=e.name("valid");for(let p of a)l(p)?d(p):(e.if((0,yg.propertyInData)(e,i,p,o.opts.ownProperties)),d(p),o.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(p),t.ok(c);function l(p){return o.opts.useDefaults&&!o.compositeRule&&n[p].default!==void 0}function d(p){t.subschema({keyword:"properties",schemaProp:p,dataProp:p},c)}}};lu.default=k2});var $g=S(uu=>{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});var bg=dt(),gs=Z(),_g=ie(),xg=ie(),E2={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,data:r,parentSchema:i,it:o}=t,{opts:s}=o,a=(0,bg.allSchemaProperties)(n),c=a.filter(g=>(0,_g.alwaysValidSchema)(o,n[g]));if(a.length===0||c.length===a.length&&(!o.opts.unevaluated||o.props===!0))return;let l=s.strictSchema&&!s.allowMatchingProperties&&i.properties,d=e.name("valid");o.props!==!0&&!(o.props instanceof gs.Name)&&(o.props=(0,xg.evaluatedPropsToName)(e,o.props));let{props:p}=o;f();function f(){for(let g of a)l&&m(g),o.allErrors?y(g):(e.var(d,!0),y(g),e.if(d))}function m(g){for(let w in l)new RegExp(g).test(w)&&(0,_g.checkStrictMode)(o,`property ${w} matches pattern ${g} (use allowMatchingProperties)`)}function y(g){e.forIn("key",r,w=>{e.if((0,gs._)`${(0,bg.usePattern)(t,g)}.test(${w})`,()=>{let b=c.includes(g);b||t.subschema({keyword:"patternProperties",schemaProp:g,dataProp:w,dataPropType:xg.Type.Str},d),o.opts.unevaluated&&p!==!0?e.assign((0,gs._)`${p}[${w}]`,!0):!b&&!o.allErrors&&e.if((0,gs.not)(d),()=>e.break())})})}}};uu.default=E2});var Sg=S(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});var P2=ie(),I2={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:n,it:r}=t;if((0,P2.alwaysValidSchema)(r,n)){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"}};pu.default=I2});var Cg=S(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});var R2=dt(),A2={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:R2.validateUnion,error:{message:"must match a schema in anyOf"}};du.default=A2});var kg=S(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});var ys=Z(),T2=ie(),O2={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,ys._)`{passingSchemas: ${t.passing}}`},N2={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:O2,code(t){let{gen:e,schema:n,parentSchema:r,it:i}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(i.opts.discriminator&&r.discriminator)return;let o=n,s=e.let("valid",!1),a=e.let("passing",null),c=e.name("_valid");t.setParams({passing:a}),e.block(l),t.result(s,()=>t.reset(),()=>t.error(!0));function l(){o.forEach((d,p)=>{let f;(0,T2.alwaysValidSchema)(i,d)?e.var(c,!0):f=t.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},c),p>0&&e.if((0,ys._)`${c} && ${s}`).assign(s,!1).assign(a,(0,ys._)`[${a}, ${p}]`).else(),e.if(c,()=>{e.assign(s,!0),e.assign(a,p),f&&t.mergeEvaluated(f,ys.Name)})})}}};fu.default=N2});var Eg=S(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});var M2=ie(),V2={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:n,it:r}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");let i=e.name("valid");n.forEach((o,s)=>{if((0,M2.alwaysValidSchema)(r,o))return;let a=t.subschema({keyword:"allOf",schemaProp:s},i);t.ok(i),t.mergeEvaluated(a)})}};hu.default=V2});var Rg=S(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});var ws=Z(),Ig=ie(),L2={message:({params:t})=>(0,ws.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,ws._)`{failingKeyword: ${t.ifClause}}`},j2={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:L2,code(t){let{gen:e,parentSchema:n,it:r}=t;n.then===void 0&&n.else===void 0&&(0,Ig.checkStrictMode)(r,'"if" without "then" and "else" is ignored');let i=Pg(r,"then"),o=Pg(r,"else");if(!i&&!o)return;let s=e.let("valid",!0),a=e.name("_valid");if(c(),t.reset(),i&&o){let d=e.let("ifClause");t.setParams({ifClause:d}),e.if(a,l("then",d),l("else",d))}else i?e.if(a,l("then")):e.if((0,ws.not)(a),l("else"));t.pass(s,()=>t.error(!0));function c(){let d=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(d)}function l(d,p){return()=>{let f=t.subschema({keyword:d},a);e.assign(s,a),t.mergeValidEvaluated(f,s),p?e.assign(p,(0,ws._)`${d}`):t.setParams({ifClause:d})}}}};function Pg(t,e){let n=t.schema[e];return n!==void 0&&!(0,Ig.alwaysValidSchema)(t,n)}mu.default=j2});var Ag=S(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});var D2=ie(),F2={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:n}){e.if===void 0&&(0,D2.checkStrictMode)(n,`"${t}" without "if" is ignored`)}};gu.default=F2});var Tg=S(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});var q2=Zl(),B2=lg(),H2=eu(),W2=pg(),U2=dg(),z2=fs(),G2=gg(),J2=au(),K2=vg(),Y2=$g(),X2=Sg(),Q2=Cg(),Z2=kg(),eC=Eg(),tC=Rg(),nC=Ag();function rC(t=!1){let e=[X2.default,Q2.default,Z2.default,eC.default,tC.default,nC.default,G2.default,J2.default,z2.default,K2.default,Y2.default];return t?e.push(B2.default,W2.default):e.push(q2.default,H2.default),e.push(U2.default),e}yu.default=rC});var vu=S(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.dynamicAnchor=void 0;var wu=Z(),iC=pt(),Og=Ei(),oC=as(),sC={keyword:"$dynamicAnchor",schemaType:"string",code:t=>Ng(t,t.schema)};function Ng(t,e){let{gen:n,it:r}=t;r.schemaEnv.root.dynamicAnchors[e]=!0;let i=(0,wu._)`${iC.default.dynamicAnchors}${(0,wu.getProperty)(e)}`,o=r.errSchemaPath==="#"?r.validateName:aC(t);n.if((0,wu._)`!${i}`,()=>n.assign(i,o))}Bi.dynamicAnchor=Ng;function aC(t){let{schemaEnv:e,schema:n,self:r}=t.it,{root:i,baseId:o,localRefs:s,meta:a}=e.root,{schemaId:c}=r.opts,l=new Og.SchemaEnv({schema:n,schemaId:c,root:i,baseId:o,localRefs:s,meta:a});return Og.compileSchema.call(r,l),(0,oC.getValidate)(t,l)}Bi.default=sC});var bu=S(Hi=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.dynamicRef=void 0;var Mg=Z(),cC=pt(),Vg=as(),lC={keyword:"$dynamicRef",schemaType:"string",code:t=>Lg(t,t.schema)};function Lg(t,e){let{gen:n,keyword:r,it:i}=t;if(e[0]!=="#")throw new Error(`"${r}" only supports hash fragment reference`);let o=e.slice(1);if(i.allErrors)s();else{let c=n.let("valid",!1);s(c),t.ok(c)}function s(c){if(i.schemaEnv.root.dynamicAnchors[o]){let l=n.let("_v",(0,Mg._)`${cC.default.dynamicAnchors}${(0,Mg.getProperty)(o)}`);n.if(l,a(l,c),a(i.validateName,c))}else a(i.validateName,c)()}function a(c,l){return l?()=>n.block(()=>{(0,Vg.callRef)(t,c),n.let(l,!0)}):()=>(0,Vg.callRef)(t,c)}}Hi.dynamicRef=Lg;Hi.default=lC});var jg=S(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});var uC=vu(),pC=ie(),dC={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,uC.dynamicAnchor)(t,""):(0,pC.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};_u.default=dC});var Dg=S(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});var fC=bu(),hC={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,fC.dynamicRef)(t,t.schema)};xu.default=hC});var Fg=S($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});var mC=vu(),gC=bu(),yC=jg(),wC=Dg(),vC=[mC.default,gC.default,yC.default,wC.default];$u.default=vC});var Bg=S(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});var qg=fs(),bC={keyword:"dependentRequired",type:"object",schemaType:"object",error:qg.error,code:t=>(0,qg.validatePropertyDeps)(t)};Su.default=bC});var Hg=S(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});var _C=fs(),xC={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,_C.validateSchemaDeps)(t)};Cu.default=xC});var Wg=S(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});var $C=ie(),SC={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:n}){e.contains===void 0&&(0,$C.checkStrictMode)(n,`"${t}" without "contains" is ignored`)}};ku.default=SC});var Ug=S(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});var CC=Bg(),kC=Hg(),EC=Wg(),PC=[CC.default,kC.default,EC.default];Eu.default=PC});var Gg=S(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});var yn=Z(),zg=ie(),IC=pt(),RC={message:"must NOT have unevaluated properties",params:({params:t})=>(0,yn._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},AC={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:RC,code(t){let{gen:e,schema:n,data:r,errsCount:i,it:o}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:s,props:a}=o;a instanceof yn.Name?e.if((0,yn._)`${a} !== true`,()=>e.forIn("key",r,p=>e.if(l(a,p),()=>c(p)))):a!==!0&&e.forIn("key",r,p=>a===void 0?c(p):e.if(d(a,p),()=>c(p))),o.props=!0,t.ok((0,yn._)`${i} === ${IC.default.errors}`);function c(p){if(n===!1){t.setParams({unevaluatedProperty:p}),t.error(),s||e.break();return}if(!(0,zg.alwaysValidSchema)(o,n)){let f=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:p,dataPropType:zg.Type.Str},f),s||e.if((0,yn.not)(f),()=>e.break())}}function l(p,f){return(0,yn._)`!${p} || !${p}[${f}]`}function d(p,f){let m=[];for(let y in p)p[y]===!0&&m.push((0,yn._)`${f} !== ${y}`);return(0,yn.and)(...m)}}};Pu.default=AC});var Kg=S(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});var Vn=Z(),Jg=ie(),TC={message:({params:{len:t}})=>(0,Vn.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Vn._)`{limit: ${t}}`},OC={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:TC,code(t){let{gen:e,schema:n,data:r,it:i}=t,o=i.items||0;if(o===!0)return;let s=e.const("len",(0,Vn._)`${r}.length`);if(n===!1)t.setParams({len:o}),t.fail((0,Vn._)`${s} > ${o}`);else if(typeof n=="object"&&!(0,Jg.alwaysValidSchema)(i,n)){let c=e.var("valid",(0,Vn._)`${s} <= ${o}`);e.if((0,Vn.not)(c),()=>a(c,o)),t.ok(c)}i.items=!0;function a(c,l){e.forRange("i",l,s,d=>{t.subschema({keyword:"unevaluatedItems",dataProp:d,dataPropType:Jg.Type.Num},c),i.allErrors||e.if((0,Vn.not)(c),()=>e.break())})}}};Iu.default=OC});var Yg=S(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});var NC=Gg(),MC=Kg(),VC=[NC.default,MC.default];Ru.default=VC});var Xg=S(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});var ke=Z(),LC={message:({schemaCode:t})=>(0,ke.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,ke._)`{format: ${t}}`},jC={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:LC,code(t,e){let{gen:n,data:r,$data:i,schema:o,schemaCode:s,it:a}=t,{opts:c,errSchemaPath:l,schemaEnv:d,self:p}=a;if(!c.validateFormats)return;i?f():m();function f(){let y=n.scopeValue("formats",{ref:p.formats,code:c.code.formats}),g=n.const("fDef",(0,ke._)`${y}[${s}]`),w=n.let("fType"),b=n.let("format");n.if((0,ke._)`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>n.assign(w,(0,ke._)`${g}.type || "string"`).assign(b,(0,ke._)`${g}.validate`),()=>n.assign(w,(0,ke._)`"string"`).assign(b,g)),t.fail$data((0,ke.or)(P(),x()));function P(){return c.strictSchema===!1?ke.nil:(0,ke._)`${s} && !${b}`}function x(){let R=d.$async?(0,ke._)`(${g}.async ? await ${b}(${r}) : ${b}(${r}))`:(0,ke._)`${b}(${r})`,O=(0,ke._)`(typeof ${b} == "function" ? ${R} : ${b}.test(${r}))`;return(0,ke._)`${b} && ${b} !== true && ${w} === ${e} && !${O}`}}function m(){let y=p.formats[o];if(!y){P();return}if(y===!0)return;let[g,w,b]=x(y);g===e&&t.pass(R());function P(){if(c.strictSchema===!1){p.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${o}" ignored in schema at path "${l}"`}}function x(O){let j=O instanceof RegExp?(0,ke.regexpCode)(O):c.code.formats?(0,ke._)`${c.code.formats}${(0,ke.getProperty)(o)}`:void 0,U=n.scopeValue("formats",{key:o,ref:O,code:j});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,ke._)`${U}.validate`]:["string",O,U]}function R(){if(typeof y=="object"&&!(y instanceof RegExp)&&y.async){if(!d.$async)throw new Error("async format in sync schema");return(0,ke._)`await ${b}(${r})`}return typeof w=="function"?(0,ke._)`${b}(${r})`:(0,ke._)`${b}.test(${r})`}}}};Au.default=jC});var Qg=S(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});var DC=Xg(),FC=[DC.default];Tu.default=FC});var Zg=S(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.contentVocabulary=gr.metadataVocabulary=void 0;gr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];gr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var ty=S(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});var qC=Um(),BC=og(),HC=Tg(),WC=Fg(),UC=Ug(),zC=Yg(),GC=Qg(),ey=Zg(),JC=[WC.default,qC.default,BC.default,(0,HC.default)(!0),GC.default,ey.metadataVocabulary,ey.contentVocabulary,UC.default,zC.default];Ou.default=JC});var ry=S(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});vs.DiscrError=void 0;var ny;(function(t){t.Tag="tag",t.Mapping="mapping"})(ny||(vs.DiscrError=ny={}))});var oy=S(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});var yr=Z(),Nu=ry(),iy=Ei(),KC=ki(),YC=ie(),XC={message:({params:{discrError:t,tagName:e}})=>t===Nu.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:n}})=>(0,yr._)`{error: ${t}, tag: ${n}, tagValue: ${e}}`},QC={keyword:"discriminator",type:"object",schemaType:"object",error:XC,code(t){let{gen:e,data:n,schema:r,parentSchema:i,it:o}=t,{oneOf:s}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=r.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(r.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),l=e.const("tag",(0,yr._)`${n}${(0,yr.getProperty)(a)}`);e.if((0,yr._)`typeof ${l} == "string"`,()=>d(),()=>t.error(!1,{discrError:Nu.DiscrError.Tag,tag:l,tagName:a})),t.ok(c);function d(){let m=f();e.if(!1);for(let y in m)e.elseIf((0,yr._)`${l} === ${y}`),e.assign(c,p(m[y]));e.else(),t.error(!1,{discrError:Nu.DiscrError.Mapping,tag:l,tagName:a}),e.endIf()}function p(m){let y=e.name("valid"),g=t.subschema({keyword:"oneOf",schemaProp:m},y);return t.mergeEvaluated(g,yr.Name),y}function f(){var m;let y={},g=b(i),w=!0;for(let R=0;R<s.length;R++){let O=s[R];if(O?.$ref&&!(0,YC.schemaHasRulesButRef)(O,o.self.RULES)){let U=O.$ref;if(O=iy.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,U),O instanceof iy.SchemaEnv&&(O=O.schema),O===void 0)throw new KC.default(o.opts.uriResolver,o.baseId,U)}let j=(m=O?.properties)===null||m===void 0?void 0:m[a];if(typeof j!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);w=w&&(g||b(O)),P(j,R)}if(!w)throw new Error(`discriminator: "${a}" must be required`);return y;function b({required:R}){return Array.isArray(R)&&R.includes(a)}function P(R,O){if(R.const)x(R.const,O);else if(R.enum)for(let j of R.enum)x(j,O);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function x(R,O){if(typeof R!="string"||R in y)throw new Error(`discriminator: "${a}" values must be unique strings`);y[R]=O}}}};Mu.default=QC});var sy=S((_M,ZC)=>{ZC.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 ay=S((xM,ek)=>{ek.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 cy=S(($M,tk)=>{tk.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 ly=S((SM,nk)=>{nk.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 uy=S((CM,rk)=>{rk.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 py=S((kM,ik)=>{ik.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 dy=S((EM,ok)=>{ok.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 fy=S((PM,sk)=>{sk.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 hy=S(Vu=>{"use strict";Object.defineProperty(Vu,"__esModule",{value:!0});var ak=sy(),ck=ay(),lk=cy(),uk=ly(),pk=uy(),dk=py(),fk=dy(),hk=fy(),mk=["/properties"];function gk(t){return[ak,ck,lk,uk,pk,e(this,dk),fk,e(this,hk)].forEach(n=>this.addMetaSchema(n,void 0,!1)),this;function e(n,r){return t?n.$dataMetaSchema(r,mk):r}}Vu.default=gk});var my=S((ve,ju)=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.MissingRefError=ve.ValidationError=ve.CodeGen=ve.Name=ve.nil=ve.stringify=ve.str=ve._=ve.KeywordCxt=ve.Ajv2020=void 0;var yk=Fm(),wk=ty(),vk=oy(),bk=hy(),Lu="https://json-schema.org/draft/2020-12/schema",wr=class extends yk.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),wk.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(vk.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:n}=this.opts;n&&(bk.default.call(this,e),this.refs["http://json-schema.org/schema"]=Lu)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Lu)?Lu:void 0)}};ve.Ajv2020=wr;ju.exports=ve=wr;ju.exports.Ajv2020=wr;Object.defineProperty(ve,"__esModule",{value:!0});ve.default=wr;var _k=Ci();Object.defineProperty(ve,"KeywordCxt",{enumerable:!0,get:function(){return _k.KeywordCxt}});var vr=Z();Object.defineProperty(ve,"_",{enumerable:!0,get:function(){return vr._}});Object.defineProperty(ve,"str",{enumerable:!0,get:function(){return vr.str}});Object.defineProperty(ve,"stringify",{enumerable:!0,get:function(){return vr.stringify}});Object.defineProperty(ve,"nil",{enumerable:!0,get:function(){return vr.nil}});Object.defineProperty(ve,"Name",{enumerable:!0,get:function(){return vr.Name}});Object.defineProperty(ve,"CodeGen",{enumerable:!0,get:function(){return vr.CodeGen}});var xk=Xo();Object.defineProperty(ve,"ValidationError",{enumerable:!0,get:function(){return xk.default}});var $k=ki();Object.defineProperty(ve,"MissingRefError",{enumerable:!0,get:function(){return $k.default}})});import{readFileSync as Sk}from"node:fs";import{createRequire as Ck}from"node:module";import{dirname as Du,resolve as kk}from"node:path";import{fileURLToPath as Ek}from"node:url";function Ee(){if(br)return br;let t=Ck(import.meta.url);try{return br=Du(t.resolve("view-contracts/package.json")),br}catch{let e=Du(Ek(import.meta.url));for(;;){try{let r=kk(e,"package.json");if(JSON.parse(Sk(r,"utf8")).name==="view-contracts")return br=e,br}catch{}let n=Du(e);if(n===e)break;e=n}throw new Error("view-contracts package root not found")}}var br,Ut=K(()=>{"use strict"});import{readFile as Ak}from"node:fs/promises";async function _r(t){return lt.load(await Ak(t,"utf-8"))}function xs(t,e,n){for(let r of t)if(!e.has(r))throw new Error(`${n}: unknown element "${r}" \u2014 not in spec/ui-dsl.schema.json vocabulary`)}function vy(t,e,n){for(let[r,i]of Object.entries(t))for(let o of e)if(i[o]===void 0||i[o]===null||i[o]==="")throw new Error(`${n}: element "${r}" is missing required "${String(o)}"`)}var $s=K(()=>{"use strict";ir()});import{resolve as Tk}from"node:path";function Ok(t){xs(Object.keys(t.elements),at,by),vy(t.elements,["tag"],by)}async function qu(t){if(!t&&Fu)return Fu;let e=t??Tk(Ee(),"renderers/react/elements.yaml"),n=await _r(e);return Ok(n),t||(Fu=n),n}var by,Fu,_y=K(()=>{"use strict";vt();vt();Ut();$s();by="renderers/react/elements.yaml",Fu=null});function xy(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t}function $y(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t==="between"||t==="spaceBetween"?"space-between":t==="around"||t==="spaceAround"?"space-around":t==="spaceEvenly"?"space-evenly":t}var Sy=K(()=>{"use strict"});function Ct(t){return`${t}px`}function xr(t){let e=t.match(/^\{([^}]+)\}$/);if(e)return`var(--${e[1].replace(/\./g,"-")})`}function Bu(t){let e={},n=t.width;typeof n=="number"?e.width=Ct(n):n==="fill"?e.width="100%":typeof n=="string"&&n!=="wrap"&&(e.width=n),typeof t.minWidth=="number"&&(e.minWidth=Ct(t.minWidth));let r=t.maxWidth;typeof r=="number"?e.maxWidth=Ct(r):r==="fill"&&(e.maxWidth="100%");let i=t.height;typeof i=="number"?e.height=Ct(i):i==="fill"?e.height="100%":typeof i=="string"&&i!=="wrap"&&(e.height=i),typeof t.minHeight=="number"&&(e.minHeight=Ct(t.minHeight));let o=t.maxHeight;typeof o=="number"?e.maxHeight=Ct(o):o==="fill"&&(e.maxHeight="100%"),t.aspectRatio!==void 0&&(e.aspectRatio=String(t.aspectRatio));let s=t.weight;typeof s=="number"&&(e.flexGrow=s),typeof t.padding=="number"&&(e.padding=Ct(t.padding)),typeof t.margin=="number"&&(e.margin=Ct(t.margin)),typeof t.gap=="number"&&(e.gap=Ct(t.gap));let a=t.textAlign;typeof a=="string"&&(e.textAlign=a==="start"?"left":a==="end"?"right":a);let c=t.contentAlign;typeof c=="string"&&c in Cy&&(e.placeItems=Cy[c]),typeof t.overflow=="string"&&(e.overflow=t.overflow);let l=t.selfAlign;typeof l=="string"&&(e.alignSelf=l==="start"?"flex-start":l==="end"?"flex-end":l);let d=t.size;typeof d=="number"?e.fontSize=Ct(d):typeof d=="string"&&(e.fontSize=d);let p=typeof s=="string"?s:t.fontWeight;typeof p=="string"&&(e.fontWeight=p);let f=t.background;typeof f=="string"&&(e.background=xr(f)??f);let m=t.foreground;typeof m=="string"&&(e.color=xr(m)??m);let y=t.radius;typeof y=="number"?e.borderRadius=Ct(y):typeof y=="string"&&(e.borderRadius=xr(y)??y);let g=t.shadow;g===!0?e.boxShadow="var(--ui-shadow)":g===!1?e.boxShadow="none":typeof g=="string"&&(e.boxShadow=Nk[g]??xr(g)??g);let w=t.border;typeof w=="string"&&(e.border=xr(w)??w),typeof t.opacity=="number"&&(e.opacity=t.opacity);let b=t.clip;typeof b=="string"&&(e.overflow=b==="hidden"?"hidden":b);let P=t.align;if(typeof P=="string"){let j=xy(P);j&&(e.alignItems=j)}let x=t.justify;if(typeof x=="string"){let j=$y(x);j&&(e.justifyContent=j)}typeof t.display=="string"&&(e.display=t.display),typeof t.gridTemplateColumns=="string"&&(e.gridTemplateColumns=t.gridTemplateColumns),typeof t.flexDirection=="string"&&(e.flexDirection=t.flexDirection),typeof t.alignItems=="string"&&(e.alignItems=t.alignItems);let R=t.borderColor;typeof R=="string"&&(e.borderColor=xr(R)??R);let O=t.flex;return typeof O=="number"&&(e.flex=O),e}function Wi(t){let e=Object.entries(t);return e.length===0?"":`style={{ ${e.map(([r,i])=>typeof i=="number"?`${r}: ${i}`:`${r}: ${JSON.stringify(i)}`).join(", ")} }}`}var Cy,Nk,Hu=K(()=>{"use strict";Sy();Cy={topStart:"start start",top:"center start",topEnd:"end start",start:"start center",center:"center center",end:"end center",bottomStart:"start end",bottom:"center end",bottomEnd:"end end"},Nk={none:"none",sm:"var(--ui-shadow-sm, 0 1px 2px rgba(0,0,0,0.05))",md:"var(--ui-shadow)",lg:"var(--ui-shadow-lg, 0 10px 15px rgba(0,0,0,0.1))"}});function Ss(t,e){let n=t[e];if(n!=null){if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="object"&&"kind"in n&&n.kind==="literal")return n.value}}function Mk(t,e){if(e!=null&&!(typeof e=="string"||typeof e=="number"||typeof e=="boolean")&&!(typeof e=="object"&&"kind"in e&&e.kind==="literal"))throw new Error(`Style property "${t}" must be a compile-time literal; ViewModel bindings are not allowed on layout/visual props`)}function Vk(t){let e={};for(let[n,r]of Object.entries(t)){if(!rr.has(n))continue;Mk(n,r);let i=Ss(t,n);i!==void 0&&(e[n]=i)}return e}function Lk(t){return t.flex?{display:"flex",flexDirection:t.flex==="column"?"column":"row"}:{}}function jk(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 ky(t,e){let n=Vk(e),r=Bu(n);if(r={...r,...Lk(t)},t.tableCell){if("alignItems"in r){let i=String(r.alignItems);r.textAlign=i==="flex-end"?"right":i==="center"?"center":"left",delete r.alignItems}"width"in r&&!("flex"in r)&&(r.flexShrink=0,r.flexGrow=0)}if(t.scrollContainer){let i=Ss(e,"scroll"),o=Ss(e,"axis"),s=typeof i=="string"?i:typeof o=="string"?o==="horizontal"?"horizontal":"vertical":void 0;if(s)return r={...r,...jk(s)},Wi(r);throw new Error("ScrollArea scroll/axis must be compile-time literals")}if(t.flexGrowProp&&e[t.flexGrowProp]){let i=Ss(e,t.flexGrowProp);if(typeof i=="number")return r.flexGrow=i,Wi(r);throw new Error(`"${t.flexGrowProp}" on <Spacer> must be a compile-time literal`)}return Wi(r)}var Ey=K(()=>{"use strict";vt();Hu();Hu()});function G(t){return" ".repeat(t)}function jn(t,e="vm"){let n=t.scope??e;return t.path?`${n}.${t.path}`:n}function Ty(t){return t.parts.map(e=>typeof e=="string"?e:`\${${jn(e)}}`).join("")}function Dk(t){return`\`${Ty(t)}\``}function Cs(t,e=!1){let n=e?" as ActionDescriptor":"";if(!t.params||Object.keys(t.params).length===0)return`{ name: ${JSON.stringify(t.name)} }${n}`;let r=Object.entries(t.params).map(([i,o])=>`${i}: ${Dn(o,0)}`).join(", ");return`{ name: ${JSON.stringify(t.name)}, params: { ${r} } }${n}`}function Uu(t,e,n=!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`[
68
- ${t.map(r=>`${G(e+1)}${Uu(r,e+1,n)}`).join(`,
67
+ deps: ${n}}`};var C2={keyword:"dependencies",type:"object",schemaType:"object",error:Nt.error,code(t){let[e,n]=k2(t);wg(t,e),vg(t,n)}};function k2({schema:t}){let e={},n={};for(let r in t){if(r==="__proto__")continue;let i=Array.isArray(t[r])?e:n;i[r]=t[r]}return[e,n]}function wg(t,e=t.schema){let{gen:n,data:r,it:i}=t;if(Object.keys(e).length===0)return;let o=n.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let l=(0,Wi.propertyInData)(n,r,s,i.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),i.allErrors?n.if(l,()=>{for(let c of a)(0,Wi.checkReportMissingProp)(t,c)}):(n.if((0,du._)`${l} && (${(0,Wi.checkMissingProp)(t,a,o)})`),(0,Wi.reportMissingProp)(t,o),n.else())}}Nt.validatePropertyDeps=wg;function vg(t,e=t.schema){let{gen:n,data:r,keyword:i,it:o}=t,s=n.name("valid");for(let a in e)(0,S2.alwaysValidSchema)(o,e[a])||(n.if((0,Wi.propertyInData)(n,r,a,o.opts.ownProperties),()=>{let l=t.subschema({keyword:i,schemaProp:a},s);t.mergeValidEvaluated(l,s)},()=>n.var(s,!0)),t.ok(s))}Nt.validateSchemaDeps=vg;Nt.default=C2});var _g=S(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});var bg=Z(),E2=ie(),P2={message:"property name must be valid",params:({params:t})=>(0,bg._)`{propertyName: ${t.propertyName}}`},I2={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:P2,code(t){let{gen:e,schema:n,data:r,it:i}=t;if((0,E2.alwaysValidSchema)(i,n))return;let o=e.name("valid");e.forIn("key",r,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),e.if((0,bg.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};fu.default=I2});var mu=S(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});var ws=mt(),kt=Z(),R2=ht(),vs=ie(),A2={message:"must NOT have additional properties",params:({params:t})=>(0,kt._)`{additionalProperty: ${t.additionalProperty}}`},T2={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:A2,code(t){let{gen:e,schema:n,parentSchema:r,data:i,errsCount:o,it:s}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:a,opts:l}=s;if(s.props=!0,l.removeAdditional!=="all"&&(0,vs.alwaysValidSchema)(s,n))return;let c=(0,ws.allSchemaProperties)(r.properties),p=(0,ws.allSchemaProperties)(r.patternProperties);d(),t.ok((0,kt._)`${o} === ${R2.default.errors}`);function d(){e.forIn("key",i,w=>{!c.length&&!p.length?y(w):e.if(f(w),()=>y(w))})}function f(w){let b;if(c.length>8){let P=(0,vs.schemaRefOrVal)(s,r.properties,"properties");b=(0,ws.isOwnProperty)(e,P,w)}else c.length?b=(0,kt.or)(...c.map(P=>(0,kt._)`${w} === ${P}`)):b=kt.nil;return p.length&&(b=(0,kt.or)(b,...p.map(P=>(0,kt._)`${(0,ws.usePattern)(t,P)}.test(${w})`))),(0,kt.not)(b)}function m(w){e.code((0,kt._)`delete ${i}[${w}]`)}function y(w){if(l.removeAdditional==="all"||l.removeAdditional&&n===!1){m(w);return}if(n===!1){t.setParams({additionalProperty:w}),t.error(),a||e.break();return}if(typeof n=="object"&&!(0,vs.alwaysValidSchema)(s,n)){let b=e.name("valid");l.removeAdditional==="failing"?(g(w,b,!1),e.if((0,kt.not)(b),()=>{t.reset(),m(w)})):(g(w,b),a||e.if((0,kt.not)(b),()=>e.break()))}}function g(w,b,P){let x={keyword:"additionalProperties",dataProp:w,dataPropType:vs.Type.Str};P===!1&&Object.assign(x,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(x,b)}}};hu.default=T2});var Sg=S(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});var O2=Pi(),xg=mt(),gu=ie(),$g=mu(),N2={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,parentSchema:r,data:i,it:o}=t;o.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&$g.default.code(new O2.KeywordCxt(o,$g.default,"additionalProperties"));let s=(0,xg.allSchemaProperties)(n);for(let d of s)o.definedProperties.add(d);o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=gu.mergeEvaluated.props(e,(0,gu.toHash)(s),o.props));let a=s.filter(d=>!(0,gu.alwaysValidSchema)(o,n[d]));if(a.length===0)return;let l=e.name("valid");for(let d of a)c(d)?p(d):(e.if((0,xg.propertyInData)(e,i,d,o.opts.ownProperties)),p(d),o.allErrors||e.else().var(l,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(l);function c(d){return o.opts.useDefaults&&!o.compositeRule&&n[d].default!==void 0}function p(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},l)}}};yu.default=N2});var Pg=S(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});var Cg=mt(),bs=Z(),kg=ie(),Eg=ie(),M2={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,data:r,parentSchema:i,it:o}=t,{opts:s}=o,a=(0,Cg.allSchemaProperties)(n),l=a.filter(g=>(0,kg.alwaysValidSchema)(o,n[g]));if(a.length===0||l.length===a.length&&(!o.opts.unevaluated||o.props===!0))return;let c=s.strictSchema&&!s.allowMatchingProperties&&i.properties,p=e.name("valid");o.props!==!0&&!(o.props instanceof bs.Name)&&(o.props=(0,Eg.evaluatedPropsToName)(e,o.props));let{props:d}=o;f();function f(){for(let g of a)c&&m(g),o.allErrors?y(g):(e.var(p,!0),y(g),e.if(p))}function m(g){for(let w in c)new RegExp(g).test(w)&&(0,kg.checkStrictMode)(o,`property ${w} matches pattern ${g} (use allowMatchingProperties)`)}function y(g){e.forIn("key",r,w=>{e.if((0,bs._)`${(0,Cg.usePattern)(t,g)}.test(${w})`,()=>{let b=l.includes(g);b||t.subschema({keyword:"patternProperties",schemaProp:g,dataProp:w,dataPropType:Eg.Type.Str},p),o.opts.unevaluated&&d!==!0?e.assign((0,bs._)`${d}[${w}]`,!0):!b&&!o.allErrors&&e.if((0,bs.not)(p),()=>e.break())})})}}};wu.default=M2});var Ig=S(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});var V2=ie(),L2={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:n,it:r}=t;if((0,V2.alwaysValidSchema)(r,n)){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"}};vu.default=L2});var Rg=S(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});var j2=mt(),D2={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:j2.validateUnion,error:{message:"must match a schema in anyOf"}};bu.default=D2});var Ag=S(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});var _s=Z(),F2=ie(),q2={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,_s._)`{passingSchemas: ${t.passing}}`},B2={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:q2,code(t){let{gen:e,schema:n,parentSchema:r,it:i}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(i.opts.discriminator&&r.discriminator)return;let o=n,s=e.let("valid",!1),a=e.let("passing",null),l=e.name("_valid");t.setParams({passing:a}),e.block(c),t.result(s,()=>t.reset(),()=>t.error(!0));function c(){o.forEach((p,d)=>{let f;(0,F2.alwaysValidSchema)(i,p)?e.var(l,!0):f=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},l),d>0&&e.if((0,_s._)`${l} && ${s}`).assign(s,!1).assign(a,(0,_s._)`[${a}, ${d}]`).else(),e.if(l,()=>{e.assign(s,!0),e.assign(a,d),f&&t.mergeEvaluated(f,_s.Name)})})}}};_u.default=B2});var Tg=S(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});var H2=ie(),W2={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:n,it:r}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");let i=e.name("valid");n.forEach((o,s)=>{if((0,H2.alwaysValidSchema)(r,o))return;let a=t.subschema({keyword:"allOf",schemaProp:s},i);t.ok(i),t.mergeEvaluated(a)})}};xu.default=W2});var Mg=S($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});var xs=Z(),Ng=ie(),U2={message:({params:t})=>(0,xs.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,xs._)`{failingKeyword: ${t.ifClause}}`},z2={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:U2,code(t){let{gen:e,parentSchema:n,it:r}=t;n.then===void 0&&n.else===void 0&&(0,Ng.checkStrictMode)(r,'"if" without "then" and "else" is ignored');let i=Og(r,"then"),o=Og(r,"else");if(!i&&!o)return;let s=e.let("valid",!0),a=e.name("_valid");if(l(),t.reset(),i&&o){let p=e.let("ifClause");t.setParams({ifClause:p}),e.if(a,c("then",p),c("else",p))}else i?e.if(a,c("then")):e.if((0,xs.not)(a),c("else"));t.pass(s,()=>t.error(!0));function l(){let p=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(p)}function c(p,d){return()=>{let f=t.subschema({keyword:p},a);e.assign(s,a),t.mergeValidEvaluated(f,s),d?e.assign(d,(0,xs._)`${p}`):t.setParams({ifClause:p})}}}};function Og(t,e){let n=t.schema[e];return n!==void 0&&!(0,Ng.alwaysValidSchema)(t,n)}$u.default=z2});var Vg=S(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});var G2=ie(),J2={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:n}){e.if===void 0&&(0,G2.checkStrictMode)(n,`"${t}" without "if" is ignored`)}};Su.default=J2});var Lg=S(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});var K2=au(),Y2=hg(),X2=cu(),Q2=gg(),Z2=yg(),eC=ys(),tC=_g(),nC=mu(),rC=Sg(),iC=Pg(),oC=Ig(),sC=Rg(),aC=Ag(),cC=Tg(),lC=Mg(),uC=Vg();function pC(t=!1){let e=[oC.default,sC.default,aC.default,cC.default,lC.default,uC.default,tC.default,nC.default,eC.default,rC.default,iC.default];return t?e.push(Y2.default,Q2.default):e.push(K2.default,X2.default),e.push(Z2.default),e}Cu.default=pC});var Eu=S(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.dynamicAnchor=void 0;var ku=Z(),dC=ht(),jg=Ri(),fC=ps(),hC={keyword:"$dynamicAnchor",schemaType:"string",code:t=>Dg(t,t.schema)};function Dg(t,e){let{gen:n,it:r}=t;r.schemaEnv.root.dynamicAnchors[e]=!0;let i=(0,ku._)`${dC.default.dynamicAnchors}${(0,ku.getProperty)(e)}`,o=r.errSchemaPath==="#"?r.validateName:mC(t);n.if((0,ku._)`!${i}`,()=>n.assign(i,o))}Ui.dynamicAnchor=Dg;function mC(t){let{schemaEnv:e,schema:n,self:r}=t.it,{root:i,baseId:o,localRefs:s,meta:a}=e.root,{schemaId:l}=r.opts,c=new jg.SchemaEnv({schema:n,schemaId:l,root:i,baseId:o,localRefs:s,meta:a});return jg.compileSchema.call(r,c),(0,fC.getValidate)(t,c)}Ui.default=hC});var Pu=S(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.dynamicRef=void 0;var Fg=Z(),gC=ht(),qg=ps(),yC={keyword:"$dynamicRef",schemaType:"string",code:t=>Bg(t,t.schema)};function Bg(t,e){let{gen:n,keyword:r,it:i}=t;if(e[0]!=="#")throw new Error(`"${r}" only supports hash fragment reference`);let o=e.slice(1);if(i.allErrors)s();else{let l=n.let("valid",!1);s(l),t.ok(l)}function s(l){if(i.schemaEnv.root.dynamicAnchors[o]){let c=n.let("_v",(0,Fg._)`${gC.default.dynamicAnchors}${(0,Fg.getProperty)(o)}`);n.if(c,a(c,l),a(i.validateName,l))}else a(i.validateName,l)()}function a(l,c){return c?()=>n.block(()=>{(0,qg.callRef)(t,l),n.let(c,!0)}):()=>(0,qg.callRef)(t,l)}}zi.dynamicRef=Bg;zi.default=yC});var Hg=S(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});var wC=Eu(),vC=ie(),bC={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,wC.dynamicAnchor)(t,""):(0,vC.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};Iu.default=bC});var Wg=S(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});var _C=Pu(),xC={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,_C.dynamicRef)(t,t.schema)};Ru.default=xC});var Ug=S(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});var $C=Eu(),SC=Pu(),CC=Hg(),kC=Wg(),EC=[$C.default,SC.default,CC.default,kC.default];Au.default=EC});var Gg=S(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});var zg=ys(),PC={keyword:"dependentRequired",type:"object",schemaType:"object",error:zg.error,code:t=>(0,zg.validatePropertyDeps)(t)};Tu.default=PC});var Jg=S(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});var IC=ys(),RC={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,IC.validateSchemaDeps)(t)};Ou.default=RC});var Kg=S(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});var AC=ie(),TC={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:n}){e.contains===void 0&&(0,AC.checkStrictMode)(n,`"${t}" without "contains" is ignored`)}};Nu.default=TC});var Yg=S(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});var OC=Gg(),NC=Jg(),MC=Kg(),VC=[OC.default,NC.default,MC.default];Mu.default=VC});var Qg=S(Vu=>{"use strict";Object.defineProperty(Vu,"__esModule",{value:!0});var vn=Z(),Xg=ie(),LC=ht(),jC={message:"must NOT have unevaluated properties",params:({params:t})=>(0,vn._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},DC={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:jC,code(t){let{gen:e,schema:n,data:r,errsCount:i,it:o}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:s,props:a}=o;a instanceof vn.Name?e.if((0,vn._)`${a} !== true`,()=>e.forIn("key",r,d=>e.if(c(a,d),()=>l(d)))):a!==!0&&e.forIn("key",r,d=>a===void 0?l(d):e.if(p(a,d),()=>l(d))),o.props=!0,t.ok((0,vn._)`${i} === ${LC.default.errors}`);function l(d){if(n===!1){t.setParams({unevaluatedProperty:d}),t.error(),s||e.break();return}if(!(0,Xg.alwaysValidSchema)(o,n)){let f=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:d,dataPropType:Xg.Type.Str},f),s||e.if((0,vn.not)(f),()=>e.break())}}function c(d,f){return(0,vn._)`!${d} || !${d}[${f}]`}function p(d,f){let m=[];for(let y in d)d[y]===!0&&m.push((0,vn._)`${f} !== ${y}`);return(0,vn.and)(...m)}}};Vu.default=DC});var ey=S(Lu=>{"use strict";Object.defineProperty(Lu,"__esModule",{value:!0});var Dn=Z(),Zg=ie(),FC={message:({params:{len:t}})=>(0,Dn.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Dn._)`{limit: ${t}}`},qC={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:FC,code(t){let{gen:e,schema:n,data:r,it:i}=t,o=i.items||0;if(o===!0)return;let s=e.const("len",(0,Dn._)`${r}.length`);if(n===!1)t.setParams({len:o}),t.fail((0,Dn._)`${s} > ${o}`);else if(typeof n=="object"&&!(0,Zg.alwaysValidSchema)(i,n)){let l=e.var("valid",(0,Dn._)`${s} <= ${o}`);e.if((0,Dn.not)(l),()=>a(l,o)),t.ok(l)}i.items=!0;function a(l,c){e.forRange("i",c,s,p=>{t.subschema({keyword:"unevaluatedItems",dataProp:p,dataPropType:Zg.Type.Num},l),i.allErrors||e.if((0,Dn.not)(l),()=>e.break())})}}};Lu.default=qC});var ty=S(ju=>{"use strict";Object.defineProperty(ju,"__esModule",{value:!0});var BC=Qg(),HC=ey(),WC=[BC.default,HC.default];ju.default=WC});var ny=S(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});var Ee=Z(),UC={message:({schemaCode:t})=>(0,Ee.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,Ee._)`{format: ${t}}`},zC={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:UC,code(t,e){let{gen:n,data:r,$data:i,schema:o,schemaCode:s,it:a}=t,{opts:l,errSchemaPath:c,schemaEnv:p,self:d}=a;if(!l.validateFormats)return;i?f():m();function f(){let y=n.scopeValue("formats",{ref:d.formats,code:l.code.formats}),g=n.const("fDef",(0,Ee._)`${y}[${s}]`),w=n.let("fType"),b=n.let("format");n.if((0,Ee._)`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>n.assign(w,(0,Ee._)`${g}.type || "string"`).assign(b,(0,Ee._)`${g}.validate`),()=>n.assign(w,(0,Ee._)`"string"`).assign(b,g)),t.fail$data((0,Ee.or)(P(),x()));function P(){return l.strictSchema===!1?Ee.nil:(0,Ee._)`${s} && !${b}`}function x(){let R=p.$async?(0,Ee._)`(${g}.async ? await ${b}(${r}) : ${b}(${r}))`:(0,Ee._)`${b}(${r})`,O=(0,Ee._)`(typeof ${b} == "function" ? ${R} : ${b}.test(${r}))`;return(0,Ee._)`${b} && ${b} !== true && ${w} === ${e} && !${O}`}}function m(){let y=d.formats[o];if(!y){P();return}if(y===!0)return;let[g,w,b]=x(y);g===e&&t.pass(R());function P(){if(l.strictSchema===!1){d.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${o}" ignored in schema at path "${c}"`}}function x(O){let j=O instanceof RegExp?(0,Ee.regexpCode)(O):l.code.formats?(0,Ee._)`${l.code.formats}${(0,Ee.getProperty)(o)}`:void 0,U=n.scopeValue("formats",{key:o,ref:O,code:j});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,Ee._)`${U}.validate`]:["string",O,U]}function R(){if(typeof y=="object"&&!(y instanceof RegExp)&&y.async){if(!p.$async)throw new Error("async format in sync schema");return(0,Ee._)`await ${b}(${r})`}return typeof w=="function"?(0,Ee._)`${b}(${r})`:(0,Ee._)`${b}.test(${r})`}}}};Du.default=zC});var ry=S(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});var GC=ny(),JC=[GC.default];Fu.default=JC});var iy=S(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.contentVocabulary=br.metadataVocabulary=void 0;br.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];br.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var sy=S(qu=>{"use strict";Object.defineProperty(qu,"__esModule",{value:!0});var KC=Ym(),YC=ug(),XC=Lg(),QC=Ug(),ZC=Yg(),ek=ty(),tk=ry(),oy=iy(),nk=[QC.default,KC.default,YC.default,(0,XC.default)(!0),tk.default,oy.metadataVocabulary,oy.contentVocabulary,ZC.default,ek.default];qu.default=nk});var cy=S($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});$s.DiscrError=void 0;var ay;(function(t){t.Tag="tag",t.Mapping="mapping"})(ay||($s.DiscrError=ay={}))});var uy=S(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});var _r=Z(),Bu=cy(),ly=Ri(),rk=Ii(),ik=ie(),ok={message:({params:{discrError:t,tagName:e}})=>t===Bu.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:n}})=>(0,_r._)`{error: ${t}, tag: ${n}, tagValue: ${e}}`},sk={keyword:"discriminator",type:"object",schemaType:"object",error:ok,code(t){let{gen:e,data:n,schema:r,parentSchema:i,it:o}=t,{oneOf:s}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=r.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(r.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let l=e.let("valid",!1),c=e.const("tag",(0,_r._)`${n}${(0,_r.getProperty)(a)}`);e.if((0,_r._)`typeof ${c} == "string"`,()=>p(),()=>t.error(!1,{discrError:Bu.DiscrError.Tag,tag:c,tagName:a})),t.ok(l);function p(){let m=f();e.if(!1);for(let y in m)e.elseIf((0,_r._)`${c} === ${y}`),e.assign(l,d(m[y]));e.else(),t.error(!1,{discrError:Bu.DiscrError.Mapping,tag:c,tagName:a}),e.endIf()}function d(m){let y=e.name("valid"),g=t.subschema({keyword:"oneOf",schemaProp:m},y);return t.mergeEvaluated(g,_r.Name),y}function f(){var m;let y={},g=b(i),w=!0;for(let R=0;R<s.length;R++){let O=s[R];if(O?.$ref&&!(0,ik.schemaHasRulesButRef)(O,o.self.RULES)){let U=O.$ref;if(O=ly.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,U),O instanceof ly.SchemaEnv&&(O=O.schema),O===void 0)throw new rk.default(o.opts.uriResolver,o.baseId,U)}let j=(m=O?.properties)===null||m===void 0?void 0:m[a];if(typeof j!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);w=w&&(g||b(O)),P(j,R)}if(!w)throw new Error(`discriminator: "${a}" must be required`);return y;function b({required:R}){return Array.isArray(R)&&R.includes(a)}function P(R,O){if(R.const)x(R.const,O);else if(R.enum)for(let j of R.enum)x(j,O);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function x(R,O){if(typeof R!="string"||R in y)throw new Error(`discriminator: "${a}" values must be unique strings`);y[R]=O}}}};Hu.default=sk});var py=S((TM,ak)=>{ak.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 dy=S((OM,ck)=>{ck.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 fy=S((NM,lk)=>{lk.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 hy=S((MM,uk)=>{uk.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 my=S((VM,pk)=>{pk.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 gy=S((LM,dk)=>{dk.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 yy=S((jM,fk)=>{fk.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 wy=S((DM,hk)=>{hk.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 vy=S(Wu=>{"use strict";Object.defineProperty(Wu,"__esModule",{value:!0});var mk=py(),gk=dy(),yk=fy(),wk=hy(),vk=my(),bk=gy(),_k=yy(),xk=wy(),$k=["/properties"];function Sk(t){return[mk,gk,yk,wk,vk,e(this,bk),_k,e(this,xk)].forEach(n=>this.addMetaSchema(n,void 0,!1)),this;function e(n,r){return t?n.$dataMetaSchema(r,$k):r}}Wu.default=Sk});var by=S((ve,zu)=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.MissingRefError=ve.ValidationError=ve.CodeGen=ve.Name=ve.nil=ve.stringify=ve.str=ve._=ve.KeywordCxt=ve.Ajv2020=void 0;var Ck=Um(),kk=sy(),Ek=uy(),Pk=vy(),Uu="https://json-schema.org/draft/2020-12/schema",xr=class extends Ck.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),kk.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(Ek.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:n}=this.opts;n&&(Pk.default.call(this,e),this.refs["http://json-schema.org/schema"]=Uu)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Uu)?Uu:void 0)}};ve.Ajv2020=xr;zu.exports=ve=xr;zu.exports.Ajv2020=xr;Object.defineProperty(ve,"__esModule",{value:!0});ve.default=xr;var Ik=Pi();Object.defineProperty(ve,"KeywordCxt",{enumerable:!0,get:function(){return Ik.KeywordCxt}});var $r=Z();Object.defineProperty(ve,"_",{enumerable:!0,get:function(){return $r._}});Object.defineProperty(ve,"str",{enumerable:!0,get:function(){return $r.str}});Object.defineProperty(ve,"stringify",{enumerable:!0,get:function(){return $r.stringify}});Object.defineProperty(ve,"nil",{enumerable:!0,get:function(){return $r.nil}});Object.defineProperty(ve,"Name",{enumerable:!0,get:function(){return $r.Name}});Object.defineProperty(ve,"CodeGen",{enumerable:!0,get:function(){return $r.CodeGen}});var Rk=ts();Object.defineProperty(ve,"ValidationError",{enumerable:!0,get:function(){return Rk.default}});var Ak=Ii();Object.defineProperty(ve,"MissingRefError",{enumerable:!0,get:function(){return Ak.default}})});import{readFileSync as Tk}from"node:fs";import{createRequire as Ok}from"node:module";import{dirname as Gu,resolve as Nk}from"node:path";import{fileURLToPath as Mk}from"node:url";function Ce(){if(Sr)return Sr;let t=Ok(import.meta.url);try{return Sr=Gu(t.resolve("view-contracts/package.json")),Sr}catch{let e=Gu(Mk(import.meta.url));for(;;){try{let r=Nk(e,"package.json");if(JSON.parse(Tk(r,"utf8")).name==="view-contracts")return Sr=e,Sr}catch{}let n=Gu(e);if(n===e)break;e=n}throw new Error("view-contracts package root not found")}}var Sr,Mt=K(()=>{"use strict"});import{readFile as Dk}from"node:fs/promises";async function Cr(t){return dt.load(await Dk(t,"utf-8"))}function ks(t,e,n){for(let r of t)if(!e.has(r))throw new Error(`${n}: unknown element "${r}" \u2014 not in spec/ui-dsl.schema.json vocabulary`)}function Sy(t,e,n){for(let[r,i]of Object.entries(t))for(let o of e)if(i[o]===void 0||i[o]===null||i[o]==="")throw new Error(`${n}: element "${r}" is missing required "${String(o)}"`)}var Es=K(()=>{"use strict";ar()});import{resolve as Fk}from"node:path";function qk(t){ks(Object.keys(t.elements),lt,Cy),Sy(t.elements,["tag"],Cy)}async function Ku(t){if(!t&&Ju)return Ju;let e=t??Fk(Ce(),"renderers/react/elements.yaml"),n=await Cr(e);return qk(n),t||(Ju=n),n}var Cy,Ju,ky=K(()=>{"use strict";nt();nt();Mt();Es();Cy="renderers/react/elements.yaml",Ju=null});function Ey(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t}function Py(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t==="between"||t==="spaceBetween"?"space-between":t==="around"||t==="spaceAround"?"space-around":t==="spaceEvenly"?"space-evenly":t}var Iy=K(()=>{"use strict"});function Et(t){return`${t}px`}function kr(t){let e=t.match(/^\{([^}]+)\}$/);if(e)return`var(--${e[1].replace(/\./g,"-")})`}function Yu(t){let e={},n=t.width;typeof n=="number"?e.width=Et(n):n==="fill"?e.width="100%":typeof n=="string"&&n!=="wrap"&&(e.width=n),typeof t.minWidth=="number"&&(e.minWidth=Et(t.minWidth));let r=t.maxWidth;typeof r=="number"?e.maxWidth=Et(r):r==="fill"&&(e.maxWidth="100%");let i=t.height;typeof i=="number"?e.height=Et(i):i==="fill"?e.height="100%":typeof i=="string"&&i!=="wrap"&&(e.height=i),typeof t.minHeight=="number"&&(e.minHeight=Et(t.minHeight));let o=t.maxHeight;typeof o=="number"?e.maxHeight=Et(o):o==="fill"&&(e.maxHeight="100%"),t.aspectRatio!==void 0&&(e.aspectRatio=String(t.aspectRatio));let s=t.weight;typeof s=="number"&&(e.flexGrow=s),typeof t.padding=="number"&&(e.padding=Et(t.padding)),typeof t.margin=="number"&&(e.margin=Et(t.margin)),typeof t.gap=="number"&&(e.gap=Et(t.gap));let a=t.textAlign;typeof a=="string"&&(e.textAlign=a==="start"?"left":a==="end"?"right":a);let l=t.contentAlign;typeof l=="string"&&l in Ry&&(e.placeItems=Ry[l]),typeof t.overflow=="string"&&(e.overflow=t.overflow);let c=t.selfAlign;typeof c=="string"&&(e.alignSelf=c==="start"?"flex-start":c==="end"?"flex-end":c);let p=t.size;typeof p=="number"?e.fontSize=Et(p):typeof p=="string"&&(e.fontSize=p);let d=typeof s=="string"?s:t.fontWeight;typeof d=="string"&&(e.fontWeight=d);let f=t.background;typeof f=="string"&&(e.background=kr(f)??f);let m=t.foreground;typeof m=="string"&&(e.color=kr(m)??m);let y=t.radius;typeof y=="number"?e.borderRadius=Et(y):typeof y=="string"&&(e.borderRadius=kr(y)??y);let g=t.shadow;g===!0?e.boxShadow="var(--ui-shadow)":g===!1?e.boxShadow="none":typeof g=="string"&&(e.boxShadow=Bk[g]??kr(g)??g);let w=t.border;typeof w=="string"&&(e.border=kr(w)??w),typeof t.opacity=="number"&&(e.opacity=t.opacity);let b=t.clip;typeof b=="string"&&(e.overflow=b==="hidden"?"hidden":b);let P=t.align;if(typeof P=="string"){let j=Ey(P);j&&(e.alignItems=j)}let x=t.justify;if(typeof x=="string"){let j=Py(x);j&&(e.justifyContent=j)}typeof t.display=="string"&&(e.display=t.display),typeof t.gridTemplateColumns=="string"&&(e.gridTemplateColumns=t.gridTemplateColumns),typeof t.flexDirection=="string"&&(e.flexDirection=t.flexDirection),typeof t.alignItems=="string"&&(e.alignItems=t.alignItems);let R=t.borderColor;typeof R=="string"&&(e.borderColor=kr(R)??R);let O=t.flex;return typeof O=="number"&&(e.flex=O),e}function Gi(t){let e=Object.entries(t);return e.length===0?"":`style={{ ${e.map(([r,i])=>typeof i=="number"?`${r}: ${i}`:`${r}: ${JSON.stringify(i)}`).join(", ")} }}`}var Ry,Bk,Xu=K(()=>{"use strict";Iy();Ry={topStart:"start start",top:"center start",topEnd:"end start",start:"start center",center:"center center",end:"end center",bottomStart:"start end",bottom:"center end",bottomEnd:"end end"},Bk={none:"none",sm:"var(--ui-shadow-sm, 0 1px 2px rgba(0,0,0,0.05))",md:"var(--ui-shadow)",lg:"var(--ui-shadow-lg, 0 10px 15px rgba(0,0,0,0.1))"}});function Ps(t,e){let n=t[e];if(n!=null){if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="object"&&"kind"in n&&n.kind==="literal")return n.value}}function Hk(t,e){if(e!=null&&!(typeof e=="string"||typeof e=="number"||typeof e=="boolean")&&!(typeof e=="object"&&"kind"in e&&e.kind==="literal"))throw new Error(`Style property "${t}" must be a compile-time literal; ViewModel bindings are not allowed on layout/visual props`)}function Wk(t){let e={};for(let[n,r]of Object.entries(t)){if(!sr.has(n))continue;Hk(n,r);let i=Ps(t,n);i!==void 0&&(e[n]=i)}return e}function Uk(t){return t.flex?{display:"flex",flexDirection:t.flex==="column"?"column":"row"}:{}}function zk(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 Ay(t,e){let n=Wk(e),r=Yu(n);if(r={...r,...Uk(t)},t.tableCell){if("alignItems"in r){let i=String(r.alignItems);r.textAlign=i==="flex-end"?"right":i==="center"?"center":"left",delete r.alignItems}"width"in r&&!("flex"in r)&&(r.flexShrink=0,r.flexGrow=0)}if(t.scrollContainer){let i=Ps(e,"scroll"),o=Ps(e,"axis"),s=typeof i=="string"?i:typeof o=="string"?o==="horizontal"?"horizontal":"vertical":void 0;if(s)return r={...r,...zk(s)},Gi(r);throw new Error("ScrollArea scroll/axis must be compile-time literals")}if(t.flexGrowProp&&e[t.flexGrowProp]){let i=Ps(e,t.flexGrowProp);if(typeof i=="number")return r.flexGrow=i,Gi(r);throw new Error(`"${t.flexGrowProp}" on <Spacer> must be a compile-time literal`)}return Gi(r)}var Ty=K(()=>{"use strict";nt();Xu();Xu()});function Oy(t){return`data-${t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`}var Ny=K(()=>{"use strict"});function G(t){return" ".repeat(t)}function Bn(t,e="vm"){let n=t.scope??e;return t.path?`${n}.${t.path}`:n}function Dy(t){return t.parts.map(e=>typeof e=="string"?e:`\${${Bn(e)}}`).join("")}function Gk(t){return`\`${Dy(t)}\``}function Is(t,e=!1){let n=e?" as ActionDescriptor":"";if(!t.params||Object.keys(t.params).length===0)return`{ name: ${JSON.stringify(t.name)} }${n}`;let r=Object.entries(t.params).map(([i,o])=>`${i}: ${bn(o,0)}`).join(", ");return`{ name: ${JSON.stringify(t.name)}, params: { ${r} } }${n}`}function Zu(t,e,n=!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`[
68
+ ${t.map(r=>`${G(e+1)}${Zu(r,e+1,n)}`).join(`,
69
69
  `)}
70
- ${G(e)}]`;if(typeof t=="object"&&t!==null){let r=t;return"kind"in r&&r.kind==="action"?Cs(r,n):`{
71
- ${Object.entries(r).map(([o,s])=>`${o}: ${Uu(s,e+1,n)}`).map(o=>`${G(e+1)}${o}`).join(`,
70
+ ${G(e)}]`;if(typeof t=="object"&&t!==null){let r=t;return"kind"in r&&r.kind==="action"?Is(r,n):`{
71
+ ${Object.entries(r).map(([o,s])=>`${o}: ${Zu(s,e+1,n)}`).map(o=>`${G(e+1)}${o}`).join(`,
72
72
  `)}
73
- ${G(e)}}`}return"undefined"}function Dn(t,e,n=!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`[
74
- ${t.map(r=>`${G(e+1)}${Dn(r,e+1,n)}`).join(`,
73
+ ${G(e)}}`}return"undefined"}function bn(t,e,n=!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`[
74
+ ${t.map(r=>`${G(e+1)}${bn(r,e+1,n)}`).join(`,
75
75
  `)}
76
- ${G(e)}]`;if(typeof t=="object"&&t!==null&&"kind"in t){if(t.kind==="binding")return jn(t);if(t.kind==="action")return Cs(t,n);if(t.kind==="literal")return Uu(t.value,e,n);if(t.kind==="concat")return Dk(t)}return"undefined"}function $r(t,e){let n=t[e];if(n!=null){if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="object"&&"kind"in n&&n.kind==="literal")return n.value}}function H(t,e){let n=t[e];if(n!=null)return Dn(n,0)}function zi(t,e,n){let r=ky(e,n);r&&t.push(r)}function Fk(t,e){let n=t.action??t[e==="onClick"?"onClick":"onSubmit"];if(!n||typeof n!="object"||!("kind"in n)||n.kind!=="action")return;let r=Cs(n,!0);return e==="onSubmit"?`onSubmit={(e) => { e.preventDefault(); void dispatchAction(${r}); }}`:`onClick={() => { void dispatchAction(${r}); }}`}function Ji(t,e="e.target.value"){let n=t.onChange;if(!n||typeof n!="object"||!("kind"in n)||n.kind!=="action")return;let r=n;if(!r.params||Object.keys(r.params).length===0)return`onChange={(e) => { void dispatchAction({ name: ${JSON.stringify(r.name)}, params: { value: ${e} } } as ActionDescriptor); }}`;let i=Object.entries(r.params).map(([o,s])=>`${o}: ${Dn(s,0)}`).join(", ");return`onChange={(e) => { void dispatchAction({ name: ${JSON.stringify(r.name)}, params: { ${i}, value: ${e} } } as ActionDescriptor); }}`}function Wu(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function qk(t,e){let n=$r(e,"variant");if(typeof n=="string")return` vc-${Wu(t)}--${n}`;let r=e.variant;if(r&&typeof r=="object"&&"kind"in r&&r.kind==="concat")return` vc-${Wu(t)}--${Ty(r)}`;let i=H(e,"variant");if(i)return` vc-${Wu(t)}--\${${i}}`}function Gi(t,e,n){let r=e.className??"",i=qk(t,n);if(i)return typeof $r(n,"variant")=="string"?`className="${r}${i}"`:`className={\`${r}${i}\`}`;if(e.wrapProp&&$r(n,e.wrapProp)===!0)return`className="${r} vc-wrap"`;if(e.sizeClass&&n.size){let o=H(n,"size");return`className={\`${e.className} ${e.sizeClass}-\${${o} ?? 'md'}\`}`}return`className="${r}"`}function Py(t,e,n){let r=$r(e,"label"),i=$r(e,"help"),o=$r(e,"error"),s=H(e,"label"),a=H(e,"help"),c=H(e,"error"),l=[`${G(n)}<label className="vc-field">`];return typeof r=="string"?l.push(`${G(n+1)}<span className="vc-text vc-text--field-label">{${JSON.stringify(r)}}</span>`):s&&l.push(`${G(n+1)}{${s} ? <span className="vc-text vc-text--field-label">{${s}}</span> : null}`),l.push(`${G(n+1)}${t}`),typeof i=="string"?l.push(`${G(n+1)}<span className="vc-text vc-text--field-help">{${JSON.stringify(i)}}</span>`):a&&l.push(`${G(n+1)}{${a} ? <span className="vc-text vc-text--field-help">{${a}}</span> : null}`),typeof o=="string"?l.push(`${G(n+1)}<span className="vc-text vc-text--field-error">{${JSON.stringify(o)}}</span>`):c&&l.push(`${G(n+1)}{${c} ? <span className="vc-text vc-text--field-error">{${c}}</span> : null}`),l.push(`${G(n)}</label>`),l.join(`
77
- `)}function Bk(t,e){let n=H(t,"name")??'""',r=H(t,"label")??'""',i=t.enabled?`disabled={${H(t,"enabled")} === false}`:"",o=Ji(t,"e.target.checked")??"",s=t.checked?o?`checked={${H(t,"checked")}}`:`defaultChecked={${H(t,"checked")}}`:"";return`${G(e)}<label className="vc-checkbox">
78
- ${G(e+1)}<input type="checkbox" name={${n}} ${s} ${i} ${o} />
76
+ ${G(e)}]`;if(typeof t=="object"&&t!==null&&"kind"in t){if(t.kind==="binding")return Bn(t);if(t.kind==="action")return Is(t,n);if(t.kind==="literal")return Zu(t.value,e,n);if(t.kind==="concat")return Gk(t)}return"undefined"}function Fn(t,e){let n=t[e];if(n!=null){if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="object"&&"kind"in n&&n.kind==="literal")return n.value}}function H(t,e){let n=t[e];if(n!=null)return bn(n,0)}function Gt(t,e,n=[]){let r=e.data;return typeof r!="object"||r===null||!("kind"in r)||r.kind!=="literal"?[]:Object.entries(r.value).map(([i,o])=>{let s=Oy(i);if(n.includes(s))throw new Error(`<${t}> data key "${i}" duplicates the ${s} attribute this element renders`);return`${s}={${bn(o,0)}}`})}function ep(t,e,n){if(t[e]===void 0||t[e]===null)return;let r=Fn(t,e);return r!==void 0?r?`${n}="true"`:void 0:`${n}={${H(t,e)} ? true : undefined}`}function Ki(t,e,n){let r=Ay(e,n);r&&t.push(r)}function Jk(t,e){let n=t.action??t[e==="onClick"?"onClick":"onSubmit"];if(!n||typeof n!="object"||!("kind"in n)||n.kind!=="action")return;let r=Is(n,!0);return e==="onSubmit"?`onSubmit={(e) => { e.preventDefault(); void dispatchAction(${r}); }}`:`onClick={() => { void dispatchAction(${r}); }}`}function Xi(t,e="e.target.value"){let n=t.onChange;if(!n||typeof n!="object"||!("kind"in n)||n.kind!=="action")return;let r=n;if(!r.params||Object.keys(r.params).length===0)return`onChange={(e) => { void dispatchAction({ name: ${JSON.stringify(r.name)}, params: { value: ${e} } } as ActionDescriptor); }}`;let i=Object.entries(r.params).map(([o,s])=>`${o}: ${bn(s,0)}`).join(", ");return`onChange={(e) => { void dispatchAction({ name: ${JSON.stringify(r.name)}, params: { ${i}, value: ${e} } } as ActionDescriptor); }}`}function Qu(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Kk(t,e){let n=Fn(e,"variant");if(typeof n=="string")return` vc-${Qu(t)}--${n}`;let r=e.variant;if(r&&typeof r=="object"&&"kind"in r&&r.kind==="concat")return` vc-${Qu(t)}--${Dy(r)}`;let i=H(e,"variant");if(i)return` vc-${Qu(t)}--\${${i}}`}function Yi(t,e,n){let r=e.className??"",i=Kk(t,n);if(i)return typeof Fn(n,"variant")=="string"?`className="${r}${i}"`:`className={\`${r}${i}\`}`;if(e.wrapProp&&Fn(n,e.wrapProp)===!0)return`className="${r} vc-wrap"`;if(e.sizeClass&&n.size){let o=H(n,"size");return`className={\`${e.className} ${e.sizeClass}-\${${o} ?? 'md'}\`}`}return`className="${r}"`}function My(t,e,n,r=[]){let i=Fn(e,"label"),o=Fn(e,"help"),s=Fn(e,"error"),a=H(e,"label"),l=H(e,"help"),c=H(e,"error"),p=[`${G(n)}<label ${['className="vc-field"',...r].join(" ")}>`];return typeof i=="string"?p.push(`${G(n+1)}<span className="vc-text vc-text--field-label">{${JSON.stringify(i)}}</span>`):a&&p.push(`${G(n+1)}{${a} ? <span className="vc-text vc-text--field-label">{${a}}</span> : null}`),p.push(`${G(n+1)}${t}`),typeof o=="string"?p.push(`${G(n+1)}<span className="vc-text vc-text--field-help">{${JSON.stringify(o)}}</span>`):l&&p.push(`${G(n+1)}{${l} ? <span className="vc-text vc-text--field-help">{${l}}</span> : null}`),typeof s=="string"?p.push(`${G(n+1)}<span className="vc-text vc-text--field-error">{${JSON.stringify(s)}}</span>`):c&&p.push(`${G(n+1)}{${c} ? <span className="vc-text vc-text--field-error">{${c}}</span> : null}`),p.push(`${G(n)}</label>`),p.join(`
77
+ `)}function Yk(t,e){let n=H(t,"binding")??H(t,"name")??'""',r=H(t,"label")??'""',i=t.enabled?`disabled={${H(t,"enabled")} === false}`:"",o=Xi(t,"e.target.checked")??"",s=t.checked?o?`checked={${H(t,"checked")}}`:`defaultChecked={${H(t,"checked")}}`:"";return`${G(e)}<label className="vc-checkbox">
78
+ ${G(e+1)}<input type="checkbox" name={${n}} ${[s,i,o,...Gt("Checkbox",t)].join(" ")} />
79
79
  ${G(e+1)}<span>{${r}}</span>
80
- ${G(e)}</label>`}function Hk(t,e){let n=H(t,"binding")??H(t,"name")??'""',r=H(t,"value")??'""',i=H(t,"label")??'""',o=t.enabled?`disabled={${H(t,"enabled")} === false}`:"",s=Ji(t,"e.target.value")??"",a=t.checked?s?`checked={${H(t,"checked")}}`:`defaultChecked={${H(t,"checked")}}`:"";return`${G(e)}<label className="vc-radio">
81
- ${G(e+1)}<input type="radio" name={${n}} value={${r}} ${a} ${o} ${s} />
80
+ ${G(e)}</label>`}function Xk(t,e){let n=H(t,"binding")??H(t,"name")??'""',r=H(t,"value")??'""',i=H(t,"label")??'""',o=t.enabled?`disabled={${H(t,"enabled")} === false}`:"",s=Xi(t,"e.target.value")??"",a=t.checked?s?`checked={${H(t,"checked")}}`:`defaultChecked={${H(t,"checked")}}`:"";return`${G(e)}<label className="vc-radio">
81
+ ${G(e+1)}<input type="radio" name={${n}} value={${r}} ${[a,o,s,...Gt("Radio",t)].join(" ")} />
82
82
  ${G(e+1)}<span>{${i}}</span>
83
- ${G(e)}</label>`}function Wk(t,e){let n=H(t,"binding")??H(t,"name")??'""',r=H(t,"label")??'""',i=t.enabled?`disabled={${H(t,"enabled")} === false}`:"",o=Ji(t,"e.target.checked")??"",s=t.checked?o?`checked={${H(t,"checked")}}`:`defaultChecked={${H(t,"checked")}}`:"";return`${G(e)}<label className="vc-switch">
84
- ${G(e+1)}<input type="checkbox" role="switch" name={${n}} ${s} ${i} ${o} />
83
+ ${G(e)}</label>`}function Qk(t,e){let n=H(t,"binding")??H(t,"name")??'""',r=H(t,"label")??'""',i=t.enabled?`disabled={${H(t,"enabled")} === false}`:"",o=Xi(t,"e.target.checked")??"",s=t.checked?o?`checked={${H(t,"checked")}}`:`defaultChecked={${H(t,"checked")}}`:"";return`${G(e)}<label className="vc-switch">
84
+ ${G(e+1)}<input type="checkbox" role="switch" name={${n}} ${[s,i,o,...Gt("Switch",t)].join(" ")} />
85
85
  ${G(e+1)}<span>{${r}}</span>
86
- ${G(e)}</label>`}function Uk(t,e,n){let r=t.props;if(r.alt!==void 0){let s=[Gi(t.name,e,r),`src={${H(r,"name")??'""'}}`,`alt={${H(r,"alt")??'""'}}`];return zi(s,e,r),r.id&&s.push(`id={${H(r,"id")}}`),`${G(n)}<img ${s.join(" ")} />`}let o=[Gi(t.name,e,r),"aria-hidden"];return zi(o,e,r),r.id&&o.push(`id={${H(r,"id")}}`),r.name&&o.push(`data-icon={${H(r,"name")}}`),`${G(n)}<span ${o.join(" ")} />`}function Iy(t,e){let n=t.options;if(!n||typeof n!="object"||!("kind"in n))return"";if(n.kind==="literal"&&Array.isArray(n.value))return n.value.map(o=>`${G(e+1)}<option key={${JSON.stringify(o.value)}} value={${JSON.stringify(o.value)}}>{${JSON.stringify(o.label)}}</option>`).join(`
87
- `);let r=Dn(n,0);return`${G(e+1)}{${r}.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}`}function Ry(t,e,n,r){let i=[Gi(t,e,n)];zi(i,e,n),e.ariaHidden&&i.push("aria-hidden"),n.id&&i.push(`id={${H(n,"id")}}`),n.role?i.push(`role={${H(n,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(n.ariaLabel?i.push(`aria-label={${H(n,"ariaLabel")}}`):n.label?i.push(`aria-label={${H(n,"label")}}`):n.title&&i.push(`aria-label={${H(n,"title")}}`)),n.name&&i.push(`name={${H(n,"name")}}`),n.placeholder&&i.push(`placeholder={${H(n,"placeholder")}}`),e.inputType&&i.push(`type={${H(n,"inputType")??JSON.stringify(e.inputType)}}`),n.required&&i.push(`required={${H(n,"required")}}`),n.readonly&&i.push(`readOnly={${H(n,"readonly")}}`),n.enabled&&i.push(`disabled={${H(n,"enabled")} === false}`),e.tag==="img"&&n.src&&i.push(`src={${H(n,"src")}}`),e.tag==="img"&&n.alt&&i.push(`alt={${H(n,"alt")}}`),e.tag==="progress"&&n.value&&i.push(`value={${H(n,"value")}}`),n.rows&&i.push(`rows={${H(n,"rows")??"4"}}`);let o=Ji(n);return o?(n.value&&e.tag!=="progress"&&i.push(`value={${H(n,"value")}}`),i.push(o)):n.value&&e.tag!=="progress"&&i.push(`defaultValue={${H(n,"value")}}`),`${G(r)}<${e.tag} ${i.join(" ")} />`}function Ay(t,e,n,r){let i=[];if(e.ariaHidden&&i.push("aria-hidden"),n.id&&i.push(`id={${H(n,"id")}}`),n.role?i.push(`role={${H(n,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(n.ariaLabel?i.push(`aria-label={${H(n,"ariaLabel")}}`):n.label?i.push(`aria-label={${H(n,"label")}}`):n.title&&i.push(`aria-label={${H(n,"title")}}`)),e.actionEvent){let o=Fk(n,e.actionEvent);o&&i.push(o)}if(n.name&&i.push(`name={${H(n,"name")}}`),e.tag==="select"||e.tag==="textarea"||e.tag==="input"){n.required&&i.push(`required={${H(n,"required")}}`),n.enabled&&i.push(`disabled={${H(n,"enabled")} === false}`);let o=Ji(n);o?(n.value&&i.push(`value={${H(n,"value")}}`),i.push(o)):n.value&&i.push(`defaultValue={${H(n,"value")}}`)}return e.tag==="button"&&n.enabled&&i.push(`disabled={${H(n,"enabled")} === false}`),e.tag==="a"&&n.href&&i.push(`href={${H(n,"href")}}`),e.tag==="button"&&i.push(`type={${H(n,"type")??'"button"'}}`),i.push(Gi(t,e,n)),zi(i,e,n),`<${r} ${i.join(" ")}`}function zt(t,e,n){if(e.visible===void 0)return t;let r=H(e,"visible");return`${G(n)}{${r} !== false ? (
86
+ ${G(e)}</label>`}function Zk(t,e,n){let r=t.props;if(r.alt!==void 0){let s=[Yi(t.name,e,r),`src={${H(r,"name")??'""'}}`,`alt={${H(r,"alt")??'""'}}`];return Ki(s,e,r),r.id&&s.push(`id={${H(r,"id")}}`),s.push(...Gt(t.name,r)),`${G(n)}<img ${s.join(" ")} />`}let o=[Yi(t.name,e,r),"aria-hidden"];return Ki(o,e,r),r.id&&o.push(`id={${H(r,"id")}}`),o.push(...Gt(t.name,r,r.name?["data-icon"]:[])),r.name&&o.push(`data-icon={${H(r,"name")}}`),`${G(n)}<span ${o.join(" ")} />`}function Vy(t,e){let n=t.options;if(!n||typeof n!="object"||!("kind"in n))return"";if(n.kind==="literal"&&Array.isArray(n.value))return n.value.map(o=>`${G(e+1)}<option key={${JSON.stringify(o.value)}} value={${JSON.stringify(o.value)}}>{${JSON.stringify(o.label)}}</option>`).join(`
87
+ `);let r=bn(n,0);return`${G(e+1)}{${r}.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}`}function Ly(t,e,n,r){let i=[Yi(t,e,n)];Ki(i,e,n),e.ariaHidden&&i.push("aria-hidden"),n.id&&i.push(`id={${H(n,"id")}}`),i.push(...Gt(t,n)),n.role?i.push(`role={${H(n,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(n.label?i.push(`aria-label={${H(n,"label")}}`):n.title&&i.push(`aria-label={${H(n,"title")}}`));let o=ep(n,"error","aria-invalid");o&&i.push(o),n.name&&i.push(`name={${H(n,"name")}}`),n.placeholder&&i.push(`placeholder={${H(n,"placeholder")}}`),e.inputType&&i.push(`type={${H(n,"inputType")??JSON.stringify(e.inputType)}}`),n.required&&i.push(`required={${H(n,"required")}}`),n.readonly&&i.push(`readOnly={${H(n,"readonly")}}`),n.enabled&&i.push(`disabled={${H(n,"enabled")} === false}`),e.tag==="img"&&n.src&&i.push(`src={${H(n,"src")}}`),e.tag==="img"&&n.alt&&i.push(`alt={${H(n,"alt")}}`),e.tag==="progress"&&n.value&&i.push(`value={${H(n,"value")}}`),n.rows&&i.push(`rows={${H(n,"rows")??"4"}}`);let s=Xi(n);return s?(n.value&&e.tag!=="progress"&&i.push(`value={${H(n,"value")}}`),i.push(s)):n.value&&e.tag!=="progress"&&i.push(`defaultValue={${H(n,"value")}}`),`${G(r)}<${e.tag} ${i.join(" ")} />`}function jy(t,e,n,r){let i=[];if(e.ariaHidden&&i.push("aria-hidden"),n.id&&i.push(`id={${H(n,"id")}}`),i.push(...Gt(t,n)),n.role?i.push(`role={${H(n,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(n.label?i.push(`aria-label={${H(n,"label")}}`):n.title&&i.push(`aria-label={${H(n,"title")}}`)),e.actionEvent){let s=Jk(n,e.actionEvent);s&&i.push(s)}let o=ep(n,"selected","aria-current");if(o&&i.push(o),n.name&&i.push(`name={${H(n,"name")}}`),e.tag==="select"||e.tag==="textarea"||e.tag==="input"){let s=ep(n,"error","aria-invalid");s&&i.push(s),n.required&&i.push(`required={${H(n,"required")}}`),n.enabled&&i.push(`disabled={${H(n,"enabled")} === false}`);let a=Xi(n);a?(n.value&&i.push(`value={${H(n,"value")}}`),i.push(a)):n.value&&i.push(`defaultValue={${H(n,"value")}}`)}return e.tag==="button"&&n.enabled&&i.push(`disabled={${H(n,"enabled")} === false}`),e.tag==="a"&&n.href&&i.push(`href={${H(n,"href")}}`),e.tag==="button"&&i.push(`type={${H(n,"type")??'"button"'}}`),i.push(Yi(t,e,n)),Ki(i,e,n),`<${r} ${i.join(" ")}`}function zt(t,e,n){if(e.visible===void 0)return t;let r=H(e,"visible");return`${G(n)}{${r} !== false ? (
88
88
  ${t}
89
- ${G(n)}) : null}`}function zu(t,e,n,r){if(t.length===0)return"";let i=r??"vm";return t.map(s=>{if(s.kind==="text"){let a=s.value;return a?`${G(e)}{${JSON.stringify(a)}}`:""}return s.kind==="binding"?`${G(e)}{${jn(s,i)}}`:s.kind==="map"?zk(s,e,n):s.kind==="fragment"?zu(s.children,e,n,r):n(s,e,r)}).filter(Boolean).join(`
90
- `)}function zk(t,e,n){let r=t.item,i=n(t.body,e+1,r);if(t.key){let o=` key={${jn(t.key,r)}}`;i=i.replace(/^( +)<(\w+)/,`$1<$2${o}`)}return`${G(e)}{${jn(t.source)}.map((${r}) => (
89
+ ${G(n)}) : null}`}function tp(t,e,n,r){if(t.length===0)return"";let i=r??"vm";return t.map(s=>{if(s.kind==="text"){let a=s.value;return a?`${G(e)}{${JSON.stringify(a)}}`:""}return s.kind==="binding"?`${G(e)}{${Bn(s,i)}}`:s.kind==="map"?eE(s,e,n):s.kind==="fragment"?tp(s.children,e,n,r):n(s,e,r)}).filter(Boolean).join(`
90
+ `)}function eE(t,e,n){let r=t.item,i=n(t.body,e+1,r);if(t.key){let o=` key={${Bn(t.key,r)}}`;i=i.replace(/^( +)<(\w+)/,`$1<$2${o}`)}return`${G(e)}{${Bn(t.source)}.map((${r}) => (
91
91
  ${i}
92
- ${G(e)}))}`}function Gk(t,e,n,r,i){let o=t.props,s=zu(t.children,n+1,i,r);if(e.checkbox)return zt(Bk(o,n),o,n);if(t.name==="Radio")return zt(Hk(o,n),o,n);if(t.name==="Switch")return zt(Wk(o,n),o,n);if(t.name==="Icon")return zt(Uk(t,e,n),o,n);if(t.name==="Spinner"){let d=[Gi(t.name,e,o),'aria-busy="true"'];return zi(d,e,o),o.id&&d.push(`id={${H(o,"id")}}`),o.role?d.push(`role={${H(o,"role")}}`):e.defaultRole&&d.push(`role="${e.defaultRole}"`),zt(`${G(n)}<div ${d.join(" ")} />`,o,n)}if(e.fieldContainer){let d=s||`${G(n+1)}<div />`;return zt(Py(d,o,n),o,n)}if(e.fieldWrap){let d=e.tag,p;if(e.optionsProp&&o[e.optionsProp]){let f=Ay(t.name,e,o,d);p=`${G(n+1)}${f}>
93
- ${Iy(o,n+2)}
94
- ${G(n+1)}</${d}>`}else p=Ry(t.name,e,o,n+1);return zt(Py(p,o,n),o,n)}let a=e.tag;if(e.void)return zt(Ry(t.name,e,o,n),o,n);let c=Ay(t.name,e,o,a),l;return!s&&e.optionsProp&&o[e.optionsProp]?l=`${G(n)}${c}>
95
- ${Iy(o,n+1)}
96
- ${G(n)}</${a}>`:s?l=`${G(n)}${c}>
92
+ ${G(e)}))}`}function tE(t,e,n,r,i){let o=t.props,s=tp(t.children,n+1,i,r);if(e.checkbox)return zt(Yk(o,n),o,n);if(t.name==="Radio")return zt(Xk(o,n),o,n);if(t.name==="Switch")return zt(Qk(o,n),o,n);if(t.name==="Icon")return zt(Zk(t,e,n),o,n);if(t.name==="Spinner"){let p=[Yi(t.name,e,o),'aria-busy="true"'];return Ki(p,e,o),o.id&&p.push(`id={${H(o,"id")}}`),p.push(...Gt(t.name,o)),o.role?p.push(`role={${H(o,"role")}}`):e.defaultRole&&p.push(`role="${e.defaultRole}"`),zt(`${G(n)}<div ${p.join(" ")} />`,o,n)}if(e.fieldContainer){let p=s||`${G(n+1)}<div />`;return zt(My(p,o,n,Gt(t.name,o)),o,n)}if(e.fieldWrap){let p=e.tag,d;if(e.optionsProp&&o[e.optionsProp]){let f=jy(t.name,e,o,p);d=`${G(n+1)}${f}>
93
+ ${Vy(o,n+2)}
94
+ ${G(n+1)}</${p}>`}else d=Ly(t.name,e,o,n+1);return zt(My(d,o,n),o,n)}let a=e.tag;if(e.void)return zt(Ly(t.name,e,o,n),o,n);let l=jy(t.name,e,o,a),c;return!s&&e.optionsProp&&o[e.optionsProp]?c=`${G(n)}${l}>
95
+ ${Vy(o,n+1)}
96
+ ${G(n)}</${a}>`:s?c=`${G(n)}${l}>
97
97
  ${s}
98
- ${G(n)}</${a}>`:l=`${G(n)}${c} />`,zt(l,o,n)}function Jk(t,e){let n=e??"vm";return Object.entries(t).map(([r,i])=>typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${r}={${jn(i,n)}}`:`${r}={${Dn(i,0)}}`).join(" ")}function Kk(t,e,n){let r=Jk(t.props,n),i=r?` ${r}`:"";return`${G(e)}<${t.name}${i} />`}function Yk(t,e){let n=e??"vm";return Object.entries(t).map(([r,i])=>r==="action"&&typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="action"?`${r}={${Cs(i,!0)}}`:typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${r}={${jn(i,n)}}`:r==="children"?"":`${r}={${Dn(i,0,r==="columns")}}`).join(" ")}function Xk(t,e,n,r){let i=Yk(t.props,n),o=i?` ${i}`:"",s=zu(t.children,e+1,r,n);return s?`${G(e)}<${t.name}${o}>
98
+ ${G(n)}</${a}>`:c=`${G(n)}${l} />`,zt(c,o,n)}function nE(t,e){let n=e??"vm";return Object.entries(t).map(([r,i])=>typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${r}={${Bn(i,n)}}`:`${r}={${bn(i,0)}}`).join(" ")}function rE(t,e,n){let r=nE(t.props,n),i=r?` ${r}`:"";return`${G(e)}<${t.name}${i} />`}function iE(t,e){let n=e??"vm";return Object.entries(t).map(([r,i])=>r==="action"&&typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="action"?`${r}={${Is(i,!0)}}`:typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${r}={${Bn(i,n)}}`:r==="children"?"":`${r}={${bn(i,0,r==="columns")}}`).join(" ")}function oE(t,e,n,r){let i=iE(t.props,n),o=i?` ${i}`:"",s=tp(t.children,e+1,r,n);return s?`${G(e)}<${t.name}${o}>
99
99
  ${s}
100
- ${G(e)}</${t.name}>`:`${G(e)}<${t.name}${o} />`}function Oy(t,e,n){return t in e.elements&&!n.includes(t)}function Ui(t,e){if(t.kind==="viewRef"){e.add(t.name);return}if(t.kind==="component"){for(let n of t.children)Ui(n,e);return}if(t.kind==="map"&&Ui(t.body,e),t.kind==="fragment")for(let n of t.children)Ui(n,e)}function Ln(t,e,n,r){if(t.kind==="component"){Oy(t.name,e,n)||r.add(t.name);for(let i of t.children)Ln(i,e,n,r);return}if(t.kind==="map"&&Ln(t.body,e,n,r),t.kind==="fragment")for(let i of t.children)Ln(i,e,n,r)}function Ny(t,e){let n=(r,i,o)=>r.kind==="viewRef"?Kk(r,i,o):r.kind!=="component"?"":Oy(r.name,t,e)?Gk(r,t.elements[r.name],i,o,n):Xk(r,i,o,n);return(r,i,o)=>n(r,i,o)}var My=K(()=>{"use strict";Ey()});var Ju={};$n(Ju,{partialReactOutputPath:()=>oE,renderReactComponent:()=>Gu,renderReactFromIr:()=>rE,renderReactPreviewBundle:()=>iE});import{resolve as Qk}from"node:path";function Zk(t){if(t.isPartial)return t.exportName;let e=t.exportName.replace(/View$/,"")||t.exportName;return e.charAt(0).toUpperCase()+e.slice(1)}function eE(t,e){if(t.kind!=="component")throw new Error(`View IR root must be a component node (${e})`);return t}function Ly(t){if(!t)return[];let e=t.match(/\b[A-Z][A-Za-z0-9]*ViewModel\b/g);return e?[...new Set(e)]:[]}function tE(t){return t.propsType?t.propDecls?`{ ${t.propDecls.map(e=>e.name).join(", ")} }: ${t.propsType}`:`props: ${t.propsType}`:""}function Vy(t){return t.trimStart().startsWith("{")?`return (
100
+ ${G(e)}</${t.name}>`:`${G(e)}<${t.name}${o} />`}function Fy(t,e,n){return t in e.elements&&!n.includes(t)}function Ji(t,e){if(t.kind==="viewRef"){e.add(t.name);return}if(t.kind==="component"){for(let n of t.children)Ji(n,e);return}if(t.kind==="map"&&Ji(t.body,e),t.kind==="fragment")for(let n of t.children)Ji(n,e)}function qn(t,e,n,r){if(t.kind==="component"){Fy(t.name,e,n)||r.add(t.name);for(let i of t.children)qn(i,e,n,r);return}if(t.kind==="map"&&qn(t.body,e,n,r),t.kind==="fragment")for(let i of t.children)qn(i,e,n,r)}function qy(t,e){let n=(r,i,o)=>r.kind==="viewRef"?rE(r,i,o):r.kind!=="component"?"":Fy(r.name,t,e)?tE(r,t.elements[r.name],i,o,n):oE(r,i,o,n);return(r,i,o)=>n(r,i,o)}var By=K(()=>{"use strict";Ty();Ny()});var rp={};kn(rp,{partialReactOutputPath:()=>fE,renderReactComponent:()=>np,renderReactFromIr:()=>pE,renderReactPreviewBundle:()=>dE});import{resolve as sE}from"node:path";function aE(t){if(t.isPartial)return t.exportName;let e=t.exportName.replace(/View$/,"")||t.exportName;return e.charAt(0).toUpperCase()+e.slice(1)}function cE(t,e){if(t.kind!=="component")throw new Error(`View IR root must be a component node (${e})`);return t}function Wy(t){if(!t)return[];let e=t.match(/\b[A-Z][A-Za-z0-9]*ViewModel\b/g);return e?[...new Set(e)]:[]}function lE(t){return t.propsType?t.propDecls?`{ ${t.propDecls.map(e=>e.name).join(", ")} }: ${t.propsType}`:`props: ${t.propsType}`:""}function Hy(t){return t.trimStart().startsWith("{")?`return (
101
101
  <>${t}
102
102
  </>
103
103
  );`:`return (
104
104
  ${t}
105
- );`}function nE(t){let e=t.replace(/^\/\*\*[\s\S]*?\*\/\s*/,"");return e=e.replace(/^import\s[^\n]+\n/gm,""),e.trimStart()}async function jy(t,e){let n=await qu(e.elementMapPath),r=e.allowlistExtra??[],i=Zk(t),o=eE(t.root,t.source),a=Ny(n,r)(o,2),c=new Set;Ln(t.root,n,r,c);let l=[...c].sort(),d=new Set;Ui(t.root,d);let p=[...d].sort(),f=e.previewImports,m=f?.dispatch??e.runtimeImportFrom,y=f?.contracts??e.contractsImportFrom,g=f?.extensions??e.extensionsImportFrom,w=new Set;if(t.isPartial)for(let O of Ly(t.propsType))w.add(O);else w.add(t.viewModel);let b=["import type { ReactElement } from 'react';"];b.push(`import { dispatchAction } from '${m}';`);let P=[...w].sort(),x=P.length>0?`${P.join(", ")}, ActionDescriptor`:"ActionDescriptor";b.push(`import type { ${x} } from '${y}';`),l.length>0&&b.push(`import { ${l.join(", ")} } from '${g}';`);for(let O of p){if(e.inlineViewRefs)continue;let j=e.viewRefImportFrom?.get(O)??`./${O}.generated.js`;b.push(`import { ${O} } from '${j}';`)}let R=f?`/**
105
+ );`}function uE(t){let e=t.replace(/^\/\*\*[\s\S]*?\*\/\s*/,"");return e=e.replace(/^import\s[^\n]+\n/gm,""),e.trimStart()}async function Uy(t,e){let n=await Ku(e.elementMapPath),r=e.allowlistExtra??[],i=aE(t),o=cE(t.root,t.source),a=qy(n,r)(o,2),l=new Set;qn(t.root,n,r,l);let c=[...l].sort(),p=new Set;Ji(t.root,p);let d=[...p].sort(),f=e.previewImports,m=f?.dispatch??e.runtimeImportFrom,y=f?.contracts??e.contractsImportFrom,g=f?.extensions??e.extensionsImportFrom,w=new Set;if(t.isPartial)for(let O of Wy(t.propsType))w.add(O);else w.add(t.viewModel);let b=["import type { ReactElement } from 'react';"];b.push(`import { dispatchAction } from '${m}';`);let P=[...w].sort(),x=P.length>0?`${P.join(", ")}, ActionDescriptor`:"ActionDescriptor";b.push(`import type { ${x} } from '${y}';`),c.length>0&&b.push(`import { ${c.join(", ")} } from '${g}';`);for(let O of d){if(e.inlineViewRefs)continue;let j=e.viewRefImportFrom?.get(O)??`./${O}.generated.js`;b.push(`import { ${O} } from '${j}';`)}let R=f?`/**
106
106
  * Preview module \u2014 compiled live from ${t.source}
107
107
  * Same lowering as generated/; not written to disk.
108
108
  */`:`/**
109
109
  * Auto-generated React component from ${t.source}
110
110
  * DO NOT EDIT \u2014 regenerate with: view-contracts render react
111
- */`;if(t.isPartial){let O=tE(t);return`${R}
111
+ */`;if(t.isPartial){let O=lE(t);return`${R}
112
112
  ${b.join(`
113
113
  `)}
114
114
 
115
115
  export function ${i}(${O}): ReactElement {
116
- ${Vy(a)}
116
+ ${Hy(a)}
117
117
  }
118
118
  `}return`${R}
119
119
  ${b.join(`
120
120
  `)}
121
121
 
122
122
  export function ${i}({ vm }: { vm: ${t.viewModel} }): ReactElement {
123
- ${Vy(a)}
123
+ ${Hy(a)}
124
124
  }
125
- `}async function Gu(t,e){return jy(t,e)}async function rE(t,e,n){let{writeFile:r,mkdir:i}=await import("node:fs/promises"),{dirname:o}=await import("node:path"),s=await jy(t,n);await i(o(e),{recursive:!0}),await r(e,s,"utf-8")}async function iE(t,e,n){let r={...n,inlineViewRefs:!0},i=await Promise.all(e.map(R=>Gu(R,r))),o=await Gu(t,r),s=nE,a=await qu(n.elementMapPath),c=n.allowlistExtra??[],l=new Set;Ln(t.root,a,c,l);for(let R of e)Ln(R.root,a,c,l);let d=n.previewImports,p=d?.dispatch??n.runtimeImportFrom,f=d?.contracts??n.contractsImportFrom,m=d?.extensions??n.extensionsImportFrom,y=new Set([t.viewModel]);for(let R of e)for(let O of Ly(R.propsType))y.add(O);let g=["import type { ReactElement } from 'react';",`import { dispatchAction } from '${p}';`,`import type { ${[...y].sort().join(", ")}, ActionDescriptor } from '${f}';`],w=[...l].sort();w.length>0&&g.push(`import { ${w.join(", ")} } from '${m}';`);let b=d?`/**
125
+ `}async function np(t,e){return Uy(t,e)}async function pE(t,e,n){let{writeFile:r,mkdir:i}=await import("node:fs/promises"),{dirname:o}=await import("node:path"),s=await Uy(t,n);await i(o(e),{recursive:!0}),await r(e,s,"utf-8")}async function dE(t,e,n){let r={...n,inlineViewRefs:!0},i=await Promise.all(e.map(R=>np(R,r))),o=await np(t,r),s=uE,a=await Ku(n.elementMapPath),l=n.allowlistExtra??[],c=new Set;qn(t.root,a,l,c);for(let R of e)qn(R.root,a,l,c);let p=n.previewImports,d=p?.dispatch??n.runtimeImportFrom,f=p?.contracts??n.contractsImportFrom,m=p?.extensions??n.extensionsImportFrom,y=new Set([t.viewModel]);for(let R of e)for(let O of Wy(R.propsType))y.add(O);let g=["import type { ReactElement } from 'react';",`import { dispatchAction } from '${d}';`,`import type { ${[...y].sort().join(", ")}, ActionDescriptor } from '${f}';`],w=[...c].sort();w.length>0&&g.push(`import { ${w.join(", ")} } from '${m}';`);let b=p?`/**
126
126
  * Preview module \u2014 compiled live from ${t.source}
127
127
  * Same lowering as generated/; not written to disk.
128
128
  */`:"",P=i.map(s),x=s(o);return`${b}
@@ -133,44 +133,44 @@ ${P.join(`
133
133
 
134
134
  `)}
135
135
 
136
- ${x}`}function oE(t,e){return Qk(t,"components",`${e.exportName}.generated.tsx`)}var Ku=K(()=>{"use strict";_y();My()});import{readFile as sE}from"node:fs/promises";import{extname as aE,resolve as cE}from"node:path";async function ks(t){let e=cE(t),n=await sE(e,"utf-8"),r=aE(e).toLowerCase();if(r===".json")return JSON.parse(n);if(r===".yaml"||r===".yml")return lt.load(n);throw new Error(`Unsupported design file extension "${r}" (expected .yaml, .yml, or .json): ${e}`)}var Yu=K(()=>{"use strict";ir()});var Es,Ot,Cr,Ps,Ie,Sr,Fn=K(()=>{"use strict";Es=["color","dimension","shadow","typography","layout"],Ot=class extends Error{constructor(e){super(e),this.name="DesignTokenError"}},Cr=["background","foreground","radius","padding","shadow","typography","display","gridTemplateColumns","minHeight","maxWidth","width","height","margin","border","borderColor","flexDirection","fontWeight","fontSize","alignItems","justifyContent"],Ps={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"],height:["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"}},Sr=class extends Error{constructor(e){super(e),this.name="DesignConstraintError"}}});function kr(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function uE(t){if(!Cr.includes(t))throw new Ie(`Unknown variant property "${t}" (expected ${Cr.join(", ")})`);return t}function pE(t,e,n){if(typeof t!="string")throw new Ie(`${e}.${n} must be a token reference string like "{ui.primary}"`);let r=t.match(lE);if(!r)throw new Ie(`${e}.${n} must be a token reference like "{ui.primary}", got "${t}"`);return r[1]}function Dy(t,e){let n={};for(let[r,i]of Object.entries(e)){let o=uE(r),s=pE(i,t,r);n[o]={ref:s,accepts:[...Ps[o]]}}return n}function dE(t){if(t===void 0)return{};if(!kr(t))throw new Ie('Theme "defaults" must be an object');let e={};for(let[n,r]of Object.entries(t)){if(!kr(r))throw new Ie(`Theme defaults for "${n}" must be an object`);e[n]=Dy(`defaults.${n}`,r)}return e}function Xu(t){if(!kr(t))throw new Ie("Theme document must be a YAML/JSON object");let e=t.variants;if(!kr(e))throw new Ie('Theme document must contain a "variants" object');let n={};for(let[r,i]of Object.entries(e)){if(!kr(i))throw new Ie(`Theme variants for "${r}" must be an object`);let o={};for(let[s,a]of Object.entries(i)){if(!kr(a))throw new Ie(`Theme variant "${r}.${s}" must be an object`);o[s]=Dy(`${r}.${s}`,a)}n[r]=o}return{defaults:dE(t.defaults),variants:n}}var lE,Qu=K(()=>{"use strict";Fn();lE=/^\{([^}]+)\}$/});function Ki(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function hE(t){return`--${t.replace(/\./g,"-")}`}function mE(t,e){if(typeof t!="string"||!Es.includes(t))throw new Ot(`Token "${e}" has unsupported $type "${String(t)}" (expected ${Es.join(", ")})`);return t}function Fy(t,e,n){if(Ki(t)){if("$type"in t&&"$value"in t){n.push({path:e,type:mE(t.$type,e),rawValue:t.$value});return}for(let[r,i]of Object.entries(t)){if(r.startsWith("$"))continue;let o=e?`${e}.${r}`:r;Fy(i,o,n)}}}function gE(t,e){if(typeof e=="string")return e;if(t==="typography"&&Ki(e)){if(typeof e.fontFamily=="string")return e.fontFamily;let n=[e.fontWeight,e.fontStyle,e.fontSize,e.lineHeight,e.fontFamily].filter(r=>r!=null);if(n.length>0)return n.map(String).join(" ")}if(t==="shadow"&&Array.isArray(e))return e.map(n=>Ki(n)?`${n.offsetX??0} ${n.offsetY??0} ${n.blur??0} ${n.color??"transparent"}`:String(n)).join(", ");if(t==="shadow"&&Ki(e))return`${e.offsetX??0} ${e.offsetY??0} ${e.blur??0} ${e.color??"transparent"}`;throw new Ot(`Token value for "${t}" must be a string or supported object`)}function yE(t){return typeof t!="string"?null:t.match(fE)?.[1]??null}function qy(t,e,n,r,i){let o=yE(e);if(!o){let c=n.get(t);if(!c)throw new Ot(`Unknown token path "${t}"`);return{value:gE(c.type,e)}}if(r.has(t))throw new Ot(`Circular token reference detected at "${t}"`);let s=n.get(o);if(!s)throw new Ot(`Token "${t}" references unknown token "{${o}}"`);if(i.has(o))return{value:i.get(o),ref:o};r.add(t);let a=qy(o,s.rawValue,n,r,i);return r.delete(t),i.set(o,a.value),{value:a.value,ref:o}}function Zu(t){if(!Ki(t))throw new Ot("Token document must be a YAML/JSON object");let e=[];Fy(t,"",e);let n=new Map(e.map(o=>[o.path,o])),r=new Map,i=[];for(let o of e){let{value:s,ref:a}=qy(o.path,o.rawValue,n,new Set,r);r.set(o.path,s),i.push({path:o.path,type:o.type,value:s,cssVar:hE(o.path),ref:a})}return{entries:i}}var fE,ep=K(()=>{"use strict";Fn();fE=/^\{([^}]+)\}$/});function tp(t){let e=Yd(t),n=new Set;for(let r of e)Cr.includes(r)&&n.add(r);return n}var By=K(()=>{"use strict";vt();Fn()});function wE(t){return new Map(t.entries.map(e=>[e.path,e]))}function Hy(t,e,n,r,i){for(let[o,s]of Object.entries(n)){let a=Ps[o];if(!a)throw new Ie(`Unknown variant property "${o}" on ${t}`);if(!r.has(o))throw new Ie(`Property "${o}" is not allowed for ${e} in ${t}`);let c=i.get(s.ref);if(!c)throw new Ie(`${t}.${o} references unknown token "{${s.ref}}"`);if(!a.includes(c.type))throw new Ie(`${t}.${o} requires a ${a.join(" or ")} token, but "{${s.ref}}" is ${c.type}`)}}function Wy(t,e){let n=wE(t);for(let[r,i]of Object.entries(e.defaults)){let o=tp(r);Hy(`defaults.${r}`,r,i,o,n)}for(let[r,i]of Object.entries(e.variants)){let o=tp(r);for(let[s,a]of Object.entries(i))Hy(`variants.${r}.${s}`,r,a,o,n)}}function np(t,e){Wy(t,e)}var rp=K(()=>{"use strict";Fn();By()});function ip(t){let e=[":root {"];for(let n of t.entries)e.push(` ${n.cssVar}: ${n.value};`);return e.push("}"),e.join(`
137
- `)}var Uy=K(()=>{"use strict"});var Is,op=K(()=>{"use strict";Is={background:"background-color",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",height:"height",margin:"margin",border:"border",borderColor:"border-color",flexDirection:"flex-direction",fontWeight:"font-weight",fontSize:"font-size",alignItems:"align-items",justifyContent:"justify-content"}});function Rs(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function As(t,e){let n=t.entries.find(r=>r.path===e);if(!n)throw new Error(`Token reference "${e}" not found while emitting theme CSS`);return n.cssVar}var sp=K(()=>{"use strict"});function ap(t,e){let n=[];for(let[r,i]of Object.entries(e.defaults)){let o=Rs(r),s=[];for(let[a,c]of Object.entries(i)){let l=Is[a];if(!l){console.warn(`[view-contracts] CSS theme: variant property "${a}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let d=As(t,c.ref);s.push(` ${l}: var(${d});`)}s.length!==0&&n.push(`.vc-${o} {
136
+ ${x}`}function fE(t,e){return sE(t,"components",`${e.exportName}.generated.tsx`)}var ip=K(()=>{"use strict";ky();By()});import{readFile as hE}from"node:fs/promises";import{extname as mE,resolve as gE}from"node:path";async function Rs(t){let e=gE(t),n=await hE(e,"utf-8"),r=mE(e).toLowerCase();if(r===".json")return JSON.parse(n);if(r===".yaml"||r===".yml")return dt.load(n);throw new Error(`Unsupported design file extension "${r}" (expected .yaml, .yml, or .json): ${e}`)}var op=K(()=>{"use strict";ar()});var As,Vt,Pr,Ts,Ie,Er,Hn=K(()=>{"use strict";As=["color","dimension","shadow","typography","layout"],Vt=class extends Error{constructor(e){super(e),this.name="DesignTokenError"}},Pr=["background","foreground","radius","padding","shadow","typography","display","gridTemplateColumns","minHeight","maxWidth","width","height","margin","border","borderColor","flexDirection","fontWeight","fontSize","alignItems","justifyContent"],Ts={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"],height:["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"}},Er=class extends Error{constructor(e){super(e),this.name="DesignConstraintError"}}});function Ir(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function wE(t){if(!Pr.includes(t))throw new Ie(`Unknown variant property "${t}" (expected ${Pr.join(", ")})`);return t}function vE(t,e,n){if(typeof t!="string")throw new Ie(`${e}.${n} must be a token reference string like "{ui.primary}"`);let r=t.match(yE);if(!r)throw new Ie(`${e}.${n} must be a token reference like "{ui.primary}", got "${t}"`);return r[1]}function zy(t,e){let n={};for(let[r,i]of Object.entries(e)){let o=wE(r),s=vE(i,t,r);n[o]={ref:s,accepts:[...Ts[o]]}}return n}function bE(t){if(t===void 0)return{};if(!Ir(t))throw new Ie('Theme "defaults" must be an object');let e={};for(let[n,r]of Object.entries(t)){if(!Ir(r))throw new Ie(`Theme defaults for "${n}" must be an object`);e[n]=zy(`defaults.${n}`,r)}return e}function sp(t){if(!Ir(t))throw new Ie("Theme document must be a YAML/JSON object");let e=t.variants;if(!Ir(e))throw new Ie('Theme document must contain a "variants" object');let n={};for(let[r,i]of Object.entries(e)){if(!Ir(i))throw new Ie(`Theme variants for "${r}" must be an object`);let o={};for(let[s,a]of Object.entries(i)){if(!Ir(a))throw new Ie(`Theme variant "${r}.${s}" must be an object`);o[s]=zy(`${r}.${s}`,a)}n[r]=o}return{defaults:bE(t.defaults),variants:n}}var yE,ap=K(()=>{"use strict";Hn();yE=/^\{([^}]+)\}$/});function Qi(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function xE(t){return`--${t.replace(/\./g,"-")}`}function $E(t,e){if(typeof t!="string"||!As.includes(t))throw new Vt(`Token "${e}" has unsupported $type "${String(t)}" (expected ${As.join(", ")})`);return t}function Gy(t,e,n){if(Qi(t)){if("$type"in t&&"$value"in t){n.push({path:e,type:$E(t.$type,e),rawValue:t.$value});return}for(let[r,i]of Object.entries(t)){if(r.startsWith("$"))continue;let o=e?`${e}.${r}`:r;Gy(i,o,n)}}}function SE(t,e){if(typeof e=="string")return e;if(t==="typography"&&Qi(e)){if(typeof e.fontFamily=="string")return e.fontFamily;let n=[e.fontWeight,e.fontStyle,e.fontSize,e.lineHeight,e.fontFamily].filter(r=>r!=null);if(n.length>0)return n.map(String).join(" ")}if(t==="shadow"&&Array.isArray(e))return e.map(n=>Qi(n)?`${n.offsetX??0} ${n.offsetY??0} ${n.blur??0} ${n.color??"transparent"}`:String(n)).join(", ");if(t==="shadow"&&Qi(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 CE(t){return typeof t!="string"?null:t.match(_E)?.[1]??null}function Jy(t,e,n,r,i){let o=CE(e);if(!o){let l=n.get(t);if(!l)throw new Vt(`Unknown token path "${t}"`);return{value:SE(l.type,e)}}if(r.has(t))throw new Vt(`Circular token reference detected at "${t}"`);let s=n.get(o);if(!s)throw new Vt(`Token "${t}" references unknown token "{${o}}"`);if(i.has(o))return{value:i.get(o),ref:o};r.add(t);let a=Jy(o,s.rawValue,n,r,i);return r.delete(t),i.set(o,a.value),{value:a.value,ref:o}}function cp(t){if(!Qi(t))throw new Vt("Token document must be a YAML/JSON object");let e=[];Gy(t,"",e);let n=new Map(e.map(o=>[o.path,o])),r=new Map,i=[];for(let o of e){let{value:s,ref:a}=Jy(o.path,o.rawValue,n,new Set,r);r.set(o.path,s),i.push({path:o.path,type:o.type,value:s,cssVar:xE(o.path),ref:a})}return{entries:i}}var _E,lp=K(()=>{"use strict";Hn();_E=/^\{([^}]+)\}$/});function up(t){let e=sc(t),n=new Set;for(let r of e)Pr.includes(r)&&n.add(r);return n}var Ky=K(()=>{"use strict";nt();Hn()});function kE(t){return new Map(t.entries.map(e=>[e.path,e]))}function Yy(t,e,n,r,i){for(let[o,s]of Object.entries(n)){let a=Ts[o];if(!a)throw new Ie(`Unknown variant property "${o}" on ${t}`);if(!r.has(o))throw new Ie(`Property "${o}" is not allowed for ${e} in ${t}`);let l=i.get(s.ref);if(!l)throw new Ie(`${t}.${o} references unknown token "{${s.ref}}"`);if(!a.includes(l.type))throw new Ie(`${t}.${o} requires a ${a.join(" or ")} token, but "{${s.ref}}" is ${l.type}`)}}function Xy(t,e){let n=kE(t);for(let[r,i]of Object.entries(e.defaults)){let o=up(r);Yy(`defaults.${r}`,r,i,o,n)}for(let[r,i]of Object.entries(e.variants)){let o=up(r);for(let[s,a]of Object.entries(i))Yy(`variants.${r}.${s}`,r,a,o,n)}}function pp(t,e){Xy(t,e)}var dp=K(()=>{"use strict";Hn();Ky()});function fp(t){let e=[":root {"];for(let n of t.entries)e.push(` ${n.cssVar}: ${n.value};`);return e.push("}"),e.join(`
137
+ `)}var Qy=K(()=>{"use strict"});var Os,hp=K(()=>{"use strict";Os={background:"background-color",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",height:"height",margin:"margin",border:"border",borderColor:"border-color",flexDirection:"flex-direction",fontWeight:"font-weight",fontSize:"font-size",alignItems:"align-items",justifyContent:"justify-content"}});function Ns(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Ms(t,e){let n=t.entries.find(r=>r.path===e);if(!n)throw new Error(`Token reference "${e}" not found while emitting theme CSS`);return n.cssVar}var mp=K(()=>{"use strict"});function gp(t,e){let n=[];for(let[r,i]of Object.entries(e.defaults)){let o=Ns(r),s=[];for(let[a,l]of Object.entries(i)){let c=Os[a];if(!c){console.warn(`[view-contracts] CSS theme: variant property "${a}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let p=Ms(t,l.ref);s.push(` ${c}: var(${p});`)}s.length!==0&&n.push(`.vc-${o} {
138
138
  ${s.join(`
139
139
  `)}
140
140
  }`)}return n.join(`
141
141
 
142
- `)}var zy=K(()=>{"use strict";op();sp()});function cp(t,e){let n=[];for(let[r,i]of Object.entries(e.variants)){let o=Rs(r);for(let[s,a]of Object.entries(i)){let c=[];for(let[l,d]of Object.entries(a)){let p=Is[l];if(!p){console.warn(`[view-contracts] CSS theme: variant property "${l}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let f=As(t,d.ref);c.push(` ${p}: var(${f});`)}c.length!==0&&n.push(`.vc-${o}--${s} {
143
- ${c.join(`
142
+ `)}var Zy=K(()=>{"use strict";hp();mp()});function yp(t,e){let n=[];for(let[r,i]of Object.entries(e.variants)){let o=Ns(r);for(let[s,a]of Object.entries(i)){let l=[];for(let[c,p]of Object.entries(a)){let d=Os[c];if(!d){console.warn(`[view-contracts] CSS theme: variant property "${c}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let f=Ms(t,p.ref);l.push(` ${d}: var(${f});`)}l.length!==0&&n.push(`.vc-${o}--${s} {
143
+ ${l.join(`
144
144
  `)}
145
145
  }`)}}return n.join(`
146
146
 
147
- `)}var Gy=K(()=>{"use strict";op();sp()});function Jy(t){return typeof t=="object"&&t!==null&&"kind"in t&&t.kind==="binding"}function vE(t){if(t.variant!==void 0)return t.variant;if(t.tone!==void 0)return t.tone}function Ky(t,e,n,r,i,o){let s=n.variants[t];if(!s){e!==void 0&&!Jy(e)&&typeof e=="string"&&i.push(`${r}: <${t}> references variant "${e}" but no variants are defined for ${t} in theme.yaml`);return}if(e===void 0||Jy(e)||typeof e!="string")return;(o?.mapMutedToDefault&&e==="muted"?"default":e)in s||i.push(`${r}: <${t}> references unknown variant "${e}" (not defined in theme.yaml)`)}function Ts(t,e,n,r){if(t.kind==="component"){let i=vE(t.props);t.props.variant!==void 0?Ky(t.name,t.props.variant,e,n,r):i!==void 0&&t.name in e.variants&&Ky(t.name,i,e,n,r,{mapMutedToDefault:!0});for(let o of t.children)Ts(o,e,n,r);return}if(t.kind==="map"){Ts(t.body,e,n,r);return}if(t.kind==="fragment"){for(let i of t.children)Ts(i,e,n,r);return}t.kind}function Yi(t,e){let n=[];for(let r of t)Ts(r.root,e,r.source,n);if(n.length>0)throw new Error(`View variant validation failed:
147
+ `)}var ew=K(()=>{"use strict";hp();mp()});function tw(t){return typeof t=="object"&&t!==null&&"kind"in t&&t.kind==="binding"}function EE(t){if(t.variant!==void 0)return t.variant;if(t.tone!==void 0)return t.tone}function nw(t,e,n,r,i,o){let s=n.variants[t];if(!s){e!==void 0&&!tw(e)&&typeof e=="string"&&i.push(`${r}: <${t}> references variant "${e}" but no variants are defined for ${t} in theme.yaml`);return}if(e===void 0||tw(e)||typeof e!="string")return;(o?.mapMutedToDefault&&e==="muted"?"default":e)in s||i.push(`${r}: <${t}> references unknown variant "${e}" (not defined in theme.yaml)`)}function Vs(t,e,n,r){if(t.kind==="component"){let i=EE(t.props);t.props.variant!==void 0?nw(t.name,t.props.variant,e,n,r):i!==void 0&&t.name in e.variants&&nw(t.name,i,e,n,r,{mapMutedToDefault:!0});for(let o of t.children)Vs(o,e,n,r);return}if(t.kind==="map"){Vs(t.body,e,n,r);return}if(t.kind==="fragment"){for(let i of t.children)Vs(i,e,n,r);return}t.kind}function Zi(t,e){let n=[];for(let r of t)Vs(r.root,e,r.source,n);if(n.length>0)throw new Error(`View variant validation failed:
148
148
  ${n.map(r=>` - ${r}`).join(`
149
- `)}`)}var Yy=K(()=>{"use strict"});function lp(t,e){return[...new Set([...t.matchAll(e)].map(n=>n[0]))]}function Xy(t,e,n){let r=e.slice(0,5).map(o=>` - ${t}: ${o}`).join(`
149
+ `)}`)}var rw=K(()=>{"use strict"});function wp(t,e){return[...new Set([...t.matchAll(e)].map(n=>n[0]))]}function iw(t,e,n){let r=e.slice(0,5).map(o=>` - ${t}: ${o}`).join(`
150
150
  `),i=e.length>5?`
151
151
  \u2026 and ${e.length-5} more`:"";return`${n}
152
- ${r}${i}`}function up(t,e){let n=lp(t,bE);if(n.length!==0)throw new Sr(Xy(e,n,".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 pp(t,e){let n=lp(t,_E),r=lp(t,xE),i=[...n,...r];if(i.length!==0)throw new Sr(Xy(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/."))}var bE,_E,xE,dp=K(()=>{"use strict";Fn();bE=/\.vc-[a-z][\w-]*/g,_E=/(?:className\s*=\s*(?:"vc-[^"]*"|'vc-[^']*'|\{`[^`]*\bvc-[^`]*`\}|\{"vc-[^"]*"\}|\{'vc-[^']*'\})|["'`]vc-[a-z][\w-]*["'`])/g,xE=/\bextensionClassName\s*\(/g});import{readFile as Qy,stat as $E}from"node:fs/promises";import{resolve as SE}from"node:path";async function Zy(t){try{return await $E(t),!0}catch{return!1}}async function qn(t,e){let n=t.design?.extensionsCss;n&&await Zy(n)&&up(await Qy(n,"utf-8"),n);let r=ye(e);for(let i of["extensions.tsx","extensions.ts"]){let o=SE(r,"src/components",i);await Zy(o)&&pp(await Qy(o,"utf-8"),o)}}var ew=K(()=>{"use strict";bt();dp()});async function CE(t){let e=await ks(t);return Zu(e)}async function kE(t){let e=await ks(t);return Xu(e)}async function Er(t,e){let n=await CE(t),r=await kE(e);return np(n,r),{tokenIR:n,themeIR:r}}var Os=K(()=>{"use strict";Yu();Qu();ep();rp();Uy();zy();Gy();Yu();Qu();ep();rp();Yy();dp();ew();Ns();Fn()});import{readFile as tw,stat as EE}from"node:fs/promises";async function PE(t){try{return await EE(t),!0}catch{return!1}}async function Xi(t,e){let n=ye(e),{tokensPath:r,themePath:i}=ln(t),{tokenIR:o,themeIR:s}=await Er(r,i);await qn(t,e);let a=await tw(fp(),"utf-8"),c=ap(o,s),l=cp(o,s),d=`${ip(o)}
152
+ ${r}${i}`}function vp(t,e){let n=wp(t,PE);if(n.length!==0)throw new Er(iw(e,n,".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 bp(t,e){let n=wp(t,IE),r=wp(t,RE),i=[...n,...r];if(i.length!==0)throw new Er(iw(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/."))}var PE,IE,RE,_p=K(()=>{"use strict";Hn();PE=/\.vc-[a-z][\w-]*/g,IE=/(?:className\s*=\s*(?:"vc-[^"]*"|'vc-[^']*'|\{`[^`]*\bvc-[^`]*`\}|\{"vc-[^"]*"\}|\{'vc-[^']*'\})|["'`]vc-[a-z][\w-]*["'`])/g,RE=/\bextensionClassName\s*\(/g});import{readFile as ow,stat as AE}from"node:fs/promises";import{resolve as TE}from"node:path";async function sw(t){try{return await AE(t),!0}catch{return!1}}async function Wn(t,e){let n=t.design?.extensionsCss;n&&await sw(n)&&vp(await ow(n,"utf-8"),n);let r=ye(e);for(let i of["extensions.tsx","extensions.ts"]){let o=TE(r,"src/components",i);await sw(o)&&bp(await ow(o,"utf-8"),o)}}var aw=K(()=>{"use strict";xt();_p()});async function OE(t){let e=await Rs(t);return cp(e)}async function NE(t){let e=await Rs(t);return sp(e)}async function Rr(t,e){let n=await OE(t),r=await NE(e);return pp(n,r),{tokenIR:n,themeIR:r}}var Ls=K(()=>{"use strict";op();ap();lp();dp();Qy();Zy();ew();op();ap();lp();dp();rw();_p();aw();js();Hn()});import{readFile as cw,stat as ME}from"node:fs/promises";async function VE(t){try{return await ME(t),!0}catch{return!1}}async function eo(t,e){let n=ye(e),{tokensPath:r,themePath:i}=pn(t),{tokenIR:o,themeIR:s}=await Rr(r,i);await Wn(t,e);let a=await cw(xp(),"utf-8"),l=gp(o,s),c=yp(o,s),p=`${fp(o)}
153
153
 
154
- ${a.trim()}`;c&&(d+=`
154
+ ${a.trim()}`;l&&(p+=`
155
155
 
156
- ${c}`),d+=`
156
+ ${l}`),p+=`
157
157
 
158
- ${l}`;let p=t.design?.extensionsCss;return p&&await PE(p)&&(d+=`
158
+ ${c}`;let d=t.design?.extensionsCss;return d&&await VE(d)&&(p+=`
159
159
 
160
- ${await tw(p,"utf-8")}`),d}var Ns=K(()=>{"use strict";bt();Pr();Os()});var We=S(tt=>{"use strict";tt.__esModule=!0;tt.extend=nw;tt.indexOf=OE;tt.escapeExpression=NE;tt.isEmpty=ME;tt.createFrame=VE;tt.blockParams=LE;tt.appendContextPath=jE;var IE={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},RE=/[&<>"'`=]/g,AE=/[&<>"'`=]/;function TE(t){return IE[t]}function nw(t){for(var e=1;e<arguments.length;e++)for(var n in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],n)&&(t[n]=arguments[e][n]);return t}var mp=Object.prototype.toString;tt.toString=mp;var hp=function(e){return typeof e=="function"};hp(/x/)&&(tt.isFunction=hp=function(t){return typeof t=="function"&&mp.call(t)==="[object Function]"});tt.isFunction=hp;var rw=Array.isArray||function(t){return t&&typeof t=="object"?mp.call(t)==="[object Array]":!1};tt.isArray=rw;function OE(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function NE(t){if(typeof t!="string"){if(t&&t.toHTML)return t.toHTML();if(t==null)return"";if(!t)return t+"";t=""+t}return AE.test(t)?t.replace(RE,TE):t}function ME(t){return!t&&t!==0?!0:!!(rw(t)&&t.length===0)}function VE(t){var e=nw({},t);return e._parent=t,e}function LE(t,e){return t.path=e,t}function jE(t,e){return(t?t+".":"")+e}});var nt=S((Ms,iw)=>{"use strict";Ms.__esModule=!0;var gp=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function yp(t,e){var n=e&&e.loc,r=void 0,i=void 0,o=void 0,s=void 0;n&&(r=n.start.line,i=n.end.line,o=n.start.column,s=n.end.column,t+=" - "+r+":"+o);for(var a=Error.prototype.constructor.call(this,t),c=0;c<gp.length;c++)this[gp[c]]=a[gp[c]];Error.captureStackTrace&&Error.captureStackTrace(this,yp);try{n&&(this.lineNumber=r,this.endLineNumber=i,Object.defineProperty?(Object.defineProperty(this,"column",{value:o,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:s,enumerable:!0})):(this.column=o,this.endColumn=s))}catch{}}yp.prototype=new Error;Ms.default=yp;iw.exports=Ms.default});var sw=S((Vs,ow)=>{"use strict";Vs.__esModule=!0;var wp=We();Vs.default=function(t){t.registerHelper("blockHelperMissing",function(e,n){var r=n.inverse,i=n.fn;if(e===!0)return i(this);if(e===!1||e==null)return r(this);if(wp.isArray(e))return e.length>0?(n.ids&&(n.ids=[n.name]),t.helpers.each(e,n)):r(this);if(n.data&&n.ids){var o=wp.createFrame(n.data);o.contextPath=wp.appendContextPath(n.data.contextPath,n.name),n={data:o}}return i(e,n)})};ow.exports=Vs.default});var cw=S((Ls,aw)=>{"use strict";Ls.__esModule=!0;function DE(t){return t&&t.__esModule?t:{default:t}}var Qi=We(),FE=nt(),qE=DE(FE);Ls.default=function(t){t.registerHelper("each",function(e,n){if(!n)throw new qE.default("Must pass iterator to #each");var r=n.fn,i=n.inverse,o=0,s="",a=void 0,c=void 0;n.data&&n.ids&&(c=Qi.appendContextPath(n.data.contextPath,n.ids[0])+"."),Qi.isFunction(e)&&(e=e.call(this)),n.data&&(a=Qi.createFrame(n.data));function l(y,g,w){a&&(a.key=y,a.index=g,a.first=g===0,a.last=!!w,c&&(a.contextPath=c+y)),s=s+r(e[y],{data:a,blockParams:Qi.blockParams([e[y],y],[c+y,null])})}if(e&&typeof e=="object")if(Qi.isArray(e))for(var d=e.length;o<d;o++)o in e&&l(o,o,o===e.length-1);else if(typeof Symbol=="function"&&e[Symbol.iterator]){for(var p=[],f=e[Symbol.iterator](),m=f.next();!m.done;m=f.next())p.push(m.value);e=p;for(var d=e.length;o<d;o++)l(o,o,o===e.length-1)}else(function(){var y=void 0;Object.keys(e).forEach(function(g){y!==void 0&&l(y,o-1),y=g,o++}),y!==void 0&&l(y,o-1,!0)})();return o===0&&(s=i(this)),s})};aw.exports=Ls.default});var uw=S((js,lw)=>{"use strict";js.__esModule=!0;function BE(t){return t&&t.__esModule?t:{default:t}}var HE=nt(),WE=BE(HE);js.default=function(t){t.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new WE.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};lw.exports=js.default});var hw=S((Ds,fw)=>{"use strict";Ds.__esModule=!0;function UE(t){return t&&t.__esModule?t:{default:t}}var pw=We(),zE=nt(),dw=UE(zE);Ds.default=function(t){t.registerHelper("if",function(e,n){if(arguments.length!=2)throw new dw.default("#if requires exactly one argument");return pw.isFunction(e)&&(e=e.call(this)),!n.hash.includeZero&&!e||pw.isEmpty(e)?n.inverse(this):n.fn(this)}),t.registerHelper("unless",function(e,n){if(arguments.length!=2)throw new dw.default("#unless requires exactly one argument");return t.helpers.if.call(this,e,{fn:n.inverse,inverse:n.fn,hash:n.hash})})};fw.exports=Ds.default});var gw=S((Fs,mw)=>{"use strict";Fs.__esModule=!0;Fs.default=function(t){t.registerHelper("log",function(){for(var e=[void 0],n=arguments[arguments.length-1],r=0;r<arguments.length-1;r++)e.push(arguments[r]);var i=1;n.hash.level!=null?i=n.hash.level:n.data&&n.data.level!=null&&(i=n.data.level),e[0]=i,t.log.apply(t,e)})};mw.exports=Fs.default});var ww=S((qs,yw)=>{"use strict";qs.__esModule=!0;qs.default=function(t){t.registerHelper("lookup",function(e,n,r){return e&&r.lookupProperty(e,n)})};yw.exports=qs.default});var bw=S((Bs,vw)=>{"use strict";Bs.__esModule=!0;function GE(t){return t&&t.__esModule?t:{default:t}}var Zi=We(),JE=nt(),KE=GE(JE);Bs.default=function(t){t.registerHelper("with",function(e,n){if(arguments.length!=2)throw new KE.default("#with requires exactly one argument");Zi.isFunction(e)&&(e=e.call(this));var r=n.fn;if(Zi.isEmpty(e))return n.inverse(this);var i=n.data;return n.data&&n.ids&&(i=Zi.createFrame(n.data),i.contextPath=Zi.appendContextPath(n.data.contextPath,n.ids[0])),r(e,{data:i,blockParams:Zi.blockParams([e],[i&&i.contextPath])})})};vw.exports=Bs.default});var vp=S(Hs=>{"use strict";Hs.__esModule=!0;Hs.registerDefaultHelpers=uP;Hs.moveHelperToHooks=pP;function Bn(t){return t&&t.__esModule?t:{default:t}}var YE=sw(),XE=Bn(YE),QE=cw(),ZE=Bn(QE),eP=uw(),tP=Bn(eP),nP=hw(),rP=Bn(nP),iP=gw(),oP=Bn(iP),sP=ww(),aP=Bn(sP),cP=bw(),lP=Bn(cP);function uP(t){XE.default(t),ZE.default(t),tP.default(t),rP.default(t),oP.default(t),aP.default(t),lP.default(t)}function pP(t,e,n){t.helpers[e]&&(t.hooks[e]=t.helpers[e],n||(t.helpers[e]=void 0))}});var xw=S((Ws,_w)=>{"use strict";Ws.__esModule=!0;var dP=We();Ws.default=function(t){t.registerDecorator("inline",function(e,n,r,i){var o=e;return n.partials||(n.partials={},o=function(s,a){var c=r.partials;r.partials=dP.extend({},c,n.partials);var l=e(s,a);return r.partials=c,l}),n.partials[i.args[0]]=i.fn,o})};_w.exports=Ws.default});var $w=S(bp=>{"use strict";bp.__esModule=!0;bp.registerDefaultDecorators=gP;function fP(t){return t&&t.__esModule?t:{default:t}}var hP=xw(),mP=fP(hP);function gP(t){mP.default(t)}});var _p=S((Us,Sw)=>{"use strict";Us.__esModule=!0;var yP=We(),Ir={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var n=yP.indexOf(Ir.methodMap,e.toLowerCase());n>=0?e=n:e=parseInt(e,10)}return e},log:function(e){if(e=Ir.lookupLevel(e),typeof console<"u"&&Ir.lookupLevel(Ir.level)<=e){var n=Ir.methodMap[e];console[n]||(n="log");for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];console[n].apply(console,i)}}};Us.default=Ir;Sw.exports=Us.default});var xp=S(eo=>{"use strict";eo.__esModule=!0;eo.createProtoAccessControl=_P;eo.resultIsAllowed=xP;eo.resetLoggedProperties=SP;function wP(t){return t&&t.__esModule?t:{default:t}}var Cw=We(),vP=_p(),bP=wP(vP),zs=Object.create(null);function _P(t){var e=Object.create(null);e.__proto__=!1,Cw.extend(e,t.allowedProtoProperties);var n=Object.create(null);return n.constructor=!1,n.__defineGetter__=!1,n.__defineSetter__=!1,n.__lookupGetter__=!1,n.__lookupSetter__=!1,Cw.extend(n,t.allowedProtoMethods),{properties:{whitelist:e,defaultValue:t.allowProtoPropertiesByDefault},methods:{whitelist:n,defaultValue:t.allowProtoMethodsByDefault}}}function xP(t,e,n){return kw(typeof t=="function"?e.methods:e.properties,n)}function kw(t,e){return t.whitelist[e]!==void 0?t.whitelist[e]===!0:t.defaultValue!==void 0?t.defaultValue:($P(e),!1)}function $P(t){zs[t]!==!0&&(zs[t]=!0,bP.default.log("error",'Handlebars: Access has been denied to resolve the property "'+t+`" because it is not an "own property" of its parent.
160
+ ${await cw(d,"utf-8")}`),p}var js=K(()=>{"use strict";xt();Ar();Ls()});var We=S(rt=>{"use strict";rt.__esModule=!0;rt.extend=lw;rt.indexOf=qE;rt.escapeExpression=BE;rt.isEmpty=HE;rt.createFrame=WE;rt.blockParams=UE;rt.appendContextPath=zE;var LE={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},jE=/[&<>"'`=]/g,DE=/[&<>"'`=]/;function FE(t){return LE[t]}function lw(t){for(var e=1;e<arguments.length;e++)for(var n in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],n)&&(t[n]=arguments[e][n]);return t}var Sp=Object.prototype.toString;rt.toString=Sp;var $p=function(e){return typeof e=="function"};$p(/x/)&&(rt.isFunction=$p=function(t){return typeof t=="function"&&Sp.call(t)==="[object Function]"});rt.isFunction=$p;var uw=Array.isArray||function(t){return t&&typeof t=="object"?Sp.call(t)==="[object Array]":!1};rt.isArray=uw;function qE(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function BE(t){if(typeof t!="string"){if(t&&t.toHTML)return t.toHTML();if(t==null)return"";if(!t)return t+"";t=""+t}return DE.test(t)?t.replace(jE,FE):t}function HE(t){return!t&&t!==0?!0:!!(uw(t)&&t.length===0)}function WE(t){var e=lw({},t);return e._parent=t,e}function UE(t,e){return t.path=e,t}function zE(t,e){return(t?t+".":"")+e}});var it=S((Ds,pw)=>{"use strict";Ds.__esModule=!0;var Cp=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function kp(t,e){var n=e&&e.loc,r=void 0,i=void 0,o=void 0,s=void 0;n&&(r=n.start.line,i=n.end.line,o=n.start.column,s=n.end.column,t+=" - "+r+":"+o);for(var a=Error.prototype.constructor.call(this,t),l=0;l<Cp.length;l++)this[Cp[l]]=a[Cp[l]];Error.captureStackTrace&&Error.captureStackTrace(this,kp);try{n&&(this.lineNumber=r,this.endLineNumber=i,Object.defineProperty?(Object.defineProperty(this,"column",{value:o,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:s,enumerable:!0})):(this.column=o,this.endColumn=s))}catch{}}kp.prototype=new Error;Ds.default=kp;pw.exports=Ds.default});var fw=S((Fs,dw)=>{"use strict";Fs.__esModule=!0;var Ep=We();Fs.default=function(t){t.registerHelper("blockHelperMissing",function(e,n){var r=n.inverse,i=n.fn;if(e===!0)return i(this);if(e===!1||e==null)return r(this);if(Ep.isArray(e))return e.length>0?(n.ids&&(n.ids=[n.name]),t.helpers.each(e,n)):r(this);if(n.data&&n.ids){var o=Ep.createFrame(n.data);o.contextPath=Ep.appendContextPath(n.data.contextPath,n.name),n={data:o}}return i(e,n)})};dw.exports=Fs.default});var mw=S((qs,hw)=>{"use strict";qs.__esModule=!0;function GE(t){return t&&t.__esModule?t:{default:t}}var to=We(),JE=it(),KE=GE(JE);qs.default=function(t){t.registerHelper("each",function(e,n){if(!n)throw new KE.default("Must pass iterator to #each");var r=n.fn,i=n.inverse,o=0,s="",a=void 0,l=void 0;n.data&&n.ids&&(l=to.appendContextPath(n.data.contextPath,n.ids[0])+"."),to.isFunction(e)&&(e=e.call(this)),n.data&&(a=to.createFrame(n.data));function c(y,g,w){a&&(a.key=y,a.index=g,a.first=g===0,a.last=!!w,l&&(a.contextPath=l+y)),s=s+r(e[y],{data:a,blockParams:to.blockParams([e[y],y],[l+y,null])})}if(e&&typeof e=="object")if(to.isArray(e))for(var p=e.length;o<p;o++)o in e&&c(o,o,o===e.length-1);else if(typeof Symbol=="function"&&e[Symbol.iterator]){for(var d=[],f=e[Symbol.iterator](),m=f.next();!m.done;m=f.next())d.push(m.value);e=d;for(var p=e.length;o<p;o++)c(o,o,o===e.length-1)}else(function(){var y=void 0;Object.keys(e).forEach(function(g){y!==void 0&&c(y,o-1),y=g,o++}),y!==void 0&&c(y,o-1,!0)})();return o===0&&(s=i(this)),s})};hw.exports=qs.default});var yw=S((Bs,gw)=>{"use strict";Bs.__esModule=!0;function YE(t){return t&&t.__esModule?t:{default:t}}var XE=it(),QE=YE(XE);Bs.default=function(t){t.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new QE.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};gw.exports=Bs.default});var _w=S((Hs,bw)=>{"use strict";Hs.__esModule=!0;function ZE(t){return t&&t.__esModule?t:{default:t}}var ww=We(),eP=it(),vw=ZE(eP);Hs.default=function(t){t.registerHelper("if",function(e,n){if(arguments.length!=2)throw new vw.default("#if requires exactly one argument");return ww.isFunction(e)&&(e=e.call(this)),!n.hash.includeZero&&!e||ww.isEmpty(e)?n.inverse(this):n.fn(this)}),t.registerHelper("unless",function(e,n){if(arguments.length!=2)throw new vw.default("#unless requires exactly one argument");return t.helpers.if.call(this,e,{fn:n.inverse,inverse:n.fn,hash:n.hash})})};bw.exports=Hs.default});var $w=S((Ws,xw)=>{"use strict";Ws.__esModule=!0;Ws.default=function(t){t.registerHelper("log",function(){for(var e=[void 0],n=arguments[arguments.length-1],r=0;r<arguments.length-1;r++)e.push(arguments[r]);var i=1;n.hash.level!=null?i=n.hash.level:n.data&&n.data.level!=null&&(i=n.data.level),e[0]=i,t.log.apply(t,e)})};xw.exports=Ws.default});var Cw=S((Us,Sw)=>{"use strict";Us.__esModule=!0;Us.default=function(t){t.registerHelper("lookup",function(e,n,r){return e&&r.lookupProperty(e,n)})};Sw.exports=Us.default});var Ew=S((zs,kw)=>{"use strict";zs.__esModule=!0;function tP(t){return t&&t.__esModule?t:{default:t}}var no=We(),nP=it(),rP=tP(nP);zs.default=function(t){t.registerHelper("with",function(e,n){if(arguments.length!=2)throw new rP.default("#with requires exactly one argument");no.isFunction(e)&&(e=e.call(this));var r=n.fn;if(no.isEmpty(e))return n.inverse(this);var i=n.data;return n.data&&n.ids&&(i=no.createFrame(n.data),i.contextPath=no.appendContextPath(n.data.contextPath,n.ids[0])),r(e,{data:i,blockParams:no.blockParams([e],[i&&i.contextPath])})})};kw.exports=zs.default});var Pp=S(Gs=>{"use strict";Gs.__esModule=!0;Gs.registerDefaultHelpers=wP;Gs.moveHelperToHooks=vP;function Un(t){return t&&t.__esModule?t:{default:t}}var iP=fw(),oP=Un(iP),sP=mw(),aP=Un(sP),cP=yw(),lP=Un(cP),uP=_w(),pP=Un(uP),dP=$w(),fP=Un(dP),hP=Cw(),mP=Un(hP),gP=Ew(),yP=Un(gP);function wP(t){oP.default(t),aP.default(t),lP.default(t),pP.default(t),fP.default(t),mP.default(t),yP.default(t)}function vP(t,e,n){t.helpers[e]&&(t.hooks[e]=t.helpers[e],n||(t.helpers[e]=void 0))}});var Iw=S((Js,Pw)=>{"use strict";Js.__esModule=!0;var bP=We();Js.default=function(t){t.registerDecorator("inline",function(e,n,r,i){var o=e;return n.partials||(n.partials={},o=function(s,a){var l=r.partials;r.partials=bP.extend({},l,n.partials);var c=e(s,a);return r.partials=l,c}),n.partials[i.args[0]]=i.fn,o})};Pw.exports=Js.default});var Rw=S(Ip=>{"use strict";Ip.__esModule=!0;Ip.registerDefaultDecorators=SP;function _P(t){return t&&t.__esModule?t:{default:t}}var xP=Iw(),$P=_P(xP);function SP(t){$P.default(t)}});var Rp=S((Ks,Aw)=>{"use strict";Ks.__esModule=!0;var CP=We(),Tr={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var n=CP.indexOf(Tr.methodMap,e.toLowerCase());n>=0?e=n:e=parseInt(e,10)}return e},log:function(e){if(e=Tr.lookupLevel(e),typeof console<"u"&&Tr.lookupLevel(Tr.level)<=e){var n=Tr.methodMap[e];console[n]||(n="log");for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];console[n].apply(console,i)}}};Ks.default=Tr;Aw.exports=Ks.default});var Ap=S(ro=>{"use strict";ro.__esModule=!0;ro.createProtoAccessControl=IP;ro.resultIsAllowed=RP;ro.resetLoggedProperties=TP;function kP(t){return t&&t.__esModule?t:{default:t}}var Tw=We(),EP=Rp(),PP=kP(EP),Ys=Object.create(null);function IP(t){var e=Object.create(null);e.__proto__=!1,Tw.extend(e,t.allowedProtoProperties);var n=Object.create(null);return n.constructor=!1,n.__defineGetter__=!1,n.__defineSetter__=!1,n.__lookupGetter__=!1,n.__lookupSetter__=!1,Tw.extend(n,t.allowedProtoMethods),{properties:{whitelist:e,defaultValue:t.allowProtoPropertiesByDefault},methods:{whitelist:n,defaultValue:t.allowProtoMethodsByDefault}}}function RP(t,e,n){return Ow(typeof t=="function"?e.methods:e.properties,n)}function Ow(t,e){return t.whitelist[e]!==void 0?t.whitelist[e]===!0:t.defaultValue!==void 0?t.defaultValue:(AP(e),!1)}function AP(t){Ys[t]!==!0&&(Ys[t]=!0,PP.default.log("error",'Handlebars: Access has been denied to resolve the property "'+t+`" because it is not an "own property" of its parent.
161
161
  You can add a runtime option to disable the check or this warning:
162
- See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function SP(){Object.keys(zs).forEach(function(t){delete zs[t]})}});var Js=S(Nt=>{"use strict";Nt.__esModule=!0;Nt.HandlebarsEnvironment=Cp;function Ew(t){return t&&t.__esModule?t:{default:t}}var Hn=We(),CP=nt(),$p=Ew(CP),kP=vp(),EP=$w(),PP=_p(),Gs=Ew(PP),IP=xp(),RP="4.7.9";Nt.VERSION=RP;var AP=8;Nt.COMPILER_REVISION=AP;var TP=7;Nt.LAST_COMPATIBLE_COMPILER_REVISION=TP;var OP={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"};Nt.REVISION_CHANGES=OP;var Sp="[object Object]";function Cp(t,e,n){this.helpers=t||{},this.partials=e||{},this.decorators=n||{},kP.registerDefaultHelpers(this),EP.registerDefaultDecorators(this)}Cp.prototype={constructor:Cp,logger:Gs.default,log:Gs.default.log,registerHelper:function(e,n){if(Hn.toString.call(e)===Sp){if(n)throw new $p.default("Arg not supported with multiple helpers");Hn.extend(this.helpers,e)}else this.helpers[e]=n},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,n){if(Hn.toString.call(e)===Sp)Hn.extend(this.partials,e);else{if(typeof n>"u")throw new $p.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=n}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,n){if(Hn.toString.call(e)===Sp){if(n)throw new $p.default("Arg not supported with multiple decorators");Hn.extend(this.decorators,e)}else this.decorators[e]=n},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){IP.resetLoggedProperties()}};var NP=Gs.default.log;Nt.log=NP;Nt.createFrame=Hn.createFrame;Nt.logger=Gs.default});var Iw=S((Ks,Pw)=>{"use strict";Ks.__esModule=!0;function kp(t){this.string=t}kp.prototype.toString=kp.prototype.toHTML=function(){return""+this.string};Ks.default=kp;Pw.exports=Ks.default});var Rw=S(Ep=>{"use strict";Ep.__esModule=!0;Ep.wrapHelper=MP;function MP(t,e){if(typeof t!="function")return t;var n=function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=e(i),t.apply(this,arguments)};return n}});var Vw=S(wn=>{"use strict";wn.__esModule=!0;wn.checkRevision=qP;wn.template=BP;wn.wrapProgram=Ys;wn.resolvePartial=HP;wn.invokePartial=WP;wn.noop=Nw;function VP(t){return t&&t.__esModule?t:{default:t}}function LP(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var jP=We(),Rr=LP(jP),DP=nt(),Gt=VP(DP),Jt=Js(),Aw=vp(),FP=Rw(),Tw=xp();function qP(t){var e=t&&t[0]||1,n=Jt.COMPILER_REVISION;if(!(e>=Jt.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Jt.COMPILER_REVISION))if(e<Jt.LAST_COMPATIBLE_COMPILER_REVISION){var r=Jt.REVISION_CHANGES[n],i=Jt.REVISION_CHANGES[e];throw new Gt.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 Gt.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 BP(t,e){if(!e)throw new Gt.default("No environment passed to template");if(!t||!t.main)throw new Gt.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var n=t.compiler&&t.compiler[0]===7;function r(s,a,c){c.hash&&(a=Rr.extend({},a,c.hash),c.ids&&(c.ids[0]=!0)),s=e.VM.resolvePartial.call(this,s,a,c),c.hooks=this.hooks,c.protoAccessControl=this.protoAccessControl;var l=e.VM.invokePartial.call(this,s,a,c);if(l==null&&e.compile&&(c.partials[c.name]=e.compile(s,t.compilerOptions,e),l=c.partials[c.name](a,c)),l!=null){if(c.indent){for(var d=l.split(`
163
- `),p=0,f=d.length;p<f&&!(!d[p]&&p+1===f);p++)d[p]=c.indent+d[p];l=d.join(`
164
- `)}return l}else throw new Gt.default("The partial "+c.name+" could not be compiled when running in runtime-only mode")}var i={strict:function(a,c,l){if(!a||!(c in a))throw new Gt.default('"'+c+'" not defined in '+a,{loc:l});return i.lookupProperty(a,c)},lookupProperty:function(a,c){var l=a[c];if(l==null||Object.prototype.hasOwnProperty.call(a,c)||Tw.resultIsAllowed(l,i.protoAccessControl,c))return l},lookup:function(a,c){for(var l=a.length,d=0;d<l;d++){var p=a[d]&&i.lookupProperty(a[d],c);if(p!=null)return p}},lambda:function(a,c){return typeof a=="function"?a.call(c):a},escapeExpression:Rr.escapeExpression,invokePartial:r,fn:function(a){var c=t[a];return c.decorator=t[a+"_d"],c},programs:[],program:function(a,c,l,d,p){var f=this.programs[a],m=this.fn(a);return c||p||d||l?f=Ys(this,a,m,c,l,d,p):f||(f=this.programs[a]=Ys(this,a,m)),f},data:function(a,c){for(;a&&c--;)a=a._parent;return a},mergeIfNeeded:function(a,c){var l=a||c;return a&&c&&a!==c&&(l=Rr.extend({},c,a)),l},nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:t.compiler};function o(s){var a=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],c=a.data;o._setup(a),!a.partial&&t.useData&&(c=UP(s,c));var l=void 0,d=t.useBlockParams?[]:void 0;t.useDepths&&(a.depths?l=s!=a.depths[0]?[s].concat(a.depths):a.depths:l=[s]);function p(f){return""+t.main(i,f,i.helpers,i.partials,c,d,l)}return p=Mw(t.main,p,i,a.depths||[],c,d),p(s,a)}return o.isTop=!0,o._setup=function(s){if(s.partial)i.protoAccessControl=s.protoAccessControl,i.helpers=s.helpers,i.partials=s.partials,i.decorators=s.decorators,i.hooks=s.hooks;else{var a={};Ow(a,e.helpers,i),Ow(a,s.helpers,i),i.helpers=a,t.usePartial&&(i.partials=i.mergeIfNeeded(s.partials,e.partials)),(t.usePartial||t.useDecorators)&&(i.decorators=Rr.extend({},e.decorators,s.decorators)),i.hooks={},i.protoAccessControl=Tw.createProtoAccessControl(s);var c=s.allowCallsToHelperMissing||n;Aw.moveHelperToHooks(i,"helperMissing",c),Aw.moveHelperToHooks(i,"blockHelperMissing",c)}},o._child=function(s,a,c,l){if(t.useBlockParams&&!c)throw new Gt.default("must pass block params");if(t.useDepths&&!l)throw new Gt.default("must pass parent depths");return Ys(i,s,t[s],a,0,c,l)},o}function Ys(t,e,n,r,i,o,s){function a(c){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],d=s;return s&&c!=s[0]&&!(c===t.nullContext&&s[0]===null)&&(d=[c].concat(s)),n(t,c,t.helpers,t.partials,l.data||r,o&&[l.blockParams].concat(o),d)}return a=Mw(n,a,t,s,r,o),a.program=e,a.depth=s?s.length:0,a.blockParams=i||0,a}function HP(t,e,n){return t?!t.call&&!n.name&&(n.name=t,t=Xs(n.partials,t)):n.name==="@partial-block"?t=Xs(n.data,"partial-block"):t=Xs(n.partials,n.name),t}function WP(t,e,n){var r=Xs(n.data,"partial-block");n.partial=!0,n.ids&&(n.data.contextPath=n.ids[0]||n.data.contextPath);var i=void 0;if(n.fn&&n.fn!==Nw&&(function(){n.data=Jt.createFrame(n.data);var o=n.fn;i=n.data["partial-block"]=function(a){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return c.data=Jt.createFrame(c.data),c.data["partial-block"]=r,o(a,c)},o.partials&&(n.partials=Rr.extend({},n.partials,o.partials))})(),t===void 0&&i&&(t=i),t===void 0)throw new Gt.default("The partial "+n.name+" could not be found");if(t instanceof Function)return t(e,n)}function Nw(){return""}function Xs(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function UP(t,e){return(!e||!("root"in e))&&(e=e?Jt.createFrame(e):{},e.root=t),e}function Mw(t,e,n,r,i,o){if(t.decorator){var s={};e=t.decorator(e,s,n,r&&r[0],i,o,r),Rr.extend(e,s)}return e}function Ow(t,e,n){e&&Object.keys(e).forEach(function(r){var i=e[r];t[r]=zP(i,n)})}function zP(t,e){var n=e.lookupProperty;return FP.wrapHelper(t,function(r){return r.lookupProperty=n,r})}});var Pp=S((Qs,Lw)=>{"use strict";Qs.__esModule=!0;Qs.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}};Lw.exports=Qs.default});var Bw=S((Zs,qw)=>{"use strict";Zs.__esModule=!0;function Rp(t){return t&&t.__esModule?t:{default:t}}function Ap(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var GP=Js(),jw=Ap(GP),JP=Iw(),KP=Rp(JP),YP=nt(),XP=Rp(YP),QP=We(),Ip=Ap(QP),ZP=Vw(),Dw=Ap(ZP),eI=Pp(),tI=Rp(eI);function Fw(){var t=new jw.HandlebarsEnvironment;return Ip.extend(t,jw),t.SafeString=KP.default,t.Exception=XP.default,t.Utils=Ip,t.escapeExpression=Ip.escapeExpression,t.VM=Dw,t.template=function(e){return Dw.template(e,t)},t}var to=Fw();to.create=Fw;tI.default(to);to.default=to;Zs.default=to;qw.exports=Zs.default});var Tp=S((ea,Ww)=>{"use strict";ea.__esModule=!0;var Hw={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&&!Hw.helpers.scopedId(e)&&!e.depth}}};ea.default=Hw;Ww.exports=ea.default});var zw=S((ta,Uw)=>{"use strict";ta.__esModule=!0;var nI=(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,o,s,a,c,l,d){var p=l.length-1;switch(c){case 1:return l[p-1];case 2:this.$=a.prepareProgram(l[p]);break;case 3:this.$=l[p];break;case 4:this.$=l[p];break;case 5:this.$=l[p];break;case 6:this.$=l[p];break;case 7:this.$=l[p];break;case 8:this.$=l[p];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(l[p]),strip:a.stripFlags(l[p],l[p]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:l[p],value:l[p],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(l[p-2],l[p-1],l[p],this._$);break;case 12:this.$={path:l[p-3],params:l[p-2],hash:l[p-1]};break;case 13:this.$=a.prepareBlock(l[p-3],l[p-2],l[p-1],l[p],!1,this._$);break;case 14:this.$=a.prepareBlock(l[p-3],l[p-2],l[p-1],l[p],!0,this._$);break;case 15:this.$={open:l[p-5],path:l[p-4],params:l[p-3],hash:l[p-2],blockParams:l[p-1],strip:a.stripFlags(l[p-5],l[p])};break;case 16:this.$={path:l[p-4],params:l[p-3],hash:l[p-2],blockParams:l[p-1],strip:a.stripFlags(l[p-5],l[p])};break;case 17:this.$={path:l[p-4],params:l[p-3],hash:l[p-2],blockParams:l[p-1],strip:a.stripFlags(l[p-5],l[p])};break;case 18:this.$={strip:a.stripFlags(l[p-1],l[p-1]),program:l[p]};break;case 19:var f=a.prepareBlock(l[p-2],l[p-1],l[p],l[p],!1,this._$),m=a.prepareProgram([f],l[p-1].loc);m.chained=!0,this.$={strip:l[p-2].strip,program:m,chain:!0};break;case 20:this.$=l[p];break;case 21:this.$={path:l[p-1],strip:a.stripFlags(l[p-2],l[p])};break;case 22:this.$=a.prepareMustache(l[p-3],l[p-2],l[p-1],l[p-4],a.stripFlags(l[p-4],l[p]),this._$);break;case 23:this.$=a.prepareMustache(l[p-3],l[p-2],l[p-1],l[p-4],a.stripFlags(l[p-4],l[p]),this._$);break;case 24:this.$={type:"PartialStatement",name:l[p-3],params:l[p-2],hash:l[p-1],indent:"",strip:a.stripFlags(l[p-4],l[p]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(l[p-2],l[p-1],l[p],this._$);break;case 26:this.$={path:l[p-3],params:l[p-2],hash:l[p-1],strip:a.stripFlags(l[p-4],l[p])};break;case 27:this.$=l[p];break;case 28:this.$=l[p];break;case 29:this.$={type:"SubExpression",path:l[p-3],params:l[p-2],hash:l[p-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:l[p],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(l[p-2]),value:l[p],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(l[p-1]);break;case 33:this.$=l[p];break;case 34:this.$=l[p];break;case 35:this.$={type:"StringLiteral",value:l[p],original:l[p],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(l[p]),original:Number(l[p]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:l[p]==="true",original:l[p]==="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.$=l[p];break;case 41:this.$=l[p];break;case 42:this.$=a.preparePath(!0,l[p],this._$);break;case 43:this.$=a.preparePath(!1,l[p],this._$);break;case 44:l[p-2].push({part:a.id(l[p]),original:l[p],separator:l[p-1]}),this.$=l[p-2];break;case 45:this.$=[{part:a.id(l[p]),original:l[p]}];break;case 46:this.$=[];break;case 47:l[p-1].push(l[p]);break;case 48:this.$=[];break;case 49:l[p-1].push(l[p]);break;case 50:this.$=[];break;case 51:l[p-1].push(l[p]);break;case 58:this.$=[];break;case 59:l[p-1].push(l[p]);break;case 64:this.$=[];break;case 65:l[p-1].push(l[p]);break;case 70:this.$=[];break;case 71:l[p-1].push(l[p]);break;case 78:this.$=[];break;case 79:l[p-1].push(l[p]);break;case 82:this.$=[];break;case 83:l[p-1].push(l[p]);break;case 86:this.$=[];break;case 87:l[p-1].push(l[p]);break;case 90:this.$=[];break;case 91:l[p-1].push(l[p]);break;case 94:this.$=[];break;case 95:l[p-1].push(l[p]);break;case 98:this.$=[l[p]];break;case 99:l[p-1].push(l[p]);break;case 100:this.$=[l[p]];break;case 101:l[p-1].push(l[p]);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,s=[0],a=[null],c=[],l=this.table,d="",p=0,f=0,m=0,y=2,g=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 w=this.lexer.yylloc;c.push(w);var b=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function P(D){s.length=s.length-2*D,a.length=a.length-D,c.length=c.length-D}function x(){var D;return D=o.lexer.lex()||1,typeof D!="number"&&(D=o.symbols_[D]||D),D}for(var R,O,j,U,oe,ge,xe={},Re,_e,Ge,de;;){if(j=s[s.length-1],this.defaultActions[j]?U=this.defaultActions[j]:((R===null||typeof R>"u")&&(R=x()),U=l[j]&&l[j][R]),typeof U>"u"||!U.length||!U[0]){var Y="";if(!m){de=[];for(Re in l[j])this.terminals_[Re]&&Re>2&&de.push("'"+this.terminals_[Re]+"'");this.lexer.showPosition?Y="Parse error on line "+(p+1)+`:
162
+ See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function TP(){Object.keys(Ys).forEach(function(t){delete Ys[t]})}});var Qs=S(Lt=>{"use strict";Lt.__esModule=!0;Lt.HandlebarsEnvironment=Np;function Nw(t){return t&&t.__esModule?t:{default:t}}var zn=We(),OP=it(),Tp=Nw(OP),NP=Pp(),MP=Rw(),VP=Rp(),Xs=Nw(VP),LP=Ap(),jP="4.7.9";Lt.VERSION=jP;var DP=8;Lt.COMPILER_REVISION=DP;var FP=7;Lt.LAST_COMPATIBLE_COMPILER_REVISION=FP;var qP={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"};Lt.REVISION_CHANGES=qP;var Op="[object Object]";function Np(t,e,n){this.helpers=t||{},this.partials=e||{},this.decorators=n||{},NP.registerDefaultHelpers(this),MP.registerDefaultDecorators(this)}Np.prototype={constructor:Np,logger:Xs.default,log:Xs.default.log,registerHelper:function(e,n){if(zn.toString.call(e)===Op){if(n)throw new Tp.default("Arg not supported with multiple helpers");zn.extend(this.helpers,e)}else this.helpers[e]=n},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,n){if(zn.toString.call(e)===Op)zn.extend(this.partials,e);else{if(typeof n>"u")throw new Tp.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=n}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,n){if(zn.toString.call(e)===Op){if(n)throw new Tp.default("Arg not supported with multiple decorators");zn.extend(this.decorators,e)}else this.decorators[e]=n},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){LP.resetLoggedProperties()}};var BP=Xs.default.log;Lt.log=BP;Lt.createFrame=zn.createFrame;Lt.logger=Xs.default});var Vw=S((Zs,Mw)=>{"use strict";Zs.__esModule=!0;function Mp(t){this.string=t}Mp.prototype.toString=Mp.prototype.toHTML=function(){return""+this.string};Zs.default=Mp;Mw.exports=Zs.default});var Lw=S(Vp=>{"use strict";Vp.__esModule=!0;Vp.wrapHelper=HP;function HP(t,e){if(typeof t!="function")return t;var n=function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=e(i),t.apply(this,arguments)};return n}});var Hw=S(_n=>{"use strict";_n.__esModule=!0;_n.checkRevision=KP;_n.template=YP;_n.wrapProgram=ea;_n.resolvePartial=XP;_n.invokePartial=QP;_n.noop=qw;function WP(t){return t&&t.__esModule?t:{default:t}}function UP(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var zP=We(),Or=UP(zP),GP=it(),Jt=WP(GP),Kt=Qs(),jw=Pp(),JP=Lw(),Dw=Ap();function KP(t){var e=t&&t[0]||1,n=Kt.COMPILER_REVISION;if(!(e>=Kt.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Kt.COMPILER_REVISION))if(e<Kt.LAST_COMPATIBLE_COMPILER_REVISION){var r=Kt.REVISION_CHANGES[n],i=Kt.REVISION_CHANGES[e];throw new Jt.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 Jt.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 YP(t,e){if(!e)throw new Jt.default("No environment passed to template");if(!t||!t.main)throw new Jt.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var n=t.compiler&&t.compiler[0]===7;function r(s,a,l){l.hash&&(a=Or.extend({},a,l.hash),l.ids&&(l.ids[0]=!0)),s=e.VM.resolvePartial.call(this,s,a,l),l.hooks=this.hooks,l.protoAccessControl=this.protoAccessControl;var c=e.VM.invokePartial.call(this,s,a,l);if(c==null&&e.compile&&(l.partials[l.name]=e.compile(s,t.compilerOptions,e),c=l.partials[l.name](a,l)),c!=null){if(l.indent){for(var p=c.split(`
163
+ `),d=0,f=p.length;d<f&&!(!p[d]&&d+1===f);d++)p[d]=l.indent+p[d];c=p.join(`
164
+ `)}return c}else throw new Jt.default("The partial "+l.name+" could not be compiled when running in runtime-only mode")}var i={strict:function(a,l,c){if(!a||!(l in a))throw new Jt.default('"'+l+'" not defined in '+a,{loc:c});return i.lookupProperty(a,l)},lookupProperty:function(a,l){var c=a[l];if(c==null||Object.prototype.hasOwnProperty.call(a,l)||Dw.resultIsAllowed(c,i.protoAccessControl,l))return c},lookup:function(a,l){for(var c=a.length,p=0;p<c;p++){var d=a[p]&&i.lookupProperty(a[p],l);if(d!=null)return d}},lambda:function(a,l){return typeof a=="function"?a.call(l):a},escapeExpression:Or.escapeExpression,invokePartial:r,fn:function(a){var l=t[a];return l.decorator=t[a+"_d"],l},programs:[],program:function(a,l,c,p,d){var f=this.programs[a],m=this.fn(a);return l||d||p||c?f=ea(this,a,m,l,c,p,d):f||(f=this.programs[a]=ea(this,a,m)),f},data:function(a,l){for(;a&&l--;)a=a._parent;return a},mergeIfNeeded:function(a,l){var c=a||l;return a&&l&&a!==l&&(c=Or.extend({},l,a)),c},nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:t.compiler};function o(s){var a=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],l=a.data;o._setup(a),!a.partial&&t.useData&&(l=ZP(s,l));var c=void 0,p=t.useBlockParams?[]:void 0;t.useDepths&&(a.depths?c=s!=a.depths[0]?[s].concat(a.depths):a.depths:c=[s]);function d(f){return""+t.main(i,f,i.helpers,i.partials,l,p,c)}return d=Bw(t.main,d,i,a.depths||[],l,p),d(s,a)}return o.isTop=!0,o._setup=function(s){if(s.partial)i.protoAccessControl=s.protoAccessControl,i.helpers=s.helpers,i.partials=s.partials,i.decorators=s.decorators,i.hooks=s.hooks;else{var a={};Fw(a,e.helpers,i),Fw(a,s.helpers,i),i.helpers=a,t.usePartial&&(i.partials=i.mergeIfNeeded(s.partials,e.partials)),(t.usePartial||t.useDecorators)&&(i.decorators=Or.extend({},e.decorators,s.decorators)),i.hooks={},i.protoAccessControl=Dw.createProtoAccessControl(s);var l=s.allowCallsToHelperMissing||n;jw.moveHelperToHooks(i,"helperMissing",l),jw.moveHelperToHooks(i,"blockHelperMissing",l)}},o._child=function(s,a,l,c){if(t.useBlockParams&&!l)throw new Jt.default("must pass block params");if(t.useDepths&&!c)throw new Jt.default("must pass parent depths");return ea(i,s,t[s],a,0,l,c)},o}function ea(t,e,n,r,i,o,s){function a(l){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],p=s;return s&&l!=s[0]&&!(l===t.nullContext&&s[0]===null)&&(p=[l].concat(s)),n(t,l,t.helpers,t.partials,c.data||r,o&&[c.blockParams].concat(o),p)}return a=Bw(n,a,t,s,r,o),a.program=e,a.depth=s?s.length:0,a.blockParams=i||0,a}function XP(t,e,n){return t?!t.call&&!n.name&&(n.name=t,t=ta(n.partials,t)):n.name==="@partial-block"?t=ta(n.data,"partial-block"):t=ta(n.partials,n.name),t}function QP(t,e,n){var r=ta(n.data,"partial-block");n.partial=!0,n.ids&&(n.data.contextPath=n.ids[0]||n.data.contextPath);var i=void 0;if(n.fn&&n.fn!==qw&&(function(){n.data=Kt.createFrame(n.data);var o=n.fn;i=n.data["partial-block"]=function(a){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return l.data=Kt.createFrame(l.data),l.data["partial-block"]=r,o(a,l)},o.partials&&(n.partials=Or.extend({},n.partials,o.partials))})(),t===void 0&&i&&(t=i),t===void 0)throw new Jt.default("The partial "+n.name+" could not be found");if(t instanceof Function)return t(e,n)}function qw(){return""}function ta(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function ZP(t,e){return(!e||!("root"in e))&&(e=e?Kt.createFrame(e):{},e.root=t),e}function Bw(t,e,n,r,i,o){if(t.decorator){var s={};e=t.decorator(e,s,n,r&&r[0],i,o,r),Or.extend(e,s)}return e}function Fw(t,e,n){e&&Object.keys(e).forEach(function(r){var i=e[r];t[r]=eI(i,n)})}function eI(t,e){var n=e.lookupProperty;return JP.wrapHelper(t,function(r){return r.lookupProperty=n,r})}});var Lp=S((na,Ww)=>{"use strict";na.__esModule=!0;na.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}};Ww.exports=na.default});var Kw=S((ra,Jw)=>{"use strict";ra.__esModule=!0;function Dp(t){return t&&t.__esModule?t:{default:t}}function Fp(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var tI=Qs(),Uw=Fp(tI),nI=Vw(),rI=Dp(nI),iI=it(),oI=Dp(iI),sI=We(),jp=Fp(sI),aI=Hw(),zw=Fp(aI),cI=Lp(),lI=Dp(cI);function Gw(){var t=new Uw.HandlebarsEnvironment;return jp.extend(t,Uw),t.SafeString=rI.default,t.Exception=oI.default,t.Utils=jp,t.escapeExpression=jp.escapeExpression,t.VM=zw,t.template=function(e){return zw.template(e,t)},t}var io=Gw();io.create=Gw;lI.default(io);io.default=io;ra.default=io;Jw.exports=ra.default});var qp=S((ia,Xw)=>{"use strict";ia.__esModule=!0;var Yw={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&&!Yw.helpers.scopedId(e)&&!e.depth}}};ia.default=Yw;Xw.exports=ia.default});var Zw=S((oa,Qw)=>{"use strict";oa.__esModule=!0;var uI=(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,o,s,a,l,c,p){var d=c.length-1;switch(l){case 1:return c[d-1];case 2:this.$=a.prepareProgram(c[d]);break;case 3:this.$=c[d];break;case 4:this.$=c[d];break;case 5:this.$=c[d];break;case 6:this.$=c[d];break;case 7:this.$=c[d];break;case 8:this.$=c[d];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(c[d]),strip:a.stripFlags(c[d],c[d]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:c[d],value:c[d],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(c[d-2],c[d-1],c[d],this._$);break;case 12:this.$={path:c[d-3],params:c[d-2],hash:c[d-1]};break;case 13:this.$=a.prepareBlock(c[d-3],c[d-2],c[d-1],c[d],!1,this._$);break;case 14:this.$=a.prepareBlock(c[d-3],c[d-2],c[d-1],c[d],!0,this._$);break;case 15:this.$={open:c[d-5],path:c[d-4],params:c[d-3],hash:c[d-2],blockParams:c[d-1],strip:a.stripFlags(c[d-5],c[d])};break;case 16:this.$={path:c[d-4],params:c[d-3],hash:c[d-2],blockParams:c[d-1],strip:a.stripFlags(c[d-5],c[d])};break;case 17:this.$={path:c[d-4],params:c[d-3],hash:c[d-2],blockParams:c[d-1],strip:a.stripFlags(c[d-5],c[d])};break;case 18:this.$={strip:a.stripFlags(c[d-1],c[d-1]),program:c[d]};break;case 19:var f=a.prepareBlock(c[d-2],c[d-1],c[d],c[d],!1,this._$),m=a.prepareProgram([f],c[d-1].loc);m.chained=!0,this.$={strip:c[d-2].strip,program:m,chain:!0};break;case 20:this.$=c[d];break;case 21:this.$={path:c[d-1],strip:a.stripFlags(c[d-2],c[d])};break;case 22:this.$=a.prepareMustache(c[d-3],c[d-2],c[d-1],c[d-4],a.stripFlags(c[d-4],c[d]),this._$);break;case 23:this.$=a.prepareMustache(c[d-3],c[d-2],c[d-1],c[d-4],a.stripFlags(c[d-4],c[d]),this._$);break;case 24:this.$={type:"PartialStatement",name:c[d-3],params:c[d-2],hash:c[d-1],indent:"",strip:a.stripFlags(c[d-4],c[d]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(c[d-2],c[d-1],c[d],this._$);break;case 26:this.$={path:c[d-3],params:c[d-2],hash:c[d-1],strip:a.stripFlags(c[d-4],c[d])};break;case 27:this.$=c[d];break;case 28:this.$=c[d];break;case 29:this.$={type:"SubExpression",path:c[d-3],params:c[d-2],hash:c[d-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:c[d],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(c[d-2]),value:c[d],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(c[d-1]);break;case 33:this.$=c[d];break;case 34:this.$=c[d];break;case 35:this.$={type:"StringLiteral",value:c[d],original:c[d],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(c[d]),original:Number(c[d]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:c[d]==="true",original:c[d]==="true",loc:a.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:a.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:a.locInfo(this._$)};break;case 40:this.$=c[d];break;case 41:this.$=c[d];break;case 42:this.$=a.preparePath(!0,c[d],this._$);break;case 43:this.$=a.preparePath(!1,c[d],this._$);break;case 44:c[d-2].push({part:a.id(c[d]),original:c[d],separator:c[d-1]}),this.$=c[d-2];break;case 45:this.$=[{part:a.id(c[d]),original:c[d]}];break;case 46:this.$=[];break;case 47:c[d-1].push(c[d]);break;case 48:this.$=[];break;case 49:c[d-1].push(c[d]);break;case 50:this.$=[];break;case 51:c[d-1].push(c[d]);break;case 58:this.$=[];break;case 59:c[d-1].push(c[d]);break;case 64:this.$=[];break;case 65:c[d-1].push(c[d]);break;case 70:this.$=[];break;case 71:c[d-1].push(c[d]);break;case 78:this.$=[];break;case 79:c[d-1].push(c[d]);break;case 82:this.$=[];break;case 83:c[d-1].push(c[d]);break;case 86:this.$=[];break;case 87:c[d-1].push(c[d]);break;case 90:this.$=[];break;case 91:c[d-1].push(c[d]);break;case 94:this.$=[];break;case 95:c[d-1].push(c[d]);break;case 98:this.$=[c[d]];break;case 99:c[d-1].push(c[d]);break;case 100:this.$=[c[d]];break;case 101:c[d-1].push(c[d]);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,s=[0],a=[null],l=[],c=this.table,p="",d=0,f=0,m=0,y=2,g=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 w=this.lexer.yylloc;l.push(w);var b=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function P(D){s.length=s.length-2*D,a.length=a.length-D,l.length=l.length-D}function x(){var D;return D=o.lexer.lex()||1,typeof D!="number"&&(D=o.symbols_[D]||D),D}for(var R,O,j,U,oe,ge,xe={},Re,_e,Ge,de;;){if(j=s[s.length-1],this.defaultActions[j]?U=this.defaultActions[j]:((R===null||typeof R>"u")&&(R=x()),U=c[j]&&c[j][R]),typeof U>"u"||!U.length||!U[0]){var Y="";if(!m){de=[];for(Re in c[j])this.terminals_[Re]&&Re>2&&de.push("'"+this.terminals_[Re]+"'");this.lexer.showPosition?Y="Parse error on line "+(d+1)+`:
165
165
  `+this.lexer.showPosition()+`
166
- Expecting `+de.join(", ")+", got '"+(this.terminals_[R]||R)+"'":Y="Parse error on line "+(p+1)+": Unexpected "+(R==1?"end of input":"'"+(this.terminals_[R]||R)+"'"),this.parseError(Y,{text:this.lexer.match,token:this.terminals_[R]||R,line:this.lexer.yylineno,loc:w,expected:de})}}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+R);switch(U[0]){case 1:s.push(R),a.push(this.lexer.yytext),c.push(this.lexer.yylloc),s.push(U[1]),R=null,O?(R=O,O=null):(f=this.lexer.yyleng,d=this.lexer.yytext,p=this.lexer.yylineno,w=this.lexer.yylloc,m>0&&m--);break;case 2:if(_e=this.productions_[U[1]][1],xe.$=a[a.length-_e],xe._$={first_line:c[c.length-(_e||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(_e||1)].first_column,last_column:c[c.length-1].last_column},b&&(xe._$.range=[c[c.length-(_e||1)].range[0],c[c.length-1].range[1]]),ge=this.performAction.call(xe,d,f,p,this.yy,U[1],a,c),typeof ge<"u")return ge;_e&&(s=s.slice(0,-1*_e*2),a=a.slice(0,-1*_e),c=c.slice(0,-1*_e)),s.push(this.productions_[U[1]][0]),a.push(xe.$),c.push(xe._$),Ge=l[s[s.length-2]][s[s.length-1]],s.push(Ge);break;case 3:return!0}}return!0}},e=(function(){var r={EOF:1,parseError:function(o,s){if(this.yy.parser)this.yy.parser.parseError(o,s);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 s=o.match(/(?:\r\n?|\n).*/g);return s?(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 s=o.length,a=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s-1),this.offset-=s;var c=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 l=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===c.length?this.yylloc.first_column:0)+c[c.length-a.length].length-a[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[l[0],l[0]+this.yyleng-s]),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(),s=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
167
- `+s+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,s,a,c,l,d;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),f=0;f<p.length&&(a=this._input.match(this.rules[p[f]]),!(a&&(!s||a[0].length>s[0].length)&&(s=a,c=f,!this.options.flex)));f++);return s?(d=s[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+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,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(s[0].length),this.matched+=s[0],o=this.performAction.call(this,this.yy,this,p[c],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.
168
- `+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,s,a,c){function l(p,f){return s.yytext=s.yytext.substring(p,s.yyleng-f+p)}var d=c;switch(a){case 0:if(s.yytext.slice(-2)==="\\\\"?(l(0,1),this.begin("mu")):s.yytext.slice(-1)==="\\"?(l(0,1),this.begin("emu")):this.begin("mu"),s.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:(l(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(s.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 s.yytext=l(1,2).replace(/\\"/g,'"'),80;break;case 32:return s.yytext=l(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 s.yytext=s.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})();t.lexer=e;function n(){this.yy={}}return n.prototype=t,t.Parser=n,new n})();ta.default=nI;Uw.exports=ta.default});var oa=S((ia,Kw)=>{"use strict";ia.__esModule=!0;function rI(t){return t&&t.__esModule?t:{default:t}}var iI=nt(),Op=rI(iI);function na(){this.parents=[]}na.prototype={constructor:na,mutating:!1,acceptKey:function(e,n){var r=this.accept(e[n]);if(this.mutating){if(r&&!na.prototype[r.type])throw new Op.default('Unexpected node type "'+r.type+'" found when accepting '+n+" on "+e.type);e[n]=r}},acceptRequired:function(e,n){if(this.acceptKey(e,n),!e[n])throw new Op.default(e.type+" requires "+n)},acceptArray:function(e){for(var n=0,r=e.length;n<r;n++)this.acceptKey(e,n),e[n]||(e.splice(n,1),n--,r--)},accept:function(e){if(e){if(!this[e.type])throw new Op.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var n=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||n)return n;if(n!==!1)return e}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:ra,Decorator:ra,BlockStatement:Gw,DecoratorBlock:Gw,PartialStatement:Jw,PartialBlockStatement:function(e){Jw.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:ra,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 ra(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function Gw(t){ra.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function Jw(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}ia.default=na;Kw.exports=ia.default});var Xw=S((sa,Yw)=>{"use strict";sa.__esModule=!0;function oI(t){return t&&t.__esModule?t:{default:t}}var sI=oa(),aI=oI(sI);function Mt(){var t=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=t}Mt.prototype=new aI.default;Mt.prototype.Program=function(t){var e=!this.options.ignoreStandalone,n=!this.isRootSeen;this.isRootSeen=!0;for(var r=t.body,i=0,o=r.length;i<o;i++){var s=r[i],a=this.accept(s);if(a){var c=Np(r,i,n),l=Mp(r,i,n),d=a.openStandalone&&c,p=a.closeStandalone&&l,f=a.inlineStandalone&&c&&l;a.close&&Wn(r,i,!0),a.open&&vn(r,i,!0),e&&f&&(Wn(r,i),vn(r,i)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(r[i-1].original)[1])),e&&d&&(Wn((s.program||s.inverse).body),vn(r,i)),e&&p&&(Wn(r,i),vn((s.inverse||s.program).body))}}return t};Mt.prototype.BlockStatement=Mt.prototype.DecoratorBlock=Mt.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,n=t.program&&t.inverse,r=n,i=n;if(n&&n.chained)for(r=n.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var o={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:Mp(e.body),closeStandalone:Np((r||e).body)};if(t.openStrip.close&&Wn(e.body,null,!0),n){var s=t.inverseStrip;s.open&&vn(e.body,null,!0),s.close&&Wn(r.body,null,!0),t.closeStrip.open&&vn(i.body,null,!0),!this.options.ignoreStandalone&&Np(e.body)&&Mp(r.body)&&(vn(e.body),Wn(r.body))}else t.closeStrip.open&&vn(e.body,null,!0);return o};Mt.prototype.Decorator=Mt.prototype.MustacheStatement=function(t){return t.strip};Mt.prototype.PartialStatement=Mt.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function Np(t,e,n){e===void 0&&(e=t.length);var r=t[e-1],i=t[e-2];if(!r)return n;if(r.type==="ContentStatement")return(i||!n?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(r.original)}function Mp(t,e,n){e===void 0&&(e=-1);var r=t[e+1],i=t[e+2];if(!r)return n;if(r.type==="ContentStatement")return(i||!n?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(r.original)}function Wn(t,e,n){var r=t[e==null?0:e+1];if(!(!r||r.type!=="ContentStatement"||!n&&r.rightStripped)){var i=r.value;r.value=r.value.replace(n?/^\s+/:/^[ \t]*\r?\n?/,""),r.rightStripped=r.value!==i}}function vn(t,e,n){var r=t[e==null?t.length-1:e-1];if(!(!r||r.type!=="ContentStatement"||!n&&r.leftStripped)){var i=r.value;return r.value=r.value.replace(n?/\s+$/:/[ \t]+$/,""),r.leftStripped=r.value!==i,r.leftStripped}}sa.default=Mt;Yw.exports=sa.default});var Qw=S(mt=>{"use strict";mt.__esModule=!0;mt.SourceLocation=uI;mt.id=pI;mt.stripFlags=dI;mt.stripComment=fI;mt.preparePath=hI;mt.prepareMustache=mI;mt.prepareRawBlock=gI;mt.prepareBlock=yI;mt.prepareProgram=wI;mt.preparePartialBlock=vI;function cI(t){return t&&t.__esModule?t:{default:t}}var lI=nt(),Vp=cI(lI);function Lp(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var n={loc:t.path.loc};throw new Vp.default(t.path.original+" doesn't match "+e,n)}}function uI(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 pI(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function dI(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function fI(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function hI(t,e,n){n=this.locInfo(n);for(var r=t?"@":"",i=[],o=0,s=0,a=e.length;s<a;s++){var c=e[s].part,l=e[s].original!==c;if(r+=(e[s].separator||"")+c,!l&&(c===".."||c==="."||c==="this")){if(i.length>0)throw new Vp.default("Invalid path: "+r,{loc:n});c===".."&&o++}else i.push(c)}return{type:"PathExpression",data:t,depth:o,parts:i,original:r,loc:n}}function mI(t,e,n,r,i,o){var s=r.charAt(3)||r.charAt(2),a=s!=="{"&&s!=="&",c=/\*/.test(r);return{type:c?"Decorator":"MustacheStatement",path:t,params:e,hash:n,escaped:a,strip:i,loc:this.locInfo(o)}}function gI(t,e,n,r){Lp(t,n),r=this.locInfo(r);var i={type:"Program",body:e,strip:{},loc:r};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:r}}function yI(t,e,n,r,i,o){r&&r.path&&Lp(t,r);var s=/\*/.test(t.open);e.blockParams=t.blockParams;var a=void 0,c=void 0;if(n){if(s)throw new Vp.default("Unexpected inverse block on decorator",n);n.chain&&(n.program.body[0].closeStrip=r.strip),c=n.strip,a=n.program}return i&&(i=a,a=e,e=i),{type:s?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:a,openStrip:t.strip,inverseStrip:c,closeStrip:r&&r.strip,loc:this.locInfo(o)}}function wI(t,e){if(!e&&t.length){var n=t[0].loc,r=t[t.length-1].loc;n&&r&&(e={source:n.source,start:{line:n.start.line,column:n.start.column},end:{line:r.end.line,column:r.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function vI(t,e,n,r){return Lp(t,n),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:n&&n.strip,loc:this.locInfo(r)}}});var ev=S(ro=>{"use strict";ro.__esModule=!0;ro.parseWithoutProcessing=Zw;ro.parse=PI;function bI(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function Fp(t){return t&&t.__esModule?t:{default:t}}var _I=zw(),jp=Fp(_I),xI=Xw(),$I=Fp(xI),SI=Qw(),CI=bI(SI),kI=nt(),no=Fp(kI),EI=We();ro.parser=jp.default;var aa={};EI.extend(aa,CI);function Zw(t,e){if(t.type==="Program")return II(t),t;jp.default.yy=aa,aa.locInfo=function(r){return new aa.SourceLocation(e&&e.srcName,r)};var n=jp.default.parse(t);return n}function PI(t,e){var n=Zw(t,e),r=new $I.default(e);return r.accept(n)}function II(t){Dp(t)}function Dp(t){if(t!=null){if(Array.isArray(t)){t.forEach(Dp);return}if(typeof t=="object"){if(t.type==="PathExpression"){if(!RI(t.depth))throw new no.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(t.parts))throw new no.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 no.default("Invalid AST: PathExpression.parts must only contain strings")}else if(t.type==="NumberLiteral"){if(typeof t.value!="number"||!isFinite(t.value))throw new no.default("Invalid AST: NumberLiteral.value must be a number")}else if(t.type==="BooleanLiteral"&&typeof t.value!="boolean")throw new no.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(t).forEach(function(n){n!=="loc"&&Dp(t[n])})}}}function RI(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0}});var iv=S(ao=>{"use strict";ao.__esModule=!0;ao.Compiler=qp;ao.precompile=NI;ao.compile=MI;function nv(t){return t&&t.__esModule?t:{default:t}}var AI=nt(),oo=nv(AI),so=We(),TI=Tp(),io=nv(TI),OI=[].slice;function qp(){}qp.prototype={compiler:qp,equals:function(e){var n=this.opcodes.length;if(e.opcodes.length!==n)return!1;for(var r=0;r<n;r++){var i=this.opcodes[r],o=e.opcodes[r];if(i.opcode!==o.opcode||!rv(i.args,o.args))return!1}n=this.children.length;for(var r=0;r<n;r++)if(!this.children[r].equals(e.children[r]))return!1;return!0},guid:0,compile:function(e,n){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=n,this.stringParams=n.stringParams,this.trackIds=n.trackIds,n.blockParams=n.blockParams||[],n.knownHelpers=so.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},n.knownHelpers),this.accept(e)},compileProgram:function(e){var n=new this.compiler,r=n.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 oo.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var n=this[e.type](e);return this.sourceNode.shift(),n},Program:function(e){this.options.blockParams.unshift(e.blockParams);for(var n=e.body,r=n.length,i=0;i<r;i++)this.accept(n[i]);return this.options.blockParams.shift(),this.isSimple=r===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){tv(e);var n=e.program,r=e.inverse;n=n&&this.compileProgram(n),r=r&&this.compileProgram(r);var i=this.classifySexpr(e);i==="helper"?this.helperSexpr(e,n,r):i==="simple"?(this.simpleSexpr(e),this.opcode("pushProgram",n),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,n,r),this.opcode("pushProgram",n),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(e){var n=e.program&&this.compileProgram(e.program),r=this.setupFullMustacheParams(e,n,void 0),i=e.path;this.useDecorators=!0,this.opcode("registerDecorator",r.length,i.original)},PartialStatement:function(e){this.usePartial=!0;var n=e.program;n&&(n=this.compileProgram(e.program));var r=e.params;if(r.length>1)throw new oo.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,n,void 0,!0);var s=e.indent||"";this.options.preventIndent&&s&&(this.opcode("appendContent",s),s=""),this.opcode("invokePartial",o,i,s),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){tv(e);var n=this.classifySexpr(e);n==="simple"?this.simpleSexpr(e):n==="helper"?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,n,r){var i=e.path,o=i.parts[0],s=n!=null||r!=null;this.opcode("getContext",i.depth),this.opcode("pushProgram",n),this.opcode("pushProgram",r),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",o,s)},simpleSexpr:function(e){var n=e.path;n.strict=!0,this.accept(n),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,n,r){var i=this.setupFullMustacheParams(e,n,r),o=e.path,s=o.parts[0];if(this.options.knownHelpers[s])this.opcode("invokeKnownHelper",i.length,s);else{if(this.options.knownHelpersOnly)throw new oo.default("You specified knownHelpersOnly, but used the unknown helper "+s,e);o.strict=!0,o.falsy=!0,this.accept(o),this.opcode("invokeHelper",i.length,o.original,io.default.helpers.simpleId(o))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var n=e.parts[0],r=io.default.helpers.scopedId(e),i=!e.depth&&!r&&this.blockParamIndex(n);i?this.opcode("lookupBlockParam",i,e.parts):n?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 n=e.pairs,r=0,i=n.length;for(this.opcode("pushHash");r<i;r++)this.pushParam(n[r].value);for(;r--;)this.opcode("assignToHash",n[r].key);this.opcode("popHash")},opcode:function(e){this.opcodes.push({opcode:e,args:OI.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var n=io.default.helpers.simpleId(e.path),r=n&&!!this.blockParamIndex(e.path.parts[0]),i=!r&&io.default.helpers.helperExpression(e),o=!r&&(i||n);if(o&&!i){var s=e.path.parts[0],a=this.options;a.knownHelpers[s]?i=!0:a.knownHelpersOnly&&(o=!1)}return i?"helper":o?"ambiguous":"simple"},pushParams:function(e){for(var n=0,r=e.length;n<r;n++)this.pushParam(e[n])},pushParam:function(e){var n=e.value!=null?e.value:e.original||"";if(this.stringParams)n.replace&&(n=n.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",n,e.type),e.type==="SubExpression"&&this.accept(e);else{if(this.trackIds){var r=void 0;if(e.parts&&!io.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 n=e.original||n,n.replace&&(n=n.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",e.type,n)}this.accept(e)}},setupFullMustacheParams:function(e,n,r,i){var o=e.params;return this.pushParams(o),this.opcode("pushProgram",n),this.opcode("pushProgram",r),e.hash?this.accept(e.hash):this.opcode("emptyHash",i),o},blockParamIndex:function(e){for(var n=0,r=this.options.blockParams.length;n<r;n++){var i=this.options.blockParams[n],o=i&&so.indexOf(i,e);if(i&&o>=0)return[n,o]}}};function NI(t,e,n){if(t==null||typeof t!="string"&&t.type!=="Program")throw new oo.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 r=n.parse(t,e),i=new n.Compiler().compile(r,e);return new n.JavaScriptCompiler().compile(i,e)}function MI(t,e,n){if(e===void 0&&(e={}),t==null||typeof t!="string"&&t.type!=="Program")throw new oo.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=so.extend({},e),"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var r=void 0;function i(){var s=n.parse(t,e),a=new n.Compiler().compile(s,e),c=new n.JavaScriptCompiler().compile(a,e,void 0,!0);return n.template(c)}function o(s,a){return r||(r=i()),r.call(this,s,a)}return o._setup=function(s){return r||(r=i()),r._setup(s)},o._child=function(s,a,c,l){return r||(r=i()),r._child(s,a,c,l)},o}function rv(t,e){if(t===e)return!0;if(so.isArray(t)&&so.isArray(e)&&t.length===e.length){for(var n=0;n<t.length;n++)if(!rv(t[n],e[n]))return!1;return!0}}function tv(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 sv=S(Bp=>{var ov="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Bp.encode=function(t){if(0<=t&&t<ov.length)return ov[t];throw new TypeError("Must be between 0 and 63: "+t)};Bp.decode=function(t){var e=65,n=90,r=97,i=122,o=48,s=57,a=43,c=47,l=26,d=52;return e<=t&&t<=n?t-e:r<=t&&t<=i?t-r+l:o<=t&&t<=s?t-o+d:t==a?62:t==c?63:-1}});var Up=S(Wp=>{var av=sv(),Hp=5,cv=1<<Hp,lv=cv-1,uv=cv;function VI(t){return t<0?(-t<<1)+1:(t<<1)+0}function LI(t){var e=(t&1)===1,n=t>>1;return e?-n:n}Wp.encode=function(e){var n="",r,i=VI(e);do r=i&lv,i>>>=Hp,i>0&&(r|=uv),n+=av.encode(r);while(i>0);return n};Wp.decode=function(e,n,r){var i=e.length,o=0,s=0,a,c;do{if(n>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=av.decode(e.charCodeAt(n++)),c===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));a=!!(c&uv),c&=lv,o=o+(c<<s),s+=Hp}while(a);r.value=LI(o),r.rest=n}});var Or=S(Fe=>{function jI(t,e,n){if(e in t)return t[e];if(arguments.length===3)return n;throw new Error('"'+e+'" is a required argument.')}Fe.getArg=jI;var pv=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,DI=/^data:.+\,.+$/;function co(t){var e=t.match(pv);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Fe.urlParse=co;function Ar(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}Fe.urlGenerate=Ar;function zp(t){var e=t,n=co(t);if(n){if(!n.path)return t;e=n.path}for(var r=Fe.isAbsolute(e),i=e.split(/\/+/),o,s=0,a=i.length-1;a>=0;a--)o=i[a],o==="."?i.splice(a,1):o===".."?s++:s>0&&(o===""?(i.splice(a+1,s),s=0):(i.splice(a,2),s--));return e=i.join("/"),e===""&&(e=r?"/":"."),n?(n.path=e,Ar(n)):e}Fe.normalize=zp;function dv(t,e){t===""&&(t="."),e===""&&(e=".");var n=co(e),r=co(t);if(r&&(t=r.path||"/"),n&&!n.scheme)return r&&(n.scheme=r.scheme),Ar(n);if(n||e.match(DI))return e;if(r&&!r.host&&!r.path)return r.host=e,Ar(r);var i=e.charAt(0)==="/"?e:zp(t.replace(/\/+$/,"")+"/"+e);return r?(r.path=i,Ar(r)):i}Fe.join=dv;Fe.isAbsolute=function(t){return t.charAt(0)==="/"||pv.test(t)};function FI(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var n=0;e.indexOf(t+"/")!==0;){var r=t.lastIndexOf("/");if(r<0||(t=t.slice(0,r),t.match(/^([^\/]+:\/)?\/*$/)))return e;++n}return Array(n+1).join("../")+e.substr(t.length+1)}Fe.relative=FI;var fv=(function(){var t=Object.create(null);return!("__proto__"in t)})();function hv(t){return t}function qI(t){return mv(t)?"$"+t:t}Fe.toSetString=fv?hv:qI;function BI(t){return mv(t)?t.slice(1):t}Fe.fromSetString=fv?hv:BI;function mv(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 n=e-10;n>=0;n--)if(t.charCodeAt(n)!==36)return!1;return!0}function HI(t,e,n){var r=Tr(t.source,e.source);return r!==0||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0||n)||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=t.generatedLine-e.generatedLine,r!==0)?r:Tr(t.name,e.name)}Fe.compareByOriginalPositions=HI;function WI(t,e,n){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0||n)||(r=Tr(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:Tr(t.name,e.name)}Fe.compareByGeneratedPositionsDeflated=WI;function Tr(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function UI(t,e){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=Tr(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:Tr(t.name,e.name)}Fe.compareByGeneratedPositionsInflated=UI;function zI(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Fe.parseSourceMapInput=zI;function GI(t,e,n){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),n){var r=co(n);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=dv(Ar(r),e)}return zp(e)}Fe.computeSourceURL=GI});var Kp=S(gv=>{var Gp=Or(),Jp=Object.prototype.hasOwnProperty,Un=typeof Map<"u";function Kt(){this._array=[],this._set=Un?new Map:Object.create(null)}Kt.fromArray=function(e,n){for(var r=new Kt,i=0,o=e.length;i<o;i++)r.add(e[i],n);return r};Kt.prototype.size=function(){return Un?this._set.size:Object.getOwnPropertyNames(this._set).length};Kt.prototype.add=function(e,n){var r=Un?e:Gp.toSetString(e),i=Un?this.has(e):Jp.call(this._set,r),o=this._array.length;(!i||n)&&this._array.push(e),i||(Un?this._set.set(e,o):this._set[r]=o)};Kt.prototype.has=function(e){if(Un)return this._set.has(e);var n=Gp.toSetString(e);return Jp.call(this._set,n)};Kt.prototype.indexOf=function(e){if(Un){var n=this._set.get(e);if(n>=0)return n}else{var r=Gp.toSetString(e);if(Jp.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')};Kt.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Kt.prototype.toArray=function(){return this._array.slice()};gv.ArraySet=Kt});var vv=S(wv=>{var yv=Or();function JI(t,e){var n=t.generatedLine,r=e.generatedLine,i=t.generatedColumn,o=e.generatedColumn;return r>n||r==n&&o>=i||yv.compareByGeneratedPositionsInflated(t,e)<=0}function ca(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}ca.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)};ca.prototype.add=function(e){JI(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};ca.prototype.toArray=function(){return this._sorted||(this._array.sort(yv.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};wv.MappingList=ca});var Yp=S(bv=>{var lo=Up(),Pe=Or(),la=Kp().ArraySet,KI=vv().MappingList;function gt(t){t||(t={}),this._file=Pe.getArg(t,"file",null),this._sourceRoot=Pe.getArg(t,"sourceRoot",null),this._skipValidation=Pe.getArg(t,"skipValidation",!1),this._sources=new la,this._names=new la,this._mappings=new KI,this._sourcesContents=null}gt.prototype._version=3;gt.fromSourceMap=function(e){var n=e.sourceRoot,r=new gt({file:e.file,sourceRoot:n});return e.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,n!=null&&(o.source=Pe.relative(n,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;n!==null&&(o=Pe.relative(n,i)),r._sources.has(o)||r._sources.add(o);var s=e.sourceContentFor(i);s!=null&&r.setSourceContent(i,s)}),r};gt.prototype.addMapping=function(e){var n=Pe.getArg(e,"generated"),r=Pe.getArg(e,"original",null),i=Pe.getArg(e,"source",null),o=Pe.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,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:n.line,generatedColumn:n.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:i,name:o})};gt.prototype.setSourceContent=function(e,n){var r=e;this._sourceRoot!=null&&(r=Pe.relative(this._sourceRoot,r)),n!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Pe.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[Pe.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};gt.prototype.applySourceMap=function(e,n,r){var i=n;if(n==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=Pe.relative(o,i));var s=new la,a=new la;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var l=e.originalPositionFor({line:c.originalLine,column:c.originalColumn});l.source!=null&&(c.source=l.source,r!=null&&(c.source=Pe.join(r,c.source)),o!=null&&(c.source=Pe.relative(o,c.source)),c.originalLine=l.line,c.originalColumn=l.column,l.name!=null&&(c.name=l.name))}var d=c.source;d!=null&&!s.has(d)&&s.add(d);var p=c.name;p!=null&&!a.has(p)&&a.add(p)},this),this._sources=s,this._names=a,e.sources.forEach(function(c){var l=e.sourceContentFor(c);l!=null&&(r!=null&&(c=Pe.join(r,c)),o!=null&&(c=Pe.relative(o,c)),this.setSourceContent(c,l))},this)};gt.prototype._validateMapping=function(e,n,r,i){if(n&&typeof n.line!="number"&&typeof n.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&&!n&&!r&&!i)){if(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:i}))}};gt.prototype._serializeMappings=function(){for(var e=0,n=1,r=0,i=0,o=0,s=0,a="",c,l,d,p,f=this._mappings.toArray(),m=0,y=f.length;m<y;m++){if(l=f[m],c="",l.generatedLine!==n)for(e=0;l.generatedLine!==n;)c+=";",n++;else if(m>0){if(!Pe.compareByGeneratedPositionsInflated(l,f[m-1]))continue;c+=","}c+=lo.encode(l.generatedColumn-e),e=l.generatedColumn,l.source!=null&&(p=this._sources.indexOf(l.source),c+=lo.encode(p-s),s=p,c+=lo.encode(l.originalLine-1-i),i=l.originalLine-1,c+=lo.encode(l.originalColumn-r),r=l.originalColumn,l.name!=null&&(d=this._names.indexOf(l.name),c+=lo.encode(d-o),o=d)),a+=c}return a};gt.prototype._generateSourcesContent=function(e,n){return e.map(function(r){if(!this._sourcesContents)return null;n!=null&&(r=Pe.relative(n,r));var i=Pe.toSetString(r);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};gt.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};gt.prototype.toString=function(){return JSON.stringify(this.toJSON())};bv.SourceMapGenerator=gt});var _v=S(zn=>{zn.GREATEST_LOWER_BOUND=1;zn.LEAST_UPPER_BOUND=2;function Xp(t,e,n,r,i,o){var s=Math.floor((e-t)/2)+t,a=i(n,r[s],!0);return a===0?s:a>0?e-s>1?Xp(s,e,n,r,i,o):o==zn.LEAST_UPPER_BOUND?e<r.length?e:-1:s:s-t>1?Xp(t,s,n,r,i,o):o==zn.LEAST_UPPER_BOUND?s:t<0?-1:t}zn.search=function(e,n,r,i){if(n.length===0)return-1;var o=Xp(-1,n.length,e,n,r,i||zn.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&r(n[o],n[o-1],!0)===0;)--o;return o}});var $v=S(xv=>{function Qp(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function YI(t,e){return Math.round(t+Math.random()*(e-t))}function Zp(t,e,n,r){if(n<r){var i=YI(n,r),o=n-1;Qp(t,i,r);for(var s=t[r],a=n;a<r;a++)e(t[a],s)<=0&&(o+=1,Qp(t,o,a));Qp(t,o+1,a);var c=o+1;Zp(t,e,n,c-1),Zp(t,e,c+1,r)}}xv.quickSort=function(t,e){Zp(t,e,0,t.length-1)}});var Cv=S(ua=>{var B=Or(),ed=_v(),Nr=Kp().ArraySet,XI=Up(),uo=$v().quickSort;function be(t,e){var n=t;return typeof t=="string"&&(n=B.parseSourceMapInput(t)),n.sections!=null?new kt(n,e):new Oe(n,e)}be.fromSourceMap=function(t,e){return Oe.fromSourceMap(t,e)};be.prototype._version=3;be.prototype.__generatedMappings=null;Object.defineProperty(be.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});be.prototype.__originalMappings=null;Object.defineProperty(be.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});be.prototype._charIsMappingSeparator=function(e,n){var r=e.charAt(n);return r===";"||r===","};be.prototype._parseMappings=function(e,n){throw new Error("Subclasses must implement _parseMappings")};be.GENERATED_ORDER=1;be.ORIGINAL_ORDER=2;be.GREATEST_LOWER_BOUND=1;be.LEAST_UPPER_BOUND=2;be.prototype.eachMapping=function(e,n,r){var i=n||null,o=r||be.GENERATED_ORDER,s;switch(o){case be.GENERATED_ORDER:s=this._generatedMappings;break;case be.ORIGINAL_ORDER:s=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;s.map(function(c){var l=c.source===null?null:this._sources.at(c.source);return l=B.computeSourceURL(a,l,this._sourceMapURL),{source:l,generatedLine:c.generatedLine,generatedColumn:c.generatedColumn,originalLine:c.originalLine,originalColumn:c.originalColumn,name:c.name===null?null:this._names.at(c.name)}},this).forEach(e,i)};be.prototype.allGeneratedPositionsFor=function(e){var n=B.getArg(e,"line"),r={source:B.getArg(e,"source"),originalLine:n,originalColumn:B.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",B.compareByOriginalPositions,ed.LEAST_UPPER_BOUND);if(o>=0){var s=this._originalMappings[o];if(e.column===void 0)for(var a=s.originalLine;s&&s.originalLine===a;)i.push({line:B.getArg(s,"generatedLine",null),column:B.getArg(s,"generatedColumn",null),lastColumn:B.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o];else for(var c=s.originalColumn;s&&s.originalLine===n&&s.originalColumn==c;)i.push({line:B.getArg(s,"generatedLine",null),column:B.getArg(s,"generatedColumn",null),lastColumn:B.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o]}return i};ua.SourceMapConsumer=be;function Oe(t,e){var n=t;typeof t=="string"&&(n=B.parseSourceMapInput(t));var r=B.getArg(n,"version"),i=B.getArg(n,"sources"),o=B.getArg(n,"names",[]),s=B.getArg(n,"sourceRoot",null),a=B.getArg(n,"sourcesContent",null),c=B.getArg(n,"mappings"),l=B.getArg(n,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);s&&(s=B.normalize(s)),i=i.map(String).map(B.normalize).map(function(d){return s&&B.isAbsolute(s)&&B.isAbsolute(d)?B.relative(s,d):d}),this._names=Nr.fromArray(o.map(String),!0),this._sources=Nr.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(d){return B.computeSourceURL(s,d,e)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=e,this.file=l}Oe.prototype=Object.create(be.prototype);Oe.prototype.consumer=be;Oe.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=B.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var n;for(n=0;n<this._absoluteSources.length;++n)if(this._absoluteSources[n]==t)return n;return-1};Oe.fromSourceMap=function(e,n){var r=Object.create(Oe.prototype),i=r._names=Nr.fromArray(e._names.toArray(),!0),o=r._sources=Nr.fromArray(e._sources.toArray(),!0);r.sourceRoot=e._sourceRoot,r.sourcesContent=e._generateSourcesContent(r._sources.toArray(),r.sourceRoot),r.file=e._file,r._sourceMapURL=n,r._absoluteSources=r._sources.toArray().map(function(m){return B.computeSourceURL(r.sourceRoot,m,n)});for(var s=e._mappings.toArray().slice(),a=r.__generatedMappings=[],c=r.__originalMappings=[],l=0,d=s.length;l<d;l++){var p=s[l],f=new Sv;f.generatedLine=p.generatedLine,f.generatedColumn=p.generatedColumn,p.source&&(f.source=o.indexOf(p.source),f.originalLine=p.originalLine,f.originalColumn=p.originalColumn,p.name&&(f.name=i.indexOf(p.name)),c.push(f)),a.push(f)}return uo(r.__originalMappings,B.compareByOriginalPositions),r};Oe.prototype._version=3;Object.defineProperty(Oe.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Sv(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Oe.prototype._parseMappings=function(e,n){for(var r=1,i=0,o=0,s=0,a=0,c=0,l=e.length,d=0,p={},f={},m=[],y=[],g,w,b,P,x;d<l;)if(e.charAt(d)===";")r++,d++,i=0;else if(e.charAt(d)===",")d++;else{for(g=new Sv,g.generatedLine=r,P=d;P<l&&!this._charIsMappingSeparator(e,P);P++);if(w=e.slice(d,P),b=p[w],b)d+=w.length;else{for(b=[];d<P;)XI.decode(e,d,f),x=f.value,d=f.rest,b.push(x);if(b.length===2)throw new Error("Found a source, but no line and column");if(b.length===3)throw new Error("Found a source and line, but no column");p[w]=b}g.generatedColumn=i+b[0],i=g.generatedColumn,b.length>1&&(g.source=a+b[1],a+=b[1],g.originalLine=o+b[2],o=g.originalLine,g.originalLine+=1,g.originalColumn=s+b[3],s=g.originalColumn,b.length>4&&(g.name=c+b[4],c+=b[4])),y.push(g),typeof g.originalLine=="number"&&m.push(g)}uo(y,B.compareByGeneratedPositionsDeflated),this.__generatedMappings=y,uo(m,B.compareByOriginalPositions),this.__originalMappings=m};Oe.prototype._findMapping=function(e,n,r,i,o,s){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 ed.search(e,n,o,s)};Oe.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var n=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(n.generatedLine===r.generatedLine){n.lastGeneratedColumn=r.generatedColumn-1;continue}}n.lastGeneratedColumn=1/0}};Oe.prototype.originalPositionFor=function(e){var n={generatedLine:B.getArg(e,"line"),generatedColumn:B.getArg(e,"column")},r=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",B.compareByGeneratedPositionsDeflated,B.getArg(e,"bias",be.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===n.generatedLine){var o=B.getArg(i,"source",null);o!==null&&(o=this._sources.at(o),o=B.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var s=B.getArg(i,"name",null);return s!==null&&(s=this._names.at(s)),{source:o,line:B.getArg(i,"originalLine",null),column:B.getArg(i,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}};Oe.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};Oe.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var i=e;this.sourceRoot!=null&&(i=B.relative(this.sourceRoot,i));var o;if(this.sourceRoot!=null&&(o=B.urlParse(this.sourceRoot))){var s=i.replace(/^file:\/\//,"");if(o.scheme=="file"&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!o.path||o.path=="/")&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(n)return null;throw new Error('"'+i+'" is not in the SourceMap.')};Oe.prototype.generatedPositionFor=function(e){var n=B.getArg(e,"source");if(n=this._findSourceIndex(n),n<0)return{line:null,column:null,lastColumn:null};var r={source:n,originalLine:B.getArg(e,"line"),originalColumn:B.getArg(e,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",B.compareByOriginalPositions,B.getArg(e,"bias",be.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===r.source)return{line:B.getArg(o,"generatedLine",null),column:B.getArg(o,"generatedColumn",null),lastColumn:B.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};ua.BasicSourceMapConsumer=Oe;function kt(t,e){var n=t;typeof t=="string"&&(n=B.parseSourceMapInput(t));var r=B.getArg(n,"version"),i=B.getArg(n,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new Nr,this._names=new Nr;var o={line:-1,column:0};this._sections=i.map(function(s){if(s.url)throw new Error("Support for url field in sections not implemented.");var a=B.getArg(s,"offset"),c=B.getArg(a,"line"),l=B.getArg(a,"column");if(c<o.line||c===o.line&&l<o.column)throw new Error("Section offsets must be ordered and non-overlapping.");return o=a,{generatedOffset:{generatedLine:c+1,generatedColumn:l+1},consumer:new be(B.getArg(s,"map"),e)}})}kt.prototype=Object.create(be.prototype);kt.prototype.constructor=be;kt.prototype._version=3;Object.defineProperty(kt.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var n=0;n<this._sections[e].consumer.sources.length;n++)t.push(this._sections[e].consumer.sources[n]);return t}});kt.prototype.originalPositionFor=function(e){var n={generatedLine:B.getArg(e,"line"),generatedColumn:B.getArg(e,"column")},r=ed.search(n,this._sections,function(o,s){var a=o.generatedLine-s.generatedOffset.generatedLine;return a||o.generatedColumn-s.generatedOffset.generatedColumn}),i=this._sections[r];return i?i.consumer.originalPositionFor({line:n.generatedLine-(i.generatedOffset.generatedLine-1),column:n.generatedColumn-(i.generatedOffset.generatedLine===n.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};kt.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};kt.prototype.sourceContentFor=function(e,n){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(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')};kt.prototype.generatedPositionFor=function(e){for(var n=0;n<this._sections.length;n++){var r=this._sections[n];if(r.consumer._findSourceIndex(B.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}};kt.prototype._parseMappings=function(e,n){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var i=this._sections[r],o=i.consumer._generatedMappings,s=0;s<o.length;s++){var a=o[s],c=i.consumer._sources.at(a.source);c=B.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL),this._sources.add(c),c=this._sources.indexOf(c);var l=null;a.name&&(l=i.consumer._names.at(a.name),this._names.add(l),l=this._names.indexOf(l));var d={source:c,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:l};this.__generatedMappings.push(d),typeof d.originalLine=="number"&&this.__originalMappings.push(d)}uo(this.__generatedMappings,B.compareByGeneratedPositionsDeflated),uo(this.__originalMappings,B.compareByOriginalPositions)};ua.IndexedSourceMapConsumer=kt});var Ev=S(kv=>{var QI=Yp().SourceMapGenerator,pa=Or(),ZI=/(\r?\n)/,eR=10,Mr="$$$isSourceNode$$$";function rt(t,e,n,r,i){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=n??null,this.name=i??null,this[Mr]=!0,r!=null&&this.add(r)}rt.fromStringWithSourceMap=function(e,n,r){var i=new rt,o=e.split(ZI),s=0,a=function(){var f=y(),m=y()||"";return f+m;function y(){return s<o.length?o[s++]:void 0}},c=1,l=0,d=null;return n.eachMapping(function(f){if(d!==null)if(c<f.generatedLine)p(d,a()),c++,l=0;else{var m=o[s]||"",y=m.substr(0,f.generatedColumn-l);o[s]=m.substr(f.generatedColumn-l),l=f.generatedColumn,p(d,y),d=f;return}for(;c<f.generatedLine;)i.add(a()),c++;if(l<f.generatedColumn){var m=o[s]||"";i.add(m.substr(0,f.generatedColumn)),o[s]=m.substr(f.generatedColumn),l=f.generatedColumn}d=f},this),s<o.length&&(d&&p(d,a()),i.add(o.splice(s).join(""))),n.sources.forEach(function(f){var m=n.sourceContentFor(f);m!=null&&(r!=null&&(f=pa.join(r,f)),i.setSourceContent(f,m))}),i;function p(f,m){if(f===null||f.source===void 0)i.add(m);else{var y=r?pa.join(r,f.source):f.source;i.add(new rt(f.originalLine,f.originalColumn,y,m,f.name))}}};rt.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(n){this.add(n)},this);else if(e[Mr]||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};rt.prototype.prepend=function(e){if(Array.isArray(e))for(var n=e.length-1;n>=0;n--)this.prepend(e[n]);else if(e[Mr]||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};rt.prototype.walk=function(e){for(var n,r=0,i=this.children.length;r<i;r++)n=this.children[r],n[Mr]?n.walk(e):n!==""&&e(n,{source:this.source,line:this.line,column:this.column,name:this.name})};rt.prototype.join=function(e){var n,r,i=this.children.length;if(i>0){for(n=[],r=0;r<i-1;r++)n.push(this.children[r]),n.push(e);n.push(this.children[r]),this.children=n}return this};rt.prototype.replaceRight=function(e,n){var r=this.children[this.children.length-1];return r[Mr]?r.replaceRight(e,n):typeof r=="string"?this.children[this.children.length-1]=r.replace(e,n):this.children.push("".replace(e,n)),this};rt.prototype.setSourceContent=function(e,n){this.sourceContents[pa.toSetString(e)]=n};rt.prototype.walkSourceContents=function(e){for(var n=0,r=this.children.length;n<r;n++)this.children[n][Mr]&&this.children[n].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),n=0,r=i.length;n<r;n++)e(pa.fromSetString(i[n]),this.sourceContents[i[n]])};rt.prototype.toString=function(){var e="";return this.walk(function(n){e+=n}),e};rt.prototype.toStringWithSourceMap=function(e){var n={code:"",line:1,column:0},r=new QI(e),i=!1,o=null,s=null,a=null,c=null;return this.walk(function(l,d){n.code+=l,d.source!==null&&d.line!==null&&d.column!==null?((o!==d.source||s!==d.line||a!==d.column||c!==d.name)&&r.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:n.line,column:n.column},name:d.name}),o=d.source,s=d.line,a=d.column,c=d.name,i=!0):i&&(r.addMapping({generated:{line:n.line,column:n.column}}),o=null,i=!1);for(var p=0,f=l.length;p<f;p++)l.charCodeAt(p)===eR?(n.line++,n.column=0,p+1===f?(o=null,i=!1):i&&r.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:n.line,column:n.column},name:d.name})):n.column++}),this.walkSourceContents(function(l,d){r.setSourceContent(l,d)}),{code:n.code,map:r}};kv.SourceNode=rt});var Pv=S(da=>{da.SourceMapGenerator=Yp().SourceMapGenerator;da.SourceMapConsumer=Cv().SourceMapConsumer;da.SourceNode=Ev().SourceNode});var Tv=S((fa,Av)=>{"use strict";fa.__esModule=!0;var nd=We(),Gn=void 0;try{(typeof define!="function"||!define.amd)&&(Iv=Pv(),Gn=Iv.SourceNode)}catch{}var Iv;Gn||(Gn=function(t,e,n,r){this.src="",r&&this.add(r)},Gn.prototype={add:function(e){nd.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){nd.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function td(t,e,n){if(nd.isArray(t)){for(var r=[],i=0,o=t.length;i<o;i++)r.push(e.wrap(t[i],n));return r}else if(typeof t=="boolean"||typeof t=="number")return t+"";return t}function Rv(t){this.srcFile=t,this.source=[]}Rv.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,n){this.source.unshift(this.wrap(e,n))},push:function(e,n){this.source.push(this.wrap(e,n))},merge:function(){var e=this.empty();return this.each(function(n){e.add([" ",n,`
169
- `])}),e},each:function(e){for(var n=0,r=this.source.length;n<r;n++)e(this.source[n])},empty:function(){var e=this.currentLocation||{start:{}};return new Gn(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var n=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof Gn?e:(e=td(e,this,n),new Gn(n.start.line,n.start.column,this.srcFile,e))},functionCall:function(e,n,r){return r=this.generateList(r),this.wrap([e,n?"."+n+"(":"(",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 n=this,r=[];Object.keys(e).forEach(function(o){var s=td(e[o],n);s!=="undefined"&&r.push([n.quotedString(o),":",s])});var i=this.generateList(r);return i.prepend("{"),i.add("}"),i},generateList:function(e){for(var n=this.empty(),r=0,i=e.length;r<i;r++)r&&n.add(","),n.add(td(e[r],this));return n},generateArray:function(e){var n=this.generateList(e);return n.prepend("["),n.add("]"),n}};fa.default=Rv;Av.exports=fa.default});var Lv=S((ha,Vv)=>{"use strict";ha.__esModule=!0;function Mv(t){return t&&t.__esModule?t:{default:t}}var Ov=Js(),tR=nt(),rd=Mv(tR),nR=We(),rR=Tv(),Nv=Mv(rR);function Vr(t){this.value=t}function Lr(){}Lr.prototype={nameLookup:function(e,n){return this.internalNameLookup(e,n)},depthedLookup:function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},compilerInfo:function(){var e=Ov.COMPILER_REVISION,n=Ov.REVISION_CHANGES[e];return[e,n]},appendToBuffer:function(e,n,r){return nR.isArray(e)||(e=[e]),e=this.source.wrap(e,n),this.environment.isSimple?["return ",e,";"]:r?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(e,n){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(n),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(e,n,r,i){this.environment=e,this.options=n,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,n),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var o=e.opcodes,s=void 0,a=void 0,c=void 0,l=void 0;for(c=0,l=o.length;c<l;c++)s=o[c],this.source.currentLocation=s.loc,a=a||s.loc,this[s.opcode].apply(this,s.args);if(this.source.currentLocation=a,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new rd.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(),`;
166
+ Expecting `+de.join(", ")+", got '"+(this.terminals_[R]||R)+"'":Y="Parse error on line "+(d+1)+": Unexpected "+(R==1?"end of input":"'"+(this.terminals_[R]||R)+"'"),this.parseError(Y,{text:this.lexer.match,token:this.terminals_[R]||R,line:this.lexer.yylineno,loc:w,expected:de})}}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+R);switch(U[0]){case 1:s.push(R),a.push(this.lexer.yytext),l.push(this.lexer.yylloc),s.push(U[1]),R=null,O?(R=O,O=null):(f=this.lexer.yyleng,p=this.lexer.yytext,d=this.lexer.yylineno,w=this.lexer.yylloc,m>0&&m--);break;case 2:if(_e=this.productions_[U[1]][1],xe.$=a[a.length-_e],xe._$={first_line:l[l.length-(_e||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(_e||1)].first_column,last_column:l[l.length-1].last_column},b&&(xe._$.range=[l[l.length-(_e||1)].range[0],l[l.length-1].range[1]]),ge=this.performAction.call(xe,p,f,d,this.yy,U[1],a,l),typeof ge<"u")return ge;_e&&(s=s.slice(0,-1*_e*2),a=a.slice(0,-1*_e),l=l.slice(0,-1*_e)),s.push(this.productions_[U[1]][0]),a.push(xe.$),l.push(xe._$),Ge=c[s[s.length-2]][s[s.length-1]],s.push(Ge);break;case 3:return!0}}return!0}},e=(function(){var r={EOF:1,parseError:function(o,s){if(this.yy.parser)this.yy.parser.parseError(o,s);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 s=o.match(/(?:\r\n?|\n).*/g);return s?(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 s=o.length,a=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s-1),this.offset-=s;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var c=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===l.length?this.yylloc.first_column:0)+l[l.length-a.length].length-a[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[c[0],c[0]+this.yyleng-s]),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(),s=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
167
+ `+s+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,s,a,l,c,p;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),f=0;f<d.length&&(a=this._input.match(this.rules[d[f]]),!(a&&(!s||a[0].length>s[0].length)&&(s=a,l=f,!this.options.flex)));f++);return s?(p=s[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,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(s[0].length),this.matched+=s[0],o=this.performAction.call(this,this.yy,this,d[l],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.
168
+ `+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,s,a,l){function c(d,f){return s.yytext=s.yytext.substring(d,s.yyleng-f+d)}var p=l;switch(a){case 0:if(s.yytext.slice(-2)==="\\\\"?(c(0,1),this.begin("mu")):s.yytext.slice(-1)==="\\"?(c(0,1),this.begin("emu")):this.begin("mu"),s.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(s.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 s.yytext=c(1,2).replace(/\\"/g,'"'),80;break;case 32:return s.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 s.yytext=s.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})();t.lexer=e;function n(){this.yy={}}return n.prototype=t,t.Parser=n,new n})();oa.default=uI;Qw.exports=oa.default});var la=S((ca,nv)=>{"use strict";ca.__esModule=!0;function pI(t){return t&&t.__esModule?t:{default:t}}var dI=it(),Bp=pI(dI);function sa(){this.parents=[]}sa.prototype={constructor:sa,mutating:!1,acceptKey:function(e,n){var r=this.accept(e[n]);if(this.mutating){if(r&&!sa.prototype[r.type])throw new Bp.default('Unexpected node type "'+r.type+'" found when accepting '+n+" on "+e.type);e[n]=r}},acceptRequired:function(e,n){if(this.acceptKey(e,n),!e[n])throw new Bp.default(e.type+" requires "+n)},acceptArray:function(e){for(var n=0,r=e.length;n<r;n++)this.acceptKey(e,n),e[n]||(e.splice(n,1),n--,r--)},accept:function(e){if(e){if(!this[e.type])throw new Bp.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var n=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||n)return n;if(n!==!1)return e}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:aa,Decorator:aa,BlockStatement:ev,DecoratorBlock:ev,PartialStatement:tv,PartialBlockStatement:function(e){tv.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:aa,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 aa(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function ev(t){aa.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function tv(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}ca.default=sa;nv.exports=ca.default});var iv=S((ua,rv)=>{"use strict";ua.__esModule=!0;function fI(t){return t&&t.__esModule?t:{default:t}}var hI=la(),mI=fI(hI);function jt(){var t=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=t}jt.prototype=new mI.default;jt.prototype.Program=function(t){var e=!this.options.ignoreStandalone,n=!this.isRootSeen;this.isRootSeen=!0;for(var r=t.body,i=0,o=r.length;i<o;i++){var s=r[i],a=this.accept(s);if(a){var l=Hp(r,i,n),c=Wp(r,i,n),p=a.openStandalone&&l,d=a.closeStandalone&&c,f=a.inlineStandalone&&l&&c;a.close&&Gn(r,i,!0),a.open&&xn(r,i,!0),e&&f&&(Gn(r,i),xn(r,i)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(r[i-1].original)[1])),e&&p&&(Gn((s.program||s.inverse).body),xn(r,i)),e&&d&&(Gn(r,i),xn((s.inverse||s.program).body))}}return t};jt.prototype.BlockStatement=jt.prototype.DecoratorBlock=jt.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,n=t.program&&t.inverse,r=n,i=n;if(n&&n.chained)for(r=n.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var o={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:Wp(e.body),closeStandalone:Hp((r||e).body)};if(t.openStrip.close&&Gn(e.body,null,!0),n){var s=t.inverseStrip;s.open&&xn(e.body,null,!0),s.close&&Gn(r.body,null,!0),t.closeStrip.open&&xn(i.body,null,!0),!this.options.ignoreStandalone&&Hp(e.body)&&Wp(r.body)&&(xn(e.body),Gn(r.body))}else t.closeStrip.open&&xn(e.body,null,!0);return o};jt.prototype.Decorator=jt.prototype.MustacheStatement=function(t){return t.strip};jt.prototype.PartialStatement=jt.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function Hp(t,e,n){e===void 0&&(e=t.length);var r=t[e-1],i=t[e-2];if(!r)return n;if(r.type==="ContentStatement")return(i||!n?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(r.original)}function Wp(t,e,n){e===void 0&&(e=-1);var r=t[e+1],i=t[e+2];if(!r)return n;if(r.type==="ContentStatement")return(i||!n?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(r.original)}function Gn(t,e,n){var r=t[e==null?0:e+1];if(!(!r||r.type!=="ContentStatement"||!n&&r.rightStripped)){var i=r.value;r.value=r.value.replace(n?/^\s+/:/^[ \t]*\r?\n?/,""),r.rightStripped=r.value!==i}}function xn(t,e,n){var r=t[e==null?t.length-1:e-1];if(!(!r||r.type!=="ContentStatement"||!n&&r.leftStripped)){var i=r.value;return r.value=r.value.replace(n?/\s+$/:/[ \t]+$/,""),r.leftStripped=r.value!==i,r.leftStripped}}ua.default=jt;rv.exports=ua.default});var ov=S(wt=>{"use strict";wt.__esModule=!0;wt.SourceLocation=wI;wt.id=vI;wt.stripFlags=bI;wt.stripComment=_I;wt.preparePath=xI;wt.prepareMustache=$I;wt.prepareRawBlock=SI;wt.prepareBlock=CI;wt.prepareProgram=kI;wt.preparePartialBlock=EI;function gI(t){return t&&t.__esModule?t:{default:t}}var yI=it(),Up=gI(yI);function zp(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var n={loc:t.path.loc};throw new Up.default(t.path.original+" doesn't match "+e,n)}}function wI(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 vI(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function bI(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function _I(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function xI(t,e,n){n=this.locInfo(n);for(var r=t?"@":"",i=[],o=0,s=0,a=e.length;s<a;s++){var l=e[s].part,c=e[s].original!==l;if(r+=(e[s].separator||"")+l,!c&&(l===".."||l==="."||l==="this")){if(i.length>0)throw new Up.default("Invalid path: "+r,{loc:n});l===".."&&o++}else i.push(l)}return{type:"PathExpression",data:t,depth:o,parts:i,original:r,loc:n}}function $I(t,e,n,r,i,o){var s=r.charAt(3)||r.charAt(2),a=s!=="{"&&s!=="&",l=/\*/.test(r);return{type:l?"Decorator":"MustacheStatement",path:t,params:e,hash:n,escaped:a,strip:i,loc:this.locInfo(o)}}function SI(t,e,n,r){zp(t,n),r=this.locInfo(r);var i={type:"Program",body:e,strip:{},loc:r};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:r}}function CI(t,e,n,r,i,o){r&&r.path&&zp(t,r);var s=/\*/.test(t.open);e.blockParams=t.blockParams;var a=void 0,l=void 0;if(n){if(s)throw new Up.default("Unexpected inverse block on decorator",n);n.chain&&(n.program.body[0].closeStrip=r.strip),l=n.strip,a=n.program}return i&&(i=a,a=e,e=i),{type:s?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:a,openStrip:t.strip,inverseStrip:l,closeStrip:r&&r.strip,loc:this.locInfo(o)}}function kI(t,e){if(!e&&t.length){var n=t[0].loc,r=t[t.length-1].loc;n&&r&&(e={source:n.source,start:{line:n.start.line,column:n.start.column},end:{line:r.end.line,column:r.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function EI(t,e,n,r){return zp(t,n),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:n&&n.strip,loc:this.locInfo(r)}}});var av=S(so=>{"use strict";so.__esModule=!0;so.parseWithoutProcessing=sv;so.parse=VI;function PI(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function Kp(t){return t&&t.__esModule?t:{default:t}}var II=Zw(),Gp=Kp(II),RI=iv(),AI=Kp(RI),TI=ov(),OI=PI(TI),NI=it(),oo=Kp(NI),MI=We();so.parser=Gp.default;var pa={};MI.extend(pa,OI);function sv(t,e){if(t.type==="Program")return LI(t),t;Gp.default.yy=pa,pa.locInfo=function(r){return new pa.SourceLocation(e&&e.srcName,r)};var n=Gp.default.parse(t);return n}function VI(t,e){var n=sv(t,e),r=new AI.default(e);return r.accept(n)}function LI(t){Jp(t)}function Jp(t){if(t!=null){if(Array.isArray(t)){t.forEach(Jp);return}if(typeof t=="object"){if(t.type==="PathExpression"){if(!jI(t.depth))throw new oo.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(t.parts))throw new oo.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 oo.default("Invalid AST: PathExpression.parts must only contain strings")}else if(t.type==="NumberLiteral"){if(typeof t.value!="number"||!isFinite(t.value))throw new oo.default("Invalid AST: NumberLiteral.value must be a number")}else if(t.type==="BooleanLiteral"&&typeof t.value!="boolean")throw new oo.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(t).forEach(function(n){n!=="loc"&&Jp(t[n])})}}}function jI(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0}});var pv=S(uo=>{"use strict";uo.__esModule=!0;uo.Compiler=Yp;uo.precompile=BI;uo.compile=HI;function lv(t){return t&&t.__esModule?t:{default:t}}var DI=it(),co=lv(DI),lo=We(),FI=qp(),ao=lv(FI),qI=[].slice;function Yp(){}Yp.prototype={compiler:Yp,equals:function(e){var n=this.opcodes.length;if(e.opcodes.length!==n)return!1;for(var r=0;r<n;r++){var i=this.opcodes[r],o=e.opcodes[r];if(i.opcode!==o.opcode||!uv(i.args,o.args))return!1}n=this.children.length;for(var r=0;r<n;r++)if(!this.children[r].equals(e.children[r]))return!1;return!0},guid:0,compile:function(e,n){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=n,this.stringParams=n.stringParams,this.trackIds=n.trackIds,n.blockParams=n.blockParams||[],n.knownHelpers=lo.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},n.knownHelpers),this.accept(e)},compileProgram:function(e){var n=new this.compiler,r=n.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 co.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var n=this[e.type](e);return this.sourceNode.shift(),n},Program:function(e){this.options.blockParams.unshift(e.blockParams);for(var n=e.body,r=n.length,i=0;i<r;i++)this.accept(n[i]);return this.options.blockParams.shift(),this.isSimple=r===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){cv(e);var n=e.program,r=e.inverse;n=n&&this.compileProgram(n),r=r&&this.compileProgram(r);var i=this.classifySexpr(e);i==="helper"?this.helperSexpr(e,n,r):i==="simple"?(this.simpleSexpr(e),this.opcode("pushProgram",n),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,n,r),this.opcode("pushProgram",n),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(e){var n=e.program&&this.compileProgram(e.program),r=this.setupFullMustacheParams(e,n,void 0),i=e.path;this.useDecorators=!0,this.opcode("registerDecorator",r.length,i.original)},PartialStatement:function(e){this.usePartial=!0;var n=e.program;n&&(n=this.compileProgram(e.program));var r=e.params;if(r.length>1)throw new co.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,n,void 0,!0);var s=e.indent||"";this.options.preventIndent&&s&&(this.opcode("appendContent",s),s=""),this.opcode("invokePartial",o,i,s),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){cv(e);var n=this.classifySexpr(e);n==="simple"?this.simpleSexpr(e):n==="helper"?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,n,r){var i=e.path,o=i.parts[0],s=n!=null||r!=null;this.opcode("getContext",i.depth),this.opcode("pushProgram",n),this.opcode("pushProgram",r),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",o,s)},simpleSexpr:function(e){var n=e.path;n.strict=!0,this.accept(n),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,n,r){var i=this.setupFullMustacheParams(e,n,r),o=e.path,s=o.parts[0];if(this.options.knownHelpers[s])this.opcode("invokeKnownHelper",i.length,s);else{if(this.options.knownHelpersOnly)throw new co.default("You specified knownHelpersOnly, but used the unknown helper "+s,e);o.strict=!0,o.falsy=!0,this.accept(o),this.opcode("invokeHelper",i.length,o.original,ao.default.helpers.simpleId(o))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var n=e.parts[0],r=ao.default.helpers.scopedId(e),i=!e.depth&&!r&&this.blockParamIndex(n);i?this.opcode("lookupBlockParam",i,e.parts):n?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 n=e.pairs,r=0,i=n.length;for(this.opcode("pushHash");r<i;r++)this.pushParam(n[r].value);for(;r--;)this.opcode("assignToHash",n[r].key);this.opcode("popHash")},opcode:function(e){this.opcodes.push({opcode:e,args:qI.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var n=ao.default.helpers.simpleId(e.path),r=n&&!!this.blockParamIndex(e.path.parts[0]),i=!r&&ao.default.helpers.helperExpression(e),o=!r&&(i||n);if(o&&!i){var s=e.path.parts[0],a=this.options;a.knownHelpers[s]?i=!0:a.knownHelpersOnly&&(o=!1)}return i?"helper":o?"ambiguous":"simple"},pushParams:function(e){for(var n=0,r=e.length;n<r;n++)this.pushParam(e[n])},pushParam:function(e){var n=e.value!=null?e.value:e.original||"";if(this.stringParams)n.replace&&(n=n.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",n,e.type),e.type==="SubExpression"&&this.accept(e);else{if(this.trackIds){var r=void 0;if(e.parts&&!ao.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 n=e.original||n,n.replace&&(n=n.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",e.type,n)}this.accept(e)}},setupFullMustacheParams:function(e,n,r,i){var o=e.params;return this.pushParams(o),this.opcode("pushProgram",n),this.opcode("pushProgram",r),e.hash?this.accept(e.hash):this.opcode("emptyHash",i),o},blockParamIndex:function(e){for(var n=0,r=this.options.blockParams.length;n<r;n++){var i=this.options.blockParams[n],o=i&&lo.indexOf(i,e);if(i&&o>=0)return[n,o]}}};function BI(t,e,n){if(t==null||typeof t!="string"&&t.type!=="Program")throw new co.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 r=n.parse(t,e),i=new n.Compiler().compile(r,e);return new n.JavaScriptCompiler().compile(i,e)}function HI(t,e,n){if(e===void 0&&(e={}),t==null||typeof t!="string"&&t.type!=="Program")throw new co.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=lo.extend({},e),"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var r=void 0;function i(){var s=n.parse(t,e),a=new n.Compiler().compile(s,e),l=new n.JavaScriptCompiler().compile(a,e,void 0,!0);return n.template(l)}function o(s,a){return r||(r=i()),r.call(this,s,a)}return o._setup=function(s){return r||(r=i()),r._setup(s)},o._child=function(s,a,l,c){return r||(r=i()),r._child(s,a,l,c)},o}function uv(t,e){if(t===e)return!0;if(lo.isArray(t)&&lo.isArray(e)&&t.length===e.length){for(var n=0;n<t.length;n++)if(!uv(t[n],e[n]))return!1;return!0}}function cv(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 fv=S(Xp=>{var dv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Xp.encode=function(t){if(0<=t&&t<dv.length)return dv[t];throw new TypeError("Must be between 0 and 63: "+t)};Xp.decode=function(t){var e=65,n=90,r=97,i=122,o=48,s=57,a=43,l=47,c=26,p=52;return e<=t&&t<=n?t-e:r<=t&&t<=i?t-r+c:o<=t&&t<=s?t-o+p:t==a?62:t==l?63:-1}});var ed=S(Zp=>{var hv=fv(),Qp=5,mv=1<<Qp,gv=mv-1,yv=mv;function WI(t){return t<0?(-t<<1)+1:(t<<1)+0}function UI(t){var e=(t&1)===1,n=t>>1;return e?-n:n}Zp.encode=function(e){var n="",r,i=WI(e);do r=i&gv,i>>>=Qp,i>0&&(r|=yv),n+=hv.encode(r);while(i>0);return n};Zp.decode=function(e,n,r){var i=e.length,o=0,s=0,a,l;do{if(n>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(l=hv.decode(e.charCodeAt(n++)),l===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));a=!!(l&yv),l&=gv,o=o+(l<<s),s+=Qp}while(a);r.value=UI(o),r.rest=n}});var Vr=S(Fe=>{function zI(t,e,n){if(e in t)return t[e];if(arguments.length===3)return n;throw new Error('"'+e+'" is a required argument.')}Fe.getArg=zI;var wv=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,GI=/^data:.+\,.+$/;function po(t){var e=t.match(wv);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Fe.urlParse=po;function Nr(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}Fe.urlGenerate=Nr;function td(t){var e=t,n=po(t);if(n){if(!n.path)return t;e=n.path}for(var r=Fe.isAbsolute(e),i=e.split(/\/+/),o,s=0,a=i.length-1;a>=0;a--)o=i[a],o==="."?i.splice(a,1):o===".."?s++:s>0&&(o===""?(i.splice(a+1,s),s=0):(i.splice(a,2),s--));return e=i.join("/"),e===""&&(e=r?"/":"."),n?(n.path=e,Nr(n)):e}Fe.normalize=td;function vv(t,e){t===""&&(t="."),e===""&&(e=".");var n=po(e),r=po(t);if(r&&(t=r.path||"/"),n&&!n.scheme)return r&&(n.scheme=r.scheme),Nr(n);if(n||e.match(GI))return e;if(r&&!r.host&&!r.path)return r.host=e,Nr(r);var i=e.charAt(0)==="/"?e:td(t.replace(/\/+$/,"")+"/"+e);return r?(r.path=i,Nr(r)):i}Fe.join=vv;Fe.isAbsolute=function(t){return t.charAt(0)==="/"||wv.test(t)};function JI(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var n=0;e.indexOf(t+"/")!==0;){var r=t.lastIndexOf("/");if(r<0||(t=t.slice(0,r),t.match(/^([^\/]+:\/)?\/*$/)))return e;++n}return Array(n+1).join("../")+e.substr(t.length+1)}Fe.relative=JI;var bv=(function(){var t=Object.create(null);return!("__proto__"in t)})();function _v(t){return t}function KI(t){return xv(t)?"$"+t:t}Fe.toSetString=bv?_v:KI;function YI(t){return xv(t)?t.slice(1):t}Fe.fromSetString=bv?_v:YI;function xv(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 n=e-10;n>=0;n--)if(t.charCodeAt(n)!==36)return!1;return!0}function XI(t,e,n){var r=Mr(t.source,e.source);return r!==0||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0||n)||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=t.generatedLine-e.generatedLine,r!==0)?r:Mr(t.name,e.name)}Fe.compareByOriginalPositions=XI;function QI(t,e,n){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0||n)||(r=Mr(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:Mr(t.name,e.name)}Fe.compareByGeneratedPositionsDeflated=QI;function Mr(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function ZI(t,e){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=Mr(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:Mr(t.name,e.name)}Fe.compareByGeneratedPositionsInflated=ZI;function eR(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Fe.parseSourceMapInput=eR;function tR(t,e,n){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),n){var r=po(n);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=vv(Nr(r),e)}return td(e)}Fe.computeSourceURL=tR});var id=S($v=>{var nd=Vr(),rd=Object.prototype.hasOwnProperty,Jn=typeof Map<"u";function Yt(){this._array=[],this._set=Jn?new Map:Object.create(null)}Yt.fromArray=function(e,n){for(var r=new Yt,i=0,o=e.length;i<o;i++)r.add(e[i],n);return r};Yt.prototype.size=function(){return Jn?this._set.size:Object.getOwnPropertyNames(this._set).length};Yt.prototype.add=function(e,n){var r=Jn?e:nd.toSetString(e),i=Jn?this.has(e):rd.call(this._set,r),o=this._array.length;(!i||n)&&this._array.push(e),i||(Jn?this._set.set(e,o):this._set[r]=o)};Yt.prototype.has=function(e){if(Jn)return this._set.has(e);var n=nd.toSetString(e);return rd.call(this._set,n)};Yt.prototype.indexOf=function(e){if(Jn){var n=this._set.get(e);if(n>=0)return n}else{var r=nd.toSetString(e);if(rd.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')};Yt.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Yt.prototype.toArray=function(){return this._array.slice()};$v.ArraySet=Yt});var kv=S(Cv=>{var Sv=Vr();function nR(t,e){var n=t.generatedLine,r=e.generatedLine,i=t.generatedColumn,o=e.generatedColumn;return r>n||r==n&&o>=i||Sv.compareByGeneratedPositionsInflated(t,e)<=0}function da(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}da.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)};da.prototype.add=function(e){nR(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};da.prototype.toArray=function(){return this._sorted||(this._array.sort(Sv.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Cv.MappingList=da});var od=S(Ev=>{var fo=ed(),Pe=Vr(),fa=id().ArraySet,rR=kv().MappingList;function vt(t){t||(t={}),this._file=Pe.getArg(t,"file",null),this._sourceRoot=Pe.getArg(t,"sourceRoot",null),this._skipValidation=Pe.getArg(t,"skipValidation",!1),this._sources=new fa,this._names=new fa,this._mappings=new rR,this._sourcesContents=null}vt.prototype._version=3;vt.fromSourceMap=function(e){var n=e.sourceRoot,r=new vt({file:e.file,sourceRoot:n});return e.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,n!=null&&(o.source=Pe.relative(n,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;n!==null&&(o=Pe.relative(n,i)),r._sources.has(o)||r._sources.add(o);var s=e.sourceContentFor(i);s!=null&&r.setSourceContent(i,s)}),r};vt.prototype.addMapping=function(e){var n=Pe.getArg(e,"generated"),r=Pe.getArg(e,"original",null),i=Pe.getArg(e,"source",null),o=Pe.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,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:n.line,generatedColumn:n.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:i,name:o})};vt.prototype.setSourceContent=function(e,n){var r=e;this._sourceRoot!=null&&(r=Pe.relative(this._sourceRoot,r)),n!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Pe.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[Pe.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};vt.prototype.applySourceMap=function(e,n,r){var i=n;if(n==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=Pe.relative(o,i));var s=new fa,a=new fa;this._mappings.unsortedForEach(function(l){if(l.source===i&&l.originalLine!=null){var c=e.originalPositionFor({line:l.originalLine,column:l.originalColumn});c.source!=null&&(l.source=c.source,r!=null&&(l.source=Pe.join(r,l.source)),o!=null&&(l.source=Pe.relative(o,l.source)),l.originalLine=c.line,l.originalColumn=c.column,c.name!=null&&(l.name=c.name))}var p=l.source;p!=null&&!s.has(p)&&s.add(p);var d=l.name;d!=null&&!a.has(d)&&a.add(d)},this),this._sources=s,this._names=a,e.sources.forEach(function(l){var c=e.sourceContentFor(l);c!=null&&(r!=null&&(l=Pe.join(r,l)),o!=null&&(l=Pe.relative(o,l)),this.setSourceContent(l,c))},this)};vt.prototype._validateMapping=function(e,n,r,i){if(n&&typeof n.line!="number"&&typeof n.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&&!n&&!r&&!i)){if(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:i}))}};vt.prototype._serializeMappings=function(){for(var e=0,n=1,r=0,i=0,o=0,s=0,a="",l,c,p,d,f=this._mappings.toArray(),m=0,y=f.length;m<y;m++){if(c=f[m],l="",c.generatedLine!==n)for(e=0;c.generatedLine!==n;)l+=";",n++;else if(m>0){if(!Pe.compareByGeneratedPositionsInflated(c,f[m-1]))continue;l+=","}l+=fo.encode(c.generatedColumn-e),e=c.generatedColumn,c.source!=null&&(d=this._sources.indexOf(c.source),l+=fo.encode(d-s),s=d,l+=fo.encode(c.originalLine-1-i),i=c.originalLine-1,l+=fo.encode(c.originalColumn-r),r=c.originalColumn,c.name!=null&&(p=this._names.indexOf(c.name),l+=fo.encode(p-o),o=p)),a+=l}return a};vt.prototype._generateSourcesContent=function(e,n){return e.map(function(r){if(!this._sourcesContents)return null;n!=null&&(r=Pe.relative(n,r));var i=Pe.toSetString(r);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};vt.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};vt.prototype.toString=function(){return JSON.stringify(this.toJSON())};Ev.SourceMapGenerator=vt});var Pv=S(Kn=>{Kn.GREATEST_LOWER_BOUND=1;Kn.LEAST_UPPER_BOUND=2;function sd(t,e,n,r,i,o){var s=Math.floor((e-t)/2)+t,a=i(n,r[s],!0);return a===0?s:a>0?e-s>1?sd(s,e,n,r,i,o):o==Kn.LEAST_UPPER_BOUND?e<r.length?e:-1:s:s-t>1?sd(t,s,n,r,i,o):o==Kn.LEAST_UPPER_BOUND?s:t<0?-1:t}Kn.search=function(e,n,r,i){if(n.length===0)return-1;var o=sd(-1,n.length,e,n,r,i||Kn.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&r(n[o],n[o-1],!0)===0;)--o;return o}});var Rv=S(Iv=>{function ad(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function iR(t,e){return Math.round(t+Math.random()*(e-t))}function cd(t,e,n,r){if(n<r){var i=iR(n,r),o=n-1;ad(t,i,r);for(var s=t[r],a=n;a<r;a++)e(t[a],s)<=0&&(o+=1,ad(t,o,a));ad(t,o+1,a);var l=o+1;cd(t,e,n,l-1),cd(t,e,l+1,r)}}Iv.quickSort=function(t,e){cd(t,e,0,t.length-1)}});var Tv=S(ha=>{var B=Vr(),ld=Pv(),Lr=id().ArraySet,oR=ed(),ho=Rv().quickSort;function be(t,e){var n=t;return typeof t=="string"&&(n=B.parseSourceMapInput(t)),n.sections!=null?new Pt(n,e):new Oe(n,e)}be.fromSourceMap=function(t,e){return Oe.fromSourceMap(t,e)};be.prototype._version=3;be.prototype.__generatedMappings=null;Object.defineProperty(be.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});be.prototype.__originalMappings=null;Object.defineProperty(be.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});be.prototype._charIsMappingSeparator=function(e,n){var r=e.charAt(n);return r===";"||r===","};be.prototype._parseMappings=function(e,n){throw new Error("Subclasses must implement _parseMappings")};be.GENERATED_ORDER=1;be.ORIGINAL_ORDER=2;be.GREATEST_LOWER_BOUND=1;be.LEAST_UPPER_BOUND=2;be.prototype.eachMapping=function(e,n,r){var i=n||null,o=r||be.GENERATED_ORDER,s;switch(o){case be.GENERATED_ORDER:s=this._generatedMappings;break;case be.ORIGINAL_ORDER:s=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;s.map(function(l){var c=l.source===null?null:this._sources.at(l.source);return c=B.computeSourceURL(a,c,this._sourceMapURL),{source:c,generatedLine:l.generatedLine,generatedColumn:l.generatedColumn,originalLine:l.originalLine,originalColumn:l.originalColumn,name:l.name===null?null:this._names.at(l.name)}},this).forEach(e,i)};be.prototype.allGeneratedPositionsFor=function(e){var n=B.getArg(e,"line"),r={source:B.getArg(e,"source"),originalLine:n,originalColumn:B.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",B.compareByOriginalPositions,ld.LEAST_UPPER_BOUND);if(o>=0){var s=this._originalMappings[o];if(e.column===void 0)for(var a=s.originalLine;s&&s.originalLine===a;)i.push({line:B.getArg(s,"generatedLine",null),column:B.getArg(s,"generatedColumn",null),lastColumn:B.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o];else for(var l=s.originalColumn;s&&s.originalLine===n&&s.originalColumn==l;)i.push({line:B.getArg(s,"generatedLine",null),column:B.getArg(s,"generatedColumn",null),lastColumn:B.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o]}return i};ha.SourceMapConsumer=be;function Oe(t,e){var n=t;typeof t=="string"&&(n=B.parseSourceMapInput(t));var r=B.getArg(n,"version"),i=B.getArg(n,"sources"),o=B.getArg(n,"names",[]),s=B.getArg(n,"sourceRoot",null),a=B.getArg(n,"sourcesContent",null),l=B.getArg(n,"mappings"),c=B.getArg(n,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);s&&(s=B.normalize(s)),i=i.map(String).map(B.normalize).map(function(p){return s&&B.isAbsolute(s)&&B.isAbsolute(p)?B.relative(s,p):p}),this._names=Lr.fromArray(o.map(String),!0),this._sources=Lr.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(p){return B.computeSourceURL(s,p,e)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=l,this._sourceMapURL=e,this.file=c}Oe.prototype=Object.create(be.prototype);Oe.prototype.consumer=be;Oe.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=B.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var n;for(n=0;n<this._absoluteSources.length;++n)if(this._absoluteSources[n]==t)return n;return-1};Oe.fromSourceMap=function(e,n){var r=Object.create(Oe.prototype),i=r._names=Lr.fromArray(e._names.toArray(),!0),o=r._sources=Lr.fromArray(e._sources.toArray(),!0);r.sourceRoot=e._sourceRoot,r.sourcesContent=e._generateSourcesContent(r._sources.toArray(),r.sourceRoot),r.file=e._file,r._sourceMapURL=n,r._absoluteSources=r._sources.toArray().map(function(m){return B.computeSourceURL(r.sourceRoot,m,n)});for(var s=e._mappings.toArray().slice(),a=r.__generatedMappings=[],l=r.__originalMappings=[],c=0,p=s.length;c<p;c++){var d=s[c],f=new Av;f.generatedLine=d.generatedLine,f.generatedColumn=d.generatedColumn,d.source&&(f.source=o.indexOf(d.source),f.originalLine=d.originalLine,f.originalColumn=d.originalColumn,d.name&&(f.name=i.indexOf(d.name)),l.push(f)),a.push(f)}return ho(r.__originalMappings,B.compareByOriginalPositions),r};Oe.prototype._version=3;Object.defineProperty(Oe.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Av(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Oe.prototype._parseMappings=function(e,n){for(var r=1,i=0,o=0,s=0,a=0,l=0,c=e.length,p=0,d={},f={},m=[],y=[],g,w,b,P,x;p<c;)if(e.charAt(p)===";")r++,p++,i=0;else if(e.charAt(p)===",")p++;else{for(g=new Av,g.generatedLine=r,P=p;P<c&&!this._charIsMappingSeparator(e,P);P++);if(w=e.slice(p,P),b=d[w],b)p+=w.length;else{for(b=[];p<P;)oR.decode(e,p,f),x=f.value,p=f.rest,b.push(x);if(b.length===2)throw new Error("Found a source, but no line and column");if(b.length===3)throw new Error("Found a source and line, but no column");d[w]=b}g.generatedColumn=i+b[0],i=g.generatedColumn,b.length>1&&(g.source=a+b[1],a+=b[1],g.originalLine=o+b[2],o=g.originalLine,g.originalLine+=1,g.originalColumn=s+b[3],s=g.originalColumn,b.length>4&&(g.name=l+b[4],l+=b[4])),y.push(g),typeof g.originalLine=="number"&&m.push(g)}ho(y,B.compareByGeneratedPositionsDeflated),this.__generatedMappings=y,ho(m,B.compareByOriginalPositions),this.__originalMappings=m};Oe.prototype._findMapping=function(e,n,r,i,o,s){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 ld.search(e,n,o,s)};Oe.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var n=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(n.generatedLine===r.generatedLine){n.lastGeneratedColumn=r.generatedColumn-1;continue}}n.lastGeneratedColumn=1/0}};Oe.prototype.originalPositionFor=function(e){var n={generatedLine:B.getArg(e,"line"),generatedColumn:B.getArg(e,"column")},r=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",B.compareByGeneratedPositionsDeflated,B.getArg(e,"bias",be.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===n.generatedLine){var o=B.getArg(i,"source",null);o!==null&&(o=this._sources.at(o),o=B.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var s=B.getArg(i,"name",null);return s!==null&&(s=this._names.at(s)),{source:o,line:B.getArg(i,"originalLine",null),column:B.getArg(i,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}};Oe.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};Oe.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var i=e;this.sourceRoot!=null&&(i=B.relative(this.sourceRoot,i));var o;if(this.sourceRoot!=null&&(o=B.urlParse(this.sourceRoot))){var s=i.replace(/^file:\/\//,"");if(o.scheme=="file"&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!o.path||o.path=="/")&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(n)return null;throw new Error('"'+i+'" is not in the SourceMap.')};Oe.prototype.generatedPositionFor=function(e){var n=B.getArg(e,"source");if(n=this._findSourceIndex(n),n<0)return{line:null,column:null,lastColumn:null};var r={source:n,originalLine:B.getArg(e,"line"),originalColumn:B.getArg(e,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",B.compareByOriginalPositions,B.getArg(e,"bias",be.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===r.source)return{line:B.getArg(o,"generatedLine",null),column:B.getArg(o,"generatedColumn",null),lastColumn:B.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};ha.BasicSourceMapConsumer=Oe;function Pt(t,e){var n=t;typeof t=="string"&&(n=B.parseSourceMapInput(t));var r=B.getArg(n,"version"),i=B.getArg(n,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new Lr,this._names=new Lr;var o={line:-1,column:0};this._sections=i.map(function(s){if(s.url)throw new Error("Support for url field in sections not implemented.");var a=B.getArg(s,"offset"),l=B.getArg(a,"line"),c=B.getArg(a,"column");if(l<o.line||l===o.line&&c<o.column)throw new Error("Section offsets must be ordered and non-overlapping.");return o=a,{generatedOffset:{generatedLine:l+1,generatedColumn:c+1},consumer:new be(B.getArg(s,"map"),e)}})}Pt.prototype=Object.create(be.prototype);Pt.prototype.constructor=be;Pt.prototype._version=3;Object.defineProperty(Pt.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var n=0;n<this._sections[e].consumer.sources.length;n++)t.push(this._sections[e].consumer.sources[n]);return t}});Pt.prototype.originalPositionFor=function(e){var n={generatedLine:B.getArg(e,"line"),generatedColumn:B.getArg(e,"column")},r=ld.search(n,this._sections,function(o,s){var a=o.generatedLine-s.generatedOffset.generatedLine;return a||o.generatedColumn-s.generatedOffset.generatedColumn}),i=this._sections[r];return i?i.consumer.originalPositionFor({line:n.generatedLine-(i.generatedOffset.generatedLine-1),column:n.generatedColumn-(i.generatedOffset.generatedLine===n.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};Pt.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};Pt.prototype.sourceContentFor=function(e,n){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(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')};Pt.prototype.generatedPositionFor=function(e){for(var n=0;n<this._sections.length;n++){var r=this._sections[n];if(r.consumer._findSourceIndex(B.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}};Pt.prototype._parseMappings=function(e,n){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var i=this._sections[r],o=i.consumer._generatedMappings,s=0;s<o.length;s++){var a=o[s],l=i.consumer._sources.at(a.source);l=B.computeSourceURL(i.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var c=null;a.name&&(c=i.consumer._names.at(a.name),this._names.add(c),c=this._names.indexOf(c));var p={source:l,generatedLine:a.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(i.generatedOffset.generatedLine===a.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:c};this.__generatedMappings.push(p),typeof p.originalLine=="number"&&this.__originalMappings.push(p)}ho(this.__generatedMappings,B.compareByGeneratedPositionsDeflated),ho(this.__originalMappings,B.compareByOriginalPositions)};ha.IndexedSourceMapConsumer=Pt});var Nv=S(Ov=>{var sR=od().SourceMapGenerator,ma=Vr(),aR=/(\r?\n)/,cR=10,jr="$$$isSourceNode$$$";function ot(t,e,n,r,i){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=n??null,this.name=i??null,this[jr]=!0,r!=null&&this.add(r)}ot.fromStringWithSourceMap=function(e,n,r){var i=new ot,o=e.split(aR),s=0,a=function(){var f=y(),m=y()||"";return f+m;function y(){return s<o.length?o[s++]:void 0}},l=1,c=0,p=null;return n.eachMapping(function(f){if(p!==null)if(l<f.generatedLine)d(p,a()),l++,c=0;else{var m=o[s]||"",y=m.substr(0,f.generatedColumn-c);o[s]=m.substr(f.generatedColumn-c),c=f.generatedColumn,d(p,y),p=f;return}for(;l<f.generatedLine;)i.add(a()),l++;if(c<f.generatedColumn){var m=o[s]||"";i.add(m.substr(0,f.generatedColumn)),o[s]=m.substr(f.generatedColumn),c=f.generatedColumn}p=f},this),s<o.length&&(p&&d(p,a()),i.add(o.splice(s).join(""))),n.sources.forEach(function(f){var m=n.sourceContentFor(f);m!=null&&(r!=null&&(f=ma.join(r,f)),i.setSourceContent(f,m))}),i;function d(f,m){if(f===null||f.source===void 0)i.add(m);else{var y=r?ma.join(r,f.source):f.source;i.add(new ot(f.originalLine,f.originalColumn,y,m,f.name))}}};ot.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(n){this.add(n)},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};ot.prototype.prepend=function(e){if(Array.isArray(e))for(var n=e.length-1;n>=0;n--)this.prepend(e[n]);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};ot.prototype.walk=function(e){for(var n,r=0,i=this.children.length;r<i;r++)n=this.children[r],n[jr]?n.walk(e):n!==""&&e(n,{source:this.source,line:this.line,column:this.column,name:this.name})};ot.prototype.join=function(e){var n,r,i=this.children.length;if(i>0){for(n=[],r=0;r<i-1;r++)n.push(this.children[r]),n.push(e);n.push(this.children[r]),this.children=n}return this};ot.prototype.replaceRight=function(e,n){var r=this.children[this.children.length-1];return r[jr]?r.replaceRight(e,n):typeof r=="string"?this.children[this.children.length-1]=r.replace(e,n):this.children.push("".replace(e,n)),this};ot.prototype.setSourceContent=function(e,n){this.sourceContents[ma.toSetString(e)]=n};ot.prototype.walkSourceContents=function(e){for(var n=0,r=this.children.length;n<r;n++)this.children[n][jr]&&this.children[n].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),n=0,r=i.length;n<r;n++)e(ma.fromSetString(i[n]),this.sourceContents[i[n]])};ot.prototype.toString=function(){var e="";return this.walk(function(n){e+=n}),e};ot.prototype.toStringWithSourceMap=function(e){var n={code:"",line:1,column:0},r=new sR(e),i=!1,o=null,s=null,a=null,l=null;return this.walk(function(c,p){n.code+=c,p.source!==null&&p.line!==null&&p.column!==null?((o!==p.source||s!==p.line||a!==p.column||l!==p.name)&&r.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:n.line,column:n.column},name:p.name}),o=p.source,s=p.line,a=p.column,l=p.name,i=!0):i&&(r.addMapping({generated:{line:n.line,column:n.column}}),o=null,i=!1);for(var d=0,f=c.length;d<f;d++)c.charCodeAt(d)===cR?(n.line++,n.column=0,d+1===f?(o=null,i=!1):i&&r.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:n.line,column:n.column},name:p.name})):n.column++}),this.walkSourceContents(function(c,p){r.setSourceContent(c,p)}),{code:n.code,map:r}};Ov.SourceNode=ot});var Mv=S(ga=>{ga.SourceMapGenerator=od().SourceMapGenerator;ga.SourceMapConsumer=Tv().SourceMapConsumer;ga.SourceNode=Nv().SourceNode});var Dv=S((ya,jv)=>{"use strict";ya.__esModule=!0;var pd=We(),Yn=void 0;try{(typeof define!="function"||!define.amd)&&(Vv=Mv(),Yn=Vv.SourceNode)}catch{}var Vv;Yn||(Yn=function(t,e,n,r){this.src="",r&&this.add(r)},Yn.prototype={add:function(e){pd.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){pd.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function ud(t,e,n){if(pd.isArray(t)){for(var r=[],i=0,o=t.length;i<o;i++)r.push(e.wrap(t[i],n));return r}else if(typeof t=="boolean"||typeof t=="number")return t+"";return t}function Lv(t){this.srcFile=t,this.source=[]}Lv.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,n){this.source.unshift(this.wrap(e,n))},push:function(e,n){this.source.push(this.wrap(e,n))},merge:function(){var e=this.empty();return this.each(function(n){e.add([" ",n,`
169
+ `])}),e},each:function(e){for(var n=0,r=this.source.length;n<r;n++)e(this.source[n])},empty:function(){var e=this.currentLocation||{start:{}};return new Yn(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var n=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof Yn?e:(e=ud(e,this,n),new Yn(n.start.line,n.start.column,this.srcFile,e))},functionCall:function(e,n,r){return r=this.generateList(r),this.wrap([e,n?"."+n+"(":"(",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 n=this,r=[];Object.keys(e).forEach(function(o){var s=ud(e[o],n);s!=="undefined"&&r.push([n.quotedString(o),":",s])});var i=this.generateList(r);return i.prepend("{"),i.add("}"),i},generateList:function(e){for(var n=this.empty(),r=0,i=e.length;r<i;r++)r&&n.add(","),n.add(ud(e[r],this));return n},generateArray:function(e){var n=this.generateList(e);return n.prepend("["),n.add("]"),n}};ya.default=Lv;jv.exports=ya.default});var Wv=S((wa,Hv)=>{"use strict";wa.__esModule=!0;function Bv(t){return t&&t.__esModule?t:{default:t}}var Fv=Qs(),lR=it(),dd=Bv(lR),uR=We(),pR=Dv(),qv=Bv(pR);function Dr(t){this.value=t}function Fr(){}Fr.prototype={nameLookup:function(e,n){return this.internalNameLookup(e,n)},depthedLookup:function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},compilerInfo:function(){var e=Fv.COMPILER_REVISION,n=Fv.REVISION_CHANGES[e];return[e,n]},appendToBuffer:function(e,n,r){return uR.isArray(e)||(e=[e]),e=this.source.wrap(e,n),this.environment.isSimple?["return ",e,";"]:r?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(e,n){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(n),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(e,n,r,i){this.environment=e,this.options=n,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,n),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var o=e.opcodes,s=void 0,a=void 0,l=void 0,c=void 0;for(l=0,c=o.length;l<c;l++)s=o[l],this.source.currentLocation=s.loc,a=a||s.loc,this[s.opcode].apply(this,s.args);if(this.source.currentLocation=a,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new dd.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(),`;
170
170
  `]),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) {
171
171
  `),this.decorators.push(`}
172
- `),this.decorators=this.decorators.merge()));var d=this.createFunctionContext(i);if(this.isChild)return d;var p={compiler:this.compilerInfo(),main:d};this.decorators&&(p.main_d=this.decorators,p.useDecorators=!0);var f=this.context,m=f.programs,y=f.decorators;for(c=0,l=m.length;c<l;c++)p[c]=m[c],y[c]&&(p[c+"_d"]=y[c],p.useDecorators=!0);return this.environment.usePartial&&(p.usePartial=!0),this.options.data&&(p.useData=!0),this.useDepths&&(p.useDepths=!0),this.useBlockParams&&(p.useBlockParams=!0),this.options.compat&&(p.compat=!0),i?p.compilerOptions=this.options:(p.compiler=JSON.stringify(p.compiler),this.source.currentLocation={start:{line:1,column:0}},p=this.objectLiteral(p),n.srcName?(p=p.toStringWithSourceMap({file:n.destName}),p.map=p.map&&p.map.toString()):p=p.toString()),p},preamble:function(){this.lastContext=0,this.source=new Nv.default(this.options.srcName),this.decorators=new Nv.default(this.options.srcName)},createFunctionContext:function(e){var n=this,r="",i=this.stackVars.concat(this.registers.list);i.length>0&&(r+=", "+i.join(", "));var o=0;Object.keys(this.aliases).forEach(function(c){var l=n.aliases[c];l.children&&l.referenceCount>1&&(r+=", alias"+ ++o+"="+c,l.children[0]="alias"+o)}),this.lookupPropertyFunctionIsUsed&&(r+=", "+this.lookupPropertyFunctionVarDeclaration());var s=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&s.push("blockParams"),this.useDepths&&s.push("depths");var a=this.mergeSource(r);return e?(s.push(a),Function.apply(this,s)):this.source.wrap(["function(",s.join(","),`) {
173
- `,a,"}"])},mergeSource:function(e){var n=this.environment.isSimple,r=!this.forceBuffer,i=void 0,o=void 0,s=void 0,a=void 0;return this.source.each(function(c){c.appendToBuffer?(s?c.prepend(" + "):s=c,a=c):(s&&(o?s.prepend("buffer += "):i=!0,a.add(";"),s=a=void 0),o=!0,n||(r=!1))}),r?s?(s.prepend("return "),a.add(";")):o||this.source.push('return "";'):(e+=", buffer = "+(i?"":this.initializeBuffer()),s?(s.prepend("return buffer + "),a.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(i?"":`;
172
+ `),this.decorators=this.decorators.merge()));var p=this.createFunctionContext(i);if(this.isChild)return p;var d={compiler:this.compilerInfo(),main:p};this.decorators&&(d.main_d=this.decorators,d.useDecorators=!0);var f=this.context,m=f.programs,y=f.decorators;for(l=0,c=m.length;l<c;l++)d[l]=m[l],y[l]&&(d[l+"_d"]=y[l],d.useDecorators=!0);return this.environment.usePartial&&(d.usePartial=!0),this.options.data&&(d.useData=!0),this.useDepths&&(d.useDepths=!0),this.useBlockParams&&(d.useBlockParams=!0),this.options.compat&&(d.compat=!0),i?d.compilerOptions=this.options:(d.compiler=JSON.stringify(d.compiler),this.source.currentLocation={start:{line:1,column:0}},d=this.objectLiteral(d),n.srcName?(d=d.toStringWithSourceMap({file:n.destName}),d.map=d.map&&d.map.toString()):d=d.toString()),d},preamble:function(){this.lastContext=0,this.source=new qv.default(this.options.srcName),this.decorators=new qv.default(this.options.srcName)},createFunctionContext:function(e){var n=this,r="",i=this.stackVars.concat(this.registers.list);i.length>0&&(r+=", "+i.join(", "));var o=0;Object.keys(this.aliases).forEach(function(l){var c=n.aliases[l];c.children&&c.referenceCount>1&&(r+=", alias"+ ++o+"="+l,c.children[0]="alias"+o)}),this.lookupPropertyFunctionIsUsed&&(r+=", "+this.lookupPropertyFunctionVarDeclaration());var s=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&s.push("blockParams"),this.useDepths&&s.push("depths");var a=this.mergeSource(r);return e?(s.push(a),Function.apply(this,s)):this.source.wrap(["function(",s.join(","),`) {
173
+ `,a,"}"])},mergeSource:function(e){var n=this.environment.isSimple,r=!this.forceBuffer,i=void 0,o=void 0,s=void 0,a=void 0;return this.source.each(function(l){l.appendToBuffer?(s?l.prepend(" + "):s=l,a=l):(s&&(o?s.prepend("buffer += "):i=!0,a.add(";"),s=a=void 0),o=!0,n||(r=!1))}),r?s?(s.prepend("return "),a.add(";")):o||this.source.push('return "";'):(e+=", buffer = "+(i?"":this.initializeBuffer()),s?(s.prepend("return buffer + "),a.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(i?"":`;
174
174
  `)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
175
175
  lookupProperty = container.lookupProperty || function(parent, propertyName) {
176
176
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -178,83 +178,83 @@ Expecting `+de.join(", ")+", got '"+(this.terminals_[R]||R)+"'":Y="Parse error o
178
178
  }
179
179
  return undefined
180
180
  }
181
- `.trim()},blockValue:function(e){var n=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(n,"call",r))},ambiguousBlockValue:function(){var e=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs("",0,n,!0),this.flushInline();var r=this.topStack();n.splice(1,0,r),this.pushSource(["if (!",this.lastHelper,") { ",r," = ",this.source.functionCall(e,"call",n),"}"])},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(n){return[" != null ? ",n,' : ""']}),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,n,r,i){var o=0;!i&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[o++])):this.pushContext(),this.resolvePath("context",e,o,n,r)},lookupBlockParam:function(e,n){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",n,1)},lookupData:function(e,n,r){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",n,0,!0,r)},resolvePath:function(e,n,r,i,o){var s=this;if(this.options.strict||this.options.assumeObjects){this.push(iR(this.options.strict&&o,this,n,r,e));return}for(var a=n.length,c=function(d){s.replaceStack(function(p){var f=s.nameLookup(p,n[d],e);return i?[" && ",f]:[" != null ? ",f," : ",p]})},l=r;l<a;l++)c(l)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(e,n){this.pushContext(),this.pushString(n),n!=="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,n){var r=this.nameLookup("decorators",n,"decorator"),i=this.setupHelperArgs(n,e);this.decorators.push(["var decorator = ",r,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+n+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",i])," || fn;"])},invokeHelper:function(e,n,r){var i=this.popStack(),o=this.setupHelper(e,n),s=[];r&&s.push(o.name),s.push(i),this.options.strict||s.push(this.aliasable("container.hooks.helperMissing"));var a=["(",this.itemsSeparatedBy(s,"||"),")"],c=this.source.functionCall(a,"call",o.callParams);this.push(c)},itemsSeparatedBy:function(e,n){var r=[];r.push(e[0]);for(var i=1;i<e.length;i++)r.push(n,e[i]);return r},invokeKnownHelper:function(e,n){var r=this.setupHelper(e,n);this.push(this.source.functionCall(r.name,"call",r.callParams))},invokeAmbiguous:function(e,n){this.useRegister("helper");var r=this.popStack();this.emptyHash();var i=this.setupHelper(0,e,n),o=this.lastHelper=this.nameLookup("helpers",e,"helper"),s=["(","(helper = ",o," || ",r,")"];this.options.strict||(s[0]="(helper = ",s.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",s,i.paramsInit?["),(",i.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",i.callParams)," : helper))"])},invokePartial:function(e,n,r){var i=[],o=this.setupParams(n,1,i);e&&(n=this.popStack(),delete o.name),r&&(o.indent=JSON.stringify(r)),o.helpers="helpers",o.partials="partials",o.decorators="container.decorators",e?i.unshift(n):i.unshift(this.nameLookup("partials",n,"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 n=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 s=this.hash;r&&(s.contexts[e]=r),i&&(s.types[e]=i),o&&(s.ids[e]=o),s.values[e]=n},pushId:function(e,n,r){e==="BlockParam"?this.pushStackLiteral("blockParams["+n[0]+"].path["+n[1]+"]"+(r?" + "+JSON.stringify("."+r):"")):e==="PathExpression"?this.pushString(n):e==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:Lr,compileChildren:function(e,n){for(var r=e.children,i=void 0,o=void 0,s=0,a=r.length;s<a;s++){i=r[s],o=new this.compiler;var c=this.matchExistingProgram(i);if(c==null){var l=this.context.programs.push("")-1;i.index=l,i.name="program"+l,this.context.programs[l]=o.compile(i,n,this.context,!this.precompile),this.context.decorators[l]=o.decorators,this.context.environments[l]=i,this.useDepths=this.useDepths||o.useDepths,this.useBlockParams=this.useBlockParams||o.useBlockParams,i.useDepths=this.useDepths,i.useBlockParams=this.useBlockParams}else i.index=c.index,i.name="program"+c.index,this.useDepths=this.useDepths||c.useDepths,this.useBlockParams=this.useBlockParams||c.useBlockParams}},matchExistingProgram:function(e){for(var n=0,r=this.context.environments.length;n<r;n++){var i=this.context.environments[n];if(i&&i.equals(e))return i}},programExpression:function(e){var n=this.environment.children[e],r=[n.index,"data",n.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 Vr||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new Vr(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 n=["("],r=void 0,i=void 0,o=void 0;if(!this.isInline())throw new rd.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof Vr)r=[s.value],n=["(",r],o=!0;else{i=!0;var a=this.incrStack();n=["((",this.push(a)," = ",s,")"],r=this.topStack()}var c=e.call(this,r);o||this.popStack(),i&&this.stackSlot--,this.push(n.concat(c,")"))},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 n=0,r=e.length;n<r;n++){var i=e[n];if(i instanceof Vr)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 n=this.isInline(),r=(n?this.inlineStack:this.compileStack).pop();if(!e&&r instanceof Vr)return r.value;if(!n){if(!this.stackSlot)throw new rd.default("Invalid stack pop");this.stackSlot--}return r},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,n=e[e.length-1];return n instanceof Vr?n.value:n},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 n=this.aliases[e];return n?(n.referenceCount++,n):(n=this.aliases[e]=this.source.wrap(e),n.aliasable=!0,n.referenceCount=1,n)},setupHelper:function(e,n,r){var i=[],o=this.setupHelperArgs(n,e,i,r),s=this.nameLookup("helpers",n,"helper"),a=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:i,paramsInit:o,name:s,callParams:[a].concat(i)}},setupParams:function(e,n,r){var i={},o=[],s=[],a=[],c=!r,l=void 0;c&&(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 d=this.popStack(),p=this.popStack();(p||d)&&(i.fn=p||"container.noop",i.inverse=d||"container.noop");for(var f=n;f--;)l=this.popStack(),r[f]=l,this.trackIds&&(a[f]=this.popStack()),this.stringParams&&(s[f]=this.popStack(),o[f]=this.popStack());return c&&(i.args=this.source.generateArray(r)),this.trackIds&&(i.ids=this.source.generateArray(a)),this.stringParams&&(i.types=this.source.generateArray(s),i.contexts=this.source.generateArray(o)),this.options.data&&(i.data="data"),this.useBlockParams&&(i.blockParams="blockParams"),i},setupHelperArgs:function(e,n,r,i){var o=this.setupParams(e,n,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 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=Lr.RESERVED_WORDS={},n=0,r=t.length;n<r;n++)e[t[n]]=!0})();Lr.isValidJavaScriptVariableName=function(t){return!Lr.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)};function iR(t,e,n,r,i){var o=e.popStack(),s=n.length;t&&s--;for(var a=r;a<s;a++)o=e.nameLookup(o,n[a],i);return t?[e.aliasable("container.strict"),"(",o,", ",e.quotedString(n[s]),", ",JSON.stringify(e.source.currentLocation)," )"]:o}ha.default=Lr;Vv.exports=ha.default});var Fv=S((ma,Dv)=>{"use strict";ma.__esModule=!0;function po(t){return t&&t.__esModule?t:{default:t}}var oR=Bw(),sR=po(oR),aR=Tp(),cR=po(aR),id=ev(),od=iv(),lR=Lv(),uR=po(lR),pR=oa(),dR=po(pR),fR=Pp(),hR=po(fR),mR=sR.default.create;function jv(){var t=mR();return t.compile=function(e,n){return od.compile(e,n,t)},t.precompile=function(e,n){return od.precompile(e,n,t)},t.AST=cR.default,t.Compiler=od.Compiler,t.JavaScriptCompiler=uR.default,t.Parser=id.parser,t.parse=id.parse,t.parseWithoutProcessing=id.parseWithoutProcessing,t}var jr=jv();jr.create=jv;hR.default(jr);jr.Visitor=dR.default;jr.default=jr;ma.default=jr;Dv.exports=ma.default});var qv=S(ga=>{"use strict";ga.__esModule=!0;ga.print=vR;ga.PrintVisitor=Ce;function gR(t){return t&&t.__esModule?t:{default:t}}var yR=oa(),wR=gR(yR);function vR(t){return new Ce().accept(t)}function Ce(){this.padding=0}Ce.prototype=new wR.default;Ce.prototype.pad=function(t){for(var e="",n=0,r=this.padding;n<r;n++)e+=" ";return e+=t+`
182
- `,e};Ce.prototype.Program=function(t){var e="",n=t.body,r=void 0,i=void 0;if(t.blockParams){var o="BLOCK PARAMS: [";for(r=0,i=t.blockParams.length;r<i;r++)o+=" "+t.blockParams[r];o+=" ]",e+=this.pad(o)}for(r=0,i=n.length;r<i;r++)e+=this.accept(n[r]);return this.padding--,e};Ce.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};Ce.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};Ce.prototype.BlockStatement=Ce.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};Ce.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+" }}")};Ce.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+" }}")};Ce.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};Ce.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};Ce.prototype.SubExpression=function(t){for(var e=t.params,n=[],r=void 0,i=0,o=e.length;i<o;i++)n.push(this.accept(e[i]));return e="["+n.join(", ")+"]",r=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+r};Ce.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};Ce.prototype.StringLiteral=function(t){return'"'+t.value+'"'};Ce.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};Ce.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};Ce.prototype.UndefinedLiteral=function(){return"UNDEFINED"};Ce.prototype.NullLiteral=function(){return"NULL"};Ce.prototype.Hash=function(t){for(var e=t.pairs,n=[],r=0,i=e.length;r<i;r++)n.push(this.accept(e[r]));return"HASH{"+n.join(", ")+"}"};Ce.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var Uv=S((O3,Wv)=>{var ya=Fv().default,Hv=qv();ya.PrintVisitor=Hv.PrintVisitor;ya.print=Hv.print;Wv.exports=ya;function Bv(t,e){var n=wt("fs"),r=n.readFileSync(e,"utf8");t.exports=ya.compile(r)}typeof wt<"u"&&wt.extensions&&(wt.extensions[".handlebars"]=Bv,wt.extensions[".hbs"]=Bv)});import{readFile as bR}from"node:fs/promises";import{resolve as _R}from"node:path";async function Et(t,e,n){let r=_R(t,e),i=zv.get(r);if(!i){let o=await bR(r,"utf-8");i=Gv.default.compile(o,{noEscape:!0}),zv.set(r,i)}return i(n)}var Gv,zv,fo=K(()=>{"use strict";Gv=ja(Uv(),1),zv=new Map});var sd=K(()=>{"use strict";Pr()});import{readFile as Jv,writeFile as xR,mkdir as $R,stat as SR,rm as CR,unlink as kR}from"node:fs/promises";import{resolve as Yt}from"node:path";async function Kv(t){try{return await SR(t),!0}catch{return!1}}async function ad(t){let e=Yt(t,"..");for(let n of[Yt(t,"runtime"),Yt(e,"components"),Yt(e,"runtime")])await Kv(n)&&await CR(n,{recursive:!0,force:!0});for(let n of["extensions.tsx","extensions.ts","contracts.ts"]){let r=Yt(t,n);await Kv(r)&&await kR(r)}}function ER(t){return t.replace(/^import type \{ DispatchableAction \} from [^;]+;\n/gm,"")}async function Yv(t,e,n){let r=ye(t),i=e.generated.reactDir,o=ho(n??(e.rendererTemplatesDir?Yt(r,e.rendererTemplatesDir):void 0)),s=Dr();await $R(i,{recursive:!0}),await ad(i);let a=await Jv(Yt(s,"types.ts"),"utf-8"),c=await Jv(Yt(s,"style.ts"),"utf-8"),l=await Et(o,"dispatch.ts.hbs",{}),d=ER(l),p=await Et(o,"runtime.ts.hbs",{typesBody:a.trim(),styleBody:c.trim(),dispatchBody:d.trim()}),f=Yt(i,"runtime.ts");return await xR(f,p,"utf-8"),{runtimePath:f}}var Xv=K(()=>{"use strict";bt();fo();sd()});var Zv={};$n(Zv,{renderReactRuntime:()=>MR});import{writeFile as Qv,stat as PR,unlink as IR}from"node:fs/promises";import{relative as RR,resolve as Fr}from"node:path";async function AR(t){try{return await PR(t),!0}catch{return!1}}async function TR(t,e,n,r){let i=await Xi(n,t),o=await Et(ho(r),"theme.css.hbs",{themeCss:i});await Qv(e,o,"utf-8")}async function OR(t){let e=Fr(t,"..");for(let n of["theme.css","contracts.ts","view-bridge.generated.ts"]){let r=Fr(e,n);await AR(r)&&await IR(r)}}async function NR(t,e){let n=ye(t),r=e.generated.reactDir,i=Fr(n,"src/components/extensions.tsx"),o=RR(r,i).replace(/\\/g,"/");o.startsWith(".")||(o=`./${o}`);let s=o.replace(/\.tsx?$/,".js"),a=Fr(r,"extensions.generated.ts");return await Qv(a,`/** Auto-generated extension re-export \u2014 DO NOT EDIT */
181
+ `.trim()},blockValue:function(e){var n=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(n,"call",r))},ambiguousBlockValue:function(){var e=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs("",0,n,!0),this.flushInline();var r=this.topStack();n.splice(1,0,r),this.pushSource(["if (!",this.lastHelper,") { ",r," = ",this.source.functionCall(e,"call",n),"}"])},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(n){return[" != null ? ",n,' : ""']}),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,n,r,i){var o=0;!i&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[o++])):this.pushContext(),this.resolvePath("context",e,o,n,r)},lookupBlockParam:function(e,n){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",n,1)},lookupData:function(e,n,r){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",n,0,!0,r)},resolvePath:function(e,n,r,i,o){var s=this;if(this.options.strict||this.options.assumeObjects){this.push(dR(this.options.strict&&o,this,n,r,e));return}for(var a=n.length,l=function(p){s.replaceStack(function(d){var f=s.nameLookup(d,n[p],e);return i?[" && ",f]:[" != null ? ",f," : ",d]})},c=r;c<a;c++)l(c)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(e,n){this.pushContext(),this.pushString(n),n!=="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,n){var r=this.nameLookup("decorators",n,"decorator"),i=this.setupHelperArgs(n,e);this.decorators.push(["var decorator = ",r,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+n+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",i])," || fn;"])},invokeHelper:function(e,n,r){var i=this.popStack(),o=this.setupHelper(e,n),s=[];r&&s.push(o.name),s.push(i),this.options.strict||s.push(this.aliasable("container.hooks.helperMissing"));var a=["(",this.itemsSeparatedBy(s,"||"),")"],l=this.source.functionCall(a,"call",o.callParams);this.push(l)},itemsSeparatedBy:function(e,n){var r=[];r.push(e[0]);for(var i=1;i<e.length;i++)r.push(n,e[i]);return r},invokeKnownHelper:function(e,n){var r=this.setupHelper(e,n);this.push(this.source.functionCall(r.name,"call",r.callParams))},invokeAmbiguous:function(e,n){this.useRegister("helper");var r=this.popStack();this.emptyHash();var i=this.setupHelper(0,e,n),o=this.lastHelper=this.nameLookup("helpers",e,"helper"),s=["(","(helper = ",o," || ",r,")"];this.options.strict||(s[0]="(helper = ",s.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",s,i.paramsInit?["),(",i.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",i.callParams)," : helper))"])},invokePartial:function(e,n,r){var i=[],o=this.setupParams(n,1,i);e&&(n=this.popStack(),delete o.name),r&&(o.indent=JSON.stringify(r)),o.helpers="helpers",o.partials="partials",o.decorators="container.decorators",e?i.unshift(n):i.unshift(this.nameLookup("partials",n,"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 n=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 s=this.hash;r&&(s.contexts[e]=r),i&&(s.types[e]=i),o&&(s.ids[e]=o),s.values[e]=n},pushId:function(e,n,r){e==="BlockParam"?this.pushStackLiteral("blockParams["+n[0]+"].path["+n[1]+"]"+(r?" + "+JSON.stringify("."+r):"")):e==="PathExpression"?this.pushString(n):e==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:Fr,compileChildren:function(e,n){for(var r=e.children,i=void 0,o=void 0,s=0,a=r.length;s<a;s++){i=r[s],o=new this.compiler;var l=this.matchExistingProgram(i);if(l==null){var c=this.context.programs.push("")-1;i.index=c,i.name="program"+c,this.context.programs[c]=o.compile(i,n,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=l.index,i.name="program"+l.index,this.useDepths=this.useDepths||l.useDepths,this.useBlockParams=this.useBlockParams||l.useBlockParams}},matchExistingProgram:function(e){for(var n=0,r=this.context.environments.length;n<r;n++){var i=this.context.environments[n];if(i&&i.equals(e))return i}},programExpression:function(e){var n=this.environment.children[e],r=[n.index,"data",n.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 Dr||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new Dr(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 n=["("],r=void 0,i=void 0,o=void 0;if(!this.isInline())throw new dd.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof Dr)r=[s.value],n=["(",r],o=!0;else{i=!0;var a=this.incrStack();n=["((",this.push(a)," = ",s,")"],r=this.topStack()}var l=e.call(this,r);o||this.popStack(),i&&this.stackSlot--,this.push(n.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 n=0,r=e.length;n<r;n++){var i=e[n];if(i instanceof Dr)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 n=this.isInline(),r=(n?this.inlineStack:this.compileStack).pop();if(!e&&r instanceof Dr)return r.value;if(!n){if(!this.stackSlot)throw new dd.default("Invalid stack pop");this.stackSlot--}return r},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,n=e[e.length-1];return n instanceof Dr?n.value:n},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 n=this.aliases[e];return n?(n.referenceCount++,n):(n=this.aliases[e]=this.source.wrap(e),n.aliasable=!0,n.referenceCount=1,n)},setupHelper:function(e,n,r){var i=[],o=this.setupHelperArgs(n,e,i,r),s=this.nameLookup("helpers",n,"helper"),a=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:i,paramsInit:o,name:s,callParams:[a].concat(i)}},setupParams:function(e,n,r){var i={},o=[],s=[],a=[],l=!r,c=void 0;l&&(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 p=this.popStack(),d=this.popStack();(d||p)&&(i.fn=d||"container.noop",i.inverse=p||"container.noop");for(var f=n;f--;)c=this.popStack(),r[f]=c,this.trackIds&&(a[f]=this.popStack()),this.stringParams&&(s[f]=this.popStack(),o[f]=this.popStack());return l&&(i.args=this.source.generateArray(r)),this.trackIds&&(i.ids=this.source.generateArray(a)),this.stringParams&&(i.types=this.source.generateArray(s),i.contexts=this.source.generateArray(o)),this.options.data&&(i.data="data"),this.useBlockParams&&(i.blockParams="blockParams"),i},setupHelperArgs:function(e,n,r,i){var o=this.setupParams(e,n,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 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=Fr.RESERVED_WORDS={},n=0,r=t.length;n<r;n++)e[t[n]]=!0})();Fr.isValidJavaScriptVariableName=function(t){return!Fr.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)};function dR(t,e,n,r,i){var o=e.popStack(),s=n.length;t&&s--;for(var a=r;a<s;a++)o=e.nameLookup(o,n[a],i);return t?[e.aliasable("container.strict"),"(",o,", ",e.quotedString(n[s]),", ",JSON.stringify(e.source.currentLocation)," )"]:o}wa.default=Fr;Hv.exports=wa.default});var Gv=S((va,zv)=>{"use strict";va.__esModule=!0;function mo(t){return t&&t.__esModule?t:{default:t}}var fR=Kw(),hR=mo(fR),mR=qp(),gR=mo(mR),fd=av(),hd=pv(),yR=Wv(),wR=mo(yR),vR=la(),bR=mo(vR),_R=Lp(),xR=mo(_R),$R=hR.default.create;function Uv(){var t=$R();return t.compile=function(e,n){return hd.compile(e,n,t)},t.precompile=function(e,n){return hd.precompile(e,n,t)},t.AST=gR.default,t.Compiler=hd.Compiler,t.JavaScriptCompiler=wR.default,t.Parser=fd.parser,t.parse=fd.parse,t.parseWithoutProcessing=fd.parseWithoutProcessing,t}var qr=Uv();qr.create=Uv;xR.default(qr);qr.Visitor=bR.default;qr.default=qr;va.default=qr;zv.exports=va.default});var Jv=S(ba=>{"use strict";ba.__esModule=!0;ba.print=ER;ba.PrintVisitor=ke;function SR(t){return t&&t.__esModule?t:{default:t}}var CR=la(),kR=SR(CR);function ER(t){return new ke().accept(t)}function ke(){this.padding=0}ke.prototype=new kR.default;ke.prototype.pad=function(t){for(var e="",n=0,r=this.padding;n<r;n++)e+=" ";return e+=t+`
182
+ `,e};ke.prototype.Program=function(t){var e="",n=t.body,r=void 0,i=void 0;if(t.blockParams){var o="BLOCK PARAMS: [";for(r=0,i=t.blockParams.length;r<i;r++)o+=" "+t.blockParams[r];o+=" ]",e+=this.pad(o)}for(r=0,i=n.length;r<i;r++)e+=this.accept(n[r]);return this.padding--,e};ke.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};ke.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};ke.prototype.BlockStatement=ke.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};ke.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+" }}")};ke.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+" }}")};ke.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};ke.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};ke.prototype.SubExpression=function(t){for(var e=t.params,n=[],r=void 0,i=0,o=e.length;i<o;i++)n.push(this.accept(e[i]));return e="["+n.join(", ")+"]",r=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+r};ke.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};ke.prototype.StringLiteral=function(t){return'"'+t.value+'"'};ke.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};ke.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};ke.prototype.UndefinedLiteral=function(){return"UNDEFINED"};ke.prototype.NullLiteral=function(){return"NULL"};ke.prototype.Hash=function(t){for(var e=t.pairs,n=[],r=0,i=e.length;r<i;r++)n.push(this.accept(e[r]));return"HASH{"+n.join(", ")+"}"};ke.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var Qv=S((z3,Xv)=>{var _a=Gv().default,Yv=Jv();_a.PrintVisitor=Yv.PrintVisitor;_a.print=Yv.print;Xv.exports=_a;function Kv(t,e){var n=_t("fs"),r=n.readFileSync(e,"utf8");t.exports=_a.compile(r)}typeof _t<"u"&&_t.extensions&&(_t.extensions[".handlebars"]=Kv,_t.extensions[".hbs"]=Kv)});import{readFile as PR}from"node:fs/promises";import{resolve as IR}from"node:path";async function It(t,e,n){let r=IR(t,e),i=Zv.get(r);if(!i){let o=await PR(r,"utf-8");i=eb.default.compile(o,{noEscape:!0}),Zv.set(r,i)}return i(n)}var eb,Zv,go=K(()=>{"use strict";eb=Ba(Qv(),1),Zv=new Map});var md=K(()=>{"use strict";Ar()});import{readFile as tb,writeFile as RR,mkdir as AR,stat as TR,rm as OR,unlink as NR}from"node:fs/promises";import{resolve as Xt}from"node:path";async function nb(t){try{return await TR(t),!0}catch{return!1}}async function gd(t){let e=Xt(t,"..");for(let n of[Xt(t,"runtime"),Xt(e,"components"),Xt(e,"runtime")])await nb(n)&&await OR(n,{recursive:!0,force:!0});for(let n of["extensions.tsx","extensions.ts","contracts.ts"]){let r=Xt(t,n);await nb(r)&&await NR(r)}}function MR(t){return t.replace(/^import type \{ DispatchableAction \} from [^;]+;\n/gm,"")}async function rb(t,e,n){let r=ye(t),i=e.generated.reactDir,o=yo(n??(e.rendererTemplatesDir?Xt(r,e.rendererTemplatesDir):void 0)),s=Br();await AR(i,{recursive:!0}),await gd(i);let a=await tb(Xt(s,"types.ts"),"utf-8"),l=await tb(Xt(s,"style.ts"),"utf-8"),c=await It(o,"dispatch.ts.hbs",{}),p=MR(c),d=await It(o,"runtime.ts.hbs",{typesBody:a.trim(),styleBody:l.trim(),dispatchBody:p.trim()}),f=Xt(i,"runtime.ts");return await RR(f,d,"utf-8"),{runtimePath:f}}var ib=K(()=>{"use strict";xt();go();md()});var sb={};kn(sb,{renderReactRuntime:()=>HR});import{writeFile as ob,stat as VR,unlink as LR}from"node:fs/promises";import{relative as jR,resolve as Hr}from"node:path";async function DR(t){try{return await VR(t),!0}catch{return!1}}async function FR(t,e,n,r){let i=await eo(n,t),o=await It(yo(r),"theme.css.hbs",{themeCss:i});await ob(e,o,"utf-8")}async function qR(t){let e=Hr(t,"..");for(let n of["theme.css","contracts.ts","view-bridge.generated.ts"]){let r=Hr(e,n);await DR(r)&&await LR(r)}}async function BR(t,e){let n=ye(t),r=e.generated.reactDir,i=Hr(n,"src/components/extensions.tsx"),o=jR(r,i).replace(/\\/g,"/");o.startsWith(".")||(o=`./${o}`);let s=o.replace(/\.tsx?$/,".js"),a=Hr(r,"extensions.generated.ts");return await ob(a,`/** Auto-generated extension re-export \u2014 DO NOT EDIT */
183
183
  export * from '${s}';
184
- `,"utf-8"),a}async function MR(t,e){let n=ye(t),r=e.rendererTemplatesDir?Fr(n,e.rendererTemplatesDir):void 0,i=e.generated.reactDir;await OR(i),await ad(i);let{runtimePath:o}=await Yv(t,e,r),s=await NR(t,e),a=Fr(i,"theme.css");await TR(t,a,e,r),console.log(` react/runtime \u2192 ${o}`),console.log(` react/extensions \u2192 ${s}`),console.log(` react/theme \u2192 ${a}`)}var eb=K(()=>{"use strict";bt();Ns();fo();sd();Xv()});function VR(t,e){return t.entries.find(r=>r.path===e)?.value??""}function LR(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let n=e[1],r=parseInt(n.slice(0,2),16),i=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16);return`Color(red: ${(r/255).toFixed(3)}, green: ${(i/255).toFixed(3)}, blue: ${(o/255).toFixed(3)})`}function Jn(t){let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function tb(t){return LR(t)??(t?`Color(${JSON.stringify(t)})`:null)}function nb(t,e){let n=[];for(let[r,i]of Object.entries(t)){let o=VR(e,i.ref);if(o)switch(r){case"background":case"foreground":{let s=tb(o);s&&n.push({property:r,swiftValue:s});break}case"padding":{let s=Jn(o);if(s!==null)n.push({property:r,swiftValue:String(s)});else{let a=o.trim().split(/\s+/);if(a.length===2){let c=Jn(a[0]),l=Jn(a[1]);c!==null&&n.push({property:"paddingV",swiftValue:String(c)}),l!==null&&n.push({property:"paddingH",swiftValue:String(l)})}}break}case"radius":case"fontSize":case"minHeight":case"maxWidth":{let s=Jn(o);s!==null&&n.push({property:r,swiftValue:String(s)});break}case"width":{if(o==="100%"||o==="fill")n.push({property:"widthFill",swiftValue:"true"});else{let s=Jn(o);s!==null&&n.push({property:r,swiftValue:String(s)})}break}case"height":{if(o==="100%"||o==="fill")n.push({property:"heightFill",swiftValue:"true"});else{let s=Jn(o);s!==null&&n.push({property:r,swiftValue:String(s)})}break}case"border":{let s=o.match(/^([\d.]+)px/);s&&n.push({property:"borderWidth",swiftValue:String(Number(s[1]))});break}case"borderColor":{let s=tb(o);s&&n.push({property:"borderColor",swiftValue:s});break}case"margin":{let s=Jn(o);s!==null&&n.push({property:r,swiftValue:String(s)});break}case"fontWeight":{let s=jR[o];s&&n.push({property:r,swiftValue:s});break}case"shadow":{n.push({property:r,swiftValue:o==="true"||o==="none"?"false":"true"});break}case"display":case"flexDirection":case"gridTemplateColumns":case"alignItems":case"justifyContent":case"typography":break;default:console.warn(`[view-contracts] SwiftUI theme: variant property "${r}" is not handled (value: "${o}"). Add a case to renderTheme.ts resolveVariantEntries().`);break}}return n}function ib(t,e){if(t.length===0)return`${e}VcVariantStyle()`;let r=[...t].sort((i,o)=>rb.indexOf(i.property)-rb.indexOf(o.property)).map(i=>`${i.property}: ${i.swiftValue}`).join(", ");return`${e}VcVariantStyle(${r})`}function DR(t,e){return{...t,...e}}function ob(t,e){let n=[];n.push("/**"),n.push(" * Auto-generated SwiftUI theme \u2014 variant style dictionary."),n.push(" * Each entry is pre-merged: base theme defaults < variant overrides."),n.push(" * DO NOT EDIT \u2014 regenerate with: view-contracts build"),n.push(" */"),n.push("import SwiftUI"),n.push(""),n.push("struct VcVariantStyle {"),n.push(" var foreground: Color?"),n.push(" var background: Color?"),n.push(" var padding: CGFloat?"),n.push(" var paddingH: CGFloat?"),n.push(" var paddingV: CGFloat?"),n.push(" var widthFill: Bool?"),n.push(" var heightFill: Bool?"),n.push(" var radius: CGFloat?"),n.push(" var fontSize: CGFloat?"),n.push(" var fontWeight: Font.Weight?"),n.push(" var shadow: Bool?"),n.push(" var borderWidth: CGFloat?"),n.push(" var borderColor: Color?"),n.push(" var minHeight: CGFloat?"),n.push(" var maxWidth: CGFloat?"),n.push("}"),n.push(""),n.push("extension View {"),n.push(" func applyVcStyle(_ s: VcVariantStyle) -> some View {"),n.push(" self"),n.push(" .ifSet(s.foreground) { $0.foregroundStyle($1) }"),n.push(" .ifSet(s.fontSize) { $0.font(.system(size: $1, weight: s.fontWeight ?? .regular)) }"),n.push(" .ifSet(s.padding) { $0.padding($1) }"),n.push(" .ifSet(s.paddingH) { $0.padding(.horizontal, $1) }"),n.push(" .ifSet(s.paddingV) { $0.padding(.vertical, $1) }"),n.push(" .vcFillFrame(widthFill: s.widthFill ?? false, heightFill: s.heightFill ?? false)"),n.push(" .ifSet(s.background) { $0.background($1) }"),n.push(" .ifSet(s.radius) { $0.clipShape(RoundedRectangle(cornerRadius: $1)) }"),n.push(" .ifSet(s.borderColor) { $0.overlay(RoundedRectangle(cornerRadius: s.radius ?? 0).stroke($1, lineWidth: s.borderWidth ?? 1)) }"),n.push(" .ifSet(s.shadow) { v, on in on ? AnyView(v.shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)) : AnyView(v) }"),n.push(" }"),n.push("}"),n.push(""),n.push("extension View {"),n.push(" @ViewBuilder"),n.push(" func vcFillFrame(widthFill: Bool, heightFill: Bool) -> some View {"),n.push(" if widthFill && heightFill {"),n.push(" self.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"),n.push(" } else if widthFill {"),n.push(" self.frame(maxWidth: .infinity, alignment: .leading)"),n.push(" } else if heightFill {"),n.push(" self.frame(maxHeight: .infinity, alignment: .top)"),n.push(" } else {"),n.push(" self"),n.push(" }"),n.push(" }"),n.push("}"),n.push(""),n.push("extension View {"),n.push(" @ViewBuilder"),n.push(" func ifSet<T, V: View>(_ value: T?, _ transform: (Self, T) -> V) -> some View {"),n.push(" if let value { transform(self, value) } else { self }"),n.push(" }"),n.push("}"),n.push(""),n.push("enum VcTheme {"),n.push(" static let defaults: [String: VcVariantStyle] = [");for(let[r,i]of Object.entries(t.defaults)){if(Object.keys(i).length===0)continue;let o=nb(i,e);o.length!==0&&n.push(` ${JSON.stringify(r)}: ${ib(o,"").trim()},`)}n.push(" ]"),n.push(""),n.push(" static let variants: [String: [String: VcVariantStyle]] = [");for(let[r,i]of Object.entries(t.variants)){let o=Object.entries(i);if(o.length===0)continue;let s=t.defaults[r]??{};n.push(` ${JSON.stringify(r)}: [`);for(let[a,c]of o){let l=DR(s,c),d=nb(l,e),p=ib(d," ");n.push(` ${JSON.stringify(a)}: ${p.trim()},`)}n.push(" ],")}return n.push(" ]"),n.push(""),n.push(" static func resolve(_ element: String, variant: String) -> VcVariantStyle {"),n.push(" variants[element]?[variant] ?? defaults[element] ?? VcVariantStyle()"),n.push(" }"),n.push("}"),n.push(""),n.join(`
185
- `)}var jR,rb,sb=K(()=>{"use strict";jR={bold:".bold",semibold:".semibold",medium:".medium",regular:".regular",600:".semibold",700:".bold",500:".medium",400:".regular"};rb=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});import{resolve as FR}from"node:path";function BR(t){for(let[e,n]of Object.entries(t.elements)){let r=n.container!==void 0&&n.container!==null,i=n.leaf!==void 0&&n.leaf!==null;if(r===i)throw new Error(`${qR}: element "${e}" must have exactly one of "container" or "leaf"`);(n.container==="vstack"||n.container==="hstack")&&n.spacingProp}}async function ab(t){if(!t&&cd)return cd;let e=t??FR(Ee(),"renderers/swiftui/elements.yaml"),n=await _r(e);return BR(n),t||(cd=n),n}var qR,cd,cb=K(()=>{"use strict";Ut();$s();qR="renderers/swiftui/elements.yaml",cd=null});function HR(t,e){let n=t.entries.find(r=>r.path===e);if(!n)throw new Error(`Token reference "${e}" not found while merging visual props`);return n.value}function lb(t,e){let n={};for(let[r,i]of Object.entries(t))n[r]=HR(e,i.ref);return n}function WR(t){let e={};for(let[n,r]of Object.entries(t))r!=null&&(typeof r=="string"||typeof r=="number"||typeof r=="boolean")&&(e[n]=r);return e}function Xt(t){let e=t.theme.defaults[t.elementName]??{},n=t.variantLiteral?t.theme.variants[t.elementName]?.[t.variantLiteral]??{}:{};return{...lb(e,t.tokens),...lb(n,t.tokens),...WR(t.instanceLiterals)}}var ld=K(()=>{"use strict"});function Kn(t){let e=new Set,n=r=>{if(Array.isArray(r)){for(let i of r)n(i);return}if(!(typeof r!="object"||r===null)){if(r.kind==="binding"){r.scope&&e.add(r.scope);return}if(r.kind==="concat")for(let i of r.parts)typeof i!="string"&&n(i)}};for(let r of t)n(r);return e}function wa(t,e){e&&t.emittedScopes?.add(e)}function ud(t,e,n){let r=t.emittedScopes,i=new Set;t.emittedScopes=i;let o=e.filter(a=>t.optionalProps?.delete(a)),s=n();for(let a of o)t.optionalProps.add(a);return t.emittedScopes=r,{code:s,emitted:i}}function Yn(t,e,n,r){let i=[...e].filter(c=>t.optionalProps?.has(c));if(i.length===0)return n();let o=ud(t,[],n),s=i.filter(c=>o.emitted.has(c));if(s.length===0||!o.code)return o.code;let a=ud(t,s,n).code;return r(s,a)}function Qt(t,e,n){return ud(t,e,n).code}function va(t,e){return t.split(`
184
+ `,"utf-8"),a}async function HR(t,e){let n=ye(t),r=e.rendererTemplatesDir?Hr(n,e.rendererTemplatesDir):void 0,i=e.generated.reactDir;await qR(i),await gd(i);let{runtimePath:o}=await rb(t,e,r),s=await BR(t,e),a=Hr(i,"theme.css");await FR(t,a,e,r),console.log(` react/runtime \u2192 ${o}`),console.log(` react/extensions \u2192 ${s}`),console.log(` react/theme \u2192 ${a}`)}var ab=K(()=>{"use strict";xt();js();go();md();ib()});function WR(t,e){return t.entries.find(r=>r.path===e)?.value??""}function UR(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let n=e[1],r=parseInt(n.slice(0,2),16),i=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16);return`Color(red: ${(r/255).toFixed(3)}, green: ${(i/255).toFixed(3)}, blue: ${(o/255).toFixed(3)})`}function Xn(t){let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function cb(t){return UR(t)??(t?`Color(${JSON.stringify(t)})`:null)}function lb(t,e){let n=[];for(let[r,i]of Object.entries(t)){let o=WR(e,i.ref);if(o)switch(r){case"background":case"foreground":{let s=cb(o);s&&n.push({property:r,swiftValue:s});break}case"padding":{let s=Xn(o);if(s!==null)n.push({property:r,swiftValue:String(s)});else{let a=o.trim().split(/\s+/);if(a.length===2){let l=Xn(a[0]),c=Xn(a[1]);l!==null&&n.push({property:"paddingV",swiftValue:String(l)}),c!==null&&n.push({property:"paddingH",swiftValue:String(c)})}}break}case"radius":case"fontSize":case"minHeight":case"maxWidth":{let s=Xn(o);s!==null&&n.push({property:r,swiftValue:String(s)});break}case"width":{if(o==="100%"||o==="fill")n.push({property:"widthFill",swiftValue:"true"});else{let s=Xn(o);s!==null&&n.push({property:r,swiftValue:String(s)})}break}case"height":{if(o==="100%"||o==="fill")n.push({property:"heightFill",swiftValue:"true"});else{let s=Xn(o);s!==null&&n.push({property:r,swiftValue:String(s)})}break}case"border":{let s=o.match(/^([\d.]+)px/);s&&n.push({property:"borderWidth",swiftValue:String(Number(s[1]))});break}case"borderColor":{let s=cb(o);s&&n.push({property:"borderColor",swiftValue:s});break}case"margin":{let s=Xn(o);s!==null&&n.push({property:r,swiftValue:String(s)});break}case"fontWeight":{let s=zR[o];s&&n.push({property:r,swiftValue:s});break}case"shadow":{n.push({property:r,swiftValue:o==="true"||o==="none"?"false":"true"});break}case"display":case"flexDirection":case"gridTemplateColumns":case"alignItems":case"justifyContent":case"typography":break;default:console.warn(`[view-contracts] SwiftUI theme: variant property "${r}" is not handled (value: "${o}"). Add a case to renderTheme.ts resolveVariantEntries().`);break}}return n}function pb(t,e){if(t.length===0)return`${e}VcVariantStyle()`;let r=[...t].sort((i,o)=>ub.indexOf(i.property)-ub.indexOf(o.property)).map(i=>`${i.property}: ${i.swiftValue}`).join(", ");return`${e}VcVariantStyle(${r})`}function GR(t,e){return{...t,...e}}function db(t,e){let n=[];n.push("/**"),n.push(" * Auto-generated SwiftUI theme \u2014 variant style dictionary."),n.push(" * Each entry is pre-merged: base theme defaults < variant overrides."),n.push(" * DO NOT EDIT \u2014 regenerate with: view-contracts build"),n.push(" */"),n.push("import SwiftUI"),n.push(""),n.push("struct VcVariantStyle {"),n.push(" var foreground: Color?"),n.push(" var background: Color?"),n.push(" var padding: CGFloat?"),n.push(" var paddingH: CGFloat?"),n.push(" var paddingV: CGFloat?"),n.push(" var widthFill: Bool?"),n.push(" var heightFill: Bool?"),n.push(" var radius: CGFloat?"),n.push(" var fontSize: CGFloat?"),n.push(" var fontWeight: Font.Weight?"),n.push(" var shadow: Bool?"),n.push(" var borderWidth: CGFloat?"),n.push(" var borderColor: Color?"),n.push(" var minHeight: CGFloat?"),n.push(" var maxWidth: CGFloat?"),n.push("}"),n.push(""),n.push("extension View {"),n.push(" func applyVcStyle(_ s: VcVariantStyle) -> some View {"),n.push(" self"),n.push(" .ifSet(s.foreground) { $0.foregroundStyle($1) }"),n.push(" .ifSet(s.fontSize) { $0.font(.system(size: $1, weight: s.fontWeight ?? .regular)) }"),n.push(" .ifSet(s.padding) { $0.padding($1) }"),n.push(" .ifSet(s.paddingH) { $0.padding(.horizontal, $1) }"),n.push(" .ifSet(s.paddingV) { $0.padding(.vertical, $1) }"),n.push(" .vcFillFrame(widthFill: s.widthFill ?? false, heightFill: s.heightFill ?? false)"),n.push(" .ifSet(s.background) { $0.background($1) }"),n.push(" .ifSet(s.radius) { $0.clipShape(RoundedRectangle(cornerRadius: $1)) }"),n.push(" .ifSet(s.borderColor) { $0.overlay(RoundedRectangle(cornerRadius: s.radius ?? 0).stroke($1, lineWidth: s.borderWidth ?? 1)) }"),n.push(" .ifSet(s.shadow) { v, on in on ? AnyView(v.shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)) : AnyView(v) }"),n.push(" }"),n.push("}"),n.push(""),n.push("extension View {"),n.push(" @ViewBuilder"),n.push(" func vcFillFrame(widthFill: Bool, heightFill: Bool) -> some View {"),n.push(" if widthFill && heightFill {"),n.push(" self.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"),n.push(" } else if widthFill {"),n.push(" self.frame(maxWidth: .infinity, alignment: .leading)"),n.push(" } else if heightFill {"),n.push(" self.frame(maxHeight: .infinity, alignment: .top)"),n.push(" } else {"),n.push(" self"),n.push(" }"),n.push(" }"),n.push("}"),n.push(""),n.push("extension View {"),n.push(" @ViewBuilder"),n.push(" func ifSet<T, V: View>(_ value: T?, _ transform: (Self, T) -> V) -> some View {"),n.push(" if let value { transform(self, value) } else { self }"),n.push(" }"),n.push("}"),n.push(""),n.push("enum VcTheme {"),n.push(" static let defaults: [String: VcVariantStyle] = [");for(let[r,i]of Object.entries(t.defaults)){if(Object.keys(i).length===0)continue;let o=lb(i,e);o.length!==0&&n.push(` ${JSON.stringify(r)}: ${pb(o,"").trim()},`)}n.push(" ]"),n.push(""),n.push(" static let variants: [String: [String: VcVariantStyle]] = [");for(let[r,i]of Object.entries(t.variants)){let o=Object.entries(i);if(o.length===0)continue;let s=t.defaults[r]??{};n.push(` ${JSON.stringify(r)}: [`);for(let[a,l]of o){let c=GR(s,l),p=lb(c,e),d=pb(p," ");n.push(` ${JSON.stringify(a)}: ${d.trim()},`)}n.push(" ],")}return n.push(" ]"),n.push(""),n.push(" static func resolve(_ element: String, variant: String) -> VcVariantStyle {"),n.push(" variants[element]?[variant] ?? defaults[element] ?? VcVariantStyle()"),n.push(" }"),n.push("}"),n.push(""),n.join(`
185
+ `)}var zR,ub,fb=K(()=>{"use strict";zR={bold:".bold",semibold:".semibold",medium:".medium",regular:".regular",600:".semibold",700:".bold",500:".medium",400:".regular"};ub=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});import{resolve as JR}from"node:path";function YR(t){for(let[e,n]of Object.entries(t.elements)){let r=n.container!==void 0&&n.container!==null,i=n.leaf!==void 0&&n.leaf!==null;if(r===i)throw new Error(`${KR}: element "${e}" must have exactly one of "container" or "leaf"`);(n.container==="vstack"||n.container==="hstack")&&n.spacingProp}}async function hb(t){if(!t&&yd)return yd;let e=t??JR(Ce(),"renderers/swiftui/elements.yaml"),n=await Cr(e);return YR(n),t||(yd=n),n}var KR,yd,mb=K(()=>{"use strict";Mt();Es();KR="renderers/swiftui/elements.yaml",yd=null});function XR(t,e){let n=t.entries.find(r=>r.path===e);if(!n)throw new Error(`Token reference "${e}" not found while merging visual props`);return n.value}function gb(t,e){let n={};for(let[r,i]of Object.entries(t))n[r]=XR(e,i.ref);return n}function QR(t){let e={};for(let[n,r]of Object.entries(t))r!=null&&(typeof r=="string"||typeof r=="number"||typeof r=="boolean")&&(e[n]=r);return e}function Qt(t){let e=t.theme.defaults[t.elementName]??{},n=t.variantLiteral?t.theme.variants[t.elementName]?.[t.variantLiteral]??{}:{};return{...gb(e,t.tokens),...gb(n,t.tokens),...QR(t.instanceLiterals)}}var wd=K(()=>{"use strict"});function Qn(t){let e=new Set,n=r=>{if(Array.isArray(r)){for(let i of r)n(i);return}if(!(typeof r!="object"||r===null)){if(r.kind==="binding"){r.scope&&e.add(r.scope);return}if(r.kind==="concat")for(let i of r.parts)typeof i!="string"&&n(i)}};for(let r of t)n(r);return e}function xa(t,e){e&&t.emittedScopes?.add(e)}function vd(t,e,n){let r=t.emittedScopes,i=new Set;t.emittedScopes=i;let o=e.filter(a=>t.optionalProps?.delete(a)),s=n();for(let a of o)t.optionalProps.add(a);return t.emittedScopes=r,{code:s,emitted:i}}function Zn(t,e,n,r){let i=[...e].filter(l=>t.optionalProps?.has(l));if(i.length===0)return n();let o=vd(t,[],n),s=i.filter(l=>o.emitted.has(l));if(s.length===0||!o.code)return o.code;let a=vd(t,s,n).code;return r(s,a)}function Zt(t,e,n){return vd(t,e,n).code}function $a(t,e){return t.split(`
186
186
  `).map(n=>n&&`${e}${n}`).join(`
187
- `)}var pd=K(()=>{"use strict"});function it(t){if(typeof t=="number")return t;if(typeof t=="boolean")return null;let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function dd(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let n=e[1],r=parseInt(n.slice(0,2),16),i=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16);return`Color(red: ${r/255}, green: ${i/255}, blue: ${o/255})`}function UR(t){let e=it(t);if(e!==null)return{kind:"uniform",value:e};if(typeof t!="string")return null;let n=t.trim().split(/\s+/);if(n.length===2){let r=it(n[0]),i=it(n[1]);if(r!==null&&i!==null)return{kind:"shorthand",vertical:r,horizontal:i}}return null}function zR(t){if(t===""||t===null||t===void 0)return null;let e=it(t);return e!==null?`.font(.system(size: ${e}))`:typeof t=="string"&&!t.endsWith("px")?`.font(.system(size: ${JSON.stringify(t)}))`:null}function GR(t){return typeof t!="string"?null:{bold:".fontWeight(.bold)",semibold:".fontWeight(.semibold)",medium:".fontWeight(.medium)",regular:".fontWeight(.regular)",700:".fontWeight(.bold)",600:".fontWeight(.semibold)",500:".fontWeight(.medium)",400:".fontWeight(.regular)"}[t]??null}function fd(t){let e=[],n=t.foreground;if(typeof n=="string"){let j=dd(n);e.push(j?`.foregroundStyle(${j})`:`.foregroundStyle(Color(${JSON.stringify(n)}))`)}let r=t.size??t.fontSize;if(r!==void 0&&r!==""){let j=zR(r);j&&e.push(j)}let i=GR(t.fontWeight??t.weight??"");i&&e.push(i);let o=t.padding??"",s=UR(o);s&&(s.kind==="uniform"?e.push(`.padding(${s.value})`):(e.push(`.padding(.vertical, ${s.vertical})`),e.push(`.padding(.horizontal, ${s.horizontal})`)));let a=t.width,c=t.height,l=t.minHeight,d=t.maxWidth,p=t.maxHeight,f=t.margin,m=f==="0 auto",y=a==="100%"||a==="fill"||d==="fill",g=c==="100%"||c==="fill"||l==="100vh",w=d==="fill"?null:d!==void 0?it(d):null;y&&g?w!==null?e.push(`.frame(maxWidth: ${w}, maxHeight: .infinity, alignment: .topLeading)`):e.push(".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"):y?w!==null?e.push(`.frame(maxWidth: ${w}, alignment: .leading)`):e.push(".frame(maxWidth: .infinity, alignment: .leading)"):g&&e.push(".frame(maxHeight: .infinity, alignment: .top)"),!g&&l==="100vh"&&e.push(".frame(maxHeight: .infinity, alignment: .top)");let b=t.background;if(typeof b=="string"&&b!=="transparent"){let j=dd(b);e.push(j?`.background(${j})`:`.background(Color(${JSON.stringify(b)}))`)}let P=it(t.radius??"");P!==null&&e.push(`.clipShape(RoundedRectangle(cornerRadius: ${P}))`),(t.shadow===!0||t.shadow==="true")&&e.push(".shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)");let x=t.border,R=t.borderColor;if(x||R){let j=it(x??"1px")??1,U=typeof R=="string"?dd(R)??"Color.gray":"Color.gray";e.push(`.overlay(RoundedRectangle(cornerRadius: ${P??0}).stroke(${U}, lineWidth: ${j}))`)}if(!y){if(typeof a=="number")e.push(`.frame(width: ${a})`);else if(a!==void 0&&a!=="wrap"){let j=it(a);j!==null&&e.push(`.frame(width: ${j})`)}if(d!==void 0&&d!=="fill"){let j=it(d);j!==null&&e.push(`.frame(maxWidth: ${j})`)}}if(!g){if(typeof c=="number")e.push(`.frame(height: ${c})`);else if(c!==void 0&&c!=="wrap"){let j=it(c);j!==null&&e.push(`.frame(height: ${j})`)}if(l!==void 0&&l!=="100vh")if(typeof l=="number")e.push(`.frame(minHeight: ${l})`);else{let j=it(l);j!==null&&e.push(`.frame(minHeight: ${j})`)}if(p!==void 0&&p!=="fill"){let j=it(p);j!==null&&e.push(`.frame(maxHeight: ${j})`)}}if(m)e.push(".frame(maxWidth: .infinity, alignment: .center)");else if(typeof f=="number")e.push(`.padding(${f})`);else if(f!==void 0){let j=it(f);j!==null&&e.push(`.padding(${j})`)}let O=t.opacity;return typeof O=="number"&&O<1&&e.push(`.opacity(${O})`),e}function Ue(t,e,n){if(e.length===0)return t;let r=" ".repeat(n);return`${t}
187
+ `)}var bd=K(()=>{"use strict"});function st(t){if(typeof t=="number")return t;if(typeof t=="boolean")return null;let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function _d(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let n=e[1],r=parseInt(n.slice(0,2),16),i=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16);return`Color(red: ${r/255}, green: ${i/255}, blue: ${o/255})`}function ZR(t){let e=st(t);if(e!==null)return{kind:"uniform",value:e};if(typeof t!="string")return null;let n=t.trim().split(/\s+/);if(n.length===2){let r=st(n[0]),i=st(n[1]);if(r!==null&&i!==null)return{kind:"shorthand",vertical:r,horizontal:i}}return null}function eA(t){if(t===""||t===null||t===void 0)return null;let e=st(t);return e!==null?`.font(.system(size: ${e}))`:typeof t=="string"&&!t.endsWith("px")?`.font(.system(size: ${JSON.stringify(t)}))`:null}function tA(t){return typeof t!="string"?null:{bold:".fontWeight(.bold)",semibold:".fontWeight(.semibold)",medium:".fontWeight(.medium)",regular:".fontWeight(.regular)",700:".fontWeight(.bold)",600:".fontWeight(.semibold)",500:".fontWeight(.medium)",400:".fontWeight(.regular)"}[t]??null}function xd(t){let e=[],n=t.foreground;if(typeof n=="string"){let j=_d(n);e.push(j?`.foregroundStyle(${j})`:`.foregroundStyle(Color(${JSON.stringify(n)}))`)}let r=t.size??t.fontSize;if(r!==void 0&&r!==""){let j=eA(r);j&&e.push(j)}let i=tA(t.fontWeight??t.weight??"");i&&e.push(i);let o=t.padding??"",s=ZR(o);s&&(s.kind==="uniform"?e.push(`.padding(${s.value})`):(e.push(`.padding(.vertical, ${s.vertical})`),e.push(`.padding(.horizontal, ${s.horizontal})`)));let a=t.width,l=t.height,c=t.minHeight,p=t.maxWidth,d=t.maxHeight,f=t.margin,m=f==="0 auto",y=a==="100%"||a==="fill"||p==="fill",g=l==="100%"||l==="fill"||c==="100vh",w=p==="fill"?null:p!==void 0?st(p):null;y&&g?w!==null?e.push(`.frame(maxWidth: ${w}, maxHeight: .infinity, alignment: .topLeading)`):e.push(".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"):y?w!==null?e.push(`.frame(maxWidth: ${w}, alignment: .leading)`):e.push(".frame(maxWidth: .infinity, alignment: .leading)"):g&&e.push(".frame(maxHeight: .infinity, alignment: .top)"),!g&&c==="100vh"&&e.push(".frame(maxHeight: .infinity, alignment: .top)");let b=t.background;if(typeof b=="string"&&b!=="transparent"){let j=_d(b);e.push(j?`.background(${j})`:`.background(Color(${JSON.stringify(b)}))`)}let P=st(t.radius??"");P!==null&&e.push(`.clipShape(RoundedRectangle(cornerRadius: ${P}))`),(t.shadow===!0||t.shadow==="true")&&e.push(".shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)");let x=t.border,R=t.borderColor;if(x||R){let j=st(x??"1px")??1,U=typeof R=="string"?_d(R)??"Color.gray":"Color.gray";e.push(`.overlay(RoundedRectangle(cornerRadius: ${P??0}).stroke(${U}, lineWidth: ${j}))`)}if(!y){if(typeof a=="number")e.push(`.frame(width: ${a})`);else if(a!==void 0&&a!=="wrap"){let j=st(a);j!==null&&e.push(`.frame(width: ${j})`)}if(p!==void 0&&p!=="fill"){let j=st(p);j!==null&&e.push(`.frame(maxWidth: ${j})`)}}if(!g){if(typeof l=="number")e.push(`.frame(height: ${l})`);else if(l!==void 0&&l!=="wrap"){let j=st(l);j!==null&&e.push(`.frame(height: ${j})`)}if(c!==void 0&&c!=="100vh")if(typeof c=="number")e.push(`.frame(minHeight: ${c})`);else{let j=st(c);j!==null&&e.push(`.frame(minHeight: ${j})`)}if(d!==void 0&&d!=="fill"){let j=st(d);j!==null&&e.push(`.frame(maxHeight: ${j})`)}}if(m)e.push(".frame(maxWidth: .infinity, alignment: .center)");else if(typeof f=="number")e.push(`.padding(${f})`);else if(f!==void 0){let j=st(f);j!==null&&e.push(`.padding(${j})`)}let O=t.opacity;return typeof O=="number"&&O<1&&e.push(`.opacity(${O})`),e}function Ue(t,e,n){if(e.length===0)return t;let r=" ".repeat(n);return`${t}
188
188
  ${e.map(i=>`${r}${i}`).join(`
189
- `)}`}var ub=K(()=>{"use strict"});function F(t){return" ".repeat(t)}function ba(t,e,n){let i=t.entries.find(d=>d.path===e)?.value??n,o=i.match(/^#([0-9a-fA-F]{6})$/);if(!o)return`Color(${JSON.stringify(i)})`;let s=o[1],a=parseInt(s.slice(0,2),16)/255,c=parseInt(s.slice(2,4),16)/255,l=parseInt(s.slice(4,6),16)/255;return`Color(red: ${a}, green: ${c}, blue: ${l})`}function fb(t,e,n,r,i){let o=`${F(e+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`;return t.map(a=>{if(a.kind==="map"){let l=a,d=l.item,p=Qt(r,[d],()=>n(l.body,e+2,d));p+=`
190
- ${o}`;let f=Vt(l.source,r,i);return`${F(e+2)}ForEach(${f}, id: \\.id) { ${d} in
191
- ${p}
192
- ${F(e+2)}}`}let c="";return a.kind==="text"?c=`${F(e+2)}Text(${JSON.stringify(a.value)})`:a.kind==="binding"?c=go(a,e+2,r,i):c=n(a,e+2,i),c?`${c}
189
+ `)}`}var yb=K(()=>{"use strict"});function F(t){return" ".repeat(t)}function Sa(t,e,n){let i=t.entries.find(p=>p.path===e)?.value??n,o=i.match(/^#([0-9a-fA-F]{6})$/);if(!o)return`Color(${JSON.stringify(i)})`;let s=o[1],a=parseInt(s.slice(0,2),16)/255,l=parseInt(s.slice(2,4),16)/255,c=parseInt(s.slice(4,6),16)/255;return`Color(red: ${a}, green: ${l}, blue: ${c})`}function bb(t,e,n,r,i){let o=`${F(e+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`;return t.map(a=>{if(a.kind==="map"){let c=a,p=c.item,d=Zt(r,[p],()=>n(c.body,e+2,p));d+=`
190
+ ${o}`;let f=Dt(c.source,r,i);return`${F(e+2)}ForEach(${f}, id: \\.id) { ${p} in
191
+ ${d}
192
+ ${F(e+2)}}`}let l="";return a.kind==="text"?l=`${F(e+2)}Text(${JSON.stringify(a.value)})`:a.kind==="binding"?l=vo(a,e+2,r,i):l=n(a,e+2,i),l?`${l}
193
193
  ${o}`:""}).filter(Boolean).join(`
194
- `)}function me(t,e){let n=t[e];if(n!=null){if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="object"&&"kind"in n&&n.kind==="literal")return n.value}}function hb(t){let e={};for(let[n,r]of Object.entries(t)){if(n==="variant"||n==="id"||!rr.has(n))continue;let i=me(t,n);i!==void 0&&(e[n]=i)}return e}function mb(t){let e=t.variant;return e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"?!1:typeof e=="object"&&"kind"in e?e.kind==="literal"?!1:e.kind==="binding"||e.kind==="concat":!1}function JR(t,e,n){let r=t.variant;return!r||typeof r!="object"||!("kind"in r)?null:r.kind==="binding"?Vt(r,e,n):r.kind==="concat"?`"${r.parts.map(s=>typeof s=="string"?s:`\\(${Vt(s,e,n)})`).join("")}"`:null}function KR(t,e,n,r){let i=n.map.elements[t],o=me(e,"variant"),s=hb(e);if(i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp],mb(e)){let l=JR(e,n,r),d=`.applyVcStyle(VcTheme.resolve(${JSON.stringify(t)}, variant: ${l}))`,p=Xt({elementName:t,theme:{defaults:{},variants:{}},tokens:n.tokens,instanceLiterals:s}),f=fd(p),m=f.filter(g=>g.startsWith(".padding")),y=f.filter(g=>!g.startsWith(".padding"));return[...m,d,...y]}let c=Xt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return fd(c)}function YR(t){return[]}function XR(t,e,n,r){let i=t.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=Vt(i,e,n);return`${F(r+1)}ForEach(${o}, id: \\.value) { option in
194
+ `)}function me(t,e){let n=t[e];if(n!=null){if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="object"&&"kind"in n&&n.kind==="literal")return n.value}}function _b(t){let e={};for(let[n,r]of Object.entries(t)){if(n==="variant"||n==="id"||!sr.has(n))continue;let i=me(t,n);i!==void 0&&(e[n]=i)}return e}function xb(t){let e=t.variant;return e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"?!1:typeof e=="object"&&"kind"in e?e.kind==="literal"?!1:e.kind==="binding"||e.kind==="concat":!1}function nA(t,e,n){let r=t.variant;return!r||typeof r!="object"||!("kind"in r)?null:r.kind==="binding"?Dt(r,e,n):r.kind==="concat"?`"${r.parts.map(s=>typeof s=="string"?s:`\\(${Dt(s,e,n)})`).join("")}"`:null}function rA(t,e,n,r){let i=n.map.elements[t],o=me(e,"variant"),s=_b(e);if(i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp],xb(e)){let c=nA(e,n,r),p=`.applyVcStyle(VcTheme.resolve(${JSON.stringify(t)}, variant: ${c}))`,d=Qt({elementName:t,theme:{defaults:{},variants:{}},tokens:n.tokens,instanceLiterals:s}),f=xd(d),m=f.filter(g=>g.startsWith(".padding")),y=f.filter(g=>!g.startsWith(".padding"));return[...m,p,...y]}let l=Qt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return xd(l)}function iA(t){return[]}function oA(t,e,n,r){let i=t.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=Dt(i,e,n);return`${F(r+1)}ForEach(${o}, id: \\.value) { option in
195
195
  ${F(r+2)}Button(option.label) {}
196
196
  ${F(r+1)}}`}return typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="literal"&&Array.isArray(i.value)?i.value.map(s=>`${F(r+1)}Button(${JSON.stringify(s.label)}) {}`).join(`
197
- `):`${F(r+1)}Button("--") {}`}function QR(t,e,n){let r=t.options;if(typeof r=="object"&&r!==null&&"kind"in r&&r.kind==="binding")return`${Vt(r,e,n)}.first?.label ?? ""`;if(typeof r=="object"&&r!==null&&"kind"in r&&r.kind==="literal"&&Array.isArray(r.value)){let i=r.value;return JSON.stringify(i[0]?.label??"")}return'""'}function Vt(t,e,n){wa(e,t.scope);let r=t.scope??n??e.propsRoot??"vm";return t.path?`${r}.${t.path}`:r}function gb(t){return(e,n)=>{let r=e.map(i=>`let ${i}`).join(", ");return`${F(t)}Group {
197
+ `):`${F(r+1)}Button("--") {}`}function sA(t,e,n){let r=t.options;if(typeof r=="object"&&r!==null&&"kind"in r&&r.kind==="binding")return`${Dt(r,e,n)}.first?.label ?? ""`;if(typeof r=="object"&&r!==null&&"kind"in r&&r.kind==="literal"&&Array.isArray(r.value)){let i=r.value;return JSON.stringify(i[0]?.label??"")}return'""'}function Dt(t,e,n){xa(e,t.scope);let r=t.scope??n??e.propsRoot??"vm";return t.path?`${r}.${t.path}`:r}function $b(t){return(e,n)=>{let r=e.map(i=>`let ${i}`).join(", ");return`${F(t)}Group {
198
198
  ${F(t+1)}if ${r} {
199
- ${va(n,F(2))}
199
+ ${$a(n,F(2))}
200
200
  ${F(t+1)}}
201
- ${F(t)}}`}}function go(t,e,n,r){return Yn(n,Kn([t]),()=>`${F(e)}Text(${Vt(t,n,r)})`,gb(e))}function pb(t,e,n){let r=n??e.propsRoot??"vm",i=t.value,o=t.onChange,s=o!==void 0&&typeof o=="object"&&o!==null&&"kind"in o&&o.kind==="action",a;return i&&typeof i=="object"&&"kind"in i&&i.kind==="binding"?a=Vt(i,e,n):typeof i=="string"?a=JSON.stringify(i):a='""',{valueExpr:a,hasOnChange:s}}function db(t,e,n){for(let r of t){if(r.kind==="text")return JSON.stringify(r.value);if(r.kind==="binding")return Vt(r,e,n)}return null}function yb(t,e,n,r,i){return t.map(s=>s.kind==="map"?mo(s,e,n,r):s.kind==="text"?`${F(e)}Text(${JSON.stringify(s.value)})`:s.kind==="binding"?go(s,e,r,i):n(s,e,i)).filter(Boolean).join(`
202
- `)}function mo(t,e,n,r){let i=t.item,o=Qt(r,[i],()=>n(t.body,e+2,i)),s=Vt(t.source,r,i);return`${F(e)}ForEach(${s}, id: \\.id) { ${i} in
201
+ ${F(t)}}`}}function vo(t,e,n,r){return Zn(n,Qn([t]),()=>`${F(e)}Text(${Dt(t,n,r)})`,$b(e))}function wb(t,e,n){let r=n??e.propsRoot??"vm",i=t.value,o=t.onChange,s=o!==void 0&&typeof o=="object"&&o!==null&&"kind"in o&&o.kind==="action",a;return i&&typeof i=="object"&&"kind"in i&&i.kind==="binding"?a=Dt(i,e,n):typeof i=="string"?a=JSON.stringify(i):a='""',{valueExpr:a,hasOnChange:s}}function vb(t,e,n){for(let r of t){if(r.kind==="text")return JSON.stringify(r.value);if(r.kind==="binding")return Dt(r,e,n)}return null}function Sb(t,e,n,r,i){return t.map(s=>s.kind==="map"?wo(s,e,n,r):s.kind==="text"?`${F(e)}Text(${JSON.stringify(s.value)})`:s.kind==="binding"?vo(s,e,r,i):n(s,e,i)).filter(Boolean).join(`
202
+ `)}function wo(t,e,n,r){let i=t.item,o=Zt(r,[i],()=>n(t.body,e+2,i)),s=Dt(t.source,r,i);return`${F(e)}ForEach(${s}, id: \\.id) { ${i} in
203
203
  ${o}
204
- ${F(e)}}`}function ZR(t,e,n,r,i,o){let s=F(n);if(e.leaf==="text"){let a=db(t.children,i,r);if(!a)return`${s}Text("")`;let c=`${s}Text(${a})`,l=o.map(d=>`${s}${d}`);return[c,...l].join(`
205
- `)}if(e.leaf==="button"){let a=me(t.props,"label"),l=db(t.children,i,r)??(typeof a=="string"?JSON.stringify(a):'"Button"'),d=`${s}Button(${l}) {}`,p=o.map(f=>`${s}${f}`);return[d,...p].join(`
206
- `)}if(e.leaf==="textfield"){let a=me(t.props,"placeholder"),c=typeof a=="string"?JSON.stringify(a):'""',l=ba(i.tokens,"ui.text-muted","#6b7280"),{valueExpr:d,hasOnChange:p}=pb(t.props,i,r),f=p?`.init(get: { ${d} }, set: { _ in })`:`.constant(${d})`,m=`${s}TextField("", text: ${f}, prompt: Text(${c}).foregroundStyle(${l}))`,g=[...o,...YR(t.name)].map(w=>`${s}${w}`);return[m,...g].join(`
207
- `)}if(e.leaf==="texteditor"){let a=me(t.props,"placeholder"),c=typeof a=="string"?JSON.stringify(a):'""',l=ba(i.tokens,"ui.text-muted","#6b7280"),p=o.find(x=>x.startsWith(".frame(minHeight:"))?.match(/minHeight: (\d+)/)?.[1]??"72",{valueExpr:f,hasOnChange:m}=pb(t.props,i,r),y=m?`.init(get: { ${f} }, set: { _ in })`:`.constant(${f})`,g=o.filter(x=>x.startsWith(".foregroundStyle(")||x.startsWith(".font(")||x.startsWith(".fontWeight(")),w=o.filter(x=>!x.startsWith(".foregroundStyle(")&&!x.startsWith(".font(")&&!x.startsWith(".fontWeight(")&&!x.startsWith(".frame(minHeight:")),b=g.map(x=>`${s} ${x}`),P=w.map(x=>`${s}${x}`);return[`${s}ZStack(alignment: .topLeading) {`,`${s} if true {`,`${s} Text(${c})`,`${s} .font(.system(size: 14))`,`${s} .foregroundStyle(${l})`,`${s} .padding(.top, 8)`,`${s} .padding(.horizontal, 4)`,`${s} .allowsHitTesting(false)`,`${s} }`,`${s} TextEditor(text: ${y})`,`${s} .scrollContentBackground(.hidden)`,...b,`${s}}`,`${s}.frame(minHeight: ${p})`,...P].join(`
208
- `)}if(e.leaf==="picker"){let a=ba(i.tokens,"ui.text","#111827"),c=ba(i.tokens,"ui.text-muted","#6b7280"),l=XR(t.props,i,r,n),d=QR(t.props,i,r),p=o.filter(g=>!g.startsWith(".frame")),f=me(t.props,"width"),m=typeof f=="number"?`${s}.frame(width: ${f})`:`${s}.frame(maxWidth: .infinity)`;return[`${s}Menu {`,l,`${s}} label: {`,`${s} HStack(spacing: 0) {`,`${s} Text(${d})`,`${s} .foregroundStyle(${a})`,`${s} .lineLimit(1)`,`${s} Spacer(minLength: 0)`,`${s} Image(systemName: "chevron.down")`,`${s} .font(.system(size: 12, weight: .semibold))`,`${s} .foregroundStyle(${c})`,`${s} }`,`${s} .padding(.vertical, 9)`,`${s} .padding(.leading, 12)`,`${s} .padding(.trailing, 12)`,...p.map(g=>`${s} ${g}`),`${s}}`,m,`${s}.frame(minHeight: 42)`,`${s}.frame(maxWidth: .infinity)`].join(`
209
- `)}if(e.leaf==="spacer")return`${s}Spacer()`;if(e.leaf==="divider")return`${s}Divider()`;if(e.leaf==="image"){let a=me(t.props,"src")??me(t.props,"name"),l=`${s}Image(systemName: ${JSON.stringify(typeof a=="string"?a:"photo")})`,d=o.map(p=>`${s}${p}`);return[l,...d].join(`
210
- `)}if(e.leaf==="progressview"){let a=`${s}ProgressView()`,c=o.map(l=>`${s}${l}`);return[a,...c].join(`
211
- `)}if(e.leaf==="toggle"){let a=me(t.props,"label")??"",c=`${s}Toggle(${JSON.stringify(a)}, isOn: .constant(false))`,l=o.map(d=>`${s}${d}`);return[c,...l].join(`
212
- `)}return`${s}Text("/* unsupported leaf: ${t.name} */")`}function eA(t,e,n,r,i,o,s){let a=yb(t.children,n+2,i,o,r);if(e.container==="vstack"){let l=e.spacingProp?me(t.props,e.spacingProp):void 0,d=typeof l=="number"?l:0,p=`${F(n+1)}VStack(alignment: .leading, spacing: ${d}) {
204
+ ${F(e)}}`}function aA(t,e,n,r,i,o){let s=F(n);if(e.leaf==="text"){let a=vb(t.children,i,r);if(!a)return`${s}Text("")`;let l=`${s}Text(${a})`,c=o.map(p=>`${s}${p}`);return[l,...c].join(`
205
+ `)}if(e.leaf==="button"){let a=me(t.props,"label"),c=vb(t.children,i,r)??(typeof a=="string"?JSON.stringify(a):'"Button"'),p=`${s}Button(${c}) {}`,d=o.map(f=>`${s}${f}`);return[p,...d].join(`
206
+ `)}if(e.leaf==="textfield"){let a=me(t.props,"placeholder"),l=typeof a=="string"?JSON.stringify(a):'""',c=Sa(i.tokens,"ui.text-muted","#6b7280"),{valueExpr:p,hasOnChange:d}=wb(t.props,i,r),f=d?`.init(get: { ${p} }, set: { _ in })`:`.constant(${p})`,m=`${s}TextField("", text: ${f}, prompt: Text(${l}).foregroundStyle(${c}))`,g=[...o,...iA(t.name)].map(w=>`${s}${w}`);return[m,...g].join(`
207
+ `)}if(e.leaf==="texteditor"){let a=me(t.props,"placeholder"),l=typeof a=="string"?JSON.stringify(a):'""',c=Sa(i.tokens,"ui.text-muted","#6b7280"),d=o.find(x=>x.startsWith(".frame(minHeight:"))?.match(/minHeight: (\d+)/)?.[1]??"72",{valueExpr:f,hasOnChange:m}=wb(t.props,i,r),y=m?`.init(get: { ${f} }, set: { _ in })`:`.constant(${f})`,g=o.filter(x=>x.startsWith(".foregroundStyle(")||x.startsWith(".font(")||x.startsWith(".fontWeight(")),w=o.filter(x=>!x.startsWith(".foregroundStyle(")&&!x.startsWith(".font(")&&!x.startsWith(".fontWeight(")&&!x.startsWith(".frame(minHeight:")),b=g.map(x=>`${s} ${x}`),P=w.map(x=>`${s}${x}`);return[`${s}ZStack(alignment: .topLeading) {`,`${s} if true {`,`${s} Text(${l})`,`${s} .font(.system(size: 14))`,`${s} .foregroundStyle(${c})`,`${s} .padding(.top, 8)`,`${s} .padding(.horizontal, 4)`,`${s} .allowsHitTesting(false)`,`${s} }`,`${s} TextEditor(text: ${y})`,`${s} .scrollContentBackground(.hidden)`,...b,`${s}}`,`${s}.frame(minHeight: ${d})`,...P].join(`
208
+ `)}if(e.leaf==="picker"){let a=Sa(i.tokens,"ui.text","#111827"),l=Sa(i.tokens,"ui.text-muted","#6b7280"),c=oA(t.props,i,r,n),p=sA(t.props,i,r),d=o.filter(g=>!g.startsWith(".frame")),f=me(t.props,"width"),m=typeof f=="number"?`${s}.frame(width: ${f})`:`${s}.frame(maxWidth: .infinity)`;return[`${s}Menu {`,c,`${s}} label: {`,`${s} HStack(spacing: 0) {`,`${s} Text(${p})`,`${s} .foregroundStyle(${a})`,`${s} .lineLimit(1)`,`${s} Spacer(minLength: 0)`,`${s} Image(systemName: "chevron.down")`,`${s} .font(.system(size: 12, weight: .semibold))`,`${s} .foregroundStyle(${l})`,`${s} }`,`${s} .padding(.vertical, 9)`,`${s} .padding(.leading, 12)`,`${s} .padding(.trailing, 12)`,...d.map(g=>`${s} ${g}`),`${s}}`,m,`${s}.frame(minHeight: 42)`,`${s}.frame(maxWidth: .infinity)`].join(`
209
+ `)}if(e.leaf==="spacer")return`${s}Spacer()`;if(e.leaf==="divider")return`${s}Divider()`;if(e.leaf==="image"){let a=me(t.props,"src")??me(t.props,"name"),c=`${s}Image(systemName: ${JSON.stringify(typeof a=="string"?a:"photo")})`,p=o.map(d=>`${s}${d}`);return[c,...p].join(`
210
+ `)}if(e.leaf==="progressview"){let a=`${s}ProgressView()`,l=o.map(c=>`${s}${c}`);return[a,...l].join(`
211
+ `)}if(e.leaf==="toggle"){let a=me(t.props,"label")??"",l=`${s}Toggle(${JSON.stringify(a)}, isOn: .constant(false))`,c=o.map(p=>`${s}${p}`);return[l,...c].join(`
212
+ `)}return`${s}Text("/* unsupported leaf: ${t.name} */")`}function cA(t,e,n,r,i,o,s){let a=Sb(t.children,n+2,i,o,r);if(e.container==="vstack"){let c=e.spacingProp?me(t.props,e.spacingProp):void 0,p=typeof c=="number"?c:0,d=`${F(n+1)}VStack(alignment: .leading, spacing: ${p}) {
213
213
  ${a}
214
- ${F(n+1)}}`;return Ue(p,s,n+1)}if(e.container==="hstack"){let l=e.spacingProp?me(t.props,e.spacingProp):void 0,d=typeof l=="number"?l:0,p=me(t.props,"align"),f=me(t.props,"height"),m=p==="center"||typeof f=="number"?".center":".top",y=me(t.props,"justify"),g=me(t.props,"flex"),w=me(t.props,"wrap"),P=t.name==="TableHeader"||t.name==="TableRow"||y!==void 0||typeof g=="number",x=y==="end"?".trailing":y==="center"?".center":".leading",R=[];P&&R.push(`.frame(maxWidth: .infinity, alignment: ${x})`),typeof f=="number"&&R.push(`.frame(height: ${f})`);let O=a;if(y==="between"){let U=t.children.map(oe=>oe.kind==="map"?mo(oe,n+2,i,o):oe.kind==="text"?`${F(n+2)}Text(${JSON.stringify(oe.value)})`:oe.kind==="binding"?go(oe,n+2,o,r):i(oe,n+2,r)).filter(Boolean);if(U.length>=2){let oe=U[0],ge=U.slice(1);O=[oe,`${F(n+2)}Spacer()`,...ge].join(`
215
- `)}}else if(w===!0){O=t.children.map(oe=>{if(oe.kind==="map")return mo(oe,n+2,i,o);if(oe.kind==="text")return`${F(n+2)}Text(${JSON.stringify(oe.value)})`;if(oe.kind==="binding")return go(oe,n+2,o,r);let ge=i(oe,n+2,r);return ge||""}).filter(Boolean).join(`
216
- `);let U=`${F(n+1)}FlowLayout(spacing: ${d}) {
214
+ ${F(n+1)}}`;return Ue(d,s,n+1)}if(e.container==="hstack"){let c=e.spacingProp?me(t.props,e.spacingProp):void 0,p=typeof c=="number"?c:0,d=me(t.props,"align"),f=me(t.props,"height"),m=d==="center"||typeof f=="number"?".center":".top",y=me(t.props,"justify"),g=me(t.props,"flex"),w=me(t.props,"wrap"),P=t.name==="TableHeader"||t.name==="TableRow"||y!==void 0||typeof g=="number",x=y==="end"?".trailing":y==="center"?".center":".leading",R=[];P&&R.push(`.frame(maxWidth: .infinity, alignment: ${x})`),typeof f=="number"&&R.push(`.frame(height: ${f})`);let O=a;if(y==="between"){let U=t.children.map(oe=>oe.kind==="map"?wo(oe,n+2,i,o):oe.kind==="text"?`${F(n+2)}Text(${JSON.stringify(oe.value)})`:oe.kind==="binding"?vo(oe,n+2,o,r):i(oe,n+2,r)).filter(Boolean);if(U.length>=2){let oe=U[0],ge=U.slice(1);O=[oe,`${F(n+2)}Spacer()`,...ge].join(`
215
+ `)}}else if(w===!0){O=t.children.map(oe=>{if(oe.kind==="map")return wo(oe,n+2,i,o);if(oe.kind==="text")return`${F(n+2)}Text(${JSON.stringify(oe.value)})`;if(oe.kind==="binding")return vo(oe,n+2,o,r);let ge=i(oe,n+2,r);return ge||""}).filter(Boolean).join(`
216
+ `);let U=`${F(n+1)}FlowLayout(spacing: ${p}) {
217
217
  ${O}
218
- ${F(n+1)}}`;return Ue(U,[...s,...R],n+1)}let j=`${F(n+1)}HStack(alignment: ${m}, spacing: ${d}) {
218
+ ${F(n+1)}}`;return Ue(U,[...s,...R],n+1)}let j=`${F(n+1)}HStack(alignment: ${m}, spacing: ${p}) {
219
219
  ${O}
220
- ${F(n+1)}}`;return Ue(j,[...s,...R],n+1)}if(e.container==="group"){let l=a?`${F(n+1)}VStack(alignment: .leading, spacing: 0) {
220
+ ${F(n+1)}}`;return Ue(j,[...s,...R],n+1)}if(e.container==="group"){let c=a?`${F(n+1)}VStack(alignment: .leading, spacing: 0) {
221
221
  ${a}
222
- ${F(n+1)}}`:`${F(n+1)}VStack { EmptyView() }`;return Ue(l,s,n+1)}if(e.container==="navstack")return Ue(a,s,n+1);if(e.container==="scrollview"){let l=`${F(n+1)}ScrollView {
222
+ ${F(n+1)}}`:`${F(n+1)}VStack { EmptyView() }`;return Ue(c,s,n+1)}if(e.container==="navstack")return Ue(a,s,n+1);if(e.container==="scrollview"){let c=`${F(n+1)}ScrollView {
223
223
  ${a}
224
- ${F(n+1)}}`;return Ue(l,s,n+1)}if(e.container==="field"){let l=me(t.props,"label"),d=me(t.props,"gap"),p=typeof d=="number"?d:4,f=typeof l=="string"?`
225
- ${F(n+2)}Text(${JSON.stringify(l)})
226
- ${F(n+2)} .applyVcStyle(VcTheme.resolve("Text", variant: "field-label"))`:"",m=`${F(n+1)}VStack(alignment: .leading, spacing: ${p}) {${f}
224
+ ${F(n+1)}}`;return Ue(c,s,n+1)}if(e.container==="field"){let c=me(t.props,"label"),p=me(t.props,"gap"),d=typeof p=="number"?p:4,f=typeof c=="string"?`
225
+ ${F(n+2)}Text(${JSON.stringify(c)})
226
+ ${F(n+2)} .applyVcStyle(VcTheme.resolve("Text", variant: "field-label"))`:"",m=`${F(n+1)}VStack(alignment: .leading, spacing: ${d}) {${f}
227
227
  ${a}
228
- ${F(n+1)}}`;return Ue(m,s,n+1)}if(e.container==="tablestack"){let l=me(t.props,"separator"),d=me(t.props,"separatorColor"),p=typeof l=="number"&&l>0,f=t.children.map(g=>g.kind==="map"?mo(g,n+2,i,o):i(g,n+2,r)).filter(Boolean),m;if(p){let w=hd(t.name,t.props,o).separatorColor??d,b="Color.gray.opacity(0.2)";if(typeof w=="string"){let R=w.match(/^#([0-9a-fA-F]{6})$/);if(R){let O=parseInt(R[1].slice(0,2),16)/255,j=parseInt(R[1].slice(2,4),16)/255,U=parseInt(R[1].slice(4,6),16)/255;b=`Color(red: ${O}, green: ${j}, blue: ${U})`}}let P=l,x=P===1?`${F(n+2)}Divider().overlay(${b})`:`${F(n+2)}Rectangle().fill(${b}).frame(height: ${P})`;m=f.flatMap((R,O)=>O<f.length-1?[R,x]:[R])}else m=f;let y=`${F(n+1)}VStack(alignment: .leading, spacing: 0) {
228
+ ${F(n+1)}}`;return Ue(m,s,n+1)}if(e.container==="tablestack"){let c=me(t.props,"separator"),p=me(t.props,"separatorColor"),d=typeof c=="number"&&c>0,f=t.children.map(g=>g.kind==="map"?wo(g,n+2,i,o):i(g,n+2,r)).filter(Boolean),m;if(d){let w=$d(t.name,t.props,o).separatorColor??p,b="Color.gray.opacity(0.2)";if(typeof w=="string"){let R=w.match(/^#([0-9a-fA-F]{6})$/);if(R){let O=parseInt(R[1].slice(0,2),16)/255,j=parseInt(R[1].slice(2,4),16)/255,U=parseInt(R[1].slice(4,6),16)/255;b=`Color(red: ${O}, green: ${j}, blue: ${U})`}}let P=c,x=P===1?`${F(n+2)}Divider().overlay(${b})`:`${F(n+2)}Rectangle().fill(${b}).frame(height: ${P})`;m=f.flatMap((R,O)=>O<f.length-1?[R,x]:[R])}else m=f;let y=`${F(n+1)}VStack(alignment: .leading, spacing: 0) {
229
229
  ${m.join(`
230
230
  `)}
231
- ${F(n+1)}}`;return Ue(y,s,n+1)}if(e.container==="cellgroup"){let l=me(t.props,"width"),d=me(t.props,"flex"),p=me(t.props,"align"),f=p==="end"?".trailing":p==="center"?".center":".leading",m=typeof d=="number",y=[...s,".lineLimit(1)"];typeof l=="number"?y.push(`.frame(width: ${l}, alignment: ${f})`):m&&y.push(`.frame(maxWidth: .infinity, alignment: ${f})`);let g=a?`${F(n+1)}Group {
231
+ ${F(n+1)}}`;return Ue(y,s,n+1)}if(e.container==="cellgroup"){let c=me(t.props,"width"),p=me(t.props,"flex"),d=me(t.props,"align"),f=d==="end"?".trailing":d==="center"?".center":".leading",m=typeof p=="number",y=[...s,".lineLimit(1)"];typeof c=="number"?y.push(`.frame(width: ${c}, alignment: ${f})`):m&&y.push(`.frame(maxWidth: .infinity, alignment: ${f})`);let g=a?`${F(n+1)}Group {
232
232
  ${a}
233
233
  ${F(n+2)}.frame(maxWidth: .infinity, alignment: ${f})
234
- ${F(n+1)}}`:`${F(n+1)}Group { EmptyView() }`;return Ue(g,y,n+1)}let c=a?`${F(n+1)}Group {
234
+ ${F(n+1)}}`:`${F(n+1)}Group { EmptyView() }`;return Ue(g,y,n+1)}let l=a?`${F(n+1)}Group {
235
235
  ${a}
236
- ${F(n+1)}}`:`${F(n+1)}Group { EmptyView() }`;return Ue(c,s,n+1)}function hd(t,e,n){let r=me(e,"variant"),i=hb(e);return Xt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:typeof r=="string"?r:void 0,instanceLiterals:i})}function tA(t){if(!t||typeof t!="string")return null;let e=t.match(/repeat\((\d+),\s*minmax\(0,\s*1fr\)\)/);if(e)return{kind:"equal-columns",count:Number(e[1])};let n=t.match(/repeat\(auto-fit,\s*minmax\((\d+)px/);if(n)return{kind:"adaptive",minWidth:Number(n[1])};let r=t.trim().split(/\s+/);return r.length>=2?{kind:"fixed-columns",widths:r}:null}function nA(t,e,n,r,i,o){let s=KR(t.name,t.props,o,r);if(e.leaf)return ZR(t,e,n,r,o,s);if(e.container==="group"&&!mb(t.props)){let a=hd(t.name,t.props,o),c=a.display,l=a.gridTemplateColumns,d=a.flexDirection;if(c==="grid"&&l){let p=tA(l);if(p?.kind==="adaptive")return rA(t,n,r,i,o,s,p.minWidth);if(p?.kind==="equal-columns")return iA(t,n,r,i,o,s,p.count);if(p?.kind==="fixed-columns")return sA(t,n,r,i,o,s,p.widths)}if(c==="flex"&&d==="row"){let p=yb(t.children,n+2,i,o,r),f=me(t.props,"gap"),m=typeof f=="number"?f:typeof a.gap=="number"?a.gap:0,y=`${F(n+1)}HStack(alignment: .top, spacing: ${m}) {
237
- ${p}
238
- ${F(n+1)}}`;return Ue(y,s,n+1)}}if(e.container)return eA(t,e,n,r,i,o,s);throw new Error(`Unsupported SwiftUI element config for ${t.name}`)}function rA(t,e,n,r,i,o,s){let a=me(t.props,"gap"),c=typeof a=="number"?a:16,l=fb(t.children,e,r,i,n),d=`${F(e+1)}LazyVGrid(columns: [GridItem(.adaptive(minimum: ${s}))], spacing: ${c}) {
239
- ${l}
240
- ${F(e+1)}}
241
- ${F(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return Ue(d,o,e+1)}function iA(t,e,n,r,i,o,s){let a=me(t.props,"gap"),c=typeof a=="number"?a:16,l=`Array(repeating: GridItem(.flexible(), spacing: ${c}), count: ${s})`,d=fb(t.children,e,r,i,n),p=`${F(e+1)}LazyVGrid(columns: ${l}, spacing: ${c}) {
236
+ ${F(n+1)}}`:`${F(n+1)}Group { EmptyView() }`;return Ue(l,s,n+1)}function $d(t,e,n){let r=me(e,"variant"),i=_b(e);return Qt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:typeof r=="string"?r:void 0,instanceLiterals:i})}function lA(t){if(!t||typeof t!="string")return null;let e=t.match(/repeat\((\d+),\s*minmax\(0,\s*1fr\)\)/);if(e)return{kind:"equal-columns",count:Number(e[1])};let n=t.match(/repeat\(auto-fit,\s*minmax\((\d+)px/);if(n)return{kind:"adaptive",minWidth:Number(n[1])};let r=t.trim().split(/\s+/);return r.length>=2?{kind:"fixed-columns",widths:r}:null}function uA(t,e,n,r,i,o){let s=rA(t.name,t.props,o,r);if(e.leaf)return aA(t,e,n,r,o,s);if(e.container==="group"&&!xb(t.props)){let a=$d(t.name,t.props,o),l=a.display,c=a.gridTemplateColumns,p=a.flexDirection;if(l==="grid"&&c){let d=lA(c);if(d?.kind==="adaptive")return pA(t,n,r,i,o,s,d.minWidth);if(d?.kind==="equal-columns")return dA(t,n,r,i,o,s,d.count);if(d?.kind==="fixed-columns")return hA(t,n,r,i,o,s,d.widths)}if(l==="flex"&&p==="row"){let d=Sb(t.children,n+2,i,o,r),f=me(t.props,"gap"),m=typeof f=="number"?f:typeof a.gap=="number"?a.gap:0,y=`${F(n+1)}HStack(alignment: .top, spacing: ${m}) {
242
237
  ${d}
238
+ ${F(n+1)}}`;return Ue(y,s,n+1)}}if(e.container)return cA(t,e,n,r,i,o,s);throw new Error(`Unsupported SwiftUI element config for ${t.name}`)}function pA(t,e,n,r,i,o,s){let a=me(t.props,"gap"),l=typeof a=="number"?a:16,c=bb(t.children,e,r,i,n),p=`${F(e+1)}LazyVGrid(columns: [GridItem(.adaptive(minimum: ${s}))], spacing: ${l}) {
239
+ ${c}
243
240
  ${F(e+1)}}
244
- ${F(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return Ue(p,o,e+1)}function oA(t,e){if(t.kind!=="component")return null;let r=hd(t.name,t.props,e).background;if(typeof r!="string"||r==="transparent")return null;let i=r.match(/^#([0-9a-fA-F]{6})$/);if(i){let o=parseInt(i[1].slice(0,2),16)/255,s=parseInt(i[1].slice(2,4),16)/255,a=parseInt(i[1].slice(4,6),16)/255;return`Color(red: ${o}, green: ${s}, blue: ${a})`}return`Color(${JSON.stringify(r)})`}function sA(t,e,n,r,i,o,s){let a=t.children,c=[];for(let p=0;p<a.length;p++){let f=a[p],m="";if(f.kind==="map"?m=mo(f,e+2,r,i):f.kind==="text"?m=`${F(e+2)}Text(${JSON.stringify(f.value)})`:f.kind==="binding"?m=go(f,e+2,i,n):m=r(f,e+2,n),!m)continue;let y=s[p],g=y?.match(/^(\d+)px$/);if(g){m+=`
241
+ ${F(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return Ue(p,o,e+1)}function dA(t,e,n,r,i,o,s){let a=me(t.props,"gap"),l=typeof a=="number"?a:16,c=`Array(repeating: GridItem(.flexible(), spacing: ${l}), count: ${s})`,p=bb(t.children,e,r,i,n),d=`${F(e+1)}LazyVGrid(columns: ${c}, spacing: ${l}) {
242
+ ${p}
243
+ ${F(e+1)}}
244
+ ${F(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return Ue(d,o,e+1)}function fA(t,e){if(t.kind!=="component")return null;let r=$d(t.name,t.props,e).background;if(typeof r!="string"||r==="transparent")return null;let i=r.match(/^#([0-9a-fA-F]{6})$/);if(i){let o=parseInt(i[1].slice(0,2),16)/255,s=parseInt(i[1].slice(2,4),16)/255,a=parseInt(i[1].slice(4,6),16)/255;return`Color(red: ${o}, green: ${s}, blue: ${a})`}return`Color(${JSON.stringify(r)})`}function hA(t,e,n,r,i,o,s){let a=t.children,l=[];for(let d=0;d<a.length;d++){let f=a[d],m="";if(f.kind==="map"?m=wo(f,e+2,r,i):f.kind==="text"?m=`${F(e+2)}Text(${JSON.stringify(f.value)})`:f.kind==="binding"?m=vo(f,e+2,i,n):m=r(f,e+2,n),!m)continue;let y=s[d],g=y?.match(/^(\d+)px$/);if(g){m+=`
245
245
  ${F(e+2)}.frame(width: ${Number(g[1])}, alignment: .topLeading)`,m+=`
246
- ${F(e+2)}.frame(maxHeight: .infinity, alignment: .topLeading)`;let w=oA(f,i);w&&(m+=`
246
+ ${F(e+2)}.frame(maxHeight: .infinity, alignment: .topLeading)`;let w=fA(f,i);w&&(m+=`
247
247
  ${F(e+2)}.background(${w})`)}else y==="1fr"&&(m+=`
248
248
  ${F(e+3)}.frame(maxWidth: .infinity, alignment: .topLeading)`,m=`${F(e+2)}ScrollView {
249
249
  ${m}
250
250
  ${F(e+2)}}`,m+=`
251
- ${F(e+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`);c.push(m)}let l=c.join(`
252
- `),d=`${F(e+1)}HStack(spacing: 0) {
253
- ${l}
254
- ${F(e+1)}}`;return Ue(d,[...o,".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"],e+1)}function aA(t,e,n,r){let o=`(${Qt(r,[],()=>Object.entries(t.props).map(([s,a])=>typeof a=="object"&&a!==null&&"kind"in a&&a.kind==="binding"?`${s}: ${Vt(a,r,n)}`:`${s}: ${JSON.stringify(a)}`).join(", "))})`;return`${F(e)}${t.name}${o}`}function cA(t){let e=(n,r,i)=>{if(n.kind==="viewRef")return aA(n,r,i,t);if(n.kind!=="component")return"";let o=t.map.elements[n.name];if(!o)throw new Error(`Element "${n.name}" is not in SwiftUI element map (prototype subset)`);let s=o.leaf?n.children.filter(c=>c.kind==="binding"):[],a=Kn([...Object.values(n.props),...s]);return Yn(t,a,()=>nA(n,o,r,i,e,t),gb(r))};return e}function wb(t,e,n=2){let r=cA(e);if(t.kind!=="component")throw new Error("SwiftUI lowering root must be a component node");return r(t,n)}var vb=K(()=>{"use strict";vt();ld();pd();ub()});var _b={};$n(_b,{renderSwiftComponent:()=>_a});function bb(t){let e=t.match(/^(\w+)\[\]$/);return e?`[${bb(e[1])}]`:t==="string"?"String":t==="number"?"Double":t==="boolean"?"Bool":t}function lA(t){return t.propsType?t.propDecls?`${t.propDecls.map(n=>{let r=bb(n.type);return n.optional?` var ${n.name}: ${r}? = nil`:` let ${n.name}: ${r}`}).join(`
251
+ ${F(e+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`);l.push(m)}let c=l.join(`
252
+ `),p=`${F(e+1)}HStack(spacing: 0) {
253
+ ${c}
254
+ ${F(e+1)}}`;return Ue(p,[...o,".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"],e+1)}function mA(t,e,n,r){let o=`(${Zt(r,[],()=>Object.entries(t.props).map(([s,a])=>typeof a=="object"&&a!==null&&"kind"in a&&a.kind==="binding"?`${s}: ${Dt(a,r,n)}`:`${s}: ${JSON.stringify(a)}`).join(", "))})`;return`${F(e)}${t.name}${o}`}function gA(t){let e=(n,r,i)=>{if(n.kind==="viewRef")return mA(n,r,i,t);if(n.kind!=="component")return"";let o=t.map.elements[n.name];if(!o)throw new Error(`Element "${n.name}" is not in SwiftUI element map (prototype subset)`);let s=o.leaf?n.children.filter(l=>l.kind==="binding"):[],a=Qn([...Object.values(n.props),...s]);return Zn(t,a,()=>uA(n,o,r,i,e,t),$b(r))};return e}function Cb(t,e,n=2){let r=gA(e);if(t.kind!=="component")throw new Error("SwiftUI lowering root must be a component node");return r(t,n)}var kb=K(()=>{"use strict";nt();wd();bd();yb()});var Pb={};kn(Pb,{renderSwiftComponent:()=>Ca});function Eb(t){let e=t.match(/^(\w+)\[\]$/);return e?`[${Eb(e[1])}]`:t==="string"?"String":t==="number"?"Double":t==="boolean"?"Bool":t}function yA(t){return t.propsType?t.propDecls?`${t.propDecls.map(n=>{let r=Eb(n.type);return n.optional?` var ${n.name}: ${r}? = nil`:` let ${n.name}: ${r}`}).join(`
255
255
  `)}
256
256
  `:` let props: ${t.propsType}
257
- `:""}async function _a(t,e){let n=await ab(e.elementMapPath),r=e.allowlistExtra??[],i=t.isPartial?t.exportName:t.exportName.replace(/View$/,"")||t.exportName,o={map:n,theme:e.theme,tokens:e.tokens,allowlistExtra:r,propsRoot:t.propDecls?.[0]?.name,optionalProps:new Set(t.propDecls?.filter(d=>d.optional).map(d=>d.name))},s=wb(t.root,o,4),a=lA(t),c=!t.isPartial&&t.viewModel?` let vm: ${t.viewModel}
257
+ `:""}async function Ca(t,e){let n=await hb(e.elementMapPath),r=e.allowlistExtra??[],i=t.isPartial?t.exportName:t.exportName.replace(/View$/,"")||t.exportName,o={map:n,theme:e.theme,tokens:e.tokens,allowlistExtra:r,propsRoot:t.propDecls?.[0]?.name,optionalProps:new Set(t.propDecls?.filter(p=>p.optional).map(p=>p.name))},s=Cb(t.root,o,4),a=yA(t),l=!t.isPartial&&t.viewModel?` let vm: ${t.viewModel}
258
258
  `:"";return`/**
259
259
  * Auto-generated SwiftUI view from ${t.source}
260
260
  * DO NOT EDIT \u2014 prototype SwiftUI lowering (#21)
@@ -262,14 +262,14 @@ ${F(e+1)}}`;return Ue(d,[...o,".frame(maxWidth: .infinity, maxHeight: .infinity,
262
262
  import SwiftUI
263
263
 
264
264
  struct ${i}: View {
265
- ${c}${a} var body: some View {
265
+ ${l}${a} var body: some View {
266
266
  ${s}
267
267
  }
268
268
  }
269
- `}var md=K(()=>{"use strict";cb();vb()});import{readFile as uA,stat as pA}from"node:fs/promises";import{resolve as xb}from"node:path";function $b(){return"views/preview"}function gd(t){return`${t.charAt(0).toLowerCase()}${t.slice(1)}Mock`}function yo(t,e,n){let r=ye(t),i=e.preview?.mocksDir??$b();return xb(r,i,`${n}.mock.yaml`)}function dA(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function fA(t,e){if(!dA(t))throw new xa(`${e} must be a YAML object (ViewModel fields at the root)`);return t}async function wo(t){let e;try{e=await uA(t,"utf-8")}catch{throw new xa(`Preview mock not found: ${t}`)}let n=lt.load(e);return fA(n,t)}function hA(t,e){let n=gd(t);return`/** Auto-built from views/preview/${t}.mock.yaml \u2014 preview / example only */
269
+ `}var Sd=K(()=>{"use strict";mb();kb()});import{readFile as wA,stat as vA}from"node:fs/promises";import{resolve as Ib}from"node:path";function Rb(){return"views/preview"}function Cd(t){return`${bA}${t}`}function Wr(t){return`${t.charAt(0).toLowerCase()}${t.slice(1)}Mock`}function bo(t,e,n){let r=ye(t),i=e.preview?.mocksDir??Rb();return Ib(r,i,`${n}.mock.yaml`)}function _A(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function xA(t,e){if(!_A(t))throw new ka(`${e} must be a YAML object (ViewModel fields at the root)`);return t}async function _o(t){let e;try{e=await wA(t,"utf-8")}catch{throw new ka(`Preview mock not found: ${t}`)}let n=dt.load(e);return xA(n,t)}function $A(t,e){let n=Wr(t);return`/** Auto-built from views/preview/${t}.mock.yaml \u2014 preview / example only */
270
270
  export const ${n} = ${JSON.stringify(e,null,2)};
271
- `}async function Sb(t,e,n){let r=yo(t,e,n),i=await wo(r);return hA(n,i)}async function Cb(t,e){let n=ye(t),r=e.preview?.mocksDir??$b();return xb(n,r)}async function qr(t){try{return await pA(t),!0}catch{return!1}}var xa,Br=K(()=>{"use strict";ir();bt();xa=class extends Error{constructor(e){super(e),this.name="PreviewMockError"}}});var Eb={};$n(Eb,{renderSwiftUIRuntime:()=>yA});import{mkdir as mA,writeFile as Xn}from"node:fs/promises";import{resolve as Zt}from"node:path";function kb(){return Zt(Ee(),"renderers/swiftui/templates")}async function yA(t,e,n,r,i){let o=Zt(e.generated.reactDir,"../swiftui");if(await mA(o,{recursive:!0}),r?await Xn(Zt(o,"VcTheme.swift"),ob(r.theme,r.tokens),"utf-8"):await Xn(Zt(o,"VcTheme.swift"),await Et(kb(),"VcTheme.swift.hbs",{}),"utf-8"),await Xn(Zt(o,"FlowLayout.swift"),gA,"utf-8"),i&&r){for(let s of i.partials)try{let a=await _a(s,{theme:r.theme,tokens:r.tokens}),c=Zt(o,`${s.exportName}.generated.swift`);await Xn(c,a,"utf-8"),console.log(` swiftui/${s.exportName} \u2192 ${c}`)}catch(a){console.warn(` swiftui/${s.exportName}: skipped (${a.message})`)}for(let s of n.views){let a=i.screens.get(s.screenName);if(a)try{let c=await _a(a,{theme:r.theme,tokens:r.tokens}),l=Zt(o,`${s.screenName}.generated.swift`);await Xn(l,c,"utf-8"),console.log(` swiftui/${s.screenName} \u2192 ${l}`)}catch(c){console.warn(` swiftui/${s.screenName}: skipped (${c.message})`)}}}for(let s of n.views)if(s.targets.includes("swiftui")){let a=Zt(o,`${s.screenName}.swift`);await Xn(a,await Et(kb(),"Screen.swift.hbs",{screenName:s.screenName}),"utf-8")}for(let s of n.views){let a=yo(t,e,s.screenName);if(await qr(a))try{let c=await wo(a),l=JSON.stringify(c,null,2)+`
272
- `,d=Zt(o,`${s.screenName}.SampleData.json`);await Xn(d,l,"utf-8"),console.log(` swiftui/${s.screenName}.SampleData.json \u2192 ${d}`)}catch(c){console.warn(` swiftui/${s.screenName}.SampleData.json: skipped (${c.message})`)}}}var gA,Pb=K(()=>{"use strict";Ut();fo();sb();md();Br();gA=`import SwiftUI
271
+ `}async function Ab(t,e,n){let r=bo(t,e,n),i=await _o(r);return $A(n,i)}async function Tb(t,e){let n=ye(t),r=e.preview?.mocksDir??Rb();return Ib(n,r)}async function Ur(t){try{return await vA(t),!0}catch{return!1}}var bA,ka,er=K(()=>{"use strict";ar();xt();bA="view-contracts:preview/mock/",ka=class extends Error{constructor(e){super(e),this.name="PreviewMockError"}}});var Nb={};kn(Nb,{renderSwiftUIRuntime:()=>kA});import{mkdir as SA,writeFile as tr}from"node:fs/promises";import{resolve as en}from"node:path";function Ob(){return en(Ce(),"renderers/swiftui/templates")}async function kA(t,e,n,r,i){let o=en(e.generated.reactDir,"../swiftui");if(await SA(o,{recursive:!0}),r?await tr(en(o,"VcTheme.swift"),db(r.theme,r.tokens),"utf-8"):await tr(en(o,"VcTheme.swift"),await It(Ob(),"VcTheme.swift.hbs",{}),"utf-8"),await tr(en(o,"FlowLayout.swift"),CA,"utf-8"),i&&r){for(let s of i.partials)try{let a=await Ca(s,{theme:r.theme,tokens:r.tokens}),l=en(o,`${s.exportName}.generated.swift`);await tr(l,a,"utf-8"),console.log(` swiftui/${s.exportName} \u2192 ${l}`)}catch(a){console.warn(` swiftui/${s.exportName}: skipped (${a.message})`)}for(let s of n.views){let a=i.screens.get(s.screenName);if(a)try{let l=await Ca(a,{theme:r.theme,tokens:r.tokens}),c=en(o,`${s.screenName}.generated.swift`);await tr(c,l,"utf-8"),console.log(` swiftui/${s.screenName} \u2192 ${c}`)}catch(l){console.warn(` swiftui/${s.screenName}: skipped (${l.message})`)}}}for(let s of n.views)if(s.targets.includes("swiftui")){let a=en(o,`${s.screenName}.swift`);await tr(a,await It(Ob(),"Screen.swift.hbs",{screenName:s.screenName}),"utf-8")}for(let s of n.views){let a=bo(t,e,s.screenName);if(await Ur(a))try{let l=await _o(a),c=JSON.stringify(l,null,2)+`
272
+ `,p=en(o,`${s.screenName}.SampleData.json`);await tr(p,c,"utf-8"),console.log(` swiftui/${s.screenName}.SampleData.json \u2192 ${p}`)}catch(l){console.warn(` swiftui/${s.screenName}.SampleData.json: skipped (${l.message})`)}}}var CA,Mb=K(()=>{"use strict";Mt();go();fb();Sd();er();CA=`import SwiftUI
273
273
 
274
274
  /// CSS flex-wrap equivalent: wraps children to next line when horizontal space runs out.
275
275
  struct FlowLayout: Layout {
@@ -312,35 +312,35 @@ struct FlowLayout: Layout {
312
312
  }
313
313
  }
314
314
  }
315
- `});import{resolve as wA}from"node:path";function vA(t){xs(Object.keys(t.elements),at,Ib);for(let[e,n]of Object.entries(t.elements)){let r=n.container!==void 0&&n.container!==null,i=n.leaf!==void 0&&n.leaf!==null;if(r===i)throw new Error(`${Ib}: element "${e}" must have exactly one of "container" or "leaf"`)}}async function Rb(t){if(!t&&yd)return yd;let e=t??wA(Ee(),"renderers/compose/elements.yaml"),n=await _r(e);return vA(n),t||(yd=n),n}var Ib,yd,Ab=K(()=>{"use strict";vt();Ut();$s();Ib="renderers/compose/elements.yaml",yd=null});function ze(t){if(typeof t=="number")return t;if(typeof t=="boolean")return null;let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function bA(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let n=e[1],r=parseInt(n.slice(0,2),16),i=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16);return`Color(${r}, ${i}, ${o})`}function _A(t){let e=t.match(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(!e)return null;let n=Number(e[1])/255,r=Number(e[2])/255,i=Number(e[3])/255,o=Number(e[4]);return`Color(${n}f, ${r}f, ${i}f, ${o}f)`}function Hr(t){return t==="transparent"?"Color.Transparent":bA(t)??_A(t)??null}function xA(t){let e=ze(t);if(e!==null)return{kind:"uniform",value:e};if(typeof t!="string")return null;let n=t.trim().split(/\s+/);if(n.length===2){let r=ze(n[0]),i=ze(n[1]);if(r!==null&&i!==null)return{kind:"shorthand",vertical:r,horizontal:i}}return null}function $A(t){return typeof t!="string"?null:{bold:"FontWeight.Bold",semibold:"FontWeight.SemiBold",medium:"FontWeight.Medium",regular:"FontWeight.Normal",700:"FontWeight.Bold",600:"FontWeight.SemiBold",500:"FontWeight.Medium",400:"FontWeight.Normal"}[t]??null}function SA(t){return typeof t!="string"?null:{start:"TextAlign.Start",center:"TextAlign.Center",end:"TextAlign.End"}[t]??null}function CA(t){return typeof t!="string"?null:{start:"Alignment.Start",center:"Alignment.CenterVertically",end:"Alignment.Bottom",stretch:"Alignment.CenterVertically"}[t]??null}function Tb(t,e){return t==="between"||t==="spaceBetween"?"Arrangement.SpaceBetween":t==="around"||t==="spaceAround"?"Arrangement.SpaceAround":t==="spaceEvenly"?"Arrangement.SpaceEvenly":t==="end"?"Arrangement.End":t==="center"?"Arrangement.Center":`Arrangement.spacedBy(${e})`}function Ob(t){return{topStart:"Alignment.TopStart",top:"Alignment.TopCenter",topEnd:"Alignment.TopEnd",start:"Alignment.CenterStart",center:"Alignment.Center",end:"Alignment.CenterEnd",bottomStart:"Alignment.BottomStart",bottom:"Alignment.BottomCenter",bottomEnd:"Alignment.BottomEnd"}[t]??"Alignment.TopStart"}function wd(t,e={}){let n=[],r=e.isLeaf??!1,i=t.foreground;if(typeof i=="string"){let Y=Hr(i);Y&&n.push(r?`@textStyle(color = ${Y})`:`@contentColor(${Y})`)}let o=t.size??t.fontSize;if(o!==void 0&&o!==""){let Y=typeof o=="number"?o:ze(o);Y!==null&&n.push(r?`@textStyle(fontSize = ${Y}.sp)`:`@inheritTextStyle(fontSize = ${Y}.sp)`)}let s=$A(t.fontWeight??t.weight??"");s&&n.push(r?`@textStyle(fontWeight = ${s})`:`@inheritTextStyle(fontWeight = ${s})`);let a=t.width,c=t.height,l=t.minWidth,d=t.minHeight,p=t.maxWidth,f=t.maxHeight,m=t.margin,y=m==="0 auto",g=a==="100%"||a==="fill"||p==="fill",w=c==="100%"||c==="fill"||d==="100vh",b=p==="fill"?null:p!==void 0?ze(p):null,P=!1;g&&w?(b!==null?n.push(`.widthIn(max = ${b}.dp).fillMaxHeight()`):n.push(".fillMaxWidth().fillMaxHeight()"),P=!0):g?b!==null?n.push(`.widthIn(max = ${b}.dp)`):n.push(".fillMaxWidth()"):w&&(n.push(".fillMaxHeight()"),P=!0),!P&&d==="100vh"&&n.push(".fillMaxHeight()");let x=ze(t.radius??"");(t.shadow===!0||t.shadow==="true")&&n.push(`.shadow(elevation = 4.dp, shape = RoundedCornerShape(${x??0}.dp), clip = false, ambientColor = Color.Black.copy(alpha = 0.08f), spotColor = Color.Black.copy(alpha = 0.08f))`);let R=t.background;if(typeof R=="string"&&R!=="transparent"){let Y=Hr(R);Y&&Y!=="Color.Transparent"&&n.push(`.background(${Y}, RoundedCornerShape(${x??0}.dp))`)}t.clip!=="none"&&x!==null&&n.push(`.clip(RoundedCornerShape(${x}.dp))`);let j=t.border,U=t.borderColor;if(j||U){let Y=ze(j??"1px")??1,D=typeof U=="string"?Hr(U)??"Color.Gray":"Color.Gray";n.push(`.border(${Y}.dp, ${D}, RoundedCornerShape(${x??0}.dp))`)}if(!g){if(typeof a=="number")n.push(`.width(${a}.dp)`);else if(a!==void 0&&a!=="wrap"){let Y=ze(a);Y!==null&&n.push(`.width(${Y}.dp)`)}if(typeof l=="number")n.push(`.widthIn(min = ${l}.dp)`);else if(l!==void 0){let Y=ze(l);Y!==null&&n.push(`.widthIn(min = ${Y}.dp)`)}if(p!==void 0&&p!=="fill"){let Y=ze(p);Y!==null&&n.push(`.widthIn(max = ${Y}.dp)`)}}if(!w){if(typeof c=="number")n.push(`.height(${c}.dp)`);else if(c!==void 0&&c!=="wrap"){let Y=ze(c);Y!==null&&n.push(`.height(${Y}.dp)`)}if(d!==void 0&&d!=="100vh")if(typeof d=="number")n.push(`.heightIn(min = ${d}.dp)`);else{let Y=ze(d);Y!==null&&n.push(`.heightIn(min = ${Y}.dp)`)}if(f!==void 0&&f!=="fill"){let Y=ze(f);Y!==null&&n.push(`.heightIn(max = ${Y}.dp)`)}}typeof t.aspectRatio=="number"&&n.push(`.aspectRatio(${t.aspectRatio}f)`),typeof t.weight=="number"&&n.push(`.weight(${t.weight}f)`);let oe=t.padding??"",ge=xA(oe);if(ge&&(ge.kind==="uniform"?n.push(`.padding(${ge.value}.dp)`):n.push(`.padding(horizontal = ${ge.horizontal}.dp, vertical = ${ge.vertical}.dp)`)),y)n.push("@wrapContentCenter()");else if(typeof m=="number")n.push(`.padding(${m}.dp)`);else if(m!==void 0&&typeof m=="string"){let Y=ze(m);Y!==null&&n.push(`.padding(${Y}.dp)`)}let xe=t.opacity;typeof xe=="number"&&xe<1&&n.push(`.alpha(${xe}f)`);let Re=SA(t.textAlign??"");Re&&n.push(`@textAlign(${Re})`);let _e=t.lineLimit;if(_e!==void 0&&_e!=="none"&&_e!==""){let Y=typeof _e=="number"?_e:ze(_e);Y!==null&&n.push(`@textMaxLines(${Y})`)}let Ge=t.textOverflow;Ge==="ellipsis"?n.push("@textOverflow(TextOverflow.Ellipsis)"):Ge==="clip"&&n.push("@textOverflow(TextOverflow.Clip)");let de=CA(t.selfAlign??"");return de&&n.push(`.align(${de})`),n}function $a(t){return t.filter(e=>!e.includes(".width(")&&!e.includes(".widthIn(")&&!e.includes(".height(")&&!e.includes(".heightIn(")&&!e.includes(".weight(")&&e!==".fillMaxWidth()"&&e!==".fillMaxHeight()"&&!e.startsWith(".fillMaxWidth().")&&!e.endsWith(".fillMaxWidth()")&&!e.includes(".fillMaxHeight()"))}function Nb(t){return t.filter(e=>!e.includes(".background("))}function Sa(t){return t.filter(e=>!e.includes(".padding("))}function Mb(t){return t.filter(e=>!e.includes(".clip(RoundedCornerShape("))}function Wr(t){return t.filter(e=>e.includes(".padding("))}function Vb(t){let n=t.find(r=>r.includes(".clip(RoundedCornerShape("))?.match(/RoundedCornerShape\((\d+)\.dp\)/);return n?Number(n[1]):null}function Lb(t){if(t.length===0)return null;let e=t[0],n=e.match(/\.padding\(horizontal = (\d+)\.dp, vertical = (\d+)\.dp\)/);if(n)return`PaddingValues(horizontal = ${n[1]}.dp, vertical = ${n[2]}.dp)`;let r=e.match(/\.padding\((\d+)\.dp\)/);return r?`PaddingValues(${r[1]}.dp)`:null}function jb(t){return t.some(e=>e.startsWith("@runtimeStyle(")||e.includes(".background("))}function Db(t){return t.some(e=>e.includes(".fillMaxHeight()"))}function ot(t){let e=new Set,n=[];for(let r of t)e.has(r)||(e.add(r),n.push(r));return n}function Ne(t,e){return e.length===0?t:e.filter(n=>!kA.some(r=>n.startsWith(r)||n===r)).map(n=>n.startsWith("@runtimeStyle(")?`.applyVcStyle(${n.replace(/^@runtimeStyle\(/,"").replace(/\)$/,"")})`:n).reduce((n,r)=>`${n}${r}`,t)}function vo(t){let e=t.filter(r=>r.startsWith("@textStyle(")).map(r=>r.replace(/^@textStyle\(/,"").replace(/\)$/,"")),n=t.find(r=>r.startsWith("@textAlign("));if(n){let r=n.replace(/^@textAlign\(/,"").replace(/\)$/,"");e.push(`textAlign = ${r}`)}return e}function Fb(t){let e=t.find(i=>i.startsWith("@textMaxLines("));if(!e)return null;let n=e.replace(/^@textMaxLines\(/,"").replace(/\)$/,""),r=Number(n);return Number.isFinite(r)?r:null}function qb(t){let e=t.find(n=>n.startsWith("@textOverflow("));return e?e.replace(/^@textOverflow\(/,"").replace(/\)$/,""):null}function Bb(t){return t.includes("@textFillMaxWidth()")}function Hb(t){let e=t.find(n=>n.startsWith("@contentColor("));return e?e.replace(/^@contentColor\(/,"").replace(/\)$/,""):null}function Wb(t){return t.filter(e=>e.startsWith("@inheritTextStyle(")).map(e=>e.replace(/^@inheritTextStyle\(/,"").replace(/\)$/,""))}function Ca(t){return t.includes("@wrapContentCenter()")}function Ub(t){return t.match(/\.applyVcStyle\((VcTheme\.resolve\([^)]+\))\)/)?.[1]??null}var kA,zb=K(()=>{"use strict";kA=["@textStyle(","@contentColor(","@inheritTextStyle(","@wrapContentCenter()","@textMaxLines(","@textOverflow(","@textAlign(","@textFillMaxWidth()"]});function V(t){return" ".repeat(t)}function ue(t,e){let n=t[e];if(n!=null){if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="object"&&"kind"in n&&n.kind==="literal")return n.value}}function Xb(t){let e={};for(let[n,r]of Object.entries(t)){if(n==="variant"||n==="id"||!rr.has(n))continue;let i=ue(t,n);i!==void 0&&(e[n]=i)}return e}function Qb(t,e,n){let r=t.variant;return!r||typeof r!="object"||!("kind"in r)?null:r.kind==="binding"?yt(r,e,n):r.kind==="concat"?`"${r.parts.map(s=>typeof s=="string"?s:`\${${yt(s,e,n)}}`).join("")}"`:null}function bo(t){let e=t.variant;return!e||typeof e!="object"||!("kind"in e)?!1:e.kind==="binding"||e.kind==="concat"}function EA(t,e,n,r){let i=n.map.elements[t],o=ue(e,"variant"),s=Xb(e);i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp];let a=!!i?.leaf;if(bo(e)){let l=Qb(e,n,r),d=Xt({elementName:t,theme:{defaults:{},variants:{}},tokens:n.tokens,instanceLiterals:s});return[...wd(d,{isLeaf:a}),`@runtimeStyle(VcTheme.resolve(${JSON.stringify(t)}, variant = ${l}))`]}let c=Xt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return t==="Box"&&o==="card"&&delete c.height,wd(c,{isLeaf:a})}function zr(t,e,n){let r=ue(e,"variant"),i=Xb(e);return Xt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:typeof r=="string"?r:void 0,instanceLiterals:i})}function Sd(t){if(!t||typeof t!="string")return null;let e=t.match(/repeat\((\d+),\s*minmax\(0,\s*1fr\)\)/);if(e)return{kind:"equal-columns",count:Number(e[1])};let n=t.match(/repeat\(auto-fit,\s*minmax\((\d+)px/);if(n)return{kind:"adaptive",minWidth:Number(n[1])};let r=t.trim().split(/\s+/);return r.length>=2?{kind:"fixed-columns",widths:r}:null}function PA(t,e){if(t.kind!=="component")return null;let r=zr(t.name,t.props,e).background;return typeof r!="string"||r==="transparent"?null:Hr(r)??`Color(${JSON.stringify(r)})`}function Gb(t,e,n,r){let o=zr(t,e,n)[r];return typeof o!="string"?r==="background"?"Color.Transparent":"Color.Unspecified":r==="background"&&(o==="transparent"||!o)?"Color.Transparent":Hr(o)??"Color.Unspecified"}function IA(t){return t==="end"?"TextAlign.End":t==="center"?"TextAlign.Center":"TextAlign.Start"}function RA(t){return t==="end"?"Alignment.CenterEnd":t==="center"?"Alignment.Center":"Alignment.CenterStart"}function Zb(t,e,n,r,i,o,s){let a=ue(t.props,"gap"),c=typeof a=="number"?`${a}.dp`:"16.dp",l=Ne("Modifier.fillMaxWidth()",ot(o));if(t.children.length===1&&t.children[0].kind==="map"){let p=t.children[0],f=p.item,m=yt(p.source,i,n),y=Qt(i,[f],()=>r(p.body,e+3,f));return[`${V(e)}Row(modifier = ${l}, horizontalArrangement = Arrangement.spacedBy(${c}), verticalAlignment = Alignment.Top) {`,`${V(e+1)}for (${f} in ${m}) {`,`${V(e+2)}Box(modifier = Modifier.weight(1f).fillMaxWidth(), contentAlignment = Alignment.TopStart) {`,y,`${V(e+2)}}`,`${V(e+1)}}`,`${V(e)}}`].join(`
316
- `)}let d=t.children.map(p=>{let f="";return p.kind==="map"?f=bn(p,e+2,r,i,"none"):p.kind==="text"?f=`${V(e+2)}Text(text = ${JSON.stringify(p.value)})`:p.kind==="binding"?f=Ur(p,e+2,i,n):f=r(p,e+2,n),f?`${V(e+1)}Box(modifier = Modifier.weight(1f).fillMaxSize(), propagateMinConstraints = true, contentAlignment = Alignment.TopStart) {
315
+ `});import{resolve as EA}from"node:path";function PA(t){ks(Object.keys(t.elements),lt,Vb);for(let[e,n]of Object.entries(t.elements)){let r=n.container!==void 0&&n.container!==null,i=n.leaf!==void 0&&n.leaf!==null;if(r===i)throw new Error(`${Vb}: element "${e}" must have exactly one of "container" or "leaf"`)}}async function Lb(t){if(!t&&kd)return kd;let e=t??EA(Ce(),"renderers/compose/elements.yaml"),n=await Cr(e);return PA(n),t||(kd=n),n}var Vb,kd,jb=K(()=>{"use strict";nt();Mt();Es();Vb="renderers/compose/elements.yaml",kd=null});function ze(t){if(typeof t=="number")return t;if(typeof t=="boolean")return null;let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function IA(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let n=e[1],r=parseInt(n.slice(0,2),16),i=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16);return`Color(${r}, ${i}, ${o})`}function RA(t){let e=t.match(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(!e)return null;let n=Number(e[1])/255,r=Number(e[2])/255,i=Number(e[3])/255,o=Number(e[4]);return`Color(${n}f, ${r}f, ${i}f, ${o}f)`}function zr(t){return t==="transparent"?"Color.Transparent":IA(t)??RA(t)??null}function AA(t){let e=ze(t);if(e!==null)return{kind:"uniform",value:e};if(typeof t!="string")return null;let n=t.trim().split(/\s+/);if(n.length===2){let r=ze(n[0]),i=ze(n[1]);if(r!==null&&i!==null)return{kind:"shorthand",vertical:r,horizontal:i}}return null}function TA(t){return typeof t!="string"?null:{bold:"FontWeight.Bold",semibold:"FontWeight.SemiBold",medium:"FontWeight.Medium",regular:"FontWeight.Normal",700:"FontWeight.Bold",600:"FontWeight.SemiBold",500:"FontWeight.Medium",400:"FontWeight.Normal"}[t]??null}function OA(t){return typeof t!="string"?null:{start:"TextAlign.Start",center:"TextAlign.Center",end:"TextAlign.End"}[t]??null}function NA(t){return typeof t!="string"?null:{start:"Alignment.Start",center:"Alignment.CenterVertically",end:"Alignment.Bottom",stretch:"Alignment.CenterVertically"}[t]??null}function Db(t,e){return t==="between"||t==="spaceBetween"?"Arrangement.SpaceBetween":t==="around"||t==="spaceAround"?"Arrangement.SpaceAround":t==="spaceEvenly"?"Arrangement.SpaceEvenly":t==="end"?"Arrangement.End":t==="center"?"Arrangement.Center":`Arrangement.spacedBy(${e})`}function Fb(t){return{topStart:"Alignment.TopStart",top:"Alignment.TopCenter",topEnd:"Alignment.TopEnd",start:"Alignment.CenterStart",center:"Alignment.Center",end:"Alignment.CenterEnd",bottomStart:"Alignment.BottomStart",bottom:"Alignment.BottomCenter",bottomEnd:"Alignment.BottomEnd"}[t]??"Alignment.TopStart"}function Ed(t,e={}){let n=[],r=e.isLeaf??!1,i=t.foreground;if(typeof i=="string"){let Y=zr(i);Y&&n.push(r?`@textStyle(color = ${Y})`:`@contentColor(${Y})`)}let o=t.size??t.fontSize;if(o!==void 0&&o!==""){let Y=typeof o=="number"?o:ze(o);Y!==null&&n.push(r?`@textStyle(fontSize = ${Y}.sp)`:`@inheritTextStyle(fontSize = ${Y}.sp)`)}let s=TA(t.fontWeight??t.weight??"");s&&n.push(r?`@textStyle(fontWeight = ${s})`:`@inheritTextStyle(fontWeight = ${s})`);let a=t.width,l=t.height,c=t.minWidth,p=t.minHeight,d=t.maxWidth,f=t.maxHeight,m=t.margin,y=m==="0 auto",g=a==="100%"||a==="fill"||d==="fill",w=l==="100%"||l==="fill"||p==="100vh",b=d==="fill"?null:d!==void 0?ze(d):null,P=!1;g&&w?(b!==null?n.push(`.widthIn(max = ${b}.dp).fillMaxHeight()`):n.push(".fillMaxWidth().fillMaxHeight()"),P=!0):g?b!==null?n.push(`.widthIn(max = ${b}.dp)`):n.push(".fillMaxWidth()"):w&&(n.push(".fillMaxHeight()"),P=!0),!P&&p==="100vh"&&n.push(".fillMaxHeight()");let x=ze(t.radius??"");(t.shadow===!0||t.shadow==="true")&&n.push(`.shadow(elevation = 4.dp, shape = RoundedCornerShape(${x??0}.dp), clip = false, ambientColor = Color.Black.copy(alpha = 0.08f), spotColor = Color.Black.copy(alpha = 0.08f))`);let R=t.background;if(typeof R=="string"&&R!=="transparent"){let Y=zr(R);Y&&Y!=="Color.Transparent"&&n.push(`.background(${Y}, RoundedCornerShape(${x??0}.dp))`)}t.clip!=="none"&&x!==null&&n.push(`.clip(RoundedCornerShape(${x}.dp))`);let j=t.border,U=t.borderColor;if(j||U){let Y=ze(j??"1px")??1,D=typeof U=="string"?zr(U)??"Color.Gray":"Color.Gray";n.push(`.border(${Y}.dp, ${D}, RoundedCornerShape(${x??0}.dp))`)}if(!g){if(typeof a=="number")n.push(`.width(${a}.dp)`);else if(a!==void 0&&a!=="wrap"){let Y=ze(a);Y!==null&&n.push(`.width(${Y}.dp)`)}if(typeof c=="number")n.push(`.widthIn(min = ${c}.dp)`);else if(c!==void 0){let Y=ze(c);Y!==null&&n.push(`.widthIn(min = ${Y}.dp)`)}if(d!==void 0&&d!=="fill"){let Y=ze(d);Y!==null&&n.push(`.widthIn(max = ${Y}.dp)`)}}if(!w){if(typeof l=="number")n.push(`.height(${l}.dp)`);else if(l!==void 0&&l!=="wrap"){let Y=ze(l);Y!==null&&n.push(`.height(${Y}.dp)`)}if(p!==void 0&&p!=="100vh")if(typeof p=="number")n.push(`.heightIn(min = ${p}.dp)`);else{let Y=ze(p);Y!==null&&n.push(`.heightIn(min = ${Y}.dp)`)}if(f!==void 0&&f!=="fill"){let Y=ze(f);Y!==null&&n.push(`.heightIn(max = ${Y}.dp)`)}}typeof t.aspectRatio=="number"&&n.push(`.aspectRatio(${t.aspectRatio}f)`),typeof t.weight=="number"&&n.push(`.weight(${t.weight}f)`);let oe=t.padding??"",ge=AA(oe);if(ge&&(ge.kind==="uniform"?n.push(`.padding(${ge.value}.dp)`):n.push(`.padding(horizontal = ${ge.horizontal}.dp, vertical = ${ge.vertical}.dp)`)),y)n.push("@wrapContentCenter()");else if(typeof m=="number")n.push(`.padding(${m}.dp)`);else if(m!==void 0&&typeof m=="string"){let Y=ze(m);Y!==null&&n.push(`.padding(${Y}.dp)`)}let xe=t.opacity;typeof xe=="number"&&xe<1&&n.push(`.alpha(${xe}f)`);let Re=OA(t.textAlign??"");Re&&n.push(`@textAlign(${Re})`);let _e=t.lineLimit;if(_e!==void 0&&_e!=="none"&&_e!==""){let Y=typeof _e=="number"?_e:ze(_e);Y!==null&&n.push(`@textMaxLines(${Y})`)}let Ge=t.textOverflow;Ge==="ellipsis"?n.push("@textOverflow(TextOverflow.Ellipsis)"):Ge==="clip"&&n.push("@textOverflow(TextOverflow.Clip)");let de=NA(t.selfAlign??"");return de&&n.push(`.align(${de})`),n}function Ea(t){return t.filter(e=>!e.includes(".width(")&&!e.includes(".widthIn(")&&!e.includes(".height(")&&!e.includes(".heightIn(")&&!e.includes(".weight(")&&e!==".fillMaxWidth()"&&e!==".fillMaxHeight()"&&!e.startsWith(".fillMaxWidth().")&&!e.endsWith(".fillMaxWidth()")&&!e.includes(".fillMaxHeight()"))}function qb(t){return t.filter(e=>!e.includes(".background("))}function Pa(t){return t.filter(e=>!e.includes(".padding("))}function Bb(t){return t.filter(e=>!e.includes(".clip(RoundedCornerShape("))}function Gr(t){return t.filter(e=>e.includes(".padding("))}function Hb(t){let n=t.find(r=>r.includes(".clip(RoundedCornerShape("))?.match(/RoundedCornerShape\((\d+)\.dp\)/);return n?Number(n[1]):null}function Wb(t){if(t.length===0)return null;let e=t[0],n=e.match(/\.padding\(horizontal = (\d+)\.dp, vertical = (\d+)\.dp\)/);if(n)return`PaddingValues(horizontal = ${n[1]}.dp, vertical = ${n[2]}.dp)`;let r=e.match(/\.padding\((\d+)\.dp\)/);return r?`PaddingValues(${r[1]}.dp)`:null}function Ub(t){return t.some(e=>e.startsWith("@runtimeStyle(")||e.includes(".background("))}function zb(t){return t.some(e=>e.includes(".fillMaxHeight()"))}function at(t){let e=new Set,n=[];for(let r of t)e.has(r)||(e.add(r),n.push(r));return n}function Ne(t,e){return e.length===0?t:e.filter(n=>!MA.some(r=>n.startsWith(r)||n===r)).map(n=>n.startsWith("@runtimeStyle(")?`.applyVcStyle(${n.replace(/^@runtimeStyle\(/,"").replace(/\)$/,"")})`:n).reduce((n,r)=>`${n}${r}`,t)}function xo(t){let e=t.filter(r=>r.startsWith("@textStyle(")).map(r=>r.replace(/^@textStyle\(/,"").replace(/\)$/,"")),n=t.find(r=>r.startsWith("@textAlign("));if(n){let r=n.replace(/^@textAlign\(/,"").replace(/\)$/,"");e.push(`textAlign = ${r}`)}return e}function Gb(t){let e=t.find(i=>i.startsWith("@textMaxLines("));if(!e)return null;let n=e.replace(/^@textMaxLines\(/,"").replace(/\)$/,""),r=Number(n);return Number.isFinite(r)?r:null}function Jb(t){let e=t.find(n=>n.startsWith("@textOverflow("));return e?e.replace(/^@textOverflow\(/,"").replace(/\)$/,""):null}function Kb(t){return t.includes("@textFillMaxWidth()")}function Yb(t){let e=t.find(n=>n.startsWith("@contentColor("));return e?e.replace(/^@contentColor\(/,"").replace(/\)$/,""):null}function Xb(t){return t.filter(e=>e.startsWith("@inheritTextStyle(")).map(e=>e.replace(/^@inheritTextStyle\(/,"").replace(/\)$/,""))}function Ia(t){return t.includes("@wrapContentCenter()")}function Qb(t){return t.match(/\.applyVcStyle\((VcTheme\.resolve\([^)]+\))\)/)?.[1]??null}var MA,Zb=K(()=>{"use strict";MA=["@textStyle(","@contentColor(","@inheritTextStyle(","@wrapContentCenter()","@textMaxLines(","@textOverflow(","@textAlign(","@textFillMaxWidth()"]});function V(t){return" ".repeat(t)}function ue(t,e){let n=t[e];if(n!=null){if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="object"&&"kind"in n&&n.kind==="literal")return n.value}}function i_(t){let e={};for(let[n,r]of Object.entries(t)){if(n==="variant"||n==="id"||!sr.has(n))continue;let i=ue(t,n);i!==void 0&&(e[n]=i)}return e}function o_(t,e,n){let r=t.variant;return!r||typeof r!="object"||!("kind"in r)?null:r.kind==="binding"?bt(r,e,n):r.kind==="concat"?`"${r.parts.map(s=>typeof s=="string"?s:`\${${bt(s,e,n)}}`).join("")}"`:null}function $o(t){let e=t.variant;return!e||typeof e!="object"||!("kind"in e)?!1:e.kind==="binding"||e.kind==="concat"}function VA(t,e,n,r){let i=n.map.elements[t],o=ue(e,"variant"),s=i_(e);i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp];let a=!!i?.leaf;if($o(e)){let c=o_(e,n,r),p=Qt({elementName:t,theme:{defaults:{},variants:{}},tokens:n.tokens,instanceLiterals:s});return[...Ed(p,{isLeaf:a}),`@runtimeStyle(VcTheme.resolve(${JSON.stringify(t)}, variant = ${c}))`]}let l=Qt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return t==="Box"&&o==="card"&&delete l.height,Ed(l,{isLeaf:a})}function Kr(t,e,n){let r=ue(e,"variant"),i=i_(e);return Qt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:typeof r=="string"?r:void 0,instanceLiterals:i})}function Od(t){if(!t||typeof t!="string")return null;let e=t.match(/repeat\((\d+),\s*minmax\(0,\s*1fr\)\)/);if(e)return{kind:"equal-columns",count:Number(e[1])};let n=t.match(/repeat\(auto-fit,\s*minmax\((\d+)px/);if(n)return{kind:"adaptive",minWidth:Number(n[1])};let r=t.trim().split(/\s+/);return r.length>=2?{kind:"fixed-columns",widths:r}:null}function LA(t,e){if(t.kind!=="component")return null;let r=Kr(t.name,t.props,e).background;return typeof r!="string"||r==="transparent"?null:zr(r)??`Color(${JSON.stringify(r)})`}function e_(t,e,n,r){let o=Kr(t,e,n)[r];return typeof o!="string"?r==="background"?"Color.Transparent":"Color.Unspecified":r==="background"&&(o==="transparent"||!o)?"Color.Transparent":zr(o)??"Color.Unspecified"}function jA(t){return t==="end"?"TextAlign.End":t==="center"?"TextAlign.Center":"TextAlign.Start"}function DA(t){return t==="end"?"Alignment.CenterEnd":t==="center"?"Alignment.Center":"Alignment.CenterStart"}function s_(t,e,n,r,i,o,s){let a=ue(t.props,"gap"),l=typeof a=="number"?`${a}.dp`:"16.dp",c=Ne("Modifier.fillMaxWidth()",at(o));if(t.children.length===1&&t.children[0].kind==="map"){let d=t.children[0],f=d.item,m=bt(d.source,i,n),y=Zt(i,[f],()=>r(d.body,e+3,f));return[`${V(e)}Row(modifier = ${c}, horizontalArrangement = Arrangement.spacedBy(${l}), verticalAlignment = Alignment.Top) {`,`${V(e+1)}for (${f} in ${m}) {`,`${V(e+2)}Box(modifier = Modifier.weight(1f).fillMaxWidth(), contentAlignment = Alignment.TopStart) {`,y,`${V(e+2)}}`,`${V(e+1)}}`,`${V(e)}}`].join(`
316
+ `)}let p=t.children.map(d=>{let f="";return d.kind==="map"?f=$n(d,e+2,r,i,"none"):d.kind==="text"?f=`${V(e+2)}Text(text = ${JSON.stringify(d.value)})`:d.kind==="binding"?f=Jr(d,e+2,i,n):f=r(d,e+2,n),f?`${V(e+1)}Box(modifier = Modifier.weight(1f).fillMaxSize(), propagateMinConstraints = true, contentAlignment = Alignment.TopStart) {
317
317
  ${f}
318
- ${V(e+1)}}`:""}).filter(Boolean);return[`${V(e)}Row(modifier = ${l}.height(IntrinsicSize.Min), horizontalArrangement = Arrangement.spacedBy(${c}), verticalAlignment = Alignment.Top) {`,d.join(`
318
+ ${V(e+1)}}`:""}).filter(Boolean);return[`${V(e)}Row(modifier = ${c}.height(IntrinsicSize.Min), horizontalArrangement = Arrangement.spacedBy(${l}), verticalAlignment = Alignment.Top) {`,p.join(`
319
319
  `),`${V(e)}}`].join(`
320
- `)}function AA(t,e,n,r,i){return t.map(s=>{if(s.kind==="map")return bn(s,e,n,r,"lazyGrid");let a="";return s.kind==="text"?a=`${V(e+1)}Text(text = ${JSON.stringify(s.value)}, modifier = Modifier.fillMaxWidth())`:s.kind==="binding"?a=Ur(s,e+1,r,i,", modifier = Modifier.fillMaxWidth()"):a=n(s,e+1,i),a?s.kind!=="text"&&s.kind!=="binding"?`${V(e)}item {
320
+ `)}function FA(t,e,n,r,i){return t.map(s=>{if(s.kind==="map")return $n(s,e,n,r,"lazyGrid");let a="";return s.kind==="text"?a=`${V(e+1)}Text(text = ${JSON.stringify(s.value)}, modifier = Modifier.fillMaxWidth())`:s.kind==="binding"?a=Jr(s,e+1,r,i,", modifier = Modifier.fillMaxWidth()"):a=n(s,e+1,i),a?s.kind!=="text"&&s.kind!=="binding"?`${V(e)}item {
321
321
  ${V(e+1)}Box(modifier = Modifier.fillMaxWidth()) {
322
322
  ${a}
323
323
  ${V(e+1)}}
324
324
  ${V(e)}}`:`${V(e)}item {
325
325
  ${a}
326
326
  ${V(e)}}`:""}).filter(Boolean).join(`
327
- `)}function TA(t,e,n,r,i,o){let s=Ne("Modifier.fillMaxWidth()",ot(o)),a=zr(t.name,t.props,i),c=Sd(a.gridTemplateColumns),l=c?.kind==="fixed-columns"?c.widths:[],d=[];for(let p=0;p<t.children.length;p++){let f=t.children[p],m=l[p],y=m?.match(/^(\d+)px$/);if(y){let g="";if(f.kind==="map"?g=bn(f,e+2,r,i,"none"):f.kind==="text"?g=`${V(e+2)}Text(text = ${JSON.stringify(f.value)})`:f.kind==="binding"?g=Ur(f,e+2,i,n):g=r(f,e+2,n),!g)continue;let w=PA(f,i),b=w?`.background(${w})`:"";d.push([`${V(e+1)}Box(modifier = Modifier.width(${Number(y[1])}.dp).fillMaxHeight()${b}) {`,g,`${V(e+1)}}`].join(`
328
- `))}else if(m==="1fr"){let g=i.inVerticalScroll;i.inVerticalScroll=!0;let w="";if(f.kind==="map"?w=bn(f,e+2,r,i,"none"):f.kind==="text"?w=`${V(e+2)}Text(text = ${JSON.stringify(f.value)})`:f.kind==="binding"?w=Ur(f,e+2,i,n):w=r(f,e+2,n),i.inVerticalScroll=g,!w)continue;d.push([`${V(e+1)}Box(modifier = Modifier.weight(1f).fillMaxHeight(), contentAlignment = Alignment.TopStart) {`,`${V(e+2)}Column(modifier = Modifier.fillMaxSize().verticalScroll(rememberScrollState())) {`,w,`${V(e+2)}}`,`${V(e+1)}}`].join(`
329
- `))}else{let g="";if(f.kind==="map"?g=bn(f,e+2,r,i,"none"):f.kind==="text"?g=`${V(e+2)}Text(text = ${JSON.stringify(f.value)})`:f.kind==="binding"?g=Ur(f,e+2,i,n):g=r(f,e+2,n),!g)continue;d.push(g)}}return[`${V(e)}Row(modifier = ${s}, horizontalArrangement = Arrangement.spacedBy(0.dp)) {`,d.join(`
327
+ `)}function qA(t,e,n,r,i,o){let s=Ne("Modifier.fillMaxWidth()",at(o)),a=Kr(t.name,t.props,i),l=Od(a.gridTemplateColumns),c=l?.kind==="fixed-columns"?l.widths:[],p=[];for(let d=0;d<t.children.length;d++){let f=t.children[d],m=c[d],y=m?.match(/^(\d+)px$/);if(y){let g="";if(f.kind==="map"?g=$n(f,e+2,r,i,"none"):f.kind==="text"?g=`${V(e+2)}Text(text = ${JSON.stringify(f.value)})`:f.kind==="binding"?g=Jr(f,e+2,i,n):g=r(f,e+2,n),!g)continue;let w=LA(f,i),b=w?`.background(${w})`:"";p.push([`${V(e+1)}Box(modifier = Modifier.width(${Number(y[1])}.dp).fillMaxHeight()${b}) {`,g,`${V(e+1)}}`].join(`
328
+ `))}else if(m==="1fr"){let g=i.inVerticalScroll;i.inVerticalScroll=!0;let w="";if(f.kind==="map"?w=$n(f,e+2,r,i,"none"):f.kind==="text"?w=`${V(e+2)}Text(text = ${JSON.stringify(f.value)})`:f.kind==="binding"?w=Jr(f,e+2,i,n):w=r(f,e+2,n),i.inVerticalScroll=g,!w)continue;p.push([`${V(e+1)}Box(modifier = Modifier.weight(1f).fillMaxHeight(), contentAlignment = Alignment.TopStart) {`,`${V(e+2)}Column(modifier = Modifier.fillMaxSize().verticalScroll(rememberScrollState())) {`,w,`${V(e+2)}}`,`${V(e+1)}}`].join(`
329
+ `))}else{let g="";if(f.kind==="map"?g=$n(f,e+2,r,i,"none"):f.kind==="text"?g=`${V(e+2)}Text(text = ${JSON.stringify(f.value)})`:f.kind==="binding"?g=Jr(f,e+2,i,n):g=r(f,e+2,n),!g)continue;p.push(g)}}return[`${V(e)}Row(modifier = ${s}, horizontalArrangement = Arrangement.spacedBy(0.dp)) {`,p.join(`
330
330
  `),`${V(e)}}`].join(`
331
- `)}function yt(t,e,n){wa(e,t.scope);let r=t.scope??n??e.propsRoot??"vm";return t.path?`${r}.${t.path}`:r}function Cd(t){return(e,n)=>{let r=e.map(i=>`${i} != null`).join(" && ");return`${V(t)}if (${r}) {
332
- ${va(n,V(1))}
333
- ${V(t)}}`}}function Ur(t,e,n,r,i=""){return Yn(n,Kn([t]),()=>`${V(e)}Text(text = ${yt(t,n,r)}${i})`,Cd(e))}function Jb(t,e,n){let r=t.value;return r?typeof r=="string"?JSON.stringify(r):typeof r=="object"&&r!==null&&"kind"in r&&r.kind==="binding"?yt(r,e,n):'""':'""'}function ka(t,e,n){let r=Hb(e),i=Wb(e);if(!r&&i.length===0)return t;let o=[];return r&&o.push(`LocalContentColor provides ${r}`),i.length>0&&o.push(`LocalTextStyle provides LocalTextStyle.current.merge(TextStyle(${i.join(", ")}))`),[`${V(n)}CompositionLocalProvider(${o.join(", ")}) {`,t,`${V(n)}}`].join(`
334
- `)}function OA(t){return t.map(e=>{let n=e.match(/\.padding\(horizontal = (\d+)\.dp, vertical = \d+\.dp\)/);if(n)return`.padding(horizontal = ${n[1]}.dp)`;let r=e.match(/\.padding\((\d+)\.dp\)/);return r?`.padding(horizontal = ${r[1]}.dp)`:e})}function _d(){return["@textMaxLines(1)","@textOverflow(TextOverflow.Ellipsis)","@textFillMaxWidth()"]}function NA(t,e){return e.cellTextBehavior?[...t,..._d()]:t}function vd(t,e){return[`${V(e)}Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.TopCenter) {`,t,`${V(e)}}`].join(`
335
- `)}function Kb(t,e,n,r=""){let i=Wr(e),o=Sa(e),s=Ne("Modifier",o),a=i.length>0&&jb(o)?Ne("Modifier",i):null,c=ka(n,e,t+1);return a&&(c=[`${V(t+1)}Box(modifier = ${a}) {`,c,`${V(t+1)}}`].join(`
336
- `)),[`${V(t)}Box(modifier = ${s}${r}) {`,c,`${V(t)}}`].join(`
337
- `)}function MA(t,e,n){let i=Xt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:e,instanceLiterals:{}}).display;return typeof i=="string"&&i.includes("inline")}function VA(t,e,n){if(e.cellTextBehavior)return!0;let r=ue(t,"variant");if(typeof r=="string")return MA("Text",r,e);if(bo(t)){let i=t.variant;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="concat"){let s=i.parts[0];if(s==="badge-"||typeof s=="string"&&s.startsWith("badge-"))return!0}}return!1}function xd(t,e,n,r,i,o){let s=Wr(n),a=Ub(Ne("Modifier",n)),c=ot(n.filter(x=>!x.startsWith("@textStyle(")&&!x.startsWith("@runtimeStyle(")&&!x.includes(".padding(")&&!x.startsWith("@textMaxLines(")&&!x.startsWith("@textOverflow(")&&!x.startsWith("@textAlign(")&&x!=="@textFillMaxWidth()")),l=Bb(n)?"Modifier.fillMaxWidth()":"Modifier",d=vo(n),p=null;a?p=d.length>0?`LocalTextStyle.current.merge(${a}.asTextStyle()).merge(TextStyle(${d.join(", ")}))`:`${a}.asTextStyle()`:d.length>0&&(p=`LocalTextStyle.current.merge(TextStyle(${d.join(", ")}))`);let f=p?`, style = ${p}`:"",m=Fb(n),y=m!==null?`, maxLines = ${m}`:"",g=qb(n),w=g?`, overflow = ${g}`:"",b=`${t} Text(text = ${e}${y}${w}${f})`;if(a){let O=`${(i?VA(i,r,o):r.cellTextBehavior===!0)?"Modifier":"Modifier.fillMaxWidth()"}.applyVcStyle(${a})`;if(s.length>0){let j=Ne(l,[...c,...s]);return[`${t}Box(modifier = ${j}) {`,`${t} Box(modifier = ${O}) {`,b,`${t} }`,`${t}}`].join(`
331
+ `)}function bt(t,e,n){xa(e,t.scope);let r=t.scope??n??e.propsRoot??"vm";return t.path?`${r}.${t.path}`:r}function Nd(t){return(e,n)=>{let r=e.map(i=>`${i} != null`).join(" && ");return`${V(t)}if (${r}) {
332
+ ${$a(n,V(1))}
333
+ ${V(t)}}`}}function Jr(t,e,n,r,i=""){return Zn(n,Qn([t]),()=>`${V(e)}Text(text = ${bt(t,n,r)}${i})`,Nd(e))}function t_(t,e,n){let r=t.value;return r?typeof r=="string"?JSON.stringify(r):typeof r=="object"&&r!==null&&"kind"in r&&r.kind==="binding"?bt(r,e,n):'""':'""'}function Ra(t,e,n){let r=Yb(e),i=Xb(e);if(!r&&i.length===0)return t;let o=[];return r&&o.push(`LocalContentColor provides ${r}`),i.length>0&&o.push(`LocalTextStyle provides LocalTextStyle.current.merge(TextStyle(${i.join(", ")}))`),[`${V(n)}CompositionLocalProvider(${o.join(", ")}) {`,t,`${V(n)}}`].join(`
334
+ `)}function BA(t){return t.map(e=>{let n=e.match(/\.padding\(horizontal = (\d+)\.dp, vertical = \d+\.dp\)/);if(n)return`.padding(horizontal = ${n[1]}.dp)`;let r=e.match(/\.padding\((\d+)\.dp\)/);return r?`.padding(horizontal = ${r[1]}.dp)`:e})}function Rd(){return["@textMaxLines(1)","@textOverflow(TextOverflow.Ellipsis)","@textFillMaxWidth()"]}function HA(t,e){return e.cellTextBehavior?[...t,...Rd()]:t}function Pd(t,e){return[`${V(e)}Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.TopCenter) {`,t,`${V(e)}}`].join(`
335
+ `)}function n_(t,e,n,r=""){let i=Gr(e),o=Pa(e),s=Ne("Modifier",o),a=i.length>0&&Ub(o)?Ne("Modifier",i):null,l=Ra(n,e,t+1);return a&&(l=[`${V(t+1)}Box(modifier = ${a}) {`,l,`${V(t+1)}}`].join(`
336
+ `)),[`${V(t)}Box(modifier = ${s}${r}) {`,l,`${V(t)}}`].join(`
337
+ `)}function WA(t,e,n){let i=Qt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:e,instanceLiterals:{}}).display;return typeof i=="string"&&i.includes("inline")}function UA(t,e,n){if(e.cellTextBehavior)return!0;let r=ue(t,"variant");if(typeof r=="string")return WA("Text",r,e);if($o(t)){let i=t.variant;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="concat"){let s=i.parts[0];if(s==="badge-"||typeof s=="string"&&s.startsWith("badge-"))return!0}}return!1}function Ad(t,e,n,r,i,o){let s=Gr(n),a=Qb(Ne("Modifier",n)),l=at(n.filter(x=>!x.startsWith("@textStyle(")&&!x.startsWith("@runtimeStyle(")&&!x.includes(".padding(")&&!x.startsWith("@textMaxLines(")&&!x.startsWith("@textOverflow(")&&!x.startsWith("@textAlign(")&&x!=="@textFillMaxWidth()")),c=Kb(n)?"Modifier.fillMaxWidth()":"Modifier",p=xo(n),d=null;a?d=p.length>0?`LocalTextStyle.current.merge(${a}.asTextStyle()).merge(TextStyle(${p.join(", ")}))`:`${a}.asTextStyle()`:p.length>0&&(d=`LocalTextStyle.current.merge(TextStyle(${p.join(", ")}))`);let f=d?`, style = ${d}`:"",m=Gb(n),y=m!==null?`, maxLines = ${m}`:"",g=Jb(n),w=g?`, overflow = ${g}`:"",b=`${t} Text(text = ${e}${y}${w}${f})`;if(a){let O=`${(i?UA(i,r,o):r.cellTextBehavior===!0)?"Modifier":"Modifier.fillMaxWidth()"}.applyVcStyle(${a})`;if(s.length>0){let j=Ne(c,[...l,...s]);return[`${t}Box(modifier = ${j}) {`,`${t} Box(modifier = ${O}) {`,b,`${t} }`,`${t}}`].join(`
338
338
  `)}return[`${t}Box(modifier = ${O}) {`,b,`${t}}`].join(`
339
- `)}let P=Ne(l,[...c,...s]);return`${t}Text(text = ${e}, modifier = ${P}${y}${w}${f})`}function LA(t,e,n){let r=t.options;if(typeof r=="object"&&r!==null&&"kind"in r&&r.kind==="binding")return`${yt(r,e,n)}.firstOrNull()?.label ?: ""`;if(typeof r=="object"&&r!==null&&"kind"in r&&r.kind==="literal"&&Array.isArray(r.value)){let i=r.value;return JSON.stringify(i[0]?.label??"")}return'""'}function jA(t,e,n,r){let i=t.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=yt(i,e,n);return`${V(r+1)}for (option in ${o}) {
339
+ `)}let P=Ne(c,[...l,...s]);return`${t}Text(text = ${e}, modifier = ${P}${y}${w}${f})`}function zA(t,e,n){let r=t.options;if(typeof r=="object"&&r!==null&&"kind"in r&&r.kind==="binding")return`${bt(r,e,n)}.firstOrNull()?.label ?: ""`;if(typeof r=="object"&&r!==null&&"kind"in r&&r.kind==="literal"&&Array.isArray(r.value)){let i=r.value;return JSON.stringify(i[0]?.label??"")}return'""'}function GA(t,e,n,r){let i=t.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=bt(i,e,n);return`${V(r+1)}for (option in ${o}) {
340
340
  ${V(r+2)}DropdownMenuItem(text = { Text(text = option.label) }, onClick = { expanded = false })
341
341
  ${V(r+1)}}`}return typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="literal"&&Array.isArray(i.value)?i.value.map(s=>`${V(r+1)}DropdownMenuItem(text = { Text(text = ${JSON.stringify(s.label)}) }, onClick = { expanded = false })`).join(`
342
- `):`${V(r+1)}DropdownMenuItem(text = { Text(text = "--") }, onClick = { expanded = false })`}function bd(t){let n=t.entries.find(o=>o.path==="ui.text-muted")?.value??"#6b7280",r=n.match(/^#([0-9a-fA-F]{6})$/);if(!r)return`Color(${JSON.stringify(n)})`;let i=r[1];return`Color(${parseInt(i.slice(0,2),16)}, ${parseInt(i.slice(2,4),16)}, ${parseInt(i.slice(4,6),16)})`}function Yb(t){let n=t.entries.find(o=>o.path==="ui.text")?.value??"#111827",r=n.match(/^#([0-9a-fA-F]{6})$/);if(!r)return`Color(${JSON.stringify(n)})`;let i=r[1];return`Color(${parseInt(i.slice(0,2),16)}, ${parseInt(i.slice(2,4),16)}, ${parseInt(i.slice(4,6),16)})`}function e_(t,e,n){for(let r of t){if(r.kind==="text")return JSON.stringify(r.value);if(r.kind==="binding")return yt(r,e,n)}return null}function $d(t,e,n,r,i,o=r.listScope??"none"){return t.map(a=>a.kind==="map"?bn(a,e,n,r,o):a.kind==="text"?`${V(e)}Text(text = ${JSON.stringify(a.value)})`:a.kind==="binding"?Ur(a,e,r,i):n(a,e,i)).filter(Boolean).join(`
343
- `)}function bn(t,e,n,r,i="none"){let o=yt(t.source,r),s=t.item,a=Qt(r,[s],()=>n(t.body,e+2,s));return i==="lazyGrid"?`${V(e)}gridItems(${o}, key = { it.id }) { ${s} ->
342
+ `):`${V(r+1)}DropdownMenuItem(text = { Text(text = "--") }, onClick = { expanded = false })`}function Id(t){let n=t.entries.find(o=>o.path==="ui.text-muted")?.value??"#6b7280",r=n.match(/^#([0-9a-fA-F]{6})$/);if(!r)return`Color(${JSON.stringify(n)})`;let i=r[1];return`Color(${parseInt(i.slice(0,2),16)}, ${parseInt(i.slice(2,4),16)}, ${parseInt(i.slice(4,6),16)})`}function r_(t){let n=t.entries.find(o=>o.path==="ui.text")?.value??"#111827",r=n.match(/^#([0-9a-fA-F]{6})$/);if(!r)return`Color(${JSON.stringify(n)})`;let i=r[1];return`Color(${parseInt(i.slice(0,2),16)}, ${parseInt(i.slice(2,4),16)}, ${parseInt(i.slice(4,6),16)})`}function a_(t,e,n){for(let r of t){if(r.kind==="text")return JSON.stringify(r.value);if(r.kind==="binding")return bt(r,e,n)}return null}function Td(t,e,n,r,i,o=r.listScope??"none"){return t.map(a=>a.kind==="map"?$n(a,e,n,r,o):a.kind==="text"?`${V(e)}Text(text = ${JSON.stringify(a.value)})`:a.kind==="binding"?Jr(a,e,r,i):n(a,e,i)).filter(Boolean).join(`
343
+ `)}function $n(t,e,n,r,i="none"){let o=bt(t.source,r),s=t.item,a=Zt(r,[s],()=>n(t.body,e+2,s));return i==="lazyGrid"?`${V(e)}gridItems(${o}, key = { it.id }) { ${s} ->
344
344
  ${V(e+1)}Box(modifier = Modifier.fillMaxWidth()) {
345
345
  ${a}
346
346
  ${V(e+1)}}
@@ -348,25 +348,25 @@ ${V(e)}}`:i==="lazyColumn"?`${V(e)}lazyItems(${o}, key = { it.id }) { ${s} ->
348
348
  ${a}
349
349
  ${V(e)}}`:`${V(e)}for (${s} in ${o}) {
350
350
  ${a}
351
- ${V(e)}}`}function DA(t,e,n,r){let i=Qt(r,[],()=>Object.entries(t.props).map(([o,s])=>typeof s=="object"&&s!==null&&"kind"in s&&s.kind==="binding"?`${o} = ${yt(s,r,n)}`:`${o} = ${JSON.stringify(s)}`).join(", "));return`${V(e)}${t.name}(${i})`}function FA(t,e,n,r,i){let o=V(e),s=ue(t.props,"label"),c=e_(t.children,r,n)??(typeof s=="string"?JSON.stringify(s):'"Button"'),l=Gb(t.name,t.props,r,"background"),d=Gb(t.name,t.props,r,"foreground");if(bo(t.props)){let j=`VcTheme.resolve("Button", variant = ${Qb(t.props,r,n)})`;l=`${j}.background ?: Color.Transparent`,d=`${j}.foreground ?: Color.Unspecified`}let p=ot(Nb(Mb(Sa(i)))),f=r.cellTextBehavior?[...p.filter(O=>O!==".fillMaxWidth()"),".wrapContentWidth()"]:p,m=Ne("Modifier",f),y=Vb(i),g=Lb(Wr(i)),w=y!==null?`, shape = RoundedCornerShape(${y}.dp)`:"",b=g?`, contentPadding = ${g}`:"",P=vo(i),x=P.length>0?`, style = TextStyle(${P.join(", ")})`:"",R=r.cellTextBehavior?", maxLines = 1, overflow = TextOverflow.Ellipsis":"";return[`${o}VcButton(onClick = {}, modifier = ${m}, containerColor = ${l}, contentColor = ${d}${w}${b}) {`,`${o} Text(text = ${c}${x}${R})`,`${o}}`].join(`
352
- `)}function qA(t,e,n,r,i,o){let s=V(n),a=Ne("Modifier",o);if(e.leaf==="text"){let c=e_(t.children,i,r)??'""';return xd(s,c,o,i,t.props,r)}if(e.leaf==="button")return FA(t,n,r,i,o);if(e.leaf==="textfield"){let c=ue(t.props,"placeholder"),l=typeof c=="string"?JSON.stringify(c):'""',d=Yb(i.tokens),p=bd(i.tokens),f=ot(o),m=Ne("Modifier",f),y=vo(o),g=y.length>0?`${s} textStyle = TextStyle(${y.join(", ")}),`:`${s} textStyle = TextStyle(color = ${d}, fontSize = 14.sp),`,w=Jb(t.props,i,r);return[`${s}BasicTextField(`,`${s} value = ${w},`,`${s} onValueChange = {},`,`${s} modifier = ${m},`,g,`${s} decorationBox = { innerTextField ->`,`${s} Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.CenterStart) {`,`${s} if (${w}.isEmpty()) {`,`${s} Text(text = ${l}, style = TextStyle(color = ${p}, fontSize = 14.sp))`,`${s} }`,`${s} innerTextField()`,`${s} }`,`${s} },`,`${s})`].join(`
353
- `)}if(e.leaf==="texteditor"){let c=ue(t.props,"placeholder"),l=typeof c=="string"?JSON.stringify(c):'""',d=bd(i.tokens),f=o.find(x=>x.includes("heightIn(min ="))?.match(/heightIn\(min = (\d+)\.dp\)/)?.[1]??"72",m=o.filter(x=>x.startsWith("@textStyle(")),y=ot(o.filter(x=>!x.startsWith("@textStyle(")&&!x.includes("heightIn(min ="))),g=Ne("Modifier",ot(y)),w=vo(m),b=w.length>0?`, textStyle = TextStyle(${w.join(", ")})`:"",P=Jb(t.props,i,r);return[`${s}Box(modifier = ${g}.heightIn(min = ${f}.dp)) {`,`${s} BasicTextField(`,`${s} value = ${P},`,`${s} onValueChange = {},`,`${s} modifier = Modifier.fillMaxWidth()${b},`,`${s} decorationBox = { innerTextField ->`,`${s} Box(modifier = Modifier.fillMaxWidth()) {`,`${s} if (${P}.isEmpty()) {`,`${s} Text(text = ${l}, modifier = Modifier.align(Alignment.TopStart).padding(top = 8.dp, start = 4.dp), style = TextStyle(color = ${d}, fontSize = 14.sp))`,`${s} }`,`${s} innerTextField()`,`${s} }`,`${s} },`,`${s} )`,`${s}}`].join(`
354
- `)}if(e.leaf==="picker"){let c=ue(t.props,"width"),l=typeof c=="number"?c:null,d=l!==null?`.width(${l}.dp)`:"",p=$a(ot(o)),f=Ne(`Modifier${d}`,p),m=LA(t.props,i,r),y=Yb(i.tokens),g=bd(i.tokens),w=jA(t.props,i,r,n);return[`${s}Box(modifier = ${f}.heightIn(min = 42.dp)) {`,`${s} var expanded by remember { mutableStateOf(false) }`,`${s} TextButton(onClick = { expanded = true }, modifier = Modifier.fillMaxWidth(), contentPadding = PaddingValues(horizontal = 12.dp, vertical = 9.dp)) {`,`${s} Text(text = ${m}, style = TextStyle(color = ${y}), maxLines = 1, modifier = Modifier.weight(1f))`,`${s} Icon(Icons.Default.ArrowDropDown, contentDescription = null, tint = ${g})`,`${s} }`,`${s} DropdownMenu(expanded = expanded, onDismissRequest = { expanded = false }) {`,w,`${s} }`,`${s}}`].join(`
355
- `)}if(e.leaf==="spacer")return`${s}Spacer(modifier = ${a})`;if(e.leaf==="divider"){let l=ue(t.props,"axis")==="vertical"?"VerticalDivider":"HorizontalDivider";return`${s}${l}(modifier = ${a})`}if(e.leaf==="image"){let c=ue(t.props,"src")??ue(t.props,"name"),l=typeof c=="string"?JSON.stringify(c):'"image"';return`${s}Icon(imageVector = Icons.Default.Image, contentDescription = ${l}, modifier = ${a})`}if(e.leaf==="progressview")return`${s}CircularProgressIndicator(modifier = ${a})`;if(e.leaf==="toggle"){let c=ue(t.props,"label"),l=typeof c=="string"?JSON.stringify(c):'""';return[`${s}Row(modifier = ${a}, verticalAlignment = Alignment.CenterVertically) {`,`${s} Switch(checked = false, onCheckedChange = {})`,`${s} Text(text = ${l})`,`${s}}`].join(`
356
- `)}return`${s}Text(text = "/* unsupported leaf: ${t.name} */")`}function BA(t,e,n,r,i,o,s){let a=$d(t.children,n+1,i,o,r),c=Ne("Modifier",s);if(e.container==="vstack"){let d=e.spacingProp?ue(t.props,e.spacingProp):void 0,p=typeof d=="number"?`${d}.dp`:"0.dp",f=[`${V(n)}Column(modifier = ${c}, verticalArrangement = Arrangement.spacedBy(${p})) {`,ka(a,s,n+1),`${V(n)}}`].join(`
357
- `);return Ca(s)?vd(f,n):f}if(e.container==="hstack"){let d=e.spacingProp?ue(t.props,e.spacingProp):void 0,p=typeof d=="number"?`${d}.dp`:"0.dp",f=ue(t.props,"justify"),m=ue(t.props,"wrap"),y=Tb(f,p),g=ue(t.props,"align"),w=ue(t.props,"alignItems"),b=ue(t.props,"height"),P=w==="center"||g==="center"||typeof b=="number"?"Alignment.CenterVertically":w==="end"?"Alignment.Bottom":"Alignment.Top",x=t.name==="TableHeader"||t.name==="TableRow",R=ue(t.props,"flex"),O=x||f!==void 0||typeof R=="number",j=[];O&&j.push(".fillMaxWidth()"),typeof b=="number"&&j.push(x&&t.name==="TableHeader"?`.heightIn(min = ${b}.dp)`:`.height(${b}.dp)`);let U=x&&typeof b=="number"?$a(s):s,oe=Ne("Modifier",ot([...U,...j])),ge=o.inTableHeader;t.name==="TableHeader"&&(o.inTableHeader=!0);let xe=ka($d(t.children,n+1,i,o,r),s,n+1);return t.name==="TableHeader"&&(o.inTableHeader=ge),m===!0&&f!=="between"&&f!=="spaceBetween"?[`${V(n)}FlowRow(modifier = ${oe}, horizontalArrangement = Arrangement.spacedBy(${p}), verticalArrangement = Arrangement.spacedBy(${p})) {`,xe,`${V(n)}}`].join(`
351
+ ${V(e)}}`}function JA(t,e,n,r){let i=Zt(r,[],()=>Object.entries(t.props).map(([o,s])=>typeof s=="object"&&s!==null&&"kind"in s&&s.kind==="binding"?`${o} = ${bt(s,r,n)}`:`${o} = ${JSON.stringify(s)}`).join(", "));return`${V(e)}${t.name}(${i})`}function KA(t,e,n,r,i){let o=V(e),s=ue(t.props,"label"),l=a_(t.children,r,n)??(typeof s=="string"?JSON.stringify(s):'"Button"'),c=e_(t.name,t.props,r,"background"),p=e_(t.name,t.props,r,"foreground");if($o(t.props)){let j=`VcTheme.resolve("Button", variant = ${o_(t.props,r,n)})`;c=`${j}.background ?: Color.Transparent`,p=`${j}.foreground ?: Color.Unspecified`}let d=at(qb(Bb(Pa(i)))),f=r.cellTextBehavior?[...d.filter(O=>O!==".fillMaxWidth()"),".wrapContentWidth()"]:d,m=Ne("Modifier",f),y=Hb(i),g=Wb(Gr(i)),w=y!==null?`, shape = RoundedCornerShape(${y}.dp)`:"",b=g?`, contentPadding = ${g}`:"",P=xo(i),x=P.length>0?`, style = TextStyle(${P.join(", ")})`:"",R=r.cellTextBehavior?", maxLines = 1, overflow = TextOverflow.Ellipsis":"";return[`${o}VcButton(onClick = {}, modifier = ${m}, containerColor = ${c}, contentColor = ${p}${w}${b}) {`,`${o} Text(text = ${l}${x}${R})`,`${o}}`].join(`
352
+ `)}function YA(t,e,n,r,i,o){let s=V(n),a=Ne("Modifier",o);if(e.leaf==="text"){let l=a_(t.children,i,r)??'""';return Ad(s,l,o,i,t.props,r)}if(e.leaf==="button")return KA(t,n,r,i,o);if(e.leaf==="textfield"){let l=ue(t.props,"placeholder"),c=typeof l=="string"?JSON.stringify(l):'""',p=r_(i.tokens),d=Id(i.tokens),f=at(o),m=Ne("Modifier",f),y=xo(o),g=y.length>0?`${s} textStyle = TextStyle(${y.join(", ")}),`:`${s} textStyle = TextStyle(color = ${p}, fontSize = 14.sp),`,w=t_(t.props,i,r);return[`${s}BasicTextField(`,`${s} value = ${w},`,`${s} onValueChange = {},`,`${s} modifier = ${m},`,g,`${s} decorationBox = { innerTextField ->`,`${s} Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.CenterStart) {`,`${s} if (${w}.isEmpty()) {`,`${s} Text(text = ${c}, style = TextStyle(color = ${d}, fontSize = 14.sp))`,`${s} }`,`${s} innerTextField()`,`${s} }`,`${s} },`,`${s})`].join(`
353
+ `)}if(e.leaf==="texteditor"){let l=ue(t.props,"placeholder"),c=typeof l=="string"?JSON.stringify(l):'""',p=Id(i.tokens),f=o.find(x=>x.includes("heightIn(min ="))?.match(/heightIn\(min = (\d+)\.dp\)/)?.[1]??"72",m=o.filter(x=>x.startsWith("@textStyle(")),y=at(o.filter(x=>!x.startsWith("@textStyle(")&&!x.includes("heightIn(min ="))),g=Ne("Modifier",at(y)),w=xo(m),b=w.length>0?`, textStyle = TextStyle(${w.join(", ")})`:"",P=t_(t.props,i,r);return[`${s}Box(modifier = ${g}.heightIn(min = ${f}.dp)) {`,`${s} BasicTextField(`,`${s} value = ${P},`,`${s} onValueChange = {},`,`${s} modifier = Modifier.fillMaxWidth()${b},`,`${s} decorationBox = { innerTextField ->`,`${s} Box(modifier = Modifier.fillMaxWidth()) {`,`${s} if (${P}.isEmpty()) {`,`${s} Text(text = ${c}, modifier = Modifier.align(Alignment.TopStart).padding(top = 8.dp, start = 4.dp), style = TextStyle(color = ${p}, fontSize = 14.sp))`,`${s} }`,`${s} innerTextField()`,`${s} }`,`${s} },`,`${s} )`,`${s}}`].join(`
354
+ `)}if(e.leaf==="picker"){let l=ue(t.props,"width"),c=typeof l=="number"?l:null,p=c!==null?`.width(${c}.dp)`:"",d=Ea(at(o)),f=Ne(`Modifier${p}`,d),m=zA(t.props,i,r),y=r_(i.tokens),g=Id(i.tokens),w=GA(t.props,i,r,n);return[`${s}Box(modifier = ${f}.heightIn(min = 42.dp)) {`,`${s} var expanded by remember { mutableStateOf(false) }`,`${s} TextButton(onClick = { expanded = true }, modifier = Modifier.fillMaxWidth(), contentPadding = PaddingValues(horizontal = 12.dp, vertical = 9.dp)) {`,`${s} Text(text = ${m}, style = TextStyle(color = ${y}), maxLines = 1, modifier = Modifier.weight(1f))`,`${s} Icon(Icons.Default.ArrowDropDown, contentDescription = null, tint = ${g})`,`${s} }`,`${s} DropdownMenu(expanded = expanded, onDismissRequest = { expanded = false }) {`,w,`${s} }`,`${s}}`].join(`
355
+ `)}if(e.leaf==="spacer")return`${s}Spacer(modifier = ${a})`;if(e.leaf==="divider"){let c=ue(t.props,"axis")==="vertical"?"VerticalDivider":"HorizontalDivider";return`${s}${c}(modifier = ${a})`}if(e.leaf==="image"){let l=ue(t.props,"src")??ue(t.props,"name"),c=typeof l=="string"?JSON.stringify(l):'"image"';return`${s}Icon(imageVector = Icons.Default.Image, contentDescription = ${c}, modifier = ${a})`}if(e.leaf==="progressview")return`${s}CircularProgressIndicator(modifier = ${a})`;if(e.leaf==="toggle"){let l=ue(t.props,"label"),c=typeof l=="string"?JSON.stringify(l):'""';return[`${s}Row(modifier = ${a}, verticalAlignment = Alignment.CenterVertically) {`,`${s} Switch(checked = false, onCheckedChange = {})`,`${s} Text(text = ${c})`,`${s}}`].join(`
356
+ `)}return`${s}Text(text = "/* unsupported leaf: ${t.name} */")`}function XA(t,e,n,r,i,o,s){let a=Td(t.children,n+1,i,o,r),l=Ne("Modifier",s);if(e.container==="vstack"){let p=e.spacingProp?ue(t.props,e.spacingProp):void 0,d=typeof p=="number"?`${p}.dp`:"0.dp",f=[`${V(n)}Column(modifier = ${l}, verticalArrangement = Arrangement.spacedBy(${d})) {`,Ra(a,s,n+1),`${V(n)}}`].join(`
357
+ `);return Ia(s)?Pd(f,n):f}if(e.container==="hstack"){let p=e.spacingProp?ue(t.props,e.spacingProp):void 0,d=typeof p=="number"?`${p}.dp`:"0.dp",f=ue(t.props,"justify"),m=ue(t.props,"wrap"),y=Db(f,d),g=ue(t.props,"align"),w=ue(t.props,"alignItems"),b=ue(t.props,"height"),P=w==="center"||g==="center"||typeof b=="number"?"Alignment.CenterVertically":w==="end"?"Alignment.Bottom":"Alignment.Top",x=t.name==="TableHeader"||t.name==="TableRow",R=ue(t.props,"flex"),O=x||f!==void 0||typeof R=="number",j=[];O&&j.push(".fillMaxWidth()"),typeof b=="number"&&j.push(x&&t.name==="TableHeader"?`.heightIn(min = ${b}.dp)`:`.height(${b}.dp)`);let U=x&&typeof b=="number"?Ea(s):s,oe=Ne("Modifier",at([...U,...j])),ge=o.inTableHeader;t.name==="TableHeader"&&(o.inTableHeader=!0);let xe=Ra(Td(t.children,n+1,i,o,r),s,n+1);return t.name==="TableHeader"&&(o.inTableHeader=ge),m===!0&&f!=="between"&&f!=="spaceBetween"?[`${V(n)}FlowRow(modifier = ${oe}, horizontalArrangement = Arrangement.spacedBy(${d}), verticalArrangement = Arrangement.spacedBy(${d})) {`,xe,`${V(n)}}`].join(`
358
358
  `):[`${V(n)}Row(modifier = ${oe}, horizontalArrangement = ${y}, verticalAlignment = ${P}) {`,xe,`${V(n)}}`].join(`
359
- `)}if(e.container==="group"||e.container==="navstack"){let d=bo(t.props)?void 0:zr(t.name,t.props,o),p=d?.display==="grid"?Sd(d.gridTemplateColumns):null;if(p?.kind==="equal-columns")return Zb(t,n,r,i,o,s,p.count);if(p?.kind==="adaptive"){let w=ue(t.props,"gap"),b=typeof w=="number"?`${w}.dp`:"16.dp";return[`${V(n)}LazyVerticalGrid(columns = GridCells.Adaptive(minSize = ${p.minWidth}.dp), modifier = ${c}.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(${b}), verticalArrangement = Arrangement.spacedBy(${b})) {`,AA(t.children,n+1,i,o,r),`${V(n)}}`].join(`
360
- `)}let f=ue(t.props,"contentAlign"),m=Db(s)?", contentAlignment = Alignment.TopStart":"",y=typeof f=="string"?`, contentAlignment = ${Ob(f)}`:m,g=Kb(n,s,a,y);return Ca(s)?vd(g,n):g}if(e.container==="scrollview"){let d=o.inVerticalScroll;o.inVerticalScroll=!0;let p=[`${V(n)}Column(modifier = ${c}.verticalScroll(rememberScrollState())) {`,a,`${V(n)}}`].join(`
361
- `);return o.inVerticalScroll=d,p}if(e.container==="field"){let d=ue(t.props,"label"),p=ue(t.props,"gap"),f=typeof p=="number"?`${p}.dp`:"4.dp",m=typeof d=="string"?`${V(n+1)}Text(text = ${JSON.stringify(d)}, modifier = Modifier.applyVcStyle(VcTheme.resolve("Text", variant = "field-label")), style = VcTheme.resolve("Text", variant = "field-label").asTextStyle())
362
- `:"";return[`${V(n)}Column(modifier = ${c}, verticalArrangement = Arrangement.spacedBy(${f})) {`,`${m}${a}`,`${V(n)}}`].join(`
363
- `)}if(e.container==="tablestack"){let d=ue(t.props,"separator"),p=ue(t.props,"separatorColor"),f=typeof d=="number"&&d>0||d===void 0,y=zr(t.name,t.props,o).separatorColor??p,g="Color.Gray.copy(alpha = 0.2f)";if(f&&typeof y=="string"){let x=y.match(/^#([0-9a-fA-F]{6})$/);x&&(g=`Color(${parseInt(x[1].slice(0,2),16)}, ${parseInt(x[1].slice(2,4),16)}, ${parseInt(x[1].slice(4,6),16)})`)}let w=`${V(n+1)}HorizontalDivider(modifier = Modifier, color = ${g})`,b=t.children.map(x=>{if(x.kind==="map"&&f){let R=x,O=yt(R.source,o),j=R.item,U=Qt(o,[j],()=>i(R.body,n+3,j));return[`${V(n+1)}for (${j} in ${O}) {`,`${V(n+2)}${w.trim()}`,U,`${V(n+1)}}`].join(`
364
- `)}return x.kind==="map"?bn(x,n+1,i,o,"none"):i(x,n+1,r)}).filter(Boolean),P;return P=b,[`${V(n)}Column(modifier = ${c}) {`,P.join(`
359
+ `)}if(e.container==="group"||e.container==="navstack"){let p=$o(t.props)?void 0:Kr(t.name,t.props,o),d=p?.display==="grid"?Od(p.gridTemplateColumns):null;if(d?.kind==="equal-columns")return s_(t,n,r,i,o,s,d.count);if(d?.kind==="adaptive"){let w=ue(t.props,"gap"),b=typeof w=="number"?`${w}.dp`:"16.dp";return[`${V(n)}LazyVerticalGrid(columns = GridCells.Adaptive(minSize = ${d.minWidth}.dp), modifier = ${l}.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(${b}), verticalArrangement = Arrangement.spacedBy(${b})) {`,FA(t.children,n+1,i,o,r),`${V(n)}}`].join(`
360
+ `)}let f=ue(t.props,"contentAlign"),m=zb(s)?", contentAlignment = Alignment.TopStart":"",y=typeof f=="string"?`, contentAlignment = ${Fb(f)}`:m,g=n_(n,s,a,y);return Ia(s)?Pd(g,n):g}if(e.container==="scrollview"){let p=o.inVerticalScroll;o.inVerticalScroll=!0;let d=[`${V(n)}Column(modifier = ${l}.verticalScroll(rememberScrollState())) {`,a,`${V(n)}}`].join(`
361
+ `);return o.inVerticalScroll=p,d}if(e.container==="field"){let p=ue(t.props,"label"),d=ue(t.props,"gap"),f=typeof d=="number"?`${d}.dp`:"4.dp",m=typeof p=="string"?`${V(n+1)}Text(text = ${JSON.stringify(p)}, modifier = Modifier.applyVcStyle(VcTheme.resolve("Text", variant = "field-label")), style = VcTheme.resolve("Text", variant = "field-label").asTextStyle())
362
+ `:"";return[`${V(n)}Column(modifier = ${l}, verticalArrangement = Arrangement.spacedBy(${f})) {`,`${m}${a}`,`${V(n)}}`].join(`
363
+ `)}if(e.container==="tablestack"){let p=ue(t.props,"separator"),d=ue(t.props,"separatorColor"),f=typeof p=="number"&&p>0||p===void 0,y=Kr(t.name,t.props,o).separatorColor??d,g="Color.Gray.copy(alpha = 0.2f)";if(f&&typeof y=="string"){let x=y.match(/^#([0-9a-fA-F]{6})$/);x&&(g=`Color(${parseInt(x[1].slice(0,2),16)}, ${parseInt(x[1].slice(2,4),16)}, ${parseInt(x[1].slice(4,6),16)})`)}let w=`${V(n+1)}HorizontalDivider(modifier = Modifier, color = ${g})`,b=t.children.map(x=>{if(x.kind==="map"&&f){let R=x,O=bt(R.source,o),j=R.item,U=Zt(o,[j],()=>i(R.body,n+3,j));return[`${V(n+1)}for (${j} in ${O}) {`,`${V(n+2)}${w.trim()}`,U,`${V(n+1)}}`].join(`
364
+ `)}return x.kind==="map"?$n(x,n+1,i,o,"none"):i(x,n+1,r)}).filter(Boolean),P;return P=b,[`${V(n)}Column(modifier = ${l}) {`,P.join(`
365
365
  `),`${V(n)}}`].join(`
366
- `)}if(e.container==="cellgroup"){let d=ue(t.props,"width"),p=ue(t.props,"flex"),f=ue(t.props,"align"),m=IA(f),y=RA(f),g=typeof p=="number",w=$a(s),b=o.inTableHeader?OA(Wr(w)):Wr(w),P=w.filter(U=>U.startsWith("@contentColor(")||U.startsWith("@inheritTextStyle(")),x=[];typeof d=="number"?x.push(`.width(${d}.dp)`):g&&x.push(".weight(1f).fillMaxWidth()");let R=Ne("Modifier",ot([...x,...Sa(w)])),O=o.cellTextBehavior;o.cellTextBehavior=!0;let j=t.children.map(U=>U.kind==="map"?bn(U,n+1,i,o,"none"):U.kind==="text"?xd(V(n+1),JSON.stringify(U.value),ot([..._d(),`@textAlign(${m})`,...b,...P.map(oe=>oe)]),o,void 0,r):U.kind==="binding"?Yn(o,Kn([U]),()=>xd(V(n+1),yt(U,o,r),ot([..._d(),`@textAlign(${m})`,...b,...P.map(oe=>oe)]),o,void 0,r),Cd(n+1)):i(U,n+1,r)).filter(Boolean).join(`
367
- `);return o.cellTextBehavior=O,[`${V(n)}Box(modifier = ${R}, contentAlignment = ${y}) {`,ka(j,P,n+1),`${V(n)}}`].join(`
368
- `)}let l=Kb(n,s,a);return Ca(s)?vd(l,n):l}function HA(t,e,n,r,i,o){let s=NA(EA(t.name,t.props,o,r),o);if(e.leaf)return qA(t,e,n,r,o,s);if(e.container==="group"&&!bo(t.props)){let a=zr(t.name,t.props,o),c=a.gridTemplateColumns,l=a.flexDirection;if(a.display==="grid"&&c){let d=Sd(c);if(d?.kind==="equal-columns")return Zb(t,n,r,i,o,s,d.count);if(d?.kind==="fixed-columns")return TA(t,n,r,i,o,s)}if(a.display==="flex"&&l==="row"){let d=ue(t.props,"gap"),p=typeof d=="number"?`${d}.dp`:typeof a.gap=="number"?`${a.gap}.dp`:"0.dp",f=Ne("Modifier",s),m=$d(t.children,n+2,i,o,r);return[`${V(n)}Row(modifier = ${f}, horizontalArrangement = Arrangement.spacedBy(${p}), verticalAlignment = Alignment.Top) {`,m,`${V(n)}}`].join(`
369
- `)}}if(e.container)return BA(t,e,n,r,i,o,s);throw new Error(`Unsupported Compose element config for ${t.name}`)}function WA(t){let e=(n,r,i)=>{if(n.kind==="viewRef")return DA(n,r,i,t);if(n.kind!=="component")return"";let o=t.map.elements[n.name];if(!o)throw new Error(`Element "${n.name}" is not in Compose element map`);let s=o.leaf?n.children.filter(c=>c.kind==="binding"):[],a=Kn([...Object.values(n.props),...s]);return Yn(t,a,()=>HA(n,o,r,i,e,t),Cd(r))};return e}function t_(t,e,n=2){let r=WA(e);if(t.kind!=="component")throw new Error("Compose lowering root must be a component node");return r(t,n)}var n_=K(()=>{"use strict";vt();ld();pd();zb()});var i_={};$n(i_,{renderComposeComponent:()=>Ea});function r_(t){let e=t.match(/^(\w+)\[\]$/);return e?`List<${r_(e[1])}>`:t==="string"?"String":t==="number"?"Double":t==="boolean"?"Boolean":t}function UA(t){return t.propsType?t.propDecls?t.propDecls.map(e=>{let n=r_(e.type);return e.optional?`${e.name}: ${n}? = null`:`${e.name}: ${n}`}).join(", "):`props: ${t.propsType}`:""}async function Ea(t,e){let n=await Rb(e.elementMapPath),r=e.allowlistExtra??[],i=t.isPartial?t.exportName:`${t.exportName.replace(/View$/,"")||t.exportName}Screen`,o={map:n,theme:e.theme,tokens:e.tokens,allowlistExtra:r,propsRoot:t.propDecls?.[0]?.name,optionalProps:new Set(t.propDecls?.filter(l=>l.optional).map(l=>l.name))},s=t_(t.root,o,2),a=t.isPartial?UA(t):t.viewModel?`vm: ${t.viewModel}`:"";return`/**
366
+ `)}if(e.container==="cellgroup"){let p=ue(t.props,"width"),d=ue(t.props,"flex"),f=ue(t.props,"align"),m=jA(f),y=DA(f),g=typeof d=="number",w=Ea(s),b=o.inTableHeader?BA(Gr(w)):Gr(w),P=w.filter(U=>U.startsWith("@contentColor(")||U.startsWith("@inheritTextStyle(")),x=[];typeof p=="number"?x.push(`.width(${p}.dp)`):g&&x.push(".weight(1f).fillMaxWidth()");let R=Ne("Modifier",at([...x,...Pa(w)])),O=o.cellTextBehavior;o.cellTextBehavior=!0;let j=t.children.map(U=>U.kind==="map"?$n(U,n+1,i,o,"none"):U.kind==="text"?Ad(V(n+1),JSON.stringify(U.value),at([...Rd(),`@textAlign(${m})`,...b,...P.map(oe=>oe)]),o,void 0,r):U.kind==="binding"?Zn(o,Qn([U]),()=>Ad(V(n+1),bt(U,o,r),at([...Rd(),`@textAlign(${m})`,...b,...P.map(oe=>oe)]),o,void 0,r),Nd(n+1)):i(U,n+1,r)).filter(Boolean).join(`
367
+ `);return o.cellTextBehavior=O,[`${V(n)}Box(modifier = ${R}, contentAlignment = ${y}) {`,Ra(j,P,n+1),`${V(n)}}`].join(`
368
+ `)}let c=n_(n,s,a);return Ia(s)?Pd(c,n):c}function QA(t,e,n,r,i,o){let s=HA(VA(t.name,t.props,o,r),o);if(e.leaf)return YA(t,e,n,r,o,s);if(e.container==="group"&&!$o(t.props)){let a=Kr(t.name,t.props,o),l=a.gridTemplateColumns,c=a.flexDirection;if(a.display==="grid"&&l){let p=Od(l);if(p?.kind==="equal-columns")return s_(t,n,r,i,o,s,p.count);if(p?.kind==="fixed-columns")return qA(t,n,r,i,o,s)}if(a.display==="flex"&&c==="row"){let p=ue(t.props,"gap"),d=typeof p=="number"?`${p}.dp`:typeof a.gap=="number"?`${a.gap}.dp`:"0.dp",f=Ne("Modifier",s),m=Td(t.children,n+2,i,o,r);return[`${V(n)}Row(modifier = ${f}, horizontalArrangement = Arrangement.spacedBy(${d}), verticalAlignment = Alignment.Top) {`,m,`${V(n)}}`].join(`
369
+ `)}}if(e.container)return XA(t,e,n,r,i,o,s);throw new Error(`Unsupported Compose element config for ${t.name}`)}function ZA(t){let e=(n,r,i)=>{if(n.kind==="viewRef")return JA(n,r,i,t);if(n.kind!=="component")return"";let o=t.map.elements[n.name];if(!o)throw new Error(`Element "${n.name}" is not in Compose element map`);let s=o.leaf?n.children.filter(l=>l.kind==="binding"):[],a=Qn([...Object.values(n.props),...s]);return Zn(t,a,()=>QA(n,o,r,i,e,t),Nd(r))};return e}function c_(t,e,n=2){let r=ZA(e);if(t.kind!=="component")throw new Error("Compose lowering root must be a component node");return r(t,n)}var l_=K(()=>{"use strict";nt();wd();bd();Zb()});var p_={};kn(p_,{renderComposeComponent:()=>Aa});function u_(t){let e=t.match(/^(\w+)\[\]$/);return e?`List<${u_(e[1])}>`:t==="string"?"String":t==="number"?"Double":t==="boolean"?"Boolean":t}function eT(t){return t.propsType?t.propDecls?t.propDecls.map(e=>{let n=u_(e.type);return e.optional?`${e.name}: ${n}? = null`:`${e.name}: ${n}`}).join(", "):`props: ${t.propsType}`:""}async function Aa(t,e){let n=await Lb(e.elementMapPath),r=e.allowlistExtra??[],i=t.isPartial?t.exportName:`${t.exportName.replace(/View$/,"")||t.exportName}Screen`,o={map:n,theme:e.theme,tokens:e.tokens,allowlistExtra:r,propsRoot:t.propDecls?.[0]?.name,optionalProps:new Set(t.propDecls?.filter(c=>c.optional).map(c=>c.name))},s=c_(t.root,o,2),a=t.isPartial?eT(t):t.viewModel?`vm: ${t.viewModel}`:"";return`/**
370
370
  * Auto-generated Compose view from ${t.source}
371
371
  * DO NOT EDIT \u2014 generated by view-contracts.
372
372
  */
@@ -416,8 +416,8 @@ import generated.compose.asTextStyle
416
416
  fun ${i}(${a}) {
417
417
  ${s}
418
418
  }
419
- `}var kd=K(()=>{"use strict";Ab();n_()});function zA(t,e){return t.entries.find(r=>r.path===e)?.value??""}function GA(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let n=e[1],r=parseInt(n.slice(0,2),16),i=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16);return`Color(${r}, ${i}, ${o})`}function JA(t){let e=t.match(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(!e)return null;let n=Number(e[1])/255,r=Number(e[2])/255,i=Number(e[3])/255,o=Number(e[4]);return`Color(${n}f, ${r}f, ${i}f, ${o}f)`}function o_(t){return t==="transparent"?"Color.Transparent":GA(t)??JA(t)??null}function Gr(t){let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function s_(t,e){let n=[];for(let[r,i]of Object.entries(t)){let o=zA(e,i.ref);if(o)switch(r){case"background":case"foreground":{let s=o_(o);s&&n.push({property:r,kotlinValue:s});break}case"padding":{let s=Gr(o);if(s!==null)n.push({property:r,kotlinValue:`${s}.dp`});else{let a=o.trim().split(/\s+/);if(a.length===2){let c=Gr(a[0]),l=Gr(a[1]);c!==null&&n.push({property:"paddingV",kotlinValue:`${c}.dp`}),l!==null&&n.push({property:"paddingH",kotlinValue:`${l}.dp`})}}break}case"radius":case"fontSize":case"minHeight":case"maxWidth":{let s=Gr(o);if(s!==null){let a=r==="fontSize"?`${s}.sp`:`${s}.dp`;n.push({property:r,kotlinValue:a})}break}case"width":{if(o==="100%"||o==="fill")n.push({property:"widthFill",kotlinValue:"true"});else{let s=Gr(o);s!==null&&n.push({property:r,kotlinValue:`${s}.dp`})}break}case"height":{if(o==="100%"||o==="fill")n.push({property:"heightFill",kotlinValue:"true"});else{let s=Gr(o);s!==null&&n.push({property:r,kotlinValue:`${s}.dp`})}break}case"border":{let s=o.match(/^([\d.]+)px/);s&&n.push({property:"borderWidth",kotlinValue:`${Number(s[1])}.dp`});break}case"borderColor":{let s=o_(o);s&&n.push({property:"borderColor",kotlinValue:s});break}case"fontWeight":{let s=KA[o];s&&n.push({property:r,kotlinValue:s});break}case"shadow":{n.push({property:r,kotlinValue:o==="none"?"false":"true"});break}case"display":{o.includes("inline")&&n.push({property:"shrinkWrap",kotlinValue:"true"});break}default:break}}return n}function YA(t){return t.some(e=>e.property==="shrinkWrap")?t.filter(e=>e.property!=="widthFill"):t}function c_(t){let e=YA(t);return e.length===0?"VcVariantStyle()":`VcVariantStyle(${[...e].sort((r,i)=>a_.indexOf(r.property)-a_.indexOf(i.property)).map(r=>`${r.property} = ${r.kotlinValue}`).join(", ")})`}function XA(t,e){return{...t,...e}}function l_(t,e){let n=[];n.push("/** Auto-generated Compose theme \u2014 variant style dictionary. */"),n.push("package generated.compose"),n.push(""),n.push("import androidx.compose.foundation.background"),n.push("import androidx.compose.foundation.border"),n.push("import androidx.compose.foundation.layout.Arrangement"),n.push("import androidx.compose.foundation.layout.Row"),n.push("import androidx.compose.foundation.layout.RowScope"),n.push("import androidx.compose.foundation.layout.fillMaxHeight"),n.push("import androidx.compose.foundation.layout.fillMaxWidth"),n.push("import androidx.compose.foundation.layout.heightIn"),n.push("import androidx.compose.foundation.layout.widthIn"),n.push("import androidx.compose.foundation.layout.PaddingValues"),n.push("import androidx.compose.foundation.layout.padding"),n.push("import androidx.compose.foundation.shape.RoundedCornerShape"),n.push("import androidx.compose.ui.graphics.Shape"),n.push("import androidx.compose.material3.LocalContentColor"),n.push("import androidx.compose.material3.Surface"),n.push("import androidx.compose.runtime.Composable"),n.push("import androidx.compose.ui.Alignment"),n.push("import androidx.compose.ui.Modifier"),n.push("import androidx.compose.ui.draw.clip"),n.push("import androidx.compose.ui.draw.shadow"),n.push("import androidx.compose.ui.graphics.Color"),n.push("import androidx.compose.ui.text.TextStyle"),n.push("import androidx.compose.ui.text.font.FontWeight"),n.push("import androidx.compose.ui.unit.Dp"),n.push("import androidx.compose.ui.unit.TextUnit"),n.push("import androidx.compose.ui.unit.dp"),n.push("import androidx.compose.ui.unit.sp"),n.push(""),n.push("data class VcVariantStyle("),n.push(" val foreground: Color? = null,"),n.push(" val background: Color? = null,"),n.push(" val padding: Dp? = null,"),n.push(" val paddingH: Dp? = null,"),n.push(" val paddingV: Dp? = null,"),n.push(" val widthFill: Boolean? = null,"),n.push(" val heightFill: Boolean? = null,"),n.push(" val shrinkWrap: Boolean? = null,"),n.push(" val radius: Dp? = null,"),n.push(" val fontSize: TextUnit? = null,"),n.push(" val fontWeight: FontWeight? = null,"),n.push(" val shadow: Boolean? = null,"),n.push(" val borderWidth: Dp? = null,"),n.push(" val borderColor: Color? = null,"),n.push(" val minHeight: Dp? = null,"),n.push(" val maxWidth: Dp? = null,"),n.push(")"),n.push(""),n.push("fun VcVariantStyle.asTextStyle(): TextStyle {"),n.push(" var style = TextStyle()"),n.push(" foreground?.let { style = style.copy(color = it) }"),n.push(" fontSize?.let { style = style.copy(fontSize = it) }"),n.push(" fontWeight?.let { style = style.copy(fontWeight = it) }"),n.push(" return style"),n.push("}"),n.push(""),n.push("private fun vcSoftShadowModifier(radius: Dp): Modifier ="),n.push(" Modifier.shadow("),n.push(" elevation = 4.dp,"),n.push(" shape = RoundedCornerShape(radius),"),n.push(" clip = false,"),n.push(" ambientColor = Color.Black.copy(alpha = 0.08f),"),n.push(" spotColor = Color.Black.copy(alpha = 0.08f),"),n.push(" )"),n.push(""),n.push("fun Modifier.applyVcStyle(style: VcVariantStyle): Modifier {"),n.push(" var out = this"),n.push(" if (style.widthFill == true && style.shrinkWrap != true) out = out.fillMaxWidth()"),n.push(" if (style.heightFill == true) out = out.fillMaxHeight()"),n.push(" if (style.shadow == true) out = out.then(vcSoftShadowModifier(style.radius ?: 0.dp))"),n.push(" style.background?.let { out = out.background(it, RoundedCornerShape(style.radius ?: 0.dp)) }"),n.push(" style.radius?.let { out = out.clip(RoundedCornerShape(it)) }"),n.push(" if (style.borderColor != null) out = out.border(style.borderWidth ?: 1.dp, style.borderColor, RoundedCornerShape(style.radius ?: 0.dp))"),n.push(" style.minHeight?.let { out = out.heightIn(min = it) }"),n.push(" style.maxWidth?.let { out = out.widthIn(max = it) }"),n.push(" style.padding?.let { out = out.padding(it) }"),n.push(" style.paddingH?.let { out = out.padding(horizontal = it) }"),n.push(" style.paddingV?.let { out = out.padding(vertical = it) }"),n.push(" return out"),n.push("}"),n.push(""),n.push("@Composable"),n.push("fun VcButton("),n.push(" onClick: () -> Unit,"),n.push(" modifier: Modifier = Modifier,"),n.push(" containerColor: Color = Color.Transparent,"),n.push(" contentColor: Color = Color.Unspecified,"),n.push(" shape: Shape = RoundedCornerShape(0.dp),"),n.push(" contentPadding: PaddingValues = PaddingValues(0.dp),"),n.push(" enabled: Boolean = true,"),n.push(" content: @Composable RowScope.() -> Unit,"),n.push(") {"),n.push(" val resolvedContentColor = if (contentColor == Color.Unspecified) LocalContentColor.current else contentColor"),n.push(" Surface("),n.push(" onClick = onClick,"),n.push(" modifier = modifier,"),n.push(" enabled = enabled,"),n.push(" shape = shape,"),n.push(" color = containerColor,"),n.push(" contentColor = resolvedContentColor,"),n.push(" shadowElevation = 0.dp,"),n.push(" tonalElevation = 0.dp,"),n.push(" ) {"),n.push(" Row("),n.push(" modifier = Modifier.padding(contentPadding),"),n.push(" horizontalArrangement = Arrangement.Center,"),n.push(" verticalAlignment = Alignment.CenterVertically,"),n.push(" content = content,"),n.push(" )"),n.push(" }"),n.push("}"),n.push(""),n.push("object VcTheme {"),n.push(" val defaults: Map<String, VcVariantStyle> = mapOf(");for(let[r,i]of Object.entries(t.defaults)){if(Object.keys(i).length===0)continue;let o=s_(i,e);o.length!==0&&n.push(` ${JSON.stringify(r)} to ${c_(o)},`)}n.push(" )"),n.push(""),n.push(" val variants: Map<String, Map<String, VcVariantStyle>> = mapOf(");for(let[r,i]of Object.entries(t.variants)){let o=Object.entries(i);if(o.length===0)continue;let s=t.defaults[r]??{};n.push(` ${JSON.stringify(r)} to mapOf(`);for(let[a,c]of o){let l=XA(s,c),d=s_(l,e);r==="Box"&&a==="card"&&(d=d.filter(p=>p.property!=="heightFill")),n.push(` ${JSON.stringify(a)} to ${c_(d)},`)}n.push(" ),")}return n.push(" )"),n.push(""),n.push(" fun resolve(element: String, variant: String): VcVariantStyle ="),n.push(" variants[element]?.get(variant) ?: defaults[element] ?: VcVariantStyle()"),n.push("}"),n.push(""),n.join(`
420
- `)}var KA,a_,u_=K(()=>{"use strict";KA={bold:"FontWeight.Bold",semibold:"FontWeight.SemiBold",medium:"FontWeight.Medium",regular:"FontWeight.Normal",600:"FontWeight.SemiBold",700:"FontWeight.Bold",500:"FontWeight.Medium",400:"FontWeight.Normal"};a_=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","shrinkWrap","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});var f_={};$n(f_,{renderComposeRuntime:()=>QA});import{mkdir as p_,writeFile as Jr}from"node:fs/promises";import{resolve as en}from"node:path";function d_(){return en(Ee(),"renderers/compose/templates")}async function QA(t,e,n,r,i){let o=en(e.generated.reactDir,"../compose"),s=en(o,"components");if(await p_(o,{recursive:!0}),await p_(s,{recursive:!0}),r?await Jr(en(o,"VcTheme.kt"),l_(r.theme,r.tokens),"utf-8"):await Jr(en(o,"VcTheme.kt"),await Et(d_(),"VcTheme.kt.hbs",{packageName:"generated.compose"}),"utf-8"),await Jr(en(o,"Dispatch.kt"),`package generated.compose
419
+ `}var Md=K(()=>{"use strict";jb();l_()});function tT(t,e){return t.entries.find(r=>r.path===e)?.value??""}function nT(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let n=e[1],r=parseInt(n.slice(0,2),16),i=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16);return`Color(${r}, ${i}, ${o})`}function rT(t){let e=t.match(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(!e)return null;let n=Number(e[1])/255,r=Number(e[2])/255,i=Number(e[3])/255,o=Number(e[4]);return`Color(${n}f, ${r}f, ${i}f, ${o}f)`}function d_(t){return t==="transparent"?"Color.Transparent":nT(t)??rT(t)??null}function Yr(t){let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function f_(t,e){let n=[];for(let[r,i]of Object.entries(t)){let o=tT(e,i.ref);if(o)switch(r){case"background":case"foreground":{let s=d_(o);s&&n.push({property:r,kotlinValue:s});break}case"padding":{let s=Yr(o);if(s!==null)n.push({property:r,kotlinValue:`${s}.dp`});else{let a=o.trim().split(/\s+/);if(a.length===2){let l=Yr(a[0]),c=Yr(a[1]);l!==null&&n.push({property:"paddingV",kotlinValue:`${l}.dp`}),c!==null&&n.push({property:"paddingH",kotlinValue:`${c}.dp`})}}break}case"radius":case"fontSize":case"minHeight":case"maxWidth":{let s=Yr(o);if(s!==null){let a=r==="fontSize"?`${s}.sp`:`${s}.dp`;n.push({property:r,kotlinValue:a})}break}case"width":{if(o==="100%"||o==="fill")n.push({property:"widthFill",kotlinValue:"true"});else{let s=Yr(o);s!==null&&n.push({property:r,kotlinValue:`${s}.dp`})}break}case"height":{if(o==="100%"||o==="fill")n.push({property:"heightFill",kotlinValue:"true"});else{let s=Yr(o);s!==null&&n.push({property:r,kotlinValue:`${s}.dp`})}break}case"border":{let s=o.match(/^([\d.]+)px/);s&&n.push({property:"borderWidth",kotlinValue:`${Number(s[1])}.dp`});break}case"borderColor":{let s=d_(o);s&&n.push({property:"borderColor",kotlinValue:s});break}case"fontWeight":{let s=iT[o];s&&n.push({property:r,kotlinValue:s});break}case"shadow":{n.push({property:r,kotlinValue:o==="none"?"false":"true"});break}case"display":{o.includes("inline")&&n.push({property:"shrinkWrap",kotlinValue:"true"});break}default:break}}return n}function oT(t){return t.some(e=>e.property==="shrinkWrap")?t.filter(e=>e.property!=="widthFill"):t}function m_(t){let e=oT(t);return e.length===0?"VcVariantStyle()":`VcVariantStyle(${[...e].sort((r,i)=>h_.indexOf(r.property)-h_.indexOf(i.property)).map(r=>`${r.property} = ${r.kotlinValue}`).join(", ")})`}function sT(t,e){return{...t,...e}}function g_(t,e){let n=[];n.push("/** Auto-generated Compose theme \u2014 variant style dictionary. */"),n.push("package generated.compose"),n.push(""),n.push("import androidx.compose.foundation.background"),n.push("import androidx.compose.foundation.border"),n.push("import androidx.compose.foundation.layout.Arrangement"),n.push("import androidx.compose.foundation.layout.Row"),n.push("import androidx.compose.foundation.layout.RowScope"),n.push("import androidx.compose.foundation.layout.fillMaxHeight"),n.push("import androidx.compose.foundation.layout.fillMaxWidth"),n.push("import androidx.compose.foundation.layout.heightIn"),n.push("import androidx.compose.foundation.layout.widthIn"),n.push("import androidx.compose.foundation.layout.PaddingValues"),n.push("import androidx.compose.foundation.layout.padding"),n.push("import androidx.compose.foundation.shape.RoundedCornerShape"),n.push("import androidx.compose.ui.graphics.Shape"),n.push("import androidx.compose.material3.LocalContentColor"),n.push("import androidx.compose.material3.Surface"),n.push("import androidx.compose.runtime.Composable"),n.push("import androidx.compose.ui.Alignment"),n.push("import androidx.compose.ui.Modifier"),n.push("import androidx.compose.ui.draw.clip"),n.push("import androidx.compose.ui.draw.shadow"),n.push("import androidx.compose.ui.graphics.Color"),n.push("import androidx.compose.ui.text.TextStyle"),n.push("import androidx.compose.ui.text.font.FontWeight"),n.push("import androidx.compose.ui.unit.Dp"),n.push("import androidx.compose.ui.unit.TextUnit"),n.push("import androidx.compose.ui.unit.dp"),n.push("import androidx.compose.ui.unit.sp"),n.push(""),n.push("data class VcVariantStyle("),n.push(" val foreground: Color? = null,"),n.push(" val background: Color? = null,"),n.push(" val padding: Dp? = null,"),n.push(" val paddingH: Dp? = null,"),n.push(" val paddingV: Dp? = null,"),n.push(" val widthFill: Boolean? = null,"),n.push(" val heightFill: Boolean? = null,"),n.push(" val shrinkWrap: Boolean? = null,"),n.push(" val radius: Dp? = null,"),n.push(" val fontSize: TextUnit? = null,"),n.push(" val fontWeight: FontWeight? = null,"),n.push(" val shadow: Boolean? = null,"),n.push(" val borderWidth: Dp? = null,"),n.push(" val borderColor: Color? = null,"),n.push(" val minHeight: Dp? = null,"),n.push(" val maxWidth: Dp? = null,"),n.push(")"),n.push(""),n.push("fun VcVariantStyle.asTextStyle(): TextStyle {"),n.push(" var style = TextStyle()"),n.push(" foreground?.let { style = style.copy(color = it) }"),n.push(" fontSize?.let { style = style.copy(fontSize = it) }"),n.push(" fontWeight?.let { style = style.copy(fontWeight = it) }"),n.push(" return style"),n.push("}"),n.push(""),n.push("private fun vcSoftShadowModifier(radius: Dp): Modifier ="),n.push(" Modifier.shadow("),n.push(" elevation = 4.dp,"),n.push(" shape = RoundedCornerShape(radius),"),n.push(" clip = false,"),n.push(" ambientColor = Color.Black.copy(alpha = 0.08f),"),n.push(" spotColor = Color.Black.copy(alpha = 0.08f),"),n.push(" )"),n.push(""),n.push("fun Modifier.applyVcStyle(style: VcVariantStyle): Modifier {"),n.push(" var out = this"),n.push(" if (style.widthFill == true && style.shrinkWrap != true) out = out.fillMaxWidth()"),n.push(" if (style.heightFill == true) out = out.fillMaxHeight()"),n.push(" if (style.shadow == true) out = out.then(vcSoftShadowModifier(style.radius ?: 0.dp))"),n.push(" style.background?.let { out = out.background(it, RoundedCornerShape(style.radius ?: 0.dp)) }"),n.push(" style.radius?.let { out = out.clip(RoundedCornerShape(it)) }"),n.push(" if (style.borderColor != null) out = out.border(style.borderWidth ?: 1.dp, style.borderColor, RoundedCornerShape(style.radius ?: 0.dp))"),n.push(" style.minHeight?.let { out = out.heightIn(min = it) }"),n.push(" style.maxWidth?.let { out = out.widthIn(max = it) }"),n.push(" style.padding?.let { out = out.padding(it) }"),n.push(" style.paddingH?.let { out = out.padding(horizontal = it) }"),n.push(" style.paddingV?.let { out = out.padding(vertical = it) }"),n.push(" return out"),n.push("}"),n.push(""),n.push("@Composable"),n.push("fun VcButton("),n.push(" onClick: () -> Unit,"),n.push(" modifier: Modifier = Modifier,"),n.push(" containerColor: Color = Color.Transparent,"),n.push(" contentColor: Color = Color.Unspecified,"),n.push(" shape: Shape = RoundedCornerShape(0.dp),"),n.push(" contentPadding: PaddingValues = PaddingValues(0.dp),"),n.push(" enabled: Boolean = true,"),n.push(" content: @Composable RowScope.() -> Unit,"),n.push(") {"),n.push(" val resolvedContentColor = if (contentColor == Color.Unspecified) LocalContentColor.current else contentColor"),n.push(" Surface("),n.push(" onClick = onClick,"),n.push(" modifier = modifier,"),n.push(" enabled = enabled,"),n.push(" shape = shape,"),n.push(" color = containerColor,"),n.push(" contentColor = resolvedContentColor,"),n.push(" shadowElevation = 0.dp,"),n.push(" tonalElevation = 0.dp,"),n.push(" ) {"),n.push(" Row("),n.push(" modifier = Modifier.padding(contentPadding),"),n.push(" horizontalArrangement = Arrangement.Center,"),n.push(" verticalAlignment = Alignment.CenterVertically,"),n.push(" content = content,"),n.push(" )"),n.push(" }"),n.push("}"),n.push(""),n.push("object VcTheme {"),n.push(" val defaults: Map<String, VcVariantStyle> = mapOf(");for(let[r,i]of Object.entries(t.defaults)){if(Object.keys(i).length===0)continue;let o=f_(i,e);o.length!==0&&n.push(` ${JSON.stringify(r)} to ${m_(o)},`)}n.push(" )"),n.push(""),n.push(" val variants: Map<String, Map<String, VcVariantStyle>> = mapOf(");for(let[r,i]of Object.entries(t.variants)){let o=Object.entries(i);if(o.length===0)continue;let s=t.defaults[r]??{};n.push(` ${JSON.stringify(r)} to mapOf(`);for(let[a,l]of o){let c=sT(s,l),p=f_(c,e);r==="Box"&&a==="card"&&(p=p.filter(d=>d.property!=="heightFill")),n.push(` ${JSON.stringify(a)} to ${m_(p)},`)}n.push(" ),")}return n.push(" )"),n.push(""),n.push(" fun resolve(element: String, variant: String): VcVariantStyle ="),n.push(" variants[element]?.get(variant) ?: defaults[element] ?: VcVariantStyle()"),n.push("}"),n.push(""),n.join(`
420
+ `)}var iT,h_,y_=K(()=>{"use strict";iT={bold:"FontWeight.Bold",semibold:"FontWeight.SemiBold",medium:"FontWeight.Medium",regular:"FontWeight.Normal",600:"FontWeight.SemiBold",700:"FontWeight.Bold",500:"FontWeight.Medium",400:"FontWeight.Normal"};h_=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","shrinkWrap","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});var b_={};kn(b_,{renderComposeRuntime:()=>aT});import{mkdir as w_,writeFile as Xr}from"node:fs/promises";import{resolve as tn}from"node:path";function v_(){return tn(Ce(),"renderers/compose/templates")}async function aT(t,e,n,r,i){let o=tn(e.generated.reactDir,"../compose"),s=tn(o,"components");if(await w_(o,{recursive:!0}),await w_(s,{recursive:!0}),r?await Xr(tn(o,"VcTheme.kt"),g_(r.theme,r.tokens),"utf-8"):await Xr(tn(o,"VcTheme.kt"),await It(v_(),"VcTheme.kt.hbs",{packageName:"generated.compose"}),"utf-8"),await Xr(tn(o,"Dispatch.kt"),`package generated.compose
421
421
 
422
422
  /**
423
423
  * Dispatch stub for generated Compose screens.
@@ -426,13 +426,13 @@ ${s}
426
426
  suspend fun dispatch(action: String, payload: Map<String, Any?> = emptyMap()) {
427
427
  // TODO: implement app-specific dispatcher bridge.
428
428
  }
429
- `,"utf-8"),i&&r)for(let a of i.partials)try{let c=await Ea(a,{theme:r.theme,tokens:r.tokens}),l=en(s,`${a.exportName}.kt`);await Jr(l,c.replace("package generated.compose","package generated.compose.components"),"utf-8"),console.log(` compose/${a.exportName} \u2192 ${l}`)}catch(c){console.warn(` compose/${a.exportName}: skipped (${c.message})`)}for(let a of n.views)if(a.targets.includes("compose")){let c=en(o,`${a.screenName}Screen.kt`),l=await Et(d_(),"Screen.kt.hbs",{screenName:a.screenName,packageName:"generated.compose",componentName:a.exportName});if(i&&r){let d=i.screens.get(a.screenName);d&&(l=await Ea(d,{theme:r.theme,tokens:r.tokens}))}await Jr(c,l,"utf-8"),console.log(` compose/${a.screenName} \u2192 ${c}`)}for(let a of n.views){if(!a.targets.includes("compose"))continue;let c=yo(t,e,a.screenName);if(await qr(c))try{let l=await wo(c),d=JSON.stringify(l,null,2)+`
430
- `,p=en(o,`${a.screenName}.SampleData.json`);await Jr(p,d,"utf-8"),console.log(` compose/${a.screenName}.SampleData.json \u2192 ${p}`)}catch(l){console.warn(` compose/${a.screenName}.SampleData.json: skipped (${l.message})`)}}}var h_=K(()=>{"use strict";Ut();fo();u_();kd();Br()});var m_={};$n(m_,{renderComposeComponent:()=>iT,renderComposeRuntime:()=>oT,renderReactFromIr:()=>ZA,renderReactPreviewBundle:()=>eT,renderReactRuntime:()=>tT,renderSwiftComponent:()=>rT,renderSwiftUIRuntime:()=>nT});async function ZA(t,e,n){return(await Promise.resolve().then(()=>(Ku(),Ju))).renderReactFromIr(t,e,n)}async function eT(t,e,n){return(await Promise.resolve().then(()=>(Ku(),Ju))).renderReactPreviewBundle(t,e,n)}async function tT(t,e){return(await Promise.resolve().then(()=>(eb(),Zv))).renderReactRuntime(t,e)}async function nT(t,e,n,r,i){return(await Promise.resolve().then(()=>(Pb(),Eb))).renderSwiftUIRuntime(t,e,n,r,i)}async function rT(t,e){return(await Promise.resolve().then(()=>(md(),_b))).renderSwiftComponent(t,e)}async function iT(t,e){return(await Promise.resolve().then(()=>(kd(),i_))).renderComposeComponent(t,e)}async function oT(t,e,n,r,i){return(await Promise.resolve().then(()=>(h_(),f_))).renderComposeRuntime(t,e,n,r,i)}var g_=K(()=>{"use strict"});import{resolve as _o}from"node:path";function Kr(){return Ed||(Ed=Promise.resolve().then(()=>(g_(),m_))),Ed}function ho(t){return t??_o(Ee(),"renderers/react/templates")}function Dr(){return _o(Ee(),"renderers/react/runtime")}function y_(){return _o(Ee(),"renderers/react/preview/components.ts")}function fp(){return _o(Dr(),"structural.css")}function w_(){return _o(Ee(),"renderers/react/elements.yaml")}var Ed,Pr=K(()=>{"use strict";Ut()});var Ud=ja(Wd(),1),{program:BT,createCommand:HT,createArgument:WT,createOption:UT,CommanderError:zT,InvalidArgumentError:GT,InvalidOptionArgumentError:JT,Command:zd,Argument:KT,Option:YT,Help:XT}=Ud.default;var Gd=`# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json
429
+ `,"utf-8"),i&&r)for(let a of i.partials)try{let l=await Aa(a,{theme:r.theme,tokens:r.tokens}),c=tn(s,`${a.exportName}.kt`);await Xr(c,l.replace("package generated.compose","package generated.compose.components"),"utf-8"),console.log(` compose/${a.exportName} \u2192 ${c}`)}catch(l){console.warn(` compose/${a.exportName}: skipped (${l.message})`)}for(let a of n.views)if(a.targets.includes("compose")){let l=tn(o,`${a.screenName}Screen.kt`),c=await It(v_(),"Screen.kt.hbs",{screenName:a.screenName,packageName:"generated.compose",componentName:a.exportName});if(i&&r){let p=i.screens.get(a.screenName);p&&(c=await Aa(p,{theme:r.theme,tokens:r.tokens}))}await Xr(l,c,"utf-8"),console.log(` compose/${a.screenName} \u2192 ${l}`)}for(let a of n.views){if(!a.targets.includes("compose"))continue;let l=bo(t,e,a.screenName);if(await Ur(l))try{let c=await _o(l),p=JSON.stringify(c,null,2)+`
430
+ `,d=tn(o,`${a.screenName}.SampleData.json`);await Xr(d,p,"utf-8"),console.log(` compose/${a.screenName}.SampleData.json \u2192 ${d}`)}catch(c){console.warn(` compose/${a.screenName}.SampleData.json: skipped (${c.message})`)}}}var __=K(()=>{"use strict";Mt();go();y_();Md();er()});var x_={};kn(x_,{renderComposeComponent:()=>fT,renderComposeRuntime:()=>hT,renderReactFromIr:()=>cT,renderReactPreviewBundle:()=>lT,renderReactRuntime:()=>uT,renderSwiftComponent:()=>dT,renderSwiftUIRuntime:()=>pT});async function cT(t,e,n){return(await Promise.resolve().then(()=>(ip(),rp))).renderReactFromIr(t,e,n)}async function lT(t,e,n){return(await Promise.resolve().then(()=>(ip(),rp))).renderReactPreviewBundle(t,e,n)}async function uT(t,e){return(await Promise.resolve().then(()=>(ab(),sb))).renderReactRuntime(t,e)}async function pT(t,e,n,r,i){return(await Promise.resolve().then(()=>(Mb(),Nb))).renderSwiftUIRuntime(t,e,n,r,i)}async function dT(t,e){return(await Promise.resolve().then(()=>(Sd(),Pb))).renderSwiftComponent(t,e)}async function fT(t,e){return(await Promise.resolve().then(()=>(Md(),p_))).renderComposeComponent(t,e)}async function hT(t,e,n,r,i){return(await Promise.resolve().then(()=>(__(),b_))).renderComposeRuntime(t,e,n,r,i)}var $_=K(()=>{"use strict"});import{resolve as So}from"node:path";function Qr(){return Vd||(Vd=Promise.resolve().then(()=>($_(),x_))),Vd}function yo(t){return t??So(Ce(),"renderers/react/templates")}function Br(){return So(Ce(),"renderers/react/runtime")}function S_(){return So(Ce(),"renderers/react/preview/components.ts")}function xp(){return So(Br(),"structural.css")}function C_(){return So(Ce(),"renderers/react/elements.yaml")}var Vd,Ar=K(()=>{"use strict";Mt()});var ef=Ba(Zd(),1),{program:nO,createCommand:rO,createArgument:iO,createOption:oO,CommanderError:sO,InvalidArgumentError:aO,InvalidOptionArgumentError:cO,Command:tf,Argument:lO,Option:uO,Help:pO}=ef.default;var nf=`# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json
431
431
  cli_contracts: 0.1.0
432
432
 
433
433
  info:
434
434
  title: view-contracts CLI
435
- version: 0.5.12
435
+ version: 0.5.13
436
436
  description: >-
437
437
  Contract-first UI design toolchain. Compiles restricted view-contract TSX
438
438
  to language-neutral View IR and renders platform targets (React, SwiftUI, Compose).
@@ -631,11 +631,11 @@ command_sets:
631
631
  description: Server stopped normally.
632
632
  '1':
633
633
  description: Startup or compile failed.
634
- `,Jd=`{
634
+ `,rf=`{
635
635
  "cli_contracts": "0.1.0",
636
636
  "info": {
637
637
  "title": "view-contracts CLI",
638
- "version": "0.5.12",
638
+ "version": "0.5.13",
639
639
  "description": "Contract-first UI design toolchain. Compiles restricted view-contract TSX to language-neutral View IR and renders platform targets (React, SwiftUI, Compose)."
640
640
  },
641
641
  "artifact_slots": {
@@ -924,22 +924,22 @@ command_sets:
924
924
  }
925
925
  }
926
926
  }
927
- }`;function Kd(t,e){let n=new zd;n.name("view-contracts").version(e,"-V, --version").description("View contract compiler and renderer toolchain."),n.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(o,s)=>{await t.compile(o,s.optsWithGlobals())});let r=n.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(o,s)=>{await t.renderReact(o,s.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(o,s)=>{await t.renderBridge(o,s.optsWithGlobals())}),n.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(o,s)=>{await t.build(o,s.optsWithGlobals())});let i=n.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(o,s)=>{await t.contractsGenerate(o,s.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(o,s)=>{await t.contractsCheck(o,s.optsWithGlobals())}),n.command("preview").description("Start DSL preview HTTP server.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").option("-p, --port <number>","HTTP listen port.").option("--host <address>","HTTP listen host.").option("--screen <name>","Screen name from view-bindings.yaml (default first react target).").action(async(o,s)=>{await t.preview(o,s.optsWithGlobals())}),n.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(o,s)=>{o.length===0&&!s.all&&(process.stderr.write(JSON.stringify({code:"INVALID_ARGS",message:"Specify command IDs or use --all"})+`
928
- `),process.exit(2));let a=s.format||"yaml",c=JSON.parse(Jd),l=s.all?[]:o;if(l.length===0)if(a==="json"){let d={};s.includeMeta&&(d._meta={source:"embedded",type:"cli-contracts/extract",extractedAt:new Date().toISOString(),specVersion:c.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.preview"]}),Object.assign(d,c),process.stdout.write(JSON.stringify(d,null,2)+`
929
- `)}else{let d=[];if(d.push("# view-contracts extract"),d.push("# source: embedded"),d.push("# type: cli-contracts/command-extract"),s.includeMeta){d.push("---"),d.push("source: embedded"),d.push("type: cli-contracts/command-extract"),d.push("extractedAt: "+new Date().toISOString()),d.push("spec_version: "+(c.cli_contracts??"0.1.0")),d.push("commands:");for(let p 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.preview"])d.push(" - "+p)}d.push("---"),d.push(Gd),process.stdout.write(d.join(`
927
+ }`;function of(t,e){let n=new tf;n.name("view-contracts").version(e,"-V, --version").description("View contract compiler and renderer toolchain."),n.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(o,s)=>{await t.compile(o,s.optsWithGlobals())});let r=n.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(o,s)=>{await t.renderReact(o,s.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(o,s)=>{await t.renderBridge(o,s.optsWithGlobals())}),n.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(o,s)=>{await t.build(o,s.optsWithGlobals())});let i=n.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(o,s)=>{await t.contractsGenerate(o,s.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(o,s)=>{await t.contractsCheck(o,s.optsWithGlobals())}),n.command("preview").description("Start DSL preview HTTP server.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").option("-p, --port <number>","HTTP listen port.").option("--host <address>","HTTP listen host.").option("--screen <name>","Screen name from view-bindings.yaml (default first react target).").action(async(o,s)=>{await t.preview(o,s.optsWithGlobals())}),n.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(o,s)=>{o.length===0&&!s.all&&(process.stderr.write(JSON.stringify({code:"INVALID_ARGS",message:"Specify command IDs or use --all"})+`
928
+ `),process.exit(2));let a=s.format||"yaml",l=JSON.parse(rf),c=s.all?[]:o;if(c.length===0)if(a==="json"){let p={};s.includeMeta&&(p._meta={source:"embedded",type:"cli-contracts/extract",extractedAt:new Date().toISOString(),specVersion:l.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.preview"]}),Object.assign(p,l),process.stdout.write(JSON.stringify(p,null,2)+`
929
+ `)}else{let p=[];if(p.push("# view-contracts extract"),p.push("# source: embedded"),p.push("# type: cli-contracts/command-extract"),s.includeMeta){p.push("---"),p.push("source: embedded"),p.push("type: cli-contracts/command-extract"),p.push("extractedAt: "+new Date().toISOString()),p.push("spec_version: "+(l.cli_contracts??"0.1.0")),p.push("commands:");for(let d 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.preview"])p.push(" - "+d)}p.push("---"),p.push(nf),process.stdout.write(p.join(`
930
930
  `)+`
931
- `)}else{let d={cli_contracts:c.cli_contracts,info:c.info,command_sets:{}},p=d.command_sets;for(let[f,m]of Object.entries(c.command_sets??{})){let y=m.commands;if(!y)continue;let g={};for(let[w,b]of Object.entries(y)){let P=f+"."+w;l.some(x=>x===w||x===P||w.startsWith(x+"."))&&(g[w]=b)}if(Object.keys(g).length>0){let w={...m};w.commands=g,p[f]=w}}c.components&&(d.components=c.components),process.stdout.write(JSON.stringify(d,null,2)+`
932
- `)}process.exit(0)}),n}import{writeFile as IT,mkdir as RT}from"node:fs/promises";import{resolve as jt,dirname as T_,relative as AT}from"node:path";import{spawn as TT}from"node:child_process";import{readFile as df}from"node:fs/promises";import{basename as _0,resolve as ff}from"node:path";vt();import{dirname as ef,resolve as tf}from"node:path";import L from"typescript";import{readFileSync as n0}from"node:fs";import{resolve as r0}from"node:path";import pe from"typescript";function nc(t,e){let n=new Map;for(let r of t.statements){if(!pe.isImportDeclaration(r)||!r.importClause?.namedBindings||!pe.isStringLiteral(r.moduleSpecifier)||!pe.isNamedImports(r.importClause.namedBindings))continue;let i=r.moduleSpecifier.text;i.endsWith(".tsx")||(i=`${i}.tsx`);let o=r0(e,i);for(let s of r.importClause.namedBindings.elements)n.set(s.name.text,o)}return n}function i0(t){if(pe.isObjectBindingPattern(t.name)){let e=[];for(let n of t.name.elements)pe.isBindingElement(n)&&pe.isIdentifier(n.name)&&e.push(n.name.text);return e}return pe.isIdentifier(t.name)?[t.name.text]:[]}function o0(t){if(!pe.isObjectBindingPattern(t.name)||t.name.elements.length===0)return null;let e=t.name.elements[0];return!pe.isBindingElement(e)||!pe.isIdentifier(e.name)?null:e.name.text}function s0(t){if(pe.isParenthesizedExpression(t))return t.expression;if(pe.isJsxElement(t)||pe.isJsxSelfClosingElement(t)||pe.isJsxFragment(t))return t;if(pe.isBlock(t))for(let e=t.statements.length-1;e>=0;e--){let n=t.statements[e];if(pe.isReturnStatement(n)&&n.expression)return pe.isParenthesizedExpression(n.expression)?n.expression.expression:n.expression}return null}function Qd(t){if(!pe.isIdentifier(t.expression)||t.expression.text!=="view"||t.arguments.length!==1)return null;let e=t.arguments[0];if(!pe.isArrowFunction(e)&&!pe.isFunctionExpression(e))return null;let n="__noop",r=[];if(e.parameters.length===1){let a=o0(e.parameters[0]);if(r=i0(e.parameters[0]),a)n=a;else if(pe.isIdentifier(e.parameters[0].name))n=e.parameters[0].name.text,r=[n];else return null}else if(e.parameters.length>1)return null;let i=s0(e.body);if(!i)return null;let o=t.typeArguments?.length===1?t.typeArguments[0]:void 0,s=o?.getText();return{paramName:n,jsxRoot:i,propNames:r,propsType:s,propsTypeNode:o}}function rc(t,e){let n=null;function r(i){if(pe.isVariableStatement(i))for(let o of i.declarationList.declarations){if(!pe.isIdentifier(o.name)||o.name.text!==e||!o.initializer||!pe.isCallExpression(o.initializer))continue;let s=Qd(o.initializer);s&&(n=s)}if(pe.isExportAssignment(i)&&i.isExportEquals===!1&&i.expression&&pe.isCallExpression(i.expression)){let o=Qd(i.expression);o&&e==="default"&&(n=o)}pe.forEachChild(i,r)}return r(t),n}function Zd(t,e){let n=n0(t,"utf-8"),r=pe.createSourceFile(t,n,pe.ScriptTarget.Latest,!0,pe.ScriptKind.TSX);return rc(r,e)}function a0(t,e,n){if("tone"in e){let r=e.tone;delete e.tone,"variant"in e||(e.variant=r),n.warnings.push(`"tone" on <${t}> is deprecated; use variant instead (mapped automatically)`)}if("textStyle"in e){let r=e.textStyle;delete e.textStyle,"variant"in e||(e.variant=r),n.warnings.push(`"textStyle" on <${t}> is deprecated; use variant instead (mapped automatically)`)}}function ic(t){return t.join(".")}function ct(t){let e=t.getText().replace(/\s+/g," ").trim();return e.length>100?`${e.slice(0,97)}...`:e}function sc(t){if(L.isIdentifier(t))return[t.text];if(L.isPropertyAccessExpression(t)&&!t.questionDotToken){let e=sc(t.expression);return e?[...e,t.name.text]:null}return null}function nf(t,e){if(e.length===0)return t;let n=e.join(".");return{kind:"binding",path:t.path?`${t.path}.${n}`:n,scope:t.scope}}function si(t,e){let n=sc(t);if(!n)return null;if(n[0]in e.propBindings)return nf(e.propBindings[n[0]],n.slice(1));if(n[0]===e.vmName)return{kind:"binding",path:ic(n.slice(1))};let r=e.scopes[e.scopes.length-1];return r&&n[0]===r?{kind:"binding",path:ic(n.slice(1)),scope:r}:null}function rf(t,e){let n=[];for(let r of t.properties)L.isPropertyAssignment(r)&&L.isIdentifier(r.name)?n.push({key:r.name.text,value:r.initializer}):L.isShorthandPropertyAssignment(r)?n.push({key:r.name.text,value:r.name}):e.errors.push(`Unsupported object literal member: ${ct(r)}`);return n}function c0(t,e){let n=t.find(o=>o.key==="name");if(!n||!L.isStringLiteral(n.value))return null;let r=n.value.text,i={};for(let{key:o,value:s}of t)if(o!=="name"){if(o!=="params"){e.errors.push(`Unsupported property "${o}" in action "${r}"; an action is { name, params? }`);continue}if(!L.isObjectLiteralExpression(s)){e.errors.push(`Action "${r}" params must be an object literal: ${ct(s)}`);continue}for(let a of rf(s,e)){let c=Vo(a.value,e);c!==null?i[a.key]=c:e.errors.push(`Unsupported action param expression for "${a.key}": ${ct(a.value)}`)}}return Object.keys(i).length>0?{kind:"action",name:r,params:i}:{kind:"action",name:r}}function Vo(t,e){if(L.isStringLiteral(t)||L.isNoSubstitutionTemplateLiteral(t))return t.text;if(t.kind===L.SyntaxKind.TrueKeyword)return!0;if(t.kind===L.SyntaxKind.FalseKeyword)return!1;if(L.isNumericLiteral(t))return Number(t.text);if(t.kind===L.SyntaxKind.NullKeyword)return null;if(L.isTemplateExpression(t)){let r=[];t.head.text&&r.push(t.head.text);for(let i of t.templateSpans){let o=si(i.expression,e);if(!o)return null;r.push(o),i.literal.text&&r.push(i.literal.text)}return{kind:"concat",parts:r}}let n=si(t,e);if(n)return n;if(L.isObjectLiteralExpression(t)){let r=rf(t,e),i=c0(r,e);if(i)return i;let o={};for(let{key:s,value:a}of r){let c=Vo(a,e);c!==null?o[s]=c:e.errors.push(`Unsupported object literal property "${s}": ${ct(a)}`)}return{kind:"literal",value:o}}if(L.isArrayLiteralExpression(t)){let r=[];for(let i of t.elements){if(!L.isExpression(i))continue;let o=Vo(i,e);o!==null?r.push(o):e.errors.push(`Unsupported array element expression: ${ct(i)}`)}return r}return null}function l0(t){return L.isIdentifier(t)?t.text:L.isPropertyAccessExpression(t)&&L.isIdentifier(t.name)?t.name.text:null}function of(t){return t.getText()}function oc(t,e){let n=[];for(let r of t){if(L.isJsxText(r)){let i=r.getText().trim();i&&n.push({kind:"text",value:i});continue}if(L.isJsxExpression(r)&&r.expression){let i=si(r.expression,e);if(i){n.push(i);continue}let o=sf(r.expression,e);o?Array.isArray(o)?n.push(...o):n.push(o):e.errors.push(`Unsupported JSX child expression: ${ct(r.expression)}`);continue}if(L.isJsxElement(r)||L.isJsxSelfClosingElement(r)){let i=ai(r,e);i&&n.push(i);continue}L.isJsxFragment(r)&&e.errors.push(`Unsupported nested JSX fragment: ${ct(r)}`)}return n}function u0(t,e){if(t.length===0)return null;let n=t[0];return n in e.propBindings?nf(e.propBindings[n],t.slice(1)):n===e.vmName?{kind:"binding",path:ic(t.slice(1))}:null}function sf(t,e){if(L.isParenthesizedExpression(t))return sf(t.expression,e);if(L.isCallExpression(t)&&L.isPropertyAccessExpression(t.expression)&&!t.expression.questionDotToken){let r=sc(t.expression.expression),i=t.expression.name.text;if(r&&i==="map"&&t.arguments.length>=1){let o=u0(r,e);if(!o)return null;let s=t.arguments[0];if(!L.isArrowFunction(s)&&!L.isFunctionExpression(s))return e.errors.push("map callback must be an arrow function"),null;let a=s.parameters;if(a.length!==1||!L.isIdentifier(a[0].name))return e.errors.push("map callback must have a single item parameter"),null;let c=a[0].name.text,l={...e,scopes:[...e.scopes,c]},d=null,p=L.isParenthesizedExpression(s.body)?s.body.expression:s.body;if(L.isBlock(s.body))return e.errors.push("map callback body must be a JSX expression, not a block"),null;if(L.isJsxElement(p)||L.isJsxSelfClosingElement(p)?d=ai(p,l):L.isJsxFragment(p)&&(d=ac(p,l)),!d)return null;let f;if(L.isJsxElement(p)||L.isJsxSelfClosingElement(p)){let m=L.isJsxElement(p)?p.openingElement.attributes:p.attributes;for(let y of m.properties)if(!(!L.isJsxAttribute(y)||of(y.name)!=="key"||!y.initializer)&&L.isJsxExpression(y.initializer)&&y.initializer.expression){let g=si(y.initializer.expression,l);g&&(f=g)}}return{kind:"map",source:o,item:c,key:f,body:d}}}if(L.isJsxElement(t)||L.isJsxSelfClosingElement(t))return ai(t,e);let n=si(t,e);return n||null}function ac(t,e){return{kind:"fragment",children:oc(t.children,e)}}function p0(t,e,n){let r=n.viewImports.get(t);return r?Zd(r,t)?{kind:"viewRef",name:t,sourcePath:r,props:e}:(n.errors.push(`View component "${t}" is imported but has no view() export`),null):null}function ai(t,e){let n=L.isJsxElement(t)?t.openingElement:t,r=l0(n.tagName);if(!r)return e.errors.push("Unsupported JSX tag expression"),null;let i={};for(let c of n.attributes.properties){if(!L.isJsxAttribute(c)){e.errors.push(`Unsupported JSX spread attribute on <${r}>: ${ct(c)}`);continue}let l=of(c.name);if(l!=="key"){if(!c.initializer){i[l]=!0;continue}if(L.isStringLiteral(c.initializer)){i[l]=c.initializer.text;continue}if(L.isJsxExpression(c.initializer)&&c.initializer.expression){let d=Vo(c.initializer.expression,e);d!==null?i[l]=d:e.errors.push(`Unsupported JSX prop expression for "${l}" on <${r}>: ${ct(c.initializer.expression)}`);continue}e.errors.push(`Unsupported JSX prop initializer for "${l}" on <${r}>: ${ct(c.initializer)}`)}}if(!e.allowedComponents.has(r)){let c=p0(r,i,e);return c||(e.errors.push(`Component "${r}" is not in the allowed registry`),null)}a0(r,i,e);let o=e;if(r==="Table"&&i.source){let c=typeof i.source=="object"&&"kind"in i.source&&i.source.kind==="binding"?i.source:void 0;c&&(o={...e,tableSource:c})}let s=typeof i.each=="string"?i.each:void 0;if(s){let c=e.tableSource;if(!c)return e.errors.push(`<${r} each="${s}"> requires an ancestor <Table source={...}>`),null;delete i.each;let l={...o,scopes:[...o.scopes,s]},d=L.isJsxElement(t)?oc(t.children,l):[];return{kind:"map",source:c,item:s,body:{kind:"component",name:r,props:i,children:d}}}let a=L.isJsxElement(t)?oc(t.children,o):[];return{kind:"component",name:r,props:i,children:a}}function d0(t){let e=null;function n(r){if(L.isCallExpression(r)&&L.isIdentifier(r.expression)&&r.expression.text==="screen"&&r.arguments.length===1&&(L.isArrowFunction(r.arguments[0])||L.isFunctionExpression(r.arguments[0]))){let i=r.arguments[0],o="unknown";if(r.typeArguments&&r.typeArguments.length===1){let a=r.typeArguments[0];L.isTypeReferenceNode(a)&&L.isIdentifier(a.typeName)&&(o=a.typeName.text)}let s=i.body;if(L.isParenthesizedExpression(s))(L.isJsxElement(s.expression)||L.isJsxSelfClosingElement(s.expression))&&(e={viewModel:o,jsxRoot:s.expression});else if(L.isJsxElement(s)||L.isJsxSelfClosingElement(s))e={viewModel:o,jsxRoot:s};else if(L.isBlock(s)&&s.statements.length===1){let a=s.statements[0];L.isReturnStatement(a)&&a.expression&&(L.isParenthesizedExpression(a.expression)?e={viewModel:o,jsxRoot:a.expression.expression}:e={viewModel:o,jsxRoot:a.expression})}}L.forEachChild(r,n)}return n(t),e}function af(t,e,n,r={}){let i=new Set(at);for(let p of r.allowlistExtra??[])i.add(p);let o=tf(e),s=ef(o),a=L.createSourceFile(o,t,L.ScriptTarget.Latest,!0,L.ScriptKind.TSX),c={vmName:"vm",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:nc(a,s),allowedComponents:i},l=d0(a);if(!l)return{viewModel:"unknown",exportName:n,root:{kind:"fragment",children:[]},errors:["No screen<T>() default export found"],warnings:[]};let d=L.isJsxElement(l.jsxRoot)||L.isJsxSelfClosingElement(l.jsxRoot)?ai(l.jsxRoot,c):L.isJsxFragment(l.jsxRoot)?ac(l.jsxRoot,c):null;return d?{viewModel:l.viewModel,exportName:n,root:d,errors:c.errors,warnings:c.warnings}:(c.errors.push("screen() callback must return a single JSX root element"),{viewModel:l.viewModel,exportName:n,root:{kind:"fragment",children:[]},errors:c.errors,warnings:c.warnings})}function f0(t,e){let n={...e.propBindings};for(let i of t.propNames)n[i]={kind:"binding",path:"",scope:i};let r={...e,vmName:t.paramName,propBindings:n,scopes:[]};return L.isJsxElement(t.jsxRoot)||L.isJsxSelfClosingElement(t.jsxRoot)?ai(t.jsxRoot,r):L.isJsxFragment(t.jsxRoot)?ac(t.jsxRoot,r):L.isConditionalExpression(t.jsxRoot)?(e.errors.push("view() partial root must be a JSX element or fragment; conditional expressions are not supported"),null):L.isExpression(t.jsxRoot)?(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported expression: ${ct(t.jsxRoot)}`),null):(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported syntax kind: ${L.SyntaxKind[t.jsxRoot.kind]}`),null)}function h0(t,e){if(!t||!L.isTypeLiteralNode(t))return;let n=[];for(let r of t.members)L.isPropertySignature(r)&&L.isIdentifier(r.name)&&r.type?n.push({name:r.name.text,type:r.type.getText(),optional:r.questionToken!==void 0}):e.errors.push(`Unsupported view() props type member: ${ct(r)}`);return n}function cf(t,e,n,r={}){let i=new Set(at);for(let f of r.allowlistExtra??[])i.add(f);let o=tf(e),s=ef(o),a=L.createSourceFile(o,t,L.ScriptTarget.Latest,!0,L.ScriptKind.TSX),c=rc(a,n),l={vmName:c?.paramName??"__noop",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:nc(a,s),allowedComponents:i};if(!c)return{exportName:n,propNames:[],root:{kind:"fragment",children:[]},errors:[`No view() export "${n}" found in ${e}`],warnings:[]};let d=h0(c.propsTypeNode,l),p=f0(c,l);return p?{exportName:n,propsType:c.propsType,propDecls:d,propNames:c.propNames,root:p,errors:l.errors,warnings:l.warnings}:{exportName:n,propsType:c.propsType,propDecls:d,propNames:c.propNames,root:{kind:"fragment",children:[]},errors:l.errors,warnings:l.warnings}}function cc(t){let e=[];function n(r){if(r.kind==="viewRef"){e.push(r);return}if(r.kind==="component"){for(let i of r.children)n(i);return}if(r.kind==="map"){n(r.body);return}if(r.kind==="fragment")for(let i of r.children)n(i)}return n(t),e}function lf(t){return`${t.sourcePath}:${t.name}`}import{relative as m0}from"node:path";function ci(t,e){return m0(t,e).split("\\").join("/")}vt();var g0=new Set(["swiftui","compose"]),y0=new Set(["action"]);function w0(t,e){return!at.has(t)&&t in e.extensions}function lc(t){return t?` (${t})`:""}function Lo(t,e,n={}){let r=[],i=[],o=n.targets??[],s=o.some(c=>g0.has(c)),a=c=>{if(c.kind!=="viewRef"){if(c.kind==="component"){if(!at.has(c.name)&&!(c.name in e.extensions))r.push(`Extension component "${c.name}" is not registered in extensions.yaml${lc(n.source)}`);else if(w0(c.name,e)){let l=e.extensions[c.name];s&&l.renderer==="react-only"&&r.push(`Extension "${c.name}" is react-only but binding targets include native renderer(s): ${o.join(", ")}${lc(n.source)}`);for(let d of Object.keys(c.props))d in l.properties||y0.has(d)||r.push(`Extension "${c.name}" does not accept property "${d}"${lc(n.source)}`)}for(let l of c.children)a(l);return}if(c.kind==="map"){a(c.body);return}if(c.kind==="fragment")for(let l of c.children)a(l)}};return a(t),{errors:r,warnings:i}}function uf(t,e,n,r,i){let o=[],s=[],a=Lo(t,n,{targets:r,source:i.screen});o.push(...a.errors),s.push(...a.warnings);for(let c=0;c<e.length;c++){let l=Lo(e[c],n,{targets:r,source:i.partials[c]});o.push(...l.errors),s.push(...l.warnings)}return{errors:o,warnings:s}}vt();function v0(t){let e=oi[t];return e?e.lowering==="inline-css"||e.lowering==="class-name":!1}function b0(t){return typeof t=="object"&&t!==null&&"kind"in t&&t.kind==="action"}function li(t,e,n,r){if(t.kind==="component"){let{name:i,props:o}=t;if(n.has(i)||!at.has(i)){for(let s of t.children)li(s,e,n,r);return}for(let[s,a]of Object.entries(o))oi[s]?.type==="action"&&!b0(a)&&r.push(`${e}: <${i}> "${s}" must be an action descriptor { name: "..." }, got ${JSON.stringify(a)}`),v0(s)&&(Xd(s,i)||r.push(`${e}: <${i}> does not accept property "${s}"`));for(let s of t.children)li(s,e,n,r);return}if(t.kind==="map"){li(t.body,e,n,r);return}if(t.kind==="fragment"){for(let i of t.children)li(i,e,n,r);return}}async function pf(t,e=[]){let n=new Set(e),r=[];for(let i of t)li(i.root,i.source,n,r);if(r.length>0)throw new Error(`View property validation failed:
931
+ `)}else{let p={cli_contracts:l.cli_contracts,info:l.info,command_sets:{}},d=p.command_sets;for(let[f,m]of Object.entries(l.command_sets??{})){let y=m.commands;if(!y)continue;let g={};for(let[w,b]of Object.entries(y)){let P=f+"."+w;c.some(x=>x===w||x===P||w.startsWith(x+"."))&&(g[w]=b)}if(Object.keys(g).length>0){let w={...m};w.commands=g,d[f]=w}}l.components&&(p.components=l.components),process.stdout.write(JSON.stringify(p,null,2)+`
932
+ `)}process.exit(0)}),n}import{writeFile as HT,mkdir as WT}from"node:fs/promises";import{resolve as Sn,dirname as UT}from"node:path";import{spawn as zT}from"node:child_process";import{readFile as vf}from"node:fs/promises";import{basename as I0,resolve as bf}from"node:path";nt();import{dirname as af,resolve as cf}from"node:path";import L from"typescript";import{existsSync as l0,readFileSync as u0}from"node:fs";import{resolve as p0}from"node:path";import pe from"typescript";function cc(t,e){let n=new Map;for(let r of t.statements){if(!pe.isImportDeclaration(r)||!r.importClause?.namedBindings||r.importClause.isTypeOnly||!pe.isStringLiteral(r.moduleSpecifier)||!r.moduleSpecifier.text.startsWith(".")||!pe.isNamedImports(r.importClause.namedBindings))continue;let i=r.moduleSpecifier.text;i.endsWith(".tsx")||(i=`${i}.tsx`);let o=p0(e,i);for(let s of r.importClause.namedBindings.elements)s.isTypeOnly||n.set(s.name.text,o)}return n}function d0(t){if(pe.isObjectBindingPattern(t.name)){let e=[];for(let n of t.name.elements)pe.isBindingElement(n)&&pe.isIdentifier(n.name)&&e.push(n.name.text);return e}return pe.isIdentifier(t.name)?[t.name.text]:[]}function f0(t){if(!pe.isObjectBindingPattern(t.name)||t.name.elements.length===0)return null;let e=t.name.elements[0];return!pe.isBindingElement(e)||!pe.isIdentifier(e.name)?null:e.name.text}function h0(t){if(pe.isParenthesizedExpression(t))return t.expression;if(pe.isJsxElement(t)||pe.isJsxSelfClosingElement(t)||pe.isJsxFragment(t))return t;if(pe.isBlock(t))for(let e=t.statements.length-1;e>=0;e--){let n=t.statements[e];if(pe.isReturnStatement(n)&&n.expression)return pe.isParenthesizedExpression(n.expression)?n.expression.expression:n.expression}return null}function sf(t){if(!pe.isIdentifier(t.expression)||t.expression.text!=="view"||t.arguments.length!==1)return null;let e=t.arguments[0];if(!pe.isArrowFunction(e)&&!pe.isFunctionExpression(e))return null;let n="__noop",r=[];if(e.parameters.length===1){let a=f0(e.parameters[0]);if(r=d0(e.parameters[0]),a)n=a;else if(pe.isIdentifier(e.parameters[0].name))n=e.parameters[0].name.text,r=[n];else return null}else if(e.parameters.length>1)return null;let i=h0(e.body);if(!i)return null;let o=t.typeArguments?.length===1?t.typeArguments[0]:void 0,s=o?.getText();return{paramName:n,jsxRoot:i,propNames:r,propsType:s,propsTypeNode:o}}function lc(t,e){let n=null;function r(i){if(pe.isVariableStatement(i))for(let o of i.declarationList.declarations){if(!pe.isIdentifier(o.name)||o.name.text!==e||!o.initializer||!pe.isCallExpression(o.initializer))continue;let s=sf(o.initializer);s&&(n=s)}if(pe.isExportAssignment(i)&&i.isExportEquals===!1&&i.expression&&pe.isCallExpression(i.expression)){let o=sf(i.expression);o&&e==="default"&&(n=o)}pe.forEachChild(i,r)}return r(t),n}function uc(t,e){if(!l0(t))return null;let n=u0(t,"utf-8"),r=pe.createSourceFile(t,n,pe.ScriptTarget.Latest,!0,pe.ScriptKind.TSX);return lc(r,e)}function m0(t,e,n){if("tone"in e){let r=e.tone;delete e.tone,"variant"in e||(e.variant=r),n.warnings.push(`"tone" on <${t}> is deprecated; use variant instead (mapped automatically)`)}if("textStyle"in e){let r=e.textStyle;delete e.textStyle,"variant"in e||(e.variant=r),n.warnings.push(`"textStyle" on <${t}> is deprecated; use variant instead (mapped automatically)`)}}function pc(t){return t.join(".")}function ut(t){let e=t.getText().replace(/\s+/g," ").trim();return e.length>100?`${e.slice(0,97)}...`:e}function fc(t){if(L.isIdentifier(t))return[t.text];if(L.isPropertyAccessExpression(t)&&!t.questionDotToken){let e=fc(t.expression);return e?[...e,t.name.text]:null}return null}function lf(t,e){if(e.length===0)return t;let n=e.join(".");return{kind:"binding",path:t.path?`${t.path}.${n}`:n,scope:t.scope}}function li(t,e){let n=fc(t);if(!n)return null;if(n[0]in e.propBindings)return lf(e.propBindings[n[0]],n.slice(1));if(n[0]===e.vmName)return{kind:"binding",path:pc(n.slice(1))};let r=e.scopes[e.scopes.length-1];return r&&n[0]===r?{kind:"binding",path:pc(n.slice(1)),scope:r}:null}function uf(t,e){let n=[];for(let r of t.properties)L.isPropertyAssignment(r)&&L.isIdentifier(r.name)?n.push({key:r.name.text,value:r.initializer}):L.isShorthandPropertyAssignment(r)?n.push({key:r.name.text,value:r.name}):e.errors.push(`Unsupported object literal member: ${ut(r)}`);return n}function g0(t,e){let n=t.find(o=>o.key==="name");if(!n||!L.isStringLiteral(n.value))return null;let r=n.value.text,i={};for(let{key:o,value:s}of t)if(o!=="name"){if(o!=="params"){e.errors.push(`Unsupported property "${o}" in action "${r}"; an action is { name, params? }`);continue}if(!L.isObjectLiteralExpression(s)){e.errors.push(`Action "${r}" params must be an object literal: ${ut(s)}`);continue}for(let a of uf(s,e)){let l=Do(a.value,e);l!==null?i[a.key]=l:e.errors.push(`Unsupported action param expression for "${a.key}": ${ut(a.value)}`)}}return Object.keys(i).length>0?{kind:"action",name:r,params:i}:{kind:"action",name:r}}function Do(t,e){if(L.isStringLiteral(t)||L.isNoSubstitutionTemplateLiteral(t))return t.text;if(t.kind===L.SyntaxKind.TrueKeyword)return!0;if(t.kind===L.SyntaxKind.FalseKeyword)return!1;if(L.isNumericLiteral(t))return Number(t.text);if(t.kind===L.SyntaxKind.NullKeyword)return null;if(L.isTemplateExpression(t)){let r=[];t.head.text&&r.push(t.head.text);for(let i of t.templateSpans){let o=li(i.expression,e);if(!o)return null;r.push(o),i.literal.text&&r.push(i.literal.text)}return{kind:"concat",parts:r}}let n=li(t,e);if(n)return n;if(L.isObjectLiteralExpression(t)){let r=uf(t,e),i=g0(r,e);if(i)return i;let o={};for(let{key:s,value:a}of r){let l=Do(a,e);l!==null?o[s]=l:e.errors.push(`Unsupported object literal property "${s}": ${ut(a)}`)}return{kind:"literal",value:o}}if(L.isArrayLiteralExpression(t)){let r=[];for(let i of t.elements){if(!L.isExpression(i))continue;let o=Do(i,e);o!==null?r.push(o):e.errors.push(`Unsupported array element expression: ${ut(i)}`)}return r}return null}function y0(t){return L.isIdentifier(t)?t.text:L.isPropertyAccessExpression(t)&&L.isIdentifier(t.name)?t.name.text:null}function pf(t){return t.getText()}function dc(t,e){let n=[];for(let r of t){if(L.isJsxText(r)){let i=r.getText().trim();i&&n.push({kind:"text",value:i});continue}if(L.isJsxExpression(r)&&r.expression){let i=li(r.expression,e);if(i){n.push(i);continue}let o=df(r.expression,e);o?Array.isArray(o)?n.push(...o):n.push(o):e.errors.push(`Unsupported JSX child expression: ${ut(r.expression)}`);continue}if(L.isJsxElement(r)||L.isJsxSelfClosingElement(r)){let i=ui(r,e);i&&n.push(i);continue}L.isJsxFragment(r)&&e.errors.push(`Unsupported nested JSX fragment: ${ut(r)}`)}return n}function w0(t,e){if(t.length===0)return null;let n=t[0];return n in e.propBindings?lf(e.propBindings[n],t.slice(1)):n===e.vmName?{kind:"binding",path:pc(t.slice(1))}:null}function df(t,e){if(L.isParenthesizedExpression(t))return df(t.expression,e);if(L.isCallExpression(t)&&L.isPropertyAccessExpression(t.expression)&&!t.expression.questionDotToken){let r=fc(t.expression.expression),i=t.expression.name.text;if(r&&i==="map"&&t.arguments.length>=1){let o=w0(r,e);if(!o)return null;let s=t.arguments[0];if(!L.isArrowFunction(s)&&!L.isFunctionExpression(s))return e.errors.push("map callback must be an arrow function"),null;let a=s.parameters;if(a.length!==1||!L.isIdentifier(a[0].name))return e.errors.push("map callback must have a single item parameter"),null;let l=a[0].name.text,c={...e,scopes:[...e.scopes,l]},p=null,d=L.isParenthesizedExpression(s.body)?s.body.expression:s.body;if(L.isBlock(s.body))return e.errors.push("map callback body must be a JSX expression, not a block"),null;if(L.isJsxElement(d)||L.isJsxSelfClosingElement(d)?p=ui(d,c):L.isJsxFragment(d)&&(p=hc(d,c)),!p)return null;let f;if(L.isJsxElement(d)||L.isJsxSelfClosingElement(d)){let m=L.isJsxElement(d)?d.openingElement.attributes:d.attributes;for(let y of m.properties)if(!(!L.isJsxAttribute(y)||pf(y.name)!=="key"||!y.initializer)&&L.isJsxExpression(y.initializer)&&y.initializer.expression){let g=li(y.initializer.expression,c);g&&(f=g)}}return{kind:"map",source:o,item:l,key:f,body:p}}}if(L.isJsxElement(t)||L.isJsxSelfClosingElement(t))return ui(t,e);let n=li(t,e);return n||null}function hc(t,e){return{kind:"fragment",children:dc(t.children,e)}}function v0(t,e,n){let r=n.viewImports.get(t);return r?uc(r,t)?{kind:"viewRef",name:t,sourcePath:r,props:e}:(n.errors.push(`View component "${t}" is imported but has no view() export`),null):null}function ui(t,e){let n=L.isJsxElement(t)?t.openingElement:t,r=y0(n.tagName);if(!r)return e.errors.push("Unsupported JSX tag expression"),null;let i={};for(let c of n.attributes.properties){if(!L.isJsxAttribute(c)){e.errors.push(`Unsupported JSX spread attribute on <${r}>: ${ut(c)}`);continue}let p=pf(c.name);if(p!=="key"){if(!c.initializer){i[p]=!0;continue}if(L.isStringLiteral(c.initializer)){i[p]=c.initializer.text;continue}if(L.isJsxExpression(c.initializer)&&c.initializer.expression){let d=Do(c.initializer.expression,e);d!==null?i[p]=d:e.errors.push(`Unsupported JSX prop expression for "${p}" on <${r}>: ${ut(c.initializer.expression)}`);continue}e.errors.push(`Unsupported JSX prop initializer for "${p}" on <${r}>: ${ut(c.initializer)}`)}}let o=e.viewImports.get(r);if(e.allowedComponents.has(r)&&o&&uc(o,r))return e.errors.push(`<${r}> is both a vocabulary element and a view() component imported from ${o}; rename the view() component`),null;if(!e.allowedComponents.has(r)){let c=v0(r,i,e);return c||(e.errors.push(`Component "${r}" is not in the allowed registry`),null)}m0(r,i,e);let s=e;if(r==="Table"&&i.source){let c=typeof i.source=="object"&&"kind"in i.source&&i.source.kind==="binding"?i.source:void 0;c&&(s={...e,tableSource:c})}let a=typeof i.each=="string"?i.each:void 0;if(a){let c=e.tableSource;if(!c)return e.errors.push(`<${r} each="${a}"> requires an ancestor <Table source={...}>`),null;delete i.each;let p={...s,scopes:[...s.scopes,a]},d=L.isJsxElement(t)?dc(t.children,p):[];return{kind:"map",source:c,item:a,body:{kind:"component",name:r,props:i,children:d}}}let l=L.isJsxElement(t)?dc(t.children,s):[];return{kind:"component",name:r,props:i,children:l}}function b0(t){let e=null;function n(r){if(L.isCallExpression(r)&&L.isIdentifier(r.expression)&&r.expression.text==="screen"&&r.arguments.length===1&&(L.isArrowFunction(r.arguments[0])||L.isFunctionExpression(r.arguments[0]))){let i=r.arguments[0],o="unknown";if(r.typeArguments&&r.typeArguments.length===1){let a=r.typeArguments[0];L.isTypeReferenceNode(a)&&L.isIdentifier(a.typeName)&&(o=a.typeName.text)}let s=i.body;if(L.isParenthesizedExpression(s))(L.isJsxElement(s.expression)||L.isJsxSelfClosingElement(s.expression))&&(e={viewModel:o,jsxRoot:s.expression});else if(L.isJsxElement(s)||L.isJsxSelfClosingElement(s))e={viewModel:o,jsxRoot:s};else if(L.isBlock(s)&&s.statements.length===1){let a=s.statements[0];L.isReturnStatement(a)&&a.expression&&(L.isParenthesizedExpression(a.expression)?e={viewModel:o,jsxRoot:a.expression.expression}:e={viewModel:o,jsxRoot:a.expression})}}L.forEachChild(r,n)}return n(t),e}function ff(t,e,n,r={}){let i=new Set(lt);for(let d of r.allowlistExtra??[])i.add(d);let o=cf(e),s=af(o),a=L.createSourceFile(o,t,L.ScriptTarget.Latest,!0,L.ScriptKind.TSX),l={vmName:"vm",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:cc(a,s),allowedComponents:i},c=b0(a);if(!c)return{viewModel:"unknown",exportName:n,root:{kind:"fragment",children:[]},errors:["No screen<T>() default export found"],warnings:[]};let p=L.isJsxElement(c.jsxRoot)||L.isJsxSelfClosingElement(c.jsxRoot)?ui(c.jsxRoot,l):L.isJsxFragment(c.jsxRoot)?hc(c.jsxRoot,l):null;return p?{viewModel:c.viewModel,exportName:n,root:p,errors:l.errors,warnings:l.warnings}:(l.errors.push("screen() callback must return a single JSX root element"),{viewModel:c.viewModel,exportName:n,root:{kind:"fragment",children:[]},errors:l.errors,warnings:l.warnings})}function _0(t,e){let n={...e.propBindings};for(let i of t.propNames)n[i]={kind:"binding",path:"",scope:i};let r={...e,vmName:t.paramName,propBindings:n,scopes:[]};return L.isJsxElement(t.jsxRoot)||L.isJsxSelfClosingElement(t.jsxRoot)?ui(t.jsxRoot,r):L.isJsxFragment(t.jsxRoot)?hc(t.jsxRoot,r):L.isConditionalExpression(t.jsxRoot)?(e.errors.push("view() partial root must be a JSX element or fragment; conditional expressions are not supported"),null):L.isExpression(t.jsxRoot)?(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported expression: ${ut(t.jsxRoot)}`),null):(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported syntax kind: ${L.SyntaxKind[t.jsxRoot.kind]}`),null)}function x0(t,e){if(!t||!L.isTypeLiteralNode(t))return;let n=[];for(let r of t.members)L.isPropertySignature(r)&&L.isIdentifier(r.name)&&r.type?n.push({name:r.name.text,type:r.type.getText(),optional:r.questionToken!==void 0}):e.errors.push(`Unsupported view() props type member: ${ut(r)}`);return n}function hf(t,e,n,r={}){let i=new Set(lt);for(let f of r.allowlistExtra??[])i.add(f);let o=cf(e),s=af(o),a=L.createSourceFile(o,t,L.ScriptTarget.Latest,!0,L.ScriptKind.TSX),l=lc(a,n),c={vmName:l?.paramName??"__noop",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:cc(a,s),allowedComponents:i};if(!l)return{exportName:n,propNames:[],root:{kind:"fragment",children:[]},errors:[`No view() export "${n}" found in ${e}`],warnings:[]};let p=x0(l.propsTypeNode,c),d=_0(l,c);return d?{exportName:n,propsType:l.propsType,propDecls:p,propNames:l.propNames,root:d,errors:c.errors,warnings:c.warnings}:{exportName:n,propsType:l.propsType,propDecls:p,propNames:l.propNames,root:{kind:"fragment",children:[]},errors:c.errors,warnings:c.warnings}}function mc(t){let e=[];function n(r){if(r.kind==="viewRef"){e.push(r);return}if(r.kind==="component"){for(let i of r.children)n(i);return}if(r.kind==="map"){n(r.body);return}if(r.kind==="fragment")for(let i of r.children)n(i)}return n(t),e}function mf(t){return`${t.sourcePath}:${t.name}`}import{dirname as $0,relative as gf}from"node:path";function pi(t,e){return gf(t,e).split("\\").join("/")}function pt(t,e){let n=gf($0(t),e).replace(/\\/g,"/");return n.startsWith(".")||(n=`./${n}`),n.replace(/\.tsx?$/,".js")}nt();var S0=new Set(["swiftui","compose"]),C0=new Set(["action"]);function k0(t,e){return!lt.has(t)&&t in e.extensions}function gc(t){return t?` (${t})`:""}function Fo(t,e,n={}){let r=[],i=[],o=n.targets??[],s=o.some(l=>S0.has(l)),a=l=>{if(l.kind!=="viewRef"){if(l.kind==="component"){if(!lt.has(l.name)&&!(l.name in e.extensions))r.push(`Extension component "${l.name}" is not registered in extensions.yaml${gc(n.source)}`);else if(k0(l.name,e)){let c=e.extensions[l.name];s&&c.renderer==="react-only"&&r.push(`Extension "${l.name}" is react-only but binding targets include native renderer(s): ${o.join(", ")}${gc(n.source)}`);for(let p of Object.keys(l.props))p in c.properties||C0.has(p)||r.push(`Extension "${l.name}" does not accept property "${p}"${gc(n.source)}`)}for(let c of l.children)a(c);return}if(l.kind==="map"){a(l.body);return}if(l.kind==="fragment")for(let c of l.children)a(c)}};return a(t),{errors:r,warnings:i}}function yf(t,e,n,r,i){let o=[],s=[],a=Fo(t,n,{targets:r,source:i.screen});o.push(...a.errors),s.push(...a.warnings);for(let l=0;l<e.length;l++){let c=Fo(e[l],n,{targets:r,source:i.partials[l]});o.push(...c.errors),s.push(...c.warnings)}return{errors:o,warnings:s}}nt();function E0(t){return typeof t=="object"&&t!==null&&"kind"in t&&t.kind==="action"}function P0(t){if(typeof t!="object"||t===null||!("kind"in t)||t.kind!=="literal")return!1;let e=t.value;return typeof e!="object"||e===null||Array.isArray(e)?!1:Object.values(e).every(n=>n===null||typeof n!="object"||!Array.isArray(n)&&(n.kind==="binding"||n.kind==="concat"))}function di(t,e,n,r){if(t.kind==="component"){let{name:i,props:o}=t;if(n.has(i)||!lt.has(i)){for(let s of t.children)di(s,e,n,r);return}for(let[s,a]of Object.entries(o)){if(!ac(s,i)){r.push(`${e}: <${i}> does not accept property "${s}"`);continue}jo[s]?.type==="action"&&!E0(a)&&r.push(`${e}: <${i}> "${s}" must be an action descriptor { name: "..." }, got ${JSON.stringify(a)}`),s==="data"&&!P0(a)&&r.push(`${e}: <${i}> "data" must be an object of string, number, boolean or binding values, got ${JSON.stringify(a)}`)}for(let s of t.children)di(s,e,n,r);return}if(t.kind==="map"){di(t.body,e,n,r);return}if(t.kind==="fragment"){for(let i of t.children)di(i,e,n,r);return}}async function wf(t,e=[]){let n=new Set(e),r=[];for(let i of t)di(i.root,i.source,n,r);if(r.length>0)throw new Error(`View property validation failed:
933
933
  ${r.map(i=>` - ${i}`).join(`
934
- `)}`)}async function x0(t,e,n){let r=await df(t,"utf-8"),i=cf(r,t,e,{allowlistExtra:n.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t} (${e}):
934
+ `)}`)}async function R0(t,e,n){let r=await vf(t,"utf-8"),i=hf(r,t,e,{allowlistExtra:n.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t} (${e}):
935
935
  ${i.errors.map(o=>` - ${o}`).join(`
936
- `)}`);if(n.extensionRegistry){let o=Lo(i.root,n.extensionRegistry,{targets:n.targets,source:t});if(o.errors.length>0)throw new Error(`Extension validation errors in ${t} (${e}):
936
+ `)}`);if(n.extensionRegistry){let o=Fo(i.root,n.extensionRegistry,{targets:n.targets,source:t});if(o.errors.length>0)throw new Error(`Extension validation errors in ${t} (${e}):
937
937
  ${o.errors.map(s=>` - ${s}`).join(`
938
- `)}`);i.warnings.push(...o.warnings)}for(let o of i.warnings)console.warn(`Warning in ${t} (${e}): ${o}`);return{version:1,source:ci(n.projectRoot,ff(t)),viewModel:i.propsType??"Record<string, unknown>",exportName:i.exportName,root:i.root,isPartial:!0,propsType:i.propsType,propDecls:i.propDecls}}async function $0(t,e){let n=new Map,r=cc(t);for(;r.length>0;){let i=r.shift(),o=lf(i);if(n.has(o))continue;let s=await x0(i.sourcePath,i.name,e);n.set(o,s),r.push(...cc(s.root))}return[...n.values()]}async function uc(t,e){let n=await df(t.sourcePath,"utf-8"),r=t.exportName??_0(t.sourcePath,".view.tsx"),i=af(n,t.sourcePath,r,{allowlistExtra:e.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t.sourcePath}:
938
+ `)}`);i.warnings.push(...o.warnings)}for(let o of i.warnings)console.warn(`Warning in ${t} (${e}): ${o}`);return{version:1,source:pi(n.projectRoot,bf(t)),viewModel:i.propsType??"Record<string, unknown>",exportName:i.exportName,root:i.root,isPartial:!0,propsType:i.propsType,propDecls:i.propDecls}}async function A0(t,e){let n=new Map,r=mc(t);for(;r.length>0;){let i=r.shift(),o=mf(i);if(n.has(o))continue;let s=await R0(i.sourcePath,i.name,e);n.set(o,s),r.push(...mc(s.root))}return[...n.values()]}async function yc(t,e){let n=await vf(t.sourcePath,"utf-8"),r=t.exportName??I0(t.sourcePath,".view.tsx"),i=ff(n,t.sourcePath,r,{allowlistExtra:e.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t.sourcePath}:
939
939
  ${i.errors.map(a=>` - ${a}`).join(`
940
- `)}`);let o={version:1,source:ci(e.projectRoot,ff(t.sourcePath)),viewModel:i.viewModel,exportName:i.exportName,root:i.root},s=await $0(o.root,{...e,targets:t.targets??e.targets});if(e.extensionRegistry){let a=uf(o.root,s.map(c=>c.root),e.extensionRegistry,t.targets??["react"],{screen:o.source,partials:s.map(c=>c.source)});if(a.errors.length>0)throw new Error(`Extension validation errors in ${t.sourcePath}:
941
- ${a.errors.map(c=>` - ${c}`).join(`
942
- `)}`);i.warnings.push(...a.warnings)}await pf([o,...s],e.allowlistExtra);for(let a of i.warnings)console.warn(`Warning in ${t.sourcePath}: ${a}`);return{screen:o,partials:s}}async function hf(t,e){let n=[],r=new Map;for(let i of t){let o=await uc(i,e);n.push(o.screen);for(let s of o.partials){let a=`${s.source}:${s.exportName}`;r.set(a,s)}}return{screens:n,partials:[...r.values()]}}bt();var gy=ja(my(),1);ir();Ut();import{readFile as yy}from"node:fs/promises";import{resolve as wy}from"node:path";var Pk=gy.default,Ik=wy(Ee(),"spec/ui-dsl-extensions.meta.json"),bs;async function Rk(){if(bs)return bs;let t=JSON.parse(await yy(Ik,"utf-8"));return bs=new Pk({allErrors:!0,strict:!1}).compile(t),bs}async function _s(t){if(!t)return{extensions:{}};let e=wy(t),n=await yy(e,"utf-8"),r=lt.load(n),i=await Rk();if(!i(r)){let o=i.errors?.map(s=>`${s.instancePath||"/"} ${s.message??""}`).join("; ")??"unknown";throw new Error(`Extension registry validation failed (${e}): ${o}`)}return r}Pr();import{resolve as sT}from"node:path";async function Pd(t,e,n){return(await Kr()).renderReactFromIr(t,e,n)}async function v_(t,e,n){return(await Kr()).renderReactPreviewBundle(t,e,n)}function b_(t,e){return sT(t,"components",`${e.exportName}.generated.tsx`)}async function __(t,e){return(await Kr()).renderReactRuntime(t,e)}async function x_(t,e,n,r,i){return(await Kr()).renderSwiftUIRuntime(t,e,n,r,i)}async function $_(t,e,n,r,i){return(await Kr()).renderComposeRuntime(t,e,n,r,i)}Os();bt();import{access as aT,writeFile as _n,mkdir as Pa}from"node:fs/promises";import{resolve as Lt,dirname as S_}from"node:path";async function Id(t){try{return await aT(t),!0}catch{return!1}}var Yr={preview:5173,app:5174,built:4174},cT=`{
940
+ `)}`);let o={version:1,source:pi(e.projectRoot,bf(t.sourcePath)),viewModel:i.viewModel,exportName:i.exportName,root:i.root},s=await A0(o.root,{...e,targets:t.targets??e.targets});if(e.extensionRegistry){let a=yf(o.root,s.map(l=>l.root),e.extensionRegistry,t.targets??["react"],{screen:o.source,partials:s.map(l=>l.source)});if(a.errors.length>0)throw new Error(`Extension validation errors in ${t.sourcePath}:
941
+ ${a.errors.map(l=>` - ${l}`).join(`
942
+ `)}`);i.warnings.push(...a.warnings)}await wf([o,...s],e.allowlistExtra);for(let a of i.warnings)console.warn(`Warning in ${t.sourcePath}: ${a}`);return{screen:o,partials:s}}async function _f(t,e){let n=[],r=new Map;for(let i of t){let o=await yc(i,e);n.push(o.screen);for(let s of o.partials){let a=`${s.source}:${s.exportName}`;r.set(a,s)}}return{screens:n,partials:[...r.values()]}}xt();var _y=Ba(by(),1);ar();Mt();import{readFile as xy}from"node:fs/promises";import{resolve as $y}from"node:path";var Vk=_y.default,Lk=$y(Ce(),"spec/ui-dsl-extensions.meta.json"),Ss;async function jk(){if(Ss)return Ss;let t=JSON.parse(await xy(Lk,"utf-8"));return Ss=new Vk({allErrors:!0,strict:!1}).compile(t),Ss}async function Cs(t){if(!t)return{extensions:{}};let e=$y(t),n=await xy(e,"utf-8"),r=dt.load(n),i=await jk();if(!i(r)){let o=i.errors?.map(s=>`${s.instancePath||"/"} ${s.message??""}`).join("; ")??"unknown";throw new Error(`Extension registry validation failed (${e}): ${o}`)}return r}Ar();import{resolve as mT}from"node:path";async function Ld(t,e,n){return(await Qr()).renderReactFromIr(t,e,n)}async function k_(t,e,n){return(await Qr()).renderReactPreviewBundle(t,e,n)}function E_(t,e){return mT(t,"components",`${e.exportName}.generated.tsx`)}async function P_(t,e){return(await Qr()).renderReactRuntime(t,e)}async function I_(t,e,n,r,i){return(await Qr()).renderSwiftUIRuntime(t,e,n,r,i)}async function R_(t,e,n,r,i){return(await Qr()).renderComposeRuntime(t,e,n,r,i)}Ls();xt();import{access as vT,writeFile as nn,mkdir as Ta}from"node:fs/promises";import{resolve as et,dirname as T_}from"node:path";Mt();nt();nt();import{readFile as gT}from"node:fs/promises";import{resolve as yT}from"node:path";var wT=Ce();async function A_(t=wT){let e=yT(t,"package.json"),n=await gT(e,"utf-8"),r=JSON.parse(n);if(!r.version)throw new Error(`package.json missing version: ${e}`);return r.version}er();async function jd(t){try{return await vT(t),!0}catch{return!1}}var Zr={preview:5173,app:5174,built:4174};function bT(t){return`{
943
943
  "name": "admin-dashboard",
944
944
  "private": true,
945
945
  "type": "module",
@@ -960,12 +960,12 @@ ${a.errors.map(c=>` - ${c}`).join(`
960
960
  "devDependencies": {
961
961
  "@vitejs/plugin-react": "^4.7.0",
962
962
  "typescript": "^5.9.3",
963
- "view-contracts": "^0.3.5",
963
+ "view-contracts": "^${t}",
964
964
  "vite": "^6.4.1"
965
965
  }
966
966
  }
967
- `,lT=`import '../src/main.tsx';
968
- `,uT=`<!doctype html>
967
+ `}var _T=`import '../src/main.tsx';
968
+ `,xT=`<!doctype html>
969
969
  <html lang="en">
970
970
  <head>
971
971
  <meta charset="UTF-8" />
@@ -977,39 +977,45 @@ ${a.errors.map(c=>` - ${c}`).join(`
977
977
  <script type="module" src="./app-main.tsx"></script>
978
978
  </body>
979
979
  </html>
980
- `;function pT(t){let n=t.views.filter(s=>s.targets.includes("react"))[0];if(!n)throw new Error("No react target views in bindings \u2014 cannot scaffold app entry.");let r=n.screenName,i=n.viewModel,o=`${r.charAt(0).toLowerCase()}${r.slice(1)}Mock`;return`import React from 'react';
980
+ `;function $T(t){let e=t.views.find(n=>n.targets.includes("react"));if(!e)throw new Error("No react target views in bindings \u2014 cannot scaffold app entry.");return e}function ST(t,e){let n=t.screenName,r=t.viewModel,i=Wr(n),o=s=>pt(e.appMain,s);return`import React from 'react';
981
981
  import ReactDOM from 'react-dom/client';
982
- import '../generated/react/theme.css';
983
- import type { ${i} } from '../contracts/view-models';
984
- import { ${r} } from '../generated/react/${r}.generated';
985
- import { ${o} } from 'view-contracts:preview/mock/${r}';
986
- import { registerActionHandler, handleAppAction } from '../generated/react/runtime';
982
+ import '${o(et(e.config.generated.reactDir,"theme.css"))}';
983
+ import type { ${r} } from '${o(et(e.root,"contracts/view-models.ts"))}';
984
+ import { ${n} } from '${o(Bo(e.config,t))}';
985
+ import { ${i} } from '${Cd(n)}';
986
+ import { registerActionHandler } from '${o(cr(e.config))}';
987
+ import { handleAppAction } from '${o(e.handlers)}';
987
988
 
988
989
  registerActionHandler(handleAppAction);
989
990
 
990
991
  /** Example bootstrap only \u2014 production loads ViewModels from the API (operationId in view-bindings). */
991
- const vm = ${o} as ${i};
992
+ const vm = ${i} as ${r};
992
993
 
993
994
  ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
994
995
  <React.StrictMode>
995
- <${r} vm={vm} />
996
+ <${n} vm={vm} />
996
997
  </React.StrictMode>,
997
998
  );
998
- `}var dT=`/** Hand-written action handlers \u2014 edit src/runtime/handlers.ts */
999
- import type { DispatchableAction } from './types.js';
999
+ `}function CT(t,e){let n=pt(e.previewDeclarations,et(e.root,"contracts/view-models.ts"));return`/** Vite virtual module for the preview sample ViewModel (views/preview/*.mock.yaml). */
1000
+ declare module '${Cd(t.screenName)}' {
1001
+ import type { ${t.viewModel} } from '${n}';
1002
+ export const ${Wr(t.screenName)}: ${t.viewModel};
1003
+ }
1004
+ `}function kT(t){return`/** Hand-written action handlers. src/main.tsx registers handleAppAction with registerActionHandler. */
1005
+ import type { DispatchableAction } from '${pt(t.handlers,cr(t.config))}';
1000
1006
 
1001
1007
  export async function handleAppAction(action: DispatchableAction): Promise<void> {
1002
1008
  console.log('[app action]', action);
1003
1009
  }
1004
- `;function fT(){return`/** Fixed dev server ports \u2014 single source of truth for this example. */
1005
- export const PREVIEW_PORT = ${Yr.preview};
1006
- export const APP_PORT = ${Yr.app};
1007
- export const BUILT_PORT = ${Yr.built};
1008
- `}function hT(){return`# Fixed dev server ports \u2014 keep in sync with dev.ports.ts
1009
- PREVIEW_PORT=${Yr.preview}
1010
- APP_PORT=${Yr.app}
1011
- BUILT_PORT=${Yr.built}
1012
- `}function mT(){return`import { defineConfig } from 'vite';
1010
+ `}function ET(){return`/** Fixed dev server ports \u2014 single source of truth for this example. */
1011
+ export const PREVIEW_PORT = ${Zr.preview};
1012
+ export const APP_PORT = ${Zr.app};
1013
+ export const BUILT_PORT = ${Zr.built};
1014
+ `}function PT(){return`# Fixed dev server ports \u2014 keep in sync with dev.ports.ts
1015
+ PREVIEW_PORT=${Zr.preview}
1016
+ APP_PORT=${Zr.app}
1017
+ BUILT_PORT=${Zr.built}
1018
+ `}function IT(){return`import { defineConfig } from 'vite';
1013
1019
  import react from '@vitejs/plugin-react';
1014
1020
  import path from 'node:path';
1015
1021
  import { fileURLToPath } from 'node:url';
@@ -1046,8 +1052,8 @@ export default defineConfig({
1046
1052
  },
1047
1053
  },
1048
1054
  });
1049
- `}async function C_(t,e){let n=ye(t),r=Lt(n,".vite");await Pa(r,{recursive:!0});let i=Lt(n,"package.json");await Id(i)||await _n(i,`${cT}
1050
- `,"utf-8"),await _n(Lt(r,"index.html"),uT,"utf-8"),await _n(Lt(r,"app-main.tsx"),lT,"utf-8"),await _n(Lt(r,"vite.config.ts"),mT(),"utf-8"),await _n(Lt(n,"dev.ports.ts"),fT(),"utf-8");let o=Lt(n,"scripts");await Pa(o,{recursive:!0}),await _n(Lt(o,"ports.sh"),hT(),"utf-8");let s=Lt(n,"src/main.tsx");await Id(s)||(await Pa(S_(s),{recursive:!0}),await _n(s,pT(e),"utf-8"));let a=Lt(n,"src/runtime/handlers.ts");await Id(a)||(await Pa(S_(a),{recursive:!0}),await _n(a,dT,"utf-8")),console.log(` scaffold \u2192 ${r}/`)}bt();Br();Pr();import{createServer as CT}from"node:http";import{watch as kT}from"node:fs";import{resolve as Qn}from"node:path";bt();Ns();Ut();Pr();import{mkdir as wT,writeFile as Rd}from"node:fs/promises";import{tmpdir as vT}from"node:os";import{join as Ra,resolve as tn}from"node:path";import{build as bT}from"esbuild";import{resolve as gT}from"node:path";bt();Os();var Ia={dispatch:"view-contracts:runtime/dispatch",style:"view-contracts:runtime/style",types:"view-contracts:runtime/types",styleHelpers:"view-contracts:runtime/style-helpers",contracts:"view-contracts:contracts",extensions:"view-contracts:extensions",mock:"view-contracts:preview/mock"};async function yT(t){if(!t.extensions)return{allowlistExtra:t.allowlistExtra??[]};let e=await _s(t.extensions),n=[...new Set([...t.allowlistExtra??[],...Object.keys(e.extensions)])];return{extensionRegistry:e,allowlistExtra:n}}async function k_(t,e){let n=await Je(t),i=(await It(n.bindings)).views.find(m=>m.screenName===e);if(!i)throw new Error(`No view binding for screen "${e}"`);if(!i.targets.includes("react"))throw new Error(`Screen "${e}" is not a react target`);let{extensionRegistry:o,allowlistExtra:s}=await yT(n),a=ye(t),{screen:c,partials:l}=await uc({sourcePath:gT(a,i.source),exportName:i.exportName,screenName:i.screenName},{projectRoot:a,allowlistExtra:s,extensionRegistry:o}),{tokensPath:d,themePath:p}=ln(n),{themeIR:f}=await Er(d,p);return await qn(n,t),Yi([c,...l],f),v_(c,l,{runtimeImportFrom:Ia.dispatch,extensionsImportFrom:Ia.extensions,contractsImportFrom:Ia.contracts,allowlistExtra:s,previewImports:Ia})}Br();function _T(t){let e=t.replace(/View$/,"")||t;return e.charAt(0).toUpperCase()+e.slice(1)}function xT(t){let e=Ee(),n=Dr();return{"@view-contracts/core":tn(e,"dist/dsl.js"),"@view-contracts/components":y_(),"view-contracts:runtime/dispatch":tn(n,"dispatch.ts"),"view-contracts:runtime/style":tn(n,"style.ts"),"view-contracts:runtime/types":tn(n,"types.ts"),"view-contracts:runtime/style-helpers":tn(n,"style.ts"),"view-contracts:contracts":tn(t,"contracts/view-models.ts"),"view-contracts:extensions":tn(t,"src/components/extensions.tsx")}}function $T(t=800){return`<!DOCTYPE html>
1055
+ `}async function O_(t,e,n){let r=ye(t),i=et(r,".vite"),o={root:r,config:e,appMain:et(r,"src/main.tsx"),previewDeclarations:et(r,"src/view-contracts.preview.d.ts"),handlers:et(r,"src/runtime/handlers.ts")};await Ta(i,{recursive:!0});let s=et(r,"package.json");await jd(s)||await nn(s,`${bT(await A_())}
1056
+ `,"utf-8"),await nn(et(i,"index.html"),xT,"utf-8"),await nn(et(i,"app-main.tsx"),_T,"utf-8"),await nn(et(i,"vite.config.ts"),IT(),"utf-8"),await nn(et(r,"dev.ports.ts"),ET(),"utf-8");let a=et(r,"scripts");if(await Ta(a,{recursive:!0}),await nn(et(a,"ports.sh"),PT(),"utf-8"),!await jd(o.appMain)){let l=$T(n);await Ta(T_(o.appMain),{recursive:!0}),await nn(o.appMain,ST(l,o),"utf-8"),await nn(o.previewDeclarations,CT(l,o),"utf-8")}await jd(o.handlers)||(await Ta(T_(o.handlers),{recursive:!0}),await nn(o.handlers,kT(o),"utf-8")),console.log(` scaffold \u2192 ${i}/`)}xt();er();Ar();import{createServer as DT}from"node:http";import{watch as FT}from"node:fs";import{resolve as nr}from"node:path";xt();js();Mt();Ar();import{mkdir as TT,writeFile as Dd}from"node:fs/promises";import{tmpdir as OT}from"node:os";import{join as Na,resolve as rn}from"node:path";import{build as NT}from"esbuild";import{resolve as RT}from"node:path";xt();Ls();var Oa={dispatch:"view-contracts:runtime/dispatch",style:"view-contracts:runtime/style",types:"view-contracts:runtime/types",styleHelpers:"view-contracts:runtime/style-helpers",contracts:"view-contracts:contracts",extensions:"view-contracts:extensions",mock:"view-contracts:preview/mock"};async function AT(t){if(!t.extensions)return{allowlistExtra:t.allowlistExtra??[]};let e=await Cs(t.extensions),n=[...new Set([...t.allowlistExtra??[],...Object.keys(e.extensions)])];return{extensionRegistry:e,allowlistExtra:n}}async function N_(t,e){let n=await Je(t),i=(await At(n.bindings)).views.find(m=>m.screenName===e);if(!i)throw new Error(`No view binding for screen "${e}"`);if(!i.targets.includes("react"))throw new Error(`Screen "${e}" is not a react target`);let{extensionRegistry:o,allowlistExtra:s}=await AT(n),a=ye(t),{screen:l,partials:c}=await yc({sourcePath:RT(a,i.source),exportName:i.exportName,screenName:i.screenName},{projectRoot:a,allowlistExtra:s,extensionRegistry:o}),{tokensPath:p,themePath:d}=pn(n),{themeIR:f}=await Rr(p,d);return await Wn(n,t),Zi([l,...c],f),k_(l,c,{runtimeImportFrom:Oa.dispatch,extensionsImportFrom:Oa.extensions,contractsImportFrom:Oa.contracts,allowlistExtra:s,previewImports:Oa})}er();function MT(t){let e=t.replace(/View$/,"")||t;return e.charAt(0).toUpperCase()+e.slice(1)}function VT(t){let e=Ce(),n=Br();return{"@view-contracts/core":rn(e,"dist/dsl.js"),"@view-contracts/components":S_(),"view-contracts:runtime/dispatch":rn(n,"dispatch.ts"),"view-contracts:runtime/style":rn(n,"style.ts"),"view-contracts:runtime/types":rn(n,"types.ts"),"view-contracts:runtime/style-helpers":rn(n,"style.ts"),"view-contracts:contracts":rn(t,"contracts/view-models.ts"),"view-contracts:extensions":rn(t,"src/components/extensions.tsx")}}function LT(t=800){return`<!DOCTYPE html>
1051
1057
  <html lang="en">
1052
1058
  <head>
1053
1059
  <meta charset="UTF-8" />
@@ -1074,7 +1080,7 @@ export default defineConfig({
1074
1080
  </script>
1075
1081
  </body>
1076
1082
  </html>
1077
- `}async function ST(t,e,n,r,i){await Rd(Ra(t,"screen.tsx"),e,"utf8"),await Rd(Ra(t,"mock.ts"),n,"utf8");let o=`import React from 'react';
1083
+ `}async function jT(t,e,n,r,i){await Dd(Na(t,"screen.tsx"),e,"utf8"),await Dd(Na(t,"mock.ts"),n,"utf8");let o=`import React from 'react';
1078
1084
  import ReactDOM from 'react-dom/client';
1079
1085
  import { ${r} } from './screen.tsx';
1080
1086
  import { ${i} } from './mock.ts';
@@ -1089,8 +1095,8 @@ ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
1089
1095
  <${r} vm={${i}} />
1090
1096
  </React.StrictMode>,
1091
1097
  );
1092
- `,s=Ra(t,"entry.tsx");return await Rd(s,o,"utf8"),s}async function Ad(t,e,n){let r=await Je(t),o=(await It(r.bindings)).views.find(P=>P.screenName===e);if(!o)throw new Error(`No view binding for screen "${e}"`);if(!o.targets.includes("react"))throw new Error(`Screen "${e}" is not a react target`);let s=ye(t),[a,c,l]=await Promise.all([k_(t,e),Sb(t,r,e),Xi(r,t)]),d=_T(o.exportName),p=gd(e),f=Ra(vT(),`view-contracts-preview-${process.pid}`);await wT(f,{recursive:!0});let m=await ST(f,a,c,d,p),y=Ee(),g=[tn(s,"node_modules"),tn(y,"node_modules")],w=await bT({entryPoints:[m],bundle:!0,write:!1,format:"esm",platform:"browser",target:"es2022",jsx:"automatic",jsxImportSource:"react",absWorkingDir:s,nodePaths:g,alias:xT(s),logLevel:"silent"});if(w.errors.length>0)throw new Error(w.errors.map(P=>P.text).join(`
1093
- `));let b=w.outputFiles[0]?.text??"";return{html:$T(),themeCss:l,bundleJs:b,version:n}}async function E_(t,e){let n=await It((await Je(t)).bindings);if(e){let i=n.views.find(o=>o.screenName===e);if(!i)throw new Error(`Unknown screen "${e}" in view-bindings.yaml`);if(!i.targets.includes("react"))throw new Error(`Screen "${e}" is not a react target`);return e}let r=n.views.find(i=>i.targets.includes("react"));if(!r)throw new Error("No react target views in view-bindings.yaml");return r.screenName}Br();function xo(t,e,n,r){t.writeHead(e,{"Content-Type":r,"Cache-Control":"no-store"}),t.end(n)}function ET(t,e,n){let r=t.url?.split("?")[0]??"/";if(r==="/"||r==="/index.html"){xo(e,200,n.html,"text/html; charset=utf-8");return}if(r==="/bundle.js"){xo(e,200,n.bundleJs,"text/javascript; charset=utf-8");return}if(r==="/theme.css"){xo(e,200,n.themeCss,"text/css; charset=utf-8");return}if(r==="/__vc-reload"){xo(e,200,JSON.stringify({version:n.version}),"application/json");return}xo(e,404,"Not found","text/plain; charset=utf-8")}async function PT(t,e,n){let r=await Je(t),i=ye(t),{tokensPath:o,themePath:s}=ln(r),a=await Cb(t,r),c=w_(),l=[Qn(i,r.viewsDir),Qn(i,o),Qn(i,s),a,c];r.extensions&&l.push(Qn(i,r.extensions)),r.design?.extensionsCss&&l.push(Qn(i,r.design.extensionsCss)),l.push(Qn(i,"contracts/view-models.ts")),l.push(Qn(i,"src/components/extensions.tsx"));let d,p=()=>{d&&clearTimeout(d),d=setTimeout(()=>n(),150)},f=[];for(let y of l)await qr(y)&&f.push(y);let m=f.map(y=>kT(y,{recursive:!0},()=>p()));return()=>{d&&clearTimeout(d);for(let y of m)y.close()}}async function P_(t){let e=t.port??5173,n=t.host??"127.0.0.1",r=await E_(t.configPath,t.screen),i=0,o=await Ad(t.configPath,r,i),s=!1,a=!1,c=async()=>{if(s){a=!0;return}s=!0;try{i+=1,o=await Ad(t.configPath,r,i),console.log(`[preview] rebuilt (v${i})`)}catch(f){let m=f instanceof Error?f.message:String(f);console.error(`[preview] compile error:
1094
- ${m}`)}finally{s=!1,a&&(a=!1,c())}},l=CT((f,m)=>ET(f,m,o));await new Promise((f,m)=>{l.once("error",m),l.listen(e,n,()=>f())});let d=`http://${n}:${e}/`;console.log(`[preview] ${r} \u2192 ${d}`),console.log("[preview] watching views/ and design files (Ctrl+C to stop)");let p=await PT(t.configPath,r,()=>{c()});await new Promise(f=>{let m=()=>{p(),l.close(()=>f())};process.once("SIGINT",m),process.once("SIGTERM",m)})}async function O_(t){if(!t.extensions)return{allowlistExtra:t.allowlistExtra??[]};let e=await _s(t.extensions),n=[...new Set([...t.allowlistExtra??[],...Object.keys(e.extensions)])];return{extensionRegistry:e,allowlistExtra:n}}async function I_(t){await new Promise((e,n)=>{let r=TT("npx",["micro-contracts",...t],{stdio:"inherit"});r.on("error",n),r.on("close",i=>{i===0?e():n(new Error(`micro-contracts exited with code ${i}`))})})}async function Td(t){let e=await Je(t),n=await It(e.bindings),{extensionRegistry:r,allowlistExtra:i}=await O_(e),o=ye(t),{screens:s,partials:a}=await hf(n.views.map(c=>({sourcePath:jt(o,c.source),exportName:c.exportName,screenName:c.screenName,targets:c.targets})),{projectRoot:o,allowlistExtra:i,extensionRegistry:r});return{screens:new Map(n.views.map((c,l)=>[c.screenName,s[l]])),partials:a}}function Zn(t,e){let n=AT(T_(t),e).replace(/\\/g,"/");return n.startsWith(".")||(n=`./${n}`),n.replace(/\.tsx?$/,".js")}async function R_(t,e,n){let r=await Je(t),i=ye(t),{allowlistExtra:o}=await O_(r),s=await It(r.bindings);for(let a of n){let c=jt(r.generated.reactDir,"components",`${a.exportName}.generated.tsx`),l=Zn(c,jt(r.generated.reactDir,"runtime.ts")),d=Zn(c,jt(r.generated.reactDir,"extensions.generated.ts")),p=Zn(c,jt(i,"contracts/view-models.ts"));await Pd(a,c,{runtimeImportFrom:l,extensionsImportFrom:d,contractsImportFrom:p,allowlistExtra:o}),console.log(` ${a.exportName} \u2192 ${c}`)}for(let a of s.views){if(!a.targets.includes("react"))continue;let c=e.get(a.screenName);if(!c)throw new Error(`Missing View IR for ${a.screenName}`);let l=oh(r,a),d=Zn(l,jt(r.generated.reactDir,"runtime.ts")),p=Zn(l,jt(r.generated.reactDir,"extensions.generated.ts")),f=Zn(l,jt(i,"contracts/view-models.ts")),m=new Map;for(let y of n){let g=b_(r.generated.reactDir,y);m.set(y.exportName,Zn(l,g))}await Pd(c,l,{runtimeImportFrom:d,extensionsImportFrom:p,contractsImportFrom:f,allowlistExtra:o,viewRefImportFrom:m}),console.log(` ${a.exportName} \u2192 ${l}`)}}async function A_(t){let e=await Je(t),n=await It(e.bindings),r=ye(t),o=["// Auto-generated view bridge registry \u2014 DO NOT EDIT",`// Generated from ${ci(r,e.bindings)}`,"","export const viewBridgeRegistry = {"];for(let s of n.views)o.push(` ${s.screenConst}: {`),o.push(` id: ${JSON.stringify(s.id)},`),o.push(` screenId: ${JSON.stringify(s.screenId)},`),o.push(` screenName: ${JSON.stringify(s.screenName)},`),o.push(` route: ${JSON.stringify(s.route)},`),o.push(` operationId: ${JSON.stringify(s.operationId)},`),o.push(` viewModel: ${JSON.stringify(s.viewModel)},`),o.push(` source: ${JSON.stringify(s.source)},`),o.push(` targets: ${JSON.stringify(s.targets)},`),o.push(" },");o.push("} as const;",""),o.push("export type ViewBridgeKey = keyof typeof viewBridgeRegistry;",""),await RT(T_(jt(e.generated.bridge)),{recursive:!0}),await IT(jt(e.generated.bridge),o.join(`
1095
- `),"utf-8"),console.log(`Bridge registry \u2192 ${e.generated.bridge} (${n.views.length} view(s))`)}var N_={compile:async(t,e)=>{let{screens:n,partials:r}=await Td(await cn(t.config));console.log(`Compiled ${n.size} screen(s) and ${r.length} partial(s) to View IR (in-memory)`)},renderReact:async(t,e)=>{let n=await cn(t.config),{screens:r,partials:i}=await Td(n);await R_(n,r,i)},renderBridge:async(t,e)=>{await A_(await cn(t.config))},build:async(t,e)=>{let n=await cn(t.config),r=await Je(n),i=await It(r.bindings),{screens:o,partials:s}=await Td(n);console.log(`Compiled ${o.size} screen(s) and ${s.length} partial(s) to View IR (in-memory)`);let{tokensPath:a,themePath:c}=ln(r),{tokenIR:l,themeIR:d}=await Er(a,c);await qn(r,n),Yi([...o.values(),...s],d),await __(n,r),await R_(n,o,s),await A_(n),await x_(n,r,i,{theme:d,tokens:l},{screens:o,partials:s}),await $_(n,r,i,{theme:d,tokens:l},{screens:o,partials:s}),await C_(n,i)},contractsGenerate:async(t,e)=>{let n=await Je(await cn(t.config));await I_(["generate","-c",n.microContractsConfig]),console.log("Contracts generated via micro-contracts")},contractsCheck:async(t,e)=>{let n=await Je(await cn(t.config));await I_(["lint","-c",n.microContractsConfig])},preview:async(t,e)=>{try{await P_({configPath:await cn(t.config),port:t.port!=null?Number(t.port):void 0,host:t.host,screen:t.screen})}catch(n){console.error(n instanceof Error?n.message:n),process.exit(1)}}};var OT={version:"0.5.12"};Kd(N_,OT.version).parseAsync(process.argv).catch(t=>{console.error(t instanceof Error?t.message:t),process.exit(1)});
1098
+ `,s=Na(t,"entry.tsx");return await Dd(s,o,"utf8"),s}async function Fd(t,e,n){let r=await Je(t),o=(await At(r.bindings)).views.find(P=>P.screenName===e);if(!o)throw new Error(`No view binding for screen "${e}"`);if(!o.targets.includes("react"))throw new Error(`Screen "${e}" is not a react target`);let s=ye(t),[a,l,c]=await Promise.all([N_(t,e),Ab(t,r,e),eo(r,t)]),p=MT(o.exportName),d=Wr(e),f=Na(OT(),`view-contracts-preview-${process.pid}`);await TT(f,{recursive:!0});let m=await jT(f,a,l,p,d),y=Ce(),g=[rn(s,"node_modules"),rn(y,"node_modules")],w=await NT({entryPoints:[m],bundle:!0,write:!1,format:"esm",platform:"browser",target:"es2022",jsx:"automatic",jsxImportSource:"react",absWorkingDir:s,nodePaths:g,alias:VT(s),logLevel:"silent"});if(w.errors.length>0)throw new Error(w.errors.map(P=>P.text).join(`
1099
+ `));let b=w.outputFiles[0]?.text??"";return{html:LT(),themeCss:c,bundleJs:b,version:n}}async function M_(t,e){let n=await At((await Je(t)).bindings);if(e){let i=n.views.find(o=>o.screenName===e);if(!i)throw new Error(`Unknown screen "${e}" in view-bindings.yaml`);if(!i.targets.includes("react"))throw new Error(`Screen "${e}" is not a react target`);return e}let r=n.views.find(i=>i.targets.includes("react"));if(!r)throw new Error("No react target views in view-bindings.yaml");return r.screenName}er();function Co(t,e,n,r){t.writeHead(e,{"Content-Type":r,"Cache-Control":"no-store"}),t.end(n)}function qT(t,e,n){let r=t.url?.split("?")[0]??"/";if(r==="/"||r==="/index.html"){Co(e,200,n.html,"text/html; charset=utf-8");return}if(r==="/bundle.js"){Co(e,200,n.bundleJs,"text/javascript; charset=utf-8");return}if(r==="/theme.css"){Co(e,200,n.themeCss,"text/css; charset=utf-8");return}if(r==="/__vc-reload"){Co(e,200,JSON.stringify({version:n.version}),"application/json");return}Co(e,404,"Not found","text/plain; charset=utf-8")}async function BT(t,e,n){let r=await Je(t),i=ye(t),{tokensPath:o,themePath:s}=pn(r),a=await Tb(t,r),l=C_(),c=[nr(i,r.viewsDir),nr(i,o),nr(i,s),a,l];r.extensions&&c.push(nr(i,r.extensions)),r.design?.extensionsCss&&c.push(nr(i,r.design.extensionsCss)),c.push(nr(i,"contracts/view-models.ts")),c.push(nr(i,"src/components/extensions.tsx"));let p,d=()=>{p&&clearTimeout(p),p=setTimeout(()=>n(),150)},f=[];for(let y of c)await Ur(y)&&f.push(y);let m=f.map(y=>FT(y,{recursive:!0},()=>d()));return()=>{p&&clearTimeout(p);for(let y of m)y.close()}}async function V_(t){let e=t.port??5173,n=t.host??"127.0.0.1",r=await M_(t.configPath,t.screen),i=0,o=await Fd(t.configPath,r,i),s=!1,a=!1,l=async()=>{if(s){a=!0;return}s=!0;try{i+=1,o=await Fd(t.configPath,r,i),console.log(`[preview] rebuilt (v${i})`)}catch(f){let m=f instanceof Error?f.message:String(f);console.error(`[preview] compile error:
1100
+ ${m}`)}finally{s=!1,a&&(a=!1,l())}},c=DT((f,m)=>qT(f,m,o));await new Promise((f,m)=>{c.once("error",m),c.listen(e,n,()=>f())});let p=`http://${n}:${e}/`;console.log(`[preview] ${r} \u2192 ${p}`),console.log("[preview] watching views/ and design files (Ctrl+C to stop)");let d=await BT(t.configPath,r,()=>{l()});await new Promise(f=>{let m=()=>{d(),c.close(()=>f())};process.once("SIGINT",m),process.once("SIGTERM",m)})}async function F_(t){if(!t.extensions)return{allowlistExtra:t.allowlistExtra??[]};let e=await Cs(t.extensions),n=[...new Set([...t.allowlistExtra??[],...Object.keys(e.extensions)])];return{extensionRegistry:e,allowlistExtra:n}}async function L_(t){await new Promise((e,n)=>{let r=zT("npx",["micro-contracts",...t],{stdio:"inherit"});r.on("error",n),r.on("close",i=>{i===0?e():n(new Error(`micro-contracts exited with code ${i}`))})})}async function qd(t){let e=await Je(t),n=await At(e.bindings),{extensionRegistry:r,allowlistExtra:i}=await F_(e),o=ye(t),{screens:s,partials:a}=await _f(n.views.map(l=>({sourcePath:Sn(o,l.source),exportName:l.exportName,screenName:l.screenName,targets:l.targets})),{projectRoot:o,allowlistExtra:i,extensionRegistry:r});return{screens:new Map(n.views.map((l,c)=>[l.screenName,s[c]])),partials:a}}async function j_(t,e,n){let r=await Je(t),i=ye(t),{allowlistExtra:o}=await F_(r),s=await At(r.bindings);for(let a of n){let l=Sn(r.generated.reactDir,"components",`${a.exportName}.generated.tsx`),c=pt(l,cr(r)),p=pt(l,Sn(r.generated.reactDir,"extensions.generated.ts")),d=pt(l,Sn(i,"contracts/view-models.ts"));await Ld(a,l,{runtimeImportFrom:c,extensionsImportFrom:p,contractsImportFrom:d,allowlistExtra:o}),console.log(` ${a.exportName} \u2192 ${l}`)}for(let a of s.views){if(!a.targets.includes("react"))continue;let l=e.get(a.screenName);if(!l)throw new Error(`Missing View IR for ${a.screenName}`);let c=Bo(r,a),p=pt(c,cr(r)),d=pt(c,Sn(r.generated.reactDir,"extensions.generated.ts")),f=pt(c,Sn(i,"contracts/view-models.ts")),m=new Map;for(let y of n){let g=E_(r.generated.reactDir,y);m.set(y.exportName,pt(c,g))}await Ld(l,c,{runtimeImportFrom:p,extensionsImportFrom:d,contractsImportFrom:f,allowlistExtra:o,viewRefImportFrom:m}),console.log(` ${a.exportName} \u2192 ${c}`)}}async function D_(t){let e=await Je(t),n=await At(e.bindings),r=ye(t),o=["// Auto-generated view bridge registry \u2014 DO NOT EDIT",`// Generated from ${pi(r,e.bindings)}`,"","export const viewBridgeRegistry = {"];for(let s of n.views)o.push(` ${s.screenConst}: {`),o.push(` id: ${JSON.stringify(s.id)},`),o.push(` screenId: ${JSON.stringify(s.screenId)},`),o.push(` screenName: ${JSON.stringify(s.screenName)},`),o.push(` route: ${JSON.stringify(s.route)},`),o.push(` operationId: ${JSON.stringify(s.operationId)},`),o.push(` viewModel: ${JSON.stringify(s.viewModel)},`),o.push(` source: ${JSON.stringify(s.source)},`),o.push(` targets: ${JSON.stringify(s.targets)},`),o.push(" },");o.push("} as const;",""),o.push("export type ViewBridgeKey = keyof typeof viewBridgeRegistry;",""),await WT(UT(Sn(e.generated.bridge)),{recursive:!0}),await HT(Sn(e.generated.bridge),o.join(`
1101
+ `),"utf-8"),console.log(`Bridge registry \u2192 ${e.generated.bridge} (${n.views.length} view(s))`)}var q_={compile:async(t,e)=>{let{screens:n,partials:r}=await qd(await un(t.config));console.log(`Compiled ${n.size} screen(s) and ${r.length} partial(s) to View IR (in-memory)`)},renderReact:async(t,e)=>{let n=await un(t.config),{screens:r,partials:i}=await qd(n);await j_(n,r,i)},renderBridge:async(t,e)=>{await D_(await un(t.config))},build:async(t,e)=>{let n=await un(t.config),r=await Je(n),i=await At(r.bindings),{screens:o,partials:s}=await qd(n);console.log(`Compiled ${o.size} screen(s) and ${s.length} partial(s) to View IR (in-memory)`);let{tokensPath:a,themePath:l}=pn(r),{tokenIR:c,themeIR:p}=await Rr(a,l);await Wn(r,n),Zi([...o.values(),...s],p),await P_(n,r),await j_(n,o,s),await D_(n),await I_(n,r,i,{theme:p,tokens:c},{screens:o,partials:s}),await R_(n,r,i,{theme:p,tokens:c},{screens:o,partials:s}),await O_(n,r,i)},contractsGenerate:async(t,e)=>{let n=await Je(await un(t.config));await L_(["generate","-c",n.microContractsConfig]),console.log("Contracts generated via micro-contracts")},contractsCheck:async(t,e)=>{let n=await Je(await un(t.config));await L_(["lint","-c",n.microContractsConfig])},preview:async(t,e)=>{try{await V_({configPath:await un(t.config),port:t.port!=null?Number(t.port):void 0,host:t.host,screen:t.screen})}catch(n){console.error(n instanceof Error?n.message:n),process.exit(1)}}};var GT={version:"0.5.13"};of(q_,GT.version).parseAsync(process.argv).catch(t=>{console.error(t instanceof Error?t.message:t),process.exit(1)});
1096
1102
  //# sourceMappingURL=view-contracts.bundle.mjs.map