view-contracts 0.3.4 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -3
- package/cli-contract.yaml +41 -1
- package/dist/preview-style-helpers.js +2 -0
- package/dist/preview-style-helpers.js.map +7 -0
- package/dist/preview.mjs +153 -0
- package/dist/preview.mjs.map +7 -0
- package/dist/view-contracts.bundle.mjs +402 -237
- package/dist/view-contracts.bundle.mjs.map +4 -4
- package/docs/cli-reference.md +37 -1
- package/package.json +28 -1
- package/renderers/compose/renderRuntime.ts +40 -0
- package/renderers/react/defaults/theme.yaml +23 -0
- package/renderers/react/defaults/tokens.yaml +15 -0
- package/renderers/react/elementMap.ts +30 -6
- package/renderers/react/elements.yaml +17 -5
- package/renderers/react/lowering/foldStyle.ts +13 -1
- package/renderers/react/lowering/lowerToJsx.ts +58 -40
- package/renderers/react/paths.ts +1 -10
- package/renderers/react/preview/components.ts +23 -0
- package/renderers/react/preview/index.ts +3 -0
- package/renderers/react/preview/start.tsx +42 -0
- package/renderers/react/preview/style-helpers.ts +5 -0
- package/renderers/react/preview/vocabulary.tsx +75 -0
- package/renderers/react/renderComponents.ts +169 -14
- package/renderers/react/runtime/theme.css +9 -17
- package/renderers/react/style/foldLiterals.ts +11 -0
- package/renderers/swiftui/README.md +48 -10
- package/renderers/swiftui/elementMap.ts +45 -0
- package/renderers/swiftui/elements.yaml +82 -0
- package/renderers/swiftui/index.ts +5 -0
- package/renderers/swiftui/lowering/lowerToSwiftUI.ts +542 -0
- package/renderers/swiftui/lowering/modifiers.ts +142 -0
- package/renderers/swiftui/renderComponents.ts +79 -0
- package/renderers/swiftui/renderRuntime.ts +91 -0
- package/renderers/swiftui/renderTheme.ts +208 -0
- package/spec/ui-dsl.linter-rules.json +0 -7
- package/spec/ui-dsl.meta.json +5 -0
- package/spec/ui-dsl.schema.json +333 -259
- package/src/generated/schema/allowed-components.ts +0 -36
- package/src/generated/schema/dsl-enums.ts +0 -19
- package/src/generated/schema/dsl-properties.ts +0 -64
- package/src/generated/schema/index.ts +0 -4
- package/src/generated/schema/lowering-style-properties.ts +0 -35
- package/src/generated/schema/react-renderer-element-config.ts +0 -27
- package/src/generated/schema/schema-document.ts +0 -33
|
@@ -1,52 +1,177 @@
|
|
|
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
|
|
5
|
-
`)}displayWidth(e){return
|
|
6
|
-
`+" ".repeat(r+
|
|
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
|
|
8
|
-
`)}};function
|
|
4
|
+
var Jv=Object.create;var Ks=Object.defineProperty;var Kv=Object.getOwnPropertyDescriptor;var Yv=Object.getOwnPropertyNames;var Xv=Object.getPrototypeOf,Qv=Object.prototype.hasOwnProperty;var st=(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 b=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},zi=(t,e)=>{for(var r in e)Ks(t,r,{get:e[r],enumerable:!0})},Zv=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Yv(e))!Qv.call(t,i)&&i!==r&&Ks(t,i,{get:()=>e[i],enumerable:!(n=Kv(e,i))||n.enumerable});return t};var Ys=(t,e,r)=>(r=t!=null?Jv(Xv(t)):{},Zv(e||!t||!t.__esModule?Ks(r,"default",{value:t,enumerable:!0}):r,t));var Pn=b(Qs=>{var Ji=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}},Xs=class extends Ji{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Qs.CommanderError=Ji;Qs.InvalidArgumentError=Xs});var Ki=b(ea=>{var{InvalidArgumentError:ew}=Pn(),Zs=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 ew(`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 tw(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}ea.Argument=Zs;ea.humanReadableArgName=tw});var na=b(ra=>{var{humanReadableArgName:rw}=Ki(),ta=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=>rw(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 up(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
|
+
`+" ".repeat(r+c)),s+a+" ".repeat(c)+p.replace(/\n/g,`
|
|
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 up(t){let e=/\x1b\[\d*(;\d*)*m/g;return t.replace(e,"")}ra.Help=ta;ra.stripColor=up});var aa=b(sa=>{var{InvalidArgumentError:nw}=Pn(),ia=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=iw(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 nw(`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?pp(this.name().replace(/^no-/,"")):pp(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}},oa=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 pp(t){return t.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function iw(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}}
|
|
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}}sa.Option=ia;sa.DualOptions=oa});var dp=b(fp=>{function ow(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 sw(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=ow(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]}?)`:""}
|
|
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
|
|
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
|
|
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
|
|
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(
|
|
16
|
+
(Did you mean ${n[0]}?)`:""}fp.suggestSimilar=sw});var yp=b(fa=>{var aw=st("node:events").EventEmitter,ca=st("node:child_process"),Ot=st("node:path"),Yi=st("node:fs"),se=st("node:process"),{Argument:cw,humanReadableArgName:lw}=Ki(),{CommanderError:la}=Pn(),{Help:uw,stripColor:pw}=na(),{Option:hp,DualOptions:fw}=aa(),{suggestSimilar:mp}=dp(),ua=class t extends aw{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:()=>pa()??(se.stdout.isTTY&&se.stdout.hasColors?.()),getErrHasColors:()=>pa()??(se.stderr.isTTY&&se.stderr.hasColors?.()),stripColor:r=>pw(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 uw,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 cw(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 la(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 hp(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 hp)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
|
+
- 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(Yi.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(
|
|
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=Ot.resolve(f,p);if(Yi.existsSync(d))return d;if(i.includes(Ot.extname(p)))return;let m=i.find(g=>Yi.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=Yi.realpathSync(this._scriptPath)}catch{f=this._scriptPath}a=Ot.resolve(Ot.dirname(f),a)}if(a){let f=o(a,s);if(!f&&!e._executableFile&&this._scriptPath){let p=Ot.basename(this._scriptPath,Ot.extname(this._scriptPath));p!==this._name&&(f=o(a,`${p}-${e._name}`))}s=f||s}n=i.includes(Ot.extname(s));let c;se.platform!=="win32"?n?(r.unshift(s),r=gp(se.execArgv).concat(r),c=ca.spawn(se.argv[0],r,{stdio:"inherit"})):c=ca.spawn(s,r,{stdio:"inherit"}):(this._checkForMissingExecutable(s,a,e._name),r.unshift(s),r=gp(se.execArgv).concat(r),c=ca.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 la(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 la(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
|
|
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=>
|
|
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 fw(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=mp(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=mp(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=>lw(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=Ot.basename(e,Ot.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 fu(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 As(){if(ie.env.NO_COLOR||ie.env.FORCE_COLOR==="0"||ie.env.FORCE_COLOR==="false")return!1;if(ie.env.FORCE_COLOR||ie.env.CLICOLOR_FORCE!==void 0)return!0}Rs.Command=Os;Rs.useColor=As});var gu=w(Ue=>{var{Argument:pu}=Ci(),{Command:Is}=du(),{CommanderError:gy,InvalidArgumentError:hu}=sn(),{Help:yy}=Ss(),{Option:mu}=xs();Ue.program=new Is;Ue.createCommand=t=>new Is(t);Ue.createOption=(t,e)=>new mu(t,e);Ue.createArgument=(t,e)=>new pu(t,e);Ue.Command=Is;Ue.Option=mu;Ue.Argument=pu;Ue.Help=yy;Ue.CommanderError=gy;Ue.InvalidArgumentError=hu;Ue.InvalidOptionArgumentError=hu});var pn=w(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.regexpCode=re.getEsmExportName=re.getProperty=re.safeStringify=re.stringify=re.strConcat=re.addCodeArg=re.str=re._=re.nil=re._Code=re.Name=re.IDENTIFIER=re._CodeOrName=void 0;var fn=class{};re._CodeOrName=fn;re.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Yt=class extends fn{constructor(e){if(super(),!re.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};re.Name=Yt;var Ge=class extends fn{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof Yt&&(r[n.str]=(r[n.str]||0)+1),r),{})}};re._Code=Ge;re.nil=new Ge("");function tf(t,...e){let r=[t[0]],n=0;for(;n<e.length;)qs(r,e[n]),r.push(t[++n]);return new Ge(r)}re._=tf;var Ds=new Ge("+");function rf(t,...e){let r=[dn(t[0])],n=0;for(;n<e.length;)r.push(Ds),qs(r,e[n]),r.push(Ds,dn(t[++n]));return Xy(r),new Ge(r)}re.str=rf;function qs(t,e){e instanceof Ge?t.push(...e._items):e instanceof Yt?t.push(e):t.push(ev(e))}re.addCodeArg=qs;function Xy(t){let e=1;for(;e<t.length-1;){if(t[e]===Ds){let r=Qy(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function Qy(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof Yt||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof Yt))return`"${t}${e.slice(1)}`}function Zy(t,e){return e.emptyStr()?t:t.emptyStr()?e:rf`${t}${e}`}re.strConcat=Zy;function ev(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:dn(Array.isArray(t)?t.join(","):t)}function tv(t){return new Ge(dn(t))}re.stringify=tv;function dn(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}re.safeStringify=dn;function rv(t){return typeof t=="string"&&re.IDENTIFIER.test(t)?new Ge(`.${t}`):tf`[${t}]`}re.getProperty=rv;function nv(t){if(typeof t=="string"&&re.IDENTIFIER.test(t))return new Ge(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}re.getEsmExportName=nv;function iv(t){return new Ge(t.toString())}re.regexpCode=iv});var Hs=w(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.ValueScope=Le.ValueScopeName=Le.Scope=Le.varKinds=Le.UsedValueState=void 0;var Me=pn(),Vs=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Ai;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Ai||(Le.UsedValueState=Ai={}));Le.varKinds={const:new Me.Name("const"),let:new Me.Name("let"),var:new Me.Name("var")};var Ri=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Me.Name?e:this.name(e)}name(e){return new Me.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Le.Scope=Ri;var Ii=class extends Me.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,Me._)`.${new Me.Name(r)}[${n}]`}};Le.ValueScopeName=Ii;var ov=(0,Me._)`\n`,Fs=class extends Ri{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?ov:Me.nil}}get(){return this._scope}name(e){return new Ii(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 d=a.get(s);if(d)return d}else a=this._values[o]=new Map;a.set(s,i);let l=this._scope[o]||(this._scope[o]=[]),u=l.length;return l[u]=r.ref,i.setValue(r,{property:o,itemIndex:u}),i}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Me._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(e,r,n={},i){let o=Me.nil;for(let s in e){let a=e[s];if(!a)continue;let l=n[s]=n[s]||new Map;a.forEach(u=>{if(l.has(u))return;l.set(u,Ai.Started);let d=r(u);if(d){let f=this.opts.es5?Le.varKinds.var:Le.varKinds.const;o=(0,Me._)`${o}${f} ${u} = ${d};${this.opts._n}`}else if(d=i?.(u))o=(0,Me._)`${o}${d}${this.opts._n}`;else throw new Vs(u);l.set(u,Ai.Completed)})}return o}};Le.ValueScope=Fs});var z=w(J=>{"use strict";Object.defineProperty(J,"__esModule",{value:!0});J.or=J.and=J.not=J.CodeGen=J.operators=J.varKinds=J.ValueScopeName=J.ValueScope=J.Scope=J.Name=J.regexpCode=J.stringify=J.getProperty=J.nil=J.strConcat=J.str=J._=void 0;var ee=pn(),it=Hs(),Mt=pn();Object.defineProperty(J,"_",{enumerable:!0,get:function(){return Mt._}});Object.defineProperty(J,"str",{enumerable:!0,get:function(){return Mt.str}});Object.defineProperty(J,"strConcat",{enumerable:!0,get:function(){return Mt.strConcat}});Object.defineProperty(J,"nil",{enumerable:!0,get:function(){return Mt.nil}});Object.defineProperty(J,"getProperty",{enumerable:!0,get:function(){return Mt.getProperty}});Object.defineProperty(J,"stringify",{enumerable:!0,get:function(){return Mt.stringify}});Object.defineProperty(J,"regexpCode",{enumerable:!0,get:function(){return Mt.regexpCode}});Object.defineProperty(J,"Name",{enumerable:!0,get:function(){return Mt.Name}});var Li=Hs();Object.defineProperty(J,"Scope",{enumerable:!0,get:function(){return Li.Scope}});Object.defineProperty(J,"ValueScope",{enumerable:!0,get:function(){return Li.ValueScope}});Object.defineProperty(J,"ValueScopeName",{enumerable:!0,get:function(){return Li.ValueScopeName}});Object.defineProperty(J,"varKinds",{enumerable:!0,get:function(){return Li.varKinds}});J.operators={GT:new ee._Code(">"),GTE:new ee._Code(">="),LT:new ee._Code("<"),LTE:new ee._Code("<="),EQ:new ee._Code("==="),NEQ:new ee._Code("!=="),NOT:new ee._Code("!"),OR:new ee._Code("||"),AND:new ee._Code("&&"),ADD:new ee._Code("+")};var xt=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},Bs=class extends xt{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?it.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=Er(this.rhs,e,r)),this}get names(){return this.rhs instanceof ee._CodeOrName?this.rhs.names:{}}},Ti=class extends xt{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof ee.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=Er(this.rhs,e,r),this}get names(){let e=this.lhs instanceof ee.Name?{}:{...this.lhs.names};return Mi(e,this.rhs)}},Us=class extends Ti{constructor(e,r,n,i){super(e,n,i),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Gs=class extends xt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Ws=class extends xt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},zs=class extends xt{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Ks=class extends xt{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=Er(this.code,e,r),this}get names(){return this.code instanceof ee._CodeOrName?this.code.names:{}}},hn=class extends xt{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)||(sv(e,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Zt(e,r.names),{})}},Pt=class extends hn{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Js=class extends hn{},Sr=class extends Pt{};Sr.kind="else";var Xt=class t extends Pt{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 Sr(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(nf(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=Er(this.condition,e,r),this}get names(){let e=super.names;return Mi(e,this.condition),this.else&&Zt(e,this.else.names),e}};Xt.kind="if";var Qt=class extends Pt{};Qt.kind="for";var Ys=class extends Qt{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=Er(this.iteration,e,r),this}get names(){return Zt(super.names,this.iteration.names)}},Xs=class extends Qt{constructor(e,r,n,i){super(),this.varKind=e,this.name=r,this.from=n,this.to=i}render(e){let r=e.es5?it.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=Mi(super.names,this.from);return Mi(e,this.to)}},Ni=class extends Qt{constructor(e,r,n,i){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=Er(this.iterable,e,r),this}get names(){return Zt(super.names,this.iterable.names)}},mn=class extends Pt{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};mn.kind="func";var gn=class extends hn{render(e){return"return "+super.render(e)}};gn.kind="return";var Qs=class extends Pt{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,i;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(i=this.finally)===null||i===void 0||i.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&Zt(e,this.catch.names),this.finally&&Zt(e,this.finally.names),e}},yn=class extends Pt{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};yn.kind="catch";var vn=class extends Pt{render(e){return"finally"+super.render(e)}};vn.kind="finally";var Zs=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
30
|
-
`:""},this._extScope=e,this._scope=new it.Scope({parent:e}),this._nodes=[new Js]}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 Bs(e,o,n)),o}const(e,r,n){return this._def(it.varKinds.const,e,r,n)}let(e,r,n){return this._def(it.varKinds.let,e,r,n)}var(e,r,n){return this._def(it.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new Ti(e,r,n))}add(e,r){return this._leafNode(new Us(e,J.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==ee.nil&&this._leafNode(new Ks(e)),this}object(...e){let r=["{"];for(let[n,i]of e)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,ee.addCodeArg)(r,i));return r.push("}"),new ee._Code(r)}if(e,r,n){if(this._blockNode(new Xt(e)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Xt(e))}else(){return this._elseNode(new Sr)}endIf(){return this._endBlockNode(Xt,Sr)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new Ys(e),r)}forRange(e,r,n,i,o=this.opts.es5?it.varKinds.var:it.varKinds.let){let s=this._scope.toName(e);return this._for(new Xs(o,s,r,n),()=>i(s))}forOf(e,r,n,i=it.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let s=r instanceof ee.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,ee._)`${s}.length`,a=>{this.var(o,(0,ee._)`${s}[${a}]`),n(o)})}return this._for(new Ni("of",i,o,r),()=>n(o))}forIn(e,r,n,i=this.opts.es5?it.varKinds.var:it.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,ee._)`Object.keys(${r})`,n);let o=this._scope.toName(e);return this._for(new Ni("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(Qt)}label(e){return this._leafNode(new Gs(e))}break(e){return this._leafNode(new Ws(e))}return(e){let r=new gn;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(gn)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new Qs;if(this._blockNode(i),this.code(e),r){let o=this.name("e");this._currNode=i.catch=new yn(o),r(o)}return n&&(this._currNode=i.finally=new vn,this.code(n)),this._endBlockNode(yn,vn)}throw(e){return this._leafNode(new zs(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=ee.nil,n,i){return this._blockNode(new mn(e,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(mn)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof Xt))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};J.CodeGen=Zs;function Zt(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function Mi(t,e){return e instanceof ee._CodeOrName?Zt(t,e.names):t}function Er(t,e,r){if(t instanceof ee.Name)return n(t);if(!i(t))return t;return new ee._Code(t._items.reduce((o,s)=>(s instanceof ee.Name&&(s=n(s)),s instanceof ee._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 ee._Code&&o._items.some(s=>s instanceof ee.Name&&e[s.str]===1&&r[s.str]!==void 0)}}function sv(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function nf(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,ee._)`!${ea(t)}`}J.not=nf;var av=of(J.operators.AND);function cv(...t){return t.reduce(av)}J.and=cv;var lv=of(J.operators.OR);function uv(...t){return t.reduce(lv)}J.or=uv;function of(t){return(e,r)=>e===ee.nil?r:r===ee.nil?e:(0,ee._)`${ea(e)} ${t} ${ea(r)}`}function ea(t){return t instanceof ee.Name?t:(0,ee._)`(${t})`}});var X=w(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Y.checkStrictMode=Y.getErrorPath=Y.Type=Y.useFunc=Y.setEvaluated=Y.evaluatedPropsToName=Y.mergeEvaluated=Y.eachItem=Y.unescapeJsonPointer=Y.escapeJsonPointer=Y.escapeFragment=Y.unescapeFragment=Y.schemaRefOrVal=Y.schemaHasRulesButRef=Y.schemaHasRules=Y.checkUnknownRules=Y.alwaysValidSchema=Y.toHash=void 0;var ae=z(),fv=pn();function dv(t){let e={};for(let r of t)e[r]=!0;return e}Y.toHash=dv;function pv(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(cf(t,e),!lf(e,t.self.RULES.all))}Y.alwaysValidSchema=pv;function cf(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]||df(t,`unknown keyword: "${o}"`)}Y.checkUnknownRules=cf;function lf(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}Y.schemaHasRules=lf;function hv(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}Y.schemaHasRulesButRef=hv;function mv({topSchemaRef:t,schemaPath:e},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,ae._)`${r}`}return(0,ae._)`${t}${e}${(0,ae.getProperty)(n)}`}Y.schemaRefOrVal=mv;function gv(t){return uf(decodeURIComponent(t))}Y.unescapeFragment=gv;function yv(t){return encodeURIComponent(ra(t))}Y.escapeFragment=yv;function ra(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}Y.escapeJsonPointer=ra;function uf(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}Y.unescapeJsonPointer=uf;function vv(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}Y.eachItem=vv;function sf({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(i,o,s,a)=>{let l=s===void 0?o:s instanceof ae.Name?(o instanceof ae.Name?t(i,o,s):e(i,o,s),s):o instanceof ae.Name?(e(i,s,o),o):r(o,s);return a===ae.Name&&!(l instanceof ae.Name)?n(i,l):l}}Y.mergeEvaluated={props:sf({mergeNames:(t,e,r)=>t.if((0,ae._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,ae._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,ae._)`${r} || {}`).code((0,ae._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,ae._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,ae._)`${r} || {}`),na(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:ff}),items:sf({mergeNames:(t,e,r)=>t.if((0,ae._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,ae._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,ae._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,ae._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function ff(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,ae._)`{}`);return e!==void 0&&na(t,r,e),r}Y.evaluatedPropsToName=ff;function na(t,e,r){Object.keys(r).forEach(n=>t.assign((0,ae._)`${e}${(0,ae.getProperty)(n)}`,!0))}Y.setEvaluated=na;var af={};function _v(t,e){return t.scopeValue("func",{ref:e,code:af[e.code]||(af[e.code]=new fv._Code(e.code))})}Y.useFunc=_v;var ta;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(ta||(Y.Type=ta={}));function wv(t,e,r){if(t instanceof ae.Name){let n=e===ta.Num;return r?n?(0,ae._)`"[" + ${t} + "]"`:(0,ae._)`"['" + ${t} + "']"`:n?(0,ae._)`"/" + ${t}`:(0,ae._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,ae.getProperty)(t).toString():"/"+ra(t)}Y.getErrorPath=wv;function df(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}Y.checkStrictMode=df});var We=w(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});var xe=z(),bv={data:new xe.Name("data"),valCxt:new xe.Name("valCxt"),instancePath:new xe.Name("instancePath"),parentData:new xe.Name("parentData"),parentDataProperty:new xe.Name("parentDataProperty"),rootData:new xe.Name("rootData"),dynamicAnchors:new xe.Name("dynamicAnchors"),vErrors:new xe.Name("vErrors"),errors:new xe.Name("errors"),this:new xe.Name("this"),self:new xe.Name("self"),scope:new xe.Name("scope"),json:new xe.Name("json"),jsonPos:new xe.Name("jsonPos"),jsonLen:new xe.Name("jsonLen"),jsonPart:new xe.Name("jsonPart")};ia.default=bv});var _n=w(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.extendErrors=Pe.resetErrorsCount=Pe.reportExtraError=Pe.reportError=Pe.keyword$DataError=Pe.keywordError=void 0;var te=z(),ji=X(),Re=We();Pe.keywordError={message:({keyword:t})=>(0,te.str)`must pass "${t}" keyword validation`};Pe.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,te.str)`"${t}" keyword must be ${e} ($data)`:(0,te.str)`"${t}" keyword is invalid ($data)`};function Sv(t,e=Pe.keywordError,r,n){let{it:i}=t,{gen:o,compositeRule:s,allErrors:a}=i,l=mf(t,e,r);n??(s||a)?pf(o,l):hf(i,(0,te._)`[${l}]`)}Pe.reportError=Sv;function Ev(t,e=Pe.keywordError,r){let{it:n}=t,{gen:i,compositeRule:o,allErrors:s}=n,a=mf(t,e,r);pf(i,a),o||s||hf(n,Re.default.vErrors)}Pe.reportExtraError=Ev;function $v(t,e){t.assign(Re.default.errors,e),t.if((0,te._)`${Re.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,te._)`${Re.default.vErrors}.length`,e),()=>t.assign(Re.default.vErrors,null)))}Pe.resetErrorsCount=$v;function Cv({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,Re.default.errors,a=>{t.const(s,(0,te._)`${Re.default.vErrors}[${a}]`),t.if((0,te._)`${s}.instancePath === undefined`,()=>t.assign((0,te._)`${s}.instancePath`,(0,te.strConcat)(Re.default.instancePath,o.errorPath))),t.assign((0,te._)`${s}.schemaPath`,(0,te.str)`${o.errSchemaPath}/${e}`),o.opts.verbose&&(t.assign((0,te._)`${s}.schema`,r),t.assign((0,te._)`${s}.data`,n))})}Pe.extendErrors=Cv;function pf(t,e){let r=t.const("err",e);t.if((0,te._)`${Re.default.vErrors} === null`,()=>t.assign(Re.default.vErrors,(0,te._)`[${r}]`),(0,te._)`${Re.default.vErrors}.push(${r})`),t.code((0,te._)`${Re.default.errors}++`)}function hf(t,e){let{gen:r,validateName:n,schemaEnv:i}=t;i.$async?r.throw((0,te._)`new ${t.ValidationError}(${e})`):(r.assign((0,te._)`${n}.errors`,e),r.return(!1))}var er={keyword:new te.Name("keyword"),schemaPath:new te.Name("schemaPath"),params:new te.Name("params"),propertyName:new te.Name("propertyName"),message:new te.Name("message"),schema:new te.Name("schema"),parentSchema:new te.Name("parentSchema")};function mf(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,te._)`{}`:xv(t,e,r)}function xv(t,e,r={}){let{gen:n,it:i}=t,o=[Pv(i,r),kv(t,r)];return Ov(t,e,o),n.object(...o)}function Pv({errorPath:t},{instancePath:e}){let r=e?(0,te.str)`${t}${(0,ji.getErrorPath)(e,ji.Type.Str)}`:t;return[Re.default.instancePath,(0,te.strConcat)(Re.default.instancePath,r)]}function kv({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let i=n?e:(0,te.str)`${e}/${t}`;return r&&(i=(0,te.str)`${i}${(0,ji.getErrorPath)(r,ji.Type.Str)}`),[er.schemaPath,i]}function Ov(t,{params:e,message:r},n){let{keyword:i,data:o,schemaValue:s,it:a}=t,{opts:l,propertyName:u,topSchemaRef:d,schemaPath:f}=a;n.push([er.keyword,i],[er.params,typeof e=="function"?e(t):e||(0,te._)`{}`]),l.messages&&n.push([er.message,typeof r=="function"?r(t):r]),l.verbose&&n.push([er.schema,s],[er.parentSchema,(0,te._)`${d}${f}`],[Re.default.data,o]),u&&n.push([er.propertyName,u])}});var yf=w($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.boolOrEmptySchema=$r.topBoolOrEmptySchema=void 0;var Av=_n(),Rv=z(),Iv=We(),Tv={message:"boolean schema is false"};function Nv(t){let{gen:e,schema:r,validateName:n}=t;r===!1?gf(t,!1):typeof r=="object"&&r.$async===!0?e.return(Iv.default.data):(e.assign((0,Rv._)`${n}.errors`,null),e.return(!0))}$r.topBoolOrEmptySchema=Nv;function Mv(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),gf(t)):r.var(e,!0)}$r.boolOrEmptySchema=Mv;function gf(t,e){let{gen:r,data:n}=t,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,Av.reportError)(i,Tv,void 0,e)}});var oa=w(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.getRules=Cr.isJSONType=void 0;var Lv=["string","number","integer","boolean","null","object","array"],jv=new Set(Lv);function Dv(t){return typeof t=="string"&&jv.has(t)}Cr.isJSONType=Dv;function qv(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}Cr.getRules=qv});var sa=w(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.shouldUseRule=Lt.shouldUseGroup=Lt.schemaHasRulesForType=void 0;function Vv({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&vf(t,n)}Lt.schemaHasRulesForType=Vv;function vf(t,e){return e.rules.some(r=>_f(t,r))}Lt.shouldUseGroup=vf;function _f(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))}Lt.shouldUseRule=_f});var wn=w(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.reportTypeError=ke.checkDataTypes=ke.checkDataType=ke.coerceAndCheckDataType=ke.getJSONTypes=ke.getSchemaTypes=ke.DataType=void 0;var Fv=oa(),Hv=sa(),Bv=_n(),K=z(),wf=X(),xr;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(xr||(ke.DataType=xr={}));function Uv(t){let e=bf(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}ke.getSchemaTypes=Uv;function bf(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(Fv.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}ke.getJSONTypes=bf;function Gv(t,e){let{gen:r,data:n,opts:i}=t,o=Wv(e,i.coerceTypes),s=e.length>0&&!(o.length===0&&e.length===1&&(0,Hv.schemaHasRulesForType)(t,e[0]));if(s){let a=ca(e,n,i.strictNumbers,xr.Wrong);r.if(a,()=>{o.length?zv(t,e,o):la(t)})}return s}ke.coerceAndCheckDataType=Gv;var Sf=new Set(["string","number","integer","boolean","null"]);function Wv(t,e){return e?t.filter(r=>Sf.has(r)||e==="array"&&r==="array"):[]}function zv(t,e,r){let{gen:n,data:i,opts:o}=t,s=n.let("dataType",(0,K._)`typeof ${i}`),a=n.let("coerced",(0,K._)`undefined`);o.coerceTypes==="array"&&n.if((0,K._)`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,K._)`${i}[0]`).assign(s,(0,K._)`typeof ${i}`).if(ca(e,i,o.strictNumbers),()=>n.assign(a,i))),n.if((0,K._)`${a} !== undefined`);for(let u of r)(Sf.has(u)||u==="array"&&o.coerceTypes==="array")&&l(u);n.else(),la(t),n.endIf(),n.if((0,K._)`${a} !== undefined`,()=>{n.assign(i,a),Kv(t,a)});function l(u){switch(u){case"string":n.elseIf((0,K._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,K._)`"" + ${i}`).elseIf((0,K._)`${i} === null`).assign(a,(0,K._)`""`);return;case"number":n.elseIf((0,K._)`${s} == "boolean" || ${i} === null
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|| ${s} === "boolean" || ${i} === null`).assign(a,(0,K._)`[${i}]`)}}}function Kv({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,K._)`${e} !== undefined`,()=>t.assign((0,K._)`${e}[${r}]`,n))}function aa(t,e,r,n=xr.Correct){let i=n===xr.Correct?K.operators.EQ:K.operators.NEQ,o;switch(t){case"null":return(0,K._)`${e} ${i} null`;case"array":o=(0,K._)`Array.isArray(${e})`;break;case"object":o=(0,K._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=s((0,K._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=s();break;default:return(0,K._)`typeof ${e} ${i} ${t}`}return n===xr.Correct?o:(0,K.not)(o);function s(a=K.nil){return(0,K.and)((0,K._)`typeof ${e} == "number"`,a,r?(0,K._)`isFinite(${e})`:K.nil)}}ke.checkDataType=aa;function ca(t,e,r,n){if(t.length===1)return aa(t[0],e,r,n);let i,o=(0,wf.toHash)(t);if(o.array&&o.object){let s=(0,K._)`typeof ${e} != "object"`;i=o.null?s:(0,K._)`!${e} || ${s}`,delete o.null,delete o.array,delete o.object}else i=K.nil;o.number&&delete o.integer;for(let s in o)i=(0,K.and)(i,aa(s,e,r,n));return i}ke.checkDataTypes=ca;var Jv={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,K._)`{type: ${t}}`:(0,K._)`{type: ${e}}`};function la(t){let e=Yv(t);(0,Bv.reportError)(e,Jv)}ke.reportTypeError=la;function Yv(t){let{gen:e,data:r,schema:n}=t,i=(0,wf.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var $f=w(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.assignDefaults=void 0;var Pr=z(),Xv=X();function Qv(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)Ef(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,o)=>Ef(t,o,i.default))}Di.assignDefaults=Qv;function Ef(t,e,r){let{gen:n,compositeRule:i,data:o,opts:s}=t;if(r===void 0)return;let a=(0,Pr._)`${o}${(0,Pr.getProperty)(e)}`;if(i){(0,Xv.checkStrictMode)(t,`default is ignored for: ${a}`);return}let l=(0,Pr._)`${a} === undefined`;s.useDefaults==="empty"&&(l=(0,Pr._)`${l} || ${a} === null || ${a} === ""`),n.if(l,(0,Pr._)`${a} = ${(0,Pr.stringify)(r)}`)}});var ze=w(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.validateUnion=se.validateArray=se.usePattern=se.callValidateCode=se.schemaProperties=se.allSchemaProperties=se.noPropertyInData=se.propertyInData=se.isOwnProperty=se.hasPropFunc=se.reportMissingProp=se.checkMissingProp=se.checkReportMissingProp=void 0;var ue=z(),ua=X(),jt=We(),Zv=X();function e_(t,e){let{gen:r,data:n,it:i}=t;r.if(da(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,ue._)`${e}`},!0),t.error()})}se.checkReportMissingProp=e_;function t_({gen:t,data:e,it:{opts:r}},n,i){return(0,ue.or)(...n.map(o=>(0,ue.and)(da(t,e,o,r.ownProperties),(0,ue._)`${i} = ${o}`)))}se.checkMissingProp=t_;function r_(t,e){t.setParams({missingProperty:e},!0),t.error()}se.reportMissingProp=r_;function Cf(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ue._)`Object.prototype.hasOwnProperty`})}se.hasPropFunc=Cf;function fa(t,e,r){return(0,ue._)`${Cf(t)}.call(${e}, ${r})`}se.isOwnProperty=fa;function n_(t,e,r,n){let i=(0,ue._)`${e}${(0,ue.getProperty)(r)} !== undefined`;return n?(0,ue._)`${i} && ${fa(t,e,r)}`:i}se.propertyInData=n_;function da(t,e,r,n){let i=(0,ue._)`${e}${(0,ue.getProperty)(r)} === undefined`;return n?(0,ue.or)(i,(0,ue.not)(fa(t,e,r))):i}se.noPropertyInData=da;function xf(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}se.allSchemaProperties=xf;function i_(t,e){return xf(e).filter(r=>!(0,ua.alwaysValidSchema)(t,e[r]))}se.schemaProperties=i_;function o_({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:s},a,l,u){let d=u?(0,ue._)`${t}, ${e}, ${n}${i}`:e,f=[[jt.default.instancePath,(0,ue.strConcat)(jt.default.instancePath,o)],[jt.default.parentData,s.parentData],[jt.default.parentDataProperty,s.parentDataProperty],[jt.default.rootData,jt.default.rootData]];s.opts.dynamicRef&&f.push([jt.default.dynamicAnchors,jt.default.dynamicAnchors]);let h=(0,ue._)`${d}, ${r.object(...f)}`;return l!==ue.nil?(0,ue._)`${a}.call(${l}, ${h})`:(0,ue._)`${a}(${h})`}se.callValidateCode=o_;var s_=(0,ue._)`new RegExp`;function a_({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,ue._)`${i.code==="new RegExp"?s_:(0,Zv.useFunc)(t,i)}(${r}, ${n})`})}se.usePattern=a_;function c_(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 l=e.const("len",(0,ue._)`${r}.length`);e.forRange("i",0,l,u=>{t.subschema({keyword:n,dataProp:u,dataPropType:ua.Type.Num},o),e.if((0,ue.not)(o),a)})}}se.validateArray=c_;function l_(t){let{gen:e,schema:r,keyword:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(l=>(0,ua.alwaysValidSchema)(i,l))&&!i.opts.unevaluated)return;let s=e.let("valid",!1),a=e.name("_valid");e.block(()=>r.forEach((l,u)=>{let d=t.subschema({keyword:n,schemaProp:u,compositeRule:!0},a);e.assign(s,(0,ue._)`${s} || ${a}`),t.mergeValidEvaluated(d,a)||e.if((0,ue.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}se.validateUnion=l_});var Of=w(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.validateKeywordUsage=ft.validSchemaType=ft.funcKeywordCode=ft.macroKeywordCode=void 0;var Ie=z(),tr=We(),u_=ze(),f_=_n();function d_(t,e){let{gen:r,keyword:n,schema:i,parentSchema:o,it:s}=t,a=e.macro.call(s.self,i,o,s),l=kf(r,n,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let u=r.name("valid");t.subschema({schema:a,schemaPath:Ie.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:l,compositeRule:!0},u),t.pass(u,()=>t.error(!0))}ft.macroKeywordCode=d_;function p_(t,e){var r;let{gen:n,keyword:i,schema:o,parentSchema:s,$data:a,it:l}=t;m_(l,e);let u=!a&&e.compile?e.compile.call(l.self,o,s,l):e.validate,d=kf(n,i,u),f=n.let("valid");t.block$data(f,h),t.ok((r=e.valid)!==null&&r!==void 0?r:f);function h(){if(e.errors===!1)v(),e.modifying&&Pf(t),P(()=>t.error());else{let S=e.async?m():g();e.modifying&&Pf(t),P(()=>h_(t,S))}}function m(){let S=n.let("ruleErrs",null);return n.try(()=>v((0,Ie._)`await `),q=>n.assign(f,!1).if((0,Ie._)`${q} instanceof ${l.ValidationError}`,()=>n.assign(S,(0,Ie._)`${q}.errors`),()=>n.throw(q))),S}function g(){let S=(0,Ie._)`${d}.errors`;return n.assign(S,null),v(Ie.nil),S}function v(S=e.async?(0,Ie._)`await `:Ie.nil){let q=l.opts.passContext?tr.default.this:tr.default.self,B=!("compile"in e&&!a||e.schema===!1);n.assign(f,(0,Ie._)`${S}${(0,u_.callValidateCode)(t,d,q,B)}`,e.modifying)}function P(S){var q;n.if((0,Ie.not)((q=e.valid)!==null&&q!==void 0?q:f),S)}}ft.funcKeywordCode=p_;function Pf(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,Ie._)`${n.parentData}[${n.parentDataProperty}]`))}function h_(t,e){let{gen:r}=t;r.if((0,Ie._)`Array.isArray(${e})`,()=>{r.assign(tr.default.vErrors,(0,Ie._)`${tr.default.vErrors} === null ? ${e} : ${tr.default.vErrors}.concat(${e})`).assign(tr.default.errors,(0,Ie._)`${tr.default.vErrors}.length`),(0,f_.extendErrors)(t)},()=>t.error())}function m_({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function kf(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,Ie.stringify)(r)})}function g_(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")}ft.validSchemaType=g_;function y_({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 l=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(l);else throw new Error(l)}}ft.validateKeywordUsage=y_});var Rf=w(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.extendSubschemaMode=Dt.extendSubschemaData=Dt.getSubschema=void 0;var dt=z(),Af=X();function v_(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,dt._)`${t.schemaPath}${(0,dt.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[r],schemaPath:(0,dt._)`${t.schemaPath}${(0,dt.getProperty)(e)}${(0,dt.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,Af.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')}Dt.getSubschema=v_;function __(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:u,dataPathArr:d,opts:f}=e,h=a.let("data",(0,dt._)`${e.data}${(0,dt.getProperty)(r)}`,!0);l(h),t.errorPath=(0,dt.str)`${u}${(0,Af.getErrorPath)(r,n,f.jsPropertySyntax)}`,t.parentDataProperty=(0,dt._)`${r}`,t.dataPathArr=[...d,t.parentDataProperty]}if(i!==void 0){let u=i instanceof dt.Name?i:a.let("data",i,!0);l(u),s!==void 0&&(t.propertyName=s)}o&&(t.dataTypes=o);function l(u){t.data=u,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,u]}}Dt.extendSubschemaData=__;function w_(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}Dt.extendSubschemaMode=w_});var pa=w((NP,If)=>{"use strict";If.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 Nf=w((MP,Tf)=>{"use strict";var qt=Tf.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(){};qi(e,n,i,t,"",t)};qt.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};qt.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};qt.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};qt.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 qi(t,e,r,n,i,o,s,a,l,u){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,o,s,a,l,u);for(var d in n){var f=n[d];if(Array.isArray(f)){if(d in qt.arrayKeywords)for(var h=0;h<f.length;h++)qi(t,e,r,f[h],i+"/"+d+"/"+h,o,i,d,n,h)}else if(d in qt.propsKeywords){if(f&&typeof f=="object")for(var m in f)qi(t,e,r,f[m],i+"/"+d+"/"+b_(m),o,i,d,n,m)}else(d in qt.keywords||t.allKeys&&!(d in qt.skipKeywords))&&qi(t,e,r,f,i+"/"+d,o,i,d,n)}r(n,i,o,s,a,l,u)}}function b_(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var bn=w(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.getSchemaRefs=je.resolveUrl=je.normalizeId=je._getFullPath=je.getFullPath=je.inlineRef=void 0;var S_=X(),E_=pa(),$_=Nf(),C_=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function x_(t,e=!0){return typeof t=="boolean"?!0:e===!0?!ha(t):e?Mf(t)<=e:!1}je.inlineRef=x_;var P_=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function ha(t){for(let e in t){if(P_.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(ha)||typeof r=="object"&&ha(r))return!0}return!1}function Mf(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!C_.has(r)&&(typeof t[r]=="object"&&(0,S_.eachItem)(t[r],n=>e+=Mf(n)),e===1/0))return 1/0}return e}function Lf(t,e="",r){r!==!1&&(e=kr(e));let n=t.parse(e);return jf(t,n)}je.getFullPath=Lf;function jf(t,e){return t.serialize(e).split("#")[0]+"#"}je._getFullPath=jf;var k_=/#\/?$/;function kr(t){return t?t.replace(k_,""):""}je.normalizeId=kr;function O_(t,e,r){return r=kr(r),t.resolve(e,r)}je.resolveUrl=O_;var A_=/^[a-z_][-a-z0-9._]*$/i;function R_(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=kr(t[r]||e),o={"":i},s=Lf(n,i,!1),a={},l=new Set;return $_(t,{allKeys:!0},(f,h,m,g)=>{if(g===void 0)return;let v=s+h,P=o[g];typeof f[r]=="string"&&(P=S.call(this,f[r])),q.call(this,f.$anchor),q.call(this,f.$dynamicAnchor),o[h]=P;function S(B){let j=this.opts.uriResolver.resolve;if(B=kr(P?j(P,B):B),l.has(B))throw d(B);l.add(B);let L=this.refs[B];return typeof L=="string"&&(L=this.refs[L]),typeof L=="object"?u(f,L.schema,B):B!==kr(v)&&(B[0]==="#"?(u(f,a[B],B),a[B]=f):this.refs[B]=v),B}function q(B){if(typeof B=="string"){if(!A_.test(B))throw new Error(`invalid anchor "${B}"`);S.call(this,`#${B}`)}}}),a;function u(f,h,m){if(h!==void 0&&!E_(f,h))throw d(m)}function d(f){return new Error(`reference "${f}" resolves to more than one schema`)}}je.getSchemaRefs=R_});var $n=w(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.getData=Vt.KeywordCxt=Vt.validateFunctionCode=void 0;var Hf=yf(),Df=wn(),ga=sa(),Vi=wn(),I_=$f(),En=Of(),ma=Rf(),V=z(),W=We(),T_=bn(),kt=X(),Sn=_n();function N_(t){if(Gf(t)&&(Wf(t),Uf(t))){j_(t);return}Bf(t,()=>(0,Hf.topBoolOrEmptySchema)(t))}Vt.validateFunctionCode=N_;function Bf({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},o){i.code.es5?t.func(e,(0,V._)`${W.default.data}, ${W.default.valCxt}`,n.$async,()=>{t.code((0,V._)`"use strict"; ${qf(r,i)}`),L_(t,i),t.code(o)}):t.func(e,(0,V._)`${W.default.data}, ${M_(i)}`,n.$async,()=>t.code(qf(r,i)).code(o))}function M_(t){return(0,V._)`{${W.default.instancePath}="", ${W.default.parentData}, ${W.default.parentDataProperty}, ${W.default.rootData}=${W.default.data}${t.dynamicRef?(0,V._)`, ${W.default.dynamicAnchors}={}`:V.nil}}={}`}function L_(t,e){t.if(W.default.valCxt,()=>{t.var(W.default.instancePath,(0,V._)`${W.default.valCxt}.${W.default.instancePath}`),t.var(W.default.parentData,(0,V._)`${W.default.valCxt}.${W.default.parentData}`),t.var(W.default.parentDataProperty,(0,V._)`${W.default.valCxt}.${W.default.parentDataProperty}`),t.var(W.default.rootData,(0,V._)`${W.default.valCxt}.${W.default.rootData}`),e.dynamicRef&&t.var(W.default.dynamicAnchors,(0,V._)`${W.default.valCxt}.${W.default.dynamicAnchors}`)},()=>{t.var(W.default.instancePath,(0,V._)`""`),t.var(W.default.parentData,(0,V._)`undefined`),t.var(W.default.parentDataProperty,(0,V._)`undefined`),t.var(W.default.rootData,W.default.data),e.dynamicRef&&t.var(W.default.dynamicAnchors,(0,V._)`{}`)})}function j_(t){let{schema:e,opts:r,gen:n}=t;Bf(t,()=>{r.$comment&&e.$comment&&Kf(t),H_(t),n.let(W.default.vErrors,null),n.let(W.default.errors,0),r.unevaluated&&D_(t),zf(t),G_(t)})}function D_(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,V._)`${r}.evaluated`),e.if((0,V._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,V._)`${t.evaluated}.props`,(0,V._)`undefined`)),e.if((0,V._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,V._)`${t.evaluated}.items`,(0,V._)`undefined`))}function qf(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,V._)`/*# sourceURL=${r} */`:V.nil}function q_(t,e){if(Gf(t)&&(Wf(t),Uf(t))){V_(t,e);return}(0,Hf.boolOrEmptySchema)(t,e)}function Uf({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 Gf(t){return typeof t.schema!="boolean"}function V_(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&Kf(t),B_(t),U_(t);let o=n.const("_errs",W.default.errors);zf(t,o),n.var(e,(0,V._)`${o} === ${W.default.errors}`)}function Wf(t){(0,kt.checkUnknownRules)(t),F_(t)}function zf(t,e){if(t.opts.jtd)return Vf(t,[],!1,e);let r=(0,Df.getSchemaTypes)(t.schema),n=(0,Df.coerceAndCheckDataType)(t,r);Vf(t,r,!n,e)}function F_(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,kt.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function H_(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,kt.checkStrictMode)(t,"default is ignored in the schema root")}function B_(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,T_.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function U_(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Kf({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)t.code((0,V._)`${W.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let s=(0,V.str)`${n}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,V._)`${W.default.self}.opts.$comment(${o}, ${s}, ${a}.schema)`)}}function G_(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=t;r.$async?e.if((0,V._)`${W.default.errors} === 0`,()=>e.return(W.default.data),()=>e.throw((0,V._)`new ${i}(${W.default.vErrors})`)):(e.assign((0,V._)`${n}.errors`,W.default.vErrors),o.unevaluated&&W_(t),e.return((0,V._)`${W.default.errors} === 0`))}function W_({gen:t,evaluated:e,props:r,items:n}){r instanceof V.Name&&t.assign((0,V._)`${e}.props`,r),n instanceof V.Name&&t.assign((0,V._)`${e}.items`,n)}function Vf(t,e,r,n){let{gen:i,schema:o,data:s,allErrors:a,opts:l,self:u}=t,{RULES:d}=u;if(o.$ref&&(l.ignoreKeywordsWithRef||!(0,kt.schemaHasRulesButRef)(o,d))){i.block(()=>Yf(t,"$ref",d.all.$ref.definition));return}l.jtd||z_(t,e),i.block(()=>{for(let h of d.rules)f(h);f(d.post)});function f(h){(0,ga.shouldUseGroup)(o,h)&&(h.type?(i.if((0,Vi.checkDataType)(h.type,s,l.strictNumbers)),Ff(t,h),e.length===1&&e[0]===h.type&&r&&(i.else(),(0,Vi.reportTypeError)(t)),i.endIf()):Ff(t,h),a||i.if((0,V._)`${W.default.errors} === ${n||0}`))}}function Ff(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,I_.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0,ga.shouldUseRule)(n,o)&&Yf(t,o.keyword,o.definition,e.type)})}function z_(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(K_(t,e),t.opts.allowUnionTypes||J_(t,e),Y_(t,t.dataTypes))}function K_(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Jf(t.dataTypes,r)||ya(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),Q_(t,e)}}function J_(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&ya(t,"use allowUnionTypes to allow union type keyword")}function Y_(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,ga.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(s=>X_(e,s))&&ya(t,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function X_(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Jf(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function Q_(t,e){let r=[];for(let n of t.dataTypes)Jf(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function ya(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,kt.checkStrictMode)(t,e,t.opts.strictTypes)}var Fi=class{constructor(e,r,n){if((0,En.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,kt.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",Xf(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,En.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",W.default.errors))}result(e,r,n){this.failResult((0,V.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,V.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,V._)`${r} !== undefined && (${(0,V.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?Sn.reportExtraError:Sn.reportError)(this,this.def.error,r)}$dataError(){(0,Sn.reportError)(this,this.def.$dataError||Sn.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Sn.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=V.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=V.nil,r=V.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:s}=this;n.if((0,V.or)((0,V._)`${i} === undefined`,r)),e!==V.nil&&n.assign(e,!0),(o.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==V.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,V.or)(s(),a());function s(){if(n.length){if(!(r instanceof V.Name))throw new Error("ajv implementation error");let l=Array.isArray(n)?n:[n];return(0,V._)`${(0,Vi.checkDataTypes)(l,r,o.opts.strictNumbers,Vi.DataType.Wrong)}`}return V.nil}function a(){if(i.validateSchema){let l=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,V._)`!${l}(${r})`}return V.nil}}subschema(e,r){let n=(0,ma.getSubschema)(this.it,e);(0,ma.extendSubschemaData)(n,this.it,e),(0,ma.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return q_(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=kt.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=kt.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,V.Name)),!0}};Vt.KeywordCxt=Fi;function Yf(t,e,r,n){let i=new Fi(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,En.funcKeywordCode)(i,r):"macro"in r?(0,En.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,En.funcKeywordCode)(i,r)}var Z_=/^\/(?:[^~]|~0|~1)*$/,ew=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Xf(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,o;if(t==="")return W.default.rootData;if(t[0]==="/"){if(!Z_.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=W.default.rootData}else{let u=ew.exec(t);if(!u)throw new Error(`Invalid JSON-pointer: ${t}`);let d=+u[1];if(i=u[2],i==="#"){if(d>=e)throw new Error(l("property/index",d));return n[e-d]}if(d>e)throw new Error(l("data",d));if(o=r[e-d],!i)return o}let s=o,a=i.split("/");for(let u of a)u&&(o=(0,V._)`${o}${(0,V.getProperty)((0,kt.unescapeJsonPointer)(u))}`,s=(0,V._)`${s} && ${o}`);return s;function l(u,d){return`Cannot access ${u} ${d} levels up, current level is ${e}`}}Vt.getData=Xf});var Hi=w(_a=>{"use strict";Object.defineProperty(_a,"__esModule",{value:!0});var va=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};_a.default=va});var Cn=w(Sa=>{"use strict";Object.defineProperty(Sa,"__esModule",{value:!0});var wa=bn(),ba=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,wa.resolveUrl)(e,r,n),this.missingSchema=(0,wa.normalizeId)((0,wa.getFullPath)(e,this.missingRef))}};Sa.default=ba});var xn=w(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.resolveSchema=Ke.getCompilingSchema=Ke.resolveRef=Ke.compileSchema=Ke.SchemaEnv=void 0;var ot=z(),tw=Hi(),rr=We(),st=bn(),Qf=X(),rw=$n(),Or=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,st.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};Ke.SchemaEnv=Or;function $a(t){let e=Zf.call(this,t);if(e)return e;let r=(0,st.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,s=new ot.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),a;t.$async&&(a=s.scopeValue("Error",{ref:tw.default,code:(0,ot._)`require("ajv/dist/runtime/validation_error").default`}));let l=s.scopeName("validate");t.validateName=l;let u={gen:s,allErrors:this.opts.allErrors,data:rr.default.data,parentData:rr.default.parentData,parentDataProperty:rr.default.parentDataProperty,dataNames:[rr.default.data],dataPathArr:[ot.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,ot.stringify)(t.schema)}:{ref:t.schema}),validateName:l,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:ot.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,ot._)`""`,opts:this.opts,self:this},d;try{this._compilations.add(t),(0,rw.validateFunctionCode)(u),s.optimize(this.opts.code.optimize);let f=s.toString();d=`${s.scopeRefs(rr.default.scope)}return ${f}`,this.opts.code.process&&(d=this.opts.code.process(d,t));let m=new Function(`${rr.default.self}`,`${rr.default.scope}`,d)(this,this.scope.get());if(this.scope.value(l,{ref:m}),m.errors=null,m.schema=t.schema,m.schemaEnv=t,t.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:l,validateCode:f,scopeValues:s._values}),this.opts.unevaluated){let{props:g,items:v}=u;m.evaluated={props:g instanceof ot.Name?void 0:g,items:v instanceof ot.Name?void 0:v,dynamicProps:g instanceof ot.Name,dynamicItems:v instanceof ot.Name},m.source&&(m.source.evaluated=(0,ot.stringify)(m.evaluated))}return t.validate=m,t}catch(f){throw delete t.validate,delete t.validateName,d&&this.logger.error("Error compiling schema, function code:",d),f}finally{this._compilations.delete(t)}}Ke.compileSchema=$a;function nw(t,e,r){var n;r=(0,st.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let o=sw.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 Or({schema:s,schemaId:a,root:t,baseId:e}))}if(o!==void 0)return t.refs[r]=iw.call(this,o)}Ke.resolveRef=nw;function iw(t){return(0,st.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:$a.call(this,t)}function Zf(t){for(let e of this._compilations)if(ow(e,t))return e}Ke.getCompilingSchema=Zf;function ow(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function sw(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||Bi.call(this,t,e)}function Bi(t,e){let r=this.opts.uriResolver.parse(e),n=(0,st._getFullPath)(this.opts.uriResolver,r),i=(0,st.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return Ea.call(this,r,t);let o=(0,st.normalizeId)(n),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){let a=Bi.call(this,t,s);return typeof a?.schema!="object"?void 0:Ea.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||$a.call(this,s),o===(0,st.normalizeId)(e)){let{schema:a}=s,{schemaId:l}=this.opts,u=a[l];return u&&(i=(0,st.resolveUrl)(this.opts.uriResolver,i,u)),new Or({schema:a,schemaId:l,root:t,baseId:i})}return Ea.call(this,r,s)}}Ke.resolveSchema=Bi;var aw=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Ea(t,{baseId:e,schema:r,root:n}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let l=r[(0,Qf.unescapeFragment)(a)];if(l===void 0)return;r=l;let u=typeof r=="object"&&r[this.opts.schemaId];!aw.has(a)&&u&&(e=(0,st.resolveUrl)(this.opts.uriResolver,e,u))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,Qf.schemaHasRulesButRef)(r,this.RULES)){let a=(0,st.resolveUrl)(this.opts.uriResolver,e,r.$ref);o=Bi.call(this,n,a)}let{schemaId:s}=this.opts;if(o=o||new Or({schema:r,schemaId:s,root:n,baseId:e}),o.schema!==o.root.schema)return o}});var ed=w((FP,cw)=>{cw.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 Pa=w((HP,sd)=>{"use strict";var lw=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),rd=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),Ca=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),nd=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),uw=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function xa(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 fw=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function td(t){return t.length=0,!0}function dw(t,e,r){if(t.length){let n=xa(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function pw(t){let e=0,r={error:!1,address:"",zone:""},n=[],i=[],o=!1,s=!1,a=dw;for(let l=0;l<t.length;l++){let u=t[l];if(!(u==="["||u==="]"))if(u===":"){if(o===!0&&(s=!0),!a(i,n,r))break;if(++e>7){r.error=!0;break}l>0&&t[l-1]===":"&&(o=!0),n.push(":");continue}else if(u==="%"){if(!a(i,n,r))break;a=td}else{i.push(u);continue}}return i.length&&(a===td?r.zone=i.join(""):s?n.push(i.join("")):n.push(xa(i))),r.address=n.join(""),r}function id(t){if(hw(t,":")<2)return{host:t,isIPV6:!1};let e=pw(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 hw(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function mw(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 gw={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},yw=/[@/?#:]/g,vw=/[@/?#]/g;function od(t,e){let r=e?vw:yw;return r.lastIndex=0,t.replace(r,n=>gw[n])}function _w(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(Ca(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));e&&nd(s)?r+=s:r+="%"+o,n+=2;continue}}r+=t[n]}return r}function ww(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(Ca(n)){let i=n.toUpperCase(),o=String.fromCharCode(parseInt(i,16));o!=="."&&nd(o)?e+=o:e+="%"+i,r+=2;continue}}uw(t[r])?e+=t[r]:e+=escape(t[r])}return e}function bw(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(Ca(n)){e+="%"+n.toUpperCase(),r+=2;continue}}e+=escape(t[r])}return e}function Sw(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!rd(r)){let n=id(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=od(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}sd.exports={nonSimpleDomain:fw,recomposeAuthority:Sw,reescapeHostDelimiters:od,normalizePercentEncoding:_w,normalizePathEncoding:ww,escapePreservingEscapes:bw,removeDotSegments:mw,isIPv4:rd,isUUID:lw,normalizeIPv6:id,stringArrayToHexStripped:xa}});var fd=w((BP,ud)=>{"use strict";var{isUUID:Ew}=Pa(),$w=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,Cw=["http","https","ws","wss","urn","urn:uuid"];function xw(t){return Cw.indexOf(t)!==-1}function ka(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 ad(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function cd(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 Pw(t){return t.secure=ka(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function kw(t){if((t.port===(ka(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}function Ow(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match($w);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=Oa(i);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function Aw(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=e.scheme||t.scheme||"urn",n=t.nid.toLowerCase(),i=`${r}:${e.nid||n}`,o=Oa(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 Rw(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!Ew(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function Iw(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var ld={scheme:"http",domainHost:!0,parse:ad,serialize:cd},Tw={scheme:"https",domainHost:ld.domainHost,parse:ad,serialize:cd},Ui={scheme:"ws",domainHost:!0,parse:Pw,serialize:kw},Nw={scheme:"wss",domainHost:Ui.domainHost,parse:Ui.parse,serialize:Ui.serialize},Mw={scheme:"urn",parse:Ow,serialize:Aw,skipNormalize:!0},Lw={scheme:"urn:uuid",parse:Rw,serialize:Iw,skipNormalize:!0},Gi={http:ld,https:Tw,ws:Ui,wss:Nw,urn:Mw,"urn:uuid":Lw};Object.setPrototypeOf(Gi,null);function Oa(t){return t&&(Gi[t]||Gi[t.toLowerCase()])||void 0}ud.exports={wsIsSecure:ka,SCHEMES:Gi,isValidSchemeName:xw,getSchemeHandler:Oa}});var yd=w((UP,Wi)=>{"use strict";var{normalizeIPv6:jw,removeDotSegments:Pn,recomposeAuthority:Dw,normalizePercentEncoding:qw,normalizePathEncoding:Vw,escapePreservingEscapes:Fw,reescapeHostDelimiters:Hw,isIPv4:Bw,nonSimpleDomain:Uw}=Pa(),{SCHEMES:Gw,getSchemeHandler:pd}=fd();function Ww(t,e){return typeof t=="string"?t=Xw(t,e):typeof t=="object"&&(t=Ar(nr(t,e),e)),t}function zw(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=hd(Ar(t,n),Ar(e,n),n,!0);return n.skipEscape=!0,nr(i,n)}function hd(t,e,r,n){let i={};return n||(t=Ar(nr(t,r),r),e=Ar(nr(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(i.scheme=e.scheme,i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=Pn(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=Pn(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=Pn(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=Pn(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 Kw(t,e,r){let n=dd(t,r),i=dd(e,r);return n!==void 0&&i!==void 0&&n.toLowerCase()===i.toLowerCase()}function nr(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},n=Object.assign({},e),i=[],o=pd(n.scheme||r.scheme);o&&o.serialize&&o.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=qw(r.path):(r.path=Fw(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let s=Dw(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=Pn(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 Jw=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Yw(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 md(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(Jw);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=Yw(n,s);if(a!==void 0&&(n.error=n.error||a,i=!0),n.host)if(Bw(n.host)===!1){let d=jw(n.host);n.host=d.host.toLowerCase(),o=d.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 l=pd(r.scheme||n.scheme);if(!r.unicodeSupport&&(!l||!l.unicodeSupport)&&n.host&&(r.domainHost||l&&l.domainHost)&&o===!1&&Uw(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(u){n.error=n.error||"Host's domain name can not be converted to ASCII: "+u}if((!l||l&&!l.skipNormalize)&&(t.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=Hw(unescape(n.host),o))),n.path&&(n.path=Vw(n.path)),n.fragment))try{n.fragment=encodeURI(decodeURIComponent(n.fragment))}catch{n.error=n.error||"URI malformed"}l&&l.parse&&l.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:i}}function Ar(t,e){return md(t,e).parsed}function Xw(t,e){return gd(t,e).normalized}function gd(t,e){let{parsed:r,malformedAuthorityOrPort:n}=md(t,e);return{normalized:n?t:nr(r,e),malformedAuthorityOrPort:n}}function dd(t,e){if(typeof t=="string"){let{normalized:r,malformedAuthorityOrPort:n}=gd(t,e);return n?void 0:r}if(typeof t=="object")return nr(t,e)}var Aa={SCHEMES:Gw,normalize:Ww,resolve:zw,resolveComponent:hd,equal:Kw,serialize:nr,parse:Ar};Wi.exports=Aa;Wi.exports.default=Aa;Wi.exports.fastUri=Aa});var _d=w(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});var vd=yd();vd.code='require("ajv/dist/runtime/uri").default';Ra.default=vd});var Pd=w(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.CodeGen=Se.Name=Se.nil=Se.stringify=Se.str=Se._=Se.KeywordCxt=void 0;var Qw=$n();Object.defineProperty(Se,"KeywordCxt",{enumerable:!0,get:function(){return Qw.KeywordCxt}});var Rr=z();Object.defineProperty(Se,"_",{enumerable:!0,get:function(){return Rr._}});Object.defineProperty(Se,"str",{enumerable:!0,get:function(){return Rr.str}});Object.defineProperty(Se,"stringify",{enumerable:!0,get:function(){return Rr.stringify}});Object.defineProperty(Se,"nil",{enumerable:!0,get:function(){return Rr.nil}});Object.defineProperty(Se,"Name",{enumerable:!0,get:function(){return Rr.Name}});Object.defineProperty(Se,"CodeGen",{enumerable:!0,get:function(){return Rr.CodeGen}});var Zw=Hi(),$d=Cn(),e0=oa(),kn=xn(),t0=z(),On=bn(),zi=wn(),Ta=X(),wd=ed(),r0=_d(),Cd=(t,e)=>new RegExp(t,e);Cd.code="new RegExp";var n0=["removeAdditional","useDefaults","coerceTypes"],i0=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),o0={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."},s0={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},bd=200;function a0(t){var e,r,n,i,o,s,a,l,u,d,f,h,m,g,v,P,S,q,B,j,L,Q,ne,Tt,et;let be=t.strict,Ne=(e=t.code)===null||e===void 0?void 0:e.optimize,Ce=Ne===!0||Ne===void 0?1:Ne||0,tt=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:Cd,rt=(i=t.uriResolver)!==null&&i!==void 0?i:r0.default;return{strictSchema:(s=(o=t.strictSchema)!==null&&o!==void 0?o:be)!==null&&s!==void 0?s:!0,strictNumbers:(l=(a=t.strictNumbers)!==null&&a!==void 0?a:be)!==null&&l!==void 0?l:!0,strictTypes:(d=(u=t.strictTypes)!==null&&u!==void 0?u:be)!==null&&d!==void 0?d:"log",strictTuples:(h=(f=t.strictTuples)!==null&&f!==void 0?f:be)!==null&&h!==void 0?h:"log",strictRequired:(g=(m=t.strictRequired)!==null&&m!==void 0?m:be)!==null&&g!==void 0?g:!1,code:t.code?{...t.code,optimize:Ce,regExp:tt}:{optimize:Ce,regExp:tt},loopRequired:(v=t.loopRequired)!==null&&v!==void 0?v:bd,loopEnum:(P=t.loopEnum)!==null&&P!==void 0?P:bd,meta:(S=t.meta)!==null&&S!==void 0?S:!0,messages:(q=t.messages)!==null&&q!==void 0?q:!0,inlineRefs:(B=t.inlineRefs)!==null&&B!==void 0?B:!0,schemaId:(j=t.schemaId)!==null&&j!==void 0?j:"$id",addUsedSchema:(L=t.addUsedSchema)!==null&&L!==void 0?L:!0,validateSchema:(Q=t.validateSchema)!==null&&Q!==void 0?Q:!0,validateFormats:(ne=t.validateFormats)!==null&&ne!==void 0?ne:!0,unicodeRegExp:(Tt=t.unicodeRegExp)!==null&&Tt!==void 0?Tt:!0,int32range:(et=t.int32range)!==null&&et!==void 0?et:!0,uriResolver:rt}}var An=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...a0(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new t0.ValueScope({scope:{},prefixes:i0,es5:r,lines:n}),this.logger=p0(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,e0.getRules)(),Sd.call(this,o0,e,"NOT SUPPORTED"),Sd.call(this,s0,e,"DEPRECATED","warn"),this._metaOpts=f0.call(this),e.formats&&l0.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&u0.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),c0.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=wd;n==="id"&&(i={...wd},i.id=i.$id,delete i.$id),r&&e&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,e,r);async function i(d,f){await o.call(this,d.$schema);let h=this._addSchema(d,f);return h.validate||s.call(this,h)}async function o(d){d&&!this.getSchema(d)&&await i.call(this,{$ref:d},!0)}async function s(d){try{return this._compileSchemaEnv(d)}catch(f){if(!(f instanceof $d.default))throw f;return a.call(this,f),await l.call(this,f.missingSchema),s.call(this,d)}}function a({missingSchema:d,missingRef:f}){if(this.refs[d])throw new Error(`AnySchema ${d} is loaded but ${f} cannot be resolved`)}async function l(d){let f=await u.call(this,d);this.refs[d]||await o.call(this,f.$schema),this.refs[d]||this.addSchema(f,d,r)}async function u(d){let f=this._loading[d];if(f)return f;try{return await(this._loading[d]=n(d))}finally{delete this._loading[d]}}}addSchema(e,r,n,i=this.opts.validateSchema){if(Array.isArray(e)){for(let 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,On.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=Ed.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new kn.SchemaEnv({schema:{},schemaId:n});if(r=kn.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=Ed.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,On.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(m0.call(this,n,r),!r)return(0,Ta.eachItem)(n,o=>Ia.call(this,o)),this;y0.call(this,r);let i={...r,type:(0,zi.getJSONTypes)(r.type),schemaType:(0,zi.getJSONTypes)(r.schemaType)};return(0,Ta.eachItem)(n,i.type.length===0?o=>Ia.call(this,o,i):o=>i.type.forEach(s=>Ia.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 l=n[a];if(typeof l!="object")continue;let{$data:u}=l.definition,d=s[a];u&&d&&(s[a]=xd(d))}}return e}_removeAllSchemas(e,r){for(let n in e){let i=e[n];(!r||r.test(n))&&(typeof i=="string"?delete e[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[n]))}}_addSchema(e,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof e=="object")s=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let l=this._cache.get(e);if(l!==void 0)return l;n=(0,On.normalizeId)(s||n);let u=On.getSchemaRefs.call(this,e,n);return l=new kn.SchemaEnv({schema:e,schemaId:a,meta:r,baseId:n,localRefs:u}),this._cache.set(l.schema,l),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=l),i&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):kn.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{kn.compileSchema.call(this,e)}finally{this.opts=r}}};An.ValidationError=Zw.default;An.MissingRefError=$d.default;Se.default=An;function Sd(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 Ed(t){return t=(0,On.normalizeId)(t),this.schemas[t]||this.refs[t]}function c0(){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 l0(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function u0(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 f0(){let t={...this.opts};for(let e of n0)delete t[e];return t}var d0={log(){},warn(){},error(){}};function p0(t){if(t===!1)return d0;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 h0=/^[a-z_$][a-z0-9_$:-]*$/i;function m0(t,e){let{RULES:r}=this;if((0,Ta.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!h0.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 Ia(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:l})=>l===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,zi.getJSONTypes)(e.type),schemaType:(0,zi.getJSONTypes)(e.schemaType)}};e.before?g0.call(this,s,a,e.before):s.rules.push(a),o.all[t]=a,(n=e.implements)===null||n===void 0||n.forEach(l=>this.addKeyword(l))}function g0(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 y0(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=xd(e)),t.validateSchema=this.compile(e,!0))}var v0={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function xd(t){return{anyOf:[t,v0]}}});var kd=w(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});var _0={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Na.default=_0});var Yi=w(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.callRef=ir.getValidate=void 0;var w0=Cn(),Od=ze(),De=z(),Ir=We(),Ad=xn(),Ki=X(),b0={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:o,validateName:s,opts:a,self:l}=n,{root:u}=o;if((r==="#"||r==="#/")&&i===u.baseId)return f();let d=Ad.resolveRef.call(l,u,i,r);if(d===void 0)throw new w0.default(n.opts.uriResolver,i,r);if(d instanceof Ad.SchemaEnv)return h(d);return m(d);function f(){if(o===u)return Ji(t,s,o,o.$async);let g=e.scopeValue("root",{ref:u});return Ji(t,(0,De._)`${g}.validate`,u,u.$async)}function h(g){let v=Rd(t,g);Ji(t,v,g,g.$async)}function m(g){let v=e.scopeValue("schema",a.code.source===!0?{ref:g,code:(0,De.stringify)(g)}:{ref:g}),P=e.name("valid"),S=t.subschema({schema:g,dataTypes:[],schemaPath:De.nil,topSchemaRef:v,errSchemaPath:r},P);t.mergeEvaluated(S),t.ok(P)}}};function Rd(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,De._)`${r.scopeValue("wrapper",{ref:e})}.validate`}ir.getValidate=Rd;function Ji(t,e,r,n){let{gen:i,it:o}=t,{allErrors:s,schemaEnv:a,opts:l}=o,u=l.passContext?Ir.default.this:De.nil;n?d():f();function d(){if(!a.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,De._)`await ${(0,Od.callValidateCode)(t,e,u)}`),m(e),s||i.assign(g,!0)},v=>{i.if((0,De._)`!(${v} instanceof ${o.ValidationError})`,()=>i.throw(v)),h(v),s||i.assign(g,!1)}),t.ok(g)}function f(){t.result((0,Od.callValidateCode)(t,e,u),()=>m(e),()=>h(e))}function h(g){let v=(0,De._)`${g}.errors`;i.assign(Ir.default.vErrors,(0,De._)`${Ir.default.vErrors} === null ? ${v} : ${Ir.default.vErrors}.concat(${v})`),i.assign(Ir.default.errors,(0,De._)`${Ir.default.vErrors}.length`)}function m(g){var v;if(!o.opts.unevaluated)return;let P=(v=r?.validate)===null||v===void 0?void 0:v.evaluated;if(o.props!==!0)if(P&&!P.dynamicProps)P.props!==void 0&&(o.props=Ki.mergeEvaluated.props(i,P.props,o.props));else{let S=i.var("props",(0,De._)`${g}.evaluated.props`);o.props=Ki.mergeEvaluated.props(i,S,o.props,De.Name)}if(o.items!==!0)if(P&&!P.dynamicItems)P.items!==void 0&&(o.items=Ki.mergeEvaluated.items(i,P.items,o.items));else{let S=i.var("items",(0,De._)`${g}.evaluated.items`);o.items=Ki.mergeEvaluated.items(i,S,o.items,De.Name)}}}ir.callRef=Ji;ir.default=b0});var Id=w(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});var S0=kd(),E0=Yi(),$0=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",S0.default,E0.default];Ma.default=$0});var Td=w(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});var Xi=z(),Ft=Xi.operators,Qi={maximum:{okStr:"<=",ok:Ft.LTE,fail:Ft.GT},minimum:{okStr:">=",ok:Ft.GTE,fail:Ft.LT},exclusiveMaximum:{okStr:"<",ok:Ft.LT,fail:Ft.GTE},exclusiveMinimum:{okStr:">",ok:Ft.GT,fail:Ft.LTE}},C0={message:({keyword:t,schemaCode:e})=>(0,Xi.str)`must be ${Qi[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Xi._)`{comparison: ${Qi[t].okStr}, limit: ${e}}`},x0={keyword:Object.keys(Qi),type:"number",schemaType:"number",$data:!0,error:C0,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,Xi._)`${r} ${Qi[e].fail} ${n} || isNaN(${r})`)}};La.default=x0});var Nd=w(ja=>{"use strict";Object.defineProperty(ja,"__esModule",{value:!0});var Rn=z(),P0={message:({schemaCode:t})=>(0,Rn.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Rn._)`{multipleOf: ${t}}`},k0={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:P0,code(t){let{gen:e,data:r,schemaCode:n,it:i}=t,o=i.opts.multipleOfPrecision,s=e.let("res"),a=o?(0,Rn._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,Rn._)`${s} !== parseInt(${s})`;t.fail$data((0,Rn._)`(${n} === 0 || (${s} = ${r}/${n}, ${a}))`)}};ja.default=k0});var Ld=w(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});function Md(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}Da.default=Md;Md.code='require("ajv/dist/runtime/ucs2length").default'});var jd=w(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});var or=z(),O0=X(),A0=Ld(),R0={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,or.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,or._)`{limit: ${t}}`},I0={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:R0,code(t){let{keyword:e,data:r,schemaCode:n,it:i}=t,o=e==="maxLength"?or.operators.GT:or.operators.LT,s=i.opts.unicode===!1?(0,or._)`${r}.length`:(0,or._)`${(0,O0.useFunc)(t.gen,A0.default)}(${r})`;t.fail$data((0,or._)`${s} ${o} ${n}`)}};qa.default=I0});var Dd=w(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});var T0=ze(),N0=X(),Tr=z(),M0={message:({schemaCode:t})=>(0,Tr.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Tr._)`{pattern: ${t}}`},L0={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:M0,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:l}=s.opts.code,u=l.code==="new RegExp"?(0,Tr._)`new RegExp`:(0,N0.useFunc)(e,l),d=e.let("valid");e.try(()=>e.assign(d,(0,Tr._)`${u}(${o}, ${a}).test(${r})`),()=>e.assign(d,!1)),t.fail$data((0,Tr._)`!${d}`)}else{let l=(0,T0.usePattern)(t,i);t.fail$data((0,Tr._)`!${l}.test(${r})`)}}};Va.default=L0});var qd=w(Fa=>{"use strict";Object.defineProperty(Fa,"__esModule",{value:!0});var In=z(),j0={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,In.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,In._)`{limit: ${t}}`},D0={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:j0,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?In.operators.GT:In.operators.LT;t.fail$data((0,In._)`Object.keys(${r}).length ${i} ${n}`)}};Fa.default=D0});var Vd=w(Ha=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});var Tn=ze(),Nn=z(),q0=X(),V0={message:({params:{missingProperty:t}})=>(0,Nn.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Nn._)`{missingProperty: ${t}}`},F0={keyword:"required",type:"object",schemaType:"array",$data:!0,error:V0,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 l=r.length>=a.loopRequired;if(s.allErrors?u():d(),a.strictRequired){let m=t.parentSchema.properties,{definedProperties:g}=t.it;for(let v of r)if(m?.[v]===void 0&&!g.has(v)){let P=s.schemaEnv.baseId+s.errSchemaPath,S=`required property "${v}" is not defined at "${P}" (strictRequired)`;(0,q0.checkStrictMode)(s,S,s.opts.strictRequired)}}function u(){if(l||o)t.block$data(Nn.nil,f);else for(let m of r)(0,Tn.checkReportMissingProp)(t,m)}function d(){let m=e.let("missing");if(l||o){let g=e.let("valid",!0);t.block$data(g,()=>h(m,g)),t.ok(g)}else e.if((0,Tn.checkMissingProp)(t,r,m)),(0,Tn.reportMissingProp)(t,m),e.else()}function f(){e.forOf("prop",n,m=>{t.setParams({missingProperty:m}),e.if((0,Tn.noPropertyInData)(e,i,m,a.ownProperties),()=>t.error())})}function h(m,g){t.setParams({missingProperty:m}),e.forOf(m,n,()=>{e.assign(g,(0,Tn.propertyInData)(e,i,m,a.ownProperties)),e.if((0,Nn.not)(g),()=>{t.error(),e.break()})},Nn.nil)}}};Ha.default=F0});var Fd=w(Ba=>{"use strict";Object.defineProperty(Ba,"__esModule",{value:!0});var Mn=z(),H0={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,Mn.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,Mn._)`{limit: ${t}}`},B0={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:H0,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?Mn.operators.GT:Mn.operators.LT;t.fail$data((0,Mn._)`${r}.length ${i} ${n}`)}};Ba.default=B0});var Zi=w(Ua=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});var Hd=pa();Hd.code='require("ajv/dist/runtime/equal").default';Ua.default=Hd});var Bd=w(Wa=>{"use strict";Object.defineProperty(Wa,"__esModule",{value:!0});var Ga=wn(),Ee=z(),U0=X(),G0=Zi(),W0={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}}`},z0={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:W0,code(t){let{gen:e,data:r,$data:n,schema:i,parentSchema:o,schemaCode:s,it:a}=t;if(!n&&!i)return;let l=e.let("valid"),u=o.items?(0,Ga.getSchemaTypes)(o.items):[];t.block$data(l,d,(0,Ee._)`${s} === false`),t.ok(l);function d(){let g=e.let("i",(0,Ee._)`${r}.length`),v=e.let("j");t.setParams({i:g,j:v}),e.assign(l,!0),e.if((0,Ee._)`${g} > 1`,()=>(f()?h:m)(g,v))}function f(){return u.length>0&&!u.some(g=>g==="object"||g==="array")}function h(g,v){let P=e.name("item"),S=(0,Ga.checkDataTypes)(u,P,a.opts.strictNumbers,Ga.DataType.Wrong),q=e.const("indices",(0,Ee._)`{}`);e.for((0,Ee._)`;${g}--;`,()=>{e.let(P,(0,Ee._)`${r}[${g}]`),e.if(S,(0,Ee._)`continue`),u.length>1&&e.if((0,Ee._)`typeof ${P} == "string"`,(0,Ee._)`${P} += "_"`),e.if((0,Ee._)`typeof ${q}[${P}] == "number"`,()=>{e.assign(v,(0,Ee._)`${q}[${P}]`),t.error(),e.assign(l,!1).break()}).code((0,Ee._)`${q}[${P}] = ${g}`)})}function m(g,v){let P=(0,U0.useFunc)(e,G0.default),S=e.name("outer");e.label(S).for((0,Ee._)`;${g}--;`,()=>e.for((0,Ee._)`${v} = ${g}; ${v}--;`,()=>e.if((0,Ee._)`${P}(${r}[${g}], ${r}[${v}])`,()=>{t.error(),e.assign(l,!1).break(S)})))}}};Wa.default=z0});var Ud=w(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});var za=z(),K0=X(),J0=Zi(),Y0={message:"must be equal to constant",params:({schemaCode:t})=>(0,za._)`{allowedValue: ${t}}`},X0={keyword:"const",$data:!0,error:Y0,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:o}=t;n||o&&typeof o=="object"?t.fail$data((0,za._)`!${(0,K0.useFunc)(e,J0.default)}(${r}, ${i})`):t.fail((0,za._)`${o} !== ${r}`)}};Ka.default=X0});var Gd=w(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});var Ln=z(),Q0=X(),Z0=Zi(),e2={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Ln._)`{allowedValues: ${t}}`},t2={keyword:"enum",schemaType:"array",$data:!0,error:e2,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,l,u=()=>l??(l=(0,Q0.useFunc)(e,Z0.default)),d;if(a||n)d=e.let("valid"),t.block$data(d,f);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=e.const("vSchema",o);d=(0,Ln.or)(...i.map((g,v)=>h(m,v)))}t.pass(d);function f(){e.assign(d,!1),e.forOf("v",o,m=>e.if((0,Ln._)`${u()}(${r}, ${m})`,()=>e.assign(d,!0).break()))}function h(m,g){let v=i[g];return typeof v=="object"&&v!==null?(0,Ln._)`${u()}(${r}, ${m}[${g}])`:(0,Ln._)`${r} === ${v}`}}};Ja.default=t2});var Wd=w(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});var r2=Td(),n2=Nd(),i2=jd(),o2=Dd(),s2=qd(),a2=Vd(),c2=Fd(),l2=Bd(),u2=Ud(),f2=Gd(),d2=[r2.default,n2.default,i2.default,o2.default,s2.default,a2.default,c2.default,l2.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u2.default,f2.default];Ya.default=d2});var Qa=w(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.validateAdditionalItems=void 0;var sr=z(),Xa=X(),p2={message:({params:{len:t}})=>(0,sr.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,sr._)`{limit: ${t}}`},h2={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:p2,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,Xa.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}zd(t,n)}};function zd(t,e){let{gen:r,schema:n,data:i,keyword:o,it:s}=t;s.items=!0;let a=r.const("len",(0,sr._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,sr._)`${a} <= ${e.length}`);else if(typeof n=="object"&&!(0,Xa.alwaysValidSchema)(s,n)){let u=r.var("valid",(0,sr._)`${a} <= ${e.length}`);r.if((0,sr.not)(u),()=>l(u)),t.ok(u)}function l(u){r.forRange("i",e.length,a,d=>{t.subschema({keyword:o,dataProp:d,dataPropType:Xa.Type.Num},u),s.allErrors||r.if((0,sr.not)(u),()=>r.break())})}}jn.validateAdditionalItems=zd;jn.default=h2});var Za=w(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.validateTuple=void 0;var Kd=z(),eo=X(),m2=ze(),g2={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return Jd(t,"additionalItems",e);r.items=!0,!(0,eo.alwaysValidSchema)(r,e)&&t.ok((0,m2.validateArray)(t))}};function Jd(t,e,r=t.schema){let{gen:n,parentSchema:i,data:o,keyword:s,it:a}=t;d(i),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=eo.mergeEvaluated.items(n,r.length,a.items));let l=n.name("valid"),u=n.const("len",(0,Kd._)`${o}.length`);r.forEach((f,h)=>{(0,eo.alwaysValidSchema)(a,f)||(n.if((0,Kd._)`${u} > ${h}`,()=>t.subschema({keyword:s,schemaProp:h,dataProp:h},l)),t.ok(l))});function d(f){let{opts:h,errSchemaPath:m}=a,g=r.length,v=g===f.minItems&&(g===f.maxItems||f[e]===!1);if(h.strictTuples&&!v){let P=`"${s}" is ${g}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,eo.checkStrictMode)(a,P,h.strictTuples)}}}Dn.validateTuple=Jd;Dn.default=g2});var Yd=w(ec=>{"use strict";Object.defineProperty(ec,"__esModule",{value:!0});var y2=Za(),v2={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,y2.validateTuple)(t,"items")};ec.default=v2});var Qd=w(tc=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});var Xd=z(),_2=X(),w2=ze(),b2=Qa(),S2={message:({params:{len:t}})=>(0,Xd.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Xd._)`{limit: ${t}}`},E2={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:S2,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,_2.alwaysValidSchema)(n,e)&&(i?(0,b2.validateAdditionalItems)(t,i):t.ok((0,w2.validateArray)(t)))}};tc.default=E2});var Zd=w(rc=>{"use strict";Object.defineProperty(rc,"__esModule",{value:!0});var Je=z(),to=X(),$2={message:({params:{min:t,max:e}})=>e===void 0?(0,Je.str)`must contain at least ${t} valid item(s)`:(0,Je.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,Je._)`{minContains: ${t}}`:(0,Je._)`{minContains: ${t}, maxContains: ${e}}`},C2={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:$2,code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t,s,a,{minContains:l,maxContains:u}=n;o.opts.next?(s=l===void 0?1:l,a=u):s=1;let d=e.const("len",(0,Je._)`${i}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,to.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,to.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,to.alwaysValidSchema)(o,r)){let v=(0,Je._)`${d} >= ${s}`;a!==void 0&&(v=(0,Je._)`${v} && ${d} <= ${a}`),t.pass(v);return}o.items=!0;let f=e.name("valid");a===void 0&&s===1?m(f,()=>e.if(f,()=>e.break())):s===0?(e.let(f,!0),a!==void 0&&e.if((0,Je._)`${i}.length > 0`,h)):(e.let(f,!1),h()),t.result(f,()=>t.reset());function h(){let v=e.name("_valid"),P=e.let("count",0);m(v,()=>e.if(v,()=>g(P)))}function m(v,P){e.forRange("i",0,d,S=>{t.subschema({keyword:"contains",dataProp:S,dataPropType:to.Type.Num,compositeRule:!0},v),P()})}function g(v){e.code((0,Je._)`${v}++`),a===void 0?e.if((0,Je._)`${v} >= ${s}`,()=>e.assign(f,!0).break()):(e.if((0,Je._)`${v} > ${a}`,()=>e.assign(f,!1).break()),s===1?e.assign(f,!0):e.if((0,Je._)`${v} >= ${s}`,()=>e.assign(f,!0)))}}};rc.default=C2});var ro=w(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.validateSchemaDeps=pt.validatePropertyDeps=pt.error=void 0;var nc=z(),x2=X(),qn=ze();pt.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,nc.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,nc._)`{property: ${t},
|
|
29
|
+
`)}),this}_outputHelpIfRequested(e){let r=this._getHelpOption();r&&e.find(i=>r.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function gp(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 pa(){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}fa.Command=ua;fa.useColor=pa});var bp=b(Ke=>{var{Argument:vp}=Ki(),{Command:da}=yp(),{CommanderError:dw,InvalidArgumentError:wp}=Pn(),{Help:hw}=na(),{Option:_p}=aa();Ke.program=new da;Ke.createCommand=t=>new da(t);Ke.createOption=(t,e)=>new _p(t,e);Ke.createArgument=(t,e)=>new vp(t,e);Ke.Command=da;Ke.Option=_p;Ke.Argument=vp;Ke.Help=hw;Ke.CommanderError=dw;Ke.InvalidArgumentError=wp;Ke.InvalidOptionArgumentError=wp});function Cp(t){return Qi[t]?.properties??[]}function Pp(t,e){let r=Qi[e];return r?r.properties.includes(t):!1}var Xi,Qi,At,Zi,$I,Tt=K(()=>{"use strict";Xi={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"}},Qi={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","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","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","minHeight","label","foreground","background","radius","padding","border","borderColor","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","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","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","variant"],children:{kind:"any"}},TableRow:{description:"Row template repeated for each source item",tier:"core",category:"data",properties:["each","height","border","borderColor","variant"],children:{kind:"list",items:["TableCell"]}},TableCell:{description:"Data cell; children define cell content",tier:"core",category:"data",properties:["width","flex","align","border","borderColor","variant"],children:{kind:"any"}}},At=new Set(Object.keys(Qi)),Zi=new Set(Object.entries(Xi).filter(([,t])=>t.lowering==="inline-css").map(([t])=>t)),$I=new Set(Object.entries(Xi).filter(([,t])=>t.lowering==="class-name").map(([t])=>t))});var Rw,Bp,Ow,Aw,Tw,Nw,pe,Mw,Vw,On,An,Lw,Ne,Up,Wp,Gp,zp,Jp,Kp,Yp,Xp,Qp,Zp,ef,tf,rf,nf,of,sf,af,xa,jw,Dw,cf,WI,GI,zI,JI,KI,YI,XI,QI,ZI,eR,tR,rR,nR,iR,at,Dr=K(()=>{Rw=Object.create,Bp=Object.defineProperty,Ow=Object.getOwnPropertyDescriptor,Aw=Object.getOwnPropertyNames,Tw=Object.getPrototypeOf,Nw=Object.prototype.hasOwnProperty,pe=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),Mw=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(var i=Aw(e),o=0,s=i.length,a;o<s;o++)a=i[o],!Nw.call(t,a)&&a!==r&&Bp(t,a,{get:(c=>e[c]).bind(null,a),enumerable:!(n=Ow(e,a))||n.enumerable});return t},Vw=(t,e,r)=>(r=t!=null?Rw(Tw(t)):{},Mw(e||!t||!t.__esModule?Bp(r,"default",{value:t,enumerable:!0}):r,t)),On=pe(((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})),An=pe(((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
|
+
|
|
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})),Lw=pe(((t,e)=>{var r=On();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 _=1;_<=a.linesBefore&&!(d-_<0);_++){let M=n(s.buffer,l[d-_],f[d-_],s.position-(l[d]-l[d-_]),y);m=r.repeat(" ",a.indent)+i((s.line-_+1).toString(),g)+" | "+M.str+`
|
|
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
|
+
`,m+=r.repeat("-",a.indent+g+3+$.pos)+`^
|
|
34
|
+
`;for(let _=1;_<=a.linesAfter&&!(d+_>=f.length);_++){let M=n(s.buffer,l[d+_],f[d+_],s.position-(l[d]-l[d+_]),y);m+=r.repeat(" ",a.indent)+i((s.line+_+1).toString(),g)+" | "+M.str+`
|
|
35
|
+
`}return m.replace(/\n$/,"")}e.exports=o})),Ne=pe(((t,e)=>{var r=An(),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})),Up=pe(((t,e)=>{var r=An(),n=Ne();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})),Wp=pe(((t,e)=>{e.exports=new(Ne())("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})})),Gp=pe(((t,e)=>{e.exports=new(Ne())("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})})),zp=pe(((t,e)=>{e.exports=new(Ne())("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}})})),Jp=pe(((t,e)=>{e.exports=new(Up())({explicit:[Wp(),Gp(),zp()]})})),Kp=pe(((t,e)=>{var r=Ne();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"})})),Yp=pe(((t,e)=>{var r=Ne();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"})})),Xp=pe(((t,e)=>{var r=On(),n=Ne();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"]}})})),Qp=pe(((t,e)=>{var r=On(),n=Ne(),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"})})),Zp=pe(((t,e)=>{e.exports=Jp().extend({implicit:[Kp(),Yp(),Xp(),Qp()]})})),ef=pe(((t,e)=>{e.exports=Zp()})),tf=pe(((t,e)=>{var r=Ne(),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],_=+p[6];if(p[7]){for(l=p[7].slice(0,3);l.length<3;)l+="0";l=+l}if(p[9]){let j=+p[10],T=+(p[11]||0);f=(j*60+T)*6e4,p[9]==="-"&&(f=-f)}let M=new Date(Date.UTC(d,m,g,y,$,_,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})})),rf=pe(((t,e)=>{var r=Ne();function n(i){return i==="<<"||i===null}e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:n})})),nf=pe(((t,e)=>{var r=Ne(),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})})),of=pe(((t,e)=>{var r=Ne(),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})})),sf=pe(((t,e)=>{var r=Ne(),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})})),af=pe(((t,e)=>{var r=Ne(),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})})),xa=pe(((t,e)=>{e.exports=ef().extend({implicit:[tf(),rf()],explicit:[nf(),of(),sf(),af()]})})),jw=pe(((t,e)=>{var r=On(),n=An(),i=Lw(),o=xa(),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]/,$=/[,\[\]{}]/,_=/^(?:!|!!|![0-9A-Za-z-]+!)$/,M=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function j(u){return Object.prototype.toString.call(u)}function T(u){return u===10||u===13}function N(u){return u===9||u===32}function G(u){return u===9||u===32||u===10||u===13}function te(u){return u===44||u===91||u===93||u===123||u===125}function Bt(u){if(u>=48&&u<=57)return u-48;let v=u|32;return v>=97&&v<=102?v-97+10:-1}function nt(u){return u===120?2:u===117?4:u===85?8:0}function ke(u){return u>=48&&u<=57?u-48:-1}function je(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 Ie(u){return u<=65535?String.fromCharCode(u):String.fromCharCode((u-65536>>10)+55296,(u-65536&1023)+56320)}function it(u,v,x){v==="__proto__"?Object.defineProperty(u,v,{configurable:!0,enumerable:!0,writable:!0,value:x}):u[v]=x}var ot=new Array(256),kt=new Array(256);for(let u=0;u<256;u++)ot[u]=je(u)?1:0,kt[u]=je(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 Vi(u,v){let x={name:u.filename,buffer:u.input.slice(0,-1),position:u.position,line:u.line,column:u.position-u.lineStart};return x.snippet=i(x),new n(v,x)}function q(u,v){throw Vi(u,v)}function Nr(u,v){u.onWarning&&u.onWarning.call(null,Vi(u,v))}function Et(u,v,x){let C=u.anchorMapTransactions;if(C.length!==0){let S=C[C.length-1];s.call(S,v)||(S[v]={existed:s.call(u.anchorMap,v),value:u.anchorMap[v]})}u.anchorMap[v]=x}function Bs(u){u.anchorMapTransactions.push(Object.create(null))}function lr(u){let v=u.anchorMapTransactions.pop(),x=u.anchorMapTransactions;if(x.length===0)return;let C=x[x.length-1],S=Object.keys(v);for(let O=0,h=S.length;O<h;O+=1){let w=S[O];s.call(C,w)||(C[w]=v[w])}}function Us(u){let v=u.anchorMapTransactions.pop(),x=Object.keys(v);for(let C=x.length-1;C>=0;C-=1){let S=v[x[C]];S.existed?u.anchorMap[x[C]]=S.value:delete u.anchorMap[x[C]]}}function $n(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 Mr(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 Li={YAML:function(v,x,C){v.version!==null&&q(v,"duplication of %YAML directive"),C.length!==1&&q(v,"YAML directive accepts exactly one argument");let S=/^([0-9]+)\.([0-9]+)$/.exec(C[0]);S===null&&q(v,"ill-formed argument of the YAML directive");let O=parseInt(S[1],10),h=parseInt(S[2],10);O!==1&&q(v,"unacceptable YAML version of the document"),v.version=C[0],v.checkLineBreaks=h<2,h!==1&&h!==2&&Nr(v,"unsupported YAML version of the document")},TAG:function(v,x,C){let S;C.length!==2&&q(v,"TAG directive accepts exactly two arguments");let O=C[0];S=C[1],_.test(O)||q(v,"ill-formed tag handle (first argument) of the TAG directive"),s.call(v.tagMap,O)&&q(v,'there is a previously declared suffix for "'+O+'" tag handle'),M.test(S)||q(v,"ill-formed tag prefix (second argument) of the TAG directive");try{S=decodeURIComponent(S)}catch{q(v,"tag prefix is malformed: "+S)}v.tagMap[O]=S}};function Ue(u,v,x,C){if(v<x){let S=u.input.slice(v,x);if(C)for(let O=0,h=S.length;O<h;O+=1){let w=S.charCodeAt(O);w===9||w>=32&&w<=1114111||q(u,"expected valid JSON character")}else g.test(S)&&q(u,"the stream contains non-printable characters");u.result+=S}}function Ut(u,v,x,C){r.isObject(x)||q(u,"cannot merge mappings; the provided source object is unacceptable");let S=Object.keys(x);for(let O=0,h=S.length;O<h;O+=1){let w=S[O];s.call(v,w)||(it(v,w,x[w]),C[w]=!0)}}function Ct(u,v,x,C,S,O,h,w,R){if(Array.isArray(S)){S=Array.prototype.slice.call(S);for(let k=0,E=S.length;k<E;k+=1)Array.isArray(S[k])&&q(u,"nested arrays are not supported inside keys"),typeof S=="object"&&j(S[k])==="[object Object]"&&(S[k]="[object Object]")}if(typeof S=="object"&&j(S)==="[object Object]"&&(S="[object Object]"),S=String(S),v===null&&(v={}),C==="tag:yaml.org,2002:merge")if(Array.isArray(O)){O.length>u.maxMergeSeqLength&&q(u,"merge sequence length exceeded maxMergeSeqLength ("+u.maxMergeSeqLength+")");let k=new Set;for(let E=0,I=O.length;E<I;E+=1){let P=O[E];k.has(P)||(k.add(P),Ut(u,v,P,x))}}else Ut(u,v,O,x);else!u.json&&!s.call(x,S)&&s.call(v,S)&&(u.line=h||u.line,u.lineStart=w||u.lineStart,u.position=R||u.position,q(u,"duplicated mapping key")),it(v,S,O),delete x[S];return v}function Vr(u){let v=u.input.charCodeAt(u.position);v===10?u.position++:v===13?(u.position++,u.input.charCodeAt(u.position)===10&&u.position++):q(u,"a line break is expected"),u.line+=1,u.lineStart=u.position,u.firstTabInLine=-1}function ve(u,v,x){let C=0,S=u.input.charCodeAt(u.position);for(;S!==0;){for(;N(S);)S===9&&u.firstTabInLine===-1&&(u.firstTabInLine=u.position),S=u.input.charCodeAt(++u.position);if(v&&S===35)do S=u.input.charCodeAt(++u.position);while(S!==10&&S!==13&&S!==0);if(T(S))for(Vr(u),S=u.input.charCodeAt(u.position),C++,u.lineIndent=0;S===32;)u.lineIndent++,S=u.input.charCodeAt(++u.position);else break}return x!==-1&&C!==0&&u.lineIndent<x&&Nr(u,"deficient indentation"),C}function Lr(u){let v=u.position,x=u.input.charCodeAt(v);return!!((x===45||x===46)&&x===u.input.charCodeAt(v+1)&&x===u.input.charCodeAt(v+2)&&(v+=3,x=u.input.charCodeAt(v),x===0||G(x)))}function Pt(u,v){v===1?u.result+=" ":v>1&&(u.result+=r.repeat(`
|
|
38
|
+
`,v-1))}function ji(u,v,x){let C,S,O,h,w,R,k=u.kind,E=u.result,I=u.input.charCodeAt(u.position);if(G(I)||te(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(G(P)||x&&te(P))return!1}for(u.kind="scalar",u.result="",C=S=u.position,O=!1;I!==0;){if(I===58){let P=u.input.charCodeAt(u.position+1);if(G(P)||x&&te(P))break}else if(I===35){if(G(u.input.charCodeAt(u.position-1)))break}else{if(u.position===u.lineStart&&Lr(u)||x&&te(I))break;if(T(I))if(h=u.line,w=u.lineStart,R=u.lineIndent,ve(u,!1,-1),u.lineIndent>=v){O=!0,I=u.input.charCodeAt(u.position);continue}else{u.position=S,u.line=h,u.lineStart=w,u.lineIndent=R;break}}O&&(Ue(u,C,S,!1),Pt(u,u.line-h),C=S=u.position,O=!1),N(I)||(S=u.position+1),I=u.input.charCodeAt(++u.position)}return Ue(u,C,S,!1),u.result?!0:(u.kind=k,u.result=E,!1)}function Di(u,v){let x,C,S=u.input.charCodeAt(u.position);if(S!==39)return!1;for(u.kind="scalar",u.result="",u.position++,x=C=u.position;(S=u.input.charCodeAt(u.position))!==0;)if(S===39)if(Ue(u,x,u.position,!0),S=u.input.charCodeAt(++u.position),S===39)x=u.position,u.position++,C=u.position;else return!0;else T(S)?(Ue(u,x,C,!0),Pt(u,ve(u,!1,v)),x=C=u.position):u.position===u.lineStart&&Lr(u)?q(u,"unexpected end of the document within a single quoted scalar"):(u.position++,N(S)||(C=u.position));q(u,"unexpected end of the stream within a single quoted scalar")}function kn(u,v){let x,C,S,O=u.input.charCodeAt(u.position);if(O!==34)return!1;for(u.kind="scalar",u.result="",u.position++,x=C=u.position;(O=u.input.charCodeAt(u.position))!==0;){if(O===34)return Ue(u,x,u.position,!0),u.position++,!0;if(O===92){if(Ue(u,x,u.position,!0),O=u.input.charCodeAt(++u.position),T(O))ve(u,!1,v);else if(O<256&&ot[O])u.result+=kt[O],u.position++;else if((S=nt(O))>0){let h=S,w=0;for(;h>0;h--)O=u.input.charCodeAt(++u.position),(S=Bt(O))>=0?w=(w<<4)+S:q(u,"expected hexadecimal character");u.result+=Ie(w),u.position++}else q(u,"unknown escape sequence");x=C=u.position}else T(O)?(Ue(u,x,C,!0),Pt(u,ve(u,!1,v)),x=C=u.position):u.position===u.lineStart&&Lr(u)?q(u,"unexpected end of the document within a double quoted scalar"):(u.position++,N(O)||(C=u.position))}q(u,"unexpected end of the stream within a double quoted scalar")}function qi(u,v){let x=!0,C,S,O,h=u.tag,w,R=u.anchor,k,E,I,P,L=Object.create(null),V,H,B,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&&Et(u,u.anchor,w),re=u.input.charCodeAt(++u.position);re!==0;){if(ve(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;x?re===44&&q(u,"expected the node content, but found ','"):q(u,"missed comma between flow collection entries"),H=V=B=null,E=I=!1,re===63&&G(u.input.charCodeAt(u.position+1))&&(E=I=!0,u.position++,ve(u,!0,v)),C=u.line,S=u.lineStart,O=u.position,Rt(u,v,a,!1,!0),H=u.tag,V=u.result,ve(u,!0,v),re=u.input.charCodeAt(u.position),(I||u.line===C)&&re===58&&(E=!0,re=u.input.charCodeAt(++u.position),ve(u,!0,v),Rt(u,v,a,!1,!0),B=u.result),P?Ct(u,w,L,H,V,B,C,S,O):E?w.push(Ct(u,null,L,H,V,B,C,S,O)):w.push(V),ve(u,!0,v),re=u.input.charCodeAt(u.position),re===44?(x=!0,re=u.input.charCodeAt(++u.position)):x=!1}q(u,"unexpected end of the stream within a flow collection")}function Fi(u,v){let x,C=p,S=!1,O=!1,h=v,w=0,R=!1,k,E=u.input.charCodeAt(u.position);if(E===124)x=!1;else if(E===62)x=!0;else return!1;for(u.kind="scalar",u.result="";E!==0;)if(E=u.input.charCodeAt(++u.position),E===43||E===45)p===C?C=E===43?m:d:q(u,"repeat of a chomping mode identifier");else if((k=ke(E))>=0)k===0?q(u,"bad explicit indentation width of a block scalar; it cannot be less than one"):O?q(u,"repeat of an indentation width identifier"):(h=v+k-1,O=!0);else break;if(N(E)){do E=u.input.charCodeAt(++u.position);while(N(E));if(E===35)do E=u.input.charCodeAt(++u.position);while(!T(E)&&E!==0)}for(;E!==0;){for(Vr(u),u.lineIndent=0,E=u.input.charCodeAt(u.position);(!O||u.lineIndent<h)&&E===32;)u.lineIndent++,E=u.input.charCodeAt(++u.position);if(!O&&u.lineIndent>h&&(h=u.lineIndent),T(E)){w++;continue}if(!O&&h===0&&q(u,"missing indentation for block scalar"),u.lineIndent<h){C===m?u.result+=r.repeat(`
|
|
39
|
+
`,S?1+w:w):C===p&&S&&(u.result+=`
|
|
40
|
+
`);break}x?N(E)?(R=!0,u.result+=r.repeat(`
|
|
41
|
+
`,S?1+w:w)):R?(R=!1,u.result+=r.repeat(`
|
|
42
|
+
`,w+1)):w===0?S&&(u.result+=" "):u.result+=r.repeat(`
|
|
43
|
+
`,w):u.result+=r.repeat(`
|
|
44
|
+
`,S?1+w:w),S=!0,O=!0,w=0;let I=u.position;for(;!T(E)&&E!==0;)E=u.input.charCodeAt(++u.position);Ue(u,I,u.position,!1)}return!0}function It(u,v){let x=u.tag,C=u.anchor,S=[],O=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&Et(u,u.anchor,S);let h=u.input.charCodeAt(u.position);for(;h!==0&&(u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,q(u,"tab characters must not be used in indentation")),!(h!==45||!G(u.input.charCodeAt(u.position+1))));){if(O=!0,u.position++,ve(u,!0,-1)&&u.lineIndent<=v){S.push(null),h=u.input.charCodeAt(u.position);continue}let w=u.line;if(Rt(u,v,l,!1,!0),S.push(u.result),ve(u,!0,-1),h=u.input.charCodeAt(u.position),(u.line===w||u.lineIndent>v)&&h!==0)q(u,"bad indentation of a sequence entry");else if(u.lineIndent<v)break}return O?(u.tag=x,u.anchor=C,u.kind="sequence",u.result=S,!0):!1}function Hi(u,v,x){let C,S,O,h,w=u.tag,R=u.anchor,k={},E=Object.create(null),I=null,P=null,L=null,V=!1,H=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&Et(u,u.anchor,k);let B=u.input.charCodeAt(u.position);for(;B!==0;){!V&&u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,q(u,"tab characters must not be used in indentation"));let re=u.input.charCodeAt(u.position+1),ye=u.line;if((B===63||B===58)&&G(re))B===63?(V&&(Ct(u,k,E,I,P,null,S,O,h),I=P=L=null),H=!0,V=!0,C=!0):V?(V=!1,C=!0):q(u,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),u.position+=1,B=re;else{if(S=u.line,O=u.lineStart,h=u.position,!Rt(u,x,c,!1,!0))break;if(u.line===ye){for(B=u.input.charCodeAt(u.position);N(B);)B=u.input.charCodeAt(++u.position);if(B===58)B=u.input.charCodeAt(++u.position),G(B)||q(u,"a whitespace character is expected after the key-value separator within a block mapping"),V&&(Ct(u,k,E,I,P,null,S,O,h),I=P=L=null),H=!0,V=!1,C=!1,I=u.tag,P=u.result;else if(H)q(u,"can not read an implicit mapping pair; a colon is missed");else return u.tag=w,u.anchor=R,!0}else if(H)q(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===ye||u.lineIndent>v)&&(V&&(S=u.line,O=u.lineStart,h=u.position),Rt(u,v,f,!0,C)&&(V?P=u.result:L=u.result),V||(Ct(u,k,E,I,P,L,S,O,h),I=P=L=null),ve(u,!0,-1),B=u.input.charCodeAt(u.position)),(u.line===ye||u.lineIndent>v)&&B!==0)q(u,"bad indentation of a mapping entry");else if(u.lineIndent<v)break}return V&&Ct(u,k,E,I,P,null,S,O,h),H&&(u.tag=w,u.anchor=R,u.kind="mapping",u.result=k),H}function Ws(u){let v=!1,x=!1,C,S,O=u.input.charCodeAt(u.position);if(O!==33)return!1;u.tag!==null&&q(u,"duplication of a tag property"),O=u.input.charCodeAt(++u.position),O===60?(v=!0,O=u.input.charCodeAt(++u.position)):O===33?(x=!0,C="!!",O=u.input.charCodeAt(++u.position)):C="!";let h=u.position;if(v){do O=u.input.charCodeAt(++u.position);while(O!==0&&O!==62);u.position<u.length?(S=u.input.slice(h,u.position),O=u.input.charCodeAt(++u.position)):q(u,"unexpected end of the stream within a verbatim tag")}else{for(;O!==0&&!G(O);)O===33&&(x?q(u,"tag suffix cannot contain exclamation marks"):(C=u.input.slice(h-1,u.position+1),_.test(C)||q(u,"named tag handle cannot contain such characters"),x=!0,h=u.position+1)),O=u.input.charCodeAt(++u.position);S=u.input.slice(h,u.position),$.test(S)&&q(u,"tag suffix cannot contain flow indicator characters")}S&&!M.test(S)&&q(u,"tag name cannot contain such characters: "+S);try{S=decodeURIComponent(S)}catch{q(u,"tag name is malformed: "+S)}return v?u.tag=S:s.call(u.tagMap,C)?u.tag=u.tagMap[C]+S:C==="!"?u.tag="!"+S:C==="!!"?u.tag="tag:yaml.org,2002:"+S:q(u,'undeclared tag handle "'+C+'"'),!0}function Bi(u){let v=u.input.charCodeAt(u.position);if(v!==38)return!1;u.anchor!==null&&q(u,"duplication of an anchor property"),v=u.input.charCodeAt(++u.position);let x=u.position;for(;v!==0&&!G(v)&&!te(v);)v=u.input.charCodeAt(++u.position);return u.position===x&&q(u,"name of an anchor node must contain at least one character"),u.anchor=u.input.slice(x,u.position),!0}function Ui(u){let v=u.input.charCodeAt(u.position);if(v!==42)return!1;v=u.input.charCodeAt(++u.position);let x=u.position;for(;v!==0&&!G(v)&&!te(v);)v=u.input.charCodeAt(++u.position);u.position===x&&q(u,"name of an alias node must contain at least one character");let C=u.input.slice(x,u.position);return s.call(u.anchorMap,C)||q(u,'unidentified alias "'+C+'"'),u.result=u.anchorMap[C],ve(u,!0,-1),!0}function Gs(u,v,x,C){let S=$n(u);return Bs(u),Mr(u,v),u.tag=null,u.anchor=null,u.kind=null,u.result=null,Hi(u,x,C)&&u.kind==="mapping"?(lr(u),!0):(Us(u),Mr(u,S),!1)}function Rt(u,v,x,C,S){let O,h,w=1,R=!1,k=!1,E=null,I,P,L;u.depth>=u.maxDepth&&q(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 V=O=h=f===x||l===x;if(C&&ve(u,!0,-1)&&(R=!0,u.lineIndent>v?w=1:u.lineIndent===v?w=0:u.lineIndent<v&&(w=-1)),w===1)for(;;){let H=u.input.charCodeAt(u.position),B=$n(u);if(R&&(H===33&&u.tag!==null||H===38&&u.anchor!==null)||!Ws(u)&&!Bi(u))break;E===null&&(E=B),ve(u,!0,-1)?(R=!0,h=V,u.lineIndent>v?w=1:u.lineIndent===v?w=0:u.lineIndent<v&&(w=-1)):h=!1}if(h&&(h=R||S),w===1||f===x)if(a===x||c===x?P=v:P=v+1,L=u.position-u.lineStart,w===1)if(h&&(It(u,L)||Hi(u,L,P))||qi(u,P))k=!0;else{let H=u.input.charCodeAt(u.position);E!==null&&V&&!h&&H!==124&&H!==62&&Gs(u,E,E.position-E.lineStart,P)||O&&Fi(u,P)||Di(u,P)||kn(u,P)?k=!0:Ui(u)?(k=!0,(u.tag!==null||u.anchor!==null)&&q(u,"alias node should not have any properties")):ji(u,P,a===x)&&(k=!0,u.tag===null&&(u.tag="?")),u.anchor!==null&&Et(u,u.anchor,u.result)}else w===0&&(k=h&&It(u,L));if(u.tag===null)u.anchor!==null&&Et(u,u.anchor,u.result);else if(u.tag==="?"){u.result!==null&&u.kind!=="scalar"&&q(u,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+u.kind+'"');for(let H=0,B=u.implicitTypes.length;H<B;H+=1)if(I=u.implicitTypes[H],I.resolve(u.result)){u.result=I.construct(u.result),u.tag=I.tag,u.anchor!==null&&Et(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 H=u.typeMap.multi[u.kind||"fallback"];for(let B=0,re=H.length;B<re;B+=1)if(u.tag.slice(0,H[B].tag.length)===H[B].tag){I=H[B];break}}I||q(u,"unknown tag !<"+u.tag+">"),u.result!==null&&I.kind!==u.kind&&q(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&&Et(u,u.anchor,u.result)):q(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 zs(u){let v=u.position,x=!1,C;for(u.version=null,u.checkLineBreaks=u.legacy,u.tagMap=Object.create(null),u.anchorMap=Object.create(null);(C=u.input.charCodeAt(u.position))!==0&&(ve(u,!0,-1),C=u.input.charCodeAt(u.position),!(u.lineIndent>0||C!==37));){x=!0,C=u.input.charCodeAt(++u.position);let S=u.position;for(;C!==0&&!G(C);)C=u.input.charCodeAt(++u.position);let O=u.input.slice(S,u.position),h=[];for(O.length<1&&q(u,"directive name must not be less than one character in length");C!==0;){for(;N(C);)C=u.input.charCodeAt(++u.position);if(C===35){do C=u.input.charCodeAt(++u.position);while(C!==0&&!T(C));break}if(T(C))break;for(S=u.position;C!==0&&!G(C);)C=u.input.charCodeAt(++u.position);h.push(u.input.slice(S,u.position))}C!==0&&Vr(u),s.call(Li,O)?Li[O](u,O,h):Nr(u,'unknown document directive "'+O+'"')}if(ve(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,ve(u,!0,-1)):x&&q(u,"directives end mark is expected"),Rt(u,u.lineIndent-1,f,!1,!0),ve(u,!0,-1),u.checkLineBreaks&&y.test(u.input.slice(v,u.position))&&Nr(u,"non-ASCII line breaks are interpreted as content"),u.documents.push(u.result),u.position===u.lineStart&&Lr(u)){u.input.charCodeAt(u.position)===46&&(u.position+=3,ve(u,!0,-1));return}u.position<u.length-1&&q(u,"end of the stream or a document separator is expected")}function Wi(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 x=new ce(u,v),C=u.indexOf("\0");for(C!==-1&&(x.position=C,q(x,"null byte is not allowed in input")),x.input+="\0";x.input.charCodeAt(x.position)===32;)x.lineIndent+=1,x.position+=1;for(;x.position<x.length-1;)zs(x);return x.documents}function Gi(u,v,x){v!==null&&typeof v=="object"&&typeof x>"u"&&(x=v,v=null);let C=Wi(u,x);if(typeof v!="function")return C;for(let S=0,O=C.length;S<O;S+=1)v(C[S])}function Js(u,v){let x=Wi(u,v);if(x.length!==0){if(x.length===1)return x[0];throw new n("expected a single document in the stream, but found more")}}e.exports.loadAll=Gi,e.exports.load=Js})),Dw=pe(((t,e)=>{var r=On(),n=An(),i=xa(),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,_=39,M=42,j=44,T=45,N=58,G=61,te=62,Bt=63,nt=64,ke=91,je=93,Ie=96,it=123,ot=124,kt=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 Vi=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],q=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Nr(h,w){if(w===null)return{};let R={},k=Object.keys(w);for(let E=0,I=k.length;E<I;E+=1){let P=k[E],L=String(w[P]);P.slice(0,2)==="!!"&&(P="tag:yaml.org,2002:"+P.slice(2));let V=h.compiledTypeMap.fallback[P];V&&s.call(V.styleAliases,L)&&(L=V.styleAliases[L]),R[P]=L}return R}function Et(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 Bs=1,lr=2;function Us(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=Nr(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==='"'?lr:Bs,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 $n(h,w){let R=r.repeat(" ",w),k=0,E="",I=h.length;for(;k<I;){let P,L=h.indexOf(`
|
|
46
|
+
`,k);L===-1?(P=h.slice(k),k=I):(P=h.slice(k,L+1),k=L+1),P.length&&P!==`
|
|
47
|
+
`&&(E+=R),E+=P}return E}function Mr(h,w){return`
|
|
48
|
+
`+r.repeat(" ",h.indent*w)}function Li(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 Ue(h){return h===p||h===c}function Ut(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 Ct(h){return Ut(h)&&h!==a&&h!==f&&h!==l}function Vr(h,w,R){let k=Ct(h),E=k&&!Ue(h);return(R?k:k&&h!==j&&h!==ke&&h!==je&&h!==it&&h!==kt)&&h!==g&&!(w===N&&!E)||Ct(w)&&!Ue(w)&&h===g||w===N&&E}function ve(h){return Ut(h)&&h!==a&&!Ue(h)&&h!==T&&h!==Bt&&h!==N&&h!==j&&h!==ke&&h!==je&&h!==it&&h!==kt&&h!==g&&h!==$&&h!==M&&h!==d&&h!==ot&&h!==G&&h!==te&&h!==_&&h!==m&&h!==y&&h!==nt&&h!==Ie}function Lr(h){return!Ue(h)&&h!==N}function Pt(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 ji(h){return/^\n* /.test(h)}var Di=1,kn=2,qi=3,Fi=4,It=5;function Hi(h,w,R,k,E,I,P,L){let V,H=0,B=null,re=!1,ye=!1,lp=k!==-1,En=-1,Cn=ve(Pt(h,0))&&Lr(Pt(h,h.length-1));if(w||P)for(V=0;V<h.length;H>=65536?V+=2:V++){if(H=Pt(h,V),!Ut(H))return It;Cn=Cn&&Vr(H,B,L),B=H}else{for(V=0;V<h.length;H>=65536?V+=2:V++){if(H=Pt(h,V),H===l)re=!0,lp&&(ye=ye||V-En-1>k&&h[En+1]!==" ",En=V);else if(!Ut(H))return It;Cn=Cn&&Vr(H,B,L),B=H}ye=ye||lp&&V-En-1>k&&h[En+1]!==" "}return!re&&!ye?Cn&&!P&&!E(h)?Di:I===lr?It:kn:R>9&&ji(h)?It:P?I===lr?It:kn:ye?Fi:qi}function Ws(h,w,R,k,E){h.dump=(function(){if(w.length===0)return h.quotingType===lr?'""':"''";if(!h.noCompatMode&&(Vi.indexOf(w)!==-1||q.test(w)))return h.quotingType===lr?'"'+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),L=k||h.flowLevel>-1&&R>=h.flowLevel;function V(H){return Li(h,H)}switch(Hi(w,L,h.indent,P,V,h.quotingType,h.forceQuotes&&!k,E)){case Di:return w;case kn:return"'"+w.replace(/'/g,"''")+"'";case qi:return"|"+Bi(w,h.indent)+Ui($n(w,I));case Fi:return">"+Bi(w,h.indent)+Ui($n(Gs(w,P),I));case It:return'"'+zs(w,P)+'"';default:throw new n("impossible error: invalid scalar style")}})()}function Bi(h,w){let R=ji(h)?String(w):"",k=h[h.length-1]===`
|
|
49
|
+
`;return R+(k&&(h[h.length-2]===`
|
|
50
|
+
`||h===`
|
|
51
|
+
`)?"+":k?"":"-")+`
|
|
52
|
+
`}function Ui(h){return h[h.length-1]===`
|
|
53
|
+
`?h.slice(0,-1):h}function Gs(h,w){let R=/(\n+)([^\n]*)/g,k=(function(){let L=h.indexOf(`
|
|
54
|
+
`);return L=L!==-1?L:h.length,R.lastIndex=L,Rt(h.slice(0,L),w)})(),E=h[0]===`
|
|
55
|
+
`||h[0]===" ",I,P;for(;P=R.exec(h);){let L=P[1],V=P[2];I=V[0]===" ",k+=L+(!E&&!I&&V!==""?`
|
|
56
|
+
`:"")+Rt(V,w),E=I}return k}function Rt(h,w){if(h===""||h[0]===" ")return h;let R=/ [^ ]/g,k,E=0,I,P=0,L=0,V="";for(;k=R.exec(h);)L=k.index,L-E>w&&(I=P>E?P:L,V+=`
|
|
57
|
+
`+h.slice(E,I),E=I+1),P=L;return V+=`
|
|
58
|
+
`,h.length-E>w&&P>E?V+=h.slice(E,P)+`
|
|
59
|
+
`+h.slice(P+1):V+=h.slice(E),V.slice(1)}function zs(h){let w="",R=0;for(let k=0;k<h.length;R>=65536?k+=2:k++){R=Pt(h,k);let E=ce[R];!E&&Ut(R)?(w+=h[k],R>=65536&&(w+=h[k+1])):w+=E||Et(R)}return w}function Wi(h,w,R){let k="",E=h.tag;for(let I=0,P=R.length;I<P;I+=1){let L=R[I];h.replacer&&(L=h.replacer.call(R,String(I),L)),(x(h,w,L,!1,!1)||typeof L>"u"&&x(h,w,null,!1,!1))&&(k!==""&&(k+=","+(h.condenseFlow?"":" ")),k+=h.dump)}h.tag=E,h.dump="["+k+"]"}function Gi(h,w,R,k){let E="",I=h.tag;for(let P=0,L=R.length;P<L;P+=1){let V=R[P];h.replacer&&(V=h.replacer.call(R,String(P),V)),(x(h,w+1,V,!0,!0,!1,!0)||typeof V>"u"&&x(h,w+1,null,!0,!0,!1,!0))&&((!k||E!=="")&&(E+=Mr(h,w)),h.dump&&l===h.dump.charCodeAt(0)?E+="-":E+="- ",E+=h.dump)}h.tag=I,h.dump=E||"[]"}function Js(h,w,R){let k="",E=h.tag,I=Object.keys(R);for(let P=0,L=I.length;P<L;P+=1){let V="";k!==""&&(V+=", "),h.condenseFlow&&(V+='"');let H=I[P],B=R[H];h.replacer&&(B=h.replacer.call(R,H,B)),x(h,w,H,!1,!1)&&(h.dump.length>1024&&(V+="? "),V+=h.dump+(h.condenseFlow?'"':"")+":"+(h.condenseFlow?"":" "),x(h,w,B,!1,!1)&&(V+=h.dump,k+=V))}h.tag=E,h.dump="{"+k+"}"}function u(h,w,R,k){let E="",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 L=0,V=P.length;L<V;L+=1){let H="";(!k||E!=="")&&(H+=Mr(h,w));let B=P[L],re=R[B];if(h.replacer&&(re=h.replacer.call(R,B,re)),!x(h,w+1,B,!0,!0,!0))continue;let ye=h.tag!==null&&h.tag!=="?"||h.dump&&h.dump.length>1024;ye&&(h.dump&&l===h.dump.charCodeAt(0)?H+="?":H+="? "),H+=h.dump,ye&&(H+=Mr(h,w)),x(h,w+1,re,!0,ye)&&(h.dump&&l===h.dump.charCodeAt(0)?H+=":":H+=": ",H+=h.dump,E+=H)}h.tag=I,h.dump=E||"{}"}function v(h,w,R){let k=R?h.explicitTypes:h.implicitTypes;for(let E=0,I=k.length;E<I;E+=1){let P=k[E];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 L=h.styleMap[P.tag]||P.defaultStyle,V;if(o.call(P.represent)==="[object Function]")V=P.represent(w,L);else if(s.call(P.represent,L))V=P.represent[L](w,L);else throw new n("!<"+P.tag+'> tag resolver accepts not "'+L+'" style');h.dump=V}return!0}}return!1}function x(h,w,R,k,E,I,P){h.tag=null,h.dump=R,v(h,R,!1)||v(h,R,!0);let L=o.call(h.dump),V=k;k&&(k=h.flowLevel<0||h.flowLevel>w);let H=L==="[object Object]"||L==="[object Array]",B,re;if(H&&(B=h.duplicates.indexOf(R),re=B!==-1),(h.tag!==null&&h.tag!=="?"||re||h.indent!==2&&w>0)&&(E=!1),re&&h.usedDuplicates[B])h.dump="*ref_"+B;else{if(H&&re&&!h.usedDuplicates[B]&&(h.usedDuplicates[B]=!0),L==="[object Object]")k&&Object.keys(h.dump).length!==0?(u(h,w,h.dump,E),re&&(h.dump="&ref_"+B+h.dump)):(Js(h,w,h.dump),re&&(h.dump="&ref_"+B+" "+h.dump));else if(L==="[object Array]")k&&h.dump.length!==0?(h.noArrayIndent&&!P&&w>0?Gi(h,w-1,h.dump,E):Gi(h,w,h.dump,E),re&&(h.dump="&ref_"+B+h.dump)):(Wi(h,w,h.dump),re&&(h.dump="&ref_"+B+" "+h.dump));else if(L==="[object String]")h.tag!=="?"&&Ws(h,h.dump,w,I,V);else{if(L==="[object Undefined]")return!1;if(h.skipInvalid)return!1;throw new n("unacceptable kind of an object to dump "+L)}if(h.tag!==null&&h.tag!=="?"){let ye=encodeURI(h.tag[0]==="!"?h.tag.slice(1):h.tag).replace(/!/g,"%21");h.tag[0]==="!"?ye="!"+ye:ye.slice(0,18)==="tag:yaml.org,2002:"?ye="!!"+ye.slice(18):ye="!<"+ye+">",h.dump=ye+" "+h.dump}}return!0}function C(h,w){let R=[],k=[];S(h,R,k);let E=k.length;for(let I=0;I<E;I+=1)w.duplicates.push(R[k[I]]);w.usedDuplicates=new Array(E)}function S(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 E=0,I=h.length;E<I;E+=1)S(h[E],w,R);else{let E=Object.keys(h);for(let I=0,P=E.length;I<P;I+=1)S(h[E[I]],w,R)}}}function O(h,w){w=w||{};let R=new Us(w);R.noRefs||C(h,R);let k=h;return R.replacer&&(k=R.replacer.call({"":k},"",k)),x(R,0,k,!0,!0)?R.dump+`
|
|
60
|
+
`:""}e.exports.dump=O})),cf=Vw(pe(((t,e)=>{var r=jw(),n=Dw();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=Ne(),e.exports.Schema=Up(),e.exports.FAILSAFE_SCHEMA=Jp(),e.exports.JSON_SCHEMA=Zp(),e.exports.CORE_SCHEMA=ef(),e.exports.DEFAULT_SCHEMA=xa(),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.dump=n.dump,e.exports.YAMLException=An(),e.exports.types={binary:nf(),float:Qp(),map:zp(),null:Kp(),pairs:sf(),set:af(),timestamp:tf(),bool:Yp(),int:Xp(),merge:rf(),omap:of(),seq:Gp(),str:Wp()},e.exports.safeLoad=i("safeLoad","load"),e.exports.safeLoadAll=i("safeLoadAll","loadAll"),e.exports.safeDump=i("safeDump","dump")}))(),1),{Type:WI,Schema:GI,FAILSAFE_SCHEMA:zI,JSON_SCHEMA:JI,CORE_SCHEMA:KI,DEFAULT_SCHEMA:YI,load:XI,loadAll:QI,dump:ZI,YAMLException:eR,types:tR,safeLoad:rR,safeLoadAll:nR,safeDump:iR}=cf.default,at=cf.default});import{access as qw,readFile as lf}from"node:fs/promises";import{dirname as uf,relative as cR,resolve as we}from"node:path";async function Fw(t=process.cwd()){let e=we(t);for(;;){let r=we(e,"view-contracts.config.yaml");try{return await qw(r),r}catch{let n=uf(e);if(n===e)return null;e=n}}}async function Wt(t){if(t)return we(t);let e=await Fw();if(!e)throw new Error("view-contracts.config.yaml not found. Pass -c <path> or run from a project directory.");return e}async function De(t){let e=we(t),r=await lf(e,"utf-8"),n=at.load(r);return Hw(e,n)}function Hw(t,e){let r=fe(t);return{...e,openapi:we(r,e.openapi),bindings:we(r,e.bindings),microContractsConfig:we(r,e.microContractsConfig),viewsDir:we(r,e.viewsDir),generated:{contractDir:we(r,e.generated.contractDir),actions:we(r,e.generated.actions),bridge:we(r,e.generated.bridge),reactDir:we(r,e.generated.reactDir)},runtimeModule:e.runtimeModule?we(r,e.runtimeModule):e.componentsModule?we(r,e.componentsModule):void 0,themeModule:e.themeModule?we(r,e.themeModule):void 0,design:e.design?{tokens:e.design.tokens?we(r,e.design.tokens):void 0,theme:e.design.theme?we(r,e.design.theme):void 0,extensionsCss:e.design.extensionsCss?we(r,e.design.extensionsCss):void 0}:void 0,extensions:e.extensions?we(r,e.extensions):void 0}}async function gt(t){let e=await lf(we(t),"utf-8");return at.load(e)}function pf(t,e){return we(t.generated.reactDir,"components",`${e.screenName}.generated.tsx`)}function fe(t){return uf(we(t))}function Gt(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 ct=K(()=>{"use strict";Dr()});var Mn=b(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 Tn=class{};oe._CodeOrName=Tn;oe.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var ur=class extends Tn{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=ur;var Ye=class extends Tn{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 ur&&(r[n.str]=(r[n.str]||0)+1),r),{})}};oe._Code=Ye;oe.nil=new Ye("");function df(t,...e){let r=[t[0]],n=0;for(;n<e.length;)ka(r,e[n]),r.push(t[++n]);return new Ye(r)}oe._=df;var $a=new Ye("+");function hf(t,...e){let r=[Nn(t[0])],n=0;for(;n<e.length;)r.push($a),ka(r,e[n]),r.push($a,Nn(t[++n]));return Uw(r),new Ye(r)}oe.str=hf;function ka(t,e){e instanceof Ye?t.push(...e._items):e instanceof ur?t.push(e):t.push(zw(e))}oe.addCodeArg=ka;function Uw(t){let e=1;for(;e<t.length-1;){if(t[e]===$a){let r=Ww(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function Ww(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof ur||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 ur))return`"${t}${e.slice(1)}`}function Gw(t,e){return e.emptyStr()?t:t.emptyStr()?e:hf`${t}${e}`}oe.strConcat=Gw;function zw(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Nn(Array.isArray(t)?t.join(","):t)}function Jw(t){return new Ye(Nn(t))}oe.stringify=Jw;function Nn(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}oe.safeStringify=Nn;function Kw(t){return typeof t=="string"&&oe.IDENTIFIER.test(t)?new Ye(`.${t}`):df`[${t}]`}oe.getProperty=Kw;function Yw(t){if(typeof t=="string"&&oe.IDENTIFIER.test(t))return new Ye(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}oe.getEsmExportName=Yw;function Xw(t){return new Ye(t.toString())}oe.regexpCode=Xw});var Pa=b(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.ValueScope=Fe.ValueScopeName=Fe.Scope=Fe.varKinds=Fe.UsedValueState=void 0;var qe=Mn(),Ea=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},to;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(to||(Fe.UsedValueState=to={}));Fe.varKinds={const:new qe.Name("const"),let:new qe.Name("let"),var:new qe.Name("var")};var ro=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof qe.Name?e:this.name(e)}name(e){return new qe.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}}};Fe.Scope=ro;var no=class extends qe.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,qe._)`.${new qe.Name(r)}[${n}]`}};Fe.ValueScopeName=no;var Qw=(0,qe._)`\n`,Ca=class extends ro{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Qw:qe.nil}}get(){return this._scope}name(e){return new no(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,qe._)`${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=qe.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,to.Started);let f=r(l);if(f){let p=this.opts.es5?Fe.varKinds.var:Fe.varKinds.const;o=(0,qe._)`${o}${p} ${l} = ${f};${this.opts._n}`}else if(f=i?.(l))o=(0,qe._)`${o}${f}${this.opts._n}`;else throw new Ea(l);c.set(l,to.Completed)})}return o}};Fe.ValueScope=Ca});var Y=b(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Q.or=Q.and=Q.not=Q.CodeGen=Q.operators=Q.varKinds=Q.ValueScopeName=Q.ValueScope=Q.Scope=Q.Name=Q.regexpCode=Q.stringify=Q.getProperty=Q.nil=Q.strConcat=Q.str=Q._=void 0;var ne=Mn(),lt=Pa(),zt=Mn();Object.defineProperty(Q,"_",{enumerable:!0,get:function(){return zt._}});Object.defineProperty(Q,"str",{enumerable:!0,get:function(){return zt.str}});Object.defineProperty(Q,"strConcat",{enumerable:!0,get:function(){return zt.strConcat}});Object.defineProperty(Q,"nil",{enumerable:!0,get:function(){return zt.nil}});Object.defineProperty(Q,"getProperty",{enumerable:!0,get:function(){return zt.getProperty}});Object.defineProperty(Q,"stringify",{enumerable:!0,get:function(){return zt.stringify}});Object.defineProperty(Q,"regexpCode",{enumerable:!0,get:function(){return zt.regexpCode}});Object.defineProperty(Q,"Name",{enumerable:!0,get:function(){return zt.Name}});var ao=Pa();Object.defineProperty(Q,"Scope",{enumerable:!0,get:function(){return ao.Scope}});Object.defineProperty(Q,"ValueScope",{enumerable:!0,get:function(){return ao.ValueScope}});Object.defineProperty(Q,"ValueScopeName",{enumerable:!0,get:function(){return ao.ValueScopeName}});Object.defineProperty(Q,"varKinds",{enumerable:!0,get:function(){return ao.varKinds}});Q.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 Nt=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},Ia=class extends Nt{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?lt.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=Fr(this.rhs,e,r)),this}get names(){return this.rhs instanceof ne._CodeOrName?this.rhs.names:{}}},io=class extends Nt{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=Fr(this.rhs,e,r),this}get names(){let e=this.lhs instanceof ne.Name?{}:{...this.lhs.names};return so(e,this.rhs)}},Ra=class extends io{constructor(e,r,n,i){super(e,n,i),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Oa=class extends Nt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Aa=class extends Nt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Ta=class extends Nt{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Na=class extends Nt{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=Fr(this.code,e,r),this}get names(){return this.code instanceof ne._CodeOrName?this.code.names:{}}},Vn=class extends Nt{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)||(Zw(e,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>dr(e,r.names),{})}},Mt=class extends Vn{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Ma=class extends Vn{},qr=class extends Mt{};qr.kind="else";var pr=class t extends Mt{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 qr(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(mf(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=Fr(this.condition,e,r),this}get names(){let e=super.names;return so(e,this.condition),this.else&&dr(e,this.else.names),e}};pr.kind="if";var fr=class extends Mt{};fr.kind="for";var Va=class extends fr{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=Fr(this.iteration,e,r),this}get names(){return dr(super.names,this.iteration.names)}},La=class extends fr{constructor(e,r,n,i){super(),this.varKind=e,this.name=r,this.from=n,this.to=i}render(e){let r=e.es5?lt.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=so(super.names,this.from);return so(e,this.to)}},oo=class extends fr{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=Fr(this.iterable,e,r),this}get names(){return dr(super.names,this.iterable.names)}},Ln=class extends Mt{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)}};Ln.kind="func";var jn=class extends Vn{render(e){return"return "+super.render(e)}};jn.kind="return";var ja=class extends Mt{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&&dr(e,this.catch.names),this.finally&&dr(e,this.finally.names),e}},Dn=class extends Mt{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Dn.kind="catch";var qn=class extends Mt{render(e){return"finally"+super.render(e)}};qn.kind="finally";var Da=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
61
|
+
`:""},this._extScope=e,this._scope=new lt.Scope({parent:e}),this._nodes=[new Ma]}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 Ia(e,o,n)),o}const(e,r,n){return this._def(lt.varKinds.const,e,r,n)}let(e,r,n){return this._def(lt.varKinds.let,e,r,n)}var(e,r,n){return this._def(lt.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new io(e,r,n))}add(e,r){return this._leafNode(new Ra(e,Q.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==ne.nil&&this._leafNode(new Na(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 pr(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 pr(e))}else(){return this._elseNode(new qr)}endIf(){return this._endBlockNode(pr,qr)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new Va(e),r)}forRange(e,r,n,i,o=this.opts.es5?lt.varKinds.var:lt.varKinds.let){let s=this._scope.toName(e);return this._for(new La(o,s,r,n),()=>i(s))}forOf(e,r,n,i=lt.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 oo("of",i,o,r),()=>n(o))}forIn(e,r,n,i=this.opts.es5?lt.varKinds.var:lt.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 oo("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(fr)}label(e){return this._leafNode(new Oa(e))}break(e){return this._leafNode(new Aa(e))}return(e){let r=new jn;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(jn)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new ja;if(this._blockNode(i),this.code(e),r){let o=this.name("e");this._currNode=i.catch=new Dn(o),r(o)}return n&&(this._currNode=i.finally=new qn,this.code(n)),this._endBlockNode(Dn,qn)}throw(e){return this._leafNode(new Ta(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 Ln(e,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Ln)}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 pr))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}};Q.CodeGen=Da;function dr(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function so(t,e){return e instanceof ne._CodeOrName?dr(t,e.names):t}function Fr(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 Zw(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function mf(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,ne._)`!${qa(t)}`}Q.not=mf;var e_=gf(Q.operators.AND);function t_(...t){return t.reduce(e_)}Q.and=t_;var r_=gf(Q.operators.OR);function n_(...t){return t.reduce(r_)}Q.or=n_;function gf(t){return(e,r)=>e===ne.nil?r:r===ne.nil?e:(0,ne._)`${qa(e)} ${t} ${qa(r)}`}function qa(t){return t instanceof ne.Name?t:(0,ne._)`(${t})`}});var ee=b(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.checkStrictMode=Z.getErrorPath=Z.Type=Z.useFunc=Z.setEvaluated=Z.evaluatedPropsToName=Z.mergeEvaluated=Z.eachItem=Z.unescapeJsonPointer=Z.escapeJsonPointer=Z.escapeFragment=Z.unescapeFragment=Z.schemaRefOrVal=Z.schemaHasRulesButRef=Z.schemaHasRules=Z.checkUnknownRules=Z.alwaysValidSchema=Z.toHash=void 0;var ue=Y(),i_=Mn();function o_(t){let e={};for(let r of t)e[r]=!0;return e}Z.toHash=o_;function s_(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(wf(t,e),!_f(e,t.self.RULES.all))}Z.alwaysValidSchema=s_;function wf(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]||xf(t,`unknown keyword: "${o}"`)}Z.checkUnknownRules=wf;function _f(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}Z.schemaHasRules=_f;function a_(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}Z.schemaHasRulesButRef=a_;function c_({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)}`}Z.schemaRefOrVal=c_;function l_(t){return bf(decodeURIComponent(t))}Z.unescapeFragment=l_;function u_(t){return encodeURIComponent(Ha(t))}Z.escapeFragment=u_;function Ha(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}Z.escapeJsonPointer=Ha;function bf(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}Z.unescapeJsonPointer=bf;function p_(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}Z.eachItem=p_;function yf({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}}Z.mergeEvaluated={props:yf({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} || {}`),Ba(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Sf}),items:yf({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 Sf(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,ue._)`{}`);return e!==void 0&&Ba(t,r,e),r}Z.evaluatedPropsToName=Sf;function Ba(t,e,r){Object.keys(r).forEach(n=>t.assign((0,ue._)`${e}${(0,ue.getProperty)(n)}`,!0))}Z.setEvaluated=Ba;var vf={};function f_(t,e){return t.scopeValue("func",{ref:e,code:vf[e.code]||(vf[e.code]=new i_._Code(e.code))})}Z.useFunc=f_;var Fa;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(Fa||(Z.Type=Fa={}));function d_(t,e,r){if(t instanceof ue.Name){let n=e===Fa.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():"/"+Ha(t)}Z.getErrorPath=d_;function xf(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}Z.checkStrictMode=xf});var Xe=b(Ua=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});var Re=Y(),h_={data:new Re.Name("data"),valCxt:new Re.Name("valCxt"),instancePath:new Re.Name("instancePath"),parentData:new Re.Name("parentData"),parentDataProperty:new Re.Name("parentDataProperty"),rootData:new Re.Name("rootData"),dynamicAnchors:new Re.Name("dynamicAnchors"),vErrors:new Re.Name("vErrors"),errors:new Re.Name("errors"),this:new Re.Name("this"),self:new Re.Name("self"),scope:new Re.Name("scope"),json:new Re.Name("json"),jsonPos:new Re.Name("jsonPos"),jsonLen:new Re.Name("jsonLen"),jsonPart:new Re.Name("jsonPart")};Ua.default=h_});var Fn=b(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.extendErrors=Oe.resetErrorsCount=Oe.reportExtraError=Oe.reportError=Oe.keyword$DataError=Oe.keywordError=void 0;var ie=Y(),co=ee(),Me=Xe();Oe.keywordError={message:({keyword:t})=>(0,ie.str)`must pass "${t}" keyword validation`};Oe.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 m_(t,e=Oe.keywordError,r,n){let{it:i}=t,{gen:o,compositeRule:s,allErrors:a}=i,c=Ef(t,e,r);n??(s||a)?$f(o,c):kf(i,(0,ie._)`[${c}]`)}Oe.reportError=m_;function g_(t,e=Oe.keywordError,r){let{it:n}=t,{gen:i,compositeRule:o,allErrors:s}=n,a=Ef(t,e,r);$f(i,a),o||s||kf(n,Me.default.vErrors)}Oe.reportExtraError=g_;function y_(t,e){t.assign(Me.default.errors,e),t.if((0,ie._)`${Me.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,ie._)`${Me.default.vErrors}.length`,e),()=>t.assign(Me.default.vErrors,null)))}Oe.resetErrorsCount=y_;function v_({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,Me.default.errors,a=>{t.const(s,(0,ie._)`${Me.default.vErrors}[${a}]`),t.if((0,ie._)`${s}.instancePath === undefined`,()=>t.assign((0,ie._)`${s}.instancePath`,(0,ie.strConcat)(Me.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))})}Oe.extendErrors=v_;function $f(t,e){let r=t.const("err",e);t.if((0,ie._)`${Me.default.vErrors} === null`,()=>t.assign(Me.default.vErrors,(0,ie._)`[${r}]`),(0,ie._)`${Me.default.vErrors}.push(${r})`),t.code((0,ie._)`${Me.default.errors}++`)}function kf(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 hr={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 Ef(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,ie._)`{}`:w_(t,e,r)}function w_(t,e,r={}){let{gen:n,it:i}=t,o=[__(i,r),b_(t,r)];return S_(t,e,o),n.object(...o)}function __({errorPath:t},{instancePath:e}){let r=e?(0,ie.str)`${t}${(0,co.getErrorPath)(e,co.Type.Str)}`:t;return[Me.default.instancePath,(0,ie.strConcat)(Me.default.instancePath,r)]}function b_({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,co.getErrorPath)(r,co.Type.Str)}`),[hr.schemaPath,i]}function S_(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([hr.keyword,i],[hr.params,typeof e=="function"?e(t):e||(0,ie._)`{}`]),c.messages&&n.push([hr.message,typeof r=="function"?r(t):r]),c.verbose&&n.push([hr.schema,s],[hr.parentSchema,(0,ie._)`${f}${p}`],[Me.default.data,o]),l&&n.push([hr.propertyName,l])}});var Pf=b(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.boolOrEmptySchema=Hr.topBoolOrEmptySchema=void 0;var x_=Fn(),$_=Y(),k_=Xe(),E_={message:"boolean schema is false"};function C_(t){let{gen:e,schema:r,validateName:n}=t;r===!1?Cf(t,!1):typeof r=="object"&&r.$async===!0?e.return(k_.default.data):(e.assign((0,$_._)`${n}.errors`,null),e.return(!0))}Hr.topBoolOrEmptySchema=C_;function P_(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),Cf(t)):r.var(e,!0)}Hr.boolOrEmptySchema=P_;function Cf(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,x_.reportError)(i,E_,void 0,e)}});var Wa=b(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.getRules=Br.isJSONType=void 0;var I_=["string","number","integer","boolean","null","object","array"],R_=new Set(I_);function O_(t){return typeof t=="string"&&R_.has(t)}Br.isJSONType=O_;function A_(){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:{}}}Br.getRules=A_});var Ga=b(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.shouldUseRule=Jt.shouldUseGroup=Jt.schemaHasRulesForType=void 0;function T_({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&If(t,n)}Jt.schemaHasRulesForType=T_;function If(t,e){return e.rules.some(r=>Rf(t,r))}Jt.shouldUseGroup=If;function Rf(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))}Jt.shouldUseRule=Rf});var Hn=b(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.reportTypeError=Ae.checkDataTypes=Ae.checkDataType=Ae.coerceAndCheckDataType=Ae.getJSONTypes=Ae.getSchemaTypes=Ae.DataType=void 0;var N_=Wa(),M_=Ga(),V_=Fn(),X=Y(),Of=ee(),Ur;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(Ur||(Ae.DataType=Ur={}));function L_(t){let e=Af(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}Ae.getSchemaTypes=L_;function Af(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(N_.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Ae.getJSONTypes=Af;function j_(t,e){let{gen:r,data:n,opts:i}=t,o=D_(e,i.coerceTypes),s=e.length>0&&!(o.length===0&&e.length===1&&(0,M_.schemaHasRulesForType)(t,e[0]));if(s){let a=Ja(e,n,i.strictNumbers,Ur.Wrong);r.if(a,()=>{o.length?q_(t,e,o):Ka(t)})}return s}Ae.coerceAndCheckDataType=j_;var Tf=new Set(["string","number","integer","boolean","null"]);function D_(t,e){return e?t.filter(r=>Tf.has(r)||e==="array"&&r==="array"):[]}function q_(t,e,r){let{gen:n,data:i,opts:o}=t,s=n.let("dataType",(0,X._)`typeof ${i}`),a=n.let("coerced",(0,X._)`undefined`);o.coerceTypes==="array"&&n.if((0,X._)`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,X._)`${i}[0]`).assign(s,(0,X._)`typeof ${i}`).if(Ja(e,i,o.strictNumbers),()=>n.assign(a,i))),n.if((0,X._)`${a} !== undefined`);for(let l of r)(Tf.has(l)||l==="array"&&o.coerceTypes==="array")&&c(l);n.else(),Ka(t),n.endIf(),n.if((0,X._)`${a} !== undefined`,()=>{n.assign(i,a),F_(t,a)});function c(l){switch(l){case"string":n.elseIf((0,X._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,X._)`"" + ${i}`).elseIf((0,X._)`${i} === null`).assign(a,(0,X._)`""`);return;case"number":n.elseIf((0,X._)`${s} == "boolean" || ${i} === null
|
|
62
|
+
|| (${s} == "string" && ${i} && ${i} == +${i})`).assign(a,(0,X._)`+${i}`);return;case"integer":n.elseIf((0,X._)`${s} === "boolean" || ${i} === null
|
|
63
|
+
|| (${s} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(a,(0,X._)`+${i}`);return;case"boolean":n.elseIf((0,X._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(a,!1).elseIf((0,X._)`${i} === "true" || ${i} === 1`).assign(a,!0);return;case"null":n.elseIf((0,X._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(a,null);return;case"array":n.elseIf((0,X._)`${s} === "string" || ${s} === "number"
|
|
64
|
+
|| ${s} === "boolean" || ${i} === null`).assign(a,(0,X._)`[${i}]`)}}}function F_({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,X._)`${e} !== undefined`,()=>t.assign((0,X._)`${e}[${r}]`,n))}function za(t,e,r,n=Ur.Correct){let i=n===Ur.Correct?X.operators.EQ:X.operators.NEQ,o;switch(t){case"null":return(0,X._)`${e} ${i} null`;case"array":o=(0,X._)`Array.isArray(${e})`;break;case"object":o=(0,X._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=s((0,X._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=s();break;default:return(0,X._)`typeof ${e} ${i} ${t}`}return n===Ur.Correct?o:(0,X.not)(o);function s(a=X.nil){return(0,X.and)((0,X._)`typeof ${e} == "number"`,a,r?(0,X._)`isFinite(${e})`:X.nil)}}Ae.checkDataType=za;function Ja(t,e,r,n){if(t.length===1)return za(t[0],e,r,n);let i,o=(0,Of.toHash)(t);if(o.array&&o.object){let s=(0,X._)`typeof ${e} != "object"`;i=o.null?s:(0,X._)`!${e} || ${s}`,delete o.null,delete o.array,delete o.object}else i=X.nil;o.number&&delete o.integer;for(let s in o)i=(0,X.and)(i,za(s,e,r,n));return i}Ae.checkDataTypes=Ja;var H_={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,X._)`{type: ${t}}`:(0,X._)`{type: ${e}}`};function Ka(t){let e=B_(t);(0,V_.reportError)(e,H_)}Ae.reportTypeError=Ka;function B_(t){let{gen:e,data:r,schema:n}=t,i=(0,Of.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var Mf=b(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.assignDefaults=void 0;var Wr=Y(),U_=ee();function W_(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)Nf(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,o)=>Nf(t,o,i.default))}lo.assignDefaults=W_;function Nf(t,e,r){let{gen:n,compositeRule:i,data:o,opts:s}=t;if(r===void 0)return;let a=(0,Wr._)`${o}${(0,Wr.getProperty)(e)}`;if(i){(0,U_.checkStrictMode)(t,`default is ignored for: ${a}`);return}let c=(0,Wr._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,Wr._)`${c} || ${a} === null || ${a} === ""`),n.if(c,(0,Wr._)`${a} = ${(0,Wr.stringify)(r)}`)}});var Qe=b(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 de=Y(),Ya=ee(),Kt=Xe(),G_=ee();function z_(t,e){let{gen:r,data:n,it:i}=t;r.if(Qa(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,de._)`${e}`},!0),t.error()})}le.checkReportMissingProp=z_;function J_({gen:t,data:e,it:{opts:r}},n,i){return(0,de.or)(...n.map(o=>(0,de.and)(Qa(t,e,o,r.ownProperties),(0,de._)`${i} = ${o}`)))}le.checkMissingProp=J_;function K_(t,e){t.setParams({missingProperty:e},!0),t.error()}le.reportMissingProp=K_;function Vf(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,de._)`Object.prototype.hasOwnProperty`})}le.hasPropFunc=Vf;function Xa(t,e,r){return(0,de._)`${Vf(t)}.call(${e}, ${r})`}le.isOwnProperty=Xa;function Y_(t,e,r,n){let i=(0,de._)`${e}${(0,de.getProperty)(r)} !== undefined`;return n?(0,de._)`${i} && ${Xa(t,e,r)}`:i}le.propertyInData=Y_;function Qa(t,e,r,n){let i=(0,de._)`${e}${(0,de.getProperty)(r)} === undefined`;return n?(0,de.or)(i,(0,de.not)(Xa(t,e,r))):i}le.noPropertyInData=Qa;function Lf(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}le.allSchemaProperties=Lf;function X_(t,e){return Lf(e).filter(r=>!(0,Ya.alwaysValidSchema)(t,e[r]))}le.schemaProperties=X_;function Q_({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:s},a,c,l){let f=l?(0,de._)`${t}, ${e}, ${n}${i}`:e,p=[[Kt.default.instancePath,(0,de.strConcat)(Kt.default.instancePath,o)],[Kt.default.parentData,s.parentData],[Kt.default.parentDataProperty,s.parentDataProperty],[Kt.default.rootData,Kt.default.rootData]];s.opts.dynamicRef&&p.push([Kt.default.dynamicAnchors,Kt.default.dynamicAnchors]);let d=(0,de._)`${f}, ${r.object(...p)}`;return c!==de.nil?(0,de._)`${a}.call(${c}, ${d})`:(0,de._)`${a}(${d})`}le.callValidateCode=Q_;var Z_=(0,de._)`new RegExp`;function eb({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,de._)`${i.code==="new RegExp"?Z_:(0,G_.useFunc)(t,i)}(${r}, ${n})`})}le.usePattern=eb;function tb(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,de._)`${r}.length`);e.forRange("i",0,c,l=>{t.subschema({keyword:n,dataProp:l,dataPropType:Ya.Type.Num},o),e.if((0,de.not)(o),a)})}}le.validateArray=tb;function rb(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,Ya.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,de._)`${s} || ${a}`),t.mergeValidEvaluated(f,a)||e.if((0,de.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}le.validateUnion=rb});var qf=b(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.validateKeywordUsage=yt.validSchemaType=yt.funcKeywordCode=yt.macroKeywordCode=void 0;var Ve=Y(),mr=Xe(),nb=Qe(),ib=Fn();function ob(t,e){let{gen:r,keyword:n,schema:i,parentSchema:o,it:s}=t,a=e.macro.call(s.self,i,o,s),c=Df(r,n,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let l=r.name("valid");t.subschema({schema:a,schemaPath:Ve.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),t.pass(l,()=>t.error(!0))}yt.macroKeywordCode=ob;function sb(t,e){var r;let{gen:n,keyword:i,schema:o,parentSchema:s,$data:a,it:c}=t;cb(c,e);let l=!a&&e.compile?e.compile.call(c.self,o,s,c):e.validate,f=Df(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&&jf(t),$(()=>t.error());else{let _=e.async?m():g();e.modifying&&jf(t),$(()=>ab(t,_))}}function m(){let _=n.let("ruleErrs",null);return n.try(()=>y((0,Ve._)`await `),M=>n.assign(p,!1).if((0,Ve._)`${M} instanceof ${c.ValidationError}`,()=>n.assign(_,(0,Ve._)`${M}.errors`),()=>n.throw(M))),_}function g(){let _=(0,Ve._)`${f}.errors`;return n.assign(_,null),y(Ve.nil),_}function y(_=e.async?(0,Ve._)`await `:Ve.nil){let M=c.opts.passContext?mr.default.this:mr.default.self,j=!("compile"in e&&!a||e.schema===!1);n.assign(p,(0,Ve._)`${_}${(0,nb.callValidateCode)(t,f,M,j)}`,e.modifying)}function $(_){var M;n.if((0,Ve.not)((M=e.valid)!==null&&M!==void 0?M:p),_)}}yt.funcKeywordCode=sb;function jf(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,Ve._)`${n.parentData}[${n.parentDataProperty}]`))}function ab(t,e){let{gen:r}=t;r.if((0,Ve._)`Array.isArray(${e})`,()=>{r.assign(mr.default.vErrors,(0,Ve._)`${mr.default.vErrors} === null ? ${e} : ${mr.default.vErrors}.concat(${e})`).assign(mr.default.errors,(0,Ve._)`${mr.default.vErrors}.length`),(0,ib.extendErrors)(t)},()=>t.error())}function cb({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function Df(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,Ve.stringify)(r)})}function lb(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")}yt.validSchemaType=lb;function ub({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)}}yt.validateKeywordUsage=ub});var Hf=b(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.extendSubschemaMode=Yt.extendSubschemaData=Yt.getSubschema=void 0;var vt=Y(),Ff=ee();function pb(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,vt._)`${t.schemaPath}${(0,vt.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[r],schemaPath:(0,vt._)`${t.schemaPath}${(0,vt.getProperty)(e)}${(0,vt.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,Ff.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')}Yt.getSubschema=pb;function fb(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,vt._)`${e.data}${(0,vt.getProperty)(r)}`,!0);c(d),t.errorPath=(0,vt.str)`${l}${(0,Ff.getErrorPath)(r,n,p.jsPropertySyntax)}`,t.parentDataProperty=(0,vt._)`${r}`,t.dataPathArr=[...f,t.parentDataProperty]}if(i!==void 0){let l=i instanceof vt.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]}}Yt.extendSubschemaData=fb;function db(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}Yt.extendSubschemaMode=db});var Za=b((CR,Bf)=>{"use strict";Bf.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 Wf=b((PR,Uf)=>{"use strict";var Xt=Uf.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(){};uo(e,n,i,t,"",t)};Xt.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Xt.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Xt.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Xt.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 uo(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 Xt.arrayKeywords)for(var d=0;d<p.length;d++)uo(t,e,r,p[d],i+"/"+f+"/"+d,o,i,f,n,d)}else if(f in Xt.propsKeywords){if(p&&typeof p=="object")for(var m in p)uo(t,e,r,p[m],i+"/"+f+"/"+hb(m),o,i,f,n,m)}else(f in Xt.keywords||t.allKeys&&!(f in Xt.skipKeywords))&&uo(t,e,r,p,i+"/"+f,o,i,f,n)}r(n,i,o,s,a,c,l)}}function hb(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Bn=b(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.getSchemaRefs=He.resolveUrl=He.normalizeId=He._getFullPath=He.getFullPath=He.inlineRef=void 0;var mb=ee(),gb=Za(),yb=Wf(),vb=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function wb(t,e=!0){return typeof t=="boolean"?!0:e===!0?!ec(t):e?Gf(t)<=e:!1}He.inlineRef=wb;var _b=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function ec(t){for(let e in t){if(_b.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(ec)||typeof r=="object"&&ec(r))return!0}return!1}function Gf(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!vb.has(r)&&(typeof t[r]=="object"&&(0,mb.eachItem)(t[r],n=>e+=Gf(n)),e===1/0))return 1/0}return e}function zf(t,e="",r){r!==!1&&(e=Gr(e));let n=t.parse(e);return Jf(t,n)}He.getFullPath=zf;function Jf(t,e){return t.serialize(e).split("#")[0]+"#"}He._getFullPath=Jf;var bb=/#\/?$/;function Gr(t){return t?t.replace(bb,""):""}He.normalizeId=Gr;function Sb(t,e,r){return r=Gr(r),t.resolve(e,r)}He.resolveUrl=Sb;var xb=/^[a-z_][-a-z0-9._]*$/i;function $b(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=Gr(t[r]||e),o={"":i},s=zf(n,i,!1),a={},c=new Set;return yb(t,{allKeys:!0},(p,d,m,g)=>{if(g===void 0)return;let y=s+d,$=o[g];typeof p[r]=="string"&&($=_.call(this,p[r])),M.call(this,p.$anchor),M.call(this,p.$dynamicAnchor),o[d]=$;function _(j){let T=this.opts.uriResolver.resolve;if(j=Gr($?T($,j):j),c.has(j))throw f(j);c.add(j);let N=this.refs[j];return typeof N=="string"&&(N=this.refs[N]),typeof N=="object"?l(p,N.schema,j):j!==Gr(y)&&(j[0]==="#"?(l(p,a[j],j),a[j]=p):this.refs[j]=y),j}function M(j){if(typeof j=="string"){if(!xb.test(j))throw new Error(`invalid anchor "${j}"`);_.call(this,`#${j}`)}}}),a;function l(p,d,m){if(d!==void 0&&!gb(p,d))throw f(m)}function f(p){return new Error(`reference "${p}" resolves to more than one schema`)}}He.getSchemaRefs=$b});var Gn=b(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.getData=Qt.KeywordCxt=Qt.validateFunctionCode=void 0;var Zf=Pf(),Kf=Hn(),rc=Ga(),po=Hn(),kb=Mf(),Wn=qf(),tc=Hf(),F=Y(),J=Xe(),Eb=Bn(),Vt=ee(),Un=Fn();function Cb(t){if(rd(t)&&(nd(t),td(t))){Rb(t);return}ed(t,()=>(0,Zf.topBoolOrEmptySchema)(t))}Qt.validateFunctionCode=Cb;function ed({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},o){i.code.es5?t.func(e,(0,F._)`${J.default.data}, ${J.default.valCxt}`,n.$async,()=>{t.code((0,F._)`"use strict"; ${Yf(r,i)}`),Ib(t,i),t.code(o)}):t.func(e,(0,F._)`${J.default.data}, ${Pb(i)}`,n.$async,()=>t.code(Yf(r,i)).code(o))}function Pb(t){return(0,F._)`{${J.default.instancePath}="", ${J.default.parentData}, ${J.default.parentDataProperty}, ${J.default.rootData}=${J.default.data}${t.dynamicRef?(0,F._)`, ${J.default.dynamicAnchors}={}`:F.nil}}={}`}function Ib(t,e){t.if(J.default.valCxt,()=>{t.var(J.default.instancePath,(0,F._)`${J.default.valCxt}.${J.default.instancePath}`),t.var(J.default.parentData,(0,F._)`${J.default.valCxt}.${J.default.parentData}`),t.var(J.default.parentDataProperty,(0,F._)`${J.default.valCxt}.${J.default.parentDataProperty}`),t.var(J.default.rootData,(0,F._)`${J.default.valCxt}.${J.default.rootData}`),e.dynamicRef&&t.var(J.default.dynamicAnchors,(0,F._)`${J.default.valCxt}.${J.default.dynamicAnchors}`)},()=>{t.var(J.default.instancePath,(0,F._)`""`),t.var(J.default.parentData,(0,F._)`undefined`),t.var(J.default.parentDataProperty,(0,F._)`undefined`),t.var(J.default.rootData,J.default.data),e.dynamicRef&&t.var(J.default.dynamicAnchors,(0,F._)`{}`)})}function Rb(t){let{schema:e,opts:r,gen:n}=t;ed(t,()=>{r.$comment&&e.$comment&&od(t),Mb(t),n.let(J.default.vErrors,null),n.let(J.default.errors,0),r.unevaluated&&Ob(t),id(t),jb(t)})}function Ob(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,F._)`${r}.evaluated`),e.if((0,F._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,F._)`${t.evaluated}.props`,(0,F._)`undefined`)),e.if((0,F._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,F._)`${t.evaluated}.items`,(0,F._)`undefined`))}function Yf(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,F._)`/*# sourceURL=${r} */`:F.nil}function Ab(t,e){if(rd(t)&&(nd(t),td(t))){Tb(t,e);return}(0,Zf.boolOrEmptySchema)(t,e)}function td({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 rd(t){return typeof t.schema!="boolean"}function Tb(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&od(t),Vb(t),Lb(t);let o=n.const("_errs",J.default.errors);id(t,o),n.var(e,(0,F._)`${o} === ${J.default.errors}`)}function nd(t){(0,Vt.checkUnknownRules)(t),Nb(t)}function id(t,e){if(t.opts.jtd)return Xf(t,[],!1,e);let r=(0,Kf.getSchemaTypes)(t.schema),n=(0,Kf.coerceAndCheckDataType)(t,r);Xf(t,r,!n,e)}function Nb(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Vt.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Mb(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Vt.checkStrictMode)(t,"default is ignored in the schema root")}function Vb(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,Eb.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function Lb(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function od({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)t.code((0,F._)`${J.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let s=(0,F.str)`${n}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,F._)`${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,F._)`${J.default.errors} === 0`,()=>e.return(J.default.data),()=>e.throw((0,F._)`new ${i}(${J.default.vErrors})`)):(e.assign((0,F._)`${n}.errors`,J.default.vErrors),o.unevaluated&&Db(t),e.return((0,F._)`${J.default.errors} === 0`))}function Db({gen:t,evaluated:e,props:r,items:n}){r instanceof F.Name&&t.assign((0,F._)`${e}.props`,r),n instanceof F.Name&&t.assign((0,F._)`${e}.items`,n)}function Xf(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,Vt.schemaHasRulesButRef)(o,f))){i.block(()=>ad(t,"$ref",f.all.$ref.definition));return}c.jtd||qb(t,e),i.block(()=>{for(let d of f.rules)p(d);p(f.post)});function p(d){(0,rc.shouldUseGroup)(o,d)&&(d.type?(i.if((0,po.checkDataType)(d.type,s,c.strictNumbers)),Qf(t,d),e.length===1&&e[0]===d.type&&r&&(i.else(),(0,po.reportTypeError)(t)),i.endIf()):Qf(t,d),a||i.if((0,F._)`${J.default.errors} === ${n||0}`))}}function Qf(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,kb.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0,rc.shouldUseRule)(n,o)&&ad(t,o.keyword,o.definition,e.type)})}function qb(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(Fb(t,e),t.opts.allowUnionTypes||Hb(t,e),Bb(t,t.dataTypes))}function Fb(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{sd(t.dataTypes,r)||nc(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),Wb(t,e)}}function Hb(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&nc(t,"use allowUnionTypes to allow union type keyword")}function Bb(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,rc.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(s=>Ub(e,s))&&nc(t,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function Ub(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function sd(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function Wb(t,e){let r=[];for(let n of t.dataTypes)sd(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function nc(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Vt.checkStrictMode)(t,e,t.opts.strictTypes)}var fo=class{constructor(e,r,n){if((0,Wn.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,Vt.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",cd(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Wn.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,F.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,F.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,F._)`${r} !== undefined && (${(0,F.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?Un.reportExtraError:Un.reportError)(this,this.def.error,r)}$dataError(){(0,Un.reportError)(this,this.def.$dataError||Un.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Un.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=F.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=F.nil,r=F.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:s}=this;n.if((0,F.or)((0,F._)`${i} === undefined`,r)),e!==F.nil&&n.assign(e,!0),(o.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==F.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,F.or)(s(),a());function s(){if(n.length){if(!(r instanceof F.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,F._)`${(0,po.checkDataTypes)(c,r,o.opts.strictNumbers,po.DataType.Wrong)}`}return F.nil}function a(){if(i.validateSchema){let c=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,F._)`!${c}(${r})`}return F.nil}}subschema(e,r){let n=(0,tc.getSubschema)(this.it,e);(0,tc.extendSubschemaData)(n,this.it,e),(0,tc.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return Ab(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Vt.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Vt.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,F.Name)),!0}};Qt.KeywordCxt=fo;function ad(t,e,r,n){let i=new fo(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Wn.funcKeywordCode)(i,r):"macro"in r?(0,Wn.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Wn.funcKeywordCode)(i,r)}var Gb=/^\/(?:[^~]|~0|~1)*$/,zb=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function cd(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,o;if(t==="")return J.default.rootData;if(t[0]==="/"){if(!Gb.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=J.default.rootData}else{let l=zb.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,F._)`${o}${(0,F.getProperty)((0,Vt.unescapeJsonPointer)(l))}`,s=(0,F._)`${s} && ${o}`);return s;function c(l,f){return`Cannot access ${l} ${f} levels up, current level is ${e}`}}Qt.getData=cd});var ho=b(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});var ic=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};oc.default=ic});var zn=b(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});var sc=Bn(),ac=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,sc.resolveUrl)(e,r,n),this.missingSchema=(0,sc.normalizeId)((0,sc.getFullPath)(e,this.missingRef))}};cc.default=ac});var Jn=b(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.resolveSchema=Ze.getCompilingSchema=Ze.resolveRef=Ze.compileSchema=Ze.SchemaEnv=void 0;var ut=Y(),Jb=ho(),gr=Xe(),pt=Bn(),ld=ee(),Kb=Gn(),zr=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,pt.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};Ze.SchemaEnv=zr;function uc(t){let e=ud.call(this,t);if(e)return e;let r=(0,pt.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,s=new ut.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),a;t.$async&&(a=s.scopeValue("Error",{ref:Jb.default,code:(0,ut._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");t.validateName=c;let l={gen:s,allErrors:this.opts.allErrors,data:gr.default.data,parentData:gr.default.parentData,parentDataProperty:gr.default.parentDataProperty,dataNames:[gr.default.data],dataPathArr:[ut.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,ut.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:ut.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,ut._)`""`,opts:this.opts,self:this},f;try{this._compilations.add(t),(0,Kb.validateFunctionCode)(l),s.optimize(this.opts.code.optimize);let p=s.toString();f=`${s.scopeRefs(gr.default.scope)}return ${p}`,this.opts.code.process&&(f=this.opts.code.process(f,t));let m=new Function(`${gr.default.self}`,`${gr.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 ut.Name?void 0:g,items:y instanceof ut.Name?void 0:y,dynamicProps:g instanceof ut.Name,dynamicItems:y instanceof ut.Name},m.source&&(m.source.evaluated=(0,ut.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)}}Ze.compileSchema=uc;function Yb(t,e,r){var n;r=(0,pt.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let o=Zb.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 zr({schema:s,schemaId:a,root:t,baseId:e}))}if(o!==void 0)return t.refs[r]=Xb.call(this,o)}Ze.resolveRef=Yb;function Xb(t){return(0,pt.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:uc.call(this,t)}function ud(t){for(let e of this._compilations)if(Qb(e,t))return e}Ze.getCompilingSchema=ud;function Qb(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function Zb(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||mo.call(this,t,e)}function mo(t,e){let r=this.opts.uriResolver.parse(e),n=(0,pt._getFullPath)(this.opts.uriResolver,r),i=(0,pt.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return lc.call(this,r,t);let o=(0,pt.normalizeId)(n),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){let a=mo.call(this,t,s);return typeof a?.schema!="object"?void 0:lc.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||uc.call(this,s),o===(0,pt.normalizeId)(e)){let{schema:a}=s,{schemaId:c}=this.opts,l=a[c];return l&&(i=(0,pt.resolveUrl)(this.opts.uriResolver,i,l)),new zr({schema:a,schemaId:c,root:t,baseId:i})}return lc.call(this,r,s)}}Ze.resolveSchema=mo;var e0=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function lc(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,ld.unescapeFragment)(a)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!e0.has(a)&&l&&(e=(0,pt.resolveUrl)(this.opts.uriResolver,e,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,ld.schemaHasRulesButRef)(r,this.RULES)){let a=(0,pt.resolveUrl)(this.opts.uriResolver,e,r.$ref);o=mo.call(this,n,a)}let{schemaId:s}=this.opts;if(o=o||new zr({schema:r,schemaId:s,root:n,baseId:e}),o.schema!==o.root.schema)return o}});var pd=b((NR,t0)=>{t0.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 dc=b((MR,yd)=>{"use strict";var r0=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),dd=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),pc=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),hd=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),n0=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function fc(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 i0=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function fd(t){return t.length=0,!0}function o0(t,e,r){if(t.length){let n=fc(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function s0(t){let e=0,r={error:!1,address:"",zone:""},n=[],i=[],o=!1,s=!1,a=o0;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=fd}else{i.push(l);continue}}return i.length&&(a===fd?r.zone=i.join(""):s?n.push(i.join("")):n.push(fc(i))),r.address=n.join(""),r}function md(t){if(a0(t,":")<2)return{host:t,isIPV6:!1};let e=s0(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 a0(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function c0(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 l0={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},u0=/[@/?#:]/g,p0=/[@/?#]/g;function gd(t,e){let r=e?p0:u0;return r.lastIndex=0,t.replace(r,n=>l0[n])}function f0(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(pc(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));e&&hd(s)?r+=s:r+="%"+o,n+=2;continue}}r+=t[n]}return r}function d0(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(pc(n)){let i=n.toUpperCase(),o=String.fromCharCode(parseInt(i,16));o!=="."&&hd(o)?e+=o:e+="%"+i,r+=2;continue}}n0(t[r])?e+=t[r]:e+=escape(t[r])}return e}function h0(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(pc(n)){e+="%"+n.toUpperCase(),r+=2;continue}}e+=escape(t[r])}return e}function m0(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!dd(r)){let n=md(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=gd(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}yd.exports={nonSimpleDomain:i0,recomposeAuthority:m0,reescapeHostDelimiters:gd,normalizePercentEncoding:f0,normalizePathEncoding:d0,escapePreservingEscapes:h0,removeDotSegments:c0,isIPv4:dd,isUUID:r0,normalizeIPv6:md,stringArrayToHexStripped:fc}});var Sd=b((VR,bd)=>{"use strict";var{isUUID:g0}=dc(),y0=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,v0=["http","https","ws","wss","urn","urn:uuid"];function w0(t){return v0.indexOf(t)!==-1}function hc(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 vd(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function wd(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 _0(t){return t.secure=hc(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function b0(t){if((t.port===(hc(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 S0(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(y0);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=mc(i);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function x0(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=mc(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 $0(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!g0(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function k0(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var _d={scheme:"http",domainHost:!0,parse:vd,serialize:wd},E0={scheme:"https",domainHost:_d.domainHost,parse:vd,serialize:wd},go={scheme:"ws",domainHost:!0,parse:_0,serialize:b0},C0={scheme:"wss",domainHost:go.domainHost,parse:go.parse,serialize:go.serialize},P0={scheme:"urn",parse:S0,serialize:x0,skipNormalize:!0},I0={scheme:"urn:uuid",parse:$0,serialize:k0,skipNormalize:!0},yo={http:_d,https:E0,ws:go,wss:C0,urn:P0,"urn:uuid":I0};Object.setPrototypeOf(yo,null);function mc(t){return t&&(yo[t]||yo[t.toLowerCase()])||void 0}bd.exports={wsIsSecure:hc,SCHEMES:yo,isValidSchemeName:w0,getSchemeHandler:mc}});var Pd=b((LR,vo)=>{"use strict";var{normalizeIPv6:R0,removeDotSegments:Kn,recomposeAuthority:O0,normalizePercentEncoding:A0,normalizePathEncoding:T0,escapePreservingEscapes:N0,reescapeHostDelimiters:M0,isIPv4:V0,nonSimpleDomain:L0}=dc(),{SCHEMES:j0,getSchemeHandler:$d}=Sd();function D0(t,e){return typeof t=="string"?t=U0(t,e):typeof t=="object"&&(t=Jr(yr(t,e),e)),t}function q0(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=kd(Jr(t,n),Jr(e,n),n,!0);return n.skipEscape=!0,yr(i,n)}function kd(t,e,r,n){let i={};return n||(t=Jr(yr(t,r),r),e=Jr(yr(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=Kn(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=Kn(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=Kn(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=Kn(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 F0(t,e,r){let n=xd(t,r),i=xd(e,r);return n!==void 0&&i!==void 0&&n.toLowerCase()===i.toLowerCase()}function yr(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=$d(n.scheme||r.scheme);o&&o.serialize&&o.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=A0(r.path):(r.path=N0(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let s=O0(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=Kn(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 H0=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function B0(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 Ed(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(H0);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=B0(n,s);if(a!==void 0&&(n.error=n.error||a,i=!0),n.host)if(V0(n.host)===!1){let f=R0(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=$d(r.scheme||n.scheme);if(!r.unicodeSupport&&(!c||!c.unicodeSupport)&&n.host&&(r.domainHost||c&&c.domainHost)&&o===!1&&L0(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=M0(unescape(n.host),o))),n.path&&(n.path=T0(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 Jr(t,e){return Ed(t,e).parsed}function U0(t,e){return Cd(t,e).normalized}function Cd(t,e){let{parsed:r,malformedAuthorityOrPort:n}=Ed(t,e);return{normalized:n?t:yr(r,e),malformedAuthorityOrPort:n}}function xd(t,e){if(typeof t=="string"){let{normalized:r,malformedAuthorityOrPort:n}=Cd(t,e);return n?void 0:r}if(typeof t=="object")return yr(t,e)}var gc={SCHEMES:j0,normalize:D0,resolve:q0,resolveComponent:kd,equal:F0,serialize:yr,parse:Jr};vo.exports=gc;vo.exports.default=gc;vo.exports.fastUri=gc});var Rd=b(yc=>{"use strict";Object.defineProperty(yc,"__esModule",{value:!0});var Id=Pd();Id.code='require("ajv/dist/runtime/uri").default';yc.default=Id});var jd=b(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.CodeGen=Ee.Name=Ee.nil=Ee.stringify=Ee.str=Ee._=Ee.KeywordCxt=void 0;var W0=Gn();Object.defineProperty(Ee,"KeywordCxt",{enumerable:!0,get:function(){return W0.KeywordCxt}});var Kr=Y();Object.defineProperty(Ee,"_",{enumerable:!0,get:function(){return Kr._}});Object.defineProperty(Ee,"str",{enumerable:!0,get:function(){return Kr.str}});Object.defineProperty(Ee,"stringify",{enumerable:!0,get:function(){return Kr.stringify}});Object.defineProperty(Ee,"nil",{enumerable:!0,get:function(){return Kr.nil}});Object.defineProperty(Ee,"Name",{enumerable:!0,get:function(){return Kr.Name}});Object.defineProperty(Ee,"CodeGen",{enumerable:!0,get:function(){return Kr.CodeGen}});var G0=ho(),Md=zn(),z0=Wa(),Yn=Jn(),J0=Y(),Xn=Bn(),wo=Hn(),wc=ee(),Od=pd(),K0=Rd(),Vd=(t,e)=>new RegExp(t,e);Vd.code="new RegExp";var Y0=["removeAdditional","useDefaults","coerceTypes"],X0=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Q0={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."},Z0={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Ad=200;function e2(t){var e,r,n,i,o,s,a,c,l,f,p,d,m,g,y,$,_,M,j,T,N,G,te,Bt,nt;let ke=t.strict,je=(e=t.code)===null||e===void 0?void 0:e.optimize,Ie=je===!0||je===void 0?1:je||0,it=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:Vd,ot=(i=t.uriResolver)!==null&&i!==void 0?i:K0.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:Ie,regExp:it}:{optimize:Ie,regExp:it},loopRequired:(y=t.loopRequired)!==null&&y!==void 0?y:Ad,loopEnum:($=t.loopEnum)!==null&&$!==void 0?$:Ad,meta:(_=t.meta)!==null&&_!==void 0?_:!0,messages:(M=t.messages)!==null&&M!==void 0?M:!0,inlineRefs:(j=t.inlineRefs)!==null&&j!==void 0?j:!0,schemaId:(T=t.schemaId)!==null&&T!==void 0?T:"$id",addUsedSchema:(N=t.addUsedSchema)!==null&&N!==void 0?N:!0,validateSchema:(G=t.validateSchema)!==null&&G!==void 0?G:!0,validateFormats:(te=t.validateFormats)!==null&&te!==void 0?te:!0,unicodeRegExp:(Bt=t.unicodeRegExp)!==null&&Bt!==void 0?Bt:!0,int32range:(nt=t.int32range)!==null&&nt!==void 0?nt:!0,uriResolver:ot}}var Qn=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,...e2(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new J0.ValueScope({scope:{},prefixes:X0,es5:r,lines:n}),this.logger=s2(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,z0.getRules)(),Td.call(this,Q0,e,"NOT SUPPORTED"),Td.call(this,Z0,e,"DEPRECATED","warn"),this._metaOpts=i2.call(this),e.formats&&r2.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&n2.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),t2.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=Od;n==="id"&&(i={...Od},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 Md.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,Xn.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=Nd.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new Yn.SchemaEnv({schema:{},schemaId:n});if(r=Yn.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=Nd.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,Xn.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(c2.call(this,n,r),!r)return(0,wc.eachItem)(n,o=>vc.call(this,o)),this;u2.call(this,r);let i={...r,type:(0,wo.getJSONTypes)(r.type),schemaType:(0,wo.getJSONTypes)(r.schemaType)};return(0,wc.eachItem)(n,i.type.length===0?o=>vc.call(this,o,i):o=>i.type.forEach(s=>vc.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]=Ld(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,Xn.normalizeId)(s||n);let l=Xn.getSchemaRefs.call(this,e,n);return c=new Yn.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):Yn.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{Yn.compileSchema.call(this,e)}finally{this.opts=r}}};Qn.ValidationError=G0.default;Qn.MissingRefError=Md.default;Ee.default=Qn;function Td(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 Nd(t){return t=(0,Xn.normalizeId)(t),this.schemas[t]||this.refs[t]}function t2(){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 r2(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function n2(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 i2(){let t={...this.opts};for(let e of Y0)delete t[e];return t}var o2={log(){},warn(){},error(){}};function s2(t){if(t===!1)return o2;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 a2=/^[a-z_$][a-z0-9_$:-]*$/i;function c2(t,e){let{RULES:r}=this;if((0,wc.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!a2.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 vc(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,wo.getJSONTypes)(e.type),schemaType:(0,wo.getJSONTypes)(e.schemaType)}};e.before?l2.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 l2(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 u2(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=Ld(e)),t.validateSchema=this.compile(e,!0))}var p2={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ld(t){return{anyOf:[t,p2]}}});var Dd=b(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});var f2={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};_c.default=f2});var So=b(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.callRef=vr.getValidate=void 0;var d2=zn(),qd=Qe(),Be=Y(),Yr=Xe(),Fd=Jn(),_o=ee(),h2={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=Fd.resolveRef.call(c,l,i,r);if(f===void 0)throw new d2.default(n.opts.uriResolver,i,r);if(f instanceof Fd.SchemaEnv)return d(f);return m(f);function p(){if(o===l)return bo(t,s,o,o.$async);let g=e.scopeValue("root",{ref:l});return bo(t,(0,Be._)`${g}.validate`,l,l.$async)}function d(g){let y=Hd(t,g);bo(t,y,g,g.$async)}function m(g){let y=e.scopeValue("schema",a.code.source===!0?{ref:g,code:(0,Be.stringify)(g)}:{ref:g}),$=e.name("valid"),_=t.subschema({schema:g,dataTypes:[],schemaPath:Be.nil,topSchemaRef:y,errSchemaPath:r},$);t.mergeEvaluated(_),t.ok($)}}};function Hd(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,Be._)`${r.scopeValue("wrapper",{ref:e})}.validate`}vr.getValidate=Hd;function bo(t,e,r,n){let{gen:i,it:o}=t,{allErrors:s,schemaEnv:a,opts:c}=o,l=c.passContext?Yr.default.this:Be.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,Be._)`await ${(0,qd.callValidateCode)(t,e,l)}`),m(e),s||i.assign(g,!0)},y=>{i.if((0,Be._)`!(${y} instanceof ${o.ValidationError})`,()=>i.throw(y)),d(y),s||i.assign(g,!1)}),t.ok(g)}function p(){t.result((0,qd.callValidateCode)(t,e,l),()=>m(e),()=>d(e))}function d(g){let y=(0,Be._)`${g}.errors`;i.assign(Yr.default.vErrors,(0,Be._)`${Yr.default.vErrors} === null ? ${y} : ${Yr.default.vErrors}.concat(${y})`),i.assign(Yr.default.errors,(0,Be._)`${Yr.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 _=i.var("props",(0,Be._)`${g}.evaluated.props`);o.props=_o.mergeEvaluated.props(i,_,o.props,Be.Name)}if(o.items!==!0)if($&&!$.dynamicItems)$.items!==void 0&&(o.items=_o.mergeEvaluated.items(i,$.items,o.items));else{let _=i.var("items",(0,Be._)`${g}.evaluated.items`);o.items=_o.mergeEvaluated.items(i,_,o.items,Be.Name)}}}vr.callRef=bo;vr.default=h2});var Bd=b(bc=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});var m2=Dd(),g2=So(),y2=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",m2.default,g2.default];bc.default=y2});var Ud=b(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});var xo=Y(),Zt=xo.operators,$o={maximum:{okStr:"<=",ok:Zt.LTE,fail:Zt.GT},minimum:{okStr:">=",ok:Zt.GTE,fail:Zt.LT},exclusiveMaximum:{okStr:"<",ok:Zt.LT,fail:Zt.GTE},exclusiveMinimum:{okStr:">",ok:Zt.GT,fail:Zt.LTE}},v2={message:({keyword:t,schemaCode:e})=>(0,xo.str)`must be ${$o[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,xo._)`{comparison: ${$o[t].okStr}, limit: ${e}}`},w2={keyword:Object.keys($o),type:"number",schemaType:"number",$data:!0,error:v2,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,xo._)`${r} ${$o[e].fail} ${n} || isNaN(${r})`)}};Sc.default=w2});var Wd=b(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});var Zn=Y(),_2={message:({schemaCode:t})=>(0,Zn.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Zn._)`{multipleOf: ${t}}`},b2={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:_2,code(t){let{gen:e,data:r,schemaCode:n,it:i}=t,o=i.opts.multipleOfPrecision,s=e.let("res"),a=o?(0,Zn._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,Zn._)`${s} !== parseInt(${s})`;t.fail$data((0,Zn._)`(${n} === 0 || (${s} = ${r}/${n}, ${a}))`)}};xc.default=b2});var zd=b($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});function Gd(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}$c.default=Gd;Gd.code='require("ajv/dist/runtime/ucs2length").default'});var Jd=b(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});var wr=Y(),S2=ee(),x2=zd(),$2={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,wr.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,wr._)`{limit: ${t}}`},k2={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:$2,code(t){let{keyword:e,data:r,schemaCode:n,it:i}=t,o=e==="maxLength"?wr.operators.GT:wr.operators.LT,s=i.opts.unicode===!1?(0,wr._)`${r}.length`:(0,wr._)`${(0,S2.useFunc)(t.gen,x2.default)}(${r})`;t.fail$data((0,wr._)`${s} ${o} ${n}`)}};kc.default=k2});var Kd=b(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});var E2=Qe(),C2=ee(),Xr=Y(),P2={message:({schemaCode:t})=>(0,Xr.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Xr._)`{pattern: ${t}}`},I2={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:P2,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,Xr._)`new RegExp`:(0,C2.useFunc)(e,c),f=e.let("valid");e.try(()=>e.assign(f,(0,Xr._)`${l}(${o}, ${a}).test(${r})`),()=>e.assign(f,!1)),t.fail$data((0,Xr._)`!${f}`)}else{let c=(0,E2.usePattern)(t,i);t.fail$data((0,Xr._)`!${c}.test(${r})`)}}};Ec.default=I2});var Yd=b(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});var ei=Y(),R2={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,ei.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,ei._)`{limit: ${t}}`},O2={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:R2,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?ei.operators.GT:ei.operators.LT;t.fail$data((0,ei._)`Object.keys(${r}).length ${i} ${n}`)}};Cc.default=O2});var Xd=b(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});var ti=Qe(),ri=Y(),A2=ee(),T2={message:({params:{missingProperty:t}})=>(0,ri.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,ri._)`{missingProperty: ${t}}`},N2={keyword:"required",type:"object",schemaType:"array",$data:!0,error:T2,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,_=`required property "${y}" is not defined at "${$}" (strictRequired)`;(0,A2.checkStrictMode)(s,_,s.opts.strictRequired)}}function l(){if(c||o)t.block$data(ri.nil,p);else for(let m of r)(0,ti.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,ti.checkMissingProp)(t,r,m)),(0,ti.reportMissingProp)(t,m),e.else()}function p(){e.forOf("prop",n,m=>{t.setParams({missingProperty:m}),e.if((0,ti.noPropertyInData)(e,i,m,a.ownProperties),()=>t.error())})}function d(m,g){t.setParams({missingProperty:m}),e.forOf(m,n,()=>{e.assign(g,(0,ti.propertyInData)(e,i,m,a.ownProperties)),e.if((0,ri.not)(g),()=>{t.error(),e.break()})},ri.nil)}}};Pc.default=N2});var Qd=b(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});var ni=Y(),M2={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,ni.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,ni._)`{limit: ${t}}`},V2={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:M2,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?ni.operators.GT:ni.operators.LT;t.fail$data((0,ni._)`${r}.length ${i} ${n}`)}};Ic.default=V2});var ko=b(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});var Zd=Za();Zd.code='require("ajv/dist/runtime/equal").default';Rc.default=Zd});var eh=b(Ac=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});var Oc=Hn(),Ce=Y(),L2=ee(),j2=ko(),D2={message:({params:{i:t,j:e}})=>(0,Ce.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Ce._)`{i: ${t}, j: ${e}}`},q2={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:D2,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,Oc.getSchemaTypes)(o.items):[];t.block$data(c,f,(0,Ce._)`${s} === false`),t.ok(c);function f(){let g=e.let("i",(0,Ce._)`${r}.length`),y=e.let("j");t.setParams({i:g,j:y}),e.assign(c,!0),e.if((0,Ce._)`${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"),_=(0,Oc.checkDataTypes)(l,$,a.opts.strictNumbers,Oc.DataType.Wrong),M=e.const("indices",(0,Ce._)`{}`);e.for((0,Ce._)`;${g}--;`,()=>{e.let($,(0,Ce._)`${r}[${g}]`),e.if(_,(0,Ce._)`continue`),l.length>1&&e.if((0,Ce._)`typeof ${$} == "string"`,(0,Ce._)`${$} += "_"`),e.if((0,Ce._)`typeof ${M}[${$}] == "number"`,()=>{e.assign(y,(0,Ce._)`${M}[${$}]`),t.error(),e.assign(c,!1).break()}).code((0,Ce._)`${M}[${$}] = ${g}`)})}function m(g,y){let $=(0,L2.useFunc)(e,j2.default),_=e.name("outer");e.label(_).for((0,Ce._)`;${g}--;`,()=>e.for((0,Ce._)`${y} = ${g}; ${y}--;`,()=>e.if((0,Ce._)`${$}(${r}[${g}], ${r}[${y}])`,()=>{t.error(),e.assign(c,!1).break(_)})))}}};Ac.default=q2});var th=b(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});var Tc=Y(),F2=ee(),H2=ko(),B2={message:"must be equal to constant",params:({schemaCode:t})=>(0,Tc._)`{allowedValue: ${t}}`},U2={keyword:"const",$data:!0,error:B2,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:o}=t;n||o&&typeof o=="object"?t.fail$data((0,Tc._)`!${(0,F2.useFunc)(e,H2.default)}(${r}, ${i})`):t.fail((0,Tc._)`${o} !== ${r}`)}};Nc.default=U2});var rh=b(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});var ii=Y(),W2=ee(),G2=ko(),z2={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,ii._)`{allowedValues: ${t}}`},J2={keyword:"enum",schemaType:"array",$data:!0,error:z2,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,W2.useFunc)(e,G2.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,ii.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,ii._)`${l()}(${r}, ${m})`,()=>e.assign(f,!0).break()))}function d(m,g){let y=i[g];return typeof y=="object"&&y!==null?(0,ii._)`${l()}(${r}, ${m}[${g}])`:(0,ii._)`${r} === ${y}`}}};Mc.default=J2});var nh=b(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});var K2=Ud(),Y2=Wd(),X2=Jd(),Q2=Kd(),Z2=Yd(),e1=Xd(),t1=Qd(),r1=eh(),n1=th(),i1=rh(),o1=[K2.default,Y2.default,X2.default,Q2.default,Z2.default,e1.default,t1.default,r1.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},n1.default,i1.default];Vc.default=o1});var jc=b(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});oi.validateAdditionalItems=void 0;var _r=Y(),Lc=ee(),s1={message:({params:{len:t}})=>(0,_r.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,_r._)`{limit: ${t}}`},a1={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:s1,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,Lc.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}ih(t,n)}};function ih(t,e){let{gen:r,schema:n,data:i,keyword:o,it:s}=t;s.items=!0;let a=r.const("len",(0,_r._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,_r._)`${a} <= ${e.length}`);else if(typeof n=="object"&&!(0,Lc.alwaysValidSchema)(s,n)){let l=r.var("valid",(0,_r._)`${a} <= ${e.length}`);r.if((0,_r.not)(l),()=>c(l)),t.ok(l)}function c(l){r.forRange("i",e.length,a,f=>{t.subschema({keyword:o,dataProp:f,dataPropType:Lc.Type.Num},l),s.allErrors||r.if((0,_r.not)(l),()=>r.break())})}}oi.validateAdditionalItems=ih;oi.default=a1});var Dc=b(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.validateTuple=void 0;var oh=Y(),Eo=ee(),c1=Qe(),l1={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return sh(t,"additionalItems",e);r.items=!0,!(0,Eo.alwaysValidSchema)(r,e)&&t.ok((0,c1.validateArray)(t))}};function sh(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=Eo.mergeEvaluated.items(n,r.length,a.items));let c=n.name("valid"),l=n.const("len",(0,oh._)`${o}.length`);r.forEach((p,d)=>{(0,Eo.alwaysValidSchema)(a,p)||(n.if((0,oh._)`${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,Eo.checkStrictMode)(a,$,d.strictTuples)}}}si.validateTuple=sh;si.default=l1});var ah=b(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});var u1=Dc(),p1={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,u1.validateTuple)(t,"items")};qc.default=p1});var lh=b(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});var ch=Y(),f1=ee(),d1=Qe(),h1=jc(),m1={message:({params:{len:t}})=>(0,ch.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,ch._)`{limit: ${t}}`},g1={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:m1,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,f1.alwaysValidSchema)(n,e)&&(i?(0,h1.validateAdditionalItems)(t,i):t.ok((0,d1.validateArray)(t)))}};Fc.default=g1});var uh=b(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});var et=Y(),Co=ee(),y1={message:({params:{min:t,max:e}})=>e===void 0?(0,et.str)`must contain at least ${t} valid item(s)`:(0,et.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,et._)`{minContains: ${t}}`:(0,et._)`{minContains: ${t}, maxContains: ${e}}`},v1={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:y1,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,et._)`${i}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,Co.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,Co.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,Co.alwaysValidSchema)(o,r)){let y=(0,et._)`${f} >= ${s}`;a!==void 0&&(y=(0,et._)`${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,et._)`${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,_=>{t.subschema({keyword:"contains",dataProp:_,dataPropType:Co.Type.Num,compositeRule:!0},y),$()})}function g(y){e.code((0,et._)`${y}++`),a===void 0?e.if((0,et._)`${y} >= ${s}`,()=>e.assign(p,!0).break()):(e.if((0,et._)`${y} > ${a}`,()=>e.assign(p,!1).break()),s===1?e.assign(p,!0):e.if((0,et._)`${y} >= ${s}`,()=>e.assign(p,!0)))}}};Hc.default=v1});var Po=b(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.validateSchemaDeps=wt.validatePropertyDeps=wt.error=void 0;var Bc=Y(),w1=ee(),ai=Qe();wt.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,Bc.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,Bc._)`{property: ${t},
|
|
34
65
|
missingProperty: ${n},
|
|
35
66
|
depsCount: ${e},
|
|
36
|
-
deps: ${r}}`};var P2={keyword:"dependencies",type:"object",schemaType:"object",error:pt.error,code(t){let[e,r]=k2(t);ep(t,e),tp(t,r)}};function k2({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 ep(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 l=(0,qn.propertyInData)(r,n,s,i.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),i.allErrors?r.if(l,()=>{for(let u of a)(0,qn.checkReportMissingProp)(t,u)}):(r.if((0,nc._)`${l} && (${(0,qn.checkMissingProp)(t,a,o)})`),(0,qn.reportMissingProp)(t,o),r.else())}}pt.validatePropertyDeps=ep;function tp(t,e=t.schema){let{gen:r,data:n,keyword:i,it:o}=t,s=r.name("valid");for(let a in e)(0,x2.alwaysValidSchema)(o,e[a])||(r.if((0,qn.propertyInData)(r,n,a,o.opts.ownProperties),()=>{let l=t.subschema({keyword:i,schemaProp:a},s);t.mergeValidEvaluated(l,s)},()=>r.var(s,!0)),t.ok(s))}pt.validateSchemaDeps=tp;pt.default=P2});var np=w(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var rp=z(),O2=X(),A2={message:"property name must be valid",params:({params:t})=>(0,rp._)`{propertyName: ${t.propertyName}}`},R2={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:A2,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,O2.alwaysValidSchema)(i,r))return;let 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,rp.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};ic.default=R2});var sc=w(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});var no=ze(),at=z(),I2=We(),io=X(),T2={message:"must NOT have additional properties",params:({params:t})=>(0,at._)`{additionalProperty: ${t.additionalProperty}}`},N2={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:T2,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:l}=s;if(s.props=!0,l.removeAdditional!=="all"&&(0,io.alwaysValidSchema)(s,r))return;let u=(0,no.allSchemaProperties)(n.properties),d=(0,no.allSchemaProperties)(n.patternProperties);f(),t.ok((0,at._)`${o} === ${I2.default.errors}`);function f(){e.forIn("key",i,P=>{!u.length&&!d.length?g(P):e.if(h(P),()=>g(P))})}function h(P){let S;if(u.length>8){let q=(0,io.schemaRefOrVal)(s,n.properties,"properties");S=(0,no.isOwnProperty)(e,q,P)}else u.length?S=(0,at.or)(...u.map(q=>(0,at._)`${P} === ${q}`)):S=at.nil;return d.length&&(S=(0,at.or)(S,...d.map(q=>(0,at._)`${(0,no.usePattern)(t,q)}.test(${P})`))),(0,at.not)(S)}function m(P){e.code((0,at._)`delete ${i}[${P}]`)}function g(P){if(l.removeAdditional==="all"||l.removeAdditional&&r===!1){m(P);return}if(r===!1){t.setParams({additionalProperty:P}),t.error(),a||e.break();return}if(typeof r=="object"&&!(0,io.alwaysValidSchema)(s,r)){let S=e.name("valid");l.removeAdditional==="failing"?(v(P,S,!1),e.if((0,at.not)(S),()=>{t.reset(),m(P)})):(v(P,S),a||e.if((0,at.not)(S),()=>e.break()))}}function v(P,S,q){let B={keyword:"additionalProperties",dataProp:P,dataPropType:io.Type.Str};q===!1&&Object.assign(B,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(B,S)}}};oc.default=N2});var sp=w(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});var M2=$n(),ip=ze(),ac=X(),op=sc(),L2={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&&op.default.code(new M2.KeywordCxt(o,op.default,"additionalProperties"));let s=(0,ip.allSchemaProperties)(r);for(let f of s)o.definedProperties.add(f);o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=ac.mergeEvaluated.props(e,(0,ac.toHash)(s),o.props));let a=s.filter(f=>!(0,ac.alwaysValidSchema)(o,r[f]));if(a.length===0)return;let l=e.name("valid");for(let f of a)u(f)?d(f):(e.if((0,ip.propertyInData)(e,i,f,o.opts.ownProperties)),d(f),o.allErrors||e.else().var(l,!0),e.endIf()),t.it.definedProperties.add(f),t.ok(l);function u(f){return o.opts.useDefaults&&!o.compositeRule&&r[f].default!==void 0}function d(f){t.subschema({keyword:"properties",schemaProp:f,dataProp:f},l)}}};cc.default=L2});var up=w(lc=>{"use strict";Object.defineProperty(lc,"__esModule",{value:!0});var ap=ze(),oo=z(),cp=X(),lp=X(),j2={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,ap.allSchemaProperties)(r),l=a.filter(v=>(0,cp.alwaysValidSchema)(o,r[v]));if(a.length===0||l.length===a.length&&(!o.opts.unevaluated||o.props===!0))return;let u=s.strictSchema&&!s.allowMatchingProperties&&i.properties,d=e.name("valid");o.props!==!0&&!(o.props instanceof oo.Name)&&(o.props=(0,lp.evaluatedPropsToName)(e,o.props));let{props:f}=o;h();function h(){for(let v of a)u&&m(v),o.allErrors?g(v):(e.var(d,!0),g(v),e.if(d))}function m(v){for(let P in u)new RegExp(v).test(P)&&(0,cp.checkStrictMode)(o,`property ${P} matches pattern ${v} (use allowMatchingProperties)`)}function g(v){e.forIn("key",n,P=>{e.if((0,oo._)`${(0,ap.usePattern)(t,v)}.test(${P})`,()=>{let S=l.includes(v);S||t.subschema({keyword:"patternProperties",schemaProp:v,dataProp:P,dataPropType:lp.Type.Str},d),o.opts.unevaluated&&f!==!0?e.assign((0,oo._)`${f}[${P}]`,!0):!S&&!o.allErrors&&e.if((0,oo.not)(d),()=>e.break())})})}}};lc.default=j2});var fp=w(uc=>{"use strict";Object.defineProperty(uc,"__esModule",{value:!0});var D2=X(),q2={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,D2.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"}};uc.default=q2});var dp=w(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});var V2=ze(),F2={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:V2.validateUnion,error:{message:"must match a schema in anyOf"}};fc.default=F2});var pp=w(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});var so=z(),H2=X(),B2={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,so._)`{passingSchemas: ${t.passing}}`},U2={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:B2,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),l=e.name("_valid");t.setParams({passing:a}),e.block(u),t.result(s,()=>t.reset(),()=>t.error(!0));function u(){o.forEach((d,f)=>{let h;(0,H2.alwaysValidSchema)(i,d)?e.var(l,!0):h=t.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},l),f>0&&e.if((0,so._)`${l} && ${s}`).assign(s,!1).assign(a,(0,so._)`[${a}, ${f}]`).else(),e.if(l,()=>{e.assign(s,!0),e.assign(a,f),h&&t.mergeEvaluated(h,so.Name)})})}}};dc.default=U2});var hp=w(pc=>{"use strict";Object.defineProperty(pc,"__esModule",{value:!0});var G2=X(),W2={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,G2.alwaysValidSchema)(n,o))return;let a=t.subschema({keyword:"allOf",schemaProp:s},i);t.ok(i),t.mergeEvaluated(a)})}};pc.default=W2});var yp=w(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});var ao=z(),gp=X(),z2={message:({params:t})=>(0,ao.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,ao._)`{failingKeyword: ${t.ifClause}}`},K2={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:z2,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,gp.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=mp(n,"then"),o=mp(n,"else");if(!i&&!o)return;let s=e.let("valid",!0),a=e.name("_valid");if(l(),t.reset(),i&&o){let d=e.let("ifClause");t.setParams({ifClause:d}),e.if(a,u("then",d),u("else",d))}else i?e.if(a,u("then")):e.if((0,ao.not)(a),u("else"));t.pass(s,()=>t.error(!0));function l(){let d=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(d)}function u(d,f){return()=>{let h=t.subschema({keyword:d},a);e.assign(s,a),t.mergeValidEvaluated(h,s),f?e.assign(f,(0,ao._)`${d}`):t.setParams({ifClause:d})}}}};function mp(t,e){let r=t.schema[e];return r!==void 0&&!(0,gp.alwaysValidSchema)(t,r)}hc.default=K2});var vp=w(mc=>{"use strict";Object.defineProperty(mc,"__esModule",{value:!0});var J2=X(),Y2={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,J2.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};mc.default=Y2});var _p=w(gc=>{"use strict";Object.defineProperty(gc,"__esModule",{value:!0});var X2=Qa(),Q2=Yd(),Z2=Za(),e1=Qd(),t1=Zd(),r1=ro(),n1=np(),i1=sc(),o1=sp(),s1=up(),a1=fp(),c1=dp(),l1=pp(),u1=hp(),f1=yp(),d1=vp();function p1(t=!1){let e=[a1.default,c1.default,l1.default,u1.default,f1.default,d1.default,n1.default,i1.default,r1.default,o1.default,s1.default];return t?e.push(Q2.default,e1.default):e.push(X2.default,Z2.default),e.push(t1.default),e}gc.default=p1});var vc=w(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.dynamicAnchor=void 0;var yc=z(),h1=We(),wp=xn(),m1=Yi(),g1={keyword:"$dynamicAnchor",schemaType:"string",code:t=>bp(t,t.schema)};function bp(t,e){let{gen:r,it:n}=t;n.schemaEnv.root.dynamicAnchors[e]=!0;let i=(0,yc._)`${h1.default.dynamicAnchors}${(0,yc.getProperty)(e)}`,o=n.errSchemaPath==="#"?n.validateName:y1(t);r.if((0,yc._)`!${i}`,()=>r.assign(i,o))}Vn.dynamicAnchor=bp;function y1(t){let{schemaEnv:e,schema:r,self:n}=t.it,{root:i,baseId:o,localRefs:s,meta:a}=e.root,{schemaId:l}=n.opts,u=new wp.SchemaEnv({schema:r,schemaId:l,root:i,baseId:o,localRefs:s,meta:a});return wp.compileSchema.call(n,u),(0,m1.getValidate)(t,u)}Vn.default=g1});var _c=w(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.dynamicRef=void 0;var Sp=z(),v1=We(),Ep=Yi(),_1={keyword:"$dynamicRef",schemaType:"string",code:t=>$p(t,t.schema)};function $p(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 l=r.let("valid",!1);s(l),t.ok(l)}function s(l){if(i.schemaEnv.root.dynamicAnchors[o]){let u=r.let("_v",(0,Sp._)`${v1.default.dynamicAnchors}${(0,Sp.getProperty)(o)}`);r.if(u,a(u,l),a(i.validateName,l))}else a(i.validateName,l)()}function a(l,u){return u?()=>r.block(()=>{(0,Ep.callRef)(t,l),r.let(u,!0)}):()=>(0,Ep.callRef)(t,l)}}Fn.dynamicRef=$p;Fn.default=_1});var Cp=w(wc=>{"use strict";Object.defineProperty(wc,"__esModule",{value:!0});var w1=vc(),b1=X(),S1={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,w1.dynamicAnchor)(t,""):(0,b1.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};wc.default=S1});var xp=w(bc=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});var E1=_c(),$1={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,E1.dynamicRef)(t,t.schema)};bc.default=$1});var Pp=w(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});var C1=vc(),x1=_c(),P1=Cp(),k1=xp(),O1=[C1.default,x1.default,P1.default,k1.default];Sc.default=O1});var Op=w(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});var kp=ro(),A1={keyword:"dependentRequired",type:"object",schemaType:"object",error:kp.error,code:t=>(0,kp.validatePropertyDeps)(t)};Ec.default=A1});var Ap=w($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});var R1=ro(),I1={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,R1.validateSchemaDeps)(t)};$c.default=I1});var Rp=w(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});var T1=X(),N1={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:r}){e.contains===void 0&&(0,T1.checkStrictMode)(r,`"${t}" without "contains" is ignored`)}};Cc.default=N1});var Ip=w(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});var M1=Op(),L1=Ap(),j1=Rp(),D1=[M1.default,L1.default,j1.default];xc.default=D1});var Np=w(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});var Ht=z(),Tp=X(),q1=We(),V1={message:"must NOT have unevaluated properties",params:({params:t})=>(0,Ht._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},F1={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:V1,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 Ht.Name?e.if((0,Ht._)`${a} !== true`,()=>e.forIn("key",n,f=>e.if(u(a,f),()=>l(f)))):a!==!0&&e.forIn("key",n,f=>a===void 0?l(f):e.if(d(a,f),()=>l(f))),o.props=!0,t.ok((0,Ht._)`${i} === ${q1.default.errors}`);function l(f){if(r===!1){t.setParams({unevaluatedProperty:f}),t.error(),s||e.break();return}if(!(0,Tp.alwaysValidSchema)(o,r)){let h=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:f,dataPropType:Tp.Type.Str},h),s||e.if((0,Ht.not)(h),()=>e.break())}}function u(f,h){return(0,Ht._)`!${f} || !${f}[${h}]`}function d(f,h){let m=[];for(let g in f)f[g]===!0&&m.push((0,Ht._)`${h} !== ${g}`);return(0,Ht.and)(...m)}}};Pc.default=F1});var Lp=w(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});var ar=z(),Mp=X(),H1={message:({params:{len:t}})=>(0,ar.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,ar._)`{limit: ${t}}`},B1={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:H1,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,ar._)`${n}.length`);if(r===!1)t.setParams({len:o}),t.fail((0,ar._)`${s} > ${o}`);else if(typeof r=="object"&&!(0,Mp.alwaysValidSchema)(i,r)){let l=e.var("valid",(0,ar._)`${s} <= ${o}`);e.if((0,ar.not)(l),()=>a(l,o)),t.ok(l)}i.items=!0;function a(l,u){e.forRange("i",u,s,d=>{t.subschema({keyword:"unevaluatedItems",dataProp:d,dataPropType:Mp.Type.Num},l),i.allErrors||e.if((0,ar.not)(l),()=>e.break())})}}};kc.default=B1});var jp=w(Oc=>{"use strict";Object.defineProperty(Oc,"__esModule",{value:!0});var U1=Np(),G1=Lp(),W1=[U1.default,G1.default];Oc.default=W1});var Dp=w(Ac=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});var ye=z(),z1={message:({schemaCode:t})=>(0,ye.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,ye._)`{format: ${t}}`},K1={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:z1,code(t,e){let{gen:r,data:n,$data:i,schema:o,schemaCode:s,it:a}=t,{opts:l,errSchemaPath:u,schemaEnv:d,self:f}=a;if(!l.validateFormats)return;i?h():m();function h(){let g=r.scopeValue("formats",{ref:f.formats,code:l.code.formats}),v=r.const("fDef",(0,ye._)`${g}[${s}]`),P=r.let("fType"),S=r.let("format");r.if((0,ye._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>r.assign(P,(0,ye._)`${v}.type || "string"`).assign(S,(0,ye._)`${v}.validate`),()=>r.assign(P,(0,ye._)`"string"`).assign(S,v)),t.fail$data((0,ye.or)(q(),B()));function q(){return l.strictSchema===!1?ye.nil:(0,ye._)`${s} && !${S}`}function B(){let j=d.$async?(0,ye._)`(${v}.async ? await ${S}(${n}) : ${S}(${n}))`:(0,ye._)`${S}(${n})`,L=(0,ye._)`(typeof ${S} == "function" ? ${j} : ${S}.test(${n}))`;return(0,ye._)`${S} && ${S} !== true && ${P} === ${e} && !${L}`}}function m(){let g=f.formats[o];if(!g){q();return}if(g===!0)return;let[v,P,S]=B(g);v===e&&t.pass(j());function q(){if(l.strictSchema===!1){f.logger.warn(L());return}throw new Error(L());function L(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function B(L){let Q=L instanceof RegExp?(0,ye.regexpCode)(L):l.code.formats?(0,ye._)`${l.code.formats}${(0,ye.getProperty)(o)}`:void 0,ne=r.scopeValue("formats",{key:o,ref:L,code:Q});return typeof L=="object"&&!(L instanceof RegExp)?[L.type||"string",L.validate,(0,ye._)`${ne}.validate`]:["string",L,ne]}function j(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!d.$async)throw new Error("async format in sync schema");return(0,ye._)`await ${S}(${n})`}return typeof P=="function"?(0,ye._)`${S}(${n})`:(0,ye._)`${S}.test(${n})`}}}};Ac.default=K1});var qp=w(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});var J1=Dp(),Y1=[J1.default];Rc.default=Y1});var Vp=w(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.contentVocabulary=Nr.metadataVocabulary=void 0;Nr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Nr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Hp=w(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});var X1=Id(),Q1=Wd(),Z1=_p(),eb=Pp(),tb=Ip(),rb=jp(),nb=qp(),Fp=Vp(),ib=[eb.default,X1.default,Q1.default,(0,Z1.default)(!0),nb.default,Fp.metadataVocabulary,Fp.contentVocabulary,tb.default,rb.default];Ic.default=ib});var Up=w(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});co.DiscrError=void 0;var Bp;(function(t){t.Tag="tag",t.Mapping="mapping"})(Bp||(co.DiscrError=Bp={}))});var Wp=w(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});var Mr=z(),Tc=Up(),Gp=xn(),ob=Cn(),sb=X(),ab={message:({params:{discrError:t,tagName:e}})=>t===Tc.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,Mr._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},cb={keyword:"discriminator",type:"object",schemaType:"object",error:ab,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 l=e.let("valid",!1),u=e.const("tag",(0,Mr._)`${r}${(0,Mr.getProperty)(a)}`);e.if((0,Mr._)`typeof ${u} == "string"`,()=>d(),()=>t.error(!1,{discrError:Tc.DiscrError.Tag,tag:u,tagName:a})),t.ok(l);function d(){let m=h();e.if(!1);for(let g in m)e.elseIf((0,Mr._)`${u} === ${g}`),e.assign(l,f(m[g]));e.else(),t.error(!1,{discrError:Tc.DiscrError.Mapping,tag:u,tagName:a}),e.endIf()}function f(m){let g=e.name("valid"),v=t.subschema({keyword:"oneOf",schemaProp:m},g);return t.mergeEvaluated(v,Mr.Name),g}function h(){var m;let g={},v=S(i),P=!0;for(let j=0;j<s.length;j++){let L=s[j];if(L?.$ref&&!(0,sb.schemaHasRulesButRef)(L,o.self.RULES)){let ne=L.$ref;if(L=Gp.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,ne),L instanceof Gp.SchemaEnv&&(L=L.schema),L===void 0)throw new ob.default(o.opts.uriResolver,o.baseId,ne)}let Q=(m=L?.properties)===null||m===void 0?void 0:m[a];if(typeof Q!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);P=P&&(v||S(L)),q(Q,j)}if(!P)throw new Error(`discriminator: "${a}" must be required`);return g;function S({required:j}){return Array.isArray(j)&&j.includes(a)}function q(j,L){if(j.const)B(j.const,L);else if(j.enum)for(let Q of j.enum)B(Q,L);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function B(j,L){if(typeof j!="string"||j in g)throw new Error(`discriminator: "${a}" values must be unique strings`);g[j]=L}}}};Nc.default=cb});var zp=w((Uk,lb)=>{lb.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 Kp=w((Gk,ub)=>{ub.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 Jp=w((Wk,fb)=>{fb.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 Yp=w((zk,db)=>{db.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 Xp=w((Kk,pb)=>{pb.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 Qp=w((Jk,hb)=>{hb.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 Zp=w((Yk,mb)=>{mb.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 eh=w((Xk,gb)=>{gb.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 th=w(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});var yb=zp(),vb=Kp(),_b=Jp(),wb=Yp(),bb=Xp(),Sb=Qp(),Eb=Zp(),$b=eh(),Cb=["/properties"];function xb(t){return[yb,vb,_b,wb,bb,e(this,Sb),Eb,e(this,$b)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function e(r,n){return t?r.$dataMetaSchema(n,Cb):n}}Mc.default=xb});var Dc=w((fe,jc)=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.MissingRefError=fe.ValidationError=fe.CodeGen=fe.Name=fe.nil=fe.stringify=fe.str=fe._=fe.KeywordCxt=fe.Ajv2020=void 0;var Pb=Pd(),kb=Hp(),Ob=Wp(),Ab=th(),Lc="https://json-schema.org/draft/2020-12/schema",Lr=class extends Pb.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),kb.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(Ob.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:r}=this.opts;r&&(Ab.default.call(this,e),this.refs["http://json-schema.org/schema"]=Lc)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Lc)?Lc:void 0)}};fe.Ajv2020=Lr;jc.exports=fe=Lr;jc.exports.Ajv2020=Lr;Object.defineProperty(fe,"__esModule",{value:!0});fe.default=Lr;var Rb=$n();Object.defineProperty(fe,"KeywordCxt",{enumerable:!0,get:function(){return Rb.KeywordCxt}});var jr=z();Object.defineProperty(fe,"_",{enumerable:!0,get:function(){return jr._}});Object.defineProperty(fe,"str",{enumerable:!0,get:function(){return jr.str}});Object.defineProperty(fe,"stringify",{enumerable:!0,get:function(){return jr.stringify}});Object.defineProperty(fe,"nil",{enumerable:!0,get:function(){return jr.nil}});Object.defineProperty(fe,"Name",{enumerable:!0,get:function(){return jr.Name}});Object.defineProperty(fe,"CodeGen",{enumerable:!0,get:function(){return jr.CodeGen}});var Ib=Hi();Object.defineProperty(fe,"ValidationError",{enumerable:!0,get:function(){return Ib.default}});var Tb=Cn();Object.defineProperty(fe,"MissingRefError",{enumerable:!0,get:function(){return Tb.default}})});var Te=w(Ve=>{"use strict";Ve.__esModule=!0;Ve.extend=Fh;Ve.indexOf=US;Ve.escapeExpression=GS;Ve.isEmpty=WS;Ve.createFrame=zS;Ve.blockParams=KS;Ve.appendContextPath=JS;var VS={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},FS=/[&<>"'`=]/g,HS=/[&<>"'`=]/;function BS(t){return VS[t]}function Fh(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 al=Object.prototype.toString;Ve.toString=al;var sl=function(e){return typeof e=="function"};sl(/x/)&&(Ve.isFunction=sl=function(t){return typeof t=="function"&&al.call(t)==="[object Function]"});Ve.isFunction=sl;var Hh=Array.isArray||function(t){return t&&typeof t=="object"?al.call(t)==="[object Array]":!1};Ve.isArray=Hh;function US(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function GS(t){if(typeof t!="string"){if(t&&t.toHTML)return t.toHTML();if(t==null)return"";if(!t)return t+"";t=""+t}return HS.test(t)?t.replace(FS,BS):t}function WS(t){return!t&&t!==0?!0:!!(Hh(t)&&t.length===0)}function zS(t){var e=Fh({},t);return e._parent=t,e}function KS(t,e){return t.path=e,t}function JS(t,e){return(t?t+".":"")+e}});var Fe=w((Co,Bh)=>{"use strict";Co.__esModule=!0;var cl=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function ll(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),l=0;l<cl.length;l++)this[cl[l]]=a[cl[l]];Error.captureStackTrace&&Error.captureStackTrace(this,ll);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{}}ll.prototype=new Error;Co.default=ll;Bh.exports=Co.default});var Gh=w((xo,Uh)=>{"use strict";xo.__esModule=!0;var ul=Te();xo.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(ul.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=ul.createFrame(r.data);o.contextPath=ul.appendContextPath(r.data.contextPath,r.name),r={data:o}}return i(e,r)})};Uh.exports=xo.default});var zh=w((Po,Wh)=>{"use strict";Po.__esModule=!0;function YS(t){return t&&t.__esModule?t:{default:t}}var Xn=Te(),XS=Fe(),QS=YS(XS);Po.default=function(t){t.registerHelper("each",function(e,r){if(!r)throw new QS.default("Must pass iterator to #each");var n=r.fn,i=r.inverse,o=0,s="",a=void 0,l=void 0;r.data&&r.ids&&(l=Xn.appendContextPath(r.data.contextPath,r.ids[0])+"."),Xn.isFunction(e)&&(e=e.call(this)),r.data&&(a=Xn.createFrame(r.data));function u(g,v,P){a&&(a.key=g,a.index=v,a.first=v===0,a.last=!!P,l&&(a.contextPath=l+g)),s=s+n(e[g],{data:a,blockParams:Xn.blockParams([e[g],g],[l+g,null])})}if(e&&typeof e=="object")if(Xn.isArray(e))for(var d=e.length;o<d;o++)o in e&&u(o,o,o===e.length-1);else if(typeof Symbol=="function"&&e[Symbol.iterator]){for(var f=[],h=e[Symbol.iterator](),m=h.next();!m.done;m=h.next())f.push(m.value);e=f;for(var d=e.length;o<d;o++)u(o,o,o===e.length-1)}else(function(){var g=void 0;Object.keys(e).forEach(function(v){g!==void 0&&u(g,o-1),g=v,o++}),g!==void 0&&u(g,o-1,!0)})();return o===0&&(s=i(this)),s})};Wh.exports=Po.default});var Jh=w((ko,Kh)=>{"use strict";ko.__esModule=!0;function ZS(t){return t&&t.__esModule?t:{default:t}}var eE=Fe(),tE=ZS(eE);ko.default=function(t){t.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new tE.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};Kh.exports=ko.default});var Zh=w((Oo,Qh)=>{"use strict";Oo.__esModule=!0;function rE(t){return t&&t.__esModule?t:{default:t}}var Yh=Te(),nE=Fe(),Xh=rE(nE);Oo.default=function(t){t.registerHelper("if",function(e,r){if(arguments.length!=2)throw new Xh.default("#if requires exactly one argument");return Yh.isFunction(e)&&(e=e.call(this)),!r.hash.includeZero&&!e||Yh.isEmpty(e)?r.inverse(this):r.fn(this)}),t.registerHelper("unless",function(e,r){if(arguments.length!=2)throw new Xh.default("#unless requires exactly one argument");return t.helpers.if.call(this,e,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};Qh.exports=Oo.default});var tm=w((Ao,em)=>{"use strict";Ao.__esModule=!0;Ao.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)})};em.exports=Ao.default});var nm=w((Ro,rm)=>{"use strict";Ro.__esModule=!0;Ro.default=function(t){t.registerHelper("lookup",function(e,r,n){return e&&n.lookupProperty(e,r)})};rm.exports=Ro.default});var om=w((Io,im)=>{"use strict";Io.__esModule=!0;function iE(t){return t&&t.__esModule?t:{default:t}}var Qn=Te(),oE=Fe(),sE=iE(oE);Io.default=function(t){t.registerHelper("with",function(e,r){if(arguments.length!=2)throw new sE.default("#with requires exactly one argument");Qn.isFunction(e)&&(e=e.call(this));var n=r.fn;if(Qn.isEmpty(e))return r.inverse(this);var i=r.data;return r.data&&r.ids&&(i=Qn.createFrame(r.data),i.contextPath=Qn.appendContextPath(r.data.contextPath,r.ids[0])),n(e,{data:i,blockParams:Qn.blockParams([e],[i&&i.contextPath])})})};im.exports=Io.default});var fl=w(To=>{"use strict";To.__esModule=!0;To.registerDefaultHelpers=bE;To.moveHelperToHooks=SE;function ur(t){return t&&t.__esModule?t:{default:t}}var aE=Gh(),cE=ur(aE),lE=zh(),uE=ur(lE),fE=Jh(),dE=ur(fE),pE=Zh(),hE=ur(pE),mE=tm(),gE=ur(mE),yE=nm(),vE=ur(yE),_E=om(),wE=ur(_E);function bE(t){cE.default(t),uE.default(t),dE.default(t),hE.default(t),gE.default(t),vE.default(t),wE.default(t)}function SE(t,e,r){t.helpers[e]&&(t.hooks[e]=t.helpers[e],r||(t.helpers[e]=void 0))}});var am=w((No,sm)=>{"use strict";No.__esModule=!0;var EE=Te();No.default=function(t){t.registerDecorator("inline",function(e,r,n,i){var o=e;return r.partials||(r.partials={},o=function(s,a){var l=n.partials;n.partials=EE.extend({},l,r.partials);var u=e(s,a);return n.partials=l,u}),r.partials[i.args[0]]=i.fn,o})};sm.exports=No.default});var cm=w(dl=>{"use strict";dl.__esModule=!0;dl.registerDefaultDecorators=PE;function $E(t){return t&&t.__esModule?t:{default:t}}var CE=am(),xE=$E(CE);function PE(t){xE.default(t)}});var pl=w((Mo,lm)=>{"use strict";Mo.__esModule=!0;var kE=Te(),Hr={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var r=kE.indexOf(Hr.methodMap,e.toLowerCase());r>=0?e=r:e=parseInt(e,10)}return e},log:function(e){if(e=Hr.lookupLevel(e),typeof console<"u"&&Hr.lookupLevel(Hr.level)<=e){var r=Hr.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)}}};Mo.default=Hr;lm.exports=Mo.default});var hl=w(Zn=>{"use strict";Zn.__esModule=!0;Zn.createProtoAccessControl=IE;Zn.resultIsAllowed=TE;Zn.resetLoggedProperties=ME;function OE(t){return t&&t.__esModule?t:{default:t}}var um=Te(),AE=pl(),RE=OE(AE),Lo=Object.create(null);function IE(t){var e=Object.create(null);e.__proto__=!1,um.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,um.extend(r,t.allowedProtoMethods),{properties:{whitelist:e,defaultValue:t.allowProtoPropertiesByDefault},methods:{whitelist:r,defaultValue:t.allowProtoMethodsByDefault}}}function TE(t,e,r){return fm(typeof t=="function"?e.methods:e.properties,r)}function fm(t,e){return t.whitelist[e]!==void 0?t.whitelist[e]===!0:t.defaultValue!==void 0?t.defaultValue:(NE(e),!1)}function NE(t){Lo[t]!==!0&&(Lo[t]=!0,RE.default.log("error",'Handlebars: Access has been denied to resolve the property "'+t+`" because it is not an "own property" of its parent.
|
|
67
|
+
deps: ${r}}`};var _1={keyword:"dependencies",type:"object",schemaType:"object",error:wt.error,code(t){let[e,r]=b1(t);ph(t,e),fh(t,r)}};function b1({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 ph(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,ai.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,ai.checkReportMissingProp)(t,l)}):(r.if((0,Bc._)`${c} && (${(0,ai.checkMissingProp)(t,a,o)})`),(0,ai.reportMissingProp)(t,o),r.else())}}wt.validatePropertyDeps=ph;function fh(t,e=t.schema){let{gen:r,data:n,keyword:i,it:o}=t,s=r.name("valid");for(let a in e)(0,w1.alwaysValidSchema)(o,e[a])||(r.if((0,ai.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))}wt.validateSchemaDeps=fh;wt.default=_1});var hh=b(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});var dh=Y(),S1=ee(),x1={message:"property name must be valid",params:({params:t})=>(0,dh._)`{propertyName: ${t.propertyName}}`},$1={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:x1,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,S1.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,dh.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};Uc.default=$1});var Gc=b(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});var Io=Qe(),ft=Y(),k1=Xe(),Ro=ee(),E1={message:"must NOT have additional properties",params:({params:t})=>(0,ft._)`{additionalProperty: ${t.additionalProperty}}`},C1={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:E1,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,Ro.alwaysValidSchema)(s,r))return;let l=(0,Io.allSchemaProperties)(n.properties),f=(0,Io.allSchemaProperties)(n.patternProperties);p(),t.ok((0,ft._)`${o} === ${k1.default.errors}`);function p(){e.forIn("key",i,$=>{!l.length&&!f.length?g($):e.if(d($),()=>g($))})}function d($){let _;if(l.length>8){let M=(0,Ro.schemaRefOrVal)(s,n.properties,"properties");_=(0,Io.isOwnProperty)(e,M,$)}else l.length?_=(0,ft.or)(...l.map(M=>(0,ft._)`${$} === ${M}`)):_=ft.nil;return f.length&&(_=(0,ft.or)(_,...f.map(M=>(0,ft._)`${(0,Io.usePattern)(t,M)}.test(${$})`))),(0,ft.not)(_)}function m($){e.code((0,ft._)`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,Ro.alwaysValidSchema)(s,r)){let _=e.name("valid");c.removeAdditional==="failing"?(y($,_,!1),e.if((0,ft.not)(_),()=>{t.reset(),m($)})):(y($,_),a||e.if((0,ft.not)(_),()=>e.break()))}}function y($,_,M){let j={keyword:"additionalProperties",dataProp:$,dataPropType:Ro.Type.Str};M===!1&&Object.assign(j,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(j,_)}}};Wc.default=C1});var yh=b(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});var P1=Gn(),mh=Qe(),zc=ee(),gh=Gc(),I1={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&&gh.default.code(new P1.KeywordCxt(o,gh.default,"additionalProperties"));let s=(0,mh.allSchemaProperties)(r);for(let p of s)o.definedProperties.add(p);o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=zc.mergeEvaluated.props(e,(0,zc.toHash)(s),o.props));let a=s.filter(p=>!(0,zc.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,mh.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)}}};Jc.default=I1});var bh=b(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});var vh=Qe(),Oo=Y(),wh=ee(),_h=ee(),R1={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,vh.allSchemaProperties)(r),c=a.filter(y=>(0,wh.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 Oo.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,wh.checkStrictMode)(o,`property ${$} matches pattern ${y} (use allowMatchingProperties)`)}function g(y){e.forIn("key",n,$=>{e.if((0,Oo._)`${(0,vh.usePattern)(t,y)}.test(${$})`,()=>{let _=c.includes(y);_||t.subschema({keyword:"patternProperties",schemaProp:y,dataProp:$,dataPropType:_h.Type.Str},f),o.opts.unevaluated&&p!==!0?e.assign((0,Oo._)`${p}[${$}]`,!0):!_&&!o.allErrors&&e.if((0,Oo.not)(f),()=>e.break())})})}}};Kc.default=R1});var Sh=b(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});var O1=ee(),A1={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,O1.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"}};Yc.default=A1});var xh=b(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});var T1=Qe(),N1={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:T1.validateUnion,error:{message:"must match a schema in anyOf"}};Xc.default=N1});var $h=b(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});var Ao=Y(),M1=ee(),V1={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Ao._)`{passingSchemas: ${t.passing}}`},L1={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:V1,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,M1.alwaysValidSchema)(i,f)?e.var(c,!0):d=t.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},c),p>0&&e.if((0,Ao._)`${c} && ${s}`).assign(s,!1).assign(a,(0,Ao._)`[${a}, ${p}]`).else(),e.if(c,()=>{e.assign(s,!0),e.assign(a,p),d&&t.mergeEvaluated(d,Ao.Name)})})}}};Qc.default=L1});var kh=b(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});var j1=ee(),D1={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)})}};Zc.default=D1});var Ph=b(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});var To=Y(),Ch=ee(),q1={message:({params:t})=>(0,To.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,To._)`{failingKeyword: ${t.ifClause}}`},F1={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:q1,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,Ch.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=Eh(n,"then"),o=Eh(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,To.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,To._)`${f}`):t.setParams({ifClause:f})}}}};function Eh(t,e){let r=t.schema[e];return r!==void 0&&!(0,Ch.alwaysValidSchema)(t,r)}el.default=F1});var Ih=b(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});var H1=ee(),B1={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,H1.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};tl.default=B1});var Rh=b(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});var U1=jc(),W1=ah(),G1=Dc(),z1=lh(),J1=uh(),K1=Po(),Y1=hh(),X1=Gc(),Q1=yh(),Z1=bh(),eS=Sh(),tS=xh(),rS=$h(),nS=kh(),iS=Ph(),oS=Ih();function sS(t=!1){let e=[eS.default,tS.default,rS.default,nS.default,iS.default,oS.default,Y1.default,X1.default,K1.default,Q1.default,Z1.default];return t?e.push(W1.default,z1.default):e.push(U1.default,G1.default),e.push(J1.default),e}rl.default=sS});var il=b(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.dynamicAnchor=void 0;var nl=Y(),aS=Xe(),Oh=Jn(),cS=So(),lS={keyword:"$dynamicAnchor",schemaType:"string",code:t=>Ah(t,t.schema)};function Ah(t,e){let{gen:r,it:n}=t;n.schemaEnv.root.dynamicAnchors[e]=!0;let i=(0,nl._)`${aS.default.dynamicAnchors}${(0,nl.getProperty)(e)}`,o=n.errSchemaPath==="#"?n.validateName:uS(t);r.if((0,nl._)`!${i}`,()=>r.assign(i,o))}ci.dynamicAnchor=Ah;function uS(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 Oh.SchemaEnv({schema:r,schemaId:c,root:i,baseId:o,localRefs:s,meta:a});return Oh.compileSchema.call(n,l),(0,cS.getValidate)(t,l)}ci.default=lS});var ol=b(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.dynamicRef=void 0;var Th=Y(),pS=Xe(),Nh=So(),fS={keyword:"$dynamicRef",schemaType:"string",code:t=>Mh(t,t.schema)};function Mh(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,Th._)`${pS.default.dynamicAnchors}${(0,Th.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,Nh.callRef)(t,c),r.let(l,!0)}):()=>(0,Nh.callRef)(t,c)}}li.dynamicRef=Mh;li.default=fS});var Vh=b(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});var dS=il(),hS=ee(),mS={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,dS.dynamicAnchor)(t,""):(0,hS.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};sl.default=mS});var Lh=b(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});var gS=ol(),yS={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,gS.dynamicRef)(t,t.schema)};al.default=yS});var jh=b(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});var vS=il(),wS=ol(),_S=Vh(),bS=Lh(),SS=[vS.default,wS.default,_S.default,bS.default];cl.default=SS});var qh=b(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});var Dh=Po(),xS={keyword:"dependentRequired",type:"object",schemaType:"object",error:Dh.error,code:t=>(0,Dh.validatePropertyDeps)(t)};ll.default=xS});var Fh=b(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});var $S=Po(),kS={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,$S.validateSchemaDeps)(t)};ul.default=kS});var Hh=b(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});var ES=ee(),CS={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:r}){e.contains===void 0&&(0,ES.checkStrictMode)(r,`"${t}" without "contains" is ignored`)}};pl.default=CS});var Bh=b(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});var PS=qh(),IS=Fh(),RS=Hh(),OS=[PS.default,IS.default,RS.default];fl.default=OS});var Wh=b(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});var er=Y(),Uh=ee(),AS=Xe(),TS={message:"must NOT have unevaluated properties",params:({params:t})=>(0,er._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},NS={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:TS,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 er.Name?e.if((0,er._)`${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,er._)`${i} === ${AS.default.errors}`);function c(p){if(r===!1){t.setParams({unevaluatedProperty:p}),t.error(),s||e.break();return}if(!(0,Uh.alwaysValidSchema)(o,r)){let d=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:p,dataPropType:Uh.Type.Str},d),s||e.if((0,er.not)(d),()=>e.break())}}function l(p,d){return(0,er._)`!${p} || !${p}[${d}]`}function f(p,d){let m=[];for(let g in p)p[g]===!0&&m.push((0,er._)`${d} !== ${g}`);return(0,er.and)(...m)}}};dl.default=NS});var zh=b(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});var br=Y(),Gh=ee(),MS={message:({params:{len:t}})=>(0,br.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,br._)`{limit: ${t}}`},VS={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:MS,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,br._)`${n}.length`);if(r===!1)t.setParams({len:o}),t.fail((0,br._)`${s} > ${o}`);else if(typeof r=="object"&&!(0,Gh.alwaysValidSchema)(i,r)){let c=e.var("valid",(0,br._)`${s} <= ${o}`);e.if((0,br.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:Gh.Type.Num},c),i.allErrors||e.if((0,br.not)(c),()=>e.break())})}}};hl.default=VS});var Jh=b(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});var LS=Wh(),jS=zh(),DS=[LS.default,jS.default];ml.default=DS});var Kh=b(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});var be=Y(),qS={message:({schemaCode:t})=>(0,be.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,be._)`{format: ${t}}`},FS={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:qS,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,be._)`${g}[${s}]`),$=r.let("fType"),_=r.let("format");r.if((0,be._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign($,(0,be._)`${y}.type || "string"`).assign(_,(0,be._)`${y}.validate`),()=>r.assign($,(0,be._)`"string"`).assign(_,y)),t.fail$data((0,be.or)(M(),j()));function M(){return c.strictSchema===!1?be.nil:(0,be._)`${s} && !${_}`}function j(){let T=f.$async?(0,be._)`(${y}.async ? await ${_}(${n}) : ${_}(${n}))`:(0,be._)`${_}(${n})`,N=(0,be._)`(typeof ${_} == "function" ? ${T} : ${_}.test(${n}))`;return(0,be._)`${_} && ${_} !== true && ${$} === ${e} && !${N}`}}function m(){let g=p.formats[o];if(!g){M();return}if(g===!0)return;let[y,$,_]=j(g);y===e&&t.pass(T());function M(){if(c.strictSchema===!1){p.logger.warn(N());return}throw new Error(N());function N(){return`unknown format "${o}" ignored in schema at path "${l}"`}}function j(N){let G=N instanceof RegExp?(0,be.regexpCode)(N):c.code.formats?(0,be._)`${c.code.formats}${(0,be.getProperty)(o)}`:void 0,te=r.scopeValue("formats",{key:o,ref:N,code:G});return typeof N=="object"&&!(N instanceof RegExp)?[N.type||"string",N.validate,(0,be._)`${te}.validate`]:["string",N,te]}function T(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!f.$async)throw new Error("async format in sync schema");return(0,be._)`await ${_}(${n})`}return typeof $=="function"?(0,be._)`${_}(${n})`:(0,be._)`${_}.test(${n})`}}}};gl.default=FS});var Yh=b(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});var HS=Kh(),BS=[HS.default];yl.default=BS});var Xh=b(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.contentVocabulary=Qr.metadataVocabulary=void 0;Qr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Qr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Zh=b(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});var US=Bd(),WS=nh(),GS=Rh(),zS=jh(),JS=Bh(),KS=Jh(),YS=Yh(),Qh=Xh(),XS=[zS.default,US.default,WS.default,(0,GS.default)(!0),YS.default,Qh.metadataVocabulary,Qh.contentVocabulary,JS.default,KS.default];vl.default=XS});var tm=b(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.DiscrError=void 0;var em;(function(t){t.Tag="tag",t.Mapping="mapping"})(em||(No.DiscrError=em={}))});var nm=b(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0});var Zr=Y(),wl=tm(),rm=Jn(),QS=zn(),ZS=ee(),ex={message:({params:{discrError:t,tagName:e}})=>t===wl.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,Zr._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},tx={keyword:"discriminator",type:"object",schemaType:"object",error:ex,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,Zr._)`${r}${(0,Zr.getProperty)(a)}`);e.if((0,Zr._)`typeof ${l} == "string"`,()=>f(),()=>t.error(!1,{discrError:wl.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,Zr._)`${l} === ${g}`),e.assign(c,p(m[g]));e.else(),t.error(!1,{discrError:wl.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,Zr.Name),g}function d(){var m;let g={},y=_(i),$=!0;for(let T=0;T<s.length;T++){let N=s[T];if(N?.$ref&&!(0,ZS.schemaHasRulesButRef)(N,o.self.RULES)){let te=N.$ref;if(N=rm.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,te),N instanceof rm.SchemaEnv&&(N=N.schema),N===void 0)throw new QS.default(o.opts.uriResolver,o.baseId,te)}let G=(m=N?.properties)===null||m===void 0?void 0:m[a];if(typeof G!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);$=$&&(y||_(N)),M(G,T)}if(!$)throw new Error(`discriminator: "${a}" must be required`);return g;function _({required:T}){return Array.isArray(T)&&T.includes(a)}function M(T,N){if(T.const)j(T.const,N);else if(T.enum)for(let G of T.enum)j(G,N);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function j(T,N){if(typeof T!="string"||T in g)throw new Error(`discriminator: "${a}" values must be unique strings`);g[T]=N}}}};_l.default=tx});var im=b((LO,rx)=>{rx.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 om=b((jO,nx)=>{nx.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 sm=b((DO,ix)=>{ix.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 am=b((qO,ox)=>{ox.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 cm=b((FO,sx)=>{sx.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 lm=b((HO,ax)=>{ax.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 um=b((BO,cx)=>{cx.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 pm=b((UO,lx)=>{lx.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 fm=b(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});var ux=im(),px=om(),fx=sm(),dx=am(),hx=cm(),mx=lm(),gx=um(),yx=pm(),vx=["/properties"];function wx(t){return[ux,px,fx,dx,hx,e(this,mx),gx,e(this,yx)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function e(r,n){return t?r.$dataMetaSchema(n,vx):n}}bl.default=wx});var dm=b((he,xl)=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.MissingRefError=he.ValidationError=he.CodeGen=he.Name=he.nil=he.stringify=he.str=he._=he.KeywordCxt=he.Ajv2020=void 0;var _x=jd(),bx=Zh(),Sx=nm(),xx=fm(),Sl="https://json-schema.org/draft/2020-12/schema",en=class extends _x.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),bx.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(Sx.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:r}=this.opts;r&&(xx.default.call(this,e),this.refs["http://json-schema.org/schema"]=Sl)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Sl)?Sl:void 0)}};he.Ajv2020=en;xl.exports=he=en;xl.exports.Ajv2020=en;Object.defineProperty(he,"__esModule",{value:!0});he.default=en;var $x=Gn();Object.defineProperty(he,"KeywordCxt",{enumerable:!0,get:function(){return $x.KeywordCxt}});var tn=Y();Object.defineProperty(he,"_",{enumerable:!0,get:function(){return tn._}});Object.defineProperty(he,"str",{enumerable:!0,get:function(){return tn.str}});Object.defineProperty(he,"stringify",{enumerable:!0,get:function(){return tn.stringify}});Object.defineProperty(he,"nil",{enumerable:!0,get:function(){return tn.nil}});Object.defineProperty(he,"Name",{enumerable:!0,get:function(){return tn.Name}});Object.defineProperty(he,"CodeGen",{enumerable:!0,get:function(){return tn.CodeGen}});var kx=ho();Object.defineProperty(he,"ValidationError",{enumerable:!0,get:function(){return kx.default}});var Ex=zn();Object.defineProperty(he,"MissingRefError",{enumerable:!0,get:function(){return Ex.default}})});import{readFileSync as Cx}from"node:fs";import{createRequire as Px}from"node:module";import{dirname as $l,resolve as Ix}from"node:path";import{fileURLToPath as Rx}from"node:url";function xe(){if(rn)return rn;let t=Px(import.meta.url);try{return rn=$l(t.resolve("view-contracts/package.json")),rn}catch{let e=$l(Rx(import.meta.url));for(;;){try{let n=Ix(e,"package.json");if(JSON.parse(Cx(n,"utf8")).name==="view-contracts")return rn=e,rn}catch{}let r=$l(e);if(r===e)break;e=r}throw new Error("view-contracts package root not found")}}var rn,Lt=K(()=>{"use strict"});import{readFile as Nx}from"node:fs/promises";async function Lo(t){return at.load(await Nx(t,"utf-8"))}function ym(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 vm(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 kl=K(()=>{"use strict";Dr()});import{resolve as Mx}from"node:path";function Vx(t){ym(Object.keys(t.elements),At,wm),vm(t.elements,["tag"],wm)}async function Cl(t){if(!t&&El)return El;let e=t??Mx(xe(),"renderers/react/elements.yaml"),r=await Lo(e);return Vx(r),t||(El=r),r}var wm,El,_m=K(()=>{"use strict";Tt();Tt();Lt();kl();wm="renderers/react/elements.yaml",El=null});function bm(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t}function Sm(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 xm=K(()=>{"use strict"});function dt(t){return`${t}px`}function nn(t){let e=t.match(/^\{([^}]+)\}$/);if(e)return`var(--${e[1].replace(/\./g,"-")})`}function Pl(t){let e={},r=t.width;typeof r=="number"?e.width=dt(r):typeof r=="string"&&r!=="wrap"&&r!=="fill"&&(e.width=r),typeof t.minWidth=="number"&&(e.minWidth=dt(t.minWidth)),typeof t.maxWidth=="number"&&(e.maxWidth=dt(t.maxWidth)),typeof t.height=="number"&&(e.height=dt(t.height)),typeof t.minHeight=="number"&&(e.minHeight=dt(t.minHeight)),typeof t.maxHeight=="number"&&(e.maxHeight=dt(t.maxHeight)),t.aspectRatio!==void 0&&(e.aspectRatio=String(t.aspectRatio));let n=t.weight;typeof n=="number"&&(e.flexGrow=n),typeof t.padding=="number"&&(e.padding=dt(t.padding)),typeof t.margin=="number"&&(e.margin=dt(t.margin)),typeof t.gap=="number"&&(e.gap=dt(t.gap));let i=t.textAlign;typeof i=="string"&&(e.textAlign=i==="start"?"left":i==="end"?"right":i);let o=t.contentAlign;typeof o=="string"&&o in $m&&(e.placeItems=$m[o]),typeof t.overflow=="string"&&(e.overflow=t.overflow);let s=t.selfAlign;typeof s=="string"&&(e.alignSelf=s==="start"?"flex-start":s==="end"?"flex-end":s);let a=t.size;typeof a=="number"?e.fontSize=dt(a):typeof a=="string"&&(e.fontSize=a);let c=typeof n=="string"?n:t.fontWeight;typeof c=="string"&&(e.fontWeight=c);let l=t.background;typeof l=="string"&&(e.background=nn(l)??l);let f=t.foreground;typeof f=="string"&&(e.color=nn(f)??f);let p=t.radius;typeof p=="number"?e.borderRadius=dt(p):typeof p=="string"&&(e.borderRadius=nn(p)??p);let d=t.shadow;d===!0?e.boxShadow="var(--ui-shadow)":d===!1?e.boxShadow="none":typeof d=="string"&&(e.boxShadow=Lx[d]??nn(d)??d);let m=t.border;typeof m=="string"&&(e.border=nn(m)??m),typeof t.opacity=="number"&&(e.opacity=t.opacity);let g=t.clip;typeof g=="string"&&(e.overflow=g==="hidden"?"hidden":g);let y=t.align;if(typeof y=="string"){let j=bm(y);j&&(e.alignItems=j)}let $=t.justify;if(typeof $=="string"){let j=Sm($);j&&(e.justifyContent=j)}typeof t.display=="string"&&(e.display=t.display),typeof t.gridTemplateColumns=="string"&&(e.gridTemplateColumns=t.gridTemplateColumns),typeof t.flexDirection=="string"&&(e.flexDirection=t.flexDirection),typeof t.alignItems=="string"&&(e.alignItems=t.alignItems);let _=t.borderColor;typeof _=="string"&&(e.borderColor=nn(_)??_);let M=t.flex;return typeof M=="number"&&(e.flex=M),e}function ui(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 $m,Lx,Il=K(()=>{"use strict";xm();$m={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"},Lx={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 jo(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 Dx(t){let e={};for(let[r,n]of Object.entries(t)){if(!Zi.has(r))continue;jx(r,n);let i=jo(t,r);i!==void 0&&(e[r]=i)}return e}function qx(t){return t.flex?{display:"flex",flexDirection:t.flex==="column"?"column":"row"}:{}}function Fx(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 km(t,e){let r=Dx(e),n=Pl(r);if(n={...n,...qx(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=jo(e,"scroll"),o=jo(e,"axis"),s=typeof i=="string"?i:typeof o=="string"?o==="horizontal"?"horizontal":"vertical":void 0;if(s)return n={...n,...Fx(s)},ui(n);throw new Error("ScrollArea scroll/axis must be compile-time literals")}if(t.flexGrowProp&&e[t.flexGrowProp]){let i=jo(e,t.flexGrowProp);if(typeof i=="number")return n.flexGrow=i,ui(n);throw new Error(`"${t.flexGrowProp}" on <Spacer> must be a compile-time literal`)}return ui(n)}var Em=K(()=>{"use strict";Tt();Il();Il()});function W(t){return" ".repeat(t)}function xr(t,e="vm"){let r=t.scope??e;return t.path?`${r}.${t.path}`:r}function Om(t){return t.parts.map(e=>typeof e=="string"?e:`\${${xr(e)}}`).join("")}function Hx(t){return`\`${Om(t)}\``}function Do(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}: ${sn(o,0)}`).join(", ");return`{ name: ${JSON.stringify(t.name)}, params: { ${n} } }${r}`}function Ol(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=>`${W(e+1)}${Ol(n,e+1,r)}`).join(`,
|
|
69
|
+
`)}
|
|
70
|
+
${W(e)}]`;if(typeof t=="object"&&t!==null){let n=t;return"kind"in n&&n.kind==="action"?Do(n,r):`{
|
|
71
|
+
${Object.entries(n).map(([o,s])=>`${o}: ${Ol(s,e+1,r)}`).map(o=>`${W(e+1)}${o}`).join(`,
|
|
72
|
+
`)}
|
|
73
|
+
${W(e)}}`}return"undefined"}function sn(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
|
+
${t.map(n=>`${W(e+1)}${sn(n,e+1,r)}`).join(`,
|
|
75
|
+
`)}
|
|
76
|
+
${W(e)}]`;if(typeof t=="object"&&t!==null&&"kind"in t){if(t.kind==="binding")return xr(t);if(t.kind==="action")return Do(t,r);if(t.kind==="literal")return Ol(t.value,e,r);if(t.kind==="concat")return Hx(t)}return"undefined"}function on(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 U(t,e){let r=t[e];if(r!=null)return sn(r,0)}function fi(t,e,r){let n=km(e,r);n&&t.push(n)}function Bx(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=Do(r,!0);return e==="onSubmit"?`onSubmit={(e) => { e.preventDefault(); void dispatchAction(${n}); }}`:`onClick={() => { void dispatchAction(${n}); }}`}function Rl(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Ux(t,e){let r=on(e,"variant");if(typeof r=="string")return` vc-${Rl(t)}--${r}`;let n=e.variant;if(n&&typeof n=="object"&&"kind"in n&&n.kind==="concat")return` vc-${Rl(t)}--${Om(n)}`;let i=U(e,"variant");if(i)return` vc-${Rl(t)}--\${${i}}`}function di(t,e,r){let n=e.className??"",i=Ux(t,r);if(i)return typeof on(r,"variant")=="string"?`className="${n}${i}"`:`className={\`${n}${i}\`}`;if(e.wrapProp&&on(r,e.wrapProp)===!0)return`className="${n} vc-wrap"`;if(e.sizeClass&&r.size){let o=U(r,"size");return`className={\`${e.className} ${e.sizeClass}-\${${o} ?? 'md'}\`}`}return`className="${n}"`}function Cm(t,e,r){let n=on(e,"label"),i=on(e,"help"),o=on(e,"error"),s=U(e,"label"),a=U(e,"help"),c=U(e,"error"),l=[`${W(r)}<label className="vc-field">`];return typeof n=="string"?l.push(`${W(r+1)}<span className="vc-field-label">{${JSON.stringify(n)}}</span>`):s&&l.push(`${W(r+1)}{${s} ? <span className="vc-field-label">{${s}}</span> : null}`),l.push(`${W(r+1)}${t}`),typeof i=="string"?l.push(`${W(r+1)}<span className="vc-field-help">{${JSON.stringify(i)}}</span>`):a&&l.push(`${W(r+1)}{${a} ? <span className="vc-field-help">{${a}}</span> : null}`),typeof o=="string"?l.push(`${W(r+1)}<span className="vc-field-error">{${JSON.stringify(o)}}</span>`):c&&l.push(`${W(r+1)}{${c} ? <span className="vc-field-error">{${c}}</span> : null}`),l.push(`${W(r)}</label>`),l.join(`
|
|
77
|
+
`)}function Wx(t,e){let r=U(t,"name")??'""',n=U(t,"label")??'""',i=t.checked?`defaultChecked={${U(t,"checked")}}`:"",o=t.enabled?`disabled={${U(t,"enabled")} === false}`:"";return`${W(e)}<label className="vc-checkbox">
|
|
78
|
+
${W(e+1)}<input type="checkbox" name={${r}} ${i} ${o} />
|
|
79
|
+
${W(e+1)}<span>{${n}}</span>
|
|
80
|
+
${W(e)}</label>`}function Gx(t,e){let r=U(t,"binding")??U(t,"name")??'""',n=U(t,"value")??'""',i=U(t,"label")??'""',o=t.checked?`defaultChecked={${U(t,"checked")}}`:"",s=t.enabled?`disabled={${U(t,"enabled")} === false}`:"";return`${W(e)}<label className="vc-radio">
|
|
81
|
+
${W(e+1)}<input type="radio" name={${r}} value={${n}} ${o} ${s} />
|
|
82
|
+
${W(e+1)}<span>{${i}}</span>
|
|
83
|
+
${W(e)}</label>`}function zx(t,e){let r=U(t,"binding")??U(t,"name")??'""',n=U(t,"label")??'""',i=t.checked?`defaultChecked={${U(t,"checked")}}`:"",o=t.enabled?`disabled={${U(t,"enabled")} === false}`:"";return`${W(e)}<label className="vc-switch">
|
|
84
|
+
${W(e+1)}<input type="checkbox" role="switch" name={${r}} ${i} ${o} />
|
|
85
|
+
${W(e+1)}<span>{${n}}</span>
|
|
86
|
+
${W(e)}</label>`}function Jx(t,e,r){let n=t.props;if(n.alt!==void 0){let s=[di(t.name,e,n),`src={${U(n,"name")??'""'}}`,`alt={${U(n,"alt")??'""'}}`];return fi(s,e,n),n.id&&s.push(`id={${U(n,"id")}}`),`${W(r)}<img ${s.join(" ")} />`}let o=[di(t.name,e,n),"aria-hidden"];return fi(o,e,n),n.id&&o.push(`id={${U(n,"id")}}`),n.name&&o.push(`data-icon={${U(n,"name")}}`),`${W(r)}<span ${o.join(" ")} />`}function Pm(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=>`${W(e+1)}<option key={${JSON.stringify(o.value)}} value={${JSON.stringify(o.value)}}>{${JSON.stringify(o.label)}}</option>`).join(`
|
|
87
|
+
`);let n=sn(r,0);return`${W(e+1)}{${n}.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}`}function Im(t,e,r,n){let i=[di(t,e,r)];return fi(i,e,r),e.ariaHidden&&i.push("aria-hidden"),r.id&&i.push(`id={${U(r,"id")}}`),r.role?i.push(`role={${U(r,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(r.ariaLabel?i.push(`aria-label={${U(r,"ariaLabel")}}`):r.label?i.push(`aria-label={${U(r,"label")}}`):r.title&&i.push(`aria-label={${U(r,"title")}}`)),r.name&&i.push(`name={${U(r,"name")}}`),r.placeholder&&i.push(`placeholder={${U(r,"placeholder")}}`),e.inputType&&i.push(`type={${U(r,"type")??JSON.stringify(e.inputType)}}`),r.required&&i.push(`required={${U(r,"required")}}`),r.readonly&&i.push(`readOnly={${U(r,"readonly")}}`),r.enabled&&i.push(`disabled={${U(r,"enabled")} === false}`),e.tag==="img"&&r.src&&i.push(`src={${U(r,"src")}}`),e.tag==="img"&&r.alt&&i.push(`alt={${U(r,"alt")}}`),e.tag==="progress"&&r.value&&i.push(`value={${U(r,"value")}}`),r.rows&&i.push(`rows={${U(r,"rows")??"4"}}`),`${W(n)}<${e.tag} ${i.join(" ")} />`}function Rm(t,e,r,n){let i=[];if(e.ariaHidden&&i.push("aria-hidden"),r.id&&i.push(`id={${U(r,"id")}}`),r.role?i.push(`role={${U(r,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(r.ariaLabel?i.push(`aria-label={${U(r,"ariaLabel")}}`):r.label?i.push(`aria-label={${U(r,"label")}}`):r.title&&i.push(`aria-label={${U(r,"title")}}`)),e.actionEvent){let o=Bx(r,e.actionEvent);o&&i.push(o)}return e.tag==="button"&&r.enabled&&i.push(`disabled={${U(r,"enabled")} === false}`),e.tag==="a"&&r.href&&i.push(`href={${U(r,"href")}}`),e.tag==="button"&&i.push(`type={${U(r,"type")??'"button"'}}`),i.push(di(t,e,r)),fi(i,e,r),`<${n} ${i.join(" ")}`}function jt(t,e,r){if(e.visible===void 0)return t;let n=U(e,"visible");return`${W(r)}{${n} !== false ? (
|
|
88
|
+
${t}
|
|
89
|
+
${W(r)}) : null}`}function Al(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?`${W(e)}{${JSON.stringify(a)}}`:""}return s.kind==="binding"?`${W(e)}{${xr(s,i)}}`:s.kind==="map"?Kx(s,e,r):s.kind==="fragment"?Al(s.children,e,r,n):r(s,e,n)}).filter(Boolean).join(`
|
|
90
|
+
`)}function Kx(t,e,r){let n=t.item,i=r(t.body,e+1,n);if(t.key){let o=` key={${xr(t.key,n)}}`;i=i.replace(/^( +)<(\w+)/,`$1<$2${o}`)}return`${W(e)}{${xr(t.source)}.map((${n}) => (
|
|
91
|
+
${i}
|
|
92
|
+
${W(e)}))}`}function Yx(t,e,r,n,i){let o=t.props,s=Al(t.children,r+1,i,n);if(e.checkbox)return jt(Wx(o,r),o,r);if(t.name==="Radio")return jt(Gx(o,r),o,r);if(t.name==="Switch")return jt(zx(o,r),o,r);if(t.name==="Icon")return jt(Jx(t,e,r),o,r);if(t.name==="Spinner"){let f=[di(t.name,e,o),'aria-busy="true"'];return fi(f,e,o),o.id&&f.push(`id={${U(o,"id")}}`),o.role?f.push(`role={${U(o,"role")}}`):e.defaultRole&&f.push(`role="${e.defaultRole}"`),jt(`${W(r)}<div ${f.join(" ")} />`,o,r)}if(e.fieldContainer){let f=s||`${W(r+1)}<div />`;return jt(Cm(f,o,r),o,r)}if(e.fieldWrap){let f=e.tag,p;if(e.optionsProp&&o[e.optionsProp]){let d=Rm(t.name,e,o,f);p=`${W(r+1)}${d}>
|
|
93
|
+
${Pm(o,r+2)}
|
|
94
|
+
${W(r+1)}</${f}>`}else p=Im(t.name,e,o,r+1);return jt(Cm(p,o,r),o,r)}let a=e.tag;if(e.void)return jt(Im(t.name,e,o,r),o,r);let c=Rm(t.name,e,o,a),l;return!s&&e.optionsProp&&o[e.optionsProp]?l=`${W(r)}${c}>
|
|
95
|
+
${Pm(o,r+1)}
|
|
96
|
+
${W(r)}</${a}>`:s?l=`${W(r)}${c}>
|
|
97
|
+
${s}
|
|
98
|
+
${W(r)}</${a}>`:l=`${W(r)}${c} />`,jt(l,o,r)}function Xx(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}={${xr(i,r)}}`:`${n}={${sn(i,0)}}`).join(" ")}function Qx(t,e,r){let n=Xx(t.props,r),i=n?` ${n}`:"";return`${W(e)}<${t.name}${i} />`}function Zx(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}={${Do(i,!0)}}`:typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${n}={${xr(i,r)}}`:n==="children"?"":`${n}={${sn(i,0,n==="columns")}}`).join(" ")}function e$(t,e,r,n){let i=Zx(t.props,r),o=i?` ${i}`:"",s=Al(t.children,e+1,n,r);return s?`${W(e)}<${t.name}${o}>
|
|
99
|
+
${s}
|
|
100
|
+
${W(e)}</${t.name}>`:`${W(e)}<${t.name}${o} />`}function Am(t,e,r){return t in e.elements&&!r.includes(t)}function pi(t,e){if(t.kind==="viewRef"){e.add(t.name);return}if(t.kind==="component"){for(let r of t.children)pi(r,e);return}if(t.kind==="map"&&pi(t.body,e),t.kind==="fragment")for(let r of t.children)pi(r,e)}function Sr(t,e,r,n){if(t.kind==="component"){Am(t.name,e,r)||n.add(t.name);for(let i of t.children)Sr(i,e,r,n);return}if(t.kind==="map"&&Sr(t.body,e,r,n),t.kind==="fragment")for(let i of t.children)Sr(i,e,r,n)}function Tm(t,e){let r=(n,i,o)=>n.kind==="viewRef"?Qx(n,i,o):n.kind!=="component"?"":Am(n.name,t,e)?Yx(n,t.elements[n.name],i,o,r):e$(n,i,o,r);return(n,i,o)=>r(n,i,o)}var Nm=K(()=>{"use strict";Em()});var Nl={};zi(Nl,{partialReactOutputPath:()=>c$,renderReactComponent:()=>Tl,renderReactFromIr:()=>s$,renderReactPreviewBundle:()=>a$});import{resolve as t$}from"node:path";function r$(t){if(t.isPartial)return t.exportName;let e=t.exportName.replace(/View$/,"")||t.exportName;return e.charAt(0).toUpperCase()+e.slice(1)}function n$(t,e){if(t.kind!=="component")throw new Error(`View IR root must be a component node (${e})`);return t}function Vm(t){if(!t)return[];let e=t.match(/\b[A-Z][A-Za-z0-9]*ViewModel\b/g);return e?[...new Set(e)]:[]}function i$(t){if(!t.propsType)return"";let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?`{ ${e[1].trim().split(",").map(i=>i.split(":")[0].trim()).join(", ")} }: ${t.propsType}`:`props: ${t.propsType}`}function Mm(t){return t.trimStart().startsWith("{")?`return (
|
|
101
|
+
<>${t}
|
|
102
|
+
</>
|
|
103
|
+
);`:`return (
|
|
104
|
+
${t}
|
|
105
|
+
);`}function o$(t){let e=t.replace(/^\/\*\*[\s\S]*?\*\/\s*/,"");return e=e.replace(/^import\s[^\n]+\n/gm,""),e.trimStart()}async function Lm(t,e){let r=await Cl(e.elementMapPath),n=e.allowlistExtra??[],i=r$(t),o=n$(t.root,t.source),a=Tm(r,n)(o,2),c=new Set;Sr(t.root,r,n,c);let l=[...c].sort(),f=new Set;pi(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 N of Vm(t.propsType))$.add(N);else $.add(t.viewModel);let _=["import type { ReactElement } from 'react';"];_.push(`import { dispatchAction } from '${m}';`);let M=[...$].sort(),j=M.length>0?`${M.join(", ")}, ActionDescriptor`:"ActionDescriptor";_.push(`import type { ${j} } from '${g}';`),l.length>0&&_.push(`import { ${l.join(", ")} } from '${y}';`);for(let N of p){if(e.inlineViewRefs)continue;let G=e.viewRefImportFrom?.get(N)??`./${N}.generated.js`;_.push(`import { ${N} } from '${G}';`)}let T=d?`/**
|
|
106
|
+
* Preview module \u2014 compiled live from ${t.source}
|
|
107
|
+
* Same lowering as generated/; not written to disk.
|
|
108
|
+
*/`:`/**
|
|
109
|
+
* Auto-generated React component from ${t.source}
|
|
110
|
+
* DO NOT EDIT \u2014 regenerate with: view-contracts render react
|
|
111
|
+
*/`;if(t.isPartial){let N=i$(t);return`${T}
|
|
112
|
+
${_.join(`
|
|
113
|
+
`)}
|
|
114
|
+
|
|
115
|
+
export function ${i}(${N}): ReactElement {
|
|
116
|
+
${Mm(a)}
|
|
117
|
+
}
|
|
118
|
+
`}return`${T}
|
|
119
|
+
${_.join(`
|
|
120
|
+
`)}
|
|
121
|
+
|
|
122
|
+
export function ${i}({ vm }: { vm: ${t.viewModel} }): ReactElement {
|
|
123
|
+
${Mm(a)}
|
|
124
|
+
}
|
|
125
|
+
`}async function Tl(t,e){return Lm(t,e)}async function s$(t,e,r){let{writeFile:n,mkdir:i}=await import("node:fs/promises"),{dirname:o}=await import("node:path"),s=await Lm(t,r);await i(o(e),{recursive:!0}),await n(e,s,"utf-8")}async function a$(t,e,r){let n={...r,inlineViewRefs:!0},i=await Promise.all(e.map(T=>Tl(T,n))),o=await Tl(t,n),s=o$,a=await Cl(r.elementMapPath),c=r.allowlistExtra??[],l=new Set;Sr(t.root,a,c,l);for(let T of e)Sr(T.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 T of e)for(let N of Vm(T.propsType))g.add(N);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 _=f?`/**
|
|
126
|
+
* Preview module \u2014 compiled live from ${t.source}
|
|
127
|
+
* Same lowering as generated/; not written to disk.
|
|
128
|
+
*/`:"",M=i.map(s),j=s(o);return`${_}
|
|
129
|
+
${y.join(`
|
|
130
|
+
`)}
|
|
131
|
+
|
|
132
|
+
${M.join(`
|
|
133
|
+
|
|
134
|
+
`)}
|
|
135
|
+
|
|
136
|
+
${j}`}function c$(t,e){return t$(t,"components",`${e.exportName}.generated.tsx`)}var Ml=K(()=>{"use strict";_m();Nm()});import{readFile as jm}from"node:fs/promises";import{createRequire as l$}from"node:module";import{dirname as u$,resolve as qm}from"node:path";async function f$(t,e){return t.startsWith("@")||!t.startsWith(".")&&!t.startsWith("/")?p$.resolve(t):qm(e,t)}async function Fm(t){let e=qm(t),r=await jm(e,"utf-8"),n=u$(e);for(let i of r.matchAll(Dm)){let o=i[0],s=i[1];if(!s)continue;let a=await f$(s,n),c=await jm(a,"utf-8");r=r.replace(o,`${c}
|
|
137
|
+
`)}return r.replace(Dm,"").trim()}var Dm,p$,Hm=K(()=>{"use strict";Dm=/^@import\s+['"](.+?)['"]\s*;/gm,p$=l$(import.meta.url)});import{resolve as Bm}from"node:path";function hi(t){return t??Bm(xe(),"renderers/react/templates")}function $r(){return Bm(xe(),"renderers/react/runtime")}var qo=K(()=>{"use strict";Lt()});import{readFile as d$}from"node:fs/promises";import{extname as h$,resolve as m$}from"node:path";async function Fo(t){let e=m$(t),r=await d$(e,"utf-8"),n=h$(e).toLowerCase();if(n===".json")return JSON.parse(r);if(n===".yaml"||n===".yml")return at.load(r);throw new Error(`Unsupported design file extension "${n}" (expected .yaml, .yml, or .json): ${e}`)}var Vl=K(()=>{"use strict";Dr()});var Ho,_t,cn,Bo,$e,an,kr=K(()=>{"use strict";Ho=["color","dimension","shadow","typography","layout"],_t=class extends Error{constructor(e){super(e),this.name="DesignTokenError"}},cn=["background","foreground","radius","padding","shadow","typography","display","gridTemplateColumns","minHeight","maxWidth","width","margin","border","borderColor","flexDirection","fontWeight","fontSize","alignItems","justifyContent"],Bo={background:["color"],foreground:["color"],radius:["dimension","layout"],padding:["dimension","layout"],shadow:["shadow"],typography:["typography"],display:["layout"],gridTemplateColumns:["layout"],minHeight:["dimension","layout"],maxWidth:["dimension","layout"],width:["dimension","layout"],margin:["dimension","layout"],border:["layout"],borderColor:["color"],flexDirection:["layout"],fontWeight:["layout"],fontSize:["dimension","layout"],alignItems:["layout"],justifyContent:["layout"]},$e=class extends Error{constructor(e){super(e),this.name="DesignThemeError"}},an=class extends Error{constructor(e){super(e),this.name="DesignConstraintError"}}});function ln(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function y$(t){if(!cn.includes(t))throw new $e(`Unknown variant property "${t}" (expected ${cn.join(", ")})`);return t}function v$(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(g$);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=y$(n),s=v$(i,t,n);r[o]={ref:s,accepts:[...Bo[o]]}}return r}function w$(t){if(t===void 0)return{};if(!ln(t))throw new $e('Theme "defaults" must be an object');let e={};for(let[r,n]of Object.entries(t)){if(!ln(n))throw new $e(`Theme defaults for "${r}" must be an object`);e[r]=Um(`defaults.${r}`,n)}return e}function Ll(t){if(!ln(t))throw new $e("Theme document must be a YAML/JSON object");let e=t.variants;if(!ln(e))throw new $e('Theme document must contain a "variants" object');let r={};for(let[n,i]of Object.entries(e)){if(!ln(i))throw new $e(`Theme variants for "${n}" must be an object`);let o={};for(let[s,a]of Object.entries(i)){if(!ln(a))throw new $e(`Theme variant "${n}.${s}" must be an object`);o[s]=Um(`${n}.${s}`,a)}r[n]=o}return{defaults:w$(t.defaults),variants:r}}var g$,jl=K(()=>{"use strict";kr();g$=/^\{([^}]+)\}$/});function mi(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function b$(t){return`--${t.replace(/\./g,"-")}`}function S$(t,e){if(typeof t!="string"||!Ho.includes(t))throw new _t(`Token "${e}" has unsupported $type "${String(t)}" (expected ${Ho.join(", ")})`);return t}function Wm(t,e,r){if(mi(t)){if("$type"in t&&"$value"in t){r.push({path:e,type:S$(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 x$(t,e){if(typeof e=="string")return e;if(t==="typography"&&mi(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=>mi(r)?`${r.offsetX??0} ${r.offsetY??0} ${r.blur??0} ${r.color??"transparent"}`:String(r)).join(", ");if(t==="shadow"&&mi(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 $$(t){return typeof t!="string"?null:t.match(_$)?.[1]??null}function Gm(t,e,r,n,i){let o=$$(e);if(!o){let c=r.get(t);if(!c)throw new _t(`Unknown token path "${t}"`);return{value:x$(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 Dl(t){if(!mi(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:b$(o.path),ref:a})}return{entries:i}}var _$,ql=K(()=>{"use strict";kr();_$=/^\{([^}]+)\}$/});function Fl(t){let e=Cp(t),r=new Set;for(let n of e)cn.includes(n)&&r.add(n);return r}var zm=K(()=>{"use strict";Tt();kr()});function k$(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=Bo[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=k$(t);for(let[n,i]of Object.entries(e.defaults)){let o=Fl(n);Jm(`defaults.${n}`,n,i,o,r)}for(let[n,i]of Object.entries(e.variants)){let o=Fl(n);for(let[s,a]of Object.entries(i))Jm(`variants.${n}.${s}`,n,a,o,r)}}function Hl(t,e){Km(t,e)}var Bl=K(()=>{"use strict";kr();zm()});function Ul(t){let e=[":root {"];for(let r of t.entries)e.push(` ${r.cssVar}: ${r.value};`);return e.push("}"),e.join(`
|
|
138
|
+
`)}function Wl(t){return t.replace(/:root\s*\{[\s\S]*?\}\s*/m,"").trim()}var Ym=K(()=>{"use strict"});var Uo,Gl=K(()=>{"use strict";Uo={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",margin:"margin",border:"border",borderColor:"border-color",flexDirection:"flex-direction",fontWeight:"font-weight",fontSize:"font-size",alignItems:"align-items",justifyContent:"justify-content"}});function Wo(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Go(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 zl=K(()=>{"use strict"});function Jl(t,e){let r=[];for(let[n,i]of Object.entries(e.defaults)){let o=Wo(n),s=[];for(let[a,c]of Object.entries(i)){let l=Uo[a],f=Go(t,c.ref);s.push(` ${l}: var(${f});`)}s.length!==0&&r.push(`.vc-${o} {
|
|
139
|
+
${s.join(`
|
|
140
|
+
`)}
|
|
141
|
+
}`)}return r.join(`
|
|
142
|
+
|
|
143
|
+
`)}var Xm=K(()=>{"use strict";Gl();zl()});function Kl(t,e){let r=[];for(let[n,i]of Object.entries(e.variants)){let o=Wo(n);for(let[s,a]of Object.entries(i)){let c=[];for(let[l,f]of Object.entries(a)){let p=Uo[l],d=Go(t,f.ref);c.push(` ${p}: var(${d});`)}c.length!==0&&r.push(`.vc-${o}--${s} {
|
|
144
|
+
${c.join(`
|
|
145
|
+
`)}
|
|
146
|
+
}`)}}return r.join(`
|
|
147
|
+
|
|
148
|
+
`)}var Qm=K(()=>{"use strict";Gl();zl()});function Zm(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 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 zo(t,e,r,n){if(t.kind==="component"){let i=E$(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)zo(o,e,r,n);return}if(t.kind==="map"){zo(t.body,e,r,n);return}if(t.kind==="fragment"){for(let i of t.children)zo(i,e,r,n);return}t.kind}function gi(t,e){let r=[];for(let n of t)zo(n.root,e,n.source,r);if(r.length>0)throw new Error(`View variant validation failed:
|
|
149
|
+
${r.map(n=>` - ${n}`).join(`
|
|
150
|
+
`)}`)}var tg=K(()=>{"use strict"});function Yl(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(`
|
|
151
|
+
`),i=e.length>5?`
|
|
152
|
+
\u2026 and ${e.length-5} more`:"";return`${r}
|
|
153
|
+
${n}${i}`}function Xl(t,e){let r=Yl(t,C$);if(r.length!==0)throw new an(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 Ql(t,e){let r=Yl(t,P$),n=Yl(t,I$),i=[...r,...n];if(i.length!==0)throw new an(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 C$,P$,I$,Zl=K(()=>{"use strict";kr();C$=/\.vc-[a-z][\w-]*/g,P$=/(?:className\s*=\s*(?:"vc-[^"]*"|'vc-[^']*'|\{`[^`]*\bvc-[^`]*`\}|\{"vc-[^"]*"\}|\{'vc-[^']*'\})|["'`]vc-[a-z][\w-]*["'`])/g,I$=/\bextensionClassName\s*\(/g});import{readFile as ng,stat as R$}from"node:fs/promises";import{resolve as O$}from"node:path";async function ig(t){try{return await R$(t),!0}catch{return!1}}async function Er(t,e){let r=t.design?.extensionsCss;r&&await ig(r)&&Xl(await ng(r,"utf-8"),r);let n=fe(e);for(let i of["extensions.tsx","extensions.ts"]){let o=O$(n,"src/components",i);await ig(o)&&Ql(await ng(o,"utf-8"),o)}}var og=K(()=>{"use strict";ct();Zl()});async function A$(t){let e=await Fo(t);return Dl(e)}async function T$(t){let e=await Fo(t);return Ll(e)}async function un(t,e){let r=await A$(t),n=await T$(e);return Hl(r,n),{tokenIR:r,themeIR:n}}var Jo=K(()=>{"use strict";Vl();jl();ql();Bl();Ym();Xm();Qm();Vl();jl();ql();Bl();tg();Zl();og();Ko();kr()});import{readFile as N$,stat as M$}from"node:fs/promises";import{resolve as V$}from"node:path";async function L$(t){try{return await M$(t),!0}catch{return!1}}async function yi(t,e){let r=fe(e),{tokensPath:n,themePath:i}=Gt(t),{tokenIR:o,themeIR:s}=await un(n,i);await Er(t,e);let a=await Fm(V$($r(),"theme.css")),c=Wl(a),l=Jl(o,s),f=Kl(o,s),p=`${Ul(o)}
|
|
154
|
+
|
|
155
|
+
${c}`;l&&(p+=`
|
|
156
|
+
|
|
157
|
+
${l}`),p+=`
|
|
158
|
+
|
|
159
|
+
${f}`;let d=t.design?.extensionsCss;return d&&await L$(d)&&(p+=`
|
|
160
|
+
|
|
161
|
+
${await N$(d,"utf-8")}`),p}var Ko=K(()=>{"use strict";ct();Hm();qo();Jo()});var Le=b(We=>{"use strict";We.__esModule=!0;We.extend=sg;We.indexOf=H$;We.escapeExpression=B$;We.isEmpty=U$;We.createFrame=W$;We.blockParams=G$;We.appendContextPath=z$;var j$={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},D$=/[&<>"'`=]/g,q$=/[&<>"'`=]/;function F$(t){return j$[t]}function sg(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 tu=Object.prototype.toString;We.toString=tu;var eu=function(e){return typeof e=="function"};eu(/x/)&&(We.isFunction=eu=function(t){return typeof t=="function"&&tu.call(t)==="[object Function]"});We.isFunction=eu;var ag=Array.isArray||function(t){return t&&typeof t=="object"?tu.call(t)==="[object Array]":!1};We.isArray=ag;function H$(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function B$(t){if(typeof t!="string"){if(t&&t.toHTML)return t.toHTML();if(t==null)return"";if(!t)return t+"";t=""+t}return q$.test(t)?t.replace(D$,F$):t}function U$(t){return!t&&t!==0?!0:!!(ag(t)&&t.length===0)}function W$(t){var e=sg({},t);return e._parent=t,e}function G$(t,e){return t.path=e,t}function z$(t,e){return(t?t+".":"")+e}});var Ge=b((Yo,cg)=>{"use strict";Yo.__esModule=!0;var ru=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function nu(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<ru.length;c++)this[ru[c]]=a[ru[c]];Error.captureStackTrace&&Error.captureStackTrace(this,nu);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{}}nu.prototype=new Error;Yo.default=nu;cg.exports=Yo.default});var ug=b((Xo,lg)=>{"use strict";Xo.__esModule=!0;var iu=Le();Xo.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(iu.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=iu.createFrame(r.data);o.contextPath=iu.appendContextPath(r.data.contextPath,r.name),r={data:o}}return i(e,r)})};lg.exports=Xo.default});var fg=b((Qo,pg)=>{"use strict";Qo.__esModule=!0;function J$(t){return t&&t.__esModule?t:{default:t}}var vi=Le(),K$=Ge(),Y$=J$(K$);Qo.default=function(t){t.registerHelper("each",function(e,r){if(!r)throw new Y$.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=vi.appendContextPath(r.data.contextPath,r.ids[0])+"."),vi.isFunction(e)&&(e=e.call(this)),r.data&&(a=vi.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:vi.blockParams([e[g],g],[c+g,null])})}if(e&&typeof e=="object")if(vi.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})};pg.exports=Qo.default});var hg=b((Zo,dg)=>{"use strict";Zo.__esModule=!0;function X$(t){return t&&t.__esModule?t:{default:t}}var Q$=Ge(),Z$=X$(Q$);Zo.default=function(t){t.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new Z$.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};dg.exports=Zo.default});var vg=b((es,yg)=>{"use strict";es.__esModule=!0;function ek(t){return t&&t.__esModule?t:{default:t}}var mg=Le(),tk=Ge(),gg=ek(tk);es.default=function(t){t.registerHelper("if",function(e,r){if(arguments.length!=2)throw new gg.default("#if requires exactly one argument");return mg.isFunction(e)&&(e=e.call(this)),!r.hash.includeZero&&!e||mg.isEmpty(e)?r.inverse(this):r.fn(this)}),t.registerHelper("unless",function(e,r){if(arguments.length!=2)throw new gg.default("#unless requires exactly one argument");return t.helpers.if.call(this,e,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};yg.exports=es.default});var _g=b((ts,wg)=>{"use strict";ts.__esModule=!0;ts.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)})};wg.exports=ts.default});var Sg=b((rs,bg)=>{"use strict";rs.__esModule=!0;rs.default=function(t){t.registerHelper("lookup",function(e,r,n){return e&&n.lookupProperty(e,r)})};bg.exports=rs.default});var $g=b((ns,xg)=>{"use strict";ns.__esModule=!0;function rk(t){return t&&t.__esModule?t:{default:t}}var wi=Le(),nk=Ge(),ik=rk(nk);ns.default=function(t){t.registerHelper("with",function(e,r){if(arguments.length!=2)throw new ik.default("#with requires exactly one argument");wi.isFunction(e)&&(e=e.call(this));var n=r.fn;if(wi.isEmpty(e))return r.inverse(this);var i=r.data;return r.data&&r.ids&&(i=wi.createFrame(r.data),i.contextPath=wi.appendContextPath(r.data.contextPath,r.ids[0])),n(e,{data:i,blockParams:wi.blockParams([e],[i&&i.contextPath])})})};xg.exports=ns.default});var ou=b(is=>{"use strict";is.__esModule=!0;is.registerDefaultHelpers=wk;is.moveHelperToHooks=_k;function Cr(t){return t&&t.__esModule?t:{default:t}}var ok=ug(),sk=Cr(ok),ak=fg(),ck=Cr(ak),lk=hg(),uk=Cr(lk),pk=vg(),fk=Cr(pk),dk=_g(),hk=Cr(dk),mk=Sg(),gk=Cr(mk),yk=$g(),vk=Cr(yk);function wk(t){sk.default(t),ck.default(t),uk.default(t),fk.default(t),hk.default(t),gk.default(t),vk.default(t)}function _k(t,e,r){t.helpers[e]&&(t.hooks[e]=t.helpers[e],r||(t.helpers[e]=void 0))}});var Eg=b((os,kg)=>{"use strict";os.__esModule=!0;var bk=Le();os.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=bk.extend({},c,r.partials);var l=e(s,a);return n.partials=c,l}),r.partials[i.args[0]]=i.fn,o})};kg.exports=os.default});var Cg=b(su=>{"use strict";su.__esModule=!0;su.registerDefaultDecorators=kk;function Sk(t){return t&&t.__esModule?t:{default:t}}var xk=Eg(),$k=Sk(xk);function kk(t){$k.default(t)}});var au=b((ss,Pg)=>{"use strict";ss.__esModule=!0;var Ek=Le(),pn={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var r=Ek.indexOf(pn.methodMap,e.toLowerCase());r>=0?e=r:e=parseInt(e,10)}return e},log:function(e){if(e=pn.lookupLevel(e),typeof console<"u"&&pn.lookupLevel(pn.level)<=e){var r=pn.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)}}};ss.default=pn;Pg.exports=ss.default});var cu=b(_i=>{"use strict";_i.__esModule=!0;_i.createProtoAccessControl=Rk;_i.resultIsAllowed=Ok;_i.resetLoggedProperties=Tk;function Ck(t){return t&&t.__esModule?t:{default:t}}var Ig=Le(),Pk=au(),Ik=Ck(Pk),as=Object.create(null);function Rk(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 Ok(t,e,r){return Rg(typeof t=="function"?e.methods:e.properties,r)}function Rg(t,e){return t.whitelist[e]!==void 0?t.whitelist[e]===!0:t.defaultValue!==void 0?t.defaultValue:(Ak(e),!1)}function Ak(t){as[t]!==!0&&(as[t]=!0,Ik.default.log("error",'Handlebars: Access has been denied to resolve the property "'+t+`" because it is not an "own property" of its parent.
|
|
37
162
|
You can add a runtime option to disable the check or this warning:
|
|
38
|
-
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function
|
|
39
|
-
`),
|
|
40
|
-
`)}return u}else throw new Ot.default("The partial "+l.name+" could not be compiled when running in runtime-only mode")}var i={strict:function(a,l,u){if(!a||!(l in a))throw new Ot.default('"'+l+'" not defined in '+a,{loc:u});return i.lookupProperty(a,l)},lookupProperty:function(a,l){var u=a[l];if(u==null||Object.prototype.hasOwnProperty.call(a,l)||ym.resultIsAllowed(u,i.protoAccessControl,l))return u},lookup:function(a,l){for(var u=a.length,d=0;d<u;d++){var f=a[d]&&i.lookupProperty(a[d],l);if(f!=null)return f}},lambda:function(a,l){return typeof a=="function"?a.call(l):a},escapeExpression:Br.escapeExpression,invokePartial:n,fn:function(a){var l=t[a];return l.decorator=t[a+"_d"],l},programs:[],program:function(a,l,u,d,f){var h=this.programs[a],m=this.fn(a);return l||f||d||u?h=Vo(this,a,m,l,u,d,f):h||(h=this.programs[a]=Vo(this,a,m)),h},data:function(a,l){for(;a&&l--;)a=a._parent;return a},mergeIfNeeded:function(a,l){var u=a||l;return a&&l&&a!==l&&(u=Br.extend({},l,a)),u},nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:t.compiler};function o(s){var a=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],l=a.data;o._setup(a),!a.partial&&t.useData&&(l=r$(s,l));var u=void 0,d=t.useBlockParams?[]:void 0;t.useDepths&&(a.depths?u=s!=a.depths[0]?[s].concat(a.depths):a.depths:u=[s]);function f(h){return""+t.main(i,h,i.helpers,i.partials,l,d,u)}return f=wm(t.main,f,i,a.depths||[],l,d),f(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={};vm(a,e.helpers,i),vm(a,s.helpers,i),i.helpers=a,t.usePartial&&(i.partials=i.mergeIfNeeded(s.partials,e.partials)),(t.usePartial||t.useDecorators)&&(i.decorators=Br.extend({},e.decorators,s.decorators)),i.hooks={},i.protoAccessControl=ym.createProtoAccessControl(s);var l=s.allowCallsToHelperMissing||r;gm.moveHelperToHooks(i,"helperMissing",l),gm.moveHelperToHooks(i,"blockHelperMissing",l)}},o._child=function(s,a,l,u){if(t.useBlockParams&&!l)throw new Ot.default("must pass block params");if(t.useDepths&&!u)throw new Ot.default("must pass parent depths");return Vo(i,s,t[s],a,0,l,u)},o}function Vo(t,e,r,n,i,o,s){function a(l){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],d=s;return s&&l!=s[0]&&!(l===t.nullContext&&s[0]===null)&&(d=[l].concat(s)),r(t,l,t.helpers,t.partials,u.data||n,o&&[u.blockParams].concat(o),d)}return a=wm(r,a,t,s,n,o),a.program=e,a.depth=s?s.length:0,a.blockParams=i||0,a}function e$(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=Fo(r.partials,t)):r.name==="@partial-block"?t=Fo(r.data,"partial-block"):t=Fo(r.partials,r.name),t}function t$(t,e,r){var n=Fo(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!==_m&&(function(){r.data=At.createFrame(r.data);var o=r.fn;i=r.data["partial-block"]=function(a){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return l.data=At.createFrame(l.data),l.data["partial-block"]=n,o(a,l)},o.partials&&(r.partials=Br.extend({},r.partials,o.partials))})(),t===void 0&&i&&(t=i),t===void 0)throw new Ot.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}function _m(){return""}function Fo(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function r$(t,e){return(!e||!("root"in e))&&(e=e?At.createFrame(e):{},e.root=t),e}function wm(t,e,r,n,i,o){if(t.decorator){var s={};e=t.decorator(e,s,r,n&&n[0],i,o,n),Br.extend(e,s)}return e}function vm(t,e,r){e&&Object.keys(e).forEach(function(n){var i=e[n];t[n]=n$(i,r)})}function n$(t,e){var r=e.lookupProperty;return XE.wrapHelper(t,function(n){return n.lookupProperty=r,n})}});var wl=w((Ho,Sm)=>{"use strict";Ho.__esModule=!0;Ho.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}};Sm.exports=Ho.default});var Pm=w((Bo,xm)=>{"use strict";Bo.__esModule=!0;function Sl(t){return t&&t.__esModule?t:{default:t}}function El(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 i$=Do(),Em=El(i$),o$=hm(),s$=Sl(o$),a$=Fe(),c$=Sl(a$),l$=Te(),bl=El(l$),u$=bm(),$m=El(u$),f$=wl(),d$=Sl(f$);function Cm(){var t=new Em.HandlebarsEnvironment;return bl.extend(t,Em),t.SafeString=s$.default,t.Exception=c$.default,t.Utils=bl,t.escapeExpression=bl.escapeExpression,t.VM=$m,t.template=function(e){return $m.template(e,t)},t}var ei=Cm();ei.create=Cm;d$.default(ei);ei.default=ei;Bo.default=ei;xm.exports=Bo.default});var $l=w((Uo,Om)=>{"use strict";Uo.__esModule=!0;var km={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&&!km.helpers.scopedId(e)&&!e.depth}}};Uo.default=km;Om.exports=Uo.default});var Rm=w((Go,Am)=>{"use strict";Go.__esModule=!0;var p$=(function(){var t={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(i,o,s,a,l,u,d){var f=u.length-1;switch(l){case 1:return u[f-1];case 2:this.$=a.prepareProgram(u[f]);break;case 3:this.$=u[f];break;case 4:this.$=u[f];break;case 5:this.$=u[f];break;case 6:this.$=u[f];break;case 7:this.$=u[f];break;case 8:this.$=u[f];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(u[f]),strip:a.stripFlags(u[f],u[f]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:u[f],value:u[f],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(u[f-2],u[f-1],u[f],this._$);break;case 12:this.$={path:u[f-3],params:u[f-2],hash:u[f-1]};break;case 13:this.$=a.prepareBlock(u[f-3],u[f-2],u[f-1],u[f],!1,this._$);break;case 14:this.$=a.prepareBlock(u[f-3],u[f-2],u[f-1],u[f],!0,this._$);break;case 15:this.$={open:u[f-5],path:u[f-4],params:u[f-3],hash:u[f-2],blockParams:u[f-1],strip:a.stripFlags(u[f-5],u[f])};break;case 16:this.$={path:u[f-4],params:u[f-3],hash:u[f-2],blockParams:u[f-1],strip:a.stripFlags(u[f-5],u[f])};break;case 17:this.$={path:u[f-4],params:u[f-3],hash:u[f-2],blockParams:u[f-1],strip:a.stripFlags(u[f-5],u[f])};break;case 18:this.$={strip:a.stripFlags(u[f-1],u[f-1]),program:u[f]};break;case 19:var h=a.prepareBlock(u[f-2],u[f-1],u[f],u[f],!1,this._$),m=a.prepareProgram([h],u[f-1].loc);m.chained=!0,this.$={strip:u[f-2].strip,program:m,chain:!0};break;case 20:this.$=u[f];break;case 21:this.$={path:u[f-1],strip:a.stripFlags(u[f-2],u[f])};break;case 22:this.$=a.prepareMustache(u[f-3],u[f-2],u[f-1],u[f-4],a.stripFlags(u[f-4],u[f]),this._$);break;case 23:this.$=a.prepareMustache(u[f-3],u[f-2],u[f-1],u[f-4],a.stripFlags(u[f-4],u[f]),this._$);break;case 24:this.$={type:"PartialStatement",name:u[f-3],params:u[f-2],hash:u[f-1],indent:"",strip:a.stripFlags(u[f-4],u[f]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(u[f-2],u[f-1],u[f],this._$);break;case 26:this.$={path:u[f-3],params:u[f-2],hash:u[f-1],strip:a.stripFlags(u[f-4],u[f])};break;case 27:this.$=u[f];break;case 28:this.$=u[f];break;case 29:this.$={type:"SubExpression",path:u[f-3],params:u[f-2],hash:u[f-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:u[f],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(u[f-2]),value:u[f],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(u[f-1]);break;case 33:this.$=u[f];break;case 34:this.$=u[f];break;case 35:this.$={type:"StringLiteral",value:u[f],original:u[f],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(u[f]),original:Number(u[f]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:u[f]==="true",original:u[f]==="true",loc:a.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:a.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:a.locInfo(this._$)};break;case 40:this.$=u[f];break;case 41:this.$=u[f];break;case 42:this.$=a.preparePath(!0,u[f],this._$);break;case 43:this.$=a.preparePath(!1,u[f],this._$);break;case 44:u[f-2].push({part:a.id(u[f]),original:u[f],separator:u[f-1]}),this.$=u[f-2];break;case 45:this.$=[{part:a.id(u[f]),original:u[f]}];break;case 46:this.$=[];break;case 47:u[f-1].push(u[f]);break;case 48:this.$=[];break;case 49:u[f-1].push(u[f]);break;case 50:this.$=[];break;case 51:u[f-1].push(u[f]);break;case 58:this.$=[];break;case 59:u[f-1].push(u[f]);break;case 64:this.$=[];break;case 65:u[f-1].push(u[f]);break;case 70:this.$=[];break;case 71:u[f-1].push(u[f]);break;case 78:this.$=[];break;case 79:u[f-1].push(u[f]);break;case 82:this.$=[];break;case 83:u[f-1].push(u[f]);break;case 86:this.$=[];break;case 87:u[f-1].push(u[f]);break;case 90:this.$=[];break;case 91:u[f-1].push(u[f]);break;case 94:this.$=[];break;case 95:u[f-1].push(u[f]);break;case 98:this.$=[u[f]];break;case 99:u[f-1].push(u[f]);break;case 100:this.$=[u[f]];break;case 101:u[f-1].push(u[f]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(i,o){throw new Error(i)},parse:function(i){var o=this,s=[0],a=[null],l=[],u=this.table,d="",f=0,h=0,m=0,g=2,v=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 P=this.lexer.yylloc;l.push(P);var S=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function q(oe){s.length=s.length-2*oe,a.length=a.length-oe,l.length=l.length-oe}function B(){var oe;return oe=o.lexer.lex()||1,typeof oe!="number"&&(oe=o.symbols_[oe]||oe),oe}for(var j,L,Q,ne,Tt,et,be={},Ne,Ce,tt,rt;;){if(Q=s[s.length-1],this.defaultActions[Q]?ne=this.defaultActions[Q]:((j===null||typeof j>"u")&&(j=B()),ne=u[Q]&&u[Q][j]),typeof ne>"u"||!ne.length||!ne[0]){var vt="";if(!m){rt=[];for(Ne in u[Q])this.terminals_[Ne]&&Ne>2&&rt.push("'"+this.terminals_[Ne]+"'");this.lexer.showPosition?vt="Parse error on line "+(f+1)+`:
|
|
163
|
+
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function Tk(){Object.keys(as).forEach(function(t){delete as[t]})}});var ls=b(bt=>{"use strict";bt.__esModule=!0;bt.HandlebarsEnvironment=pu;function Og(t){return t&&t.__esModule?t:{default:t}}var Pr=Le(),Nk=Ge(),lu=Og(Nk),Mk=ou(),Vk=Cg(),Lk=au(),cs=Og(Lk),jk=cu(),Dk="4.7.9";bt.VERSION=Dk;var qk=8;bt.COMPILER_REVISION=qk;var Fk=7;bt.LAST_COMPATIBLE_COMPILER_REVISION=Fk;var Hk={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"};bt.REVISION_CHANGES=Hk;var uu="[object Object]";function pu(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},Mk.registerDefaultHelpers(this),Vk.registerDefaultDecorators(this)}pu.prototype={constructor:pu,logger:cs.default,log:cs.default.log,registerHelper:function(e,r){if(Pr.toString.call(e)===uu){if(r)throw new lu.default("Arg not supported with multiple helpers");Pr.extend(this.helpers,e)}else this.helpers[e]=r},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,r){if(Pr.toString.call(e)===uu)Pr.extend(this.partials,e);else{if(typeof r>"u")throw new lu.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(Pr.toString.call(e)===uu){if(r)throw new lu.default("Arg not supported with multiple decorators");Pr.extend(this.decorators,e)}else this.decorators[e]=r},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){jk.resetLoggedProperties()}};var Bk=cs.default.log;bt.log=Bk;bt.createFrame=Pr.createFrame;bt.logger=cs.default});var Tg=b((us,Ag)=>{"use strict";us.__esModule=!0;function fu(t){this.string=t}fu.prototype.toString=fu.prototype.toHTML=function(){return""+this.string};us.default=fu;Ag.exports=us.default});var Ng=b(du=>{"use strict";du.__esModule=!0;du.wrapHelper=Uk;function Uk(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 qg=b(tr=>{"use strict";tr.__esModule=!0;tr.checkRevision=Yk;tr.template=Xk;tr.wrapProgram=ps;tr.resolvePartial=Qk;tr.invokePartial=Zk;tr.noop=jg;function Wk(t){return t&&t.__esModule?t:{default:t}}function Gk(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 zk=Le(),fn=Gk(zk),Jk=Ge(),Dt=Wk(Jk),qt=ls(),Mg=ou(),Kk=Ng(),Vg=cu();function Yk(t){var e=t&&t[0]||1,r=qt.COMPILER_REVISION;if(!(e>=qt.LAST_COMPATIBLE_COMPILER_REVISION&&e<=qt.COMPILER_REVISION))if(e<qt.LAST_COMPATIBLE_COMPILER_REVISION){var n=qt.REVISION_CHANGES[r],i=qt.REVISION_CHANGES[e];throw new Dt.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 Dt.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 Xk(t,e){if(!e)throw new Dt.default("No environment passed to template");if(!t||!t.main)throw new Dt.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=fn.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(`
|
|
164
|
+
`),p=0,d=f.length;p<d&&!(!f[p]&&p+1===d);p++)f[p]=c.indent+f[p];l=f.join(`
|
|
165
|
+
`)}return l}else throw new Dt.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 Dt.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)||Vg.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:fn.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=ps(this,a,m,c,l,f,p):d||(d=this.programs[a]=ps(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=fn.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=eE(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=Dg(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={};Lg(a,e.helpers,i),Lg(a,s.helpers,i),i.helpers=a,t.usePartial&&(i.partials=i.mergeIfNeeded(s.partials,e.partials)),(t.usePartial||t.useDecorators)&&(i.decorators=fn.extend({},e.decorators,s.decorators)),i.hooks={},i.protoAccessControl=Vg.createProtoAccessControl(s);var c=s.allowCallsToHelperMissing||r;Mg.moveHelperToHooks(i,"helperMissing",c),Mg.moveHelperToHooks(i,"blockHelperMissing",c)}},o._child=function(s,a,c,l){if(t.useBlockParams&&!c)throw new Dt.default("must pass block params");if(t.useDepths&&!l)throw new Dt.default("must pass parent depths");return ps(i,s,t[s],a,0,c,l)},o}function ps(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=Dg(r,a,t,s,n,o),a.program=e,a.depth=s?s.length:0,a.blockParams=i||0,a}function Qk(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=fs(r.partials,t)):r.name==="@partial-block"?t=fs(r.data,"partial-block"):t=fs(r.partials,r.name),t}function Zk(t,e,r){var n=fs(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!==jg&&(function(){r.data=qt.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=qt.createFrame(c.data),c.data["partial-block"]=n,o(a,c)},o.partials&&(r.partials=fn.extend({},r.partials,o.partials))})(),t===void 0&&i&&(t=i),t===void 0)throw new Dt.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}function jg(){return""}function fs(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function eE(t,e){return(!e||!("root"in e))&&(e=e?qt.createFrame(e):{},e.root=t),e}function Dg(t,e,r,n,i,o){if(t.decorator){var s={};e=t.decorator(e,s,r,n&&n[0],i,o,n),fn.extend(e,s)}return e}function Lg(t,e,r){e&&Object.keys(e).forEach(function(n){var i=e[n];t[n]=tE(i,r)})}function tE(t,e){var r=e.lookupProperty;return Kk.wrapHelper(t,function(n){return n.lookupProperty=r,n})}});var hu=b((ds,Fg)=>{"use strict";ds.__esModule=!0;ds.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}};Fg.exports=ds.default});var Gg=b((hs,Wg)=>{"use strict";hs.__esModule=!0;function gu(t){return t&&t.__esModule?t:{default:t}}function yu(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var rE=ls(),Hg=yu(rE),nE=Tg(),iE=gu(nE),oE=Ge(),sE=gu(oE),aE=Le(),mu=yu(aE),cE=qg(),Bg=yu(cE),lE=hu(),uE=gu(lE);function Ug(){var t=new Hg.HandlebarsEnvironment;return mu.extend(t,Hg),t.SafeString=iE.default,t.Exception=sE.default,t.Utils=mu,t.escapeExpression=mu.escapeExpression,t.VM=Bg,t.template=function(e){return Bg.template(e,t)},t}var bi=Ug();bi.create=Ug;uE.default(bi);bi.default=bi;hs.default=bi;Wg.exports=hs.default});var vu=b((ms,Jg)=>{"use strict";ms.__esModule=!0;var zg={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&&!zg.helpers.scopedId(e)&&!e.depth}}};ms.default=zg;Jg.exports=ms.default});var Yg=b((gs,Kg)=>{"use strict";gs.__esModule=!0;var pE=(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 _=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 j(){var ce;return ce=o.lexer.lex()||1,typeof ce!="number"&&(ce=o.symbols_[ce]||ce),ce}for(var T,N,G,te,Bt,nt,ke={},je,Ie,it,ot;;){if(G=s[s.length-1],this.defaultActions[G]?te=this.defaultActions[G]:((T===null||typeof T>"u")&&(T=j()),te=l[G]&&l[G][T]),typeof te>"u"||!te.length||!te[0]){var kt="";if(!m){ot=[];for(je in l[G])this.terminals_[je]&&je>2&&ot.push("'"+this.terminals_[je]+"'");this.lexer.showPosition?kt="Parse error on line "+(p+1)+`:
|
|
41
166
|
`+this.lexer.showPosition()+`
|
|
42
|
-
Expecting `+
|
|
43
|
-
`+s+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,s,a,l,
|
|
44
|
-
`+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,l){function u(f,h){return s.yytext=s.yytext.substring(f,s.yyleng-h+f)}var d=l;switch(a){case 0:if(s.yytext.slice(-2)==="\\\\"?(u(0,1),this.begin("mu")):s.yytext.slice(-1)==="\\"?(u(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:(u(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(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=u(1,2).replace(/\\"/g,'"'),80;break;case 32:return s.yytext=u(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return 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})();Go.default=p$;Am.exports=Go.default});var Jo=w((Ko,Nm)=>{"use strict";Ko.__esModule=!0;function h$(t){return t&&t.__esModule?t:{default:t}}var m$=Fe(),Cl=h$(m$);function Wo(){this.parents=[]}Wo.prototype={constructor:Wo,mutating:!1,acceptKey:function(e,r){var n=this.accept(e[r]);if(this.mutating){if(n&&!Wo.prototype[n.type])throw new Cl.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 Cl.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 Cl.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:zo,Decorator:zo,BlockStatement:Im,DecoratorBlock:Im,PartialStatement:Tm,PartialBlockStatement:function(e){Tm.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:zo,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 zo(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function Im(t){zo.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function Tm(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}Ko.default=Wo;Nm.exports=Ko.default});var Lm=w((Yo,Mm)=>{"use strict";Yo.__esModule=!0;function g$(t){return t&&t.__esModule?t:{default:t}}var y$=Jo(),v$=g$(y$);function gt(){var t=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=t}gt.prototype=new v$.default;gt.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 l=xl(n,i,r),u=Pl(n,i,r),d=a.openStandalone&&l,f=a.closeStandalone&&u,h=a.inlineStandalone&&l&&u;a.close&&dr(n,i,!0),a.open&&Gt(n,i,!0),e&&h&&(dr(n,i),Gt(n,i)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(n[i-1].original)[1])),e&&d&&(dr((s.program||s.inverse).body),Gt(n,i)),e&&f&&(dr(n,i),Gt((s.inverse||s.program).body))}}return t};gt.prototype.BlockStatement=gt.prototype.DecoratorBlock=gt.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:Pl(e.body),closeStandalone:xl((n||e).body)};if(t.openStrip.close&&dr(e.body,null,!0),r){var s=t.inverseStrip;s.open&&Gt(e.body,null,!0),s.close&&dr(n.body,null,!0),t.closeStrip.open&&Gt(i.body,null,!0),!this.options.ignoreStandalone&&xl(e.body)&&Pl(n.body)&&(Gt(e.body),dr(n.body))}else t.closeStrip.open&&Gt(e.body,null,!0);return o};gt.prototype.Decorator=gt.prototype.MustacheStatement=function(t){return t.strip};gt.prototype.PartialStatement=gt.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function xl(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 Pl(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 dr(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 Gt(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}}Yo.default=gt;Mm.exports=Yo.default});var jm=w(Xe=>{"use strict";Xe.__esModule=!0;Xe.SourceLocation=b$;Xe.id=S$;Xe.stripFlags=E$;Xe.stripComment=$$;Xe.preparePath=C$;Xe.prepareMustache=x$;Xe.prepareRawBlock=P$;Xe.prepareBlock=k$;Xe.prepareProgram=O$;Xe.preparePartialBlock=A$;function _$(t){return t&&t.__esModule?t:{default:t}}var w$=Fe(),kl=_$(w$);function Ol(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new kl.default(t.path.original+" doesn't match "+e,r)}}function b$(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 S$(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function E$(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function $$(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function C$(t,e,r){r=this.locInfo(r);for(var n=t?"@":"",i=[],o=0,s=0,a=e.length;s<a;s++){var l=e[s].part,u=e[s].original!==l;if(n+=(e[s].separator||"")+l,!u&&(l===".."||l==="."||l==="this")){if(i.length>0)throw new kl.default("Invalid path: "+n,{loc:r});l===".."&&o++}else i.push(l)}return{type:"PathExpression",data:t,depth:o,parts:i,original:n,loc:r}}function x$(t,e,r,n,i,o){var s=n.charAt(3)||n.charAt(2),a=s!=="{"&&s!=="&",l=/\*/.test(n);return{type:l?"Decorator":"MustacheStatement",path:t,params:e,hash:r,escaped:a,strip:i,loc:this.locInfo(o)}}function P$(t,e,r,n){Ol(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 k$(t,e,r,n,i,o){n&&n.path&&Ol(t,n);var s=/\*/.test(t.open);e.blockParams=t.blockParams;var a=void 0,l=void 0;if(r){if(s)throw new kl.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),l=r.strip,a=r.program}return i&&(i=a,a=e,e=i),{type:s?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:a,openStrip:t.strip,inverseStrip:l,closeStrip:n&&n.strip,loc:this.locInfo(o)}}function O$(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 A$(t,e,r,n){return Ol(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 qm=w(ri=>{"use strict";ri.__esModule=!0;ri.parseWithoutProcessing=Dm;ri.parse=q$;function R$(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 Il(t){return t&&t.__esModule?t:{default:t}}var I$=Rm(),Al=Il(I$),T$=Lm(),N$=Il(T$),M$=jm(),L$=R$(M$),j$=Fe(),ti=Il(j$),D$=Te();ri.parser=Al.default;var Xo={};D$.extend(Xo,L$);function Dm(t,e){if(t.type==="Program")return V$(t),t;Al.default.yy=Xo,Xo.locInfo=function(n){return new Xo.SourceLocation(e&&e.srcName,n)};var r=Al.default.parse(t);return r}function q$(t,e){var r=Dm(t,e),n=new N$.default(e);return n.accept(r)}function V$(t){Rl(t)}function Rl(t){if(t!=null){if(Array.isArray(t)){t.forEach(Rl);return}if(typeof t=="object"){if(t.type==="PathExpression"){if(!F$(t.depth))throw new ti.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(t.parts))throw new ti.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 ti.default("Invalid AST: PathExpression.parts must only contain strings")}else if(t.type==="NumberLiteral"){if(typeof t.value!="number"||!isFinite(t.value))throw new ti.default("Invalid AST: NumberLiteral.value must be a number")}else if(t.type==="BooleanLiteral"&&typeof t.value!="boolean")throw new ti.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(t).forEach(function(r){r!=="loc"&&Rl(t[r])})}}}function F$(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0}});var Bm=w(si=>{"use strict";si.__esModule=!0;si.Compiler=Tl;si.precompile=G$;si.compile=W$;function Fm(t){return t&&t.__esModule?t:{default:t}}var H$=Fe(),ii=Fm(H$),oi=Te(),B$=$l(),ni=Fm(B$),U$=[].slice;function Tl(){}Tl.prototype={compiler:Tl,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||!Hm(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=oi.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 ii.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){Vm(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 ii.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){Vm(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 ii.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,ni.default.helpers.simpleId(o))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var r=e.parts[0],n=ni.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:U$.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var r=ni.default.helpers.simpleId(e.path),n=r&&!!this.blockParamIndex(e.path.parts[0]),i=!n&&ni.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&&!ni.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&&oi.indexOf(i,e);if(i&&o>=0)return[r,o]}}};function G$(t,e,r){if(t==null||typeof t!="string"&&t.type!=="Program")throw new ii.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 W$(t,e,r){if(e===void 0&&(e={}),t==null||typeof t!="string"&&t.type!=="Program")throw new ii.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=oi.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),l=new r.JavaScriptCompiler().compile(a,e,void 0,!0);return r.template(l)}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,l,u){return n||(n=i()),n._child(s,a,l,u)},o}function Hm(t,e){if(t===e)return!0;if(oi.isArray(t)&&oi.isArray(e)&&t.length===e.length){for(var r=0;r<t.length;r++)if(!Hm(t[r],e[r]))return!1;return!0}}function Vm(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 Gm=w(Nl=>{var Um="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Nl.encode=function(t){if(0<=t&&t<Um.length)return Um[t];throw new TypeError("Must be between 0 and 63: "+t)};Nl.decode=function(t){var e=65,r=90,n=97,i=122,o=48,s=57,a=43,l=47,u=26,d=52;return e<=t&&t<=r?t-e:n<=t&&t<=i?t-n+u:o<=t&&t<=s?t-o+d:t==a?62:t==l?63:-1}});var jl=w(Ll=>{var Wm=Gm(),Ml=5,zm=1<<Ml,Km=zm-1,Jm=zm;function z$(t){return t<0?(-t<<1)+1:(t<<1)+0}function K$(t){var e=(t&1)===1,r=t>>1;return e?-r:r}Ll.encode=function(e){var r="",n,i=z$(e);do n=i&Km,i>>>=Ml,i>0&&(n|=Jm),r+=Wm.encode(n);while(i>0);return r};Ll.decode=function(e,r,n){var i=e.length,o=0,s=0,a,l;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(l=Wm.decode(e.charCodeAt(r++)),l===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));a=!!(l&Jm),l&=Km,o=o+(l<<s),s+=Ml}while(a);n.value=K$(o),n.rest=r}});var Wr=w(Oe=>{function J$(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}Oe.getArg=J$;var Ym=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Y$=/^data:.+\,.+$/;function ai(t){var e=t.match(Ym);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Oe.urlParse=ai;function Ur(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}Oe.urlGenerate=Ur;function Dl(t){var e=t,r=ai(t);if(r){if(!r.path)return t;e=r.path}for(var n=Oe.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,Ur(r)):e}Oe.normalize=Dl;function Xm(t,e){t===""&&(t="."),e===""&&(e=".");var r=ai(e),n=ai(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Ur(r);if(r||e.match(Y$))return e;if(n&&!n.host&&!n.path)return n.host=e,Ur(n);var i=e.charAt(0)==="/"?e:Dl(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,Ur(n)):i}Oe.join=Xm;Oe.isAbsolute=function(t){return t.charAt(0)==="/"||Ym.test(t)};function X$(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)}Oe.relative=X$;var Qm=(function(){var t=Object.create(null);return!("__proto__"in t)})();function Zm(t){return t}function Q$(t){return eg(t)?"$"+t:t}Oe.toSetString=Qm?Zm:Q$;function Z$(t){return eg(t)?t.slice(1):t}Oe.fromSetString=Qm?Zm:Z$;function eg(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 eC(t,e,r){var n=Gr(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:Gr(t.name,e.name)}Oe.compareByOriginalPositions=eC;function tC(t,e,r){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0||r)||(n=Gr(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:Gr(t.name,e.name)}Oe.compareByGeneratedPositionsDeflated=tC;function Gr(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function rC(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=Gr(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:Gr(t.name,e.name)}Oe.compareByGeneratedPositionsInflated=rC;function nC(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Oe.parseSourceMapInput=nC;function iC(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=ai(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=Xm(Ur(n),e)}return Dl(e)}Oe.computeSourceURL=iC});var Fl=w(tg=>{var ql=Wr(),Vl=Object.prototype.hasOwnProperty,pr=typeof Map<"u";function Rt(){this._array=[],this._set=pr?new Map:Object.create(null)}Rt.fromArray=function(e,r){for(var n=new Rt,i=0,o=e.length;i<o;i++)n.add(e[i],r);return n};Rt.prototype.size=function(){return pr?this._set.size:Object.getOwnPropertyNames(this._set).length};Rt.prototype.add=function(e,r){var n=pr?e:ql.toSetString(e),i=pr?this.has(e):Vl.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)};Rt.prototype.has=function(e){if(pr)return this._set.has(e);var r=ql.toSetString(e);return Vl.call(this._set,r)};Rt.prototype.indexOf=function(e){if(pr){var r=this._set.get(e);if(r>=0)return r}else{var n=ql.toSetString(e);if(Vl.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};Rt.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Rt.prototype.toArray=function(){return this._array.slice()};tg.ArraySet=Rt});var ig=w(ng=>{var rg=Wr();function oC(t,e){var r=t.generatedLine,n=e.generatedLine,i=t.generatedColumn,o=e.generatedColumn;return n>r||n==r&&o>=i||rg.compareByGeneratedPositionsInflated(t,e)<=0}function Qo(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Qo.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};Qo.prototype.add=function(e){oC(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Qo.prototype.toArray=function(){return this._sorted||(this._array.sort(rg.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};ng.MappingList=Qo});var Hl=w(og=>{var ci=jl(),ve=Wr(),Zo=Fl().ArraySet,sC=ig().MappingList;function Qe(t){t||(t={}),this._file=ve.getArg(t,"file",null),this._sourceRoot=ve.getArg(t,"sourceRoot",null),this._skipValidation=ve.getArg(t,"skipValidation",!1),this._sources=new Zo,this._names=new Zo,this._mappings=new sC,this._sourcesContents=null}Qe.prototype._version=3;Qe.fromSourceMap=function(e){var r=e.sourceRoot,n=new Qe({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=ve.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=ve.relative(r,i)),n._sources.has(o)||n._sources.add(o);var s=e.sourceContentFor(i);s!=null&&n.setSourceContent(i,s)}),n};Qe.prototype.addMapping=function(e){var r=ve.getArg(e,"generated"),n=ve.getArg(e,"original",null),i=ve.getArg(e,"source",null),o=ve.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})};Qe.prototype.setSourceContent=function(e,r){var n=e;this._sourceRoot!=null&&(n=ve.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[ve.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[ve.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Qe.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=ve.relative(o,i));var s=new Zo,a=new Zo;this._mappings.unsortedForEach(function(l){if(l.source===i&&l.originalLine!=null){var u=e.originalPositionFor({line:l.originalLine,column:l.originalColumn});u.source!=null&&(l.source=u.source,n!=null&&(l.source=ve.join(n,l.source)),o!=null&&(l.source=ve.relative(o,l.source)),l.originalLine=u.line,l.originalColumn=u.column,u.name!=null&&(l.name=u.name))}var d=l.source;d!=null&&!s.has(d)&&s.add(d);var f=l.name;f!=null&&!a.has(f)&&a.add(f)},this),this._sources=s,this._names=a,e.sources.forEach(function(l){var u=e.sourceContentFor(l);u!=null&&(n!=null&&(l=ve.join(n,l)),o!=null&&(l=ve.relative(o,l)),this.setSourceContent(l,u))},this)};Qe.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}))}};Qe.prototype._serializeMappings=function(){for(var e=0,r=1,n=0,i=0,o=0,s=0,a="",l,u,d,f,h=this._mappings.toArray(),m=0,g=h.length;m<g;m++){if(u=h[m],l="",u.generatedLine!==r)for(e=0;u.generatedLine!==r;)l+=";",r++;else if(m>0){if(!ve.compareByGeneratedPositionsInflated(u,h[m-1]))continue;l+=","}l+=ci.encode(u.generatedColumn-e),e=u.generatedColumn,u.source!=null&&(f=this._sources.indexOf(u.source),l+=ci.encode(f-s),s=f,l+=ci.encode(u.originalLine-1-i),i=u.originalLine-1,l+=ci.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(d=this._names.indexOf(u.name),l+=ci.encode(d-o),o=d)),a+=l}return a};Qe.prototype._generateSourcesContent=function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=ve.relative(r,n));var i=ve.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};Qe.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};Qe.prototype.toString=function(){return JSON.stringify(this.toJSON())};og.SourceMapGenerator=Qe});var sg=w(hr=>{hr.GREATEST_LOWER_BOUND=1;hr.LEAST_UPPER_BOUND=2;function Bl(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?Bl(s,e,r,n,i,o):o==hr.LEAST_UPPER_BOUND?e<n.length?e:-1:s:s-t>1?Bl(t,s,r,n,i,o):o==hr.LEAST_UPPER_BOUND?s:t<0?-1:t}hr.search=function(e,r,n,i){if(r.length===0)return-1;var o=Bl(-1,r.length,e,r,n,i||hr.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&n(r[o],r[o-1],!0)===0;)--o;return o}});var cg=w(ag=>{function Ul(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function aC(t,e){return Math.round(t+Math.random()*(e-t))}function Gl(t,e,r,n){if(r<n){var i=aC(r,n),o=r-1;Ul(t,i,n);for(var s=t[n],a=r;a<n;a++)e(t[a],s)<=0&&(o+=1,Ul(t,o,a));Ul(t,o+1,a);var l=o+1;Gl(t,e,r,l-1),Gl(t,e,l+1,n)}}ag.quickSort=function(t,e){Gl(t,e,0,t.length-1)}});var ug=w(es=>{var M=Wr(),Wl=sg(),zr=Fl().ArraySet,cC=jl(),li=cg().quickSort;function de(t,e){var r=t;return typeof t=="string"&&(r=M.parseSourceMapInput(t)),r.sections!=null?new ut(r,e):new $e(r,e)}de.fromSourceMap=function(t,e){return $e.fromSourceMap(t,e)};de.prototype._version=3;de.prototype.__generatedMappings=null;Object.defineProperty(de.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});de.prototype.__originalMappings=null;Object.defineProperty(de.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});de.prototype._charIsMappingSeparator=function(e,r){var n=e.charAt(r);return n===";"||n===","};de.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};de.GENERATED_ORDER=1;de.ORIGINAL_ORDER=2;de.GREATEST_LOWER_BOUND=1;de.LEAST_UPPER_BOUND=2;de.prototype.eachMapping=function(e,r,n){var i=r||null,o=n||de.GENERATED_ORDER,s;switch(o){case de.GENERATED_ORDER:s=this._generatedMappings;break;case de.ORIGINAL_ORDER:s=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;s.map(function(l){var u=l.source===null?null:this._sources.at(l.source);return u=M.computeSourceURL(a,u,this._sourceMapURL),{source:u,generatedLine:l.generatedLine,generatedColumn:l.generatedColumn,originalLine:l.originalLine,originalColumn:l.originalColumn,name:l.name===null?null:this._names.at(l.name)}},this).forEach(e,i)};de.prototype.allGeneratedPositionsFor=function(e){var r=M.getArg(e,"line"),n={source:M.getArg(e,"source"),originalLine:r,originalColumn:M.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",M.compareByOriginalPositions,Wl.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:M.getArg(s,"generatedLine",null),column:M.getArg(s,"generatedColumn",null),lastColumn:M.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o];else for(var l=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==l;)i.push({line:M.getArg(s,"generatedLine",null),column:M.getArg(s,"generatedColumn",null),lastColumn:M.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o]}return i};es.SourceMapConsumer=de;function $e(t,e){var r=t;typeof t=="string"&&(r=M.parseSourceMapInput(t));var n=M.getArg(r,"version"),i=M.getArg(r,"sources"),o=M.getArg(r,"names",[]),s=M.getArg(r,"sourceRoot",null),a=M.getArg(r,"sourcesContent",null),l=M.getArg(r,"mappings"),u=M.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);s&&(s=M.normalize(s)),i=i.map(String).map(M.normalize).map(function(d){return s&&M.isAbsolute(s)&&M.isAbsolute(d)?M.relative(s,d):d}),this._names=zr.fromArray(o.map(String),!0),this._sources=zr.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(d){return M.computeSourceURL(s,d,e)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=l,this._sourceMapURL=e,this.file=u}$e.prototype=Object.create(de.prototype);$e.prototype.consumer=de;$e.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=M.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==t)return r;return-1};$e.fromSourceMap=function(e,r){var n=Object.create($e.prototype),i=n._names=zr.fromArray(e._names.toArray(),!0),o=n._sources=zr.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(m){return M.computeSourceURL(n.sourceRoot,m,r)});for(var s=e._mappings.toArray().slice(),a=n.__generatedMappings=[],l=n.__originalMappings=[],u=0,d=s.length;u<d;u++){var f=s[u],h=new lg;h.generatedLine=f.generatedLine,h.generatedColumn=f.generatedColumn,f.source&&(h.source=o.indexOf(f.source),h.originalLine=f.originalLine,h.originalColumn=f.originalColumn,f.name&&(h.name=i.indexOf(f.name)),l.push(h)),a.push(h)}return li(n.__originalMappings,M.compareByOriginalPositions),n};$e.prototype._version=3;Object.defineProperty($e.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function lg(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}$e.prototype._parseMappings=function(e,r){for(var n=1,i=0,o=0,s=0,a=0,l=0,u=e.length,d=0,f={},h={},m=[],g=[],v,P,S,q,B;d<u;)if(e.charAt(d)===";")n++,d++,i=0;else if(e.charAt(d)===",")d++;else{for(v=new lg,v.generatedLine=n,q=d;q<u&&!this._charIsMappingSeparator(e,q);q++);if(P=e.slice(d,q),S=f[P],S)d+=P.length;else{for(S=[];d<q;)cC.decode(e,d,h),B=h.value,d=h.rest,S.push(B);if(S.length===2)throw new Error("Found a source, but no line and column");if(S.length===3)throw new Error("Found a source and line, but no column");f[P]=S}v.generatedColumn=i+S[0],i=v.generatedColumn,S.length>1&&(v.source=a+S[1],a+=S[1],v.originalLine=o+S[2],o=v.originalLine,v.originalLine+=1,v.originalColumn=s+S[3],s=v.originalColumn,S.length>4&&(v.name=l+S[4],l+=S[4])),g.push(v),typeof v.originalLine=="number"&&m.push(v)}li(g,M.compareByGeneratedPositionsDeflated),this.__generatedMappings=g,li(m,M.compareByOriginalPositions),this.__originalMappings=m};$e.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 Wl.search(e,r,o,s)};$e.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}};$e.prototype.originalPositionFor=function(e){var r={generatedLine:M.getArg(e,"line"),generatedColumn:M.getArg(e,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",M.compareByGeneratedPositionsDeflated,M.getArg(e,"bias",de.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var o=M.getArg(i,"source",null);o!==null&&(o=this._sources.at(o),o=M.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var s=M.getArg(i,"name",null);return s!==null&&(s=this._names.at(s)),{source:o,line:M.getArg(i,"originalLine",null),column:M.getArg(i,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}};$e.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};$e.prototype.sourceContentFor=function(e,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var i=e;this.sourceRoot!=null&&(i=M.relative(this.sourceRoot,i));var o;if(this.sourceRoot!=null&&(o=M.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.')};$e.prototype.generatedPositionFor=function(e){var r=M.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:M.getArg(e,"line"),originalColumn:M.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",M.compareByOriginalPositions,M.getArg(e,"bias",de.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===n.source)return{line:M.getArg(o,"generatedLine",null),column:M.getArg(o,"generatedColumn",null),lastColumn:M.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};es.BasicSourceMapConsumer=$e;function ut(t,e){var r=t;typeof t=="string"&&(r=M.parseSourceMapInput(t));var n=M.getArg(r,"version"),i=M.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new zr,this._names=new zr;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=M.getArg(s,"offset"),l=M.getArg(a,"line"),u=M.getArg(a,"column");if(l<o.line||l===o.line&&u<o.column)throw new Error("Section offsets must be ordered and non-overlapping.");return o=a,{generatedOffset:{generatedLine:l+1,generatedColumn:u+1},consumer:new de(M.getArg(s,"map"),e)}})}ut.prototype=Object.create(de.prototype);ut.prototype.constructor=de;ut.prototype._version=3;Object.defineProperty(ut.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}});ut.prototype.originalPositionFor=function(e){var r={generatedLine:M.getArg(e,"line"),generatedColumn:M.getArg(e,"column")},n=Wl.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}};ut.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};ut.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.')};ut.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(M.getArg(e,"source"))!==-1){var i=n.consumer.generatedPositionFor(e);if(i){var 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}};ut.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],l=i.consumer._sources.at(a.source);l=M.computeSourceURL(i.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var u=null;a.name&&(u=i.consumer._names.at(a.name),this._names.add(u),u=this._names.indexOf(u));var d={source:l,generatedLine:a.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(i.generatedOffset.generatedLine===a.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:u};this.__generatedMappings.push(d),typeof d.originalLine=="number"&&this.__originalMappings.push(d)}li(this.__generatedMappings,M.compareByGeneratedPositionsDeflated),li(this.__originalMappings,M.compareByOriginalPositions)};es.IndexedSourceMapConsumer=ut});var dg=w(fg=>{var lC=Hl().SourceMapGenerator,ts=Wr(),uC=/(\r?\n)/,fC=10,Kr="$$$isSourceNode$$$";function He(t,e,r,n,i){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=r??null,this.name=i??null,this[Kr]=!0,n!=null&&this.add(n)}He.fromStringWithSourceMap=function(e,r,n){var i=new He,o=e.split(uC),s=0,a=function(){var h=g(),m=g()||"";return h+m;function g(){return s<o.length?o[s++]:void 0}},l=1,u=0,d=null;return r.eachMapping(function(h){if(d!==null)if(l<h.generatedLine)f(d,a()),l++,u=0;else{var m=o[s]||"",g=m.substr(0,h.generatedColumn-u);o[s]=m.substr(h.generatedColumn-u),u=h.generatedColumn,f(d,g),d=h;return}for(;l<h.generatedLine;)i.add(a()),l++;if(u<h.generatedColumn){var m=o[s]||"";i.add(m.substr(0,h.generatedColumn)),o[s]=m.substr(h.generatedColumn),u=h.generatedColumn}d=h},this),s<o.length&&(d&&f(d,a()),i.add(o.splice(s).join(""))),r.sources.forEach(function(h){var m=r.sourceContentFor(h);m!=null&&(n!=null&&(h=ts.join(n,h)),i.setSourceContent(h,m))}),i;function f(h,m){if(h===null||h.source===void 0)i.add(m);else{var g=n?ts.join(n,h.source):h.source;i.add(new He(h.originalLine,h.originalColumn,g,m,h.name))}}};He.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[Kr]||typeof e=="string")e&&this.children.push(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};He.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[Kr]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};He.prototype.walk=function(e){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[Kr]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};He.prototype.join=function(e){var r,n,i=this.children.length;if(i>0){for(r=[],n=0;n<i-1;n++)r.push(this.children[n]),r.push(e);r.push(this.children[n]),this.children=r}return this};He.prototype.replaceRight=function(e,r){var n=this.children[this.children.length-1];return n[Kr]?n.replaceRight(e,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(e,r):this.children.push("".replace(e,r)),this};He.prototype.setSourceContent=function(e,r){this.sourceContents[ts.toSetString(e)]=r};He.prototype.walkSourceContents=function(e){for(var r=0,n=this.children.length;r<n;r++)this.children[r][Kr]&&this.children[r].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)e(ts.fromSetString(i[r]),this.sourceContents[i[r]])};He.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};He.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},n=new lC(e),i=!1,o=null,s=null,a=null,l=null;return this.walk(function(u,d){r.code+=u,d.source!==null&&d.line!==null&&d.column!==null?((o!==d.source||s!==d.line||a!==d.column||l!==d.name)&&n.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:r.line,column:r.column},name:d.name}),o=d.source,s=d.line,a=d.column,l=d.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),o=null,i=!1);for(var f=0,h=u.length;f<h;f++)u.charCodeAt(f)===fC?(r.line++,r.column=0,f+1===h?(o=null,i=!1):i&&n.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:r.line,column:r.column},name:d.name})):r.column++}),this.walkSourceContents(function(u,d){n.setSourceContent(u,d)}),{code:r.code,map:n}};fg.SourceNode=He});var pg=w(rs=>{rs.SourceMapGenerator=Hl().SourceMapGenerator;rs.SourceMapConsumer=ug().SourceMapConsumer;rs.SourceNode=dg().SourceNode});var yg=w((ns,gg)=>{"use strict";ns.__esModule=!0;var Kl=Te(),mr=void 0;try{(typeof define!="function"||!define.amd)&&(hg=pg(),mr=hg.SourceNode)}catch{}var hg;mr||(mr=function(t,e,r,n){this.src="",n&&this.add(n)},mr.prototype={add:function(e){Kl.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){Kl.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function zl(t,e,r){if(Kl.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 mg(t){this.srcFile=t,this.source=[]}mg.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,r){this.source.unshift(this.wrap(e,r))},push:function(e,r){this.source.push(this.wrap(e,r))},merge:function(){var e=this.empty();return this.each(function(r){e.add([" ",r,`
|
|
45
|
-
`])}),e},each:function(e){for(var r=0,n=this.source.length;r<n;r++)e(this.source[r])},empty:function(){var e=this.currentLocation||{start:{}};return new
|
|
167
|
+
Expecting `+ot.join(", ")+", got '"+(this.terminals_[T]||T)+"'":kt="Parse error on line "+(p+1)+": Unexpected "+(T==1?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError(kt,{text:this.lexer.match,token:this.terminals_[T]||T,line:this.lexer.yylineno,loc:$,expected:ot})}}if(te[0]instanceof Array&&te.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+T);switch(te[0]){case 1:s.push(T),a.push(this.lexer.yytext),c.push(this.lexer.yylloc),s.push(te[1]),T=null,N?(T=N,N=null):(d=this.lexer.yyleng,f=this.lexer.yytext,p=this.lexer.yylineno,$=this.lexer.yylloc,m>0&&m--);break;case 2:if(Ie=this.productions_[te[1]][1],ke.$=a[a.length-Ie],ke._$={first_line:c[c.length-(Ie||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(Ie||1)].first_column,last_column:c[c.length-1].last_column},_&&(ke._$.range=[c[c.length-(Ie||1)].range[0],c[c.length-1].range[1]]),nt=this.performAction.call(ke,f,d,p,this.yy,te[1],a,c),typeof nt<"u")return nt;Ie&&(s=s.slice(0,-1*Ie*2),a=a.slice(0,-1*Ie),c=c.slice(0,-1*Ie)),s.push(this.productions_[te[1]][0]),a.push(ke.$),c.push(ke._$),it=l[s[s.length-2]][s[s.length-1]],s.push(it);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()+`
|
|
168
|
+
`+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.
|
|
169
|
+
`+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})();gs.default=pE;Kg.exports=gs.default});var _s=b((ws,Zg)=>{"use strict";ws.__esModule=!0;function fE(t){return t&&t.__esModule?t:{default:t}}var dE=Ge(),wu=fE(dE);function ys(){this.parents=[]}ys.prototype={constructor:ys,mutating:!1,acceptKey:function(e,r){var n=this.accept(e[r]);if(this.mutating){if(n&&!ys.prototype[n.type])throw new wu.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 wu.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 wu.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:vs,Decorator:vs,BlockStatement:Xg,DecoratorBlock:Xg,PartialStatement:Qg,PartialBlockStatement:function(e){Qg.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:vs,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 vs(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function Xg(t){vs.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function Qg(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}ws.default=ys;Zg.exports=ws.default});var ty=b((bs,ey)=>{"use strict";bs.__esModule=!0;function hE(t){return t&&t.__esModule?t:{default:t}}var mE=_s(),gE=hE(mE);function St(){var t=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=t}St.prototype=new gE.default;St.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=bu(n,i,r),f=a.openStandalone&&c,p=a.closeStandalone&&l,d=a.inlineStandalone&&c&&l;a.close&&Ir(n,i,!0),a.open&&rr(n,i,!0),e&&d&&(Ir(n,i),rr(n,i)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(n[i-1].original)[1])),e&&f&&(Ir((s.program||s.inverse).body),rr(n,i)),e&&p&&(Ir(n,i),rr((s.inverse||s.program).body))}}return t};St.prototype.BlockStatement=St.prototype.DecoratorBlock=St.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:bu(e.body),closeStandalone:_u((n||e).body)};if(t.openStrip.close&&Ir(e.body,null,!0),r){var s=t.inverseStrip;s.open&&rr(e.body,null,!0),s.close&&Ir(n.body,null,!0),t.closeStrip.open&&rr(i.body,null,!0),!this.options.ignoreStandalone&&_u(e.body)&&bu(n.body)&&(rr(e.body),Ir(n.body))}else t.closeStrip.open&&rr(e.body,null,!0);return o};St.prototype.Decorator=St.prototype.MustacheStatement=function(t){return t.strip};St.prototype.PartialStatement=St.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 bu(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 Ir(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 rr(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}}bs.default=St;ey.exports=bs.default});var ry=b(tt=>{"use strict";tt.__esModule=!0;tt.SourceLocation=wE;tt.id=_E;tt.stripFlags=bE;tt.stripComment=SE;tt.preparePath=xE;tt.prepareMustache=$E;tt.prepareRawBlock=kE;tt.prepareBlock=EE;tt.prepareProgram=CE;tt.preparePartialBlock=PE;function yE(t){return t&&t.__esModule?t:{default:t}}var vE=Ge(),Su=yE(vE);function xu(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new Su.default(t.path.original+" doesn't match "+e,r)}}function wE(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 _E(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function bE(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function SE(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function xE(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 Su.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 $E(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 kE(t,e,r,n){xu(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 EE(t,e,r,n,i,o){n&&n.path&&xu(t,n);var s=/\*/.test(t.open);e.blockParams=t.blockParams;var a=void 0,c=void 0;if(r){if(s)throw new Su.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 CE(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 PE(t,e,r,n){return xu(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 iy=b(xi=>{"use strict";xi.__esModule=!0;xi.parseWithoutProcessing=ny;xi.parse=LE;function IE(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 Eu(t){return t&&t.__esModule?t:{default:t}}var RE=Yg(),$u=Eu(RE),OE=ty(),AE=Eu(OE),TE=ry(),NE=IE(TE),ME=Ge(),Si=Eu(ME),VE=Le();xi.parser=$u.default;var Ss={};VE.extend(Ss,NE);function ny(t,e){if(t.type==="Program")return jE(t),t;$u.default.yy=Ss,Ss.locInfo=function(n){return new Ss.SourceLocation(e&&e.srcName,n)};var r=$u.default.parse(t);return r}function LE(t,e){var r=ny(t,e),n=new AE.default(e);return n.accept(r)}function jE(t){ku(t)}function ku(t){if(t!=null){if(Array.isArray(t)){t.forEach(ku);return}if(typeof t=="object"){if(t.type==="PathExpression"){if(!DE(t.depth))throw new Si.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(t.parts))throw new Si.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 Si.default("Invalid AST: PathExpression.parts must only contain strings")}else if(t.type==="NumberLiteral"){if(typeof t.value!="number"||!isFinite(t.value))throw new Si.default("Invalid AST: NumberLiteral.value must be a number")}else if(t.type==="BooleanLiteral"&&typeof t.value!="boolean")throw new Si.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(t).forEach(function(r){r!=="loc"&&ku(t[r])})}}}function DE(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0}});var cy=b(Ci=>{"use strict";Ci.__esModule=!0;Ci.Compiler=Cu;Ci.precompile=BE;Ci.compile=UE;function sy(t){return t&&t.__esModule?t:{default:t}}var qE=Ge(),ki=sy(qE),Ei=Le(),FE=vu(),$i=sy(FE),HE=[].slice;function Cu(){}Cu.prototype={compiler:Cu,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||!ay(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=Ei.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 ki.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){oy(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 ki.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){oy(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 ki.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,$i.default.helpers.simpleId(o))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var r=e.parts[0],n=$i.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:HE.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var r=$i.default.helpers.simpleId(e.path),n=r&&!!this.blockParamIndex(e.path.parts[0]),i=!n&&$i.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&&!$i.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&&Ei.indexOf(i,e);if(i&&o>=0)return[r,o]}}};function BE(t,e,r){if(t==null||typeof t!="string"&&t.type!=="Program")throw new ki.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 UE(t,e,r){if(e===void 0&&(e={}),t==null||typeof t!="string"&&t.type!=="Program")throw new ki.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=Ei.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 ay(t,e){if(t===e)return!0;if(Ei.isArray(t)&&Ei.isArray(e)&&t.length===e.length){for(var r=0;r<t.length;r++)if(!ay(t[r],e[r]))return!1;return!0}}function oy(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 uy=b(Pu=>{var ly="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Pu.encode=function(t){if(0<=t&&t<ly.length)return ly[t];throw new TypeError("Must be between 0 and 63: "+t)};Pu.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 Ou=b(Ru=>{var py=uy(),Iu=5,fy=1<<Iu,dy=fy-1,hy=fy;function WE(t){return t<0?(-t<<1)+1:(t<<1)+0}function GE(t){var e=(t&1)===1,r=t>>1;return e?-r:r}Ru.encode=function(e){var r="",n,i=WE(e);do n=i&dy,i>>>=Iu,i>0&&(n|=hy),r+=py.encode(n);while(i>0);return r};Ru.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=py.decode(e.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));a=!!(c&hy),c&=dy,o=o+(c<<s),s+=Iu}while(a);n.value=GE(o),n.rest=r}});var mn=b(Te=>{function zE(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}Te.getArg=zE;var my=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,JE=/^data:.+\,.+$/;function Pi(t){var e=t.match(my);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Te.urlParse=Pi;function dn(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}Te.urlGenerate=dn;function Au(t){var e=t,r=Pi(t);if(r){if(!r.path)return t;e=r.path}for(var n=Te.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,dn(r)):e}Te.normalize=Au;function gy(t,e){t===""&&(t="."),e===""&&(e=".");var r=Pi(e),n=Pi(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),dn(r);if(r||e.match(JE))return e;if(n&&!n.host&&!n.path)return n.host=e,dn(n);var i=e.charAt(0)==="/"?e:Au(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,dn(n)):i}Te.join=gy;Te.isAbsolute=function(t){return t.charAt(0)==="/"||my.test(t)};function KE(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)}Te.relative=KE;var yy=(function(){var t=Object.create(null);return!("__proto__"in t)})();function vy(t){return t}function YE(t){return wy(t)?"$"+t:t}Te.toSetString=yy?vy:YE;function XE(t){return wy(t)?t.slice(1):t}Te.fromSetString=yy?vy:XE;function wy(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 QE(t,e,r){var n=hn(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:hn(t.name,e.name)}Te.compareByOriginalPositions=QE;function ZE(t,e,r){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0||r)||(n=hn(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:hn(t.name,e.name)}Te.compareByGeneratedPositionsDeflated=ZE;function hn(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function eC(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=hn(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:hn(t.name,e.name)}Te.compareByGeneratedPositionsInflated=eC;function tC(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Te.parseSourceMapInput=tC;function rC(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=Pi(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=gy(dn(n),e)}return Au(e)}Te.computeSourceURL=rC});var Mu=b(_y=>{var Tu=mn(),Nu=Object.prototype.hasOwnProperty,Rr=typeof Map<"u";function Ft(){this._array=[],this._set=Rr?new Map:Object.create(null)}Ft.fromArray=function(e,r){for(var n=new Ft,i=0,o=e.length;i<o;i++)n.add(e[i],r);return n};Ft.prototype.size=function(){return Rr?this._set.size:Object.getOwnPropertyNames(this._set).length};Ft.prototype.add=function(e,r){var n=Rr?e:Tu.toSetString(e),i=Rr?this.has(e):Nu.call(this._set,n),o=this._array.length;(!i||r)&&this._array.push(e),i||(Rr?this._set.set(e,o):this._set[n]=o)};Ft.prototype.has=function(e){if(Rr)return this._set.has(e);var r=Tu.toSetString(e);return Nu.call(this._set,r)};Ft.prototype.indexOf=function(e){if(Rr){var r=this._set.get(e);if(r>=0)return r}else{var n=Tu.toSetString(e);if(Nu.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};Ft.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Ft.prototype.toArray=function(){return this._array.slice()};_y.ArraySet=Ft});var xy=b(Sy=>{var by=mn();function nC(t,e){var r=t.generatedLine,n=e.generatedLine,i=t.generatedColumn,o=e.generatedColumn;return n>r||n==r&&o>=i||by.compareByGeneratedPositionsInflated(t,e)<=0}function xs(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}xs.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};xs.prototype.add=function(e){nC(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};xs.prototype.toArray=function(){return this._sorted||(this._array.sort(by.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Sy.MappingList=xs});var Vu=b($y=>{var Ii=Ou(),Se=mn(),$s=Mu().ArraySet,iC=xy().MappingList;function rt(t){t||(t={}),this._file=Se.getArg(t,"file",null),this._sourceRoot=Se.getArg(t,"sourceRoot",null),this._skipValidation=Se.getArg(t,"skipValidation",!1),this._sources=new $s,this._names=new $s,this._mappings=new iC,this._sourcesContents=null}rt.prototype._version=3;rt.fromSourceMap=function(e){var r=e.sourceRoot,n=new rt({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=Se.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=Se.relative(r,i)),n._sources.has(o)||n._sources.add(o);var s=e.sourceContentFor(i);s!=null&&n.setSourceContent(i,s)}),n};rt.prototype.addMapping=function(e){var r=Se.getArg(e,"generated"),n=Se.getArg(e,"original",null),i=Se.getArg(e,"source",null),o=Se.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})};rt.prototype.setSourceContent=function(e,r){var n=e;this._sourceRoot!=null&&(n=Se.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Se.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Se.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};rt.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=Se.relative(o,i));var s=new $s,a=new $s;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=Se.join(n,c.source)),o!=null&&(c.source=Se.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=Se.join(n,c)),o!=null&&(c=Se.relative(o,c)),this.setSourceContent(c,l))},this)};rt.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}))}};rt.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(!Se.compareByGeneratedPositionsInflated(l,d[m-1]))continue;c+=","}c+=Ii.encode(l.generatedColumn-e),e=l.generatedColumn,l.source!=null&&(p=this._sources.indexOf(l.source),c+=Ii.encode(p-s),s=p,c+=Ii.encode(l.originalLine-1-i),i=l.originalLine-1,c+=Ii.encode(l.originalColumn-n),n=l.originalColumn,l.name!=null&&(f=this._names.indexOf(l.name),c+=Ii.encode(f-o),o=f)),a+=c}return a};rt.prototype._generateSourcesContent=function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Se.relative(r,n));var i=Se.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};rt.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};rt.prototype.toString=function(){return JSON.stringify(this.toJSON())};$y.SourceMapGenerator=rt});var ky=b(Or=>{Or.GREATEST_LOWER_BOUND=1;Or.LEAST_UPPER_BOUND=2;function Lu(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?Lu(s,e,r,n,i,o):o==Or.LEAST_UPPER_BOUND?e<n.length?e:-1:s:s-t>1?Lu(t,s,r,n,i,o):o==Or.LEAST_UPPER_BOUND?s:t<0?-1:t}Or.search=function(e,r,n,i){if(r.length===0)return-1;var o=Lu(-1,r.length,e,r,n,i||Or.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=b(Ey=>{function ju(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function oC(t,e){return Math.round(t+Math.random()*(e-t))}function Du(t,e,r,n){if(r<n){var i=oC(r,n),o=r-1;ju(t,i,n);for(var s=t[n],a=r;a<n;a++)e(t[a],s)<=0&&(o+=1,ju(t,o,a));ju(t,o+1,a);var c=o+1;Du(t,e,r,c-1),Du(t,e,c+1,n)}}Ey.quickSort=function(t,e){Du(t,e,0,t.length-1)}});var Iy=b(ks=>{var D=mn(),qu=ky(),gn=Mu().ArraySet,sC=Ou(),Ri=Cy().quickSort;function me(t,e){var r=t;return typeof t=="string"&&(r=D.parseSourceMapInput(t)),r.sections!=null?new ht(r,e):new Pe(r,e)}me.fromSourceMap=function(t,e){return Pe.fromSourceMap(t,e)};me.prototype._version=3;me.prototype.__generatedMappings=null;Object.defineProperty(me.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});me.prototype.__originalMappings=null;Object.defineProperty(me.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});me.prototype._charIsMappingSeparator=function(e,r){var n=e.charAt(r);return n===";"||n===","};me.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};me.GENERATED_ORDER=1;me.ORIGINAL_ORDER=2;me.GREATEST_LOWER_BOUND=1;me.LEAST_UPPER_BOUND=2;me.prototype.eachMapping=function(e,r,n){var i=r||null,o=n||me.GENERATED_ORDER,s;switch(o){case me.GENERATED_ORDER:s=this._generatedMappings;break;case me.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=D.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)};me.prototype.allGeneratedPositionsFor=function(e){var r=D.getArg(e,"line"),n={source:D.getArg(e,"source"),originalLine:r,originalColumn:D.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",D.compareByOriginalPositions,qu.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:D.getArg(s,"generatedLine",null),column:D.getArg(s,"generatedColumn",null),lastColumn:D.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o];else for(var c=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==c;)i.push({line:D.getArg(s,"generatedLine",null),column:D.getArg(s,"generatedColumn",null),lastColumn:D.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o]}return i};ks.SourceMapConsumer=me;function Pe(t,e){var r=t;typeof t=="string"&&(r=D.parseSourceMapInput(t));var n=D.getArg(r,"version"),i=D.getArg(r,"sources"),o=D.getArg(r,"names",[]),s=D.getArg(r,"sourceRoot",null),a=D.getArg(r,"sourcesContent",null),c=D.getArg(r,"mappings"),l=D.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);s&&(s=D.normalize(s)),i=i.map(String).map(D.normalize).map(function(f){return s&&D.isAbsolute(s)&&D.isAbsolute(f)?D.relative(s,f):f}),this._names=gn.fromArray(o.map(String),!0),this._sources=gn.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(f){return D.computeSourceURL(s,f,e)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=e,this.file=l}Pe.prototype=Object.create(me.prototype);Pe.prototype.consumer=me;Pe.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=D.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};Pe.fromSourceMap=function(e,r){var n=Object.create(Pe.prototype),i=n._names=gn.fromArray(e._names.toArray(),!0),o=n._sources=gn.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 D.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 Py;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 Ri(n.__originalMappings,D.compareByOriginalPositions),n};Pe.prototype._version=3;Object.defineProperty(Pe.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Py(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Pe.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,$,_,M,j;f<l;)if(e.charAt(f)===";")n++,f++,i=0;else if(e.charAt(f)===",")f++;else{for(y=new Py,y.generatedLine=n,M=f;M<l&&!this._charIsMappingSeparator(e,M);M++);if($=e.slice(f,M),_=p[$],_)f+=$.length;else{for(_=[];f<M;)sC.decode(e,f,d),j=d.value,f=d.rest,_.push(j);if(_.length===2)throw new Error("Found a source, but no line and column");if(_.length===3)throw new Error("Found a source and line, but no column");p[$]=_}y.generatedColumn=i+_[0],i=y.generatedColumn,_.length>1&&(y.source=a+_[1],a+=_[1],y.originalLine=o+_[2],o=y.originalLine,y.originalLine+=1,y.originalColumn=s+_[3],s=y.originalColumn,_.length>4&&(y.name=c+_[4],c+=_[4])),g.push(y),typeof y.originalLine=="number"&&m.push(y)}Ri(g,D.compareByGeneratedPositionsDeflated),this.__generatedMappings=g,Ri(m,D.compareByOriginalPositions),this.__originalMappings=m};Pe.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 qu.search(e,r,o,s)};Pe.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}};Pe.prototype.originalPositionFor=function(e){var r={generatedLine:D.getArg(e,"line"),generatedColumn:D.getArg(e,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",D.compareByGeneratedPositionsDeflated,D.getArg(e,"bias",me.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var o=D.getArg(i,"source",null);o!==null&&(o=this._sources.at(o),o=D.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var s=D.getArg(i,"name",null);return s!==null&&(s=this._names.at(s)),{source:o,line:D.getArg(i,"originalLine",null),column:D.getArg(i,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}};Pe.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};Pe.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=D.relative(this.sourceRoot,i));var o;if(this.sourceRoot!=null&&(o=D.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.')};Pe.prototype.generatedPositionFor=function(e){var r=D.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:D.getArg(e,"line"),originalColumn:D.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",D.compareByOriginalPositions,D.getArg(e,"bias",me.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===n.source)return{line:D.getArg(o,"generatedLine",null),column:D.getArg(o,"generatedColumn",null),lastColumn:D.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};ks.BasicSourceMapConsumer=Pe;function ht(t,e){var r=t;typeof t=="string"&&(r=D.parseSourceMapInput(t));var n=D.getArg(r,"version"),i=D.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new gn,this._names=new gn;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=D.getArg(s,"offset"),c=D.getArg(a,"line"),l=D.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 me(D.getArg(s,"map"),e)}})}ht.prototype=Object.create(me.prototype);ht.prototype.constructor=me;ht.prototype._version=3;Object.defineProperty(ht.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}});ht.prototype.originalPositionFor=function(e){var r={generatedLine:D.getArg(e,"line"),generatedColumn:D.getArg(e,"column")},n=qu.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}};ht.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};ht.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.')};ht.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(D.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}};ht.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=D.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)}Ri(this.__generatedMappings,D.compareByGeneratedPositionsDeflated),Ri(this.__originalMappings,D.compareByOriginalPositions)};ks.IndexedSourceMapConsumer=ht});var Oy=b(Ry=>{var aC=Vu().SourceMapGenerator,Es=mn(),cC=/(\r?\n)/,lC=10,yn="$$$isSourceNode$$$";function ze(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[yn]=!0,n!=null&&this.add(n)}ze.fromStringWithSourceMap=function(e,r,n){var i=new ze,o=e.split(cC),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=Es.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?Es.join(n,d.source):d.source;i.add(new ze(d.originalLine,d.originalColumn,g,m,d.name))}}};ze.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[yn]||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};ze.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[yn]||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};ze.prototype.walk=function(e){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[yn]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};ze.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};ze.prototype.replaceRight=function(e,r){var n=this.children[this.children.length-1];return n[yn]?n.replaceRight(e,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(e,r):this.children.push("".replace(e,r)),this};ze.prototype.setSourceContent=function(e,r){this.sourceContents[Es.toSetString(e)]=r};ze.prototype.walkSourceContents=function(e){for(var r=0,n=this.children.length;r<n;r++)this.children[r][yn]&&this.children[r].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)e(Es.fromSetString(i[r]),this.sourceContents[i[r]])};ze.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};ze.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},n=new aC(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)===lC?(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}};Ry.SourceNode=ze});var Ay=b(Cs=>{Cs.SourceMapGenerator=Vu().SourceMapGenerator;Cs.SourceMapConsumer=Iy().SourceMapConsumer;Cs.SourceNode=Oy().SourceNode});var Vy=b((Ps,My)=>{"use strict";Ps.__esModule=!0;var Hu=Le(),Ar=void 0;try{(typeof define!="function"||!define.amd)&&(Ty=Ay(),Ar=Ty.SourceNode)}catch{}var Ty;Ar||(Ar=function(t,e,r,n){this.src="",n&&this.add(n)},Ar.prototype={add:function(e){Hu.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){Hu.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function Fu(t,e,r){if(Hu.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 Ny(t){this.srcFile=t,this.source=[]}Ny.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,`
|
|
170
|
+
`])}),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 Ar(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 Ar?e:(e=Fu(e,this,r),new Ar(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=Fu(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(Fu(e[n],this));return r},generateArray:function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r}};Ps.default=Ny;My.exports=Ps.default});var Fy=b((Is,qy)=>{"use strict";Is.__esModule=!0;function Dy(t){return t&&t.__esModule?t:{default:t}}var Ly=ls(),uC=Ge(),Bu=Dy(uC),pC=Le(),fC=Vy(),jy=Dy(fC);function vn(t){this.value=t}function wn(){}wn.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=Ly.COMPILER_REVISION,r=Ly.REVISION_CHANGES[e];return[e,r]},appendToBuffer:function(e,r,n){return pC.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 Bu.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(),`;
|
|
46
171
|
`]),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) {
|
|
47
172
|
`),this.decorators.push(`}
|
|
48
|
-
`),this.decorators=this.decorators.merge()));var
|
|
49
|
-
`,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(
|
|
173
|
+
`),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 jy.default(this.options.srcName),this.decorators=new jy.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(","),`) {
|
|
174
|
+
`,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?"":`;
|
|
50
175
|
`)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
|
|
51
176
|
lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
52
177
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -54,13 +179,81 @@ Expecting `+rt.join(", ")+", got '"+(this.terminals_[j]||j)+"'":vt="Parse error
|
|
|
54
179
|
}
|
|
55
180
|
return undefined
|
|
56
181
|
}
|
|
57
|
-
`.trim()},blockValue:function(e){var r=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var i=this.popStack();n.splice(1,0,i),this.push(this.source.functionCall(r,"call",n))},ambiguousBlockValue:function(){var e=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs("",0,r,!0),this.flushInline();var n=this.topStack();r.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(e,"call",r),"}"])},appendContent:function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},append:function(){if(this.isInline())this.replaceStack(function(r){return[" != null ? ",r,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(e){this.lastContext=e},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(e,r,n,i){var 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(mC(this.options.strict&&o,this,r,n,e));return}for(var a=r.length,l=function(d){s.replaceStack(function(f){var h=s.nameLookup(f,r[d],e);return i?[" && ",h]:[" != null ? ",h," : ",f]})},u=n;u<a;u++)l(u)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(e,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof e=="string"?this.pushString(e):this.pushStackLiteral(e))},emptyHash:function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},registerDecorator:function(e,r){var n=this.nameLookup("decorators",r,"decorator"),i=this.setupHelperArgs(r,e);this.decorators.push(["var decorator = ",n,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+r+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",i])," || fn;"])},invokeHelper:function(e,r,n){var i=this.popStack(),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,"||"),")"],l=this.source.functionCall(a,"call",o.callParams);this.push(l)},itemsSeparatedBy:function(e,r){var n=[];n.push(e[0]);for(var i=1;i<e.length;i++)n.push(r,e[i]);return n},invokeKnownHelper:function(e,r){var n=this.setupHelper(e,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(e,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var i=this.setupHelper(0,e,r),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:Yr,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 l=this.matchExistingProgram(i);if(l==null){var u=this.context.programs.push("")-1;i.index=u,i.name="program"+u,this.context.programs[u]=o.compile(i,r,this.context,!this.precompile),this.context.decorators[u]=o.decorators,this.context.environments[u]=i,this.useDepths=this.useDepths||o.useDepths,this.useBlockParams=this.useBlockParams||o.useBlockParams,i.useDepths=this.useDepths,i.useBlockParams=this.useBlockParams}else i.index=l.index,i.name="program"+l.index,this.useDepths=this.useDepths||l.useDepths,this.useBlockParams=this.useBlockParams||l.useBlockParams}},matchExistingProgram:function(e){for(var 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 Jr||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new Jr(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 Jl.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof Jr)n=[s.value],r=["(",n],o=!0;else{i=!0;var a=this.incrStack();r=["((",this.push(a)," = ",s,")"],n=this.topStack()}var l=e.call(this,n);o||this.popStack(),i&&this.stackSlot--,this.push(r.concat(l,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var e=this.inlineStack;this.inlineStack=[];for(var r=0,n=e.length;r<n;r++){var i=e[r];if(i instanceof Jr)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 Jr)return n.value;if(!r){if(!this.stackSlot)throw new Jl.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 Jr?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=[],l=!n,u=void 0;l&&(n=[]),i.name=this.quotedString(e),i.hash=this.popStack(),this.trackIds&&(i.hashIds=this.popStack()),this.stringParams&&(i.hashTypes=this.popStack(),i.hashContexts=this.popStack());var d=this.popStack(),f=this.popStack();(f||d)&&(i.fn=f||"container.noop",i.inverse=d||"container.noop");for(var h=r;h--;)u=this.popStack(),n[h]=u,this.trackIds&&(a[h]=this.popStack()),this.stringParams&&(s[h]=this.popStack(),o[h]=this.popStack());return l&&(i.args=this.source.generateArray(n)),this.trackIds&&(i.ids=this.source.generateArray(a)),this.stringParams&&(i.types=this.source.generateArray(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=Yr.RESERVED_WORDS={},r=0,n=t.length;r<n;r++)e[t[r]]=!0})();Yr.isValidJavaScriptVariableName=function(t){return!Yr.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)};function mC(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}is.default=Yr;bg.exports=is.default});var Cg=w((os,$g)=>{"use strict";os.__esModule=!0;function ui(t){return t&&t.__esModule?t:{default:t}}var gC=Pm(),yC=ui(gC),vC=$l(),_C=ui(vC),Yl=qm(),Xl=Bm(),wC=Sg(),bC=ui(wC),SC=Jo(),EC=ui(SC),$C=wl(),CC=ui($C),xC=yC.default.create;function Eg(){var t=xC();return t.compile=function(e,r){return Xl.compile(e,r,t)},t.precompile=function(e,r){return Xl.precompile(e,r,t)},t.AST=_C.default,t.Compiler=Xl.Compiler,t.JavaScriptCompiler=bC.default,t.Parser=Yl.parser,t.parse=Yl.parse,t.parseWithoutProcessing=Yl.parseWithoutProcessing,t}var Xr=Eg();Xr.create=Eg;CC.default(Xr);Xr.Visitor=EC.default;Xr.default=Xr;os.default=Xr;$g.exports=os.default});var xg=w(ss=>{"use strict";ss.__esModule=!0;ss.print=AC;ss.PrintVisitor=ge;function PC(t){return t&&t.__esModule?t:{default:t}}var kC=Jo(),OC=PC(kC);function AC(t){return new ge().accept(t)}function ge(){this.padding=0}ge.prototype=new OC.default;ge.prototype.pad=function(t){for(var e="",r=0,n=this.padding;r<n;r++)e+=" ";return e+=t+`
|
|
58
|
-
`,e};
|
|
182
|
+
`.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(dC(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:wn,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 vn||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new vn(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 Bu.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof vn)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 vn)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 vn)return n.value;if(!r){if(!this.stackSlot)throw new Bu.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 vn?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=wn.RESERVED_WORDS={},r=0,n=t.length;r<n;r++)e[t[r]]=!0})();wn.isValidJavaScriptVariableName=function(t){return!wn.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)};function dC(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}Is.default=wn;qy.exports=Is.default});var Uy=b((Rs,By)=>{"use strict";Rs.__esModule=!0;function Oi(t){return t&&t.__esModule?t:{default:t}}var hC=Gg(),mC=Oi(hC),gC=vu(),yC=Oi(gC),Uu=iy(),Wu=cy(),vC=Fy(),wC=Oi(vC),_C=_s(),bC=Oi(_C),SC=hu(),xC=Oi(SC),$C=mC.default.create;function Hy(){var t=$C();return t.compile=function(e,r){return Wu.compile(e,r,t)},t.precompile=function(e,r){return Wu.precompile(e,r,t)},t.AST=yC.default,t.Compiler=Wu.Compiler,t.JavaScriptCompiler=wC.default,t.Parser=Uu.parser,t.parse=Uu.parse,t.parseWithoutProcessing=Uu.parseWithoutProcessing,t}var _n=Hy();_n.create=Hy;xC.default(_n);_n.Visitor=bC.default;_n.default=_n;Rs.default=_n;By.exports=Rs.default});var Wy=b(Os=>{"use strict";Os.__esModule=!0;Os.print=PC;Os.PrintVisitor=_e;function kC(t){return t&&t.__esModule?t:{default:t}}var EC=_s(),CC=kC(EC);function PC(t){return new _e().accept(t)}function _e(){this.padding=0}_e.prototype=new CC.default;_e.prototype.pad=function(t){for(var e="",r=0,n=this.padding;r<n;r++)e+=" ";return e+=t+`
|
|
183
|
+
`,e};_e.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};_e.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};_e.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};_e.prototype.BlockStatement=_e.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};_e.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+" }}")};_e.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+" }}")};_e.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};_e.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};_e.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};_e.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};_e.prototype.StringLiteral=function(t){return'"'+t.value+'"'};_e.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};_e.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};_e.prototype.UndefinedLiteral=function(){return"UNDEFINED"};_e.prototype.NullLiteral=function(){return"NULL"};_e.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(", ")+"}"};_e.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var Ky=b((nN,Jy)=>{var As=Uy().default,zy=Wy();As.PrintVisitor=zy.PrintVisitor;As.print=zy.print;Jy.exports=As;function Gy(t,e){var r=st("fs"),n=r.readFileSync(e,"utf8");t.exports=As.compile(n)}typeof st<"u"&&st.extensions&&(st.extensions[".handlebars"]=Gy,st.extensions[".hbs"]=Gy)});import{readFile as IC}from"node:fs/promises";import{resolve as RC}from"node:path";async function mt(t,e,r){let n=RC(t,e),i=Yy.get(n);if(!i){let o=await IC(n,"utf-8");i=Xy.default.compile(o,{noEscape:!0}),Yy.set(n,i)}return i(r)}var Xy,Yy,Ai=K(()=>{"use strict";Xy=Ys(Ky(),1),Yy=new Map});var Gu=K(()=>{"use strict";qo()});import{readFile as Qy,writeFile as OC,mkdir as AC,stat as TC,rm as NC,unlink as MC}from"node:fs/promises";import{resolve as Ht}from"node:path";async function Zy(t){try{return await TC(t),!0}catch{return!1}}async function zu(t){let e=Ht(t,"..");for(let r of[Ht(t,"runtime"),Ht(e,"components"),Ht(e,"runtime")])await Zy(r)&&await NC(r,{recursive:!0,force:!0});for(let r of["extensions.tsx","extensions.ts","contracts.ts"]){let n=Ht(t,r);await Zy(n)&&await MC(n)}}function VC(t){return t.replace(/^import type \{ DispatchableAction \} from [^;]+;\n/gm,"")}async function ev(t,e,r){let n=fe(t),i=e.generated.reactDir,o=hi(r??(e.rendererTemplatesDir?Ht(n,e.rendererTemplatesDir):void 0)),s=$r();await AC(i,{recursive:!0}),await zu(i);let a=await Qy(Ht(s,"types.ts"),"utf-8"),c=await Qy(Ht(s,"style.ts"),"utf-8"),l=await mt(o,"dispatch.ts.hbs",{}),f=VC(l),p=await mt(o,"runtime.ts.hbs",{typesBody:a.trim(),styleBody:c.trim(),dispatchBody:f.trim()}),d=Ht(i,"runtime.ts");return await OC(d,p,"utf-8"),{runtimePath:d}}var tv=K(()=>{"use strict";ct();Ai();Gu()});var nv={};zi(nv,{renderReactRuntime:()=>UC});import{writeFile as rv,stat as LC,unlink as jC}from"node:fs/promises";import{relative as DC,resolve as bn}from"node:path";async function qC(t){try{return await LC(t),!0}catch{return!1}}async function FC(t,e,r,n){let i=await yi(r,t),o=await mt(hi(n),"theme.css.hbs",{themeCss:i});await rv(e,o,"utf-8")}async function HC(t){let e=bn(t,"..");for(let r of["theme.css","contracts.ts","view-bridge.generated.ts"]){let n=bn(e,r);await qC(n)&&await jC(n)}}async function BC(t,e){let r=fe(t),n=e.generated.reactDir,i=bn(r,"src/components/extensions.tsx"),o=DC(n,i).replace(/\\/g,"/");o.startsWith(".")||(o=`./${o}`);let s=o.replace(/\.tsx?$/,".js"),a=bn(n,"extensions.generated.ts");return await rv(a,`/** Auto-generated extension re-export \u2014 DO NOT EDIT */
|
|
184
|
+
export * from '${s}';
|
|
185
|
+
`,"utf-8"),a}async function UC(t,e){let r=fe(t),n=e.rendererTemplatesDir?bn(r,e.rendererTemplatesDir):void 0,i=e.generated.reactDir;await HC(i),await zu(i);let{runtimePath:o}=await ev(t,e,n),s=await BC(t,e),a=bn(i,"theme.css");await FC(t,a,e,n),console.log(` react/runtime \u2192 ${o}`),console.log(` react/extensions \u2192 ${s}`),console.log(` react/theme \u2192 ${a}`)}var iv=K(()=>{"use strict";ct();Ko();Ai();Gu();tv()});function WC(t,e){return t.entries.find(n=>n.path===e)?.value??""}function GC(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 Ts(t){let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function JC(t){return GC(t)??(t?`Color(${JSON.stringify(t)})`:null)}function ov(t,e){let r=[];for(let[n,i]of Object.entries(t)){let o=WC(e,i.ref);if(o)switch(n){case"background":case"foreground":{let s=JC(o);s&&r.push({property:n,swiftValue:s});break}case"padding":{let s=Ts(o);if(s!==null)r.push({property:n,swiftValue:String(s)});else{let a=o.trim().split(/\s+/);if(a.length===2){let c=Ts(a[0]),l=Ts(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":case"width":case"margin":{let s=Ts(o);s!==null&&r.push({property:n,swiftValue:String(s)});break}case"fontWeight":{let s=zC[o];s&&r.push({property:n,swiftValue:s});break}case"shadow":{r.push({property:n,swiftValue:o==="true"||o==="none"?"false":"true"});break}default: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 KC(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 radius: CGFloat?"),r.push(" var fontSize: CGFloat?"),r.push(" var fontWeight: Font.Weight?"),r.push(" var shadow: Bool?"),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(" .ifSet(s.background) { $0.background($1) }"),r.push(" .ifSet(s.radius) { $0.clipShape(RoundedRectangle(cornerRadius: $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 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=KC(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(`
|
|
186
|
+
`)}var zC,sv,lv=K(()=>{"use strict";zC={bold:".bold",semibold:".semibold",medium:".medium",regular:".regular",600:".semibold",700:".bold",500:".medium",400:".regular"};sv=["foreground","background","padding","paddingH","paddingV","radius","fontSize","fontWeight","shadow","minHeight","maxWidth"]});import{resolve as YC}from"node:path";function QC(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(`${XC}: element "${e}" must have exactly one of "container" or "leaf"`);(r.container==="vstack"||r.container==="hstack")&&r.spacingProp}}async function uv(t){if(!t&&Ju)return Ju;let e=t??YC(xe(),"renderers/swiftui/elements.yaml"),r=await Lo(e);return QC(r),t||(Ju=r),r}var XC,Ju,pv=K(()=>{"use strict";Lt();kl();XC="renderers/swiftui/elements.yaml",Ju=null});function ZC(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]=ZC(e,i.ref);return r}function eP(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 Ns(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),...eP(t.instanceLiterals)}}var dv=K(()=>{"use strict"});function nr(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 Ku(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 tP(t){let e=nr(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=nr(r[0]),i=nr(r[1]);if(n!==null&&i!==null)return{kind:"shorthand",vertical:n,horizontal:i}}return null}function rP(t){if(t===""||t===null||t===void 0)return null;let e=nr(t);return e!==null?`.font(.system(size: ${e}))`:typeof t=="string"&&!t.endsWith("px")?`.font(.system(size: ${JSON.stringify(t)}))`:null}function nP(t){return typeof t!="string"?null:{bold:".fontWeight(.bold)",semibold:".fontWeight(.semibold)",medium:".fontWeight(.medium)",regular:".fontWeight(.regular)"}[t]??null}function Yu(t){let e=[],r=t.foreground;if(typeof r=="string"){let g=Ku(r);e.push(g?`.foregroundStyle(${g})`:`.foregroundStyle(Color(${JSON.stringify(r)}))`)}let n=t.size??t.fontSize;if(n!==void 0&&n!==""){let g=rP(n);g&&e.push(g)}let i=nP(t.fontWeight??t.weight??"");i&&e.push(i);let o=t.padding??"",s=tP(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.background;if(typeof a=="string"&&a!=="transparent"){let g=Ku(a);e.push(g?`.background(${g})`:`.background(Color(${JSON.stringify(a)}))`)}let c=nr(t.radius??"");c!==null&&e.push(`.clipShape(RoundedRectangle(cornerRadius: ${c}))`),(t.shadow===!0||t.shadow==="true")&&e.push(".shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)");let l=t.border,f=t.borderColor;if(l||f){let g=nr(l??"1px")??1,y=typeof f=="string"?Ku(f)??"Color.gray":"Color.gray";e.push(`.overlay(RoundedRectangle(cornerRadius: ${c??0}).stroke(${y}, lineWidth: ${g}))`)}let p=t.minHeight;if(p!==void 0){let g=nr(p);g!==null&&e.push(`.frame(minHeight: ${g})`)}let d=t.maxWidth;if(d!==void 0){let g=nr(d);g!==null&&e.push(`.frame(maxWidth: ${g})`)}let m=t.opacity;return typeof m=="number"&&m<1&&e.push(`.opacity(${m})`),e}function Je(t,e,r){if(e.length===0)return t;let n=" ".repeat(r);return`${t}
|
|
187
|
+
${e.map(i=>`${n}${i}`).join(`
|
|
188
|
+
`)}`}var hv=K(()=>{"use strict"});function z(t){return" ".repeat(t)}function ge(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 gv(t){let e={};for(let[r,n]of Object.entries(t)){if(r==="variant"||r==="id"||!Zi.has(r))continue;let i=ge(t,r);i!==void 0&&(e[r]=i)}return e}function yv(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 iP(t,e,r){let n=t.variant;return!n||typeof n!="object"||!("kind"in n)?null:n.kind==="binding"?ir(n,e,r):n.kind==="concat"?`"${n.parts.map(s=>typeof s=="string"?s:`\\(${ir(s,e,r)})`).join("")}"`:null}function oP(t,e,r,n){let i=r.map.elements[t],o=ge(e,"variant"),s=gv(e);if(i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp],yv(e)){let l=iP(e,r,n),f=`.applyVcStyle(VcTheme.resolve(${JSON.stringify(t)}, variant: ${l}))`,p=Ns({elementName:t,theme:{defaults:{},variants:{}},tokens:r.tokens,instanceLiterals:s}),d=Yu(p);return[f,...d]}let c=Ns({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return Yu(c)}function ir(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 ir(n,e,r)}return null}function Xu(t,e,r,n,i){return t.map(s=>s.kind==="map"?Ms(s,e,r,n):s.kind==="text"?`${z(e)}Text(${JSON.stringify(s.value)})`:s.kind==="binding"?`${z(e)}Text(${ir(s,n,i)})`:r(s,e,i)).filter(Boolean).join(`
|
|
189
|
+
`)}function Ms(t,e,r,n){let i=t.item,o=r(t.body,e+2,i),s=ir(t.source,n,i);return`${z(e)}ForEach(${s}, id: \\.id) { ${i} in
|
|
190
|
+
${o}
|
|
191
|
+
${z(e)}}`}function sP(t,e,r,n,i,o){let s=z(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(`
|
|
192
|
+
`)}if(e.leaf==="button"){let a=ge(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(`
|
|
193
|
+
`)}if(e.leaf==="textfield"){let a=ge(t.props,"placeholder"),c=ge(t.props,"name"),l=typeof a=="string"?JSON.stringify(a):'""',f=typeof c=="string"?c:"text",p=`${s}TextField(${l}, text: .constant(""))`,d=o.map(m=>`${s}${m}`);return[p,...d].join(`
|
|
194
|
+
`)}if(e.leaf==="texteditor"){let a=`${s}TextEditor(text: .constant(""))`,c=o.map(l=>`${s}${l}`);return[a,...c].join(`
|
|
195
|
+
`)}if(e.leaf==="picker"){let a=ge(t.props,"label")??ge(t.props,"name")??"",c=`${s}Picker(${JSON.stringify(a)}, selection: .constant("")) { Text("--") }`,l=o.map(f=>`${s}${f}`);return[c,...l].join(`
|
|
196
|
+
`)}if(e.leaf==="spacer")return`${s}Spacer()`;if(e.leaf==="divider")return`${s}Divider()`;if(e.leaf==="image"){let a=ge(t.props,"src")??ge(t.props,"name"),l=`${s}Image(systemName: ${JSON.stringify(typeof a=="string"?a:"photo")})`,f=o.map(p=>`${s}${p}`);return[l,...f].join(`
|
|
197
|
+
`)}if(e.leaf==="progressview"){let a=`${s}ProgressView()`,c=o.map(l=>`${s}${l}`);return[a,...c].join(`
|
|
198
|
+
`)}if(e.leaf==="toggle"){let a=ge(t.props,"label")??"",c=`${s}Toggle(${JSON.stringify(a)}, isOn: .constant(false))`,l=o.map(f=>`${s}${f}`);return[c,...l].join(`
|
|
199
|
+
`)}return`${s}Text("/* unsupported leaf: ${t.name} */")`}function aP(t,e,r,n,i,o,s){let a=Xu(t.children,r+2,i,o,n);if(e.container==="vstack"){let l=e.spacingProp?ge(t.props,e.spacingProp):void 0,f=typeof l=="number"?l:0,p=`${z(r+1)}VStack(alignment: .leading, spacing: ${f}) {
|
|
200
|
+
${a}
|
|
201
|
+
${z(r+1)}}`;return Je(p,[...s,".frame(maxWidth: .infinity, alignment: .leading)"],r+1)}if(e.container==="hstack"){let l=e.spacingProp?ge(t.props,e.spacingProp):void 0,f=typeof l=="number"?l:0,d=ge(t.props,"align")==="center"?".center":".top",m=ge(t.props,"height"),g=ge(t.props,"justify"),y=ge(t.props,"flex"),_=t.name==="TableHeader"||t.name==="TableRow"||g!==void 0||typeof y=="number",M=[];_&&M.push(".frame(maxWidth: .infinity, alignment: .leading)"),typeof m=="number"&&M.push(`.frame(height: ${m})`);let j=a;if(g==="between"){let N=t.children.map(G=>G.kind==="map"?Ms(G,r+2,i,o):G.kind==="text"?`${z(r+2)}Text(${JSON.stringify(G.value)})`:G.kind==="binding"?`${z(r+2)}Text(${ir(G,o,n)})`:i(G,r+2,n)).filter(Boolean);if(N.length>=2){let G=N[0],te=N.slice(1);j=[G,`${z(r+2)}Spacer()`,...te].join(`
|
|
202
|
+
`)}}let T=`${z(r+1)}HStack(alignment: ${d}, spacing: ${f}) {
|
|
203
|
+
${j}
|
|
204
|
+
${z(r+1)}}`;return Je(T,[...s,...M],r+1)}if(e.container==="group"){let l=a?`${z(r+1)}VStack(alignment: .leading, spacing: 0) {
|
|
205
|
+
${a}
|
|
206
|
+
${z(r+1)}}`:`${z(r+1)}VStack { EmptyView() }`;return Je(l,[...s,".frame(maxWidth: .infinity, alignment: .leading)"],r+1)}if(e.container==="navstack")return Je(a,[...s,".frame(maxWidth: .infinity, maxHeight: .infinity)"],r+1);if(e.container==="scrollview"){let l=`${z(r+1)}ScrollView {
|
|
207
|
+
${a}
|
|
208
|
+
${z(r+1)}}`;return Je(l,s,r+1)}if(e.container==="field"){let l=ge(t.props,"label"),f=typeof l=="string"?`
|
|
209
|
+
${z(r+2)}Text(${JSON.stringify(l)})
|
|
210
|
+
${z(r+2)} .font(.caption)
|
|
211
|
+
${z(r+2)} .foregroundStyle(.secondary)`:"",p=`${z(r+1)}VStack(alignment: .leading, spacing: 4) {${f}
|
|
212
|
+
${a}
|
|
213
|
+
${z(r+1)}}`;return Je(p,s,r+1)}if(e.container==="tablestack"){let l=ge(t.props,"separator"),f=ge(t.props,"separatorColor"),p=typeof l=="number"&&l>0,d=t.children.map(y=>y.kind==="map"?Ms(y,r+2,i,o):i(y,r+2,n)).filter(Boolean),m;if(p){let $=Qu(t.name,t.props,o).separatorColor??f,_="Color.gray.opacity(0.2)";if(typeof $=="string"){let T=$.match(/^#([0-9a-fA-F]{6})$/);if(T){let N=parseInt(T[1].slice(0,2),16)/255,G=parseInt(T[1].slice(2,4),16)/255,te=parseInt(T[1].slice(4,6),16)/255;_=`Color(red: ${N}, green: ${G}, blue: ${te})`}}let M=l,j=M===1?`${z(r+2)}Divider().overlay(${_})`:`${z(r+2)}Rectangle().fill(${_}).frame(height: ${M})`;m=d.flatMap((T,N)=>N<d.length-1?[T,j]:[T])}else m=d;let g=`${z(r+1)}VStack(alignment: .leading, spacing: 0) {
|
|
214
|
+
${m.join(`
|
|
215
|
+
`)}
|
|
216
|
+
${z(r+1)}}`;return Je(g,[...s,".frame(maxWidth: .infinity, alignment: .leading)"],r+1)}if(e.container==="cellgroup"){let l=ge(t.props,"width"),f=ge(t.props,"flex"),p=ge(t.props,"align"),d=p==="end"?".trailing":p==="center"?".center":".leading",m=typeof f=="number",g=[...s,".padding(.horizontal, 4)",".lineLimit(1)"];typeof l=="number"?g.push(`.frame(width: ${l}, alignment: ${d})`):m&&g.push(`.frame(maxWidth: .infinity, alignment: ${d})`);let y=a?`${z(r+1)}VStack(alignment: ${d}) {
|
|
217
|
+
${a}
|
|
218
|
+
${z(r+1)}}`:`${z(r+1)}VStack { EmptyView() }`;return Je(y,g,r+1)}let c=a?`${z(r+1)}Group {
|
|
219
|
+
${a}
|
|
220
|
+
${z(r+1)}}`:`${z(r+1)}Group { EmptyView() }`;return Je(c,s,r+1)}function Qu(t,e,r){let n=ge(e,"variant"),i=gv(e);return Ns({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof n=="string"?n:void 0,instanceLiterals:i})}function cP(t){if(!t||typeof t!="string")return null;let e=t.match(/repeat\(auto-fit,\s*minmax\((\d+)px/);if(e)return{kind:"adaptive",minWidth:Number(e[1])};let r=t.trim().split(/\s+/);return r.length>=2?{kind:"fixed-columns",widths:r}:null}function lP(t,e,r,n,i,o){let s=oP(t.name,t.props,o,n);if(e.leaf)return sP(t,e,r,n,o,s);if(e.container==="group"&&!yv(t.props)){let a=Qu(t.name,t.props,o),c=a.display,l=a.gridTemplateColumns,f=a.flexDirection;if(c==="grid"&&l){let p=cP(l);if(p?.kind==="adaptive")return uP(t,r,n,i,o,s,p.minWidth);if(p?.kind==="fixed-columns")return fP(t,r,n,i,o,s,p.widths)}if(c==="flex"&&f==="row"){let p=Xu(t.children,r+2,i,o,n),d=ge(t.props,"gap"),m=typeof d=="number"?d:typeof a.gap=="number"?a.gap:0,g=`${z(r+1)}HStack(alignment: .top, spacing: ${m}) {
|
|
221
|
+
${p}
|
|
222
|
+
${z(r+1)}}`;return Je(g,[...s,".frame(maxWidth: .infinity, alignment: .leading)"],r+1)}}if(e.container)return aP(t,e,r,n,i,o,s);throw new Error(`Unsupported SwiftUI element config for ${t.name}`)}function uP(t,e,r,n,i,o,s){let a=ge(t.props,"gap"),c=typeof a=="number"?a:16,l=Xu(t.children,e+2,n,i,r),f=`${z(e+1)}LazyVGrid(columns: [GridItem(.adaptive(minimum: ${s}))], spacing: ${c}) {
|
|
223
|
+
${l}
|
|
224
|
+
${z(e+1)}}`;return Je(f,[...o,".frame(maxWidth: .infinity)"],e+1)}function pP(t,e){if(t.kind!=="component")return null;let n=Qu(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 fP(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=Ms(d,e+2,n,i):d.kind==="text"?m=`${z(e+2)}Text(${JSON.stringify(d.value)})`:d.kind==="binding"?m=`${z(e+2)}Text(${ir(d,i,r)})`:m=n(d,e+2,r),!m)continue;let g=s[p],y=g?.match(/^(\d+)px$/);if(y){m+=`
|
|
225
|
+
${z(e+2)}.frame(width: ${Number(y[1])}, alignment: .topLeading)`,m+=`
|
|
226
|
+
${z(e+2)}.frame(maxHeight: .infinity)`;let $=pP(d,i);$&&(m+=`
|
|
227
|
+
${z(e+2)}.background(${$})`)}else g==="1fr"&&(m=`${z(e+2)}ScrollView {
|
|
228
|
+
${m}
|
|
229
|
+
${z(e+2)}}`,m+=`
|
|
230
|
+
${z(e+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`);c.push(m)}let l=c.join(`
|
|
231
|
+
`),f=`${z(e+1)}HStack(spacing: 0) {
|
|
232
|
+
${l}
|
|
233
|
+
${z(e+1)}}`;return Je(f,[...o,".frame(maxWidth: .infinity, maxHeight: .infinity)"],e+1)}function dP(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}: ${ir(a,n,r)}`:`${s}: ${JSON.stringify(a)}`),o=i.length>0?`(${i.join(", ")})`:"()";return`${z(e)}${t.name}${o}`}function hP(t){let e=(r,n,i)=>{if(r.kind==="viewRef")return dP(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 lP(r,t.map.elements[r.name],n,i,e,t)};return e}function vv(t,e,r=2){let n=hP(e);if(t.kind!=="component")throw new Error("SwiftUI lowering root must be a component node");return n(t,r)}var wv=K(()=>{"use strict";Tt();dv();hv()});function _v(t){let e=t.match(/^(\w+)\[\]$/);return e?`[${_v(e[1])}]`:t==="string"?"String":t==="number"?"Double":t==="boolean"?"Bool":t}function mP(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(`
|
|
234
|
+
`)}
|
|
235
|
+
`:` let props: ${t.propsType}
|
|
236
|
+
`}function gP(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 Zu(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:gP(t)},s=vv(t.root,o,4),a=mP(t),c=!t.isPartial&&t.viewModel?` let vm: ${t.viewModel}
|
|
237
|
+
`:"";return`/**
|
|
238
|
+
* Auto-generated SwiftUI view from ${t.source}
|
|
239
|
+
* DO NOT EDIT \u2014 prototype SwiftUI lowering (#21)
|
|
240
|
+
*/
|
|
241
|
+
import SwiftUI
|
|
242
|
+
|
|
243
|
+
struct ${i}: View {
|
|
244
|
+
${c}${a} var body: some View {
|
|
245
|
+
${s}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
`}var bv=K(()=>{"use strict";pv();wv()});import{readFile as yP,stat as vP}from"node:fs/promises";import{resolve as Sv}from"node:path";function xv(){return"views/preview"}function ep(t){return`${t.charAt(0).toLowerCase()}${t.slice(1)}Mock`}function tp(t,e,r){let n=fe(t),i=e.preview?.mocksDir??xv();return Sv(n,i,`${r}.mock.yaml`)}function wP(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function _P(t,e){if(!wP(t))throw new Vs(`${e} must be a YAML object (ViewModel fields at the root)`);return t}async function rp(t){let e;try{e=await yP(t,"utf-8")}catch{throw new Vs(`Preview mock not found: ${t}`)}let r=at.load(e);return _P(r,t)}function bP(t,e){let r=ep(t);return`/** Auto-built from views/preview/${t}.mock.yaml \u2014 preview / example only */
|
|
249
|
+
export const ${r} = ${JSON.stringify(e,null,2)};
|
|
250
|
+
`}async function $v(t,e,r){let n=tp(t,e,r),i=await rp(n);return bP(r,i)}async function kv(t,e){let r=fe(t),n=e.preview?.mocksDir??xv();return Sv(r,n)}async function Ls(t){try{return await vP(t),!0}catch{return!1}}var Vs,Ti=K(()=>{"use strict";Dr();ct();Vs=class extends Error{constructor(e){super(e),this.name="PreviewMockError"}}});var Cv={};zi(Cv,{renderSwiftUIRuntime:()=>xP});import{mkdir as SP,writeFile as Sn}from"node:fs/promises";import{resolve as or}from"node:path";function Ev(){return or(xe(),"renderers/swiftui/templates")}async function xP(t,e,r,n,i){let o=or(e.generated.reactDir,"../swiftui");if(await SP(o,{recursive:!0}),n?await Sn(or(o,"VcTheme.swift"),cv(n.theme,n.tokens),"utf-8"):await Sn(or(o,"VcTheme.swift"),await mt(Ev(),"VcTheme.swift.hbs",{}),"utf-8"),i&&n){for(let s of i.partials)try{let a=await Zu(s,{theme:n.theme,tokens:n.tokens}),c=or(o,`${s.exportName}.generated.swift`);await Sn(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 Zu(a,{theme:n.theme,tokens:n.tokens}),l=or(o,`${s.screenName}.generated.swift`);await Sn(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=or(o,`${s.screenName}.swift`);await Sn(a,await mt(Ev(),"Screen.swift.hbs",{screenName:s.screenName}),"utf-8")}for(let s of r.views){let a=tp(t,e,s.screenName);if(await Ls(a))try{let c=await rp(a),l=JSON.stringify(c,null,2)+`
|
|
251
|
+
`,f=or(o,`${s.screenName}.SampleData.json`);await Sn(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 Pv=K(()=>{"use strict";Lt();Ai();lv();bv();Ti()});var Ov={};zi(Ov,{renderComposeRuntime:()=>kP});import{mkdir as $P,writeFile as Iv}from"node:fs/promises";import{resolve as js}from"node:path";function Rv(){return js(xe(),"renderers/compose/templates")}async function kP(t,e){let r=js(t.generated.reactDir,"../compose");await $P(r,{recursive:!0}),await Iv(js(r,"VcTheme.kt"),await mt(Rv(),"VcTheme.kt.hbs",{packageName:"generated.compose"}),"utf-8");for(let n of e.views)if(n.targets.includes("compose")){let i=js(r,`${n.screenName}Screen.kt`);await Iv(i,await mt(Rv(),"Screen.kt.hbs",{screenName:n.screenName,packageName:"generated.compose"}),"utf-8"),console.log(` compose \u2192 ${i}`)}}var Av=K(()=>{"use strict";Lt();Ai()});var Sp=Ys(bp(),1),{program:lI,createCommand:uI,createArgument:pI,createOption:fI,CommanderError:dI,InvalidArgumentError:hI,InvalidOptionArgumentError:mI,Command:xp,Argument:gI,Option:yI,Help:vI}=Sp.default;var $p=`# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json
|
|
59
252
|
cli_contracts: 0.1.0
|
|
60
253
|
|
|
61
254
|
info:
|
|
62
255
|
title: view-contracts CLI
|
|
63
|
-
version: 0.3.
|
|
256
|
+
version: 0.3.5
|
|
64
257
|
description: >-
|
|
65
258
|
Contract-first UI design toolchain. Compiles restricted view-contract TSX
|
|
66
259
|
to language-neutral View IR and renders platform targets (React, SwiftUI, Compose).
|
|
@@ -219,11 +412,51 @@ command_sets:
|
|
|
219
412
|
description: Lint passed.
|
|
220
413
|
'1':
|
|
221
414
|
description: Lint failed.
|
|
222
|
-
|
|
415
|
+
|
|
416
|
+
preview:
|
|
417
|
+
summary: Start DSL preview HTTP server.
|
|
418
|
+
description: >-
|
|
419
|
+
Compiles views/*.view.tsx on demand and serves a React preview over HTTP.
|
|
420
|
+
No Vite setup required in the consumer project.
|
|
421
|
+
usage:
|
|
422
|
+
- view-contracts preview
|
|
423
|
+
- view-contracts preview -c view-contracts.config.yaml
|
|
424
|
+
- view-contracts preview --port 3000 --screen AdminDashboard
|
|
425
|
+
options:
|
|
426
|
+
- name: config
|
|
427
|
+
aliases: [c]
|
|
428
|
+
description: Path to view-contracts.config.yaml (discovered upward from cwd when omitted).
|
|
429
|
+
value_name: path
|
|
430
|
+
schema:
|
|
431
|
+
type: string
|
|
432
|
+
- name: port
|
|
433
|
+
aliases: [p]
|
|
434
|
+
description: HTTP listen port.
|
|
435
|
+
value_name: number
|
|
436
|
+
schema:
|
|
437
|
+
type: integer
|
|
438
|
+
default: 5173
|
|
439
|
+
- name: host
|
|
440
|
+
description: HTTP listen host.
|
|
441
|
+
value_name: address
|
|
442
|
+
schema:
|
|
443
|
+
type: string
|
|
444
|
+
default: 127.0.0.1
|
|
445
|
+
- name: screen
|
|
446
|
+
description: Screen name from view-bindings.yaml (default first react target).
|
|
447
|
+
value_name: name
|
|
448
|
+
schema:
|
|
449
|
+
type: string
|
|
450
|
+
exits:
|
|
451
|
+
'0':
|
|
452
|
+
description: Server stopped normally.
|
|
453
|
+
'1':
|
|
454
|
+
description: Startup or compile failed.
|
|
455
|
+
`,kp=`{
|
|
223
456
|
"cli_contracts": "0.1.0",
|
|
224
457
|
"info": {
|
|
225
458
|
"title": "view-contracts CLI",
|
|
226
|
-
"version": "0.3.
|
|
459
|
+
"version": "0.3.5",
|
|
227
460
|
"description": "Contract-first UI design toolchain. Compiles restricted view-contract TSX to language-neutral View IR and renders platform targets (React, SwiftUI, Compose)."
|
|
228
461
|
},
|
|
229
462
|
"artifact_slots": {
|
|
@@ -449,136 +682,91 @@ command_sets:
|
|
|
449
682
|
"description": "Lint failed."
|
|
450
683
|
}
|
|
451
684
|
}
|
|
685
|
+
},
|
|
686
|
+
"preview": {
|
|
687
|
+
"summary": "Start DSL preview HTTP server.",
|
|
688
|
+
"description": "Compiles views/*.view.tsx on demand and serves a React preview over HTTP. No Vite setup required in the consumer project.",
|
|
689
|
+
"usage": [
|
|
690
|
+
"view-contracts preview",
|
|
691
|
+
"view-contracts preview -c view-contracts.config.yaml",
|
|
692
|
+
"view-contracts preview --port 3000 --screen AdminDashboard"
|
|
693
|
+
],
|
|
694
|
+
"options": [
|
|
695
|
+
{
|
|
696
|
+
"name": "config",
|
|
697
|
+
"aliases": [
|
|
698
|
+
"c"
|
|
699
|
+
],
|
|
700
|
+
"description": "Path to view-contracts.config.yaml (discovered upward from cwd when omitted).",
|
|
701
|
+
"value_name": "path",
|
|
702
|
+
"schema": {
|
|
703
|
+
"type": "string"
|
|
704
|
+
}
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
"name": "port",
|
|
708
|
+
"aliases": [
|
|
709
|
+
"p"
|
|
710
|
+
],
|
|
711
|
+
"description": "HTTP listen port.",
|
|
712
|
+
"value_name": "number",
|
|
713
|
+
"schema": {
|
|
714
|
+
"type": "integer"
|
|
715
|
+
},
|
|
716
|
+
"default": 5173
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
"name": "host",
|
|
720
|
+
"description": "HTTP listen host.",
|
|
721
|
+
"value_name": "address",
|
|
722
|
+
"schema": {
|
|
723
|
+
"type": "string"
|
|
724
|
+
},
|
|
725
|
+
"default": "127.0.0.1"
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
"name": "screen",
|
|
729
|
+
"description": "Screen name from view-bindings.yaml (default first react target).",
|
|
730
|
+
"value_name": "name",
|
|
731
|
+
"schema": {
|
|
732
|
+
"type": "string"
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
],
|
|
736
|
+
"exits": {
|
|
737
|
+
"0": {
|
|
738
|
+
"description": "Server stopped normally."
|
|
739
|
+
},
|
|
740
|
+
"1": {
|
|
741
|
+
"description": "Startup or compile failed."
|
|
742
|
+
}
|
|
743
|
+
}
|
|
452
744
|
}
|
|
453
745
|
}
|
|
454
746
|
}
|
|
455
747
|
}
|
|
456
|
-
}`;function
|
|
457
|
-
`),process.exit(2));let
|
|
458
|
-
`)}else{let
|
|
748
|
+
}`;function Ep(t,e){let r=new xp;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"})+`
|
|
749
|
+
`),process.exit(2));let c=s.format||"yaml",l=JSON.parse(kp),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)+`
|
|
750
|
+
`)}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($p),process.stdout.write(p.join(`
|
|
459
751
|
`)+`
|
|
460
|
-
`)}else{let
|
|
461
|
-
`)}process.exit(0)}),r}import{writeFile as ox,mkdir as sx}from"node:fs/promises";import{resolve as en,dirname as Jg,relative as ax}from"node:path";import{spawn as cx}from"node:child_process";import{readFile as Iy}from"node:fs/promises";import{basename as Ty,relative as Ny,resolve as My}from"node:path";import{readFileSync as Sy}from"node:fs";import{dirname as $u,resolve as Ey}from"node:path";import I from"typescript";var wr=new Set(["App","Box","Button","Checkbox","Column","Divider","Drawer","Field","Form","Heading","Icon","IconButton","Image","Link","List","ListItem","Modal","Page","Popover","Progress","Radio","Row","SafeArea","ScrollArea","Select","Spacer","Spinner","Stack","Switch","Text","TextArea","TextInput","Tooltip"]);import{readFileSync as vy}from"node:fs";import{resolve as _y}from"node:path";import ce from"typescript";function Ts(t,e){let r=new Map;for(let n of t.statements){if(!ce.isImportDeclaration(n)||!n.importClause?.namedBindings||!ce.isStringLiteral(n.moduleSpecifier)||!ce.isNamedImports(n.importClause.namedBindings))continue;let i=n.moduleSpecifier.text;i.endsWith(".tsx")||(i=`${i}.tsx`);let o=_y(e,i);for(let s of n.importClause.namedBindings.elements)r.set(s.name.text,o)}return r}function wy(t){if(!ce.isObjectBindingPattern(t.name)||t.name.elements.length===0)return null;let e=t.name.elements[0];return!ce.isBindingElement(e)||!ce.isIdentifier(e.name)?null:e.name.text}function by(t){if(ce.isParenthesizedExpression(t))return t.expression;if(ce.isJsxElement(t)||ce.isJsxSelfClosingElement(t)||ce.isJsxFragment(t))return t;if(ce.isBlock(t)&&t.statements.length===1){let e=t.statements[0];if(ce.isReturnStatement(e)&&e.expression)return ce.isParenthesizedExpression(e.expression)?e.expression.expression:e.expression}return null}function Su(t){if(!ce.isIdentifier(t.expression)||t.expression.text!=="view"||t.arguments.length!==1)return null;let e=t.arguments[0];if(!ce.isArrowFunction(e)&&!ce.isFunctionExpression(e))return null;let r="__noop";if(e.parameters.length===1){let i=wy(e.parameters[0]);if(i)r=i;else if(ce.isIdentifier(e.parameters[0].name))r=e.parameters[0].name.text;else return null}else if(e.parameters.length>1)return null;let n=by(e.body);return n?{paramName:r,jsxRoot:n}:null}function Eu(t,e){let r=vy(t,"utf-8"),n=ce.createSourceFile(t,r,ce.ScriptTarget.Latest,!0,ce.ScriptKind.TSX),i=null;function o(s){if(ce.isVariableStatement(s))for(let a of s.declarationList.declarations){if(!ce.isIdentifier(a.name)||a.name.text!==e||!a.initializer||!ce.isCallExpression(a.initializer))continue;let l=Su(a.initializer);l&&(i=l)}if(ce.isExportAssignment(s)&&s.isExportEquals===!1&&s.expression&&ce.isCallExpression(s.expression)){let a=Su(s.expression);a&&e==="default"&&(i=a)}ce.forEachChild(s,o)}return o(n),i}var $y=new Set(["Text","Heading"]);function Cy(t,e,r){if($y.has(t)){if("tone"in e){let n=e.tone;delete e.tone,"variant"in e||(e.variant=n),r.warnings.push(`"tone" on <${t}> is deprecated; use variant instead (mapped automatically)`)}if("textStyle"in e){let n=e.textStyle;delete e.textStyle,"variant"in e||(e.variant=n),r.warnings.push(`"textStyle" on <${t}> is deprecated; use variant instead (mapped automatically)`)}}}function Ns(t){return t.join(".")}function br(t){let e=t.getText().replace(/\s+/g," ").trim();return e.length>100?`${e.slice(0,97)}...`:e}function Ms(t){if(I.isIdentifier(t))return[t.text];if(I.isPropertyAccessExpression(t)){let e=Ms(t.expression);return e?[...e,t.name.text]:null}return null}function xy(t){return typeof t=="object"&&t!==null&&"kind"in t&&t.kind==="binding"}function Cu(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 Pi(t,e){let r=Ms(t);if(!r)return null;if(r[0]in e.propBindings)return Cu(e.propBindings[r[0]],r.slice(1));if(r[0]===e.vmName)return{kind:"binding",path:Ns(r.slice(1))};let n=e.scopes[e.scopes.length-1];return n&&r[0]===n?{kind:"binding",path:Ns(r.slice(1)),scope:n}:null}function Py(t,e){let r,n={};for(let i of t.properties){if(!I.isPropertyAssignment(i)||!I.isIdentifier(i.name))continue;let o=i.name.text;if(o==="name"&&I.isStringLiteral(i.initializer)){r=i.initializer.text;continue}if(o==="params"&&I.isObjectLiteralExpression(i.initializer))for(let s of i.initializer.properties){if(!I.isPropertyAssignment(s)||!I.isIdentifier(s.name))continue;let a=ki(s.initializer,e);a!==null?n[s.name.text]=a:e.errors.push(`Unsupported action param expression for "${s.name.text}": ${br(s.initializer)}`)}}return r?Object.keys(n).length>0?{kind:"action",name:r,params:n}:{kind:"action",name:r}:null}function ki(t,e){if(I.isStringLiteral(t)||I.isNoSubstitutionTemplateLiteral(t))return t.text;if(t.kind===I.SyntaxKind.TrueKeyword)return!0;if(t.kind===I.SyntaxKind.FalseKeyword)return!1;if(I.isNumericLiteral(t))return Number(t.text);if(t.kind===I.SyntaxKind.NullKeyword)return null;let r=Pi(t,e);if(r)return r;if(I.isObjectLiteralExpression(t)){let n=Py(t,e);if(n)return n;let i={};for(let o of t.properties){if(!I.isPropertyAssignment(o)||!I.isIdentifier(o.name))continue;let s=ki(o.initializer,e);s!==null?i[o.name.text]=s:e.errors.push(`Unsupported object literal property "${o.name.text}": ${br(o.initializer)}`)}return{kind:"literal",value:i}}if(I.isArrayLiteralExpression(t)){let n=[];for(let i of t.elements){if(!I.isExpression(i))continue;let o=ki(i,e);o!==null?n.push(o):e.errors.push(`Unsupported array element expression: ${br(i)}`)}return n}return null}function ky(t){return I.isIdentifier(t)?t.text:I.isPropertyAccessExpression(t)&&I.isIdentifier(t.name)?t.name.text:null}function xu(t){return t.getText()}function Pu(t,e){let r=[];for(let n of t){if(I.isJsxText(n)){let i=n.getText().trim();i&&r.push({kind:"text",value:i});continue}if(I.isJsxExpression(n)&&n.expression){let i=Pi(n.expression,e);if(i){r.push(i);continue}let o=ku(n.expression,e);o?Array.isArray(o)?r.push(...o):r.push(o):e.errors.push(`Unsupported JSX child expression: ${br(n.expression)}`);continue}if(I.isJsxElement(n)||I.isJsxSelfClosingElement(n)){let i=an(n,e);i&&r.push(i)}}return r}function Oy(t,e){if(t.length===0)return null;let r=t[0];return r in e.propBindings?Cu(e.propBindings[r],t.slice(1)):r===e.vmName?{kind:"binding",path:Ns(t.slice(1))}:null}function ku(t,e){if(I.isParenthesizedExpression(t))return ku(t.expression,e);if(I.isCallExpression(t)&&I.isPropertyAccessExpression(t.expression)){let n=Ms(t.expression.expression),i=t.expression.name.text;if(n&&i==="map"&&t.arguments.length>=1){let o=Oy(n,e);if(!o)return null;let s=t.arguments[0];if(!I.isArrowFunction(s)&&!I.isFunctionExpression(s))return e.errors.push("map callback must be an arrow function"),null;let a=s.parameters;if(a.length!==1||!I.isIdentifier(a[0].name))return e.errors.push("map callback must have a single item parameter"),null;let l=a[0].name.text,u={...e,scopes:[...e.scopes,l]},d=null,f=I.isParenthesizedExpression(s.body)?s.body.expression:s.body;if(I.isBlock(s.body))return e.errors.push("map callback body must be a JSX expression, not a block"),null;if(I.isJsxElement(f)||I.isJsxSelfClosingElement(f)?d=an(f,u):I.isJsxFragment(f)&&(d=Ls(f,u)),!d)return null;let h;if(I.isJsxElement(f)||I.isJsxSelfClosingElement(f)){let m=I.isJsxElement(f)?f.openingElement.attributes:f.attributes;for(let g of m.properties)if(!(!I.isJsxAttribute(g)||xu(g.name)!=="key"||!g.initializer)&&I.isJsxExpression(g.initializer)&&g.initializer.expression){let v=Pi(g.initializer.expression,u);v&&(h=v)}}return{kind:"map",source:o,item:l,key:h,body:d}}}if(I.isJsxElement(t)||I.isJsxSelfClosingElement(t))return an(t,e);let r=Pi(t,e);return r||null}function Ls(t,e){return{kind:"fragment",children:Pu(t.children,e)}}function Ay(t,e,r){let n=r.viewImports.get(t);if(!n)return null;let i=Eu(n,t);if(!i)return r.errors.push(`View component "${t}" is imported but has no view() export`),null;let o=Sy(n,"utf-8"),s=I.createSourceFile(n,o,I.ScriptTarget.Latest,!0,I.ScriptKind.TSX),a=Ts(s,$u(n)),l=new Map([...r.viewImports,...a]),u={...r.propBindings};for(let[f,h]of Object.entries(e))xy(h)&&(u[f]=h);let d={...r,vmName:i.paramName,propBindings:u,scopes:[],viewImports:l};return I.isJsxElement(i.jsxRoot)||I.isJsxSelfClosingElement(i.jsxRoot)?an(i.jsxRoot,d):I.isJsxFragment(i.jsxRoot)?Ls(i.jsxRoot,d):I.isConditionalExpression(i.jsxRoot)?(r.errors.push("view() partial root must be a JSX element or fragment; conditional expressions are not supported"),null):I.isExpression(i.jsxRoot)?(r.errors.push(`view() partial root must be a JSX element or fragment; unsupported expression: ${br(i.jsxRoot)}`),null):(r.errors.push(`view() partial root must be a JSX element or fragment; unsupported syntax kind: ${I.SyntaxKind[i.jsxRoot.kind]}`),null)}function an(t,e){let r=I.isJsxElement(t)?t.openingElement:t,n=ky(r.tagName);if(!n)return e.errors.push("Unsupported JSX tag expression"),null;let i={};for(let s of r.attributes.properties){if(!I.isJsxAttribute(s))continue;let a=xu(s.name);if(a!=="key"){if(!s.initializer){i[a]=!0;continue}if(I.isStringLiteral(s.initializer)){i[a]=s.initializer.text;continue}if(I.isJsxExpression(s.initializer)&&s.initializer.expression){let l=ki(s.initializer.expression,e);l!==null?i[a]=l:e.errors.push(`Unsupported JSX prop expression for "${a}" on <${n}>: ${br(s.initializer.expression)}`)}}}if(!e.allowedComponents.has(n)){let s=Ay(n,i,e);return s||(e.errors.push(`Component "${n}" is not in the allowed registry`),null)}Cy(n,i,e);let o=I.isJsxElement(t)?Pu(t.children,e):[];return{kind:"component",name:n,props:i,children:o}}function Ry(t){let e=null;function r(n){if(I.isCallExpression(n)&&I.isIdentifier(n.expression)&&n.expression.text==="screen"&&n.arguments.length===1&&(I.isArrowFunction(n.arguments[0])||I.isFunctionExpression(n.arguments[0]))){let i=n.arguments[0],o="unknown";if(n.typeArguments&&n.typeArguments.length===1){let a=n.typeArguments[0];I.isTypeReferenceNode(a)&&I.isIdentifier(a.typeName)&&(o=a.typeName.text)}let s=i.body;if(I.isParenthesizedExpression(s))(I.isJsxElement(s.expression)||I.isJsxSelfClosingElement(s.expression))&&(e={viewModel:o,jsxRoot:s.expression});else if(I.isJsxElement(s)||I.isJsxSelfClosingElement(s))e={viewModel:o,jsxRoot:s};else if(I.isBlock(s)&&s.statements.length===1){let a=s.statements[0];I.isReturnStatement(a)&&a.expression&&(I.isParenthesizedExpression(a.expression)?e={viewModel:o,jsxRoot:a.expression.expression}:e={viewModel:o,jsxRoot:a.expression})}}I.forEachChild(n,r)}return r(t),e}function Ou(t,e,r,n={}){let i=new Set(wr);for(let f of n.allowlistExtra??[])i.add(f);let o=Ey(e),s=$u(o),a=I.createSourceFile(o,t,I.ScriptTarget.Latest,!0,I.ScriptKind.TSX),l={vmName:"vm",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:Ts(a,s),allowedComponents:i},u=Ry(a);if(!u)return{viewModel:"unknown",exportName:r,root:{kind:"fragment",children:[]},errors:["No screen<T>() default export found"],warnings:[]};let d=I.isJsxElement(u.jsxRoot)||I.isJsxSelfClosingElement(u.jsxRoot)?an(u.jsxRoot,l):I.isJsxFragment(u.jsxRoot)?Ls(u.jsxRoot,l):null;return d?{viewModel:u.viewModel,exportName:r,root:d,errors:l.errors,warnings:l.warnings}:(l.errors.push("screen() callback must return a single JSX root element"),{viewModel:u.viewModel,exportName:r,root:{kind:"fragment",children:[]},errors:l.errors,warnings:l.warnings})}function Au(t,e){let r=[],n=[],i=o=>{if(o.kind==="component"){!wr.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 Ly(t,e={}){let r=await Iy(t.sourcePath,"utf-8"),n=t.exportName??Ty(t.sourcePath,".view.tsx"),i=Ou(r,t.sourcePath,n,{allowlistExtra:e.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t.sourcePath}:
|
|
752
|
+
`)}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[_,M]of Object.entries(y)){let j=m+"."+_;f.some(T=>T===_||T===j||_.startsWith(T+"."))&&($[_]=M)}if(Object.keys($).length>0){let _={...g};_.commands=$,d[m]=_}}l.components&&(p.components=l.components),process.stdout.write(JSON.stringify(p,null,2)+`
|
|
753
|
+
`)}process.exit(0)}),r}import{writeFile as YP,mkdir as XP}from"node:fs/promises";import{resolve as $t,dirname as Gv,relative as QP}from"node:path";import{spawn as ZP}from"node:child_process";import{readFile as Dp}from"node:fs/promises";import{basename as Cw,relative as qp,resolve as Fp}from"node:path";Tt();import{dirname as Op,resolve as Ap}from"node:path";import A from"typescript";import{readFileSync as mw}from"node:fs";import{resolve as gw}from"node:path";import ae from"typescript";function ha(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=gw(e,i);for(let s of n.importClause.namedBindings.elements)r.set(s.name.text,o)}return r}function yw(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 vw(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 ww(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 Ip(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=vw(e.parameters[0]);if(n=yw(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=ww(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 ma(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=Ip(o.initializer);s&&(r=s)}if(ae.isExportAssignment(i)&&i.isExportEquals===!1&&i.expression&&ae.isCallExpression(i.expression)){let o=Ip(i.expression);o&&e==="default"&&(r=o)}ae.forEachChild(i,n)}return n(t),r}function Rp(t,e){let r=mw(t,"utf-8"),n=ae.createSourceFile(t,r,ae.ScriptTarget.Latest,!0,ae.ScriptKind.TSX);return ma(n,e)}function _w(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 ga(t){return t.join(".")}function jr(t){let e=t.getText().replace(/\s+/g," ").trim();return e.length>100?`${e.slice(0,97)}...`:e}function va(t){if(A.isIdentifier(t))return[t.text];if(A.isPropertyAccessExpression(t)){let e=va(t.expression);return e?[...e,t.name.text]:null}return null}function Tp(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 In(t,e){let r=va(t);if(!r)return null;if(r[0]in e.propBindings)return Tp(e.propBindings[r[0]],r.slice(1));if(r[0]===e.vmName)return{kind:"binding",path:ga(r.slice(1))};let n=e.scopes[e.scopes.length-1];return n&&r[0]===n?{kind:"binding",path:ga(r.slice(1)),scope:n}:null}function bw(t,e){let r,n={};for(let i of t.properties){if(!A.isPropertyAssignment(i)||!A.isIdentifier(i.name))continue;let o=i.name.text;if(o==="name"&&A.isStringLiteral(i.initializer)){r=i.initializer.text;continue}if(o==="params"&&A.isObjectLiteralExpression(i.initializer))for(let s of i.initializer.properties){if(!A.isPropertyAssignment(s)||!A.isIdentifier(s.name))continue;let a=eo(s.initializer,e);a!==null?n[s.name.text]=a:e.errors.push(`Unsupported action param expression for "${s.name.text}": ${jr(s.initializer)}`)}}return r?Object.keys(n).length>0?{kind:"action",name:r,params:n}:{kind:"action",name:r}:null}function eo(t,e){if(A.isStringLiteral(t)||A.isNoSubstitutionTemplateLiteral(t))return t.text;if(t.kind===A.SyntaxKind.TrueKeyword)return!0;if(t.kind===A.SyntaxKind.FalseKeyword)return!1;if(A.isNumericLiteral(t))return Number(t.text);if(t.kind===A.SyntaxKind.NullKeyword)return null;if(A.isTemplateExpression(t)){let n=[];t.head.text&&n.push(t.head.text);for(let i of t.templateSpans){let o=In(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=In(t,e);if(r)return r;if(A.isObjectLiteralExpression(t)){let n=bw(t,e);if(n)return n;let i={};for(let o of t.properties){if(!A.isPropertyAssignment(o)||!A.isIdentifier(o.name))continue;let s=eo(o.initializer,e);s!==null?i[o.name.text]=s:e.errors.push(`Unsupported object literal property "${o.name.text}": ${jr(o.initializer)}`)}return{kind:"literal",value:i}}if(A.isArrayLiteralExpression(t)){let n=[];for(let i of t.elements){if(!A.isExpression(i))continue;let o=eo(i,e);o!==null?n.push(o):e.errors.push(`Unsupported array element expression: ${jr(i)}`)}return n}return null}function Sw(t){return A.isIdentifier(t)?t.text:A.isPropertyAccessExpression(t)&&A.isIdentifier(t.name)?t.name.text:null}function Np(t){return t.getText()}function ya(t,e){let r=[];for(let n of t){if(A.isJsxText(n)){let i=n.getText().trim();i&&r.push({kind:"text",value:i});continue}if(A.isJsxExpression(n)&&n.expression){let i=In(n.expression,e);if(i){r.push(i);continue}let o=Mp(n.expression,e);o?Array.isArray(o)?r.push(...o):r.push(o):e.errors.push(`Unsupported JSX child expression: ${jr(n.expression)}`);continue}if(A.isJsxElement(n)||A.isJsxSelfClosingElement(n)){let i=Rn(n,e);i&&r.push(i)}}return r}function xw(t,e){if(t.length===0)return null;let r=t[0];return r in e.propBindings?Tp(e.propBindings[r],t.slice(1)):r===e.vmName?{kind:"binding",path:ga(t.slice(1))}:null}function Mp(t,e){if(A.isParenthesizedExpression(t))return Mp(t.expression,e);if(A.isCallExpression(t)&&A.isPropertyAccessExpression(t.expression)){let n=va(t.expression.expression),i=t.expression.name.text;if(n&&i==="map"&&t.arguments.length>=1){let o=xw(n,e);if(!o)return null;let s=t.arguments[0];if(!A.isArrowFunction(s)&&!A.isFunctionExpression(s))return e.errors.push("map callback must be an arrow function"),null;let a=s.parameters;if(a.length!==1||!A.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=A.isParenthesizedExpression(s.body)?s.body.expression:s.body;if(A.isBlock(s.body))return e.errors.push("map callback body must be a JSX expression, not a block"),null;if(A.isJsxElement(p)||A.isJsxSelfClosingElement(p)?f=Rn(p,l):A.isJsxFragment(p)&&(f=wa(p,l)),!f)return null;let d;if(A.isJsxElement(p)||A.isJsxSelfClosingElement(p)){let m=A.isJsxElement(p)?p.openingElement.attributes:p.attributes;for(let g of m.properties)if(!(!A.isJsxAttribute(g)||Np(g.name)!=="key"||!g.initializer)&&A.isJsxExpression(g.initializer)&&g.initializer.expression){let y=In(g.initializer.expression,l);y&&(d=y)}}return{kind:"map",source:o,item:c,key:d,body:f}}}if(A.isJsxElement(t)||A.isJsxSelfClosingElement(t))return Rn(t,e);let r=In(t,e);return r||null}function wa(t,e){return{kind:"fragment",children:ya(t.children,e)}}function $w(t,e,r){let n=r.viewImports.get(t);return n?Rp(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 Rn(t,e){let r=A.isJsxElement(t)?t.openingElement:t,n=Sw(r.tagName);if(!n)return e.errors.push("Unsupported JSX tag expression"),null;let i={};for(let c of r.attributes.properties){if(!A.isJsxAttribute(c))continue;let l=Np(c.name);if(l!=="key"){if(!c.initializer){i[l]=!0;continue}if(A.isStringLiteral(c.initializer)){i[l]=c.initializer.text;continue}if(A.isJsxExpression(c.initializer)&&c.initializer.expression){let f=eo(c.initializer.expression,e);f!==null?i[l]=f:e.errors.push(`Unsupported JSX prop expression for "${l}" on <${n}>: ${jr(c.initializer.expression)}`)}}}if(!e.allowedComponents.has(n)){let c=$w(n,i,e);return c||(e.errors.push(`Component "${n}" is not in the allowed registry`),null)}_w(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=A.isJsxElement(t)?ya(t.children,l):[];return{kind:"map",source:c,item:s,body:{kind:"component",name:n,props:i,children:f}}}let a=A.isJsxElement(t)?ya(t.children,o):[];return{kind:"component",name:n,props:i,children:a}}function kw(t){let e=null;function r(n){if(A.isCallExpression(n)&&A.isIdentifier(n.expression)&&n.expression.text==="screen"&&n.arguments.length===1&&(A.isArrowFunction(n.arguments[0])||A.isFunctionExpression(n.arguments[0]))){let i=n.arguments[0],o="unknown";if(n.typeArguments&&n.typeArguments.length===1){let a=n.typeArguments[0];A.isTypeReferenceNode(a)&&A.isIdentifier(a.typeName)&&(o=a.typeName.text)}let s=i.body;if(A.isParenthesizedExpression(s))(A.isJsxElement(s.expression)||A.isJsxSelfClosingElement(s.expression))&&(e={viewModel:o,jsxRoot:s.expression});else if(A.isJsxElement(s)||A.isJsxSelfClosingElement(s))e={viewModel:o,jsxRoot:s};else if(A.isBlock(s)&&s.statements.length===1){let a=s.statements[0];A.isReturnStatement(a)&&a.expression&&(A.isParenthesizedExpression(a.expression)?e={viewModel:o,jsxRoot:a.expression.expression}:e={viewModel:o,jsxRoot:a.expression})}}A.forEachChild(n,r)}return r(t),e}function Vp(t,e,r,n={}){let i=new Set(At);for(let p of n.allowlistExtra??[])i.add(p);let o=Ap(e),s=Op(o),a=A.createSourceFile(o,t,A.ScriptTarget.Latest,!0,A.ScriptKind.TSX),c={vmName:"vm",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:ha(a,s),allowedComponents:i},l=kw(a);if(!l)return{viewModel:"unknown",exportName:r,root:{kind:"fragment",children:[]},errors:["No screen<T>() default export found"],warnings:[]};let f=A.isJsxElement(l.jsxRoot)||A.isJsxSelfClosingElement(l.jsxRoot)?Rn(l.jsxRoot,c):A.isJsxFragment(l.jsxRoot)?wa(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 Ew(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 A.isJsxElement(t.jsxRoot)||A.isJsxSelfClosingElement(t.jsxRoot)?Rn(t.jsxRoot,n):A.isJsxFragment(t.jsxRoot)?wa(t.jsxRoot,n):A.isConditionalExpression(t.jsxRoot)?(e.errors.push("view() partial root must be a JSX element or fragment; conditional expressions are not supported"),null):A.isExpression(t.jsxRoot)?(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported expression: ${jr(t.jsxRoot)}`),null):(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported syntax kind: ${A.SyntaxKind[t.jsxRoot.kind]}`),null)}function Lp(t,e,r,n={}){let i=new Set(At);for(let p of n.allowlistExtra??[])i.add(p);let o=Ap(e),s=Op(o),a=A.createSourceFile(o,t,A.ScriptTarget.Latest,!0,A.ScriptKind.TSX),c=ma(a,r),l={vmName:c?.paramName??"__noop",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:ha(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=Ew(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 jp(t){return`${t.sourcePath}:${t.name}`}Tt();function ba(t,e){let r=[],n=[],i=o=>{if(o.kind!=="viewRef"){if(o.kind==="component"){!At.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 Pw(t,e,r){let n=await Dp(t,"utf-8"),i=Lp(n,t,e,{allowlistExtra:r.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t} (${e}):
|
|
462
754
|
${i.errors.map(o=>` - ${o}`).join(`
|
|
463
|
-
`)}`);if(
|
|
755
|
+
`)}`);if(r.extensionRegistry){let o=ba(i.root,r.extensionRegistry);if(o.errors.length>0)throw new Error(`Extension validation errors in ${t} (${e}):
|
|
464
756
|
${o.errors.map(s=>` - ${s}`).join(`
|
|
465
|
-
`)}`);i.warnings.push(...o.warnings)}for(let o of i.warnings)console.warn(`Warning in ${t
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
`
|
|
472
|
-
\r`;function i(l){if(l===null)return!1;let u=0,d=l.length,f=n;for(let h=0;h<d;h++){let m=f.indexOf(l.charAt(h));if(!(m>64)){if(m<0)return!1;u+=6}}return u%8===0}function o(l){let u=l.replace(/[\r\n=]/g,""),d=u.length,f=n,h=0,m=[];for(let v=0;v<d;v++)v%4===0&&v&&(m.push(h>>16&255),m.push(h>>8&255),m.push(h&255)),h=h<<6|f.indexOf(u.charAt(v));let g=d%4*6;return g===0?(m.push(h>>16&255),m.push(h>>8&255),m.push(h&255)):g===18?(m.push(h>>10&255),m.push(h>>2&255)):g===12&&m.push(h>>4&255),new Uint8Array(m)}function s(l){let u="",d=0,f=l.length,h=n;for(let g=0;g<f;g++)g%3===0&&g&&(u+=h[d>>18&63],u+=h[d>>12&63],u+=h[d>>6&63],u+=h[d&63]),d=(d<<8)+l[g];let m=f%3;return m===0?(u+=h[d>>18&63],u+=h[d>>12&63],u+=h[d>>6&63],u+=h[d&63]):m===2?(u+=h[d>>10&63],u+=h[d>>4&63],u+=h[d<<2&63],u+=h[64]):m===1&&(u+=h[d>>2&63],u+=h[d<<4&63],u+=h[64],u+=h[64]),u}function a(l){return Object.prototype.toString.call(l)==="[object Uint8Array]"}e.exports=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:o,predicate:a,represent:s})})),zu=le(((t,e)=>{var r=Ae(),n=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function o(a){if(a===null)return!0;let l=[],u=a;for(let d=0,f=u.length;d<f;d+=1){let h=u[d],m=!1;if(i.call(h)!=="[object Object]")return!1;let g;for(g in h)if(n.call(h,g))if(!m)m=!0;else return!1;if(!m)return!1;if(l.indexOf(g)===-1)l.push(g);else return!1}return!0}function s(a){return a!==null?a:[]}e.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:o,construct:s})})),Ku=le(((t,e)=>{var r=Ae(),n=Object.prototype.toString;function i(s){if(s===null)return!0;let a=s,l=new Array(a.length);for(let u=0,d=a.length;u<d;u+=1){let f=a[u];if(n.call(f)!=="[object Object]")return!1;let h=Object.keys(f);if(h.length!==1)return!1;l[u]=[h[0],f[h[0]]]}return!0}function o(s){if(s===null)return[];let a=s,l=new Array(a.length);for(let u=0,d=a.length;u<d;u+=1){let f=a[u],h=Object.keys(f);l[u]=[h[0],f[h[0]]]}return l}e.exports=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:o})})),Ju=le(((t,e)=>{var r=Ae(),n=Object.prototype.hasOwnProperty;function i(s){if(s===null)return!0;let a=s;for(let l in a)if(n.call(a,l)&&a[l]!==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})})),js=le(((t,e)=>{e.exports=Bu().extend({implicit:[Uu(),Gu()],explicit:[Wu(),zu(),Ku(),Ju()]})})),Gy=le(((t,e)=>{var r=cn(),n=ln(),i=Uy(),o=js(),s=Object.prototype.hasOwnProperty,a=1,l=2,u=3,d=4,f=1,h=2,m=3,g=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,v=/[\x85\u2028\u2029]/,P=/[,\[\]{}]/,S=/^(?:!|!!|![0-9A-Za-z-]+!)$/,q=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function B(c){return Object.prototype.toString.call(c)}function j(c){return c===10||c===13}function L(c){return c===9||c===32}function Q(c){return c===9||c===32||c===10||c===13}function ne(c){return c===44||c===91||c===93||c===123||c===125}function Tt(c){if(c>=48&&c<=57)return c-48;let y=c|32;return y>=97&&y<=102?y-97+10:-1}function et(c){return c===120?2:c===117?4:c===85?8:0}function be(c){return c>=48&&c<=57?c-48:-1}function Ne(c){switch(c){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
|
|
473
|
-
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"\x85";case 95:return"\xA0";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function Ce(c){return c<=65535?String.fromCharCode(c):String.fromCharCode((c-65536>>10)+55296,(c-65536&1023)+56320)}function tt(c,y,E){y==="__proto__"?Object.defineProperty(c,y,{configurable:!0,enumerable:!0,writable:!0,value:E}):c[y]=E}var rt=new Array(256),vt=new Array(256);for(let c=0;c<256;c++)rt[c]=Ne(c)?1:0,vt[c]=Ne(c);function oe(c,y){this.input=c,this.filename=y.filename||null,this.schema=y.schema||o,this.onWarning=y.onWarning||null,this.legacy=y.legacy||!1,this.json=y.json||!1,this.listener=y.listener||null,this.maxDepth=typeof y.maxDepth=="number"?y.maxDepth:100,this.maxMergeSeqLength=typeof y.maxMergeSeqLength=="number"?y.maxMergeSeqLength:20,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=c.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function di(c,y){let E={name:c.filename,buffer:c.input.slice(0,-1),position:c.position,line:c.line,column:c.position-c.lineStart};return E.snippet=i(E),new n(y,E)}function D(c,y){throw di(c,y)}function gr(c,y){c.onWarning&&c.onWarning.call(null,di(c,y))}function _t(c,y,E){let x=c.anchorMapTransactions;if(x.length!==0){let b=x[x.length-1];s.call(b,y)||(b[y]={existed:s.call(c.anchorMap,y),value:c.anchorMap[y]})}c.anchorMap[y]=E}function us(c){c.anchorMapTransactions.push(Object.create(null))}function zt(c){let y=c.anchorMapTransactions.pop(),E=c.anchorMapTransactions;if(E.length===0)return;let x=E[E.length-1],b=Object.keys(y);for(let R=0,p=b.length;R<p;R+=1){let _=b[R];s.call(x,_)||(x[_]=y[_])}}function fs(c){let y=c.anchorMapTransactions.pop(),E=Object.keys(y);for(let x=E.length-1;x>=0;x-=1){let b=y[E[x]];b.existed?c.anchorMap[E[x]]=b.value:delete c.anchorMap[E[x]]}}function tn(c){return{position:c.position,line:c.line,lineStart:c.lineStart,lineIndent:c.lineIndent,firstTabInLine:c.firstTabInLine,tag:c.tag,anchor:c.anchor,kind:c.kind,result:c.result}}function yr(c,y){c.position=y.position,c.line=y.line,c.lineStart=y.lineStart,c.lineIndent=y.lineIndent,c.firstTabInLine=y.firstTabInLine,c.tag=y.tag,c.anchor=y.anchor,c.kind=y.kind,c.result=y.result}var pi={YAML:function(y,E,x){y.version!==null&&D(y,"duplication of %YAML directive"),x.length!==1&&D(y,"YAML directive accepts exactly one argument");let b=/^([0-9]+)\.([0-9]+)$/.exec(x[0]);b===null&&D(y,"ill-formed argument of the YAML directive");let R=parseInt(b[1],10),p=parseInt(b[2],10);R!==1&&D(y,"unacceptable YAML version of the document"),y.version=x[0],y.checkLineBreaks=p<2,p!==1&&p!==2&&gr(y,"unsupported YAML version of the document")},TAG:function(y,E,x){let b;x.length!==2&&D(y,"TAG directive accepts exactly two arguments");let R=x[0];b=x[1],S.test(R)||D(y,"ill-formed tag handle (first argument) of the TAG directive"),s.call(y.tagMap,R)&&D(y,'there is a previously declared suffix for "'+R+'" tag handle'),q.test(b)||D(y,"ill-formed tag prefix (second argument) of the TAG directive");try{b=decodeURIComponent(b)}catch{D(y,"tag prefix is malformed: "+b)}y.tagMap[R]=b}};function qe(c,y,E,x){if(y<E){let b=c.input.slice(y,E);if(x)for(let R=0,p=b.length;R<p;R+=1){let _=b.charCodeAt(R);_===9||_>=32&&_<=1114111||D(c,"expected valid JSON character")}else g.test(b)&&D(c,"the stream contains non-printable characters");c.result+=b}}function Nt(c,y,E,x){r.isObject(E)||D(c,"cannot merge mappings; the provided source object is unacceptable");let b=Object.keys(E);for(let R=0,p=b.length;R<p;R+=1){let _=b[R];s.call(y,_)||(tt(y,_,E[_]),x[_]=!0)}}function wt(c,y,E,x,b,R,p,_,A){if(Array.isArray(b)){b=Array.prototype.slice.call(b);for(let $=0,C=b.length;$<C;$+=1)Array.isArray(b[$])&&D(c,"nested arrays are not supported inside keys"),typeof b=="object"&&B(b[$])==="[object Object]"&&(b[$]="[object Object]")}if(typeof b=="object"&&B(b)==="[object Object]"&&(b="[object Object]"),b=String(b),y===null&&(y={}),x==="tag:yaml.org,2002:merge")if(Array.isArray(R)){R.length>c.maxMergeSeqLength&&D(c,"merge sequence length exceeded maxMergeSeqLength ("+c.maxMergeSeqLength+")");let $=new Set;for(let C=0,O=R.length;C<O;C+=1){let k=R[C];$.has(k)||($.add(k),Nt(c,y,k,E))}}else Nt(c,y,R,E);else!c.json&&!s.call(E,b)&&s.call(y,b)&&(c.line=p||c.line,c.lineStart=_||c.lineStart,c.position=A||c.position,D(c,"duplicated mapping key")),tt(y,b,R),delete E[b];return y}function vr(c){let y=c.input.charCodeAt(c.position);y===10?c.position++:y===13?(c.position++,c.input.charCodeAt(c.position)===10&&c.position++):D(c,"a line break is expected"),c.line+=1,c.lineStart=c.position,c.firstTabInLine=-1}function he(c,y,E){let x=0,b=c.input.charCodeAt(c.position);for(;b!==0;){for(;L(b);)b===9&&c.firstTabInLine===-1&&(c.firstTabInLine=c.position),b=c.input.charCodeAt(++c.position);if(y&&b===35)do b=c.input.charCodeAt(++c.position);while(b!==10&&b!==13&&b!==0);if(j(b))for(vr(c),b=c.input.charCodeAt(c.position),x++,c.lineIndent=0;b===32;)c.lineIndent++,b=c.input.charCodeAt(++c.position);else break}return E!==-1&&x!==0&&c.lineIndent<E&&gr(c,"deficient indentation"),x}function _r(c){let y=c.position,E=c.input.charCodeAt(y);return!!((E===45||E===46)&&E===c.input.charCodeAt(y+1)&&E===c.input.charCodeAt(y+2)&&(y+=3,E=c.input.charCodeAt(y),E===0||Q(E)))}function bt(c,y){y===1?c.result+=" ":y>1&&(c.result+=r.repeat(`
|
|
474
|
-
`,y-1))}function hi(c,y,E){let x,b,R,p,_,A,$=c.kind,C=c.result,O=c.input.charCodeAt(c.position);if(Q(O)||ne(O)||O===35||O===38||O===42||O===33||O===124||O===62||O===39||O===34||O===37||O===64||O===96)return!1;if(O===63||O===45){let k=c.input.charCodeAt(c.position+1);if(Q(k)||E&&ne(k))return!1}for(c.kind="scalar",c.result="",x=b=c.position,R=!1;O!==0;){if(O===58){let k=c.input.charCodeAt(c.position+1);if(Q(k)||E&&ne(k))break}else if(O===35){if(Q(c.input.charCodeAt(c.position-1)))break}else{if(c.position===c.lineStart&&_r(c)||E&&ne(O))break;if(j(O))if(p=c.line,_=c.lineStart,A=c.lineIndent,he(c,!1,-1),c.lineIndent>=y){R=!0,O=c.input.charCodeAt(c.position);continue}else{c.position=b,c.line=p,c.lineStart=_,c.lineIndent=A;break}}R&&(qe(c,x,b,!1),bt(c,c.line-p),x=b=c.position,R=!1),L(O)||(b=c.position+1),O=c.input.charCodeAt(++c.position)}return qe(c,x,b,!1),c.result?!0:(c.kind=$,c.result=C,!1)}function mi(c,y){let E,x,b=c.input.charCodeAt(c.position);if(b!==39)return!1;for(c.kind="scalar",c.result="",c.position++,E=x=c.position;(b=c.input.charCodeAt(c.position))!==0;)if(b===39)if(qe(c,E,c.position,!0),b=c.input.charCodeAt(++c.position),b===39)E=c.position,c.position++,x=c.position;else return!0;else j(b)?(qe(c,E,x,!0),bt(c,he(c,!1,y)),E=x=c.position):c.position===c.lineStart&&_r(c)?D(c,"unexpected end of the document within a single quoted scalar"):(c.position++,L(b)||(x=c.position));D(c,"unexpected end of the stream within a single quoted scalar")}function rn(c,y){let E,x,b,R=c.input.charCodeAt(c.position);if(R!==34)return!1;for(c.kind="scalar",c.result="",c.position++,E=x=c.position;(R=c.input.charCodeAt(c.position))!==0;){if(R===34)return qe(c,E,c.position,!0),c.position++,!0;if(R===92){if(qe(c,E,c.position,!0),R=c.input.charCodeAt(++c.position),j(R))he(c,!1,y);else if(R<256&&rt[R])c.result+=vt[R],c.position++;else if((b=et(R))>0){let p=b,_=0;for(;p>0;p--)R=c.input.charCodeAt(++c.position),(b=Tt(R))>=0?_=(_<<4)+b:D(c,"expected hexadecimal character");c.result+=Ce(_),c.position++}else D(c,"unknown escape sequence");E=x=c.position}else j(R)?(qe(c,E,x,!0),bt(c,he(c,!1,y)),E=x=c.position):c.position===c.lineStart&&_r(c)?D(c,"unexpected end of the document within a double quoted scalar"):(c.position++,L(R)||(x=c.position))}D(c,"unexpected end of the stream within a double quoted scalar")}function gi(c,y){let E=!0,x,b,R,p=c.tag,_,A=c.anchor,$,C,O,k,N=Object.create(null),T,F,U,Z=c.input.charCodeAt(c.position);if(Z===91)$=93,k=!1,_=[];else if(Z===123)$=125,k=!0,_={};else return!1;for(c.anchor!==null&&_t(c,c.anchor,_),Z=c.input.charCodeAt(++c.position);Z!==0;){if(he(c,!0,y),Z=c.input.charCodeAt(c.position),Z===$)return c.position++,c.tag=p,c.anchor=A,c.kind=k?"mapping":"sequence",c.result=_,!0;E?Z===44&&D(c,"expected the node content, but found ','"):D(c,"missed comma between flow collection entries"),F=T=U=null,C=O=!1,Z===63&&Q(c.input.charCodeAt(c.position+1))&&(C=O=!0,c.position++,he(c,!0,y)),x=c.line,b=c.lineStart,R=c.position,Et(c,y,a,!1,!0),F=c.tag,T=c.result,he(c,!0,y),Z=c.input.charCodeAt(c.position),(O||c.line===x)&&Z===58&&(C=!0,Z=c.input.charCodeAt(++c.position),he(c,!0,y),Et(c,y,a,!1,!0),U=c.result),k?wt(c,_,N,F,T,U,x,b,R):C?_.push(wt(c,null,N,F,T,U,x,b,R)):_.push(T),he(c,!0,y),Z=c.input.charCodeAt(c.position),Z===44?(E=!0,Z=c.input.charCodeAt(++c.position)):E=!1}D(c,"unexpected end of the stream within a flow collection")}function yi(c,y){let E,x=f,b=!1,R=!1,p=y,_=0,A=!1,$,C=c.input.charCodeAt(c.position);if(C===124)E=!1;else if(C===62)E=!0;else return!1;for(c.kind="scalar",c.result="";C!==0;)if(C=c.input.charCodeAt(++c.position),C===43||C===45)f===x?x=C===43?m:h:D(c,"repeat of a chomping mode identifier");else if(($=be(C))>=0)$===0?D(c,"bad explicit indentation width of a block scalar; it cannot be less than one"):R?D(c,"repeat of an indentation width identifier"):(p=y+$-1,R=!0);else break;if(L(C)){do C=c.input.charCodeAt(++c.position);while(L(C));if(C===35)do C=c.input.charCodeAt(++c.position);while(!j(C)&&C!==0)}for(;C!==0;){for(vr(c),c.lineIndent=0,C=c.input.charCodeAt(c.position);(!R||c.lineIndent<p)&&C===32;)c.lineIndent++,C=c.input.charCodeAt(++c.position);if(!R&&c.lineIndent>p&&(p=c.lineIndent),j(C)){_++;continue}if(!R&&p===0&&D(c,"missing indentation for block scalar"),c.lineIndent<p){x===m?c.result+=r.repeat(`
|
|
475
|
-
`,b?1+_:_):x===f&&b&&(c.result+=`
|
|
476
|
-
`);break}E?L(C)?(A=!0,c.result+=r.repeat(`
|
|
477
|
-
`,b?1+_:_)):A?(A=!1,c.result+=r.repeat(`
|
|
478
|
-
`,_+1)):_===0?b&&(c.result+=" "):c.result+=r.repeat(`
|
|
479
|
-
`,_):c.result+=r.repeat(`
|
|
480
|
-
`,b?1+_:_),b=!0,R=!0,_=0;let O=c.position;for(;!j(C)&&C!==0;)C=c.input.charCodeAt(++c.position);qe(c,O,c.position,!1)}return!0}function St(c,y){let E=c.tag,x=c.anchor,b=[],R=!1;if(c.firstTabInLine!==-1)return!1;c.anchor!==null&&_t(c,c.anchor,b);let p=c.input.charCodeAt(c.position);for(;p!==0&&(c.firstTabInLine!==-1&&(c.position=c.firstTabInLine,D(c,"tab characters must not be used in indentation")),!(p!==45||!Q(c.input.charCodeAt(c.position+1))));){if(R=!0,c.position++,he(c,!0,-1)&&c.lineIndent<=y){b.push(null),p=c.input.charCodeAt(c.position);continue}let _=c.line;if(Et(c,y,u,!1,!0),b.push(c.result),he(c,!0,-1),p=c.input.charCodeAt(c.position),(c.line===_||c.lineIndent>y)&&p!==0)D(c,"bad indentation of a sequence entry");else if(c.lineIndent<y)break}return R?(c.tag=E,c.anchor=x,c.kind="sequence",c.result=b,!0):!1}function vi(c,y,E){let x,b,R,p,_=c.tag,A=c.anchor,$={},C=Object.create(null),O=null,k=null,N=null,T=!1,F=!1;if(c.firstTabInLine!==-1)return!1;c.anchor!==null&&_t(c,c.anchor,$);let U=c.input.charCodeAt(c.position);for(;U!==0;){!T&&c.firstTabInLine!==-1&&(c.position=c.firstTabInLine,D(c,"tab characters must not be used in indentation"));let Z=c.input.charCodeAt(c.position+1),pe=c.line;if((U===63||U===58)&&Q(Z))U===63?(T&&(wt(c,$,C,O,k,null,b,R,p),O=k=N=null),F=!0,T=!0,x=!0):T?(T=!1,x=!0):D(c,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),c.position+=1,U=Z;else{if(b=c.line,R=c.lineStart,p=c.position,!Et(c,E,l,!1,!0))break;if(c.line===pe){for(U=c.input.charCodeAt(c.position);L(U);)U=c.input.charCodeAt(++c.position);if(U===58)U=c.input.charCodeAt(++c.position),Q(U)||D(c,"a whitespace character is expected after the key-value separator within a block mapping"),T&&(wt(c,$,C,O,k,null,b,R,p),O=k=N=null),F=!0,T=!1,x=!1,O=c.tag,k=c.result;else if(F)D(c,"can not read an implicit mapping pair; a colon is missed");else return c.tag=_,c.anchor=A,!0}else if(F)D(c,"can not read a block mapping entry; a multiline key may not be an implicit key");else return c.tag=_,c.anchor=A,!0}if((c.line===pe||c.lineIndent>y)&&(T&&(b=c.line,R=c.lineStart,p=c.position),Et(c,y,d,!0,x)&&(T?k=c.result:N=c.result),T||(wt(c,$,C,O,k,N,b,R,p),O=k=N=null),he(c,!0,-1),U=c.input.charCodeAt(c.position)),(c.line===pe||c.lineIndent>y)&&U!==0)D(c,"bad indentation of a mapping entry");else if(c.lineIndent<y)break}return T&&wt(c,$,C,O,k,null,b,R,p),F&&(c.tag=_,c.anchor=A,c.kind="mapping",c.result=$),F}function ds(c){let y=!1,E=!1,x,b,R=c.input.charCodeAt(c.position);if(R!==33)return!1;c.tag!==null&&D(c,"duplication of a tag property"),R=c.input.charCodeAt(++c.position),R===60?(y=!0,R=c.input.charCodeAt(++c.position)):R===33?(E=!0,x="!!",R=c.input.charCodeAt(++c.position)):x="!";let p=c.position;if(y){do R=c.input.charCodeAt(++c.position);while(R!==0&&R!==62);c.position<c.length?(b=c.input.slice(p,c.position),R=c.input.charCodeAt(++c.position)):D(c,"unexpected end of the stream within a verbatim tag")}else{for(;R!==0&&!Q(R);)R===33&&(E?D(c,"tag suffix cannot contain exclamation marks"):(x=c.input.slice(p-1,c.position+1),S.test(x)||D(c,"named tag handle cannot contain such characters"),E=!0,p=c.position+1)),R=c.input.charCodeAt(++c.position);b=c.input.slice(p,c.position),P.test(b)&&D(c,"tag suffix cannot contain flow indicator characters")}b&&!q.test(b)&&D(c,"tag name cannot contain such characters: "+b);try{b=decodeURIComponent(b)}catch{D(c,"tag name is malformed: "+b)}return y?c.tag=b:s.call(c.tagMap,x)?c.tag=c.tagMap[x]+b:x==="!"?c.tag="!"+b:x==="!!"?c.tag="tag:yaml.org,2002:"+b:D(c,'undeclared tag handle "'+x+'"'),!0}function _i(c){let y=c.input.charCodeAt(c.position);if(y!==38)return!1;c.anchor!==null&&D(c,"duplication of an anchor property"),y=c.input.charCodeAt(++c.position);let E=c.position;for(;y!==0&&!Q(y)&&!ne(y);)y=c.input.charCodeAt(++c.position);return c.position===E&&D(c,"name of an anchor node must contain at least one character"),c.anchor=c.input.slice(E,c.position),!0}function wi(c){let y=c.input.charCodeAt(c.position);if(y!==42)return!1;y=c.input.charCodeAt(++c.position);let E=c.position;for(;y!==0&&!Q(y)&&!ne(y);)y=c.input.charCodeAt(++c.position);c.position===E&&D(c,"name of an alias node must contain at least one character");let x=c.input.slice(E,c.position);return s.call(c.anchorMap,x)||D(c,'unidentified alias "'+x+'"'),c.result=c.anchorMap[x],he(c,!0,-1),!0}function ps(c,y,E,x){let b=tn(c);return us(c),yr(c,y),c.tag=null,c.anchor=null,c.kind=null,c.result=null,vi(c,E,x)&&c.kind==="mapping"?(zt(c),!0):(fs(c),yr(c,b),!1)}function Et(c,y,E,x,b){let R,p,_=1,A=!1,$=!1,C=null,O,k,N;c.depth>=c.maxDepth&&D(c,"nesting exceeded maxDepth ("+c.maxDepth+")"),c.depth+=1,c.listener!==null&&c.listener("open",c),c.tag=null,c.anchor=null,c.kind=null,c.result=null;let T=R=p=d===E||u===E;if(x&&he(c,!0,-1)&&(A=!0,c.lineIndent>y?_=1:c.lineIndent===y?_=0:c.lineIndent<y&&(_=-1)),_===1)for(;;){let F=c.input.charCodeAt(c.position),U=tn(c);if(A&&(F===33&&c.tag!==null||F===38&&c.anchor!==null)||!ds(c)&&!_i(c))break;C===null&&(C=U),he(c,!0,-1)?(A=!0,p=T,c.lineIndent>y?_=1:c.lineIndent===y?_=0:c.lineIndent<y&&(_=-1)):p=!1}if(p&&(p=A||b),_===1||d===E)if(a===E||l===E?k=y:k=y+1,N=c.position-c.lineStart,_===1)if(p&&(St(c,N)||vi(c,N,k))||gi(c,k))$=!0;else{let F=c.input.charCodeAt(c.position);C!==null&&T&&!p&&F!==124&&F!==62&&ps(c,C,C.position-C.lineStart,k)||R&&yi(c,k)||mi(c,k)||rn(c,k)?$=!0:wi(c)?($=!0,(c.tag!==null||c.anchor!==null)&&D(c,"alias node should not have any properties")):hi(c,k,a===E)&&($=!0,c.tag===null&&(c.tag="?")),c.anchor!==null&&_t(c,c.anchor,c.result)}else _===0&&($=p&&St(c,N));if(c.tag===null)c.anchor!==null&&_t(c,c.anchor,c.result);else if(c.tag==="?"){c.result!==null&&c.kind!=="scalar"&&D(c,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+c.kind+'"');for(let F=0,U=c.implicitTypes.length;F<U;F+=1)if(O=c.implicitTypes[F],O.resolve(c.result)){c.result=O.construct(c.result),c.tag=O.tag,c.anchor!==null&&_t(c,c.anchor,c.result);break}}else if(c.tag!=="!"){if(s.call(c.typeMap[c.kind||"fallback"],c.tag))O=c.typeMap[c.kind||"fallback"][c.tag];else{O=null;let F=c.typeMap.multi[c.kind||"fallback"];for(let U=0,Z=F.length;U<Z;U+=1)if(c.tag.slice(0,F[U].tag.length)===F[U].tag){O=F[U];break}}O||D(c,"unknown tag !<"+c.tag+">"),c.result!==null&&O.kind!==c.kind&&D(c,"unacceptable node kind for !<"+c.tag+'> tag; it should be "'+O.kind+'", not "'+c.kind+'"'),O.resolve(c.result,c.tag)?(c.result=O.construct(c.result,c.tag),c.anchor!==null&&_t(c,c.anchor,c.result)):D(c,"cannot resolve a node with !<"+c.tag+"> explicit tag")}return c.listener!==null&&c.listener("close",c),c.depth-=1,c.tag!==null||c.anchor!==null||$}function hs(c){let y=c.position,E=!1,x;for(c.version=null,c.checkLineBreaks=c.legacy,c.tagMap=Object.create(null),c.anchorMap=Object.create(null);(x=c.input.charCodeAt(c.position))!==0&&(he(c,!0,-1),x=c.input.charCodeAt(c.position),!(c.lineIndent>0||x!==37));){E=!0,x=c.input.charCodeAt(++c.position);let b=c.position;for(;x!==0&&!Q(x);)x=c.input.charCodeAt(++c.position);let R=c.input.slice(b,c.position),p=[];for(R.length<1&&D(c,"directive name must not be less than one character in length");x!==0;){for(;L(x);)x=c.input.charCodeAt(++c.position);if(x===35){do x=c.input.charCodeAt(++c.position);while(x!==0&&!j(x));break}if(j(x))break;for(b=c.position;x!==0&&!Q(x);)x=c.input.charCodeAt(++c.position);p.push(c.input.slice(b,c.position))}x!==0&&vr(c),s.call(pi,R)?pi[R](c,R,p):gr(c,'unknown document directive "'+R+'"')}if(he(c,!0,-1),c.lineIndent===0&&c.input.charCodeAt(c.position)===45&&c.input.charCodeAt(c.position+1)===45&&c.input.charCodeAt(c.position+2)===45?(c.position+=3,he(c,!0,-1)):E&&D(c,"directives end mark is expected"),Et(c,c.lineIndent-1,d,!1,!0),he(c,!0,-1),c.checkLineBreaks&&v.test(c.input.slice(y,c.position))&&gr(c,"non-ASCII line breaks are interpreted as content"),c.documents.push(c.result),c.position===c.lineStart&&_r(c)){c.input.charCodeAt(c.position)===46&&(c.position+=3,he(c,!0,-1));return}c.position<c.length-1&&D(c,"end of the stream or a document separator is expected")}function bi(c,y){c=String(c),y=y||{},c.length!==0&&(c.charCodeAt(c.length-1)!==10&&c.charCodeAt(c.length-1)!==13&&(c+=`
|
|
481
|
-
`),c.charCodeAt(0)===65279&&(c=c.slice(1)));let E=new oe(c,y),x=c.indexOf("\0");for(x!==-1&&(E.position=x,D(E,"null byte is not allowed in input")),E.input+="\0";E.input.charCodeAt(E.position)===32;)E.lineIndent+=1,E.position+=1;for(;E.position<E.length-1;)hs(E);return E.documents}function Si(c,y,E){y!==null&&typeof y=="object"&&typeof E>"u"&&(E=y,y=null);let x=bi(c,E);if(typeof y!="function")return x;for(let b=0,R=x.length;b<R;b+=1)y(x[b])}function ms(c,y){let E=bi(c,y);if(E.length!==0){if(E.length===1)return E[0];throw new n("expected a single document in the stream, but found more")}}e.exports.loadAll=Si,e.exports.load=ms})),Wy=le(((t,e)=>{var r=cn(),n=ln(),i=js(),o=Object.prototype.toString,s=Object.prototype.hasOwnProperty,a=65279,l=9,u=10,d=13,f=32,h=33,m=34,g=35,v=37,P=38,S=39,q=42,B=44,j=45,L=58,Q=61,ne=62,Tt=63,et=64,be=91,Ne=93,Ce=96,tt=123,rt=124,vt=125,oe={};oe[0]="\\0",oe[7]="\\a",oe[8]="\\b",oe[9]="\\t",oe[10]="\\n",oe[11]="\\v",oe[12]="\\f",oe[13]="\\r",oe[27]="\\e",oe[34]='\\"',oe[92]="\\\\",oe[133]="\\N",oe[160]="\\_",oe[8232]="\\L",oe[8233]="\\P";var di=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],D=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function gr(p,_){if(_===null)return{};let A={},$=Object.keys(_);for(let C=0,O=$.length;C<O;C+=1){let k=$[C],N=String(_[k]);k.slice(0,2)==="!!"&&(k="tag:yaml.org,2002:"+k.slice(2));let T=p.compiledTypeMap.fallback[k];T&&s.call(T.styleAliases,N)&&(N=T.styleAliases[N]),A[k]=N}return A}function _t(p){let _,A,$=p.toString(16).toUpperCase();if(p<=255)_="x",A=2;else if(p<=65535)_="u",A=4;else if(p<=4294967295)_="U",A=8;else throw new n("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+_+r.repeat("0",A-$.length)+$}var us=1,zt=2;function fs(p){this.schema=p.schema||i,this.indent=Math.max(1,p.indent||2),this.noArrayIndent=p.noArrayIndent||!1,this.skipInvalid=p.skipInvalid||!1,this.flowLevel=r.isNothing(p.flowLevel)?-1:p.flowLevel,this.styleMap=gr(this.schema,p.styles||null),this.sortKeys=p.sortKeys||!1,this.lineWidth=p.lineWidth||80,this.noRefs=p.noRefs||!1,this.noCompatMode=p.noCompatMode||!1,this.condenseFlow=p.condenseFlow||!1,this.quotingType=p.quotingType==='"'?zt:us,this.forceQuotes=p.forceQuotes||!1,this.replacer=typeof p.replacer=="function"?p.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function tn(p,_){let A=r.repeat(" ",_),$=0,C="",O=p.length;for(;$<O;){let k,N=p.indexOf(`
|
|
482
|
-
`,$);N===-1?(k=p.slice($),$=O):(k=p.slice($,N+1),$=N+1),k.length&&k!==`
|
|
483
|
-
`&&(C+=A),C+=k}return C}function yr(p,_){return`
|
|
484
|
-
`+r.repeat(" ",p.indent*_)}function pi(p,_){for(let A=0,$=p.implicitTypes.length;A<$;A+=1)if(p.implicitTypes[A].resolve(_))return!0;return!1}function qe(p){return p===f||p===l}function Nt(p){return p>=32&&p<=126||p>=161&&p<=55295&&p!==8232&&p!==8233||p>=57344&&p<=65533&&p!==a||p>=65536&&p<=1114111}function wt(p){return Nt(p)&&p!==a&&p!==d&&p!==u}function vr(p,_,A){let $=wt(p),C=$&&!qe(p);return(A?$:$&&p!==B&&p!==be&&p!==Ne&&p!==tt&&p!==vt)&&p!==g&&!(_===L&&!C)||wt(_)&&!qe(_)&&p===g||_===L&&C}function he(p){return Nt(p)&&p!==a&&!qe(p)&&p!==j&&p!==Tt&&p!==L&&p!==B&&p!==be&&p!==Ne&&p!==tt&&p!==vt&&p!==g&&p!==P&&p!==q&&p!==h&&p!==rt&&p!==Q&&p!==ne&&p!==S&&p!==m&&p!==v&&p!==et&&p!==Ce}function _r(p){return!qe(p)&&p!==L}function bt(p,_){let A=p.charCodeAt(_),$;return A>=55296&&A<=56319&&_+1<p.length&&($=p.charCodeAt(_+1),$>=56320&&$<=57343)?(A-55296)*1024+$-56320+65536:A}function hi(p){return/^\n* /.test(p)}var mi=1,rn=2,gi=3,yi=4,St=5;function vi(p,_,A,$,C,O,k,N){let T,F=0,U=null,Z=!1,pe=!1,nu=$!==-1,nn=-1,on=he(bt(p,0))&&_r(bt(p,p.length-1));if(_||k)for(T=0;T<p.length;F>=65536?T+=2:T++){if(F=bt(p,T),!Nt(F))return St;on=on&&vr(F,U,N),U=F}else{for(T=0;T<p.length;F>=65536?T+=2:T++){if(F=bt(p,T),F===u)Z=!0,nu&&(pe=pe||T-nn-1>$&&p[nn+1]!==" ",nn=T);else if(!Nt(F))return St;on=on&&vr(F,U,N),U=F}pe=pe||nu&&T-nn-1>$&&p[nn+1]!==" "}return!Z&&!pe?on&&!k&&!C(p)?mi:O===zt?St:rn:A>9&&hi(p)?St:k?O===zt?St:rn:pe?yi:gi}function ds(p,_,A,$,C){p.dump=(function(){if(_.length===0)return p.quotingType===zt?'""':"''";if(!p.noCompatMode&&(di.indexOf(_)!==-1||D.test(_)))return p.quotingType===zt?'"'+_+'"':"'"+_+"'";let O=p.indent*Math.max(1,A),k=p.lineWidth===-1?-1:Math.max(Math.min(p.lineWidth,40),p.lineWidth-O),N=$||p.flowLevel>-1&&A>=p.flowLevel;function T(F){return pi(p,F)}switch(vi(_,N,p.indent,k,T,p.quotingType,p.forceQuotes&&!$,C)){case mi:return _;case rn:return"'"+_.replace(/'/g,"''")+"'";case gi:return"|"+_i(_,p.indent)+wi(tn(_,O));case yi:return">"+_i(_,p.indent)+wi(tn(ps(_,k),O));case St:return'"'+hs(_,k)+'"';default:throw new n("impossible error: invalid scalar style")}})()}function _i(p,_){let A=hi(p)?String(_):"",$=p[p.length-1]===`
|
|
485
|
-
`;return A+($&&(p[p.length-2]===`
|
|
486
|
-
`||p===`
|
|
487
|
-
`)?"+":$?"":"-")+`
|
|
488
|
-
`}function wi(p){return p[p.length-1]===`
|
|
489
|
-
`?p.slice(0,-1):p}function ps(p,_){let A=/(\n+)([^\n]*)/g,$=(function(){let N=p.indexOf(`
|
|
490
|
-
`);return N=N!==-1?N:p.length,A.lastIndex=N,Et(p.slice(0,N),_)})(),C=p[0]===`
|
|
491
|
-
`||p[0]===" ",O,k;for(;k=A.exec(p);){let N=k[1],T=k[2];O=T[0]===" ",$+=N+(!C&&!O&&T!==""?`
|
|
492
|
-
`:"")+Et(T,_),C=O}return $}function Et(p,_){if(p===""||p[0]===" ")return p;let A=/ [^ ]/g,$,C=0,O,k=0,N=0,T="";for(;$=A.exec(p);)N=$.index,N-C>_&&(O=k>C?k:N,T+=`
|
|
493
|
-
`+p.slice(C,O),C=O+1),k=N;return T+=`
|
|
494
|
-
`,p.length-C>_&&k>C?T+=p.slice(C,k)+`
|
|
495
|
-
`+p.slice(k+1):T+=p.slice(C),T.slice(1)}function hs(p){let _="",A=0;for(let $=0;$<p.length;A>=65536?$+=2:$++){A=bt(p,$);let C=oe[A];!C&&Nt(A)?(_+=p[$],A>=65536&&(_+=p[$+1])):_+=C||_t(A)}return _}function bi(p,_,A){let $="",C=p.tag;for(let O=0,k=A.length;O<k;O+=1){let N=A[O];p.replacer&&(N=p.replacer.call(A,String(O),N)),(E(p,_,N,!1,!1)||typeof N>"u"&&E(p,_,null,!1,!1))&&($!==""&&($+=","+(p.condenseFlow?"":" ")),$+=p.dump)}p.tag=C,p.dump="["+$+"]"}function Si(p,_,A,$){let C="",O=p.tag;for(let k=0,N=A.length;k<N;k+=1){let T=A[k];p.replacer&&(T=p.replacer.call(A,String(k),T)),(E(p,_+1,T,!0,!0,!1,!0)||typeof T>"u"&&E(p,_+1,null,!0,!0,!1,!0))&&((!$||C!=="")&&(C+=yr(p,_)),p.dump&&u===p.dump.charCodeAt(0)?C+="-":C+="- ",C+=p.dump)}p.tag=O,p.dump=C||"[]"}function ms(p,_,A){let $="",C=p.tag,O=Object.keys(A);for(let k=0,N=O.length;k<N;k+=1){let T="";$!==""&&(T+=", "),p.condenseFlow&&(T+='"');let F=O[k],U=A[F];p.replacer&&(U=p.replacer.call(A,F,U)),E(p,_,F,!1,!1)&&(p.dump.length>1024&&(T+="? "),T+=p.dump+(p.condenseFlow?'"':"")+":"+(p.condenseFlow?"":" "),E(p,_,U,!1,!1)&&(T+=p.dump,$+=T))}p.tag=C,p.dump="{"+$+"}"}function c(p,_,A,$){let C="",O=p.tag,k=Object.keys(A);if(p.sortKeys===!0)k.sort();else if(typeof p.sortKeys=="function")k.sort(p.sortKeys);else if(p.sortKeys)throw new n("sortKeys must be a boolean or a function");for(let N=0,T=k.length;N<T;N+=1){let F="";(!$||C!=="")&&(F+=yr(p,_));let U=k[N],Z=A[U];if(p.replacer&&(Z=p.replacer.call(A,U,Z)),!E(p,_+1,U,!0,!0,!0))continue;let pe=p.tag!==null&&p.tag!=="?"||p.dump&&p.dump.length>1024;pe&&(p.dump&&u===p.dump.charCodeAt(0)?F+="?":F+="? "),F+=p.dump,pe&&(F+=yr(p,_)),E(p,_+1,Z,!0,pe)&&(p.dump&&u===p.dump.charCodeAt(0)?F+=":":F+=": ",F+=p.dump,C+=F)}p.tag=O,p.dump=C||"{}"}function y(p,_,A){let $=A?p.explicitTypes:p.implicitTypes;for(let C=0,O=$.length;C<O;C+=1){let k=$[C];if((k.instanceOf||k.predicate)&&(!k.instanceOf||typeof _=="object"&&_ instanceof k.instanceOf)&&(!k.predicate||k.predicate(_))){if(A?k.multi&&k.representName?p.tag=k.representName(_):p.tag=k.tag:p.tag="?",k.represent){let N=p.styleMap[k.tag]||k.defaultStyle,T;if(o.call(k.represent)==="[object Function]")T=k.represent(_,N);else if(s.call(k.represent,N))T=k.represent[N](_,N);else throw new n("!<"+k.tag+'> tag resolver accepts not "'+N+'" style');p.dump=T}return!0}}return!1}function E(p,_,A,$,C,O,k){p.tag=null,p.dump=A,y(p,A,!1)||y(p,A,!0);let N=o.call(p.dump),T=$;$&&($=p.flowLevel<0||p.flowLevel>_);let F=N==="[object Object]"||N==="[object Array]",U,Z;if(F&&(U=p.duplicates.indexOf(A),Z=U!==-1),(p.tag!==null&&p.tag!=="?"||Z||p.indent!==2&&_>0)&&(C=!1),Z&&p.usedDuplicates[U])p.dump="*ref_"+U;else{if(F&&Z&&!p.usedDuplicates[U]&&(p.usedDuplicates[U]=!0),N==="[object Object]")$&&Object.keys(p.dump).length!==0?(c(p,_,p.dump,C),Z&&(p.dump="&ref_"+U+p.dump)):(ms(p,_,p.dump),Z&&(p.dump="&ref_"+U+" "+p.dump));else if(N==="[object Array]")$&&p.dump.length!==0?(p.noArrayIndent&&!k&&_>0?Si(p,_-1,p.dump,C):Si(p,_,p.dump,C),Z&&(p.dump="&ref_"+U+p.dump)):(bi(p,_,p.dump),Z&&(p.dump="&ref_"+U+" "+p.dump));else if(N==="[object String]")p.tag!=="?"&&ds(p,p.dump,_,O,T);else{if(N==="[object Undefined]")return!1;if(p.skipInvalid)return!1;throw new n("unacceptable kind of an object to dump "+N)}if(p.tag!==null&&p.tag!=="?"){let pe=encodeURI(p.tag[0]==="!"?p.tag.slice(1):p.tag).replace(/!/g,"%21");p.tag[0]==="!"?pe="!"+pe:pe.slice(0,18)==="tag:yaml.org,2002:"?pe="!!"+pe.slice(18):pe="!<"+pe+">",p.dump=pe+" "+p.dump}}return!0}function x(p,_){let A=[],$=[];b(p,A,$);let C=$.length;for(let O=0;O<C;O+=1)_.duplicates.push(A[$[O]]);_.usedDuplicates=new Array(C)}function b(p,_,A){if(p!==null&&typeof p=="object"){let $=_.indexOf(p);if($!==-1)A.indexOf($)===-1&&A.push($);else if(_.push(p),Array.isArray(p))for(let C=0,O=p.length;C<O;C+=1)b(p[C],_,A);else{let C=Object.keys(p);for(let O=0,k=C.length;O<k;O+=1)b(p[C[O]],_,A)}}}function R(p,_){_=_||{};let A=new fs(_);A.noRefs||x(p,A);let $=p;return A.replacer&&($=A.replacer.call({"":$},"",$)),E(A,0,$,!0,!0)?A.dump+`
|
|
496
|
-
`:""}e.exports.dump=R})),Yu=By(le(((t,e)=>{var r=Gy(),n=Wy();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=Ae(),e.exports.Schema=Tu(),e.exports.FAILSAFE_SCHEMA=ju(),e.exports.JSON_SCHEMA=Hu(),e.exports.CORE_SCHEMA=Bu(),e.exports.DEFAULT_SCHEMA=js(),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.dump=n.dump,e.exports.YAMLException=ln(),e.exports.types={binary:Wu(),float:Fu(),map:Lu(),null:Du(),pairs:Ku(),set:Ju(),timestamp:Uu(),bool:qu(),int:Vu(),merge:Gu(),omap:zu(),seq:Mu(),str:Nu()},e.exports.safeLoad=i("safeLoad","load"),e.exports.safeLoadAll=i("safeLoadAll","loadAll"),e.exports.safeDump=i("safeDump","dump")}))(),1),{Type:Qx,Schema:Zx,FAILSAFE_SCHEMA:eP,JSON_SCHEMA:tP,CORE_SCHEMA:rP,DEFAULT_SCHEMA:nP,load:iP,loadAll:oP,dump:sP,YAMLException:aP,types:cP,safeLoad:lP,safeLoadAll:uP,safeDump:fP}=Yu.default,Ct=Yu.default;async function Ky(t=process.cwd()){let e=me(t);for(;;){let r=me(e,"view-contracts.config.yaml");try{return await zy(r),r}catch{let n=Qu(e);if(n===e)return null;e=n}}}async function Kt(t){if(t)return me(t);let e=await Ky();if(!e)throw new Error("view-contracts.config.yaml not found. Pass -c <path> or run from a project directory.");return e}async function Jt(t){let e=me(t),r=await Xu(e,"utf-8"),n=Ct.load(r);return Jy(e,n)}function Jy(t,e){let r=_e(t);return{...e,openapi:me(r,e.openapi),bindings:me(r,e.bindings),microContractsConfig:me(r,e.microContractsConfig),viewsDir:me(r,e.viewsDir),generated:{contractDir:me(r,e.generated.contractDir),actions:me(r,e.generated.actions),bridge:me(r,e.generated.bridge),reactDir:me(r,e.generated.reactDir)},runtimeModule:e.runtimeModule?me(r,e.runtimeModule):e.componentsModule?me(r,e.componentsModule):void 0,themeModule:e.themeModule?me(r,e.themeModule):void 0,design:e.design?{tokens:e.design.tokens?me(r,e.design.tokens):void 0,theme:e.design.theme?me(r,e.design.theme):void 0,extensionsCss:e.design.extensionsCss?me(r,e.design.extensionsCss):void 0}:void 0,extensions:e.extensions?me(r,e.extensions):void 0}}async function un(t){let e=await Xu(me(t),"utf-8");return Ct.load(e)}function Zu(t,e){return me(t.generated.reactDir,"components",`${e.screenName}.generated.tsx`)}function _e(t){return Qu(me(t))}function Oi(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}}import{relative as Yy}from"node:path";function ef(t,e){return Yy(t,e).split("\\").join("/")}var rh=Ei(Dc(),1);import{readFile as nh}from"node:fs/promises";import{resolve as ih}from"node:path";import{readFileSync as Nb}from"node:fs";import{createRequire as Mb}from"node:module";import{dirname as qc,resolve as Lb}from"node:path";import{fileURLToPath as jb}from"node:url";var Dr;function Ye(){if(Dr)return Dr;let t=Mb(import.meta.url);try{return Dr=qc(t.resolve("view-contracts/package.json")),Dr}catch{let e=qc(jb(import.meta.url));for(;;){try{let n=Lb(e,"package.json");if(JSON.parse(Nb(n,"utf8")).name==="view-contracts")return Dr=e,Dr}catch{}let r=qc(e);if(r===e)break;e=r}throw new Error("view-contracts package root not found")}}var Db=rh.default,qb=ih(Ye(),"spec/ui-dsl-extensions.meta.json"),lo;async function Vb(){if(lo)return lo;let t=JSON.parse(await nh(qb,"utf-8"));return lo=new Db({allErrors:!0,strict:!1}).compile(t),lo}async function oh(t){if(!t)return{extensions:{}};let e=ih(t),r=await nh(e,"utf-8"),n=Ct.load(r),i=await Vb();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}import{resolve as Kb}from"node:path";import{readFile as Fb}from"node:fs/promises";async function sh(t){return Ct.load(await Fb(t,"utf-8"))}function ah(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 ch(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 lh=Ei(Dc(),1);import{readFile as uh}from"node:fs/promises";import{dirname as Hb,resolve as Vc}from"node:path";var Bb=lh.default,Ub="spec/ui-dsl.schema.json",Gb=Ye(),uo;async function Wb(t,e){if(!uo){let r=Vc(Hb(Vc(e)),"ui-dsl.meta.json"),n=JSON.parse(await uh(r,"utf-8"));uo=new Bb({allErrors:!0,strict:!1}).compile(n)}if(!uo(t)){let r=uo.errors?.map(n=>`${n.instancePath||"/"} ${n.message??""}`).join("; ")??"unknown";throw new Error(`UI DSL schema validation failed (${e}): ${r}`)}}async function Hn(t=Ub){let e=Vc(Gb,t),r=await uh(e,"utf-8"),n=JSON.parse(r);return await Wb(n,e),n}function zb(t,e){if("$ref"in e){let r=e.$ref;if(!r)return;let n=r.replace("#/properties/","");return t.properties[n]}return e}function fo(t,e){let r=t.elements[e];return r?Object.keys(r.properties):[]}function fh(t,e,r){let n=t.properties[e];if(!n){let i=t.elements[r];if(!i?.properties[e])return!1;let o=zb(t,i.properties[e]);return o?.["x-appliesTo"]?o["x-appliesTo"].includes(r):!0}return!n["x-appliesTo"]||n["x-appliesTo"].length===0?!0:n["x-appliesTo"].includes(r)}var dh="renderers/react/elements.yaml",Fc=null;function Jb(t){ah(Object.keys(t.elements),wr,dh),ch(t.elements,["tag"],dh)}async function ph(t){if(!t&&Fc)return Fc;let e=t??Kb(Ye(),"renderers/react/elements.yaml"),r=await sh(e);return Jb(r),t||(Fc=r),r}var hh=new Set(["align","aspectRatio","axis","background","border","clip","contentAlign","direction","fontWeight","foreground","gap","headingLevel","height","justify","lineLimit","maxHeight","maxWidth","minHeight","minWidth","opacity","padding","radius","scroll","selfAlign","shadow","textAlign","textOverflow","textStyle","weight","width","size"]);function mh(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t}function gh(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}function ct(t){return`${t}px`}var yh={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"},Yb={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 Bn(t){let e=t.match(/^\{([^}]+)\}$/);if(e)return`var(--${e[1].replace(/\./g,"-")})`}function Un(t){let e={},r=t.width;typeof r=="number"?e.width=ct(r):typeof r=="string"&&r!=="wrap"&&r!=="fill"&&(e.width=r),typeof t.minWidth=="number"&&(e.minWidth=ct(t.minWidth)),typeof t.maxWidth=="number"&&(e.maxWidth=ct(t.maxWidth)),typeof t.height=="number"&&(e.height=ct(t.height)),typeof t.minHeight=="number"&&(e.minHeight=ct(t.minHeight)),typeof t.maxHeight=="number"&&(e.maxHeight=ct(t.maxHeight)),t.aspectRatio!==void 0&&(e.aspectRatio=String(t.aspectRatio));let n=t.weight;typeof n=="number"&&(e.flexGrow=n),typeof t.padding=="number"&&(e.padding=ct(t.padding)),typeof t.margin=="number"&&(e.margin=ct(t.margin)),typeof t.gap=="number"&&(e.gap=ct(t.gap));let i=t.textAlign;typeof i=="string"&&(e.textAlign=i==="start"?"left":i==="end"?"right":i);let o=t.contentAlign;typeof o=="string"&&o in yh&&(e.placeItems=yh[o]),typeof t.overflow=="string"&&(e.overflow=t.overflow);let s=t.selfAlign;typeof s=="string"&&(e.alignSelf=s==="start"?"flex-start":s==="end"?"flex-end":s);let a=t.size;typeof a=="number"?e.fontSize=ct(a):typeof a=="string"&&(e.fontSize=a);let l=typeof n=="string"?n:t.fontWeight;typeof l=="string"&&(e.fontWeight=l);let u=t.background;typeof u=="string"&&(e.background=Bn(u)??u);let d=t.foreground;typeof d=="string"&&(e.color=Bn(d)??d);let f=t.radius;typeof f=="number"?e.borderRadius=ct(f):typeof f=="string"&&(e.borderRadius=Bn(f)??f);let h=t.shadow;h===!0?e.boxShadow="var(--ui-shadow)":h===!1?e.boxShadow="none":typeof h=="string"&&(e.boxShadow=Yb[h]??Bn(h)??h);let m=t.border;typeof m=="string"&&(e.border=Bn(m)??m),typeof t.opacity=="number"&&(e.opacity=t.opacity);let g=t.clip;typeof g=="string"&&(e.overflow=g==="hidden"?"hidden":g);let v=t.align;if(typeof v=="string"){let S=mh(v);S&&(e.alignItems=S)}let P=t.justify;if(typeof P=="string"){let S=gh(P);S&&(e.justifyContent=S)}return e}function cr(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(", ")} }}`}function po(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 Xb(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 Hc(t){let e={};for(let[r,n]of Object.entries(t)){if(!hh.has(r))continue;Xb(r,n);let i=po(t,r);i!==void 0&&(e[r]=i)}return e}function Qb(t){return t.flex?{display:"flex",flexDirection:t.flex==="column"?"column":"row"}:{}}function Zb(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 Bc(t,e){let r=Hc(e),n=Un(r);if(n={...n,...Qb(t)},t.scrollContainer){let i=po(e,"scroll"),o=po(e,"axis"),s=typeof i=="string"?i:typeof o=="string"?o==="horizontal"?"horizontal":"vertical":void 0;if(s)return n={...n,...Zb(s)},cr(n);throw new Error("ScrollArea scroll/axis must be compile-time literals")}if(t.flexGrowProp&&e[t.flexGrowProp]){let i=po(e,t.flexGrowProp);if(typeof i=="number")return n.flexGrow=i,cr(n);throw new Error(`"${t.flexGrowProp}" on <Spacer> must be a compile-time literal`)}return cr(n)}function H(t){return" ".repeat(t)}function Wn(t,e="vm"){let r=t.scope??e;return t.path?`${r}.${t.path}`:r}function ho(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}: ${Kn(o,0)}`).join(", ");return`{ name: ${JSON.stringify(t.name)}, params: { ${n} } }${r}`}function Gc(t,e,r=!1){if(t===null)return"null";if(typeof t=="string")return JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t))return`[
|
|
497
|
-
${t.map(n=>`${H(e+1)}${Gc(n,e+1,r)}`).join(`,
|
|
498
|
-
`)}
|
|
499
|
-
${H(e)}]`;if(typeof t=="object"&&t!==null){let n=t;return"kind"in n&&n.kind==="action"?ho(n,r):`{
|
|
500
|
-
${Object.entries(n).map(([o,s])=>`${o}: ${Gc(s,e+1,r)}`).map(o=>`${H(e+1)}${o}`).join(`,
|
|
501
|
-
`)}
|
|
502
|
-
${H(e)}}`}return"undefined"}function Kn(t,e,r=!1){if(t===null)return"null";if(typeof t=="string")return JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t))return`[
|
|
503
|
-
${t.map(n=>`${H(e+1)}${Kn(n,e+1,r)}`).join(`,
|
|
504
|
-
`)}
|
|
505
|
-
${H(e)}]`;if(typeof t=="object"&&t!==null&&"kind"in t){if(t.kind==="binding")return Wn(t);if(t.kind==="action")return ho(t,r);if(t.kind==="literal")return Gc(t.value,e,r)}return"undefined"}function Bt(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 Kn(r,0)}function zn(t,e,r){let n=Bc(e,r);n&&t.push(n)}function eS(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=ho(r,!0);return e==="onSubmit"?`onSubmit={(e) => { e.preventDefault(); void dispatchAction(${n}); }}`:`onClick={() => { void dispatchAction(${n}); }}`}function vh(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function _h(t,e){let r=Bt(e,"variant");if(typeof r=="string")return` vc-${vh(t)}--${r}`;let n=G(e,"variant");if(n)return` vc-${vh(t)}--\${${n}}`}function qr(t,e,r,n){let i=e.className??"";if(e.tag==="dynamic-heading"&&n!==void 0){let s=`${i} vc-heading-${n}`,a=_h(t,r);return a?typeof Bt(r,"variant")=="string"?`className="${s}${a}"`:`className={\`${s}${a}\`}`:`className="${s}"`}let o=_h(t,r);if(o)return typeof Bt(r,"variant")=="string"?`className="${i}${o}"`:`className={\`${i}${o}\`}`;if(e.wrapProp&&Bt(r,e.wrapProp)===!0)return`className="${i} vc-wrap"`;if(e.sizeClass&&r.size){let s=G(r,"size");return`className={\`${e.className} ${e.sizeClass}-\${${s} ?? 'md'}\`}`}return`className="${i}"`}function wh(t,e,r){let n=Bt(e,"label"),i=Bt(e,"help"),o=Bt(e,"error"),s=G(e,"label"),a=G(e,"help"),l=G(e,"error"),u=[`${H(r)}<label className="vc-field">`];return typeof n=="string"?u.push(`${H(r+1)}<span className="vc-field-label">{${JSON.stringify(n)}}</span>`):s&&u.push(`${H(r+1)}{${s} ? <span className="vc-field-label">{${s}}</span> : null}`),u.push(`${H(r+1)}${t}`),typeof i=="string"?u.push(`${H(r+1)}<span className="vc-field-help">{${JSON.stringify(i)}}</span>`):a&&u.push(`${H(r+1)}{${a} ? <span className="vc-field-help">{${a}}</span> : null}`),typeof o=="string"?u.push(`${H(r+1)}<span className="vc-field-error">{${JSON.stringify(o)}}</span>`):l&&u.push(`${H(r+1)}{${l} ? <span className="vc-field-error">{${l}}</span> : null}`),u.push(`${H(r)}</label>`),u.join(`
|
|
506
|
-
`)}function tS(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`${H(e)}<label className="vc-checkbox">
|
|
507
|
-
${H(e+1)}<input type="checkbox" name={${r}} ${i} ${o} />
|
|
508
|
-
${H(e+1)}<span>{${n}}</span>
|
|
509
|
-
${H(e)}</label>`}function rS(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`${H(e)}<label className="vc-radio">
|
|
510
|
-
${H(e+1)}<input type="radio" name={${r}} value={${n}} ${o} ${s} />
|
|
511
|
-
${H(e+1)}<span>{${i}}</span>
|
|
512
|
-
${H(e)}</label>`}function nS(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`${H(e)}<label className="vc-switch">
|
|
513
|
-
${H(e+1)}<input type="checkbox" role="switch" name={${r}} ${i} ${o} />
|
|
514
|
-
${H(e+1)}<span>{${n}}</span>
|
|
515
|
-
${H(e)}</label>`}function iS(t,e,r){let n=t.props;if(n.alt!==void 0){let s=[qr(t.name,e,n),`src={${G(n,"name")??'""'}}`,`alt={${G(n,"alt")??'""'}}`];return zn(s,e,n),n.id&&s.push(`id={${G(n,"id")}}`),`${H(r)}<img ${s.join(" ")} />`}let o=[qr(t.name,e,n),"aria-hidden"];return zn(o,e,n),n.id&&o.push(`id={${G(n,"id")}}`),n.name&&o.push(`data-icon={${G(n,"name")}}`),`${H(r)}<span ${o.join(" ")} />`}function bh(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=>`${H(e+1)}<option key={${JSON.stringify(o.value)}} value={${JSON.stringify(o.value)}}>{${JSON.stringify(o.label)}}</option>`).join(`
|
|
516
|
-
`);let n=Kn(r,0);return`${H(e+1)}{${n}.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}`}function Sh(t,e,r,n){let i=[qr(t,e,r)];return zn(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"}}`),`${H(n)}<${e.tag} ${i.join(" ")} />`}function Uc(t,e,r,n,i){let o=[];if(e.ariaHidden&&o.push("aria-hidden"),r.id&&o.push(`id={${G(r,"id")}}`),r.role?o.push(`role={${G(r,"role")}}`):e.defaultRole&&o.push(`role="${e.defaultRole}"`),e.ariaLabel&&(r.ariaLabel?o.push(`aria-label={${G(r,"ariaLabel")}}`):r.label?o.push(`aria-label={${G(r,"label")}}`):r.title&&o.push(`aria-label={${G(r,"title")}}`)),e.actionEvent){let s=eS(r,e.actionEvent);s&&o.push(s)}return e.tag==="button"&&r.enabled&&o.push(`disabled={${G(r,"enabled")} === false}`),e.tag==="a"&&r.href&&o.push(`href={${G(r,"href")}}`),e.tag==="button"&&o.push(`type={${G(r,"type")??'"button"'}}`),o.push(qr(t,e,r,i)),zn(o,e,r),`<${n} ${o.join(" ")}`}function lt(t,e,r){if(e.visible===void 0)return t;let n=G(e,"visible");return`${H(r)}{${n} !== false ? (
|
|
517
|
-
${t}
|
|
518
|
-
${H(r)}) : null}`}function Wc(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?`${H(e)}{${JSON.stringify(a)}}`:""}return s.kind==="binding"?`${H(e)}{${Wn(s,i)}}`:s.kind==="map"?oS(s,e,r):s.kind==="fragment"?Wc(s.children,e,r,n):s.kind==="component"?r(s,e,n):""}).filter(Boolean).join(`
|
|
519
|
-
`)}function oS(t,e,r){let n=t.item,i=r(t.body,e+1,n);if(t.key){let o=` key={${Wn(t.key,n)}}`;i=i.replace(/^( +)<(\w+)/,`$1<$2${o}`)}return`${H(e)}{${Wn(t.source)}.map((${n}) => (
|
|
520
|
-
${i}
|
|
521
|
-
${H(e)}))}`}function sS(t,e,r,n,i){let o=t.props,s=Wc(t.children,r+1,i,n);if(e.checkbox)return lt(tS(o,r),o,r);if(t.name==="Radio")return lt(rS(o,r),o,r);if(t.name==="Switch")return lt(nS(o,r),o,r);if(t.name==="Icon")return lt(iS(t,e,r),o,r);if(t.name==="Spinner"){let d=[qr(t.name,e,o),'aria-busy="true"'];return zn(d,e,o),o.id&&d.push(`id={${G(o,"id")}}`),o.role?d.push(`role={${G(o,"role")}}`):e.defaultRole&&d.push(`role="${e.defaultRole}"`),lt(`${H(r)}<div ${d.join(" ")} />`,o,r)}if(e.fieldContainer){let d=s||`${H(r+1)}<div />`;return lt(wh(d,o,r),o,r)}if(e.fieldWrap){let d=e.tag,f;if(e.optionsProp&&o[e.optionsProp]){let h=Uc(t.name,e,o,d);f=`${H(r+1)}${h}>
|
|
522
|
-
${bh(o,r+2)}
|
|
523
|
-
${H(r+1)}</${d}>`}else f=Sh(t.name,e,o,r+1);return lt(wh(f,o,r),o,r)}if(e.tag==="dynamic-heading"){let d=Bt(o,"level");if(typeof d=="number"){let P=Math.min(6,Math.max(1,d)),S=`h${P}`,q=Uc(t.name,e,o,S,P),B=s?`${H(r)}${q}>
|
|
524
|
-
${s}
|
|
525
|
-
${H(r)}</${S}>`:`${H(r)}${q} />`;return lt(B,o,r)}let f=G(o,"level")??"2",h=cr(Un(Hc(o))),m=h?` ${h}`:"",g=s?`${H(r+1)}{(() => { const __level = Math.min(6, Math.max(1, ${f} ?? 2)); const Tag = ('h' + __level) as keyof JSX.IntrinsicElements; return <Tag className={\`vc-heading vc-heading-\${__level}\`}${m}>{/* children below */}</Tag>; })()}`:"",v=Bc(e,o);return lt(g||`${H(r)}<h2 ${qr(t.name,e,o,2)}${v?` ${v}`:""} />`,o,r)}let a=e.tag;if(e.void)return lt(Sh(t.name,e,o,r),o,r);let l=Uc(t.name,e,o,a),u;return!s&&e.optionsProp&&o[e.optionsProp]?u=`${H(r)}${l}>
|
|
526
|
-
${bh(o,r+1)}
|
|
527
|
-
${H(r)}</${a}>`:s?u=`${H(r)}${l}>
|
|
528
|
-
${s}
|
|
529
|
-
${H(r)}</${a}>`:u=`${H(r)}${l} />`,lt(u,o,r)}function aS(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}={${ho(i,!0)}}`:typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${n}={${Wn(i,r)}}`:n==="children"?"":`${n}={${Kn(i,0,n==="columns")}}`).join(" ")}function cS(t,e,r,n){let i=aS(t.props,r),o=i?` ${i}`:"",s=Wc(t.children,e+1,n,r);return s?`${H(e)}<${t.name}${o}>
|
|
530
|
-
${s}
|
|
531
|
-
${H(e)}</${t.name}>`:`${H(e)}<${t.name}${o} />`}function Eh(t,e,r){return t in e.elements&&!r.includes(t)}function Gn(t,e,r,n){if(t.kind==="component"){Eh(t.name,e,r)||n.add(t.name);for(let i of t.children)Gn(i,e,r,n);return}if(t.kind==="map"&&Gn(t.body,e,r,n),t.kind==="fragment")for(let i of t.children)Gn(i,e,r,n)}function $h(t,e){let r=(n,i,o)=>Eh(n.name,t,e)?sS(n,t.elements[n.name],i,o,r):cS(n,i,o,r);return r}async function lS(t,e){let r=await ph(e.elementMapPath),n=e.allowlistExtra??[],i=t.exportName.replace(/View$/,"")||t.exportName,o=i.charAt(0).toUpperCase()+i.slice(1),s=t.root.kind==="component"?t.root:null;if(!s)throw new Error(`View IR root must be a component node (${t.source})`);let l=$h(r,n)(s,2),u=new Set;Gn(t.root,r,n,u);let d=[...u].sort(),f=e.previewImports,h=f?.dispatch??e.runtimeImportFrom,m=f?.contracts??e.contractsImportFrom,g=f?.extensions??e.extensionsImportFrom,v=["import type { ReactElement } from 'react';"];return v.push(`import { dispatchAction } from '${h}';`),v.push(`import type { ${t.viewModel}, ActionDescriptor } from '${m}';`),d.length>0&&v.push(`import { ${d.join(", ")} } from '${g}';`),`${f?`/**
|
|
532
|
-
* Preview module \u2014 compiled live from ${t.source}
|
|
533
|
-
* Same lowering as generated/; not written to disk.
|
|
534
|
-
*/`:`/**
|
|
535
|
-
* Auto-generated React component from ${t.source}
|
|
536
|
-
* DO NOT EDIT \u2014 regenerate with: view-contracts render react
|
|
537
|
-
*/`}
|
|
538
|
-
${v.join(`
|
|
539
|
-
`)}
|
|
540
|
-
|
|
541
|
-
export function ${o}({ vm }: { vm: ${t.viewModel} }): ReactElement {
|
|
542
|
-
return (
|
|
543
|
-
${l}
|
|
544
|
-
);
|
|
545
|
-
}
|
|
546
|
-
`}async function Ch(t,e,r){let{writeFile:n,mkdir:i}=await import("node:fs/promises"),{dirname:o}=await import("node:path"),s=await lS(t,r);await i(o(e),{recursive:!0}),await n(e,s,"utf-8")}import{writeFile as Lg,stat as qC,unlink as VC}from"node:fs/promises";import{relative as FC,resolve as Qr}from"node:path";import{readFile as LS,stat as jS}from"node:fs/promises";import{resolve as DS}from"node:path";import{readFile as xh}from"node:fs/promises";import{createRequire as uS}from"node:module";import{dirname as fS,resolve as kh}from"node:path";var Ph=/^@import\s+['"](.+?)['"]\s*;/gm,dS=uS(import.meta.url);async function pS(t,e){return t.startsWith("@")||!t.startsWith(".")&&!t.startsWith("/")?dS.resolve(t):kh(e,t)}async function Oh(t){let e=kh(t),r=await xh(e,"utf-8"),n=fS(e);for(let i of r.matchAll(Ph)){let o=i[0],s=i[1];if(!s)continue;let a=await pS(s,n),l=await xh(a,"utf-8");r=r.replace(o,`${l}
|
|
547
|
-
`)}return r.replace(Ph,"").trim()}import{resolve as Ah}from"node:path";function mo(t){return t??Ah(Ye(),"renderers/react/templates")}function go(){return Ah(Ye(),"renderers/react/runtime")}import{readFile as hS}from"node:fs/promises";import{extname as mS,resolve as gS}from"node:path";async function yo(t){let e=gS(t),r=await hS(e,"utf-8"),n=mS(e).toLowerCase();if(n===".json")return JSON.parse(r);if(n===".yaml"||n===".yml")return Ct.load(r);throw new Error(`Unsupported design file extension "${n}" (expected .yaml, .yml, or .json): ${e}`)}var vo=["color","dimension","shadow","typography","layout"],ht=class extends Error{constructor(e){super(e),this.name="DesignTokenError"}},lr=["background","foreground","radius","padding","shadow","typography","display","gridTemplateColumns","minHeight","maxWidth","width","margin","border","borderColor","flexDirection","fontWeight","fontSize","alignItems","justifyContent"],_o={background:["color"],foreground:["color"],radius:["dimension","layout"],padding:["dimension","layout"],shadow:["shadow"],typography:["typography"],display:["layout"],gridTemplateColumns:["layout"],minHeight:["dimension","layout"],maxWidth:["dimension","layout"],width:["dimension","layout"],margin:["dimension","layout"],border:["layout"],borderColor:["color"],flexDirection:["layout"],fontWeight:["layout"],fontSize:["dimension","layout"],alignItems:["layout"],justifyContent:["layout"]},we=class extends Error{constructor(e){super(e),this.name="DesignThemeError"}},Vr=class extends Error{constructor(e){super(e),this.name="DesignConstraintError"}};var yS=/^\{([^}]+)\}$/;function Fr(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function vS(t){if(!lr.includes(t))throw new we(`Unknown variant property "${t}" (expected ${lr.join(", ")})`);return t}function _S(t,e,r){if(typeof t!="string")throw new we(`${e}.${r} must be a token reference string like "{ui.primary}"`);let n=t.match(yS);if(!n)throw new we(`${e}.${r} must be a token reference like "{ui.primary}", got "${t}"`);return n[1]}function Rh(t,e){let r={};for(let[n,i]of Object.entries(e)){let o=vS(n),s=_S(i,t,n);r[o]={ref:s,accepts:[..._o[o]]}}return r}function wS(t){if(t===void 0)return{};if(!Fr(t))throw new we('Theme "defaults" must be an object');let e={};for(let[r,n]of Object.entries(t)){if(!Fr(n))throw new we(`Theme defaults for "${r}" must be an object`);e[r]=Rh(`defaults.${r}`,n)}return e}function zc(t){if(!Fr(t))throw new we("Theme document must be a YAML/JSON object");let e=t.variants;if(!Fr(e))throw new we('Theme document must contain a "variants" object');let r={};for(let[n,i]of Object.entries(e)){if(!Fr(i))throw new we(`Theme variants for "${n}" must be an object`);let o={};for(let[s,a]of Object.entries(i)){if(!Fr(a))throw new we(`Theme variant "${n}.${s}" must be an object`);o[s]=Rh(`${n}.${s}`,a)}r[n]=o}return{defaults:wS(t.defaults),variants:r}}var bS=/^\{([^}]+)\}$/;function Jn(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function SS(t){return`--${t.replace(/\./g,"-")}`}function ES(t,e){if(typeof t!="string"||!vo.includes(t))throw new ht(`Token "${e}" has unsupported $type "${String(t)}" (expected ${vo.join(", ")})`);return t}function Ih(t,e,r){if(Jn(t)){if("$type"in t&&"$value"in t){r.push({path:e,type:ES(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;Ih(i,o,r)}}}function $S(t,e){if(typeof e=="string")return e;if(t==="typography"&&Jn(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=>Jn(r)?`${r.offsetX??0} ${r.offsetY??0} ${r.blur??0} ${r.color??"transparent"}`:String(r)).join(", ");if(t==="shadow"&&Jn(e))return`${e.offsetX??0} ${e.offsetY??0} ${e.blur??0} ${e.color??"transparent"}`;throw new ht(`Token value for "${t}" must be a string or supported object`)}function CS(t){return typeof t!="string"?null:t.match(bS)?.[1]??null}function Th(t,e,r,n,i){let o=CS(e);if(!o){let l=r.get(t);if(!l)throw new ht(`Unknown token path "${t}"`);return{value:$S(l.type,e)}}if(n.has(t))throw new ht(`Circular token reference detected at "${t}"`);let s=r.get(o);if(!s)throw new ht(`Token "${t}" references unknown token "{${o}}"`);if(i.has(o))return{value:i.get(o),ref:o};n.add(t);let a=Th(o,s.rawValue,r,n,i);return n.delete(t),i.set(o,a.value),{value:a.value,ref:o}}function Kc(t){if(!Jn(t))throw new ht("Token document must be a YAML/JSON object");let e=[];Ih(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}=Th(o.path,o.rawValue,r,new Set,n);n.set(o.path,s),i.push({path:o.path,type:o.type,value:s,cssVar:SS(o.path),ref:a})}return{entries:i}}var xS=new Set(["App","Box","Button","Column","Field","Form","Heading","IconButton","Image","Link","List","ListItem","Modal","Page","Row","SafeArea","Stack","Text"]);function Jc(t,e){let r=new Set;if(xS.has(e)){for(let n of lr)r.add(n);return r}for(let n of fo(t,e))lr.includes(n)&&r.add(n);return r}function PS(t){return new Map(t.entries.map(e=>[e.path,e]))}function Nh(t,e,r,n,i){for(let[o,s]of Object.entries(r)){let a=_o[o];if(!a)throw new we(`Unknown variant property "${o}" on ${t}`);if(!n.has(o))throw new we(`Property "${o}" is not allowed for ${e} in ${t}`);let l=i.get(s.ref);if(!l)throw new we(`${t}.${o} references unknown token "{${s.ref}}"`);if(!a.includes(l.type))throw new we(`${t}.${o} requires a ${a.join(" or ")} token, but "{${s.ref}}" is ${l.type}`)}}async function Mh(t,e){let r=await Hn(),n=PS(t);for(let[i,o]of Object.entries(e.defaults)){let s=Jc(r,i);Nh(`defaults.${i}`,i,o,s,n)}for(let[i,o]of Object.entries(e.variants)){let s=Jc(r,i);for(let[a,l]of Object.entries(o))Nh(`variants.${i}.${a}`,i,l,s,n)}}async function Yc(t,e){await Mh(t,e)}function Xc(t){let e=[":root {"];for(let r of t.entries)e.push(` ${r.cssVar}: ${r.value};`);return e.push("}"),e.join(`
|
|
548
|
-
`)}function Qc(t){return t.replace(/:root\s*\{[\s\S]*?\}\s*/m,"").trim()}var wo={background:"background",foreground:"color",radius:"border-radius",padding:"padding",shadow:"box-shadow",typography:"font",display:"display",gridTemplateColumns:"grid-template-columns",minHeight:"min-height",maxWidth:"max-width",width:"width",margin:"margin",border:"border",borderColor:"border-color",flexDirection:"flex-direction",fontWeight:"font-weight",fontSize:"font-size",alignItems:"align-items",justifyContent:"justify-content"};function bo(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function So(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}function Zc(t,e){let r=[];for(let[n,i]of Object.entries(e.defaults)){let o=bo(n),s=[];for(let[a,l]of Object.entries(i)){let u=wo[a],d=So(t,l.ref);s.push(` ${u}: var(${d});`)}s.length!==0&&r.push(`.vc-${o} {
|
|
549
|
-
${s.join(`
|
|
550
|
-
`)}
|
|
551
|
-
}`)}return r.join(`
|
|
552
|
-
|
|
553
|
-
`)}function el(t,e){let r=[];for(let[n,i]of Object.entries(e.variants)){let o=bo(n);for(let[s,a]of Object.entries(i)){let l=[];for(let[u,d]of Object.entries(a)){let f=wo[u],h=So(t,d.ref);l.push(` ${f}: var(${h});`)}l.length!==0&&r.push(`.vc-${o}--${s} {
|
|
554
|
-
${l.join(`
|
|
555
|
-
`)}
|
|
556
|
-
}`)}}return r.join(`
|
|
557
|
-
|
|
558
|
-
`)}function Lh(t){return typeof t=="object"&&t!==null&&"kind"in t&&t.kind==="binding"}function kS(t){if(t.variant!==void 0)return t.variant;if(t.tone!==void 0)return t.tone}function jh(t,e,r,n,i,o){let s=r.variants[t];if(!s){e!==void 0&&!Lh(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||Lh(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 Eo(t,e,r,n){if(t.kind==="component"){let i=kS(t.props);t.props.variant!==void 0?jh(t.name,t.props.variant,e,r,n):i!==void 0&&t.name in e.variants&&jh(t.name,i,e,r,n,{mapMutedToDefault:!0});for(let o of t.children)Eo(o,e,r,n);return}if(t.kind==="map"){Eo(t.body,e,r,n);return}if(t.kind==="fragment")for(let i of t.children)Eo(i,e,r,n)}function tl(t,e){let r=[];for(let n of t)Eo(n.root,e,n.source,r);if(r.length>0)throw new Error(`View variant validation failed:
|
|
559
|
-
${r.map(n=>` - ${n}`).join(`
|
|
560
|
-
`)}`)}var OS=/\.vc-[a-z][\w-]*/g,AS=/(?:className\s*=\s*(?:"vc-[^"]*"|'vc-[^']*'|\{`[^`]*\bvc-[^`]*`\}|\{"vc-[^"]*"\}|\{'vc-[^']*'\})|["'`]vc-[a-z][\w-]*["'`])/g,RS=/\bextensionClassName\s*\(/g;function rl(t,e){return[...new Set([...t.matchAll(e)].map(r=>r[0]))]}function Dh(t,e,r){let n=e.slice(0,5).map(o=>` - ${t}: ${o}`).join(`
|
|
561
|
-
`),i=e.length>5?`
|
|
562
|
-
\u2026 and ${e.length-5} more`:"";return`${r}
|
|
563
|
-
${n}${i}`}function nl(t,e){let r=rl(t,OS);if(r.length!==0)throw new Vr(Dh(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 il(t,e){let r=rl(t,AS),n=rl(t,RS),i=[...r,...n];if(i.length!==0)throw new Vr(Dh(e,i,".vc-* class names are reserved for DSL lowering output. Extension components must use project-owned class names (e.g. ext-*) in src/components/."))}import{readFile as qh,stat as IS}from"node:fs/promises";import{resolve as TS}from"node:path";async function Vh(t){try{return await IS(t),!0}catch{return!1}}async function Yn(t,e){let r=t.design?.extensionsCss;r&&await Vh(r)&&nl(await qh(r,"utf-8"),r);let n=_e(e);for(let i of["extensions.tsx","extensions.ts"]){let o=TS(n,"src/components",i);await Vh(o)&&il(await qh(o,"utf-8"),o)}}async function NS(t){let e=await yo(t);return Kc(e)}async function MS(t){let e=await yo(t);return zc(e)}async function $o(t,e){let r=await NS(t),n=await MS(e);return await Yc(r,n),{tokenIR:r,themeIR:n}}async function qS(t){try{return await jS(t),!0}catch{return!1}}async function ol(t,e){let r=_e(e),{tokensPath:n,themePath:i}=Oi(t),{tokenIR:o,themeIR:s}=await $o(n,i);await Yn(t,e);let a=await Oh(DS(go(),"theme.css")),l=Qc(a),u=Zc(o,s),d=el(o,s),f=`${Xc(o)}
|
|
564
|
-
|
|
565
|
-
${l}`;u&&(f+=`
|
|
566
|
-
|
|
567
|
-
${u}`),f+=`
|
|
568
|
-
|
|
569
|
-
${d}`;let h=t.design?.extensionsCss;return h&&await qS(h)&&(f+=`
|
|
570
|
-
|
|
571
|
-
${await LS(h,"utf-8")}`),f}var Ig=Ei(Ag(),1);import{readFile as RC}from"node:fs/promises";import{resolve as IC}from"node:path";var Rg=new Map;async function yt(t,e,r){let n=IC(t,e),i=Rg.get(n);if(!i){let o=await RC(n,"utf-8");i=Ig.default.compile(o,{noEscape:!0}),Rg.set(n,i)}return i(r)}import{readFile as Tg,writeFile as TC,mkdir as NC,stat as MC,rm as LC,unlink as jC}from"node:fs/promises";import{resolve as It}from"node:path";async function Ng(t){try{return await MC(t),!0}catch{return!1}}async function Ql(t){let e=It(t,"..");for(let r of[It(t,"runtime"),It(e,"components"),It(e,"runtime")])await Ng(r)&&await LC(r,{recursive:!0,force:!0});for(let r of["extensions.tsx","extensions.ts","contracts.ts"]){let n=It(t,r);await Ng(n)&&await jC(n)}}function DC(t){return t.replace(/^import type \{ DispatchableAction \} from [^;]+;\n/gm,"")}async function Mg(t,e,r){let n=_e(t),i=e.generated.reactDir,o=mo(r??(e.rendererTemplatesDir?It(n,e.rendererTemplatesDir):void 0)),s=go();await NC(i,{recursive:!0}),await Ql(i);let a=await Tg(It(s,"types.ts"),"utf-8"),l=await Tg(It(s,"style.ts"),"utf-8"),u=await yt(o,"dispatch.ts.hbs",{}),d=DC(u),f=await yt(o,"runtime.ts.hbs",{typesBody:a.trim(),styleBody:l.trim(),dispatchBody:d.trim()}),h=It(i,"runtime.ts");return await TC(h,f,"utf-8"),{runtimePath:h}}async function HC(t){try{return await qC(t),!0}catch{return!1}}async function BC(t,e,r,n){let i=await ol(r,t),o=await yt(mo(n),"theme.css.hbs",{themeCss:i});await Lg(e,o,"utf-8")}async function UC(t){let e=Qr(t,"..");for(let r of["theme.css","contracts.ts","view-bridge.generated.ts"]){let n=Qr(e,r);await HC(n)&&await VC(n)}}async function GC(t,e){let r=_e(t),n=e.generated.reactDir,i=Qr(r,"src/components/extensions.tsx"),o=FC(n,i).replace(/\\/g,"/");o.startsWith(".")||(o=`./${o}`);let s=o.replace(/\.tsx?$/,".js"),a=Qr(n,"extensions.generated.ts");return await Lg(a,`/** Auto-generated extension re-export \u2014 DO NOT EDIT */
|
|
572
|
-
export * from '${s}';
|
|
573
|
-
`,"utf-8"),a}async function jg(t,e){let r=_e(t),n=e.rendererTemplatesDir?Qr(r,e.rendererTemplatesDir):void 0,i=e.generated.reactDir;await UC(i),await Ql(i);let{runtimePath:o}=await Mg(t,e,n),s=await GC(t,e),a=Qr(i,"theme.css");await BC(t,a,e,n),console.log(` react/runtime \u2192 ${o}`),console.log(` react/extensions \u2192 ${s}`),console.log(` react/theme \u2192 ${a}`)}var WC=new Set(["children","action","onClick","onSubmit","onChange","level","headingLevel"]);function zC(t,e){return e==="variant"||e==="theme"?!0:t.properties[e]?.["x-category"]==="visual"}function fi(t,e,r,n,i){if(t.kind==="component"){let{name:o,props:s}=t;if(n.has(o)||!(o in e.elements)){for(let l of t.children)fi(l,e,r,n,i);return}let a=new Set(fo(e,o));for(let l of Object.keys(s))if(!WC.has(l)&&zC(e,l)){if(!a.has(l)){i.push(`${r}: <${o}> does not accept property "${l}"`);continue}fh(e,l,o)||i.push(`${r}: property "${l}" does not apply to <${o}>`)}for(let l of t.children)fi(l,e,r,n,i);return}if(t.kind==="map"){fi(t.body,e,r,n,i);return}if(t.kind==="fragment")for(let o of t.children)fi(o,e,r,n,i)}async function Dg(t,e=[]){let r=await Hn(),n=new Set(e),i=[];for(let o of t)fi(o.root,r,o.source,n,i);if(i.length>0)throw new Error(`View property validation failed:
|
|
574
|
-
${i.map(o=>` - ${o}`).join(`
|
|
575
|
-
`)}`)}import{access as KC,writeFile as Ze,mkdir as cs}from"node:fs/promises";import{resolve as Be,dirname as qg}from"node:path";async function Zl(t){try{return await KC(t),!0}catch{return!1}}var Zr={preview:5173,app:5174,built:4174},Vg=`{
|
|
757
|
+
`)}`);i.warnings.push(...o.warnings)}for(let o of i.warnings)console.warn(`Warning in ${t} (${e}): ${o}`);return{version:1,source:qp(process.cwd(),Fp(t)),viewModel:i.propsType??"Record<string, unknown>",exportName:i.exportName,root:i.root,isPartial:!0,propsType:i.propsType}}async function Iw(t,e){let r=new Map,n=_a(t);for(;n.length>0;){let i=n.shift(),o=jp(i);if(r.has(o))continue;let s=await Pw(i.sourcePath,i.name,e);r.set(o,s),n.push(..._a(s.root))}return[...r.values()]}async function Sa(t,e={}){let r=await Dp(t.sourcePath,"utf-8"),n=t.exportName??Cw(t.sourcePath,".view.tsx"),i=Vp(r,t.sourcePath,n,{allowlistExtra:e.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t.sourcePath}:
|
|
758
|
+
${i.errors.map(a=>` - ${a}`).join(`
|
|
759
|
+
`)}`);if(e.extensionRegistry){let a=ba(i.root,e.extensionRegistry);if(a.errors.length>0)throw new Error(`Extension validation errors in ${t.sourcePath}:
|
|
760
|
+
${a.errors.map(c=>` - ${c}`).join(`
|
|
761
|
+
`)}`);i.warnings.push(...a.warnings)}for(let a of i.warnings)console.warn(`Warning in ${t.sourcePath}: ${a}`);let o={version:1,source:qp(process.cwd(),Fp(t.sourcePath)),viewModel:i.viewModel,exportName:i.exportName,root:i.root},s=await Iw(o.root,e);return{screen:o,partials:s}}async function Hp(t,e={}){let r=[],n=new Map;for(let i of t){let o=await Sa(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()]}}ct();import{relative as Bw}from"node:path";function ff(t,e){return Bw(t,e).split("\\").join("/")}var hm=Ys(dm(),1);Dr();Lt();import{readFile as mm}from"node:fs/promises";import{resolve as gm}from"node:path";var Ox=hm.default,Ax=gm(xe(),"spec/ui-dsl-extensions.meta.json"),Mo;async function Tx(){if(Mo)return Mo;let t=JSON.parse(await mm(Ax,"utf-8"));return Mo=new Ox({allErrors:!0,strict:!1}).compile(t),Mo}async function Vo(t){if(!t)return{extensions:{}};let e=gm(t),r=await mm(e,"utf-8"),n=at.load(r),i=await Tx();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}import{resolve as EP}from"node:path";async function np(t,e,r){return(await Promise.resolve().then(()=>(Ml(),Nl))).renderReactFromIr(t,e,r)}async function Tv(t,e,r){return(await Promise.resolve().then(()=>(Ml(),Nl))).renderReactPreviewBundle(t,e,r)}function Nv(t,e){return EP(t,"components",`${e.exportName}.generated.tsx`)}async function Mv(t,e){return(await Promise.resolve().then(()=>(iv(),nv))).renderReactRuntime(t,e)}async function Vv(t,e,r,n,i){return(await Promise.resolve().then(()=>(Pv(),Cv))).renderSwiftUIRuntime(t,e,r,n,i)}async function Lv(t,e){return(await Promise.resolve().then(()=>(Av(),Ov))).renderComposeRuntime(t,e)}Jo();Tt();function CP(t){let e=Xi[t];return e?e.lowering==="inline-css"||e.lowering==="class-name":!1}function Ni(t,e,r,n){if(t.kind==="component"){let{name:i,props:o}=t;if(r.has(i)||!At.has(i)){for(let s of t.children)Ni(s,e,r,n);return}for(let s of Object.keys(o))CP(s)&&(Pp(s,i)||n.push(`${e}: <${i}> does not accept property "${s}"`));for(let s of t.children)Ni(s,e,r,n);return}if(t.kind==="map"){Ni(t.body,e,r,n);return}if(t.kind==="fragment"){for(let i of t.children)Ni(i,e,r,n);return}}async function Ds(t,e=[]){let r=new Set(e),n=[];for(let i of t)Ni(i.root,i.source,r,n);if(n.length>0)throw new Error(`View property validation failed:
|
|
762
|
+
${n.map(i=>` - ${i}`).join(`
|
|
763
|
+
`)}`)}ct();import{access as PP,writeFile as sr,mkdir as qs}from"node:fs/promises";import{resolve as xt,dirname as jv}from"node:path";async function ip(t){try{return await PP(t),!0}catch{return!1}}var xn={preview:5173,app:5174,built:4174},IP=`{
|
|
576
764
|
"name": "admin-dashboard",
|
|
577
765
|
"private": true,
|
|
578
766
|
"type": "module",
|
|
579
767
|
"scripts": {
|
|
580
768
|
"dev": "vite --config .vite/vite.config.ts",
|
|
581
|
-
"dev:preview": "
|
|
769
|
+
"dev:preview": "view-contracts preview --host 0.0.0.0",
|
|
582
770
|
"dev:app": "vite --config .vite/vite.config.ts --open /.vite/index.html",
|
|
583
771
|
"dev:both": "bash scripts/dev-both.sh",
|
|
584
772
|
"check:both": "bash scripts/check-both.sh",
|
|
@@ -591,16 +779,16 @@ ${i.map(o=>` - ${o}`).join(`
|
|
|
591
779
|
"react-dom": "^19.2.0"
|
|
592
780
|
},
|
|
593
781
|
"devDependencies": {
|
|
594
|
-
"@view-contracts/core": "
|
|
595
|
-
"@view-contracts/runtime": "
|
|
782
|
+
"@view-contracts/core": "^0.3.5",
|
|
783
|
+
"@view-contracts/runtime": "^0.1.0",
|
|
596
784
|
"@vitejs/plugin-react": "^4.7.0",
|
|
597
785
|
"typescript": "^5.9.3",
|
|
598
|
-
"view-contracts": "
|
|
786
|
+
"view-contracts": "^0.3.5",
|
|
599
787
|
"vite": "^6.4.1"
|
|
600
788
|
}
|
|
601
789
|
}
|
|
602
|
-
`,
|
|
603
|
-
`,
|
|
790
|
+
`,RP=`import '../src/main.tsx';
|
|
791
|
+
`,OP=`<!doctype html>
|
|
604
792
|
<html lang="en">
|
|
605
793
|
<head>
|
|
606
794
|
<meta charset="UTF-8" />
|
|
@@ -612,35 +800,7 @@ ${i.map(o=>` - ${o}`).join(`
|
|
|
612
800
|
<script type="module" src="./app-main.tsx"></script>
|
|
613
801
|
</body>
|
|
614
802
|
</html>
|
|
615
|
-
|
|
616
|
-
<html lang="en">
|
|
617
|
-
<head>
|
|
618
|
-
<meta charset="UTF-8" />
|
|
619
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
620
|
-
<title>admin-dashboard \u2014 preview</title>
|
|
621
|
-
</head>
|
|
622
|
-
<body>
|
|
623
|
-
<div id="root"></div>
|
|
624
|
-
<script type="module" src="./preview-main.tsx"></script>
|
|
625
|
-
</body>
|
|
626
|
-
</html>
|
|
627
|
-
`;function QC(t){let r=t.views.filter(o=>o.targets.includes("react"))[0];if(!r)throw new Error("No react target views in bindings \u2014 cannot scaffold preview entry.");let n=r.screenName,i=`${n.charAt(0).toLowerCase()}${n.slice(1)}Mock`;return`import React from 'react';
|
|
628
|
-
import ReactDOM from 'react-dom/client';
|
|
629
|
-
import 'view-contracts:theme.css';
|
|
630
|
-
import { ${n} } from 'view-contracts:screen/${n}.tsx';
|
|
631
|
-
import { ${i} } from 'view-contracts:preview/mock/${n}';
|
|
632
|
-
import { registerActionHandler } from 'view-contracts:runtime/dispatch';
|
|
633
|
-
|
|
634
|
-
registerActionHandler(async (action) => {
|
|
635
|
-
alert(\`[preview] \${action.name}: \${JSON.stringify(action.params ?? {})}\`);
|
|
636
|
-
});
|
|
637
|
-
|
|
638
|
-
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
|
|
639
|
-
<React.StrictMode>
|
|
640
|
-
<${n} vm={${i}} />
|
|
641
|
-
</React.StrictMode>,
|
|
642
|
-
);
|
|
643
|
-
`}function ZC(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';
|
|
803
|
+
`;function AP(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';
|
|
644
804
|
import ReactDOM from 'react-dom/client';
|
|
645
805
|
import '../generated/react/theme.css';
|
|
646
806
|
import type { ${i} } from '../contracts/view-models';
|
|
@@ -658,26 +818,26 @@ ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
|
|
|
658
818
|
<${n} vm={vm} />
|
|
659
819
|
</React.StrictMode>,
|
|
660
820
|
);
|
|
661
|
-
`}var
|
|
821
|
+
`}var TP=`/** Hand-written action handlers \u2014 edit src/runtime/handlers.ts */
|
|
662
822
|
import type { DispatchableAction } from './types.js';
|
|
663
823
|
|
|
664
824
|
export async function handleAppAction(action: DispatchableAction): Promise<void> {
|
|
665
825
|
console.log('[app action]', action);
|
|
666
826
|
}
|
|
667
|
-
`;function
|
|
668
|
-
export const PREVIEW_PORT = ${
|
|
669
|
-
export const APP_PORT = ${
|
|
670
|
-
export const BUILT_PORT = ${
|
|
671
|
-
`}function
|
|
672
|
-
PREVIEW_PORT=${
|
|
673
|
-
APP_PORT=${
|
|
674
|
-
BUILT_PORT=${
|
|
675
|
-
`}function
|
|
827
|
+
`;function NP(){return`/** Fixed dev server ports \u2014 single source of truth for this example. */
|
|
828
|
+
export const PREVIEW_PORT = ${xn.preview};
|
|
829
|
+
export const APP_PORT = ${xn.app};
|
|
830
|
+
export const BUILT_PORT = ${xn.built};
|
|
831
|
+
`}function MP(){return`# Fixed dev server ports \u2014 keep in sync with dev.ports.ts
|
|
832
|
+
PREVIEW_PORT=${xn.preview}
|
|
833
|
+
APP_PORT=${xn.app}
|
|
834
|
+
BUILT_PORT=${xn.built}
|
|
835
|
+
`}function VP(){return`import { defineConfig } from 'vite';
|
|
676
836
|
import react from '@vitejs/plugin-react';
|
|
677
837
|
import path from 'node:path';
|
|
678
838
|
import { fileURLToPath } from 'node:url';
|
|
679
839
|
import { APP_PORT, BUILT_PORT } from '../dev.ports.js';
|
|
680
|
-
import { viewContractsPreviewMockPlugin } from '
|
|
840
|
+
import { viewContractsPreviewMockPlugin } from 'view-contracts/preview';
|
|
681
841
|
|
|
682
842
|
const viteDir = path.dirname(fileURLToPath(import.meta.url));
|
|
683
843
|
const exampleRoot = path.resolve(viteDir, '..');
|
|
@@ -709,48 +869,53 @@ export default defineConfig({
|
|
|
709
869
|
},
|
|
710
870
|
},
|
|
711
871
|
});
|
|
712
|
-
`}function
|
|
713
|
-
import {
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
872
|
+
`}async function Dv(t,e,r){let n=fe(t),i=xt(n,".vite");await qs(i,{recursive:!0});let o=xt(n,"package.json");await ip(o)||await sr(o,`${IP}
|
|
873
|
+
`,"utf-8"),await sr(xt(i,"index.html"),OP,"utf-8"),await sr(xt(i,"app-main.tsx"),RP,"utf-8"),await sr(xt(i,"vite.config.ts"),VP(),"utf-8"),await sr(xt(n,"dev.ports.ts"),NP(),"utf-8");let s=xt(n,"scripts");await qs(s,{recursive:!0}),await sr(xt(s,"ports.sh"),MP(),"utf-8");let a=xt(n,"src/main.tsx");await ip(a)||(await qs(jv(a),{recursive:!0}),await sr(a,AP(r),"utf-8"));let c=xt(n,"src/runtime/handlers.ts");await ip(c)||(await qs(jv(c),{recursive:!0}),await sr(c,TP,"utf-8")),console.log(` scaffold \u2192 ${i}/`)}ct();Ti();Lt();import{createServer as GP}from"node:http";import{watch as zP}from"node:fs";import{resolve as cr}from"node:path";ct();Ko();Lt();qo();import{mkdir as DP,writeFile as op}from"node:fs/promises";import{tmpdir as qP}from"node:os";import{join as Hs,resolve as ar}from"node:path";import{build as FP}from"esbuild";import{resolve as LP}from"node:path";ct();Jo();var Fs={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 jP(t){if(!t.extensions)return{allowlistExtra:t.allowlistExtra??[]};let e=await Vo(t.extensions),r=[...new Set([...t.allowlistExtra??[],...Object.keys(e.extensions)])];return{extensionRegistry:e,allowlistExtra:r}}async function qv(t,e){let r=await De(t),i=(await gt(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 jP(r),a=fe(t),{screen:c,partials:l}=await Sa({sourcePath:LP(a,i.source),exportName:i.exportName,screenName:i.screenName},{allowlistExtra:s,extensionRegistry:o}),{tokensPath:f,themePath:p}=Gt(r),{themeIR:d}=await un(f,p);await Er(r,t);let m=[c,...l];return await Ds(m,s),gi(m,d),Tv(c,l,{runtimeImportFrom:Fs.dispatch,extensionsImportFrom:Fs.extensions,contractsImportFrom:Fs.contracts,allowlistExtra:s,previewImports:Fs})}Ti();function HP(t){let e=t.replace(/View$/,"")||t;return e.charAt(0).toUpperCase()+e.slice(1)}function BP(t){let e=xe(),r=$r();return{"view-contracts:runtime/dispatch":ar(r,"dispatch.ts"),"view-contracts:runtime/style":ar(r,"style.ts"),"view-contracts:runtime/types":ar(r,"types.ts"),"view-contracts:runtime/style-helpers":ar(r,"style.ts"),"view-contracts:contracts":ar(t,"contracts/view-models.ts"),"view-contracts:extensions":ar(t,"src/components/extensions.tsx")}}function UP(t=800){return`<!DOCTYPE html>
|
|
874
|
+
<html lang="en">
|
|
875
|
+
<head>
|
|
876
|
+
<meta charset="UTF-8" />
|
|
877
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
878
|
+
<title>view-contracts preview</title>
|
|
879
|
+
<link rel="stylesheet" href="/theme.css" />
|
|
880
|
+
</head>
|
|
881
|
+
<body>
|
|
882
|
+
<div id="root"></div>
|
|
883
|
+
<script type="module" src="/bundle.js"></script>
|
|
884
|
+
<script>
|
|
885
|
+
(function () {
|
|
886
|
+
let last = null;
|
|
887
|
+
setInterval(function () {
|
|
888
|
+
fetch('/__vc-reload')
|
|
889
|
+
.then(function (r) { return r.json(); })
|
|
890
|
+
.then(function (body) {
|
|
891
|
+
if (last !== null && body.version !== last) location.reload();
|
|
892
|
+
last = body.version;
|
|
893
|
+
})
|
|
894
|
+
.catch(function () {});
|
|
895
|
+
}, ${t});
|
|
896
|
+
})();
|
|
897
|
+
</script>
|
|
898
|
+
</body>
|
|
899
|
+
</html>
|
|
900
|
+
`}async function WP(t,e,r,n,i){await op(Hs(t,"screen.tsx"),e,"utf8"),await op(Hs(t,"mock.ts"),r,"utf8");let o=`import React from 'react';
|
|
901
|
+
import ReactDOM from 'react-dom/client';
|
|
902
|
+
import { ${n} } from './screen.tsx';
|
|
903
|
+
import { ${i} } from './mock.ts';
|
|
904
|
+
import { registerActionHandler } from 'view-contracts:runtime/dispatch';
|
|
723
905
|
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
root: viteDir,
|
|
727
|
-
plugins: [
|
|
728
|
-
viewContractsPreviewPlugin({ configPath }),
|
|
729
|
-
viewContractsPreviewMockPlugin({ configPath }),
|
|
730
|
-
react(),
|
|
731
|
-
],
|
|
732
|
-
resolve: {
|
|
733
|
-
alias: previewRuntimeAliases(projectRoot, repoRoot),
|
|
734
|
-
},
|
|
735
|
-
server: {
|
|
736
|
-
port: PREVIEW_PORT,
|
|
737
|
-
strictPort: true,
|
|
738
|
-
fs: {
|
|
739
|
-
allow: [viteDir, projectRoot, repoRoot],
|
|
740
|
-
},
|
|
741
|
-
},
|
|
742
|
-
build: {
|
|
743
|
-
outDir: path.resolve(projectRoot, 'dist/preview'),
|
|
744
|
-
emptyOutDir: true,
|
|
745
|
-
rollupOptions: {
|
|
746
|
-
input: path.resolve(viteDir, 'preview.html'),
|
|
747
|
-
},
|
|
748
|
-
},
|
|
906
|
+
registerActionHandler(async (action) => {
|
|
907
|
+
alert(\`[preview] \${action.name}: \${JSON.stringify(action.params ?? {})}\`);
|
|
749
908
|
});
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
909
|
+
|
|
910
|
+
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
|
|
911
|
+
<React.StrictMode>
|
|
912
|
+
<${n} vm={${i}} />
|
|
913
|
+
</React.StrictMode>,
|
|
914
|
+
);
|
|
915
|
+
`,s=Hs(t,"entry.tsx");return await op(s,o,"utf8"),s}async function sp(t,e,r){let n=await De(t),o=(await gt(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=fe(t),[a,c,l]=await Promise.all([qv(t,e),$v(t,n,e),yi(n,t)]),f=HP(o.exportName),p=ep(e),d=Hs(qP(),`view-contracts-preview-${process.pid}`);await DP(d,{recursive:!0});let m=await WP(d,a,c,f,p),g=xe(),y=[ar(s,"node_modules"),ar(g,"node_modules")],$=await FP({entryPoints:[m],bundle:!0,write:!1,format:"esm",platform:"browser",target:"es2022",jsx:"automatic",jsxImportSource:"react",absWorkingDir:s,nodePaths:y,alias:BP(s),logLevel:"silent"});if($.errors.length>0)throw new Error($.errors.map(M=>M.text).join(`
|
|
916
|
+
`));let _=$.outputFiles[0]?.text??"";return{html:UP(),themeCss:l,bundleJs:_,version:r}}async function Fv(t,e){let r=await gt((await De(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}Ti();function Mi(t,e,r,n){t.writeHead(e,{"Content-Type":n,"Cache-Control":"no-store"}),t.end(r)}function JP(t,e,r){let n=t.url?.split("?")[0]??"/";if(n==="/"||n==="/index.html"){Mi(e,200,r.html,"text/html; charset=utf-8");return}if(n==="/bundle.js"){Mi(e,200,r.bundleJs,"text/javascript; charset=utf-8");return}if(n==="/theme.css"){Mi(e,200,r.themeCss,"text/css; charset=utf-8");return}if(n==="/__vc-reload"){Mi(e,200,JSON.stringify({version:r.version}),"application/json");return}Mi(e,404,"Not found","text/plain; charset=utf-8")}async function KP(t,e,r){let n=await De(t),i=fe(t),{tokensPath:o,themePath:s}=Gt(n),a=await kv(t,n),c=cr(xe(),"renderers/react/elements.yaml"),l=[cr(i,n.viewsDir),cr(i,o),cr(i,s),a,c];n.extensions&&l.push(cr(i,n.extensions)),n.design?.extensionsCss&&l.push(cr(i,n.design.extensionsCss)),l.push(cr(i,"contracts/view-models.ts")),l.push(cr(i,"src/components/extensions.tsx"));let f,p=()=>{f&&clearTimeout(f),f=setTimeout(()=>r(),150)},d=[];for(let g of l)await Ls(g)&&d.push(g);let m=d.map(g=>zP(g,{recursive:!0},()=>p()));return()=>{f&&clearTimeout(f);for(let g of m)g.close()}}async function Hv(t){let e=t.port??5173,r=t.host??"127.0.0.1",n=await Fv(t.configPath,t.screen),i=0,o=await sp(t.configPath,n,i),s=!1,a=!1,c=async()=>{if(s){a=!0;return}s=!0;try{i+=1,o=await sp(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:
|
|
917
|
+
${m}`)}finally{s=!1,a&&(a=!1,c())}},l=GP((d,m)=>JP(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 KP(t.configPath,n,()=>{c()});await new Promise(d=>{let m=()=>{p(),l.close(()=>d())};process.once("SIGINT",m),process.once("SIGTERM",m)})}async function cp(t){if(!t.extensions)return{allowlistExtra:t.allowlistExtra??[]};let e=await Vo(t.extensions),r=[...new Set([...t.allowlistExtra??[],...Object.keys(e.extensions)])];return{extensionRegistry:e,allowlistExtra:r}}async function Bv(t){await new Promise((e,r)=>{let n=ZP("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 ap(t){let e=await De(t),r=await gt(e.bindings),{extensionRegistry:n,allowlistExtra:i}=await cp(e),o=fe(t),{screens:s,partials:a}=await Hp(r.views.map(c=>({sourcePath:$t(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 Tr(t,e){let r=QP(Gv(t),e).replace(/\\/g,"/");return r.startsWith(".")||(r=`./${r}`),r.replace(/\.tsx?$/,".js")}async function Uv(t,e,r){let n=await De(t),i=fe(t),{allowlistExtra:o}=await cp(n),s=await gt(n.bindings);for(let a of r){let c=$t(n.generated.reactDir,"components",`${a.exportName}.generated.tsx`),l=Tr(c,$t(n.generated.reactDir,"runtime.ts")),f=Tr(c,$t(n.generated.reactDir,"extensions.generated.ts")),p=Tr(c,$t(i,"contracts/view-models.ts"));await np(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=pf(n,a),f=Tr(l,$t(n.generated.reactDir,"runtime.ts")),p=Tr(l,$t(n.generated.reactDir,"extensions.generated.ts")),d=Tr(l,$t(i,"contracts/view-models.ts")),m=new Map;for(let g of r){let y=Nv(n.generated.reactDir,g);m.set(g.exportName,Tr(l,y))}await np(c,l,{runtimeImportFrom:f,extensionsImportFrom:p,contractsImportFrom:d,allowlistExtra:o,viewRefImportFrom:m}),console.log(` ${a.exportName} \u2192 ${l}`)}}async function Wv(t){let e=await De(t),r=await gt(e.bindings),n=fe(t),o=["// Auto-generated view bridge registry \u2014 DO NOT EDIT",`// Generated from ${ff(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 XP(Gv($t(e.generated.bridge)),{recursive:!0}),await YP($t(e.generated.bridge),o.join(`
|
|
918
|
+
`),"utf-8"),console.log(`Bridge registry \u2192 ${e.generated.bridge} (${r.views.length} view(s))`)}var zv={compile:async(t,e)=>{let{screens:r,partials:n}=await ap(await Wt(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 Wt(t.config),{screens:n,partials:i}=await ap(r);await Uv(r,n,i)},renderBridge:async(t,e)=>{await Wv(await Wt(t.config))},build:async(t,e)=>{let r=await Wt(t.config),n=await De(r),i=await gt(n.bindings),{screens:o,partials:s}=await ap(r);console.log(`Compiled ${o.size} screen(s) and ${s.length} partial(s) to View IR (in-memory)`);let{tokensPath:a,themePath:c}=Gt(n),{tokenIR:l,themeIR:f}=await un(a,c);await Er(n,r);let{allowlistExtra:p}=await cp(n),d=[...o.values(),...s];await Ds(d,p),gi(d,f),await Mv(r,n),await Uv(r,o,s),await Wv(r),await Vv(r,n,i,{theme:f,tokens:l},{screens:o,partials:s}),await Lv(n,i),await Dv(r,n,i)},contractsGenerate:async(t,e)=>{let r=await De(await Wt(t.config));await Bv(["generate","-c",r.microContractsConfig]),console.log("Contracts generated via micro-contracts")},contractsCheck:async(t,e)=>{let r=await De(await Wt(t.config));await Bv(["lint","-c",r.microContractsConfig])},preview:async(t,e)=>{try{await Hv({configPath:await Wt(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 eI={version:"0.4.0"};Ep(zv,eI.version).parseAsync(process.argv).catch(t=>{console.error(t instanceof Error?t.message:t),process.exit(1)});
|
|
754
919
|
/*! Bundled license information:
|
|
755
920
|
|
|
756
921
|
js-yaml/dist/js-yaml.mjs:
|