view-contracts 0.4.4 → 0.4.5

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 Zv=Object.create;var Zs=Object.defineProperty;var ew=Object.getOwnPropertyDescriptor;var tw=Object.getOwnPropertyNames;var rw=Object.getPrototypeOf,nw=Object.prototype.hasOwnProperty;var lt=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var K=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(n){throw r=[n],n}};var S=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},Dr=(t,e)=>{for(var r in e)Zs(t,r,{get:e[r],enumerable:!0})},iw=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of tw(e))!nw.call(t,i)&&i!==r&&Zs(t,i,{get:()=>e[i],enumerable:!(n=ew(e,i))||n.enumerable});return t};var ea=(t,e,r)=>(r=t!=null?Zv(rw(t)):{},iw(e||!t||!t.__esModule?Zs(r,"default",{value:t,enumerable:!0}):r,t));var An=S(ra=>{var Qi=class extends Error{constructor(e,r,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=e,this.nestedError=void 0}},ta=class extends Qi{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};ra.CommanderError=Qi;ra.InvalidArgumentError=ta});var Zi=S(ia=>{var{InvalidArgumentError:ow}=An(),na=class{constructor(e,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:(r.push(e),r)}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new ow(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,n):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function sw(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}ia.Argument=na;ia.humanReadableArgName=sw});var aa=S(sa=>{var{humanReadableArgName:aw}=Zi(),oa=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let r=e.commands.filter(i=>!i._hidden),n=e._getHelpCommand();return n&&!n._hidden&&r.push(n),this.sortSubcommands&&r.sort((i,o)=>i.name().localeCompare(o.name())),r}compareOptions(e,r){let n=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return n(e).localeCompare(n(r))}visibleOptions(e){let r=e.options.filter(i=>!i.hidden),n=e._getHelpOption();if(n&&!n.hidden){let i=n.short&&e._findOption(n.short),o=n.long&&e._findOption(n.long);!i&&!o?r.push(n):n.long&&!o?r.push(e.createOption(n.long,n.description)):n.short&&!i&&r.push(e.createOption(n.short,n.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let r=[];for(let n=e.parent;n;n=n.parent){let i=n.options.filter(o=>!o.hidden);r.push(...i)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(r=>{r.description=r.description||e._argsDescription[r.name()]||""}),e.registeredArguments.find(r=>r.description)?e.registeredArguments:[]}subcommandTerm(e){let r=e.registeredArguments.map(n=>aw(n)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,r){return r.visibleCommands(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(i)))),0)}longestOptionTermLength(e,r){return r.visibleOptions(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestGlobalOptionTermLength(e,r){return r.visibleGlobalOptions(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestArgumentTermLength(e,r){return r.visibleArguments(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(i)))),0)}commandUsage(e){let r=e._name;e._aliases[0]&&(r=r+"|"+e._aliases[0]);let n="";for(let i=e.parent;i;i=i.parent)n=i.name()+" "+n;return n+r+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&r.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&r.push(`env: ${e.envVar}`),r.length>0){let n=`(${r.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}argumentDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),r.length>0){let n=`(${r.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatItemList(e,r,n){return r.length===0?[]:[n.styleTitle(e),...r,""]}groupItems(e,r,n){let i=new Map;return e.forEach(o=>{let s=n(o);i.has(s)||i.set(s,[])}),r.forEach(o=>{let s=n(o);i.has(s)||i.set(s,[]),i.get(s).push(o)}),i}formatHelp(e,r){let n=r.padWidth(e,r),i=r.helpWidth??80;function o(p,d){return r.formatItem(p,n,d,r)}let s=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(e))}`,""],a=r.commandDescription(e);a.length>0&&(s=s.concat([r.boxWrap(r.styleCommandDescription(a),i),""]));let c=r.visibleArguments(e).map(p=>o(r.styleArgumentTerm(r.argumentTerm(p)),r.styleArgumentDescription(r.argumentDescription(p))));if(s=s.concat(this.formatItemList("Arguments:",c,r)),this.groupItems(e.options,r.visibleOptions(e),p=>p.helpGroupHeading??"Options:").forEach((p,d)=>{let m=p.map(g=>o(r.styleOptionTerm(r.optionTerm(g)),r.styleOptionDescription(r.optionDescription(g))));s=s.concat(this.formatItemList(d,m,r))}),r.showGlobalOptions){let p=r.visibleGlobalOptions(e).map(d=>o(r.styleOptionTerm(r.optionTerm(d)),r.styleOptionDescription(r.optionDescription(d))));s=s.concat(this.formatItemList("Global Options:",p,r))}return this.groupItems(e.commands,r.visibleCommands(e),p=>p.helpGroup()||"Commands:").forEach((p,d)=>{let m=p.map(g=>o(r.styleSubcommandTerm(r.subcommandTerm(g)),r.styleSubcommandDescription(r.subcommandDescription(g))));s=s.concat(this.formatItemList(d,m,r))}),s.join(`
5
- `)}displayWidth(e){return hp(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,r){return Math.max(r.longestOptionTermLength(e,r),r.longestGlobalOptionTermLength(e,r),r.longestSubcommandTermLength(e,r),r.longestArgumentTermLength(e,r))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,r,n,i){let s=" ".repeat(2);if(!n)return s+e;let a=e.padEnd(r+e.length-i.displayWidth(e)),c=2,f=(this.helpWidth??80)-r-c-2,p;return f<this.minWidthToWrap||i.preformatted(n)?p=n:p=i.boxWrap(n,f).replace(/\n/g,`
4
+ var tw=Object.create;var ea=Object.defineProperty;var rw=Object.getOwnPropertyDescriptor;var nw=Object.getOwnPropertyNames;var iw=Object.getPrototypeOf,ow=Object.prototype.hasOwnProperty;var lt=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var K=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(n){throw r=[n],n}};var S=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},Dr=(t,e)=>{for(var r in e)ea(t,r,{get:e[r],enumerable:!0})},sw=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of nw(e))!ow.call(t,i)&&i!==r&&ea(t,i,{get:()=>e[i],enumerable:!(n=rw(e,i))||n.enumerable});return t};var ta=(t,e,r)=>(r=t!=null?tw(iw(t)):{},sw(e||!t||!t.__esModule?ea(r,"default",{value:t,enumerable:!0}):r,t));var An=S(na=>{var Qi=class extends Error{constructor(e,r,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=e,this.nestedError=void 0}},ra=class extends Qi{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};na.CommanderError=Qi;na.InvalidArgumentError=ra});var Zi=S(oa=>{var{InvalidArgumentError:aw}=An(),ia=class{constructor(e,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:(r.push(e),r)}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new aw(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,n):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function cw(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}oa.Argument=ia;oa.humanReadableArgName=cw});var ca=S(aa=>{var{humanReadableArgName:lw}=Zi(),sa=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let r=e.commands.filter(i=>!i._hidden),n=e._getHelpCommand();return n&&!n._hidden&&r.push(n),this.sortSubcommands&&r.sort((i,o)=>i.name().localeCompare(o.name())),r}compareOptions(e,r){let n=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return n(e).localeCompare(n(r))}visibleOptions(e){let r=e.options.filter(i=>!i.hidden),n=e._getHelpOption();if(n&&!n.hidden){let i=n.short&&e._findOption(n.short),o=n.long&&e._findOption(n.long);!i&&!o?r.push(n):n.long&&!o?r.push(e.createOption(n.long,n.description)):n.short&&!i&&r.push(e.createOption(n.short,n.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let r=[];for(let n=e.parent;n;n=n.parent){let i=n.options.filter(o=>!o.hidden);r.push(...i)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(r=>{r.description=r.description||e._argsDescription[r.name()]||""}),e.registeredArguments.find(r=>r.description)?e.registeredArguments:[]}subcommandTerm(e){let r=e.registeredArguments.map(n=>lw(n)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,r){return r.visibleCommands(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(i)))),0)}longestOptionTermLength(e,r){return r.visibleOptions(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestGlobalOptionTermLength(e,r){return r.visibleGlobalOptions(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestArgumentTermLength(e,r){return r.visibleArguments(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(i)))),0)}commandUsage(e){let r=e._name;e._aliases[0]&&(r=r+"|"+e._aliases[0]);let n="";for(let i=e.parent;i;i=i.parent)n=i.name()+" "+n;return n+r+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&r.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&r.push(`env: ${e.envVar}`),r.length>0){let n=`(${r.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}argumentDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),r.length>0){let n=`(${r.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatItemList(e,r,n){return r.length===0?[]:[n.styleTitle(e),...r,""]}groupItems(e,r,n){let i=new Map;return e.forEach(o=>{let s=n(o);i.has(s)||i.set(s,[])}),r.forEach(o=>{let s=n(o);i.has(s)||i.set(s,[]),i.get(s).push(o)}),i}formatHelp(e,r){let n=r.padWidth(e,r),i=r.helpWidth??80;function o(p,d){return r.formatItem(p,n,d,r)}let s=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(e))}`,""],a=r.commandDescription(e);a.length>0&&(s=s.concat([r.boxWrap(r.styleCommandDescription(a),i),""]));let c=r.visibleArguments(e).map(p=>o(r.styleArgumentTerm(r.argumentTerm(p)),r.styleArgumentDescription(r.argumentDescription(p))));if(s=s.concat(this.formatItemList("Arguments:",c,r)),this.groupItems(e.options,r.visibleOptions(e),p=>p.helpGroupHeading??"Options:").forEach((p,d)=>{let m=p.map(g=>o(r.styleOptionTerm(r.optionTerm(g)),r.styleOptionDescription(r.optionDescription(g))));s=s.concat(this.formatItemList(d,m,r))}),r.showGlobalOptions){let p=r.visibleGlobalOptions(e).map(d=>o(r.styleOptionTerm(r.optionTerm(d)),r.styleOptionDescription(r.optionDescription(d))));s=s.concat(this.formatItemList("Global Options:",p,r))}return this.groupItems(e.commands,r.visibleCommands(e),p=>p.helpGroup()||"Commands:").forEach((p,d)=>{let m=p.map(g=>o(r.styleSubcommandTerm(r.subcommandTerm(g)),r.styleSubcommandDescription(r.subcommandDescription(g))));s=s.concat(this.formatItemList(d,m,r))}),s.join(`
5
+ `)}displayWidth(e){return mp(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,r){return Math.max(r.longestOptionTermLength(e,r),r.longestGlobalOptionTermLength(e,r),r.longestSubcommandTermLength(e,r),r.longestArgumentTermLength(e,r))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,r,n,i){let s=" ".repeat(2);if(!n)return s+e;let a=e.padEnd(r+e.length-i.displayWidth(e)),c=2,f=(this.helpWidth??80)-r-c-2,p;return f<this.minWidthToWrap||i.preformatted(n)?p=n:p=i.boxWrap(n,f).replace(/\n/g,`
6
6
  `+" ".repeat(r+c)),s+a+" ".repeat(c)+p.replace(/\n/g,`
7
7
  ${s}`)}boxWrap(e,r){if(r<this.minWidthToWrap)return e;let n=e.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,o=[];return n.forEach(s=>{let a=s.match(i);if(a===null){o.push("");return}let c=[a.shift()],l=this.displayWidth(c[0]);a.forEach(f=>{let p=this.displayWidth(f);if(l+p<=r){c.push(f),l+=p;return}o.push(c.join(""));let d=f.trimStart();c=[d],l=this.displayWidth(d)}),o.push(c.join(""))}),o.join(`
8
- `)}};function hp(t){let e=/\x1b\[\d*(;\d*)*m/g;return t.replace(e,"")}sa.Help=oa;sa.stripColor=hp});var pa=S(ua=>{var{InvalidArgumentError:cw}=An(),ca=class{constructor(e,r){this.flags=e,this.description=r||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=lw(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let r=e;return typeof e=="string"&&(r={[e]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:(r.push(e),r)}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new cw(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,n):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?mp(this.name().replace(/^no-/,"")):mp(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}},la=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(e,r){let n=r.attributeName();if(!this.dualOptions.has(n))return!0;let i=this.negativeOptions.get(n).presetArg,o=i!==void 0?i:!1;return r.negate===(o===e)}};function mp(t){return t.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function lw(t){let e,r,n=/^-[^-]$/,i=/^--[^-]/,o=t.split(/[ |,]+/).concat("guard");if(n.test(o[0])&&(e=o.shift()),i.test(o[0])&&(r=o.shift()),!e&&n.test(o[0])&&(e=o.shift()),!e&&i.test(o[0])&&(e=r,r=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}
8
+ `)}};function mp(t){let e=/\x1b\[\d*(;\d*)*m/g;return t.replace(e,"")}aa.Help=sa;aa.stripColor=mp});var fa=S(pa=>{var{InvalidArgumentError:uw}=An(),la=class{constructor(e,r){this.flags=e,this.description=r||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=pw(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let r=e;return typeof e=="string"&&(r={[e]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:(r.push(e),r)}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new uw(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,n):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?gp(this.name().replace(/^no-/,"")):gp(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}},ua=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(e,r){let n=r.attributeName();if(!this.dualOptions.has(n))return!0;let i=this.negativeOptions.get(n).presetArg,o=i!==void 0?i:!1;return r.negate===(o===e)}};function gp(t){return t.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function pw(t){let e,r,n=/^-[^-]$/,i=/^--[^-]/,o=t.split(/[ |,]+/).concat("guard");if(n.test(o[0])&&(e=o.shift()),i.test(o[0])&&(r=o.shift()),!e&&n.test(o[0])&&(e=o.shift()),!e&&i.test(o[0])&&(e=r,r=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')`):n.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&&r===void 0)throw new Error(`option creation failed due to no flags found in '${t}'.`);return{shortFlag:e,longFlag:r}}ua.Option=ca;ua.DualOptions=la});var yp=S(gp=>{function uw(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let r=[];for(let n=0;n<=t.length;n++)r[n]=[n];for(let n=0;n<=e.length;n++)r[0][n]=n;for(let n=1;n<=e.length;n++)for(let i=1;i<=t.length;i++){let o=1;t[i-1]===e[n-1]?o=0:o=1,r[i][n]=Math.min(r[i-1][n]+1,r[i][n-1]+1,r[i-1][n-1]+o),i>1&&n>1&&t[i-1]===e[n-2]&&t[i-2]===e[n-1]&&(r[i][n]=Math.min(r[i][n],r[i-2][n-2]+1))}return r[t.length][e.length]}function pw(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let r=t.startsWith("--");r&&(t=t.slice(2),e=e.map(s=>s.slice(2)));let n=[],i=3,o=.4;return e.forEach(s=>{if(s.length<=1)return;let a=uw(t,s),c=Math.max(t.length,s.length);(c-a)/c>o&&(a<i?(i=a,n=[s]):a===i&&n.push(s))}),n.sort((s,a)=>s.localeCompare(a)),r&&(n=n.map(s=>`--${s}`)),n.length>1?`
14
+ - unrecognised flag format`)}if(e===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${t}'.`);return{shortFlag:e,longFlag:r}}pa.Option=la;pa.DualOptions=ua});var vp=S(yp=>{function fw(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let r=[];for(let n=0;n<=t.length;n++)r[n]=[n];for(let n=0;n<=e.length;n++)r[0][n]=n;for(let n=1;n<=e.length;n++)for(let i=1;i<=t.length;i++){let o=1;t[i-1]===e[n-1]?o=0:o=1,r[i][n]=Math.min(r[i-1][n]+1,r[i][n-1]+1,r[i-1][n-1]+o),i>1&&n>1&&t[i-1]===e[n-2]&&t[i-2]===e[n-1]&&(r[i][n]=Math.min(r[i][n],r[i-2][n-2]+1))}return r[t.length][e.length]}function dw(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let r=t.startsWith("--");r&&(t=t.slice(2),e=e.map(s=>s.slice(2)));let n=[],i=3,o=.4;return e.forEach(s=>{if(s.length<=1)return;let a=fw(t,s),c=Math.max(t.length,s.length);(c-a)/c>o&&(a<i?(i=a,n=[s]):a===i&&n.push(s))}),n.sort((s,a)=>s.localeCompare(a)),r&&(n=n.map(s=>`--${s}`)),n.length>1?`
15
15
  (Did you mean one of ${n.join(", ")}?)`:n.length===1?`
16
- (Did you mean ${n[0]}?)`:""}gp.suggestSimilar=pw});var bp=S(ga=>{var fw=lt("node:events").EventEmitter,fa=lt("node:child_process"),Nt=lt("node:path"),eo=lt("node:fs"),se=lt("node:process"),{Argument:dw,humanReadableArgName:hw}=Zi(),{CommanderError:da}=An(),{Help:mw,stripColor:gw}=aa(),{Option:vp,DualOptions:yw}=pa(),{suggestSimilar:wp}=yp(),ha=class t extends fw{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:r=>se.stdout.write(r),writeErr:r=>se.stderr.write(r),outputError:(r,n)=>n(r),getOutHelpWidth:()=>se.stdout.isTTY?se.stdout.columns:void 0,getErrHelpWidth:()=>se.stderr.isTTY?se.stderr.columns:void 0,getOutHasColors:()=>ma()??(se.stdout.isTTY&&se.stdout.hasColors?.()),getErrHasColors:()=>ma()??(se.stderr.isTTY&&se.stderr.hasColors?.()),stripColor:r=>gw(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let r=this;r;r=r.parent)e.push(r);return e}command(e,r,n){let i=r,o=n;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 mw,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,r){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
17
- - specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=e._name),(r.noHelp||r.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,r){return new dw(e,r)}argument(e,r,n,i){let o=this.createArgument(e,r);return typeof n=="function"?o.default(i).argParser(n):o.default(n),this.addArgument(o),this}arguments(e){return e.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(e){let r=this.registeredArguments.slice(-1)[0];if(r?.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,r){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let n=e??"help [command]",[,i,o]=n.match(/([^ ]+) *(.*)/),s=r??"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||r)&&this._initCommandGroup(a),this}addHelpCommand(e,r){return typeof e!="object"?(this.helpCommand(e,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this._initCommandGroup(e),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,r){let n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
18
- Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(r):this._lifeCycleHooks[e]=[r],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(e,r,n){this._exitCallback&&this._exitCallback(new da(e,r,n)),se.exit(e)}action(e){let r=n=>{let i=this.registeredArguments.length,o=n.slice(0,i);return this._storeOptionsAsProperties?o[i]=this:o[i]=this.opts(),o.push(this),e.apply(this,o)};return this._actionHandler=r,this}createOption(e,r){return new vp(e,r)}_callParseArg(e,r,n,i){try{return e.parseArg(r,n)}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 r=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(r){let n=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
19
- - already used by option '${r.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let r=i=>[i.name()].concat(i.aliases()),n=r(e).find(i=>this._findCommand(i));if(n){let i=r(this._findCommand(n)).join("|"),o=r(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 r=e.name(),n=e.attributeName();if(e.negate){let o=e.long.replace(/^--no-/,"--");this._findOption(o)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,"default");let i=(o,s,a)=>{o==null&&e.presetArg!==void 0&&(o=e.presetArg);let c=this.getOptionValue(n);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(n,o,a)};return this.on("option:"+r,o=>{let s=`error: option '${e.flags}' argument '${o}' is invalid.`;i(o,s,"cli")}),e.envVar&&this.on("optionEnv:"+r,o=>{let s=`error: option '${e.flags}' value '${o}' from env '${e.envVar}' is invalid.`;i(o,s,"env")}),this}_optionEx(e,r,n,i,o){if(typeof r=="object"&&r instanceof vp)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(r,n);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 f=a.exec(c);return f?f[0]:l},s.default(o).argParser(i)}else s.default(i);return this.addOption(s)}option(e,r,n,i){return this._optionEx({},e,r,n,i)}requiredOption(e,r,n,i){return this._optionEx({mandatory:!0},e,r,n,i)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,r){return this.setOptionValueWithSource(e,r,void 0)}setOptionValueWithSource(e,r,n){return this._storeOptionsAsProperties?this[e]=r:this._optionValues[e]=r,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let r;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(r=n.getOptionValueSource(e))}),r}_prepareUserArgs(e,r){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},e===void 0&&r.from===void 0){se.versions?.electron&&(r.from="electron");let i=se.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(r.from="eval")}e===void 0&&(e=se.argv),this.rawArgs=e.slice();let n;switch(r.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":se.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;case"eval":n=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,r){this._prepareForParse();let n=this._prepareUserArgs(e,r);return this._parseCommand([],n),this}async parseAsync(e,r){this._prepareForParse();let n=this._prepareUserArgs(e,r);return await this._parseCommand([],n),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
16
+ (Did you mean ${n[0]}?)`:""}yp.suggestSimilar=dw});var Sp=S(ya=>{var hw=lt("node:events").EventEmitter,da=lt("node:child_process"),Mt=lt("node:path"),eo=lt("node:fs"),se=lt("node:process"),{Argument:mw,humanReadableArgName:gw}=Zi(),{CommanderError:ha}=An(),{Help:yw,stripColor:vw}=ca(),{Option:wp,DualOptions:ww}=fa(),{suggestSimilar:_p}=vp(),ma=class t extends hw{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:r=>se.stdout.write(r),writeErr:r=>se.stderr.write(r),outputError:(r,n)=>n(r),getOutHelpWidth:()=>se.stdout.isTTY?se.stdout.columns:void 0,getErrHelpWidth:()=>se.stderr.isTTY?se.stderr.columns:void 0,getOutHasColors:()=>ga()??(se.stdout.isTTY&&se.stdout.hasColors?.()),getErrHasColors:()=>ga()??(se.stderr.isTTY&&se.stderr.hasColors?.()),stripColor:r=>vw(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let r=this;r;r=r.parent)e.push(r);return e}command(e,r,n){let i=r,o=n;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 yw,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,r){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
17
+ - specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=e._name),(r.noHelp||r.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,r){return new mw(e,r)}argument(e,r,n,i){let o=this.createArgument(e,r);return typeof n=="function"?o.default(i).argParser(n):o.default(n),this.addArgument(o),this}arguments(e){return e.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(e){let r=this.registeredArguments.slice(-1)[0];if(r?.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,r){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let n=e??"help [command]",[,i,o]=n.match(/([^ ]+) *(.*)/),s=r??"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||r)&&this._initCommandGroup(a),this}addHelpCommand(e,r){return typeof e!="object"?(this.helpCommand(e,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this._initCommandGroup(e),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,r){let n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
18
+ Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(r):this._lifeCycleHooks[e]=[r],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(e,r,n){this._exitCallback&&this._exitCallback(new ha(e,r,n)),se.exit(e)}action(e){let r=n=>{let i=this.registeredArguments.length,o=n.slice(0,i);return this._storeOptionsAsProperties?o[i]=this:o[i]=this.opts(),o.push(this),e.apply(this,o)};return this._actionHandler=r,this}createOption(e,r){return new wp(e,r)}_callParseArg(e,r,n,i){try{return e.parseArg(r,n)}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 r=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(r){let n=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
19
+ - already used by option '${r.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let r=i=>[i.name()].concat(i.aliases()),n=r(e).find(i=>this._findCommand(i));if(n){let i=r(this._findCommand(n)).join("|"),o=r(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 r=e.name(),n=e.attributeName();if(e.negate){let o=e.long.replace(/^--no-/,"--");this._findOption(o)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,"default");let i=(o,s,a)=>{o==null&&e.presetArg!==void 0&&(o=e.presetArg);let c=this.getOptionValue(n);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(n,o,a)};return this.on("option:"+r,o=>{let s=`error: option '${e.flags}' argument '${o}' is invalid.`;i(o,s,"cli")}),e.envVar&&this.on("optionEnv:"+r,o=>{let s=`error: option '${e.flags}' value '${o}' from env '${e.envVar}' is invalid.`;i(o,s,"env")}),this}_optionEx(e,r,n,i,o){if(typeof r=="object"&&r instanceof wp)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(r,n);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 f=a.exec(c);return f?f[0]:l},s.default(o).argParser(i)}else s.default(i);return this.addOption(s)}option(e,r,n,i){return this._optionEx({},e,r,n,i)}requiredOption(e,r,n,i){return this._optionEx({mandatory:!0},e,r,n,i)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,r){return this.setOptionValueWithSource(e,r,void 0)}setOptionValueWithSource(e,r,n){return this._storeOptionsAsProperties?this[e]=r:this._optionValues[e]=r,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let r;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(r=n.getOptionValueSource(e))}),r}_prepareUserArgs(e,r){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},e===void 0&&r.from===void 0){se.versions?.electron&&(r.from="electron");let i=se.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(r.from="eval")}e===void 0&&(e=se.argv),this.rawArgs=e.slice();let n;switch(r.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":se.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;case"eval":n=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,r){this._prepareForParse();let n=this._prepareUserArgs(e,r);return this._parseCommand([],n),this}async parseAsync(e,r){this._prepareForParse();let n=this._prepareUserArgs(e,r);return await this._parseCommand([],n),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
20
20
  - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,r,n){if(eo.existsSync(e))return;let i=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",o=`'${e}' does not exist
21
21
  - if '${n}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
22
22
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
23
- - ${i}`;throw new Error(o)}_executeSubCommand(e,r){r=r.slice();let n=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function o(f,p){let d=Nt.resolve(f,p);if(eo.existsSync(d))return d;if(i.includes(Nt.extname(p)))return;let m=i.find(g=>eo.existsSync(`${d}${g}`));if(m)return`${d}${m}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let f;try{f=eo.realpathSync(this._scriptPath)}catch{f=this._scriptPath}a=Nt.resolve(Nt.dirname(f),a)}if(a){let f=o(a,s);if(!f&&!e._executableFile&&this._scriptPath){let p=Nt.basename(this._scriptPath,Nt.extname(this._scriptPath));p!==this._name&&(f=o(a,`${p}-${e._name}`))}s=f||s}n=i.includes(Nt.extname(s));let c;se.platform!=="win32"?n?(r.unshift(s),r=_p(se.execArgv).concat(r),c=fa.spawn(se.argv[0],r,{stdio:"inherit"})):c=fa.spawn(s,r,{stdio:"inherit"}):(this._checkForMissingExecutable(s,a,e._name),r.unshift(s),r=_p(se.execArgv).concat(r),c=fa.spawn(se.execPath,r,{stdio:"inherit"})),c.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(p=>{se.on(p,()=>{c.killed===!1&&c.exitCode===null&&c.kill(p)})});let l=this._exitCallback;c.on("close",f=>{f=f??1,l?l(new da(f,"commander.executeSubCommandAsync","(close)")):se.exit(f)}),c.on("error",f=>{if(f.code==="ENOENT")this._checkForMissingExecutable(s,a,e._name);else if(f.code==="EACCES")throw new Error(`'${s}' not executable`);if(!l)se.exit(1);else{let p=new da(1,"commander.executeSubCommandAsync","(error)");p.nestedError=f,l(p)}}),this.runningCommand=c}_dispatchSubcommand(e,r,n){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,r.concat(n));else return i._parseCommand(r,n)}),o}_dispatchHelpCommand(e){e||this.help();let r=this._findCommand(e);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,r)=>{e.required&&this.args[r]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(n,i,o)=>{let s=i;if(i!==null&&n.parseArg){let a=`error: command-argument value '${i}' is invalid for argument '${n.name()}'.`;s=this._callParseArg(n,i,o,a)}return s};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((n,i)=>{let o=n.defaultValue;n.variadic?i<this.args.length?(o=this.args.slice(i),n.parseArg&&(o=o.reduce((s,a)=>e(n,a,s),n.defaultValue))):o===void 0&&(o=[]):i<this.args.length&&(o=this.args[i],n.parseArg&&(o=e(n,o,n.defaultValue))),r[i]=o}),this.processedArgs=r}_chainOrCall(e,r){return e?.then&&typeof e.then=="function"?e.then(()=>r()):r()}_chainOrCallHooks(e,r){let n=e,i=[];return this._getCommandAndAncestors().reverse().filter(o=>o._lifeCycleHooks[r]!==void 0).forEach(o=>{o._lifeCycleHooks[r].forEach(s=>{i.push({hookedCommand:o,callback:s})})}),r==="postAction"&&i.reverse(),i.forEach(o=>{n=this._chainOrCall(n,()=>o.callback(o.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,r,n){let i=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(o=>{i=this._chainOrCall(i,()=>o(this,r))}),i}_parseCommand(e,r){let n=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),r=n.unknown,this.args=e.concat(r),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),r);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,e,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},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,r)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent?.listenerCount(o))i(),this._processArguments(),this.parent.emit(o,e,r);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,r);this.listenerCount("command:*")?this.emit("command:*",e,r):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(r=>r._name===e||r._aliases.includes(e))}_findOption(e){return this.options.find(r=>r.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(r=>{r.mandatory&&e.getOptionValue(r.attributeName())===void 0&&e.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(n=>{let i=n.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(n=>n.conflictsWith.length>0).forEach(n=>{let i=e.find(o=>n.conflictsWith.includes(o.attributeName()));i&&this._conflictingOption(n,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let r=[],n=[],i=r;function o(f){return f.length>1&&f[0]==="-"}let s=f=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(f)?!this._getCommandAndAncestors().some(p=>p.options.map(d=>d.short).some(d=>/^-\d$/.test(d))):!1,a=null,c=null,l=0;for(;l<e.length||c;){let f=c??e[l++];if(c=null,f==="--"){i===n&&i.push(f),i.push(...e.slice(l));break}if(a&&(!o(f)||s(f))){this.emit(`option:${a.name()}`,f);continue}if(a=null,o(f)){let p=this._findOption(f);if(p){if(p.required){let d=e[l++];d===void 0&&this.optionMissingArgument(p),this.emit(`option:${p.name()}`,d)}else if(p.optional){let d=null;l<e.length&&(!o(e[l])||s(e[l]))&&(d=e[l++]),this.emit(`option:${p.name()}`,d)}else this.emit(`option:${p.name()}`);a=p.variadic?p:null;continue}}if(f.length>2&&f[0]==="-"&&f[1]!=="-"){let p=this._findOption(`-${f[1]}`);if(p){p.required||p.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${p.name()}`,f.slice(2)):(this.emit(`option:${p.name()}`),c=`-${f.slice(2)}`);continue}}if(/^--[^=]+=/.test(f)){let p=f.indexOf("="),d=this._findOption(f.slice(0,p));if(d&&(d.required||d.optional)){this.emit(`option:${d.name()}`,f.slice(p+1));continue}}if(i===r&&o(f)&&!(this.commands.length===0&&s(f))&&(i=n),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&n.length===0){if(this._findCommand(f)){r.push(f),n.push(...e.slice(l));break}else if(this._getHelpCommand()&&f===this._getHelpCommand().name()){r.push(f,...e.slice(l));break}else if(this._defaultCommandName){n.push(f,...e.slice(l));break}}if(this._passThroughOptions){i.push(f,...e.slice(l));break}i.push(f)}return{operands:r,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},r=this.options.length;for(let n=0;n<r;n++){let i=this.options[n].attributeName();e[i]=i===this._versionOptionName?this._version:this[i]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,r)=>Object.assign(e,r.opts()),{})}error(e,r){this._outputConfiguration.outputError(`${e}
23
+ - ${i}`;throw new Error(o)}_executeSubCommand(e,r){r=r.slice();let n=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function o(f,p){let d=Mt.resolve(f,p);if(eo.existsSync(d))return d;if(i.includes(Mt.extname(p)))return;let m=i.find(g=>eo.existsSync(`${d}${g}`));if(m)return`${d}${m}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let f;try{f=eo.realpathSync(this._scriptPath)}catch{f=this._scriptPath}a=Mt.resolve(Mt.dirname(f),a)}if(a){let f=o(a,s);if(!f&&!e._executableFile&&this._scriptPath){let p=Mt.basename(this._scriptPath,Mt.extname(this._scriptPath));p!==this._name&&(f=o(a,`${p}-${e._name}`))}s=f||s}n=i.includes(Mt.extname(s));let c;se.platform!=="win32"?n?(r.unshift(s),r=bp(se.execArgv).concat(r),c=da.spawn(se.argv[0],r,{stdio:"inherit"})):c=da.spawn(s,r,{stdio:"inherit"}):(this._checkForMissingExecutable(s,a,e._name),r.unshift(s),r=bp(se.execArgv).concat(r),c=da.spawn(se.execPath,r,{stdio:"inherit"})),c.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(p=>{se.on(p,()=>{c.killed===!1&&c.exitCode===null&&c.kill(p)})});let l=this._exitCallback;c.on("close",f=>{f=f??1,l?l(new ha(f,"commander.executeSubCommandAsync","(close)")):se.exit(f)}),c.on("error",f=>{if(f.code==="ENOENT")this._checkForMissingExecutable(s,a,e._name);else if(f.code==="EACCES")throw new Error(`'${s}' not executable`);if(!l)se.exit(1);else{let p=new ha(1,"commander.executeSubCommandAsync","(error)");p.nestedError=f,l(p)}}),this.runningCommand=c}_dispatchSubcommand(e,r,n){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,r.concat(n));else return i._parseCommand(r,n)}),o}_dispatchHelpCommand(e){e||this.help();let r=this._findCommand(e);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,r)=>{e.required&&this.args[r]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(n,i,o)=>{let s=i;if(i!==null&&n.parseArg){let a=`error: command-argument value '${i}' is invalid for argument '${n.name()}'.`;s=this._callParseArg(n,i,o,a)}return s};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((n,i)=>{let o=n.defaultValue;n.variadic?i<this.args.length?(o=this.args.slice(i),n.parseArg&&(o=o.reduce((s,a)=>e(n,a,s),n.defaultValue))):o===void 0&&(o=[]):i<this.args.length&&(o=this.args[i],n.parseArg&&(o=e(n,o,n.defaultValue))),r[i]=o}),this.processedArgs=r}_chainOrCall(e,r){return e?.then&&typeof e.then=="function"?e.then(()=>r()):r()}_chainOrCallHooks(e,r){let n=e,i=[];return this._getCommandAndAncestors().reverse().filter(o=>o._lifeCycleHooks[r]!==void 0).forEach(o=>{o._lifeCycleHooks[r].forEach(s=>{i.push({hookedCommand:o,callback:s})})}),r==="postAction"&&i.reverse(),i.forEach(o=>{n=this._chainOrCall(n,()=>o.callback(o.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,r,n){let i=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(o=>{i=this._chainOrCall(i,()=>o(this,r))}),i}_parseCommand(e,r){let n=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),r=n.unknown,this.args=e.concat(r),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),r);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,e,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},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,r)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent?.listenerCount(o))i(),this._processArguments(),this.parent.emit(o,e,r);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,r);this.listenerCount("command:*")?this.emit("command:*",e,r):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(r=>r._name===e||r._aliases.includes(e))}_findOption(e){return this.options.find(r=>r.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(r=>{r.mandatory&&e.getOptionValue(r.attributeName())===void 0&&e.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(n=>{let i=n.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(n=>n.conflictsWith.length>0).forEach(n=>{let i=e.find(o=>n.conflictsWith.includes(o.attributeName()));i&&this._conflictingOption(n,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let r=[],n=[],i=r;function o(f){return f.length>1&&f[0]==="-"}let s=f=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(f)?!this._getCommandAndAncestors().some(p=>p.options.map(d=>d.short).some(d=>/^-\d$/.test(d))):!1,a=null,c=null,l=0;for(;l<e.length||c;){let f=c??e[l++];if(c=null,f==="--"){i===n&&i.push(f),i.push(...e.slice(l));break}if(a&&(!o(f)||s(f))){this.emit(`option:${a.name()}`,f);continue}if(a=null,o(f)){let p=this._findOption(f);if(p){if(p.required){let d=e[l++];d===void 0&&this.optionMissingArgument(p),this.emit(`option:${p.name()}`,d)}else if(p.optional){let d=null;l<e.length&&(!o(e[l])||s(e[l]))&&(d=e[l++]),this.emit(`option:${p.name()}`,d)}else this.emit(`option:${p.name()}`);a=p.variadic?p:null;continue}}if(f.length>2&&f[0]==="-"&&f[1]!=="-"){let p=this._findOption(`-${f[1]}`);if(p){p.required||p.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${p.name()}`,f.slice(2)):(this.emit(`option:${p.name()}`),c=`-${f.slice(2)}`);continue}}if(/^--[^=]+=/.test(f)){let p=f.indexOf("="),d=this._findOption(f.slice(0,p));if(d&&(d.required||d.optional)){this.emit(`option:${d.name()}`,f.slice(p+1));continue}}if(i===r&&o(f)&&!(this.commands.length===0&&s(f))&&(i=n),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&n.length===0){if(this._findCommand(f)){r.push(f),n.push(...e.slice(l));break}else if(this._getHelpCommand()&&f===this._getHelpCommand().name()){r.push(f,...e.slice(l));break}else if(this._defaultCommandName){n.push(f,...e.slice(l));break}}if(this._passThroughOptions){i.push(f,...e.slice(l));break}i.push(f)}return{operands:r,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},r=this.options.length;for(let n=0;n<r;n++){let i=this.options[n].attributeName();e[i]=i===this._versionOptionName?this._version:this[i]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,r)=>Object.assign(e,r.opts()),{})}error(e,r){this._outputConfiguration.outputError(`${e}
24
24
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
25
25
  `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
26
- `),this.outputHelp({error:!0}));let n=r||{},i=n.exitCode||1,o=n.code||"commander.error";this._exit(i,o,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in se.env){let r=e.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,se.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new yw(this.options),r=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&r(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(i=>!r(i)).forEach(i=>{this.setOptionValueWithSource(i,n.implied[i],"implied")})})}missingArgument(e){let r=`error: missing required argument '${e}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(e){let r=`error: option '${e.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let r=`error: required option '${e.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,r){let n=s=>{let a=s.attributeName(),c=this.getOptionValue(a),l=this.options.find(p=>p.negate&&a===p.attributeName()),f=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:f||s},i=s=>{let a=n(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(r)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let r="";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);r=wp(e,i)}let n=`error: unknown option '${e}'${r}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,n=r===1?"":"s",o=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${n} but got ${e.length}.`;this.error(o,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],r="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(o=>{i.push(o.name()),o.alias()&&i.push(o.alias())}),r=wp(e,i)}let n=`error: unknown command '${e}'${r}`;this.error(n,{code:"commander.unknownCommand"})}version(e,r,n){if(e===void 0)return this._version;this._version=e,r=r||"-V, --version",n=n||"output the version number";let i=this.createOption(r,n);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
27
- `),this._exit(0,"commander.version",e)}),this}description(e,r){return e===void 0&&r===void 0?this._description:(this._description=e,r&&(this._argsDescription=r),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),e===r._name)throw new Error("Command alias can't be the same as its name");let n=this.parent?._findCommand(e);if(n){let i=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${i}'`)}return r._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(r=>this.alias(r)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(n=>hw(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=Nt.basename(e,Nt.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let r=this.createHelp(),n=this._getOutputContext(e);r.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let i=r.formatHelp(this,r);return n.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(e){e=e||{};let r=!!e.error,n,i,o;return r?(n=a=>this._outputConfiguration.writeErr(a),i=this._outputConfiguration.getErrHasColors(),o=this._outputConfiguration.getErrHelpWidth()):(n=a=>this._outputConfiguration.writeOut(a),i=this._outputConfiguration.getOutHasColors(),o=this._outputConfiguration.getOutHelpWidth()),{error:r,write:a=>(i||(a=this._outputConfiguration.stripColor(a)),n(a)),hasColors:i,helpWidth:o}}outputHelp(e){let r;typeof e=="function"&&(r=e,e=void 0);let n=this._getOutputContext(e),i={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let o=this.helpInformation({error:n.error});if(r&&(o=r(o),typeof o!="string"&&!Buffer.isBuffer(o)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(o),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(s=>s.emit("afterAllHelp",i))}helpOption(e,r){return typeof e=="boolean"?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",r??"display help for command"),(e||r)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let r=Number(se.exitCode??0);r===0&&e&&typeof e!="function"&&e.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(e,r){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
26
+ `),this.outputHelp({error:!0}));let n=r||{},i=n.exitCode||1,o=n.code||"commander.error";this._exit(i,o,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in se.env){let r=e.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,se.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new ww(this.options),r=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&r(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(i=>!r(i)).forEach(i=>{this.setOptionValueWithSource(i,n.implied[i],"implied")})})}missingArgument(e){let r=`error: missing required argument '${e}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(e){let r=`error: option '${e.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let r=`error: required option '${e.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,r){let n=s=>{let a=s.attributeName(),c=this.getOptionValue(a),l=this.options.find(p=>p.negate&&a===p.attributeName()),f=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:f||s},i=s=>{let a=n(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(r)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let r="";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);r=_p(e,i)}let n=`error: unknown option '${e}'${r}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,n=r===1?"":"s",o=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${n} but got ${e.length}.`;this.error(o,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],r="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(o=>{i.push(o.name()),o.alias()&&i.push(o.alias())}),r=_p(e,i)}let n=`error: unknown command '${e}'${r}`;this.error(n,{code:"commander.unknownCommand"})}version(e,r,n){if(e===void 0)return this._version;this._version=e,r=r||"-V, --version",n=n||"output the version number";let i=this.createOption(r,n);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
27
+ `),this._exit(0,"commander.version",e)}),this}description(e,r){return e===void 0&&r===void 0?this._description:(this._description=e,r&&(this._argsDescription=r),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),e===r._name)throw new Error("Command alias can't be the same as its name");let n=this.parent?._findCommand(e);if(n){let i=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${i}'`)}return r._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(r=>this.alias(r)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(n=>gw(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=Mt.basename(e,Mt.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let r=this.createHelp(),n=this._getOutputContext(e);r.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let i=r.formatHelp(this,r);return n.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(e){e=e||{};let r=!!e.error,n,i,o;return r?(n=a=>this._outputConfiguration.writeErr(a),i=this._outputConfiguration.getErrHasColors(),o=this._outputConfiguration.getErrHelpWidth()):(n=a=>this._outputConfiguration.writeOut(a),i=this._outputConfiguration.getOutHasColors(),o=this._outputConfiguration.getOutHelpWidth()),{error:r,write:a=>(i||(a=this._outputConfiguration.stripColor(a)),n(a)),hasColors:i,helpWidth:o}}outputHelp(e){let r;typeof e=="function"&&(r=e,e=void 0);let n=this._getOutputContext(e),i={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let o=this.helpInformation({error:n.error});if(r&&(o=r(o),typeof o!="string"&&!Buffer.isBuffer(o)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(o),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(s=>s.emit("afterAllHelp",i))}helpOption(e,r){return typeof e=="boolean"?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",r??"display help for command"),(e||r)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let r=Number(se.exitCode??0);r===0&&e&&typeof e!="function"&&e.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(e,r){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
28
28
  Expecting one of '${n.join("', '")}'`);let i=`${e}Help`;return this.on(i,o=>{let s;typeof r=="function"?s=r({error:o.error,command:o.command}):s=r,s&&o.write(`${s}
29
- `)}),this}_outputHelpIfRequested(e){let r=this._getHelpOption();r&&e.find(i=>r.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function _p(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,n="127.0.0.1",i="9229",o;return(o=e.match(/^(--inspect(-brk)?)$/))!==null?r=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=o[1],/^\d+$/.test(o[3])?i=o[3]:n=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=o[1],n=o[3],i=o[4]),r&&i!=="0"?`${r}=${n}:${parseInt(i)+1}`:e})}function ma(){if(se.env.NO_COLOR||se.env.FORCE_COLOR==="0"||se.env.FORCE_COLOR==="false")return!1;if(se.env.FORCE_COLOR||se.env.CLICOLOR_FORCE!==void 0)return!0}ga.Command=ha;ga.useColor=ma});var kp=S(Ze=>{var{Argument:Sp}=Zi(),{Command:ya}=bp(),{CommanderError:vw,InvalidArgumentError:xp}=An(),{Help:ww}=aa(),{Option:$p}=pa();Ze.program=new ya;Ze.createCommand=t=>new ya(t);Ze.createOption=(t,e)=>new $p(t,e);Ze.createArgument=(t,e)=>new Sp(t,e);Ze.Command=ya;Ze.Option=$p;Ze.Argument=Sp;Ze.Help=ww;Ze.CommanderError=vw;Ze.InvalidArgumentError=xp;Ze.InvalidOptionArgumentError=xp});function Op(t){return ro[t]?.properties??[]}function Ap(t,e){let r=ro[e];return r?r.properties.includes(t):!1}var to,ro,Mt,no,TI,Vt=K(()=>{"use strict";to={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:"image",lowering:"attribute",description:"Icon token or asset name in the renderer icon set"},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"},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"}},ro={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","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","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","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","value","binding","placeholder","onChange","error","help","keyboardType","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","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","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","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"}}},Mt=new Set(Object.keys(ro)),no=new Set(Object.entries(to).filter(([,t])=>t.lowering==="inline-css").map(([t])=>t)),TI=new Set(Object.entries(to).filter(([,t])=>t.lowering==="class-name").map(([t])=>t))});var Mw,zp,Vw,Lw,jw,Dw,de,qw,Fw,Mn,Vn,Hw,Ve,Jp,Kp,Yp,Xp,Qp,Zp,ef,tf,rf,nf,of,sf,af,cf,lf,uf,pf,Ea,Bw,Uw,ff,eR,tR,rR,nR,iR,oR,sR,aR,cR,lR,uR,pR,fR,dR,ut,Fr=K(()=>{Mw=Object.create,zp=Object.defineProperty,Vw=Object.getOwnPropertyDescriptor,Lw=Object.getOwnPropertyNames,jw=Object.getPrototypeOf,Dw=Object.prototype.hasOwnProperty,de=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),qw=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(var i=Lw(e),o=0,s=i.length,a;o<s;o++)a=i[o],!Dw.call(t,a)&&a!==r&&zp(t,a,{get:(c=>e[c]).bind(null,a),enumerable:!(n=Vw(e,a))||n.enumerable});return t},Fw=(t,e,r)=>(r=t!=null?Mw(jw(t)):{},qw(e||!t||!t.__esModule?zp(r,"default",{value:t,enumerable:!0}):r,t)),Mn=de(((t,e)=>{function r(c){return typeof c>"u"||c===null}function n(c){return typeof c=="object"&&c!==null}function i(c){return Array.isArray(c)?c:r(c)?[]:[c]}function o(c,l){if(l){let f=Object.keys(l);for(let p=0,d=f.length;p<d;p+=1){let m=f[p];c[m]=l[m]}}return c}function s(c,l){let f="";for(let p=0;p<l;p+=1)f+=c;return f}function a(c){return c===0&&Number.NEGATIVE_INFINITY===1/c}e.exports.isNothing=r,e.exports.isObject=n,e.exports.toArray=i,e.exports.repeat=s,e.exports.isNegativeZero=a,e.exports.extend=o})),Vn=de(((t,e)=>{function r(i,o){let s="",a=i.reason||"(unknown reason)";return i.mark?(i.mark.name&&(s+='in "'+i.mark.name+'" '),s+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!o&&i.mark.snippet&&(s+=`
29
+ `)}),this}_outputHelpIfRequested(e){let r=this._getHelpOption();r&&e.find(i=>r.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function bp(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,n="127.0.0.1",i="9229",o;return(o=e.match(/^(--inspect(-brk)?)$/))!==null?r=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=o[1],/^\d+$/.test(o[3])?i=o[3]:n=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=o[1],n=o[3],i=o[4]),r&&i!=="0"?`${r}=${n}:${parseInt(i)+1}`:e})}function ga(){if(se.env.NO_COLOR||se.env.FORCE_COLOR==="0"||se.env.FORCE_COLOR==="false")return!1;if(se.env.FORCE_COLOR||se.env.CLICOLOR_FORCE!==void 0)return!0}ya.Command=ma;ya.useColor=ga});var Cp=S(Ze=>{var{Argument:xp}=Zi(),{Command:va}=Sp(),{CommanderError:_w,InvalidArgumentError:$p}=An(),{Help:bw}=ca(),{Option:kp}=fa();Ze.program=new va;Ze.createCommand=t=>new va(t);Ze.createOption=(t,e)=>new kp(t,e);Ze.createArgument=(t,e)=>new xp(t,e);Ze.Command=va;Ze.Option=kp;Ze.Argument=xp;Ze.Help=bw;Ze.CommanderError=_w;Ze.InvalidArgumentError=$p;Ze.InvalidOptionArgumentError=$p});function Ap(t){return ro[t]?.properties??[]}function Tp(t,e){let r=ro[e];return r?r.properties.includes(t):!1}var to,ro,wt,no,jR,Vt=K(()=>{"use strict";to={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:"image",lowering:"attribute",description:"Icon token or asset name in the renderer icon set"},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"},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"}},ro={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","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","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","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","value","binding","placeholder","onChange","error","help","keyboardType","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","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","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","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"}}},wt=new Set(Object.keys(ro)),no=new Set(Object.entries(to).filter(([,t])=>t.lowering==="inline-css").map(([t])=>t)),jR=new Set(Object.entries(to).filter(([,t])=>t.lowering==="class-name").map(([t])=>t))});var qw,Kp,Fw,Hw,Bw,Uw,de,Ww,Gw,Mn,Vn,zw,Ve,Yp,Xp,Qp,Zp,ef,tf,rf,nf,of,sf,af,cf,lf,uf,pf,ff,df,Pa,Jw,Kw,hf,oI,sI,aI,cI,lI,uI,pI,fI,dI,hI,mI,gI,yI,vI,ut,Fr=K(()=>{qw=Object.create,Kp=Object.defineProperty,Fw=Object.getOwnPropertyDescriptor,Hw=Object.getOwnPropertyNames,Bw=Object.getPrototypeOf,Uw=Object.prototype.hasOwnProperty,de=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),Ww=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(var i=Hw(e),o=0,s=i.length,a;o<s;o++)a=i[o],!Uw.call(t,a)&&a!==r&&Kp(t,a,{get:(c=>e[c]).bind(null,a),enumerable:!(n=Fw(e,a))||n.enumerable});return t},Gw=(t,e,r)=>(r=t!=null?qw(Bw(t)):{},Ww(e||!t||!t.__esModule?Kp(r,"default",{value:t,enumerable:!0}):r,t)),Mn=de(((t,e)=>{function r(c){return typeof c>"u"||c===null}function n(c){return typeof c=="object"&&c!==null}function i(c){return Array.isArray(c)?c:r(c)?[]:[c]}function o(c,l){if(l){let f=Object.keys(l);for(let p=0,d=f.length;p<d;p+=1){let m=f[p];c[m]=l[m]}}return c}function s(c,l){let f="";for(let p=0;p<l;p+=1)f+=c;return f}function a(c){return c===0&&Number.NEGATIVE_INFINITY===1/c}e.exports.isNothing=r,e.exports.isObject=n,e.exports.toArray=i,e.exports.repeat=s,e.exports.isNegativeZero=a,e.exports.extend=o})),Vn=de(((t,e)=>{function r(i,o){let s="",a=i.reason||"(unknown reason)";return i.mark?(i.mark.name&&(s+='in "'+i.mark.name+'" '),s+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!o&&i.mark.snippet&&(s+=`
30
30
 
31
- `+i.mark.snippet),a+" "+s):a}function n(i,o){Error.call(this),this.name="YAMLException",this.reason=i,this.mark=o,this.message=r(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n.prototype.toString=function(o){return this.name+": "+r(this,o)},e.exports=n})),Hw=de(((t,e)=>{var r=Mn();function n(s,a,c,l,f){let p="",d="",m=Math.floor(f/2)-1;return l-a>m&&(p=" ... ",a=l-m+p.length),c-l>m&&(d=" ...",c=l+m-d.length),{str:p+s.slice(a,c).replace(/\t/g,"\u2192")+d,pos:l-a+p.length}}function i(s,a){return r.repeat(" ",a-s.length)+s}function o(s,a){if(a=Object.create(a||null),!s.buffer)return null;a.maxLength||(a.maxLength=79),typeof a.indent!="number"&&(a.indent=1),typeof a.linesBefore!="number"&&(a.linesBefore=3),typeof a.linesAfter!="number"&&(a.linesAfter=2);let c=/\r?\n|\r|\0/g,l=[0],f=[],p,d=-1;for(;p=c.exec(s.buffer);)f.push(p.index),l.push(p.index+p[0].length),s.position<=p.index&&d<0&&(d=l.length-2);d<0&&(d=l.length-1);let m="",g=Math.min(s.line+a.linesAfter,f.length).toString().length,y=a.maxLength-(a.indent+g+3);for(let b=1;b<=a.linesBefore&&!(d-b<0);b++){let M=n(s.buffer,l[d-b],f[d-b],s.position-(l[d]-l[d-b]),y);m=r.repeat(" ",a.indent)+i((s.line-b+1).toString(),g)+" | "+M.str+`
31
+ `+i.mark.snippet),a+" "+s):a}function n(i,o){Error.call(this),this.name="YAMLException",this.reason=i,this.mark=o,this.message=r(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n.prototype.toString=function(o){return this.name+": "+r(this,o)},e.exports=n})),zw=de(((t,e)=>{var r=Mn();function n(s,a,c,l,f){let p="",d="",m=Math.floor(f/2)-1;return l-a>m&&(p=" ... ",a=l-m+p.length),c-l>m&&(d=" ...",c=l+m-d.length),{str:p+s.slice(a,c).replace(/\t/g,"\u2192")+d,pos:l-a+p.length}}function i(s,a){return r.repeat(" ",a-s.length)+s}function o(s,a){if(a=Object.create(a||null),!s.buffer)return null;a.maxLength||(a.maxLength=79),typeof a.indent!="number"&&(a.indent=1),typeof a.linesBefore!="number"&&(a.linesBefore=3),typeof a.linesAfter!="number"&&(a.linesAfter=2);let c=/\r?\n|\r|\0/g,l=[0],f=[],p,d=-1;for(;p=c.exec(s.buffer);)f.push(p.index),l.push(p.index+p[0].length),s.position<=p.index&&d<0&&(d=l.length-2);d<0&&(d=l.length-1);let m="",g=Math.min(s.line+a.linesAfter,f.length).toString().length,y=a.maxLength-(a.indent+g+3);for(let b=1;b<=a.linesBefore&&!(d-b<0);b++){let M=n(s.buffer,l[d-b],f[d-b],s.position-(l[d]-l[d-b]),y);m=r.repeat(" ",a.indent)+i((s.line-b+1).toString(),g)+" | "+M.str+`
32
32
  `+m}let _=n(s.buffer,l[d],f[d],s.position,y);m+=r.repeat(" ",a.indent)+i((s.line+1).toString(),g)+" | "+_.str+`
33
33
  `,m+=r.repeat("-",a.indent+g+3+_.pos)+`^
34
34
  `;for(let b=1;b<=a.linesAfter&&!(d+b>=f.length);b++){let M=n(s.buffer,l[d+b],f[d+b],s.position-(l[d]-l[d+b]),y);m+=r.repeat(" ",a.indent)+i((s.line+b+1).toString(),g)+" | "+M.str+`
35
- `}return m.replace(/\n$/,"")}e.exports=o})),Ve=de(((t,e)=>{var r=Vn(),n=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];function o(a){let c={};return a!==null&&Object.keys(a).forEach(function(l){a[l].forEach(function(f){c[String(f)]=l})}),c}function s(a,c){if(c=c||{},Object.keys(c).forEach(function(l){if(n.indexOf(l)===-1)throw new r('Unknown option "'+l+'" is met in definition of "'+a+'" YAML type.')}),this.options=c,this.tag=a,this.kind=c.kind||null,this.resolve=c.resolve||function(){return!0},this.construct=c.construct||function(l){return l},this.instanceOf=c.instanceOf||null,this.predicate=c.predicate||null,this.represent=c.represent||null,this.representName=c.representName||null,this.defaultStyle=c.defaultStyle||null,this.multi=c.multi||!1,this.styleAliases=o(c.styleAliases||null),i.indexOf(this.kind)===-1)throw new r('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}e.exports=s})),Jp=de(((t,e)=>{var r=Vn(),n=Ve();function i(a,c){let l=[];return a[c].forEach(function(f){let p=l.length;l.forEach(function(d,m){d.tag===f.tag&&d.kind===f.kind&&d.multi===f.multi&&(p=m)}),l[p]=f}),l}function o(){let a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function c(l){l.multi?(a.multi[l.kind].push(l),a.multi.fallback.push(l)):a[l.kind][l.tag]=a.fallback[l.tag]=l}for(let l=0,f=arguments.length;l<f;l+=1)arguments[l].forEach(c);return a}function s(a){return this.extend(a)}s.prototype.extend=function(c){let l=[],f=[];if(c instanceof n)f.push(c);else if(Array.isArray(c))f=f.concat(c);else if(c&&(Array.isArray(c.implicit)||Array.isArray(c.explicit)))c.implicit&&(l=l.concat(c.implicit)),c.explicit&&(f=f.concat(c.explicit));else throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");l.forEach(function(d){if(!(d instanceof n))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(d.loadKind&&d.loadKind!=="scalar")throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(d.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),f.forEach(function(d){if(!(d instanceof n))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let p=Object.create(s.prototype);return p.implicit=(this.implicit||[]).concat(l),p.explicit=(this.explicit||[]).concat(f),p.compiledImplicit=i(p,"implicit"),p.compiledExplicit=i(p,"explicit"),p.compiledTypeMap=o(p.compiledImplicit,p.compiledExplicit),p},e.exports=s})),Kp=de(((t,e)=>{e.exports=new(Ve())("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})})),Yp=de(((t,e)=>{e.exports=new(Ve())("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})})),Xp=de(((t,e)=>{e.exports=new(Ve())("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}})})),Qp=de(((t,e)=>{e.exports=new(Jp())({explicit:[Kp(),Yp(),Xp()]})})),Zp=de(((t,e)=>{var r=Ve();function n(s){if(s===null)return!0;let a=s.length;return a===1&&s==="~"||a===4&&(s==="null"||s==="Null"||s==="NULL")}function i(){return null}function o(s){return s===null}e.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:n,construct:i,predicate:o,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})})),ef=de(((t,e)=>{var r=Ve();function n(s){if(s===null)return!1;let a=s.length;return a===4&&(s==="true"||s==="True"||s==="TRUE")||a===5&&(s==="false"||s==="False"||s==="FALSE")}function i(s){return s==="true"||s==="True"||s==="TRUE"}function o(s){return Object.prototype.toString.call(s)==="[object Boolean]"}e.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:n,construct:i,predicate:o,represent:{lowercase:function(s){return s?"true":"false"},uppercase:function(s){return s?"TRUE":"FALSE"},camelcase:function(s){return s?"True":"False"}},defaultStyle:"lowercase"})})),tf=de(((t,e)=>{var r=Mn(),n=Ve();function i(p){return p>=48&&p<=57||p>=65&&p<=70||p>=97&&p<=102}function o(p){return p>=48&&p<=55}function s(p){return p>=48&&p<=57}function a(p){if(p===null)return!1;let d=p.length,m=0,g=!1;if(!d)return!1;let y=p[m];if((y==="-"||y==="+")&&(y=p[++m]),y==="0"){if(m+1===d)return!0;if(y=p[++m],y==="b"){for(m++;m<d;m++){if(y=p[m],y!=="0"&&y!=="1")return!1;g=!0}return g&&Number.isFinite(c(p))}if(y==="x"){for(m++;m<d;m++){if(!i(p.charCodeAt(m)))return!1;g=!0}return g&&Number.isFinite(c(p))}if(y==="o"){for(m++;m<d;m++){if(!o(p.charCodeAt(m)))return!1;g=!0}return g&&Number.isFinite(c(p))}}for(;m<d;m++){if(!s(p.charCodeAt(m)))return!1;g=!0}return g?Number.isFinite(c(p)):!1}function c(p){let d=p,m=1,g=d[0];if((g==="-"||g==="+")&&(g==="-"&&(m=-1),d=d.slice(1),g=d[0]),d==="0")return 0;if(g==="0"){if(d[1]==="b")return m*parseInt(d.slice(2),2);if(d[1]==="x")return m*parseInt(d.slice(2),16);if(d[1]==="o")return m*parseInt(d.slice(2),8)}return m*parseInt(d,10)}function l(p){return c(p)}function f(p){return Object.prototype.toString.call(p)==="[object Number]"&&p%1===0&&!r.isNegativeZero(p)}e.exports=new n("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:l,predicate:f,represent:{binary:function(p){return p>=0?"0b"+p.toString(2):"-0b"+p.toString(2).slice(1)},octal:function(p){return p>=0?"0o"+p.toString(8):"-0o"+p.toString(8).slice(1)},decimal:function(p){return p.toString(10)},hexadecimal:function(p){return p>=0?"0x"+p.toString(16).toUpperCase():"-0x"+p.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})})),rf=de(((t,e)=>{var r=Mn(),n=Ve(),i=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),o=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function s(p){return p===null||!i.test(p)?!1:Number.isFinite(parseFloat(p,10))?!0:o.test(p)}function a(p){let d=p.toLowerCase(),m=d[0]==="-"?-1:1;return"+-".indexOf(d[0])>=0&&(d=d.slice(1)),d===".inf"?m===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:d===".nan"?NaN:m*parseFloat(d,10)}var c=/^[-+]?[0-9]+e/;function l(p,d){if(isNaN(p))switch(d){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===p)switch(d){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===p)switch(d){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(p))return"-0.0";let m=p.toString(10);return c.test(m)?m.replace("e",".e"):m}function f(p){return Object.prototype.toString.call(p)==="[object Number]"&&(p%1!==0||r.isNegativeZero(p))}e.exports=new n("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:a,predicate:f,represent:l,defaultStyle:"lowercase"})})),nf=de(((t,e)=>{e.exports=Qp().extend({implicit:[Zp(),ef(),tf(),rf()]})})),of=de(((t,e)=>{e.exports=nf()})),sf=de(((t,e)=>{var r=Ve(),n=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function o(c){return c===null?!1:n.exec(c)!==null||i.exec(c)!==null}function s(c){let l=0,f=null,p=n.exec(c);if(p===null&&(p=i.exec(c)),p===null)throw new Error("Date resolve error");let d=+p[1],m=+p[2]-1,g=+p[3];if(!p[4])return new Date(Date.UTC(d,m,g));let y=+p[4],_=+p[5],b=+p[6];if(p[7]){for(l=p[7].slice(0,3);l.length<3;)l+="0";l=+l}if(p[9]){let q=+p[10],A=+(p[11]||0);f=(q*60+A)*6e4,p[9]==="-"&&(f=-f)}let M=new Date(Date.UTC(d,m,g,y,_,b,l));return f&&M.setTime(M.getTime()-f),M}function a(c){return c.toISOString()}e.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:o,construct:s,instanceOf:Date,represent:a})})),af=de(((t,e)=>{var r=Ve();function n(i){return i==="<<"||i===null}e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:n})})),cf=de(((t,e)=>{var r=Ve(),n=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
36
- \r`;function i(c){if(c===null)return!1;let l=0,f=c.length,p=n;for(let d=0;d<f;d++){let m=p.indexOf(c.charAt(d));if(!(m>64)){if(m<0)return!1;l+=6}}return l%8===0}function o(c){let l=c.replace(/[\r\n=]/g,""),f=l.length,p=n,d=0,m=[];for(let y=0;y<f;y++)y%4===0&&y&&(m.push(d>>16&255),m.push(d>>8&255),m.push(d&255)),d=d<<6|p.indexOf(l.charAt(y));let g=f%4*6;return g===0?(m.push(d>>16&255),m.push(d>>8&255),m.push(d&255)):g===18?(m.push(d>>10&255),m.push(d>>2&255)):g===12&&m.push(d>>4&255),new Uint8Array(m)}function s(c){let l="",f=0,p=c.length,d=n;for(let g=0;g<p;g++)g%3===0&&g&&(l+=d[f>>18&63],l+=d[f>>12&63],l+=d[f>>6&63],l+=d[f&63]),f=(f<<8)+c[g];let m=p%3;return m===0?(l+=d[f>>18&63],l+=d[f>>12&63],l+=d[f>>6&63],l+=d[f&63]):m===2?(l+=d[f>>10&63],l+=d[f>>4&63],l+=d[f<<2&63],l+=d[64]):m===1&&(l+=d[f>>2&63],l+=d[f<<4&63],l+=d[64],l+=d[64]),l}function a(c){return Object.prototype.toString.call(c)==="[object Uint8Array]"}e.exports=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:o,predicate:a,represent:s})})),lf=de(((t,e)=>{var r=Ve(),n=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function o(a){if(a===null)return!0;let c=[],l=a;for(let f=0,p=l.length;f<p;f+=1){let d=l[f],m=!1;if(i.call(d)!=="[object Object]")return!1;let g;for(g in d)if(n.call(d,g))if(!m)m=!0;else return!1;if(!m)return!1;if(c.indexOf(g)===-1)c.push(g);else return!1}return!0}function s(a){return a!==null?a:[]}e.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:o,construct:s})})),uf=de(((t,e)=>{var r=Ve(),n=Object.prototype.toString;function i(s){if(s===null)return!0;let a=s,c=new Array(a.length);for(let l=0,f=a.length;l<f;l+=1){let p=a[l];if(n.call(p)!=="[object Object]")return!1;let d=Object.keys(p);if(d.length!==1)return!1;c[l]=[d[0],p[d[0]]]}return!0}function o(s){if(s===null)return[];let a=s,c=new Array(a.length);for(let l=0,f=a.length;l<f;l+=1){let p=a[l],d=Object.keys(p);c[l]=[d[0],p[d[0]]]}return c}e.exports=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:o})})),pf=de(((t,e)=>{var r=Ve(),n=Object.prototype.hasOwnProperty;function i(s){if(s===null)return!0;let a=s;for(let c in a)if(n.call(a,c)&&a[c]!==null)return!1;return!0}function o(s){return s!==null?s:{}}e.exports=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:o})})),Ea=de(((t,e)=>{e.exports=of().extend({implicit:[sf(),af()],explicit:[cf(),lf(),uf(),pf()]})})),Bw=de(((t,e)=>{var r=Mn(),n=Vn(),i=Hw(),o=Ea(),s=Object.prototype.hasOwnProperty,a=1,c=2,l=3,f=4,p=1,d=2,m=3,g=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,y=/[\x85\u2028\u2029]/,_=/[,\[\]{}]/,b=/^(?:!|!!|![0-9A-Za-z-]+!)$/,M=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function q(u){return Object.prototype.toString.call(u)}function A(u){return u===10||u===13}function T(u){return u===9||u===32}function V(u){return u===9||u===32||u===10||u===13}function X(u){return u===44||u===91||u===93||u===123||u===125}function fe(u){if(u>=48&&u<=57)return u-48;let v=u|32;return v>=97&&v<=102?v-97+10:-1}function Re(u){return u===120?2:u===117?4:u===85?8:0}function ke(u){return u>=48&&u<=57?u-48:-1}function Fe(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 Oe(u){return u<=65535?String.fromCharCode(u):String.fromCharCode((u-65536>>10)+55296,(u-65536&1023)+56320)}function at(u,v,$){v==="__proto__"?Object.defineProperty(u,v,{configurable:!0,enumerable:!0,writable:!0,value:$}):u[v]=$}var ct=new Array(256),Pt=new Array(256);for(let u=0;u<256;u++)ct[u]=Fe(u)?1:0,Pt[u]=Fe(u);function ce(u,v){this.input=u,this.filename=v.filename||null,this.schema=v.schema||o,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.maxMergeSeqLength=typeof v.maxMergeSeqLength=="number"?v.maxMergeSeqLength:20,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.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function Fi(u,v){let $={name:u.filename,buffer:u.input.slice(0,-1),position:u.position,line:u.line,column:u.position-u.lineStart};return $.snippet=i($),new n(v,$)}function H(u,v){throw Fi(u,v)}function Mr(u,v){u.onWarning&&u.onWarning.call(null,Fi(u,v))}function It(u,v,$){let E=u.anchorMapTransactions;if(E.length!==0){let x=E[E.length-1];s.call(x,v)||(x[v]={existed:s.call(u.anchorMap,v),value:u.anchorMap[v]})}u.anchorMap[v]=$}function zs(u){u.anchorMapTransactions.push(Object.create(null))}function cr(u){let v=u.anchorMapTransactions.pop(),$=u.anchorMapTransactions;if($.length===0)return;let E=$[$.length-1],x=Object.keys(v);for(let O=0,h=x.length;O<h;O+=1){let w=x[O];s.call(E,w)||(E[w]=v[w])}}function Js(u){let v=u.anchorMapTransactions.pop(),$=Object.keys(v);for(let E=$.length-1;E>=0;E-=1){let x=v[$[E]];x.existed?u.anchorMap[$[E]]=x.value:delete u.anchorMap[$[E]]}}function Pn(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 Vr(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}var Hi={YAML:function(v,$,E){v.version!==null&&H(v,"duplication of %YAML directive"),E.length!==1&&H(v,"YAML directive accepts exactly one argument");let x=/^([0-9]+)\.([0-9]+)$/.exec(E[0]);x===null&&H(v,"ill-formed argument of the YAML directive");let O=parseInt(x[1],10),h=parseInt(x[2],10);O!==1&&H(v,"unacceptable YAML version of the document"),v.version=E[0],v.checkLineBreaks=h<2,h!==1&&h!==2&&Mr(v,"unsupported YAML version of the document")},TAG:function(v,$,E){let x;E.length!==2&&H(v,"TAG directive accepts exactly two arguments");let O=E[0];x=E[1],b.test(O)||H(v,"ill-formed tag handle (first argument) of the TAG directive"),s.call(v.tagMap,O)&&H(v,'there is a previously declared suffix for "'+O+'" tag handle'),M.test(x)||H(v,"ill-formed tag prefix (second argument) of the TAG directive");try{x=decodeURIComponent(x)}catch{H(v,"tag prefix is malformed: "+x)}v.tagMap[O]=x}};function ze(u,v,$,E){if(v<$){let x=u.input.slice(v,$);if(E)for(let O=0,h=x.length;O<h;O+=1){let w=x.charCodeAt(O);w===9||w>=32&&w<=1114111||H(u,"expected valid JSON character")}else g.test(x)&&H(u,"the stream contains non-printable characters");u.result+=x}}function zt(u,v,$,E){r.isObject($)||H(u,"cannot merge mappings; the provided source object is unacceptable");let x=Object.keys($);for(let O=0,h=x.length;O<h;O+=1){let w=x[O];s.call(v,w)||(at(v,w,$[w]),E[w]=!0)}}function Rt(u,v,$,E,x,O,h,w,R){if(Array.isArray(x)){x=Array.prototype.slice.call(x);for(let k=0,C=x.length;k<C;k+=1)Array.isArray(x[k])&&H(u,"nested arrays are not supported inside keys"),typeof x=="object"&&q(x[k])==="[object Object]"&&(x[k]="[object Object]")}if(typeof x=="object"&&q(x)==="[object Object]"&&(x="[object Object]"),x=String(x),v===null&&(v={}),E==="tag:yaml.org,2002:merge")if(Array.isArray(O)){O.length>u.maxMergeSeqLength&&H(u,"merge sequence length exceeded maxMergeSeqLength ("+u.maxMergeSeqLength+")");let k=new Set;for(let C=0,I=O.length;C<I;C+=1){let P=O[C];k.has(P)||(k.add(P),zt(u,v,P,$))}}else zt(u,v,O,$);else!u.json&&!s.call($,x)&&s.call(v,x)&&(u.line=h||u.line,u.lineStart=w||u.lineStart,u.position=R||u.position,H(u,"duplicated mapping key")),at(v,x,O),delete $[x];return v}function Lr(u){let v=u.input.charCodeAt(u.position);v===10?u.position++:v===13?(u.position++,u.input.charCodeAt(u.position)===10&&u.position++):H(u,"a line break is expected"),u.line+=1,u.lineStart=u.position,u.firstTabInLine=-1}function we(u,v,$){let E=0,x=u.input.charCodeAt(u.position);for(;x!==0;){for(;T(x);)x===9&&u.firstTabInLine===-1&&(u.firstTabInLine=u.position),x=u.input.charCodeAt(++u.position);if(v&&x===35)do x=u.input.charCodeAt(++u.position);while(x!==10&&x!==13&&x!==0);if(A(x))for(Lr(u),x=u.input.charCodeAt(u.position),E++,u.lineIndent=0;x===32;)u.lineIndent++,x=u.input.charCodeAt(++u.position);else break}return $!==-1&&E!==0&&u.lineIndent<$&&Mr(u,"deficient indentation"),E}function jr(u){let v=u.position,$=u.input.charCodeAt(v);return!!(($===45||$===46)&&$===u.input.charCodeAt(v+1)&&$===u.input.charCodeAt(v+2)&&(v+=3,$=u.input.charCodeAt(v),$===0||V($)))}function Ot(u,v){v===1?u.result+=" ":v>1&&(u.result+=r.repeat(`
38
- `,v-1))}function Bi(u,v,$){let E,x,O,h,w,R,k=u.kind,C=u.result,I=u.input.charCodeAt(u.position);if(V(I)||X(I)||I===35||I===38||I===42||I===33||I===124||I===62||I===39||I===34||I===37||I===64||I===96)return!1;if(I===63||I===45){let P=u.input.charCodeAt(u.position+1);if(V(P)||$&&X(P))return!1}for(u.kind="scalar",u.result="",E=x=u.position,O=!1;I!==0;){if(I===58){let P=u.input.charCodeAt(u.position+1);if(V(P)||$&&X(P))break}else if(I===35){if(V(u.input.charCodeAt(u.position-1)))break}else{if(u.position===u.lineStart&&jr(u)||$&&X(I))break;if(A(I))if(h=u.line,w=u.lineStart,R=u.lineIndent,we(u,!1,-1),u.lineIndent>=v){O=!0,I=u.input.charCodeAt(u.position);continue}else{u.position=x,u.line=h,u.lineStart=w,u.lineIndent=R;break}}O&&(ze(u,E,x,!1),Ot(u,u.line-h),E=x=u.position,O=!1),T(I)||(x=u.position+1),I=u.input.charCodeAt(++u.position)}return ze(u,E,x,!1),u.result?!0:(u.kind=k,u.result=C,!1)}function Ui(u,v){let $,E,x=u.input.charCodeAt(u.position);if(x!==39)return!1;for(u.kind="scalar",u.result="",u.position++,$=E=u.position;(x=u.input.charCodeAt(u.position))!==0;)if(x===39)if(ze(u,$,u.position,!0),x=u.input.charCodeAt(++u.position),x===39)$=u.position,u.position++,E=u.position;else return!0;else A(x)?(ze(u,$,E,!0),Ot(u,we(u,!1,v)),$=E=u.position):u.position===u.lineStart&&jr(u)?H(u,"unexpected end of the document within a single quoted scalar"):(u.position++,T(x)||(E=u.position));H(u,"unexpected end of the stream within a single quoted scalar")}function In(u,v){let $,E,x,O=u.input.charCodeAt(u.position);if(O!==34)return!1;for(u.kind="scalar",u.result="",u.position++,$=E=u.position;(O=u.input.charCodeAt(u.position))!==0;){if(O===34)return ze(u,$,u.position,!0),u.position++,!0;if(O===92){if(ze(u,$,u.position,!0),O=u.input.charCodeAt(++u.position),A(O))we(u,!1,v);else if(O<256&&ct[O])u.result+=Pt[O],u.position++;else if((x=Re(O))>0){let h=x,w=0;for(;h>0;h--)O=u.input.charCodeAt(++u.position),(x=fe(O))>=0?w=(w<<4)+x:H(u,"expected hexadecimal character");u.result+=Oe(w),u.position++}else H(u,"unknown escape sequence");$=E=u.position}else A(O)?(ze(u,$,E,!0),Ot(u,we(u,!1,v)),$=E=u.position):u.position===u.lineStart&&jr(u)?H(u,"unexpected end of the document within a double quoted scalar"):(u.position++,T(O)||(E=u.position))}H(u,"unexpected end of the stream within a double quoted scalar")}function Wi(u,v){let $=!0,E,x,O,h=u.tag,w,R=u.anchor,k,C,I,P,j=Object.create(null),L,U,W,re=u.input.charCodeAt(u.position);if(re===91)k=93,P=!1,w=[];else if(re===123)k=125,P=!0,w={};else return!1;for(u.anchor!==null&&It(u,u.anchor,w),re=u.input.charCodeAt(++u.position);re!==0;){if(we(u,!0,v),re=u.input.charCodeAt(u.position),re===k)return u.position++,u.tag=h,u.anchor=R,u.kind=P?"mapping":"sequence",u.result=w,!0;$?re===44&&H(u,"expected the node content, but found ','"):H(u,"missed comma between flow collection entries"),U=L=W=null,C=I=!1,re===63&&V(u.input.charCodeAt(u.position+1))&&(C=I=!0,u.position++,we(u,!0,v)),E=u.line,x=u.lineStart,O=u.position,Tt(u,v,a,!1,!0),U=u.tag,L=u.result,we(u,!0,v),re=u.input.charCodeAt(u.position),(I||u.line===E)&&re===58&&(C=!0,re=u.input.charCodeAt(++u.position),we(u,!0,v),Tt(u,v,a,!1,!0),W=u.result),P?Rt(u,w,j,U,L,W,E,x,O):C?w.push(Rt(u,null,j,U,L,W,E,x,O)):w.push(L),we(u,!0,v),re=u.input.charCodeAt(u.position),re===44?($=!0,re=u.input.charCodeAt(++u.position)):$=!1}H(u,"unexpected end of the stream within a flow collection")}function Gi(u,v){let $,E=p,x=!1,O=!1,h=v,w=0,R=!1,k,C=u.input.charCodeAt(u.position);if(C===124)$=!1;else if(C===62)$=!0;else return!1;for(u.kind="scalar",u.result="";C!==0;)if(C=u.input.charCodeAt(++u.position),C===43||C===45)p===E?E=C===43?m:d:H(u,"repeat of a chomping mode identifier");else if((k=ke(C))>=0)k===0?H(u,"bad explicit indentation width of a block scalar; it cannot be less than one"):O?H(u,"repeat of an indentation width identifier"):(h=v+k-1,O=!0);else break;if(T(C)){do C=u.input.charCodeAt(++u.position);while(T(C));if(C===35)do C=u.input.charCodeAt(++u.position);while(!A(C)&&C!==0)}for(;C!==0;){for(Lr(u),u.lineIndent=0,C=u.input.charCodeAt(u.position);(!O||u.lineIndent<h)&&C===32;)u.lineIndent++,C=u.input.charCodeAt(++u.position);if(!O&&u.lineIndent>h&&(h=u.lineIndent),A(C)){w++;continue}if(!O&&h===0&&H(u,"missing indentation for block scalar"),u.lineIndent<h){E===m?u.result+=r.repeat(`
35
+ `}return m.replace(/\n$/,"")}e.exports=o})),Ve=de(((t,e)=>{var r=Vn(),n=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];function o(a){let c={};return a!==null&&Object.keys(a).forEach(function(l){a[l].forEach(function(f){c[String(f)]=l})}),c}function s(a,c){if(c=c||{},Object.keys(c).forEach(function(l){if(n.indexOf(l)===-1)throw new r('Unknown option "'+l+'" is met in definition of "'+a+'" YAML type.')}),this.options=c,this.tag=a,this.kind=c.kind||null,this.resolve=c.resolve||function(){return!0},this.construct=c.construct||function(l){return l},this.instanceOf=c.instanceOf||null,this.predicate=c.predicate||null,this.represent=c.represent||null,this.representName=c.representName||null,this.defaultStyle=c.defaultStyle||null,this.multi=c.multi||!1,this.styleAliases=o(c.styleAliases||null),i.indexOf(this.kind)===-1)throw new r('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}e.exports=s})),Yp=de(((t,e)=>{var r=Vn(),n=Ve();function i(a,c){let l=[];return a[c].forEach(function(f){let p=l.length;l.forEach(function(d,m){d.tag===f.tag&&d.kind===f.kind&&d.multi===f.multi&&(p=m)}),l[p]=f}),l}function o(){let a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function c(l){l.multi?(a.multi[l.kind].push(l),a.multi.fallback.push(l)):a[l.kind][l.tag]=a.fallback[l.tag]=l}for(let l=0,f=arguments.length;l<f;l+=1)arguments[l].forEach(c);return a}function s(a){return this.extend(a)}s.prototype.extend=function(c){let l=[],f=[];if(c instanceof n)f.push(c);else if(Array.isArray(c))f=f.concat(c);else if(c&&(Array.isArray(c.implicit)||Array.isArray(c.explicit)))c.implicit&&(l=l.concat(c.implicit)),c.explicit&&(f=f.concat(c.explicit));else throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");l.forEach(function(d){if(!(d instanceof n))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(d.loadKind&&d.loadKind!=="scalar")throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(d.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),f.forEach(function(d){if(!(d instanceof n))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let p=Object.create(s.prototype);return p.implicit=(this.implicit||[]).concat(l),p.explicit=(this.explicit||[]).concat(f),p.compiledImplicit=i(p,"implicit"),p.compiledExplicit=i(p,"explicit"),p.compiledTypeMap=o(p.compiledImplicit,p.compiledExplicit),p},e.exports=s})),Xp=de(((t,e)=>{e.exports=new(Ve())("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})})),Qp=de(((t,e)=>{e.exports=new(Ve())("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})})),Zp=de(((t,e)=>{e.exports=new(Ve())("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}})})),ef=de(((t,e)=>{e.exports=new(Yp())({explicit:[Xp(),Qp(),Zp()]})})),tf=de(((t,e)=>{var r=Ve();function n(s){if(s===null)return!0;let a=s.length;return a===1&&s==="~"||a===4&&(s==="null"||s==="Null"||s==="NULL")}function i(){return null}function o(s){return s===null}e.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:n,construct:i,predicate:o,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})})),rf=de(((t,e)=>{var r=Ve();function n(s){if(s===null)return!1;let a=s.length;return a===4&&(s==="true"||s==="True"||s==="TRUE")||a===5&&(s==="false"||s==="False"||s==="FALSE")}function i(s){return s==="true"||s==="True"||s==="TRUE"}function o(s){return Object.prototype.toString.call(s)==="[object Boolean]"}e.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:n,construct:i,predicate:o,represent:{lowercase:function(s){return s?"true":"false"},uppercase:function(s){return s?"TRUE":"FALSE"},camelcase:function(s){return s?"True":"False"}},defaultStyle:"lowercase"})})),nf=de(((t,e)=>{var r=Mn(),n=Ve();function i(p){return p>=48&&p<=57||p>=65&&p<=70||p>=97&&p<=102}function o(p){return p>=48&&p<=55}function s(p){return p>=48&&p<=57}function a(p){if(p===null)return!1;let d=p.length,m=0,g=!1;if(!d)return!1;let y=p[m];if((y==="-"||y==="+")&&(y=p[++m]),y==="0"){if(m+1===d)return!0;if(y=p[++m],y==="b"){for(m++;m<d;m++){if(y=p[m],y!=="0"&&y!=="1")return!1;g=!0}return g&&Number.isFinite(c(p))}if(y==="x"){for(m++;m<d;m++){if(!i(p.charCodeAt(m)))return!1;g=!0}return g&&Number.isFinite(c(p))}if(y==="o"){for(m++;m<d;m++){if(!o(p.charCodeAt(m)))return!1;g=!0}return g&&Number.isFinite(c(p))}}for(;m<d;m++){if(!s(p.charCodeAt(m)))return!1;g=!0}return g?Number.isFinite(c(p)):!1}function c(p){let d=p,m=1,g=d[0];if((g==="-"||g==="+")&&(g==="-"&&(m=-1),d=d.slice(1),g=d[0]),d==="0")return 0;if(g==="0"){if(d[1]==="b")return m*parseInt(d.slice(2),2);if(d[1]==="x")return m*parseInt(d.slice(2),16);if(d[1]==="o")return m*parseInt(d.slice(2),8)}return m*parseInt(d,10)}function l(p){return c(p)}function f(p){return Object.prototype.toString.call(p)==="[object Number]"&&p%1===0&&!r.isNegativeZero(p)}e.exports=new n("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:l,predicate:f,represent:{binary:function(p){return p>=0?"0b"+p.toString(2):"-0b"+p.toString(2).slice(1)},octal:function(p){return p>=0?"0o"+p.toString(8):"-0o"+p.toString(8).slice(1)},decimal:function(p){return p.toString(10)},hexadecimal:function(p){return p>=0?"0x"+p.toString(16).toUpperCase():"-0x"+p.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})})),of=de(((t,e)=>{var r=Mn(),n=Ve(),i=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),o=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function s(p){return p===null||!i.test(p)?!1:Number.isFinite(parseFloat(p,10))?!0:o.test(p)}function a(p){let d=p.toLowerCase(),m=d[0]==="-"?-1:1;return"+-".indexOf(d[0])>=0&&(d=d.slice(1)),d===".inf"?m===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:d===".nan"?NaN:m*parseFloat(d,10)}var c=/^[-+]?[0-9]+e/;function l(p,d){if(isNaN(p))switch(d){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===p)switch(d){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===p)switch(d){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(p))return"-0.0";let m=p.toString(10);return c.test(m)?m.replace("e",".e"):m}function f(p){return Object.prototype.toString.call(p)==="[object Number]"&&(p%1!==0||r.isNegativeZero(p))}e.exports=new n("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:a,predicate:f,represent:l,defaultStyle:"lowercase"})})),sf=de(((t,e)=>{e.exports=ef().extend({implicit:[tf(),rf(),nf(),of()]})})),af=de(((t,e)=>{e.exports=sf()})),cf=de(((t,e)=>{var r=Ve(),n=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function o(c){return c===null?!1:n.exec(c)!==null||i.exec(c)!==null}function s(c){let l=0,f=null,p=n.exec(c);if(p===null&&(p=i.exec(c)),p===null)throw new Error("Date resolve error");let d=+p[1],m=+p[2]-1,g=+p[3];if(!p[4])return new Date(Date.UTC(d,m,g));let y=+p[4],_=+p[5],b=+p[6];if(p[7]){for(l=p[7].slice(0,3);l.length<3;)l+="0";l=+l}if(p[9]){let q=+p[10],A=+(p[11]||0);f=(q*60+A)*6e4,p[9]==="-"&&(f=-f)}let M=new Date(Date.UTC(d,m,g,y,_,b,l));return f&&M.setTime(M.getTime()-f),M}function a(c){return c.toISOString()}e.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:o,construct:s,instanceOf:Date,represent:a})})),lf=de(((t,e)=>{var r=Ve();function n(i){return i==="<<"||i===null}e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:n})})),uf=de(((t,e)=>{var r=Ve(),n=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
36
+ \r`;function i(c){if(c===null)return!1;let l=0,f=c.length,p=n;for(let d=0;d<f;d++){let m=p.indexOf(c.charAt(d));if(!(m>64)){if(m<0)return!1;l+=6}}return l%8===0}function o(c){let l=c.replace(/[\r\n=]/g,""),f=l.length,p=n,d=0,m=[];for(let y=0;y<f;y++)y%4===0&&y&&(m.push(d>>16&255),m.push(d>>8&255),m.push(d&255)),d=d<<6|p.indexOf(l.charAt(y));let g=f%4*6;return g===0?(m.push(d>>16&255),m.push(d>>8&255),m.push(d&255)):g===18?(m.push(d>>10&255),m.push(d>>2&255)):g===12&&m.push(d>>4&255),new Uint8Array(m)}function s(c){let l="",f=0,p=c.length,d=n;for(let g=0;g<p;g++)g%3===0&&g&&(l+=d[f>>18&63],l+=d[f>>12&63],l+=d[f>>6&63],l+=d[f&63]),f=(f<<8)+c[g];let m=p%3;return m===0?(l+=d[f>>18&63],l+=d[f>>12&63],l+=d[f>>6&63],l+=d[f&63]):m===2?(l+=d[f>>10&63],l+=d[f>>4&63],l+=d[f<<2&63],l+=d[64]):m===1&&(l+=d[f>>2&63],l+=d[f<<4&63],l+=d[64],l+=d[64]),l}function a(c){return Object.prototype.toString.call(c)==="[object Uint8Array]"}e.exports=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:o,predicate:a,represent:s})})),pf=de(((t,e)=>{var r=Ve(),n=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function o(a){if(a===null)return!0;let c=[],l=a;for(let f=0,p=l.length;f<p;f+=1){let d=l[f],m=!1;if(i.call(d)!=="[object Object]")return!1;let g;for(g in d)if(n.call(d,g))if(!m)m=!0;else return!1;if(!m)return!1;if(c.indexOf(g)===-1)c.push(g);else return!1}return!0}function s(a){return a!==null?a:[]}e.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:o,construct:s})})),ff=de(((t,e)=>{var r=Ve(),n=Object.prototype.toString;function i(s){if(s===null)return!0;let a=s,c=new Array(a.length);for(let l=0,f=a.length;l<f;l+=1){let p=a[l];if(n.call(p)!=="[object Object]")return!1;let d=Object.keys(p);if(d.length!==1)return!1;c[l]=[d[0],p[d[0]]]}return!0}function o(s){if(s===null)return[];let a=s,c=new Array(a.length);for(let l=0,f=a.length;l<f;l+=1){let p=a[l],d=Object.keys(p);c[l]=[d[0],p[d[0]]]}return c}e.exports=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:o})})),df=de(((t,e)=>{var r=Ve(),n=Object.prototype.hasOwnProperty;function i(s){if(s===null)return!0;let a=s;for(let c in a)if(n.call(a,c)&&a[c]!==null)return!1;return!0}function o(s){return s!==null?s:{}}e.exports=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:o})})),Pa=de(((t,e)=>{e.exports=af().extend({implicit:[cf(),lf()],explicit:[uf(),pf(),ff(),df()]})})),Jw=de(((t,e)=>{var r=Mn(),n=Vn(),i=zw(),o=Pa(),s=Object.prototype.hasOwnProperty,a=1,c=2,l=3,f=4,p=1,d=2,m=3,g=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,y=/[\x85\u2028\u2029]/,_=/[,\[\]{}]/,b=/^(?:!|!!|![0-9A-Za-z-]+!)$/,M=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function q(u){return Object.prototype.toString.call(u)}function A(u){return u===10||u===13}function T(u){return u===9||u===32}function V(u){return u===9||u===32||u===10||u===13}function X(u){return u===44||u===91||u===93||u===123||u===125}function fe(u){if(u>=48&&u<=57)return u-48;let v=u|32;return v>=97&&v<=102?v-97+10:-1}function Ie(u){return u===120?2:u===117?4:u===85?8:0}function ke(u){return u>=48&&u<=57?u-48:-1}function Fe(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 Oe(u){return u<=65535?String.fromCharCode(u):String.fromCharCode((u-65536>>10)+55296,(u-65536&1023)+56320)}function at(u,v,$){v==="__proto__"?Object.defineProperty(u,v,{configurable:!0,enumerable:!0,writable:!0,value:$}):u[v]=$}var ct=new Array(256),Rt=new Array(256);for(let u=0;u<256;u++)ct[u]=Fe(u)?1:0,Rt[u]=Fe(u);function ce(u,v){this.input=u,this.filename=v.filename||null,this.schema=v.schema||o,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.maxMergeSeqLength=typeof v.maxMergeSeqLength=="number"?v.maxMergeSeqLength:20,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.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function Fi(u,v){let $={name:u.filename,buffer:u.input.slice(0,-1),position:u.position,line:u.line,column:u.position-u.lineStart};return $.snippet=i($),new n(v,$)}function H(u,v){throw Fi(u,v)}function Mr(u,v){u.onWarning&&u.onWarning.call(null,Fi(u,v))}function It(u,v,$){let E=u.anchorMapTransactions;if(E.length!==0){let x=E[E.length-1];s.call(x,v)||(x[v]={existed:s.call(u.anchorMap,v),value:u.anchorMap[v]})}u.anchorMap[v]=$}function Js(u){u.anchorMapTransactions.push(Object.create(null))}function cr(u){let v=u.anchorMapTransactions.pop(),$=u.anchorMapTransactions;if($.length===0)return;let E=$[$.length-1],x=Object.keys(v);for(let O=0,h=x.length;O<h;O+=1){let w=x[O];s.call(E,w)||(E[w]=v[w])}}function Ks(u){let v=u.anchorMapTransactions.pop(),$=Object.keys(v);for(let E=$.length-1;E>=0;E-=1){let x=v[$[E]];x.existed?u.anchorMap[$[E]]=x.value:delete u.anchorMap[$[E]]}}function Pn(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 Vr(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}var Hi={YAML:function(v,$,E){v.version!==null&&H(v,"duplication of %YAML directive"),E.length!==1&&H(v,"YAML directive accepts exactly one argument");let x=/^([0-9]+)\.([0-9]+)$/.exec(E[0]);x===null&&H(v,"ill-formed argument of the YAML directive");let O=parseInt(x[1],10),h=parseInt(x[2],10);O!==1&&H(v,"unacceptable YAML version of the document"),v.version=E[0],v.checkLineBreaks=h<2,h!==1&&h!==2&&Mr(v,"unsupported YAML version of the document")},TAG:function(v,$,E){let x;E.length!==2&&H(v,"TAG directive accepts exactly two arguments");let O=E[0];x=E[1],b.test(O)||H(v,"ill-formed tag handle (first argument) of the TAG directive"),s.call(v.tagMap,O)&&H(v,'there is a previously declared suffix for "'+O+'" tag handle'),M.test(x)||H(v,"ill-formed tag prefix (second argument) of the TAG directive");try{x=decodeURIComponent(x)}catch{H(v,"tag prefix is malformed: "+x)}v.tagMap[O]=x}};function ze(u,v,$,E){if(v<$){let x=u.input.slice(v,$);if(E)for(let O=0,h=x.length;O<h;O+=1){let w=x.charCodeAt(O);w===9||w>=32&&w<=1114111||H(u,"expected valid JSON character")}else g.test(x)&&H(u,"the stream contains non-printable characters");u.result+=x}}function zt(u,v,$,E){r.isObject($)||H(u,"cannot merge mappings; the provided source object is unacceptable");let x=Object.keys($);for(let O=0,h=x.length;O<h;O+=1){let w=x[O];s.call(v,w)||(at(v,w,$[w]),E[w]=!0)}}function Ot(u,v,$,E,x,O,h,w,I){if(Array.isArray(x)){x=Array.prototype.slice.call(x);for(let k=0,C=x.length;k<C;k+=1)Array.isArray(x[k])&&H(u,"nested arrays are not supported inside keys"),typeof x=="object"&&q(x[k])==="[object Object]"&&(x[k]="[object Object]")}if(typeof x=="object"&&q(x)==="[object Object]"&&(x="[object Object]"),x=String(x),v===null&&(v={}),E==="tag:yaml.org,2002:merge")if(Array.isArray(O)){O.length>u.maxMergeSeqLength&&H(u,"merge sequence length exceeded maxMergeSeqLength ("+u.maxMergeSeqLength+")");let k=new Set;for(let C=0,R=O.length;C<R;C+=1){let P=O[C];k.has(P)||(k.add(P),zt(u,v,P,$))}}else zt(u,v,O,$);else!u.json&&!s.call($,x)&&s.call(v,x)&&(u.line=h||u.line,u.lineStart=w||u.lineStart,u.position=I||u.position,H(u,"duplicated mapping key")),at(v,x,O),delete $[x];return v}function Lr(u){let v=u.input.charCodeAt(u.position);v===10?u.position++:v===13?(u.position++,u.input.charCodeAt(u.position)===10&&u.position++):H(u,"a line break is expected"),u.line+=1,u.lineStart=u.position,u.firstTabInLine=-1}function we(u,v,$){let E=0,x=u.input.charCodeAt(u.position);for(;x!==0;){for(;T(x);)x===9&&u.firstTabInLine===-1&&(u.firstTabInLine=u.position),x=u.input.charCodeAt(++u.position);if(v&&x===35)do x=u.input.charCodeAt(++u.position);while(x!==10&&x!==13&&x!==0);if(A(x))for(Lr(u),x=u.input.charCodeAt(u.position),E++,u.lineIndent=0;x===32;)u.lineIndent++,x=u.input.charCodeAt(++u.position);else break}return $!==-1&&E!==0&&u.lineIndent<$&&Mr(u,"deficient indentation"),E}function jr(u){let v=u.position,$=u.input.charCodeAt(v);return!!(($===45||$===46)&&$===u.input.charCodeAt(v+1)&&$===u.input.charCodeAt(v+2)&&(v+=3,$=u.input.charCodeAt(v),$===0||V($)))}function At(u,v){v===1?u.result+=" ":v>1&&(u.result+=r.repeat(`
38
+ `,v-1))}function Bi(u,v,$){let E,x,O,h,w,I,k=u.kind,C=u.result,R=u.input.charCodeAt(u.position);if(V(R)||X(R)||R===35||R===38||R===42||R===33||R===124||R===62||R===39||R===34||R===37||R===64||R===96)return!1;if(R===63||R===45){let P=u.input.charCodeAt(u.position+1);if(V(P)||$&&X(P))return!1}for(u.kind="scalar",u.result="",E=x=u.position,O=!1;R!==0;){if(R===58){let P=u.input.charCodeAt(u.position+1);if(V(P)||$&&X(P))break}else if(R===35){if(V(u.input.charCodeAt(u.position-1)))break}else{if(u.position===u.lineStart&&jr(u)||$&&X(R))break;if(A(R))if(h=u.line,w=u.lineStart,I=u.lineIndent,we(u,!1,-1),u.lineIndent>=v){O=!0,R=u.input.charCodeAt(u.position);continue}else{u.position=x,u.line=h,u.lineStart=w,u.lineIndent=I;break}}O&&(ze(u,E,x,!1),At(u,u.line-h),E=x=u.position,O=!1),T(R)||(x=u.position+1),R=u.input.charCodeAt(++u.position)}return ze(u,E,x,!1),u.result?!0:(u.kind=k,u.result=C,!1)}function Ui(u,v){let $,E,x=u.input.charCodeAt(u.position);if(x!==39)return!1;for(u.kind="scalar",u.result="",u.position++,$=E=u.position;(x=u.input.charCodeAt(u.position))!==0;)if(x===39)if(ze(u,$,u.position,!0),x=u.input.charCodeAt(++u.position),x===39)$=u.position,u.position++,E=u.position;else return!0;else A(x)?(ze(u,$,E,!0),At(u,we(u,!1,v)),$=E=u.position):u.position===u.lineStart&&jr(u)?H(u,"unexpected end of the document within a single quoted scalar"):(u.position++,T(x)||(E=u.position));H(u,"unexpected end of the stream within a single quoted scalar")}function Rn(u,v){let $,E,x,O=u.input.charCodeAt(u.position);if(O!==34)return!1;for(u.kind="scalar",u.result="",u.position++,$=E=u.position;(O=u.input.charCodeAt(u.position))!==0;){if(O===34)return ze(u,$,u.position,!0),u.position++,!0;if(O===92){if(ze(u,$,u.position,!0),O=u.input.charCodeAt(++u.position),A(O))we(u,!1,v);else if(O<256&&ct[O])u.result+=Rt[O],u.position++;else if((x=Ie(O))>0){let h=x,w=0;for(;h>0;h--)O=u.input.charCodeAt(++u.position),(x=fe(O))>=0?w=(w<<4)+x:H(u,"expected hexadecimal character");u.result+=Oe(w),u.position++}else H(u,"unknown escape sequence");$=E=u.position}else A(O)?(ze(u,$,E,!0),At(u,we(u,!1,v)),$=E=u.position):u.position===u.lineStart&&jr(u)?H(u,"unexpected end of the document within a double quoted scalar"):(u.position++,T(O)||(E=u.position))}H(u,"unexpected end of the stream within a double quoted scalar")}function Wi(u,v){let $=!0,E,x,O,h=u.tag,w,I=u.anchor,k,C,R,P,j=Object.create(null),L,U,W,re=u.input.charCodeAt(u.position);if(re===91)k=93,P=!1,w=[];else if(re===123)k=125,P=!0,w={};else return!1;for(u.anchor!==null&&It(u,u.anchor,w),re=u.input.charCodeAt(++u.position);re!==0;){if(we(u,!0,v),re=u.input.charCodeAt(u.position),re===k)return u.position++,u.tag=h,u.anchor=I,u.kind=P?"mapping":"sequence",u.result=w,!0;$?re===44&&H(u,"expected the node content, but found ','"):H(u,"missed comma between flow collection entries"),U=L=W=null,C=R=!1,re===63&&V(u.input.charCodeAt(u.position+1))&&(C=R=!0,u.position++,we(u,!0,v)),E=u.line,x=u.lineStart,O=u.position,Nt(u,v,a,!1,!0),U=u.tag,L=u.result,we(u,!0,v),re=u.input.charCodeAt(u.position),(R||u.line===E)&&re===58&&(C=!0,re=u.input.charCodeAt(++u.position),we(u,!0,v),Nt(u,v,a,!1,!0),W=u.result),P?Ot(u,w,j,U,L,W,E,x,O):C?w.push(Ot(u,null,j,U,L,W,E,x,O)):w.push(L),we(u,!0,v),re=u.input.charCodeAt(u.position),re===44?($=!0,re=u.input.charCodeAt(++u.position)):$=!1}H(u,"unexpected end of the stream within a flow collection")}function Gi(u,v){let $,E=p,x=!1,O=!1,h=v,w=0,I=!1,k,C=u.input.charCodeAt(u.position);if(C===124)$=!1;else if(C===62)$=!0;else return!1;for(u.kind="scalar",u.result="";C!==0;)if(C=u.input.charCodeAt(++u.position),C===43||C===45)p===E?E=C===43?m:d:H(u,"repeat of a chomping mode identifier");else if((k=ke(C))>=0)k===0?H(u,"bad explicit indentation width of a block scalar; it cannot be less than one"):O?H(u,"repeat of an indentation width identifier"):(h=v+k-1,O=!0);else break;if(T(C)){do C=u.input.charCodeAt(++u.position);while(T(C));if(C===35)do C=u.input.charCodeAt(++u.position);while(!A(C)&&C!==0)}for(;C!==0;){for(Lr(u),u.lineIndent=0,C=u.input.charCodeAt(u.position);(!O||u.lineIndent<h)&&C===32;)u.lineIndent++,C=u.input.charCodeAt(++u.position);if(!O&&u.lineIndent>h&&(h=u.lineIndent),A(C)){w++;continue}if(!O&&h===0&&H(u,"missing indentation for block scalar"),u.lineIndent<h){E===m?u.result+=r.repeat(`
39
39
  `,x?1+w:w):E===p&&x&&(u.result+=`
40
- `);break}$?T(C)?(R=!0,u.result+=r.repeat(`
41
- `,x?1+w:w)):R?(R=!1,u.result+=r.repeat(`
40
+ `);break}$?T(C)?(I=!0,u.result+=r.repeat(`
41
+ `,x?1+w:w)):I?(I=!1,u.result+=r.repeat(`
42
42
  `,w+1)):w===0?x&&(u.result+=" "):u.result+=r.repeat(`
43
43
  `,w):u.result+=r.repeat(`
44
- `,x?1+w:w),x=!0,O=!0,w=0;let I=u.position;for(;!A(C)&&C!==0;)C=u.input.charCodeAt(++u.position);ze(u,I,u.position,!1)}return!0}function At(u,v){let $=u.tag,E=u.anchor,x=[],O=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&It(u,u.anchor,x);let h=u.input.charCodeAt(u.position);for(;h!==0&&(u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,H(u,"tab characters must not be used in indentation")),!(h!==45||!V(u.input.charCodeAt(u.position+1))));){if(O=!0,u.position++,we(u,!0,-1)&&u.lineIndent<=v){x.push(null),h=u.input.charCodeAt(u.position);continue}let w=u.line;if(Tt(u,v,l,!1,!0),x.push(u.result),we(u,!0,-1),h=u.input.charCodeAt(u.position),(u.line===w||u.lineIndent>v)&&h!==0)H(u,"bad indentation of a sequence entry");else if(u.lineIndent<v)break}return O?(u.tag=$,u.anchor=E,u.kind="sequence",u.result=x,!0):!1}function zi(u,v,$){let E,x,O,h,w=u.tag,R=u.anchor,k={},C=Object.create(null),I=null,P=null,j=null,L=!1,U=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&It(u,u.anchor,k);let W=u.input.charCodeAt(u.position);for(;W!==0;){!L&&u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,H(u,"tab characters must not be used in indentation"));let re=u.input.charCodeAt(u.position+1),ve=u.line;if((W===63||W===58)&&V(re))W===63?(L&&(Rt(u,k,C,I,P,null,x,O,h),I=P=j=null),U=!0,L=!0,E=!0):L?(L=!1,E=!0):H(u,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),u.position+=1,W=re;else{if(x=u.line,O=u.lineStart,h=u.position,!Tt(u,$,c,!1,!0))break;if(u.line===ve){for(W=u.input.charCodeAt(u.position);T(W);)W=u.input.charCodeAt(++u.position);if(W===58)W=u.input.charCodeAt(++u.position),V(W)||H(u,"a whitespace character is expected after the key-value separator within a block mapping"),L&&(Rt(u,k,C,I,P,null,x,O,h),I=P=j=null),U=!0,L=!1,E=!1,I=u.tag,P=u.result;else if(U)H(u,"can not read an implicit mapping pair; a colon is missed");else return u.tag=w,u.anchor=R,!0}else if(U)H(u,"can not read a block mapping entry; a multiline key may not be an implicit key");else return u.tag=w,u.anchor=R,!0}if((u.line===ve||u.lineIndent>v)&&(L&&(x=u.line,O=u.lineStart,h=u.position),Tt(u,v,f,!0,E)&&(L?P=u.result:j=u.result),L||(Rt(u,k,C,I,P,j,x,O,h),I=P=j=null),we(u,!0,-1),W=u.input.charCodeAt(u.position)),(u.line===ve||u.lineIndent>v)&&W!==0)H(u,"bad indentation of a mapping entry");else if(u.lineIndent<v)break}return L&&Rt(u,k,C,I,P,null,x,O,h),U&&(u.tag=w,u.anchor=R,u.kind="mapping",u.result=k),U}function Ks(u){let v=!1,$=!1,E,x,O=u.input.charCodeAt(u.position);if(O!==33)return!1;u.tag!==null&&H(u,"duplication of a tag property"),O=u.input.charCodeAt(++u.position),O===60?(v=!0,O=u.input.charCodeAt(++u.position)):O===33?($=!0,E="!!",O=u.input.charCodeAt(++u.position)):E="!";let h=u.position;if(v){do O=u.input.charCodeAt(++u.position);while(O!==0&&O!==62);u.position<u.length?(x=u.input.slice(h,u.position),O=u.input.charCodeAt(++u.position)):H(u,"unexpected end of the stream within a verbatim tag")}else{for(;O!==0&&!V(O);)O===33&&($?H(u,"tag suffix cannot contain exclamation marks"):(E=u.input.slice(h-1,u.position+1),b.test(E)||H(u,"named tag handle cannot contain such characters"),$=!0,h=u.position+1)),O=u.input.charCodeAt(++u.position);x=u.input.slice(h,u.position),_.test(x)&&H(u,"tag suffix cannot contain flow indicator characters")}x&&!M.test(x)&&H(u,"tag name cannot contain such characters: "+x);try{x=decodeURIComponent(x)}catch{H(u,"tag name is malformed: "+x)}return v?u.tag=x:s.call(u.tagMap,E)?u.tag=u.tagMap[E]+x:E==="!"?u.tag="!"+x:E==="!!"?u.tag="tag:yaml.org,2002:"+x:H(u,'undeclared tag handle "'+E+'"'),!0}function Ji(u){let v=u.input.charCodeAt(u.position);if(v!==38)return!1;u.anchor!==null&&H(u,"duplication of an anchor property"),v=u.input.charCodeAt(++u.position);let $=u.position;for(;v!==0&&!V(v)&&!X(v);)v=u.input.charCodeAt(++u.position);return u.position===$&&H(u,"name of an anchor node must contain at least one character"),u.anchor=u.input.slice($,u.position),!0}function Ki(u){let v=u.input.charCodeAt(u.position);if(v!==42)return!1;v=u.input.charCodeAt(++u.position);let $=u.position;for(;v!==0&&!V(v)&&!X(v);)v=u.input.charCodeAt(++u.position);u.position===$&&H(u,"name of an alias node must contain at least one character");let E=u.input.slice($,u.position);return s.call(u.anchorMap,E)||H(u,'unidentified alias "'+E+'"'),u.result=u.anchorMap[E],we(u,!0,-1),!0}function Ys(u,v,$,E){let x=Pn(u);return zs(u),Vr(u,v),u.tag=null,u.anchor=null,u.kind=null,u.result=null,zi(u,$,E)&&u.kind==="mapping"?(cr(u),!0):(Js(u),Vr(u,x),!1)}function Tt(u,v,$,E,x){let O,h,w=1,R=!1,k=!1,C=null,I,P,j;u.depth>=u.maxDepth&&H(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 L=O=h=f===$||l===$;if(E&&we(u,!0,-1)&&(R=!0,u.lineIndent>v?w=1:u.lineIndent===v?w=0:u.lineIndent<v&&(w=-1)),w===1)for(;;){let U=u.input.charCodeAt(u.position),W=Pn(u);if(R&&(U===33&&u.tag!==null||U===38&&u.anchor!==null)||!Ks(u)&&!Ji(u))break;C===null&&(C=W),we(u,!0,-1)?(R=!0,h=L,u.lineIndent>v?w=1:u.lineIndent===v?w=0:u.lineIndent<v&&(w=-1)):h=!1}if(h&&(h=R||x),w===1||f===$)if(a===$||c===$?P=v:P=v+1,j=u.position-u.lineStart,w===1)if(h&&(At(u,j)||zi(u,j,P))||Wi(u,P))k=!0;else{let U=u.input.charCodeAt(u.position);C!==null&&L&&!h&&U!==124&&U!==62&&Ys(u,C,C.position-C.lineStart,P)||O&&Gi(u,P)||Ui(u,P)||In(u,P)?k=!0:Ki(u)?(k=!0,(u.tag!==null||u.anchor!==null)&&H(u,"alias node should not have any properties")):Bi(u,P,a===$)&&(k=!0,u.tag===null&&(u.tag="?")),u.anchor!==null&&It(u,u.anchor,u.result)}else w===0&&(k=h&&At(u,j));if(u.tag===null)u.anchor!==null&&It(u,u.anchor,u.result);else if(u.tag==="?"){u.result!==null&&u.kind!=="scalar"&&H(u,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+u.kind+'"');for(let U=0,W=u.implicitTypes.length;U<W;U+=1)if(I=u.implicitTypes[U],I.resolve(u.result)){u.result=I.construct(u.result),u.tag=I.tag,u.anchor!==null&&It(u,u.anchor,u.result);break}}else if(u.tag!=="!"){if(s.call(u.typeMap[u.kind||"fallback"],u.tag))I=u.typeMap[u.kind||"fallback"][u.tag];else{I=null;let U=u.typeMap.multi[u.kind||"fallback"];for(let W=0,re=U.length;W<re;W+=1)if(u.tag.slice(0,U[W].tag.length)===U[W].tag){I=U[W];break}}I||H(u,"unknown tag !<"+u.tag+">"),u.result!==null&&I.kind!==u.kind&&H(u,"unacceptable node kind for !<"+u.tag+'> tag; it should be "'+I.kind+'", not "'+u.kind+'"'),I.resolve(u.result,u.tag)?(u.result=I.construct(u.result,u.tag),u.anchor!==null&&It(u,u.anchor,u.result)):H(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||k}function Xs(u){let v=u.position,$=!1,E;for(u.version=null,u.checkLineBreaks=u.legacy,u.tagMap=Object.create(null),u.anchorMap=Object.create(null);(E=u.input.charCodeAt(u.position))!==0&&(we(u,!0,-1),E=u.input.charCodeAt(u.position),!(u.lineIndent>0||E!==37));){$=!0,E=u.input.charCodeAt(++u.position);let x=u.position;for(;E!==0&&!V(E);)E=u.input.charCodeAt(++u.position);let O=u.input.slice(x,u.position),h=[];for(O.length<1&&H(u,"directive name must not be less than one character in length");E!==0;){for(;T(E);)E=u.input.charCodeAt(++u.position);if(E===35){do E=u.input.charCodeAt(++u.position);while(E!==0&&!A(E));break}if(A(E))break;for(x=u.position;E!==0&&!V(E);)E=u.input.charCodeAt(++u.position);h.push(u.input.slice(x,u.position))}E!==0&&Lr(u),s.call(Hi,O)?Hi[O](u,O,h):Mr(u,'unknown document directive "'+O+'"')}if(we(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,we(u,!0,-1)):$&&H(u,"directives end mark is expected"),Tt(u,u.lineIndent-1,f,!1,!0),we(u,!0,-1),u.checkLineBreaks&&y.test(u.input.slice(v,u.position))&&Mr(u,"non-ASCII line breaks are interpreted as content"),u.documents.push(u.result),u.position===u.lineStart&&jr(u)){u.input.charCodeAt(u.position)===46&&(u.position+=3,we(u,!0,-1));return}u.position<u.length-1&&H(u,"end of the stream or a document separator is expected")}function Yi(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 $=new ce(u,v),E=u.indexOf("\0");for(E!==-1&&($.position=E,H($,"null byte is not allowed in input")),$.input+="\0";$.input.charCodeAt($.position)===32;)$.lineIndent+=1,$.position+=1;for(;$.position<$.length-1;)Xs($);return $.documents}function Xi(u,v,$){v!==null&&typeof v=="object"&&typeof $>"u"&&($=v,v=null);let E=Yi(u,$);if(typeof v!="function")return E;for(let x=0,O=E.length;x<O;x+=1)v(E[x])}function Qs(u,v){let $=Yi(u,v);if($.length!==0){if($.length===1)return $[0];throw new n("expected a single document in the stream, but found more")}}e.exports.loadAll=Xi,e.exports.load=Qs})),Uw=de(((t,e)=>{var r=Mn(),n=Vn(),i=Ea(),o=Object.prototype.toString,s=Object.prototype.hasOwnProperty,a=65279,c=9,l=10,f=13,p=32,d=33,m=34,g=35,y=37,_=38,b=39,M=42,q=44,A=45,T=58,V=61,X=62,fe=63,Re=64,ke=91,Fe=93,Oe=96,at=123,ct=124,Pt=125,ce={};ce[0]="\\0",ce[7]="\\a",ce[8]="\\b",ce[9]="\\t",ce[10]="\\n",ce[11]="\\v",ce[12]="\\f",ce[13]="\\r",ce[27]="\\e",ce[34]='\\"',ce[92]="\\\\",ce[133]="\\N",ce[160]="\\_",ce[8232]="\\L",ce[8233]="\\P";var Fi=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],H=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Mr(h,w){if(w===null)return{};let R={},k=Object.keys(w);for(let C=0,I=k.length;C<I;C+=1){let P=k[C],j=String(w[P]);P.slice(0,2)==="!!"&&(P="tag:yaml.org,2002:"+P.slice(2));let L=h.compiledTypeMap.fallback[P];L&&s.call(L.styleAliases,j)&&(j=L.styleAliases[j]),R[P]=j}return R}function It(h){let w,R,k=h.toString(16).toUpperCase();if(h<=255)w="x",R=2;else if(h<=65535)w="u",R=4;else if(h<=4294967295)w="U",R=8;else throw new n("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+w+r.repeat("0",R-k.length)+k}var zs=1,cr=2;function Js(h){this.schema=h.schema||i,this.indent=Math.max(1,h.indent||2),this.noArrayIndent=h.noArrayIndent||!1,this.skipInvalid=h.skipInvalid||!1,this.flowLevel=r.isNothing(h.flowLevel)?-1:h.flowLevel,this.styleMap=Mr(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==='"'?cr:zs,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 Pn(h,w){let R=r.repeat(" ",w),k=0,C="",I=h.length;for(;k<I;){let P,j=h.indexOf(`
46
- `,k);j===-1?(P=h.slice(k),k=I):(P=h.slice(k,j+1),k=j+1),P.length&&P!==`
47
- `&&(C+=R),C+=P}return C}function Vr(h,w){return`
48
- `+r.repeat(" ",h.indent*w)}function Hi(h,w){for(let R=0,k=h.implicitTypes.length;R<k;R+=1)if(h.implicitTypes[R].resolve(w))return!0;return!1}function ze(h){return h===p||h===c}function zt(h){return h>=32&&h<=126||h>=161&&h<=55295&&h!==8232&&h!==8233||h>=57344&&h<=65533&&h!==a||h>=65536&&h<=1114111}function Rt(h){return zt(h)&&h!==a&&h!==f&&h!==l}function Lr(h,w,R){let k=Rt(h),C=k&&!ze(h);return(R?k:k&&h!==q&&h!==ke&&h!==Fe&&h!==at&&h!==Pt)&&h!==g&&!(w===T&&!C)||Rt(w)&&!ze(w)&&h===g||w===T&&C}function we(h){return zt(h)&&h!==a&&!ze(h)&&h!==A&&h!==fe&&h!==T&&h!==q&&h!==ke&&h!==Fe&&h!==at&&h!==Pt&&h!==g&&h!==_&&h!==M&&h!==d&&h!==ct&&h!==V&&h!==X&&h!==b&&h!==m&&h!==y&&h!==Re&&h!==Oe}function jr(h){return!ze(h)&&h!==T}function Ot(h,w){let R=h.charCodeAt(w),k;return R>=55296&&R<=56319&&w+1<h.length&&(k=h.charCodeAt(w+1),k>=56320&&k<=57343)?(R-55296)*1024+k-56320+65536:R}function Bi(h){return/^\n* /.test(h)}var Ui=1,In=2,Wi=3,Gi=4,At=5;function zi(h,w,R,k,C,I,P,j){let L,U=0,W=null,re=!1,ve=!1,dp=k!==-1,Rn=-1,On=we(Ot(h,0))&&jr(Ot(h,h.length-1));if(w||P)for(L=0;L<h.length;U>=65536?L+=2:L++){if(U=Ot(h,L),!zt(U))return At;On=On&&Lr(U,W,j),W=U}else{for(L=0;L<h.length;U>=65536?L+=2:L++){if(U=Ot(h,L),U===l)re=!0,dp&&(ve=ve||L-Rn-1>k&&h[Rn+1]!==" ",Rn=L);else if(!zt(U))return At;On=On&&Lr(U,W,j),W=U}ve=ve||dp&&L-Rn-1>k&&h[Rn+1]!==" "}return!re&&!ve?On&&!P&&!C(h)?Ui:I===cr?At:In:R>9&&Bi(h)?At:P?I===cr?At:In:ve?Gi:Wi}function Ks(h,w,R,k,C){h.dump=(function(){if(w.length===0)return h.quotingType===cr?'""':"''";if(!h.noCompatMode&&(Fi.indexOf(w)!==-1||H.test(w)))return h.quotingType===cr?'"'+w+'"':"'"+w+"'";let I=h.indent*Math.max(1,R),P=h.lineWidth===-1?-1:Math.max(Math.min(h.lineWidth,40),h.lineWidth-I),j=k||h.flowLevel>-1&&R>=h.flowLevel;function L(U){return Hi(h,U)}switch(zi(w,j,h.indent,P,L,h.quotingType,h.forceQuotes&&!k,C)){case Ui:return w;case In:return"'"+w.replace(/'/g,"''")+"'";case Wi:return"|"+Ji(w,h.indent)+Ki(Pn(w,I));case Gi:return">"+Ji(w,h.indent)+Ki(Pn(Ys(w,P),I));case At:return'"'+Xs(w,P)+'"';default:throw new n("impossible error: invalid scalar style")}})()}function Ji(h,w){let R=Bi(h)?String(w):"",k=h[h.length-1]===`
49
- `;return R+(k&&(h[h.length-2]===`
44
+ `,x?1+w:w),x=!0,O=!0,w=0;let R=u.position;for(;!A(C)&&C!==0;)C=u.input.charCodeAt(++u.position);ze(u,R,u.position,!1)}return!0}function Tt(u,v){let $=u.tag,E=u.anchor,x=[],O=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&It(u,u.anchor,x);let h=u.input.charCodeAt(u.position);for(;h!==0&&(u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,H(u,"tab characters must not be used in indentation")),!(h!==45||!V(u.input.charCodeAt(u.position+1))));){if(O=!0,u.position++,we(u,!0,-1)&&u.lineIndent<=v){x.push(null),h=u.input.charCodeAt(u.position);continue}let w=u.line;if(Nt(u,v,l,!1,!0),x.push(u.result),we(u,!0,-1),h=u.input.charCodeAt(u.position),(u.line===w||u.lineIndent>v)&&h!==0)H(u,"bad indentation of a sequence entry");else if(u.lineIndent<v)break}return O?(u.tag=$,u.anchor=E,u.kind="sequence",u.result=x,!0):!1}function zi(u,v,$){let E,x,O,h,w=u.tag,I=u.anchor,k={},C=Object.create(null),R=null,P=null,j=null,L=!1,U=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&It(u,u.anchor,k);let W=u.input.charCodeAt(u.position);for(;W!==0;){!L&&u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,H(u,"tab characters must not be used in indentation"));let re=u.input.charCodeAt(u.position+1),ve=u.line;if((W===63||W===58)&&V(re))W===63?(L&&(Ot(u,k,C,R,P,null,x,O,h),R=P=j=null),U=!0,L=!0,E=!0):L?(L=!1,E=!0):H(u,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),u.position+=1,W=re;else{if(x=u.line,O=u.lineStart,h=u.position,!Nt(u,$,c,!1,!0))break;if(u.line===ve){for(W=u.input.charCodeAt(u.position);T(W);)W=u.input.charCodeAt(++u.position);if(W===58)W=u.input.charCodeAt(++u.position),V(W)||H(u,"a whitespace character is expected after the key-value separator within a block mapping"),L&&(Ot(u,k,C,R,P,null,x,O,h),R=P=j=null),U=!0,L=!1,E=!1,R=u.tag,P=u.result;else if(U)H(u,"can not read an implicit mapping pair; a colon is missed");else return u.tag=w,u.anchor=I,!0}else if(U)H(u,"can not read a block mapping entry; a multiline key may not be an implicit key");else return u.tag=w,u.anchor=I,!0}if((u.line===ve||u.lineIndent>v)&&(L&&(x=u.line,O=u.lineStart,h=u.position),Nt(u,v,f,!0,E)&&(L?P=u.result:j=u.result),L||(Ot(u,k,C,R,P,j,x,O,h),R=P=j=null),we(u,!0,-1),W=u.input.charCodeAt(u.position)),(u.line===ve||u.lineIndent>v)&&W!==0)H(u,"bad indentation of a mapping entry");else if(u.lineIndent<v)break}return L&&Ot(u,k,C,R,P,null,x,O,h),U&&(u.tag=w,u.anchor=I,u.kind="mapping",u.result=k),U}function Ys(u){let v=!1,$=!1,E,x,O=u.input.charCodeAt(u.position);if(O!==33)return!1;u.tag!==null&&H(u,"duplication of a tag property"),O=u.input.charCodeAt(++u.position),O===60?(v=!0,O=u.input.charCodeAt(++u.position)):O===33?($=!0,E="!!",O=u.input.charCodeAt(++u.position)):E="!";let h=u.position;if(v){do O=u.input.charCodeAt(++u.position);while(O!==0&&O!==62);u.position<u.length?(x=u.input.slice(h,u.position),O=u.input.charCodeAt(++u.position)):H(u,"unexpected end of the stream within a verbatim tag")}else{for(;O!==0&&!V(O);)O===33&&($?H(u,"tag suffix cannot contain exclamation marks"):(E=u.input.slice(h-1,u.position+1),b.test(E)||H(u,"named tag handle cannot contain such characters"),$=!0,h=u.position+1)),O=u.input.charCodeAt(++u.position);x=u.input.slice(h,u.position),_.test(x)&&H(u,"tag suffix cannot contain flow indicator characters")}x&&!M.test(x)&&H(u,"tag name cannot contain such characters: "+x);try{x=decodeURIComponent(x)}catch{H(u,"tag name is malformed: "+x)}return v?u.tag=x:s.call(u.tagMap,E)?u.tag=u.tagMap[E]+x:E==="!"?u.tag="!"+x:E==="!!"?u.tag="tag:yaml.org,2002:"+x:H(u,'undeclared tag handle "'+E+'"'),!0}function Ji(u){let v=u.input.charCodeAt(u.position);if(v!==38)return!1;u.anchor!==null&&H(u,"duplication of an anchor property"),v=u.input.charCodeAt(++u.position);let $=u.position;for(;v!==0&&!V(v)&&!X(v);)v=u.input.charCodeAt(++u.position);return u.position===$&&H(u,"name of an anchor node must contain at least one character"),u.anchor=u.input.slice($,u.position),!0}function Ki(u){let v=u.input.charCodeAt(u.position);if(v!==42)return!1;v=u.input.charCodeAt(++u.position);let $=u.position;for(;v!==0&&!V(v)&&!X(v);)v=u.input.charCodeAt(++u.position);u.position===$&&H(u,"name of an alias node must contain at least one character");let E=u.input.slice($,u.position);return s.call(u.anchorMap,E)||H(u,'unidentified alias "'+E+'"'),u.result=u.anchorMap[E],we(u,!0,-1),!0}function Xs(u,v,$,E){let x=Pn(u);return Js(u),Vr(u,v),u.tag=null,u.anchor=null,u.kind=null,u.result=null,zi(u,$,E)&&u.kind==="mapping"?(cr(u),!0):(Ks(u),Vr(u,x),!1)}function Nt(u,v,$,E,x){let O,h,w=1,I=!1,k=!1,C=null,R,P,j;u.depth>=u.maxDepth&&H(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 L=O=h=f===$||l===$;if(E&&we(u,!0,-1)&&(I=!0,u.lineIndent>v?w=1:u.lineIndent===v?w=0:u.lineIndent<v&&(w=-1)),w===1)for(;;){let U=u.input.charCodeAt(u.position),W=Pn(u);if(I&&(U===33&&u.tag!==null||U===38&&u.anchor!==null)||!Ys(u)&&!Ji(u))break;C===null&&(C=W),we(u,!0,-1)?(I=!0,h=L,u.lineIndent>v?w=1:u.lineIndent===v?w=0:u.lineIndent<v&&(w=-1)):h=!1}if(h&&(h=I||x),w===1||f===$)if(a===$||c===$?P=v:P=v+1,j=u.position-u.lineStart,w===1)if(h&&(Tt(u,j)||zi(u,j,P))||Wi(u,P))k=!0;else{let U=u.input.charCodeAt(u.position);C!==null&&L&&!h&&U!==124&&U!==62&&Xs(u,C,C.position-C.lineStart,P)||O&&Gi(u,P)||Ui(u,P)||Rn(u,P)?k=!0:Ki(u)?(k=!0,(u.tag!==null||u.anchor!==null)&&H(u,"alias node should not have any properties")):Bi(u,P,a===$)&&(k=!0,u.tag===null&&(u.tag="?")),u.anchor!==null&&It(u,u.anchor,u.result)}else w===0&&(k=h&&Tt(u,j));if(u.tag===null)u.anchor!==null&&It(u,u.anchor,u.result);else if(u.tag==="?"){u.result!==null&&u.kind!=="scalar"&&H(u,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+u.kind+'"');for(let U=0,W=u.implicitTypes.length;U<W;U+=1)if(R=u.implicitTypes[U],R.resolve(u.result)){u.result=R.construct(u.result),u.tag=R.tag,u.anchor!==null&&It(u,u.anchor,u.result);break}}else if(u.tag!=="!"){if(s.call(u.typeMap[u.kind||"fallback"],u.tag))R=u.typeMap[u.kind||"fallback"][u.tag];else{R=null;let U=u.typeMap.multi[u.kind||"fallback"];for(let W=0,re=U.length;W<re;W+=1)if(u.tag.slice(0,U[W].tag.length)===U[W].tag){R=U[W];break}}R||H(u,"unknown tag !<"+u.tag+">"),u.result!==null&&R.kind!==u.kind&&H(u,"unacceptable node kind for !<"+u.tag+'> tag; it should be "'+R.kind+'", not "'+u.kind+'"'),R.resolve(u.result,u.tag)?(u.result=R.construct(u.result,u.tag),u.anchor!==null&&It(u,u.anchor,u.result)):H(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||k}function Qs(u){let v=u.position,$=!1,E;for(u.version=null,u.checkLineBreaks=u.legacy,u.tagMap=Object.create(null),u.anchorMap=Object.create(null);(E=u.input.charCodeAt(u.position))!==0&&(we(u,!0,-1),E=u.input.charCodeAt(u.position),!(u.lineIndent>0||E!==37));){$=!0,E=u.input.charCodeAt(++u.position);let x=u.position;for(;E!==0&&!V(E);)E=u.input.charCodeAt(++u.position);let O=u.input.slice(x,u.position),h=[];for(O.length<1&&H(u,"directive name must not be less than one character in length");E!==0;){for(;T(E);)E=u.input.charCodeAt(++u.position);if(E===35){do E=u.input.charCodeAt(++u.position);while(E!==0&&!A(E));break}if(A(E))break;for(x=u.position;E!==0&&!V(E);)E=u.input.charCodeAt(++u.position);h.push(u.input.slice(x,u.position))}E!==0&&Lr(u),s.call(Hi,O)?Hi[O](u,O,h):Mr(u,'unknown document directive "'+O+'"')}if(we(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,we(u,!0,-1)):$&&H(u,"directives end mark is expected"),Nt(u,u.lineIndent-1,f,!1,!0),we(u,!0,-1),u.checkLineBreaks&&y.test(u.input.slice(v,u.position))&&Mr(u,"non-ASCII line breaks are interpreted as content"),u.documents.push(u.result),u.position===u.lineStart&&jr(u)){u.input.charCodeAt(u.position)===46&&(u.position+=3,we(u,!0,-1));return}u.position<u.length-1&&H(u,"end of the stream or a document separator is expected")}function Yi(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 $=new ce(u,v),E=u.indexOf("\0");for(E!==-1&&($.position=E,H($,"null byte is not allowed in input")),$.input+="\0";$.input.charCodeAt($.position)===32;)$.lineIndent+=1,$.position+=1;for(;$.position<$.length-1;)Qs($);return $.documents}function Xi(u,v,$){v!==null&&typeof v=="object"&&typeof $>"u"&&($=v,v=null);let E=Yi(u,$);if(typeof v!="function")return E;for(let x=0,O=E.length;x<O;x+=1)v(E[x])}function Zs(u,v){let $=Yi(u,v);if($.length!==0){if($.length===1)return $[0];throw new n("expected a single document in the stream, but found more")}}e.exports.loadAll=Xi,e.exports.load=Zs})),Kw=de(((t,e)=>{var r=Mn(),n=Vn(),i=Pa(),o=Object.prototype.toString,s=Object.prototype.hasOwnProperty,a=65279,c=9,l=10,f=13,p=32,d=33,m=34,g=35,y=37,_=38,b=39,M=42,q=44,A=45,T=58,V=61,X=62,fe=63,Ie=64,ke=91,Fe=93,Oe=96,at=123,ct=124,Rt=125,ce={};ce[0]="\\0",ce[7]="\\a",ce[8]="\\b",ce[9]="\\t",ce[10]="\\n",ce[11]="\\v",ce[12]="\\f",ce[13]="\\r",ce[27]="\\e",ce[34]='\\"',ce[92]="\\\\",ce[133]="\\N",ce[160]="\\_",ce[8232]="\\L",ce[8233]="\\P";var Fi=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],H=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Mr(h,w){if(w===null)return{};let I={},k=Object.keys(w);for(let C=0,R=k.length;C<R;C+=1){let P=k[C],j=String(w[P]);P.slice(0,2)==="!!"&&(P="tag:yaml.org,2002:"+P.slice(2));let L=h.compiledTypeMap.fallback[P];L&&s.call(L.styleAliases,j)&&(j=L.styleAliases[j]),I[P]=j}return I}function It(h){let w,I,k=h.toString(16).toUpperCase();if(h<=255)w="x",I=2;else if(h<=65535)w="u",I=4;else if(h<=4294967295)w="U",I=8;else throw new n("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+w+r.repeat("0",I-k.length)+k}var Js=1,cr=2;function Ks(h){this.schema=h.schema||i,this.indent=Math.max(1,h.indent||2),this.noArrayIndent=h.noArrayIndent||!1,this.skipInvalid=h.skipInvalid||!1,this.flowLevel=r.isNothing(h.flowLevel)?-1:h.flowLevel,this.styleMap=Mr(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==='"'?cr:Js,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 Pn(h,w){let I=r.repeat(" ",w),k=0,C="",R=h.length;for(;k<R;){let P,j=h.indexOf(`
46
+ `,k);j===-1?(P=h.slice(k),k=R):(P=h.slice(k,j+1),k=j+1),P.length&&P!==`
47
+ `&&(C+=I),C+=P}return C}function Vr(h,w){return`
48
+ `+r.repeat(" ",h.indent*w)}function Hi(h,w){for(let I=0,k=h.implicitTypes.length;I<k;I+=1)if(h.implicitTypes[I].resolve(w))return!0;return!1}function ze(h){return h===p||h===c}function zt(h){return h>=32&&h<=126||h>=161&&h<=55295&&h!==8232&&h!==8233||h>=57344&&h<=65533&&h!==a||h>=65536&&h<=1114111}function Ot(h){return zt(h)&&h!==a&&h!==f&&h!==l}function Lr(h,w,I){let k=Ot(h),C=k&&!ze(h);return(I?k:k&&h!==q&&h!==ke&&h!==Fe&&h!==at&&h!==Rt)&&h!==g&&!(w===T&&!C)||Ot(w)&&!ze(w)&&h===g||w===T&&C}function we(h){return zt(h)&&h!==a&&!ze(h)&&h!==A&&h!==fe&&h!==T&&h!==q&&h!==ke&&h!==Fe&&h!==at&&h!==Rt&&h!==g&&h!==_&&h!==M&&h!==d&&h!==ct&&h!==V&&h!==X&&h!==b&&h!==m&&h!==y&&h!==Ie&&h!==Oe}function jr(h){return!ze(h)&&h!==T}function At(h,w){let I=h.charCodeAt(w),k;return I>=55296&&I<=56319&&w+1<h.length&&(k=h.charCodeAt(w+1),k>=56320&&k<=57343)?(I-55296)*1024+k-56320+65536:I}function Bi(h){return/^\n* /.test(h)}var Ui=1,Rn=2,Wi=3,Gi=4,Tt=5;function zi(h,w,I,k,C,R,P,j){let L,U=0,W=null,re=!1,ve=!1,hp=k!==-1,In=-1,On=we(At(h,0))&&jr(At(h,h.length-1));if(w||P)for(L=0;L<h.length;U>=65536?L+=2:L++){if(U=At(h,L),!zt(U))return Tt;On=On&&Lr(U,W,j),W=U}else{for(L=0;L<h.length;U>=65536?L+=2:L++){if(U=At(h,L),U===l)re=!0,hp&&(ve=ve||L-In-1>k&&h[In+1]!==" ",In=L);else if(!zt(U))return Tt;On=On&&Lr(U,W,j),W=U}ve=ve||hp&&L-In-1>k&&h[In+1]!==" "}return!re&&!ve?On&&!P&&!C(h)?Ui:R===cr?Tt:Rn:I>9&&Bi(h)?Tt:P?R===cr?Tt:Rn:ve?Gi:Wi}function Ys(h,w,I,k,C){h.dump=(function(){if(w.length===0)return h.quotingType===cr?'""':"''";if(!h.noCompatMode&&(Fi.indexOf(w)!==-1||H.test(w)))return h.quotingType===cr?'"'+w+'"':"'"+w+"'";let R=h.indent*Math.max(1,I),P=h.lineWidth===-1?-1:Math.max(Math.min(h.lineWidth,40),h.lineWidth-R),j=k||h.flowLevel>-1&&I>=h.flowLevel;function L(U){return Hi(h,U)}switch(zi(w,j,h.indent,P,L,h.quotingType,h.forceQuotes&&!k,C)){case Ui:return w;case Rn:return"'"+w.replace(/'/g,"''")+"'";case Wi:return"|"+Ji(w,h.indent)+Ki(Pn(w,R));case Gi:return">"+Ji(w,h.indent)+Ki(Pn(Xs(w,P),R));case Tt:return'"'+Qs(w,P)+'"';default:throw new n("impossible error: invalid scalar style")}})()}function Ji(h,w){let I=Bi(h)?String(w):"",k=h[h.length-1]===`
49
+ `;return I+(k&&(h[h.length-2]===`
50
50
  `||h===`
51
51
  `)?"+":k?"":"-")+`
52
52
  `}function Ki(h){return h[h.length-1]===`
53
- `?h.slice(0,-1):h}function Ys(h,w){let R=/(\n+)([^\n]*)/g,k=(function(){let j=h.indexOf(`
54
- `);return j=j!==-1?j:h.length,R.lastIndex=j,Tt(h.slice(0,j),w)})(),C=h[0]===`
55
- `||h[0]===" ",I,P;for(;P=R.exec(h);){let j=P[1],L=P[2];I=L[0]===" ",k+=j+(!C&&!I&&L!==""?`
56
- `:"")+Tt(L,w),C=I}return k}function Tt(h,w){if(h===""||h[0]===" ")return h;let R=/ [^ ]/g,k,C=0,I,P=0,j=0,L="";for(;k=R.exec(h);)j=k.index,j-C>w&&(I=P>C?P:j,L+=`
57
- `+h.slice(C,I),C=I+1),P=j;return L+=`
53
+ `?h.slice(0,-1):h}function Xs(h,w){let I=/(\n+)([^\n]*)/g,k=(function(){let j=h.indexOf(`
54
+ `);return j=j!==-1?j:h.length,I.lastIndex=j,Nt(h.slice(0,j),w)})(),C=h[0]===`
55
+ `||h[0]===" ",R,P;for(;P=I.exec(h);){let j=P[1],L=P[2];R=L[0]===" ",k+=j+(!C&&!R&&L!==""?`
56
+ `:"")+Nt(L,w),C=R}return k}function Nt(h,w){if(h===""||h[0]===" ")return h;let I=/ [^ ]/g,k,C=0,R,P=0,j=0,L="";for(;k=I.exec(h);)j=k.index,j-C>w&&(R=P>C?P:j,L+=`
57
+ `+h.slice(C,R),C=R+1),P=j;return L+=`
58
58
  `,h.length-C>w&&P>C?L+=h.slice(C,P)+`
59
- `+h.slice(P+1):L+=h.slice(C),L.slice(1)}function Xs(h){let w="",R=0;for(let k=0;k<h.length;R>=65536?k+=2:k++){R=Ot(h,k);let C=ce[R];!C&&zt(R)?(w+=h[k],R>=65536&&(w+=h[k+1])):w+=C||It(R)}return w}function Yi(h,w,R){let k="",C=h.tag;for(let I=0,P=R.length;I<P;I+=1){let j=R[I];h.replacer&&(j=h.replacer.call(R,String(I),j)),($(h,w,j,!1,!1)||typeof j>"u"&&$(h,w,null,!1,!1))&&(k!==""&&(k+=","+(h.condenseFlow?"":" ")),k+=h.dump)}h.tag=C,h.dump="["+k+"]"}function Xi(h,w,R,k){let C="",I=h.tag;for(let P=0,j=R.length;P<j;P+=1){let L=R[P];h.replacer&&(L=h.replacer.call(R,String(P),L)),($(h,w+1,L,!0,!0,!1,!0)||typeof L>"u"&&$(h,w+1,null,!0,!0,!1,!0))&&((!k||C!=="")&&(C+=Vr(h,w)),h.dump&&l===h.dump.charCodeAt(0)?C+="-":C+="- ",C+=h.dump)}h.tag=I,h.dump=C||"[]"}function Qs(h,w,R){let k="",C=h.tag,I=Object.keys(R);for(let P=0,j=I.length;P<j;P+=1){let L="";k!==""&&(L+=", "),h.condenseFlow&&(L+='"');let U=I[P],W=R[U];h.replacer&&(W=h.replacer.call(R,U,W)),$(h,w,U,!1,!1)&&(h.dump.length>1024&&(L+="? "),L+=h.dump+(h.condenseFlow?'"':"")+":"+(h.condenseFlow?"":" "),$(h,w,W,!1,!1)&&(L+=h.dump,k+=L))}h.tag=C,h.dump="{"+k+"}"}function u(h,w,R,k){let C="",I=h.tag,P=Object.keys(R);if(h.sortKeys===!0)P.sort();else if(typeof h.sortKeys=="function")P.sort(h.sortKeys);else if(h.sortKeys)throw new n("sortKeys must be a boolean or a function");for(let j=0,L=P.length;j<L;j+=1){let U="";(!k||C!=="")&&(U+=Vr(h,w));let W=P[j],re=R[W];if(h.replacer&&(re=h.replacer.call(R,W,re)),!$(h,w+1,W,!0,!0,!0))continue;let ve=h.tag!==null&&h.tag!=="?"||h.dump&&h.dump.length>1024;ve&&(h.dump&&l===h.dump.charCodeAt(0)?U+="?":U+="? "),U+=h.dump,ve&&(U+=Vr(h,w)),$(h,w+1,re,!0,ve)&&(h.dump&&l===h.dump.charCodeAt(0)?U+=":":U+=": ",U+=h.dump,C+=U)}h.tag=I,h.dump=C||"{}"}function v(h,w,R){let k=R?h.explicitTypes:h.implicitTypes;for(let C=0,I=k.length;C<I;C+=1){let P=k[C];if((P.instanceOf||P.predicate)&&(!P.instanceOf||typeof w=="object"&&w instanceof P.instanceOf)&&(!P.predicate||P.predicate(w))){if(R?P.multi&&P.representName?h.tag=P.representName(w):h.tag=P.tag:h.tag="?",P.represent){let j=h.styleMap[P.tag]||P.defaultStyle,L;if(o.call(P.represent)==="[object Function]")L=P.represent(w,j);else if(s.call(P.represent,j))L=P.represent[j](w,j);else throw new n("!<"+P.tag+'> tag resolver accepts not "'+j+'" style');h.dump=L}return!0}}return!1}function $(h,w,R,k,C,I,P){h.tag=null,h.dump=R,v(h,R,!1)||v(h,R,!0);let j=o.call(h.dump),L=k;k&&(k=h.flowLevel<0||h.flowLevel>w);let U=j==="[object Object]"||j==="[object Array]",W,re;if(U&&(W=h.duplicates.indexOf(R),re=W!==-1),(h.tag!==null&&h.tag!=="?"||re||h.indent!==2&&w>0)&&(C=!1),re&&h.usedDuplicates[W])h.dump="*ref_"+W;else{if(U&&re&&!h.usedDuplicates[W]&&(h.usedDuplicates[W]=!0),j==="[object Object]")k&&Object.keys(h.dump).length!==0?(u(h,w,h.dump,C),re&&(h.dump="&ref_"+W+h.dump)):(Qs(h,w,h.dump),re&&(h.dump="&ref_"+W+" "+h.dump));else if(j==="[object Array]")k&&h.dump.length!==0?(h.noArrayIndent&&!P&&w>0?Xi(h,w-1,h.dump,C):Xi(h,w,h.dump,C),re&&(h.dump="&ref_"+W+h.dump)):(Yi(h,w,h.dump),re&&(h.dump="&ref_"+W+" "+h.dump));else if(j==="[object String]")h.tag!=="?"&&Ks(h,h.dump,w,I,L);else{if(j==="[object Undefined]")return!1;if(h.skipInvalid)return!1;throw new n("unacceptable kind of an object to dump "+j)}if(h.tag!==null&&h.tag!=="?"){let ve=encodeURI(h.tag[0]==="!"?h.tag.slice(1):h.tag).replace(/!/g,"%21");h.tag[0]==="!"?ve="!"+ve:ve.slice(0,18)==="tag:yaml.org,2002:"?ve="!!"+ve.slice(18):ve="!<"+ve+">",h.dump=ve+" "+h.dump}}return!0}function E(h,w){let R=[],k=[];x(h,R,k);let C=k.length;for(let I=0;I<C;I+=1)w.duplicates.push(R[k[I]]);w.usedDuplicates=new Array(C)}function x(h,w,R){if(h!==null&&typeof h=="object"){let k=w.indexOf(h);if(k!==-1)R.indexOf(k)===-1&&R.push(k);else if(w.push(h),Array.isArray(h))for(let C=0,I=h.length;C<I;C+=1)x(h[C],w,R);else{let C=Object.keys(h);for(let I=0,P=C.length;I<P;I+=1)x(h[C[I]],w,R)}}}function O(h,w){w=w||{};let R=new Js(w);R.noRefs||E(h,R);let k=h;return R.replacer&&(k=R.replacer.call({"":k},"",k)),$(R,0,k,!0,!0)?R.dump+`
60
- `:""}e.exports.dump=O})),ff=Fw(de(((t,e)=>{var r=Bw(),n=Uw();function i(o,s){return function(){throw new Error("Function yaml."+o+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}e.exports.Type=Ve(),e.exports.Schema=Jp(),e.exports.FAILSAFE_SCHEMA=Qp(),e.exports.JSON_SCHEMA=nf(),e.exports.CORE_SCHEMA=of(),e.exports.DEFAULT_SCHEMA=Ea(),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.dump=n.dump,e.exports.YAMLException=Vn(),e.exports.types={binary:cf(),float:rf(),map:Xp(),null:Zp(),pairs:uf(),set:pf(),timestamp:sf(),bool:ef(),int:tf(),merge:af(),omap:lf(),seq:Yp(),str:Kp()},e.exports.safeLoad=i("safeLoad","load"),e.exports.safeLoadAll=i("safeLoadAll","loadAll"),e.exports.safeDump=i("safeDump","dump")}))(),1),{Type:eR,Schema:tR,FAILSAFE_SCHEMA:rR,JSON_SCHEMA:nR,CORE_SCHEMA:iR,DEFAULT_SCHEMA:oR,load:sR,loadAll:aR,dump:cR,YAMLException:lR,types:uR,safeLoad:pR,safeLoadAll:fR,safeDump:dR}=ff.default,ut=ff.default});import{access as Ww,readFile as df}from"node:fs/promises";import{dirname as hf,relative as yR,resolve as _e}from"node:path";async function Gw(t=process.cwd()){let e=_e(t);for(;;){let r=_e(e,"view-contracts.config.yaml");try{return await Ww(r),r}catch{let n=hf(e);if(n===e)return null;e=n}}}async function Jt(t){if(t)return _e(t);let e=await Gw();if(!e)throw new Error("view-contracts.config.yaml not found. Pass -c <path> or run from a project directory.");return e}async function He(t){let e=_e(t),r=await df(e,"utf-8"),n=ut.load(r);return zw(e,n)}function zw(t,e){let r=he(t);return{...e,openapi:_e(r,e.openapi),bindings:_e(r,e.bindings),microContractsConfig:_e(r,e.microContractsConfig),viewsDir:_e(r,e.viewsDir),generated:{contractDir:_e(r,e.generated.contractDir),actions:_e(r,e.generated.actions),bridge:_e(r,e.generated.bridge),reactDir:_e(r,e.generated.reactDir)},runtimeModule:e.runtimeModule?_e(r,e.runtimeModule):e.componentsModule?_e(r,e.componentsModule):void 0,themeModule:e.themeModule?_e(r,e.themeModule):void 0,design:e.design?{tokens:e.design.tokens?_e(r,e.design.tokens):void 0,theme:e.design.theme?_e(r,e.design.theme):void 0,extensionsCss:e.design.extensionsCss?_e(r,e.design.extensionsCss):void 0}:void 0,extensions:e.extensions?_e(r,e.extensions):void 0}}async function wt(t){let e=await df(_e(t),"utf-8");return ut.load(e)}function mf(t,e){return _e(t.generated.reactDir,"components",`${e.screenName}.generated.tsx`)}function he(t){return hf(_e(t))}function Kt(t){let e=t.design?.tokens,r=t.design?.theme;if(!e)throw new Error("view-contracts.config.yaml must define design.tokens (project tokens file path).");if(!r)throw new Error("view-contracts.config.yaml must define design.theme (project theme file path).");return{tokensPath:e,themePath:r}}var pt=K(()=>{"use strict";Fr()});var Dn=S(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.regexpCode=oe.getEsmExportName=oe.getProperty=oe.safeStringify=oe.stringify=oe.strConcat=oe.addCodeArg=oe.str=oe._=oe.nil=oe._Code=oe.Name=oe.IDENTIFIER=oe._CodeOrName=void 0;var Ln=class{};oe._CodeOrName=Ln;oe.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var lr=class extends Ln{constructor(e){if(super(),!oe.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}}};oe.Name=lr;var et=class extends Ln{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof lr&&(r[n.str]=(r[n.str]||0)+1),r),{})}};oe._Code=et;oe.nil=new et("");function yf(t,...e){let r=[t[0]],n=0;for(;n<e.length;)Ia(r,e[n]),r.push(t[++n]);return new et(r)}oe._=yf;var Pa=new et("+");function vf(t,...e){let r=[jn(t[0])],n=0;for(;n<e.length;)r.push(Pa),Ia(r,e[n]),r.push(Pa,jn(t[++n]));return Kw(r),new et(r)}oe.str=vf;function Ia(t,e){e instanceof et?t.push(...e._items):e instanceof lr?t.push(e):t.push(Qw(e))}oe.addCodeArg=Ia;function Kw(t){let e=1;for(;e<t.length-1;){if(t[e]===Pa){let r=Yw(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function Yw(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof lr||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 lr))return`"${t}${e.slice(1)}`}function Xw(t,e){return e.emptyStr()?t:t.emptyStr()?e:vf`${t}${e}`}oe.strConcat=Xw;function Qw(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:jn(Array.isArray(t)?t.join(","):t)}function Zw(t){return new et(jn(t))}oe.stringify=Zw;function jn(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}oe.safeStringify=jn;function e_(t){return typeof t=="string"&&oe.IDENTIFIER.test(t)?new et(`.${t}`):yf`[${t}]`}oe.getProperty=e_;function t_(t){if(typeof t=="string"&&oe.IDENTIFIER.test(t))return new et(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}oe.getEsmExportName=t_;function r_(t){return new et(t.toString())}oe.regexpCode=r_});var Aa=S(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.ValueScope=Ue.ValueScopeName=Ue.Scope=Ue.varKinds=Ue.UsedValueState=void 0;var Be=Dn(),Ra=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},oo;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(oo||(Ue.UsedValueState=oo={}));Ue.varKinds={const:new Be.Name("const"),let:new Be.Name("let"),var:new Be.Name("var")};var so=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Be.Name?e:this.name(e)}name(e){return new Be.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Ue.Scope=so;var ao=class extends Be.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,Be._)`.${new Be.Name(r)}[${n}]`}};Ue.ValueScopeName=ao;var n_=(0,Be._)`\n`,Oa=class extends so{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?n_:Be.nil}}get(){return this._scope}name(e){return new ao(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,s=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[o];if(a){let f=a.get(s);if(f)return f}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]=r.ref,i.setValue(r,{property:o,itemIndex:l}),i}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Be._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(e,r,n={},i){let o=Be.nil;for(let s in e){let a=e[s];if(!a)continue;let c=n[s]=n[s]||new Map;a.forEach(l=>{if(c.has(l))return;c.set(l,oo.Started);let f=r(l);if(f){let p=this.opts.es5?Ue.varKinds.var:Ue.varKinds.const;o=(0,Be._)`${o}${p} ${l} = ${f};${this.opts._n}`}else if(f=i?.(l))o=(0,Be._)`${o}${f}${this.opts._n}`;else throw new Ra(l);c.set(l,oo.Completed)})}return o}};Ue.ValueScope=Oa});var Y=S(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.or=Z.and=Z.not=Z.CodeGen=Z.operators=Z.varKinds=Z.ValueScopeName=Z.ValueScope=Z.Scope=Z.Name=Z.regexpCode=Z.stringify=Z.getProperty=Z.nil=Z.strConcat=Z.str=Z._=void 0;var ne=Dn(),ft=Aa(),Yt=Dn();Object.defineProperty(Z,"_",{enumerable:!0,get:function(){return Yt._}});Object.defineProperty(Z,"str",{enumerable:!0,get:function(){return Yt.str}});Object.defineProperty(Z,"strConcat",{enumerable:!0,get:function(){return Yt.strConcat}});Object.defineProperty(Z,"nil",{enumerable:!0,get:function(){return Yt.nil}});Object.defineProperty(Z,"getProperty",{enumerable:!0,get:function(){return Yt.getProperty}});Object.defineProperty(Z,"stringify",{enumerable:!0,get:function(){return Yt.stringify}});Object.defineProperty(Z,"regexpCode",{enumerable:!0,get:function(){return Yt.regexpCode}});Object.defineProperty(Z,"Name",{enumerable:!0,get:function(){return Yt.Name}});var po=Aa();Object.defineProperty(Z,"Scope",{enumerable:!0,get:function(){return po.Scope}});Object.defineProperty(Z,"ValueScope",{enumerable:!0,get:function(){return po.ValueScope}});Object.defineProperty(Z,"ValueScopeName",{enumerable:!0,get:function(){return po.ValueScopeName}});Object.defineProperty(Z,"varKinds",{enumerable:!0,get:function(){return po.varKinds}});Z.operators={GT:new ne._Code(">"),GTE:new ne._Code(">="),LT:new ne._Code("<"),LTE:new ne._Code("<="),EQ:new ne._Code("==="),NEQ:new ne._Code("!=="),NOT:new ne._Code("!"),OR:new ne._Code("||"),AND:new ne._Code("&&"),ADD:new ne._Code("+")};var Lt=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},Ta=class extends Lt{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?ft.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=Br(this.rhs,e,r)),this}get names(){return this.rhs instanceof ne._CodeOrName?this.rhs.names:{}}},co=class extends Lt{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof ne.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=Br(this.rhs,e,r),this}get names(){let e=this.lhs instanceof ne.Name?{}:{...this.lhs.names};return uo(e,this.rhs)}},Na=class extends co{constructor(e,r,n,i){super(e,n,i),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Ma=class extends Lt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Va=class extends Lt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},La=class extends Lt{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},ja=class extends Lt{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=Br(this.code,e,r),this}get names(){return this.code instanceof ne._CodeOrName?this.code.names:{}}},qn=class extends Lt{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,i=n.length;for(;i--;){let o=n[i];o.optimizeNames(e,r)||(i_(e,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>fr(e,r.names),{})}},jt=class extends qn{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Da=class extends qn{},Hr=class extends jt{};Hr.kind="else";var ur=class t extends jt{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new Hr(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(wf(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=Br(this.condition,e,r),this}get names(){let e=super.names;return uo(e,this.condition),this.else&&fr(e,this.else.names),e}};ur.kind="if";var pr=class extends jt{};pr.kind="for";var qa=class extends pr{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=Br(this.iteration,e,r),this}get names(){return fr(super.names,this.iteration.names)}},Fa=class extends pr{constructor(e,r,n,i){super(),this.varKind=e,this.name=r,this.from=n,this.to=i}render(e){let r=e.es5?ft.varKinds.var:this.varKind,{name:n,from:i,to:o}=this;return`for(${r} ${n}=${i}; ${n}<${o}; ${n}++)`+super.render(e)}get names(){let e=uo(super.names,this.from);return uo(e,this.to)}},lo=class extends pr{constructor(e,r,n,i){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=Br(this.iterable,e,r),this}get names(){return fr(super.names,this.iterable.names)}},Fn=class extends jt{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Fn.kind="func";var Hn=class extends qn{render(e){return"return "+super.render(e)}};Hn.kind="return";var Ha=class extends jt{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,i;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(i=this.finally)===null||i===void 0||i.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&fr(e,this.catch.names),this.finally&&fr(e,this.finally.names),e}},Bn=class extends jt{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Bn.kind="catch";var Un=class extends jt{render(e){return"finally"+super.render(e)}};Un.kind="finally";var Ba=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
61
- `:""},this._extScope=e,this._scope=new ft.Scope({parent:e}),this._nodes=[new Da]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,i){let o=this._scope.toName(r);return n!==void 0&&i&&(this._constants[o.str]=n),this._leafNode(new Ta(e,o,n)),o}const(e,r,n){return this._def(ft.varKinds.const,e,r,n)}let(e,r,n){return this._def(ft.varKinds.let,e,r,n)}var(e,r,n){return this._def(ft.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new co(e,r,n))}add(e,r){return this._leafNode(new Na(e,Z.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==ne.nil&&this._leafNode(new ja(e)),this}object(...e){let r=["{"];for(let[n,i]of e)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,ne.addCodeArg)(r,i));return r.push("}"),new ne._Code(r)}if(e,r,n){if(this._blockNode(new ur(e)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new ur(e))}else(){return this._elseNode(new Hr)}endIf(){return this._endBlockNode(ur,Hr)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new qa(e),r)}forRange(e,r,n,i,o=this.opts.es5?ft.varKinds.var:ft.varKinds.let){let s=this._scope.toName(e);return this._for(new Fa(o,s,r,n),()=>i(s))}forOf(e,r,n,i=ft.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let s=r instanceof ne.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,ne._)`${s}.length`,a=>{this.var(o,(0,ne._)`${s}[${a}]`),n(o)})}return this._for(new lo("of",i,o,r),()=>n(o))}forIn(e,r,n,i=this.opts.es5?ft.varKinds.var:ft.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,ne._)`Object.keys(${r})`,n);let o=this._scope.toName(e);return this._for(new lo("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(pr)}label(e){return this._leafNode(new Ma(e))}break(e){return this._leafNode(new Va(e))}return(e){let r=new Hn;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Hn)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new Ha;if(this._blockNode(i),this.code(e),r){let o=this.name("e");this._currNode=i.catch=new Bn(o),r(o)}return n&&(this._currNode=i.finally=new Un,this.code(n)),this._endBlockNode(Bn,Un)}throw(e){return this._leafNode(new La(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=ne.nil,n,i){return this._blockNode(new Fn(e,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Fn)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof ur))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};Z.CodeGen=Ba;function fr(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function uo(t,e){return e instanceof ne._CodeOrName?fr(t,e.names):t}function Br(t,e,r){if(t instanceof ne.Name)return n(t);if(!i(t))return t;return new ne._Code(t._items.reduce((o,s)=>(s instanceof ne.Name&&(s=n(s)),s instanceof ne._Code?o.push(...s._items):o.push(s),o),[]));function n(o){let s=r[o.str];return s===void 0||e[o.str]!==1?o:(delete e[o.str],s)}function i(o){return o instanceof ne._Code&&o._items.some(s=>s instanceof ne.Name&&e[s.str]===1&&r[s.str]!==void 0)}}function i_(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function wf(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,ne._)`!${Ua(t)}`}Z.not=wf;var o_=_f(Z.operators.AND);function s_(...t){return t.reduce(o_)}Z.and=s_;var a_=_f(Z.operators.OR);function c_(...t){return t.reduce(a_)}Z.or=c_;function _f(t){return(e,r)=>e===ne.nil?r:r===ne.nil?e:(0,ne._)`${Ua(e)} ${t} ${Ua(r)}`}function Ua(t){return t instanceof ne.Name?t:(0,ne._)`(${t})`}});var te=S(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.checkStrictMode=ee.getErrorPath=ee.Type=ee.useFunc=ee.setEvaluated=ee.evaluatedPropsToName=ee.mergeEvaluated=ee.eachItem=ee.unescapeJsonPointer=ee.escapeJsonPointer=ee.escapeFragment=ee.unescapeFragment=ee.schemaRefOrVal=ee.schemaHasRulesButRef=ee.schemaHasRules=ee.checkUnknownRules=ee.alwaysValidSchema=ee.toHash=void 0;var ue=Y(),l_=Dn();function u_(t){let e={};for(let r of t)e[r]=!0;return e}ee.toHash=u_;function p_(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(xf(t,e),!$f(e,t.self.RULES.all))}ee.alwaysValidSchema=p_;function xf(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let i=n.RULES.keywords;for(let o in e)i[o]||Ef(t,`unknown keyword: "${o}"`)}ee.checkUnknownRules=xf;function $f(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}ee.schemaHasRules=$f;function f_(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}ee.schemaHasRulesButRef=f_;function d_({topSchemaRef:t,schemaPath:e},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,ue._)`${r}`}return(0,ue._)`${t}${e}${(0,ue.getProperty)(n)}`}ee.schemaRefOrVal=d_;function h_(t){return kf(decodeURIComponent(t))}ee.unescapeFragment=h_;function m_(t){return encodeURIComponent(Ga(t))}ee.escapeFragment=m_;function Ga(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}ee.escapeJsonPointer=Ga;function kf(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}ee.unescapeJsonPointer=kf;function g_(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}ee.eachItem=g_;function bf({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(i,o,s,a)=>{let c=s===void 0?o:s instanceof ue.Name?(o instanceof ue.Name?t(i,o,s):e(i,o,s),s):o instanceof ue.Name?(e(i,s,o),o):r(o,s);return a===ue.Name&&!(c instanceof ue.Name)?n(i,c):c}}ee.mergeEvaluated={props:bf({mergeNames:(t,e,r)=>t.if((0,ue._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,ue._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,ue._)`${r} || {}`).code((0,ue._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,ue._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,ue._)`${r} || {}`),za(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Cf}),items:bf({mergeNames:(t,e,r)=>t.if((0,ue._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,ue._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,ue._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,ue._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Cf(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,ue._)`{}`);return e!==void 0&&za(t,r,e),r}ee.evaluatedPropsToName=Cf;function za(t,e,r){Object.keys(r).forEach(n=>t.assign((0,ue._)`${e}${(0,ue.getProperty)(n)}`,!0))}ee.setEvaluated=za;var Sf={};function y_(t,e){return t.scopeValue("func",{ref:e,code:Sf[e.code]||(Sf[e.code]=new l_._Code(e.code))})}ee.useFunc=y_;var Wa;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(Wa||(ee.Type=Wa={}));function v_(t,e,r){if(t instanceof ue.Name){let n=e===Wa.Num;return r?n?(0,ue._)`"[" + ${t} + "]"`:(0,ue._)`"['" + ${t} + "']"`:n?(0,ue._)`"/" + ${t}`:(0,ue._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,ue.getProperty)(t).toString():"/"+Ga(t)}ee.getErrorPath=v_;function Ef(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}ee.checkStrictMode=Ef});var tt=S(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});var Ae=Y(),w_={data:new Ae.Name("data"),valCxt:new Ae.Name("valCxt"),instancePath:new Ae.Name("instancePath"),parentData:new Ae.Name("parentData"),parentDataProperty:new Ae.Name("parentDataProperty"),rootData:new Ae.Name("rootData"),dynamicAnchors:new Ae.Name("dynamicAnchors"),vErrors:new Ae.Name("vErrors"),errors:new Ae.Name("errors"),this:new Ae.Name("this"),self:new Ae.Name("self"),scope:new Ae.Name("scope"),json:new Ae.Name("json"),jsonPos:new Ae.Name("jsonPos"),jsonLen:new Ae.Name("jsonLen"),jsonPart:new Ae.Name("jsonPart")};Ja.default=w_});var Wn=S(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.extendErrors=Te.resetErrorsCount=Te.reportExtraError=Te.reportError=Te.keyword$DataError=Te.keywordError=void 0;var ie=Y(),fo=te(),Le=tt();Te.keywordError={message:({keyword:t})=>(0,ie.str)`must pass "${t}" keyword validation`};Te.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,ie.str)`"${t}" keyword must be ${e} ($data)`:(0,ie.str)`"${t}" keyword is invalid ($data)`};function __(t,e=Te.keywordError,r,n){let{it:i}=t,{gen:o,compositeRule:s,allErrors:a}=i,c=Rf(t,e,r);n??(s||a)?Pf(o,c):If(i,(0,ie._)`[${c}]`)}Te.reportError=__;function b_(t,e=Te.keywordError,r){let{it:n}=t,{gen:i,compositeRule:o,allErrors:s}=n,a=Rf(t,e,r);Pf(i,a),o||s||If(n,Le.default.vErrors)}Te.reportExtraError=b_;function S_(t,e){t.assign(Le.default.errors,e),t.if((0,ie._)`${Le.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,ie._)`${Le.default.vErrors}.length`,e),()=>t.assign(Le.default.vErrors,null)))}Te.resetErrorsCount=S_;function x_({gen:t,keyword:e,schemaValue:r,data:n,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let s=t.name("err");t.forRange("i",i,Le.default.errors,a=>{t.const(s,(0,ie._)`${Le.default.vErrors}[${a}]`),t.if((0,ie._)`${s}.instancePath === undefined`,()=>t.assign((0,ie._)`${s}.instancePath`,(0,ie.strConcat)(Le.default.instancePath,o.errorPath))),t.assign((0,ie._)`${s}.schemaPath`,(0,ie.str)`${o.errSchemaPath}/${e}`),o.opts.verbose&&(t.assign((0,ie._)`${s}.schema`,r),t.assign((0,ie._)`${s}.data`,n))})}Te.extendErrors=x_;function Pf(t,e){let r=t.const("err",e);t.if((0,ie._)`${Le.default.vErrors} === null`,()=>t.assign(Le.default.vErrors,(0,ie._)`[${r}]`),(0,ie._)`${Le.default.vErrors}.push(${r})`),t.code((0,ie._)`${Le.default.errors}++`)}function If(t,e){let{gen:r,validateName:n,schemaEnv:i}=t;i.$async?r.throw((0,ie._)`new ${t.ValidationError}(${e})`):(r.assign((0,ie._)`${n}.errors`,e),r.return(!1))}var dr={keyword:new ie.Name("keyword"),schemaPath:new ie.Name("schemaPath"),params:new ie.Name("params"),propertyName:new ie.Name("propertyName"),message:new ie.Name("message"),schema:new ie.Name("schema"),parentSchema:new ie.Name("parentSchema")};function Rf(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,ie._)`{}`:$_(t,e,r)}function $_(t,e,r={}){let{gen:n,it:i}=t,o=[k_(i,r),C_(t,r)];return E_(t,e,o),n.object(...o)}function k_({errorPath:t},{instancePath:e}){let r=e?(0,ie.str)`${t}${(0,fo.getErrorPath)(e,fo.Type.Str)}`:t;return[Le.default.instancePath,(0,ie.strConcat)(Le.default.instancePath,r)]}function C_({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let i=n?e:(0,ie.str)`${e}/${t}`;return r&&(i=(0,ie.str)`${i}${(0,fo.getErrorPath)(r,fo.Type.Str)}`),[dr.schemaPath,i]}function E_(t,{params:e,message:r},n){let{keyword:i,data:o,schemaValue:s,it:a}=t,{opts:c,propertyName:l,topSchemaRef:f,schemaPath:p}=a;n.push([dr.keyword,i],[dr.params,typeof e=="function"?e(t):e||(0,ie._)`{}`]),c.messages&&n.push([dr.message,typeof r=="function"?r(t):r]),c.verbose&&n.push([dr.schema,s],[dr.parentSchema,(0,ie._)`${f}${p}`],[Le.default.data,o]),l&&n.push([dr.propertyName,l])}});var Af=S(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.boolOrEmptySchema=Ur.topBoolOrEmptySchema=void 0;var P_=Wn(),I_=Y(),R_=tt(),O_={message:"boolean schema is false"};function A_(t){let{gen:e,schema:r,validateName:n}=t;r===!1?Of(t,!1):typeof r=="object"&&r.$async===!0?e.return(R_.default.data):(e.assign((0,I_._)`${n}.errors`,null),e.return(!0))}Ur.topBoolOrEmptySchema=A_;function T_(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),Of(t)):r.var(e,!0)}Ur.boolOrEmptySchema=T_;function Of(t,e){let{gen:r,data:n}=t,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,P_.reportError)(i,O_,void 0,e)}});var Ka=S(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.getRules=Wr.isJSONType=void 0;var N_=["string","number","integer","boolean","null","object","array"],M_=new Set(N_);function V_(t){return typeof t=="string"&&M_.has(t)}Wr.isJSONType=V_;function L_(){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:{}}}Wr.getRules=L_});var Ya=S(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.shouldUseRule=Xt.shouldUseGroup=Xt.schemaHasRulesForType=void 0;function j_({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&Tf(t,n)}Xt.schemaHasRulesForType=j_;function Tf(t,e){return e.rules.some(r=>Nf(t,r))}Xt.shouldUseGroup=Tf;function Nf(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}Xt.shouldUseRule=Nf});var Gn=S(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.reportTypeError=Ne.checkDataTypes=Ne.checkDataType=Ne.coerceAndCheckDataType=Ne.getJSONTypes=Ne.getSchemaTypes=Ne.DataType=void 0;var D_=Ka(),q_=Ya(),F_=Wn(),Q=Y(),Mf=te(),Gr;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(Gr||(Ne.DataType=Gr={}));function H_(t){let e=Vf(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}Ne.getSchemaTypes=H_;function Vf(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(D_.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Ne.getJSONTypes=Vf;function B_(t,e){let{gen:r,data:n,opts:i}=t,o=U_(e,i.coerceTypes),s=e.length>0&&!(o.length===0&&e.length===1&&(0,q_.schemaHasRulesForType)(t,e[0]));if(s){let a=Qa(e,n,i.strictNumbers,Gr.Wrong);r.if(a,()=>{o.length?W_(t,e,o):Za(t)})}return s}Ne.coerceAndCheckDataType=B_;var Lf=new Set(["string","number","integer","boolean","null"]);function U_(t,e){return e?t.filter(r=>Lf.has(r)||e==="array"&&r==="array"):[]}function W_(t,e,r){let{gen:n,data:i,opts:o}=t,s=n.let("dataType",(0,Q._)`typeof ${i}`),a=n.let("coerced",(0,Q._)`undefined`);o.coerceTypes==="array"&&n.if((0,Q._)`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,Q._)`${i}[0]`).assign(s,(0,Q._)`typeof ${i}`).if(Qa(e,i,o.strictNumbers),()=>n.assign(a,i))),n.if((0,Q._)`${a} !== undefined`);for(let l of r)(Lf.has(l)||l==="array"&&o.coerceTypes==="array")&&c(l);n.else(),Za(t),n.endIf(),n.if((0,Q._)`${a} !== undefined`,()=>{n.assign(i,a),G_(t,a)});function c(l){switch(l){case"string":n.elseIf((0,Q._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,Q._)`"" + ${i}`).elseIf((0,Q._)`${i} === null`).assign(a,(0,Q._)`""`);return;case"number":n.elseIf((0,Q._)`${s} == "boolean" || ${i} === null
59
+ `+h.slice(P+1):L+=h.slice(C),L.slice(1)}function Qs(h){let w="",I=0;for(let k=0;k<h.length;I>=65536?k+=2:k++){I=At(h,k);let C=ce[I];!C&&zt(I)?(w+=h[k],I>=65536&&(w+=h[k+1])):w+=C||It(I)}return w}function Yi(h,w,I){let k="",C=h.tag;for(let R=0,P=I.length;R<P;R+=1){let j=I[R];h.replacer&&(j=h.replacer.call(I,String(R),j)),($(h,w,j,!1,!1)||typeof j>"u"&&$(h,w,null,!1,!1))&&(k!==""&&(k+=","+(h.condenseFlow?"":" ")),k+=h.dump)}h.tag=C,h.dump="["+k+"]"}function Xi(h,w,I,k){let C="",R=h.tag;for(let P=0,j=I.length;P<j;P+=1){let L=I[P];h.replacer&&(L=h.replacer.call(I,String(P),L)),($(h,w+1,L,!0,!0,!1,!0)||typeof L>"u"&&$(h,w+1,null,!0,!0,!1,!0))&&((!k||C!=="")&&(C+=Vr(h,w)),h.dump&&l===h.dump.charCodeAt(0)?C+="-":C+="- ",C+=h.dump)}h.tag=R,h.dump=C||"[]"}function Zs(h,w,I){let k="",C=h.tag,R=Object.keys(I);for(let P=0,j=R.length;P<j;P+=1){let L="";k!==""&&(L+=", "),h.condenseFlow&&(L+='"');let U=R[P],W=I[U];h.replacer&&(W=h.replacer.call(I,U,W)),$(h,w,U,!1,!1)&&(h.dump.length>1024&&(L+="? "),L+=h.dump+(h.condenseFlow?'"':"")+":"+(h.condenseFlow?"":" "),$(h,w,W,!1,!1)&&(L+=h.dump,k+=L))}h.tag=C,h.dump="{"+k+"}"}function u(h,w,I,k){let C="",R=h.tag,P=Object.keys(I);if(h.sortKeys===!0)P.sort();else if(typeof h.sortKeys=="function")P.sort(h.sortKeys);else if(h.sortKeys)throw new n("sortKeys must be a boolean or a function");for(let j=0,L=P.length;j<L;j+=1){let U="";(!k||C!=="")&&(U+=Vr(h,w));let W=P[j],re=I[W];if(h.replacer&&(re=h.replacer.call(I,W,re)),!$(h,w+1,W,!0,!0,!0))continue;let ve=h.tag!==null&&h.tag!=="?"||h.dump&&h.dump.length>1024;ve&&(h.dump&&l===h.dump.charCodeAt(0)?U+="?":U+="? "),U+=h.dump,ve&&(U+=Vr(h,w)),$(h,w+1,re,!0,ve)&&(h.dump&&l===h.dump.charCodeAt(0)?U+=":":U+=": ",U+=h.dump,C+=U)}h.tag=R,h.dump=C||"{}"}function v(h,w,I){let k=I?h.explicitTypes:h.implicitTypes;for(let C=0,R=k.length;C<R;C+=1){let P=k[C];if((P.instanceOf||P.predicate)&&(!P.instanceOf||typeof w=="object"&&w instanceof P.instanceOf)&&(!P.predicate||P.predicate(w))){if(I?P.multi&&P.representName?h.tag=P.representName(w):h.tag=P.tag:h.tag="?",P.represent){let j=h.styleMap[P.tag]||P.defaultStyle,L;if(o.call(P.represent)==="[object Function]")L=P.represent(w,j);else if(s.call(P.represent,j))L=P.represent[j](w,j);else throw new n("!<"+P.tag+'> tag resolver accepts not "'+j+'" style');h.dump=L}return!0}}return!1}function $(h,w,I,k,C,R,P){h.tag=null,h.dump=I,v(h,I,!1)||v(h,I,!0);let j=o.call(h.dump),L=k;k&&(k=h.flowLevel<0||h.flowLevel>w);let U=j==="[object Object]"||j==="[object Array]",W,re;if(U&&(W=h.duplicates.indexOf(I),re=W!==-1),(h.tag!==null&&h.tag!=="?"||re||h.indent!==2&&w>0)&&(C=!1),re&&h.usedDuplicates[W])h.dump="*ref_"+W;else{if(U&&re&&!h.usedDuplicates[W]&&(h.usedDuplicates[W]=!0),j==="[object Object]")k&&Object.keys(h.dump).length!==0?(u(h,w,h.dump,C),re&&(h.dump="&ref_"+W+h.dump)):(Zs(h,w,h.dump),re&&(h.dump="&ref_"+W+" "+h.dump));else if(j==="[object Array]")k&&h.dump.length!==0?(h.noArrayIndent&&!P&&w>0?Xi(h,w-1,h.dump,C):Xi(h,w,h.dump,C),re&&(h.dump="&ref_"+W+h.dump)):(Yi(h,w,h.dump),re&&(h.dump="&ref_"+W+" "+h.dump));else if(j==="[object String]")h.tag!=="?"&&Ys(h,h.dump,w,R,L);else{if(j==="[object Undefined]")return!1;if(h.skipInvalid)return!1;throw new n("unacceptable kind of an object to dump "+j)}if(h.tag!==null&&h.tag!=="?"){let ve=encodeURI(h.tag[0]==="!"?h.tag.slice(1):h.tag).replace(/!/g,"%21");h.tag[0]==="!"?ve="!"+ve:ve.slice(0,18)==="tag:yaml.org,2002:"?ve="!!"+ve.slice(18):ve="!<"+ve+">",h.dump=ve+" "+h.dump}}return!0}function E(h,w){let I=[],k=[];x(h,I,k);let C=k.length;for(let R=0;R<C;R+=1)w.duplicates.push(I[k[R]]);w.usedDuplicates=new Array(C)}function x(h,w,I){if(h!==null&&typeof h=="object"){let k=w.indexOf(h);if(k!==-1)I.indexOf(k)===-1&&I.push(k);else if(w.push(h),Array.isArray(h))for(let C=0,R=h.length;C<R;C+=1)x(h[C],w,I);else{let C=Object.keys(h);for(let R=0,P=C.length;R<P;R+=1)x(h[C[R]],w,I)}}}function O(h,w){w=w||{};let I=new Ks(w);I.noRefs||E(h,I);let k=h;return I.replacer&&(k=I.replacer.call({"":k},"",k)),$(I,0,k,!0,!0)?I.dump+`
60
+ `:""}e.exports.dump=O})),hf=Gw(de(((t,e)=>{var r=Jw(),n=Kw();function i(o,s){return function(){throw new Error("Function yaml."+o+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}e.exports.Type=Ve(),e.exports.Schema=Yp(),e.exports.FAILSAFE_SCHEMA=ef(),e.exports.JSON_SCHEMA=sf(),e.exports.CORE_SCHEMA=af(),e.exports.DEFAULT_SCHEMA=Pa(),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.dump=n.dump,e.exports.YAMLException=Vn(),e.exports.types={binary:uf(),float:of(),map:Zp(),null:tf(),pairs:ff(),set:df(),timestamp:cf(),bool:rf(),int:nf(),merge:lf(),omap:pf(),seq:Qp(),str:Xp()},e.exports.safeLoad=i("safeLoad","load"),e.exports.safeLoadAll=i("safeLoadAll","loadAll"),e.exports.safeDump=i("safeDump","dump")}))(),1),{Type:oI,Schema:sI,FAILSAFE_SCHEMA:aI,JSON_SCHEMA:cI,CORE_SCHEMA:lI,DEFAULT_SCHEMA:uI,load:pI,loadAll:fI,dump:dI,YAMLException:hI,types:mI,safeLoad:gI,safeLoadAll:yI,safeDump:vI}=hf.default,ut=hf.default});import{access as Yw,readFile as mf}from"node:fs/promises";import{dirname as gf,relative as SI,resolve as _e}from"node:path";async function Xw(t=process.cwd()){let e=_e(t);for(;;){let r=_e(e,"view-contracts.config.yaml");try{return await Yw(r),r}catch{let n=gf(e);if(n===e)return null;e=n}}}async function Jt(t){if(t)return _e(t);let e=await Xw();if(!e)throw new Error("view-contracts.config.yaml not found. Pass -c <path> or run from a project directory.");return e}async function He(t){let e=_e(t),r=await mf(e,"utf-8"),n=ut.load(r);return Qw(e,n)}function Qw(t,e){let r=he(t);return{...e,openapi:_e(r,e.openapi),bindings:_e(r,e.bindings),microContractsConfig:_e(r,e.microContractsConfig),viewsDir:_e(r,e.viewsDir),generated:{contractDir:_e(r,e.generated.contractDir),actions:_e(r,e.generated.actions),bridge:_e(r,e.generated.bridge),reactDir:_e(r,e.generated.reactDir)},runtimeModule:e.runtimeModule?_e(r,e.runtimeModule):e.componentsModule?_e(r,e.componentsModule):void 0,themeModule:e.themeModule?_e(r,e.themeModule):void 0,design:e.design?{tokens:e.design.tokens?_e(r,e.design.tokens):void 0,theme:e.design.theme?_e(r,e.design.theme):void 0,extensionsCss:e.design.extensionsCss?_e(r,e.design.extensionsCss):void 0}:void 0,extensions:e.extensions?_e(r,e.extensions):void 0}}async function _t(t){let e=await mf(_e(t),"utf-8");return ut.load(e)}function yf(t,e){return _e(t.generated.reactDir,"components",`${e.screenName}.generated.tsx`)}function he(t){return gf(_e(t))}function Kt(t){let e=t.design?.tokens,r=t.design?.theme;if(!e)throw new Error("view-contracts.config.yaml must define design.tokens (project tokens file path).");if(!r)throw new Error("view-contracts.config.yaml must define design.theme (project theme file path).");return{tokensPath:e,themePath:r}}var pt=K(()=>{"use strict";Fr()});var Dn=S(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.regexpCode=oe.getEsmExportName=oe.getProperty=oe.safeStringify=oe.stringify=oe.strConcat=oe.addCodeArg=oe.str=oe._=oe.nil=oe._Code=oe.Name=oe.IDENTIFIER=oe._CodeOrName=void 0;var Ln=class{};oe._CodeOrName=Ln;oe.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var lr=class extends Ln{constructor(e){if(super(),!oe.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}}};oe.Name=lr;var et=class extends Ln{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof lr&&(r[n.str]=(r[n.str]||0)+1),r),{})}};oe._Code=et;oe.nil=new et("");function wf(t,...e){let r=[t[0]],n=0;for(;n<e.length;)Ia(r,e[n]),r.push(t[++n]);return new et(r)}oe._=wf;var Ra=new et("+");function _f(t,...e){let r=[jn(t[0])],n=0;for(;n<e.length;)r.push(Ra),Ia(r,e[n]),r.push(Ra,jn(t[++n]));return e_(r),new et(r)}oe.str=_f;function Ia(t,e){e instanceof et?t.push(...e._items):e instanceof lr?t.push(e):t.push(n_(e))}oe.addCodeArg=Ia;function e_(t){let e=1;for(;e<t.length-1;){if(t[e]===Ra){let r=t_(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function t_(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof lr||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 lr))return`"${t}${e.slice(1)}`}function r_(t,e){return e.emptyStr()?t:t.emptyStr()?e:_f`${t}${e}`}oe.strConcat=r_;function n_(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:jn(Array.isArray(t)?t.join(","):t)}function i_(t){return new et(jn(t))}oe.stringify=i_;function jn(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}oe.safeStringify=jn;function o_(t){return typeof t=="string"&&oe.IDENTIFIER.test(t)?new et(`.${t}`):wf`[${t}]`}oe.getProperty=o_;function s_(t){if(typeof t=="string"&&oe.IDENTIFIER.test(t))return new et(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}oe.getEsmExportName=s_;function a_(t){return new et(t.toString())}oe.regexpCode=a_});var Ta=S(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.ValueScope=Ue.ValueScopeName=Ue.Scope=Ue.varKinds=Ue.UsedValueState=void 0;var Be=Dn(),Oa=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},so;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(so||(Ue.UsedValueState=so={}));Ue.varKinds={const:new Be.Name("const"),let:new Be.Name("let"),var:new Be.Name("var")};var ao=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Be.Name?e:this.name(e)}name(e){return new Be.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Ue.Scope=ao;var co=class extends Be.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,Be._)`.${new Be.Name(r)}[${n}]`}};Ue.ValueScopeName=co;var c_=(0,Be._)`\n`,Aa=class extends ao{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?c_:Be.nil}}get(){return this._scope}name(e){return new co(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,s=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[o];if(a){let f=a.get(s);if(f)return f}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]=r.ref,i.setValue(r,{property:o,itemIndex:l}),i}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Be._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(e,r,n={},i){let o=Be.nil;for(let s in e){let a=e[s];if(!a)continue;let c=n[s]=n[s]||new Map;a.forEach(l=>{if(c.has(l))return;c.set(l,so.Started);let f=r(l);if(f){let p=this.opts.es5?Ue.varKinds.var:Ue.varKinds.const;o=(0,Be._)`${o}${p} ${l} = ${f};${this.opts._n}`}else if(f=i?.(l))o=(0,Be._)`${o}${f}${this.opts._n}`;else throw new Oa(l);c.set(l,so.Completed)})}return o}};Ue.ValueScope=Aa});var Y=S(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.or=Z.and=Z.not=Z.CodeGen=Z.operators=Z.varKinds=Z.ValueScopeName=Z.ValueScope=Z.Scope=Z.Name=Z.regexpCode=Z.stringify=Z.getProperty=Z.nil=Z.strConcat=Z.str=Z._=void 0;var ne=Dn(),ft=Ta(),Yt=Dn();Object.defineProperty(Z,"_",{enumerable:!0,get:function(){return Yt._}});Object.defineProperty(Z,"str",{enumerable:!0,get:function(){return Yt.str}});Object.defineProperty(Z,"strConcat",{enumerable:!0,get:function(){return Yt.strConcat}});Object.defineProperty(Z,"nil",{enumerable:!0,get:function(){return Yt.nil}});Object.defineProperty(Z,"getProperty",{enumerable:!0,get:function(){return Yt.getProperty}});Object.defineProperty(Z,"stringify",{enumerable:!0,get:function(){return Yt.stringify}});Object.defineProperty(Z,"regexpCode",{enumerable:!0,get:function(){return Yt.regexpCode}});Object.defineProperty(Z,"Name",{enumerable:!0,get:function(){return Yt.Name}});var fo=Ta();Object.defineProperty(Z,"Scope",{enumerable:!0,get:function(){return fo.Scope}});Object.defineProperty(Z,"ValueScope",{enumerable:!0,get:function(){return fo.ValueScope}});Object.defineProperty(Z,"ValueScopeName",{enumerable:!0,get:function(){return fo.ValueScopeName}});Object.defineProperty(Z,"varKinds",{enumerable:!0,get:function(){return fo.varKinds}});Z.operators={GT:new ne._Code(">"),GTE:new ne._Code(">="),LT:new ne._Code("<"),LTE:new ne._Code("<="),EQ:new ne._Code("==="),NEQ:new ne._Code("!=="),NOT:new ne._Code("!"),OR:new ne._Code("||"),AND:new ne._Code("&&"),ADD:new ne._Code("+")};var Lt=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},Na=class extends Lt{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?ft.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=Br(this.rhs,e,r)),this}get names(){return this.rhs instanceof ne._CodeOrName?this.rhs.names:{}}},lo=class extends Lt{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof ne.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=Br(this.rhs,e,r),this}get names(){let e=this.lhs instanceof ne.Name?{}:{...this.lhs.names};return po(e,this.rhs)}},Ma=class extends lo{constructor(e,r,n,i){super(e,n,i),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Va=class extends Lt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},La=class extends Lt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},ja=class extends Lt{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Da=class extends Lt{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=Br(this.code,e,r),this}get names(){return this.code instanceof ne._CodeOrName?this.code.names:{}}},qn=class extends Lt{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,i=n.length;for(;i--;){let o=n[i];o.optimizeNames(e,r)||(l_(e,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>fr(e,r.names),{})}},jt=class extends qn{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},qa=class extends qn{},Hr=class extends jt{};Hr.kind="else";var ur=class t extends jt{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new Hr(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(bf(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=Br(this.condition,e,r),this}get names(){let e=super.names;return po(e,this.condition),this.else&&fr(e,this.else.names),e}};ur.kind="if";var pr=class extends jt{};pr.kind="for";var Fa=class extends pr{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=Br(this.iteration,e,r),this}get names(){return fr(super.names,this.iteration.names)}},Ha=class extends pr{constructor(e,r,n,i){super(),this.varKind=e,this.name=r,this.from=n,this.to=i}render(e){let r=e.es5?ft.varKinds.var:this.varKind,{name:n,from:i,to:o}=this;return`for(${r} ${n}=${i}; ${n}<${o}; ${n}++)`+super.render(e)}get names(){let e=po(super.names,this.from);return po(e,this.to)}},uo=class extends pr{constructor(e,r,n,i){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=Br(this.iterable,e,r),this}get names(){return fr(super.names,this.iterable.names)}},Fn=class extends jt{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Fn.kind="func";var Hn=class extends qn{render(e){return"return "+super.render(e)}};Hn.kind="return";var Ba=class extends jt{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,i;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(i=this.finally)===null||i===void 0||i.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&fr(e,this.catch.names),this.finally&&fr(e,this.finally.names),e}},Bn=class extends jt{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Bn.kind="catch";var Un=class extends jt{render(e){return"finally"+super.render(e)}};Un.kind="finally";var Ua=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
61
+ `:""},this._extScope=e,this._scope=new ft.Scope({parent:e}),this._nodes=[new qa]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,i){let o=this._scope.toName(r);return n!==void 0&&i&&(this._constants[o.str]=n),this._leafNode(new Na(e,o,n)),o}const(e,r,n){return this._def(ft.varKinds.const,e,r,n)}let(e,r,n){return this._def(ft.varKinds.let,e,r,n)}var(e,r,n){return this._def(ft.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new lo(e,r,n))}add(e,r){return this._leafNode(new Ma(e,Z.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==ne.nil&&this._leafNode(new Da(e)),this}object(...e){let r=["{"];for(let[n,i]of e)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,ne.addCodeArg)(r,i));return r.push("}"),new ne._Code(r)}if(e,r,n){if(this._blockNode(new ur(e)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new ur(e))}else(){return this._elseNode(new Hr)}endIf(){return this._endBlockNode(ur,Hr)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new Fa(e),r)}forRange(e,r,n,i,o=this.opts.es5?ft.varKinds.var:ft.varKinds.let){let s=this._scope.toName(e);return this._for(new Ha(o,s,r,n),()=>i(s))}forOf(e,r,n,i=ft.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let s=r instanceof ne.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,ne._)`${s}.length`,a=>{this.var(o,(0,ne._)`${s}[${a}]`),n(o)})}return this._for(new uo("of",i,o,r),()=>n(o))}forIn(e,r,n,i=this.opts.es5?ft.varKinds.var:ft.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,ne._)`Object.keys(${r})`,n);let o=this._scope.toName(e);return this._for(new uo("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(pr)}label(e){return this._leafNode(new Va(e))}break(e){return this._leafNode(new La(e))}return(e){let r=new Hn;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Hn)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new Ba;if(this._blockNode(i),this.code(e),r){let o=this.name("e");this._currNode=i.catch=new Bn(o),r(o)}return n&&(this._currNode=i.finally=new Un,this.code(n)),this._endBlockNode(Bn,Un)}throw(e){return this._leafNode(new ja(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=ne.nil,n,i){return this._blockNode(new Fn(e,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Fn)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof ur))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};Z.CodeGen=Ua;function fr(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function po(t,e){return e instanceof ne._CodeOrName?fr(t,e.names):t}function Br(t,e,r){if(t instanceof ne.Name)return n(t);if(!i(t))return t;return new ne._Code(t._items.reduce((o,s)=>(s instanceof ne.Name&&(s=n(s)),s instanceof ne._Code?o.push(...s._items):o.push(s),o),[]));function n(o){let s=r[o.str];return s===void 0||e[o.str]!==1?o:(delete e[o.str],s)}function i(o){return o instanceof ne._Code&&o._items.some(s=>s instanceof ne.Name&&e[s.str]===1&&r[s.str]!==void 0)}}function l_(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function bf(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,ne._)`!${Wa(t)}`}Z.not=bf;var u_=Sf(Z.operators.AND);function p_(...t){return t.reduce(u_)}Z.and=p_;var f_=Sf(Z.operators.OR);function d_(...t){return t.reduce(f_)}Z.or=d_;function Sf(t){return(e,r)=>e===ne.nil?r:r===ne.nil?e:(0,ne._)`${Wa(e)} ${t} ${Wa(r)}`}function Wa(t){return t instanceof ne.Name?t:(0,ne._)`(${t})`}});var te=S(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.checkStrictMode=ee.getErrorPath=ee.Type=ee.useFunc=ee.setEvaluated=ee.evaluatedPropsToName=ee.mergeEvaluated=ee.eachItem=ee.unescapeJsonPointer=ee.escapeJsonPointer=ee.escapeFragment=ee.unescapeFragment=ee.schemaRefOrVal=ee.schemaHasRulesButRef=ee.schemaHasRules=ee.checkUnknownRules=ee.alwaysValidSchema=ee.toHash=void 0;var ue=Y(),h_=Dn();function m_(t){let e={};for(let r of t)e[r]=!0;return e}ee.toHash=m_;function g_(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(kf(t,e),!Cf(e,t.self.RULES.all))}ee.alwaysValidSchema=g_;function kf(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let i=n.RULES.keywords;for(let o in e)i[o]||Rf(t,`unknown keyword: "${o}"`)}ee.checkUnknownRules=kf;function Cf(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}ee.schemaHasRules=Cf;function y_(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}ee.schemaHasRulesButRef=y_;function v_({topSchemaRef:t,schemaPath:e},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,ue._)`${r}`}return(0,ue._)`${t}${e}${(0,ue.getProperty)(n)}`}ee.schemaRefOrVal=v_;function w_(t){return Ef(decodeURIComponent(t))}ee.unescapeFragment=w_;function __(t){return encodeURIComponent(za(t))}ee.escapeFragment=__;function za(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}ee.escapeJsonPointer=za;function Ef(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}ee.unescapeJsonPointer=Ef;function b_(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}ee.eachItem=b_;function xf({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(i,o,s,a)=>{let c=s===void 0?o:s instanceof ue.Name?(o instanceof ue.Name?t(i,o,s):e(i,o,s),s):o instanceof ue.Name?(e(i,s,o),o):r(o,s);return a===ue.Name&&!(c instanceof ue.Name)?n(i,c):c}}ee.mergeEvaluated={props:xf({mergeNames:(t,e,r)=>t.if((0,ue._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,ue._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,ue._)`${r} || {}`).code((0,ue._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,ue._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,ue._)`${r} || {}`),Ja(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Pf}),items:xf({mergeNames:(t,e,r)=>t.if((0,ue._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,ue._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,ue._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,ue._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Pf(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,ue._)`{}`);return e!==void 0&&Ja(t,r,e),r}ee.evaluatedPropsToName=Pf;function Ja(t,e,r){Object.keys(r).forEach(n=>t.assign((0,ue._)`${e}${(0,ue.getProperty)(n)}`,!0))}ee.setEvaluated=Ja;var $f={};function S_(t,e){return t.scopeValue("func",{ref:e,code:$f[e.code]||($f[e.code]=new h_._Code(e.code))})}ee.useFunc=S_;var Ga;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(Ga||(ee.Type=Ga={}));function x_(t,e,r){if(t instanceof ue.Name){let n=e===Ga.Num;return r?n?(0,ue._)`"[" + ${t} + "]"`:(0,ue._)`"['" + ${t} + "']"`:n?(0,ue._)`"/" + ${t}`:(0,ue._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,ue.getProperty)(t).toString():"/"+za(t)}ee.getErrorPath=x_;function Rf(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}ee.checkStrictMode=Rf});var tt=S(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});var Ae=Y(),$_={data:new Ae.Name("data"),valCxt:new Ae.Name("valCxt"),instancePath:new Ae.Name("instancePath"),parentData:new Ae.Name("parentData"),parentDataProperty:new Ae.Name("parentDataProperty"),rootData:new Ae.Name("rootData"),dynamicAnchors:new Ae.Name("dynamicAnchors"),vErrors:new Ae.Name("vErrors"),errors:new Ae.Name("errors"),this:new Ae.Name("this"),self:new Ae.Name("self"),scope:new Ae.Name("scope"),json:new Ae.Name("json"),jsonPos:new Ae.Name("jsonPos"),jsonLen:new Ae.Name("jsonLen"),jsonPart:new Ae.Name("jsonPart")};Ka.default=$_});var Wn=S(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.extendErrors=Te.resetErrorsCount=Te.reportExtraError=Te.reportError=Te.keyword$DataError=Te.keywordError=void 0;var ie=Y(),ho=te(),Le=tt();Te.keywordError={message:({keyword:t})=>(0,ie.str)`must pass "${t}" keyword validation`};Te.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,ie.str)`"${t}" keyword must be ${e} ($data)`:(0,ie.str)`"${t}" keyword is invalid ($data)`};function k_(t,e=Te.keywordError,r,n){let{it:i}=t,{gen:o,compositeRule:s,allErrors:a}=i,c=Af(t,e,r);n??(s||a)?If(o,c):Of(i,(0,ie._)`[${c}]`)}Te.reportError=k_;function C_(t,e=Te.keywordError,r){let{it:n}=t,{gen:i,compositeRule:o,allErrors:s}=n,a=Af(t,e,r);If(i,a),o||s||Of(n,Le.default.vErrors)}Te.reportExtraError=C_;function E_(t,e){t.assign(Le.default.errors,e),t.if((0,ie._)`${Le.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,ie._)`${Le.default.vErrors}.length`,e),()=>t.assign(Le.default.vErrors,null)))}Te.resetErrorsCount=E_;function P_({gen:t,keyword:e,schemaValue:r,data:n,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let s=t.name("err");t.forRange("i",i,Le.default.errors,a=>{t.const(s,(0,ie._)`${Le.default.vErrors}[${a}]`),t.if((0,ie._)`${s}.instancePath === undefined`,()=>t.assign((0,ie._)`${s}.instancePath`,(0,ie.strConcat)(Le.default.instancePath,o.errorPath))),t.assign((0,ie._)`${s}.schemaPath`,(0,ie.str)`${o.errSchemaPath}/${e}`),o.opts.verbose&&(t.assign((0,ie._)`${s}.schema`,r),t.assign((0,ie._)`${s}.data`,n))})}Te.extendErrors=P_;function If(t,e){let r=t.const("err",e);t.if((0,ie._)`${Le.default.vErrors} === null`,()=>t.assign(Le.default.vErrors,(0,ie._)`[${r}]`),(0,ie._)`${Le.default.vErrors}.push(${r})`),t.code((0,ie._)`${Le.default.errors}++`)}function Of(t,e){let{gen:r,validateName:n,schemaEnv:i}=t;i.$async?r.throw((0,ie._)`new ${t.ValidationError}(${e})`):(r.assign((0,ie._)`${n}.errors`,e),r.return(!1))}var dr={keyword:new ie.Name("keyword"),schemaPath:new ie.Name("schemaPath"),params:new ie.Name("params"),propertyName:new ie.Name("propertyName"),message:new ie.Name("message"),schema:new ie.Name("schema"),parentSchema:new ie.Name("parentSchema")};function Af(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,ie._)`{}`:R_(t,e,r)}function R_(t,e,r={}){let{gen:n,it:i}=t,o=[I_(i,r),O_(t,r)];return A_(t,e,o),n.object(...o)}function I_({errorPath:t},{instancePath:e}){let r=e?(0,ie.str)`${t}${(0,ho.getErrorPath)(e,ho.Type.Str)}`:t;return[Le.default.instancePath,(0,ie.strConcat)(Le.default.instancePath,r)]}function O_({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let i=n?e:(0,ie.str)`${e}/${t}`;return r&&(i=(0,ie.str)`${i}${(0,ho.getErrorPath)(r,ho.Type.Str)}`),[dr.schemaPath,i]}function A_(t,{params:e,message:r},n){let{keyword:i,data:o,schemaValue:s,it:a}=t,{opts:c,propertyName:l,topSchemaRef:f,schemaPath:p}=a;n.push([dr.keyword,i],[dr.params,typeof e=="function"?e(t):e||(0,ie._)`{}`]),c.messages&&n.push([dr.message,typeof r=="function"?r(t):r]),c.verbose&&n.push([dr.schema,s],[dr.parentSchema,(0,ie._)`${f}${p}`],[Le.default.data,o]),l&&n.push([dr.propertyName,l])}});var Nf=S(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.boolOrEmptySchema=Ur.topBoolOrEmptySchema=void 0;var T_=Wn(),N_=Y(),M_=tt(),V_={message:"boolean schema is false"};function L_(t){let{gen:e,schema:r,validateName:n}=t;r===!1?Tf(t,!1):typeof r=="object"&&r.$async===!0?e.return(M_.default.data):(e.assign((0,N_._)`${n}.errors`,null),e.return(!0))}Ur.topBoolOrEmptySchema=L_;function j_(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),Tf(t)):r.var(e,!0)}Ur.boolOrEmptySchema=j_;function Tf(t,e){let{gen:r,data:n}=t,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,T_.reportError)(i,V_,void 0,e)}});var Ya=S(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.getRules=Wr.isJSONType=void 0;var D_=["string","number","integer","boolean","null","object","array"],q_=new Set(D_);function F_(t){return typeof t=="string"&&q_.has(t)}Wr.isJSONType=F_;function H_(){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:{}}}Wr.getRules=H_});var Xa=S(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.shouldUseRule=Xt.shouldUseGroup=Xt.schemaHasRulesForType=void 0;function B_({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&Mf(t,n)}Xt.schemaHasRulesForType=B_;function Mf(t,e){return e.rules.some(r=>Vf(t,r))}Xt.shouldUseGroup=Mf;function Vf(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}Xt.shouldUseRule=Vf});var Gn=S(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.reportTypeError=Ne.checkDataTypes=Ne.checkDataType=Ne.coerceAndCheckDataType=Ne.getJSONTypes=Ne.getSchemaTypes=Ne.DataType=void 0;var U_=Ya(),W_=Xa(),G_=Wn(),Q=Y(),Lf=te(),Gr;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(Gr||(Ne.DataType=Gr={}));function z_(t){let e=jf(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}Ne.getSchemaTypes=z_;function jf(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(U_.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Ne.getJSONTypes=jf;function J_(t,e){let{gen:r,data:n,opts:i}=t,o=K_(e,i.coerceTypes),s=e.length>0&&!(o.length===0&&e.length===1&&(0,W_.schemaHasRulesForType)(t,e[0]));if(s){let a=Za(e,n,i.strictNumbers,Gr.Wrong);r.if(a,()=>{o.length?Y_(t,e,o):ec(t)})}return s}Ne.coerceAndCheckDataType=J_;var Df=new Set(["string","number","integer","boolean","null"]);function K_(t,e){return e?t.filter(r=>Df.has(r)||e==="array"&&r==="array"):[]}function Y_(t,e,r){let{gen:n,data:i,opts:o}=t,s=n.let("dataType",(0,Q._)`typeof ${i}`),a=n.let("coerced",(0,Q._)`undefined`);o.coerceTypes==="array"&&n.if((0,Q._)`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,Q._)`${i}[0]`).assign(s,(0,Q._)`typeof ${i}`).if(Za(e,i,o.strictNumbers),()=>n.assign(a,i))),n.if((0,Q._)`${a} !== undefined`);for(let l of r)(Df.has(l)||l==="array"&&o.coerceTypes==="array")&&c(l);n.else(),ec(t),n.endIf(),n.if((0,Q._)`${a} !== undefined`,()=>{n.assign(i,a),X_(t,a)});function c(l){switch(l){case"string":n.elseIf((0,Q._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,Q._)`"" + ${i}`).elseIf((0,Q._)`${i} === null`).assign(a,(0,Q._)`""`);return;case"number":n.elseIf((0,Q._)`${s} == "boolean" || ${i} === null
62
62
  || (${s} == "string" && ${i} && ${i} == +${i})`).assign(a,(0,Q._)`+${i}`);return;case"integer":n.elseIf((0,Q._)`${s} === "boolean" || ${i} === null
63
63
  || (${s} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(a,(0,Q._)`+${i}`);return;case"boolean":n.elseIf((0,Q._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(a,!1).elseIf((0,Q._)`${i} === "true" || ${i} === 1`).assign(a,!0);return;case"null":n.elseIf((0,Q._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(a,null);return;case"array":n.elseIf((0,Q._)`${s} === "string" || ${s} === "number"
64
- || ${s} === "boolean" || ${i} === null`).assign(a,(0,Q._)`[${i}]`)}}}function G_({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,Q._)`${e} !== undefined`,()=>t.assign((0,Q._)`${e}[${r}]`,n))}function Xa(t,e,r,n=Gr.Correct){let i=n===Gr.Correct?Q.operators.EQ:Q.operators.NEQ,o;switch(t){case"null":return(0,Q._)`${e} ${i} null`;case"array":o=(0,Q._)`Array.isArray(${e})`;break;case"object":o=(0,Q._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=s((0,Q._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=s();break;default:return(0,Q._)`typeof ${e} ${i} ${t}`}return n===Gr.Correct?o:(0,Q.not)(o);function s(a=Q.nil){return(0,Q.and)((0,Q._)`typeof ${e} == "number"`,a,r?(0,Q._)`isFinite(${e})`:Q.nil)}}Ne.checkDataType=Xa;function Qa(t,e,r,n){if(t.length===1)return Xa(t[0],e,r,n);let i,o=(0,Mf.toHash)(t);if(o.array&&o.object){let s=(0,Q._)`typeof ${e} != "object"`;i=o.null?s:(0,Q._)`!${e} || ${s}`,delete o.null,delete o.array,delete o.object}else i=Q.nil;o.number&&delete o.integer;for(let s in o)i=(0,Q.and)(i,Xa(s,e,r,n));return i}Ne.checkDataTypes=Qa;var z_={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,Q._)`{type: ${t}}`:(0,Q._)`{type: ${e}}`};function Za(t){let e=J_(t);(0,F_.reportError)(e,z_)}Ne.reportTypeError=Za;function J_(t){let{gen:e,data:r,schema:n}=t,i=(0,Mf.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var Df=S(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.assignDefaults=void 0;var zr=Y(),K_=te();function Y_(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)jf(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,o)=>jf(t,o,i.default))}ho.assignDefaults=Y_;function jf(t,e,r){let{gen:n,compositeRule:i,data:o,opts:s}=t;if(r===void 0)return;let a=(0,zr._)`${o}${(0,zr.getProperty)(e)}`;if(i){(0,K_.checkStrictMode)(t,`default is ignored for: ${a}`);return}let c=(0,zr._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,zr._)`${c} || ${a} === null || ${a} === ""`),n.if(c,(0,zr._)`${a} = ${(0,zr.stringify)(r)}`)}});var rt=S(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.validateUnion=le.validateArray=le.usePattern=le.callValidateCode=le.schemaProperties=le.allSchemaProperties=le.noPropertyInData=le.propertyInData=le.isOwnProperty=le.hasPropFunc=le.reportMissingProp=le.checkMissingProp=le.checkReportMissingProp=void 0;var me=Y(),ec=te(),Qt=tt(),X_=te();function Q_(t,e){let{gen:r,data:n,it:i}=t;r.if(rc(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,me._)`${e}`},!0),t.error()})}le.checkReportMissingProp=Q_;function Z_({gen:t,data:e,it:{opts:r}},n,i){return(0,me.or)(...n.map(o=>(0,me.and)(rc(t,e,o,r.ownProperties),(0,me._)`${i} = ${o}`)))}le.checkMissingProp=Z_;function eb(t,e){t.setParams({missingProperty:e},!0),t.error()}le.reportMissingProp=eb;function qf(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,me._)`Object.prototype.hasOwnProperty`})}le.hasPropFunc=qf;function tc(t,e,r){return(0,me._)`${qf(t)}.call(${e}, ${r})`}le.isOwnProperty=tc;function tb(t,e,r,n){let i=(0,me._)`${e}${(0,me.getProperty)(r)} !== undefined`;return n?(0,me._)`${i} && ${tc(t,e,r)}`:i}le.propertyInData=tb;function rc(t,e,r,n){let i=(0,me._)`${e}${(0,me.getProperty)(r)} === undefined`;return n?(0,me.or)(i,(0,me.not)(tc(t,e,r))):i}le.noPropertyInData=rc;function Ff(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}le.allSchemaProperties=Ff;function rb(t,e){return Ff(e).filter(r=>!(0,ec.alwaysValidSchema)(t,e[r]))}le.schemaProperties=rb;function nb({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:s},a,c,l){let f=l?(0,me._)`${t}, ${e}, ${n}${i}`:e,p=[[Qt.default.instancePath,(0,me.strConcat)(Qt.default.instancePath,o)],[Qt.default.parentData,s.parentData],[Qt.default.parentDataProperty,s.parentDataProperty],[Qt.default.rootData,Qt.default.rootData]];s.opts.dynamicRef&&p.push([Qt.default.dynamicAnchors,Qt.default.dynamicAnchors]);let d=(0,me._)`${f}, ${r.object(...p)}`;return c!==me.nil?(0,me._)`${a}.call(${c}, ${d})`:(0,me._)`${a}(${d})`}le.callValidateCode=nb;var ib=(0,me._)`new RegExp`;function ob({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:i}=e.code,o=i(r,n);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,me._)`${i.code==="new RegExp"?ib:(0,X_.useFunc)(t,i)}(${r}, ${n})`})}le.usePattern=ob;function sb(t){let{gen:e,data:r,keyword:n,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,me._)`${r}.length`);e.forRange("i",0,c,l=>{t.subschema({keyword:n,dataProp:l,dataPropType:ec.Type.Num},o),e.if((0,me.not)(o),a)})}}le.validateArray=sb;function ab(t){let{gen:e,schema:r,keyword:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,ec.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let s=e.let("valid",!1),a=e.name("_valid");e.block(()=>r.forEach((c,l)=>{let f=t.subschema({keyword:n,schemaProp:l,compositeRule:!0},a);e.assign(s,(0,me._)`${s} || ${a}`),t.mergeValidEvaluated(f,a)||e.if((0,me.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}le.validateUnion=ab});var Uf=S(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.validateKeywordUsage=_t.validSchemaType=_t.funcKeywordCode=_t.macroKeywordCode=void 0;var je=Y(),hr=tt(),cb=rt(),lb=Wn();function ub(t,e){let{gen:r,keyword:n,schema:i,parentSchema:o,it:s}=t,a=e.macro.call(s.self,i,o,s),c=Bf(r,n,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let l=r.name("valid");t.subschema({schema:a,schemaPath:je.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),t.pass(l,()=>t.error(!0))}_t.macroKeywordCode=ub;function pb(t,e){var r;let{gen:n,keyword:i,schema:o,parentSchema:s,$data:a,it:c}=t;db(c,e);let l=!a&&e.compile?e.compile.call(c.self,o,s,c):e.validate,f=Bf(n,i,l),p=n.let("valid");t.block$data(p,d),t.ok((r=e.valid)!==null&&r!==void 0?r:p);function d(){if(e.errors===!1)y(),e.modifying&&Hf(t),_(()=>t.error());else{let b=e.async?m():g();e.modifying&&Hf(t),_(()=>fb(t,b))}}function m(){let b=n.let("ruleErrs",null);return n.try(()=>y((0,je._)`await `),M=>n.assign(p,!1).if((0,je._)`${M} instanceof ${c.ValidationError}`,()=>n.assign(b,(0,je._)`${M}.errors`),()=>n.throw(M))),b}function g(){let b=(0,je._)`${f}.errors`;return n.assign(b,null),y(je.nil),b}function y(b=e.async?(0,je._)`await `:je.nil){let M=c.opts.passContext?hr.default.this:hr.default.self,q=!("compile"in e&&!a||e.schema===!1);n.assign(p,(0,je._)`${b}${(0,cb.callValidateCode)(t,f,M,q)}`,e.modifying)}function _(b){var M;n.if((0,je.not)((M=e.valid)!==null&&M!==void 0?M:p),b)}}_t.funcKeywordCode=pb;function Hf(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,je._)`${n.parentData}[${n.parentDataProperty}]`))}function fb(t,e){let{gen:r}=t;r.if((0,je._)`Array.isArray(${e})`,()=>{r.assign(hr.default.vErrors,(0,je._)`${hr.default.vErrors} === null ? ${e} : ${hr.default.vErrors}.concat(${e})`).assign(hr.default.errors,(0,je._)`${hr.default.vErrors}.length`),(0,lb.extendErrors)(t)},()=>t.error())}function db({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function Bf(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,je.stringify)(r)})}function hb(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}_t.validSchemaType=hb;function mb({schema:t,opts:e,self:r,errSchemaPath:n},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 "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}_t.validateKeywordUsage=mb});var Gf=S(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.extendSubschemaMode=Zt.extendSubschemaData=Zt.getSubschema=void 0;var bt=Y(),Wf=te();function gb(t,{keyword:e,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:s}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let a=t.schema[e];return r===void 0?{schema:a,schemaPath:(0,bt._)`${t.schemaPath}${(0,bt.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[r],schemaPath:(0,bt._)`${t.schemaPath}${(0,bt.getProperty)(e)}${(0,bt.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,Wf.escapeFragment)(r)}`}}if(n!==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:n,schemaPath:i,topSchemaRef:s,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}Zt.getSubschema=gb;function yb(t,e,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:s}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(r!==void 0){let{errorPath:l,dataPathArr:f,opts:p}=e,d=a.let("data",(0,bt._)`${e.data}${(0,bt.getProperty)(r)}`,!0);c(d),t.errorPath=(0,bt.str)`${l}${(0,Wf.getErrorPath)(r,n,p.jsPropertySyntax)}`,t.parentDataProperty=(0,bt._)`${r}`,t.dataPathArr=[...f,t.parentDataProperty]}if(i!==void 0){let l=i instanceof bt.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]}}Zt.extendSubschemaData=yb;function vb(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(t.compositeRule=n),i!==void 0&&(t.createErrors=i),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=r}Zt.extendSubschemaMode=vb});var nc=S((VR,zf)=>{"use strict";zf.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var s=o[i];if(!t(e[s],r[s]))return!1}return!0}return e!==e&&r!==r}});var Kf=S((LR,Jf)=>{"use strict";var er=Jf.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};mo(e,n,i,t,"",t)};er.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};er.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};er.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};er.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 mo(t,e,r,n,i,o,s,a,c,l){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,o,s,a,c,l);for(var f in n){var p=n[f];if(Array.isArray(p)){if(f in er.arrayKeywords)for(var d=0;d<p.length;d++)mo(t,e,r,p[d],i+"/"+f+"/"+d,o,i,f,n,d)}else if(f in er.propsKeywords){if(p&&typeof p=="object")for(var m in p)mo(t,e,r,p[m],i+"/"+f+"/"+wb(m),o,i,f,n,m)}else(f in er.keywords||t.allKeys&&!(f in er.skipKeywords))&&mo(t,e,r,p,i+"/"+f,o,i,f,n)}r(n,i,o,s,a,c,l)}}function wb(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var zn=S(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.getSchemaRefs=We.resolveUrl=We.normalizeId=We._getFullPath=We.getFullPath=We.inlineRef=void 0;var _b=te(),bb=nc(),Sb=Kf(),xb=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function $b(t,e=!0){return typeof t=="boolean"?!0:e===!0?!ic(t):e?Yf(t)<=e:!1}We.inlineRef=$b;var kb=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function ic(t){for(let e in t){if(kb.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(ic)||typeof r=="object"&&ic(r))return!0}return!1}function Yf(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!xb.has(r)&&(typeof t[r]=="object"&&(0,_b.eachItem)(t[r],n=>e+=Yf(n)),e===1/0))return 1/0}return e}function Xf(t,e="",r){r!==!1&&(e=Jr(e));let n=t.parse(e);return Qf(t,n)}We.getFullPath=Xf;function Qf(t,e){return t.serialize(e).split("#")[0]+"#"}We._getFullPath=Qf;var Cb=/#\/?$/;function Jr(t){return t?t.replace(Cb,""):""}We.normalizeId=Jr;function Eb(t,e,r){return r=Jr(r),t.resolve(e,r)}We.resolveUrl=Eb;var Pb=/^[a-z_][-a-z0-9._]*$/i;function Ib(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=Jr(t[r]||e),o={"":i},s=Xf(n,i,!1),a={},c=new Set;return Sb(t,{allKeys:!0},(p,d,m,g)=>{if(g===void 0)return;let y=s+d,_=o[g];typeof p[r]=="string"&&(_=b.call(this,p[r])),M.call(this,p.$anchor),M.call(this,p.$dynamicAnchor),o[d]=_;function b(q){let A=this.opts.uriResolver.resolve;if(q=Jr(_?A(_,q):q),c.has(q))throw f(q);c.add(q);let T=this.refs[q];return typeof T=="string"&&(T=this.refs[T]),typeof T=="object"?l(p,T.schema,q):q!==Jr(y)&&(q[0]==="#"?(l(p,a[q],q),a[q]=p):this.refs[q]=y),q}function M(q){if(typeof q=="string"){if(!Pb.test(q))throw new Error(`invalid anchor "${q}"`);b.call(this,`#${q}`)}}}),a;function l(p,d,m){if(d!==void 0&&!bb(p,d))throw f(m)}function f(p){return new Error(`reference "${p}" resolves to more than one schema`)}}We.getSchemaRefs=Ib});var Yn=S(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.getData=tr.KeywordCxt=tr.validateFunctionCode=void 0;var nd=Af(),Zf=Gn(),sc=Ya(),go=Gn(),Rb=Df(),Kn=Uf(),oc=Gf(),B=Y(),J=tt(),Ob=zn(),Dt=te(),Jn=Wn();function Ab(t){if(sd(t)&&(ad(t),od(t))){Mb(t);return}id(t,()=>(0,nd.topBoolOrEmptySchema)(t))}tr.validateFunctionCode=Ab;function id({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},o){i.code.es5?t.func(e,(0,B._)`${J.default.data}, ${J.default.valCxt}`,n.$async,()=>{t.code((0,B._)`"use strict"; ${ed(r,i)}`),Nb(t,i),t.code(o)}):t.func(e,(0,B._)`${J.default.data}, ${Tb(i)}`,n.$async,()=>t.code(ed(r,i)).code(o))}function Tb(t){return(0,B._)`{${J.default.instancePath}="", ${J.default.parentData}, ${J.default.parentDataProperty}, ${J.default.rootData}=${J.default.data}${t.dynamicRef?(0,B._)`, ${J.default.dynamicAnchors}={}`:B.nil}}={}`}function Nb(t,e){t.if(J.default.valCxt,()=>{t.var(J.default.instancePath,(0,B._)`${J.default.valCxt}.${J.default.instancePath}`),t.var(J.default.parentData,(0,B._)`${J.default.valCxt}.${J.default.parentData}`),t.var(J.default.parentDataProperty,(0,B._)`${J.default.valCxt}.${J.default.parentDataProperty}`),t.var(J.default.rootData,(0,B._)`${J.default.valCxt}.${J.default.rootData}`),e.dynamicRef&&t.var(J.default.dynamicAnchors,(0,B._)`${J.default.valCxt}.${J.default.dynamicAnchors}`)},()=>{t.var(J.default.instancePath,(0,B._)`""`),t.var(J.default.parentData,(0,B._)`undefined`),t.var(J.default.parentDataProperty,(0,B._)`undefined`),t.var(J.default.rootData,J.default.data),e.dynamicRef&&t.var(J.default.dynamicAnchors,(0,B._)`{}`)})}function Mb(t){let{schema:e,opts:r,gen:n}=t;id(t,()=>{r.$comment&&e.$comment&&ld(t),qb(t),n.let(J.default.vErrors,null),n.let(J.default.errors,0),r.unevaluated&&Vb(t),cd(t),Bb(t)})}function Vb(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,B._)`${r}.evaluated`),e.if((0,B._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,B._)`${t.evaluated}.props`,(0,B._)`undefined`)),e.if((0,B._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,B._)`${t.evaluated}.items`,(0,B._)`undefined`))}function ed(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,B._)`/*# sourceURL=${r} */`:B.nil}function Lb(t,e){if(sd(t)&&(ad(t),od(t))){jb(t,e);return}(0,nd.boolOrEmptySchema)(t,e)}function od({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function sd(t){return typeof t.schema!="boolean"}function jb(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&ld(t),Fb(t),Hb(t);let o=n.const("_errs",J.default.errors);cd(t,o),n.var(e,(0,B._)`${o} === ${J.default.errors}`)}function ad(t){(0,Dt.checkUnknownRules)(t),Db(t)}function cd(t,e){if(t.opts.jtd)return td(t,[],!1,e);let r=(0,Zf.getSchemaTypes)(t.schema),n=(0,Zf.coerceAndCheckDataType)(t,r);td(t,r,!n,e)}function Db(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Dt.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function qb(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Dt.checkStrictMode)(t,"default is ignored in the schema root")}function Fb(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,Ob.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function Hb(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function ld({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)t.code((0,B._)`${J.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let s=(0,B.str)`${n}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,B._)`${J.default.self}.opts.$comment(${o}, ${s}, ${a}.schema)`)}}function Bb(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=t;r.$async?e.if((0,B._)`${J.default.errors} === 0`,()=>e.return(J.default.data),()=>e.throw((0,B._)`new ${i}(${J.default.vErrors})`)):(e.assign((0,B._)`${n}.errors`,J.default.vErrors),o.unevaluated&&Ub(t),e.return((0,B._)`${J.default.errors} === 0`))}function Ub({gen:t,evaluated:e,props:r,items:n}){r instanceof B.Name&&t.assign((0,B._)`${e}.props`,r),n instanceof B.Name&&t.assign((0,B._)`${e}.items`,n)}function td(t,e,r,n){let{gen:i,schema:o,data:s,allErrors:a,opts:c,self:l}=t,{RULES:f}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,Dt.schemaHasRulesButRef)(o,f))){i.block(()=>pd(t,"$ref",f.all.$ref.definition));return}c.jtd||Wb(t,e),i.block(()=>{for(let d of f.rules)p(d);p(f.post)});function p(d){(0,sc.shouldUseGroup)(o,d)&&(d.type?(i.if((0,go.checkDataType)(d.type,s,c.strictNumbers)),rd(t,d),e.length===1&&e[0]===d.type&&r&&(i.else(),(0,go.reportTypeError)(t)),i.endIf()):rd(t,d),a||i.if((0,B._)`${J.default.errors} === ${n||0}`))}}function rd(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,Rb.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0,sc.shouldUseRule)(n,o)&&pd(t,o.keyword,o.definition,e.type)})}function Wb(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(Gb(t,e),t.opts.allowUnionTypes||zb(t,e),Jb(t,t.dataTypes))}function Gb(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{ud(t.dataTypes,r)||ac(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),Yb(t,e)}}function zb(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&ac(t,"use allowUnionTypes to allow union type keyword")}function Jb(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,sc.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(s=>Kb(e,s))&&ac(t,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function Kb(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function ud(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function Yb(t,e){let r=[];for(let n of t.dataTypes)ud(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function ac(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Dt.checkStrictMode)(t,e,t.opts.strictTypes)}var yo=class{constructor(e,r,n){if((0,Kn.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Dt.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",fd(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Kn.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",J.default.errors))}result(e,r,n){this.failResult((0,B.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,B.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,B._)`${r} !== undefined && (${(0,B.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?Jn.reportExtraError:Jn.reportError)(this,this.def.error,r)}$dataError(){(0,Jn.reportError)(this,this.def.$dataError||Jn.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Jn.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=B.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=B.nil,r=B.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:s}=this;n.if((0,B.or)((0,B._)`${i} === undefined`,r)),e!==B.nil&&n.assign(e,!0),(o.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==B.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,B.or)(s(),a());function s(){if(n.length){if(!(r instanceof B.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,B._)`${(0,go.checkDataTypes)(c,r,o.opts.strictNumbers,go.DataType.Wrong)}`}return B.nil}function a(){if(i.validateSchema){let c=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,B._)`!${c}(${r})`}return B.nil}}subschema(e,r){let n=(0,oc.getSubschema)(this.it,e);(0,oc.extendSubschemaData)(n,this.it,e),(0,oc.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return Lb(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Dt.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Dt.mergeEvaluated.items(i,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(e,B.Name)),!0}};tr.KeywordCxt=yo;function pd(t,e,r,n){let i=new yo(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Kn.funcKeywordCode)(i,r):"macro"in r?(0,Kn.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Kn.funcKeywordCode)(i,r)}var Xb=/^\/(?:[^~]|~0|~1)*$/,Qb=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function fd(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,o;if(t==="")return J.default.rootData;if(t[0]==="/"){if(!Xb.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=J.default.rootData}else{let l=Qb.exec(t);if(!l)throw new Error(`Invalid JSON-pointer: ${t}`);let f=+l[1];if(i=l[2],i==="#"){if(f>=e)throw new Error(c("property/index",f));return n[e-f]}if(f>e)throw new Error(c("data",f));if(o=r[e-f],!i)return o}let s=o,a=i.split("/");for(let l of a)l&&(o=(0,B._)`${o}${(0,B.getProperty)((0,Dt.unescapeJsonPointer)(l))}`,s=(0,B._)`${s} && ${o}`);return s;function c(l,f){return`Cannot access ${l} ${f} levels up, current level is ${e}`}}tr.getData=fd});var vo=S(lc=>{"use strict";Object.defineProperty(lc,"__esModule",{value:!0});var cc=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};lc.default=cc});var Xn=S(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});var uc=zn(),pc=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,uc.resolveUrl)(e,r,n),this.missingSchema=(0,uc.normalizeId)((0,uc.getFullPath)(e,this.missingRef))}};fc.default=pc});var Qn=S(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.resolveSchema=nt.getCompilingSchema=nt.resolveRef=nt.compileSchema=nt.SchemaEnv=void 0;var dt=Y(),Zb=vo(),mr=tt(),ht=zn(),dd=te(),e0=Yn(),Kr=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,ht.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};nt.SchemaEnv=Kr;function hc(t){let e=hd.call(this,t);if(e)return e;let r=(0,ht.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,s=new dt.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),a;t.$async&&(a=s.scopeValue("Error",{ref:Zb.default,code:(0,dt._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");t.validateName=c;let l={gen:s,allErrors:this.opts.allErrors,data:mr.default.data,parentData:mr.default.parentData,parentDataProperty:mr.default.parentDataProperty,dataNames:[mr.default.data],dataPathArr:[dt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,dt.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:dt.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,dt._)`""`,opts:this.opts,self:this},f;try{this._compilations.add(t),(0,e0.validateFunctionCode)(l),s.optimize(this.opts.code.optimize);let p=s.toString();f=`${s.scopeRefs(mr.default.scope)}return ${p}`,this.opts.code.process&&(f=this.opts.code.process(f,t));let m=new Function(`${mr.default.self}`,`${mr.default.scope}`,f)(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:g,items:y}=l;m.evaluated={props:g instanceof dt.Name?void 0:g,items:y instanceof dt.Name?void 0:y,dynamicProps:g instanceof dt.Name,dynamicItems:y instanceof dt.Name},m.source&&(m.source.evaluated=(0,dt.stringify)(m.evaluated))}return t.validate=m,t}catch(p){throw delete t.validate,delete t.validateName,f&&this.logger.error("Error compiling schema, function code:",f),p}finally{this._compilations.delete(t)}}nt.compileSchema=hc;function t0(t,e,r){var n;r=(0,ht.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let o=i0.call(this,t,r);if(o===void 0){let s=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;s&&(o=new Kr({schema:s,schemaId:a,root:t,baseId:e}))}if(o!==void 0)return t.refs[r]=r0.call(this,o)}nt.resolveRef=t0;function r0(t){return(0,ht.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:hc.call(this,t)}function hd(t){for(let e of this._compilations)if(n0(e,t))return e}nt.getCompilingSchema=hd;function n0(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function i0(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||wo.call(this,t,e)}function wo(t,e){let r=this.opts.uriResolver.parse(e),n=(0,ht._getFullPath)(this.opts.uriResolver,r),i=(0,ht.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return dc.call(this,r,t);let o=(0,ht.normalizeId)(n),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){let a=wo.call(this,t,s);return typeof a?.schema!="object"?void 0:dc.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||hc.call(this,s),o===(0,ht.normalizeId)(e)){let{schema:a}=s,{schemaId:c}=this.opts,l=a[c];return l&&(i=(0,ht.resolveUrl)(this.opts.uriResolver,i,l)),new Kr({schema:a,schemaId:c,root:t,baseId:i})}return dc.call(this,r,s)}}nt.resolveSchema=wo;var o0=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function dc(t,{baseId:e,schema:r,root:n}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,dd.unescapeFragment)(a)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!o0.has(a)&&l&&(e=(0,ht.resolveUrl)(this.opts.uriResolver,e,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,dd.schemaHasRulesButRef)(r,this.RULES)){let a=(0,ht.resolveUrl)(this.opts.uriResolver,e,r.$ref);o=wo.call(this,n,a)}let{schemaId:s}=this.opts;if(o=o||new Kr({schema:r,schemaId:s,root:n,baseId:e}),o.schema!==o.root.schema)return o}});var md=S((BR,s0)=>{s0.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 yc=S((UR,bd)=>{"use strict";var a0=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),yd=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),mc=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),vd=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),c0=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function gc(t){let e="",r=0,n=0;for(n=0;n<t.length;n++)if(r=t[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n];break}for(n+=1;n<t.length;n++){if(r=t[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n]}return e}var l0=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function gd(t){return t.length=0,!0}function u0(t,e,r){if(t.length){let n=gc(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function p0(t){let e=0,r={error:!1,address:"",zone:""},n=[],i=[],o=!1,s=!1,a=u0;for(let c=0;c<t.length;c++){let l=t[c];if(!(l==="["||l==="]"))if(l===":"){if(o===!0&&(s=!0),!a(i,n,r))break;if(++e>7){r.error=!0;break}c>0&&t[c-1]===":"&&(o=!0),n.push(":");continue}else if(l==="%"){if(!a(i,n,r))break;a=gd}else{i.push(l);continue}}return i.length&&(a===gd?r.zone=i.join(""):s?n.push(i.join("")):n.push(gc(i))),r.address=n.join(""),r}function wd(t){if(f0(t,":")<2)return{host:t,isIPV6:!1};let e=p0(t);if(e.error)return{host:t,isIPV6:!1};{let r=e.address,n=e.address;return e.zone&&(r+="%"+e.zone,n+="%25"+e.zone),{host:r,isIPV6:!0,escapedHost:n}}}function f0(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function d0(t){let e=t,r=[],n=-1,i=0;for(;i=e.length;){if(i===1){if(e===".")break;if(e==="/"){r.push("/");break}else{r.push(e);break}}else if(i===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){r.push("/");break}}else if(i===3&&e==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),r.length!==0&&r.pop();continue}}if((n=e.indexOf("/",1))===-1){r.push(e);break}else r.push(e.slice(0,n)),e=e.slice(n)}return r.join("")}var h0={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},m0=/[@/?#:]/g,g0=/[@/?#]/g;function _d(t,e){let r=e?g0:m0;return r.lastIndex=0,t.replace(r,n=>h0[n])}function y0(t,e=!1){if(t.indexOf("%")===-1)return t;let r="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){let i=t.slice(n+1,n+3);if(mc(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));e&&vd(s)?r+=s:r+="%"+o,n+=2;continue}}r+=t[n]}return r}function v0(t){let e="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let n=t.slice(r+1,r+3);if(mc(n)){let i=n.toUpperCase(),o=String.fromCharCode(parseInt(i,16));o!=="."&&vd(o)?e+=o:e+="%"+i,r+=2;continue}}c0(t[r])?e+=t[r]:e+=escape(t[r])}return e}function w0(t){let e="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let n=t.slice(r+1,r+3);if(mc(n)){e+="%"+n.toUpperCase(),r+=2;continue}}e+=escape(t[r])}return e}function _0(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!yd(r)){let n=wd(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=_d(r,!1)}e.push(r)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}bd.exports={nonSimpleDomain:l0,recomposeAuthority:_0,reescapeHostDelimiters:_d,normalizePercentEncoding:y0,normalizePathEncoding:v0,escapePreservingEscapes:w0,removeDotSegments:d0,isIPv4:yd,isUUID:a0,normalizeIPv6:wd,stringArrayToHexStripped:gc}});var Cd=S((WR,kd)=>{"use strict";var{isUUID:b0}=yc(),S0=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,x0=["http","https","ws","wss","urn","urn:uuid"];function $0(t){return x0.indexOf(t)!==-1}function vc(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 Sd(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function xd(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 k0(t){return t.secure=vc(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function C0(t){if((t.port===(vc(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}function E0(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(S0);if(r){let n=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let i=`${n}:${e.nid||t.nid}`,o=wc(i);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function P0(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=e.scheme||t.scheme||"urn",n=t.nid.toLowerCase(),i=`${r}:${e.nid||n}`,o=wc(i);o&&(t=o.serialize(t,e));let s=t,a=t.nss;return s.path=`${n||e.nid}:${a}`,e.skipEscape=!0,s}function I0(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!b0(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function R0(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var $d={scheme:"http",domainHost:!0,parse:Sd,serialize:xd},O0={scheme:"https",domainHost:$d.domainHost,parse:Sd,serialize:xd},_o={scheme:"ws",domainHost:!0,parse:k0,serialize:C0},A0={scheme:"wss",domainHost:_o.domainHost,parse:_o.parse,serialize:_o.serialize},T0={scheme:"urn",parse:E0,serialize:P0,skipNormalize:!0},N0={scheme:"urn:uuid",parse:I0,serialize:R0,skipNormalize:!0},bo={http:$d,https:O0,ws:_o,wss:A0,urn:T0,"urn:uuid":N0};Object.setPrototypeOf(bo,null);function wc(t){return t&&(bo[t]||bo[t.toLowerCase()])||void 0}kd.exports={wsIsSecure:vc,SCHEMES:bo,isValidSchemeName:$0,getSchemeHandler:wc}});var Ad=S((GR,So)=>{"use strict";var{normalizeIPv6:M0,removeDotSegments:Zn,recomposeAuthority:V0,normalizePercentEncoding:L0,normalizePathEncoding:j0,escapePreservingEscapes:D0,reescapeHostDelimiters:q0,isIPv4:F0,nonSimpleDomain:H0}=yc(),{SCHEMES:B0,getSchemeHandler:Pd}=Cd();function U0(t,e){return typeof t=="string"?t=K0(t,e):typeof t=="object"&&(t=Yr(gr(t,e),e)),t}function W0(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=Id(Yr(t,n),Yr(e,n),n,!0);return n.skipEscape=!0,gr(i,n)}function Id(t,e,r,n){let i={};return n||(t=Yr(gr(t,r),r),e=Yr(gr(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(i.scheme=e.scheme,i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=Zn(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=Zn(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=Zn(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=Zn(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 G0(t,e,r){let n=Ed(t,r),i=Ed(e,r);return n!==void 0&&i!==void 0&&n.toLowerCase()===i.toLowerCase()}function gr(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},n=Object.assign({},e),i=[],o=Pd(n.scheme||r.scheme);o&&o.serialize&&o.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=L0(r.path):(r.path=D0(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let s=V0(r);if(s!==void 0&&(n.reference!=="suffix"&&i.push("//"),i.push(s),r.path&&r.path[0]!=="/"&&i.push("/")),r.path!==void 0){let a=r.path;!n.absolutePath&&(!o||!o.absolutePath)&&(a=Zn(a)),s===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),i.push(a)}return r.query!==void 0&&i.push("?",r.query),r.fragment!==void 0&&i.push("#",r.fragment),i.join("")}var z0=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function J0(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 Rd(t,e){let r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1,o=!1;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);let s=t.match(z0);if(s){n.scheme=s[1],n.userinfo=s[3],n.host=s[4],n.port=parseInt(s[5],10),n.path=s[6]||"",n.query=s[7],n.fragment=s[8],isNaN(n.port)&&(n.port=s[5]);let a=J0(n,s);if(a!==void 0&&(n.error=n.error||a,i=!0),n.host)if(F0(n.host)===!1){let f=M0(n.host);n.host=f.host.toLowerCase(),o=f.isIPV6}else o=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let c=Pd(r.scheme||n.scheme);if(!r.unicodeSupport&&(!c||!c.unicodeSupport)&&n.host&&(r.domainHost||c&&c.domainHost)&&o===!1&&H0(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(l){n.error=n.error||"Host's domain name can not be converted to ASCII: "+l}if((!c||c&&!c.skipNormalize)&&(t.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=q0(unescape(n.host),o))),n.path&&(n.path=j0(n.path)),n.fragment))try{n.fragment=encodeURI(decodeURIComponent(n.fragment))}catch{n.error=n.error||"URI malformed"}c&&c.parse&&c.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:i}}function Yr(t,e){return Rd(t,e).parsed}function K0(t,e){return Od(t,e).normalized}function Od(t,e){let{parsed:r,malformedAuthorityOrPort:n}=Rd(t,e);return{normalized:n?t:gr(r,e),malformedAuthorityOrPort:n}}function Ed(t,e){if(typeof t=="string"){let{normalized:r,malformedAuthorityOrPort:n}=Od(t,e);return n?void 0:r}if(typeof t=="object")return gr(t,e)}var _c={SCHEMES:B0,normalize:U0,resolve:W0,resolveComponent:Id,equal:G0,serialize:gr,parse:Yr};So.exports=_c;So.exports.default=_c;So.exports.fastUri=_c});var Nd=S(bc=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});var Td=Ad();Td.code='require("ajv/dist/runtime/uri").default';bc.default=Td});var Hd=S(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.CodeGen=Ce.Name=Ce.nil=Ce.stringify=Ce.str=Ce._=Ce.KeywordCxt=void 0;var Y0=Yn();Object.defineProperty(Ce,"KeywordCxt",{enumerable:!0,get:function(){return Y0.KeywordCxt}});var Xr=Y();Object.defineProperty(Ce,"_",{enumerable:!0,get:function(){return Xr._}});Object.defineProperty(Ce,"str",{enumerable:!0,get:function(){return Xr.str}});Object.defineProperty(Ce,"stringify",{enumerable:!0,get:function(){return Xr.stringify}});Object.defineProperty(Ce,"nil",{enumerable:!0,get:function(){return Xr.nil}});Object.defineProperty(Ce,"Name",{enumerable:!0,get:function(){return Xr.Name}});Object.defineProperty(Ce,"CodeGen",{enumerable:!0,get:function(){return Xr.CodeGen}});var X0=vo(),Dd=Xn(),Q0=Ka(),ei=Qn(),Z0=Y(),ti=zn(),xo=Gn(),xc=te(),Md=md(),e2=Nd(),qd=(t,e)=>new RegExp(t,e);qd.code="new RegExp";var t2=["removeAdditional","useDefaults","coerceTypes"],r2=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),n2={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."},i2={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Vd=200;function o2(t){var e,r,n,i,o,s,a,c,l,f,p,d,m,g,y,_,b,M,q,A,T,V,X,fe,Re;let ke=t.strict,Fe=(e=t.code)===null||e===void 0?void 0:e.optimize,Oe=Fe===!0||Fe===void 0?1:Fe||0,at=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:qd,ct=(i=t.uriResolver)!==null&&i!==void 0?i:e2.default;return{strictSchema:(s=(o=t.strictSchema)!==null&&o!==void 0?o:ke)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=t.strictNumbers)!==null&&a!==void 0?a:ke)!==null&&c!==void 0?c:!0,strictTypes:(f=(l=t.strictTypes)!==null&&l!==void 0?l:ke)!==null&&f!==void 0?f:"log",strictTuples:(d=(p=t.strictTuples)!==null&&p!==void 0?p:ke)!==null&&d!==void 0?d:"log",strictRequired:(g=(m=t.strictRequired)!==null&&m!==void 0?m:ke)!==null&&g!==void 0?g:!1,code:t.code?{...t.code,optimize:Oe,regExp:at}:{optimize:Oe,regExp:at},loopRequired:(y=t.loopRequired)!==null&&y!==void 0?y:Vd,loopEnum:(_=t.loopEnum)!==null&&_!==void 0?_:Vd,meta:(b=t.meta)!==null&&b!==void 0?b:!0,messages:(M=t.messages)!==null&&M!==void 0?M:!0,inlineRefs:(q=t.inlineRefs)!==null&&q!==void 0?q:!0,schemaId:(A=t.schemaId)!==null&&A!==void 0?A:"$id",addUsedSchema:(T=t.addUsedSchema)!==null&&T!==void 0?T:!0,validateSchema:(V=t.validateSchema)!==null&&V!==void 0?V:!0,validateFormats:(X=t.validateFormats)!==null&&X!==void 0?X:!0,unicodeRegExp:(fe=t.unicodeRegExp)!==null&&fe!==void 0?fe:!0,int32range:(Re=t.int32range)!==null&&Re!==void 0?Re:!0,uriResolver:ct}}var ri=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,...o2(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new Z0.ValueScope({scope:{},prefixes:r2,es5:r,lines:n}),this.logger=p2(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,Q0.getRules)(),Ld.call(this,n2,e,"NOT SUPPORTED"),Ld.call(this,i2,e,"DEPRECATED","warn"),this._metaOpts=l2.call(this),e.formats&&a2.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&c2.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),s2.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=Md;n==="id"&&(i={...Md},i.id=i.$id,delete i.$id),r&&e&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,e,r);async function i(f,p){await o.call(this,f.$schema);let d=this._addSchema(f,p);return d.validate||s.call(this,d)}async function o(f){f&&!this.getSchema(f)&&await i.call(this,{$ref:f},!0)}async function s(f){try{return this._compileSchemaEnv(f)}catch(p){if(!(p instanceof Dd.default))throw p;return a.call(this,p),await c.call(this,p.missingSchema),s.call(this,f)}}function a({missingSchema:f,missingRef:p}){if(this.refs[f])throw new Error(`AnySchema ${f} is loaded but ${p} cannot be resolved`)}async function c(f){let p=await l.call(this,f);this.refs[f]||await o.call(this,p.$schema),this.refs[f]||this.addSchema(p,f,r)}async function l(f){let p=this._loading[f];if(p)return p;try{return await(this._loading[f]=n(f))}finally{delete this._loading[f]}}}addSchema(e,r,n,i=this.opts.validateSchema){if(Array.isArray(e)){for(let s of e)this.addSchema(s,void 0,n,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 r=(0,ti.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,i,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,e);if(!i&&r){let 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 r;for(;typeof(r=jd.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new ei.SchemaEnv({schema:{},schemaId:n});if(r=ei.resolveSchema.call(this,i,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=jd.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,ti.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(d2.call(this,n,r),!r)return(0,xc.eachItem)(n,o=>Sc.call(this,o)),this;m2.call(this,r);let i={...r,type:(0,xo.getJSONTypes)(r.type),schemaType:(0,xo.getJSONTypes)(r.schemaType)};return(0,xc.eachItem)(n,i.type.length===0?o=>Sc.call(this,o,i):o=>i.type.forEach(s=>Sc.call(this,o,i,s))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===e);i>=0&&n.rules.splice(i,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of r){let o=i.split("/").slice(1),s=e;for(let a of o)s=s[a];for(let a in n){let c=n[a];if(typeof c!="object")continue;let{$data:l}=c.definition,f=s[a];l&&f&&(s[a]=Fd(f))}}return e}_removeAllSchemas(e,r){for(let n in e){let i=e[n];(!r||r.test(n))&&(typeof i=="string"?delete e[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[n]))}}_addSchema(e,r,n,i=this.opts.validateSchema,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;n=(0,ti.normalizeId)(s||n);let l=ti.getSchemaRefs.call(this,e,n);return c=new ei.SchemaEnv({schema:e,schemaId:a,meta:r,baseId:n,localRefs:l}),this._cache.set(c.schema,c),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=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):ei.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{ei.compileSchema.call(this,e)}finally{this.opts=r}}};ri.ValidationError=X0.default;ri.MissingRefError=Dd.default;Ce.default=ri;function Ld(t,e,r,n="error"){for(let i in t){let o=i;o in e&&this.logger[n](`${r}: option ${i}. ${t[o]}`)}}function jd(t){return t=(0,ti.normalizeId)(t),this.schemas[t]||this.refs[t]}function s2(){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 a2(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function c2(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function l2(){let t={...this.opts};for(let e of t2)delete t[e];return t}var u2={log(){},warn(){},error(){}};function p2(t){if(t===!1)return u2;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 f2=/^[a-z_$][a-z0-9_$:-]*$/i;function d2(t,e){let{RULES:r}=this;if((0,xc.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!f2.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function Sc(t,e,r){var n;let i=e?.post;if(r&&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===r);if(s||(s={type:r,rules:[]},o.rules.push(s)),o.keywords[t]=!0,!e)return;let a={keyword:t,definition:{...e,type:(0,xo.getJSONTypes)(e.type),schemaType:(0,xo.getJSONTypes)(e.schemaType)}};e.before?h2.call(this,s,a,e.before):s.rules.push(a),o.all[t]=a,(n=e.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function h2(t,e,r){let n=t.rules.findIndex(i=>i.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function m2(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=Fd(e)),t.validateSchema=this.compile(e,!0))}var g2={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Fd(t){return{anyOf:[t,g2]}}});var Bd=S($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});var y2={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};$c.default=y2});var Co=S(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.callRef=yr.getValidate=void 0;var v2=Xn(),Ud=rt(),Ge=Y(),Qr=tt(),Wd=Qn(),$o=te(),w2={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:o,validateName:s,opts:a,self:c}=n,{root:l}=o;if((r==="#"||r==="#/")&&i===l.baseId)return p();let f=Wd.resolveRef.call(c,l,i,r);if(f===void 0)throw new v2.default(n.opts.uriResolver,i,r);if(f instanceof Wd.SchemaEnv)return d(f);return m(f);function p(){if(o===l)return ko(t,s,o,o.$async);let g=e.scopeValue("root",{ref:l});return ko(t,(0,Ge._)`${g}.validate`,l,l.$async)}function d(g){let y=Gd(t,g);ko(t,y,g,g.$async)}function m(g){let y=e.scopeValue("schema",a.code.source===!0?{ref:g,code:(0,Ge.stringify)(g)}:{ref:g}),_=e.name("valid"),b=t.subschema({schema:g,dataTypes:[],schemaPath:Ge.nil,topSchemaRef:y,errSchemaPath:r},_);t.mergeEvaluated(b),t.ok(_)}}};function Gd(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,Ge._)`${r.scopeValue("wrapper",{ref:e})}.validate`}yr.getValidate=Gd;function ko(t,e,r,n){let{gen:i,it:o}=t,{allErrors:s,schemaEnv:a,opts:c}=o,l=c.passContext?Qr.default.this:Ge.nil;n?f():p();function f(){if(!a.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,Ge._)`await ${(0,Ud.callValidateCode)(t,e,l)}`),m(e),s||i.assign(g,!0)},y=>{i.if((0,Ge._)`!(${y} instanceof ${o.ValidationError})`,()=>i.throw(y)),d(y),s||i.assign(g,!1)}),t.ok(g)}function p(){t.result((0,Ud.callValidateCode)(t,e,l),()=>m(e),()=>d(e))}function d(g){let y=(0,Ge._)`${g}.errors`;i.assign(Qr.default.vErrors,(0,Ge._)`${Qr.default.vErrors} === null ? ${y} : ${Qr.default.vErrors}.concat(${y})`),i.assign(Qr.default.errors,(0,Ge._)`${Qr.default.vErrors}.length`)}function m(g){var y;if(!o.opts.unevaluated)return;let _=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(o.props=$o.mergeEvaluated.props(i,_.props,o.props));else{let b=i.var("props",(0,Ge._)`${g}.evaluated.props`);o.props=$o.mergeEvaluated.props(i,b,o.props,Ge.Name)}if(o.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(o.items=$o.mergeEvaluated.items(i,_.items,o.items));else{let b=i.var("items",(0,Ge._)`${g}.evaluated.items`);o.items=$o.mergeEvaluated.items(i,b,o.items,Ge.Name)}}}yr.callRef=ko;yr.default=w2});var zd=S(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});var _2=Bd(),b2=Co(),S2=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",_2.default,b2.default];kc.default=S2});var Jd=S(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});var Eo=Y(),rr=Eo.operators,Po={maximum:{okStr:"<=",ok:rr.LTE,fail:rr.GT},minimum:{okStr:">=",ok:rr.GTE,fail:rr.LT},exclusiveMaximum:{okStr:"<",ok:rr.LT,fail:rr.GTE},exclusiveMinimum:{okStr:">",ok:rr.GT,fail:rr.LTE}},x2={message:({keyword:t,schemaCode:e})=>(0,Eo.str)`must be ${Po[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Eo._)`{comparison: ${Po[t].okStr}, limit: ${e}}`},$2={keyword:Object.keys(Po),type:"number",schemaType:"number",$data:!0,error:x2,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,Eo._)`${r} ${Po[e].fail} ${n} || isNaN(${r})`)}};Cc.default=$2});var Kd=S(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});var ni=Y(),k2={message:({schemaCode:t})=>(0,ni.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,ni._)`{multipleOf: ${t}}`},C2={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:k2,code(t){let{gen:e,data:r,schemaCode:n,it:i}=t,o=i.opts.multipleOfPrecision,s=e.let("res"),a=o?(0,ni._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,ni._)`${s} !== parseInt(${s})`;t.fail$data((0,ni._)`(${n} === 0 || (${s} = ${r}/${n}, ${a}))`)}};Ec.default=C2});var Xd=S(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});function Yd(t){let e=t.length,r=0,n=0,i;for(;n<e;)r++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<e&&(i=t.charCodeAt(n),(i&64512)===56320&&n++);return r}Pc.default=Yd;Yd.code='require("ajv/dist/runtime/ucs2length").default'});var Qd=S(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});var vr=Y(),E2=te(),P2=Xd(),I2={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,vr.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,vr._)`{limit: ${t}}`},R2={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:I2,code(t){let{keyword:e,data:r,schemaCode:n,it:i}=t,o=e==="maxLength"?vr.operators.GT:vr.operators.LT,s=i.opts.unicode===!1?(0,vr._)`${r}.length`:(0,vr._)`${(0,E2.useFunc)(t.gen,P2.default)}(${r})`;t.fail$data((0,vr._)`${s} ${o} ${n}`)}};Ic.default=R2});var Zd=S(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});var O2=rt(),A2=te(),Zr=Y(),T2={message:({schemaCode:t})=>(0,Zr.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Zr._)`{pattern: ${t}}`},N2={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:T2,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:s}=t,a=s.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=s.opts.code,l=c.code==="new RegExp"?(0,Zr._)`new RegExp`:(0,A2.useFunc)(e,c),f=e.let("valid");e.try(()=>e.assign(f,(0,Zr._)`${l}(${o}, ${a}).test(${r})`),()=>e.assign(f,!1)),t.fail$data((0,Zr._)`!${f}`)}else{let c=(0,O2.usePattern)(t,i);t.fail$data((0,Zr._)`!${c}.test(${r})`)}}};Rc.default=N2});var eh=S(Oc=>{"use strict";Object.defineProperty(Oc,"__esModule",{value:!0});var ii=Y(),M2={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,ii.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,ii._)`{limit: ${t}}`},V2={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:M2,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?ii.operators.GT:ii.operators.LT;t.fail$data((0,ii._)`Object.keys(${r}).length ${i} ${n}`)}};Oc.default=V2});var th=S(Ac=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});var oi=rt(),si=Y(),L2=te(),j2={message:({params:{missingProperty:t}})=>(0,si.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,si._)`{missingProperty: ${t}}`},D2={keyword:"required",type:"object",schemaType:"array",$data:!0,error:j2,code(t){let{gen:e,schema:r,schemaCode:n,data:i,$data:o,it:s}=t,{opts:a}=s;if(!o&&r.length===0)return;let c=r.length>=a.loopRequired;if(s.allErrors?l():f(),a.strictRequired){let m=t.parentSchema.properties,{definedProperties:g}=t.it;for(let y of r)if(m?.[y]===void 0&&!g.has(y)){let _=s.schemaEnv.baseId+s.errSchemaPath,b=`required property "${y}" is not defined at "${_}" (strictRequired)`;(0,L2.checkStrictMode)(s,b,s.opts.strictRequired)}}function l(){if(c||o)t.block$data(si.nil,p);else for(let m of r)(0,oi.checkReportMissingProp)(t,m)}function f(){let m=e.let("missing");if(c||o){let g=e.let("valid",!0);t.block$data(g,()=>d(m,g)),t.ok(g)}else e.if((0,oi.checkMissingProp)(t,r,m)),(0,oi.reportMissingProp)(t,m),e.else()}function p(){e.forOf("prop",n,m=>{t.setParams({missingProperty:m}),e.if((0,oi.noPropertyInData)(e,i,m,a.ownProperties),()=>t.error())})}function d(m,g){t.setParams({missingProperty:m}),e.forOf(m,n,()=>{e.assign(g,(0,oi.propertyInData)(e,i,m,a.ownProperties)),e.if((0,si.not)(g),()=>{t.error(),e.break()})},si.nil)}}};Ac.default=D2});var rh=S(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});var ai=Y(),q2={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,ai.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,ai._)`{limit: ${t}}`},F2={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:q2,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?ai.operators.GT:ai.operators.LT;t.fail$data((0,ai._)`${r}.length ${i} ${n}`)}};Tc.default=F2});var Io=S(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});var nh=nc();nh.code='require("ajv/dist/runtime/equal").default';Nc.default=nh});var ih=S(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});var Mc=Gn(),Ee=Y(),H2=te(),B2=Io(),U2={message:({params:{i:t,j:e}})=>(0,Ee.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Ee._)`{i: ${t}, j: ${e}}`},W2={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:U2,code(t){let{gen:e,data:r,$data:n,schema:i,parentSchema:o,schemaCode:s,it:a}=t;if(!n&&!i)return;let c=e.let("valid"),l=o.items?(0,Mc.getSchemaTypes)(o.items):[];t.block$data(c,f,(0,Ee._)`${s} === false`),t.ok(c);function f(){let g=e.let("i",(0,Ee._)`${r}.length`),y=e.let("j");t.setParams({i:g,j:y}),e.assign(c,!0),e.if((0,Ee._)`${g} > 1`,()=>(p()?d:m)(g,y))}function p(){return l.length>0&&!l.some(g=>g==="object"||g==="array")}function d(g,y){let _=e.name("item"),b=(0,Mc.checkDataTypes)(l,_,a.opts.strictNumbers,Mc.DataType.Wrong),M=e.const("indices",(0,Ee._)`{}`);e.for((0,Ee._)`;${g}--;`,()=>{e.let(_,(0,Ee._)`${r}[${g}]`),e.if(b,(0,Ee._)`continue`),l.length>1&&e.if((0,Ee._)`typeof ${_} == "string"`,(0,Ee._)`${_} += "_"`),e.if((0,Ee._)`typeof ${M}[${_}] == "number"`,()=>{e.assign(y,(0,Ee._)`${M}[${_}]`),t.error(),e.assign(c,!1).break()}).code((0,Ee._)`${M}[${_}] = ${g}`)})}function m(g,y){let _=(0,H2.useFunc)(e,B2.default),b=e.name("outer");e.label(b).for((0,Ee._)`;${g}--;`,()=>e.for((0,Ee._)`${y} = ${g}; ${y}--;`,()=>e.if((0,Ee._)`${_}(${r}[${g}], ${r}[${y}])`,()=>{t.error(),e.assign(c,!1).break(b)})))}}};Vc.default=W2});var oh=S(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:!0});var Lc=Y(),G2=te(),z2=Io(),J2={message:"must be equal to constant",params:({schemaCode:t})=>(0,Lc._)`{allowedValue: ${t}}`},K2={keyword:"const",$data:!0,error:J2,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:o}=t;n||o&&typeof o=="object"?t.fail$data((0,Lc._)`!${(0,G2.useFunc)(e,z2.default)}(${r}, ${i})`):t.fail((0,Lc._)`${o} !== ${r}`)}};jc.default=K2});var sh=S(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});var ci=Y(),Y2=te(),X2=Io(),Q2={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,ci._)`{allowedValues: ${t}}`},Z2={keyword:"enum",schemaType:"array",$data:!0,error:Q2,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:s}=t;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let a=i.length>=s.opts.loopEnum,c,l=()=>c??(c=(0,Y2.useFunc)(e,X2.default)),f;if(a||n)f=e.let("valid"),t.block$data(f,p);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=e.const("vSchema",o);f=(0,ci.or)(...i.map((g,y)=>d(m,y)))}t.pass(f);function p(){e.assign(f,!1),e.forOf("v",o,m=>e.if((0,ci._)`${l()}(${r}, ${m})`,()=>e.assign(f,!0).break()))}function d(m,g){let y=i[g];return typeof y=="object"&&y!==null?(0,ci._)`${l()}(${r}, ${m}[${g}])`:(0,ci._)`${r} === ${y}`}}};Dc.default=Z2});var ah=S(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});var e1=Jd(),t1=Kd(),r1=Qd(),n1=Zd(),i1=eh(),o1=th(),s1=rh(),a1=ih(),c1=oh(),l1=sh(),u1=[e1.default,t1.default,r1.default,n1.default,i1.default,o1.default,s1.default,a1.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c1.default,l1.default];qc.default=u1});var Hc=S(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.validateAdditionalItems=void 0;var wr=Y(),Fc=te(),p1={message:({params:{len:t}})=>(0,wr.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,wr._)`{limit: ${t}}`},f1={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:p1,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,Fc.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}ch(t,n)}};function ch(t,e){let{gen:r,schema:n,data:i,keyword:o,it:s}=t;s.items=!0;let a=r.const("len",(0,wr._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,wr._)`${a} <= ${e.length}`);else if(typeof n=="object"&&!(0,Fc.alwaysValidSchema)(s,n)){let l=r.var("valid",(0,wr._)`${a} <= ${e.length}`);r.if((0,wr.not)(l),()=>c(l)),t.ok(l)}function c(l){r.forRange("i",e.length,a,f=>{t.subschema({keyword:o,dataProp:f,dataPropType:Fc.Type.Num},l),s.allErrors||r.if((0,wr.not)(l),()=>r.break())})}}li.validateAdditionalItems=ch;li.default=f1});var Bc=S(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.validateTuple=void 0;var lh=Y(),Ro=te(),d1=rt(),h1={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return uh(t,"additionalItems",e);r.items=!0,!(0,Ro.alwaysValidSchema)(r,e)&&t.ok((0,d1.validateArray)(t))}};function uh(t,e,r=t.schema){let{gen:n,parentSchema:i,data:o,keyword:s,it:a}=t;f(i),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=Ro.mergeEvaluated.items(n,r.length,a.items));let c=n.name("valid"),l=n.const("len",(0,lh._)`${o}.length`);r.forEach((p,d)=>{(0,Ro.alwaysValidSchema)(a,p)||(n.if((0,lh._)`${l} > ${d}`,()=>t.subschema({keyword:s,schemaProp:d,dataProp:d},c)),t.ok(c))});function f(p){let{opts:d,errSchemaPath:m}=a,g=r.length,y=g===p.minItems&&(g===p.maxItems||p[e]===!1);if(d.strictTuples&&!y){let _=`"${s}" is ${g}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,Ro.checkStrictMode)(a,_,d.strictTuples)}}}ui.validateTuple=uh;ui.default=h1});var ph=S(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});var m1=Bc(),g1={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,m1.validateTuple)(t,"items")};Uc.default=g1});var dh=S(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});var fh=Y(),y1=te(),v1=rt(),w1=Hc(),_1={message:({params:{len:t}})=>(0,fh.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,fh._)`{limit: ${t}}`},b1={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:_1,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,y1.alwaysValidSchema)(n,e)&&(i?(0,w1.validateAdditionalItems)(t,i):t.ok((0,v1.validateArray)(t)))}};Wc.default=b1});var hh=S(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});var it=Y(),Oo=te(),S1={message:({params:{min:t,max:e}})=>e===void 0?(0,it.str)`must contain at least ${t} valid item(s)`:(0,it.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,it._)`{minContains: ${t}}`:(0,it._)`{minContains: ${t}, maxContains: ${e}}`},x1={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:S1,code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t,s,a,{minContains:c,maxContains:l}=n;o.opts.next?(s=c===void 0?1:c,a=l):s=1;let f=e.const("len",(0,it._)`${i}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,Oo.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,Oo.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,Oo.alwaysValidSchema)(o,r)){let y=(0,it._)`${f} >= ${s}`;a!==void 0&&(y=(0,it._)`${y} && ${f} <= ${a}`),t.pass(y);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,it._)`${i}.length > 0`,d)):(e.let(p,!1),d()),t.result(p,()=>t.reset());function d(){let y=e.name("_valid"),_=e.let("count",0);m(y,()=>e.if(y,()=>g(_)))}function m(y,_){e.forRange("i",0,f,b=>{t.subschema({keyword:"contains",dataProp:b,dataPropType:Oo.Type.Num,compositeRule:!0},y),_()})}function g(y){e.code((0,it._)`${y}++`),a===void 0?e.if((0,it._)`${y} >= ${s}`,()=>e.assign(p,!0).break()):(e.if((0,it._)`${y} > ${a}`,()=>e.assign(p,!1).break()),s===1?e.assign(p,!0):e.if((0,it._)`${y} >= ${s}`,()=>e.assign(p,!0)))}}};Gc.default=x1});var Ao=S(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.validateSchemaDeps=St.validatePropertyDeps=St.error=void 0;var zc=Y(),$1=te(),pi=rt();St.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,zc.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,zc._)`{property: ${t},
64
+ || ${s} === "boolean" || ${i} === null`).assign(a,(0,Q._)`[${i}]`)}}}function X_({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,Q._)`${e} !== undefined`,()=>t.assign((0,Q._)`${e}[${r}]`,n))}function Qa(t,e,r,n=Gr.Correct){let i=n===Gr.Correct?Q.operators.EQ:Q.operators.NEQ,o;switch(t){case"null":return(0,Q._)`${e} ${i} null`;case"array":o=(0,Q._)`Array.isArray(${e})`;break;case"object":o=(0,Q._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=s((0,Q._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=s();break;default:return(0,Q._)`typeof ${e} ${i} ${t}`}return n===Gr.Correct?o:(0,Q.not)(o);function s(a=Q.nil){return(0,Q.and)((0,Q._)`typeof ${e} == "number"`,a,r?(0,Q._)`isFinite(${e})`:Q.nil)}}Ne.checkDataType=Qa;function Za(t,e,r,n){if(t.length===1)return Qa(t[0],e,r,n);let i,o=(0,Lf.toHash)(t);if(o.array&&o.object){let s=(0,Q._)`typeof ${e} != "object"`;i=o.null?s:(0,Q._)`!${e} || ${s}`,delete o.null,delete o.array,delete o.object}else i=Q.nil;o.number&&delete o.integer;for(let s in o)i=(0,Q.and)(i,Qa(s,e,r,n));return i}Ne.checkDataTypes=Za;var Q_={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,Q._)`{type: ${t}}`:(0,Q._)`{type: ${e}}`};function ec(t){let e=Z_(t);(0,G_.reportError)(e,Q_)}Ne.reportTypeError=ec;function Z_(t){let{gen:e,data:r,schema:n}=t,i=(0,Lf.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var Ff=S(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.assignDefaults=void 0;var zr=Y(),eb=te();function tb(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)qf(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,o)=>qf(t,o,i.default))}mo.assignDefaults=tb;function qf(t,e,r){let{gen:n,compositeRule:i,data:o,opts:s}=t;if(r===void 0)return;let a=(0,zr._)`${o}${(0,zr.getProperty)(e)}`;if(i){(0,eb.checkStrictMode)(t,`default is ignored for: ${a}`);return}let c=(0,zr._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,zr._)`${c} || ${a} === null || ${a} === ""`),n.if(c,(0,zr._)`${a} = ${(0,zr.stringify)(r)}`)}});var rt=S(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.validateUnion=le.validateArray=le.usePattern=le.callValidateCode=le.schemaProperties=le.allSchemaProperties=le.noPropertyInData=le.propertyInData=le.isOwnProperty=le.hasPropFunc=le.reportMissingProp=le.checkMissingProp=le.checkReportMissingProp=void 0;var me=Y(),tc=te(),Qt=tt(),rb=te();function nb(t,e){let{gen:r,data:n,it:i}=t;r.if(nc(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,me._)`${e}`},!0),t.error()})}le.checkReportMissingProp=nb;function ib({gen:t,data:e,it:{opts:r}},n,i){return(0,me.or)(...n.map(o=>(0,me.and)(nc(t,e,o,r.ownProperties),(0,me._)`${i} = ${o}`)))}le.checkMissingProp=ib;function ob(t,e){t.setParams({missingProperty:e},!0),t.error()}le.reportMissingProp=ob;function Hf(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,me._)`Object.prototype.hasOwnProperty`})}le.hasPropFunc=Hf;function rc(t,e,r){return(0,me._)`${Hf(t)}.call(${e}, ${r})`}le.isOwnProperty=rc;function sb(t,e,r,n){let i=(0,me._)`${e}${(0,me.getProperty)(r)} !== undefined`;return n?(0,me._)`${i} && ${rc(t,e,r)}`:i}le.propertyInData=sb;function nc(t,e,r,n){let i=(0,me._)`${e}${(0,me.getProperty)(r)} === undefined`;return n?(0,me.or)(i,(0,me.not)(rc(t,e,r))):i}le.noPropertyInData=nc;function Bf(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}le.allSchemaProperties=Bf;function ab(t,e){return Bf(e).filter(r=>!(0,tc.alwaysValidSchema)(t,e[r]))}le.schemaProperties=ab;function cb({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:s},a,c,l){let f=l?(0,me._)`${t}, ${e}, ${n}${i}`:e,p=[[Qt.default.instancePath,(0,me.strConcat)(Qt.default.instancePath,o)],[Qt.default.parentData,s.parentData],[Qt.default.parentDataProperty,s.parentDataProperty],[Qt.default.rootData,Qt.default.rootData]];s.opts.dynamicRef&&p.push([Qt.default.dynamicAnchors,Qt.default.dynamicAnchors]);let d=(0,me._)`${f}, ${r.object(...p)}`;return c!==me.nil?(0,me._)`${a}.call(${c}, ${d})`:(0,me._)`${a}(${d})`}le.callValidateCode=cb;var lb=(0,me._)`new RegExp`;function ub({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:i}=e.code,o=i(r,n);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,me._)`${i.code==="new RegExp"?lb:(0,rb.useFunc)(t,i)}(${r}, ${n})`})}le.usePattern=ub;function pb(t){let{gen:e,data:r,keyword:n,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,me._)`${r}.length`);e.forRange("i",0,c,l=>{t.subschema({keyword:n,dataProp:l,dataPropType:tc.Type.Num},o),e.if((0,me.not)(o),a)})}}le.validateArray=pb;function fb(t){let{gen:e,schema:r,keyword:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,tc.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let s=e.let("valid",!1),a=e.name("_valid");e.block(()=>r.forEach((c,l)=>{let f=t.subschema({keyword:n,schemaProp:l,compositeRule:!0},a);e.assign(s,(0,me._)`${s} || ${a}`),t.mergeValidEvaluated(f,a)||e.if((0,me.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}le.validateUnion=fb});var Gf=S(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.validateKeywordUsage=bt.validSchemaType=bt.funcKeywordCode=bt.macroKeywordCode=void 0;var je=Y(),hr=tt(),db=rt(),hb=Wn();function mb(t,e){let{gen:r,keyword:n,schema:i,parentSchema:o,it:s}=t,a=e.macro.call(s.self,i,o,s),c=Wf(r,n,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let l=r.name("valid");t.subschema({schema:a,schemaPath:je.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),t.pass(l,()=>t.error(!0))}bt.macroKeywordCode=mb;function gb(t,e){var r;let{gen:n,keyword:i,schema:o,parentSchema:s,$data:a,it:c}=t;vb(c,e);let l=!a&&e.compile?e.compile.call(c.self,o,s,c):e.validate,f=Wf(n,i,l),p=n.let("valid");t.block$data(p,d),t.ok((r=e.valid)!==null&&r!==void 0?r:p);function d(){if(e.errors===!1)y(),e.modifying&&Uf(t),_(()=>t.error());else{let b=e.async?m():g();e.modifying&&Uf(t),_(()=>yb(t,b))}}function m(){let b=n.let("ruleErrs",null);return n.try(()=>y((0,je._)`await `),M=>n.assign(p,!1).if((0,je._)`${M} instanceof ${c.ValidationError}`,()=>n.assign(b,(0,je._)`${M}.errors`),()=>n.throw(M))),b}function g(){let b=(0,je._)`${f}.errors`;return n.assign(b,null),y(je.nil),b}function y(b=e.async?(0,je._)`await `:je.nil){let M=c.opts.passContext?hr.default.this:hr.default.self,q=!("compile"in e&&!a||e.schema===!1);n.assign(p,(0,je._)`${b}${(0,db.callValidateCode)(t,f,M,q)}`,e.modifying)}function _(b){var M;n.if((0,je.not)((M=e.valid)!==null&&M!==void 0?M:p),b)}}bt.funcKeywordCode=gb;function Uf(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,je._)`${n.parentData}[${n.parentDataProperty}]`))}function yb(t,e){let{gen:r}=t;r.if((0,je._)`Array.isArray(${e})`,()=>{r.assign(hr.default.vErrors,(0,je._)`${hr.default.vErrors} === null ? ${e} : ${hr.default.vErrors}.concat(${e})`).assign(hr.default.errors,(0,je._)`${hr.default.vErrors}.length`),(0,hb.extendErrors)(t)},()=>t.error())}function vb({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function Wf(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,je.stringify)(r)})}function wb(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}bt.validSchemaType=wb;function _b({schema:t,opts:e,self:r,errSchemaPath:n},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 "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}bt.validateKeywordUsage=_b});var Jf=S(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.extendSubschemaMode=Zt.extendSubschemaData=Zt.getSubschema=void 0;var St=Y(),zf=te();function bb(t,{keyword:e,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:s}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let a=t.schema[e];return r===void 0?{schema:a,schemaPath:(0,St._)`${t.schemaPath}${(0,St.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[r],schemaPath:(0,St._)`${t.schemaPath}${(0,St.getProperty)(e)}${(0,St.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,zf.escapeFragment)(r)}`}}if(n!==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:n,schemaPath:i,topSchemaRef:s,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}Zt.getSubschema=bb;function Sb(t,e,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:s}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(r!==void 0){let{errorPath:l,dataPathArr:f,opts:p}=e,d=a.let("data",(0,St._)`${e.data}${(0,St.getProperty)(r)}`,!0);c(d),t.errorPath=(0,St.str)`${l}${(0,zf.getErrorPath)(r,n,p.jsPropertySyntax)}`,t.parentDataProperty=(0,St._)`${r}`,t.dataPathArr=[...f,t.parentDataProperty]}if(i!==void 0){let l=i instanceof St.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]}}Zt.extendSubschemaData=Sb;function xb(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(t.compositeRule=n),i!==void 0&&(t.createErrors=i),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=r}Zt.extendSubschemaMode=xb});var ic=S((FI,Kf)=>{"use strict";Kf.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var s=o[i];if(!t(e[s],r[s]))return!1}return!0}return e!==e&&r!==r}});var Xf=S((HI,Yf)=>{"use strict";var er=Yf.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};go(e,n,i,t,"",t)};er.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};er.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};er.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};er.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 go(t,e,r,n,i,o,s,a,c,l){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,o,s,a,c,l);for(var f in n){var p=n[f];if(Array.isArray(p)){if(f in er.arrayKeywords)for(var d=0;d<p.length;d++)go(t,e,r,p[d],i+"/"+f+"/"+d,o,i,f,n,d)}else if(f in er.propsKeywords){if(p&&typeof p=="object")for(var m in p)go(t,e,r,p[m],i+"/"+f+"/"+$b(m),o,i,f,n,m)}else(f in er.keywords||t.allKeys&&!(f in er.skipKeywords))&&go(t,e,r,p,i+"/"+f,o,i,f,n)}r(n,i,o,s,a,c,l)}}function $b(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var zn=S(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.getSchemaRefs=We.resolveUrl=We.normalizeId=We._getFullPath=We.getFullPath=We.inlineRef=void 0;var kb=te(),Cb=ic(),Eb=Xf(),Pb=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Rb(t,e=!0){return typeof t=="boolean"?!0:e===!0?!oc(t):e?Qf(t)<=e:!1}We.inlineRef=Rb;var Ib=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function oc(t){for(let e in t){if(Ib.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(oc)||typeof r=="object"&&oc(r))return!0}return!1}function Qf(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!Pb.has(r)&&(typeof t[r]=="object"&&(0,kb.eachItem)(t[r],n=>e+=Qf(n)),e===1/0))return 1/0}return e}function Zf(t,e="",r){r!==!1&&(e=Jr(e));let n=t.parse(e);return ed(t,n)}We.getFullPath=Zf;function ed(t,e){return t.serialize(e).split("#")[0]+"#"}We._getFullPath=ed;var Ob=/#\/?$/;function Jr(t){return t?t.replace(Ob,""):""}We.normalizeId=Jr;function Ab(t,e,r){return r=Jr(r),t.resolve(e,r)}We.resolveUrl=Ab;var Tb=/^[a-z_][-a-z0-9._]*$/i;function Nb(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=Jr(t[r]||e),o={"":i},s=Zf(n,i,!1),a={},c=new Set;return Eb(t,{allKeys:!0},(p,d,m,g)=>{if(g===void 0)return;let y=s+d,_=o[g];typeof p[r]=="string"&&(_=b.call(this,p[r])),M.call(this,p.$anchor),M.call(this,p.$dynamicAnchor),o[d]=_;function b(q){let A=this.opts.uriResolver.resolve;if(q=Jr(_?A(_,q):q),c.has(q))throw f(q);c.add(q);let T=this.refs[q];return typeof T=="string"&&(T=this.refs[T]),typeof T=="object"?l(p,T.schema,q):q!==Jr(y)&&(q[0]==="#"?(l(p,a[q],q),a[q]=p):this.refs[q]=y),q}function M(q){if(typeof q=="string"){if(!Tb.test(q))throw new Error(`invalid anchor "${q}"`);b.call(this,`#${q}`)}}}),a;function l(p,d,m){if(d!==void 0&&!Cb(p,d))throw f(m)}function f(p){return new Error(`reference "${p}" resolves to more than one schema`)}}We.getSchemaRefs=Nb});var Yn=S(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.getData=tr.KeywordCxt=tr.validateFunctionCode=void 0;var od=Nf(),td=Gn(),ac=Xa(),yo=Gn(),Mb=Ff(),Kn=Gf(),sc=Jf(),B=Y(),J=tt(),Vb=zn(),Dt=te(),Jn=Wn();function Lb(t){if(cd(t)&&(ld(t),ad(t))){qb(t);return}sd(t,()=>(0,od.topBoolOrEmptySchema)(t))}tr.validateFunctionCode=Lb;function sd({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},o){i.code.es5?t.func(e,(0,B._)`${J.default.data}, ${J.default.valCxt}`,n.$async,()=>{t.code((0,B._)`"use strict"; ${rd(r,i)}`),Db(t,i),t.code(o)}):t.func(e,(0,B._)`${J.default.data}, ${jb(i)}`,n.$async,()=>t.code(rd(r,i)).code(o))}function jb(t){return(0,B._)`{${J.default.instancePath}="", ${J.default.parentData}, ${J.default.parentDataProperty}, ${J.default.rootData}=${J.default.data}${t.dynamicRef?(0,B._)`, ${J.default.dynamicAnchors}={}`:B.nil}}={}`}function Db(t,e){t.if(J.default.valCxt,()=>{t.var(J.default.instancePath,(0,B._)`${J.default.valCxt}.${J.default.instancePath}`),t.var(J.default.parentData,(0,B._)`${J.default.valCxt}.${J.default.parentData}`),t.var(J.default.parentDataProperty,(0,B._)`${J.default.valCxt}.${J.default.parentDataProperty}`),t.var(J.default.rootData,(0,B._)`${J.default.valCxt}.${J.default.rootData}`),e.dynamicRef&&t.var(J.default.dynamicAnchors,(0,B._)`${J.default.valCxt}.${J.default.dynamicAnchors}`)},()=>{t.var(J.default.instancePath,(0,B._)`""`),t.var(J.default.parentData,(0,B._)`undefined`),t.var(J.default.parentDataProperty,(0,B._)`undefined`),t.var(J.default.rootData,J.default.data),e.dynamicRef&&t.var(J.default.dynamicAnchors,(0,B._)`{}`)})}function qb(t){let{schema:e,opts:r,gen:n}=t;sd(t,()=>{r.$comment&&e.$comment&&pd(t),Wb(t),n.let(J.default.vErrors,null),n.let(J.default.errors,0),r.unevaluated&&Fb(t),ud(t),Jb(t)})}function Fb(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,B._)`${r}.evaluated`),e.if((0,B._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,B._)`${t.evaluated}.props`,(0,B._)`undefined`)),e.if((0,B._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,B._)`${t.evaluated}.items`,(0,B._)`undefined`))}function rd(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,B._)`/*# sourceURL=${r} */`:B.nil}function Hb(t,e){if(cd(t)&&(ld(t),ad(t))){Bb(t,e);return}(0,od.boolOrEmptySchema)(t,e)}function ad({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function cd(t){return typeof t.schema!="boolean"}function Bb(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&pd(t),Gb(t),zb(t);let o=n.const("_errs",J.default.errors);ud(t,o),n.var(e,(0,B._)`${o} === ${J.default.errors}`)}function ld(t){(0,Dt.checkUnknownRules)(t),Ub(t)}function ud(t,e){if(t.opts.jtd)return nd(t,[],!1,e);let r=(0,td.getSchemaTypes)(t.schema),n=(0,td.coerceAndCheckDataType)(t,r);nd(t,r,!n,e)}function Ub(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Dt.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Wb(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Dt.checkStrictMode)(t,"default is ignored in the schema root")}function Gb(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,Vb.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function zb(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function pd({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)t.code((0,B._)`${J.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let s=(0,B.str)`${n}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,B._)`${J.default.self}.opts.$comment(${o}, ${s}, ${a}.schema)`)}}function Jb(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=t;r.$async?e.if((0,B._)`${J.default.errors} === 0`,()=>e.return(J.default.data),()=>e.throw((0,B._)`new ${i}(${J.default.vErrors})`)):(e.assign((0,B._)`${n}.errors`,J.default.vErrors),o.unevaluated&&Kb(t),e.return((0,B._)`${J.default.errors} === 0`))}function Kb({gen:t,evaluated:e,props:r,items:n}){r instanceof B.Name&&t.assign((0,B._)`${e}.props`,r),n instanceof B.Name&&t.assign((0,B._)`${e}.items`,n)}function nd(t,e,r,n){let{gen:i,schema:o,data:s,allErrors:a,opts:c,self:l}=t,{RULES:f}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,Dt.schemaHasRulesButRef)(o,f))){i.block(()=>dd(t,"$ref",f.all.$ref.definition));return}c.jtd||Yb(t,e),i.block(()=>{for(let d of f.rules)p(d);p(f.post)});function p(d){(0,ac.shouldUseGroup)(o,d)&&(d.type?(i.if((0,yo.checkDataType)(d.type,s,c.strictNumbers)),id(t,d),e.length===1&&e[0]===d.type&&r&&(i.else(),(0,yo.reportTypeError)(t)),i.endIf()):id(t,d),a||i.if((0,B._)`${J.default.errors} === ${n||0}`))}}function id(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,Mb.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0,ac.shouldUseRule)(n,o)&&dd(t,o.keyword,o.definition,e.type)})}function Yb(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(Xb(t,e),t.opts.allowUnionTypes||Qb(t,e),Zb(t,t.dataTypes))}function Xb(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{fd(t.dataTypes,r)||cc(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),t0(t,e)}}function Qb(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&cc(t,"use allowUnionTypes to allow union type keyword")}function Zb(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,ac.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(s=>e0(e,s))&&cc(t,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function e0(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function fd(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function t0(t,e){let r=[];for(let n of t.dataTypes)fd(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function cc(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Dt.checkStrictMode)(t,e,t.opts.strictTypes)}var vo=class{constructor(e,r,n){if((0,Kn.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Dt.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",hd(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Kn.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",J.default.errors))}result(e,r,n){this.failResult((0,B.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,B.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,B._)`${r} !== undefined && (${(0,B.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?Jn.reportExtraError:Jn.reportError)(this,this.def.error,r)}$dataError(){(0,Jn.reportError)(this,this.def.$dataError||Jn.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Jn.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=B.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=B.nil,r=B.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:s}=this;n.if((0,B.or)((0,B._)`${i} === undefined`,r)),e!==B.nil&&n.assign(e,!0),(o.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==B.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,B.or)(s(),a());function s(){if(n.length){if(!(r instanceof B.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,B._)`${(0,yo.checkDataTypes)(c,r,o.opts.strictNumbers,yo.DataType.Wrong)}`}return B.nil}function a(){if(i.validateSchema){let c=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,B._)`!${c}(${r})`}return B.nil}}subschema(e,r){let n=(0,sc.getSubschema)(this.it,e);(0,sc.extendSubschemaData)(n,this.it,e),(0,sc.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return Hb(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Dt.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Dt.mergeEvaluated.items(i,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(e,B.Name)),!0}};tr.KeywordCxt=vo;function dd(t,e,r,n){let i=new vo(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Kn.funcKeywordCode)(i,r):"macro"in r?(0,Kn.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Kn.funcKeywordCode)(i,r)}var r0=/^\/(?:[^~]|~0|~1)*$/,n0=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function hd(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,o;if(t==="")return J.default.rootData;if(t[0]==="/"){if(!r0.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=J.default.rootData}else{let l=n0.exec(t);if(!l)throw new Error(`Invalid JSON-pointer: ${t}`);let f=+l[1];if(i=l[2],i==="#"){if(f>=e)throw new Error(c("property/index",f));return n[e-f]}if(f>e)throw new Error(c("data",f));if(o=r[e-f],!i)return o}let s=o,a=i.split("/");for(let l of a)l&&(o=(0,B._)`${o}${(0,B.getProperty)((0,Dt.unescapeJsonPointer)(l))}`,s=(0,B._)`${s} && ${o}`);return s;function c(l,f){return`Cannot access ${l} ${f} levels up, current level is ${e}`}}tr.getData=hd});var wo=S(uc=>{"use strict";Object.defineProperty(uc,"__esModule",{value:!0});var lc=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};uc.default=lc});var Xn=S(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});var pc=zn(),fc=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,pc.resolveUrl)(e,r,n),this.missingSchema=(0,pc.normalizeId)((0,pc.getFullPath)(e,this.missingRef))}};dc.default=fc});var Qn=S(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.resolveSchema=nt.getCompilingSchema=nt.resolveRef=nt.compileSchema=nt.SchemaEnv=void 0;var dt=Y(),i0=wo(),mr=tt(),ht=zn(),md=te(),o0=Yn(),Kr=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,ht.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};nt.SchemaEnv=Kr;function mc(t){let e=gd.call(this,t);if(e)return e;let r=(0,ht.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,s=new dt.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),a;t.$async&&(a=s.scopeValue("Error",{ref:i0.default,code:(0,dt._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");t.validateName=c;let l={gen:s,allErrors:this.opts.allErrors,data:mr.default.data,parentData:mr.default.parentData,parentDataProperty:mr.default.parentDataProperty,dataNames:[mr.default.data],dataPathArr:[dt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,dt.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:dt.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,dt._)`""`,opts:this.opts,self:this},f;try{this._compilations.add(t),(0,o0.validateFunctionCode)(l),s.optimize(this.opts.code.optimize);let p=s.toString();f=`${s.scopeRefs(mr.default.scope)}return ${p}`,this.opts.code.process&&(f=this.opts.code.process(f,t));let m=new Function(`${mr.default.self}`,`${mr.default.scope}`,f)(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:g,items:y}=l;m.evaluated={props:g instanceof dt.Name?void 0:g,items:y instanceof dt.Name?void 0:y,dynamicProps:g instanceof dt.Name,dynamicItems:y instanceof dt.Name},m.source&&(m.source.evaluated=(0,dt.stringify)(m.evaluated))}return t.validate=m,t}catch(p){throw delete t.validate,delete t.validateName,f&&this.logger.error("Error compiling schema, function code:",f),p}finally{this._compilations.delete(t)}}nt.compileSchema=mc;function s0(t,e,r){var n;r=(0,ht.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let o=l0.call(this,t,r);if(o===void 0){let s=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;s&&(o=new Kr({schema:s,schemaId:a,root:t,baseId:e}))}if(o!==void 0)return t.refs[r]=a0.call(this,o)}nt.resolveRef=s0;function a0(t){return(0,ht.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:mc.call(this,t)}function gd(t){for(let e of this._compilations)if(c0(e,t))return e}nt.getCompilingSchema=gd;function c0(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function l0(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||_o.call(this,t,e)}function _o(t,e){let r=this.opts.uriResolver.parse(e),n=(0,ht._getFullPath)(this.opts.uriResolver,r),i=(0,ht.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return hc.call(this,r,t);let o=(0,ht.normalizeId)(n),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){let a=_o.call(this,t,s);return typeof a?.schema!="object"?void 0:hc.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||mc.call(this,s),o===(0,ht.normalizeId)(e)){let{schema:a}=s,{schemaId:c}=this.opts,l=a[c];return l&&(i=(0,ht.resolveUrl)(this.opts.uriResolver,i,l)),new Kr({schema:a,schemaId:c,root:t,baseId:i})}return hc.call(this,r,s)}}nt.resolveSchema=_o;var u0=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function hc(t,{baseId:e,schema:r,root:n}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,md.unescapeFragment)(a)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!u0.has(a)&&l&&(e=(0,ht.resolveUrl)(this.opts.uriResolver,e,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,md.schemaHasRulesButRef)(r,this.RULES)){let a=(0,ht.resolveUrl)(this.opts.uriResolver,e,r.$ref);o=_o.call(this,n,a)}let{schemaId:s}=this.opts;if(o=o||new Kr({schema:r,schemaId:s,root:n,baseId:e}),o.schema!==o.root.schema)return o}});var yd=S((JI,p0)=>{p0.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 vc=S((KI,xd)=>{"use strict";var f0=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),wd=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),gc=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),_d=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),d0=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function yc(t){let e="",r=0,n=0;for(n=0;n<t.length;n++)if(r=t[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n];break}for(n+=1;n<t.length;n++){if(r=t[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n]}return e}var h0=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function vd(t){return t.length=0,!0}function m0(t,e,r){if(t.length){let n=yc(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function g0(t){let e=0,r={error:!1,address:"",zone:""},n=[],i=[],o=!1,s=!1,a=m0;for(let c=0;c<t.length;c++){let l=t[c];if(!(l==="["||l==="]"))if(l===":"){if(o===!0&&(s=!0),!a(i,n,r))break;if(++e>7){r.error=!0;break}c>0&&t[c-1]===":"&&(o=!0),n.push(":");continue}else if(l==="%"){if(!a(i,n,r))break;a=vd}else{i.push(l);continue}}return i.length&&(a===vd?r.zone=i.join(""):s?n.push(i.join("")):n.push(yc(i))),r.address=n.join(""),r}function bd(t){if(y0(t,":")<2)return{host:t,isIPV6:!1};let e=g0(t);if(e.error)return{host:t,isIPV6:!1};{let r=e.address,n=e.address;return e.zone&&(r+="%"+e.zone,n+="%25"+e.zone),{host:r,isIPV6:!0,escapedHost:n}}}function y0(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function v0(t){let e=t,r=[],n=-1,i=0;for(;i=e.length;){if(i===1){if(e===".")break;if(e==="/"){r.push("/");break}else{r.push(e);break}}else if(i===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){r.push("/");break}}else if(i===3&&e==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),r.length!==0&&r.pop();continue}}if((n=e.indexOf("/",1))===-1){r.push(e);break}else r.push(e.slice(0,n)),e=e.slice(n)}return r.join("")}var w0={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},_0=/[@/?#:]/g,b0=/[@/?#]/g;function Sd(t,e){let r=e?b0:_0;return r.lastIndex=0,t.replace(r,n=>w0[n])}function S0(t,e=!1){if(t.indexOf("%")===-1)return t;let r="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){let i=t.slice(n+1,n+3);if(gc(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));e&&_d(s)?r+=s:r+="%"+o,n+=2;continue}}r+=t[n]}return r}function x0(t){let e="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let n=t.slice(r+1,r+3);if(gc(n)){let i=n.toUpperCase(),o=String.fromCharCode(parseInt(i,16));o!=="."&&_d(o)?e+=o:e+="%"+i,r+=2;continue}}d0(t[r])?e+=t[r]:e+=escape(t[r])}return e}function $0(t){let e="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let n=t.slice(r+1,r+3);if(gc(n)){e+="%"+n.toUpperCase(),r+=2;continue}}e+=escape(t[r])}return e}function k0(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!wd(r)){let n=bd(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=Sd(r,!1)}e.push(r)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}xd.exports={nonSimpleDomain:h0,recomposeAuthority:k0,reescapeHostDelimiters:Sd,normalizePercentEncoding:S0,normalizePathEncoding:x0,escapePreservingEscapes:$0,removeDotSegments:v0,isIPv4:wd,isUUID:f0,normalizeIPv6:bd,stringArrayToHexStripped:yc}});var Pd=S((YI,Ed)=>{"use strict";var{isUUID:C0}=vc(),E0=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,P0=["http","https","ws","wss","urn","urn:uuid"];function R0(t){return P0.indexOf(t)!==-1}function wc(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 $d(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function kd(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 I0(t){return t.secure=wc(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function O0(t){if((t.port===(wc(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}function A0(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(E0);if(r){let n=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let i=`${n}:${e.nid||t.nid}`,o=_c(i);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function T0(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=e.scheme||t.scheme||"urn",n=t.nid.toLowerCase(),i=`${r}:${e.nid||n}`,o=_c(i);o&&(t=o.serialize(t,e));let s=t,a=t.nss;return s.path=`${n||e.nid}:${a}`,e.skipEscape=!0,s}function N0(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!C0(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function M0(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var Cd={scheme:"http",domainHost:!0,parse:$d,serialize:kd},V0={scheme:"https",domainHost:Cd.domainHost,parse:$d,serialize:kd},bo={scheme:"ws",domainHost:!0,parse:I0,serialize:O0},L0={scheme:"wss",domainHost:bo.domainHost,parse:bo.parse,serialize:bo.serialize},j0={scheme:"urn",parse:A0,serialize:T0,skipNormalize:!0},D0={scheme:"urn:uuid",parse:N0,serialize:M0,skipNormalize:!0},So={http:Cd,https:V0,ws:bo,wss:L0,urn:j0,"urn:uuid":D0};Object.setPrototypeOf(So,null);function _c(t){return t&&(So[t]||So[t.toLowerCase()])||void 0}Ed.exports={wsIsSecure:wc,SCHEMES:So,isValidSchemeName:R0,getSchemeHandler:_c}});var Nd=S((XI,xo)=>{"use strict";var{normalizeIPv6:q0,removeDotSegments:Zn,recomposeAuthority:F0,normalizePercentEncoding:H0,normalizePathEncoding:B0,escapePreservingEscapes:U0,reescapeHostDelimiters:W0,isIPv4:G0,nonSimpleDomain:z0}=vc(),{SCHEMES:J0,getSchemeHandler:Id}=Pd();function K0(t,e){return typeof t=="string"?t=e2(t,e):typeof t=="object"&&(t=Yr(gr(t,e),e)),t}function Y0(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=Od(Yr(t,n),Yr(e,n),n,!0);return n.skipEscape=!0,gr(i,n)}function Od(t,e,r,n){let i={};return n||(t=Yr(gr(t,r),r),e=Yr(gr(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(i.scheme=e.scheme,i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=Zn(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=Zn(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=Zn(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=Zn(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 X0(t,e,r){let n=Rd(t,r),i=Rd(e,r);return n!==void 0&&i!==void 0&&n.toLowerCase()===i.toLowerCase()}function gr(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},n=Object.assign({},e),i=[],o=Id(n.scheme||r.scheme);o&&o.serialize&&o.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=H0(r.path):(r.path=U0(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let s=F0(r);if(s!==void 0&&(n.reference!=="suffix"&&i.push("//"),i.push(s),r.path&&r.path[0]!=="/"&&i.push("/")),r.path!==void 0){let a=r.path;!n.absolutePath&&(!o||!o.absolutePath)&&(a=Zn(a)),s===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),i.push(a)}return r.query!==void 0&&i.push("?",r.query),r.fragment!==void 0&&i.push("#",r.fragment),i.join("")}var Q0=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Z0(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 Ad(t,e){let r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1,o=!1;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);let s=t.match(Q0);if(s){n.scheme=s[1],n.userinfo=s[3],n.host=s[4],n.port=parseInt(s[5],10),n.path=s[6]||"",n.query=s[7],n.fragment=s[8],isNaN(n.port)&&(n.port=s[5]);let a=Z0(n,s);if(a!==void 0&&(n.error=n.error||a,i=!0),n.host)if(G0(n.host)===!1){let f=q0(n.host);n.host=f.host.toLowerCase(),o=f.isIPV6}else o=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let c=Id(r.scheme||n.scheme);if(!r.unicodeSupport&&(!c||!c.unicodeSupport)&&n.host&&(r.domainHost||c&&c.domainHost)&&o===!1&&z0(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(l){n.error=n.error||"Host's domain name can not be converted to ASCII: "+l}if((!c||c&&!c.skipNormalize)&&(t.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=W0(unescape(n.host),o))),n.path&&(n.path=B0(n.path)),n.fragment))try{n.fragment=encodeURI(decodeURIComponent(n.fragment))}catch{n.error=n.error||"URI malformed"}c&&c.parse&&c.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:i}}function Yr(t,e){return Ad(t,e).parsed}function e2(t,e){return Td(t,e).normalized}function Td(t,e){let{parsed:r,malformedAuthorityOrPort:n}=Ad(t,e);return{normalized:n?t:gr(r,e),malformedAuthorityOrPort:n}}function Rd(t,e){if(typeof t=="string"){let{normalized:r,malformedAuthorityOrPort:n}=Td(t,e);return n?void 0:r}if(typeof t=="object")return gr(t,e)}var bc={SCHEMES:J0,normalize:K0,resolve:Y0,resolveComponent:Od,equal:X0,serialize:gr,parse:Yr};xo.exports=bc;xo.exports.default=bc;xo.exports.fastUri=bc});var Vd=S(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});var Md=Nd();Md.code='require("ajv/dist/runtime/uri").default';Sc.default=Md});var Ud=S(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.CodeGen=Ce.Name=Ce.nil=Ce.stringify=Ce.str=Ce._=Ce.KeywordCxt=void 0;var t2=Yn();Object.defineProperty(Ce,"KeywordCxt",{enumerable:!0,get:function(){return t2.KeywordCxt}});var Xr=Y();Object.defineProperty(Ce,"_",{enumerable:!0,get:function(){return Xr._}});Object.defineProperty(Ce,"str",{enumerable:!0,get:function(){return Xr.str}});Object.defineProperty(Ce,"stringify",{enumerable:!0,get:function(){return Xr.stringify}});Object.defineProperty(Ce,"nil",{enumerable:!0,get:function(){return Xr.nil}});Object.defineProperty(Ce,"Name",{enumerable:!0,get:function(){return Xr.Name}});Object.defineProperty(Ce,"CodeGen",{enumerable:!0,get:function(){return Xr.CodeGen}});var r2=wo(),Fd=Xn(),n2=Ya(),ei=Qn(),i2=Y(),ti=zn(),$o=Gn(),$c=te(),Ld=yd(),o2=Vd(),Hd=(t,e)=>new RegExp(t,e);Hd.code="new RegExp";var s2=["removeAdditional","useDefaults","coerceTypes"],a2=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),c2={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."},l2={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},jd=200;function u2(t){var e,r,n,i,o,s,a,c,l,f,p,d,m,g,y,_,b,M,q,A,T,V,X,fe,Ie;let ke=t.strict,Fe=(e=t.code)===null||e===void 0?void 0:e.optimize,Oe=Fe===!0||Fe===void 0?1:Fe||0,at=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:Hd,ct=(i=t.uriResolver)!==null&&i!==void 0?i:o2.default;return{strictSchema:(s=(o=t.strictSchema)!==null&&o!==void 0?o:ke)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=t.strictNumbers)!==null&&a!==void 0?a:ke)!==null&&c!==void 0?c:!0,strictTypes:(f=(l=t.strictTypes)!==null&&l!==void 0?l:ke)!==null&&f!==void 0?f:"log",strictTuples:(d=(p=t.strictTuples)!==null&&p!==void 0?p:ke)!==null&&d!==void 0?d:"log",strictRequired:(g=(m=t.strictRequired)!==null&&m!==void 0?m:ke)!==null&&g!==void 0?g:!1,code:t.code?{...t.code,optimize:Oe,regExp:at}:{optimize:Oe,regExp:at},loopRequired:(y=t.loopRequired)!==null&&y!==void 0?y:jd,loopEnum:(_=t.loopEnum)!==null&&_!==void 0?_:jd,meta:(b=t.meta)!==null&&b!==void 0?b:!0,messages:(M=t.messages)!==null&&M!==void 0?M:!0,inlineRefs:(q=t.inlineRefs)!==null&&q!==void 0?q:!0,schemaId:(A=t.schemaId)!==null&&A!==void 0?A:"$id",addUsedSchema:(T=t.addUsedSchema)!==null&&T!==void 0?T:!0,validateSchema:(V=t.validateSchema)!==null&&V!==void 0?V:!0,validateFormats:(X=t.validateFormats)!==null&&X!==void 0?X:!0,unicodeRegExp:(fe=t.unicodeRegExp)!==null&&fe!==void 0?fe:!0,int32range:(Ie=t.int32range)!==null&&Ie!==void 0?Ie:!0,uriResolver:ct}}var ri=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,...u2(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new i2.ValueScope({scope:{},prefixes:a2,es5:r,lines:n}),this.logger=g2(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,n2.getRules)(),Dd.call(this,c2,e,"NOT SUPPORTED"),Dd.call(this,l2,e,"DEPRECATED","warn"),this._metaOpts=h2.call(this),e.formats&&f2.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&d2.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),p2.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=Ld;n==="id"&&(i={...Ld},i.id=i.$id,delete i.$id),r&&e&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,e,r);async function i(f,p){await o.call(this,f.$schema);let d=this._addSchema(f,p);return d.validate||s.call(this,d)}async function o(f){f&&!this.getSchema(f)&&await i.call(this,{$ref:f},!0)}async function s(f){try{return this._compileSchemaEnv(f)}catch(p){if(!(p instanceof Fd.default))throw p;return a.call(this,p),await c.call(this,p.missingSchema),s.call(this,f)}}function a({missingSchema:f,missingRef:p}){if(this.refs[f])throw new Error(`AnySchema ${f} is loaded but ${p} cannot be resolved`)}async function c(f){let p=await l.call(this,f);this.refs[f]||await o.call(this,p.$schema),this.refs[f]||this.addSchema(p,f,r)}async function l(f){let p=this._loading[f];if(p)return p;try{return await(this._loading[f]=n(f))}finally{delete this._loading[f]}}}addSchema(e,r,n,i=this.opts.validateSchema){if(Array.isArray(e)){for(let s of e)this.addSchema(s,void 0,n,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 r=(0,ti.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,i,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,e);if(!i&&r){let 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 r;for(;typeof(r=qd.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new ei.SchemaEnv({schema:{},schemaId:n});if(r=ei.resolveSchema.call(this,i,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=qd.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,ti.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(v2.call(this,n,r),!r)return(0,$c.eachItem)(n,o=>xc.call(this,o)),this;_2.call(this,r);let i={...r,type:(0,$o.getJSONTypes)(r.type),schemaType:(0,$o.getJSONTypes)(r.schemaType)};return(0,$c.eachItem)(n,i.type.length===0?o=>xc.call(this,o,i):o=>i.type.forEach(s=>xc.call(this,o,i,s))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===e);i>=0&&n.rules.splice(i,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of r){let o=i.split("/").slice(1),s=e;for(let a of o)s=s[a];for(let a in n){let c=n[a];if(typeof c!="object")continue;let{$data:l}=c.definition,f=s[a];l&&f&&(s[a]=Bd(f))}}return e}_removeAllSchemas(e,r){for(let n in e){let i=e[n];(!r||r.test(n))&&(typeof i=="string"?delete e[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[n]))}}_addSchema(e,r,n,i=this.opts.validateSchema,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;n=(0,ti.normalizeId)(s||n);let l=ti.getSchemaRefs.call(this,e,n);return c=new ei.SchemaEnv({schema:e,schemaId:a,meta:r,baseId:n,localRefs:l}),this._cache.set(c.schema,c),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=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):ei.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{ei.compileSchema.call(this,e)}finally{this.opts=r}}};ri.ValidationError=r2.default;ri.MissingRefError=Fd.default;Ce.default=ri;function Dd(t,e,r,n="error"){for(let i in t){let o=i;o in e&&this.logger[n](`${r}: option ${i}. ${t[o]}`)}}function qd(t){return t=(0,ti.normalizeId)(t),this.schemas[t]||this.refs[t]}function p2(){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 f2(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function d2(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function h2(){let t={...this.opts};for(let e of s2)delete t[e];return t}var m2={log(){},warn(){},error(){}};function g2(t){if(t===!1)return m2;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 y2=/^[a-z_$][a-z0-9_$:-]*$/i;function v2(t,e){let{RULES:r}=this;if((0,$c.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!y2.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function xc(t,e,r){var n;let i=e?.post;if(r&&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===r);if(s||(s={type:r,rules:[]},o.rules.push(s)),o.keywords[t]=!0,!e)return;let a={keyword:t,definition:{...e,type:(0,$o.getJSONTypes)(e.type),schemaType:(0,$o.getJSONTypes)(e.schemaType)}};e.before?w2.call(this,s,a,e.before):s.rules.push(a),o.all[t]=a,(n=e.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function w2(t,e,r){let n=t.rules.findIndex(i=>i.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function _2(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=Bd(e)),t.validateSchema=this.compile(e,!0))}var b2={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Bd(t){return{anyOf:[t,b2]}}});var Wd=S(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});var S2={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};kc.default=S2});var Eo=S(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.callRef=yr.getValidate=void 0;var x2=Xn(),Gd=rt(),Ge=Y(),Qr=tt(),zd=Qn(),ko=te(),$2={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:o,validateName:s,opts:a,self:c}=n,{root:l}=o;if((r==="#"||r==="#/")&&i===l.baseId)return p();let f=zd.resolveRef.call(c,l,i,r);if(f===void 0)throw new x2.default(n.opts.uriResolver,i,r);if(f instanceof zd.SchemaEnv)return d(f);return m(f);function p(){if(o===l)return Co(t,s,o,o.$async);let g=e.scopeValue("root",{ref:l});return Co(t,(0,Ge._)`${g}.validate`,l,l.$async)}function d(g){let y=Jd(t,g);Co(t,y,g,g.$async)}function m(g){let y=e.scopeValue("schema",a.code.source===!0?{ref:g,code:(0,Ge.stringify)(g)}:{ref:g}),_=e.name("valid"),b=t.subschema({schema:g,dataTypes:[],schemaPath:Ge.nil,topSchemaRef:y,errSchemaPath:r},_);t.mergeEvaluated(b),t.ok(_)}}};function Jd(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,Ge._)`${r.scopeValue("wrapper",{ref:e})}.validate`}yr.getValidate=Jd;function Co(t,e,r,n){let{gen:i,it:o}=t,{allErrors:s,schemaEnv:a,opts:c}=o,l=c.passContext?Qr.default.this:Ge.nil;n?f():p();function f(){if(!a.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,Ge._)`await ${(0,Gd.callValidateCode)(t,e,l)}`),m(e),s||i.assign(g,!0)},y=>{i.if((0,Ge._)`!(${y} instanceof ${o.ValidationError})`,()=>i.throw(y)),d(y),s||i.assign(g,!1)}),t.ok(g)}function p(){t.result((0,Gd.callValidateCode)(t,e,l),()=>m(e),()=>d(e))}function d(g){let y=(0,Ge._)`${g}.errors`;i.assign(Qr.default.vErrors,(0,Ge._)`${Qr.default.vErrors} === null ? ${y} : ${Qr.default.vErrors}.concat(${y})`),i.assign(Qr.default.errors,(0,Ge._)`${Qr.default.vErrors}.length`)}function m(g){var y;if(!o.opts.unevaluated)return;let _=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(o.props=ko.mergeEvaluated.props(i,_.props,o.props));else{let b=i.var("props",(0,Ge._)`${g}.evaluated.props`);o.props=ko.mergeEvaluated.props(i,b,o.props,Ge.Name)}if(o.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(o.items=ko.mergeEvaluated.items(i,_.items,o.items));else{let b=i.var("items",(0,Ge._)`${g}.evaluated.items`);o.items=ko.mergeEvaluated.items(i,b,o.items,Ge.Name)}}}yr.callRef=Co;yr.default=$2});var Kd=S(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});var k2=Wd(),C2=Eo(),E2=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",k2.default,C2.default];Cc.default=E2});var Yd=S(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});var Po=Y(),rr=Po.operators,Ro={maximum:{okStr:"<=",ok:rr.LTE,fail:rr.GT},minimum:{okStr:">=",ok:rr.GTE,fail:rr.LT},exclusiveMaximum:{okStr:"<",ok:rr.LT,fail:rr.GTE},exclusiveMinimum:{okStr:">",ok:rr.GT,fail:rr.LTE}},P2={message:({keyword:t,schemaCode:e})=>(0,Po.str)`must be ${Ro[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Po._)`{comparison: ${Ro[t].okStr}, limit: ${e}}`},R2={keyword:Object.keys(Ro),type:"number",schemaType:"number",$data:!0,error:P2,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,Po._)`${r} ${Ro[e].fail} ${n} || isNaN(${r})`)}};Ec.default=R2});var Xd=S(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});var ni=Y(),I2={message:({schemaCode:t})=>(0,ni.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,ni._)`{multipleOf: ${t}}`},O2={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:I2,code(t){let{gen:e,data:r,schemaCode:n,it:i}=t,o=i.opts.multipleOfPrecision,s=e.let("res"),a=o?(0,ni._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,ni._)`${s} !== parseInt(${s})`;t.fail$data((0,ni._)`(${n} === 0 || (${s} = ${r}/${n}, ${a}))`)}};Pc.default=O2});var Zd=S(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});function Qd(t){let e=t.length,r=0,n=0,i;for(;n<e;)r++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<e&&(i=t.charCodeAt(n),(i&64512)===56320&&n++);return r}Rc.default=Qd;Qd.code='require("ajv/dist/runtime/ucs2length").default'});var eh=S(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});var vr=Y(),A2=te(),T2=Zd(),N2={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,vr.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,vr._)`{limit: ${t}}`},M2={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:N2,code(t){let{keyword:e,data:r,schemaCode:n,it:i}=t,o=e==="maxLength"?vr.operators.GT:vr.operators.LT,s=i.opts.unicode===!1?(0,vr._)`${r}.length`:(0,vr._)`${(0,A2.useFunc)(t.gen,T2.default)}(${r})`;t.fail$data((0,vr._)`${s} ${o} ${n}`)}};Ic.default=M2});var th=S(Oc=>{"use strict";Object.defineProperty(Oc,"__esModule",{value:!0});var V2=rt(),L2=te(),Zr=Y(),j2={message:({schemaCode:t})=>(0,Zr.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Zr._)`{pattern: ${t}}`},D2={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:j2,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:s}=t,a=s.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=s.opts.code,l=c.code==="new RegExp"?(0,Zr._)`new RegExp`:(0,L2.useFunc)(e,c),f=e.let("valid");e.try(()=>e.assign(f,(0,Zr._)`${l}(${o}, ${a}).test(${r})`),()=>e.assign(f,!1)),t.fail$data((0,Zr._)`!${f}`)}else{let c=(0,V2.usePattern)(t,i);t.fail$data((0,Zr._)`!${c}.test(${r})`)}}};Oc.default=D2});var rh=S(Ac=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});var ii=Y(),q2={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,ii.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,ii._)`{limit: ${t}}`},F2={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:q2,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?ii.operators.GT:ii.operators.LT;t.fail$data((0,ii._)`Object.keys(${r}).length ${i} ${n}`)}};Ac.default=F2});var nh=S(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});var oi=rt(),si=Y(),H2=te(),B2={message:({params:{missingProperty:t}})=>(0,si.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,si._)`{missingProperty: ${t}}`},U2={keyword:"required",type:"object",schemaType:"array",$data:!0,error:B2,code(t){let{gen:e,schema:r,schemaCode:n,data:i,$data:o,it:s}=t,{opts:a}=s;if(!o&&r.length===0)return;let c=r.length>=a.loopRequired;if(s.allErrors?l():f(),a.strictRequired){let m=t.parentSchema.properties,{definedProperties:g}=t.it;for(let y of r)if(m?.[y]===void 0&&!g.has(y)){let _=s.schemaEnv.baseId+s.errSchemaPath,b=`required property "${y}" is not defined at "${_}" (strictRequired)`;(0,H2.checkStrictMode)(s,b,s.opts.strictRequired)}}function l(){if(c||o)t.block$data(si.nil,p);else for(let m of r)(0,oi.checkReportMissingProp)(t,m)}function f(){let m=e.let("missing");if(c||o){let g=e.let("valid",!0);t.block$data(g,()=>d(m,g)),t.ok(g)}else e.if((0,oi.checkMissingProp)(t,r,m)),(0,oi.reportMissingProp)(t,m),e.else()}function p(){e.forOf("prop",n,m=>{t.setParams({missingProperty:m}),e.if((0,oi.noPropertyInData)(e,i,m,a.ownProperties),()=>t.error())})}function d(m,g){t.setParams({missingProperty:m}),e.forOf(m,n,()=>{e.assign(g,(0,oi.propertyInData)(e,i,m,a.ownProperties)),e.if((0,si.not)(g),()=>{t.error(),e.break()})},si.nil)}}};Tc.default=U2});var ih=S(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});var ai=Y(),W2={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,ai.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,ai._)`{limit: ${t}}`},G2={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:W2,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?ai.operators.GT:ai.operators.LT;t.fail$data((0,ai._)`${r}.length ${i} ${n}`)}};Nc.default=G2});var Io=S(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});var oh=ic();oh.code='require("ajv/dist/runtime/equal").default';Mc.default=oh});var sh=S(Lc=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});var Vc=Gn(),Ee=Y(),z2=te(),J2=Io(),K2={message:({params:{i:t,j:e}})=>(0,Ee.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Ee._)`{i: ${t}, j: ${e}}`},Y2={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:K2,code(t){let{gen:e,data:r,$data:n,schema:i,parentSchema:o,schemaCode:s,it:a}=t;if(!n&&!i)return;let c=e.let("valid"),l=o.items?(0,Vc.getSchemaTypes)(o.items):[];t.block$data(c,f,(0,Ee._)`${s} === false`),t.ok(c);function f(){let g=e.let("i",(0,Ee._)`${r}.length`),y=e.let("j");t.setParams({i:g,j:y}),e.assign(c,!0),e.if((0,Ee._)`${g} > 1`,()=>(p()?d:m)(g,y))}function p(){return l.length>0&&!l.some(g=>g==="object"||g==="array")}function d(g,y){let _=e.name("item"),b=(0,Vc.checkDataTypes)(l,_,a.opts.strictNumbers,Vc.DataType.Wrong),M=e.const("indices",(0,Ee._)`{}`);e.for((0,Ee._)`;${g}--;`,()=>{e.let(_,(0,Ee._)`${r}[${g}]`),e.if(b,(0,Ee._)`continue`),l.length>1&&e.if((0,Ee._)`typeof ${_} == "string"`,(0,Ee._)`${_} += "_"`),e.if((0,Ee._)`typeof ${M}[${_}] == "number"`,()=>{e.assign(y,(0,Ee._)`${M}[${_}]`),t.error(),e.assign(c,!1).break()}).code((0,Ee._)`${M}[${_}] = ${g}`)})}function m(g,y){let _=(0,z2.useFunc)(e,J2.default),b=e.name("outer");e.label(b).for((0,Ee._)`;${g}--;`,()=>e.for((0,Ee._)`${y} = ${g}; ${y}--;`,()=>e.if((0,Ee._)`${_}(${r}[${g}], ${r}[${y}])`,()=>{t.error(),e.assign(c,!1).break(b)})))}}};Lc.default=Y2});var ah=S(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});var jc=Y(),X2=te(),Q2=Io(),Z2={message:"must be equal to constant",params:({schemaCode:t})=>(0,jc._)`{allowedValue: ${t}}`},e1={keyword:"const",$data:!0,error:Z2,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:o}=t;n||o&&typeof o=="object"?t.fail$data((0,jc._)`!${(0,X2.useFunc)(e,Q2.default)}(${r}, ${i})`):t.fail((0,jc._)`${o} !== ${r}`)}};Dc.default=e1});var ch=S(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});var ci=Y(),t1=te(),r1=Io(),n1={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,ci._)`{allowedValues: ${t}}`},i1={keyword:"enum",schemaType:"array",$data:!0,error:n1,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:s}=t;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let a=i.length>=s.opts.loopEnum,c,l=()=>c??(c=(0,t1.useFunc)(e,r1.default)),f;if(a||n)f=e.let("valid"),t.block$data(f,p);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=e.const("vSchema",o);f=(0,ci.or)(...i.map((g,y)=>d(m,y)))}t.pass(f);function p(){e.assign(f,!1),e.forOf("v",o,m=>e.if((0,ci._)`${l()}(${r}, ${m})`,()=>e.assign(f,!0).break()))}function d(m,g){let y=i[g];return typeof y=="object"&&y!==null?(0,ci._)`${l()}(${r}, ${m}[${g}])`:(0,ci._)`${r} === ${y}`}}};qc.default=i1});var lh=S(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});var o1=Yd(),s1=Xd(),a1=eh(),c1=th(),l1=rh(),u1=nh(),p1=ih(),f1=sh(),d1=ah(),h1=ch(),m1=[o1.default,s1.default,a1.default,c1.default,l1.default,u1.default,p1.default,f1.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d1.default,h1.default];Fc.default=m1});var Bc=S(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.validateAdditionalItems=void 0;var wr=Y(),Hc=te(),g1={message:({params:{len:t}})=>(0,wr.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,wr._)`{limit: ${t}}`},y1={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:g1,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,Hc.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}uh(t,n)}};function uh(t,e){let{gen:r,schema:n,data:i,keyword:o,it:s}=t;s.items=!0;let a=r.const("len",(0,wr._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,wr._)`${a} <= ${e.length}`);else if(typeof n=="object"&&!(0,Hc.alwaysValidSchema)(s,n)){let l=r.var("valid",(0,wr._)`${a} <= ${e.length}`);r.if((0,wr.not)(l),()=>c(l)),t.ok(l)}function c(l){r.forRange("i",e.length,a,f=>{t.subschema({keyword:o,dataProp:f,dataPropType:Hc.Type.Num},l),s.allErrors||r.if((0,wr.not)(l),()=>r.break())})}}li.validateAdditionalItems=uh;li.default=y1});var Uc=S(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.validateTuple=void 0;var ph=Y(),Oo=te(),v1=rt(),w1={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return fh(t,"additionalItems",e);r.items=!0,!(0,Oo.alwaysValidSchema)(r,e)&&t.ok((0,v1.validateArray)(t))}};function fh(t,e,r=t.schema){let{gen:n,parentSchema:i,data:o,keyword:s,it:a}=t;f(i),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=Oo.mergeEvaluated.items(n,r.length,a.items));let c=n.name("valid"),l=n.const("len",(0,ph._)`${o}.length`);r.forEach((p,d)=>{(0,Oo.alwaysValidSchema)(a,p)||(n.if((0,ph._)`${l} > ${d}`,()=>t.subschema({keyword:s,schemaProp:d,dataProp:d},c)),t.ok(c))});function f(p){let{opts:d,errSchemaPath:m}=a,g=r.length,y=g===p.minItems&&(g===p.maxItems||p[e]===!1);if(d.strictTuples&&!y){let _=`"${s}" is ${g}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,Oo.checkStrictMode)(a,_,d.strictTuples)}}}ui.validateTuple=fh;ui.default=w1});var dh=S(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});var _1=Uc(),b1={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,_1.validateTuple)(t,"items")};Wc.default=b1});var mh=S(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});var hh=Y(),S1=te(),x1=rt(),$1=Bc(),k1={message:({params:{len:t}})=>(0,hh.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,hh._)`{limit: ${t}}`},C1={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:k1,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,S1.alwaysValidSchema)(n,e)&&(i?(0,$1.validateAdditionalItems)(t,i):t.ok((0,x1.validateArray)(t)))}};Gc.default=C1});var gh=S(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});var it=Y(),Ao=te(),E1={message:({params:{min:t,max:e}})=>e===void 0?(0,it.str)`must contain at least ${t} valid item(s)`:(0,it.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,it._)`{minContains: ${t}}`:(0,it._)`{minContains: ${t}, maxContains: ${e}}`},P1={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:E1,code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t,s,a,{minContains:c,maxContains:l}=n;o.opts.next?(s=c===void 0?1:c,a=l):s=1;let f=e.const("len",(0,it._)`${i}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,Ao.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,Ao.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,Ao.alwaysValidSchema)(o,r)){let y=(0,it._)`${f} >= ${s}`;a!==void 0&&(y=(0,it._)`${y} && ${f} <= ${a}`),t.pass(y);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,it._)`${i}.length > 0`,d)):(e.let(p,!1),d()),t.result(p,()=>t.reset());function d(){let y=e.name("_valid"),_=e.let("count",0);m(y,()=>e.if(y,()=>g(_)))}function m(y,_){e.forRange("i",0,f,b=>{t.subschema({keyword:"contains",dataProp:b,dataPropType:Ao.Type.Num,compositeRule:!0},y),_()})}function g(y){e.code((0,it._)`${y}++`),a===void 0?e.if((0,it._)`${y} >= ${s}`,()=>e.assign(p,!0).break()):(e.if((0,it._)`${y} > ${a}`,()=>e.assign(p,!1).break()),s===1?e.assign(p,!0):e.if((0,it._)`${y} >= ${s}`,()=>e.assign(p,!0)))}}};zc.default=P1});var To=S(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.validateSchemaDeps=xt.validatePropertyDeps=xt.error=void 0;var Jc=Y(),R1=te(),pi=rt();xt.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,Jc.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,Jc._)`{property: ${t},
65
65
  missingProperty: ${n},
66
66
  depsCount: ${e},
67
- deps: ${r}}`};var k1={keyword:"dependencies",type:"object",schemaType:"object",error:St.error,code(t){let[e,r]=C1(t);mh(t,e),gh(t,r)}};function C1({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let i=Array.isArray(t[n])?e:r;i[n]=t[n]}return[e,r]}function mh(t,e=t.schema){let{gen:r,data:n,it:i}=t;if(Object.keys(e).length===0)return;let o=r.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let c=(0,pi.propertyInData)(r,n,s,i.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),i.allErrors?r.if(c,()=>{for(let l of a)(0,pi.checkReportMissingProp)(t,l)}):(r.if((0,zc._)`${c} && (${(0,pi.checkMissingProp)(t,a,o)})`),(0,pi.reportMissingProp)(t,o),r.else())}}St.validatePropertyDeps=mh;function gh(t,e=t.schema){let{gen:r,data:n,keyword:i,it:o}=t,s=r.name("valid");for(let a in e)(0,$1.alwaysValidSchema)(o,e[a])||(r.if((0,pi.propertyInData)(r,n,a,o.opts.ownProperties),()=>{let c=t.subschema({keyword:i,schemaProp:a},s);t.mergeValidEvaluated(c,s)},()=>r.var(s,!0)),t.ok(s))}St.validateSchemaDeps=gh;St.default=k1});var vh=S(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});var yh=Y(),E1=te(),P1={message:"property name must be valid",params:({params:t})=>(0,yh._)`{propertyName: ${t.propertyName}}`},I1={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:P1,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,E1.alwaysValidSchema)(i,r))return;let o=e.name("valid");e.forIn("key",n,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),e.if((0,yh.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};Jc.default=I1});var Yc=S(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});var To=rt(),mt=Y(),R1=tt(),No=te(),O1={message:"must NOT have additional properties",params:({params:t})=>(0,mt._)`{additionalProperty: ${t.additionalProperty}}`},A1={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:O1,code(t){let{gen:e,schema:r,parentSchema:n,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,No.alwaysValidSchema)(s,r))return;let l=(0,To.allSchemaProperties)(n.properties),f=(0,To.allSchemaProperties)(n.patternProperties);p(),t.ok((0,mt._)`${o} === ${R1.default.errors}`);function p(){e.forIn("key",i,_=>{!l.length&&!f.length?g(_):e.if(d(_),()=>g(_))})}function d(_){let b;if(l.length>8){let M=(0,No.schemaRefOrVal)(s,n.properties,"properties");b=(0,To.isOwnProperty)(e,M,_)}else l.length?b=(0,mt.or)(...l.map(M=>(0,mt._)`${_} === ${M}`)):b=mt.nil;return f.length&&(b=(0,mt.or)(b,...f.map(M=>(0,mt._)`${(0,To.usePattern)(t,M)}.test(${_})`))),(0,mt.not)(b)}function m(_){e.code((0,mt._)`delete ${i}[${_}]`)}function g(_){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(_);return}if(r===!1){t.setParams({additionalProperty:_}),t.error(),a||e.break();return}if(typeof r=="object"&&!(0,No.alwaysValidSchema)(s,r)){let b=e.name("valid");c.removeAdditional==="failing"?(y(_,b,!1),e.if((0,mt.not)(b),()=>{t.reset(),m(_)})):(y(_,b),a||e.if((0,mt.not)(b),()=>e.break()))}}function y(_,b,M){let q={keyword:"additionalProperties",dataProp:_,dataPropType:No.Type.Str};M===!1&&Object.assign(q,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(q,b)}}};Kc.default=A1});var bh=S(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});var T1=Yn(),wh=rt(),Xc=te(),_h=Yc(),N1={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&_h.default.code(new T1.KeywordCxt(o,_h.default,"additionalProperties"));let s=(0,wh.allSchemaProperties)(r);for(let p of s)o.definedProperties.add(p);o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=Xc.mergeEvaluated.props(e,(0,Xc.toHash)(s),o.props));let a=s.filter(p=>!(0,Xc.alwaysValidSchema)(o,r[p]));if(a.length===0)return;let c=e.name("valid");for(let p of a)l(p)?f(p):(e.if((0,wh.propertyInData)(e,i,p,o.opts.ownProperties)),f(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&&r[p].default!==void 0}function f(p){t.subschema({keyword:"properties",schemaProp:p,dataProp:p},c)}}};Qc.default=N1});var kh=S(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});var Sh=rt(),Mo=Y(),xh=te(),$h=te(),M1={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:i,it:o}=t,{opts:s}=o,a=(0,Sh.allSchemaProperties)(r),c=a.filter(y=>(0,xh.alwaysValidSchema)(o,r[y]));if(a.length===0||c.length===a.length&&(!o.opts.unevaluated||o.props===!0))return;let l=s.strictSchema&&!s.allowMatchingProperties&&i.properties,f=e.name("valid");o.props!==!0&&!(o.props instanceof Mo.Name)&&(o.props=(0,$h.evaluatedPropsToName)(e,o.props));let{props:p}=o;d();function d(){for(let y of a)l&&m(y),o.allErrors?g(y):(e.var(f,!0),g(y),e.if(f))}function m(y){for(let _ in l)new RegExp(y).test(_)&&(0,xh.checkStrictMode)(o,`property ${_} matches pattern ${y} (use allowMatchingProperties)`)}function g(y){e.forIn("key",n,_=>{e.if((0,Mo._)`${(0,Sh.usePattern)(t,y)}.test(${_})`,()=>{let b=c.includes(y);b||t.subschema({keyword:"patternProperties",schemaProp:y,dataProp:_,dataPropType:$h.Type.Str},f),o.opts.unevaluated&&p!==!0?e.assign((0,Mo._)`${p}[${_}]`,!0):!b&&!o.allErrors&&e.if((0,Mo.not)(f),()=>e.break())})})}}};Zc.default=M1});var Ch=S(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});var V1=te(),L1={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,V1.alwaysValidSchema)(n,r)){t.fail();return}let i=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};el.default=L1});var Eh=S(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});var j1=rt(),D1={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:j1.validateUnion,error:{message:"must match a schema in anyOf"}};tl.default=D1});var Ph=S(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});var Vo=Y(),q1=te(),F1={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Vo._)`{passingSchemas: ${t.passing}}`},H1={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:F1,code(t){let{gen:e,schema:r,parentSchema:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,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((f,p)=>{let d;(0,q1.alwaysValidSchema)(i,f)?e.var(c,!0):d=t.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},c),p>0&&e.if((0,Vo._)`${c} && ${s}`).assign(s,!1).assign(a,(0,Vo._)`[${a}, ${p}]`).else(),e.if(c,()=>{e.assign(s,!0),e.assign(a,p),d&&t.mergeEvaluated(d,Vo.Name)})})}}};rl.default=H1});var Ih=S(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});var B1=te(),U1={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=e.name("valid");r.forEach((o,s)=>{if((0,B1.alwaysValidSchema)(n,o))return;let a=t.subschema({keyword:"allOf",schemaProp:s},i);t.ok(i),t.mergeEvaluated(a)})}};nl.default=U1});var Ah=S(il=>{"use strict";Object.defineProperty(il,"__esModule",{value:!0});var Lo=Y(),Oh=te(),W1={message:({params:t})=>(0,Lo.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Lo._)`{failingKeyword: ${t.ifClause}}`},G1={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:W1,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,Oh.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=Rh(n,"then"),o=Rh(n,"else");if(!i&&!o)return;let s=e.let("valid",!0),a=e.name("_valid");if(c(),t.reset(),i&&o){let f=e.let("ifClause");t.setParams({ifClause:f}),e.if(a,l("then",f),l("else",f))}else i?e.if(a,l("then")):e.if((0,Lo.not)(a),l("else"));t.pass(s,()=>t.error(!0));function c(){let f=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(f)}function l(f,p){return()=>{let d=t.subschema({keyword:f},a);e.assign(s,a),t.mergeValidEvaluated(d,s),p?e.assign(p,(0,Lo._)`${f}`):t.setParams({ifClause:f})}}}};function Rh(t,e){let r=t.schema[e];return r!==void 0&&!(0,Oh.alwaysValidSchema)(t,r)}il.default=G1});var Th=S(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});var z1=te(),J1={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,z1.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};ol.default=J1});var Nh=S(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});var K1=Hc(),Y1=ph(),X1=Bc(),Q1=dh(),Z1=hh(),eS=Ao(),tS=vh(),rS=Yc(),nS=bh(),iS=kh(),oS=Ch(),sS=Eh(),aS=Ph(),cS=Ih(),lS=Ah(),uS=Th();function pS(t=!1){let e=[oS.default,sS.default,aS.default,cS.default,lS.default,uS.default,tS.default,rS.default,eS.default,nS.default,iS.default];return t?e.push(Y1.default,Q1.default):e.push(K1.default,X1.default),e.push(Z1.default),e}sl.default=pS});var cl=S(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.dynamicAnchor=void 0;var al=Y(),fS=tt(),Mh=Qn(),dS=Co(),hS={keyword:"$dynamicAnchor",schemaType:"string",code:t=>Vh(t,t.schema)};function Vh(t,e){let{gen:r,it:n}=t;n.schemaEnv.root.dynamicAnchors[e]=!0;let i=(0,al._)`${fS.default.dynamicAnchors}${(0,al.getProperty)(e)}`,o=n.errSchemaPath==="#"?n.validateName:mS(t);r.if((0,al._)`!${i}`,()=>r.assign(i,o))}fi.dynamicAnchor=Vh;function mS(t){let{schemaEnv:e,schema:r,self:n}=t.it,{root:i,baseId:o,localRefs:s,meta:a}=e.root,{schemaId:c}=n.opts,l=new Mh.SchemaEnv({schema:r,schemaId:c,root:i,baseId:o,localRefs:s,meta:a});return Mh.compileSchema.call(n,l),(0,dS.getValidate)(t,l)}fi.default=hS});var ll=S(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.dynamicRef=void 0;var Lh=Y(),gS=tt(),jh=Co(),yS={keyword:"$dynamicRef",schemaType:"string",code:t=>Dh(t,t.schema)};function Dh(t,e){let{gen:r,keyword:n,it:i}=t;if(e[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);let o=e.slice(1);if(i.allErrors)s();else{let c=r.let("valid",!1);s(c),t.ok(c)}function s(c){if(i.schemaEnv.root.dynamicAnchors[o]){let l=r.let("_v",(0,Lh._)`${gS.default.dynamicAnchors}${(0,Lh.getProperty)(o)}`);r.if(l,a(l,c),a(i.validateName,c))}else a(i.validateName,c)()}function a(c,l){return l?()=>r.block(()=>{(0,jh.callRef)(t,c),r.let(l,!0)}):()=>(0,jh.callRef)(t,c)}}di.dynamicRef=Dh;di.default=yS});var qh=S(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});var vS=cl(),wS=te(),_S={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,vS.dynamicAnchor)(t,""):(0,wS.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};ul.default=_S});var Fh=S(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});var bS=ll(),SS={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,bS.dynamicRef)(t,t.schema)};pl.default=SS});var Hh=S(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});var xS=cl(),$S=ll(),kS=qh(),CS=Fh(),ES=[xS.default,$S.default,kS.default,CS.default];fl.default=ES});var Uh=S(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});var Bh=Ao(),PS={keyword:"dependentRequired",type:"object",schemaType:"object",error:Bh.error,code:t=>(0,Bh.validatePropertyDeps)(t)};dl.default=PS});var Wh=S(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});var IS=Ao(),RS={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,IS.validateSchemaDeps)(t)};hl.default=RS});var Gh=S(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});var OS=te(),AS={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:r}){e.contains===void 0&&(0,OS.checkStrictMode)(r,`"${t}" without "contains" is ignored`)}};ml.default=AS});var zh=S(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});var TS=Uh(),NS=Wh(),MS=Gh(),VS=[TS.default,NS.default,MS.default];gl.default=VS});var Kh=S(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});var nr=Y(),Jh=te(),LS=tt(),jS={message:"must NOT have unevaluated properties",params:({params:t})=>(0,nr._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},DS={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:jS,code(t){let{gen:e,schema:r,data:n,errsCount:i,it:o}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:s,props:a}=o;a instanceof nr.Name?e.if((0,nr._)`${a} !== true`,()=>e.forIn("key",n,p=>e.if(l(a,p),()=>c(p)))):a!==!0&&e.forIn("key",n,p=>a===void 0?c(p):e.if(f(a,p),()=>c(p))),o.props=!0,t.ok((0,nr._)`${i} === ${LS.default.errors}`);function c(p){if(r===!1){t.setParams({unevaluatedProperty:p}),t.error(),s||e.break();return}if(!(0,Jh.alwaysValidSchema)(o,r)){let d=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:p,dataPropType:Jh.Type.Str},d),s||e.if((0,nr.not)(d),()=>e.break())}}function l(p,d){return(0,nr._)`!${p} || !${p}[${d}]`}function f(p,d){let m=[];for(let g in p)p[g]===!0&&m.push((0,nr._)`${d} !== ${g}`);return(0,nr.and)(...m)}}};yl.default=DS});var Xh=S(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});var _r=Y(),Yh=te(),qS={message:({params:{len:t}})=>(0,_r.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,_r._)`{limit: ${t}}`},FS={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:qS,code(t){let{gen:e,schema:r,data:n,it:i}=t,o=i.items||0;if(o===!0)return;let s=e.const("len",(0,_r._)`${n}.length`);if(r===!1)t.setParams({len:o}),t.fail((0,_r._)`${s} > ${o}`);else if(typeof r=="object"&&!(0,Yh.alwaysValidSchema)(i,r)){let c=e.var("valid",(0,_r._)`${s} <= ${o}`);e.if((0,_r.not)(c),()=>a(c,o)),t.ok(c)}i.items=!0;function a(c,l){e.forRange("i",l,s,f=>{t.subschema({keyword:"unevaluatedItems",dataProp:f,dataPropType:Yh.Type.Num},c),i.allErrors||e.if((0,_r.not)(c),()=>e.break())})}}};vl.default=FS});var Qh=S(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});var HS=Kh(),BS=Xh(),US=[HS.default,BS.default];wl.default=US});var Zh=S(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0});var Se=Y(),WS={message:({schemaCode:t})=>(0,Se.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,Se._)`{format: ${t}}`},GS={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:WS,code(t,e){let{gen:r,data:n,$data:i,schema:o,schemaCode:s,it:a}=t,{opts:c,errSchemaPath:l,schemaEnv:f,self:p}=a;if(!c.validateFormats)return;i?d():m();function d(){let g=r.scopeValue("formats",{ref:p.formats,code:c.code.formats}),y=r.const("fDef",(0,Se._)`${g}[${s}]`),_=r.let("fType"),b=r.let("format");r.if((0,Se._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(_,(0,Se._)`${y}.type || "string"`).assign(b,(0,Se._)`${y}.validate`),()=>r.assign(_,(0,Se._)`"string"`).assign(b,y)),t.fail$data((0,Se.or)(M(),q()));function M(){return c.strictSchema===!1?Se.nil:(0,Se._)`${s} && !${b}`}function q(){let A=f.$async?(0,Se._)`(${y}.async ? await ${b}(${n}) : ${b}(${n}))`:(0,Se._)`${b}(${n})`,T=(0,Se._)`(typeof ${b} == "function" ? ${A} : ${b}.test(${n}))`;return(0,Se._)`${b} && ${b} !== true && ${_} === ${e} && !${T}`}}function m(){let g=p.formats[o];if(!g){M();return}if(g===!0)return;let[y,_,b]=q(g);y===e&&t.pass(A());function M(){if(c.strictSchema===!1){p.logger.warn(T());return}throw new Error(T());function T(){return`unknown format "${o}" ignored in schema at path "${l}"`}}function q(T){let V=T instanceof RegExp?(0,Se.regexpCode)(T):c.code.formats?(0,Se._)`${c.code.formats}${(0,Se.getProperty)(o)}`:void 0,X=r.scopeValue("formats",{key:o,ref:T,code:V});return typeof T=="object"&&!(T instanceof RegExp)?[T.type||"string",T.validate,(0,Se._)`${X}.validate`]:["string",T,X]}function A(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!f.$async)throw new Error("async format in sync schema");return(0,Se._)`await ${b}(${n})`}return typeof _=="function"?(0,Se._)`${b}(${n})`:(0,Se._)`${b}.test(${n})`}}}};_l.default=GS});var em=S(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});var zS=Zh(),JS=[zS.default];bl.default=JS});var tm=S(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.contentVocabulary=en.metadataVocabulary=void 0;en.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];en.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var nm=S(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});var KS=zd(),YS=ah(),XS=Nh(),QS=Hh(),ZS=zh(),ex=Qh(),tx=em(),rm=tm(),rx=[QS.default,KS.default,YS.default,(0,XS.default)(!0),tx.default,rm.metadataVocabulary,rm.contentVocabulary,ZS.default,ex.default];Sl.default=rx});var om=S(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});jo.DiscrError=void 0;var im;(function(t){t.Tag="tag",t.Mapping="mapping"})(im||(jo.DiscrError=im={}))});var am=S($l=>{"use strict";Object.defineProperty($l,"__esModule",{value:!0});var tn=Y(),xl=om(),sm=Qn(),nx=Xn(),ix=te(),ox={message:({params:{discrError:t,tagName:e}})=>t===xl.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,tn._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},sx={keyword:"discriminator",type:"object",schemaType:"object",error:ox,code(t){let{gen:e,data:r,schema:n,parentSchema:i,it:o}=t,{oneOf:s}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),l=e.const("tag",(0,tn._)`${r}${(0,tn.getProperty)(a)}`);e.if((0,tn._)`typeof ${l} == "string"`,()=>f(),()=>t.error(!1,{discrError:xl.DiscrError.Tag,tag:l,tagName:a})),t.ok(c);function f(){let m=d();e.if(!1);for(let g in m)e.elseIf((0,tn._)`${l} === ${g}`),e.assign(c,p(m[g]));e.else(),t.error(!1,{discrError:xl.DiscrError.Mapping,tag:l,tagName:a}),e.endIf()}function p(m){let g=e.name("valid"),y=t.subschema({keyword:"oneOf",schemaProp:m},g);return t.mergeEvaluated(y,tn.Name),g}function d(){var m;let g={},y=b(i),_=!0;for(let A=0;A<s.length;A++){let T=s[A];if(T?.$ref&&!(0,ix.schemaHasRulesButRef)(T,o.self.RULES)){let X=T.$ref;if(T=sm.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,X),T instanceof sm.SchemaEnv&&(T=T.schema),T===void 0)throw new nx.default(o.opts.uriResolver,o.baseId,X)}let V=(m=T?.properties)===null||m===void 0?void 0:m[a];if(typeof V!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);_=_&&(y||b(T)),M(V,A)}if(!_)throw new Error(`discriminator: "${a}" must be required`);return g;function b({required:A}){return Array.isArray(A)&&A.includes(a)}function M(A,T){if(A.const)q(A.const,T);else if(A.enum)for(let V of A.enum)q(V,T);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function q(A,T){if(typeof A!="string"||A in g)throw new Error(`discriminator: "${a}" values must be unique strings`);g[A]=T}}}};$l.default=sx});var cm=S((GO,ax)=>{ax.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 lm=S((zO,cx)=>{cx.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 um=S((JO,lx)=>{lx.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 pm=S((KO,ux)=>{ux.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 fm=S((YO,px)=>{px.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 dm=S((XO,fx)=>{fx.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 hm=S((QO,dx)=>{dx.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 mm=S((ZO,hx)=>{hx.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 gm=S(kl=>{"use strict";Object.defineProperty(kl,"__esModule",{value:!0});var mx=cm(),gx=lm(),yx=um(),vx=pm(),wx=fm(),_x=dm(),bx=hm(),Sx=mm(),xx=["/properties"];function $x(t){return[mx,gx,yx,vx,wx,e(this,_x),bx,e(this,Sx)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function e(r,n){return t?r.$dataMetaSchema(n,xx):n}}kl.default=$x});var ym=S((ge,El)=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.MissingRefError=ge.ValidationError=ge.CodeGen=ge.Name=ge.nil=ge.stringify=ge.str=ge._=ge.KeywordCxt=ge.Ajv2020=void 0;var kx=Hd(),Cx=nm(),Ex=am(),Px=gm(),Cl="https://json-schema.org/draft/2020-12/schema",rn=class extends kx.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),Cx.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(Ex.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:r}=this.opts;r&&(Px.default.call(this,e),this.refs["http://json-schema.org/schema"]=Cl)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Cl)?Cl:void 0)}};ge.Ajv2020=rn;El.exports=ge=rn;El.exports.Ajv2020=rn;Object.defineProperty(ge,"__esModule",{value:!0});ge.default=rn;var Ix=Yn();Object.defineProperty(ge,"KeywordCxt",{enumerable:!0,get:function(){return Ix.KeywordCxt}});var nn=Y();Object.defineProperty(ge,"_",{enumerable:!0,get:function(){return nn._}});Object.defineProperty(ge,"str",{enumerable:!0,get:function(){return nn.str}});Object.defineProperty(ge,"stringify",{enumerable:!0,get:function(){return nn.stringify}});Object.defineProperty(ge,"nil",{enumerable:!0,get:function(){return nn.nil}});Object.defineProperty(ge,"Name",{enumerable:!0,get:function(){return nn.Name}});Object.defineProperty(ge,"CodeGen",{enumerable:!0,get:function(){return nn.CodeGen}});var Rx=vo();Object.defineProperty(ge,"ValidationError",{enumerable:!0,get:function(){return Rx.default}});var Ox=Xn();Object.defineProperty(ge,"MissingRefError",{enumerable:!0,get:function(){return Ox.default}})});import{readFileSync as Ax}from"node:fs";import{createRequire as Tx}from"node:module";import{dirname as Pl,resolve as Nx}from"node:path";import{fileURLToPath as Mx}from"node:url";function Pe(){if(on)return on;let t=Tx(import.meta.url);try{return on=Pl(t.resolve("view-contracts/package.json")),on}catch{let e=Pl(Mx(import.meta.url));for(;;){try{let n=Nx(e,"package.json");if(JSON.parse(Ax(n,"utf8")).name==="view-contracts")return on=e,on}catch{}let r=Pl(e);if(r===e)break;e=r}throw new Error("view-contracts package root not found")}}var on,ir=K(()=>{"use strict"});import{readFile as Dx}from"node:fs/promises";async function Fo(t){return ut.load(await Dx(t,"utf-8"))}function bm(t,e,r){for(let n of t)if(!e.has(n))throw new Error(`${r}: unknown element "${n}" \u2014 not in spec/ui-dsl.schema.json vocabulary`)}function Sm(t,e,r){for(let[n,i]of Object.entries(t))for(let o of e)if(i[o]===void 0||i[o]===null||i[o]==="")throw new Error(`${r}: element "${n}" is missing required "${String(o)}"`)}var Il=K(()=>{"use strict";Fr()});import{resolve as qx}from"node:path";function Fx(t){bm(Object.keys(t.elements),Mt,xm),Sm(t.elements,["tag"],xm)}async function Ol(t){if(!t&&Rl)return Rl;let e=t??qx(Pe(),"renderers/react/elements.yaml"),r=await Fo(e);return Fx(r),t||(Rl=r),r}var xm,Rl,$m=K(()=>{"use strict";Vt();Vt();ir();Il();xm="renderers/react/elements.yaml",Rl=null});function km(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t}function Cm(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 Em=K(()=>{"use strict"});function gt(t){return`${t}px`}function sn(t){let e=t.match(/^\{([^}]+)\}$/);if(e)return`var(--${e[1].replace(/\./g,"-")})`}function Al(t){let e={},r=t.width;typeof r=="number"?e.width=gt(r):r==="fill"?e.width="100%":typeof r=="string"&&r!=="wrap"&&(e.width=r),typeof t.minWidth=="number"&&(e.minWidth=gt(t.minWidth));let n=t.maxWidth;typeof n=="number"?e.maxWidth=gt(n):n==="fill"&&(e.maxWidth="100%");let i=t.height;typeof i=="number"?e.height=gt(i):i==="fill"?e.height="100%":typeof i=="string"&&i!=="wrap"&&(e.height=i),typeof t.minHeight=="number"&&(e.minHeight=gt(t.minHeight));let o=t.maxHeight;typeof o=="number"?e.maxHeight=gt(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=gt(t.padding)),typeof t.margin=="number"&&(e.margin=gt(t.margin)),typeof t.gap=="number"&&(e.gap=gt(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 Pm&&(e.placeItems=Pm[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 f=t.size;typeof f=="number"?e.fontSize=gt(f):typeof f=="string"&&(e.fontSize=f);let p=typeof s=="string"?s:t.fontWeight;typeof p=="string"&&(e.fontWeight=p);let d=t.background;typeof d=="string"&&(e.background=sn(d)??d);let m=t.foreground;typeof m=="string"&&(e.color=sn(m)??m);let g=t.radius;typeof g=="number"?e.borderRadius=gt(g):typeof g=="string"&&(e.borderRadius=sn(g)??g);let y=t.shadow;y===!0?e.boxShadow="var(--ui-shadow)":y===!1?e.boxShadow="none":typeof y=="string"&&(e.boxShadow=Hx[y]??sn(y)??y);let _=t.border;typeof _=="string"&&(e.border=sn(_)??_),typeof t.opacity=="number"&&(e.opacity=t.opacity);let b=t.clip;typeof b=="string"&&(e.overflow=b==="hidden"?"hidden":b);let M=t.align;if(typeof M=="string"){let V=km(M);V&&(e.alignItems=V)}let q=t.justify;if(typeof q=="string"){let V=Cm(q);V&&(e.justifyContent=V)}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 A=t.borderColor;typeof A=="string"&&(e.borderColor=sn(A)??A);let T=t.flex;return typeof T=="number"&&(e.flex=T),e}function hi(t){let e=Object.entries(t);return e.length===0?"":`style={{ ${e.map(([n,i])=>typeof i=="number"?`${n}: ${i}`:`${n}: ${JSON.stringify(i)}`).join(", ")} }}`}var Pm,Hx,Tl=K(()=>{"use strict";Em();Pm={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"},Hx={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 Ho(t,e){let r=t[e];if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="object"&&"kind"in r&&r.kind==="literal")return r.value}}function Bx(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 Ux(t){let e={};for(let[r,n]of Object.entries(t)){if(!no.has(r))continue;Bx(r,n);let i=Ho(t,r);i!==void 0&&(e[r]=i)}return e}function Wx(t){return t.flex?{display:"flex",flexDirection:t.flex==="column"?"column":"row"}:{}}function Gx(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 Im(t,e){let r=Ux(e),n=Al(r);if(n={...n,...Wx(t)},t.tableCell){if("alignItems"in n){let i=String(n.alignItems);n.textAlign=i==="flex-end"?"right":i==="center"?"center":"left",delete n.alignItems}"width"in n&&!("flex"in n)&&(n.flexShrink=0,n.flexGrow=0)}if(t.scrollContainer){let i=Ho(e,"scroll"),o=Ho(e,"axis"),s=typeof i=="string"?i:typeof o=="string"?o==="horizontal"?"horizontal":"vertical":void 0;if(s)return n={...n,...Gx(s)},hi(n);throw new Error("ScrollArea scroll/axis must be compile-time literals")}if(t.flexGrowProp&&e[t.flexGrowProp]){let i=Ho(e,t.flexGrowProp);if(typeof i=="number")return n.flexGrow=i,hi(n);throw new Error(`"${t.flexGrowProp}" on <Spacer> must be a compile-time literal`)}return hi(n)}var Rm=K(()=>{"use strict";Vt();Tl();Tl()});function z(t){return" ".repeat(t)}function Sr(t,e="vm"){let r=t.scope??e;return t.path?`${r}.${t.path}`:r}function Mm(t){return t.parts.map(e=>typeof e=="string"?e:`\${${Sr(e)}}`).join("")}function zx(t){return`\`${Mm(t)}\``}function Bo(t,e=!1){let r=e?" as ActionDescriptor":"";if(!t.params||Object.keys(t.params).length===0)return`{ name: ${JSON.stringify(t.name)} }${r}`;let n=Object.entries(t.params).map(([i,o])=>`${i}: ${cn(o,0)}`).join(", ");return`{ name: ${JSON.stringify(t.name)}, params: { ${n} } }${r}`}function Ml(t,e,r=!1){if(t===null)return"null";if(typeof t=="string")return JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t))return`[
68
- ${t.map(n=>`${z(e+1)}${Ml(n,e+1,r)}`).join(`,
67
+ deps: ${r}}`};var I1={keyword:"dependencies",type:"object",schemaType:"object",error:xt.error,code(t){let[e,r]=O1(t);yh(t,e),vh(t,r)}};function O1({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let i=Array.isArray(t[n])?e:r;i[n]=t[n]}return[e,r]}function yh(t,e=t.schema){let{gen:r,data:n,it:i}=t;if(Object.keys(e).length===0)return;let o=r.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let c=(0,pi.propertyInData)(r,n,s,i.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),i.allErrors?r.if(c,()=>{for(let l of a)(0,pi.checkReportMissingProp)(t,l)}):(r.if((0,Jc._)`${c} && (${(0,pi.checkMissingProp)(t,a,o)})`),(0,pi.reportMissingProp)(t,o),r.else())}}xt.validatePropertyDeps=yh;function vh(t,e=t.schema){let{gen:r,data:n,keyword:i,it:o}=t,s=r.name("valid");for(let a in e)(0,R1.alwaysValidSchema)(o,e[a])||(r.if((0,pi.propertyInData)(r,n,a,o.opts.ownProperties),()=>{let c=t.subschema({keyword:i,schemaProp:a},s);t.mergeValidEvaluated(c,s)},()=>r.var(s,!0)),t.ok(s))}xt.validateSchemaDeps=vh;xt.default=I1});var _h=S(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});var wh=Y(),A1=te(),T1={message:"property name must be valid",params:({params:t})=>(0,wh._)`{propertyName: ${t.propertyName}}`},N1={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:T1,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,A1.alwaysValidSchema)(i,r))return;let o=e.name("valid");e.forIn("key",n,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),e.if((0,wh.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};Kc.default=N1});var Xc=S(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});var No=rt(),mt=Y(),M1=tt(),Mo=te(),V1={message:"must NOT have additional properties",params:({params:t})=>(0,mt._)`{additionalProperty: ${t.additionalProperty}}`},L1={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:V1,code(t){let{gen:e,schema:r,parentSchema:n,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,Mo.alwaysValidSchema)(s,r))return;let l=(0,No.allSchemaProperties)(n.properties),f=(0,No.allSchemaProperties)(n.patternProperties);p(),t.ok((0,mt._)`${o} === ${M1.default.errors}`);function p(){e.forIn("key",i,_=>{!l.length&&!f.length?g(_):e.if(d(_),()=>g(_))})}function d(_){let b;if(l.length>8){let M=(0,Mo.schemaRefOrVal)(s,n.properties,"properties");b=(0,No.isOwnProperty)(e,M,_)}else l.length?b=(0,mt.or)(...l.map(M=>(0,mt._)`${_} === ${M}`)):b=mt.nil;return f.length&&(b=(0,mt.or)(b,...f.map(M=>(0,mt._)`${(0,No.usePattern)(t,M)}.test(${_})`))),(0,mt.not)(b)}function m(_){e.code((0,mt._)`delete ${i}[${_}]`)}function g(_){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(_);return}if(r===!1){t.setParams({additionalProperty:_}),t.error(),a||e.break();return}if(typeof r=="object"&&!(0,Mo.alwaysValidSchema)(s,r)){let b=e.name("valid");c.removeAdditional==="failing"?(y(_,b,!1),e.if((0,mt.not)(b),()=>{t.reset(),m(_)})):(y(_,b),a||e.if((0,mt.not)(b),()=>e.break()))}}function y(_,b,M){let q={keyword:"additionalProperties",dataProp:_,dataPropType:Mo.Type.Str};M===!1&&Object.assign(q,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(q,b)}}};Yc.default=L1});var xh=S(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});var j1=Yn(),bh=rt(),Qc=te(),Sh=Xc(),D1={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Sh.default.code(new j1.KeywordCxt(o,Sh.default,"additionalProperties"));let s=(0,bh.allSchemaProperties)(r);for(let p of s)o.definedProperties.add(p);o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=Qc.mergeEvaluated.props(e,(0,Qc.toHash)(s),o.props));let a=s.filter(p=>!(0,Qc.alwaysValidSchema)(o,r[p]));if(a.length===0)return;let c=e.name("valid");for(let p of a)l(p)?f(p):(e.if((0,bh.propertyInData)(e,i,p,o.opts.ownProperties)),f(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&&r[p].default!==void 0}function f(p){t.subschema({keyword:"properties",schemaProp:p,dataProp:p},c)}}};Zc.default=D1});var Eh=S(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});var $h=rt(),Vo=Y(),kh=te(),Ch=te(),q1={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:i,it:o}=t,{opts:s}=o,a=(0,$h.allSchemaProperties)(r),c=a.filter(y=>(0,kh.alwaysValidSchema)(o,r[y]));if(a.length===0||c.length===a.length&&(!o.opts.unevaluated||o.props===!0))return;let l=s.strictSchema&&!s.allowMatchingProperties&&i.properties,f=e.name("valid");o.props!==!0&&!(o.props instanceof Vo.Name)&&(o.props=(0,Ch.evaluatedPropsToName)(e,o.props));let{props:p}=o;d();function d(){for(let y of a)l&&m(y),o.allErrors?g(y):(e.var(f,!0),g(y),e.if(f))}function m(y){for(let _ in l)new RegExp(y).test(_)&&(0,kh.checkStrictMode)(o,`property ${_} matches pattern ${y} (use allowMatchingProperties)`)}function g(y){e.forIn("key",n,_=>{e.if((0,Vo._)`${(0,$h.usePattern)(t,y)}.test(${_})`,()=>{let b=c.includes(y);b||t.subschema({keyword:"patternProperties",schemaProp:y,dataProp:_,dataPropType:Ch.Type.Str},f),o.opts.unevaluated&&p!==!0?e.assign((0,Vo._)`${p}[${_}]`,!0):!b&&!o.allErrors&&e.if((0,Vo.not)(f),()=>e.break())})})}}};el.default=q1});var Ph=S(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});var F1=te(),H1={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,F1.alwaysValidSchema)(n,r)){t.fail();return}let i=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};tl.default=H1});var Rh=S(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});var B1=rt(),U1={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:B1.validateUnion,error:{message:"must match a schema in anyOf"}};rl.default=U1});var Ih=S(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});var Lo=Y(),W1=te(),G1={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Lo._)`{passingSchemas: ${t.passing}}`},z1={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:G1,code(t){let{gen:e,schema:r,parentSchema:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,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((f,p)=>{let d;(0,W1.alwaysValidSchema)(i,f)?e.var(c,!0):d=t.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},c),p>0&&e.if((0,Lo._)`${c} && ${s}`).assign(s,!1).assign(a,(0,Lo._)`[${a}, ${p}]`).else(),e.if(c,()=>{e.assign(s,!0),e.assign(a,p),d&&t.mergeEvaluated(d,Lo.Name)})})}}};nl.default=z1});var Oh=S(il=>{"use strict";Object.defineProperty(il,"__esModule",{value:!0});var J1=te(),K1={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=e.name("valid");r.forEach((o,s)=>{if((0,J1.alwaysValidSchema)(n,o))return;let a=t.subschema({keyword:"allOf",schemaProp:s},i);t.ok(i),t.mergeEvaluated(a)})}};il.default=K1});var Nh=S(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});var jo=Y(),Th=te(),Y1={message:({params:t})=>(0,jo.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,jo._)`{failingKeyword: ${t.ifClause}}`},X1={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Y1,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,Th.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=Ah(n,"then"),o=Ah(n,"else");if(!i&&!o)return;let s=e.let("valid",!0),a=e.name("_valid");if(c(),t.reset(),i&&o){let f=e.let("ifClause");t.setParams({ifClause:f}),e.if(a,l("then",f),l("else",f))}else i?e.if(a,l("then")):e.if((0,jo.not)(a),l("else"));t.pass(s,()=>t.error(!0));function c(){let f=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(f)}function l(f,p){return()=>{let d=t.subschema({keyword:f},a);e.assign(s,a),t.mergeValidEvaluated(d,s),p?e.assign(p,(0,jo._)`${f}`):t.setParams({ifClause:f})}}}};function Ah(t,e){let r=t.schema[e];return r!==void 0&&!(0,Th.alwaysValidSchema)(t,r)}ol.default=X1});var Mh=S(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});var Q1=te(),Z1={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,Q1.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};sl.default=Z1});var Vh=S(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});var eS=Bc(),tS=dh(),rS=Uc(),nS=mh(),iS=gh(),oS=To(),sS=_h(),aS=Xc(),cS=xh(),lS=Eh(),uS=Ph(),pS=Rh(),fS=Ih(),dS=Oh(),hS=Nh(),mS=Mh();function gS(t=!1){let e=[uS.default,pS.default,fS.default,dS.default,hS.default,mS.default,sS.default,aS.default,oS.default,cS.default,lS.default];return t?e.push(tS.default,nS.default):e.push(eS.default,rS.default),e.push(iS.default),e}al.default=gS});var ll=S(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.dynamicAnchor=void 0;var cl=Y(),yS=tt(),Lh=Qn(),vS=Eo(),wS={keyword:"$dynamicAnchor",schemaType:"string",code:t=>jh(t,t.schema)};function jh(t,e){let{gen:r,it:n}=t;n.schemaEnv.root.dynamicAnchors[e]=!0;let i=(0,cl._)`${yS.default.dynamicAnchors}${(0,cl.getProperty)(e)}`,o=n.errSchemaPath==="#"?n.validateName:_S(t);r.if((0,cl._)`!${i}`,()=>r.assign(i,o))}fi.dynamicAnchor=jh;function _S(t){let{schemaEnv:e,schema:r,self:n}=t.it,{root:i,baseId:o,localRefs:s,meta:a}=e.root,{schemaId:c}=n.opts,l=new Lh.SchemaEnv({schema:r,schemaId:c,root:i,baseId:o,localRefs:s,meta:a});return Lh.compileSchema.call(n,l),(0,vS.getValidate)(t,l)}fi.default=wS});var ul=S(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.dynamicRef=void 0;var Dh=Y(),bS=tt(),qh=Eo(),SS={keyword:"$dynamicRef",schemaType:"string",code:t=>Fh(t,t.schema)};function Fh(t,e){let{gen:r,keyword:n,it:i}=t;if(e[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);let o=e.slice(1);if(i.allErrors)s();else{let c=r.let("valid",!1);s(c),t.ok(c)}function s(c){if(i.schemaEnv.root.dynamicAnchors[o]){let l=r.let("_v",(0,Dh._)`${bS.default.dynamicAnchors}${(0,Dh.getProperty)(o)}`);r.if(l,a(l,c),a(i.validateName,c))}else a(i.validateName,c)()}function a(c,l){return l?()=>r.block(()=>{(0,qh.callRef)(t,c),r.let(l,!0)}):()=>(0,qh.callRef)(t,c)}}di.dynamicRef=Fh;di.default=SS});var Hh=S(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});var xS=ll(),$S=te(),kS={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,xS.dynamicAnchor)(t,""):(0,$S.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};pl.default=kS});var Bh=S(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});var CS=ul(),ES={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,CS.dynamicRef)(t,t.schema)};fl.default=ES});var Uh=S(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});var PS=ll(),RS=ul(),IS=Hh(),OS=Bh(),AS=[PS.default,RS.default,IS.default,OS.default];dl.default=AS});var Gh=S(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});var Wh=To(),TS={keyword:"dependentRequired",type:"object",schemaType:"object",error:Wh.error,code:t=>(0,Wh.validatePropertyDeps)(t)};hl.default=TS});var zh=S(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});var NS=To(),MS={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,NS.validateSchemaDeps)(t)};ml.default=MS});var Jh=S(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});var VS=te(),LS={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:r}){e.contains===void 0&&(0,VS.checkStrictMode)(r,`"${t}" without "contains" is ignored`)}};gl.default=LS});var Kh=S(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});var jS=Gh(),DS=zh(),qS=Jh(),FS=[jS.default,DS.default,qS.default];yl.default=FS});var Xh=S(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});var nr=Y(),Yh=te(),HS=tt(),BS={message:"must NOT have unevaluated properties",params:({params:t})=>(0,nr._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},US={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:BS,code(t){let{gen:e,schema:r,data:n,errsCount:i,it:o}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:s,props:a}=o;a instanceof nr.Name?e.if((0,nr._)`${a} !== true`,()=>e.forIn("key",n,p=>e.if(l(a,p),()=>c(p)))):a!==!0&&e.forIn("key",n,p=>a===void 0?c(p):e.if(f(a,p),()=>c(p))),o.props=!0,t.ok((0,nr._)`${i} === ${HS.default.errors}`);function c(p){if(r===!1){t.setParams({unevaluatedProperty:p}),t.error(),s||e.break();return}if(!(0,Yh.alwaysValidSchema)(o,r)){let d=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:p,dataPropType:Yh.Type.Str},d),s||e.if((0,nr.not)(d),()=>e.break())}}function l(p,d){return(0,nr._)`!${p} || !${p}[${d}]`}function f(p,d){let m=[];for(let g in p)p[g]===!0&&m.push((0,nr._)`${d} !== ${g}`);return(0,nr.and)(...m)}}};vl.default=US});var Zh=S(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});var _r=Y(),Qh=te(),WS={message:({params:{len:t}})=>(0,_r.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,_r._)`{limit: ${t}}`},GS={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:WS,code(t){let{gen:e,schema:r,data:n,it:i}=t,o=i.items||0;if(o===!0)return;let s=e.const("len",(0,_r._)`${n}.length`);if(r===!1)t.setParams({len:o}),t.fail((0,_r._)`${s} > ${o}`);else if(typeof r=="object"&&!(0,Qh.alwaysValidSchema)(i,r)){let c=e.var("valid",(0,_r._)`${s} <= ${o}`);e.if((0,_r.not)(c),()=>a(c,o)),t.ok(c)}i.items=!0;function a(c,l){e.forRange("i",l,s,f=>{t.subschema({keyword:"unevaluatedItems",dataProp:f,dataPropType:Qh.Type.Num},c),i.allErrors||e.if((0,_r.not)(c),()=>e.break())})}}};wl.default=GS});var em=S(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0});var zS=Xh(),JS=Zh(),KS=[zS.default,JS.default];_l.default=KS});var tm=S(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});var Se=Y(),YS={message:({schemaCode:t})=>(0,Se.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,Se._)`{format: ${t}}`},XS={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:YS,code(t,e){let{gen:r,data:n,$data:i,schema:o,schemaCode:s,it:a}=t,{opts:c,errSchemaPath:l,schemaEnv:f,self:p}=a;if(!c.validateFormats)return;i?d():m();function d(){let g=r.scopeValue("formats",{ref:p.formats,code:c.code.formats}),y=r.const("fDef",(0,Se._)`${g}[${s}]`),_=r.let("fType"),b=r.let("format");r.if((0,Se._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(_,(0,Se._)`${y}.type || "string"`).assign(b,(0,Se._)`${y}.validate`),()=>r.assign(_,(0,Se._)`"string"`).assign(b,y)),t.fail$data((0,Se.or)(M(),q()));function M(){return c.strictSchema===!1?Se.nil:(0,Se._)`${s} && !${b}`}function q(){let A=f.$async?(0,Se._)`(${y}.async ? await ${b}(${n}) : ${b}(${n}))`:(0,Se._)`${b}(${n})`,T=(0,Se._)`(typeof ${b} == "function" ? ${A} : ${b}.test(${n}))`;return(0,Se._)`${b} && ${b} !== true && ${_} === ${e} && !${T}`}}function m(){let g=p.formats[o];if(!g){M();return}if(g===!0)return;let[y,_,b]=q(g);y===e&&t.pass(A());function M(){if(c.strictSchema===!1){p.logger.warn(T());return}throw new Error(T());function T(){return`unknown format "${o}" ignored in schema at path "${l}"`}}function q(T){let V=T instanceof RegExp?(0,Se.regexpCode)(T):c.code.formats?(0,Se._)`${c.code.formats}${(0,Se.getProperty)(o)}`:void 0,X=r.scopeValue("formats",{key:o,ref:T,code:V});return typeof T=="object"&&!(T instanceof RegExp)?[T.type||"string",T.validate,(0,Se._)`${X}.validate`]:["string",T,X]}function A(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!f.$async)throw new Error("async format in sync schema");return(0,Se._)`await ${b}(${n})`}return typeof _=="function"?(0,Se._)`${b}(${n})`:(0,Se._)`${b}.test(${n})`}}}};bl.default=XS});var rm=S(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});var QS=tm(),ZS=[QS.default];Sl.default=ZS});var nm=S(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.contentVocabulary=en.metadataVocabulary=void 0;en.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];en.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var om=S(xl=>{"use strict";Object.defineProperty(xl,"__esModule",{value:!0});var ex=Kd(),tx=lh(),rx=Vh(),nx=Uh(),ix=Kh(),ox=em(),sx=rm(),im=nm(),ax=[nx.default,ex.default,tx.default,(0,rx.default)(!0),sx.default,im.metadataVocabulary,im.contentVocabulary,ix.default,ox.default];xl.default=ax});var am=S(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.DiscrError=void 0;var sm;(function(t){t.Tag="tag",t.Mapping="mapping"})(sm||(Do.DiscrError=sm={}))});var lm=S(kl=>{"use strict";Object.defineProperty(kl,"__esModule",{value:!0});var tn=Y(),$l=am(),cm=Qn(),cx=Xn(),lx=te(),ux={message:({params:{discrError:t,tagName:e}})=>t===$l.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,tn._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},px={keyword:"discriminator",type:"object",schemaType:"object",error:ux,code(t){let{gen:e,data:r,schema:n,parentSchema:i,it:o}=t,{oneOf:s}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),l=e.const("tag",(0,tn._)`${r}${(0,tn.getProperty)(a)}`);e.if((0,tn._)`typeof ${l} == "string"`,()=>f(),()=>t.error(!1,{discrError:$l.DiscrError.Tag,tag:l,tagName:a})),t.ok(c);function f(){let m=d();e.if(!1);for(let g in m)e.elseIf((0,tn._)`${l} === ${g}`),e.assign(c,p(m[g]));e.else(),t.error(!1,{discrError:$l.DiscrError.Mapping,tag:l,tagName:a}),e.endIf()}function p(m){let g=e.name("valid"),y=t.subschema({keyword:"oneOf",schemaProp:m},g);return t.mergeEvaluated(y,tn.Name),g}function d(){var m;let g={},y=b(i),_=!0;for(let A=0;A<s.length;A++){let T=s[A];if(T?.$ref&&!(0,lx.schemaHasRulesButRef)(T,o.self.RULES)){let X=T.$ref;if(T=cm.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,X),T instanceof cm.SchemaEnv&&(T=T.schema),T===void 0)throw new cx.default(o.opts.uriResolver,o.baseId,X)}let V=(m=T?.properties)===null||m===void 0?void 0:m[a];if(typeof V!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);_=_&&(y||b(T)),M(V,A)}if(!_)throw new Error(`discriminator: "${a}" must be required`);return g;function b({required:A}){return Array.isArray(A)&&A.includes(a)}function M(A,T){if(A.const)q(A.const,T);else if(A.enum)for(let V of A.enum)q(V,T);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function q(A,T){if(typeof A!="string"||A in g)throw new Error(`discriminator: "${a}" values must be unique strings`);g[A]=T}}}};kl.default=px});var um=S((XO,fx)=>{fx.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 pm=S((QO,dx)=>{dx.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 fm=S((ZO,hx)=>{hx.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 dm=S((eA,mx)=>{mx.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 hm=S((tA,gx)=>{gx.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 mm=S((rA,yx)=>{yx.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 gm=S((nA,vx)=>{vx.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 ym=S((iA,wx)=>{wx.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 vm=S(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});var _x=um(),bx=pm(),Sx=fm(),xx=dm(),$x=hm(),kx=mm(),Cx=gm(),Ex=ym(),Px=["/properties"];function Rx(t){return[_x,bx,Sx,xx,$x,e(this,kx),Cx,e(this,Ex)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function e(r,n){return t?r.$dataMetaSchema(n,Px):n}}Cl.default=Rx});var wm=S((ge,Pl)=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.MissingRefError=ge.ValidationError=ge.CodeGen=ge.Name=ge.nil=ge.stringify=ge.str=ge._=ge.KeywordCxt=ge.Ajv2020=void 0;var Ix=Ud(),Ox=om(),Ax=lm(),Tx=vm(),El="https://json-schema.org/draft/2020-12/schema",rn=class extends Ix.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),Ox.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(Ax.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:r}=this.opts;r&&(Tx.default.call(this,e),this.refs["http://json-schema.org/schema"]=El)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(El)?El:void 0)}};ge.Ajv2020=rn;Pl.exports=ge=rn;Pl.exports.Ajv2020=rn;Object.defineProperty(ge,"__esModule",{value:!0});ge.default=rn;var Nx=Yn();Object.defineProperty(ge,"KeywordCxt",{enumerable:!0,get:function(){return Nx.KeywordCxt}});var nn=Y();Object.defineProperty(ge,"_",{enumerable:!0,get:function(){return nn._}});Object.defineProperty(ge,"str",{enumerable:!0,get:function(){return nn.str}});Object.defineProperty(ge,"stringify",{enumerable:!0,get:function(){return nn.stringify}});Object.defineProperty(ge,"nil",{enumerable:!0,get:function(){return nn.nil}});Object.defineProperty(ge,"Name",{enumerable:!0,get:function(){return nn.Name}});Object.defineProperty(ge,"CodeGen",{enumerable:!0,get:function(){return nn.CodeGen}});var Mx=wo();Object.defineProperty(ge,"ValidationError",{enumerable:!0,get:function(){return Mx.default}});var Vx=Xn();Object.defineProperty(ge,"MissingRefError",{enumerable:!0,get:function(){return Vx.default}})});import{readFileSync as Lx}from"node:fs";import{createRequire as jx}from"node:module";import{dirname as Rl,resolve as Dx}from"node:path";import{fileURLToPath as qx}from"node:url";function Pe(){if(on)return on;let t=jx(import.meta.url);try{return on=Rl(t.resolve("view-contracts/package.json")),on}catch{let e=Rl(qx(import.meta.url));for(;;){try{let n=Dx(e,"package.json");if(JSON.parse(Lx(n,"utf8")).name==="view-contracts")return on=e,on}catch{}let r=Rl(e);if(r===e)break;e=r}throw new Error("view-contracts package root not found")}}var on,ir=K(()=>{"use strict"});import{readFile as Ux}from"node:fs/promises";async function Ho(t){return ut.load(await Ux(t,"utf-8"))}function xm(t,e,r){for(let n of t)if(!e.has(n))throw new Error(`${r}: unknown element "${n}" \u2014 not in spec/ui-dsl.schema.json vocabulary`)}function $m(t,e,r){for(let[n,i]of Object.entries(t))for(let o of e)if(i[o]===void 0||i[o]===null||i[o]==="")throw new Error(`${r}: element "${n}" is missing required "${String(o)}"`)}var Il=K(()=>{"use strict";Fr()});import{resolve as Wx}from"node:path";function Gx(t){xm(Object.keys(t.elements),wt,km),$m(t.elements,["tag"],km)}async function Al(t){if(!t&&Ol)return Ol;let e=t??Wx(Pe(),"renderers/react/elements.yaml"),r=await Ho(e);return Gx(r),t||(Ol=r),r}var km,Ol,Cm=K(()=>{"use strict";Vt();Vt();ir();Il();km="renderers/react/elements.yaml",Ol=null});function Em(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t}function Pm(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 Rm=K(()=>{"use strict"});function gt(t){return`${t}px`}function sn(t){let e=t.match(/^\{([^}]+)\}$/);if(e)return`var(--${e[1].replace(/\./g,"-")})`}function Tl(t){let e={},r=t.width;typeof r=="number"?e.width=gt(r):r==="fill"?e.width="100%":typeof r=="string"&&r!=="wrap"&&(e.width=r),typeof t.minWidth=="number"&&(e.minWidth=gt(t.minWidth));let n=t.maxWidth;typeof n=="number"?e.maxWidth=gt(n):n==="fill"&&(e.maxWidth="100%");let i=t.height;typeof i=="number"?e.height=gt(i):i==="fill"?e.height="100%":typeof i=="string"&&i!=="wrap"&&(e.height=i),typeof t.minHeight=="number"&&(e.minHeight=gt(t.minHeight));let o=t.maxHeight;typeof o=="number"?e.maxHeight=gt(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=gt(t.padding)),typeof t.margin=="number"&&(e.margin=gt(t.margin)),typeof t.gap=="number"&&(e.gap=gt(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 Im&&(e.placeItems=Im[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 f=t.size;typeof f=="number"?e.fontSize=gt(f):typeof f=="string"&&(e.fontSize=f);let p=typeof s=="string"?s:t.fontWeight;typeof p=="string"&&(e.fontWeight=p);let d=t.background;typeof d=="string"&&(e.background=sn(d)??d);let m=t.foreground;typeof m=="string"&&(e.color=sn(m)??m);let g=t.radius;typeof g=="number"?e.borderRadius=gt(g):typeof g=="string"&&(e.borderRadius=sn(g)??g);let y=t.shadow;y===!0?e.boxShadow="var(--ui-shadow)":y===!1?e.boxShadow="none":typeof y=="string"&&(e.boxShadow=zx[y]??sn(y)??y);let _=t.border;typeof _=="string"&&(e.border=sn(_)??_),typeof t.opacity=="number"&&(e.opacity=t.opacity);let b=t.clip;typeof b=="string"&&(e.overflow=b==="hidden"?"hidden":b);let M=t.align;if(typeof M=="string"){let V=Em(M);V&&(e.alignItems=V)}let q=t.justify;if(typeof q=="string"){let V=Pm(q);V&&(e.justifyContent=V)}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 A=t.borderColor;typeof A=="string"&&(e.borderColor=sn(A)??A);let T=t.flex;return typeof T=="number"&&(e.flex=T),e}function hi(t){let e=Object.entries(t);return e.length===0?"":`style={{ ${e.map(([n,i])=>typeof i=="number"?`${n}: ${i}`:`${n}: ${JSON.stringify(i)}`).join(", ")} }}`}var Im,zx,Nl=K(()=>{"use strict";Rm();Im={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"},zx={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 Bo(t,e){let r=t[e];if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="object"&&"kind"in r&&r.kind==="literal")return r.value}}function Jx(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 Kx(t){let e={};for(let[r,n]of Object.entries(t)){if(!no.has(r))continue;Jx(r,n);let i=Bo(t,r);i!==void 0&&(e[r]=i)}return e}function Yx(t){return t.flex?{display:"flex",flexDirection:t.flex==="column"?"column":"row"}:{}}function Xx(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 Om(t,e){let r=Kx(e),n=Tl(r);if(n={...n,...Yx(t)},t.tableCell){if("alignItems"in n){let i=String(n.alignItems);n.textAlign=i==="flex-end"?"right":i==="center"?"center":"left",delete n.alignItems}"width"in n&&!("flex"in n)&&(n.flexShrink=0,n.flexGrow=0)}if(t.scrollContainer){let i=Bo(e,"scroll"),o=Bo(e,"axis"),s=typeof i=="string"?i:typeof o=="string"?o==="horizontal"?"horizontal":"vertical":void 0;if(s)return n={...n,...Xx(s)},hi(n);throw new Error("ScrollArea scroll/axis must be compile-time literals")}if(t.flexGrowProp&&e[t.flexGrowProp]){let i=Bo(e,t.flexGrowProp);if(typeof i=="number")return n.flexGrow=i,hi(n);throw new Error(`"${t.flexGrowProp}" on <Spacer> must be a compile-time literal`)}return hi(n)}var Am=K(()=>{"use strict";Vt();Nl();Nl()});function z(t){return" ".repeat(t)}function Sr(t,e="vm"){let r=t.scope??e;return t.path?`${r}.${t.path}`:r}function Lm(t){return t.parts.map(e=>typeof e=="string"?e:`\${${Sr(e)}}`).join("")}function Qx(t){return`\`${Lm(t)}\``}function Uo(t,e=!1){let r=e?" as ActionDescriptor":"";if(!t.params||Object.keys(t.params).length===0)return`{ name: ${JSON.stringify(t.name)} }${r}`;let n=Object.entries(t.params).map(([i,o])=>`${i}: ${cn(o,0)}`).join(", ");return`{ name: ${JSON.stringify(t.name)}, params: { ${n} } }${r}`}function Vl(t,e,r=!1){if(t===null)return"null";if(typeof t=="string")return JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t))return`[
68
+ ${t.map(n=>`${z(e+1)}${Vl(n,e+1,r)}`).join(`,
69
69
  `)}
70
- ${z(e)}]`;if(typeof t=="object"&&t!==null){let n=t;return"kind"in n&&n.kind==="action"?Bo(n,r):`{
71
- ${Object.entries(n).map(([o,s])=>`${o}: ${Ml(s,e+1,r)}`).map(o=>`${z(e+1)}${o}`).join(`,
70
+ ${z(e)}]`;if(typeof t=="object"&&t!==null){let n=t;return"kind"in n&&n.kind==="action"?Uo(n,r):`{
71
+ ${Object.entries(n).map(([o,s])=>`${o}: ${Vl(s,e+1,r)}`).map(o=>`${z(e+1)}${o}`).join(`,
72
72
  `)}
73
73
  ${z(e)}}`}return"undefined"}function cn(t,e,r=!1){if(t===null)return"null";if(typeof t=="string")return JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t))return`[
74
74
  ${t.map(n=>`${z(e+1)}${cn(n,e+1,r)}`).join(`,
75
75
  `)}
76
- ${z(e)}]`;if(typeof t=="object"&&t!==null&&"kind"in t){if(t.kind==="binding")return Sr(t);if(t.kind==="action")return Bo(t,r);if(t.kind==="literal")return Ml(t.value,e,r);if(t.kind==="concat")return zx(t)}return"undefined"}function an(t,e){let r=t[e];if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="object"&&"kind"in r&&r.kind==="literal")return r.value}}function G(t,e){let r=t[e];if(r!=null)return cn(r,0)}function gi(t,e,r){let n=Im(e,r);n&&t.push(n)}function Jx(t,e){let r=t.action??t[e==="onClick"?"onClick":"onSubmit"];if(!r||typeof r!="object"||!("kind"in r)||r.kind!=="action")return;let n=Bo(r,!0);return e==="onSubmit"?`onSubmit={(e) => { e.preventDefault(); void dispatchAction(${n}); }}`:`onClick={() => { void dispatchAction(${n}); }}`}function Nl(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Kx(t,e){let r=an(e,"variant");if(typeof r=="string")return` vc-${Nl(t)}--${r}`;let n=e.variant;if(n&&typeof n=="object"&&"kind"in n&&n.kind==="concat")return` vc-${Nl(t)}--${Mm(n)}`;let i=G(e,"variant");if(i)return` vc-${Nl(t)}--\${${i}}`}function yi(t,e,r){let n=e.className??"",i=Kx(t,r);if(i)return typeof an(r,"variant")=="string"?`className="${n}${i}"`:`className={\`${n}${i}\`}`;if(e.wrapProp&&an(r,e.wrapProp)===!0)return`className="${n} vc-wrap"`;if(e.sizeClass&&r.size){let o=G(r,"size");return`className={\`${e.className} ${e.sizeClass}-\${${o} ?? 'md'}\`}`}return`className="${n}"`}function Om(t,e,r){let n=an(e,"label"),i=an(e,"help"),o=an(e,"error"),s=G(e,"label"),a=G(e,"help"),c=G(e,"error"),l=[`${z(r)}<label className="vc-field">`];return typeof n=="string"?l.push(`${z(r+1)}<span className="vc-text vc-text--field-label">{${JSON.stringify(n)}}</span>`):s&&l.push(`${z(r+1)}{${s} ? <span className="vc-text vc-text--field-label">{${s}}</span> : null}`),l.push(`${z(r+1)}${t}`),typeof i=="string"?l.push(`${z(r+1)}<span className="vc-text vc-text--field-help">{${JSON.stringify(i)}}</span>`):a&&l.push(`${z(r+1)}{${a} ? <span className="vc-text vc-text--field-help">{${a}}</span> : null}`),typeof o=="string"?l.push(`${z(r+1)}<span className="vc-text vc-text--field-error">{${JSON.stringify(o)}}</span>`):c&&l.push(`${z(r+1)}{${c} ? <span className="vc-text vc-text--field-error">{${c}}</span> : null}`),l.push(`${z(r)}</label>`),l.join(`
77
- `)}function Yx(t,e){let r=G(t,"name")??'""',n=G(t,"label")??'""',i=t.checked?`defaultChecked={${G(t,"checked")}}`:"",o=t.enabled?`disabled={${G(t,"enabled")} === false}`:"";return`${z(e)}<label className="vc-checkbox">
76
+ ${z(e)}]`;if(typeof t=="object"&&t!==null&&"kind"in t){if(t.kind==="binding")return Sr(t);if(t.kind==="action")return Uo(t,r);if(t.kind==="literal")return Vl(t.value,e,r);if(t.kind==="concat")return Qx(t)}return"undefined"}function an(t,e){let r=t[e];if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="object"&&"kind"in r&&r.kind==="literal")return r.value}}function G(t,e){let r=t[e];if(r!=null)return cn(r,0)}function gi(t,e,r){let n=Om(e,r);n&&t.push(n)}function Zx(t,e){let r=t.action??t[e==="onClick"?"onClick":"onSubmit"];if(!r||typeof r!="object"||!("kind"in r)||r.kind!=="action")return;let n=Uo(r,!0);return e==="onSubmit"?`onSubmit={(e) => { e.preventDefault(); void dispatchAction(${n}); }}`:`onClick={() => { void dispatchAction(${n}); }}`}function Ml(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function e$(t,e){let r=an(e,"variant");if(typeof r=="string")return` vc-${Ml(t)}--${r}`;let n=e.variant;if(n&&typeof n=="object"&&"kind"in n&&n.kind==="concat")return` vc-${Ml(t)}--${Lm(n)}`;let i=G(e,"variant");if(i)return` vc-${Ml(t)}--\${${i}}`}function yi(t,e,r){let n=e.className??"",i=e$(t,r);if(i)return typeof an(r,"variant")=="string"?`className="${n}${i}"`:`className={\`${n}${i}\`}`;if(e.wrapProp&&an(r,e.wrapProp)===!0)return`className="${n} vc-wrap"`;if(e.sizeClass&&r.size){let o=G(r,"size");return`className={\`${e.className} ${e.sizeClass}-\${${o} ?? 'md'}\`}`}return`className="${n}"`}function Tm(t,e,r){let n=an(e,"label"),i=an(e,"help"),o=an(e,"error"),s=G(e,"label"),a=G(e,"help"),c=G(e,"error"),l=[`${z(r)}<label className="vc-field">`];return typeof n=="string"?l.push(`${z(r+1)}<span className="vc-text vc-text--field-label">{${JSON.stringify(n)}}</span>`):s&&l.push(`${z(r+1)}{${s} ? <span className="vc-text vc-text--field-label">{${s}}</span> : null}`),l.push(`${z(r+1)}${t}`),typeof i=="string"?l.push(`${z(r+1)}<span className="vc-text vc-text--field-help">{${JSON.stringify(i)}}</span>`):a&&l.push(`${z(r+1)}{${a} ? <span className="vc-text vc-text--field-help">{${a}}</span> : null}`),typeof o=="string"?l.push(`${z(r+1)}<span className="vc-text vc-text--field-error">{${JSON.stringify(o)}}</span>`):c&&l.push(`${z(r+1)}{${c} ? <span className="vc-text vc-text--field-error">{${c}}</span> : null}`),l.push(`${z(r)}</label>`),l.join(`
77
+ `)}function t$(t,e){let r=G(t,"name")??'""',n=G(t,"label")??'""',i=t.checked?`defaultChecked={${G(t,"checked")}}`:"",o=t.enabled?`disabled={${G(t,"enabled")} === false}`:"";return`${z(e)}<label className="vc-checkbox">
78
78
  ${z(e+1)}<input type="checkbox" name={${r}} ${i} ${o} />
79
79
  ${z(e+1)}<span>{${n}}</span>
80
- ${z(e)}</label>`}function Xx(t,e){let r=G(t,"binding")??G(t,"name")??'""',n=G(t,"value")??'""',i=G(t,"label")??'""',o=t.checked?`defaultChecked={${G(t,"checked")}}`:"",s=t.enabled?`disabled={${G(t,"enabled")} === false}`:"";return`${z(e)}<label className="vc-radio">
80
+ ${z(e)}</label>`}function r$(t,e){let r=G(t,"binding")??G(t,"name")??'""',n=G(t,"value")??'""',i=G(t,"label")??'""',o=t.checked?`defaultChecked={${G(t,"checked")}}`:"",s=t.enabled?`disabled={${G(t,"enabled")} === false}`:"";return`${z(e)}<label className="vc-radio">
81
81
  ${z(e+1)}<input type="radio" name={${r}} value={${n}} ${o} ${s} />
82
82
  ${z(e+1)}<span>{${i}}</span>
83
- ${z(e)}</label>`}function Qx(t,e){let r=G(t,"binding")??G(t,"name")??'""',n=G(t,"label")??'""',i=t.checked?`defaultChecked={${G(t,"checked")}}`:"",o=t.enabled?`disabled={${G(t,"enabled")} === false}`:"";return`${z(e)}<label className="vc-switch">
83
+ ${z(e)}</label>`}function n$(t,e){let r=G(t,"binding")??G(t,"name")??'""',n=G(t,"label")??'""',i=t.checked?`defaultChecked={${G(t,"checked")}}`:"",o=t.enabled?`disabled={${G(t,"enabled")} === false}`:"";return`${z(e)}<label className="vc-switch">
84
84
  ${z(e+1)}<input type="checkbox" role="switch" name={${r}} ${i} ${o} />
85
85
  ${z(e+1)}<span>{${n}}</span>
86
- ${z(e)}</label>`}function Zx(t,e,r){let n=t.props;if(n.alt!==void 0){let s=[yi(t.name,e,n),`src={${G(n,"name")??'""'}}`,`alt={${G(n,"alt")??'""'}}`];return gi(s,e,n),n.id&&s.push(`id={${G(n,"id")}}`),`${z(r)}<img ${s.join(" ")} />`}let o=[yi(t.name,e,n),"aria-hidden"];return gi(o,e,n),n.id&&o.push(`id={${G(n,"id")}}`),n.name&&o.push(`data-icon={${G(n,"name")}}`),`${z(r)}<span ${o.join(" ")} />`}function Am(t,e){let r=t.options;if(!r||typeof r!="object"||!("kind"in r))return"";if(r.kind==="literal"&&Array.isArray(r.value))return r.value.map(o=>`${z(e+1)}<option key={${JSON.stringify(o.value)}} value={${JSON.stringify(o.value)}}>{${JSON.stringify(o.label)}}</option>`).join(`
87
- `);let n=cn(r,0);return`${z(e+1)}{${n}.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}`}function Tm(t,e,r,n){let i=[yi(t,e,r)];return gi(i,e,r),e.ariaHidden&&i.push("aria-hidden"),r.id&&i.push(`id={${G(r,"id")}}`),r.role?i.push(`role={${G(r,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(r.ariaLabel?i.push(`aria-label={${G(r,"ariaLabel")}}`):r.label?i.push(`aria-label={${G(r,"label")}}`):r.title&&i.push(`aria-label={${G(r,"title")}}`)),r.name&&i.push(`name={${G(r,"name")}}`),r.placeholder&&i.push(`placeholder={${G(r,"placeholder")}}`),e.inputType&&i.push(`type={${G(r,"type")??JSON.stringify(e.inputType)}}`),r.required&&i.push(`required={${G(r,"required")}}`),r.readonly&&i.push(`readOnly={${G(r,"readonly")}}`),r.enabled&&i.push(`disabled={${G(r,"enabled")} === false}`),e.tag==="img"&&r.src&&i.push(`src={${G(r,"src")}}`),e.tag==="img"&&r.alt&&i.push(`alt={${G(r,"alt")}}`),e.tag==="progress"&&r.value&&i.push(`value={${G(r,"value")}}`),r.rows&&i.push(`rows={${G(r,"rows")??"4"}}`),`${z(n)}<${e.tag} ${i.join(" ")} />`}function Nm(t,e,r,n){let i=[];if(e.ariaHidden&&i.push("aria-hidden"),r.id&&i.push(`id={${G(r,"id")}}`),r.role?i.push(`role={${G(r,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(r.ariaLabel?i.push(`aria-label={${G(r,"ariaLabel")}}`):r.label?i.push(`aria-label={${G(r,"label")}}`):r.title&&i.push(`aria-label={${G(r,"title")}}`)),e.actionEvent){let o=Jx(r,e.actionEvent);o&&i.push(o)}return e.tag==="button"&&r.enabled&&i.push(`disabled={${G(r,"enabled")} === false}`),e.tag==="a"&&r.href&&i.push(`href={${G(r,"href")}}`),e.tag==="button"&&i.push(`type={${G(r,"type")??'"button"'}}`),i.push(yi(t,e,r)),gi(i,e,r),`<${n} ${i.join(" ")}`}function qt(t,e,r){if(e.visible===void 0)return t;let n=G(e,"visible");return`${z(r)}{${n} !== false ? (
86
+ ${z(e)}</label>`}function i$(t,e,r){let n=t.props;if(n.alt!==void 0){let s=[yi(t.name,e,n),`src={${G(n,"name")??'""'}}`,`alt={${G(n,"alt")??'""'}}`];return gi(s,e,n),n.id&&s.push(`id={${G(n,"id")}}`),`${z(r)}<img ${s.join(" ")} />`}let o=[yi(t.name,e,n),"aria-hidden"];return gi(o,e,n),n.id&&o.push(`id={${G(n,"id")}}`),n.name&&o.push(`data-icon={${G(n,"name")}}`),`${z(r)}<span ${o.join(" ")} />`}function Nm(t,e){let r=t.options;if(!r||typeof r!="object"||!("kind"in r))return"";if(r.kind==="literal"&&Array.isArray(r.value))return r.value.map(o=>`${z(e+1)}<option key={${JSON.stringify(o.value)}} value={${JSON.stringify(o.value)}}>{${JSON.stringify(o.label)}}</option>`).join(`
87
+ `);let n=cn(r,0);return`${z(e+1)}{${n}.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}`}function Mm(t,e,r,n){let i=[yi(t,e,r)];return gi(i,e,r),e.ariaHidden&&i.push("aria-hidden"),r.id&&i.push(`id={${G(r,"id")}}`),r.role?i.push(`role={${G(r,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(r.ariaLabel?i.push(`aria-label={${G(r,"ariaLabel")}}`):r.label?i.push(`aria-label={${G(r,"label")}}`):r.title&&i.push(`aria-label={${G(r,"title")}}`)),r.name&&i.push(`name={${G(r,"name")}}`),r.placeholder&&i.push(`placeholder={${G(r,"placeholder")}}`),e.inputType&&i.push(`type={${G(r,"type")??JSON.stringify(e.inputType)}}`),r.required&&i.push(`required={${G(r,"required")}}`),r.readonly&&i.push(`readOnly={${G(r,"readonly")}}`),r.enabled&&i.push(`disabled={${G(r,"enabled")} === false}`),e.tag==="img"&&r.src&&i.push(`src={${G(r,"src")}}`),e.tag==="img"&&r.alt&&i.push(`alt={${G(r,"alt")}}`),e.tag==="progress"&&r.value&&i.push(`value={${G(r,"value")}}`),r.rows&&i.push(`rows={${G(r,"rows")??"4"}}`),`${z(n)}<${e.tag} ${i.join(" ")} />`}function Vm(t,e,r,n){let i=[];if(e.ariaHidden&&i.push("aria-hidden"),r.id&&i.push(`id={${G(r,"id")}}`),r.role?i.push(`role={${G(r,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(r.ariaLabel?i.push(`aria-label={${G(r,"ariaLabel")}}`):r.label?i.push(`aria-label={${G(r,"label")}}`):r.title&&i.push(`aria-label={${G(r,"title")}}`)),e.actionEvent){let o=Zx(r,e.actionEvent);o&&i.push(o)}return e.tag==="button"&&r.enabled&&i.push(`disabled={${G(r,"enabled")} === false}`),e.tag==="a"&&r.href&&i.push(`href={${G(r,"href")}}`),e.tag==="button"&&i.push(`type={${G(r,"type")??'"button"'}}`),i.push(yi(t,e,r)),gi(i,e,r),`<${n} ${i.join(" ")}`}function qt(t,e,r){if(e.visible===void 0)return t;let n=G(e,"visible");return`${z(r)}{${n} !== false ? (
88
88
  ${t}
89
- ${z(r)}) : null}`}function Vl(t,e,r,n){if(t.length===0)return"";let i=n??"vm";return t.map(s=>{if(s.kind==="text"){let a=s.value;return a?`${z(e)}{${JSON.stringify(a)}}`:""}return s.kind==="binding"?`${z(e)}{${Sr(s,i)}}`:s.kind==="map"?e$(s,e,r):s.kind==="fragment"?Vl(s.children,e,r,n):r(s,e,n)}).filter(Boolean).join(`
90
- `)}function e$(t,e,r){let n=t.item,i=r(t.body,e+1,n);if(t.key){let o=` key={${Sr(t.key,n)}}`;i=i.replace(/^( +)<(\w+)/,`$1<$2${o}`)}return`${z(e)}{${Sr(t.source)}.map((${n}) => (
89
+ ${z(r)}) : null}`}function Ll(t,e,r,n){if(t.length===0)return"";let i=n??"vm";return t.map(s=>{if(s.kind==="text"){let a=s.value;return a?`${z(e)}{${JSON.stringify(a)}}`:""}return s.kind==="binding"?`${z(e)}{${Sr(s,i)}}`:s.kind==="map"?o$(s,e,r):s.kind==="fragment"?Ll(s.children,e,r,n):r(s,e,n)}).filter(Boolean).join(`
90
+ `)}function o$(t,e,r){let n=t.item,i=r(t.body,e+1,n);if(t.key){let o=` key={${Sr(t.key,n)}}`;i=i.replace(/^( +)<(\w+)/,`$1<$2${o}`)}return`${z(e)}{${Sr(t.source)}.map((${n}) => (
91
91
  ${i}
92
- ${z(e)}))}`}function t$(t,e,r,n,i){let o=t.props,s=Vl(t.children,r+1,i,n);if(e.checkbox)return qt(Yx(o,r),o,r);if(t.name==="Radio")return qt(Xx(o,r),o,r);if(t.name==="Switch")return qt(Qx(o,r),o,r);if(t.name==="Icon")return qt(Zx(t,e,r),o,r);if(t.name==="Spinner"){let f=[yi(t.name,e,o),'aria-busy="true"'];return gi(f,e,o),o.id&&f.push(`id={${G(o,"id")}}`),o.role?f.push(`role={${G(o,"role")}}`):e.defaultRole&&f.push(`role="${e.defaultRole}"`),qt(`${z(r)}<div ${f.join(" ")} />`,o,r)}if(e.fieldContainer){let f=s||`${z(r+1)}<div />`;return qt(Om(f,o,r),o,r)}if(e.fieldWrap){let f=e.tag,p;if(e.optionsProp&&o[e.optionsProp]){let d=Nm(t.name,e,o,f);p=`${z(r+1)}${d}>
93
- ${Am(o,r+2)}
94
- ${z(r+1)}</${f}>`}else p=Tm(t.name,e,o,r+1);return qt(Om(p,o,r),o,r)}let a=e.tag;if(e.void)return qt(Tm(t.name,e,o,r),o,r);let c=Nm(t.name,e,o,a),l;return!s&&e.optionsProp&&o[e.optionsProp]?l=`${z(r)}${c}>
95
- ${Am(o,r+1)}
92
+ ${z(e)}))}`}function s$(t,e,r,n,i){let o=t.props,s=Ll(t.children,r+1,i,n);if(e.checkbox)return qt(t$(o,r),o,r);if(t.name==="Radio")return qt(r$(o,r),o,r);if(t.name==="Switch")return qt(n$(o,r),o,r);if(t.name==="Icon")return qt(i$(t,e,r),o,r);if(t.name==="Spinner"){let f=[yi(t.name,e,o),'aria-busy="true"'];return gi(f,e,o),o.id&&f.push(`id={${G(o,"id")}}`),o.role?f.push(`role={${G(o,"role")}}`):e.defaultRole&&f.push(`role="${e.defaultRole}"`),qt(`${z(r)}<div ${f.join(" ")} />`,o,r)}if(e.fieldContainer){let f=s||`${z(r+1)}<div />`;return qt(Tm(f,o,r),o,r)}if(e.fieldWrap){let f=e.tag,p;if(e.optionsProp&&o[e.optionsProp]){let d=Vm(t.name,e,o,f);p=`${z(r+1)}${d}>
93
+ ${Nm(o,r+2)}
94
+ ${z(r+1)}</${f}>`}else p=Mm(t.name,e,o,r+1);return qt(Tm(p,o,r),o,r)}let a=e.tag;if(e.void)return qt(Mm(t.name,e,o,r),o,r);let c=Vm(t.name,e,o,a),l;return!s&&e.optionsProp&&o[e.optionsProp]?l=`${z(r)}${c}>
95
+ ${Nm(o,r+1)}
96
96
  ${z(r)}</${a}>`:s?l=`${z(r)}${c}>
97
97
  ${s}
98
- ${z(r)}</${a}>`:l=`${z(r)}${c} />`,qt(l,o,r)}function r$(t,e){let r=e??"vm";return Object.entries(t).map(([n,i])=>typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${n}={${Sr(i,r)}}`:`${n}={${cn(i,0)}}`).join(" ")}function n$(t,e,r){let n=r$(t.props,r),i=n?` ${n}`:"";return`${z(e)}<${t.name}${i} />`}function i$(t,e){let r=e??"vm";return Object.entries(t).map(([n,i])=>n==="action"&&typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="action"?`${n}={${Bo(i,!0)}}`:typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${n}={${Sr(i,r)}}`:n==="children"?"":`${n}={${cn(i,0,n==="columns")}}`).join(" ")}function o$(t,e,r,n){let i=i$(t.props,r),o=i?` ${i}`:"",s=Vl(t.children,e+1,n,r);return s?`${z(e)}<${t.name}${o}>
98
+ ${z(r)}</${a}>`:l=`${z(r)}${c} />`,qt(l,o,r)}function a$(t,e){let r=e??"vm";return Object.entries(t).map(([n,i])=>typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${n}={${Sr(i,r)}}`:`${n}={${cn(i,0)}}`).join(" ")}function c$(t,e,r){let n=a$(t.props,r),i=n?` ${n}`:"";return`${z(e)}<${t.name}${i} />`}function l$(t,e){let r=e??"vm";return Object.entries(t).map(([n,i])=>n==="action"&&typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="action"?`${n}={${Uo(i,!0)}}`:typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${n}={${Sr(i,r)}}`:n==="children"?"":`${n}={${cn(i,0,n==="columns")}}`).join(" ")}function u$(t,e,r,n){let i=l$(t.props,r),o=i?` ${i}`:"",s=Ll(t.children,e+1,n,r);return s?`${z(e)}<${t.name}${o}>
99
99
  ${s}
100
- ${z(e)}</${t.name}>`:`${z(e)}<${t.name}${o} />`}function Vm(t,e,r){return t in e.elements&&!r.includes(t)}function mi(t,e){if(t.kind==="viewRef"){e.add(t.name);return}if(t.kind==="component"){for(let r of t.children)mi(r,e);return}if(t.kind==="map"&&mi(t.body,e),t.kind==="fragment")for(let r of t.children)mi(r,e)}function br(t,e,r,n){if(t.kind==="component"){Vm(t.name,e,r)||n.add(t.name);for(let i of t.children)br(i,e,r,n);return}if(t.kind==="map"&&br(t.body,e,r,n),t.kind==="fragment")for(let i of t.children)br(i,e,r,n)}function Lm(t,e){let r=(n,i,o)=>n.kind==="viewRef"?n$(n,i,o):n.kind!=="component"?"":Vm(n.name,t,e)?t$(n,t.elements[n.name],i,o,r):o$(n,i,o,r);return(n,i,o)=>r(n,i,o)}var jm=K(()=>{"use strict";Rm()});var jl={};Dr(jl,{partialReactOutputPath:()=>d$,renderReactComponent:()=>Ll,renderReactFromIr:()=>p$,renderReactPreviewBundle:()=>f$});import{resolve as s$}from"node:path";function a$(t){if(t.isPartial)return t.exportName;let e=t.exportName.replace(/View$/,"")||t.exportName;return e.charAt(0).toUpperCase()+e.slice(1)}function c$(t,e){if(t.kind!=="component")throw new Error(`View IR root must be a component node (${e})`);return t}function qm(t){if(!t)return[];let e=t.match(/\b[A-Z][A-Za-z0-9]*ViewModel\b/g);return e?[...new Set(e)]:[]}function l$(t){if(!t.propsType)return"";let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?`{ ${e[1].trim().split(/[,;]/).map(i=>i.split(":")[0].trim()).filter(Boolean).join(", ")} }: ${t.propsType}`:`props: ${t.propsType}`}function Dm(t){return t.trimStart().startsWith("{")?`return (
100
+ ${z(e)}</${t.name}>`:`${z(e)}<${t.name}${o} />`}function jm(t,e,r){return t in e.elements&&!r.includes(t)}function mi(t,e){if(t.kind==="viewRef"){e.add(t.name);return}if(t.kind==="component"){for(let r of t.children)mi(r,e);return}if(t.kind==="map"&&mi(t.body,e),t.kind==="fragment")for(let r of t.children)mi(r,e)}function br(t,e,r,n){if(t.kind==="component"){jm(t.name,e,r)||n.add(t.name);for(let i of t.children)br(i,e,r,n);return}if(t.kind==="map"&&br(t.body,e,r,n),t.kind==="fragment")for(let i of t.children)br(i,e,r,n)}function Dm(t,e){let r=(n,i,o)=>n.kind==="viewRef"?c$(n,i,o):n.kind!=="component"?"":jm(n.name,t,e)?s$(n,t.elements[n.name],i,o,r):u$(n,i,o,r);return(n,i,o)=>r(n,i,o)}var qm=K(()=>{"use strict";Am()});var Dl={};Dr(Dl,{partialReactOutputPath:()=>v$,renderReactComponent:()=>jl,renderReactFromIr:()=>g$,renderReactPreviewBundle:()=>y$});import{resolve as p$}from"node:path";function f$(t){if(t.isPartial)return t.exportName;let e=t.exportName.replace(/View$/,"")||t.exportName;return e.charAt(0).toUpperCase()+e.slice(1)}function d$(t,e){if(t.kind!=="component")throw new Error(`View IR root must be a component node (${e})`);return t}function Hm(t){if(!t)return[];let e=t.match(/\b[A-Z][A-Za-z0-9]*ViewModel\b/g);return e?[...new Set(e)]:[]}function h$(t){if(!t.propsType)return"";let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?`{ ${e[1].trim().split(/[,;]/).map(i=>i.split(":")[0].trim()).filter(Boolean).join(", ")} }: ${t.propsType}`:`props: ${t.propsType}`}function Fm(t){return t.trimStart().startsWith("{")?`return (
101
101
  <>${t}
102
102
  </>
103
103
  );`:`return (
104
104
  ${t}
105
- );`}function u$(t){let e=t.replace(/^\/\*\*[\s\S]*?\*\/\s*/,"");return e=e.replace(/^import\s[^\n]+\n/gm,""),e.trimStart()}async function Fm(t,e){let r=await Ol(e.elementMapPath),n=e.allowlistExtra??[],i=a$(t),o=c$(t.root,t.source),a=Lm(r,n)(o,2),c=new Set;br(t.root,r,n,c);let l=[...c].sort(),f=new Set;mi(t.root,f);let p=[...f].sort(),d=e.previewImports,m=d?.dispatch??e.runtimeImportFrom,g=d?.contracts??e.contractsImportFrom,y=d?.extensions??e.extensionsImportFrom,_=new Set;if(t.isPartial)for(let T of qm(t.propsType))_.add(T);else _.add(t.viewModel);let b=["import type { ReactElement } from 'react';"];b.push(`import { dispatchAction } from '${m}';`);let M=[..._].sort(),q=M.length>0?`${M.join(", ")}, ActionDescriptor`:"ActionDescriptor";b.push(`import type { ${q} } from '${g}';`),l.length>0&&b.push(`import { ${l.join(", ")} } from '${y}';`);for(let T of p){if(e.inlineViewRefs)continue;let V=e.viewRefImportFrom?.get(T)??`./${T}.generated.js`;b.push(`import { ${T} } from '${V}';`)}let A=d?`/**
105
+ );`}function m$(t){let e=t.replace(/^\/\*\*[\s\S]*?\*\/\s*/,"");return e=e.replace(/^import\s[^\n]+\n/gm,""),e.trimStart()}async function Bm(t,e){let r=await Al(e.elementMapPath),n=e.allowlistExtra??[],i=f$(t),o=d$(t.root,t.source),a=Dm(r,n)(o,2),c=new Set;br(t.root,r,n,c);let l=[...c].sort(),f=new Set;mi(t.root,f);let p=[...f].sort(),d=e.previewImports,m=d?.dispatch??e.runtimeImportFrom,g=d?.contracts??e.contractsImportFrom,y=d?.extensions??e.extensionsImportFrom,_=new Set;if(t.isPartial)for(let T of Hm(t.propsType))_.add(T);else _.add(t.viewModel);let b=["import type { ReactElement } from 'react';"];b.push(`import { dispatchAction } from '${m}';`);let M=[..._].sort(),q=M.length>0?`${M.join(", ")}, ActionDescriptor`:"ActionDescriptor";b.push(`import type { ${q} } from '${g}';`),l.length>0&&b.push(`import { ${l.join(", ")} } from '${y}';`);for(let T of p){if(e.inlineViewRefs)continue;let V=e.viewRefImportFrom?.get(T)??`./${T}.generated.js`;b.push(`import { ${T} } from '${V}';`)}let A=d?`/**
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 T=l$(t);return`${A}
111
+ */`;if(t.isPartial){let T=h$(t);return`${A}
112
112
  ${b.join(`
113
113
  `)}
114
114
 
115
115
  export function ${i}(${T}): ReactElement {
116
- ${Dm(a)}
116
+ ${Fm(a)}
117
117
  }
118
118
  `}return`${A}
119
119
  ${b.join(`
120
120
  `)}
121
121
 
122
122
  export function ${i}({ vm }: { vm: ${t.viewModel} }): ReactElement {
123
- ${Dm(a)}
123
+ ${Fm(a)}
124
124
  }
125
- `}async function Ll(t,e){return Fm(t,e)}async function p$(t,e,r){let{writeFile:n,mkdir:i}=await import("node:fs/promises"),{dirname:o}=await import("node:path"),s=await Fm(t,r);await i(o(e),{recursive:!0}),await n(e,s,"utf-8")}async function f$(t,e,r){let n={...r,inlineViewRefs:!0},i=await Promise.all(e.map(A=>Ll(A,n))),o=await Ll(t,n),s=u$,a=await Ol(r.elementMapPath),c=r.allowlistExtra??[],l=new Set;br(t.root,a,c,l);for(let A of e)br(A.root,a,c,l);let f=r.previewImports,p=f?.dispatch??r.runtimeImportFrom,d=f?.contracts??r.contractsImportFrom,m=f?.extensions??r.extensionsImportFrom,g=new Set([t.viewModel]);for(let A of e)for(let T of qm(A.propsType))g.add(T);let y=["import type { ReactElement } from 'react';",`import { dispatchAction } from '${p}';`,`import type { ${[...g].sort().join(", ")}, ActionDescriptor } from '${d}';`],_=[...l].sort();_.length>0&&y.push(`import { ${_.join(", ")} } from '${m}';`);let b=f?`/**
125
+ `}async function jl(t,e){return Bm(t,e)}async function g$(t,e,r){let{writeFile:n,mkdir:i}=await import("node:fs/promises"),{dirname:o}=await import("node:path"),s=await Bm(t,r);await i(o(e),{recursive:!0}),await n(e,s,"utf-8")}async function y$(t,e,r){let n={...r,inlineViewRefs:!0},i=await Promise.all(e.map(A=>jl(A,n))),o=await jl(t,n),s=m$,a=await Al(r.elementMapPath),c=r.allowlistExtra??[],l=new Set;br(t.root,a,c,l);for(let A of e)br(A.root,a,c,l);let f=r.previewImports,p=f?.dispatch??r.runtimeImportFrom,d=f?.contracts??r.contractsImportFrom,m=f?.extensions??r.extensionsImportFrom,g=new Set([t.viewModel]);for(let A of e)for(let T of Hm(A.propsType))g.add(T);let y=["import type { ReactElement } from 'react';",`import { dispatchAction } from '${p}';`,`import type { ${[...g].sort().join(", ")}, ActionDescriptor } from '${d}';`],_=[...l].sort();_.length>0&&y.push(`import { ${_.join(", ")} } from '${m}';`);let b=f?`/**
126
126
  * Preview module \u2014 compiled live from ${t.source}
127
127
  * Same lowering as generated/; not written to disk.
128
128
  */`:"",M=i.map(s),q=s(o);return`${b}
@@ -133,43 +133,43 @@ ${M.join(`
133
133
 
134
134
  `)}
135
135
 
136
- ${q}`}function d$(t,e){return s$(t,"components",`${e.exportName}.generated.tsx`)}var Dl=K(()=>{"use strict";$m();jm()});import{readFile as h$}from"node:fs/promises";import{extname as m$,resolve as g$}from"node:path";async function Uo(t){let e=g$(t),r=await h$(e,"utf-8"),n=m$(e).toLowerCase();if(n===".json")return JSON.parse(r);if(n===".yaml"||n===".yml")return ut.load(r);throw new Error(`Unsupported design file extension "${n}" (expected .yaml, .yml, or .json): ${e}`)}var ql=K(()=>{"use strict";Fr()});var Wo,xt,un,Go,$e,ln,xr=K(()=>{"use strict";Wo=["color","dimension","shadow","typography","layout"],xt=class extends Error{constructor(e){super(e),this.name="DesignTokenError"}},un=["background","foreground","radius","padding","shadow","typography","display","gridTemplateColumns","minHeight","maxWidth","width","height","margin","border","borderColor","flexDirection","fontWeight","fontSize","alignItems","justifyContent"],Go={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"]},$e=class extends Error{constructor(e){super(e),this.name="DesignThemeError"}},ln=class extends Error{constructor(e){super(e),this.name="DesignConstraintError"}}});function pn(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function v$(t){if(!un.includes(t))throw new $e(`Unknown variant property "${t}" (expected ${un.join(", ")})`);return t}function w$(t,e,r){if(typeof t!="string")throw new $e(`${e}.${r} must be a token reference string like "{ui.primary}"`);let n=t.match(y$);if(!n)throw new $e(`${e}.${r} must be a token reference like "{ui.primary}", got "${t}"`);return n[1]}function Hm(t,e){let r={};for(let[n,i]of Object.entries(e)){let o=v$(n),s=w$(i,t,n);r[o]={ref:s,accepts:[...Go[o]]}}return r}function _$(t){if(t===void 0)return{};if(!pn(t))throw new $e('Theme "defaults" must be an object');let e={};for(let[r,n]of Object.entries(t)){if(!pn(n))throw new $e(`Theme defaults for "${r}" must be an object`);e[r]=Hm(`defaults.${r}`,n)}return e}function Fl(t){if(!pn(t))throw new $e("Theme document must be a YAML/JSON object");let e=t.variants;if(!pn(e))throw new $e('Theme document must contain a "variants" object');let r={};for(let[n,i]of Object.entries(e)){if(!pn(i))throw new $e(`Theme variants for "${n}" must be an object`);let o={};for(let[s,a]of Object.entries(i)){if(!pn(a))throw new $e(`Theme variant "${n}.${s}" must be an object`);o[s]=Hm(`${n}.${s}`,a)}r[n]=o}return{defaults:_$(t.defaults),variants:r}}var y$,Hl=K(()=>{"use strict";xr();y$=/^\{([^}]+)\}$/});function vi(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function S$(t){return`--${t.replace(/\./g,"-")}`}function x$(t,e){if(typeof t!="string"||!Wo.includes(t))throw new xt(`Token "${e}" has unsupported $type "${String(t)}" (expected ${Wo.join(", ")})`);return t}function Bm(t,e,r){if(vi(t)){if("$type"in t&&"$value"in t){r.push({path:e,type:x$(t.$type,e),rawValue:t.$value});return}for(let[n,i]of Object.entries(t)){if(n.startsWith("$"))continue;let o=e?`${e}.${n}`:n;Bm(i,o,r)}}}function $$(t,e){if(typeof e=="string")return e;if(t==="typography"&&vi(e)){if(typeof e.fontFamily=="string")return e.fontFamily;let r=[e.fontWeight,e.fontStyle,e.fontSize,e.lineHeight,e.fontFamily].filter(n=>n!=null);if(r.length>0)return r.map(String).join(" ")}if(t==="shadow"&&Array.isArray(e))return e.map(r=>vi(r)?`${r.offsetX??0} ${r.offsetY??0} ${r.blur??0} ${r.color??"transparent"}`:String(r)).join(", ");if(t==="shadow"&&vi(e))return`${e.offsetX??0} ${e.offsetY??0} ${e.blur??0} ${e.color??"transparent"}`;throw new xt(`Token value for "${t}" must be a string or supported object`)}function k$(t){return typeof t!="string"?null:t.match(b$)?.[1]??null}function Um(t,e,r,n,i){let o=k$(e);if(!o){let c=r.get(t);if(!c)throw new xt(`Unknown token path "${t}"`);return{value:$$(c.type,e)}}if(n.has(t))throw new xt(`Circular token reference detected at "${t}"`);let s=r.get(o);if(!s)throw new xt(`Token "${t}" references unknown token "{${o}}"`);if(i.has(o))return{value:i.get(o),ref:o};n.add(t);let a=Um(o,s.rawValue,r,n,i);return n.delete(t),i.set(o,a.value),{value:a.value,ref:o}}function Bl(t){if(!vi(t))throw new xt("Token document must be a YAML/JSON object");let e=[];Bm(t,"",e);let r=new Map(e.map(o=>[o.path,o])),n=new Map,i=[];for(let o of e){let{value:s,ref:a}=Um(o.path,o.rawValue,r,new Set,n);n.set(o.path,s),i.push({path:o.path,type:o.type,value:s,cssVar:S$(o.path),ref:a})}return{entries:i}}var b$,Ul=K(()=>{"use strict";xr();b$=/^\{([^}]+)\}$/});function Wl(t){let e=Op(t),r=new Set;for(let n of e)un.includes(n)&&r.add(n);return r}var Wm=K(()=>{"use strict";Vt();xr()});function C$(t){return new Map(t.entries.map(e=>[e.path,e]))}function Gm(t,e,r,n,i){for(let[o,s]of Object.entries(r)){let a=Go[o];if(!a)throw new $e(`Unknown variant property "${o}" on ${t}`);if(!n.has(o))throw new $e(`Property "${o}" is not allowed for ${e} in ${t}`);let c=i.get(s.ref);if(!c)throw new $e(`${t}.${o} references unknown token "{${s.ref}}"`);if(!a.includes(c.type))throw new $e(`${t}.${o} requires a ${a.join(" or ")} token, but "{${s.ref}}" is ${c.type}`)}}function zm(t,e){let r=C$(t);for(let[n,i]of Object.entries(e.defaults)){let o=Wl(n);Gm(`defaults.${n}`,n,i,o,r)}for(let[n,i]of Object.entries(e.variants)){let o=Wl(n);for(let[s,a]of Object.entries(i))Gm(`variants.${n}.${s}`,n,a,o,r)}}function Gl(t,e){zm(t,e)}var zl=K(()=>{"use strict";xr();Wm()});function Jl(t){let e=[":root {"];for(let r of t.entries)e.push(` ${r.cssVar}: ${r.value};`);return e.push("}"),e.join(`
137
- `)}var Jm=K(()=>{"use strict"});var zo,Kl=K(()=>{"use strict";zo={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 Jo(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Ko(t,e){let r=t.entries.find(n=>n.path===e);if(!r)throw new Error(`Token reference "${e}" not found while emitting theme CSS`);return r.cssVar}var Yl=K(()=>{"use strict"});function Xl(t,e){let r=[];for(let[n,i]of Object.entries(e.defaults)){let o=Jo(n),s=[];for(let[a,c]of Object.entries(i)){let l=zo[a];if(!l){console.warn(`[view-contracts] CSS theme: variant property "${a}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let f=Ko(t,c.ref);s.push(` ${l}: var(${f});`)}s.length!==0&&r.push(`.vc-${o} {
136
+ ${q}`}function v$(t,e){return p$(t,"components",`${e.exportName}.generated.tsx`)}var ql=K(()=>{"use strict";Cm();qm()});import{readFile as w$}from"node:fs/promises";import{extname as _$,resolve as b$}from"node:path";async function Wo(t){let e=b$(t),r=await w$(e,"utf-8"),n=_$(e).toLowerCase();if(n===".json")return JSON.parse(r);if(n===".yaml"||n===".yml")return ut.load(r);throw new Error(`Unsupported design file extension "${n}" (expected .yaml, .yml, or .json): ${e}`)}var Fl=K(()=>{"use strict";Fr()});var Go,$t,un,zo,$e,ln,xr=K(()=>{"use strict";Go=["color","dimension","shadow","typography","layout"],$t=class extends Error{constructor(e){super(e),this.name="DesignTokenError"}},un=["background","foreground","radius","padding","shadow","typography","display","gridTemplateColumns","minHeight","maxWidth","width","height","margin","border","borderColor","flexDirection","fontWeight","fontSize","alignItems","justifyContent"],zo={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"]},$e=class extends Error{constructor(e){super(e),this.name="DesignThemeError"}},ln=class extends Error{constructor(e){super(e),this.name="DesignConstraintError"}}});function pn(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function x$(t){if(!un.includes(t))throw new $e(`Unknown variant property "${t}" (expected ${un.join(", ")})`);return t}function $$(t,e,r){if(typeof t!="string")throw new $e(`${e}.${r} must be a token reference string like "{ui.primary}"`);let n=t.match(S$);if(!n)throw new $e(`${e}.${r} must be a token reference like "{ui.primary}", got "${t}"`);return n[1]}function Um(t,e){let r={};for(let[n,i]of Object.entries(e)){let o=x$(n),s=$$(i,t,n);r[o]={ref:s,accepts:[...zo[o]]}}return r}function k$(t){if(t===void 0)return{};if(!pn(t))throw new $e('Theme "defaults" must be an object');let e={};for(let[r,n]of Object.entries(t)){if(!pn(n))throw new $e(`Theme defaults for "${r}" must be an object`);e[r]=Um(`defaults.${r}`,n)}return e}function Hl(t){if(!pn(t))throw new $e("Theme document must be a YAML/JSON object");let e=t.variants;if(!pn(e))throw new $e('Theme document must contain a "variants" object');let r={};for(let[n,i]of Object.entries(e)){if(!pn(i))throw new $e(`Theme variants for "${n}" must be an object`);let o={};for(let[s,a]of Object.entries(i)){if(!pn(a))throw new $e(`Theme variant "${n}.${s}" must be an object`);o[s]=Um(`${n}.${s}`,a)}r[n]=o}return{defaults:k$(t.defaults),variants:r}}var S$,Bl=K(()=>{"use strict";xr();S$=/^\{([^}]+)\}$/});function vi(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function E$(t){return`--${t.replace(/\./g,"-")}`}function P$(t,e){if(typeof t!="string"||!Go.includes(t))throw new $t(`Token "${e}" has unsupported $type "${String(t)}" (expected ${Go.join(", ")})`);return t}function Wm(t,e,r){if(vi(t)){if("$type"in t&&"$value"in t){r.push({path:e,type:P$(t.$type,e),rawValue:t.$value});return}for(let[n,i]of Object.entries(t)){if(n.startsWith("$"))continue;let o=e?`${e}.${n}`:n;Wm(i,o,r)}}}function R$(t,e){if(typeof e=="string")return e;if(t==="typography"&&vi(e)){if(typeof e.fontFamily=="string")return e.fontFamily;let r=[e.fontWeight,e.fontStyle,e.fontSize,e.lineHeight,e.fontFamily].filter(n=>n!=null);if(r.length>0)return r.map(String).join(" ")}if(t==="shadow"&&Array.isArray(e))return e.map(r=>vi(r)?`${r.offsetX??0} ${r.offsetY??0} ${r.blur??0} ${r.color??"transparent"}`:String(r)).join(", ");if(t==="shadow"&&vi(e))return`${e.offsetX??0} ${e.offsetY??0} ${e.blur??0} ${e.color??"transparent"}`;throw new $t(`Token value for "${t}" must be a string or supported object`)}function I$(t){return typeof t!="string"?null:t.match(C$)?.[1]??null}function Gm(t,e,r,n,i){let o=I$(e);if(!o){let c=r.get(t);if(!c)throw new $t(`Unknown token path "${t}"`);return{value:R$(c.type,e)}}if(n.has(t))throw new $t(`Circular token reference detected at "${t}"`);let s=r.get(o);if(!s)throw new $t(`Token "${t}" references unknown token "{${o}}"`);if(i.has(o))return{value:i.get(o),ref:o};n.add(t);let a=Gm(o,s.rawValue,r,n,i);return n.delete(t),i.set(o,a.value),{value:a.value,ref:o}}function Ul(t){if(!vi(t))throw new $t("Token document must be a YAML/JSON object");let e=[];Wm(t,"",e);let r=new Map(e.map(o=>[o.path,o])),n=new Map,i=[];for(let o of e){let{value:s,ref:a}=Gm(o.path,o.rawValue,r,new Set,n);n.set(o.path,s),i.push({path:o.path,type:o.type,value:s,cssVar:E$(o.path),ref:a})}return{entries:i}}var C$,Wl=K(()=>{"use strict";xr();C$=/^\{([^}]+)\}$/});function Gl(t){let e=Ap(t),r=new Set;for(let n of e)un.includes(n)&&r.add(n);return r}var zm=K(()=>{"use strict";Vt();xr()});function O$(t){return new Map(t.entries.map(e=>[e.path,e]))}function Jm(t,e,r,n,i){for(let[o,s]of Object.entries(r)){let a=zo[o];if(!a)throw new $e(`Unknown variant property "${o}" on ${t}`);if(!n.has(o))throw new $e(`Property "${o}" is not allowed for ${e} in ${t}`);let c=i.get(s.ref);if(!c)throw new $e(`${t}.${o} references unknown token "{${s.ref}}"`);if(!a.includes(c.type))throw new $e(`${t}.${o} requires a ${a.join(" or ")} token, but "{${s.ref}}" is ${c.type}`)}}function Km(t,e){let r=O$(t);for(let[n,i]of Object.entries(e.defaults)){let o=Gl(n);Jm(`defaults.${n}`,n,i,o,r)}for(let[n,i]of Object.entries(e.variants)){let o=Gl(n);for(let[s,a]of Object.entries(i))Jm(`variants.${n}.${s}`,n,a,o,r)}}function zl(t,e){Km(t,e)}var Jl=K(()=>{"use strict";xr();zm()});function Kl(t){let e=[":root {"];for(let r of t.entries)e.push(` ${r.cssVar}: ${r.value};`);return e.push("}"),e.join(`
137
+ `)}var Ym=K(()=>{"use strict"});var Jo,Yl=K(()=>{"use strict";Jo={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 Ko(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Yo(t,e){let r=t.entries.find(n=>n.path===e);if(!r)throw new Error(`Token reference "${e}" not found while emitting theme CSS`);return r.cssVar}var Xl=K(()=>{"use strict"});function Ql(t,e){let r=[];for(let[n,i]of Object.entries(e.defaults)){let o=Ko(n),s=[];for(let[a,c]of Object.entries(i)){let l=Jo[a];if(!l){console.warn(`[view-contracts] CSS theme: variant property "${a}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let f=Yo(t,c.ref);s.push(` ${l}: var(${f});`)}s.length!==0&&r.push(`.vc-${o} {
138
138
  ${s.join(`
139
139
  `)}
140
140
  }`)}return r.join(`
141
141
 
142
- `)}var Km=K(()=>{"use strict";Kl();Yl()});function Ql(t,e){let r=[];for(let[n,i]of Object.entries(e.variants)){let o=Jo(n);for(let[s,a]of Object.entries(i)){let c=[];for(let[l,f]of Object.entries(a)){let p=zo[l];if(!p){console.warn(`[view-contracts] CSS theme: variant property "${l}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let d=Ko(t,f.ref);c.push(` ${p}: var(${d});`)}c.length!==0&&r.push(`.vc-${o}--${s} {
142
+ `)}var Xm=K(()=>{"use strict";Yl();Xl()});function Zl(t,e){let r=[];for(let[n,i]of Object.entries(e.variants)){let o=Ko(n);for(let[s,a]of Object.entries(i)){let c=[];for(let[l,f]of Object.entries(a)){let p=Jo[l];if(!p){console.warn(`[view-contracts] CSS theme: variant property "${l}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let d=Yo(t,f.ref);c.push(` ${p}: var(${d});`)}c.length!==0&&r.push(`.vc-${o}--${s} {
143
143
  ${c.join(`
144
144
  `)}
145
145
  }`)}}return r.join(`
146
146
 
147
- `)}var Ym=K(()=>{"use strict";Kl();Yl()});function Xm(t){return typeof t=="object"&&t!==null&&"kind"in t&&t.kind==="binding"}function E$(t){if(t.variant!==void 0)return t.variant;if(t.tone!==void 0)return t.tone}function Qm(t,e,r,n,i,o){let s=r.variants[t];if(!s){e!==void 0&&!Xm(e)&&typeof e=="string"&&i.push(`${n}: <${t}> references variant "${e}" but no variants are defined for ${t} in theme.yaml`);return}if(e===void 0||Xm(e)||typeof e!="string")return;(o?.mapMutedToDefault&&e==="muted"?"default":e)in s||i.push(`${n}: <${t}> references unknown variant "${e}" (not defined in theme.yaml)`)}function Yo(t,e,r,n){if(t.kind==="component"){let i=E$(t.props);t.props.variant!==void 0?Qm(t.name,t.props.variant,e,r,n):i!==void 0&&t.name in e.variants&&Qm(t.name,i,e,r,n,{mapMutedToDefault:!0});for(let o of t.children)Yo(o,e,r,n);return}if(t.kind==="map"){Yo(t.body,e,r,n);return}if(t.kind==="fragment"){for(let i of t.children)Yo(i,e,r,n);return}t.kind}function wi(t,e){let r=[];for(let n of t)Yo(n.root,e,n.source,r);if(r.length>0)throw new Error(`View variant validation failed:
147
+ `)}var Qm=K(()=>{"use strict";Yl();Xl()});function Zm(t){return typeof t=="object"&&t!==null&&"kind"in t&&t.kind==="binding"}function A$(t){if(t.variant!==void 0)return t.variant;if(t.tone!==void 0)return t.tone}function eg(t,e,r,n,i,o){let s=r.variants[t];if(!s){e!==void 0&&!Zm(e)&&typeof e=="string"&&i.push(`${n}: <${t}> references variant "${e}" but no variants are defined for ${t} in theme.yaml`);return}if(e===void 0||Zm(e)||typeof e!="string")return;(o?.mapMutedToDefault&&e==="muted"?"default":e)in s||i.push(`${n}: <${t}> references unknown variant "${e}" (not defined in theme.yaml)`)}function Xo(t,e,r,n){if(t.kind==="component"){let i=A$(t.props);t.props.variant!==void 0?eg(t.name,t.props.variant,e,r,n):i!==void 0&&t.name in e.variants&&eg(t.name,i,e,r,n,{mapMutedToDefault:!0});for(let o of t.children)Xo(o,e,r,n);return}if(t.kind==="map"){Xo(t.body,e,r,n);return}if(t.kind==="fragment"){for(let i of t.children)Xo(i,e,r,n);return}t.kind}function wi(t,e){let r=[];for(let n of t)Xo(n.root,e,n.source,r);if(r.length>0)throw new Error(`View variant validation failed:
148
148
  ${r.map(n=>` - ${n}`).join(`
149
- `)}`)}var Zm=K(()=>{"use strict"});function Zl(t,e){return[...new Set([...t.matchAll(e)].map(r=>r[0]))]}function eg(t,e,r){let n=e.slice(0,5).map(o=>` - ${t}: ${o}`).join(`
149
+ `)}`)}var tg=K(()=>{"use strict"});function eu(t,e){return[...new Set([...t.matchAll(e)].map(r=>r[0]))]}function rg(t,e,r){let n=e.slice(0,5).map(o=>` - ${t}: ${o}`).join(`
150
150
  `),i=e.length>5?`
151
151
  \u2026 and ${e.length-5} more`:"";return`${r}
152
- ${n}${i}`}function eu(t,e){let r=Zl(t,P$);if(r.length!==0)throw new ln(eg(e,r,".vc-* selectors are reserved for DSL output (theme.yaml variants + package structural CSS). Use project-owned class names (e.g. ext-*) in extension CSS."))}function tu(t,e){let r=Zl(t,I$),n=Zl(t,R$),i=[...r,...n];if(i.length!==0)throw new ln(eg(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 P$,I$,R$,ru=K(()=>{"use strict";xr();P$=/\.vc-[a-z][\w-]*/g,I$=/(?:className\s*=\s*(?:"vc-[^"]*"|'vc-[^']*'|\{`[^`]*\bvc-[^`]*`\}|\{"vc-[^"]*"\}|\{'vc-[^']*'\})|["'`]vc-[a-z][\w-]*["'`])/g,R$=/\bextensionClassName\s*\(/g});import{readFile as tg,stat as O$}from"node:fs/promises";import{resolve as A$}from"node:path";async function rg(t){try{return await O$(t),!0}catch{return!1}}async function $r(t,e){let r=t.design?.extensionsCss;r&&await rg(r)&&eu(await tg(r,"utf-8"),r);let n=he(e);for(let i of["extensions.tsx","extensions.ts"]){let o=A$(n,"src/components",i);await rg(o)&&tu(await tg(o,"utf-8"),o)}}var ng=K(()=>{"use strict";pt();ru()});async function T$(t){let e=await Uo(t);return Bl(e)}async function N$(t){let e=await Uo(t);return Fl(e)}async function fn(t,e){let r=await T$(t),n=await N$(e);return Gl(r,n),{tokenIR:r,themeIR:n}}var Xo=K(()=>{"use strict";ql();Hl();Ul();zl();Jm();Km();Ym();ql();Hl();Ul();zl();Zm();ru();ng();Qo();xr()});import{readFile as ig,stat as M$}from"node:fs/promises";async function V$(t){try{return await M$(t),!0}catch{return!1}}async function _i(t,e){let r=he(e),{tokensPath:n,themePath:i}=Kt(t),{tokenIR:o,themeIR:s}=await fn(n,i);await $r(t,e);let a=await ig(nu(),"utf-8"),c=Xl(o,s),l=Ql(o,s),f=`${Jl(o)}
152
+ ${n}${i}`}function tu(t,e){let r=eu(t,T$);if(r.length!==0)throw new ln(rg(e,r,".vc-* selectors are reserved for DSL output (theme.yaml variants + package structural CSS). Use project-owned class names (e.g. ext-*) in extension CSS."))}function ru(t,e){let r=eu(t,N$),n=eu(t,M$),i=[...r,...n];if(i.length!==0)throw new ln(rg(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 T$,N$,M$,nu=K(()=>{"use strict";xr();T$=/\.vc-[a-z][\w-]*/g,N$=/(?:className\s*=\s*(?:"vc-[^"]*"|'vc-[^']*'|\{`[^`]*\bvc-[^`]*`\}|\{"vc-[^"]*"\}|\{'vc-[^']*'\})|["'`]vc-[a-z][\w-]*["'`])/g,M$=/\bextensionClassName\s*\(/g});import{readFile as ng,stat as V$}from"node:fs/promises";import{resolve as L$}from"node:path";async function ig(t){try{return await V$(t),!0}catch{return!1}}async function $r(t,e){let r=t.design?.extensionsCss;r&&await ig(r)&&tu(await ng(r,"utf-8"),r);let n=he(e);for(let i of["extensions.tsx","extensions.ts"]){let o=L$(n,"src/components",i);await ig(o)&&ru(await ng(o,"utf-8"),o)}}var og=K(()=>{"use strict";pt();nu()});async function j$(t){let e=await Wo(t);return Ul(e)}async function D$(t){let e=await Wo(t);return Hl(e)}async function fn(t,e){let r=await j$(t),n=await D$(e);return zl(r,n),{tokenIR:r,themeIR:n}}var Qo=K(()=>{"use strict";Fl();Bl();Wl();Jl();Ym();Xm();Qm();Fl();Bl();Wl();Jl();tg();nu();og();Zo();xr()});import{readFile as sg,stat as q$}from"node:fs/promises";async function F$(t){try{return await q$(t),!0}catch{return!1}}async function _i(t,e){let r=he(e),{tokensPath:n,themePath:i}=Kt(t),{tokenIR:o,themeIR:s}=await fn(n,i);await $r(t,e);let a=await sg(iu(),"utf-8"),c=Ql(o,s),l=Zl(o,s),f=`${Kl(o)}
153
153
 
154
154
  ${a.trim()}`;c&&(f+=`
155
155
 
156
156
  ${c}`),f+=`
157
157
 
158
- ${l}`;let p=t.design?.extensionsCss;return p&&await V$(p)&&(f+=`
158
+ ${l}`;let p=t.design?.extensionsCss;return p&&await F$(p)&&(f+=`
159
159
 
160
- ${await ig(p,"utf-8")}`),f}var Qo=K(()=>{"use strict";pt();dn();Xo()});var De=S(Je=>{"use strict";Je.__esModule=!0;Je.extend=og;Je.indexOf=F$;Je.escapeExpression=H$;Je.isEmpty=B$;Je.createFrame=U$;Je.blockParams=W$;Je.appendContextPath=G$;var L$={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},j$=/[&<>"'`=]/g,D$=/[&<>"'`=]/;function q$(t){return L$[t]}function og(t){for(var e=1;e<arguments.length;e++)for(var r in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],r)&&(t[r]=arguments[e][r]);return t}var ou=Object.prototype.toString;Je.toString=ou;var iu=function(e){return typeof e=="function"};iu(/x/)&&(Je.isFunction=iu=function(t){return typeof t=="function"&&ou.call(t)==="[object Function]"});Je.isFunction=iu;var sg=Array.isArray||function(t){return t&&typeof t=="object"?ou.call(t)==="[object Array]":!1};Je.isArray=sg;function F$(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function H$(t){if(typeof t!="string"){if(t&&t.toHTML)return t.toHTML();if(t==null)return"";if(!t)return t+"";t=""+t}return D$.test(t)?t.replace(j$,q$):t}function B$(t){return!t&&t!==0?!0:!!(sg(t)&&t.length===0)}function U$(t){var e=og({},t);return e._parent=t,e}function W$(t,e){return t.path=e,t}function G$(t,e){return(t?t+".":"")+e}});var Ke=S((Zo,ag)=>{"use strict";Zo.__esModule=!0;var su=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function au(t,e){var r=e&&e.loc,n=void 0,i=void 0,o=void 0,s=void 0;r&&(n=r.start.line,i=r.end.line,o=r.start.column,s=r.end.column,t+=" - "+n+":"+o);for(var a=Error.prototype.constructor.call(this,t),c=0;c<su.length;c++)this[su[c]]=a[su[c]];Error.captureStackTrace&&Error.captureStackTrace(this,au);try{r&&(this.lineNumber=n,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{}}au.prototype=new Error;Zo.default=au;ag.exports=Zo.default});var lg=S((es,cg)=>{"use strict";es.__esModule=!0;var cu=De();es.default=function(t){t.registerHelper("blockHelperMissing",function(e,r){var n=r.inverse,i=r.fn;if(e===!0)return i(this);if(e===!1||e==null)return n(this);if(cu.isArray(e))return e.length>0?(r.ids&&(r.ids=[r.name]),t.helpers.each(e,r)):n(this);if(r.data&&r.ids){var o=cu.createFrame(r.data);o.contextPath=cu.appendContextPath(r.data.contextPath,r.name),r={data:o}}return i(e,r)})};cg.exports=es.default});var pg=S((ts,ug)=>{"use strict";ts.__esModule=!0;function z$(t){return t&&t.__esModule?t:{default:t}}var bi=De(),J$=Ke(),K$=z$(J$);ts.default=function(t){t.registerHelper("each",function(e,r){if(!r)throw new K$.default("Must pass iterator to #each");var n=r.fn,i=r.inverse,o=0,s="",a=void 0,c=void 0;r.data&&r.ids&&(c=bi.appendContextPath(r.data.contextPath,r.ids[0])+"."),bi.isFunction(e)&&(e=e.call(this)),r.data&&(a=bi.createFrame(r.data));function l(g,y,_){a&&(a.key=g,a.index=y,a.first=y===0,a.last=!!_,c&&(a.contextPath=c+g)),s=s+n(e[g],{data:a,blockParams:bi.blockParams([e[g],g],[c+g,null])})}if(e&&typeof e=="object")if(bi.isArray(e))for(var f=e.length;o<f;o++)o in e&&l(o,o,o===e.length-1);else if(typeof Symbol=="function"&&e[Symbol.iterator]){for(var p=[],d=e[Symbol.iterator](),m=d.next();!m.done;m=d.next())p.push(m.value);e=p;for(var f=e.length;o<f;o++)l(o,o,o===e.length-1)}else(function(){var g=void 0;Object.keys(e).forEach(function(y){g!==void 0&&l(g,o-1),g=y,o++}),g!==void 0&&l(g,o-1,!0)})();return o===0&&(s=i(this)),s})};ug.exports=ts.default});var dg=S((rs,fg)=>{"use strict";rs.__esModule=!0;function Y$(t){return t&&t.__esModule?t:{default:t}}var X$=Ke(),Q$=Y$(X$);rs.default=function(t){t.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new Q$.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};fg.exports=rs.default});var yg=S((ns,gg)=>{"use strict";ns.__esModule=!0;function Z$(t){return t&&t.__esModule?t:{default:t}}var hg=De(),ek=Ke(),mg=Z$(ek);ns.default=function(t){t.registerHelper("if",function(e,r){if(arguments.length!=2)throw new mg.default("#if requires exactly one argument");return hg.isFunction(e)&&(e=e.call(this)),!r.hash.includeZero&&!e||hg.isEmpty(e)?r.inverse(this):r.fn(this)}),t.registerHelper("unless",function(e,r){if(arguments.length!=2)throw new mg.default("#unless requires exactly one argument");return t.helpers.if.call(this,e,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};gg.exports=ns.default});var wg=S((is,vg)=>{"use strict";is.__esModule=!0;is.default=function(t){t.registerHelper("log",function(){for(var e=[void 0],r=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)e.push(arguments[n]);var i=1;r.hash.level!=null?i=r.hash.level:r.data&&r.data.level!=null&&(i=r.data.level),e[0]=i,t.log.apply(t,e)})};vg.exports=is.default});var bg=S((os,_g)=>{"use strict";os.__esModule=!0;os.default=function(t){t.registerHelper("lookup",function(e,r,n){return e&&n.lookupProperty(e,r)})};_g.exports=os.default});var xg=S((ss,Sg)=>{"use strict";ss.__esModule=!0;function tk(t){return t&&t.__esModule?t:{default:t}}var Si=De(),rk=Ke(),nk=tk(rk);ss.default=function(t){t.registerHelper("with",function(e,r){if(arguments.length!=2)throw new nk.default("#with requires exactly one argument");Si.isFunction(e)&&(e=e.call(this));var n=r.fn;if(Si.isEmpty(e))return r.inverse(this);var i=r.data;return r.data&&r.ids&&(i=Si.createFrame(r.data),i.contextPath=Si.appendContextPath(r.data.contextPath,r.ids[0])),n(e,{data:i,blockParams:Si.blockParams([e],[i&&i.contextPath])})})};Sg.exports=ss.default});var lu=S(as=>{"use strict";as.__esModule=!0;as.registerDefaultHelpers=vk;as.moveHelperToHooks=wk;function kr(t){return t&&t.__esModule?t:{default:t}}var ik=lg(),ok=kr(ik),sk=pg(),ak=kr(sk),ck=dg(),lk=kr(ck),uk=yg(),pk=kr(uk),fk=wg(),dk=kr(fk),hk=bg(),mk=kr(hk),gk=xg(),yk=kr(gk);function vk(t){ok.default(t),ak.default(t),lk.default(t),pk.default(t),dk.default(t),mk.default(t),yk.default(t)}function wk(t,e,r){t.helpers[e]&&(t.hooks[e]=t.helpers[e],r||(t.helpers[e]=void 0))}});var kg=S((cs,$g)=>{"use strict";cs.__esModule=!0;var _k=De();cs.default=function(t){t.registerDecorator("inline",function(e,r,n,i){var o=e;return r.partials||(r.partials={},o=function(s,a){var c=n.partials;n.partials=_k.extend({},c,r.partials);var l=e(s,a);return n.partials=c,l}),r.partials[i.args[0]]=i.fn,o})};$g.exports=cs.default});var Cg=S(uu=>{"use strict";uu.__esModule=!0;uu.registerDefaultDecorators=$k;function bk(t){return t&&t.__esModule?t:{default:t}}var Sk=kg(),xk=bk(Sk);function $k(t){xk.default(t)}});var pu=S((ls,Eg)=>{"use strict";ls.__esModule=!0;var kk=De(),hn={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var r=kk.indexOf(hn.methodMap,e.toLowerCase());r>=0?e=r:e=parseInt(e,10)}return e},log:function(e){if(e=hn.lookupLevel(e),typeof console<"u"&&hn.lookupLevel(hn.level)<=e){var r=hn.methodMap[e];console[r]||(r="log");for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];console[r].apply(console,i)}}};ls.default=hn;Eg.exports=ls.default});var fu=S(xi=>{"use strict";xi.__esModule=!0;xi.createProtoAccessControl=Ik;xi.resultIsAllowed=Rk;xi.resetLoggedProperties=Ak;function Ck(t){return t&&t.__esModule?t:{default:t}}var Pg=De(),Ek=pu(),Pk=Ck(Ek),us=Object.create(null);function Ik(t){var e=Object.create(null);e.__proto__=!1,Pg.extend(e,t.allowedProtoProperties);var r=Object.create(null);return r.constructor=!1,r.__defineGetter__=!1,r.__defineSetter__=!1,r.__lookupGetter__=!1,r.__lookupSetter__=!1,Pg.extend(r,t.allowedProtoMethods),{properties:{whitelist:e,defaultValue:t.allowProtoPropertiesByDefault},methods:{whitelist:r,defaultValue:t.allowProtoMethodsByDefault}}}function Rk(t,e,r){return Ig(typeof t=="function"?e.methods:e.properties,r)}function Ig(t,e){return t.whitelist[e]!==void 0?t.whitelist[e]===!0:t.defaultValue!==void 0?t.defaultValue:(Ok(e),!1)}function Ok(t){us[t]!==!0&&(us[t]=!0,Pk.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 sg(p,"utf-8")}`),f}var Zo=K(()=>{"use strict";pt();dn();Qo()});var De=S(Je=>{"use strict";Je.__esModule=!0;Je.extend=ag;Je.indexOf=G$;Je.escapeExpression=z$;Je.isEmpty=J$;Je.createFrame=K$;Je.blockParams=Y$;Je.appendContextPath=X$;var H$={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},B$=/[&<>"'`=]/g,U$=/[&<>"'`=]/;function W$(t){return H$[t]}function ag(t){for(var e=1;e<arguments.length;e++)for(var r in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],r)&&(t[r]=arguments[e][r]);return t}var su=Object.prototype.toString;Je.toString=su;var ou=function(e){return typeof e=="function"};ou(/x/)&&(Je.isFunction=ou=function(t){return typeof t=="function"&&su.call(t)==="[object Function]"});Je.isFunction=ou;var cg=Array.isArray||function(t){return t&&typeof t=="object"?su.call(t)==="[object Array]":!1};Je.isArray=cg;function G$(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function z$(t){if(typeof t!="string"){if(t&&t.toHTML)return t.toHTML();if(t==null)return"";if(!t)return t+"";t=""+t}return U$.test(t)?t.replace(B$,W$):t}function J$(t){return!t&&t!==0?!0:!!(cg(t)&&t.length===0)}function K$(t){var e=ag({},t);return e._parent=t,e}function Y$(t,e){return t.path=e,t}function X$(t,e){return(t?t+".":"")+e}});var Ke=S((es,lg)=>{"use strict";es.__esModule=!0;var au=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function cu(t,e){var r=e&&e.loc,n=void 0,i=void 0,o=void 0,s=void 0;r&&(n=r.start.line,i=r.end.line,o=r.start.column,s=r.end.column,t+=" - "+n+":"+o);for(var a=Error.prototype.constructor.call(this,t),c=0;c<au.length;c++)this[au[c]]=a[au[c]];Error.captureStackTrace&&Error.captureStackTrace(this,cu);try{r&&(this.lineNumber=n,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{}}cu.prototype=new Error;es.default=cu;lg.exports=es.default});var pg=S((ts,ug)=>{"use strict";ts.__esModule=!0;var lu=De();ts.default=function(t){t.registerHelper("blockHelperMissing",function(e,r){var n=r.inverse,i=r.fn;if(e===!0)return i(this);if(e===!1||e==null)return n(this);if(lu.isArray(e))return e.length>0?(r.ids&&(r.ids=[r.name]),t.helpers.each(e,r)):n(this);if(r.data&&r.ids){var o=lu.createFrame(r.data);o.contextPath=lu.appendContextPath(r.data.contextPath,r.name),r={data:o}}return i(e,r)})};ug.exports=ts.default});var dg=S((rs,fg)=>{"use strict";rs.__esModule=!0;function Q$(t){return t&&t.__esModule?t:{default:t}}var bi=De(),Z$=Ke(),ek=Q$(Z$);rs.default=function(t){t.registerHelper("each",function(e,r){if(!r)throw new ek.default("Must pass iterator to #each");var n=r.fn,i=r.inverse,o=0,s="",a=void 0,c=void 0;r.data&&r.ids&&(c=bi.appendContextPath(r.data.contextPath,r.ids[0])+"."),bi.isFunction(e)&&(e=e.call(this)),r.data&&(a=bi.createFrame(r.data));function l(g,y,_){a&&(a.key=g,a.index=y,a.first=y===0,a.last=!!_,c&&(a.contextPath=c+g)),s=s+n(e[g],{data:a,blockParams:bi.blockParams([e[g],g],[c+g,null])})}if(e&&typeof e=="object")if(bi.isArray(e))for(var f=e.length;o<f;o++)o in e&&l(o,o,o===e.length-1);else if(typeof Symbol=="function"&&e[Symbol.iterator]){for(var p=[],d=e[Symbol.iterator](),m=d.next();!m.done;m=d.next())p.push(m.value);e=p;for(var f=e.length;o<f;o++)l(o,o,o===e.length-1)}else(function(){var g=void 0;Object.keys(e).forEach(function(y){g!==void 0&&l(g,o-1),g=y,o++}),g!==void 0&&l(g,o-1,!0)})();return o===0&&(s=i(this)),s})};fg.exports=rs.default});var mg=S((ns,hg)=>{"use strict";ns.__esModule=!0;function tk(t){return t&&t.__esModule?t:{default:t}}var rk=Ke(),nk=tk(rk);ns.default=function(t){t.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new nk.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};hg.exports=ns.default});var wg=S((is,vg)=>{"use strict";is.__esModule=!0;function ik(t){return t&&t.__esModule?t:{default:t}}var gg=De(),ok=Ke(),yg=ik(ok);is.default=function(t){t.registerHelper("if",function(e,r){if(arguments.length!=2)throw new yg.default("#if requires exactly one argument");return gg.isFunction(e)&&(e=e.call(this)),!r.hash.includeZero&&!e||gg.isEmpty(e)?r.inverse(this):r.fn(this)}),t.registerHelper("unless",function(e,r){if(arguments.length!=2)throw new yg.default("#unless requires exactly one argument");return t.helpers.if.call(this,e,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};vg.exports=is.default});var bg=S((os,_g)=>{"use strict";os.__esModule=!0;os.default=function(t){t.registerHelper("log",function(){for(var e=[void 0],r=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)e.push(arguments[n]);var i=1;r.hash.level!=null?i=r.hash.level:r.data&&r.data.level!=null&&(i=r.data.level),e[0]=i,t.log.apply(t,e)})};_g.exports=os.default});var xg=S((ss,Sg)=>{"use strict";ss.__esModule=!0;ss.default=function(t){t.registerHelper("lookup",function(e,r,n){return e&&n.lookupProperty(e,r)})};Sg.exports=ss.default});var kg=S((as,$g)=>{"use strict";as.__esModule=!0;function sk(t){return t&&t.__esModule?t:{default:t}}var Si=De(),ak=Ke(),ck=sk(ak);as.default=function(t){t.registerHelper("with",function(e,r){if(arguments.length!=2)throw new ck.default("#with requires exactly one argument");Si.isFunction(e)&&(e=e.call(this));var n=r.fn;if(Si.isEmpty(e))return r.inverse(this);var i=r.data;return r.data&&r.ids&&(i=Si.createFrame(r.data),i.contextPath=Si.appendContextPath(r.data.contextPath,r.ids[0])),n(e,{data:i,blockParams:Si.blockParams([e],[i&&i.contextPath])})})};$g.exports=as.default});var uu=S(cs=>{"use strict";cs.__esModule=!0;cs.registerDefaultHelpers=xk;cs.moveHelperToHooks=$k;function kr(t){return t&&t.__esModule?t:{default:t}}var lk=pg(),uk=kr(lk),pk=dg(),fk=kr(pk),dk=mg(),hk=kr(dk),mk=wg(),gk=kr(mk),yk=bg(),vk=kr(yk),wk=xg(),_k=kr(wk),bk=kg(),Sk=kr(bk);function xk(t){uk.default(t),fk.default(t),hk.default(t),gk.default(t),vk.default(t),_k.default(t),Sk.default(t)}function $k(t,e,r){t.helpers[e]&&(t.hooks[e]=t.helpers[e],r||(t.helpers[e]=void 0))}});var Eg=S((ls,Cg)=>{"use strict";ls.__esModule=!0;var kk=De();ls.default=function(t){t.registerDecorator("inline",function(e,r,n,i){var o=e;return r.partials||(r.partials={},o=function(s,a){var c=n.partials;n.partials=kk.extend({},c,r.partials);var l=e(s,a);return n.partials=c,l}),r.partials[i.args[0]]=i.fn,o})};Cg.exports=ls.default});var Pg=S(pu=>{"use strict";pu.__esModule=!0;pu.registerDefaultDecorators=Rk;function Ck(t){return t&&t.__esModule?t:{default:t}}var Ek=Eg(),Pk=Ck(Ek);function Rk(t){Pk.default(t)}});var fu=S((us,Rg)=>{"use strict";us.__esModule=!0;var Ik=De(),hn={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var r=Ik.indexOf(hn.methodMap,e.toLowerCase());r>=0?e=r:e=parseInt(e,10)}return e},log:function(e){if(e=hn.lookupLevel(e),typeof console<"u"&&hn.lookupLevel(hn.level)<=e){var r=hn.methodMap[e];console[r]||(r="log");for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];console[r].apply(console,i)}}};us.default=hn;Rg.exports=us.default});var du=S(xi=>{"use strict";xi.__esModule=!0;xi.createProtoAccessControl=Nk;xi.resultIsAllowed=Mk;xi.resetLoggedProperties=Lk;function Ok(t){return t&&t.__esModule?t:{default:t}}var Ig=De(),Ak=fu(),Tk=Ok(Ak),ps=Object.create(null);function Nk(t){var e=Object.create(null);e.__proto__=!1,Ig.extend(e,t.allowedProtoProperties);var r=Object.create(null);return r.constructor=!1,r.__defineGetter__=!1,r.__defineSetter__=!1,r.__lookupGetter__=!1,r.__lookupSetter__=!1,Ig.extend(r,t.allowedProtoMethods),{properties:{whitelist:e,defaultValue:t.allowProtoPropertiesByDefault},methods:{whitelist:r,defaultValue:t.allowProtoMethodsByDefault}}}function Mk(t,e,r){return Og(typeof t=="function"?e.methods:e.properties,r)}function Og(t,e){return t.whitelist[e]!==void 0?t.whitelist[e]===!0:t.defaultValue!==void 0?t.defaultValue:(Vk(e),!1)}function Vk(t){ps[t]!==!0&&(ps[t]=!0,Tk.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 Ak(){Object.keys(us).forEach(function(t){delete us[t]})}});var fs=S($t=>{"use strict";$t.__esModule=!0;$t.HandlebarsEnvironment=mu;function Rg(t){return t&&t.__esModule?t:{default:t}}var Cr=De(),Tk=Ke(),du=Rg(Tk),Nk=lu(),Mk=Cg(),Vk=pu(),ps=Rg(Vk),Lk=fu(),jk="4.7.9";$t.VERSION=jk;var Dk=8;$t.COMPILER_REVISION=Dk;var qk=7;$t.LAST_COMPATIBLE_COMPILER_REVISION=qk;var Fk={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};$t.REVISION_CHANGES=Fk;var hu="[object Object]";function mu(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},Nk.registerDefaultHelpers(this),Mk.registerDefaultDecorators(this)}mu.prototype={constructor:mu,logger:ps.default,log:ps.default.log,registerHelper:function(e,r){if(Cr.toString.call(e)===hu){if(r)throw new du.default("Arg not supported with multiple helpers");Cr.extend(this.helpers,e)}else this.helpers[e]=r},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,r){if(Cr.toString.call(e)===hu)Cr.extend(this.partials,e);else{if(typeof r>"u")throw new du.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,r){if(Cr.toString.call(e)===hu){if(r)throw new du.default("Arg not supported with multiple decorators");Cr.extend(this.decorators,e)}else this.decorators[e]=r},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){Lk.resetLoggedProperties()}};var Hk=ps.default.log;$t.log=Hk;$t.createFrame=Cr.createFrame;$t.logger=ps.default});var Ag=S((ds,Og)=>{"use strict";ds.__esModule=!0;function gu(t){this.string=t}gu.prototype.toString=gu.prototype.toHTML=function(){return""+this.string};ds.default=gu;Og.exports=ds.default});var Tg=S(yu=>{"use strict";yu.__esModule=!0;yu.wrapHelper=Bk;function Bk(t,e){if(typeof t!="function")return t;var r=function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=e(i),t.apply(this,arguments)};return r}});var Dg=S(or=>{"use strict";or.__esModule=!0;or.checkRevision=Kk;or.template=Yk;or.wrapProgram=hs;or.resolvePartial=Xk;or.invokePartial=Qk;or.noop=Lg;function Uk(t){return t&&t.__esModule?t:{default:t}}function Wk(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var Gk=De(),mn=Wk(Gk),zk=Ke(),Ft=Uk(zk),Ht=fs(),Ng=lu(),Jk=Tg(),Mg=fu();function Kk(t){var e=t&&t[0]||1,r=Ht.COMPILER_REVISION;if(!(e>=Ht.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Ht.COMPILER_REVISION))if(e<Ht.LAST_COMPATIBLE_COMPILER_REVISION){var n=Ht.REVISION_CHANGES[r],i=Ht.REVISION_CHANGES[e];throw new Ft.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+i+").")}else throw new Ft.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 Yk(t,e){if(!e)throw new Ft.default("No environment passed to template");if(!t||!t.main)throw new Ft.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var r=t.compiler&&t.compiler[0]===7;function n(s,a,c){c.hash&&(a=mn.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 f=l.split(`
162
+ See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function Lk(){Object.keys(ps).forEach(function(t){delete ps[t]})}});var ds=S(kt=>{"use strict";kt.__esModule=!0;kt.HandlebarsEnvironment=gu;function Ag(t){return t&&t.__esModule?t:{default:t}}var Cr=De(),jk=Ke(),hu=Ag(jk),Dk=uu(),qk=Pg(),Fk=fu(),fs=Ag(Fk),Hk=du(),Bk="4.7.9";kt.VERSION=Bk;var Uk=8;kt.COMPILER_REVISION=Uk;var Wk=7;kt.LAST_COMPATIBLE_COMPILER_REVISION=Wk;var Gk={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"};kt.REVISION_CHANGES=Gk;var mu="[object Object]";function gu(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},Dk.registerDefaultHelpers(this),qk.registerDefaultDecorators(this)}gu.prototype={constructor:gu,logger:fs.default,log:fs.default.log,registerHelper:function(e,r){if(Cr.toString.call(e)===mu){if(r)throw new hu.default("Arg not supported with multiple helpers");Cr.extend(this.helpers,e)}else this.helpers[e]=r},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,r){if(Cr.toString.call(e)===mu)Cr.extend(this.partials,e);else{if(typeof r>"u")throw new hu.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,r){if(Cr.toString.call(e)===mu){if(r)throw new hu.default("Arg not supported with multiple decorators");Cr.extend(this.decorators,e)}else this.decorators[e]=r},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){Hk.resetLoggedProperties()}};var zk=fs.default.log;kt.log=zk;kt.createFrame=Cr.createFrame;kt.logger=fs.default});var Ng=S((hs,Tg)=>{"use strict";hs.__esModule=!0;function yu(t){this.string=t}yu.prototype.toString=yu.prototype.toHTML=function(){return""+this.string};hs.default=yu;Tg.exports=hs.default});var Mg=S(vu=>{"use strict";vu.__esModule=!0;vu.wrapHelper=Jk;function Jk(t,e){if(typeof t!="function")return t;var r=function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=e(i),t.apply(this,arguments)};return r}});var Fg=S(or=>{"use strict";or.__esModule=!0;or.checkRevision=eC;or.template=tC;or.wrapProgram=ms;or.resolvePartial=rC;or.invokePartial=nC;or.noop=Dg;function Kk(t){return t&&t.__esModule?t:{default:t}}function Yk(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var Xk=De(),mn=Yk(Xk),Qk=Ke(),Ft=Kk(Qk),Ht=ds(),Vg=uu(),Zk=Mg(),Lg=du();function eC(t){var e=t&&t[0]||1,r=Ht.COMPILER_REVISION;if(!(e>=Ht.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Ht.COMPILER_REVISION))if(e<Ht.LAST_COMPATIBLE_COMPILER_REVISION){var n=Ht.REVISION_CHANGES[r],i=Ht.REVISION_CHANGES[e];throw new Ft.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+i+").")}else throw new Ft.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 tC(t,e){if(!e)throw new Ft.default("No environment passed to template");if(!t||!t.main)throw new Ft.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var r=t.compiler&&t.compiler[0]===7;function n(s,a,c){c.hash&&(a=mn.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 f=l.split(`
163
163
  `),p=0,d=f.length;p<d&&!(!f[p]&&p+1===d);p++)f[p]=c.indent+f[p];l=f.join(`
164
- `)}return l}else throw new Ft.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 Ft.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)||Mg.resultIsAllowed(l,i.protoAccessControl,c))return l},lookup:function(a,c){for(var l=a.length,f=0;f<l;f++){var p=a[f]&&i.lookupProperty(a[f],c);if(p!=null)return p}},lambda:function(a,c){return typeof a=="function"?a.call(c):a},escapeExpression:mn.escapeExpression,invokePartial:n,fn:function(a){var c=t[a];return c.decorator=t[a+"_d"],c},programs:[],program:function(a,c,l,f,p){var d=this.programs[a],m=this.fn(a);return c||p||f||l?d=hs(this,a,m,c,l,f,p):d||(d=this.programs[a]=hs(this,a,m)),d},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=mn.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=Zk(s,c));var l=void 0,f=t.useBlockParams?[]:void 0;t.useDepths&&(a.depths?l=s!=a.depths[0]?[s].concat(a.depths):a.depths:l=[s]);function p(d){return""+t.main(i,d,i.helpers,i.partials,c,f,l)}return p=jg(t.main,p,i,a.depths||[],c,f),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={};Vg(a,e.helpers,i),Vg(a,s.helpers,i),i.helpers=a,t.usePartial&&(i.partials=i.mergeIfNeeded(s.partials,e.partials)),(t.usePartial||t.useDecorators)&&(i.decorators=mn.extend({},e.decorators,s.decorators)),i.hooks={},i.protoAccessControl=Mg.createProtoAccessControl(s);var c=s.allowCallsToHelperMissing||r;Ng.moveHelperToHooks(i,"helperMissing",c),Ng.moveHelperToHooks(i,"blockHelperMissing",c)}},o._child=function(s,a,c,l){if(t.useBlockParams&&!c)throw new Ft.default("must pass block params");if(t.useDepths&&!l)throw new Ft.default("must pass parent depths");return hs(i,s,t[s],a,0,c,l)},o}function hs(t,e,r,n,i,o,s){function a(c){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],f=s;return s&&c!=s[0]&&!(c===t.nullContext&&s[0]===null)&&(f=[c].concat(s)),r(t,c,t.helpers,t.partials,l.data||n,o&&[l.blockParams].concat(o),f)}return a=jg(r,a,t,s,n,o),a.program=e,a.depth=s?s.length:0,a.blockParams=i||0,a}function Xk(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=ms(r.partials,t)):r.name==="@partial-block"?t=ms(r.data,"partial-block"):t=ms(r.partials,r.name),t}function Qk(t,e,r){var n=ms(r.data,"partial-block");r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var i=void 0;if(r.fn&&r.fn!==Lg&&(function(){r.data=Ht.createFrame(r.data);var o=r.fn;i=r.data["partial-block"]=function(a){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return c.data=Ht.createFrame(c.data),c.data["partial-block"]=n,o(a,c)},o.partials&&(r.partials=mn.extend({},r.partials,o.partials))})(),t===void 0&&i&&(t=i),t===void 0)throw new Ft.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}function Lg(){return""}function ms(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function Zk(t,e){return(!e||!("root"in e))&&(e=e?Ht.createFrame(e):{},e.root=t),e}function jg(t,e,r,n,i,o){if(t.decorator){var s={};e=t.decorator(e,s,r,n&&n[0],i,o,n),mn.extend(e,s)}return e}function Vg(t,e,r){e&&Object.keys(e).forEach(function(n){var i=e[n];t[n]=eC(i,r)})}function eC(t,e){var r=e.lookupProperty;return Jk.wrapHelper(t,function(n){return n.lookupProperty=r,n})}});var vu=S((gs,qg)=>{"use strict";gs.__esModule=!0;gs.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}};qg.exports=gs.default});var Wg=S((ys,Ug)=>{"use strict";ys.__esModule=!0;function _u(t){return t&&t.__esModule?t:{default:t}}function bu(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var tC=fs(),Fg=bu(tC),rC=Ag(),nC=_u(rC),iC=Ke(),oC=_u(iC),sC=De(),wu=bu(sC),aC=Dg(),Hg=bu(aC),cC=vu(),lC=_u(cC);function Bg(){var t=new Fg.HandlebarsEnvironment;return wu.extend(t,Fg),t.SafeString=nC.default,t.Exception=oC.default,t.Utils=wu,t.escapeExpression=wu.escapeExpression,t.VM=Hg,t.template=function(e){return Hg.template(e,t)},t}var $i=Bg();$i.create=Bg;lC.default($i);$i.default=$i;ys.default=$i;Ug.exports=ys.default});var Su=S((vs,zg)=>{"use strict";vs.__esModule=!0;var Gg={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&&!Gg.helpers.scopedId(e)&&!e.depth}}};vs.default=Gg;zg.exports=vs.default});var Kg=S((ws,Jg)=>{"use strict";ws.__esModule=!0;var uC=(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,f){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 d=a.prepareBlock(l[p-2],l[p-1],l[p],l[p],!1,this._$),m=a.prepareProgram([d],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,f="",p=0,d=0,m=0,g=2,y=1;this.lexer.setInput(i),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var _=this.lexer.yylloc;c.push(_);var b=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function M(ce){s.length=s.length-2*ce,a.length=a.length-ce,c.length=c.length-ce}function q(){var ce;return ce=o.lexer.lex()||1,typeof ce!="number"&&(ce=o.symbols_[ce]||ce),ce}for(var A,T,V,X,fe,Re,ke={},Fe,Oe,at,ct;;){if(V=s[s.length-1],this.defaultActions[V]?X=this.defaultActions[V]:((A===null||typeof A>"u")&&(A=q()),X=l[V]&&l[V][A]),typeof X>"u"||!X.length||!X[0]){var Pt="";if(!m){ct=[];for(Fe in l[V])this.terminals_[Fe]&&Fe>2&&ct.push("'"+this.terminals_[Fe]+"'");this.lexer.showPosition?Pt="Parse error on line "+(p+1)+`:
164
+ `)}return l}else throw new Ft.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 Ft.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)||Lg.resultIsAllowed(l,i.protoAccessControl,c))return l},lookup:function(a,c){for(var l=a.length,f=0;f<l;f++){var p=a[f]&&i.lookupProperty(a[f],c);if(p!=null)return p}},lambda:function(a,c){return typeof a=="function"?a.call(c):a},escapeExpression:mn.escapeExpression,invokePartial:n,fn:function(a){var c=t[a];return c.decorator=t[a+"_d"],c},programs:[],program:function(a,c,l,f,p){var d=this.programs[a],m=this.fn(a);return c||p||f||l?d=ms(this,a,m,c,l,f,p):d||(d=this.programs[a]=ms(this,a,m)),d},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=mn.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=iC(s,c));var l=void 0,f=t.useBlockParams?[]:void 0;t.useDepths&&(a.depths?l=s!=a.depths[0]?[s].concat(a.depths):a.depths:l=[s]);function p(d){return""+t.main(i,d,i.helpers,i.partials,c,f,l)}return p=qg(t.main,p,i,a.depths||[],c,f),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={};jg(a,e.helpers,i),jg(a,s.helpers,i),i.helpers=a,t.usePartial&&(i.partials=i.mergeIfNeeded(s.partials,e.partials)),(t.usePartial||t.useDecorators)&&(i.decorators=mn.extend({},e.decorators,s.decorators)),i.hooks={},i.protoAccessControl=Lg.createProtoAccessControl(s);var c=s.allowCallsToHelperMissing||r;Vg.moveHelperToHooks(i,"helperMissing",c),Vg.moveHelperToHooks(i,"blockHelperMissing",c)}},o._child=function(s,a,c,l){if(t.useBlockParams&&!c)throw new Ft.default("must pass block params");if(t.useDepths&&!l)throw new Ft.default("must pass parent depths");return ms(i,s,t[s],a,0,c,l)},o}function ms(t,e,r,n,i,o,s){function a(c){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],f=s;return s&&c!=s[0]&&!(c===t.nullContext&&s[0]===null)&&(f=[c].concat(s)),r(t,c,t.helpers,t.partials,l.data||n,o&&[l.blockParams].concat(o),f)}return a=qg(r,a,t,s,n,o),a.program=e,a.depth=s?s.length:0,a.blockParams=i||0,a}function rC(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=gs(r.partials,t)):r.name==="@partial-block"?t=gs(r.data,"partial-block"):t=gs(r.partials,r.name),t}function nC(t,e,r){var n=gs(r.data,"partial-block");r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var i=void 0;if(r.fn&&r.fn!==Dg&&(function(){r.data=Ht.createFrame(r.data);var o=r.fn;i=r.data["partial-block"]=function(a){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return c.data=Ht.createFrame(c.data),c.data["partial-block"]=n,o(a,c)},o.partials&&(r.partials=mn.extend({},r.partials,o.partials))})(),t===void 0&&i&&(t=i),t===void 0)throw new Ft.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}function Dg(){return""}function gs(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function iC(t,e){return(!e||!("root"in e))&&(e=e?Ht.createFrame(e):{},e.root=t),e}function qg(t,e,r,n,i,o){if(t.decorator){var s={};e=t.decorator(e,s,r,n&&n[0],i,o,n),mn.extend(e,s)}return e}function jg(t,e,r){e&&Object.keys(e).forEach(function(n){var i=e[n];t[n]=oC(i,r)})}function oC(t,e){var r=e.lookupProperty;return Zk.wrapHelper(t,function(n){return n.lookupProperty=r,n})}});var wu=S((ys,Hg)=>{"use strict";ys.__esModule=!0;ys.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}};Hg.exports=ys.default});var zg=S((vs,Gg)=>{"use strict";vs.__esModule=!0;function bu(t){return t&&t.__esModule?t:{default:t}}function Su(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var sC=ds(),Bg=Su(sC),aC=Ng(),cC=bu(aC),lC=Ke(),uC=bu(lC),pC=De(),_u=Su(pC),fC=Fg(),Ug=Su(fC),dC=wu(),hC=bu(dC);function Wg(){var t=new Bg.HandlebarsEnvironment;return _u.extend(t,Bg),t.SafeString=cC.default,t.Exception=uC.default,t.Utils=_u,t.escapeExpression=_u.escapeExpression,t.VM=Ug,t.template=function(e){return Ug.template(e,t)},t}var $i=Wg();$i.create=Wg;hC.default($i);$i.default=$i;vs.default=$i;Gg.exports=vs.default});var xu=S((ws,Kg)=>{"use strict";ws.__esModule=!0;var Jg={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&&!Jg.helpers.scopedId(e)&&!e.depth}}};ws.default=Jg;Kg.exports=ws.default});var Xg=S((_s,Yg)=>{"use strict";_s.__esModule=!0;var mC=(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,f){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 d=a.prepareBlock(l[p-2],l[p-1],l[p],l[p],!1,this._$),m=a.prepareProgram([d],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,f="",p=0,d=0,m=0,g=2,y=1;this.lexer.setInput(i),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var _=this.lexer.yylloc;c.push(_);var b=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function M(ce){s.length=s.length-2*ce,a.length=a.length-ce,c.length=c.length-ce}function q(){var ce;return ce=o.lexer.lex()||1,typeof ce!="number"&&(ce=o.symbols_[ce]||ce),ce}for(var A,T,V,X,fe,Ie,ke={},Fe,Oe,at,ct;;){if(V=s[s.length-1],this.defaultActions[V]?X=this.defaultActions[V]:((A===null||typeof A>"u")&&(A=q()),X=l[V]&&l[V][A]),typeof X>"u"||!X.length||!X[0]){var Rt="";if(!m){ct=[];for(Fe in l[V])this.terminals_[Fe]&&Fe>2&&ct.push("'"+this.terminals_[Fe]+"'");this.lexer.showPosition?Rt="Parse error on line "+(p+1)+`:
165
165
  `+this.lexer.showPosition()+`
166
- Expecting `+ct.join(", ")+", got '"+(this.terminals_[A]||A)+"'":Pt="Parse error on line "+(p+1)+": Unexpected "+(A==1?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(Pt,{text:this.lexer.match,token:this.terminals_[A]||A,line:this.lexer.yylineno,loc:_,expected:ct})}}if(X[0]instanceof Array&&X.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+A);switch(X[0]){case 1:s.push(A),a.push(this.lexer.yytext),c.push(this.lexer.yylloc),s.push(X[1]),A=null,T?(A=T,T=null):(d=this.lexer.yyleng,f=this.lexer.yytext,p=this.lexer.yylineno,_=this.lexer.yylloc,m>0&&m--);break;case 2:if(Oe=this.productions_[X[1]][1],ke.$=a[a.length-Oe],ke._$={first_line:c[c.length-(Oe||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(Oe||1)].first_column,last_column:c[c.length-1].last_column},b&&(ke._$.range=[c[c.length-(Oe||1)].range[0],c[c.length-1].range[1]]),Re=this.performAction.call(ke,f,d,p,this.yy,X[1],a,c),typeof Re<"u")return Re;Oe&&(s=s.slice(0,-1*Oe*2),a=a.slice(0,-1*Oe),c=c.slice(0,-1*Oe)),s.push(this.productions_[X[1]][0]),a.push(ke.$),c.push(ke._$),at=l[s[s.length-2]][s[s.length-1]],s.push(at);break;case 3:return!0}}return!0}},e=(function(){var n={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()+`
166
+ Expecting `+ct.join(", ")+", got '"+(this.terminals_[A]||A)+"'":Rt="Parse error on line "+(p+1)+": Unexpected "+(A==1?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(Rt,{text:this.lexer.match,token:this.terminals_[A]||A,line:this.lexer.yylineno,loc:_,expected:ct})}}if(X[0]instanceof Array&&X.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+A);switch(X[0]){case 1:s.push(A),a.push(this.lexer.yytext),c.push(this.lexer.yylloc),s.push(X[1]),A=null,T?(A=T,T=null):(d=this.lexer.yyleng,f=this.lexer.yytext,p=this.lexer.yylineno,_=this.lexer.yylloc,m>0&&m--);break;case 2:if(Oe=this.productions_[X[1]][1],ke.$=a[a.length-Oe],ke._$={first_line:c[c.length-(Oe||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(Oe||1)].first_column,last_column:c[c.length-1].last_column},b&&(ke._$.range=[c[c.length-(Oe||1)].range[0],c[c.length-1].range[1]]),Ie=this.performAction.call(ke,f,d,p,this.yy,X[1],a,c),typeof Ie<"u")return Ie;Oe&&(s=s.slice(0,-1*Oe*2),a=a.slice(0,-1*Oe),c=c.slice(0,-1*Oe)),s.push(this.productions_[X[1]][0]),a.push(ke.$),c.push(ke._$),at=l[s[s.length-2]][s[s.length-1]],s.push(at);break;case 3:return!0}}return!0}},e=(function(){var n={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
167
  `+s+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,s,a,c,l,f;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),d=0;d<p.length&&(a=this._input.match(this.rules[p[d]]),!(a&&(!s||a[0].length>s[0].length)&&(s=a,c=d,!this.options.flex)));d++);return s?(f=s[0].match(/(?:\r\n?|\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.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 n.options={},n.performAction=function(o,s,a,c){function l(p,d){return s.yytext=s.yytext.substring(p,s.yyleng-d+p)}var f=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}},n.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},n})();t.lexer=e;function r(){this.yy={}}return r.prototype=t,t.Parser=r,new r})();ws.default=uC;Jg.exports=ws.default});var xs=S((Ss,Qg)=>{"use strict";Ss.__esModule=!0;function pC(t){return t&&t.__esModule?t:{default:t}}var fC=Ke(),xu=pC(fC);function _s(){this.parents=[]}_s.prototype={constructor:_s,mutating:!1,acceptKey:function(e,r){var n=this.accept(e[r]);if(this.mutating){if(n&&!_s.prototype[n.type])throw new xu.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+e.type);e[r]=n}},acceptRequired:function(e,r){if(this.acceptKey(e,r),!e[r])throw new xu.default(e.type+" requires "+r)},acceptArray:function(e){for(var r=0,n=e.length;r<n;r++)this.acceptKey(e,r),e[r]||(e.splice(r,1),r--,n--)},accept:function(e){if(e){if(!this[e.type])throw new xu.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var r=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return e}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:bs,Decorator:bs,BlockStatement:Yg,DecoratorBlock:Yg,PartialStatement:Xg,PartialBlockStatement:function(e){Xg.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:bs,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 bs(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function Yg(t){bs.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function Xg(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}Ss.default=_s;Qg.exports=Ss.default});var ey=S(($s,Zg)=>{"use strict";$s.__esModule=!0;function dC(t){return t&&t.__esModule?t:{default:t}}var hC=xs(),mC=dC(hC);function kt(){var t=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=t}kt.prototype=new mC.default;kt.prototype.Program=function(t){var e=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var n=t.body,i=0,o=n.length;i<o;i++){var s=n[i],a=this.accept(s);if(a){var c=$u(n,i,r),l=ku(n,i,r),f=a.openStandalone&&c,p=a.closeStandalone&&l,d=a.inlineStandalone&&c&&l;a.close&&Er(n,i,!0),a.open&&sr(n,i,!0),e&&d&&(Er(n,i),sr(n,i)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(n[i-1].original)[1])),e&&f&&(Er((s.program||s.inverse).body),sr(n,i)),e&&p&&(Er(n,i),sr((s.inverse||s.program).body))}}return t};kt.prototype.BlockStatement=kt.prototype.DecoratorBlock=kt.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,r=t.program&&t.inverse,n=r,i=r;if(r&&r.chained)for(n=r.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var o={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:ku(e.body),closeStandalone:$u((n||e).body)};if(t.openStrip.close&&Er(e.body,null,!0),r){var s=t.inverseStrip;s.open&&sr(e.body,null,!0),s.close&&Er(n.body,null,!0),t.closeStrip.open&&sr(i.body,null,!0),!this.options.ignoreStandalone&&$u(e.body)&&ku(n.body)&&(sr(e.body),Er(n.body))}else t.closeStrip.open&&sr(e.body,null,!0);return o};kt.prototype.Decorator=kt.prototype.MustacheStatement=function(t){return t.strip};kt.prototype.PartialStatement=kt.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function $u(t,e,r){e===void 0&&(e=t.length);var n=t[e-1],i=t[e-2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original)}function ku(t,e,r){e===void 0&&(e=-1);var n=t[e+1],i=t[e+2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original)}function Er(t,e,r){var n=t[e==null?0:e+1];if(!(!n||n.type!=="ContentStatement"||!r&&n.rightStripped)){var i=n.value;n.value=n.value.replace(r?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==i}}function sr(t,e,r){var n=t[e==null?t.length-1:e-1];if(!(!n||n.type!=="ContentStatement"||!r&&n.leftStripped)){var i=n.value;return n.value=n.value.replace(r?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==i,n.leftStripped}}$s.default=kt;Zg.exports=$s.default});var ty=S(ot=>{"use strict";ot.__esModule=!0;ot.SourceLocation=vC;ot.id=wC;ot.stripFlags=_C;ot.stripComment=bC;ot.preparePath=SC;ot.prepareMustache=xC;ot.prepareRawBlock=$C;ot.prepareBlock=kC;ot.prepareProgram=CC;ot.preparePartialBlock=EC;function gC(t){return t&&t.__esModule?t:{default:t}}var yC=Ke(),Cu=gC(yC);function Eu(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new Cu.default(t.path.original+" doesn't match "+e,r)}}function vC(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 wC(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function _C(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function bC(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function SC(t,e,r){r=this.locInfo(r);for(var n=t?"@":"",i=[],o=0,s=0,a=e.length;s<a;s++){var c=e[s].part,l=e[s].original!==c;if(n+=(e[s].separator||"")+c,!l&&(c===".."||c==="."||c==="this")){if(i.length>0)throw new Cu.default("Invalid path: "+n,{loc:r});c===".."&&o++}else i.push(c)}return{type:"PathExpression",data:t,depth:o,parts:i,original:n,loc:r}}function xC(t,e,r,n,i,o){var s=n.charAt(3)||n.charAt(2),a=s!=="{"&&s!=="&",c=/\*/.test(n);return{type:c?"Decorator":"MustacheStatement",path:t,params:e,hash:r,escaped:a,strip:i,loc:this.locInfo(o)}}function $C(t,e,r,n){Eu(t,r),n=this.locInfo(n);var i={type:"Program",body:e,strip:{},loc:n};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}}function kC(t,e,r,n,i,o){n&&n.path&&Eu(t,n);var s=/\*/.test(t.open);e.blockParams=t.blockParams;var a=void 0,c=void 0;if(r){if(s)throw new Cu.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),c=r.strip,a=r.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:n&&n.strip,loc:this.locInfo(o)}}function CC(t,e){if(!e&&t.length){var r=t[0].loc,n=t[t.length-1].loc;r&&n&&(e={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function EC(t,e,r,n){return Eu(t,r),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:r&&r.strip,loc:this.locInfo(n)}}});var ny=S(Ci=>{"use strict";Ci.__esModule=!0;Ci.parseWithoutProcessing=ry;Ci.parse=VC;function PC(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function Ru(t){return t&&t.__esModule?t:{default:t}}var IC=Kg(),Pu=Ru(IC),RC=ey(),OC=Ru(RC),AC=ty(),TC=PC(AC),NC=Ke(),ki=Ru(NC),MC=De();Ci.parser=Pu.default;var ks={};MC.extend(ks,TC);function ry(t,e){if(t.type==="Program")return LC(t),t;Pu.default.yy=ks,ks.locInfo=function(n){return new ks.SourceLocation(e&&e.srcName,n)};var r=Pu.default.parse(t);return r}function VC(t,e){var r=ry(t,e),n=new OC.default(e);return n.accept(r)}function LC(t){Iu(t)}function Iu(t){if(t!=null){if(Array.isArray(t)){t.forEach(Iu);return}if(typeof t=="object"){if(t.type==="PathExpression"){if(!jC(t.depth))throw new ki.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(t.parts))throw new ki.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 ki.default("Invalid AST: PathExpression.parts must only contain strings")}else if(t.type==="NumberLiteral"){if(typeof t.value!="number"||!isFinite(t.value))throw new ki.default("Invalid AST: NumberLiteral.value must be a number")}else if(t.type==="BooleanLiteral"&&typeof t.value!="boolean")throw new ki.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(t).forEach(function(r){r!=="loc"&&Iu(t[r])})}}}function jC(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0}});var ay=S(Ri=>{"use strict";Ri.__esModule=!0;Ri.Compiler=Ou;Ri.precompile=HC;Ri.compile=BC;function oy(t){return t&&t.__esModule?t:{default:t}}var DC=Ke(),Pi=oy(DC),Ii=De(),qC=Su(),Ei=oy(qC),FC=[].slice;function Ou(){}Ou.prototype={compiler:Ou,equals:function(e){var r=this.opcodes.length;if(e.opcodes.length!==r)return!1;for(var n=0;n<r;n++){var i=this.opcodes[n],o=e.opcodes[n];if(i.opcode!==o.opcode||!sy(i.args,o.args))return!1}r=this.children.length;for(var n=0;n<r;n++)if(!this.children[n].equals(e.children[n]))return!1;return!0},guid:0,compile:function(e,r){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=r,this.stringParams=r.stringParams,this.trackIds=r.trackIds,r.blockParams=r.blockParams||[],r.knownHelpers=Ii.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},r.knownHelpers),this.accept(e)},compileProgram:function(e){var r=new this.compiler,n=r.compile(e,this.options),i=this.guid++;return this.usePartial=this.usePartial||n.usePartial,this.children[i]=n,this.useDepths=this.useDepths||n.useDepths,i},accept:function(e){if(!this[e.type])throw new Pi.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var r=this[e.type](e);return this.sourceNode.shift(),r},Program:function(e){this.options.blockParams.unshift(e.blockParams);for(var r=e.body,n=r.length,i=0;i<n;i++)this.accept(r[i]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){iy(e);var r=e.program,n=e.inverse;r=r&&this.compileProgram(r),n=n&&this.compileProgram(n);var i=this.classifySexpr(e);i==="helper"?this.helperSexpr(e,r,n):i==="simple"?(this.simpleSexpr(e),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,r,n),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(e){var r=e.program&&this.compileProgram(e.program),n=this.setupFullMustacheParams(e,r,void 0),i=e.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,i.original)},PartialStatement:function(e){this.usePartial=!0;var r=e.program;r&&(r=this.compileProgram(e.program));var n=e.params;if(n.length>1)throw new Pi.default("Unsupported number of partial arguments: "+n.length,e);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var i=e.name.original,o=e.name.type==="SubExpression";o&&this.accept(e.name),this.setupFullMustacheParams(e,r,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){iy(e);var r=this.classifySexpr(e);r==="simple"?this.simpleSexpr(e):r==="helper"?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,r,n){var i=e.path,o=i.parts[0],s=r!=null||n!=null;this.opcode("getContext",i.depth),this.opcode("pushProgram",r),this.opcode("pushProgram",n),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",o,s)},simpleSexpr:function(e){var r=e.path;r.strict=!0,this.accept(r),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,r,n){var i=this.setupFullMustacheParams(e,r,n),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 Pi.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,Ei.default.helpers.simpleId(o))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var r=e.parts[0],n=Ei.default.helpers.scopedId(e),i=!e.depth&&!n&&this.blockParamIndex(r);i?this.opcode("lookupBlockParam",i,e.parts):r?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,n):this.opcode("pushContext")},StringLiteral:function(e){this.opcode("pushString",e.value)},NumberLiteral:function(e){this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var r=e.pairs,n=0,i=r.length;for(this.opcode("pushHash");n<i;n++)this.pushParam(r[n].value);for(;n--;)this.opcode("assignToHash",r[n].key);this.opcode("popHash")},opcode:function(e){this.opcodes.push({opcode:e,args:FC.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var r=Ei.default.helpers.simpleId(e.path),n=r&&!!this.blockParamIndex(e.path.parts[0]),i=!n&&Ei.default.helpers.helperExpression(e),o=!n&&(i||r);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 r=0,n=e.length;r<n;r++)this.pushParam(e[r])},pushParam:function(e){var r=e.value!=null?e.value:e.original||"";if(this.stringParams)r.replace&&(r=r.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",r,e.type),e.type==="SubExpression"&&this.accept(e);else{if(this.trackIds){var n=void 0;if(e.parts&&!Ei.default.helpers.scopedId(e)&&!e.depth&&(n=this.blockParamIndex(e.parts[0])),n){var i=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,i)}else r=e.original||r,r.replace&&(r=r.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",e.type,r)}this.accept(e)}},setupFullMustacheParams:function(e,r,n,i){var o=e.params;return this.pushParams(o),this.opcode("pushProgram",r),this.opcode("pushProgram",n),e.hash?this.accept(e.hash):this.opcode("emptyHash",i),o},blockParamIndex:function(e){for(var r=0,n=this.options.blockParams.length;r<n;r++){var i=this.options.blockParams[r],o=i&&Ii.indexOf(i,e);if(i&&o>=0)return[r,o]}}};function HC(t,e,r){if(t==null||typeof t!="string"&&t.type!=="Program")throw new Pi.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);e=e||{},"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var n=r.parse(t,e),i=new r.Compiler().compile(n,e);return new r.JavaScriptCompiler().compile(i,e)}function BC(t,e,r){if(e===void 0&&(e={}),t==null||typeof t!="string"&&t.type!=="Program")throw new Pi.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=Ii.extend({},e),"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var n=void 0;function i(){var s=r.parse(t,e),a=new r.Compiler().compile(s,e),c=new r.JavaScriptCompiler().compile(a,e,void 0,!0);return r.template(c)}function o(s,a){return n||(n=i()),n.call(this,s,a)}return o._setup=function(s){return n||(n=i()),n._setup(s)},o._child=function(s,a,c,l){return n||(n=i()),n._child(s,a,c,l)},o}function sy(t,e){if(t===e)return!0;if(Ii.isArray(t)&&Ii.isArray(e)&&t.length===e.length){for(var r=0;r<t.length;r++)if(!sy(t[r],e[r]))return!1;return!0}}function iy(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 ly=S(Au=>{var cy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Au.encode=function(t){if(0<=t&&t<cy.length)return cy[t];throw new TypeError("Must be between 0 and 63: "+t)};Au.decode=function(t){var e=65,r=90,n=97,i=122,o=48,s=57,a=43,c=47,l=26,f=52;return e<=t&&t<=r?t-e:n<=t&&t<=i?t-n+l:o<=t&&t<=s?t-o+f:t==a?62:t==c?63:-1}});var Mu=S(Nu=>{var uy=ly(),Tu=5,py=1<<Tu,fy=py-1,dy=py;function UC(t){return t<0?(-t<<1)+1:(t<<1)+0}function WC(t){var e=(t&1)===1,r=t>>1;return e?-r:r}Nu.encode=function(e){var r="",n,i=UC(e);do n=i&fy,i>>>=Tu,i>0&&(n|=dy),r+=uy.encode(n);while(i>0);return r};Nu.decode=function(e,r,n){var i=e.length,o=0,s=0,a,c;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=uy.decode(e.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));a=!!(c&dy),c&=fy,o=o+(c<<s),s+=Tu}while(a);n.value=WC(o),n.rest=r}});var vn=S(Me=>{function GC(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}Me.getArg=GC;var hy=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,zC=/^data:.+\,.+$/;function Oi(t){var e=t.match(hy);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Me.urlParse=Oi;function gn(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}Me.urlGenerate=gn;function Vu(t){var e=t,r=Oi(t);if(r){if(!r.path)return t;e=r.path}for(var n=Me.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=n?"/":"."),r?(r.path=e,gn(r)):e}Me.normalize=Vu;function my(t,e){t===""&&(t="."),e===""&&(e=".");var r=Oi(e),n=Oi(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),gn(r);if(r||e.match(zC))return e;if(n&&!n.host&&!n.path)return n.host=e,gn(n);var i=e.charAt(0)==="/"?e:Vu(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,gn(n)):i}Me.join=my;Me.isAbsolute=function(t){return t.charAt(0)==="/"||hy.test(t)};function JC(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var r=0;e.indexOf(t+"/")!==0;){var n=t.lastIndexOf("/");if(n<0||(t=t.slice(0,n),t.match(/^([^\/]+:\/)?\/*$/)))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)}Me.relative=JC;var gy=(function(){var t=Object.create(null);return!("__proto__"in t)})();function yy(t){return t}function KC(t){return vy(t)?"$"+t:t}Me.toSetString=gy?yy:KC;function YC(t){return vy(t)?t.slice(1):t}Me.fromSetString=gy?yy:YC;function vy(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}function XC(t,e,r){var n=yn(t.source,e.source);return n!==0||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:yn(t.name,e.name)}Me.compareByOriginalPositions=XC;function QC(t,e,r){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0||r)||(n=yn(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:yn(t.name,e.name)}Me.compareByGeneratedPositionsDeflated=QC;function yn(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function ZC(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=yn(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:yn(t.name,e.name)}Me.compareByGeneratedPositionsInflated=ZC;function eE(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Me.parseSourceMapInput=eE;function tE(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=Oi(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}e=my(gn(n),e)}return Vu(e)}Me.computeSourceURL=tE});var Du=S(wy=>{var Lu=vn(),ju=Object.prototype.hasOwnProperty,Pr=typeof Map<"u";function Bt(){this._array=[],this._set=Pr?new Map:Object.create(null)}Bt.fromArray=function(e,r){for(var n=new Bt,i=0,o=e.length;i<o;i++)n.add(e[i],r);return n};Bt.prototype.size=function(){return Pr?this._set.size:Object.getOwnPropertyNames(this._set).length};Bt.prototype.add=function(e,r){var n=Pr?e:Lu.toSetString(e),i=Pr?this.has(e):ju.call(this._set,n),o=this._array.length;(!i||r)&&this._array.push(e),i||(Pr?this._set.set(e,o):this._set[n]=o)};Bt.prototype.has=function(e){if(Pr)return this._set.has(e);var r=Lu.toSetString(e);return ju.call(this._set,r)};Bt.prototype.indexOf=function(e){if(Pr){var r=this._set.get(e);if(r>=0)return r}else{var n=Lu.toSetString(e);if(ju.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};Bt.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Bt.prototype.toArray=function(){return this._array.slice()};wy.ArraySet=Bt});var Sy=S(by=>{var _y=vn();function rE(t,e){var r=t.generatedLine,n=e.generatedLine,i=t.generatedColumn,o=e.generatedColumn;return n>r||n==r&&o>=i||_y.compareByGeneratedPositionsInflated(t,e)<=0}function Cs(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Cs.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};Cs.prototype.add=function(e){rE(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Cs.prototype.toArray=function(){return this._sorted||(this._array.sort(_y.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};by.MappingList=Cs});var qu=S(xy=>{var Ai=Mu(),xe=vn(),Es=Du().ArraySet,nE=Sy().MappingList;function st(t){t||(t={}),this._file=xe.getArg(t,"file",null),this._sourceRoot=xe.getArg(t,"sourceRoot",null),this._skipValidation=xe.getArg(t,"skipValidation",!1),this._sources=new Es,this._names=new Es,this._mappings=new nE,this._sourcesContents=null}st.prototype._version=3;st.fromSourceMap=function(e){var r=e.sourceRoot,n=new st({file:e.file,sourceRoot:r});return e.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,r!=null&&(o.source=xe.relative(r,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),n.addMapping(o)}),e.sources.forEach(function(i){var o=i;r!==null&&(o=xe.relative(r,i)),n._sources.has(o)||n._sources.add(o);var s=e.sourceContentFor(i);s!=null&&n.setSourceContent(i,s)}),n};st.prototype.addMapping=function(e){var r=xe.getArg(e,"generated"),n=xe.getArg(e,"original",null),i=xe.getArg(e,"source",null),o=xe.getArg(e,"name",null);this._skipValidation||this._validateMapping(r,n,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:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:o})};st.prototype.setSourceContent=function(e,r){var n=e;this._sourceRoot!=null&&(n=xe.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[xe.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[xe.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};st.prototype.applySourceMap=function(e,r,n){var i=r;if(r==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=e.file}var o=this._sourceRoot;o!=null&&(i=xe.relative(o,i));var s=new Es,a=new Es;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,n!=null&&(c.source=xe.join(n,c.source)),o!=null&&(c.source=xe.relative(o,c.source)),c.originalLine=l.line,c.originalColumn=l.column,l.name!=null&&(c.name=l.name))}var f=c.source;f!=null&&!s.has(f)&&s.add(f);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&&(n!=null&&(c=xe.join(n,c)),o!=null&&(c=xe.relative(o,c)),this.setSourceContent(c,l))},this)};st.prototype._validateMapping=function(e,r,n,i){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!i)){if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:i}))}};st.prototype._serializeMappings=function(){for(var e=0,r=1,n=0,i=0,o=0,s=0,a="",c,l,f,p,d=this._mappings.toArray(),m=0,g=d.length;m<g;m++){if(l=d[m],c="",l.generatedLine!==r)for(e=0;l.generatedLine!==r;)c+=";",r++;else if(m>0){if(!xe.compareByGeneratedPositionsInflated(l,d[m-1]))continue;c+=","}c+=Ai.encode(l.generatedColumn-e),e=l.generatedColumn,l.source!=null&&(p=this._sources.indexOf(l.source),c+=Ai.encode(p-s),s=p,c+=Ai.encode(l.originalLine-1-i),i=l.originalLine-1,c+=Ai.encode(l.originalColumn-n),n=l.originalColumn,l.name!=null&&(f=this._names.indexOf(l.name),c+=Ai.encode(f-o),o=f)),a+=c}return a};st.prototype._generateSourcesContent=function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=xe.relative(r,n));var i=xe.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};st.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};st.prototype.toString=function(){return JSON.stringify(this.toJSON())};xy.SourceMapGenerator=st});var $y=S(Ir=>{Ir.GREATEST_LOWER_BOUND=1;Ir.LEAST_UPPER_BOUND=2;function Fu(t,e,r,n,i,o){var s=Math.floor((e-t)/2)+t,a=i(r,n[s],!0);return a===0?s:a>0?e-s>1?Fu(s,e,r,n,i,o):o==Ir.LEAST_UPPER_BOUND?e<n.length?e:-1:s:s-t>1?Fu(t,s,r,n,i,o):o==Ir.LEAST_UPPER_BOUND?s:t<0?-1:t}Ir.search=function(e,r,n,i){if(r.length===0)return-1;var o=Fu(-1,r.length,e,r,n,i||Ir.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&n(r[o],r[o-1],!0)===0;)--o;return o}});var Cy=S(ky=>{function Hu(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function iE(t,e){return Math.round(t+Math.random()*(e-t))}function Bu(t,e,r,n){if(r<n){var i=iE(r,n),o=r-1;Hu(t,i,n);for(var s=t[n],a=r;a<n;a++)e(t[a],s)<=0&&(o+=1,Hu(t,o,a));Hu(t,o+1,a);var c=o+1;Bu(t,e,r,c-1),Bu(t,e,c+1,n)}}ky.quickSort=function(t,e){Bu(t,e,0,t.length-1)}});var Py=S(Ps=>{var F=vn(),Uu=$y(),wn=Du().ArraySet,oE=Mu(),Ti=Cy().quickSort;function ye(t,e){var r=t;return typeof t=="string"&&(r=F.parseSourceMapInput(t)),r.sections!=null?new yt(r,e):new Ie(r,e)}ye.fromSourceMap=function(t,e){return Ie.fromSourceMap(t,e)};ye.prototype._version=3;ye.prototype.__generatedMappings=null;Object.defineProperty(ye.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});ye.prototype.__originalMappings=null;Object.defineProperty(ye.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});ye.prototype._charIsMappingSeparator=function(e,r){var n=e.charAt(r);return n===";"||n===","};ye.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};ye.GENERATED_ORDER=1;ye.ORIGINAL_ORDER=2;ye.GREATEST_LOWER_BOUND=1;ye.LEAST_UPPER_BOUND=2;ye.prototype.eachMapping=function(e,r,n){var i=r||null,o=n||ye.GENERATED_ORDER,s;switch(o){case ye.GENERATED_ORDER:s=this._generatedMappings;break;case ye.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=F.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)};ye.prototype.allGeneratedPositionsFor=function(e){var r=F.getArg(e,"line"),n={source:F.getArg(e,"source"),originalLine:r,originalColumn:F.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",F.compareByOriginalPositions,Uu.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:F.getArg(s,"generatedLine",null),column:F.getArg(s,"generatedColumn",null),lastColumn:F.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o];else for(var c=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==c;)i.push({line:F.getArg(s,"generatedLine",null),column:F.getArg(s,"generatedColumn",null),lastColumn:F.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o]}return i};Ps.SourceMapConsumer=ye;function Ie(t,e){var r=t;typeof t=="string"&&(r=F.parseSourceMapInput(t));var n=F.getArg(r,"version"),i=F.getArg(r,"sources"),o=F.getArg(r,"names",[]),s=F.getArg(r,"sourceRoot",null),a=F.getArg(r,"sourcesContent",null),c=F.getArg(r,"mappings"),l=F.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);s&&(s=F.normalize(s)),i=i.map(String).map(F.normalize).map(function(f){return s&&F.isAbsolute(s)&&F.isAbsolute(f)?F.relative(s,f):f}),this._names=wn.fromArray(o.map(String),!0),this._sources=wn.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(f){return F.computeSourceURL(s,f,e)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=e,this.file=l}Ie.prototype=Object.create(ye.prototype);Ie.prototype.consumer=ye;Ie.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=F.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==t)return r;return-1};Ie.fromSourceMap=function(e,r){var n=Object.create(Ie.prototype),i=n._names=wn.fromArray(e._names.toArray(),!0),o=n._sources=wn.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(m){return F.computeSourceURL(n.sourceRoot,m,r)});for(var s=e._mappings.toArray().slice(),a=n.__generatedMappings=[],c=n.__originalMappings=[],l=0,f=s.length;l<f;l++){var p=s[l],d=new Ey;d.generatedLine=p.generatedLine,d.generatedColumn=p.generatedColumn,p.source&&(d.source=o.indexOf(p.source),d.originalLine=p.originalLine,d.originalColumn=p.originalColumn,p.name&&(d.name=i.indexOf(p.name)),c.push(d)),a.push(d)}return Ti(n.__originalMappings,F.compareByOriginalPositions),n};Ie.prototype._version=3;Object.defineProperty(Ie.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Ey(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Ie.prototype._parseMappings=function(e,r){for(var n=1,i=0,o=0,s=0,a=0,c=0,l=e.length,f=0,p={},d={},m=[],g=[],y,_,b,M,q;f<l;)if(e.charAt(f)===";")n++,f++,i=0;else if(e.charAt(f)===",")f++;else{for(y=new Ey,y.generatedLine=n,M=f;M<l&&!this._charIsMappingSeparator(e,M);M++);if(_=e.slice(f,M),b=p[_],b)f+=_.length;else{for(b=[];f<M;)oE.decode(e,f,d),q=d.value,f=d.rest,b.push(q);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[_]=b}y.generatedColumn=i+b[0],i=y.generatedColumn,b.length>1&&(y.source=a+b[1],a+=b[1],y.originalLine=o+b[2],o=y.originalLine,y.originalLine+=1,y.originalColumn=s+b[3],s=y.originalColumn,b.length>4&&(y.name=c+b[4],c+=b[4])),g.push(y),typeof y.originalLine=="number"&&m.push(y)}Ti(g,F.compareByGeneratedPositionsDeflated),this.__generatedMappings=g,Ti(m,F.compareByOriginalPositions),this.__originalMappings=m};Ie.prototype._findMapping=function(e,r,n,i,o,s){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[i]);return Uu.search(e,r,o,s)};Ie.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var r=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};Ie.prototype.originalPositionFor=function(e){var r={generatedLine:F.getArg(e,"line"),generatedColumn:F.getArg(e,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",F.compareByGeneratedPositionsDeflated,F.getArg(e,"bias",ye.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var o=F.getArg(i,"source",null);o!==null&&(o=this._sources.at(o),o=F.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var s=F.getArg(i,"name",null);return s!==null&&(s=this._names.at(s)),{source:o,line:F.getArg(i,"originalLine",null),column:F.getArg(i,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}};Ie.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};Ie.prototype.sourceContentFor=function(e,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var i=e;this.sourceRoot!=null&&(i=F.relative(this.sourceRoot,i));var o;if(this.sourceRoot!=null&&(o=F.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(r)return null;throw new Error('"'+i+'" is not in the SourceMap.')};Ie.prototype.generatedPositionFor=function(e){var r=F.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:F.getArg(e,"line"),originalColumn:F.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",F.compareByOriginalPositions,F.getArg(e,"bias",ye.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===n.source)return{line:F.getArg(o,"generatedLine",null),column:F.getArg(o,"generatedColumn",null),lastColumn:F.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Ps.BasicSourceMapConsumer=Ie;function yt(t,e){var r=t;typeof t=="string"&&(r=F.parseSourceMapInput(t));var n=F.getArg(r,"version"),i=F.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new wn,this._names=new wn;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=F.getArg(s,"offset"),c=F.getArg(a,"line"),l=F.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 ye(F.getArg(s,"map"),e)}})}yt.prototype=Object.create(ye.prototype);yt.prototype.constructor=ye;yt.prototype._version=3;Object.defineProperty(yt.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var r=0;r<this._sections[e].consumer.sources.length;r++)t.push(this._sections[e].consumer.sources[r]);return t}});yt.prototype.originalPositionFor=function(e){var r={generatedLine:F.getArg(e,"line"),generatedColumn:F.getArg(e,"column")},n=Uu.search(r,this._sections,function(o,s){var a=o.generatedLine-s.generatedOffset.generatedLine;return a||o.generatedColumn-s.generatedOffset.generatedColumn}),i=this._sections[n];return i?i.consumer.originalPositionFor({line:r.generatedLine-(i.generatedOffset.generatedLine-1),column:r.generatedColumn-(i.generatedOffset.generatedLine===r.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};yt.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};yt.prototype.sourceContentFor=function(e,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],o=i.consumer.sourceContentFor(e,!0);if(o)return o}if(r)return null;throw new Error('"'+e+'" is not in the SourceMap.')};yt.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(F.getArg(e,"source"))!==-1){var i=n.consumer.generatedPositionFor(e);if(i){var o={line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)};return o}}}return{line:null,column:null}};yt.prototype._parseMappings=function(e,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],o=i.consumer._generatedMappings,s=0;s<o.length;s++){var a=o[s],c=i.consumer._sources.at(a.source);c=F.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 f={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(f),typeof f.originalLine=="number"&&this.__originalMappings.push(f)}Ti(this.__generatedMappings,F.compareByGeneratedPositionsDeflated),Ti(this.__originalMappings,F.compareByOriginalPositions)};Ps.IndexedSourceMapConsumer=yt});var Ry=S(Iy=>{var sE=qu().SourceMapGenerator,Is=vn(),aE=/(\r?\n)/,cE=10,_n="$$$isSourceNode$$$";function Ye(t,e,r,n,i){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=r??null,this.name=i??null,this[_n]=!0,n!=null&&this.add(n)}Ye.fromStringWithSourceMap=function(e,r,n){var i=new Ye,o=e.split(aE),s=0,a=function(){var d=g(),m=g()||"";return d+m;function g(){return s<o.length?o[s++]:void 0}},c=1,l=0,f=null;return r.eachMapping(function(d){if(f!==null)if(c<d.generatedLine)p(f,a()),c++,l=0;else{var m=o[s]||"",g=m.substr(0,d.generatedColumn-l);o[s]=m.substr(d.generatedColumn-l),l=d.generatedColumn,p(f,g),f=d;return}for(;c<d.generatedLine;)i.add(a()),c++;if(l<d.generatedColumn){var m=o[s]||"";i.add(m.substr(0,d.generatedColumn)),o[s]=m.substr(d.generatedColumn),l=d.generatedColumn}f=d},this),s<o.length&&(f&&p(f,a()),i.add(o.splice(s).join(""))),r.sources.forEach(function(d){var m=r.sourceContentFor(d);m!=null&&(n!=null&&(d=Is.join(n,d)),i.setSourceContent(d,m))}),i;function p(d,m){if(d===null||d.source===void 0)i.add(m);else{var g=n?Is.join(n,d.source):d.source;i.add(new Ye(d.originalLine,d.originalColumn,g,m,d.name))}}};Ye.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[_n]||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};Ye.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[_n]||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};Ye.prototype.walk=function(e){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[_n]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};Ye.prototype.join=function(e){var r,n,i=this.children.length;if(i>0){for(r=[],n=0;n<i-1;n++)r.push(this.children[n]),r.push(e);r.push(this.children[n]),this.children=r}return this};Ye.prototype.replaceRight=function(e,r){var n=this.children[this.children.length-1];return n[_n]?n.replaceRight(e,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(e,r):this.children.push("".replace(e,r)),this};Ye.prototype.setSourceContent=function(e,r){this.sourceContents[Is.toSetString(e)]=r};Ye.prototype.walkSourceContents=function(e){for(var r=0,n=this.children.length;r<n;r++)this.children[r][_n]&&this.children[r].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)e(Is.fromSetString(i[r]),this.sourceContents[i[r]])};Ye.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};Ye.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},n=new sE(e),i=!1,o=null,s=null,a=null,c=null;return this.walk(function(l,f){r.code+=l,f.source!==null&&f.line!==null&&f.column!==null?((o!==f.source||s!==f.line||a!==f.column||c!==f.name)&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name}),o=f.source,s=f.line,a=f.column,c=f.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),o=null,i=!1);for(var p=0,d=l.length;p<d;p++)l.charCodeAt(p)===cE?(r.line++,r.column=0,p+1===d?(o=null,i=!1):i&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name})):r.column++}),this.walkSourceContents(function(l,f){n.setSourceContent(l,f)}),{code:r.code,map:n}};Iy.SourceNode=Ye});var Oy=S(Rs=>{Rs.SourceMapGenerator=qu().SourceMapGenerator;Rs.SourceMapConsumer=Py().SourceMapConsumer;Rs.SourceNode=Ry().SourceNode});var My=S((Os,Ny)=>{"use strict";Os.__esModule=!0;var Gu=De(),Rr=void 0;try{(typeof define!="function"||!define.amd)&&(Ay=Oy(),Rr=Ay.SourceNode)}catch{}var Ay;Rr||(Rr=function(t,e,r,n){this.src="",n&&this.add(n)},Rr.prototype={add:function(e){Gu.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){Gu.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function Wu(t,e,r){if(Gu.isArray(t)){for(var n=[],i=0,o=t.length;i<o;i++)n.push(e.wrap(t[i],r));return n}else if(typeof t=="boolean"||typeof t=="number")return t+"";return t}function Ty(t){this.srcFile=t,this.source=[]}Ty.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,r){this.source.unshift(this.wrap(e,r))},push:function(e,r){this.source.push(this.wrap(e,r))},merge:function(){var e=this.empty();return this.each(function(r){e.add([" ",r,`
169
- `])}),e},each:function(e){for(var r=0,n=this.source.length;r<n;r++)e(this.source[r])},empty:function(){var e=this.currentLocation||{start:{}};return new Rr(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof Rr?e:(e=Wu(e,this,r),new Rr(r.start.line,r.start.column,this.srcFile,e))},functionCall:function(e,r,n){return n=this.generateList(n),this.wrap([e,r?"."+r+"(":"(",n,")"])},quotedString:function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(e){var r=this,n=[];Object.keys(e).forEach(function(o){var s=Wu(e[o],r);s!=="undefined"&&n.push([r.quotedString(o),":",s])});var i=this.generateList(n);return i.prepend("{"),i.add("}"),i},generateList:function(e){for(var r=this.empty(),n=0,i=e.length;n<i;n++)n&&r.add(","),r.add(Wu(e[n],this));return r},generateArray:function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r}};Os.default=Ty;Ny.exports=Os.default});var qy=S((As,Dy)=>{"use strict";As.__esModule=!0;function jy(t){return t&&t.__esModule?t:{default:t}}var Vy=fs(),lE=Ke(),zu=jy(lE),uE=De(),pE=My(),Ly=jy(pE);function bn(t){this.value=t}function Sn(){}Sn.prototype={nameLookup:function(e,r){return this.internalNameLookup(e,r)},depthedLookup:function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},compilerInfo:function(){var e=Vy.COMPILER_REVISION,r=Vy.REVISION_CHANGES[e];return[e,r]},appendToBuffer:function(e,r,n){return uE.isArray(e)||(e=[e]),e=this.source.wrap(e,r),this.environment.isSimple?["return ",e,";"]:n?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(e,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(r),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(e,r,n,i){this.environment=e,this.options=r,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!i,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,r),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var 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 zu.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(),`;
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 n.options={},n.performAction=function(o,s,a,c){function l(p,d){return s.yytext=s.yytext.substring(p,s.yyleng-d+p)}var f=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}},n.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},n})();t.lexer=e;function r(){this.yy={}}return r.prototype=t,t.Parser=r,new r})();_s.default=mC;Yg.exports=_s.default});var $s=S((xs,ey)=>{"use strict";xs.__esModule=!0;function gC(t){return t&&t.__esModule?t:{default:t}}var yC=Ke(),$u=gC(yC);function bs(){this.parents=[]}bs.prototype={constructor:bs,mutating:!1,acceptKey:function(e,r){var n=this.accept(e[r]);if(this.mutating){if(n&&!bs.prototype[n.type])throw new $u.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+e.type);e[r]=n}},acceptRequired:function(e,r){if(this.acceptKey(e,r),!e[r])throw new $u.default(e.type+" requires "+r)},acceptArray:function(e){for(var r=0,n=e.length;r<n;r++)this.acceptKey(e,r),e[r]||(e.splice(r,1),r--,n--)},accept:function(e){if(e){if(!this[e.type])throw new $u.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var r=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return e}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:Ss,Decorator:Ss,BlockStatement:Qg,DecoratorBlock:Qg,PartialStatement:Zg,PartialBlockStatement:function(e){Zg.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:Ss,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 Ss(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function Qg(t){Ss.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function Zg(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}xs.default=bs;ey.exports=xs.default});var ry=S((ks,ty)=>{"use strict";ks.__esModule=!0;function vC(t){return t&&t.__esModule?t:{default:t}}var wC=$s(),_C=vC(wC);function Ct(){var t=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=t}Ct.prototype=new _C.default;Ct.prototype.Program=function(t){var e=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var n=t.body,i=0,o=n.length;i<o;i++){var s=n[i],a=this.accept(s);if(a){var c=ku(n,i,r),l=Cu(n,i,r),f=a.openStandalone&&c,p=a.closeStandalone&&l,d=a.inlineStandalone&&c&&l;a.close&&Er(n,i,!0),a.open&&sr(n,i,!0),e&&d&&(Er(n,i),sr(n,i)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(n[i-1].original)[1])),e&&f&&(Er((s.program||s.inverse).body),sr(n,i)),e&&p&&(Er(n,i),sr((s.inverse||s.program).body))}}return t};Ct.prototype.BlockStatement=Ct.prototype.DecoratorBlock=Ct.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,r=t.program&&t.inverse,n=r,i=r;if(r&&r.chained)for(n=r.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var o={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:Cu(e.body),closeStandalone:ku((n||e).body)};if(t.openStrip.close&&Er(e.body,null,!0),r){var s=t.inverseStrip;s.open&&sr(e.body,null,!0),s.close&&Er(n.body,null,!0),t.closeStrip.open&&sr(i.body,null,!0),!this.options.ignoreStandalone&&ku(e.body)&&Cu(n.body)&&(sr(e.body),Er(n.body))}else t.closeStrip.open&&sr(e.body,null,!0);return o};Ct.prototype.Decorator=Ct.prototype.MustacheStatement=function(t){return t.strip};Ct.prototype.PartialStatement=Ct.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function ku(t,e,r){e===void 0&&(e=t.length);var n=t[e-1],i=t[e-2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original)}function Cu(t,e,r){e===void 0&&(e=-1);var n=t[e+1],i=t[e+2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original)}function Er(t,e,r){var n=t[e==null?0:e+1];if(!(!n||n.type!=="ContentStatement"||!r&&n.rightStripped)){var i=n.value;n.value=n.value.replace(r?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==i}}function sr(t,e,r){var n=t[e==null?t.length-1:e-1];if(!(!n||n.type!=="ContentStatement"||!r&&n.leftStripped)){var i=n.value;return n.value=n.value.replace(r?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==i,n.leftStripped}}ks.default=Ct;ty.exports=ks.default});var ny=S(ot=>{"use strict";ot.__esModule=!0;ot.SourceLocation=xC;ot.id=$C;ot.stripFlags=kC;ot.stripComment=CC;ot.preparePath=EC;ot.prepareMustache=PC;ot.prepareRawBlock=RC;ot.prepareBlock=IC;ot.prepareProgram=OC;ot.preparePartialBlock=AC;function bC(t){return t&&t.__esModule?t:{default:t}}var SC=Ke(),Eu=bC(SC);function Pu(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new Eu.default(t.path.original+" doesn't match "+e,r)}}function xC(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 $C(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function kC(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function CC(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function EC(t,e,r){r=this.locInfo(r);for(var n=t?"@":"",i=[],o=0,s=0,a=e.length;s<a;s++){var c=e[s].part,l=e[s].original!==c;if(n+=(e[s].separator||"")+c,!l&&(c===".."||c==="."||c==="this")){if(i.length>0)throw new Eu.default("Invalid path: "+n,{loc:r});c===".."&&o++}else i.push(c)}return{type:"PathExpression",data:t,depth:o,parts:i,original:n,loc:r}}function PC(t,e,r,n,i,o){var s=n.charAt(3)||n.charAt(2),a=s!=="{"&&s!=="&",c=/\*/.test(n);return{type:c?"Decorator":"MustacheStatement",path:t,params:e,hash:r,escaped:a,strip:i,loc:this.locInfo(o)}}function RC(t,e,r,n){Pu(t,r),n=this.locInfo(n);var i={type:"Program",body:e,strip:{},loc:n};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}}function IC(t,e,r,n,i,o){n&&n.path&&Pu(t,n);var s=/\*/.test(t.open);e.blockParams=t.blockParams;var a=void 0,c=void 0;if(r){if(s)throw new Eu.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),c=r.strip,a=r.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:n&&n.strip,loc:this.locInfo(o)}}function OC(t,e){if(!e&&t.length){var r=t[0].loc,n=t[t.length-1].loc;r&&n&&(e={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function AC(t,e,r,n){return Pu(t,r),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:r&&r.strip,loc:this.locInfo(n)}}});var oy=S(Ci=>{"use strict";Ci.__esModule=!0;Ci.parseWithoutProcessing=iy;Ci.parse=FC;function TC(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function Ou(t){return t&&t.__esModule?t:{default:t}}var NC=Xg(),Ru=Ou(NC),MC=ry(),VC=Ou(MC),LC=ny(),jC=TC(LC),DC=Ke(),ki=Ou(DC),qC=De();Ci.parser=Ru.default;var Cs={};qC.extend(Cs,jC);function iy(t,e){if(t.type==="Program")return HC(t),t;Ru.default.yy=Cs,Cs.locInfo=function(n){return new Cs.SourceLocation(e&&e.srcName,n)};var r=Ru.default.parse(t);return r}function FC(t,e){var r=iy(t,e),n=new VC.default(e);return n.accept(r)}function HC(t){Iu(t)}function Iu(t){if(t!=null){if(Array.isArray(t)){t.forEach(Iu);return}if(typeof t=="object"){if(t.type==="PathExpression"){if(!BC(t.depth))throw new ki.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(t.parts))throw new ki.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 ki.default("Invalid AST: PathExpression.parts must only contain strings")}else if(t.type==="NumberLiteral"){if(typeof t.value!="number"||!isFinite(t.value))throw new ki.default("Invalid AST: NumberLiteral.value must be a number")}else if(t.type==="BooleanLiteral"&&typeof t.value!="boolean")throw new ki.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(t).forEach(function(r){r!=="loc"&&Iu(t[r])})}}}function BC(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0}});var ly=S(Ii=>{"use strict";Ii.__esModule=!0;Ii.Compiler=Au;Ii.precompile=zC;Ii.compile=JC;function ay(t){return t&&t.__esModule?t:{default:t}}var UC=Ke(),Pi=ay(UC),Ri=De(),WC=xu(),Ei=ay(WC),GC=[].slice;function Au(){}Au.prototype={compiler:Au,equals:function(e){var r=this.opcodes.length;if(e.opcodes.length!==r)return!1;for(var n=0;n<r;n++){var i=this.opcodes[n],o=e.opcodes[n];if(i.opcode!==o.opcode||!cy(i.args,o.args))return!1}r=this.children.length;for(var n=0;n<r;n++)if(!this.children[n].equals(e.children[n]))return!1;return!0},guid:0,compile:function(e,r){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=r,this.stringParams=r.stringParams,this.trackIds=r.trackIds,r.blockParams=r.blockParams||[],r.knownHelpers=Ri.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},r.knownHelpers),this.accept(e)},compileProgram:function(e){var r=new this.compiler,n=r.compile(e,this.options),i=this.guid++;return this.usePartial=this.usePartial||n.usePartial,this.children[i]=n,this.useDepths=this.useDepths||n.useDepths,i},accept:function(e){if(!this[e.type])throw new Pi.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var r=this[e.type](e);return this.sourceNode.shift(),r},Program:function(e){this.options.blockParams.unshift(e.blockParams);for(var r=e.body,n=r.length,i=0;i<n;i++)this.accept(r[i]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){sy(e);var r=e.program,n=e.inverse;r=r&&this.compileProgram(r),n=n&&this.compileProgram(n);var i=this.classifySexpr(e);i==="helper"?this.helperSexpr(e,r,n):i==="simple"?(this.simpleSexpr(e),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,r,n),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(e){var r=e.program&&this.compileProgram(e.program),n=this.setupFullMustacheParams(e,r,void 0),i=e.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,i.original)},PartialStatement:function(e){this.usePartial=!0;var r=e.program;r&&(r=this.compileProgram(e.program));var n=e.params;if(n.length>1)throw new Pi.default("Unsupported number of partial arguments: "+n.length,e);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var i=e.name.original,o=e.name.type==="SubExpression";o&&this.accept(e.name),this.setupFullMustacheParams(e,r,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){sy(e);var r=this.classifySexpr(e);r==="simple"?this.simpleSexpr(e):r==="helper"?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,r,n){var i=e.path,o=i.parts[0],s=r!=null||n!=null;this.opcode("getContext",i.depth),this.opcode("pushProgram",r),this.opcode("pushProgram",n),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",o,s)},simpleSexpr:function(e){var r=e.path;r.strict=!0,this.accept(r),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,r,n){var i=this.setupFullMustacheParams(e,r,n),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 Pi.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,Ei.default.helpers.simpleId(o))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var r=e.parts[0],n=Ei.default.helpers.scopedId(e),i=!e.depth&&!n&&this.blockParamIndex(r);i?this.opcode("lookupBlockParam",i,e.parts):r?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,n):this.opcode("pushContext")},StringLiteral:function(e){this.opcode("pushString",e.value)},NumberLiteral:function(e){this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var r=e.pairs,n=0,i=r.length;for(this.opcode("pushHash");n<i;n++)this.pushParam(r[n].value);for(;n--;)this.opcode("assignToHash",r[n].key);this.opcode("popHash")},opcode:function(e){this.opcodes.push({opcode:e,args:GC.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var r=Ei.default.helpers.simpleId(e.path),n=r&&!!this.blockParamIndex(e.path.parts[0]),i=!n&&Ei.default.helpers.helperExpression(e),o=!n&&(i||r);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 r=0,n=e.length;r<n;r++)this.pushParam(e[r])},pushParam:function(e){var r=e.value!=null?e.value:e.original||"";if(this.stringParams)r.replace&&(r=r.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",r,e.type),e.type==="SubExpression"&&this.accept(e);else{if(this.trackIds){var n=void 0;if(e.parts&&!Ei.default.helpers.scopedId(e)&&!e.depth&&(n=this.blockParamIndex(e.parts[0])),n){var i=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,i)}else r=e.original||r,r.replace&&(r=r.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",e.type,r)}this.accept(e)}},setupFullMustacheParams:function(e,r,n,i){var o=e.params;return this.pushParams(o),this.opcode("pushProgram",r),this.opcode("pushProgram",n),e.hash?this.accept(e.hash):this.opcode("emptyHash",i),o},blockParamIndex:function(e){for(var r=0,n=this.options.blockParams.length;r<n;r++){var i=this.options.blockParams[r],o=i&&Ri.indexOf(i,e);if(i&&o>=0)return[r,o]}}};function zC(t,e,r){if(t==null||typeof t!="string"&&t.type!=="Program")throw new Pi.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);e=e||{},"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var n=r.parse(t,e),i=new r.Compiler().compile(n,e);return new r.JavaScriptCompiler().compile(i,e)}function JC(t,e,r){if(e===void 0&&(e={}),t==null||typeof t!="string"&&t.type!=="Program")throw new Pi.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=Ri.extend({},e),"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var n=void 0;function i(){var s=r.parse(t,e),a=new r.Compiler().compile(s,e),c=new r.JavaScriptCompiler().compile(a,e,void 0,!0);return r.template(c)}function o(s,a){return n||(n=i()),n.call(this,s,a)}return o._setup=function(s){return n||(n=i()),n._setup(s)},o._child=function(s,a,c,l){return n||(n=i()),n._child(s,a,c,l)},o}function cy(t,e){if(t===e)return!0;if(Ri.isArray(t)&&Ri.isArray(e)&&t.length===e.length){for(var r=0;r<t.length;r++)if(!cy(t[r],e[r]))return!1;return!0}}function sy(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 py=S(Tu=>{var uy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Tu.encode=function(t){if(0<=t&&t<uy.length)return uy[t];throw new TypeError("Must be between 0 and 63: "+t)};Tu.decode=function(t){var e=65,r=90,n=97,i=122,o=48,s=57,a=43,c=47,l=26,f=52;return e<=t&&t<=r?t-e:n<=t&&t<=i?t-n+l:o<=t&&t<=s?t-o+f:t==a?62:t==c?63:-1}});var Vu=S(Mu=>{var fy=py(),Nu=5,dy=1<<Nu,hy=dy-1,my=dy;function KC(t){return t<0?(-t<<1)+1:(t<<1)+0}function YC(t){var e=(t&1)===1,r=t>>1;return e?-r:r}Mu.encode=function(e){var r="",n,i=KC(e);do n=i&hy,i>>>=Nu,i>0&&(n|=my),r+=fy.encode(n);while(i>0);return r};Mu.decode=function(e,r,n){var i=e.length,o=0,s=0,a,c;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=fy.decode(e.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));a=!!(c&my),c&=hy,o=o+(c<<s),s+=Nu}while(a);n.value=YC(o),n.rest=r}});var vn=S(Me=>{function XC(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}Me.getArg=XC;var gy=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,QC=/^data:.+\,.+$/;function Oi(t){var e=t.match(gy);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Me.urlParse=Oi;function gn(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}Me.urlGenerate=gn;function Lu(t){var e=t,r=Oi(t);if(r){if(!r.path)return t;e=r.path}for(var n=Me.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=n?"/":"."),r?(r.path=e,gn(r)):e}Me.normalize=Lu;function yy(t,e){t===""&&(t="."),e===""&&(e=".");var r=Oi(e),n=Oi(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),gn(r);if(r||e.match(QC))return e;if(n&&!n.host&&!n.path)return n.host=e,gn(n);var i=e.charAt(0)==="/"?e:Lu(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,gn(n)):i}Me.join=yy;Me.isAbsolute=function(t){return t.charAt(0)==="/"||gy.test(t)};function ZC(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var r=0;e.indexOf(t+"/")!==0;){var n=t.lastIndexOf("/");if(n<0||(t=t.slice(0,n),t.match(/^([^\/]+:\/)?\/*$/)))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)}Me.relative=ZC;var vy=(function(){var t=Object.create(null);return!("__proto__"in t)})();function wy(t){return t}function eE(t){return _y(t)?"$"+t:t}Me.toSetString=vy?wy:eE;function tE(t){return _y(t)?t.slice(1):t}Me.fromSetString=vy?wy:tE;function _y(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}function rE(t,e,r){var n=yn(t.source,e.source);return n!==0||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:yn(t.name,e.name)}Me.compareByOriginalPositions=rE;function nE(t,e,r){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0||r)||(n=yn(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:yn(t.name,e.name)}Me.compareByGeneratedPositionsDeflated=nE;function yn(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function iE(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=yn(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:yn(t.name,e.name)}Me.compareByGeneratedPositionsInflated=iE;function oE(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Me.parseSourceMapInput=oE;function sE(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=Oi(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}e=yy(gn(n),e)}return Lu(e)}Me.computeSourceURL=sE});var qu=S(by=>{var ju=vn(),Du=Object.prototype.hasOwnProperty,Pr=typeof Map<"u";function Bt(){this._array=[],this._set=Pr?new Map:Object.create(null)}Bt.fromArray=function(e,r){for(var n=new Bt,i=0,o=e.length;i<o;i++)n.add(e[i],r);return n};Bt.prototype.size=function(){return Pr?this._set.size:Object.getOwnPropertyNames(this._set).length};Bt.prototype.add=function(e,r){var n=Pr?e:ju.toSetString(e),i=Pr?this.has(e):Du.call(this._set,n),o=this._array.length;(!i||r)&&this._array.push(e),i||(Pr?this._set.set(e,o):this._set[n]=o)};Bt.prototype.has=function(e){if(Pr)return this._set.has(e);var r=ju.toSetString(e);return Du.call(this._set,r)};Bt.prototype.indexOf=function(e){if(Pr){var r=this._set.get(e);if(r>=0)return r}else{var n=ju.toSetString(e);if(Du.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};Bt.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Bt.prototype.toArray=function(){return this._array.slice()};by.ArraySet=Bt});var $y=S(xy=>{var Sy=vn();function aE(t,e){var r=t.generatedLine,n=e.generatedLine,i=t.generatedColumn,o=e.generatedColumn;return n>r||n==r&&o>=i||Sy.compareByGeneratedPositionsInflated(t,e)<=0}function Es(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Es.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};Es.prototype.add=function(e){aE(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Es.prototype.toArray=function(){return this._sorted||(this._array.sort(Sy.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};xy.MappingList=Es});var Fu=S(ky=>{var Ai=Vu(),xe=vn(),Ps=qu().ArraySet,cE=$y().MappingList;function st(t){t||(t={}),this._file=xe.getArg(t,"file",null),this._sourceRoot=xe.getArg(t,"sourceRoot",null),this._skipValidation=xe.getArg(t,"skipValidation",!1),this._sources=new Ps,this._names=new Ps,this._mappings=new cE,this._sourcesContents=null}st.prototype._version=3;st.fromSourceMap=function(e){var r=e.sourceRoot,n=new st({file:e.file,sourceRoot:r});return e.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,r!=null&&(o.source=xe.relative(r,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),n.addMapping(o)}),e.sources.forEach(function(i){var o=i;r!==null&&(o=xe.relative(r,i)),n._sources.has(o)||n._sources.add(o);var s=e.sourceContentFor(i);s!=null&&n.setSourceContent(i,s)}),n};st.prototype.addMapping=function(e){var r=xe.getArg(e,"generated"),n=xe.getArg(e,"original",null),i=xe.getArg(e,"source",null),o=xe.getArg(e,"name",null);this._skipValidation||this._validateMapping(r,n,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:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:o})};st.prototype.setSourceContent=function(e,r){var n=e;this._sourceRoot!=null&&(n=xe.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[xe.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[xe.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};st.prototype.applySourceMap=function(e,r,n){var i=r;if(r==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=e.file}var o=this._sourceRoot;o!=null&&(i=xe.relative(o,i));var s=new Ps,a=new Ps;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,n!=null&&(c.source=xe.join(n,c.source)),o!=null&&(c.source=xe.relative(o,c.source)),c.originalLine=l.line,c.originalColumn=l.column,l.name!=null&&(c.name=l.name))}var f=c.source;f!=null&&!s.has(f)&&s.add(f);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&&(n!=null&&(c=xe.join(n,c)),o!=null&&(c=xe.relative(o,c)),this.setSourceContent(c,l))},this)};st.prototype._validateMapping=function(e,r,n,i){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!i)){if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:i}))}};st.prototype._serializeMappings=function(){for(var e=0,r=1,n=0,i=0,o=0,s=0,a="",c,l,f,p,d=this._mappings.toArray(),m=0,g=d.length;m<g;m++){if(l=d[m],c="",l.generatedLine!==r)for(e=0;l.generatedLine!==r;)c+=";",r++;else if(m>0){if(!xe.compareByGeneratedPositionsInflated(l,d[m-1]))continue;c+=","}c+=Ai.encode(l.generatedColumn-e),e=l.generatedColumn,l.source!=null&&(p=this._sources.indexOf(l.source),c+=Ai.encode(p-s),s=p,c+=Ai.encode(l.originalLine-1-i),i=l.originalLine-1,c+=Ai.encode(l.originalColumn-n),n=l.originalColumn,l.name!=null&&(f=this._names.indexOf(l.name),c+=Ai.encode(f-o),o=f)),a+=c}return a};st.prototype._generateSourcesContent=function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=xe.relative(r,n));var i=xe.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};st.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};st.prototype.toString=function(){return JSON.stringify(this.toJSON())};ky.SourceMapGenerator=st});var Cy=S(Rr=>{Rr.GREATEST_LOWER_BOUND=1;Rr.LEAST_UPPER_BOUND=2;function Hu(t,e,r,n,i,o){var s=Math.floor((e-t)/2)+t,a=i(r,n[s],!0);return a===0?s:a>0?e-s>1?Hu(s,e,r,n,i,o):o==Rr.LEAST_UPPER_BOUND?e<n.length?e:-1:s:s-t>1?Hu(t,s,r,n,i,o):o==Rr.LEAST_UPPER_BOUND?s:t<0?-1:t}Rr.search=function(e,r,n,i){if(r.length===0)return-1;var o=Hu(-1,r.length,e,r,n,i||Rr.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&n(r[o],r[o-1],!0)===0;)--o;return o}});var Py=S(Ey=>{function Bu(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function lE(t,e){return Math.round(t+Math.random()*(e-t))}function Uu(t,e,r,n){if(r<n){var i=lE(r,n),o=r-1;Bu(t,i,n);for(var s=t[n],a=r;a<n;a++)e(t[a],s)<=0&&(o+=1,Bu(t,o,a));Bu(t,o+1,a);var c=o+1;Uu(t,e,r,c-1),Uu(t,e,c+1,n)}}Ey.quickSort=function(t,e){Uu(t,e,0,t.length-1)}});var Iy=S(Rs=>{var F=vn(),Wu=Cy(),wn=qu().ArraySet,uE=Vu(),Ti=Py().quickSort;function ye(t,e){var r=t;return typeof t=="string"&&(r=F.parseSourceMapInput(t)),r.sections!=null?new yt(r,e):new Re(r,e)}ye.fromSourceMap=function(t,e){return Re.fromSourceMap(t,e)};ye.prototype._version=3;ye.prototype.__generatedMappings=null;Object.defineProperty(ye.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});ye.prototype.__originalMappings=null;Object.defineProperty(ye.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});ye.prototype._charIsMappingSeparator=function(e,r){var n=e.charAt(r);return n===";"||n===","};ye.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};ye.GENERATED_ORDER=1;ye.ORIGINAL_ORDER=2;ye.GREATEST_LOWER_BOUND=1;ye.LEAST_UPPER_BOUND=2;ye.prototype.eachMapping=function(e,r,n){var i=r||null,o=n||ye.GENERATED_ORDER,s;switch(o){case ye.GENERATED_ORDER:s=this._generatedMappings;break;case ye.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=F.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)};ye.prototype.allGeneratedPositionsFor=function(e){var r=F.getArg(e,"line"),n={source:F.getArg(e,"source"),originalLine:r,originalColumn:F.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",F.compareByOriginalPositions,Wu.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:F.getArg(s,"generatedLine",null),column:F.getArg(s,"generatedColumn",null),lastColumn:F.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o];else for(var c=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==c;)i.push({line:F.getArg(s,"generatedLine",null),column:F.getArg(s,"generatedColumn",null),lastColumn:F.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o]}return i};Rs.SourceMapConsumer=ye;function Re(t,e){var r=t;typeof t=="string"&&(r=F.parseSourceMapInput(t));var n=F.getArg(r,"version"),i=F.getArg(r,"sources"),o=F.getArg(r,"names",[]),s=F.getArg(r,"sourceRoot",null),a=F.getArg(r,"sourcesContent",null),c=F.getArg(r,"mappings"),l=F.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);s&&(s=F.normalize(s)),i=i.map(String).map(F.normalize).map(function(f){return s&&F.isAbsolute(s)&&F.isAbsolute(f)?F.relative(s,f):f}),this._names=wn.fromArray(o.map(String),!0),this._sources=wn.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(f){return F.computeSourceURL(s,f,e)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=e,this.file=l}Re.prototype=Object.create(ye.prototype);Re.prototype.consumer=ye;Re.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=F.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==t)return r;return-1};Re.fromSourceMap=function(e,r){var n=Object.create(Re.prototype),i=n._names=wn.fromArray(e._names.toArray(),!0),o=n._sources=wn.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(m){return F.computeSourceURL(n.sourceRoot,m,r)});for(var s=e._mappings.toArray().slice(),a=n.__generatedMappings=[],c=n.__originalMappings=[],l=0,f=s.length;l<f;l++){var p=s[l],d=new Ry;d.generatedLine=p.generatedLine,d.generatedColumn=p.generatedColumn,p.source&&(d.source=o.indexOf(p.source),d.originalLine=p.originalLine,d.originalColumn=p.originalColumn,p.name&&(d.name=i.indexOf(p.name)),c.push(d)),a.push(d)}return Ti(n.__originalMappings,F.compareByOriginalPositions),n};Re.prototype._version=3;Object.defineProperty(Re.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Ry(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Re.prototype._parseMappings=function(e,r){for(var n=1,i=0,o=0,s=0,a=0,c=0,l=e.length,f=0,p={},d={},m=[],g=[],y,_,b,M,q;f<l;)if(e.charAt(f)===";")n++,f++,i=0;else if(e.charAt(f)===",")f++;else{for(y=new Ry,y.generatedLine=n,M=f;M<l&&!this._charIsMappingSeparator(e,M);M++);if(_=e.slice(f,M),b=p[_],b)f+=_.length;else{for(b=[];f<M;)uE.decode(e,f,d),q=d.value,f=d.rest,b.push(q);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[_]=b}y.generatedColumn=i+b[0],i=y.generatedColumn,b.length>1&&(y.source=a+b[1],a+=b[1],y.originalLine=o+b[2],o=y.originalLine,y.originalLine+=1,y.originalColumn=s+b[3],s=y.originalColumn,b.length>4&&(y.name=c+b[4],c+=b[4])),g.push(y),typeof y.originalLine=="number"&&m.push(y)}Ti(g,F.compareByGeneratedPositionsDeflated),this.__generatedMappings=g,Ti(m,F.compareByOriginalPositions),this.__originalMappings=m};Re.prototype._findMapping=function(e,r,n,i,o,s){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[i]);return Wu.search(e,r,o,s)};Re.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var r=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};Re.prototype.originalPositionFor=function(e){var r={generatedLine:F.getArg(e,"line"),generatedColumn:F.getArg(e,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",F.compareByGeneratedPositionsDeflated,F.getArg(e,"bias",ye.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var o=F.getArg(i,"source",null);o!==null&&(o=this._sources.at(o),o=F.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var s=F.getArg(i,"name",null);return s!==null&&(s=this._names.at(s)),{source:o,line:F.getArg(i,"originalLine",null),column:F.getArg(i,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}};Re.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};Re.prototype.sourceContentFor=function(e,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var i=e;this.sourceRoot!=null&&(i=F.relative(this.sourceRoot,i));var o;if(this.sourceRoot!=null&&(o=F.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(r)return null;throw new Error('"'+i+'" is not in the SourceMap.')};Re.prototype.generatedPositionFor=function(e){var r=F.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:F.getArg(e,"line"),originalColumn:F.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",F.compareByOriginalPositions,F.getArg(e,"bias",ye.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===n.source)return{line:F.getArg(o,"generatedLine",null),column:F.getArg(o,"generatedColumn",null),lastColumn:F.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Rs.BasicSourceMapConsumer=Re;function yt(t,e){var r=t;typeof t=="string"&&(r=F.parseSourceMapInput(t));var n=F.getArg(r,"version"),i=F.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new wn,this._names=new wn;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=F.getArg(s,"offset"),c=F.getArg(a,"line"),l=F.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 ye(F.getArg(s,"map"),e)}})}yt.prototype=Object.create(ye.prototype);yt.prototype.constructor=ye;yt.prototype._version=3;Object.defineProperty(yt.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var r=0;r<this._sections[e].consumer.sources.length;r++)t.push(this._sections[e].consumer.sources[r]);return t}});yt.prototype.originalPositionFor=function(e){var r={generatedLine:F.getArg(e,"line"),generatedColumn:F.getArg(e,"column")},n=Wu.search(r,this._sections,function(o,s){var a=o.generatedLine-s.generatedOffset.generatedLine;return a||o.generatedColumn-s.generatedOffset.generatedColumn}),i=this._sections[n];return i?i.consumer.originalPositionFor({line:r.generatedLine-(i.generatedOffset.generatedLine-1),column:r.generatedColumn-(i.generatedOffset.generatedLine===r.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};yt.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};yt.prototype.sourceContentFor=function(e,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],o=i.consumer.sourceContentFor(e,!0);if(o)return o}if(r)return null;throw new Error('"'+e+'" is not in the SourceMap.')};yt.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(F.getArg(e,"source"))!==-1){var i=n.consumer.generatedPositionFor(e);if(i){var o={line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)};return o}}}return{line:null,column:null}};yt.prototype._parseMappings=function(e,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],o=i.consumer._generatedMappings,s=0;s<o.length;s++){var a=o[s],c=i.consumer._sources.at(a.source);c=F.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 f={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(f),typeof f.originalLine=="number"&&this.__originalMappings.push(f)}Ti(this.__generatedMappings,F.compareByGeneratedPositionsDeflated),Ti(this.__originalMappings,F.compareByOriginalPositions)};Rs.IndexedSourceMapConsumer=yt});var Ay=S(Oy=>{var pE=Fu().SourceMapGenerator,Is=vn(),fE=/(\r?\n)/,dE=10,_n="$$$isSourceNode$$$";function Ye(t,e,r,n,i){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=r??null,this.name=i??null,this[_n]=!0,n!=null&&this.add(n)}Ye.fromStringWithSourceMap=function(e,r,n){var i=new Ye,o=e.split(fE),s=0,a=function(){var d=g(),m=g()||"";return d+m;function g(){return s<o.length?o[s++]:void 0}},c=1,l=0,f=null;return r.eachMapping(function(d){if(f!==null)if(c<d.generatedLine)p(f,a()),c++,l=0;else{var m=o[s]||"",g=m.substr(0,d.generatedColumn-l);o[s]=m.substr(d.generatedColumn-l),l=d.generatedColumn,p(f,g),f=d;return}for(;c<d.generatedLine;)i.add(a()),c++;if(l<d.generatedColumn){var m=o[s]||"";i.add(m.substr(0,d.generatedColumn)),o[s]=m.substr(d.generatedColumn),l=d.generatedColumn}f=d},this),s<o.length&&(f&&p(f,a()),i.add(o.splice(s).join(""))),r.sources.forEach(function(d){var m=r.sourceContentFor(d);m!=null&&(n!=null&&(d=Is.join(n,d)),i.setSourceContent(d,m))}),i;function p(d,m){if(d===null||d.source===void 0)i.add(m);else{var g=n?Is.join(n,d.source):d.source;i.add(new Ye(d.originalLine,d.originalColumn,g,m,d.name))}}};Ye.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[_n]||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};Ye.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[_n]||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};Ye.prototype.walk=function(e){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[_n]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};Ye.prototype.join=function(e){var r,n,i=this.children.length;if(i>0){for(r=[],n=0;n<i-1;n++)r.push(this.children[n]),r.push(e);r.push(this.children[n]),this.children=r}return this};Ye.prototype.replaceRight=function(e,r){var n=this.children[this.children.length-1];return n[_n]?n.replaceRight(e,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(e,r):this.children.push("".replace(e,r)),this};Ye.prototype.setSourceContent=function(e,r){this.sourceContents[Is.toSetString(e)]=r};Ye.prototype.walkSourceContents=function(e){for(var r=0,n=this.children.length;r<n;r++)this.children[r][_n]&&this.children[r].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)e(Is.fromSetString(i[r]),this.sourceContents[i[r]])};Ye.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};Ye.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},n=new pE(e),i=!1,o=null,s=null,a=null,c=null;return this.walk(function(l,f){r.code+=l,f.source!==null&&f.line!==null&&f.column!==null?((o!==f.source||s!==f.line||a!==f.column||c!==f.name)&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name}),o=f.source,s=f.line,a=f.column,c=f.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),o=null,i=!1);for(var p=0,d=l.length;p<d;p++)l.charCodeAt(p)===dE?(r.line++,r.column=0,p+1===d?(o=null,i=!1):i&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name})):r.column++}),this.walkSourceContents(function(l,f){n.setSourceContent(l,f)}),{code:r.code,map:n}};Oy.SourceNode=Ye});var Ty=S(Os=>{Os.SourceMapGenerator=Fu().SourceMapGenerator;Os.SourceMapConsumer=Iy().SourceMapConsumer;Os.SourceNode=Ay().SourceNode});var Ly=S((As,Vy)=>{"use strict";As.__esModule=!0;var zu=De(),Ir=void 0;try{(typeof define!="function"||!define.amd)&&(Ny=Ty(),Ir=Ny.SourceNode)}catch{}var Ny;Ir||(Ir=function(t,e,r,n){this.src="",n&&this.add(n)},Ir.prototype={add:function(e){zu.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){zu.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function Gu(t,e,r){if(zu.isArray(t)){for(var n=[],i=0,o=t.length;i<o;i++)n.push(e.wrap(t[i],r));return n}else if(typeof t=="boolean"||typeof t=="number")return t+"";return t}function My(t){this.srcFile=t,this.source=[]}My.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,r){this.source.unshift(this.wrap(e,r))},push:function(e,r){this.source.push(this.wrap(e,r))},merge:function(){var e=this.empty();return this.each(function(r){e.add([" ",r,`
169
+ `])}),e},each:function(e){for(var r=0,n=this.source.length;r<n;r++)e(this.source[r])},empty:function(){var e=this.currentLocation||{start:{}};return new Ir(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof Ir?e:(e=Gu(e,this,r),new Ir(r.start.line,r.start.column,this.srcFile,e))},functionCall:function(e,r,n){return n=this.generateList(n),this.wrap([e,r?"."+r+"(":"(",n,")"])},quotedString:function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(e){var r=this,n=[];Object.keys(e).forEach(function(o){var s=Gu(e[o],r);s!=="undefined"&&n.push([r.quotedString(o),":",s])});var i=this.generateList(n);return i.prepend("{"),i.add("}"),i},generateList:function(e){for(var r=this.empty(),n=0,i=e.length;n<i;n++)n&&r.add(","),r.add(Gu(e[n],this));return r},generateArray:function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r}};As.default=My;Vy.exports=As.default});var Hy=S((Ts,Fy)=>{"use strict";Ts.__esModule=!0;function qy(t){return t&&t.__esModule?t:{default:t}}var jy=ds(),hE=Ke(),Ju=qy(hE),mE=De(),gE=Ly(),Dy=qy(gE);function bn(t){this.value=t}function Sn(){}Sn.prototype={nameLookup:function(e,r){return this.internalNameLookup(e,r)},depthedLookup:function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},compilerInfo:function(){var e=jy.COMPILER_REVISION,r=jy.REVISION_CHANGES[e];return[e,r]},appendToBuffer:function(e,r,n){return mE.isArray(e)||(e=[e]),e=this.source.wrap(e,r),this.environment.isSimple?["return ",e,";"]:n?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(e,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(r),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(e,r,n,i){this.environment=e,this.options=r,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!i,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,r),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var 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 Ju.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 f=this.createFunctionContext(i);if(this.isChild)return f;var p={compiler:this.compilerInfo(),main:f};this.decorators&&(p.main_d=this.decorators,p.useDecorators=!0);var d=this.context,m=d.programs,g=d.decorators;for(c=0,l=m.length;c<l;c++)p[c]=m[c],g[c]&&(p[c+"_d"]=g[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),r.srcName?(p=p.toStringWithSourceMap({file:r.destName}),p.map=p.map&&p.map.toString()):p=p.toString()),p},preamble:function(){this.lastContext=0,this.source=new Ly.default(this.options.srcName),this.decorators=new Ly.default(this.options.srcName)},createFunctionContext:function(e){var r=this,n="",i=this.stackVars.concat(this.registers.list);i.length>0&&(n+=", "+i.join(", "));var o=0;Object.keys(this.aliases).forEach(function(c){var l=r.aliases[c];l.children&&l.referenceCount>1&&(n+=", alias"+ ++o+"="+c,l.children[0]="alias"+o)}),this.lookupPropertyFunctionIsUsed&&(n+=", "+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(n);return e?(s.push(a),Function.apply(this,s)):this.source.wrap(["function(",s.join(","),`) {
172
+ `),this.decorators=this.decorators.merge()));var f=this.createFunctionContext(i);if(this.isChild)return f;var p={compiler:this.compilerInfo(),main:f};this.decorators&&(p.main_d=this.decorators,p.useDecorators=!0);var d=this.context,m=d.programs,g=d.decorators;for(c=0,l=m.length;c<l;c++)p[c]=m[c],g[c]&&(p[c+"_d"]=g[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),r.srcName?(p=p.toStringWithSourceMap({file:r.destName}),p.map=p.map&&p.map.toString()):p=p.toString()),p},preamble:function(){this.lastContext=0,this.source=new Dy.default(this.options.srcName),this.decorators=new Dy.default(this.options.srcName)},createFunctionContext:function(e){var r=this,n="",i=this.stackVars.concat(this.registers.list);i.length>0&&(n+=", "+i.join(", "));var o=0;Object.keys(this.aliases).forEach(function(c){var l=r.aliases[c];l.children&&l.referenceCount>1&&(n+=", alias"+ ++o+"="+c,l.children[0]="alias"+o)}),this.lookupPropertyFunctionIsUsed&&(n+=", "+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(n);return e?(s.push(a),Function.apply(this,s)):this.source.wrap(["function(",s.join(","),`) {
173
173
  `,a,"}"])},mergeSource:function(e){var r=this.environment.isSimple,n=!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,r||(n=!1))}),n?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) {
@@ -178,35 +178,35 @@ Expecting `+ct.join(", ")+", got '"+(this.terminals_[A]||A)+"'":Pt="Parse error
178
178
  }
179
179
  return undefined
180
180
  }
181
- `.trim()},blockValue:function(e){var r=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var i=this.popStack();n.splice(1,0,i),this.push(this.source.functionCall(r,"call",n))},ambiguousBlockValue:function(){var e=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs("",0,r,!0),this.flushInline();var n=this.topStack();r.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(e,"call",r),"}"])},appendContent:function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},append:function(){if(this.isInline())this.replaceStack(function(r){return[" != null ? ",r,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(e){this.lastContext=e},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(e,r,n,i){var o=0;!i&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[o++])):this.pushContext(),this.resolvePath("context",e,o,r,n)},lookupBlockParam:function(e,r){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",r,1)},lookupData:function(e,r,n){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,n)},resolvePath:function(e,r,n,i,o){var s=this;if(this.options.strict||this.options.assumeObjects){this.push(fE(this.options.strict&&o,this,r,n,e));return}for(var a=r.length,c=function(f){s.replaceStack(function(p){var d=s.nameLookup(p,r[f],e);return i?[" && ",d]:[" != null ? ",d," : ",p]})},l=n;l<a;l++)c(l)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(e,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof e=="string"?this.pushString(e):this.pushStackLiteral(e))},emptyHash:function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},registerDecorator:function(e,r){var n=this.nameLookup("decorators",r,"decorator"),i=this.setupHelperArgs(r,e);this.decorators.push(["var decorator = ",n,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+r+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",i])," || fn;"])},invokeHelper:function(e,r,n){var i=this.popStack(),o=this.setupHelper(e,r),s=[];n&&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,r){var n=[];n.push(e[0]);for(var i=1;i<e.length;i++)n.push(r,e[i]);return n},invokeKnownHelper:function(e,r){var n=this.setupHelper(e,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(e,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var i=this.setupHelper(0,e,r),o=this.lastHelper=this.nameLookup("helpers",e,"helper"),s=["(","(helper = ",o," || ",n,")"];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,r,n){var i=[],o=this.setupParams(r,1,i);e&&(r=this.popStack(),delete o.name),n&&(o.indent=JSON.stringify(n)),o.helpers="helpers",o.partials="partials",o.decorators="container.decorators",e?i.unshift(r):i.unshift(this.nameLookup("partials",r,"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 r=this.popStack(),n=void 0,i=void 0,o=void 0;this.trackIds&&(o=this.popStack()),this.stringParams&&(i=this.popStack(),n=this.popStack());var s=this.hash;n&&(s.contexts[e]=n),i&&(s.types[e]=i),o&&(s.ids[e]=o),s.values[e]=r},pushId:function(e,r,n){e==="BlockParam"?this.pushStackLiteral("blockParams["+r[0]+"].path["+r[1]+"]"+(n?" + "+JSON.stringify("."+n):"")):e==="PathExpression"?this.pushString(r):e==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:Sn,compileChildren:function(e,r){for(var n=e.children,i=void 0,o=void 0,s=0,a=n.length;s<a;s++){i=n[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,r,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 r=0,n=this.context.environments.length;r<n;r++){var i=this.context.environments[r];if(i&&i.equals(e))return i}},programExpression:function(e){var r=this.environment.children[e],n=[r.index,"data",r.blockParams];return(this.useBlockParams||this.useDepths)&&n.push("blockParams"),this.useDepths&&n.push("depths"),"container.program("+n.join(", ")+")"},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},push:function(e){return e instanceof bn||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new bn(e))},pushSource:function(e){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),e&&this.source.push(e)},replaceStack:function(e){var r=["("],n=void 0,i=void 0,o=void 0;if(!this.isInline())throw new zu.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof bn)n=[s.value],r=["(",n],o=!0;else{i=!0;var a=this.incrStack();r=["((",this.push(a)," = ",s,")"],n=this.topStack()}var c=e.call(this,n);o||this.popStack(),i&&this.stackSlot--,this.push(r.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 r=0,n=e.length;r<n;r++){var i=e[r];if(i instanceof bn)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 r=this.isInline(),n=(r?this.inlineStack:this.compileStack).pop();if(!e&&n instanceof bn)return n.value;if(!r){if(!this.stackSlot)throw new zu.default("Invalid stack pop");this.stackSlot--}return n},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,r=e[e.length-1];return r instanceof bn?r.value:r},contextName:function(e){return this.useDepths&&e?"depths["+e+"]":"depth"+e},quotedString:function(e){return this.source.quotedString(e)},objectLiteral:function(e){return this.source.objectLiteral(e)},aliasable:function(e){var r=this.aliases[e];return r?(r.referenceCount++,r):(r=this.aliases[e]=this.source.wrap(e),r.aliasable=!0,r.referenceCount=1,r)},setupHelper:function(e,r,n){var i=[],o=this.setupHelperArgs(r,e,i,n),s=this.nameLookup("helpers",r,"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,r,n){var i={},o=[],s=[],a=[],c=!n,l=void 0;c&&(n=[]),i.name=this.quotedString(e),i.hash=this.popStack(),this.trackIds&&(i.hashIds=this.popStack()),this.stringParams&&(i.hashTypes=this.popStack(),i.hashContexts=this.popStack());var f=this.popStack(),p=this.popStack();(p||f)&&(i.fn=p||"container.noop",i.inverse=f||"container.noop");for(var d=r;d--;)l=this.popStack(),n[d]=l,this.trackIds&&(a[d]=this.popStack()),this.stringParams&&(s[d]=this.popStack(),o[d]=this.popStack());return c&&(i.args=this.source.generateArray(n)),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,r,n,i){var o=this.setupParams(e,r,n);return o.loc=JSON.stringify(this.source.currentLocation),o=this.objectLiteral(o),i?(this.useRegister("options"),n.push("options"),["options=",o]):n?(n.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=Sn.RESERVED_WORDS={},r=0,n=t.length;r<n;r++)e[t[r]]=!0})();Sn.isValidJavaScriptVariableName=function(t){return!Sn.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)};function fE(t,e,r,n,i){var o=e.popStack(),s=r.length;t&&s--;for(var a=n;a<s;a++)o=e.nameLookup(o,r[a],i);return t?[e.aliasable("container.strict"),"(",o,", ",e.quotedString(r[s]),", ",JSON.stringify(e.source.currentLocation)," )"]:o}As.default=Sn;Dy.exports=As.default});var By=S((Ts,Hy)=>{"use strict";Ts.__esModule=!0;function Ni(t){return t&&t.__esModule?t:{default:t}}var dE=Wg(),hE=Ni(dE),mE=Su(),gE=Ni(mE),Ju=ny(),Ku=ay(),yE=qy(),vE=Ni(yE),wE=xs(),_E=Ni(wE),bE=vu(),SE=Ni(bE),xE=hE.default.create;function Fy(){var t=xE();return t.compile=function(e,r){return Ku.compile(e,r,t)},t.precompile=function(e,r){return Ku.precompile(e,r,t)},t.AST=gE.default,t.Compiler=Ku.Compiler,t.JavaScriptCompiler=vE.default,t.Parser=Ju.parser,t.parse=Ju.parse,t.parseWithoutProcessing=Ju.parseWithoutProcessing,t}var xn=Fy();xn.create=Fy;SE.default(xn);xn.Visitor=_E.default;xn.default=xn;Ts.default=xn;Hy.exports=Ts.default});var Uy=S(Ns=>{"use strict";Ns.__esModule=!0;Ns.print=EE;Ns.PrintVisitor=be;function $E(t){return t&&t.__esModule?t:{default:t}}var kE=xs(),CE=$E(kE);function EE(t){return new be().accept(t)}function be(){this.padding=0}be.prototype=new CE.default;be.prototype.pad=function(t){for(var e="",r=0,n=this.padding;r<n;r++)e+=" ";return e+=t+`
182
- `,e};be.prototype.Program=function(t){var e="",r=t.body,n=void 0,i=void 0;if(t.blockParams){var o="BLOCK PARAMS: [";for(n=0,i=t.blockParams.length;n<i;n++)o+=" "+t.blockParams[n];o+=" ]",e+=this.pad(o)}for(n=0,i=r.length;n<i;n++)e+=this.accept(r[n]);return this.padding--,e};be.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};be.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};be.prototype.BlockStatement=be.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};be.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+" }}")};be.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+" }}")};be.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};be.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};be.prototype.SubExpression=function(t){for(var e=t.params,r=[],n=void 0,i=0,o=e.length;i<o;i++)r.push(this.accept(e[i]));return e="["+r.join(", ")+"]",n=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+n};be.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};be.prototype.StringLiteral=function(t){return'"'+t.value+'"'};be.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};be.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};be.prototype.UndefinedLiteral=function(){return"UNDEFINED"};be.prototype.NullLiteral=function(){return"NULL"};be.prototype.Hash=function(t){for(var e=t.pairs,r=[],n=0,i=e.length;n<i;n++)r.push(this.accept(e[n]));return"HASH{"+r.join(", ")+"}"};be.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var Jy=S((iN,zy)=>{var Ms=By().default,Gy=Uy();Ms.PrintVisitor=Gy.PrintVisitor;Ms.print=Gy.print;zy.exports=Ms;function Wy(t,e){var r=lt("fs"),n=r.readFileSync(e,"utf8");t.exports=Ms.compile(n)}typeof lt<"u"&&lt.extensions&&(lt.extensions[".handlebars"]=Wy,lt.extensions[".hbs"]=Wy)});import{readFile as PE}from"node:fs/promises";import{resolve as IE}from"node:path";async function vt(t,e,r){let n=IE(t,e),i=Ky.get(n);if(!i){let o=await PE(n,"utf-8");i=Yy.default.compile(o,{noEscape:!0}),Ky.set(n,i)}return i(r)}var Yy,Ky,Mi=K(()=>{"use strict";Yy=ea(Jy(),1),Ky=new Map});var Yu=K(()=>{"use strict";dn()});import{readFile as Xy,writeFile as RE,mkdir as OE,stat as AE,rm as TE,unlink as NE}from"node:fs/promises";import{resolve as Ut}from"node:path";async function Qy(t){try{return await AE(t),!0}catch{return!1}}async function Xu(t){let e=Ut(t,"..");for(let r of[Ut(t,"runtime"),Ut(e,"components"),Ut(e,"runtime")])await Qy(r)&&await TE(r,{recursive:!0,force:!0});for(let r of["extensions.tsx","extensions.ts","contracts.ts"]){let n=Ut(t,r);await Qy(n)&&await NE(n)}}function ME(t){return t.replace(/^import type \{ DispatchableAction \} from [^;]+;\n/gm,"")}async function Zy(t,e,r){let n=he(t),i=e.generated.reactDir,o=Vi(r??(e.rendererTemplatesDir?Ut(n,e.rendererTemplatesDir):void 0)),s=$n();await OE(i,{recursive:!0}),await Xu(i);let a=await Xy(Ut(s,"types.ts"),"utf-8"),c=await Xy(Ut(s,"style.ts"),"utf-8"),l=await vt(o,"dispatch.ts.hbs",{}),f=ME(l),p=await vt(o,"runtime.ts.hbs",{typesBody:a.trim(),styleBody:c.trim(),dispatchBody:f.trim()}),d=Ut(i,"runtime.ts");return await RE(d,p,"utf-8"),{runtimePath:d}}var ev=K(()=>{"use strict";pt();Mi();Yu()});var rv={};Dr(rv,{renderReactRuntime:()=>BE});import{writeFile as tv,stat as VE,unlink as LE}from"node:fs/promises";import{relative as jE,resolve as kn}from"node:path";async function DE(t){try{return await VE(t),!0}catch{return!1}}async function qE(t,e,r,n){let i=await _i(r,t),o=await vt(Vi(n),"theme.css.hbs",{themeCss:i});await tv(e,o,"utf-8")}async function FE(t){let e=kn(t,"..");for(let r of["theme.css","contracts.ts","view-bridge.generated.ts"]){let n=kn(e,r);await DE(n)&&await LE(n)}}async function HE(t,e){let r=he(t),n=e.generated.reactDir,i=kn(r,"src/components/extensions.tsx"),o=jE(n,i).replace(/\\/g,"/");o.startsWith(".")||(o=`./${o}`);let s=o.replace(/\.tsx?$/,".js"),a=kn(n,"extensions.generated.ts");return await tv(a,`/** Auto-generated extension re-export \u2014 DO NOT EDIT */
181
+ `.trim()},blockValue:function(e){var r=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var i=this.popStack();n.splice(1,0,i),this.push(this.source.functionCall(r,"call",n))},ambiguousBlockValue:function(){var e=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs("",0,r,!0),this.flushInline();var n=this.topStack();r.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(e,"call",r),"}"])},appendContent:function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},append:function(){if(this.isInline())this.replaceStack(function(r){return[" != null ? ",r,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(e){this.lastContext=e},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(e,r,n,i){var o=0;!i&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[o++])):this.pushContext(),this.resolvePath("context",e,o,r,n)},lookupBlockParam:function(e,r){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",r,1)},lookupData:function(e,r,n){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,n)},resolvePath:function(e,r,n,i,o){var s=this;if(this.options.strict||this.options.assumeObjects){this.push(yE(this.options.strict&&o,this,r,n,e));return}for(var a=r.length,c=function(f){s.replaceStack(function(p){var d=s.nameLookup(p,r[f],e);return i?[" && ",d]:[" != null ? ",d," : ",p]})},l=n;l<a;l++)c(l)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(e,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof e=="string"?this.pushString(e):this.pushStackLiteral(e))},emptyHash:function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},registerDecorator:function(e,r){var n=this.nameLookup("decorators",r,"decorator"),i=this.setupHelperArgs(r,e);this.decorators.push(["var decorator = ",n,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+r+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",i])," || fn;"])},invokeHelper:function(e,r,n){var i=this.popStack(),o=this.setupHelper(e,r),s=[];n&&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,r){var n=[];n.push(e[0]);for(var i=1;i<e.length;i++)n.push(r,e[i]);return n},invokeKnownHelper:function(e,r){var n=this.setupHelper(e,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(e,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var i=this.setupHelper(0,e,r),o=this.lastHelper=this.nameLookup("helpers",e,"helper"),s=["(","(helper = ",o," || ",n,")"];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,r,n){var i=[],o=this.setupParams(r,1,i);e&&(r=this.popStack(),delete o.name),n&&(o.indent=JSON.stringify(n)),o.helpers="helpers",o.partials="partials",o.decorators="container.decorators",e?i.unshift(r):i.unshift(this.nameLookup("partials",r,"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 r=this.popStack(),n=void 0,i=void 0,o=void 0;this.trackIds&&(o=this.popStack()),this.stringParams&&(i=this.popStack(),n=this.popStack());var s=this.hash;n&&(s.contexts[e]=n),i&&(s.types[e]=i),o&&(s.ids[e]=o),s.values[e]=r},pushId:function(e,r,n){e==="BlockParam"?this.pushStackLiteral("blockParams["+r[0]+"].path["+r[1]+"]"+(n?" + "+JSON.stringify("."+n):"")):e==="PathExpression"?this.pushString(r):e==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:Sn,compileChildren:function(e,r){for(var n=e.children,i=void 0,o=void 0,s=0,a=n.length;s<a;s++){i=n[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,r,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 r=0,n=this.context.environments.length;r<n;r++){var i=this.context.environments[r];if(i&&i.equals(e))return i}},programExpression:function(e){var r=this.environment.children[e],n=[r.index,"data",r.blockParams];return(this.useBlockParams||this.useDepths)&&n.push("blockParams"),this.useDepths&&n.push("depths"),"container.program("+n.join(", ")+")"},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},push:function(e){return e instanceof bn||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new bn(e))},pushSource:function(e){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),e&&this.source.push(e)},replaceStack:function(e){var r=["("],n=void 0,i=void 0,o=void 0;if(!this.isInline())throw new Ju.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof bn)n=[s.value],r=["(",n],o=!0;else{i=!0;var a=this.incrStack();r=["((",this.push(a)," = ",s,")"],n=this.topStack()}var c=e.call(this,n);o||this.popStack(),i&&this.stackSlot--,this.push(r.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 r=0,n=e.length;r<n;r++){var i=e[r];if(i instanceof bn)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 r=this.isInline(),n=(r?this.inlineStack:this.compileStack).pop();if(!e&&n instanceof bn)return n.value;if(!r){if(!this.stackSlot)throw new Ju.default("Invalid stack pop");this.stackSlot--}return n},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,r=e[e.length-1];return r instanceof bn?r.value:r},contextName:function(e){return this.useDepths&&e?"depths["+e+"]":"depth"+e},quotedString:function(e){return this.source.quotedString(e)},objectLiteral:function(e){return this.source.objectLiteral(e)},aliasable:function(e){var r=this.aliases[e];return r?(r.referenceCount++,r):(r=this.aliases[e]=this.source.wrap(e),r.aliasable=!0,r.referenceCount=1,r)},setupHelper:function(e,r,n){var i=[],o=this.setupHelperArgs(r,e,i,n),s=this.nameLookup("helpers",r,"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,r,n){var i={},o=[],s=[],a=[],c=!n,l=void 0;c&&(n=[]),i.name=this.quotedString(e),i.hash=this.popStack(),this.trackIds&&(i.hashIds=this.popStack()),this.stringParams&&(i.hashTypes=this.popStack(),i.hashContexts=this.popStack());var f=this.popStack(),p=this.popStack();(p||f)&&(i.fn=p||"container.noop",i.inverse=f||"container.noop");for(var d=r;d--;)l=this.popStack(),n[d]=l,this.trackIds&&(a[d]=this.popStack()),this.stringParams&&(s[d]=this.popStack(),o[d]=this.popStack());return c&&(i.args=this.source.generateArray(n)),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,r,n,i){var o=this.setupParams(e,r,n);return o.loc=JSON.stringify(this.source.currentLocation),o=this.objectLiteral(o),i?(this.useRegister("options"),n.push("options"),["options=",o]):n?(n.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=Sn.RESERVED_WORDS={},r=0,n=t.length;r<n;r++)e[t[r]]=!0})();Sn.isValidJavaScriptVariableName=function(t){return!Sn.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)};function yE(t,e,r,n,i){var o=e.popStack(),s=r.length;t&&s--;for(var a=n;a<s;a++)o=e.nameLookup(o,r[a],i);return t?[e.aliasable("container.strict"),"(",o,", ",e.quotedString(r[s]),", ",JSON.stringify(e.source.currentLocation)," )"]:o}Ts.default=Sn;Fy.exports=Ts.default});var Wy=S((Ns,Uy)=>{"use strict";Ns.__esModule=!0;function Ni(t){return t&&t.__esModule?t:{default:t}}var vE=zg(),wE=Ni(vE),_E=xu(),bE=Ni(_E),Ku=oy(),Yu=ly(),SE=Hy(),xE=Ni(SE),$E=$s(),kE=Ni($E),CE=wu(),EE=Ni(CE),PE=wE.default.create;function By(){var t=PE();return t.compile=function(e,r){return Yu.compile(e,r,t)},t.precompile=function(e,r){return Yu.precompile(e,r,t)},t.AST=bE.default,t.Compiler=Yu.Compiler,t.JavaScriptCompiler=xE.default,t.Parser=Ku.parser,t.parse=Ku.parse,t.parseWithoutProcessing=Ku.parseWithoutProcessing,t}var xn=By();xn.create=By;EE.default(xn);xn.Visitor=kE.default;xn.default=xn;Ns.default=xn;Uy.exports=Ns.default});var Gy=S(Ms=>{"use strict";Ms.__esModule=!0;Ms.print=AE;Ms.PrintVisitor=be;function RE(t){return t&&t.__esModule?t:{default:t}}var IE=$s(),OE=RE(IE);function AE(t){return new be().accept(t)}function be(){this.padding=0}be.prototype=new OE.default;be.prototype.pad=function(t){for(var e="",r=0,n=this.padding;r<n;r++)e+=" ";return e+=t+`
182
+ `,e};be.prototype.Program=function(t){var e="",r=t.body,n=void 0,i=void 0;if(t.blockParams){var o="BLOCK PARAMS: [";for(n=0,i=t.blockParams.length;n<i;n++)o+=" "+t.blockParams[n];o+=" ]",e+=this.pad(o)}for(n=0,i=r.length;n<i;n++)e+=this.accept(r[n]);return this.padding--,e};be.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};be.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};be.prototype.BlockStatement=be.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};be.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+" }}")};be.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+" }}")};be.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};be.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};be.prototype.SubExpression=function(t){for(var e=t.params,r=[],n=void 0,i=0,o=e.length;i<o;i++)r.push(this.accept(e[i]));return e="["+r.join(", ")+"]",n=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+n};be.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};be.prototype.StringLiteral=function(t){return'"'+t.value+'"'};be.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};be.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};be.prototype.UndefinedLiteral=function(){return"UNDEFINED"};be.prototype.NullLiteral=function(){return"NULL"};be.prototype.Hash=function(t){for(var e=t.pairs,r=[],n=0,i=e.length;n<i;n++)r.push(this.accept(e[n]));return"HASH{"+r.join(", ")+"}"};be.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var Yy=S((lN,Ky)=>{var Vs=Wy().default,Jy=Gy();Vs.PrintVisitor=Jy.PrintVisitor;Vs.print=Jy.print;Ky.exports=Vs;function zy(t,e){var r=lt("fs"),n=r.readFileSync(e,"utf8");t.exports=Vs.compile(n)}typeof lt<"u"&&lt.extensions&&(lt.extensions[".handlebars"]=zy,lt.extensions[".hbs"]=zy)});import{readFile as TE}from"node:fs/promises";import{resolve as NE}from"node:path";async function vt(t,e,r){let n=NE(t,e),i=Xy.get(n);if(!i){let o=await TE(n,"utf-8");i=Qy.default.compile(o,{noEscape:!0}),Xy.set(n,i)}return i(r)}var Qy,Xy,Mi=K(()=>{"use strict";Qy=ta(Yy(),1),Xy=new Map});var Xu=K(()=>{"use strict";dn()});import{readFile as Zy,writeFile as ME,mkdir as VE,stat as LE,rm as jE,unlink as DE}from"node:fs/promises";import{resolve as Ut}from"node:path";async function ev(t){try{return await LE(t),!0}catch{return!1}}async function Qu(t){let e=Ut(t,"..");for(let r of[Ut(t,"runtime"),Ut(e,"components"),Ut(e,"runtime")])await ev(r)&&await jE(r,{recursive:!0,force:!0});for(let r of["extensions.tsx","extensions.ts","contracts.ts"]){let n=Ut(t,r);await ev(n)&&await DE(n)}}function qE(t){return t.replace(/^import type \{ DispatchableAction \} from [^;]+;\n/gm,"")}async function tv(t,e,r){let n=he(t),i=e.generated.reactDir,o=Vi(r??(e.rendererTemplatesDir?Ut(n,e.rendererTemplatesDir):void 0)),s=$n();await VE(i,{recursive:!0}),await Qu(i);let a=await Zy(Ut(s,"types.ts"),"utf-8"),c=await Zy(Ut(s,"style.ts"),"utf-8"),l=await vt(o,"dispatch.ts.hbs",{}),f=qE(l),p=await vt(o,"runtime.ts.hbs",{typesBody:a.trim(),styleBody:c.trim(),dispatchBody:f.trim()}),d=Ut(i,"runtime.ts");return await ME(d,p,"utf-8"),{runtimePath:d}}var rv=K(()=>{"use strict";pt();Mi();Xu()});var iv={};Dr(iv,{renderReactRuntime:()=>JE});import{writeFile as nv,stat as FE,unlink as HE}from"node:fs/promises";import{relative as BE,resolve as kn}from"node:path";async function UE(t){try{return await FE(t),!0}catch{return!1}}async function WE(t,e,r,n){let i=await _i(r,t),o=await vt(Vi(n),"theme.css.hbs",{themeCss:i});await nv(e,o,"utf-8")}async function GE(t){let e=kn(t,"..");for(let r of["theme.css","contracts.ts","view-bridge.generated.ts"]){let n=kn(e,r);await UE(n)&&await HE(n)}}async function zE(t,e){let r=he(t),n=e.generated.reactDir,i=kn(r,"src/components/extensions.tsx"),o=BE(n,i).replace(/\\/g,"/");o.startsWith(".")||(o=`./${o}`);let s=o.replace(/\.tsx?$/,".js"),a=kn(n,"extensions.generated.ts");return await nv(a,`/** Auto-generated extension re-export \u2014 DO NOT EDIT */
183
183
  export * from '${s}';
184
- `,"utf-8"),a}async function BE(t,e){let r=he(t),n=e.rendererTemplatesDir?kn(r,e.rendererTemplatesDir):void 0,i=e.generated.reactDir;await FE(i),await Xu(i);let{runtimePath:o}=await Zy(t,e,n),s=await HE(t,e),a=kn(i,"theme.css");await qE(t,a,e,n),console.log(` react/runtime \u2192 ${o}`),console.log(` react/extensions \u2192 ${s}`),console.log(` react/theme \u2192 ${a}`)}var nv=K(()=>{"use strict";pt();Qo();Mi();Yu();ev()});function UE(t,e){return t.entries.find(n=>n.path===e)?.value??""}function WE(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let r=e[1],n=parseInt(r.slice(0,2),16),i=parseInt(r.slice(2,4),16),o=parseInt(r.slice(4,6),16);return`Color(red: ${(n/255).toFixed(3)}, green: ${(i/255).toFixed(3)}, blue: ${(o/255).toFixed(3)})`}function Or(t){let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function iv(t){return WE(t)??(t?`Color(${JSON.stringify(t)})`:null)}function ov(t,e){let r=[];for(let[n,i]of Object.entries(t)){let o=UE(e,i.ref);if(o)switch(n){case"background":case"foreground":{let s=iv(o);s&&r.push({property:n,swiftValue:s});break}case"padding":{let s=Or(o);if(s!==null)r.push({property:n,swiftValue:String(s)});else{let a=o.trim().split(/\s+/);if(a.length===2){let c=Or(a[0]),l=Or(a[1]);c!==null&&r.push({property:"paddingV",swiftValue:String(c)}),l!==null&&r.push({property:"paddingH",swiftValue:String(l)})}}break}case"radius":case"fontSize":case"minHeight":case"maxWidth":{let s=Or(o);s!==null&&r.push({property:n,swiftValue:String(s)});break}case"width":{if(o==="100%"||o==="fill")r.push({property:"widthFill",swiftValue:"true"});else{let s=Or(o);s!==null&&r.push({property:n,swiftValue:String(s)})}break}case"height":{if(o==="100%"||o==="fill")r.push({property:"heightFill",swiftValue:"true"});else{let s=Or(o);s!==null&&r.push({property:n,swiftValue:String(s)})}break}case"border":{let s=o.match(/^([\d.]+)px/);s&&r.push({property:"borderWidth",swiftValue:String(Number(s[1]))});break}case"borderColor":{let s=iv(o);s&&r.push({property:"borderColor",swiftValue:s});break}case"margin":{let s=Or(o);s!==null&&r.push({property:n,swiftValue:String(s)});break}case"fontWeight":{let s=GE[o];s&&r.push({property:n,swiftValue:s});break}case"shadow":{r.push({property:n,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 "${n}" is not handled (value: "${o}"). Add a case to renderTheme.ts resolveVariantEntries().`);break}}return r}function av(t,e){if(t.length===0)return`${e}VcVariantStyle()`;let n=[...t].sort((i,o)=>sv.indexOf(i.property)-sv.indexOf(o.property)).map(i=>`${i.property}: ${i.swiftValue}`).join(", ");return`${e}VcVariantStyle(${n})`}function zE(t,e){return{...t,...e}}function cv(t,e){let r=[];r.push("/**"),r.push(" * Auto-generated SwiftUI theme \u2014 variant style dictionary."),r.push(" * Each entry is pre-merged: base theme defaults < variant overrides."),r.push(" * DO NOT EDIT \u2014 regenerate with: view-contracts build"),r.push(" */"),r.push("import SwiftUI"),r.push(""),r.push("struct VcVariantStyle {"),r.push(" var foreground: Color?"),r.push(" var background: Color?"),r.push(" var padding: CGFloat?"),r.push(" var paddingH: CGFloat?"),r.push(" var paddingV: CGFloat?"),r.push(" var widthFill: Bool?"),r.push(" var heightFill: Bool?"),r.push(" var radius: CGFloat?"),r.push(" var fontSize: CGFloat?"),r.push(" var fontWeight: Font.Weight?"),r.push(" var shadow: Bool?"),r.push(" var borderWidth: CGFloat?"),r.push(" var borderColor: Color?"),r.push(" var minHeight: CGFloat?"),r.push(" var maxWidth: CGFloat?"),r.push("}"),r.push(""),r.push("extension View {"),r.push(" func applyVcStyle(_ s: VcVariantStyle) -> some View {"),r.push(" self"),r.push(" .ifSet(s.foreground) { $0.foregroundStyle($1) }"),r.push(" .ifSet(s.fontSize) { $0.font(.system(size: $1, weight: s.fontWeight ?? .regular)) }"),r.push(" .ifSet(s.padding) { $0.padding($1) }"),r.push(" .ifSet(s.paddingH) { $0.padding(.horizontal, $1) }"),r.push(" .ifSet(s.paddingV) { $0.padding(.vertical, $1) }"),r.push(" .vcFillFrame(widthFill: s.widthFill ?? false, heightFill: s.heightFill ?? false)"),r.push(" .ifSet(s.background) { $0.background($1) }"),r.push(" .ifSet(s.radius) { $0.clipShape(RoundedRectangle(cornerRadius: $1)) }"),r.push(" .ifSet(s.borderColor) { $0.overlay(RoundedRectangle(cornerRadius: s.radius ?? 0).stroke($1, lineWidth: s.borderWidth ?? 1)) }"),r.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) }"),r.push(" }"),r.push("}"),r.push(""),r.push("extension View {"),r.push(" @ViewBuilder"),r.push(" func vcFillFrame(widthFill: Bool, heightFill: Bool) -> some View {"),r.push(" if widthFill && heightFill {"),r.push(" self.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"),r.push(" } else if widthFill {"),r.push(" self.frame(maxWidth: .infinity, alignment: .leading)"),r.push(" } else if heightFill {"),r.push(" self.frame(maxHeight: .infinity, alignment: .top)"),r.push(" } else {"),r.push(" self"),r.push(" }"),r.push(" }"),r.push("}"),r.push(""),r.push("extension View {"),r.push(" @ViewBuilder"),r.push(" func ifSet<T, V: View>(_ value: T?, _ transform: (Self, T) -> V) -> some View {"),r.push(" if let value { transform(self, value) } else { self }"),r.push(" }"),r.push("}"),r.push(""),r.push("enum VcTheme {"),r.push(" static let defaults: [String: VcVariantStyle] = [");for(let[n,i]of Object.entries(t.defaults)){if(Object.keys(i).length===0)continue;let o=ov(i,e);o.length!==0&&r.push(` ${JSON.stringify(n)}: ${av(o,"").trim()},`)}r.push(" ]"),r.push(""),r.push(" static let variants: [String: [String: VcVariantStyle]] = [");for(let[n,i]of Object.entries(t.variants)){let o=Object.entries(i);if(o.length===0)continue;let s=t.defaults[n]??{};r.push(` ${JSON.stringify(n)}: [`);for(let[a,c]of o){let l=zE(s,c),f=ov(l,e),p=av(f," ");r.push(` ${JSON.stringify(a)}: ${p.trim()},`)}r.push(" ],")}return r.push(" ]"),r.push(""),r.push(" static func resolve(_ element: String, variant: String) -> VcVariantStyle {"),r.push(" variants[element]?[variant] ?? defaults[element] ?? VcVariantStyle()"),r.push(" }"),r.push("}"),r.push(""),r.join(`
185
- `)}var GE,sv,lv=K(()=>{"use strict";GE={bold:".bold",semibold:".semibold",medium:".medium",regular:".regular",600:".semibold",700:".bold",500:".medium",400:".regular"};sv=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});import{resolve as JE}from"node:path";function YE(t){for(let[e,r]of Object.entries(t.elements)){let n=r.container!==void 0&&r.container!==null,i=r.leaf!==void 0&&r.leaf!==null;if(n===i)throw new Error(`${KE}: element "${e}" must have exactly one of "container" or "leaf"`);(r.container==="vstack"||r.container==="hstack")&&r.spacingProp}}async function uv(t){if(!t&&Qu)return Qu;let e=t??JE(Pe(),"renderers/swiftui/elements.yaml"),r=await Fo(e);return YE(r),t||(Qu=r),r}var KE,Qu,pv=K(()=>{"use strict";ir();Il();KE="renderers/swiftui/elements.yaml",Qu=null});function XE(t,e){let r=t.entries.find(n=>n.path===e);if(!r)throw new Error(`Token reference "${e}" not found while merging visual props`);return r.value}function fv(t,e){let r={};for(let[n,i]of Object.entries(t))r[n]=XE(e,i.ref);return r}function QE(t){let e={};for(let[r,n]of Object.entries(t))n!=null&&(typeof n=="string"||typeof n=="number"||typeof n=="boolean")&&(e[r]=n);return e}function Vs(t){let e=t.theme.defaults[t.elementName]??{},r=t.variantLiteral?t.theme.variants[t.elementName]?.[t.variantLiteral]??{}:{};return{...fv(e,t.tokens),...fv(r,t.tokens),...QE(t.instanceLiterals)}}var dv=K(()=>{"use strict"});function Xe(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 Zu(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let r=e[1],n=parseInt(r.slice(0,2),16),i=parseInt(r.slice(2,4),16),o=parseInt(r.slice(4,6),16);return`Color(red: ${n/255}, green: ${i/255}, blue: ${o/255})`}function ZE(t){let e=Xe(t);if(e!==null)return{kind:"uniform",value:e};if(typeof t!="string")return null;let r=t.trim().split(/\s+/);if(r.length===2){let n=Xe(r[0]),i=Xe(r[1]);if(n!==null&&i!==null)return{kind:"shorthand",vertical:n,horizontal:i}}return null}function eP(t){if(t===""||t===null||t===void 0)return null;let e=Xe(t);return e!==null?`.font(.system(size: ${e}))`:typeof t=="string"&&!t.endsWith("px")?`.font(.system(size: ${JSON.stringify(t)}))`:null}function tP(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 ep(t){let e=[],r=t.foreground;if(typeof r=="string"){let V=Zu(r);e.push(V?`.foregroundStyle(${V})`:`.foregroundStyle(Color(${JSON.stringify(r)}))`)}let n=t.size??t.fontSize;if(n!==void 0&&n!==""){let V=eP(n);V&&e.push(V)}let i=tP(t.fontWeight??t.weight??"");i&&e.push(i);let o=t.padding??"",s=ZE(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,f=t.maxWidth,p=t.maxHeight,d=t.margin,m=d==="0 auto",g=a==="100%"||a==="fill"||f==="fill",y=c==="100%"||c==="fill"||l==="100vh",_=f==="fill"?null:f!==void 0?Xe(f):null;g&&y?_!==null?e.push(`.frame(maxWidth: ${_}, maxHeight: .infinity, alignment: .topLeading)`):e.push(".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"):g?_!==null?e.push(`.frame(maxWidth: ${_}, alignment: .leading)`):e.push(".frame(maxWidth: .infinity, alignment: .leading)"):y&&e.push(".frame(maxHeight: .infinity, alignment: .top)"),!y&&l==="100vh"&&e.push(".frame(maxHeight: .infinity, alignment: .top)");let b=t.background;if(typeof b=="string"&&b!=="transparent"){let V=Zu(b);e.push(V?`.background(${V})`:`.background(Color(${JSON.stringify(b)}))`)}let M=Xe(t.radius??"");M!==null&&e.push(`.clipShape(RoundedRectangle(cornerRadius: ${M}))`),(t.shadow===!0||t.shadow==="true")&&e.push(".shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)");let q=t.border,A=t.borderColor;if(q||A){let V=Xe(q??"1px")??1,X=typeof A=="string"?Zu(A)??"Color.gray":"Color.gray";e.push(`.overlay(RoundedRectangle(cornerRadius: ${M??0}).stroke(${X}, lineWidth: ${V}))`)}if(!g){if(typeof a=="number")e.push(`.frame(width: ${a})`);else if(a!==void 0&&a!=="wrap"){let V=Xe(a);V!==null&&e.push(`.frame(width: ${V})`)}if(f!==void 0&&f!=="fill"){let V=Xe(f);V!==null&&e.push(`.frame(maxWidth: ${V})`)}}if(!y){if(typeof c=="number")e.push(`.frame(height: ${c})`);else if(c!==void 0&&c!=="wrap"){let V=Xe(c);V!==null&&e.push(`.frame(height: ${V})`)}if(l!==void 0&&l!=="100vh")if(typeof l=="number")e.push(`.frame(minHeight: ${l})`);else{let V=Xe(l);V!==null&&e.push(`.frame(minHeight: ${V})`)}if(p!==void 0&&p!=="fill"){let V=Xe(p);V!==null&&e.push(`.frame(maxHeight: ${V})`)}}if(m)e.push(".frame(maxWidth: .infinity, alignment: .center)");else if(typeof d=="number")e.push(`.padding(${d})`);else if(d!==void 0){let V=Xe(d);V!==null&&e.push(`.padding(${V})`)}let T=t.opacity;return typeof T=="number"&&T<1&&e.push(`.opacity(${T})`),e}function qe(t,e,r){if(e.length===0)return t;let n=" ".repeat(r);return`${t}
184
+ `,"utf-8"),a}async function JE(t,e){let r=he(t),n=e.rendererTemplatesDir?kn(r,e.rendererTemplatesDir):void 0,i=e.generated.reactDir;await GE(i),await Qu(i);let{runtimePath:o}=await tv(t,e,n),s=await zE(t,e),a=kn(i,"theme.css");await WE(t,a,e,n),console.log(` react/runtime \u2192 ${o}`),console.log(` react/extensions \u2192 ${s}`),console.log(` react/theme \u2192 ${a}`)}var ov=K(()=>{"use strict";pt();Zo();Mi();Xu();rv()});function KE(t,e){return t.entries.find(n=>n.path===e)?.value??""}function YE(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let r=e[1],n=parseInt(r.slice(0,2),16),i=parseInt(r.slice(2,4),16),o=parseInt(r.slice(4,6),16);return`Color(red: ${(n/255).toFixed(3)}, green: ${(i/255).toFixed(3)}, blue: ${(o/255).toFixed(3)})`}function Or(t){let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function sv(t){return YE(t)??(t?`Color(${JSON.stringify(t)})`:null)}function av(t,e){let r=[];for(let[n,i]of Object.entries(t)){let o=KE(e,i.ref);if(o)switch(n){case"background":case"foreground":{let s=sv(o);s&&r.push({property:n,swiftValue:s});break}case"padding":{let s=Or(o);if(s!==null)r.push({property:n,swiftValue:String(s)});else{let a=o.trim().split(/\s+/);if(a.length===2){let c=Or(a[0]),l=Or(a[1]);c!==null&&r.push({property:"paddingV",swiftValue:String(c)}),l!==null&&r.push({property:"paddingH",swiftValue:String(l)})}}break}case"radius":case"fontSize":case"minHeight":case"maxWidth":{let s=Or(o);s!==null&&r.push({property:n,swiftValue:String(s)});break}case"width":{if(o==="100%"||o==="fill")r.push({property:"widthFill",swiftValue:"true"});else{let s=Or(o);s!==null&&r.push({property:n,swiftValue:String(s)})}break}case"height":{if(o==="100%"||o==="fill")r.push({property:"heightFill",swiftValue:"true"});else{let s=Or(o);s!==null&&r.push({property:n,swiftValue:String(s)})}break}case"border":{let s=o.match(/^([\d.]+)px/);s&&r.push({property:"borderWidth",swiftValue:String(Number(s[1]))});break}case"borderColor":{let s=sv(o);s&&r.push({property:"borderColor",swiftValue:s});break}case"margin":{let s=Or(o);s!==null&&r.push({property:n,swiftValue:String(s)});break}case"fontWeight":{let s=XE[o];s&&r.push({property:n,swiftValue:s});break}case"shadow":{r.push({property:n,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 "${n}" is not handled (value: "${o}"). Add a case to renderTheme.ts resolveVariantEntries().`);break}}return r}function lv(t,e){if(t.length===0)return`${e}VcVariantStyle()`;let n=[...t].sort((i,o)=>cv.indexOf(i.property)-cv.indexOf(o.property)).map(i=>`${i.property}: ${i.swiftValue}`).join(", ");return`${e}VcVariantStyle(${n})`}function QE(t,e){return{...t,...e}}function uv(t,e){let r=[];r.push("/**"),r.push(" * Auto-generated SwiftUI theme \u2014 variant style dictionary."),r.push(" * Each entry is pre-merged: base theme defaults < variant overrides."),r.push(" * DO NOT EDIT \u2014 regenerate with: view-contracts build"),r.push(" */"),r.push("import SwiftUI"),r.push(""),r.push("struct VcVariantStyle {"),r.push(" var foreground: Color?"),r.push(" var background: Color?"),r.push(" var padding: CGFloat?"),r.push(" var paddingH: CGFloat?"),r.push(" var paddingV: CGFloat?"),r.push(" var widthFill: Bool?"),r.push(" var heightFill: Bool?"),r.push(" var radius: CGFloat?"),r.push(" var fontSize: CGFloat?"),r.push(" var fontWeight: Font.Weight?"),r.push(" var shadow: Bool?"),r.push(" var borderWidth: CGFloat?"),r.push(" var borderColor: Color?"),r.push(" var minHeight: CGFloat?"),r.push(" var maxWidth: CGFloat?"),r.push("}"),r.push(""),r.push("extension View {"),r.push(" func applyVcStyle(_ s: VcVariantStyle) -> some View {"),r.push(" self"),r.push(" .ifSet(s.foreground) { $0.foregroundStyle($1) }"),r.push(" .ifSet(s.fontSize) { $0.font(.system(size: $1, weight: s.fontWeight ?? .regular)) }"),r.push(" .ifSet(s.padding) { $0.padding($1) }"),r.push(" .ifSet(s.paddingH) { $0.padding(.horizontal, $1) }"),r.push(" .ifSet(s.paddingV) { $0.padding(.vertical, $1) }"),r.push(" .vcFillFrame(widthFill: s.widthFill ?? false, heightFill: s.heightFill ?? false)"),r.push(" .ifSet(s.background) { $0.background($1) }"),r.push(" .ifSet(s.radius) { $0.clipShape(RoundedRectangle(cornerRadius: $1)) }"),r.push(" .ifSet(s.borderColor) { $0.overlay(RoundedRectangle(cornerRadius: s.radius ?? 0).stroke($1, lineWidth: s.borderWidth ?? 1)) }"),r.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) }"),r.push(" }"),r.push("}"),r.push(""),r.push("extension View {"),r.push(" @ViewBuilder"),r.push(" func vcFillFrame(widthFill: Bool, heightFill: Bool) -> some View {"),r.push(" if widthFill && heightFill {"),r.push(" self.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"),r.push(" } else if widthFill {"),r.push(" self.frame(maxWidth: .infinity, alignment: .leading)"),r.push(" } else if heightFill {"),r.push(" self.frame(maxHeight: .infinity, alignment: .top)"),r.push(" } else {"),r.push(" self"),r.push(" }"),r.push(" }"),r.push("}"),r.push(""),r.push("extension View {"),r.push(" @ViewBuilder"),r.push(" func ifSet<T, V: View>(_ value: T?, _ transform: (Self, T) -> V) -> some View {"),r.push(" if let value { transform(self, value) } else { self }"),r.push(" }"),r.push("}"),r.push(""),r.push("enum VcTheme {"),r.push(" static let defaults: [String: VcVariantStyle] = [");for(let[n,i]of Object.entries(t.defaults)){if(Object.keys(i).length===0)continue;let o=av(i,e);o.length!==0&&r.push(` ${JSON.stringify(n)}: ${lv(o,"").trim()},`)}r.push(" ]"),r.push(""),r.push(" static let variants: [String: [String: VcVariantStyle]] = [");for(let[n,i]of Object.entries(t.variants)){let o=Object.entries(i);if(o.length===0)continue;let s=t.defaults[n]??{};r.push(` ${JSON.stringify(n)}: [`);for(let[a,c]of o){let l=QE(s,c),f=av(l,e),p=lv(f," ");r.push(` ${JSON.stringify(a)}: ${p.trim()},`)}r.push(" ],")}return r.push(" ]"),r.push(""),r.push(" static func resolve(_ element: String, variant: String) -> VcVariantStyle {"),r.push(" variants[element]?[variant] ?? defaults[element] ?? VcVariantStyle()"),r.push(" }"),r.push("}"),r.push(""),r.join(`
185
+ `)}var XE,cv,pv=K(()=>{"use strict";XE={bold:".bold",semibold:".semibold",medium:".medium",regular:".regular",600:".semibold",700:".bold",500:".medium",400:".regular"};cv=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});import{resolve as ZE}from"node:path";function tP(t){for(let[e,r]of Object.entries(t.elements)){let n=r.container!==void 0&&r.container!==null,i=r.leaf!==void 0&&r.leaf!==null;if(n===i)throw new Error(`${eP}: element "${e}" must have exactly one of "container" or "leaf"`);(r.container==="vstack"||r.container==="hstack")&&r.spacingProp}}async function fv(t){if(!t&&Zu)return Zu;let e=t??ZE(Pe(),"renderers/swiftui/elements.yaml"),r=await Ho(e);return tP(r),t||(Zu=r),r}var eP,Zu,dv=K(()=>{"use strict";ir();Il();eP="renderers/swiftui/elements.yaml",Zu=null});function rP(t,e){let r=t.entries.find(n=>n.path===e);if(!r)throw new Error(`Token reference "${e}" not found while merging visual props`);return r.value}function hv(t,e){let r={};for(let[n,i]of Object.entries(t))r[n]=rP(e,i.ref);return r}function nP(t){let e={};for(let[r,n]of Object.entries(t))n!=null&&(typeof n=="string"||typeof n=="number"||typeof n=="boolean")&&(e[r]=n);return e}function Ls(t){let e=t.theme.defaults[t.elementName]??{},r=t.variantLiteral?t.theme.variants[t.elementName]?.[t.variantLiteral]??{}:{};return{...hv(e,t.tokens),...hv(r,t.tokens),...nP(t.instanceLiterals)}}var mv=K(()=>{"use strict"});function Xe(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 ep(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let r=e[1],n=parseInt(r.slice(0,2),16),i=parseInt(r.slice(2,4),16),o=parseInt(r.slice(4,6),16);return`Color(red: ${n/255}, green: ${i/255}, blue: ${o/255})`}function iP(t){let e=Xe(t);if(e!==null)return{kind:"uniform",value:e};if(typeof t!="string")return null;let r=t.trim().split(/\s+/);if(r.length===2){let n=Xe(r[0]),i=Xe(r[1]);if(n!==null&&i!==null)return{kind:"shorthand",vertical:n,horizontal:i}}return null}function oP(t){if(t===""||t===null||t===void 0)return null;let e=Xe(t);return e!==null?`.font(.system(size: ${e}))`:typeof t=="string"&&!t.endsWith("px")?`.font(.system(size: ${JSON.stringify(t)}))`:null}function sP(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 tp(t){let e=[],r=t.foreground;if(typeof r=="string"){let V=ep(r);e.push(V?`.foregroundStyle(${V})`:`.foregroundStyle(Color(${JSON.stringify(r)}))`)}let n=t.size??t.fontSize;if(n!==void 0&&n!==""){let V=oP(n);V&&e.push(V)}let i=sP(t.fontWeight??t.weight??"");i&&e.push(i);let o=t.padding??"",s=iP(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,f=t.maxWidth,p=t.maxHeight,d=t.margin,m=d==="0 auto",g=a==="100%"||a==="fill"||f==="fill",y=c==="100%"||c==="fill"||l==="100vh",_=f==="fill"?null:f!==void 0?Xe(f):null;g&&y?_!==null?e.push(`.frame(maxWidth: ${_}, maxHeight: .infinity, alignment: .topLeading)`):e.push(".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"):g?_!==null?e.push(`.frame(maxWidth: ${_}, alignment: .leading)`):e.push(".frame(maxWidth: .infinity, alignment: .leading)"):y&&e.push(".frame(maxHeight: .infinity, alignment: .top)"),!y&&l==="100vh"&&e.push(".frame(maxHeight: .infinity, alignment: .top)");let b=t.background;if(typeof b=="string"&&b!=="transparent"){let V=ep(b);e.push(V?`.background(${V})`:`.background(Color(${JSON.stringify(b)}))`)}let M=Xe(t.radius??"");M!==null&&e.push(`.clipShape(RoundedRectangle(cornerRadius: ${M}))`),(t.shadow===!0||t.shadow==="true")&&e.push(".shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)");let q=t.border,A=t.borderColor;if(q||A){let V=Xe(q??"1px")??1,X=typeof A=="string"?ep(A)??"Color.gray":"Color.gray";e.push(`.overlay(RoundedRectangle(cornerRadius: ${M??0}).stroke(${X}, lineWidth: ${V}))`)}if(!g){if(typeof a=="number")e.push(`.frame(width: ${a})`);else if(a!==void 0&&a!=="wrap"){let V=Xe(a);V!==null&&e.push(`.frame(width: ${V})`)}if(f!==void 0&&f!=="fill"){let V=Xe(f);V!==null&&e.push(`.frame(maxWidth: ${V})`)}}if(!y){if(typeof c=="number")e.push(`.frame(height: ${c})`);else if(c!==void 0&&c!=="wrap"){let V=Xe(c);V!==null&&e.push(`.frame(height: ${V})`)}if(l!==void 0&&l!=="100vh")if(typeof l=="number")e.push(`.frame(minHeight: ${l})`);else{let V=Xe(l);V!==null&&e.push(`.frame(minHeight: ${V})`)}if(p!==void 0&&p!=="fill"){let V=Xe(p);V!==null&&e.push(`.frame(maxHeight: ${V})`)}}if(m)e.push(".frame(maxWidth: .infinity, alignment: .center)");else if(typeof d=="number")e.push(`.padding(${d})`);else if(d!==void 0){let V=Xe(d);V!==null&&e.push(`.padding(${V})`)}let T=t.opacity;return typeof T=="number"&&T<1&&e.push(`.opacity(${T})`),e}function qe(t,e,r){if(e.length===0)return t;let n=" ".repeat(r);return`${t}
186
186
  ${e.map(i=>`${n}${i}`).join(`
187
- `)}`}var hv=K(()=>{"use strict"});function D(t){return" ".repeat(t)}function Ls(t,e,r){let i=t.entries.find(f=>f.path===e)?.value??r,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 gv(t,e,r,n,i){let o=`${D(e+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`;return t.map(a=>{if(a.kind==="map"){let l=a,f=l.item,p=r(l.body,e+2,f);p+=`
187
+ `)}`}var gv=K(()=>{"use strict"});function D(t){return" ".repeat(t)}function js(t,e,r){let i=t.entries.find(f=>f.path===e)?.value??r,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 vv(t,e,r,n,i){let o=`${D(e+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`;return t.map(a=>{if(a.kind==="map"){let l=a,f=l.item,p=r(l.body,e+2,f);p+=`
188
188
  ${o}`;let d=Qe(l.source,n,i);return`${D(e+2)}ForEach(${d}, id: \\.id) { ${f} in
189
189
  ${p}
190
190
  ${D(e+2)}}`}let c="";return a.kind==="text"?c=`${D(e+2)}Text(${JSON.stringify(a.value)})`:a.kind==="binding"?c=`${D(e+2)}Text(${Qe(a,n,i)})`:c=r(a,e+2,i),c?`${c}
191
191
  ${o}`:""}).filter(Boolean).join(`
192
- `)}function pe(t,e){let r=t[e];if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="object"&&"kind"in r&&r.kind==="literal")return r.value}}function yv(t){let e={};for(let[r,n]of Object.entries(t)){if(r==="variant"||r==="id"||!no.has(r))continue;let i=pe(t,r);i!==void 0&&(e[r]=i)}return e}function vv(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 rP(t,e,r){let n=t.variant;return!n||typeof n!="object"||!("kind"in n)?null:n.kind==="binding"?Qe(n,e,r):n.kind==="concat"?`"${n.parts.map(s=>typeof s=="string"?s:`\\(${Qe(s,e,r)})`).join("")}"`:null}function nP(t,e,r,n){let i=r.map.elements[t],o=pe(e,"variant"),s=yv(e);if(i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp],vv(e)){let l=rP(e,r,n),f=`.applyVcStyle(VcTheme.resolve(${JSON.stringify(t)}, variant: ${l}))`,p=Vs({elementName:t,theme:{defaults:{},variants:{}},tokens:r.tokens,instanceLiterals:s}),d=ep(p),m=d.filter(y=>y.startsWith(".padding")),g=d.filter(y=>!y.startsWith(".padding"));return[...m,f,...g]}let c=Vs({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return ep(c)}function iP(t){return[]}function oP(t,e,r,n){let i=t.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=Qe(i,e,r);return`${D(n+1)}ForEach(${o}, id: \\.value) { option in
192
+ `)}function pe(t,e){let r=t[e];if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="object"&&"kind"in r&&r.kind==="literal")return r.value}}function wv(t){let e={};for(let[r,n]of Object.entries(t)){if(r==="variant"||r==="id"||!no.has(r))continue;let i=pe(t,r);i!==void 0&&(e[r]=i)}return e}function _v(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 aP(t,e,r){let n=t.variant;return!n||typeof n!="object"||!("kind"in n)?null:n.kind==="binding"?Qe(n,e,r):n.kind==="concat"?`"${n.parts.map(s=>typeof s=="string"?s:`\\(${Qe(s,e,r)})`).join("")}"`:null}function cP(t,e,r,n){let i=r.map.elements[t],o=pe(e,"variant"),s=wv(e);if(i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp],_v(e)){let l=aP(e,r,n),f=`.applyVcStyle(VcTheme.resolve(${JSON.stringify(t)}, variant: ${l}))`,p=Ls({elementName:t,theme:{defaults:{},variants:{}},tokens:r.tokens,instanceLiterals:s}),d=tp(p),m=d.filter(y=>y.startsWith(".padding")),g=d.filter(y=>!y.startsWith(".padding"));return[...m,f,...g]}let c=Ls({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return tp(c)}function lP(t){return[]}function uP(t,e,r,n){let i=t.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=Qe(i,e,r);return`${D(n+1)}ForEach(${o}, id: \\.value) { option in
193
193
  ${D(n+2)}Button(option.label) {}
194
194
  ${D(n+1)}}`}return typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="literal"&&Array.isArray(i.value)?i.value.map(s=>`${D(n+1)}Button(${JSON.stringify(s.label)}) {}`).join(`
195
- `):`${D(n+1)}Button("--") {}`}function sP(t,e,r){let n=t.options;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding")return`${Qe(n,e,r)}.first?.label ?? ""`;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="literal"&&Array.isArray(n.value)){let i=n.value;return JSON.stringify(i[0]?.label??"")}return'""'}function Qe(t,e,r){let n=t.scope??r??e.propsRoot??"vm";return t.path?`${n}.${t.path}`:n}function mv(t,e,r){for(let n of t){if(n.kind==="text")return JSON.stringify(n.value);if(n.kind==="binding")return Qe(n,e,r)}return null}function wv(t,e,r,n,i){return t.map(s=>s.kind==="map"?Li(s,e,r,n):s.kind==="text"?`${D(e)}Text(${JSON.stringify(s.value)})`:s.kind==="binding"?`${D(e)}Text(${Qe(s,n,i)})`:r(s,e,i)).filter(Boolean).join(`
195
+ `):`${D(n+1)}Button("--") {}`}function pP(t,e,r){let n=t.options;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding")return`${Qe(n,e,r)}.first?.label ?? ""`;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="literal"&&Array.isArray(n.value)){let i=n.value;return JSON.stringify(i[0]?.label??"")}return'""'}function Qe(t,e,r){let n=t.scope??r??e.propsRoot??"vm";return t.path?`${n}.${t.path}`:n}function yv(t,e,r){for(let n of t){if(n.kind==="text")return JSON.stringify(n.value);if(n.kind==="binding")return Qe(n,e,r)}return null}function bv(t,e,r,n,i){return t.map(s=>s.kind==="map"?Li(s,e,r,n):s.kind==="text"?`${D(e)}Text(${JSON.stringify(s.value)})`:s.kind==="binding"?`${D(e)}Text(${Qe(s,n,i)})`:r(s,e,i)).filter(Boolean).join(`
196
196
  `)}function Li(t,e,r,n){let i=t.item,o=r(t.body,e+2,i),s=Qe(t.source,n,i);return`${D(e)}ForEach(${s}, id: \\.id) { ${i} in
197
197
  ${o}
198
- ${D(e)}}`}function aP(t,e,r,n,i,o){let s=D(r);if(e.leaf==="text"){let a=mv(t.children,i,n);if(!a)return`${s}Text("")`;let c=`${s}Text(${a})`,l=o.map(f=>`${s}${f}`);return[c,...l].join(`
199
- `)}if(e.leaf==="button"){let a=pe(t.props,"label"),l=mv(t.children,i,n)??(typeof a=="string"?JSON.stringify(a):'"Button"'),f=`${s}Button(${l}) {}`,p=o.map(d=>`${s}${d}`);return[f,...p].join(`
200
- `)}if(e.leaf==="textfield"){let a=pe(t.props,"placeholder"),c=typeof a=="string"?JSON.stringify(a):'""',l=Ls(i.tokens,"ui.text-muted","#6b7280"),f=`${s}TextField("", text: .constant(""), prompt: Text(${c}).foregroundStyle(${l}))`,d=[...o,...iP(t.name)].map(m=>`${s}${m}`);return[f,...d].join(`
201
- `)}if(e.leaf==="texteditor"){let a=pe(t.props,"placeholder"),c=typeof a=="string"?JSON.stringify(a):'""',l=Ls(i.tokens,"ui.text-muted","#6b7280"),p=o.find(_=>_.startsWith(".frame(minHeight:"))?.match(/minHeight: (\d+)/)?.[1]??"72",d=o.filter(_=>_.startsWith(".foregroundStyle(")||_.startsWith(".font(")||_.startsWith(".fontWeight(")),m=o.filter(_=>!_.startsWith(".foregroundStyle(")&&!_.startsWith(".font(")&&!_.startsWith(".fontWeight(")&&!_.startsWith(".frame(minHeight:")),g=d.map(_=>`${s} ${_}`),y=m.map(_=>`${s}${_}`);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: .constant(""))`,`${s} .scrollContentBackground(.hidden)`,...g,`${s}}`,`${s}.frame(minHeight: ${p})`,...y].join(`
202
- `)}if(e.leaf==="picker"){let a=Ls(i.tokens,"ui.text","#111827"),c=Ls(i.tokens,"ui.text-muted","#6b7280"),l=oP(t.props,i,n,r),f=sP(t.props,i,n),p=o.filter(y=>!y.startsWith(".frame")),d=pe(t.props,"width"),m=typeof d=="number"?`${s}.frame(width: ${d})`:`${s}.frame(maxWidth: .infinity)`;return[`${s}Menu {`,l,`${s}} label: {`,`${s} HStack(spacing: 0) {`,`${s} Text(${f})`,`${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(y=>`${s} ${y}`),`${s}}`,m,`${s}.frame(minHeight: 42)`,`${s}.frame(maxWidth: .infinity)`].join(`
198
+ ${D(e)}}`}function fP(t,e,r,n,i,o){let s=D(r);if(e.leaf==="text"){let a=yv(t.children,i,n);if(!a)return`${s}Text("")`;let c=`${s}Text(${a})`,l=o.map(f=>`${s}${f}`);return[c,...l].join(`
199
+ `)}if(e.leaf==="button"){let a=pe(t.props,"label"),l=yv(t.children,i,n)??(typeof a=="string"?JSON.stringify(a):'"Button"'),f=`${s}Button(${l}) {}`,p=o.map(d=>`${s}${d}`);return[f,...p].join(`
200
+ `)}if(e.leaf==="textfield"){let a=pe(t.props,"placeholder"),c=typeof a=="string"?JSON.stringify(a):'""',l=js(i.tokens,"ui.text-muted","#6b7280"),f=`${s}TextField("", text: .constant(""), prompt: Text(${c}).foregroundStyle(${l}))`,d=[...o,...lP(t.name)].map(m=>`${s}${m}`);return[f,...d].join(`
201
+ `)}if(e.leaf==="texteditor"){let a=pe(t.props,"placeholder"),c=typeof a=="string"?JSON.stringify(a):'""',l=js(i.tokens,"ui.text-muted","#6b7280"),p=o.find(_=>_.startsWith(".frame(minHeight:"))?.match(/minHeight: (\d+)/)?.[1]??"72",d=o.filter(_=>_.startsWith(".foregroundStyle(")||_.startsWith(".font(")||_.startsWith(".fontWeight(")),m=o.filter(_=>!_.startsWith(".foregroundStyle(")&&!_.startsWith(".font(")&&!_.startsWith(".fontWeight(")&&!_.startsWith(".frame(minHeight:")),g=d.map(_=>`${s} ${_}`),y=m.map(_=>`${s}${_}`);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: .constant(""))`,`${s} .scrollContentBackground(.hidden)`,...g,`${s}}`,`${s}.frame(minHeight: ${p})`,...y].join(`
202
+ `)}if(e.leaf==="picker"){let a=js(i.tokens,"ui.text","#111827"),c=js(i.tokens,"ui.text-muted","#6b7280"),l=uP(t.props,i,n,r),f=pP(t.props,i,n),p=o.filter(y=>!y.startsWith(".frame")),d=pe(t.props,"width"),m=typeof d=="number"?`${s}.frame(width: ${d})`:`${s}.frame(maxWidth: .infinity)`;return[`${s}Menu {`,l,`${s}} label: {`,`${s} HStack(spacing: 0) {`,`${s} Text(${f})`,`${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(y=>`${s} ${y}`),`${s}}`,m,`${s}.frame(minHeight: 42)`,`${s}.frame(maxWidth: .infinity)`].join(`
203
203
  `)}if(e.leaf==="spacer")return`${s}Spacer()`;if(e.leaf==="divider")return`${s}Divider()`;if(e.leaf==="image"){let a=pe(t.props,"src")??pe(t.props,"name"),l=`${s}Image(systemName: ${JSON.stringify(typeof a=="string"?a:"photo")})`,f=o.map(p=>`${s}${p}`);return[l,...f].join(`
204
204
  `)}if(e.leaf==="progressview"){let a=`${s}ProgressView()`,c=o.map(l=>`${s}${l}`);return[a,...c].join(`
205
205
  `)}if(e.leaf==="toggle"){let a=pe(t.props,"label")??"",c=`${s}Toggle(${JSON.stringify(a)}, isOn: .constant(false))`,l=o.map(f=>`${s}${f}`);return[c,...l].join(`
206
- `)}return`${s}Text("/* unsupported leaf: ${t.name} */")`}function cP(t,e,r,n,i,o,s){let a=wv(t.children,r+2,i,o,n);if(e.container==="vstack"){let l=e.spacingProp?pe(t.props,e.spacingProp):void 0,f=typeof l=="number"?l:0,p=`${D(r+1)}VStack(alignment: .leading, spacing: ${f}) {
206
+ `)}return`${s}Text("/* unsupported leaf: ${t.name} */")`}function dP(t,e,r,n,i,o,s){let a=bv(t.children,r+2,i,o,n);if(e.container==="vstack"){let l=e.spacingProp?pe(t.props,e.spacingProp):void 0,f=typeof l=="number"?l:0,p=`${D(r+1)}VStack(alignment: .leading, spacing: ${f}) {
207
207
  ${a}
208
- ${D(r+1)}}`;return qe(p,s,r+1)}if(e.container==="hstack"){let l=e.spacingProp?pe(t.props,e.spacingProp):void 0,f=typeof l=="number"?l:0,p=pe(t.props,"align"),d=pe(t.props,"height"),m=p==="center"||typeof d=="number"?".center":".top",g=pe(t.props,"justify"),y=pe(t.props,"flex"),_=pe(t.props,"wrap"),M=t.name==="TableHeader"||t.name==="TableRow"||g!==void 0||typeof y=="number",q=g==="end"?".trailing":g==="center"?".center":".leading",A=[];M&&A.push(`.frame(maxWidth: .infinity, alignment: ${q})`),typeof d=="number"&&A.push(`.frame(height: ${d})`);let T=a;if(g==="between"){let X=t.children.map(fe=>fe.kind==="map"?Li(fe,r+2,i,o):fe.kind==="text"?`${D(r+2)}Text(${JSON.stringify(fe.value)})`:fe.kind==="binding"?`${D(r+2)}Text(${Qe(fe,o,n)})`:i(fe,r+2,n)).filter(Boolean);if(X.length>=2){let fe=X[0],Re=X.slice(1);T=[fe,`${D(r+2)}Spacer()`,...Re].join(`
209
- `)}}else if(_===!0){T=t.children.map(fe=>{if(fe.kind==="map")return Li(fe,r+2,i,o);if(fe.kind==="text")return`${D(r+2)}Text(${JSON.stringify(fe.value)})`;if(fe.kind==="binding")return`${D(r+2)}Text(${Qe(fe,o,n)})`;let Re=i(fe,r+2,n);return Re||""}).filter(Boolean).join(`
208
+ ${D(r+1)}}`;return qe(p,s,r+1)}if(e.container==="hstack"){let l=e.spacingProp?pe(t.props,e.spacingProp):void 0,f=typeof l=="number"?l:0,p=pe(t.props,"align"),d=pe(t.props,"height"),m=p==="center"||typeof d=="number"?".center":".top",g=pe(t.props,"justify"),y=pe(t.props,"flex"),_=pe(t.props,"wrap"),M=t.name==="TableHeader"||t.name==="TableRow"||g!==void 0||typeof y=="number",q=g==="end"?".trailing":g==="center"?".center":".leading",A=[];M&&A.push(`.frame(maxWidth: .infinity, alignment: ${q})`),typeof d=="number"&&A.push(`.frame(height: ${d})`);let T=a;if(g==="between"){let X=t.children.map(fe=>fe.kind==="map"?Li(fe,r+2,i,o):fe.kind==="text"?`${D(r+2)}Text(${JSON.stringify(fe.value)})`:fe.kind==="binding"?`${D(r+2)}Text(${Qe(fe,o,n)})`:i(fe,r+2,n)).filter(Boolean);if(X.length>=2){let fe=X[0],Ie=X.slice(1);T=[fe,`${D(r+2)}Spacer()`,...Ie].join(`
209
+ `)}}else if(_===!0){T=t.children.map(fe=>{if(fe.kind==="map")return Li(fe,r+2,i,o);if(fe.kind==="text")return`${D(r+2)}Text(${JSON.stringify(fe.value)})`;if(fe.kind==="binding")return`${D(r+2)}Text(${Qe(fe,o,n)})`;let Ie=i(fe,r+2,n);return Ie||""}).filter(Boolean).join(`
210
210
  `);let X=`${D(r+1)}FlowLayout(spacing: ${f}) {
211
211
  ${T}
212
212
  ${D(r+1)}}`;return qe(X,[...s,...A],r+1)}let V=`${D(r+1)}HStack(alignment: ${m}, spacing: ${f}) {
@@ -219,7 +219,7 @@ ${D(r+1)}}`;return qe(l,s,r+1)}if(e.container==="field"){let l=pe(t.props,"label
219
219
  ${D(r+2)}Text(${JSON.stringify(l)})
220
220
  ${D(r+2)} .applyVcStyle(VcTheme.resolve("Text", variant: "field-label"))`:"",m=`${D(r+1)}VStack(alignment: .leading, spacing: ${p}) {${d}
221
221
  ${a}
222
- ${D(r+1)}}`;return qe(m,s,r+1)}if(e.container==="tablestack"){let l=pe(t.props,"separator"),f=pe(t.props,"separatorColor"),p=typeof l=="number"&&l>0,d=t.children.map(y=>y.kind==="map"?Li(y,r+2,i,o):i(y,r+2,n)).filter(Boolean),m;if(p){let _=tp(t.name,t.props,o).separatorColor??f,b="Color.gray.opacity(0.2)";if(typeof _=="string"){let A=_.match(/^#([0-9a-fA-F]{6})$/);if(A){let T=parseInt(A[1].slice(0,2),16)/255,V=parseInt(A[1].slice(2,4),16)/255,X=parseInt(A[1].slice(4,6),16)/255;b=`Color(red: ${T}, green: ${V}, blue: ${X})`}}let M=l,q=M===1?`${D(r+2)}Divider().overlay(${b})`:`${D(r+2)}Rectangle().fill(${b}).frame(height: ${M})`;m=d.flatMap((A,T)=>T<d.length-1?[A,q]:[A])}else m=d;let g=`${D(r+1)}VStack(alignment: .leading, spacing: 0) {
222
+ ${D(r+1)}}`;return qe(m,s,r+1)}if(e.container==="tablestack"){let l=pe(t.props,"separator"),f=pe(t.props,"separatorColor"),p=typeof l=="number"&&l>0,d=t.children.map(y=>y.kind==="map"?Li(y,r+2,i,o):i(y,r+2,n)).filter(Boolean),m;if(p){let _=rp(t.name,t.props,o).separatorColor??f,b="Color.gray.opacity(0.2)";if(typeof _=="string"){let A=_.match(/^#([0-9a-fA-F]{6})$/);if(A){let T=parseInt(A[1].slice(0,2),16)/255,V=parseInt(A[1].slice(2,4),16)/255,X=parseInt(A[1].slice(4,6),16)/255;b=`Color(red: ${T}, green: ${V}, blue: ${X})`}}let M=l,q=M===1?`${D(r+2)}Divider().overlay(${b})`:`${D(r+2)}Rectangle().fill(${b}).frame(height: ${M})`;m=d.flatMap((A,T)=>T<d.length-1?[A,q]:[A])}else m=d;let g=`${D(r+1)}VStack(alignment: .leading, spacing: 0) {
223
223
  ${m.join(`
224
224
  `)}
225
225
  ${D(r+1)}}`;return qe(g,s,r+1)}if(e.container==="cellgroup"){let l=pe(t.props,"width"),f=pe(t.props,"flex"),p=pe(t.props,"align"),d=p==="end"?".trailing":p==="center"?".center":".leading",m=typeof f=="number",g=[...s,".lineLimit(1)"];typeof l=="number"?g.push(`.frame(width: ${l}, alignment: ${d})`):m&&g.push(`.frame(maxWidth: .infinity, alignment: ${d})`);let y=a?`${D(r+1)}Group {
@@ -227,17 +227,17 @@ ${a}
227
227
  ${D(r+2)}.frame(maxWidth: .infinity, alignment: ${d})
228
228
  ${D(r+1)}}`:`${D(r+1)}Group { EmptyView() }`;return qe(y,g,r+1)}let c=a?`${D(r+1)}Group {
229
229
  ${a}
230
- ${D(r+1)}}`:`${D(r+1)}Group { EmptyView() }`;return qe(c,s,r+1)}function tp(t,e,r){let n=pe(e,"variant"),i=yv(e);return Vs({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof n=="string"?n:void 0,instanceLiterals:i})}function lP(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 r=t.match(/repeat\(auto-fit,\s*minmax\((\d+)px/);if(r)return{kind:"adaptive",minWidth:Number(r[1])};let n=t.trim().split(/\s+/);return n.length>=2?{kind:"fixed-columns",widths:n}:null}function uP(t,e,r,n,i,o){let s=nP(t.name,t.props,o,n);if(e.leaf)return aP(t,e,r,n,o,s);if(e.container==="group"&&!vv(t.props)){let a=tp(t.name,t.props,o),c=a.display,l=a.gridTemplateColumns,f=a.flexDirection;if(c==="grid"&&l){let p=lP(l);if(p?.kind==="adaptive")return pP(t,r,n,i,o,s,p.minWidth);if(p?.kind==="equal-columns")return fP(t,r,n,i,o,s,p.count);if(p?.kind==="fixed-columns")return hP(t,r,n,i,o,s,p.widths)}if(c==="flex"&&f==="row"){let p=wv(t.children,r+2,i,o,n),d=pe(t.props,"gap"),m=typeof d=="number"?d:typeof a.gap=="number"?a.gap:0,g=`${D(r+1)}HStack(alignment: .top, spacing: ${m}) {
230
+ ${D(r+1)}}`:`${D(r+1)}Group { EmptyView() }`;return qe(c,s,r+1)}function rp(t,e,r){let n=pe(e,"variant"),i=wv(e);return Ls({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof n=="string"?n:void 0,instanceLiterals:i})}function hP(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 r=t.match(/repeat\(auto-fit,\s*minmax\((\d+)px/);if(r)return{kind:"adaptive",minWidth:Number(r[1])};let n=t.trim().split(/\s+/);return n.length>=2?{kind:"fixed-columns",widths:n}:null}function mP(t,e,r,n,i,o){let s=cP(t.name,t.props,o,n);if(e.leaf)return fP(t,e,r,n,o,s);if(e.container==="group"&&!_v(t.props)){let a=rp(t.name,t.props,o),c=a.display,l=a.gridTemplateColumns,f=a.flexDirection;if(c==="grid"&&l){let p=hP(l);if(p?.kind==="adaptive")return gP(t,r,n,i,o,s,p.minWidth);if(p?.kind==="equal-columns")return yP(t,r,n,i,o,s,p.count);if(p?.kind==="fixed-columns")return wP(t,r,n,i,o,s,p.widths)}if(c==="flex"&&f==="row"){let p=bv(t.children,r+2,i,o,n),d=pe(t.props,"gap"),m=typeof d=="number"?d:typeof a.gap=="number"?a.gap:0,g=`${D(r+1)}HStack(alignment: .top, spacing: ${m}) {
231
231
  ${p}
232
- ${D(r+1)}}`;return qe(g,s,r+1)}}if(e.container)return cP(t,e,r,n,i,o,s);throw new Error(`Unsupported SwiftUI element config for ${t.name}`)}function pP(t,e,r,n,i,o,s){let a=pe(t.props,"gap"),c=typeof a=="number"?a:16,l=gv(t.children,e,n,i,r),f=`${D(e+1)}LazyVGrid(columns: [GridItem(.adaptive(minimum: ${s}))], spacing: ${c}) {
232
+ ${D(r+1)}}`;return qe(g,s,r+1)}}if(e.container)return dP(t,e,r,n,i,o,s);throw new Error(`Unsupported SwiftUI element config for ${t.name}`)}function gP(t,e,r,n,i,o,s){let a=pe(t.props,"gap"),c=typeof a=="number"?a:16,l=vv(t.children,e,n,i,r),f=`${D(e+1)}LazyVGrid(columns: [GridItem(.adaptive(minimum: ${s}))], spacing: ${c}) {
233
233
  ${l}
234
234
  ${D(e+1)}}
235
- ${D(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return qe(f,o,e+1)}function fP(t,e,r,n,i,o,s){let a=pe(t.props,"gap"),c=typeof a=="number"?a:16,l=`Array(repeating: GridItem(.flexible(), spacing: ${c}), count: ${s})`,f=gv(t.children,e,n,i,r),p=`${D(e+1)}LazyVGrid(columns: ${l}, spacing: ${c}) {
235
+ ${D(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return qe(f,o,e+1)}function yP(t,e,r,n,i,o,s){let a=pe(t.props,"gap"),c=typeof a=="number"?a:16,l=`Array(repeating: GridItem(.flexible(), spacing: ${c}), count: ${s})`,f=vv(t.children,e,n,i,r),p=`${D(e+1)}LazyVGrid(columns: ${l}, spacing: ${c}) {
236
236
  ${f}
237
237
  ${D(e+1)}}
238
- ${D(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return qe(p,o,e+1)}function dP(t,e){if(t.kind!=="component")return null;let n=tp(t.name,t.props,e).background;if(typeof n!="string"||n==="transparent")return null;let i=n.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(n)})`}function hP(t,e,r,n,i,o,s){let a=t.children,c=[];for(let p=0;p<a.length;p++){let d=a[p],m="";if(d.kind==="map"?m=Li(d,e+2,n,i):d.kind==="text"?m=`${D(e+2)}Text(${JSON.stringify(d.value)})`:d.kind==="binding"?m=`${D(e+2)}Text(${Qe(d,i,r)})`:m=n(d,e+2,r),!m)continue;let g=s[p],y=g?.match(/^(\d+)px$/);if(y){m+=`
238
+ ${D(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return qe(p,o,e+1)}function vP(t,e){if(t.kind!=="component")return null;let n=rp(t.name,t.props,e).background;if(typeof n!="string"||n==="transparent")return null;let i=n.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(n)})`}function wP(t,e,r,n,i,o,s){let a=t.children,c=[];for(let p=0;p<a.length;p++){let d=a[p],m="";if(d.kind==="map"?m=Li(d,e+2,n,i):d.kind==="text"?m=`${D(e+2)}Text(${JSON.stringify(d.value)})`:d.kind==="binding"?m=`${D(e+2)}Text(${Qe(d,i,r)})`:m=n(d,e+2,r),!m)continue;let g=s[p],y=g?.match(/^(\d+)px$/);if(y){m+=`
239
239
  ${D(e+2)}.frame(width: ${Number(y[1])}, alignment: .topLeading)`,m+=`
240
- ${D(e+2)}.frame(maxHeight: .infinity, alignment: .topLeading)`;let _=dP(d,i);_&&(m+=`
240
+ ${D(e+2)}.frame(maxHeight: .infinity, alignment: .topLeading)`;let _=vP(d,i);_&&(m+=`
241
241
  ${D(e+2)}.background(${_})`)}else g==="1fr"&&(m+=`
242
242
  ${D(e+3)}.frame(maxWidth: .infinity, alignment: .topLeading)`,m=`${D(e+2)}ScrollView {
243
243
  ${m}
@@ -245,10 +245,10 @@ ${D(e+2)}}`,m+=`
245
245
  ${D(e+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`);c.push(m)}let l=c.join(`
246
246
  `),f=`${D(e+1)}HStack(spacing: 0) {
247
247
  ${l}
248
- ${D(e+1)}}`;return qe(f,[...o,".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"],e+1)}function mP(t,e,r,n){let i=Object.entries(t.props).map(([s,a])=>typeof a=="object"&&a!==null&&"kind"in a&&a.kind==="binding"?`${s}: ${Qe(a,n,r)}`:`${s}: ${JSON.stringify(a)}`),o=i.length>0?`(${i.join(", ")})`:"()";return`${D(e)}${t.name}${o}`}function gP(t){let e=(r,n,i)=>{if(r.kind==="viewRef")return mP(r,n,i,t);if(r.kind!=="component")return"";if(!t.map.elements[r.name])throw new Error(`Element "${r.name}" is not in SwiftUI element map (prototype subset)`);return uP(r,t.map.elements[r.name],n,i,e,t)};return e}function _v(t,e,r=2){let n=gP(e);if(t.kind!=="component")throw new Error("SwiftUI lowering root must be a component node");return n(t,r)}var bv=K(()=>{"use strict";Vt();dv();hv()});var xv={};Dr(xv,{renderSwiftComponent:()=>js});function Sv(t){let e=t.match(/^(\w+)\[\]$/);return e?`[${Sv(e[1])}]`:t==="string"?"String":t==="number"?"Double":t==="boolean"?"Bool":t}function yP(t){if(!t.propsType)return"";let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?`${e[1].trim().split(",").map(i=>{let o=i.indexOf(":"),s=o>=0?i.slice(0,o).trim():i.trim(),a=o>=0?i.slice(o+1).trim():"Any",c=Sv(a);return` let ${s}: ${c}`}).join(`
248
+ ${D(e+1)}}`;return qe(f,[...o,".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"],e+1)}function _P(t,e,r,n){let i=Object.entries(t.props).map(([s,a])=>typeof a=="object"&&a!==null&&"kind"in a&&a.kind==="binding"?`${s}: ${Qe(a,n,r)}`:`${s}: ${JSON.stringify(a)}`),o=i.length>0?`(${i.join(", ")})`:"()";return`${D(e)}${t.name}${o}`}function bP(t){let e=(r,n,i)=>{if(r.kind==="viewRef")return _P(r,n,i,t);if(r.kind!=="component")return"";if(!t.map.elements[r.name])throw new Error(`Element "${r.name}" is not in SwiftUI element map (prototype subset)`);return mP(r,t.map.elements[r.name],n,i,e,t)};return e}function Sv(t,e,r=2){let n=bP(e);if(t.kind!=="component")throw new Error("SwiftUI lowering root must be a component node");return n(t,r)}var xv=K(()=>{"use strict";Vt();mv();gv()});var kv={};Dr(kv,{renderSwiftComponent:()=>Ds});function $v(t){let e=t.match(/^(\w+)\[\]$/);return e?`[${$v(e[1])}]`:t==="string"?"String":t==="number"?"Double":t==="boolean"?"Bool":t}function SP(t){if(!t.propsType)return"";let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?`${e[1].trim().split(",").map(i=>{let o=i.indexOf(":"),s=o>=0?i.slice(0,o).trim():i.trim(),a=o>=0?i.slice(o+1).trim():"Any",c=$v(a);return` let ${s}: ${c}`}).join(`
249
249
  `)}
250
250
  `:` let props: ${t.propsType}
251
- `}function vP(t){if(!t.propsType)return;let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?e[1].split(",")[0].split(":")[0].trim():void 0}async function js(t,e){let r=await uv(e.elementMapPath),n=e.allowlistExtra??[],i=t.isPartial?t.exportName:t.exportName.replace(/View$/,"")||t.exportName,o={map:r,theme:e.theme,tokens:e.tokens,allowlistExtra:n,propsRoot:vP(t)},s=_v(t.root,o,4),a=yP(t),c=!t.isPartial&&t.viewModel?` let vm: ${t.viewModel}
251
+ `}function xP(t){if(!t.propsType)return;let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?e[1].split(",")[0].split(":")[0].trim():void 0}async function Ds(t,e){let r=await fv(e.elementMapPath),n=e.allowlistExtra??[],i=t.isPartial?t.exportName:t.exportName.replace(/View$/,"")||t.exportName,o={map:r,theme:e.theme,tokens:e.tokens,allowlistExtra:n,propsRoot:xP(t)},s=Sv(t.root,o,4),a=SP(t),c=!t.isPartial&&t.viewModel?` let vm: ${t.viewModel}
252
252
  `:"";return`/**
253
253
  * Auto-generated SwiftUI view from ${t.source}
254
254
  * DO NOT EDIT \u2014 prototype SwiftUI lowering (#21)
@@ -260,10 +260,10 @@ ${c}${a} var body: some View {
260
260
  ${s}
261
261
  }
262
262
  }
263
- `}var rp=K(()=>{"use strict";pv();bv()});import{readFile as wP,stat as _P}from"node:fs/promises";import{resolve as $v}from"node:path";function kv(){return"views/preview"}function np(t){return`${t.charAt(0).toLowerCase()}${t.slice(1)}Mock`}function ip(t,e,r){let n=he(t),i=e.preview?.mocksDir??kv();return $v(n,i,`${r}.mock.yaml`)}function bP(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function SP(t,e){if(!bP(t))throw new Ds(`${e} must be a YAML object (ViewModel fields at the root)`);return t}async function op(t){let e;try{e=await wP(t,"utf-8")}catch{throw new Ds(`Preview mock not found: ${t}`)}let r=ut.load(e);return SP(r,t)}function xP(t,e){let r=np(t);return`/** Auto-built from views/preview/${t}.mock.yaml \u2014 preview / example only */
263
+ `}var np=K(()=>{"use strict";dv();xv()});import{readFile as $P,stat as kP}from"node:fs/promises";import{resolve as Cv}from"node:path";function Ev(){return"views/preview"}function ip(t){return`${t.charAt(0).toLowerCase()}${t.slice(1)}Mock`}function op(t,e,r){let n=he(t),i=e.preview?.mocksDir??Ev();return Cv(n,i,`${r}.mock.yaml`)}function CP(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function EP(t,e){if(!CP(t))throw new qs(`${e} must be a YAML object (ViewModel fields at the root)`);return t}async function sp(t){let e;try{e=await $P(t,"utf-8")}catch{throw new qs(`Preview mock not found: ${t}`)}let r=ut.load(e);return EP(r,t)}function PP(t,e){let r=ip(t);return`/** Auto-built from views/preview/${t}.mock.yaml \u2014 preview / example only */
264
264
  export const ${r} = ${JSON.stringify(e,null,2)};
265
- `}async function Cv(t,e,r){let n=ip(t,e,r),i=await op(n);return xP(r,i)}async function Ev(t,e){let r=he(t),n=e.preview?.mocksDir??kv();return $v(r,n)}async function qs(t){try{return await _P(t),!0}catch{return!1}}var Ds,ji=K(()=>{"use strict";Fr();pt();Ds=class extends Error{constructor(e){super(e),this.name="PreviewMockError"}}});var Iv={};Dr(Iv,{renderSwiftUIRuntime:()=>CP});import{mkdir as $P,writeFile as Ar}from"node:fs/promises";import{resolve as Wt}from"node:path";function Pv(){return Wt(Pe(),"renderers/swiftui/templates")}async function CP(t,e,r,n,i){let o=Wt(e.generated.reactDir,"../swiftui");if(await $P(o,{recursive:!0}),n?await Ar(Wt(o,"VcTheme.swift"),cv(n.theme,n.tokens),"utf-8"):await Ar(Wt(o,"VcTheme.swift"),await vt(Pv(),"VcTheme.swift.hbs",{}),"utf-8"),await Ar(Wt(o,"FlowLayout.swift"),kP,"utf-8"),i&&n){for(let s of i.partials)try{let a=await js(s,{theme:n.theme,tokens:n.tokens}),c=Wt(o,`${s.exportName}.generated.swift`);await Ar(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 r.views){let a=i.screens.get(s.screenName);if(a)try{let c=await js(a,{theme:n.theme,tokens:n.tokens}),l=Wt(o,`${s.screenName}.generated.swift`);await Ar(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 r.views)if(s.targets.includes("swiftui")){let a=Wt(o,`${s.screenName}.swift`);await Ar(a,await vt(Pv(),"Screen.swift.hbs",{screenName:s.screenName}),"utf-8")}for(let s of r.views){let a=ip(t,e,s.screenName);if(await qs(a))try{let c=await op(a),l=JSON.stringify(c,null,2)+`
266
- `,f=Wt(o,`${s.screenName}.SampleData.json`);await Ar(f,l,"utf-8"),console.log(` swiftui/${s.screenName}.SampleData.json \u2192 ${f}`)}catch(c){console.warn(` swiftui/${s.screenName}.SampleData.json: skipped (${c.message})`)}}}var kP,Rv=K(()=>{"use strict";ir();Mi();lv();rp();ji();kP=`import SwiftUI
265
+ `}async function Pv(t,e,r){let n=op(t,e,r),i=await sp(n);return PP(r,i)}async function Rv(t,e){let r=he(t),n=e.preview?.mocksDir??Ev();return Cv(r,n)}async function Fs(t){try{return await kP(t),!0}catch{return!1}}var qs,ji=K(()=>{"use strict";Fr();pt();qs=class extends Error{constructor(e){super(e),this.name="PreviewMockError"}}});var Ov={};Dr(Ov,{renderSwiftUIRuntime:()=>OP});import{mkdir as RP,writeFile as Ar}from"node:fs/promises";import{resolve as Wt}from"node:path";function Iv(){return Wt(Pe(),"renderers/swiftui/templates")}async function OP(t,e,r,n,i){let o=Wt(e.generated.reactDir,"../swiftui");if(await RP(o,{recursive:!0}),n?await Ar(Wt(o,"VcTheme.swift"),uv(n.theme,n.tokens),"utf-8"):await Ar(Wt(o,"VcTheme.swift"),await vt(Iv(),"VcTheme.swift.hbs",{}),"utf-8"),await Ar(Wt(o,"FlowLayout.swift"),IP,"utf-8"),i&&n){for(let s of i.partials)try{let a=await Ds(s,{theme:n.theme,tokens:n.tokens}),c=Wt(o,`${s.exportName}.generated.swift`);await Ar(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 r.views){let a=i.screens.get(s.screenName);if(a)try{let c=await Ds(a,{theme:n.theme,tokens:n.tokens}),l=Wt(o,`${s.screenName}.generated.swift`);await Ar(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 r.views)if(s.targets.includes("swiftui")){let a=Wt(o,`${s.screenName}.swift`);await Ar(a,await vt(Iv(),"Screen.swift.hbs",{screenName:s.screenName}),"utf-8")}for(let s of r.views){let a=op(t,e,s.screenName);if(await Fs(a))try{let c=await sp(a),l=JSON.stringify(c,null,2)+`
266
+ `,f=Wt(o,`${s.screenName}.SampleData.json`);await Ar(f,l,"utf-8"),console.log(` swiftui/${s.screenName}.SampleData.json \u2192 ${f}`)}catch(c){console.warn(` swiftui/${s.screenName}.SampleData.json: skipped (${c.message})`)}}}var IP,Av=K(()=>{"use strict";ir();Mi();pv();np();ji();IP=`import SwiftUI
267
267
 
268
268
  /// CSS flex-wrap equivalent: wraps children to next line when horizontal space runs out.
269
269
  struct FlowLayout: Layout {
@@ -306,12 +306,12 @@ struct FlowLayout: Layout {
306
306
  }
307
307
  }
308
308
  }
309
- `});var Tv={};Dr(Tv,{renderComposeRuntime:()=>PP});import{mkdir as EP,writeFile as Ov}from"node:fs/promises";import{resolve as Fs}from"node:path";function Av(){return Fs(Pe(),"renderers/compose/templates")}async function PP(t,e){let r=Fs(t.generated.reactDir,"../compose");await EP(r,{recursive:!0}),await Ov(Fs(r,"VcTheme.kt"),await vt(Av(),"VcTheme.kt.hbs",{packageName:"generated.compose"}),"utf-8");for(let n of e.views)if(n.targets.includes("compose")){let i=Fs(r,`${n.screenName}Screen.kt`);await Ov(i,await vt(Av(),"Screen.kt.hbs",{screenName:n.screenName,packageName:"generated.compose"}),"utf-8"),console.log(` compose \u2192 ${i}`)}}var Nv=K(()=>{"use strict";ir();Mi()});var Mv={};Dr(Mv,{renderComposeRuntime:()=>NP,renderReactFromIr:()=>IP,renderReactPreviewBundle:()=>RP,renderReactRuntime:()=>OP,renderSwiftComponent:()=>TP,renderSwiftUIRuntime:()=>AP});async function IP(t,e,r){return(await Promise.resolve().then(()=>(Dl(),jl))).renderReactFromIr(t,e,r)}async function RP(t,e,r){return(await Promise.resolve().then(()=>(Dl(),jl))).renderReactPreviewBundle(t,e,r)}async function OP(t,e){return(await Promise.resolve().then(()=>(nv(),rv))).renderReactRuntime(t,e)}async function AP(t,e,r,n,i){return(await Promise.resolve().then(()=>(Rv(),Iv))).renderSwiftUIRuntime(t,e,r,n,i)}async function TP(t,e){return(await Promise.resolve().then(()=>(rp(),xv))).renderSwiftComponent(t,e)}async function NP(t,e){return(await Promise.resolve().then(()=>(Nv(),Tv))).renderComposeRuntime(t,e)}var Vv=K(()=>{"use strict"});import{resolve as Hs}from"node:path";function Cn(){return sp||(sp=Promise.resolve().then(()=>(Vv(),Mv))),sp}function Vi(t){return t??Hs(Pe(),"renderers/react/templates")}function $n(){return Hs(Pe(),"renderers/react/runtime")}function nu(){return Hs($n(),"structural.css")}function Lv(){return Hs(Pe(),"renderers/react/elements.yaml")}var sp,dn=K(()=>{"use strict";ir()});var Cp=ea(kp(),1),{program:vI,createCommand:wI,createArgument:_I,createOption:bI,CommanderError:SI,InvalidArgumentError:xI,InvalidOptionArgumentError:$I,Command:Ep,Argument:kI,Option:CI,Help:EI}=Cp.default;var Pp=`# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json
309
+ `});var Mv={};Dr(Mv,{renderComposeRuntime:()=>TP});import{mkdir as AP,writeFile as Tv}from"node:fs/promises";import{resolve as Hs}from"node:path";function Nv(){return Hs(Pe(),"renderers/compose/templates")}async function TP(t,e){let r=Hs(t.generated.reactDir,"../compose");await AP(r,{recursive:!0}),await Tv(Hs(r,"VcTheme.kt"),await vt(Nv(),"VcTheme.kt.hbs",{packageName:"generated.compose"}),"utf-8");for(let n of e.views)if(n.targets.includes("compose")){let i=Hs(r,`${n.screenName}Screen.kt`);await Tv(i,await vt(Nv(),"Screen.kt.hbs",{screenName:n.screenName,packageName:"generated.compose"}),"utf-8"),console.log(` compose \u2192 ${i}`)}}var Vv=K(()=>{"use strict";ir();Mi()});var Lv={};Dr(Lv,{renderComposeRuntime:()=>DP,renderReactFromIr:()=>NP,renderReactPreviewBundle:()=>MP,renderReactRuntime:()=>VP,renderSwiftComponent:()=>jP,renderSwiftUIRuntime:()=>LP});async function NP(t,e,r){return(await Promise.resolve().then(()=>(ql(),Dl))).renderReactFromIr(t,e,r)}async function MP(t,e,r){return(await Promise.resolve().then(()=>(ql(),Dl))).renderReactPreviewBundle(t,e,r)}async function VP(t,e){return(await Promise.resolve().then(()=>(ov(),iv))).renderReactRuntime(t,e)}async function LP(t,e,r,n,i){return(await Promise.resolve().then(()=>(Av(),Ov))).renderSwiftUIRuntime(t,e,r,n,i)}async function jP(t,e){return(await Promise.resolve().then(()=>(np(),kv))).renderSwiftComponent(t,e)}async function DP(t,e){return(await Promise.resolve().then(()=>(Vv(),Mv))).renderComposeRuntime(t,e)}var jv=K(()=>{"use strict"});import{resolve as Bs}from"node:path";function Cn(){return ap||(ap=Promise.resolve().then(()=>(jv(),Lv))),ap}function Vi(t){return t??Bs(Pe(),"renderers/react/templates")}function $n(){return Bs(Pe(),"renderers/react/runtime")}function iu(){return Bs($n(),"structural.css")}function Dv(){return Bs(Pe(),"renderers/react/elements.yaml")}var ap,dn=K(()=>{"use strict";ir()});var Ep=ta(Cp(),1),{program:xR,createCommand:$R,createArgument:kR,createOption:CR,CommanderError:ER,InvalidArgumentError:PR,InvalidOptionArgumentError:RR,Command:Pp,Argument:IR,Option:OR,Help:AR}=Ep.default;var Rp=`# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json
310
310
  cli_contracts: 0.1.0
311
311
 
312
312
  info:
313
313
  title: view-contracts CLI
314
- version: 0.4.4
314
+ version: 0.4.5
315
315
  description: >-
316
316
  Contract-first UI design toolchain. Compiles restricted view-contract TSX
317
317
  to language-neutral View IR and renders platform targets (React, SwiftUI, Compose).
@@ -514,7 +514,7 @@ command_sets:
514
514
  "cli_contracts": "0.1.0",
515
515
  "info": {
516
516
  "title": "view-contracts CLI",
517
- "version": "0.4.4",
517
+ "version": "0.4.5",
518
518
  "description": "Contract-first UI design toolchain. Compiles restricted view-contract TSX to language-neutral View IR and renders platform targets (React, SwiftUI, Compose)."
519
519
  },
520
520
  "artifact_slots": {
@@ -803,22 +803,22 @@ command_sets:
803
803
  }
804
804
  }
805
805
  }
806
- }`;function Rp(t,e){let r=new Ep;r.name("view-contracts").version(e,"-V, --version").description("View contract compiler and renderer toolchain."),r.command("compile").description("Compile .view.tsx files to View IR.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.compile(o,s.optsWithGlobals())});let n=r.command("render");n.command("react").description("Generate React components from View IR.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.renderReact(o,s.optsWithGlobals())}),n.command("bridge").description("Generate view \u2194 ViewModel bridge registry.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.renderBridge(o,s.optsWithGlobals())}),r.command("build").description("Full view pipeline (compile + render runtime + render react + bridge).").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.build(o,s.optsWithGlobals())});let i=r.command("contracts");return i.command("generate").description("Generate ViewModel types from OpenAPI via micro-contracts.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(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())}),r.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())}),r.command("extract").description("Extract contract specification for this CLI tool.").argument("[commands...]","Command IDs to extract. Use dot notation.").option("-a, --all","Extract all commands.",!1).option("--include-meta","Include extraction metadata.",!0).option("-F, --format <format>","Output format (yaml or json).","yaml").action(async(o,s,a)=>{o.length===0&&!s.all&&(process.stderr.write(JSON.stringify({code:"INVALID_ARGS",message:"Specify command IDs or use --all"})+`
806
+ }`;function Op(t,e){let r=new Pp;r.name("view-contracts").version(e,"-V, --version").description("View contract compiler and renderer toolchain."),r.command("compile").description("Compile .view.tsx files to View IR.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.compile(o,s.optsWithGlobals())});let n=r.command("render");n.command("react").description("Generate React components from View IR.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.renderReact(o,s.optsWithGlobals())}),n.command("bridge").description("Generate view \u2194 ViewModel bridge registry.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.renderBridge(o,s.optsWithGlobals())}),r.command("build").description("Full view pipeline (compile + render runtime + render react + bridge).").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.build(o,s.optsWithGlobals())});let i=r.command("contracts");return i.command("generate").description("Generate ViewModel types from OpenAPI via micro-contracts.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(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())}),r.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())}),r.command("extract").description("Extract contract specification for this CLI tool.").argument("[commands...]","Command IDs to extract. Use dot notation.").option("-a, --all","Extract all commands.",!1).option("--include-meta","Include extraction metadata.",!0).option("-F, --format <format>","Output format (yaml or json).","yaml").action(async(o,s,a)=>{o.length===0&&!s.all&&(process.stderr.write(JSON.stringify({code:"INVALID_ARGS",message:"Specify command IDs or use --all"})+`
807
807
  `),process.exit(2));let c=s.format||"yaml",l=JSON.parse(Ip),f=s.all?[]:o;if(f.length===0)if(c==="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)+`
808
- `)}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(Pp),process.stdout.write(p.join(`
808
+ `)}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(Rp),process.stdout.write(p.join(`
809
809
  `)+`
810
810
  `)}else{let p={cli_contracts:l.cli_contracts,info:l.info,command_sets:{}},d=p.command_sets;for(let[m,g]of Object.entries(l.command_sets??{})){let y=g.commands;if(!y)continue;let _={};for(let[b,M]of Object.entries(y)){let q=m+"."+b;f.some(A=>A===b||A===q||b.startsWith(A+"."))&&(_[b]=M)}if(Object.keys(_).length>0){let b={...g};b.commands=_,d[m]=b}}l.components&&(p.components=l.components),process.stdout.write(JSON.stringify(p,null,2)+`
811
- `)}process.exit(0)}),r}import{writeFile as oI,mkdir as sI}from"node:fs/promises";import{resolve as Et,dirname as Xv,relative as aI}from"node:path";import{spawn as cI}from"node:child_process";import{readFile as Bp}from"node:fs/promises";import{basename as Aw,relative as Up,resolve as Wp}from"node:path";Vt();import{dirname as Mp,resolve as Vp}from"node:path";import N from"typescript";import{readFileSync as _w}from"node:fs";import{resolve as bw}from"node:path";import ae from"typescript";function va(t,e){let r=new Map;for(let n of t.statements){if(!ae.isImportDeclaration(n)||!n.importClause?.namedBindings||!ae.isStringLiteral(n.moduleSpecifier)||!ae.isNamedImports(n.importClause.namedBindings))continue;let i=n.moduleSpecifier.text;i.endsWith(".tsx")||(i=`${i}.tsx`);let o=bw(e,i);for(let s of n.importClause.namedBindings.elements)r.set(s.name.text,o)}return r}function Sw(t){if(ae.isObjectBindingPattern(t.name)){let e=[];for(let r of t.name.elements)ae.isBindingElement(r)&&ae.isIdentifier(r.name)&&e.push(r.name.text);return e}return ae.isIdentifier(t.name)?[t.name.text]:[]}function xw(t){if(!ae.isObjectBindingPattern(t.name)||t.name.elements.length===0)return null;let e=t.name.elements[0];return!ae.isBindingElement(e)||!ae.isIdentifier(e.name)?null:e.name.text}function $w(t){if(ae.isParenthesizedExpression(t))return t.expression;if(ae.isJsxElement(t)||ae.isJsxSelfClosingElement(t)||ae.isJsxFragment(t))return t;if(ae.isBlock(t))for(let e=t.statements.length-1;e>=0;e--){let r=t.statements[e];if(ae.isReturnStatement(r)&&r.expression)return ae.isParenthesizedExpression(r.expression)?r.expression.expression:r.expression}return null}function Tp(t){if(!ae.isIdentifier(t.expression)||t.expression.text!=="view"||t.arguments.length!==1)return null;let e=t.arguments[0];if(!ae.isArrowFunction(e)&&!ae.isFunctionExpression(e))return null;let r="__noop",n=[];if(e.parameters.length===1){let s=xw(e.parameters[0]);if(n=Sw(e.parameters[0]),s)r=s;else if(ae.isIdentifier(e.parameters[0].name))r=e.parameters[0].name.text,n=[r];else return null}else if(e.parameters.length>1)return null;let i=$w(e.body);if(!i)return null;let o;return t.typeArguments&&t.typeArguments.length===1&&(o=t.typeArguments[0].getText()),{paramName:r,jsxRoot:i,propNames:n,propsType:o}}function wa(t,e){let r=null;function n(i){if(ae.isVariableStatement(i))for(let o of i.declarationList.declarations){if(!ae.isIdentifier(o.name)||o.name.text!==e||!o.initializer||!ae.isCallExpression(o.initializer))continue;let s=Tp(o.initializer);s&&(r=s)}if(ae.isExportAssignment(i)&&i.isExportEquals===!1&&i.expression&&ae.isCallExpression(i.expression)){let o=Tp(i.expression);o&&e==="default"&&(r=o)}ae.forEachChild(i,n)}return n(t),r}function Np(t,e){let r=_w(t,"utf-8"),n=ae.createSourceFile(t,r,ae.ScriptTarget.Latest,!0,ae.ScriptKind.TSX);return wa(n,e)}function kw(t,e,r){if("tone"in e){let n=e.tone;delete e.tone,"variant"in e||(e.variant=n),r.warnings.push(`"tone" on <${t}> is deprecated; use variant instead (mapped automatically)`)}if("textStyle"in e){let n=e.textStyle;delete e.textStyle,"variant"in e||(e.variant=n),r.warnings.push(`"textStyle" on <${t}> is deprecated; use variant instead (mapped automatically)`)}}function _a(t){return t.join(".")}function qr(t){let e=t.getText().replace(/\s+/g," ").trim();return e.length>100?`${e.slice(0,97)}...`:e}function Sa(t){if(N.isIdentifier(t))return[t.text];if(N.isPropertyAccessExpression(t)){let e=Sa(t.expression);return e?[...e,t.name.text]:null}return null}function Lp(t,e){if(e.length===0)return t;let r=e.join(".");return{kind:"binding",path:t.path?`${t.path}.${r}`:r,scope:t.scope}}function Tn(t,e){let r=Sa(t);if(!r)return null;if(r[0]in e.propBindings)return Lp(e.propBindings[r[0]],r.slice(1));if(r[0]===e.vmName)return{kind:"binding",path:_a(r.slice(1))};let n=e.scopes[e.scopes.length-1];return n&&r[0]===n?{kind:"binding",path:_a(r.slice(1)),scope:n}:null}function Cw(t,e){let r,n={};for(let i of t.properties){if(!N.isPropertyAssignment(i)||!N.isIdentifier(i.name))continue;let o=i.name.text;if(o==="name"&&N.isStringLiteral(i.initializer)){r=i.initializer.text;continue}if(o==="params"&&N.isObjectLiteralExpression(i.initializer))for(let s of i.initializer.properties){if(!N.isPropertyAssignment(s)||!N.isIdentifier(s.name))continue;let a=io(s.initializer,e);a!==null?n[s.name.text]=a:e.errors.push(`Unsupported action param expression for "${s.name.text}": ${qr(s.initializer)}`)}}return r?Object.keys(n).length>0?{kind:"action",name:r,params:n}:{kind:"action",name:r}:null}function io(t,e){if(N.isStringLiteral(t)||N.isNoSubstitutionTemplateLiteral(t))return t.text;if(t.kind===N.SyntaxKind.TrueKeyword)return!0;if(t.kind===N.SyntaxKind.FalseKeyword)return!1;if(N.isNumericLiteral(t))return Number(t.text);if(t.kind===N.SyntaxKind.NullKeyword)return null;if(N.isTemplateExpression(t)){let n=[];t.head.text&&n.push(t.head.text);for(let i of t.templateSpans){let o=Tn(i.expression,e);if(!o)return null;n.push(o),i.literal.text&&n.push(i.literal.text)}return{kind:"concat",parts:n}}let r=Tn(t,e);if(r)return r;if(N.isObjectLiteralExpression(t)){let n=Cw(t,e);if(n)return n;let i={};for(let o of t.properties){if(!N.isPropertyAssignment(o)||!N.isIdentifier(o.name))continue;let s=io(o.initializer,e);s!==null?i[o.name.text]=s:e.errors.push(`Unsupported object literal property "${o.name.text}": ${qr(o.initializer)}`)}return{kind:"literal",value:i}}if(N.isArrayLiteralExpression(t)){let n=[];for(let i of t.elements){if(!N.isExpression(i))continue;let o=io(i,e);o!==null?n.push(o):e.errors.push(`Unsupported array element expression: ${qr(i)}`)}return n}return null}function Ew(t){return N.isIdentifier(t)?t.text:N.isPropertyAccessExpression(t)&&N.isIdentifier(t.name)?t.name.text:null}function jp(t){return t.getText()}function ba(t,e){let r=[];for(let n of t){if(N.isJsxText(n)){let i=n.getText().trim();i&&r.push({kind:"text",value:i});continue}if(N.isJsxExpression(n)&&n.expression){let i=Tn(n.expression,e);if(i){r.push(i);continue}let o=Dp(n.expression,e);o?Array.isArray(o)?r.push(...o):r.push(o):e.errors.push(`Unsupported JSX child expression: ${qr(n.expression)}`);continue}if(N.isJsxElement(n)||N.isJsxSelfClosingElement(n)){let i=Nn(n,e);i&&r.push(i)}}return r}function Pw(t,e){if(t.length===0)return null;let r=t[0];return r in e.propBindings?Lp(e.propBindings[r],t.slice(1)):r===e.vmName?{kind:"binding",path:_a(t.slice(1))}:null}function Dp(t,e){if(N.isParenthesizedExpression(t))return Dp(t.expression,e);if(N.isCallExpression(t)&&N.isPropertyAccessExpression(t.expression)){let n=Sa(t.expression.expression),i=t.expression.name.text;if(n&&i==="map"&&t.arguments.length>=1){let o=Pw(n,e);if(!o)return null;let s=t.arguments[0];if(!N.isArrowFunction(s)&&!N.isFunctionExpression(s))return e.errors.push("map callback must be an arrow function"),null;let a=s.parameters;if(a.length!==1||!N.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]},f=null,p=N.isParenthesizedExpression(s.body)?s.body.expression:s.body;if(N.isBlock(s.body))return e.errors.push("map callback body must be a JSX expression, not a block"),null;if(N.isJsxElement(p)||N.isJsxSelfClosingElement(p)?f=Nn(p,l):N.isJsxFragment(p)&&(f=xa(p,l)),!f)return null;let d;if(N.isJsxElement(p)||N.isJsxSelfClosingElement(p)){let m=N.isJsxElement(p)?p.openingElement.attributes:p.attributes;for(let g of m.properties)if(!(!N.isJsxAttribute(g)||jp(g.name)!=="key"||!g.initializer)&&N.isJsxExpression(g.initializer)&&g.initializer.expression){let y=Tn(g.initializer.expression,l);y&&(d=y)}}return{kind:"map",source:o,item:c,key:d,body:f}}}if(N.isJsxElement(t)||N.isJsxSelfClosingElement(t))return Nn(t,e);let r=Tn(t,e);return r||null}function xa(t,e){return{kind:"fragment",children:ba(t.children,e)}}function Iw(t,e,r){let n=r.viewImports.get(t);return n?Np(n,t)?{kind:"viewRef",name:t,sourcePath:n,props:e}:(r.errors.push(`View component "${t}" is imported but has no view() export`),null):null}function Nn(t,e){let r=N.isJsxElement(t)?t.openingElement:t,n=Ew(r.tagName);if(!n)return e.errors.push("Unsupported JSX tag expression"),null;let i={};for(let c of r.attributes.properties){if(!N.isJsxAttribute(c))continue;let l=jp(c.name);if(l!=="key"){if(!c.initializer){i[l]=!0;continue}if(N.isStringLiteral(c.initializer)){i[l]=c.initializer.text;continue}if(N.isJsxExpression(c.initializer)&&c.initializer.expression){let f=io(c.initializer.expression,e);f!==null?i[l]=f:e.errors.push(`Unsupported JSX prop expression for "${l}" on <${n}>: ${qr(c.initializer.expression)}`)}}}if(!e.allowedComponents.has(n)){let c=Iw(n,i,e);return c||(e.errors.push(`Component "${n}" is not in the allowed registry`),null)}kw(n,i,e);let o=e;if(n==="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(`<${n} each="${s}"> requires an ancestor <Table source={...}>`),null;delete i.each;let l={...o,scopes:[...o.scopes,s]},f=N.isJsxElement(t)?ba(t.children,l):[];return{kind:"map",source:c,item:s,body:{kind:"component",name:n,props:i,children:f}}}let a=N.isJsxElement(t)?ba(t.children,o):[];return{kind:"component",name:n,props:i,children:a}}function Rw(t){let e=null;function r(n){if(N.isCallExpression(n)&&N.isIdentifier(n.expression)&&n.expression.text==="screen"&&n.arguments.length===1&&(N.isArrowFunction(n.arguments[0])||N.isFunctionExpression(n.arguments[0]))){let i=n.arguments[0],o="unknown";if(n.typeArguments&&n.typeArguments.length===1){let a=n.typeArguments[0];N.isTypeReferenceNode(a)&&N.isIdentifier(a.typeName)&&(o=a.typeName.text)}let s=i.body;if(N.isParenthesizedExpression(s))(N.isJsxElement(s.expression)||N.isJsxSelfClosingElement(s.expression))&&(e={viewModel:o,jsxRoot:s.expression});else if(N.isJsxElement(s)||N.isJsxSelfClosingElement(s))e={viewModel:o,jsxRoot:s};else if(N.isBlock(s)&&s.statements.length===1){let a=s.statements[0];N.isReturnStatement(a)&&a.expression&&(N.isParenthesizedExpression(a.expression)?e={viewModel:o,jsxRoot:a.expression.expression}:e={viewModel:o,jsxRoot:a.expression})}}N.forEachChild(n,r)}return r(t),e}function qp(t,e,r,n={}){let i=new Set(Mt);for(let p of n.allowlistExtra??[])i.add(p);let o=Vp(e),s=Mp(o),a=N.createSourceFile(o,t,N.ScriptTarget.Latest,!0,N.ScriptKind.TSX),c={vmName:"vm",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:va(a,s),allowedComponents:i},l=Rw(a);if(!l)return{viewModel:"unknown",exportName:r,root:{kind:"fragment",children:[]},errors:["No screen<T>() default export found"],warnings:[]};let f=N.isJsxElement(l.jsxRoot)||N.isJsxSelfClosingElement(l.jsxRoot)?Nn(l.jsxRoot,c):N.isJsxFragment(l.jsxRoot)?xa(l.jsxRoot,c):null;return f?{viewModel:l.viewModel,exportName:r,root:f,errors:c.errors,warnings:c.warnings}:(c.errors.push("screen() callback must return a single JSX root element"),{viewModel:l.viewModel,exportName:r,root:{kind:"fragment",children:[]},errors:c.errors,warnings:c.warnings})}function Ow(t,e){let r={...e.propBindings};for(let i of t.propNames)r[i]={kind:"binding",path:"",scope:i};let n={...e,vmName:t.paramName,propBindings:r,scopes:[]};return N.isJsxElement(t.jsxRoot)||N.isJsxSelfClosingElement(t.jsxRoot)?Nn(t.jsxRoot,n):N.isJsxFragment(t.jsxRoot)?xa(t.jsxRoot,n):N.isConditionalExpression(t.jsxRoot)?(e.errors.push("view() partial root must be a JSX element or fragment; conditional expressions are not supported"),null):N.isExpression(t.jsxRoot)?(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported expression: ${qr(t.jsxRoot)}`),null):(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported syntax kind: ${N.SyntaxKind[t.jsxRoot.kind]}`),null)}function Fp(t,e,r,n={}){let i=new Set(Mt);for(let p of n.allowlistExtra??[])i.add(p);let o=Vp(e),s=Mp(o),a=N.createSourceFile(o,t,N.ScriptTarget.Latest,!0,N.ScriptKind.TSX),c=wa(a,r),l={vmName:c?.paramName??"__noop",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:va(a,s),allowedComponents:i};if(!c)return{exportName:r,propNames:[],root:{kind:"fragment",children:[]},errors:[`No view() export "${r}" found in ${e}`],warnings:[]};let f=Ow(c,l);return f?{exportName:r,propsType:c.propsType,propNames:c.propNames,root:f,errors:l.errors,warnings:l.warnings}:{exportName:r,propsType:c.propsType,propNames:c.propNames,root:{kind:"fragment",children:[]},errors:l.errors,warnings:l.warnings}}function $a(t){let e=[];function r(n){if(n.kind==="viewRef"){e.push(n);return}if(n.kind==="component"){for(let i of n.children)r(i);return}if(n.kind==="map"){r(n.body);return}if(n.kind==="fragment")for(let i of n.children)r(i)}return r(t),e}function Hp(t){return`${t.sourcePath}:${t.name}`}Vt();function ka(t,e){let r=[],n=[],i=o=>{if(o.kind!=="viewRef"){if(o.kind==="component"){!Mt.has(o.name)&&!(o.name in e.extensions)&&r.push(`Extension component "${o.name}" is not registered in extensions.yaml`);for(let s of o.children)i(s);return}if(o.kind==="map"){i(o.body);return}if(o.kind==="fragment")for(let s of o.children)i(s)}};return i(t),{errors:r,warnings:n}}async function Tw(t,e,r){let n=await Bp(t,"utf-8"),i=Fp(n,t,e,{allowlistExtra:r.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t} (${e}):
811
+ `)}process.exit(0)}),r}import{writeFile as uR,mkdir as pR}from"node:fs/promises";import{resolve as Pt,dirname as Zv,relative as fR}from"node:path";import{spawn as dR}from"node:child_process";import{readFile as Wp}from"node:fs/promises";import{basename as Lw,relative as Gp,resolve as zp}from"node:path";Vt();import{dirname as Vp,resolve as Lp}from"node:path";import N from"typescript";import{readFileSync as Sw}from"node:fs";import{resolve as xw}from"node:path";import ae from"typescript";function wa(t,e){let r=new Map;for(let n of t.statements){if(!ae.isImportDeclaration(n)||!n.importClause?.namedBindings||!ae.isStringLiteral(n.moduleSpecifier)||!ae.isNamedImports(n.importClause.namedBindings))continue;let i=n.moduleSpecifier.text;i.endsWith(".tsx")||(i=`${i}.tsx`);let o=xw(e,i);for(let s of n.importClause.namedBindings.elements)r.set(s.name.text,o)}return r}function $w(t){if(ae.isObjectBindingPattern(t.name)){let e=[];for(let r of t.name.elements)ae.isBindingElement(r)&&ae.isIdentifier(r.name)&&e.push(r.name.text);return e}return ae.isIdentifier(t.name)?[t.name.text]:[]}function kw(t){if(!ae.isObjectBindingPattern(t.name)||t.name.elements.length===0)return null;let e=t.name.elements[0];return!ae.isBindingElement(e)||!ae.isIdentifier(e.name)?null:e.name.text}function Cw(t){if(ae.isParenthesizedExpression(t))return t.expression;if(ae.isJsxElement(t)||ae.isJsxSelfClosingElement(t)||ae.isJsxFragment(t))return t;if(ae.isBlock(t))for(let e=t.statements.length-1;e>=0;e--){let r=t.statements[e];if(ae.isReturnStatement(r)&&r.expression)return ae.isParenthesizedExpression(r.expression)?r.expression.expression:r.expression}return null}function Np(t){if(!ae.isIdentifier(t.expression)||t.expression.text!=="view"||t.arguments.length!==1)return null;let e=t.arguments[0];if(!ae.isArrowFunction(e)&&!ae.isFunctionExpression(e))return null;let r="__noop",n=[];if(e.parameters.length===1){let s=kw(e.parameters[0]);if(n=$w(e.parameters[0]),s)r=s;else if(ae.isIdentifier(e.parameters[0].name))r=e.parameters[0].name.text,n=[r];else return null}else if(e.parameters.length>1)return null;let i=Cw(e.body);if(!i)return null;let o;return t.typeArguments&&t.typeArguments.length===1&&(o=t.typeArguments[0].getText()),{paramName:r,jsxRoot:i,propNames:n,propsType:o}}function _a(t,e){let r=null;function n(i){if(ae.isVariableStatement(i))for(let o of i.declarationList.declarations){if(!ae.isIdentifier(o.name)||o.name.text!==e||!o.initializer||!ae.isCallExpression(o.initializer))continue;let s=Np(o.initializer);s&&(r=s)}if(ae.isExportAssignment(i)&&i.isExportEquals===!1&&i.expression&&ae.isCallExpression(i.expression)){let o=Np(i.expression);o&&e==="default"&&(r=o)}ae.forEachChild(i,n)}return n(t),r}function Mp(t,e){let r=Sw(t,"utf-8"),n=ae.createSourceFile(t,r,ae.ScriptTarget.Latest,!0,ae.ScriptKind.TSX);return _a(n,e)}function Ew(t,e,r){if("tone"in e){let n=e.tone;delete e.tone,"variant"in e||(e.variant=n),r.warnings.push(`"tone" on <${t}> is deprecated; use variant instead (mapped automatically)`)}if("textStyle"in e){let n=e.textStyle;delete e.textStyle,"variant"in e||(e.variant=n),r.warnings.push(`"textStyle" on <${t}> is deprecated; use variant instead (mapped automatically)`)}}function ba(t){return t.join(".")}function qr(t){let e=t.getText().replace(/\s+/g," ").trim();return e.length>100?`${e.slice(0,97)}...`:e}function xa(t){if(N.isIdentifier(t))return[t.text];if(N.isPropertyAccessExpression(t)){let e=xa(t.expression);return e?[...e,t.name.text]:null}return null}function jp(t,e){if(e.length===0)return t;let r=e.join(".");return{kind:"binding",path:t.path?`${t.path}.${r}`:r,scope:t.scope}}function Tn(t,e){let r=xa(t);if(!r)return null;if(r[0]in e.propBindings)return jp(e.propBindings[r[0]],r.slice(1));if(r[0]===e.vmName)return{kind:"binding",path:ba(r.slice(1))};let n=e.scopes[e.scopes.length-1];return n&&r[0]===n?{kind:"binding",path:ba(r.slice(1)),scope:n}:null}function Pw(t,e){let r,n={};for(let i of t.properties){if(!N.isPropertyAssignment(i)||!N.isIdentifier(i.name))continue;let o=i.name.text;if(o==="name"&&N.isStringLiteral(i.initializer)){r=i.initializer.text;continue}if(o==="params"&&N.isObjectLiteralExpression(i.initializer))for(let s of i.initializer.properties){if(!N.isPropertyAssignment(s)||!N.isIdentifier(s.name))continue;let a=io(s.initializer,e);a!==null?n[s.name.text]=a:e.errors.push(`Unsupported action param expression for "${s.name.text}": ${qr(s.initializer)}`)}}return r?Object.keys(n).length>0?{kind:"action",name:r,params:n}:{kind:"action",name:r}:null}function io(t,e){if(N.isStringLiteral(t)||N.isNoSubstitutionTemplateLiteral(t))return t.text;if(t.kind===N.SyntaxKind.TrueKeyword)return!0;if(t.kind===N.SyntaxKind.FalseKeyword)return!1;if(N.isNumericLiteral(t))return Number(t.text);if(t.kind===N.SyntaxKind.NullKeyword)return null;if(N.isTemplateExpression(t)){let n=[];t.head.text&&n.push(t.head.text);for(let i of t.templateSpans){let o=Tn(i.expression,e);if(!o)return null;n.push(o),i.literal.text&&n.push(i.literal.text)}return{kind:"concat",parts:n}}let r=Tn(t,e);if(r)return r;if(N.isObjectLiteralExpression(t)){let n=Pw(t,e);if(n)return n;let i={};for(let o of t.properties){if(!N.isPropertyAssignment(o)||!N.isIdentifier(o.name))continue;let s=io(o.initializer,e);s!==null?i[o.name.text]=s:e.errors.push(`Unsupported object literal property "${o.name.text}": ${qr(o.initializer)}`)}return{kind:"literal",value:i}}if(N.isArrayLiteralExpression(t)){let n=[];for(let i of t.elements){if(!N.isExpression(i))continue;let o=io(i,e);o!==null?n.push(o):e.errors.push(`Unsupported array element expression: ${qr(i)}`)}return n}return null}function Rw(t){return N.isIdentifier(t)?t.text:N.isPropertyAccessExpression(t)&&N.isIdentifier(t.name)?t.name.text:null}function Dp(t){return t.getText()}function Sa(t,e){let r=[];for(let n of t){if(N.isJsxText(n)){let i=n.getText().trim();i&&r.push({kind:"text",value:i});continue}if(N.isJsxExpression(n)&&n.expression){let i=Tn(n.expression,e);if(i){r.push(i);continue}let o=qp(n.expression,e);o?Array.isArray(o)?r.push(...o):r.push(o):e.errors.push(`Unsupported JSX child expression: ${qr(n.expression)}`);continue}if(N.isJsxElement(n)||N.isJsxSelfClosingElement(n)){let i=Nn(n,e);i&&r.push(i)}}return r}function Iw(t,e){if(t.length===0)return null;let r=t[0];return r in e.propBindings?jp(e.propBindings[r],t.slice(1)):r===e.vmName?{kind:"binding",path:ba(t.slice(1))}:null}function qp(t,e){if(N.isParenthesizedExpression(t))return qp(t.expression,e);if(N.isCallExpression(t)&&N.isPropertyAccessExpression(t.expression)){let n=xa(t.expression.expression),i=t.expression.name.text;if(n&&i==="map"&&t.arguments.length>=1){let o=Iw(n,e);if(!o)return null;let s=t.arguments[0];if(!N.isArrowFunction(s)&&!N.isFunctionExpression(s))return e.errors.push("map callback must be an arrow function"),null;let a=s.parameters;if(a.length!==1||!N.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]},f=null,p=N.isParenthesizedExpression(s.body)?s.body.expression:s.body;if(N.isBlock(s.body))return e.errors.push("map callback body must be a JSX expression, not a block"),null;if(N.isJsxElement(p)||N.isJsxSelfClosingElement(p)?f=Nn(p,l):N.isJsxFragment(p)&&(f=$a(p,l)),!f)return null;let d;if(N.isJsxElement(p)||N.isJsxSelfClosingElement(p)){let m=N.isJsxElement(p)?p.openingElement.attributes:p.attributes;for(let g of m.properties)if(!(!N.isJsxAttribute(g)||Dp(g.name)!=="key"||!g.initializer)&&N.isJsxExpression(g.initializer)&&g.initializer.expression){let y=Tn(g.initializer.expression,l);y&&(d=y)}}return{kind:"map",source:o,item:c,key:d,body:f}}}if(N.isJsxElement(t)||N.isJsxSelfClosingElement(t))return Nn(t,e);let r=Tn(t,e);return r||null}function $a(t,e){return{kind:"fragment",children:Sa(t.children,e)}}function Ow(t,e,r){let n=r.viewImports.get(t);return n?Mp(n,t)?{kind:"viewRef",name:t,sourcePath:n,props:e}:(r.errors.push(`View component "${t}" is imported but has no view() export`),null):null}function Nn(t,e){let r=N.isJsxElement(t)?t.openingElement:t,n=Rw(r.tagName);if(!n)return e.errors.push("Unsupported JSX tag expression"),null;let i={};for(let c of r.attributes.properties){if(!N.isJsxAttribute(c))continue;let l=Dp(c.name);if(l!=="key"){if(!c.initializer){i[l]=!0;continue}if(N.isStringLiteral(c.initializer)){i[l]=c.initializer.text;continue}if(N.isJsxExpression(c.initializer)&&c.initializer.expression){let f=io(c.initializer.expression,e);f!==null?i[l]=f:e.errors.push(`Unsupported JSX prop expression for "${l}" on <${n}>: ${qr(c.initializer.expression)}`)}}}if(!e.allowedComponents.has(n)){let c=Ow(n,i,e);return c||(e.errors.push(`Component "${n}" is not in the allowed registry`),null)}Ew(n,i,e);let o=e;if(n==="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(`<${n} each="${s}"> requires an ancestor <Table source={...}>`),null;delete i.each;let l={...o,scopes:[...o.scopes,s]},f=N.isJsxElement(t)?Sa(t.children,l):[];return{kind:"map",source:c,item:s,body:{kind:"component",name:n,props:i,children:f}}}let a=N.isJsxElement(t)?Sa(t.children,o):[];return{kind:"component",name:n,props:i,children:a}}function Aw(t){let e=null;function r(n){if(N.isCallExpression(n)&&N.isIdentifier(n.expression)&&n.expression.text==="screen"&&n.arguments.length===1&&(N.isArrowFunction(n.arguments[0])||N.isFunctionExpression(n.arguments[0]))){let i=n.arguments[0],o="unknown";if(n.typeArguments&&n.typeArguments.length===1){let a=n.typeArguments[0];N.isTypeReferenceNode(a)&&N.isIdentifier(a.typeName)&&(o=a.typeName.text)}let s=i.body;if(N.isParenthesizedExpression(s))(N.isJsxElement(s.expression)||N.isJsxSelfClosingElement(s.expression))&&(e={viewModel:o,jsxRoot:s.expression});else if(N.isJsxElement(s)||N.isJsxSelfClosingElement(s))e={viewModel:o,jsxRoot:s};else if(N.isBlock(s)&&s.statements.length===1){let a=s.statements[0];N.isReturnStatement(a)&&a.expression&&(N.isParenthesizedExpression(a.expression)?e={viewModel:o,jsxRoot:a.expression.expression}:e={viewModel:o,jsxRoot:a.expression})}}N.forEachChild(n,r)}return r(t),e}function Fp(t,e,r,n={}){let i=new Set(wt);for(let p of n.allowlistExtra??[])i.add(p);let o=Lp(e),s=Vp(o),a=N.createSourceFile(o,t,N.ScriptTarget.Latest,!0,N.ScriptKind.TSX),c={vmName:"vm",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:wa(a,s),allowedComponents:i},l=Aw(a);if(!l)return{viewModel:"unknown",exportName:r,root:{kind:"fragment",children:[]},errors:["No screen<T>() default export found"],warnings:[]};let f=N.isJsxElement(l.jsxRoot)||N.isJsxSelfClosingElement(l.jsxRoot)?Nn(l.jsxRoot,c):N.isJsxFragment(l.jsxRoot)?$a(l.jsxRoot,c):null;return f?{viewModel:l.viewModel,exportName:r,root:f,errors:c.errors,warnings:c.warnings}:(c.errors.push("screen() callback must return a single JSX root element"),{viewModel:l.viewModel,exportName:r,root:{kind:"fragment",children:[]},errors:c.errors,warnings:c.warnings})}function Tw(t,e){let r={...e.propBindings};for(let i of t.propNames)r[i]={kind:"binding",path:"",scope:i};let n={...e,vmName:t.paramName,propBindings:r,scopes:[]};return N.isJsxElement(t.jsxRoot)||N.isJsxSelfClosingElement(t.jsxRoot)?Nn(t.jsxRoot,n):N.isJsxFragment(t.jsxRoot)?$a(t.jsxRoot,n):N.isConditionalExpression(t.jsxRoot)?(e.errors.push("view() partial root must be a JSX element or fragment; conditional expressions are not supported"),null):N.isExpression(t.jsxRoot)?(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported expression: ${qr(t.jsxRoot)}`),null):(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported syntax kind: ${N.SyntaxKind[t.jsxRoot.kind]}`),null)}function Hp(t,e,r,n={}){let i=new Set(wt);for(let p of n.allowlistExtra??[])i.add(p);let o=Lp(e),s=Vp(o),a=N.createSourceFile(o,t,N.ScriptTarget.Latest,!0,N.ScriptKind.TSX),c=_a(a,r),l={vmName:c?.paramName??"__noop",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:wa(a,s),allowedComponents:i};if(!c)return{exportName:r,propNames:[],root:{kind:"fragment",children:[]},errors:[`No view() export "${r}" found in ${e}`],warnings:[]};let f=Tw(c,l);return f?{exportName:r,propsType:c.propsType,propNames:c.propNames,root:f,errors:l.errors,warnings:l.warnings}:{exportName:r,propsType:c.propsType,propNames:c.propNames,root:{kind:"fragment",children:[]},errors:l.errors,warnings:l.warnings}}function ka(t){let e=[];function r(n){if(n.kind==="viewRef"){e.push(n);return}if(n.kind==="component"){for(let i of n.children)r(i);return}if(n.kind==="map"){r(n.body);return}if(n.kind==="fragment")for(let i of n.children)r(i)}return r(t),e}function Bp(t){return`${t.sourcePath}:${t.name}`}Vt();var Nw=new Set(["swiftui","compose"]),Mw=new Set(["action"]);function Vw(t,e){return!wt.has(t)&&t in e.extensions}function Ca(t){return t?` (${t})`:""}function oo(t,e,r={}){let n=[],i=[],o=r.targets??[],s=o.some(c=>Nw.has(c)),a=c=>{if(c.kind!=="viewRef"){if(c.kind==="component"){if(!wt.has(c.name)&&!(c.name in e.extensions))n.push(`Extension component "${c.name}" is not registered in extensions.yaml${Ca(r.source)}`);else if(Vw(c.name,e)){let l=e.extensions[c.name];s&&l.renderer==="react-only"&&n.push(`Extension "${c.name}" is react-only but binding targets include native renderer(s): ${o.join(", ")}${Ca(r.source)}`);for(let f of Object.keys(c.props))f in l.properties||Mw.has(f)||n.push(`Extension "${c.name}" does not accept property "${f}"${Ca(r.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:n,warnings:i}}function Up(t,e,r,n,i){let o=[],s=[],a=oo(t,r,{targets:n,source:i.screen});o.push(...a.errors),s.push(...a.warnings);for(let c=0;c<e.length;c++){let l=oo(e[c],r,{targets:n,source:i.partials[c]});o.push(...l.errors),s.push(...l.warnings)}return{errors:o,warnings:s}}async function jw(t,e,r){let n=await Wp(t,"utf-8"),i=Hp(n,t,e,{allowlistExtra:r.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t} (${e}):
812
812
  ${i.errors.map(o=>` - ${o}`).join(`
813
- `)}`);if(r.extensionRegistry){let o=ka(i.root,r.extensionRegistry);if(o.errors.length>0)throw new Error(`Extension validation errors in ${t} (${e}):
813
+ `)}`);if(r.extensionRegistry){let o=oo(i.root,r.extensionRegistry,{targets:r.targets,source:t});if(o.errors.length>0)throw new Error(`Extension validation errors in ${t} (${e}):
814
814
  ${o.errors.map(s=>` - ${s}`).join(`
815
- `)}`);i.warnings.push(...o.warnings)}for(let o of i.warnings)console.warn(`Warning in ${t} (${e}): ${o}`);return{version:1,source:Up(process.cwd(),Wp(t)),viewModel:i.propsType??"Record<string, unknown>",exportName:i.exportName,root:i.root,isPartial:!0,propsType:i.propsType}}async function Nw(t,e){let r=new Map,n=$a(t);for(;n.length>0;){let i=n.shift(),o=Hp(i);if(r.has(o))continue;let s=await Tw(i.sourcePath,i.name,e);r.set(o,s),n.push(...$a(s.root))}return[...r.values()]}async function Ca(t,e={}){let r=await Bp(t.sourcePath,"utf-8"),n=t.exportName??Aw(t.sourcePath,".view.tsx"),i=qp(r,t.sourcePath,n,{allowlistExtra:e.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t.sourcePath}:
815
+ `)}`);i.warnings.push(...o.warnings)}for(let o of i.warnings)console.warn(`Warning in ${t} (${e}): ${o}`);return{version:1,source:Gp(process.cwd(),zp(t)),viewModel:i.propsType??"Record<string, unknown>",exportName:i.exportName,root:i.root,isPartial:!0,propsType:i.propsType}}async function Dw(t,e){let r=new Map,n=ka(t);for(;n.length>0;){let i=n.shift(),o=Bp(i);if(r.has(o))continue;let s=await jw(i.sourcePath,i.name,e);r.set(o,s),n.push(...ka(s.root))}return[...r.values()]}async function Ea(t,e={}){let r=await Wp(t.sourcePath,"utf-8"),n=t.exportName??Lw(t.sourcePath,".view.tsx"),i=Fp(r,t.sourcePath,n,{allowlistExtra:e.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t.sourcePath}:
816
816
  ${i.errors.map(a=>` - ${a}`).join(`
817
- `)}`);if(e.extensionRegistry){let a=ka(i.root,e.extensionRegistry);if(a.errors.length>0)throw new Error(`Extension validation errors in ${t.sourcePath}:
817
+ `)}`);let o={version:1,source:Gp(process.cwd(),zp(t.sourcePath)),viewModel:i.viewModel,exportName:i.exportName,root:i.root},s=await Dw(o.root,{...e,targets:t.targets??e.targets});if(e.extensionRegistry){let a=Up(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}:
818
818
  ${a.errors.map(c=>` - ${c}`).join(`
819
- `)}`);i.warnings.push(...a.warnings)}for(let a of i.warnings)console.warn(`Warning in ${t.sourcePath}: ${a}`);let o={version:1,source:Up(process.cwd(),Wp(t.sourcePath)),viewModel:i.viewModel,exportName:i.exportName,root:i.root},s=await Nw(o.root,e);return{screen:o,partials:s}}async function Gp(t,e={}){let r=[],n=new Map;for(let i of t){let o=await Ca(i,e);r.push(o.screen);for(let s of o.partials){let a=`${s.source}:${s.exportName}`;n.set(a,s)}}return{screens:r,partials:[...n.values()]}}pt();import{relative as Jw}from"node:path";function gf(t,e){return Jw(t,e).split("\\").join("/")}var vm=ea(ym(),1);Fr();ir();import{readFile as wm}from"node:fs/promises";import{resolve as _m}from"node:path";var Vx=vm.default,Lx=_m(Pe(),"spec/ui-dsl-extensions.meta.json"),Do;async function jx(){if(Do)return Do;let t=JSON.parse(await wm(Lx,"utf-8"));return Do=new Vx({allErrors:!0,strict:!1}).compile(t),Do}async function qo(t){if(!t)return{extensions:{}};let e=_m(t),r=await wm(e,"utf-8"),n=ut.load(r),i=await jx();if(!i(n)){let o=i.errors?.map(s=>`${s.instancePath||"/"} ${s.message??""}`).join("; ")??"unknown";throw new Error(`Extension registry validation failed (${e}): ${o}`)}return n}dn();import{resolve as MP}from"node:path";async function ap(t,e,r){return(await Cn()).renderReactFromIr(t,e,r)}async function jv(t,e,r){return(await Cn()).renderReactPreviewBundle(t,e,r)}function Dv(t,e){return MP(t,"components",`${e.exportName}.generated.tsx`)}async function qv(t,e){return(await Cn()).renderReactRuntime(t,e)}async function Fv(t,e,r,n,i){return(await Cn()).renderSwiftUIRuntime(t,e,r,n,i)}async function Hv(t,e){return(await Cn()).renderComposeRuntime(t,e)}Xo();Vt();function VP(t){let e=to[t];return e?e.lowering==="inline-css"||e.lowering==="class-name":!1}function Di(t,e,r,n){if(t.kind==="component"){let{name:i,props:o}=t;if(r.has(i)||!Mt.has(i)){for(let s of t.children)Di(s,e,r,n);return}for(let s of Object.keys(o))VP(s)&&(Ap(s,i)||n.push(`${e}: <${i}> does not accept property "${s}"`));for(let s of t.children)Di(s,e,r,n);return}if(t.kind==="map"){Di(t.body,e,r,n);return}if(t.kind==="fragment"){for(let i of t.children)Di(i,e,r,n);return}}async function Bs(t,e=[]){let r=new Set(e),n=[];for(let i of t)Di(i.root,i.source,r,n);if(n.length>0)throw new Error(`View property validation failed:
819
+ `)}`);i.warnings.push(...a.warnings)}for(let a of i.warnings)console.warn(`Warning in ${t.sourcePath}: ${a}`);return{screen:o,partials:s}}async function Jp(t,e={}){let r=[],n=new Map;for(let i of t){let o=await Ea(i,e);r.push(o.screen);for(let s of o.partials){let a=`${s.source}:${s.exportName}`;n.set(a,s)}}return{screens:r,partials:[...n.values()]}}pt();import{relative as Zw}from"node:path";function vf(t,e){return Zw(t,e).split("\\").join("/")}var _m=ta(wm(),1);Fr();ir();import{readFile as bm}from"node:fs/promises";import{resolve as Sm}from"node:path";var Fx=_m.default,Hx=Sm(Pe(),"spec/ui-dsl-extensions.meta.json"),qo;async function Bx(){if(qo)return qo;let t=JSON.parse(await bm(Hx,"utf-8"));return qo=new Fx({allErrors:!0,strict:!1}).compile(t),qo}async function Fo(t){if(!t)return{extensions:{}};let e=Sm(t),r=await bm(e,"utf-8"),n=ut.load(r),i=await Bx();if(!i(n)){let o=i.errors?.map(s=>`${s.instancePath||"/"} ${s.message??""}`).join("; ")??"unknown";throw new Error(`Extension registry validation failed (${e}): ${o}`)}return n}dn();import{resolve as qP}from"node:path";async function cp(t,e,r){return(await Cn()).renderReactFromIr(t,e,r)}async function qv(t,e,r){return(await Cn()).renderReactPreviewBundle(t,e,r)}function Fv(t,e){return qP(t,"components",`${e.exportName}.generated.tsx`)}async function Hv(t,e){return(await Cn()).renderReactRuntime(t,e)}async function Bv(t,e,r,n,i){return(await Cn()).renderSwiftUIRuntime(t,e,r,n,i)}async function Uv(t,e){return(await Cn()).renderComposeRuntime(t,e)}Qo();Vt();function FP(t){let e=to[t];return e?e.lowering==="inline-css"||e.lowering==="class-name":!1}function Di(t,e,r,n){if(t.kind==="component"){let{name:i,props:o}=t;if(r.has(i)||!wt.has(i)){for(let s of t.children)Di(s,e,r,n);return}for(let s of Object.keys(o))FP(s)&&(Tp(s,i)||n.push(`${e}: <${i}> does not accept property "${s}"`));for(let s of t.children)Di(s,e,r,n);return}if(t.kind==="map"){Di(t.body,e,r,n);return}if(t.kind==="fragment"){for(let i of t.children)Di(i,e,r,n);return}}async function Us(t,e=[]){let r=new Set(e),n=[];for(let i of t)Di(i.root,i.source,r,n);if(n.length>0)throw new Error(`View property validation failed:
820
820
  ${n.map(i=>` - ${i}`).join(`
821
- `)}`)}pt();import{access as LP,writeFile as ar,mkdir as Us}from"node:fs/promises";import{resolve as Ct,dirname as Bv}from"node:path";async function cp(t){try{return await LP(t),!0}catch{return!1}}var En={preview:5173,app:5174,built:4174},jP=`{
821
+ `)}`)}pt();import{access as HP,writeFile as ar,mkdir as Ws}from"node:fs/promises";import{resolve as Et,dirname as Wv}from"node:path";async function lp(t){try{return await HP(t),!0}catch{return!1}}var En={preview:5173,app:5174,built:4174},BP=`{
822
822
  "name": "admin-dashboard",
823
823
  "private": true,
824
824
  "type": "module",
@@ -843,8 +843,8 @@ ${n.map(i=>` - ${i}`).join(`
843
843
  "vite": "^6.4.1"
844
844
  }
845
845
  }
846
- `,DP=`import '../src/main.tsx';
847
- `,qP=`<!doctype html>
846
+ `,UP=`import '../src/main.tsx';
847
+ `,WP=`<!doctype html>
848
848
  <html lang="en">
849
849
  <head>
850
850
  <meta charset="UTF-8" />
@@ -856,7 +856,7 @@ ${n.map(i=>` - ${i}`).join(`
856
856
  <script type="module" src="./app-main.tsx"></script>
857
857
  </body>
858
858
  </html>
859
- `;function FP(t){let r=t.views.filter(s=>s.targets.includes("react"))[0];if(!r)throw new Error("No react target views in bindings \u2014 cannot scaffold app entry.");let n=r.screenName,i=r.viewModel,o=`${n.charAt(0).toLowerCase()}${n.slice(1)}Mock`;return`import React from 'react';
859
+ `;function GP(t){let r=t.views.filter(s=>s.targets.includes("react"))[0];if(!r)throw new Error("No react target views in bindings \u2014 cannot scaffold app entry.");let n=r.screenName,i=r.viewModel,o=`${n.charAt(0).toLowerCase()}${n.slice(1)}Mock`;return`import React from 'react';
860
860
  import ReactDOM from 'react-dom/client';
861
861
  import '../generated/react/theme.css';
862
862
  import type { ${i} } from '../contracts/view-models';
@@ -874,21 +874,21 @@ ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
874
874
  <${n} vm={vm} />
875
875
  </React.StrictMode>,
876
876
  );
877
- `}var HP=`/** Hand-written action handlers \u2014 edit src/runtime/handlers.ts */
877
+ `}var zP=`/** Hand-written action handlers \u2014 edit src/runtime/handlers.ts */
878
878
  import type { DispatchableAction } from './types.js';
879
879
 
880
880
  export async function handleAppAction(action: DispatchableAction): Promise<void> {
881
881
  console.log('[app action]', action);
882
882
  }
883
- `;function BP(){return`/** Fixed dev server ports \u2014 single source of truth for this example. */
883
+ `;function JP(){return`/** Fixed dev server ports \u2014 single source of truth for this example. */
884
884
  export const PREVIEW_PORT = ${En.preview};
885
885
  export const APP_PORT = ${En.app};
886
886
  export const BUILT_PORT = ${En.built};
887
- `}function UP(){return`# Fixed dev server ports \u2014 keep in sync with dev.ports.ts
887
+ `}function KP(){return`# Fixed dev server ports \u2014 keep in sync with dev.ports.ts
888
888
  PREVIEW_PORT=${En.preview}
889
889
  APP_PORT=${En.app}
890
890
  BUILT_PORT=${En.built}
891
- `}function WP(){return`import { defineConfig } from 'vite';
891
+ `}function YP(){return`import { defineConfig } from 'vite';
892
892
  import react from '@vitejs/plugin-react';
893
893
  import path from 'node:path';
894
894
  import { fileURLToPath } from 'node:url';
@@ -925,8 +925,8 @@ export default defineConfig({
925
925
  },
926
926
  },
927
927
  });
928
- `}async function Uv(t,e,r){let n=he(t),i=Ct(n,".vite");await Us(i,{recursive:!0});let o=Ct(n,"package.json");await cp(o)||await ar(o,`${jP}
929
- `,"utf-8"),await ar(Ct(i,"index.html"),qP,"utf-8"),await ar(Ct(i,"app-main.tsx"),DP,"utf-8"),await ar(Ct(i,"vite.config.ts"),WP(),"utf-8"),await ar(Ct(n,"dev.ports.ts"),BP(),"utf-8");let s=Ct(n,"scripts");await Us(s,{recursive:!0}),await ar(Ct(s,"ports.sh"),UP(),"utf-8");let a=Ct(n,"src/main.tsx");await cp(a)||(await Us(Bv(a),{recursive:!0}),await ar(a,FP(r),"utf-8"));let c=Ct(n,"src/runtime/handlers.ts");await cp(c)||(await Us(Bv(c),{recursive:!0}),await ar(c,HP,"utf-8")),console.log(` scaffold \u2192 ${i}/`)}pt();ji();dn();import{createServer as tI}from"node:http";import{watch as rI}from"node:fs";import{resolve as Tr}from"node:path";pt();Qo();ir();dn();import{mkdir as JP,writeFile as lp}from"node:fs/promises";import{tmpdir as KP}from"node:os";import{join as Gs,resolve as Gt}from"node:path";import{build as YP}from"esbuild";import{resolve as GP}from"node:path";pt();Xo();var Ws={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 zP(t){if(!t.extensions)return{allowlistExtra:t.allowlistExtra??[]};let e=await qo(t.extensions),r=[...new Set([...t.allowlistExtra??[],...Object.keys(e.extensions)])];return{extensionRegistry:e,allowlistExtra:r}}async function Wv(t,e){let r=await He(t),i=(await wt(r.bindings)).views.find(g=>g.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 zP(r),a=he(t),{screen:c,partials:l}=await Ca({sourcePath:GP(a,i.source),exportName:i.exportName,screenName:i.screenName},{allowlistExtra:s,extensionRegistry:o}),{tokensPath:f,themePath:p}=Kt(r),{themeIR:d}=await fn(f,p);await $r(r,t);let m=[c,...l];return await Bs(m,s),wi(m,d),jv(c,l,{runtimeImportFrom:Ws.dispatch,extensionsImportFrom:Ws.extensions,contractsImportFrom:Ws.contracts,allowlistExtra:s,previewImports:Ws})}ji();function XP(t){let e=t.replace(/View$/,"")||t;return e.charAt(0).toUpperCase()+e.slice(1)}function QP(t){let e=Pe(),r=$n();return{"@view-contracts/core":Gt(e,"dist/dsl.js"),"view-contracts:runtime/dispatch":Gt(r,"dispatch.ts"),"view-contracts:runtime/style":Gt(r,"style.ts"),"view-contracts:runtime/types":Gt(r,"types.ts"),"view-contracts:runtime/style-helpers":Gt(r,"style.ts"),"view-contracts:contracts":Gt(t,"contracts/view-models.ts"),"view-contracts:extensions":Gt(t,"src/components/extensions.tsx")}}function ZP(t=800){return`<!DOCTYPE html>
928
+ `}async function Gv(t,e,r){let n=he(t),i=Et(n,".vite");await Ws(i,{recursive:!0});let o=Et(n,"package.json");await lp(o)||await ar(o,`${BP}
929
+ `,"utf-8"),await ar(Et(i,"index.html"),WP,"utf-8"),await ar(Et(i,"app-main.tsx"),UP,"utf-8"),await ar(Et(i,"vite.config.ts"),YP(),"utf-8"),await ar(Et(n,"dev.ports.ts"),JP(),"utf-8");let s=Et(n,"scripts");await Ws(s,{recursive:!0}),await ar(Et(s,"ports.sh"),KP(),"utf-8");let a=Et(n,"src/main.tsx");await lp(a)||(await Ws(Wv(a),{recursive:!0}),await ar(a,GP(r),"utf-8"));let c=Et(n,"src/runtime/handlers.ts");await lp(c)||(await Ws(Wv(c),{recursive:!0}),await ar(c,zP,"utf-8")),console.log(` scaffold \u2192 ${i}/`)}pt();ji();dn();import{createServer as sR}from"node:http";import{watch as aR}from"node:fs";import{resolve as Tr}from"node:path";pt();Zo();ir();dn();import{mkdir as ZP,writeFile as up}from"node:fs/promises";import{tmpdir as eR}from"node:os";import{join as zs,resolve as Gt}from"node:path";import{build as tR}from"esbuild";import{resolve as XP}from"node:path";pt();Qo();var Gs={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 QP(t){if(!t.extensions)return{allowlistExtra:t.allowlistExtra??[]};let e=await Fo(t.extensions),r=[...new Set([...t.allowlistExtra??[],...Object.keys(e.extensions)])];return{extensionRegistry:e,allowlistExtra:r}}async function zv(t,e){let r=await He(t),i=(await _t(r.bindings)).views.find(g=>g.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 QP(r),a=he(t),{screen:c,partials:l}=await Ea({sourcePath:XP(a,i.source),exportName:i.exportName,screenName:i.screenName},{allowlistExtra:s,extensionRegistry:o}),{tokensPath:f,themePath:p}=Kt(r),{themeIR:d}=await fn(f,p);await $r(r,t);let m=[c,...l];return await Us(m,s),wi(m,d),qv(c,l,{runtimeImportFrom:Gs.dispatch,extensionsImportFrom:Gs.extensions,contractsImportFrom:Gs.contracts,allowlistExtra:s,previewImports:Gs})}ji();function rR(t){let e=t.replace(/View$/,"")||t;return e.charAt(0).toUpperCase()+e.slice(1)}function nR(t){let e=Pe(),r=$n();return{"@view-contracts/core":Gt(e,"dist/dsl.js"),"view-contracts:runtime/dispatch":Gt(r,"dispatch.ts"),"view-contracts:runtime/style":Gt(r,"style.ts"),"view-contracts:runtime/types":Gt(r,"types.ts"),"view-contracts:runtime/style-helpers":Gt(r,"style.ts"),"view-contracts:contracts":Gt(t,"contracts/view-models.ts"),"view-contracts:extensions":Gt(t,"src/components/extensions.tsx")}}function iR(t=800){return`<!DOCTYPE html>
930
930
  <html lang="en">
931
931
  <head>
932
932
  <meta charset="UTF-8" />
@@ -953,7 +953,7 @@ export default defineConfig({
953
953
  </script>
954
954
  </body>
955
955
  </html>
956
- `}async function eI(t,e,r,n,i){await lp(Gs(t,"screen.tsx"),e,"utf8"),await lp(Gs(t,"mock.ts"),r,"utf8");let o=`import React from 'react';
956
+ `}async function oR(t,e,r,n,i){await up(zs(t,"screen.tsx"),e,"utf8"),await up(zs(t,"mock.ts"),r,"utf8");let o=`import React from 'react';
957
957
  import ReactDOM from 'react-dom/client';
958
958
  import { ${n} } from './screen.tsx';
959
959
  import { ${i} } from './mock.ts';
@@ -968,10 +968,10 @@ ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
968
968
  <${n} vm={${i}} />
969
969
  </React.StrictMode>,
970
970
  );
971
- `,s=Gs(t,"entry.tsx");return await lp(s,o,"utf8"),s}async function up(t,e,r){let n=await He(t),o=(await wt(n.bindings)).views.find(M=>M.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=he(t),[a,c,l]=await Promise.all([Wv(t,e),Cv(t,n,e),_i(n,t)]),f=XP(o.exportName),p=np(e),d=Gs(KP(),`view-contracts-preview-${process.pid}`);await JP(d,{recursive:!0});let m=await eI(d,a,c,f,p),g=Pe(),y=[Gt(s,"node_modules"),Gt(g,"node_modules")],_=await YP({entryPoints:[m],bundle:!0,write:!1,format:"esm",platform:"browser",target:"es2022",jsx:"automatic",jsxImportSource:"react",absWorkingDir:s,nodePaths:y,alias:QP(s),logLevel:"silent"});if(_.errors.length>0)throw new Error(_.errors.map(M=>M.text).join(`
972
- `));let b=_.outputFiles[0]?.text??"";return{html:ZP(),themeCss:l,bundleJs:b,version:r}}async function Gv(t,e){let r=await wt((await He(t)).bindings);if(e){let i=r.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 n=r.views.find(i=>i.targets.includes("react"));if(!n)throw new Error("No react target views in view-bindings.yaml");return n.screenName}ji();function qi(t,e,r,n){t.writeHead(e,{"Content-Type":n,"Cache-Control":"no-store"}),t.end(r)}function nI(t,e,r){let n=t.url?.split("?")[0]??"/";if(n==="/"||n==="/index.html"){qi(e,200,r.html,"text/html; charset=utf-8");return}if(n==="/bundle.js"){qi(e,200,r.bundleJs,"text/javascript; charset=utf-8");return}if(n==="/theme.css"){qi(e,200,r.themeCss,"text/css; charset=utf-8");return}if(n==="/__vc-reload"){qi(e,200,JSON.stringify({version:r.version}),"application/json");return}qi(e,404,"Not found","text/plain; charset=utf-8")}async function iI(t,e,r){let n=await He(t),i=he(t),{tokensPath:o,themePath:s}=Kt(n),a=await Ev(t,n),c=Lv(),l=[Tr(i,n.viewsDir),Tr(i,o),Tr(i,s),a,c];n.extensions&&l.push(Tr(i,n.extensions)),n.design?.extensionsCss&&l.push(Tr(i,n.design.extensionsCss)),l.push(Tr(i,"contracts/view-models.ts")),l.push(Tr(i,"src/components/extensions.tsx"));let f,p=()=>{f&&clearTimeout(f),f=setTimeout(()=>r(),150)},d=[];for(let g of l)await qs(g)&&d.push(g);let m=d.map(g=>rI(g,{recursive:!0},()=>p()));return()=>{f&&clearTimeout(f);for(let g of m)g.close()}}async function zv(t){let e=t.port??5173,r=t.host??"127.0.0.1",n=await Gv(t.configPath,t.screen),i=0,o=await up(t.configPath,n,i),s=!1,a=!1,c=async()=>{if(s){a=!0;return}s=!0;try{i+=1,o=await up(t.configPath,n,i),console.log(`[preview] rebuilt (v${i})`)}catch(d){let m=d instanceof Error?d.message:String(d);console.error(`[preview] compile error:
973
- ${m}`)}finally{s=!1,a&&(a=!1,c())}},l=tI((d,m)=>nI(d,m,o));await new Promise((d,m)=>{l.once("error",m),l.listen(e,r,()=>d())});let f=`http://${r}:${e}/`;console.log(`[preview] ${n} \u2192 ${f}`),console.log("[preview] watching views/ and design files (Ctrl+C to stop)");let p=await iI(t.configPath,n,()=>{c()});await new Promise(d=>{let m=()=>{p(),l.close(()=>d())};process.once("SIGINT",m),process.once("SIGTERM",m)})}async function fp(t){if(!t.extensions)return{allowlistExtra:t.allowlistExtra??[]};let e=await qo(t.extensions),r=[...new Set([...t.allowlistExtra??[],...Object.keys(e.extensions)])];return{extensionRegistry:e,allowlistExtra:r}}async function Jv(t){await new Promise((e,r)=>{let n=cI("npx",["micro-contracts",...t],{stdio:"inherit"});n.on("error",r),n.on("close",i=>{i===0?e():r(new Error(`micro-contracts exited with code ${i}`))})})}async function pp(t){let e=await He(t),r=await wt(e.bindings),{extensionRegistry:n,allowlistExtra:i}=await fp(e),o=he(t),{screens:s,partials:a}=await Gp(r.views.map(c=>({sourcePath:Et(o,c.source),exportName:c.exportName,screenName:c.screenName})),{allowlistExtra:i,extensionRegistry:n});return{screens:new Map(r.views.map((c,l)=>[c.screenName,s[l]])),partials:a}}function Nr(t,e){let r=aI(Xv(t),e).replace(/\\/g,"/");return r.startsWith(".")||(r=`./${r}`),r.replace(/\.tsx?$/,".js")}async function Kv(t,e,r){let n=await He(t),i=he(t),{allowlistExtra:o}=await fp(n),s=await wt(n.bindings);for(let a of r){let c=Et(n.generated.reactDir,"components",`${a.exportName}.generated.tsx`),l=Nr(c,Et(n.generated.reactDir,"runtime.ts")),f=Nr(c,Et(n.generated.reactDir,"extensions.generated.ts")),p=Nr(c,Et(i,"contracts/view-models.ts"));await ap(a,c,{runtimeImportFrom:l,extensionsImportFrom:f,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=mf(n,a),f=Nr(l,Et(n.generated.reactDir,"runtime.ts")),p=Nr(l,Et(n.generated.reactDir,"extensions.generated.ts")),d=Nr(l,Et(i,"contracts/view-models.ts")),m=new Map;for(let g of r){let y=Dv(n.generated.reactDir,g);m.set(g.exportName,Nr(l,y))}await ap(c,l,{runtimeImportFrom:f,extensionsImportFrom:p,contractsImportFrom:d,allowlistExtra:o,viewRefImportFrom:m}),console.log(` ${a.exportName} \u2192 ${l}`)}}async function Yv(t){let e=await He(t),r=await wt(e.bindings),n=he(t),o=["// Auto-generated view bridge registry \u2014 DO NOT EDIT",`// Generated from ${gf(n,e.bindings)}`,"","export const viewBridgeRegistry = {"];for(let s of r.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 sI(Xv(Et(e.generated.bridge)),{recursive:!0}),await oI(Et(e.generated.bridge),o.join(`
974
- `),"utf-8"),console.log(`Bridge registry \u2192 ${e.generated.bridge} (${r.views.length} view(s))`)}var Qv={compile:async(t,e)=>{let{screens:r,partials:n}=await pp(await Jt(t.config));console.log(`Compiled ${r.size} screen(s) and ${n.length} partial(s) to View IR (in-memory)`)},renderReact:async(t,e)=>{let r=await Jt(t.config),{screens:n,partials:i}=await pp(r);await Kv(r,n,i)},renderBridge:async(t,e)=>{await Yv(await Jt(t.config))},build:async(t,e)=>{let r=await Jt(t.config),n=await He(r),i=await wt(n.bindings),{screens:o,partials:s}=await pp(r);console.log(`Compiled ${o.size} screen(s) and ${s.length} partial(s) to View IR (in-memory)`);let{tokensPath:a,themePath:c}=Kt(n),{tokenIR:l,themeIR:f}=await fn(a,c);await $r(n,r);let{allowlistExtra:p}=await fp(n),d=[...o.values(),...s];await Bs(d,p),wi(d,f),await qv(r,n),await Kv(r,o,s),await Yv(r),await Fv(r,n,i,{theme:f,tokens:l},{screens:o,partials:s}),await Hv(n,i),await Uv(r,n,i)},contractsGenerate:async(t,e)=>{let r=await He(await Jt(t.config));await Jv(["generate","-c",r.microContractsConfig]),console.log("Contracts generated via micro-contracts")},contractsCheck:async(t,e)=>{let r=await He(await Jt(t.config));await Jv(["lint","-c",r.microContractsConfig])},preview:async(t,e)=>{try{await zv({configPath:await Jt(t.config),port:t.port!=null?Number(t.port):void 0,host:t.host,screen:t.screen})}catch(r){console.error(r instanceof Error?r.message:r),process.exit(1)}}};var lI={version:"0.4.4"};Rp(Qv,lI.version).parseAsync(process.argv).catch(t=>{console.error(t instanceof Error?t.message:t),process.exit(1)});
971
+ `,s=zs(t,"entry.tsx");return await up(s,o,"utf8"),s}async function pp(t,e,r){let n=await He(t),o=(await _t(n.bindings)).views.find(M=>M.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=he(t),[a,c,l]=await Promise.all([zv(t,e),Pv(t,n,e),_i(n,t)]),f=rR(o.exportName),p=ip(e),d=zs(eR(),`view-contracts-preview-${process.pid}`);await ZP(d,{recursive:!0});let m=await oR(d,a,c,f,p),g=Pe(),y=[Gt(s,"node_modules"),Gt(g,"node_modules")],_=await tR({entryPoints:[m],bundle:!0,write:!1,format:"esm",platform:"browser",target:"es2022",jsx:"automatic",jsxImportSource:"react",absWorkingDir:s,nodePaths:y,alias:nR(s),logLevel:"silent"});if(_.errors.length>0)throw new Error(_.errors.map(M=>M.text).join(`
972
+ `));let b=_.outputFiles[0]?.text??"";return{html:iR(),themeCss:l,bundleJs:b,version:r}}async function Jv(t,e){let r=await _t((await He(t)).bindings);if(e){let i=r.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 n=r.views.find(i=>i.targets.includes("react"));if(!n)throw new Error("No react target views in view-bindings.yaml");return n.screenName}ji();function qi(t,e,r,n){t.writeHead(e,{"Content-Type":n,"Cache-Control":"no-store"}),t.end(r)}function cR(t,e,r){let n=t.url?.split("?")[0]??"/";if(n==="/"||n==="/index.html"){qi(e,200,r.html,"text/html; charset=utf-8");return}if(n==="/bundle.js"){qi(e,200,r.bundleJs,"text/javascript; charset=utf-8");return}if(n==="/theme.css"){qi(e,200,r.themeCss,"text/css; charset=utf-8");return}if(n==="/__vc-reload"){qi(e,200,JSON.stringify({version:r.version}),"application/json");return}qi(e,404,"Not found","text/plain; charset=utf-8")}async function lR(t,e,r){let n=await He(t),i=he(t),{tokensPath:o,themePath:s}=Kt(n),a=await Rv(t,n),c=Dv(),l=[Tr(i,n.viewsDir),Tr(i,o),Tr(i,s),a,c];n.extensions&&l.push(Tr(i,n.extensions)),n.design?.extensionsCss&&l.push(Tr(i,n.design.extensionsCss)),l.push(Tr(i,"contracts/view-models.ts")),l.push(Tr(i,"src/components/extensions.tsx"));let f,p=()=>{f&&clearTimeout(f),f=setTimeout(()=>r(),150)},d=[];for(let g of l)await Fs(g)&&d.push(g);let m=d.map(g=>aR(g,{recursive:!0},()=>p()));return()=>{f&&clearTimeout(f);for(let g of m)g.close()}}async function Kv(t){let e=t.port??5173,r=t.host??"127.0.0.1",n=await Jv(t.configPath,t.screen),i=0,o=await pp(t.configPath,n,i),s=!1,a=!1,c=async()=>{if(s){a=!0;return}s=!0;try{i+=1,o=await pp(t.configPath,n,i),console.log(`[preview] rebuilt (v${i})`)}catch(d){let m=d instanceof Error?d.message:String(d);console.error(`[preview] compile error:
973
+ ${m}`)}finally{s=!1,a&&(a=!1,c())}},l=sR((d,m)=>cR(d,m,o));await new Promise((d,m)=>{l.once("error",m),l.listen(e,r,()=>d())});let f=`http://${r}:${e}/`;console.log(`[preview] ${n} \u2192 ${f}`),console.log("[preview] watching views/ and design files (Ctrl+C to stop)");let p=await lR(t.configPath,n,()=>{c()});await new Promise(d=>{let m=()=>{p(),l.close(()=>d())};process.once("SIGINT",m),process.once("SIGTERM",m)})}async function dp(t){if(!t.extensions)return{allowlistExtra:t.allowlistExtra??[]};let e=await Fo(t.extensions),r=[...new Set([...t.allowlistExtra??[],...Object.keys(e.extensions)])];return{extensionRegistry:e,allowlistExtra:r}}async function Yv(t){await new Promise((e,r)=>{let n=dR("npx",["micro-contracts",...t],{stdio:"inherit"});n.on("error",r),n.on("close",i=>{i===0?e():r(new Error(`micro-contracts exited with code ${i}`))})})}async function fp(t){let e=await He(t),r=await _t(e.bindings),{extensionRegistry:n,allowlistExtra:i}=await dp(e),o=he(t),{screens:s,partials:a}=await Jp(r.views.map(c=>({sourcePath:Pt(o,c.source),exportName:c.exportName,screenName:c.screenName,targets:c.targets})),{allowlistExtra:i,extensionRegistry:n});return{screens:new Map(r.views.map((c,l)=>[c.screenName,s[l]])),partials:a}}function Nr(t,e){let r=fR(Zv(t),e).replace(/\\/g,"/");return r.startsWith(".")||(r=`./${r}`),r.replace(/\.tsx?$/,".js")}async function Xv(t,e,r){let n=await He(t),i=he(t),{allowlistExtra:o}=await dp(n),s=await _t(n.bindings);for(let a of r){let c=Pt(n.generated.reactDir,"components",`${a.exportName}.generated.tsx`),l=Nr(c,Pt(n.generated.reactDir,"runtime.ts")),f=Nr(c,Pt(n.generated.reactDir,"extensions.generated.ts")),p=Nr(c,Pt(i,"contracts/view-models.ts"));await cp(a,c,{runtimeImportFrom:l,extensionsImportFrom:f,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=yf(n,a),f=Nr(l,Pt(n.generated.reactDir,"runtime.ts")),p=Nr(l,Pt(n.generated.reactDir,"extensions.generated.ts")),d=Nr(l,Pt(i,"contracts/view-models.ts")),m=new Map;for(let g of r){let y=Fv(n.generated.reactDir,g);m.set(g.exportName,Nr(l,y))}await cp(c,l,{runtimeImportFrom:f,extensionsImportFrom:p,contractsImportFrom:d,allowlistExtra:o,viewRefImportFrom:m}),console.log(` ${a.exportName} \u2192 ${l}`)}}async function Qv(t){let e=await He(t),r=await _t(e.bindings),n=he(t),o=["// Auto-generated view bridge registry \u2014 DO NOT EDIT",`// Generated from ${vf(n,e.bindings)}`,"","export const viewBridgeRegistry = {"];for(let s of r.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 pR(Zv(Pt(e.generated.bridge)),{recursive:!0}),await uR(Pt(e.generated.bridge),o.join(`
974
+ `),"utf-8"),console.log(`Bridge registry \u2192 ${e.generated.bridge} (${r.views.length} view(s))`)}var ew={compile:async(t,e)=>{let{screens:r,partials:n}=await fp(await Jt(t.config));console.log(`Compiled ${r.size} screen(s) and ${n.length} partial(s) to View IR (in-memory)`)},renderReact:async(t,e)=>{let r=await Jt(t.config),{screens:n,partials:i}=await fp(r);await Xv(r,n,i)},renderBridge:async(t,e)=>{await Qv(await Jt(t.config))},build:async(t,e)=>{let r=await Jt(t.config),n=await He(r),i=await _t(n.bindings),{screens:o,partials:s}=await fp(r);console.log(`Compiled ${o.size} screen(s) and ${s.length} partial(s) to View IR (in-memory)`);let{tokensPath:a,themePath:c}=Kt(n),{tokenIR:l,themeIR:f}=await fn(a,c);await $r(n,r);let{allowlistExtra:p}=await dp(n),d=[...o.values(),...s];await Us(d,p),wi(d,f),await Hv(r,n),await Xv(r,o,s),await Qv(r),await Bv(r,n,i,{theme:f,tokens:l},{screens:o,partials:s}),await Uv(n,i),await Gv(r,n,i)},contractsGenerate:async(t,e)=>{let r=await He(await Jt(t.config));await Yv(["generate","-c",r.microContractsConfig]),console.log("Contracts generated via micro-contracts")},contractsCheck:async(t,e)=>{let r=await He(await Jt(t.config));await Yv(["lint","-c",r.microContractsConfig])},preview:async(t,e)=>{try{await Kv({configPath:await Jt(t.config),port:t.port!=null?Number(t.port):void 0,host:t.host,screen:t.screen})}catch(r){console.error(r instanceof Error?r.message:r),process.exit(1)}}};var hR={version:"0.4.5"};Op(ew,hR.version).parseAsync(process.argv).catch(t=>{console.error(t instanceof Error?t.message:t),process.exit(1)});
975
975
  /*! Bundled license information:
976
976
 
977
977
  js-yaml/dist/js-yaml.mjs: