view-contracts 0.5.5 → 0.5.7

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.
@@ -32,39 +32,39 @@ Expecting one of '${r.join("', '")}'`);let i=`${e}Help`;return this.on(i,o=>{let
32
32
  `+p}let g=e(i.buffer,a[d],l[d],i.position,m);p+=t.repeat(" ",o.indent)+n((i.line+1).toString(),f)+" | "+g.str+`
33
33
  `,p+=t.repeat("-",o.indent+f+3+g.pos)+`^
34
34
  `;for(let y=1;y<=o.linesAfter&&!(d+y>=l.length);y++){let w=e(i.buffer,a[d+y],l[d+y],i.position-(a[d]-a[d+y]),m);p+=t.repeat(" ",o.indent)+n((i.line+y+1).toString(),f)+" | "+w.str+`
35
- `}return p.replace(/\n$/,"")}return Za=r,Za}function Be(){if(Xd)return ec;Xd=1;let t=ei(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],n=["scalar","sequence","mapping"];function r(o){let s={};return o!==null&&Object.keys(o).forEach(function(a){o[a].forEach(function(l){s[String(l)]=a})}),s}function i(o,s){if(s=s||{},Object.keys(s).forEach(function(a){if(e.indexOf(a)===-1)throw new t('Unknown option "'+a+'" is met in definition of "'+o+'" YAML type.')}),this.options=s,this.tag=o,this.kind=s.kind||null,this.resolve=s.resolve||function(){return!0},this.construct=s.construct||function(a){return a},this.instanceOf=s.instanceOf||null,this.predicate=s.predicate||null,this.represent=s.represent||null,this.representName=s.representName||null,this.defaultStyle=s.defaultStyle||null,this.multi=s.multi||!1,this.styleAliases=r(s.styleAliases||null),n.indexOf(this.kind)===-1)throw new t('Unknown kind "'+this.kind+'" is specified for "'+o+'" YAML type.')}return ec=i,ec}function bf(){if(Qd)return tc;Qd=1;let t=ei(),e=Be();function n(o,s){let a=[];return o[s].forEach(function(l){let c=a.length;a.forEach(function(d,p){d.tag===l.tag&&d.kind===l.kind&&d.multi===l.multi&&(c=p)}),a[c]=l}),a}function r(){let o={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function s(a){a.multi?(o.multi[a.kind].push(a),o.multi.fallback.push(a)):o[a.kind][a.tag]=o.fallback[a.tag]=a}for(let a=0,l=arguments.length;a<l;a+=1)arguments[a].forEach(s);return o}function i(o){return this.extend(o)}return i.prototype.extend=function(s){let a=[],l=[];if(s instanceof e)l.push(s);else if(Array.isArray(s))l=l.concat(s);else if(s&&(Array.isArray(s.implicit)||Array.isArray(s.explicit)))s.implicit&&(a=a.concat(s.implicit)),s.explicit&&(l=l.concat(s.explicit));else throw new t("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");a.forEach(function(d){if(!(d instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(d.loadKind&&d.loadKind!=="scalar")throw new t("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(d.multi)throw new t("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),l.forEach(function(d){if(!(d instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let c=Object.create(i.prototype);return c.implicit=(this.implicit||[]).concat(a),c.explicit=(this.explicit||[]).concat(l),c.compiledImplicit=n(c,"implicit"),c.compiledExplicit=n(c,"explicit"),c.compiledTypeMap=r(c.compiledImplicit,c.compiledExplicit),c},tc=i,tc}function _f(){if(Zd)return nc;Zd=1;let t=Be();return nc=new t("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),nc}function $f(){if(ef)return rc;ef=1;let t=Be();return rc=new t("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),rc}function xf(){if(tf)return ic;tf=1;let t=Be();return ic=new t("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),ic}function Sf(){if(nf)return oc;nf=1;let t=bf();return oc=new t({explicit:[_f(),$f(),xf()]}),oc}function Cf(){if(rf)return sc;rf=1;let t=Be();function e(i){if(i===null)return!0;let o=i.length;return o===1&&i==="~"||o===4&&(i==="null"||i==="Null"||i==="NULL")}function n(){return null}function r(i){return i===null}return sc=new t("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:n,predicate:r,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),sc}function kf(){if(of)return ac;of=1;let t=Be();function e(i){if(i===null)return!1;let o=i.length;return o===4&&(i==="true"||i==="True"||i==="TRUE")||o===5&&(i==="false"||i==="False"||i==="FALSE")}function n(i){return i==="true"||i==="True"||i==="TRUE"}function r(i){return Object.prototype.toString.call(i)==="[object Boolean]"}return ac=new t("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:n,predicate:r,represent:{lowercase:function(i){return i?"true":"false"},uppercase:function(i){return i?"TRUE":"FALSE"},camelcase:function(i){return i?"True":"False"}},defaultStyle:"lowercase"}),ac}function Ef(){if(sf)return cc;sf=1;let t=Zr(),e=Be();function n(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}function r(c){return c>=48&&c<=55}function i(c){return c>=48&&c<=57}function o(c){if(c===null)return!1;let d=c.length,p=0,f=!1;if(!d)return!1;let m=c[p];if((m==="-"||m==="+")&&(m=c[++p]),m==="0"){if(p+1===d)return!0;if(m=c[++p],m==="b"){for(p++;p<d;p++){if(m=c[p],m!=="0"&&m!=="1")return!1;f=!0}return f&&isFinite(s(c))}if(m==="x"){for(p++;p<d;p++){if(!n(c.charCodeAt(p)))return!1;f=!0}return f&&isFinite(s(c))}if(m==="o"){for(p++;p<d;p++){if(!r(c.charCodeAt(p)))return!1;f=!0}return f&&isFinite(s(c))}}for(;p<d;p++){if(!i(c.charCodeAt(p)))return!1;f=!0}return f?isFinite(s(c)):!1}function s(c){let d=c,p=1,f=d[0];if((f==="-"||f==="+")&&(f==="-"&&(p=-1),d=d.slice(1),f=d[0]),d==="0")return 0;if(f==="0"){if(d[1]==="b")return p*parseInt(d.slice(2),2);if(d[1]==="x")return p*parseInt(d.slice(2),16);if(d[1]==="o")return p*parseInt(d.slice(2),8)}return p*parseInt(d,10)}function a(c){return s(c)}function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&c%1===0&&!t.isNegativeZero(c)}return cc=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:o,construct:a,predicate:l,represent:{binary:function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},octal:function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},decimal:function(c){return c.toString(10)},hexadecimal:function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),cc}function Pf(){if(af)return lc;af=1;let t=Zr(),e=Be(),n=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),r=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function i(c){return c===null||!n.test(c)?!1:isFinite(parseFloat(c,10))?!0:r.test(c)}function o(c){let d=c.toLowerCase(),p=d[0]==="-"?-1:1;return"+-".indexOf(d[0])>=0&&(d=d.slice(1)),d===".inf"?p===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:d===".nan"?NaN:p*parseFloat(d,10)}let s=/^[-+]?[0-9]+e/;function a(c,d){if(isNaN(c))switch(d){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(d){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(d){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(t.isNegativeZero(c))return"-0.0";let p=c.toString(10);return s.test(p)?p.replace("e",".e"):p}function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||t.isNegativeZero(c))}return lc=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:o,predicate:l,represent:a,defaultStyle:"lowercase"}),lc}function Rf(){return cf||(cf=1,uc=Sf().extend({implicit:[Cf(),kf(),Ef(),Pf()]})),uc}function If(){return lf||(lf=1,pc=Rf()),pc}function Tf(){if(uf)return dc;uf=1;let t=Be(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),n=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function r(s){return s===null?!1:e.exec(s)!==null||n.exec(s)!==null}function i(s){let a=0,l=null,c=e.exec(s);if(c===null&&(c=n.exec(s)),c===null)throw new Error("Date resolve error");let d=+c[1],p=+c[2]-1,f=+c[3];if(!c[4])return new Date(Date.UTC(d,p,f));let m=+c[4],g=+c[5],y=+c[6];if(c[7]){for(a=c[7].slice(0,3);a.length<3;)a+="0";a=+a}if(c[9]){let b=+c[10],I=+(c[11]||0);l=(b*60+I)*6e4,c[9]==="-"&&(l=-l)}let w=new Date(Date.UTC(d,p,f,m,g,y,a));return l&&w.setTime(w.getTime()-l),w}function o(s){return s.toISOString()}return dc=new t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r,construct:i,instanceOf:Date,represent:o}),dc}function Af(){if(pf)return fc;pf=1;let t=Be();function e(n){return n==="<<"||n===null}return fc=new t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),fc}function Of(){if(df)return hc;df=1;let t=Be(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
36
- \r`;function n(s){if(s===null)return!1;let a=0,l=s.length,c=e;for(let d=0;d<l;d++){let p=c.indexOf(s.charAt(d));if(!(p>64)){if(p<0)return!1;a+=6}}return a%8===0}function r(s){let a=s.replace(/[\r\n=]/g,""),l=a.length,c=e,d=0,p=[];for(let m=0;m<l;m++)m%4===0&&m&&(p.push(d>>16&255),p.push(d>>8&255),p.push(d&255)),d=d<<6|c.indexOf(a.charAt(m));let f=l%4*6;return f===0?(p.push(d>>16&255),p.push(d>>8&255),p.push(d&255)):f===18?(p.push(d>>10&255),p.push(d>>2&255)):f===12&&p.push(d>>4&255),new Uint8Array(p)}function i(s){let a="",l=0,c=s.length,d=e;for(let f=0;f<c;f++)f%3===0&&f&&(a+=d[l>>18&63],a+=d[l>>12&63],a+=d[l>>6&63],a+=d[l&63]),l=(l<<8)+s[f];let p=c%3;return p===0?(a+=d[l>>18&63],a+=d[l>>12&63],a+=d[l>>6&63],a+=d[l&63]):p===2?(a+=d[l>>10&63],a+=d[l>>4&63],a+=d[l<<2&63],a+=d[64]):p===1&&(a+=d[l>>2&63],a+=d[l<<4&63],a+=d[64],a+=d[64]),a}function o(s){return Object.prototype.toString.call(s)==="[object Uint8Array]"}return hc=new t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:n,construct:r,predicate:o,represent:i}),hc}function Nf(){if(ff)return mc;ff=1;let t=Be(),e=Object.prototype.hasOwnProperty,n=Object.prototype.toString;function r(o){if(o===null)return!0;let s=[],a=o;for(let l=0,c=a.length;l<c;l+=1){let d=a[l],p=!1;if(n.call(d)!=="[object Object]")return!1;let f;for(f in d)if(e.call(d,f))if(!p)p=!0;else return!1;if(!p)return!1;if(s.indexOf(f)===-1)s.push(f);else return!1}return!0}function i(o){return o!==null?o:[]}return mc=new t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:r,construct:i}),mc}function Mf(){if(hf)return gc;hf=1;let t=Be(),e=Object.prototype.toString;function n(i){if(i===null)return!0;let o=i,s=new Array(o.length);for(let a=0,l=o.length;a<l;a+=1){let c=o[a];if(e.call(c)!=="[object Object]")return!1;let d=Object.keys(c);if(d.length!==1)return!1;s[a]=[d[0],c[d[0]]]}return!0}function r(i){if(i===null)return[];let o=i,s=new Array(o.length);for(let a=0,l=o.length;a<l;a+=1){let c=o[a],d=Object.keys(c);s[a]=[d[0],c[d[0]]]}return s}return gc=new t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:n,construct:r}),gc}function Vf(){if(mf)return yc;mf=1;let t=Be(),e=Object.prototype.hasOwnProperty;function n(i){if(i===null)return!0;let o=i;for(let s in o)if(e.call(o,s)&&o[s]!==null)return!1;return!0}function r(i){return i!==null?i:{}}return yc=new t("tag:yaml.org,2002:set",{kind:"mapping",resolve:n,construct:r}),yc}function bc(){return gf||(gf=1,wc=If().extend({implicit:[Tf(),Af()],explicit:[Of(),Nf(),Mf(),Vf()]})),wc}function U_(){if(yf)return Eo;yf=1;let t=Zr(),e=ei(),n=W_(),r=bc(),i=Object.prototype.hasOwnProperty,o=1,s=2,a=3,l=4,c=1,d=2,p=3,f=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,m=/[\x85\u2028\u2029]/,g=/[,\[\]{}]/,y=/^(?:!|!!|![0-9A-Za-z-]+!)$/,w=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function b(u){return Object.prototype.toString.call(u)}function I(u){return u===10||u===13}function S(u){return u===9||u===32}function R(u){return u===9||u===32||u===10||u===13}function N(u){return u===44||u===91||u===93||u===123||u===125}function j(u){if(u>=48&&u<=57)return u-48;let v=u|32;return v>=97&&v<=102?v-97+10:-1}function G(u){return u===120?2:u===117?4:u===85?8:0}function ie(u){return u>=48&&u<=57?u-48:-1}function ge(u){switch(u){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
37
- `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"\x85";case 95:return"\xA0";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function xe(u){return u<=65535?String.fromCharCode(u):String.fromCharCode((u-65536>>10)+55296,(u-65536&1023)+56320)}function Te(u,v,C){v==="__proto__"?Object.defineProperty(u,v,{configurable:!0,enumerable:!0,writable:!0,value:C}):u[v]=C}let $e=new Array(256),Je=new Array(256);for(let u=0;u<256;u++)$e[u]=ge(u)?1:0,Je[u]=ge(u);function de(u,v){this.input=u,this.filename=v.filename||null,this.schema=v.schema||r,this.onWarning=v.onWarning||null,this.legacy=v.legacy||!1,this.json=v.json||!1,this.listener=v.listener||null,this.maxDepth=typeof v.maxDepth=="number"?v.maxDepth:100,this.maxTotalMergeKeys=typeof v.maxTotalMergeKeys=="number"?v.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=u.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function X(u,v){let C={name:u.filename,buffer:u.input.slice(0,-1),position:u.position,line:u.line,column:u.position-u.lineStart};return C.snippet=n(C),new e(v,C)}function D(u,v){throw X(u,v)}function Gn(u,v){u.onWarning&&u.onWarning.call(null,X(u,v))}function Vt(u,v,C){let P=u.anchorMapTransactions;if(P.length!==0){let x=P[P.length-1];i.call(x,v)||(x[v]={existed:i.call(u.anchorMap,v),value:u.anchorMap[v]})}u.anchorMap[v]=C}function wa(u){u.anchorMapTransactions.push(Object.create(null))}function wn(u){let v=u.anchorMapTransactions.pop(),C=u.anchorMapTransactions;if(C.length===0)return;let P=C[C.length-1],x=Object.keys(v);for(let M=0,h=x.length;M<h;M+=1){let _=x[M];i.call(P,_)||(P[_]=v[_])}}function va(u){let v=u.anchorMapTransactions.pop(),C=Object.keys(v);for(let P=C.length-1;P>=0;P-=1){let x=v[C[P]];x.existed?u.anchorMap[C[P]]=x.value:delete u.anchorMap[C[P]]}}function zr(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 Jn(u,v){u.position=v.position,u.line=v.line,u.lineStart=v.lineStart,u.lineIndent=v.lineIndent,u.firstTabInLine=v.firstTabInLine,u.tag=v.tag,u.anchor=v.anchor,u.kind=v.kind,u.result=v.result}let lo={YAML:function(v,C,P){v.version!==null&&D(v,"duplication of %YAML directive"),P.length!==1&&D(v,"YAML directive accepts exactly one argument");let x=/^([0-9]+)\.([0-9]+)$/.exec(P[0]);x===null&&D(v,"ill-formed argument of the YAML directive");let M=parseInt(x[1],10),h=parseInt(x[2],10);M!==1&&D(v,"unacceptable YAML version of the document"),v.version=P[0],v.checkLineBreaks=h<2,h!==1&&h!==2&&Gn(v,"unsupported YAML version of the document")},TAG:function(v,C,P){let x;P.length!==2&&D(v,"TAG directive accepts exactly two arguments");let M=P[0];x=P[1],y.test(M)||D(v,"ill-formed tag handle (first argument) of the TAG directive"),i.call(v.tagMap,M)&&D(v,'there is a previously declared suffix for "'+M+'" tag handle'),w.test(x)||D(v,"ill-formed tag prefix (second argument) of the TAG directive");try{x=decodeURIComponent(x)}catch{D(v,"tag prefix is malformed: "+x)}v.tagMap[M]=x}};function tt(u,v,C,P){if(v<C){let x=u.input.slice(v,C);if(P)for(let M=0,h=x.length;M<h;M+=1){let _=x.charCodeAt(M);_===9||_>=32&&_<=1114111||D(u,"expected valid JSON character")}else f.test(x)&&D(u,"the stream contains non-printable characters");u.result+=x}}function tn(u,v,C,P){t.isObject(C)||D(u,"cannot merge mappings; the provided source object is unacceptable");let x=Object.keys(C);for(let M=0,h=x.length;M<h;M+=1){let _=x[M];u.maxTotalMergeKeys!==-1&&++u.totalMergeKeys>u.maxTotalMergeKeys&&D(u,"merge keys exceeded maxTotalMergeKeys ("+u.maxTotalMergeKeys+")"),i.call(v,_)||(Te(v,_,C[_]),P[_]=!0)}}function Lt(u,v,C,P,x,M,h,_,A){if(Array.isArray(x)){x=Array.prototype.slice.call(x);for(let k=0,E=x.length;k<E;k+=1)Array.isArray(x[k])&&D(u,"nested arrays are not supported inside keys"),typeof x=="object"&&b(x[k])==="[object Object]"&&(x[k]="[object Object]")}if(typeof x=="object"&&b(x)==="[object Object]"&&(x="[object Object]"),x=String(x),v===null&&(v={}),P==="tag:yaml.org,2002:merge")if(Array.isArray(M))for(let k=0,E=M.length;k<E;k+=1)tn(u,v,M[k],C);else tn(u,v,M,C);else!u.json&&!i.call(C,x)&&i.call(v,x)&&(u.line=h||u.line,u.lineStart=_||u.lineStart,u.position=A||u.position,D(u,"duplicated mapping key")),Te(v,x,M),delete C[x];return v}function Kn(u){let v=u.input.charCodeAt(u.position);v===10?u.position++:v===13?(u.position++,u.input.charCodeAt(u.position)===10&&u.position++):D(u,"a line break is expected"),u.line+=1,u.lineStart=u.position,u.firstTabInLine=-1}function Se(u,v,C){let P=0,x=u.input.charCodeAt(u.position);for(;x!==0;){for(;S(x);)x===9&&u.firstTabInLine===-1&&(u.firstTabInLine=u.position),x=u.input.charCodeAt(++u.position);if(v&&x===35)do x=u.input.charCodeAt(++u.position);while(x!==10&&x!==13&&x!==0);if(I(x))for(Kn(u),x=u.input.charCodeAt(u.position),P++,u.lineIndent=0;x===32;)u.lineIndent++,x=u.input.charCodeAt(++u.position);else break}return C!==-1&&P!==0&&u.lineIndent<C&&Gn(u,"deficient indentation"),P}function Yn(u){let v=u.position,C=u.input.charCodeAt(v);return!!((C===45||C===46)&&C===u.input.charCodeAt(v+1)&&C===u.input.charCodeAt(v+2)&&(v+=3,C=u.input.charCodeAt(v),C===0||R(C)))}function jt(u,v){v===1?u.result+=" ":v>1&&(u.result+=t.repeat(`
38
- `,v-1))}function uo(u,v,C){let P,x,M,h,_,A,k=u.kind,E=u.result,O=u.input.charCodeAt(u.position);if(R(O)||N(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 T=u.input.charCodeAt(u.position+1);if(R(T)||C&&N(T))return!1}for(u.kind="scalar",u.result="",P=x=u.position,M=!1;O!==0;){if(O===58){let T=u.input.charCodeAt(u.position+1);if(R(T)||C&&N(T))break}else if(O===35){let T=u.input.charCodeAt(u.position-1);if(R(T))break}else{if(u.position===u.lineStart&&Yn(u)||C&&N(O))break;if(I(O))if(h=u.line,_=u.lineStart,A=u.lineIndent,Se(u,!1,-1),u.lineIndent>=v){M=!0,O=u.input.charCodeAt(u.position);continue}else{u.position=x,u.line=h,u.lineStart=_,u.lineIndent=A;break}}M&&(tt(u,P,x,!1),jt(u,u.line-h),P=x=u.position,M=!1),S(O)||(x=u.position+1),O=u.input.charCodeAt(++u.position)}return tt(u,P,x,!1),u.result?!0:(u.kind=k,u.result=E,!1)}function po(u,v){let C,P,x=u.input.charCodeAt(u.position);if(x!==39)return!1;for(u.kind="scalar",u.result="",u.position++,C=P=u.position;(x=u.input.charCodeAt(u.position))!==0;)if(x===39)if(tt(u,C,u.position,!0),x=u.input.charCodeAt(++u.position),x===39)C=u.position,u.position++,P=u.position;else return!0;else I(x)?(tt(u,C,P,!0),jt(u,Se(u,!1,v)),C=P=u.position):u.position===u.lineStart&&Yn(u)?D(u,"unexpected end of the document within a single quoted scalar"):(u.position++,S(x)||(P=u.position));D(u,"unexpected end of the stream within a single quoted scalar")}function Gr(u,v){let C,P,x,M=u.input.charCodeAt(u.position);if(M!==34)return!1;for(u.kind="scalar",u.result="",u.position++,C=P=u.position;(M=u.input.charCodeAt(u.position))!==0;){if(M===34)return tt(u,C,u.position,!0),u.position++,!0;if(M===92){if(tt(u,C,u.position,!0),M=u.input.charCodeAt(++u.position),I(M))Se(u,!1,v);else if(M<256&&$e[M])u.result+=Je[M],u.position++;else if((x=G(M))>0){let h=x,_=0;for(;h>0;h--)M=u.input.charCodeAt(++u.position),(x=j(M))>=0?_=(_<<4)+x:D(u,"expected hexadecimal character");u.result+=xe(_),u.position++}else D(u,"unknown escape sequence");C=P=u.position}else I(M)?(tt(u,C,P,!0),jt(u,Se(u,!1,v)),C=P=u.position):u.position===u.lineStart&&Yn(u)?D(u,"unexpected end of the document within a double quoted scalar"):(u.position++,S(M)||(P=u.position))}D(u,"unexpected end of the stream within a double quoted scalar")}function fo(u,v){let C=!0,P,x,M,h=u.tag,_,A=u.anchor,k,E,O,T,F=Object.create(null),q,z,J,oe=u.input.charCodeAt(u.position);if(oe===91)k=93,T=!1,_=[];else if(oe===123)k=125,T=!0,_={};else return!1;for(u.anchor!==null&&Vt(u,u.anchor,_),oe=u.input.charCodeAt(++u.position);oe!==0;){if(Se(u,!0,v),oe=u.input.charCodeAt(u.position),oe===k)return u.position++,u.tag=h,u.anchor=A,u.kind=T?"mapping":"sequence",u.result=_,!0;if(C?oe===44&&D(u,"expected the node content, but found ','"):D(u,"missed comma between flow collection entries"),z=q=J=null,E=O=!1,oe===63){let ye=u.input.charCodeAt(u.position+1);R(ye)&&(E=O=!0,u.position++,Se(u,!0,v))}P=u.line,x=u.lineStart,M=u.position,qt(u,v,o,!1,!0),z=u.tag,q=u.result,Se(u,!0,v),oe=u.input.charCodeAt(u.position),(O||u.line===P)&&oe===58&&(E=!0,oe=u.input.charCodeAt(++u.position),Se(u,!0,v),qt(u,v,o,!1,!0),J=u.result),T?Lt(u,_,F,z,q,J,P,x,M):E?_.push(Lt(u,null,F,z,q,J,P,x,M)):_.push(q),Se(u,!0,v),oe=u.input.charCodeAt(u.position),oe===44?(C=!0,oe=u.input.charCodeAt(++u.position)):C=!1}D(u,"unexpected end of the stream within a flow collection")}function ho(u,v){let C,P=c,x=!1,M=!1,h=v,_=0,A=!1,k,E=u.input.charCodeAt(u.position);if(E===124)C=!1;else if(E===62)C=!0;else return!1;for(u.kind="scalar",u.result="";E!==0;)if(E=u.input.charCodeAt(++u.position),E===43||E===45)c===P?P=E===43?p:d:D(u,"repeat of a chomping mode identifier");else if((k=ie(E))>=0)k===0?D(u,"bad explicit indentation width of a block scalar; it cannot be less than one"):M?D(u,"repeat of an indentation width identifier"):(h=v+k-1,M=!0);else break;if(S(E)){do E=u.input.charCodeAt(++u.position);while(S(E));if(E===35)do E=u.input.charCodeAt(++u.position);while(!I(E)&&E!==0)}for(;E!==0;){for(Kn(u),u.lineIndent=0,E=u.input.charCodeAt(u.position);(!M||u.lineIndent<h)&&E===32;)u.lineIndent++,E=u.input.charCodeAt(++u.position);if(!M&&u.lineIndent>h&&(h=u.lineIndent),I(E)){_++;continue}if(!M&&h===0&&D(u,"missing indentation for block scalar"),u.lineIndent<h){P===p?u.result+=t.repeat(`
39
- `,x?1+_:_):P===c&&x&&(u.result+=`
40
- `);break}C?S(E)?(A=!0,u.result+=t.repeat(`
41
- `,x?1+_:_)):A?(A=!1,u.result+=t.repeat(`
42
- `,_+1)):_===0?x&&(u.result+=" "):u.result+=t.repeat(`
43
- `,_):u.result+=t.repeat(`
44
- `,x?1+_:_),x=!0,M=!0,_=0;let O=u.position;for(;!I(E)&&E!==0;)E=u.input.charCodeAt(++u.position);tt(u,O,u.position,!1)}return!0}function Dt(u,v){let C=u.tag,P=u.anchor,x=[],M=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&Vt(u,u.anchor,x);let h=u.input.charCodeAt(u.position);for(;h!==0&&(u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,D(u,"tab characters must not be used in indentation")),h===45);){let _=u.input.charCodeAt(u.position+1);if(!R(_))break;if(M=!0,u.position++,Se(u,!0,-1)&&u.lineIndent<=v){x.push(null),h=u.input.charCodeAt(u.position);continue}let A=u.line;if(qt(u,v,a,!1,!0),x.push(u.result),Se(u,!0,-1),h=u.input.charCodeAt(u.position),(u.line===A||u.lineIndent>v)&&h!==0)D(u,"bad indentation of a sequence entry");else if(u.lineIndent<v)break}return M?(u.tag=C,u.anchor=P,u.kind="sequence",u.result=x,!0):!1}function mo(u,v,C){let P,x,M,h,_=u.tag,A=u.anchor,k={},E=Object.create(null),O=null,T=null,F=null,q=!1,z=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&Vt(u,u.anchor,k);let J=u.input.charCodeAt(u.position);for(;J!==0;){!q&&u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,D(u,"tab characters must not be used in indentation"));let oe=u.input.charCodeAt(u.position+1),ye=u.line;if((J===63||J===58)&&R(oe))J===63?(q&&(Lt(u,k,E,O,T,null,x,M,h),O=T=F=null),z=!0,q=!0,P=!0):q?(q=!1,P=!0):D(u,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),u.position+=1,J=oe;else{if(x=u.line,M=u.lineStart,h=u.position,!qt(u,C,s,!1,!0))break;if(u.line===ye){for(J=u.input.charCodeAt(u.position);S(J);)J=u.input.charCodeAt(++u.position);if(J===58)J=u.input.charCodeAt(++u.position),R(J)||D(u,"a whitespace character is expected after the key-value separator within a block mapping"),q&&(Lt(u,k,E,O,T,null,x,M,h),O=T=F=null),z=!0,q=!1,P=!1,O=u.tag,T=u.result;else if(z)D(u,"can not read an implicit mapping pair; a colon is missed");else return u.tag=_,u.anchor=A,!0}else if(z)D(u,"can not read a block mapping entry; a multiline key may not be an implicit key");else return u.tag=_,u.anchor=A,!0}if((u.line===ye||u.lineIndent>v)&&(q&&(x=u.line,M=u.lineStart,h=u.position),qt(u,v,l,!0,P)&&(q?T=u.result:F=u.result),q||(Lt(u,k,E,O,T,F,x,M,h),O=T=F=null),Se(u,!0,-1),J=u.input.charCodeAt(u.position)),(u.line===ye||u.lineIndent>v)&&J!==0)D(u,"bad indentation of a mapping entry");else if(u.lineIndent<v)break}return q&&Lt(u,k,E,O,T,null,x,M,h),z&&(u.tag=_,u.anchor=A,u.kind="mapping",u.result=k),z}function ba(u){let v=!1,C=!1,P,x,M=u.input.charCodeAt(u.position);if(M!==33)return!1;u.tag!==null&&D(u,"duplication of a tag property"),M=u.input.charCodeAt(++u.position),M===60?(v=!0,M=u.input.charCodeAt(++u.position)):M===33?(C=!0,P="!!",M=u.input.charCodeAt(++u.position)):P="!";let h=u.position;if(v){do M=u.input.charCodeAt(++u.position);while(M!==0&&M!==62);u.position<u.length?(x=u.input.slice(h,u.position),M=u.input.charCodeAt(++u.position)):D(u,"unexpected end of the stream within a verbatim tag")}else{for(;M!==0&&!R(M);)M===33&&(C?D(u,"tag suffix cannot contain exclamation marks"):(P=u.input.slice(h-1,u.position+1),y.test(P)||D(u,"named tag handle cannot contain such characters"),C=!0,h=u.position+1)),M=u.input.charCodeAt(++u.position);x=u.input.slice(h,u.position),g.test(x)&&D(u,"tag suffix cannot contain flow indicator characters")}x&&!w.test(x)&&D(u,"tag name cannot contain such characters: "+x);try{x=decodeURIComponent(x)}catch{D(u,"tag name is malformed: "+x)}return v?u.tag=x:i.call(u.tagMap,P)?u.tag=u.tagMap[P]+x:P==="!"?u.tag="!"+x:P==="!!"?u.tag="tag:yaml.org,2002:"+x:D(u,'undeclared tag handle "'+P+'"'),!0}function go(u){let v=u.input.charCodeAt(u.position);if(v!==38)return!1;u.anchor!==null&&D(u,"duplication of an anchor property"),v=u.input.charCodeAt(++u.position);let C=u.position;for(;v!==0&&!R(v)&&!N(v);)v=u.input.charCodeAt(++u.position);return u.position===C&&D(u,"name of an anchor node must contain at least one character"),u.anchor=u.input.slice(C,u.position),!0}function yo(u){let v=u.input.charCodeAt(u.position);if(v!==42)return!1;v=u.input.charCodeAt(++u.position);let C=u.position;for(;v!==0&&!R(v)&&!N(v);)v=u.input.charCodeAt(++u.position);u.position===C&&D(u,"name of an alias node must contain at least one character");let P=u.input.slice(C,u.position);return i.call(u.anchorMap,P)||D(u,'unidentified alias "'+P+'"'),u.result=u.anchorMap[P],Se(u,!0,-1),!0}function _a(u,v,C,P){let x=zr(u);return wa(u),Jn(u,v),u.tag=null,u.anchor=null,u.kind=null,u.result=null,mo(u,C,P)&&u.kind==="mapping"?(wn(u),!0):(va(u),Jn(u,x),!1)}function qt(u,v,C,P,x){let M,h,_=1,A=!1,k=!1,E=null,O,T,F;u.depth>=u.maxDepth&&D(u,"nesting exceeded maxDepth ("+u.maxDepth+")"),u.depth+=1,u.listener!==null&&u.listener("open",u),u.tag=null,u.anchor=null,u.kind=null,u.result=null;let q=M=h=l===C||a===C;if(P&&Se(u,!0,-1)&&(A=!0,u.lineIndent>v?_=1:u.lineIndent===v?_=0:u.lineIndent<v&&(_=-1)),_===1)for(;;){let z=u.input.charCodeAt(u.position),J=zr(u);if(A&&(z===33&&u.tag!==null||z===38&&u.anchor!==null)||!ba(u)&&!go(u))break;E===null&&(E=J),Se(u,!0,-1)?(A=!0,h=q,u.lineIndent>v?_=1:u.lineIndent===v?_=0:u.lineIndent<v&&(_=-1)):h=!1}if(h&&(h=A||x),_===1||l===C)if(o===C||s===C?T=v:T=v+1,F=u.position-u.lineStart,_===1)if(h&&(Dt(u,F)||mo(u,F,T))||fo(u,T))k=!0;else{let z=u.input.charCodeAt(u.position);E!==null&&q&&!h&&z!==124&&z!==62&&_a(u,E,E.position-E.lineStart,T)||M&&ho(u,T)||po(u,T)||Gr(u,T)?k=!0:yo(u)?(k=!0,(u.tag!==null||u.anchor!==null)&&D(u,"alias node should not have any properties")):uo(u,T,o===C)&&(k=!0,u.tag===null&&(u.tag="?")),u.anchor!==null&&Vt(u,u.anchor,u.result)}else _===0&&(k=h&&Dt(u,F));if(u.tag===null)u.anchor!==null&&Vt(u,u.anchor,u.result);else if(u.tag==="?"){u.result!==null&&u.kind!=="scalar"&&D(u,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+u.kind+'"');for(let z=0,J=u.implicitTypes.length;z<J;z+=1)if(O=u.implicitTypes[z],O.resolve(u.result)){u.result=O.construct(u.result),u.tag=O.tag,u.anchor!==null&&Vt(u,u.anchor,u.result);break}}else if(u.tag!=="!"){if(i.call(u.typeMap[u.kind||"fallback"],u.tag))O=u.typeMap[u.kind||"fallback"][u.tag];else{O=null;let z=u.typeMap.multi[u.kind||"fallback"];for(let J=0,oe=z.length;J<oe;J+=1)if(u.tag.slice(0,z[J].tag.length)===z[J].tag){O=z[J];break}}O||D(u,"unknown tag !<"+u.tag+">"),u.result!==null&&O.kind!==u.kind&&D(u,"unacceptable node kind for !<"+u.tag+'> tag; it should be "'+O.kind+'", not "'+u.kind+'"'),O.resolve(u.result,u.tag)?(u.result=O.construct(u.result,u.tag),u.anchor!==null&&Vt(u,u.anchor,u.result)):D(u,"cannot resolve a node with !<"+u.tag+"> explicit tag")}return u.listener!==null&&u.listener("close",u),u.depth-=1,u.tag!==null||u.anchor!==null||k}function $a(u){let v=u.position,C=!1,P;for(u.version=null,u.checkLineBreaks=u.legacy,u.tagMap=Object.create(null),u.anchorMap=Object.create(null);(P=u.input.charCodeAt(u.position))!==0&&(Se(u,!0,-1),P=u.input.charCodeAt(u.position),!(u.lineIndent>0||P!==37));){C=!0,P=u.input.charCodeAt(++u.position);let x=u.position;for(;P!==0&&!R(P);)P=u.input.charCodeAt(++u.position);let M=u.input.slice(x,u.position),h=[];for(M.length<1&&D(u,"directive name must not be less than one character in length");P!==0;){for(;S(P);)P=u.input.charCodeAt(++u.position);if(P===35){do P=u.input.charCodeAt(++u.position);while(P!==0&&!I(P));break}if(I(P))break;for(x=u.position;P!==0&&!R(P);)P=u.input.charCodeAt(++u.position);h.push(u.input.slice(x,u.position))}P!==0&&Kn(u),i.call(lo,M)?lo[M](u,M,h):Gn(u,'unknown document directive "'+M+'"')}if(Se(u,!0,-1),u.lineIndent===0&&u.input.charCodeAt(u.position)===45&&u.input.charCodeAt(u.position+1)===45&&u.input.charCodeAt(u.position+2)===45?(u.position+=3,Se(u,!0,-1)):C&&D(u,"directives end mark is expected"),qt(u,u.lineIndent-1,l,!1,!0),Se(u,!0,-1),u.checkLineBreaks&&m.test(u.input.slice(v,u.position))&&Gn(u,"non-ASCII line breaks are interpreted as content"),u.documents.push(u.result),u.position===u.lineStart&&Yn(u)){u.input.charCodeAt(u.position)===46&&(u.position+=3,Se(u,!0,-1));return}u.position<u.length-1&&D(u,"end of the stream or a document separator is expected")}function wo(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 C=new de(u,v),P=u.indexOf("\0");for(P!==-1&&(C.position=P,D(C,"null byte is not allowed in input")),C.input+="\0";C.input.charCodeAt(C.position)===32;)C.lineIndent+=1,C.position+=1;for(;C.position<C.length-1;)$a(C);return C.documents}function vo(u,v,C){v!==null&&typeof v=="object"&&typeof C>"u"&&(C=v,v=null);let P=wo(u,C);if(typeof v!="function")return P;for(let x=0,M=P.length;x<M;x+=1)v(P[x])}function xa(u,v){let C=wo(u,v);if(C.length!==0){if(C.length===1)return C[0];throw new e("expected a single document in the stream, but found more")}}return Eo.loadAll=vo,Eo.load=xa,Eo}function z_(){if(wf)return vc;wf=1;let t=Zr(),e=ei(),n=bc(),r=Object.prototype.toString,i=Object.prototype.hasOwnProperty,o=65279,s=9,a=10,l=13,c=32,d=33,p=34,f=35,m=37,g=38,y=39,w=42,b=44,I=45,S=58,R=61,N=62,j=63,G=64,ie=91,ge=93,xe=96,Te=123,$e=124,Je=125,de={};de[0]="\\0",de[7]="\\a",de[8]="\\b",de[9]="\\t",de[10]="\\n",de[11]="\\v",de[12]="\\f",de[13]="\\r",de[27]="\\e",de[34]='\\"',de[92]="\\\\",de[133]="\\N",de[160]="\\_",de[8232]="\\L",de[8233]="\\P";let X=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],D=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Gn(h,_){if(_===null)return{};let A={},k=Object.keys(_);for(let E=0,O=k.length;E<O;E+=1){let T=k[E],F=String(_[T]);T.slice(0,2)==="!!"&&(T="tag:yaml.org,2002:"+T.slice(2));let q=h.compiledTypeMap.fallback[T];q&&i.call(q.styleAliases,F)&&(F=q.styleAliases[F]),A[T]=F}return A}function Vt(h){let _,A,k=h.toString(16).toUpperCase();if(h<=255)_="x",A=2;else if(h<=65535)_="u",A=4;else if(h<=4294967295)_="U",A=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+_+t.repeat("0",A-k.length)+k}let wa=1,wn=2;function va(h){this.schema=h.schema||n,this.indent=Math.max(1,h.indent||2),this.noArrayIndent=h.noArrayIndent||!1,this.skipInvalid=h.skipInvalid||!1,this.flowLevel=t.isNothing(h.flowLevel)?-1:h.flowLevel,this.styleMap=Gn(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==='"'?wn:wa,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 zr(h,_){let A=t.repeat(" ",_),k=0,E="",O=h.length;for(;k<O;){let T,F=h.indexOf(`
35
+ `}return p.replace(/\n$/,"")}return Za=r,Za}function Be(){if(Xd)return ec;Xd=1;let t=ei(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],n=["scalar","sequence","mapping"];function r(o){let s={};return o!==null&&Object.keys(o).forEach(function(a){o[a].forEach(function(l){s[String(l)]=a})}),s}function i(o,s){if(s=s||{},Object.keys(s).forEach(function(a){if(e.indexOf(a)===-1)throw new t('Unknown option "'+a+'" is met in definition of "'+o+'" YAML type.')}),this.options=s,this.tag=o,this.kind=s.kind||null,this.resolve=s.resolve||function(){return!0},this.construct=s.construct||function(a){return a},this.instanceOf=s.instanceOf||null,this.predicate=s.predicate||null,this.represent=s.represent||null,this.representName=s.representName||null,this.defaultStyle=s.defaultStyle||null,this.multi=s.multi||!1,this.styleAliases=r(s.styleAliases||null),n.indexOf(this.kind)===-1)throw new t('Unknown kind "'+this.kind+'" is specified for "'+o+'" YAML type.')}return ec=i,ec}function bf(){if(Qd)return tc;Qd=1;let t=ei(),e=Be();function n(o,s){let a=[];return o[s].forEach(function(l){let c=a.length;a.forEach(function(d,p){d.tag===l.tag&&d.kind===l.kind&&d.multi===l.multi&&(c=p)}),a[c]=l}),a}function r(){let o={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function s(a){a.multi?(o.multi[a.kind].push(a),o.multi.fallback.push(a)):o[a.kind][a.tag]=o.fallback[a.tag]=a}for(let a=0,l=arguments.length;a<l;a+=1)arguments[a].forEach(s);return o}function i(o){return this.extend(o)}return i.prototype.extend=function(s){let a=[],l=[];if(s instanceof e)l.push(s);else if(Array.isArray(s))l=l.concat(s);else if(s&&(Array.isArray(s.implicit)||Array.isArray(s.explicit)))s.implicit&&(a=a.concat(s.implicit)),s.explicit&&(l=l.concat(s.explicit));else throw new t("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");a.forEach(function(d){if(!(d instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(d.loadKind&&d.loadKind!=="scalar")throw new t("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(d.multi)throw new t("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),l.forEach(function(d){if(!(d instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let c=Object.create(i.prototype);return c.implicit=(this.implicit||[]).concat(a),c.explicit=(this.explicit||[]).concat(l),c.compiledImplicit=n(c,"implicit"),c.compiledExplicit=n(c,"explicit"),c.compiledTypeMap=r(c.compiledImplicit,c.compiledExplicit),c},tc=i,tc}function _f(){if(Zd)return nc;Zd=1;let t=Be();return nc=new t("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),nc}function $f(){if(ef)return rc;ef=1;let t=Be();return rc=new t("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),rc}function xf(){if(tf)return ic;tf=1;let t=Be();return ic=new t("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),ic}function Sf(){if(nf)return oc;nf=1;let t=bf();return oc=new t({explicit:[_f(),$f(),xf()]}),oc}function Cf(){if(rf)return sc;rf=1;let t=Be();function e(i){if(i===null)return!0;let o=i.length;return o===1&&i==="~"||o===4&&(i==="null"||i==="Null"||i==="NULL")}function n(){return null}function r(i){return i===null}return sc=new t("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:n,predicate:r,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),sc}function kf(){if(of)return ac;of=1;let t=Be();function e(i){if(i===null)return!1;let o=i.length;return o===4&&(i==="true"||i==="True"||i==="TRUE")||o===5&&(i==="false"||i==="False"||i==="FALSE")}function n(i){return i==="true"||i==="True"||i==="TRUE"}function r(i){return Object.prototype.toString.call(i)==="[object Boolean]"}return ac=new t("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:n,predicate:r,represent:{lowercase:function(i){return i?"true":"false"},uppercase:function(i){return i?"TRUE":"FALSE"},camelcase:function(i){return i?"True":"False"}},defaultStyle:"lowercase"}),ac}function Ef(){if(sf)return cc;sf=1;let t=Zr(),e=Be();function n(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}function r(c){return c>=48&&c<=55}function i(c){return c>=48&&c<=57}function o(c){if(c===null)return!1;let d=c.length,p=0,f=!1;if(!d)return!1;let m=c[p];if((m==="-"||m==="+")&&(m=c[++p]),m==="0"){if(p+1===d)return!0;if(m=c[++p],m==="b"){for(p++;p<d;p++){if(m=c[p],m!=="0"&&m!=="1")return!1;f=!0}return f&&isFinite(s(c))}if(m==="x"){for(p++;p<d;p++){if(!n(c.charCodeAt(p)))return!1;f=!0}return f&&isFinite(s(c))}if(m==="o"){for(p++;p<d;p++){if(!r(c.charCodeAt(p)))return!1;f=!0}return f&&isFinite(s(c))}}for(;p<d;p++){if(!i(c.charCodeAt(p)))return!1;f=!0}return f?isFinite(s(c)):!1}function s(c){let d=c,p=1,f=d[0];if((f==="-"||f==="+")&&(f==="-"&&(p=-1),d=d.slice(1),f=d[0]),d==="0")return 0;if(f==="0"){if(d[1]==="b")return p*parseInt(d.slice(2),2);if(d[1]==="x")return p*parseInt(d.slice(2),16);if(d[1]==="o")return p*parseInt(d.slice(2),8)}return p*parseInt(d,10)}function a(c){return s(c)}function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&c%1===0&&!t.isNegativeZero(c)}return cc=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:o,construct:a,predicate:l,represent:{binary:function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},octal:function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},decimal:function(c){return c.toString(10)},hexadecimal:function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),cc}function Pf(){if(af)return lc;af=1;let t=Zr(),e=Be(),n=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),r=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function i(c){return c===null||!n.test(c)?!1:isFinite(parseFloat(c,10))?!0:r.test(c)}function o(c){let d=c.toLowerCase(),p=d[0]==="-"?-1:1;return"+-".indexOf(d[0])>=0&&(d=d.slice(1)),d===".inf"?p===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:d===".nan"?NaN:p*parseFloat(d,10)}let s=/^[-+]?[0-9]+e/;function a(c,d){if(isNaN(c))switch(d){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(d){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(d){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(t.isNegativeZero(c))return"-0.0";let p=c.toString(10);return s.test(p)?p.replace("e",".e"):p}function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||t.isNegativeZero(c))}return lc=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:o,predicate:l,represent:a,defaultStyle:"lowercase"}),lc}function Rf(){return cf||(cf=1,uc=Sf().extend({implicit:[Cf(),kf(),Ef(),Pf()]})),uc}function If(){return lf||(lf=1,pc=Rf()),pc}function Tf(){if(uf)return dc;uf=1;let t=Be(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),n=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function r(s){return s===null?!1:e.exec(s)!==null||n.exec(s)!==null}function i(s){let a=0,l=null,c=e.exec(s);if(c===null&&(c=n.exec(s)),c===null)throw new Error("Date resolve error");let d=+c[1],p=+c[2]-1,f=+c[3];if(!c[4])return new Date(Date.UTC(d,p,f));let m=+c[4],g=+c[5],y=+c[6];if(c[7]){for(a=c[7].slice(0,3);a.length<3;)a+="0";a=+a}if(c[9]){let _=+c[10],R=+(c[11]||0);l=(_*60+R)*6e4,c[9]==="-"&&(l=-l)}let w=new Date(Date.UTC(d,p,f,m,g,y,a));return l&&w.setTime(w.getTime()-l),w}function o(s){return s.toISOString()}return dc=new t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r,construct:i,instanceOf:Date,represent:o}),dc}function Af(){if(pf)return fc;pf=1;let t=Be();function e(n){return n==="<<"||n===null}return fc=new t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),fc}function Of(){if(df)return hc;df=1;let t=Be(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
36
+ \r`;function n(s){if(s===null)return!1;let a=0,l=s.length,c=e;for(let d=0;d<l;d++){let p=c.indexOf(s.charAt(d));if(!(p>64)){if(p<0)return!1;a+=6}}return a%8===0}function r(s){let a=s.replace(/[\r\n=]/g,""),l=a.length,c=e,d=0,p=[];for(let m=0;m<l;m++)m%4===0&&m&&(p.push(d>>16&255),p.push(d>>8&255),p.push(d&255)),d=d<<6|c.indexOf(a.charAt(m));let f=l%4*6;return f===0?(p.push(d>>16&255),p.push(d>>8&255),p.push(d&255)):f===18?(p.push(d>>10&255),p.push(d>>2&255)):f===12&&p.push(d>>4&255),new Uint8Array(p)}function i(s){let a="",l=0,c=s.length,d=e;for(let f=0;f<c;f++)f%3===0&&f&&(a+=d[l>>18&63],a+=d[l>>12&63],a+=d[l>>6&63],a+=d[l&63]),l=(l<<8)+s[f];let p=c%3;return p===0?(a+=d[l>>18&63],a+=d[l>>12&63],a+=d[l>>6&63],a+=d[l&63]):p===2?(a+=d[l>>10&63],a+=d[l>>4&63],a+=d[l<<2&63],a+=d[64]):p===1&&(a+=d[l>>2&63],a+=d[l<<4&63],a+=d[64],a+=d[64]),a}function o(s){return Object.prototype.toString.call(s)==="[object Uint8Array]"}return hc=new t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:n,construct:r,predicate:o,represent:i}),hc}function Nf(){if(ff)return mc;ff=1;let t=Be(),e=Object.prototype.hasOwnProperty,n=Object.prototype.toString;function r(o){if(o===null)return!0;let s=[],a=o;for(let l=0,c=a.length;l<c;l+=1){let d=a[l],p=!1;if(n.call(d)!=="[object Object]")return!1;let f;for(f in d)if(e.call(d,f))if(!p)p=!0;else return!1;if(!p)return!1;if(s.indexOf(f)===-1)s.push(f);else return!1}return!0}function i(o){return o!==null?o:[]}return mc=new t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:r,construct:i}),mc}function Mf(){if(hf)return gc;hf=1;let t=Be(),e=Object.prototype.toString;function n(i){if(i===null)return!0;let o=i,s=new Array(o.length);for(let a=0,l=o.length;a<l;a+=1){let c=o[a];if(e.call(c)!=="[object Object]")return!1;let d=Object.keys(c);if(d.length!==1)return!1;s[a]=[d[0],c[d[0]]]}return!0}function r(i){if(i===null)return[];let o=i,s=new Array(o.length);for(let a=0,l=o.length;a<l;a+=1){let c=o[a],d=Object.keys(c);s[a]=[d[0],c[d[0]]]}return s}return gc=new t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:n,construct:r}),gc}function Vf(){if(mf)return yc;mf=1;let t=Be(),e=Object.prototype.hasOwnProperty;function n(i){if(i===null)return!0;let o=i;for(let s in o)if(e.call(o,s)&&o[s]!==null)return!1;return!0}function r(i){return i!==null?i:{}}return yc=new t("tag:yaml.org,2002:set",{kind:"mapping",resolve:n,construct:r}),yc}function bc(){return gf||(gf=1,wc=If().extend({implicit:[Tf(),Af()],explicit:[Of(),Nf(),Mf(),Vf()]})),wc}function U_(){if(yf)return Eo;yf=1;let t=Zr(),e=ei(),n=W_(),r=bc(),i=Object.prototype.hasOwnProperty,o=1,s=2,a=3,l=4,c=1,d=2,p=3,f=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,m=/[\x85\u2028\u2029]/,g=/[,\[\]{}]/,y=/^(?:!|!!|![0-9A-Za-z-]+!)$/,w=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function _(u){return Object.prototype.toString.call(u)}function R(u){return u===10||u===13}function x(u){return u===9||u===32}function I(u){return u===9||u===32||u===10||u===13}function N(u){return u===44||u===91||u===93||u===123||u===125}function j(u){if(u>=48&&u<=57)return u-48;let v=u|32;return v>=97&&v<=102?v-97+10:-1}function G(u){return u===120?2:u===117?4:u===85?8:0}function ie(u){return u>=48&&u<=57?u-48:-1}function ge(u){switch(u){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
37
+ `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"\x85";case 95:return"\xA0";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function xe(u){return u<=65535?String.fromCharCode(u):String.fromCharCode((u-65536>>10)+55296,(u-65536&1023)+56320)}function Te(u,v,C){v==="__proto__"?Object.defineProperty(u,v,{configurable:!0,enumerable:!0,writable:!0,value:C}):u[v]=C}let $e=new Array(256),Je=new Array(256);for(let u=0;u<256;u++)$e[u]=ge(u)?1:0,Je[u]=ge(u);function de(u,v){this.input=u,this.filename=v.filename||null,this.schema=v.schema||r,this.onWarning=v.onWarning||null,this.legacy=v.legacy||!1,this.json=v.json||!1,this.listener=v.listener||null,this.maxDepth=typeof v.maxDepth=="number"?v.maxDepth:100,this.maxTotalMergeKeys=typeof v.maxTotalMergeKeys=="number"?v.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=u.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function X(u,v){let C={name:u.filename,buffer:u.input.slice(0,-1),position:u.position,line:u.line,column:u.position-u.lineStart};return C.snippet=n(C),new e(v,C)}function D(u,v){throw X(u,v)}function Gn(u,v){u.onWarning&&u.onWarning.call(null,X(u,v))}function Vt(u,v,C){let P=u.anchorMapTransactions;if(P.length!==0){let S=P[P.length-1];i.call(S,v)||(S[v]={existed:i.call(u.anchorMap,v),value:u.anchorMap[v]})}u.anchorMap[v]=C}function wa(u){u.anchorMapTransactions.push(Object.create(null))}function wn(u){let v=u.anchorMapTransactions.pop(),C=u.anchorMapTransactions;if(C.length===0)return;let P=C[C.length-1],S=Object.keys(v);for(let M=0,h=S.length;M<h;M+=1){let b=S[M];i.call(P,b)||(P[b]=v[b])}}function va(u){let v=u.anchorMapTransactions.pop(),C=Object.keys(v);for(let P=C.length-1;P>=0;P-=1){let S=v[C[P]];S.existed?u.anchorMap[C[P]]=S.value:delete u.anchorMap[C[P]]}}function zr(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 Jn(u,v){u.position=v.position,u.line=v.line,u.lineStart=v.lineStart,u.lineIndent=v.lineIndent,u.firstTabInLine=v.firstTabInLine,u.tag=v.tag,u.anchor=v.anchor,u.kind=v.kind,u.result=v.result}let lo={YAML:function(v,C,P){v.version!==null&&D(v,"duplication of %YAML directive"),P.length!==1&&D(v,"YAML directive accepts exactly one argument");let S=/^([0-9]+)\.([0-9]+)$/.exec(P[0]);S===null&&D(v,"ill-formed argument of the YAML directive");let M=parseInt(S[1],10),h=parseInt(S[2],10);M!==1&&D(v,"unacceptable YAML version of the document"),v.version=P[0],v.checkLineBreaks=h<2,h!==1&&h!==2&&Gn(v,"unsupported YAML version of the document")},TAG:function(v,C,P){let S;P.length!==2&&D(v,"TAG directive accepts exactly two arguments");let M=P[0];S=P[1],y.test(M)||D(v,"ill-formed tag handle (first argument) of the TAG directive"),i.call(v.tagMap,M)&&D(v,'there is a previously declared suffix for "'+M+'" tag handle'),w.test(S)||D(v,"ill-formed tag prefix (second argument) of the TAG directive");try{S=decodeURIComponent(S)}catch{D(v,"tag prefix is malformed: "+S)}v.tagMap[M]=S}};function tt(u,v,C,P){if(v<C){let S=u.input.slice(v,C);if(P)for(let M=0,h=S.length;M<h;M+=1){let b=S.charCodeAt(M);b===9||b>=32&&b<=1114111||D(u,"expected valid JSON character")}else f.test(S)&&D(u,"the stream contains non-printable characters");u.result+=S}}function tn(u,v,C,P){t.isObject(C)||D(u,"cannot merge mappings; the provided source object is unacceptable");let S=Object.keys(C);for(let M=0,h=S.length;M<h;M+=1){let b=S[M];u.maxTotalMergeKeys!==-1&&++u.totalMergeKeys>u.maxTotalMergeKeys&&D(u,"merge keys exceeded maxTotalMergeKeys ("+u.maxTotalMergeKeys+")"),i.call(v,b)||(Te(v,b,C[b]),P[b]=!0)}}function Lt(u,v,C,P,S,M,h,b,A){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])&&D(u,"nested arrays are not supported inside keys"),typeof S=="object"&&_(S[k])==="[object Object]"&&(S[k]="[object Object]")}if(typeof S=="object"&&_(S)==="[object Object]"&&(S="[object Object]"),S=String(S),v===null&&(v={}),P==="tag:yaml.org,2002:merge")if(Array.isArray(M))for(let k=0,E=M.length;k<E;k+=1)tn(u,v,M[k],C);else tn(u,v,M,C);else!u.json&&!i.call(C,S)&&i.call(v,S)&&(u.line=h||u.line,u.lineStart=b||u.lineStart,u.position=A||u.position,D(u,"duplicated mapping key")),Te(v,S,M),delete C[S];return v}function Kn(u){let v=u.input.charCodeAt(u.position);v===10?u.position++:v===13?(u.position++,u.input.charCodeAt(u.position)===10&&u.position++):D(u,"a line break is expected"),u.line+=1,u.lineStart=u.position,u.firstTabInLine=-1}function Se(u,v,C){let P=0,S=u.input.charCodeAt(u.position);for(;S!==0;){for(;x(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(R(S))for(Kn(u),S=u.input.charCodeAt(u.position),P++,u.lineIndent=0;S===32;)u.lineIndent++,S=u.input.charCodeAt(++u.position);else break}return C!==-1&&P!==0&&u.lineIndent<C&&Gn(u,"deficient indentation"),P}function Yn(u){let v=u.position,C=u.input.charCodeAt(v);return!!((C===45||C===46)&&C===u.input.charCodeAt(v+1)&&C===u.input.charCodeAt(v+2)&&(v+=3,C=u.input.charCodeAt(v),C===0||I(C)))}function jt(u,v){v===1?u.result+=" ":v>1&&(u.result+=t.repeat(`
38
+ `,v-1))}function uo(u,v,C){let P,S,M,h,b,A,k=u.kind,E=u.result,O=u.input.charCodeAt(u.position);if(I(O)||N(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 T=u.input.charCodeAt(u.position+1);if(I(T)||C&&N(T))return!1}for(u.kind="scalar",u.result="",P=S=u.position,M=!1;O!==0;){if(O===58){let T=u.input.charCodeAt(u.position+1);if(I(T)||C&&N(T))break}else if(O===35){let T=u.input.charCodeAt(u.position-1);if(I(T))break}else{if(u.position===u.lineStart&&Yn(u)||C&&N(O))break;if(R(O))if(h=u.line,b=u.lineStart,A=u.lineIndent,Se(u,!1,-1),u.lineIndent>=v){M=!0,O=u.input.charCodeAt(u.position);continue}else{u.position=S,u.line=h,u.lineStart=b,u.lineIndent=A;break}}M&&(tt(u,P,S,!1),jt(u,u.line-h),P=S=u.position,M=!1),x(O)||(S=u.position+1),O=u.input.charCodeAt(++u.position)}return tt(u,P,S,!1),u.result?!0:(u.kind=k,u.result=E,!1)}function po(u,v){let C,P,S=u.input.charCodeAt(u.position);if(S!==39)return!1;for(u.kind="scalar",u.result="",u.position++,C=P=u.position;(S=u.input.charCodeAt(u.position))!==0;)if(S===39)if(tt(u,C,u.position,!0),S=u.input.charCodeAt(++u.position),S===39)C=u.position,u.position++,P=u.position;else return!0;else R(S)?(tt(u,C,P,!0),jt(u,Se(u,!1,v)),C=P=u.position):u.position===u.lineStart&&Yn(u)?D(u,"unexpected end of the document within a single quoted scalar"):(u.position++,x(S)||(P=u.position));D(u,"unexpected end of the stream within a single quoted scalar")}function Gr(u,v){let C,P,S,M=u.input.charCodeAt(u.position);if(M!==34)return!1;for(u.kind="scalar",u.result="",u.position++,C=P=u.position;(M=u.input.charCodeAt(u.position))!==0;){if(M===34)return tt(u,C,u.position,!0),u.position++,!0;if(M===92){if(tt(u,C,u.position,!0),M=u.input.charCodeAt(++u.position),R(M))Se(u,!1,v);else if(M<256&&$e[M])u.result+=Je[M],u.position++;else if((S=G(M))>0){let h=S,b=0;for(;h>0;h--)M=u.input.charCodeAt(++u.position),(S=j(M))>=0?b=(b<<4)+S:D(u,"expected hexadecimal character");u.result+=xe(b),u.position++}else D(u,"unknown escape sequence");C=P=u.position}else R(M)?(tt(u,C,P,!0),jt(u,Se(u,!1,v)),C=P=u.position):u.position===u.lineStart&&Yn(u)?D(u,"unexpected end of the document within a double quoted scalar"):(u.position++,x(M)||(P=u.position))}D(u,"unexpected end of the stream within a double quoted scalar")}function fo(u,v){let C=!0,P,S,M,h=u.tag,b,A=u.anchor,k,E,O,T,F=Object.create(null),q,z,J,oe=u.input.charCodeAt(u.position);if(oe===91)k=93,T=!1,b=[];else if(oe===123)k=125,T=!0,b={};else return!1;for(u.anchor!==null&&Vt(u,u.anchor,b),oe=u.input.charCodeAt(++u.position);oe!==0;){if(Se(u,!0,v),oe=u.input.charCodeAt(u.position),oe===k)return u.position++,u.tag=h,u.anchor=A,u.kind=T?"mapping":"sequence",u.result=b,!0;if(C?oe===44&&D(u,"expected the node content, but found ','"):D(u,"missed comma between flow collection entries"),z=q=J=null,E=O=!1,oe===63){let ye=u.input.charCodeAt(u.position+1);I(ye)&&(E=O=!0,u.position++,Se(u,!0,v))}P=u.line,S=u.lineStart,M=u.position,qt(u,v,o,!1,!0),z=u.tag,q=u.result,Se(u,!0,v),oe=u.input.charCodeAt(u.position),(O||u.line===P)&&oe===58&&(E=!0,oe=u.input.charCodeAt(++u.position),Se(u,!0,v),qt(u,v,o,!1,!0),J=u.result),T?Lt(u,b,F,z,q,J,P,S,M):E?b.push(Lt(u,null,F,z,q,J,P,S,M)):b.push(q),Se(u,!0,v),oe=u.input.charCodeAt(u.position),oe===44?(C=!0,oe=u.input.charCodeAt(++u.position)):C=!1}D(u,"unexpected end of the stream within a flow collection")}function ho(u,v){let C,P=c,S=!1,M=!1,h=v,b=0,A=!1,k,E=u.input.charCodeAt(u.position);if(E===124)C=!1;else if(E===62)C=!0;else return!1;for(u.kind="scalar",u.result="";E!==0;)if(E=u.input.charCodeAt(++u.position),E===43||E===45)c===P?P=E===43?p:d:D(u,"repeat of a chomping mode identifier");else if((k=ie(E))>=0)k===0?D(u,"bad explicit indentation width of a block scalar; it cannot be less than one"):M?D(u,"repeat of an indentation width identifier"):(h=v+k-1,M=!0);else break;if(x(E)){do E=u.input.charCodeAt(++u.position);while(x(E));if(E===35)do E=u.input.charCodeAt(++u.position);while(!R(E)&&E!==0)}for(;E!==0;){for(Kn(u),u.lineIndent=0,E=u.input.charCodeAt(u.position);(!M||u.lineIndent<h)&&E===32;)u.lineIndent++,E=u.input.charCodeAt(++u.position);if(!M&&u.lineIndent>h&&(h=u.lineIndent),R(E)){b++;continue}if(!M&&h===0&&D(u,"missing indentation for block scalar"),u.lineIndent<h){P===p?u.result+=t.repeat(`
39
+ `,S?1+b:b):P===c&&S&&(u.result+=`
40
+ `);break}C?x(E)?(A=!0,u.result+=t.repeat(`
41
+ `,S?1+b:b)):A?(A=!1,u.result+=t.repeat(`
42
+ `,b+1)):b===0?S&&(u.result+=" "):u.result+=t.repeat(`
43
+ `,b):u.result+=t.repeat(`
44
+ `,S?1+b:b),S=!0,M=!0,b=0;let O=u.position;for(;!R(E)&&E!==0;)E=u.input.charCodeAt(++u.position);tt(u,O,u.position,!1)}return!0}function Dt(u,v){let C=u.tag,P=u.anchor,S=[],M=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&Vt(u,u.anchor,S);let h=u.input.charCodeAt(u.position);for(;h!==0&&(u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,D(u,"tab characters must not be used in indentation")),h===45);){let b=u.input.charCodeAt(u.position+1);if(!I(b))break;if(M=!0,u.position++,Se(u,!0,-1)&&u.lineIndent<=v){S.push(null),h=u.input.charCodeAt(u.position);continue}let A=u.line;if(qt(u,v,a,!1,!0),S.push(u.result),Se(u,!0,-1),h=u.input.charCodeAt(u.position),(u.line===A||u.lineIndent>v)&&h!==0)D(u,"bad indentation of a sequence entry");else if(u.lineIndent<v)break}return M?(u.tag=C,u.anchor=P,u.kind="sequence",u.result=S,!0):!1}function mo(u,v,C){let P,S,M,h,b=u.tag,A=u.anchor,k={},E=Object.create(null),O=null,T=null,F=null,q=!1,z=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&Vt(u,u.anchor,k);let J=u.input.charCodeAt(u.position);for(;J!==0;){!q&&u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,D(u,"tab characters must not be used in indentation"));let oe=u.input.charCodeAt(u.position+1),ye=u.line;if((J===63||J===58)&&I(oe))J===63?(q&&(Lt(u,k,E,O,T,null,S,M,h),O=T=F=null),z=!0,q=!0,P=!0):q?(q=!1,P=!0):D(u,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),u.position+=1,J=oe;else{if(S=u.line,M=u.lineStart,h=u.position,!qt(u,C,s,!1,!0))break;if(u.line===ye){for(J=u.input.charCodeAt(u.position);x(J);)J=u.input.charCodeAt(++u.position);if(J===58)J=u.input.charCodeAt(++u.position),I(J)||D(u,"a whitespace character is expected after the key-value separator within a block mapping"),q&&(Lt(u,k,E,O,T,null,S,M,h),O=T=F=null),z=!0,q=!1,P=!1,O=u.tag,T=u.result;else if(z)D(u,"can not read an implicit mapping pair; a colon is missed");else return u.tag=b,u.anchor=A,!0}else if(z)D(u,"can not read a block mapping entry; a multiline key may not be an implicit key");else return u.tag=b,u.anchor=A,!0}if((u.line===ye||u.lineIndent>v)&&(q&&(S=u.line,M=u.lineStart,h=u.position),qt(u,v,l,!0,P)&&(q?T=u.result:F=u.result),q||(Lt(u,k,E,O,T,F,S,M,h),O=T=F=null),Se(u,!0,-1),J=u.input.charCodeAt(u.position)),(u.line===ye||u.lineIndent>v)&&J!==0)D(u,"bad indentation of a mapping entry");else if(u.lineIndent<v)break}return q&&Lt(u,k,E,O,T,null,S,M,h),z&&(u.tag=b,u.anchor=A,u.kind="mapping",u.result=k),z}function ba(u){let v=!1,C=!1,P,S,M=u.input.charCodeAt(u.position);if(M!==33)return!1;u.tag!==null&&D(u,"duplication of a tag property"),M=u.input.charCodeAt(++u.position),M===60?(v=!0,M=u.input.charCodeAt(++u.position)):M===33?(C=!0,P="!!",M=u.input.charCodeAt(++u.position)):P="!";let h=u.position;if(v){do M=u.input.charCodeAt(++u.position);while(M!==0&&M!==62);u.position<u.length?(S=u.input.slice(h,u.position),M=u.input.charCodeAt(++u.position)):D(u,"unexpected end of the stream within a verbatim tag")}else{for(;M!==0&&!I(M);)M===33&&(C?D(u,"tag suffix cannot contain exclamation marks"):(P=u.input.slice(h-1,u.position+1),y.test(P)||D(u,"named tag handle cannot contain such characters"),C=!0,h=u.position+1)),M=u.input.charCodeAt(++u.position);S=u.input.slice(h,u.position),g.test(S)&&D(u,"tag suffix cannot contain flow indicator characters")}S&&!w.test(S)&&D(u,"tag name cannot contain such characters: "+S);try{S=decodeURIComponent(S)}catch{D(u,"tag name is malformed: "+S)}return v?u.tag=S:i.call(u.tagMap,P)?u.tag=u.tagMap[P]+S:P==="!"?u.tag="!"+S:P==="!!"?u.tag="tag:yaml.org,2002:"+S:D(u,'undeclared tag handle "'+P+'"'),!0}function go(u){let v=u.input.charCodeAt(u.position);if(v!==38)return!1;u.anchor!==null&&D(u,"duplication of an anchor property"),v=u.input.charCodeAt(++u.position);let C=u.position;for(;v!==0&&!I(v)&&!N(v);)v=u.input.charCodeAt(++u.position);return u.position===C&&D(u,"name of an anchor node must contain at least one character"),u.anchor=u.input.slice(C,u.position),!0}function yo(u){let v=u.input.charCodeAt(u.position);if(v!==42)return!1;v=u.input.charCodeAt(++u.position);let C=u.position;for(;v!==0&&!I(v)&&!N(v);)v=u.input.charCodeAt(++u.position);u.position===C&&D(u,"name of an alias node must contain at least one character");let P=u.input.slice(C,u.position);return i.call(u.anchorMap,P)||D(u,'unidentified alias "'+P+'"'),u.result=u.anchorMap[P],Se(u,!0,-1),!0}function _a(u,v,C,P){let S=zr(u);return wa(u),Jn(u,v),u.tag=null,u.anchor=null,u.kind=null,u.result=null,mo(u,C,P)&&u.kind==="mapping"?(wn(u),!0):(va(u),Jn(u,S),!1)}function qt(u,v,C,P,S){let M,h,b=1,A=!1,k=!1,E=null,O,T,F;u.depth>=u.maxDepth&&D(u,"nesting exceeded maxDepth ("+u.maxDepth+")"),u.depth+=1,u.listener!==null&&u.listener("open",u),u.tag=null,u.anchor=null,u.kind=null,u.result=null;let q=M=h=l===C||a===C;if(P&&Se(u,!0,-1)&&(A=!0,u.lineIndent>v?b=1:u.lineIndent===v?b=0:u.lineIndent<v&&(b=-1)),b===1)for(;;){let z=u.input.charCodeAt(u.position),J=zr(u);if(A&&(z===33&&u.tag!==null||z===38&&u.anchor!==null)||!ba(u)&&!go(u))break;E===null&&(E=J),Se(u,!0,-1)?(A=!0,h=q,u.lineIndent>v?b=1:u.lineIndent===v?b=0:u.lineIndent<v&&(b=-1)):h=!1}if(h&&(h=A||S),b===1||l===C)if(o===C||s===C?T=v:T=v+1,F=u.position-u.lineStart,b===1)if(h&&(Dt(u,F)||mo(u,F,T))||fo(u,T))k=!0;else{let z=u.input.charCodeAt(u.position);E!==null&&q&&!h&&z!==124&&z!==62&&_a(u,E,E.position-E.lineStart,T)||M&&ho(u,T)||po(u,T)||Gr(u,T)?k=!0:yo(u)?(k=!0,(u.tag!==null||u.anchor!==null)&&D(u,"alias node should not have any properties")):uo(u,T,o===C)&&(k=!0,u.tag===null&&(u.tag="?")),u.anchor!==null&&Vt(u,u.anchor,u.result)}else b===0&&(k=h&&Dt(u,F));if(u.tag===null)u.anchor!==null&&Vt(u,u.anchor,u.result);else if(u.tag==="?"){u.result!==null&&u.kind!=="scalar"&&D(u,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+u.kind+'"');for(let z=0,J=u.implicitTypes.length;z<J;z+=1)if(O=u.implicitTypes[z],O.resolve(u.result)){u.result=O.construct(u.result),u.tag=O.tag,u.anchor!==null&&Vt(u,u.anchor,u.result);break}}else if(u.tag!=="!"){if(i.call(u.typeMap[u.kind||"fallback"],u.tag))O=u.typeMap[u.kind||"fallback"][u.tag];else{O=null;let z=u.typeMap.multi[u.kind||"fallback"];for(let J=0,oe=z.length;J<oe;J+=1)if(u.tag.slice(0,z[J].tag.length)===z[J].tag){O=z[J];break}}O||D(u,"unknown tag !<"+u.tag+">"),u.result!==null&&O.kind!==u.kind&&D(u,"unacceptable node kind for !<"+u.tag+'> tag; it should be "'+O.kind+'", not "'+u.kind+'"'),O.resolve(u.result,u.tag)?(u.result=O.construct(u.result,u.tag),u.anchor!==null&&Vt(u,u.anchor,u.result)):D(u,"cannot resolve a node with !<"+u.tag+"> explicit tag")}return u.listener!==null&&u.listener("close",u),u.depth-=1,u.tag!==null||u.anchor!==null||k}function $a(u){let v=u.position,C=!1,P;for(u.version=null,u.checkLineBreaks=u.legacy,u.tagMap=Object.create(null),u.anchorMap=Object.create(null);(P=u.input.charCodeAt(u.position))!==0&&(Se(u,!0,-1),P=u.input.charCodeAt(u.position),!(u.lineIndent>0||P!==37));){C=!0,P=u.input.charCodeAt(++u.position);let S=u.position;for(;P!==0&&!I(P);)P=u.input.charCodeAt(++u.position);let M=u.input.slice(S,u.position),h=[];for(M.length<1&&D(u,"directive name must not be less than one character in length");P!==0;){for(;x(P);)P=u.input.charCodeAt(++u.position);if(P===35){do P=u.input.charCodeAt(++u.position);while(P!==0&&!R(P));break}if(R(P))break;for(S=u.position;P!==0&&!I(P);)P=u.input.charCodeAt(++u.position);h.push(u.input.slice(S,u.position))}P!==0&&Kn(u),i.call(lo,M)?lo[M](u,M,h):Gn(u,'unknown document directive "'+M+'"')}if(Se(u,!0,-1),u.lineIndent===0&&u.input.charCodeAt(u.position)===45&&u.input.charCodeAt(u.position+1)===45&&u.input.charCodeAt(u.position+2)===45?(u.position+=3,Se(u,!0,-1)):C&&D(u,"directives end mark is expected"),qt(u,u.lineIndent-1,l,!1,!0),Se(u,!0,-1),u.checkLineBreaks&&m.test(u.input.slice(v,u.position))&&Gn(u,"non-ASCII line breaks are interpreted as content"),u.documents.push(u.result),u.position===u.lineStart&&Yn(u)){u.input.charCodeAt(u.position)===46&&(u.position+=3,Se(u,!0,-1));return}u.position<u.length-1&&D(u,"end of the stream or a document separator is expected")}function wo(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 C=new de(u,v),P=u.indexOf("\0");for(P!==-1&&(C.position=P,D(C,"null byte is not allowed in input")),C.input+="\0";C.input.charCodeAt(C.position)===32;)C.lineIndent+=1,C.position+=1;for(;C.position<C.length-1;)$a(C);return C.documents}function vo(u,v,C){v!==null&&typeof v=="object"&&typeof C>"u"&&(C=v,v=null);let P=wo(u,C);if(typeof v!="function")return P;for(let S=0,M=P.length;S<M;S+=1)v(P[S])}function xa(u,v){let C=wo(u,v);if(C.length!==0){if(C.length===1)return C[0];throw new e("expected a single document in the stream, but found more")}}return Eo.loadAll=vo,Eo.load=xa,Eo}function z_(){if(wf)return vc;wf=1;let t=Zr(),e=ei(),n=bc(),r=Object.prototype.toString,i=Object.prototype.hasOwnProperty,o=65279,s=9,a=10,l=13,c=32,d=33,p=34,f=35,m=37,g=38,y=39,w=42,_=44,R=45,x=58,I=61,N=62,j=63,G=64,ie=91,ge=93,xe=96,Te=123,$e=124,Je=125,de={};de[0]="\\0",de[7]="\\a",de[8]="\\b",de[9]="\\t",de[10]="\\n",de[11]="\\v",de[12]="\\f",de[13]="\\r",de[27]="\\e",de[34]='\\"',de[92]="\\\\",de[133]="\\N",de[160]="\\_",de[8232]="\\L",de[8233]="\\P";let X=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],D=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Gn(h,b){if(b===null)return{};let A={},k=Object.keys(b);for(let E=0,O=k.length;E<O;E+=1){let T=k[E],F=String(b[T]);T.slice(0,2)==="!!"&&(T="tag:yaml.org,2002:"+T.slice(2));let q=h.compiledTypeMap.fallback[T];q&&i.call(q.styleAliases,F)&&(F=q.styleAliases[F]),A[T]=F}return A}function Vt(h){let b,A,k=h.toString(16).toUpperCase();if(h<=255)b="x",A=2;else if(h<=65535)b="u",A=4;else if(h<=4294967295)b="U",A=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+b+t.repeat("0",A-k.length)+k}let wa=1,wn=2;function va(h){this.schema=h.schema||n,this.indent=Math.max(1,h.indent||2),this.noArrayIndent=h.noArrayIndent||!1,this.skipInvalid=h.skipInvalid||!1,this.flowLevel=t.isNothing(h.flowLevel)?-1:h.flowLevel,this.styleMap=Gn(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==='"'?wn:wa,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 zr(h,b){let A=t.repeat(" ",b),k=0,E="",O=h.length;for(;k<O;){let T,F=h.indexOf(`
46
46
  `,k);F===-1?(T=h.slice(k),k=O):(T=h.slice(k,F+1),k=F+1),T.length&&T!==`
47
- `&&(E+=A),E+=T}return E}function Jn(h,_){return`
48
- `+t.repeat(" ",h.indent*_)}function lo(h,_){for(let A=0,k=h.implicitTypes.length;A<k;A+=1)if(h.implicitTypes[A].resolve(_))return!0;return!1}function tt(h){return h===c||h===s}function tn(h){return h>=32&&h<=126||h>=161&&h<=55295&&h!==8232&&h!==8233||h>=57344&&h<=65533&&h!==o||h>=65536&&h<=1114111}function Lt(h){return tn(h)&&h!==o&&h!==l&&h!==a}function Kn(h,_,A){let k=Lt(h),E=k&&!tt(h);return(A?k:k&&h!==b&&h!==ie&&h!==ge&&h!==Te&&h!==Je)&&h!==f&&!(_===S&&!E)||Lt(_)&&!tt(_)&&h===f||_===S&&E}function Se(h){return tn(h)&&h!==o&&!tt(h)&&h!==I&&h!==j&&h!==S&&h!==b&&h!==ie&&h!==ge&&h!==Te&&h!==Je&&h!==f&&h!==g&&h!==w&&h!==d&&h!==$e&&h!==R&&h!==N&&h!==y&&h!==p&&h!==m&&h!==G&&h!==xe}function Yn(h){return!tt(h)&&h!==S}function jt(h,_){let A=h.charCodeAt(_),k;return A>=55296&&A<=56319&&_+1<h.length&&(k=h.charCodeAt(_+1),k>=56320&&k<=57343)?(A-55296)*1024+k-56320+65536:A}function uo(h){return/^\n* /.test(h)}let po=1,Gr=2,fo=3,ho=4,Dt=5;function mo(h,_,A,k,E,O,T,F){let q,z=0,J=null,oe=!1,ye=!1,fd=k!==-1,Jr=-1,Kr=Se(jt(h,0))&&Yn(jt(h,h.length-1));if(_||T)for(q=0;q<h.length;z>=65536?q+=2:q++){if(z=jt(h,q),!tn(z))return Dt;Kr=Kr&&Kn(z,J,F),J=z}else{for(q=0;q<h.length;z>=65536?q+=2:q++){if(z=jt(h,q),z===a)oe=!0,fd&&(ye=ye||q-Jr-1>k&&h[Jr+1]!==" ",Jr=q);else if(!tn(z))return Dt;Kr=Kr&&Kn(z,J,F),J=z}ye=ye||fd&&q-Jr-1>k&&h[Jr+1]!==" "}return!oe&&!ye?Kr&&!T&&!E(h)?po:O===wn?Dt:Gr:A>9&&uo(h)?Dt:T?O===wn?Dt:Gr:ye?ho:fo}function ba(h,_,A,k,E){h.dump=(function(){if(_.length===0)return h.quotingType===wn?'""':"''";if(!h.noCompatMode&&(X.indexOf(_)!==-1||D.test(_)))return h.quotingType===wn?'"'+_+'"':"'"+_+"'";let O=h.indent*Math.max(1,A),T=h.lineWidth===-1?-1:Math.max(Math.min(h.lineWidth,40),h.lineWidth-O),F=k||h.flowLevel>-1&&A>=h.flowLevel;function q(z){return lo(h,z)}switch(mo(_,F,h.indent,T,q,h.quotingType,h.forceQuotes&&!k,E)){case po:return _;case Gr:return"'"+_.replace(/'/g,"''")+"'";case fo:return"|"+go(_,h.indent)+yo(zr(_,O));case ho:return">"+go(_,h.indent)+yo(zr(_a(_,T),O));case Dt:return'"'+$a(_)+'"';default:throw new e("impossible error: invalid scalar style")}})()}function go(h,_){let A=uo(h)?String(_):"",k=h[h.length-1]===`
47
+ `&&(E+=A),E+=T}return E}function Jn(h,b){return`
48
+ `+t.repeat(" ",h.indent*b)}function lo(h,b){for(let A=0,k=h.implicitTypes.length;A<k;A+=1)if(h.implicitTypes[A].resolve(b))return!0;return!1}function tt(h){return h===c||h===s}function tn(h){return h>=32&&h<=126||h>=161&&h<=55295&&h!==8232&&h!==8233||h>=57344&&h<=65533&&h!==o||h>=65536&&h<=1114111}function Lt(h){return tn(h)&&h!==o&&h!==l&&h!==a}function Kn(h,b,A){let k=Lt(h),E=k&&!tt(h);return(A?k:k&&h!==_&&h!==ie&&h!==ge&&h!==Te&&h!==Je)&&h!==f&&!(b===x&&!E)||Lt(b)&&!tt(b)&&h===f||b===x&&E}function Se(h){return tn(h)&&h!==o&&!tt(h)&&h!==R&&h!==j&&h!==x&&h!==_&&h!==ie&&h!==ge&&h!==Te&&h!==Je&&h!==f&&h!==g&&h!==w&&h!==d&&h!==$e&&h!==I&&h!==N&&h!==y&&h!==p&&h!==m&&h!==G&&h!==xe}function Yn(h){return!tt(h)&&h!==x}function jt(h,b){let A=h.charCodeAt(b),k;return A>=55296&&A<=56319&&b+1<h.length&&(k=h.charCodeAt(b+1),k>=56320&&k<=57343)?(A-55296)*1024+k-56320+65536:A}function uo(h){return/^\n* /.test(h)}let po=1,Gr=2,fo=3,ho=4,Dt=5;function mo(h,b,A,k,E,O,T,F){let q,z=0,J=null,oe=!1,ye=!1,fd=k!==-1,Jr=-1,Kr=Se(jt(h,0))&&Yn(jt(h,h.length-1));if(b||T)for(q=0;q<h.length;z>=65536?q+=2:q++){if(z=jt(h,q),!tn(z))return Dt;Kr=Kr&&Kn(z,J,F),J=z}else{for(q=0;q<h.length;z>=65536?q+=2:q++){if(z=jt(h,q),z===a)oe=!0,fd&&(ye=ye||q-Jr-1>k&&h[Jr+1]!==" ",Jr=q);else if(!tn(z))return Dt;Kr=Kr&&Kn(z,J,F),J=z}ye=ye||fd&&q-Jr-1>k&&h[Jr+1]!==" "}return!oe&&!ye?Kr&&!T&&!E(h)?po:O===wn?Dt:Gr:A>9&&uo(h)?Dt:T?O===wn?Dt:Gr:ye?ho:fo}function ba(h,b,A,k,E){h.dump=(function(){if(b.length===0)return h.quotingType===wn?'""':"''";if(!h.noCompatMode&&(X.indexOf(b)!==-1||D.test(b)))return h.quotingType===wn?'"'+b+'"':"'"+b+"'";let O=h.indent*Math.max(1,A),T=h.lineWidth===-1?-1:Math.max(Math.min(h.lineWidth,40),h.lineWidth-O),F=k||h.flowLevel>-1&&A>=h.flowLevel;function q(z){return lo(h,z)}switch(mo(b,F,h.indent,T,q,h.quotingType,h.forceQuotes&&!k,E)){case po:return b;case Gr:return"'"+b.replace(/'/g,"''")+"'";case fo:return"|"+go(b,h.indent)+yo(zr(b,O));case ho:return">"+go(b,h.indent)+yo(zr(_a(b,T),O));case Dt:return'"'+$a(b)+'"';default:throw new e("impossible error: invalid scalar style")}})()}function go(h,b){let A=uo(h)?String(b):"",k=h[h.length-1]===`
49
49
  `,O=k&&(h[h.length-2]===`
50
50
  `||h===`
51
51
  `)?"+":k?"":"-";return A+O+`
52
52
  `}function yo(h){return h[h.length-1]===`
53
- `?h.slice(0,-1):h}function _a(h,_){let A=/(\n+)([^\n]*)/g,k=(function(){let F=h.indexOf(`
54
- `);return F=F!==-1?F:h.length,A.lastIndex=F,qt(h.slice(0,F),_)})(),E=h[0]===`
53
+ `?h.slice(0,-1):h}function _a(h,b){let A=/(\n+)([^\n]*)/g,k=(function(){let F=h.indexOf(`
54
+ `);return F=F!==-1?F:h.length,A.lastIndex=F,qt(h.slice(0,F),b)})(),E=h[0]===`
55
55
  `||h[0]===" ",O,T;for(;T=A.exec(h);){let F=T[1],q=T[2];O=q[0]===" ",k+=F+(!E&&!O&&q!==""?`
56
- `:"")+qt(q,_),E=O}return k}function qt(h,_){if(h===""||h[0]===" ")return h;let A=/ [^ ]/g,k,E=0,O,T=0,F=0,q="";for(;k=A.exec(h);)F=k.index,F-E>_&&(O=T>E?T:F,q+=`
56
+ `:"")+qt(q,b),E=O}return k}function qt(h,b){if(h===""||h[0]===" ")return h;let A=/ [^ ]/g,k,E=0,O,T=0,F=0,q="";for(;k=A.exec(h);)F=k.index,F-E>b&&(O=T>E?T:F,q+=`
57
57
  `+h.slice(E,O),E=O+1),T=F;return q+=`
58
- `,h.length-E>_&&T>E?q+=h.slice(E,T)+`
59
- `+h.slice(T+1):q+=h.slice(E),q.slice(1)}function $a(h){let _="",A=0;for(let k=0;k<h.length;A>=65536?k+=2:k++){A=jt(h,k);let E=de[A];!E&&tn(A)?(_+=h[k],A>=65536&&(_+=h[k+1])):_+=E||Vt(A)}return _}function wo(h,_,A){let k="",E=h.tag;for(let O=0,T=A.length;O<T;O+=1){let F=A[O];h.replacer&&(F=h.replacer.call(A,String(O),F)),(C(h,_,F,!1,!1)||typeof F>"u"&&C(h,_,null,!1,!1))&&(k!==""&&(k+=","+(h.condenseFlow?"":" ")),k+=h.dump)}h.tag=E,h.dump="["+k+"]"}function vo(h,_,A,k){let E="",O=h.tag;for(let T=0,F=A.length;T<F;T+=1){let q=A[T];h.replacer&&(q=h.replacer.call(A,String(T),q)),(C(h,_+1,q,!0,!0,!1,!0)||typeof q>"u"&&C(h,_+1,null,!0,!0,!1,!0))&&((!k||E!=="")&&(E+=Jn(h,_)),h.dump&&a===h.dump.charCodeAt(0)?E+="-":E+="- ",E+=h.dump)}h.tag=O,h.dump=E||"[]"}function xa(h,_,A){let k="",E=h.tag,O=Object.keys(A);for(let T=0,F=O.length;T<F;T+=1){let q="";k!==""&&(q+=", "),h.condenseFlow&&(q+='"');let z=O[T],J=A[z];h.replacer&&(J=h.replacer.call(A,z,J)),C(h,_,z,!1,!1)&&(h.dump.length>1024&&(q+="? "),q+=h.dump+(h.condenseFlow?'"':"")+":"+(h.condenseFlow?"":" "),C(h,_,J,!1,!1)&&(q+=h.dump,k+=q))}h.tag=E,h.dump="{"+k+"}"}function u(h,_,A,k){let E="",O=h.tag,T=Object.keys(A);if(h.sortKeys===!0)T.sort();else if(typeof h.sortKeys=="function")T.sort(h.sortKeys);else if(h.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let F=0,q=T.length;F<q;F+=1){let z="";(!k||E!=="")&&(z+=Jn(h,_));let J=T[F],oe=A[J];if(h.replacer&&(oe=h.replacer.call(A,J,oe)),!C(h,_+1,J,!0,!0,!0))continue;let ye=h.tag!==null&&h.tag!=="?"||h.dump&&h.dump.length>1024;ye&&(h.dump&&a===h.dump.charCodeAt(0)?z+="?":z+="? "),z+=h.dump,ye&&(z+=Jn(h,_)),C(h,_+1,oe,!0,ye)&&(h.dump&&a===h.dump.charCodeAt(0)?z+=":":z+=": ",z+=h.dump,E+=z)}h.tag=O,h.dump=E||"{}"}function v(h,_,A){let k=A?h.explicitTypes:h.implicitTypes;for(let E=0,O=k.length;E<O;E+=1){let T=k[E];if((T.instanceOf||T.predicate)&&(!T.instanceOf||typeof _=="object"&&_ instanceof T.instanceOf)&&(!T.predicate||T.predicate(_))){if(A?T.multi&&T.representName?h.tag=T.representName(_):h.tag=T.tag:h.tag="?",T.represent){let F=h.styleMap[T.tag]||T.defaultStyle,q;if(r.call(T.represent)==="[object Function]")q=T.represent(_,F);else if(i.call(T.represent,F))q=T.represent[F](_,F);else throw new e("!<"+T.tag+'> tag resolver accepts not "'+F+'" style');h.dump=q}return!0}}return!1}function C(h,_,A,k,E,O,T){h.tag=null,h.dump=A,v(h,A,!1)||v(h,A,!0);let F=r.call(h.dump),q=k;k&&(k=h.flowLevel<0||h.flowLevel>_);let z=F==="[object Object]"||F==="[object Array]",J,oe;if(z&&(J=h.duplicates.indexOf(A),oe=J!==-1),(h.tag!==null&&h.tag!=="?"||oe||h.indent!==2&&_>0)&&(E=!1),oe&&h.usedDuplicates[J])h.dump="*ref_"+J;else{if(z&&oe&&!h.usedDuplicates[J]&&(h.usedDuplicates[J]=!0),F==="[object Object]")k&&Object.keys(h.dump).length!==0?(u(h,_,h.dump,E),oe&&(h.dump="&ref_"+J+h.dump)):(xa(h,_,h.dump),oe&&(h.dump="&ref_"+J+" "+h.dump));else if(F==="[object Array]")k&&h.dump.length!==0?(h.noArrayIndent&&!T&&_>0?vo(h,_-1,h.dump,E):vo(h,_,h.dump,E),oe&&(h.dump="&ref_"+J+h.dump)):(wo(h,_,h.dump),oe&&(h.dump="&ref_"+J+" "+h.dump));else if(F==="[object String]")h.tag!=="?"&&ba(h,h.dump,_,O,q);else{if(F==="[object Undefined]")return!1;if(h.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+F)}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 P(h,_){let A=[],k=[];x(h,A,k);let E=k.length;for(let O=0;O<E;O+=1)_.duplicates.push(A[k[O]]);_.usedDuplicates=new Array(E)}function x(h,_,A){if(h!==null&&typeof h=="object"){let k=_.indexOf(h);if(k!==-1)A.indexOf(k)===-1&&A.push(k);else if(_.push(h),Array.isArray(h))for(let E=0,O=h.length;E<O;E+=1)x(h[E],_,A);else{let E=Object.keys(h);for(let O=0,T=E.length;O<T;O+=1)x(h[E[O]],_,A)}}}function M(h,_){_=_||{};let A=new va(_);A.noRefs||P(h,A);let k=h;return A.replacer&&(k=A.replacer.call({"":k},"",k)),C(A,0,k,!0,!0)?A.dump+`
58
+ `,h.length-E>b&&T>E?q+=h.slice(E,T)+`
59
+ `+h.slice(T+1):q+=h.slice(E),q.slice(1)}function $a(h){let b="",A=0;for(let k=0;k<h.length;A>=65536?k+=2:k++){A=jt(h,k);let E=de[A];!E&&tn(A)?(b+=h[k],A>=65536&&(b+=h[k+1])):b+=E||Vt(A)}return b}function wo(h,b,A){let k="",E=h.tag;for(let O=0,T=A.length;O<T;O+=1){let F=A[O];h.replacer&&(F=h.replacer.call(A,String(O),F)),(C(h,b,F,!1,!1)||typeof F>"u"&&C(h,b,null,!1,!1))&&(k!==""&&(k+=","+(h.condenseFlow?"":" ")),k+=h.dump)}h.tag=E,h.dump="["+k+"]"}function vo(h,b,A,k){let E="",O=h.tag;for(let T=0,F=A.length;T<F;T+=1){let q=A[T];h.replacer&&(q=h.replacer.call(A,String(T),q)),(C(h,b+1,q,!0,!0,!1,!0)||typeof q>"u"&&C(h,b+1,null,!0,!0,!1,!0))&&((!k||E!=="")&&(E+=Jn(h,b)),h.dump&&a===h.dump.charCodeAt(0)?E+="-":E+="- ",E+=h.dump)}h.tag=O,h.dump=E||"[]"}function xa(h,b,A){let k="",E=h.tag,O=Object.keys(A);for(let T=0,F=O.length;T<F;T+=1){let q="";k!==""&&(q+=", "),h.condenseFlow&&(q+='"');let z=O[T],J=A[z];h.replacer&&(J=h.replacer.call(A,z,J)),C(h,b,z,!1,!1)&&(h.dump.length>1024&&(q+="? "),q+=h.dump+(h.condenseFlow?'"':"")+":"+(h.condenseFlow?"":" "),C(h,b,J,!1,!1)&&(q+=h.dump,k+=q))}h.tag=E,h.dump="{"+k+"}"}function u(h,b,A,k){let E="",O=h.tag,T=Object.keys(A);if(h.sortKeys===!0)T.sort();else if(typeof h.sortKeys=="function")T.sort(h.sortKeys);else if(h.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let F=0,q=T.length;F<q;F+=1){let z="";(!k||E!=="")&&(z+=Jn(h,b));let J=T[F],oe=A[J];if(h.replacer&&(oe=h.replacer.call(A,J,oe)),!C(h,b+1,J,!0,!0,!0))continue;let ye=h.tag!==null&&h.tag!=="?"||h.dump&&h.dump.length>1024;ye&&(h.dump&&a===h.dump.charCodeAt(0)?z+="?":z+="? "),z+=h.dump,ye&&(z+=Jn(h,b)),C(h,b+1,oe,!0,ye)&&(h.dump&&a===h.dump.charCodeAt(0)?z+=":":z+=": ",z+=h.dump,E+=z)}h.tag=O,h.dump=E||"{}"}function v(h,b,A){let k=A?h.explicitTypes:h.implicitTypes;for(let E=0,O=k.length;E<O;E+=1){let T=k[E];if((T.instanceOf||T.predicate)&&(!T.instanceOf||typeof b=="object"&&b instanceof T.instanceOf)&&(!T.predicate||T.predicate(b))){if(A?T.multi&&T.representName?h.tag=T.representName(b):h.tag=T.tag:h.tag="?",T.represent){let F=h.styleMap[T.tag]||T.defaultStyle,q;if(r.call(T.represent)==="[object Function]")q=T.represent(b,F);else if(i.call(T.represent,F))q=T.represent[F](b,F);else throw new e("!<"+T.tag+'> tag resolver accepts not "'+F+'" style');h.dump=q}return!0}}return!1}function C(h,b,A,k,E,O,T){h.tag=null,h.dump=A,v(h,A,!1)||v(h,A,!0);let F=r.call(h.dump),q=k;k&&(k=h.flowLevel<0||h.flowLevel>b);let z=F==="[object Object]"||F==="[object Array]",J,oe;if(z&&(J=h.duplicates.indexOf(A),oe=J!==-1),(h.tag!==null&&h.tag!=="?"||oe||h.indent!==2&&b>0)&&(E=!1),oe&&h.usedDuplicates[J])h.dump="*ref_"+J;else{if(z&&oe&&!h.usedDuplicates[J]&&(h.usedDuplicates[J]=!0),F==="[object Object]")k&&Object.keys(h.dump).length!==0?(u(h,b,h.dump,E),oe&&(h.dump="&ref_"+J+h.dump)):(xa(h,b,h.dump),oe&&(h.dump="&ref_"+J+" "+h.dump));else if(F==="[object Array]")k&&h.dump.length!==0?(h.noArrayIndent&&!T&&b>0?vo(h,b-1,h.dump,E):vo(h,b,h.dump,E),oe&&(h.dump="&ref_"+J+h.dump)):(wo(h,b,h.dump),oe&&(h.dump="&ref_"+J+" "+h.dump));else if(F==="[object String]")h.tag!=="?"&&ba(h,h.dump,b,O,q);else{if(F==="[object Undefined]")return!1;if(h.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+F)}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 P(h,b){let A=[],k=[];S(h,A,k);let E=k.length;for(let O=0;O<E;O+=1)b.duplicates.push(A[k[O]]);b.usedDuplicates=new Array(E)}function S(h,b,A){if(h!==null&&typeof h=="object"){let k=b.indexOf(h);if(k!==-1)A.indexOf(k)===-1&&A.push(k);else if(b.push(h),Array.isArray(h))for(let E=0,O=h.length;E<O;E+=1)S(h[E],b,A);else{let E=Object.keys(h);for(let O=0,T=E.length;O<T;O+=1)S(h[E[O]],b,A)}}}function M(h,b){b=b||{};let A=new va(b);A.noRefs||P(h,A);let k=h;return A.replacer&&(k=A.replacer.call({"":k},"",k)),C(A,0,k,!0,!0)?A.dump+`
60
60
  `:""}return vc.dump=M,vc}function G_(){if(vf)return Ve;vf=1;let t=U_(),e=z_();function n(r,i){return function(){throw new Error("Function yaml."+r+" is removed in js-yaml 4. Use yaml."+i+" instead, which is now safe by default.")}}return Ve.Type=Be(),Ve.Schema=bf(),Ve.FAILSAFE_SCHEMA=Sf(),Ve.JSON_SCHEMA=Rf(),Ve.CORE_SCHEMA=If(),Ve.DEFAULT_SCHEMA=bc(),Ve.load=t.load,Ve.loadAll=t.loadAll,Ve.dump=e.dump,Ve.YAMLException=ei(),Ve.types={binary:Of(),float:Pf(),map:xf(),null:Cf(),pairs:Mf(),set:Vf(),timestamp:Tf(),bool:kf(),int:Ef(),merge:Af(),omap:Nf(),seq:$f(),str:_f()},Ve.safeLoad=n("safeLoad","load"),Ve.safeLoadAll=n("safeLoadAll","loadAll"),Ve.safeDump=n("safeDump","dump"),Ve}var Ve,Eo,nn,Jd,Qa,Kd,Za,Yd,ec,Xd,tc,Qd,nc,Zd,rc,ef,ic,tf,oc,nf,sc,rf,ac,of,cc,sf,lc,af,uc,cf,pc,lf,dc,uf,fc,pf,hc,df,mc,ff,gc,hf,yc,mf,wc,gf,yf,vc,wf,vf,J_,lt,qA,FA,BA,HA,WA,UA,zA,GA,JA,KA,YA,XA,QA,ZA,Zn=Y(()=>{Ve={},Eo={},nn={};vc={};J_=G_(),lt=H_(J_),{Type:qA,Schema:FA,FAILSAFE_SCHEMA:BA,JSON_SCHEMA:HA,CORE_SCHEMA:WA,DEFAULT_SCHEMA:UA,load:zA,loadAll:GA,dump:JA,YAMLException:KA,types:YA,safeLoad:XA,safeLoadAll:QA,safeDump:ZA}=lt});import{access as K_,readFile as Lf}from"node:fs/promises";import{dirname as jf,relative as rO,resolve as Ce}from"node:path";async function Y_(t=process.cwd()){let e=Ce(t);for(;;){let n=Ce(e,"view-contracts.config.yaml");try{return await K_(n),n}catch{let r=jf(e);if(r===e)return null;e=r}}}async function rn(t){if(t)return Ce(t);let e=await Y_();if(!e)throw new Error("view-contracts.config.yaml not found. Pass -c <path> or run from a project directory.");return e}async function Ke(t){let e=Ce(t),n=await Lf(e,"utf-8"),r=lt.load(n);return X_(e,r)}function X_(t,e){let n=we(t);return{...e,openapi:Ce(n,e.openapi),bindings:Ce(n,e.bindings),microContractsConfig:Ce(n,e.microContractsConfig),viewsDir:Ce(n,e.viewsDir),generated:{contractDir:Ce(n,e.generated.contractDir),actions:Ce(n,e.generated.actions),bridge:Ce(n,e.generated.bridge),reactDir:Ce(n,e.generated.reactDir)},runtimeModule:e.runtimeModule?Ce(n,e.runtimeModule):e.componentsModule?Ce(n,e.componentsModule):void 0,themeModule:e.themeModule?Ce(n,e.themeModule):void 0,design:e.design?{tokens:e.design.tokens?Ce(n,e.design.tokens):void 0,theme:e.design.theme?Ce(n,e.design.theme):void 0,extensionsCss:e.design.extensionsCss?Ce(n,e.design.extensionsCss):void 0}:void 0,extensions:e.extensions?Ce(n,e.extensions):void 0}}async function Et(t){let e=await Lf(Ce(t),"utf-8");return lt.load(e)}function Df(t,e){return Ce(t.generated.reactDir,"components",`${e.screenName}.generated.tsx`)}function we(t){return jf(Ce(t))}function on(t){let e=t.design?.tokens,n=t.design?.theme;if(!e)throw new Error("view-contracts.config.yaml must define design.tokens (project tokens file path).");if(!n)throw new Error("view-contracts.config.yaml must define design.theme (project theme file path).");return{tokensPath:e,themePath:n}}var vt=Y(()=>{"use strict";Zn()});var ri=$(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.regexpCode=ce.getEsmExportName=ce.getProperty=ce.safeStringify=ce.stringify=ce.strConcat=ce.addCodeArg=ce.str=ce._=ce.nil=ce._Code=ce.Name=ce.IDENTIFIER=ce._CodeOrName=void 0;var ti=class{};ce._CodeOrName=ti;ce.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var bn=class extends ti{constructor(e){if(super(),!ce.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ce.Name=bn;var ut=class extends ti{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((n,r)=>`${n}${r}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((n,r)=>(r instanceof bn&&(n[r.str]=(n[r.str]||0)+1),n),{})}};ce._Code=ut;ce.nil=new ut("");function Ff(t,...e){let n=[t[0]],r=0;for(;r<e.length;)$c(n,e[r]),n.push(t[++r]);return new ut(n)}ce._=Ff;var _c=new ut("+");function Bf(t,...e){let n=[ni(t[0])],r=0;for(;r<e.length;)n.push(_c),$c(n,e[r]),n.push(_c,ni(t[++r]));return Z_(n),new ut(n)}ce.str=Bf;function $c(t,e){e instanceof ut?t.push(...e._items):e instanceof bn?t.push(e):t.push(n$(e))}ce.addCodeArg=$c;function Z_(t){let e=1;for(;e<t.length-1;){if(t[e]===_c){let n=e$(t[e-1],t[e+1]);if(n!==void 0){t.splice(e-1,3,n);continue}t[e++]="+"}e++}}function e$(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof bn||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 bn))return`"${t}${e.slice(1)}`}function t$(t,e){return e.emptyStr()?t:t.emptyStr()?e:Bf`${t}${e}`}ce.strConcat=t$;function n$(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:ni(Array.isArray(t)?t.join(","):t)}function r$(t){return new ut(ni(t))}ce.stringify=r$;function ni(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ce.safeStringify=ni;function i$(t){return typeof t=="string"&&ce.IDENTIFIER.test(t)?new ut(`.${t}`):Ff`[${t}]`}ce.getProperty=i$;function o$(t){if(typeof t=="string"&&ce.IDENTIFIER.test(t))return new ut(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}ce.getEsmExportName=o$;function s$(t){return new ut(t.toString())}ce.regexpCode=s$});var Cc=$(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.ValueScope=Xe.ValueScopeName=Xe.Scope=Xe.varKinds=Xe.UsedValueState=void 0;var Ye=ri(),xc=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Po;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Po||(Xe.UsedValueState=Po={}));Xe.varKinds={const:new Ye.Name("const"),let:new Ye.Name("let"),var:new Ye.Name("var")};var Ro=class{constructor({prefixes:e,parent:n}={}){this._names={},this._prefixes=e,this._parent=n}toName(e){return e instanceof Ye.Name?e:this.name(e)}name(e){return new Ye.Name(this._newName(e))}_newName(e){let n=this._names[e]||this._nameGroup(e);return`${e}${n.index++}`}_nameGroup(e){var n,r;if(!((r=(n=this._parent)===null||n===void 0?void 0:n._prefixes)===null||r===void 0)&&r.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Xe.Scope=Ro;var Io=class extends Ye.Name{constructor(e,n){super(n),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,Ye._)`.${new Ye.Name(n)}[${r}]`}};Xe.ValueScopeName=Io;var a$=(0,Ye._)`\n`,Sc=class extends Ro{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?a$:Ye.nil}}get(){return this._scope}name(e){return new Io(e,this._newName(e))}value(e,n){var r;if(n.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,s=(r=n.key)!==null&&r!==void 0?r:n.ref,a=this._values[o];if(a){let d=a.get(s);if(d)return d}else a=this._values[o]=new Map;a.set(s,i);let l=this._scope[o]||(this._scope[o]=[]),c=l.length;return l[c]=n.ref,i.setValue(n,{property:o,itemIndex:c}),i}getValue(e,n){let r=this._values[e];if(r)return r.get(n)}scopeRefs(e,n=this._values){return this._reduceValues(n,r=>{if(r.scopePath===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return(0,Ye._)`${e}${r.scopePath}`})}scopeCode(e=this._values,n,r){return this._reduceValues(e,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},n,r)}_reduceValues(e,n,r={},i){let o=Ye.nil;for(let s in e){let a=e[s];if(!a)continue;let l=r[s]=r[s]||new Map;a.forEach(c=>{if(l.has(c))return;l.set(c,Po.Started);let d=n(c);if(d){let p=this.opts.es5?Xe.varKinds.var:Xe.varKinds.const;o=(0,Ye._)`${o}${p} ${c} = ${d};${this.opts._n}`}else if(d=i?.(c))o=(0,Ye._)`${o}${d}${this.opts._n}`;else throw new xc(c);l.set(c,Po.Completed)})}return o}};Xe.ValueScope=Sc});var Z=$(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.or=te.and=te.not=te.CodeGen=te.operators=te.varKinds=te.ValueScopeName=te.ValueScope=te.Scope=te.Name=te.regexpCode=te.stringify=te.getProperty=te.nil=te.strConcat=te.str=te._=void 0;var se=ri(),bt=Cc(),sn=ri();Object.defineProperty(te,"_",{enumerable:!0,get:function(){return sn._}});Object.defineProperty(te,"str",{enumerable:!0,get:function(){return sn.str}});Object.defineProperty(te,"strConcat",{enumerable:!0,get:function(){return sn.strConcat}});Object.defineProperty(te,"nil",{enumerable:!0,get:function(){return sn.nil}});Object.defineProperty(te,"getProperty",{enumerable:!0,get:function(){return sn.getProperty}});Object.defineProperty(te,"stringify",{enumerable:!0,get:function(){return sn.stringify}});Object.defineProperty(te,"regexpCode",{enumerable:!0,get:function(){return sn.regexpCode}});Object.defineProperty(te,"Name",{enumerable:!0,get:function(){return sn.Name}});var No=Cc();Object.defineProperty(te,"Scope",{enumerable:!0,get:function(){return No.Scope}});Object.defineProperty(te,"ValueScope",{enumerable:!0,get:function(){return No.ValueScope}});Object.defineProperty(te,"ValueScopeName",{enumerable:!0,get:function(){return No.ValueScopeName}});Object.defineProperty(te,"varKinds",{enumerable:!0,get:function(){return No.varKinds}});te.operators={GT:new se._Code(">"),GTE:new se._Code(">="),LT:new se._Code("<"),LTE:new se._Code("<="),EQ:new se._Code("==="),NEQ:new se._Code("!=="),NOT:new se._Code("!"),OR:new se._Code("||"),AND:new se._Code("&&"),ADD:new se._Code("+")};var Bt=class{optimizeNodes(){return this}optimizeNames(e,n){return this}},kc=class extends Bt{constructor(e,n,r){super(),this.varKind=e,this.name=n,this.rhs=r}render({es5:e,_n:n}){let r=e?bt.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${i};`+n}optimizeNames(e,n){if(e[this.name.str])return this.rhs&&(this.rhs=tr(this.rhs,e,n)),this}get names(){return this.rhs instanceof se._CodeOrName?this.rhs.names:{}}},To=class extends Bt{constructor(e,n,r){super(),this.lhs=e,this.rhs=n,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof se.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=tr(this.rhs,e,n),this}get names(){let e=this.lhs instanceof se.Name?{}:{...this.lhs.names};return Oo(e,this.rhs)}},Ec=class extends To{constructor(e,n,r,i){super(e,r,i),this.op=n}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Pc=class extends Bt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Rc=class extends Bt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Ic=class extends Bt{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Tc=class extends Bt{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,n){return this.code=tr(this.code,e,n),this}get names(){return this.code instanceof se._CodeOrName?this.code.names:{}}},ii=class extends Bt{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((n,r)=>n+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,n=e.length;for(;n--;){let r=e[n].optimizeNodes();Array.isArray(r)?e.splice(n,1,...r):r?e[n]=r:e.splice(n,1)}return e.length>0?this:void 0}optimizeNames(e,n){let{nodes:r}=this,i=r.length;for(;i--;){let o=r[i];o.optimizeNames(e,n)||(c$(e,o.names),r.splice(i,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,n)=>xn(e,n.names),{})}},Ht=class extends ii{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Ac=class extends ii{},er=class extends Ht{};er.kind="else";var _n=class t extends Ht{constructor(e,n){super(n),this.condition=e}render(e){let n=`if(${this.condition})`+super.render(e);return this.else&&(n+="else "+this.else.render(e)),n}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let n=this.else;if(n){let r=n.optimizeNodes();n=this.else=Array.isArray(r)?new er(r):r}if(n)return e===!1?n instanceof t?n:n.nodes:this.nodes.length?this:new t(Hf(e),n instanceof t?[n]:n.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,n){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,n),!!(super.optimizeNames(e,n)||this.else))return this.condition=tr(this.condition,e,n),this}get names(){let e=super.names;return Oo(e,this.condition),this.else&&xn(e,this.else.names),e}};_n.kind="if";var $n=class extends Ht{};$n.kind="for";var Oc=class extends $n{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,n){if(super.optimizeNames(e,n))return this.iteration=tr(this.iteration,e,n),this}get names(){return xn(super.names,this.iteration.names)}},Nc=class extends $n{constructor(e,n,r,i){super(),this.varKind=e,this.name=n,this.from=r,this.to=i}render(e){let n=e.es5?bt.varKinds.var:this.varKind,{name:r,from:i,to:o}=this;return`for(${n} ${r}=${i}; ${r}<${o}; ${r}++)`+super.render(e)}get names(){let e=Oo(super.names,this.from);return Oo(e,this.to)}},Ao=class extends $n{constructor(e,n,r,i){super(),this.loop=e,this.varKind=n,this.name=r,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,n){if(super.optimizeNames(e,n))return this.iterable=tr(this.iterable,e,n),this}get names(){return xn(super.names,this.iterable.names)}},oi=class extends Ht{constructor(e,n,r){super(),this.name=e,this.args=n,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};oi.kind="func";var si=class extends ii{render(e){return"return "+super.render(e)}};si.kind="return";var Mc=class extends Ht{render(e){let n="try"+super.render(e);return this.catch&&(n+=this.catch.render(e)),this.finally&&(n+=this.finally.render(e)),n}optimizeNodes(){var e,n;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(n=this.finally)===null||n===void 0||n.optimizeNodes(),this}optimizeNames(e,n){var r,i;return super.optimizeNames(e,n),(r=this.catch)===null||r===void 0||r.optimizeNames(e,n),(i=this.finally)===null||i===void 0||i.optimizeNames(e,n),this}get names(){let e=super.names;return this.catch&&xn(e,this.catch.names),this.finally&&xn(e,this.finally.names),e}},ai=class extends Ht{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};ai.kind="catch";var ci=class extends Ht{render(e){return"finally"+super.render(e)}};ci.kind="finally";var Vc=class{constructor(e,n={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...n,_n:n.lines?`
61
61
  `:""},this._extScope=e,this._scope=new bt.Scope({parent:e}),this._nodes=[new Ac]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,n){let r=this._extScope.value(e,n);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,n){return this._extScope.getValue(e,n)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,n,r,i){let o=this._scope.toName(n);return r!==void 0&&i&&(this._constants[o.str]=r),this._leafNode(new kc(e,o,r)),o}const(e,n,r){return this._def(bt.varKinds.const,e,n,r)}let(e,n,r){return this._def(bt.varKinds.let,e,n,r)}var(e,n,r){return this._def(bt.varKinds.var,e,n,r)}assign(e,n,r){return this._leafNode(new To(e,n,r))}add(e,n){return this._leafNode(new Ec(e,te.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==se.nil&&this._leafNode(new Tc(e)),this}object(...e){let n=["{"];for(let[r,i]of e)n.length>1&&n.push(","),n.push(r),(r!==i||this.opts.es5)&&(n.push(":"),(0,se.addCodeArg)(n,i));return n.push("}"),new se._Code(n)}if(e,n,r){if(this._blockNode(new _n(e)),n&&r)this.code(n).else().code(r).endIf();else if(n)this.code(n).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new _n(e))}else(){return this._elseNode(new er)}endIf(){return this._endBlockNode(_n,er)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new Oc(e),n)}forRange(e,n,r,i,o=this.opts.es5?bt.varKinds.var:bt.varKinds.let){let s=this._scope.toName(e);return this._for(new Nc(o,s,n,r),()=>i(s))}forOf(e,n,r,i=bt.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let s=n instanceof se.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,se._)`${s}.length`,a=>{this.var(o,(0,se._)`${s}[${a}]`),r(o)})}return this._for(new Ao("of",i,o,n),()=>r(o))}forIn(e,n,r,i=this.opts.es5?bt.varKinds.var:bt.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,se._)`Object.keys(${n})`,r);let o=this._scope.toName(e);return this._for(new Ao("in",i,o,n),()=>r(o))}endFor(){return this._endBlockNode($n)}label(e){return this._leafNode(new Pc(e))}break(e){return this._leafNode(new Rc(e))}return(e){let n=new si;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(si)}try(e,n,r){if(!n&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new Mc;if(this._blockNode(i),this.code(e),n){let o=this.name("e");this._currNode=i.catch=new ai(o),n(o)}return r&&(this._currNode=i.finally=new ci,this.code(r)),this._endBlockNode(ai,ci)}throw(e){return this._leafNode(new Ic(e))}block(e,n){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(n),this}endBlock(e){let n=this._blockStarts.pop();if(n===void 0)throw new Error("CodeGen: not in self-balancing block");let r=this._nodes.length-n;if(r<0||e!==void 0&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=n,this}func(e,n=se.nil,r,i){return this._blockNode(new oi(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(oi)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,n){let r=this._currNode;if(r instanceof e||n&&r instanceof n)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${n?`${e.kind}/${n.kind}`:e.kind}"`)}_elseNode(e){let n=this._currNode;if(!(n instanceof _n))throw new Error('CodeGen: "else" without "if"');return this._currNode=n.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let n=this._nodes;n[n.length-1]=e}};te.CodeGen=Vc;function xn(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function Oo(t,e){return e instanceof se._CodeOrName?xn(t,e.names):t}function tr(t,e,n){if(t instanceof se.Name)return r(t);if(!i(t))return t;return new se._Code(t._items.reduce((o,s)=>(s instanceof se.Name&&(s=r(s)),s instanceof se._Code?o.push(...s._items):o.push(s),o),[]));function r(o){let s=n[o.str];return s===void 0||e[o.str]!==1?o:(delete e[o.str],s)}function i(o){return o instanceof se._Code&&o._items.some(s=>s instanceof se.Name&&e[s.str]===1&&n[s.str]!==void 0)}}function c$(t,e){for(let n in e)t[n]=(t[n]||0)-(e[n]||0)}function Hf(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,se._)`!${Lc(t)}`}te.not=Hf;var l$=Wf(te.operators.AND);function u$(...t){return t.reduce(l$)}te.and=u$;var p$=Wf(te.operators.OR);function d$(...t){return t.reduce(p$)}te.or=d$;function Wf(t){return(e,n)=>e===se.nil?n:n===se.nil?e:(0,se._)`${Lc(e)} ${t} ${Lc(n)}`}function Lc(t){return t instanceof se.Name?t:(0,se._)`(${t})`}});var re=$(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.checkStrictMode=ne.getErrorPath=ne.Type=ne.useFunc=ne.setEvaluated=ne.evaluatedPropsToName=ne.mergeEvaluated=ne.eachItem=ne.unescapeJsonPointer=ne.escapeJsonPointer=ne.escapeFragment=ne.unescapeFragment=ne.schemaRefOrVal=ne.schemaHasRulesButRef=ne.schemaHasRules=ne.checkUnknownRules=ne.alwaysValidSchema=ne.toHash=void 0;var he=Z(),f$=ri();function h$(t){let e={};for(let n of t)e[n]=!0;return e}ne.toHash=h$;function m$(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Gf(t,e),!Jf(e,t.self.RULES.all))}ne.alwaysValidSchema=m$;function Gf(t,e=t.schema){let{opts:n,self:r}=t;if(!n.strictSchema||typeof e=="boolean")return;let i=r.RULES.keywords;for(let o in e)i[o]||Xf(t,`unknown keyword: "${o}"`)}ne.checkUnknownRules=Gf;function Jf(t,e){if(typeof t=="boolean")return!t;for(let n in t)if(e[n])return!0;return!1}ne.schemaHasRules=Jf;function g$(t,e){if(typeof t=="boolean")return!t;for(let n in t)if(n!=="$ref"&&e.all[n])return!0;return!1}ne.schemaHasRulesButRef=g$;function y$({topSchemaRef:t,schemaPath:e},n,r,i){if(!i){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,he._)`${n}`}return(0,he._)`${t}${e}${(0,he.getProperty)(r)}`}ne.schemaRefOrVal=y$;function w$(t){return Kf(decodeURIComponent(t))}ne.unescapeFragment=w$;function v$(t){return encodeURIComponent(Dc(t))}ne.escapeFragment=v$;function Dc(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}ne.escapeJsonPointer=Dc;function Kf(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}ne.unescapeJsonPointer=Kf;function b$(t,e){if(Array.isArray(t))for(let n of t)e(n);else e(t)}ne.eachItem=b$;function Uf({mergeNames:t,mergeToName:e,mergeValues:n,resultToName:r}){return(i,o,s,a)=>{let l=s===void 0?o:s instanceof he.Name?(o instanceof he.Name?t(i,o,s):e(i,o,s),s):o instanceof he.Name?(e(i,s,o),o):n(o,s);return a===he.Name&&!(l instanceof he.Name)?r(i,l):l}}ne.mergeEvaluated={props:Uf({mergeNames:(t,e,n)=>t.if((0,he._)`${n} !== true && ${e} !== undefined`,()=>{t.if((0,he._)`${e} === true`,()=>t.assign(n,!0),()=>t.assign(n,(0,he._)`${n} || {}`).code((0,he._)`Object.assign(${n}, ${e})`))}),mergeToName:(t,e,n)=>t.if((0,he._)`${n} !== true`,()=>{e===!0?t.assign(n,!0):(t.assign(n,(0,he._)`${n} || {}`),qc(t,n,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Yf}),items:Uf({mergeNames:(t,e,n)=>t.if((0,he._)`${n} !== true && ${e} !== undefined`,()=>t.assign(n,(0,he._)`${e} === true ? true : ${n} > ${e} ? ${n} : ${e}`)),mergeToName:(t,e,n)=>t.if((0,he._)`${n} !== true`,()=>t.assign(n,e===!0?!0:(0,he._)`${n} > ${e} ? ${n} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Yf(t,e){if(e===!0)return t.var("props",!0);let n=t.var("props",(0,he._)`{}`);return e!==void 0&&qc(t,n,e),n}ne.evaluatedPropsToName=Yf;function qc(t,e,n){Object.keys(n).forEach(r=>t.assign((0,he._)`${e}${(0,he.getProperty)(r)}`,!0))}ne.setEvaluated=qc;var zf={};function _$(t,e){return t.scopeValue("func",{ref:e,code:zf[e.code]||(zf[e.code]=new f$._Code(e.code))})}ne.useFunc=_$;var jc;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(jc||(ne.Type=jc={}));function $$(t,e,n){if(t instanceof he.Name){let r=e===jc.Num;return n?r?(0,he._)`"[" + ${t} + "]"`:(0,he._)`"['" + ${t} + "']"`:r?(0,he._)`"/" + ${t}`:(0,he._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,he.getProperty)(t).toString():"/"+Dc(t)}ne.getErrorPath=$$;function Xf(t,e,n=t.opts.strictSchema){if(n){if(e=`strict mode: ${e}`,n===!0)throw new Error(e);t.self.logger.warn(e)}}ne.checkStrictMode=Xf});var pt=$(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});var Le=Z(),x$={data:new Le.Name("data"),valCxt:new Le.Name("valCxt"),instancePath:new Le.Name("instancePath"),parentData:new Le.Name("parentData"),parentDataProperty:new Le.Name("parentDataProperty"),rootData:new Le.Name("rootData"),dynamicAnchors:new Le.Name("dynamicAnchors"),vErrors:new Le.Name("vErrors"),errors:new Le.Name("errors"),this:new Le.Name("this"),self:new Le.Name("self"),scope:new Le.Name("scope"),json:new Le.Name("json"),jsonPos:new Le.Name("jsonPos"),jsonLen:new Le.Name("jsonLen"),jsonPart:new Le.Name("jsonPart")};Fc.default=x$});var li=$(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.extendErrors=je.resetErrorsCount=je.reportExtraError=je.reportError=je.keyword$DataError=je.keywordError=void 0;var ae=Z(),Mo=re(),He=pt();je.keywordError={message:({keyword:t})=>(0,ae.str)`must pass "${t}" keyword validation`};je.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,ae.str)`"${t}" keyword must be ${e} ($data)`:(0,ae.str)`"${t}" keyword is invalid ($data)`};function S$(t,e=je.keywordError,n,r){let{it:i}=t,{gen:o,compositeRule:s,allErrors:a}=i,l=eh(t,e,n);r??(s||a)?Qf(o,l):Zf(i,(0,ae._)`[${l}]`)}je.reportError=S$;function C$(t,e=je.keywordError,n){let{it:r}=t,{gen:i,compositeRule:o,allErrors:s}=r,a=eh(t,e,n);Qf(i,a),o||s||Zf(r,He.default.vErrors)}je.reportExtraError=C$;function k$(t,e){t.assign(He.default.errors,e),t.if((0,ae._)`${He.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,ae._)`${He.default.vErrors}.length`,e),()=>t.assign(He.default.vErrors,null)))}je.resetErrorsCount=k$;function E$({gen:t,keyword:e,schemaValue:n,data:r,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let s=t.name("err");t.forRange("i",i,He.default.errors,a=>{t.const(s,(0,ae._)`${He.default.vErrors}[${a}]`),t.if((0,ae._)`${s}.instancePath === undefined`,()=>t.assign((0,ae._)`${s}.instancePath`,(0,ae.strConcat)(He.default.instancePath,o.errorPath))),t.assign((0,ae._)`${s}.schemaPath`,(0,ae.str)`${o.errSchemaPath}/${e}`),o.opts.verbose&&(t.assign((0,ae._)`${s}.schema`,n),t.assign((0,ae._)`${s}.data`,r))})}je.extendErrors=E$;function Qf(t,e){let n=t.const("err",e);t.if((0,ae._)`${He.default.vErrors} === null`,()=>t.assign(He.default.vErrors,(0,ae._)`[${n}]`),(0,ae._)`${He.default.vErrors}.push(${n})`),t.code((0,ae._)`${He.default.errors}++`)}function Zf(t,e){let{gen:n,validateName:r,schemaEnv:i}=t;i.$async?n.throw((0,ae._)`new ${t.ValidationError}(${e})`):(n.assign((0,ae._)`${r}.errors`,e),n.return(!1))}var Sn={keyword:new ae.Name("keyword"),schemaPath:new ae.Name("schemaPath"),params:new ae.Name("params"),propertyName:new ae.Name("propertyName"),message:new ae.Name("message"),schema:new ae.Name("schema"),parentSchema:new ae.Name("parentSchema")};function eh(t,e,n){let{createErrors:r}=t.it;return r===!1?(0,ae._)`{}`:P$(t,e,n)}function P$(t,e,n={}){let{gen:r,it:i}=t,o=[R$(i,n),I$(t,n)];return T$(t,e,o),r.object(...o)}function R$({errorPath:t},{instancePath:e}){let n=e?(0,ae.str)`${t}${(0,Mo.getErrorPath)(e,Mo.Type.Str)}`:t;return[He.default.instancePath,(0,ae.strConcat)(He.default.instancePath,n)]}function I$({keyword:t,it:{errSchemaPath:e}},{schemaPath:n,parentSchema:r}){let i=r?e:(0,ae.str)`${e}/${t}`;return n&&(i=(0,ae.str)`${i}${(0,Mo.getErrorPath)(n,Mo.Type.Str)}`),[Sn.schemaPath,i]}function T$(t,{params:e,message:n},r){let{keyword:i,data:o,schemaValue:s,it:a}=t,{opts:l,propertyName:c,topSchemaRef:d,schemaPath:p}=a;r.push([Sn.keyword,i],[Sn.params,typeof e=="function"?e(t):e||(0,ae._)`{}`]),l.messages&&r.push([Sn.message,typeof n=="function"?n(t):n]),l.verbose&&r.push([Sn.schema,s],[Sn.parentSchema,(0,ae._)`${d}${p}`],[He.default.data,o]),c&&r.push([Sn.propertyName,c])}});var nh=$(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.boolOrEmptySchema=nr.topBoolOrEmptySchema=void 0;var A$=li(),O$=Z(),N$=pt(),M$={message:"boolean schema is false"};function V$(t){let{gen:e,schema:n,validateName:r}=t;n===!1?th(t,!1):typeof n=="object"&&n.$async===!0?e.return(N$.default.data):(e.assign((0,O$._)`${r}.errors`,null),e.return(!0))}nr.topBoolOrEmptySchema=V$;function L$(t,e){let{gen:n,schema:r}=t;r===!1?(n.var(e,!1),th(t)):n.var(e,!0)}nr.boolOrEmptySchema=L$;function th(t,e){let{gen:n,data:r}=t,i={gen:n,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,A$.reportError)(i,M$,void 0,e)}});var Bc=$(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.getRules=rr.isJSONType=void 0;var j$=["string","number","integer","boolean","null","object","array"],D$=new Set(j$);function q$(t){return typeof t=="string"&&D$.has(t)}rr.isJSONType=q$;function F$(){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:{}}}rr.getRules=F$});var Hc=$(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.shouldUseRule=an.shouldUseGroup=an.schemaHasRulesForType=void 0;function B$({schema:t,self:e},n){let r=e.RULES.types[n];return r&&r!==!0&&rh(t,r)}an.schemaHasRulesForType=B$;function rh(t,e){return e.rules.some(n=>ih(t,n))}an.shouldUseGroup=rh;function ih(t,e){var n;return t[e.keyword]!==void 0||((n=e.definition.implements)===null||n===void 0?void 0:n.some(r=>t[r]!==void 0))}an.shouldUseRule=ih});var ui=$(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.reportTypeError=De.checkDataTypes=De.checkDataType=De.coerceAndCheckDataType=De.getJSONTypes=De.getSchemaTypes=De.DataType=void 0;var H$=Bc(),W$=Hc(),U$=li(),ee=Z(),oh=re(),ir;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(ir||(De.DataType=ir={}));function z$(t){let e=sh(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}De.getSchemaTypes=z$;function sh(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(H$.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}De.getJSONTypes=sh;function G$(t,e){let{gen:n,data:r,opts:i}=t,o=J$(e,i.coerceTypes),s=e.length>0&&!(o.length===0&&e.length===1&&(0,W$.schemaHasRulesForType)(t,e[0]));if(s){let a=Uc(e,r,i.strictNumbers,ir.Wrong);n.if(a,()=>{o.length?K$(t,e,o):zc(t)})}return s}De.coerceAndCheckDataType=G$;var ah=new Set(["string","number","integer","boolean","null"]);function J$(t,e){return e?t.filter(n=>ah.has(n)||e==="array"&&n==="array"):[]}function K$(t,e,n){let{gen:r,data:i,opts:o}=t,s=r.let("dataType",(0,ee._)`typeof ${i}`),a=r.let("coerced",(0,ee._)`undefined`);o.coerceTypes==="array"&&r.if((0,ee._)`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>r.assign(i,(0,ee._)`${i}[0]`).assign(s,(0,ee._)`typeof ${i}`).if(Uc(e,i,o.strictNumbers),()=>r.assign(a,i))),r.if((0,ee._)`${a} !== undefined`);for(let c of n)(ah.has(c)||c==="array"&&o.coerceTypes==="array")&&l(c);r.else(),zc(t),r.endIf(),r.if((0,ee._)`${a} !== undefined`,()=>{r.assign(i,a),Y$(t,a)});function l(c){switch(c){case"string":r.elseIf((0,ee._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,ee._)`"" + ${i}`).elseIf((0,ee._)`${i} === null`).assign(a,(0,ee._)`""`);return;case"number":r.elseIf((0,ee._)`${s} == "boolean" || ${i} === null
62
62
  || (${s} == "string" && ${i} && ${i} == +${i})`).assign(a,(0,ee._)`+${i}`);return;case"integer":r.elseIf((0,ee._)`${s} === "boolean" || ${i} === null
63
63
  || (${s} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(a,(0,ee._)`+${i}`);return;case"boolean":r.elseIf((0,ee._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(a,!1).elseIf((0,ee._)`${i} === "true" || ${i} === 1`).assign(a,!0);return;case"null":r.elseIf((0,ee._)`${i} === "" || ${i} === 0 || ${i} === false`),r.assign(a,null);return;case"array":r.elseIf((0,ee._)`${s} === "string" || ${s} === "number"
64
- || ${s} === "boolean" || ${i} === null`).assign(a,(0,ee._)`[${i}]`)}}}function Y$({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,ee._)`${e} !== undefined`,()=>t.assign((0,ee._)`${e}[${n}]`,r))}function Wc(t,e,n,r=ir.Correct){let i=r===ir.Correct?ee.operators.EQ:ee.operators.NEQ,o;switch(t){case"null":return(0,ee._)`${e} ${i} null`;case"array":o=(0,ee._)`Array.isArray(${e})`;break;case"object":o=(0,ee._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=s((0,ee._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=s();break;default:return(0,ee._)`typeof ${e} ${i} ${t}`}return r===ir.Correct?o:(0,ee.not)(o);function s(a=ee.nil){return(0,ee.and)((0,ee._)`typeof ${e} == "number"`,a,n?(0,ee._)`isFinite(${e})`:ee.nil)}}De.checkDataType=Wc;function Uc(t,e,n,r){if(t.length===1)return Wc(t[0],e,n,r);let i,o=(0,oh.toHash)(t);if(o.array&&o.object){let s=(0,ee._)`typeof ${e} != "object"`;i=o.null?s:(0,ee._)`!${e} || ${s}`,delete o.null,delete o.array,delete o.object}else i=ee.nil;o.number&&delete o.integer;for(let s in o)i=(0,ee.and)(i,Wc(s,e,n,r));return i}De.checkDataTypes=Uc;var X$={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,ee._)`{type: ${t}}`:(0,ee._)`{type: ${e}}`};function zc(t){let e=Q$(t);(0,U$.reportError)(e,X$)}De.reportTypeError=zc;function Q$(t){let{gen:e,data:n,schema:r}=t,i=(0,oh.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:t}}});var lh=$(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.assignDefaults=void 0;var or=Z(),Z$=re();function e0(t,e){let{properties:n,items:r}=t.schema;if(e==="object"&&n)for(let i in n)ch(t,i,n[i].default);else e==="array"&&Array.isArray(r)&&r.forEach((i,o)=>ch(t,o,i.default))}Vo.assignDefaults=e0;function ch(t,e,n){let{gen:r,compositeRule:i,data:o,opts:s}=t;if(n===void 0)return;let a=(0,or._)`${o}${(0,or.getProperty)(e)}`;if(i){(0,Z$.checkStrictMode)(t,`default is ignored for: ${a}`);return}let l=(0,or._)`${a} === undefined`;s.useDefaults==="empty"&&(l=(0,or._)`${l} || ${a} === null || ${a} === ""`),r.if(l,(0,or._)`${a} = ${(0,or.stringify)(n)}`)}});var dt=$(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.validateUnion=fe.validateArray=fe.usePattern=fe.callValidateCode=fe.schemaProperties=fe.allSchemaProperties=fe.noPropertyInData=fe.propertyInData=fe.isOwnProperty=fe.hasPropFunc=fe.reportMissingProp=fe.checkMissingProp=fe.checkReportMissingProp=void 0;var ve=Z(),Gc=re(),cn=pt(),t0=re();function n0(t,e){let{gen:n,data:r,it:i}=t;n.if(Kc(n,r,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,ve._)`${e}`},!0),t.error()})}fe.checkReportMissingProp=n0;function r0({gen:t,data:e,it:{opts:n}},r,i){return(0,ve.or)(...r.map(o=>(0,ve.and)(Kc(t,e,o,n.ownProperties),(0,ve._)`${i} = ${o}`)))}fe.checkMissingProp=r0;function i0(t,e){t.setParams({missingProperty:e},!0),t.error()}fe.reportMissingProp=i0;function uh(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ve._)`Object.prototype.hasOwnProperty`})}fe.hasPropFunc=uh;function Jc(t,e,n){return(0,ve._)`${uh(t)}.call(${e}, ${n})`}fe.isOwnProperty=Jc;function o0(t,e,n,r){let i=(0,ve._)`${e}${(0,ve.getProperty)(n)} !== undefined`;return r?(0,ve._)`${i} && ${Jc(t,e,n)}`:i}fe.propertyInData=o0;function Kc(t,e,n,r){let i=(0,ve._)`${e}${(0,ve.getProperty)(n)} === undefined`;return r?(0,ve.or)(i,(0,ve.not)(Jc(t,e,n))):i}fe.noPropertyInData=Kc;function ph(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}fe.allSchemaProperties=ph;function s0(t,e){return ph(e).filter(n=>!(0,Gc.alwaysValidSchema)(t,e[n]))}fe.schemaProperties=s0;function a0({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:i,errorPath:o},it:s},a,l,c){let d=c?(0,ve._)`${t}, ${e}, ${r}${i}`:e,p=[[cn.default.instancePath,(0,ve.strConcat)(cn.default.instancePath,o)],[cn.default.parentData,s.parentData],[cn.default.parentDataProperty,s.parentDataProperty],[cn.default.rootData,cn.default.rootData]];s.opts.dynamicRef&&p.push([cn.default.dynamicAnchors,cn.default.dynamicAnchors]);let f=(0,ve._)`${d}, ${n.object(...p)}`;return l!==ve.nil?(0,ve._)`${a}.call(${l}, ${f})`:(0,ve._)`${a}(${f})`}fe.callValidateCode=a0;var c0=(0,ve._)`new RegExp`;function l0({gen:t,it:{opts:e}},n){let r=e.unicodeRegExp?"u":"",{regExp:i}=e.code,o=i(n,r);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,ve._)`${i.code==="new RegExp"?c0:(0,t0.useFunc)(t,i)}(${n}, ${r})`})}fe.usePattern=l0;function u0(t){let{gen:e,data:n,keyword:r,it:i}=t,o=e.name("valid");if(i.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(o,!0),s(()=>e.break()),o;function s(a){let l=e.const("len",(0,ve._)`${n}.length`);e.forRange("i",0,l,c=>{t.subschema({keyword:r,dataProp:c,dataPropType:Gc.Type.Num},o),e.if((0,ve.not)(o),a)})}}fe.validateArray=u0;function p0(t){let{gen:e,schema:n,keyword:r,it:i}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(l=>(0,Gc.alwaysValidSchema)(i,l))&&!i.opts.unevaluated)return;let s=e.let("valid",!1),a=e.name("_valid");e.block(()=>n.forEach((l,c)=>{let d=t.subschema({keyword:r,schemaProp:c,compositeRule:!0},a);e.assign(s,(0,ve._)`${s} || ${a}`),t.mergeValidEvaluated(d,a)||e.if((0,ve.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}fe.validateUnion=p0});var hh=$(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.validateKeywordUsage=Pt.validSchemaType=Pt.funcKeywordCode=Pt.macroKeywordCode=void 0;var We=Z(),Cn=pt(),d0=dt(),f0=li();function h0(t,e){let{gen:n,keyword:r,schema:i,parentSchema:o,it:s}=t,a=e.macro.call(s.self,i,o,s),l=fh(n,r,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let c=n.name("valid");t.subschema({schema:a,schemaPath:We.nil,errSchemaPath:`${s.errSchemaPath}/${r}`,topSchemaRef:l,compositeRule:!0},c),t.pass(c,()=>t.error(!0))}Pt.macroKeywordCode=h0;function m0(t,e){var n;let{gen:r,keyword:i,schema:o,parentSchema:s,$data:a,it:l}=t;y0(l,e);let c=!a&&e.compile?e.compile.call(l.self,o,s,l):e.validate,d=fh(r,i,c),p=r.let("valid");t.block$data(p,f),t.ok((n=e.valid)!==null&&n!==void 0?n:p);function f(){if(e.errors===!1)y(),e.modifying&&dh(t),w(()=>t.error());else{let b=e.async?m():g();e.modifying&&dh(t),w(()=>g0(t,b))}}function m(){let b=r.let("ruleErrs",null);return r.try(()=>y((0,We._)`await `),I=>r.assign(p,!1).if((0,We._)`${I} instanceof ${l.ValidationError}`,()=>r.assign(b,(0,We._)`${I}.errors`),()=>r.throw(I))),b}function g(){let b=(0,We._)`${d}.errors`;return r.assign(b,null),y(We.nil),b}function y(b=e.async?(0,We._)`await `:We.nil){let I=l.opts.passContext?Cn.default.this:Cn.default.self,S=!("compile"in e&&!a||e.schema===!1);r.assign(p,(0,We._)`${b}${(0,d0.callValidateCode)(t,d,I,S)}`,e.modifying)}function w(b){var I;r.if((0,We.not)((I=e.valid)!==null&&I!==void 0?I:p),b)}}Pt.funcKeywordCode=m0;function dh(t){let{gen:e,data:n,it:r}=t;e.if(r.parentData,()=>e.assign(n,(0,We._)`${r.parentData}[${r.parentDataProperty}]`))}function g0(t,e){let{gen:n}=t;n.if((0,We._)`Array.isArray(${e})`,()=>{n.assign(Cn.default.vErrors,(0,We._)`${Cn.default.vErrors} === null ? ${e} : ${Cn.default.vErrors}.concat(${e})`).assign(Cn.default.errors,(0,We._)`${Cn.default.vErrors}.length`),(0,f0.extendErrors)(t)},()=>t.error())}function y0({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function fh(t,e,n){if(n===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof n=="function"?{ref:n}:{ref:n,code:(0,We.stringify)(n)})}function w0(t,e,n=!1){return!e.length||e.some(r=>r==="array"?Array.isArray(t):r==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==r||n&&typeof t>"u")}Pt.validSchemaType=w0;function v0({schema:t,opts:e,self:n,errSchemaPath:r},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");let s=i.dependencies;if(s?.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[o])){let l=`keyword "${o}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")n.logger.error(l);else throw new Error(l)}}Pt.validateKeywordUsage=v0});var gh=$(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.extendSubschemaMode=ln.extendSubschemaData=ln.getSubschema=void 0;var Rt=Z(),mh=re();function b0(t,{keyword:e,schemaProp:n,schema:r,schemaPath:i,errSchemaPath:o,topSchemaRef:s}){if(e!==void 0&&r!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let a=t.schema[e];return n===void 0?{schema:a,schemaPath:(0,Rt._)`${t.schemaPath}${(0,Rt.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[n],schemaPath:(0,Rt._)`${t.schemaPath}${(0,Rt.getProperty)(e)}${(0,Rt.getProperty)(n)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,mh.escapeFragment)(n)}`}}if(r!==void 0){if(i===void 0||o===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:r,schemaPath:i,topSchemaRef:s,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}ln.getSubschema=b0;function _0(t,e,{dataProp:n,dataPropType:r,data:i,dataTypes:o,propertyName:s}){if(i!==void 0&&n!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(n!==void 0){let{errorPath:c,dataPathArr:d,opts:p}=e,f=a.let("data",(0,Rt._)`${e.data}${(0,Rt.getProperty)(n)}`,!0);l(f),t.errorPath=(0,Rt.str)`${c}${(0,mh.getErrorPath)(n,r,p.jsPropertySyntax)}`,t.parentDataProperty=(0,Rt._)`${n}`,t.dataPathArr=[...d,t.parentDataProperty]}if(i!==void 0){let c=i instanceof Rt.Name?i:a.let("data",i,!0);l(c),s!==void 0&&(t.propertyName=s)}o&&(t.dataTypes=o);function l(c){t.data=c,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,c]}}ln.extendSubschemaData=_0;function $0(t,{jtdDiscriminator:e,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:o}){r!==void 0&&(t.compositeRule=r),i!==void 0&&(t.createErrors=i),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=n}ln.extendSubschemaMode=$0});var Yc=$(($O,yh)=>{"use strict";yh.exports=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}});var vh=$((xO,wh)=>{"use strict";var un=wh.exports=function(t,e,n){typeof e=="function"&&(n=e,e={}),n=e.cb||n;var r=typeof n=="function"?n:n.pre||function(){},i=n.post||function(){};Lo(e,r,i,t,"",t)};un.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};un.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};un.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};un.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 Lo(t,e,n,r,i,o,s,a,l,c){if(r&&typeof r=="object"&&!Array.isArray(r)){e(r,i,o,s,a,l,c);for(var d in r){var p=r[d];if(Array.isArray(p)){if(d in un.arrayKeywords)for(var f=0;f<p.length;f++)Lo(t,e,n,p[f],i+"/"+d+"/"+f,o,i,d,r,f)}else if(d in un.propsKeywords){if(p&&typeof p=="object")for(var m in p)Lo(t,e,n,p[m],i+"/"+d+"/"+x0(m),o,i,d,r,m)}else(d in un.keywords||t.allKeys&&!(d in un.skipKeywords))&&Lo(t,e,n,p,i+"/"+d,o,i,d,r)}n(r,i,o,s,a,l,c)}}function x0(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var pi=$(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.getSchemaRefs=Qe.resolveUrl=Qe.normalizeId=Qe._getFullPath=Qe.getFullPath=Qe.inlineRef=void 0;var S0=re(),C0=Yc(),k0=vh(),E0=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function P0(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Xc(t):e?bh(t)<=e:!1}Qe.inlineRef=P0;var R0=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Xc(t){for(let e in t){if(R0.has(e))return!0;let n=t[e];if(Array.isArray(n)&&n.some(Xc)||typeof n=="object"&&Xc(n))return!0}return!1}function bh(t){let e=0;for(let n in t){if(n==="$ref")return 1/0;if(e++,!E0.has(n)&&(typeof t[n]=="object"&&(0,S0.eachItem)(t[n],r=>e+=bh(r)),e===1/0))return 1/0}return e}function _h(t,e="",n){n!==!1&&(e=sr(e));let r=t.parse(e);return $h(t,r)}Qe.getFullPath=_h;function $h(t,e){return t.serialize(e).split("#")[0]+"#"}Qe._getFullPath=$h;var I0=/#\/?$/;function sr(t){return t?t.replace(I0,""):""}Qe.normalizeId=sr;function T0(t,e,n){return n=sr(n),t.resolve(e,n)}Qe.resolveUrl=T0;var A0=/^[a-z_][-a-z0-9._]*$/i;function O0(t,e){if(typeof t=="boolean")return{};let{schemaId:n,uriResolver:r}=this.opts,i=sr(t[n]||e),o={"":i},s=_h(r,i,!1),a={},l=new Set;return k0(t,{allKeys:!0},(p,f,m,g)=>{if(g===void 0)return;let y=s+f,w=o[g];typeof p[n]=="string"&&(w=b.call(this,p[n])),I.call(this,p.$anchor),I.call(this,p.$dynamicAnchor),o[f]=w;function b(S){let R=this.opts.uriResolver.resolve;if(S=sr(w?R(w,S):S),l.has(S))throw d(S);l.add(S);let N=this.refs[S];return typeof N=="string"&&(N=this.refs[N]),typeof N=="object"?c(p,N.schema,S):S!==sr(y)&&(S[0]==="#"?(c(p,a[S],S),a[S]=p):this.refs[S]=y),S}function I(S){if(typeof S=="string"){if(!A0.test(S))throw new Error(`invalid anchor "${S}"`);b.call(this,`#${S}`)}}}),a;function c(p,f,m){if(f!==void 0&&!C0(p,f))throw d(m)}function d(p){return new Error(`reference "${p}" resolves to more than one schema`)}}Qe.getSchemaRefs=O0});var hi=$(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.getData=pn.KeywordCxt=pn.validateFunctionCode=void 0;var Eh=nh(),xh=ui(),Zc=Hc(),jo=ui(),N0=lh(),fi=hh(),Qc=gh(),U=Z(),Q=pt(),M0=pi(),Wt=re(),di=li();function V0(t){if(Ih(t)&&(Th(t),Rh(t))){D0(t);return}Ph(t,()=>(0,Eh.topBoolOrEmptySchema)(t))}pn.validateFunctionCode=V0;function Ph({gen:t,validateName:e,schema:n,schemaEnv:r,opts:i},o){i.code.es5?t.func(e,(0,U._)`${Q.default.data}, ${Q.default.valCxt}`,r.$async,()=>{t.code((0,U._)`"use strict"; ${Sh(n,i)}`),j0(t,i),t.code(o)}):t.func(e,(0,U._)`${Q.default.data}, ${L0(i)}`,r.$async,()=>t.code(Sh(n,i)).code(o))}function L0(t){return(0,U._)`{${Q.default.instancePath}="", ${Q.default.parentData}, ${Q.default.parentDataProperty}, ${Q.default.rootData}=${Q.default.data}${t.dynamicRef?(0,U._)`, ${Q.default.dynamicAnchors}={}`:U.nil}}={}`}function j0(t,e){t.if(Q.default.valCxt,()=>{t.var(Q.default.instancePath,(0,U._)`${Q.default.valCxt}.${Q.default.instancePath}`),t.var(Q.default.parentData,(0,U._)`${Q.default.valCxt}.${Q.default.parentData}`),t.var(Q.default.parentDataProperty,(0,U._)`${Q.default.valCxt}.${Q.default.parentDataProperty}`),t.var(Q.default.rootData,(0,U._)`${Q.default.valCxt}.${Q.default.rootData}`),e.dynamicRef&&t.var(Q.default.dynamicAnchors,(0,U._)`${Q.default.valCxt}.${Q.default.dynamicAnchors}`)},()=>{t.var(Q.default.instancePath,(0,U._)`""`),t.var(Q.default.parentData,(0,U._)`undefined`),t.var(Q.default.parentDataProperty,(0,U._)`undefined`),t.var(Q.default.rootData,Q.default.data),e.dynamicRef&&t.var(Q.default.dynamicAnchors,(0,U._)`{}`)})}function D0(t){let{schema:e,opts:n,gen:r}=t;Ph(t,()=>{n.$comment&&e.$comment&&Oh(t),W0(t),r.let(Q.default.vErrors,null),r.let(Q.default.errors,0),n.unevaluated&&q0(t),Ah(t),G0(t)})}function q0(t){let{gen:e,validateName:n}=t;t.evaluated=e.const("evaluated",(0,U._)`${n}.evaluated`),e.if((0,U._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,U._)`${t.evaluated}.props`,(0,U._)`undefined`)),e.if((0,U._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,U._)`${t.evaluated}.items`,(0,U._)`undefined`))}function Sh(t,e){let n=typeof t=="object"&&t[e.schemaId];return n&&(e.code.source||e.code.process)?(0,U._)`/*# sourceURL=${n} */`:U.nil}function F0(t,e){if(Ih(t)&&(Th(t),Rh(t))){B0(t,e);return}(0,Eh.boolOrEmptySchema)(t,e)}function Rh({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let n in t)if(e.RULES.all[n])return!0;return!1}function Ih(t){return typeof t.schema!="boolean"}function B0(t,e){let{schema:n,gen:r,opts:i}=t;i.$comment&&n.$comment&&Oh(t),U0(t),z0(t);let o=r.const("_errs",Q.default.errors);Ah(t,o),r.var(e,(0,U._)`${o} === ${Q.default.errors}`)}function Th(t){(0,Wt.checkUnknownRules)(t),H0(t)}function Ah(t,e){if(t.opts.jtd)return Ch(t,[],!1,e);let n=(0,xh.getSchemaTypes)(t.schema),r=(0,xh.coerceAndCheckDataType)(t,n);Ch(t,n,!r,e)}function H0(t){let{schema:e,errSchemaPath:n,opts:r,self:i}=t;e.$ref&&r.ignoreKeywordsWithRef&&(0,Wt.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function W0(t){let{schema:e,opts:n}=t;e.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,Wt.checkStrictMode)(t,"default is ignored in the schema root")}function U0(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,M0.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function z0(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Oh({gen:t,schemaEnv:e,schema:n,errSchemaPath:r,opts:i}){let o=n.$comment;if(i.$comment===!0)t.code((0,U._)`${Q.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let s=(0,U.str)`${r}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,U._)`${Q.default.self}.opts.$comment(${o}, ${s}, ${a}.schema)`)}}function G0(t){let{gen:e,schemaEnv:n,validateName:r,ValidationError:i,opts:o}=t;n.$async?e.if((0,U._)`${Q.default.errors} === 0`,()=>e.return(Q.default.data),()=>e.throw((0,U._)`new ${i}(${Q.default.vErrors})`)):(e.assign((0,U._)`${r}.errors`,Q.default.vErrors),o.unevaluated&&J0(t),e.return((0,U._)`${Q.default.errors} === 0`))}function J0({gen:t,evaluated:e,props:n,items:r}){n instanceof U.Name&&t.assign((0,U._)`${e}.props`,n),r instanceof U.Name&&t.assign((0,U._)`${e}.items`,r)}function Ch(t,e,n,r){let{gen:i,schema:o,data:s,allErrors:a,opts:l,self:c}=t,{RULES:d}=c;if(o.$ref&&(l.ignoreKeywordsWithRef||!(0,Wt.schemaHasRulesButRef)(o,d))){i.block(()=>Mh(t,"$ref",d.all.$ref.definition));return}l.jtd||K0(t,e),i.block(()=>{for(let f of d.rules)p(f);p(d.post)});function p(f){(0,Zc.shouldUseGroup)(o,f)&&(f.type?(i.if((0,jo.checkDataType)(f.type,s,l.strictNumbers)),kh(t,f),e.length===1&&e[0]===f.type&&n&&(i.else(),(0,jo.reportTypeError)(t)),i.endIf()):kh(t,f),a||i.if((0,U._)`${Q.default.errors} === ${r||0}`))}}function kh(t,e){let{gen:n,schema:r,opts:{useDefaults:i}}=t;i&&(0,N0.assignDefaults)(t,e.type),n.block(()=>{for(let o of e.rules)(0,Zc.shouldUseRule)(r,o)&&Mh(t,o.keyword,o.definition,e.type)})}function K0(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(Y0(t,e),t.opts.allowUnionTypes||X0(t,e),Q0(t,t.dataTypes))}function Y0(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(n=>{Nh(t.dataTypes,n)||el(t,`type "${n}" not allowed by context "${t.dataTypes.join(",")}"`)}),ex(t,e)}}function X0(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&el(t,"use allowUnionTypes to allow union type keyword")}function Q0(t,e){let n=t.self.RULES.all;for(let r in n){let i=n[r];if(typeof i=="object"&&(0,Zc.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(s=>Z0(e,s))&&el(t,`missing type "${o.join(",")}" for keyword "${r}"`)}}}function Z0(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Nh(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function ex(t,e){let n=[];for(let r of t.dataTypes)Nh(e,r)?n.push(r):e.includes("integer")&&r==="number"&&n.push("integer");t.dataTypes=n}function el(t,e){let n=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${n}" (strictTypes)`,(0,Wt.checkStrictMode)(t,e,t.opts.strictTypes)}var Do=class{constructor(e,n,r){if((0,fi.validateKeywordUsage)(e,n,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=n.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Wt.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=n.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=n,this.$data)this.schemaCode=e.gen.const("vSchema",Vh(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,fi.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(n.schemaType)}`);("code"in n?n.trackErrors:n.errors!==!1)&&(this.errsCount=e.gen.const("_errs",Q.default.errors))}result(e,n,r){this.failResult((0,U.not)(e),n,r)}failResult(e,n,r){this.gen.if(e),r?r():this.error(),n?(this.gen.else(),n(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,n){this.failResult((0,U.not)(e),void 0,n)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:n}=this;this.fail((0,U._)`${n} !== undefined && (${(0,U.or)(this.invalid$data(),e)})`)}error(e,n,r){if(n){this.setParams(n),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,n){(e?di.reportExtraError:di.reportError)(this,this.def.error,n)}$dataError(){(0,di.reportError)(this,this.def.$dataError||di.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,di.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,n){n?Object.assign(this.params,e):this.params=e}block$data(e,n,r=U.nil){this.gen.block(()=>{this.check$data(e,r),n()})}check$data(e=U.nil,n=U.nil){if(!this.$data)return;let{gen:r,schemaCode:i,schemaType:o,def:s}=this;r.if((0,U.or)((0,U._)`${i} === undefined`,n)),e!==U.nil&&r.assign(e,!0),(o.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==U.nil&&r.assign(e,!1)),r.else()}invalid$data(){let{gen:e,schemaCode:n,schemaType:r,def:i,it:o}=this;return(0,U.or)(s(),a());function s(){if(r.length){if(!(n instanceof U.Name))throw new Error("ajv implementation error");let l=Array.isArray(r)?r:[r];return(0,U._)`${(0,jo.checkDataTypes)(l,n,o.opts.strictNumbers,jo.DataType.Wrong)}`}return U.nil}function a(){if(i.validateSchema){let l=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,U._)`!${l}(${n})`}return U.nil}}subschema(e,n){let r=(0,Qc.getSubschema)(this.it,e);(0,Qc.extendSubschemaData)(r,this.it,e),(0,Qc.extendSubschemaMode)(r,e);let i={...this.it,...r,items:void 0,props:void 0};return F0(i,n),i}mergeEvaluated(e,n){let{it:r,gen:i}=this;r.opts.unevaluated&&(r.props!==!0&&e.props!==void 0&&(r.props=Wt.mergeEvaluated.props(i,e.props,r.props,n)),r.items!==!0&&e.items!==void 0&&(r.items=Wt.mergeEvaluated.items(i,e.items,r.items,n)))}mergeValidEvaluated(e,n){let{it:r,gen:i}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return i.if(n,()=>this.mergeEvaluated(e,U.Name)),!0}};pn.KeywordCxt=Do;function Mh(t,e,n,r){let i=new Do(t,n,e);"code"in n?n.code(i,r):i.$data&&n.validate?(0,fi.funcKeywordCode)(i,n):"macro"in n?(0,fi.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,fi.funcKeywordCode)(i,n)}var tx=/^\/(?:[^~]|~0|~1)*$/,nx=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Vh(t,{dataLevel:e,dataNames:n,dataPathArr:r}){let i,o;if(t==="")return Q.default.rootData;if(t[0]==="/"){if(!tx.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=Q.default.rootData}else{let c=nx.exec(t);if(!c)throw new Error(`Invalid JSON-pointer: ${t}`);let d=+c[1];if(i=c[2],i==="#"){if(d>=e)throw new Error(l("property/index",d));return r[e-d]}if(d>e)throw new Error(l("data",d));if(o=n[e-d],!i)return o}let s=o,a=i.split("/");for(let c of a)c&&(o=(0,U._)`${o}${(0,U.getProperty)((0,Wt.unescapeJsonPointer)(c))}`,s=(0,U._)`${s} && ${o}`);return s;function l(c,d){return`Cannot access ${c} ${d} levels up, current level is ${e}`}}pn.getData=Vh});var qo=$(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});var tl=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};nl.default=tl});var mi=$(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});var rl=pi(),il=class extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,rl.resolveUrl)(e,n,r),this.missingSchema=(0,rl.normalizeId)((0,rl.getFullPath)(e,this.missingRef))}};ol.default=il});var gi=$(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.resolveSchema=ft.getCompilingSchema=ft.resolveRef=ft.compileSchema=ft.SchemaEnv=void 0;var _t=Z(),rx=qo(),kn=pt(),$t=pi(),Lh=re(),ix=hi(),ar=class{constructor(e){var n;this.refs={},this.dynamicAnchors={};let r;typeof e.schema=="object"&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(n=e.baseId)!==null&&n!==void 0?n:(0,$t.normalizeId)(r?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=r?.$async,this.refs={}}};ft.SchemaEnv=ar;function al(t){let e=jh.call(this,t);if(e)return e;let n=(0,$t.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:r,lines:i}=this.opts.code,{ownProperties:o}=this.opts,s=new _t.CodeGen(this.scope,{es5:r,lines:i,ownProperties:o}),a;t.$async&&(a=s.scopeValue("Error",{ref:rx.default,code:(0,_t._)`require("ajv/dist/runtime/validation_error").default`}));let l=s.scopeName("validate");t.validateName=l;let c={gen:s,allErrors:this.opts.allErrors,data:kn.default.data,parentData:kn.default.parentData,parentDataProperty:kn.default.parentDataProperty,dataNames:[kn.default.data],dataPathArr:[_t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,_t.stringify)(t.schema)}:{ref:t.schema}),validateName:l,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:n,baseId:t.baseId||n,schemaPath:_t.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,_t._)`""`,opts:this.opts,self:this},d;try{this._compilations.add(t),(0,ix.validateFunctionCode)(c),s.optimize(this.opts.code.optimize);let p=s.toString();d=`${s.scopeRefs(kn.default.scope)}return ${p}`,this.opts.code.process&&(d=this.opts.code.process(d,t));let m=new Function(`${kn.default.self}`,`${kn.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:p,scopeValues:s._values}),this.opts.unevaluated){let{props:g,items:y}=c;m.evaluated={props:g instanceof _t.Name?void 0:g,items:y instanceof _t.Name?void 0:y,dynamicProps:g instanceof _t.Name,dynamicItems:y instanceof _t.Name},m.source&&(m.source.evaluated=(0,_t.stringify)(m.evaluated))}return t.validate=m,t}catch(p){throw delete t.validate,delete t.validateName,d&&this.logger.error("Error compiling schema, function code:",d),p}finally{this._compilations.delete(t)}}ft.compileSchema=al;function ox(t,e,n){var r;n=(0,$t.resolveUrl)(this.opts.uriResolver,e,n);let i=t.refs[n];if(i)return i;let o=cx.call(this,t,n);if(o===void 0){let s=(r=t.localRefs)===null||r===void 0?void 0:r[n],{schemaId:a}=this.opts;s&&(o=new ar({schema:s,schemaId:a,root:t,baseId:e}))}if(o!==void 0)return t.refs[n]=sx.call(this,o)}ft.resolveRef=ox;function sx(t){return(0,$t.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:al.call(this,t)}function jh(t){for(let e of this._compilations)if(ax(e,t))return e}ft.getCompilingSchema=jh;function ax(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function cx(t,e){let n;for(;typeof(n=this.refs[e])=="string";)e=n;return n||this.schemas[e]||Fo.call(this,t,e)}function Fo(t,e){let n=this.opts.uriResolver.parse(e),r=(0,$t._getFullPath)(this.opts.uriResolver,n),i=(0,$t.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&r===i)return sl.call(this,n,t);let o=(0,$t.normalizeId)(r),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){let a=Fo.call(this,t,s);return typeof a?.schema!="object"?void 0:sl.call(this,n,a)}if(typeof s?.schema=="object"){if(s.validate||al.call(this,s),o===(0,$t.normalizeId)(e)){let{schema:a}=s,{schemaId:l}=this.opts,c=a[l];return c&&(i=(0,$t.resolveUrl)(this.opts.uriResolver,i,c)),new ar({schema:a,schemaId:l,root:t,baseId:i})}return sl.call(this,n,s)}}ft.resolveSchema=Fo;var lx=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function sl(t,{baseId:e,schema:n,root:r}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of t.fragment.slice(1).split("/")){if(typeof n=="boolean")return;let l=n[(0,Lh.unescapeFragment)(a)];if(l===void 0)return;n=l;let c=typeof n=="object"&&n[this.opts.schemaId];!lx.has(a)&&c&&(e=(0,$t.resolveUrl)(this.opts.uriResolver,e,c))}let o;if(typeof n!="boolean"&&n.$ref&&!(0,Lh.schemaHasRulesButRef)(n,this.RULES)){let a=(0,$t.resolveUrl)(this.opts.uriResolver,e,n.$ref);o=Fo.call(this,r,a)}let{schemaId:s}=this.opts;if(o=o||new ar({schema:n,schemaId:s,root:r,baseId:e}),o.schema!==o.root.schema)return o}});var Dh=$((RO,ux)=>{ux.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 ul=$((IO,Uh)=>{"use strict";var px=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Fh=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),cl=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Bh=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),dx=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function ll(t){let e="",n=0,r=0;for(r=0;r<t.length;r++)if(n=t[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";e+=t[r];break}for(r+=1;r<t.length;r++){if(n=t[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";e+=t[r]}return e}var fx=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function qh(t){return t.length=0,!0}function hx(t,e,n){if(t.length){let r=ll(t);if(r!=="")e.push(r);else return n.error=!0,!1;t.length=0}return!0}function mx(t){let e=0,n={error:!1,address:"",zone:""},r=[],i=[],o=!1,s=!1,a=hx;for(let l=0;l<t.length;l++){let c=t[l];if(!(c==="["||c==="]"))if(c===":"){if(o===!0&&(s=!0),!a(i,r,n))break;if(++e>7){n.error=!0;break}l>0&&t[l-1]===":"&&(o=!0),r.push(":");continue}else if(c==="%"){if(!a(i,r,n))break;a=qh}else{i.push(c);continue}}return i.length&&(a===qh?n.zone=i.join(""):s?r.push(i.join("")):r.push(ll(i))),n.address=r.join(""),n}function Hh(t){if(gx(t,":")<2)return{host:t,isIPV6:!1};let e=mx(t);if(e.error)return{host:t,isIPV6:!1};{let n=e.address,r=e.address;return e.zone&&(n+="%"+e.zone,r+="%25"+e.zone),{host:n,isIPV6:!0,escapedHost:r}}}function gx(t,e){let n=0;for(let r=0;r<t.length;r++)t[r]===e&&n++;return n}function yx(t){let e=t,n=[],r=-1,i=0;for(;i=e.length;){if(i===1){if(e===".")break;if(e==="/"){n.push("/");break}else{n.push(e);break}}else if(i===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){n.push("/");break}}else if(i===3&&e==="/.."){n.length!==0&&n.pop(),n.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),n.length!==0&&n.pop();continue}}if((r=e.indexOf("/",1))===-1){n.push(e);break}else n.push(e.slice(0,r)),e=e.slice(r)}return n.join("")}var wx={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},vx=/[@/?#:]/g,bx=/[@/?#]/g;function Wh(t,e){let n=e?bx:vx;return n.lastIndex=0,t.replace(n,r=>wx[r])}function _x(t,e=!1){if(t.indexOf("%")===-1)return t;let n="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let i=t.slice(r+1,r+3);if(cl(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));e&&Bh(s)?n+=s:n+="%"+o,r+=2;continue}}n+=t[r]}return n}function $x(t){let e="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){let r=t.slice(n+1,n+3);if(cl(r)){let i=r.toUpperCase(),o=String.fromCharCode(parseInt(i,16));o!=="."&&Bh(o)?e+=o:e+="%"+i,n+=2;continue}}dx(t[n])?e+=t[n]:e+=escape(t[n])}return e}function xx(t){let e="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){let r=t.slice(n+1,n+3);if(cl(r)){e+="%"+r.toUpperCase(),n+=2;continue}}e+=escape(t[n])}return e}function Sx(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let n=unescape(t.host);if(!Fh(n)){let r=Hh(n);r.isIPV6===!0?n=`[${r.escapedHost}]`:n=Wh(n,!1)}e.push(n)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}Uh.exports={nonSimpleDomain:fx,recomposeAuthority:Sx,reescapeHostDelimiters:Wh,normalizePercentEncoding:_x,normalizePathEncoding:$x,escapePreservingEscapes:xx,removeDotSegments:yx,isIPv4:Fh,isUUID:px,normalizeIPv6:Hh,stringArrayToHexStripped:ll}});var Yh=$((TO,Kh)=>{"use strict";var{isUUID:Cx}=ul(),kx=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,Ex=["http","https","ws","wss","urn","urn:uuid"];function Px(t){return Ex.indexOf(t)!==-1}function pl(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 zh(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function Gh(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 Rx(t){return t.secure=pl(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function Ix(t){if((t.port===(pl(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,n]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=n,t.resourceName=void 0}return t.fragment=void 0,t}function Tx(t,e){if(!t.path)return t.error="URN can not be parsed",t;let n=t.path.match(kx);if(n){let r=e.scheme||t.scheme||"urn";t.nid=n[1].toLowerCase(),t.nss=n[2];let i=`${r}:${e.nid||t.nid}`,o=dl(i);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function Ax(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let n=e.scheme||t.scheme||"urn",r=t.nid.toLowerCase(),i=`${n}:${e.nid||r}`,o=dl(i);o&&(t=o.serialize(t,e));let s=t,a=t.nss;return s.path=`${r||e.nid}:${a}`,e.skipEscape=!0,s}function Ox(t,e){let n=t;return n.uuid=n.nss,n.nss=void 0,!e.tolerant&&(!n.uuid||!Cx(n.uuid))&&(n.error=n.error||"UUID is not valid."),n}function Nx(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var Jh={scheme:"http",domainHost:!0,parse:zh,serialize:Gh},Mx={scheme:"https",domainHost:Jh.domainHost,parse:zh,serialize:Gh},Bo={scheme:"ws",domainHost:!0,parse:Rx,serialize:Ix},Vx={scheme:"wss",domainHost:Bo.domainHost,parse:Bo.parse,serialize:Bo.serialize},Lx={scheme:"urn",parse:Tx,serialize:Ax,skipNormalize:!0},jx={scheme:"urn:uuid",parse:Ox,serialize:Nx,skipNormalize:!0},Ho={http:Jh,https:Mx,ws:Bo,wss:Vx,urn:Lx,"urn:uuid":jx};Object.setPrototypeOf(Ho,null);function dl(t){return t&&(Ho[t]||Ho[t.toLowerCase()])||void 0}Kh.exports={wsIsSecure:pl,SCHEMES:Ho,isValidSchemeName:Px,getSchemeHandler:dl}});var nm=$((AO,Wo)=>{"use strict";var{normalizeIPv6:Dx,removeDotSegments:yi,recomposeAuthority:qx,normalizePercentEncoding:Fx,normalizePathEncoding:Bx,escapePreservingEscapes:Hx,reescapeHostDelimiters:Wx,isIPv4:Ux,nonSimpleDomain:zx}=ul(),{SCHEMES:Gx,getSchemeHandler:Qh}=Yh();function Jx(t,e){return typeof t=="string"?t=e1(t,e):typeof t=="object"&&(t=cr(En(t,e),e)),t}function Kx(t,e,n){let r=n?Object.assign({scheme:"null"},n):{scheme:"null"},i=Zh(cr(t,r),cr(e,r),r,!0);return r.skipEscape=!0,En(i,r)}function Zh(t,e,n,r){let i={};return r||(t=cr(En(t,n),n),e=cr(En(e,n),n)),n=n||{},!n.tolerant&&e.scheme?(i.scheme=e.scheme,i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=yi(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=yi(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=yi(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=yi(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 Yx(t,e,n){let r=Xh(t,n),i=Xh(e,n);return r!==void 0&&i!==void 0&&r.toLowerCase()===i.toLowerCase()}function En(t,e){let n={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},r=Object.assign({},e),i=[],o=Qh(r.scheme||n.scheme);o&&o.serialize&&o.serialize(n,r),n.path!==void 0&&(r.skipEscape?n.path=Fx(n.path):(n.path=Hx(n.path),n.scheme!==void 0&&(n.path=n.path.split("%3A").join(":")))),r.reference!=="suffix"&&n.scheme&&i.push(n.scheme,":");let s=qx(n);if(s!==void 0&&(r.reference!=="suffix"&&i.push("//"),i.push(s),n.path&&n.path[0]!=="/"&&i.push("/")),n.path!==void 0){let a=n.path;!r.absolutePath&&(!o||!o.absolutePath)&&(a=yi(a)),s===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),i.push(a)}return n.query!==void 0&&i.push("?",n.query),n.fragment!==void 0&&i.push("#",n.fragment),i.join("")}var Xx=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,Qx=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/;function Zx(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 em(t,e){let n=Object.assign({},e),r={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1,o=!1;n.reference==="suffix"&&(n.scheme?t=n.scheme+":"+t:t="//"+t);let s=t.match(Qx);s!==null&&s[1].indexOf("\\")!==-1&&(r.error="URI authority must not contain a literal backslash.",i=!0);let a=t.match(Xx);if(a){r.scheme=a[1],r.userinfo=a[3],r.host=a[4],r.port=parseInt(a[5],10),r.path=a[6]||"",r.query=a[7],r.fragment=a[8],isNaN(r.port)&&(r.port=a[5]);let l=Zx(r,a);if(l!==void 0&&(r.error=r.error||l,i=!0),r.host)if(Ux(r.host)===!1){let p=Dx(r.host);r.host=p.host.toLowerCase(),o=p.isIPV6}else o=!0;r.scheme===void 0&&r.userinfo===void 0&&r.host===void 0&&r.port===void 0&&r.query===void 0&&!r.path?r.reference="same-document":r.scheme===void 0?r.reference="relative":r.fragment===void 0?r.reference="absolute":r.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==r.reference&&(r.error=r.error||"URI is not a "+n.reference+" reference.");let c=Qh(n.scheme||r.scheme);if(!n.unicodeSupport&&(!c||!c.unicodeSupport)&&r.host&&(n.domainHost||c&&c.domainHost)&&o===!1&&zx(r.host))try{r.host=new URL("http://"+r.host).hostname}catch(d){r.error=r.error||"Host's domain name can not be converted to ASCII: "+d}if((!c||c&&!c.skipNormalize)&&(t.indexOf("%")!==-1&&(r.scheme!==void 0&&(r.scheme=unescape(r.scheme)),r.host!==void 0&&(r.host=Wx(unescape(r.host),o))),r.path&&(r.path=Bx(r.path)),r.fragment))try{r.fragment=encodeURI(decodeURIComponent(r.fragment))}catch{r.error=r.error||"URI malformed"}c&&c.parse&&c.parse(r,n)}else r.error=r.error||"URI can not be parsed.";return{parsed:r,malformedAuthorityOrPort:i}}function cr(t,e){return em(t,e).parsed}function e1(t,e){return tm(t,e).normalized}function tm(t,e){let{parsed:n,malformedAuthorityOrPort:r}=em(t,e);return{normalized:r?t:En(n,e),malformedAuthorityOrPort:r}}function Xh(t,e){if(typeof t=="string"){let{normalized:n,malformedAuthorityOrPort:r}=tm(t,e);return r?void 0:n}if(typeof t=="object")return En(t,e)}var fl={SCHEMES:Gx,normalize:Jx,resolve:Kx,resolveComponent:Zh,equal:Yx,serialize:En,parse:cr};Wo.exports=fl;Wo.exports.default=fl;Wo.exports.fastUri=fl});var im=$(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});var rm=nm();rm.code='require("ajv/dist/runtime/uri").default';hl.default=rm});var dm=$(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.CodeGen=Ae.Name=Ae.nil=Ae.stringify=Ae.str=Ae._=Ae.KeywordCxt=void 0;var t1=hi();Object.defineProperty(Ae,"KeywordCxt",{enumerable:!0,get:function(){return t1.KeywordCxt}});var lr=Z();Object.defineProperty(Ae,"_",{enumerable:!0,get:function(){return lr._}});Object.defineProperty(Ae,"str",{enumerable:!0,get:function(){return lr.str}});Object.defineProperty(Ae,"stringify",{enumerable:!0,get:function(){return lr.stringify}});Object.defineProperty(Ae,"nil",{enumerable:!0,get:function(){return lr.nil}});Object.defineProperty(Ae,"Name",{enumerable:!0,get:function(){return lr.Name}});Object.defineProperty(Ae,"CodeGen",{enumerable:!0,get:function(){return lr.CodeGen}});var n1=qo(),lm=mi(),r1=Bc(),wi=gi(),i1=Z(),vi=pi(),Uo=ui(),gl=re(),om=Dh(),o1=im(),um=(t,e)=>new RegExp(t,e);um.code="new RegExp";var s1=["removeAdditional","useDefaults","coerceTypes"],a1=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),c1={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."},l1={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},sm=200;function u1(t){var e,n,r,i,o,s,a,l,c,d,p,f,m,g,y,w,b,I,S,R,N,j,G,ie,ge;let xe=t.strict,Te=(e=t.code)===null||e===void 0?void 0:e.optimize,$e=Te===!0||Te===void 0?1:Te||0,Je=(r=(n=t.code)===null||n===void 0?void 0:n.regExp)!==null&&r!==void 0?r:um,de=(i=t.uriResolver)!==null&&i!==void 0?i:o1.default;return{strictSchema:(s=(o=t.strictSchema)!==null&&o!==void 0?o:xe)!==null&&s!==void 0?s:!0,strictNumbers:(l=(a=t.strictNumbers)!==null&&a!==void 0?a:xe)!==null&&l!==void 0?l:!0,strictTypes:(d=(c=t.strictTypes)!==null&&c!==void 0?c:xe)!==null&&d!==void 0?d:"log",strictTuples:(f=(p=t.strictTuples)!==null&&p!==void 0?p:xe)!==null&&f!==void 0?f:"log",strictRequired:(g=(m=t.strictRequired)!==null&&m!==void 0?m:xe)!==null&&g!==void 0?g:!1,code:t.code?{...t.code,optimize:$e,regExp:Je}:{optimize:$e,regExp:Je},loopRequired:(y=t.loopRequired)!==null&&y!==void 0?y:sm,loopEnum:(w=t.loopEnum)!==null&&w!==void 0?w:sm,meta:(b=t.meta)!==null&&b!==void 0?b:!0,messages:(I=t.messages)!==null&&I!==void 0?I:!0,inlineRefs:(S=t.inlineRefs)!==null&&S!==void 0?S:!0,schemaId:(R=t.schemaId)!==null&&R!==void 0?R:"$id",addUsedSchema:(N=t.addUsedSchema)!==null&&N!==void 0?N:!0,validateSchema:(j=t.validateSchema)!==null&&j!==void 0?j:!0,validateFormats:(G=t.validateFormats)!==null&&G!==void 0?G:!0,unicodeRegExp:(ie=t.unicodeRegExp)!==null&&ie!==void 0?ie:!0,int32range:(ge=t.int32range)!==null&&ge!==void 0?ge:!0,uriResolver:de}}var bi=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,...u1(e)};let{es5:n,lines:r}=this.opts.code;this.scope=new i1.ValueScope({scope:{},prefixes:a1,es5:n,lines:r}),this.logger=g1(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,r1.getRules)(),am.call(this,c1,e,"NOT SUPPORTED"),am.call(this,l1,e,"DEPRECATED","warn"),this._metaOpts=h1.call(this),e.formats&&d1.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&f1.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),p1.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:n,schemaId:r}=this.opts,i=om;r==="id"&&(i={...om},i.id=i.$id,delete i.$id),n&&e&&this.addMetaSchema(i,i[r],!1)}defaultMeta(){let{meta:e,schemaId:n}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[n]||e:void 0}validate(e,n){let r;if(typeof e=="string"){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let i=r(n);return"$async"in r||(this.errors=r.errors),i}compile(e,n){let r=this._addSchema(e,n);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,n){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return i.call(this,e,n);async function i(d,p){await o.call(this,d.$schema);let f=this._addSchema(d,p);return f.validate||s.call(this,f)}async function o(d){d&&!this.getSchema(d)&&await i.call(this,{$ref:d},!0)}async function s(d){try{return this._compileSchemaEnv(d)}catch(p){if(!(p instanceof lm.default))throw p;return a.call(this,p),await l.call(this,p.missingSchema),s.call(this,d)}}function a({missingSchema:d,missingRef:p}){if(this.refs[d])throw new Error(`AnySchema ${d} is loaded but ${p} cannot be resolved`)}async function l(d){let p=await c.call(this,d);this.refs[d]||await o.call(this,p.$schema),this.refs[d]||this.addSchema(p,d,n)}async function c(d){let p=this._loading[d];if(p)return p;try{return await(this._loading[d]=r(d))}finally{delete this._loading[d]}}}addSchema(e,n,r,i=this.opts.validateSchema){if(Array.isArray(e)){for(let s of e)this.addSchema(s,void 0,r,i);return this}let o;if(typeof e=="object"){let{schemaId:s}=this.opts;if(o=e[s],o!==void 0&&typeof o!="string")throw new Error(`schema ${s} must be string`)}return n=(0,vi.normalizeId)(n||o),this._checkUnique(n),this.schemas[n]=this._addSchema(e,r,n,i,!0),this}addMetaSchema(e,n,r=this.opts.validateSchema){return this.addSchema(e,n,!0,r),this}validateSchema(e,n){if(typeof e=="boolean")return!0;let r;if(r=e.$schema,r!==void 0&&typeof r!="string")throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(r,e);if(!i&&n){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return i}getSchema(e){let n;for(;typeof(n=cm.call(this,e))=="string";)e=n;if(n===void 0){let{schemaId:r}=this.opts,i=new wi.SchemaEnv({schema:{},schemaId:r});if(n=wi.resolveSchema.call(this,i,e),!n)return;this.refs[e]=n}return n.validate||this._compileSchemaEnv(n)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let n=cm.call(this,e);return typeof n=="object"&&this._cache.delete(n.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let n=e;this._cache.delete(n);let r=e[this.opts.schemaId];return r&&(r=(0,vi.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let n of e)this.addKeyword(n);return this}addKeyword(e,n){let r;if(typeof e=="string")r=e,typeof n=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),n.keyword=r);else if(typeof e=="object"&&n===void 0){if(n=e,r=n.keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(w1.call(this,r,n),!n)return(0,gl.eachItem)(r,o=>ml.call(this,o)),this;b1.call(this,n);let i={...n,type:(0,Uo.getJSONTypes)(n.type),schemaType:(0,Uo.getJSONTypes)(n.schemaType)};return(0,gl.eachItem)(r,i.type.length===0?o=>ml.call(this,o,i):o=>i.type.forEach(s=>ml.call(this,o,i,s))),this}getKeyword(e){let n=this.RULES.all[e];return typeof n=="object"?n.definition:!!n}removeKeyword(e){let{RULES:n}=this;delete n.keywords[e],delete n.all[e];for(let r of n.rules){let i=r.rules.findIndex(o=>o.keyword===e);i>=0&&r.rules.splice(i,1)}return this}addFormat(e,n){return typeof n=="string"&&(n=new RegExp(n)),this.formats[e]=n,this}errorsText(e=this.errors,{separator:n=", ",dataVar:r="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${r}${i.instancePath} ${i.message}`).reduce((i,o)=>i+n+o)}$dataMetaSchema(e,n){let r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of n){let o=i.split("/").slice(1),s=e;for(let a of o)s=s[a];for(let a in r){let l=r[a];if(typeof l!="object")continue;let{$data:c}=l.definition,d=s[a];c&&d&&(s[a]=pm(d))}}return e}_removeAllSchemas(e,n){for(let r in e){let i=e[r];(!n||n.test(r))&&(typeof i=="string"?delete e[r]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[r]))}}_addSchema(e,n,r,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof e=="object")s=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let l=this._cache.get(e);if(l!==void 0)return l;r=(0,vi.normalizeId)(s||r);let c=vi.getSchemaRefs.call(this,e,r);return l=new wi.SchemaEnv({schema:e,schemaId:a,meta:n,baseId:r,localRefs:c}),this._cache.set(l.schema,l),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=l),i&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):wi.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let n=this.opts;this.opts=this._metaOpts;try{wi.compileSchema.call(this,e)}finally{this.opts=n}}};bi.ValidationError=n1.default;bi.MissingRefError=lm.default;Ae.default=bi;function am(t,e,n,r="error"){for(let i in t){let o=i;o in e&&this.logger[r](`${n}: option ${i}. ${t[o]}`)}}function cm(t){return t=(0,vi.normalizeId)(t),this.schemas[t]||this.refs[t]}function p1(){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 d1(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function f1(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let n=t[e];n.keyword||(n.keyword=e),this.addKeyword(n)}}function h1(){let t={...this.opts};for(let e of s1)delete t[e];return t}var m1={log(){},warn(){},error(){}};function g1(t){if(t===!1)return m1;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 y1=/^[a-z_$][a-z0-9_$:-]*$/i;function w1(t,e){let{RULES:n}=this;if((0,gl.eachItem)(t,r=>{if(n.keywords[r])throw new Error(`Keyword ${r} is already defined`);if(!y1.test(r))throw new Error(`Keyword ${r} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function ml(t,e,n){var r;let i=e?.post;if(n&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,s=i?o.post:o.rules.find(({type:l})=>l===n);if(s||(s={type:n,rules:[]},o.rules.push(s)),o.keywords[t]=!0,!e)return;let a={keyword:t,definition:{...e,type:(0,Uo.getJSONTypes)(e.type),schemaType:(0,Uo.getJSONTypes)(e.schemaType)}};e.before?v1.call(this,s,a,e.before):s.rules.push(a),o.all[t]=a,(r=e.implements)===null||r===void 0||r.forEach(l=>this.addKeyword(l))}function v1(t,e,n){let r=t.rules.findIndex(i=>i.keyword===n);r>=0?t.rules.splice(r,0,e):(t.rules.push(e),this.logger.warn(`rule ${n} is not defined`))}function b1(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=pm(e)),t.validateSchema=this.compile(e,!0))}var _1={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function pm(t){return{anyOf:[t,_1]}}});var fm=$(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});var $1={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};yl.default=$1});var Jo=$(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.callRef=Pn.getValidate=void 0;var x1=mi(),hm=dt(),Ze=Z(),ur=pt(),mm=gi(),zo=re(),S1={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:n,it:r}=t,{baseId:i,schemaEnv:o,validateName:s,opts:a,self:l}=r,{root:c}=o;if((n==="#"||n==="#/")&&i===c.baseId)return p();let d=mm.resolveRef.call(l,c,i,n);if(d===void 0)throw new x1.default(r.opts.uriResolver,i,n);if(d instanceof mm.SchemaEnv)return f(d);return m(d);function p(){if(o===c)return Go(t,s,o,o.$async);let g=e.scopeValue("root",{ref:c});return Go(t,(0,Ze._)`${g}.validate`,c,c.$async)}function f(g){let y=gm(t,g);Go(t,y,g,g.$async)}function m(g){let y=e.scopeValue("schema",a.code.source===!0?{ref:g,code:(0,Ze.stringify)(g)}:{ref:g}),w=e.name("valid"),b=t.subschema({schema:g,dataTypes:[],schemaPath:Ze.nil,topSchemaRef:y,errSchemaPath:n},w);t.mergeEvaluated(b),t.ok(w)}}};function gm(t,e){let{gen:n}=t;return e.validate?n.scopeValue("validate",{ref:e.validate}):(0,Ze._)`${n.scopeValue("wrapper",{ref:e})}.validate`}Pn.getValidate=gm;function Go(t,e,n,r){let{gen:i,it:o}=t,{allErrors:s,schemaEnv:a,opts:l}=o,c=l.passContext?ur.default.this:Ze.nil;r?d():p();function d(){if(!a.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,Ze._)`await ${(0,hm.callValidateCode)(t,e,c)}`),m(e),s||i.assign(g,!0)},y=>{i.if((0,Ze._)`!(${y} instanceof ${o.ValidationError})`,()=>i.throw(y)),f(y),s||i.assign(g,!1)}),t.ok(g)}function p(){t.result((0,hm.callValidateCode)(t,e,c),()=>m(e),()=>f(e))}function f(g){let y=(0,Ze._)`${g}.errors`;i.assign(ur.default.vErrors,(0,Ze._)`${ur.default.vErrors} === null ? ${y} : ${ur.default.vErrors}.concat(${y})`),i.assign(ur.default.errors,(0,Ze._)`${ur.default.vErrors}.length`)}function m(g){var y;if(!o.opts.unevaluated)return;let w=(y=n?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(w&&!w.dynamicProps)w.props!==void 0&&(o.props=zo.mergeEvaluated.props(i,w.props,o.props));else{let b=i.var("props",(0,Ze._)`${g}.evaluated.props`);o.props=zo.mergeEvaluated.props(i,b,o.props,Ze.Name)}if(o.items!==!0)if(w&&!w.dynamicItems)w.items!==void 0&&(o.items=zo.mergeEvaluated.items(i,w.items,o.items));else{let b=i.var("items",(0,Ze._)`${g}.evaluated.items`);o.items=zo.mergeEvaluated.items(i,b,o.items,Ze.Name)}}}Pn.callRef=Go;Pn.default=S1});var ym=$(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});var C1=fm(),k1=Jo(),E1=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",C1.default,k1.default];wl.default=E1});var wm=$(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});var Ko=Z(),dn=Ko.operators,Yo={maximum:{okStr:"<=",ok:dn.LTE,fail:dn.GT},minimum:{okStr:">=",ok:dn.GTE,fail:dn.LT},exclusiveMaximum:{okStr:"<",ok:dn.LT,fail:dn.GTE},exclusiveMinimum:{okStr:">",ok:dn.GT,fail:dn.LTE}},P1={message:({keyword:t,schemaCode:e})=>(0,Ko.str)`must be ${Yo[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Ko._)`{comparison: ${Yo[t].okStr}, limit: ${e}}`},R1={keyword:Object.keys(Yo),type:"number",schemaType:"number",$data:!0,error:P1,code(t){let{keyword:e,data:n,schemaCode:r}=t;t.fail$data((0,Ko._)`${n} ${Yo[e].fail} ${r} || isNaN(${n})`)}};vl.default=R1});var vm=$(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});var _i=Z(),I1={message:({schemaCode:t})=>(0,_i.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,_i._)`{multipleOf: ${t}}`},T1={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:I1,code(t){let{gen:e,data:n,schemaCode:r,it:i}=t,o=i.opts.multipleOfPrecision,s=e.let("res"),a=o?(0,_i._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,_i._)`${s} !== parseInt(${s})`;t.fail$data((0,_i._)`(${r} === 0 || (${s} = ${n}/${r}, ${a}))`)}};bl.default=T1});var _m=$(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0});function bm(t){let e=t.length,n=0,r=0,i;for(;r<e;)n++,i=t.charCodeAt(r++),i>=55296&&i<=56319&&r<e&&(i=t.charCodeAt(r),(i&64512)===56320&&r++);return n}_l.default=bm;bm.code='require("ajv/dist/runtime/ucs2length").default'});var $m=$($l=>{"use strict";Object.defineProperty($l,"__esModule",{value:!0});var Rn=Z(),A1=re(),O1=_m(),N1={message({keyword:t,schemaCode:e}){let n=t==="maxLength"?"more":"fewer";return(0,Rn.str)`must NOT have ${n} than ${e} characters`},params:({schemaCode:t})=>(0,Rn._)`{limit: ${t}}`},M1={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:N1,code(t){let{keyword:e,data:n,schemaCode:r,it:i}=t,o=e==="maxLength"?Rn.operators.GT:Rn.operators.LT,s=i.opts.unicode===!1?(0,Rn._)`${n}.length`:(0,Rn._)`${(0,A1.useFunc)(t.gen,O1.default)}(${n})`;t.fail$data((0,Rn._)`${s} ${o} ${r}`)}};$l.default=M1});var xm=$(xl=>{"use strict";Object.defineProperty(xl,"__esModule",{value:!0});var V1=dt(),L1=re(),pr=Z(),j1={message:({schemaCode:t})=>(0,pr.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,pr._)`{pattern: ${t}}`},D1={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:j1,code(t){let{gen:e,data:n,$data:r,schema:i,schemaCode:o,it:s}=t,a=s.opts.unicodeRegExp?"u":"";if(r){let{regExp:l}=s.opts.code,c=l.code==="new RegExp"?(0,pr._)`new RegExp`:(0,L1.useFunc)(e,l),d=e.let("valid");e.try(()=>e.assign(d,(0,pr._)`${c}(${o}, ${a}).test(${n})`),()=>e.assign(d,!1)),t.fail$data((0,pr._)`!${d}`)}else{let l=(0,V1.usePattern)(t,i);t.fail$data((0,pr._)`!${l}.test(${n})`)}}};xl.default=D1});var Sm=$(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});var $i=Z(),q1={message({keyword:t,schemaCode:e}){let n=t==="maxProperties"?"more":"fewer";return(0,$i.str)`must NOT have ${n} than ${e} properties`},params:({schemaCode:t})=>(0,$i._)`{limit: ${t}}`},F1={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:q1,code(t){let{keyword:e,data:n,schemaCode:r}=t,i=e==="maxProperties"?$i.operators.GT:$i.operators.LT;t.fail$data((0,$i._)`Object.keys(${n}).length ${i} ${r}`)}};Sl.default=F1});var Cm=$(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});var xi=dt(),Si=Z(),B1=re(),H1={message:({params:{missingProperty:t}})=>(0,Si.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Si._)`{missingProperty: ${t}}`},W1={keyword:"required",type:"object",schemaType:"array",$data:!0,error:H1,code(t){let{gen:e,schema:n,schemaCode:r,data:i,$data:o,it:s}=t,{opts:a}=s;if(!o&&n.length===0)return;let l=n.length>=a.loopRequired;if(s.allErrors?c():d(),a.strictRequired){let m=t.parentSchema.properties,{definedProperties:g}=t.it;for(let y of n)if(m?.[y]===void 0&&!g.has(y)){let w=s.schemaEnv.baseId+s.errSchemaPath,b=`required property "${y}" is not defined at "${w}" (strictRequired)`;(0,B1.checkStrictMode)(s,b,s.opts.strictRequired)}}function c(){if(l||o)t.block$data(Si.nil,p);else for(let m of n)(0,xi.checkReportMissingProp)(t,m)}function d(){let m=e.let("missing");if(l||o){let g=e.let("valid",!0);t.block$data(g,()=>f(m,g)),t.ok(g)}else e.if((0,xi.checkMissingProp)(t,n,m)),(0,xi.reportMissingProp)(t,m),e.else()}function p(){e.forOf("prop",r,m=>{t.setParams({missingProperty:m}),e.if((0,xi.noPropertyInData)(e,i,m,a.ownProperties),()=>t.error())})}function f(m,g){t.setParams({missingProperty:m}),e.forOf(m,r,()=>{e.assign(g,(0,xi.propertyInData)(e,i,m,a.ownProperties)),e.if((0,Si.not)(g),()=>{t.error(),e.break()})},Si.nil)}}};Cl.default=W1});var km=$(kl=>{"use strict";Object.defineProperty(kl,"__esModule",{value:!0});var Ci=Z(),U1={message({keyword:t,schemaCode:e}){let n=t==="maxItems"?"more":"fewer";return(0,Ci.str)`must NOT have ${n} than ${e} items`},params:({schemaCode:t})=>(0,Ci._)`{limit: ${t}}`},z1={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:U1,code(t){let{keyword:e,data:n,schemaCode:r}=t,i=e==="maxItems"?Ci.operators.GT:Ci.operators.LT;t.fail$data((0,Ci._)`${n}.length ${i} ${r}`)}};kl.default=z1});var Xo=$(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});var Em=Yc();Em.code='require("ajv/dist/runtime/equal").default';El.default=Em});var Pm=$(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});var Pl=ui(),Oe=Z(),G1=re(),J1=Xo(),K1={message:({params:{i:t,j:e}})=>(0,Oe.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Oe._)`{i: ${t}, j: ${e}}`},Y1={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:K1,code(t){let{gen:e,data:n,$data:r,schema:i,parentSchema:o,schemaCode:s,it:a}=t;if(!r&&!i)return;let l=e.let("valid"),c=o.items?(0,Pl.getSchemaTypes)(o.items):[];t.block$data(l,d,(0,Oe._)`${s} === false`),t.ok(l);function d(){let g=e.let("i",(0,Oe._)`${n}.length`),y=e.let("j");t.setParams({i:g,j:y}),e.assign(l,!0),e.if((0,Oe._)`${g} > 1`,()=>(p()?f:m)(g,y))}function p(){return c.length>0&&!c.some(g=>g==="object"||g==="array")}function f(g,y){let w=e.name("item"),b=(0,Pl.checkDataTypes)(c,w,a.opts.strictNumbers,Pl.DataType.Wrong),I=e.const("indices",(0,Oe._)`{}`);e.for((0,Oe._)`;${g}--;`,()=>{e.let(w,(0,Oe._)`${n}[${g}]`),e.if(b,(0,Oe._)`continue`),c.length>1&&e.if((0,Oe._)`typeof ${w} == "string"`,(0,Oe._)`${w} += "_"`),e.if((0,Oe._)`typeof ${I}[${w}] == "number"`,()=>{e.assign(y,(0,Oe._)`${I}[${w}]`),t.error(),e.assign(l,!1).break()}).code((0,Oe._)`${I}[${w}] = ${g}`)})}function m(g,y){let w=(0,G1.useFunc)(e,J1.default),b=e.name("outer");e.label(b).for((0,Oe._)`;${g}--;`,()=>e.for((0,Oe._)`${y} = ${g}; ${y}--;`,()=>e.if((0,Oe._)`${w}(${n}[${g}], ${n}[${y}])`,()=>{t.error(),e.assign(l,!1).break(b)})))}}};Rl.default=Y1});var Rm=$(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});var Il=Z(),X1=re(),Q1=Xo(),Z1={message:"must be equal to constant",params:({schemaCode:t})=>(0,Il._)`{allowedValue: ${t}}`},e2={keyword:"const",$data:!0,error:Z1,code(t){let{gen:e,data:n,$data:r,schemaCode:i,schema:o}=t;r||o&&typeof o=="object"?t.fail$data((0,Il._)`!${(0,X1.useFunc)(e,Q1.default)}(${n}, ${i})`):t.fail((0,Il._)`${o} !== ${n}`)}};Tl.default=e2});var Im=$(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});var ki=Z(),t2=re(),n2=Xo(),r2={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,ki._)`{allowedValues: ${t}}`},i2={keyword:"enum",schemaType:"array",$data:!0,error:r2,code(t){let{gen:e,data:n,$data:r,schema:i,schemaCode:o,it:s}=t;if(!r&&i.length===0)throw new Error("enum must have non-empty array");let a=i.length>=s.opts.loopEnum,l,c=()=>l??(l=(0,t2.useFunc)(e,n2.default)),d;if(a||r)d=e.let("valid"),t.block$data(d,p);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=e.const("vSchema",o);d=(0,ki.or)(...i.map((g,y)=>f(m,y)))}t.pass(d);function p(){e.assign(d,!1),e.forOf("v",o,m=>e.if((0,ki._)`${c()}(${n}, ${m})`,()=>e.assign(d,!0).break()))}function f(m,g){let y=i[g];return typeof y=="object"&&y!==null?(0,ki._)`${c()}(${n}, ${m}[${g}])`:(0,ki._)`${n} === ${y}`}}};Al.default=i2});var Tm=$(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0});var o2=wm(),s2=vm(),a2=$m(),c2=xm(),l2=Sm(),u2=Cm(),p2=km(),d2=Pm(),f2=Rm(),h2=Im(),m2=[o2.default,s2.default,a2.default,c2.default,l2.default,u2.default,p2.default,d2.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f2.default,h2.default];Ol.default=m2});var Ml=$(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.validateAdditionalItems=void 0;var In=Z(),Nl=re(),g2={message:({params:{len:t}})=>(0,In.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,In._)`{limit: ${t}}`},y2={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:g2,code(t){let{parentSchema:e,it:n}=t,{items:r}=e;if(!Array.isArray(r)){(0,Nl.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}Am(t,r)}};function Am(t,e){let{gen:n,schema:r,data:i,keyword:o,it:s}=t;s.items=!0;let a=n.const("len",(0,In._)`${i}.length`);if(r===!1)t.setParams({len:e.length}),t.pass((0,In._)`${a} <= ${e.length}`);else if(typeof r=="object"&&!(0,Nl.alwaysValidSchema)(s,r)){let c=n.var("valid",(0,In._)`${a} <= ${e.length}`);n.if((0,In.not)(c),()=>l(c)),t.ok(c)}function l(c){n.forRange("i",e.length,a,d=>{t.subschema({keyword:o,dataProp:d,dataPropType:Nl.Type.Num},c),s.allErrors||n.if((0,In.not)(c),()=>n.break())})}}Ei.validateAdditionalItems=Am;Ei.default=y2});var Vl=$(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.validateTuple=void 0;var Om=Z(),Qo=re(),w2=dt(),v2={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:n}=t;if(Array.isArray(e))return Nm(t,"additionalItems",e);n.items=!0,!(0,Qo.alwaysValidSchema)(n,e)&&t.ok((0,w2.validateArray)(t))}};function Nm(t,e,n=t.schema){let{gen:r,parentSchema:i,data:o,keyword:s,it:a}=t;d(i),a.opts.unevaluated&&n.length&&a.items!==!0&&(a.items=Qo.mergeEvaluated.items(r,n.length,a.items));let l=r.name("valid"),c=r.const("len",(0,Om._)`${o}.length`);n.forEach((p,f)=>{(0,Qo.alwaysValidSchema)(a,p)||(r.if((0,Om._)`${c} > ${f}`,()=>t.subschema({keyword:s,schemaProp:f,dataProp:f},l)),t.ok(l))});function d(p){let{opts:f,errSchemaPath:m}=a,g=n.length,y=g===p.minItems&&(g===p.maxItems||p[e]===!1);if(f.strictTuples&&!y){let w=`"${s}" is ${g}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,Qo.checkStrictMode)(a,w,f.strictTuples)}}}Pi.validateTuple=Nm;Pi.default=v2});var Mm=$(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});var b2=Vl(),_2={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,b2.validateTuple)(t,"items")};Ll.default=_2});var Lm=$(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});var Vm=Z(),$2=re(),x2=dt(),S2=Ml(),C2={message:({params:{len:t}})=>(0,Vm.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Vm._)`{limit: ${t}}`},k2={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:C2,code(t){let{schema:e,parentSchema:n,it:r}=t,{prefixItems:i}=n;r.items=!0,!(0,$2.alwaysValidSchema)(r,e)&&(i?(0,S2.validateAdditionalItems)(t,i):t.ok((0,x2.validateArray)(t)))}};jl.default=k2});var jm=$(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});var ht=Z(),Zo=re(),E2={message:({params:{min:t,max:e}})=>e===void 0?(0,ht.str)`must contain at least ${t} valid item(s)`:(0,ht.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,ht._)`{minContains: ${t}}`:(0,ht._)`{minContains: ${t}, maxContains: ${e}}`},P2={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:E2,code(t){let{gen:e,schema:n,parentSchema:r,data:i,it:o}=t,s,a,{minContains:l,maxContains:c}=r;o.opts.next?(s=l===void 0?1:l,a=c):s=1;let d=e.const("len",(0,ht._)`${i}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,Zo.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,Zo.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,Zo.alwaysValidSchema)(o,n)){let y=(0,ht._)`${d} >= ${s}`;a!==void 0&&(y=(0,ht._)`${y} && ${d} <= ${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,ht._)`${i}.length > 0`,f)):(e.let(p,!1),f()),t.result(p,()=>t.reset());function f(){let y=e.name("_valid"),w=e.let("count",0);m(y,()=>e.if(y,()=>g(w)))}function m(y,w){e.forRange("i",0,d,b=>{t.subschema({keyword:"contains",dataProp:b,dataPropType:Zo.Type.Num,compositeRule:!0},y),w()})}function g(y){e.code((0,ht._)`${y}++`),a===void 0?e.if((0,ht._)`${y} >= ${s}`,()=>e.assign(p,!0).break()):(e.if((0,ht._)`${y} > ${a}`,()=>e.assign(p,!1).break()),s===1?e.assign(p,!0):e.if((0,ht._)`${y} >= ${s}`,()=>e.assign(p,!0)))}}};Dl.default=P2});var es=$(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.validateSchemaDeps=It.validatePropertyDeps=It.error=void 0;var ql=Z(),R2=re(),Ri=dt();It.error={message:({params:{property:t,depsCount:e,deps:n}})=>{let r=e===1?"property":"properties";return(0,ql.str)`must have ${r} ${n} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:n,missingProperty:r}})=>(0,ql._)`{property: ${t},
64
+ || ${s} === "boolean" || ${i} === null`).assign(a,(0,ee._)`[${i}]`)}}}function Y$({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,ee._)`${e} !== undefined`,()=>t.assign((0,ee._)`${e}[${n}]`,r))}function Wc(t,e,n,r=ir.Correct){let i=r===ir.Correct?ee.operators.EQ:ee.operators.NEQ,o;switch(t){case"null":return(0,ee._)`${e} ${i} null`;case"array":o=(0,ee._)`Array.isArray(${e})`;break;case"object":o=(0,ee._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=s((0,ee._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=s();break;default:return(0,ee._)`typeof ${e} ${i} ${t}`}return r===ir.Correct?o:(0,ee.not)(o);function s(a=ee.nil){return(0,ee.and)((0,ee._)`typeof ${e} == "number"`,a,n?(0,ee._)`isFinite(${e})`:ee.nil)}}De.checkDataType=Wc;function Uc(t,e,n,r){if(t.length===1)return Wc(t[0],e,n,r);let i,o=(0,oh.toHash)(t);if(o.array&&o.object){let s=(0,ee._)`typeof ${e} != "object"`;i=o.null?s:(0,ee._)`!${e} || ${s}`,delete o.null,delete o.array,delete o.object}else i=ee.nil;o.number&&delete o.integer;for(let s in o)i=(0,ee.and)(i,Wc(s,e,n,r));return i}De.checkDataTypes=Uc;var X$={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,ee._)`{type: ${t}}`:(0,ee._)`{type: ${e}}`};function zc(t){let e=Q$(t);(0,U$.reportError)(e,X$)}De.reportTypeError=zc;function Q$(t){let{gen:e,data:n,schema:r}=t,i=(0,oh.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:t}}});var lh=$(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.assignDefaults=void 0;var or=Z(),Z$=re();function e0(t,e){let{properties:n,items:r}=t.schema;if(e==="object"&&n)for(let i in n)ch(t,i,n[i].default);else e==="array"&&Array.isArray(r)&&r.forEach((i,o)=>ch(t,o,i.default))}Vo.assignDefaults=e0;function ch(t,e,n){let{gen:r,compositeRule:i,data:o,opts:s}=t;if(n===void 0)return;let a=(0,or._)`${o}${(0,or.getProperty)(e)}`;if(i){(0,Z$.checkStrictMode)(t,`default is ignored for: ${a}`);return}let l=(0,or._)`${a} === undefined`;s.useDefaults==="empty"&&(l=(0,or._)`${l} || ${a} === null || ${a} === ""`),r.if(l,(0,or._)`${a} = ${(0,or.stringify)(n)}`)}});var dt=$(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.validateUnion=fe.validateArray=fe.usePattern=fe.callValidateCode=fe.schemaProperties=fe.allSchemaProperties=fe.noPropertyInData=fe.propertyInData=fe.isOwnProperty=fe.hasPropFunc=fe.reportMissingProp=fe.checkMissingProp=fe.checkReportMissingProp=void 0;var ve=Z(),Gc=re(),cn=pt(),t0=re();function n0(t,e){let{gen:n,data:r,it:i}=t;n.if(Kc(n,r,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,ve._)`${e}`},!0),t.error()})}fe.checkReportMissingProp=n0;function r0({gen:t,data:e,it:{opts:n}},r,i){return(0,ve.or)(...r.map(o=>(0,ve.and)(Kc(t,e,o,n.ownProperties),(0,ve._)`${i} = ${o}`)))}fe.checkMissingProp=r0;function i0(t,e){t.setParams({missingProperty:e},!0),t.error()}fe.reportMissingProp=i0;function uh(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ve._)`Object.prototype.hasOwnProperty`})}fe.hasPropFunc=uh;function Jc(t,e,n){return(0,ve._)`${uh(t)}.call(${e}, ${n})`}fe.isOwnProperty=Jc;function o0(t,e,n,r){let i=(0,ve._)`${e}${(0,ve.getProperty)(n)} !== undefined`;return r?(0,ve._)`${i} && ${Jc(t,e,n)}`:i}fe.propertyInData=o0;function Kc(t,e,n,r){let i=(0,ve._)`${e}${(0,ve.getProperty)(n)} === undefined`;return r?(0,ve.or)(i,(0,ve.not)(Jc(t,e,n))):i}fe.noPropertyInData=Kc;function ph(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}fe.allSchemaProperties=ph;function s0(t,e){return ph(e).filter(n=>!(0,Gc.alwaysValidSchema)(t,e[n]))}fe.schemaProperties=s0;function a0({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:i,errorPath:o},it:s},a,l,c){let d=c?(0,ve._)`${t}, ${e}, ${r}${i}`:e,p=[[cn.default.instancePath,(0,ve.strConcat)(cn.default.instancePath,o)],[cn.default.parentData,s.parentData],[cn.default.parentDataProperty,s.parentDataProperty],[cn.default.rootData,cn.default.rootData]];s.opts.dynamicRef&&p.push([cn.default.dynamicAnchors,cn.default.dynamicAnchors]);let f=(0,ve._)`${d}, ${n.object(...p)}`;return l!==ve.nil?(0,ve._)`${a}.call(${l}, ${f})`:(0,ve._)`${a}(${f})`}fe.callValidateCode=a0;var c0=(0,ve._)`new RegExp`;function l0({gen:t,it:{opts:e}},n){let r=e.unicodeRegExp?"u":"",{regExp:i}=e.code,o=i(n,r);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,ve._)`${i.code==="new RegExp"?c0:(0,t0.useFunc)(t,i)}(${n}, ${r})`})}fe.usePattern=l0;function u0(t){let{gen:e,data:n,keyword:r,it:i}=t,o=e.name("valid");if(i.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(o,!0),s(()=>e.break()),o;function s(a){let l=e.const("len",(0,ve._)`${n}.length`);e.forRange("i",0,l,c=>{t.subschema({keyword:r,dataProp:c,dataPropType:Gc.Type.Num},o),e.if((0,ve.not)(o),a)})}}fe.validateArray=u0;function p0(t){let{gen:e,schema:n,keyword:r,it:i}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(l=>(0,Gc.alwaysValidSchema)(i,l))&&!i.opts.unevaluated)return;let s=e.let("valid",!1),a=e.name("_valid");e.block(()=>n.forEach((l,c)=>{let d=t.subschema({keyword:r,schemaProp:c,compositeRule:!0},a);e.assign(s,(0,ve._)`${s} || ${a}`),t.mergeValidEvaluated(d,a)||e.if((0,ve.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}fe.validateUnion=p0});var hh=$(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.validateKeywordUsage=Pt.validSchemaType=Pt.funcKeywordCode=Pt.macroKeywordCode=void 0;var We=Z(),Cn=pt(),d0=dt(),f0=li();function h0(t,e){let{gen:n,keyword:r,schema:i,parentSchema:o,it:s}=t,a=e.macro.call(s.self,i,o,s),l=fh(n,r,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let c=n.name("valid");t.subschema({schema:a,schemaPath:We.nil,errSchemaPath:`${s.errSchemaPath}/${r}`,topSchemaRef:l,compositeRule:!0},c),t.pass(c,()=>t.error(!0))}Pt.macroKeywordCode=h0;function m0(t,e){var n;let{gen:r,keyword:i,schema:o,parentSchema:s,$data:a,it:l}=t;y0(l,e);let c=!a&&e.compile?e.compile.call(l.self,o,s,l):e.validate,d=fh(r,i,c),p=r.let("valid");t.block$data(p,f),t.ok((n=e.valid)!==null&&n!==void 0?n:p);function f(){if(e.errors===!1)y(),e.modifying&&dh(t),w(()=>t.error());else{let _=e.async?m():g();e.modifying&&dh(t),w(()=>g0(t,_))}}function m(){let _=r.let("ruleErrs",null);return r.try(()=>y((0,We._)`await `),R=>r.assign(p,!1).if((0,We._)`${R} instanceof ${l.ValidationError}`,()=>r.assign(_,(0,We._)`${R}.errors`),()=>r.throw(R))),_}function g(){let _=(0,We._)`${d}.errors`;return r.assign(_,null),y(We.nil),_}function y(_=e.async?(0,We._)`await `:We.nil){let R=l.opts.passContext?Cn.default.this:Cn.default.self,x=!("compile"in e&&!a||e.schema===!1);r.assign(p,(0,We._)`${_}${(0,d0.callValidateCode)(t,d,R,x)}`,e.modifying)}function w(_){var R;r.if((0,We.not)((R=e.valid)!==null&&R!==void 0?R:p),_)}}Pt.funcKeywordCode=m0;function dh(t){let{gen:e,data:n,it:r}=t;e.if(r.parentData,()=>e.assign(n,(0,We._)`${r.parentData}[${r.parentDataProperty}]`))}function g0(t,e){let{gen:n}=t;n.if((0,We._)`Array.isArray(${e})`,()=>{n.assign(Cn.default.vErrors,(0,We._)`${Cn.default.vErrors} === null ? ${e} : ${Cn.default.vErrors}.concat(${e})`).assign(Cn.default.errors,(0,We._)`${Cn.default.vErrors}.length`),(0,f0.extendErrors)(t)},()=>t.error())}function y0({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function fh(t,e,n){if(n===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof n=="function"?{ref:n}:{ref:n,code:(0,We.stringify)(n)})}function w0(t,e,n=!1){return!e.length||e.some(r=>r==="array"?Array.isArray(t):r==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==r||n&&typeof t>"u")}Pt.validSchemaType=w0;function v0({schema:t,opts:e,self:n,errSchemaPath:r},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");let s=i.dependencies;if(s?.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[o])){let l=`keyword "${o}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")n.logger.error(l);else throw new Error(l)}}Pt.validateKeywordUsage=v0});var gh=$(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.extendSubschemaMode=ln.extendSubschemaData=ln.getSubschema=void 0;var Rt=Z(),mh=re();function b0(t,{keyword:e,schemaProp:n,schema:r,schemaPath:i,errSchemaPath:o,topSchemaRef:s}){if(e!==void 0&&r!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let a=t.schema[e];return n===void 0?{schema:a,schemaPath:(0,Rt._)`${t.schemaPath}${(0,Rt.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[n],schemaPath:(0,Rt._)`${t.schemaPath}${(0,Rt.getProperty)(e)}${(0,Rt.getProperty)(n)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,mh.escapeFragment)(n)}`}}if(r!==void 0){if(i===void 0||o===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:r,schemaPath:i,topSchemaRef:s,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}ln.getSubschema=b0;function _0(t,e,{dataProp:n,dataPropType:r,data:i,dataTypes:o,propertyName:s}){if(i!==void 0&&n!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(n!==void 0){let{errorPath:c,dataPathArr:d,opts:p}=e,f=a.let("data",(0,Rt._)`${e.data}${(0,Rt.getProperty)(n)}`,!0);l(f),t.errorPath=(0,Rt.str)`${c}${(0,mh.getErrorPath)(n,r,p.jsPropertySyntax)}`,t.parentDataProperty=(0,Rt._)`${n}`,t.dataPathArr=[...d,t.parentDataProperty]}if(i!==void 0){let c=i instanceof Rt.Name?i:a.let("data",i,!0);l(c),s!==void 0&&(t.propertyName=s)}o&&(t.dataTypes=o);function l(c){t.data=c,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,c]}}ln.extendSubschemaData=_0;function $0(t,{jtdDiscriminator:e,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:o}){r!==void 0&&(t.compositeRule=r),i!==void 0&&(t.createErrors=i),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=n}ln.extendSubschemaMode=$0});var Yc=$(($O,yh)=>{"use strict";yh.exports=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}});var vh=$((xO,wh)=>{"use strict";var un=wh.exports=function(t,e,n){typeof e=="function"&&(n=e,e={}),n=e.cb||n;var r=typeof n=="function"?n:n.pre||function(){},i=n.post||function(){};Lo(e,r,i,t,"",t)};un.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};un.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};un.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};un.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 Lo(t,e,n,r,i,o,s,a,l,c){if(r&&typeof r=="object"&&!Array.isArray(r)){e(r,i,o,s,a,l,c);for(var d in r){var p=r[d];if(Array.isArray(p)){if(d in un.arrayKeywords)for(var f=0;f<p.length;f++)Lo(t,e,n,p[f],i+"/"+d+"/"+f,o,i,d,r,f)}else if(d in un.propsKeywords){if(p&&typeof p=="object")for(var m in p)Lo(t,e,n,p[m],i+"/"+d+"/"+x0(m),o,i,d,r,m)}else(d in un.keywords||t.allKeys&&!(d in un.skipKeywords))&&Lo(t,e,n,p,i+"/"+d,o,i,d,r)}n(r,i,o,s,a,l,c)}}function x0(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var pi=$(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.getSchemaRefs=Qe.resolveUrl=Qe.normalizeId=Qe._getFullPath=Qe.getFullPath=Qe.inlineRef=void 0;var S0=re(),C0=Yc(),k0=vh(),E0=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function P0(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Xc(t):e?bh(t)<=e:!1}Qe.inlineRef=P0;var R0=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Xc(t){for(let e in t){if(R0.has(e))return!0;let n=t[e];if(Array.isArray(n)&&n.some(Xc)||typeof n=="object"&&Xc(n))return!0}return!1}function bh(t){let e=0;for(let n in t){if(n==="$ref")return 1/0;if(e++,!E0.has(n)&&(typeof t[n]=="object"&&(0,S0.eachItem)(t[n],r=>e+=bh(r)),e===1/0))return 1/0}return e}function _h(t,e="",n){n!==!1&&(e=sr(e));let r=t.parse(e);return $h(t,r)}Qe.getFullPath=_h;function $h(t,e){return t.serialize(e).split("#")[0]+"#"}Qe._getFullPath=$h;var I0=/#\/?$/;function sr(t){return t?t.replace(I0,""):""}Qe.normalizeId=sr;function T0(t,e,n){return n=sr(n),t.resolve(e,n)}Qe.resolveUrl=T0;var A0=/^[a-z_][-a-z0-9._]*$/i;function O0(t,e){if(typeof t=="boolean")return{};let{schemaId:n,uriResolver:r}=this.opts,i=sr(t[n]||e),o={"":i},s=_h(r,i,!1),a={},l=new Set;return k0(t,{allKeys:!0},(p,f,m,g)=>{if(g===void 0)return;let y=s+f,w=o[g];typeof p[n]=="string"&&(w=_.call(this,p[n])),R.call(this,p.$anchor),R.call(this,p.$dynamicAnchor),o[f]=w;function _(x){let I=this.opts.uriResolver.resolve;if(x=sr(w?I(w,x):x),l.has(x))throw d(x);l.add(x);let N=this.refs[x];return typeof N=="string"&&(N=this.refs[N]),typeof N=="object"?c(p,N.schema,x):x!==sr(y)&&(x[0]==="#"?(c(p,a[x],x),a[x]=p):this.refs[x]=y),x}function R(x){if(typeof x=="string"){if(!A0.test(x))throw new Error(`invalid anchor "${x}"`);_.call(this,`#${x}`)}}}),a;function c(p,f,m){if(f!==void 0&&!C0(p,f))throw d(m)}function d(p){return new Error(`reference "${p}" resolves to more than one schema`)}}Qe.getSchemaRefs=O0});var hi=$(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.getData=pn.KeywordCxt=pn.validateFunctionCode=void 0;var Eh=nh(),xh=ui(),Zc=Hc(),jo=ui(),N0=lh(),fi=hh(),Qc=gh(),U=Z(),Q=pt(),M0=pi(),Wt=re(),di=li();function V0(t){if(Ih(t)&&(Th(t),Rh(t))){D0(t);return}Ph(t,()=>(0,Eh.topBoolOrEmptySchema)(t))}pn.validateFunctionCode=V0;function Ph({gen:t,validateName:e,schema:n,schemaEnv:r,opts:i},o){i.code.es5?t.func(e,(0,U._)`${Q.default.data}, ${Q.default.valCxt}`,r.$async,()=>{t.code((0,U._)`"use strict"; ${Sh(n,i)}`),j0(t,i),t.code(o)}):t.func(e,(0,U._)`${Q.default.data}, ${L0(i)}`,r.$async,()=>t.code(Sh(n,i)).code(o))}function L0(t){return(0,U._)`{${Q.default.instancePath}="", ${Q.default.parentData}, ${Q.default.parentDataProperty}, ${Q.default.rootData}=${Q.default.data}${t.dynamicRef?(0,U._)`, ${Q.default.dynamicAnchors}={}`:U.nil}}={}`}function j0(t,e){t.if(Q.default.valCxt,()=>{t.var(Q.default.instancePath,(0,U._)`${Q.default.valCxt}.${Q.default.instancePath}`),t.var(Q.default.parentData,(0,U._)`${Q.default.valCxt}.${Q.default.parentData}`),t.var(Q.default.parentDataProperty,(0,U._)`${Q.default.valCxt}.${Q.default.parentDataProperty}`),t.var(Q.default.rootData,(0,U._)`${Q.default.valCxt}.${Q.default.rootData}`),e.dynamicRef&&t.var(Q.default.dynamicAnchors,(0,U._)`${Q.default.valCxt}.${Q.default.dynamicAnchors}`)},()=>{t.var(Q.default.instancePath,(0,U._)`""`),t.var(Q.default.parentData,(0,U._)`undefined`),t.var(Q.default.parentDataProperty,(0,U._)`undefined`),t.var(Q.default.rootData,Q.default.data),e.dynamicRef&&t.var(Q.default.dynamicAnchors,(0,U._)`{}`)})}function D0(t){let{schema:e,opts:n,gen:r}=t;Ph(t,()=>{n.$comment&&e.$comment&&Oh(t),W0(t),r.let(Q.default.vErrors,null),r.let(Q.default.errors,0),n.unevaluated&&q0(t),Ah(t),G0(t)})}function q0(t){let{gen:e,validateName:n}=t;t.evaluated=e.const("evaluated",(0,U._)`${n}.evaluated`),e.if((0,U._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,U._)`${t.evaluated}.props`,(0,U._)`undefined`)),e.if((0,U._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,U._)`${t.evaluated}.items`,(0,U._)`undefined`))}function Sh(t,e){let n=typeof t=="object"&&t[e.schemaId];return n&&(e.code.source||e.code.process)?(0,U._)`/*# sourceURL=${n} */`:U.nil}function F0(t,e){if(Ih(t)&&(Th(t),Rh(t))){B0(t,e);return}(0,Eh.boolOrEmptySchema)(t,e)}function Rh({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let n in t)if(e.RULES.all[n])return!0;return!1}function Ih(t){return typeof t.schema!="boolean"}function B0(t,e){let{schema:n,gen:r,opts:i}=t;i.$comment&&n.$comment&&Oh(t),U0(t),z0(t);let o=r.const("_errs",Q.default.errors);Ah(t,o),r.var(e,(0,U._)`${o} === ${Q.default.errors}`)}function Th(t){(0,Wt.checkUnknownRules)(t),H0(t)}function Ah(t,e){if(t.opts.jtd)return Ch(t,[],!1,e);let n=(0,xh.getSchemaTypes)(t.schema),r=(0,xh.coerceAndCheckDataType)(t,n);Ch(t,n,!r,e)}function H0(t){let{schema:e,errSchemaPath:n,opts:r,self:i}=t;e.$ref&&r.ignoreKeywordsWithRef&&(0,Wt.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function W0(t){let{schema:e,opts:n}=t;e.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,Wt.checkStrictMode)(t,"default is ignored in the schema root")}function U0(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,M0.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function z0(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Oh({gen:t,schemaEnv:e,schema:n,errSchemaPath:r,opts:i}){let o=n.$comment;if(i.$comment===!0)t.code((0,U._)`${Q.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let s=(0,U.str)`${r}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,U._)`${Q.default.self}.opts.$comment(${o}, ${s}, ${a}.schema)`)}}function G0(t){let{gen:e,schemaEnv:n,validateName:r,ValidationError:i,opts:o}=t;n.$async?e.if((0,U._)`${Q.default.errors} === 0`,()=>e.return(Q.default.data),()=>e.throw((0,U._)`new ${i}(${Q.default.vErrors})`)):(e.assign((0,U._)`${r}.errors`,Q.default.vErrors),o.unevaluated&&J0(t),e.return((0,U._)`${Q.default.errors} === 0`))}function J0({gen:t,evaluated:e,props:n,items:r}){n instanceof U.Name&&t.assign((0,U._)`${e}.props`,n),r instanceof U.Name&&t.assign((0,U._)`${e}.items`,r)}function Ch(t,e,n,r){let{gen:i,schema:o,data:s,allErrors:a,opts:l,self:c}=t,{RULES:d}=c;if(o.$ref&&(l.ignoreKeywordsWithRef||!(0,Wt.schemaHasRulesButRef)(o,d))){i.block(()=>Mh(t,"$ref",d.all.$ref.definition));return}l.jtd||K0(t,e),i.block(()=>{for(let f of d.rules)p(f);p(d.post)});function p(f){(0,Zc.shouldUseGroup)(o,f)&&(f.type?(i.if((0,jo.checkDataType)(f.type,s,l.strictNumbers)),kh(t,f),e.length===1&&e[0]===f.type&&n&&(i.else(),(0,jo.reportTypeError)(t)),i.endIf()):kh(t,f),a||i.if((0,U._)`${Q.default.errors} === ${r||0}`))}}function kh(t,e){let{gen:n,schema:r,opts:{useDefaults:i}}=t;i&&(0,N0.assignDefaults)(t,e.type),n.block(()=>{for(let o of e.rules)(0,Zc.shouldUseRule)(r,o)&&Mh(t,o.keyword,o.definition,e.type)})}function K0(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(Y0(t,e),t.opts.allowUnionTypes||X0(t,e),Q0(t,t.dataTypes))}function Y0(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(n=>{Nh(t.dataTypes,n)||el(t,`type "${n}" not allowed by context "${t.dataTypes.join(",")}"`)}),ex(t,e)}}function X0(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&el(t,"use allowUnionTypes to allow union type keyword")}function Q0(t,e){let n=t.self.RULES.all;for(let r in n){let i=n[r];if(typeof i=="object"&&(0,Zc.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(s=>Z0(e,s))&&el(t,`missing type "${o.join(",")}" for keyword "${r}"`)}}}function Z0(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Nh(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function ex(t,e){let n=[];for(let r of t.dataTypes)Nh(e,r)?n.push(r):e.includes("integer")&&r==="number"&&n.push("integer");t.dataTypes=n}function el(t,e){let n=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${n}" (strictTypes)`,(0,Wt.checkStrictMode)(t,e,t.opts.strictTypes)}var Do=class{constructor(e,n,r){if((0,fi.validateKeywordUsage)(e,n,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=n.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Wt.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=n.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=n,this.$data)this.schemaCode=e.gen.const("vSchema",Vh(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,fi.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(n.schemaType)}`);("code"in n?n.trackErrors:n.errors!==!1)&&(this.errsCount=e.gen.const("_errs",Q.default.errors))}result(e,n,r){this.failResult((0,U.not)(e),n,r)}failResult(e,n,r){this.gen.if(e),r?r():this.error(),n?(this.gen.else(),n(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,n){this.failResult((0,U.not)(e),void 0,n)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:n}=this;this.fail((0,U._)`${n} !== undefined && (${(0,U.or)(this.invalid$data(),e)})`)}error(e,n,r){if(n){this.setParams(n),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,n){(e?di.reportExtraError:di.reportError)(this,this.def.error,n)}$dataError(){(0,di.reportError)(this,this.def.$dataError||di.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,di.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,n){n?Object.assign(this.params,e):this.params=e}block$data(e,n,r=U.nil){this.gen.block(()=>{this.check$data(e,r),n()})}check$data(e=U.nil,n=U.nil){if(!this.$data)return;let{gen:r,schemaCode:i,schemaType:o,def:s}=this;r.if((0,U.or)((0,U._)`${i} === undefined`,n)),e!==U.nil&&r.assign(e,!0),(o.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==U.nil&&r.assign(e,!1)),r.else()}invalid$data(){let{gen:e,schemaCode:n,schemaType:r,def:i,it:o}=this;return(0,U.or)(s(),a());function s(){if(r.length){if(!(n instanceof U.Name))throw new Error("ajv implementation error");let l=Array.isArray(r)?r:[r];return(0,U._)`${(0,jo.checkDataTypes)(l,n,o.opts.strictNumbers,jo.DataType.Wrong)}`}return U.nil}function a(){if(i.validateSchema){let l=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,U._)`!${l}(${n})`}return U.nil}}subschema(e,n){let r=(0,Qc.getSubschema)(this.it,e);(0,Qc.extendSubschemaData)(r,this.it,e),(0,Qc.extendSubschemaMode)(r,e);let i={...this.it,...r,items:void 0,props:void 0};return F0(i,n),i}mergeEvaluated(e,n){let{it:r,gen:i}=this;r.opts.unevaluated&&(r.props!==!0&&e.props!==void 0&&(r.props=Wt.mergeEvaluated.props(i,e.props,r.props,n)),r.items!==!0&&e.items!==void 0&&(r.items=Wt.mergeEvaluated.items(i,e.items,r.items,n)))}mergeValidEvaluated(e,n){let{it:r,gen:i}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return i.if(n,()=>this.mergeEvaluated(e,U.Name)),!0}};pn.KeywordCxt=Do;function Mh(t,e,n,r){let i=new Do(t,n,e);"code"in n?n.code(i,r):i.$data&&n.validate?(0,fi.funcKeywordCode)(i,n):"macro"in n?(0,fi.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,fi.funcKeywordCode)(i,n)}var tx=/^\/(?:[^~]|~0|~1)*$/,nx=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Vh(t,{dataLevel:e,dataNames:n,dataPathArr:r}){let i,o;if(t==="")return Q.default.rootData;if(t[0]==="/"){if(!tx.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=Q.default.rootData}else{let c=nx.exec(t);if(!c)throw new Error(`Invalid JSON-pointer: ${t}`);let d=+c[1];if(i=c[2],i==="#"){if(d>=e)throw new Error(l("property/index",d));return r[e-d]}if(d>e)throw new Error(l("data",d));if(o=n[e-d],!i)return o}let s=o,a=i.split("/");for(let c of a)c&&(o=(0,U._)`${o}${(0,U.getProperty)((0,Wt.unescapeJsonPointer)(c))}`,s=(0,U._)`${s} && ${o}`);return s;function l(c,d){return`Cannot access ${c} ${d} levels up, current level is ${e}`}}pn.getData=Vh});var qo=$(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});var tl=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};nl.default=tl});var mi=$(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});var rl=pi(),il=class extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,rl.resolveUrl)(e,n,r),this.missingSchema=(0,rl.normalizeId)((0,rl.getFullPath)(e,this.missingRef))}};ol.default=il});var gi=$(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.resolveSchema=ft.getCompilingSchema=ft.resolveRef=ft.compileSchema=ft.SchemaEnv=void 0;var _t=Z(),rx=qo(),kn=pt(),$t=pi(),Lh=re(),ix=hi(),ar=class{constructor(e){var n;this.refs={},this.dynamicAnchors={};let r;typeof e.schema=="object"&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(n=e.baseId)!==null&&n!==void 0?n:(0,$t.normalizeId)(r?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=r?.$async,this.refs={}}};ft.SchemaEnv=ar;function al(t){let e=jh.call(this,t);if(e)return e;let n=(0,$t.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:r,lines:i}=this.opts.code,{ownProperties:o}=this.opts,s=new _t.CodeGen(this.scope,{es5:r,lines:i,ownProperties:o}),a;t.$async&&(a=s.scopeValue("Error",{ref:rx.default,code:(0,_t._)`require("ajv/dist/runtime/validation_error").default`}));let l=s.scopeName("validate");t.validateName=l;let c={gen:s,allErrors:this.opts.allErrors,data:kn.default.data,parentData:kn.default.parentData,parentDataProperty:kn.default.parentDataProperty,dataNames:[kn.default.data],dataPathArr:[_t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,_t.stringify)(t.schema)}:{ref:t.schema}),validateName:l,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:n,baseId:t.baseId||n,schemaPath:_t.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,_t._)`""`,opts:this.opts,self:this},d;try{this._compilations.add(t),(0,ix.validateFunctionCode)(c),s.optimize(this.opts.code.optimize);let p=s.toString();d=`${s.scopeRefs(kn.default.scope)}return ${p}`,this.opts.code.process&&(d=this.opts.code.process(d,t));let m=new Function(`${kn.default.self}`,`${kn.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:p,scopeValues:s._values}),this.opts.unevaluated){let{props:g,items:y}=c;m.evaluated={props:g instanceof _t.Name?void 0:g,items:y instanceof _t.Name?void 0:y,dynamicProps:g instanceof _t.Name,dynamicItems:y instanceof _t.Name},m.source&&(m.source.evaluated=(0,_t.stringify)(m.evaluated))}return t.validate=m,t}catch(p){throw delete t.validate,delete t.validateName,d&&this.logger.error("Error compiling schema, function code:",d),p}finally{this._compilations.delete(t)}}ft.compileSchema=al;function ox(t,e,n){var r;n=(0,$t.resolveUrl)(this.opts.uriResolver,e,n);let i=t.refs[n];if(i)return i;let o=cx.call(this,t,n);if(o===void 0){let s=(r=t.localRefs)===null||r===void 0?void 0:r[n],{schemaId:a}=this.opts;s&&(o=new ar({schema:s,schemaId:a,root:t,baseId:e}))}if(o!==void 0)return t.refs[n]=sx.call(this,o)}ft.resolveRef=ox;function sx(t){return(0,$t.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:al.call(this,t)}function jh(t){for(let e of this._compilations)if(ax(e,t))return e}ft.getCompilingSchema=jh;function ax(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function cx(t,e){let n;for(;typeof(n=this.refs[e])=="string";)e=n;return n||this.schemas[e]||Fo.call(this,t,e)}function Fo(t,e){let n=this.opts.uriResolver.parse(e),r=(0,$t._getFullPath)(this.opts.uriResolver,n),i=(0,$t.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&r===i)return sl.call(this,n,t);let o=(0,$t.normalizeId)(r),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){let a=Fo.call(this,t,s);return typeof a?.schema!="object"?void 0:sl.call(this,n,a)}if(typeof s?.schema=="object"){if(s.validate||al.call(this,s),o===(0,$t.normalizeId)(e)){let{schema:a}=s,{schemaId:l}=this.opts,c=a[l];return c&&(i=(0,$t.resolveUrl)(this.opts.uriResolver,i,c)),new ar({schema:a,schemaId:l,root:t,baseId:i})}return sl.call(this,n,s)}}ft.resolveSchema=Fo;var lx=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function sl(t,{baseId:e,schema:n,root:r}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of t.fragment.slice(1).split("/")){if(typeof n=="boolean")return;let l=n[(0,Lh.unescapeFragment)(a)];if(l===void 0)return;n=l;let c=typeof n=="object"&&n[this.opts.schemaId];!lx.has(a)&&c&&(e=(0,$t.resolveUrl)(this.opts.uriResolver,e,c))}let o;if(typeof n!="boolean"&&n.$ref&&!(0,Lh.schemaHasRulesButRef)(n,this.RULES)){let a=(0,$t.resolveUrl)(this.opts.uriResolver,e,n.$ref);o=Fo.call(this,r,a)}let{schemaId:s}=this.opts;if(o=o||new ar({schema:n,schemaId:s,root:r,baseId:e}),o.schema!==o.root.schema)return o}});var Dh=$((RO,ux)=>{ux.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 ul=$((IO,Uh)=>{"use strict";var px=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Fh=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),cl=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Bh=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),dx=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function ll(t){let e="",n=0,r=0;for(r=0;r<t.length;r++)if(n=t[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";e+=t[r];break}for(r+=1;r<t.length;r++){if(n=t[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";e+=t[r]}return e}var fx=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function qh(t){return t.length=0,!0}function hx(t,e,n){if(t.length){let r=ll(t);if(r!=="")e.push(r);else return n.error=!0,!1;t.length=0}return!0}function mx(t){let e=0,n={error:!1,address:"",zone:""},r=[],i=[],o=!1,s=!1,a=hx;for(let l=0;l<t.length;l++){let c=t[l];if(!(c==="["||c==="]"))if(c===":"){if(o===!0&&(s=!0),!a(i,r,n))break;if(++e>7){n.error=!0;break}l>0&&t[l-1]===":"&&(o=!0),r.push(":");continue}else if(c==="%"){if(!a(i,r,n))break;a=qh}else{i.push(c);continue}}return i.length&&(a===qh?n.zone=i.join(""):s?r.push(i.join("")):r.push(ll(i))),n.address=r.join(""),n}function Hh(t){if(gx(t,":")<2)return{host:t,isIPV6:!1};let e=mx(t);if(e.error)return{host:t,isIPV6:!1};{let n=e.address,r=e.address;return e.zone&&(n+="%"+e.zone,r+="%25"+e.zone),{host:n,isIPV6:!0,escapedHost:r}}}function gx(t,e){let n=0;for(let r=0;r<t.length;r++)t[r]===e&&n++;return n}function yx(t){let e=t,n=[],r=-1,i=0;for(;i=e.length;){if(i===1){if(e===".")break;if(e==="/"){n.push("/");break}else{n.push(e);break}}else if(i===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){n.push("/");break}}else if(i===3&&e==="/.."){n.length!==0&&n.pop(),n.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),n.length!==0&&n.pop();continue}}if((r=e.indexOf("/",1))===-1){n.push(e);break}else n.push(e.slice(0,r)),e=e.slice(r)}return n.join("")}var wx={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},vx=/[@/?#:]/g,bx=/[@/?#]/g;function Wh(t,e){let n=e?bx:vx;return n.lastIndex=0,t.replace(n,r=>wx[r])}function _x(t,e=!1){if(t.indexOf("%")===-1)return t;let n="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let i=t.slice(r+1,r+3);if(cl(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));e&&Bh(s)?n+=s:n+="%"+o,r+=2;continue}}n+=t[r]}return n}function $x(t){let e="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){let r=t.slice(n+1,n+3);if(cl(r)){let i=r.toUpperCase(),o=String.fromCharCode(parseInt(i,16));o!=="."&&Bh(o)?e+=o:e+="%"+i,n+=2;continue}}dx(t[n])?e+=t[n]:e+=escape(t[n])}return e}function xx(t){let e="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){let r=t.slice(n+1,n+3);if(cl(r)){e+="%"+r.toUpperCase(),n+=2;continue}}e+=escape(t[n])}return e}function Sx(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let n=unescape(t.host);if(!Fh(n)){let r=Hh(n);r.isIPV6===!0?n=`[${r.escapedHost}]`:n=Wh(n,!1)}e.push(n)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}Uh.exports={nonSimpleDomain:fx,recomposeAuthority:Sx,reescapeHostDelimiters:Wh,normalizePercentEncoding:_x,normalizePathEncoding:$x,escapePreservingEscapes:xx,removeDotSegments:yx,isIPv4:Fh,isUUID:px,normalizeIPv6:Hh,stringArrayToHexStripped:ll}});var Yh=$((TO,Kh)=>{"use strict";var{isUUID:Cx}=ul(),kx=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,Ex=["http","https","ws","wss","urn","urn:uuid"];function Px(t){return Ex.indexOf(t)!==-1}function pl(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 zh(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function Gh(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 Rx(t){return t.secure=pl(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function Ix(t){if((t.port===(pl(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,n]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=n,t.resourceName=void 0}return t.fragment=void 0,t}function Tx(t,e){if(!t.path)return t.error="URN can not be parsed",t;let n=t.path.match(kx);if(n){let r=e.scheme||t.scheme||"urn";t.nid=n[1].toLowerCase(),t.nss=n[2];let i=`${r}:${e.nid||t.nid}`,o=dl(i);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function Ax(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let n=e.scheme||t.scheme||"urn",r=t.nid.toLowerCase(),i=`${n}:${e.nid||r}`,o=dl(i);o&&(t=o.serialize(t,e));let s=t,a=t.nss;return s.path=`${r||e.nid}:${a}`,e.skipEscape=!0,s}function Ox(t,e){let n=t;return n.uuid=n.nss,n.nss=void 0,!e.tolerant&&(!n.uuid||!Cx(n.uuid))&&(n.error=n.error||"UUID is not valid."),n}function Nx(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var Jh={scheme:"http",domainHost:!0,parse:zh,serialize:Gh},Mx={scheme:"https",domainHost:Jh.domainHost,parse:zh,serialize:Gh},Bo={scheme:"ws",domainHost:!0,parse:Rx,serialize:Ix},Vx={scheme:"wss",domainHost:Bo.domainHost,parse:Bo.parse,serialize:Bo.serialize},Lx={scheme:"urn",parse:Tx,serialize:Ax,skipNormalize:!0},jx={scheme:"urn:uuid",parse:Ox,serialize:Nx,skipNormalize:!0},Ho={http:Jh,https:Mx,ws:Bo,wss:Vx,urn:Lx,"urn:uuid":jx};Object.setPrototypeOf(Ho,null);function dl(t){return t&&(Ho[t]||Ho[t.toLowerCase()])||void 0}Kh.exports={wsIsSecure:pl,SCHEMES:Ho,isValidSchemeName:Px,getSchemeHandler:dl}});var nm=$((AO,Wo)=>{"use strict";var{normalizeIPv6:Dx,removeDotSegments:yi,recomposeAuthority:qx,normalizePercentEncoding:Fx,normalizePathEncoding:Bx,escapePreservingEscapes:Hx,reescapeHostDelimiters:Wx,isIPv4:Ux,nonSimpleDomain:zx}=ul(),{SCHEMES:Gx,getSchemeHandler:Qh}=Yh();function Jx(t,e){return typeof t=="string"?t=e1(t,e):typeof t=="object"&&(t=cr(En(t,e),e)),t}function Kx(t,e,n){let r=n?Object.assign({scheme:"null"},n):{scheme:"null"},i=Zh(cr(t,r),cr(e,r),r,!0);return r.skipEscape=!0,En(i,r)}function Zh(t,e,n,r){let i={};return r||(t=cr(En(t,n),n),e=cr(En(e,n),n)),n=n||{},!n.tolerant&&e.scheme?(i.scheme=e.scheme,i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=yi(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=yi(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=yi(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=yi(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 Yx(t,e,n){let r=Xh(t,n),i=Xh(e,n);return r!==void 0&&i!==void 0&&r.toLowerCase()===i.toLowerCase()}function En(t,e){let n={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},r=Object.assign({},e),i=[],o=Qh(r.scheme||n.scheme);o&&o.serialize&&o.serialize(n,r),n.path!==void 0&&(r.skipEscape?n.path=Fx(n.path):(n.path=Hx(n.path),n.scheme!==void 0&&(n.path=n.path.split("%3A").join(":")))),r.reference!=="suffix"&&n.scheme&&i.push(n.scheme,":");let s=qx(n);if(s!==void 0&&(r.reference!=="suffix"&&i.push("//"),i.push(s),n.path&&n.path[0]!=="/"&&i.push("/")),n.path!==void 0){let a=n.path;!r.absolutePath&&(!o||!o.absolutePath)&&(a=yi(a)),s===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),i.push(a)}return n.query!==void 0&&i.push("?",n.query),n.fragment!==void 0&&i.push("#",n.fragment),i.join("")}var Xx=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,Qx=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/;function Zx(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 em(t,e){let n=Object.assign({},e),r={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1,o=!1;n.reference==="suffix"&&(n.scheme?t=n.scheme+":"+t:t="//"+t);let s=t.match(Qx);s!==null&&s[1].indexOf("\\")!==-1&&(r.error="URI authority must not contain a literal backslash.",i=!0);let a=t.match(Xx);if(a){r.scheme=a[1],r.userinfo=a[3],r.host=a[4],r.port=parseInt(a[5],10),r.path=a[6]||"",r.query=a[7],r.fragment=a[8],isNaN(r.port)&&(r.port=a[5]);let l=Zx(r,a);if(l!==void 0&&(r.error=r.error||l,i=!0),r.host)if(Ux(r.host)===!1){let p=Dx(r.host);r.host=p.host.toLowerCase(),o=p.isIPV6}else o=!0;r.scheme===void 0&&r.userinfo===void 0&&r.host===void 0&&r.port===void 0&&r.query===void 0&&!r.path?r.reference="same-document":r.scheme===void 0?r.reference="relative":r.fragment===void 0?r.reference="absolute":r.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==r.reference&&(r.error=r.error||"URI is not a "+n.reference+" reference.");let c=Qh(n.scheme||r.scheme);if(!n.unicodeSupport&&(!c||!c.unicodeSupport)&&r.host&&(n.domainHost||c&&c.domainHost)&&o===!1&&zx(r.host))try{r.host=new URL("http://"+r.host).hostname}catch(d){r.error=r.error||"Host's domain name can not be converted to ASCII: "+d}if((!c||c&&!c.skipNormalize)&&(t.indexOf("%")!==-1&&(r.scheme!==void 0&&(r.scheme=unescape(r.scheme)),r.host!==void 0&&(r.host=Wx(unescape(r.host),o))),r.path&&(r.path=Bx(r.path)),r.fragment))try{r.fragment=encodeURI(decodeURIComponent(r.fragment))}catch{r.error=r.error||"URI malformed"}c&&c.parse&&c.parse(r,n)}else r.error=r.error||"URI can not be parsed.";return{parsed:r,malformedAuthorityOrPort:i}}function cr(t,e){return em(t,e).parsed}function e1(t,e){return tm(t,e).normalized}function tm(t,e){let{parsed:n,malformedAuthorityOrPort:r}=em(t,e);return{normalized:r?t:En(n,e),malformedAuthorityOrPort:r}}function Xh(t,e){if(typeof t=="string"){let{normalized:n,malformedAuthorityOrPort:r}=tm(t,e);return r?void 0:n}if(typeof t=="object")return En(t,e)}var fl={SCHEMES:Gx,normalize:Jx,resolve:Kx,resolveComponent:Zh,equal:Yx,serialize:En,parse:cr};Wo.exports=fl;Wo.exports.default=fl;Wo.exports.fastUri=fl});var im=$(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});var rm=nm();rm.code='require("ajv/dist/runtime/uri").default';hl.default=rm});var dm=$(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.CodeGen=Ae.Name=Ae.nil=Ae.stringify=Ae.str=Ae._=Ae.KeywordCxt=void 0;var t1=hi();Object.defineProperty(Ae,"KeywordCxt",{enumerable:!0,get:function(){return t1.KeywordCxt}});var lr=Z();Object.defineProperty(Ae,"_",{enumerable:!0,get:function(){return lr._}});Object.defineProperty(Ae,"str",{enumerable:!0,get:function(){return lr.str}});Object.defineProperty(Ae,"stringify",{enumerable:!0,get:function(){return lr.stringify}});Object.defineProperty(Ae,"nil",{enumerable:!0,get:function(){return lr.nil}});Object.defineProperty(Ae,"Name",{enumerable:!0,get:function(){return lr.Name}});Object.defineProperty(Ae,"CodeGen",{enumerable:!0,get:function(){return lr.CodeGen}});var n1=qo(),lm=mi(),r1=Bc(),wi=gi(),i1=Z(),vi=pi(),Uo=ui(),gl=re(),om=Dh(),o1=im(),um=(t,e)=>new RegExp(t,e);um.code="new RegExp";var s1=["removeAdditional","useDefaults","coerceTypes"],a1=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),c1={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."},l1={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},sm=200;function u1(t){var e,n,r,i,o,s,a,l,c,d,p,f,m,g,y,w,_,R,x,I,N,j,G,ie,ge;let xe=t.strict,Te=(e=t.code)===null||e===void 0?void 0:e.optimize,$e=Te===!0||Te===void 0?1:Te||0,Je=(r=(n=t.code)===null||n===void 0?void 0:n.regExp)!==null&&r!==void 0?r:um,de=(i=t.uriResolver)!==null&&i!==void 0?i:o1.default;return{strictSchema:(s=(o=t.strictSchema)!==null&&o!==void 0?o:xe)!==null&&s!==void 0?s:!0,strictNumbers:(l=(a=t.strictNumbers)!==null&&a!==void 0?a:xe)!==null&&l!==void 0?l:!0,strictTypes:(d=(c=t.strictTypes)!==null&&c!==void 0?c:xe)!==null&&d!==void 0?d:"log",strictTuples:(f=(p=t.strictTuples)!==null&&p!==void 0?p:xe)!==null&&f!==void 0?f:"log",strictRequired:(g=(m=t.strictRequired)!==null&&m!==void 0?m:xe)!==null&&g!==void 0?g:!1,code:t.code?{...t.code,optimize:$e,regExp:Je}:{optimize:$e,regExp:Je},loopRequired:(y=t.loopRequired)!==null&&y!==void 0?y:sm,loopEnum:(w=t.loopEnum)!==null&&w!==void 0?w:sm,meta:(_=t.meta)!==null&&_!==void 0?_:!0,messages:(R=t.messages)!==null&&R!==void 0?R:!0,inlineRefs:(x=t.inlineRefs)!==null&&x!==void 0?x:!0,schemaId:(I=t.schemaId)!==null&&I!==void 0?I:"$id",addUsedSchema:(N=t.addUsedSchema)!==null&&N!==void 0?N:!0,validateSchema:(j=t.validateSchema)!==null&&j!==void 0?j:!0,validateFormats:(G=t.validateFormats)!==null&&G!==void 0?G:!0,unicodeRegExp:(ie=t.unicodeRegExp)!==null&&ie!==void 0?ie:!0,int32range:(ge=t.int32range)!==null&&ge!==void 0?ge:!0,uriResolver:de}}var bi=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,...u1(e)};let{es5:n,lines:r}=this.opts.code;this.scope=new i1.ValueScope({scope:{},prefixes:a1,es5:n,lines:r}),this.logger=g1(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,r1.getRules)(),am.call(this,c1,e,"NOT SUPPORTED"),am.call(this,l1,e,"DEPRECATED","warn"),this._metaOpts=h1.call(this),e.formats&&d1.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&f1.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),p1.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:n,schemaId:r}=this.opts,i=om;r==="id"&&(i={...om},i.id=i.$id,delete i.$id),n&&e&&this.addMetaSchema(i,i[r],!1)}defaultMeta(){let{meta:e,schemaId:n}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[n]||e:void 0}validate(e,n){let r;if(typeof e=="string"){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let i=r(n);return"$async"in r||(this.errors=r.errors),i}compile(e,n){let r=this._addSchema(e,n);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,n){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return i.call(this,e,n);async function i(d,p){await o.call(this,d.$schema);let f=this._addSchema(d,p);return f.validate||s.call(this,f)}async function o(d){d&&!this.getSchema(d)&&await i.call(this,{$ref:d},!0)}async function s(d){try{return this._compileSchemaEnv(d)}catch(p){if(!(p instanceof lm.default))throw p;return a.call(this,p),await l.call(this,p.missingSchema),s.call(this,d)}}function a({missingSchema:d,missingRef:p}){if(this.refs[d])throw new Error(`AnySchema ${d} is loaded but ${p} cannot be resolved`)}async function l(d){let p=await c.call(this,d);this.refs[d]||await o.call(this,p.$schema),this.refs[d]||this.addSchema(p,d,n)}async function c(d){let p=this._loading[d];if(p)return p;try{return await(this._loading[d]=r(d))}finally{delete this._loading[d]}}}addSchema(e,n,r,i=this.opts.validateSchema){if(Array.isArray(e)){for(let s of e)this.addSchema(s,void 0,r,i);return this}let o;if(typeof e=="object"){let{schemaId:s}=this.opts;if(o=e[s],o!==void 0&&typeof o!="string")throw new Error(`schema ${s} must be string`)}return n=(0,vi.normalizeId)(n||o),this._checkUnique(n),this.schemas[n]=this._addSchema(e,r,n,i,!0),this}addMetaSchema(e,n,r=this.opts.validateSchema){return this.addSchema(e,n,!0,r),this}validateSchema(e,n){if(typeof e=="boolean")return!0;let r;if(r=e.$schema,r!==void 0&&typeof r!="string")throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(r,e);if(!i&&n){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return i}getSchema(e){let n;for(;typeof(n=cm.call(this,e))=="string";)e=n;if(n===void 0){let{schemaId:r}=this.opts,i=new wi.SchemaEnv({schema:{},schemaId:r});if(n=wi.resolveSchema.call(this,i,e),!n)return;this.refs[e]=n}return n.validate||this._compileSchemaEnv(n)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let n=cm.call(this,e);return typeof n=="object"&&this._cache.delete(n.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let n=e;this._cache.delete(n);let r=e[this.opts.schemaId];return r&&(r=(0,vi.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let n of e)this.addKeyword(n);return this}addKeyword(e,n){let r;if(typeof e=="string")r=e,typeof n=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),n.keyword=r);else if(typeof e=="object"&&n===void 0){if(n=e,r=n.keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(w1.call(this,r,n),!n)return(0,gl.eachItem)(r,o=>ml.call(this,o)),this;b1.call(this,n);let i={...n,type:(0,Uo.getJSONTypes)(n.type),schemaType:(0,Uo.getJSONTypes)(n.schemaType)};return(0,gl.eachItem)(r,i.type.length===0?o=>ml.call(this,o,i):o=>i.type.forEach(s=>ml.call(this,o,i,s))),this}getKeyword(e){let n=this.RULES.all[e];return typeof n=="object"?n.definition:!!n}removeKeyword(e){let{RULES:n}=this;delete n.keywords[e],delete n.all[e];for(let r of n.rules){let i=r.rules.findIndex(o=>o.keyword===e);i>=0&&r.rules.splice(i,1)}return this}addFormat(e,n){return typeof n=="string"&&(n=new RegExp(n)),this.formats[e]=n,this}errorsText(e=this.errors,{separator:n=", ",dataVar:r="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${r}${i.instancePath} ${i.message}`).reduce((i,o)=>i+n+o)}$dataMetaSchema(e,n){let r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of n){let o=i.split("/").slice(1),s=e;for(let a of o)s=s[a];for(let a in r){let l=r[a];if(typeof l!="object")continue;let{$data:c}=l.definition,d=s[a];c&&d&&(s[a]=pm(d))}}return e}_removeAllSchemas(e,n){for(let r in e){let i=e[r];(!n||n.test(r))&&(typeof i=="string"?delete e[r]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[r]))}}_addSchema(e,n,r,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof e=="object")s=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let l=this._cache.get(e);if(l!==void 0)return l;r=(0,vi.normalizeId)(s||r);let c=vi.getSchemaRefs.call(this,e,r);return l=new wi.SchemaEnv({schema:e,schemaId:a,meta:n,baseId:r,localRefs:c}),this._cache.set(l.schema,l),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=l),i&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):wi.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let n=this.opts;this.opts=this._metaOpts;try{wi.compileSchema.call(this,e)}finally{this.opts=n}}};bi.ValidationError=n1.default;bi.MissingRefError=lm.default;Ae.default=bi;function am(t,e,n,r="error"){for(let i in t){let o=i;o in e&&this.logger[r](`${n}: option ${i}. ${t[o]}`)}}function cm(t){return t=(0,vi.normalizeId)(t),this.schemas[t]||this.refs[t]}function p1(){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 d1(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function f1(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let n=t[e];n.keyword||(n.keyword=e),this.addKeyword(n)}}function h1(){let t={...this.opts};for(let e of s1)delete t[e];return t}var m1={log(){},warn(){},error(){}};function g1(t){if(t===!1)return m1;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 y1=/^[a-z_$][a-z0-9_$:-]*$/i;function w1(t,e){let{RULES:n}=this;if((0,gl.eachItem)(t,r=>{if(n.keywords[r])throw new Error(`Keyword ${r} is already defined`);if(!y1.test(r))throw new Error(`Keyword ${r} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function ml(t,e,n){var r;let i=e?.post;if(n&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,s=i?o.post:o.rules.find(({type:l})=>l===n);if(s||(s={type:n,rules:[]},o.rules.push(s)),o.keywords[t]=!0,!e)return;let a={keyword:t,definition:{...e,type:(0,Uo.getJSONTypes)(e.type),schemaType:(0,Uo.getJSONTypes)(e.schemaType)}};e.before?v1.call(this,s,a,e.before):s.rules.push(a),o.all[t]=a,(r=e.implements)===null||r===void 0||r.forEach(l=>this.addKeyword(l))}function v1(t,e,n){let r=t.rules.findIndex(i=>i.keyword===n);r>=0?t.rules.splice(r,0,e):(t.rules.push(e),this.logger.warn(`rule ${n} is not defined`))}function b1(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=pm(e)),t.validateSchema=this.compile(e,!0))}var _1={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function pm(t){return{anyOf:[t,_1]}}});var fm=$(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});var $1={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};yl.default=$1});var Jo=$(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.callRef=Pn.getValidate=void 0;var x1=mi(),hm=dt(),Ze=Z(),ur=pt(),mm=gi(),zo=re(),S1={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:n,it:r}=t,{baseId:i,schemaEnv:o,validateName:s,opts:a,self:l}=r,{root:c}=o;if((n==="#"||n==="#/")&&i===c.baseId)return p();let d=mm.resolveRef.call(l,c,i,n);if(d===void 0)throw new x1.default(r.opts.uriResolver,i,n);if(d instanceof mm.SchemaEnv)return f(d);return m(d);function p(){if(o===c)return Go(t,s,o,o.$async);let g=e.scopeValue("root",{ref:c});return Go(t,(0,Ze._)`${g}.validate`,c,c.$async)}function f(g){let y=gm(t,g);Go(t,y,g,g.$async)}function m(g){let y=e.scopeValue("schema",a.code.source===!0?{ref:g,code:(0,Ze.stringify)(g)}:{ref:g}),w=e.name("valid"),_=t.subschema({schema:g,dataTypes:[],schemaPath:Ze.nil,topSchemaRef:y,errSchemaPath:n},w);t.mergeEvaluated(_),t.ok(w)}}};function gm(t,e){let{gen:n}=t;return e.validate?n.scopeValue("validate",{ref:e.validate}):(0,Ze._)`${n.scopeValue("wrapper",{ref:e})}.validate`}Pn.getValidate=gm;function Go(t,e,n,r){let{gen:i,it:o}=t,{allErrors:s,schemaEnv:a,opts:l}=o,c=l.passContext?ur.default.this:Ze.nil;r?d():p();function d(){if(!a.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,Ze._)`await ${(0,hm.callValidateCode)(t,e,c)}`),m(e),s||i.assign(g,!0)},y=>{i.if((0,Ze._)`!(${y} instanceof ${o.ValidationError})`,()=>i.throw(y)),f(y),s||i.assign(g,!1)}),t.ok(g)}function p(){t.result((0,hm.callValidateCode)(t,e,c),()=>m(e),()=>f(e))}function f(g){let y=(0,Ze._)`${g}.errors`;i.assign(ur.default.vErrors,(0,Ze._)`${ur.default.vErrors} === null ? ${y} : ${ur.default.vErrors}.concat(${y})`),i.assign(ur.default.errors,(0,Ze._)`${ur.default.vErrors}.length`)}function m(g){var y;if(!o.opts.unevaluated)return;let w=(y=n?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(w&&!w.dynamicProps)w.props!==void 0&&(o.props=zo.mergeEvaluated.props(i,w.props,o.props));else{let _=i.var("props",(0,Ze._)`${g}.evaluated.props`);o.props=zo.mergeEvaluated.props(i,_,o.props,Ze.Name)}if(o.items!==!0)if(w&&!w.dynamicItems)w.items!==void 0&&(o.items=zo.mergeEvaluated.items(i,w.items,o.items));else{let _=i.var("items",(0,Ze._)`${g}.evaluated.items`);o.items=zo.mergeEvaluated.items(i,_,o.items,Ze.Name)}}}Pn.callRef=Go;Pn.default=S1});var ym=$(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});var C1=fm(),k1=Jo(),E1=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",C1.default,k1.default];wl.default=E1});var wm=$(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});var Ko=Z(),dn=Ko.operators,Yo={maximum:{okStr:"<=",ok:dn.LTE,fail:dn.GT},minimum:{okStr:">=",ok:dn.GTE,fail:dn.LT},exclusiveMaximum:{okStr:"<",ok:dn.LT,fail:dn.GTE},exclusiveMinimum:{okStr:">",ok:dn.GT,fail:dn.LTE}},P1={message:({keyword:t,schemaCode:e})=>(0,Ko.str)`must be ${Yo[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Ko._)`{comparison: ${Yo[t].okStr}, limit: ${e}}`},R1={keyword:Object.keys(Yo),type:"number",schemaType:"number",$data:!0,error:P1,code(t){let{keyword:e,data:n,schemaCode:r}=t;t.fail$data((0,Ko._)`${n} ${Yo[e].fail} ${r} || isNaN(${n})`)}};vl.default=R1});var vm=$(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});var _i=Z(),I1={message:({schemaCode:t})=>(0,_i.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,_i._)`{multipleOf: ${t}}`},T1={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:I1,code(t){let{gen:e,data:n,schemaCode:r,it:i}=t,o=i.opts.multipleOfPrecision,s=e.let("res"),a=o?(0,_i._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,_i._)`${s} !== parseInt(${s})`;t.fail$data((0,_i._)`(${r} === 0 || (${s} = ${n}/${r}, ${a}))`)}};bl.default=T1});var _m=$(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0});function bm(t){let e=t.length,n=0,r=0,i;for(;r<e;)n++,i=t.charCodeAt(r++),i>=55296&&i<=56319&&r<e&&(i=t.charCodeAt(r),(i&64512)===56320&&r++);return n}_l.default=bm;bm.code='require("ajv/dist/runtime/ucs2length").default'});var $m=$($l=>{"use strict";Object.defineProperty($l,"__esModule",{value:!0});var Rn=Z(),A1=re(),O1=_m(),N1={message({keyword:t,schemaCode:e}){let n=t==="maxLength"?"more":"fewer";return(0,Rn.str)`must NOT have ${n} than ${e} characters`},params:({schemaCode:t})=>(0,Rn._)`{limit: ${t}}`},M1={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:N1,code(t){let{keyword:e,data:n,schemaCode:r,it:i}=t,o=e==="maxLength"?Rn.operators.GT:Rn.operators.LT,s=i.opts.unicode===!1?(0,Rn._)`${n}.length`:(0,Rn._)`${(0,A1.useFunc)(t.gen,O1.default)}(${n})`;t.fail$data((0,Rn._)`${s} ${o} ${r}`)}};$l.default=M1});var xm=$(xl=>{"use strict";Object.defineProperty(xl,"__esModule",{value:!0});var V1=dt(),L1=re(),pr=Z(),j1={message:({schemaCode:t})=>(0,pr.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,pr._)`{pattern: ${t}}`},D1={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:j1,code(t){let{gen:e,data:n,$data:r,schema:i,schemaCode:o,it:s}=t,a=s.opts.unicodeRegExp?"u":"";if(r){let{regExp:l}=s.opts.code,c=l.code==="new RegExp"?(0,pr._)`new RegExp`:(0,L1.useFunc)(e,l),d=e.let("valid");e.try(()=>e.assign(d,(0,pr._)`${c}(${o}, ${a}).test(${n})`),()=>e.assign(d,!1)),t.fail$data((0,pr._)`!${d}`)}else{let l=(0,V1.usePattern)(t,i);t.fail$data((0,pr._)`!${l}.test(${n})`)}}};xl.default=D1});var Sm=$(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});var $i=Z(),q1={message({keyword:t,schemaCode:e}){let n=t==="maxProperties"?"more":"fewer";return(0,$i.str)`must NOT have ${n} than ${e} properties`},params:({schemaCode:t})=>(0,$i._)`{limit: ${t}}`},F1={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:q1,code(t){let{keyword:e,data:n,schemaCode:r}=t,i=e==="maxProperties"?$i.operators.GT:$i.operators.LT;t.fail$data((0,$i._)`Object.keys(${n}).length ${i} ${r}`)}};Sl.default=F1});var Cm=$(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});var xi=dt(),Si=Z(),B1=re(),H1={message:({params:{missingProperty:t}})=>(0,Si.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Si._)`{missingProperty: ${t}}`},W1={keyword:"required",type:"object",schemaType:"array",$data:!0,error:H1,code(t){let{gen:e,schema:n,schemaCode:r,data:i,$data:o,it:s}=t,{opts:a}=s;if(!o&&n.length===0)return;let l=n.length>=a.loopRequired;if(s.allErrors?c():d(),a.strictRequired){let m=t.parentSchema.properties,{definedProperties:g}=t.it;for(let y of n)if(m?.[y]===void 0&&!g.has(y)){let w=s.schemaEnv.baseId+s.errSchemaPath,_=`required property "${y}" is not defined at "${w}" (strictRequired)`;(0,B1.checkStrictMode)(s,_,s.opts.strictRequired)}}function c(){if(l||o)t.block$data(Si.nil,p);else for(let m of n)(0,xi.checkReportMissingProp)(t,m)}function d(){let m=e.let("missing");if(l||o){let g=e.let("valid",!0);t.block$data(g,()=>f(m,g)),t.ok(g)}else e.if((0,xi.checkMissingProp)(t,n,m)),(0,xi.reportMissingProp)(t,m),e.else()}function p(){e.forOf("prop",r,m=>{t.setParams({missingProperty:m}),e.if((0,xi.noPropertyInData)(e,i,m,a.ownProperties),()=>t.error())})}function f(m,g){t.setParams({missingProperty:m}),e.forOf(m,r,()=>{e.assign(g,(0,xi.propertyInData)(e,i,m,a.ownProperties)),e.if((0,Si.not)(g),()=>{t.error(),e.break()})},Si.nil)}}};Cl.default=W1});var km=$(kl=>{"use strict";Object.defineProperty(kl,"__esModule",{value:!0});var Ci=Z(),U1={message({keyword:t,schemaCode:e}){let n=t==="maxItems"?"more":"fewer";return(0,Ci.str)`must NOT have ${n} than ${e} items`},params:({schemaCode:t})=>(0,Ci._)`{limit: ${t}}`},z1={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:U1,code(t){let{keyword:e,data:n,schemaCode:r}=t,i=e==="maxItems"?Ci.operators.GT:Ci.operators.LT;t.fail$data((0,Ci._)`${n}.length ${i} ${r}`)}};kl.default=z1});var Xo=$(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});var Em=Yc();Em.code='require("ajv/dist/runtime/equal").default';El.default=Em});var Pm=$(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});var Pl=ui(),Oe=Z(),G1=re(),J1=Xo(),K1={message:({params:{i:t,j:e}})=>(0,Oe.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Oe._)`{i: ${t}, j: ${e}}`},Y1={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:K1,code(t){let{gen:e,data:n,$data:r,schema:i,parentSchema:o,schemaCode:s,it:a}=t;if(!r&&!i)return;let l=e.let("valid"),c=o.items?(0,Pl.getSchemaTypes)(o.items):[];t.block$data(l,d,(0,Oe._)`${s} === false`),t.ok(l);function d(){let g=e.let("i",(0,Oe._)`${n}.length`),y=e.let("j");t.setParams({i:g,j:y}),e.assign(l,!0),e.if((0,Oe._)`${g} > 1`,()=>(p()?f:m)(g,y))}function p(){return c.length>0&&!c.some(g=>g==="object"||g==="array")}function f(g,y){let w=e.name("item"),_=(0,Pl.checkDataTypes)(c,w,a.opts.strictNumbers,Pl.DataType.Wrong),R=e.const("indices",(0,Oe._)`{}`);e.for((0,Oe._)`;${g}--;`,()=>{e.let(w,(0,Oe._)`${n}[${g}]`),e.if(_,(0,Oe._)`continue`),c.length>1&&e.if((0,Oe._)`typeof ${w} == "string"`,(0,Oe._)`${w} += "_"`),e.if((0,Oe._)`typeof ${R}[${w}] == "number"`,()=>{e.assign(y,(0,Oe._)`${R}[${w}]`),t.error(),e.assign(l,!1).break()}).code((0,Oe._)`${R}[${w}] = ${g}`)})}function m(g,y){let w=(0,G1.useFunc)(e,J1.default),_=e.name("outer");e.label(_).for((0,Oe._)`;${g}--;`,()=>e.for((0,Oe._)`${y} = ${g}; ${y}--;`,()=>e.if((0,Oe._)`${w}(${n}[${g}], ${n}[${y}])`,()=>{t.error(),e.assign(l,!1).break(_)})))}}};Rl.default=Y1});var Rm=$(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});var Il=Z(),X1=re(),Q1=Xo(),Z1={message:"must be equal to constant",params:({schemaCode:t})=>(0,Il._)`{allowedValue: ${t}}`},e2={keyword:"const",$data:!0,error:Z1,code(t){let{gen:e,data:n,$data:r,schemaCode:i,schema:o}=t;r||o&&typeof o=="object"?t.fail$data((0,Il._)`!${(0,X1.useFunc)(e,Q1.default)}(${n}, ${i})`):t.fail((0,Il._)`${o} !== ${n}`)}};Tl.default=e2});var Im=$(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});var ki=Z(),t2=re(),n2=Xo(),r2={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,ki._)`{allowedValues: ${t}}`},i2={keyword:"enum",schemaType:"array",$data:!0,error:r2,code(t){let{gen:e,data:n,$data:r,schema:i,schemaCode:o,it:s}=t;if(!r&&i.length===0)throw new Error("enum must have non-empty array");let a=i.length>=s.opts.loopEnum,l,c=()=>l??(l=(0,t2.useFunc)(e,n2.default)),d;if(a||r)d=e.let("valid"),t.block$data(d,p);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=e.const("vSchema",o);d=(0,ki.or)(...i.map((g,y)=>f(m,y)))}t.pass(d);function p(){e.assign(d,!1),e.forOf("v",o,m=>e.if((0,ki._)`${c()}(${n}, ${m})`,()=>e.assign(d,!0).break()))}function f(m,g){let y=i[g];return typeof y=="object"&&y!==null?(0,ki._)`${c()}(${n}, ${m}[${g}])`:(0,ki._)`${n} === ${y}`}}};Al.default=i2});var Tm=$(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0});var o2=wm(),s2=vm(),a2=$m(),c2=xm(),l2=Sm(),u2=Cm(),p2=km(),d2=Pm(),f2=Rm(),h2=Im(),m2=[o2.default,s2.default,a2.default,c2.default,l2.default,u2.default,p2.default,d2.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f2.default,h2.default];Ol.default=m2});var Ml=$(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.validateAdditionalItems=void 0;var In=Z(),Nl=re(),g2={message:({params:{len:t}})=>(0,In.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,In._)`{limit: ${t}}`},y2={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:g2,code(t){let{parentSchema:e,it:n}=t,{items:r}=e;if(!Array.isArray(r)){(0,Nl.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}Am(t,r)}};function Am(t,e){let{gen:n,schema:r,data:i,keyword:o,it:s}=t;s.items=!0;let a=n.const("len",(0,In._)`${i}.length`);if(r===!1)t.setParams({len:e.length}),t.pass((0,In._)`${a} <= ${e.length}`);else if(typeof r=="object"&&!(0,Nl.alwaysValidSchema)(s,r)){let c=n.var("valid",(0,In._)`${a} <= ${e.length}`);n.if((0,In.not)(c),()=>l(c)),t.ok(c)}function l(c){n.forRange("i",e.length,a,d=>{t.subschema({keyword:o,dataProp:d,dataPropType:Nl.Type.Num},c),s.allErrors||n.if((0,In.not)(c),()=>n.break())})}}Ei.validateAdditionalItems=Am;Ei.default=y2});var Vl=$(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.validateTuple=void 0;var Om=Z(),Qo=re(),w2=dt(),v2={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:n}=t;if(Array.isArray(e))return Nm(t,"additionalItems",e);n.items=!0,!(0,Qo.alwaysValidSchema)(n,e)&&t.ok((0,w2.validateArray)(t))}};function Nm(t,e,n=t.schema){let{gen:r,parentSchema:i,data:o,keyword:s,it:a}=t;d(i),a.opts.unevaluated&&n.length&&a.items!==!0&&(a.items=Qo.mergeEvaluated.items(r,n.length,a.items));let l=r.name("valid"),c=r.const("len",(0,Om._)`${o}.length`);n.forEach((p,f)=>{(0,Qo.alwaysValidSchema)(a,p)||(r.if((0,Om._)`${c} > ${f}`,()=>t.subschema({keyword:s,schemaProp:f,dataProp:f},l)),t.ok(l))});function d(p){let{opts:f,errSchemaPath:m}=a,g=n.length,y=g===p.minItems&&(g===p.maxItems||p[e]===!1);if(f.strictTuples&&!y){let w=`"${s}" is ${g}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,Qo.checkStrictMode)(a,w,f.strictTuples)}}}Pi.validateTuple=Nm;Pi.default=v2});var Mm=$(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});var b2=Vl(),_2={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,b2.validateTuple)(t,"items")};Ll.default=_2});var Lm=$(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});var Vm=Z(),$2=re(),x2=dt(),S2=Ml(),C2={message:({params:{len:t}})=>(0,Vm.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Vm._)`{limit: ${t}}`},k2={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:C2,code(t){let{schema:e,parentSchema:n,it:r}=t,{prefixItems:i}=n;r.items=!0,!(0,$2.alwaysValidSchema)(r,e)&&(i?(0,S2.validateAdditionalItems)(t,i):t.ok((0,x2.validateArray)(t)))}};jl.default=k2});var jm=$(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});var ht=Z(),Zo=re(),E2={message:({params:{min:t,max:e}})=>e===void 0?(0,ht.str)`must contain at least ${t} valid item(s)`:(0,ht.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,ht._)`{minContains: ${t}}`:(0,ht._)`{minContains: ${t}, maxContains: ${e}}`},P2={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:E2,code(t){let{gen:e,schema:n,parentSchema:r,data:i,it:o}=t,s,a,{minContains:l,maxContains:c}=r;o.opts.next?(s=l===void 0?1:l,a=c):s=1;let d=e.const("len",(0,ht._)`${i}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,Zo.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,Zo.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,Zo.alwaysValidSchema)(o,n)){let y=(0,ht._)`${d} >= ${s}`;a!==void 0&&(y=(0,ht._)`${y} && ${d} <= ${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,ht._)`${i}.length > 0`,f)):(e.let(p,!1),f()),t.result(p,()=>t.reset());function f(){let y=e.name("_valid"),w=e.let("count",0);m(y,()=>e.if(y,()=>g(w)))}function m(y,w){e.forRange("i",0,d,_=>{t.subschema({keyword:"contains",dataProp:_,dataPropType:Zo.Type.Num,compositeRule:!0},y),w()})}function g(y){e.code((0,ht._)`${y}++`),a===void 0?e.if((0,ht._)`${y} >= ${s}`,()=>e.assign(p,!0).break()):(e.if((0,ht._)`${y} > ${a}`,()=>e.assign(p,!1).break()),s===1?e.assign(p,!0):e.if((0,ht._)`${y} >= ${s}`,()=>e.assign(p,!0)))}}};Dl.default=P2});var es=$(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.validateSchemaDeps=It.validatePropertyDeps=It.error=void 0;var ql=Z(),R2=re(),Ri=dt();It.error={message:({params:{property:t,depsCount:e,deps:n}})=>{let r=e===1?"property":"properties";return(0,ql.str)`must have ${r} ${n} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:n,missingProperty:r}})=>(0,ql._)`{property: ${t},
65
65
  missingProperty: ${r},
66
66
  depsCount: ${e},
67
- deps: ${n}}`};var I2={keyword:"dependencies",type:"object",schemaType:"object",error:It.error,code(t){let[e,n]=T2(t);Dm(t,e),qm(t,n)}};function T2({schema:t}){let e={},n={};for(let r in t){if(r==="__proto__")continue;let i=Array.isArray(t[r])?e:n;i[r]=t[r]}return[e,n]}function Dm(t,e=t.schema){let{gen:n,data:r,it:i}=t;if(Object.keys(e).length===0)return;let o=n.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let l=(0,Ri.propertyInData)(n,r,s,i.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),i.allErrors?n.if(l,()=>{for(let c of a)(0,Ri.checkReportMissingProp)(t,c)}):(n.if((0,ql._)`${l} && (${(0,Ri.checkMissingProp)(t,a,o)})`),(0,Ri.reportMissingProp)(t,o),n.else())}}It.validatePropertyDeps=Dm;function qm(t,e=t.schema){let{gen:n,data:r,keyword:i,it:o}=t,s=n.name("valid");for(let a in e)(0,R2.alwaysValidSchema)(o,e[a])||(n.if((0,Ri.propertyInData)(n,r,a,o.opts.ownProperties),()=>{let l=t.subschema({keyword:i,schemaProp:a},s);t.mergeValidEvaluated(l,s)},()=>n.var(s,!0)),t.ok(s))}It.validateSchemaDeps=qm;It.default=I2});var Bm=$(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});var Fm=Z(),A2=re(),O2={message:"property name must be valid",params:({params:t})=>(0,Fm._)`{propertyName: ${t.propertyName}}`},N2={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:O2,code(t){let{gen:e,schema:n,data:r,it:i}=t;if((0,A2.alwaysValidSchema)(i,n))return;let o=e.name("valid");e.forIn("key",r,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),e.if((0,Fm.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};Fl.default=N2});var Hl=$(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});var ts=dt(),xt=Z(),M2=pt(),ns=re(),V2={message:"must NOT have additional properties",params:({params:t})=>(0,xt._)`{additionalProperty: ${t.additionalProperty}}`},L2={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:V2,code(t){let{gen:e,schema:n,parentSchema:r,data:i,errsCount:o,it:s}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:a,opts:l}=s;if(s.props=!0,l.removeAdditional!=="all"&&(0,ns.alwaysValidSchema)(s,n))return;let c=(0,ts.allSchemaProperties)(r.properties),d=(0,ts.allSchemaProperties)(r.patternProperties);p(),t.ok((0,xt._)`${o} === ${M2.default.errors}`);function p(){e.forIn("key",i,w=>{!c.length&&!d.length?g(w):e.if(f(w),()=>g(w))})}function f(w){let b;if(c.length>8){let I=(0,ns.schemaRefOrVal)(s,r.properties,"properties");b=(0,ts.isOwnProperty)(e,I,w)}else c.length?b=(0,xt.or)(...c.map(I=>(0,xt._)`${w} === ${I}`)):b=xt.nil;return d.length&&(b=(0,xt.or)(b,...d.map(I=>(0,xt._)`${(0,ts.usePattern)(t,I)}.test(${w})`))),(0,xt.not)(b)}function m(w){e.code((0,xt._)`delete ${i}[${w}]`)}function g(w){if(l.removeAdditional==="all"||l.removeAdditional&&n===!1){m(w);return}if(n===!1){t.setParams({additionalProperty:w}),t.error(),a||e.break();return}if(typeof n=="object"&&!(0,ns.alwaysValidSchema)(s,n)){let b=e.name("valid");l.removeAdditional==="failing"?(y(w,b,!1),e.if((0,xt.not)(b),()=>{t.reset(),m(w)})):(y(w,b),a||e.if((0,xt.not)(b),()=>e.break()))}}function y(w,b,I){let S={keyword:"additionalProperties",dataProp:w,dataPropType:ns.Type.Str};I===!1&&Object.assign(S,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(S,b)}}};Bl.default=L2});var Um=$(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});var j2=hi(),Hm=dt(),Wl=re(),Wm=Hl(),D2={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,parentSchema:r,data:i,it:o}=t;o.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&Wm.default.code(new j2.KeywordCxt(o,Wm.default,"additionalProperties"));let s=(0,Hm.allSchemaProperties)(n);for(let p of s)o.definedProperties.add(p);o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=Wl.mergeEvaluated.props(e,(0,Wl.toHash)(s),o.props));let a=s.filter(p=>!(0,Wl.alwaysValidSchema)(o,n[p]));if(a.length===0)return;let l=e.name("valid");for(let p of a)c(p)?d(p):(e.if((0,Hm.propertyInData)(e,i,p,o.opts.ownProperties)),d(p),o.allErrors||e.else().var(l,!0),e.endIf()),t.it.definedProperties.add(p),t.ok(l);function c(p){return o.opts.useDefaults&&!o.compositeRule&&n[p].default!==void 0}function d(p){t.subschema({keyword:"properties",schemaProp:p,dataProp:p},l)}}};Ul.default=D2});var Km=$(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});var zm=dt(),rs=Z(),Gm=re(),Jm=re(),q2={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,data:r,parentSchema:i,it:o}=t,{opts:s}=o,a=(0,zm.allSchemaProperties)(n),l=a.filter(y=>(0,Gm.alwaysValidSchema)(o,n[y]));if(a.length===0||l.length===a.length&&(!o.opts.unevaluated||o.props===!0))return;let c=s.strictSchema&&!s.allowMatchingProperties&&i.properties,d=e.name("valid");o.props!==!0&&!(o.props instanceof rs.Name)&&(o.props=(0,Jm.evaluatedPropsToName)(e,o.props));let{props:p}=o;f();function f(){for(let y of a)c&&m(y),o.allErrors?g(y):(e.var(d,!0),g(y),e.if(d))}function m(y){for(let w in c)new RegExp(y).test(w)&&(0,Gm.checkStrictMode)(o,`property ${w} matches pattern ${y} (use allowMatchingProperties)`)}function g(y){e.forIn("key",r,w=>{e.if((0,rs._)`${(0,zm.usePattern)(t,y)}.test(${w})`,()=>{let b=l.includes(y);b||t.subschema({keyword:"patternProperties",schemaProp:y,dataProp:w,dataPropType:Jm.Type.Str},d),o.opts.unevaluated&&p!==!0?e.assign((0,rs._)`${p}[${w}]`,!0):!b&&!o.allErrors&&e.if((0,rs.not)(d),()=>e.break())})})}}};zl.default=q2});var Ym=$(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});var F2=re(),B2={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:n,it:r}=t;if((0,F2.alwaysValidSchema)(r,n)){t.fail();return}let i=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};Gl.default=B2});var Xm=$(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});var H2=dt(),W2={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:H2.validateUnion,error:{message:"must match a schema in anyOf"}};Jl.default=W2});var Qm=$(Kl=>{"use strict";Object.defineProperty(Kl,"__esModule",{value:!0});var is=Z(),U2=re(),z2={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,is._)`{passingSchemas: ${t.passing}}`},G2={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:z2,code(t){let{gen:e,schema:n,parentSchema:r,it:i}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(i.opts.discriminator&&r.discriminator)return;let o=n,s=e.let("valid",!1),a=e.let("passing",null),l=e.name("_valid");t.setParams({passing:a}),e.block(c),t.result(s,()=>t.reset(),()=>t.error(!0));function c(){o.forEach((d,p)=>{let f;(0,U2.alwaysValidSchema)(i,d)?e.var(l,!0):f=t.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},l),p>0&&e.if((0,is._)`${l} && ${s}`).assign(s,!1).assign(a,(0,is._)`[${a}, ${p}]`).else(),e.if(l,()=>{e.assign(s,!0),e.assign(a,p),f&&t.mergeEvaluated(f,is.Name)})})}}};Kl.default=G2});var Zm=$(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});var J2=re(),K2={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:n,it:r}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");let i=e.name("valid");n.forEach((o,s)=>{if((0,J2.alwaysValidSchema)(r,o))return;let a=t.subschema({keyword:"allOf",schemaProp:s},i);t.ok(i),t.mergeEvaluated(a)})}};Yl.default=K2});var ng=$(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});var os=Z(),tg=re(),Y2={message:({params:t})=>(0,os.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,os._)`{failingKeyword: ${t.ifClause}}`},X2={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Y2,code(t){let{gen:e,parentSchema:n,it:r}=t;n.then===void 0&&n.else===void 0&&(0,tg.checkStrictMode)(r,'"if" without "then" and "else" is ignored');let i=eg(r,"then"),o=eg(r,"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,c("then",d),c("else",d))}else i?e.if(a,c("then")):e.if((0,os.not)(a),c("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 c(d,p){return()=>{let f=t.subschema({keyword:d},a);e.assign(s,a),t.mergeValidEvaluated(f,s),p?e.assign(p,(0,os._)`${d}`):t.setParams({ifClause:d})}}}};function eg(t,e){let n=t.schema[e];return n!==void 0&&!(0,tg.alwaysValidSchema)(t,n)}Xl.default=X2});var rg=$(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});var Q2=re(),Z2={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:n}){e.if===void 0&&(0,Q2.checkStrictMode)(n,`"${t}" without "if" is ignored`)}};Ql.default=Z2});var ig=$(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});var eS=Ml(),tS=Mm(),nS=Vl(),rS=Lm(),iS=jm(),oS=es(),sS=Bm(),aS=Hl(),cS=Um(),lS=Km(),uS=Ym(),pS=Xm(),dS=Qm(),fS=Zm(),hS=ng(),mS=rg();function gS(t=!1){let e=[uS.default,pS.default,dS.default,fS.default,hS.default,mS.default,sS.default,aS.default,oS.default,cS.default,lS.default];return t?e.push(tS.default,rS.default):e.push(eS.default,nS.default),e.push(iS.default),e}Zl.default=gS});var tu=$(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.dynamicAnchor=void 0;var eu=Z(),yS=pt(),og=gi(),wS=Jo(),vS={keyword:"$dynamicAnchor",schemaType:"string",code:t=>sg(t,t.schema)};function sg(t,e){let{gen:n,it:r}=t;r.schemaEnv.root.dynamicAnchors[e]=!0;let i=(0,eu._)`${yS.default.dynamicAnchors}${(0,eu.getProperty)(e)}`,o=r.errSchemaPath==="#"?r.validateName:bS(t);n.if((0,eu._)`!${i}`,()=>n.assign(i,o))}Ii.dynamicAnchor=sg;function bS(t){let{schemaEnv:e,schema:n,self:r}=t.it,{root:i,baseId:o,localRefs:s,meta:a}=e.root,{schemaId:l}=r.opts,c=new og.SchemaEnv({schema:n,schemaId:l,root:i,baseId:o,localRefs:s,meta:a});return og.compileSchema.call(r,c),(0,wS.getValidate)(t,c)}Ii.default=vS});var nu=$(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.dynamicRef=void 0;var ag=Z(),_S=pt(),cg=Jo(),$S={keyword:"$dynamicRef",schemaType:"string",code:t=>lg(t,t.schema)};function lg(t,e){let{gen:n,keyword:r,it:i}=t;if(e[0]!=="#")throw new Error(`"${r}" only supports hash fragment reference`);let o=e.slice(1);if(i.allErrors)s();else{let l=n.let("valid",!1);s(l),t.ok(l)}function s(l){if(i.schemaEnv.root.dynamicAnchors[o]){let c=n.let("_v",(0,ag._)`${_S.default.dynamicAnchors}${(0,ag.getProperty)(o)}`);n.if(c,a(c,l),a(i.validateName,l))}else a(i.validateName,l)()}function a(l,c){return c?()=>n.block(()=>{(0,cg.callRef)(t,l),n.let(c,!0)}):()=>(0,cg.callRef)(t,l)}}Ti.dynamicRef=lg;Ti.default=$S});var ug=$(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});var xS=tu(),SS=re(),CS={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,xS.dynamicAnchor)(t,""):(0,SS.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};ru.default=CS});var pg=$(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});var kS=nu(),ES={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,kS.dynamicRef)(t,t.schema)};iu.default=ES});var dg=$(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});var PS=tu(),RS=nu(),IS=ug(),TS=pg(),AS=[PS.default,RS.default,IS.default,TS.default];ou.default=AS});var hg=$(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});var fg=es(),OS={keyword:"dependentRequired",type:"object",schemaType:"object",error:fg.error,code:t=>(0,fg.validatePropertyDeps)(t)};su.default=OS});var mg=$(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});var NS=es(),MS={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,NS.validateSchemaDeps)(t)};au.default=MS});var gg=$(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});var VS=re(),LS={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:n}){e.contains===void 0&&(0,VS.checkStrictMode)(n,`"${t}" without "contains" is ignored`)}};cu.default=LS});var yg=$(lu=>{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});var jS=hg(),DS=mg(),qS=gg(),FS=[jS.default,DS.default,qS.default];lu.default=FS});var vg=$(uu=>{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});var fn=Z(),wg=re(),BS=pt(),HS={message:"must NOT have unevaluated properties",params:({params:t})=>(0,fn._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},WS={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:HS,code(t){let{gen:e,schema:n,data:r,errsCount:i,it:o}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:s,props:a}=o;a instanceof fn.Name?e.if((0,fn._)`${a} !== true`,()=>e.forIn("key",r,p=>e.if(c(a,p),()=>l(p)))):a!==!0&&e.forIn("key",r,p=>a===void 0?l(p):e.if(d(a,p),()=>l(p))),o.props=!0,t.ok((0,fn._)`${i} === ${BS.default.errors}`);function l(p){if(n===!1){t.setParams({unevaluatedProperty:p}),t.error(),s||e.break();return}if(!(0,wg.alwaysValidSchema)(o,n)){let f=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:p,dataPropType:wg.Type.Str},f),s||e.if((0,fn.not)(f),()=>e.break())}}function c(p,f){return(0,fn._)`!${p} || !${p}[${f}]`}function d(p,f){let m=[];for(let g in p)p[g]===!0&&m.push((0,fn._)`${f} !== ${g}`);return(0,fn.and)(...m)}}};uu.default=WS});var _g=$(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});var Tn=Z(),bg=re(),US={message:({params:{len:t}})=>(0,Tn.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Tn._)`{limit: ${t}}`},zS={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:US,code(t){let{gen:e,schema:n,data:r,it:i}=t,o=i.items||0;if(o===!0)return;let s=e.const("len",(0,Tn._)`${r}.length`);if(n===!1)t.setParams({len:o}),t.fail((0,Tn._)`${s} > ${o}`);else if(typeof n=="object"&&!(0,bg.alwaysValidSchema)(i,n)){let l=e.var("valid",(0,Tn._)`${s} <= ${o}`);e.if((0,Tn.not)(l),()=>a(l,o)),t.ok(l)}i.items=!0;function a(l,c){e.forRange("i",c,s,d=>{t.subschema({keyword:"unevaluatedItems",dataProp:d,dataPropType:bg.Type.Num},l),i.allErrors||e.if((0,Tn.not)(l),()=>e.break())})}}};pu.default=zS});var $g=$(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});var GS=vg(),JS=_g(),KS=[GS.default,JS.default];du.default=KS});var xg=$(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});var Ee=Z(),YS={message:({schemaCode:t})=>(0,Ee.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,Ee._)`{format: ${t}}`},XS={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:YS,code(t,e){let{gen:n,data:r,$data:i,schema:o,schemaCode:s,it:a}=t,{opts:l,errSchemaPath:c,schemaEnv:d,self:p}=a;if(!l.validateFormats)return;i?f():m();function f(){let g=n.scopeValue("formats",{ref:p.formats,code:l.code.formats}),y=n.const("fDef",(0,Ee._)`${g}[${s}]`),w=n.let("fType"),b=n.let("format");n.if((0,Ee._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>n.assign(w,(0,Ee._)`${y}.type || "string"`).assign(b,(0,Ee._)`${y}.validate`),()=>n.assign(w,(0,Ee._)`"string"`).assign(b,y)),t.fail$data((0,Ee.or)(I(),S()));function I(){return l.strictSchema===!1?Ee.nil:(0,Ee._)`${s} && !${b}`}function S(){let R=d.$async?(0,Ee._)`(${y}.async ? await ${b}(${r}) : ${b}(${r}))`:(0,Ee._)`${b}(${r})`,N=(0,Ee._)`(typeof ${b} == "function" ? ${R} : ${b}.test(${r}))`;return(0,Ee._)`${b} && ${b} !== true && ${w} === ${e} && !${N}`}}function m(){let g=p.formats[o];if(!g){I();return}if(g===!0)return;let[y,w,b]=S(g);y===e&&t.pass(R());function I(){if(l.strictSchema===!1){p.logger.warn(N());return}throw new Error(N());function N(){return`unknown format "${o}" ignored in schema at path "${c}"`}}function S(N){let j=N instanceof RegExp?(0,Ee.regexpCode)(N):l.code.formats?(0,Ee._)`${l.code.formats}${(0,Ee.getProperty)(o)}`:void 0,G=n.scopeValue("formats",{key:o,ref:N,code:j});return typeof N=="object"&&!(N instanceof RegExp)?[N.type||"string",N.validate,(0,Ee._)`${G}.validate`]:["string",N,G]}function R(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!d.$async)throw new Error("async format in sync schema");return(0,Ee._)`await ${b}(${r})`}return typeof w=="function"?(0,Ee._)`${b}(${r})`:(0,Ee._)`${b}.test(${r})`}}}};fu.default=XS});var Sg=$(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});var QS=xg(),ZS=[QS.default];hu.default=ZS});var Cg=$(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.contentVocabulary=dr.metadataVocabulary=void 0;dr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];dr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Eg=$(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});var eC=ym(),tC=Tm(),nC=ig(),rC=dg(),iC=yg(),oC=$g(),sC=Sg(),kg=Cg(),aC=[rC.default,eC.default,tC.default,(0,nC.default)(!0),sC.default,kg.metadataVocabulary,kg.contentVocabulary,iC.default,oC.default];mu.default=aC});var Rg=$(ss=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});ss.DiscrError=void 0;var Pg;(function(t){t.Tag="tag",t.Mapping="mapping"})(Pg||(ss.DiscrError=Pg={}))});var Tg=$(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});var fr=Z(),gu=Rg(),Ig=gi(),cC=mi(),lC=re(),uC={message:({params:{discrError:t,tagName:e}})=>t===gu.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:n}})=>(0,fr._)`{error: ${t}, tag: ${n}, tagValue: ${e}}`},pC={keyword:"discriminator",type:"object",schemaType:"object",error:uC,code(t){let{gen:e,data:n,schema:r,parentSchema:i,it:o}=t,{oneOf:s}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=r.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(r.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let l=e.let("valid",!1),c=e.const("tag",(0,fr._)`${n}${(0,fr.getProperty)(a)}`);e.if((0,fr._)`typeof ${c} == "string"`,()=>d(),()=>t.error(!1,{discrError:gu.DiscrError.Tag,tag:c,tagName:a})),t.ok(l);function d(){let m=f();e.if(!1);for(let g in m)e.elseIf((0,fr._)`${c} === ${g}`),e.assign(l,p(m[g]));e.else(),t.error(!1,{discrError:gu.DiscrError.Mapping,tag:c,tagName:a}),e.endIf()}function p(m){let g=e.name("valid"),y=t.subschema({keyword:"oneOf",schemaProp:m},g);return t.mergeEvaluated(y,fr.Name),g}function f(){var m;let g={},y=b(i),w=!0;for(let R=0;R<s.length;R++){let N=s[R];if(N?.$ref&&!(0,lC.schemaHasRulesButRef)(N,o.self.RULES)){let G=N.$ref;if(N=Ig.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,G),N instanceof Ig.SchemaEnv&&(N=N.schema),N===void 0)throw new cC.default(o.opts.uriResolver,o.baseId,G)}let j=(m=N?.properties)===null||m===void 0?void 0:m[a];if(typeof j!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);w=w&&(y||b(N)),I(j,R)}if(!w)throw new Error(`discriminator: "${a}" must be required`);return g;function b({required:R}){return Array.isArray(R)&&R.includes(a)}function I(R,N){if(R.const)S(R.const,N);else if(R.enum)for(let j of R.enum)S(j,N);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function S(R,N){if(typeof R!="string"||R in g)throw new Error(`discriminator: "${a}" values must be unique strings`);g[R]=N}}}};yu.default=pC});var Ag=$((AN,dC)=>{dC.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 Og=$((ON,fC)=>{fC.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 Ng=$((NN,hC)=>{hC.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 Mg=$((MN,mC)=>{mC.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 Vg=$((VN,gC)=>{gC.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 Lg=$((LN,yC)=>{yC.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 jg=$((jN,wC)=>{wC.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 Dg=$((DN,vC)=>{vC.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 qg=$(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});var bC=Ag(),_C=Og(),$C=Ng(),xC=Mg(),SC=Vg(),CC=Lg(),kC=jg(),EC=Dg(),PC=["/properties"];function RC(t){return[bC,_C,$C,xC,SC,e(this,CC),kC,e(this,EC)].forEach(n=>this.addMetaSchema(n,void 0,!1)),this;function e(n,r){return t?n.$dataMetaSchema(r,PC):r}}wu.default=RC});var Fg=$((be,bu)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.MissingRefError=be.ValidationError=be.CodeGen=be.Name=be.nil=be.stringify=be.str=be._=be.KeywordCxt=be.Ajv2020=void 0;var IC=dm(),TC=Eg(),AC=Tg(),OC=qg(),vu="https://json-schema.org/draft/2020-12/schema",hr=class extends IC.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),TC.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(AC.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:n}=this.opts;n&&(OC.default.call(this,e),this.refs["http://json-schema.org/schema"]=vu)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(vu)?vu:void 0)}};be.Ajv2020=hr;bu.exports=be=hr;bu.exports.Ajv2020=hr;Object.defineProperty(be,"__esModule",{value:!0});be.default=hr;var NC=hi();Object.defineProperty(be,"KeywordCxt",{enumerable:!0,get:function(){return NC.KeywordCxt}});var mr=Z();Object.defineProperty(be,"_",{enumerable:!0,get:function(){return mr._}});Object.defineProperty(be,"str",{enumerable:!0,get:function(){return mr.str}});Object.defineProperty(be,"stringify",{enumerable:!0,get:function(){return mr.stringify}});Object.defineProperty(be,"nil",{enumerable:!0,get:function(){return mr.nil}});Object.defineProperty(be,"Name",{enumerable:!0,get:function(){return mr.Name}});Object.defineProperty(be,"CodeGen",{enumerable:!0,get:function(){return mr.CodeGen}});var MC=qo();Object.defineProperty(be,"ValidationError",{enumerable:!0,get:function(){return MC.default}});var VC=mi();Object.defineProperty(be,"MissingRefError",{enumerable:!0,get:function(){return VC.default}})});import{readFileSync as LC}from"node:fs";import{createRequire as jC}from"node:module";import{dirname as _u,resolve as DC}from"node:path";import{fileURLToPath as qC}from"node:url";function Re(){if(gr)return gr;let t=jC(import.meta.url);try{return gr=_u(t.resolve("view-contracts/package.json")),gr}catch{let e=_u(qC(import.meta.url));for(;;){try{let r=DC(e,"package.json");if(JSON.parse(LC(r,"utf8")).name==="view-contracts")return gr=e,gr}catch{}let n=_u(e);if(n===e)break;e=n}throw new Error("view-contracts package root not found")}}var gr,Ut=Y(()=>{"use strict"});import{readFile as WC}from"node:fs/promises";async function yr(t){return lt.load(await WC(t,"utf-8"))}function ls(t,e,n){for(let r of t)if(!e.has(r))throw new Error(`${n}: unknown element "${r}" \u2014 not in spec/ui-dsl.schema.json vocabulary`)}function Ug(t,e,n){for(let[r,i]of Object.entries(t))for(let o of e)if(i[o]===void 0||i[o]===null||i[o]==="")throw new Error(`${n}: element "${r}" is missing required "${String(o)}"`)}var us=Y(()=>{"use strict";Zn()});import{resolve as UC}from"node:path";function zC(t){ls(Object.keys(t.elements),ct,zg),Ug(t.elements,["tag"],zg)}async function xu(t){if(!t&&$u)return $u;let e=t??UC(Re(),"renderers/react/elements.yaml"),n=await yr(e);return zC(n),t||($u=n),n}var zg,$u,Gg=Y(()=>{"use strict";wt();wt();Ut();us();zg="renderers/react/elements.yaml",$u=null});function Jg(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t}function Kg(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 Yg=Y(()=>{"use strict"});function St(t){return`${t}px`}function wr(t){let e=t.match(/^\{([^}]+)\}$/);if(e)return`var(--${e[1].replace(/\./g,"-")})`}function Su(t){let e={},n=t.width;typeof n=="number"?e.width=St(n):n==="fill"?e.width="100%":typeof n=="string"&&n!=="wrap"&&(e.width=n),typeof t.minWidth=="number"&&(e.minWidth=St(t.minWidth));let r=t.maxWidth;typeof r=="number"?e.maxWidth=St(r):r==="fill"&&(e.maxWidth="100%");let i=t.height;typeof i=="number"?e.height=St(i):i==="fill"?e.height="100%":typeof i=="string"&&i!=="wrap"&&(e.height=i),typeof t.minHeight=="number"&&(e.minHeight=St(t.minHeight));let o=t.maxHeight;typeof o=="number"?e.maxHeight=St(o):o==="fill"&&(e.maxHeight="100%"),t.aspectRatio!==void 0&&(e.aspectRatio=String(t.aspectRatio));let s=t.weight;typeof s=="number"&&(e.flexGrow=s),typeof t.padding=="number"&&(e.padding=St(t.padding)),typeof t.margin=="number"&&(e.margin=St(t.margin)),typeof t.gap=="number"&&(e.gap=St(t.gap));let a=t.textAlign;typeof a=="string"&&(e.textAlign=a==="start"?"left":a==="end"?"right":a);let l=t.contentAlign;typeof l=="string"&&l in Xg&&(e.placeItems=Xg[l]),typeof t.overflow=="string"&&(e.overflow=t.overflow);let c=t.selfAlign;typeof c=="string"&&(e.alignSelf=c==="start"?"flex-start":c==="end"?"flex-end":c);let d=t.size;typeof d=="number"?e.fontSize=St(d):typeof d=="string"&&(e.fontSize=d);let p=typeof s=="string"?s:t.fontWeight;typeof p=="string"&&(e.fontWeight=p);let f=t.background;typeof f=="string"&&(e.background=wr(f)??f);let m=t.foreground;typeof m=="string"&&(e.color=wr(m)??m);let g=t.radius;typeof g=="number"?e.borderRadius=St(g):typeof g=="string"&&(e.borderRadius=wr(g)??g);let y=t.shadow;y===!0?e.boxShadow="var(--ui-shadow)":y===!1?e.boxShadow="none":typeof y=="string"&&(e.boxShadow=GC[y]??wr(y)??y);let w=t.border;typeof w=="string"&&(e.border=wr(w)??w),typeof t.opacity=="number"&&(e.opacity=t.opacity);let b=t.clip;typeof b=="string"&&(e.overflow=b==="hidden"?"hidden":b);let I=t.align;if(typeof I=="string"){let j=Jg(I);j&&(e.alignItems=j)}let S=t.justify;if(typeof S=="string"){let j=Kg(S);j&&(e.justifyContent=j)}typeof t.display=="string"&&(e.display=t.display),typeof t.gridTemplateColumns=="string"&&(e.gridTemplateColumns=t.gridTemplateColumns),typeof t.flexDirection=="string"&&(e.flexDirection=t.flexDirection),typeof t.alignItems=="string"&&(e.alignItems=t.alignItems);let R=t.borderColor;typeof R=="string"&&(e.borderColor=wr(R)??R);let N=t.flex;return typeof N=="number"&&(e.flex=N),e}function Ai(t){let e=Object.entries(t);return e.length===0?"":`style={{ ${e.map(([r,i])=>typeof i=="number"?`${r}: ${i}`:`${r}: ${JSON.stringify(i)}`).join(", ")} }}`}var Xg,GC,Cu=Y(()=>{"use strict";Yg();Xg={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"},GC={none:"none",sm:"var(--ui-shadow-sm, 0 1px 2px rgba(0,0,0,0.05))",md:"var(--ui-shadow)",lg:"var(--ui-shadow-lg, 0 10px 15px rgba(0,0,0,0.1))"}});function ps(t,e){let n=t[e];if(n!=null){if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="object"&&"kind"in n&&n.kind==="literal")return n.value}}function JC(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 KC(t){let e={};for(let[n,r]of Object.entries(t)){if(!Xn.has(n))continue;JC(n,r);let i=ps(t,n);i!==void 0&&(e[n]=i)}return e}function YC(t){return t.flex?{display:"flex",flexDirection:t.flex==="column"?"column":"row"}:{}}function XC(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 Qg(t,e){let n=KC(e),r=Su(n);if(r={...r,...YC(t)},t.tableCell){if("alignItems"in r){let i=String(r.alignItems);r.textAlign=i==="flex-end"?"right":i==="center"?"center":"left",delete r.alignItems}"width"in r&&!("flex"in r)&&(r.flexShrink=0,r.flexGrow=0)}if(t.scrollContainer){let i=ps(e,"scroll"),o=ps(e,"axis"),s=typeof i=="string"?i:typeof o=="string"?o==="horizontal"?"horizontal":"vertical":void 0;if(s)return r={...r,...XC(s)},Ai(r);throw new Error("ScrollArea scroll/axis must be compile-time literals")}if(t.flexGrowProp&&e[t.flexGrowProp]){let i=ps(e,t.flexGrowProp);if(typeof i=="number")return r.flexGrow=i,Ai(r);throw new Error(`"${t.flexGrowProp}" on <Spacer> must be a compile-time literal`)}return Ai(r)}var Zg=Y(()=>{"use strict";wt();Cu();Cu()});function K(t){return" ".repeat(t)}function On(t,e="vm"){let n=t.scope??e;return t.path?`${n}.${t.path}`:n}function iy(t){return t.parts.map(e=>typeof e=="string"?e:`\${${On(e)}}`).join("")}function QC(t){return`\`${iy(t)}\``}function ds(t,e=!1){let n=e?" as ActionDescriptor":"";if(!t.params||Object.keys(t.params).length===0)return`{ name: ${JSON.stringify(t.name)} }${n}`;let r=Object.entries(t.params).map(([i,o])=>`${i}: ${Nn(o,0)}`).join(", ");return`{ name: ${JSON.stringify(t.name)}, params: { ${r} } }${n}`}function Eu(t,e,n=!1){if(t===null)return"null";if(typeof t=="string")return JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t))return`[
67
+ deps: ${n}}`};var I2={keyword:"dependencies",type:"object",schemaType:"object",error:It.error,code(t){let[e,n]=T2(t);Dm(t,e),qm(t,n)}};function T2({schema:t}){let e={},n={};for(let r in t){if(r==="__proto__")continue;let i=Array.isArray(t[r])?e:n;i[r]=t[r]}return[e,n]}function Dm(t,e=t.schema){let{gen:n,data:r,it:i}=t;if(Object.keys(e).length===0)return;let o=n.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let l=(0,Ri.propertyInData)(n,r,s,i.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),i.allErrors?n.if(l,()=>{for(let c of a)(0,Ri.checkReportMissingProp)(t,c)}):(n.if((0,ql._)`${l} && (${(0,Ri.checkMissingProp)(t,a,o)})`),(0,Ri.reportMissingProp)(t,o),n.else())}}It.validatePropertyDeps=Dm;function qm(t,e=t.schema){let{gen:n,data:r,keyword:i,it:o}=t,s=n.name("valid");for(let a in e)(0,R2.alwaysValidSchema)(o,e[a])||(n.if((0,Ri.propertyInData)(n,r,a,o.opts.ownProperties),()=>{let l=t.subschema({keyword:i,schemaProp:a},s);t.mergeValidEvaluated(l,s)},()=>n.var(s,!0)),t.ok(s))}It.validateSchemaDeps=qm;It.default=I2});var Bm=$(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});var Fm=Z(),A2=re(),O2={message:"property name must be valid",params:({params:t})=>(0,Fm._)`{propertyName: ${t.propertyName}}`},N2={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:O2,code(t){let{gen:e,schema:n,data:r,it:i}=t;if((0,A2.alwaysValidSchema)(i,n))return;let o=e.name("valid");e.forIn("key",r,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),e.if((0,Fm.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};Fl.default=N2});var Hl=$(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});var ts=dt(),xt=Z(),M2=pt(),ns=re(),V2={message:"must NOT have additional properties",params:({params:t})=>(0,xt._)`{additionalProperty: ${t.additionalProperty}}`},L2={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:V2,code(t){let{gen:e,schema:n,parentSchema:r,data:i,errsCount:o,it:s}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:a,opts:l}=s;if(s.props=!0,l.removeAdditional!=="all"&&(0,ns.alwaysValidSchema)(s,n))return;let c=(0,ts.allSchemaProperties)(r.properties),d=(0,ts.allSchemaProperties)(r.patternProperties);p(),t.ok((0,xt._)`${o} === ${M2.default.errors}`);function p(){e.forIn("key",i,w=>{!c.length&&!d.length?g(w):e.if(f(w),()=>g(w))})}function f(w){let _;if(c.length>8){let R=(0,ns.schemaRefOrVal)(s,r.properties,"properties");_=(0,ts.isOwnProperty)(e,R,w)}else c.length?_=(0,xt.or)(...c.map(R=>(0,xt._)`${w} === ${R}`)):_=xt.nil;return d.length&&(_=(0,xt.or)(_,...d.map(R=>(0,xt._)`${(0,ts.usePattern)(t,R)}.test(${w})`))),(0,xt.not)(_)}function m(w){e.code((0,xt._)`delete ${i}[${w}]`)}function g(w){if(l.removeAdditional==="all"||l.removeAdditional&&n===!1){m(w);return}if(n===!1){t.setParams({additionalProperty:w}),t.error(),a||e.break();return}if(typeof n=="object"&&!(0,ns.alwaysValidSchema)(s,n)){let _=e.name("valid");l.removeAdditional==="failing"?(y(w,_,!1),e.if((0,xt.not)(_),()=>{t.reset(),m(w)})):(y(w,_),a||e.if((0,xt.not)(_),()=>e.break()))}}function y(w,_,R){let x={keyword:"additionalProperties",dataProp:w,dataPropType:ns.Type.Str};R===!1&&Object.assign(x,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(x,_)}}};Bl.default=L2});var Um=$(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});var j2=hi(),Hm=dt(),Wl=re(),Wm=Hl(),D2={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,parentSchema:r,data:i,it:o}=t;o.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&Wm.default.code(new j2.KeywordCxt(o,Wm.default,"additionalProperties"));let s=(0,Hm.allSchemaProperties)(n);for(let p of s)o.definedProperties.add(p);o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=Wl.mergeEvaluated.props(e,(0,Wl.toHash)(s),o.props));let a=s.filter(p=>!(0,Wl.alwaysValidSchema)(o,n[p]));if(a.length===0)return;let l=e.name("valid");for(let p of a)c(p)?d(p):(e.if((0,Hm.propertyInData)(e,i,p,o.opts.ownProperties)),d(p),o.allErrors||e.else().var(l,!0),e.endIf()),t.it.definedProperties.add(p),t.ok(l);function c(p){return o.opts.useDefaults&&!o.compositeRule&&n[p].default!==void 0}function d(p){t.subschema({keyword:"properties",schemaProp:p,dataProp:p},l)}}};Ul.default=D2});var Km=$(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});var zm=dt(),rs=Z(),Gm=re(),Jm=re(),q2={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,data:r,parentSchema:i,it:o}=t,{opts:s}=o,a=(0,zm.allSchemaProperties)(n),l=a.filter(y=>(0,Gm.alwaysValidSchema)(o,n[y]));if(a.length===0||l.length===a.length&&(!o.opts.unevaluated||o.props===!0))return;let c=s.strictSchema&&!s.allowMatchingProperties&&i.properties,d=e.name("valid");o.props!==!0&&!(o.props instanceof rs.Name)&&(o.props=(0,Jm.evaluatedPropsToName)(e,o.props));let{props:p}=o;f();function f(){for(let y of a)c&&m(y),o.allErrors?g(y):(e.var(d,!0),g(y),e.if(d))}function m(y){for(let w in c)new RegExp(y).test(w)&&(0,Gm.checkStrictMode)(o,`property ${w} matches pattern ${y} (use allowMatchingProperties)`)}function g(y){e.forIn("key",r,w=>{e.if((0,rs._)`${(0,zm.usePattern)(t,y)}.test(${w})`,()=>{let _=l.includes(y);_||t.subschema({keyword:"patternProperties",schemaProp:y,dataProp:w,dataPropType:Jm.Type.Str},d),o.opts.unevaluated&&p!==!0?e.assign((0,rs._)`${p}[${w}]`,!0):!_&&!o.allErrors&&e.if((0,rs.not)(d),()=>e.break())})})}}};zl.default=q2});var Ym=$(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});var F2=re(),B2={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:n,it:r}=t;if((0,F2.alwaysValidSchema)(r,n)){t.fail();return}let i=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};Gl.default=B2});var Xm=$(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});var H2=dt(),W2={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:H2.validateUnion,error:{message:"must match a schema in anyOf"}};Jl.default=W2});var Qm=$(Kl=>{"use strict";Object.defineProperty(Kl,"__esModule",{value:!0});var is=Z(),U2=re(),z2={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,is._)`{passingSchemas: ${t.passing}}`},G2={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:z2,code(t){let{gen:e,schema:n,parentSchema:r,it:i}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(i.opts.discriminator&&r.discriminator)return;let o=n,s=e.let("valid",!1),a=e.let("passing",null),l=e.name("_valid");t.setParams({passing:a}),e.block(c),t.result(s,()=>t.reset(),()=>t.error(!0));function c(){o.forEach((d,p)=>{let f;(0,U2.alwaysValidSchema)(i,d)?e.var(l,!0):f=t.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},l),p>0&&e.if((0,is._)`${l} && ${s}`).assign(s,!1).assign(a,(0,is._)`[${a}, ${p}]`).else(),e.if(l,()=>{e.assign(s,!0),e.assign(a,p),f&&t.mergeEvaluated(f,is.Name)})})}}};Kl.default=G2});var Zm=$(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});var J2=re(),K2={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:n,it:r}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");let i=e.name("valid");n.forEach((o,s)=>{if((0,J2.alwaysValidSchema)(r,o))return;let a=t.subschema({keyword:"allOf",schemaProp:s},i);t.ok(i),t.mergeEvaluated(a)})}};Yl.default=K2});var ng=$(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});var os=Z(),tg=re(),Y2={message:({params:t})=>(0,os.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,os._)`{failingKeyword: ${t.ifClause}}`},X2={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Y2,code(t){let{gen:e,parentSchema:n,it:r}=t;n.then===void 0&&n.else===void 0&&(0,tg.checkStrictMode)(r,'"if" without "then" and "else" is ignored');let i=eg(r,"then"),o=eg(r,"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,c("then",d),c("else",d))}else i?e.if(a,c("then")):e.if((0,os.not)(a),c("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 c(d,p){return()=>{let f=t.subschema({keyword:d},a);e.assign(s,a),t.mergeValidEvaluated(f,s),p?e.assign(p,(0,os._)`${d}`):t.setParams({ifClause:d})}}}};function eg(t,e){let n=t.schema[e];return n!==void 0&&!(0,tg.alwaysValidSchema)(t,n)}Xl.default=X2});var rg=$(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});var Q2=re(),Z2={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:n}){e.if===void 0&&(0,Q2.checkStrictMode)(n,`"${t}" without "if" is ignored`)}};Ql.default=Z2});var ig=$(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});var eS=Ml(),tS=Mm(),nS=Vl(),rS=Lm(),iS=jm(),oS=es(),sS=Bm(),aS=Hl(),cS=Um(),lS=Km(),uS=Ym(),pS=Xm(),dS=Qm(),fS=Zm(),hS=ng(),mS=rg();function gS(t=!1){let e=[uS.default,pS.default,dS.default,fS.default,hS.default,mS.default,sS.default,aS.default,oS.default,cS.default,lS.default];return t?e.push(tS.default,rS.default):e.push(eS.default,nS.default),e.push(iS.default),e}Zl.default=gS});var tu=$(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.dynamicAnchor=void 0;var eu=Z(),yS=pt(),og=gi(),wS=Jo(),vS={keyword:"$dynamicAnchor",schemaType:"string",code:t=>sg(t,t.schema)};function sg(t,e){let{gen:n,it:r}=t;r.schemaEnv.root.dynamicAnchors[e]=!0;let i=(0,eu._)`${yS.default.dynamicAnchors}${(0,eu.getProperty)(e)}`,o=r.errSchemaPath==="#"?r.validateName:bS(t);n.if((0,eu._)`!${i}`,()=>n.assign(i,o))}Ii.dynamicAnchor=sg;function bS(t){let{schemaEnv:e,schema:n,self:r}=t.it,{root:i,baseId:o,localRefs:s,meta:a}=e.root,{schemaId:l}=r.opts,c=new og.SchemaEnv({schema:n,schemaId:l,root:i,baseId:o,localRefs:s,meta:a});return og.compileSchema.call(r,c),(0,wS.getValidate)(t,c)}Ii.default=vS});var nu=$(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.dynamicRef=void 0;var ag=Z(),_S=pt(),cg=Jo(),$S={keyword:"$dynamicRef",schemaType:"string",code:t=>lg(t,t.schema)};function lg(t,e){let{gen:n,keyword:r,it:i}=t;if(e[0]!=="#")throw new Error(`"${r}" only supports hash fragment reference`);let o=e.slice(1);if(i.allErrors)s();else{let l=n.let("valid",!1);s(l),t.ok(l)}function s(l){if(i.schemaEnv.root.dynamicAnchors[o]){let c=n.let("_v",(0,ag._)`${_S.default.dynamicAnchors}${(0,ag.getProperty)(o)}`);n.if(c,a(c,l),a(i.validateName,l))}else a(i.validateName,l)()}function a(l,c){return c?()=>n.block(()=>{(0,cg.callRef)(t,l),n.let(c,!0)}):()=>(0,cg.callRef)(t,l)}}Ti.dynamicRef=lg;Ti.default=$S});var ug=$(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});var xS=tu(),SS=re(),CS={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,xS.dynamicAnchor)(t,""):(0,SS.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};ru.default=CS});var pg=$(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});var kS=nu(),ES={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,kS.dynamicRef)(t,t.schema)};iu.default=ES});var dg=$(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});var PS=tu(),RS=nu(),IS=ug(),TS=pg(),AS=[PS.default,RS.default,IS.default,TS.default];ou.default=AS});var hg=$(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});var fg=es(),OS={keyword:"dependentRequired",type:"object",schemaType:"object",error:fg.error,code:t=>(0,fg.validatePropertyDeps)(t)};su.default=OS});var mg=$(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});var NS=es(),MS={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,NS.validateSchemaDeps)(t)};au.default=MS});var gg=$(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});var VS=re(),LS={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:n}){e.contains===void 0&&(0,VS.checkStrictMode)(n,`"${t}" without "contains" is ignored`)}};cu.default=LS});var yg=$(lu=>{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});var jS=hg(),DS=mg(),qS=gg(),FS=[jS.default,DS.default,qS.default];lu.default=FS});var vg=$(uu=>{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});var fn=Z(),wg=re(),BS=pt(),HS={message:"must NOT have unevaluated properties",params:({params:t})=>(0,fn._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},WS={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:HS,code(t){let{gen:e,schema:n,data:r,errsCount:i,it:o}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:s,props:a}=o;a instanceof fn.Name?e.if((0,fn._)`${a} !== true`,()=>e.forIn("key",r,p=>e.if(c(a,p),()=>l(p)))):a!==!0&&e.forIn("key",r,p=>a===void 0?l(p):e.if(d(a,p),()=>l(p))),o.props=!0,t.ok((0,fn._)`${i} === ${BS.default.errors}`);function l(p){if(n===!1){t.setParams({unevaluatedProperty:p}),t.error(),s||e.break();return}if(!(0,wg.alwaysValidSchema)(o,n)){let f=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:p,dataPropType:wg.Type.Str},f),s||e.if((0,fn.not)(f),()=>e.break())}}function c(p,f){return(0,fn._)`!${p} || !${p}[${f}]`}function d(p,f){let m=[];for(let g in p)p[g]===!0&&m.push((0,fn._)`${f} !== ${g}`);return(0,fn.and)(...m)}}};uu.default=WS});var _g=$(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});var Tn=Z(),bg=re(),US={message:({params:{len:t}})=>(0,Tn.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Tn._)`{limit: ${t}}`},zS={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:US,code(t){let{gen:e,schema:n,data:r,it:i}=t,o=i.items||0;if(o===!0)return;let s=e.const("len",(0,Tn._)`${r}.length`);if(n===!1)t.setParams({len:o}),t.fail((0,Tn._)`${s} > ${o}`);else if(typeof n=="object"&&!(0,bg.alwaysValidSchema)(i,n)){let l=e.var("valid",(0,Tn._)`${s} <= ${o}`);e.if((0,Tn.not)(l),()=>a(l,o)),t.ok(l)}i.items=!0;function a(l,c){e.forRange("i",c,s,d=>{t.subschema({keyword:"unevaluatedItems",dataProp:d,dataPropType:bg.Type.Num},l),i.allErrors||e.if((0,Tn.not)(l),()=>e.break())})}}};pu.default=zS});var $g=$(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});var GS=vg(),JS=_g(),KS=[GS.default,JS.default];du.default=KS});var xg=$(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});var Ee=Z(),YS={message:({schemaCode:t})=>(0,Ee.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,Ee._)`{format: ${t}}`},XS={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:YS,code(t,e){let{gen:n,data:r,$data:i,schema:o,schemaCode:s,it:a}=t,{opts:l,errSchemaPath:c,schemaEnv:d,self:p}=a;if(!l.validateFormats)return;i?f():m();function f(){let g=n.scopeValue("formats",{ref:p.formats,code:l.code.formats}),y=n.const("fDef",(0,Ee._)`${g}[${s}]`),w=n.let("fType"),_=n.let("format");n.if((0,Ee._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>n.assign(w,(0,Ee._)`${y}.type || "string"`).assign(_,(0,Ee._)`${y}.validate`),()=>n.assign(w,(0,Ee._)`"string"`).assign(_,y)),t.fail$data((0,Ee.or)(R(),x()));function R(){return l.strictSchema===!1?Ee.nil:(0,Ee._)`${s} && !${_}`}function x(){let I=d.$async?(0,Ee._)`(${y}.async ? await ${_}(${r}) : ${_}(${r}))`:(0,Ee._)`${_}(${r})`,N=(0,Ee._)`(typeof ${_} == "function" ? ${I} : ${_}.test(${r}))`;return(0,Ee._)`${_} && ${_} !== true && ${w} === ${e} && !${N}`}}function m(){let g=p.formats[o];if(!g){R();return}if(g===!0)return;let[y,w,_]=x(g);y===e&&t.pass(I());function R(){if(l.strictSchema===!1){p.logger.warn(N());return}throw new Error(N());function N(){return`unknown format "${o}" ignored in schema at path "${c}"`}}function x(N){let j=N instanceof RegExp?(0,Ee.regexpCode)(N):l.code.formats?(0,Ee._)`${l.code.formats}${(0,Ee.getProperty)(o)}`:void 0,G=n.scopeValue("formats",{key:o,ref:N,code:j});return typeof N=="object"&&!(N instanceof RegExp)?[N.type||"string",N.validate,(0,Ee._)`${G}.validate`]:["string",N,G]}function I(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!d.$async)throw new Error("async format in sync schema");return(0,Ee._)`await ${_}(${r})`}return typeof w=="function"?(0,Ee._)`${_}(${r})`:(0,Ee._)`${_}.test(${r})`}}}};fu.default=XS});var Sg=$(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});var QS=xg(),ZS=[QS.default];hu.default=ZS});var Cg=$(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.contentVocabulary=dr.metadataVocabulary=void 0;dr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];dr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Eg=$(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});var eC=ym(),tC=Tm(),nC=ig(),rC=dg(),iC=yg(),oC=$g(),sC=Sg(),kg=Cg(),aC=[rC.default,eC.default,tC.default,(0,nC.default)(!0),sC.default,kg.metadataVocabulary,kg.contentVocabulary,iC.default,oC.default];mu.default=aC});var Rg=$(ss=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});ss.DiscrError=void 0;var Pg;(function(t){t.Tag="tag",t.Mapping="mapping"})(Pg||(ss.DiscrError=Pg={}))});var Tg=$(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});var fr=Z(),gu=Rg(),Ig=gi(),cC=mi(),lC=re(),uC={message:({params:{discrError:t,tagName:e}})=>t===gu.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:n}})=>(0,fr._)`{error: ${t}, tag: ${n}, tagValue: ${e}}`},pC={keyword:"discriminator",type:"object",schemaType:"object",error:uC,code(t){let{gen:e,data:n,schema:r,parentSchema:i,it:o}=t,{oneOf:s}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=r.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(r.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let l=e.let("valid",!1),c=e.const("tag",(0,fr._)`${n}${(0,fr.getProperty)(a)}`);e.if((0,fr._)`typeof ${c} == "string"`,()=>d(),()=>t.error(!1,{discrError:gu.DiscrError.Tag,tag:c,tagName:a})),t.ok(l);function d(){let m=f();e.if(!1);for(let g in m)e.elseIf((0,fr._)`${c} === ${g}`),e.assign(l,p(m[g]));e.else(),t.error(!1,{discrError:gu.DiscrError.Mapping,tag:c,tagName:a}),e.endIf()}function p(m){let g=e.name("valid"),y=t.subschema({keyword:"oneOf",schemaProp:m},g);return t.mergeEvaluated(y,fr.Name),g}function f(){var m;let g={},y=_(i),w=!0;for(let I=0;I<s.length;I++){let N=s[I];if(N?.$ref&&!(0,lC.schemaHasRulesButRef)(N,o.self.RULES)){let G=N.$ref;if(N=Ig.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,G),N instanceof Ig.SchemaEnv&&(N=N.schema),N===void 0)throw new cC.default(o.opts.uriResolver,o.baseId,G)}let j=(m=N?.properties)===null||m===void 0?void 0:m[a];if(typeof j!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);w=w&&(y||_(N)),R(j,I)}if(!w)throw new Error(`discriminator: "${a}" must be required`);return g;function _({required:I}){return Array.isArray(I)&&I.includes(a)}function R(I,N){if(I.const)x(I.const,N);else if(I.enum)for(let j of I.enum)x(j,N);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function x(I,N){if(typeof I!="string"||I in g)throw new Error(`discriminator: "${a}" values must be unique strings`);g[I]=N}}}};yu.default=pC});var Ag=$((AN,dC)=>{dC.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 Og=$((ON,fC)=>{fC.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 Ng=$((NN,hC)=>{hC.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 Mg=$((MN,mC)=>{mC.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 Vg=$((VN,gC)=>{gC.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 Lg=$((LN,yC)=>{yC.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 jg=$((jN,wC)=>{wC.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 Dg=$((DN,vC)=>{vC.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 qg=$(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});var bC=Ag(),_C=Og(),$C=Ng(),xC=Mg(),SC=Vg(),CC=Lg(),kC=jg(),EC=Dg(),PC=["/properties"];function RC(t){return[bC,_C,$C,xC,SC,e(this,CC),kC,e(this,EC)].forEach(n=>this.addMetaSchema(n,void 0,!1)),this;function e(n,r){return t?n.$dataMetaSchema(r,PC):r}}wu.default=RC});var Fg=$((be,bu)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.MissingRefError=be.ValidationError=be.CodeGen=be.Name=be.nil=be.stringify=be.str=be._=be.KeywordCxt=be.Ajv2020=void 0;var IC=dm(),TC=Eg(),AC=Tg(),OC=qg(),vu="https://json-schema.org/draft/2020-12/schema",hr=class extends IC.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),TC.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(AC.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:n}=this.opts;n&&(OC.default.call(this,e),this.refs["http://json-schema.org/schema"]=vu)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(vu)?vu:void 0)}};be.Ajv2020=hr;bu.exports=be=hr;bu.exports.Ajv2020=hr;Object.defineProperty(be,"__esModule",{value:!0});be.default=hr;var NC=hi();Object.defineProperty(be,"KeywordCxt",{enumerable:!0,get:function(){return NC.KeywordCxt}});var mr=Z();Object.defineProperty(be,"_",{enumerable:!0,get:function(){return mr._}});Object.defineProperty(be,"str",{enumerable:!0,get:function(){return mr.str}});Object.defineProperty(be,"stringify",{enumerable:!0,get:function(){return mr.stringify}});Object.defineProperty(be,"nil",{enumerable:!0,get:function(){return mr.nil}});Object.defineProperty(be,"Name",{enumerable:!0,get:function(){return mr.Name}});Object.defineProperty(be,"CodeGen",{enumerable:!0,get:function(){return mr.CodeGen}});var MC=qo();Object.defineProperty(be,"ValidationError",{enumerable:!0,get:function(){return MC.default}});var VC=mi();Object.defineProperty(be,"MissingRefError",{enumerable:!0,get:function(){return VC.default}})});import{readFileSync as LC}from"node:fs";import{createRequire as jC}from"node:module";import{dirname as _u,resolve as DC}from"node:path";import{fileURLToPath as qC}from"node:url";function Re(){if(gr)return gr;let t=jC(import.meta.url);try{return gr=_u(t.resolve("view-contracts/package.json")),gr}catch{let e=_u(qC(import.meta.url));for(;;){try{let r=DC(e,"package.json");if(JSON.parse(LC(r,"utf8")).name==="view-contracts")return gr=e,gr}catch{}let n=_u(e);if(n===e)break;e=n}throw new Error("view-contracts package root not found")}}var gr,Ut=Y(()=>{"use strict"});import{readFile as WC}from"node:fs/promises";async function yr(t){return lt.load(await WC(t,"utf-8"))}function ls(t,e,n){for(let r of t)if(!e.has(r))throw new Error(`${n}: unknown element "${r}" \u2014 not in spec/ui-dsl.schema.json vocabulary`)}function Ug(t,e,n){for(let[r,i]of Object.entries(t))for(let o of e)if(i[o]===void 0||i[o]===null||i[o]==="")throw new Error(`${n}: element "${r}" is missing required "${String(o)}"`)}var us=Y(()=>{"use strict";Zn()});import{resolve as UC}from"node:path";function zC(t){ls(Object.keys(t.elements),ct,zg),Ug(t.elements,["tag"],zg)}async function xu(t){if(!t&&$u)return $u;let e=t??UC(Re(),"renderers/react/elements.yaml"),n=await yr(e);return zC(n),t||($u=n),n}var zg,$u,Gg=Y(()=>{"use strict";wt();wt();Ut();us();zg="renderers/react/elements.yaml",$u=null});function Jg(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t}function Kg(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 Yg=Y(()=>{"use strict"});function St(t){return`${t}px`}function wr(t){let e=t.match(/^\{([^}]+)\}$/);if(e)return`var(--${e[1].replace(/\./g,"-")})`}function Su(t){let e={},n=t.width;typeof n=="number"?e.width=St(n):n==="fill"?e.width="100%":typeof n=="string"&&n!=="wrap"&&(e.width=n),typeof t.minWidth=="number"&&(e.minWidth=St(t.minWidth));let r=t.maxWidth;typeof r=="number"?e.maxWidth=St(r):r==="fill"&&(e.maxWidth="100%");let i=t.height;typeof i=="number"?e.height=St(i):i==="fill"?e.height="100%":typeof i=="string"&&i!=="wrap"&&(e.height=i),typeof t.minHeight=="number"&&(e.minHeight=St(t.minHeight));let o=t.maxHeight;typeof o=="number"?e.maxHeight=St(o):o==="fill"&&(e.maxHeight="100%"),t.aspectRatio!==void 0&&(e.aspectRatio=String(t.aspectRatio));let s=t.weight;typeof s=="number"&&(e.flexGrow=s),typeof t.padding=="number"&&(e.padding=St(t.padding)),typeof t.margin=="number"&&(e.margin=St(t.margin)),typeof t.gap=="number"&&(e.gap=St(t.gap));let a=t.textAlign;typeof a=="string"&&(e.textAlign=a==="start"?"left":a==="end"?"right":a);let l=t.contentAlign;typeof l=="string"&&l in Xg&&(e.placeItems=Xg[l]),typeof t.overflow=="string"&&(e.overflow=t.overflow);let c=t.selfAlign;typeof c=="string"&&(e.alignSelf=c==="start"?"flex-start":c==="end"?"flex-end":c);let d=t.size;typeof d=="number"?e.fontSize=St(d):typeof d=="string"&&(e.fontSize=d);let p=typeof s=="string"?s:t.fontWeight;typeof p=="string"&&(e.fontWeight=p);let f=t.background;typeof f=="string"&&(e.background=wr(f)??f);let m=t.foreground;typeof m=="string"&&(e.color=wr(m)??m);let g=t.radius;typeof g=="number"?e.borderRadius=St(g):typeof g=="string"&&(e.borderRadius=wr(g)??g);let y=t.shadow;y===!0?e.boxShadow="var(--ui-shadow)":y===!1?e.boxShadow="none":typeof y=="string"&&(e.boxShadow=GC[y]??wr(y)??y);let w=t.border;typeof w=="string"&&(e.border=wr(w)??w),typeof t.opacity=="number"&&(e.opacity=t.opacity);let _=t.clip;typeof _=="string"&&(e.overflow=_==="hidden"?"hidden":_);let R=t.align;if(typeof R=="string"){let j=Jg(R);j&&(e.alignItems=j)}let x=t.justify;if(typeof x=="string"){let j=Kg(x);j&&(e.justifyContent=j)}typeof t.display=="string"&&(e.display=t.display),typeof t.gridTemplateColumns=="string"&&(e.gridTemplateColumns=t.gridTemplateColumns),typeof t.flexDirection=="string"&&(e.flexDirection=t.flexDirection),typeof t.alignItems=="string"&&(e.alignItems=t.alignItems);let I=t.borderColor;typeof I=="string"&&(e.borderColor=wr(I)??I);let N=t.flex;return typeof N=="number"&&(e.flex=N),e}function Ai(t){let e=Object.entries(t);return e.length===0?"":`style={{ ${e.map(([r,i])=>typeof i=="number"?`${r}: ${i}`:`${r}: ${JSON.stringify(i)}`).join(", ")} }}`}var Xg,GC,Cu=Y(()=>{"use strict";Yg();Xg={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"},GC={none:"none",sm:"var(--ui-shadow-sm, 0 1px 2px rgba(0,0,0,0.05))",md:"var(--ui-shadow)",lg:"var(--ui-shadow-lg, 0 10px 15px rgba(0,0,0,0.1))"}});function ps(t,e){let n=t[e];if(n!=null){if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="object"&&"kind"in n&&n.kind==="literal")return n.value}}function JC(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 KC(t){let e={};for(let[n,r]of Object.entries(t)){if(!Xn.has(n))continue;JC(n,r);let i=ps(t,n);i!==void 0&&(e[n]=i)}return e}function YC(t){return t.flex?{display:"flex",flexDirection:t.flex==="column"?"column":"row"}:{}}function XC(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 Qg(t,e){let n=KC(e),r=Su(n);if(r={...r,...YC(t)},t.tableCell){if("alignItems"in r){let i=String(r.alignItems);r.textAlign=i==="flex-end"?"right":i==="center"?"center":"left",delete r.alignItems}"width"in r&&!("flex"in r)&&(r.flexShrink=0,r.flexGrow=0)}if(t.scrollContainer){let i=ps(e,"scroll"),o=ps(e,"axis"),s=typeof i=="string"?i:typeof o=="string"?o==="horizontal"?"horizontal":"vertical":void 0;if(s)return r={...r,...XC(s)},Ai(r);throw new Error("ScrollArea scroll/axis must be compile-time literals")}if(t.flexGrowProp&&e[t.flexGrowProp]){let i=ps(e,t.flexGrowProp);if(typeof i=="number")return r.flexGrow=i,Ai(r);throw new Error(`"${t.flexGrowProp}" on <Spacer> must be a compile-time literal`)}return Ai(r)}var Zg=Y(()=>{"use strict";wt();Cu();Cu()});function K(t){return" ".repeat(t)}function On(t,e="vm"){let n=t.scope??e;return t.path?`${n}.${t.path}`:n}function iy(t){return t.parts.map(e=>typeof e=="string"?e:`\${${On(e)}}`).join("")}function QC(t){return`\`${iy(t)}\``}function ds(t,e=!1){let n=e?" as ActionDescriptor":"";if(!t.params||Object.keys(t.params).length===0)return`{ name: ${JSON.stringify(t.name)} }${n}`;let r=Object.entries(t.params).map(([i,o])=>`${i}: ${Nn(o,0)}`).join(", ");return`{ name: ${JSON.stringify(t.name)}, params: { ${r} } }${n}`}function Eu(t,e,n=!1){if(t===null)return"null";if(typeof t=="string")return JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t))return`[
68
68
  ${t.map(r=>`${K(e+1)}${Eu(r,e+1,n)}`).join(`,
69
69
  `)}
70
70
  ${K(e)}]`;if(typeof t=="object"&&t!==null){let r=t;return"kind"in r&&r.kind==="action"?ds(r,n):`{
@@ -102,38 +102,38 @@ ${K(e)}</${t.name}>`:`${K(e)}<${t.name}${o} />`}function oy(t,e,n){return t in e
102
102
  </>
103
103
  );`:`return (
104
104
  ${t}
105
- );`}function mk(t){let e=t.replace(/^\/\*\*[\s\S]*?\*\/\s*/,"");return e=e.replace(/^import\s[^\n]+\n/gm,""),e.trimStart()}async function uy(t,e){let n=await xu(e.elementMapPath),r=e.allowlistExtra??[],i=dk(t),o=fk(t.root,t.source),a=sy(n,r)(o,2),l=new Set;An(t.root,n,r,l);let c=[...l].sort(),d=new Set;Oi(t.root,d);let p=[...d].sort(),f=e.previewImports,m=f?.dispatch??e.runtimeImportFrom,g=f?.contracts??e.contractsImportFrom,y=f?.extensions??e.extensionsImportFrom,w=new Set;if(t.isPartial)for(let N of ly(t.propsType))w.add(N);else w.add(t.viewModel);let b=["import type { ReactElement } from 'react';"];b.push(`import { dispatchAction } from '${m}';`);let I=[...w].sort(),S=I.length>0?`${I.join(", ")}, ActionDescriptor`:"ActionDescriptor";b.push(`import type { ${S} } from '${g}';`),c.length>0&&b.push(`import { ${c.join(", ")} } from '${y}';`);for(let N of p){if(e.inlineViewRefs)continue;let j=e.viewRefImportFrom?.get(N)??`./${N}.generated.js`;b.push(`import { ${N} } from '${j}';`)}let R=f?`/**
105
+ );`}function mk(t){let e=t.replace(/^\/\*\*[\s\S]*?\*\/\s*/,"");return e=e.replace(/^import\s[^\n]+\n/gm,""),e.trimStart()}async function uy(t,e){let n=await xu(e.elementMapPath),r=e.allowlistExtra??[],i=dk(t),o=fk(t.root,t.source),a=sy(n,r)(o,2),l=new Set;An(t.root,n,r,l);let c=[...l].sort(),d=new Set;Oi(t.root,d);let p=[...d].sort(),f=e.previewImports,m=f?.dispatch??e.runtimeImportFrom,g=f?.contracts??e.contractsImportFrom,y=f?.extensions??e.extensionsImportFrom,w=new Set;if(t.isPartial)for(let N of ly(t.propsType))w.add(N);else w.add(t.viewModel);let _=["import type { ReactElement } from 'react';"];_.push(`import { dispatchAction } from '${m}';`);let R=[...w].sort(),x=R.length>0?`${R.join(", ")}, ActionDescriptor`:"ActionDescriptor";_.push(`import type { ${x} } from '${g}';`),c.length>0&&_.push(`import { ${c.join(", ")} } from '${y}';`);for(let N of p){if(e.inlineViewRefs)continue;let j=e.viewRefImportFrom?.get(N)??`./${N}.generated.js`;_.push(`import { ${N} } from '${j}';`)}let I=f?`/**
106
106
  * Preview module \u2014 compiled live from ${t.source}
107
107
  * Same lowering as generated/; not written to disk.
108
108
  */`:`/**
109
109
  * Auto-generated React component from ${t.source}
110
110
  * DO NOT EDIT \u2014 regenerate with: view-contracts render react
111
- */`;if(t.isPartial){let N=hk(t);return`${R}
112
- ${b.join(`
111
+ */`;if(t.isPartial){let N=hk(t);return`${I}
112
+ ${_.join(`
113
113
  `)}
114
114
 
115
115
  export function ${i}(${N}): ReactElement {
116
116
  ${cy(a)}
117
117
  }
118
- `}return`${R}
119
- ${b.join(`
118
+ `}return`${I}
119
+ ${_.join(`
120
120
  `)}
121
121
 
122
122
  export function ${i}({ vm }: { vm: ${t.viewModel} }): ReactElement {
123
123
  ${cy(a)}
124
124
  }
125
- `}async function Ru(t,e){return uy(t,e)}async function gk(t,e,n){let{writeFile:r,mkdir:i}=await import("node:fs/promises"),{dirname:o}=await import("node:path"),s=await uy(t,n);await i(o(e),{recursive:!0}),await r(e,s,"utf-8")}async function yk(t,e,n){let r={...n,inlineViewRefs:!0},i=await Promise.all(e.map(R=>Ru(R,r))),o=await Ru(t,r),s=mk,a=await xu(n.elementMapPath),l=n.allowlistExtra??[],c=new Set;An(t.root,a,l,c);for(let R of e)An(R.root,a,l,c);let d=n.previewImports,p=d?.dispatch??n.runtimeImportFrom,f=d?.contracts??n.contractsImportFrom,m=d?.extensions??n.extensionsImportFrom,g=new Set([t.viewModel]);for(let R of e)for(let N of ly(R.propsType))g.add(N);let y=["import type { ReactElement } from 'react';",`import { dispatchAction } from '${p}';`,`import type { ${[...g].sort().join(", ")}, ActionDescriptor } from '${f}';`],w=[...c].sort();w.length>0&&y.push(`import { ${w.join(", ")} } from '${m}';`);let b=d?`/**
125
+ `}async function Ru(t,e){return uy(t,e)}async function gk(t,e,n){let{writeFile:r,mkdir:i}=await import("node:fs/promises"),{dirname:o}=await import("node:path"),s=await uy(t,n);await i(o(e),{recursive:!0}),await r(e,s,"utf-8")}async function yk(t,e,n){let r={...n,inlineViewRefs:!0},i=await Promise.all(e.map(I=>Ru(I,r))),o=await Ru(t,r),s=mk,a=await xu(n.elementMapPath),l=n.allowlistExtra??[],c=new Set;An(t.root,a,l,c);for(let I of e)An(I.root,a,l,c);let d=n.previewImports,p=d?.dispatch??n.runtimeImportFrom,f=d?.contracts??n.contractsImportFrom,m=d?.extensions??n.extensionsImportFrom,g=new Set([t.viewModel]);for(let I of e)for(let N of ly(I.propsType))g.add(N);let y=["import type { ReactElement } from 'react';",`import { dispatchAction } from '${p}';`,`import type { ${[...g].sort().join(", ")}, ActionDescriptor } from '${f}';`],w=[...c].sort();w.length>0&&y.push(`import { ${w.join(", ")} } from '${m}';`);let _=d?`/**
126
126
  * Preview module \u2014 compiled live from ${t.source}
127
127
  * Same lowering as generated/; not written to disk.
128
- */`:"",I=i.map(s),S=s(o);return`${b}
128
+ */`:"",R=i.map(s),x=s(o);return`${_}
129
129
  ${y.join(`
130
130
  `)}
131
131
 
132
- ${I.join(`
132
+ ${R.join(`
133
133
 
134
134
  `)}
135
135
 
136
- ${S}`}function wk(t,e){return pk(t,"components",`${e.exportName}.generated.tsx`)}var Tu=Y(()=>{"use strict";Gg();ay()});import{readFile as vk}from"node:fs/promises";import{extname as bk,resolve as _k}from"node:path";async function fs(t){let e=_k(t),n=await vk(e,"utf-8"),r=bk(e).toLowerCase();if(r===".json")return JSON.parse(n);if(r===".yaml"||r===".yml")return lt.load(n);throw new Error(`Unsupported design file extension "${r}" (expected .yaml, .yml, or .json): ${e}`)}var Au=Y(()=>{"use strict";Zn()});var hs,Tt,_r,ms,Ie,br,Mn=Y(()=>{"use strict";hs=["color","dimension","shadow","typography","layout"],Tt=class extends Error{constructor(e){super(e),this.name="DesignTokenError"}},_r=["background","foreground","radius","padding","shadow","typography","display","gridTemplateColumns","minHeight","maxWidth","width","height","margin","border","borderColor","flexDirection","fontWeight","fontSize","alignItems","justifyContent"],ms={background:["color"],foreground:["color"],radius:["dimension","layout"],padding:["dimension","layout"],shadow:["shadow"],typography:["typography"],display:["layout"],gridTemplateColumns:["layout"],minHeight:["dimension","layout"],maxWidth:["dimension","layout"],width:["dimension","layout"],height:["dimension","layout"],margin:["dimension","layout"],border:["layout"],borderColor:["color"],flexDirection:["layout"],fontWeight:["layout"],fontSize:["dimension","layout"],alignItems:["layout"],justifyContent:["layout"]},Ie=class extends Error{constructor(e){super(e),this.name="DesignThemeError"}},br=class extends Error{constructor(e){super(e),this.name="DesignConstraintError"}}});function $r(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function xk(t){if(!_r.includes(t))throw new Ie(`Unknown variant property "${t}" (expected ${_r.join(", ")})`);return t}function Sk(t,e,n){if(typeof t!="string")throw new Ie(`${e}.${n} must be a token reference string like "{ui.primary}"`);let r=t.match($k);if(!r)throw new Ie(`${e}.${n} must be a token reference like "{ui.primary}", got "${t}"`);return r[1]}function py(t,e){let n={};for(let[r,i]of Object.entries(e)){let o=xk(r),s=Sk(i,t,r);n[o]={ref:s,accepts:[...ms[o]]}}return n}function Ck(t){if(t===void 0)return{};if(!$r(t))throw new Ie('Theme "defaults" must be an object');let e={};for(let[n,r]of Object.entries(t)){if(!$r(r))throw new Ie(`Theme defaults for "${n}" must be an object`);e[n]=py(`defaults.${n}`,r)}return e}function Ou(t){if(!$r(t))throw new Ie("Theme document must be a YAML/JSON object");let e=t.variants;if(!$r(e))throw new Ie('Theme document must contain a "variants" object');let n={};for(let[r,i]of Object.entries(e)){if(!$r(i))throw new Ie(`Theme variants for "${r}" must be an object`);let o={};for(let[s,a]of Object.entries(i)){if(!$r(a))throw new Ie(`Theme variant "${r}.${s}" must be an object`);o[s]=py(`${r}.${s}`,a)}n[r]=o}return{defaults:Ck(t.defaults),variants:n}}var $k,Nu=Y(()=>{"use strict";Mn();$k=/^\{([^}]+)\}$/});function Li(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Ek(t){return`--${t.replace(/\./g,"-")}`}function Pk(t,e){if(typeof t!="string"||!hs.includes(t))throw new Tt(`Token "${e}" has unsupported $type "${String(t)}" (expected ${hs.join(", ")})`);return t}function dy(t,e,n){if(Li(t)){if("$type"in t&&"$value"in t){n.push({path:e,type:Pk(t.$type,e),rawValue:t.$value});return}for(let[r,i]of Object.entries(t)){if(r.startsWith("$"))continue;let o=e?`${e}.${r}`:r;dy(i,o,n)}}}function Rk(t,e){if(typeof e=="string")return e;if(t==="typography"&&Li(e)){if(typeof e.fontFamily=="string")return e.fontFamily;let n=[e.fontWeight,e.fontStyle,e.fontSize,e.lineHeight,e.fontFamily].filter(r=>r!=null);if(n.length>0)return n.map(String).join(" ")}if(t==="shadow"&&Array.isArray(e))return e.map(n=>Li(n)?`${n.offsetX??0} ${n.offsetY??0} ${n.blur??0} ${n.color??"transparent"}`:String(n)).join(", ");if(t==="shadow"&&Li(e))return`${e.offsetX??0} ${e.offsetY??0} ${e.blur??0} ${e.color??"transparent"}`;throw new Tt(`Token value for "${t}" must be a string or supported object`)}function Ik(t){return typeof t!="string"?null:t.match(kk)?.[1]??null}function fy(t,e,n,r,i){let o=Ik(e);if(!o){let l=n.get(t);if(!l)throw new Tt(`Unknown token path "${t}"`);return{value:Rk(l.type,e)}}if(r.has(t))throw new Tt(`Circular token reference detected at "${t}"`);let s=n.get(o);if(!s)throw new Tt(`Token "${t}" references unknown token "{${o}}"`);if(i.has(o))return{value:i.get(o),ref:o};r.add(t);let a=fy(o,s.rawValue,n,r,i);return r.delete(t),i.set(o,a.value),{value:a.value,ref:o}}function Mu(t){if(!Li(t))throw new Tt("Token document must be a YAML/JSON object");let e=[];dy(t,"",e);let n=new Map(e.map(o=>[o.path,o])),r=new Map,i=[];for(let o of e){let{value:s,ref:a}=fy(o.path,o.rawValue,n,new Set,r);r.set(o.path,s),i.push({path:o.path,type:o.type,value:s,cssVar:Ek(o.path),ref:a})}return{entries:i}}var kk,Vu=Y(()=>{"use strict";Mn();kk=/^\{([^}]+)\}$/});function Lu(t){let e=Td(t),n=new Set;for(let r of e)_r.includes(r)&&n.add(r);return n}var hy=Y(()=>{"use strict";wt();Mn()});function Tk(t){return new Map(t.entries.map(e=>[e.path,e]))}function my(t,e,n,r,i){for(let[o,s]of Object.entries(n)){let a=ms[o];if(!a)throw new Ie(`Unknown variant property "${o}" on ${t}`);if(!r.has(o))throw new Ie(`Property "${o}" is not allowed for ${e} in ${t}`);let l=i.get(s.ref);if(!l)throw new Ie(`${t}.${o} references unknown token "{${s.ref}}"`);if(!a.includes(l.type))throw new Ie(`${t}.${o} requires a ${a.join(" or ")} token, but "{${s.ref}}" is ${l.type}`)}}function gy(t,e){let n=Tk(t);for(let[r,i]of Object.entries(e.defaults)){let o=Lu(r);my(`defaults.${r}`,r,i,o,n)}for(let[r,i]of Object.entries(e.variants)){let o=Lu(r);for(let[s,a]of Object.entries(i))my(`variants.${r}.${s}`,r,a,o,n)}}function ju(t,e){gy(t,e)}var Du=Y(()=>{"use strict";Mn();hy()});function qu(t){let e=[":root {"];for(let n of t.entries)e.push(` ${n.cssVar}: ${n.value};`);return e.push("}"),e.join(`
136
+ ${x}`}function wk(t,e){return pk(t,"components",`${e.exportName}.generated.tsx`)}var Tu=Y(()=>{"use strict";Gg();ay()});import{readFile as vk}from"node:fs/promises";import{extname as bk,resolve as _k}from"node:path";async function fs(t){let e=_k(t),n=await vk(e,"utf-8"),r=bk(e).toLowerCase();if(r===".json")return JSON.parse(n);if(r===".yaml"||r===".yml")return lt.load(n);throw new Error(`Unsupported design file extension "${r}" (expected .yaml, .yml, or .json): ${e}`)}var Au=Y(()=>{"use strict";Zn()});var hs,Tt,_r,ms,Ie,br,Mn=Y(()=>{"use strict";hs=["color","dimension","shadow","typography","layout"],Tt=class extends Error{constructor(e){super(e),this.name="DesignTokenError"}},_r=["background","foreground","radius","padding","shadow","typography","display","gridTemplateColumns","minHeight","maxWidth","width","height","margin","border","borderColor","flexDirection","fontWeight","fontSize","alignItems","justifyContent"],ms={background:["color"],foreground:["color"],radius:["dimension","layout"],padding:["dimension","layout"],shadow:["shadow"],typography:["typography"],display:["layout"],gridTemplateColumns:["layout"],minHeight:["dimension","layout"],maxWidth:["dimension","layout"],width:["dimension","layout"],height:["dimension","layout"],margin:["dimension","layout"],border:["layout"],borderColor:["color"],flexDirection:["layout"],fontWeight:["layout"],fontSize:["dimension","layout"],alignItems:["layout"],justifyContent:["layout"]},Ie=class extends Error{constructor(e){super(e),this.name="DesignThemeError"}},br=class extends Error{constructor(e){super(e),this.name="DesignConstraintError"}}});function $r(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function xk(t){if(!_r.includes(t))throw new Ie(`Unknown variant property "${t}" (expected ${_r.join(", ")})`);return t}function Sk(t,e,n){if(typeof t!="string")throw new Ie(`${e}.${n} must be a token reference string like "{ui.primary}"`);let r=t.match($k);if(!r)throw new Ie(`${e}.${n} must be a token reference like "{ui.primary}", got "${t}"`);return r[1]}function py(t,e){let n={};for(let[r,i]of Object.entries(e)){let o=xk(r),s=Sk(i,t,r);n[o]={ref:s,accepts:[...ms[o]]}}return n}function Ck(t){if(t===void 0)return{};if(!$r(t))throw new Ie('Theme "defaults" must be an object');let e={};for(let[n,r]of Object.entries(t)){if(!$r(r))throw new Ie(`Theme defaults for "${n}" must be an object`);e[n]=py(`defaults.${n}`,r)}return e}function Ou(t){if(!$r(t))throw new Ie("Theme document must be a YAML/JSON object");let e=t.variants;if(!$r(e))throw new Ie('Theme document must contain a "variants" object');let n={};for(let[r,i]of Object.entries(e)){if(!$r(i))throw new Ie(`Theme variants for "${r}" must be an object`);let o={};for(let[s,a]of Object.entries(i)){if(!$r(a))throw new Ie(`Theme variant "${r}.${s}" must be an object`);o[s]=py(`${r}.${s}`,a)}n[r]=o}return{defaults:Ck(t.defaults),variants:n}}var $k,Nu=Y(()=>{"use strict";Mn();$k=/^\{([^}]+)\}$/});function Li(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Ek(t){return`--${t.replace(/\./g,"-")}`}function Pk(t,e){if(typeof t!="string"||!hs.includes(t))throw new Tt(`Token "${e}" has unsupported $type "${String(t)}" (expected ${hs.join(", ")})`);return t}function dy(t,e,n){if(Li(t)){if("$type"in t&&"$value"in t){n.push({path:e,type:Pk(t.$type,e),rawValue:t.$value});return}for(let[r,i]of Object.entries(t)){if(r.startsWith("$"))continue;let o=e?`${e}.${r}`:r;dy(i,o,n)}}}function Rk(t,e){if(typeof e=="string")return e;if(t==="typography"&&Li(e)){if(typeof e.fontFamily=="string")return e.fontFamily;let n=[e.fontWeight,e.fontStyle,e.fontSize,e.lineHeight,e.fontFamily].filter(r=>r!=null);if(n.length>0)return n.map(String).join(" ")}if(t==="shadow"&&Array.isArray(e))return e.map(n=>Li(n)?`${n.offsetX??0} ${n.offsetY??0} ${n.blur??0} ${n.color??"transparent"}`:String(n)).join(", ");if(t==="shadow"&&Li(e))return`${e.offsetX??0} ${e.offsetY??0} ${e.blur??0} ${e.color??"transparent"}`;throw new Tt(`Token value for "${t}" must be a string or supported object`)}function Ik(t){return typeof t!="string"?null:t.match(kk)?.[1]??null}function fy(t,e,n,r,i){let o=Ik(e);if(!o){let l=n.get(t);if(!l)throw new Tt(`Unknown token path "${t}"`);return{value:Rk(l.type,e)}}if(r.has(t))throw new Tt(`Circular token reference detected at "${t}"`);let s=n.get(o);if(!s)throw new Tt(`Token "${t}" references unknown token "{${o}}"`);if(i.has(o))return{value:i.get(o),ref:o};r.add(t);let a=fy(o,s.rawValue,n,r,i);return r.delete(t),i.set(o,a.value),{value:a.value,ref:o}}function Mu(t){if(!Li(t))throw new Tt("Token document must be a YAML/JSON object");let e=[];dy(t,"",e);let n=new Map(e.map(o=>[o.path,o])),r=new Map,i=[];for(let o of e){let{value:s,ref:a}=fy(o.path,o.rawValue,n,new Set,r);r.set(o.path,s),i.push({path:o.path,type:o.type,value:s,cssVar:Ek(o.path),ref:a})}return{entries:i}}var kk,Vu=Y(()=>{"use strict";Mn();kk=/^\{([^}]+)\}$/});function Lu(t){let e=Td(t),n=new Set;for(let r of e)_r.includes(r)&&n.add(r);return n}var hy=Y(()=>{"use strict";wt();Mn()});function Tk(t){return new Map(t.entries.map(e=>[e.path,e]))}function my(t,e,n,r,i){for(let[o,s]of Object.entries(n)){let a=ms[o];if(!a)throw new Ie(`Unknown variant property "${o}" on ${t}`);if(!r.has(o))throw new Ie(`Property "${o}" is not allowed for ${e} in ${t}`);let l=i.get(s.ref);if(!l)throw new Ie(`${t}.${o} references unknown token "{${s.ref}}"`);if(!a.includes(l.type))throw new Ie(`${t}.${o} requires a ${a.join(" or ")} token, but "{${s.ref}}" is ${l.type}`)}}function gy(t,e){let n=Tk(t);for(let[r,i]of Object.entries(e.defaults)){let o=Lu(r);my(`defaults.${r}`,r,i,o,n)}for(let[r,i]of Object.entries(e.variants)){let o=Lu(r);for(let[s,a]of Object.entries(i))my(`variants.${r}.${s}`,r,a,o,n)}}function ju(t,e){gy(t,e)}var Du=Y(()=>{"use strict";Mn();hy()});function qu(t){let e=[":root {"];for(let n of t.entries)e.push(` ${n.cssVar}: ${n.value};`);return e.push("}"),e.join(`
137
137
  `)}var yy=Y(()=>{"use strict"});var gs,Fu=Y(()=>{"use strict";gs={background:"background-color",foreground:"color",radius:"border-radius",padding:"padding",shadow:"box-shadow",typography:"font",display:"display",gridTemplateColumns:"grid-template-columns",minHeight:"min-height",maxWidth:"max-width",width:"width",height:"height",margin:"margin",border:"border",borderColor:"border-color",flexDirection:"flex-direction",fontWeight:"font-weight",fontSize:"font-size",alignItems:"align-items",justifyContent:"justify-content"}});function ys(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function ws(t,e){let n=t.entries.find(r=>r.path===e);if(!n)throw new Error(`Token reference "${e}" not found while emitting theme CSS`);return n.cssVar}var Bu=Y(()=>{"use strict"});function Hu(t,e){let n=[];for(let[r,i]of Object.entries(e.defaults)){let o=ys(r),s=[];for(let[a,l]of Object.entries(i)){let c=gs[a];if(!c){console.warn(`[view-contracts] CSS theme: variant property "${a}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let d=ws(t,l.ref);s.push(` ${c}: var(${d});`)}s.length!==0&&n.push(`.vc-${o} {
138
138
  ${s.join(`
139
139
  `)}
@@ -161,11 +161,11 @@ ${await Ey(p,"utf-8")}`),d}var _s=Y(()=>{"use strict";vt();Sr();bs()});var Ue=$(
161
161
  You can add a runtime option to disable the check or this warning:
162
162
  See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function LE(){Object.keys(Os).forEach(function(t){delete Os[t]})}});var Ms=$(At=>{"use strict";At.__esModule=!0;At.HandlebarsEnvironment=ap;function Zy(t){return t&&t.__esModule?t:{default:t}}var jn=Ue(),jE=rt(),op=Zy(jE),DE=tp(),qE=Ky(),FE=rp(),Ns=Zy(FE),BE=ip(),HE="4.7.9";At.VERSION=HE;var WE=8;At.COMPILER_REVISION=WE;var UE=7;At.LAST_COMPATIBLE_COMPILER_REVISION=UE;var zE={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"};At.REVISION_CHANGES=zE;var sp="[object Object]";function ap(t,e,n){this.helpers=t||{},this.partials=e||{},this.decorators=n||{},DE.registerDefaultHelpers(this),qE.registerDefaultDecorators(this)}ap.prototype={constructor:ap,logger:Ns.default,log:Ns.default.log,registerHelper:function(e,n){if(jn.toString.call(e)===sp){if(n)throw new op.default("Arg not supported with multiple helpers");jn.extend(this.helpers,e)}else this.helpers[e]=n},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,n){if(jn.toString.call(e)===sp)jn.extend(this.partials,e);else{if(typeof n>"u")throw new op.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=n}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,n){if(jn.toString.call(e)===sp){if(n)throw new op.default("Arg not supported with multiple decorators");jn.extend(this.decorators,e)}else this.decorators[e]=n},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){BE.resetLoggedProperties()}};var GE=Ns.default.log;At.log=GE;At.createFrame=jn.createFrame;At.logger=Ns.default});var tw=$((Vs,ew)=>{"use strict";Vs.__esModule=!0;function cp(t){this.string=t}cp.prototype.toString=cp.prototype.toHTML=function(){return""+this.string};Vs.default=cp;ew.exports=Vs.default});var nw=$(lp=>{"use strict";lp.__esModule=!0;lp.wrapHelper=JE;function JE(t,e){if(typeof t!="function")return t;var n=function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=e(i),t.apply(this,arguments)};return n}});var cw=$(hn=>{"use strict";hn.__esModule=!0;hn.checkRevision=eP;hn.template=tP;hn.wrapProgram=Ls;hn.resolvePartial=nP;hn.invokePartial=rP;hn.noop=sw;function KE(t){return t&&t.__esModule?t:{default:t}}function YE(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var XE=Ue(),kr=YE(XE),QE=rt(),Gt=KE(QE),Jt=Ms(),rw=tp(),ZE=nw(),iw=ip();function eP(t){var e=t&&t[0]||1,n=Jt.COMPILER_REVISION;if(!(e>=Jt.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Jt.COMPILER_REVISION))if(e<Jt.LAST_COMPATIBLE_COMPILER_REVISION){var r=Jt.REVISION_CHANGES[n],i=Jt.REVISION_CHANGES[e];throw new Gt.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+r+") or downgrade your runtime to an older version ("+i+").")}else throw new Gt.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}function tP(t,e){if(!e)throw new Gt.default("No environment passed to template");if(!t||!t.main)throw new Gt.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var n=t.compiler&&t.compiler[0]===7;function r(s,a,l){l.hash&&(a=kr.extend({},a,l.hash),l.ids&&(l.ids[0]=!0)),s=e.VM.resolvePartial.call(this,s,a,l),l.hooks=this.hooks,l.protoAccessControl=this.protoAccessControl;var c=e.VM.invokePartial.call(this,s,a,l);if(c==null&&e.compile&&(l.partials[l.name]=e.compile(s,t.compilerOptions,e),c=l.partials[l.name](a,l)),c!=null){if(l.indent){for(var d=c.split(`
163
163
  `),p=0,f=d.length;p<f&&!(!d[p]&&p+1===f);p++)d[p]=l.indent+d[p];c=d.join(`
164
- `)}return c}else throw new Gt.default("The partial "+l.name+" could not be compiled when running in runtime-only mode")}var i={strict:function(a,l,c){if(!a||!(l in a))throw new Gt.default('"'+l+'" not defined in '+a,{loc:c});return i.lookupProperty(a,l)},lookupProperty:function(a,l){var c=a[l];if(c==null||Object.prototype.hasOwnProperty.call(a,l)||iw.resultIsAllowed(c,i.protoAccessControl,l))return c},lookup:function(a,l){for(var c=a.length,d=0;d<c;d++){var p=a[d]&&i.lookupProperty(a[d],l);if(p!=null)return p}},lambda:function(a,l){return typeof a=="function"?a.call(l):a},escapeExpression:kr.escapeExpression,invokePartial:r,fn:function(a){var l=t[a];return l.decorator=t[a+"_d"],l},programs:[],program:function(a,l,c,d,p){var f=this.programs[a],m=this.fn(a);return l||p||d||c?f=Ls(this,a,m,l,c,d,p):f||(f=this.programs[a]=Ls(this,a,m)),f},data:function(a,l){for(;a&&l--;)a=a._parent;return a},mergeIfNeeded:function(a,l){var c=a||l;return a&&l&&a!==l&&(c=kr.extend({},l,a)),c},nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:t.compiler};function o(s){var a=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],l=a.data;o._setup(a),!a.partial&&t.useData&&(l=iP(s,l));var c=void 0,d=t.useBlockParams?[]:void 0;t.useDepths&&(a.depths?c=s!=a.depths[0]?[s].concat(a.depths):a.depths:c=[s]);function p(f){return""+t.main(i,f,i.helpers,i.partials,l,d,c)}return p=aw(t.main,p,i,a.depths||[],l,d),p(s,a)}return o.isTop=!0,o._setup=function(s){if(s.partial)i.protoAccessControl=s.protoAccessControl,i.helpers=s.helpers,i.partials=s.partials,i.decorators=s.decorators,i.hooks=s.hooks;else{var a={};ow(a,e.helpers,i),ow(a,s.helpers,i),i.helpers=a,t.usePartial&&(i.partials=i.mergeIfNeeded(s.partials,e.partials)),(t.usePartial||t.useDecorators)&&(i.decorators=kr.extend({},e.decorators,s.decorators)),i.hooks={},i.protoAccessControl=iw.createProtoAccessControl(s);var l=s.allowCallsToHelperMissing||n;rw.moveHelperToHooks(i,"helperMissing",l),rw.moveHelperToHooks(i,"blockHelperMissing",l)}},o._child=function(s,a,l,c){if(t.useBlockParams&&!l)throw new Gt.default("must pass block params");if(t.useDepths&&!c)throw new Gt.default("must pass parent depths");return Ls(i,s,t[s],a,0,l,c)},o}function Ls(t,e,n,r,i,o,s){function a(l){var c=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)),n(t,l,t.helpers,t.partials,c.data||r,o&&[c.blockParams].concat(o),d)}return a=aw(n,a,t,s,r,o),a.program=e,a.depth=s?s.length:0,a.blockParams=i||0,a}function nP(t,e,n){return t?!t.call&&!n.name&&(n.name=t,t=js(n.partials,t)):n.name==="@partial-block"?t=js(n.data,"partial-block"):t=js(n.partials,n.name),t}function rP(t,e,n){var r=js(n.data,"partial-block");n.partial=!0,n.ids&&(n.data.contextPath=n.ids[0]||n.data.contextPath);var i=void 0;if(n.fn&&n.fn!==sw&&(function(){n.data=Jt.createFrame(n.data);var o=n.fn;i=n.data["partial-block"]=function(a){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return l.data=Jt.createFrame(l.data),l.data["partial-block"]=r,o(a,l)},o.partials&&(n.partials=kr.extend({},n.partials,o.partials))})(),t===void 0&&i&&(t=i),t===void 0)throw new Gt.default("The partial "+n.name+" could not be found");if(t instanceof Function)return t(e,n)}function sw(){return""}function js(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function iP(t,e){return(!e||!("root"in e))&&(e=e?Jt.createFrame(e):{},e.root=t),e}function aw(t,e,n,r,i,o){if(t.decorator){var s={};e=t.decorator(e,s,n,r&&r[0],i,o,r),kr.extend(e,s)}return e}function ow(t,e,n){e&&Object.keys(e).forEach(function(r){var i=e[r];t[r]=oP(i,n)})}function oP(t,e){var n=e.lookupProperty;return ZE.wrapHelper(t,function(r){return r.lookupProperty=n,r})}});var up=$((Ds,lw)=>{"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}};lw.exports=Ds.default});var hw=$((qs,fw)=>{"use strict";qs.__esModule=!0;function dp(t){return t&&t.__esModule?t:{default:t}}function fp(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var sP=Ms(),uw=fp(sP),aP=tw(),cP=dp(aP),lP=rt(),uP=dp(lP),pP=Ue(),pp=fp(pP),dP=cw(),pw=fp(dP),fP=up(),hP=dp(fP);function dw(){var t=new uw.HandlebarsEnvironment;return pp.extend(t,uw),t.SafeString=cP.default,t.Exception=uP.default,t.Utils=pp,t.escapeExpression=pp.escapeExpression,t.VM=pw,t.template=function(e){return pw.template(e,t)},t}var Hi=dw();Hi.create=dw;hP.default(Hi);Hi.default=Hi;qs.default=Hi;fw.exports=qs.default});var hp=$((Fs,gw)=>{"use strict";Fs.__esModule=!0;var mw={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&&!mw.helpers.scopedId(e)&&!e.depth}}};Fs.default=mw;gw.exports=Fs.default});var ww=$((Bs,yw)=>{"use strict";Bs.__esModule=!0;var mP=(function(){var t={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(i,o,s,a,l,c,d){var p=c.length-1;switch(l){case 1:return c[p-1];case 2:this.$=a.prepareProgram(c[p]);break;case 3:this.$=c[p];break;case 4:this.$=c[p];break;case 5:this.$=c[p];break;case 6:this.$=c[p];break;case 7:this.$=c[p];break;case 8:this.$=c[p];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(c[p]),strip:a.stripFlags(c[p],c[p]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:c[p],value:c[p],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(c[p-2],c[p-1],c[p],this._$);break;case 12:this.$={path:c[p-3],params:c[p-2],hash:c[p-1]};break;case 13:this.$=a.prepareBlock(c[p-3],c[p-2],c[p-1],c[p],!1,this._$);break;case 14:this.$=a.prepareBlock(c[p-3],c[p-2],c[p-1],c[p],!0,this._$);break;case 15:this.$={open:c[p-5],path:c[p-4],params:c[p-3],hash:c[p-2],blockParams:c[p-1],strip:a.stripFlags(c[p-5],c[p])};break;case 16:this.$={path:c[p-4],params:c[p-3],hash:c[p-2],blockParams:c[p-1],strip:a.stripFlags(c[p-5],c[p])};break;case 17:this.$={path:c[p-4],params:c[p-3],hash:c[p-2],blockParams:c[p-1],strip:a.stripFlags(c[p-5],c[p])};break;case 18:this.$={strip:a.stripFlags(c[p-1],c[p-1]),program:c[p]};break;case 19:var f=a.prepareBlock(c[p-2],c[p-1],c[p],c[p],!1,this._$),m=a.prepareProgram([f],c[p-1].loc);m.chained=!0,this.$={strip:c[p-2].strip,program:m,chain:!0};break;case 20:this.$=c[p];break;case 21:this.$={path:c[p-1],strip:a.stripFlags(c[p-2],c[p])};break;case 22:this.$=a.prepareMustache(c[p-3],c[p-2],c[p-1],c[p-4],a.stripFlags(c[p-4],c[p]),this._$);break;case 23:this.$=a.prepareMustache(c[p-3],c[p-2],c[p-1],c[p-4],a.stripFlags(c[p-4],c[p]),this._$);break;case 24:this.$={type:"PartialStatement",name:c[p-3],params:c[p-2],hash:c[p-1],indent:"",strip:a.stripFlags(c[p-4],c[p]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(c[p-2],c[p-1],c[p],this._$);break;case 26:this.$={path:c[p-3],params:c[p-2],hash:c[p-1],strip:a.stripFlags(c[p-4],c[p])};break;case 27:this.$=c[p];break;case 28:this.$=c[p];break;case 29:this.$={type:"SubExpression",path:c[p-3],params:c[p-2],hash:c[p-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:c[p],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(c[p-2]),value:c[p],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(c[p-1]);break;case 33:this.$=c[p];break;case 34:this.$=c[p];break;case 35:this.$={type:"StringLiteral",value:c[p],original:c[p],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(c[p]),original:Number(c[p]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:c[p]==="true",original:c[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.$=c[p];break;case 41:this.$=c[p];break;case 42:this.$=a.preparePath(!0,c[p],this._$);break;case 43:this.$=a.preparePath(!1,c[p],this._$);break;case 44:c[p-2].push({part:a.id(c[p]),original:c[p],separator:c[p-1]}),this.$=c[p-2];break;case 45:this.$=[{part:a.id(c[p]),original:c[p]}];break;case 46:this.$=[];break;case 47:c[p-1].push(c[p]);break;case 48:this.$=[];break;case 49:c[p-1].push(c[p]);break;case 50:this.$=[];break;case 51:c[p-1].push(c[p]);break;case 58:this.$=[];break;case 59:c[p-1].push(c[p]);break;case 64:this.$=[];break;case 65:c[p-1].push(c[p]);break;case 70:this.$=[];break;case 71:c[p-1].push(c[p]);break;case 78:this.$=[];break;case 79:c[p-1].push(c[p]);break;case 82:this.$=[];break;case 83:c[p-1].push(c[p]);break;case 86:this.$=[];break;case 87:c[p-1].push(c[p]);break;case 90:this.$=[];break;case 91:c[p-1].push(c[p]);break;case 94:this.$=[];break;case 95:c[p-1].push(c[p]);break;case 98:this.$=[c[p]];break;case 99:c[p-1].push(c[p]);break;case 100:this.$=[c[p]];break;case 101:c[p-1].push(c[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],l=[],c=this.table,d="",p=0,f=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 w=this.lexer.yylloc;l.push(w);var b=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function I(D){s.length=s.length-2*D,a.length=a.length-D,l.length=l.length-D}function S(){var D;return D=o.lexer.lex()||1,typeof D!="number"&&(D=o.symbols_[D]||D),D}for(var R,N,j,G,ie,ge,xe={},Te,$e,Je,de;;){if(j=s[s.length-1],this.defaultActions[j]?G=this.defaultActions[j]:((R===null||typeof R>"u")&&(R=S()),G=c[j]&&c[j][R]),typeof G>"u"||!G.length||!G[0]){var X="";if(!m){de=[];for(Te in c[j])this.terminals_[Te]&&Te>2&&de.push("'"+this.terminals_[Te]+"'");this.lexer.showPosition?X="Parse error on line "+(p+1)+`:
164
+ `)}return c}else throw new Gt.default("The partial "+l.name+" could not be compiled when running in runtime-only mode")}var i={strict:function(a,l,c){if(!a||!(l in a))throw new Gt.default('"'+l+'" not defined in '+a,{loc:c});return i.lookupProperty(a,l)},lookupProperty:function(a,l){var c=a[l];if(c==null||Object.prototype.hasOwnProperty.call(a,l)||iw.resultIsAllowed(c,i.protoAccessControl,l))return c},lookup:function(a,l){for(var c=a.length,d=0;d<c;d++){var p=a[d]&&i.lookupProperty(a[d],l);if(p!=null)return p}},lambda:function(a,l){return typeof a=="function"?a.call(l):a},escapeExpression:kr.escapeExpression,invokePartial:r,fn:function(a){var l=t[a];return l.decorator=t[a+"_d"],l},programs:[],program:function(a,l,c,d,p){var f=this.programs[a],m=this.fn(a);return l||p||d||c?f=Ls(this,a,m,l,c,d,p):f||(f=this.programs[a]=Ls(this,a,m)),f},data:function(a,l){for(;a&&l--;)a=a._parent;return a},mergeIfNeeded:function(a,l){var c=a||l;return a&&l&&a!==l&&(c=kr.extend({},l,a)),c},nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:t.compiler};function o(s){var a=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],l=a.data;o._setup(a),!a.partial&&t.useData&&(l=iP(s,l));var c=void 0,d=t.useBlockParams?[]:void 0;t.useDepths&&(a.depths?c=s!=a.depths[0]?[s].concat(a.depths):a.depths:c=[s]);function p(f){return""+t.main(i,f,i.helpers,i.partials,l,d,c)}return p=aw(t.main,p,i,a.depths||[],l,d),p(s,a)}return o.isTop=!0,o._setup=function(s){if(s.partial)i.protoAccessControl=s.protoAccessControl,i.helpers=s.helpers,i.partials=s.partials,i.decorators=s.decorators,i.hooks=s.hooks;else{var a={};ow(a,e.helpers,i),ow(a,s.helpers,i),i.helpers=a,t.usePartial&&(i.partials=i.mergeIfNeeded(s.partials,e.partials)),(t.usePartial||t.useDecorators)&&(i.decorators=kr.extend({},e.decorators,s.decorators)),i.hooks={},i.protoAccessControl=iw.createProtoAccessControl(s);var l=s.allowCallsToHelperMissing||n;rw.moveHelperToHooks(i,"helperMissing",l),rw.moveHelperToHooks(i,"blockHelperMissing",l)}},o._child=function(s,a,l,c){if(t.useBlockParams&&!l)throw new Gt.default("must pass block params");if(t.useDepths&&!c)throw new Gt.default("must pass parent depths");return Ls(i,s,t[s],a,0,l,c)},o}function Ls(t,e,n,r,i,o,s){function a(l){var c=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)),n(t,l,t.helpers,t.partials,c.data||r,o&&[c.blockParams].concat(o),d)}return a=aw(n,a,t,s,r,o),a.program=e,a.depth=s?s.length:0,a.blockParams=i||0,a}function nP(t,e,n){return t?!t.call&&!n.name&&(n.name=t,t=js(n.partials,t)):n.name==="@partial-block"?t=js(n.data,"partial-block"):t=js(n.partials,n.name),t}function rP(t,e,n){var r=js(n.data,"partial-block");n.partial=!0,n.ids&&(n.data.contextPath=n.ids[0]||n.data.contextPath);var i=void 0;if(n.fn&&n.fn!==sw&&(function(){n.data=Jt.createFrame(n.data);var o=n.fn;i=n.data["partial-block"]=function(a){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return l.data=Jt.createFrame(l.data),l.data["partial-block"]=r,o(a,l)},o.partials&&(n.partials=kr.extend({},n.partials,o.partials))})(),t===void 0&&i&&(t=i),t===void 0)throw new Gt.default("The partial "+n.name+" could not be found");if(t instanceof Function)return t(e,n)}function sw(){return""}function js(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function iP(t,e){return(!e||!("root"in e))&&(e=e?Jt.createFrame(e):{},e.root=t),e}function aw(t,e,n,r,i,o){if(t.decorator){var s={};e=t.decorator(e,s,n,r&&r[0],i,o,r),kr.extend(e,s)}return e}function ow(t,e,n){e&&Object.keys(e).forEach(function(r){var i=e[r];t[r]=oP(i,n)})}function oP(t,e){var n=e.lookupProperty;return ZE.wrapHelper(t,function(r){return r.lookupProperty=n,r})}});var up=$((Ds,lw)=>{"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}};lw.exports=Ds.default});var hw=$((qs,fw)=>{"use strict";qs.__esModule=!0;function dp(t){return t&&t.__esModule?t:{default:t}}function fp(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var sP=Ms(),uw=fp(sP),aP=tw(),cP=dp(aP),lP=rt(),uP=dp(lP),pP=Ue(),pp=fp(pP),dP=cw(),pw=fp(dP),fP=up(),hP=dp(fP);function dw(){var t=new uw.HandlebarsEnvironment;return pp.extend(t,uw),t.SafeString=cP.default,t.Exception=uP.default,t.Utils=pp,t.escapeExpression=pp.escapeExpression,t.VM=pw,t.template=function(e){return pw.template(e,t)},t}var Hi=dw();Hi.create=dw;hP.default(Hi);Hi.default=Hi;qs.default=Hi;fw.exports=qs.default});var hp=$((Fs,gw)=>{"use strict";Fs.__esModule=!0;var mw={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&&!mw.helpers.scopedId(e)&&!e.depth}}};Fs.default=mw;gw.exports=Fs.default});var ww=$((Bs,yw)=>{"use strict";Bs.__esModule=!0;var mP=(function(){var t={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(i,o,s,a,l,c,d){var p=c.length-1;switch(l){case 1:return c[p-1];case 2:this.$=a.prepareProgram(c[p]);break;case 3:this.$=c[p];break;case 4:this.$=c[p];break;case 5:this.$=c[p];break;case 6:this.$=c[p];break;case 7:this.$=c[p];break;case 8:this.$=c[p];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(c[p]),strip:a.stripFlags(c[p],c[p]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:c[p],value:c[p],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(c[p-2],c[p-1],c[p],this._$);break;case 12:this.$={path:c[p-3],params:c[p-2],hash:c[p-1]};break;case 13:this.$=a.prepareBlock(c[p-3],c[p-2],c[p-1],c[p],!1,this._$);break;case 14:this.$=a.prepareBlock(c[p-3],c[p-2],c[p-1],c[p],!0,this._$);break;case 15:this.$={open:c[p-5],path:c[p-4],params:c[p-3],hash:c[p-2],blockParams:c[p-1],strip:a.stripFlags(c[p-5],c[p])};break;case 16:this.$={path:c[p-4],params:c[p-3],hash:c[p-2],blockParams:c[p-1],strip:a.stripFlags(c[p-5],c[p])};break;case 17:this.$={path:c[p-4],params:c[p-3],hash:c[p-2],blockParams:c[p-1],strip:a.stripFlags(c[p-5],c[p])};break;case 18:this.$={strip:a.stripFlags(c[p-1],c[p-1]),program:c[p]};break;case 19:var f=a.prepareBlock(c[p-2],c[p-1],c[p],c[p],!1,this._$),m=a.prepareProgram([f],c[p-1].loc);m.chained=!0,this.$={strip:c[p-2].strip,program:m,chain:!0};break;case 20:this.$=c[p];break;case 21:this.$={path:c[p-1],strip:a.stripFlags(c[p-2],c[p])};break;case 22:this.$=a.prepareMustache(c[p-3],c[p-2],c[p-1],c[p-4],a.stripFlags(c[p-4],c[p]),this._$);break;case 23:this.$=a.prepareMustache(c[p-3],c[p-2],c[p-1],c[p-4],a.stripFlags(c[p-4],c[p]),this._$);break;case 24:this.$={type:"PartialStatement",name:c[p-3],params:c[p-2],hash:c[p-1],indent:"",strip:a.stripFlags(c[p-4],c[p]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(c[p-2],c[p-1],c[p],this._$);break;case 26:this.$={path:c[p-3],params:c[p-2],hash:c[p-1],strip:a.stripFlags(c[p-4],c[p])};break;case 27:this.$=c[p];break;case 28:this.$=c[p];break;case 29:this.$={type:"SubExpression",path:c[p-3],params:c[p-2],hash:c[p-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:c[p],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(c[p-2]),value:c[p],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(c[p-1]);break;case 33:this.$=c[p];break;case 34:this.$=c[p];break;case 35:this.$={type:"StringLiteral",value:c[p],original:c[p],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(c[p]),original:Number(c[p]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:c[p]==="true",original:c[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.$=c[p];break;case 41:this.$=c[p];break;case 42:this.$=a.preparePath(!0,c[p],this._$);break;case 43:this.$=a.preparePath(!1,c[p],this._$);break;case 44:c[p-2].push({part:a.id(c[p]),original:c[p],separator:c[p-1]}),this.$=c[p-2];break;case 45:this.$=[{part:a.id(c[p]),original:c[p]}];break;case 46:this.$=[];break;case 47:c[p-1].push(c[p]);break;case 48:this.$=[];break;case 49:c[p-1].push(c[p]);break;case 50:this.$=[];break;case 51:c[p-1].push(c[p]);break;case 58:this.$=[];break;case 59:c[p-1].push(c[p]);break;case 64:this.$=[];break;case 65:c[p-1].push(c[p]);break;case 70:this.$=[];break;case 71:c[p-1].push(c[p]);break;case 78:this.$=[];break;case 79:c[p-1].push(c[p]);break;case 82:this.$=[];break;case 83:c[p-1].push(c[p]);break;case 86:this.$=[];break;case 87:c[p-1].push(c[p]);break;case 90:this.$=[];break;case 91:c[p-1].push(c[p]);break;case 94:this.$=[];break;case 95:c[p-1].push(c[p]);break;case 98:this.$=[c[p]];break;case 99:c[p-1].push(c[p]);break;case 100:this.$=[c[p]];break;case 101:c[p-1].push(c[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],l=[],c=this.table,d="",p=0,f=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 w=this.lexer.yylloc;l.push(w);var _=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function R(D){s.length=s.length-2*D,a.length=a.length-D,l.length=l.length-D}function x(){var D;return D=o.lexer.lex()||1,typeof D!="number"&&(D=o.symbols_[D]||D),D}for(var I,N,j,G,ie,ge,xe={},Te,$e,Je,de;;){if(j=s[s.length-1],this.defaultActions[j]?G=this.defaultActions[j]:((I===null||typeof I>"u")&&(I=x()),G=c[j]&&c[j][I]),typeof G>"u"||!G.length||!G[0]){var X="";if(!m){de=[];for(Te in c[j])this.terminals_[Te]&&Te>2&&de.push("'"+this.terminals_[Te]+"'");this.lexer.showPosition?X="Parse error on line "+(p+1)+`:
165
165
  `+this.lexer.showPosition()+`
166
- Expecting `+de.join(", ")+", got '"+(this.terminals_[R]||R)+"'":X="Parse error on line "+(p+1)+": Unexpected "+(R==1?"end of input":"'"+(this.terminals_[R]||R)+"'"),this.parseError(X,{text:this.lexer.match,token:this.terminals_[R]||R,line:this.lexer.yylineno,loc:w,expected:de})}}if(G[0]instanceof Array&&G.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+R);switch(G[0]){case 1:s.push(R),a.push(this.lexer.yytext),l.push(this.lexer.yylloc),s.push(G[1]),R=null,N?(R=N,N=null):(f=this.lexer.yyleng,d=this.lexer.yytext,p=this.lexer.yylineno,w=this.lexer.yylloc,m>0&&m--);break;case 2:if($e=this.productions_[G[1]][1],xe.$=a[a.length-$e],xe._$={first_line:l[l.length-($e||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-($e||1)].first_column,last_column:l[l.length-1].last_column},b&&(xe._$.range=[l[l.length-($e||1)].range[0],l[l.length-1].range[1]]),ge=this.performAction.call(xe,d,f,p,this.yy,G[1],a,l),typeof ge<"u")return ge;$e&&(s=s.slice(0,-1*$e*2),a=a.slice(0,-1*$e),l=l.slice(0,-1*$e)),s.push(this.productions_[G[1]][0]),a.push(xe.$),l.push(xe._$),Je=c[s[s.length-2]][s[s.length-1]],s.push(Je);break;case 3:return!0}}return!0}},e=(function(){var r={EOF:1,parseError:function(o,s){if(this.yy.parser)this.yy.parser.parseError(o,s);else throw new Error(o)},setInput:function(o){return this._input=o,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var s=o.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},unput:function(o){var s=o.length,a=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s-1),this.offset-=s;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var c=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===l.length?this.yylloc.first_column:0)+l[l.length-a.length].length-a[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[c[0],c[0]+this.yyleng-s]),this},more:function(){return this._more=!0,this},less:function(o){this.unput(this.match.slice(o))},pastInput:function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var o=this.pastInput(),s=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
166
+ Expecting `+de.join(", ")+", got '"+(this.terminals_[I]||I)+"'":X="Parse error on line "+(p+1)+": Unexpected "+(I==1?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(X,{text:this.lexer.match,token:this.terminals_[I]||I,line:this.lexer.yylineno,loc:w,expected:de})}}if(G[0]instanceof Array&&G.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+I);switch(G[0]){case 1:s.push(I),a.push(this.lexer.yytext),l.push(this.lexer.yylloc),s.push(G[1]),I=null,N?(I=N,N=null):(f=this.lexer.yyleng,d=this.lexer.yytext,p=this.lexer.yylineno,w=this.lexer.yylloc,m>0&&m--);break;case 2:if($e=this.productions_[G[1]][1],xe.$=a[a.length-$e],xe._$={first_line:l[l.length-($e||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-($e||1)].first_column,last_column:l[l.length-1].last_column},_&&(xe._$.range=[l[l.length-($e||1)].range[0],l[l.length-1].range[1]]),ge=this.performAction.call(xe,d,f,p,this.yy,G[1],a,l),typeof ge<"u")return ge;$e&&(s=s.slice(0,-1*$e*2),a=a.slice(0,-1*$e),l=l.slice(0,-1*$e)),s.push(this.productions_[G[1]][0]),a.push(xe.$),l.push(xe._$),Je=c[s[s.length-2]][s[s.length-1]],s.push(Je);break;case 3:return!0}}return!0}},e=(function(){var r={EOF:1,parseError:function(o,s){if(this.yy.parser)this.yy.parser.parseError(o,s);else throw new Error(o)},setInput:function(o){return this._input=o,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var s=o.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},unput:function(o){var s=o.length,a=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s-1),this.offset-=s;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var c=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===l.length?this.yylloc.first_column:0)+l[l.length-a.length].length-a[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[c[0],c[0]+this.yyleng-s]),this},more:function(){return this._more=!0,this},less:function(o){this.unput(this.match.slice(o))},pastInput:function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var o=this.pastInput(),s=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
167
167
  `+s+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,s,a,l,c,d;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),f=0;f<p.length&&(a=this._input.match(this.rules[p[f]]),!(a&&(!s||a[0].length>s[0].length)&&(s=a,l=f,!this.options.flex)));f++);return s?(d=s[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],o=this.performAction.call(this,this.yy,this,p[l],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
168
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var o=this.next();return typeof o<"u"?o:this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(o){this.begin(o)}};return r.options={},r.performAction=function(o,s,a,l){function c(p,f){return s.yytext=s.yytext.substring(p,s.yyleng-f+p)}var d=l;switch(a){case 0:if(s.yytext.slice(-2)==="\\\\"?(c(0,1),this.begin("mu")):s.yytext.slice(-1)==="\\"?(c(0,1),this.begin("emu")):this.begin("mu"),s.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(c(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(s.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return s.yytext=c(1,2).replace(/\\"/g,'"'),80;break;case 32:return s.yytext=c(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return s.yytext=s.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},r.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],r.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},r})();t.lexer=e;function n(){this.yy={}}return n.prototype=t,t.Parser=n,new n})();Bs.default=mP;yw.exports=Bs.default});var zs=$((Us,_w)=>{"use strict";Us.__esModule=!0;function gP(t){return t&&t.__esModule?t:{default:t}}var yP=rt(),mp=gP(yP);function Hs(){this.parents=[]}Hs.prototype={constructor:Hs,mutating:!1,acceptKey:function(e,n){var r=this.accept(e[n]);if(this.mutating){if(r&&!Hs.prototype[r.type])throw new mp.default('Unexpected node type "'+r.type+'" found when accepting '+n+" on "+e.type);e[n]=r}},acceptRequired:function(e,n){if(this.acceptKey(e,n),!e[n])throw new mp.default(e.type+" requires "+n)},acceptArray:function(e){for(var n=0,r=e.length;n<r;n++)this.acceptKey(e,n),e[n]||(e.splice(n,1),n--,r--)},accept:function(e){if(e){if(!this[e.type])throw new mp.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var n=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||n)return n;if(n!==!1)return e}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:Ws,Decorator:Ws,BlockStatement:vw,DecoratorBlock:vw,PartialStatement:bw,PartialBlockStatement:function(e){bw.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:Ws,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 Ws(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function vw(t){Ws.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function bw(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}Us.default=Hs;_w.exports=Us.default});var xw=$((Gs,$w)=>{"use strict";Gs.__esModule=!0;function wP(t){return t&&t.__esModule?t:{default:t}}var vP=zs(),bP=wP(vP);function Ot(){var t=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=t}Ot.prototype=new bP.default;Ot.prototype.Program=function(t){var e=!this.options.ignoreStandalone,n=!this.isRootSeen;this.isRootSeen=!0;for(var r=t.body,i=0,o=r.length;i<o;i++){var s=r[i],a=this.accept(s);if(a){var l=gp(r,i,n),c=yp(r,i,n),d=a.openStandalone&&l,p=a.closeStandalone&&c,f=a.inlineStandalone&&l&&c;a.close&&Dn(r,i,!0),a.open&&mn(r,i,!0),e&&f&&(Dn(r,i),mn(r,i)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(r[i-1].original)[1])),e&&d&&(Dn((s.program||s.inverse).body),mn(r,i)),e&&p&&(Dn(r,i),mn((s.inverse||s.program).body))}}return t};Ot.prototype.BlockStatement=Ot.prototype.DecoratorBlock=Ot.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,n=t.program&&t.inverse,r=n,i=n;if(n&&n.chained)for(r=n.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var o={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:yp(e.body),closeStandalone:gp((r||e).body)};if(t.openStrip.close&&Dn(e.body,null,!0),n){var s=t.inverseStrip;s.open&&mn(e.body,null,!0),s.close&&Dn(r.body,null,!0),t.closeStrip.open&&mn(i.body,null,!0),!this.options.ignoreStandalone&&gp(e.body)&&yp(r.body)&&(mn(e.body),Dn(r.body))}else t.closeStrip.open&&mn(e.body,null,!0);return o};Ot.prototype.Decorator=Ot.prototype.MustacheStatement=function(t){return t.strip};Ot.prototype.PartialStatement=Ot.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function gp(t,e,n){e===void 0&&(e=t.length);var r=t[e-1],i=t[e-2];if(!r)return n;if(r.type==="ContentStatement")return(i||!n?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(r.original)}function yp(t,e,n){e===void 0&&(e=-1);var r=t[e+1],i=t[e+2];if(!r)return n;if(r.type==="ContentStatement")return(i||!n?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(r.original)}function Dn(t,e,n){var r=t[e==null?0:e+1];if(!(!r||r.type!=="ContentStatement"||!n&&r.rightStripped)){var i=r.value;r.value=r.value.replace(n?/^\s+/:/^[ \t]*\r?\n?/,""),r.rightStripped=r.value!==i}}function mn(t,e,n){var r=t[e==null?t.length-1:e-1];if(!(!r||r.type!=="ContentStatement"||!n&&r.leftStripped)){var i=r.value;return r.value=r.value.replace(n?/\s+$/:/[ \t]+$/,""),r.leftStripped=r.value!==i,r.leftStripped}}Gs.default=Ot;$w.exports=Gs.default});var Sw=$(mt=>{"use strict";mt.__esModule=!0;mt.SourceLocation=xP;mt.id=SP;mt.stripFlags=CP;mt.stripComment=kP;mt.preparePath=EP;mt.prepareMustache=PP;mt.prepareRawBlock=RP;mt.prepareBlock=IP;mt.prepareProgram=TP;mt.preparePartialBlock=AP;function _P(t){return t&&t.__esModule?t:{default:t}}var $P=rt(),wp=_P($P);function vp(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var n={loc:t.path.loc};throw new wp.default(t.path.original+" doesn't match "+e,n)}}function xP(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 SP(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function CP(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function kP(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function EP(t,e,n){n=this.locInfo(n);for(var r=t?"@":"",i=[],o=0,s=0,a=e.length;s<a;s++){var l=e[s].part,c=e[s].original!==l;if(r+=(e[s].separator||"")+l,!c&&(l===".."||l==="."||l==="this")){if(i.length>0)throw new wp.default("Invalid path: "+r,{loc:n});l===".."&&o++}else i.push(l)}return{type:"PathExpression",data:t,depth:o,parts:i,original:r,loc:n}}function PP(t,e,n,r,i,o){var s=r.charAt(3)||r.charAt(2),a=s!=="{"&&s!=="&",l=/\*/.test(r);return{type:l?"Decorator":"MustacheStatement",path:t,params:e,hash:n,escaped:a,strip:i,loc:this.locInfo(o)}}function RP(t,e,n,r){vp(t,n),r=this.locInfo(r);var i={type:"Program",body:e,strip:{},loc:r};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:r}}function IP(t,e,n,r,i,o){r&&r.path&&vp(t,r);var s=/\*/.test(t.open);e.blockParams=t.blockParams;var a=void 0,l=void 0;if(n){if(s)throw new wp.default("Unexpected inverse block on decorator",n);n.chain&&(n.program.body[0].closeStrip=r.strip),l=n.strip,a=n.program}return i&&(i=a,a=e,e=i),{type:s?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:a,openStrip:t.strip,inverseStrip:l,closeStrip:r&&r.strip,loc:this.locInfo(o)}}function TP(t,e){if(!e&&t.length){var n=t[0].loc,r=t[t.length-1].loc;n&&r&&(e={source:n.source,start:{line:n.start.line,column:n.start.column},end:{line:r.end.line,column:r.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function AP(t,e,n,r){return vp(t,n),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:n&&n.strip,loc:this.locInfo(r)}}});var kw=$(Ui=>{"use strict";Ui.__esModule=!0;Ui.parseWithoutProcessing=Cw;Ui.parse=FP;function OP(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function $p(t){return t&&t.__esModule?t:{default:t}}var NP=ww(),bp=$p(NP),MP=xw(),VP=$p(MP),LP=Sw(),jP=OP(LP),DP=rt(),Wi=$p(DP),qP=Ue();Ui.parser=bp.default;var Js={};qP.extend(Js,jP);function Cw(t,e){if(t.type==="Program")return BP(t),t;bp.default.yy=Js,Js.locInfo=function(r){return new Js.SourceLocation(e&&e.srcName,r)};var n=bp.default.parse(t);return n}function FP(t,e){var n=Cw(t,e),r=new VP.default(e);return r.accept(n)}function BP(t){_p(t)}function _p(t){if(t!=null){if(Array.isArray(t)){t.forEach(_p);return}if(typeof t=="object"){if(t.type==="PathExpression"){if(!HP(t.depth))throw new Wi.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(t.parts))throw new Wi.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 Wi.default("Invalid AST: PathExpression.parts must only contain strings")}else if(t.type==="NumberLiteral"){if(typeof t.value!="number"||!isFinite(t.value))throw new Wi.default("Invalid AST: NumberLiteral.value must be a number")}else if(t.type==="BooleanLiteral"&&typeof t.value!="boolean")throw new Wi.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(t).forEach(function(n){n!=="loc"&&_p(t[n])})}}}function HP(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0}});var Iw=$(Ki=>{"use strict";Ki.__esModule=!0;Ki.Compiler=xp;Ki.precompile=GP;Ki.compile=JP;function Pw(t){return t&&t.__esModule?t:{default:t}}var WP=rt(),Gi=Pw(WP),Ji=Ue(),UP=hp(),zi=Pw(UP),zP=[].slice;function xp(){}xp.prototype={compiler:xp,equals:function(e){var n=this.opcodes.length;if(e.opcodes.length!==n)return!1;for(var r=0;r<n;r++){var i=this.opcodes[r],o=e.opcodes[r];if(i.opcode!==o.opcode||!Rw(i.args,o.args))return!1}n=this.children.length;for(var r=0;r<n;r++)if(!this.children[r].equals(e.children[r]))return!1;return!0},guid:0,compile:function(e,n){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=n,this.stringParams=n.stringParams,this.trackIds=n.trackIds,n.blockParams=n.blockParams||[],n.knownHelpers=Ji.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},n.knownHelpers),this.accept(e)},compileProgram:function(e){var n=new this.compiler,r=n.compile(e,this.options),i=this.guid++;return this.usePartial=this.usePartial||r.usePartial,this.children[i]=r,this.useDepths=this.useDepths||r.useDepths,i},accept:function(e){if(!this[e.type])throw new Gi.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var n=this[e.type](e);return this.sourceNode.shift(),n},Program:function(e){this.options.blockParams.unshift(e.blockParams);for(var n=e.body,r=n.length,i=0;i<r;i++)this.accept(n[i]);return this.options.blockParams.shift(),this.isSimple=r===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){Ew(e);var n=e.program,r=e.inverse;n=n&&this.compileProgram(n),r=r&&this.compileProgram(r);var i=this.classifySexpr(e);i==="helper"?this.helperSexpr(e,n,r):i==="simple"?(this.simpleSexpr(e),this.opcode("pushProgram",n),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,n,r),this.opcode("pushProgram",n),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(e){var n=e.program&&this.compileProgram(e.program),r=this.setupFullMustacheParams(e,n,void 0),i=e.path;this.useDecorators=!0,this.opcode("registerDecorator",r.length,i.original)},PartialStatement:function(e){this.usePartial=!0;var n=e.program;n&&(n=this.compileProgram(e.program));var r=e.params;if(r.length>1)throw new Gi.default("Unsupported number of partial arguments: "+r.length,e);r.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):r.push({type:"PathExpression",parts:[],depth:0}));var i=e.name.original,o=e.name.type==="SubExpression";o&&this.accept(e.name),this.setupFullMustacheParams(e,n,void 0,!0);var s=e.indent||"";this.options.preventIndent&&s&&(this.opcode("appendContent",s),s=""),this.opcode("invokePartial",o,i,s),this.opcode("append")},PartialBlockStatement:function(e){this.PartialStatement(e)},MustacheStatement:function(e){this.SubExpression(e),e.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(e){this.DecoratorBlock(e)},ContentStatement:function(e){e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){Ew(e);var n=this.classifySexpr(e);n==="simple"?this.simpleSexpr(e):n==="helper"?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,n,r){var i=e.path,o=i.parts[0],s=n!=null||r!=null;this.opcode("getContext",i.depth),this.opcode("pushProgram",n),this.opcode("pushProgram",r),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",o,s)},simpleSexpr:function(e){var n=e.path;n.strict=!0,this.accept(n),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,n,r){var i=this.setupFullMustacheParams(e,n,r),o=e.path,s=o.parts[0];if(this.options.knownHelpers[s])this.opcode("invokeKnownHelper",i.length,s);else{if(this.options.knownHelpersOnly)throw new Gi.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,zi.default.helpers.simpleId(o))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var n=e.parts[0],r=zi.default.helpers.scopedId(e),i=!e.depth&&!r&&this.blockParamIndex(n);i?this.opcode("lookupBlockParam",i,e.parts):n?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,r):this.opcode("pushContext")},StringLiteral:function(e){this.opcode("pushString",e.value)},NumberLiteral:function(e){this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var n=e.pairs,r=0,i=n.length;for(this.opcode("pushHash");r<i;r++)this.pushParam(n[r].value);for(;r--;)this.opcode("assignToHash",n[r].key);this.opcode("popHash")},opcode:function(e){this.opcodes.push({opcode:e,args:zP.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var n=zi.default.helpers.simpleId(e.path),r=n&&!!this.blockParamIndex(e.path.parts[0]),i=!r&&zi.default.helpers.helperExpression(e),o=!r&&(i||n);if(o&&!i){var s=e.path.parts[0],a=this.options;a.knownHelpers[s]?i=!0:a.knownHelpersOnly&&(o=!1)}return i?"helper":o?"ambiguous":"simple"},pushParams:function(e){for(var n=0,r=e.length;n<r;n++)this.pushParam(e[n])},pushParam:function(e){var n=e.value!=null?e.value:e.original||"";if(this.stringParams)n.replace&&(n=n.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",n,e.type),e.type==="SubExpression"&&this.accept(e);else{if(this.trackIds){var r=void 0;if(e.parts&&!zi.default.helpers.scopedId(e)&&!e.depth&&(r=this.blockParamIndex(e.parts[0])),r){var i=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",r,i)}else n=e.original||n,n.replace&&(n=n.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",e.type,n)}this.accept(e)}},setupFullMustacheParams:function(e,n,r,i){var o=e.params;return this.pushParams(o),this.opcode("pushProgram",n),this.opcode("pushProgram",r),e.hash?this.accept(e.hash):this.opcode("emptyHash",i),o},blockParamIndex:function(e){for(var n=0,r=this.options.blockParams.length;n<r;n++){var i=this.options.blockParams[n],o=i&&Ji.indexOf(i,e);if(i&&o>=0)return[n,o]}}};function GP(t,e,n){if(t==null||typeof t!="string"&&t.type!=="Program")throw new Gi.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);e=e||{},"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var r=n.parse(t,e),i=new n.Compiler().compile(r,e);return new n.JavaScriptCompiler().compile(i,e)}function JP(t,e,n){if(e===void 0&&(e={}),t==null||typeof t!="string"&&t.type!=="Program")throw new Gi.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=Ji.extend({},e),"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var r=void 0;function i(){var s=n.parse(t,e),a=new n.Compiler().compile(s,e),l=new n.JavaScriptCompiler().compile(a,e,void 0,!0);return n.template(l)}function o(s,a){return r||(r=i()),r.call(this,s,a)}return o._setup=function(s){return r||(r=i()),r._setup(s)},o._child=function(s,a,l,c){return r||(r=i()),r._child(s,a,l,c)},o}function Rw(t,e){if(t===e)return!0;if(Ji.isArray(t)&&Ji.isArray(e)&&t.length===e.length){for(var n=0;n<t.length;n++)if(!Rw(t[n],e[n]))return!1;return!0}}function Ew(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 Aw=$(Sp=>{var Tw="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Sp.encode=function(t){if(0<=t&&t<Tw.length)return Tw[t];throw new TypeError("Must be between 0 and 63: "+t)};Sp.decode=function(t){var e=65,n=90,r=97,i=122,o=48,s=57,a=43,l=47,c=26,d=52;return e<=t&&t<=n?t-e:r<=t&&t<=i?t-r+c:o<=t&&t<=s?t-o+d:t==a?62:t==l?63:-1}});var Ep=$(kp=>{var Ow=Aw(),Cp=5,Nw=1<<Cp,Mw=Nw-1,Vw=Nw;function KP(t){return t<0?(-t<<1)+1:(t<<1)+0}function YP(t){var e=(t&1)===1,n=t>>1;return e?-n:n}kp.encode=function(e){var n="",r,i=KP(e);do r=i&Mw,i>>>=Cp,i>0&&(r|=Vw),n+=Ow.encode(r);while(i>0);return n};kp.decode=function(e,n,r){var i=e.length,o=0,s=0,a,l;do{if(n>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(l=Ow.decode(e.charCodeAt(n++)),l===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));a=!!(l&Vw),l&=Mw,o=o+(l<<s),s+=Cp}while(a);r.value=YP(o),r.rest=n}});var Rr=$(qe=>{function XP(t,e,n){if(e in t)return t[e];if(arguments.length===3)return n;throw new Error('"'+e+'" is a required argument.')}qe.getArg=XP;var Lw=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,QP=/^data:.+\,.+$/;function Yi(t){var e=t.match(Lw);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}qe.urlParse=Yi;function Er(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}qe.urlGenerate=Er;function Pp(t){var e=t,n=Yi(t);if(n){if(!n.path)return t;e=n.path}for(var r=qe.isAbsolute(e),i=e.split(/\/+/),o,s=0,a=i.length-1;a>=0;a--)o=i[a],o==="."?i.splice(a,1):o===".."?s++:s>0&&(o===""?(i.splice(a+1,s),s=0):(i.splice(a,2),s--));return e=i.join("/"),e===""&&(e=r?"/":"."),n?(n.path=e,Er(n)):e}qe.normalize=Pp;function jw(t,e){t===""&&(t="."),e===""&&(e=".");var n=Yi(e),r=Yi(t);if(r&&(t=r.path||"/"),n&&!n.scheme)return r&&(n.scheme=r.scheme),Er(n);if(n||e.match(QP))return e;if(r&&!r.host&&!r.path)return r.host=e,Er(r);var i=e.charAt(0)==="/"?e:Pp(t.replace(/\/+$/,"")+"/"+e);return r?(r.path=i,Er(r)):i}qe.join=jw;qe.isAbsolute=function(t){return t.charAt(0)==="/"||Lw.test(t)};function ZP(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var n=0;e.indexOf(t+"/")!==0;){var r=t.lastIndexOf("/");if(r<0||(t=t.slice(0,r),t.match(/^([^\/]+:\/)?\/*$/)))return e;++n}return Array(n+1).join("../")+e.substr(t.length+1)}qe.relative=ZP;var Dw=(function(){var t=Object.create(null);return!("__proto__"in t)})();function qw(t){return t}function eR(t){return Fw(t)?"$"+t:t}qe.toSetString=Dw?qw:eR;function tR(t){return Fw(t)?t.slice(1):t}qe.fromSetString=Dw?qw:tR;function Fw(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var n=e-10;n>=0;n--)if(t.charCodeAt(n)!==36)return!1;return!0}function nR(t,e,n){var r=Pr(t.source,e.source);return r!==0||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0||n)||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=t.generatedLine-e.generatedLine,r!==0)?r:Pr(t.name,e.name)}qe.compareByOriginalPositions=nR;function rR(t,e,n){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0||n)||(r=Pr(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:Pr(t.name,e.name)}qe.compareByGeneratedPositionsDeflated=rR;function Pr(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function iR(t,e){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=Pr(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:Pr(t.name,e.name)}qe.compareByGeneratedPositionsInflated=iR;function oR(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}qe.parseSourceMapInput=oR;function sR(t,e,n){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),n){var r=Yi(n);if(!r)throw new Error("sourceMapURL could not be parsed");if(r.path){var i=r.path.lastIndexOf("/");i>=0&&(r.path=r.path.substring(0,i+1))}e=jw(Er(r),e)}return Pp(e)}qe.computeSourceURL=sR});var Tp=$(Bw=>{var Rp=Rr(),Ip=Object.prototype.hasOwnProperty,qn=typeof Map<"u";function Kt(){this._array=[],this._set=qn?new Map:Object.create(null)}Kt.fromArray=function(e,n){for(var r=new Kt,i=0,o=e.length;i<o;i++)r.add(e[i],n);return r};Kt.prototype.size=function(){return qn?this._set.size:Object.getOwnPropertyNames(this._set).length};Kt.prototype.add=function(e,n){var r=qn?e:Rp.toSetString(e),i=qn?this.has(e):Ip.call(this._set,r),o=this._array.length;(!i||n)&&this._array.push(e),i||(qn?this._set.set(e,o):this._set[r]=o)};Kt.prototype.has=function(e){if(qn)return this._set.has(e);var n=Rp.toSetString(e);return Ip.call(this._set,n)};Kt.prototype.indexOf=function(e){if(qn){var n=this._set.get(e);if(n>=0)return n}else{var r=Rp.toSetString(e);if(Ip.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')};Kt.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Kt.prototype.toArray=function(){return this._array.slice()};Bw.ArraySet=Kt});var Uw=$(Ww=>{var Hw=Rr();function aR(t,e){var n=t.generatedLine,r=e.generatedLine,i=t.generatedColumn,o=e.generatedColumn;return r>n||r==n&&o>=i||Hw.compareByGeneratedPositionsInflated(t,e)<=0}function Ks(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Ks.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)};Ks.prototype.add=function(e){aR(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Ks.prototype.toArray=function(){return this._sorted||(this._array.sort(Hw.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Ww.MappingList=Ks});var Ap=$(zw=>{var Xi=Ep(),Pe=Rr(),Ys=Tp().ArraySet,cR=Uw().MappingList;function gt(t){t||(t={}),this._file=Pe.getArg(t,"file",null),this._sourceRoot=Pe.getArg(t,"sourceRoot",null),this._skipValidation=Pe.getArg(t,"skipValidation",!1),this._sources=new Ys,this._names=new Ys,this._mappings=new cR,this._sourcesContents=null}gt.prototype._version=3;gt.fromSourceMap=function(e){var n=e.sourceRoot,r=new gt({file:e.file,sourceRoot:n});return e.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,n!=null&&(o.source=Pe.relative(n,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),r.addMapping(o)}),e.sources.forEach(function(i){var o=i;n!==null&&(o=Pe.relative(n,i)),r._sources.has(o)||r._sources.add(o);var s=e.sourceContentFor(i);s!=null&&r.setSourceContent(i,s)}),r};gt.prototype.addMapping=function(e){var n=Pe.getArg(e,"generated"),r=Pe.getArg(e,"original",null),i=Pe.getArg(e,"source",null),o=Pe.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,r,i,o),i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),o!=null&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:i,name:o})};gt.prototype.setSourceContent=function(e,n){var r=e;this._sourceRoot!=null&&(r=Pe.relative(this._sourceRoot,r)),n!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Pe.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[Pe.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};gt.prototype.applySourceMap=function(e,n,r){var i=n;if(n==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=e.file}var o=this._sourceRoot;o!=null&&(i=Pe.relative(o,i));var s=new Ys,a=new Ys;this._mappings.unsortedForEach(function(l){if(l.source===i&&l.originalLine!=null){var c=e.originalPositionFor({line:l.originalLine,column:l.originalColumn});c.source!=null&&(l.source=c.source,r!=null&&(l.source=Pe.join(r,l.source)),o!=null&&(l.source=Pe.relative(o,l.source)),l.originalLine=c.line,l.originalColumn=c.column,c.name!=null&&(l.name=c.name))}var d=l.source;d!=null&&!s.has(d)&&s.add(d);var p=l.name;p!=null&&!a.has(p)&&a.add(p)},this),this._sources=s,this._names=a,e.sources.forEach(function(l){var c=e.sourceContentFor(l);c!=null&&(r!=null&&(l=Pe.join(r,l)),o!=null&&(l=Pe.relative(o,l)),this.setSourceContent(l,c))},this)};gt.prototype._validateMapping=function(e,n,r,i){if(n&&typeof n.line!="number"&&typeof n.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!n&&!r&&!i)){if(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:i}))}};gt.prototype._serializeMappings=function(){for(var e=0,n=1,r=0,i=0,o=0,s=0,a="",l,c,d,p,f=this._mappings.toArray(),m=0,g=f.length;m<g;m++){if(c=f[m],l="",c.generatedLine!==n)for(e=0;c.generatedLine!==n;)l+=";",n++;else if(m>0){if(!Pe.compareByGeneratedPositionsInflated(c,f[m-1]))continue;l+=","}l+=Xi.encode(c.generatedColumn-e),e=c.generatedColumn,c.source!=null&&(p=this._sources.indexOf(c.source),l+=Xi.encode(p-s),s=p,l+=Xi.encode(c.originalLine-1-i),i=c.originalLine-1,l+=Xi.encode(c.originalColumn-r),r=c.originalColumn,c.name!=null&&(d=this._names.indexOf(c.name),l+=Xi.encode(d-o),o=d)),a+=l}return a};gt.prototype._generateSourcesContent=function(e,n){return e.map(function(r){if(!this._sourcesContents)return null;n!=null&&(r=Pe.relative(n,r));var i=Pe.toSetString(r);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};gt.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};gt.prototype.toString=function(){return JSON.stringify(this.toJSON())};zw.SourceMapGenerator=gt});var Gw=$(Fn=>{Fn.GREATEST_LOWER_BOUND=1;Fn.LEAST_UPPER_BOUND=2;function Op(t,e,n,r,i,o){var s=Math.floor((e-t)/2)+t,a=i(n,r[s],!0);return a===0?s:a>0?e-s>1?Op(s,e,n,r,i,o):o==Fn.LEAST_UPPER_BOUND?e<r.length?e:-1:s:s-t>1?Op(t,s,n,r,i,o):o==Fn.LEAST_UPPER_BOUND?s:t<0?-1:t}Fn.search=function(e,n,r,i){if(n.length===0)return-1;var o=Op(-1,n.length,e,n,r,i||Fn.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&r(n[o],n[o-1],!0)===0;)--o;return o}});var Kw=$(Jw=>{function Np(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function lR(t,e){return Math.round(t+Math.random()*(e-t))}function Mp(t,e,n,r){if(n<r){var i=lR(n,r),o=n-1;Np(t,i,r);for(var s=t[r],a=n;a<r;a++)e(t[a],s)<=0&&(o+=1,Np(t,o,a));Np(t,o+1,a);var l=o+1;Mp(t,e,n,l-1),Mp(t,e,l+1,r)}}Jw.quickSort=function(t,e){Mp(t,e,0,t.length-1)}});var Xw=$(Xs=>{var H=Rr(),Vp=Gw(),Ir=Tp().ArraySet,uR=Ep(),Qi=Kw().quickSort;function _e(t,e){var n=t;return typeof t=="string"&&(n=H.parseSourceMapInput(t)),n.sections!=null?new Ct(n,e):new Ne(n,e)}_e.fromSourceMap=function(t,e){return Ne.fromSourceMap(t,e)};_e.prototype._version=3;_e.prototype.__generatedMappings=null;Object.defineProperty(_e.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});_e.prototype.__originalMappings=null;Object.defineProperty(_e.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});_e.prototype._charIsMappingSeparator=function(e,n){var r=e.charAt(n);return r===";"||r===","};_e.prototype._parseMappings=function(e,n){throw new Error("Subclasses must implement _parseMappings")};_e.GENERATED_ORDER=1;_e.ORIGINAL_ORDER=2;_e.GREATEST_LOWER_BOUND=1;_e.LEAST_UPPER_BOUND=2;_e.prototype.eachMapping=function(e,n,r){var i=n||null,o=r||_e.GENERATED_ORDER,s;switch(o){case _e.GENERATED_ORDER:s=this._generatedMappings;break;case _e.ORIGINAL_ORDER:s=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;s.map(function(l){var c=l.source===null?null:this._sources.at(l.source);return c=H.computeSourceURL(a,c,this._sourceMapURL),{source:c,generatedLine:l.generatedLine,generatedColumn:l.generatedColumn,originalLine:l.originalLine,originalColumn:l.originalColumn,name:l.name===null?null:this._names.at(l.name)}},this).forEach(e,i)};_e.prototype.allGeneratedPositionsFor=function(e){var n=H.getArg(e,"line"),r={source:H.getArg(e,"source"),originalLine:n,originalColumn:H.getArg(e,"column",0)};if(r.source=this._findSourceIndex(r.source),r.source<0)return[];var i=[],o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",H.compareByOriginalPositions,Vp.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:H.getArg(s,"generatedLine",null),column:H.getArg(s,"generatedColumn",null),lastColumn:H.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o];else for(var l=s.originalColumn;s&&s.originalLine===n&&s.originalColumn==l;)i.push({line:H.getArg(s,"generatedLine",null),column:H.getArg(s,"generatedColumn",null),lastColumn:H.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o]}return i};Xs.SourceMapConsumer=_e;function Ne(t,e){var n=t;typeof t=="string"&&(n=H.parseSourceMapInput(t));var r=H.getArg(n,"version"),i=H.getArg(n,"sources"),o=H.getArg(n,"names",[]),s=H.getArg(n,"sourceRoot",null),a=H.getArg(n,"sourcesContent",null),l=H.getArg(n,"mappings"),c=H.getArg(n,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);s&&(s=H.normalize(s)),i=i.map(String).map(H.normalize).map(function(d){return s&&H.isAbsolute(s)&&H.isAbsolute(d)?H.relative(s,d):d}),this._names=Ir.fromArray(o.map(String),!0),this._sources=Ir.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(d){return H.computeSourceURL(s,d,e)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=l,this._sourceMapURL=e,this.file=c}Ne.prototype=Object.create(_e.prototype);Ne.prototype.consumer=_e;Ne.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=H.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var n;for(n=0;n<this._absoluteSources.length;++n)if(this._absoluteSources[n]==t)return n;return-1};Ne.fromSourceMap=function(e,n){var r=Object.create(Ne.prototype),i=r._names=Ir.fromArray(e._names.toArray(),!0),o=r._sources=Ir.fromArray(e._sources.toArray(),!0);r.sourceRoot=e._sourceRoot,r.sourcesContent=e._generateSourcesContent(r._sources.toArray(),r.sourceRoot),r.file=e._file,r._sourceMapURL=n,r._absoluteSources=r._sources.toArray().map(function(m){return H.computeSourceURL(r.sourceRoot,m,n)});for(var s=e._mappings.toArray().slice(),a=r.__generatedMappings=[],l=r.__originalMappings=[],c=0,d=s.length;c<d;c++){var p=s[c],f=new Yw;f.generatedLine=p.generatedLine,f.generatedColumn=p.generatedColumn,p.source&&(f.source=o.indexOf(p.source),f.originalLine=p.originalLine,f.originalColumn=p.originalColumn,p.name&&(f.name=i.indexOf(p.name)),l.push(f)),a.push(f)}return Qi(r.__originalMappings,H.compareByOriginalPositions),r};Ne.prototype._version=3;Object.defineProperty(Ne.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Yw(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Ne.prototype._parseMappings=function(e,n){for(var r=1,i=0,o=0,s=0,a=0,l=0,c=e.length,d=0,p={},f={},m=[],g=[],y,w,b,I,S;d<c;)if(e.charAt(d)===";")r++,d++,i=0;else if(e.charAt(d)===",")d++;else{for(y=new Yw,y.generatedLine=r,I=d;I<c&&!this._charIsMappingSeparator(e,I);I++);if(w=e.slice(d,I),b=p[w],b)d+=w.length;else{for(b=[];d<I;)uR.decode(e,d,f),S=f.value,d=f.rest,b.push(S);if(b.length===2)throw new Error("Found a source, but no line and column");if(b.length===3)throw new Error("Found a source and line, but no column");p[w]=b}y.generatedColumn=i+b[0],i=y.generatedColumn,b.length>1&&(y.source=a+b[1],a+=b[1],y.originalLine=o+b[2],o=y.originalLine,y.originalLine+=1,y.originalColumn=s+b[3],s=y.originalColumn,b.length>4&&(y.name=l+b[4],l+=b[4])),g.push(y),typeof y.originalLine=="number"&&m.push(y)}Qi(g,H.compareByGeneratedPositionsDeflated),this.__generatedMappings=g,Qi(m,H.compareByOriginalPositions),this.__originalMappings=m};Ne.prototype._findMapping=function(e,n,r,i,o,s){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[i]);return Vp.search(e,n,o,s)};Ne.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var n=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(n.generatedLine===r.generatedLine){n.lastGeneratedColumn=r.generatedColumn-1;continue}}n.lastGeneratedColumn=1/0}};Ne.prototype.originalPositionFor=function(e){var n={generatedLine:H.getArg(e,"line"),generatedColumn:H.getArg(e,"column")},r=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",H.compareByGeneratedPositionsDeflated,H.getArg(e,"bias",_e.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===n.generatedLine){var o=H.getArg(i,"source",null);o!==null&&(o=this._sources.at(o),o=H.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var s=H.getArg(i,"name",null);return s!==null&&(s=this._names.at(s)),{source:o,line:H.getArg(i,"originalLine",null),column:H.getArg(i,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}};Ne.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};Ne.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var i=e;this.sourceRoot!=null&&(i=H.relative(this.sourceRoot,i));var o;if(this.sourceRoot!=null&&(o=H.urlParse(this.sourceRoot))){var s=i.replace(/^file:\/\//,"");if(o.scheme=="file"&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!o.path||o.path=="/")&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(n)return null;throw new Error('"'+i+'" is not in the SourceMap.')};Ne.prototype.generatedPositionFor=function(e){var n=H.getArg(e,"source");if(n=this._findSourceIndex(n),n<0)return{line:null,column:null,lastColumn:null};var r={source:n,originalLine:H.getArg(e,"line"),originalColumn:H.getArg(e,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",H.compareByOriginalPositions,H.getArg(e,"bias",_e.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===r.source)return{line:H.getArg(o,"generatedLine",null),column:H.getArg(o,"generatedColumn",null),lastColumn:H.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Xs.BasicSourceMapConsumer=Ne;function Ct(t,e){var n=t;typeof t=="string"&&(n=H.parseSourceMapInput(t));var r=H.getArg(n,"version"),i=H.getArg(n,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new Ir,this._names=new Ir;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=H.getArg(s,"offset"),l=H.getArg(a,"line"),c=H.getArg(a,"column");if(l<o.line||l===o.line&&c<o.column)throw new Error("Section offsets must be ordered and non-overlapping.");return o=a,{generatedOffset:{generatedLine:l+1,generatedColumn:c+1},consumer:new _e(H.getArg(s,"map"),e)}})}Ct.prototype=Object.create(_e.prototype);Ct.prototype.constructor=_e;Ct.prototype._version=3;Object.defineProperty(Ct.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var n=0;n<this._sections[e].consumer.sources.length;n++)t.push(this._sections[e].consumer.sources[n]);return t}});Ct.prototype.originalPositionFor=function(e){var n={generatedLine:H.getArg(e,"line"),generatedColumn:H.getArg(e,"column")},r=Vp.search(n,this._sections,function(o,s){var a=o.generatedLine-s.generatedOffset.generatedLine;return a||o.generatedColumn-s.generatedOffset.generatedColumn}),i=this._sections[r];return i?i.consumer.originalPositionFor({line:n.generatedLine-(i.generatedOffset.generatedLine-1),column:n.generatedColumn-(i.generatedOffset.generatedLine===n.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};Ct.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};Ct.prototype.sourceContentFor=function(e,n){for(var r=0;r<this._sections.length;r++){var i=this._sections[r],o=i.consumer.sourceContentFor(e,!0);if(o)return o}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')};Ct.prototype.generatedPositionFor=function(e){for(var n=0;n<this._sections.length;n++){var r=this._sections[n];if(r.consumer._findSourceIndex(H.getArg(e,"source"))!==-1){var i=r.consumer.generatedPositionFor(e);if(i){var o={line:i.line+(r.generatedOffset.generatedLine-1),column:i.column+(r.generatedOffset.generatedLine===i.line?r.generatedOffset.generatedColumn-1:0)};return o}}}return{line:null,column:null}};Ct.prototype._parseMappings=function(e,n){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var i=this._sections[r],o=i.consumer._generatedMappings,s=0;s<o.length;s++){var a=o[s],l=i.consumer._sources.at(a.source);l=H.computeSourceURL(i.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var c=null;a.name&&(c=i.consumer._names.at(a.name),this._names.add(c),c=this._names.indexOf(c));var 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:c};this.__generatedMappings.push(d),typeof d.originalLine=="number"&&this.__originalMappings.push(d)}Qi(this.__generatedMappings,H.compareByGeneratedPositionsDeflated),Qi(this.__originalMappings,H.compareByOriginalPositions)};Xs.IndexedSourceMapConsumer=Ct});var Zw=$(Qw=>{var pR=Ap().SourceMapGenerator,Qs=Rr(),dR=/(\r?\n)/,fR=10,Tr="$$$isSourceNode$$$";function it(t,e,n,r,i){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=n??null,this.name=i??null,this[Tr]=!0,r!=null&&this.add(r)}it.fromStringWithSourceMap=function(e,n,r){var i=new it,o=e.split(dR),s=0,a=function(){var f=g(),m=g()||"";return f+m;function g(){return s<o.length?o[s++]:void 0}},l=1,c=0,d=null;return n.eachMapping(function(f){if(d!==null)if(l<f.generatedLine)p(d,a()),l++,c=0;else{var m=o[s]||"",g=m.substr(0,f.generatedColumn-c);o[s]=m.substr(f.generatedColumn-c),c=f.generatedColumn,p(d,g),d=f;return}for(;l<f.generatedLine;)i.add(a()),l++;if(c<f.generatedColumn){var m=o[s]||"";i.add(m.substr(0,f.generatedColumn)),o[s]=m.substr(f.generatedColumn),c=f.generatedColumn}d=f},this),s<o.length&&(d&&p(d,a()),i.add(o.splice(s).join(""))),n.sources.forEach(function(f){var m=n.sourceContentFor(f);m!=null&&(r!=null&&(f=Qs.join(r,f)),i.setSourceContent(f,m))}),i;function p(f,m){if(f===null||f.source===void 0)i.add(m);else{var g=r?Qs.join(r,f.source):f.source;i.add(new it(f.originalLine,f.originalColumn,g,m,f.name))}}};it.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(n){this.add(n)},this);else if(e[Tr]||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};it.prototype.prepend=function(e){if(Array.isArray(e))for(var n=e.length-1;n>=0;n--)this.prepend(e[n]);else if(e[Tr]||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};it.prototype.walk=function(e){for(var n,r=0,i=this.children.length;r<i;r++)n=this.children[r],n[Tr]?n.walk(e):n!==""&&e(n,{source:this.source,line:this.line,column:this.column,name:this.name})};it.prototype.join=function(e){var n,r,i=this.children.length;if(i>0){for(n=[],r=0;r<i-1;r++)n.push(this.children[r]),n.push(e);n.push(this.children[r]),this.children=n}return this};it.prototype.replaceRight=function(e,n){var r=this.children[this.children.length-1];return r[Tr]?r.replaceRight(e,n):typeof r=="string"?this.children[this.children.length-1]=r.replace(e,n):this.children.push("".replace(e,n)),this};it.prototype.setSourceContent=function(e,n){this.sourceContents[Qs.toSetString(e)]=n};it.prototype.walkSourceContents=function(e){for(var n=0,r=this.children.length;n<r;n++)this.children[n][Tr]&&this.children[n].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),n=0,r=i.length;n<r;n++)e(Qs.fromSetString(i[n]),this.sourceContents[i[n]])};it.prototype.toString=function(){var e="";return this.walk(function(n){e+=n}),e};it.prototype.toStringWithSourceMap=function(e){var n={code:"",line:1,column:0},r=new pR(e),i=!1,o=null,s=null,a=null,l=null;return this.walk(function(c,d){n.code+=c,d.source!==null&&d.line!==null&&d.column!==null?((o!==d.source||s!==d.line||a!==d.column||l!==d.name)&&r.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:n.line,column:n.column},name:d.name}),o=d.source,s=d.line,a=d.column,l=d.name,i=!0):i&&(r.addMapping({generated:{line:n.line,column:n.column}}),o=null,i=!1);for(var p=0,f=c.length;p<f;p++)c.charCodeAt(p)===fR?(n.line++,n.column=0,p+1===f?(o=null,i=!1):i&&r.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:n.line,column:n.column},name:d.name})):n.column++}),this.walkSourceContents(function(c,d){r.setSourceContent(c,d)}),{code:n.code,map:r}};Qw.SourceNode=it});var ev=$(Zs=>{Zs.SourceMapGenerator=Ap().SourceMapGenerator;Zs.SourceMapConsumer=Xw().SourceMapConsumer;Zs.SourceNode=Zw().SourceNode});var iv=$((ea,rv)=>{"use strict";ea.__esModule=!0;var jp=Ue(),Bn=void 0;try{(typeof define!="function"||!define.amd)&&(tv=ev(),Bn=tv.SourceNode)}catch{}var tv;Bn||(Bn=function(t,e,n,r){this.src="",r&&this.add(r)},Bn.prototype={add:function(e){jp.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){jp.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function Lp(t,e,n){if(jp.isArray(t)){for(var r=[],i=0,o=t.length;i<o;i++)r.push(e.wrap(t[i],n));return r}else if(typeof t=="boolean"||typeof t=="number")return t+"";return t}function nv(t){this.srcFile=t,this.source=[]}nv.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,n){this.source.unshift(this.wrap(e,n))},push:function(e,n){this.source.push(this.wrap(e,n))},merge:function(){var e=this.empty();return this.each(function(n){e.add([" ",n,`
168
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var o=this.next();return typeof o<"u"?o:this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(o){this.begin(o)}};return r.options={},r.performAction=function(o,s,a,l){function c(p,f){return s.yytext=s.yytext.substring(p,s.yyleng-f+p)}var d=l;switch(a){case 0:if(s.yytext.slice(-2)==="\\\\"?(c(0,1),this.begin("mu")):s.yytext.slice(-1)==="\\"?(c(0,1),this.begin("emu")):this.begin("mu"),s.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(c(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(s.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return s.yytext=c(1,2).replace(/\\"/g,'"'),80;break;case 32:return s.yytext=c(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return s.yytext=s.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},r.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],r.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},r})();t.lexer=e;function n(){this.yy={}}return n.prototype=t,t.Parser=n,new n})();Bs.default=mP;yw.exports=Bs.default});var zs=$((Us,_w)=>{"use strict";Us.__esModule=!0;function gP(t){return t&&t.__esModule?t:{default:t}}var yP=rt(),mp=gP(yP);function Hs(){this.parents=[]}Hs.prototype={constructor:Hs,mutating:!1,acceptKey:function(e,n){var r=this.accept(e[n]);if(this.mutating){if(r&&!Hs.prototype[r.type])throw new mp.default('Unexpected node type "'+r.type+'" found when accepting '+n+" on "+e.type);e[n]=r}},acceptRequired:function(e,n){if(this.acceptKey(e,n),!e[n])throw new mp.default(e.type+" requires "+n)},acceptArray:function(e){for(var n=0,r=e.length;n<r;n++)this.acceptKey(e,n),e[n]||(e.splice(n,1),n--,r--)},accept:function(e){if(e){if(!this[e.type])throw new mp.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var n=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||n)return n;if(n!==!1)return e}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:Ws,Decorator:Ws,BlockStatement:vw,DecoratorBlock:vw,PartialStatement:bw,PartialBlockStatement:function(e){bw.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:Ws,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 Ws(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function vw(t){Ws.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function bw(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}Us.default=Hs;_w.exports=Us.default});var xw=$((Gs,$w)=>{"use strict";Gs.__esModule=!0;function wP(t){return t&&t.__esModule?t:{default:t}}var vP=zs(),bP=wP(vP);function Ot(){var t=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=t}Ot.prototype=new bP.default;Ot.prototype.Program=function(t){var e=!this.options.ignoreStandalone,n=!this.isRootSeen;this.isRootSeen=!0;for(var r=t.body,i=0,o=r.length;i<o;i++){var s=r[i],a=this.accept(s);if(a){var l=gp(r,i,n),c=yp(r,i,n),d=a.openStandalone&&l,p=a.closeStandalone&&c,f=a.inlineStandalone&&l&&c;a.close&&Dn(r,i,!0),a.open&&mn(r,i,!0),e&&f&&(Dn(r,i),mn(r,i)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(r[i-1].original)[1])),e&&d&&(Dn((s.program||s.inverse).body),mn(r,i)),e&&p&&(Dn(r,i),mn((s.inverse||s.program).body))}}return t};Ot.prototype.BlockStatement=Ot.prototype.DecoratorBlock=Ot.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,n=t.program&&t.inverse,r=n,i=n;if(n&&n.chained)for(r=n.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var o={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:yp(e.body),closeStandalone:gp((r||e).body)};if(t.openStrip.close&&Dn(e.body,null,!0),n){var s=t.inverseStrip;s.open&&mn(e.body,null,!0),s.close&&Dn(r.body,null,!0),t.closeStrip.open&&mn(i.body,null,!0),!this.options.ignoreStandalone&&gp(e.body)&&yp(r.body)&&(mn(e.body),Dn(r.body))}else t.closeStrip.open&&mn(e.body,null,!0);return o};Ot.prototype.Decorator=Ot.prototype.MustacheStatement=function(t){return t.strip};Ot.prototype.PartialStatement=Ot.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function gp(t,e,n){e===void 0&&(e=t.length);var r=t[e-1],i=t[e-2];if(!r)return n;if(r.type==="ContentStatement")return(i||!n?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(r.original)}function yp(t,e,n){e===void 0&&(e=-1);var r=t[e+1],i=t[e+2];if(!r)return n;if(r.type==="ContentStatement")return(i||!n?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(r.original)}function Dn(t,e,n){var r=t[e==null?0:e+1];if(!(!r||r.type!=="ContentStatement"||!n&&r.rightStripped)){var i=r.value;r.value=r.value.replace(n?/^\s+/:/^[ \t]*\r?\n?/,""),r.rightStripped=r.value!==i}}function mn(t,e,n){var r=t[e==null?t.length-1:e-1];if(!(!r||r.type!=="ContentStatement"||!n&&r.leftStripped)){var i=r.value;return r.value=r.value.replace(n?/\s+$/:/[ \t]+$/,""),r.leftStripped=r.value!==i,r.leftStripped}}Gs.default=Ot;$w.exports=Gs.default});var Sw=$(mt=>{"use strict";mt.__esModule=!0;mt.SourceLocation=xP;mt.id=SP;mt.stripFlags=CP;mt.stripComment=kP;mt.preparePath=EP;mt.prepareMustache=PP;mt.prepareRawBlock=RP;mt.prepareBlock=IP;mt.prepareProgram=TP;mt.preparePartialBlock=AP;function _P(t){return t&&t.__esModule?t:{default:t}}var $P=rt(),wp=_P($P);function vp(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var n={loc:t.path.loc};throw new wp.default(t.path.original+" doesn't match "+e,n)}}function xP(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 SP(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function CP(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function kP(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function EP(t,e,n){n=this.locInfo(n);for(var r=t?"@":"",i=[],o=0,s=0,a=e.length;s<a;s++){var l=e[s].part,c=e[s].original!==l;if(r+=(e[s].separator||"")+l,!c&&(l===".."||l==="."||l==="this")){if(i.length>0)throw new wp.default("Invalid path: "+r,{loc:n});l===".."&&o++}else i.push(l)}return{type:"PathExpression",data:t,depth:o,parts:i,original:r,loc:n}}function PP(t,e,n,r,i,o){var s=r.charAt(3)||r.charAt(2),a=s!=="{"&&s!=="&",l=/\*/.test(r);return{type:l?"Decorator":"MustacheStatement",path:t,params:e,hash:n,escaped:a,strip:i,loc:this.locInfo(o)}}function RP(t,e,n,r){vp(t,n),r=this.locInfo(r);var i={type:"Program",body:e,strip:{},loc:r};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:r}}function IP(t,e,n,r,i,o){r&&r.path&&vp(t,r);var s=/\*/.test(t.open);e.blockParams=t.blockParams;var a=void 0,l=void 0;if(n){if(s)throw new wp.default("Unexpected inverse block on decorator",n);n.chain&&(n.program.body[0].closeStrip=r.strip),l=n.strip,a=n.program}return i&&(i=a,a=e,e=i),{type:s?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:a,openStrip:t.strip,inverseStrip:l,closeStrip:r&&r.strip,loc:this.locInfo(o)}}function TP(t,e){if(!e&&t.length){var n=t[0].loc,r=t[t.length-1].loc;n&&r&&(e={source:n.source,start:{line:n.start.line,column:n.start.column},end:{line:r.end.line,column:r.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function AP(t,e,n,r){return vp(t,n),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:n&&n.strip,loc:this.locInfo(r)}}});var kw=$(Ui=>{"use strict";Ui.__esModule=!0;Ui.parseWithoutProcessing=Cw;Ui.parse=FP;function OP(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function $p(t){return t&&t.__esModule?t:{default:t}}var NP=ww(),bp=$p(NP),MP=xw(),VP=$p(MP),LP=Sw(),jP=OP(LP),DP=rt(),Wi=$p(DP),qP=Ue();Ui.parser=bp.default;var Js={};qP.extend(Js,jP);function Cw(t,e){if(t.type==="Program")return BP(t),t;bp.default.yy=Js,Js.locInfo=function(r){return new Js.SourceLocation(e&&e.srcName,r)};var n=bp.default.parse(t);return n}function FP(t,e){var n=Cw(t,e),r=new VP.default(e);return r.accept(n)}function BP(t){_p(t)}function _p(t){if(t!=null){if(Array.isArray(t)){t.forEach(_p);return}if(typeof t=="object"){if(t.type==="PathExpression"){if(!HP(t.depth))throw new Wi.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(t.parts))throw new Wi.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 Wi.default("Invalid AST: PathExpression.parts must only contain strings")}else if(t.type==="NumberLiteral"){if(typeof t.value!="number"||!isFinite(t.value))throw new Wi.default("Invalid AST: NumberLiteral.value must be a number")}else if(t.type==="BooleanLiteral"&&typeof t.value!="boolean")throw new Wi.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(t).forEach(function(n){n!=="loc"&&_p(t[n])})}}}function HP(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0}});var Iw=$(Ki=>{"use strict";Ki.__esModule=!0;Ki.Compiler=xp;Ki.precompile=GP;Ki.compile=JP;function Pw(t){return t&&t.__esModule?t:{default:t}}var WP=rt(),Gi=Pw(WP),Ji=Ue(),UP=hp(),zi=Pw(UP),zP=[].slice;function xp(){}xp.prototype={compiler:xp,equals:function(e){var n=this.opcodes.length;if(e.opcodes.length!==n)return!1;for(var r=0;r<n;r++){var i=this.opcodes[r],o=e.opcodes[r];if(i.opcode!==o.opcode||!Rw(i.args,o.args))return!1}n=this.children.length;for(var r=0;r<n;r++)if(!this.children[r].equals(e.children[r]))return!1;return!0},guid:0,compile:function(e,n){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=n,this.stringParams=n.stringParams,this.trackIds=n.trackIds,n.blockParams=n.blockParams||[],n.knownHelpers=Ji.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},n.knownHelpers),this.accept(e)},compileProgram:function(e){var n=new this.compiler,r=n.compile(e,this.options),i=this.guid++;return this.usePartial=this.usePartial||r.usePartial,this.children[i]=r,this.useDepths=this.useDepths||r.useDepths,i},accept:function(e){if(!this[e.type])throw new Gi.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var n=this[e.type](e);return this.sourceNode.shift(),n},Program:function(e){this.options.blockParams.unshift(e.blockParams);for(var n=e.body,r=n.length,i=0;i<r;i++)this.accept(n[i]);return this.options.blockParams.shift(),this.isSimple=r===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){Ew(e);var n=e.program,r=e.inverse;n=n&&this.compileProgram(n),r=r&&this.compileProgram(r);var i=this.classifySexpr(e);i==="helper"?this.helperSexpr(e,n,r):i==="simple"?(this.simpleSexpr(e),this.opcode("pushProgram",n),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,n,r),this.opcode("pushProgram",n),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(e){var n=e.program&&this.compileProgram(e.program),r=this.setupFullMustacheParams(e,n,void 0),i=e.path;this.useDecorators=!0,this.opcode("registerDecorator",r.length,i.original)},PartialStatement:function(e){this.usePartial=!0;var n=e.program;n&&(n=this.compileProgram(e.program));var r=e.params;if(r.length>1)throw new Gi.default("Unsupported number of partial arguments: "+r.length,e);r.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):r.push({type:"PathExpression",parts:[],depth:0}));var i=e.name.original,o=e.name.type==="SubExpression";o&&this.accept(e.name),this.setupFullMustacheParams(e,n,void 0,!0);var s=e.indent||"";this.options.preventIndent&&s&&(this.opcode("appendContent",s),s=""),this.opcode("invokePartial",o,i,s),this.opcode("append")},PartialBlockStatement:function(e){this.PartialStatement(e)},MustacheStatement:function(e){this.SubExpression(e),e.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(e){this.DecoratorBlock(e)},ContentStatement:function(e){e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){Ew(e);var n=this.classifySexpr(e);n==="simple"?this.simpleSexpr(e):n==="helper"?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,n,r){var i=e.path,o=i.parts[0],s=n!=null||r!=null;this.opcode("getContext",i.depth),this.opcode("pushProgram",n),this.opcode("pushProgram",r),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",o,s)},simpleSexpr:function(e){var n=e.path;n.strict=!0,this.accept(n),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,n,r){var i=this.setupFullMustacheParams(e,n,r),o=e.path,s=o.parts[0];if(this.options.knownHelpers[s])this.opcode("invokeKnownHelper",i.length,s);else{if(this.options.knownHelpersOnly)throw new Gi.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,zi.default.helpers.simpleId(o))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var n=e.parts[0],r=zi.default.helpers.scopedId(e),i=!e.depth&&!r&&this.blockParamIndex(n);i?this.opcode("lookupBlockParam",i,e.parts):n?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,r):this.opcode("pushContext")},StringLiteral:function(e){this.opcode("pushString",e.value)},NumberLiteral:function(e){this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var n=e.pairs,r=0,i=n.length;for(this.opcode("pushHash");r<i;r++)this.pushParam(n[r].value);for(;r--;)this.opcode("assignToHash",n[r].key);this.opcode("popHash")},opcode:function(e){this.opcodes.push({opcode:e,args:zP.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var n=zi.default.helpers.simpleId(e.path),r=n&&!!this.blockParamIndex(e.path.parts[0]),i=!r&&zi.default.helpers.helperExpression(e),o=!r&&(i||n);if(o&&!i){var s=e.path.parts[0],a=this.options;a.knownHelpers[s]?i=!0:a.knownHelpersOnly&&(o=!1)}return i?"helper":o?"ambiguous":"simple"},pushParams:function(e){for(var n=0,r=e.length;n<r;n++)this.pushParam(e[n])},pushParam:function(e){var n=e.value!=null?e.value:e.original||"";if(this.stringParams)n.replace&&(n=n.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",n,e.type),e.type==="SubExpression"&&this.accept(e);else{if(this.trackIds){var r=void 0;if(e.parts&&!zi.default.helpers.scopedId(e)&&!e.depth&&(r=this.blockParamIndex(e.parts[0])),r){var i=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",r,i)}else n=e.original||n,n.replace&&(n=n.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",e.type,n)}this.accept(e)}},setupFullMustacheParams:function(e,n,r,i){var o=e.params;return this.pushParams(o),this.opcode("pushProgram",n),this.opcode("pushProgram",r),e.hash?this.accept(e.hash):this.opcode("emptyHash",i),o},blockParamIndex:function(e){for(var n=0,r=this.options.blockParams.length;n<r;n++){var i=this.options.blockParams[n],o=i&&Ji.indexOf(i,e);if(i&&o>=0)return[n,o]}}};function GP(t,e,n){if(t==null||typeof t!="string"&&t.type!=="Program")throw new Gi.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);e=e||{},"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var r=n.parse(t,e),i=new n.Compiler().compile(r,e);return new n.JavaScriptCompiler().compile(i,e)}function JP(t,e,n){if(e===void 0&&(e={}),t==null||typeof t!="string"&&t.type!=="Program")throw new Gi.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=Ji.extend({},e),"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var r=void 0;function i(){var s=n.parse(t,e),a=new n.Compiler().compile(s,e),l=new n.JavaScriptCompiler().compile(a,e,void 0,!0);return n.template(l)}function o(s,a){return r||(r=i()),r.call(this,s,a)}return o._setup=function(s){return r||(r=i()),r._setup(s)},o._child=function(s,a,l,c){return r||(r=i()),r._child(s,a,l,c)},o}function Rw(t,e){if(t===e)return!0;if(Ji.isArray(t)&&Ji.isArray(e)&&t.length===e.length){for(var n=0;n<t.length;n++)if(!Rw(t[n],e[n]))return!1;return!0}}function Ew(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 Aw=$(Sp=>{var Tw="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Sp.encode=function(t){if(0<=t&&t<Tw.length)return Tw[t];throw new TypeError("Must be between 0 and 63: "+t)};Sp.decode=function(t){var e=65,n=90,r=97,i=122,o=48,s=57,a=43,l=47,c=26,d=52;return e<=t&&t<=n?t-e:r<=t&&t<=i?t-r+c:o<=t&&t<=s?t-o+d:t==a?62:t==l?63:-1}});var Ep=$(kp=>{var Ow=Aw(),Cp=5,Nw=1<<Cp,Mw=Nw-1,Vw=Nw;function KP(t){return t<0?(-t<<1)+1:(t<<1)+0}function YP(t){var e=(t&1)===1,n=t>>1;return e?-n:n}kp.encode=function(e){var n="",r,i=KP(e);do r=i&Mw,i>>>=Cp,i>0&&(r|=Vw),n+=Ow.encode(r);while(i>0);return n};kp.decode=function(e,n,r){var i=e.length,o=0,s=0,a,l;do{if(n>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(l=Ow.decode(e.charCodeAt(n++)),l===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));a=!!(l&Vw),l&=Mw,o=o+(l<<s),s+=Cp}while(a);r.value=YP(o),r.rest=n}});var Rr=$(qe=>{function XP(t,e,n){if(e in t)return t[e];if(arguments.length===3)return n;throw new Error('"'+e+'" is a required argument.')}qe.getArg=XP;var Lw=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,QP=/^data:.+\,.+$/;function Yi(t){var e=t.match(Lw);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}qe.urlParse=Yi;function Er(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}qe.urlGenerate=Er;function Pp(t){var e=t,n=Yi(t);if(n){if(!n.path)return t;e=n.path}for(var r=qe.isAbsolute(e),i=e.split(/\/+/),o,s=0,a=i.length-1;a>=0;a--)o=i[a],o==="."?i.splice(a,1):o===".."?s++:s>0&&(o===""?(i.splice(a+1,s),s=0):(i.splice(a,2),s--));return e=i.join("/"),e===""&&(e=r?"/":"."),n?(n.path=e,Er(n)):e}qe.normalize=Pp;function jw(t,e){t===""&&(t="."),e===""&&(e=".");var n=Yi(e),r=Yi(t);if(r&&(t=r.path||"/"),n&&!n.scheme)return r&&(n.scheme=r.scheme),Er(n);if(n||e.match(QP))return e;if(r&&!r.host&&!r.path)return r.host=e,Er(r);var i=e.charAt(0)==="/"?e:Pp(t.replace(/\/+$/,"")+"/"+e);return r?(r.path=i,Er(r)):i}qe.join=jw;qe.isAbsolute=function(t){return t.charAt(0)==="/"||Lw.test(t)};function ZP(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var n=0;e.indexOf(t+"/")!==0;){var r=t.lastIndexOf("/");if(r<0||(t=t.slice(0,r),t.match(/^([^\/]+:\/)?\/*$/)))return e;++n}return Array(n+1).join("../")+e.substr(t.length+1)}qe.relative=ZP;var Dw=(function(){var t=Object.create(null);return!("__proto__"in t)})();function qw(t){return t}function eR(t){return Fw(t)?"$"+t:t}qe.toSetString=Dw?qw:eR;function tR(t){return Fw(t)?t.slice(1):t}qe.fromSetString=Dw?qw:tR;function Fw(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var n=e-10;n>=0;n--)if(t.charCodeAt(n)!==36)return!1;return!0}function nR(t,e,n){var r=Pr(t.source,e.source);return r!==0||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0||n)||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=t.generatedLine-e.generatedLine,r!==0)?r:Pr(t.name,e.name)}qe.compareByOriginalPositions=nR;function rR(t,e,n){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0||n)||(r=Pr(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:Pr(t.name,e.name)}qe.compareByGeneratedPositionsDeflated=rR;function Pr(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function iR(t,e){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=Pr(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:Pr(t.name,e.name)}qe.compareByGeneratedPositionsInflated=iR;function oR(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}qe.parseSourceMapInput=oR;function sR(t,e,n){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),n){var r=Yi(n);if(!r)throw new Error("sourceMapURL could not be parsed");if(r.path){var i=r.path.lastIndexOf("/");i>=0&&(r.path=r.path.substring(0,i+1))}e=jw(Er(r),e)}return Pp(e)}qe.computeSourceURL=sR});var Tp=$(Bw=>{var Rp=Rr(),Ip=Object.prototype.hasOwnProperty,qn=typeof Map<"u";function Kt(){this._array=[],this._set=qn?new Map:Object.create(null)}Kt.fromArray=function(e,n){for(var r=new Kt,i=0,o=e.length;i<o;i++)r.add(e[i],n);return r};Kt.prototype.size=function(){return qn?this._set.size:Object.getOwnPropertyNames(this._set).length};Kt.prototype.add=function(e,n){var r=qn?e:Rp.toSetString(e),i=qn?this.has(e):Ip.call(this._set,r),o=this._array.length;(!i||n)&&this._array.push(e),i||(qn?this._set.set(e,o):this._set[r]=o)};Kt.prototype.has=function(e){if(qn)return this._set.has(e);var n=Rp.toSetString(e);return Ip.call(this._set,n)};Kt.prototype.indexOf=function(e){if(qn){var n=this._set.get(e);if(n>=0)return n}else{var r=Rp.toSetString(e);if(Ip.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')};Kt.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Kt.prototype.toArray=function(){return this._array.slice()};Bw.ArraySet=Kt});var Uw=$(Ww=>{var Hw=Rr();function aR(t,e){var n=t.generatedLine,r=e.generatedLine,i=t.generatedColumn,o=e.generatedColumn;return r>n||r==n&&o>=i||Hw.compareByGeneratedPositionsInflated(t,e)<=0}function Ks(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Ks.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)};Ks.prototype.add=function(e){aR(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Ks.prototype.toArray=function(){return this._sorted||(this._array.sort(Hw.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Ww.MappingList=Ks});var Ap=$(zw=>{var Xi=Ep(),Pe=Rr(),Ys=Tp().ArraySet,cR=Uw().MappingList;function gt(t){t||(t={}),this._file=Pe.getArg(t,"file",null),this._sourceRoot=Pe.getArg(t,"sourceRoot",null),this._skipValidation=Pe.getArg(t,"skipValidation",!1),this._sources=new Ys,this._names=new Ys,this._mappings=new cR,this._sourcesContents=null}gt.prototype._version=3;gt.fromSourceMap=function(e){var n=e.sourceRoot,r=new gt({file:e.file,sourceRoot:n});return e.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,n!=null&&(o.source=Pe.relative(n,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),r.addMapping(o)}),e.sources.forEach(function(i){var o=i;n!==null&&(o=Pe.relative(n,i)),r._sources.has(o)||r._sources.add(o);var s=e.sourceContentFor(i);s!=null&&r.setSourceContent(i,s)}),r};gt.prototype.addMapping=function(e){var n=Pe.getArg(e,"generated"),r=Pe.getArg(e,"original",null),i=Pe.getArg(e,"source",null),o=Pe.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,r,i,o),i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),o!=null&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:i,name:o})};gt.prototype.setSourceContent=function(e,n){var r=e;this._sourceRoot!=null&&(r=Pe.relative(this._sourceRoot,r)),n!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Pe.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[Pe.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};gt.prototype.applySourceMap=function(e,n,r){var i=n;if(n==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=e.file}var o=this._sourceRoot;o!=null&&(i=Pe.relative(o,i));var s=new Ys,a=new Ys;this._mappings.unsortedForEach(function(l){if(l.source===i&&l.originalLine!=null){var c=e.originalPositionFor({line:l.originalLine,column:l.originalColumn});c.source!=null&&(l.source=c.source,r!=null&&(l.source=Pe.join(r,l.source)),o!=null&&(l.source=Pe.relative(o,l.source)),l.originalLine=c.line,l.originalColumn=c.column,c.name!=null&&(l.name=c.name))}var d=l.source;d!=null&&!s.has(d)&&s.add(d);var p=l.name;p!=null&&!a.has(p)&&a.add(p)},this),this._sources=s,this._names=a,e.sources.forEach(function(l){var c=e.sourceContentFor(l);c!=null&&(r!=null&&(l=Pe.join(r,l)),o!=null&&(l=Pe.relative(o,l)),this.setSourceContent(l,c))},this)};gt.prototype._validateMapping=function(e,n,r,i){if(n&&typeof n.line!="number"&&typeof n.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!n&&!r&&!i)){if(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:i}))}};gt.prototype._serializeMappings=function(){for(var e=0,n=1,r=0,i=0,o=0,s=0,a="",l,c,d,p,f=this._mappings.toArray(),m=0,g=f.length;m<g;m++){if(c=f[m],l="",c.generatedLine!==n)for(e=0;c.generatedLine!==n;)l+=";",n++;else if(m>0){if(!Pe.compareByGeneratedPositionsInflated(c,f[m-1]))continue;l+=","}l+=Xi.encode(c.generatedColumn-e),e=c.generatedColumn,c.source!=null&&(p=this._sources.indexOf(c.source),l+=Xi.encode(p-s),s=p,l+=Xi.encode(c.originalLine-1-i),i=c.originalLine-1,l+=Xi.encode(c.originalColumn-r),r=c.originalColumn,c.name!=null&&(d=this._names.indexOf(c.name),l+=Xi.encode(d-o),o=d)),a+=l}return a};gt.prototype._generateSourcesContent=function(e,n){return e.map(function(r){if(!this._sourcesContents)return null;n!=null&&(r=Pe.relative(n,r));var i=Pe.toSetString(r);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};gt.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};gt.prototype.toString=function(){return JSON.stringify(this.toJSON())};zw.SourceMapGenerator=gt});var Gw=$(Fn=>{Fn.GREATEST_LOWER_BOUND=1;Fn.LEAST_UPPER_BOUND=2;function Op(t,e,n,r,i,o){var s=Math.floor((e-t)/2)+t,a=i(n,r[s],!0);return a===0?s:a>0?e-s>1?Op(s,e,n,r,i,o):o==Fn.LEAST_UPPER_BOUND?e<r.length?e:-1:s:s-t>1?Op(t,s,n,r,i,o):o==Fn.LEAST_UPPER_BOUND?s:t<0?-1:t}Fn.search=function(e,n,r,i){if(n.length===0)return-1;var o=Op(-1,n.length,e,n,r,i||Fn.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&r(n[o],n[o-1],!0)===0;)--o;return o}});var Kw=$(Jw=>{function Np(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function lR(t,e){return Math.round(t+Math.random()*(e-t))}function Mp(t,e,n,r){if(n<r){var i=lR(n,r),o=n-1;Np(t,i,r);for(var s=t[r],a=n;a<r;a++)e(t[a],s)<=0&&(o+=1,Np(t,o,a));Np(t,o+1,a);var l=o+1;Mp(t,e,n,l-1),Mp(t,e,l+1,r)}}Jw.quickSort=function(t,e){Mp(t,e,0,t.length-1)}});var Xw=$(Xs=>{var H=Rr(),Vp=Gw(),Ir=Tp().ArraySet,uR=Ep(),Qi=Kw().quickSort;function _e(t,e){var n=t;return typeof t=="string"&&(n=H.parseSourceMapInput(t)),n.sections!=null?new Ct(n,e):new Ne(n,e)}_e.fromSourceMap=function(t,e){return Ne.fromSourceMap(t,e)};_e.prototype._version=3;_e.prototype.__generatedMappings=null;Object.defineProperty(_e.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});_e.prototype.__originalMappings=null;Object.defineProperty(_e.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});_e.prototype._charIsMappingSeparator=function(e,n){var r=e.charAt(n);return r===";"||r===","};_e.prototype._parseMappings=function(e,n){throw new Error("Subclasses must implement _parseMappings")};_e.GENERATED_ORDER=1;_e.ORIGINAL_ORDER=2;_e.GREATEST_LOWER_BOUND=1;_e.LEAST_UPPER_BOUND=2;_e.prototype.eachMapping=function(e,n,r){var i=n||null,o=r||_e.GENERATED_ORDER,s;switch(o){case _e.GENERATED_ORDER:s=this._generatedMappings;break;case _e.ORIGINAL_ORDER:s=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;s.map(function(l){var c=l.source===null?null:this._sources.at(l.source);return c=H.computeSourceURL(a,c,this._sourceMapURL),{source:c,generatedLine:l.generatedLine,generatedColumn:l.generatedColumn,originalLine:l.originalLine,originalColumn:l.originalColumn,name:l.name===null?null:this._names.at(l.name)}},this).forEach(e,i)};_e.prototype.allGeneratedPositionsFor=function(e){var n=H.getArg(e,"line"),r={source:H.getArg(e,"source"),originalLine:n,originalColumn:H.getArg(e,"column",0)};if(r.source=this._findSourceIndex(r.source),r.source<0)return[];var i=[],o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",H.compareByOriginalPositions,Vp.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:H.getArg(s,"generatedLine",null),column:H.getArg(s,"generatedColumn",null),lastColumn:H.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o];else for(var l=s.originalColumn;s&&s.originalLine===n&&s.originalColumn==l;)i.push({line:H.getArg(s,"generatedLine",null),column:H.getArg(s,"generatedColumn",null),lastColumn:H.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o]}return i};Xs.SourceMapConsumer=_e;function Ne(t,e){var n=t;typeof t=="string"&&(n=H.parseSourceMapInput(t));var r=H.getArg(n,"version"),i=H.getArg(n,"sources"),o=H.getArg(n,"names",[]),s=H.getArg(n,"sourceRoot",null),a=H.getArg(n,"sourcesContent",null),l=H.getArg(n,"mappings"),c=H.getArg(n,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);s&&(s=H.normalize(s)),i=i.map(String).map(H.normalize).map(function(d){return s&&H.isAbsolute(s)&&H.isAbsolute(d)?H.relative(s,d):d}),this._names=Ir.fromArray(o.map(String),!0),this._sources=Ir.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(d){return H.computeSourceURL(s,d,e)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=l,this._sourceMapURL=e,this.file=c}Ne.prototype=Object.create(_e.prototype);Ne.prototype.consumer=_e;Ne.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=H.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var n;for(n=0;n<this._absoluteSources.length;++n)if(this._absoluteSources[n]==t)return n;return-1};Ne.fromSourceMap=function(e,n){var r=Object.create(Ne.prototype),i=r._names=Ir.fromArray(e._names.toArray(),!0),o=r._sources=Ir.fromArray(e._sources.toArray(),!0);r.sourceRoot=e._sourceRoot,r.sourcesContent=e._generateSourcesContent(r._sources.toArray(),r.sourceRoot),r.file=e._file,r._sourceMapURL=n,r._absoluteSources=r._sources.toArray().map(function(m){return H.computeSourceURL(r.sourceRoot,m,n)});for(var s=e._mappings.toArray().slice(),a=r.__generatedMappings=[],l=r.__originalMappings=[],c=0,d=s.length;c<d;c++){var p=s[c],f=new Yw;f.generatedLine=p.generatedLine,f.generatedColumn=p.generatedColumn,p.source&&(f.source=o.indexOf(p.source),f.originalLine=p.originalLine,f.originalColumn=p.originalColumn,p.name&&(f.name=i.indexOf(p.name)),l.push(f)),a.push(f)}return Qi(r.__originalMappings,H.compareByOriginalPositions),r};Ne.prototype._version=3;Object.defineProperty(Ne.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Yw(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Ne.prototype._parseMappings=function(e,n){for(var r=1,i=0,o=0,s=0,a=0,l=0,c=e.length,d=0,p={},f={},m=[],g=[],y,w,_,R,x;d<c;)if(e.charAt(d)===";")r++,d++,i=0;else if(e.charAt(d)===",")d++;else{for(y=new Yw,y.generatedLine=r,R=d;R<c&&!this._charIsMappingSeparator(e,R);R++);if(w=e.slice(d,R),_=p[w],_)d+=w.length;else{for(_=[];d<R;)uR.decode(e,d,f),x=f.value,d=f.rest,_.push(x);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[w]=_}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=l+_[4],l+=_[4])),g.push(y),typeof y.originalLine=="number"&&m.push(y)}Qi(g,H.compareByGeneratedPositionsDeflated),this.__generatedMappings=g,Qi(m,H.compareByOriginalPositions),this.__originalMappings=m};Ne.prototype._findMapping=function(e,n,r,i,o,s){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[i]);return Vp.search(e,n,o,s)};Ne.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var n=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(n.generatedLine===r.generatedLine){n.lastGeneratedColumn=r.generatedColumn-1;continue}}n.lastGeneratedColumn=1/0}};Ne.prototype.originalPositionFor=function(e){var n={generatedLine:H.getArg(e,"line"),generatedColumn:H.getArg(e,"column")},r=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",H.compareByGeneratedPositionsDeflated,H.getArg(e,"bias",_e.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===n.generatedLine){var o=H.getArg(i,"source",null);o!==null&&(o=this._sources.at(o),o=H.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var s=H.getArg(i,"name",null);return s!==null&&(s=this._names.at(s)),{source:o,line:H.getArg(i,"originalLine",null),column:H.getArg(i,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}};Ne.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};Ne.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var i=e;this.sourceRoot!=null&&(i=H.relative(this.sourceRoot,i));var o;if(this.sourceRoot!=null&&(o=H.urlParse(this.sourceRoot))){var s=i.replace(/^file:\/\//,"");if(o.scheme=="file"&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!o.path||o.path=="/")&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(n)return null;throw new Error('"'+i+'" is not in the SourceMap.')};Ne.prototype.generatedPositionFor=function(e){var n=H.getArg(e,"source");if(n=this._findSourceIndex(n),n<0)return{line:null,column:null,lastColumn:null};var r={source:n,originalLine:H.getArg(e,"line"),originalColumn:H.getArg(e,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",H.compareByOriginalPositions,H.getArg(e,"bias",_e.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===r.source)return{line:H.getArg(o,"generatedLine",null),column:H.getArg(o,"generatedColumn",null),lastColumn:H.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Xs.BasicSourceMapConsumer=Ne;function Ct(t,e){var n=t;typeof t=="string"&&(n=H.parseSourceMapInput(t));var r=H.getArg(n,"version"),i=H.getArg(n,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new Ir,this._names=new Ir;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=H.getArg(s,"offset"),l=H.getArg(a,"line"),c=H.getArg(a,"column");if(l<o.line||l===o.line&&c<o.column)throw new Error("Section offsets must be ordered and non-overlapping.");return o=a,{generatedOffset:{generatedLine:l+1,generatedColumn:c+1},consumer:new _e(H.getArg(s,"map"),e)}})}Ct.prototype=Object.create(_e.prototype);Ct.prototype.constructor=_e;Ct.prototype._version=3;Object.defineProperty(Ct.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var n=0;n<this._sections[e].consumer.sources.length;n++)t.push(this._sections[e].consumer.sources[n]);return t}});Ct.prototype.originalPositionFor=function(e){var n={generatedLine:H.getArg(e,"line"),generatedColumn:H.getArg(e,"column")},r=Vp.search(n,this._sections,function(o,s){var a=o.generatedLine-s.generatedOffset.generatedLine;return a||o.generatedColumn-s.generatedOffset.generatedColumn}),i=this._sections[r];return i?i.consumer.originalPositionFor({line:n.generatedLine-(i.generatedOffset.generatedLine-1),column:n.generatedColumn-(i.generatedOffset.generatedLine===n.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};Ct.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};Ct.prototype.sourceContentFor=function(e,n){for(var r=0;r<this._sections.length;r++){var i=this._sections[r],o=i.consumer.sourceContentFor(e,!0);if(o)return o}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')};Ct.prototype.generatedPositionFor=function(e){for(var n=0;n<this._sections.length;n++){var r=this._sections[n];if(r.consumer._findSourceIndex(H.getArg(e,"source"))!==-1){var i=r.consumer.generatedPositionFor(e);if(i){var o={line:i.line+(r.generatedOffset.generatedLine-1),column:i.column+(r.generatedOffset.generatedLine===i.line?r.generatedOffset.generatedColumn-1:0)};return o}}}return{line:null,column:null}};Ct.prototype._parseMappings=function(e,n){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var i=this._sections[r],o=i.consumer._generatedMappings,s=0;s<o.length;s++){var a=o[s],l=i.consumer._sources.at(a.source);l=H.computeSourceURL(i.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var c=null;a.name&&(c=i.consumer._names.at(a.name),this._names.add(c),c=this._names.indexOf(c));var 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:c};this.__generatedMappings.push(d),typeof d.originalLine=="number"&&this.__originalMappings.push(d)}Qi(this.__generatedMappings,H.compareByGeneratedPositionsDeflated),Qi(this.__originalMappings,H.compareByOriginalPositions)};Xs.IndexedSourceMapConsumer=Ct});var Zw=$(Qw=>{var pR=Ap().SourceMapGenerator,Qs=Rr(),dR=/(\r?\n)/,fR=10,Tr="$$$isSourceNode$$$";function it(t,e,n,r,i){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=n??null,this.name=i??null,this[Tr]=!0,r!=null&&this.add(r)}it.fromStringWithSourceMap=function(e,n,r){var i=new it,o=e.split(dR),s=0,a=function(){var f=g(),m=g()||"";return f+m;function g(){return s<o.length?o[s++]:void 0}},l=1,c=0,d=null;return n.eachMapping(function(f){if(d!==null)if(l<f.generatedLine)p(d,a()),l++,c=0;else{var m=o[s]||"",g=m.substr(0,f.generatedColumn-c);o[s]=m.substr(f.generatedColumn-c),c=f.generatedColumn,p(d,g),d=f;return}for(;l<f.generatedLine;)i.add(a()),l++;if(c<f.generatedColumn){var m=o[s]||"";i.add(m.substr(0,f.generatedColumn)),o[s]=m.substr(f.generatedColumn),c=f.generatedColumn}d=f},this),s<o.length&&(d&&p(d,a()),i.add(o.splice(s).join(""))),n.sources.forEach(function(f){var m=n.sourceContentFor(f);m!=null&&(r!=null&&(f=Qs.join(r,f)),i.setSourceContent(f,m))}),i;function p(f,m){if(f===null||f.source===void 0)i.add(m);else{var g=r?Qs.join(r,f.source):f.source;i.add(new it(f.originalLine,f.originalColumn,g,m,f.name))}}};it.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(n){this.add(n)},this);else if(e[Tr]||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};it.prototype.prepend=function(e){if(Array.isArray(e))for(var n=e.length-1;n>=0;n--)this.prepend(e[n]);else if(e[Tr]||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};it.prototype.walk=function(e){for(var n,r=0,i=this.children.length;r<i;r++)n=this.children[r],n[Tr]?n.walk(e):n!==""&&e(n,{source:this.source,line:this.line,column:this.column,name:this.name})};it.prototype.join=function(e){var n,r,i=this.children.length;if(i>0){for(n=[],r=0;r<i-1;r++)n.push(this.children[r]),n.push(e);n.push(this.children[r]),this.children=n}return this};it.prototype.replaceRight=function(e,n){var r=this.children[this.children.length-1];return r[Tr]?r.replaceRight(e,n):typeof r=="string"?this.children[this.children.length-1]=r.replace(e,n):this.children.push("".replace(e,n)),this};it.prototype.setSourceContent=function(e,n){this.sourceContents[Qs.toSetString(e)]=n};it.prototype.walkSourceContents=function(e){for(var n=0,r=this.children.length;n<r;n++)this.children[n][Tr]&&this.children[n].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),n=0,r=i.length;n<r;n++)e(Qs.fromSetString(i[n]),this.sourceContents[i[n]])};it.prototype.toString=function(){var e="";return this.walk(function(n){e+=n}),e};it.prototype.toStringWithSourceMap=function(e){var n={code:"",line:1,column:0},r=new pR(e),i=!1,o=null,s=null,a=null,l=null;return this.walk(function(c,d){n.code+=c,d.source!==null&&d.line!==null&&d.column!==null?((o!==d.source||s!==d.line||a!==d.column||l!==d.name)&&r.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:n.line,column:n.column},name:d.name}),o=d.source,s=d.line,a=d.column,l=d.name,i=!0):i&&(r.addMapping({generated:{line:n.line,column:n.column}}),o=null,i=!1);for(var p=0,f=c.length;p<f;p++)c.charCodeAt(p)===fR?(n.line++,n.column=0,p+1===f?(o=null,i=!1):i&&r.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:n.line,column:n.column},name:d.name})):n.column++}),this.walkSourceContents(function(c,d){r.setSourceContent(c,d)}),{code:n.code,map:r}};Qw.SourceNode=it});var ev=$(Zs=>{Zs.SourceMapGenerator=Ap().SourceMapGenerator;Zs.SourceMapConsumer=Xw().SourceMapConsumer;Zs.SourceNode=Zw().SourceNode});var iv=$((ea,rv)=>{"use strict";ea.__esModule=!0;var jp=Ue(),Bn=void 0;try{(typeof define!="function"||!define.amd)&&(tv=ev(),Bn=tv.SourceNode)}catch{}var tv;Bn||(Bn=function(t,e,n,r){this.src="",r&&this.add(r)},Bn.prototype={add:function(e){jp.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){jp.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function Lp(t,e,n){if(jp.isArray(t)){for(var r=[],i=0,o=t.length;i<o;i++)r.push(e.wrap(t[i],n));return r}else if(typeof t=="boolean"||typeof t=="number")return t+"";return t}function nv(t){this.srcFile=t,this.source=[]}nv.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,n){this.source.unshift(this.wrap(e,n))},push:function(e,n){this.source.push(this.wrap(e,n))},merge:function(){var e=this.empty();return this.each(function(n){e.add([" ",n,`
169
169
  `])}),e},each:function(e){for(var n=0,r=this.source.length;n<r;n++)e(this.source[n])},empty:function(){var e=this.currentLocation||{start:{}};return new Bn(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var n=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof Bn?e:(e=Lp(e,this,n),new Bn(n.start.line,n.start.column,this.srcFile,e))},functionCall:function(e,n,r){return r=this.generateList(r),this.wrap([e,n?"."+n+"(":"(",r,")"])},quotedString:function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(e){var n=this,r=[];Object.keys(e).forEach(function(o){var s=Lp(e[o],n);s!=="undefined"&&r.push([n.quotedString(o),":",s])});var i=this.generateList(r);return i.prepend("{"),i.add("}"),i},generateList:function(e){for(var n=this.empty(),r=0,i=e.length;r<i;r++)r&&n.add(","),n.add(Lp(e[r],this));return n},generateArray:function(e){var n=this.generateList(e);return n.prepend("["),n.add("]"),n}};ea.default=nv;rv.exports=ea.default});var lv=$((ta,cv)=>{"use strict";ta.__esModule=!0;function av(t){return t&&t.__esModule?t:{default:t}}var ov=Ms(),hR=rt(),Dp=av(hR),mR=Ue(),gR=iv(),sv=av(gR);function Ar(t){this.value=t}function Or(){}Or.prototype={nameLookup:function(e,n){return this.internalNameLookup(e,n)},depthedLookup:function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},compilerInfo:function(){var e=ov.COMPILER_REVISION,n=ov.REVISION_CHANGES[e];return[e,n]},appendToBuffer:function(e,n,r){return mR.isArray(e)||(e=[e]),e=this.source.wrap(e,n),this.environment.isSimple?["return ",e,";"]:r?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(e,n){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(n),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(e,n,r,i){this.environment=e,this.options=n,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!i,this.name=this.environment.name,this.isChild=!!r,this.context=r||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,n),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var o=e.opcodes,s=void 0,a=void 0,l=void 0,c=void 0;for(l=0,c=o.length;l<c;l++)s=o[l],this.source.currentLocation=s.loc,a=a||s.loc,this[s.opcode].apply(this,s.args);if(this.source.currentLocation=a,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new Dp.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
170
170
  `]),this.decorators.push("return fn;"),i?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
171
171
  `),this.decorators.push(`}
@@ -182,7 +182,7 @@ Expecting `+de.join(", ")+", got '"+(this.terminals_[R]||R)+"'":X="Parse error o
182
182
  `,e};ke.prototype.Program=function(t){var e="",n=t.body,r=void 0,i=void 0;if(t.blockParams){var o="BLOCK PARAMS: [";for(r=0,i=t.blockParams.length;r<i;r++)o+=" "+t.blockParams[r];o+=" ]",e+=this.pad(o)}for(r=0,i=n.length;r<i;r++)e+=this.accept(n[r]);return this.padding--,e};ke.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};ke.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};ke.prototype.BlockStatement=ke.prototype.DecoratorBlock=function(t){var e="";return e+=this.pad((t.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,e+=this.pad(this.SubExpression(t)),t.program&&(e+=this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--),t.inverse&&(t.program&&this.padding++,e+=this.pad("{{^}}"),this.padding++,e+=this.accept(t.inverse),this.padding--,t.program&&this.padding--),this.padding--,e};ke.prototype.PartialStatement=function(t){var e="PARTIAL:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),this.pad("{{> "+e+" }}")};ke.prototype.PartialBlockStatement=function(t){var e="PARTIAL BLOCK:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--,this.pad("{{> "+e+" }}")};ke.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};ke.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};ke.prototype.SubExpression=function(t){for(var e=t.params,n=[],r=void 0,i=0,o=e.length;i<o;i++)n.push(this.accept(e[i]));return e="["+n.join(", ")+"]",r=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+r};ke.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};ke.prototype.StringLiteral=function(t){return'"'+t.value+'"'};ke.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};ke.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};ke.prototype.UndefinedLiteral=function(){return"UNDEFINED"};ke.prototype.NullLiteral=function(){return"NULL"};ke.prototype.Hash=function(t){for(var e=t.pairs,n=[],r=0,i=e.length;r<i;r++)n.push(this.accept(e[r]));return"HASH{"+n.join(", ")+"}"};ke.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var yv=$((WV,gv)=>{var ia=dv().default,mv=fv();ia.PrintVisitor=mv.PrintVisitor;ia.print=mv.print;gv.exports=ia;function hv(t,e){var n=yt("fs"),r=n.readFileSync(e,"utf8");t.exports=ia.compile(r)}typeof yt<"u"&&yt.extensions&&(yt.extensions[".handlebars"]=hv,yt.extensions[".hbs"]=hv)});import{readFile as OR}from"node:fs/promises";import{resolve as NR}from"node:path";async function kt(t,e,n){let r=NR(t,e),i=wv.get(r);if(!i){let o=await OR(r,"utf-8");i=vv.default.compile(o,{noEscape:!0}),wv.set(r,i)}return i(n)}var vv,wv,eo=Y(()=>{"use strict";vv=Ca(yv(),1),wv=new Map});var Bp=Y(()=>{"use strict";Sr()});import{readFile as bv,writeFile as MR,mkdir as VR,stat as LR,rm as jR,unlink as DR}from"node:fs/promises";import{resolve as Yt}from"node:path";async function _v(t){try{return await LR(t),!0}catch{return!1}}async function Hp(t){let e=Yt(t,"..");for(let n of[Yt(t,"runtime"),Yt(e,"components"),Yt(e,"runtime")])await _v(n)&&await jR(n,{recursive:!0,force:!0});for(let n of["extensions.tsx","extensions.ts","contracts.ts"]){let r=Yt(t,n);await _v(r)&&await DR(r)}}function qR(t){return t.replace(/^import type \{ DispatchableAction \} from [^;]+;\n/gm,"")}async function $v(t,e,n){let r=we(t),i=e.generated.reactDir,o=to(n??(e.rendererTemplatesDir?Yt(r,e.rendererTemplatesDir):void 0)),s=Mr();await VR(i,{recursive:!0}),await Hp(i);let a=await bv(Yt(s,"types.ts"),"utf-8"),l=await bv(Yt(s,"style.ts"),"utf-8"),c=await kt(o,"dispatch.ts.hbs",{}),d=qR(c),p=await kt(o,"runtime.ts.hbs",{typesBody:a.trim(),styleBody:l.trim(),dispatchBody:d.trim()}),f=Yt(i,"runtime.ts");return await MR(f,p,"utf-8"),{runtimePath:f}}var xv=Y(()=>{"use strict";vt();eo();Bp()});var Cv={};vn(Cv,{renderReactRuntime:()=>JR});import{writeFile as Sv,stat as FR,unlink as BR}from"node:fs/promises";import{relative as HR,resolve as Vr}from"node:path";async function WR(t){try{return await FR(t),!0}catch{return!1}}async function UR(t,e,n,r){let i=await Di(n,t),o=await kt(to(r),"theme.css.hbs",{themeCss:i});await Sv(e,o,"utf-8")}async function zR(t){let e=Vr(t,"..");for(let n of["theme.css","contracts.ts","view-bridge.generated.ts"]){let r=Vr(e,n);await WR(r)&&await BR(r)}}async function GR(t,e){let n=we(t),r=e.generated.reactDir,i=Vr(n,"src/components/extensions.tsx"),o=HR(r,i).replace(/\\/g,"/");o.startsWith(".")||(o=`./${o}`);let s=o.replace(/\.tsx?$/,".js"),a=Vr(r,"extensions.generated.ts");return await Sv(a,`/** Auto-generated extension re-export \u2014 DO NOT EDIT */
183
183
  export * from '${s}';
184
184
  `,"utf-8"),a}async function JR(t,e){let n=we(t),r=e.rendererTemplatesDir?Vr(n,e.rendererTemplatesDir):void 0,i=e.generated.reactDir;await zR(i),await Hp(i);let{runtimePath:o}=await $v(t,e,r),s=await GR(t,e),a=Vr(i,"theme.css");await UR(t,a,e,r),console.log(` react/runtime \u2192 ${o}`),console.log(` react/extensions \u2192 ${s}`),console.log(` react/theme \u2192 ${a}`)}var kv=Y(()=>{"use strict";vt();_s();eo();Bp();xv()});function KR(t,e){return t.entries.find(r=>r.path===e)?.value??""}function YR(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let n=e[1],r=parseInt(n.slice(0,2),16),i=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16);return`Color(red: ${(r/255).toFixed(3)}, green: ${(i/255).toFixed(3)}, blue: ${(o/255).toFixed(3)})`}function Hn(t){let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function Ev(t){return YR(t)??(t?`Color(${JSON.stringify(t)})`:null)}function Pv(t,e){let n=[];for(let[r,i]of Object.entries(t)){let o=KR(e,i.ref);if(o)switch(r){case"background":case"foreground":{let s=Ev(o);s&&n.push({property:r,swiftValue:s});break}case"padding":{let s=Hn(o);if(s!==null)n.push({property:r,swiftValue:String(s)});else{let a=o.trim().split(/\s+/);if(a.length===2){let l=Hn(a[0]),c=Hn(a[1]);l!==null&&n.push({property:"paddingV",swiftValue:String(l)}),c!==null&&n.push({property:"paddingH",swiftValue:String(c)})}}break}case"radius":case"fontSize":case"minHeight":case"maxWidth":{let s=Hn(o);s!==null&&n.push({property:r,swiftValue:String(s)});break}case"width":{if(o==="100%"||o==="fill")n.push({property:"widthFill",swiftValue:"true"});else{let s=Hn(o);s!==null&&n.push({property:r,swiftValue:String(s)})}break}case"height":{if(o==="100%"||o==="fill")n.push({property:"heightFill",swiftValue:"true"});else{let s=Hn(o);s!==null&&n.push({property:r,swiftValue:String(s)})}break}case"border":{let s=o.match(/^([\d.]+)px/);s&&n.push({property:"borderWidth",swiftValue:String(Number(s[1]))});break}case"borderColor":{let s=Ev(o);s&&n.push({property:"borderColor",swiftValue:s});break}case"margin":{let s=Hn(o);s!==null&&n.push({property:r,swiftValue:String(s)});break}case"fontWeight":{let s=XR[o];s&&n.push({property:r,swiftValue:s});break}case"shadow":{n.push({property:r,swiftValue:o==="true"||o==="none"?"false":"true"});break}case"display":case"flexDirection":case"gridTemplateColumns":case"alignItems":case"justifyContent":case"typography":break;default:console.warn(`[view-contracts] SwiftUI theme: variant property "${r}" is not handled (value: "${o}"). Add a case to renderTheme.ts resolveVariantEntries().`);break}}return n}function Iv(t,e){if(t.length===0)return`${e}VcVariantStyle()`;let r=[...t].sort((i,o)=>Rv.indexOf(i.property)-Rv.indexOf(o.property)).map(i=>`${i.property}: ${i.swiftValue}`).join(", ");return`${e}VcVariantStyle(${r})`}function QR(t,e){return{...t,...e}}function Tv(t,e){let n=[];n.push("/**"),n.push(" * Auto-generated SwiftUI theme \u2014 variant style dictionary."),n.push(" * Each entry is pre-merged: base theme defaults < variant overrides."),n.push(" * DO NOT EDIT \u2014 regenerate with: view-contracts build"),n.push(" */"),n.push("import SwiftUI"),n.push(""),n.push("struct VcVariantStyle {"),n.push(" var foreground: Color?"),n.push(" var background: Color?"),n.push(" var padding: CGFloat?"),n.push(" var paddingH: CGFloat?"),n.push(" var paddingV: CGFloat?"),n.push(" var widthFill: Bool?"),n.push(" var heightFill: Bool?"),n.push(" var radius: CGFloat?"),n.push(" var fontSize: CGFloat?"),n.push(" var fontWeight: Font.Weight?"),n.push(" var shadow: Bool?"),n.push(" var borderWidth: CGFloat?"),n.push(" var borderColor: Color?"),n.push(" var minHeight: CGFloat?"),n.push(" var maxWidth: CGFloat?"),n.push("}"),n.push(""),n.push("extension View {"),n.push(" func applyVcStyle(_ s: VcVariantStyle) -> some View {"),n.push(" self"),n.push(" .ifSet(s.foreground) { $0.foregroundStyle($1) }"),n.push(" .ifSet(s.fontSize) { $0.font(.system(size: $1, weight: s.fontWeight ?? .regular)) }"),n.push(" .ifSet(s.padding) { $0.padding($1) }"),n.push(" .ifSet(s.paddingH) { $0.padding(.horizontal, $1) }"),n.push(" .ifSet(s.paddingV) { $0.padding(.vertical, $1) }"),n.push(" .vcFillFrame(widthFill: s.widthFill ?? false, heightFill: s.heightFill ?? false)"),n.push(" .ifSet(s.background) { $0.background($1) }"),n.push(" .ifSet(s.radius) { $0.clipShape(RoundedRectangle(cornerRadius: $1)) }"),n.push(" .ifSet(s.borderColor) { $0.overlay(RoundedRectangle(cornerRadius: s.radius ?? 0).stroke($1, lineWidth: s.borderWidth ?? 1)) }"),n.push(" .ifSet(s.shadow) { v, on in on ? AnyView(v.shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)) : AnyView(v) }"),n.push(" }"),n.push("}"),n.push(""),n.push("extension View {"),n.push(" @ViewBuilder"),n.push(" func vcFillFrame(widthFill: Bool, heightFill: Bool) -> some View {"),n.push(" if widthFill && heightFill {"),n.push(" self.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"),n.push(" } else if widthFill {"),n.push(" self.frame(maxWidth: .infinity, alignment: .leading)"),n.push(" } else if heightFill {"),n.push(" self.frame(maxHeight: .infinity, alignment: .top)"),n.push(" } else {"),n.push(" self"),n.push(" }"),n.push(" }"),n.push("}"),n.push(""),n.push("extension View {"),n.push(" @ViewBuilder"),n.push(" func ifSet<T, V: View>(_ value: T?, _ transform: (Self, T) -> V) -> some View {"),n.push(" if let value { transform(self, value) } else { self }"),n.push(" }"),n.push("}"),n.push(""),n.push("enum VcTheme {"),n.push(" static let defaults: [String: VcVariantStyle] = [");for(let[r,i]of Object.entries(t.defaults)){if(Object.keys(i).length===0)continue;let o=Pv(i,e);o.length!==0&&n.push(` ${JSON.stringify(r)}: ${Iv(o,"").trim()},`)}n.push(" ]"),n.push(""),n.push(" static let variants: [String: [String: VcVariantStyle]] = [");for(let[r,i]of Object.entries(t.variants)){let o=Object.entries(i);if(o.length===0)continue;let s=t.defaults[r]??{};n.push(` ${JSON.stringify(r)}: [`);for(let[a,l]of o){let c=QR(s,l),d=Pv(c,e),p=Iv(d," ");n.push(` ${JSON.stringify(a)}: ${p.trim()},`)}n.push(" ],")}return n.push(" ]"),n.push(""),n.push(" static func resolve(_ element: String, variant: String) -> VcVariantStyle {"),n.push(" variants[element]?[variant] ?? defaults[element] ?? VcVariantStyle()"),n.push(" }"),n.push("}"),n.push(""),n.join(`
185
- `)}var XR,Rv,Av=Y(()=>{"use strict";XR={bold:".bold",semibold:".semibold",medium:".medium",regular:".regular",600:".semibold",700:".bold",500:".medium",400:".regular"};Rv=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});import{resolve as ZR}from"node:path";function tI(t){for(let[e,n]of Object.entries(t.elements)){let r=n.container!==void 0&&n.container!==null,i=n.leaf!==void 0&&n.leaf!==null;if(r===i)throw new Error(`${eI}: element "${e}" must have exactly one of "container" or "leaf"`);(n.container==="vstack"||n.container==="hstack")&&n.spacingProp}}async function Ov(t){if(!t&&Wp)return Wp;let e=t??ZR(Re(),"renderers/swiftui/elements.yaml"),n=await yr(e);return tI(n),t||(Wp=n),n}var eI,Wp,Nv=Y(()=>{"use strict";Ut();us();eI="renderers/swiftui/elements.yaml",Wp=null});function nI(t,e){let n=t.entries.find(r=>r.path===e);if(!n)throw new Error(`Token reference "${e}" not found while merging visual props`);return n.value}function Mv(t,e){let n={};for(let[r,i]of Object.entries(t))n[r]=nI(e,i.ref);return n}function rI(t){let e={};for(let[n,r]of Object.entries(t))r!=null&&(typeof r=="string"||typeof r=="number"||typeof r=="boolean")&&(e[n]=r);return e}function Xt(t){let e=t.theme.defaults[t.elementName]??{},n=t.variantLiteral?t.theme.variants[t.elementName]?.[t.variantLiteral]??{}:{};return{...Mv(e,t.tokens),...Mv(n,t.tokens),...rI(t.instanceLiterals)}}var Up=Y(()=>{"use strict"});function ot(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 zp(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let n=e[1],r=parseInt(n.slice(0,2),16),i=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16);return`Color(red: ${r/255}, green: ${i/255}, blue: ${o/255})`}function iI(t){let e=ot(t);if(e!==null)return{kind:"uniform",value:e};if(typeof t!="string")return null;let n=t.trim().split(/\s+/);if(n.length===2){let r=ot(n[0]),i=ot(n[1]);if(r!==null&&i!==null)return{kind:"shorthand",vertical:r,horizontal:i}}return null}function oI(t){if(t===""||t===null||t===void 0)return null;let e=ot(t);return e!==null?`.font(.system(size: ${e}))`:typeof t=="string"&&!t.endsWith("px")?`.font(.system(size: ${JSON.stringify(t)}))`:null}function sI(t){return typeof t!="string"?null:{bold:".fontWeight(.bold)",semibold:".fontWeight(.semibold)",medium:".fontWeight(.medium)",regular:".fontWeight(.regular)",700:".fontWeight(.bold)",600:".fontWeight(.semibold)",500:".fontWeight(.medium)",400:".fontWeight(.regular)"}[t]??null}function Gp(t){let e=[],n=t.foreground;if(typeof n=="string"){let j=zp(n);e.push(j?`.foregroundStyle(${j})`:`.foregroundStyle(Color(${JSON.stringify(n)}))`)}let r=t.size??t.fontSize;if(r!==void 0&&r!==""){let j=oI(r);j&&e.push(j)}let i=sI(t.fontWeight??t.weight??"");i&&e.push(i);let o=t.padding??"",s=iI(o);s&&(s.kind==="uniform"?e.push(`.padding(${s.value})`):(e.push(`.padding(.vertical, ${s.vertical})`),e.push(`.padding(.horizontal, ${s.horizontal})`)));let a=t.width,l=t.height,c=t.minHeight,d=t.maxWidth,p=t.maxHeight,f=t.margin,m=f==="0 auto",g=a==="100%"||a==="fill"||d==="fill",y=l==="100%"||l==="fill"||c==="100vh",w=d==="fill"?null:d!==void 0?ot(d):null;g&&y?w!==null?e.push(`.frame(maxWidth: ${w}, maxHeight: .infinity, alignment: .topLeading)`):e.push(".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"):g?w!==null?e.push(`.frame(maxWidth: ${w}, alignment: .leading)`):e.push(".frame(maxWidth: .infinity, alignment: .leading)"):y&&e.push(".frame(maxHeight: .infinity, alignment: .top)"),!y&&c==="100vh"&&e.push(".frame(maxHeight: .infinity, alignment: .top)");let b=t.background;if(typeof b=="string"&&b!=="transparent"){let j=zp(b);e.push(j?`.background(${j})`:`.background(Color(${JSON.stringify(b)}))`)}let I=ot(t.radius??"");I!==null&&e.push(`.clipShape(RoundedRectangle(cornerRadius: ${I}))`),(t.shadow===!0||t.shadow==="true")&&e.push(".shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)");let S=t.border,R=t.borderColor;if(S||R){let j=ot(S??"1px")??1,G=typeof R=="string"?zp(R)??"Color.gray":"Color.gray";e.push(`.overlay(RoundedRectangle(cornerRadius: ${I??0}).stroke(${G}, lineWidth: ${j}))`)}if(!g){if(typeof a=="number")e.push(`.frame(width: ${a})`);else if(a!==void 0&&a!=="wrap"){let j=ot(a);j!==null&&e.push(`.frame(width: ${j})`)}if(d!==void 0&&d!=="fill"){let j=ot(d);j!==null&&e.push(`.frame(maxWidth: ${j})`)}}if(!y){if(typeof l=="number")e.push(`.frame(height: ${l})`);else if(l!==void 0&&l!=="wrap"){let j=ot(l);j!==null&&e.push(`.frame(height: ${j})`)}if(c!==void 0&&c!=="100vh")if(typeof c=="number")e.push(`.frame(minHeight: ${c})`);else{let j=ot(c);j!==null&&e.push(`.frame(minHeight: ${j})`)}if(p!==void 0&&p!=="fill"){let j=ot(p);j!==null&&e.push(`.frame(maxHeight: ${j})`)}}if(m)e.push(".frame(maxWidth: .infinity, alignment: .center)");else if(typeof f=="number")e.push(`.padding(${f})`);else if(f!==void 0){let j=ot(f);j!==null&&e.push(`.padding(${j})`)}let N=t.opacity;return typeof N=="number"&&N<1&&e.push(`.opacity(${N})`),e}function ze(t,e,n){if(e.length===0)return t;let r=" ".repeat(n);return`${t}
185
+ `)}var XR,Rv,Av=Y(()=>{"use strict";XR={bold:".bold",semibold:".semibold",medium:".medium",regular:".regular",600:".semibold",700:".bold",500:".medium",400:".regular"};Rv=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});import{resolve as ZR}from"node:path";function tI(t){for(let[e,n]of Object.entries(t.elements)){let r=n.container!==void 0&&n.container!==null,i=n.leaf!==void 0&&n.leaf!==null;if(r===i)throw new Error(`${eI}: element "${e}" must have exactly one of "container" or "leaf"`);(n.container==="vstack"||n.container==="hstack")&&n.spacingProp}}async function Ov(t){if(!t&&Wp)return Wp;let e=t??ZR(Re(),"renderers/swiftui/elements.yaml"),n=await yr(e);return tI(n),t||(Wp=n),n}var eI,Wp,Nv=Y(()=>{"use strict";Ut();us();eI="renderers/swiftui/elements.yaml",Wp=null});function nI(t,e){let n=t.entries.find(r=>r.path===e);if(!n)throw new Error(`Token reference "${e}" not found while merging visual props`);return n.value}function Mv(t,e){let n={};for(let[r,i]of Object.entries(t))n[r]=nI(e,i.ref);return n}function rI(t){let e={};for(let[n,r]of Object.entries(t))r!=null&&(typeof r=="string"||typeof r=="number"||typeof r=="boolean")&&(e[n]=r);return e}function Xt(t){let e=t.theme.defaults[t.elementName]??{},n=t.variantLiteral?t.theme.variants[t.elementName]?.[t.variantLiteral]??{}:{};return{...Mv(e,t.tokens),...Mv(n,t.tokens),...rI(t.instanceLiterals)}}var Up=Y(()=>{"use strict"});function ot(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 zp(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let n=e[1],r=parseInt(n.slice(0,2),16),i=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16);return`Color(red: ${r/255}, green: ${i/255}, blue: ${o/255})`}function iI(t){let e=ot(t);if(e!==null)return{kind:"uniform",value:e};if(typeof t!="string")return null;let n=t.trim().split(/\s+/);if(n.length===2){let r=ot(n[0]),i=ot(n[1]);if(r!==null&&i!==null)return{kind:"shorthand",vertical:r,horizontal:i}}return null}function oI(t){if(t===""||t===null||t===void 0)return null;let e=ot(t);return e!==null?`.font(.system(size: ${e}))`:typeof t=="string"&&!t.endsWith("px")?`.font(.system(size: ${JSON.stringify(t)}))`:null}function sI(t){return typeof t!="string"?null:{bold:".fontWeight(.bold)",semibold:".fontWeight(.semibold)",medium:".fontWeight(.medium)",regular:".fontWeight(.regular)",700:".fontWeight(.bold)",600:".fontWeight(.semibold)",500:".fontWeight(.medium)",400:".fontWeight(.regular)"}[t]??null}function Gp(t){let e=[],n=t.foreground;if(typeof n=="string"){let j=zp(n);e.push(j?`.foregroundStyle(${j})`:`.foregroundStyle(Color(${JSON.stringify(n)}))`)}let r=t.size??t.fontSize;if(r!==void 0&&r!==""){let j=oI(r);j&&e.push(j)}let i=sI(t.fontWeight??t.weight??"");i&&e.push(i);let o=t.padding??"",s=iI(o);s&&(s.kind==="uniform"?e.push(`.padding(${s.value})`):(e.push(`.padding(.vertical, ${s.vertical})`),e.push(`.padding(.horizontal, ${s.horizontal})`)));let a=t.width,l=t.height,c=t.minHeight,d=t.maxWidth,p=t.maxHeight,f=t.margin,m=f==="0 auto",g=a==="100%"||a==="fill"||d==="fill",y=l==="100%"||l==="fill"||c==="100vh",w=d==="fill"?null:d!==void 0?ot(d):null;g&&y?w!==null?e.push(`.frame(maxWidth: ${w}, maxHeight: .infinity, alignment: .topLeading)`):e.push(".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"):g?w!==null?e.push(`.frame(maxWidth: ${w}, alignment: .leading)`):e.push(".frame(maxWidth: .infinity, alignment: .leading)"):y&&e.push(".frame(maxHeight: .infinity, alignment: .top)"),!y&&c==="100vh"&&e.push(".frame(maxHeight: .infinity, alignment: .top)");let _=t.background;if(typeof _=="string"&&_!=="transparent"){let j=zp(_);e.push(j?`.background(${j})`:`.background(Color(${JSON.stringify(_)}))`)}let R=ot(t.radius??"");R!==null&&e.push(`.clipShape(RoundedRectangle(cornerRadius: ${R}))`),(t.shadow===!0||t.shadow==="true")&&e.push(".shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)");let x=t.border,I=t.borderColor;if(x||I){let j=ot(x??"1px")??1,G=typeof I=="string"?zp(I)??"Color.gray":"Color.gray";e.push(`.overlay(RoundedRectangle(cornerRadius: ${R??0}).stroke(${G}, lineWidth: ${j}))`)}if(!g){if(typeof a=="number")e.push(`.frame(width: ${a})`);else if(a!==void 0&&a!=="wrap"){let j=ot(a);j!==null&&e.push(`.frame(width: ${j})`)}if(d!==void 0&&d!=="fill"){let j=ot(d);j!==null&&e.push(`.frame(maxWidth: ${j})`)}}if(!y){if(typeof l=="number")e.push(`.frame(height: ${l})`);else if(l!==void 0&&l!=="wrap"){let j=ot(l);j!==null&&e.push(`.frame(height: ${j})`)}if(c!==void 0&&c!=="100vh")if(typeof c=="number")e.push(`.frame(minHeight: ${c})`);else{let j=ot(c);j!==null&&e.push(`.frame(minHeight: ${j})`)}if(p!==void 0&&p!=="fill"){let j=ot(p);j!==null&&e.push(`.frame(maxHeight: ${j})`)}}if(m)e.push(".frame(maxWidth: .infinity, alignment: .center)");else if(typeof f=="number")e.push(`.padding(${f})`);else if(f!==void 0){let j=ot(f);j!==null&&e.push(`.padding(${j})`)}let N=t.opacity;return typeof N=="number"&&N<1&&e.push(`.opacity(${N})`),e}function ze(t,e,n){if(e.length===0)return t;let r=" ".repeat(n);return`${t}
186
186
  ${e.map(i=>`${r}${i}`).join(`
187
187
  `)}`}var Vv=Y(()=>{"use strict"});function B(t){return" ".repeat(t)}function oa(t,e,n){let i=t.entries.find(d=>d.path===e)?.value??n,o=i.match(/^#([0-9a-fA-F]{6})$/);if(!o)return`Color(${JSON.stringify(i)})`;let s=o[1],a=parseInt(s.slice(0,2),16)/255,l=parseInt(s.slice(2,4),16)/255,c=parseInt(s.slice(4,6),16)/255;return`Color(red: ${a}, green: ${l}, blue: ${c})`}function Dv(t,e,n,r,i){let o=`${B(e+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`;return t.map(a=>{if(a.kind==="map"){let c=a,d=c.item,p=n(c.body,e+2,d);p+=`
188
188
  ${o}`;let f=et(c.source,r,i);return`${B(e+2)}ForEach(${f}, id: \\.id) { ${d} in
@@ -198,20 +198,20 @@ ${o}
198
198
  ${B(e)}}`}function dI(t,e,n,r,i,o){let s=B(n);if(e.leaf==="text"){let a=jv(t.children,i,r);if(!a)return`${s}Text("")`;let l=`${s}Text(${a})`,c=o.map(d=>`${s}${d}`);return[l,...c].join(`
199
199
  `)}if(e.leaf==="button"){let a=me(t.props,"label"),c=jv(t.children,i,r)??(typeof a=="string"?JSON.stringify(a):'"Button"'),d=`${s}Button(${c}) {}`,p=o.map(f=>`${s}${f}`);return[d,...p].join(`
200
200
  `)}if(e.leaf==="textfield"){let a=me(t.props,"placeholder"),l=typeof a=="string"?JSON.stringify(a):'""',c=oa(i.tokens,"ui.text-muted","#6b7280"),{valueExpr:d,hasOnChange:p}=Lv(t.props,i,r),f=p?`.init(get: { ${d} }, set: { _ in })`:`.constant(${d})`,m=`${s}TextField("", text: ${f}, prompt: Text(${l}).foregroundStyle(${c}))`,y=[...o,...lI(t.name)].map(w=>`${s}${w}`);return[m,...y].join(`
201
- `)}if(e.leaf==="texteditor"){let a=me(t.props,"placeholder"),l=typeof a=="string"?JSON.stringify(a):'""',c=oa(i.tokens,"ui.text-muted","#6b7280"),p=o.find(S=>S.startsWith(".frame(minHeight:"))?.match(/minHeight: (\d+)/)?.[1]??"72",{valueExpr:f,hasOnChange:m}=Lv(t.props,i,r),g=m?`.init(get: { ${f} }, set: { _ in })`:`.constant(${f})`,y=o.filter(S=>S.startsWith(".foregroundStyle(")||S.startsWith(".font(")||S.startsWith(".fontWeight(")),w=o.filter(S=>!S.startsWith(".foregroundStyle(")&&!S.startsWith(".font(")&&!S.startsWith(".fontWeight(")&&!S.startsWith(".frame(minHeight:")),b=y.map(S=>`${s} ${S}`),I=w.map(S=>`${s}${S}`);return[`${s}ZStack(alignment: .topLeading) {`,`${s} if true {`,`${s} Text(${l})`,`${s} .font(.system(size: 14))`,`${s} .foregroundStyle(${c})`,`${s} .padding(.top, 8)`,`${s} .padding(.horizontal, 4)`,`${s} .allowsHitTesting(false)`,`${s} }`,`${s} TextEditor(text: ${g})`,`${s} .scrollContentBackground(.hidden)`,...b,`${s}}`,`${s}.frame(minHeight: ${p})`,...I].join(`
201
+ `)}if(e.leaf==="texteditor"){let a=me(t.props,"placeholder"),l=typeof a=="string"?JSON.stringify(a):'""',c=oa(i.tokens,"ui.text-muted","#6b7280"),p=o.find(x=>x.startsWith(".frame(minHeight:"))?.match(/minHeight: (\d+)/)?.[1]??"72",{valueExpr:f,hasOnChange:m}=Lv(t.props,i,r),g=m?`.init(get: { ${f} }, set: { _ in })`:`.constant(${f})`,y=o.filter(x=>x.startsWith(".foregroundStyle(")||x.startsWith(".font(")||x.startsWith(".fontWeight(")),w=o.filter(x=>!x.startsWith(".foregroundStyle(")&&!x.startsWith(".font(")&&!x.startsWith(".fontWeight(")&&!x.startsWith(".frame(minHeight:")),_=y.map(x=>`${s} ${x}`),R=w.map(x=>`${s}${x}`);return[`${s}ZStack(alignment: .topLeading) {`,`${s} if true {`,`${s} Text(${l})`,`${s} .font(.system(size: 14))`,`${s} .foregroundStyle(${c})`,`${s} .padding(.top, 8)`,`${s} .padding(.horizontal, 4)`,`${s} .allowsHitTesting(false)`,`${s} }`,`${s} TextEditor(text: ${g})`,`${s} .scrollContentBackground(.hidden)`,..._,`${s}}`,`${s}.frame(minHeight: ${p})`,...R].join(`
202
202
  `)}if(e.leaf==="picker"){let a=oa(i.tokens,"ui.text","#111827"),l=oa(i.tokens,"ui.text-muted","#6b7280"),c=uI(t.props,i,r,n),d=pI(t.props,i,r),p=o.filter(y=>!y.startsWith(".frame")),f=me(t.props,"width"),m=typeof f=="number"?`${s}.frame(width: ${f})`:`${s}.frame(maxWidth: .infinity)`;return[`${s}Menu {`,c,`${s}} label: {`,`${s} HStack(spacing: 0) {`,`${s} Text(${d})`,`${s} .foregroundStyle(${a})`,`${s} .lineLimit(1)`,`${s} Spacer(minLength: 0)`,`${s} Image(systemName: "chevron.down")`,`${s} .font(.system(size: 12, weight: .semibold))`,`${s} .foregroundStyle(${l})`,`${s} }`,`${s} .padding(.vertical, 9)`,`${s} .padding(.leading, 12)`,`${s} .padding(.trailing, 12)`,...p.map(y=>`${s} ${y}`),`${s}}`,m,`${s}.frame(minHeight: 42)`,`${s}.frame(maxWidth: .infinity)`].join(`
203
203
  `)}if(e.leaf==="spacer")return`${s}Spacer()`;if(e.leaf==="divider")return`${s}Divider()`;if(e.leaf==="image"){let a=me(t.props,"src")??me(t.props,"name"),c=`${s}Image(systemName: ${JSON.stringify(typeof a=="string"?a:"photo")})`,d=o.map(p=>`${s}${p}`);return[c,...d].join(`
204
204
  `)}if(e.leaf==="progressview"){let a=`${s}ProgressView()`,l=o.map(c=>`${s}${c}`);return[a,...l].join(`
205
205
  `)}if(e.leaf==="toggle"){let a=me(t.props,"label")??"",l=`${s}Toggle(${JSON.stringify(a)}, isOn: .constant(false))`,c=o.map(d=>`${s}${d}`);return[l,...c].join(`
206
206
  `)}return`${s}Text("/* unsupported leaf: ${t.name} */")`}function fI(t,e,n,r,i,o,s){let a=Bv(t.children,n+2,i,o,r);if(e.container==="vstack"){let c=e.spacingProp?me(t.props,e.spacingProp):void 0,d=typeof c=="number"?c:0,p=`${B(n+1)}VStack(alignment: .leading, spacing: ${d}) {
207
207
  ${a}
208
- ${B(n+1)}}`;return ze(p,s,n+1)}if(e.container==="hstack"){let c=e.spacingProp?me(t.props,e.spacingProp):void 0,d=typeof c=="number"?c:0,p=me(t.props,"align"),f=me(t.props,"height"),m=p==="center"||typeof f=="number"?".center":".top",g=me(t.props,"justify"),y=me(t.props,"flex"),w=me(t.props,"wrap"),I=t.name==="TableHeader"||t.name==="TableRow"||g!==void 0||typeof y=="number",S=g==="end"?".trailing":g==="center"?".center":".leading",R=[];I&&R.push(`.frame(maxWidth: .infinity, alignment: ${S})`),typeof f=="number"&&R.push(`.frame(height: ${f})`);let N=a;if(g==="between"){let G=t.children.map(ie=>ie.kind==="map"?no(ie,n+2,i,o):ie.kind==="text"?`${B(n+2)}Text(${JSON.stringify(ie.value)})`:ie.kind==="binding"?`${B(n+2)}Text(${et(ie,o,r)})`:i(ie,n+2,r)).filter(Boolean);if(G.length>=2){let ie=G[0],ge=G.slice(1);N=[ie,`${B(n+2)}Spacer()`,...ge].join(`
208
+ ${B(n+1)}}`;return ze(p,s,n+1)}if(e.container==="hstack"){let c=e.spacingProp?me(t.props,e.spacingProp):void 0,d=typeof c=="number"?c:0,p=me(t.props,"align"),f=me(t.props,"height"),m=p==="center"||typeof f=="number"?".center":".top",g=me(t.props,"justify"),y=me(t.props,"flex"),w=me(t.props,"wrap"),R=t.name==="TableHeader"||t.name==="TableRow"||g!==void 0||typeof y=="number",x=g==="end"?".trailing":g==="center"?".center":".leading",I=[];R&&I.push(`.frame(maxWidth: .infinity, alignment: ${x})`),typeof f=="number"&&I.push(`.frame(height: ${f})`);let N=a;if(g==="between"){let G=t.children.map(ie=>ie.kind==="map"?no(ie,n+2,i,o):ie.kind==="text"?`${B(n+2)}Text(${JSON.stringify(ie.value)})`:ie.kind==="binding"?`${B(n+2)}Text(${et(ie,o,r)})`:i(ie,n+2,r)).filter(Boolean);if(G.length>=2){let ie=G[0],ge=G.slice(1);N=[ie,`${B(n+2)}Spacer()`,...ge].join(`
209
209
  `)}}else if(w===!0){N=t.children.map(ie=>{if(ie.kind==="map")return no(ie,n+2,i,o);if(ie.kind==="text")return`${B(n+2)}Text(${JSON.stringify(ie.value)})`;if(ie.kind==="binding")return`${B(n+2)}Text(${et(ie,o,r)})`;let ge=i(ie,n+2,r);return ge||""}).filter(Boolean).join(`
210
210
  `);let G=`${B(n+1)}FlowLayout(spacing: ${d}) {
211
211
  ${N}
212
- ${B(n+1)}}`;return ze(G,[...s,...R],n+1)}let j=`${B(n+1)}HStack(alignment: ${m}, spacing: ${d}) {
212
+ ${B(n+1)}}`;return ze(G,[...s,...I],n+1)}let j=`${B(n+1)}HStack(alignment: ${m}, spacing: ${d}) {
213
213
  ${N}
214
- ${B(n+1)}}`;return ze(j,[...s,...R],n+1)}if(e.container==="group"){let c=a?`${B(n+1)}VStack(alignment: .leading, spacing: 0) {
214
+ ${B(n+1)}}`;return ze(j,[...s,...I],n+1)}if(e.container==="group"){let c=a?`${B(n+1)}VStack(alignment: .leading, spacing: 0) {
215
215
  ${a}
216
216
  ${B(n+1)}}`:`${B(n+1)}VStack { EmptyView() }`;return ze(c,s,n+1)}if(e.container==="navstack")return ze(a,s,n+1);if(e.container==="scrollview"){let c=`${B(n+1)}ScrollView {
217
217
  ${a}
@@ -219,7 +219,7 @@ ${B(n+1)}}`;return ze(c,s,n+1)}if(e.container==="field"){let c=me(t.props,"label
219
219
  ${B(n+2)}Text(${JSON.stringify(c)})
220
220
  ${B(n+2)} .applyVcStyle(VcTheme.resolve("Text", variant: "field-label"))`:"",m=`${B(n+1)}VStack(alignment: .leading, spacing: ${p}) {${f}
221
221
  ${a}
222
- ${B(n+1)}}`;return ze(m,s,n+1)}if(e.container==="tablestack"){let c=me(t.props,"separator"),d=me(t.props,"separatorColor"),p=typeof c=="number"&&c>0,f=t.children.map(y=>y.kind==="map"?no(y,n+2,i,o):i(y,n+2,r)).filter(Boolean),m;if(p){let w=Jp(t.name,t.props,o).separatorColor??d,b="Color.gray.opacity(0.2)";if(typeof w=="string"){let R=w.match(/^#([0-9a-fA-F]{6})$/);if(R){let N=parseInt(R[1].slice(0,2),16)/255,j=parseInt(R[1].slice(2,4),16)/255,G=parseInt(R[1].slice(4,6),16)/255;b=`Color(red: ${N}, green: ${j}, blue: ${G})`}}let I=c,S=I===1?`${B(n+2)}Divider().overlay(${b})`:`${B(n+2)}Rectangle().fill(${b}).frame(height: ${I})`;m=f.flatMap((R,N)=>N<f.length-1?[R,S]:[R])}else m=f;let g=`${B(n+1)}VStack(alignment: .leading, spacing: 0) {
222
+ ${B(n+1)}}`;return ze(m,s,n+1)}if(e.container==="tablestack"){let c=me(t.props,"separator"),d=me(t.props,"separatorColor"),p=typeof c=="number"&&c>0,f=t.children.map(y=>y.kind==="map"?no(y,n+2,i,o):i(y,n+2,r)).filter(Boolean),m;if(p){let w=Jp(t.name,t.props,o).separatorColor??d,_="Color.gray.opacity(0.2)";if(typeof w=="string"){let I=w.match(/^#([0-9a-fA-F]{6})$/);if(I){let N=parseInt(I[1].slice(0,2),16)/255,j=parseInt(I[1].slice(2,4),16)/255,G=parseInt(I[1].slice(4,6),16)/255;_=`Color(red: ${N}, green: ${j}, blue: ${G})`}}let R=c,x=R===1?`${B(n+2)}Divider().overlay(${_})`:`${B(n+2)}Rectangle().fill(${_}).frame(height: ${R})`;m=f.flatMap((I,N)=>N<f.length-1?[I,x]:[I])}else m=f;let g=`${B(n+1)}VStack(alignment: .leading, spacing: 0) {
223
223
  ${m.join(`
224
224
  `)}
225
225
  ${B(n+1)}}`;return ze(g,s,n+1)}if(e.container==="cellgroup"){let c=me(t.props,"width"),d=me(t.props,"flex"),p=me(t.props,"align"),f=p==="end"?".trailing":p==="center"?".center":".leading",m=typeof d=="number",g=[...s,".lineLimit(1)"];typeof c=="number"?g.push(`.frame(width: ${c}, alignment: ${f})`):m&&g.push(`.frame(maxWidth: .infinity, alignment: ${f})`);let y=a?`${B(n+1)}Group {
@@ -306,7 +306,7 @@ struct FlowLayout: Layout {
306
306
  }
307
307
  }
308
308
  }
309
- `});import{resolve as AI}from"node:path";function OI(t){ls(Object.keys(t.elements),ct,eb);for(let[e,n]of Object.entries(t.elements)){let r=n.container!==void 0&&n.container!==null,i=n.leaf!==void 0&&n.leaf!==null;if(r===i)throw new Error(`${eb}: element "${e}" must have exactly one of "container" or "leaf"`)}}async function tb(t){if(!t&&Xp)return Xp;let e=t??AI(Re(),"renderers/compose/elements.yaml"),n=await yr(e);return OI(n),t||(Xp=n),n}var eb,Xp,nb=Y(()=>{"use strict";wt();Ut();us();eb="renderers/compose/elements.yaml",Xp=null});function Ge(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 NI(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let n=e[1],r=parseInt(n.slice(0,2),16),i=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16);return`Color(${r}, ${i}, ${o})`}function MI(t){let e=t.match(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(!e)return null;let n=Number(e[1])/255,r=Number(e[2])/255,i=Number(e[3])/255,o=Number(e[4]);return`Color(${n}f, ${r}f, ${i}f, ${o}f)`}function Dr(t){return t==="transparent"?"Color.Transparent":NI(t)??MI(t)??null}function VI(t){let e=Ge(t);if(e!==null)return{kind:"uniform",value:e};if(typeof t!="string")return null;let n=t.trim().split(/\s+/);if(n.length===2){let r=Ge(n[0]),i=Ge(n[1]);if(r!==null&&i!==null)return{kind:"shorthand",vertical:r,horizontal:i}}return null}function LI(t){return typeof t!="string"?null:{bold:"FontWeight.Bold",semibold:"FontWeight.SemiBold",medium:"FontWeight.Medium",regular:"FontWeight.Normal",700:"FontWeight.Bold",600:"FontWeight.SemiBold",500:"FontWeight.Medium",400:"FontWeight.Normal"}[t]??null}function jI(t){return typeof t!="string"?null:{start:"TextAlign.Start",center:"TextAlign.Center",end:"TextAlign.End"}[t]??null}function DI(t){return typeof t!="string"?null:{start:"Alignment.Start",center:"Alignment.CenterVertically",end:"Alignment.Bottom",stretch:"Alignment.CenterVertically"}[t]??null}function rb(t,e){return t==="between"||t==="spaceBetween"?"Arrangement.SpaceBetween":t==="around"||t==="spaceAround"?"Arrangement.SpaceAround":t==="spaceEvenly"?"Arrangement.SpaceEvenly":t==="end"?"Arrangement.End":t==="center"?"Arrangement.Center":`Arrangement.spacedBy(${e})`}function ib(t){return{topStart:"Alignment.TopStart",top:"Alignment.TopCenter",topEnd:"Alignment.TopEnd",start:"Alignment.CenterStart",center:"Alignment.Center",end:"Alignment.CenterEnd",bottomStart:"Alignment.BottomStart",bottom:"Alignment.BottomCenter",bottomEnd:"Alignment.BottomEnd"}[t]??"Alignment.TopStart"}function Qp(t,e={}){let n=[],r=e.isLeaf??!1,i=t.foreground;if(typeof i=="string"){let X=Dr(i);X&&n.push(r?`@textStyle(color = ${X})`:`@contentColor(${X})`)}let o=t.size??t.fontSize;if(o!==void 0&&o!==""){let X=typeof o=="number"?o:Ge(o);X!==null&&n.push(r?`@textStyle(fontSize = ${X}.sp)`:`@inheritTextStyle(fontSize = ${X}.sp)`)}let s=LI(t.fontWeight??t.weight??"");s&&n.push(r?`@textStyle(fontWeight = ${s})`:`@inheritTextStyle(fontWeight = ${s})`);let a=t.width,l=t.height,c=t.minWidth,d=t.minHeight,p=t.maxWidth,f=t.maxHeight,m=t.margin,g=m==="0 auto",y=a==="100%"||a==="fill"||p==="fill",w=l==="100%"||l==="fill"||d==="100vh",b=p==="fill"?null:p!==void 0?Ge(p):null,I=!1;y&&w?(b!==null?n.push(`.widthIn(max = ${b}.dp).fillMaxHeight()`):n.push(".fillMaxWidth().fillMaxHeight()"),I=!0):y?b!==null?n.push(`.widthIn(max = ${b}.dp)`):n.push(".fillMaxWidth()"):w&&(n.push(".fillMaxHeight()"),I=!0),!I&&d==="100vh"&&n.push(".fillMaxHeight()");let S=Ge(t.radius??"");(t.shadow===!0||t.shadow==="true")&&n.push(`.shadow(elevation = 4.dp, shape = RoundedCornerShape(${S??0}.dp), clip = false, ambientColor = Color.Black.copy(alpha = 0.08f), spotColor = Color.Black.copy(alpha = 0.08f))`);let R=t.background;if(typeof R=="string"&&R!=="transparent"){let X=Dr(R);X&&X!=="Color.Transparent"&&n.push(`.background(${X}, RoundedCornerShape(${S??0}.dp))`)}t.clip!=="none"&&S!==null&&n.push(`.clip(RoundedCornerShape(${S}.dp))`);let j=t.border,G=t.borderColor;if(j||G){let X=Ge(j??"1px")??1,D=typeof G=="string"?Dr(G)??"Color.Gray":"Color.Gray";n.push(`.border(${X}.dp, ${D}, RoundedCornerShape(${S??0}.dp))`)}if(!y){if(typeof a=="number")n.push(`.width(${a}.dp)`);else if(a!==void 0&&a!=="wrap"){let X=Ge(a);X!==null&&n.push(`.width(${X}.dp)`)}if(typeof c=="number")n.push(`.widthIn(min = ${c}.dp)`);else if(c!==void 0){let X=Ge(c);X!==null&&n.push(`.widthIn(min = ${X}.dp)`)}if(p!==void 0&&p!=="fill"){let X=Ge(p);X!==null&&n.push(`.widthIn(max = ${X}.dp)`)}}if(!w){if(typeof l=="number")n.push(`.height(${l}.dp)`);else if(l!==void 0&&l!=="wrap"){let X=Ge(l);X!==null&&n.push(`.height(${X}.dp)`)}if(d!==void 0&&d!=="100vh")if(typeof d=="number")n.push(`.heightIn(min = ${d}.dp)`);else{let X=Ge(d);X!==null&&n.push(`.heightIn(min = ${X}.dp)`)}if(f!==void 0&&f!=="fill"){let X=Ge(f);X!==null&&n.push(`.heightIn(max = ${X}.dp)`)}}typeof t.aspectRatio=="number"&&n.push(`.aspectRatio(${t.aspectRatio}f)`),typeof t.weight=="number"&&n.push(`.weight(${t.weight}f)`);let ie=t.padding??"",ge=VI(ie);if(ge&&(ge.kind==="uniform"?n.push(`.padding(${ge.value}.dp)`):n.push(`.padding(horizontal = ${ge.horizontal}.dp, vertical = ${ge.vertical}.dp)`)),g)n.push("@wrapContentCenter()");else if(typeof m=="number")n.push(`.padding(${m}.dp)`);else if(m!==void 0&&typeof m=="string"){let X=Ge(m);X!==null&&n.push(`.padding(${X}.dp)`)}let xe=t.opacity;typeof xe=="number"&&xe<1&&n.push(`.alpha(${xe}f)`);let Te=jI(t.textAlign??"");Te&&n.push(`@textAlign(${Te})`);let $e=t.lineLimit;if($e!==void 0&&$e!=="none"&&$e!==""){let X=typeof $e=="number"?$e:Ge($e);X!==null&&n.push(`@textMaxLines(${X})`)}let Je=t.textOverflow;Je==="ellipsis"?n.push("@textOverflow(TextOverflow.Ellipsis)"):Je==="clip"&&n.push("@textOverflow(TextOverflow.Clip)");let de=DI(t.selfAlign??"");return de&&n.push(`.align(${de})`),n}function ca(t){return t.filter(e=>!e.includes(".width(")&&!e.includes(".widthIn(")&&!e.includes(".height(")&&!e.includes(".heightIn(")&&!e.includes(".weight(")&&e!==".fillMaxWidth()"&&e!==".fillMaxHeight()"&&!e.startsWith(".fillMaxWidth().")&&!e.endsWith(".fillMaxWidth()")&&!e.includes(".fillMaxHeight()"))}function ob(t){return t.filter(e=>!e.includes(".background("))}function la(t){return t.filter(e=>!e.includes(".padding("))}function sb(t){return t.filter(e=>!e.includes(".clip(RoundedCornerShape("))}function qr(t){return t.filter(e=>e.includes(".padding("))}function ab(t){let n=t.find(r=>r.includes(".clip(RoundedCornerShape("))?.match(/RoundedCornerShape\((\d+)\.dp\)/);return n?Number(n[1]):null}function cb(t){if(t.length===0)return null;let e=t[0],n=e.match(/\.padding\(horizontal = (\d+)\.dp, vertical = (\d+)\.dp\)/);if(n)return`PaddingValues(horizontal = ${n[1]}.dp, vertical = ${n[2]}.dp)`;let r=e.match(/\.padding\((\d+)\.dp\)/);return r?`PaddingValues(${r[1]}.dp)`:null}function lb(t){return t.some(e=>e.startsWith("@runtimeStyle(")||e.includes(".background("))}function ub(t){return t.some(e=>e.includes(".fillMaxHeight()"))}function st(t){let e=new Set,n=[];for(let r of t)e.has(r)||(e.add(r),n.push(r));return n}function Me(t,e){return e.length===0?t:e.filter(n=>!qI.some(r=>n.startsWith(r)||n===r)).map(n=>n.startsWith("@runtimeStyle(")?`.applyVcStyle(${n.replace(/^@runtimeStyle\(/,"").replace(/\)$/,"")})`:n).reduce((n,r)=>`${n}${r}`,t)}function oo(t){let e=t.filter(r=>r.startsWith("@textStyle(")).map(r=>r.replace(/^@textStyle\(/,"").replace(/\)$/,"")),n=t.find(r=>r.startsWith("@textAlign("));if(n){let r=n.replace(/^@textAlign\(/,"").replace(/\)$/,"");e.push(`textAlign = ${r}`)}return e}function pb(t){let e=t.find(i=>i.startsWith("@textMaxLines("));if(!e)return null;let n=e.replace(/^@textMaxLines\(/,"").replace(/\)$/,""),r=Number(n);return Number.isFinite(r)?r:null}function db(t){let e=t.find(n=>n.startsWith("@textOverflow("));return e?e.replace(/^@textOverflow\(/,"").replace(/\)$/,""):null}function fb(t){return t.includes("@textFillMaxWidth()")}function hb(t){let e=t.find(n=>n.startsWith("@contentColor("));return e?e.replace(/^@contentColor\(/,"").replace(/\)$/,""):null}function mb(t){return t.filter(e=>e.startsWith("@inheritTextStyle(")).map(e=>e.replace(/^@inheritTextStyle\(/,"").replace(/\)$/,""))}function ua(t){return t.includes("@wrapContentCenter()")}function gb(t){return t.match(/\.applyVcStyle\((VcTheme\.resolve\([^)]+\))\)/)?.[1]??null}var qI,yb=Y(()=>{"use strict";qI=["@textStyle(","@contentColor(","@inheritTextStyle(","@wrapContentCenter()","@textMaxLines(","@textOverflow(","@textAlign(","@textFillMaxWidth()"]});function V(t){return" ".repeat(t)}function ue(t,e){let n=t[e];if(n!=null){if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="object"&&"kind"in n&&n.kind==="literal")return n.value}}function $b(t){let e={};for(let[n,r]of Object.entries(t)){if(n==="variant"||n==="id"||!Xn.has(n))continue;let i=ue(t,n);i!==void 0&&(e[n]=i)}return e}function xb(t,e,n){let r=t.variant;return!r||typeof r!="object"||!("kind"in r)?null:r.kind==="binding"?Fe(r,e,n):r.kind==="concat"?`"${r.parts.map(s=>typeof s=="string"?s:`\${${Fe(s,e,n)}}`).join("")}"`:null}function so(t){let e=t.variant;return!e||typeof e!="object"||!("kind"in e)?!1:e.kind==="binding"||e.kind==="concat"}function FI(t,e,n,r){let i=n.map.elements[t],o=ue(e,"variant"),s=$b(e);i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp];let a=!!i?.leaf;if(so(e)){let c=xb(e,n,r),d=Xt({elementName:t,theme:{defaults:{},variants:{}},tokens:n.tokens,instanceLiterals:s});return[...Qp(d,{isLeaf:a}),`@runtimeStyle(VcTheme.resolve(${JSON.stringify(t)}, variant = ${c}))`]}let l=Xt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return t==="Box"&&o==="card"&&delete l.height,Qp(l,{isLeaf:a})}function Fr(t,e,n){let r=ue(e,"variant"),i=$b(e);return Xt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:typeof r=="string"?r:void 0,instanceLiterals:i})}function id(t){if(!t||typeof t!="string")return null;let e=t.match(/repeat\((\d+),\s*minmax\(0,\s*1fr\)\)/);if(e)return{kind:"equal-columns",count:Number(e[1])};let n=t.match(/repeat\(auto-fit,\s*minmax\((\d+)px/);if(n)return{kind:"adaptive",minWidth:Number(n[1])};let r=t.trim().split(/\s+/);return r.length>=2?{kind:"fixed-columns",widths:r}:null}function BI(t,e){if(t.kind!=="component")return null;let r=Fr(t.name,t.props,e).background;return typeof r!="string"||r==="transparent"?null:Dr(r)??`Color(${JSON.stringify(r)})`}function wb(t,e,n,r){let o=Fr(t,e,n)[r];return typeof o!="string"?r==="background"?"Color.Transparent":"Color.Unspecified":r==="background"&&(o==="transparent"||!o)?"Color.Transparent":Dr(o)??"Color.Unspecified"}function HI(t){return t==="end"?"TextAlign.End":t==="center"?"TextAlign.Center":"TextAlign.Start"}function WI(t){return t==="end"?"Alignment.CenterEnd":t==="center"?"Alignment.Center":"Alignment.CenterStart"}function Sb(t,e,n,r,i,o,s){let a=ue(t.props,"gap"),l=typeof a=="number"?`${a}.dp`:"16.dp",c=Me("Modifier.fillMaxWidth()",st(o));if(t.children.length===1&&t.children[0].kind==="map"){let p=t.children[0],f=p.item,m=Fe(p.source,i,n),g=r(p.body,e+3,f);return[`${V(e)}Row(modifier = ${c}, horizontalArrangement = Arrangement.spacedBy(${l}), verticalAlignment = Alignment.Top) {`,`${V(e+1)}for (${f} in ${m}) {`,`${V(e+2)}Box(modifier = Modifier.weight(1f).fillMaxWidth(), contentAlignment = Alignment.TopStart) {`,g,`${V(e+2)}}`,`${V(e+1)}}`,`${V(e)}}`].join(`
309
+ `});import{resolve as AI}from"node:path";function OI(t){ls(Object.keys(t.elements),ct,eb);for(let[e,n]of Object.entries(t.elements)){let r=n.container!==void 0&&n.container!==null,i=n.leaf!==void 0&&n.leaf!==null;if(r===i)throw new Error(`${eb}: element "${e}" must have exactly one of "container" or "leaf"`)}}async function tb(t){if(!t&&Xp)return Xp;let e=t??AI(Re(),"renderers/compose/elements.yaml"),n=await yr(e);return OI(n),t||(Xp=n),n}var eb,Xp,nb=Y(()=>{"use strict";wt();Ut();us();eb="renderers/compose/elements.yaml",Xp=null});function Ge(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 NI(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let n=e[1],r=parseInt(n.slice(0,2),16),i=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16);return`Color(${r}, ${i}, ${o})`}function MI(t){let e=t.match(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(!e)return null;let n=Number(e[1])/255,r=Number(e[2])/255,i=Number(e[3])/255,o=Number(e[4]);return`Color(${n}f, ${r}f, ${i}f, ${o}f)`}function Dr(t){return t==="transparent"?"Color.Transparent":NI(t)??MI(t)??null}function VI(t){let e=Ge(t);if(e!==null)return{kind:"uniform",value:e};if(typeof t!="string")return null;let n=t.trim().split(/\s+/);if(n.length===2){let r=Ge(n[0]),i=Ge(n[1]);if(r!==null&&i!==null)return{kind:"shorthand",vertical:r,horizontal:i}}return null}function LI(t){return typeof t!="string"?null:{bold:"FontWeight.Bold",semibold:"FontWeight.SemiBold",medium:"FontWeight.Medium",regular:"FontWeight.Normal",700:"FontWeight.Bold",600:"FontWeight.SemiBold",500:"FontWeight.Medium",400:"FontWeight.Normal"}[t]??null}function jI(t){return typeof t!="string"?null:{start:"TextAlign.Start",center:"TextAlign.Center",end:"TextAlign.End"}[t]??null}function DI(t){return typeof t!="string"?null:{start:"Alignment.Start",center:"Alignment.CenterVertically",end:"Alignment.Bottom",stretch:"Alignment.CenterVertically"}[t]??null}function rb(t,e){return t==="between"||t==="spaceBetween"?"Arrangement.SpaceBetween":t==="around"||t==="spaceAround"?"Arrangement.SpaceAround":t==="spaceEvenly"?"Arrangement.SpaceEvenly":t==="end"?"Arrangement.End":t==="center"?"Arrangement.Center":`Arrangement.spacedBy(${e})`}function ib(t){return{topStart:"Alignment.TopStart",top:"Alignment.TopCenter",topEnd:"Alignment.TopEnd",start:"Alignment.CenterStart",center:"Alignment.Center",end:"Alignment.CenterEnd",bottomStart:"Alignment.BottomStart",bottom:"Alignment.BottomCenter",bottomEnd:"Alignment.BottomEnd"}[t]??"Alignment.TopStart"}function Qp(t,e={}){let n=[],r=e.isLeaf??!1,i=t.foreground;if(typeof i=="string"){let X=Dr(i);X&&n.push(r?`@textStyle(color = ${X})`:`@contentColor(${X})`)}let o=t.size??t.fontSize;if(o!==void 0&&o!==""){let X=typeof o=="number"?o:Ge(o);X!==null&&n.push(r?`@textStyle(fontSize = ${X}.sp)`:`@inheritTextStyle(fontSize = ${X}.sp)`)}let s=LI(t.fontWeight??t.weight??"");s&&n.push(r?`@textStyle(fontWeight = ${s})`:`@inheritTextStyle(fontWeight = ${s})`);let a=t.width,l=t.height,c=t.minWidth,d=t.minHeight,p=t.maxWidth,f=t.maxHeight,m=t.margin,g=m==="0 auto",y=a==="100%"||a==="fill"||p==="fill",w=l==="100%"||l==="fill"||d==="100vh",_=p==="fill"?null:p!==void 0?Ge(p):null,R=!1;y&&w?(_!==null?n.push(`.widthIn(max = ${_}.dp).fillMaxHeight()`):n.push(".fillMaxWidth().fillMaxHeight()"),R=!0):y?_!==null?n.push(`.widthIn(max = ${_}.dp)`):n.push(".fillMaxWidth()"):w&&(n.push(".fillMaxHeight()"),R=!0),!R&&d==="100vh"&&n.push(".fillMaxHeight()");let x=Ge(t.radius??"");(t.shadow===!0||t.shadow==="true")&&n.push(`.shadow(elevation = 4.dp, shape = RoundedCornerShape(${x??0}.dp), clip = false, ambientColor = Color.Black.copy(alpha = 0.08f), spotColor = Color.Black.copy(alpha = 0.08f))`);let I=t.background;if(typeof I=="string"&&I!=="transparent"){let X=Dr(I);X&&X!=="Color.Transparent"&&n.push(`.background(${X}, RoundedCornerShape(${x??0}.dp))`)}t.clip!=="none"&&x!==null&&n.push(`.clip(RoundedCornerShape(${x}.dp))`);let j=t.border,G=t.borderColor;if(j||G){let X=Ge(j??"1px")??1,D=typeof G=="string"?Dr(G)??"Color.Gray":"Color.Gray";n.push(`.border(${X}.dp, ${D}, RoundedCornerShape(${x??0}.dp))`)}if(!y){if(typeof a=="number")n.push(`.width(${a}.dp)`);else if(a!==void 0&&a!=="wrap"){let X=Ge(a);X!==null&&n.push(`.width(${X}.dp)`)}if(typeof c=="number")n.push(`.widthIn(min = ${c}.dp)`);else if(c!==void 0){let X=Ge(c);X!==null&&n.push(`.widthIn(min = ${X}.dp)`)}if(p!==void 0&&p!=="fill"){let X=Ge(p);X!==null&&n.push(`.widthIn(max = ${X}.dp)`)}}if(!w){if(typeof l=="number")n.push(`.height(${l}.dp)`);else if(l!==void 0&&l!=="wrap"){let X=Ge(l);X!==null&&n.push(`.height(${X}.dp)`)}if(d!==void 0&&d!=="100vh")if(typeof d=="number")n.push(`.heightIn(min = ${d}.dp)`);else{let X=Ge(d);X!==null&&n.push(`.heightIn(min = ${X}.dp)`)}if(f!==void 0&&f!=="fill"){let X=Ge(f);X!==null&&n.push(`.heightIn(max = ${X}.dp)`)}}typeof t.aspectRatio=="number"&&n.push(`.aspectRatio(${t.aspectRatio}f)`),typeof t.weight=="number"&&n.push(`.weight(${t.weight}f)`);let ie=t.padding??"",ge=VI(ie);if(ge&&(ge.kind==="uniform"?n.push(`.padding(${ge.value}.dp)`):n.push(`.padding(horizontal = ${ge.horizontal}.dp, vertical = ${ge.vertical}.dp)`)),g)n.push("@wrapContentCenter()");else if(typeof m=="number")n.push(`.padding(${m}.dp)`);else if(m!==void 0&&typeof m=="string"){let X=Ge(m);X!==null&&n.push(`.padding(${X}.dp)`)}let xe=t.opacity;typeof xe=="number"&&xe<1&&n.push(`.alpha(${xe}f)`);let Te=jI(t.textAlign??"");Te&&n.push(`@textAlign(${Te})`);let $e=t.lineLimit;if($e!==void 0&&$e!=="none"&&$e!==""){let X=typeof $e=="number"?$e:Ge($e);X!==null&&n.push(`@textMaxLines(${X})`)}let Je=t.textOverflow;Je==="ellipsis"?n.push("@textOverflow(TextOverflow.Ellipsis)"):Je==="clip"&&n.push("@textOverflow(TextOverflow.Clip)");let de=DI(t.selfAlign??"");return de&&n.push(`.align(${de})`),n}function ca(t){return t.filter(e=>!e.includes(".width(")&&!e.includes(".widthIn(")&&!e.includes(".height(")&&!e.includes(".heightIn(")&&!e.includes(".weight(")&&e!==".fillMaxWidth()"&&e!==".fillMaxHeight()"&&!e.startsWith(".fillMaxWidth().")&&!e.endsWith(".fillMaxWidth()")&&!e.includes(".fillMaxHeight()"))}function ob(t){return t.filter(e=>!e.includes(".background("))}function la(t){return t.filter(e=>!e.includes(".padding("))}function sb(t){return t.filter(e=>!e.includes(".clip(RoundedCornerShape("))}function qr(t){return t.filter(e=>e.includes(".padding("))}function ab(t){let n=t.find(r=>r.includes(".clip(RoundedCornerShape("))?.match(/RoundedCornerShape\((\d+)\.dp\)/);return n?Number(n[1]):null}function cb(t){if(t.length===0)return null;let e=t[0],n=e.match(/\.padding\(horizontal = (\d+)\.dp, vertical = (\d+)\.dp\)/);if(n)return`PaddingValues(horizontal = ${n[1]}.dp, vertical = ${n[2]}.dp)`;let r=e.match(/\.padding\((\d+)\.dp\)/);return r?`PaddingValues(${r[1]}.dp)`:null}function lb(t){return t.some(e=>e.startsWith("@runtimeStyle(")||e.includes(".background("))}function ub(t){return t.some(e=>e.includes(".fillMaxHeight()"))}function st(t){let e=new Set,n=[];for(let r of t)e.has(r)||(e.add(r),n.push(r));return n}function Me(t,e){return e.length===0?t:e.filter(n=>!qI.some(r=>n.startsWith(r)||n===r)).map(n=>n.startsWith("@runtimeStyle(")?`.applyVcStyle(${n.replace(/^@runtimeStyle\(/,"").replace(/\)$/,"")})`:n).reduce((n,r)=>`${n}${r}`,t)}function oo(t){let e=t.filter(r=>r.startsWith("@textStyle(")).map(r=>r.replace(/^@textStyle\(/,"").replace(/\)$/,"")),n=t.find(r=>r.startsWith("@textAlign("));if(n){let r=n.replace(/^@textAlign\(/,"").replace(/\)$/,"");e.push(`textAlign = ${r}`)}return e}function pb(t){let e=t.find(i=>i.startsWith("@textMaxLines("));if(!e)return null;let n=e.replace(/^@textMaxLines\(/,"").replace(/\)$/,""),r=Number(n);return Number.isFinite(r)?r:null}function db(t){let e=t.find(n=>n.startsWith("@textOverflow("));return e?e.replace(/^@textOverflow\(/,"").replace(/\)$/,""):null}function fb(t){return t.includes("@textFillMaxWidth()")}function hb(t){let e=t.find(n=>n.startsWith("@contentColor("));return e?e.replace(/^@contentColor\(/,"").replace(/\)$/,""):null}function mb(t){return t.filter(e=>e.startsWith("@inheritTextStyle(")).map(e=>e.replace(/^@inheritTextStyle\(/,"").replace(/\)$/,""))}function ua(t){return t.includes("@wrapContentCenter()")}function gb(t){return t.match(/\.applyVcStyle\((VcTheme\.resolve\([^)]+\))\)/)?.[1]??null}var qI,yb=Y(()=>{"use strict";qI=["@textStyle(","@contentColor(","@inheritTextStyle(","@wrapContentCenter()","@textMaxLines(","@textOverflow(","@textAlign(","@textFillMaxWidth()"]});function V(t){return" ".repeat(t)}function ue(t,e){let n=t[e];if(n!=null){if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="object"&&"kind"in n&&n.kind==="literal")return n.value}}function $b(t){let e={};for(let[n,r]of Object.entries(t)){if(n==="variant"||n==="id"||!Xn.has(n))continue;let i=ue(t,n);i!==void 0&&(e[n]=i)}return e}function xb(t,e,n){let r=t.variant;return!r||typeof r!="object"||!("kind"in r)?null:r.kind==="binding"?Fe(r,e,n):r.kind==="concat"?`"${r.parts.map(s=>typeof s=="string"?s:`\${${Fe(s,e,n)}}`).join("")}"`:null}function so(t){let e=t.variant;return!e||typeof e!="object"||!("kind"in e)?!1:e.kind==="binding"||e.kind==="concat"}function FI(t,e,n,r){let i=n.map.elements[t],o=ue(e,"variant"),s=$b(e);i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp];let a=!!i?.leaf;if(so(e)){let c=xb(e,n,r),d=Xt({elementName:t,theme:{defaults:{},variants:{}},tokens:n.tokens,instanceLiterals:s});return[...Qp(d,{isLeaf:a}),`@runtimeStyle(VcTheme.resolve(${JSON.stringify(t)}, variant = ${c}))`]}let l=Xt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return t==="Box"&&o==="card"&&delete l.height,Qp(l,{isLeaf:a})}function Fr(t,e,n){let r=ue(e,"variant"),i=$b(e);return Xt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:typeof r=="string"?r:void 0,instanceLiterals:i})}function id(t){if(!t||typeof t!="string")return null;let e=t.match(/repeat\((\d+),\s*minmax\(0,\s*1fr\)\)/);if(e)return{kind:"equal-columns",count:Number(e[1])};let n=t.match(/repeat\(auto-fit,\s*minmax\((\d+)px/);if(n)return{kind:"adaptive",minWidth:Number(n[1])};let r=t.trim().split(/\s+/);return r.length>=2?{kind:"fixed-columns",widths:r}:null}function BI(t,e){if(t.kind!=="component")return null;let r=Fr(t.name,t.props,e).background;return typeof r!="string"||r==="transparent"?null:Dr(r)??`Color(${JSON.stringify(r)})`}function wb(t,e,n,r){let o=Fr(t,e,n)[r];return typeof o!="string"?r==="background"?"Color.Transparent":"Color.Unspecified":r==="background"&&(o==="transparent"||!o)?"Color.Transparent":Dr(o)??"Color.Unspecified"}function HI(t){return t==="end"?"TextAlign.End":t==="center"?"TextAlign.Center":"TextAlign.Start"}function WI(t){return t==="end"?"Alignment.CenterEnd":t==="center"?"Alignment.Center":"Alignment.CenterStart"}function Sb(t,e,n,r,i,o,s){let a=ue(t.props,"gap"),l=typeof a=="number"?`${a}.dp`:"16.dp",c=Me("Modifier.fillMaxWidth()",st(o));if(t.children.length===1&&t.children[0].kind==="map"){let p=t.children[0],f=p.item,m=Fe(p.source,i,n),g=r(p.body,e+3,f);return[`${V(e)}Row(modifier = ${c}, horizontalArrangement = Arrangement.spacedBy(${l}), verticalAlignment = Alignment.Top) {`,`${V(e+1)}for (${f} in ${m}) {`,`${V(e+2)}Box(modifier = Modifier.weight(1f).fillMaxWidth(), contentAlignment = Alignment.TopStart) {`,g,`${V(e+2)}}`,`${V(e+1)}}`,`${V(e)}}`].join(`
310
310
  `)}let d=t.children.map(p=>{let f="";return p.kind==="map"?f=gn(p,e+2,r,i,"none"):p.kind==="text"?f=`${V(e+2)}Text(text = ${JSON.stringify(p.value)})`:p.kind==="binding"?f=`${V(e+2)}Text(text = ${Fe(p,i,n)})`:f=r(p,e+2,n),f?`${V(e+1)}Box(modifier = Modifier.weight(1f).fillMaxSize(), propagateMinConstraints = true, contentAlignment = Alignment.TopStart) {
311
311
  ${f}
312
312
  ${V(e+1)}}`:""}).filter(Boolean);return[`${V(e)}Row(modifier = ${c}.height(IntrinsicSize.Min), horizontalArrangement = Arrangement.spacedBy(${l}), verticalAlignment = Alignment.Top) {`,d.join(`
@@ -318,7 +318,7 @@ ${V(e+1)}}
318
318
  ${V(e)}}`:`${V(e)}item {
319
319
  ${a}
320
320
  ${V(e)}}`:""}).filter(Boolean).join(`
321
- `)}function zI(t,e,n,r,i,o){let s=Me("Modifier.fillMaxWidth()",st(o)),a=Fr(t.name,t.props,i),l=id(a.gridTemplateColumns),c=l?.kind==="fixed-columns"?l.widths:[],d=[];for(let p=0;p<t.children.length;p++){let f=t.children[p],m=c[p],g=m?.match(/^(\d+)px$/);if(g){let y="";if(f.kind==="map"?y=gn(f,e+2,r,i,"none"):f.kind==="text"?y=`${V(e+2)}Text(text = ${JSON.stringify(f.value)})`:f.kind==="binding"?y=`${V(e+2)}Text(text = ${Fe(f,i,n)})`:y=r(f,e+2,n),!y)continue;let w=BI(f,i),b=w?`.background(${w})`:"";d.push([`${V(e+1)}Box(modifier = Modifier.width(${Number(g[1])}.dp).fillMaxHeight()${b}) {`,y,`${V(e+1)}}`].join(`
321
+ `)}function zI(t,e,n,r,i,o){let s=Me("Modifier.fillMaxWidth()",st(o)),a=Fr(t.name,t.props,i),l=id(a.gridTemplateColumns),c=l?.kind==="fixed-columns"?l.widths:[],d=[];for(let p=0;p<t.children.length;p++){let f=t.children[p],m=c[p],g=m?.match(/^(\d+)px$/);if(g){let y="";if(f.kind==="map"?y=gn(f,e+2,r,i,"none"):f.kind==="text"?y=`${V(e+2)}Text(text = ${JSON.stringify(f.value)})`:f.kind==="binding"?y=`${V(e+2)}Text(text = ${Fe(f,i,n)})`:y=r(f,e+2,n),!y)continue;let w=BI(f,i),_=w?`.background(${w})`:"";d.push([`${V(e+1)}Box(modifier = Modifier.width(${Number(g[1])}.dp).fillMaxHeight()${_}) {`,y,`${V(e+1)}}`].join(`
322
322
  `))}else if(m==="1fr"){let y=i.inVerticalScroll;i.inVerticalScroll=!0;let w="";if(f.kind==="map"?w=gn(f,e+2,r,i,"none"):f.kind==="text"?w=`${V(e+2)}Text(text = ${JSON.stringify(f.value)})`:f.kind==="binding"?w=`${V(e+2)}Text(text = ${Fe(f,i,n)})`:w=r(f,e+2,n),i.inVerticalScroll=y,!w)continue;d.push([`${V(e+1)}Box(modifier = Modifier.weight(1f).fillMaxHeight(), contentAlignment = Alignment.TopStart) {`,`${V(e+2)}Column(modifier = Modifier.fillMaxSize().verticalScroll(rememberScrollState())) {`,w,`${V(e+2)}}`,`${V(e+1)}}`].join(`
323
323
  `))}else{let y="";if(f.kind==="map"?y=gn(f,e+2,r,i,"none"):f.kind==="text"?y=`${V(e+2)}Text(text = ${JSON.stringify(f.value)})`:f.kind==="binding"?y=`${V(e+2)}Text(text = ${Fe(f,i,n)})`:y=r(f,e+2,n),!y)continue;d.push(y)}}return[`${V(e)}Row(modifier = ${s}, horizontalArrangement = Arrangement.spacedBy(0.dp)) {`,d.join(`
324
324
  `),`${V(e)}}`].join(`
@@ -326,9 +326,9 @@ ${V(e)}}`:""}).filter(Boolean).join(`
326
326
  `)}function GI(t){return t.map(e=>{let n=e.match(/\.padding\(horizontal = (\d+)\.dp, vertical = \d+\.dp\)/);if(n)return`.padding(horizontal = ${n[1]}.dp)`;let r=e.match(/\.padding\((\d+)\.dp\)/);return r?`.padding(horizontal = ${r[1]}.dp)`:e})}function td(){return["@textMaxLines(1)","@textOverflow(TextOverflow.Ellipsis)","@textFillMaxWidth()"]}function JI(t,e){return e.cellTextBehavior?[...t,...td()]:t}function Zp(t,e){return[`${V(e)}Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.TopCenter) {`,t,`${V(e)}}`].join(`
327
327
  `)}function bb(t,e,n,r=""){let i=qr(e),o=la(e),s=Me("Modifier",o),a=i.length>0&&lb(o)?Me("Modifier",i):null,l=pa(n,e,t+1);return a&&(l=[`${V(t+1)}Box(modifier = ${a}) {`,l,`${V(t+1)}}`].join(`
328
328
  `)),[`${V(t)}Box(modifier = ${s}${r}) {`,l,`${V(t)}}`].join(`
329
- `)}function KI(t,e,n){let i=Xt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:e,instanceLiterals:{}}).display;return typeof i=="string"&&i.includes("inline")}function YI(t,e,n){if(e.cellTextBehavior)return!0;let r=ue(t,"variant");if(typeof r=="string")return KI("Text",r,e);if(so(t)){let i=t.variant;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="concat"){let s=i.parts[0];if(s==="badge-"||typeof s=="string"&&s.startsWith("badge-"))return!0}}return!1}function nd(t,e,n,r,i,o){let s=qr(n),a=gb(Me("Modifier",n)),l=st(n.filter(S=>!S.startsWith("@textStyle(")&&!S.startsWith("@runtimeStyle(")&&!S.includes(".padding(")&&!S.startsWith("@textMaxLines(")&&!S.startsWith("@textOverflow(")&&!S.startsWith("@textAlign(")&&S!=="@textFillMaxWidth()")),c=fb(n)?"Modifier.fillMaxWidth()":"Modifier",d=oo(n),p=null;a?p=d.length>0?`LocalTextStyle.current.merge(${a}.asTextStyle()).merge(TextStyle(${d.join(", ")}))`:`${a}.asTextStyle()`:d.length>0&&(p=`LocalTextStyle.current.merge(TextStyle(${d.join(", ")}))`);let f=p?`, style = ${p}`:"",m=pb(n),g=m!==null?`, maxLines = ${m}`:"",y=db(n),w=y?`, overflow = ${y}`:"",b=`${t} Text(text = ${e}${g}${w}${f})`;if(a){let N=`${(i?YI(i,r,o):r.cellTextBehavior===!0)?"Modifier":"Modifier.fillMaxWidth()"}.applyVcStyle(${a})`;if(s.length>0){let j=Me(c,[...l,...s]);return[`${t}Box(modifier = ${j}) {`,`${t} Box(modifier = ${N}) {`,b,`${t} }`,`${t}}`].join(`
330
- `)}return[`${t}Box(modifier = ${N}) {`,b,`${t}}`].join(`
331
- `)}let I=Me(c,[...l,...s]);return`${t}Text(text = ${e}, modifier = ${I}${g}${w}${f})`}function XI(t,e,n){let r=t.options;if(typeof r=="object"&&r!==null&&"kind"in r&&r.kind==="binding")return`${Fe(r,e,n)}.firstOrNull()?.label ?: ""`;if(typeof r=="object"&&r!==null&&"kind"in r&&r.kind==="literal"&&Array.isArray(r.value)){let i=r.value;return JSON.stringify(i[0]?.label??"")}return'""'}function QI(t,e,n,r){let i=t.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=Fe(i,e,n);return`${V(r+1)}for (option in ${o}) {
329
+ `)}function KI(t,e,n){let i=Xt({elementName:t,theme:n.theme,tokens:n.tokens,variantLiteral:e,instanceLiterals:{}}).display;return typeof i=="string"&&i.includes("inline")}function YI(t,e,n){if(e.cellTextBehavior)return!0;let r=ue(t,"variant");if(typeof r=="string")return KI("Text",r,e);if(so(t)){let i=t.variant;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="concat"){let s=i.parts[0];if(s==="badge-"||typeof s=="string"&&s.startsWith("badge-"))return!0}}return!1}function nd(t,e,n,r,i,o){let s=qr(n),a=gb(Me("Modifier",n)),l=st(n.filter(x=>!x.startsWith("@textStyle(")&&!x.startsWith("@runtimeStyle(")&&!x.includes(".padding(")&&!x.startsWith("@textMaxLines(")&&!x.startsWith("@textOverflow(")&&!x.startsWith("@textAlign(")&&x!=="@textFillMaxWidth()")),c=fb(n)?"Modifier.fillMaxWidth()":"Modifier",d=oo(n),p=null;a?p=d.length>0?`LocalTextStyle.current.merge(${a}.asTextStyle()).merge(TextStyle(${d.join(", ")}))`:`${a}.asTextStyle()`:d.length>0&&(p=`LocalTextStyle.current.merge(TextStyle(${d.join(", ")}))`);let f=p?`, style = ${p}`:"",m=pb(n),g=m!==null?`, maxLines = ${m}`:"",y=db(n),w=y?`, overflow = ${y}`:"",_=`${t} Text(text = ${e}${g}${w}${f})`;if(a){let N=`${(i?YI(i,r,o):r.cellTextBehavior===!0)?"Modifier":"Modifier.fillMaxWidth()"}.applyVcStyle(${a})`;if(s.length>0){let j=Me(c,[...l,...s]);return[`${t}Box(modifier = ${j}) {`,`${t} Box(modifier = ${N}) {`,_,`${t} }`,`${t}}`].join(`
330
+ `)}return[`${t}Box(modifier = ${N}) {`,_,`${t}}`].join(`
331
+ `)}let R=Me(c,[...l,...s]);return`${t}Text(text = ${e}, modifier = ${R}${g}${w}${f})`}function XI(t,e,n){let r=t.options;if(typeof r=="object"&&r!==null&&"kind"in r&&r.kind==="binding")return`${Fe(r,e,n)}.firstOrNull()?.label ?: ""`;if(typeof r=="object"&&r!==null&&"kind"in r&&r.kind==="literal"&&Array.isArray(r.value)){let i=r.value;return JSON.stringify(i[0]?.label??"")}return'""'}function QI(t,e,n,r){let i=t.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=Fe(i,e,n);return`${V(r+1)}for (option in ${o}) {
332
332
  ${V(r+2)}DropdownMenuItem(text = { Text(text = option.label) }, onClick = { expanded = false })
333
333
  ${V(r+1)}}`}return typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="literal"&&Array.isArray(i.value)?i.value.map(s=>`${V(r+1)}DropdownMenuItem(text = { Text(text = ${JSON.stringify(s.label)}) }, onClick = { expanded = false })`).join(`
334
334
  `):`${V(r+1)}DropdownMenuItem(text = { Text(text = "--") }, onClick = { expanded = false })`}function ed(t){let n=t.entries.find(o=>o.path==="ui.text-muted")?.value??"#6b7280",r=n.match(/^#([0-9a-fA-F]{6})$/);if(!r)return`Color(${JSON.stringify(n)})`;let i=r[1];return`Color(${parseInt(i.slice(0,2),16)}, ${parseInt(i.slice(2,4),16)}, ${parseInt(i.slice(4,6),16)})`}function _b(t){let n=t.entries.find(o=>o.path==="ui.text")?.value??"#111827",r=n.match(/^#([0-9a-fA-F]{6})$/);if(!r)return`Color(${JSON.stringify(n)})`;let i=r[1];return`Color(${parseInt(i.slice(0,2),16)}, ${parseInt(i.slice(2,4),16)}, ${parseInt(i.slice(4,6),16)})`}function Cb(t,e,n){for(let r of t){if(r.kind==="text")return JSON.stringify(r.value);if(r.kind==="binding")return Fe(r,e,n)}return null}function rd(t,e,n,r,i,o=r.listScope??"none"){return t.map(a=>a.kind==="map"?gn(a,e,n,r,o):a.kind==="text"?`${V(e)}Text(text = ${JSON.stringify(a.value)})`:a.kind==="binding"?`${V(e)}Text(text = ${Fe(a,r,i)})`:n(a,e,i)).filter(Boolean).join(`
@@ -340,23 +340,23 @@ ${V(e)}}`:i==="lazyColumn"?`${V(e)}lazyItems(${o}, key = { it.id }) { ${s} ->
340
340
  ${a}
341
341
  ${V(e)}}`:`${V(e)}for (${s} in ${o}) {
342
342
  ${a}
343
- ${V(e)}}`}function ZI(t,e,n,r){let i=Object.entries(t.props).map(([o,s])=>typeof s=="object"&&s!==null&&"kind"in s&&s.kind==="binding"?`${o} = ${Fe(s,r,n)}`:`${o} = ${JSON.stringify(s)}`);return`${V(e)}${t.name}(${i.join(", ")})`}function eT(t,e,n,r,i){let o=V(e),s=ue(t.props,"label"),l=Cb(t.children,r,n)??(typeof s=="string"?JSON.stringify(s):'"Button"'),c=wb(t.name,t.props,r,"background"),d=wb(t.name,t.props,r,"foreground");if(so(t.props)){let j=`VcTheme.resolve("Button", variant = ${xb(t.props,r,n)})`;c=`${j}.background ?: Color.Transparent`,d=`${j}.foreground ?: Color.Unspecified`}let p=st(ob(sb(la(i)))),f=r.cellTextBehavior?[...p.filter(N=>N!==".fillMaxWidth()"),".wrapContentWidth()"]:p,m=Me("Modifier",f),g=ab(i),y=cb(qr(i)),w=g!==null?`, shape = RoundedCornerShape(${g}.dp)`:"",b=y?`, contentPadding = ${y}`:"",I=oo(i),S=I.length>0?`, style = TextStyle(${I.join(", ")})`:"",R=r.cellTextBehavior?", maxLines = 1, overflow = TextOverflow.Ellipsis":"";return[`${o}VcButton(onClick = {}, modifier = ${m}, containerColor = ${c}, contentColor = ${d}${w}${b}) {`,`${o} Text(text = ${l}${S}${R})`,`${o}}`].join(`
343
+ ${V(e)}}`}function ZI(t,e,n,r){let i=Object.entries(t.props).map(([o,s])=>typeof s=="object"&&s!==null&&"kind"in s&&s.kind==="binding"?`${o} = ${Fe(s,r,n)}`:`${o} = ${JSON.stringify(s)}`);return`${V(e)}${t.name}(${i.join(", ")})`}function eT(t,e,n,r,i){let o=V(e),s=ue(t.props,"label"),l=Cb(t.children,r,n)??(typeof s=="string"?JSON.stringify(s):'"Button"'),c=wb(t.name,t.props,r,"background"),d=wb(t.name,t.props,r,"foreground");if(so(t.props)){let j=`VcTheme.resolve("Button", variant = ${xb(t.props,r,n)})`;c=`${j}.background ?: Color.Transparent`,d=`${j}.foreground ?: Color.Unspecified`}let p=st(ob(sb(la(i)))),f=r.cellTextBehavior?[...p.filter(N=>N!==".fillMaxWidth()"),".wrapContentWidth()"]:p,m=Me("Modifier",f),g=ab(i),y=cb(qr(i)),w=g!==null?`, shape = RoundedCornerShape(${g}.dp)`:"",_=y?`, contentPadding = ${y}`:"",R=oo(i),x=R.length>0?`, style = TextStyle(${R.join(", ")})`:"",I=r.cellTextBehavior?", maxLines = 1, overflow = TextOverflow.Ellipsis":"";return[`${o}VcButton(onClick = {}, modifier = ${m}, containerColor = ${c}, contentColor = ${d}${w}${_}) {`,`${o} Text(text = ${l}${x}${I})`,`${o}}`].join(`
344
344
  `)}function tT(t,e,n,r,i,o){let s=V(n),a=Me("Modifier",o);if(e.leaf==="text"){let l=Cb(t.children,i,r)??'""';return nd(s,l,o,i,t.props,r)}if(e.leaf==="button")return eT(t,n,r,i,o);if(e.leaf==="textfield"){let l=ue(t.props,"placeholder"),c=typeof l=="string"?JSON.stringify(l):'""',d=_b(i.tokens),p=ed(i.tokens),f=st(o),m=Me("Modifier",f),g=oo(o),y=g.length>0?`${s} textStyle = TextStyle(${g.join(", ")}),`:`${s} textStyle = TextStyle(color = ${d}, fontSize = 14.sp),`,w=vb(t.props,r);return[`${s}BasicTextField(`,`${s} value = ${w},`,`${s} onValueChange = {},`,`${s} modifier = ${m},`,y,`${s} decorationBox = { innerTextField ->`,`${s} Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.CenterStart) {`,`${s} if (${w}.isEmpty()) {`,`${s} Text(text = ${c}, style = TextStyle(color = ${p}, fontSize = 14.sp))`,`${s} }`,`${s} innerTextField()`,`${s} }`,`${s} },`,`${s})`].join(`
345
- `)}if(e.leaf==="texteditor"){let l=ue(t.props,"placeholder"),c=typeof l=="string"?JSON.stringify(l):'""',d=ed(i.tokens),f=o.find(S=>S.includes("heightIn(min ="))?.match(/heightIn\(min = (\d+)\.dp\)/)?.[1]??"72",m=o.filter(S=>S.startsWith("@textStyle(")),g=st(o.filter(S=>!S.startsWith("@textStyle(")&&!S.includes("heightIn(min ="))),y=Me("Modifier",st(g)),w=oo(m),b=w.length>0?`, textStyle = TextStyle(${w.join(", ")})`:"",I=vb(t.props,r);return[`${s}Box(modifier = ${y}.heightIn(min = ${f}.dp)) {`,`${s} BasicTextField(`,`${s} value = ${I},`,`${s} onValueChange = {},`,`${s} modifier = Modifier.fillMaxWidth()${b},`,`${s} decorationBox = { innerTextField ->`,`${s} Box(modifier = Modifier.fillMaxWidth()) {`,`${s} if (${I}.isEmpty()) {`,`${s} Text(text = ${c}, modifier = Modifier.align(Alignment.TopStart).padding(top = 8.dp, start = 4.dp), style = TextStyle(color = ${d}, fontSize = 14.sp))`,`${s} }`,`${s} innerTextField()`,`${s} }`,`${s} },`,`${s} )`,`${s}}`].join(`
345
+ `)}if(e.leaf==="texteditor"){let l=ue(t.props,"placeholder"),c=typeof l=="string"?JSON.stringify(l):'""',d=ed(i.tokens),f=o.find(x=>x.includes("heightIn(min ="))?.match(/heightIn\(min = (\d+)\.dp\)/)?.[1]??"72",m=o.filter(x=>x.startsWith("@textStyle(")),g=st(o.filter(x=>!x.startsWith("@textStyle(")&&!x.includes("heightIn(min ="))),y=Me("Modifier",st(g)),w=oo(m),_=w.length>0?`, textStyle = TextStyle(${w.join(", ")})`:"",R=vb(t.props,r);return[`${s}Box(modifier = ${y}.heightIn(min = ${f}.dp)) {`,`${s} BasicTextField(`,`${s} value = ${R},`,`${s} onValueChange = {},`,`${s} modifier = Modifier.fillMaxWidth()${_},`,`${s} decorationBox = { innerTextField ->`,`${s} Box(modifier = Modifier.fillMaxWidth()) {`,`${s} if (${R}.isEmpty()) {`,`${s} Text(text = ${c}, modifier = Modifier.align(Alignment.TopStart).padding(top = 8.dp, start = 4.dp), style = TextStyle(color = ${d}, fontSize = 14.sp))`,`${s} }`,`${s} innerTextField()`,`${s} }`,`${s} },`,`${s} )`,`${s}}`].join(`
346
346
  `)}if(e.leaf==="picker"){let l=ue(t.props,"width"),c=typeof l=="number"?l:null,d=c!==null?`.width(${c}.dp)`:"",p=ca(st(o)),f=Me(`Modifier${d}`,p),m=XI(t.props,i,r),g=_b(i.tokens),y=ed(i.tokens),w=QI(t.props,i,r,n);return[`${s}Box(modifier = ${f}.heightIn(min = 42.dp)) {`,`${s} var expanded by remember { mutableStateOf(false) }`,`${s} TextButton(onClick = { expanded = true }, modifier = Modifier.fillMaxWidth(), contentPadding = PaddingValues(horizontal = 12.dp, vertical = 9.dp)) {`,`${s} Text(text = ${m}, style = TextStyle(color = ${g}), maxLines = 1, modifier = Modifier.weight(1f))`,`${s} Icon(Icons.Default.ArrowDropDown, contentDescription = null, tint = ${y})`,`${s} }`,`${s} DropdownMenu(expanded = expanded, onDismissRequest = { expanded = false }) {`,w,`${s} }`,`${s}}`].join(`
347
347
  `)}if(e.leaf==="spacer")return`${s}Spacer(modifier = ${a})`;if(e.leaf==="divider"){let c=ue(t.props,"axis")==="vertical"?"VerticalDivider":"HorizontalDivider";return`${s}${c}(modifier = ${a})`}if(e.leaf==="image"){let l=ue(t.props,"src")??ue(t.props,"name"),c=typeof l=="string"?JSON.stringify(l):'"image"';return`${s}Icon(imageVector = Icons.Default.Image, contentDescription = ${c}, modifier = ${a})`}if(e.leaf==="progressview")return`${s}CircularProgressIndicator(modifier = ${a})`;if(e.leaf==="toggle"){let l=ue(t.props,"label"),c=typeof l=="string"?JSON.stringify(l):'""';return[`${s}Row(modifier = ${a}, verticalAlignment = Alignment.CenterVertically) {`,`${s} Switch(checked = false, onCheckedChange = {})`,`${s} Text(text = ${c})`,`${s}}`].join(`
348
348
  `)}return`${s}Text(text = "/* unsupported leaf: ${t.name} */")`}function nT(t,e,n,r,i,o,s){let a=rd(t.children,n+1,i,o,r),l=Me("Modifier",s);if(e.container==="vstack"){let d=e.spacingProp?ue(t.props,e.spacingProp):void 0,p=typeof d=="number"?`${d}.dp`:"0.dp",f=[`${V(n)}Column(modifier = ${l}, verticalArrangement = Arrangement.spacedBy(${p})) {`,pa(a,s,n+1),`${V(n)}}`].join(`
349
- `);return ua(s)?Zp(f,n):f}if(e.container==="hstack"){let d=e.spacingProp?ue(t.props,e.spacingProp):void 0,p=typeof d=="number"?`${d}.dp`:"0.dp",f=ue(t.props,"justify"),m=ue(t.props,"wrap"),g=rb(f,p),y=ue(t.props,"align"),w=ue(t.props,"alignItems"),b=ue(t.props,"height"),I=w==="center"||y==="center"||typeof b=="number"?"Alignment.CenterVertically":w==="end"?"Alignment.Bottom":"Alignment.Top",S=t.name==="TableHeader"||t.name==="TableRow",R=ue(t.props,"flex"),N=S||f!==void 0||typeof R=="number",j=[];N&&j.push(".fillMaxWidth()"),typeof b=="number"&&j.push(S&&t.name==="TableHeader"?`.heightIn(min = ${b}.dp)`:`.height(${b}.dp)`);let G=S&&typeof b=="number"?ca(s):s,ie=Me("Modifier",st([...G,...j])),ge=o.inTableHeader;t.name==="TableHeader"&&(o.inTableHeader=!0);let xe=pa(rd(t.children,n+1,i,o,r),s,n+1);return t.name==="TableHeader"&&(o.inTableHeader=ge),m===!0&&f!=="between"&&f!=="spaceBetween"?[`${V(n)}FlowRow(modifier = ${ie}, horizontalArrangement = Arrangement.spacedBy(${p}), verticalArrangement = Arrangement.spacedBy(${p})) {`,xe,`${V(n)}}`].join(`
350
- `):[`${V(n)}Row(modifier = ${ie}, horizontalArrangement = ${g}, verticalAlignment = ${I}) {`,xe,`${V(n)}}`].join(`
351
- `)}if(e.container==="group"||e.container==="navstack"){let d=so(t.props)?void 0:Fr(t.name,t.props,o),p=d?.display==="grid"?id(d.gridTemplateColumns):null;if(p?.kind==="equal-columns")return Sb(t,n,r,i,o,s,p.count);if(p?.kind==="adaptive"){let w=ue(t.props,"gap"),b=typeof w=="number"?`${w}.dp`:"16.dp";return[`${V(n)}LazyVerticalGrid(columns = GridCells.Adaptive(minSize = ${p.minWidth}.dp), modifier = ${l}.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(${b}), verticalArrangement = Arrangement.spacedBy(${b})) {`,UI(t.children,n+1,i,o,r),`${V(n)}}`].join(`
349
+ `);return ua(s)?Zp(f,n):f}if(e.container==="hstack"){let d=e.spacingProp?ue(t.props,e.spacingProp):void 0,p=typeof d=="number"?`${d}.dp`:"0.dp",f=ue(t.props,"justify"),m=ue(t.props,"wrap"),g=rb(f,p),y=ue(t.props,"align"),w=ue(t.props,"alignItems"),_=ue(t.props,"height"),R=w==="center"||y==="center"||typeof _=="number"?"Alignment.CenterVertically":w==="end"?"Alignment.Bottom":"Alignment.Top",x=t.name==="TableHeader"||t.name==="TableRow",I=ue(t.props,"flex"),N=x||f!==void 0||typeof I=="number",j=[];N&&j.push(".fillMaxWidth()"),typeof _=="number"&&j.push(x&&t.name==="TableHeader"?`.heightIn(min = ${_}.dp)`:`.height(${_}.dp)`);let G=x&&typeof _=="number"?ca(s):s,ie=Me("Modifier",st([...G,...j])),ge=o.inTableHeader;t.name==="TableHeader"&&(o.inTableHeader=!0);let xe=pa(rd(t.children,n+1,i,o,r),s,n+1);return t.name==="TableHeader"&&(o.inTableHeader=ge),m===!0&&f!=="between"&&f!=="spaceBetween"?[`${V(n)}FlowRow(modifier = ${ie}, horizontalArrangement = Arrangement.spacedBy(${p}), verticalArrangement = Arrangement.spacedBy(${p})) {`,xe,`${V(n)}}`].join(`
350
+ `):[`${V(n)}Row(modifier = ${ie}, horizontalArrangement = ${g}, verticalAlignment = ${R}) {`,xe,`${V(n)}}`].join(`
351
+ `)}if(e.container==="group"||e.container==="navstack"){let d=so(t.props)?void 0:Fr(t.name,t.props,o),p=d?.display==="grid"?id(d.gridTemplateColumns):null;if(p?.kind==="equal-columns")return Sb(t,n,r,i,o,s,p.count);if(p?.kind==="adaptive"){let w=ue(t.props,"gap"),_=typeof w=="number"?`${w}.dp`:"16.dp";return[`${V(n)}LazyVerticalGrid(columns = GridCells.Adaptive(minSize = ${p.minWidth}.dp), modifier = ${l}.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(${_}), verticalArrangement = Arrangement.spacedBy(${_})) {`,UI(t.children,n+1,i,o,r),`${V(n)}}`].join(`
352
352
  `)}let f=ue(t.props,"contentAlign"),m=ub(s)?", contentAlignment = Alignment.TopStart":"",g=typeof f=="string"?`, contentAlignment = ${ib(f)}`:m,y=bb(n,s,a,g);return ua(s)?Zp(y,n):y}if(e.container==="scrollview"){let d=o.inVerticalScroll;o.inVerticalScroll=!0;let p=[`${V(n)}Column(modifier = ${l}.verticalScroll(rememberScrollState())) {`,a,`${V(n)}}`].join(`
353
353
  `);return o.inVerticalScroll=d,p}if(e.container==="field"){let d=ue(t.props,"label"),p=ue(t.props,"gap"),f=typeof p=="number"?`${p}.dp`:"4.dp",m=typeof d=="string"?`${V(n+1)}Text(text = ${JSON.stringify(d)}, modifier = Modifier.applyVcStyle(VcTheme.resolve("Text", variant = "field-label")), style = VcTheme.resolve("Text", variant = "field-label").asTextStyle())
354
354
  `:"";return[`${V(n)}Column(modifier = ${l}, verticalArrangement = Arrangement.spacedBy(${f})) {`,`${m}${a}`,`${V(n)}}`].join(`
355
- `)}if(e.container==="tablestack"){let d=ue(t.props,"separator"),p=ue(t.props,"separatorColor"),f=typeof d=="number"&&d>0||d===void 0,g=Fr(t.name,t.props,o).separatorColor??p,y="Color.Gray.copy(alpha = 0.2f)";if(f&&typeof g=="string"){let S=g.match(/^#([0-9a-fA-F]{6})$/);S&&(y=`Color(${parseInt(S[1].slice(0,2),16)}, ${parseInt(S[1].slice(2,4),16)}, ${parseInt(S[1].slice(4,6),16)})`)}let w=`${V(n+1)}HorizontalDivider(modifier = Modifier, color = ${y})`,b=t.children.map(S=>{if(S.kind==="map"&&f){let R=S,N=Fe(R.source,o),j=R.item,G=i(R.body,n+3,j);return[`${V(n+1)}for (${j} in ${N}) {`,`${V(n+2)}${w.trim()}`,G,`${V(n+1)}}`].join(`
356
- `)}return S.kind==="map"?gn(S,n+1,i,o,"none"):i(S,n+1,r)}).filter(Boolean),I;return I=b,[`${V(n)}Column(modifier = ${l}) {`,I.join(`
355
+ `)}if(e.container==="tablestack"){let d=ue(t.props,"separator"),p=ue(t.props,"separatorColor"),f=typeof d=="number"&&d>0||d===void 0,g=Fr(t.name,t.props,o).separatorColor??p,y="Color.Gray.copy(alpha = 0.2f)";if(f&&typeof g=="string"){let x=g.match(/^#([0-9a-fA-F]{6})$/);x&&(y=`Color(${parseInt(x[1].slice(0,2),16)}, ${parseInt(x[1].slice(2,4),16)}, ${parseInt(x[1].slice(4,6),16)})`)}let w=`${V(n+1)}HorizontalDivider(modifier = Modifier, color = ${y})`,_=t.children.map(x=>{if(x.kind==="map"&&f){let I=x,N=Fe(I.source,o),j=I.item,G=i(I.body,n+3,j);return[`${V(n+1)}for (${j} in ${N}) {`,`${V(n+2)}${w.trim()}`,G,`${V(n+1)}}`].join(`
356
+ `)}return x.kind==="map"?gn(x,n+1,i,o,"none"):i(x,n+1,r)}).filter(Boolean),R;return R=_,[`${V(n)}Column(modifier = ${l}) {`,R.join(`
357
357
  `),`${V(n)}}`].join(`
358
- `)}if(e.container==="cellgroup"){let d=ue(t.props,"width"),p=ue(t.props,"flex"),f=ue(t.props,"align"),m=HI(f),g=WI(f),y=typeof p=="number",w=ca(s),b=o.inTableHeader?GI(qr(w)):qr(w),I=w.filter(G=>G.startsWith("@contentColor(")||G.startsWith("@inheritTextStyle(")),S=[];typeof d=="number"?S.push(`.width(${d}.dp)`):y&&S.push(".weight(1f).fillMaxWidth()");let R=Me("Modifier",st([...S,...la(w)])),N=o.cellTextBehavior;o.cellTextBehavior=!0;let j=t.children.map(G=>G.kind==="map"?gn(G,n+1,i,o,"none"):G.kind==="text"?nd(V(n+1),JSON.stringify(G.value),st([...td(),`@textAlign(${m})`,...b,...I.map(ie=>ie)]),o,void 0,r):G.kind==="binding"?nd(V(n+1),Fe(G,o,r),st([...td(),`@textAlign(${m})`,...b,...I.map(ie=>ie)]),o,void 0,r):i(G,n+1,r)).filter(Boolean).join(`
359
- `);return o.cellTextBehavior=N,[`${V(n)}Box(modifier = ${R}, contentAlignment = ${g}) {`,pa(j,I,n+1),`${V(n)}}`].join(`
358
+ `)}if(e.container==="cellgroup"){let d=ue(t.props,"width"),p=ue(t.props,"flex"),f=ue(t.props,"align"),m=HI(f),g=WI(f),y=typeof p=="number",w=ca(s),_=o.inTableHeader?GI(qr(w)):qr(w),R=w.filter(G=>G.startsWith("@contentColor(")||G.startsWith("@inheritTextStyle(")),x=[];typeof d=="number"?x.push(`.width(${d}.dp)`):y&&x.push(".weight(1f).fillMaxWidth()");let I=Me("Modifier",st([...x,...la(w)])),N=o.cellTextBehavior;o.cellTextBehavior=!0;let j=t.children.map(G=>G.kind==="map"?gn(G,n+1,i,o,"none"):G.kind==="text"?nd(V(n+1),JSON.stringify(G.value),st([...td(),`@textAlign(${m})`,..._,...R.map(ie=>ie)]),o,void 0,r):G.kind==="binding"?nd(V(n+1),Fe(G,o,r),st([...td(),`@textAlign(${m})`,..._,...R.map(ie=>ie)]),o,void 0,r):i(G,n+1,r)).filter(Boolean).join(`
359
+ `);return o.cellTextBehavior=N,[`${V(n)}Box(modifier = ${I}, contentAlignment = ${g}) {`,pa(j,R,n+1),`${V(n)}}`].join(`
360
360
  `)}let c=bb(n,s,a);return ua(s)?Zp(c,n):c}function rT(t,e,n,r,i,o){let s=JI(FI(t.name,t.props,o,r),o);if(e.leaf)return tT(t,e,n,r,o,s);if(e.container==="group"&&!so(t.props)){let a=Fr(t.name,t.props,o),l=a.gridTemplateColumns,c=a.flexDirection;if(a.display==="grid"&&l){let d=id(l);if(d?.kind==="equal-columns")return Sb(t,n,r,i,o,s,d.count);if(d?.kind==="fixed-columns")return zI(t,n,r,i,o,s)}if(a.display==="flex"&&c==="row"){let d=ue(t.props,"gap"),p=typeof d=="number"?`${d}.dp`:typeof a.gap=="number"?`${a.gap}.dp`:"0.dp",f=Me("Modifier",s),m=rd(t.children,n+2,i,o,r);return[`${V(n)}Row(modifier = ${f}, horizontalArrangement = Arrangement.spacedBy(${p}), verticalAlignment = Alignment.Top) {`,m,`${V(n)}}`].join(`
361
361
  `)}}if(e.container)return nT(t,e,n,r,i,o,s);throw new Error(`Unsupported Compose element config for ${t.name}`)}function iT(t){let e=(n,r,i)=>{if(n.kind==="viewRef")return ZI(n,r,i,t);if(n.kind!=="component")return"";if(!t.map.elements[n.name])throw new Error(`Element "${n.name}" is not in Compose element map`);return rT(n,t.map.elements[n.name],r,i,e,t)};return e}function kb(t,e,n=2){let r=iT(e);if(t.kind!=="component")throw new Error("Compose lowering root must be a component node");return r(t,n)}var Eb=Y(()=>{"use strict";wt();Up();yb()});var Rb={};vn(Rb,{renderComposeComponent:()=>da});function Pb(t){let e=t.match(/^(\w+)\[\]$/);return e?`List<${Pb(e[1])}>`:t==="string"?"String":t==="number"?"Double":t==="boolean"?"Boolean":t}function oT(t){if(!t.propsType)return"";let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?e[1].trim().split(",").map(r=>{let i=r.indexOf(":"),o=i>=0?r.slice(0,i).trim():r.trim(),s=i>=0?r.slice(i+1).trim():"Any",a=Pb(s);return`${o}: ${a}`}).join(", "):`props: ${t.propsType}`}function sT(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 da(t,e){let n=await tb(e.elementMapPath),r=e.allowlistExtra??[],i=t.isPartial?t.exportName:`${t.exportName.replace(/View$/,"")||t.exportName}Screen`,o={map:n,theme:e.theme,tokens:e.tokens,allowlistExtra:r,propsRoot:sT(t)},s=kb(t.root,o,2),a=t.isPartial?oT(t):t.viewModel?`vm: ${t.viewModel}`:"";return`/**
362
362
  * Auto-generated Compose view from ${t.source}
@@ -424,7 +424,7 @@ cli_contracts: 0.1.0
424
424
 
425
425
  info:
426
426
  title: view-contracts CLI
427
- version: 0.5.5
427
+ version: 0.5.7
428
428
  description: >-
429
429
  Contract-first UI design toolchain. Compiles restricted view-contract TSX
430
430
  to language-neutral View IR and renders platform targets (React, SwiftUI, Compose).
@@ -627,7 +627,7 @@ command_sets:
627
627
  "cli_contracts": "0.1.0",
628
628
  "info": {
629
629
  "title": "view-contracts CLI",
630
- "version": "0.5.5",
630
+ "version": "0.5.7",
631
631
  "description": "Contract-first UI design toolchain. Compiles restricted view-contract TSX to language-neutral View IR and renders platform targets (React, SwiftUI, Compose)."
632
632
  },
633
633
  "artifact_slots": {
@@ -916,11 +916,11 @@ command_sets:
916
916
  }
917
917
  }
918
918
  }
919
- }`;function Id(t,e){let n=new Ed;n.name("view-contracts").version(e,"-V, --version").description("View contract compiler and renderer toolchain."),n.command("compile").description("Compile .view.tsx files to View IR.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.compile(o,s.optsWithGlobals())});let r=n.command("render");r.command("react").description("Generate React components from View IR.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.renderReact(o,s.optsWithGlobals())}),r.command("bridge").description("Generate view \u2194 ViewModel bridge registry.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.renderBridge(o,s.optsWithGlobals())}),n.command("build").description("Full view pipeline (compile + render runtime + render react + bridge).").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.build(o,s.optsWithGlobals())});let i=n.command("contracts");return i.command("generate").description("Generate ViewModel types from OpenAPI via micro-contracts.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.contractsGenerate(o,s.optsWithGlobals())}),i.command("check").description("Lint OpenAPI screen contracts via micro-contracts.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.contractsCheck(o,s.optsWithGlobals())}),n.command("preview").description("Start DSL preview HTTP server.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").option("-p, --port <number>","HTTP listen port.").option("--host <address>","HTTP listen host.").option("--screen <name>","Screen name from view-bindings.yaml (default first react target).").action(async(o,s)=>{await t.preview(o,s.optsWithGlobals())}),n.command("extract").description("Extract contract specification for this CLI tool.").argument("[commands...]","Command IDs to extract. Use dot notation.").option("-a, --all","Extract all commands.",!1).option("--include-meta","Include extraction metadata.",!0).option("-F, --format <format>","Output format (yaml or json).","yaml").action(async(o,s,a)=>{o.length===0&&!s.all&&(process.stderr.write(JSON.stringify({code:"INVALID_ARGS",message:"Specify command IDs or use --all"})+`
920
- `),process.exit(2));let l=s.format||"yaml",c=JSON.parse(Rd),d=s.all?[]:o;if(d.length===0)if(l==="json"){let p={};s.includeMeta&&(p._meta={source:"embedded",type:"cli-contracts/extract",extractedAt:new Date().toISOString(),specVersion:c.cli_contracts??"0.1.0",commands:["view-contracts.compile","view-contracts.render.react","view-contracts.render.bridge","view-contracts.build","view-contracts.contracts.generate","view-contracts.contracts.check","view-contracts.preview"]}),Object.assign(p,c),process.stdout.write(JSON.stringify(p,null,2)+`
921
- `)}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: "+(c.cli_contracts??"0.1.0")),p.push("commands:");for(let f 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(" - "+f)}p.push("---"),p.push(Pd),process.stdout.write(p.join(`
919
+ }`;function Id(t,e){let n=new Ed;n.name("view-contracts").version(e,"-V, --version").description("View contract compiler and renderer toolchain."),n.command("compile").description("Compile .view.tsx files to View IR.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.compile(o,s.optsWithGlobals())});let r=n.command("render");r.command("react").description("Generate React components from View IR.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.renderReact(o,s.optsWithGlobals())}),r.command("bridge").description("Generate view \u2194 ViewModel bridge registry.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.renderBridge(o,s.optsWithGlobals())}),n.command("build").description("Full view pipeline (compile + render runtime + render react + bridge).").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.build(o,s.optsWithGlobals())});let i=n.command("contracts");return i.command("generate").description("Generate ViewModel types from OpenAPI via micro-contracts.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.contractsGenerate(o,s.optsWithGlobals())}),i.command("check").description("Lint OpenAPI screen contracts via micro-contracts.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").action(async(o,s)=>{await t.contractsCheck(o,s.optsWithGlobals())}),n.command("preview").description("Start DSL preview HTTP server.").option("-c, --config <path>","Path to view-contracts.config.yaml (discovered upward from cwd when omitted).").option("-p, --port <number>","HTTP listen port.").option("--host <address>","HTTP listen host.").option("--screen <name>","Screen name from view-bindings.yaml (default first react target).").action(async(o,s)=>{await t.preview(o,s.optsWithGlobals())}),n.command("extract").description("Extract contract specification for this CLI tool.").argument("[commands...]","Command IDs to extract. Use dot notation.").option("-a, --all","Extract all commands.",!1).option("--include-meta","Include extraction metadata.",!0).option("-F, --format <format>","Output format (yaml or json).","yaml").action(async(o,s)=>{o.length===0&&!s.all&&(process.stderr.write(JSON.stringify({code:"INVALID_ARGS",message:"Specify command IDs or use --all"})+`
920
+ `),process.exit(2));let a=s.format||"yaml",l=JSON.parse(Rd),c=s.all?[]:o;if(c.length===0)if(a==="json"){let d={};s.includeMeta&&(d._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(d,l),process.stdout.write(JSON.stringify(d,null,2)+`
921
+ `)}else{let d=[];if(d.push("# view-contracts extract"),d.push("# source: embedded"),d.push("# type: cli-contracts/command-extract"),s.includeMeta){d.push("---"),d.push("source: embedded"),d.push("type: cli-contracts/command-extract"),d.push("extractedAt: "+new Date().toISOString()),d.push("spec_version: "+(l.cli_contracts??"0.1.0")),d.push("commands:");for(let p of["view-contracts.compile","view-contracts.render.react","view-contracts.render.bridge","view-contracts.build","view-contracts.contracts.generate","view-contracts.contracts.check","view-contracts.preview"])d.push(" - "+p)}d.push("---"),d.push(Pd),process.stdout.write(d.join(`
922
922
  `)+`
923
- `)}else{let p={cli_contracts:c.cli_contracts,info:c.info,command_sets:{}},f=p.command_sets;for(let[m,g]of Object.entries(c.command_sets??{})){let y=g.commands;if(!y)continue;let w={};for(let[b,I]of Object.entries(y)){let S=m+"."+b;d.some(R=>R===b||R===S||b.startsWith(R+"."))&&(w[b]=I)}if(Object.keys(w).length>0){let b={...g};b.commands=w,f[m]=b}}c.components&&(p.components=c.components),process.stdout.write(JSON.stringify(p,null,2)+`
923
+ `)}else{let d={cli_contracts:l.cli_contracts,info:l.info,command_sets:{}},p=d.command_sets;for(let[f,m]of Object.entries(l.command_sets??{})){let g=m.commands;if(!g)continue;let y={};for(let[w,_]of Object.entries(g)){let R=f+"."+w;c.some(x=>x===w||x===R||w.startsWith(x+"."))&&(y[w]=_)}if(Object.keys(y).length>0){let w={...m};w.commands=y,p[f]=w}}l.components&&(d.components=l.components),process.stdout.write(JSON.stringify(d,null,2)+`
924
924
  `)}process.exit(0)}),n}import{writeFile as UT,mkdir as zT}from"node:fs/promises";import{resolve as Mt,dirname as n_,relative as GT}from"node:path";import{spawn as JT}from"node:child_process";import{readFile as Wd}from"node:fs/promises";import{basename as q_,relative as Ud,resolve as zd}from"node:path";wt();import{dirname as Md,resolve as Vd}from"node:path";import L from"typescript";import{readFileSync as C_}from"node:fs";import{resolve as k_}from"node:path";import pe from"typescript";function Ha(t,e){let n=new Map;for(let r of t.statements){if(!pe.isImportDeclaration(r)||!r.importClause?.namedBindings||!pe.isStringLiteral(r.moduleSpecifier)||!pe.isNamedImports(r.importClause.namedBindings))continue;let i=r.moduleSpecifier.text;i.endsWith(".tsx")||(i=`${i}.tsx`);let o=k_(e,i);for(let s of r.importClause.namedBindings.elements)n.set(s.name.text,o)}return n}function E_(t){if(pe.isObjectBindingPattern(t.name)){let e=[];for(let n of t.name.elements)pe.isBindingElement(n)&&pe.isIdentifier(n.name)&&e.push(n.name.text);return e}return pe.isIdentifier(t.name)?[t.name.text]:[]}function P_(t){if(!pe.isObjectBindingPattern(t.name)||t.name.elements.length===0)return null;let e=t.name.elements[0];return!pe.isBindingElement(e)||!pe.isIdentifier(e.name)?null:e.name.text}function R_(t){if(pe.isParenthesizedExpression(t))return t.expression;if(pe.isJsxElement(t)||pe.isJsxSelfClosingElement(t)||pe.isJsxFragment(t))return t;if(pe.isBlock(t))for(let e=t.statements.length-1;e>=0;e--){let n=t.statements[e];if(pe.isReturnStatement(n)&&n.expression)return pe.isParenthesizedExpression(n.expression)?n.expression.expression:n.expression}return null}function Od(t){if(!pe.isIdentifier(t.expression)||t.expression.text!=="view"||t.arguments.length!==1)return null;let e=t.arguments[0];if(!pe.isArrowFunction(e)&&!pe.isFunctionExpression(e))return null;let n="__noop",r=[];if(e.parameters.length===1){let s=P_(e.parameters[0]);if(r=E_(e.parameters[0]),s)n=s;else if(pe.isIdentifier(e.parameters[0].name))n=e.parameters[0].name.text,r=[n];else return null}else if(e.parameters.length>1)return null;let i=R_(e.body);if(!i)return null;let o;return t.typeArguments&&t.typeArguments.length===1&&(o=t.typeArguments[0].getText()),{paramName:n,jsxRoot:i,propNames:r,propsType:o}}function Wa(t,e){let n=null;function r(i){if(pe.isVariableStatement(i))for(let o of i.declarationList.declarations){if(!pe.isIdentifier(o.name)||o.name.text!==e||!o.initializer||!pe.isCallExpression(o.initializer))continue;let s=Od(o.initializer);s&&(n=s)}if(pe.isExportAssignment(i)&&i.isExportEquals===!1&&i.expression&&pe.isCallExpression(i.expression)){let o=Od(i.expression);o&&e==="default"&&(n=o)}pe.forEachChild(i,r)}return r(t),n}function Nd(t,e){let n=C_(t,"utf-8"),r=pe.createSourceFile(t,n,pe.ScriptTarget.Latest,!0,pe.ScriptKind.TSX);return Wa(r,e)}function I_(t,e,n){if("tone"in e){let r=e.tone;delete e.tone,"variant"in e||(e.variant=r),n.warnings.push(`"tone" on <${t}> is deprecated; use variant instead (mapped automatically)`)}if("textStyle"in e){let r=e.textStyle;delete e.textStyle,"variant"in e||(e.variant=r),n.warnings.push(`"textStyle" on <${t}> is deprecated; use variant instead (mapped automatically)`)}}function Ua(t){return t.join(".")}function Qn(t){let e=t.getText().replace(/\s+/g," ").trim();return e.length>100?`${e.slice(0,97)}...`:e}function Ga(t){if(L.isIdentifier(t))return[t.text];if(L.isPropertyAccessExpression(t)){let e=Ga(t.expression);return e?[...e,t.name.text]:null}return null}function Ld(t,e){if(e.length===0)return t;let n=e.join(".");return{kind:"binding",path:t.path?`${t.path}.${n}`:n,scope:t.scope}}function Xr(t,e){let n=Ga(t);if(!n)return null;if(n[0]in e.propBindings)return Ld(e.propBindings[n[0]],n.slice(1));if(n[0]===e.vmName)return{kind:"binding",path:Ua(n.slice(1))};let r=e.scopes[e.scopes.length-1];return r&&n[0]===r?{kind:"binding",path:Ua(n.slice(1)),scope:r}:null}function T_(t,e){let n,r={};for(let i of t.properties){if(!L.isPropertyAssignment(i)||!L.isIdentifier(i.name))continue;let o=i.name.text;if(o==="name"&&L.isStringLiteral(i.initializer)){n=i.initializer.text;continue}if(o==="params"&&L.isObjectLiteralExpression(i.initializer))for(let s of i.initializer.properties){if(!L.isPropertyAssignment(s)||!L.isIdentifier(s.name))continue;let a=Co(s.initializer,e);a!==null?r[s.name.text]=a:e.errors.push(`Unsupported action param expression for "${s.name.text}": ${Qn(s.initializer)}`)}}return n?Object.keys(r).length>0?{kind:"action",name:n,params:r}:{kind:"action",name:n}:null}function Co(t,e){if(L.isStringLiteral(t)||L.isNoSubstitutionTemplateLiteral(t))return t.text;if(t.kind===L.SyntaxKind.TrueKeyword)return!0;if(t.kind===L.SyntaxKind.FalseKeyword)return!1;if(L.isNumericLiteral(t))return Number(t.text);if(t.kind===L.SyntaxKind.NullKeyword)return null;if(L.isTemplateExpression(t)){let r=[];t.head.text&&r.push(t.head.text);for(let i of t.templateSpans){let o=Xr(i.expression,e);if(!o)return null;r.push(o),i.literal.text&&r.push(i.literal.text)}return{kind:"concat",parts:r}}let n=Xr(t,e);if(n)return n;if(L.isObjectLiteralExpression(t)){let r=T_(t,e);if(r)return r;let i={};for(let o of t.properties){if(!L.isPropertyAssignment(o)||!L.isIdentifier(o.name))continue;let s=Co(o.initializer,e);s!==null?i[o.name.text]=s:e.errors.push(`Unsupported object literal property "${o.name.text}": ${Qn(o.initializer)}`)}return{kind:"literal",value:i}}if(L.isArrayLiteralExpression(t)){let r=[];for(let i of t.elements){if(!L.isExpression(i))continue;let o=Co(i,e);o!==null?r.push(o):e.errors.push(`Unsupported array element expression: ${Qn(i)}`)}return r}return null}function A_(t){return L.isIdentifier(t)?t.text:L.isPropertyAccessExpression(t)&&L.isIdentifier(t.name)?t.name.text:null}function jd(t){return t.getText()}function za(t,e){let n=[];for(let r of t){if(L.isJsxText(r)){let i=r.getText().trim();i&&n.push({kind:"text",value:i});continue}if(L.isJsxExpression(r)&&r.expression){let i=Xr(r.expression,e);if(i){n.push(i);continue}let o=Dd(r.expression,e);o?Array.isArray(o)?n.push(...o):n.push(o):e.errors.push(`Unsupported JSX child expression: ${Qn(r.expression)}`);continue}if(L.isJsxElement(r)||L.isJsxSelfClosingElement(r)){let i=Qr(r,e);i&&n.push(i)}}return n}function O_(t,e){if(t.length===0)return null;let n=t[0];return n in e.propBindings?Ld(e.propBindings[n],t.slice(1)):n===e.vmName?{kind:"binding",path:Ua(t.slice(1))}:null}function Dd(t,e){if(L.isParenthesizedExpression(t))return Dd(t.expression,e);if(L.isCallExpression(t)&&L.isPropertyAccessExpression(t.expression)){let r=Ga(t.expression.expression),i=t.expression.name.text;if(r&&i==="map"&&t.arguments.length>=1){let o=O_(r,e);if(!o)return null;let s=t.arguments[0];if(!L.isArrowFunction(s)&&!L.isFunctionExpression(s))return e.errors.push("map callback must be an arrow function"),null;let a=s.parameters;if(a.length!==1||!L.isIdentifier(a[0].name))return e.errors.push("map callback must have a single item parameter"),null;let l=a[0].name.text,c={...e,scopes:[...e.scopes,l]},d=null,p=L.isParenthesizedExpression(s.body)?s.body.expression:s.body;if(L.isBlock(s.body))return e.errors.push("map callback body must be a JSX expression, not a block"),null;if(L.isJsxElement(p)||L.isJsxSelfClosingElement(p)?d=Qr(p,c):L.isJsxFragment(p)&&(d=Ja(p,c)),!d)return null;let f;if(L.isJsxElement(p)||L.isJsxSelfClosingElement(p)){let m=L.isJsxElement(p)?p.openingElement.attributes:p.attributes;for(let g of m.properties)if(!(!L.isJsxAttribute(g)||jd(g.name)!=="key"||!g.initializer)&&L.isJsxExpression(g.initializer)&&g.initializer.expression){let y=Xr(g.initializer.expression,c);y&&(f=y)}}return{kind:"map",source:o,item:l,key:f,body:d}}}if(L.isJsxElement(t)||L.isJsxSelfClosingElement(t))return Qr(t,e);let n=Xr(t,e);return n||null}function Ja(t,e){return{kind:"fragment",children:za(t.children,e)}}function N_(t,e,n){let r=n.viewImports.get(t);return r?Nd(r,t)?{kind:"viewRef",name:t,sourcePath:r,props:e}:(n.errors.push(`View component "${t}" is imported but has no view() export`),null):null}function Qr(t,e){let n=L.isJsxElement(t)?t.openingElement:t,r=A_(n.tagName);if(!r)return e.errors.push("Unsupported JSX tag expression"),null;let i={};for(let l of n.attributes.properties){if(!L.isJsxAttribute(l))continue;let c=jd(l.name);if(c!=="key"){if(!l.initializer){i[c]=!0;continue}if(L.isStringLiteral(l.initializer)){i[c]=l.initializer.text;continue}if(L.isJsxExpression(l.initializer)&&l.initializer.expression){let d=Co(l.initializer.expression,e);d!==null?i[c]=d:e.errors.push(`Unsupported JSX prop expression for "${c}" on <${r}>: ${Qn(l.initializer.expression)}`)}}}if(!e.allowedComponents.has(r)){let l=N_(r,i,e);return l||(e.errors.push(`Component "${r}" is not in the allowed registry`),null)}I_(r,i,e);let o=e;if(r==="Table"&&i.source){let l=typeof i.source=="object"&&"kind"in i.source&&i.source.kind==="binding"?i.source:void 0;l&&(o={...e,tableSource:l})}let s=typeof i.each=="string"?i.each:void 0;if(s){let l=e.tableSource;if(!l)return e.errors.push(`<${r} each="${s}"> requires an ancestor <Table source={...}>`),null;delete i.each;let c={...o,scopes:[...o.scopes,s]},d=L.isJsxElement(t)?za(t.children,c):[];return{kind:"map",source:l,item:s,body:{kind:"component",name:r,props:i,children:d}}}let a=L.isJsxElement(t)?za(t.children,o):[];return{kind:"component",name:r,props:i,children:a}}function M_(t){let e=null;function n(r){if(L.isCallExpression(r)&&L.isIdentifier(r.expression)&&r.expression.text==="screen"&&r.arguments.length===1&&(L.isArrowFunction(r.arguments[0])||L.isFunctionExpression(r.arguments[0]))){let i=r.arguments[0],o="unknown";if(r.typeArguments&&r.typeArguments.length===1){let a=r.typeArguments[0];L.isTypeReferenceNode(a)&&L.isIdentifier(a.typeName)&&(o=a.typeName.text)}let s=i.body;if(L.isParenthesizedExpression(s))(L.isJsxElement(s.expression)||L.isJsxSelfClosingElement(s.expression))&&(e={viewModel:o,jsxRoot:s.expression});else if(L.isJsxElement(s)||L.isJsxSelfClosingElement(s))e={viewModel:o,jsxRoot:s};else if(L.isBlock(s)&&s.statements.length===1){let a=s.statements[0];L.isReturnStatement(a)&&a.expression&&(L.isParenthesizedExpression(a.expression)?e={viewModel:o,jsxRoot:a.expression.expression}:e={viewModel:o,jsxRoot:a.expression})}}L.forEachChild(r,n)}return n(t),e}function qd(t,e,n,r={}){let i=new Set(ct);for(let p of r.allowlistExtra??[])i.add(p);let o=Vd(e),s=Md(o),a=L.createSourceFile(o,t,L.ScriptTarget.Latest,!0,L.ScriptKind.TSX),l={vmName:"vm",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:Ha(a,s),allowedComponents:i},c=M_(a);if(!c)return{viewModel:"unknown",exportName:n,root:{kind:"fragment",children:[]},errors:["No screen<T>() default export found"],warnings:[]};let d=L.isJsxElement(c.jsxRoot)||L.isJsxSelfClosingElement(c.jsxRoot)?Qr(c.jsxRoot,l):L.isJsxFragment(c.jsxRoot)?Ja(c.jsxRoot,l):null;return d?{viewModel:c.viewModel,exportName:n,root:d,errors:l.errors,warnings:l.warnings}:(l.errors.push("screen() callback must return a single JSX root element"),{viewModel:c.viewModel,exportName:n,root:{kind:"fragment",children:[]},errors:l.errors,warnings:l.warnings})}function V_(t,e){let n={...e.propBindings};for(let i of t.propNames)n[i]={kind:"binding",path:"",scope:i};let r={...e,vmName:t.paramName,propBindings:n,scopes:[]};return L.isJsxElement(t.jsxRoot)||L.isJsxSelfClosingElement(t.jsxRoot)?Qr(t.jsxRoot,r):L.isJsxFragment(t.jsxRoot)?Ja(t.jsxRoot,r):L.isConditionalExpression(t.jsxRoot)?(e.errors.push("view() partial root must be a JSX element or fragment; conditional expressions are not supported"),null):L.isExpression(t.jsxRoot)?(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported expression: ${Qn(t.jsxRoot)}`),null):(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported syntax kind: ${L.SyntaxKind[t.jsxRoot.kind]}`),null)}function Fd(t,e,n,r={}){let i=new Set(ct);for(let p of r.allowlistExtra??[])i.add(p);let o=Vd(e),s=Md(o),a=L.createSourceFile(o,t,L.ScriptTarget.Latest,!0,L.ScriptKind.TSX),l=Wa(a,n),c={vmName:l?.paramName??"__noop",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:Ha(a,s),allowedComponents:i};if(!l)return{exportName:n,propNames:[],root:{kind:"fragment",children:[]},errors:[`No view() export "${n}" found in ${e}`],warnings:[]};let d=V_(l,c);return d?{exportName:n,propsType:l.propsType,propNames:l.propNames,root:d,errors:c.errors,warnings:c.warnings}:{exportName:n,propsType:l.propsType,propNames:l.propNames,root:{kind:"fragment",children:[]},errors:c.errors,warnings:c.warnings}}function Ka(t){let e=[];function n(r){if(r.kind==="viewRef"){e.push(r);return}if(r.kind==="component"){for(let i of r.children)n(i);return}if(r.kind==="map"){n(r.body);return}if(r.kind==="fragment")for(let i of r.children)n(i)}return n(t),e}function Bd(t){return`${t.sourcePath}:${t.name}`}wt();var L_=new Set(["swiftui","compose"]),j_=new Set(["action"]);function D_(t,e){return!ct.has(t)&&t in e.extensions}function Ya(t){return t?` (${t})`:""}function ko(t,e,n={}){let r=[],i=[],o=n.targets??[],s=o.some(l=>L_.has(l)),a=l=>{if(l.kind!=="viewRef"){if(l.kind==="component"){if(!ct.has(l.name)&&!(l.name in e.extensions))r.push(`Extension component "${l.name}" is not registered in extensions.yaml${Ya(n.source)}`);else if(D_(l.name,e)){let c=e.extensions[l.name];s&&c.renderer==="react-only"&&r.push(`Extension "${l.name}" is react-only but binding targets include native renderer(s): ${o.join(", ")}${Ya(n.source)}`);for(let d of Object.keys(l.props))d in c.properties||j_.has(d)||r.push(`Extension "${l.name}" does not accept property "${d}"${Ya(n.source)}`)}for(let c of l.children)a(c);return}if(l.kind==="map"){a(l.body);return}if(l.kind==="fragment")for(let c of l.children)a(c)}};return a(t),{errors:r,warnings:i}}function Hd(t,e,n,r,i){let o=[],s=[],a=ko(t,n,{targets:r,source:i.screen});o.push(...a.errors),s.push(...a.warnings);for(let l=0;l<e.length;l++){let c=ko(e[l],n,{targets:r,source:i.partials[l]});o.push(...c.errors),s.push(...c.warnings)}return{errors:o,warnings:s}}async function F_(t,e,n){let r=await Wd(t,"utf-8"),i=Fd(r,t,e,{allowlistExtra:n.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t} (${e}):
925
925
  ${i.errors.map(o=>` - ${o}`).join(`
926
926
  `)}`);if(n.extensionRegistry){let o=ko(i.root,n.extensionRegistry,{targets:n.targets,source:t});if(o.errors.length>0)throw new Error(`Extension validation errors in ${t} (${e}):
@@ -1081,8 +1081,8 @@ ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
1081
1081
  <${r} vm={${i}} />
1082
1082
  </React.StrictMode>,
1083
1083
  );
1084
- `,s=ya(t,"entry.tsx");return await ld(s,o,"utf8"),s}async function ud(t,e,n){let r=await Ke(t),o=(await Et(r.bindings)).views.find(I=>I.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=we(t),[a,l,c]=await Promise.all([Yb(t,e),Kv(t,r,e),Di(r,t)]),d=LT(o.exportName),p=Yp(e),f=ya(MT(),`view-contracts-preview-${process.pid}`);await NT(f,{recursive:!0});let m=await qT(f,a,l,d,p),g=Re(),y=[en(s,"node_modules"),en(g,"node_modules")],w=await VT({entryPoints:[m],bundle:!0,write:!1,format:"esm",platform:"browser",target:"es2022",jsx:"automatic",jsxImportSource:"react",absWorkingDir:s,nodePaths:y,alias:jT(s),logLevel:"silent"});if(w.errors.length>0)throw new Error(w.errors.map(I=>I.text).join(`
1085
- `));let b=w.outputFiles[0]?.text??"";return{html:DT(),themeCss:c,bundleJs:b,version:n}}async function Xb(t,e){let n=await Et((await Ke(t)).bindings);if(e){let i=n.views.find(o=>o.screenName===e);if(!i)throw new Error(`Unknown screen "${e}" in view-bindings.yaml`);if(!i.targets.includes("react"))throw new Error(`Screen "${e}" is not a react target`);return e}let r=n.views.find(i=>i.targets.includes("react"));if(!r)throw new Error("No react target views in view-bindings.yaml");return r.screenName}jr();function co(t,e,n,r){t.writeHead(e,{"Content-Type":r,"Cache-Control":"no-store"}),t.end(n)}function HT(t,e,n){let r=t.url?.split("?")[0]??"/";if(r==="/"||r==="/index.html"){co(e,200,n.html,"text/html; charset=utf-8");return}if(r==="/bundle.js"){co(e,200,n.bundleJs,"text/javascript; charset=utf-8");return}if(r==="/theme.css"){co(e,200,n.themeCss,"text/css; charset=utf-8");return}if(r==="/__vc-reload"){co(e,200,JSON.stringify({version:n.version}),"application/json");return}co(e,404,"Not found","text/plain; charset=utf-8")}async function WT(t,e,n){let r=await Ke(t),i=we(t),{tokensPath:o,themePath:s}=on(r),a=await Yv(t,r),l=Bb(),c=[Un(i,r.viewsDir),Un(i,o),Un(i,s),a,l];r.extensions&&c.push(Un(i,r.extensions)),r.design?.extensionsCss&&c.push(Un(i,r.design.extensionsCss)),c.push(Un(i,"contracts/view-models.ts")),c.push(Un(i,"src/components/extensions.tsx"));let d,p=()=>{d&&clearTimeout(d),d=setTimeout(()=>n(),150)},f=[];for(let g of c)await Lr(g)&&f.push(g);let m=f.map(g=>BT(g,{recursive:!0},()=>p()));return()=>{d&&clearTimeout(d);for(let g of m)g.close()}}async function Qb(t){let e=t.port??5173,n=t.host??"127.0.0.1",r=await Xb(t.configPath,t.screen),i=0,o=await ud(t.configPath,r,i),s=!1,a=!1,l=async()=>{if(s){a=!0;return}s=!0;try{i+=1,o=await ud(t.configPath,r,i),console.log(`[preview] rebuilt (v${i})`)}catch(f){let m=f instanceof Error?f.message:String(f);console.error(`[preview] compile error:
1084
+ `,s=ya(t,"entry.tsx");return await ld(s,o,"utf8"),s}async function ud(t,e,n){let r=await Ke(t),o=(await Et(r.bindings)).views.find(R=>R.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=we(t),[a,l,c]=await Promise.all([Yb(t,e),Kv(t,r,e),Di(r,t)]),d=LT(o.exportName),p=Yp(e),f=ya(MT(),`view-contracts-preview-${process.pid}`);await NT(f,{recursive:!0});let m=await qT(f,a,l,d,p),g=Re(),y=[en(s,"node_modules"),en(g,"node_modules")],w=await VT({entryPoints:[m],bundle:!0,write:!1,format:"esm",platform:"browser",target:"es2022",jsx:"automatic",jsxImportSource:"react",absWorkingDir:s,nodePaths:y,alias:jT(s),logLevel:"silent"});if(w.errors.length>0)throw new Error(w.errors.map(R=>R.text).join(`
1085
+ `));let _=w.outputFiles[0]?.text??"";return{html:DT(),themeCss:c,bundleJs:_,version:n}}async function Xb(t,e){let n=await Et((await Ke(t)).bindings);if(e){let i=n.views.find(o=>o.screenName===e);if(!i)throw new Error(`Unknown screen "${e}" in view-bindings.yaml`);if(!i.targets.includes("react"))throw new Error(`Screen "${e}" is not a react target`);return e}let r=n.views.find(i=>i.targets.includes("react"));if(!r)throw new Error("No react target views in view-bindings.yaml");return r.screenName}jr();function co(t,e,n,r){t.writeHead(e,{"Content-Type":r,"Cache-Control":"no-store"}),t.end(n)}function HT(t,e,n){let r=t.url?.split("?")[0]??"/";if(r==="/"||r==="/index.html"){co(e,200,n.html,"text/html; charset=utf-8");return}if(r==="/bundle.js"){co(e,200,n.bundleJs,"text/javascript; charset=utf-8");return}if(r==="/theme.css"){co(e,200,n.themeCss,"text/css; charset=utf-8");return}if(r==="/__vc-reload"){co(e,200,JSON.stringify({version:n.version}),"application/json");return}co(e,404,"Not found","text/plain; charset=utf-8")}async function WT(t,e,n){let r=await Ke(t),i=we(t),{tokensPath:o,themePath:s}=on(r),a=await Yv(t,r),l=Bb(),c=[Un(i,r.viewsDir),Un(i,o),Un(i,s),a,l];r.extensions&&c.push(Un(i,r.extensions)),r.design?.extensionsCss&&c.push(Un(i,r.design.extensionsCss)),c.push(Un(i,"contracts/view-models.ts")),c.push(Un(i,"src/components/extensions.tsx"));let d,p=()=>{d&&clearTimeout(d),d=setTimeout(()=>n(),150)},f=[];for(let g of c)await Lr(g)&&f.push(g);let m=f.map(g=>BT(g,{recursive:!0},()=>p()));return()=>{d&&clearTimeout(d);for(let g of m)g.close()}}async function Qb(t){let e=t.port??5173,n=t.host??"127.0.0.1",r=await Xb(t.configPath,t.screen),i=0,o=await ud(t.configPath,r,i),s=!1,a=!1,l=async()=>{if(s){a=!0;return}s=!0;try{i+=1,o=await ud(t.configPath,r,i),console.log(`[preview] rebuilt (v${i})`)}catch(f){let m=f instanceof Error?f.message:String(f);console.error(`[preview] compile error:
1086
1086
  ${m}`)}finally{s=!1,a&&(a=!1,l())}},c=FT((f,m)=>HT(f,m,o));await new Promise((f,m)=>{c.once("error",m),c.listen(e,n,()=>f())});let d=`http://${n}:${e}/`;console.log(`[preview] ${r} \u2192 ${d}`),console.log("[preview] watching views/ and design files (Ctrl+C to stop)");let p=await WT(t.configPath,r,()=>{l()});await new Promise(f=>{let m=()=>{p(),c.close(()=>f())};process.once("SIGINT",m),process.once("SIGTERM",m)})}async function dd(t){if(!t.extensions)return{allowlistExtra:t.allowlistExtra??[]};let e=await cs(t.extensions),n=[...new Set([...t.allowlistExtra??[],...Object.keys(e.extensions)])];return{extensionRegistry:e,allowlistExtra:n}}async function Zb(t){await new Promise((e,n)=>{let r=JT("npx",["micro-contracts",...t],{stdio:"inherit"});r.on("error",n),r.on("close",i=>{i===0?e():n(new Error(`micro-contracts exited with code ${i}`))})})}async function pd(t){let e=await Ke(t),n=await Et(e.bindings),{extensionRegistry:r,allowlistExtra:i}=await dd(e),o=we(t),{screens:s,partials:a}=await Gd(n.views.map(l=>({sourcePath:Mt(o,l.source),exportName:l.exportName,screenName:l.screenName,targets:l.targets})),{allowlistExtra:i,extensionRegistry:r});return{screens:new Map(n.views.map((l,c)=>[l.screenName,s[c]])),partials:a}}function zn(t,e){let n=GT(n_(t),e).replace(/\\/g,"/");return n.startsWith(".")||(n=`./${n}`),n.replace(/\.tsx?$/,".js")}async function e_(t,e,n){let r=await Ke(t),i=we(t),{allowlistExtra:o}=await dd(r),s=await Et(r.bindings);for(let a of n){let l=Mt(r.generated.reactDir,"components",`${a.exportName}.generated.tsx`),c=zn(l,Mt(r.generated.reactDir,"runtime.ts")),d=zn(l,Mt(r.generated.reactDir,"extensions.generated.ts")),p=zn(l,Mt(i,"contracts/view-models.ts"));await ad(a,l,{runtimeImportFrom:c,extensionsImportFrom:d,contractsImportFrom:p,allowlistExtra:o}),console.log(` ${a.exportName} \u2192 ${l}`)}for(let a of s.views){if(!a.targets.includes("react"))continue;let l=e.get(a.screenName);if(!l)throw new Error(`Missing View IR for ${a.screenName}`);let c=Df(r,a),d=zn(c,Mt(r.generated.reactDir,"runtime.ts")),p=zn(c,Mt(r.generated.reactDir,"extensions.generated.ts")),f=zn(c,Mt(i,"contracts/view-models.ts")),m=new Map;for(let g of n){let y=Wb(r.generated.reactDir,g);m.set(g.exportName,zn(c,y))}await ad(l,c,{runtimeImportFrom:d,extensionsImportFrom:p,contractsImportFrom:f,allowlistExtra:o,viewRefImportFrom:m}),console.log(` ${a.exportName} \u2192 ${c}`)}}async function t_(t){let e=await Ke(t),n=await Et(e.bindings),r=we(t),o=["// Auto-generated view bridge registry \u2014 DO NOT EDIT",`// Generated from ${qf(r,e.bindings)}`,"","export const viewBridgeRegistry = {"];for(let s of n.views)o.push(` ${s.screenConst}: {`),o.push(` id: ${JSON.stringify(s.id)},`),o.push(` screenId: ${JSON.stringify(s.screenId)},`),o.push(` screenName: ${JSON.stringify(s.screenName)},`),o.push(` route: ${JSON.stringify(s.route)},`),o.push(` operationId: ${JSON.stringify(s.operationId)},`),o.push(` viewModel: ${JSON.stringify(s.viewModel)},`),o.push(` source: ${JSON.stringify(s.source)},`),o.push(` targets: ${JSON.stringify(s.targets)},`),o.push(" },");o.push("} as const;",""),o.push("export type ViewBridgeKey = keyof typeof viewBridgeRegistry;",""),await zT(n_(Mt(e.generated.bridge)),{recursive:!0}),await UT(Mt(e.generated.bridge),o.join(`
1087
- `),"utf-8"),console.log(`Bridge registry \u2192 ${e.generated.bridge} (${n.views.length} view(s))`)}var r_={compile:async(t,e)=>{let{screens:n,partials:r}=await pd(await rn(t.config));console.log(`Compiled ${n.size} screen(s) and ${r.length} partial(s) to View IR (in-memory)`)},renderReact:async(t,e)=>{let n=await rn(t.config),{screens:r,partials:i}=await pd(n);await e_(n,r,i)},renderBridge:async(t,e)=>{await t_(await rn(t.config))},build:async(t,e)=>{let n=await rn(t.config),r=await Ke(n),i=await Et(r.bindings),{screens:o,partials:s}=await pd(n);console.log(`Compiled ${o.size} screen(s) and ${s.length} partial(s) to View IR (in-memory)`);let{tokensPath:a,themePath:l}=on(r),{tokenIR:c,themeIR:d}=await xr(a,l);await Vn(r,n);let{allowlistExtra:p}=await dd(r),f=[...o.values(),...s];await ha(f,p),ji(f,d),await Ub(n,r),await e_(n,o,s),await t_(n),await zb(n,r,i,{theme:d,tokens:c},{screens:o,partials:s}),await Gb(n,r,i,{theme:d,tokens:c},{screens:o,partials:s}),await Kb(n,r,i)},contractsGenerate:async(t,e)=>{let n=await Ke(await rn(t.config));await Zb(["generate","-c",n.microContractsConfig]),console.log("Contracts generated via micro-contracts")},contractsCheck:async(t,e)=>{let n=await Ke(await rn(t.config));await Zb(["lint","-c",n.microContractsConfig])},preview:async(t,e)=>{try{await Qb({configPath:await rn(t.config),port:t.port!=null?Number(t.port):void 0,host:t.host,screen:t.screen})}catch(n){console.error(n instanceof Error?n.message:n),process.exit(1)}}};var KT={version:"0.5.5"};Id(r_,KT.version).parseAsync(process.argv).catch(t=>{console.error(t instanceof Error?t.message:t),process.exit(1)});
1087
+ `),"utf-8"),console.log(`Bridge registry \u2192 ${e.generated.bridge} (${n.views.length} view(s))`)}var r_={compile:async(t,e)=>{let{screens:n,partials:r}=await pd(await rn(t.config));console.log(`Compiled ${n.size} screen(s) and ${r.length} partial(s) to View IR (in-memory)`)},renderReact:async(t,e)=>{let n=await rn(t.config),{screens:r,partials:i}=await pd(n);await e_(n,r,i)},renderBridge:async(t,e)=>{await t_(await rn(t.config))},build:async(t,e)=>{let n=await rn(t.config),r=await Ke(n),i=await Et(r.bindings),{screens:o,partials:s}=await pd(n);console.log(`Compiled ${o.size} screen(s) and ${s.length} partial(s) to View IR (in-memory)`);let{tokensPath:a,themePath:l}=on(r),{tokenIR:c,themeIR:d}=await xr(a,l);await Vn(r,n);let{allowlistExtra:p}=await dd(r),f=[...o.values(),...s];await ha(f,p),ji(f,d),await Ub(n,r),await e_(n,o,s),await t_(n),await zb(n,r,i,{theme:d,tokens:c},{screens:o,partials:s}),await Gb(n,r,i,{theme:d,tokens:c},{screens:o,partials:s}),await Kb(n,r,i)},contractsGenerate:async(t,e)=>{let n=await Ke(await rn(t.config));await Zb(["generate","-c",n.microContractsConfig]),console.log("Contracts generated via micro-contracts")},contractsCheck:async(t,e)=>{let n=await Ke(await rn(t.config));await Zb(["lint","-c",n.microContractsConfig])},preview:async(t,e)=>{try{await Qb({configPath:await rn(t.config),port:t.port!=null?Number(t.port):void 0,host:t.host,screen:t.screen})}catch(n){console.error(n instanceof Error?n.message:n),process.exit(1)}}};var KT={version:"0.5.7"};Id(r_,KT.version).parseAsync(process.argv).catch(t=>{console.error(t instanceof Error?t.message:t),process.exit(1)});
1088
1088
  //# sourceMappingURL=view-contracts.bundle.mjs.map