view-contracts 0.4.4 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/preview.mjs CHANGED
@@ -1,117 +1,117 @@
1
- var Fy=Object.create;var Ts=Object.defineProperty;var By=Object.getOwnPropertyDescriptor;var Hy=Object.getOwnPropertyNames;var Uy=Object.getPrototypeOf,zy=Object.prototype.hasOwnProperty;var Pr=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var J=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(n){throw r=[n],n}};var $=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},Cr=(t,e)=>{for(var r in e)Ts(t,r,{get:e[r],enumerable:!0})},Wy=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Hy(e))!zy.call(t,i)&&i!==r&&Ts(t,i,{get:()=>e[i],enumerable:!(n=By(e,i))||n.enumerable});return t};var ku=(t,e,r)=>(r=t!=null?Fy(Uy(t)):{},Wy(e||!t||!t.__esModule?Ts(r,"default",{value:t,enumerable:!0}):r,t));var Gy,Eu,Ky,Jy,Yy,Xy,pe,Qy,Zy,yn,vn,ev,Me,Pu,Cu,Iu,Ru,Nu,Tu,Au,Ou,Mu,Lu,ju,Vu,Du,qu,Fu,Bu,Hu,As,tv,rv,Uu,vP,wP,_P,bP,SP,$P,xP,kP,EP,PP,CP,IP,RP,NP,st,Ir=J(()=>{Gy=Object.create,Eu=Object.defineProperty,Ky=Object.getOwnPropertyDescriptor,Jy=Object.getOwnPropertyNames,Yy=Object.getPrototypeOf,Xy=Object.prototype.hasOwnProperty,pe=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),Qy=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(var i=Jy(e),o=0,s=i.length,a;o<s;o++)a=i[o],!Xy.call(t,a)&&a!==r&&Eu(t,a,{get:(u=>e[u]).bind(null,a),enumerable:!(n=Ky(e,a))||n.enumerable});return t},Zy=(t,e,r)=>(r=t!=null?Gy(Yy(t)):{},Qy(e||!t||!t.__esModule?Eu(r,"default",{value:t,enumerable:!0}):r,t)),yn=pe(((t,e)=>{function r(u){return typeof u>"u"||u===null}function n(u){return typeof u=="object"&&u!==null}function i(u){return Array.isArray(u)?u:r(u)?[]:[u]}function o(u,c){if(c){let p=Object.keys(c);for(let f=0,d=p.length;f<d;f+=1){let m=p[f];u[m]=c[m]}}return u}function s(u,c){let p="";for(let f=0;f<c;f+=1)p+=u;return p}function a(u){return u===0&&Number.NEGATIVE_INFINITY===1/u}e.exports.isNothing=r,e.exports.isObject=n,e.exports.toArray=i,e.exports.repeat=s,e.exports.isNegativeZero=a,e.exports.extend=o})),vn=pe(((t,e)=>{function r(i,o){let s="",a=i.reason||"(unknown reason)";return i.mark?(i.mark.name&&(s+='in "'+i.mark.name+'" '),s+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!o&&i.mark.snippet&&(s+=`
1
+ var Xv=Object.create;var ia=Object.defineProperty;var Qv=Object.getOwnPropertyDescriptor;var Zv=Object.getOwnPropertyNames;var ew=Object.getPrototypeOf,tw=Object.prototype.hasOwnProperty;var Vr=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var X=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(n){throw r=[n],n}};var $=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},lr=(t,e)=>{for(var r in e)ia(t,r,{get:e[r],enumerable:!0})},rw=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Zv(e))!tw.call(t,i)&&i!==r&&ia(t,i,{get:()=>e[i],enumerable:!(n=Qv(e,i))||n.enumerable});return t};var np=(t,e,r)=>(r=t!=null?Xv(ew(t)):{},rw(e||!t||!t.__esModule?ia(r,"default",{value:t,enumerable:!0}):r,t));var nw,ip,iw,ow,sw,aw,me,lw,uw,Nn,Mn,cw,Fe,op,sp,ap,lp,up,cp,pp,fp,dp,hp,mp,gp,yp,vp,wp,bp,_p,oa,pw,fw,xp,uI,cI,pI,fI,dI,hI,mI,gI,yI,vI,wI,bI,_I,xI,ht,jr=X(()=>{nw=Object.create,ip=Object.defineProperty,iw=Object.getOwnPropertyDescriptor,ow=Object.getOwnPropertyNames,sw=Object.getPrototypeOf,aw=Object.prototype.hasOwnProperty,me=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),lw=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(var i=ow(e),o=0,s=i.length,a;o<s;o++)a=i[o],!aw.call(t,a)&&a!==r&&ip(t,a,{get:(l=>e[l]).bind(null,a),enumerable:!(n=iw(e,a))||n.enumerable});return t},uw=(t,e,r)=>(r=t!=null?nw(sw(t)):{},lw(e||!t||!t.__esModule?ip(r,"default",{value:t,enumerable:!0}):r,t)),Nn=me(((t,e)=>{function r(l){return typeof l>"u"||l===null}function n(l){return typeof l=="object"&&l!==null}function i(l){return Array.isArray(l)?l:r(l)?[]:[l]}function o(l,u){if(u){let f=Object.keys(u);for(let p=0,d=f.length;p<d;p+=1){let m=f[p];l[m]=u[m]}}return l}function s(l,u){let f="";for(let p=0;p<u;p+=1)f+=l;return f}function a(l){return l===0&&Number.NEGATIVE_INFINITY===1/l}e.exports.isNothing=r,e.exports.isObject=n,e.exports.toArray=i,e.exports.repeat=s,e.exports.isNegativeZero=a,e.exports.extend=o})),Mn=me(((t,e)=>{function r(i,o){let s="",a=i.reason||"(unknown reason)";return i.mark?(i.mark.name&&(s+='in "'+i.mark.name+'" '),s+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!o&&i.mark.snippet&&(s+=`
2
2
 
3
- `+i.mark.snippet),a+" "+s):a}function n(i,o){Error.call(this),this.name="YAMLException",this.reason=i,this.mark=o,this.message=r(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n.prototype.toString=function(o){return this.name+": "+r(this,o)},e.exports=n})),ev=pe(((t,e)=>{var r=yn();function n(s,a,u,c,p){let f="",d="",m=Math.floor(p/2)-1;return c-a>m&&(f=" ... ",a=c-m+f.length),u-c>m&&(d=" ...",u=c+m-d.length),{str:f+s.slice(a,u).replace(/\t/g,"\u2192")+d,pos:c-a+f.length}}function i(s,a){return r.repeat(" ",a-s.length)+s}function o(s,a){if(a=Object.create(a||null),!s.buffer)return null;a.maxLength||(a.maxLength=79),typeof a.indent!="number"&&(a.indent=1),typeof a.linesBefore!="number"&&(a.linesBefore=3),typeof a.linesAfter!="number"&&(a.linesAfter=2);let u=/\r?\n|\r|\0/g,c=[0],p=[],f,d=-1;for(;f=u.exec(s.buffer);)p.push(f.index),c.push(f.index+f[0].length),s.position<=f.index&&d<0&&(d=c.length-2);d<0&&(d=c.length-1);let m="",g=Math.min(s.line+a.linesAfter,p.length).toString().length,y=a.maxLength-(a.indent+g+3);for(let b=1;b<=a.linesBefore&&!(d-b<0);b++){let L=n(s.buffer,c[d-b],p[d-b],s.position-(c[d]-c[d-b]),y);m=r.repeat(" ",a.indent)+i((s.line-b+1).toString(),g)+" | "+L.str+`
4
- `+m}let _=n(s.buffer,c[d],p[d],s.position,y);m+=r.repeat(" ",a.indent)+i((s.line+1).toString(),g)+" | "+_.str+`
5
- `,m+=r.repeat("-",a.indent+g+3+_.pos)+`^
6
- `;for(let b=1;b<=a.linesAfter&&!(d+b>=p.length);b++){let L=n(s.buffer,c[d+b],p[d+b],s.position-(c[d]-c[d+b]),y);m+=r.repeat(" ",a.indent)+i((s.line+b+1).toString(),g)+" | "+L.str+`
7
- `}return m.replace(/\n$/,"")}e.exports=o})),Me=pe(((t,e)=>{var r=vn(),n=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];function o(a){let u={};return a!==null&&Object.keys(a).forEach(function(c){a[c].forEach(function(p){u[String(p)]=c})}),u}function s(a,u){if(u=u||{},Object.keys(u).forEach(function(c){if(n.indexOf(c)===-1)throw new r('Unknown option "'+c+'" is met in definition of "'+a+'" YAML type.')}),this.options=u,this.tag=a,this.kind=u.kind||null,this.resolve=u.resolve||function(){return!0},this.construct=u.construct||function(c){return c},this.instanceOf=u.instanceOf||null,this.predicate=u.predicate||null,this.represent=u.represent||null,this.representName=u.representName||null,this.defaultStyle=u.defaultStyle||null,this.multi=u.multi||!1,this.styleAliases=o(u.styleAliases||null),i.indexOf(this.kind)===-1)throw new r('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}e.exports=s})),Pu=pe(((t,e)=>{var r=vn(),n=Me();function i(a,u){let c=[];return a[u].forEach(function(p){let f=c.length;c.forEach(function(d,m){d.tag===p.tag&&d.kind===p.kind&&d.multi===p.multi&&(f=m)}),c[f]=p}),c}function o(){let a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function u(c){c.multi?(a.multi[c.kind].push(c),a.multi.fallback.push(c)):a[c.kind][c.tag]=a.fallback[c.tag]=c}for(let c=0,p=arguments.length;c<p;c+=1)arguments[c].forEach(u);return a}function s(a){return this.extend(a)}s.prototype.extend=function(u){let c=[],p=[];if(u instanceof n)p.push(u);else if(Array.isArray(u))p=p.concat(u);else if(u&&(Array.isArray(u.implicit)||Array.isArray(u.explicit)))u.implicit&&(c=c.concat(u.implicit)),u.explicit&&(p=p.concat(u.explicit));else throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");c.forEach(function(d){if(!(d instanceof n))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(d.loadKind&&d.loadKind!=="scalar")throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(d.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),p.forEach(function(d){if(!(d instanceof n))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let f=Object.create(s.prototype);return f.implicit=(this.implicit||[]).concat(c),f.explicit=(this.explicit||[]).concat(p),f.compiledImplicit=i(f,"implicit"),f.compiledExplicit=i(f,"explicit"),f.compiledTypeMap=o(f.compiledImplicit,f.compiledExplicit),f},e.exports=s})),Cu=pe(((t,e)=>{e.exports=new(Me())("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})})),Iu=pe(((t,e)=>{e.exports=new(Me())("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})})),Ru=pe(((t,e)=>{e.exports=new(Me())("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}})})),Nu=pe(((t,e)=>{e.exports=new(Pu())({explicit:[Cu(),Iu(),Ru()]})})),Tu=pe(((t,e)=>{var r=Me();function n(s){if(s===null)return!0;let a=s.length;return a===1&&s==="~"||a===4&&(s==="null"||s==="Null"||s==="NULL")}function i(){return null}function o(s){return s===null}e.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:n,construct:i,predicate:o,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})})),Au=pe(((t,e)=>{var r=Me();function n(s){if(s===null)return!1;let a=s.length;return a===4&&(s==="true"||s==="True"||s==="TRUE")||a===5&&(s==="false"||s==="False"||s==="FALSE")}function i(s){return s==="true"||s==="True"||s==="TRUE"}function o(s){return Object.prototype.toString.call(s)==="[object Boolean]"}e.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:n,construct:i,predicate:o,represent:{lowercase:function(s){return s?"true":"false"},uppercase:function(s){return s?"TRUE":"FALSE"},camelcase:function(s){return s?"True":"False"}},defaultStyle:"lowercase"})})),Ou=pe(((t,e)=>{var r=yn(),n=Me();function i(f){return f>=48&&f<=57||f>=65&&f<=70||f>=97&&f<=102}function o(f){return f>=48&&f<=55}function s(f){return f>=48&&f<=57}function a(f){if(f===null)return!1;let d=f.length,m=0,g=!1;if(!d)return!1;let y=f[m];if((y==="-"||y==="+")&&(y=f[++m]),y==="0"){if(m+1===d)return!0;if(y=f[++m],y==="b"){for(m++;m<d;m++){if(y=f[m],y!=="0"&&y!=="1")return!1;g=!0}return g&&Number.isFinite(u(f))}if(y==="x"){for(m++;m<d;m++){if(!i(f.charCodeAt(m)))return!1;g=!0}return g&&Number.isFinite(u(f))}if(y==="o"){for(m++;m<d;m++){if(!o(f.charCodeAt(m)))return!1;g=!0}return g&&Number.isFinite(u(f))}}for(;m<d;m++){if(!s(f.charCodeAt(m)))return!1;g=!0}return g?Number.isFinite(u(f)):!1}function u(f){let d=f,m=1,g=d[0];if((g==="-"||g==="+")&&(g==="-"&&(m=-1),d=d.slice(1),g=d[0]),d==="0")return 0;if(g==="0"){if(d[1]==="b")return m*parseInt(d.slice(2),2);if(d[1]==="x")return m*parseInt(d.slice(2),16);if(d[1]==="o")return m*parseInt(d.slice(2),8)}return m*parseInt(d,10)}function c(f){return u(f)}function p(f){return Object.prototype.toString.call(f)==="[object Number]"&&f%1===0&&!r.isNegativeZero(f)}e.exports=new n("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:c,predicate:p,represent:{binary:function(f){return f>=0?"0b"+f.toString(2):"-0b"+f.toString(2).slice(1)},octal:function(f){return f>=0?"0o"+f.toString(8):"-0o"+f.toString(8).slice(1)},decimal:function(f){return f.toString(10)},hexadecimal:function(f){return f>=0?"0x"+f.toString(16).toUpperCase():"-0x"+f.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})})),Mu=pe(((t,e)=>{var r=yn(),n=Me(),i=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),o=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function s(f){return f===null||!i.test(f)?!1:Number.isFinite(parseFloat(f,10))?!0:o.test(f)}function a(f){let d=f.toLowerCase(),m=d[0]==="-"?-1:1;return"+-".indexOf(d[0])>=0&&(d=d.slice(1)),d===".inf"?m===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:d===".nan"?NaN:m*parseFloat(d,10)}var u=/^[-+]?[0-9]+e/;function c(f,d){if(isNaN(f))switch(d){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===f)switch(d){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===f)switch(d){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(f))return"-0.0";let m=f.toString(10);return u.test(m)?m.replace("e",".e"):m}function p(f){return Object.prototype.toString.call(f)==="[object Number]"&&(f%1!==0||r.isNegativeZero(f))}e.exports=new n("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:a,predicate:p,represent:c,defaultStyle:"lowercase"})})),Lu=pe(((t,e)=>{e.exports=Nu().extend({implicit:[Tu(),Au(),Ou(),Mu()]})})),ju=pe(((t,e)=>{e.exports=Lu()})),Vu=pe(((t,e)=>{var r=Me(),n=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function o(u){return u===null?!1:n.exec(u)!==null||i.exec(u)!==null}function s(u){let c=0,p=null,f=n.exec(u);if(f===null&&(f=i.exec(u)),f===null)throw new Error("Date resolve error");let d=+f[1],m=+f[2]-1,g=+f[3];if(!f[4])return new Date(Date.UTC(d,m,g));let y=+f[4],_=+f[5],b=+f[6];if(f[7]){for(c=f[7].slice(0,3);c.length<3;)c+="0";c=+c}if(f[9]){let q=+f[10],A=+(f[11]||0);p=(q*60+A)*6e4,f[9]==="-"&&(p=-p)}let L=new Date(Date.UTC(d,m,g,y,_,b,c));return p&&L.setTime(L.getTime()-p),L}function a(u){return u.toISOString()}e.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:o,construct:s,instanceOf:Date,represent:a})})),Du=pe(((t,e)=>{var r=Me();function n(i){return i==="<<"||i===null}e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:n})})),qu=pe(((t,e)=>{var r=Me(),n=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
8
- \r`;function i(u){if(u===null)return!1;let c=0,p=u.length,f=n;for(let d=0;d<p;d++){let m=f.indexOf(u.charAt(d));if(!(m>64)){if(m<0)return!1;c+=6}}return c%8===0}function o(u){let c=u.replace(/[\r\n=]/g,""),p=c.length,f=n,d=0,m=[];for(let y=0;y<p;y++)y%4===0&&y&&(m.push(d>>16&255),m.push(d>>8&255),m.push(d&255)),d=d<<6|f.indexOf(c.charAt(y));let g=p%4*6;return g===0?(m.push(d>>16&255),m.push(d>>8&255),m.push(d&255)):g===18?(m.push(d>>10&255),m.push(d>>2&255)):g===12&&m.push(d>>4&255),new Uint8Array(m)}function s(u){let c="",p=0,f=u.length,d=n;for(let g=0;g<f;g++)g%3===0&&g&&(c+=d[p>>18&63],c+=d[p>>12&63],c+=d[p>>6&63],c+=d[p&63]),p=(p<<8)+u[g];let m=f%3;return m===0?(c+=d[p>>18&63],c+=d[p>>12&63],c+=d[p>>6&63],c+=d[p&63]):m===2?(c+=d[p>>10&63],c+=d[p>>4&63],c+=d[p<<2&63],c+=d[64]):m===1&&(c+=d[p>>2&63],c+=d[p<<4&63],c+=d[64],c+=d[64]),c}function a(u){return Object.prototype.toString.call(u)==="[object Uint8Array]"}e.exports=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:o,predicate:a,represent:s})})),Fu=pe(((t,e)=>{var r=Me(),n=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function o(a){if(a===null)return!0;let u=[],c=a;for(let p=0,f=c.length;p<f;p+=1){let d=c[p],m=!1;if(i.call(d)!=="[object Object]")return!1;let g;for(g in d)if(n.call(d,g))if(!m)m=!0;else return!1;if(!m)return!1;if(u.indexOf(g)===-1)u.push(g);else return!1}return!0}function s(a){return a!==null?a:[]}e.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:o,construct:s})})),Bu=pe(((t,e)=>{var r=Me(),n=Object.prototype.toString;function i(s){if(s===null)return!0;let a=s,u=new Array(a.length);for(let c=0,p=a.length;c<p;c+=1){let f=a[c];if(n.call(f)!=="[object Object]")return!1;let d=Object.keys(f);if(d.length!==1)return!1;u[c]=[d[0],f[d[0]]]}return!0}function o(s){if(s===null)return[];let a=s,u=new Array(a.length);for(let c=0,p=a.length;c<p;c+=1){let f=a[c],d=Object.keys(f);u[c]=[d[0],f[d[0]]]}return u}e.exports=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:o})})),Hu=pe(((t,e)=>{var r=Me(),n=Object.prototype.hasOwnProperty;function i(s){if(s===null)return!0;let a=s;for(let u in a)if(n.call(a,u)&&a[u]!==null)return!1;return!0}function o(s){return s!==null?s:{}}e.exports=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:o})})),As=pe(((t,e)=>{e.exports=ju().extend({implicit:[Vu(),Du()],explicit:[qu(),Fu(),Bu(),Hu()]})})),tv=pe(((t,e)=>{var r=yn(),n=vn(),i=ev(),o=As(),s=Object.prototype.hasOwnProperty,a=1,u=2,c=3,p=4,f=1,d=2,m=3,g=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,y=/[\x85\u2028\u2029]/,_=/[,\[\]{}]/,b=/^(?:!|!!|![0-9A-Za-z-]+!)$/,L=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function q(l){return Object.prototype.toString.call(l)}function A(l){return l===10||l===13}function T(l){return l===9||l===32}function M(l){return l===9||l===32||l===10||l===13}function X(l){return l===44||l===91||l===93||l===123||l===125}function fe(l){if(l>=48&&l<=57)return l-48;let v=l|32;return v>=97&&v<=102?v-97+10:-1}function Ie(l){return l===120?2:l===117?4:l===85?8:0}function $e(l){return l>=48&&l<=57?l-48:-1}function qe(l){switch(l){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
9
- `;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 Re(l){return l<=65535?String.fromCharCode(l):String.fromCharCode((l-65536>>10)+55296,(l-65536&1023)+56320)}function it(l,v,x){v==="__proto__"?Object.defineProperty(l,v,{configurable:!0,enumerable:!0,writable:!0,value:x}):l[v]=x}var ot=new Array(256),bt=new Array(256);for(let l=0;l<256;l++)ot[l]=qe(l)?1:0,bt[l]=qe(l);function ae(l,v){this.input=l,this.filename=v.filename||null,this.schema=v.schema||o,this.onWarning=v.onWarning||null,this.legacy=v.legacy||!1,this.json=v.json||!1,this.listener=v.listener||null,this.maxDepth=typeof v.maxDepth=="number"?v.maxDepth:100,this.maxMergeSeqLength=typeof v.maxMergeSeqLength=="number"?v.maxMergeSeqLength:20,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=l.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function Ei(l,v){let x={name:l.filename,buffer:l.input.slice(0,-1),position:l.position,line:l.line,column:l.position-l.lineStart};return x.snippet=i(x),new n(v,x)}function B(l,v){throw Ei(l,v)}function $r(l,v){l.onWarning&&l.onWarning.call(null,Ei(l,v))}function St(l,v,x){let P=l.anchorMapTransactions;if(P.length!==0){let S=P[P.length-1];s.call(S,v)||(S[v]={existed:s.call(l.anchorMap,v),value:l.anchorMap[v]})}l.anchorMap[v]=x}function Es(l){l.anchorMapTransactions.push(Object.create(null))}function Qt(l){let v=l.anchorMapTransactions.pop(),x=l.anchorMapTransactions;if(x.length===0)return;let P=x[x.length-1],S=Object.keys(v);for(let N=0,h=S.length;N<h;N+=1){let w=S[N];s.call(P,w)||(P[w]=v[w])}}function Ps(l){let v=l.anchorMapTransactions.pop(),x=Object.keys(v);for(let P=x.length-1;P>=0;P-=1){let S=v[x[P]];S.existed?l.anchorMap[x[P]]=S.value:delete l.anchorMap[x[P]]}}function dn(l){return{position:l.position,line:l.line,lineStart:l.lineStart,lineIndent:l.lineIndent,firstTabInLine:l.firstTabInLine,tag:l.tag,anchor:l.anchor,kind:l.kind,result:l.result}}function xr(l,v){l.position=v.position,l.line=v.line,l.lineStart=v.lineStart,l.lineIndent=v.lineIndent,l.firstTabInLine=v.firstTabInLine,l.tag=v.tag,l.anchor=v.anchor,l.kind=v.kind,l.result=v.result}var Pi={YAML:function(v,x,P){v.version!==null&&B(v,"duplication of %YAML directive"),P.length!==1&&B(v,"YAML directive accepts exactly one argument");let S=/^([0-9]+)\.([0-9]+)$/.exec(P[0]);S===null&&B(v,"ill-formed argument of the YAML directive");let N=parseInt(S[1],10),h=parseInt(S[2],10);N!==1&&B(v,"unacceptable YAML version of the document"),v.version=P[0],v.checkLineBreaks=h<2,h!==1&&h!==2&&$r(v,"unsupported YAML version of the document")},TAG:function(v,x,P){let S;P.length!==2&&B(v,"TAG directive accepts exactly two arguments");let N=P[0];S=P[1],b.test(N)||B(v,"ill-formed tag handle (first argument) of the TAG directive"),s.call(v.tagMap,N)&&B(v,'there is a previously declared suffix for "'+N+'" tag handle'),L.test(S)||B(v,"ill-formed tag prefix (second argument) of the TAG directive");try{S=decodeURIComponent(S)}catch{B(v,"tag prefix is malformed: "+S)}v.tagMap[N]=S}};function ze(l,v,x,P){if(v<x){let S=l.input.slice(v,x);if(P)for(let N=0,h=S.length;N<h;N+=1){let w=S.charCodeAt(N);w===9||w>=32&&w<=1114111||B(l,"expected valid JSON character")}else g.test(S)&&B(l,"the stream contains non-printable characters");l.result+=S}}function Dt(l,v,x,P){r.isObject(x)||B(l,"cannot merge mappings; the provided source object is unacceptable");let S=Object.keys(x);for(let N=0,h=S.length;N<h;N+=1){let w=S[N];s.call(v,w)||(it(v,w,x[w]),P[w]=!0)}}function $t(l,v,x,P,S,N,h,w,R){if(Array.isArray(S)){S=Array.prototype.slice.call(S);for(let k=0,E=S.length;k<E;k+=1)Array.isArray(S[k])&&B(l,"nested arrays are not supported inside keys"),typeof S=="object"&&q(S[k])==="[object Object]"&&(S[k]="[object Object]")}if(typeof S=="object"&&q(S)==="[object Object]"&&(S="[object Object]"),S=String(S),v===null&&(v={}),P==="tag:yaml.org,2002:merge")if(Array.isArray(N)){N.length>l.maxMergeSeqLength&&B(l,"merge sequence length exceeded maxMergeSeqLength ("+l.maxMergeSeqLength+")");let k=new Set;for(let E=0,I=N.length;E<I;E+=1){let C=N[E];k.has(C)||(k.add(C),Dt(l,v,C,x))}}else Dt(l,v,N,x);else!l.json&&!s.call(x,S)&&s.call(v,S)&&(l.line=h||l.line,l.lineStart=w||l.lineStart,l.position=R||l.position,B(l,"duplicated mapping key")),it(v,S,N),delete x[S];return v}function kr(l){let v=l.input.charCodeAt(l.position);v===10?l.position++:v===13?(l.position++,l.input.charCodeAt(l.position)===10&&l.position++):B(l,"a line break is expected"),l.line+=1,l.lineStart=l.position,l.firstTabInLine=-1}function ye(l,v,x){let P=0,S=l.input.charCodeAt(l.position);for(;S!==0;){for(;T(S);)S===9&&l.firstTabInLine===-1&&(l.firstTabInLine=l.position),S=l.input.charCodeAt(++l.position);if(v&&S===35)do S=l.input.charCodeAt(++l.position);while(S!==10&&S!==13&&S!==0);if(A(S))for(kr(l),S=l.input.charCodeAt(l.position),P++,l.lineIndent=0;S===32;)l.lineIndent++,S=l.input.charCodeAt(++l.position);else break}return x!==-1&&P!==0&&l.lineIndent<x&&$r(l,"deficient indentation"),P}function Er(l){let v=l.position,x=l.input.charCodeAt(v);return!!((x===45||x===46)&&x===l.input.charCodeAt(v+1)&&x===l.input.charCodeAt(v+2)&&(v+=3,x=l.input.charCodeAt(v),x===0||M(x)))}function xt(l,v){v===1?l.result+=" ":v>1&&(l.result+=r.repeat(`
10
- `,v-1))}function Ci(l,v,x){let P,S,N,h,w,R,k=l.kind,E=l.result,I=l.input.charCodeAt(l.position);if(M(I)||X(I)||I===35||I===38||I===42||I===33||I===124||I===62||I===39||I===34||I===37||I===64||I===96)return!1;if(I===63||I===45){let C=l.input.charCodeAt(l.position+1);if(M(C)||x&&X(C))return!1}for(l.kind="scalar",l.result="",P=S=l.position,N=!1;I!==0;){if(I===58){let C=l.input.charCodeAt(l.position+1);if(M(C)||x&&X(C))break}else if(I===35){if(M(l.input.charCodeAt(l.position-1)))break}else{if(l.position===l.lineStart&&Er(l)||x&&X(I))break;if(A(I))if(h=l.line,w=l.lineStart,R=l.lineIndent,ye(l,!1,-1),l.lineIndent>=v){N=!0,I=l.input.charCodeAt(l.position);continue}else{l.position=S,l.line=h,l.lineStart=w,l.lineIndent=R;break}}N&&(ze(l,P,S,!1),xt(l,l.line-h),P=S=l.position,N=!1),T(I)||(S=l.position+1),I=l.input.charCodeAt(++l.position)}return ze(l,P,S,!1),l.result?!0:(l.kind=k,l.result=E,!1)}function Ii(l,v){let x,P,S=l.input.charCodeAt(l.position);if(S!==39)return!1;for(l.kind="scalar",l.result="",l.position++,x=P=l.position;(S=l.input.charCodeAt(l.position))!==0;)if(S===39)if(ze(l,x,l.position,!0),S=l.input.charCodeAt(++l.position),S===39)x=l.position,l.position++,P=l.position;else return!0;else A(S)?(ze(l,x,P,!0),xt(l,ye(l,!1,v)),x=P=l.position):l.position===l.lineStart&&Er(l)?B(l,"unexpected end of the document within a single quoted scalar"):(l.position++,T(S)||(P=l.position));B(l,"unexpected end of the stream within a single quoted scalar")}function hn(l,v){let x,P,S,N=l.input.charCodeAt(l.position);if(N!==34)return!1;for(l.kind="scalar",l.result="",l.position++,x=P=l.position;(N=l.input.charCodeAt(l.position))!==0;){if(N===34)return ze(l,x,l.position,!0),l.position++,!0;if(N===92){if(ze(l,x,l.position,!0),N=l.input.charCodeAt(++l.position),A(N))ye(l,!1,v);else if(N<256&&ot[N])l.result+=bt[N],l.position++;else if((S=Ie(N))>0){let h=S,w=0;for(;h>0;h--)N=l.input.charCodeAt(++l.position),(S=fe(N))>=0?w=(w<<4)+S:B(l,"expected hexadecimal character");l.result+=Re(w),l.position++}else B(l,"unknown escape sequence");x=P=l.position}else A(N)?(ze(l,x,P,!0),xt(l,ye(l,!1,v)),x=P=l.position):l.position===l.lineStart&&Er(l)?B(l,"unexpected end of the document within a double quoted scalar"):(l.position++,T(N)||(P=l.position))}B(l,"unexpected end of the stream within a double quoted scalar")}function Ri(l,v){let x=!0,P,S,N,h=l.tag,w,R=l.anchor,k,E,I,C,V=Object.create(null),j,U,z,re=l.input.charCodeAt(l.position);if(re===91)k=93,C=!1,w=[];else if(re===123)k=125,C=!0,w={};else return!1;for(l.anchor!==null&&St(l,l.anchor,w),re=l.input.charCodeAt(++l.position);re!==0;){if(ye(l,!0,v),re=l.input.charCodeAt(l.position),re===k)return l.position++,l.tag=h,l.anchor=R,l.kind=C?"mapping":"sequence",l.result=w,!0;x?re===44&&B(l,"expected the node content, but found ','"):B(l,"missed comma between flow collection entries"),U=j=z=null,E=I=!1,re===63&&M(l.input.charCodeAt(l.position+1))&&(E=I=!0,l.position++,ye(l,!0,v)),P=l.line,S=l.lineStart,N=l.position,Et(l,v,a,!1,!0),U=l.tag,j=l.result,ye(l,!0,v),re=l.input.charCodeAt(l.position),(I||l.line===P)&&re===58&&(E=!0,re=l.input.charCodeAt(++l.position),ye(l,!0,v),Et(l,v,a,!1,!0),z=l.result),C?$t(l,w,V,U,j,z,P,S,N):E?w.push($t(l,null,V,U,j,z,P,S,N)):w.push(j),ye(l,!0,v),re=l.input.charCodeAt(l.position),re===44?(x=!0,re=l.input.charCodeAt(++l.position)):x=!1}B(l,"unexpected end of the stream within a flow collection")}function Ni(l,v){let x,P=f,S=!1,N=!1,h=v,w=0,R=!1,k,E=l.input.charCodeAt(l.position);if(E===124)x=!1;else if(E===62)x=!0;else return!1;for(l.kind="scalar",l.result="";E!==0;)if(E=l.input.charCodeAt(++l.position),E===43||E===45)f===P?P=E===43?m:d:B(l,"repeat of a chomping mode identifier");else if((k=$e(E))>=0)k===0?B(l,"bad explicit indentation width of a block scalar; it cannot be less than one"):N?B(l,"repeat of an indentation width identifier"):(h=v+k-1,N=!0);else break;if(T(E)){do E=l.input.charCodeAt(++l.position);while(T(E));if(E===35)do E=l.input.charCodeAt(++l.position);while(!A(E)&&E!==0)}for(;E!==0;){for(kr(l),l.lineIndent=0,E=l.input.charCodeAt(l.position);(!N||l.lineIndent<h)&&E===32;)l.lineIndent++,E=l.input.charCodeAt(++l.position);if(!N&&l.lineIndent>h&&(h=l.lineIndent),A(E)){w++;continue}if(!N&&h===0&&B(l,"missing indentation for block scalar"),l.lineIndent<h){P===m?l.result+=r.repeat(`
11
- `,S?1+w:w):P===f&&S&&(l.result+=`
12
- `);break}x?T(E)?(R=!0,l.result+=r.repeat(`
13
- `,S?1+w:w)):R?(R=!1,l.result+=r.repeat(`
14
- `,w+1)):w===0?S&&(l.result+=" "):l.result+=r.repeat(`
15
- `,w):l.result+=r.repeat(`
16
- `,S?1+w:w),S=!0,N=!0,w=0;let I=l.position;for(;!A(E)&&E!==0;)E=l.input.charCodeAt(++l.position);ze(l,I,l.position,!1)}return!0}function kt(l,v){let x=l.tag,P=l.anchor,S=[],N=!1;if(l.firstTabInLine!==-1)return!1;l.anchor!==null&&St(l,l.anchor,S);let h=l.input.charCodeAt(l.position);for(;h!==0&&(l.firstTabInLine!==-1&&(l.position=l.firstTabInLine,B(l,"tab characters must not be used in indentation")),!(h!==45||!M(l.input.charCodeAt(l.position+1))));){if(N=!0,l.position++,ye(l,!0,-1)&&l.lineIndent<=v){S.push(null),h=l.input.charCodeAt(l.position);continue}let w=l.line;if(Et(l,v,c,!1,!0),S.push(l.result),ye(l,!0,-1),h=l.input.charCodeAt(l.position),(l.line===w||l.lineIndent>v)&&h!==0)B(l,"bad indentation of a sequence entry");else if(l.lineIndent<v)break}return N?(l.tag=x,l.anchor=P,l.kind="sequence",l.result=S,!0):!1}function Ti(l,v,x){let P,S,N,h,w=l.tag,R=l.anchor,k={},E=Object.create(null),I=null,C=null,V=null,j=!1,U=!1;if(l.firstTabInLine!==-1)return!1;l.anchor!==null&&St(l,l.anchor,k);let z=l.input.charCodeAt(l.position);for(;z!==0;){!j&&l.firstTabInLine!==-1&&(l.position=l.firstTabInLine,B(l,"tab characters must not be used in indentation"));let re=l.input.charCodeAt(l.position+1),ge=l.line;if((z===63||z===58)&&M(re))z===63?(j&&($t(l,k,E,I,C,null,S,N,h),I=C=V=null),U=!0,j=!0,P=!0):j?(j=!1,P=!0):B(l,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),l.position+=1,z=re;else{if(S=l.line,N=l.lineStart,h=l.position,!Et(l,x,u,!1,!0))break;if(l.line===ge){for(z=l.input.charCodeAt(l.position);T(z);)z=l.input.charCodeAt(++l.position);if(z===58)z=l.input.charCodeAt(++l.position),M(z)||B(l,"a whitespace character is expected after the key-value separator within a block mapping"),j&&($t(l,k,E,I,C,null,S,N,h),I=C=V=null),U=!0,j=!1,P=!1,I=l.tag,C=l.result;else if(U)B(l,"can not read an implicit mapping pair; a colon is missed");else return l.tag=w,l.anchor=R,!0}else if(U)B(l,"can not read a block mapping entry; a multiline key may not be an implicit key");else return l.tag=w,l.anchor=R,!0}if((l.line===ge||l.lineIndent>v)&&(j&&(S=l.line,N=l.lineStart,h=l.position),Et(l,v,p,!0,P)&&(j?C=l.result:V=l.result),j||($t(l,k,E,I,C,V,S,N,h),I=C=V=null),ye(l,!0,-1),z=l.input.charCodeAt(l.position)),(l.line===ge||l.lineIndent>v)&&z!==0)B(l,"bad indentation of a mapping entry");else if(l.lineIndent<v)break}return j&&$t(l,k,E,I,C,null,S,N,h),U&&(l.tag=w,l.anchor=R,l.kind="mapping",l.result=k),U}function Cs(l){let v=!1,x=!1,P,S,N=l.input.charCodeAt(l.position);if(N!==33)return!1;l.tag!==null&&B(l,"duplication of a tag property"),N=l.input.charCodeAt(++l.position),N===60?(v=!0,N=l.input.charCodeAt(++l.position)):N===33?(x=!0,P="!!",N=l.input.charCodeAt(++l.position)):P="!";let h=l.position;if(v){do N=l.input.charCodeAt(++l.position);while(N!==0&&N!==62);l.position<l.length?(S=l.input.slice(h,l.position),N=l.input.charCodeAt(++l.position)):B(l,"unexpected end of the stream within a verbatim tag")}else{for(;N!==0&&!M(N);)N===33&&(x?B(l,"tag suffix cannot contain exclamation marks"):(P=l.input.slice(h-1,l.position+1),b.test(P)||B(l,"named tag handle cannot contain such characters"),x=!0,h=l.position+1)),N=l.input.charCodeAt(++l.position);S=l.input.slice(h,l.position),_.test(S)&&B(l,"tag suffix cannot contain flow indicator characters")}S&&!L.test(S)&&B(l,"tag name cannot contain such characters: "+S);try{S=decodeURIComponent(S)}catch{B(l,"tag name is malformed: "+S)}return v?l.tag=S:s.call(l.tagMap,P)?l.tag=l.tagMap[P]+S:P==="!"?l.tag="!"+S:P==="!!"?l.tag="tag:yaml.org,2002:"+S:B(l,'undeclared tag handle "'+P+'"'),!0}function Ai(l){let v=l.input.charCodeAt(l.position);if(v!==38)return!1;l.anchor!==null&&B(l,"duplication of an anchor property"),v=l.input.charCodeAt(++l.position);let x=l.position;for(;v!==0&&!M(v)&&!X(v);)v=l.input.charCodeAt(++l.position);return l.position===x&&B(l,"name of an anchor node must contain at least one character"),l.anchor=l.input.slice(x,l.position),!0}function Oi(l){let v=l.input.charCodeAt(l.position);if(v!==42)return!1;v=l.input.charCodeAt(++l.position);let x=l.position;for(;v!==0&&!M(v)&&!X(v);)v=l.input.charCodeAt(++l.position);l.position===x&&B(l,"name of an alias node must contain at least one character");let P=l.input.slice(x,l.position);return s.call(l.anchorMap,P)||B(l,'unidentified alias "'+P+'"'),l.result=l.anchorMap[P],ye(l,!0,-1),!0}function Is(l,v,x,P){let S=dn(l);return Es(l),xr(l,v),l.tag=null,l.anchor=null,l.kind=null,l.result=null,Ti(l,x,P)&&l.kind==="mapping"?(Qt(l),!0):(Ps(l),xr(l,S),!1)}function Et(l,v,x,P,S){let N,h,w=1,R=!1,k=!1,E=null,I,C,V;l.depth>=l.maxDepth&&B(l,"nesting exceeded maxDepth ("+l.maxDepth+")"),l.depth+=1,l.listener!==null&&l.listener("open",l),l.tag=null,l.anchor=null,l.kind=null,l.result=null;let j=N=h=p===x||c===x;if(P&&ye(l,!0,-1)&&(R=!0,l.lineIndent>v?w=1:l.lineIndent===v?w=0:l.lineIndent<v&&(w=-1)),w===1)for(;;){let U=l.input.charCodeAt(l.position),z=dn(l);if(R&&(U===33&&l.tag!==null||U===38&&l.anchor!==null)||!Cs(l)&&!Ai(l))break;E===null&&(E=z),ye(l,!0,-1)?(R=!0,h=j,l.lineIndent>v?w=1:l.lineIndent===v?w=0:l.lineIndent<v&&(w=-1)):h=!1}if(h&&(h=R||S),w===1||p===x)if(a===x||u===x?C=v:C=v+1,V=l.position-l.lineStart,w===1)if(h&&(kt(l,V)||Ti(l,V,C))||Ri(l,C))k=!0;else{let U=l.input.charCodeAt(l.position);E!==null&&j&&!h&&U!==124&&U!==62&&Is(l,E,E.position-E.lineStart,C)||N&&Ni(l,C)||Ii(l,C)||hn(l,C)?k=!0:Oi(l)?(k=!0,(l.tag!==null||l.anchor!==null)&&B(l,"alias node should not have any properties")):Ci(l,C,a===x)&&(k=!0,l.tag===null&&(l.tag="?")),l.anchor!==null&&St(l,l.anchor,l.result)}else w===0&&(k=h&&kt(l,V));if(l.tag===null)l.anchor!==null&&St(l,l.anchor,l.result);else if(l.tag==="?"){l.result!==null&&l.kind!=="scalar"&&B(l,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+l.kind+'"');for(let U=0,z=l.implicitTypes.length;U<z;U+=1)if(I=l.implicitTypes[U],I.resolve(l.result)){l.result=I.construct(l.result),l.tag=I.tag,l.anchor!==null&&St(l,l.anchor,l.result);break}}else if(l.tag!=="!"){if(s.call(l.typeMap[l.kind||"fallback"],l.tag))I=l.typeMap[l.kind||"fallback"][l.tag];else{I=null;let U=l.typeMap.multi[l.kind||"fallback"];for(let z=0,re=U.length;z<re;z+=1)if(l.tag.slice(0,U[z].tag.length)===U[z].tag){I=U[z];break}}I||B(l,"unknown tag !<"+l.tag+">"),l.result!==null&&I.kind!==l.kind&&B(l,"unacceptable node kind for !<"+l.tag+'> tag; it should be "'+I.kind+'", not "'+l.kind+'"'),I.resolve(l.result,l.tag)?(l.result=I.construct(l.result,l.tag),l.anchor!==null&&St(l,l.anchor,l.result)):B(l,"cannot resolve a node with !<"+l.tag+"> explicit tag")}return l.listener!==null&&l.listener("close",l),l.depth-=1,l.tag!==null||l.anchor!==null||k}function Rs(l){let v=l.position,x=!1,P;for(l.version=null,l.checkLineBreaks=l.legacy,l.tagMap=Object.create(null),l.anchorMap=Object.create(null);(P=l.input.charCodeAt(l.position))!==0&&(ye(l,!0,-1),P=l.input.charCodeAt(l.position),!(l.lineIndent>0||P!==37));){x=!0,P=l.input.charCodeAt(++l.position);let S=l.position;for(;P!==0&&!M(P);)P=l.input.charCodeAt(++l.position);let N=l.input.slice(S,l.position),h=[];for(N.length<1&&B(l,"directive name must not be less than one character in length");P!==0;){for(;T(P);)P=l.input.charCodeAt(++l.position);if(P===35){do P=l.input.charCodeAt(++l.position);while(P!==0&&!A(P));break}if(A(P))break;for(S=l.position;P!==0&&!M(P);)P=l.input.charCodeAt(++l.position);h.push(l.input.slice(S,l.position))}P!==0&&kr(l),s.call(Pi,N)?Pi[N](l,N,h):$r(l,'unknown document directive "'+N+'"')}if(ye(l,!0,-1),l.lineIndent===0&&l.input.charCodeAt(l.position)===45&&l.input.charCodeAt(l.position+1)===45&&l.input.charCodeAt(l.position+2)===45?(l.position+=3,ye(l,!0,-1)):x&&B(l,"directives end mark is expected"),Et(l,l.lineIndent-1,p,!1,!0),ye(l,!0,-1),l.checkLineBreaks&&y.test(l.input.slice(v,l.position))&&$r(l,"non-ASCII line breaks are interpreted as content"),l.documents.push(l.result),l.position===l.lineStart&&Er(l)){l.input.charCodeAt(l.position)===46&&(l.position+=3,ye(l,!0,-1));return}l.position<l.length-1&&B(l,"end of the stream or a document separator is expected")}function Mi(l,v){l=String(l),v=v||{},l.length!==0&&(l.charCodeAt(l.length-1)!==10&&l.charCodeAt(l.length-1)!==13&&(l+=`
17
- `),l.charCodeAt(0)===65279&&(l=l.slice(1)));let x=new ae(l,v),P=l.indexOf("\0");for(P!==-1&&(x.position=P,B(x,"null byte is not allowed in input")),x.input+="\0";x.input.charCodeAt(x.position)===32;)x.lineIndent+=1,x.position+=1;for(;x.position<x.length-1;)Rs(x);return x.documents}function Li(l,v,x){v!==null&&typeof v=="object"&&typeof x>"u"&&(x=v,v=null);let P=Mi(l,x);if(typeof v!="function")return P;for(let S=0,N=P.length;S<N;S+=1)v(P[S])}function Ns(l,v){let x=Mi(l,v);if(x.length!==0){if(x.length===1)return x[0];throw new n("expected a single document in the stream, but found more")}}e.exports.loadAll=Li,e.exports.load=Ns})),rv=pe(((t,e)=>{var r=yn(),n=vn(),i=As(),o=Object.prototype.toString,s=Object.prototype.hasOwnProperty,a=65279,u=9,c=10,p=13,f=32,d=33,m=34,g=35,y=37,_=38,b=39,L=42,q=44,A=45,T=58,M=61,X=62,fe=63,Ie=64,$e=91,qe=93,Re=96,it=123,ot=124,bt=125,ae={};ae[0]="\\0",ae[7]="\\a",ae[8]="\\b",ae[9]="\\t",ae[10]="\\n",ae[11]="\\v",ae[12]="\\f",ae[13]="\\r",ae[27]="\\e",ae[34]='\\"',ae[92]="\\\\",ae[133]="\\N",ae[160]="\\_",ae[8232]="\\L",ae[8233]="\\P";var Ei=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],B=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function $r(h,w){if(w===null)return{};let R={},k=Object.keys(w);for(let E=0,I=k.length;E<I;E+=1){let C=k[E],V=String(w[C]);C.slice(0,2)==="!!"&&(C="tag:yaml.org,2002:"+C.slice(2));let j=h.compiledTypeMap.fallback[C];j&&s.call(j.styleAliases,V)&&(V=j.styleAliases[V]),R[C]=V}return R}function St(h){let w,R,k=h.toString(16).toUpperCase();if(h<=255)w="x",R=2;else if(h<=65535)w="u",R=4;else if(h<=4294967295)w="U",R=8;else throw new n("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+w+r.repeat("0",R-k.length)+k}var Es=1,Qt=2;function Ps(h){this.schema=h.schema||i,this.indent=Math.max(1,h.indent||2),this.noArrayIndent=h.noArrayIndent||!1,this.skipInvalid=h.skipInvalid||!1,this.flowLevel=r.isNothing(h.flowLevel)?-1:h.flowLevel,this.styleMap=$r(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==='"'?Qt:Es,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 dn(h,w){let R=r.repeat(" ",w),k=0,E="",I=h.length;for(;k<I;){let C,V=h.indexOf(`
18
- `,k);V===-1?(C=h.slice(k),k=I):(C=h.slice(k,V+1),k=V+1),C.length&&C!==`
19
- `&&(E+=R),E+=C}return E}function xr(h,w){return`
20
- `+r.repeat(" ",h.indent*w)}function Pi(h,w){for(let R=0,k=h.implicitTypes.length;R<k;R+=1)if(h.implicitTypes[R].resolve(w))return!0;return!1}function ze(h){return h===f||h===u}function Dt(h){return h>=32&&h<=126||h>=161&&h<=55295&&h!==8232&&h!==8233||h>=57344&&h<=65533&&h!==a||h>=65536&&h<=1114111}function $t(h){return Dt(h)&&h!==a&&h!==p&&h!==c}function kr(h,w,R){let k=$t(h),E=k&&!ze(h);return(R?k:k&&h!==q&&h!==$e&&h!==qe&&h!==it&&h!==bt)&&h!==g&&!(w===T&&!E)||$t(w)&&!ze(w)&&h===g||w===T&&E}function ye(h){return Dt(h)&&h!==a&&!ze(h)&&h!==A&&h!==fe&&h!==T&&h!==q&&h!==$e&&h!==qe&&h!==it&&h!==bt&&h!==g&&h!==_&&h!==L&&h!==d&&h!==ot&&h!==M&&h!==X&&h!==b&&h!==m&&h!==y&&h!==Ie&&h!==Re}function Er(h){return!ze(h)&&h!==T}function xt(h,w){let R=h.charCodeAt(w),k;return R>=55296&&R<=56319&&w+1<h.length&&(k=h.charCodeAt(w+1),k>=56320&&k<=57343)?(R-55296)*1024+k-56320+65536:R}function Ci(h){return/^\n* /.test(h)}var Ii=1,hn=2,Ri=3,Ni=4,kt=5;function Ti(h,w,R,k,E,I,C,V){let j,U=0,z=null,re=!1,ge=!1,xu=k!==-1,mn=-1,gn=ye(xt(h,0))&&Er(xt(h,h.length-1));if(w||C)for(j=0;j<h.length;U>=65536?j+=2:j++){if(U=xt(h,j),!Dt(U))return kt;gn=gn&&kr(U,z,V),z=U}else{for(j=0;j<h.length;U>=65536?j+=2:j++){if(U=xt(h,j),U===c)re=!0,xu&&(ge=ge||j-mn-1>k&&h[mn+1]!==" ",mn=j);else if(!Dt(U))return kt;gn=gn&&kr(U,z,V),z=U}ge=ge||xu&&j-mn-1>k&&h[mn+1]!==" "}return!re&&!ge?gn&&!C&&!E(h)?Ii:I===Qt?kt:hn:R>9&&Ci(h)?kt:C?I===Qt?kt:hn:ge?Ni:Ri}function Cs(h,w,R,k,E){h.dump=(function(){if(w.length===0)return h.quotingType===Qt?'""':"''";if(!h.noCompatMode&&(Ei.indexOf(w)!==-1||B.test(w)))return h.quotingType===Qt?'"'+w+'"':"'"+w+"'";let I=h.indent*Math.max(1,R),C=h.lineWidth===-1?-1:Math.max(Math.min(h.lineWidth,40),h.lineWidth-I),V=k||h.flowLevel>-1&&R>=h.flowLevel;function j(U){return Pi(h,U)}switch(Ti(w,V,h.indent,C,j,h.quotingType,h.forceQuotes&&!k,E)){case Ii:return w;case hn:return"'"+w.replace(/'/g,"''")+"'";case Ri:return"|"+Ai(w,h.indent)+Oi(dn(w,I));case Ni:return">"+Ai(w,h.indent)+Oi(dn(Is(w,C),I));case kt:return'"'+Rs(w,C)+'"';default:throw new n("impossible error: invalid scalar style")}})()}function Ai(h,w){let R=Ci(h)?String(w):"",k=h[h.length-1]===`
21
- `;return R+(k&&(h[h.length-2]===`
3
+ `+i.mark.snippet),a+" "+s):a}function n(i,o){Error.call(this),this.name="YAMLException",this.reason=i,this.mark=o,this.message=r(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n.prototype.toString=function(o){return this.name+": "+r(this,o)},e.exports=n})),cw=me(((t,e)=>{var r=Nn();function n(s,a,l,u,f){let p="",d="",m=Math.floor(f/2)-1;return u-a>m&&(p=" ... ",a=u-m+p.length),l-u>m&&(d=" ...",l=u+m-d.length),{str:p+s.slice(a,l).replace(/\t/g,"\u2192")+d,pos:u-a+p.length}}function i(s,a){return r.repeat(" ",a-s.length)+s}function o(s,a){if(a=Object.create(a||null),!s.buffer)return null;a.maxLength||(a.maxLength=79),typeof a.indent!="number"&&(a.indent=1),typeof a.linesBefore!="number"&&(a.linesBefore=3),typeof a.linesAfter!="number"&&(a.linesAfter=2);let l=/\r?\n|\r|\0/g,u=[0],f=[],p,d=-1;for(;p=l.exec(s.buffer);)f.push(p.index),u.push(p.index+p[0].length),s.position<=p.index&&d<0&&(d=u.length-2);d<0&&(d=u.length-1);let m="",g=Math.min(s.line+a.linesAfter,f.length).toString().length,y=a.maxLength-(a.indent+g+3);for(let w=1;w<=a.linesBefore&&!(d-w<0);w++){let R=n(s.buffer,u[d-w],f[d-w],s.position-(u[d]-u[d-w]),y);m=r.repeat(" ",a.indent)+i((s.line-w+1).toString(),g)+" | "+R.str+`
4
+ `+m}let v=n(s.buffer,u[d],f[d],s.position,y);m+=r.repeat(" ",a.indent)+i((s.line+1).toString(),g)+" | "+v.str+`
5
+ `,m+=r.repeat("-",a.indent+g+3+v.pos)+`^
6
+ `;for(let w=1;w<=a.linesAfter&&!(d+w>=f.length);w++){let R=n(s.buffer,u[d+w],f[d+w],s.position-(u[d]-u[d+w]),y);m+=r.repeat(" ",a.indent)+i((s.line+w+1).toString(),g)+" | "+R.str+`
7
+ `}return m.replace(/\n$/,"")}e.exports=o})),Fe=me(((t,e)=>{var r=Mn(),n=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];function o(a){let l={};return a!==null&&Object.keys(a).forEach(function(u){a[u].forEach(function(f){l[String(f)]=u})}),l}function s(a,l){if(l=l||{},Object.keys(l).forEach(function(u){if(n.indexOf(u)===-1)throw new r('Unknown option "'+u+'" is met in definition of "'+a+'" YAML type.')}),this.options=l,this.tag=a,this.kind=l.kind||null,this.resolve=l.resolve||function(){return!0},this.construct=l.construct||function(u){return u},this.instanceOf=l.instanceOf||null,this.predicate=l.predicate||null,this.represent=l.represent||null,this.representName=l.representName||null,this.defaultStyle=l.defaultStyle||null,this.multi=l.multi||!1,this.styleAliases=o(l.styleAliases||null),i.indexOf(this.kind)===-1)throw new r('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}e.exports=s})),op=me(((t,e)=>{var r=Mn(),n=Fe();function i(a,l){let u=[];return a[l].forEach(function(f){let p=u.length;u.forEach(function(d,m){d.tag===f.tag&&d.kind===f.kind&&d.multi===f.multi&&(p=m)}),u[p]=f}),u}function o(){let a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function l(u){u.multi?(a.multi[u.kind].push(u),a.multi.fallback.push(u)):a[u.kind][u.tag]=a.fallback[u.tag]=u}for(let u=0,f=arguments.length;u<f;u+=1)arguments[u].forEach(l);return a}function s(a){return this.extend(a)}s.prototype.extend=function(l){let u=[],f=[];if(l instanceof n)f.push(l);else if(Array.isArray(l))f=f.concat(l);else if(l&&(Array.isArray(l.implicit)||Array.isArray(l.explicit)))l.implicit&&(u=u.concat(l.implicit)),l.explicit&&(f=f.concat(l.explicit));else throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");u.forEach(function(d){if(!(d instanceof n))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(d.loadKind&&d.loadKind!=="scalar")throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(d.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),f.forEach(function(d){if(!(d instanceof n))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let p=Object.create(s.prototype);return p.implicit=(this.implicit||[]).concat(u),p.explicit=(this.explicit||[]).concat(f),p.compiledImplicit=i(p,"implicit"),p.compiledExplicit=i(p,"explicit"),p.compiledTypeMap=o(p.compiledImplicit,p.compiledExplicit),p},e.exports=s})),sp=me(((t,e)=>{e.exports=new(Fe())("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})})),ap=me(((t,e)=>{e.exports=new(Fe())("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})})),lp=me(((t,e)=>{e.exports=new(Fe())("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}})})),up=me(((t,e)=>{e.exports=new(op())({explicit:[sp(),ap(),lp()]})})),cp=me(((t,e)=>{var r=Fe();function n(s){if(s===null)return!0;let a=s.length;return a===1&&s==="~"||a===4&&(s==="null"||s==="Null"||s==="NULL")}function i(){return null}function o(s){return s===null}e.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:n,construct:i,predicate:o,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})})),pp=me(((t,e)=>{var r=Fe();function n(s){if(s===null)return!1;let a=s.length;return a===4&&(s==="true"||s==="True"||s==="TRUE")||a===5&&(s==="false"||s==="False"||s==="FALSE")}function i(s){return s==="true"||s==="True"||s==="TRUE"}function o(s){return Object.prototype.toString.call(s)==="[object Boolean]"}e.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:n,construct:i,predicate:o,represent:{lowercase:function(s){return s?"true":"false"},uppercase:function(s){return s?"TRUE":"FALSE"},camelcase:function(s){return s?"True":"False"}},defaultStyle:"lowercase"})})),fp=me(((t,e)=>{var r=Nn(),n=Fe();function i(p){return p>=48&&p<=57||p>=65&&p<=70||p>=97&&p<=102}function o(p){return p>=48&&p<=55}function s(p){return p>=48&&p<=57}function a(p){if(p===null)return!1;let d=p.length,m=0,g=!1;if(!d)return!1;let y=p[m];if((y==="-"||y==="+")&&(y=p[++m]),y==="0"){if(m+1===d)return!0;if(y=p[++m],y==="b"){for(m++;m<d;m++){if(y=p[m],y!=="0"&&y!=="1")return!1;g=!0}return g&&Number.isFinite(l(p))}if(y==="x"){for(m++;m<d;m++){if(!i(p.charCodeAt(m)))return!1;g=!0}return g&&Number.isFinite(l(p))}if(y==="o"){for(m++;m<d;m++){if(!o(p.charCodeAt(m)))return!1;g=!0}return g&&Number.isFinite(l(p))}}for(;m<d;m++){if(!s(p.charCodeAt(m)))return!1;g=!0}return g?Number.isFinite(l(p)):!1}function l(p){let d=p,m=1,g=d[0];if((g==="-"||g==="+")&&(g==="-"&&(m=-1),d=d.slice(1),g=d[0]),d==="0")return 0;if(g==="0"){if(d[1]==="b")return m*parseInt(d.slice(2),2);if(d[1]==="x")return m*parseInt(d.slice(2),16);if(d[1]==="o")return m*parseInt(d.slice(2),8)}return m*parseInt(d,10)}function u(p){return l(p)}function f(p){return Object.prototype.toString.call(p)==="[object Number]"&&p%1===0&&!r.isNegativeZero(p)}e.exports=new n("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:u,predicate:f,represent:{binary:function(p){return p>=0?"0b"+p.toString(2):"-0b"+p.toString(2).slice(1)},octal:function(p){return p>=0?"0o"+p.toString(8):"-0o"+p.toString(8).slice(1)},decimal:function(p){return p.toString(10)},hexadecimal:function(p){return p>=0?"0x"+p.toString(16).toUpperCase():"-0x"+p.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})})),dp=me(((t,e)=>{var r=Nn(),n=Fe(),i=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),o=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function s(p){return p===null||!i.test(p)?!1:Number.isFinite(parseFloat(p,10))?!0:o.test(p)}function a(p){let d=p.toLowerCase(),m=d[0]==="-"?-1:1;return"+-".indexOf(d[0])>=0&&(d=d.slice(1)),d===".inf"?m===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:d===".nan"?NaN:m*parseFloat(d,10)}var l=/^[-+]?[0-9]+e/;function u(p,d){if(isNaN(p))switch(d){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===p)switch(d){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===p)switch(d){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(p))return"-0.0";let m=p.toString(10);return l.test(m)?m.replace("e",".e"):m}function f(p){return Object.prototype.toString.call(p)==="[object Number]"&&(p%1!==0||r.isNegativeZero(p))}e.exports=new n("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:a,predicate:f,represent:u,defaultStyle:"lowercase"})})),hp=me(((t,e)=>{e.exports=up().extend({implicit:[cp(),pp(),fp(),dp()]})})),mp=me(((t,e)=>{e.exports=hp()})),gp=me(((t,e)=>{var r=Fe(),n=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function o(l){return l===null?!1:n.exec(l)!==null||i.exec(l)!==null}function s(l){let u=0,f=null,p=n.exec(l);if(p===null&&(p=i.exec(l)),p===null)throw new Error("Date resolve error");let d=+p[1],m=+p[2]-1,g=+p[3];if(!p[4])return new Date(Date.UTC(d,m,g));let y=+p[4],v=+p[5],w=+p[6];if(p[7]){for(u=p[7].slice(0,3);u.length<3;)u+="0";u=+u}if(p[9]){let O=+p[10],I=+(p[11]||0);f=(O*60+I)*6e4,p[9]==="-"&&(f=-f)}let R=new Date(Date.UTC(d,m,g,y,v,w,u));return f&&R.setTime(R.getTime()-f),R}function a(l){return l.toISOString()}e.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:o,construct:s,instanceOf:Date,represent:a})})),yp=me(((t,e)=>{var r=Fe();function n(i){return i==="<<"||i===null}e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:n})})),vp=me(((t,e)=>{var r=Fe(),n=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
8
+ \r`;function i(l){if(l===null)return!1;let u=0,f=l.length,p=n;for(let d=0;d<f;d++){let m=p.indexOf(l.charAt(d));if(!(m>64)){if(m<0)return!1;u+=6}}return u%8===0}function o(l){let u=l.replace(/[\r\n=]/g,""),f=u.length,p=n,d=0,m=[];for(let y=0;y<f;y++)y%4===0&&y&&(m.push(d>>16&255),m.push(d>>8&255),m.push(d&255)),d=d<<6|p.indexOf(u.charAt(y));let g=f%4*6;return g===0?(m.push(d>>16&255),m.push(d>>8&255),m.push(d&255)):g===18?(m.push(d>>10&255),m.push(d>>2&255)):g===12&&m.push(d>>4&255),new Uint8Array(m)}function s(l){let u="",f=0,p=l.length,d=n;for(let g=0;g<p;g++)g%3===0&&g&&(u+=d[f>>18&63],u+=d[f>>12&63],u+=d[f>>6&63],u+=d[f&63]),f=(f<<8)+l[g];let m=p%3;return m===0?(u+=d[f>>18&63],u+=d[f>>12&63],u+=d[f>>6&63],u+=d[f&63]):m===2?(u+=d[f>>10&63],u+=d[f>>4&63],u+=d[f<<2&63],u+=d[64]):m===1&&(u+=d[f>>2&63],u+=d[f<<4&63],u+=d[64],u+=d[64]),u}function a(l){return Object.prototype.toString.call(l)==="[object Uint8Array]"}e.exports=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:o,predicate:a,represent:s})})),wp=me(((t,e)=>{var r=Fe(),n=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function o(a){if(a===null)return!0;let l=[],u=a;for(let f=0,p=u.length;f<p;f+=1){let d=u[f],m=!1;if(i.call(d)!=="[object Object]")return!1;let g;for(g in d)if(n.call(d,g))if(!m)m=!0;else return!1;if(!m)return!1;if(l.indexOf(g)===-1)l.push(g);else return!1}return!0}function s(a){return a!==null?a:[]}e.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:o,construct:s})})),bp=me(((t,e)=>{var r=Fe(),n=Object.prototype.toString;function i(s){if(s===null)return!0;let a=s,l=new Array(a.length);for(let u=0,f=a.length;u<f;u+=1){let p=a[u];if(n.call(p)!=="[object Object]")return!1;let d=Object.keys(p);if(d.length!==1)return!1;l[u]=[d[0],p[d[0]]]}return!0}function o(s){if(s===null)return[];let a=s,l=new Array(a.length);for(let u=0,f=a.length;u<f;u+=1){let p=a[u],d=Object.keys(p);l[u]=[d[0],p[d[0]]]}return l}e.exports=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:o})})),_p=me(((t,e)=>{var r=Fe(),n=Object.prototype.hasOwnProperty;function i(s){if(s===null)return!0;let a=s;for(let l in a)if(n.call(a,l)&&a[l]!==null)return!1;return!0}function o(s){return s!==null?s:{}}e.exports=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:o})})),oa=me(((t,e)=>{e.exports=mp().extend({implicit:[gp(),yp()],explicit:[vp(),wp(),bp(),_p()]})})),pw=me(((t,e)=>{var r=Nn(),n=Mn(),i=cw(),o=oa(),s=Object.prototype.hasOwnProperty,a=1,l=2,u=3,f=4,p=1,d=2,m=3,g=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,y=/[\x85\u2028\u2029]/,v=/[,\[\]{}]/,w=/^(?:!|!!|![0-9A-Za-z-]+!)$/,R=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function O(c){return Object.prototype.toString.call(c)}function I(c){return c===10||c===13}function A(c){return c===9||c===32}function L(c){return c===9||c===32||c===10||c===13}function W(c){return c===44||c===91||c===93||c===123||c===125}function ie(c){if(c>=48&&c<=57)return c-48;let b=c|32;return b>=97&&b<=102?b-97+10:-1}function we(c){return c===120?2:c===117?4:c===85?8:0}function be(c){return c>=48&&c<=57?c-48:-1}function Re(c){switch(c){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
9
+ `;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 _e(c){return c<=65535?String.fromCharCode(c):String.fromCharCode((c-65536>>10)+55296,(c-65536&1023)+56320)}function Ge(c,b,S){b==="__proto__"?Object.defineProperty(c,b,{configurable:!0,enumerable:!0,writable:!0,value:S}):c[b]=S}var Je=new Array(256),Y=new Array(256);for(let c=0;c<256;c++)Je[c]=Re(c)?1:0,Y[c]=Re(c);function ue(c,b){this.input=c,this.filename=b.filename||null,this.schema=b.schema||o,this.onWarning=b.onWarning||null,this.legacy=b.legacy||!1,this.json=b.json||!1,this.listener=b.listener||null,this.maxDepth=typeof b.maxDepth=="number"?b.maxDepth:100,this.maxMergeSeqLength=typeof b.maxMergeSeqLength=="number"?b.maxMergeSeqLength:20,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=c.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function zi(c,b){let S={name:c.filename,buffer:c.input.slice(0,-1),position:c.position,line:c.line,column:c.position-c.lineStart};return S.snippet=i(S),new n(b,S)}function H(c,b){throw zi(c,b)}function Nr(c,b){c.onWarning&&c.onWarning.call(null,zi(c,b))}function Rt(c,b,S){let E=c.anchorMapTransactions;if(E.length!==0){let x=E[E.length-1];s.call(x,b)||(x[b]={existed:s.call(c.anchorMap,b),value:c.anchorMap[b]})}c.anchorMap[b]=S}function Qs(c){c.anchorMapTransactions.push(Object.create(null))}function ar(c){let b=c.anchorMapTransactions.pop(),S=c.anchorMapTransactions;if(S.length===0)return;let E=S[S.length-1],x=Object.keys(b);for(let M=0,h=x.length;M<h;M+=1){let _=x[M];s.call(E,_)||(E[_]=b[_])}}function Zs(c){let b=c.anchorMapTransactions.pop(),S=Object.keys(b);for(let E=S.length-1;E>=0;E-=1){let x=b[S[E]];x.existed?c.anchorMap[S[E]]=x.value:delete c.anchorMap[S[E]]}}function In(c){return{position:c.position,line:c.line,lineStart:c.lineStart,lineIndent:c.lineIndent,firstTabInLine:c.firstTabInLine,tag:c.tag,anchor:c.anchor,kind:c.kind,result:c.result}}function Mr(c,b){c.position=b.position,c.line=b.line,c.lineStart=b.lineStart,c.lineIndent=b.lineIndent,c.firstTabInLine=b.firstTabInLine,c.tag=b.tag,c.anchor=b.anchor,c.kind=b.kind,c.result=b.result}var Ui={YAML:function(b,S,E){b.version!==null&&H(b,"duplication of %YAML directive"),E.length!==1&&H(b,"YAML directive accepts exactly one argument");let x=/^([0-9]+)\.([0-9]+)$/.exec(E[0]);x===null&&H(b,"ill-formed argument of the YAML directive");let M=parseInt(x[1],10),h=parseInt(x[2],10);M!==1&&H(b,"unacceptable YAML version of the document"),b.version=E[0],b.checkLineBreaks=h<2,h!==1&&h!==2&&Nr(b,"unsupported YAML version of the document")},TAG:function(b,S,E){let x;E.length!==2&&H(b,"TAG directive accepts exactly two arguments");let M=E[0];x=E[1],w.test(M)||H(b,"ill-formed tag handle (first argument) of the TAG directive"),s.call(b.tagMap,M)&&H(b,'there is a previously declared suffix for "'+M+'" tag handle'),R.test(x)||H(b,"ill-formed tag prefix (second argument) of the TAG directive");try{x=decodeURIComponent(x)}catch{H(b,"tag prefix is malformed: "+x)}b.tagMap[M]=x}};function Ze(c,b,S,E){if(b<S){let x=c.input.slice(b,S);if(E)for(let M=0,h=x.length;M<h;M+=1){let _=x.charCodeAt(M);_===9||_>=32&&_<=1114111||H(c,"expected valid JSON character")}else g.test(x)&&H(c,"the stream contains non-printable characters");c.result+=x}}function Gt(c,b,S,E){r.isObject(S)||H(c,"cannot merge mappings; the provided source object is unacceptable");let x=Object.keys(S);for(let M=0,h=x.length;M<h;M+=1){let _=x[M];s.call(b,_)||(Ge(b,_,S[_]),E[_]=!0)}}function Tt(c,b,S,E,x,M,h,_,N){if(Array.isArray(x)){x=Array.prototype.slice.call(x);for(let k=0,C=x.length;k<C;k+=1)Array.isArray(x[k])&&H(c,"nested arrays are not supported inside keys"),typeof x=="object"&&O(x[k])==="[object Object]"&&(x[k]="[object Object]")}if(typeof x=="object"&&O(x)==="[object Object]"&&(x="[object Object]"),x=String(x),b===null&&(b={}),E==="tag:yaml.org,2002:merge")if(Array.isArray(M)){M.length>c.maxMergeSeqLength&&H(c,"merge sequence length exceeded maxMergeSeqLength ("+c.maxMergeSeqLength+")");let k=new Set;for(let C=0,T=M.length;C<T;C+=1){let P=M[C];k.has(P)||(k.add(P),Gt(c,b,P,S))}}else Gt(c,b,M,S);else!c.json&&!s.call(S,x)&&s.call(b,x)&&(c.line=h||c.line,c.lineStart=_||c.lineStart,c.position=N||c.position,H(c,"duplicated mapping key")),Ge(b,x,M),delete S[x];return b}function Or(c){let b=c.input.charCodeAt(c.position);b===10?c.position++:b===13?(c.position++,c.input.charCodeAt(c.position)===10&&c.position++):H(c,"a line break is expected"),c.line+=1,c.lineStart=c.position,c.firstTabInLine=-1}function $e(c,b,S){let E=0,x=c.input.charCodeAt(c.position);for(;x!==0;){for(;A(x);)x===9&&c.firstTabInLine===-1&&(c.firstTabInLine=c.position),x=c.input.charCodeAt(++c.position);if(b&&x===35)do x=c.input.charCodeAt(++c.position);while(x!==10&&x!==13&&x!==0);if(I(x))for(Or(c),x=c.input.charCodeAt(c.position),E++,c.lineIndent=0;x===32;)c.lineIndent++,x=c.input.charCodeAt(++c.position);else break}return S!==-1&&E!==0&&c.lineIndent<S&&Nr(c,"deficient indentation"),E}function Lr(c){let b=c.position,S=c.input.charCodeAt(b);return!!((S===45||S===46)&&S===c.input.charCodeAt(b+1)&&S===c.input.charCodeAt(b+2)&&(b+=3,S=c.input.charCodeAt(b),S===0||L(S)))}function At(c,b){b===1?c.result+=" ":b>1&&(c.result+=r.repeat(`
10
+ `,b-1))}function Gi(c,b,S){let E,x,M,h,_,N,k=c.kind,C=c.result,T=c.input.charCodeAt(c.position);if(L(T)||W(T)||T===35||T===38||T===42||T===33||T===124||T===62||T===39||T===34||T===37||T===64||T===96)return!1;if(T===63||T===45){let P=c.input.charCodeAt(c.position+1);if(L(P)||S&&W(P))return!1}for(c.kind="scalar",c.result="",E=x=c.position,M=!1;T!==0;){if(T===58){let P=c.input.charCodeAt(c.position+1);if(L(P)||S&&W(P))break}else if(T===35){if(L(c.input.charCodeAt(c.position-1)))break}else{if(c.position===c.lineStart&&Lr(c)||S&&W(T))break;if(I(T))if(h=c.line,_=c.lineStart,N=c.lineIndent,$e(c,!1,-1),c.lineIndent>=b){M=!0,T=c.input.charCodeAt(c.position);continue}else{c.position=x,c.line=h,c.lineStart=_,c.lineIndent=N;break}}M&&(Ze(c,E,x,!1),At(c,c.line-h),E=x=c.position,M=!1),A(T)||(x=c.position+1),T=c.input.charCodeAt(++c.position)}return Ze(c,E,x,!1),c.result?!0:(c.kind=k,c.result=C,!1)}function Ji(c,b){let S,E,x=c.input.charCodeAt(c.position);if(x!==39)return!1;for(c.kind="scalar",c.result="",c.position++,S=E=c.position;(x=c.input.charCodeAt(c.position))!==0;)if(x===39)if(Ze(c,S,c.position,!0),x=c.input.charCodeAt(++c.position),x===39)S=c.position,c.position++,E=c.position;else return!0;else I(x)?(Ze(c,S,E,!0),At(c,$e(c,!1,b)),S=E=c.position):c.position===c.lineStart&&Lr(c)?H(c,"unexpected end of the document within a single quoted scalar"):(c.position++,A(x)||(E=c.position));H(c,"unexpected end of the stream within a single quoted scalar")}function Rn(c,b){let S,E,x,M=c.input.charCodeAt(c.position);if(M!==34)return!1;for(c.kind="scalar",c.result="",c.position++,S=E=c.position;(M=c.input.charCodeAt(c.position))!==0;){if(M===34)return Ze(c,S,c.position,!0),c.position++,!0;if(M===92){if(Ze(c,S,c.position,!0),M=c.input.charCodeAt(++c.position),I(M))$e(c,!1,b);else if(M<256&&Je[M])c.result+=Y[M],c.position++;else if((x=we(M))>0){let h=x,_=0;for(;h>0;h--)M=c.input.charCodeAt(++c.position),(x=ie(M))>=0?_=(_<<4)+x:H(c,"expected hexadecimal character");c.result+=_e(_),c.position++}else H(c,"unknown escape sequence");S=E=c.position}else I(M)?(Ze(c,S,E,!0),At(c,$e(c,!1,b)),S=E=c.position):c.position===c.lineStart&&Lr(c)?H(c,"unexpected end of the document within a double quoted scalar"):(c.position++,A(M)||(E=c.position))}H(c,"unexpected end of the stream within a double quoted scalar")}function Ki(c,b){let S=!0,E,x,M,h=c.tag,_,N=c.anchor,k,C,T,P,q=Object.create(null),D,U,G,oe=c.input.charCodeAt(c.position);if(oe===91)k=93,P=!1,_=[];else if(oe===123)k=125,P=!0,_={};else return!1;for(c.anchor!==null&&Rt(c,c.anchor,_),oe=c.input.charCodeAt(++c.position);oe!==0;){if($e(c,!0,b),oe=c.input.charCodeAt(c.position),oe===k)return c.position++,c.tag=h,c.anchor=N,c.kind=P?"mapping":"sequence",c.result=_,!0;S?oe===44&&H(c,"expected the node content, but found ','"):H(c,"missed comma between flow collection entries"),U=D=G=null,C=T=!1,oe===63&&L(c.input.charCodeAt(c.position+1))&&(C=T=!0,c.position++,$e(c,!0,b)),E=c.line,x=c.lineStart,M=c.position,Mt(c,b,a,!1,!0),U=c.tag,D=c.result,$e(c,!0,b),oe=c.input.charCodeAt(c.position),(T||c.line===E)&&oe===58&&(C=!0,oe=c.input.charCodeAt(++c.position),$e(c,!0,b),Mt(c,b,a,!1,!0),G=c.result),P?Tt(c,_,q,U,D,G,E,x,M):C?_.push(Tt(c,null,q,U,D,G,E,x,M)):_.push(D),$e(c,!0,b),oe=c.input.charCodeAt(c.position),oe===44?(S=!0,oe=c.input.charCodeAt(++c.position)):S=!1}H(c,"unexpected end of the stream within a flow collection")}function Yi(c,b){let S,E=p,x=!1,M=!1,h=b,_=0,N=!1,k,C=c.input.charCodeAt(c.position);if(C===124)S=!1;else if(C===62)S=!0;else return!1;for(c.kind="scalar",c.result="";C!==0;)if(C=c.input.charCodeAt(++c.position),C===43||C===45)p===E?E=C===43?m:d:H(c,"repeat of a chomping mode identifier");else if((k=be(C))>=0)k===0?H(c,"bad explicit indentation width of a block scalar; it cannot be less than one"):M?H(c,"repeat of an indentation width identifier"):(h=b+k-1,M=!0);else break;if(A(C)){do C=c.input.charCodeAt(++c.position);while(A(C));if(C===35)do C=c.input.charCodeAt(++c.position);while(!I(C)&&C!==0)}for(;C!==0;){for(Or(c),c.lineIndent=0,C=c.input.charCodeAt(c.position);(!M||c.lineIndent<h)&&C===32;)c.lineIndent++,C=c.input.charCodeAt(++c.position);if(!M&&c.lineIndent>h&&(h=c.lineIndent),I(C)){_++;continue}if(!M&&h===0&&H(c,"missing indentation for block scalar"),c.lineIndent<h){E===m?c.result+=r.repeat(`
11
+ `,x?1+_:_):E===p&&x&&(c.result+=`
12
+ `);break}S?A(C)?(N=!0,c.result+=r.repeat(`
13
+ `,x?1+_:_)):N?(N=!1,c.result+=r.repeat(`
14
+ `,_+1)):_===0?x&&(c.result+=" "):c.result+=r.repeat(`
15
+ `,_):c.result+=r.repeat(`
16
+ `,x?1+_:_),x=!0,M=!0,_=0;let T=c.position;for(;!I(C)&&C!==0;)C=c.input.charCodeAt(++c.position);Ze(c,T,c.position,!1)}return!0}function Nt(c,b){let S=c.tag,E=c.anchor,x=[],M=!1;if(c.firstTabInLine!==-1)return!1;c.anchor!==null&&Rt(c,c.anchor,x);let h=c.input.charCodeAt(c.position);for(;h!==0&&(c.firstTabInLine!==-1&&(c.position=c.firstTabInLine,H(c,"tab characters must not be used in indentation")),!(h!==45||!L(c.input.charCodeAt(c.position+1))));){if(M=!0,c.position++,$e(c,!0,-1)&&c.lineIndent<=b){x.push(null),h=c.input.charCodeAt(c.position);continue}let _=c.line;if(Mt(c,b,u,!1,!0),x.push(c.result),$e(c,!0,-1),h=c.input.charCodeAt(c.position),(c.line===_||c.lineIndent>b)&&h!==0)H(c,"bad indentation of a sequence entry");else if(c.lineIndent<b)break}return M?(c.tag=S,c.anchor=E,c.kind="sequence",c.result=x,!0):!1}function Xi(c,b,S){let E,x,M,h,_=c.tag,N=c.anchor,k={},C=Object.create(null),T=null,P=null,q=null,D=!1,U=!1;if(c.firstTabInLine!==-1)return!1;c.anchor!==null&&Rt(c,c.anchor,k);let G=c.input.charCodeAt(c.position);for(;G!==0;){!D&&c.firstTabInLine!==-1&&(c.position=c.firstTabInLine,H(c,"tab characters must not be used in indentation"));let oe=c.input.charCodeAt(c.position+1),xe=c.line;if((G===63||G===58)&&L(oe))G===63?(D&&(Tt(c,k,C,T,P,null,x,M,h),T=P=q=null),U=!0,D=!0,E=!0):D?(D=!1,E=!0):H(c,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),c.position+=1,G=oe;else{if(x=c.line,M=c.lineStart,h=c.position,!Mt(c,S,l,!1,!0))break;if(c.line===xe){for(G=c.input.charCodeAt(c.position);A(G);)G=c.input.charCodeAt(++c.position);if(G===58)G=c.input.charCodeAt(++c.position),L(G)||H(c,"a whitespace character is expected after the key-value separator within a block mapping"),D&&(Tt(c,k,C,T,P,null,x,M,h),T=P=q=null),U=!0,D=!1,E=!1,T=c.tag,P=c.result;else if(U)H(c,"can not read an implicit mapping pair; a colon is missed");else return c.tag=_,c.anchor=N,!0}else if(U)H(c,"can not read a block mapping entry; a multiline key may not be an implicit key");else return c.tag=_,c.anchor=N,!0}if((c.line===xe||c.lineIndent>b)&&(D&&(x=c.line,M=c.lineStart,h=c.position),Mt(c,b,f,!0,E)&&(D?P=c.result:q=c.result),D||(Tt(c,k,C,T,P,q,x,M,h),T=P=q=null),$e(c,!0,-1),G=c.input.charCodeAt(c.position)),(c.line===xe||c.lineIndent>b)&&G!==0)H(c,"bad indentation of a mapping entry");else if(c.lineIndent<b)break}return D&&Tt(c,k,C,T,P,null,x,M,h),U&&(c.tag=_,c.anchor=N,c.kind="mapping",c.result=k),U}function ea(c){let b=!1,S=!1,E,x,M=c.input.charCodeAt(c.position);if(M!==33)return!1;c.tag!==null&&H(c,"duplication of a tag property"),M=c.input.charCodeAt(++c.position),M===60?(b=!0,M=c.input.charCodeAt(++c.position)):M===33?(S=!0,E="!!",M=c.input.charCodeAt(++c.position)):E="!";let h=c.position;if(b){do M=c.input.charCodeAt(++c.position);while(M!==0&&M!==62);c.position<c.length?(x=c.input.slice(h,c.position),M=c.input.charCodeAt(++c.position)):H(c,"unexpected end of the stream within a verbatim tag")}else{for(;M!==0&&!L(M);)M===33&&(S?H(c,"tag suffix cannot contain exclamation marks"):(E=c.input.slice(h-1,c.position+1),w.test(E)||H(c,"named tag handle cannot contain such characters"),S=!0,h=c.position+1)),M=c.input.charCodeAt(++c.position);x=c.input.slice(h,c.position),v.test(x)&&H(c,"tag suffix cannot contain flow indicator characters")}x&&!R.test(x)&&H(c,"tag name cannot contain such characters: "+x);try{x=decodeURIComponent(x)}catch{H(c,"tag name is malformed: "+x)}return b?c.tag=x:s.call(c.tagMap,E)?c.tag=c.tagMap[E]+x:E==="!"?c.tag="!"+x:E==="!!"?c.tag="tag:yaml.org,2002:"+x:H(c,'undeclared tag handle "'+E+'"'),!0}function Qi(c){let b=c.input.charCodeAt(c.position);if(b!==38)return!1;c.anchor!==null&&H(c,"duplication of an anchor property"),b=c.input.charCodeAt(++c.position);let S=c.position;for(;b!==0&&!L(b)&&!W(b);)b=c.input.charCodeAt(++c.position);return c.position===S&&H(c,"name of an anchor node must contain at least one character"),c.anchor=c.input.slice(S,c.position),!0}function Zi(c){let b=c.input.charCodeAt(c.position);if(b!==42)return!1;b=c.input.charCodeAt(++c.position);let S=c.position;for(;b!==0&&!L(b)&&!W(b);)b=c.input.charCodeAt(++c.position);c.position===S&&H(c,"name of an alias node must contain at least one character");let E=c.input.slice(S,c.position);return s.call(c.anchorMap,E)||H(c,'unidentified alias "'+E+'"'),c.result=c.anchorMap[E],$e(c,!0,-1),!0}function ta(c,b,S,E){let x=In(c);return Qs(c),Mr(c,b),c.tag=null,c.anchor=null,c.kind=null,c.result=null,Xi(c,S,E)&&c.kind==="mapping"?(ar(c),!0):(Zs(c),Mr(c,x),!1)}function Mt(c,b,S,E,x){let M,h,_=1,N=!1,k=!1,C=null,T,P,q;c.depth>=c.maxDepth&&H(c,"nesting exceeded maxDepth ("+c.maxDepth+")"),c.depth+=1,c.listener!==null&&c.listener("open",c),c.tag=null,c.anchor=null,c.kind=null,c.result=null;let D=M=h=f===S||u===S;if(E&&$e(c,!0,-1)&&(N=!0,c.lineIndent>b?_=1:c.lineIndent===b?_=0:c.lineIndent<b&&(_=-1)),_===1)for(;;){let U=c.input.charCodeAt(c.position),G=In(c);if(N&&(U===33&&c.tag!==null||U===38&&c.anchor!==null)||!ea(c)&&!Qi(c))break;C===null&&(C=G),$e(c,!0,-1)?(N=!0,h=D,c.lineIndent>b?_=1:c.lineIndent===b?_=0:c.lineIndent<b&&(_=-1)):h=!1}if(h&&(h=N||x),_===1||f===S)if(a===S||l===S?P=b:P=b+1,q=c.position-c.lineStart,_===1)if(h&&(Nt(c,q)||Xi(c,q,P))||Ki(c,P))k=!0;else{let U=c.input.charCodeAt(c.position);C!==null&&D&&!h&&U!==124&&U!==62&&ta(c,C,C.position-C.lineStart,P)||M&&Yi(c,P)||Ji(c,P)||Rn(c,P)?k=!0:Zi(c)?(k=!0,(c.tag!==null||c.anchor!==null)&&H(c,"alias node should not have any properties")):Gi(c,P,a===S)&&(k=!0,c.tag===null&&(c.tag="?")),c.anchor!==null&&Rt(c,c.anchor,c.result)}else _===0&&(k=h&&Nt(c,q));if(c.tag===null)c.anchor!==null&&Rt(c,c.anchor,c.result);else if(c.tag==="?"){c.result!==null&&c.kind!=="scalar"&&H(c,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+c.kind+'"');for(let U=0,G=c.implicitTypes.length;U<G;U+=1)if(T=c.implicitTypes[U],T.resolve(c.result)){c.result=T.construct(c.result),c.tag=T.tag,c.anchor!==null&&Rt(c,c.anchor,c.result);break}}else if(c.tag!=="!"){if(s.call(c.typeMap[c.kind||"fallback"],c.tag))T=c.typeMap[c.kind||"fallback"][c.tag];else{T=null;let U=c.typeMap.multi[c.kind||"fallback"];for(let G=0,oe=U.length;G<oe;G+=1)if(c.tag.slice(0,U[G].tag.length)===U[G].tag){T=U[G];break}}T||H(c,"unknown tag !<"+c.tag+">"),c.result!==null&&T.kind!==c.kind&&H(c,"unacceptable node kind for !<"+c.tag+'> tag; it should be "'+T.kind+'", not "'+c.kind+'"'),T.resolve(c.result,c.tag)?(c.result=T.construct(c.result,c.tag),c.anchor!==null&&Rt(c,c.anchor,c.result)):H(c,"cannot resolve a node with !<"+c.tag+"> explicit tag")}return c.listener!==null&&c.listener("close",c),c.depth-=1,c.tag!==null||c.anchor!==null||k}function ra(c){let b=c.position,S=!1,E;for(c.version=null,c.checkLineBreaks=c.legacy,c.tagMap=Object.create(null),c.anchorMap=Object.create(null);(E=c.input.charCodeAt(c.position))!==0&&($e(c,!0,-1),E=c.input.charCodeAt(c.position),!(c.lineIndent>0||E!==37));){S=!0,E=c.input.charCodeAt(++c.position);let x=c.position;for(;E!==0&&!L(E);)E=c.input.charCodeAt(++c.position);let M=c.input.slice(x,c.position),h=[];for(M.length<1&&H(c,"directive name must not be less than one character in length");E!==0;){for(;A(E);)E=c.input.charCodeAt(++c.position);if(E===35){do E=c.input.charCodeAt(++c.position);while(E!==0&&!I(E));break}if(I(E))break;for(x=c.position;E!==0&&!L(E);)E=c.input.charCodeAt(++c.position);h.push(c.input.slice(x,c.position))}E!==0&&Or(c),s.call(Ui,M)?Ui[M](c,M,h):Nr(c,'unknown document directive "'+M+'"')}if($e(c,!0,-1),c.lineIndent===0&&c.input.charCodeAt(c.position)===45&&c.input.charCodeAt(c.position+1)===45&&c.input.charCodeAt(c.position+2)===45?(c.position+=3,$e(c,!0,-1)):S&&H(c,"directives end mark is expected"),Mt(c,c.lineIndent-1,f,!1,!0),$e(c,!0,-1),c.checkLineBreaks&&y.test(c.input.slice(b,c.position))&&Nr(c,"non-ASCII line breaks are interpreted as content"),c.documents.push(c.result),c.position===c.lineStart&&Lr(c)){c.input.charCodeAt(c.position)===46&&(c.position+=3,$e(c,!0,-1));return}c.position<c.length-1&&H(c,"end of the stream or a document separator is expected")}function eo(c,b){c=String(c),b=b||{},c.length!==0&&(c.charCodeAt(c.length-1)!==10&&c.charCodeAt(c.length-1)!==13&&(c+=`
17
+ `),c.charCodeAt(0)===65279&&(c=c.slice(1)));let S=new ue(c,b),E=c.indexOf("\0");for(E!==-1&&(S.position=E,H(S,"null byte is not allowed in input")),S.input+="\0";S.input.charCodeAt(S.position)===32;)S.lineIndent+=1,S.position+=1;for(;S.position<S.length-1;)ra(S);return S.documents}function to(c,b,S){b!==null&&typeof b=="object"&&typeof S>"u"&&(S=b,b=null);let E=eo(c,S);if(typeof b!="function")return E;for(let x=0,M=E.length;x<M;x+=1)b(E[x])}function na(c,b){let S=eo(c,b);if(S.length!==0){if(S.length===1)return S[0];throw new n("expected a single document in the stream, but found more")}}e.exports.loadAll=to,e.exports.load=na})),fw=me(((t,e)=>{var r=Nn(),n=Mn(),i=oa(),o=Object.prototype.toString,s=Object.prototype.hasOwnProperty,a=65279,l=9,u=10,f=13,p=32,d=33,m=34,g=35,y=37,v=38,w=39,R=42,O=44,I=45,A=58,L=61,W=62,ie=63,we=64,be=91,Re=93,_e=96,Ge=123,Je=124,Y=125,ue={};ue[0]="\\0",ue[7]="\\a",ue[8]="\\b",ue[9]="\\t",ue[10]="\\n",ue[11]="\\v",ue[12]="\\f",ue[13]="\\r",ue[27]="\\e",ue[34]='\\"',ue[92]="\\\\",ue[133]="\\N",ue[160]="\\_",ue[8232]="\\L",ue[8233]="\\P";var zi=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],H=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Nr(h,_){if(_===null)return{};let N={},k=Object.keys(_);for(let C=0,T=k.length;C<T;C+=1){let P=k[C],q=String(_[P]);P.slice(0,2)==="!!"&&(P="tag:yaml.org,2002:"+P.slice(2));let D=h.compiledTypeMap.fallback[P];D&&s.call(D.styleAliases,q)&&(q=D.styleAliases[q]),N[P]=q}return N}function Rt(h){let _,N,k=h.toString(16).toUpperCase();if(h<=255)_="x",N=2;else if(h<=65535)_="u",N=4;else if(h<=4294967295)_="U",N=8;else throw new n("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+_+r.repeat("0",N-k.length)+k}var Qs=1,ar=2;function Zs(h){this.schema=h.schema||i,this.indent=Math.max(1,h.indent||2),this.noArrayIndent=h.noArrayIndent||!1,this.skipInvalid=h.skipInvalid||!1,this.flowLevel=r.isNothing(h.flowLevel)?-1:h.flowLevel,this.styleMap=Nr(this.schema,h.styles||null),this.sortKeys=h.sortKeys||!1,this.lineWidth=h.lineWidth||80,this.noRefs=h.noRefs||!1,this.noCompatMode=h.noCompatMode||!1,this.condenseFlow=h.condenseFlow||!1,this.quotingType=h.quotingType==='"'?ar:Qs,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 In(h,_){let N=r.repeat(" ",_),k=0,C="",T=h.length;for(;k<T;){let P,q=h.indexOf(`
18
+ `,k);q===-1?(P=h.slice(k),k=T):(P=h.slice(k,q+1),k=q+1),P.length&&P!==`
19
+ `&&(C+=N),C+=P}return C}function Mr(h,_){return`
20
+ `+r.repeat(" ",h.indent*_)}function Ui(h,_){for(let N=0,k=h.implicitTypes.length;N<k;N+=1)if(h.implicitTypes[N].resolve(_))return!0;return!1}function Ze(h){return h===p||h===l}function Gt(h){return h>=32&&h<=126||h>=161&&h<=55295&&h!==8232&&h!==8233||h>=57344&&h<=65533&&h!==a||h>=65536&&h<=1114111}function Tt(h){return Gt(h)&&h!==a&&h!==f&&h!==u}function Or(h,_,N){let k=Tt(h),C=k&&!Ze(h);return(N?k:k&&h!==O&&h!==be&&h!==Re&&h!==Ge&&h!==Y)&&h!==g&&!(_===A&&!C)||Tt(_)&&!Ze(_)&&h===g||_===A&&C}function $e(h){return Gt(h)&&h!==a&&!Ze(h)&&h!==I&&h!==ie&&h!==A&&h!==O&&h!==be&&h!==Re&&h!==Ge&&h!==Y&&h!==g&&h!==v&&h!==R&&h!==d&&h!==Je&&h!==L&&h!==W&&h!==w&&h!==m&&h!==y&&h!==we&&h!==_e}function Lr(h){return!Ze(h)&&h!==A}function At(h,_){let N=h.charCodeAt(_),k;return N>=55296&&N<=56319&&_+1<h.length&&(k=h.charCodeAt(_+1),k>=56320&&k<=57343)?(N-55296)*1024+k-56320+65536:N}function Gi(h){return/^\n* /.test(h)}var Ji=1,Rn=2,Ki=3,Yi=4,Nt=5;function Xi(h,_,N,k,C,T,P,q){let D,U=0,G=null,oe=!1,xe=!1,rp=k!==-1,Tn=-1,An=$e(At(h,0))&&Lr(At(h,h.length-1));if(_||P)for(D=0;D<h.length;U>=65536?D+=2:D++){if(U=At(h,D),!Gt(U))return Nt;An=An&&Or(U,G,q),G=U}else{for(D=0;D<h.length;U>=65536?D+=2:D++){if(U=At(h,D),U===u)oe=!0,rp&&(xe=xe||D-Tn-1>k&&h[Tn+1]!==" ",Tn=D);else if(!Gt(U))return Nt;An=An&&Or(U,G,q),G=U}xe=xe||rp&&D-Tn-1>k&&h[Tn+1]!==" "}return!oe&&!xe?An&&!P&&!C(h)?Ji:T===ar?Nt:Rn:N>9&&Gi(h)?Nt:P?T===ar?Nt:Rn:xe?Yi:Ki}function ea(h,_,N,k,C){h.dump=(function(){if(_.length===0)return h.quotingType===ar?'""':"''";if(!h.noCompatMode&&(zi.indexOf(_)!==-1||H.test(_)))return h.quotingType===ar?'"'+_+'"':"'"+_+"'";let T=h.indent*Math.max(1,N),P=h.lineWidth===-1?-1:Math.max(Math.min(h.lineWidth,40),h.lineWidth-T),q=k||h.flowLevel>-1&&N>=h.flowLevel;function D(U){return Ui(h,U)}switch(Xi(_,q,h.indent,P,D,h.quotingType,h.forceQuotes&&!k,C)){case Ji:return _;case Rn:return"'"+_.replace(/'/g,"''")+"'";case Ki:return"|"+Qi(_,h.indent)+Zi(In(_,T));case Yi:return">"+Qi(_,h.indent)+Zi(In(ta(_,P),T));case Nt:return'"'+ra(_,P)+'"';default:throw new n("impossible error: invalid scalar style")}})()}function Qi(h,_){let N=Gi(h)?String(_):"",k=h[h.length-1]===`
21
+ `;return N+(k&&(h[h.length-2]===`
22
22
  `||h===`
23
23
  `)?"+":k?"":"-")+`
24
- `}function Oi(h){return h[h.length-1]===`
25
- `?h.slice(0,-1):h}function Is(h,w){let R=/(\n+)([^\n]*)/g,k=(function(){let V=h.indexOf(`
26
- `);return V=V!==-1?V:h.length,R.lastIndex=V,Et(h.slice(0,V),w)})(),E=h[0]===`
27
- `||h[0]===" ",I,C;for(;C=R.exec(h);){let V=C[1],j=C[2];I=j[0]===" ",k+=V+(!E&&!I&&j!==""?`
28
- `:"")+Et(j,w),E=I}return k}function Et(h,w){if(h===""||h[0]===" ")return h;let R=/ [^ ]/g,k,E=0,I,C=0,V=0,j="";for(;k=R.exec(h);)V=k.index,V-E>w&&(I=C>E?C:V,j+=`
29
- `+h.slice(E,I),E=I+1),C=V;return j+=`
30
- `,h.length-E>w&&C>E?j+=h.slice(E,C)+`
31
- `+h.slice(C+1):j+=h.slice(E),j.slice(1)}function Rs(h){let w="",R=0;for(let k=0;k<h.length;R>=65536?k+=2:k++){R=xt(h,k);let E=ae[R];!E&&Dt(R)?(w+=h[k],R>=65536&&(w+=h[k+1])):w+=E||St(R)}return w}function Mi(h,w,R){let k="",E=h.tag;for(let I=0,C=R.length;I<C;I+=1){let V=R[I];h.replacer&&(V=h.replacer.call(R,String(I),V)),(x(h,w,V,!1,!1)||typeof V>"u"&&x(h,w,null,!1,!1))&&(k!==""&&(k+=","+(h.condenseFlow?"":" ")),k+=h.dump)}h.tag=E,h.dump="["+k+"]"}function Li(h,w,R,k){let E="",I=h.tag;for(let C=0,V=R.length;C<V;C+=1){let j=R[C];h.replacer&&(j=h.replacer.call(R,String(C),j)),(x(h,w+1,j,!0,!0,!1,!0)||typeof j>"u"&&x(h,w+1,null,!0,!0,!1,!0))&&((!k||E!=="")&&(E+=xr(h,w)),h.dump&&c===h.dump.charCodeAt(0)?E+="-":E+="- ",E+=h.dump)}h.tag=I,h.dump=E||"[]"}function Ns(h,w,R){let k="",E=h.tag,I=Object.keys(R);for(let C=0,V=I.length;C<V;C+=1){let j="";k!==""&&(j+=", "),h.condenseFlow&&(j+='"');let U=I[C],z=R[U];h.replacer&&(z=h.replacer.call(R,U,z)),x(h,w,U,!1,!1)&&(h.dump.length>1024&&(j+="? "),j+=h.dump+(h.condenseFlow?'"':"")+":"+(h.condenseFlow?"":" "),x(h,w,z,!1,!1)&&(j+=h.dump,k+=j))}h.tag=E,h.dump="{"+k+"}"}function l(h,w,R,k){let E="",I=h.tag,C=Object.keys(R);if(h.sortKeys===!0)C.sort();else if(typeof h.sortKeys=="function")C.sort(h.sortKeys);else if(h.sortKeys)throw new n("sortKeys must be a boolean or a function");for(let V=0,j=C.length;V<j;V+=1){let U="";(!k||E!=="")&&(U+=xr(h,w));let z=C[V],re=R[z];if(h.replacer&&(re=h.replacer.call(R,z,re)),!x(h,w+1,z,!0,!0,!0))continue;let ge=h.tag!==null&&h.tag!=="?"||h.dump&&h.dump.length>1024;ge&&(h.dump&&c===h.dump.charCodeAt(0)?U+="?":U+="? "),U+=h.dump,ge&&(U+=xr(h,w)),x(h,w+1,re,!0,ge)&&(h.dump&&c===h.dump.charCodeAt(0)?U+=":":U+=": ",U+=h.dump,E+=U)}h.tag=I,h.dump=E||"{}"}function v(h,w,R){let k=R?h.explicitTypes:h.implicitTypes;for(let E=0,I=k.length;E<I;E+=1){let C=k[E];if((C.instanceOf||C.predicate)&&(!C.instanceOf||typeof w=="object"&&w instanceof C.instanceOf)&&(!C.predicate||C.predicate(w))){if(R?C.multi&&C.representName?h.tag=C.representName(w):h.tag=C.tag:h.tag="?",C.represent){let V=h.styleMap[C.tag]||C.defaultStyle,j;if(o.call(C.represent)==="[object Function]")j=C.represent(w,V);else if(s.call(C.represent,V))j=C.represent[V](w,V);else throw new n("!<"+C.tag+'> tag resolver accepts not "'+V+'" style');h.dump=j}return!0}}return!1}function x(h,w,R,k,E,I,C){h.tag=null,h.dump=R,v(h,R,!1)||v(h,R,!0);let V=o.call(h.dump),j=k;k&&(k=h.flowLevel<0||h.flowLevel>w);let U=V==="[object Object]"||V==="[object Array]",z,re;if(U&&(z=h.duplicates.indexOf(R),re=z!==-1),(h.tag!==null&&h.tag!=="?"||re||h.indent!==2&&w>0)&&(E=!1),re&&h.usedDuplicates[z])h.dump="*ref_"+z;else{if(U&&re&&!h.usedDuplicates[z]&&(h.usedDuplicates[z]=!0),V==="[object Object]")k&&Object.keys(h.dump).length!==0?(l(h,w,h.dump,E),re&&(h.dump="&ref_"+z+h.dump)):(Ns(h,w,h.dump),re&&(h.dump="&ref_"+z+" "+h.dump));else if(V==="[object Array]")k&&h.dump.length!==0?(h.noArrayIndent&&!C&&w>0?Li(h,w-1,h.dump,E):Li(h,w,h.dump,E),re&&(h.dump="&ref_"+z+h.dump)):(Mi(h,w,h.dump),re&&(h.dump="&ref_"+z+" "+h.dump));else if(V==="[object String]")h.tag!=="?"&&Cs(h,h.dump,w,I,j);else{if(V==="[object Undefined]")return!1;if(h.skipInvalid)return!1;throw new n("unacceptable kind of an object to dump "+V)}if(h.tag!==null&&h.tag!=="?"){let ge=encodeURI(h.tag[0]==="!"?h.tag.slice(1):h.tag).replace(/!/g,"%21");h.tag[0]==="!"?ge="!"+ge:ge.slice(0,18)==="tag:yaml.org,2002:"?ge="!!"+ge.slice(18):ge="!<"+ge+">",h.dump=ge+" "+h.dump}}return!0}function P(h,w){let R=[],k=[];S(h,R,k);let E=k.length;for(let I=0;I<E;I+=1)w.duplicates.push(R[k[I]]);w.usedDuplicates=new Array(E)}function S(h,w,R){if(h!==null&&typeof h=="object"){let k=w.indexOf(h);if(k!==-1)R.indexOf(k)===-1&&R.push(k);else if(w.push(h),Array.isArray(h))for(let E=0,I=h.length;E<I;E+=1)S(h[E],w,R);else{let E=Object.keys(h);for(let I=0,C=E.length;I<C;I+=1)S(h[E[I]],w,R)}}}function N(h,w){w=w||{};let R=new Ps(w);R.noRefs||P(h,R);let k=h;return R.replacer&&(k=R.replacer.call({"":k},"",k)),x(R,0,k,!0,!0)?R.dump+`
32
- `:""}e.exports.dump=N})),Uu=Zy(pe(((t,e)=>{var r=tv(),n=rv();function i(o,s){return function(){throw new Error("Function yaml."+o+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}e.exports.Type=Me(),e.exports.Schema=Pu(),e.exports.FAILSAFE_SCHEMA=Nu(),e.exports.JSON_SCHEMA=Lu(),e.exports.CORE_SCHEMA=ju(),e.exports.DEFAULT_SCHEMA=As(),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.dump=n.dump,e.exports.YAMLException=vn(),e.exports.types={binary:qu(),float:Mu(),map:Ru(),null:Tu(),pairs:Bu(),set:Hu(),timestamp:Vu(),bool:Au(),int:Ou(),merge:Du(),omap:Fu(),seq:Iu(),str:Cu()},e.exports.safeLoad=i("safeLoad","load"),e.exports.safeLoadAll=i("safeLoadAll","loadAll"),e.exports.safeDump=i("safeDump","dump")}))(),1),{Type:vP,Schema:wP,FAILSAFE_SCHEMA:_P,JSON_SCHEMA:bP,CORE_SCHEMA:SP,DEFAULT_SCHEMA:$P,load:xP,loadAll:kP,dump:EP,YAMLException:PP,types:CP,safeLoad:IP,safeLoadAll:RP,safeDump:NP}=Uu.default,st=Uu.default});import{access as OP,readFile as zu}from"node:fs/promises";import{dirname as nv,relative as LP,resolve as be}from"node:path";async function qt(t){let e=be(t),r=await zu(e,"utf-8"),n=st.load(r);return iv(e,n)}function iv(t,e){let r=xe(t);return{...e,openapi:be(r,e.openapi),bindings:be(r,e.bindings),microContractsConfig:be(r,e.microContractsConfig),viewsDir:be(r,e.viewsDir),generated:{contractDir:be(r,e.generated.contractDir),actions:be(r,e.generated.actions),bridge:be(r,e.generated.bridge),reactDir:be(r,e.generated.reactDir)},runtimeModule:e.runtimeModule?be(r,e.runtimeModule):e.componentsModule?be(r,e.componentsModule):void 0,themeModule:e.themeModule?be(r,e.themeModule):void 0,design:e.design?{tokens:e.design.tokens?be(r,e.design.tokens):void 0,theme:e.design.theme?be(r,e.design.theme):void 0,extensionsCss:e.design.extensionsCss?be(r,e.design.extensionsCss):void 0}:void 0,extensions:e.extensions?be(r,e.extensions):void 0}}async function Wu(t){let e=await zu(be(t),"utf-8");return st.load(e)}function xe(t){return nv(be(t))}function ji(t){let e=t.design?.tokens,r=t.design?.theme;if(!e)throw new Error("view-contracts.config.yaml must define design.tokens (project tokens file path).");if(!r)throw new Error("view-contracts.config.yaml must define design.theme (project theme file path).");return{tokensPath:e,themePath:r}}var Pt=J(()=>{"use strict";Ir()});import{readFileSync as ov}from"node:fs";import{createRequire as sv}from"node:module";import{dirname as Os,resolve as av}from"node:path";import{fileURLToPath as lv}from"node:url";function ke(){if(Rr)return Rr;let t=sv(import.meta.url);try{return Rr=Os(t.resolve("view-contracts/package.json")),Rr}catch{let e=Os(lv(import.meta.url));for(;;){try{let n=av(e,"package.json");if(JSON.parse(ov(n,"utf8")).name==="view-contracts")return Rr=e,Rr}catch{}let r=Os(e);if(r===e)break;e=r}throw new Error("view-contracts package root not found")}}var Rr,Ft=J(()=>{"use strict"});function Gu(t){return Di[t]?.properties??[]}function Ku(t,e){let r=Di[e];return r?r.properties.includes(t):!1}var Vi,Di,Ct,qi,UP,It=J(()=>{"use strict";Vi={id:{type:"string",category:"identity",lowering:"attribute",description:"Stable identifier for tests and diff updates"},role:{type:"string",category:"identity",lowering:"attribute",enum:"role",description:"Accessibility semantics (not HTML tag names)"},label:{type:"string",category:"identity",lowering:"attribute",description:"Accessible name; required for IconButton"},visible:{type:"boolean",category:"state",lowering:"none",description:"Show or omit from render tree"},enabled:{type:"boolean",category:"state",lowering:"attribute"},selected:{type:"boolean",category:"state",lowering:"attribute"},checked:{type:"boolean",category:"state",lowering:"attribute"},readonly:{type:"boolean",category:"state",lowering:"attribute"},required:{type:"boolean",category:"state",lowering:"attribute"},width:{type:["string","number"],category:"size",lowering:"inline-css",enum:"widthSize",notes:"string: wrap|fill; number: fixed px/dp/pt; flex ratio uses weight property"},height:{type:["string","number"],category:"size",lowering:"inline-css",enum:"heightSize",notes:"string: wrap|fill; number: fixed px/dp/pt; flex ratio uses weight property"},minWidth:{type:"number",category:"size",lowering:"inline-css"},maxWidth:{type:["string","number"],category:"size",lowering:"inline-css",notes:"number or fill"},minHeight:{type:"number",category:"size",lowering:"inline-css"},maxHeight:{type:["string","number"],category:"size",lowering:"inline-css",notes:"number or fill"},aspectRatio:{type:"number",category:"size",lowering:"inline-css"},weight:{type:"number",category:"size",lowering:"inline-css",notes:"Flex ratio among Row/Column direct children; Spacer is the primary use case"},padding:{type:["string","number"],category:"spacing",lowering:"inline-css",notes:"space token or per-side"},gap:{type:["string","number"],category:"spacing",lowering:"inline-css"},align:{type:"string",category:"alignment",lowering:"inline-css",enum:"align"},justify:{type:"string",category:"alignment",lowering:"inline-css",enum:"justify"},selfAlign:{type:"string",category:"alignment",lowering:"inline-css",enum:"align"},contentAlign:{type:"string",category:"alignment",lowering:"inline-css",enum:"contentAlign"},axis:{type:"string",category:"direction",lowering:"inline-css",enum:"axis"},direction:{type:"string",category:"direction",lowering:"attribute",enum:"direction",description:"Text/layout direction; set at app or screen root, not per layout container"},scroll:{type:"string",category:"overflow",lowering:"inline-css",enum:"scroll"},background:{type:"string",category:"visual",lowering:"inline-css",notes:"color token"},foreground:{type:"string",category:"visual",lowering:"inline-css",notes:"color token"},border:{type:["string","object"],category:"visual",lowering:"inline-css",enum:"border",notes:"none|token|{width,color}"},separator:{type:"number",category:"visual",lowering:"inline-css",notes:"Row separator width in px/dp/pt (0=off)"},separatorColor:{type:"string",category:"visual",lowering:"inline-css",notes:"Row separator color token"},radius:{type:"string",category:"visual",lowering:"inline-css",notes:"radius token"},shadow:{type:"string",category:"visual",lowering:"inline-css",enum:"shadow"},opacity:{type:"number",category:"visual",lowering:"inline-css",notes:"0..1"},clip:{type:"string",category:"visual",lowering:"inline-css",enum:"clip"},textStyle:{type:"string",category:"text",lowering:"inline-css",notes:"typography token"},textAlign:{type:"string",category:"text",lowering:"inline-css",enum:"textAlign"},lineLimit:{type:["string","number"],category:"text",lowering:"inline-css",enum:"lineLimit"},textOverflow:{type:"string",category:"text",lowering:"inline-css",enum:"textOverflow"},fontWeight:{type:"string",category:"text",lowering:"inline-css",enum:"fontWeight"},size:{type:"number",category:"text",lowering:"inline-css",notes:"Font size shorthand (px/dp/pt)"},fit:{type:"string",category:"image",lowering:"inline-css",enum:"imageFit"},src:{type:"string",category:"image",lowering:"attribute",description:"Image source URL or asset reference"},alt:{type:"string",category:"image",lowering:"attribute",description:"Alternative text; not a source reference"},name:{type:"string",category:"image",lowering:"attribute",description:"Icon token or asset name in the renderer icon set"},onClick:{type:"action",category:"interaction",lowering:"none",description:"Action id, not arbitrary code"},onSubmit:{type:"action",category:"interaction",lowering:"none",description:"Form submit/validation action id"},onChange:{type:"action",category:"interaction",lowering:"none"},focusable:{type:"boolean",category:"interaction",lowering:"attribute"},autoFocus:{type:"boolean",category:"interaction",lowering:"attribute"},keyboardType:{type:"string",category:"interaction",lowering:"attribute",enum:"keyboardType"},value:{type:["string","number","boolean"],category:"data",lowering:"attribute"},binding:{type:"string",category:"data",lowering:"none",description:"ViewModel or form state field identifier"},placeholder:{type:"string",category:"data",lowering:"attribute"},options:{type:"array",category:"data",lowering:"none",notes:"array<{value,label}>"},error:{type:["string","null"],category:"validation",lowering:"none"},help:{type:["string","null"],category:"validation",lowering:"none"},variant:{type:"string",category:"visual",lowering:"class-name",notes:"design token variant"},theme:{type:"string",category:"visual",lowering:"class-name",notes:"active theme id for runtime theme switching"},display:{type:"string",category:"layout",lowering:"inline-css",notes:"CSS display value (grid, flex, etc.)"},gridTemplateColumns:{type:"string",category:"layout",lowering:"inline-css",notes:"CSS grid-template-columns"},flexDirection:{type:"string",category:"layout",lowering:"inline-css",notes:"CSS flex-direction"},alignItems:{type:"string",category:"alignment",lowering:"inline-css",notes:"CSS align-items"},margin:{type:["string","number"],category:"spacing",lowering:"inline-css",notes:"space token or per-side"},borderColor:{type:"string",category:"visual",lowering:"inline-css",notes:"border color token"},fontSize:{type:["string","number"],category:"text",lowering:"inline-css",notes:"CSS font-size"},flex:{type:"number",category:"size",lowering:"inline-css",description:"Flex grow ratio for proportional sizing in table columns/cells"},each:{type:"string",category:"data",lowering:"none",description:"Iterator variable name for data-bound row repetition"},source:{type:"string",category:"data",lowering:"none",description:"ViewModel array binding for data-driven elements"},headerVisible:{type:"boolean",category:"state",lowering:"attribute"}},Di={App:{description:"App root; holds theme/token/navigation context",tier:"core",category:"structure",notes:"Optional; not required for single-screen DSL",properties:["id","padding","direction","theme","variant"],children:{kind:"list",items:["Page"]}},Page:{description:"Screen root; viewport and safe-area boundary",tier:"core",category:"structure",properties:["id","visible","padding","direction","variant"],children:{kind:"list",items:["Column","Row","Stack","Box"]}},SafeArea:{description:"Insets for OS/browser safe areas",tier:"core",category:"structure",properties:["id","padding","variant"],children:{kind:"list",items:["Box","Column","Row"]}},Box:{description:"Single region; background, bounds, child placement",tier:"core",category:"layout",properties:["id","visible","width","height","minWidth","maxWidth","minHeight","maxHeight","padding","margin","gap","contentAlign","background","foreground","border","borderColor","radius","shadow","opacity","clip","selfAlign","display","gridTemplateColumns","flexDirection","variant"],children:{kind:"any"}},Row:{description:"Horizontal child layout",tier:"core",category:"layout",properties:["id","visible","gap","align","justify","padding","width","height","minWidth","maxWidth","minHeight","maxHeight","variant"],children:{kind:"any"}},Column:{description:"Vertical child layout",tier:"core",category:"layout",properties:["id","visible","gap","align","justify","padding","width","height","minWidth","maxWidth","minHeight","maxHeight","variant"],children:{kind:"any"}},Stack:{description:"Overlay children by z-order (not absolute positioning)",tier:"core",category:"layout",properties:["id","visible","gap","contentAlign","padding","width","height","background","variant"],children:{kind:"any"}},Spacer:{description:"Occupies remaining flex space",tier:"core",category:"layout",notes:"Direct child of Row/Column only",properties:["id","width","height","weight","variant"],children:{kind:"none"}},Divider:{description:"Horizontal or vertical separator",tier:"core",category:"layout",properties:["id","axis","variant"],children:{kind:"none"}},ScrollArea:{description:"Internal scroll boundary",tier:"core",category:"scroll",properties:["id","axis","scroll","width","height","minHeight","maxHeight","padding","variant"],children:{kind:"single"}},List:{description:"Homogeneous list of items",tier:"core",category:"scroll",properties:["id","gap","axis","role","visible","variant"],children:{kind:"list",items:["ListItem"]}},ListItem:{description:"One row/cell in a list",tier:"core",category:"scroll",properties:["id","selected","padding","gap","role","visible","variant"],children:{kind:"any"}},Text:{description:"Text display",tier:"core",category:"text",properties:["id","visible","textStyle","textAlign","lineLimit","textOverflow","fontWeight","fontSize","size","foreground","background","opacity","padding","radius","display","alignItems","role","variant"],children:{kind:"text"}},Link:{description:"Navigable text or region",tier:"optional",category:"text",properties:["id","visible","onClick","label","foreground","role","variant"],children:{kind:"text"}},Image:{description:"Image display",tier:"core",category:"media",properties:["id","visible","src","fit","alt","width","height","aspectRatio","radius","variant"],children:{kind:"none"}},Icon:{description:"Icon display; asset set referenced by name token at renderer",tier:"core",category:"media",properties:["id","visible","name","alt","foreground","opacity","variant"],children:{kind:"none"}},Button:{description:"Pressable action; label or children required (label is a11y name when both present)",tier:"core",category:"input",properties:["id","visible","enabled","onClick","label","foreground","background","radius","padding","shadow","border","borderColor","fontWeight","fontSize","variant","role"],children:{kind:"list",items:["Text","Icon","Row"]}},IconButton:{description:"Icon-primary button; label required for accessibility",tier:"optional",category:"input",properties:["id","visible","enabled","onClick","label","foreground","background","radius","padding","variant"],children:{kind:"list",items:["Icon"]}},TextInput:{description:"Single-line text input",tier:"core",category:"input",properties:["id","visible","enabled","readonly","required","value","binding","placeholder","onChange","error","help","keyboardType","focusable","autoFocus","width","label","foreground","background","radius","padding","border","borderColor","minHeight","fontSize","variant"],children:{kind:"none"}},TextArea:{description:"Multi-line text input",tier:"core",category:"input",properties:["id","visible","enabled","readonly","required","value","binding","placeholder","onChange","error","help","focusable","width","minHeight","label","foreground","background","radius","padding","border","borderColor","fontSize","variant"],children:{kind:"none"}},Select:{description:"Single selection",tier:"core",category:"input",properties:["id","visible","enabled","required","value","binding","options","onChange","error","help","width","label","foreground","background","radius","padding","border","borderColor","minHeight","fontSize","variant"],children:{kind:"none"}},Checkbox:{description:"Boolean or multi-select toggle",tier:"core",category:"input",properties:["id","visible","enabled","checked","required","binding","label","onChange","variant"],children:{kind:"none"}},Radio:{description:"Single choice in a group (use Row/Column to group; binding identifies group)",tier:"core",category:"input",notes:"RadioGroup is expressed via layout Group, not a separate element",properties:["id","visible","enabled","checked","binding","label","value","onChange","variant"],children:{kind:"none"}},Switch:{description:"On/off toggle",tier:"core",category:"input",properties:["id","visible","enabled","checked","binding","label","onChange","variant"],children:{kind:"none"}},Form:{description:"Input group submit/validation boundary",tier:"core",category:"form",properties:["id","visible","gap","onSubmit","variant"],children:{kind:"any"}},Field:{description:"label/help/error/input unit",tier:"core",category:"form",properties:["id","visible","label","help","error","required","gap","variant"],children:{kind:"any"}},Modal:{description:"Primary transient dialog",tier:"core",category:"overlay",notes:"Direct child of Page or App; role defaults to dialog at renderer",properties:["id","visible","role","autoFocus","variant"],children:{kind:"list",items:["Box","Column"]}},Drawer:{description:"Edge panel overlay",tier:"extension",category:"overlay",notes:"Placement limited to start/end/bottom at renderer",properties:["id","visible","variant"],children:{kind:"list",items:["Box","Column"]}},Popover:{description:"Small anchored panel",tier:"extension",category:"overlay",properties:["id","visible","variant"],children:{kind:"list",items:["Box","Column"]}},Tooltip:{description:"Supplementary description",tier:"extension",category:"overlay",properties:["id","visible","label","variant"],children:{kind:"text"}},Progress:{description:"Determinate progress",tier:"core",category:"feedback",properties:["id","visible","value","variant"],children:{kind:"none"}},Spinner:{description:"Indeterminate loading",tier:"core",category:"feedback",properties:["id","visible","variant"],children:{kind:"none"}},Table:{description:"Data table with header and repeated rows",tier:"core",category:"data",properties:["id","visible","source","gap","border","borderColor","separator","separatorColor","variant"],children:{kind:"list",items:["TableHeader","TableRow"]}},TableHeader:{description:"Table header row defining column labels",tier:"core",category:"data",properties:["height","border","borderColor","background","alignItems","variant"],children:{kind:"list",items:["TableColumn"]}},TableColumn:{description:"Header cell definition; children override label text",tier:"core",category:"data",properties:["label","width","flex","align","border","borderColor","padding","fontSize","fontWeight","foreground","variant"],children:{kind:"any"}},TableRow:{description:"Row template repeated for each source item",tier:"core",category:"data",properties:["each","height","border","borderColor","alignItems","variant"],children:{kind:"list",items:["TableCell"]}},TableCell:{description:"Data cell; children define cell content",tier:"core",category:"data",properties:["width","flex","align","border","borderColor","padding","fontSize","foreground","variant"],children:{kind:"any"}}},Ct=new Set(Object.keys(Di)),qi=new Set(Object.entries(Vi).filter(([,t])=>t.lowering==="inline-css").map(([t])=>t)),UP=new Set(Object.entries(Vi).filter(([,t])=>t.lowering==="class-name").map(([t])=>t))});import{readFile as cv}from"node:fs/promises";async function Fi(t){return st.load(await cv(t,"utf-8"))}function Ju(t,e,r){for(let n of t)if(!e.has(n))throw new Error(`${r}: unknown element "${n}" \u2014 not in spec/ui-dsl.schema.json vocabulary`)}function Yu(t,e,r){for(let[n,i]of Object.entries(t))for(let o of e)if(i[o]===void 0||i[o]===null||i[o]==="")throw new Error(`${r}: element "${n}" is missing required "${String(o)}"`)}var Ms=J(()=>{"use strict";Ir()});import{resolve as uv}from"node:path";function fv(t){Ju(Object.keys(t.elements),Ct,Xu),Yu(t.elements,["tag"],Xu)}async function js(t){if(!t&&Ls)return Ls;let e=t??uv(ke(),"renderers/react/elements.yaml"),r=await Fi(e);return fv(r),t||(Ls=r),r}var Xu,Ls,Qu=J(()=>{"use strict";It();It();Ft();Ms();Xu="renderers/react/elements.yaml",Ls=null});function Zu(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t}function ef(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 tf=J(()=>{"use strict"});function at(t){return`${t}px`}function Nr(t){let e=t.match(/^\{([^}]+)\}$/);if(e)return`var(--${e[1].replace(/\./g,"-")})`}function Vs(t){let e={},r=t.width;typeof r=="number"?e.width=at(r):r==="fill"?e.width="100%":typeof r=="string"&&r!=="wrap"&&(e.width=r),typeof t.minWidth=="number"&&(e.minWidth=at(t.minWidth));let n=t.maxWidth;typeof n=="number"?e.maxWidth=at(n):n==="fill"&&(e.maxWidth="100%");let i=t.height;typeof i=="number"?e.height=at(i):i==="fill"?e.height="100%":typeof i=="string"&&i!=="wrap"&&(e.height=i),typeof t.minHeight=="number"&&(e.minHeight=at(t.minHeight));let o=t.maxHeight;typeof o=="number"?e.maxHeight=at(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=at(t.padding)),typeof t.margin=="number"&&(e.margin=at(t.margin)),typeof t.gap=="number"&&(e.gap=at(t.gap));let a=t.textAlign;typeof a=="string"&&(e.textAlign=a==="start"?"left":a==="end"?"right":a);let u=t.contentAlign;typeof u=="string"&&u in rf&&(e.placeItems=rf[u]),typeof t.overflow=="string"&&(e.overflow=t.overflow);let c=t.selfAlign;typeof c=="string"&&(e.alignSelf=c==="start"?"flex-start":c==="end"?"flex-end":c);let p=t.size;typeof p=="number"?e.fontSize=at(p):typeof p=="string"&&(e.fontSize=p);let f=typeof s=="string"?s:t.fontWeight;typeof f=="string"&&(e.fontWeight=f);let d=t.background;typeof d=="string"&&(e.background=Nr(d)??d);let m=t.foreground;typeof m=="string"&&(e.color=Nr(m)??m);let g=t.radius;typeof g=="number"?e.borderRadius=at(g):typeof g=="string"&&(e.borderRadius=Nr(g)??g);let y=t.shadow;y===!0?e.boxShadow="var(--ui-shadow)":y===!1?e.boxShadow="none":typeof y=="string"&&(e.boxShadow=pv[y]??Nr(y)??y);let _=t.border;typeof _=="string"&&(e.border=Nr(_)??_),typeof t.opacity=="number"&&(e.opacity=t.opacity);let b=t.clip;typeof b=="string"&&(e.overflow=b==="hidden"?"hidden":b);let L=t.align;if(typeof L=="string"){let M=Zu(L);M&&(e.alignItems=M)}let q=t.justify;if(typeof q=="string"){let M=ef(q);M&&(e.justifyContent=M)}typeof t.display=="string"&&(e.display=t.display),typeof t.gridTemplateColumns=="string"&&(e.gridTemplateColumns=t.gridTemplateColumns),typeof t.flexDirection=="string"&&(e.flexDirection=t.flexDirection),typeof t.alignItems=="string"&&(e.alignItems=t.alignItems);let A=t.borderColor;typeof A=="string"&&(e.borderColor=Nr(A)??A);let T=t.flex;return typeof T=="number"&&(e.flex=T),e}function wn(t){let e=Object.entries(t);return e.length===0?"":`style={{ ${e.map(([n,i])=>typeof i=="number"?`${n}: ${i}`:`${n}: ${JSON.stringify(i)}`).join(", ")} }}`}var rf,pv,Ds=J(()=>{"use strict";tf();rf={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"},pv={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 Bi(t,e){let r=t[e];if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="object"&&"kind"in r&&r.kind==="literal")return r.value}}function dv(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 hv(t){let e={};for(let[r,n]of Object.entries(t)){if(!qi.has(r))continue;dv(r,n);let i=Bi(t,r);i!==void 0&&(e[r]=i)}return e}function mv(t){return t.flex?{display:"flex",flexDirection:t.flex==="column"?"column":"row"}:{}}function gv(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 nf(t,e){let r=hv(e),n=Vs(r);if(n={...n,...mv(t)},t.tableCell){if("alignItems"in n){let i=String(n.alignItems);n.textAlign=i==="flex-end"?"right":i==="center"?"center":"left",delete n.alignItems}"width"in n&&!("flex"in n)&&(n.flexShrink=0,n.flexGrow=0)}if(t.scrollContainer){let i=Bi(e,"scroll"),o=Bi(e,"axis"),s=typeof i=="string"?i:typeof o=="string"?o==="horizontal"?"horizontal":"vertical":void 0;if(s)return n={...n,...gv(s)},wn(n);throw new Error("ScrollArea scroll/axis must be compile-time literals")}if(t.flexGrowProp&&e[t.flexGrowProp]){let i=Bi(e,t.flexGrowProp);if(typeof i=="number")return n.flexGrow=i,wn(n);throw new Error(`"${t.flexGrowProp}" on <Spacer> must be a compile-time literal`)}return wn(n)}var of=J(()=>{"use strict";It();Ds();Ds()});function G(t){return" ".repeat(t)}function er(t,e="vm"){let r=t.scope??e;return t.path?`${r}.${t.path}`:r}function uf(t){return t.parts.map(e=>typeof e=="string"?e:`\${${er(e)}}`).join("")}function yv(t){return`\`${uf(t)}\``}function Hi(t,e=!1){let r=e?" as ActionDescriptor":"";if(!t.params||Object.keys(t.params).length===0)return`{ name: ${JSON.stringify(t.name)} }${r}`;let n=Object.entries(t.params).map(([i,o])=>`${i}: ${Ar(o,0)}`).join(", ");return`{ name: ${JSON.stringify(t.name)}, params: { ${n} } }${r}`}function Fs(t,e,r=!1){if(t===null)return"null";if(typeof t=="string")return JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t))return`[
33
- ${t.map(n=>`${G(e+1)}${Fs(n,e+1,r)}`).join(`,
24
+ `}function Zi(h){return h[h.length-1]===`
25
+ `?h.slice(0,-1):h}function ta(h,_){let N=/(\n+)([^\n]*)/g,k=(function(){let q=h.indexOf(`
26
+ `);return q=q!==-1?q:h.length,N.lastIndex=q,Mt(h.slice(0,q),_)})(),C=h[0]===`
27
+ `||h[0]===" ",T,P;for(;P=N.exec(h);){let q=P[1],D=P[2];T=D[0]===" ",k+=q+(!C&&!T&&D!==""?`
28
+ `:"")+Mt(D,_),C=T}return k}function Mt(h,_){if(h===""||h[0]===" ")return h;let N=/ [^ ]/g,k,C=0,T,P=0,q=0,D="";for(;k=N.exec(h);)q=k.index,q-C>_&&(T=P>C?P:q,D+=`
29
+ `+h.slice(C,T),C=T+1),P=q;return D+=`
30
+ `,h.length-C>_&&P>C?D+=h.slice(C,P)+`
31
+ `+h.slice(P+1):D+=h.slice(C),D.slice(1)}function ra(h){let _="",N=0;for(let k=0;k<h.length;N>=65536?k+=2:k++){N=At(h,k);let C=ue[N];!C&&Gt(N)?(_+=h[k],N>=65536&&(_+=h[k+1])):_+=C||Rt(N)}return _}function eo(h,_,N){let k="",C=h.tag;for(let T=0,P=N.length;T<P;T+=1){let q=N[T];h.replacer&&(q=h.replacer.call(N,String(T),q)),(S(h,_,q,!1,!1)||typeof q>"u"&&S(h,_,null,!1,!1))&&(k!==""&&(k+=","+(h.condenseFlow?"":" ")),k+=h.dump)}h.tag=C,h.dump="["+k+"]"}function to(h,_,N,k){let C="",T=h.tag;for(let P=0,q=N.length;P<q;P+=1){let D=N[P];h.replacer&&(D=h.replacer.call(N,String(P),D)),(S(h,_+1,D,!0,!0,!1,!0)||typeof D>"u"&&S(h,_+1,null,!0,!0,!1,!0))&&((!k||C!=="")&&(C+=Mr(h,_)),h.dump&&u===h.dump.charCodeAt(0)?C+="-":C+="- ",C+=h.dump)}h.tag=T,h.dump=C||"[]"}function na(h,_,N){let k="",C=h.tag,T=Object.keys(N);for(let P=0,q=T.length;P<q;P+=1){let D="";k!==""&&(D+=", "),h.condenseFlow&&(D+='"');let U=T[P],G=N[U];h.replacer&&(G=h.replacer.call(N,U,G)),S(h,_,U,!1,!1)&&(h.dump.length>1024&&(D+="? "),D+=h.dump+(h.condenseFlow?'"':"")+":"+(h.condenseFlow?"":" "),S(h,_,G,!1,!1)&&(D+=h.dump,k+=D))}h.tag=C,h.dump="{"+k+"}"}function c(h,_,N,k){let C="",T=h.tag,P=Object.keys(N);if(h.sortKeys===!0)P.sort();else if(typeof h.sortKeys=="function")P.sort(h.sortKeys);else if(h.sortKeys)throw new n("sortKeys must be a boolean or a function");for(let q=0,D=P.length;q<D;q+=1){let U="";(!k||C!=="")&&(U+=Mr(h,_));let G=P[q],oe=N[G];if(h.replacer&&(oe=h.replacer.call(N,G,oe)),!S(h,_+1,G,!0,!0,!0))continue;let xe=h.tag!==null&&h.tag!=="?"||h.dump&&h.dump.length>1024;xe&&(h.dump&&u===h.dump.charCodeAt(0)?U+="?":U+="? "),U+=h.dump,xe&&(U+=Mr(h,_)),S(h,_+1,oe,!0,xe)&&(h.dump&&u===h.dump.charCodeAt(0)?U+=":":U+=": ",U+=h.dump,C+=U)}h.tag=T,h.dump=C||"{}"}function b(h,_,N){let k=N?h.explicitTypes:h.implicitTypes;for(let C=0,T=k.length;C<T;C+=1){let P=k[C];if((P.instanceOf||P.predicate)&&(!P.instanceOf||typeof _=="object"&&_ instanceof P.instanceOf)&&(!P.predicate||P.predicate(_))){if(N?P.multi&&P.representName?h.tag=P.representName(_):h.tag=P.tag:h.tag="?",P.represent){let q=h.styleMap[P.tag]||P.defaultStyle,D;if(o.call(P.represent)==="[object Function]")D=P.represent(_,q);else if(s.call(P.represent,q))D=P.represent[q](_,q);else throw new n("!<"+P.tag+'> tag resolver accepts not "'+q+'" style');h.dump=D}return!0}}return!1}function S(h,_,N,k,C,T,P){h.tag=null,h.dump=N,b(h,N,!1)||b(h,N,!0);let q=o.call(h.dump),D=k;k&&(k=h.flowLevel<0||h.flowLevel>_);let U=q==="[object Object]"||q==="[object Array]",G,oe;if(U&&(G=h.duplicates.indexOf(N),oe=G!==-1),(h.tag!==null&&h.tag!=="?"||oe||h.indent!==2&&_>0)&&(C=!1),oe&&h.usedDuplicates[G])h.dump="*ref_"+G;else{if(U&&oe&&!h.usedDuplicates[G]&&(h.usedDuplicates[G]=!0),q==="[object Object]")k&&Object.keys(h.dump).length!==0?(c(h,_,h.dump,C),oe&&(h.dump="&ref_"+G+h.dump)):(na(h,_,h.dump),oe&&(h.dump="&ref_"+G+" "+h.dump));else if(q==="[object Array]")k&&h.dump.length!==0?(h.noArrayIndent&&!P&&_>0?to(h,_-1,h.dump,C):to(h,_,h.dump,C),oe&&(h.dump="&ref_"+G+h.dump)):(eo(h,_,h.dump),oe&&(h.dump="&ref_"+G+" "+h.dump));else if(q==="[object String]")h.tag!=="?"&&ea(h,h.dump,_,T,D);else{if(q==="[object Undefined]")return!1;if(h.skipInvalid)return!1;throw new n("unacceptable kind of an object to dump "+q)}if(h.tag!==null&&h.tag!=="?"){let xe=encodeURI(h.tag[0]==="!"?h.tag.slice(1):h.tag).replace(/!/g,"%21");h.tag[0]==="!"?xe="!"+xe:xe.slice(0,18)==="tag:yaml.org,2002:"?xe="!!"+xe.slice(18):xe="!<"+xe+">",h.dump=xe+" "+h.dump}}return!0}function E(h,_){let N=[],k=[];x(h,N,k);let C=k.length;for(let T=0;T<C;T+=1)_.duplicates.push(N[k[T]]);_.usedDuplicates=new Array(C)}function x(h,_,N){if(h!==null&&typeof h=="object"){let k=_.indexOf(h);if(k!==-1)N.indexOf(k)===-1&&N.push(k);else if(_.push(h),Array.isArray(h))for(let C=0,T=h.length;C<T;C+=1)x(h[C],_,N);else{let C=Object.keys(h);for(let T=0,P=C.length;T<P;T+=1)x(h[C[T]],_,N)}}}function M(h,_){_=_||{};let N=new Zs(_);N.noRefs||E(h,N);let k=h;return N.replacer&&(k=N.replacer.call({"":k},"",k)),S(N,0,k,!0,!0)?N.dump+`
32
+ `:""}e.exports.dump=M})),xp=uw(me(((t,e)=>{var r=pw(),n=fw();function i(o,s){return function(){throw new Error("Function yaml."+o+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}e.exports.Type=Fe(),e.exports.Schema=op(),e.exports.FAILSAFE_SCHEMA=up(),e.exports.JSON_SCHEMA=hp(),e.exports.CORE_SCHEMA=mp(),e.exports.DEFAULT_SCHEMA=oa(),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.dump=n.dump,e.exports.YAMLException=Mn(),e.exports.types={binary:vp(),float:dp(),map:lp(),null:cp(),pairs:bp(),set:_p(),timestamp:gp(),bool:pp(),int:fp(),merge:yp(),omap:wp(),seq:ap(),str:sp()},e.exports.safeLoad=i("safeLoad","load"),e.exports.safeLoadAll=i("safeLoadAll","loadAll"),e.exports.safeDump=i("safeDump","dump")}))(),1),{Type:uI,Schema:cI,FAILSAFE_SCHEMA:pI,JSON_SCHEMA:fI,CORE_SCHEMA:dI,DEFAULT_SCHEMA:hI,load:mI,loadAll:gI,dump:yI,YAMLException:vI,types:wI,safeLoad:bI,safeLoadAll:_I,safeDump:xI}=xp.default,ht=xp.default});import{access as kI,readFile as $p}from"node:fs/promises";import{dirname as dw,relative as EI,resolve as Pe}from"node:path";async function Jt(t){let e=Pe(t),r=await $p(e,"utf-8"),n=ht.load(r);return hw(e,n)}function hw(t,e){let r=Te(t);return{...e,openapi:Pe(r,e.openapi),bindings:Pe(r,e.bindings),microContractsConfig:Pe(r,e.microContractsConfig),viewsDir:Pe(r,e.viewsDir),generated:{contractDir:Pe(r,e.generated.contractDir),actions:Pe(r,e.generated.actions),bridge:Pe(r,e.generated.bridge),reactDir:Pe(r,e.generated.reactDir)},runtimeModule:e.runtimeModule?Pe(r,e.runtimeModule):e.componentsModule?Pe(r,e.componentsModule):void 0,themeModule:e.themeModule?Pe(r,e.themeModule):void 0,design:e.design?{tokens:e.design.tokens?Pe(r,e.design.tokens):void 0,theme:e.design.theme?Pe(r,e.design.theme):void 0,extensionsCss:e.design.extensionsCss?Pe(r,e.design.extensionsCss):void 0}:void 0,extensions:e.extensions?Pe(r,e.extensions):void 0}}async function Sp(t){let e=await $p(Pe(t),"utf-8");return ht.load(e)}function Te(t){return dw(Pe(t))}function ro(t){let e=t.design?.tokens,r=t.design?.theme;if(!e)throw new Error("view-contracts.config.yaml must define design.tokens (project tokens file path).");if(!r)throw new Error("view-contracts.config.yaml must define design.theme (project theme file path).");return{tokensPath:e,themePath:r}}var Ot=X(()=>{"use strict";jr()});import{readFileSync as mw}from"node:fs";import{createRequire as gw}from"node:module";import{dirname as sa,resolve as yw}from"node:path";import{fileURLToPath as vw}from"node:url";function Ee(){if(Dr)return Dr;let t=gw(import.meta.url);try{return Dr=sa(t.resolve("view-contracts/package.json")),Dr}catch{let e=sa(vw(import.meta.url));for(;;){try{let n=yw(e,"package.json");if(JSON.parse(mw(n,"utf8")).name==="view-contracts")return Dr=e,Dr}catch{}let r=sa(e);if(r===e)break;e=r}throw new Error("view-contracts package root not found")}}var Dr,Lt=X(()=>{"use strict"});function kp(t){return io[t]?.properties??[]}function Cp(t,e){let r=io[e];return r?r.properties.includes(t):!1}var no,io,st,qr,OI,mt=X(()=>{"use strict";no={id:{type:"string",category:"identity",lowering:"attribute",description:"Stable identifier for tests and diff updates"},role:{type:"string",category:"identity",lowering:"attribute",enum:"role",description:"Accessibility semantics (not HTML tag names)"},label:{type:"string",category:"identity",lowering:"attribute",description:"Accessible name; required for IconButton"},visible:{type:"boolean",category:"state",lowering:"none",description:"Show or omit from render tree"},enabled:{type:"boolean",category:"state",lowering:"attribute"},selected:{type:"boolean",category:"state",lowering:"attribute"},checked:{type:"boolean",category:"state",lowering:"attribute"},readonly:{type:"boolean",category:"state",lowering:"attribute"},required:{type:"boolean",category:"state",lowering:"attribute"},width:{type:["string","number"],category:"size",lowering:"inline-css",enum:"widthSize",notes:"string: wrap|fill; number: fixed px/dp/pt; flex ratio uses weight property"},height:{type:["string","number"],category:"size",lowering:"inline-css",enum:"heightSize",notes:"string: wrap|fill; number: fixed px/dp/pt; flex ratio uses weight property"},minWidth:{type:"number",category:"size",lowering:"inline-css"},maxWidth:{type:["string","number"],category:"size",lowering:"inline-css",notes:"number or fill"},minHeight:{type:"number",category:"size",lowering:"inline-css"},maxHeight:{type:["string","number"],category:"size",lowering:"inline-css",notes:"number or fill"},aspectRatio:{type:"number",category:"size",lowering:"inline-css"},weight:{type:"number",category:"size",lowering:"inline-css",notes:"Flex ratio among Row/Column direct children; Spacer is the primary use case"},padding:{type:["string","number"],category:"spacing",lowering:"inline-css",notes:"space token or per-side"},gap:{type:["string","number"],category:"spacing",lowering:"inline-css"},align:{type:"string",category:"alignment",lowering:"inline-css",enum:"align"},justify:{type:"string",category:"alignment",lowering:"inline-css",enum:"justify"},selfAlign:{type:"string",category:"alignment",lowering:"inline-css",enum:"align"},contentAlign:{type:"string",category:"alignment",lowering:"inline-css",enum:"contentAlign"},axis:{type:"string",category:"direction",lowering:"inline-css",enum:"axis"},direction:{type:"string",category:"direction",lowering:"attribute",enum:"direction",description:"Text/layout direction; set at app or screen root, not per layout container"},scroll:{type:"string",category:"overflow",lowering:"inline-css",enum:"scroll"},background:{type:"string",category:"visual",lowering:"inline-css",notes:"color token"},foreground:{type:"string",category:"visual",lowering:"inline-css",notes:"color token"},border:{type:["string","object"],category:"visual",lowering:"inline-css",enum:"border",notes:"none|token|{width,color}"},separator:{type:"number",category:"visual",lowering:"inline-css",notes:"Row separator width in px/dp/pt (0=off)"},separatorColor:{type:"string",category:"visual",lowering:"inline-css",notes:"Row separator color token"},radius:{type:"string",category:"visual",lowering:"inline-css",notes:"radius token"},shadow:{type:"string",category:"visual",lowering:"inline-css",enum:"shadow"},opacity:{type:"number",category:"visual",lowering:"inline-css",notes:"0..1"},clip:{type:"string",category:"visual",lowering:"inline-css",enum:"clip"},textStyle:{type:"string",category:"text",lowering:"inline-css",notes:"typography token"},textAlign:{type:"string",category:"text",lowering:"inline-css",enum:"textAlign"},lineLimit:{type:["string","number"],category:"text",lowering:"inline-css",enum:"lineLimit"},textOverflow:{type:"string",category:"text",lowering:"inline-css",enum:"textOverflow"},fontWeight:{type:"string",category:"text",lowering:"inline-css",enum:"fontWeight"},size:{type:"number",category:"text",lowering:"inline-css",notes:"Font size shorthand (px/dp/pt)"},fit:{type:"string",category:"image",lowering:"inline-css",enum:"imageFit"},src:{type:"string",category:"image",lowering:"attribute",description:"Image source URL or asset reference"},alt:{type:"string",category:"image",lowering:"attribute",description:"Alternative text; not a source reference"},name:{type:"string",category:"image",lowering:"attribute",description:"Icon token or asset name in the renderer icon set"},onClick:{type:"action",category:"interaction",lowering:"none",description:"Action id, not arbitrary code"},onSubmit:{type:"action",category:"interaction",lowering:"none",description:"Form submit/validation action id"},onChange:{type:"action",category:"interaction",lowering:"none"},focusable:{type:"boolean",category:"interaction",lowering:"attribute"},autoFocus:{type:"boolean",category:"interaction",lowering:"attribute"},keyboardType:{type:"string",category:"interaction",lowering:"attribute",enum:"keyboardType"},value:{type:["string","number","boolean"],category:"data",lowering:"attribute"},binding:{type:"string",category:"data",lowering:"none",description:"ViewModel or form state field identifier"},placeholder:{type:"string",category:"data",lowering:"attribute"},options:{type:"array",category:"data",lowering:"none",notes:"array<{value,label}>"},error:{type:["string","null"],category:"validation",lowering:"none"},help:{type:["string","null"],category:"validation",lowering:"none"},variant:{type:"string",category:"visual",lowering:"class-name",notes:"design token variant"},theme:{type:"string",category:"visual",lowering:"class-name",notes:"active theme id for runtime theme switching"},display:{type:"string",category:"layout",lowering:"inline-css",notes:"CSS display value (grid, flex, etc.)"},gridTemplateColumns:{type:"string",category:"layout",lowering:"inline-css",notes:"CSS grid-template-columns"},flexDirection:{type:"string",category:"layout",lowering:"inline-css",notes:"CSS flex-direction"},alignItems:{type:"string",category:"alignment",lowering:"inline-css",notes:"CSS align-items"},margin:{type:["string","number"],category:"spacing",lowering:"inline-css",notes:"space token or per-side"},borderColor:{type:"string",category:"visual",lowering:"inline-css",notes:"border color token"},fontSize:{type:["string","number"],category:"text",lowering:"inline-css",notes:"CSS font-size"},flex:{type:"number",category:"size",lowering:"inline-css",description:"Flex grow ratio for proportional sizing in table columns/cells"},each:{type:"string",category:"data",lowering:"none",description:"Iterator variable name for data-bound row repetition"},source:{type:"string",category:"data",lowering:"none",description:"ViewModel array binding for data-driven elements"},headerVisible:{type:"boolean",category:"state",lowering:"attribute"}},io={App:{description:"App root; holds theme/token/navigation context",tier:"core",category:"structure",notes:"Optional; not required for single-screen DSL",properties:["id","padding","direction","theme","variant"],children:{kind:"list",items:["Page"]}},Page:{description:"Screen root; viewport and safe-area boundary",tier:"core",category:"structure",properties:["id","visible","padding","direction","variant"],children:{kind:"list",items:["Column","Row","Stack","Box"]}},SafeArea:{description:"Insets for OS/browser safe areas",tier:"core",category:"structure",properties:["id","padding","variant"],children:{kind:"list",items:["Box","Column","Row"]}},Box:{description:"Single region; background, bounds, child placement",tier:"core",category:"layout",properties:["id","visible","width","height","minWidth","maxWidth","minHeight","maxHeight","padding","margin","gap","contentAlign","background","foreground","border","borderColor","radius","shadow","opacity","clip","selfAlign","display","gridTemplateColumns","flexDirection","variant"],children:{kind:"any"}},Row:{description:"Horizontal child layout",tier:"core",category:"layout",properties:["id","visible","gap","align","justify","padding","width","height","minWidth","maxWidth","minHeight","maxHeight","variant"],children:{kind:"any"}},Column:{description:"Vertical child layout",tier:"core",category:"layout",properties:["id","visible","gap","align","justify","padding","width","height","minWidth","maxWidth","minHeight","maxHeight","variant"],children:{kind:"any"}},Stack:{description:"Overlay children by z-order (not absolute positioning)",tier:"core",category:"layout",properties:["id","visible","gap","contentAlign","padding","width","height","background","variant"],children:{kind:"any"}},Spacer:{description:"Occupies remaining flex space",tier:"core",category:"layout",notes:"Direct child of Row/Column only",properties:["id","width","height","weight","variant"],children:{kind:"none"}},Divider:{description:"Horizontal or vertical separator",tier:"core",category:"layout",properties:["id","axis","variant"],children:{kind:"none"}},ScrollArea:{description:"Internal scroll boundary",tier:"core",category:"scroll",properties:["id","axis","scroll","width","height","minHeight","maxHeight","padding","variant"],children:{kind:"single"}},List:{description:"Homogeneous list of items",tier:"core",category:"scroll",properties:["id","gap","axis","role","visible","variant"],children:{kind:"list",items:["ListItem"]}},ListItem:{description:"One row/cell in a list",tier:"core",category:"scroll",properties:["id","selected","padding","gap","role","visible","variant"],children:{kind:"any"}},Text:{description:"Text display",tier:"core",category:"text",properties:["id","visible","textStyle","textAlign","lineLimit","textOverflow","fontWeight","fontSize","size","foreground","background","opacity","padding","radius","display","alignItems","role","variant"],children:{kind:"text"}},Link:{description:"Navigable text or region",tier:"optional",category:"text",properties:["id","visible","onClick","label","foreground","role","variant"],children:{kind:"text"}},Image:{description:"Image display",tier:"core",category:"media",properties:["id","visible","src","fit","alt","width","height","aspectRatio","radius","variant"],children:{kind:"none"}},Icon:{description:"Icon display; asset set referenced by name token at renderer",tier:"core",category:"media",properties:["id","visible","name","alt","foreground","opacity","variant"],children:{kind:"none"}},Button:{description:"Pressable action; label or children required (label is a11y name when both present)",tier:"core",category:"input",properties:["id","visible","enabled","onClick","label","foreground","background","radius","padding","shadow","border","borderColor","fontWeight","fontSize","variant","role"],children:{kind:"list",items:["Text","Icon","Row"]}},IconButton:{description:"Icon-primary button; label required for accessibility",tier:"optional",category:"input",properties:["id","visible","enabled","onClick","label","foreground","background","radius","padding","variant"],children:{kind:"list",items:["Icon"]}},TextInput:{description:"Single-line text input",tier:"core",category:"input",properties:["id","visible","enabled","readonly","required","value","binding","placeholder","onChange","error","help","keyboardType","focusable","autoFocus","width","label","foreground","background","radius","padding","border","borderColor","minHeight","fontSize","variant"],children:{kind:"none"}},TextArea:{description:"Multi-line text input",tier:"core",category:"input",properties:["id","visible","enabled","readonly","required","value","binding","placeholder","onChange","error","help","focusable","width","minHeight","label","foreground","background","radius","padding","border","borderColor","fontSize","variant"],children:{kind:"none"}},Select:{description:"Single selection",tier:"core",category:"input",properties:["id","visible","enabled","required","value","binding","options","onChange","error","help","width","label","foreground","background","radius","padding","border","borderColor","minHeight","fontSize","variant"],children:{kind:"none"}},Checkbox:{description:"Boolean or multi-select toggle",tier:"core",category:"input",properties:["id","visible","enabled","checked","required","binding","label","onChange","variant"],children:{kind:"none"}},Radio:{description:"Single choice in a group (use Row/Column to group; binding identifies group)",tier:"core",category:"input",notes:"RadioGroup is expressed via layout Group, not a separate element",properties:["id","visible","enabled","checked","binding","label","value","onChange","variant"],children:{kind:"none"}},Switch:{description:"On/off toggle",tier:"core",category:"input",properties:["id","visible","enabled","checked","binding","label","onChange","variant"],children:{kind:"none"}},Form:{description:"Input group submit/validation boundary",tier:"core",category:"form",properties:["id","visible","gap","onSubmit","variant"],children:{kind:"any"}},Field:{description:"label/help/error/input unit",tier:"core",category:"form",properties:["id","visible","label","help","error","required","gap","variant"],children:{kind:"any"}},Modal:{description:"Primary transient dialog",tier:"core",category:"overlay",notes:"Direct child of Page or App; role defaults to dialog at renderer",properties:["id","visible","role","autoFocus","variant"],children:{kind:"list",items:["Box","Column"]}},Drawer:{description:"Edge panel overlay",tier:"extension",category:"overlay",notes:"Placement limited to start/end/bottom at renderer",properties:["id","visible","variant"],children:{kind:"list",items:["Box","Column"]}},Popover:{description:"Small anchored panel",tier:"extension",category:"overlay",properties:["id","visible","variant"],children:{kind:"list",items:["Box","Column"]}},Tooltip:{description:"Supplementary description",tier:"extension",category:"overlay",properties:["id","visible","label","variant"],children:{kind:"text"}},Progress:{description:"Determinate progress",tier:"core",category:"feedback",properties:["id","visible","value","variant"],children:{kind:"none"}},Spinner:{description:"Indeterminate loading",tier:"core",category:"feedback",properties:["id","visible","variant"],children:{kind:"none"}},Table:{description:"Data table with header and repeated rows",tier:"core",category:"data",properties:["id","visible","source","gap","border","borderColor","separator","separatorColor","variant"],children:{kind:"list",items:["TableHeader","TableRow"]}},TableHeader:{description:"Table header row defining column labels",tier:"core",category:"data",properties:["height","border","borderColor","background","alignItems","variant"],children:{kind:"list",items:["TableColumn"]}},TableColumn:{description:"Header cell definition; children override label text",tier:"core",category:"data",properties:["label","width","flex","align","border","borderColor","padding","fontSize","fontWeight","foreground","variant"],children:{kind:"any"}},TableRow:{description:"Row template repeated for each source item",tier:"core",category:"data",properties:["each","height","border","borderColor","alignItems","variant"],children:{kind:"list",items:["TableCell"]}},TableCell:{description:"Data cell; children define cell content",tier:"core",category:"data",properties:["width","flex","align","border","borderColor","padding","fontSize","foreground","variant"],children:{kind:"any"}}},st=new Set(Object.keys(io)),qr=new Set(Object.entries(no).filter(([,t])=>t.lowering==="inline-css").map(([t])=>t)),OI=new Set(Object.entries(no).filter(([,t])=>t.lowering==="class-name").map(([t])=>t))});import{readFile as ww}from"node:fs/promises";async function Fr(t){return ht.load(await ww(t,"utf-8"))}function oo(t,e,r){for(let n of t)if(!e.has(n))throw new Error(`${r}: unknown element "${n}" \u2014 not in spec/ui-dsl.schema.json vocabulary`)}function Ep(t,e,r){for(let[n,i]of Object.entries(t))for(let o of e)if(i[o]===void 0||i[o]===null||i[o]==="")throw new Error(`${r}: element "${n}" is missing required "${String(o)}"`)}var so=X(()=>{"use strict";jr()});import{resolve as bw}from"node:path";function _w(t){oo(Object.keys(t.elements),st,Pp),Ep(t.elements,["tag"],Pp)}async function la(t){if(!t&&aa)return aa;let e=t??bw(Ee(),"renderers/react/elements.yaml"),r=await Fr(e);return _w(r),t||(aa=r),r}var Pp,aa,Ip=X(()=>{"use strict";mt();mt();Lt();so();Pp="renderers/react/elements.yaml",aa=null});function Rp(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t}function Tp(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 Ap=X(()=>{"use strict"});function gt(t){return`${t}px`}function Br(t){let e=t.match(/^\{([^}]+)\}$/);if(e)return`var(--${e[1].replace(/\./g,"-")})`}function ua(t){let e={},r=t.width;typeof r=="number"?e.width=gt(r):r==="fill"?e.width="100%":typeof r=="string"&&r!=="wrap"&&(e.width=r),typeof t.minWidth=="number"&&(e.minWidth=gt(t.minWidth));let n=t.maxWidth;typeof n=="number"?e.maxWidth=gt(n):n==="fill"&&(e.maxWidth="100%");let i=t.height;typeof i=="number"?e.height=gt(i):i==="fill"?e.height="100%":typeof i=="string"&&i!=="wrap"&&(e.height=i),typeof t.minHeight=="number"&&(e.minHeight=gt(t.minHeight));let o=t.maxHeight;typeof o=="number"?e.maxHeight=gt(o):o==="fill"&&(e.maxHeight="100%"),t.aspectRatio!==void 0&&(e.aspectRatio=String(t.aspectRatio));let s=t.weight;typeof s=="number"&&(e.flexGrow=s),typeof t.padding=="number"&&(e.padding=gt(t.padding)),typeof t.margin=="number"&&(e.margin=gt(t.margin)),typeof t.gap=="number"&&(e.gap=gt(t.gap));let a=t.textAlign;typeof a=="string"&&(e.textAlign=a==="start"?"left":a==="end"?"right":a);let l=t.contentAlign;typeof l=="string"&&l in Np&&(e.placeItems=Np[l]),typeof t.overflow=="string"&&(e.overflow=t.overflow);let u=t.selfAlign;typeof u=="string"&&(e.alignSelf=u==="start"?"flex-start":u==="end"?"flex-end":u);let f=t.size;typeof f=="number"?e.fontSize=gt(f):typeof f=="string"&&(e.fontSize=f);let p=typeof s=="string"?s:t.fontWeight;typeof p=="string"&&(e.fontWeight=p);let d=t.background;typeof d=="string"&&(e.background=Br(d)??d);let m=t.foreground;typeof m=="string"&&(e.color=Br(m)??m);let g=t.radius;typeof g=="number"?e.borderRadius=gt(g):typeof g=="string"&&(e.borderRadius=Br(g)??g);let y=t.shadow;y===!0?e.boxShadow="var(--ui-shadow)":y===!1?e.boxShadow="none":typeof y=="string"&&(e.boxShadow=xw[y]??Br(y)??y);let v=t.border;typeof v=="string"&&(e.border=Br(v)??v),typeof t.opacity=="number"&&(e.opacity=t.opacity);let w=t.clip;typeof w=="string"&&(e.overflow=w==="hidden"?"hidden":w);let R=t.align;if(typeof R=="string"){let L=Rp(R);L&&(e.alignItems=L)}let O=t.justify;if(typeof O=="string"){let L=Tp(O);L&&(e.justifyContent=L)}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=Br(I)??I);let A=t.flex;return typeof A=="number"&&(e.flex=A),e}function On(t){let e=Object.entries(t);return e.length===0?"":`style={{ ${e.map(([n,i])=>typeof i=="number"?`${n}: ${i}`:`${n}: ${JSON.stringify(i)}`).join(", ")} }}`}var Np,xw,ca=X(()=>{"use strict";Ap();Np={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"},xw={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 ao(t,e){let r=t[e];if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="object"&&"kind"in r&&r.kind==="literal")return r.value}}function $w(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 Sw(t){let e={};for(let[r,n]of Object.entries(t)){if(!qr.has(r))continue;$w(r,n);let i=ao(t,r);i!==void 0&&(e[r]=i)}return e}function kw(t){return t.flex?{display:"flex",flexDirection:t.flex==="column"?"column":"row"}:{}}function Cw(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 Mp(t,e){let r=Sw(e),n=ua(r);if(n={...n,...kw(t)},t.tableCell){if("alignItems"in n){let i=String(n.alignItems);n.textAlign=i==="flex-end"?"right":i==="center"?"center":"left",delete n.alignItems}"width"in n&&!("flex"in n)&&(n.flexShrink=0,n.flexGrow=0)}if(t.scrollContainer){let i=ao(e,"scroll"),o=ao(e,"axis"),s=typeof i=="string"?i:typeof o=="string"?o==="horizontal"?"horizontal":"vertical":void 0;if(s)return n={...n,...Cw(s)},On(n);throw new Error("ScrollArea scroll/axis must be compile-time literals")}if(t.flexGrowProp&&e[t.flexGrowProp]){let i=ao(e,t.flexGrowProp);if(typeof i=="number")return n.flexGrow=i,On(n);throw new Error(`"${t.flexGrowProp}" on <Spacer> must be a compile-time literal`)}return On(n)}var Op=X(()=>{"use strict";mt();ca();ca()});function K(t){return" ".repeat(t)}function cr(t,e="vm"){let r=t.scope??e;return t.path?`${r}.${t.path}`:r}function qp(t){return t.parts.map(e=>typeof e=="string"?e:`\${${cr(e)}}`).join("")}function Ew(t){return`\`${qp(t)}\``}function lo(t,e=!1){let r=e?" as ActionDescriptor":"";if(!t.params||Object.keys(t.params).length===0)return`{ name: ${JSON.stringify(t.name)} }${r}`;let n=Object.entries(t.params).map(([i,o])=>`${i}: ${Wr(o,0)}`).join(", ");return`{ name: ${JSON.stringify(t.name)}, params: { ${n} } }${r}`}function fa(t,e,r=!1){if(t===null)return"null";if(typeof t=="string")return JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t))return`[
33
+ ${t.map(n=>`${K(e+1)}${fa(n,e+1,r)}`).join(`,
34
34
  `)}
35
- ${G(e)}]`;if(typeof t=="object"&&t!==null){let n=t;return"kind"in n&&n.kind==="action"?Hi(n,r):`{
36
- ${Object.entries(n).map(([o,s])=>`${o}: ${Fs(s,e+1,r)}`).map(o=>`${G(e+1)}${o}`).join(`,
35
+ ${K(e)}]`;if(typeof t=="object"&&t!==null){let n=t;return"kind"in n&&n.kind==="action"?lo(n,r):`{
36
+ ${Object.entries(n).map(([o,s])=>`${o}: ${fa(s,e+1,r)}`).map(o=>`${K(e+1)}${o}`).join(`,
37
37
  `)}
38
- ${G(e)}}`}return"undefined"}function Ar(t,e,r=!1){if(t===null)return"null";if(typeof t=="string")return JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t))return`[
39
- ${t.map(n=>`${G(e+1)}${Ar(n,e+1,r)}`).join(`,
38
+ ${K(e)}}`}return"undefined"}function Wr(t,e,r=!1){if(t===null)return"null";if(typeof t=="string")return JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t))return`[
39
+ ${t.map(n=>`${K(e+1)}${Wr(n,e+1,r)}`).join(`,
40
40
  `)}
41
- ${G(e)}]`;if(typeof t=="object"&&t!==null&&"kind"in t){if(t.kind==="binding")return er(t);if(t.kind==="action")return Hi(t,r);if(t.kind==="literal")return Fs(t.value,e,r);if(t.kind==="concat")return yv(t)}return"undefined"}function Tr(t,e){let r=t[e];if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="object"&&"kind"in r&&r.kind==="literal")return r.value}}function W(t,e){let r=t[e];if(r!=null)return Ar(r,0)}function bn(t,e,r){let n=nf(e,r);n&&t.push(n)}function vv(t,e){let r=t.action??t[e==="onClick"?"onClick":"onSubmit"];if(!r||typeof r!="object"||!("kind"in r)||r.kind!=="action")return;let n=Hi(r,!0);return e==="onSubmit"?`onSubmit={(e) => { e.preventDefault(); void dispatchAction(${n}); }}`:`onClick={() => { void dispatchAction(${n}); }}`}function qs(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function wv(t,e){let r=Tr(e,"variant");if(typeof r=="string")return` vc-${qs(t)}--${r}`;let n=e.variant;if(n&&typeof n=="object"&&"kind"in n&&n.kind==="concat")return` vc-${qs(t)}--${uf(n)}`;let i=W(e,"variant");if(i)return` vc-${qs(t)}--\${${i}}`}function Sn(t,e,r){let n=e.className??"",i=wv(t,r);if(i)return typeof Tr(r,"variant")=="string"?`className="${n}${i}"`:`className={\`${n}${i}\`}`;if(e.wrapProp&&Tr(r,e.wrapProp)===!0)return`className="${n} vc-wrap"`;if(e.sizeClass&&r.size){let o=W(r,"size");return`className={\`${e.className} ${e.sizeClass}-\${${o} ?? 'md'}\`}`}return`className="${n}"`}function sf(t,e,r){let n=Tr(e,"label"),i=Tr(e,"help"),o=Tr(e,"error"),s=W(e,"label"),a=W(e,"help"),u=W(e,"error"),c=[`${G(r)}<label className="vc-field">`];return typeof n=="string"?c.push(`${G(r+1)}<span className="vc-text vc-text--field-label">{${JSON.stringify(n)}}</span>`):s&&c.push(`${G(r+1)}{${s} ? <span className="vc-text vc-text--field-label">{${s}}</span> : null}`),c.push(`${G(r+1)}${t}`),typeof i=="string"?c.push(`${G(r+1)}<span className="vc-text vc-text--field-help">{${JSON.stringify(i)}}</span>`):a&&c.push(`${G(r+1)}{${a} ? <span className="vc-text vc-text--field-help">{${a}}</span> : null}`),typeof o=="string"?c.push(`${G(r+1)}<span className="vc-text vc-text--field-error">{${JSON.stringify(o)}}</span>`):u&&c.push(`${G(r+1)}{${u} ? <span className="vc-text vc-text--field-error">{${u}}</span> : null}`),c.push(`${G(r)}</label>`),c.join(`
42
- `)}function _v(t,e){let r=W(t,"name")??'""',n=W(t,"label")??'""',i=t.checked?`defaultChecked={${W(t,"checked")}}`:"",o=t.enabled?`disabled={${W(t,"enabled")} === false}`:"";return`${G(e)}<label className="vc-checkbox">
43
- ${G(e+1)}<input type="checkbox" name={${r}} ${i} ${o} />
44
- ${G(e+1)}<span>{${n}}</span>
45
- ${G(e)}</label>`}function bv(t,e){let r=W(t,"binding")??W(t,"name")??'""',n=W(t,"value")??'""',i=W(t,"label")??'""',o=t.checked?`defaultChecked={${W(t,"checked")}}`:"",s=t.enabled?`disabled={${W(t,"enabled")} === false}`:"";return`${G(e)}<label className="vc-radio">
46
- ${G(e+1)}<input type="radio" name={${r}} value={${n}} ${o} ${s} />
47
- ${G(e+1)}<span>{${i}}</span>
48
- ${G(e)}</label>`}function Sv(t,e){let r=W(t,"binding")??W(t,"name")??'""',n=W(t,"label")??'""',i=t.checked?`defaultChecked={${W(t,"checked")}}`:"",o=t.enabled?`disabled={${W(t,"enabled")} === false}`:"";return`${G(e)}<label className="vc-switch">
49
- ${G(e+1)}<input type="checkbox" role="switch" name={${r}} ${i} ${o} />
50
- ${G(e+1)}<span>{${n}}</span>
51
- ${G(e)}</label>`}function $v(t,e,r){let n=t.props;if(n.alt!==void 0){let s=[Sn(t.name,e,n),`src={${W(n,"name")??'""'}}`,`alt={${W(n,"alt")??'""'}}`];return bn(s,e,n),n.id&&s.push(`id={${W(n,"id")}}`),`${G(r)}<img ${s.join(" ")} />`}let o=[Sn(t.name,e,n),"aria-hidden"];return bn(o,e,n),n.id&&o.push(`id={${W(n,"id")}}`),n.name&&o.push(`data-icon={${W(n,"name")}}`),`${G(r)}<span ${o.join(" ")} />`}function af(t,e){let r=t.options;if(!r||typeof r!="object"||!("kind"in r))return"";if(r.kind==="literal"&&Array.isArray(r.value))return r.value.map(o=>`${G(e+1)}<option key={${JSON.stringify(o.value)}} value={${JSON.stringify(o.value)}}>{${JSON.stringify(o.label)}}</option>`).join(`
52
- `);let n=Ar(r,0);return`${G(e+1)}{${n}.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}`}function lf(t,e,r,n){let i=[Sn(t,e,r)];return bn(i,e,r),e.ariaHidden&&i.push("aria-hidden"),r.id&&i.push(`id={${W(r,"id")}}`),r.role?i.push(`role={${W(r,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(r.ariaLabel?i.push(`aria-label={${W(r,"ariaLabel")}}`):r.label?i.push(`aria-label={${W(r,"label")}}`):r.title&&i.push(`aria-label={${W(r,"title")}}`)),r.name&&i.push(`name={${W(r,"name")}}`),r.placeholder&&i.push(`placeholder={${W(r,"placeholder")}}`),e.inputType&&i.push(`type={${W(r,"type")??JSON.stringify(e.inputType)}}`),r.required&&i.push(`required={${W(r,"required")}}`),r.readonly&&i.push(`readOnly={${W(r,"readonly")}}`),r.enabled&&i.push(`disabled={${W(r,"enabled")} === false}`),e.tag==="img"&&r.src&&i.push(`src={${W(r,"src")}}`),e.tag==="img"&&r.alt&&i.push(`alt={${W(r,"alt")}}`),e.tag==="progress"&&r.value&&i.push(`value={${W(r,"value")}}`),r.rows&&i.push(`rows={${W(r,"rows")??"4"}}`),`${G(n)}<${e.tag} ${i.join(" ")} />`}function cf(t,e,r,n){let i=[];if(e.ariaHidden&&i.push("aria-hidden"),r.id&&i.push(`id={${W(r,"id")}}`),r.role?i.push(`role={${W(r,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(r.ariaLabel?i.push(`aria-label={${W(r,"ariaLabel")}}`):r.label?i.push(`aria-label={${W(r,"label")}}`):r.title&&i.push(`aria-label={${W(r,"title")}}`)),e.actionEvent){let o=vv(r,e.actionEvent);o&&i.push(o)}return e.tag==="button"&&r.enabled&&i.push(`disabled={${W(r,"enabled")} === false}`),e.tag==="a"&&r.href&&i.push(`href={${W(r,"href")}}`),e.tag==="button"&&i.push(`type={${W(r,"type")??'"button"'}}`),i.push(Sn(t,e,r)),bn(i,e,r),`<${n} ${i.join(" ")}`}function Rt(t,e,r){if(e.visible===void 0)return t;let n=W(e,"visible");return`${G(r)}{${n} !== false ? (
41
+ ${K(e)}]`;if(typeof t=="object"&&t!==null&&"kind"in t){if(t.kind==="binding")return cr(t);if(t.kind==="action")return lo(t,r);if(t.kind==="literal")return fa(t.value,e,r);if(t.kind==="concat")return Ew(t)}return"undefined"}function Hr(t,e){let r=t[e];if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="object"&&"kind"in r&&r.kind==="literal")return r.value}}function J(t,e){let r=t[e];if(r!=null)return Wr(r,0)}function Vn(t,e,r){let n=Mp(e,r);n&&t.push(n)}function Pw(t,e){let r=t.action??t[e==="onClick"?"onClick":"onSubmit"];if(!r||typeof r!="object"||!("kind"in r)||r.kind!=="action")return;let n=lo(r,!0);return e==="onSubmit"?`onSubmit={(e) => { e.preventDefault(); void dispatchAction(${n}); }}`:`onClick={() => { void dispatchAction(${n}); }}`}function pa(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Iw(t,e){let r=Hr(e,"variant");if(typeof r=="string")return` vc-${pa(t)}--${r}`;let n=e.variant;if(n&&typeof n=="object"&&"kind"in n&&n.kind==="concat")return` vc-${pa(t)}--${qp(n)}`;let i=J(e,"variant");if(i)return` vc-${pa(t)}--\${${i}}`}function jn(t,e,r){let n=e.className??"",i=Iw(t,r);if(i)return typeof Hr(r,"variant")=="string"?`className="${n}${i}"`:`className={\`${n}${i}\`}`;if(e.wrapProp&&Hr(r,e.wrapProp)===!0)return`className="${n} vc-wrap"`;if(e.sizeClass&&r.size){let o=J(r,"size");return`className={\`${e.className} ${e.sizeClass}-\${${o} ?? 'md'}\`}`}return`className="${n}"`}function Lp(t,e,r){let n=Hr(e,"label"),i=Hr(e,"help"),o=Hr(e,"error"),s=J(e,"label"),a=J(e,"help"),l=J(e,"error"),u=[`${K(r)}<label className="vc-field">`];return typeof n=="string"?u.push(`${K(r+1)}<span className="vc-text vc-text--field-label">{${JSON.stringify(n)}}</span>`):s&&u.push(`${K(r+1)}{${s} ? <span className="vc-text vc-text--field-label">{${s}}</span> : null}`),u.push(`${K(r+1)}${t}`),typeof i=="string"?u.push(`${K(r+1)}<span className="vc-text vc-text--field-help">{${JSON.stringify(i)}}</span>`):a&&u.push(`${K(r+1)}{${a} ? <span className="vc-text vc-text--field-help">{${a}}</span> : null}`),typeof o=="string"?u.push(`${K(r+1)}<span className="vc-text vc-text--field-error">{${JSON.stringify(o)}}</span>`):l&&u.push(`${K(r+1)}{${l} ? <span className="vc-text vc-text--field-error">{${l}}</span> : null}`),u.push(`${K(r)}</label>`),u.join(`
42
+ `)}function Rw(t,e){let r=J(t,"name")??'""',n=J(t,"label")??'""',i=t.checked?`defaultChecked={${J(t,"checked")}}`:"",o=t.enabled?`disabled={${J(t,"enabled")} === false}`:"";return`${K(e)}<label className="vc-checkbox">
43
+ ${K(e+1)}<input type="checkbox" name={${r}} ${i} ${o} />
44
+ ${K(e+1)}<span>{${n}}</span>
45
+ ${K(e)}</label>`}function Tw(t,e){let r=J(t,"binding")??J(t,"name")??'""',n=J(t,"value")??'""',i=J(t,"label")??'""',o=t.checked?`defaultChecked={${J(t,"checked")}}`:"",s=t.enabled?`disabled={${J(t,"enabled")} === false}`:"";return`${K(e)}<label className="vc-radio">
46
+ ${K(e+1)}<input type="radio" name={${r}} value={${n}} ${o} ${s} />
47
+ ${K(e+1)}<span>{${i}}</span>
48
+ ${K(e)}</label>`}function Aw(t,e){let r=J(t,"binding")??J(t,"name")??'""',n=J(t,"label")??'""',i=t.checked?`defaultChecked={${J(t,"checked")}}`:"",o=t.enabled?`disabled={${J(t,"enabled")} === false}`:"";return`${K(e)}<label className="vc-switch">
49
+ ${K(e+1)}<input type="checkbox" role="switch" name={${r}} ${i} ${o} />
50
+ ${K(e+1)}<span>{${n}}</span>
51
+ ${K(e)}</label>`}function Nw(t,e,r){let n=t.props;if(n.alt!==void 0){let s=[jn(t.name,e,n),`src={${J(n,"name")??'""'}}`,`alt={${J(n,"alt")??'""'}}`];return Vn(s,e,n),n.id&&s.push(`id={${J(n,"id")}}`),`${K(r)}<img ${s.join(" ")} />`}let o=[jn(t.name,e,n),"aria-hidden"];return Vn(o,e,n),n.id&&o.push(`id={${J(n,"id")}}`),n.name&&o.push(`data-icon={${J(n,"name")}}`),`${K(r)}<span ${o.join(" ")} />`}function Vp(t,e){let r=t.options;if(!r||typeof r!="object"||!("kind"in r))return"";if(r.kind==="literal"&&Array.isArray(r.value))return r.value.map(o=>`${K(e+1)}<option key={${JSON.stringify(o.value)}} value={${JSON.stringify(o.value)}}>{${JSON.stringify(o.label)}}</option>`).join(`
52
+ `);let n=Wr(r,0);return`${K(e+1)}{${n}.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}`}function jp(t,e,r,n){let i=[jn(t,e,r)];return Vn(i,e,r),e.ariaHidden&&i.push("aria-hidden"),r.id&&i.push(`id={${J(r,"id")}}`),r.role?i.push(`role={${J(r,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(r.ariaLabel?i.push(`aria-label={${J(r,"ariaLabel")}}`):r.label?i.push(`aria-label={${J(r,"label")}}`):r.title&&i.push(`aria-label={${J(r,"title")}}`)),r.name&&i.push(`name={${J(r,"name")}}`),r.placeholder&&i.push(`placeholder={${J(r,"placeholder")}}`),e.inputType&&i.push(`type={${J(r,"type")??JSON.stringify(e.inputType)}}`),r.required&&i.push(`required={${J(r,"required")}}`),r.readonly&&i.push(`readOnly={${J(r,"readonly")}}`),r.enabled&&i.push(`disabled={${J(r,"enabled")} === false}`),e.tag==="img"&&r.src&&i.push(`src={${J(r,"src")}}`),e.tag==="img"&&r.alt&&i.push(`alt={${J(r,"alt")}}`),e.tag==="progress"&&r.value&&i.push(`value={${J(r,"value")}}`),r.rows&&i.push(`rows={${J(r,"rows")??"4"}}`),`${K(n)}<${e.tag} ${i.join(" ")} />`}function Dp(t,e,r,n){let i=[];if(e.ariaHidden&&i.push("aria-hidden"),r.id&&i.push(`id={${J(r,"id")}}`),r.role?i.push(`role={${J(r,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(r.ariaLabel?i.push(`aria-label={${J(r,"ariaLabel")}}`):r.label?i.push(`aria-label={${J(r,"label")}}`):r.title&&i.push(`aria-label={${J(r,"title")}}`)),e.actionEvent){let o=Pw(r,e.actionEvent);o&&i.push(o)}return e.tag==="button"&&r.enabled&&i.push(`disabled={${J(r,"enabled")} === false}`),e.tag==="a"&&r.href&&i.push(`href={${J(r,"href")}}`),e.tag==="button"&&i.push(`type={${J(r,"type")??'"button"'}}`),i.push(jn(t,e,r)),Vn(i,e,r),`<${n} ${i.join(" ")}`}function Vt(t,e,r){if(e.visible===void 0)return t;let n=J(e,"visible");return`${K(r)}{${n} !== false ? (
53
53
  ${t}
54
- ${G(r)}) : null}`}function Bs(t,e,r,n){if(t.length===0)return"";let i=n??"vm";return t.map(s=>{if(s.kind==="text"){let a=s.value;return a?`${G(e)}{${JSON.stringify(a)}}`:""}return s.kind==="binding"?`${G(e)}{${er(s,i)}}`:s.kind==="map"?xv(s,e,r):s.kind==="fragment"?Bs(s.children,e,r,n):r(s,e,n)}).filter(Boolean).join(`
55
- `)}function xv(t,e,r){let n=t.item,i=r(t.body,e+1,n);if(t.key){let o=` key={${er(t.key,n)}}`;i=i.replace(/^( +)<(\w+)/,`$1<$2${o}`)}return`${G(e)}{${er(t.source)}.map((${n}) => (
54
+ ${K(r)}) : null}`}function da(t,e,r,n){if(t.length===0)return"";let i=n??"vm";return t.map(s=>{if(s.kind==="text"){let a=s.value;return a?`${K(e)}{${JSON.stringify(a)}}`:""}return s.kind==="binding"?`${K(e)}{${cr(s,i)}}`:s.kind==="map"?Mw(s,e,r):s.kind==="fragment"?da(s.children,e,r,n):r(s,e,n)}).filter(Boolean).join(`
55
+ `)}function Mw(t,e,r){let n=t.item,i=r(t.body,e+1,n);if(t.key){let o=` key={${cr(t.key,n)}}`;i=i.replace(/^( +)<(\w+)/,`$1<$2${o}`)}return`${K(e)}{${cr(t.source)}.map((${n}) => (
56
56
  ${i}
57
- ${G(e)}))}`}function kv(t,e,r,n,i){let o=t.props,s=Bs(t.children,r+1,i,n);if(e.checkbox)return Rt(_v(o,r),o,r);if(t.name==="Radio")return Rt(bv(o,r),o,r);if(t.name==="Switch")return Rt(Sv(o,r),o,r);if(t.name==="Icon")return Rt($v(t,e,r),o,r);if(t.name==="Spinner"){let p=[Sn(t.name,e,o),'aria-busy="true"'];return bn(p,e,o),o.id&&p.push(`id={${W(o,"id")}}`),o.role?p.push(`role={${W(o,"role")}}`):e.defaultRole&&p.push(`role="${e.defaultRole}"`),Rt(`${G(r)}<div ${p.join(" ")} />`,o,r)}if(e.fieldContainer){let p=s||`${G(r+1)}<div />`;return Rt(sf(p,o,r),o,r)}if(e.fieldWrap){let p=e.tag,f;if(e.optionsProp&&o[e.optionsProp]){let d=cf(t.name,e,o,p);f=`${G(r+1)}${d}>
58
- ${af(o,r+2)}
59
- ${G(r+1)}</${p}>`}else f=lf(t.name,e,o,r+1);return Rt(sf(f,o,r),o,r)}let a=e.tag;if(e.void)return Rt(lf(t.name,e,o,r),o,r);let u=cf(t.name,e,o,a),c;return!s&&e.optionsProp&&o[e.optionsProp]?c=`${G(r)}${u}>
60
- ${af(o,r+1)}
61
- ${G(r)}</${a}>`:s?c=`${G(r)}${u}>
57
+ ${K(e)}))}`}function Ow(t,e,r,n,i){let o=t.props,s=da(t.children,r+1,i,n);if(e.checkbox)return Vt(Rw(o,r),o,r);if(t.name==="Radio")return Vt(Tw(o,r),o,r);if(t.name==="Switch")return Vt(Aw(o,r),o,r);if(t.name==="Icon")return Vt(Nw(t,e,r),o,r);if(t.name==="Spinner"){let f=[jn(t.name,e,o),'aria-busy="true"'];return Vn(f,e,o),o.id&&f.push(`id={${J(o,"id")}}`),o.role?f.push(`role={${J(o,"role")}}`):e.defaultRole&&f.push(`role="${e.defaultRole}"`),Vt(`${K(r)}<div ${f.join(" ")} />`,o,r)}if(e.fieldContainer){let f=s||`${K(r+1)}<div />`;return Vt(Lp(f,o,r),o,r)}if(e.fieldWrap){let f=e.tag,p;if(e.optionsProp&&o[e.optionsProp]){let d=Dp(t.name,e,o,f);p=`${K(r+1)}${d}>
58
+ ${Vp(o,r+2)}
59
+ ${K(r+1)}</${f}>`}else p=jp(t.name,e,o,r+1);return Vt(Lp(p,o,r),o,r)}let a=e.tag;if(e.void)return Vt(jp(t.name,e,o,r),o,r);let l=Dp(t.name,e,o,a),u;return!s&&e.optionsProp&&o[e.optionsProp]?u=`${K(r)}${l}>
60
+ ${Vp(o,r+1)}
61
+ ${K(r)}</${a}>`:s?u=`${K(r)}${l}>
62
62
  ${s}
63
- ${G(r)}</${a}>`:c=`${G(r)}${u} />`,Rt(c,o,r)}function Ev(t,e){let r=e??"vm";return Object.entries(t).map(([n,i])=>typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${n}={${er(i,r)}}`:`${n}={${Ar(i,0)}}`).join(" ")}function Pv(t,e,r){let n=Ev(t.props,r),i=n?` ${n}`:"";return`${G(e)}<${t.name}${i} />`}function Cv(t,e){let r=e??"vm";return Object.entries(t).map(([n,i])=>n==="action"&&typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="action"?`${n}={${Hi(i,!0)}}`:typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${n}={${er(i,r)}}`:n==="children"?"":`${n}={${Ar(i,0,n==="columns")}}`).join(" ")}function Iv(t,e,r,n){let i=Cv(t.props,r),o=i?` ${i}`:"",s=Bs(t.children,e+1,n,r);return s?`${G(e)}<${t.name}${o}>
63
+ ${K(r)}</${a}>`:u=`${K(r)}${l} />`,Vt(u,o,r)}function Lw(t,e){let r=e??"vm";return Object.entries(t).map(([n,i])=>typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${n}={${cr(i,r)}}`:`${n}={${Wr(i,0)}}`).join(" ")}function Vw(t,e,r){let n=Lw(t.props,r),i=n?` ${n}`:"";return`${K(e)}<${t.name}${i} />`}function jw(t,e){let r=e??"vm";return Object.entries(t).map(([n,i])=>n==="action"&&typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="action"?`${n}={${lo(i,!0)}}`:typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${n}={${cr(i,r)}}`:n==="children"?"":`${n}={${Wr(i,0,n==="columns")}}`).join(" ")}function Dw(t,e,r,n){let i=jw(t.props,r),o=i?` ${i}`:"",s=da(t.children,e+1,n,r);return s?`${K(e)}<${t.name}${o}>
64
64
  ${s}
65
- ${G(e)}</${t.name}>`:`${G(e)}<${t.name}${o} />`}function ff(t,e,r){return t in e.elements&&!r.includes(t)}function _n(t,e){if(t.kind==="viewRef"){e.add(t.name);return}if(t.kind==="component"){for(let r of t.children)_n(r,e);return}if(t.kind==="map"&&_n(t.body,e),t.kind==="fragment")for(let r of t.children)_n(r,e)}function Zt(t,e,r,n){if(t.kind==="component"){ff(t.name,e,r)||n.add(t.name);for(let i of t.children)Zt(i,e,r,n);return}if(t.kind==="map"&&Zt(t.body,e,r,n),t.kind==="fragment")for(let i of t.children)Zt(i,e,r,n)}function pf(t,e){let r=(n,i,o)=>n.kind==="viewRef"?Pv(n,i,o):n.kind!=="component"?"":ff(n.name,t,e)?kv(n,t.elements[n.name],i,o,r):Iv(n,i,o,r);return(n,i,o)=>r(n,i,o)}var df=J(()=>{"use strict";of()});var Us={};Cr(Us,{partialReactOutputPath:()=>jv,renderReactComponent:()=>Hs,renderReactFromIr:()=>Mv,renderReactPreviewBundle:()=>Lv});import{resolve as Rv}from"node:path";function Nv(t){if(t.isPartial)return t.exportName;let e=t.exportName.replace(/View$/,"")||t.exportName;return e.charAt(0).toUpperCase()+e.slice(1)}function Tv(t,e){if(t.kind!=="component")throw new Error(`View IR root must be a component node (${e})`);return t}function mf(t){if(!t)return[];let e=t.match(/\b[A-Z][A-Za-z0-9]*ViewModel\b/g);return e?[...new Set(e)]:[]}function Av(t){if(!t.propsType)return"";let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?`{ ${e[1].trim().split(/[,;]/).map(i=>i.split(":")[0].trim()).filter(Boolean).join(", ")} }: ${t.propsType}`:`props: ${t.propsType}`}function hf(t){return t.trimStart().startsWith("{")?`return (
65
+ ${K(e)}</${t.name}>`:`${K(e)}<${t.name}${o} />`}function Fp(t,e,r){return t in e.elements&&!r.includes(t)}function Ln(t,e){if(t.kind==="viewRef"){e.add(t.name);return}if(t.kind==="component"){for(let r of t.children)Ln(r,e);return}if(t.kind==="map"&&Ln(t.body,e),t.kind==="fragment")for(let r of t.children)Ln(r,e)}function ur(t,e,r,n){if(t.kind==="component"){Fp(t.name,e,r)||n.add(t.name);for(let i of t.children)ur(i,e,r,n);return}if(t.kind==="map"&&ur(t.body,e,r,n),t.kind==="fragment")for(let i of t.children)ur(i,e,r,n)}function Bp(t,e){let r=(n,i,o)=>n.kind==="viewRef"?Vw(n,i,o):n.kind!=="component"?"":Fp(n.name,t,e)?Ow(n,t.elements[n.name],i,o,r):Dw(n,i,o,r);return(n,i,o)=>r(n,i,o)}var Hp=X(()=>{"use strict";Op()});var ma={};lr(ma,{partialReactOutputPath:()=>Gw,renderReactComponent:()=>ha,renderReactFromIr:()=>zw,renderReactPreviewBundle:()=>Uw});import{resolve as qw}from"node:path";function Fw(t){if(t.isPartial)return t.exportName;let e=t.exportName.replace(/View$/,"")||t.exportName;return e.charAt(0).toUpperCase()+e.slice(1)}function Bw(t,e){if(t.kind!=="component")throw new Error(`View IR root must be a component node (${e})`);return t}function zp(t){if(!t)return[];let e=t.match(/\b[A-Z][A-Za-z0-9]*ViewModel\b/g);return e?[...new Set(e)]:[]}function Hw(t){if(!t.propsType)return"";let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?`{ ${e[1].trim().split(/[,;]/).map(i=>i.split(":")[0].trim()).filter(Boolean).join(", ")} }: ${t.propsType}`:`props: ${t.propsType}`}function Wp(t){return t.trimStart().startsWith("{")?`return (
66
66
  <>${t}
67
67
  </>
68
68
  );`:`return (
69
69
  ${t}
70
- );`}function Ov(t){let e=t.replace(/^\/\*\*[\s\S]*?\*\/\s*/,"");return e=e.replace(/^import\s[^\n]+\n/gm,""),e.trimStart()}async function gf(t,e){let r=await js(e.elementMapPath),n=e.allowlistExtra??[],i=Nv(t),o=Tv(t.root,t.source),a=pf(r,n)(o,2),u=new Set;Zt(t.root,r,n,u);let c=[...u].sort(),p=new Set;_n(t.root,p);let f=[...p].sort(),d=e.previewImports,m=d?.dispatch??e.runtimeImportFrom,g=d?.contracts??e.contractsImportFrom,y=d?.extensions??e.extensionsImportFrom,_=new Set;if(t.isPartial)for(let T of mf(t.propsType))_.add(T);else _.add(t.viewModel);let b=["import type { ReactElement } from 'react';"];b.push(`import { dispatchAction } from '${m}';`);let L=[..._].sort(),q=L.length>0?`${L.join(", ")}, ActionDescriptor`:"ActionDescriptor";b.push(`import type { ${q} } from '${g}';`),c.length>0&&b.push(`import { ${c.join(", ")} } from '${y}';`);for(let T of f){if(e.inlineViewRefs)continue;let M=e.viewRefImportFrom?.get(T)??`./${T}.generated.js`;b.push(`import { ${T} } from '${M}';`)}let A=d?`/**
70
+ );`}function Ww(t){let e=t.replace(/^\/\*\*[\s\S]*?\*\/\s*/,"");return e=e.replace(/^import\s[^\n]+\n/gm,""),e.trimStart()}async function Up(t,e){let r=await la(e.elementMapPath),n=e.allowlistExtra??[],i=Fw(t),o=Bw(t.root,t.source),a=Bp(r,n)(o,2),l=new Set;ur(t.root,r,n,l);let u=[...l].sort(),f=new Set;Ln(t.root,f);let p=[...f].sort(),d=e.previewImports,m=d?.dispatch??e.runtimeImportFrom,g=d?.contracts??e.contractsImportFrom,y=d?.extensions??e.extensionsImportFrom,v=new Set;if(t.isPartial)for(let A of zp(t.propsType))v.add(A);else v.add(t.viewModel);let w=["import type { ReactElement } from 'react';"];w.push(`import { dispatchAction } from '${m}';`);let R=[...v].sort(),O=R.length>0?`${R.join(", ")}, ActionDescriptor`:"ActionDescriptor";w.push(`import type { ${O} } from '${g}';`),u.length>0&&w.push(`import { ${u.join(", ")} } from '${y}';`);for(let A of p){if(e.inlineViewRefs)continue;let L=e.viewRefImportFrom?.get(A)??`./${A}.generated.js`;w.push(`import { ${A} } from '${L}';`)}let I=d?`/**
71
71
  * Preview module \u2014 compiled live from ${t.source}
72
72
  * Same lowering as generated/; not written to disk.
73
73
  */`:`/**
74
74
  * Auto-generated React component from ${t.source}
75
75
  * DO NOT EDIT \u2014 regenerate with: view-contracts render react
76
- */`;if(t.isPartial){let T=Av(t);return`${A}
77
- ${b.join(`
76
+ */`;if(t.isPartial){let A=Hw(t);return`${I}
77
+ ${w.join(`
78
78
  `)}
79
79
 
80
- export function ${i}(${T}): ReactElement {
81
- ${hf(a)}
80
+ export function ${i}(${A}): ReactElement {
81
+ ${Wp(a)}
82
82
  }
83
- `}return`${A}
84
- ${b.join(`
83
+ `}return`${I}
84
+ ${w.join(`
85
85
  `)}
86
86
 
87
87
  export function ${i}({ vm }: { vm: ${t.viewModel} }): ReactElement {
88
- ${hf(a)}
88
+ ${Wp(a)}
89
89
  }
90
- `}async function Hs(t,e){return gf(t,e)}async function Mv(t,e,r){let{writeFile:n,mkdir:i}=await import("node:fs/promises"),{dirname:o}=await import("node:path"),s=await gf(t,r);await i(o(e),{recursive:!0}),await n(e,s,"utf-8")}async function Lv(t,e,r){let n={...r,inlineViewRefs:!0},i=await Promise.all(e.map(A=>Hs(A,n))),o=await Hs(t,n),s=Ov,a=await js(r.elementMapPath),u=r.allowlistExtra??[],c=new Set;Zt(t.root,a,u,c);for(let A of e)Zt(A.root,a,u,c);let p=r.previewImports,f=p?.dispatch??r.runtimeImportFrom,d=p?.contracts??r.contractsImportFrom,m=p?.extensions??r.extensionsImportFrom,g=new Set([t.viewModel]);for(let A of e)for(let T of mf(A.propsType))g.add(T);let y=["import type { ReactElement } from 'react';",`import { dispatchAction } from '${f}';`,`import type { ${[...g].sort().join(", ")}, ActionDescriptor } from '${d}';`],_=[...c].sort();_.length>0&&y.push(`import { ${_.join(", ")} } from '${m}';`);let b=p?`/**
90
+ `}async function ha(t,e){return Up(t,e)}async function zw(t,e,r){let{writeFile:n,mkdir:i}=await import("node:fs/promises"),{dirname:o}=await import("node:path"),s=await Up(t,r);await i(o(e),{recursive:!0}),await n(e,s,"utf-8")}async function Uw(t,e,r){let n={...r,inlineViewRefs:!0},i=await Promise.all(e.map(I=>ha(I,n))),o=await ha(t,n),s=Ww,a=await la(r.elementMapPath),l=r.allowlistExtra??[],u=new Set;ur(t.root,a,l,u);for(let I of e)ur(I.root,a,l,u);let f=r.previewImports,p=f?.dispatch??r.runtimeImportFrom,d=f?.contracts??r.contractsImportFrom,m=f?.extensions??r.extensionsImportFrom,g=new Set([t.viewModel]);for(let I of e)for(let A of zp(I.propsType))g.add(A);let y=["import type { ReactElement } from 'react';",`import { dispatchAction } from '${p}';`,`import type { ${[...g].sort().join(", ")}, ActionDescriptor } from '${d}';`],v=[...u].sort();v.length>0&&y.push(`import { ${v.join(", ")} } from '${m}';`);let w=f?`/**
91
91
  * Preview module \u2014 compiled live from ${t.source}
92
92
  * Same lowering as generated/; not written to disk.
93
- */`:"",L=i.map(s),q=s(o);return`${b}
93
+ */`:"",R=i.map(s),O=s(o);return`${w}
94
94
  ${y.join(`
95
95
  `)}
96
96
 
97
- ${L.join(`
97
+ ${R.join(`
98
98
 
99
99
  `)}
100
100
 
101
- ${q}`}function jv(t,e){return Rv(t,"components",`${e.exportName}.generated.tsx`)}var zs=J(()=>{"use strict";Qu();df()});var Le=$(We=>{"use strict";We.__esModule=!0;We.extend=yf;We.indexOf=Bv;We.escapeExpression=Hv;We.isEmpty=Uv;We.createFrame=zv;We.blockParams=Wv;We.appendContextPath=Gv;var Vv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},Dv=/[&<>"'`=]/g,qv=/[&<>"'`=]/;function Fv(t){return Vv[t]}function yf(t){for(var e=1;e<arguments.length;e++)for(var r in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],r)&&(t[r]=arguments[e][r]);return t}var Gs=Object.prototype.toString;We.toString=Gs;var Ws=function(e){return typeof e=="function"};Ws(/x/)&&(We.isFunction=Ws=function(t){return typeof t=="function"&&Gs.call(t)==="[object Function]"});We.isFunction=Ws;var vf=Array.isArray||function(t){return t&&typeof t=="object"?Gs.call(t)==="[object Array]":!1};We.isArray=vf;function Bv(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function Hv(t){if(typeof t!="string"){if(t&&t.toHTML)return t.toHTML();if(t==null)return"";if(!t)return t+"";t=""+t}return qv.test(t)?t.replace(Dv,Fv):t}function Uv(t){return!t&&t!==0?!0:!!(vf(t)&&t.length===0)}function zv(t){var e=yf({},t);return e._parent=t,e}function Wv(t,e){return t.path=e,t}function Gv(t,e){return(t?t+".":"")+e}});var Ge=$((Ui,wf)=>{"use strict";Ui.__esModule=!0;var Ks=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Js(t,e){var r=e&&e.loc,n=void 0,i=void 0,o=void 0,s=void 0;r&&(n=r.start.line,i=r.end.line,o=r.start.column,s=r.end.column,t+=" - "+n+":"+o);for(var a=Error.prototype.constructor.call(this,t),u=0;u<Ks.length;u++)this[Ks[u]]=a[Ks[u]];Error.captureStackTrace&&Error.captureStackTrace(this,Js);try{r&&(this.lineNumber=n,this.endLineNumber=i,Object.defineProperty?(Object.defineProperty(this,"column",{value:o,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:s,enumerable:!0})):(this.column=o,this.endColumn=s))}catch{}}Js.prototype=new Error;Ui.default=Js;wf.exports=Ui.default});var bf=$((zi,_f)=>{"use strict";zi.__esModule=!0;var Ys=Le();zi.default=function(t){t.registerHelper("blockHelperMissing",function(e,r){var n=r.inverse,i=r.fn;if(e===!0)return i(this);if(e===!1||e==null)return n(this);if(Ys.isArray(e))return e.length>0?(r.ids&&(r.ids=[r.name]),t.helpers.each(e,r)):n(this);if(r.data&&r.ids){var o=Ys.createFrame(r.data);o.contextPath=Ys.appendContextPath(r.data.contextPath,r.name),r={data:o}}return i(e,r)})};_f.exports=zi.default});var $f=$((Wi,Sf)=>{"use strict";Wi.__esModule=!0;function Kv(t){return t&&t.__esModule?t:{default:t}}var $n=Le(),Jv=Ge(),Yv=Kv(Jv);Wi.default=function(t){t.registerHelper("each",function(e,r){if(!r)throw new Yv.default("Must pass iterator to #each");var n=r.fn,i=r.inverse,o=0,s="",a=void 0,u=void 0;r.data&&r.ids&&(u=$n.appendContextPath(r.data.contextPath,r.ids[0])+"."),$n.isFunction(e)&&(e=e.call(this)),r.data&&(a=$n.createFrame(r.data));function c(g,y,_){a&&(a.key=g,a.index=y,a.first=y===0,a.last=!!_,u&&(a.contextPath=u+g)),s=s+n(e[g],{data:a,blockParams:$n.blockParams([e[g],g],[u+g,null])})}if(e&&typeof e=="object")if($n.isArray(e))for(var p=e.length;o<p;o++)o in e&&c(o,o,o===e.length-1);else if(typeof Symbol=="function"&&e[Symbol.iterator]){for(var f=[],d=e[Symbol.iterator](),m=d.next();!m.done;m=d.next())f.push(m.value);e=f;for(var p=e.length;o<p;o++)c(o,o,o===e.length-1)}else(function(){var g=void 0;Object.keys(e).forEach(function(y){g!==void 0&&c(g,o-1),g=y,o++}),g!==void 0&&c(g,o-1,!0)})();return o===0&&(s=i(this)),s})};Sf.exports=Wi.default});var kf=$((Gi,xf)=>{"use strict";Gi.__esModule=!0;function Xv(t){return t&&t.__esModule?t:{default:t}}var Qv=Ge(),Zv=Xv(Qv);Gi.default=function(t){t.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new Zv.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};xf.exports=Gi.default});var If=$((Ki,Cf)=>{"use strict";Ki.__esModule=!0;function ew(t){return t&&t.__esModule?t:{default:t}}var Ef=Le(),tw=Ge(),Pf=ew(tw);Ki.default=function(t){t.registerHelper("if",function(e,r){if(arguments.length!=2)throw new Pf.default("#if requires exactly one argument");return Ef.isFunction(e)&&(e=e.call(this)),!r.hash.includeZero&&!e||Ef.isEmpty(e)?r.inverse(this):r.fn(this)}),t.registerHelper("unless",function(e,r){if(arguments.length!=2)throw new Pf.default("#unless requires exactly one argument");return t.helpers.if.call(this,e,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};Cf.exports=Ki.default});var Nf=$((Ji,Rf)=>{"use strict";Ji.__esModule=!0;Ji.default=function(t){t.registerHelper("log",function(){for(var e=[void 0],r=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)e.push(arguments[n]);var i=1;r.hash.level!=null?i=r.hash.level:r.data&&r.data.level!=null&&(i=r.data.level),e[0]=i,t.log.apply(t,e)})};Rf.exports=Ji.default});var Af=$((Yi,Tf)=>{"use strict";Yi.__esModule=!0;Yi.default=function(t){t.registerHelper("lookup",function(e,r,n){return e&&n.lookupProperty(e,r)})};Tf.exports=Yi.default});var Mf=$((Xi,Of)=>{"use strict";Xi.__esModule=!0;function rw(t){return t&&t.__esModule?t:{default:t}}var xn=Le(),nw=Ge(),iw=rw(nw);Xi.default=function(t){t.registerHelper("with",function(e,r){if(arguments.length!=2)throw new iw.default("#with requires exactly one argument");xn.isFunction(e)&&(e=e.call(this));var n=r.fn;if(xn.isEmpty(e))return r.inverse(this);var i=r.data;return r.data&&r.ids&&(i=xn.createFrame(r.data),i.contextPath=xn.appendContextPath(r.data.contextPath,r.ids[0])),n(e,{data:i,blockParams:xn.blockParams([e],[i&&i.contextPath])})})};Of.exports=Xi.default});var Xs=$(Qi=>{"use strict";Qi.__esModule=!0;Qi.registerDefaultHelpers=ww;Qi.moveHelperToHooks=_w;function tr(t){return t&&t.__esModule?t:{default:t}}var ow=bf(),sw=tr(ow),aw=$f(),lw=tr(aw),cw=kf(),uw=tr(cw),fw=If(),pw=tr(fw),dw=Nf(),hw=tr(dw),mw=Af(),gw=tr(mw),yw=Mf(),vw=tr(yw);function ww(t){sw.default(t),lw.default(t),uw.default(t),pw.default(t),hw.default(t),gw.default(t),vw.default(t)}function _w(t,e,r){t.helpers[e]&&(t.hooks[e]=t.helpers[e],r||(t.helpers[e]=void 0))}});var jf=$((Zi,Lf)=>{"use strict";Zi.__esModule=!0;var bw=Le();Zi.default=function(t){t.registerDecorator("inline",function(e,r,n,i){var o=e;return r.partials||(r.partials={},o=function(s,a){var u=n.partials;n.partials=bw.extend({},u,r.partials);var c=e(s,a);return n.partials=u,c}),r.partials[i.args[0]]=i.fn,o})};Lf.exports=Zi.default});var Vf=$(Qs=>{"use strict";Qs.__esModule=!0;Qs.registerDefaultDecorators=kw;function Sw(t){return t&&t.__esModule?t:{default:t}}var $w=jf(),xw=Sw($w);function kw(t){xw.default(t)}});var Zs=$((eo,Df)=>{"use strict";eo.__esModule=!0;var Ew=Le(),Or={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var r=Ew.indexOf(Or.methodMap,e.toLowerCase());r>=0?e=r:e=parseInt(e,10)}return e},log:function(e){if(e=Or.lookupLevel(e),typeof console<"u"&&Or.lookupLevel(Or.level)<=e){var r=Or.methodMap[e];console[r]||(r="log");for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];console[r].apply(console,i)}}};eo.default=Or;Df.exports=eo.default});var ea=$(kn=>{"use strict";kn.__esModule=!0;kn.createProtoAccessControl=Rw;kn.resultIsAllowed=Nw;kn.resetLoggedProperties=Aw;function Pw(t){return t&&t.__esModule?t:{default:t}}var qf=Le(),Cw=Zs(),Iw=Pw(Cw),to=Object.create(null);function Rw(t){var e=Object.create(null);e.__proto__=!1,qf.extend(e,t.allowedProtoProperties);var r=Object.create(null);return r.constructor=!1,r.__defineGetter__=!1,r.__defineSetter__=!1,r.__lookupGetter__=!1,r.__lookupSetter__=!1,qf.extend(r,t.allowedProtoMethods),{properties:{whitelist:e,defaultValue:t.allowProtoPropertiesByDefault},methods:{whitelist:r,defaultValue:t.allowProtoMethodsByDefault}}}function Nw(t,e,r){return Ff(typeof t=="function"?e.methods:e.properties,r)}function Ff(t,e){return t.whitelist[e]!==void 0?t.whitelist[e]===!0:t.defaultValue!==void 0?t.defaultValue:(Tw(e),!1)}function Tw(t){to[t]!==!0&&(to[t]=!0,Iw.default.log("error",'Handlebars: Access has been denied to resolve the property "'+t+`" because it is not an "own property" of its parent.
101
+ ${O}`}function Gw(t,e){return qw(t,"components",`${e.exportName}.generated.tsx`)}var ga=X(()=>{"use strict";Ip();Hp()});var Be=$(et=>{"use strict";et.__esModule=!0;et.extend=Gp;et.indexOf=Qw;et.escapeExpression=Zw;et.isEmpty=eb;et.createFrame=tb;et.blockParams=rb;et.appendContextPath=nb;var Jw={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},Kw=/[&<>"'`=]/g,Yw=/[&<>"'`=]/;function Xw(t){return Jw[t]}function Gp(t){for(var e=1;e<arguments.length;e++)for(var r in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],r)&&(t[r]=arguments[e][r]);return t}var va=Object.prototype.toString;et.toString=va;var ya=function(e){return typeof e=="function"};ya(/x/)&&(et.isFunction=ya=function(t){return typeof t=="function"&&va.call(t)==="[object Function]"});et.isFunction=ya;var Jp=Array.isArray||function(t){return t&&typeof t=="object"?va.call(t)==="[object Array]":!1};et.isArray=Jp;function Qw(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function Zw(t){if(typeof t!="string"){if(t&&t.toHTML)return t.toHTML();if(t==null)return"";if(!t)return t+"";t=""+t}return Yw.test(t)?t.replace(Kw,Xw):t}function eb(t){return!t&&t!==0?!0:!!(Jp(t)&&t.length===0)}function tb(t){var e=Gp({},t);return e._parent=t,e}function rb(t,e){return t.path=e,t}function nb(t,e){return(t?t+".":"")+e}});var tt=$((uo,Kp)=>{"use strict";uo.__esModule=!0;var wa=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function ba(t,e){var r=e&&e.loc,n=void 0,i=void 0,o=void 0,s=void 0;r&&(n=r.start.line,i=r.end.line,o=r.start.column,s=r.end.column,t+=" - "+n+":"+o);for(var a=Error.prototype.constructor.call(this,t),l=0;l<wa.length;l++)this[wa[l]]=a[wa[l]];Error.captureStackTrace&&Error.captureStackTrace(this,ba);try{r&&(this.lineNumber=n,this.endLineNumber=i,Object.defineProperty?(Object.defineProperty(this,"column",{value:o,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:s,enumerable:!0})):(this.column=o,this.endColumn=s))}catch{}}ba.prototype=new Error;uo.default=ba;Kp.exports=uo.default});var Xp=$((co,Yp)=>{"use strict";co.__esModule=!0;var _a=Be();co.default=function(t){t.registerHelper("blockHelperMissing",function(e,r){var n=r.inverse,i=r.fn;if(e===!0)return i(this);if(e===!1||e==null)return n(this);if(_a.isArray(e))return e.length>0?(r.ids&&(r.ids=[r.name]),t.helpers.each(e,r)):n(this);if(r.data&&r.ids){var o=_a.createFrame(r.data);o.contextPath=_a.appendContextPath(r.data.contextPath,r.name),r={data:o}}return i(e,r)})};Yp.exports=co.default});var Zp=$((po,Qp)=>{"use strict";po.__esModule=!0;function ib(t){return t&&t.__esModule?t:{default:t}}var Dn=Be(),ob=tt(),sb=ib(ob);po.default=function(t){t.registerHelper("each",function(e,r){if(!r)throw new sb.default("Must pass iterator to #each");var n=r.fn,i=r.inverse,o=0,s="",a=void 0,l=void 0;r.data&&r.ids&&(l=Dn.appendContextPath(r.data.contextPath,r.ids[0])+"."),Dn.isFunction(e)&&(e=e.call(this)),r.data&&(a=Dn.createFrame(r.data));function u(g,y,v){a&&(a.key=g,a.index=y,a.first=y===0,a.last=!!v,l&&(a.contextPath=l+g)),s=s+n(e[g],{data:a,blockParams:Dn.blockParams([e[g],g],[l+g,null])})}if(e&&typeof e=="object")if(Dn.isArray(e))for(var f=e.length;o<f;o++)o in e&&u(o,o,o===e.length-1);else if(typeof Symbol=="function"&&e[Symbol.iterator]){for(var p=[],d=e[Symbol.iterator](),m=d.next();!m.done;m=d.next())p.push(m.value);e=p;for(var f=e.length;o<f;o++)u(o,o,o===e.length-1)}else(function(){var g=void 0;Object.keys(e).forEach(function(y){g!==void 0&&u(g,o-1),g=y,o++}),g!==void 0&&u(g,o-1,!0)})();return o===0&&(s=i(this)),s})};Qp.exports=po.default});var tf=$((fo,ef)=>{"use strict";fo.__esModule=!0;function ab(t){return t&&t.__esModule?t:{default:t}}var lb=tt(),ub=ab(lb);fo.default=function(t){t.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new ub.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};ef.exports=fo.default});var sf=$((ho,of)=>{"use strict";ho.__esModule=!0;function cb(t){return t&&t.__esModule?t:{default:t}}var rf=Be(),pb=tt(),nf=cb(pb);ho.default=function(t){t.registerHelper("if",function(e,r){if(arguments.length!=2)throw new nf.default("#if requires exactly one argument");return rf.isFunction(e)&&(e=e.call(this)),!r.hash.includeZero&&!e||rf.isEmpty(e)?r.inverse(this):r.fn(this)}),t.registerHelper("unless",function(e,r){if(arguments.length!=2)throw new nf.default("#unless requires exactly one argument");return t.helpers.if.call(this,e,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};of.exports=ho.default});var lf=$((mo,af)=>{"use strict";mo.__esModule=!0;mo.default=function(t){t.registerHelper("log",function(){for(var e=[void 0],r=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)e.push(arguments[n]);var i=1;r.hash.level!=null?i=r.hash.level:r.data&&r.data.level!=null&&(i=r.data.level),e[0]=i,t.log.apply(t,e)})};af.exports=mo.default});var cf=$((go,uf)=>{"use strict";go.__esModule=!0;go.default=function(t){t.registerHelper("lookup",function(e,r,n){return e&&n.lookupProperty(e,r)})};uf.exports=go.default});var ff=$((yo,pf)=>{"use strict";yo.__esModule=!0;function fb(t){return t&&t.__esModule?t:{default:t}}var qn=Be(),db=tt(),hb=fb(db);yo.default=function(t){t.registerHelper("with",function(e,r){if(arguments.length!=2)throw new hb.default("#with requires exactly one argument");qn.isFunction(e)&&(e=e.call(this));var n=r.fn;if(qn.isEmpty(e))return r.inverse(this);var i=r.data;return r.data&&r.ids&&(i=qn.createFrame(r.data),i.contextPath=qn.appendContextPath(r.data.contextPath,r.ids[0])),n(e,{data:i,blockParams:qn.blockParams([e],[i&&i.contextPath])})})};pf.exports=yo.default});var xa=$(vo=>{"use strict";vo.__esModule=!0;vo.registerDefaultHelpers=Ib;vo.moveHelperToHooks=Rb;function pr(t){return t&&t.__esModule?t:{default:t}}var mb=Xp(),gb=pr(mb),yb=Zp(),vb=pr(yb),wb=tf(),bb=pr(wb),_b=sf(),xb=pr(_b),$b=lf(),Sb=pr($b),kb=cf(),Cb=pr(kb),Eb=ff(),Pb=pr(Eb);function Ib(t){gb.default(t),vb.default(t),bb.default(t),xb.default(t),Sb.default(t),Cb.default(t),Pb.default(t)}function Rb(t,e,r){t.helpers[e]&&(t.hooks[e]=t.helpers[e],r||(t.helpers[e]=void 0))}});var hf=$((wo,df)=>{"use strict";wo.__esModule=!0;var Tb=Be();wo.default=function(t){t.registerDecorator("inline",function(e,r,n,i){var o=e;return r.partials||(r.partials={},o=function(s,a){var l=n.partials;n.partials=Tb.extend({},l,r.partials);var u=e(s,a);return n.partials=l,u}),r.partials[i.args[0]]=i.fn,o})};df.exports=wo.default});var mf=$($a=>{"use strict";$a.__esModule=!0;$a.registerDefaultDecorators=Ob;function Ab(t){return t&&t.__esModule?t:{default:t}}var Nb=hf(),Mb=Ab(Nb);function Ob(t){Mb.default(t)}});var Sa=$((bo,gf)=>{"use strict";bo.__esModule=!0;var Lb=Be(),zr={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var r=Lb.indexOf(zr.methodMap,e.toLowerCase());r>=0?e=r:e=parseInt(e,10)}return e},log:function(e){if(e=zr.lookupLevel(e),typeof console<"u"&&zr.lookupLevel(zr.level)<=e){var r=zr.methodMap[e];console[r]||(r="log");for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];console[r].apply(console,i)}}};bo.default=zr;gf.exports=bo.default});var ka=$(Fn=>{"use strict";Fn.__esModule=!0;Fn.createProtoAccessControl=qb;Fn.resultIsAllowed=Fb;Fn.resetLoggedProperties=Hb;function Vb(t){return t&&t.__esModule?t:{default:t}}var yf=Be(),jb=Sa(),Db=Vb(jb),_o=Object.create(null);function qb(t){var e=Object.create(null);e.__proto__=!1,yf.extend(e,t.allowedProtoProperties);var r=Object.create(null);return r.constructor=!1,r.__defineGetter__=!1,r.__defineSetter__=!1,r.__lookupGetter__=!1,r.__lookupSetter__=!1,yf.extend(r,t.allowedProtoMethods),{properties:{whitelist:e,defaultValue:t.allowProtoPropertiesByDefault},methods:{whitelist:r,defaultValue:t.allowProtoMethodsByDefault}}}function Fb(t,e,r){return vf(typeof t=="function"?e.methods:e.properties,r)}function vf(t,e){return t.whitelist[e]!==void 0?t.whitelist[e]===!0:t.defaultValue!==void 0?t.defaultValue:(Bb(e),!1)}function Bb(t){_o[t]!==!0&&(_o[t]=!0,Db.default.log("error",'Handlebars: Access has been denied to resolve the property "'+t+`" because it is not an "own property" of its parent.
102
102
  You can add a runtime option to disable the check or this warning:
103
- See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function Aw(){Object.keys(to).forEach(function(t){delete to[t]})}});var no=$(mt=>{"use strict";mt.__esModule=!0;mt.HandlebarsEnvironment=na;function Bf(t){return t&&t.__esModule?t:{default:t}}var rr=Le(),Ow=Ge(),ta=Bf(Ow),Mw=Xs(),Lw=Vf(),jw=Zs(),ro=Bf(jw),Vw=ea(),Dw="4.7.9";mt.VERSION=Dw;var qw=8;mt.COMPILER_REVISION=qw;var Fw=7;mt.LAST_COMPATIBLE_COMPILER_REVISION=Fw;var Bw={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"};mt.REVISION_CHANGES=Bw;var ra="[object Object]";function na(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},Mw.registerDefaultHelpers(this),Lw.registerDefaultDecorators(this)}na.prototype={constructor:na,logger:ro.default,log:ro.default.log,registerHelper:function(e,r){if(rr.toString.call(e)===ra){if(r)throw new ta.default("Arg not supported with multiple helpers");rr.extend(this.helpers,e)}else this.helpers[e]=r},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,r){if(rr.toString.call(e)===ra)rr.extend(this.partials,e);else{if(typeof r>"u")throw new ta.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,r){if(rr.toString.call(e)===ra){if(r)throw new ta.default("Arg not supported with multiple decorators");rr.extend(this.decorators,e)}else this.decorators[e]=r},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){Vw.resetLoggedProperties()}};var Hw=ro.default.log;mt.log=Hw;mt.createFrame=rr.createFrame;mt.logger=ro.default});var Uf=$((io,Hf)=>{"use strict";io.__esModule=!0;function ia(t){this.string=t}ia.prototype.toString=ia.prototype.toHTML=function(){return""+this.string};io.default=ia;Hf.exports=io.default});var zf=$(oa=>{"use strict";oa.__esModule=!0;oa.wrapHelper=Uw;function Uw(t,e){if(typeof t!="function")return t;var r=function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=e(i),t.apply(this,arguments)};return r}});var Xf=$(Bt=>{"use strict";Bt.__esModule=!0;Bt.checkRevision=Yw;Bt.template=Xw;Bt.wrapProgram=oo;Bt.resolvePartial=Qw;Bt.invokePartial=Zw;Bt.noop=Jf;function zw(t){return t&&t.__esModule?t:{default:t}}function Ww(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var Gw=Le(),Mr=Ww(Gw),Kw=Ge(),Nt=zw(Kw),Tt=no(),Wf=Xs(),Jw=zf(),Gf=ea();function Yw(t){var e=t&&t[0]||1,r=Tt.COMPILER_REVISION;if(!(e>=Tt.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Tt.COMPILER_REVISION))if(e<Tt.LAST_COMPATIBLE_COMPILER_REVISION){var n=Tt.REVISION_CHANGES[r],i=Tt.REVISION_CHANGES[e];throw new Nt.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+i+").")}else throw new Nt.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 Xw(t,e){if(!e)throw new Nt.default("No environment passed to template");if(!t||!t.main)throw new Nt.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var r=t.compiler&&t.compiler[0]===7;function n(s,a,u){u.hash&&(a=Mr.extend({},a,u.hash),u.ids&&(u.ids[0]=!0)),s=e.VM.resolvePartial.call(this,s,a,u),u.hooks=this.hooks,u.protoAccessControl=this.protoAccessControl;var c=e.VM.invokePartial.call(this,s,a,u);if(c==null&&e.compile&&(u.partials[u.name]=e.compile(s,t.compilerOptions,e),c=u.partials[u.name](a,u)),c!=null){if(u.indent){for(var p=c.split(`
104
- `),f=0,d=p.length;f<d&&!(!p[f]&&f+1===d);f++)p[f]=u.indent+p[f];c=p.join(`
105
- `)}return c}else throw new Nt.default("The partial "+u.name+" could not be compiled when running in runtime-only mode")}var i={strict:function(a,u,c){if(!a||!(u in a))throw new Nt.default('"'+u+'" not defined in '+a,{loc:c});return i.lookupProperty(a,u)},lookupProperty:function(a,u){var c=a[u];if(c==null||Object.prototype.hasOwnProperty.call(a,u)||Gf.resultIsAllowed(c,i.protoAccessControl,u))return c},lookup:function(a,u){for(var c=a.length,p=0;p<c;p++){var f=a[p]&&i.lookupProperty(a[p],u);if(f!=null)return f}},lambda:function(a,u){return typeof a=="function"?a.call(u):a},escapeExpression:Mr.escapeExpression,invokePartial:n,fn:function(a){var u=t[a];return u.decorator=t[a+"_d"],u},programs:[],program:function(a,u,c,p,f){var d=this.programs[a],m=this.fn(a);return u||f||p||c?d=oo(this,a,m,u,c,p,f):d||(d=this.programs[a]=oo(this,a,m)),d},data:function(a,u){for(;a&&u--;)a=a._parent;return a},mergeIfNeeded:function(a,u){var c=a||u;return a&&u&&a!==u&&(c=Mr.extend({},u,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],u=a.data;o._setup(a),!a.partial&&t.useData&&(u=e_(s,u));var c=void 0,p=t.useBlockParams?[]:void 0;t.useDepths&&(a.depths?c=s!=a.depths[0]?[s].concat(a.depths):a.depths:c=[s]);function f(d){return""+t.main(i,d,i.helpers,i.partials,u,p,c)}return f=Yf(t.main,f,i,a.depths||[],u,p),f(s,a)}return o.isTop=!0,o._setup=function(s){if(s.partial)i.protoAccessControl=s.protoAccessControl,i.helpers=s.helpers,i.partials=s.partials,i.decorators=s.decorators,i.hooks=s.hooks;else{var a={};Kf(a,e.helpers,i),Kf(a,s.helpers,i),i.helpers=a,t.usePartial&&(i.partials=i.mergeIfNeeded(s.partials,e.partials)),(t.usePartial||t.useDecorators)&&(i.decorators=Mr.extend({},e.decorators,s.decorators)),i.hooks={},i.protoAccessControl=Gf.createProtoAccessControl(s);var u=s.allowCallsToHelperMissing||r;Wf.moveHelperToHooks(i,"helperMissing",u),Wf.moveHelperToHooks(i,"blockHelperMissing",u)}},o._child=function(s,a,u,c){if(t.useBlockParams&&!u)throw new Nt.default("must pass block params");if(t.useDepths&&!c)throw new Nt.default("must pass parent depths");return oo(i,s,t[s],a,0,u,c)},o}function oo(t,e,r,n,i,o,s){function a(u){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],p=s;return s&&u!=s[0]&&!(u===t.nullContext&&s[0]===null)&&(p=[u].concat(s)),r(t,u,t.helpers,t.partials,c.data||n,o&&[c.blockParams].concat(o),p)}return a=Yf(r,a,t,s,n,o),a.program=e,a.depth=s?s.length:0,a.blockParams=i||0,a}function Qw(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=so(r.partials,t)):r.name==="@partial-block"?t=so(r.data,"partial-block"):t=so(r.partials,r.name),t}function Zw(t,e,r){var n=so(r.data,"partial-block");r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var i=void 0;if(r.fn&&r.fn!==Jf&&(function(){r.data=Tt.createFrame(r.data);var o=r.fn;i=r.data["partial-block"]=function(a){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return u.data=Tt.createFrame(u.data),u.data["partial-block"]=n,o(a,u)},o.partials&&(r.partials=Mr.extend({},r.partials,o.partials))})(),t===void 0&&i&&(t=i),t===void 0)throw new Nt.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}function Jf(){return""}function so(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function e_(t,e){return(!e||!("root"in e))&&(e=e?Tt.createFrame(e):{},e.root=t),e}function Yf(t,e,r,n,i,o){if(t.decorator){var s={};e=t.decorator(e,s,r,n&&n[0],i,o,n),Mr.extend(e,s)}return e}function Kf(t,e,r){e&&Object.keys(e).forEach(function(n){var i=e[n];t[n]=t_(i,r)})}function t_(t,e){var r=e.lookupProperty;return Jw.wrapHelper(t,function(n){return n.lookupProperty=r,n})}});var sa=$((ao,Qf)=>{"use strict";ao.__esModule=!0;ao.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}};Qf.exports=ao.default});var np=$((lo,rp)=>{"use strict";lo.__esModule=!0;function la(t){return t&&t.__esModule?t:{default:t}}function ca(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var r_=no(),Zf=ca(r_),n_=Uf(),i_=la(n_),o_=Ge(),s_=la(o_),a_=Le(),aa=ca(a_),l_=Xf(),ep=ca(l_),c_=sa(),u_=la(c_);function tp(){var t=new Zf.HandlebarsEnvironment;return aa.extend(t,Zf),t.SafeString=i_.default,t.Exception=s_.default,t.Utils=aa,t.escapeExpression=aa.escapeExpression,t.VM=ep,t.template=function(e){return ep.template(e,t)},t}var En=tp();En.create=tp;u_.default(En);En.default=En;lo.default=En;rp.exports=lo.default});var ua=$((co,op)=>{"use strict";co.__esModule=!0;var ip={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&&!ip.helpers.scopedId(e)&&!e.depth}}};co.default=ip;op.exports=co.default});var ap=$((uo,sp)=>{"use strict";uo.__esModule=!0;var f_=(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,u,c,p){var f=c.length-1;switch(u){case 1:return c[f-1];case 2:this.$=a.prepareProgram(c[f]);break;case 3:this.$=c[f];break;case 4:this.$=c[f];break;case 5:this.$=c[f];break;case 6:this.$=c[f];break;case 7:this.$=c[f];break;case 8:this.$=c[f];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(c[f]),strip:a.stripFlags(c[f],c[f]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:c[f],value:c[f],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(c[f-2],c[f-1],c[f],this._$);break;case 12:this.$={path:c[f-3],params:c[f-2],hash:c[f-1]};break;case 13:this.$=a.prepareBlock(c[f-3],c[f-2],c[f-1],c[f],!1,this._$);break;case 14:this.$=a.prepareBlock(c[f-3],c[f-2],c[f-1],c[f],!0,this._$);break;case 15:this.$={open:c[f-5],path:c[f-4],params:c[f-3],hash:c[f-2],blockParams:c[f-1],strip:a.stripFlags(c[f-5],c[f])};break;case 16:this.$={path:c[f-4],params:c[f-3],hash:c[f-2],blockParams:c[f-1],strip:a.stripFlags(c[f-5],c[f])};break;case 17:this.$={path:c[f-4],params:c[f-3],hash:c[f-2],blockParams:c[f-1],strip:a.stripFlags(c[f-5],c[f])};break;case 18:this.$={strip:a.stripFlags(c[f-1],c[f-1]),program:c[f]};break;case 19:var d=a.prepareBlock(c[f-2],c[f-1],c[f],c[f],!1,this._$),m=a.prepareProgram([d],c[f-1].loc);m.chained=!0,this.$={strip:c[f-2].strip,program:m,chain:!0};break;case 20:this.$=c[f];break;case 21:this.$={path:c[f-1],strip:a.stripFlags(c[f-2],c[f])};break;case 22:this.$=a.prepareMustache(c[f-3],c[f-2],c[f-1],c[f-4],a.stripFlags(c[f-4],c[f]),this._$);break;case 23:this.$=a.prepareMustache(c[f-3],c[f-2],c[f-1],c[f-4],a.stripFlags(c[f-4],c[f]),this._$);break;case 24:this.$={type:"PartialStatement",name:c[f-3],params:c[f-2],hash:c[f-1],indent:"",strip:a.stripFlags(c[f-4],c[f]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(c[f-2],c[f-1],c[f],this._$);break;case 26:this.$={path:c[f-3],params:c[f-2],hash:c[f-1],strip:a.stripFlags(c[f-4],c[f])};break;case 27:this.$=c[f];break;case 28:this.$=c[f];break;case 29:this.$={type:"SubExpression",path:c[f-3],params:c[f-2],hash:c[f-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:c[f],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(c[f-2]),value:c[f],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(c[f-1]);break;case 33:this.$=c[f];break;case 34:this.$=c[f];break;case 35:this.$={type:"StringLiteral",value:c[f],original:c[f],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(c[f]),original:Number(c[f]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:c[f]==="true",original:c[f]==="true",loc:a.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:a.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:a.locInfo(this._$)};break;case 40:this.$=c[f];break;case 41:this.$=c[f];break;case 42:this.$=a.preparePath(!0,c[f],this._$);break;case 43:this.$=a.preparePath(!1,c[f],this._$);break;case 44:c[f-2].push({part:a.id(c[f]),original:c[f],separator:c[f-1]}),this.$=c[f-2];break;case 45:this.$=[{part:a.id(c[f]),original:c[f]}];break;case 46:this.$=[];break;case 47:c[f-1].push(c[f]);break;case 48:this.$=[];break;case 49:c[f-1].push(c[f]);break;case 50:this.$=[];break;case 51:c[f-1].push(c[f]);break;case 58:this.$=[];break;case 59:c[f-1].push(c[f]);break;case 64:this.$=[];break;case 65:c[f-1].push(c[f]);break;case 70:this.$=[];break;case 71:c[f-1].push(c[f]);break;case 78:this.$=[];break;case 79:c[f-1].push(c[f]);break;case 82:this.$=[];break;case 83:c[f-1].push(c[f]);break;case 86:this.$=[];break;case 87:c[f-1].push(c[f]);break;case 90:this.$=[];break;case 91:c[f-1].push(c[f]);break;case 94:this.$=[];break;case 95:c[f-1].push(c[f]);break;case 98:this.$=[c[f]];break;case 99:c[f-1].push(c[f]);break;case 100:this.$=[c[f]];break;case 101:c[f-1].push(c[f]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(i,o){throw new Error(i)},parse:function(i){var o=this,s=[0],a=[null],u=[],c=this.table,p="",f=0,d=0,m=0,g=2,y=1;this.lexer.setInput(i),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var _=this.lexer.yylloc;u.push(_);var b=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function L(ae){s.length=s.length-2*ae,a.length=a.length-ae,u.length=u.length-ae}function q(){var ae;return ae=o.lexer.lex()||1,typeof ae!="number"&&(ae=o.symbols_[ae]||ae),ae}for(var A,T,M,X,fe,Ie,$e={},qe,Re,it,ot;;){if(M=s[s.length-1],this.defaultActions[M]?X=this.defaultActions[M]:((A===null||typeof A>"u")&&(A=q()),X=c[M]&&c[M][A]),typeof X>"u"||!X.length||!X[0]){var bt="";if(!m){ot=[];for(qe in c[M])this.terminals_[qe]&&qe>2&&ot.push("'"+this.terminals_[qe]+"'");this.lexer.showPosition?bt="Parse error on line "+(f+1)+`:
103
+ See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function Hb(){Object.keys(_o).forEach(function(t){delete _o[t]})}});var $o=$(St=>{"use strict";St.__esModule=!0;St.HandlebarsEnvironment=Pa;function wf(t){return t&&t.__esModule?t:{default:t}}var fr=Be(),Wb=tt(),Ca=wf(Wb),zb=xa(),Ub=mf(),Gb=Sa(),xo=wf(Gb),Jb=ka(),Kb="4.7.9";St.VERSION=Kb;var Yb=8;St.COMPILER_REVISION=Yb;var Xb=7;St.LAST_COMPATIBLE_COMPILER_REVISION=Xb;var Qb={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"};St.REVISION_CHANGES=Qb;var Ea="[object Object]";function Pa(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},zb.registerDefaultHelpers(this),Ub.registerDefaultDecorators(this)}Pa.prototype={constructor:Pa,logger:xo.default,log:xo.default.log,registerHelper:function(e,r){if(fr.toString.call(e)===Ea){if(r)throw new Ca.default("Arg not supported with multiple helpers");fr.extend(this.helpers,e)}else this.helpers[e]=r},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,r){if(fr.toString.call(e)===Ea)fr.extend(this.partials,e);else{if(typeof r>"u")throw new Ca.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,r){if(fr.toString.call(e)===Ea){if(r)throw new Ca.default("Arg not supported with multiple decorators");fr.extend(this.decorators,e)}else this.decorators[e]=r},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){Jb.resetLoggedProperties()}};var Zb=xo.default.log;St.log=Zb;St.createFrame=fr.createFrame;St.logger=xo.default});var _f=$((So,bf)=>{"use strict";So.__esModule=!0;function Ia(t){this.string=t}Ia.prototype.toString=Ia.prototype.toHTML=function(){return""+this.string};So.default=Ia;bf.exports=So.default});var xf=$(Ra=>{"use strict";Ra.__esModule=!0;Ra.wrapHelper=e0;function e0(t,e){if(typeof t!="function")return t;var r=function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=e(i),t.apply(this,arguments)};return r}});var Pf=$(Kt=>{"use strict";Kt.__esModule=!0;Kt.checkRevision=s0;Kt.template=a0;Kt.wrapProgram=ko;Kt.resolvePartial=l0;Kt.invokePartial=u0;Kt.noop=Cf;function t0(t){return t&&t.__esModule?t:{default:t}}function r0(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var n0=Be(),Ur=r0(n0),i0=tt(),jt=t0(i0),Dt=$o(),$f=xa(),o0=xf(),Sf=ka();function s0(t){var e=t&&t[0]||1,r=Dt.COMPILER_REVISION;if(!(e>=Dt.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Dt.COMPILER_REVISION))if(e<Dt.LAST_COMPATIBLE_COMPILER_REVISION){var n=Dt.REVISION_CHANGES[r],i=Dt.REVISION_CHANGES[e];throw new jt.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+i+").")}else throw new jt.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}function a0(t,e){if(!e)throw new jt.default("No environment passed to template");if(!t||!t.main)throw new jt.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var r=t.compiler&&t.compiler[0]===7;function n(s,a,l){l.hash&&(a=Ur.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 u=e.VM.invokePartial.call(this,s,a,l);if(u==null&&e.compile&&(l.partials[l.name]=e.compile(s,t.compilerOptions,e),u=l.partials[l.name](a,l)),u!=null){if(l.indent){for(var f=u.split(`
104
+ `),p=0,d=f.length;p<d&&!(!f[p]&&p+1===d);p++)f[p]=l.indent+f[p];u=f.join(`
105
+ `)}return u}else throw new jt.default("The partial "+l.name+" could not be compiled when running in runtime-only mode")}var i={strict:function(a,l,u){if(!a||!(l in a))throw new jt.default('"'+l+'" not defined in '+a,{loc:u});return i.lookupProperty(a,l)},lookupProperty:function(a,l){var u=a[l];if(u==null||Object.prototype.hasOwnProperty.call(a,l)||Sf.resultIsAllowed(u,i.protoAccessControl,l))return u},lookup:function(a,l){for(var u=a.length,f=0;f<u;f++){var p=a[f]&&i.lookupProperty(a[f],l);if(p!=null)return p}},lambda:function(a,l){return typeof a=="function"?a.call(l):a},escapeExpression:Ur.escapeExpression,invokePartial:n,fn:function(a){var l=t[a];return l.decorator=t[a+"_d"],l},programs:[],program:function(a,l,u,f,p){var d=this.programs[a],m=this.fn(a);return l||p||f||u?d=ko(this,a,m,l,u,f,p):d||(d=this.programs[a]=ko(this,a,m)),d},data:function(a,l){for(;a&&l--;)a=a._parent;return a},mergeIfNeeded:function(a,l){var u=a||l;return a&&l&&a!==l&&(u=Ur.extend({},l,a)),u},nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:t.compiler};function o(s){var a=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],l=a.data;o._setup(a),!a.partial&&t.useData&&(l=c0(s,l));var u=void 0,f=t.useBlockParams?[]:void 0;t.useDepths&&(a.depths?u=s!=a.depths[0]?[s].concat(a.depths):a.depths:u=[s]);function p(d){return""+t.main(i,d,i.helpers,i.partials,l,f,u)}return p=Ef(t.main,p,i,a.depths||[],l,f),p(s,a)}return o.isTop=!0,o._setup=function(s){if(s.partial)i.protoAccessControl=s.protoAccessControl,i.helpers=s.helpers,i.partials=s.partials,i.decorators=s.decorators,i.hooks=s.hooks;else{var a={};kf(a,e.helpers,i),kf(a,s.helpers,i),i.helpers=a,t.usePartial&&(i.partials=i.mergeIfNeeded(s.partials,e.partials)),(t.usePartial||t.useDecorators)&&(i.decorators=Ur.extend({},e.decorators,s.decorators)),i.hooks={},i.protoAccessControl=Sf.createProtoAccessControl(s);var l=s.allowCallsToHelperMissing||r;$f.moveHelperToHooks(i,"helperMissing",l),$f.moveHelperToHooks(i,"blockHelperMissing",l)}},o._child=function(s,a,l,u){if(t.useBlockParams&&!l)throw new jt.default("must pass block params");if(t.useDepths&&!u)throw new jt.default("must pass parent depths");return ko(i,s,t[s],a,0,l,u)},o}function ko(t,e,r,n,i,o,s){function a(l){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],f=s;return s&&l!=s[0]&&!(l===t.nullContext&&s[0]===null)&&(f=[l].concat(s)),r(t,l,t.helpers,t.partials,u.data||n,o&&[u.blockParams].concat(o),f)}return a=Ef(r,a,t,s,n,o),a.program=e,a.depth=s?s.length:0,a.blockParams=i||0,a}function l0(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=Co(r.partials,t)):r.name==="@partial-block"?t=Co(r.data,"partial-block"):t=Co(r.partials,r.name),t}function u0(t,e,r){var n=Co(r.data,"partial-block");r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var i=void 0;if(r.fn&&r.fn!==Cf&&(function(){r.data=Dt.createFrame(r.data);var o=r.fn;i=r.data["partial-block"]=function(a){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return l.data=Dt.createFrame(l.data),l.data["partial-block"]=n,o(a,l)},o.partials&&(r.partials=Ur.extend({},r.partials,o.partials))})(),t===void 0&&i&&(t=i),t===void 0)throw new jt.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}function Cf(){return""}function Co(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function c0(t,e){return(!e||!("root"in e))&&(e=e?Dt.createFrame(e):{},e.root=t),e}function Ef(t,e,r,n,i,o){if(t.decorator){var s={};e=t.decorator(e,s,r,n&&n[0],i,o,n),Ur.extend(e,s)}return e}function kf(t,e,r){e&&Object.keys(e).forEach(function(n){var i=e[n];t[n]=p0(i,r)})}function p0(t,e){var r=e.lookupProperty;return o0.wrapHelper(t,function(n){return n.lookupProperty=r,n})}});var Ta=$((Eo,If)=>{"use strict";Eo.__esModule=!0;Eo.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}};If.exports=Eo.default});var Mf=$((Po,Nf)=>{"use strict";Po.__esModule=!0;function Na(t){return t&&t.__esModule?t:{default:t}}function Ma(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var f0=$o(),Rf=Ma(f0),d0=_f(),h0=Na(d0),m0=tt(),g0=Na(m0),y0=Be(),Aa=Ma(y0),v0=Pf(),Tf=Ma(v0),w0=Ta(),b0=Na(w0);function Af(){var t=new Rf.HandlebarsEnvironment;return Aa.extend(t,Rf),t.SafeString=h0.default,t.Exception=g0.default,t.Utils=Aa,t.escapeExpression=Aa.escapeExpression,t.VM=Tf,t.template=function(e){return Tf.template(e,t)},t}var Bn=Af();Bn.create=Af;b0.default(Bn);Bn.default=Bn;Po.default=Bn;Nf.exports=Po.default});var Oa=$((Io,Lf)=>{"use strict";Io.__esModule=!0;var Of={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&&!Of.helpers.scopedId(e)&&!e.depth}}};Io.default=Of;Lf.exports=Io.default});var jf=$((Ro,Vf)=>{"use strict";Ro.__esModule=!0;var _0=(function(){var t={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(i,o,s,a,l,u,f){var p=u.length-1;switch(l){case 1:return u[p-1];case 2:this.$=a.prepareProgram(u[p]);break;case 3:this.$=u[p];break;case 4:this.$=u[p];break;case 5:this.$=u[p];break;case 6:this.$=u[p];break;case 7:this.$=u[p];break;case 8:this.$=u[p];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(u[p]),strip:a.stripFlags(u[p],u[p]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:u[p],value:u[p],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(u[p-2],u[p-1],u[p],this._$);break;case 12:this.$={path:u[p-3],params:u[p-2],hash:u[p-1]};break;case 13:this.$=a.prepareBlock(u[p-3],u[p-2],u[p-1],u[p],!1,this._$);break;case 14:this.$=a.prepareBlock(u[p-3],u[p-2],u[p-1],u[p],!0,this._$);break;case 15:this.$={open:u[p-5],path:u[p-4],params:u[p-3],hash:u[p-2],blockParams:u[p-1],strip:a.stripFlags(u[p-5],u[p])};break;case 16:this.$={path:u[p-4],params:u[p-3],hash:u[p-2],blockParams:u[p-1],strip:a.stripFlags(u[p-5],u[p])};break;case 17:this.$={path:u[p-4],params:u[p-3],hash:u[p-2],blockParams:u[p-1],strip:a.stripFlags(u[p-5],u[p])};break;case 18:this.$={strip:a.stripFlags(u[p-1],u[p-1]),program:u[p]};break;case 19:var d=a.prepareBlock(u[p-2],u[p-1],u[p],u[p],!1,this._$),m=a.prepareProgram([d],u[p-1].loc);m.chained=!0,this.$={strip:u[p-2].strip,program:m,chain:!0};break;case 20:this.$=u[p];break;case 21:this.$={path:u[p-1],strip:a.stripFlags(u[p-2],u[p])};break;case 22:this.$=a.prepareMustache(u[p-3],u[p-2],u[p-1],u[p-4],a.stripFlags(u[p-4],u[p]),this._$);break;case 23:this.$=a.prepareMustache(u[p-3],u[p-2],u[p-1],u[p-4],a.stripFlags(u[p-4],u[p]),this._$);break;case 24:this.$={type:"PartialStatement",name:u[p-3],params:u[p-2],hash:u[p-1],indent:"",strip:a.stripFlags(u[p-4],u[p]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(u[p-2],u[p-1],u[p],this._$);break;case 26:this.$={path:u[p-3],params:u[p-2],hash:u[p-1],strip:a.stripFlags(u[p-4],u[p])};break;case 27:this.$=u[p];break;case 28:this.$=u[p];break;case 29:this.$={type:"SubExpression",path:u[p-3],params:u[p-2],hash:u[p-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:u[p],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(u[p-2]),value:u[p],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(u[p-1]);break;case 33:this.$=u[p];break;case 34:this.$=u[p];break;case 35:this.$={type:"StringLiteral",value:u[p],original:u[p],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(u[p]),original:Number(u[p]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:u[p]==="true",original:u[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.$=u[p];break;case 41:this.$=u[p];break;case 42:this.$=a.preparePath(!0,u[p],this._$);break;case 43:this.$=a.preparePath(!1,u[p],this._$);break;case 44:u[p-2].push({part:a.id(u[p]),original:u[p],separator:u[p-1]}),this.$=u[p-2];break;case 45:this.$=[{part:a.id(u[p]),original:u[p]}];break;case 46:this.$=[];break;case 47:u[p-1].push(u[p]);break;case 48:this.$=[];break;case 49:u[p-1].push(u[p]);break;case 50:this.$=[];break;case 51:u[p-1].push(u[p]);break;case 58:this.$=[];break;case 59:u[p-1].push(u[p]);break;case 64:this.$=[];break;case 65:u[p-1].push(u[p]);break;case 70:this.$=[];break;case 71:u[p-1].push(u[p]);break;case 78:this.$=[];break;case 79:u[p-1].push(u[p]);break;case 82:this.$=[];break;case 83:u[p-1].push(u[p]);break;case 86:this.$=[];break;case 87:u[p-1].push(u[p]);break;case 90:this.$=[];break;case 91:u[p-1].push(u[p]);break;case 94:this.$=[];break;case 95:u[p-1].push(u[p]);break;case 98:this.$=[u[p]];break;case 99:u[p-1].push(u[p]);break;case 100:this.$=[u[p]];break;case 101:u[p-1].push(u[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=[],u=this.table,f="",p=0,d=0,m=0,g=2,y=1;this.lexer.setInput(i),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var v=this.lexer.yylloc;l.push(v);var w=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function R(ue){s.length=s.length-2*ue,a.length=a.length-ue,l.length=l.length-ue}function O(){var ue;return ue=o.lexer.lex()||1,typeof ue!="number"&&(ue=o.symbols_[ue]||ue),ue}for(var I,A,L,W,ie,we,be={},Re,_e,Ge,Je;;){if(L=s[s.length-1],this.defaultActions[L]?W=this.defaultActions[L]:((I===null||typeof I>"u")&&(I=O()),W=u[L]&&u[L][I]),typeof W>"u"||!W.length||!W[0]){var Y="";if(!m){Je=[];for(Re in u[L])this.terminals_[Re]&&Re>2&&Je.push("'"+this.terminals_[Re]+"'");this.lexer.showPosition?Y="Parse error on line "+(p+1)+`:
106
106
  `+this.lexer.showPosition()+`
107
- Expecting `+ot.join(", ")+", got '"+(this.terminals_[A]||A)+"'":bt="Parse error on line "+(f+1)+": Unexpected "+(A==1?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(bt,{text:this.lexer.match,token:this.terminals_[A]||A,line:this.lexer.yylineno,loc:_,expected:ot})}}if(X[0]instanceof Array&&X.length>1)throw new Error("Parse Error: multiple actions possible at state: "+M+", token: "+A);switch(X[0]){case 1:s.push(A),a.push(this.lexer.yytext),u.push(this.lexer.yylloc),s.push(X[1]),A=null,T?(A=T,T=null):(d=this.lexer.yyleng,p=this.lexer.yytext,f=this.lexer.yylineno,_=this.lexer.yylloc,m>0&&m--);break;case 2:if(Re=this.productions_[X[1]][1],$e.$=a[a.length-Re],$e._$={first_line:u[u.length-(Re||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(Re||1)].first_column,last_column:u[u.length-1].last_column},b&&($e._$.range=[u[u.length-(Re||1)].range[0],u[u.length-1].range[1]]),Ie=this.performAction.call($e,p,d,f,this.yy,X[1],a,u),typeof Ie<"u")return Ie;Re&&(s=s.slice(0,-1*Re*2),a=a.slice(0,-1*Re),u=u.slice(0,-1*Re)),s.push(this.productions_[X[1]][0]),a.push($e.$),u.push($e._$),it=c[s[s.length-2]][s[s.length-1]],s.push(it);break;case 3:return!0}}return!0}},e=(function(){var n={EOF:1,parseError:function(o,s){if(this.yy.parser)this.yy.parser.parseError(o,s);else throw new Error(o)},setInput:function(o){return this._input=o,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var s=o.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},unput:function(o){var s=o.length,a=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s-1),this.offset-=s;var u=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===u.length?this.yylloc.first_column:0)+u[u.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()+`
108
- `+s+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,s,a,u,c,p;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),d=0;d<f.length&&(a=this._input.match(this.rules[f[d]]),!(a&&(!s||a[0].length>s[0].length)&&(s=a,u=d,!this.options.flex)));d++);return s?(p=s[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],o=this.performAction.call(this,this.yy,this,f[u],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.
109
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var o=this.next();return typeof o<"u"?o:this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(o){this.begin(o)}};return n.options={},n.performAction=function(o,s,a,u){function c(f,d){return s.yytext=s.yytext.substring(f,s.yyleng-d+f)}var p=u;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}},n.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},n})();t.lexer=e;function r(){this.yy={}}return r.prototype=t,t.Parser=r,new r})();uo.default=f_;sp.exports=uo.default});var mo=$((ho,up)=>{"use strict";ho.__esModule=!0;function p_(t){return t&&t.__esModule?t:{default:t}}var d_=Ge(),fa=p_(d_);function fo(){this.parents=[]}fo.prototype={constructor:fo,mutating:!1,acceptKey:function(e,r){var n=this.accept(e[r]);if(this.mutating){if(n&&!fo.prototype[n.type])throw new fa.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+e.type);e[r]=n}},acceptRequired:function(e,r){if(this.acceptKey(e,r),!e[r])throw new fa.default(e.type+" requires "+r)},acceptArray:function(e){for(var r=0,n=e.length;r<n;r++)this.acceptKey(e,r),e[r]||(e.splice(r,1),r--,n--)},accept:function(e){if(e){if(!this[e.type])throw new fa.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var r=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return e}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:po,Decorator:po,BlockStatement:lp,DecoratorBlock:lp,PartialStatement:cp,PartialBlockStatement:function(e){cp.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:po,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 po(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function lp(t){po.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function cp(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}ho.default=fo;up.exports=ho.default});var pp=$((go,fp)=>{"use strict";go.__esModule=!0;function h_(t){return t&&t.__esModule?t:{default:t}}var m_=mo(),g_=h_(m_);function gt(){var t=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=t}gt.prototype=new g_.default;gt.prototype.Program=function(t){var e=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var n=t.body,i=0,o=n.length;i<o;i++){var s=n[i],a=this.accept(s);if(a){var u=pa(n,i,r),c=da(n,i,r),p=a.openStandalone&&u,f=a.closeStandalone&&c,d=a.inlineStandalone&&u&&c;a.close&&nr(n,i,!0),a.open&&Ht(n,i,!0),e&&d&&(nr(n,i),Ht(n,i)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(n[i-1].original)[1])),e&&p&&(nr((s.program||s.inverse).body),Ht(n,i)),e&&f&&(nr(n,i),Ht((s.inverse||s.program).body))}}return t};gt.prototype.BlockStatement=gt.prototype.DecoratorBlock=gt.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,r=t.program&&t.inverse,n=r,i=r;if(r&&r.chained)for(n=r.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var o={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:da(e.body),closeStandalone:pa((n||e).body)};if(t.openStrip.close&&nr(e.body,null,!0),r){var s=t.inverseStrip;s.open&&Ht(e.body,null,!0),s.close&&nr(n.body,null,!0),t.closeStrip.open&&Ht(i.body,null,!0),!this.options.ignoreStandalone&&pa(e.body)&&da(n.body)&&(Ht(e.body),nr(n.body))}else t.closeStrip.open&&Ht(e.body,null,!0);return o};gt.prototype.Decorator=gt.prototype.MustacheStatement=function(t){return t.strip};gt.prototype.PartialStatement=gt.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function pa(t,e,r){e===void 0&&(e=t.length);var n=t[e-1],i=t[e-2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original)}function da(t,e,r){e===void 0&&(e=-1);var n=t[e+1],i=t[e+2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original)}function nr(t,e,r){var n=t[e==null?0:e+1];if(!(!n||n.type!=="ContentStatement"||!r&&n.rightStripped)){var i=n.value;n.value=n.value.replace(r?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==i}}function Ht(t,e,r){var n=t[e==null?t.length-1:e-1];if(!(!n||n.type!=="ContentStatement"||!r&&n.leftStripped)){var i=n.value;return n.value=n.value.replace(r?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==i,n.leftStripped}}go.default=gt;fp.exports=go.default});var dp=$(Xe=>{"use strict";Xe.__esModule=!0;Xe.SourceLocation=w_;Xe.id=__;Xe.stripFlags=b_;Xe.stripComment=S_;Xe.preparePath=$_;Xe.prepareMustache=x_;Xe.prepareRawBlock=k_;Xe.prepareBlock=E_;Xe.prepareProgram=P_;Xe.preparePartialBlock=C_;function y_(t){return t&&t.__esModule?t:{default:t}}var v_=Ge(),ha=y_(v_);function ma(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new ha.default(t.path.original+" doesn't match "+e,r)}}function w_(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 __(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function b_(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function S_(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function $_(t,e,r){r=this.locInfo(r);for(var n=t?"@":"",i=[],o=0,s=0,a=e.length;s<a;s++){var u=e[s].part,c=e[s].original!==u;if(n+=(e[s].separator||"")+u,!c&&(u===".."||u==="."||u==="this")){if(i.length>0)throw new ha.default("Invalid path: "+n,{loc:r});u===".."&&o++}else i.push(u)}return{type:"PathExpression",data:t,depth:o,parts:i,original:n,loc:r}}function x_(t,e,r,n,i,o){var s=n.charAt(3)||n.charAt(2),a=s!=="{"&&s!=="&",u=/\*/.test(n);return{type:u?"Decorator":"MustacheStatement",path:t,params:e,hash:r,escaped:a,strip:i,loc:this.locInfo(o)}}function k_(t,e,r,n){ma(t,r),n=this.locInfo(n);var i={type:"Program",body:e,strip:{},loc:n};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}}function E_(t,e,r,n,i,o){n&&n.path&&ma(t,n);var s=/\*/.test(t.open);e.blockParams=t.blockParams;var a=void 0,u=void 0;if(r){if(s)throw new ha.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),u=r.strip,a=r.program}return i&&(i=a,a=e,e=i),{type:s?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:a,openStrip:t.strip,inverseStrip:u,closeStrip:n&&n.strip,loc:this.locInfo(o)}}function P_(t,e){if(!e&&t.length){var r=t[0].loc,n=t[t.length-1].loc;r&&n&&(e={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function C_(t,e,r,n){return ma(t,r),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:r&&r.strip,loc:this.locInfo(n)}}});var mp=$(Cn=>{"use strict";Cn.__esModule=!0;Cn.parseWithoutProcessing=hp;Cn.parse=j_;function I_(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function va(t){return t&&t.__esModule?t:{default:t}}var R_=ap(),ga=va(R_),N_=pp(),T_=va(N_),A_=dp(),O_=I_(A_),M_=Ge(),Pn=va(M_),L_=Le();Cn.parser=ga.default;var yo={};L_.extend(yo,O_);function hp(t,e){if(t.type==="Program")return V_(t),t;ga.default.yy=yo,yo.locInfo=function(n){return new yo.SourceLocation(e&&e.srcName,n)};var r=ga.default.parse(t);return r}function j_(t,e){var r=hp(t,e),n=new T_.default(e);return n.accept(r)}function V_(t){ya(t)}function ya(t){if(t!=null){if(Array.isArray(t)){t.forEach(ya);return}if(typeof t=="object"){if(t.type==="PathExpression"){if(!D_(t.depth))throw new Pn.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(t.parts))throw new Pn.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 Pn.default("Invalid AST: PathExpression.parts must only contain strings")}else if(t.type==="NumberLiteral"){if(typeof t.value!="number"||!isFinite(t.value))throw new Pn.default("Invalid AST: NumberLiteral.value must be a number")}else if(t.type==="BooleanLiteral"&&typeof t.value!="boolean")throw new Pn.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(t).forEach(function(r){r!=="loc"&&ya(t[r])})}}}function D_(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0}});var wp=$(Tn=>{"use strict";Tn.__esModule=!0;Tn.Compiler=wa;Tn.precompile=H_;Tn.compile=U_;function yp(t){return t&&t.__esModule?t:{default:t}}var q_=Ge(),Rn=yp(q_),Nn=Le(),F_=ua(),In=yp(F_),B_=[].slice;function wa(){}wa.prototype={compiler:wa,equals:function(e){var r=this.opcodes.length;if(e.opcodes.length!==r)return!1;for(var n=0;n<r;n++){var i=this.opcodes[n],o=e.opcodes[n];if(i.opcode!==o.opcode||!vp(i.args,o.args))return!1}r=this.children.length;for(var n=0;n<r;n++)if(!this.children[n].equals(e.children[n]))return!1;return!0},guid:0,compile:function(e,r){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=r,this.stringParams=r.stringParams,this.trackIds=r.trackIds,r.blockParams=r.blockParams||[],r.knownHelpers=Nn.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},r.knownHelpers),this.accept(e)},compileProgram:function(e){var r=new this.compiler,n=r.compile(e,this.options),i=this.guid++;return this.usePartial=this.usePartial||n.usePartial,this.children[i]=n,this.useDepths=this.useDepths||n.useDepths,i},accept:function(e){if(!this[e.type])throw new Rn.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var r=this[e.type](e);return this.sourceNode.shift(),r},Program:function(e){this.options.blockParams.unshift(e.blockParams);for(var r=e.body,n=r.length,i=0;i<n;i++)this.accept(r[i]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){gp(e);var r=e.program,n=e.inverse;r=r&&this.compileProgram(r),n=n&&this.compileProgram(n);var i=this.classifySexpr(e);i==="helper"?this.helperSexpr(e,r,n):i==="simple"?(this.simpleSexpr(e),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,r,n),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(e){var r=e.program&&this.compileProgram(e.program),n=this.setupFullMustacheParams(e,r,void 0),i=e.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,i.original)},PartialStatement:function(e){this.usePartial=!0;var r=e.program;r&&(r=this.compileProgram(e.program));var n=e.params;if(n.length>1)throw new Rn.default("Unsupported number of partial arguments: "+n.length,e);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var i=e.name.original,o=e.name.type==="SubExpression";o&&this.accept(e.name),this.setupFullMustacheParams(e,r,void 0,!0);var s=e.indent||"";this.options.preventIndent&&s&&(this.opcode("appendContent",s),s=""),this.opcode("invokePartial",o,i,s),this.opcode("append")},PartialBlockStatement:function(e){this.PartialStatement(e)},MustacheStatement:function(e){this.SubExpression(e),e.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(e){this.DecoratorBlock(e)},ContentStatement:function(e){e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){gp(e);var r=this.classifySexpr(e);r==="simple"?this.simpleSexpr(e):r==="helper"?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,r,n){var i=e.path,o=i.parts[0],s=r!=null||n!=null;this.opcode("getContext",i.depth),this.opcode("pushProgram",r),this.opcode("pushProgram",n),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",o,s)},simpleSexpr:function(e){var r=e.path;r.strict=!0,this.accept(r),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,r,n){var i=this.setupFullMustacheParams(e,r,n),o=e.path,s=o.parts[0];if(this.options.knownHelpers[s])this.opcode("invokeKnownHelper",i.length,s);else{if(this.options.knownHelpersOnly)throw new Rn.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,In.default.helpers.simpleId(o))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var r=e.parts[0],n=In.default.helpers.scopedId(e),i=!e.depth&&!n&&this.blockParamIndex(r);i?this.opcode("lookupBlockParam",i,e.parts):r?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,n):this.opcode("pushContext")},StringLiteral:function(e){this.opcode("pushString",e.value)},NumberLiteral:function(e){this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var r=e.pairs,n=0,i=r.length;for(this.opcode("pushHash");n<i;n++)this.pushParam(r[n].value);for(;n--;)this.opcode("assignToHash",r[n].key);this.opcode("popHash")},opcode:function(e){this.opcodes.push({opcode:e,args:B_.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var r=In.default.helpers.simpleId(e.path),n=r&&!!this.blockParamIndex(e.path.parts[0]),i=!n&&In.default.helpers.helperExpression(e),o=!n&&(i||r);if(o&&!i){var s=e.path.parts[0],a=this.options;a.knownHelpers[s]?i=!0:a.knownHelpersOnly&&(o=!1)}return i?"helper":o?"ambiguous":"simple"},pushParams:function(e){for(var r=0,n=e.length;r<n;r++)this.pushParam(e[r])},pushParam:function(e){var r=e.value!=null?e.value:e.original||"";if(this.stringParams)r.replace&&(r=r.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",r,e.type),e.type==="SubExpression"&&this.accept(e);else{if(this.trackIds){var n=void 0;if(e.parts&&!In.default.helpers.scopedId(e)&&!e.depth&&(n=this.blockParamIndex(e.parts[0])),n){var i=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,i)}else r=e.original||r,r.replace&&(r=r.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",e.type,r)}this.accept(e)}},setupFullMustacheParams:function(e,r,n,i){var o=e.params;return this.pushParams(o),this.opcode("pushProgram",r),this.opcode("pushProgram",n),e.hash?this.accept(e.hash):this.opcode("emptyHash",i),o},blockParamIndex:function(e){for(var r=0,n=this.options.blockParams.length;r<n;r++){var i=this.options.blockParams[r],o=i&&Nn.indexOf(i,e);if(i&&o>=0)return[r,o]}}};function H_(t,e,r){if(t==null||typeof t!="string"&&t.type!=="Program")throw new Rn.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);e=e||{},"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var n=r.parse(t,e),i=new r.Compiler().compile(n,e);return new r.JavaScriptCompiler().compile(i,e)}function U_(t,e,r){if(e===void 0&&(e={}),t==null||typeof t!="string"&&t.type!=="Program")throw new Rn.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=Nn.extend({},e),"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var n=void 0;function i(){var s=r.parse(t,e),a=new r.Compiler().compile(s,e),u=new r.JavaScriptCompiler().compile(a,e,void 0,!0);return r.template(u)}function o(s,a){return n||(n=i()),n.call(this,s,a)}return o._setup=function(s){return n||(n=i()),n._setup(s)},o._child=function(s,a,u,c){return n||(n=i()),n._child(s,a,u,c)},o}function vp(t,e){if(t===e)return!0;if(Nn.isArray(t)&&Nn.isArray(e)&&t.length===e.length){for(var r=0;r<t.length;r++)if(!vp(t[r],e[r]))return!1;return!0}}function gp(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 bp=$(_a=>{var _p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");_a.encode=function(t){if(0<=t&&t<_p.length)return _p[t];throw new TypeError("Must be between 0 and 63: "+t)};_a.decode=function(t){var e=65,r=90,n=97,i=122,o=48,s=57,a=43,u=47,c=26,p=52;return e<=t&&t<=r?t-e:n<=t&&t<=i?t-n+c:o<=t&&t<=s?t-o+p:t==a?62:t==u?63:-1}});var $a=$(Sa=>{var Sp=bp(),ba=5,$p=1<<ba,xp=$p-1,kp=$p;function z_(t){return t<0?(-t<<1)+1:(t<<1)+0}function W_(t){var e=(t&1)===1,r=t>>1;return e?-r:r}Sa.encode=function(e){var r="",n,i=z_(e);do n=i&xp,i>>>=ba,i>0&&(n|=kp),r+=Sp.encode(n);while(i>0);return r};Sa.decode=function(e,r,n){var i=e.length,o=0,s=0,a,u;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(u=Sp.decode(e.charCodeAt(r++)),u===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));a=!!(u&kp),u&=xp,o=o+(u<<s),s+=ba}while(a);n.value=W_(o),n.rest=r}});var Vr=$(Ne=>{function G_(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}Ne.getArg=G_;var Ep=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,K_=/^data:.+\,.+$/;function An(t){var e=t.match(Ep);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Ne.urlParse=An;function Lr(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}Ne.urlGenerate=Lr;function xa(t){var e=t,r=An(t);if(r){if(!r.path)return t;e=r.path}for(var n=Ne.isAbsolute(e),i=e.split(/\/+/),o,s=0,a=i.length-1;a>=0;a--)o=i[a],o==="."?i.splice(a,1):o===".."?s++:s>0&&(o===""?(i.splice(a+1,s),s=0):(i.splice(a,2),s--));return e=i.join("/"),e===""&&(e=n?"/":"."),r?(r.path=e,Lr(r)):e}Ne.normalize=xa;function Pp(t,e){t===""&&(t="."),e===""&&(e=".");var r=An(e),n=An(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Lr(r);if(r||e.match(K_))return e;if(n&&!n.host&&!n.path)return n.host=e,Lr(n);var i=e.charAt(0)==="/"?e:xa(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,Lr(n)):i}Ne.join=Pp;Ne.isAbsolute=function(t){return t.charAt(0)==="/"||Ep.test(t)};function J_(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var r=0;e.indexOf(t+"/")!==0;){var n=t.lastIndexOf("/");if(n<0||(t=t.slice(0,n),t.match(/^([^\/]+:\/)?\/*$/)))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)}Ne.relative=J_;var Cp=(function(){var t=Object.create(null);return!("__proto__"in t)})();function Ip(t){return t}function Y_(t){return Rp(t)?"$"+t:t}Ne.toSetString=Cp?Ip:Y_;function X_(t){return Rp(t)?t.slice(1):t}Ne.fromSetString=Cp?Ip:X_;function Rp(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}function Q_(t,e,r){var n=jr(t.source,e.source);return n!==0||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:jr(t.name,e.name)}Ne.compareByOriginalPositions=Q_;function Z_(t,e,r){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0||r)||(n=jr(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:jr(t.name,e.name)}Ne.compareByGeneratedPositionsDeflated=Z_;function jr(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function eb(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=jr(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:jr(t.name,e.name)}Ne.compareByGeneratedPositionsInflated=eb;function tb(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Ne.parseSourceMapInput=tb;function rb(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=An(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}e=Pp(Lr(n),e)}return xa(e)}Ne.computeSourceURL=rb});var Pa=$(Np=>{var ka=Vr(),Ea=Object.prototype.hasOwnProperty,ir=typeof Map<"u";function At(){this._array=[],this._set=ir?new Map:Object.create(null)}At.fromArray=function(e,r){for(var n=new At,i=0,o=e.length;i<o;i++)n.add(e[i],r);return n};At.prototype.size=function(){return ir?this._set.size:Object.getOwnPropertyNames(this._set).length};At.prototype.add=function(e,r){var n=ir?e:ka.toSetString(e),i=ir?this.has(e):Ea.call(this._set,n),o=this._array.length;(!i||r)&&this._array.push(e),i||(ir?this._set.set(e,o):this._set[n]=o)};At.prototype.has=function(e){if(ir)return this._set.has(e);var r=ka.toSetString(e);return Ea.call(this._set,r)};At.prototype.indexOf=function(e){if(ir){var r=this._set.get(e);if(r>=0)return r}else{var n=ka.toSetString(e);if(Ea.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};At.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};At.prototype.toArray=function(){return this._array.slice()};Np.ArraySet=At});var Op=$(Ap=>{var Tp=Vr();function nb(t,e){var r=t.generatedLine,n=e.generatedLine,i=t.generatedColumn,o=e.generatedColumn;return n>r||n==r&&o>=i||Tp.compareByGeneratedPositionsInflated(t,e)<=0}function vo(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}vo.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};vo.prototype.add=function(e){nb(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};vo.prototype.toArray=function(){return this._sorted||(this._array.sort(Tp.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Ap.MappingList=vo});var Ca=$(Mp=>{var On=$a(),_e=Vr(),wo=Pa().ArraySet,ib=Op().MappingList;function Qe(t){t||(t={}),this._file=_e.getArg(t,"file",null),this._sourceRoot=_e.getArg(t,"sourceRoot",null),this._skipValidation=_e.getArg(t,"skipValidation",!1),this._sources=new wo,this._names=new wo,this._mappings=new ib,this._sourcesContents=null}Qe.prototype._version=3;Qe.fromSourceMap=function(e){var r=e.sourceRoot,n=new Qe({file:e.file,sourceRoot:r});return e.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,r!=null&&(o.source=_e.relative(r,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),n.addMapping(o)}),e.sources.forEach(function(i){var o=i;r!==null&&(o=_e.relative(r,i)),n._sources.has(o)||n._sources.add(o);var s=e.sourceContentFor(i);s!=null&&n.setSourceContent(i,s)}),n};Qe.prototype.addMapping=function(e){var r=_e.getArg(e,"generated"),n=_e.getArg(e,"original",null),i=_e.getArg(e,"source",null),o=_e.getArg(e,"name",null);this._skipValidation||this._validateMapping(r,n,i,o),i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),o!=null&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:o})};Qe.prototype.setSourceContent=function(e,r){var n=e;this._sourceRoot!=null&&(n=_e.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[_e.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[_e.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Qe.prototype.applySourceMap=function(e,r,n){var i=r;if(r==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=e.file}var o=this._sourceRoot;o!=null&&(i=_e.relative(o,i));var s=new wo,a=new wo;this._mappings.unsortedForEach(function(u){if(u.source===i&&u.originalLine!=null){var c=e.originalPositionFor({line:u.originalLine,column:u.originalColumn});c.source!=null&&(u.source=c.source,n!=null&&(u.source=_e.join(n,u.source)),o!=null&&(u.source=_e.relative(o,u.source)),u.originalLine=c.line,u.originalColumn=c.column,c.name!=null&&(u.name=c.name))}var p=u.source;p!=null&&!s.has(p)&&s.add(p);var f=u.name;f!=null&&!a.has(f)&&a.add(f)},this),this._sources=s,this._names=a,e.sources.forEach(function(u){var c=e.sourceContentFor(u);c!=null&&(n!=null&&(u=_e.join(n,u)),o!=null&&(u=_e.relative(o,u)),this.setSourceContent(u,c))},this)};Qe.prototype._validateMapping=function(e,r,n,i){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!i)){if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:i}))}};Qe.prototype._serializeMappings=function(){for(var e=0,r=1,n=0,i=0,o=0,s=0,a="",u,c,p,f,d=this._mappings.toArray(),m=0,g=d.length;m<g;m++){if(c=d[m],u="",c.generatedLine!==r)for(e=0;c.generatedLine!==r;)u+=";",r++;else if(m>0){if(!_e.compareByGeneratedPositionsInflated(c,d[m-1]))continue;u+=","}u+=On.encode(c.generatedColumn-e),e=c.generatedColumn,c.source!=null&&(f=this._sources.indexOf(c.source),u+=On.encode(f-s),s=f,u+=On.encode(c.originalLine-1-i),i=c.originalLine-1,u+=On.encode(c.originalColumn-n),n=c.originalColumn,c.name!=null&&(p=this._names.indexOf(c.name),u+=On.encode(p-o),o=p)),a+=u}return a};Qe.prototype._generateSourcesContent=function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=_e.relative(r,n));var i=_e.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};Qe.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};Qe.prototype.toString=function(){return JSON.stringify(this.toJSON())};Mp.SourceMapGenerator=Qe});var Lp=$(or=>{or.GREATEST_LOWER_BOUND=1;or.LEAST_UPPER_BOUND=2;function Ia(t,e,r,n,i,o){var s=Math.floor((e-t)/2)+t,a=i(r,n[s],!0);return a===0?s:a>0?e-s>1?Ia(s,e,r,n,i,o):o==or.LEAST_UPPER_BOUND?e<n.length?e:-1:s:s-t>1?Ia(t,s,r,n,i,o):o==or.LEAST_UPPER_BOUND?s:t<0?-1:t}or.search=function(e,r,n,i){if(r.length===0)return-1;var o=Ia(-1,r.length,e,r,n,i||or.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&n(r[o],r[o-1],!0)===0;)--o;return o}});var Vp=$(jp=>{function Ra(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function ob(t,e){return Math.round(t+Math.random()*(e-t))}function Na(t,e,r,n){if(r<n){var i=ob(r,n),o=r-1;Ra(t,i,n);for(var s=t[n],a=r;a<n;a++)e(t[a],s)<=0&&(o+=1,Ra(t,o,a));Ra(t,o+1,a);var u=o+1;Na(t,e,r,u-1),Na(t,e,u+1,n)}}jp.quickSort=function(t,e){Na(t,e,0,t.length-1)}});var qp=$(_o=>{var F=Vr(),Ta=Lp(),Dr=Pa().ArraySet,sb=$a(),Mn=Vp().quickSort;function de(t,e){var r=t;return typeof t=="string"&&(r=F.parseSourceMapInput(t)),r.sections!=null?new lt(r,e):new Ee(r,e)}de.fromSourceMap=function(t,e){return Ee.fromSourceMap(t,e)};de.prototype._version=3;de.prototype.__generatedMappings=null;Object.defineProperty(de.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});de.prototype.__originalMappings=null;Object.defineProperty(de.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});de.prototype._charIsMappingSeparator=function(e,r){var n=e.charAt(r);return n===";"||n===","};de.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};de.GENERATED_ORDER=1;de.ORIGINAL_ORDER=2;de.GREATEST_LOWER_BOUND=1;de.LEAST_UPPER_BOUND=2;de.prototype.eachMapping=function(e,r,n){var i=r||null,o=n||de.GENERATED_ORDER,s;switch(o){case de.GENERATED_ORDER:s=this._generatedMappings;break;case de.ORIGINAL_ORDER:s=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;s.map(function(u){var c=u.source===null?null:this._sources.at(u.source);return c=F.computeSourceURL(a,c,this._sourceMapURL),{source:c,generatedLine:u.generatedLine,generatedColumn:u.generatedColumn,originalLine:u.originalLine,originalColumn:u.originalColumn,name:u.name===null?null:this._names.at(u.name)}},this).forEach(e,i)};de.prototype.allGeneratedPositionsFor=function(e){var r=F.getArg(e,"line"),n={source:F.getArg(e,"source"),originalLine:r,originalColumn:F.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",F.compareByOriginalPositions,Ta.LEAST_UPPER_BOUND);if(o>=0){var s=this._originalMappings[o];if(e.column===void 0)for(var a=s.originalLine;s&&s.originalLine===a;)i.push({line:F.getArg(s,"generatedLine",null),column:F.getArg(s,"generatedColumn",null),lastColumn:F.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o];else for(var u=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==u;)i.push({line:F.getArg(s,"generatedLine",null),column:F.getArg(s,"generatedColumn",null),lastColumn:F.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o]}return i};_o.SourceMapConsumer=de;function Ee(t,e){var r=t;typeof t=="string"&&(r=F.parseSourceMapInput(t));var n=F.getArg(r,"version"),i=F.getArg(r,"sources"),o=F.getArg(r,"names",[]),s=F.getArg(r,"sourceRoot",null),a=F.getArg(r,"sourcesContent",null),u=F.getArg(r,"mappings"),c=F.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);s&&(s=F.normalize(s)),i=i.map(String).map(F.normalize).map(function(p){return s&&F.isAbsolute(s)&&F.isAbsolute(p)?F.relative(s,p):p}),this._names=Dr.fromArray(o.map(String),!0),this._sources=Dr.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(p){return F.computeSourceURL(s,p,e)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=u,this._sourceMapURL=e,this.file=c}Ee.prototype=Object.create(de.prototype);Ee.prototype.consumer=de;Ee.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=F.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==t)return r;return-1};Ee.fromSourceMap=function(e,r){var n=Object.create(Ee.prototype),i=n._names=Dr.fromArray(e._names.toArray(),!0),o=n._sources=Dr.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(m){return F.computeSourceURL(n.sourceRoot,m,r)});for(var s=e._mappings.toArray().slice(),a=n.__generatedMappings=[],u=n.__originalMappings=[],c=0,p=s.length;c<p;c++){var f=s[c],d=new Dp;d.generatedLine=f.generatedLine,d.generatedColumn=f.generatedColumn,f.source&&(d.source=o.indexOf(f.source),d.originalLine=f.originalLine,d.originalColumn=f.originalColumn,f.name&&(d.name=i.indexOf(f.name)),u.push(d)),a.push(d)}return Mn(n.__originalMappings,F.compareByOriginalPositions),n};Ee.prototype._version=3;Object.defineProperty(Ee.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Dp(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Ee.prototype._parseMappings=function(e,r){for(var n=1,i=0,o=0,s=0,a=0,u=0,c=e.length,p=0,f={},d={},m=[],g=[],y,_,b,L,q;p<c;)if(e.charAt(p)===";")n++,p++,i=0;else if(e.charAt(p)===",")p++;else{for(y=new Dp,y.generatedLine=n,L=p;L<c&&!this._charIsMappingSeparator(e,L);L++);if(_=e.slice(p,L),b=f[_],b)p+=_.length;else{for(b=[];p<L;)sb.decode(e,p,d),q=d.value,p=d.rest,b.push(q);if(b.length===2)throw new Error("Found a source, but no line and column");if(b.length===3)throw new Error("Found a source and line, but no column");f[_]=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=u+b[4],u+=b[4])),g.push(y),typeof y.originalLine=="number"&&m.push(y)}Mn(g,F.compareByGeneratedPositionsDeflated),this.__generatedMappings=g,Mn(m,F.compareByOriginalPositions),this.__originalMappings=m};Ee.prototype._findMapping=function(e,r,n,i,o,s){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[i]);return Ta.search(e,r,o,s)};Ee.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var r=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};Ee.prototype.originalPositionFor=function(e){var r={generatedLine:F.getArg(e,"line"),generatedColumn:F.getArg(e,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",F.compareByGeneratedPositionsDeflated,F.getArg(e,"bias",de.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var o=F.getArg(i,"source",null);o!==null&&(o=this._sources.at(o),o=F.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var s=F.getArg(i,"name",null);return s!==null&&(s=this._names.at(s)),{source:o,line:F.getArg(i,"originalLine",null),column:F.getArg(i,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}};Ee.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};Ee.prototype.sourceContentFor=function(e,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var i=e;this.sourceRoot!=null&&(i=F.relative(this.sourceRoot,i));var o;if(this.sourceRoot!=null&&(o=F.urlParse(this.sourceRoot))){var s=i.replace(/^file:\/\//,"");if(o.scheme=="file"&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!o.path||o.path=="/")&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(r)return null;throw new Error('"'+i+'" is not in the SourceMap.')};Ee.prototype.generatedPositionFor=function(e){var r=F.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:F.getArg(e,"line"),originalColumn:F.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",F.compareByOriginalPositions,F.getArg(e,"bias",de.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===n.source)return{line:F.getArg(o,"generatedLine",null),column:F.getArg(o,"generatedColumn",null),lastColumn:F.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};_o.BasicSourceMapConsumer=Ee;function lt(t,e){var r=t;typeof t=="string"&&(r=F.parseSourceMapInput(t));var n=F.getArg(r,"version"),i=F.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new Dr,this._names=new Dr;var o={line:-1,column:0};this._sections=i.map(function(s){if(s.url)throw new Error("Support for url field in sections not implemented.");var a=F.getArg(s,"offset"),u=F.getArg(a,"line"),c=F.getArg(a,"column");if(u<o.line||u===o.line&&c<o.column)throw new Error("Section offsets must be ordered and non-overlapping.");return o=a,{generatedOffset:{generatedLine:u+1,generatedColumn:c+1},consumer:new de(F.getArg(s,"map"),e)}})}lt.prototype=Object.create(de.prototype);lt.prototype.constructor=de;lt.prototype._version=3;Object.defineProperty(lt.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var r=0;r<this._sections[e].consumer.sources.length;r++)t.push(this._sections[e].consumer.sources[r]);return t}});lt.prototype.originalPositionFor=function(e){var r={generatedLine:F.getArg(e,"line"),generatedColumn:F.getArg(e,"column")},n=Ta.search(r,this._sections,function(o,s){var a=o.generatedLine-s.generatedOffset.generatedLine;return a||o.generatedColumn-s.generatedOffset.generatedColumn}),i=this._sections[n];return i?i.consumer.originalPositionFor({line:r.generatedLine-(i.generatedOffset.generatedLine-1),column:r.generatedColumn-(i.generatedOffset.generatedLine===r.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};lt.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};lt.prototype.sourceContentFor=function(e,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],o=i.consumer.sourceContentFor(e,!0);if(o)return o}if(r)return null;throw new Error('"'+e+'" is not in the SourceMap.')};lt.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(F.getArg(e,"source"))!==-1){var i=n.consumer.generatedPositionFor(e);if(i){var o={line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)};return o}}}return{line:null,column:null}};lt.prototype._parseMappings=function(e,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],o=i.consumer._generatedMappings,s=0;s<o.length;s++){var a=o[s],u=i.consumer._sources.at(a.source);u=F.computeSourceURL(i.consumer.sourceRoot,u,this._sourceMapURL),this._sources.add(u),u=this._sources.indexOf(u);var c=null;a.name&&(c=i.consumer._names.at(a.name),this._names.add(c),c=this._names.indexOf(c));var p={source:u,generatedLine:a.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(i.generatedOffset.generatedLine===a.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:c};this.__generatedMappings.push(p),typeof p.originalLine=="number"&&this.__originalMappings.push(p)}Mn(this.__generatedMappings,F.compareByGeneratedPositionsDeflated),Mn(this.__originalMappings,F.compareByOriginalPositions)};_o.IndexedSourceMapConsumer=lt});var Bp=$(Fp=>{var ab=Ca().SourceMapGenerator,bo=Vr(),lb=/(\r?\n)/,cb=10,qr="$$$isSourceNode$$$";function Ke(t,e,r,n,i){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=r??null,this.name=i??null,this[qr]=!0,n!=null&&this.add(n)}Ke.fromStringWithSourceMap=function(e,r,n){var i=new Ke,o=e.split(lb),s=0,a=function(){var d=g(),m=g()||"";return d+m;function g(){return s<o.length?o[s++]:void 0}},u=1,c=0,p=null;return r.eachMapping(function(d){if(p!==null)if(u<d.generatedLine)f(p,a()),u++,c=0;else{var m=o[s]||"",g=m.substr(0,d.generatedColumn-c);o[s]=m.substr(d.generatedColumn-c),c=d.generatedColumn,f(p,g),p=d;return}for(;u<d.generatedLine;)i.add(a()),u++;if(c<d.generatedColumn){var m=o[s]||"";i.add(m.substr(0,d.generatedColumn)),o[s]=m.substr(d.generatedColumn),c=d.generatedColumn}p=d},this),s<o.length&&(p&&f(p,a()),i.add(o.splice(s).join(""))),r.sources.forEach(function(d){var m=r.sourceContentFor(d);m!=null&&(n!=null&&(d=bo.join(n,d)),i.setSourceContent(d,m))}),i;function f(d,m){if(d===null||d.source===void 0)i.add(m);else{var g=n?bo.join(n,d.source):d.source;i.add(new Ke(d.originalLine,d.originalColumn,g,m,d.name))}}};Ke.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[qr]||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};Ke.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[qr]||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};Ke.prototype.walk=function(e){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[qr]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};Ke.prototype.join=function(e){var r,n,i=this.children.length;if(i>0){for(r=[],n=0;n<i-1;n++)r.push(this.children[n]),r.push(e);r.push(this.children[n]),this.children=r}return this};Ke.prototype.replaceRight=function(e,r){var n=this.children[this.children.length-1];return n[qr]?n.replaceRight(e,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(e,r):this.children.push("".replace(e,r)),this};Ke.prototype.setSourceContent=function(e,r){this.sourceContents[bo.toSetString(e)]=r};Ke.prototype.walkSourceContents=function(e){for(var r=0,n=this.children.length;r<n;r++)this.children[r][qr]&&this.children[r].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)e(bo.fromSetString(i[r]),this.sourceContents[i[r]])};Ke.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};Ke.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},n=new ab(e),i=!1,o=null,s=null,a=null,u=null;return this.walk(function(c,p){r.code+=c,p.source!==null&&p.line!==null&&p.column!==null?((o!==p.source||s!==p.line||a!==p.column||u!==p.name)&&n.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:r.line,column:r.column},name:p.name}),o=p.source,s=p.line,a=p.column,u=p.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),o=null,i=!1);for(var f=0,d=c.length;f<d;f++)c.charCodeAt(f)===cb?(r.line++,r.column=0,f+1===d?(o=null,i=!1):i&&n.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:r.line,column:r.column},name:p.name})):r.column++}),this.walkSourceContents(function(c,p){n.setSourceContent(c,p)}),{code:r.code,map:n}};Fp.SourceNode=Ke});var Hp=$(So=>{So.SourceMapGenerator=Ca().SourceMapGenerator;So.SourceMapConsumer=qp().SourceMapConsumer;So.SourceNode=Bp().SourceNode});var Gp=$(($o,Wp)=>{"use strict";$o.__esModule=!0;var Oa=Le(),sr=void 0;try{(typeof define!="function"||!define.amd)&&(Up=Hp(),sr=Up.SourceNode)}catch{}var Up;sr||(sr=function(t,e,r,n){this.src="",n&&this.add(n)},sr.prototype={add:function(e){Oa.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){Oa.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function Aa(t,e,r){if(Oa.isArray(t)){for(var n=[],i=0,o=t.length;i<o;i++)n.push(e.wrap(t[i],r));return n}else if(typeof t=="boolean"||typeof t=="number")return t+"";return t}function zp(t){this.srcFile=t,this.source=[]}zp.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,r){this.source.unshift(this.wrap(e,r))},push:function(e,r){this.source.push(this.wrap(e,r))},merge:function(){var e=this.empty();return this.each(function(r){e.add([" ",r,`
110
- `])}),e},each:function(e){for(var r=0,n=this.source.length;r<n;r++)e(this.source[r])},empty:function(){var e=this.currentLocation||{start:{}};return new sr(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof sr?e:(e=Aa(e,this,r),new sr(r.start.line,r.start.column,this.srcFile,e))},functionCall:function(e,r,n){return n=this.generateList(n),this.wrap([e,r?"."+r+"(":"(",n,")"])},quotedString:function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(e){var r=this,n=[];Object.keys(e).forEach(function(o){var s=Aa(e[o],r);s!=="undefined"&&n.push([r.quotedString(o),":",s])});var i=this.generateList(n);return i.prepend("{"),i.add("}"),i},generateList:function(e){for(var r=this.empty(),n=0,i=e.length;n<i;n++)n&&r.add(","),r.add(Aa(e[n],this));return r},generateArray:function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r}};$o.default=zp;Wp.exports=$o.default});var Qp=$((xo,Xp)=>{"use strict";xo.__esModule=!0;function Yp(t){return t&&t.__esModule?t:{default:t}}var Kp=no(),ub=Ge(),Ma=Yp(ub),fb=Le(),pb=Gp(),Jp=Yp(pb);function Fr(t){this.value=t}function Br(){}Br.prototype={nameLookup:function(e,r){return this.internalNameLookup(e,r)},depthedLookup:function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},compilerInfo:function(){var e=Kp.COMPILER_REVISION,r=Kp.REVISION_CHANGES[e];return[e,r]},appendToBuffer:function(e,r,n){return fb.isArray(e)||(e=[e]),e=this.source.wrap(e,r),this.environment.isSimple?["return ",e,";"]:n?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(e,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(r),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(e,r,n,i){this.environment=e,this.options=r,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!i,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,r),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var o=e.opcodes,s=void 0,a=void 0,u=void 0,c=void 0;for(u=0,c=o.length;u<c;u++)s=o[u],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 Ma.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(),`;
107
+ Expecting `+Je.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Y="Parse error on line "+(p+1)+": Unexpected "+(I==1?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Y,{text:this.lexer.match,token:this.terminals_[I]||I,line:this.lexer.yylineno,loc:v,expected:Je})}}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+L+", token: "+I);switch(W[0]){case 1:s.push(I),a.push(this.lexer.yytext),l.push(this.lexer.yylloc),s.push(W[1]),I=null,A?(I=A,A=null):(d=this.lexer.yyleng,f=this.lexer.yytext,p=this.lexer.yylineno,v=this.lexer.yylloc,m>0&&m--);break;case 2:if(_e=this.productions_[W[1]][1],be.$=a[a.length-_e],be._$={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},w&&(be._$.range=[l[l.length-(_e||1)].range[0],l[l.length-1].range[1]]),we=this.performAction.call(be,f,d,p,this.yy,W[1],a,l),typeof we<"u")return we;_e&&(s=s.slice(0,-1*_e*2),a=a.slice(0,-1*_e),l=l.slice(0,-1*_e)),s.push(this.productions_[W[1]][0]),a.push(be.$),l.push(be._$),Ge=u[s[s.length-2]][s[s.length-1]],s.push(Ge);break;case 3:return!0}}return!0}},e=(function(){var n={EOF:1,parseError:function(o,s){if(this.yy.parser)this.yy.parser.parseError(o,s);else throw new Error(o)},setInput:function(o){return this._input=o,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var s=o.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},unput:function(o){var s=o.length,a=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s-1),this.offset-=s;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===l.length?this.yylloc.first_column:0)+l[l.length-a.length].length-a[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[u[0],u[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()+`
108
+ `+s+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,s,a,l,u,f;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),d=0;d<p.length&&(a=this._input.match(this.rules[p[d]]),!(a&&(!s||a[0].length>s[0].length)&&(s=a,l=d,!this.options.flex)));d++);return s?(f=s[0].match(/(?:\r\n?|\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],o=this.performAction.call(this,this.yy,this,p[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.
109
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var o=this.next();return typeof o<"u"?o:this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(o){this.begin(o)}};return n.options={},n.performAction=function(o,s,a,l){function u(p,d){return s.yytext=s.yytext.substring(p,s.yyleng-d+p)}var f=l;switch(a){case 0:if(s.yytext.slice(-2)==="\\\\"?(u(0,1),this.begin("mu")):s.yytext.slice(-1)==="\\"?(u(0,1),this.begin("emu")):this.begin("mu"),s.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(u(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(s.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return s.yytext=u(1,2).replace(/\\"/g,'"'),80;break;case 32:return s.yytext=u(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return s.yytext=s.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},n.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},n})();t.lexer=e;function r(){this.yy={}}return r.prototype=t,t.Parser=r,new r})();Ro.default=_0;Vf.exports=Ro.default});var Mo=$((No,Ff)=>{"use strict";No.__esModule=!0;function x0(t){return t&&t.__esModule?t:{default:t}}var $0=tt(),La=x0($0);function To(){this.parents=[]}To.prototype={constructor:To,mutating:!1,acceptKey:function(e,r){var n=this.accept(e[r]);if(this.mutating){if(n&&!To.prototype[n.type])throw new La.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+e.type);e[r]=n}},acceptRequired:function(e,r){if(this.acceptKey(e,r),!e[r])throw new La.default(e.type+" requires "+r)},acceptArray:function(e){for(var r=0,n=e.length;r<n;r++)this.acceptKey(e,r),e[r]||(e.splice(r,1),r--,n--)},accept:function(e){if(e){if(!this[e.type])throw new La.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var r=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return e}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:Ao,Decorator:Ao,BlockStatement:Df,DecoratorBlock:Df,PartialStatement:qf,PartialBlockStatement:function(e){qf.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:Ao,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 Ao(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function Df(t){Ao.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function qf(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}No.default=To;Ff.exports=No.default});var Hf=$((Oo,Bf)=>{"use strict";Oo.__esModule=!0;function S0(t){return t&&t.__esModule?t:{default:t}}var k0=Mo(),C0=S0(k0);function kt(){var t=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=t}kt.prototype=new C0.default;kt.prototype.Program=function(t){var e=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var n=t.body,i=0,o=n.length;i<o;i++){var s=n[i],a=this.accept(s);if(a){var l=Va(n,i,r),u=ja(n,i,r),f=a.openStandalone&&l,p=a.closeStandalone&&u,d=a.inlineStandalone&&l&&u;a.close&&dr(n,i,!0),a.open&&Yt(n,i,!0),e&&d&&(dr(n,i),Yt(n,i)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(n[i-1].original)[1])),e&&f&&(dr((s.program||s.inverse).body),Yt(n,i)),e&&p&&(dr(n,i),Yt((s.inverse||s.program).body))}}return t};kt.prototype.BlockStatement=kt.prototype.DecoratorBlock=kt.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,r=t.program&&t.inverse,n=r,i=r;if(r&&r.chained)for(n=r.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var o={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:ja(e.body),closeStandalone:Va((n||e).body)};if(t.openStrip.close&&dr(e.body,null,!0),r){var s=t.inverseStrip;s.open&&Yt(e.body,null,!0),s.close&&dr(n.body,null,!0),t.closeStrip.open&&Yt(i.body,null,!0),!this.options.ignoreStandalone&&Va(e.body)&&ja(n.body)&&(Yt(e.body),dr(n.body))}else t.closeStrip.open&&Yt(e.body,null,!0);return o};kt.prototype.Decorator=kt.prototype.MustacheStatement=function(t){return t.strip};kt.prototype.PartialStatement=kt.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function Va(t,e,r){e===void 0&&(e=t.length);var n=t[e-1],i=t[e-2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original)}function ja(t,e,r){e===void 0&&(e=-1);var n=t[e+1],i=t[e+2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original)}function dr(t,e,r){var n=t[e==null?0:e+1];if(!(!n||n.type!=="ContentStatement"||!r&&n.rightStripped)){var i=n.value;n.value=n.value.replace(r?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==i}}function Yt(t,e,r){var n=t[e==null?t.length-1:e-1];if(!(!n||n.type!=="ContentStatement"||!r&&n.leftStripped)){var i=n.value;return n.value=n.value.replace(r?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==i,n.leftStripped}}Oo.default=kt;Bf.exports=Oo.default});var Wf=$(at=>{"use strict";at.__esModule=!0;at.SourceLocation=I0;at.id=R0;at.stripFlags=T0;at.stripComment=A0;at.preparePath=N0;at.prepareMustache=M0;at.prepareRawBlock=O0;at.prepareBlock=L0;at.prepareProgram=V0;at.preparePartialBlock=j0;function E0(t){return t&&t.__esModule?t:{default:t}}var P0=tt(),Da=E0(P0);function qa(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new Da.default(t.path.original+" doesn't match "+e,r)}}function I0(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 R0(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function T0(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function A0(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function N0(t,e,r){r=this.locInfo(r);for(var n=t?"@":"",i=[],o=0,s=0,a=e.length;s<a;s++){var l=e[s].part,u=e[s].original!==l;if(n+=(e[s].separator||"")+l,!u&&(l===".."||l==="."||l==="this")){if(i.length>0)throw new Da.default("Invalid path: "+n,{loc:r});l===".."&&o++}else i.push(l)}return{type:"PathExpression",data:t,depth:o,parts:i,original:n,loc:r}}function M0(t,e,r,n,i,o){var s=n.charAt(3)||n.charAt(2),a=s!=="{"&&s!=="&",l=/\*/.test(n);return{type:l?"Decorator":"MustacheStatement",path:t,params:e,hash:r,escaped:a,strip:i,loc:this.locInfo(o)}}function O0(t,e,r,n){qa(t,r),n=this.locInfo(n);var i={type:"Program",body:e,strip:{},loc:n};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}}function L0(t,e,r,n,i,o){n&&n.path&&qa(t,n);var s=/\*/.test(t.open);e.blockParams=t.blockParams;var a=void 0,l=void 0;if(r){if(s)throw new Da.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),l=r.strip,a=r.program}return i&&(i=a,a=e,e=i),{type:s?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:a,openStrip:t.strip,inverseStrip:l,closeStrip:n&&n.strip,loc:this.locInfo(o)}}function V0(t,e){if(!e&&t.length){var r=t[0].loc,n=t[t.length-1].loc;r&&n&&(e={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function j0(t,e,r,n){return qa(t,r),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:r&&r.strip,loc:this.locInfo(n)}}});var Uf=$(Wn=>{"use strict";Wn.__esModule=!0;Wn.parseWithoutProcessing=zf;Wn.parse=G0;function D0(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function Ha(t){return t&&t.__esModule?t:{default:t}}var q0=jf(),Fa=Ha(q0),F0=Hf(),B0=Ha(F0),H0=Wf(),W0=D0(H0),z0=tt(),Hn=Ha(z0),U0=Be();Wn.parser=Fa.default;var Lo={};U0.extend(Lo,W0);function zf(t,e){if(t.type==="Program")return J0(t),t;Fa.default.yy=Lo,Lo.locInfo=function(n){return new Lo.SourceLocation(e&&e.srcName,n)};var r=Fa.default.parse(t);return r}function G0(t,e){var r=zf(t,e),n=new B0.default(e);return n.accept(r)}function J0(t){Ba(t)}function Ba(t){if(t!=null){if(Array.isArray(t)){t.forEach(Ba);return}if(typeof t=="object"){if(t.type==="PathExpression"){if(!K0(t.depth))throw new Hn.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(t.parts))throw new Hn.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 Hn.default("Invalid AST: PathExpression.parts must only contain strings")}else if(t.type==="NumberLiteral"){if(typeof t.value!="number"||!isFinite(t.value))throw new Hn.default("Invalid AST: NumberLiteral.value must be a number")}else if(t.type==="BooleanLiteral"&&typeof t.value!="boolean")throw new Hn.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(t).forEach(function(r){r!=="loc"&&Ba(t[r])})}}}function K0(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0}});var Yf=$(Jn=>{"use strict";Jn.__esModule=!0;Jn.Compiler=Wa;Jn.precompile=Z0;Jn.compile=e_;function Jf(t){return t&&t.__esModule?t:{default:t}}var Y0=tt(),Un=Jf(Y0),Gn=Be(),X0=Oa(),zn=Jf(X0),Q0=[].slice;function Wa(){}Wa.prototype={compiler:Wa,equals:function(e){var r=this.opcodes.length;if(e.opcodes.length!==r)return!1;for(var n=0;n<r;n++){var i=this.opcodes[n],o=e.opcodes[n];if(i.opcode!==o.opcode||!Kf(i.args,o.args))return!1}r=this.children.length;for(var n=0;n<r;n++)if(!this.children[n].equals(e.children[n]))return!1;return!0},guid:0,compile:function(e,r){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=r,this.stringParams=r.stringParams,this.trackIds=r.trackIds,r.blockParams=r.blockParams||[],r.knownHelpers=Gn.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},r.knownHelpers),this.accept(e)},compileProgram:function(e){var r=new this.compiler,n=r.compile(e,this.options),i=this.guid++;return this.usePartial=this.usePartial||n.usePartial,this.children[i]=n,this.useDepths=this.useDepths||n.useDepths,i},accept:function(e){if(!this[e.type])throw new Un.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var r=this[e.type](e);return this.sourceNode.shift(),r},Program:function(e){this.options.blockParams.unshift(e.blockParams);for(var r=e.body,n=r.length,i=0;i<n;i++)this.accept(r[i]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){Gf(e);var r=e.program,n=e.inverse;r=r&&this.compileProgram(r),n=n&&this.compileProgram(n);var i=this.classifySexpr(e);i==="helper"?this.helperSexpr(e,r,n):i==="simple"?(this.simpleSexpr(e),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,r,n),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(e){var r=e.program&&this.compileProgram(e.program),n=this.setupFullMustacheParams(e,r,void 0),i=e.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,i.original)},PartialStatement:function(e){this.usePartial=!0;var r=e.program;r&&(r=this.compileProgram(e.program));var n=e.params;if(n.length>1)throw new Un.default("Unsupported number of partial arguments: "+n.length,e);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var i=e.name.original,o=e.name.type==="SubExpression";o&&this.accept(e.name),this.setupFullMustacheParams(e,r,void 0,!0);var s=e.indent||"";this.options.preventIndent&&s&&(this.opcode("appendContent",s),s=""),this.opcode("invokePartial",o,i,s),this.opcode("append")},PartialBlockStatement:function(e){this.PartialStatement(e)},MustacheStatement:function(e){this.SubExpression(e),e.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(e){this.DecoratorBlock(e)},ContentStatement:function(e){e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){Gf(e);var r=this.classifySexpr(e);r==="simple"?this.simpleSexpr(e):r==="helper"?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,r,n){var i=e.path,o=i.parts[0],s=r!=null||n!=null;this.opcode("getContext",i.depth),this.opcode("pushProgram",r),this.opcode("pushProgram",n),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",o,s)},simpleSexpr:function(e){var r=e.path;r.strict=!0,this.accept(r),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,r,n){var i=this.setupFullMustacheParams(e,r,n),o=e.path,s=o.parts[0];if(this.options.knownHelpers[s])this.opcode("invokeKnownHelper",i.length,s);else{if(this.options.knownHelpersOnly)throw new Un.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,zn.default.helpers.simpleId(o))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var r=e.parts[0],n=zn.default.helpers.scopedId(e),i=!e.depth&&!n&&this.blockParamIndex(r);i?this.opcode("lookupBlockParam",i,e.parts):r?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,n):this.opcode("pushContext")},StringLiteral:function(e){this.opcode("pushString",e.value)},NumberLiteral:function(e){this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var r=e.pairs,n=0,i=r.length;for(this.opcode("pushHash");n<i;n++)this.pushParam(r[n].value);for(;n--;)this.opcode("assignToHash",r[n].key);this.opcode("popHash")},opcode:function(e){this.opcodes.push({opcode:e,args:Q0.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var r=zn.default.helpers.simpleId(e.path),n=r&&!!this.blockParamIndex(e.path.parts[0]),i=!n&&zn.default.helpers.helperExpression(e),o=!n&&(i||r);if(o&&!i){var s=e.path.parts[0],a=this.options;a.knownHelpers[s]?i=!0:a.knownHelpersOnly&&(o=!1)}return i?"helper":o?"ambiguous":"simple"},pushParams:function(e){for(var r=0,n=e.length;r<n;r++)this.pushParam(e[r])},pushParam:function(e){var r=e.value!=null?e.value:e.original||"";if(this.stringParams)r.replace&&(r=r.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",r,e.type),e.type==="SubExpression"&&this.accept(e);else{if(this.trackIds){var n=void 0;if(e.parts&&!zn.default.helpers.scopedId(e)&&!e.depth&&(n=this.blockParamIndex(e.parts[0])),n){var i=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,i)}else r=e.original||r,r.replace&&(r=r.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",e.type,r)}this.accept(e)}},setupFullMustacheParams:function(e,r,n,i){var o=e.params;return this.pushParams(o),this.opcode("pushProgram",r),this.opcode("pushProgram",n),e.hash?this.accept(e.hash):this.opcode("emptyHash",i),o},blockParamIndex:function(e){for(var r=0,n=this.options.blockParams.length;r<n;r++){var i=this.options.blockParams[r],o=i&&Gn.indexOf(i,e);if(i&&o>=0)return[r,o]}}};function Z0(t,e,r){if(t==null||typeof t!="string"&&t.type!=="Program")throw new Un.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);e=e||{},"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var n=r.parse(t,e),i=new r.Compiler().compile(n,e);return new r.JavaScriptCompiler().compile(i,e)}function e_(t,e,r){if(e===void 0&&(e={}),t==null||typeof t!="string"&&t.type!=="Program")throw new Un.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=Gn.extend({},e),"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var n=void 0;function i(){var s=r.parse(t,e),a=new r.Compiler().compile(s,e),l=new r.JavaScriptCompiler().compile(a,e,void 0,!0);return r.template(l)}function o(s,a){return n||(n=i()),n.call(this,s,a)}return o._setup=function(s){return n||(n=i()),n._setup(s)},o._child=function(s,a,l,u){return n||(n=i()),n._child(s,a,l,u)},o}function Kf(t,e){if(t===e)return!0;if(Gn.isArray(t)&&Gn.isArray(e)&&t.length===e.length){for(var r=0;r<t.length;r++)if(!Kf(t[r],e[r]))return!1;return!0}}function Gf(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 Qf=$(za=>{var Xf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");za.encode=function(t){if(0<=t&&t<Xf.length)return Xf[t];throw new TypeError("Must be between 0 and 63: "+t)};za.decode=function(t){var e=65,r=90,n=97,i=122,o=48,s=57,a=43,l=47,u=26,f=52;return e<=t&&t<=r?t-e:n<=t&&t<=i?t-n+u:o<=t&&t<=s?t-o+f:t==a?62:t==l?63:-1}});var Ja=$(Ga=>{var Zf=Qf(),Ua=5,ed=1<<Ua,td=ed-1,rd=ed;function t_(t){return t<0?(-t<<1)+1:(t<<1)+0}function r_(t){var e=(t&1)===1,r=t>>1;return e?-r:r}Ga.encode=function(e){var r="",n,i=t_(e);do n=i&td,i>>>=Ua,i>0&&(n|=rd),r+=Zf.encode(n);while(i>0);return r};Ga.decode=function(e,r,n){var i=e.length,o=0,s=0,a,l;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(l=Zf.decode(e.charCodeAt(r++)),l===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));a=!!(l&rd),l&=td,o=o+(l<<s),s+=Ua}while(a);n.value=r_(o),n.rest=r}});var Kr=$(Le=>{function n_(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}Le.getArg=n_;var nd=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,i_=/^data:.+\,.+$/;function Kn(t){var e=t.match(nd);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Le.urlParse=Kn;function Gr(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}Le.urlGenerate=Gr;function Ka(t){var e=t,r=Kn(t);if(r){if(!r.path)return t;e=r.path}for(var n=Le.isAbsolute(e),i=e.split(/\/+/),o,s=0,a=i.length-1;a>=0;a--)o=i[a],o==="."?i.splice(a,1):o===".."?s++:s>0&&(o===""?(i.splice(a+1,s),s=0):(i.splice(a,2),s--));return e=i.join("/"),e===""&&(e=n?"/":"."),r?(r.path=e,Gr(r)):e}Le.normalize=Ka;function id(t,e){t===""&&(t="."),e===""&&(e=".");var r=Kn(e),n=Kn(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Gr(r);if(r||e.match(i_))return e;if(n&&!n.host&&!n.path)return n.host=e,Gr(n);var i=e.charAt(0)==="/"?e:Ka(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,Gr(n)):i}Le.join=id;Le.isAbsolute=function(t){return t.charAt(0)==="/"||nd.test(t)};function o_(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var r=0;e.indexOf(t+"/")!==0;){var n=t.lastIndexOf("/");if(n<0||(t=t.slice(0,n),t.match(/^([^\/]+:\/)?\/*$/)))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)}Le.relative=o_;var od=(function(){var t=Object.create(null);return!("__proto__"in t)})();function sd(t){return t}function s_(t){return ad(t)?"$"+t:t}Le.toSetString=od?sd:s_;function a_(t){return ad(t)?t.slice(1):t}Le.fromSetString=od?sd:a_;function ad(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}function l_(t,e,r){var n=Jr(t.source,e.source);return n!==0||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:Jr(t.name,e.name)}Le.compareByOriginalPositions=l_;function u_(t,e,r){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0||r)||(n=Jr(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:Jr(t.name,e.name)}Le.compareByGeneratedPositionsDeflated=u_;function Jr(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function c_(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=Jr(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:Jr(t.name,e.name)}Le.compareByGeneratedPositionsInflated=c_;function p_(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Le.parseSourceMapInput=p_;function f_(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=Kn(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}e=id(Gr(n),e)}return Ka(e)}Le.computeSourceURL=f_});var Qa=$(ld=>{var Ya=Kr(),Xa=Object.prototype.hasOwnProperty,hr=typeof Map<"u";function qt(){this._array=[],this._set=hr?new Map:Object.create(null)}qt.fromArray=function(e,r){for(var n=new qt,i=0,o=e.length;i<o;i++)n.add(e[i],r);return n};qt.prototype.size=function(){return hr?this._set.size:Object.getOwnPropertyNames(this._set).length};qt.prototype.add=function(e,r){var n=hr?e:Ya.toSetString(e),i=hr?this.has(e):Xa.call(this._set,n),o=this._array.length;(!i||r)&&this._array.push(e),i||(hr?this._set.set(e,o):this._set[n]=o)};qt.prototype.has=function(e){if(hr)return this._set.has(e);var r=Ya.toSetString(e);return Xa.call(this._set,r)};qt.prototype.indexOf=function(e){if(hr){var r=this._set.get(e);if(r>=0)return r}else{var n=Ya.toSetString(e);if(Xa.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};qt.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};qt.prototype.toArray=function(){return this._array.slice()};ld.ArraySet=qt});var pd=$(cd=>{var ud=Kr();function d_(t,e){var r=t.generatedLine,n=e.generatedLine,i=t.generatedColumn,o=e.generatedColumn;return n>r||n==r&&o>=i||ud.compareByGeneratedPositionsInflated(t,e)<=0}function Vo(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Vo.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};Vo.prototype.add=function(e){d_(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Vo.prototype.toArray=function(){return this._sorted||(this._array.sort(ud.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};cd.MappingList=Vo});var Za=$(fd=>{var Yn=Ja(),Ce=Kr(),jo=Qa().ArraySet,h_=pd().MappingList;function lt(t){t||(t={}),this._file=Ce.getArg(t,"file",null),this._sourceRoot=Ce.getArg(t,"sourceRoot",null),this._skipValidation=Ce.getArg(t,"skipValidation",!1),this._sources=new jo,this._names=new jo,this._mappings=new h_,this._sourcesContents=null}lt.prototype._version=3;lt.fromSourceMap=function(e){var r=e.sourceRoot,n=new lt({file:e.file,sourceRoot:r});return e.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,r!=null&&(o.source=Ce.relative(r,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),n.addMapping(o)}),e.sources.forEach(function(i){var o=i;r!==null&&(o=Ce.relative(r,i)),n._sources.has(o)||n._sources.add(o);var s=e.sourceContentFor(i);s!=null&&n.setSourceContent(i,s)}),n};lt.prototype.addMapping=function(e){var r=Ce.getArg(e,"generated"),n=Ce.getArg(e,"original",null),i=Ce.getArg(e,"source",null),o=Ce.getArg(e,"name",null);this._skipValidation||this._validateMapping(r,n,i,o),i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),o!=null&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:o})};lt.prototype.setSourceContent=function(e,r){var n=e;this._sourceRoot!=null&&(n=Ce.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Ce.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Ce.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};lt.prototype.applySourceMap=function(e,r,n){var i=r;if(r==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=e.file}var o=this._sourceRoot;o!=null&&(i=Ce.relative(o,i));var s=new jo,a=new jo;this._mappings.unsortedForEach(function(l){if(l.source===i&&l.originalLine!=null){var u=e.originalPositionFor({line:l.originalLine,column:l.originalColumn});u.source!=null&&(l.source=u.source,n!=null&&(l.source=Ce.join(n,l.source)),o!=null&&(l.source=Ce.relative(o,l.source)),l.originalLine=u.line,l.originalColumn=u.column,u.name!=null&&(l.name=u.name))}var f=l.source;f!=null&&!s.has(f)&&s.add(f);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 u=e.sourceContentFor(l);u!=null&&(n!=null&&(l=Ce.join(n,l)),o!=null&&(l=Ce.relative(o,l)),this.setSourceContent(l,u))},this)};lt.prototype._validateMapping=function(e,r,n,i){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!i)){if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:i}))}};lt.prototype._serializeMappings=function(){for(var e=0,r=1,n=0,i=0,o=0,s=0,a="",l,u,f,p,d=this._mappings.toArray(),m=0,g=d.length;m<g;m++){if(u=d[m],l="",u.generatedLine!==r)for(e=0;u.generatedLine!==r;)l+=";",r++;else if(m>0){if(!Ce.compareByGeneratedPositionsInflated(u,d[m-1]))continue;l+=","}l+=Yn.encode(u.generatedColumn-e),e=u.generatedColumn,u.source!=null&&(p=this._sources.indexOf(u.source),l+=Yn.encode(p-s),s=p,l+=Yn.encode(u.originalLine-1-i),i=u.originalLine-1,l+=Yn.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(f=this._names.indexOf(u.name),l+=Yn.encode(f-o),o=f)),a+=l}return a};lt.prototype._generateSourcesContent=function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Ce.relative(r,n));var i=Ce.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};lt.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};lt.prototype.toString=function(){return JSON.stringify(this.toJSON())};fd.SourceMapGenerator=lt});var dd=$(mr=>{mr.GREATEST_LOWER_BOUND=1;mr.LEAST_UPPER_BOUND=2;function el(t,e,r,n,i,o){var s=Math.floor((e-t)/2)+t,a=i(r,n[s],!0);return a===0?s:a>0?e-s>1?el(s,e,r,n,i,o):o==mr.LEAST_UPPER_BOUND?e<n.length?e:-1:s:s-t>1?el(t,s,r,n,i,o):o==mr.LEAST_UPPER_BOUND?s:t<0?-1:t}mr.search=function(e,r,n,i){if(r.length===0)return-1;var o=el(-1,r.length,e,r,n,i||mr.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&n(r[o],r[o-1],!0)===0;)--o;return o}});var md=$(hd=>{function tl(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m_(t,e){return Math.round(t+Math.random()*(e-t))}function rl(t,e,r,n){if(r<n){var i=m_(r,n),o=r-1;tl(t,i,n);for(var s=t[n],a=r;a<n;a++)e(t[a],s)<=0&&(o+=1,tl(t,o,a));tl(t,o+1,a);var l=o+1;rl(t,e,r,l-1),rl(t,e,l+1,n)}}hd.quickSort=function(t,e){rl(t,e,0,t.length-1)}});var yd=$(Do=>{var B=Kr(),nl=dd(),Yr=Qa().ArraySet,g_=Ja(),Xn=md().quickSort;function ge(t,e){var r=t;return typeof t=="string"&&(r=B.parseSourceMapInput(t)),r.sections!=null?new yt(r,e):new Ae(r,e)}ge.fromSourceMap=function(t,e){return Ae.fromSourceMap(t,e)};ge.prototype._version=3;ge.prototype.__generatedMappings=null;Object.defineProperty(ge.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});ge.prototype.__originalMappings=null;Object.defineProperty(ge.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});ge.prototype._charIsMappingSeparator=function(e,r){var n=e.charAt(r);return n===";"||n===","};ge.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};ge.GENERATED_ORDER=1;ge.ORIGINAL_ORDER=2;ge.GREATEST_LOWER_BOUND=1;ge.LEAST_UPPER_BOUND=2;ge.prototype.eachMapping=function(e,r,n){var i=r||null,o=n||ge.GENERATED_ORDER,s;switch(o){case ge.GENERATED_ORDER:s=this._generatedMappings;break;case ge.ORIGINAL_ORDER:s=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;s.map(function(l){var u=l.source===null?null:this._sources.at(l.source);return u=B.computeSourceURL(a,u,this._sourceMapURL),{source:u,generatedLine:l.generatedLine,generatedColumn:l.generatedColumn,originalLine:l.originalLine,originalColumn:l.originalColumn,name:l.name===null?null:this._names.at(l.name)}},this).forEach(e,i)};ge.prototype.allGeneratedPositionsFor=function(e){var r=B.getArg(e,"line"),n={source:B.getArg(e,"source"),originalLine:r,originalColumn:B.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",B.compareByOriginalPositions,nl.LEAST_UPPER_BOUND);if(o>=0){var s=this._originalMappings[o];if(e.column===void 0)for(var a=s.originalLine;s&&s.originalLine===a;)i.push({line:B.getArg(s,"generatedLine",null),column:B.getArg(s,"generatedColumn",null),lastColumn:B.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o];else for(var l=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==l;)i.push({line:B.getArg(s,"generatedLine",null),column:B.getArg(s,"generatedColumn",null),lastColumn:B.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o]}return i};Do.SourceMapConsumer=ge;function Ae(t,e){var r=t;typeof t=="string"&&(r=B.parseSourceMapInput(t));var n=B.getArg(r,"version"),i=B.getArg(r,"sources"),o=B.getArg(r,"names",[]),s=B.getArg(r,"sourceRoot",null),a=B.getArg(r,"sourcesContent",null),l=B.getArg(r,"mappings"),u=B.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);s&&(s=B.normalize(s)),i=i.map(String).map(B.normalize).map(function(f){return s&&B.isAbsolute(s)&&B.isAbsolute(f)?B.relative(s,f):f}),this._names=Yr.fromArray(o.map(String),!0),this._sources=Yr.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(f){return B.computeSourceURL(s,f,e)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=l,this._sourceMapURL=e,this.file=u}Ae.prototype=Object.create(ge.prototype);Ae.prototype.consumer=ge;Ae.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=B.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==t)return r;return-1};Ae.fromSourceMap=function(e,r){var n=Object.create(Ae.prototype),i=n._names=Yr.fromArray(e._names.toArray(),!0),o=n._sources=Yr.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(m){return B.computeSourceURL(n.sourceRoot,m,r)});for(var s=e._mappings.toArray().slice(),a=n.__generatedMappings=[],l=n.__originalMappings=[],u=0,f=s.length;u<f;u++){var p=s[u],d=new gd;d.generatedLine=p.generatedLine,d.generatedColumn=p.generatedColumn,p.source&&(d.source=o.indexOf(p.source),d.originalLine=p.originalLine,d.originalColumn=p.originalColumn,p.name&&(d.name=i.indexOf(p.name)),l.push(d)),a.push(d)}return Xn(n.__originalMappings,B.compareByOriginalPositions),n};Ae.prototype._version=3;Object.defineProperty(Ae.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function gd(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Ae.prototype._parseMappings=function(e,r){for(var n=1,i=0,o=0,s=0,a=0,l=0,u=e.length,f=0,p={},d={},m=[],g=[],y,v,w,R,O;f<u;)if(e.charAt(f)===";")n++,f++,i=0;else if(e.charAt(f)===",")f++;else{for(y=new gd,y.generatedLine=n,R=f;R<u&&!this._charIsMappingSeparator(e,R);R++);if(v=e.slice(f,R),w=p[v],w)f+=v.length;else{for(w=[];f<R;)g_.decode(e,f,d),O=d.value,f=d.rest,w.push(O);if(w.length===2)throw new Error("Found a source, but no line and column");if(w.length===3)throw new Error("Found a source and line, but no column");p[v]=w}y.generatedColumn=i+w[0],i=y.generatedColumn,w.length>1&&(y.source=a+w[1],a+=w[1],y.originalLine=o+w[2],o=y.originalLine,y.originalLine+=1,y.originalColumn=s+w[3],s=y.originalColumn,w.length>4&&(y.name=l+w[4],l+=w[4])),g.push(y),typeof y.originalLine=="number"&&m.push(y)}Xn(g,B.compareByGeneratedPositionsDeflated),this.__generatedMappings=g,Xn(m,B.compareByOriginalPositions),this.__originalMappings=m};Ae.prototype._findMapping=function(e,r,n,i,o,s){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[i]);return nl.search(e,r,o,s)};Ae.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var r=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};Ae.prototype.originalPositionFor=function(e){var r={generatedLine:B.getArg(e,"line"),generatedColumn:B.getArg(e,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",B.compareByGeneratedPositionsDeflated,B.getArg(e,"bias",ge.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var o=B.getArg(i,"source",null);o!==null&&(o=this._sources.at(o),o=B.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var s=B.getArg(i,"name",null);return s!==null&&(s=this._names.at(s)),{source:o,line:B.getArg(i,"originalLine",null),column:B.getArg(i,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}};Ae.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};Ae.prototype.sourceContentFor=function(e,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var i=e;this.sourceRoot!=null&&(i=B.relative(this.sourceRoot,i));var o;if(this.sourceRoot!=null&&(o=B.urlParse(this.sourceRoot))){var s=i.replace(/^file:\/\//,"");if(o.scheme=="file"&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!o.path||o.path=="/")&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(r)return null;throw new Error('"'+i+'" is not in the SourceMap.')};Ae.prototype.generatedPositionFor=function(e){var r=B.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:B.getArg(e,"line"),originalColumn:B.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",B.compareByOriginalPositions,B.getArg(e,"bias",ge.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===n.source)return{line:B.getArg(o,"generatedLine",null),column:B.getArg(o,"generatedColumn",null),lastColumn:B.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Do.BasicSourceMapConsumer=Ae;function yt(t,e){var r=t;typeof t=="string"&&(r=B.parseSourceMapInput(t));var n=B.getArg(r,"version"),i=B.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new Yr,this._names=new Yr;var o={line:-1,column:0};this._sections=i.map(function(s){if(s.url)throw new Error("Support for url field in sections not implemented.");var a=B.getArg(s,"offset"),l=B.getArg(a,"line"),u=B.getArg(a,"column");if(l<o.line||l===o.line&&u<o.column)throw new Error("Section offsets must be ordered and non-overlapping.");return o=a,{generatedOffset:{generatedLine:l+1,generatedColumn:u+1},consumer:new ge(B.getArg(s,"map"),e)}})}yt.prototype=Object.create(ge.prototype);yt.prototype.constructor=ge;yt.prototype._version=3;Object.defineProperty(yt.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var r=0;r<this._sections[e].consumer.sources.length;r++)t.push(this._sections[e].consumer.sources[r]);return t}});yt.prototype.originalPositionFor=function(e){var r={generatedLine:B.getArg(e,"line"),generatedColumn:B.getArg(e,"column")},n=nl.search(r,this._sections,function(o,s){var a=o.generatedLine-s.generatedOffset.generatedLine;return a||o.generatedColumn-s.generatedOffset.generatedColumn}),i=this._sections[n];return i?i.consumer.originalPositionFor({line:r.generatedLine-(i.generatedOffset.generatedLine-1),column:r.generatedColumn-(i.generatedOffset.generatedLine===r.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};yt.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};yt.prototype.sourceContentFor=function(e,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],o=i.consumer.sourceContentFor(e,!0);if(o)return o}if(r)return null;throw new Error('"'+e+'" is not in the SourceMap.')};yt.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(B.getArg(e,"source"))!==-1){var i=n.consumer.generatedPositionFor(e);if(i){var o={line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)};return o}}}return{line:null,column:null}};yt.prototype._parseMappings=function(e,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],o=i.consumer._generatedMappings,s=0;s<o.length;s++){var a=o[s],l=i.consumer._sources.at(a.source);l=B.computeSourceURL(i.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var u=null;a.name&&(u=i.consumer._names.at(a.name),this._names.add(u),u=this._names.indexOf(u));var f={source:l,generatedLine:a.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(i.generatedOffset.generatedLine===a.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:u};this.__generatedMappings.push(f),typeof f.originalLine=="number"&&this.__originalMappings.push(f)}Xn(this.__generatedMappings,B.compareByGeneratedPositionsDeflated),Xn(this.__originalMappings,B.compareByOriginalPositions)};Do.IndexedSourceMapConsumer=yt});var wd=$(vd=>{var y_=Za().SourceMapGenerator,qo=Kr(),v_=/(\r?\n)/,w_=10,Xr="$$$isSourceNode$$$";function rt(t,e,r,n,i){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=r??null,this.name=i??null,this[Xr]=!0,n!=null&&this.add(n)}rt.fromStringWithSourceMap=function(e,r,n){var i=new rt,o=e.split(v_),s=0,a=function(){var d=g(),m=g()||"";return d+m;function g(){return s<o.length?o[s++]:void 0}},l=1,u=0,f=null;return r.eachMapping(function(d){if(f!==null)if(l<d.generatedLine)p(f,a()),l++,u=0;else{var m=o[s]||"",g=m.substr(0,d.generatedColumn-u);o[s]=m.substr(d.generatedColumn-u),u=d.generatedColumn,p(f,g),f=d;return}for(;l<d.generatedLine;)i.add(a()),l++;if(u<d.generatedColumn){var m=o[s]||"";i.add(m.substr(0,d.generatedColumn)),o[s]=m.substr(d.generatedColumn),u=d.generatedColumn}f=d},this),s<o.length&&(f&&p(f,a()),i.add(o.splice(s).join(""))),r.sources.forEach(function(d){var m=r.sourceContentFor(d);m!=null&&(n!=null&&(d=qo.join(n,d)),i.setSourceContent(d,m))}),i;function p(d,m){if(d===null||d.source===void 0)i.add(m);else{var g=n?qo.join(n,d.source):d.source;i.add(new rt(d.originalLine,d.originalColumn,g,m,d.name))}}};rt.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[Xr]||typeof e=="string")e&&this.children.push(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};rt.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[Xr]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};rt.prototype.walk=function(e){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[Xr]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};rt.prototype.join=function(e){var r,n,i=this.children.length;if(i>0){for(r=[],n=0;n<i-1;n++)r.push(this.children[n]),r.push(e);r.push(this.children[n]),this.children=r}return this};rt.prototype.replaceRight=function(e,r){var n=this.children[this.children.length-1];return n[Xr]?n.replaceRight(e,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(e,r):this.children.push("".replace(e,r)),this};rt.prototype.setSourceContent=function(e,r){this.sourceContents[qo.toSetString(e)]=r};rt.prototype.walkSourceContents=function(e){for(var r=0,n=this.children.length;r<n;r++)this.children[r][Xr]&&this.children[r].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)e(qo.fromSetString(i[r]),this.sourceContents[i[r]])};rt.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};rt.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},n=new y_(e),i=!1,o=null,s=null,a=null,l=null;return this.walk(function(u,f){r.code+=u,f.source!==null&&f.line!==null&&f.column!==null?((o!==f.source||s!==f.line||a!==f.column||l!==f.name)&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name}),o=f.source,s=f.line,a=f.column,l=f.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),o=null,i=!1);for(var p=0,d=u.length;p<d;p++)u.charCodeAt(p)===w_?(r.line++,r.column=0,p+1===d?(o=null,i=!1):i&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name})):r.column++}),this.walkSourceContents(function(u,f){n.setSourceContent(u,f)}),{code:r.code,map:n}};vd.SourceNode=rt});var bd=$(Fo=>{Fo.SourceMapGenerator=Za().SourceMapGenerator;Fo.SourceMapConsumer=yd().SourceMapConsumer;Fo.SourceNode=wd().SourceNode});var Sd=$((Bo,$d)=>{"use strict";Bo.__esModule=!0;var ol=Be(),gr=void 0;try{(typeof define!="function"||!define.amd)&&(_d=bd(),gr=_d.SourceNode)}catch{}var _d;gr||(gr=function(t,e,r,n){this.src="",n&&this.add(n)},gr.prototype={add:function(e){ol.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){ol.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function il(t,e,r){if(ol.isArray(t)){for(var n=[],i=0,o=t.length;i<o;i++)n.push(e.wrap(t[i],r));return n}else if(typeof t=="boolean"||typeof t=="number")return t+"";return t}function xd(t){this.srcFile=t,this.source=[]}xd.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,r){this.source.unshift(this.wrap(e,r))},push:function(e,r){this.source.push(this.wrap(e,r))},merge:function(){var e=this.empty();return this.each(function(r){e.add([" ",r,`
110
+ `])}),e},each:function(e){for(var r=0,n=this.source.length;r<n;r++)e(this.source[r])},empty:function(){var e=this.currentLocation||{start:{}};return new gr(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof gr?e:(e=il(e,this,r),new gr(r.start.line,r.start.column,this.srcFile,e))},functionCall:function(e,r,n){return n=this.generateList(n),this.wrap([e,r?"."+r+"(":"(",n,")"])},quotedString:function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(e){var r=this,n=[];Object.keys(e).forEach(function(o){var s=il(e[o],r);s!=="undefined"&&n.push([r.quotedString(o),":",s])});var i=this.generateList(n);return i.prepend("{"),i.add("}"),i},generateList:function(e){for(var r=this.empty(),n=0,i=e.length;n<i;n++)n&&r.add(","),r.add(il(e[n],this));return r},generateArray:function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r}};Bo.default=xd;$d.exports=Bo.default});var Id=$((Ho,Pd)=>{"use strict";Ho.__esModule=!0;function Ed(t){return t&&t.__esModule?t:{default:t}}var kd=$o(),b_=tt(),sl=Ed(b_),__=Be(),x_=Sd(),Cd=Ed(x_);function Qr(t){this.value=t}function Zr(){}Zr.prototype={nameLookup:function(e,r){return this.internalNameLookup(e,r)},depthedLookup:function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},compilerInfo:function(){var e=kd.COMPILER_REVISION,r=kd.REVISION_CHANGES[e];return[e,r]},appendToBuffer:function(e,r,n){return __.isArray(e)||(e=[e]),e=this.source.wrap(e,r),this.environment.isSimple?["return ",e,";"]:n?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(e,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(r),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(e,r,n,i){this.environment=e,this.options=r,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!i,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,r),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var o=e.opcodes,s=void 0,a=void 0,l=void 0,u=void 0;for(l=0,u=o.length;l<u;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 sl.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(),`;
111
111
  `]),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) {
112
112
  `),this.decorators.push(`}
113
- `),this.decorators=this.decorators.merge()));var p=this.createFunctionContext(i);if(this.isChild)return p;var f={compiler:this.compilerInfo(),main:p};this.decorators&&(f.main_d=this.decorators,f.useDecorators=!0);var d=this.context,m=d.programs,g=d.decorators;for(u=0,c=m.length;u<c;u++)f[u]=m[u],g[u]&&(f[u+"_d"]=g[u],f.useDecorators=!0);return this.environment.usePartial&&(f.usePartial=!0),this.options.data&&(f.useData=!0),this.useDepths&&(f.useDepths=!0),this.useBlockParams&&(f.useBlockParams=!0),this.options.compat&&(f.compat=!0),i?f.compilerOptions=this.options:(f.compiler=JSON.stringify(f.compiler),this.source.currentLocation={start:{line:1,column:0}},f=this.objectLiteral(f),r.srcName?(f=f.toStringWithSourceMap({file:r.destName}),f.map=f.map&&f.map.toString()):f=f.toString()),f},preamble:function(){this.lastContext=0,this.source=new Jp.default(this.options.srcName),this.decorators=new Jp.default(this.options.srcName)},createFunctionContext:function(e){var r=this,n="",i=this.stackVars.concat(this.registers.list);i.length>0&&(n+=", "+i.join(", "));var o=0;Object.keys(this.aliases).forEach(function(u){var c=r.aliases[u];c.children&&c.referenceCount>1&&(n+=", alias"+ ++o+"="+u,c.children[0]="alias"+o)}),this.lookupPropertyFunctionIsUsed&&(n+=", "+this.lookupPropertyFunctionVarDeclaration());var s=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&s.push("blockParams"),this.useDepths&&s.push("depths");var a=this.mergeSource(n);return e?(s.push(a),Function.apply(this,s)):this.source.wrap(["function(",s.join(","),`) {
114
- `,a,"}"])},mergeSource:function(e){var r=this.environment.isSimple,n=!this.forceBuffer,i=void 0,o=void 0,s=void 0,a=void 0;return this.source.each(function(u){u.appendToBuffer?(s?u.prepend(" + "):s=u,a=u):(s&&(o?s.prepend("buffer += "):i=!0,a.add(";"),s=a=void 0),o=!0,r||(n=!1))}),n?s?(s.prepend("return "),a.add(";")):o||this.source.push('return "";'):(e+=", buffer = "+(i?"":this.initializeBuffer()),s?(s.prepend("return buffer + "),a.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(i?"":`;
113
+ `),this.decorators=this.decorators.merge()));var f=this.createFunctionContext(i);if(this.isChild)return f;var p={compiler:this.compilerInfo(),main:f};this.decorators&&(p.main_d=this.decorators,p.useDecorators=!0);var d=this.context,m=d.programs,g=d.decorators;for(l=0,u=m.length;l<u;l++)p[l]=m[l],g[l]&&(p[l+"_d"]=g[l],p.useDecorators=!0);return this.environment.usePartial&&(p.usePartial=!0),this.options.data&&(p.useData=!0),this.useDepths&&(p.useDepths=!0),this.useBlockParams&&(p.useBlockParams=!0),this.options.compat&&(p.compat=!0),i?p.compilerOptions=this.options:(p.compiler=JSON.stringify(p.compiler),this.source.currentLocation={start:{line:1,column:0}},p=this.objectLiteral(p),r.srcName?(p=p.toStringWithSourceMap({file:r.destName}),p.map=p.map&&p.map.toString()):p=p.toString()),p},preamble:function(){this.lastContext=0,this.source=new Cd.default(this.options.srcName),this.decorators=new Cd.default(this.options.srcName)},createFunctionContext:function(e){var r=this,n="",i=this.stackVars.concat(this.registers.list);i.length>0&&(n+=", "+i.join(", "));var o=0;Object.keys(this.aliases).forEach(function(l){var u=r.aliases[l];u.children&&u.referenceCount>1&&(n+=", alias"+ ++o+"="+l,u.children[0]="alias"+o)}),this.lookupPropertyFunctionIsUsed&&(n+=", "+this.lookupPropertyFunctionVarDeclaration());var s=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&s.push("blockParams"),this.useDepths&&s.push("depths");var a=this.mergeSource(n);return e?(s.push(a),Function.apply(this,s)):this.source.wrap(["function(",s.join(","),`) {
114
+ `,a,"}"])},mergeSource:function(e){var r=this.environment.isSimple,n=!this.forceBuffer,i=void 0,o=void 0,s=void 0,a=void 0;return this.source.each(function(l){l.appendToBuffer?(s?l.prepend(" + "):s=l,a=l):(s&&(o?s.prepend("buffer += "):i=!0,a.add(";"),s=a=void 0),o=!0,r||(n=!1))}),n?s?(s.prepend("return "),a.add(";")):o||this.source.push('return "";'):(e+=", buffer = "+(i?"":this.initializeBuffer()),s?(s.prepend("return buffer + "),a.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(i?"":`;
115
115
  `)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
116
116
  lookupProperty = container.lookupProperty || function(parent, propertyName) {
117
117
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -119,77 +119,77 @@ Expecting `+ot.join(", ")+", got '"+(this.terminals_[A]||A)+"'":bt="Parse error
119
119
  }
120
120
  return undefined
121
121
  }
122
- `.trim()},blockValue:function(e){var r=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var i=this.popStack();n.splice(1,0,i),this.push(this.source.functionCall(r,"call",n))},ambiguousBlockValue:function(){var e=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs("",0,r,!0),this.flushInline();var n=this.topStack();r.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(e,"call",r),"}"])},appendContent:function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},append:function(){if(this.isInline())this.replaceStack(function(r){return[" != null ? ",r,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(e){this.lastContext=e},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(e,r,n,i){var o=0;!i&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[o++])):this.pushContext(),this.resolvePath("context",e,o,r,n)},lookupBlockParam:function(e,r){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",r,1)},lookupData:function(e,r,n){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,n)},resolvePath:function(e,r,n,i,o){var s=this;if(this.options.strict||this.options.assumeObjects){this.push(db(this.options.strict&&o,this,r,n,e));return}for(var a=r.length,u=function(p){s.replaceStack(function(f){var d=s.nameLookup(f,r[p],e);return i?[" && ",d]:[" != null ? ",d," : ",f]})},c=n;c<a;c++)u(c)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(e,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof e=="string"?this.pushString(e):this.pushStackLiteral(e))},emptyHash:function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},registerDecorator:function(e,r){var n=this.nameLookup("decorators",r,"decorator"),i=this.setupHelperArgs(r,e);this.decorators.push(["var decorator = ",n,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+r+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",i])," || fn;"])},invokeHelper:function(e,r,n){var i=this.popStack(),o=this.setupHelper(e,r),s=[];n&&s.push(o.name),s.push(i),this.options.strict||s.push(this.aliasable("container.hooks.helperMissing"));var a=["(",this.itemsSeparatedBy(s,"||"),")"],u=this.source.functionCall(a,"call",o.callParams);this.push(u)},itemsSeparatedBy:function(e,r){var n=[];n.push(e[0]);for(var i=1;i<e.length;i++)n.push(r,e[i]);return n},invokeKnownHelper:function(e,r){var n=this.setupHelper(e,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(e,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var i=this.setupHelper(0,e,r),o=this.lastHelper=this.nameLookup("helpers",e,"helper"),s=["(","(helper = ",o," || ",n,")"];this.options.strict||(s[0]="(helper = ",s.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",s,i.paramsInit?["),(",i.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",i.callParams)," : helper))"])},invokePartial:function(e,r,n){var i=[],o=this.setupParams(r,1,i);e&&(r=this.popStack(),delete o.name),n&&(o.indent=JSON.stringify(n)),o.helpers="helpers",o.partials="partials",o.decorators="container.decorators",e?i.unshift(r):i.unshift(this.nameLookup("partials",r,"partial")),this.options.compat&&(o.depths="depths"),o=this.objectLiteral(o),i.push(o),this.push(this.source.functionCall("container.invokePartial","",i))},assignToHash:function(e){var r=this.popStack(),n=void 0,i=void 0,o=void 0;this.trackIds&&(o=this.popStack()),this.stringParams&&(i=this.popStack(),n=this.popStack());var s=this.hash;n&&(s.contexts[e]=n),i&&(s.types[e]=i),o&&(s.ids[e]=o),s.values[e]=r},pushId:function(e,r,n){e==="BlockParam"?this.pushStackLiteral("blockParams["+r[0]+"].path["+r[1]+"]"+(n?" + "+JSON.stringify("."+n):"")):e==="PathExpression"?this.pushString(r):e==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:Br,compileChildren:function(e,r){for(var n=e.children,i=void 0,o=void 0,s=0,a=n.length;s<a;s++){i=n[s],o=new this.compiler;var u=this.matchExistingProgram(i);if(u==null){var c=this.context.programs.push("")-1;i.index=c,i.name="program"+c,this.context.programs[c]=o.compile(i,r,this.context,!this.precompile),this.context.decorators[c]=o.decorators,this.context.environments[c]=i,this.useDepths=this.useDepths||o.useDepths,this.useBlockParams=this.useBlockParams||o.useBlockParams,i.useDepths=this.useDepths,i.useBlockParams=this.useBlockParams}else i.index=u.index,i.name="program"+u.index,this.useDepths=this.useDepths||u.useDepths,this.useBlockParams=this.useBlockParams||u.useBlockParams}},matchExistingProgram:function(e){for(var r=0,n=this.context.environments.length;r<n;r++){var i=this.context.environments[r];if(i&&i.equals(e))return i}},programExpression:function(e){var r=this.environment.children[e],n=[r.index,"data",r.blockParams];return(this.useBlockParams||this.useDepths)&&n.push("blockParams"),this.useDepths&&n.push("depths"),"container.program("+n.join(", ")+")"},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},push:function(e){return e instanceof Fr||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new Fr(e))},pushSource:function(e){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),e&&this.source.push(e)},replaceStack:function(e){var r=["("],n=void 0,i=void 0,o=void 0;if(!this.isInline())throw new Ma.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof Fr)n=[s.value],r=["(",n],o=!0;else{i=!0;var a=this.incrStack();r=["((",this.push(a)," = ",s,")"],n=this.topStack()}var u=e.call(this,n);o||this.popStack(),i&&this.stackSlot--,this.push(r.concat(u,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var e=this.inlineStack;this.inlineStack=[];for(var r=0,n=e.length;r<n;r++){var i=e[r];if(i instanceof Fr)this.compileStack.push(i);else{var o=this.incrStack();this.pushSource([o," = ",i,";"]),this.compileStack.push(o)}}},isInline:function(){return this.inlineStack.length},popStack:function(e){var r=this.isInline(),n=(r?this.inlineStack:this.compileStack).pop();if(!e&&n instanceof Fr)return n.value;if(!r){if(!this.stackSlot)throw new Ma.default("Invalid stack pop");this.stackSlot--}return n},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,r=e[e.length-1];return r instanceof Fr?r.value:r},contextName:function(e){return this.useDepths&&e?"depths["+e+"]":"depth"+e},quotedString:function(e){return this.source.quotedString(e)},objectLiteral:function(e){return this.source.objectLiteral(e)},aliasable:function(e){var r=this.aliases[e];return r?(r.referenceCount++,r):(r=this.aliases[e]=this.source.wrap(e),r.aliasable=!0,r.referenceCount=1,r)},setupHelper:function(e,r,n){var i=[],o=this.setupHelperArgs(r,e,i,n),s=this.nameLookup("helpers",r,"helper"),a=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:i,paramsInit:o,name:s,callParams:[a].concat(i)}},setupParams:function(e,r,n){var i={},o=[],s=[],a=[],u=!n,c=void 0;u&&(n=[]),i.name=this.quotedString(e),i.hash=this.popStack(),this.trackIds&&(i.hashIds=this.popStack()),this.stringParams&&(i.hashTypes=this.popStack(),i.hashContexts=this.popStack());var p=this.popStack(),f=this.popStack();(f||p)&&(i.fn=f||"container.noop",i.inverse=p||"container.noop");for(var d=r;d--;)c=this.popStack(),n[d]=c,this.trackIds&&(a[d]=this.popStack()),this.stringParams&&(s[d]=this.popStack(),o[d]=this.popStack());return u&&(i.args=this.source.generateArray(n)),this.trackIds&&(i.ids=this.source.generateArray(a)),this.stringParams&&(i.types=this.source.generateArray(s),i.contexts=this.source.generateArray(o)),this.options.data&&(i.data="data"),this.useBlockParams&&(i.blockParams="blockParams"),i},setupHelperArgs:function(e,r,n,i){var o=this.setupParams(e,r,n);return o.loc=JSON.stringify(this.source.currentLocation),o=this.objectLiteral(o),i?(this.useRegister("options"),n.push("options"),["options=",o]):n?(n.push(o),""):o}};(function(){for(var t="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),e=Br.RESERVED_WORDS={},r=0,n=t.length;r<n;r++)e[t[r]]=!0})();Br.isValidJavaScriptVariableName=function(t){return!Br.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)};function db(t,e,r,n,i){var o=e.popStack(),s=r.length;t&&s--;for(var a=n;a<s;a++)o=e.nameLookup(o,r[a],i);return t?[e.aliasable("container.strict"),"(",o,", ",e.quotedString(r[s]),", ",JSON.stringify(e.source.currentLocation)," )"]:o}xo.default=Br;Xp.exports=xo.default});var td=$((ko,ed)=>{"use strict";ko.__esModule=!0;function Ln(t){return t&&t.__esModule?t:{default:t}}var hb=np(),mb=Ln(hb),gb=ua(),yb=Ln(gb),La=mp(),ja=wp(),vb=Qp(),wb=Ln(vb),_b=mo(),bb=Ln(_b),Sb=sa(),$b=Ln(Sb),xb=mb.default.create;function Zp(){var t=xb();return t.compile=function(e,r){return ja.compile(e,r,t)},t.precompile=function(e,r){return ja.precompile(e,r,t)},t.AST=yb.default,t.Compiler=ja.Compiler,t.JavaScriptCompiler=wb.default,t.Parser=La.parser,t.parse=La.parse,t.parseWithoutProcessing=La.parseWithoutProcessing,t}var Hr=Zp();Hr.create=Zp;$b.default(Hr);Hr.Visitor=bb.default;Hr.default=Hr;ko.default=Hr;ed.exports=ko.default});var rd=$(Eo=>{"use strict";Eo.__esModule=!0;Eo.print=Cb;Eo.PrintVisitor=ve;function kb(t){return t&&t.__esModule?t:{default:t}}var Eb=mo(),Pb=kb(Eb);function Cb(t){return new ve().accept(t)}function ve(){this.padding=0}ve.prototype=new Pb.default;ve.prototype.pad=function(t){for(var e="",r=0,n=this.padding;r<n;r++)e+=" ";return e+=t+`
123
- `,e};ve.prototype.Program=function(t){var e="",r=t.body,n=void 0,i=void 0;if(t.blockParams){var o="BLOCK PARAMS: [";for(n=0,i=t.blockParams.length;n<i;n++)o+=" "+t.blockParams[n];o+=" ]",e+=this.pad(o)}for(n=0,i=r.length;n<i;n++)e+=this.accept(r[n]);return this.padding--,e};ve.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};ve.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};ve.prototype.BlockStatement=ve.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};ve.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+" }}")};ve.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+" }}")};ve.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};ve.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};ve.prototype.SubExpression=function(t){for(var e=t.params,r=[],n=void 0,i=0,o=e.length;i<o;i++)r.push(this.accept(e[i]));return e="["+r.join(", ")+"]",n=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+n};ve.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};ve.prototype.StringLiteral=function(t){return'"'+t.value+'"'};ve.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};ve.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};ve.prototype.UndefinedLiteral=function(){return"UNDEFINED"};ve.prototype.NullLiteral=function(){return"NULL"};ve.prototype.Hash=function(t){for(var e=t.pairs,r=[],n=0,i=e.length;n<i;n++)r.push(this.accept(e[n]));return"HASH{"+r.join(", ")+"}"};ve.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var sd=$((VC,od)=>{var Po=td().default,id=rd();Po.PrintVisitor=id.PrintVisitor;Po.print=id.print;od.exports=Po;function nd(t,e){var r=Pr("fs"),n=r.readFileSync(e,"utf8");t.exports=Po.compile(n)}typeof Pr<"u"&&Pr.extensions&&(Pr.extensions[".handlebars"]=nd,Pr.extensions[".hbs"]=nd)});import{readFile as Ib}from"node:fs/promises";import{resolve as Rb}from"node:path";async function ct(t,e,r){let n=Rb(t,e),i=ad.get(n);if(!i){let o=await Ib(n,"utf-8");i=ld.default.compile(o,{noEscape:!0}),ad.set(n,i)}return i(r)}var ld,ad,jn=J(()=>{"use strict";ld=ku(sd(),1),ad=new Map});var Va=J(()=>{"use strict";qn()});import{readFile as cd,writeFile as Nb,mkdir as Tb,stat as Ab,rm as Ob,unlink as Mb}from"node:fs/promises";import{resolve as Ot}from"node:path";async function ud(t){try{return await Ab(t),!0}catch{return!1}}async function Da(t){let e=Ot(t,"..");for(let r of[Ot(t,"runtime"),Ot(e,"components"),Ot(e,"runtime")])await ud(r)&&await Ob(r,{recursive:!0,force:!0});for(let r of["extensions.tsx","extensions.ts","contracts.ts"]){let n=Ot(t,r);await ud(n)&&await Mb(n)}}function Lb(t){return t.replace(/^import type \{ DispatchableAction \} from [^;]+;\n/gm,"")}async function fd(t,e,r){let n=xe(t),i=e.generated.reactDir,o=Vn(r??(e.rendererTemplatesDir?Ot(n,e.rendererTemplatesDir):void 0)),s=Ur();await Tb(i,{recursive:!0}),await Da(i);let a=await cd(Ot(s,"types.ts"),"utf-8"),u=await cd(Ot(s,"style.ts"),"utf-8"),c=await ct(o,"dispatch.ts.hbs",{}),p=Lb(c),f=await ct(o,"runtime.ts.hbs",{typesBody:a.trim(),styleBody:u.trim(),dispatchBody:p.trim()}),d=Ot(i,"runtime.ts");return await Nb(d,f,"utf-8"),{runtimePath:d}}var pd=J(()=>{"use strict";Pt();jn();Va()});var hd={};Cr(hd,{renderReactRuntime:()=>Ub});import{writeFile as dd,stat as jb,unlink as Vb}from"node:fs/promises";import{relative as Db,resolve as zr}from"node:path";async function qb(t){try{return await jb(t),!0}catch{return!1}}async function Fb(t,e,r,n){let i=await Fn(r,t),o=await ct(Vn(n),"theme.css.hbs",{themeCss:i});await dd(e,o,"utf-8")}async function Bb(t){let e=zr(t,"..");for(let r of["theme.css","contracts.ts","view-bridge.generated.ts"]){let n=zr(e,r);await qb(n)&&await Vb(n)}}async function Hb(t,e){let r=xe(t),n=e.generated.reactDir,i=zr(r,"src/components/extensions.tsx"),o=Db(n,i).replace(/\\/g,"/");o.startsWith(".")||(o=`./${o}`);let s=o.replace(/\.tsx?$/,".js"),a=zr(n,"extensions.generated.ts");return await dd(a,`/** Auto-generated extension re-export \u2014 DO NOT EDIT */
122
+ `.trim()},blockValue:function(e){var r=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var i=this.popStack();n.splice(1,0,i),this.push(this.source.functionCall(r,"call",n))},ambiguousBlockValue:function(){var e=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs("",0,r,!0),this.flushInline();var n=this.topStack();r.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(e,"call",r),"}"])},appendContent:function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},append:function(){if(this.isInline())this.replaceStack(function(r){return[" != null ? ",r,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(e){this.lastContext=e},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(e,r,n,i){var o=0;!i&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[o++])):this.pushContext(),this.resolvePath("context",e,o,r,n)},lookupBlockParam:function(e,r){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",r,1)},lookupData:function(e,r,n){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,n)},resolvePath:function(e,r,n,i,o){var s=this;if(this.options.strict||this.options.assumeObjects){this.push($_(this.options.strict&&o,this,r,n,e));return}for(var a=r.length,l=function(f){s.replaceStack(function(p){var d=s.nameLookup(p,r[f],e);return i?[" && ",d]:[" != null ? ",d," : ",p]})},u=n;u<a;u++)l(u)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(e,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof e=="string"?this.pushString(e):this.pushStackLiteral(e))},emptyHash:function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},registerDecorator:function(e,r){var n=this.nameLookup("decorators",r,"decorator"),i=this.setupHelperArgs(r,e);this.decorators.push(["var decorator = ",n,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+r+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",i])," || fn;"])},invokeHelper:function(e,r,n){var i=this.popStack(),o=this.setupHelper(e,r),s=[];n&&s.push(o.name),s.push(i),this.options.strict||s.push(this.aliasable("container.hooks.helperMissing"));var a=["(",this.itemsSeparatedBy(s,"||"),")"],l=this.source.functionCall(a,"call",o.callParams);this.push(l)},itemsSeparatedBy:function(e,r){var n=[];n.push(e[0]);for(var i=1;i<e.length;i++)n.push(r,e[i]);return n},invokeKnownHelper:function(e,r){var n=this.setupHelper(e,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(e,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var i=this.setupHelper(0,e,r),o=this.lastHelper=this.nameLookup("helpers",e,"helper"),s=["(","(helper = ",o," || ",n,")"];this.options.strict||(s[0]="(helper = ",s.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",s,i.paramsInit?["),(",i.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",i.callParams)," : helper))"])},invokePartial:function(e,r,n){var i=[],o=this.setupParams(r,1,i);e&&(r=this.popStack(),delete o.name),n&&(o.indent=JSON.stringify(n)),o.helpers="helpers",o.partials="partials",o.decorators="container.decorators",e?i.unshift(r):i.unshift(this.nameLookup("partials",r,"partial")),this.options.compat&&(o.depths="depths"),o=this.objectLiteral(o),i.push(o),this.push(this.source.functionCall("container.invokePartial","",i))},assignToHash:function(e){var r=this.popStack(),n=void 0,i=void 0,o=void 0;this.trackIds&&(o=this.popStack()),this.stringParams&&(i=this.popStack(),n=this.popStack());var s=this.hash;n&&(s.contexts[e]=n),i&&(s.types[e]=i),o&&(s.ids[e]=o),s.values[e]=r},pushId:function(e,r,n){e==="BlockParam"?this.pushStackLiteral("blockParams["+r[0]+"].path["+r[1]+"]"+(n?" + "+JSON.stringify("."+n):"")):e==="PathExpression"?this.pushString(r):e==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:Zr,compileChildren:function(e,r){for(var n=e.children,i=void 0,o=void 0,s=0,a=n.length;s<a;s++){i=n[s],o=new this.compiler;var l=this.matchExistingProgram(i);if(l==null){var u=this.context.programs.push("")-1;i.index=u,i.name="program"+u,this.context.programs[u]=o.compile(i,r,this.context,!this.precompile),this.context.decorators[u]=o.decorators,this.context.environments[u]=i,this.useDepths=this.useDepths||o.useDepths,this.useBlockParams=this.useBlockParams||o.useBlockParams,i.useDepths=this.useDepths,i.useBlockParams=this.useBlockParams}else i.index=l.index,i.name="program"+l.index,this.useDepths=this.useDepths||l.useDepths,this.useBlockParams=this.useBlockParams||l.useBlockParams}},matchExistingProgram:function(e){for(var r=0,n=this.context.environments.length;r<n;r++){var i=this.context.environments[r];if(i&&i.equals(e))return i}},programExpression:function(e){var r=this.environment.children[e],n=[r.index,"data",r.blockParams];return(this.useBlockParams||this.useDepths)&&n.push("blockParams"),this.useDepths&&n.push("depths"),"container.program("+n.join(", ")+")"},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},push:function(e){return e instanceof Qr||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new Qr(e))},pushSource:function(e){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),e&&this.source.push(e)},replaceStack:function(e){var r=["("],n=void 0,i=void 0,o=void 0;if(!this.isInline())throw new sl.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof Qr)n=[s.value],r=["(",n],o=!0;else{i=!0;var a=this.incrStack();r=["((",this.push(a)," = ",s,")"],n=this.topStack()}var l=e.call(this,n);o||this.popStack(),i&&this.stackSlot--,this.push(r.concat(l,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var e=this.inlineStack;this.inlineStack=[];for(var r=0,n=e.length;r<n;r++){var i=e[r];if(i instanceof Qr)this.compileStack.push(i);else{var o=this.incrStack();this.pushSource([o," = ",i,";"]),this.compileStack.push(o)}}},isInline:function(){return this.inlineStack.length},popStack:function(e){var r=this.isInline(),n=(r?this.inlineStack:this.compileStack).pop();if(!e&&n instanceof Qr)return n.value;if(!r){if(!this.stackSlot)throw new sl.default("Invalid stack pop");this.stackSlot--}return n},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,r=e[e.length-1];return r instanceof Qr?r.value:r},contextName:function(e){return this.useDepths&&e?"depths["+e+"]":"depth"+e},quotedString:function(e){return this.source.quotedString(e)},objectLiteral:function(e){return this.source.objectLiteral(e)},aliasable:function(e){var r=this.aliases[e];return r?(r.referenceCount++,r):(r=this.aliases[e]=this.source.wrap(e),r.aliasable=!0,r.referenceCount=1,r)},setupHelper:function(e,r,n){var i=[],o=this.setupHelperArgs(r,e,i,n),s=this.nameLookup("helpers",r,"helper"),a=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:i,paramsInit:o,name:s,callParams:[a].concat(i)}},setupParams:function(e,r,n){var i={},o=[],s=[],a=[],l=!n,u=void 0;l&&(n=[]),i.name=this.quotedString(e),i.hash=this.popStack(),this.trackIds&&(i.hashIds=this.popStack()),this.stringParams&&(i.hashTypes=this.popStack(),i.hashContexts=this.popStack());var f=this.popStack(),p=this.popStack();(p||f)&&(i.fn=p||"container.noop",i.inverse=f||"container.noop");for(var d=r;d--;)u=this.popStack(),n[d]=u,this.trackIds&&(a[d]=this.popStack()),this.stringParams&&(s[d]=this.popStack(),o[d]=this.popStack());return l&&(i.args=this.source.generateArray(n)),this.trackIds&&(i.ids=this.source.generateArray(a)),this.stringParams&&(i.types=this.source.generateArray(s),i.contexts=this.source.generateArray(o)),this.options.data&&(i.data="data"),this.useBlockParams&&(i.blockParams="blockParams"),i},setupHelperArgs:function(e,r,n,i){var o=this.setupParams(e,r,n);return o.loc=JSON.stringify(this.source.currentLocation),o=this.objectLiteral(o),i?(this.useRegister("options"),n.push("options"),["options=",o]):n?(n.push(o),""):o}};(function(){for(var t="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),e=Zr.RESERVED_WORDS={},r=0,n=t.length;r<n;r++)e[t[r]]=!0})();Zr.isValidJavaScriptVariableName=function(t){return!Zr.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)};function $_(t,e,r,n,i){var o=e.popStack(),s=r.length;t&&s--;for(var a=n;a<s;a++)o=e.nameLookup(o,r[a],i);return t?[e.aliasable("container.strict"),"(",o,", ",e.quotedString(r[s]),", ",JSON.stringify(e.source.currentLocation)," )"]:o}Ho.default=Zr;Pd.exports=Ho.default});var Ad=$((Wo,Td)=>{"use strict";Wo.__esModule=!0;function Qn(t){return t&&t.__esModule?t:{default:t}}var S_=Mf(),k_=Qn(S_),C_=Oa(),E_=Qn(C_),al=Uf(),ll=Yf(),P_=Id(),I_=Qn(P_),R_=Mo(),T_=Qn(R_),A_=Ta(),N_=Qn(A_),M_=k_.default.create;function Rd(){var t=M_();return t.compile=function(e,r){return ll.compile(e,r,t)},t.precompile=function(e,r){return ll.precompile(e,r,t)},t.AST=E_.default,t.Compiler=ll.Compiler,t.JavaScriptCompiler=I_.default,t.Parser=al.parser,t.parse=al.parse,t.parseWithoutProcessing=al.parseWithoutProcessing,t}var en=Rd();en.create=Rd;N_.default(en);en.Visitor=T_.default;en.default=en;Wo.default=en;Td.exports=Wo.default});var Nd=$(zo=>{"use strict";zo.__esModule=!0;zo.print=j_;zo.PrintVisitor=Se;function O_(t){return t&&t.__esModule?t:{default:t}}var L_=Mo(),V_=O_(L_);function j_(t){return new Se().accept(t)}function Se(){this.padding=0}Se.prototype=new V_.default;Se.prototype.pad=function(t){for(var e="",r=0,n=this.padding;r<n;r++)e+=" ";return e+=t+`
123
+ `,e};Se.prototype.Program=function(t){var e="",r=t.body,n=void 0,i=void 0;if(t.blockParams){var o="BLOCK PARAMS: [";for(n=0,i=t.blockParams.length;n<i;n++)o+=" "+t.blockParams[n];o+=" ]",e+=this.pad(o)}for(n=0,i=r.length;n<i;n++)e+=this.accept(r[n]);return this.padding--,e};Se.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};Se.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};Se.prototype.BlockStatement=Se.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};Se.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+" }}")};Se.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+" }}")};Se.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};Se.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};Se.prototype.SubExpression=function(t){for(var e=t.params,r=[],n=void 0,i=0,o=e.length;i<o;i++)r.push(this.accept(e[i]));return e="["+r.join(", ")+"]",n=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+n};Se.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};Se.prototype.StringLiteral=function(t){return'"'+t.value+'"'};Se.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};Se.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};Se.prototype.UndefinedLiteral=function(){return"UNDEFINED"};Se.prototype.NullLiteral=function(){return"NULL"};Se.prototype.Hash=function(t){for(var e=t.pairs,r=[],n=0,i=e.length;n<i;n++)r.push(this.accept(e[n]));return"HASH{"+r.join(", ")+"}"};Se.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var Vd=$((IR,Ld)=>{var Uo=Ad().default,Od=Nd();Uo.PrintVisitor=Od.PrintVisitor;Uo.print=Od.print;Ld.exports=Uo;function Md(t,e){var r=Vr("fs"),n=r.readFileSync(e,"utf8");t.exports=Uo.compile(n)}typeof Vr<"u"&&Vr.extensions&&(Vr.extensions[".handlebars"]=Md,Vr.extensions[".hbs"]=Md)});import{readFile as D_}from"node:fs/promises";import{resolve as q_}from"node:path";async function vt(t,e,r){let n=q_(t,e),i=jd.get(n);if(!i){let o=await D_(n,"utf-8");i=Dd.default.compile(o,{noEscape:!0}),jd.set(n,i)}return i(r)}var Dd,jd,Zn=X(()=>{"use strict";Dd=np(Vd(),1),jd=new Map});var ul=X(()=>{"use strict";ri()});import{readFile as qd,writeFile as F_,mkdir as B_,stat as H_,rm as W_,unlink as z_}from"node:fs/promises";import{resolve as Ft}from"node:path";async function Fd(t){try{return await H_(t),!0}catch{return!1}}async function cl(t){let e=Ft(t,"..");for(let r of[Ft(t,"runtime"),Ft(e,"components"),Ft(e,"runtime")])await Fd(r)&&await W_(r,{recursive:!0,force:!0});for(let r of["extensions.tsx","extensions.ts","contracts.ts"]){let n=Ft(t,r);await Fd(n)&&await z_(n)}}function U_(t){return t.replace(/^import type \{ DispatchableAction \} from [^;]+;\n/gm,"")}async function Bd(t,e,r){let n=Te(t),i=e.generated.reactDir,o=ei(r??(e.rendererTemplatesDir?Ft(n,e.rendererTemplatesDir):void 0)),s=tn();await B_(i,{recursive:!0}),await cl(i);let a=await qd(Ft(s,"types.ts"),"utf-8"),l=await qd(Ft(s,"style.ts"),"utf-8"),u=await vt(o,"dispatch.ts.hbs",{}),f=U_(u),p=await vt(o,"runtime.ts.hbs",{typesBody:a.trim(),styleBody:l.trim(),dispatchBody:f.trim()}),d=Ft(i,"runtime.ts");return await F_(d,p,"utf-8"),{runtimePath:d}}var Hd=X(()=>{"use strict";Ot();Zn();ul()});var zd={};lr(zd,{renderReactRuntime:()=>ex});import{writeFile as Wd,stat as G_,unlink as J_}from"node:fs/promises";import{relative as K_,resolve as rn}from"node:path";async function Y_(t){try{return await G_(t),!0}catch{return!1}}async function X_(t,e,r,n){let i=await ni(r,t),o=await vt(ei(n),"theme.css.hbs",{themeCss:i});await Wd(e,o,"utf-8")}async function Q_(t){let e=rn(t,"..");for(let r of["theme.css","contracts.ts","view-bridge.generated.ts"]){let n=rn(e,r);await Y_(n)&&await J_(n)}}async function Z_(t,e){let r=Te(t),n=e.generated.reactDir,i=rn(r,"src/components/extensions.tsx"),o=K_(n,i).replace(/\\/g,"/");o.startsWith(".")||(o=`./${o}`);let s=o.replace(/\.tsx?$/,".js"),a=rn(n,"extensions.generated.ts");return await Wd(a,`/** Auto-generated extension re-export \u2014 DO NOT EDIT */
124
124
  export * from '${s}';
125
- `,"utf-8"),a}async function Ub(t,e){let r=xe(t),n=e.rendererTemplatesDir?zr(r,e.rendererTemplatesDir):void 0,i=e.generated.reactDir;await Bb(i),await Da(i);let{runtimePath:o}=await fd(t,e,n),s=await Hb(t,e),a=zr(i,"theme.css");await Fb(t,a,e,n),console.log(` react/runtime \u2192 ${o}`),console.log(` react/extensions \u2192 ${s}`),console.log(` react/theme \u2192 ${a}`)}var md=J(()=>{"use strict";Pt();Co();jn();Va();pd()});function zb(t,e){return t.entries.find(n=>n.path===e)?.value??""}function Wb(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let r=e[1],n=parseInt(r.slice(0,2),16),i=parseInt(r.slice(2,4),16),o=parseInt(r.slice(4,6),16);return`Color(red: ${(n/255).toFixed(3)}, green: ${(i/255).toFixed(3)}, blue: ${(o/255).toFixed(3)})`}function ar(t){let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function gd(t){return Wb(t)??(t?`Color(${JSON.stringify(t)})`:null)}function yd(t,e){let r=[];for(let[n,i]of Object.entries(t)){let o=zb(e,i.ref);if(o)switch(n){case"background":case"foreground":{let s=gd(o);s&&r.push({property:n,swiftValue:s});break}case"padding":{let s=ar(o);if(s!==null)r.push({property:n,swiftValue:String(s)});else{let a=o.trim().split(/\s+/);if(a.length===2){let u=ar(a[0]),c=ar(a[1]);u!==null&&r.push({property:"paddingV",swiftValue:String(u)}),c!==null&&r.push({property:"paddingH",swiftValue:String(c)})}}break}case"radius":case"fontSize":case"minHeight":case"maxWidth":{let s=ar(o);s!==null&&r.push({property:n,swiftValue:String(s)});break}case"width":{if(o==="100%"||o==="fill")r.push({property:"widthFill",swiftValue:"true"});else{let s=ar(o);s!==null&&r.push({property:n,swiftValue:String(s)})}break}case"height":{if(o==="100%"||o==="fill")r.push({property:"heightFill",swiftValue:"true"});else{let s=ar(o);s!==null&&r.push({property:n,swiftValue:String(s)})}break}case"border":{let s=o.match(/^([\d.]+)px/);s&&r.push({property:"borderWidth",swiftValue:String(Number(s[1]))});break}case"borderColor":{let s=gd(o);s&&r.push({property:"borderColor",swiftValue:s});break}case"margin":{let s=ar(o);s!==null&&r.push({property:n,swiftValue:String(s)});break}case"fontWeight":{let s=Gb[o];s&&r.push({property:n,swiftValue:s});break}case"shadow":{r.push({property:n,swiftValue:o==="true"||o==="none"?"false":"true"});break}case"display":case"flexDirection":case"gridTemplateColumns":case"alignItems":case"justifyContent":case"typography":break;default:console.warn(`[view-contracts] SwiftUI theme: variant property "${n}" is not handled (value: "${o}"). Add a case to renderTheme.ts resolveVariantEntries().`);break}}return r}function wd(t,e){if(t.length===0)return`${e}VcVariantStyle()`;let n=[...t].sort((i,o)=>vd.indexOf(i.property)-vd.indexOf(o.property)).map(i=>`${i.property}: ${i.swiftValue}`).join(", ");return`${e}VcVariantStyle(${n})`}function Kb(t,e){return{...t,...e}}function _d(t,e){let r=[];r.push("/**"),r.push(" * Auto-generated SwiftUI theme \u2014 variant style dictionary."),r.push(" * Each entry is pre-merged: base theme defaults < variant overrides."),r.push(" * DO NOT EDIT \u2014 regenerate with: view-contracts build"),r.push(" */"),r.push("import SwiftUI"),r.push(""),r.push("struct VcVariantStyle {"),r.push(" var foreground: Color?"),r.push(" var background: Color?"),r.push(" var padding: CGFloat?"),r.push(" var paddingH: CGFloat?"),r.push(" var paddingV: CGFloat?"),r.push(" var widthFill: Bool?"),r.push(" var heightFill: Bool?"),r.push(" var radius: CGFloat?"),r.push(" var fontSize: CGFloat?"),r.push(" var fontWeight: Font.Weight?"),r.push(" var shadow: Bool?"),r.push(" var borderWidth: CGFloat?"),r.push(" var borderColor: Color?"),r.push(" var minHeight: CGFloat?"),r.push(" var maxWidth: CGFloat?"),r.push("}"),r.push(""),r.push("extension View {"),r.push(" func applyVcStyle(_ s: VcVariantStyle) -> some View {"),r.push(" self"),r.push(" .ifSet(s.foreground) { $0.foregroundStyle($1) }"),r.push(" .ifSet(s.fontSize) { $0.font(.system(size: $1, weight: s.fontWeight ?? .regular)) }"),r.push(" .ifSet(s.padding) { $0.padding($1) }"),r.push(" .ifSet(s.paddingH) { $0.padding(.horizontal, $1) }"),r.push(" .ifSet(s.paddingV) { $0.padding(.vertical, $1) }"),r.push(" .vcFillFrame(widthFill: s.widthFill ?? false, heightFill: s.heightFill ?? false)"),r.push(" .ifSet(s.background) { $0.background($1) }"),r.push(" .ifSet(s.radius) { $0.clipShape(RoundedRectangle(cornerRadius: $1)) }"),r.push(" .ifSet(s.borderColor) { $0.overlay(RoundedRectangle(cornerRadius: s.radius ?? 0).stroke($1, lineWidth: s.borderWidth ?? 1)) }"),r.push(" .ifSet(s.shadow) { v, on in on ? AnyView(v.shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)) : AnyView(v) }"),r.push(" }"),r.push("}"),r.push(""),r.push("extension View {"),r.push(" @ViewBuilder"),r.push(" func vcFillFrame(widthFill: Bool, heightFill: Bool) -> some View {"),r.push(" if widthFill && heightFill {"),r.push(" self.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"),r.push(" } else if widthFill {"),r.push(" self.frame(maxWidth: .infinity, alignment: .leading)"),r.push(" } else if heightFill {"),r.push(" self.frame(maxHeight: .infinity, alignment: .top)"),r.push(" } else {"),r.push(" self"),r.push(" }"),r.push(" }"),r.push("}"),r.push(""),r.push("extension View {"),r.push(" @ViewBuilder"),r.push(" func ifSet<T, V: View>(_ value: T?, _ transform: (Self, T) -> V) -> some View {"),r.push(" if let value { transform(self, value) } else { self }"),r.push(" }"),r.push("}"),r.push(""),r.push("enum VcTheme {"),r.push(" static let defaults: [String: VcVariantStyle] = [");for(let[n,i]of Object.entries(t.defaults)){if(Object.keys(i).length===0)continue;let o=yd(i,e);o.length!==0&&r.push(` ${JSON.stringify(n)}: ${wd(o,"").trim()},`)}r.push(" ]"),r.push(""),r.push(" static let variants: [String: [String: VcVariantStyle]] = [");for(let[n,i]of Object.entries(t.variants)){let o=Object.entries(i);if(o.length===0)continue;let s=t.defaults[n]??{};r.push(` ${JSON.stringify(n)}: [`);for(let[a,u]of o){let c=Kb(s,u),p=yd(c,e),f=wd(p," ");r.push(` ${JSON.stringify(a)}: ${f.trim()},`)}r.push(" ],")}return r.push(" ]"),r.push(""),r.push(" static func resolve(_ element: String, variant: String) -> VcVariantStyle {"),r.push(" variants[element]?[variant] ?? defaults[element] ?? VcVariantStyle()"),r.push(" }"),r.push("}"),r.push(""),r.join(`
126
- `)}var Gb,vd,bd=J(()=>{"use strict";Gb={bold:".bold",semibold:".semibold",medium:".medium",regular:".regular",600:".semibold",700:".bold",500:".medium",400:".regular"};vd=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});import{resolve as Jb}from"node:path";function Xb(t){for(let[e,r]of Object.entries(t.elements)){let n=r.container!==void 0&&r.container!==null,i=r.leaf!==void 0&&r.leaf!==null;if(n===i)throw new Error(`${Yb}: element "${e}" must have exactly one of "container" or "leaf"`);(r.container==="vstack"||r.container==="hstack")&&r.spacingProp}}async function Sd(t){if(!t&&qa)return qa;let e=t??Jb(ke(),"renderers/swiftui/elements.yaml"),r=await Fi(e);return Xb(r),t||(qa=r),r}var Yb,qa,$d=J(()=>{"use strict";Ft();Ms();Yb="renderers/swiftui/elements.yaml",qa=null});function Qb(t,e){let r=t.entries.find(n=>n.path===e);if(!r)throw new Error(`Token reference "${e}" not found while merging visual props`);return r.value}function xd(t,e){let r={};for(let[n,i]of Object.entries(t))r[n]=Qb(e,i.ref);return r}function Zb(t){let e={};for(let[r,n]of Object.entries(t))n!=null&&(typeof n=="string"||typeof n=="number"||typeof n=="boolean")&&(e[r]=n);return e}function Io(t){let e=t.theme.defaults[t.elementName]??{},r=t.variantLiteral?t.theme.variants[t.elementName]?.[t.variantLiteral]??{}:{};return{...xd(e,t.tokens),...xd(r,t.tokens),...Zb(t.instanceLiterals)}}var kd=J(()=>{"use strict"});function Je(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 Fa(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let r=e[1],n=parseInt(r.slice(0,2),16),i=parseInt(r.slice(2,4),16),o=parseInt(r.slice(4,6),16);return`Color(red: ${n/255}, green: ${i/255}, blue: ${o/255})`}function e0(t){let e=Je(t);if(e!==null)return{kind:"uniform",value:e};if(typeof t!="string")return null;let r=t.trim().split(/\s+/);if(r.length===2){let n=Je(r[0]),i=Je(r[1]);if(n!==null&&i!==null)return{kind:"shorthand",vertical:n,horizontal:i}}return null}function t0(t){if(t===""||t===null||t===void 0)return null;let e=Je(t);return e!==null?`.font(.system(size: ${e}))`:typeof t=="string"&&!t.endsWith("px")?`.font(.system(size: ${JSON.stringify(t)}))`:null}function r0(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 Ba(t){let e=[],r=t.foreground;if(typeof r=="string"){let M=Fa(r);e.push(M?`.foregroundStyle(${M})`:`.foregroundStyle(Color(${JSON.stringify(r)}))`)}let n=t.size??t.fontSize;if(n!==void 0&&n!==""){let M=t0(n);M&&e.push(M)}let i=r0(t.fontWeight??t.weight??"");i&&e.push(i);let o=t.padding??"",s=e0(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,u=t.height,c=t.minHeight,p=t.maxWidth,f=t.maxHeight,d=t.margin,m=d==="0 auto",g=a==="100%"||a==="fill"||p==="fill",y=u==="100%"||u==="fill"||c==="100vh",_=p==="fill"?null:p!==void 0?Je(p):null;g&&y?_!==null?e.push(`.frame(maxWidth: ${_}, maxHeight: .infinity, alignment: .topLeading)`):e.push(".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"):g?_!==null?e.push(`.frame(maxWidth: ${_}, alignment: .leading)`):e.push(".frame(maxWidth: .infinity, alignment: .leading)"):y&&e.push(".frame(maxHeight: .infinity, alignment: .top)"),!y&&c==="100vh"&&e.push(".frame(maxHeight: .infinity, alignment: .top)");let b=t.background;if(typeof b=="string"&&b!=="transparent"){let M=Fa(b);e.push(M?`.background(${M})`:`.background(Color(${JSON.stringify(b)}))`)}let L=Je(t.radius??"");L!==null&&e.push(`.clipShape(RoundedRectangle(cornerRadius: ${L}))`),(t.shadow===!0||t.shadow==="true")&&e.push(".shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)");let q=t.border,A=t.borderColor;if(q||A){let M=Je(q??"1px")??1,X=typeof A=="string"?Fa(A)??"Color.gray":"Color.gray";e.push(`.overlay(RoundedRectangle(cornerRadius: ${L??0}).stroke(${X}, lineWidth: ${M}))`)}if(!g){if(typeof a=="number")e.push(`.frame(width: ${a})`);else if(a!==void 0&&a!=="wrap"){let M=Je(a);M!==null&&e.push(`.frame(width: ${M})`)}if(p!==void 0&&p!=="fill"){let M=Je(p);M!==null&&e.push(`.frame(maxWidth: ${M})`)}}if(!y){if(typeof u=="number")e.push(`.frame(height: ${u})`);else if(u!==void 0&&u!=="wrap"){let M=Je(u);M!==null&&e.push(`.frame(height: ${M})`)}if(c!==void 0&&c!=="100vh")if(typeof c=="number")e.push(`.frame(minHeight: ${c})`);else{let M=Je(c);M!==null&&e.push(`.frame(minHeight: ${M})`)}if(f!==void 0&&f!=="fill"){let M=Je(f);M!==null&&e.push(`.frame(maxHeight: ${M})`)}}if(m)e.push(".frame(maxWidth: .infinity, alignment: .center)");else if(typeof d=="number")e.push(`.padding(${d})`);else if(d!==void 0){let M=Je(d);M!==null&&e.push(`.padding(${M})`)}let T=t.opacity;return typeof T=="number"&&T<1&&e.push(`.opacity(${T})`),e}function je(t,e,r){if(e.length===0)return t;let n=" ".repeat(r);return`${t}
125
+ `,"utf-8"),a}async function ex(t,e){let r=Te(t),n=e.rendererTemplatesDir?rn(r,e.rendererTemplatesDir):void 0,i=e.generated.reactDir;await Q_(i),await cl(i);let{runtimePath:o}=await Bd(t,e,n),s=await Z_(t,e),a=rn(i,"theme.css");await X_(t,a,e,n),console.log(` react/runtime \u2192 ${o}`),console.log(` react/extensions \u2192 ${s}`),console.log(` react/theme \u2192 ${a}`)}var Ud=X(()=>{"use strict";Ot();Go();Zn();ul();Hd()});function tx(t,e){return t.entries.find(n=>n.path===e)?.value??""}function rx(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let r=e[1],n=parseInt(r.slice(0,2),16),i=parseInt(r.slice(2,4),16),o=parseInt(r.slice(4,6),16);return`Color(red: ${(n/255).toFixed(3)}, green: ${(i/255).toFixed(3)}, blue: ${(o/255).toFixed(3)})`}function yr(t){let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function Gd(t){return rx(t)??(t?`Color(${JSON.stringify(t)})`:null)}function Jd(t,e){let r=[];for(let[n,i]of Object.entries(t)){let o=tx(e,i.ref);if(o)switch(n){case"background":case"foreground":{let s=Gd(o);s&&r.push({property:n,swiftValue:s});break}case"padding":{let s=yr(o);if(s!==null)r.push({property:n,swiftValue:String(s)});else{let a=o.trim().split(/\s+/);if(a.length===2){let l=yr(a[0]),u=yr(a[1]);l!==null&&r.push({property:"paddingV",swiftValue:String(l)}),u!==null&&r.push({property:"paddingH",swiftValue:String(u)})}}break}case"radius":case"fontSize":case"minHeight":case"maxWidth":{let s=yr(o);s!==null&&r.push({property:n,swiftValue:String(s)});break}case"width":{if(o==="100%"||o==="fill")r.push({property:"widthFill",swiftValue:"true"});else{let s=yr(o);s!==null&&r.push({property:n,swiftValue:String(s)})}break}case"height":{if(o==="100%"||o==="fill")r.push({property:"heightFill",swiftValue:"true"});else{let s=yr(o);s!==null&&r.push({property:n,swiftValue:String(s)})}break}case"border":{let s=o.match(/^([\d.]+)px/);s&&r.push({property:"borderWidth",swiftValue:String(Number(s[1]))});break}case"borderColor":{let s=Gd(o);s&&r.push({property:"borderColor",swiftValue:s});break}case"margin":{let s=yr(o);s!==null&&r.push({property:n,swiftValue:String(s)});break}case"fontWeight":{let s=nx[o];s&&r.push({property:n,swiftValue:s});break}case"shadow":{r.push({property:n,swiftValue:o==="true"||o==="none"?"false":"true"});break}case"display":case"flexDirection":case"gridTemplateColumns":case"alignItems":case"justifyContent":case"typography":break;default:console.warn(`[view-contracts] SwiftUI theme: variant property "${n}" is not handled (value: "${o}"). Add a case to renderTheme.ts resolveVariantEntries().`);break}}return r}function Yd(t,e){if(t.length===0)return`${e}VcVariantStyle()`;let n=[...t].sort((i,o)=>Kd.indexOf(i.property)-Kd.indexOf(o.property)).map(i=>`${i.property}: ${i.swiftValue}`).join(", ");return`${e}VcVariantStyle(${n})`}function ix(t,e){return{...t,...e}}function Xd(t,e){let r=[];r.push("/**"),r.push(" * Auto-generated SwiftUI theme \u2014 variant style dictionary."),r.push(" * Each entry is pre-merged: base theme defaults < variant overrides."),r.push(" * DO NOT EDIT \u2014 regenerate with: view-contracts build"),r.push(" */"),r.push("import SwiftUI"),r.push(""),r.push("struct VcVariantStyle {"),r.push(" var foreground: Color?"),r.push(" var background: Color?"),r.push(" var padding: CGFloat?"),r.push(" var paddingH: CGFloat?"),r.push(" var paddingV: CGFloat?"),r.push(" var widthFill: Bool?"),r.push(" var heightFill: Bool?"),r.push(" var radius: CGFloat?"),r.push(" var fontSize: CGFloat?"),r.push(" var fontWeight: Font.Weight?"),r.push(" var shadow: Bool?"),r.push(" var borderWidth: CGFloat?"),r.push(" var borderColor: Color?"),r.push(" var minHeight: CGFloat?"),r.push(" var maxWidth: CGFloat?"),r.push("}"),r.push(""),r.push("extension View {"),r.push(" func applyVcStyle(_ s: VcVariantStyle) -> some View {"),r.push(" self"),r.push(" .ifSet(s.foreground) { $0.foregroundStyle($1) }"),r.push(" .ifSet(s.fontSize) { $0.font(.system(size: $1, weight: s.fontWeight ?? .regular)) }"),r.push(" .ifSet(s.padding) { $0.padding($1) }"),r.push(" .ifSet(s.paddingH) { $0.padding(.horizontal, $1) }"),r.push(" .ifSet(s.paddingV) { $0.padding(.vertical, $1) }"),r.push(" .vcFillFrame(widthFill: s.widthFill ?? false, heightFill: s.heightFill ?? false)"),r.push(" .ifSet(s.background) { $0.background($1) }"),r.push(" .ifSet(s.radius) { $0.clipShape(RoundedRectangle(cornerRadius: $1)) }"),r.push(" .ifSet(s.borderColor) { $0.overlay(RoundedRectangle(cornerRadius: s.radius ?? 0).stroke($1, lineWidth: s.borderWidth ?? 1)) }"),r.push(" .ifSet(s.shadow) { v, on in on ? AnyView(v.shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)) : AnyView(v) }"),r.push(" }"),r.push("}"),r.push(""),r.push("extension View {"),r.push(" @ViewBuilder"),r.push(" func vcFillFrame(widthFill: Bool, heightFill: Bool) -> some View {"),r.push(" if widthFill && heightFill {"),r.push(" self.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"),r.push(" } else if widthFill {"),r.push(" self.frame(maxWidth: .infinity, alignment: .leading)"),r.push(" } else if heightFill {"),r.push(" self.frame(maxHeight: .infinity, alignment: .top)"),r.push(" } else {"),r.push(" self"),r.push(" }"),r.push(" }"),r.push("}"),r.push(""),r.push("extension View {"),r.push(" @ViewBuilder"),r.push(" func ifSet<T, V: View>(_ value: T?, _ transform: (Self, T) -> V) -> some View {"),r.push(" if let value { transform(self, value) } else { self }"),r.push(" }"),r.push("}"),r.push(""),r.push("enum VcTheme {"),r.push(" static let defaults: [String: VcVariantStyle] = [");for(let[n,i]of Object.entries(t.defaults)){if(Object.keys(i).length===0)continue;let o=Jd(i,e);o.length!==0&&r.push(` ${JSON.stringify(n)}: ${Yd(o,"").trim()},`)}r.push(" ]"),r.push(""),r.push(" static let variants: [String: [String: VcVariantStyle]] = [");for(let[n,i]of Object.entries(t.variants)){let o=Object.entries(i);if(o.length===0)continue;let s=t.defaults[n]??{};r.push(` ${JSON.stringify(n)}: [`);for(let[a,l]of o){let u=ix(s,l),f=Jd(u,e),p=Yd(f," ");r.push(` ${JSON.stringify(a)}: ${p.trim()},`)}r.push(" ],")}return r.push(" ]"),r.push(""),r.push(" static func resolve(_ element: String, variant: String) -> VcVariantStyle {"),r.push(" variants[element]?[variant] ?? defaults[element] ?? VcVariantStyle()"),r.push(" }"),r.push("}"),r.push(""),r.join(`
126
+ `)}var nx,Kd,Qd=X(()=>{"use strict";nx={bold:".bold",semibold:".semibold",medium:".medium",regular:".regular",600:".semibold",700:".bold",500:".medium",400:".regular"};Kd=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});import{resolve as ox}from"node:path";function ax(t){for(let[e,r]of Object.entries(t.elements)){let n=r.container!==void 0&&r.container!==null,i=r.leaf!==void 0&&r.leaf!==null;if(n===i)throw new Error(`${sx}: element "${e}" must have exactly one of "container" or "leaf"`);(r.container==="vstack"||r.container==="hstack")&&r.spacingProp}}async function Zd(t){if(!t&&pl)return pl;let e=t??ox(Ee(),"renderers/swiftui/elements.yaml"),r=await Fr(e);return ax(r),t||(pl=r),r}var sx,pl,eh=X(()=>{"use strict";Lt();so();sx="renderers/swiftui/elements.yaml",pl=null});function lx(t,e){let r=t.entries.find(n=>n.path===e);if(!r)throw new Error(`Token reference "${e}" not found while merging visual props`);return r.value}function th(t,e){let r={};for(let[n,i]of Object.entries(t))r[n]=lx(e,i.ref);return r}function ux(t){let e={};for(let[r,n]of Object.entries(t))n!=null&&(typeof n=="string"||typeof n=="number"||typeof n=="boolean")&&(e[r]=n);return e}function Xt(t){let e=t.theme.defaults[t.elementName]??{},r=t.variantLiteral?t.theme.variants[t.elementName]?.[t.variantLiteral]??{}:{};return{...th(e,t.tokens),...th(r,t.tokens),...ux(t.instanceLiterals)}}var fl=X(()=>{"use strict"});function nt(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 dl(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let r=e[1],n=parseInt(r.slice(0,2),16),i=parseInt(r.slice(2,4),16),o=parseInt(r.slice(4,6),16);return`Color(red: ${n/255}, green: ${i/255}, blue: ${o/255})`}function cx(t){let e=nt(t);if(e!==null)return{kind:"uniform",value:e};if(typeof t!="string")return null;let r=t.trim().split(/\s+/);if(r.length===2){let n=nt(r[0]),i=nt(r[1]);if(n!==null&&i!==null)return{kind:"shorthand",vertical:n,horizontal:i}}return null}function px(t){if(t===""||t===null||t===void 0)return null;let e=nt(t);return e!==null?`.font(.system(size: ${e}))`:typeof t=="string"&&!t.endsWith("px")?`.font(.system(size: ${JSON.stringify(t)}))`:null}function fx(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 hl(t){let e=[],r=t.foreground;if(typeof r=="string"){let L=dl(r);e.push(L?`.foregroundStyle(${L})`:`.foregroundStyle(Color(${JSON.stringify(r)}))`)}let n=t.size??t.fontSize;if(n!==void 0&&n!==""){let L=px(n);L&&e.push(L)}let i=fx(t.fontWeight??t.weight??"");i&&e.push(i);let o=t.padding??"",s=cx(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,u=t.minHeight,f=t.maxWidth,p=t.maxHeight,d=t.margin,m=d==="0 auto",g=a==="100%"||a==="fill"||f==="fill",y=l==="100%"||l==="fill"||u==="100vh",v=f==="fill"?null:f!==void 0?nt(f):null;g&&y?v!==null?e.push(`.frame(maxWidth: ${v}, maxHeight: .infinity, alignment: .topLeading)`):e.push(".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"):g?v!==null?e.push(`.frame(maxWidth: ${v}, alignment: .leading)`):e.push(".frame(maxWidth: .infinity, alignment: .leading)"):y&&e.push(".frame(maxHeight: .infinity, alignment: .top)"),!y&&u==="100vh"&&e.push(".frame(maxHeight: .infinity, alignment: .top)");let w=t.background;if(typeof w=="string"&&w!=="transparent"){let L=dl(w);e.push(L?`.background(${L})`:`.background(Color(${JSON.stringify(w)}))`)}let R=nt(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 O=t.border,I=t.borderColor;if(O||I){let L=nt(O??"1px")??1,W=typeof I=="string"?dl(I)??"Color.gray":"Color.gray";e.push(`.overlay(RoundedRectangle(cornerRadius: ${R??0}).stroke(${W}, lineWidth: ${L}))`)}if(!g){if(typeof a=="number")e.push(`.frame(width: ${a})`);else if(a!==void 0&&a!=="wrap"){let L=nt(a);L!==null&&e.push(`.frame(width: ${L})`)}if(f!==void 0&&f!=="fill"){let L=nt(f);L!==null&&e.push(`.frame(maxWidth: ${L})`)}}if(!y){if(typeof l=="number")e.push(`.frame(height: ${l})`);else if(l!==void 0&&l!=="wrap"){let L=nt(l);L!==null&&e.push(`.frame(height: ${L})`)}if(u!==void 0&&u!=="100vh")if(typeof u=="number")e.push(`.frame(minHeight: ${u})`);else{let L=nt(u);L!==null&&e.push(`.frame(minHeight: ${L})`)}if(p!==void 0&&p!=="fill"){let L=nt(p);L!==null&&e.push(`.frame(maxHeight: ${L})`)}}if(m)e.push(".frame(maxWidth: .infinity, alignment: .center)");else if(typeof d=="number")e.push(`.padding(${d})`);else if(d!==void 0){let L=nt(d);L!==null&&e.push(`.padding(${L})`)}let A=t.opacity;return typeof A=="number"&&A<1&&e.push(`.opacity(${A})`),e}function He(t,e,r){if(e.length===0)return t;let n=" ".repeat(r);return`${t}
127
127
  ${e.map(i=>`${n}${i}`).join(`
128
- `)}`}var Ed=J(()=>{"use strict"});function D(t){return" ".repeat(t)}function Ro(t,e,r){let i=t.entries.find(p=>p.path===e)?.value??r,o=i.match(/^#([0-9a-fA-F]{6})$/);if(!o)return`Color(${JSON.stringify(i)})`;let s=o[1],a=parseInt(s.slice(0,2),16)/255,u=parseInt(s.slice(2,4),16)/255,c=parseInt(s.slice(4,6),16)/255;return`Color(red: ${a}, green: ${u}, blue: ${c})`}function Cd(t,e,r,n,i){let o=`${D(e+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`;return t.map(a=>{if(a.kind==="map"){let c=a,p=c.item,f=r(c.body,e+2,p);f+=`
129
- ${o}`;let d=Ye(c.source,n,i);return`${D(e+2)}ForEach(${d}, id: \\.id) { ${p} in
130
- ${f}
131
- ${D(e+2)}}`}let u="";return a.kind==="text"?u=`${D(e+2)}Text(${JSON.stringify(a.value)})`:a.kind==="binding"?u=`${D(e+2)}Text(${Ye(a,n,i)})`:u=r(a,e+2,i),u?`${u}
128
+ `)}`}var rh=X(()=>{"use strict"});function F(t){return" ".repeat(t)}function Jo(t,e,r){let i=t.entries.find(f=>f.path===e)?.value??r,o=i.match(/^#([0-9a-fA-F]{6})$/);if(!o)return`Color(${JSON.stringify(i)})`;let s=o[1],a=parseInt(s.slice(0,2),16)/255,l=parseInt(s.slice(2,4),16)/255,u=parseInt(s.slice(4,6),16)/255;return`Color(red: ${a}, green: ${l}, blue: ${u})`}function ih(t,e,r,n,i){let o=`${F(e+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`;return t.map(a=>{if(a.kind==="map"){let u=a,f=u.item,p=r(u.body,e+2,f);p+=`
129
+ ${o}`;let d=it(u.source,n,i);return`${F(e+2)}ForEach(${d}, id: \\.id) { ${f} in
130
+ ${p}
131
+ ${F(e+2)}}`}let l="";return a.kind==="text"?l=`${F(e+2)}Text(${JSON.stringify(a.value)})`:a.kind==="binding"?l=`${F(e+2)}Text(${it(a,n,i)})`:l=r(a,e+2,i),l?`${l}
132
132
  ${o}`:""}).filter(Boolean).join(`
133
- `)}function ce(t,e){let r=t[e];if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="object"&&"kind"in r&&r.kind==="literal")return r.value}}function Id(t){let e={};for(let[r,n]of Object.entries(t)){if(r==="variant"||r==="id"||!qi.has(r))continue;let i=ce(t,r);i!==void 0&&(e[r]=i)}return e}function Rd(t){let e=t.variant;return e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"?!1:typeof e=="object"&&"kind"in e?e.kind==="literal"?!1:e.kind==="binding"||e.kind==="concat":!1}function n0(t,e,r){let n=t.variant;return!n||typeof n!="object"||!("kind"in n)?null:n.kind==="binding"?Ye(n,e,r):n.kind==="concat"?`"${n.parts.map(s=>typeof s=="string"?s:`\\(${Ye(s,e,r)})`).join("")}"`:null}function i0(t,e,r,n){let i=r.map.elements[t],o=ce(e,"variant"),s=Id(e);if(i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp],Rd(e)){let c=n0(e,r,n),p=`.applyVcStyle(VcTheme.resolve(${JSON.stringify(t)}, variant: ${c}))`,f=Io({elementName:t,theme:{defaults:{},variants:{}},tokens:r.tokens,instanceLiterals:s}),d=Ba(f),m=d.filter(y=>y.startsWith(".padding")),g=d.filter(y=>!y.startsWith(".padding"));return[...m,p,...g]}let u=Io({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return Ba(u)}function o0(t){return[]}function s0(t,e,r,n){let i=t.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=Ye(i,e,r);return`${D(n+1)}ForEach(${o}, id: \\.value) { option in
134
- ${D(n+2)}Button(option.label) {}
135
- ${D(n+1)}}`}return typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="literal"&&Array.isArray(i.value)?i.value.map(s=>`${D(n+1)}Button(${JSON.stringify(s.label)}) {}`).join(`
136
- `):`${D(n+1)}Button("--") {}`}function a0(t,e,r){let n=t.options;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding")return`${Ye(n,e,r)}.first?.label ?? ""`;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="literal"&&Array.isArray(n.value)){let i=n.value;return JSON.stringify(i[0]?.label??"")}return'""'}function Ye(t,e,r){let n=t.scope??r??e.propsRoot??"vm";return t.path?`${n}.${t.path}`:n}function Pd(t,e,r){for(let n of t){if(n.kind==="text")return JSON.stringify(n.value);if(n.kind==="binding")return Ye(n,e,r)}return null}function Nd(t,e,r,n,i){return t.map(s=>s.kind==="map"?Bn(s,e,r,n):s.kind==="text"?`${D(e)}Text(${JSON.stringify(s.value)})`:s.kind==="binding"?`${D(e)}Text(${Ye(s,n,i)})`:r(s,e,i)).filter(Boolean).join(`
137
- `)}function Bn(t,e,r,n){let i=t.item,o=r(t.body,e+2,i),s=Ye(t.source,n,i);return`${D(e)}ForEach(${s}, id: \\.id) { ${i} in
133
+ `)}function de(t,e){let r=t[e];if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="object"&&"kind"in r&&r.kind==="literal")return r.value}}function oh(t){let e={};for(let[r,n]of Object.entries(t)){if(r==="variant"||r==="id"||!qr.has(r))continue;let i=de(t,r);i!==void 0&&(e[r]=i)}return e}function sh(t){let e=t.variant;return e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"?!1:typeof e=="object"&&"kind"in e?e.kind==="literal"?!1:e.kind==="binding"||e.kind==="concat":!1}function dx(t,e,r){let n=t.variant;return!n||typeof n!="object"||!("kind"in n)?null:n.kind==="binding"?it(n,e,r):n.kind==="concat"?`"${n.parts.map(s=>typeof s=="string"?s:`\\(${it(s,e,r)})`).join("")}"`:null}function hx(t,e,r,n){let i=r.map.elements[t],o=de(e,"variant"),s=oh(e);if(i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp],sh(e)){let u=dx(e,r,n),f=`.applyVcStyle(VcTheme.resolve(${JSON.stringify(t)}, variant: ${u}))`,p=Xt({elementName:t,theme:{defaults:{},variants:{}},tokens:r.tokens,instanceLiterals:s}),d=hl(p),m=d.filter(y=>y.startsWith(".padding")),g=d.filter(y=>!y.startsWith(".padding"));return[...m,f,...g]}let l=Xt({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return hl(l)}function mx(t){return[]}function gx(t,e,r,n){let i=t.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=it(i,e,r);return`${F(n+1)}ForEach(${o}, id: \\.value) { option in
134
+ ${F(n+2)}Button(option.label) {}
135
+ ${F(n+1)}}`}return typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="literal"&&Array.isArray(i.value)?i.value.map(s=>`${F(n+1)}Button(${JSON.stringify(s.label)}) {}`).join(`
136
+ `):`${F(n+1)}Button("--") {}`}function yx(t,e,r){let n=t.options;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding")return`${it(n,e,r)}.first?.label ?? ""`;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="literal"&&Array.isArray(n.value)){let i=n.value;return JSON.stringify(i[0]?.label??"")}return'""'}function it(t,e,r){let n=t.scope??r??e.propsRoot??"vm";return t.path?`${n}.${t.path}`:n}function nh(t,e,r){for(let n of t){if(n.kind==="text")return JSON.stringify(n.value);if(n.kind==="binding")return it(n,e,r)}return null}function ah(t,e,r,n,i){return t.map(s=>s.kind==="map"?ii(s,e,r,n):s.kind==="text"?`${F(e)}Text(${JSON.stringify(s.value)})`:s.kind==="binding"?`${F(e)}Text(${it(s,n,i)})`:r(s,e,i)).filter(Boolean).join(`
137
+ `)}function ii(t,e,r,n){let i=t.item,o=r(t.body,e+2,i),s=it(t.source,n,i);return`${F(e)}ForEach(${s}, id: \\.id) { ${i} in
138
138
  ${o}
139
- ${D(e)}}`}function l0(t,e,r,n,i,o){let s=D(r);if(e.leaf==="text"){let a=Pd(t.children,i,n);if(!a)return`${s}Text("")`;let u=`${s}Text(${a})`,c=o.map(p=>`${s}${p}`);return[u,...c].join(`
140
- `)}if(e.leaf==="button"){let a=ce(t.props,"label"),c=Pd(t.children,i,n)??(typeof a=="string"?JSON.stringify(a):'"Button"'),p=`${s}Button(${c}) {}`,f=o.map(d=>`${s}${d}`);return[p,...f].join(`
141
- `)}if(e.leaf==="textfield"){let a=ce(t.props,"placeholder"),u=typeof a=="string"?JSON.stringify(a):'""',c=Ro(i.tokens,"ui.text-muted","#6b7280"),p=`${s}TextField("", text: .constant(""), prompt: Text(${u}).foregroundStyle(${c}))`,d=[...o,...o0(t.name)].map(m=>`${s}${m}`);return[p,...d].join(`
142
- `)}if(e.leaf==="texteditor"){let a=ce(t.props,"placeholder"),u=typeof a=="string"?JSON.stringify(a):'""',c=Ro(i.tokens,"ui.text-muted","#6b7280"),f=o.find(_=>_.startsWith(".frame(minHeight:"))?.match(/minHeight: (\d+)/)?.[1]??"72",d=o.filter(_=>_.startsWith(".foregroundStyle(")||_.startsWith(".font(")||_.startsWith(".fontWeight(")),m=o.filter(_=>!_.startsWith(".foregroundStyle(")&&!_.startsWith(".font(")&&!_.startsWith(".fontWeight(")&&!_.startsWith(".frame(minHeight:")),g=d.map(_=>`${s} ${_}`),y=m.map(_=>`${s}${_}`);return[`${s}ZStack(alignment: .topLeading) {`,`${s} if true {`,`${s} Text(${u})`,`${s} .font(.system(size: 14))`,`${s} .foregroundStyle(${c})`,`${s} .padding(.top, 8)`,`${s} .padding(.horizontal, 4)`,`${s} .allowsHitTesting(false)`,`${s} }`,`${s} TextEditor(text: .constant(""))`,`${s} .scrollContentBackground(.hidden)`,...g,`${s}}`,`${s}.frame(minHeight: ${f})`,...y].join(`
143
- `)}if(e.leaf==="picker"){let a=Ro(i.tokens,"ui.text","#111827"),u=Ro(i.tokens,"ui.text-muted","#6b7280"),c=s0(t.props,i,n,r),p=a0(t.props,i,n),f=o.filter(y=>!y.startsWith(".frame")),d=ce(t.props,"width"),m=typeof d=="number"?`${s}.frame(width: ${d})`:`${s}.frame(maxWidth: .infinity)`;return[`${s}Menu {`,c,`${s}} label: {`,`${s} HStack(spacing: 0) {`,`${s} Text(${p})`,`${s} .foregroundStyle(${a})`,`${s} .lineLimit(1)`,`${s} Spacer(minLength: 0)`,`${s} Image(systemName: "chevron.down")`,`${s} .font(.system(size: 12, weight: .semibold))`,`${s} .foregroundStyle(${u})`,`${s} }`,`${s} .padding(.vertical, 9)`,`${s} .padding(.leading, 12)`,`${s} .padding(.trailing, 12)`,...f.map(y=>`${s} ${y}`),`${s}}`,m,`${s}.frame(minHeight: 42)`,`${s}.frame(maxWidth: .infinity)`].join(`
144
- `)}if(e.leaf==="spacer")return`${s}Spacer()`;if(e.leaf==="divider")return`${s}Divider()`;if(e.leaf==="image"){let a=ce(t.props,"src")??ce(t.props,"name"),c=`${s}Image(systemName: ${JSON.stringify(typeof a=="string"?a:"photo")})`,p=o.map(f=>`${s}${f}`);return[c,...p].join(`
145
- `)}if(e.leaf==="progressview"){let a=`${s}ProgressView()`,u=o.map(c=>`${s}${c}`);return[a,...u].join(`
146
- `)}if(e.leaf==="toggle"){let a=ce(t.props,"label")??"",u=`${s}Toggle(${JSON.stringify(a)}, isOn: .constant(false))`,c=o.map(p=>`${s}${p}`);return[u,...c].join(`
147
- `)}return`${s}Text("/* unsupported leaf: ${t.name} */")`}function c0(t,e,r,n,i,o,s){let a=Nd(t.children,r+2,i,o,n);if(e.container==="vstack"){let c=e.spacingProp?ce(t.props,e.spacingProp):void 0,p=typeof c=="number"?c:0,f=`${D(r+1)}VStack(alignment: .leading, spacing: ${p}) {
139
+ ${F(e)}}`}function vx(t,e,r,n,i,o){let s=F(r);if(e.leaf==="text"){let a=nh(t.children,i,n);if(!a)return`${s}Text("")`;let l=`${s}Text(${a})`,u=o.map(f=>`${s}${f}`);return[l,...u].join(`
140
+ `)}if(e.leaf==="button"){let a=de(t.props,"label"),u=nh(t.children,i,n)??(typeof a=="string"?JSON.stringify(a):'"Button"'),f=`${s}Button(${u}) {}`,p=o.map(d=>`${s}${d}`);return[f,...p].join(`
141
+ `)}if(e.leaf==="textfield"){let a=de(t.props,"placeholder"),l=typeof a=="string"?JSON.stringify(a):'""',u=Jo(i.tokens,"ui.text-muted","#6b7280"),f=`${s}TextField("", text: .constant(""), prompt: Text(${l}).foregroundStyle(${u}))`,d=[...o,...mx(t.name)].map(m=>`${s}${m}`);return[f,...d].join(`
142
+ `)}if(e.leaf==="texteditor"){let a=de(t.props,"placeholder"),l=typeof a=="string"?JSON.stringify(a):'""',u=Jo(i.tokens,"ui.text-muted","#6b7280"),p=o.find(v=>v.startsWith(".frame(minHeight:"))?.match(/minHeight: (\d+)/)?.[1]??"72",d=o.filter(v=>v.startsWith(".foregroundStyle(")||v.startsWith(".font(")||v.startsWith(".fontWeight(")),m=o.filter(v=>!v.startsWith(".foregroundStyle(")&&!v.startsWith(".font(")&&!v.startsWith(".fontWeight(")&&!v.startsWith(".frame(minHeight:")),g=d.map(v=>`${s} ${v}`),y=m.map(v=>`${s}${v}`);return[`${s}ZStack(alignment: .topLeading) {`,`${s} if true {`,`${s} Text(${l})`,`${s} .font(.system(size: 14))`,`${s} .foregroundStyle(${u})`,`${s} .padding(.top, 8)`,`${s} .padding(.horizontal, 4)`,`${s} .allowsHitTesting(false)`,`${s} }`,`${s} TextEditor(text: .constant(""))`,`${s} .scrollContentBackground(.hidden)`,...g,`${s}}`,`${s}.frame(minHeight: ${p})`,...y].join(`
143
+ `)}if(e.leaf==="picker"){let a=Jo(i.tokens,"ui.text","#111827"),l=Jo(i.tokens,"ui.text-muted","#6b7280"),u=gx(t.props,i,n,r),f=yx(t.props,i,n),p=o.filter(y=>!y.startsWith(".frame")),d=de(t.props,"width"),m=typeof d=="number"?`${s}.frame(width: ${d})`:`${s}.frame(maxWidth: .infinity)`;return[`${s}Menu {`,u,`${s}} label: {`,`${s} HStack(spacing: 0) {`,`${s} Text(${f})`,`${s} .foregroundStyle(${a})`,`${s} .lineLimit(1)`,`${s} Spacer(minLength: 0)`,`${s} Image(systemName: "chevron.down")`,`${s} .font(.system(size: 12, weight: .semibold))`,`${s} .foregroundStyle(${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(`
144
+ `)}if(e.leaf==="spacer")return`${s}Spacer()`;if(e.leaf==="divider")return`${s}Divider()`;if(e.leaf==="image"){let a=de(t.props,"src")??de(t.props,"name"),u=`${s}Image(systemName: ${JSON.stringify(typeof a=="string"?a:"photo")})`,f=o.map(p=>`${s}${p}`);return[u,...f].join(`
145
+ `)}if(e.leaf==="progressview"){let a=`${s}ProgressView()`,l=o.map(u=>`${s}${u}`);return[a,...l].join(`
146
+ `)}if(e.leaf==="toggle"){let a=de(t.props,"label")??"",l=`${s}Toggle(${JSON.stringify(a)}, isOn: .constant(false))`,u=o.map(f=>`${s}${f}`);return[l,...u].join(`
147
+ `)}return`${s}Text("/* unsupported leaf: ${t.name} */")`}function wx(t,e,r,n,i,o,s){let a=ah(t.children,r+2,i,o,n);if(e.container==="vstack"){let u=e.spacingProp?de(t.props,e.spacingProp):void 0,f=typeof u=="number"?u:0,p=`${F(r+1)}VStack(alignment: .leading, spacing: ${f}) {
148
148
  ${a}
149
- ${D(r+1)}}`;return je(f,s,r+1)}if(e.container==="hstack"){let c=e.spacingProp?ce(t.props,e.spacingProp):void 0,p=typeof c=="number"?c:0,f=ce(t.props,"align"),d=ce(t.props,"height"),m=f==="center"||typeof d=="number"?".center":".top",g=ce(t.props,"justify"),y=ce(t.props,"flex"),_=ce(t.props,"wrap"),L=t.name==="TableHeader"||t.name==="TableRow"||g!==void 0||typeof y=="number",q=g==="end"?".trailing":g==="center"?".center":".leading",A=[];L&&A.push(`.frame(maxWidth: .infinity, alignment: ${q})`),typeof d=="number"&&A.push(`.frame(height: ${d})`);let T=a;if(g==="between"){let X=t.children.map(fe=>fe.kind==="map"?Bn(fe,r+2,i,o):fe.kind==="text"?`${D(r+2)}Text(${JSON.stringify(fe.value)})`:fe.kind==="binding"?`${D(r+2)}Text(${Ye(fe,o,n)})`:i(fe,r+2,n)).filter(Boolean);if(X.length>=2){let fe=X[0],Ie=X.slice(1);T=[fe,`${D(r+2)}Spacer()`,...Ie].join(`
150
- `)}}else if(_===!0){T=t.children.map(fe=>{if(fe.kind==="map")return Bn(fe,r+2,i,o);if(fe.kind==="text")return`${D(r+2)}Text(${JSON.stringify(fe.value)})`;if(fe.kind==="binding")return`${D(r+2)}Text(${Ye(fe,o,n)})`;let Ie=i(fe,r+2,n);return Ie||""}).filter(Boolean).join(`
151
- `);let X=`${D(r+1)}FlowLayout(spacing: ${p}) {
152
- ${T}
153
- ${D(r+1)}}`;return je(X,[...s,...A],r+1)}let M=`${D(r+1)}HStack(alignment: ${m}, spacing: ${p}) {
154
- ${T}
155
- ${D(r+1)}}`;return je(M,[...s,...A],r+1)}if(e.container==="group"){let c=a?`${D(r+1)}VStack(alignment: .leading, spacing: 0) {
149
+ ${F(r+1)}}`;return He(p,s,r+1)}if(e.container==="hstack"){let u=e.spacingProp?de(t.props,e.spacingProp):void 0,f=typeof u=="number"?u:0,p=de(t.props,"align"),d=de(t.props,"height"),m=p==="center"||typeof d=="number"?".center":".top",g=de(t.props,"justify"),y=de(t.props,"flex"),v=de(t.props,"wrap"),R=t.name==="TableHeader"||t.name==="TableRow"||g!==void 0||typeof y=="number",O=g==="end"?".trailing":g==="center"?".center":".leading",I=[];R&&I.push(`.frame(maxWidth: .infinity, alignment: ${O})`),typeof d=="number"&&I.push(`.frame(height: ${d})`);let A=a;if(g==="between"){let W=t.children.map(ie=>ie.kind==="map"?ii(ie,r+2,i,o):ie.kind==="text"?`${F(r+2)}Text(${JSON.stringify(ie.value)})`:ie.kind==="binding"?`${F(r+2)}Text(${it(ie,o,n)})`:i(ie,r+2,n)).filter(Boolean);if(W.length>=2){let ie=W[0],we=W.slice(1);A=[ie,`${F(r+2)}Spacer()`,...we].join(`
150
+ `)}}else if(v===!0){A=t.children.map(ie=>{if(ie.kind==="map")return ii(ie,r+2,i,o);if(ie.kind==="text")return`${F(r+2)}Text(${JSON.stringify(ie.value)})`;if(ie.kind==="binding")return`${F(r+2)}Text(${it(ie,o,n)})`;let we=i(ie,r+2,n);return we||""}).filter(Boolean).join(`
151
+ `);let W=`${F(r+1)}FlowLayout(spacing: ${f}) {
152
+ ${A}
153
+ ${F(r+1)}}`;return He(W,[...s,...I],r+1)}let L=`${F(r+1)}HStack(alignment: ${m}, spacing: ${f}) {
154
+ ${A}
155
+ ${F(r+1)}}`;return He(L,[...s,...I],r+1)}if(e.container==="group"){let u=a?`${F(r+1)}VStack(alignment: .leading, spacing: 0) {
156
156
  ${a}
157
- ${D(r+1)}}`:`${D(r+1)}VStack { EmptyView() }`;return je(c,s,r+1)}if(e.container==="navstack")return je(a,s,r+1);if(e.container==="scrollview"){let c=`${D(r+1)}ScrollView {
157
+ ${F(r+1)}}`:`${F(r+1)}VStack { EmptyView() }`;return He(u,s,r+1)}if(e.container==="navstack")return He(a,s,r+1);if(e.container==="scrollview"){let u=`${F(r+1)}ScrollView {
158
158
  ${a}
159
- ${D(r+1)}}`;return je(c,s,r+1)}if(e.container==="field"){let c=ce(t.props,"label"),p=ce(t.props,"gap"),f=typeof p=="number"?p:4,d=typeof c=="string"?`
160
- ${D(r+2)}Text(${JSON.stringify(c)})
161
- ${D(r+2)} .applyVcStyle(VcTheme.resolve("Text", variant: "field-label"))`:"",m=`${D(r+1)}VStack(alignment: .leading, spacing: ${f}) {${d}
159
+ ${F(r+1)}}`;return He(u,s,r+1)}if(e.container==="field"){let u=de(t.props,"label"),f=de(t.props,"gap"),p=typeof f=="number"?f:4,d=typeof u=="string"?`
160
+ ${F(r+2)}Text(${JSON.stringify(u)})
161
+ ${F(r+2)} .applyVcStyle(VcTheme.resolve("Text", variant: "field-label"))`:"",m=`${F(r+1)}VStack(alignment: .leading, spacing: ${p}) {${d}
162
162
  ${a}
163
- ${D(r+1)}}`;return je(m,s,r+1)}if(e.container==="tablestack"){let c=ce(t.props,"separator"),p=ce(t.props,"separatorColor"),f=typeof c=="number"&&c>0,d=t.children.map(y=>y.kind==="map"?Bn(y,r+2,i,o):i(y,r+2,n)).filter(Boolean),m;if(f){let _=Ha(t.name,t.props,o).separatorColor??p,b="Color.gray.opacity(0.2)";if(typeof _=="string"){let A=_.match(/^#([0-9a-fA-F]{6})$/);if(A){let T=parseInt(A[1].slice(0,2),16)/255,M=parseInt(A[1].slice(2,4),16)/255,X=parseInt(A[1].slice(4,6),16)/255;b=`Color(red: ${T}, green: ${M}, blue: ${X})`}}let L=c,q=L===1?`${D(r+2)}Divider().overlay(${b})`:`${D(r+2)}Rectangle().fill(${b}).frame(height: ${L})`;m=d.flatMap((A,T)=>T<d.length-1?[A,q]:[A])}else m=d;let g=`${D(r+1)}VStack(alignment: .leading, spacing: 0) {
163
+ ${F(r+1)}}`;return He(m,s,r+1)}if(e.container==="tablestack"){let u=de(t.props,"separator"),f=de(t.props,"separatorColor"),p=typeof u=="number"&&u>0,d=t.children.map(y=>y.kind==="map"?ii(y,r+2,i,o):i(y,r+2,n)).filter(Boolean),m;if(p){let v=ml(t.name,t.props,o).separatorColor??f,w="Color.gray.opacity(0.2)";if(typeof v=="string"){let I=v.match(/^#([0-9a-fA-F]{6})$/);if(I){let A=parseInt(I[1].slice(0,2),16)/255,L=parseInt(I[1].slice(2,4),16)/255,W=parseInt(I[1].slice(4,6),16)/255;w=`Color(red: ${A}, green: ${L}, blue: ${W})`}}let R=u,O=R===1?`${F(r+2)}Divider().overlay(${w})`:`${F(r+2)}Rectangle().fill(${w}).frame(height: ${R})`;m=d.flatMap((I,A)=>A<d.length-1?[I,O]:[I])}else m=d;let g=`${F(r+1)}VStack(alignment: .leading, spacing: 0) {
164
164
  ${m.join(`
165
165
  `)}
166
- ${D(r+1)}}`;return je(g,s,r+1)}if(e.container==="cellgroup"){let c=ce(t.props,"width"),p=ce(t.props,"flex"),f=ce(t.props,"align"),d=f==="end"?".trailing":f==="center"?".center":".leading",m=typeof p=="number",g=[...s,".lineLimit(1)"];typeof c=="number"?g.push(`.frame(width: ${c}, alignment: ${d})`):m&&g.push(`.frame(maxWidth: .infinity, alignment: ${d})`);let y=a?`${D(r+1)}Group {
166
+ ${F(r+1)}}`;return He(g,s,r+1)}if(e.container==="cellgroup"){let u=de(t.props,"width"),f=de(t.props,"flex"),p=de(t.props,"align"),d=p==="end"?".trailing":p==="center"?".center":".leading",m=typeof f=="number",g=[...s,".lineLimit(1)"];typeof u=="number"?g.push(`.frame(width: ${u}, alignment: ${d})`):m&&g.push(`.frame(maxWidth: .infinity, alignment: ${d})`);let y=a?`${F(r+1)}Group {
167
167
  ${a}
168
- ${D(r+2)}.frame(maxWidth: .infinity, alignment: ${d})
169
- ${D(r+1)}}`:`${D(r+1)}Group { EmptyView() }`;return je(y,g,r+1)}let u=a?`${D(r+1)}Group {
168
+ ${F(r+2)}.frame(maxWidth: .infinity, alignment: ${d})
169
+ ${F(r+1)}}`:`${F(r+1)}Group { EmptyView() }`;return He(y,g,r+1)}let l=a?`${F(r+1)}Group {
170
170
  ${a}
171
- ${D(r+1)}}`:`${D(r+1)}Group { EmptyView() }`;return je(u,s,r+1)}function Ha(t,e,r){let n=ce(e,"variant"),i=Id(e);return Io({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof n=="string"?n:void 0,instanceLiterals:i})}function u0(t){if(!t||typeof t!="string")return null;let e=t.match(/repeat\((\d+),\s*minmax\(0,\s*1fr\)\)/);if(e)return{kind:"equal-columns",count:Number(e[1])};let r=t.match(/repeat\(auto-fit,\s*minmax\((\d+)px/);if(r)return{kind:"adaptive",minWidth:Number(r[1])};let n=t.trim().split(/\s+/);return n.length>=2?{kind:"fixed-columns",widths:n}:null}function f0(t,e,r,n,i,o){let s=i0(t.name,t.props,o,n);if(e.leaf)return l0(t,e,r,n,o,s);if(e.container==="group"&&!Rd(t.props)){let a=Ha(t.name,t.props,o),u=a.display,c=a.gridTemplateColumns,p=a.flexDirection;if(u==="grid"&&c){let f=u0(c);if(f?.kind==="adaptive")return p0(t,r,n,i,o,s,f.minWidth);if(f?.kind==="equal-columns")return d0(t,r,n,i,o,s,f.count);if(f?.kind==="fixed-columns")return m0(t,r,n,i,o,s,f.widths)}if(u==="flex"&&p==="row"){let f=Nd(t.children,r+2,i,o,n),d=ce(t.props,"gap"),m=typeof d=="number"?d:typeof a.gap=="number"?a.gap:0,g=`${D(r+1)}HStack(alignment: .top, spacing: ${m}) {
172
- ${f}
173
- ${D(r+1)}}`;return je(g,s,r+1)}}if(e.container)return c0(t,e,r,n,i,o,s);throw new Error(`Unsupported SwiftUI element config for ${t.name}`)}function p0(t,e,r,n,i,o,s){let a=ce(t.props,"gap"),u=typeof a=="number"?a:16,c=Cd(t.children,e,n,i,r),p=`${D(e+1)}LazyVGrid(columns: [GridItem(.adaptive(minimum: ${s}))], spacing: ${u}) {
174
- ${c}
175
- ${D(e+1)}}
176
- ${D(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return je(p,o,e+1)}function d0(t,e,r,n,i,o,s){let a=ce(t.props,"gap"),u=typeof a=="number"?a:16,c=`Array(repeating: GridItem(.flexible(), spacing: ${u}), count: ${s})`,p=Cd(t.children,e,n,i,r),f=`${D(e+1)}LazyVGrid(columns: ${c}, spacing: ${u}) {
171
+ ${F(r+1)}}`:`${F(r+1)}Group { EmptyView() }`;return He(l,s,r+1)}function ml(t,e,r){let n=de(e,"variant"),i=oh(e);return Xt({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof n=="string"?n:void 0,instanceLiterals:i})}function bx(t){if(!t||typeof t!="string")return null;let e=t.match(/repeat\((\d+),\s*minmax\(0,\s*1fr\)\)/);if(e)return{kind:"equal-columns",count:Number(e[1])};let r=t.match(/repeat\(auto-fit,\s*minmax\((\d+)px/);if(r)return{kind:"adaptive",minWidth:Number(r[1])};let n=t.trim().split(/\s+/);return n.length>=2?{kind:"fixed-columns",widths:n}:null}function _x(t,e,r,n,i,o){let s=hx(t.name,t.props,o,n);if(e.leaf)return vx(t,e,r,n,o,s);if(e.container==="group"&&!sh(t.props)){let a=ml(t.name,t.props,o),l=a.display,u=a.gridTemplateColumns,f=a.flexDirection;if(l==="grid"&&u){let p=bx(u);if(p?.kind==="adaptive")return xx(t,r,n,i,o,s,p.minWidth);if(p?.kind==="equal-columns")return $x(t,r,n,i,o,s,p.count);if(p?.kind==="fixed-columns")return kx(t,r,n,i,o,s,p.widths)}if(l==="flex"&&f==="row"){let p=ah(t.children,r+2,i,o,n),d=de(t.props,"gap"),m=typeof d=="number"?d:typeof a.gap=="number"?a.gap:0,g=`${F(r+1)}HStack(alignment: .top, spacing: ${m}) {
177
172
  ${p}
178
- ${D(e+1)}}
179
- ${D(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return je(f,o,e+1)}function h0(t,e){if(t.kind!=="component")return null;let n=Ha(t.name,t.props,e).background;if(typeof n!="string"||n==="transparent")return null;let i=n.match(/^#([0-9a-fA-F]{6})$/);if(i){let o=parseInt(i[1].slice(0,2),16)/255,s=parseInt(i[1].slice(2,4),16)/255,a=parseInt(i[1].slice(4,6),16)/255;return`Color(red: ${o}, green: ${s}, blue: ${a})`}return`Color(${JSON.stringify(n)})`}function m0(t,e,r,n,i,o,s){let a=t.children,u=[];for(let f=0;f<a.length;f++){let d=a[f],m="";if(d.kind==="map"?m=Bn(d,e+2,n,i):d.kind==="text"?m=`${D(e+2)}Text(${JSON.stringify(d.value)})`:d.kind==="binding"?m=`${D(e+2)}Text(${Ye(d,i,r)})`:m=n(d,e+2,r),!m)continue;let g=s[f],y=g?.match(/^(\d+)px$/);if(y){m+=`
180
- ${D(e+2)}.frame(width: ${Number(y[1])}, alignment: .topLeading)`,m+=`
181
- ${D(e+2)}.frame(maxHeight: .infinity, alignment: .topLeading)`;let _=h0(d,i);_&&(m+=`
182
- ${D(e+2)}.background(${_})`)}else g==="1fr"&&(m+=`
183
- ${D(e+3)}.frame(maxWidth: .infinity, alignment: .topLeading)`,m=`${D(e+2)}ScrollView {
173
+ ${F(r+1)}}`;return He(g,s,r+1)}}if(e.container)return wx(t,e,r,n,i,o,s);throw new Error(`Unsupported SwiftUI element config for ${t.name}`)}function xx(t,e,r,n,i,o,s){let a=de(t.props,"gap"),l=typeof a=="number"?a:16,u=ih(t.children,e,n,i,r),f=`${F(e+1)}LazyVGrid(columns: [GridItem(.adaptive(minimum: ${s}))], spacing: ${l}) {
174
+ ${u}
175
+ ${F(e+1)}}
176
+ ${F(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return He(f,o,e+1)}function $x(t,e,r,n,i,o,s){let a=de(t.props,"gap"),l=typeof a=="number"?a:16,u=`Array(repeating: GridItem(.flexible(), spacing: ${l}), count: ${s})`,f=ih(t.children,e,n,i,r),p=`${F(e+1)}LazyVGrid(columns: ${u}, spacing: ${l}) {
177
+ ${f}
178
+ ${F(e+1)}}
179
+ ${F(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return He(p,o,e+1)}function Sx(t,e){if(t.kind!=="component")return null;let n=ml(t.name,t.props,e).background;if(typeof n!="string"||n==="transparent")return null;let i=n.match(/^#([0-9a-fA-F]{6})$/);if(i){let o=parseInt(i[1].slice(0,2),16)/255,s=parseInt(i[1].slice(2,4),16)/255,a=parseInt(i[1].slice(4,6),16)/255;return`Color(red: ${o}, green: ${s}, blue: ${a})`}return`Color(${JSON.stringify(n)})`}function kx(t,e,r,n,i,o,s){let a=t.children,l=[];for(let p=0;p<a.length;p++){let d=a[p],m="";if(d.kind==="map"?m=ii(d,e+2,n,i):d.kind==="text"?m=`${F(e+2)}Text(${JSON.stringify(d.value)})`:d.kind==="binding"?m=`${F(e+2)}Text(${it(d,i,r)})`:m=n(d,e+2,r),!m)continue;let g=s[p],y=g?.match(/^(\d+)px$/);if(y){m+=`
180
+ ${F(e+2)}.frame(width: ${Number(y[1])}, alignment: .topLeading)`,m+=`
181
+ ${F(e+2)}.frame(maxHeight: .infinity, alignment: .topLeading)`;let v=Sx(d,i);v&&(m+=`
182
+ ${F(e+2)}.background(${v})`)}else g==="1fr"&&(m+=`
183
+ ${F(e+3)}.frame(maxWidth: .infinity, alignment: .topLeading)`,m=`${F(e+2)}ScrollView {
184
184
  ${m}
185
- ${D(e+2)}}`,m+=`
186
- ${D(e+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`);u.push(m)}let c=u.join(`
187
- `),p=`${D(e+1)}HStack(spacing: 0) {
188
- ${c}
189
- ${D(e+1)}}`;return je(p,[...o,".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"],e+1)}function g0(t,e,r,n){let i=Object.entries(t.props).map(([s,a])=>typeof a=="object"&&a!==null&&"kind"in a&&a.kind==="binding"?`${s}: ${Ye(a,n,r)}`:`${s}: ${JSON.stringify(a)}`),o=i.length>0?`(${i.join(", ")})`:"()";return`${D(e)}${t.name}${o}`}function y0(t){let e=(r,n,i)=>{if(r.kind==="viewRef")return g0(r,n,i,t);if(r.kind!=="component")return"";if(!t.map.elements[r.name])throw new Error(`Element "${r.name}" is not in SwiftUI element map (prototype subset)`);return f0(r,t.map.elements[r.name],n,i,e,t)};return e}function Td(t,e,r=2){let n=y0(e);if(t.kind!=="component")throw new Error("SwiftUI lowering root must be a component node");return n(t,r)}var Ad=J(()=>{"use strict";It();kd();Ed()});var Md={};Cr(Md,{renderSwiftComponent:()=>No});function Od(t){let e=t.match(/^(\w+)\[\]$/);return e?`[${Od(e[1])}]`:t==="string"?"String":t==="number"?"Double":t==="boolean"?"Bool":t}function v0(t){if(!t.propsType)return"";let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?`${e[1].trim().split(",").map(i=>{let o=i.indexOf(":"),s=o>=0?i.slice(0,o).trim():i.trim(),a=o>=0?i.slice(o+1).trim():"Any",u=Od(a);return` let ${s}: ${u}`}).join(`
185
+ ${F(e+2)}}`,m+=`
186
+ ${F(e+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`);l.push(m)}let u=l.join(`
187
+ `),f=`${F(e+1)}HStack(spacing: 0) {
188
+ ${u}
189
+ ${F(e+1)}}`;return He(f,[...o,".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"],e+1)}function Cx(t,e,r,n){let i=Object.entries(t.props).map(([s,a])=>typeof a=="object"&&a!==null&&"kind"in a&&a.kind==="binding"?`${s}: ${it(a,n,r)}`:`${s}: ${JSON.stringify(a)}`),o=i.length>0?`(${i.join(", ")})`:"()";return`${F(e)}${t.name}${o}`}function Ex(t){let e=(r,n,i)=>{if(r.kind==="viewRef")return Cx(r,n,i,t);if(r.kind!=="component")return"";if(!t.map.elements[r.name])throw new Error(`Element "${r.name}" is not in SwiftUI element map (prototype subset)`);return _x(r,t.map.elements[r.name],n,i,e,t)};return e}function lh(t,e,r=2){let n=Ex(e);if(t.kind!=="component")throw new Error("SwiftUI lowering root must be a component node");return n(t,r)}var uh=X(()=>{"use strict";mt();fl();rh()});var ph={};lr(ph,{renderSwiftComponent:()=>Ko});function ch(t){let e=t.match(/^(\w+)\[\]$/);return e?`[${ch(e[1])}]`:t==="string"?"String":t==="number"?"Double":t==="boolean"?"Bool":t}function Px(t){if(!t.propsType)return"";let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?`${e[1].trim().split(",").map(i=>{let o=i.indexOf(":"),s=o>=0?i.slice(0,o).trim():i.trim(),a=o>=0?i.slice(o+1).trim():"Any",l=ch(a);return` let ${s}: ${l}`}).join(`
190
190
  `)}
191
191
  `:` let props: ${t.propsType}
192
- `}function w0(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 No(t,e){let r=await Sd(e.elementMapPath),n=e.allowlistExtra??[],i=t.isPartial?t.exportName:t.exportName.replace(/View$/,"")||t.exportName,o={map:r,theme:e.theme,tokens:e.tokens,allowlistExtra:n,propsRoot:w0(t)},s=Td(t.root,o,4),a=v0(t),u=!t.isPartial&&t.viewModel?` let vm: ${t.viewModel}
192
+ `}function Ix(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 Ko(t,e){let r=await Zd(e.elementMapPath),n=e.allowlistExtra??[],i=t.isPartial?t.exportName:t.exportName.replace(/View$/,"")||t.exportName,o={map:r,theme:e.theme,tokens:e.tokens,allowlistExtra:n,propsRoot:Ix(t)},s=lh(t.root,o,4),a=Px(t),l=!t.isPartial&&t.viewModel?` let vm: ${t.viewModel}
193
193
  `:"";return`/**
194
194
  * Auto-generated SwiftUI view from ${t.source}
195
195
  * DO NOT EDIT \u2014 prototype SwiftUI lowering (#21)
@@ -197,14 +197,14 @@ ${D(e+1)}}`;return je(p,[...o,".frame(maxWidth: .infinity, maxHeight: .infinity,
197
197
  import SwiftUI
198
198
 
199
199
  struct ${i}: View {
200
- ${u}${a} var body: some View {
200
+ ${l}${a} var body: some View {
201
201
  ${s}
202
202
  }
203
203
  }
204
- `}var Ua=J(()=>{"use strict";$d();Ad()});import{readFile as _0,stat as b0}from"node:fs/promises";import{resolve as Ld}from"node:path";function jd(){return"views/preview"}function S0(t){return`${t.charAt(0).toLowerCase()}${t.slice(1)}Mock`}function za(t,e,r){let n=xe(t),i=e.preview?.mocksDir??jd();return Ld(n,i,`${r}.mock.yaml`)}function $0(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function x0(t,e){if(!$0(t))throw new To(`${e} must be a YAML object (ViewModel fields at the root)`);return t}async function Wa(t){let e;try{e=await _0(t,"utf-8")}catch{throw new To(`Preview mock not found: ${t}`)}let r=st.load(e);return x0(r,t)}function k0(t,e){let r=S0(t);return`/** Auto-built from views/preview/${t}.mock.yaml \u2014 preview / example only */
204
+ `}var gl=X(()=>{"use strict";eh();uh()});import{readFile as Rx,stat as Tx}from"node:fs/promises";import{resolve as fh}from"node:path";function dh(){return"views/preview"}function Ax(t){return`${t.charAt(0).toLowerCase()}${t.slice(1)}Mock`}function si(t,e,r){let n=Te(t),i=e.preview?.mocksDir??dh();return fh(n,i,`${r}.mock.yaml`)}function Nx(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Mx(t,e){if(!Nx(t))throw new Yo(`${e} must be a YAML object (ViewModel fields at the root)`);return t}async function ai(t){let e;try{e=await Rx(t,"utf-8")}catch{throw new Yo(`Preview mock not found: ${t}`)}let r=ht.load(e);return Mx(r,t)}function Ox(t,e){let r=Ax(t);return`/** Auto-built from views/preview/${t}.mock.yaml \u2014 preview / example only */
205
205
  export const ${r} = ${JSON.stringify(e,null,2)};
206
- `}async function Vd(t,e,r){let n=za(t,e,r),i=await Wa(n);return k0(r,i)}function Dd(t){if(!t.startsWith(Hn))return null;let e=t.slice(Hn.length);return e.length>0?e:null}async function qd(t,e){let r=xe(t),n=e.preview?.mocksDir??jd();return Ld(r,n)}async function Fd(t){try{return await b0(t),!0}catch{return!1}}var Hn,To,Ga=J(()=>{"use strict";Ir();Pt();Hn="view-contracts:preview/mock/",To=class extends Error{constructor(e){super(e),this.name="PreviewMockError"}}});var Hd={};Cr(Hd,{renderSwiftUIRuntime:()=>C0});import{mkdir as E0,writeFile as lr}from"node:fs/promises";import{resolve as Mt}from"node:path";function Bd(){return Mt(ke(),"renderers/swiftui/templates")}async function C0(t,e,r,n,i){let o=Mt(e.generated.reactDir,"../swiftui");if(await E0(o,{recursive:!0}),n?await lr(Mt(o,"VcTheme.swift"),_d(n.theme,n.tokens),"utf-8"):await lr(Mt(o,"VcTheme.swift"),await ct(Bd(),"VcTheme.swift.hbs",{}),"utf-8"),await lr(Mt(o,"FlowLayout.swift"),P0,"utf-8"),i&&n){for(let s of i.partials)try{let a=await No(s,{theme:n.theme,tokens:n.tokens}),u=Mt(o,`${s.exportName}.generated.swift`);await lr(u,a,"utf-8"),console.log(` swiftui/${s.exportName} \u2192 ${u}`)}catch(a){console.warn(` swiftui/${s.exportName}: skipped (${a.message})`)}for(let s of r.views){let a=i.screens.get(s.screenName);if(a)try{let u=await No(a,{theme:n.theme,tokens:n.tokens}),c=Mt(o,`${s.screenName}.generated.swift`);await lr(c,u,"utf-8"),console.log(` swiftui/${s.screenName} \u2192 ${c}`)}catch(u){console.warn(` swiftui/${s.screenName}: skipped (${u.message})`)}}}for(let s of r.views)if(s.targets.includes("swiftui")){let a=Mt(o,`${s.screenName}.swift`);await lr(a,await ct(Bd(),"Screen.swift.hbs",{screenName:s.screenName}),"utf-8")}for(let s of r.views){let a=za(t,e,s.screenName);if(await Fd(a))try{let u=await Wa(a),c=JSON.stringify(u,null,2)+`
207
- `,p=Mt(o,`${s.screenName}.SampleData.json`);await lr(p,c,"utf-8"),console.log(` swiftui/${s.screenName}.SampleData.json \u2192 ${p}`)}catch(u){console.warn(` swiftui/${s.screenName}.SampleData.json: skipped (${u.message})`)}}}var P0,Ud=J(()=>{"use strict";Ft();jn();bd();Ua();Ga();P0=`import SwiftUI
206
+ `}async function hh(t,e,r){let n=si(t,e,r),i=await ai(n);return Ox(r,i)}function mh(t){if(!t.startsWith(oi))return null;let e=t.slice(oi.length);return e.length>0?e:null}async function gh(t,e){let r=Te(t),n=e.preview?.mocksDir??dh();return fh(r,n)}async function Xo(t){try{return await Tx(t),!0}catch{return!1}}var oi,Yo,Qo=X(()=>{"use strict";jr();Ot();oi="view-contracts:preview/mock/",Yo=class extends Error{constructor(e){super(e),this.name="PreviewMockError"}}});var vh={};lr(vh,{renderSwiftUIRuntime:()=>jx});import{mkdir as Lx,writeFile as vr}from"node:fs/promises";import{resolve as Bt}from"node:path";function yh(){return Bt(Ee(),"renderers/swiftui/templates")}async function jx(t,e,r,n,i){let o=Bt(e.generated.reactDir,"../swiftui");if(await Lx(o,{recursive:!0}),n?await vr(Bt(o,"VcTheme.swift"),Xd(n.theme,n.tokens),"utf-8"):await vr(Bt(o,"VcTheme.swift"),await vt(yh(),"VcTheme.swift.hbs",{}),"utf-8"),await vr(Bt(o,"FlowLayout.swift"),Vx,"utf-8"),i&&n){for(let s of i.partials)try{let a=await Ko(s,{theme:n.theme,tokens:n.tokens}),l=Bt(o,`${s.exportName}.generated.swift`);await vr(l,a,"utf-8"),console.log(` swiftui/${s.exportName} \u2192 ${l}`)}catch(a){console.warn(` swiftui/${s.exportName}: skipped (${a.message})`)}for(let s of r.views){let a=i.screens.get(s.screenName);if(a)try{let l=await Ko(a,{theme:n.theme,tokens:n.tokens}),u=Bt(o,`${s.screenName}.generated.swift`);await vr(u,l,"utf-8"),console.log(` swiftui/${s.screenName} \u2192 ${u}`)}catch(l){console.warn(` swiftui/${s.screenName}: skipped (${l.message})`)}}}for(let s of r.views)if(s.targets.includes("swiftui")){let a=Bt(o,`${s.screenName}.swift`);await vr(a,await vt(yh(),"Screen.swift.hbs",{screenName:s.screenName}),"utf-8")}for(let s of r.views){let a=si(t,e,s.screenName);if(await Xo(a))try{let l=await ai(a),u=JSON.stringify(l,null,2)+`
207
+ `,f=Bt(o,`${s.screenName}.SampleData.json`);await vr(f,u,"utf-8"),console.log(` swiftui/${s.screenName}.SampleData.json \u2192 ${f}`)}catch(l){console.warn(` swiftui/${s.screenName}.SampleData.json: skipped (${l.message})`)}}}var Vx,wh=X(()=>{"use strict";Lt();Zn();Qd();gl();Qo();Vx=`import SwiftUI
208
208
 
209
209
  /// CSS flex-wrap equivalent: wraps children to next line when horizontal space runs out.
210
210
  struct FlowLayout: Layout {
@@ -247,50 +247,163 @@ struct FlowLayout: Layout {
247
247
  }
248
248
  }
249
249
  }
250
- `});var Gd={};Cr(Gd,{renderComposeRuntime:()=>R0});import{mkdir as I0,writeFile as zd}from"node:fs/promises";import{resolve as Ao}from"node:path";function Wd(){return Ao(ke(),"renderers/compose/templates")}async function R0(t,e){let r=Ao(t.generated.reactDir,"../compose");await I0(r,{recursive:!0}),await zd(Ao(r,"VcTheme.kt"),await ct(Wd(),"VcTheme.kt.hbs",{packageName:"generated.compose"}),"utf-8");for(let n of e.views)if(n.targets.includes("compose")){let i=Ao(r,`${n.screenName}Screen.kt`);await zd(i,await ct(Wd(),"Screen.kt.hbs",{screenName:n.screenName,packageName:"generated.compose"}),"utf-8"),console.log(` compose \u2192 ${i}`)}}var Kd=J(()=>{"use strict";Ft();jn()});var Jd={};Cr(Jd,{renderComposeRuntime:()=>L0,renderReactFromIr:()=>N0,renderReactPreviewBundle:()=>T0,renderReactRuntime:()=>A0,renderSwiftComponent:()=>M0,renderSwiftUIRuntime:()=>O0});async function N0(t,e,r){return(await Promise.resolve().then(()=>(zs(),Us))).renderReactFromIr(t,e,r)}async function T0(t,e,r){return(await Promise.resolve().then(()=>(zs(),Us))).renderReactPreviewBundle(t,e,r)}async function A0(t,e){return(await Promise.resolve().then(()=>(md(),hd))).renderReactRuntime(t,e)}async function O0(t,e,r,n,i){return(await Promise.resolve().then(()=>(Ud(),Hd))).renderSwiftUIRuntime(t,e,r,n,i)}async function M0(t,e){return(await Promise.resolve().then(()=>(Ua(),Md))).renderSwiftComponent(t,e)}async function L0(t,e){return(await Promise.resolve().then(()=>(Kd(),Gd))).renderComposeRuntime(t,e)}var Yd=J(()=>{"use strict"});import{resolve as Oo}from"node:path";function Xd(){return Ka||(Ka=Promise.resolve().then(()=>(Yd(),Jd))),Ka}function Vn(t){return t??Oo(ke(),"renderers/react/templates")}function Ur(){return Oo(ke(),"renderers/react/runtime")}function Dn(){return Oo(Ur(),"structural.css")}function j0(){return Oo(ke(),"renderers/react/elements.yaml")}function Ja(t){return t===j0()}var Ka,qn=J(()=>{"use strict";Ft()});import{readFile as V0}from"node:fs/promises";import{extname as D0,resolve as q0}from"node:path";async function Mo(t){let e=q0(t),r=await V0(e,"utf-8"),n=D0(e).toLowerCase();if(n===".json")return JSON.parse(r);if(n===".yaml"||n===".yml")return st.load(r);throw new Error(`Unsupported design file extension "${n}" (expected .yaml, .yml, or .json): ${e}`)}var Ya=J(()=>{"use strict";Ir()});var Lo,yt,Gr,jo,Se,Wr,cr=J(()=>{"use strict";Lo=["color","dimension","shadow","typography","layout"],yt=class extends Error{constructor(e){super(e),this.name="DesignTokenError"}},Gr=["background","foreground","radius","padding","shadow","typography","display","gridTemplateColumns","minHeight","maxWidth","width","height","margin","border","borderColor","flexDirection","fontWeight","fontSize","alignItems","justifyContent"],jo={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"]},Se=class extends Error{constructor(e){super(e),this.name="DesignThemeError"}},Wr=class extends Error{constructor(e){super(e),this.name="DesignConstraintError"}}});function Kr(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function B0(t){if(!Gr.includes(t))throw new Se(`Unknown variant property "${t}" (expected ${Gr.join(", ")})`);return t}function H0(t,e,r){if(typeof t!="string")throw new Se(`${e}.${r} must be a token reference string like "{ui.primary}"`);let n=t.match(F0);if(!n)throw new Se(`${e}.${r} must be a token reference like "{ui.primary}", got "${t}"`);return n[1]}function Qd(t,e){let r={};for(let[n,i]of Object.entries(e)){let o=B0(n),s=H0(i,t,n);r[o]={ref:s,accepts:[...jo[o]]}}return r}function U0(t){if(t===void 0)return{};if(!Kr(t))throw new Se('Theme "defaults" must be an object');let e={};for(let[r,n]of Object.entries(t)){if(!Kr(n))throw new Se(`Theme defaults for "${r}" must be an object`);e[r]=Qd(`defaults.${r}`,n)}return e}function Xa(t){if(!Kr(t))throw new Se("Theme document must be a YAML/JSON object");let e=t.variants;if(!Kr(e))throw new Se('Theme document must contain a "variants" object');let r={};for(let[n,i]of Object.entries(e)){if(!Kr(i))throw new Se(`Theme variants for "${n}" must be an object`);let o={};for(let[s,a]of Object.entries(i)){if(!Kr(a))throw new Se(`Theme variant "${n}.${s}" must be an object`);o[s]=Qd(`${n}.${s}`,a)}r[n]=o}return{defaults:U0(t.defaults),variants:r}}var F0,Qa=J(()=>{"use strict";cr();F0=/^\{([^}]+)\}$/});function Un(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function W0(t){return`--${t.replace(/\./g,"-")}`}function G0(t,e){if(typeof t!="string"||!Lo.includes(t))throw new yt(`Token "${e}" has unsupported $type "${String(t)}" (expected ${Lo.join(", ")})`);return t}function Zd(t,e,r){if(Un(t)){if("$type"in t&&"$value"in t){r.push({path:e,type:G0(t.$type,e),rawValue:t.$value});return}for(let[n,i]of Object.entries(t)){if(n.startsWith("$"))continue;let o=e?`${e}.${n}`:n;Zd(i,o,r)}}}function K0(t,e){if(typeof e=="string")return e;if(t==="typography"&&Un(e)){if(typeof e.fontFamily=="string")return e.fontFamily;let r=[e.fontWeight,e.fontStyle,e.fontSize,e.lineHeight,e.fontFamily].filter(n=>n!=null);if(r.length>0)return r.map(String).join(" ")}if(t==="shadow"&&Array.isArray(e))return e.map(r=>Un(r)?`${r.offsetX??0} ${r.offsetY??0} ${r.blur??0} ${r.color??"transparent"}`:String(r)).join(", ");if(t==="shadow"&&Un(e))return`${e.offsetX??0} ${e.offsetY??0} ${e.blur??0} ${e.color??"transparent"}`;throw new yt(`Token value for "${t}" must be a string or supported object`)}function J0(t){return typeof t!="string"?null:t.match(z0)?.[1]??null}function eh(t,e,r,n,i){let o=J0(e);if(!o){let u=r.get(t);if(!u)throw new yt(`Unknown token path "${t}"`);return{value:K0(u.type,e)}}if(n.has(t))throw new yt(`Circular token reference detected at "${t}"`);let s=r.get(o);if(!s)throw new yt(`Token "${t}" references unknown token "{${o}}"`);if(i.has(o))return{value:i.get(o),ref:o};n.add(t);let a=eh(o,s.rawValue,r,n,i);return n.delete(t),i.set(o,a.value),{value:a.value,ref:o}}function Za(t){if(!Un(t))throw new yt("Token document must be a YAML/JSON object");let e=[];Zd(t,"",e);let r=new Map(e.map(o=>[o.path,o])),n=new Map,i=[];for(let o of e){let{value:s,ref:a}=eh(o.path,o.rawValue,r,new Set,n);n.set(o.path,s),i.push({path:o.path,type:o.type,value:s,cssVar:W0(o.path),ref:a})}return{entries:i}}var z0,el=J(()=>{"use strict";cr();z0=/^\{([^}]+)\}$/});function tl(t){let e=Gu(t),r=new Set;for(let n of e)Gr.includes(n)&&r.add(n);return r}var th=J(()=>{"use strict";It();cr()});function Y0(t){return new Map(t.entries.map(e=>[e.path,e]))}function rh(t,e,r,n,i){for(let[o,s]of Object.entries(r)){let a=jo[o];if(!a)throw new Se(`Unknown variant property "${o}" on ${t}`);if(!n.has(o))throw new Se(`Property "${o}" is not allowed for ${e} in ${t}`);let u=i.get(s.ref);if(!u)throw new Se(`${t}.${o} references unknown token "{${s.ref}}"`);if(!a.includes(u.type))throw new Se(`${t}.${o} requires a ${a.join(" or ")} token, but "{${s.ref}}" is ${u.type}`)}}function nh(t,e){let r=Y0(t);for(let[n,i]of Object.entries(e.defaults)){let o=tl(n);rh(`defaults.${n}`,n,i,o,r)}for(let[n,i]of Object.entries(e.variants)){let o=tl(n);for(let[s,a]of Object.entries(i))rh(`variants.${n}.${s}`,n,a,o,r)}}function rl(t,e){nh(t,e)}var nl=J(()=>{"use strict";cr();th()});function il(t){let e=[":root {"];for(let r of t.entries)e.push(` ${r.cssVar}: ${r.value};`);return e.push("}"),e.join(`
251
- `)}var ih=J(()=>{"use strict"});var Vo,ol=J(()=>{"use strict";Vo={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 Do(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function qo(t,e){let r=t.entries.find(n=>n.path===e);if(!r)throw new Error(`Token reference "${e}" not found while emitting theme CSS`);return r.cssVar}var sl=J(()=>{"use strict"});function al(t,e){let r=[];for(let[n,i]of Object.entries(e.defaults)){let o=Do(n),s=[];for(let[a,u]of Object.entries(i)){let c=Vo[a];if(!c){console.warn(`[view-contracts] CSS theme: variant property "${a}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let p=qo(t,u.ref);s.push(` ${c}: var(${p});`)}s.length!==0&&r.push(`.vc-${o} {
250
+ `});import{resolve as Dx}from"node:path";function qx(t){oo(Object.keys(t.elements),st,bh);for(let[e,r]of Object.entries(t.elements)){let n=r.container!==void 0&&r.container!==null,i=r.leaf!==void 0&&r.leaf!==null;if(n===i)throw new Error(`${bh}: element "${e}" must have exactly one of "container" or "leaf"`)}}async function _h(t){if(!t&&yl)return yl;let e=t??Dx(Ee(),"renderers/compose/elements.yaml"),r=await Fr(e);return qx(r),t||(yl=r),r}var bh,yl,xh=X(()=>{"use strict";mt();Lt();so();bh="renderers/compose/elements.yaml",yl=null});function We(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 Fx(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let r=e[1],n=parseInt(r.slice(0,2),16),i=parseInt(r.slice(2,4),16),o=parseInt(r.slice(4,6),16);return`Color(${n}, ${i}, ${o})`}function Bx(t){let e=t.match(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(!e)return null;let r=Number(e[1])/255,n=Number(e[2])/255,i=Number(e[3])/255,o=Number(e[4]);return`Color(${r}f, ${n}f, ${i}f, ${o}f)`}function nn(t){return t==="transparent"?"Color.Transparent":Fx(t)??Bx(t)??null}function Hx(t){let e=We(t);if(e!==null)return{kind:"uniform",value:e};if(typeof t!="string")return null;let r=t.trim().split(/\s+/);if(r.length===2){let n=We(r[0]),i=We(r[1]);if(n!==null&&i!==null)return{kind:"shorthand",vertical:n,horizontal:i}}return null}function Wx(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 zx(t){return typeof t!="string"?null:{start:"TextAlign.Start",center:"TextAlign.Center",end:"TextAlign.End"}[t]??null}function Ux(t){return typeof t!="string"?null:{start:"Alignment.Start",center:"Alignment.CenterVertically",end:"Alignment.Bottom",stretch:"Alignment.CenterVertically"}[t]??null}function $h(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 vl(t,e={}){let r=[],n=e.isLeaf??!1,i=t.foreground;if(typeof i=="string"){let Y=nn(i);Y&&r.push(n?`@textStyle(color = ${Y})`:`@contentColor(${Y})`)}let o=t.size??t.fontSize;if(o!==void 0&&o!==""){let Y=typeof o=="number"?o:We(o);Y!==null&&r.push(n?`@textStyle(fontSize = ${Y}.sp)`:`@inheritTextStyle(fontSize = ${Y}.sp)`)}let s=Wx(t.fontWeight??t.weight??"");s&&r.push(n?`@textStyle(fontWeight = ${s})`:`@inheritTextStyle(fontWeight = ${s})`);let a=t.width,l=t.height,u=t.minWidth,f=t.minHeight,p=t.maxWidth,d=t.maxHeight,m=t.margin,g=m==="0 auto",y=a==="100%"||a==="fill"||p==="fill",v=l==="100%"||l==="fill"||f==="100vh",w=p==="fill"?null:p!==void 0?We(p):null,R=!1;y&&v?(w!==null?r.push(`.widthIn(max = ${w}.dp).fillMaxHeight()`):r.push(".fillMaxWidth().fillMaxHeight()"),R=!0):y?w!==null?r.push(`.widthIn(max = ${w}.dp)`):r.push(".fillMaxWidth()"):v&&(r.push(".fillMaxHeight()"),R=!0),!R&&f==="100vh"&&r.push(".fillMaxHeight()");let O=We(t.radius??"");(t.shadow===!0||t.shadow==="true")&&r.push(`.shadow(elevation = 4.dp, shape = RoundedCornerShape(${O??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 Y=nn(I);Y&&Y!=="Color.Transparent"&&r.push(`.background(${Y}, RoundedCornerShape(${O??0}.dp))`)}t.clip!=="none"&&O!==null&&r.push(`.clip(RoundedCornerShape(${O}.dp))`);let L=t.border,W=t.borderColor;if(L||W){let Y=We(L??"1px")??1,ue=typeof W=="string"?nn(W)??"Color.Gray":"Color.Gray";r.push(`.border(${Y}.dp, ${ue}, RoundedCornerShape(${O??0}.dp))`)}if(!y){if(typeof a=="number")r.push(`.width(${a}.dp)`);else if(a!==void 0&&a!=="wrap"){let Y=We(a);Y!==null&&r.push(`.width(${Y}.dp)`)}if(typeof u=="number")r.push(`.widthIn(min = ${u}.dp)`);else if(u!==void 0){let Y=We(u);Y!==null&&r.push(`.widthIn(min = ${Y}.dp)`)}if(p!==void 0&&p!=="fill"){let Y=We(p);Y!==null&&r.push(`.widthIn(max = ${Y}.dp)`)}}if(!v){if(typeof l=="number")r.push(`.height(${l}.dp)`);else if(l!==void 0&&l!=="wrap"){let Y=We(l);Y!==null&&r.push(`.height(${Y}.dp)`)}if(f!==void 0&&f!=="100vh")if(typeof f=="number")r.push(`.heightIn(min = ${f}.dp)`);else{let Y=We(f);Y!==null&&r.push(`.heightIn(min = ${Y}.dp)`)}if(d!==void 0&&d!=="fill"){let Y=We(d);Y!==null&&r.push(`.heightIn(max = ${Y}.dp)`)}}typeof t.aspectRatio=="number"&&r.push(`.aspectRatio(${t.aspectRatio}f)`),typeof t.weight=="number"&&r.push(`.weight(${t.weight}f)`);let ie=t.padding??"",we=Hx(ie);if(we&&(we.kind==="uniform"?r.push(`.padding(${we.value}.dp)`):r.push(`.padding(horizontal = ${we.horizontal}.dp, vertical = ${we.vertical}.dp)`)),g)r.push("@wrapContentCenter()");else if(typeof m=="number")r.push(`.padding(${m}.dp)`);else if(m!==void 0&&typeof m=="string"){let Y=We(m);Y!==null&&r.push(`.padding(${Y}.dp)`)}let be=t.opacity;typeof be=="number"&&be<1&&r.push(`.alpha(${be}f)`);let Re=zx(t.textAlign??"");Re&&r.push(`@textAlign(${Re})`);let _e=t.lineLimit;if(_e!==void 0&&_e!=="none"&&_e!==""){let Y=typeof _e=="number"?_e:We(_e);Y!==null&&r.push(`@textMaxLines(${Y})`)}let Ge=t.textOverflow;Ge==="ellipsis"?r.push("@textOverflow(TextOverflow.Ellipsis)"):Ge==="clip"&&r.push("@textOverflow(TextOverflow.Clip)");let Je=Ux(t.selfAlign??"");return Je&&r.push(`.align(${Je})`),r}function Zo(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 Sh(t){return t.filter(e=>!e.includes(".background("))}function es(t){return t.filter(e=>!e.includes(".padding("))}function kh(t){return t.filter(e=>!e.includes(".clip(RoundedCornerShape("))}function on(t){return t.filter(e=>e.includes(".padding("))}function Ch(t){let r=t.find(n=>n.includes(".clip(RoundedCornerShape("))?.match(/RoundedCornerShape\((\d+)\.dp\)/);return r?Number(r[1]):null}function Eh(t){if(t.length===0)return null;let e=t[0],r=e.match(/\.padding\(horizontal = (\d+)\.dp, vertical = (\d+)\.dp\)/);if(r)return`PaddingValues(horizontal = ${r[1]}.dp, vertical = ${r[2]}.dp)`;let n=e.match(/\.padding\((\d+)\.dp\)/);return n?`PaddingValues(${n[1]}.dp)`:null}function Ph(t){return t.some(e=>e.startsWith("@runtimeStyle(")||e.includes(".background("))}function Ih(t){return t.some(e=>e.includes(".fillMaxHeight()"))}function ot(t){let e=new Set,r=[];for(let n of t)e.has(n)||(e.add(n),r.push(n));return r}function Ne(t,e){return e.length===0?t:e.filter(r=>!Gx.some(n=>r.startsWith(n)||r===n)).map(r=>r.startsWith("@runtimeStyle(")?`.applyVcStyle(${r.replace(/^@runtimeStyle\(/,"").replace(/\)$/,"")})`:r).reduce((r,n)=>`${r}${n}`,t)}function li(t){let e=t.filter(n=>n.startsWith("@textStyle(")).map(n=>n.replace(/^@textStyle\(/,"").replace(/\)$/,"")),r=t.find(n=>n.startsWith("@textAlign("));if(r){let n=r.replace(/^@textAlign\(/,"").replace(/\)$/,"");e.push(`textAlign = ${n}`)}return e}function Rh(t){let e=t.find(i=>i.startsWith("@textMaxLines("));if(!e)return null;let r=e.replace(/^@textMaxLines\(/,"").replace(/\)$/,""),n=Number(r);return Number.isFinite(n)?n:null}function Th(t){let e=t.find(r=>r.startsWith("@textOverflow("));return e?e.replace(/^@textOverflow\(/,"").replace(/\)$/,""):null}function Ah(t){return t.includes("@textFillMaxWidth()")}function Nh(t){let e=t.find(r=>r.startsWith("@contentColor("));return e?e.replace(/^@contentColor\(/,"").replace(/\)$/,""):null}function Mh(t){return t.filter(e=>e.startsWith("@inheritTextStyle(")).map(e=>e.replace(/^@inheritTextStyle\(/,"").replace(/\)$/,""))}function ts(t){return t.includes("@wrapContentCenter()")}function Oh(t){return t.match(/\.applyVcStyle\((VcTheme\.resolve\([^)]+\))\)/)?.[1]??null}var Gx,Lh=X(()=>{"use strict";Gx=["@textStyle(","@contentColor(","@inheritTextStyle(","@wrapContentCenter()","@textMaxLines(","@textOverflow(","@textAlign(","@textFillMaxWidth()"]});function V(t){return" ".repeat(t)}function pe(t,e){let r=t[e];if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="object"&&"kind"in r&&r.kind==="literal")return r.value}}function qh(t){let e={};for(let[r,n]of Object.entries(t)){if(r==="variant"||r==="id"||!qr.has(r))continue;let i=pe(t,r);i!==void 0&&(e[r]=i)}return e}function Fh(t,e,r){let n=t.variant;return!n||typeof n!="object"||!("kind"in n)?null:n.kind==="binding"?Ve(n,e,r):n.kind==="concat"?`"${n.parts.map(s=>typeof s=="string"?s:`\${${Ve(s,e,r)}}`).join("")}"`:null}function ns(t){let e=t.variant;return!e||typeof e!="object"||!("kind"in e)?!1:e.kind==="binding"||e.kind==="concat"}function Jx(t,e,r,n){let i=r.map.elements[t],o=pe(e,"variant"),s=qh(e);i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp];let a=!!i?.leaf;if(ns(e)){let u=Fh(e,r,n),f=Xt({elementName:t,theme:{defaults:{},variants:{}},tokens:r.tokens,instanceLiterals:s});return[...vl(f,{isLeaf:a}),`@runtimeStyle(VcTheme.resolve(${JSON.stringify(t)}, variant = ${u}))`]}let l=Xt({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return t==="Box"&&o==="card"&&delete l.height,vl(l,{isLeaf:a})}function sn(t,e,r){let n=pe(e,"variant"),i=qh(e);return Xt({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof n=="string"?n:void 0,instanceLiterals:i})}function Sl(t){if(!t||typeof t!="string")return null;let e=t.match(/repeat\((\d+),\s*minmax\(0,\s*1fr\)\)/);if(e)return{kind:"equal-columns",count:Number(e[1])};let r=t.match(/repeat\(auto-fit,\s*minmax\((\d+)px/);if(r)return{kind:"adaptive",minWidth:Number(r[1])};let n=t.trim().split(/\s+/);return n.length>=2?{kind:"fixed-columns",widths:n}:null}function Kx(t,e){if(t.kind!=="component")return null;let n=sn(t.name,t.props,e).background;return typeof n!="string"||n==="transparent"?null:nn(n)??`Color(${JSON.stringify(n)})`}function Vh(t,e,r,n){let o=sn(t,e,r)[n];return typeof o!="string"?n==="background"?"Color.Transparent":"Color.Unspecified":n==="background"&&(o==="transparent"||!o)?"Color.Transparent":nn(o)??"Color.Unspecified"}function Yx(t){return t==="end"?"TextAlign.End":t==="center"?"TextAlign.Center":"TextAlign.Start"}function Xx(t){return t==="end"?"Alignment.CenterEnd":t==="center"?"Alignment.Center":"Alignment.CenterStart"}function Bh(t,e,r,n,i,o,s){let a=pe(t.props,"gap"),l=typeof a=="number"?`${a}.dp`:"16.dp",u=Ne("Modifier.fillMaxWidth()",ot(o));if(t.children.length===1&&t.children[0].kind==="map"){let p=t.children[0],d=p.item,m=Ve(p.source,i,r),g=n(p.body,e+3,d);return[`${V(e)}Row(modifier = ${u}, horizontalArrangement = Arrangement.spacedBy(${l}), verticalAlignment = Alignment.Top) {`,`${V(e+1)}for (${d} in ${m}) {`,`${V(e+2)}Box(modifier = Modifier.weight(1f).fillMaxWidth(), contentAlignment = Alignment.TopStart) {`,g,`${V(e+2)}}`,`${V(e+1)}}`,`${V(e)}}`].join(`
251
+ `)}let f=t.children.map(p=>{let d="";return p.kind==="map"?d=Qt(p,e+2,n,i,"none"):p.kind==="text"?d=`${V(e+2)}Text(text = ${JSON.stringify(p.value)})`:p.kind==="binding"?d=`${V(e+2)}Text(text = ${Ve(p,i,r)})`:d=n(p,e+2,r),d?`${V(e+1)}Box(modifier = Modifier.weight(1f).fillMaxSize(), propagateMinConstraints = true, contentAlignment = Alignment.TopStart) {
252
+ ${d}
253
+ ${V(e+1)}}`:""}).filter(Boolean);return[`${V(e)}Row(modifier = ${u}.height(IntrinsicSize.Min), horizontalArrangement = Arrangement.spacedBy(${l}), verticalAlignment = Alignment.Top) {`,f.join(`
254
+ `),`${V(e)}}`].join(`
255
+ `)}function Qx(t,e,r,n,i){return t.map(s=>{if(s.kind==="map")return Qt(s,e,r,n,"lazyGrid");let a="";return s.kind==="text"?a=`${V(e+1)}Text(text = ${JSON.stringify(s.value)}, modifier = Modifier.fillMaxWidth())`:s.kind==="binding"?a=`${V(e+1)}Text(text = ${Ve(s,n,i)}, modifier = Modifier.fillMaxWidth())`:a=r(s,e+1,i),a?s.kind!=="text"&&s.kind!=="binding"?`${V(e)}item {
256
+ ${V(e+1)}Box(modifier = Modifier.fillMaxWidth()) {
257
+ ${a}
258
+ ${V(e+1)}}
259
+ ${V(e)}}`:`${V(e)}item {
260
+ ${a}
261
+ ${V(e)}}`:""}).filter(Boolean).join(`
262
+ `)}function Zx(t,e,r,n,i,o){let s=Ne("Modifier.fillMaxWidth()",ot(o)),a=sn(t.name,t.props,i),l=Sl(a.gridTemplateColumns),u=l?.kind==="fixed-columns"?l.widths:[],f=[];for(let p=0;p<t.children.length;p++){let d=t.children[p],m=u[p],g=m?.match(/^(\d+)px$/);if(g){let y="";if(d.kind==="map"?y=Qt(d,e+2,n,i,"none"):d.kind==="text"?y=`${V(e+2)}Text(text = ${JSON.stringify(d.value)})`:d.kind==="binding"?y=`${V(e+2)}Text(text = ${Ve(d,i,r)})`:y=n(d,e+2,r),!y)continue;let v=Kx(d,i),w=v?`.background(${v})`:"";f.push([`${V(e+1)}Box(modifier = Modifier.width(${Number(g[1])}.dp).fillMaxHeight()${w}) {`,y,`${V(e+1)}}`].join(`
263
+ `))}else if(m==="1fr"){let y=i.inVerticalScroll;i.inVerticalScroll=!0;let v="";if(d.kind==="map"?v=Qt(d,e+2,n,i,"none"):d.kind==="text"?v=`${V(e+2)}Text(text = ${JSON.stringify(d.value)})`:d.kind==="binding"?v=`${V(e+2)}Text(text = ${Ve(d,i,r)})`:v=n(d,e+2,r),i.inVerticalScroll=y,!v)continue;f.push([`${V(e+1)}Box(modifier = Modifier.weight(1f).fillMaxHeight(), contentAlignment = Alignment.TopStart) {`,`${V(e+2)}Column(modifier = Modifier.fillMaxSize().verticalScroll(rememberScrollState())) {`,v,`${V(e+2)}}`,`${V(e+1)}}`].join(`
264
+ `))}else{let y="";if(d.kind==="map"?y=Qt(d,e+2,n,i,"none"):d.kind==="text"?y=`${V(e+2)}Text(text = ${JSON.stringify(d.value)})`:d.kind==="binding"?y=`${V(e+2)}Text(text = ${Ve(d,i,r)})`:y=n(d,e+2,r),!y)continue;f.push(y)}}return[`${V(e)}Row(modifier = ${s}, horizontalArrangement = Arrangement.spacedBy(0.dp)) {`,f.join(`
265
+ `),`${V(e)}}`].join(`
266
+ `)}function Ve(t,e,r){let n=t.scope??r??e.propsRoot??"vm";return t.path?`${n}.${t.path}`:n}function rs(t,e,r){let n=Nh(e),i=Mh(e);if(!n&&i.length===0)return t;let o=[];return n&&o.push(`LocalContentColor provides ${n}`),i.length>0&&o.push(`LocalTextStyle provides LocalTextStyle.current.merge(TextStyle(${i.join(", ")}))`),[`${V(r)}CompositionLocalProvider(${o.join(", ")}) {`,t,`${V(r)}}`].join(`
267
+ `)}function e$(t){return t.map(e=>{let r=e.match(/\.padding\(horizontal = (\d+)\.dp, vertical = \d+\.dp\)/);if(r)return`.padding(horizontal = ${r[1]}.dp)`;let n=e.match(/\.padding\((\d+)\.dp\)/);return n?`.padding(horizontal = ${n[1]}.dp)`:e})}function _l(){return["@textMaxLines(1)","@textOverflow(TextOverflow.Ellipsis)","@textFillMaxWidth()"]}function t$(t,e){return e.cellTextBehavior?[...t,..._l()]:t}function wl(t,e){return[`${V(e)}Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.TopCenter) {`,t,`${V(e)}}`].join(`
268
+ `)}function jh(t,e,r,n=""){let i=on(e),o=es(e),s=Ne("Modifier",o),a=i.length>0&&Ph(o)?Ne("Modifier",i):null,l=rs(r,e,t+1);return a&&(l=[`${V(t+1)}Box(modifier = ${a}) {`,l,`${V(t+1)}}`].join(`
269
+ `)),[`${V(t)}Box(modifier = ${s}${n}) {`,l,`${V(t)}}`].join(`
270
+ `)}function xl(t,e,r,n){let i=on(r),o=Oh(Ne("Modifier",r)),s=ot(r.filter(w=>!w.startsWith("@textStyle(")&&!w.startsWith("@runtimeStyle(")&&!w.includes(".padding(")&&!w.startsWith("@textMaxLines(")&&!w.startsWith("@textOverflow(")&&!w.startsWith("@textAlign(")&&w!=="@textFillMaxWidth()")),a=Ah(r)?"Modifier.fillMaxWidth()":"Modifier",l=li(r),u=null;o?u=l.length>0?`LocalTextStyle.current.merge(${o}.asTextStyle()).merge(TextStyle(${l.join(", ")}))`:`${o}.asTextStyle()`:l.length>0&&(u=`LocalTextStyle.current.merge(TextStyle(${l.join(", ")}))`);let f=u?`, style = ${u}`:"",p=Rh(r),d=p!==null?`, maxLines = ${p}`:"",m=Th(r),g=m?`, overflow = ${m}`:"",y=`${t} Text(text = ${e}${d}${g}${f})`;if(o){let R=`${n.cellTextBehavior?"Modifier":"Modifier.fillMaxWidth()"}.applyVcStyle(${o})`;if(i.length>0){let O=Ne(a,[...s,...i]);return[`${t}Box(modifier = ${O}) {`,`${t} Box(modifier = ${R}) {`,y,`${t} }`,`${t}}`].join(`
271
+ `)}return[`${t}Box(modifier = ${R}) {`,y,`${t}}`].join(`
272
+ `)}let v=Ne(a,[...s,...i]);return`${t}Text(text = ${e}, modifier = ${v}${d}${g}${f})`}function r$(t,e,r){let n=t.options;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding")return`${Ve(n,e,r)}.firstOrNull()?.label ?: ""`;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="literal"&&Array.isArray(n.value)){let i=n.value;return JSON.stringify(i[0]?.label??"")}return'""'}function n$(t,e,r,n){let i=t.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=Ve(i,e,r);return`${V(n+1)}for (option in ${o}) {
273
+ ${V(n+2)}DropdownMenuItem(text = { Text(text = option.label) }, onClick = { expanded = false })
274
+ ${V(n+1)}}`}return typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="literal"&&Array.isArray(i.value)?i.value.map(s=>`${V(n+1)}DropdownMenuItem(text = { Text(text = ${JSON.stringify(s.label)}) }, onClick = { expanded = false })`).join(`
275
+ `):`${V(n+1)}DropdownMenuItem(text = { Text(text = "--") }, onClick = { expanded = false })`}function bl(t){let r=t.entries.find(o=>o.path==="ui.text-muted")?.value??"#6b7280",n=r.match(/^#([0-9a-fA-F]{6})$/);if(!n)return`Color(${JSON.stringify(r)})`;let i=n[1];return`Color(${parseInt(i.slice(0,2),16)}, ${parseInt(i.slice(2,4),16)}, ${parseInt(i.slice(4,6),16)})`}function Dh(t){let r=t.entries.find(o=>o.path==="ui.text")?.value??"#111827",n=r.match(/^#([0-9a-fA-F]{6})$/);if(!n)return`Color(${JSON.stringify(r)})`;let i=n[1];return`Color(${parseInt(i.slice(0,2),16)}, ${parseInt(i.slice(2,4),16)}, ${parseInt(i.slice(4,6),16)})`}function Hh(t,e,r){for(let n of t){if(n.kind==="text")return JSON.stringify(n.value);if(n.kind==="binding")return Ve(n,e,r)}return null}function $l(t,e,r,n,i,o=n.listScope??"none"){return t.map(a=>a.kind==="map"?Qt(a,e,r,n,o):a.kind==="text"?`${V(e)}Text(text = ${JSON.stringify(a.value)})`:a.kind==="binding"?`${V(e)}Text(text = ${Ve(a,n,i)})`:r(a,e,i)).filter(Boolean).join(`
276
+ `)}function Qt(t,e,r,n,i="none"){let o=Ve(t.source,n),s=t.item,a=r(t.body,e+2,s);return i==="lazyGrid"?`${V(e)}gridItems(${o}, key = { it.id }) { ${s} ->
277
+ ${V(e+1)}Box(modifier = Modifier.fillMaxWidth()) {
278
+ ${a}
279
+ ${V(e+1)}}
280
+ ${V(e)}}`:i==="lazyColumn"?`${V(e)}lazyItems(${o}, key = { it.id }) { ${s} ->
281
+ ${a}
282
+ ${V(e)}}`:`${V(e)}for (${s} in ${o}) {
283
+ ${a}
284
+ ${V(e)}}`}function i$(t,e,r,n){let i=Object.entries(t.props).map(([o,s])=>typeof s=="object"&&s!==null&&"kind"in s&&s.kind==="binding"?`${o} = ${Ve(s,n,r)}`:`${o} = ${JSON.stringify(s)}`);return`${V(e)}${t.name}(${i.join(", ")})`}function o$(t,e,r,n,i){let o=V(e),s=pe(t.props,"label"),l=Hh(t.children,n,r)??(typeof s=="string"?JSON.stringify(s):'"Button"'),u=Vh(t.name,t.props,n,"background"),f=Vh(t.name,t.props,n,"foreground");if(ns(t.props)){let L=`VcTheme.resolve("Button", variant = ${Fh(t.props,n,r)})`;u=`${L}.background ?: Color.Transparent`,f=`${L}.foreground ?: Color.Unspecified`}let p=ot(Sh(kh(es(i)))),d=n.cellTextBehavior?[...p.filter(A=>A!==".fillMaxWidth()"),".wrapContentWidth()"]:p,m=Ne("Modifier",d),g=Ch(i),y=Eh(on(i)),v=g!==null?`, shape = RoundedCornerShape(${g}.dp)`:"",w=y?`, contentPadding = ${y}`:"",R=li(i),O=R.length>0?`, style = TextStyle(${R.join(", ")})`:"",I=n.cellTextBehavior?", maxLines = 1, overflow = TextOverflow.Ellipsis":"";return[`${o}VcButton(onClick = {}, modifier = ${m}, containerColor = ${u}, contentColor = ${f}${v}${w}) {`,`${o} Text(text = ${l}${O}${I})`,`${o}}`].join(`
285
+ `)}function s$(t,e,r,n,i,o){let s=V(r),a=Ne("Modifier",o);if(e.leaf==="text"){let l=Hh(t.children,i,n)??'""';return xl(s,l,o,i)}if(e.leaf==="button")return o$(t,r,n,i,o);if(e.leaf==="textfield"){let l=pe(t.props,"placeholder"),u=typeof l=="string"?JSON.stringify(l):'""',f=Dh(i.tokens),p=bl(i.tokens),d=ot(o),m=Ne("Modifier",d),g=li(o),y=g.length>0?`${s} textStyle = TextStyle(${g.join(", ")}),`:`${s} textStyle = TextStyle(color = ${f}, fontSize = 14.sp),`;return[`${s}BasicTextField(`,`${s} value = "",`,`${s} onValueChange = {},`,`${s} modifier = ${m},`,y,`${s} decorationBox = { innerTextField ->`,`${s} Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.CenterStart) {`,`${s} if ("".isEmpty()) {`,`${s} Text(text = ${u}, style = TextStyle(color = ${p}, fontSize = 14.sp))`,`${s} }`,`${s} innerTextField()`,`${s} }`,`${s} },`,`${s})`].join(`
286
+ `)}if(e.leaf==="texteditor"){let l=pe(t.props,"placeholder"),u=typeof l=="string"?JSON.stringify(l):'""',f=bl(i.tokens),d=o.find(R=>R.includes("heightIn(min ="))?.match(/heightIn\(min = (\d+)\.dp\)/)?.[1]??"72",m=o.filter(R=>R.startsWith("@textStyle(")),g=ot(o.filter(R=>!R.startsWith("@textStyle(")&&!R.includes("heightIn(min ="))),y=Ne("Modifier",ot(g)),v=li(m),w=v.length>0?`, textStyle = TextStyle(${v.join(", ")})`:"";return[`${s}Box(modifier = ${y}.heightIn(min = ${d}.dp)) {`,`${s} BasicTextField(`,`${s} value = "",`,`${s} onValueChange = {},`,`${s} modifier = Modifier.fillMaxWidth()${w},`,`${s} decorationBox = { innerTextField ->`,`${s} Box(modifier = Modifier.fillMaxWidth()) {`,`${s} if ("".isEmpty()) {`,`${s} Text(text = ${u}, modifier = Modifier.align(Alignment.TopStart).padding(top = 8.dp, start = 4.dp), style = TextStyle(color = ${f}, fontSize = 14.sp))`,`${s} }`,`${s} innerTextField()`,`${s} }`,`${s} },`,`${s} )`,`${s}}`].join(`
287
+ `)}if(e.leaf==="picker"){let l=pe(t.props,"width"),u=typeof l=="number"?l:null,f=u!==null?`.width(${u}.dp)`:"",p=Zo(ot(o)),d=Ne(`Modifier${f}`,p),m=r$(t.props,i,n),g=Dh(i.tokens),y=bl(i.tokens),v=n$(t.props,i,n,r);return[`${s}Box(modifier = ${d}.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 }) {`,v,`${s} }`,`${s}}`].join(`
288
+ `)}if(e.leaf==="spacer")return`${s}Spacer(modifier = ${a})`;if(e.leaf==="divider")return`${s}HorizontalDivider(modifier = ${a})`;if(e.leaf==="image"){let l=pe(t.props,"src")??pe(t.props,"name"),u=typeof l=="string"?JSON.stringify(l):'"image"';return`${s}Icon(imageVector = Icons.Default.Image, contentDescription = ${u}, modifier = ${a})`}if(e.leaf==="progressview")return`${s}CircularProgressIndicator(modifier = ${a})`;if(e.leaf==="toggle"){let l=pe(t.props,"label"),u=typeof l=="string"?JSON.stringify(l):'""';return[`${s}Row(modifier = ${a}, verticalAlignment = Alignment.CenterVertically) {`,`${s} Switch(checked = false, onCheckedChange = {})`,`${s} Text(text = ${u})`,`${s}}`].join(`
289
+ `)}return`${s}Text(text = "/* unsupported leaf: ${t.name} */")`}function a$(t,e,r,n,i,o,s){let a=$l(t.children,r+1,i,o,n),l=Ne("Modifier",s);if(e.container==="vstack"){let f=e.spacingProp?pe(t.props,e.spacingProp):void 0,p=typeof f=="number"?`${f}.dp`:"0.dp",d=[`${V(r)}Column(modifier = ${l}, verticalArrangement = Arrangement.spacedBy(${p})) {`,rs(a,s,r+1),`${V(r)}}`].join(`
290
+ `);return ts(s)?wl(d,r):d}if(e.container==="hstack"){let f=e.spacingProp?pe(t.props,e.spacingProp):void 0,p=typeof f=="number"?`${f}.dp`:"0.dp",d=pe(t.props,"justify"),m=pe(t.props,"wrap"),g=d==="between"?"Arrangement.SpaceBetween":d==="end"?"Arrangement.End":d==="center"?"Arrangement.Center":`Arrangement.spacedBy(${p})`,y=pe(t.props,"align"),v=pe(t.props,"alignItems"),w=pe(t.props,"height"),R=v==="center"||y==="center"||typeof w=="number"?"Alignment.CenterVertically":v==="end"?"Alignment.Bottom":"Alignment.Top",O=t.name==="TableHeader"||t.name==="TableRow",I=pe(t.props,"flex"),A=O||d!==void 0||typeof I=="number",L=[];A&&L.push(".fillMaxWidth()"),typeof w=="number"&&L.push(O&&t.name==="TableHeader"?`.heightIn(min = ${w}.dp)`:`.height(${w}.dp)`);let W=O&&typeof w=="number"?Zo(s):s,ie=Ne("Modifier",ot([...W,...L])),we=o.inTableHeader;t.name==="TableHeader"&&(o.inTableHeader=!0);let be=rs($l(t.children,r+1,i,o,n),s,r+1);return t.name==="TableHeader"&&(o.inTableHeader=we),m===!0&&d!=="between"?[`${V(r)}FlowRow(modifier = ${ie}, horizontalArrangement = Arrangement.spacedBy(${p}), verticalArrangement = Arrangement.spacedBy(${p})) {`,be,`${V(r)}}`].join(`
291
+ `):[`${V(r)}Row(modifier = ${ie}, horizontalArrangement = ${g}, verticalAlignment = ${R}) {`,be,`${V(r)}}`].join(`
292
+ `)}if(e.container==="group"||e.container==="navstack"){let f=ns(t.props)?void 0:sn(t.name,t.props,o),p=f?.display==="grid"?Sl(f.gridTemplateColumns):null;if(p?.kind==="equal-columns")return Bh(t,r,n,i,o,s,p.count);if(p?.kind==="adaptive"){let v=pe(t.props,"gap"),w=typeof v=="number"?`${v}.dp`:"16.dp";return[`${V(r)}LazyVerticalGrid(columns = GridCells.Adaptive(minSize = ${p.minWidth}.dp), modifier = ${l}.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(${w}), verticalArrangement = Arrangement.spacedBy(${w})) {`,Qx(t.children,r+1,i,o,n),`${V(r)}}`].join(`
293
+ `)}let d=pe(t.props,"contentAlign"),m=Ih(s)?", contentAlignment = Alignment.TopStart":"",g=typeof d=="string"?`, contentAlignment = ${$h(d)}`:m,y=jh(r,s,a,g);return ts(s)?wl(y,r):y}if(e.container==="scrollview"){let f=o.inVerticalScroll;o.inVerticalScroll=!0;let p=[`${V(r)}Column(modifier = ${l}.verticalScroll(rememberScrollState())) {`,a,`${V(r)}}`].join(`
294
+ `);return o.inVerticalScroll=f,p}if(e.container==="field"){let f=pe(t.props,"label"),p=pe(t.props,"gap"),d=typeof p=="number"?`${p}.dp`:"4.dp",m=typeof f=="string"?`${V(r+1)}Text(text = ${JSON.stringify(f)}, modifier = Modifier.applyVcStyle(VcTheme.resolve("Text", variant = "field-label")), style = VcTheme.resolve("Text", variant = "field-label").asTextStyle())
295
+ `:"";return[`${V(r)}Column(modifier = ${l}, verticalArrangement = Arrangement.spacedBy(${d})) {`,`${m}${a}`,`${V(r)}}`].join(`
296
+ `)}if(e.container==="tablestack"){let f=pe(t.props,"separator"),p=pe(t.props,"separatorColor"),d=typeof f=="number"&&f>0||f===void 0,g=sn(t.name,t.props,o).separatorColor??p,y="Color.Gray.copy(alpha = 0.2f)";if(d&&typeof g=="string"){let O=g.match(/^#([0-9a-fA-F]{6})$/);O&&(y=`Color(${parseInt(O[1].slice(0,2),16)}, ${parseInt(O[1].slice(2,4),16)}, ${parseInt(O[1].slice(4,6),16)})`)}let v=`${V(r+1)}HorizontalDivider(modifier = Modifier, color = ${y})`,w=t.children.map(O=>{if(O.kind==="map"&&d){let I=O,A=Ve(I.source,o),L=I.item,W=i(I.body,r+3,L);return[`${V(r+1)}for (${L} in ${A}) {`,`${V(r+2)}${v.trim()}`,W,`${V(r+1)}}`].join(`
297
+ `)}return O.kind==="map"?Qt(O,r+1,i,o,"none"):i(O,r+1,n)}).filter(Boolean),R;return R=w,[`${V(r)}Column(modifier = ${l}) {`,R.join(`
298
+ `),`${V(r)}}`].join(`
299
+ `)}if(e.container==="cellgroup"){let f=pe(t.props,"width"),p=pe(t.props,"flex"),d=pe(t.props,"align"),m=Yx(d),g=Xx(d),y=typeof p=="number",v=Zo(s),w=o.inTableHeader?e$(on(v)):on(v),R=v.filter(W=>W.startsWith("@contentColor(")||W.startsWith("@inheritTextStyle(")),O=[];typeof f=="number"?O.push(`.width(${f}.dp)`):y&&O.push(".weight(1f).fillMaxWidth()");let I=Ne("Modifier",ot([...O,...es(v)])),A=o.cellTextBehavior;o.cellTextBehavior=!0;let L=t.children.map(W=>W.kind==="map"?Qt(W,r+1,i,o,"none"):W.kind==="text"?xl(V(r+1),JSON.stringify(W.value),ot([..._l(),`@textAlign(${m})`,...w,...R.map(ie=>ie)]),o):W.kind==="binding"?xl(V(r+1),Ve(W,o,n),ot([..._l(),`@textAlign(${m})`,...w,...R.map(ie=>ie)]),o):i(W,r+1,n)).filter(Boolean).join(`
300
+ `);return o.cellTextBehavior=A,[`${V(r)}Box(modifier = ${I}, contentAlignment = ${g}) {`,rs(L,R,r+1),`${V(r)}}`].join(`
301
+ `)}let u=jh(r,s,a);return ts(s)?wl(u,r):u}function l$(t,e,r,n,i,o){let s=t$(Jx(t.name,t.props,o,n),o);if(e.leaf)return s$(t,e,r,n,o,s);if(e.container==="group"&&!ns(t.props)){let a=sn(t.name,t.props,o),l=a.gridTemplateColumns,u=a.flexDirection;if(a.display==="grid"&&l){let f=Sl(l);if(f?.kind==="equal-columns")return Bh(t,r,n,i,o,s,f.count);if(f?.kind==="fixed-columns")return Zx(t,r,n,i,o,s)}if(a.display==="flex"&&u==="row"){let f=pe(t.props,"gap"),p=typeof f=="number"?`${f}.dp`:typeof a.gap=="number"?`${a.gap}.dp`:"0.dp",d=Ne("Modifier",s),m=$l(t.children,r+2,i,o,n);return[`${V(r)}Row(modifier = ${d}, horizontalArrangement = Arrangement.spacedBy(${p}), verticalAlignment = Alignment.Top) {`,m,`${V(r)}}`].join(`
302
+ `)}}if(e.container)return a$(t,e,r,n,i,o,s);throw new Error(`Unsupported Compose element config for ${t.name}`)}function u$(t){let e=(r,n,i)=>{if(r.kind==="viewRef")return i$(r,n,i,t);if(r.kind!=="component")return"";if(!t.map.elements[r.name])throw new Error(`Element "${r.name}" is not in Compose element map`);return l$(r,t.map.elements[r.name],n,i,e,t)};return e}function Wh(t,e,r=2){let n=u$(e);if(t.kind!=="component")throw new Error("Compose lowering root must be a component node");return n(t,r)}var zh=X(()=>{"use strict";mt();fl();Lh()});var Gh={};lr(Gh,{renderComposeComponent:()=>is});function Uh(t){let e=t.match(/^(\w+)\[\]$/);return e?`List<${Uh(e[1])}>`:t==="string"?"String":t==="number"?"Double":t==="boolean"?"Boolean":t}function c$(t){if(!t.propsType)return"";let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?e[1].trim().split(",").map(n=>{let i=n.indexOf(":"),o=i>=0?n.slice(0,i).trim():n.trim(),s=i>=0?n.slice(i+1).trim():"Any",a=Uh(s);return`${o}: ${a}`}).join(", "):`props: ${t.propsType}`}function p$(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 is(t,e){let r=await _h(e.elementMapPath),n=e.allowlistExtra??[],i=t.isPartial?t.exportName:`${t.exportName.replace(/View$/,"")||t.exportName}Screen`,o={map:r,theme:e.theme,tokens:e.tokens,allowlistExtra:n,propsRoot:p$(t)},s=Wh(t.root,o,2),a=t.isPartial?c$(t):t.viewModel?`vm: ${t.viewModel}`:"";return`/**
303
+ * Auto-generated Compose view from ${t.source}
304
+ * DO NOT EDIT \u2014 generated by view-contracts.
305
+ */
306
+ @file:OptIn(ExperimentalLayoutApi::class)
307
+
308
+ package generated.compose
309
+
310
+ import androidx.compose.foundation.background
311
+ import androidx.compose.foundation.border
312
+ import androidx.compose.foundation.layout.*
313
+ import androidx.compose.foundation.layout.ExperimentalLayoutApi
314
+ import androidx.compose.foundation.lazy.grid.GridCells
315
+ import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
316
+ import androidx.compose.foundation.lazy.grid.items as gridItems
317
+ import androidx.compose.foundation.lazy.items as lazyItems
318
+ import androidx.compose.foundation.rememberScrollState
319
+ import androidx.compose.foundation.shape.RoundedCornerShape
320
+ import androidx.compose.foundation.text.BasicTextField
321
+ import androidx.compose.foundation.verticalScroll
322
+ import androidx.compose.material.icons.Icons
323
+ import androidx.compose.material.icons.filled.ArrowDropDown
324
+ import androidx.compose.material.icons.filled.Image
325
+ import androidx.compose.material3.*
326
+ import androidx.compose.runtime.*
327
+ import androidx.compose.runtime.CompositionLocalProvider
328
+ import androidx.compose.material3.LocalContentColor
329
+ import androidx.compose.material3.LocalTextStyle
330
+ import androidx.compose.ui.Alignment
331
+ import androidx.compose.ui.Modifier
332
+ import androidx.compose.ui.draw.alpha
333
+ import androidx.compose.ui.draw.clip
334
+ import androidx.compose.ui.draw.shadow
335
+ import androidx.compose.ui.graphics.Color
336
+ import androidx.compose.ui.text.TextStyle
337
+ import androidx.compose.ui.text.font.FontWeight
338
+ import androidx.compose.ui.text.style.TextAlign
339
+ import androidx.compose.ui.text.style.TextOverflow
340
+ import androidx.compose.ui.unit.dp
341
+ import androidx.compose.ui.unit.sp
342
+ import generated.compose.components.*
343
+ import generated.compose.VcButton
344
+ import generated.compose.VcTheme
345
+ import generated.compose.applyVcStyle
346
+ import generated.compose.asTextStyle
347
+
348
+ @Composable
349
+ fun ${i}(${a}) {
350
+ ${s}
351
+ }
352
+ `}var kl=X(()=>{"use strict";xh();zh()});function f$(t,e){return t.entries.find(n=>n.path===e)?.value??""}function d$(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let r=e[1],n=parseInt(r.slice(0,2),16),i=parseInt(r.slice(2,4),16),o=parseInt(r.slice(4,6),16);return`Color(${n}, ${i}, ${o})`}function h$(t){let e=t.match(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(!e)return null;let r=Number(e[1])/255,n=Number(e[2])/255,i=Number(e[3])/255,o=Number(e[4]);return`Color(${r}f, ${n}f, ${i}f, ${o}f)`}function Jh(t){return t==="transparent"?"Color.Transparent":d$(t)??h$(t)??null}function an(t){let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function Kh(t,e){let r=[];for(let[n,i]of Object.entries(t)){let o=f$(e,i.ref);if(o)switch(n){case"background":case"foreground":{let s=Jh(o);s&&r.push({property:n,kotlinValue:s});break}case"padding":{let s=an(o);if(s!==null)r.push({property:n,kotlinValue:`${s}.dp`});else{let a=o.trim().split(/\s+/);if(a.length===2){let l=an(a[0]),u=an(a[1]);l!==null&&r.push({property:"paddingV",kotlinValue:`${l}.dp`}),u!==null&&r.push({property:"paddingH",kotlinValue:`${u}.dp`})}}break}case"radius":case"fontSize":case"minHeight":case"maxWidth":{let s=an(o);s!==null&&r.push({property:n,kotlinValue:`${s}.dp`});break}case"width":{if(o==="100%"||o==="fill")r.push({property:"widthFill",kotlinValue:"true"});else{let s=an(o);s!==null&&r.push({property:n,kotlinValue:`${s}.dp`})}break}case"height":{if(o==="100%"||o==="fill")r.push({property:"heightFill",kotlinValue:"true"});else{let s=an(o);s!==null&&r.push({property:n,kotlinValue:`${s}.dp`})}break}case"border":{let s=o.match(/^([\d.]+)px/);s&&r.push({property:"borderWidth",kotlinValue:`${Number(s[1])}.dp`});break}case"borderColor":{let s=Jh(o);s&&r.push({property:"borderColor",kotlinValue:s});break}case"fontWeight":{let s=m$[o];s&&r.push({property:n,kotlinValue:s});break}case"shadow":{r.push({property:n,kotlinValue:o==="none"?"false":"true"});break}default:break}}return r}function Xh(t){return t.length===0?"VcVariantStyle()":`VcVariantStyle(${[...t].sort((r,n)=>Yh.indexOf(r.property)-Yh.indexOf(n.property)).map(r=>`${r.property} = ${r.kotlinValue}`).join(", ")})`}function g$(t,e){return{...t,...e}}function Qh(t,e){let r=[];r.push("/** Auto-generated Compose theme \u2014 variant style dictionary. */"),r.push("package generated.compose"),r.push(""),r.push("import androidx.compose.foundation.background"),r.push("import androidx.compose.foundation.border"),r.push("import androidx.compose.foundation.layout.Arrangement"),r.push("import androidx.compose.foundation.layout.Row"),r.push("import androidx.compose.foundation.layout.RowScope"),r.push("import androidx.compose.foundation.layout.fillMaxHeight"),r.push("import androidx.compose.foundation.layout.fillMaxWidth"),r.push("import androidx.compose.foundation.layout.heightIn"),r.push("import androidx.compose.foundation.layout.widthIn"),r.push("import androidx.compose.foundation.layout.PaddingValues"),r.push("import androidx.compose.foundation.layout.padding"),r.push("import androidx.compose.foundation.shape.RoundedCornerShape"),r.push("import androidx.compose.ui.graphics.Shape"),r.push("import androidx.compose.material3.LocalContentColor"),r.push("import androidx.compose.material3.Surface"),r.push("import androidx.compose.runtime.Composable"),r.push("import androidx.compose.ui.Alignment"),r.push("import androidx.compose.ui.Modifier"),r.push("import androidx.compose.ui.draw.clip"),r.push("import androidx.compose.ui.draw.shadow"),r.push("import androidx.compose.ui.graphics.Color"),r.push("import androidx.compose.ui.text.TextStyle"),r.push("import androidx.compose.ui.text.font.FontWeight"),r.push("import androidx.compose.ui.unit.Dp"),r.push("import androidx.compose.ui.unit.dp"),r.push("import androidx.compose.ui.unit.sp"),r.push(""),r.push("data class VcVariantStyle("),r.push(" val foreground: Color? = null,"),r.push(" val background: Color? = null,"),r.push(" val padding: Dp? = null,"),r.push(" val paddingH: Dp? = null,"),r.push(" val paddingV: Dp? = null,"),r.push(" val widthFill: Boolean? = null,"),r.push(" val heightFill: Boolean? = null,"),r.push(" val radius: Dp? = null,"),r.push(" val fontSize: Dp? = null,"),r.push(" val fontWeight: FontWeight? = null,"),r.push(" val shadow: Boolean? = null,"),r.push(" val borderWidth: Dp? = null,"),r.push(" val borderColor: Color? = null,"),r.push(" val minHeight: Dp? = null,"),r.push(" val maxWidth: Dp? = null,"),r.push(")"),r.push(""),r.push("fun VcVariantStyle.asTextStyle(): TextStyle {"),r.push(" var style = TextStyle()"),r.push(" foreground?.let { style = style.copy(color = it) }"),r.push(" fontSize?.let { style = style.copy(fontSize = it.value.sp) }"),r.push(" fontWeight?.let { style = style.copy(fontWeight = it) }"),r.push(" return style"),r.push("}"),r.push(""),r.push("private fun vcSoftShadowModifier(radius: Dp): Modifier ="),r.push(" Modifier.shadow("),r.push(" elevation = 4.dp,"),r.push(" shape = RoundedCornerShape(radius),"),r.push(" clip = false,"),r.push(" ambientColor = Color.Black.copy(alpha = 0.08f),"),r.push(" spotColor = Color.Black.copy(alpha = 0.08f),"),r.push(" )"),r.push(""),r.push("fun Modifier.applyVcStyle(style: VcVariantStyle): Modifier {"),r.push(" var out = this"),r.push(" if (style.widthFill == true) out = out.fillMaxWidth()"),r.push(" if (style.heightFill == true) out = out.fillMaxHeight()"),r.push(" if (style.shadow == true) out = out.then(vcSoftShadowModifier(style.radius ?: 0.dp))"),r.push(" style.background?.let { out = out.background(it, RoundedCornerShape(style.radius ?: 0.dp)) }"),r.push(" style.radius?.let { out = out.clip(RoundedCornerShape(it)) }"),r.push(" if (style.borderColor != null) out = out.border(style.borderWidth ?: 1.dp, style.borderColor, RoundedCornerShape(style.radius ?: 0.dp))"),r.push(" style.minHeight?.let { out = out.heightIn(min = it) }"),r.push(" style.maxWidth?.let { out = out.widthIn(max = it) }"),r.push(" style.padding?.let { out = out.padding(it) }"),r.push(" style.paddingH?.let { out = out.padding(horizontal = it) }"),r.push(" style.paddingV?.let { out = out.padding(vertical = it) }"),r.push(" return out"),r.push("}"),r.push(""),r.push("@Composable"),r.push("fun VcButton("),r.push(" onClick: () -> Unit,"),r.push(" modifier: Modifier = Modifier,"),r.push(" containerColor: Color = Color.Transparent,"),r.push(" contentColor: Color = Color.Unspecified,"),r.push(" shape: Shape = RoundedCornerShape(0.dp),"),r.push(" contentPadding: PaddingValues = PaddingValues(0.dp),"),r.push(" enabled: Boolean = true,"),r.push(" content: @Composable RowScope.() -> Unit,"),r.push(") {"),r.push(" val resolvedContentColor = if (contentColor == Color.Unspecified) LocalContentColor.current else contentColor"),r.push(" Surface("),r.push(" onClick = onClick,"),r.push(" modifier = modifier,"),r.push(" enabled = enabled,"),r.push(" shape = shape,"),r.push(" color = containerColor,"),r.push(" contentColor = resolvedContentColor,"),r.push(" shadowElevation = 0.dp,"),r.push(" tonalElevation = 0.dp,"),r.push(" ) {"),r.push(" Row("),r.push(" modifier = Modifier.padding(contentPadding),"),r.push(" horizontalArrangement = Arrangement.Center,"),r.push(" verticalAlignment = Alignment.CenterVertically,"),r.push(" content = content,"),r.push(" )"),r.push(" }"),r.push("}"),r.push(""),r.push("object VcTheme {"),r.push(" val defaults: Map<String, VcVariantStyle> = mapOf(");for(let[n,i]of Object.entries(t.defaults)){if(Object.keys(i).length===0)continue;let o=Kh(i,e);o.length!==0&&r.push(` ${JSON.stringify(n)} to ${Xh(o)},`)}r.push(" )"),r.push(""),r.push(" val variants: Map<String, Map<String, VcVariantStyle>> = mapOf(");for(let[n,i]of Object.entries(t.variants)){let o=Object.entries(i);if(o.length===0)continue;let s=t.defaults[n]??{};r.push(` ${JSON.stringify(n)} to mapOf(`);for(let[a,l]of o){let u=g$(s,l),f=Kh(u,e);n==="Box"&&a==="card"&&(f=f.filter(p=>p.property!=="heightFill")),r.push(` ${JSON.stringify(a)} to ${Xh(f)},`)}r.push(" ),")}return r.push(" )"),r.push(""),r.push(" fun resolve(element: String, variant: String): VcVariantStyle ="),r.push(" variants[element]?.get(variant) ?: defaults[element] ?: VcVariantStyle()"),r.push("}"),r.push(""),r.join(`
353
+ `)}var m$,Yh,Zh=X(()=>{"use strict";m$={bold:"FontWeight.Bold",semibold:"FontWeight.SemiBold",medium:"FontWeight.Medium",regular:"FontWeight.Normal",600:"FontWeight.SemiBold",700:"FontWeight.Bold",500:"FontWeight.Medium",400:"FontWeight.Normal"};Yh=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});var rm={};lr(rm,{renderComposeRuntime:()=>y$});import{mkdir as em,writeFile as ln}from"node:fs/promises";import{resolve as Ht}from"node:path";function tm(){return Ht(Ee(),"renderers/compose/templates")}async function y$(t,e,r,n,i){let o=Ht(e.generated.reactDir,"../compose"),s=Ht(o,"components");if(await em(o,{recursive:!0}),await em(s,{recursive:!0}),n?await ln(Ht(o,"VcTheme.kt"),Qh(n.theme,n.tokens),"utf-8"):await ln(Ht(o,"VcTheme.kt"),await vt(tm(),"VcTheme.kt.hbs",{packageName:"generated.compose"}),"utf-8"),await ln(Ht(o,"Dispatch.kt"),`package generated.compose
354
+
355
+ /**
356
+ * Dispatch stub for generated Compose screens.
357
+ * Wire this to your actual action runtime.
358
+ */
359
+ suspend fun dispatch(action: String, payload: Map<String, Any?> = emptyMap()) {
360
+ // TODO: implement app-specific dispatcher bridge.
361
+ }
362
+ `,"utf-8"),i&&n)for(let a of i.partials)try{let l=await is(a,{theme:n.theme,tokens:n.tokens}),u=Ht(s,`${a.exportName}.kt`);await ln(u,l.replace("package generated.compose","package generated.compose.components"),"utf-8"),console.log(` compose/${a.exportName} \u2192 ${u}`)}catch(l){console.warn(` compose/${a.exportName}: skipped (${l.message})`)}for(let a of r.views)if(a.targets.includes("compose")){let l=Ht(o,`${a.screenName}Screen.kt`),u=await vt(tm(),"Screen.kt.hbs",{screenName:a.screenName,packageName:"generated.compose",componentName:a.exportName});if(i&&n){let f=i.screens.get(a.screenName);f&&(u=await is(f,{theme:n.theme,tokens:n.tokens}))}await ln(l,u,"utf-8"),console.log(` compose/${a.screenName} \u2192 ${l}`)}for(let a of r.views){if(!a.targets.includes("compose"))continue;let l=si(t,e,a.screenName);if(await Xo(l))try{let u=await ai(l),f=JSON.stringify(u,null,2)+`
363
+ `,p=Ht(o,`${a.screenName}.SampleData.json`);await ln(p,f,"utf-8"),console.log(` compose/${a.screenName}.SampleData.json \u2192 ${p}`)}catch(u){console.warn(` compose/${a.screenName}.SampleData.json: skipped (${u.message})`)}}}var nm=X(()=>{"use strict";Lt();Zn();Zh();kl();Qo()});var im={};lr(im,{renderComposeComponent:()=>$$,renderComposeRuntime:()=>S$,renderReactFromIr:()=>v$,renderReactPreviewBundle:()=>w$,renderReactRuntime:()=>b$,renderSwiftComponent:()=>x$,renderSwiftUIRuntime:()=>_$});async function v$(t,e,r){return(await Promise.resolve().then(()=>(ga(),ma))).renderReactFromIr(t,e,r)}async function w$(t,e,r){return(await Promise.resolve().then(()=>(ga(),ma))).renderReactPreviewBundle(t,e,r)}async function b$(t,e){return(await Promise.resolve().then(()=>(Ud(),zd))).renderReactRuntime(t,e)}async function _$(t,e,r,n,i){return(await Promise.resolve().then(()=>(wh(),vh))).renderSwiftUIRuntime(t,e,r,n,i)}async function x$(t,e){return(await Promise.resolve().then(()=>(gl(),ph))).renderSwiftComponent(t,e)}async function $$(t,e){return(await Promise.resolve().then(()=>(kl(),Gh))).renderComposeComponent(t,e)}async function S$(t,e,r,n,i){return(await Promise.resolve().then(()=>(nm(),rm))).renderComposeRuntime(t,e,r,n,i)}var om=X(()=>{"use strict"});import{resolve as os}from"node:path";function sm(){return Cl||(Cl=Promise.resolve().then(()=>(om(),im))),Cl}function ei(t){return t??os(Ee(),"renderers/react/templates")}function tn(){return os(Ee(),"renderers/react/runtime")}function ti(){return os(tn(),"structural.css")}function k$(){return os(Ee(),"renderers/react/elements.yaml")}function El(t){return t===k$()}var Cl,ri=X(()=>{"use strict";Lt()});import{readFile as C$}from"node:fs/promises";import{extname as E$,resolve as P$}from"node:path";async function ss(t){let e=P$(t),r=await C$(e,"utf-8"),n=E$(e).toLowerCase();if(n===".json")return JSON.parse(r);if(n===".yaml"||n===".yml")return ht.load(r);throw new Error(`Unsupported design file extension "${n}" (expected .yaml, .yml, or .json): ${e}`)}var Pl=X(()=>{"use strict";jr()});var as,Ct,cn,ls,Ie,un,wr=X(()=>{"use strict";as=["color","dimension","shadow","typography","layout"],Ct=class extends Error{constructor(e){super(e),this.name="DesignTokenError"}},cn=["background","foreground","radius","padding","shadow","typography","display","gridTemplateColumns","minHeight","maxWidth","width","height","margin","border","borderColor","flexDirection","fontWeight","fontSize","alignItems","justifyContent"],ls={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"}},un=class extends Error{constructor(e){super(e),this.name="DesignConstraintError"}}});function pn(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function R$(t){if(!cn.includes(t))throw new Ie(`Unknown variant property "${t}" (expected ${cn.join(", ")})`);return t}function T$(t,e,r){if(typeof t!="string")throw new Ie(`${e}.${r} must be a token reference string like "{ui.primary}"`);let n=t.match(I$);if(!n)throw new Ie(`${e}.${r} must be a token reference like "{ui.primary}", got "${t}"`);return n[1]}function am(t,e){let r={};for(let[n,i]of Object.entries(e)){let o=R$(n),s=T$(i,t,n);r[o]={ref:s,accepts:[...ls[o]]}}return r}function A$(t){if(t===void 0)return{};if(!pn(t))throw new Ie('Theme "defaults" must be an object');let e={};for(let[r,n]of Object.entries(t)){if(!pn(n))throw new Ie(`Theme defaults for "${r}" must be an object`);e[r]=am(`defaults.${r}`,n)}return e}function Il(t){if(!pn(t))throw new Ie("Theme document must be a YAML/JSON object");let e=t.variants;if(!pn(e))throw new Ie('Theme document must contain a "variants" object');let r={};for(let[n,i]of Object.entries(e)){if(!pn(i))throw new Ie(`Theme variants for "${n}" must be an object`);let o={};for(let[s,a]of Object.entries(i)){if(!pn(a))throw new Ie(`Theme variant "${n}.${s}" must be an object`);o[s]=am(`${n}.${s}`,a)}r[n]=o}return{defaults:A$(t.defaults),variants:r}}var I$,Rl=X(()=>{"use strict";wr();I$=/^\{([^}]+)\}$/});function ui(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function M$(t){return`--${t.replace(/\./g,"-")}`}function O$(t,e){if(typeof t!="string"||!as.includes(t))throw new Ct(`Token "${e}" has unsupported $type "${String(t)}" (expected ${as.join(", ")})`);return t}function lm(t,e,r){if(ui(t)){if("$type"in t&&"$value"in t){r.push({path:e,type:O$(t.$type,e),rawValue:t.$value});return}for(let[n,i]of Object.entries(t)){if(n.startsWith("$"))continue;let o=e?`${e}.${n}`:n;lm(i,o,r)}}}function L$(t,e){if(typeof e=="string")return e;if(t==="typography"&&ui(e)){if(typeof e.fontFamily=="string")return e.fontFamily;let r=[e.fontWeight,e.fontStyle,e.fontSize,e.lineHeight,e.fontFamily].filter(n=>n!=null);if(r.length>0)return r.map(String).join(" ")}if(t==="shadow"&&Array.isArray(e))return e.map(r=>ui(r)?`${r.offsetX??0} ${r.offsetY??0} ${r.blur??0} ${r.color??"transparent"}`:String(r)).join(", ");if(t==="shadow"&&ui(e))return`${e.offsetX??0} ${e.offsetY??0} ${e.blur??0} ${e.color??"transparent"}`;throw new Ct(`Token value for "${t}" must be a string or supported object`)}function V$(t){return typeof t!="string"?null:t.match(N$)?.[1]??null}function um(t,e,r,n,i){let o=V$(e);if(!o){let l=r.get(t);if(!l)throw new Ct(`Unknown token path "${t}"`);return{value:L$(l.type,e)}}if(n.has(t))throw new Ct(`Circular token reference detected at "${t}"`);let s=r.get(o);if(!s)throw new Ct(`Token "${t}" references unknown token "{${o}}"`);if(i.has(o))return{value:i.get(o),ref:o};n.add(t);let a=um(o,s.rawValue,r,n,i);return n.delete(t),i.set(o,a.value),{value:a.value,ref:o}}function Tl(t){if(!ui(t))throw new Ct("Token document must be a YAML/JSON object");let e=[];lm(t,"",e);let r=new Map(e.map(o=>[o.path,o])),n=new Map,i=[];for(let o of e){let{value:s,ref:a}=um(o.path,o.rawValue,r,new Set,n);n.set(o.path,s),i.push({path:o.path,type:o.type,value:s,cssVar:M$(o.path),ref:a})}return{entries:i}}var N$,Al=X(()=>{"use strict";wr();N$=/^\{([^}]+)\}$/});function Nl(t){let e=kp(t),r=new Set;for(let n of e)cn.includes(n)&&r.add(n);return r}var cm=X(()=>{"use strict";mt();wr()});function j$(t){return new Map(t.entries.map(e=>[e.path,e]))}function pm(t,e,r,n,i){for(let[o,s]of Object.entries(r)){let a=ls[o];if(!a)throw new Ie(`Unknown variant property "${o}" on ${t}`);if(!n.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 fm(t,e){let r=j$(t);for(let[n,i]of Object.entries(e.defaults)){let o=Nl(n);pm(`defaults.${n}`,n,i,o,r)}for(let[n,i]of Object.entries(e.variants)){let o=Nl(n);for(let[s,a]of Object.entries(i))pm(`variants.${n}.${s}`,n,a,o,r)}}function Ml(t,e){fm(t,e)}var Ol=X(()=>{"use strict";wr();cm()});function Ll(t){let e=[":root {"];for(let r of t.entries)e.push(` ${r.cssVar}: ${r.value};`);return e.push("}"),e.join(`
364
+ `)}var dm=X(()=>{"use strict"});var us,Vl=X(()=>{"use strict";us={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 cs(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function ps(t,e){let r=t.entries.find(n=>n.path===e);if(!r)throw new Error(`Token reference "${e}" not found while emitting theme CSS`);return r.cssVar}var jl=X(()=>{"use strict"});function Dl(t,e){let r=[];for(let[n,i]of Object.entries(e.defaults)){let o=cs(n),s=[];for(let[a,l]of Object.entries(i)){let u=us[a];if(!u){console.warn(`[view-contracts] CSS theme: variant property "${a}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let f=ps(t,l.ref);s.push(` ${u}: var(${f});`)}s.length!==0&&r.push(`.vc-${o} {
252
365
  ${s.join(`
253
366
  `)}
254
367
  }`)}return r.join(`
255
368
 
256
- `)}var oh=J(()=>{"use strict";ol();sl()});function ll(t,e){let r=[];for(let[n,i]of Object.entries(e.variants)){let o=Do(n);for(let[s,a]of Object.entries(i)){let u=[];for(let[c,p]of Object.entries(a)){let f=Vo[c];if(!f){console.warn(`[view-contracts] CSS theme: variant property "${c}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let d=qo(t,p.ref);u.push(` ${f}: var(${d});`)}u.length!==0&&r.push(`.vc-${o}--${s} {
257
- ${u.join(`
369
+ `)}var hm=X(()=>{"use strict";Vl();jl()});function ql(t,e){let r=[];for(let[n,i]of Object.entries(e.variants)){let o=cs(n);for(let[s,a]of Object.entries(i)){let l=[];for(let[u,f]of Object.entries(a)){let p=us[u];if(!p){console.warn(`[view-contracts] CSS theme: variant property "${u}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let d=ps(t,f.ref);l.push(` ${p}: var(${d});`)}l.length!==0&&r.push(`.vc-${o}--${s} {
370
+ ${l.join(`
258
371
  `)}
259
372
  }`)}}return r.join(`
260
373
 
261
- `)}var sh=J(()=>{"use strict";ol();sl()});function ah(t){return typeof t=="object"&&t!==null&&"kind"in t&&t.kind==="binding"}function X0(t){if(t.variant!==void 0)return t.variant;if(t.tone!==void 0)return t.tone}function lh(t,e,r,n,i,o){let s=r.variants[t];if(!s){e!==void 0&&!ah(e)&&typeof e=="string"&&i.push(`${n}: <${t}> references variant "${e}" but no variants are defined for ${t} in theme.yaml`);return}if(e===void 0||ah(e)||typeof e!="string")return;(o?.mapMutedToDefault&&e==="muted"?"default":e)in s||i.push(`${n}: <${t}> references unknown variant "${e}" (not defined in theme.yaml)`)}function Fo(t,e,r,n){if(t.kind==="component"){let i=X0(t.props);t.props.variant!==void 0?lh(t.name,t.props.variant,e,r,n):i!==void 0&&t.name in e.variants&&lh(t.name,i,e,r,n,{mapMutedToDefault:!0});for(let o of t.children)Fo(o,e,r,n);return}if(t.kind==="map"){Fo(t.body,e,r,n);return}if(t.kind==="fragment"){for(let i of t.children)Fo(i,e,r,n);return}t.kind}function cl(t,e){let r=[];for(let n of t)Fo(n.root,e,n.source,r);if(r.length>0)throw new Error(`View variant validation failed:
374
+ `)}var mm=X(()=>{"use strict";Vl();jl()});function gm(t){return typeof t=="object"&&t!==null&&"kind"in t&&t.kind==="binding"}function D$(t){if(t.variant!==void 0)return t.variant;if(t.tone!==void 0)return t.tone}function ym(t,e,r,n,i,o){let s=r.variants[t];if(!s){e!==void 0&&!gm(e)&&typeof e=="string"&&i.push(`${n}: <${t}> references variant "${e}" but no variants are defined for ${t} in theme.yaml`);return}if(e===void 0||gm(e)||typeof e!="string")return;(o?.mapMutedToDefault&&e==="muted"?"default":e)in s||i.push(`${n}: <${t}> references unknown variant "${e}" (not defined in theme.yaml)`)}function fs(t,e,r,n){if(t.kind==="component"){let i=D$(t.props);t.props.variant!==void 0?ym(t.name,t.props.variant,e,r,n):i!==void 0&&t.name in e.variants&&ym(t.name,i,e,r,n,{mapMutedToDefault:!0});for(let o of t.children)fs(o,e,r,n);return}if(t.kind==="map"){fs(t.body,e,r,n);return}if(t.kind==="fragment"){for(let i of t.children)fs(i,e,r,n);return}t.kind}function Fl(t,e){let r=[];for(let n of t)fs(n.root,e,n.source,r);if(r.length>0)throw new Error(`View variant validation failed:
262
375
  ${r.map(n=>` - ${n}`).join(`
263
- `)}`)}var ch=J(()=>{"use strict"});function ul(t,e){return[...new Set([...t.matchAll(e)].map(r=>r[0]))]}function uh(t,e,r){let n=e.slice(0,5).map(o=>` - ${t}: ${o}`).join(`
376
+ `)}`)}var vm=X(()=>{"use strict"});function Bl(t,e){return[...new Set([...t.matchAll(e)].map(r=>r[0]))]}function wm(t,e,r){let n=e.slice(0,5).map(o=>` - ${t}: ${o}`).join(`
264
377
  `),i=e.length>5?`
265
378
  \u2026 and ${e.length-5} more`:"";return`${r}
266
- ${n}${i}`}function fl(t,e){let r=ul(t,Q0);if(r.length!==0)throw new Wr(uh(e,r,".vc-* selectors are reserved for DSL output (theme.yaml variants + package structural CSS). Use project-owned class names (e.g. ext-*) in extension CSS."))}function pl(t,e){let r=ul(t,Z0),n=ul(t,e2),i=[...r,...n];if(i.length!==0)throw new Wr(uh(e,i,".vc-* class names are reserved for DSL lowering output. Extension components must use project-owned class names (e.g. ext-*) in src/components/."))}var Q0,Z0,e2,dl=J(()=>{"use strict";cr();Q0=/\.vc-[a-z][\w-]*/g,Z0=/(?:className\s*=\s*(?:"vc-[^"]*"|'vc-[^']*'|\{`[^`]*\bvc-[^`]*`\}|\{"vc-[^"]*"\}|\{'vc-[^']*'\})|["'`]vc-[a-z][\w-]*["'`])/g,e2=/\bextensionClassName\s*\(/g});import{readFile as fh,stat as t2}from"node:fs/promises";import{resolve as r2}from"node:path";async function ph(t){try{return await t2(t),!0}catch{return!1}}async function zn(t,e){let r=t.design?.extensionsCss;r&&await ph(r)&&fl(await fh(r,"utf-8"),r);let n=xe(e);for(let i of["extensions.tsx","extensions.ts"]){let o=r2(n,"src/components",i);await ph(o)&&pl(await fh(o,"utf-8"),o)}}var dh=J(()=>{"use strict";Pt();dl()});async function n2(t){let e=await Mo(t);return Za(e)}async function i2(t){let e=await Mo(t);return Xa(e)}async function Bo(t,e){let r=await n2(t),n=await i2(e);return rl(r,n),{tokenIR:r,themeIR:n}}var hl=J(()=>{"use strict";Ya();Qa();el();nl();ih();oh();sh();Ya();Qa();el();nl();ch();dl();dh();Co();cr()});import{readFile as hh,stat as o2}from"node:fs/promises";async function s2(t){try{return await o2(t),!0}catch{return!1}}async function Fn(t,e){let r=xe(e),{tokensPath:n,themePath:i}=ji(t),{tokenIR:o,themeIR:s}=await Bo(n,i);await zn(t,e);let a=await hh(Dn(),"utf-8"),u=al(o,s),c=ll(o,s),p=`${il(o)}
379
+ ${n}${i}`}function Hl(t,e){let r=Bl(t,q$);if(r.length!==0)throw new un(wm(e,r,".vc-* selectors are reserved for DSL output (theme.yaml variants + package structural CSS). Use project-owned class names (e.g. ext-*) in extension CSS."))}function Wl(t,e){let r=Bl(t,F$),n=Bl(t,B$),i=[...r,...n];if(i.length!==0)throw new un(wm(e,i,".vc-* class names are reserved for DSL lowering output. Extension components must use project-owned class names (e.g. ext-*) in src/components/."))}var q$,F$,B$,zl=X(()=>{"use strict";wr();q$=/\.vc-[a-z][\w-]*/g,F$=/(?:className\s*=\s*(?:"vc-[^"]*"|'vc-[^']*'|\{`[^`]*\bvc-[^`]*`\}|\{"vc-[^"]*"\}|\{'vc-[^']*'\})|["'`]vc-[a-z][\w-]*["'`])/g,B$=/\bextensionClassName\s*\(/g});import{readFile as bm,stat as H$}from"node:fs/promises";import{resolve as W$}from"node:path";async function _m(t){try{return await H$(t),!0}catch{return!1}}async function ci(t,e){let r=t.design?.extensionsCss;r&&await _m(r)&&Hl(await bm(r,"utf-8"),r);let n=Te(e);for(let i of["extensions.tsx","extensions.ts"]){let o=W$(n,"src/components",i);await _m(o)&&Wl(await bm(o,"utf-8"),o)}}var xm=X(()=>{"use strict";Ot();zl()});async function z$(t){let e=await ss(t);return Tl(e)}async function U$(t){let e=await ss(t);return Il(e)}async function ds(t,e){let r=await z$(t),n=await U$(e);return Ml(r,n),{tokenIR:r,themeIR:n}}var Ul=X(()=>{"use strict";Pl();Rl();Al();Ol();dm();hm();mm();Pl();Rl();Al();Ol();vm();zl();xm();Go();wr()});import{readFile as $m,stat as G$}from"node:fs/promises";async function J$(t){try{return await G$(t),!0}catch{return!1}}async function ni(t,e){let r=Te(e),{tokensPath:n,themePath:i}=ro(t),{tokenIR:o,themeIR:s}=await ds(n,i);await ci(t,e);let a=await $m(ti(),"utf-8"),l=Dl(o,s),u=ql(o,s),f=`${Ll(o)}
267
380
 
268
- ${a.trim()}`;u&&(p+=`
381
+ ${a.trim()}`;l&&(f+=`
269
382
 
270
- ${u}`),p+=`
383
+ ${l}`),f+=`
271
384
 
272
- ${c}`;let f=t.design?.extensionsCss;return f&&await s2(f)&&(p+=`
385
+ ${u}`;let p=t.design?.extensionsCss;return p&&await J$(p)&&(f+=`
273
386
 
274
- ${await hh(f,"utf-8")}`),p}var Co=J(()=>{"use strict";Pt();qn();hl()});var Xn=$(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.regexpCode=oe.getEsmExportName=oe.getProperty=oe.safeStringify=oe.stringify=oe.strConcat=oe.addCodeArg=oe.str=oe._=oe.nil=oe._Code=oe.Name=oe.IDENTIFIER=oe._CodeOrName=void 0;var Jn=class{};oe._CodeOrName=Jn;oe.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var ur=class extends Jn{constructor(e){if(super(),!oe.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};oe.Name=ur;var Ze=class extends Jn{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof ur&&(r[n.str]=(r[n.str]||0)+1),r),{})}};oe._Code=Ze;oe.nil=new Ze("");function Rh(t,...e){let r=[t[0]],n=0;for(;n<e.length;)xl(r,e[n]),r.push(t[++n]);return new Ze(r)}oe._=Rh;var $l=new Ze("+");function Nh(t,...e){let r=[Yn(t[0])],n=0;for(;n<e.length;)r.push($l),xl(r,e[n]),r.push($l,Yn(t[++n]));return $2(r),new Ze(r)}oe.str=Nh;function xl(t,e){e instanceof Ze?t.push(...e._items):e instanceof ur?t.push(e):t.push(E2(e))}oe.addCodeArg=xl;function $2(t){let e=1;for(;e<t.length-1;){if(t[e]===$l){let r=x2(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function x2(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof ur||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof ur))return`"${t}${e.slice(1)}`}function k2(t,e){return e.emptyStr()?t:t.emptyStr()?e:Nh`${t}${e}`}oe.strConcat=k2;function E2(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Yn(Array.isArray(t)?t.join(","):t)}function P2(t){return new Ze(Yn(t))}oe.stringify=P2;function Yn(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}oe.safeStringify=Yn;function C2(t){return typeof t=="string"&&oe.IDENTIFIER.test(t)?new Ze(`.${t}`):Rh`[${t}]`}oe.getProperty=C2;function I2(t){if(typeof t=="string"&&oe.IDENTIFIER.test(t))return new Ze(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}oe.getEsmExportName=I2;function R2(t){return new Ze(t.toString())}oe.regexpCode=R2});var Pl=$(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.ValueScope=Be.ValueScopeName=Be.Scope=Be.varKinds=Be.UsedValueState=void 0;var Fe=Xn(),kl=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Uo;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Uo||(Be.UsedValueState=Uo={}));Be.varKinds={const:new Fe.Name("const"),let:new Fe.Name("let"),var:new Fe.Name("var")};var zo=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Fe.Name?e:this.name(e)}name(e){return new Fe.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Be.Scope=zo;var Wo=class extends Fe.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,Fe._)`.${new Fe.Name(r)}[${n}]`}};Be.ValueScopeName=Wo;var N2=(0,Fe._)`\n`,El=class extends zo{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?N2:Fe.nil}}get(){return this._scope}name(e){return new Wo(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,s=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[o];if(a){let p=a.get(s);if(p)return p}else a=this._values[o]=new Map;a.set(s,i);let u=this._scope[o]||(this._scope[o]=[]),c=u.length;return u[c]=r.ref,i.setValue(r,{property:o,itemIndex:c}),i}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Fe._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(e,r,n={},i){let o=Fe.nil;for(let s in e){let a=e[s];if(!a)continue;let u=n[s]=n[s]||new Map;a.forEach(c=>{if(u.has(c))return;u.set(c,Uo.Started);let p=r(c);if(p){let f=this.opts.es5?Be.varKinds.var:Be.varKinds.const;o=(0,Fe._)`${o}${f} ${c} = ${p};${this.opts._n}`}else if(p=i?.(c))o=(0,Fe._)`${o}${p}${this.opts._n}`;else throw new kl(c);u.set(c,Uo.Completed)})}return o}};Be.ValueScope=El});var Y=$(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.or=Z.and=Z.not=Z.CodeGen=Z.operators=Z.varKinds=Z.ValueScopeName=Z.ValueScope=Z.Scope=Z.Name=Z.regexpCode=Z.stringify=Z.getProperty=Z.nil=Z.strConcat=Z.str=Z._=void 0;var ne=Xn(),ut=Pl(),Ut=Xn();Object.defineProperty(Z,"_",{enumerable:!0,get:function(){return Ut._}});Object.defineProperty(Z,"str",{enumerable:!0,get:function(){return Ut.str}});Object.defineProperty(Z,"strConcat",{enumerable:!0,get:function(){return Ut.strConcat}});Object.defineProperty(Z,"nil",{enumerable:!0,get:function(){return Ut.nil}});Object.defineProperty(Z,"getProperty",{enumerable:!0,get:function(){return Ut.getProperty}});Object.defineProperty(Z,"stringify",{enumerable:!0,get:function(){return Ut.stringify}});Object.defineProperty(Z,"regexpCode",{enumerable:!0,get:function(){return Ut.regexpCode}});Object.defineProperty(Z,"Name",{enumerable:!0,get:function(){return Ut.Name}});var Yo=Pl();Object.defineProperty(Z,"Scope",{enumerable:!0,get:function(){return Yo.Scope}});Object.defineProperty(Z,"ValueScope",{enumerable:!0,get:function(){return Yo.ValueScope}});Object.defineProperty(Z,"ValueScopeName",{enumerable:!0,get:function(){return Yo.ValueScopeName}});Object.defineProperty(Z,"varKinds",{enumerable:!0,get:function(){return Yo.varKinds}});Z.operators={GT:new ne._Code(">"),GTE:new ne._Code(">="),LT:new ne._Code("<"),LTE:new ne._Code("<="),EQ:new ne._Code("==="),NEQ:new ne._Code("!=="),NOT:new ne._Code("!"),OR:new ne._Code("||"),AND:new ne._Code("&&"),ADD:new ne._Code("+")};var Lt=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},Cl=class extends Lt{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?ut.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=Xr(this.rhs,e,r)),this}get names(){return this.rhs instanceof ne._CodeOrName?this.rhs.names:{}}},Go=class extends Lt{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof ne.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=Xr(this.rhs,e,r),this}get names(){let e=this.lhs instanceof ne.Name?{}:{...this.lhs.names};return Jo(e,this.rhs)}},Il=class extends Go{constructor(e,r,n,i){super(e,n,i),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Rl=class extends Lt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Nl=class extends Lt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Tl=class extends Lt{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Al=class extends Lt{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=Xr(this.code,e,r),this}get names(){return this.code instanceof ne._CodeOrName?this.code.names:{}}},Qn=class extends Lt{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,i=n.length;for(;i--;){let o=n[i];o.optimizeNames(e,r)||(T2(e,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>dr(e,r.names),{})}},jt=class extends Qn{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Ol=class extends Qn{},Yr=class extends jt{};Yr.kind="else";var fr=class t extends jt{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new Yr(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(Th(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=Xr(this.condition,e,r),this}get names(){let e=super.names;return Jo(e,this.condition),this.else&&dr(e,this.else.names),e}};fr.kind="if";var pr=class extends jt{};pr.kind="for";var Ml=class extends pr{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=Xr(this.iteration,e,r),this}get names(){return dr(super.names,this.iteration.names)}},Ll=class extends pr{constructor(e,r,n,i){super(),this.varKind=e,this.name=r,this.from=n,this.to=i}render(e){let r=e.es5?ut.varKinds.var:this.varKind,{name:n,from:i,to:o}=this;return`for(${r} ${n}=${i}; ${n}<${o}; ${n}++)`+super.render(e)}get names(){let e=Jo(super.names,this.from);return Jo(e,this.to)}},Ko=class extends pr{constructor(e,r,n,i){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=Xr(this.iterable,e,r),this}get names(){return dr(super.names,this.iterable.names)}},Zn=class extends jt{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Zn.kind="func";var ei=class extends Qn{render(e){return"return "+super.render(e)}};ei.kind="return";var jl=class extends jt{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,i;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(i=this.finally)===null||i===void 0||i.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&dr(e,this.catch.names),this.finally&&dr(e,this.finally.names),e}},ti=class extends jt{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};ti.kind="catch";var ri=class extends jt{render(e){return"finally"+super.render(e)}};ri.kind="finally";var Vl=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
275
- `:""},this._extScope=e,this._scope=new ut.Scope({parent:e}),this._nodes=[new Ol]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,i){let o=this._scope.toName(r);return n!==void 0&&i&&(this._constants[o.str]=n),this._leafNode(new Cl(e,o,n)),o}const(e,r,n){return this._def(ut.varKinds.const,e,r,n)}let(e,r,n){return this._def(ut.varKinds.let,e,r,n)}var(e,r,n){return this._def(ut.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new Go(e,r,n))}add(e,r){return this._leafNode(new Il(e,Z.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==ne.nil&&this._leafNode(new Al(e)),this}object(...e){let r=["{"];for(let[n,i]of e)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,ne.addCodeArg)(r,i));return r.push("}"),new ne._Code(r)}if(e,r,n){if(this._blockNode(new fr(e)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new fr(e))}else(){return this._elseNode(new Yr)}endIf(){return this._endBlockNode(fr,Yr)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new Ml(e),r)}forRange(e,r,n,i,o=this.opts.es5?ut.varKinds.var:ut.varKinds.let){let s=this._scope.toName(e);return this._for(new Ll(o,s,r,n),()=>i(s))}forOf(e,r,n,i=ut.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let s=r instanceof ne.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,ne._)`${s}.length`,a=>{this.var(o,(0,ne._)`${s}[${a}]`),n(o)})}return this._for(new Ko("of",i,o,r),()=>n(o))}forIn(e,r,n,i=this.opts.es5?ut.varKinds.var:ut.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,ne._)`Object.keys(${r})`,n);let o=this._scope.toName(e);return this._for(new Ko("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(pr)}label(e){return this._leafNode(new Rl(e))}break(e){return this._leafNode(new Nl(e))}return(e){let r=new ei;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(ei)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new jl;if(this._blockNode(i),this.code(e),r){let o=this.name("e");this._currNode=i.catch=new ti(o),r(o)}return n&&(this._currNode=i.finally=new ri,this.code(n)),this._endBlockNode(ti,ri)}throw(e){return this._leafNode(new Tl(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=ne.nil,n,i){return this._blockNode(new Zn(e,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Zn)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof fr))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};Z.CodeGen=Vl;function dr(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function Jo(t,e){return e instanceof ne._CodeOrName?dr(t,e.names):t}function Xr(t,e,r){if(t instanceof ne.Name)return n(t);if(!i(t))return t;return new ne._Code(t._items.reduce((o,s)=>(s instanceof ne.Name&&(s=n(s)),s instanceof ne._Code?o.push(...s._items):o.push(s),o),[]));function n(o){let s=r[o.str];return s===void 0||e[o.str]!==1?o:(delete e[o.str],s)}function i(o){return o instanceof ne._Code&&o._items.some(s=>s instanceof ne.Name&&e[s.str]===1&&r[s.str]!==void 0)}}function T2(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function Th(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,ne._)`!${Dl(t)}`}Z.not=Th;var A2=Ah(Z.operators.AND);function O2(...t){return t.reduce(A2)}Z.and=O2;var M2=Ah(Z.operators.OR);function L2(...t){return t.reduce(M2)}Z.or=L2;function Ah(t){return(e,r)=>e===ne.nil?r:r===ne.nil?e:(0,ne._)`${Dl(e)} ${t} ${Dl(r)}`}function Dl(t){return t instanceof ne.Name?t:(0,ne._)`(${t})`}});var te=$(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.checkStrictMode=ee.getErrorPath=ee.Type=ee.useFunc=ee.setEvaluated=ee.evaluatedPropsToName=ee.mergeEvaluated=ee.eachItem=ee.unescapeJsonPointer=ee.escapeJsonPointer=ee.escapeFragment=ee.unescapeFragment=ee.schemaRefOrVal=ee.schemaHasRulesButRef=ee.schemaHasRules=ee.checkUnknownRules=ee.alwaysValidSchema=ee.toHash=void 0;var ue=Y(),j2=Xn();function V2(t){let e={};for(let r of t)e[r]=!0;return e}ee.toHash=V2;function D2(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Lh(t,e),!jh(e,t.self.RULES.all))}ee.alwaysValidSchema=D2;function Lh(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let i=n.RULES.keywords;for(let o in e)i[o]||qh(t,`unknown keyword: "${o}"`)}ee.checkUnknownRules=Lh;function jh(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}ee.schemaHasRules=jh;function q2(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}ee.schemaHasRulesButRef=q2;function F2({topSchemaRef:t,schemaPath:e},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,ue._)`${r}`}return(0,ue._)`${t}${e}${(0,ue.getProperty)(n)}`}ee.schemaRefOrVal=F2;function B2(t){return Vh(decodeURIComponent(t))}ee.unescapeFragment=B2;function H2(t){return encodeURIComponent(Fl(t))}ee.escapeFragment=H2;function Fl(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}ee.escapeJsonPointer=Fl;function Vh(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}ee.unescapeJsonPointer=Vh;function U2(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}ee.eachItem=U2;function Oh({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(i,o,s,a)=>{let u=s===void 0?o:s instanceof ue.Name?(o instanceof ue.Name?t(i,o,s):e(i,o,s),s):o instanceof ue.Name?(e(i,s,o),o):r(o,s);return a===ue.Name&&!(u instanceof ue.Name)?n(i,u):u}}ee.mergeEvaluated={props:Oh({mergeNames:(t,e,r)=>t.if((0,ue._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,ue._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,ue._)`${r} || {}`).code((0,ue._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,ue._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,ue._)`${r} || {}`),Bl(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Dh}),items:Oh({mergeNames:(t,e,r)=>t.if((0,ue._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,ue._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,ue._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,ue._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Dh(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,ue._)`{}`);return e!==void 0&&Bl(t,r,e),r}ee.evaluatedPropsToName=Dh;function Bl(t,e,r){Object.keys(r).forEach(n=>t.assign((0,ue._)`${e}${(0,ue.getProperty)(n)}`,!0))}ee.setEvaluated=Bl;var Mh={};function z2(t,e){return t.scopeValue("func",{ref:e,code:Mh[e.code]||(Mh[e.code]=new j2._Code(e.code))})}ee.useFunc=z2;var ql;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(ql||(ee.Type=ql={}));function W2(t,e,r){if(t instanceof ue.Name){let n=e===ql.Num;return r?n?(0,ue._)`"[" + ${t} + "]"`:(0,ue._)`"['" + ${t} + "']"`:n?(0,ue._)`"/" + ${t}`:(0,ue._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,ue.getProperty)(t).toString():"/"+Fl(t)}ee.getErrorPath=W2;function qh(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}ee.checkStrictMode=qh});var et=$(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});var Te=Y(),G2={data:new Te.Name("data"),valCxt:new Te.Name("valCxt"),instancePath:new Te.Name("instancePath"),parentData:new Te.Name("parentData"),parentDataProperty:new Te.Name("parentDataProperty"),rootData:new Te.Name("rootData"),dynamicAnchors:new Te.Name("dynamicAnchors"),vErrors:new Te.Name("vErrors"),errors:new Te.Name("errors"),this:new Te.Name("this"),self:new Te.Name("self"),scope:new Te.Name("scope"),json:new Te.Name("json"),jsonPos:new Te.Name("jsonPos"),jsonLen:new Te.Name("jsonLen"),jsonPart:new Te.Name("jsonPart")};Hl.default=G2});var ni=$(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.extendErrors=Ae.resetErrorsCount=Ae.reportExtraError=Ae.reportError=Ae.keyword$DataError=Ae.keywordError=void 0;var ie=Y(),Xo=te(),Ve=et();Ae.keywordError={message:({keyword:t})=>(0,ie.str)`must pass "${t}" keyword validation`};Ae.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,ie.str)`"${t}" keyword must be ${e} ($data)`:(0,ie.str)`"${t}" keyword is invalid ($data)`};function K2(t,e=Ae.keywordError,r,n){let{it:i}=t,{gen:o,compositeRule:s,allErrors:a}=i,u=Hh(t,e,r);n??(s||a)?Fh(o,u):Bh(i,(0,ie._)`[${u}]`)}Ae.reportError=K2;function J2(t,e=Ae.keywordError,r){let{it:n}=t,{gen:i,compositeRule:o,allErrors:s}=n,a=Hh(t,e,r);Fh(i,a),o||s||Bh(n,Ve.default.vErrors)}Ae.reportExtraError=J2;function Y2(t,e){t.assign(Ve.default.errors,e),t.if((0,ie._)`${Ve.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,ie._)`${Ve.default.vErrors}.length`,e),()=>t.assign(Ve.default.vErrors,null)))}Ae.resetErrorsCount=Y2;function X2({gen:t,keyword:e,schemaValue:r,data:n,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let s=t.name("err");t.forRange("i",i,Ve.default.errors,a=>{t.const(s,(0,ie._)`${Ve.default.vErrors}[${a}]`),t.if((0,ie._)`${s}.instancePath === undefined`,()=>t.assign((0,ie._)`${s}.instancePath`,(0,ie.strConcat)(Ve.default.instancePath,o.errorPath))),t.assign((0,ie._)`${s}.schemaPath`,(0,ie.str)`${o.errSchemaPath}/${e}`),o.opts.verbose&&(t.assign((0,ie._)`${s}.schema`,r),t.assign((0,ie._)`${s}.data`,n))})}Ae.extendErrors=X2;function Fh(t,e){let r=t.const("err",e);t.if((0,ie._)`${Ve.default.vErrors} === null`,()=>t.assign(Ve.default.vErrors,(0,ie._)`[${r}]`),(0,ie._)`${Ve.default.vErrors}.push(${r})`),t.code((0,ie._)`${Ve.default.errors}++`)}function Bh(t,e){let{gen:r,validateName:n,schemaEnv:i}=t;i.$async?r.throw((0,ie._)`new ${t.ValidationError}(${e})`):(r.assign((0,ie._)`${n}.errors`,e),r.return(!1))}var hr={keyword:new ie.Name("keyword"),schemaPath:new ie.Name("schemaPath"),params:new ie.Name("params"),propertyName:new ie.Name("propertyName"),message:new ie.Name("message"),schema:new ie.Name("schema"),parentSchema:new ie.Name("parentSchema")};function Hh(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,ie._)`{}`:Q2(t,e,r)}function Q2(t,e,r={}){let{gen:n,it:i}=t,o=[Z2(i,r),e1(t,r)];return t1(t,e,o),n.object(...o)}function Z2({errorPath:t},{instancePath:e}){let r=e?(0,ie.str)`${t}${(0,Xo.getErrorPath)(e,Xo.Type.Str)}`:t;return[Ve.default.instancePath,(0,ie.strConcat)(Ve.default.instancePath,r)]}function e1({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let i=n?e:(0,ie.str)`${e}/${t}`;return r&&(i=(0,ie.str)`${i}${(0,Xo.getErrorPath)(r,Xo.Type.Str)}`),[hr.schemaPath,i]}function t1(t,{params:e,message:r},n){let{keyword:i,data:o,schemaValue:s,it:a}=t,{opts:u,propertyName:c,topSchemaRef:p,schemaPath:f}=a;n.push([hr.keyword,i],[hr.params,typeof e=="function"?e(t):e||(0,ie._)`{}`]),u.messages&&n.push([hr.message,typeof r=="function"?r(t):r]),u.verbose&&n.push([hr.schema,s],[hr.parentSchema,(0,ie._)`${p}${f}`],[Ve.default.data,o]),c&&n.push([hr.propertyName,c])}});var zh=$(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.boolOrEmptySchema=Qr.topBoolOrEmptySchema=void 0;var r1=ni(),n1=Y(),i1=et(),o1={message:"boolean schema is false"};function s1(t){let{gen:e,schema:r,validateName:n}=t;r===!1?Uh(t,!1):typeof r=="object"&&r.$async===!0?e.return(i1.default.data):(e.assign((0,n1._)`${n}.errors`,null),e.return(!0))}Qr.topBoolOrEmptySchema=s1;function a1(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),Uh(t)):r.var(e,!0)}Qr.boolOrEmptySchema=a1;function Uh(t,e){let{gen:r,data:n}=t,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,r1.reportError)(i,o1,void 0,e)}});var Ul=$(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.getRules=Zr.isJSONType=void 0;var l1=["string","number","integer","boolean","null","object","array"],c1=new Set(l1);function u1(t){return typeof t=="string"&&c1.has(t)}Zr.isJSONType=u1;function f1(){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:{}}}Zr.getRules=f1});var zl=$(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.shouldUseRule=zt.shouldUseGroup=zt.schemaHasRulesForType=void 0;function p1({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&Wh(t,n)}zt.schemaHasRulesForType=p1;function Wh(t,e){return e.rules.some(r=>Gh(t,r))}zt.shouldUseGroup=Wh;function Gh(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}zt.shouldUseRule=Gh});var ii=$(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.reportTypeError=Oe.checkDataTypes=Oe.checkDataType=Oe.coerceAndCheckDataType=Oe.getJSONTypes=Oe.getSchemaTypes=Oe.DataType=void 0;var d1=Ul(),h1=zl(),m1=ni(),Q=Y(),Kh=te(),en;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(en||(Oe.DataType=en={}));function g1(t){let e=Jh(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}Oe.getSchemaTypes=g1;function Jh(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(d1.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Oe.getJSONTypes=Jh;function y1(t,e){let{gen:r,data:n,opts:i}=t,o=v1(e,i.coerceTypes),s=e.length>0&&!(o.length===0&&e.length===1&&(0,h1.schemaHasRulesForType)(t,e[0]));if(s){let a=Gl(e,n,i.strictNumbers,en.Wrong);r.if(a,()=>{o.length?w1(t,e,o):Kl(t)})}return s}Oe.coerceAndCheckDataType=y1;var Yh=new Set(["string","number","integer","boolean","null"]);function v1(t,e){return e?t.filter(r=>Yh.has(r)||e==="array"&&r==="array"):[]}function w1(t,e,r){let{gen:n,data:i,opts:o}=t,s=n.let("dataType",(0,Q._)`typeof ${i}`),a=n.let("coerced",(0,Q._)`undefined`);o.coerceTypes==="array"&&n.if((0,Q._)`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,Q._)`${i}[0]`).assign(s,(0,Q._)`typeof ${i}`).if(Gl(e,i,o.strictNumbers),()=>n.assign(a,i))),n.if((0,Q._)`${a} !== undefined`);for(let c of r)(Yh.has(c)||c==="array"&&o.coerceTypes==="array")&&u(c);n.else(),Kl(t),n.endIf(),n.if((0,Q._)`${a} !== undefined`,()=>{n.assign(i,a),_1(t,a)});function u(c){switch(c){case"string":n.elseIf((0,Q._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,Q._)`"" + ${i}`).elseIf((0,Q._)`${i} === null`).assign(a,(0,Q._)`""`);return;case"number":n.elseIf((0,Q._)`${s} == "boolean" || ${i} === null
276
- || (${s} == "string" && ${i} && ${i} == +${i})`).assign(a,(0,Q._)`+${i}`);return;case"integer":n.elseIf((0,Q._)`${s} === "boolean" || ${i} === null
277
- || (${s} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(a,(0,Q._)`+${i}`);return;case"boolean":n.elseIf((0,Q._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(a,!1).elseIf((0,Q._)`${i} === "true" || ${i} === 1`).assign(a,!0);return;case"null":n.elseIf((0,Q._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(a,null);return;case"array":n.elseIf((0,Q._)`${s} === "string" || ${s} === "number"
278
- || ${s} === "boolean" || ${i} === null`).assign(a,(0,Q._)`[${i}]`)}}}function _1({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,Q._)`${e} !== undefined`,()=>t.assign((0,Q._)`${e}[${r}]`,n))}function Wl(t,e,r,n=en.Correct){let i=n===en.Correct?Q.operators.EQ:Q.operators.NEQ,o;switch(t){case"null":return(0,Q._)`${e} ${i} null`;case"array":o=(0,Q._)`Array.isArray(${e})`;break;case"object":o=(0,Q._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=s((0,Q._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=s();break;default:return(0,Q._)`typeof ${e} ${i} ${t}`}return n===en.Correct?o:(0,Q.not)(o);function s(a=Q.nil){return(0,Q.and)((0,Q._)`typeof ${e} == "number"`,a,r?(0,Q._)`isFinite(${e})`:Q.nil)}}Oe.checkDataType=Wl;function Gl(t,e,r,n){if(t.length===1)return Wl(t[0],e,r,n);let i,o=(0,Kh.toHash)(t);if(o.array&&o.object){let s=(0,Q._)`typeof ${e} != "object"`;i=o.null?s:(0,Q._)`!${e} || ${s}`,delete o.null,delete o.array,delete o.object}else i=Q.nil;o.number&&delete o.integer;for(let s in o)i=(0,Q.and)(i,Wl(s,e,r,n));return i}Oe.checkDataTypes=Gl;var b1={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,Q._)`{type: ${t}}`:(0,Q._)`{type: ${e}}`};function Kl(t){let e=S1(t);(0,m1.reportError)(e,b1)}Oe.reportTypeError=Kl;function S1(t){let{gen:e,data:r,schema:n}=t,i=(0,Kh.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var Qh=$(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.assignDefaults=void 0;var tn=Y(),$1=te();function x1(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)Xh(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,o)=>Xh(t,o,i.default))}Qo.assignDefaults=x1;function Xh(t,e,r){let{gen:n,compositeRule:i,data:o,opts:s}=t;if(r===void 0)return;let a=(0,tn._)`${o}${(0,tn.getProperty)(e)}`;if(i){(0,$1.checkStrictMode)(t,`default is ignored for: ${a}`);return}let u=(0,tn._)`${a} === undefined`;s.useDefaults==="empty"&&(u=(0,tn._)`${u} || ${a} === null || ${a} === ""`),n.if(u,(0,tn._)`${a} = ${(0,tn.stringify)(r)}`)}});var tt=$(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.validateUnion=le.validateArray=le.usePattern=le.callValidateCode=le.schemaProperties=le.allSchemaProperties=le.noPropertyInData=le.propertyInData=le.isOwnProperty=le.hasPropFunc=le.reportMissingProp=le.checkMissingProp=le.checkReportMissingProp=void 0;var he=Y(),Jl=te(),Wt=et(),k1=te();function E1(t,e){let{gen:r,data:n,it:i}=t;r.if(Xl(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,he._)`${e}`},!0),t.error()})}le.checkReportMissingProp=E1;function P1({gen:t,data:e,it:{opts:r}},n,i){return(0,he.or)(...n.map(o=>(0,he.and)(Xl(t,e,o,r.ownProperties),(0,he._)`${i} = ${o}`)))}le.checkMissingProp=P1;function C1(t,e){t.setParams({missingProperty:e},!0),t.error()}le.reportMissingProp=C1;function Zh(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,he._)`Object.prototype.hasOwnProperty`})}le.hasPropFunc=Zh;function Yl(t,e,r){return(0,he._)`${Zh(t)}.call(${e}, ${r})`}le.isOwnProperty=Yl;function I1(t,e,r,n){let i=(0,he._)`${e}${(0,he.getProperty)(r)} !== undefined`;return n?(0,he._)`${i} && ${Yl(t,e,r)}`:i}le.propertyInData=I1;function Xl(t,e,r,n){let i=(0,he._)`${e}${(0,he.getProperty)(r)} === undefined`;return n?(0,he.or)(i,(0,he.not)(Yl(t,e,r))):i}le.noPropertyInData=Xl;function em(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}le.allSchemaProperties=em;function R1(t,e){return em(e).filter(r=>!(0,Jl.alwaysValidSchema)(t,e[r]))}le.schemaProperties=R1;function N1({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:s},a,u,c){let p=c?(0,he._)`${t}, ${e}, ${n}${i}`:e,f=[[Wt.default.instancePath,(0,he.strConcat)(Wt.default.instancePath,o)],[Wt.default.parentData,s.parentData],[Wt.default.parentDataProperty,s.parentDataProperty],[Wt.default.rootData,Wt.default.rootData]];s.opts.dynamicRef&&f.push([Wt.default.dynamicAnchors,Wt.default.dynamicAnchors]);let d=(0,he._)`${p}, ${r.object(...f)}`;return u!==he.nil?(0,he._)`${a}.call(${u}, ${d})`:(0,he._)`${a}(${d})`}le.callValidateCode=N1;var T1=(0,he._)`new RegExp`;function A1({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:i}=e.code,o=i(r,n);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,he._)`${i.code==="new RegExp"?T1:(0,k1.useFunc)(t,i)}(${r}, ${n})`})}le.usePattern=A1;function O1(t){let{gen:e,data:r,keyword:n,it:i}=t,o=e.name("valid");if(i.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(o,!0),s(()=>e.break()),o;function s(a){let u=e.const("len",(0,he._)`${r}.length`);e.forRange("i",0,u,c=>{t.subschema({keyword:n,dataProp:c,dataPropType:Jl.Type.Num},o),e.if((0,he.not)(o),a)})}}le.validateArray=O1;function M1(t){let{gen:e,schema:r,keyword:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(u=>(0,Jl.alwaysValidSchema)(i,u))&&!i.opts.unevaluated)return;let s=e.let("valid",!1),a=e.name("_valid");e.block(()=>r.forEach((u,c)=>{let p=t.subschema({keyword:n,schemaProp:c,compositeRule:!0},a);e.assign(s,(0,he._)`${s} || ${a}`),t.mergeValidEvaluated(p,a)||e.if((0,he.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}le.validateUnion=M1});var nm=$(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.validateKeywordUsage=vt.validSchemaType=vt.funcKeywordCode=vt.macroKeywordCode=void 0;var De=Y(),mr=et(),L1=tt(),j1=ni();function V1(t,e){let{gen:r,keyword:n,schema:i,parentSchema:o,it:s}=t,a=e.macro.call(s.self,i,o,s),u=rm(r,n,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let c=r.name("valid");t.subschema({schema:a,schemaPath:De.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:u,compositeRule:!0},c),t.pass(c,()=>t.error(!0))}vt.macroKeywordCode=V1;function D1(t,e){var r;let{gen:n,keyword:i,schema:o,parentSchema:s,$data:a,it:u}=t;F1(u,e);let c=!a&&e.compile?e.compile.call(u.self,o,s,u):e.validate,p=rm(n,i,c),f=n.let("valid");t.block$data(f,d),t.ok((r=e.valid)!==null&&r!==void 0?r:f);function d(){if(e.errors===!1)y(),e.modifying&&tm(t),_(()=>t.error());else{let b=e.async?m():g();e.modifying&&tm(t),_(()=>q1(t,b))}}function m(){let b=n.let("ruleErrs",null);return n.try(()=>y((0,De._)`await `),L=>n.assign(f,!1).if((0,De._)`${L} instanceof ${u.ValidationError}`,()=>n.assign(b,(0,De._)`${L}.errors`),()=>n.throw(L))),b}function g(){let b=(0,De._)`${p}.errors`;return n.assign(b,null),y(De.nil),b}function y(b=e.async?(0,De._)`await `:De.nil){let L=u.opts.passContext?mr.default.this:mr.default.self,q=!("compile"in e&&!a||e.schema===!1);n.assign(f,(0,De._)`${b}${(0,L1.callValidateCode)(t,p,L,q)}`,e.modifying)}function _(b){var L;n.if((0,De.not)((L=e.valid)!==null&&L!==void 0?L:f),b)}}vt.funcKeywordCode=D1;function tm(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,De._)`${n.parentData}[${n.parentDataProperty}]`))}function q1(t,e){let{gen:r}=t;r.if((0,De._)`Array.isArray(${e})`,()=>{r.assign(mr.default.vErrors,(0,De._)`${mr.default.vErrors} === null ? ${e} : ${mr.default.vErrors}.concat(${e})`).assign(mr.default.errors,(0,De._)`${mr.default.vErrors}.length`),(0,j1.extendErrors)(t)},()=>t.error())}function F1({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function rm(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,De.stringify)(r)})}function B1(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}vt.validSchemaType=B1;function H1({schema:t,opts:e,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");let s=i.dependencies;if(s?.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[o])){let u=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(u);else throw new Error(u)}}vt.validateKeywordUsage=H1});var om=$(Gt=>{"use strict";Object.defineProperty(Gt,"__esModule",{value:!0});Gt.extendSubschemaMode=Gt.extendSubschemaData=Gt.getSubschema=void 0;var wt=Y(),im=te();function U1(t,{keyword:e,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:s}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let a=t.schema[e];return r===void 0?{schema:a,schemaPath:(0,wt._)`${t.schemaPath}${(0,wt.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[r],schemaPath:(0,wt._)`${t.schemaPath}${(0,wt.getProperty)(e)}${(0,wt.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,im.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||o===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:s,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}Gt.getSubschema=U1;function z1(t,e,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:s}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(r!==void 0){let{errorPath:c,dataPathArr:p,opts:f}=e,d=a.let("data",(0,wt._)`${e.data}${(0,wt.getProperty)(r)}`,!0);u(d),t.errorPath=(0,wt.str)`${c}${(0,im.getErrorPath)(r,n,f.jsPropertySyntax)}`,t.parentDataProperty=(0,wt._)`${r}`,t.dataPathArr=[...p,t.parentDataProperty]}if(i!==void 0){let c=i instanceof wt.Name?i:a.let("data",i,!0);u(c),s!==void 0&&(t.propertyName=s)}o&&(t.dataTypes=o);function u(c){t.data=c,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,c]}}Gt.extendSubschemaData=z1;function W1(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(t.compositeRule=n),i!==void 0&&(t.createErrors=i),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=r}Gt.extendSubschemaMode=W1});var Ql=$((_N,sm)=>{"use strict";sm.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var s=o[i];if(!t(e[s],r[s]))return!1}return!0}return e!==e&&r!==r}});var lm=$((bN,am)=>{"use strict";var Kt=am.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};Zo(e,n,i,t,"",t)};Kt.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Kt.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Kt.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Kt.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 Zo(t,e,r,n,i,o,s,a,u,c){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,o,s,a,u,c);for(var p in n){var f=n[p];if(Array.isArray(f)){if(p in Kt.arrayKeywords)for(var d=0;d<f.length;d++)Zo(t,e,r,f[d],i+"/"+p+"/"+d,o,i,p,n,d)}else if(p in Kt.propsKeywords){if(f&&typeof f=="object")for(var m in f)Zo(t,e,r,f[m],i+"/"+p+"/"+G1(m),o,i,p,n,m)}else(p in Kt.keywords||t.allKeys&&!(p in Kt.skipKeywords))&&Zo(t,e,r,f,i+"/"+p,o,i,p,n)}r(n,i,o,s,a,u,c)}}function G1(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var oi=$(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.getSchemaRefs=He.resolveUrl=He.normalizeId=He._getFullPath=He.getFullPath=He.inlineRef=void 0;var K1=te(),J1=Ql(),Y1=lm(),X1=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Q1(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Zl(t):e?cm(t)<=e:!1}He.inlineRef=Q1;var Z1=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Zl(t){for(let e in t){if(Z1.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(Zl)||typeof r=="object"&&Zl(r))return!0}return!1}function cm(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!X1.has(r)&&(typeof t[r]=="object"&&(0,K1.eachItem)(t[r],n=>e+=cm(n)),e===1/0))return 1/0}return e}function um(t,e="",r){r!==!1&&(e=rn(e));let n=t.parse(e);return fm(t,n)}He.getFullPath=um;function fm(t,e){return t.serialize(e).split("#")[0]+"#"}He._getFullPath=fm;var eS=/#\/?$/;function rn(t){return t?t.replace(eS,""):""}He.normalizeId=rn;function tS(t,e,r){return r=rn(r),t.resolve(e,r)}He.resolveUrl=tS;var rS=/^[a-z_][-a-z0-9._]*$/i;function nS(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=rn(t[r]||e),o={"":i},s=um(n,i,!1),a={},u=new Set;return Y1(t,{allKeys:!0},(f,d,m,g)=>{if(g===void 0)return;let y=s+d,_=o[g];typeof f[r]=="string"&&(_=b.call(this,f[r])),L.call(this,f.$anchor),L.call(this,f.$dynamicAnchor),o[d]=_;function b(q){let A=this.opts.uriResolver.resolve;if(q=rn(_?A(_,q):q),u.has(q))throw p(q);u.add(q);let T=this.refs[q];return typeof T=="string"&&(T=this.refs[T]),typeof T=="object"?c(f,T.schema,q):q!==rn(y)&&(q[0]==="#"?(c(f,a[q],q),a[q]=f):this.refs[q]=y),q}function L(q){if(typeof q=="string"){if(!rS.test(q))throw new Error(`invalid anchor "${q}"`);b.call(this,`#${q}`)}}}),a;function c(f,d,m){if(d!==void 0&&!J1(f,d))throw p(m)}function p(f){return new Error(`reference "${f}" resolves to more than one schema`)}}He.getSchemaRefs=nS});var li=$(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.getData=Jt.KeywordCxt=Jt.validateFunctionCode=void 0;var gm=zh(),pm=ii(),tc=zl(),es=ii(),iS=Qh(),ai=nm(),ec=om(),H=Y(),K=et(),oS=oi(),Vt=te(),si=ni();function sS(t){if(wm(t)&&(_m(t),vm(t))){cS(t);return}ym(t,()=>(0,gm.topBoolOrEmptySchema)(t))}Jt.validateFunctionCode=sS;function ym({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},o){i.code.es5?t.func(e,(0,H._)`${K.default.data}, ${K.default.valCxt}`,n.$async,()=>{t.code((0,H._)`"use strict"; ${dm(r,i)}`),lS(t,i),t.code(o)}):t.func(e,(0,H._)`${K.default.data}, ${aS(i)}`,n.$async,()=>t.code(dm(r,i)).code(o))}function aS(t){return(0,H._)`{${K.default.instancePath}="", ${K.default.parentData}, ${K.default.parentDataProperty}, ${K.default.rootData}=${K.default.data}${t.dynamicRef?(0,H._)`, ${K.default.dynamicAnchors}={}`:H.nil}}={}`}function lS(t,e){t.if(K.default.valCxt,()=>{t.var(K.default.instancePath,(0,H._)`${K.default.valCxt}.${K.default.instancePath}`),t.var(K.default.parentData,(0,H._)`${K.default.valCxt}.${K.default.parentData}`),t.var(K.default.parentDataProperty,(0,H._)`${K.default.valCxt}.${K.default.parentDataProperty}`),t.var(K.default.rootData,(0,H._)`${K.default.valCxt}.${K.default.rootData}`),e.dynamicRef&&t.var(K.default.dynamicAnchors,(0,H._)`${K.default.valCxt}.${K.default.dynamicAnchors}`)},()=>{t.var(K.default.instancePath,(0,H._)`""`),t.var(K.default.parentData,(0,H._)`undefined`),t.var(K.default.parentDataProperty,(0,H._)`undefined`),t.var(K.default.rootData,K.default.data),e.dynamicRef&&t.var(K.default.dynamicAnchors,(0,H._)`{}`)})}function cS(t){let{schema:e,opts:r,gen:n}=t;ym(t,()=>{r.$comment&&e.$comment&&Sm(t),hS(t),n.let(K.default.vErrors,null),n.let(K.default.errors,0),r.unevaluated&&uS(t),bm(t),yS(t)})}function uS(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,H._)`${r}.evaluated`),e.if((0,H._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,H._)`${t.evaluated}.props`,(0,H._)`undefined`)),e.if((0,H._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,H._)`${t.evaluated}.items`,(0,H._)`undefined`))}function dm(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,H._)`/*# sourceURL=${r} */`:H.nil}function fS(t,e){if(wm(t)&&(_m(t),vm(t))){pS(t,e);return}(0,gm.boolOrEmptySchema)(t,e)}function vm({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function wm(t){return typeof t.schema!="boolean"}function pS(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&Sm(t),mS(t),gS(t);let o=n.const("_errs",K.default.errors);bm(t,o),n.var(e,(0,H._)`${o} === ${K.default.errors}`)}function _m(t){(0,Vt.checkUnknownRules)(t),dS(t)}function bm(t,e){if(t.opts.jtd)return hm(t,[],!1,e);let r=(0,pm.getSchemaTypes)(t.schema),n=(0,pm.coerceAndCheckDataType)(t,r);hm(t,r,!n,e)}function dS(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Vt.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function hS(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Vt.checkStrictMode)(t,"default is ignored in the schema root")}function mS(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,oS.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function gS(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Sm({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)t.code((0,H._)`${K.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let s=(0,H.str)`${n}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,H._)`${K.default.self}.opts.$comment(${o}, ${s}, ${a}.schema)`)}}function yS(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=t;r.$async?e.if((0,H._)`${K.default.errors} === 0`,()=>e.return(K.default.data),()=>e.throw((0,H._)`new ${i}(${K.default.vErrors})`)):(e.assign((0,H._)`${n}.errors`,K.default.vErrors),o.unevaluated&&vS(t),e.return((0,H._)`${K.default.errors} === 0`))}function vS({gen:t,evaluated:e,props:r,items:n}){r instanceof H.Name&&t.assign((0,H._)`${e}.props`,r),n instanceof H.Name&&t.assign((0,H._)`${e}.items`,n)}function hm(t,e,r,n){let{gen:i,schema:o,data:s,allErrors:a,opts:u,self:c}=t,{RULES:p}=c;if(o.$ref&&(u.ignoreKeywordsWithRef||!(0,Vt.schemaHasRulesButRef)(o,p))){i.block(()=>xm(t,"$ref",p.all.$ref.definition));return}u.jtd||wS(t,e),i.block(()=>{for(let d of p.rules)f(d);f(p.post)});function f(d){(0,tc.shouldUseGroup)(o,d)&&(d.type?(i.if((0,es.checkDataType)(d.type,s,u.strictNumbers)),mm(t,d),e.length===1&&e[0]===d.type&&r&&(i.else(),(0,es.reportTypeError)(t)),i.endIf()):mm(t,d),a||i.if((0,H._)`${K.default.errors} === ${n||0}`))}}function mm(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,iS.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0,tc.shouldUseRule)(n,o)&&xm(t,o.keyword,o.definition,e.type)})}function wS(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(_S(t,e),t.opts.allowUnionTypes||bS(t,e),SS(t,t.dataTypes))}function _S(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{$m(t.dataTypes,r)||rc(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),xS(t,e)}}function bS(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&rc(t,"use allowUnionTypes to allow union type keyword")}function SS(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,tc.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(s=>$S(e,s))&&rc(t,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function $S(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function $m(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function xS(t,e){let r=[];for(let n of t.dataTypes)$m(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function rc(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Vt.checkStrictMode)(t,e,t.opts.strictTypes)}var ts=class{constructor(e,r,n){if((0,ai.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Vt.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",km(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,ai.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",K.default.errors))}result(e,r,n){this.failResult((0,H.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,H.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,H._)`${r} !== undefined && (${(0,H.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?si.reportExtraError:si.reportError)(this,this.def.error,r)}$dataError(){(0,si.reportError)(this,this.def.$dataError||si.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,si.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=H.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=H.nil,r=H.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:s}=this;n.if((0,H.or)((0,H._)`${i} === undefined`,r)),e!==H.nil&&n.assign(e,!0),(o.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==H.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,H.or)(s(),a());function s(){if(n.length){if(!(r instanceof H.Name))throw new Error("ajv implementation error");let u=Array.isArray(n)?n:[n];return(0,H._)`${(0,es.checkDataTypes)(u,r,o.opts.strictNumbers,es.DataType.Wrong)}`}return H.nil}function a(){if(i.validateSchema){let u=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,H._)`!${u}(${r})`}return H.nil}}subschema(e,r){let n=(0,ec.getSubschema)(this.it,e);(0,ec.extendSubschemaData)(n,this.it,e),(0,ec.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return fS(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Vt.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Vt.mergeEvaluated.items(i,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(e,H.Name)),!0}};Jt.KeywordCxt=ts;function xm(t,e,r,n){let i=new ts(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,ai.funcKeywordCode)(i,r):"macro"in r?(0,ai.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,ai.funcKeywordCode)(i,r)}var kS=/^\/(?:[^~]|~0|~1)*$/,ES=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function km(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,o;if(t==="")return K.default.rootData;if(t[0]==="/"){if(!kS.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=K.default.rootData}else{let c=ES.exec(t);if(!c)throw new Error(`Invalid JSON-pointer: ${t}`);let p=+c[1];if(i=c[2],i==="#"){if(p>=e)throw new Error(u("property/index",p));return n[e-p]}if(p>e)throw new Error(u("data",p));if(o=r[e-p],!i)return o}let s=o,a=i.split("/");for(let c of a)c&&(o=(0,H._)`${o}${(0,H.getProperty)((0,Vt.unescapeJsonPointer)(c))}`,s=(0,H._)`${s} && ${o}`);return s;function u(c,p){return`Cannot access ${c} ${p} levels up, current level is ${e}`}}Jt.getData=km});var rs=$(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var nc=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};ic.default=nc});var ci=$(ac=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});var oc=oi(),sc=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,oc.resolveUrl)(e,r,n),this.missingSchema=(0,oc.normalizeId)((0,oc.getFullPath)(e,this.missingRef))}};ac.default=sc});var ui=$(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.resolveSchema=rt.getCompilingSchema=rt.resolveRef=rt.compileSchema=rt.SchemaEnv=void 0;var ft=Y(),PS=rs(),gr=et(),pt=oi(),Em=te(),CS=li(),nn=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,pt.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};rt.SchemaEnv=nn;function cc(t){let e=Pm.call(this,t);if(e)return e;let r=(0,pt.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,s=new ft.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),a;t.$async&&(a=s.scopeValue("Error",{ref:PS.default,code:(0,ft._)`require("ajv/dist/runtime/validation_error").default`}));let u=s.scopeName("validate");t.validateName=u;let c={gen:s,allErrors:this.opts.allErrors,data:gr.default.data,parentData:gr.default.parentData,parentDataProperty:gr.default.parentDataProperty,dataNames:[gr.default.data],dataPathArr:[ft.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,ft.stringify)(t.schema)}:{ref:t.schema}),validateName:u,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:ft.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,ft._)`""`,opts:this.opts,self:this},p;try{this._compilations.add(t),(0,CS.validateFunctionCode)(c),s.optimize(this.opts.code.optimize);let f=s.toString();p=`${s.scopeRefs(gr.default.scope)}return ${f}`,this.opts.code.process&&(p=this.opts.code.process(p,t));let m=new Function(`${gr.default.self}`,`${gr.default.scope}`,p)(this,this.scope.get());if(this.scope.value(u,{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:u,validateCode:f,scopeValues:s._values}),this.opts.unevaluated){let{props:g,items:y}=c;m.evaluated={props:g instanceof ft.Name?void 0:g,items:y instanceof ft.Name?void 0:y,dynamicProps:g instanceof ft.Name,dynamicItems:y instanceof ft.Name},m.source&&(m.source.evaluated=(0,ft.stringify)(m.evaluated))}return t.validate=m,t}catch(f){throw delete t.validate,delete t.validateName,p&&this.logger.error("Error compiling schema, function code:",p),f}finally{this._compilations.delete(t)}}rt.compileSchema=cc;function IS(t,e,r){var n;r=(0,pt.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let o=TS.call(this,t,r);if(o===void 0){let s=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;s&&(o=new nn({schema:s,schemaId:a,root:t,baseId:e}))}if(o!==void 0)return t.refs[r]=RS.call(this,o)}rt.resolveRef=IS;function RS(t){return(0,pt.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:cc.call(this,t)}function Pm(t){for(let e of this._compilations)if(NS(e,t))return e}rt.getCompilingSchema=Pm;function NS(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function TS(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||ns.call(this,t,e)}function ns(t,e){let r=this.opts.uriResolver.parse(e),n=(0,pt._getFullPath)(this.opts.uriResolver,r),i=(0,pt.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return lc.call(this,r,t);let o=(0,pt.normalizeId)(n),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){let a=ns.call(this,t,s);return typeof a?.schema!="object"?void 0:lc.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||cc.call(this,s),o===(0,pt.normalizeId)(e)){let{schema:a}=s,{schemaId:u}=this.opts,c=a[u];return c&&(i=(0,pt.resolveUrl)(this.opts.uriResolver,i,c)),new nn({schema:a,schemaId:u,root:t,baseId:i})}return lc.call(this,r,s)}}rt.resolveSchema=ns;var AS=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function lc(t,{baseId:e,schema:r,root:n}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let u=r[(0,Em.unescapeFragment)(a)];if(u===void 0)return;r=u;let c=typeof r=="object"&&r[this.opts.schemaId];!AS.has(a)&&c&&(e=(0,pt.resolveUrl)(this.opts.uriResolver,e,c))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,Em.schemaHasRulesButRef)(r,this.RULES)){let a=(0,pt.resolveUrl)(this.opts.uriResolver,e,r.$ref);o=ns.call(this,n,a)}let{schemaId:s}=this.opts;if(o=o||new nn({schema:r,schemaId:s,root:n,baseId:e}),o.schema!==o.root.schema)return o}});var Cm=$((PN,OS)=>{OS.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 pc=$((CN,Om)=>{"use strict";var MS=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Rm=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),uc=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Nm=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),LS=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function fc(t){let e="",r=0,n=0;for(n=0;n<t.length;n++)if(r=t[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n];break}for(n+=1;n<t.length;n++){if(r=t[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n]}return e}var jS=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Im(t){return t.length=0,!0}function VS(t,e,r){if(t.length){let n=fc(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function DS(t){let e=0,r={error:!1,address:"",zone:""},n=[],i=[],o=!1,s=!1,a=VS;for(let u=0;u<t.length;u++){let c=t[u];if(!(c==="["||c==="]"))if(c===":"){if(o===!0&&(s=!0),!a(i,n,r))break;if(++e>7){r.error=!0;break}u>0&&t[u-1]===":"&&(o=!0),n.push(":");continue}else if(c==="%"){if(!a(i,n,r))break;a=Im}else{i.push(c);continue}}return i.length&&(a===Im?r.zone=i.join(""):s?n.push(i.join("")):n.push(fc(i))),r.address=n.join(""),r}function Tm(t){if(qS(t,":")<2)return{host:t,isIPV6:!1};let e=DS(t);if(e.error)return{host:t,isIPV6:!1};{let r=e.address,n=e.address;return e.zone&&(r+="%"+e.zone,n+="%25"+e.zone),{host:r,isIPV6:!0,escapedHost:n}}}function qS(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function FS(t){let e=t,r=[],n=-1,i=0;for(;i=e.length;){if(i===1){if(e===".")break;if(e==="/"){r.push("/");break}else{r.push(e);break}}else if(i===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){r.push("/");break}}else if(i===3&&e==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),r.length!==0&&r.pop();continue}}if((n=e.indexOf("/",1))===-1){r.push(e);break}else r.push(e.slice(0,n)),e=e.slice(n)}return r.join("")}var BS={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},HS=/[@/?#:]/g,US=/[@/?#]/g;function Am(t,e){let r=e?US:HS;return r.lastIndex=0,t.replace(r,n=>BS[n])}function zS(t,e=!1){if(t.indexOf("%")===-1)return t;let r="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){let i=t.slice(n+1,n+3);if(uc(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));e&&Nm(s)?r+=s:r+="%"+o,n+=2;continue}}r+=t[n]}return r}function WS(t){let e="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let n=t.slice(r+1,r+3);if(uc(n)){let i=n.toUpperCase(),o=String.fromCharCode(parseInt(i,16));o!=="."&&Nm(o)?e+=o:e+="%"+i,r+=2;continue}}LS(t[r])?e+=t[r]:e+=escape(t[r])}return e}function GS(t){let e="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let n=t.slice(r+1,r+3);if(uc(n)){e+="%"+n.toUpperCase(),r+=2;continue}}e+=escape(t[r])}return e}function KS(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!Rm(r)){let n=Tm(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=Am(r,!1)}e.push(r)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}Om.exports={nonSimpleDomain:jS,recomposeAuthority:KS,reescapeHostDelimiters:Am,normalizePercentEncoding:zS,normalizePathEncoding:WS,escapePreservingEscapes:GS,removeDotSegments:FS,isIPv4:Rm,isUUID:MS,normalizeIPv6:Tm,stringArrayToHexStripped:fc}});var Dm=$((IN,Vm)=>{"use strict";var{isUUID:JS}=pc(),YS=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,XS=["http","https","ws","wss","urn","urn:uuid"];function QS(t){return XS.indexOf(t)!==-1}function dc(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 Mm(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function Lm(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 ZS(t){return t.secure=dc(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function e$(t){if((t.port===(dc(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}function t$(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(YS);if(r){let n=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let i=`${n}:${e.nid||t.nid}`,o=hc(i);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function r$(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=e.scheme||t.scheme||"urn",n=t.nid.toLowerCase(),i=`${r}:${e.nid||n}`,o=hc(i);o&&(t=o.serialize(t,e));let s=t,a=t.nss;return s.path=`${n||e.nid}:${a}`,e.skipEscape=!0,s}function n$(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!JS(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function i$(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var jm={scheme:"http",domainHost:!0,parse:Mm,serialize:Lm},o$={scheme:"https",domainHost:jm.domainHost,parse:Mm,serialize:Lm},is={scheme:"ws",domainHost:!0,parse:ZS,serialize:e$},s$={scheme:"wss",domainHost:is.domainHost,parse:is.parse,serialize:is.serialize},a$={scheme:"urn",parse:t$,serialize:r$,skipNormalize:!0},l$={scheme:"urn:uuid",parse:n$,serialize:i$,skipNormalize:!0},os={http:jm,https:o$,ws:is,wss:s$,urn:a$,"urn:uuid":l$};Object.setPrototypeOf(os,null);function hc(t){return t&&(os[t]||os[t.toLowerCase()])||void 0}Vm.exports={wsIsSecure:dc,SCHEMES:os,isValidSchemeName:QS,getSchemeHandler:hc}});var zm=$((RN,ss)=>{"use strict";var{normalizeIPv6:c$,removeDotSegments:fi,recomposeAuthority:u$,normalizePercentEncoding:f$,normalizePathEncoding:p$,escapePreservingEscapes:d$,reescapeHostDelimiters:h$,isIPv4:m$,nonSimpleDomain:g$}=pc(),{SCHEMES:y$,getSchemeHandler:Fm}=Dm();function v$(t,e){return typeof t=="string"?t=$$(t,e):typeof t=="object"&&(t=on(yr(t,e),e)),t}function w$(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=Bm(on(t,n),on(e,n),n,!0);return n.skipEscape=!0,yr(i,n)}function Bm(t,e,r,n){let i={};return n||(t=on(yr(t,r),r),e=on(yr(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(i.scheme=e.scheme,i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=fi(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=fi(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=fi(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=fi(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 _$(t,e,r){let n=qm(t,r),i=qm(e,r);return n!==void 0&&i!==void 0&&n.toLowerCase()===i.toLowerCase()}function yr(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},n=Object.assign({},e),i=[],o=Fm(n.scheme||r.scheme);o&&o.serialize&&o.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=f$(r.path):(r.path=d$(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let s=u$(r);if(s!==void 0&&(n.reference!=="suffix"&&i.push("//"),i.push(s),r.path&&r.path[0]!=="/"&&i.push("/")),r.path!==void 0){let a=r.path;!n.absolutePath&&(!o||!o.absolutePath)&&(a=fi(a)),s===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),i.push(a)}return r.query!==void 0&&i.push("?",r.query),r.fragment!==void 0&&i.push("#",r.fragment),i.join("")}var b$=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function S$(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 Hm(t,e){let r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1,o=!1;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);let s=t.match(b$);if(s){n.scheme=s[1],n.userinfo=s[3],n.host=s[4],n.port=parseInt(s[5],10),n.path=s[6]||"",n.query=s[7],n.fragment=s[8],isNaN(n.port)&&(n.port=s[5]);let a=S$(n,s);if(a!==void 0&&(n.error=n.error||a,i=!0),n.host)if(m$(n.host)===!1){let p=c$(n.host);n.host=p.host.toLowerCase(),o=p.isIPV6}else o=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let u=Fm(r.scheme||n.scheme);if(!r.unicodeSupport&&(!u||!u.unicodeSupport)&&n.host&&(r.domainHost||u&&u.domainHost)&&o===!1&&g$(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(c){n.error=n.error||"Host's domain name can not be converted to ASCII: "+c}if((!u||u&&!u.skipNormalize)&&(t.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=h$(unescape(n.host),o))),n.path&&(n.path=p$(n.path)),n.fragment))try{n.fragment=encodeURI(decodeURIComponent(n.fragment))}catch{n.error=n.error||"URI malformed"}u&&u.parse&&u.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:i}}function on(t,e){return Hm(t,e).parsed}function $$(t,e){return Um(t,e).normalized}function Um(t,e){let{parsed:r,malformedAuthorityOrPort:n}=Hm(t,e);return{normalized:n?t:yr(r,e),malformedAuthorityOrPort:n}}function qm(t,e){if(typeof t=="string"){let{normalized:r,malformedAuthorityOrPort:n}=Um(t,e);return n?void 0:r}if(typeof t=="object")return yr(t,e)}var mc={SCHEMES:y$,normalize:v$,resolve:w$,resolveComponent:Bm,equal:_$,serialize:yr,parse:on};ss.exports=mc;ss.exports.default=mc;ss.exports.fastUri=mc});var Gm=$(gc=>{"use strict";Object.defineProperty(gc,"__esModule",{value:!0});var Wm=zm();Wm.code='require("ajv/dist/runtime/uri").default';gc.default=Wm});var tg=$(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.CodeGen=Pe.Name=Pe.nil=Pe.stringify=Pe.str=Pe._=Pe.KeywordCxt=void 0;var x$=li();Object.defineProperty(Pe,"KeywordCxt",{enumerable:!0,get:function(){return x$.KeywordCxt}});var sn=Y();Object.defineProperty(Pe,"_",{enumerable:!0,get:function(){return sn._}});Object.defineProperty(Pe,"str",{enumerable:!0,get:function(){return sn.str}});Object.defineProperty(Pe,"stringify",{enumerable:!0,get:function(){return sn.stringify}});Object.defineProperty(Pe,"nil",{enumerable:!0,get:function(){return sn.nil}});Object.defineProperty(Pe,"Name",{enumerable:!0,get:function(){return sn.Name}});Object.defineProperty(Pe,"CodeGen",{enumerable:!0,get:function(){return sn.CodeGen}});var k$=rs(),Qm=ci(),E$=Ul(),pi=ui(),P$=Y(),di=oi(),as=ii(),vc=te(),Km=Cm(),C$=Gm(),Zm=(t,e)=>new RegExp(t,e);Zm.code="new RegExp";var I$=["removeAdditional","useDefaults","coerceTypes"],R$=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),N$={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."},T$={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Jm=200;function A$(t){var e,r,n,i,o,s,a,u,c,p,f,d,m,g,y,_,b,L,q,A,T,M,X,fe,Ie;let $e=t.strict,qe=(e=t.code)===null||e===void 0?void 0:e.optimize,Re=qe===!0||qe===void 0?1:qe||0,it=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:Zm,ot=(i=t.uriResolver)!==null&&i!==void 0?i:C$.default;return{strictSchema:(s=(o=t.strictSchema)!==null&&o!==void 0?o:$e)!==null&&s!==void 0?s:!0,strictNumbers:(u=(a=t.strictNumbers)!==null&&a!==void 0?a:$e)!==null&&u!==void 0?u:!0,strictTypes:(p=(c=t.strictTypes)!==null&&c!==void 0?c:$e)!==null&&p!==void 0?p:"log",strictTuples:(d=(f=t.strictTuples)!==null&&f!==void 0?f:$e)!==null&&d!==void 0?d:"log",strictRequired:(g=(m=t.strictRequired)!==null&&m!==void 0?m:$e)!==null&&g!==void 0?g:!1,code:t.code?{...t.code,optimize:Re,regExp:it}:{optimize:Re,regExp:it},loopRequired:(y=t.loopRequired)!==null&&y!==void 0?y:Jm,loopEnum:(_=t.loopEnum)!==null&&_!==void 0?_:Jm,meta:(b=t.meta)!==null&&b!==void 0?b:!0,messages:(L=t.messages)!==null&&L!==void 0?L:!0,inlineRefs:(q=t.inlineRefs)!==null&&q!==void 0?q:!0,schemaId:(A=t.schemaId)!==null&&A!==void 0?A:"$id",addUsedSchema:(T=t.addUsedSchema)!==null&&T!==void 0?T:!0,validateSchema:(M=t.validateSchema)!==null&&M!==void 0?M:!0,validateFormats:(X=t.validateFormats)!==null&&X!==void 0?X:!0,unicodeRegExp:(fe=t.unicodeRegExp)!==null&&fe!==void 0?fe:!0,int32range:(Ie=t.int32range)!==null&&Ie!==void 0?Ie:!0,uriResolver:ot}}var hi=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,...A$(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new P$.ValueScope({scope:{},prefixes:R$,es5:r,lines:n}),this.logger=D$(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,E$.getRules)(),Ym.call(this,N$,e,"NOT SUPPORTED"),Ym.call(this,T$,e,"DEPRECATED","warn"),this._metaOpts=j$.call(this),e.formats&&M$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&L$.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),O$.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=Km;n==="id"&&(i={...Km},i.id=i.$id,delete i.$id),r&&e&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,e,r);async function i(p,f){await o.call(this,p.$schema);let d=this._addSchema(p,f);return d.validate||s.call(this,d)}async function o(p){p&&!this.getSchema(p)&&await i.call(this,{$ref:p},!0)}async function s(p){try{return this._compileSchemaEnv(p)}catch(f){if(!(f instanceof Qm.default))throw f;return a.call(this,f),await u.call(this,f.missingSchema),s.call(this,p)}}function a({missingSchema:p,missingRef:f}){if(this.refs[p])throw new Error(`AnySchema ${p} is loaded but ${f} cannot be resolved`)}async function u(p){let f=await c.call(this,p);this.refs[p]||await o.call(this,f.$schema),this.refs[p]||this.addSchema(f,p,r)}async function c(p){let f=this._loading[p];if(f)return f;try{return await(this._loading[p]=n(p))}finally{delete this._loading[p]}}}addSchema(e,r,n,i=this.opts.validateSchema){if(Array.isArray(e)){for(let s of e)this.addSchema(s,void 0,n,i);return this}let o;if(typeof e=="object"){let{schemaId:s}=this.opts;if(o=e[s],o!==void 0&&typeof o!="string")throw new Error(`schema ${s} must be string`)}return r=(0,di.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,i,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,e);if(!i&&r){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return i}getSchema(e){let r;for(;typeof(r=Xm.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new pi.SchemaEnv({schema:{},schemaId:n});if(r=pi.resolveSchema.call(this,i,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=Xm.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,di.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(F$.call(this,n,r),!r)return(0,vc.eachItem)(n,o=>yc.call(this,o)),this;H$.call(this,r);let i={...r,type:(0,as.getJSONTypes)(r.type),schemaType:(0,as.getJSONTypes)(r.schemaType)};return(0,vc.eachItem)(n,i.type.length===0?o=>yc.call(this,o,i):o=>i.type.forEach(s=>yc.call(this,o,i,s))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===e);i>=0&&n.rules.splice(i,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of r){let o=i.split("/").slice(1),s=e;for(let a of o)s=s[a];for(let a in n){let u=n[a];if(typeof u!="object")continue;let{$data:c}=u.definition,p=s[a];c&&p&&(s[a]=eg(p))}}return e}_removeAllSchemas(e,r){for(let n in e){let i=e[n];(!r||r.test(n))&&(typeof i=="string"?delete e[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[n]))}}_addSchema(e,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof e=="object")s=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let u=this._cache.get(e);if(u!==void 0)return u;n=(0,di.normalizeId)(s||n);let c=di.getSchemaRefs.call(this,e,n);return u=new pi.SchemaEnv({schema:e,schemaId:a,meta:r,baseId:n,localRefs:c}),this._cache.set(u.schema,u),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=u),i&&this.validateSchema(e,!0),u}_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):pi.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{pi.compileSchema.call(this,e)}finally{this.opts=r}}};hi.ValidationError=k$.default;hi.MissingRefError=Qm.default;Pe.default=hi;function Ym(t,e,r,n="error"){for(let i in t){let o=i;o in e&&this.logger[n](`${r}: option ${i}. ${t[o]}`)}}function Xm(t){return t=(0,di.normalizeId)(t),this.schemas[t]||this.refs[t]}function O$(){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 M$(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function L$(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function j$(){let t={...this.opts};for(let e of I$)delete t[e];return t}var V$={log(){},warn(){},error(){}};function D$(t){if(t===!1)return V$;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 q$=/^[a-z_$][a-z0-9_$:-]*$/i;function F$(t,e){let{RULES:r}=this;if((0,vc.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!q$.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function yc(t,e,r){var n;let i=e?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,s=i?o.post:o.rules.find(({type:u})=>u===r);if(s||(s={type:r,rules:[]},o.rules.push(s)),o.keywords[t]=!0,!e)return;let a={keyword:t,definition:{...e,type:(0,as.getJSONTypes)(e.type),schemaType:(0,as.getJSONTypes)(e.schemaType)}};e.before?B$.call(this,s,a,e.before):s.rules.push(a),o.all[t]=a,(n=e.implements)===null||n===void 0||n.forEach(u=>this.addKeyword(u))}function B$(t,e,r){let n=t.rules.findIndex(i=>i.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function H$(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=eg(e)),t.validateSchema=this.compile(e,!0))}var U$={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function eg(t){return{anyOf:[t,U$]}}});var rg=$(wc=>{"use strict";Object.defineProperty(wc,"__esModule",{value:!0});var z$={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};wc.default=z$});var us=$(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.callRef=vr.getValidate=void 0;var W$=ci(),ng=tt(),Ue=Y(),an=et(),ig=ui(),ls=te(),G$={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:o,validateName:s,opts:a,self:u}=n,{root:c}=o;if((r==="#"||r==="#/")&&i===c.baseId)return f();let p=ig.resolveRef.call(u,c,i,r);if(p===void 0)throw new W$.default(n.opts.uriResolver,i,r);if(p instanceof ig.SchemaEnv)return d(p);return m(p);function f(){if(o===c)return cs(t,s,o,o.$async);let g=e.scopeValue("root",{ref:c});return cs(t,(0,Ue._)`${g}.validate`,c,c.$async)}function d(g){let y=og(t,g);cs(t,y,g,g.$async)}function m(g){let y=e.scopeValue("schema",a.code.source===!0?{ref:g,code:(0,Ue.stringify)(g)}:{ref:g}),_=e.name("valid"),b=t.subschema({schema:g,dataTypes:[],schemaPath:Ue.nil,topSchemaRef:y,errSchemaPath:r},_);t.mergeEvaluated(b),t.ok(_)}}};function og(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,Ue._)`${r.scopeValue("wrapper",{ref:e})}.validate`}vr.getValidate=og;function cs(t,e,r,n){let{gen:i,it:o}=t,{allErrors:s,schemaEnv:a,opts:u}=o,c=u.passContext?an.default.this:Ue.nil;n?p():f();function p(){if(!a.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,Ue._)`await ${(0,ng.callValidateCode)(t,e,c)}`),m(e),s||i.assign(g,!0)},y=>{i.if((0,Ue._)`!(${y} instanceof ${o.ValidationError})`,()=>i.throw(y)),d(y),s||i.assign(g,!1)}),t.ok(g)}function f(){t.result((0,ng.callValidateCode)(t,e,c),()=>m(e),()=>d(e))}function d(g){let y=(0,Ue._)`${g}.errors`;i.assign(an.default.vErrors,(0,Ue._)`${an.default.vErrors} === null ? ${y} : ${an.default.vErrors}.concat(${y})`),i.assign(an.default.errors,(0,Ue._)`${an.default.vErrors}.length`)}function m(g){var y;if(!o.opts.unevaluated)return;let _=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(o.props=ls.mergeEvaluated.props(i,_.props,o.props));else{let b=i.var("props",(0,Ue._)`${g}.evaluated.props`);o.props=ls.mergeEvaluated.props(i,b,o.props,Ue.Name)}if(o.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(o.items=ls.mergeEvaluated.items(i,_.items,o.items));else{let b=i.var("items",(0,Ue._)`${g}.evaluated.items`);o.items=ls.mergeEvaluated.items(i,b,o.items,Ue.Name)}}}vr.callRef=cs;vr.default=G$});var sg=$(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});var K$=rg(),J$=us(),Y$=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",K$.default,J$.default];_c.default=Y$});var ag=$(bc=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});var fs=Y(),Yt=fs.operators,ps={maximum:{okStr:"<=",ok:Yt.LTE,fail:Yt.GT},minimum:{okStr:">=",ok:Yt.GTE,fail:Yt.LT},exclusiveMaximum:{okStr:"<",ok:Yt.LT,fail:Yt.GTE},exclusiveMinimum:{okStr:">",ok:Yt.GT,fail:Yt.LTE}},X$={message:({keyword:t,schemaCode:e})=>(0,fs.str)`must be ${ps[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,fs._)`{comparison: ${ps[t].okStr}, limit: ${e}}`},Q$={keyword:Object.keys(ps),type:"number",schemaType:"number",$data:!0,error:X$,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,fs._)`${r} ${ps[e].fail} ${n} || isNaN(${r})`)}};bc.default=Q$});var lg=$(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});var mi=Y(),Z$={message:({schemaCode:t})=>(0,mi.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,mi._)`{multipleOf: ${t}}`},ex={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Z$,code(t){let{gen:e,data:r,schemaCode:n,it:i}=t,o=i.opts.multipleOfPrecision,s=e.let("res"),a=o?(0,mi._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,mi._)`${s} !== parseInt(${s})`;t.fail$data((0,mi._)`(${n} === 0 || (${s} = ${r}/${n}, ${a}))`)}};Sc.default=ex});var ug=$($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});function cg(t){let e=t.length,r=0,n=0,i;for(;n<e;)r++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<e&&(i=t.charCodeAt(n),(i&64512)===56320&&n++);return r}$c.default=cg;cg.code='require("ajv/dist/runtime/ucs2length").default'});var fg=$(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});var wr=Y(),tx=te(),rx=ug(),nx={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,wr.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,wr._)`{limit: ${t}}`},ix={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:nx,code(t){let{keyword:e,data:r,schemaCode:n,it:i}=t,o=e==="maxLength"?wr.operators.GT:wr.operators.LT,s=i.opts.unicode===!1?(0,wr._)`${r}.length`:(0,wr._)`${(0,tx.useFunc)(t.gen,rx.default)}(${r})`;t.fail$data((0,wr._)`${s} ${o} ${n}`)}};xc.default=ix});var pg=$(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});var ox=tt(),sx=te(),ln=Y(),ax={message:({schemaCode:t})=>(0,ln.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,ln._)`{pattern: ${t}}`},lx={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:ax,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:s}=t,a=s.opts.unicodeRegExp?"u":"";if(n){let{regExp:u}=s.opts.code,c=u.code==="new RegExp"?(0,ln._)`new RegExp`:(0,sx.useFunc)(e,u),p=e.let("valid");e.try(()=>e.assign(p,(0,ln._)`${c}(${o}, ${a}).test(${r})`),()=>e.assign(p,!1)),t.fail$data((0,ln._)`!${p}`)}else{let u=(0,ox.usePattern)(t,i);t.fail$data((0,ln._)`!${u}.test(${r})`)}}};kc.default=lx});var dg=$(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});var gi=Y(),cx={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,gi.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,gi._)`{limit: ${t}}`},ux={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:cx,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?gi.operators.GT:gi.operators.LT;t.fail$data((0,gi._)`Object.keys(${r}).length ${i} ${n}`)}};Ec.default=ux});var hg=$(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});var yi=tt(),vi=Y(),fx=te(),px={message:({params:{missingProperty:t}})=>(0,vi.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,vi._)`{missingProperty: ${t}}`},dx={keyword:"required",type:"object",schemaType:"array",$data:!0,error:px,code(t){let{gen:e,schema:r,schemaCode:n,data:i,$data:o,it:s}=t,{opts:a}=s;if(!o&&r.length===0)return;let u=r.length>=a.loopRequired;if(s.allErrors?c():p(),a.strictRequired){let m=t.parentSchema.properties,{definedProperties:g}=t.it;for(let y of r)if(m?.[y]===void 0&&!g.has(y)){let _=s.schemaEnv.baseId+s.errSchemaPath,b=`required property "${y}" is not defined at "${_}" (strictRequired)`;(0,fx.checkStrictMode)(s,b,s.opts.strictRequired)}}function c(){if(u||o)t.block$data(vi.nil,f);else for(let m of r)(0,yi.checkReportMissingProp)(t,m)}function p(){let m=e.let("missing");if(u||o){let g=e.let("valid",!0);t.block$data(g,()=>d(m,g)),t.ok(g)}else e.if((0,yi.checkMissingProp)(t,r,m)),(0,yi.reportMissingProp)(t,m),e.else()}function f(){e.forOf("prop",n,m=>{t.setParams({missingProperty:m}),e.if((0,yi.noPropertyInData)(e,i,m,a.ownProperties),()=>t.error())})}function d(m,g){t.setParams({missingProperty:m}),e.forOf(m,n,()=>{e.assign(g,(0,yi.propertyInData)(e,i,m,a.ownProperties)),e.if((0,vi.not)(g),()=>{t.error(),e.break()})},vi.nil)}}};Pc.default=dx});var mg=$(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});var wi=Y(),hx={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,wi.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,wi._)`{limit: ${t}}`},mx={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:hx,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?wi.operators.GT:wi.operators.LT;t.fail$data((0,wi._)`${r}.length ${i} ${n}`)}};Cc.default=mx});var ds=$(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});var gg=Ql();gg.code='require("ajv/dist/runtime/equal").default';Ic.default=gg});var yg=$(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});var Rc=ii(),Ce=Y(),gx=te(),yx=ds(),vx={message:({params:{i:t,j:e}})=>(0,Ce.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Ce._)`{i: ${t}, j: ${e}}`},wx={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:vx,code(t){let{gen:e,data:r,$data:n,schema:i,parentSchema:o,schemaCode:s,it:a}=t;if(!n&&!i)return;let u=e.let("valid"),c=o.items?(0,Rc.getSchemaTypes)(o.items):[];t.block$data(u,p,(0,Ce._)`${s} === false`),t.ok(u);function p(){let g=e.let("i",(0,Ce._)`${r}.length`),y=e.let("j");t.setParams({i:g,j:y}),e.assign(u,!0),e.if((0,Ce._)`${g} > 1`,()=>(f()?d:m)(g,y))}function f(){return c.length>0&&!c.some(g=>g==="object"||g==="array")}function d(g,y){let _=e.name("item"),b=(0,Rc.checkDataTypes)(c,_,a.opts.strictNumbers,Rc.DataType.Wrong),L=e.const("indices",(0,Ce._)`{}`);e.for((0,Ce._)`;${g}--;`,()=>{e.let(_,(0,Ce._)`${r}[${g}]`),e.if(b,(0,Ce._)`continue`),c.length>1&&e.if((0,Ce._)`typeof ${_} == "string"`,(0,Ce._)`${_} += "_"`),e.if((0,Ce._)`typeof ${L}[${_}] == "number"`,()=>{e.assign(y,(0,Ce._)`${L}[${_}]`),t.error(),e.assign(u,!1).break()}).code((0,Ce._)`${L}[${_}] = ${g}`)})}function m(g,y){let _=(0,gx.useFunc)(e,yx.default),b=e.name("outer");e.label(b).for((0,Ce._)`;${g}--;`,()=>e.for((0,Ce._)`${y} = ${g}; ${y}--;`,()=>e.if((0,Ce._)`${_}(${r}[${g}], ${r}[${y}])`,()=>{t.error(),e.assign(u,!1).break(b)})))}}};Nc.default=wx});var vg=$(Ac=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});var Tc=Y(),_x=te(),bx=ds(),Sx={message:"must be equal to constant",params:({schemaCode:t})=>(0,Tc._)`{allowedValue: ${t}}`},$x={keyword:"const",$data:!0,error:Sx,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:o}=t;n||o&&typeof o=="object"?t.fail$data((0,Tc._)`!${(0,_x.useFunc)(e,bx.default)}(${r}, ${i})`):t.fail((0,Tc._)`${o} !== ${r}`)}};Ac.default=$x});var wg=$(Oc=>{"use strict";Object.defineProperty(Oc,"__esModule",{value:!0});var _i=Y(),xx=te(),kx=ds(),Ex={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,_i._)`{allowedValues: ${t}}`},Px={keyword:"enum",schemaType:"array",$data:!0,error:Ex,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:s}=t;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let a=i.length>=s.opts.loopEnum,u,c=()=>u??(u=(0,xx.useFunc)(e,kx.default)),p;if(a||n)p=e.let("valid"),t.block$data(p,f);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=e.const("vSchema",o);p=(0,_i.or)(...i.map((g,y)=>d(m,y)))}t.pass(p);function f(){e.assign(p,!1),e.forOf("v",o,m=>e.if((0,_i._)`${c()}(${r}, ${m})`,()=>e.assign(p,!0).break()))}function d(m,g){let y=i[g];return typeof y=="object"&&y!==null?(0,_i._)`${c()}(${r}, ${m}[${g}])`:(0,_i._)`${r} === ${y}`}}};Oc.default=Px});var _g=$(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});var Cx=ag(),Ix=lg(),Rx=fg(),Nx=pg(),Tx=dg(),Ax=hg(),Ox=mg(),Mx=yg(),Lx=vg(),jx=wg(),Vx=[Cx.default,Ix.default,Rx.default,Nx.default,Tx.default,Ax.default,Ox.default,Mx.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Lx.default,jx.default];Mc.default=Vx});var jc=$(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.validateAdditionalItems=void 0;var _r=Y(),Lc=te(),Dx={message:({params:{len:t}})=>(0,_r.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,_r._)`{limit: ${t}}`},qx={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Dx,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,Lc.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}bg(t,n)}};function bg(t,e){let{gen:r,schema:n,data:i,keyword:o,it:s}=t;s.items=!0;let a=r.const("len",(0,_r._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,_r._)`${a} <= ${e.length}`);else if(typeof n=="object"&&!(0,Lc.alwaysValidSchema)(s,n)){let c=r.var("valid",(0,_r._)`${a} <= ${e.length}`);r.if((0,_r.not)(c),()=>u(c)),t.ok(c)}function u(c){r.forRange("i",e.length,a,p=>{t.subschema({keyword:o,dataProp:p,dataPropType:Lc.Type.Num},c),s.allErrors||r.if((0,_r.not)(c),()=>r.break())})}}bi.validateAdditionalItems=bg;bi.default=qx});var Vc=$(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.validateTuple=void 0;var Sg=Y(),hs=te(),Fx=tt(),Bx={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return $g(t,"additionalItems",e);r.items=!0,!(0,hs.alwaysValidSchema)(r,e)&&t.ok((0,Fx.validateArray)(t))}};function $g(t,e,r=t.schema){let{gen:n,parentSchema:i,data:o,keyword:s,it:a}=t;p(i),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=hs.mergeEvaluated.items(n,r.length,a.items));let u=n.name("valid"),c=n.const("len",(0,Sg._)`${o}.length`);r.forEach((f,d)=>{(0,hs.alwaysValidSchema)(a,f)||(n.if((0,Sg._)`${c} > ${d}`,()=>t.subschema({keyword:s,schemaProp:d,dataProp:d},u)),t.ok(u))});function p(f){let{opts:d,errSchemaPath:m}=a,g=r.length,y=g===f.minItems&&(g===f.maxItems||f[e]===!1);if(d.strictTuples&&!y){let _=`"${s}" is ${g}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,hs.checkStrictMode)(a,_,d.strictTuples)}}}Si.validateTuple=$g;Si.default=Bx});var xg=$(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});var Hx=Vc(),Ux={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,Hx.validateTuple)(t,"items")};Dc.default=Ux});var Eg=$(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});var kg=Y(),zx=te(),Wx=tt(),Gx=jc(),Kx={message:({params:{len:t}})=>(0,kg.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,kg._)`{limit: ${t}}`},Jx={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Kx,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,zx.alwaysValidSchema)(n,e)&&(i?(0,Gx.validateAdditionalItems)(t,i):t.ok((0,Wx.validateArray)(t)))}};qc.default=Jx});var Pg=$(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});var nt=Y(),ms=te(),Yx={message:({params:{min:t,max:e}})=>e===void 0?(0,nt.str)`must contain at least ${t} valid item(s)`:(0,nt.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,nt._)`{minContains: ${t}}`:(0,nt._)`{minContains: ${t}, maxContains: ${e}}`},Xx={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Yx,code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t,s,a,{minContains:u,maxContains:c}=n;o.opts.next?(s=u===void 0?1:u,a=c):s=1;let p=e.const("len",(0,nt._)`${i}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,ms.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,ms.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,ms.alwaysValidSchema)(o,r)){let y=(0,nt._)`${p} >= ${s}`;a!==void 0&&(y=(0,nt._)`${y} && ${p} <= ${a}`),t.pass(y);return}o.items=!0;let f=e.name("valid");a===void 0&&s===1?m(f,()=>e.if(f,()=>e.break())):s===0?(e.let(f,!0),a!==void 0&&e.if((0,nt._)`${i}.length > 0`,d)):(e.let(f,!1),d()),t.result(f,()=>t.reset());function d(){let y=e.name("_valid"),_=e.let("count",0);m(y,()=>e.if(y,()=>g(_)))}function m(y,_){e.forRange("i",0,p,b=>{t.subschema({keyword:"contains",dataProp:b,dataPropType:ms.Type.Num,compositeRule:!0},y),_()})}function g(y){e.code((0,nt._)`${y}++`),a===void 0?e.if((0,nt._)`${y} >= ${s}`,()=>e.assign(f,!0).break()):(e.if((0,nt._)`${y} > ${a}`,()=>e.assign(f,!1).break()),s===1?e.assign(f,!0):e.if((0,nt._)`${y} >= ${s}`,()=>e.assign(f,!0)))}}};Fc.default=Xx});var gs=$(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.validateSchemaDeps=_t.validatePropertyDeps=_t.error=void 0;var Bc=Y(),Qx=te(),$i=tt();_t.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,Bc.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,Bc._)`{property: ${t},
387
+ ${await $m(p,"utf-8")}`),f}var Go=X(()=>{"use strict";Ot();ri();Ul()});var gi=$(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.regexpCode=le.getEsmExportName=le.getProperty=le.safeStringify=le.stringify=le.strConcat=le.addCodeArg=le.str=le._=le.nil=le._Code=le.Name=le.IDENTIFIER=le._CodeOrName=void 0;var hi=class{};le._CodeOrName=hi;le.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var br=class extends hi{constructor(e){if(super(),!le.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}}};le.Name=br;var ut=class extends hi{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof br&&(r[n.str]=(r[n.str]||0)+1),r),{})}};le._Code=ut;le.nil=new ut("");function qm(t,...e){let r=[t[0]],n=0;for(;n<e.length;)ru(r,e[n]),r.push(t[++n]);return new ut(r)}le._=qm;var tu=new ut("+");function Fm(t,...e){let r=[mi(t[0])],n=0;for(;n<e.length;)r.push(tu),ru(r,e[n]),r.push(tu,mi(t[++n]));return h2(r),new ut(r)}le.str=Fm;function ru(t,e){e instanceof ut?t.push(...e._items):e instanceof br?t.push(e):t.push(y2(e))}le.addCodeArg=ru;function h2(t){let e=1;for(;e<t.length-1;){if(t[e]===tu){let r=m2(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function m2(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof br||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 br))return`"${t}${e.slice(1)}`}function g2(t,e){return e.emptyStr()?t:t.emptyStr()?e:Fm`${t}${e}`}le.strConcat=g2;function y2(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:mi(Array.isArray(t)?t.join(","):t)}function v2(t){return new ut(mi(t))}le.stringify=v2;function mi(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}le.safeStringify=mi;function w2(t){return typeof t=="string"&&le.IDENTIFIER.test(t)?new ut(`.${t}`):qm`[${t}]`}le.getProperty=w2;function b2(t){if(typeof t=="string"&&le.IDENTIFIER.test(t))return new ut(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}le.getEsmExportName=b2;function _2(t){return new ut(t.toString())}le.regexpCode=_2});var ou=$(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.ValueScope=Ye.ValueScopeName=Ye.Scope=Ye.varKinds=Ye.UsedValueState=void 0;var Ke=gi(),nu=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},gs;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(gs||(Ye.UsedValueState=gs={}));Ye.varKinds={const:new Ke.Name("const"),let:new Ke.Name("let"),var:new Ke.Name("var")};var ys=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Ke.Name?e:this.name(e)}name(e){return new Ke.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Ye.Scope=ys;var vs=class extends Ke.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,Ke._)`.${new Ke.Name(r)}[${n}]`}};Ye.ValueScopeName=vs;var x2=(0,Ke._)`\n`,iu=class extends ys{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?x2:Ke.nil}}get(){return this._scope}name(e){return new vs(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,s=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[o];if(a){let f=a.get(s);if(f)return f}else a=this._values[o]=new Map;a.set(s,i);let l=this._scope[o]||(this._scope[o]=[]),u=l.length;return l[u]=r.ref,i.setValue(r,{property:o,itemIndex:u}),i}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Ke._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(e,r,n={},i){let o=Ke.nil;for(let s in e){let a=e[s];if(!a)continue;let l=n[s]=n[s]||new Map;a.forEach(u=>{if(l.has(u))return;l.set(u,gs.Started);let f=r(u);if(f){let p=this.opts.es5?Ye.varKinds.var:Ye.varKinds.const;o=(0,Ke._)`${o}${p} ${u} = ${f};${this.opts._n}`}else if(f=i?.(u))o=(0,Ke._)`${o}${f}${this.opts._n}`;else throw new nu(u);l.set(u,gs.Completed)})}return o}};Ye.ValueScope=iu});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=gi(),wt=ou(),Zt=gi();Object.defineProperty(te,"_",{enumerable:!0,get:function(){return Zt._}});Object.defineProperty(te,"str",{enumerable:!0,get:function(){return Zt.str}});Object.defineProperty(te,"strConcat",{enumerable:!0,get:function(){return Zt.strConcat}});Object.defineProperty(te,"nil",{enumerable:!0,get:function(){return Zt.nil}});Object.defineProperty(te,"getProperty",{enumerable:!0,get:function(){return Zt.getProperty}});Object.defineProperty(te,"stringify",{enumerable:!0,get:function(){return Zt.stringify}});Object.defineProperty(te,"regexpCode",{enumerable:!0,get:function(){return Zt.regexpCode}});Object.defineProperty(te,"Name",{enumerable:!0,get:function(){return Zt.Name}});var xs=ou();Object.defineProperty(te,"Scope",{enumerable:!0,get:function(){return xs.Scope}});Object.defineProperty(te,"ValueScope",{enumerable:!0,get:function(){return xs.ValueScope}});Object.defineProperty(te,"ValueScopeName",{enumerable:!0,get:function(){return xs.ValueScopeName}});Object.defineProperty(te,"varKinds",{enumerable:!0,get:function(){return xs.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 Wt=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},su=class extends Wt{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?wt.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=hn(this.rhs,e,r)),this}get names(){return this.rhs instanceof se._CodeOrName?this.rhs.names:{}}},ws=class extends Wt{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof se.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=hn(this.rhs,e,r),this}get names(){let e=this.lhs instanceof se.Name?{}:{...this.lhs.names};return _s(e,this.rhs)}},au=class extends ws{constructor(e,r,n,i){super(e,n,i),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},lu=class extends Wt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},uu=class extends Wt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},cu=class extends Wt{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},pu=class extends Wt{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=hn(this.code,e,r),this}get names(){return this.code instanceof se._CodeOrName?this.code.names:{}}},yi=class extends Wt{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,i=n.length;for(;i--;){let o=n[i];o.optimizeNames(e,r)||($2(e,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>$r(e,r.names),{})}},zt=class extends yi{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},fu=class extends yi{},dn=class extends zt{};dn.kind="else";var _r=class t extends zt{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new dn(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(Bm(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=hn(this.condition,e,r),this}get names(){let e=super.names;return _s(e,this.condition),this.else&&$r(e,this.else.names),e}};_r.kind="if";var xr=class extends zt{};xr.kind="for";var du=class extends xr{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=hn(this.iteration,e,r),this}get names(){return $r(super.names,this.iteration.names)}},hu=class extends xr{constructor(e,r,n,i){super(),this.varKind=e,this.name=r,this.from=n,this.to=i}render(e){let r=e.es5?wt.varKinds.var:this.varKind,{name:n,from:i,to:o}=this;return`for(${r} ${n}=${i}; ${n}<${o}; ${n}++)`+super.render(e)}get names(){let e=_s(super.names,this.from);return _s(e,this.to)}},bs=class extends xr{constructor(e,r,n,i){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=hn(this.iterable,e,r),this}get names(){return $r(super.names,this.iterable.names)}},vi=class extends zt{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};vi.kind="func";var wi=class extends yi{render(e){return"return "+super.render(e)}};wi.kind="return";var mu=class extends zt{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,i;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(i=this.finally)===null||i===void 0||i.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&$r(e,this.catch.names),this.finally&&$r(e,this.finally.names),e}},bi=class extends zt{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};bi.kind="catch";var _i=class extends zt{render(e){return"finally"+super.render(e)}};_i.kind="finally";var gu=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
388
+ `:""},this._extScope=e,this._scope=new wt.Scope({parent:e}),this._nodes=[new fu]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,i){let o=this._scope.toName(r);return n!==void 0&&i&&(this._constants[o.str]=n),this._leafNode(new su(e,o,n)),o}const(e,r,n){return this._def(wt.varKinds.const,e,r,n)}let(e,r,n){return this._def(wt.varKinds.let,e,r,n)}var(e,r,n){return this._def(wt.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new ws(e,r,n))}add(e,r){return this._leafNode(new au(e,te.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==se.nil&&this._leafNode(new pu(e)),this}object(...e){let r=["{"];for(let[n,i]of e)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,se.addCodeArg)(r,i));return r.push("}"),new se._Code(r)}if(e,r,n){if(this._blockNode(new _r(e)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new _r(e))}else(){return this._elseNode(new dn)}endIf(){return this._endBlockNode(_r,dn)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new du(e),r)}forRange(e,r,n,i,o=this.opts.es5?wt.varKinds.var:wt.varKinds.let){let s=this._scope.toName(e);return this._for(new hu(o,s,r,n),()=>i(s))}forOf(e,r,n,i=wt.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let s=r instanceof se.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,se._)`${s}.length`,a=>{this.var(o,(0,se._)`${s}[${a}]`),n(o)})}return this._for(new bs("of",i,o,r),()=>n(o))}forIn(e,r,n,i=this.opts.es5?wt.varKinds.var:wt.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,se._)`Object.keys(${r})`,n);let o=this._scope.toName(e);return this._for(new bs("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(xr)}label(e){return this._leafNode(new lu(e))}break(e){return this._leafNode(new uu(e))}return(e){let r=new wi;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(wi)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new mu;if(this._blockNode(i),this.code(e),r){let o=this.name("e");this._currNode=i.catch=new bi(o),r(o)}return n&&(this._currNode=i.finally=new _i,this.code(n)),this._endBlockNode(bi,_i)}throw(e){return this._leafNode(new cu(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=se.nil,n,i){return this._blockNode(new vi(e,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(vi)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof _r))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};te.CodeGen=gu;function $r(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function _s(t,e){return e instanceof se._CodeOrName?$r(t,e.names):t}function hn(t,e,r){if(t instanceof se.Name)return n(t);if(!i(t))return t;return new se._Code(t._items.reduce((o,s)=>(s instanceof se.Name&&(s=n(s)),s instanceof se._Code?o.push(...s._items):o.push(s),o),[]));function n(o){let s=r[o.str];return s===void 0||e[o.str]!==1?o:(delete e[o.str],s)}function i(o){return o instanceof se._Code&&o._items.some(s=>s instanceof se.Name&&e[s.str]===1&&r[s.str]!==void 0)}}function $2(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function Bm(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,se._)`!${yu(t)}`}te.not=Bm;var S2=Hm(te.operators.AND);function k2(...t){return t.reduce(S2)}te.and=k2;var C2=Hm(te.operators.OR);function E2(...t){return t.reduce(C2)}te.or=E2;function Hm(t){return(e,r)=>e===se.nil?r:r===se.nil?e:(0,se._)`${yu(e)} ${t} ${yu(r)}`}function yu(t){return t instanceof se.Name?t:(0,se._)`(${t})`}});var ne=$(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.checkStrictMode=re.getErrorPath=re.Type=re.useFunc=re.setEvaluated=re.evaluatedPropsToName=re.mergeEvaluated=re.eachItem=re.unescapeJsonPointer=re.escapeJsonPointer=re.escapeFragment=re.unescapeFragment=re.schemaRefOrVal=re.schemaHasRulesButRef=re.schemaHasRules=re.checkUnknownRules=re.alwaysValidSchema=re.toHash=void 0;var he=Z(),P2=gi();function I2(t){let e={};for(let r of t)e[r]=!0;return e}re.toHash=I2;function R2(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Um(t,e),!Gm(e,t.self.RULES.all))}re.alwaysValidSchema=R2;function Um(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let i=n.RULES.keywords;for(let o in e)i[o]||Ym(t,`unknown keyword: "${o}"`)}re.checkUnknownRules=Um;function Gm(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}re.schemaHasRules=Gm;function T2(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}re.schemaHasRulesButRef=T2;function A2({topSchemaRef:t,schemaPath:e},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,he._)`${r}`}return(0,he._)`${t}${e}${(0,he.getProperty)(n)}`}re.schemaRefOrVal=A2;function N2(t){return Jm(decodeURIComponent(t))}re.unescapeFragment=N2;function M2(t){return encodeURIComponent(wu(t))}re.escapeFragment=M2;function wu(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}re.escapeJsonPointer=wu;function Jm(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}re.unescapeJsonPointer=Jm;function O2(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}re.eachItem=O2;function Wm({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){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):r(o,s);return a===he.Name&&!(l instanceof he.Name)?n(i,l):l}}re.mergeEvaluated={props:Wm({mergeNames:(t,e,r)=>t.if((0,he._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,he._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,he._)`${r} || {}`).code((0,he._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,he._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,he._)`${r} || {}`),bu(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Km}),items:Wm({mergeNames:(t,e,r)=>t.if((0,he._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,he._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,he._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,he._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Km(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,he._)`{}`);return e!==void 0&&bu(t,r,e),r}re.evaluatedPropsToName=Km;function bu(t,e,r){Object.keys(r).forEach(n=>t.assign((0,he._)`${e}${(0,he.getProperty)(n)}`,!0))}re.setEvaluated=bu;var zm={};function L2(t,e){return t.scopeValue("func",{ref:e,code:zm[e.code]||(zm[e.code]=new P2._Code(e.code))})}re.useFunc=L2;var vu;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(vu||(re.Type=vu={}));function V2(t,e,r){if(t instanceof he.Name){let n=e===vu.Num;return r?n?(0,he._)`"[" + ${t} + "]"`:(0,he._)`"['" + ${t} + "']"`:n?(0,he._)`"/" + ${t}`:(0,he._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,he.getProperty)(t).toString():"/"+wu(t)}re.getErrorPath=V2;function Ym(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}re.checkStrictMode=Ym});var ct=$(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});var je=Z(),j2={data:new je.Name("data"),valCxt:new je.Name("valCxt"),instancePath:new je.Name("instancePath"),parentData:new je.Name("parentData"),parentDataProperty:new je.Name("parentDataProperty"),rootData:new je.Name("rootData"),dynamicAnchors:new je.Name("dynamicAnchors"),vErrors:new je.Name("vErrors"),errors:new je.Name("errors"),this:new je.Name("this"),self:new je.Name("self"),scope:new je.Name("scope"),json:new je.Name("json"),jsonPos:new je.Name("jsonPos"),jsonLen:new je.Name("jsonLen"),jsonPart:new je.Name("jsonPart")};_u.default=j2});var xi=$(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.extendErrors=De.resetErrorsCount=De.reportExtraError=De.reportError=De.keyword$DataError=De.keywordError=void 0;var ae=Z(),$s=ne(),ze=ct();De.keywordError={message:({keyword:t})=>(0,ae.str)`must pass "${t}" keyword validation`};De.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 D2(t,e=De.keywordError,r,n){let{it:i}=t,{gen:o,compositeRule:s,allErrors:a}=i,l=Zm(t,e,r);n??(s||a)?Xm(o,l):Qm(i,(0,ae._)`[${l}]`)}De.reportError=D2;function q2(t,e=De.keywordError,r){let{it:n}=t,{gen:i,compositeRule:o,allErrors:s}=n,a=Zm(t,e,r);Xm(i,a),o||s||Qm(n,ze.default.vErrors)}De.reportExtraError=q2;function F2(t,e){t.assign(ze.default.errors,e),t.if((0,ae._)`${ze.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,ae._)`${ze.default.vErrors}.length`,e),()=>t.assign(ze.default.vErrors,null)))}De.resetErrorsCount=F2;function B2({gen:t,keyword:e,schemaValue:r,data:n,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let s=t.name("err");t.forRange("i",i,ze.default.errors,a=>{t.const(s,(0,ae._)`${ze.default.vErrors}[${a}]`),t.if((0,ae._)`${s}.instancePath === undefined`,()=>t.assign((0,ae._)`${s}.instancePath`,(0,ae.strConcat)(ze.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`,r),t.assign((0,ae._)`${s}.data`,n))})}De.extendErrors=B2;function Xm(t,e){let r=t.const("err",e);t.if((0,ae._)`${ze.default.vErrors} === null`,()=>t.assign(ze.default.vErrors,(0,ae._)`[${r}]`),(0,ae._)`${ze.default.vErrors}.push(${r})`),t.code((0,ae._)`${ze.default.errors}++`)}function Qm(t,e){let{gen:r,validateName:n,schemaEnv:i}=t;i.$async?r.throw((0,ae._)`new ${t.ValidationError}(${e})`):(r.assign((0,ae._)`${n}.errors`,e),r.return(!1))}var Sr={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 Zm(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,ae._)`{}`:H2(t,e,r)}function H2(t,e,r={}){let{gen:n,it:i}=t,o=[W2(i,r),z2(t,r)];return U2(t,e,o),n.object(...o)}function W2({errorPath:t},{instancePath:e}){let r=e?(0,ae.str)`${t}${(0,$s.getErrorPath)(e,$s.Type.Str)}`:t;return[ze.default.instancePath,(0,ae.strConcat)(ze.default.instancePath,r)]}function z2({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let i=n?e:(0,ae.str)`${e}/${t}`;return r&&(i=(0,ae.str)`${i}${(0,$s.getErrorPath)(r,$s.Type.Str)}`),[Sr.schemaPath,i]}function U2(t,{params:e,message:r},n){let{keyword:i,data:o,schemaValue:s,it:a}=t,{opts:l,propertyName:u,topSchemaRef:f,schemaPath:p}=a;n.push([Sr.keyword,i],[Sr.params,typeof e=="function"?e(t):e||(0,ae._)`{}`]),l.messages&&n.push([Sr.message,typeof r=="function"?r(t):r]),l.verbose&&n.push([Sr.schema,s],[Sr.parentSchema,(0,ae._)`${f}${p}`],[ze.default.data,o]),u&&n.push([Sr.propertyName,u])}});var tg=$(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.boolOrEmptySchema=mn.topBoolOrEmptySchema=void 0;var G2=xi(),J2=Z(),K2=ct(),Y2={message:"boolean schema is false"};function X2(t){let{gen:e,schema:r,validateName:n}=t;r===!1?eg(t,!1):typeof r=="object"&&r.$async===!0?e.return(K2.default.data):(e.assign((0,J2._)`${n}.errors`,null),e.return(!0))}mn.topBoolOrEmptySchema=X2;function Q2(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),eg(t)):r.var(e,!0)}mn.boolOrEmptySchema=Q2;function eg(t,e){let{gen:r,data:n}=t,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,G2.reportError)(i,Y2,void 0,e)}});var xu=$(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.getRules=gn.isJSONType=void 0;var Z2=["string","number","integer","boolean","null","object","array"],e1=new Set(Z2);function t1(t){return typeof t=="string"&&e1.has(t)}gn.isJSONType=t1;function r1(){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:{}}}gn.getRules=r1});var $u=$(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.shouldUseRule=er.shouldUseGroup=er.schemaHasRulesForType=void 0;function n1({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&rg(t,n)}er.schemaHasRulesForType=n1;function rg(t,e){return e.rules.some(r=>ng(t,r))}er.shouldUseGroup=rg;function ng(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}er.shouldUseRule=ng});var $i=$(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.reportTypeError=qe.checkDataTypes=qe.checkDataType=qe.coerceAndCheckDataType=qe.getJSONTypes=qe.getSchemaTypes=qe.DataType=void 0;var i1=xu(),o1=$u(),s1=xi(),ee=Z(),ig=ne(),yn;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(yn||(qe.DataType=yn={}));function a1(t){let e=og(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}qe.getSchemaTypes=a1;function og(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(i1.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}qe.getJSONTypes=og;function l1(t,e){let{gen:r,data:n,opts:i}=t,o=u1(e,i.coerceTypes),s=e.length>0&&!(o.length===0&&e.length===1&&(0,o1.schemaHasRulesForType)(t,e[0]));if(s){let a=ku(e,n,i.strictNumbers,yn.Wrong);r.if(a,()=>{o.length?c1(t,e,o):Cu(t)})}return s}qe.coerceAndCheckDataType=l1;var sg=new Set(["string","number","integer","boolean","null"]);function u1(t,e){return e?t.filter(r=>sg.has(r)||e==="array"&&r==="array"):[]}function c1(t,e,r){let{gen:n,data:i,opts:o}=t,s=n.let("dataType",(0,ee._)`typeof ${i}`),a=n.let("coerced",(0,ee._)`undefined`);o.coerceTypes==="array"&&n.if((0,ee._)`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,ee._)`${i}[0]`).assign(s,(0,ee._)`typeof ${i}`).if(ku(e,i,o.strictNumbers),()=>n.assign(a,i))),n.if((0,ee._)`${a} !== undefined`);for(let u of r)(sg.has(u)||u==="array"&&o.coerceTypes==="array")&&l(u);n.else(),Cu(t),n.endIf(),n.if((0,ee._)`${a} !== undefined`,()=>{n.assign(i,a),p1(t,a)});function l(u){switch(u){case"string":n.elseIf((0,ee._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,ee._)`"" + ${i}`).elseIf((0,ee._)`${i} === null`).assign(a,(0,ee._)`""`);return;case"number":n.elseIf((0,ee._)`${s} == "boolean" || ${i} === null
389
+ || (${s} == "string" && ${i} && ${i} == +${i})`).assign(a,(0,ee._)`+${i}`);return;case"integer":n.elseIf((0,ee._)`${s} === "boolean" || ${i} === null
390
+ || (${s} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(a,(0,ee._)`+${i}`);return;case"boolean":n.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":n.elseIf((0,ee._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(a,null);return;case"array":n.elseIf((0,ee._)`${s} === "string" || ${s} === "number"
391
+ || ${s} === "boolean" || ${i} === null`).assign(a,(0,ee._)`[${i}]`)}}}function p1({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,ee._)`${e} !== undefined`,()=>t.assign((0,ee._)`${e}[${r}]`,n))}function Su(t,e,r,n=yn.Correct){let i=n===yn.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 n===yn.Correct?o:(0,ee.not)(o);function s(a=ee.nil){return(0,ee.and)((0,ee._)`typeof ${e} == "number"`,a,r?(0,ee._)`isFinite(${e})`:ee.nil)}}qe.checkDataType=Su;function ku(t,e,r,n){if(t.length===1)return Su(t[0],e,r,n);let i,o=(0,ig.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,Su(s,e,r,n));return i}qe.checkDataTypes=ku;var f1={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,ee._)`{type: ${t}}`:(0,ee._)`{type: ${e}}`};function Cu(t){let e=d1(t);(0,s1.reportError)(e,f1)}qe.reportTypeError=Cu;function d1(t){let{gen:e,data:r,schema:n}=t,i=(0,ig.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var lg=$(Ss=>{"use strict";Object.defineProperty(Ss,"__esModule",{value:!0});Ss.assignDefaults=void 0;var vn=Z(),h1=ne();function m1(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)ag(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,o)=>ag(t,o,i.default))}Ss.assignDefaults=m1;function ag(t,e,r){let{gen:n,compositeRule:i,data:o,opts:s}=t;if(r===void 0)return;let a=(0,vn._)`${o}${(0,vn.getProperty)(e)}`;if(i){(0,h1.checkStrictMode)(t,`default is ignored for: ${a}`);return}let l=(0,vn._)`${a} === undefined`;s.useDefaults==="empty"&&(l=(0,vn._)`${l} || ${a} === null || ${a} === ""`),n.if(l,(0,vn._)`${a} = ${(0,vn.stringify)(r)}`)}});var pt=$(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 ye=Z(),Eu=ne(),tr=ct(),g1=ne();function y1(t,e){let{gen:r,data:n,it:i}=t;r.if(Iu(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,ye._)`${e}`},!0),t.error()})}fe.checkReportMissingProp=y1;function v1({gen:t,data:e,it:{opts:r}},n,i){return(0,ye.or)(...n.map(o=>(0,ye.and)(Iu(t,e,o,r.ownProperties),(0,ye._)`${i} = ${o}`)))}fe.checkMissingProp=v1;function w1(t,e){t.setParams({missingProperty:e},!0),t.error()}fe.reportMissingProp=w1;function ug(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ye._)`Object.prototype.hasOwnProperty`})}fe.hasPropFunc=ug;function Pu(t,e,r){return(0,ye._)`${ug(t)}.call(${e}, ${r})`}fe.isOwnProperty=Pu;function b1(t,e,r,n){let i=(0,ye._)`${e}${(0,ye.getProperty)(r)} !== undefined`;return n?(0,ye._)`${i} && ${Pu(t,e,r)}`:i}fe.propertyInData=b1;function Iu(t,e,r,n){let i=(0,ye._)`${e}${(0,ye.getProperty)(r)} === undefined`;return n?(0,ye.or)(i,(0,ye.not)(Pu(t,e,r))):i}fe.noPropertyInData=Iu;function cg(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}fe.allSchemaProperties=cg;function _1(t,e){return cg(e).filter(r=>!(0,Eu.alwaysValidSchema)(t,e[r]))}fe.schemaProperties=_1;function x1({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:s},a,l,u){let f=u?(0,ye._)`${t}, ${e}, ${n}${i}`:e,p=[[tr.default.instancePath,(0,ye.strConcat)(tr.default.instancePath,o)],[tr.default.parentData,s.parentData],[tr.default.parentDataProperty,s.parentDataProperty],[tr.default.rootData,tr.default.rootData]];s.opts.dynamicRef&&p.push([tr.default.dynamicAnchors,tr.default.dynamicAnchors]);let d=(0,ye._)`${f}, ${r.object(...p)}`;return l!==ye.nil?(0,ye._)`${a}.call(${l}, ${d})`:(0,ye._)`${a}(${d})`}fe.callValidateCode=x1;var $1=(0,ye._)`new RegExp`;function S1({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:i}=e.code,o=i(r,n);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,ye._)`${i.code==="new RegExp"?$1:(0,g1.useFunc)(t,i)}(${r}, ${n})`})}fe.usePattern=S1;function k1(t){let{gen:e,data:r,keyword:n,it:i}=t,o=e.name("valid");if(i.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(o,!0),s(()=>e.break()),o;function s(a){let l=e.const("len",(0,ye._)`${r}.length`);e.forRange("i",0,l,u=>{t.subschema({keyword:n,dataProp:u,dataPropType:Eu.Type.Num},o),e.if((0,ye.not)(o),a)})}}fe.validateArray=k1;function C1(t){let{gen:e,schema:r,keyword:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(l=>(0,Eu.alwaysValidSchema)(i,l))&&!i.opts.unevaluated)return;let s=e.let("valid",!1),a=e.name("_valid");e.block(()=>r.forEach((l,u)=>{let f=t.subschema({keyword:n,schemaProp:u,compositeRule:!0},a);e.assign(s,(0,ye._)`${s} || ${a}`),t.mergeValidEvaluated(f,a)||e.if((0,ye.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}fe.validateUnion=C1});var dg=$(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.validateKeywordUsage=Et.validSchemaType=Et.funcKeywordCode=Et.macroKeywordCode=void 0;var Ue=Z(),kr=ct(),E1=pt(),P1=xi();function I1(t,e){let{gen:r,keyword:n,schema:i,parentSchema:o,it:s}=t,a=e.macro.call(s.self,i,o,s),l=fg(r,n,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let u=r.name("valid");t.subschema({schema:a,schemaPath:Ue.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:l,compositeRule:!0},u),t.pass(u,()=>t.error(!0))}Et.macroKeywordCode=I1;function R1(t,e){var r;let{gen:n,keyword:i,schema:o,parentSchema:s,$data:a,it:l}=t;A1(l,e);let u=!a&&e.compile?e.compile.call(l.self,o,s,l):e.validate,f=fg(n,i,u),p=n.let("valid");t.block$data(p,d),t.ok((r=e.valid)!==null&&r!==void 0?r:p);function d(){if(e.errors===!1)y(),e.modifying&&pg(t),v(()=>t.error());else{let w=e.async?m():g();e.modifying&&pg(t),v(()=>T1(t,w))}}function m(){let w=n.let("ruleErrs",null);return n.try(()=>y((0,Ue._)`await `),R=>n.assign(p,!1).if((0,Ue._)`${R} instanceof ${l.ValidationError}`,()=>n.assign(w,(0,Ue._)`${R}.errors`),()=>n.throw(R))),w}function g(){let w=(0,Ue._)`${f}.errors`;return n.assign(w,null),y(Ue.nil),w}function y(w=e.async?(0,Ue._)`await `:Ue.nil){let R=l.opts.passContext?kr.default.this:kr.default.self,O=!("compile"in e&&!a||e.schema===!1);n.assign(p,(0,Ue._)`${w}${(0,E1.callValidateCode)(t,f,R,O)}`,e.modifying)}function v(w){var R;n.if((0,Ue.not)((R=e.valid)!==null&&R!==void 0?R:p),w)}}Et.funcKeywordCode=R1;function pg(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,Ue._)`${n.parentData}[${n.parentDataProperty}]`))}function T1(t,e){let{gen:r}=t;r.if((0,Ue._)`Array.isArray(${e})`,()=>{r.assign(kr.default.vErrors,(0,Ue._)`${kr.default.vErrors} === null ? ${e} : ${kr.default.vErrors}.concat(${e})`).assign(kr.default.errors,(0,Ue._)`${kr.default.vErrors}.length`),(0,P1.extendErrors)(t)},()=>t.error())}function A1({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function fg(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Ue.stringify)(r)})}function N1(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}Et.validSchemaType=N1;function M1({schema:t,opts:e,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");let s=i.dependencies;if(s?.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[o])){let l=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(l);else throw new Error(l)}}Et.validateKeywordUsage=M1});var mg=$(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.extendSubschemaMode=rr.extendSubschemaData=rr.getSubschema=void 0;var Pt=Z(),hg=ne();function O1(t,{keyword:e,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:s}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let a=t.schema[e];return r===void 0?{schema:a,schemaPath:(0,Pt._)`${t.schemaPath}${(0,Pt.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[r],schemaPath:(0,Pt._)`${t.schemaPath}${(0,Pt.getProperty)(e)}${(0,Pt.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,hg.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||o===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:s,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}rr.getSubschema=O1;function L1(t,e,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:s}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(r!==void 0){let{errorPath:u,dataPathArr:f,opts:p}=e,d=a.let("data",(0,Pt._)`${e.data}${(0,Pt.getProperty)(r)}`,!0);l(d),t.errorPath=(0,Pt.str)`${u}${(0,hg.getErrorPath)(r,n,p.jsPropertySyntax)}`,t.parentDataProperty=(0,Pt._)`${r}`,t.dataPathArr=[...f,t.parentDataProperty]}if(i!==void 0){let u=i instanceof Pt.Name?i:a.let("data",i,!0);l(u),s!==void 0&&(t.propertyName=s)}o&&(t.dataTypes=o);function l(u){t.data=u,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,u]}}rr.extendSubschemaData=L1;function V1(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(t.compositeRule=n),i!==void 0&&(t.createErrors=i),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=r}rr.extendSubschemaMode=V1});var Ru=$((EN,gg)=>{"use strict";gg.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var s=o[i];if(!t(e[s],r[s]))return!1}return!0}return e!==e&&r!==r}});var vg=$((PN,yg)=>{"use strict";var nr=yg.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};ks(e,n,i,t,"",t)};nr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};nr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};nr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};nr.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 ks(t,e,r,n,i,o,s,a,l,u){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,o,s,a,l,u);for(var f in n){var p=n[f];if(Array.isArray(p)){if(f in nr.arrayKeywords)for(var d=0;d<p.length;d++)ks(t,e,r,p[d],i+"/"+f+"/"+d,o,i,f,n,d)}else if(f in nr.propsKeywords){if(p&&typeof p=="object")for(var m in p)ks(t,e,r,p[m],i+"/"+f+"/"+j1(m),o,i,f,n,m)}else(f in nr.keywords||t.allKeys&&!(f in nr.skipKeywords))&&ks(t,e,r,p,i+"/"+f,o,i,f,n)}r(n,i,o,s,a,l,u)}}function j1(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Si=$(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.getSchemaRefs=Xe.resolveUrl=Xe.normalizeId=Xe._getFullPath=Xe.getFullPath=Xe.inlineRef=void 0;var D1=ne(),q1=Ru(),F1=vg(),B1=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function H1(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Tu(t):e?wg(t)<=e:!1}Xe.inlineRef=H1;var W1=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Tu(t){for(let e in t){if(W1.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(Tu)||typeof r=="object"&&Tu(r))return!0}return!1}function wg(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!B1.has(r)&&(typeof t[r]=="object"&&(0,D1.eachItem)(t[r],n=>e+=wg(n)),e===1/0))return 1/0}return e}function bg(t,e="",r){r!==!1&&(e=wn(e));let n=t.parse(e);return _g(t,n)}Xe.getFullPath=bg;function _g(t,e){return t.serialize(e).split("#")[0]+"#"}Xe._getFullPath=_g;var z1=/#\/?$/;function wn(t){return t?t.replace(z1,""):""}Xe.normalizeId=wn;function U1(t,e,r){return r=wn(r),t.resolve(e,r)}Xe.resolveUrl=U1;var G1=/^[a-z_][-a-z0-9._]*$/i;function J1(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=wn(t[r]||e),o={"":i},s=bg(n,i,!1),a={},l=new Set;return F1(t,{allKeys:!0},(p,d,m,g)=>{if(g===void 0)return;let y=s+d,v=o[g];typeof p[r]=="string"&&(v=w.call(this,p[r])),R.call(this,p.$anchor),R.call(this,p.$dynamicAnchor),o[d]=v;function w(O){let I=this.opts.uriResolver.resolve;if(O=wn(v?I(v,O):O),l.has(O))throw f(O);l.add(O);let A=this.refs[O];return typeof A=="string"&&(A=this.refs[A]),typeof A=="object"?u(p,A.schema,O):O!==wn(y)&&(O[0]==="#"?(u(p,a[O],O),a[O]=p):this.refs[O]=y),O}function R(O){if(typeof O=="string"){if(!G1.test(O))throw new Error(`invalid anchor "${O}"`);w.call(this,`#${O}`)}}}),a;function u(p,d,m){if(d!==void 0&&!q1(p,d))throw f(m)}function f(p){return new Error(`reference "${p}" resolves to more than one schema`)}}Xe.getSchemaRefs=J1});var Ei=$(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.getData=ir.KeywordCxt=ir.validateFunctionCode=void 0;var Cg=tg(),xg=$i(),Nu=$u(),Cs=$i(),K1=lg(),Ci=dg(),Au=mg(),z=Z(),Q=ct(),Y1=Si(),Ut=ne(),ki=xi();function X1(t){if(Ig(t)&&(Rg(t),Pg(t))){eS(t);return}Eg(t,()=>(0,Cg.topBoolOrEmptySchema)(t))}ir.validateFunctionCode=X1;function Eg({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},o){i.code.es5?t.func(e,(0,z._)`${Q.default.data}, ${Q.default.valCxt}`,n.$async,()=>{t.code((0,z._)`"use strict"; ${$g(r,i)}`),Z1(t,i),t.code(o)}):t.func(e,(0,z._)`${Q.default.data}, ${Q1(i)}`,n.$async,()=>t.code($g(r,i)).code(o))}function Q1(t){return(0,z._)`{${Q.default.instancePath}="", ${Q.default.parentData}, ${Q.default.parentDataProperty}, ${Q.default.rootData}=${Q.default.data}${t.dynamicRef?(0,z._)`, ${Q.default.dynamicAnchors}={}`:z.nil}}={}`}function Z1(t,e){t.if(Q.default.valCxt,()=>{t.var(Q.default.instancePath,(0,z._)`${Q.default.valCxt}.${Q.default.instancePath}`),t.var(Q.default.parentData,(0,z._)`${Q.default.valCxt}.${Q.default.parentData}`),t.var(Q.default.parentDataProperty,(0,z._)`${Q.default.valCxt}.${Q.default.parentDataProperty}`),t.var(Q.default.rootData,(0,z._)`${Q.default.valCxt}.${Q.default.rootData}`),e.dynamicRef&&t.var(Q.default.dynamicAnchors,(0,z._)`${Q.default.valCxt}.${Q.default.dynamicAnchors}`)},()=>{t.var(Q.default.instancePath,(0,z._)`""`),t.var(Q.default.parentData,(0,z._)`undefined`),t.var(Q.default.parentDataProperty,(0,z._)`undefined`),t.var(Q.default.rootData,Q.default.data),e.dynamicRef&&t.var(Q.default.dynamicAnchors,(0,z._)`{}`)})}function eS(t){let{schema:e,opts:r,gen:n}=t;Eg(t,()=>{r.$comment&&e.$comment&&Ag(t),oS(t),n.let(Q.default.vErrors,null),n.let(Q.default.errors,0),r.unevaluated&&tS(t),Tg(t),lS(t)})}function tS(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,z._)`${r}.evaluated`),e.if((0,z._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,z._)`${t.evaluated}.props`,(0,z._)`undefined`)),e.if((0,z._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,z._)`${t.evaluated}.items`,(0,z._)`undefined`))}function $g(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,z._)`/*# sourceURL=${r} */`:z.nil}function rS(t,e){if(Ig(t)&&(Rg(t),Pg(t))){nS(t,e);return}(0,Cg.boolOrEmptySchema)(t,e)}function Pg({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function Ig(t){return typeof t.schema!="boolean"}function nS(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&Ag(t),sS(t),aS(t);let o=n.const("_errs",Q.default.errors);Tg(t,o),n.var(e,(0,z._)`${o} === ${Q.default.errors}`)}function Rg(t){(0,Ut.checkUnknownRules)(t),iS(t)}function Tg(t,e){if(t.opts.jtd)return Sg(t,[],!1,e);let r=(0,xg.getSchemaTypes)(t.schema),n=(0,xg.coerceAndCheckDataType)(t,r);Sg(t,r,!n,e)}function iS(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Ut.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function oS(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Ut.checkStrictMode)(t,"default is ignored in the schema root")}function sS(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,Y1.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function aS(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Ag({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)t.code((0,z._)`${Q.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let s=(0,z.str)`${n}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,z._)`${Q.default.self}.opts.$comment(${o}, ${s}, ${a}.schema)`)}}function lS(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=t;r.$async?e.if((0,z._)`${Q.default.errors} === 0`,()=>e.return(Q.default.data),()=>e.throw((0,z._)`new ${i}(${Q.default.vErrors})`)):(e.assign((0,z._)`${n}.errors`,Q.default.vErrors),o.unevaluated&&uS(t),e.return((0,z._)`${Q.default.errors} === 0`))}function uS({gen:t,evaluated:e,props:r,items:n}){r instanceof z.Name&&t.assign((0,z._)`${e}.props`,r),n instanceof z.Name&&t.assign((0,z._)`${e}.items`,n)}function Sg(t,e,r,n){let{gen:i,schema:o,data:s,allErrors:a,opts:l,self:u}=t,{RULES:f}=u;if(o.$ref&&(l.ignoreKeywordsWithRef||!(0,Ut.schemaHasRulesButRef)(o,f))){i.block(()=>Mg(t,"$ref",f.all.$ref.definition));return}l.jtd||cS(t,e),i.block(()=>{for(let d of f.rules)p(d);p(f.post)});function p(d){(0,Nu.shouldUseGroup)(o,d)&&(d.type?(i.if((0,Cs.checkDataType)(d.type,s,l.strictNumbers)),kg(t,d),e.length===1&&e[0]===d.type&&r&&(i.else(),(0,Cs.reportTypeError)(t)),i.endIf()):kg(t,d),a||i.if((0,z._)`${Q.default.errors} === ${n||0}`))}}function kg(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,K1.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0,Nu.shouldUseRule)(n,o)&&Mg(t,o.keyword,o.definition,e.type)})}function cS(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(pS(t,e),t.opts.allowUnionTypes||fS(t,e),dS(t,t.dataTypes))}function pS(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Ng(t.dataTypes,r)||Mu(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),mS(t,e)}}function fS(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Mu(t,"use allowUnionTypes to allow union type keyword")}function dS(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,Nu.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(s=>hS(e,s))&&Mu(t,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function hS(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Ng(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function mS(t,e){let r=[];for(let n of t.dataTypes)Ng(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function Mu(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Ut.checkStrictMode)(t,e,t.opts.strictTypes)}var Es=class{constructor(e,r,n){if((0,Ci.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Ut.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",Og(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Ci.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",Q.default.errors))}result(e,r,n){this.failResult((0,z.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,z.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,z._)`${r} !== undefined && (${(0,z.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?ki.reportExtraError:ki.reportError)(this,this.def.error,r)}$dataError(){(0,ki.reportError)(this,this.def.$dataError||ki.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,ki.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=z.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=z.nil,r=z.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:s}=this;n.if((0,z.or)((0,z._)`${i} === undefined`,r)),e!==z.nil&&n.assign(e,!0),(o.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==z.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,z.or)(s(),a());function s(){if(n.length){if(!(r instanceof z.Name))throw new Error("ajv implementation error");let l=Array.isArray(n)?n:[n];return(0,z._)`${(0,Cs.checkDataTypes)(l,r,o.opts.strictNumbers,Cs.DataType.Wrong)}`}return z.nil}function a(){if(i.validateSchema){let l=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,z._)`!${l}(${r})`}return z.nil}}subschema(e,r){let n=(0,Au.getSubschema)(this.it,e);(0,Au.extendSubschemaData)(n,this.it,e),(0,Au.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return rS(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Ut.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Ut.mergeEvaluated.items(i,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(e,z.Name)),!0}};ir.KeywordCxt=Es;function Mg(t,e,r,n){let i=new Es(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Ci.funcKeywordCode)(i,r):"macro"in r?(0,Ci.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Ci.funcKeywordCode)(i,r)}var gS=/^\/(?:[^~]|~0|~1)*$/,yS=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Og(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,o;if(t==="")return Q.default.rootData;if(t[0]==="/"){if(!gS.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=Q.default.rootData}else{let u=yS.exec(t);if(!u)throw new Error(`Invalid JSON-pointer: ${t}`);let f=+u[1];if(i=u[2],i==="#"){if(f>=e)throw new Error(l("property/index",f));return n[e-f]}if(f>e)throw new Error(l("data",f));if(o=r[e-f],!i)return o}let s=o,a=i.split("/");for(let u of a)u&&(o=(0,z._)`${o}${(0,z.getProperty)((0,Ut.unescapeJsonPointer)(u))}`,s=(0,z._)`${s} && ${o}`);return s;function l(u,f){return`Cannot access ${u} ${f} levels up, current level is ${e}`}}ir.getData=Og});var Ps=$(Lu=>{"use strict";Object.defineProperty(Lu,"__esModule",{value:!0});var Ou=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Lu.default=Ou});var Pi=$(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});var Vu=Si(),ju=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Vu.resolveUrl)(e,r,n),this.missingSchema=(0,Vu.normalizeId)((0,Vu.getFullPath)(e,this.missingRef))}};Du.default=ju});var Ii=$(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.resolveSchema=ft.getCompilingSchema=ft.resolveRef=ft.compileSchema=ft.SchemaEnv=void 0;var bt=Z(),vS=Ps(),Cr=ct(),_t=Si(),Lg=ne(),wS=Ei(),bn=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,_t.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};ft.SchemaEnv=bn;function Fu(t){let e=Vg.call(this,t);if(e)return e;let r=(0,_t.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,s=new bt.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),a;t.$async&&(a=s.scopeValue("Error",{ref:vS.default,code:(0,bt._)`require("ajv/dist/runtime/validation_error").default`}));let l=s.scopeName("validate");t.validateName=l;let u={gen:s,allErrors:this.opts.allErrors,data:Cr.default.data,parentData:Cr.default.parentData,parentDataProperty:Cr.default.parentDataProperty,dataNames:[Cr.default.data],dataPathArr:[bt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,bt.stringify)(t.schema)}:{ref:t.schema}),validateName:l,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:bt.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,bt._)`""`,opts:this.opts,self:this},f;try{this._compilations.add(t),(0,wS.validateFunctionCode)(u),s.optimize(this.opts.code.optimize);let p=s.toString();f=`${s.scopeRefs(Cr.default.scope)}return ${p}`,this.opts.code.process&&(f=this.opts.code.process(f,t));let m=new Function(`${Cr.default.self}`,`${Cr.default.scope}`,f)(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}=u;m.evaluated={props:g instanceof bt.Name?void 0:g,items:y instanceof bt.Name?void 0:y,dynamicProps:g instanceof bt.Name,dynamicItems:y instanceof bt.Name},m.source&&(m.source.evaluated=(0,bt.stringify)(m.evaluated))}return t.validate=m,t}catch(p){throw delete t.validate,delete t.validateName,f&&this.logger.error("Error compiling schema, function code:",f),p}finally{this._compilations.delete(t)}}ft.compileSchema=Fu;function bS(t,e,r){var n;r=(0,_t.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let o=$S.call(this,t,r);if(o===void 0){let s=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;s&&(o=new bn({schema:s,schemaId:a,root:t,baseId:e}))}if(o!==void 0)return t.refs[r]=_S.call(this,o)}ft.resolveRef=bS;function _S(t){return(0,_t.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Fu.call(this,t)}function Vg(t){for(let e of this._compilations)if(xS(e,t))return e}ft.getCompilingSchema=Vg;function xS(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function $S(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||Is.call(this,t,e)}function Is(t,e){let r=this.opts.uriResolver.parse(e),n=(0,_t._getFullPath)(this.opts.uriResolver,r),i=(0,_t.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return qu.call(this,r,t);let o=(0,_t.normalizeId)(n),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){let a=Is.call(this,t,s);return typeof a?.schema!="object"?void 0:qu.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||Fu.call(this,s),o===(0,_t.normalizeId)(e)){let{schema:a}=s,{schemaId:l}=this.opts,u=a[l];return u&&(i=(0,_t.resolveUrl)(this.opts.uriResolver,i,u)),new bn({schema:a,schemaId:l,root:t,baseId:i})}return qu.call(this,r,s)}}ft.resolveSchema=Is;var SS=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function qu(t,{baseId:e,schema:r,root:n}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let l=r[(0,Lg.unescapeFragment)(a)];if(l===void 0)return;r=l;let u=typeof r=="object"&&r[this.opts.schemaId];!SS.has(a)&&u&&(e=(0,_t.resolveUrl)(this.opts.uriResolver,e,u))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,Lg.schemaHasRulesButRef)(r,this.RULES)){let a=(0,_t.resolveUrl)(this.opts.uriResolver,e,r.$ref);o=Is.call(this,n,a)}let{schemaId:s}=this.opts;if(o=o||new bn({schema:r,schemaId:s,root:n,baseId:e}),o.schema!==o.root.schema)return o}});var jg=$((MN,kS)=>{kS.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 Wu=$((ON,Wg)=>{"use strict";var CS=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),qg=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),Bu=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Fg=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),ES=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function Hu(t){let e="",r=0,n=0;for(n=0;n<t.length;n++)if(r=t[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n];break}for(n+=1;n<t.length;n++){if(r=t[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n]}return e}var PS=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Dg(t){return t.length=0,!0}function IS(t,e,r){if(t.length){let n=Hu(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function RS(t){let e=0,r={error:!1,address:"",zone:""},n=[],i=[],o=!1,s=!1,a=IS;for(let l=0;l<t.length;l++){let u=t[l];if(!(u==="["||u==="]"))if(u===":"){if(o===!0&&(s=!0),!a(i,n,r))break;if(++e>7){r.error=!0;break}l>0&&t[l-1]===":"&&(o=!0),n.push(":");continue}else if(u==="%"){if(!a(i,n,r))break;a=Dg}else{i.push(u);continue}}return i.length&&(a===Dg?r.zone=i.join(""):s?n.push(i.join("")):n.push(Hu(i))),r.address=n.join(""),r}function Bg(t){if(TS(t,":")<2)return{host:t,isIPV6:!1};let e=RS(t);if(e.error)return{host:t,isIPV6:!1};{let r=e.address,n=e.address;return e.zone&&(r+="%"+e.zone,n+="%25"+e.zone),{host:r,isIPV6:!0,escapedHost:n}}}function TS(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function AS(t){let e=t,r=[],n=-1,i=0;for(;i=e.length;){if(i===1){if(e===".")break;if(e==="/"){r.push("/");break}else{r.push(e);break}}else if(i===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){r.push("/");break}}else if(i===3&&e==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),r.length!==0&&r.pop();continue}}if((n=e.indexOf("/",1))===-1){r.push(e);break}else r.push(e.slice(0,n)),e=e.slice(n)}return r.join("")}var NS={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},MS=/[@/?#:]/g,OS=/[@/?#]/g;function Hg(t,e){let r=e?OS:MS;return r.lastIndex=0,t.replace(r,n=>NS[n])}function LS(t,e=!1){if(t.indexOf("%")===-1)return t;let r="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){let i=t.slice(n+1,n+3);if(Bu(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));e&&Fg(s)?r+=s:r+="%"+o,n+=2;continue}}r+=t[n]}return r}function VS(t){let e="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let n=t.slice(r+1,r+3);if(Bu(n)){let i=n.toUpperCase(),o=String.fromCharCode(parseInt(i,16));o!=="."&&Fg(o)?e+=o:e+="%"+i,r+=2;continue}}ES(t[r])?e+=t[r]:e+=escape(t[r])}return e}function jS(t){let e="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let n=t.slice(r+1,r+3);if(Bu(n)){e+="%"+n.toUpperCase(),r+=2;continue}}e+=escape(t[r])}return e}function DS(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!qg(r)){let n=Bg(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=Hg(r,!1)}e.push(r)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}Wg.exports={nonSimpleDomain:PS,recomposeAuthority:DS,reescapeHostDelimiters:Hg,normalizePercentEncoding:LS,normalizePathEncoding:VS,escapePreservingEscapes:jS,removeDotSegments:AS,isIPv4:qg,isUUID:CS,normalizeIPv6:Bg,stringArrayToHexStripped:Hu}});var Kg=$((LN,Jg)=>{"use strict";var{isUUID:qS}=Wu(),FS=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,BS=["http","https","ws","wss","urn","urn:uuid"];function HS(t){return BS.indexOf(t)!==-1}function zu(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 zg(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function Ug(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 WS(t){return t.secure=zu(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function zS(t){if((t.port===(zu(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}function US(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(FS);if(r){let n=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let i=`${n}:${e.nid||t.nid}`,o=Uu(i);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function GS(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=e.scheme||t.scheme||"urn",n=t.nid.toLowerCase(),i=`${r}:${e.nid||n}`,o=Uu(i);o&&(t=o.serialize(t,e));let s=t,a=t.nss;return s.path=`${n||e.nid}:${a}`,e.skipEscape=!0,s}function JS(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!qS(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function KS(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var Gg={scheme:"http",domainHost:!0,parse:zg,serialize:Ug},YS={scheme:"https",domainHost:Gg.domainHost,parse:zg,serialize:Ug},Rs={scheme:"ws",domainHost:!0,parse:WS,serialize:zS},XS={scheme:"wss",domainHost:Rs.domainHost,parse:Rs.parse,serialize:Rs.serialize},QS={scheme:"urn",parse:US,serialize:GS,skipNormalize:!0},ZS={scheme:"urn:uuid",parse:JS,serialize:KS,skipNormalize:!0},Ts={http:Gg,https:YS,ws:Rs,wss:XS,urn:QS,"urn:uuid":ZS};Object.setPrototypeOf(Ts,null);function Uu(t){return t&&(Ts[t]||Ts[t.toLowerCase()])||void 0}Jg.exports={wsIsSecure:zu,SCHEMES:Ts,isValidSchemeName:HS,getSchemeHandler:Uu}});var ty=$((VN,As)=>{"use strict";var{normalizeIPv6:ek,removeDotSegments:Ri,recomposeAuthority:tk,normalizePercentEncoding:rk,normalizePathEncoding:nk,escapePreservingEscapes:ik,reescapeHostDelimiters:ok,isIPv4:sk,nonSimpleDomain:ak}=Wu(),{SCHEMES:lk,getSchemeHandler:Xg}=Kg();function uk(t,e){return typeof t=="string"?t=hk(t,e):typeof t=="object"&&(t=_n(Er(t,e),e)),t}function ck(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=Qg(_n(t,n),_n(e,n),n,!0);return n.skipEscape=!0,Er(i,n)}function Qg(t,e,r,n){let i={};return n||(t=_n(Er(t,r),r),e=_n(Er(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(i.scheme=e.scheme,i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=Ri(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=Ri(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=Ri(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=Ri(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 pk(t,e,r){let n=Yg(t,r),i=Yg(e,r);return n!==void 0&&i!==void 0&&n.toLowerCase()===i.toLowerCase()}function Er(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},n=Object.assign({},e),i=[],o=Xg(n.scheme||r.scheme);o&&o.serialize&&o.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=rk(r.path):(r.path=ik(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let s=tk(r);if(s!==void 0&&(n.reference!=="suffix"&&i.push("//"),i.push(s),r.path&&r.path[0]!=="/"&&i.push("/")),r.path!==void 0){let a=r.path;!n.absolutePath&&(!o||!o.absolutePath)&&(a=Ri(a)),s===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),i.push(a)}return r.query!==void 0&&i.push("?",r.query),r.fragment!==void 0&&i.push("#",r.fragment),i.join("")}var fk=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function dk(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 Zg(t,e){let r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1,o=!1;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);let s=t.match(fk);if(s){n.scheme=s[1],n.userinfo=s[3],n.host=s[4],n.port=parseInt(s[5],10),n.path=s[6]||"",n.query=s[7],n.fragment=s[8],isNaN(n.port)&&(n.port=s[5]);let a=dk(n,s);if(a!==void 0&&(n.error=n.error||a,i=!0),n.host)if(sk(n.host)===!1){let f=ek(n.host);n.host=f.host.toLowerCase(),o=f.isIPV6}else o=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let l=Xg(r.scheme||n.scheme);if(!r.unicodeSupport&&(!l||!l.unicodeSupport)&&n.host&&(r.domainHost||l&&l.domainHost)&&o===!1&&ak(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(u){n.error=n.error||"Host's domain name can not be converted to ASCII: "+u}if((!l||l&&!l.skipNormalize)&&(t.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=ok(unescape(n.host),o))),n.path&&(n.path=nk(n.path)),n.fragment))try{n.fragment=encodeURI(decodeURIComponent(n.fragment))}catch{n.error=n.error||"URI malformed"}l&&l.parse&&l.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:i}}function _n(t,e){return Zg(t,e).parsed}function hk(t,e){return ey(t,e).normalized}function ey(t,e){let{parsed:r,malformedAuthorityOrPort:n}=Zg(t,e);return{normalized:n?t:Er(r,e),malformedAuthorityOrPort:n}}function Yg(t,e){if(typeof t=="string"){let{normalized:r,malformedAuthorityOrPort:n}=ey(t,e);return n?void 0:r}if(typeof t=="object")return Er(t,e)}var Gu={SCHEMES:lk,normalize:uk,resolve:ck,resolveComponent:Qg,equal:pk,serialize:Er,parse:_n};As.exports=Gu;As.exports.default=Gu;As.exports.fastUri=Gu});var ny=$(Ju=>{"use strict";Object.defineProperty(Ju,"__esModule",{value:!0});var ry=ty();ry.code='require("ajv/dist/runtime/uri").default';Ju.default=ry});var py=$(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.CodeGen=Me.Name=Me.nil=Me.stringify=Me.str=Me._=Me.KeywordCxt=void 0;var mk=Ei();Object.defineProperty(Me,"KeywordCxt",{enumerable:!0,get:function(){return mk.KeywordCxt}});var xn=Z();Object.defineProperty(Me,"_",{enumerable:!0,get:function(){return xn._}});Object.defineProperty(Me,"str",{enumerable:!0,get:function(){return xn.str}});Object.defineProperty(Me,"stringify",{enumerable:!0,get:function(){return xn.stringify}});Object.defineProperty(Me,"nil",{enumerable:!0,get:function(){return xn.nil}});Object.defineProperty(Me,"Name",{enumerable:!0,get:function(){return xn.Name}});Object.defineProperty(Me,"CodeGen",{enumerable:!0,get:function(){return xn.CodeGen}});var gk=Ps(),ly=Pi(),yk=xu(),Ti=Ii(),vk=Z(),Ai=Si(),Ns=$i(),Yu=ne(),iy=jg(),wk=ny(),uy=(t,e)=>new RegExp(t,e);uy.code="new RegExp";var bk=["removeAdditional","useDefaults","coerceTypes"],_k=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),xk={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."},$k={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},oy=200;function Sk(t){var e,r,n,i,o,s,a,l,u,f,p,d,m,g,y,v,w,R,O,I,A,L,W,ie,we;let be=t.strict,Re=(e=t.code)===null||e===void 0?void 0:e.optimize,_e=Re===!0||Re===void 0?1:Re||0,Ge=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:uy,Je=(i=t.uriResolver)!==null&&i!==void 0?i:wk.default;return{strictSchema:(s=(o=t.strictSchema)!==null&&o!==void 0?o:be)!==null&&s!==void 0?s:!0,strictNumbers:(l=(a=t.strictNumbers)!==null&&a!==void 0?a:be)!==null&&l!==void 0?l:!0,strictTypes:(f=(u=t.strictTypes)!==null&&u!==void 0?u:be)!==null&&f!==void 0?f:"log",strictTuples:(d=(p=t.strictTuples)!==null&&p!==void 0?p:be)!==null&&d!==void 0?d:"log",strictRequired:(g=(m=t.strictRequired)!==null&&m!==void 0?m:be)!==null&&g!==void 0?g:!1,code:t.code?{...t.code,optimize:_e,regExp:Ge}:{optimize:_e,regExp:Ge},loopRequired:(y=t.loopRequired)!==null&&y!==void 0?y:oy,loopEnum:(v=t.loopEnum)!==null&&v!==void 0?v:oy,meta:(w=t.meta)!==null&&w!==void 0?w:!0,messages:(R=t.messages)!==null&&R!==void 0?R:!0,inlineRefs:(O=t.inlineRefs)!==null&&O!==void 0?O:!0,schemaId:(I=t.schemaId)!==null&&I!==void 0?I:"$id",addUsedSchema:(A=t.addUsedSchema)!==null&&A!==void 0?A:!0,validateSchema:(L=t.validateSchema)!==null&&L!==void 0?L:!0,validateFormats:(W=t.validateFormats)!==null&&W!==void 0?W:!0,unicodeRegExp:(ie=t.unicodeRegExp)!==null&&ie!==void 0?ie:!0,int32range:(we=t.int32range)!==null&&we!==void 0?we:!0,uriResolver:Je}}var Ni=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,...Sk(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new vk.ValueScope({scope:{},prefixes:_k,es5:r,lines:n}),this.logger=Rk(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,yk.getRules)(),sy.call(this,xk,e,"NOT SUPPORTED"),sy.call(this,$k,e,"DEPRECATED","warn"),this._metaOpts=Pk.call(this),e.formats&&Ck.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Ek.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),kk.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=iy;n==="id"&&(i={...iy},i.id=i.$id,delete i.$id),r&&e&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,e,r);async function i(f,p){await o.call(this,f.$schema);let d=this._addSchema(f,p);return d.validate||s.call(this,d)}async function o(f){f&&!this.getSchema(f)&&await i.call(this,{$ref:f},!0)}async function s(f){try{return this._compileSchemaEnv(f)}catch(p){if(!(p instanceof ly.default))throw p;return a.call(this,p),await l.call(this,p.missingSchema),s.call(this,f)}}function a({missingSchema:f,missingRef:p}){if(this.refs[f])throw new Error(`AnySchema ${f} is loaded but ${p} cannot be resolved`)}async function l(f){let p=await u.call(this,f);this.refs[f]||await o.call(this,p.$schema),this.refs[f]||this.addSchema(p,f,r)}async function u(f){let p=this._loading[f];if(p)return p;try{return await(this._loading[f]=n(f))}finally{delete this._loading[f]}}}addSchema(e,r,n,i=this.opts.validateSchema){if(Array.isArray(e)){for(let s of e)this.addSchema(s,void 0,n,i);return this}let o;if(typeof e=="object"){let{schemaId:s}=this.opts;if(o=e[s],o!==void 0&&typeof o!="string")throw new Error(`schema ${s} must be string`)}return r=(0,Ai.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,i,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,e);if(!i&&r){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return i}getSchema(e){let r;for(;typeof(r=ay.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new Ti.SchemaEnv({schema:{},schemaId:n});if(r=Ti.resolveSchema.call(this,i,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=ay.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,Ai.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Ak.call(this,n,r),!r)return(0,Yu.eachItem)(n,o=>Ku.call(this,o)),this;Mk.call(this,r);let i={...r,type:(0,Ns.getJSONTypes)(r.type),schemaType:(0,Ns.getJSONTypes)(r.schemaType)};return(0,Yu.eachItem)(n,i.type.length===0?o=>Ku.call(this,o,i):o=>i.type.forEach(s=>Ku.call(this,o,i,s))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===e);i>=0&&n.rules.splice(i,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of r){let o=i.split("/").slice(1),s=e;for(let a of o)s=s[a];for(let a in n){let l=n[a];if(typeof l!="object")continue;let{$data:u}=l.definition,f=s[a];u&&f&&(s[a]=cy(f))}}return e}_removeAllSchemas(e,r){for(let n in e){let i=e[n];(!r||r.test(n))&&(typeof i=="string"?delete e[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[n]))}}_addSchema(e,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof e=="object")s=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let l=this._cache.get(e);if(l!==void 0)return l;n=(0,Ai.normalizeId)(s||n);let u=Ai.getSchemaRefs.call(this,e,n);return l=new Ti.SchemaEnv({schema:e,schemaId:a,meta:r,baseId:n,localRefs:u}),this._cache.set(l.schema,l),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=l),i&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):Ti.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{Ti.compileSchema.call(this,e)}finally{this.opts=r}}};Ni.ValidationError=gk.default;Ni.MissingRefError=ly.default;Me.default=Ni;function sy(t,e,r,n="error"){for(let i in t){let o=i;o in e&&this.logger[n](`${r}: option ${i}. ${t[o]}`)}}function ay(t){return t=(0,Ai.normalizeId)(t),this.schemas[t]||this.refs[t]}function kk(){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 Ck(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function Ek(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function Pk(){let t={...this.opts};for(let e of bk)delete t[e];return t}var Ik={log(){},warn(){},error(){}};function Rk(t){if(t===!1)return Ik;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 Tk=/^[a-z_$][a-z0-9_$:-]*$/i;function Ak(t,e){let{RULES:r}=this;if((0,Yu.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!Tk.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function Ku(t,e,r){var n;let i=e?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,s=i?o.post:o.rules.find(({type:l})=>l===r);if(s||(s={type:r,rules:[]},o.rules.push(s)),o.keywords[t]=!0,!e)return;let a={keyword:t,definition:{...e,type:(0,Ns.getJSONTypes)(e.type),schemaType:(0,Ns.getJSONTypes)(e.schemaType)}};e.before?Nk.call(this,s,a,e.before):s.rules.push(a),o.all[t]=a,(n=e.implements)===null||n===void 0||n.forEach(l=>this.addKeyword(l))}function Nk(t,e,r){let n=t.rules.findIndex(i=>i.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function Mk(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=cy(e)),t.validateSchema=this.compile(e,!0))}var Ok={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function cy(t){return{anyOf:[t,Ok]}}});var fy=$(Xu=>{"use strict";Object.defineProperty(Xu,"__esModule",{value:!0});var Lk={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Xu.default=Lk});var Ls=$(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.callRef=Pr.getValidate=void 0;var Vk=Pi(),dy=pt(),Qe=Z(),$n=ct(),hy=Ii(),Ms=ne(),jk={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:o,validateName:s,opts:a,self:l}=n,{root:u}=o;if((r==="#"||r==="#/")&&i===u.baseId)return p();let f=hy.resolveRef.call(l,u,i,r);if(f===void 0)throw new Vk.default(n.opts.uriResolver,i,r);if(f instanceof hy.SchemaEnv)return d(f);return m(f);function p(){if(o===u)return Os(t,s,o,o.$async);let g=e.scopeValue("root",{ref:u});return Os(t,(0,Qe._)`${g}.validate`,u,u.$async)}function d(g){let y=my(t,g);Os(t,y,g,g.$async)}function m(g){let y=e.scopeValue("schema",a.code.source===!0?{ref:g,code:(0,Qe.stringify)(g)}:{ref:g}),v=e.name("valid"),w=t.subschema({schema:g,dataTypes:[],schemaPath:Qe.nil,topSchemaRef:y,errSchemaPath:r},v);t.mergeEvaluated(w),t.ok(v)}}};function my(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,Qe._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Pr.getValidate=my;function Os(t,e,r,n){let{gen:i,it:o}=t,{allErrors:s,schemaEnv:a,opts:l}=o,u=l.passContext?$n.default.this:Qe.nil;n?f():p();function f(){if(!a.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,Qe._)`await ${(0,dy.callValidateCode)(t,e,u)}`),m(e),s||i.assign(g,!0)},y=>{i.if((0,Qe._)`!(${y} instanceof ${o.ValidationError})`,()=>i.throw(y)),d(y),s||i.assign(g,!1)}),t.ok(g)}function p(){t.result((0,dy.callValidateCode)(t,e,u),()=>m(e),()=>d(e))}function d(g){let y=(0,Qe._)`${g}.errors`;i.assign($n.default.vErrors,(0,Qe._)`${$n.default.vErrors} === null ? ${y} : ${$n.default.vErrors}.concat(${y})`),i.assign($n.default.errors,(0,Qe._)`${$n.default.vErrors}.length`)}function m(g){var y;if(!o.opts.unevaluated)return;let v=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(v&&!v.dynamicProps)v.props!==void 0&&(o.props=Ms.mergeEvaluated.props(i,v.props,o.props));else{let w=i.var("props",(0,Qe._)`${g}.evaluated.props`);o.props=Ms.mergeEvaluated.props(i,w,o.props,Qe.Name)}if(o.items!==!0)if(v&&!v.dynamicItems)v.items!==void 0&&(o.items=Ms.mergeEvaluated.items(i,v.items,o.items));else{let w=i.var("items",(0,Qe._)`${g}.evaluated.items`);o.items=Ms.mergeEvaluated.items(i,w,o.items,Qe.Name)}}}Pr.callRef=Os;Pr.default=jk});var gy=$(Qu=>{"use strict";Object.defineProperty(Qu,"__esModule",{value:!0});var Dk=fy(),qk=Ls(),Fk=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Dk.default,qk.default];Qu.default=Fk});var yy=$(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});var Vs=Z(),or=Vs.operators,js={maximum:{okStr:"<=",ok:or.LTE,fail:or.GT},minimum:{okStr:">=",ok:or.GTE,fail:or.LT},exclusiveMaximum:{okStr:"<",ok:or.LT,fail:or.GTE},exclusiveMinimum:{okStr:">",ok:or.GT,fail:or.LTE}},Bk={message:({keyword:t,schemaCode:e})=>(0,Vs.str)`must be ${js[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Vs._)`{comparison: ${js[t].okStr}, limit: ${e}}`},Hk={keyword:Object.keys(js),type:"number",schemaType:"number",$data:!0,error:Bk,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,Vs._)`${r} ${js[e].fail} ${n} || isNaN(${r})`)}};Zu.default=Hk});var vy=$(ec=>{"use strict";Object.defineProperty(ec,"__esModule",{value:!0});var Mi=Z(),Wk={message:({schemaCode:t})=>(0,Mi.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Mi._)`{multipleOf: ${t}}`},zk={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Wk,code(t){let{gen:e,data:r,schemaCode:n,it:i}=t,o=i.opts.multipleOfPrecision,s=e.let("res"),a=o?(0,Mi._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,Mi._)`${s} !== parseInt(${s})`;t.fail$data((0,Mi._)`(${n} === 0 || (${s} = ${r}/${n}, ${a}))`)}};ec.default=zk});var by=$(tc=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});function wy(t){let e=t.length,r=0,n=0,i;for(;n<e;)r++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<e&&(i=t.charCodeAt(n),(i&64512)===56320&&n++);return r}tc.default=wy;wy.code='require("ajv/dist/runtime/ucs2length").default'});var _y=$(rc=>{"use strict";Object.defineProperty(rc,"__esModule",{value:!0});var Ir=Z(),Uk=ne(),Gk=by(),Jk={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,Ir.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,Ir._)`{limit: ${t}}`},Kk={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Jk,code(t){let{keyword:e,data:r,schemaCode:n,it:i}=t,o=e==="maxLength"?Ir.operators.GT:Ir.operators.LT,s=i.opts.unicode===!1?(0,Ir._)`${r}.length`:(0,Ir._)`${(0,Uk.useFunc)(t.gen,Gk.default)}(${r})`;t.fail$data((0,Ir._)`${s} ${o} ${n}`)}};rc.default=Kk});var xy=$(nc=>{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});var Yk=pt(),Xk=ne(),Sn=Z(),Qk={message:({schemaCode:t})=>(0,Sn.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Sn._)`{pattern: ${t}}`},Zk={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Qk,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:s}=t,a=s.opts.unicodeRegExp?"u":"";if(n){let{regExp:l}=s.opts.code,u=l.code==="new RegExp"?(0,Sn._)`new RegExp`:(0,Xk.useFunc)(e,l),f=e.let("valid");e.try(()=>e.assign(f,(0,Sn._)`${u}(${o}, ${a}).test(${r})`),()=>e.assign(f,!1)),t.fail$data((0,Sn._)`!${f}`)}else{let l=(0,Yk.usePattern)(t,i);t.fail$data((0,Sn._)`!${l}.test(${r})`)}}};nc.default=Zk});var $y=$(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var Oi=Z(),eC={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,Oi.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Oi._)`{limit: ${t}}`},tC={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:eC,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?Oi.operators.GT:Oi.operators.LT;t.fail$data((0,Oi._)`Object.keys(${r}).length ${i} ${n}`)}};ic.default=tC});var Sy=$(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});var Li=pt(),Vi=Z(),rC=ne(),nC={message:({params:{missingProperty:t}})=>(0,Vi.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Vi._)`{missingProperty: ${t}}`},iC={keyword:"required",type:"object",schemaType:"array",$data:!0,error:nC,code(t){let{gen:e,schema:r,schemaCode:n,data:i,$data:o,it:s}=t,{opts:a}=s;if(!o&&r.length===0)return;let l=r.length>=a.loopRequired;if(s.allErrors?u():f(),a.strictRequired){let m=t.parentSchema.properties,{definedProperties:g}=t.it;for(let y of r)if(m?.[y]===void 0&&!g.has(y)){let v=s.schemaEnv.baseId+s.errSchemaPath,w=`required property "${y}" is not defined at "${v}" (strictRequired)`;(0,rC.checkStrictMode)(s,w,s.opts.strictRequired)}}function u(){if(l||o)t.block$data(Vi.nil,p);else for(let m of r)(0,Li.checkReportMissingProp)(t,m)}function f(){let m=e.let("missing");if(l||o){let g=e.let("valid",!0);t.block$data(g,()=>d(m,g)),t.ok(g)}else e.if((0,Li.checkMissingProp)(t,r,m)),(0,Li.reportMissingProp)(t,m),e.else()}function p(){e.forOf("prop",n,m=>{t.setParams({missingProperty:m}),e.if((0,Li.noPropertyInData)(e,i,m,a.ownProperties),()=>t.error())})}function d(m,g){t.setParams({missingProperty:m}),e.forOf(m,n,()=>{e.assign(g,(0,Li.propertyInData)(e,i,m,a.ownProperties)),e.if((0,Vi.not)(g),()=>{t.error(),e.break()})},Vi.nil)}}};oc.default=iC});var ky=$(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});var ji=Z(),oC={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,ji.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,ji._)`{limit: ${t}}`},sC={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:oC,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?ji.operators.GT:ji.operators.LT;t.fail$data((0,ji._)`${r}.length ${i} ${n}`)}};sc.default=sC});var Ds=$(ac=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});var Cy=Ru();Cy.code='require("ajv/dist/runtime/equal").default';ac.default=Cy});var Ey=$(uc=>{"use strict";Object.defineProperty(uc,"__esModule",{value:!0});var lc=$i(),Oe=Z(),aC=ne(),lC=Ds(),uC={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}}`},cC={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:uC,code(t){let{gen:e,data:r,$data:n,schema:i,parentSchema:o,schemaCode:s,it:a}=t;if(!n&&!i)return;let l=e.let("valid"),u=o.items?(0,lc.getSchemaTypes)(o.items):[];t.block$data(l,f,(0,Oe._)`${s} === false`),t.ok(l);function f(){let g=e.let("i",(0,Oe._)`${r}.length`),y=e.let("j");t.setParams({i:g,j:y}),e.assign(l,!0),e.if((0,Oe._)`${g} > 1`,()=>(p()?d:m)(g,y))}function p(){return u.length>0&&!u.some(g=>g==="object"||g==="array")}function d(g,y){let v=e.name("item"),w=(0,lc.checkDataTypes)(u,v,a.opts.strictNumbers,lc.DataType.Wrong),R=e.const("indices",(0,Oe._)`{}`);e.for((0,Oe._)`;${g}--;`,()=>{e.let(v,(0,Oe._)`${r}[${g}]`),e.if(w,(0,Oe._)`continue`),u.length>1&&e.if((0,Oe._)`typeof ${v} == "string"`,(0,Oe._)`${v} += "_"`),e.if((0,Oe._)`typeof ${R}[${v}] == "number"`,()=>{e.assign(y,(0,Oe._)`${R}[${v}]`),t.error(),e.assign(l,!1).break()}).code((0,Oe._)`${R}[${v}] = ${g}`)})}function m(g,y){let v=(0,aC.useFunc)(e,lC.default),w=e.name("outer");e.label(w).for((0,Oe._)`;${g}--;`,()=>e.for((0,Oe._)`${y} = ${g}; ${y}--;`,()=>e.if((0,Oe._)`${v}(${r}[${g}], ${r}[${y}])`,()=>{t.error(),e.assign(l,!1).break(w)})))}}};uc.default=cC});var Py=$(pc=>{"use strict";Object.defineProperty(pc,"__esModule",{value:!0});var cc=Z(),pC=ne(),fC=Ds(),dC={message:"must be equal to constant",params:({schemaCode:t})=>(0,cc._)`{allowedValue: ${t}}`},hC={keyword:"const",$data:!0,error:dC,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:o}=t;n||o&&typeof o=="object"?t.fail$data((0,cc._)`!${(0,pC.useFunc)(e,fC.default)}(${r}, ${i})`):t.fail((0,cc._)`${o} !== ${r}`)}};pc.default=hC});var Iy=$(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});var Di=Z(),mC=ne(),gC=Ds(),yC={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Di._)`{allowedValues: ${t}}`},vC={keyword:"enum",schemaType:"array",$data:!0,error:yC,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:s}=t;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let a=i.length>=s.opts.loopEnum,l,u=()=>l??(l=(0,mC.useFunc)(e,gC.default)),f;if(a||n)f=e.let("valid"),t.block$data(f,p);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=e.const("vSchema",o);f=(0,Di.or)(...i.map((g,y)=>d(m,y)))}t.pass(f);function p(){e.assign(f,!1),e.forOf("v",o,m=>e.if((0,Di._)`${u()}(${r}, ${m})`,()=>e.assign(f,!0).break()))}function d(m,g){let y=i[g];return typeof y=="object"&&y!==null?(0,Di._)`${u()}(${r}, ${m}[${g}])`:(0,Di._)`${r} === ${y}`}}};fc.default=vC});var Ry=$(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});var wC=yy(),bC=vy(),_C=_y(),xC=xy(),$C=$y(),SC=Sy(),kC=ky(),CC=Ey(),EC=Py(),PC=Iy(),IC=[wC.default,bC.default,_C.default,xC.default,$C.default,SC.default,kC.default,CC.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},EC.default,PC.default];dc.default=IC});var mc=$(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.validateAdditionalItems=void 0;var Rr=Z(),hc=ne(),RC={message:({params:{len:t}})=>(0,Rr.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Rr._)`{limit: ${t}}`},TC={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:RC,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,hc.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Ty(t,n)}};function Ty(t,e){let{gen:r,schema:n,data:i,keyword:o,it:s}=t;s.items=!0;let a=r.const("len",(0,Rr._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,Rr._)`${a} <= ${e.length}`);else if(typeof n=="object"&&!(0,hc.alwaysValidSchema)(s,n)){let u=r.var("valid",(0,Rr._)`${a} <= ${e.length}`);r.if((0,Rr.not)(u),()=>l(u)),t.ok(u)}function l(u){r.forRange("i",e.length,a,f=>{t.subschema({keyword:o,dataProp:f,dataPropType:hc.Type.Num},u),s.allErrors||r.if((0,Rr.not)(u),()=>r.break())})}}qi.validateAdditionalItems=Ty;qi.default=TC});var gc=$(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.validateTuple=void 0;var Ay=Z(),qs=ne(),AC=pt(),NC={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return Ny(t,"additionalItems",e);r.items=!0,!(0,qs.alwaysValidSchema)(r,e)&&t.ok((0,AC.validateArray)(t))}};function Ny(t,e,r=t.schema){let{gen:n,parentSchema:i,data:o,keyword:s,it:a}=t;f(i),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=qs.mergeEvaluated.items(n,r.length,a.items));let l=n.name("valid"),u=n.const("len",(0,Ay._)`${o}.length`);r.forEach((p,d)=>{(0,qs.alwaysValidSchema)(a,p)||(n.if((0,Ay._)`${u} > ${d}`,()=>t.subschema({keyword:s,schemaProp:d,dataProp:d},l)),t.ok(l))});function f(p){let{opts:d,errSchemaPath:m}=a,g=r.length,y=g===p.minItems&&(g===p.maxItems||p[e]===!1);if(d.strictTuples&&!y){let v=`"${s}" is ${g}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,qs.checkStrictMode)(a,v,d.strictTuples)}}}Fi.validateTuple=Ny;Fi.default=NC});var My=$(yc=>{"use strict";Object.defineProperty(yc,"__esModule",{value:!0});var MC=gc(),OC={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,MC.validateTuple)(t,"items")};yc.default=OC});var Ly=$(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});var Oy=Z(),LC=ne(),VC=pt(),jC=mc(),DC={message:({params:{len:t}})=>(0,Oy.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Oy._)`{limit: ${t}}`},qC={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:DC,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,LC.alwaysValidSchema)(n,e)&&(i?(0,jC.validateAdditionalItems)(t,i):t.ok((0,VC.validateArray)(t)))}};vc.default=qC});var Vy=$(wc=>{"use strict";Object.defineProperty(wc,"__esModule",{value:!0});var dt=Z(),Fs=ne(),FC={message:({params:{min:t,max:e}})=>e===void 0?(0,dt.str)`must contain at least ${t} valid item(s)`:(0,dt.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,dt._)`{minContains: ${t}}`:(0,dt._)`{minContains: ${t}, maxContains: ${e}}`},BC={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:FC,code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t,s,a,{minContains:l,maxContains:u}=n;o.opts.next?(s=l===void 0?1:l,a=u):s=1;let f=e.const("len",(0,dt._)`${i}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,Fs.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,Fs.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,Fs.alwaysValidSchema)(o,r)){let y=(0,dt._)`${f} >= ${s}`;a!==void 0&&(y=(0,dt._)`${y} && ${f} <= ${a}`),t.pass(y);return}o.items=!0;let p=e.name("valid");a===void 0&&s===1?m(p,()=>e.if(p,()=>e.break())):s===0?(e.let(p,!0),a!==void 0&&e.if((0,dt._)`${i}.length > 0`,d)):(e.let(p,!1),d()),t.result(p,()=>t.reset());function d(){let y=e.name("_valid"),v=e.let("count",0);m(y,()=>e.if(y,()=>g(v)))}function m(y,v){e.forRange("i",0,f,w=>{t.subschema({keyword:"contains",dataProp:w,dataPropType:Fs.Type.Num,compositeRule:!0},y),v()})}function g(y){e.code((0,dt._)`${y}++`),a===void 0?e.if((0,dt._)`${y} >= ${s}`,()=>e.assign(p,!0).break()):(e.if((0,dt._)`${y} > ${a}`,()=>e.assign(p,!1).break()),s===1?e.assign(p,!0):e.if((0,dt._)`${y} >= ${s}`,()=>e.assign(p,!0)))}}};wc.default=BC});var Bs=$(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.validateSchemaDeps=It.validatePropertyDeps=It.error=void 0;var bc=Z(),HC=ne(),Bi=pt();It.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,bc.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,bc._)`{property: ${t},
279
392
  missingProperty: ${n},
280
393
  depsCount: ${e},
281
- deps: ${r}}`};var Zx={keyword:"dependencies",type:"object",schemaType:"object",error:_t.error,code(t){let[e,r]=ek(t);Cg(t,e),Ig(t,r)}};function ek({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let i=Array.isArray(t[n])?e:r;i[n]=t[n]}return[e,r]}function Cg(t,e=t.schema){let{gen:r,data:n,it:i}=t;if(Object.keys(e).length===0)return;let o=r.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let u=(0,$i.propertyInData)(r,n,s,i.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),i.allErrors?r.if(u,()=>{for(let c of a)(0,$i.checkReportMissingProp)(t,c)}):(r.if((0,Bc._)`${u} && (${(0,$i.checkMissingProp)(t,a,o)})`),(0,$i.reportMissingProp)(t,o),r.else())}}_t.validatePropertyDeps=Cg;function Ig(t,e=t.schema){let{gen:r,data:n,keyword:i,it:o}=t,s=r.name("valid");for(let a in e)(0,Qx.alwaysValidSchema)(o,e[a])||(r.if((0,$i.propertyInData)(r,n,a,o.opts.ownProperties),()=>{let u=t.subschema({keyword:i,schemaProp:a},s);t.mergeValidEvaluated(u,s)},()=>r.var(s,!0)),t.ok(s))}_t.validateSchemaDeps=Ig;_t.default=Zx});var Ng=$(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});var Rg=Y(),tk=te(),rk={message:"property name must be valid",params:({params:t})=>(0,Rg._)`{propertyName: ${t.propertyName}}`},nk={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:rk,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,tk.alwaysValidSchema)(i,r))return;let o=e.name("valid");e.forIn("key",n,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),e.if((0,Rg.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};Hc.default=nk});var zc=$(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});var ys=tt(),dt=Y(),ik=et(),vs=te(),ok={message:"must NOT have additional properties",params:({params:t})=>(0,dt._)`{additionalProperty: ${t.additionalProperty}}`},sk={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:ok,code(t){let{gen:e,schema:r,parentSchema:n,data:i,errsCount:o,it:s}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:a,opts:u}=s;if(s.props=!0,u.removeAdditional!=="all"&&(0,vs.alwaysValidSchema)(s,r))return;let c=(0,ys.allSchemaProperties)(n.properties),p=(0,ys.allSchemaProperties)(n.patternProperties);f(),t.ok((0,dt._)`${o} === ${ik.default.errors}`);function f(){e.forIn("key",i,_=>{!c.length&&!p.length?g(_):e.if(d(_),()=>g(_))})}function d(_){let b;if(c.length>8){let L=(0,vs.schemaRefOrVal)(s,n.properties,"properties");b=(0,ys.isOwnProperty)(e,L,_)}else c.length?b=(0,dt.or)(...c.map(L=>(0,dt._)`${_} === ${L}`)):b=dt.nil;return p.length&&(b=(0,dt.or)(b,...p.map(L=>(0,dt._)`${(0,ys.usePattern)(t,L)}.test(${_})`))),(0,dt.not)(b)}function m(_){e.code((0,dt._)`delete ${i}[${_}]`)}function g(_){if(u.removeAdditional==="all"||u.removeAdditional&&r===!1){m(_);return}if(r===!1){t.setParams({additionalProperty:_}),t.error(),a||e.break();return}if(typeof r=="object"&&!(0,vs.alwaysValidSchema)(s,r)){let b=e.name("valid");u.removeAdditional==="failing"?(y(_,b,!1),e.if((0,dt.not)(b),()=>{t.reset(),m(_)})):(y(_,b),a||e.if((0,dt.not)(b),()=>e.break()))}}function y(_,b,L){let q={keyword:"additionalProperties",dataProp:_,dataPropType:vs.Type.Str};L===!1&&Object.assign(q,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(q,b)}}};Uc.default=sk});var Og=$(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});var ak=li(),Tg=tt(),Wc=te(),Ag=zc(),lk={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Ag.default.code(new ak.KeywordCxt(o,Ag.default,"additionalProperties"));let s=(0,Tg.allSchemaProperties)(r);for(let f of s)o.definedProperties.add(f);o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=Wc.mergeEvaluated.props(e,(0,Wc.toHash)(s),o.props));let a=s.filter(f=>!(0,Wc.alwaysValidSchema)(o,r[f]));if(a.length===0)return;let u=e.name("valid");for(let f of a)c(f)?p(f):(e.if((0,Tg.propertyInData)(e,i,f,o.opts.ownProperties)),p(f),o.allErrors||e.else().var(u,!0),e.endIf()),t.it.definedProperties.add(f),t.ok(u);function c(f){return o.opts.useDefaults&&!o.compositeRule&&r[f].default!==void 0}function p(f){t.subschema({keyword:"properties",schemaProp:f,dataProp:f},u)}}};Gc.default=lk});var Vg=$(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});var Mg=tt(),ws=Y(),Lg=te(),jg=te(),ck={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:i,it:o}=t,{opts:s}=o,a=(0,Mg.allSchemaProperties)(r),u=a.filter(y=>(0,Lg.alwaysValidSchema)(o,r[y]));if(a.length===0||u.length===a.length&&(!o.opts.unevaluated||o.props===!0))return;let c=s.strictSchema&&!s.allowMatchingProperties&&i.properties,p=e.name("valid");o.props!==!0&&!(o.props instanceof ws.Name)&&(o.props=(0,jg.evaluatedPropsToName)(e,o.props));let{props:f}=o;d();function d(){for(let y of a)c&&m(y),o.allErrors?g(y):(e.var(p,!0),g(y),e.if(p))}function m(y){for(let _ in c)new RegExp(y).test(_)&&(0,Lg.checkStrictMode)(o,`property ${_} matches pattern ${y} (use allowMatchingProperties)`)}function g(y){e.forIn("key",n,_=>{e.if((0,ws._)`${(0,Mg.usePattern)(t,y)}.test(${_})`,()=>{let b=u.includes(y);b||t.subschema({keyword:"patternProperties",schemaProp:y,dataProp:_,dataPropType:jg.Type.Str},p),o.opts.unevaluated&&f!==!0?e.assign((0,ws._)`${f}[${_}]`,!0):!b&&!o.allErrors&&e.if((0,ws.not)(p),()=>e.break())})})}}};Kc.default=ck});var Dg=$(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});var uk=te(),fk={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,uk.alwaysValidSchema)(n,r)){t.fail();return}let i=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};Jc.default=fk});var qg=$(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});var pk=tt(),dk={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:pk.validateUnion,error:{message:"must match a schema in anyOf"}};Yc.default=dk});var Fg=$(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});var _s=Y(),hk=te(),mk={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,_s._)`{passingSchemas: ${t.passing}}`},gk={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:mk,code(t){let{gen:e,schema:r,parentSchema:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,s=e.let("valid",!1),a=e.let("passing",null),u=e.name("_valid");t.setParams({passing:a}),e.block(c),t.result(s,()=>t.reset(),()=>t.error(!0));function c(){o.forEach((p,f)=>{let d;(0,hk.alwaysValidSchema)(i,p)?e.var(u,!0):d=t.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},u),f>0&&e.if((0,_s._)`${u} && ${s}`).assign(s,!1).assign(a,(0,_s._)`[${a}, ${f}]`).else(),e.if(u,()=>{e.assign(s,!0),e.assign(a,f),d&&t.mergeEvaluated(d,_s.Name)})})}}};Xc.default=gk});var Bg=$(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});var yk=te(),vk={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=e.name("valid");r.forEach((o,s)=>{if((0,yk.alwaysValidSchema)(n,o))return;let a=t.subschema({keyword:"allOf",schemaProp:s},i);t.ok(i),t.mergeEvaluated(a)})}};Qc.default=vk});var zg=$(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});var bs=Y(),Ug=te(),wk={message:({params:t})=>(0,bs.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,bs._)`{failingKeyword: ${t.ifClause}}`},_k={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:wk,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,Ug.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=Hg(n,"then"),o=Hg(n,"else");if(!i&&!o)return;let s=e.let("valid",!0),a=e.name("_valid");if(u(),t.reset(),i&&o){let p=e.let("ifClause");t.setParams({ifClause:p}),e.if(a,c("then",p),c("else",p))}else i?e.if(a,c("then")):e.if((0,bs.not)(a),c("else"));t.pass(s,()=>t.error(!0));function u(){let p=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(p)}function c(p,f){return()=>{let d=t.subschema({keyword:p},a);e.assign(s,a),t.mergeValidEvaluated(d,s),f?e.assign(f,(0,bs._)`${p}`):t.setParams({ifClause:p})}}}};function Hg(t,e){let r=t.schema[e];return r!==void 0&&!(0,Ug.alwaysValidSchema)(t,r)}Zc.default=_k});var Wg=$(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});var bk=te(),Sk={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,bk.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};eu.default=Sk});var Gg=$(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});var $k=jc(),xk=xg(),kk=Vc(),Ek=Eg(),Pk=Pg(),Ck=gs(),Ik=Ng(),Rk=zc(),Nk=Og(),Tk=Vg(),Ak=Dg(),Ok=qg(),Mk=Fg(),Lk=Bg(),jk=zg(),Vk=Wg();function Dk(t=!1){let e=[Ak.default,Ok.default,Mk.default,Lk.default,jk.default,Vk.default,Ik.default,Rk.default,Ck.default,Nk.default,Tk.default];return t?e.push(xk.default,Ek.default):e.push($k.default,kk.default),e.push(Pk.default),e}tu.default=Dk});var nu=$(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});xi.dynamicAnchor=void 0;var ru=Y(),qk=et(),Kg=ui(),Fk=us(),Bk={keyword:"$dynamicAnchor",schemaType:"string",code:t=>Jg(t,t.schema)};function Jg(t,e){let{gen:r,it:n}=t;n.schemaEnv.root.dynamicAnchors[e]=!0;let i=(0,ru._)`${qk.default.dynamicAnchors}${(0,ru.getProperty)(e)}`,o=n.errSchemaPath==="#"?n.validateName:Hk(t);r.if((0,ru._)`!${i}`,()=>r.assign(i,o))}xi.dynamicAnchor=Jg;function Hk(t){let{schemaEnv:e,schema:r,self:n}=t.it,{root:i,baseId:o,localRefs:s,meta:a}=e.root,{schemaId:u}=n.opts,c=new Kg.SchemaEnv({schema:r,schemaId:u,root:i,baseId:o,localRefs:s,meta:a});return Kg.compileSchema.call(n,c),(0,Fk.getValidate)(t,c)}xi.default=Bk});var iu=$(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});ki.dynamicRef=void 0;var Yg=Y(),Uk=et(),Xg=us(),zk={keyword:"$dynamicRef",schemaType:"string",code:t=>Qg(t,t.schema)};function Qg(t,e){let{gen:r,keyword:n,it:i}=t;if(e[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);let o=e.slice(1);if(i.allErrors)s();else{let u=r.let("valid",!1);s(u),t.ok(u)}function s(u){if(i.schemaEnv.root.dynamicAnchors[o]){let c=r.let("_v",(0,Yg._)`${Uk.default.dynamicAnchors}${(0,Yg.getProperty)(o)}`);r.if(c,a(c,u),a(i.validateName,u))}else a(i.validateName,u)()}function a(u,c){return c?()=>r.block(()=>{(0,Xg.callRef)(t,u),r.let(c,!0)}):()=>(0,Xg.callRef)(t,u)}}ki.dynamicRef=Qg;ki.default=zk});var Zg=$(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});var Wk=nu(),Gk=te(),Kk={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,Wk.dynamicAnchor)(t,""):(0,Gk.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};ou.default=Kk});var ey=$(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});var Jk=iu(),Yk={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,Jk.dynamicRef)(t,t.schema)};su.default=Yk});var ty=$(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});var Xk=nu(),Qk=iu(),Zk=Zg(),eE=ey(),tE=[Xk.default,Qk.default,Zk.default,eE.default];au.default=tE});var ny=$(lu=>{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});var ry=gs(),rE={keyword:"dependentRequired",type:"object",schemaType:"object",error:ry.error,code:t=>(0,ry.validatePropertyDeps)(t)};lu.default=rE});var iy=$(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});var nE=gs(),iE={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,nE.validateSchemaDeps)(t)};cu.default=iE});var oy=$(uu=>{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});var oE=te(),sE={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:r}){e.contains===void 0&&(0,oE.checkStrictMode)(r,`"${t}" without "contains" is ignored`)}};uu.default=sE});var sy=$(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});var aE=ny(),lE=iy(),cE=oy(),uE=[aE.default,lE.default,cE.default];fu.default=uE});var ly=$(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});var Xt=Y(),ay=te(),fE=et(),pE={message:"must NOT have unevaluated properties",params:({params:t})=>(0,Xt._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},dE={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:pE,code(t){let{gen:e,schema:r,data:n,errsCount:i,it:o}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:s,props:a}=o;a instanceof Xt.Name?e.if((0,Xt._)`${a} !== true`,()=>e.forIn("key",n,f=>e.if(c(a,f),()=>u(f)))):a!==!0&&e.forIn("key",n,f=>a===void 0?u(f):e.if(p(a,f),()=>u(f))),o.props=!0,t.ok((0,Xt._)`${i} === ${fE.default.errors}`);function u(f){if(r===!1){t.setParams({unevaluatedProperty:f}),t.error(),s||e.break();return}if(!(0,ay.alwaysValidSchema)(o,r)){let d=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:f,dataPropType:ay.Type.Str},d),s||e.if((0,Xt.not)(d),()=>e.break())}}function c(f,d){return(0,Xt._)`!${f} || !${f}[${d}]`}function p(f,d){let m=[];for(let g in f)f[g]===!0&&m.push((0,Xt._)`${d} !== ${g}`);return(0,Xt.and)(...m)}}};pu.default=dE});var uy=$(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});var br=Y(),cy=te(),hE={message:({params:{len:t}})=>(0,br.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,br._)`{limit: ${t}}`},mE={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:hE,code(t){let{gen:e,schema:r,data:n,it:i}=t,o=i.items||0;if(o===!0)return;let s=e.const("len",(0,br._)`${n}.length`);if(r===!1)t.setParams({len:o}),t.fail((0,br._)`${s} > ${o}`);else if(typeof r=="object"&&!(0,cy.alwaysValidSchema)(i,r)){let u=e.var("valid",(0,br._)`${s} <= ${o}`);e.if((0,br.not)(u),()=>a(u,o)),t.ok(u)}i.items=!0;function a(u,c){e.forRange("i",c,s,p=>{t.subschema({keyword:"unevaluatedItems",dataProp:p,dataPropType:cy.Type.Num},u),i.allErrors||e.if((0,br.not)(u),()=>e.break())})}}};du.default=mE});var fy=$(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});var gE=ly(),yE=uy(),vE=[gE.default,yE.default];hu.default=vE});var py=$(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});var we=Y(),wE={message:({schemaCode:t})=>(0,we.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,we._)`{format: ${t}}`},_E={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:wE,code(t,e){let{gen:r,data:n,$data:i,schema:o,schemaCode:s,it:a}=t,{opts:u,errSchemaPath:c,schemaEnv:p,self:f}=a;if(!u.validateFormats)return;i?d():m();function d(){let g=r.scopeValue("formats",{ref:f.formats,code:u.code.formats}),y=r.const("fDef",(0,we._)`${g}[${s}]`),_=r.let("fType"),b=r.let("format");r.if((0,we._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(_,(0,we._)`${y}.type || "string"`).assign(b,(0,we._)`${y}.validate`),()=>r.assign(_,(0,we._)`"string"`).assign(b,y)),t.fail$data((0,we.or)(L(),q()));function L(){return u.strictSchema===!1?we.nil:(0,we._)`${s} && !${b}`}function q(){let A=p.$async?(0,we._)`(${y}.async ? await ${b}(${n}) : ${b}(${n}))`:(0,we._)`${b}(${n})`,T=(0,we._)`(typeof ${b} == "function" ? ${A} : ${b}.test(${n}))`;return(0,we._)`${b} && ${b} !== true && ${_} === ${e} && !${T}`}}function m(){let g=f.formats[o];if(!g){L();return}if(g===!0)return;let[y,_,b]=q(g);y===e&&t.pass(A());function L(){if(u.strictSchema===!1){f.logger.warn(T());return}throw new Error(T());function T(){return`unknown format "${o}" ignored in schema at path "${c}"`}}function q(T){let M=T instanceof RegExp?(0,we.regexpCode)(T):u.code.formats?(0,we._)`${u.code.formats}${(0,we.getProperty)(o)}`:void 0,X=r.scopeValue("formats",{key:o,ref:T,code:M});return typeof T=="object"&&!(T instanceof RegExp)?[T.type||"string",T.validate,(0,we._)`${X}.validate`]:["string",T,X]}function A(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!p.$async)throw new Error("async format in sync schema");return(0,we._)`await ${b}(${n})`}return typeof _=="function"?(0,we._)`${b}(${n})`:(0,we._)`${b}.test(${n})`}}}};mu.default=_E});var dy=$(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});var bE=py(),SE=[bE.default];gu.default=SE});var hy=$(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.contentVocabulary=cn.metadataVocabulary=void 0;cn.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];cn.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var gy=$(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});var $E=sg(),xE=_g(),kE=Gg(),EE=ty(),PE=sy(),CE=fy(),IE=dy(),my=hy(),RE=[EE.default,$E.default,xE.default,(0,kE.default)(!0),IE.default,my.metadataVocabulary,my.contentVocabulary,PE.default,CE.default];yu.default=RE});var vy=$(Ss=>{"use strict";Object.defineProperty(Ss,"__esModule",{value:!0});Ss.DiscrError=void 0;var yy;(function(t){t.Tag="tag",t.Mapping="mapping"})(yy||(Ss.DiscrError=yy={}))});var _y=$(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});var un=Y(),vu=vy(),wy=ui(),NE=ci(),TE=te(),AE={message:({params:{discrError:t,tagName:e}})=>t===vu.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,un._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},OE={keyword:"discriminator",type:"object",schemaType:"object",error:AE,code(t){let{gen:e,data:r,schema:n,parentSchema:i,it:o}=t,{oneOf:s}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let u=e.let("valid",!1),c=e.const("tag",(0,un._)`${r}${(0,un.getProperty)(a)}`);e.if((0,un._)`typeof ${c} == "string"`,()=>p(),()=>t.error(!1,{discrError:vu.DiscrError.Tag,tag:c,tagName:a})),t.ok(u);function p(){let m=d();e.if(!1);for(let g in m)e.elseIf((0,un._)`${c} === ${g}`),e.assign(u,f(m[g]));e.else(),t.error(!1,{discrError:vu.DiscrError.Mapping,tag:c,tagName:a}),e.endIf()}function f(m){let g=e.name("valid"),y=t.subschema({keyword:"oneOf",schemaProp:m},g);return t.mergeEvaluated(y,un.Name),g}function d(){var m;let g={},y=b(i),_=!0;for(let A=0;A<s.length;A++){let T=s[A];if(T?.$ref&&!(0,TE.schemaHasRulesButRef)(T,o.self.RULES)){let X=T.$ref;if(T=wy.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,X),T instanceof wy.SchemaEnv&&(T=T.schema),T===void 0)throw new NE.default(o.opts.uriResolver,o.baseId,X)}let M=(m=T?.properties)===null||m===void 0?void 0:m[a];if(typeof M!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);_=_&&(y||b(T)),L(M,A)}if(!_)throw new Error(`discriminator: "${a}" must be required`);return g;function b({required:A}){return Array.isArray(A)&&A.includes(a)}function L(A,T){if(A.const)q(A.const,T);else if(A.enum)for(let M of A.enum)q(M,T);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function q(A,T){if(typeof A!="string"||A in g)throw new Error(`discriminator: "${a}" values must be unique strings`);g[A]=T}}}};wu.default=OE});var by=$((RT,ME)=>{ME.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 Sy=$((NT,LE)=>{LE.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 $y=$((TT,jE)=>{jE.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 xy=$((AT,VE)=>{VE.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 ky=$((OT,DE)=>{DE.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 Ey=$((MT,qE)=>{qE.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 Py=$((LT,FE)=>{FE.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 Cy=$((jT,BE)=>{BE.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 Iy=$(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});var HE=by(),UE=Sy(),zE=$y(),WE=xy(),GE=ky(),KE=Ey(),JE=Py(),YE=Cy(),XE=["/properties"];function QE(t){return[HE,UE,zE,WE,GE,e(this,KE),JE,e(this,YE)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function e(r,n){return t?r.$dataMetaSchema(n,XE):n}}_u.default=QE});var Ry=$((me,Su)=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.MissingRefError=me.ValidationError=me.CodeGen=me.Name=me.nil=me.stringify=me.str=me._=me.KeywordCxt=me.Ajv2020=void 0;var ZE=tg(),eP=gy(),tP=_y(),rP=Iy(),bu="https://json-schema.org/draft/2020-12/schema",fn=class extends ZE.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),eP.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(tP.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:r}=this.opts;r&&(rP.default.call(this,e),this.refs["http://json-schema.org/schema"]=bu)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(bu)?bu:void 0)}};me.Ajv2020=fn;Su.exports=me=fn;Su.exports.Ajv2020=fn;Object.defineProperty(me,"__esModule",{value:!0});me.default=fn;var nP=li();Object.defineProperty(me,"KeywordCxt",{enumerable:!0,get:function(){return nP.KeywordCxt}});var pn=Y();Object.defineProperty(me,"_",{enumerable:!0,get:function(){return pn._}});Object.defineProperty(me,"str",{enumerable:!0,get:function(){return pn.str}});Object.defineProperty(me,"stringify",{enumerable:!0,get:function(){return pn.stringify}});Object.defineProperty(me,"nil",{enumerable:!0,get:function(){return pn.nil}});Object.defineProperty(me,"Name",{enumerable:!0,get:function(){return pn.Name}});Object.defineProperty(me,"CodeGen",{enumerable:!0,get:function(){return pn.CodeGen}});var iP=rs();Object.defineProperty(me,"ValidationError",{enumerable:!0,get:function(){return iP.default}});var oP=ci();Object.defineProperty(me,"MissingRefError",{enumerable:!0,get:function(){return oP.default}})});Pt();Co();Ft();qn();import{transform as fP}from"esbuild";import{resolve as Sr}from"node:path";import{resolve as cP}from"node:path";import{readFile as kh}from"node:fs/promises";import{basename as w2,relative as Eh,resolve as Ph}from"node:path";It();import{dirname as yh,resolve as vh}from"node:path";import O from"typescript";import{readFileSync as a2}from"node:fs";import{resolve as l2}from"node:path";import se from"typescript";function ml(t,e){let r=new Map;for(let n of t.statements){if(!se.isImportDeclaration(n)||!n.importClause?.namedBindings||!se.isStringLiteral(n.moduleSpecifier)||!se.isNamedImports(n.importClause.namedBindings))continue;let i=n.moduleSpecifier.text;i.endsWith(".tsx")||(i=`${i}.tsx`);let o=l2(e,i);for(let s of n.importClause.namedBindings.elements)r.set(s.name.text,o)}return r}function c2(t){if(se.isObjectBindingPattern(t.name)){let e=[];for(let r of t.name.elements)se.isBindingElement(r)&&se.isIdentifier(r.name)&&e.push(r.name.text);return e}return se.isIdentifier(t.name)?[t.name.text]:[]}function u2(t){if(!se.isObjectBindingPattern(t.name)||t.name.elements.length===0)return null;let e=t.name.elements[0];return!se.isBindingElement(e)||!se.isIdentifier(e.name)?null:e.name.text}function f2(t){if(se.isParenthesizedExpression(t))return t.expression;if(se.isJsxElement(t)||se.isJsxSelfClosingElement(t)||se.isJsxFragment(t))return t;if(se.isBlock(t))for(let e=t.statements.length-1;e>=0;e--){let r=t.statements[e];if(se.isReturnStatement(r)&&r.expression)return se.isParenthesizedExpression(r.expression)?r.expression.expression:r.expression}return null}function mh(t){if(!se.isIdentifier(t.expression)||t.expression.text!=="view"||t.arguments.length!==1)return null;let e=t.arguments[0];if(!se.isArrowFunction(e)&&!se.isFunctionExpression(e))return null;let r="__noop",n=[];if(e.parameters.length===1){let s=u2(e.parameters[0]);if(n=c2(e.parameters[0]),s)r=s;else if(se.isIdentifier(e.parameters[0].name))r=e.parameters[0].name.text,n=[r];else return null}else if(e.parameters.length>1)return null;let i=f2(e.body);if(!i)return null;let o;return t.typeArguments&&t.typeArguments.length===1&&(o=t.typeArguments[0].getText()),{paramName:r,jsxRoot:i,propNames:n,propsType:o}}function gl(t,e){let r=null;function n(i){if(se.isVariableStatement(i))for(let o of i.declarationList.declarations){if(!se.isIdentifier(o.name)||o.name.text!==e||!o.initializer||!se.isCallExpression(o.initializer))continue;let s=mh(o.initializer);s&&(r=s)}if(se.isExportAssignment(i)&&i.isExportEquals===!1&&i.expression&&se.isCallExpression(i.expression)){let o=mh(i.expression);o&&e==="default"&&(r=o)}se.forEachChild(i,n)}return n(t),r}function gh(t,e){let r=a2(t,"utf-8"),n=se.createSourceFile(t,r,se.ScriptTarget.Latest,!0,se.ScriptKind.TSX);return gl(n,e)}function p2(t,e,r){if("tone"in e){let n=e.tone;delete e.tone,"variant"in e||(e.variant=n),r.warnings.push(`"tone" on <${t}> is deprecated; use variant instead (mapped automatically)`)}if("textStyle"in e){let n=e.textStyle;delete e.textStyle,"variant"in e||(e.variant=n),r.warnings.push(`"textStyle" on <${t}> is deprecated; use variant instead (mapped automatically)`)}}function yl(t){return t.join(".")}function Jr(t){let e=t.getText().replace(/\s+/g," ").trim();return e.length>100?`${e.slice(0,97)}...`:e}function wl(t){if(O.isIdentifier(t))return[t.text];if(O.isPropertyAccessExpression(t)){let e=wl(t.expression);return e?[...e,t.name.text]:null}return null}function wh(t,e){if(e.length===0)return t;let r=e.join(".");return{kind:"binding",path:t.path?`${t.path}.${r}`:r,scope:t.scope}}function Wn(t,e){let r=wl(t);if(!r)return null;if(r[0]in e.propBindings)return wh(e.propBindings[r[0]],r.slice(1));if(r[0]===e.vmName)return{kind:"binding",path:yl(r.slice(1))};let n=e.scopes[e.scopes.length-1];return n&&r[0]===n?{kind:"binding",path:yl(r.slice(1)),scope:n}:null}function d2(t,e){let r,n={};for(let i of t.properties){if(!O.isPropertyAssignment(i)||!O.isIdentifier(i.name))continue;let o=i.name.text;if(o==="name"&&O.isStringLiteral(i.initializer)){r=i.initializer.text;continue}if(o==="params"&&O.isObjectLiteralExpression(i.initializer))for(let s of i.initializer.properties){if(!O.isPropertyAssignment(s)||!O.isIdentifier(s.name))continue;let a=Ho(s.initializer,e);a!==null?n[s.name.text]=a:e.errors.push(`Unsupported action param expression for "${s.name.text}": ${Jr(s.initializer)}`)}}return r?Object.keys(n).length>0?{kind:"action",name:r,params:n}:{kind:"action",name:r}:null}function Ho(t,e){if(O.isStringLiteral(t)||O.isNoSubstitutionTemplateLiteral(t))return t.text;if(t.kind===O.SyntaxKind.TrueKeyword)return!0;if(t.kind===O.SyntaxKind.FalseKeyword)return!1;if(O.isNumericLiteral(t))return Number(t.text);if(t.kind===O.SyntaxKind.NullKeyword)return null;if(O.isTemplateExpression(t)){let n=[];t.head.text&&n.push(t.head.text);for(let i of t.templateSpans){let o=Wn(i.expression,e);if(!o)return null;n.push(o),i.literal.text&&n.push(i.literal.text)}return{kind:"concat",parts:n}}let r=Wn(t,e);if(r)return r;if(O.isObjectLiteralExpression(t)){let n=d2(t,e);if(n)return n;let i={};for(let o of t.properties){if(!O.isPropertyAssignment(o)||!O.isIdentifier(o.name))continue;let s=Ho(o.initializer,e);s!==null?i[o.name.text]=s:e.errors.push(`Unsupported object literal property "${o.name.text}": ${Jr(o.initializer)}`)}return{kind:"literal",value:i}}if(O.isArrayLiteralExpression(t)){let n=[];for(let i of t.elements){if(!O.isExpression(i))continue;let o=Ho(i,e);o!==null?n.push(o):e.errors.push(`Unsupported array element expression: ${Jr(i)}`)}return n}return null}function h2(t){return O.isIdentifier(t)?t.text:O.isPropertyAccessExpression(t)&&O.isIdentifier(t.name)?t.name.text:null}function _h(t){return t.getText()}function vl(t,e){let r=[];for(let n of t){if(O.isJsxText(n)){let i=n.getText().trim();i&&r.push({kind:"text",value:i});continue}if(O.isJsxExpression(n)&&n.expression){let i=Wn(n.expression,e);if(i){r.push(i);continue}let o=bh(n.expression,e);o?Array.isArray(o)?r.push(...o):r.push(o):e.errors.push(`Unsupported JSX child expression: ${Jr(n.expression)}`);continue}if(O.isJsxElement(n)||O.isJsxSelfClosingElement(n)){let i=Gn(n,e);i&&r.push(i)}}return r}function m2(t,e){if(t.length===0)return null;let r=t[0];return r in e.propBindings?wh(e.propBindings[r],t.slice(1)):r===e.vmName?{kind:"binding",path:yl(t.slice(1))}:null}function bh(t,e){if(O.isParenthesizedExpression(t))return bh(t.expression,e);if(O.isCallExpression(t)&&O.isPropertyAccessExpression(t.expression)){let n=wl(t.expression.expression),i=t.expression.name.text;if(n&&i==="map"&&t.arguments.length>=1){let o=m2(n,e);if(!o)return null;let s=t.arguments[0];if(!O.isArrowFunction(s)&&!O.isFunctionExpression(s))return e.errors.push("map callback must be an arrow function"),null;let a=s.parameters;if(a.length!==1||!O.isIdentifier(a[0].name))return e.errors.push("map callback must have a single item parameter"),null;let u=a[0].name.text,c={...e,scopes:[...e.scopes,u]},p=null,f=O.isParenthesizedExpression(s.body)?s.body.expression:s.body;if(O.isBlock(s.body))return e.errors.push("map callback body must be a JSX expression, not a block"),null;if(O.isJsxElement(f)||O.isJsxSelfClosingElement(f)?p=Gn(f,c):O.isJsxFragment(f)&&(p=_l(f,c)),!p)return null;let d;if(O.isJsxElement(f)||O.isJsxSelfClosingElement(f)){let m=O.isJsxElement(f)?f.openingElement.attributes:f.attributes;for(let g of m.properties)if(!(!O.isJsxAttribute(g)||_h(g.name)!=="key"||!g.initializer)&&O.isJsxExpression(g.initializer)&&g.initializer.expression){let y=Wn(g.initializer.expression,c);y&&(d=y)}}return{kind:"map",source:o,item:u,key:d,body:p}}}if(O.isJsxElement(t)||O.isJsxSelfClosingElement(t))return Gn(t,e);let r=Wn(t,e);return r||null}function _l(t,e){return{kind:"fragment",children:vl(t.children,e)}}function g2(t,e,r){let n=r.viewImports.get(t);return n?gh(n,t)?{kind:"viewRef",name:t,sourcePath:n,props:e}:(r.errors.push(`View component "${t}" is imported but has no view() export`),null):null}function Gn(t,e){let r=O.isJsxElement(t)?t.openingElement:t,n=h2(r.tagName);if(!n)return e.errors.push("Unsupported JSX tag expression"),null;let i={};for(let u of r.attributes.properties){if(!O.isJsxAttribute(u))continue;let c=_h(u.name);if(c!=="key"){if(!u.initializer){i[c]=!0;continue}if(O.isStringLiteral(u.initializer)){i[c]=u.initializer.text;continue}if(O.isJsxExpression(u.initializer)&&u.initializer.expression){let p=Ho(u.initializer.expression,e);p!==null?i[c]=p:e.errors.push(`Unsupported JSX prop expression for "${c}" on <${n}>: ${Jr(u.initializer.expression)}`)}}}if(!e.allowedComponents.has(n)){let u=g2(n,i,e);return u||(e.errors.push(`Component "${n}" is not in the allowed registry`),null)}p2(n,i,e);let o=e;if(n==="Table"&&i.source){let u=typeof i.source=="object"&&"kind"in i.source&&i.source.kind==="binding"?i.source:void 0;u&&(o={...e,tableSource:u})}let s=typeof i.each=="string"?i.each:void 0;if(s){let u=e.tableSource;if(!u)return e.errors.push(`<${n} each="${s}"> requires an ancestor <Table source={...}>`),null;delete i.each;let c={...o,scopes:[...o.scopes,s]},p=O.isJsxElement(t)?vl(t.children,c):[];return{kind:"map",source:u,item:s,body:{kind:"component",name:n,props:i,children:p}}}let a=O.isJsxElement(t)?vl(t.children,o):[];return{kind:"component",name:n,props:i,children:a}}function y2(t){let e=null;function r(n){if(O.isCallExpression(n)&&O.isIdentifier(n.expression)&&n.expression.text==="screen"&&n.arguments.length===1&&(O.isArrowFunction(n.arguments[0])||O.isFunctionExpression(n.arguments[0]))){let i=n.arguments[0],o="unknown";if(n.typeArguments&&n.typeArguments.length===1){let a=n.typeArguments[0];O.isTypeReferenceNode(a)&&O.isIdentifier(a.typeName)&&(o=a.typeName.text)}let s=i.body;if(O.isParenthesizedExpression(s))(O.isJsxElement(s.expression)||O.isJsxSelfClosingElement(s.expression))&&(e={viewModel:o,jsxRoot:s.expression});else if(O.isJsxElement(s)||O.isJsxSelfClosingElement(s))e={viewModel:o,jsxRoot:s};else if(O.isBlock(s)&&s.statements.length===1){let a=s.statements[0];O.isReturnStatement(a)&&a.expression&&(O.isParenthesizedExpression(a.expression)?e={viewModel:o,jsxRoot:a.expression.expression}:e={viewModel:o,jsxRoot:a.expression})}}O.forEachChild(n,r)}return r(t),e}function Sh(t,e,r,n={}){let i=new Set(Ct);for(let f of n.allowlistExtra??[])i.add(f);let o=vh(e),s=yh(o),a=O.createSourceFile(o,t,O.ScriptTarget.Latest,!0,O.ScriptKind.TSX),u={vmName:"vm",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:ml(a,s),allowedComponents:i},c=y2(a);if(!c)return{viewModel:"unknown",exportName:r,root:{kind:"fragment",children:[]},errors:["No screen<T>() default export found"],warnings:[]};let p=O.isJsxElement(c.jsxRoot)||O.isJsxSelfClosingElement(c.jsxRoot)?Gn(c.jsxRoot,u):O.isJsxFragment(c.jsxRoot)?_l(c.jsxRoot,u):null;return p?{viewModel:c.viewModel,exportName:r,root:p,errors:u.errors,warnings:u.warnings}:(u.errors.push("screen() callback must return a single JSX root element"),{viewModel:c.viewModel,exportName:r,root:{kind:"fragment",children:[]},errors:u.errors,warnings:u.warnings})}function v2(t,e){let r={...e.propBindings};for(let i of t.propNames)r[i]={kind:"binding",path:"",scope:i};let n={...e,vmName:t.paramName,propBindings:r,scopes:[]};return O.isJsxElement(t.jsxRoot)||O.isJsxSelfClosingElement(t.jsxRoot)?Gn(t.jsxRoot,n):O.isJsxFragment(t.jsxRoot)?_l(t.jsxRoot,n):O.isConditionalExpression(t.jsxRoot)?(e.errors.push("view() partial root must be a JSX element or fragment; conditional expressions are not supported"),null):O.isExpression(t.jsxRoot)?(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported expression: ${Jr(t.jsxRoot)}`),null):(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported syntax kind: ${O.SyntaxKind[t.jsxRoot.kind]}`),null)}function $h(t,e,r,n={}){let i=new Set(Ct);for(let f of n.allowlistExtra??[])i.add(f);let o=vh(e),s=yh(o),a=O.createSourceFile(o,t,O.ScriptTarget.Latest,!0,O.ScriptKind.TSX),u=gl(a,r),c={vmName:u?.paramName??"__noop",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:ml(a,s),allowedComponents:i};if(!u)return{exportName:r,propNames:[],root:{kind:"fragment",children:[]},errors:[`No view() export "${r}" found in ${e}`],warnings:[]};let p=v2(u,c);return p?{exportName:r,propsType:u.propsType,propNames:u.propNames,root:p,errors:c.errors,warnings:c.warnings}:{exportName:r,propsType:u.propsType,propNames:u.propNames,root:{kind:"fragment",children:[]},errors:c.errors,warnings:c.warnings}}function bl(t){let e=[];function r(n){if(n.kind==="viewRef"){e.push(n);return}if(n.kind==="component"){for(let i of n.children)r(i);return}if(n.kind==="map"){r(n.body);return}if(n.kind==="fragment")for(let i of n.children)r(i)}return r(t),e}function xh(t){return`${t.sourcePath}:${t.name}`}It();function Sl(t,e){let r=[],n=[],i=o=>{if(o.kind!=="viewRef"){if(o.kind==="component"){!Ct.has(o.name)&&!(o.name in e.extensions)&&r.push(`Extension component "${o.name}" is not registered in extensions.yaml`);for(let s of o.children)i(s);return}if(o.kind==="map"){i(o.body);return}if(o.kind==="fragment")for(let s of o.children)i(s)}};return i(t),{errors:r,warnings:n}}async function _2(t,e,r){let n=await kh(t,"utf-8"),i=$h(n,t,e,{allowlistExtra:r.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t} (${e}):
394
+ deps: ${r}}`};var WC={keyword:"dependencies",type:"object",schemaType:"object",error:It.error,code(t){let[e,r]=zC(t);jy(t,e),Dy(t,r)}};function zC({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let i=Array.isArray(t[n])?e:r;i[n]=t[n]}return[e,r]}function jy(t,e=t.schema){let{gen:r,data:n,it:i}=t;if(Object.keys(e).length===0)return;let o=r.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let l=(0,Bi.propertyInData)(r,n,s,i.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),i.allErrors?r.if(l,()=>{for(let u of a)(0,Bi.checkReportMissingProp)(t,u)}):(r.if((0,bc._)`${l} && (${(0,Bi.checkMissingProp)(t,a,o)})`),(0,Bi.reportMissingProp)(t,o),r.else())}}It.validatePropertyDeps=jy;function Dy(t,e=t.schema){let{gen:r,data:n,keyword:i,it:o}=t,s=r.name("valid");for(let a in e)(0,HC.alwaysValidSchema)(o,e[a])||(r.if((0,Bi.propertyInData)(r,n,a,o.opts.ownProperties),()=>{let l=t.subschema({keyword:i,schemaProp:a},s);t.mergeValidEvaluated(l,s)},()=>r.var(s,!0)),t.ok(s))}It.validateSchemaDeps=Dy;It.default=WC});var Fy=$(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});var qy=Z(),UC=ne(),GC={message:"property name must be valid",params:({params:t})=>(0,qy._)`{propertyName: ${t.propertyName}}`},JC={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:GC,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,UC.alwaysValidSchema)(i,r))return;let o=e.name("valid");e.forIn("key",n,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),e.if((0,qy.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};_c.default=JC});var $c=$(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});var Hs=pt(),xt=Z(),KC=ct(),Ws=ne(),YC={message:"must NOT have additional properties",params:({params:t})=>(0,xt._)`{additionalProperty: ${t.additionalProperty}}`},XC={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:YC,code(t){let{gen:e,schema:r,parentSchema:n,data:i,errsCount:o,it:s}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:a,opts:l}=s;if(s.props=!0,l.removeAdditional!=="all"&&(0,Ws.alwaysValidSchema)(s,r))return;let u=(0,Hs.allSchemaProperties)(n.properties),f=(0,Hs.allSchemaProperties)(n.patternProperties);p(),t.ok((0,xt._)`${o} === ${KC.default.errors}`);function p(){e.forIn("key",i,v=>{!u.length&&!f.length?g(v):e.if(d(v),()=>g(v))})}function d(v){let w;if(u.length>8){let R=(0,Ws.schemaRefOrVal)(s,n.properties,"properties");w=(0,Hs.isOwnProperty)(e,R,v)}else u.length?w=(0,xt.or)(...u.map(R=>(0,xt._)`${v} === ${R}`)):w=xt.nil;return f.length&&(w=(0,xt.or)(w,...f.map(R=>(0,xt._)`${(0,Hs.usePattern)(t,R)}.test(${v})`))),(0,xt.not)(w)}function m(v){e.code((0,xt._)`delete ${i}[${v}]`)}function g(v){if(l.removeAdditional==="all"||l.removeAdditional&&r===!1){m(v);return}if(r===!1){t.setParams({additionalProperty:v}),t.error(),a||e.break();return}if(typeof r=="object"&&!(0,Ws.alwaysValidSchema)(s,r)){let w=e.name("valid");l.removeAdditional==="failing"?(y(v,w,!1),e.if((0,xt.not)(w),()=>{t.reset(),m(v)})):(y(v,w),a||e.if((0,xt.not)(w),()=>e.break()))}}function y(v,w,R){let O={keyword:"additionalProperties",dataProp:v,dataPropType:Ws.Type.Str};R===!1&&Object.assign(O,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(O,w)}}};xc.default=XC});var Wy=$(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});var QC=Ei(),By=pt(),Sc=ne(),Hy=$c(),ZC={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Hy.default.code(new QC.KeywordCxt(o,Hy.default,"additionalProperties"));let s=(0,By.allSchemaProperties)(r);for(let p of s)o.definedProperties.add(p);o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=Sc.mergeEvaluated.props(e,(0,Sc.toHash)(s),o.props));let a=s.filter(p=>!(0,Sc.alwaysValidSchema)(o,r[p]));if(a.length===0)return;let l=e.name("valid");for(let p of a)u(p)?f(p):(e.if((0,By.propertyInData)(e,i,p,o.opts.ownProperties)),f(p),o.allErrors||e.else().var(l,!0),e.endIf()),t.it.definedProperties.add(p),t.ok(l);function u(p){return o.opts.useDefaults&&!o.compositeRule&&r[p].default!==void 0}function f(p){t.subschema({keyword:"properties",schemaProp:p,dataProp:p},l)}}};kc.default=ZC});var Jy=$(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});var zy=pt(),zs=Z(),Uy=ne(),Gy=ne(),eE={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:i,it:o}=t,{opts:s}=o,a=(0,zy.allSchemaProperties)(r),l=a.filter(y=>(0,Uy.alwaysValidSchema)(o,r[y]));if(a.length===0||l.length===a.length&&(!o.opts.unevaluated||o.props===!0))return;let u=s.strictSchema&&!s.allowMatchingProperties&&i.properties,f=e.name("valid");o.props!==!0&&!(o.props instanceof zs.Name)&&(o.props=(0,Gy.evaluatedPropsToName)(e,o.props));let{props:p}=o;d();function d(){for(let y of a)u&&m(y),o.allErrors?g(y):(e.var(f,!0),g(y),e.if(f))}function m(y){for(let v in u)new RegExp(y).test(v)&&(0,Uy.checkStrictMode)(o,`property ${v} matches pattern ${y} (use allowMatchingProperties)`)}function g(y){e.forIn("key",n,v=>{e.if((0,zs._)`${(0,zy.usePattern)(t,y)}.test(${v})`,()=>{let w=l.includes(y);w||t.subschema({keyword:"patternProperties",schemaProp:y,dataProp:v,dataPropType:Gy.Type.Str},f),o.opts.unevaluated&&p!==!0?e.assign((0,zs._)`${p}[${v}]`,!0):!w&&!o.allErrors&&e.if((0,zs.not)(f),()=>e.break())})})}}};Cc.default=eE});var Ky=$(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});var tE=ne(),rE={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,tE.alwaysValidSchema)(n,r)){t.fail();return}let i=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};Ec.default=rE});var Yy=$(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});var nE=pt(),iE={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:nE.validateUnion,error:{message:"must match a schema in anyOf"}};Pc.default=iE});var Xy=$(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});var Us=Z(),oE=ne(),sE={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Us._)`{passingSchemas: ${t.passing}}`},aE={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:sE,code(t){let{gen:e,schema:r,parentSchema:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,s=e.let("valid",!1),a=e.let("passing",null),l=e.name("_valid");t.setParams({passing:a}),e.block(u),t.result(s,()=>t.reset(),()=>t.error(!0));function u(){o.forEach((f,p)=>{let d;(0,oE.alwaysValidSchema)(i,f)?e.var(l,!0):d=t.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},l),p>0&&e.if((0,Us._)`${l} && ${s}`).assign(s,!1).assign(a,(0,Us._)`[${a}, ${p}]`).else(),e.if(l,()=>{e.assign(s,!0),e.assign(a,p),d&&t.mergeEvaluated(d,Us.Name)})})}}};Ic.default=aE});var Qy=$(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});var lE=ne(),uE={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=e.name("valid");r.forEach((o,s)=>{if((0,lE.alwaysValidSchema)(n,o))return;let a=t.subschema({keyword:"allOf",schemaProp:s},i);t.ok(i),t.mergeEvaluated(a)})}};Rc.default=uE});var tv=$(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});var Gs=Z(),ev=ne(),cE={message:({params:t})=>(0,Gs.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Gs._)`{failingKeyword: ${t.ifClause}}`},pE={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:cE,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,ev.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=Zy(n,"then"),o=Zy(n,"else");if(!i&&!o)return;let s=e.let("valid",!0),a=e.name("_valid");if(l(),t.reset(),i&&o){let f=e.let("ifClause");t.setParams({ifClause:f}),e.if(a,u("then",f),u("else",f))}else i?e.if(a,u("then")):e.if((0,Gs.not)(a),u("else"));t.pass(s,()=>t.error(!0));function l(){let f=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(f)}function u(f,p){return()=>{let d=t.subschema({keyword:f},a);e.assign(s,a),t.mergeValidEvaluated(d,s),p?e.assign(p,(0,Gs._)`${f}`):t.setParams({ifClause:f})}}}};function Zy(t,e){let r=t.schema[e];return r!==void 0&&!(0,ev.alwaysValidSchema)(t,r)}Tc.default=pE});var rv=$(Ac=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});var fE=ne(),dE={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,fE.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};Ac.default=dE});var nv=$(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});var hE=mc(),mE=My(),gE=gc(),yE=Ly(),vE=Vy(),wE=Bs(),bE=Fy(),_E=$c(),xE=Wy(),$E=Jy(),SE=Ky(),kE=Yy(),CE=Xy(),EE=Qy(),PE=tv(),IE=rv();function RE(t=!1){let e=[SE.default,kE.default,CE.default,EE.default,PE.default,IE.default,bE.default,_E.default,wE.default,xE.default,$E.default];return t?e.push(mE.default,yE.default):e.push(hE.default,gE.default),e.push(vE.default),e}Nc.default=RE});var Oc=$(Hi=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.dynamicAnchor=void 0;var Mc=Z(),TE=ct(),iv=Ii(),AE=Ls(),NE={keyword:"$dynamicAnchor",schemaType:"string",code:t=>ov(t,t.schema)};function ov(t,e){let{gen:r,it:n}=t;n.schemaEnv.root.dynamicAnchors[e]=!0;let i=(0,Mc._)`${TE.default.dynamicAnchors}${(0,Mc.getProperty)(e)}`,o=n.errSchemaPath==="#"?n.validateName:ME(t);r.if((0,Mc._)`!${i}`,()=>r.assign(i,o))}Hi.dynamicAnchor=ov;function ME(t){let{schemaEnv:e,schema:r,self:n}=t.it,{root:i,baseId:o,localRefs:s,meta:a}=e.root,{schemaId:l}=n.opts,u=new iv.SchemaEnv({schema:r,schemaId:l,root:i,baseId:o,localRefs:s,meta:a});return iv.compileSchema.call(n,u),(0,AE.getValidate)(t,u)}Hi.default=NE});var Lc=$(Wi=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});Wi.dynamicRef=void 0;var sv=Z(),OE=ct(),av=Ls(),LE={keyword:"$dynamicRef",schemaType:"string",code:t=>lv(t,t.schema)};function lv(t,e){let{gen:r,keyword:n,it:i}=t;if(e[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);let o=e.slice(1);if(i.allErrors)s();else{let l=r.let("valid",!1);s(l),t.ok(l)}function s(l){if(i.schemaEnv.root.dynamicAnchors[o]){let u=r.let("_v",(0,sv._)`${OE.default.dynamicAnchors}${(0,sv.getProperty)(o)}`);r.if(u,a(u,l),a(i.validateName,l))}else a(i.validateName,l)()}function a(l,u){return u?()=>r.block(()=>{(0,av.callRef)(t,l),r.let(u,!0)}):()=>(0,av.callRef)(t,l)}}Wi.dynamicRef=lv;Wi.default=LE});var uv=$(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});var VE=Oc(),jE=ne(),DE={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,VE.dynamicAnchor)(t,""):(0,jE.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};Vc.default=DE});var cv=$(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:!0});var qE=Lc(),FE={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,qE.dynamicRef)(t,t.schema)};jc.default=FE});var pv=$(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});var BE=Oc(),HE=Lc(),WE=uv(),zE=cv(),UE=[BE.default,HE.default,WE.default,zE.default];Dc.default=UE});var dv=$(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});var fv=Bs(),GE={keyword:"dependentRequired",type:"object",schemaType:"object",error:fv.error,code:t=>(0,fv.validatePropertyDeps)(t)};qc.default=GE});var hv=$(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});var JE=Bs(),KE={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,JE.validateSchemaDeps)(t)};Fc.default=KE});var mv=$(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});var YE=ne(),XE={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:r}){e.contains===void 0&&(0,YE.checkStrictMode)(r,`"${t}" without "contains" is ignored`)}};Bc.default=XE});var gv=$(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});var QE=dv(),ZE=hv(),eP=mv(),tP=[QE.default,ZE.default,eP.default];Hc.default=tP});var vv=$(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});var sr=Z(),yv=ne(),rP=ct(),nP={message:"must NOT have unevaluated properties",params:({params:t})=>(0,sr._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},iP={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:nP,code(t){let{gen:e,schema:r,data:n,errsCount:i,it:o}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:s,props:a}=o;a instanceof sr.Name?e.if((0,sr._)`${a} !== true`,()=>e.forIn("key",n,p=>e.if(u(a,p),()=>l(p)))):a!==!0&&e.forIn("key",n,p=>a===void 0?l(p):e.if(f(a,p),()=>l(p))),o.props=!0,t.ok((0,sr._)`${i} === ${rP.default.errors}`);function l(p){if(r===!1){t.setParams({unevaluatedProperty:p}),t.error(),s||e.break();return}if(!(0,yv.alwaysValidSchema)(o,r)){let d=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:p,dataPropType:yv.Type.Str},d),s||e.if((0,sr.not)(d),()=>e.break())}}function u(p,d){return(0,sr._)`!${p} || !${p}[${d}]`}function f(p,d){let m=[];for(let g in p)p[g]===!0&&m.push((0,sr._)`${d} !== ${g}`);return(0,sr.and)(...m)}}};Wc.default=iP});var bv=$(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});var Tr=Z(),wv=ne(),oP={message:({params:{len:t}})=>(0,Tr.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Tr._)`{limit: ${t}}`},sP={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:oP,code(t){let{gen:e,schema:r,data:n,it:i}=t,o=i.items||0;if(o===!0)return;let s=e.const("len",(0,Tr._)`${n}.length`);if(r===!1)t.setParams({len:o}),t.fail((0,Tr._)`${s} > ${o}`);else if(typeof r=="object"&&!(0,wv.alwaysValidSchema)(i,r)){let l=e.var("valid",(0,Tr._)`${s} <= ${o}`);e.if((0,Tr.not)(l),()=>a(l,o)),t.ok(l)}i.items=!0;function a(l,u){e.forRange("i",u,s,f=>{t.subschema({keyword:"unevaluatedItems",dataProp:f,dataPropType:wv.Type.Num},l),i.allErrors||e.if((0,Tr.not)(l),()=>e.break())})}}};zc.default=sP});var _v=$(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});var aP=vv(),lP=bv(),uP=[aP.default,lP.default];Uc.default=uP});var xv=$(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});var ke=Z(),cP={message:({schemaCode:t})=>(0,ke.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,ke._)`{format: ${t}}`},pP={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:cP,code(t,e){let{gen:r,data:n,$data:i,schema:o,schemaCode:s,it:a}=t,{opts:l,errSchemaPath:u,schemaEnv:f,self:p}=a;if(!l.validateFormats)return;i?d():m();function d(){let g=r.scopeValue("formats",{ref:p.formats,code:l.code.formats}),y=r.const("fDef",(0,ke._)`${g}[${s}]`),v=r.let("fType"),w=r.let("format");r.if((0,ke._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(v,(0,ke._)`${y}.type || "string"`).assign(w,(0,ke._)`${y}.validate`),()=>r.assign(v,(0,ke._)`"string"`).assign(w,y)),t.fail$data((0,ke.or)(R(),O()));function R(){return l.strictSchema===!1?ke.nil:(0,ke._)`${s} && !${w}`}function O(){let I=f.$async?(0,ke._)`(${y}.async ? await ${w}(${n}) : ${w}(${n}))`:(0,ke._)`${w}(${n})`,A=(0,ke._)`(typeof ${w} == "function" ? ${I} : ${w}.test(${n}))`;return(0,ke._)`${w} && ${w} !== true && ${v} === ${e} && !${A}`}}function m(){let g=p.formats[o];if(!g){R();return}if(g===!0)return;let[y,v,w]=O(g);y===e&&t.pass(I());function R(){if(l.strictSchema===!1){p.logger.warn(A());return}throw new Error(A());function A(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function O(A){let L=A instanceof RegExp?(0,ke.regexpCode)(A):l.code.formats?(0,ke._)`${l.code.formats}${(0,ke.getProperty)(o)}`:void 0,W=r.scopeValue("formats",{key:o,ref:A,code:L});return typeof A=="object"&&!(A instanceof RegExp)?[A.type||"string",A.validate,(0,ke._)`${W}.validate`]:["string",A,W]}function I(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!f.$async)throw new Error("async format in sync schema");return(0,ke._)`await ${w}(${n})`}return typeof v=="function"?(0,ke._)`${w}(${n})`:(0,ke._)`${w}.test(${n})`}}}};Gc.default=pP});var $v=$(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});var fP=xv(),dP=[fP.default];Jc.default=dP});var Sv=$(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.contentVocabulary=kn.metadataVocabulary=void 0;kn.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];kn.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Cv=$(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});var hP=gy(),mP=Ry(),gP=nv(),yP=pv(),vP=gv(),wP=_v(),bP=$v(),kv=Sv(),_P=[yP.default,hP.default,mP.default,(0,gP.default)(!0),bP.default,kv.metadataVocabulary,kv.contentVocabulary,vP.default,wP.default];Kc.default=_P});var Pv=$(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});Js.DiscrError=void 0;var Ev;(function(t){t.Tag="tag",t.Mapping="mapping"})(Ev||(Js.DiscrError=Ev={}))});var Rv=$(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});var Cn=Z(),Yc=Pv(),Iv=Ii(),xP=Pi(),$P=ne(),SP={message:({params:{discrError:t,tagName:e}})=>t===Yc.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,Cn._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},kP={keyword:"discriminator",type:"object",schemaType:"object",error:SP,code(t){let{gen:e,data:r,schema:n,parentSchema:i,it:o}=t,{oneOf:s}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let l=e.let("valid",!1),u=e.const("tag",(0,Cn._)`${r}${(0,Cn.getProperty)(a)}`);e.if((0,Cn._)`typeof ${u} == "string"`,()=>f(),()=>t.error(!1,{discrError:Yc.DiscrError.Tag,tag:u,tagName:a})),t.ok(l);function f(){let m=d();e.if(!1);for(let g in m)e.elseIf((0,Cn._)`${u} === ${g}`),e.assign(l,p(m[g]));e.else(),t.error(!1,{discrError:Yc.DiscrError.Mapping,tag:u,tagName:a}),e.endIf()}function p(m){let g=e.name("valid"),y=t.subschema({keyword:"oneOf",schemaProp:m},g);return t.mergeEvaluated(y,Cn.Name),g}function d(){var m;let g={},y=w(i),v=!0;for(let I=0;I<s.length;I++){let A=s[I];if(A?.$ref&&!(0,$P.schemaHasRulesButRef)(A,o.self.RULES)){let W=A.$ref;if(A=Iv.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,W),A instanceof Iv.SchemaEnv&&(A=A.schema),A===void 0)throw new xP.default(o.opts.uriResolver,o.baseId,W)}let L=(m=A?.properties)===null||m===void 0?void 0:m[a];if(typeof L!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);v=v&&(y||w(A)),R(L,I)}if(!v)throw new Error(`discriminator: "${a}" must be required`);return g;function w({required:I}){return Array.isArray(I)&&I.includes(a)}function R(I,A){if(I.const)O(I.const,A);else if(I.enum)for(let L of I.enum)O(L,A);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function O(I,A){if(typeof I!="string"||I in g)throw new Error(`discriminator: "${a}" values must be unique strings`);g[I]=A}}}};Xc.default=kP});var Tv=$((VM,CP)=>{CP.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 Av=$((jM,EP)=>{EP.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 Nv=$((DM,PP)=>{PP.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 Mv=$((qM,IP)=>{IP.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 Ov=$((FM,RP)=>{RP.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 Lv=$((BM,TP)=>{TP.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 Vv=$((HM,AP)=>{AP.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 jv=$((WM,NP)=>{NP.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 Dv=$(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});var MP=Tv(),OP=Av(),LP=Nv(),VP=Mv(),jP=Ov(),DP=Lv(),qP=Vv(),FP=jv(),BP=["/properties"];function HP(t){return[MP,OP,LP,VP,jP,e(this,DP),qP,e(this,FP)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function e(r,n){return t?r.$dataMetaSchema(n,BP):n}}Qc.default=HP});var qv=$((ve,ep)=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.MissingRefError=ve.ValidationError=ve.CodeGen=ve.Name=ve.nil=ve.stringify=ve.str=ve._=ve.KeywordCxt=ve.Ajv2020=void 0;var WP=py(),zP=Cv(),UP=Rv(),GP=Dv(),Zc="https://json-schema.org/draft/2020-12/schema",En=class extends WP.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),zP.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(UP.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:r}=this.opts;r&&(GP.default.call(this,e),this.refs["http://json-schema.org/schema"]=Zc)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Zc)?Zc:void 0)}};ve.Ajv2020=En;ep.exports=ve=En;ep.exports.Ajv2020=En;Object.defineProperty(ve,"__esModule",{value:!0});ve.default=En;var JP=Ei();Object.defineProperty(ve,"KeywordCxt",{enumerable:!0,get:function(){return JP.KeywordCxt}});var Pn=Z();Object.defineProperty(ve,"_",{enumerable:!0,get:function(){return Pn._}});Object.defineProperty(ve,"str",{enumerable:!0,get:function(){return Pn.str}});Object.defineProperty(ve,"stringify",{enumerable:!0,get:function(){return Pn.stringify}});Object.defineProperty(ve,"nil",{enumerable:!0,get:function(){return Pn.nil}});Object.defineProperty(ve,"Name",{enumerable:!0,get:function(){return Pn.Name}});Object.defineProperty(ve,"CodeGen",{enumerable:!0,get:function(){return Pn.CodeGen}});var KP=Ps();Object.defineProperty(ve,"ValidationError",{enumerable:!0,get:function(){return KP.default}});var YP=Pi();Object.defineProperty(ve,"MissingRefError",{enumerable:!0,get:function(){return YP.default}})});Ot();Go();Lt();ri();import{transform as rI}from"esbuild";import{resolve as Ar}from"node:path";import{resolve as eI}from"node:path";import{readFile as Om}from"node:fs/promises";import{basename as c2,relative as Lm,resolve as Vm}from"node:path";mt();import{dirname as Cm,resolve as Em}from"node:path";import j from"typescript";import{readFileSync as K$}from"node:fs";import{resolve as Y$}from"node:path";import ce from"typescript";function Gl(t,e){let r=new Map;for(let n of t.statements){if(!ce.isImportDeclaration(n)||!n.importClause?.namedBindings||!ce.isStringLiteral(n.moduleSpecifier)||!ce.isNamedImports(n.importClause.namedBindings))continue;let i=n.moduleSpecifier.text;i.endsWith(".tsx")||(i=`${i}.tsx`);let o=Y$(e,i);for(let s of n.importClause.namedBindings.elements)r.set(s.name.text,o)}return r}function X$(t){if(ce.isObjectBindingPattern(t.name)){let e=[];for(let r of t.name.elements)ce.isBindingElement(r)&&ce.isIdentifier(r.name)&&e.push(r.name.text);return e}return ce.isIdentifier(t.name)?[t.name.text]:[]}function Q$(t){if(!ce.isObjectBindingPattern(t.name)||t.name.elements.length===0)return null;let e=t.name.elements[0];return!ce.isBindingElement(e)||!ce.isIdentifier(e.name)?null:e.name.text}function Z$(t){if(ce.isParenthesizedExpression(t))return t.expression;if(ce.isJsxElement(t)||ce.isJsxSelfClosingElement(t)||ce.isJsxFragment(t))return t;if(ce.isBlock(t))for(let e=t.statements.length-1;e>=0;e--){let r=t.statements[e];if(ce.isReturnStatement(r)&&r.expression)return ce.isParenthesizedExpression(r.expression)?r.expression.expression:r.expression}return null}function Sm(t){if(!ce.isIdentifier(t.expression)||t.expression.text!=="view"||t.arguments.length!==1)return null;let e=t.arguments[0];if(!ce.isArrowFunction(e)&&!ce.isFunctionExpression(e))return null;let r="__noop",n=[];if(e.parameters.length===1){let s=Q$(e.parameters[0]);if(n=X$(e.parameters[0]),s)r=s;else if(ce.isIdentifier(e.parameters[0].name))r=e.parameters[0].name.text,n=[r];else return null}else if(e.parameters.length>1)return null;let i=Z$(e.body);if(!i)return null;let o;return t.typeArguments&&t.typeArguments.length===1&&(o=t.typeArguments[0].getText()),{paramName:r,jsxRoot:i,propNames:n,propsType:o}}function Jl(t,e){let r=null;function n(i){if(ce.isVariableStatement(i))for(let o of i.declarationList.declarations){if(!ce.isIdentifier(o.name)||o.name.text!==e||!o.initializer||!ce.isCallExpression(o.initializer))continue;let s=Sm(o.initializer);s&&(r=s)}if(ce.isExportAssignment(i)&&i.isExportEquals===!1&&i.expression&&ce.isCallExpression(i.expression)){let o=Sm(i.expression);o&&e==="default"&&(r=o)}ce.forEachChild(i,n)}return n(t),r}function km(t,e){let r=K$(t,"utf-8"),n=ce.createSourceFile(t,r,ce.ScriptTarget.Latest,!0,ce.ScriptKind.TSX);return Jl(n,e)}function e2(t,e,r){if("tone"in e){let n=e.tone;delete e.tone,"variant"in e||(e.variant=n),r.warnings.push(`"tone" on <${t}> is deprecated; use variant instead (mapped automatically)`)}if("textStyle"in e){let n=e.textStyle;delete e.textStyle,"variant"in e||(e.variant=n),r.warnings.push(`"textStyle" on <${t}> is deprecated; use variant instead (mapped automatically)`)}}function Kl(t){return t.join(".")}function fn(t){let e=t.getText().replace(/\s+/g," ").trim();return e.length>100?`${e.slice(0,97)}...`:e}function Xl(t){if(j.isIdentifier(t))return[t.text];if(j.isPropertyAccessExpression(t)){let e=Xl(t.expression);return e?[...e,t.name.text]:null}return null}function Pm(t,e){if(e.length===0)return t;let r=e.join(".");return{kind:"binding",path:t.path?`${t.path}.${r}`:r,scope:t.scope}}function pi(t,e){let r=Xl(t);if(!r)return null;if(r[0]in e.propBindings)return Pm(e.propBindings[r[0]],r.slice(1));if(r[0]===e.vmName)return{kind:"binding",path:Kl(r.slice(1))};let n=e.scopes[e.scopes.length-1];return n&&r[0]===n?{kind:"binding",path:Kl(r.slice(1)),scope:n}:null}function t2(t,e){let r,n={};for(let i of t.properties){if(!j.isPropertyAssignment(i)||!j.isIdentifier(i.name))continue;let o=i.name.text;if(o==="name"&&j.isStringLiteral(i.initializer)){r=i.initializer.text;continue}if(o==="params"&&j.isObjectLiteralExpression(i.initializer))for(let s of i.initializer.properties){if(!j.isPropertyAssignment(s)||!j.isIdentifier(s.name))continue;let a=hs(s.initializer,e);a!==null?n[s.name.text]=a:e.errors.push(`Unsupported action param expression for "${s.name.text}": ${fn(s.initializer)}`)}}return r?Object.keys(n).length>0?{kind:"action",name:r,params:n}:{kind:"action",name:r}:null}function hs(t,e){if(j.isStringLiteral(t)||j.isNoSubstitutionTemplateLiteral(t))return t.text;if(t.kind===j.SyntaxKind.TrueKeyword)return!0;if(t.kind===j.SyntaxKind.FalseKeyword)return!1;if(j.isNumericLiteral(t))return Number(t.text);if(t.kind===j.SyntaxKind.NullKeyword)return null;if(j.isTemplateExpression(t)){let n=[];t.head.text&&n.push(t.head.text);for(let i of t.templateSpans){let o=pi(i.expression,e);if(!o)return null;n.push(o),i.literal.text&&n.push(i.literal.text)}return{kind:"concat",parts:n}}let r=pi(t,e);if(r)return r;if(j.isObjectLiteralExpression(t)){let n=t2(t,e);if(n)return n;let i={};for(let o of t.properties){if(!j.isPropertyAssignment(o)||!j.isIdentifier(o.name))continue;let s=hs(o.initializer,e);s!==null?i[o.name.text]=s:e.errors.push(`Unsupported object literal property "${o.name.text}": ${fn(o.initializer)}`)}return{kind:"literal",value:i}}if(j.isArrayLiteralExpression(t)){let n=[];for(let i of t.elements){if(!j.isExpression(i))continue;let o=hs(i,e);o!==null?n.push(o):e.errors.push(`Unsupported array element expression: ${fn(i)}`)}return n}return null}function r2(t){return j.isIdentifier(t)?t.text:j.isPropertyAccessExpression(t)&&j.isIdentifier(t.name)?t.name.text:null}function Im(t){return t.getText()}function Yl(t,e){let r=[];for(let n of t){if(j.isJsxText(n)){let i=n.getText().trim();i&&r.push({kind:"text",value:i});continue}if(j.isJsxExpression(n)&&n.expression){let i=pi(n.expression,e);if(i){r.push(i);continue}let o=Rm(n.expression,e);o?Array.isArray(o)?r.push(...o):r.push(o):e.errors.push(`Unsupported JSX child expression: ${fn(n.expression)}`);continue}if(j.isJsxElement(n)||j.isJsxSelfClosingElement(n)){let i=fi(n,e);i&&r.push(i)}}return r}function n2(t,e){if(t.length===0)return null;let r=t[0];return r in e.propBindings?Pm(e.propBindings[r],t.slice(1)):r===e.vmName?{kind:"binding",path:Kl(t.slice(1))}:null}function Rm(t,e){if(j.isParenthesizedExpression(t))return Rm(t.expression,e);if(j.isCallExpression(t)&&j.isPropertyAccessExpression(t.expression)){let n=Xl(t.expression.expression),i=t.expression.name.text;if(n&&i==="map"&&t.arguments.length>=1){let o=n2(n,e);if(!o)return null;let s=t.arguments[0];if(!j.isArrowFunction(s)&&!j.isFunctionExpression(s))return e.errors.push("map callback must be an arrow function"),null;let a=s.parameters;if(a.length!==1||!j.isIdentifier(a[0].name))return e.errors.push("map callback must have a single item parameter"),null;let l=a[0].name.text,u={...e,scopes:[...e.scopes,l]},f=null,p=j.isParenthesizedExpression(s.body)?s.body.expression:s.body;if(j.isBlock(s.body))return e.errors.push("map callback body must be a JSX expression, not a block"),null;if(j.isJsxElement(p)||j.isJsxSelfClosingElement(p)?f=fi(p,u):j.isJsxFragment(p)&&(f=Ql(p,u)),!f)return null;let d;if(j.isJsxElement(p)||j.isJsxSelfClosingElement(p)){let m=j.isJsxElement(p)?p.openingElement.attributes:p.attributes;for(let g of m.properties)if(!(!j.isJsxAttribute(g)||Im(g.name)!=="key"||!g.initializer)&&j.isJsxExpression(g.initializer)&&g.initializer.expression){let y=pi(g.initializer.expression,u);y&&(d=y)}}return{kind:"map",source:o,item:l,key:d,body:f}}}if(j.isJsxElement(t)||j.isJsxSelfClosingElement(t))return fi(t,e);let r=pi(t,e);return r||null}function Ql(t,e){return{kind:"fragment",children:Yl(t.children,e)}}function i2(t,e,r){let n=r.viewImports.get(t);return n?km(n,t)?{kind:"viewRef",name:t,sourcePath:n,props:e}:(r.errors.push(`View component "${t}" is imported but has no view() export`),null):null}function fi(t,e){let r=j.isJsxElement(t)?t.openingElement:t,n=r2(r.tagName);if(!n)return e.errors.push("Unsupported JSX tag expression"),null;let i={};for(let l of r.attributes.properties){if(!j.isJsxAttribute(l))continue;let u=Im(l.name);if(u!=="key"){if(!l.initializer){i[u]=!0;continue}if(j.isStringLiteral(l.initializer)){i[u]=l.initializer.text;continue}if(j.isJsxExpression(l.initializer)&&l.initializer.expression){let f=hs(l.initializer.expression,e);f!==null?i[u]=f:e.errors.push(`Unsupported JSX prop expression for "${u}" on <${n}>: ${fn(l.initializer.expression)}`)}}}if(!e.allowedComponents.has(n)){let l=i2(n,i,e);return l||(e.errors.push(`Component "${n}" is not in the allowed registry`),null)}e2(n,i,e);let o=e;if(n==="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(`<${n} each="${s}"> requires an ancestor <Table source={...}>`),null;delete i.each;let u={...o,scopes:[...o.scopes,s]},f=j.isJsxElement(t)?Yl(t.children,u):[];return{kind:"map",source:l,item:s,body:{kind:"component",name:n,props:i,children:f}}}let a=j.isJsxElement(t)?Yl(t.children,o):[];return{kind:"component",name:n,props:i,children:a}}function o2(t){let e=null;function r(n){if(j.isCallExpression(n)&&j.isIdentifier(n.expression)&&n.expression.text==="screen"&&n.arguments.length===1&&(j.isArrowFunction(n.arguments[0])||j.isFunctionExpression(n.arguments[0]))){let i=n.arguments[0],o="unknown";if(n.typeArguments&&n.typeArguments.length===1){let a=n.typeArguments[0];j.isTypeReferenceNode(a)&&j.isIdentifier(a.typeName)&&(o=a.typeName.text)}let s=i.body;if(j.isParenthesizedExpression(s))(j.isJsxElement(s.expression)||j.isJsxSelfClosingElement(s.expression))&&(e={viewModel:o,jsxRoot:s.expression});else if(j.isJsxElement(s)||j.isJsxSelfClosingElement(s))e={viewModel:o,jsxRoot:s};else if(j.isBlock(s)&&s.statements.length===1){let a=s.statements[0];j.isReturnStatement(a)&&a.expression&&(j.isParenthesizedExpression(a.expression)?e={viewModel:o,jsxRoot:a.expression.expression}:e={viewModel:o,jsxRoot:a.expression})}}j.forEachChild(n,r)}return r(t),e}function Tm(t,e,r,n={}){let i=new Set(st);for(let p of n.allowlistExtra??[])i.add(p);let o=Em(e),s=Cm(o),a=j.createSourceFile(o,t,j.ScriptTarget.Latest,!0,j.ScriptKind.TSX),l={vmName:"vm",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:Gl(a,s),allowedComponents:i},u=o2(a);if(!u)return{viewModel:"unknown",exportName:r,root:{kind:"fragment",children:[]},errors:["No screen<T>() default export found"],warnings:[]};let f=j.isJsxElement(u.jsxRoot)||j.isJsxSelfClosingElement(u.jsxRoot)?fi(u.jsxRoot,l):j.isJsxFragment(u.jsxRoot)?Ql(u.jsxRoot,l):null;return f?{viewModel:u.viewModel,exportName:r,root:f,errors:l.errors,warnings:l.warnings}:(l.errors.push("screen() callback must return a single JSX root element"),{viewModel:u.viewModel,exportName:r,root:{kind:"fragment",children:[]},errors:l.errors,warnings:l.warnings})}function s2(t,e){let r={...e.propBindings};for(let i of t.propNames)r[i]={kind:"binding",path:"",scope:i};let n={...e,vmName:t.paramName,propBindings:r,scopes:[]};return j.isJsxElement(t.jsxRoot)||j.isJsxSelfClosingElement(t.jsxRoot)?fi(t.jsxRoot,n):j.isJsxFragment(t.jsxRoot)?Ql(t.jsxRoot,n):j.isConditionalExpression(t.jsxRoot)?(e.errors.push("view() partial root must be a JSX element or fragment; conditional expressions are not supported"),null):j.isExpression(t.jsxRoot)?(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported expression: ${fn(t.jsxRoot)}`),null):(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported syntax kind: ${j.SyntaxKind[t.jsxRoot.kind]}`),null)}function Am(t,e,r,n={}){let i=new Set(st);for(let p of n.allowlistExtra??[])i.add(p);let o=Em(e),s=Cm(o),a=j.createSourceFile(o,t,j.ScriptTarget.Latest,!0,j.ScriptKind.TSX),l=Jl(a,r),u={vmName:l?.paramName??"__noop",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:Gl(a,s),allowedComponents:i};if(!l)return{exportName:r,propNames:[],root:{kind:"fragment",children:[]},errors:[`No view() export "${r}" found in ${e}`],warnings:[]};let f=s2(l,u);return f?{exportName:r,propsType:l.propsType,propNames:l.propNames,root:f,errors:u.errors,warnings:u.warnings}:{exportName:r,propsType:l.propsType,propNames:l.propNames,root:{kind:"fragment",children:[]},errors:u.errors,warnings:u.warnings}}function Zl(t){let e=[];function r(n){if(n.kind==="viewRef"){e.push(n);return}if(n.kind==="component"){for(let i of n.children)r(i);return}if(n.kind==="map"){r(n.body);return}if(n.kind==="fragment")for(let i of n.children)r(i)}return r(t),e}function Nm(t){return`${t.sourcePath}:${t.name}`}mt();var a2=new Set(["swiftui","compose"]),l2=new Set(["action"]);function u2(t,e){return!st.has(t)&&t in e.extensions}function eu(t){return t?` (${t})`:""}function ms(t,e,r={}){let n=[],i=[],o=r.targets??[],s=o.some(l=>a2.has(l)),a=l=>{if(l.kind!=="viewRef"){if(l.kind==="component"){if(!st.has(l.name)&&!(l.name in e.extensions))n.push(`Extension component "${l.name}" is not registered in extensions.yaml${eu(r.source)}`);else if(u2(l.name,e)){let u=e.extensions[l.name];s&&u.renderer==="react-only"&&n.push(`Extension "${l.name}" is react-only but binding targets include native renderer(s): ${o.join(", ")}${eu(r.source)}`);for(let f of Object.keys(l.props))f in u.properties||l2.has(f)||n.push(`Extension "${l.name}" does not accept property "${f}"${eu(r.source)}`)}for(let u of l.children)a(u);return}if(l.kind==="map"){a(l.body);return}if(l.kind==="fragment")for(let u of l.children)a(u)}};return a(t),{errors:n,warnings:i}}function Mm(t,e,r,n,i){let o=[],s=[],a=ms(t,r,{targets:n,source:i.screen});o.push(...a.errors),s.push(...a.warnings);for(let l=0;l<e.length;l++){let u=ms(e[l],r,{targets:n,source:i.partials[l]});o.push(...u.errors),s.push(...u.warnings)}return{errors:o,warnings:s}}async function p2(t,e,r){let n=await Om(t,"utf-8"),i=Am(n,t,e,{allowlistExtra:r.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t} (${e}):
282
395
  ${i.errors.map(o=>` - ${o}`).join(`
283
- `)}`);if(r.extensionRegistry){let o=Sl(i.root,r.extensionRegistry);if(o.errors.length>0)throw new Error(`Extension validation errors in ${t} (${e}):
396
+ `)}`);if(r.extensionRegistry){let o=ms(i.root,r.extensionRegistry,{targets:r.targets,source:t});if(o.errors.length>0)throw new Error(`Extension validation errors in ${t} (${e}):
284
397
  ${o.errors.map(s=>` - ${s}`).join(`
285
- `)}`);i.warnings.push(...o.warnings)}for(let o of i.warnings)console.warn(`Warning in ${t} (${e}): ${o}`);return{version:1,source:Eh(process.cwd(),Ph(t)),viewModel:i.propsType??"Record<string, unknown>",exportName:i.exportName,root:i.root,isPartial:!0,propsType:i.propsType}}async function b2(t,e){let r=new Map,n=bl(t);for(;n.length>0;){let i=n.shift(),o=xh(i);if(r.has(o))continue;let s=await _2(i.sourcePath,i.name,e);r.set(o,s),n.push(...bl(s.root))}return[...r.values()]}async function Ch(t,e={}){let r=await kh(t.sourcePath,"utf-8"),n=t.exportName??w2(t.sourcePath,".view.tsx"),i=Sh(r,t.sourcePath,n,{allowlistExtra:e.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t.sourcePath}:
398
+ `)}`);i.warnings.push(...o.warnings)}for(let o of i.warnings)console.warn(`Warning in ${t} (${e}): ${o}`);return{version:1,source:Lm(process.cwd(),Vm(t)),viewModel:i.propsType??"Record<string, unknown>",exportName:i.exportName,root:i.root,isPartial:!0,propsType:i.propsType}}async function f2(t,e){let r=new Map,n=Zl(t);for(;n.length>0;){let i=n.shift(),o=Nm(i);if(r.has(o))continue;let s=await p2(i.sourcePath,i.name,e);r.set(o,s),n.push(...Zl(s.root))}return[...r.values()]}async function jm(t,e={}){let r=await Om(t.sourcePath,"utf-8"),n=t.exportName??c2(t.sourcePath,".view.tsx"),i=Tm(r,t.sourcePath,n,{allowlistExtra:e.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t.sourcePath}:
286
399
  ${i.errors.map(a=>` - ${a}`).join(`
287
- `)}`);if(e.extensionRegistry){let a=Sl(i.root,e.extensionRegistry);if(a.errors.length>0)throw new Error(`Extension validation errors in ${t.sourcePath}:
288
- ${a.errors.map(u=>` - ${u}`).join(`
289
- `)}`);i.warnings.push(...a.warnings)}for(let a of i.warnings)console.warn(`Warning in ${t.sourcePath}: ${a}`);let o={version:1,source:Eh(process.cwd(),Ph(t.sourcePath)),viewModel:i.viewModel,exportName:i.exportName,root:i.root},s=await b2(o.root,e);return{screen:o,partials:s}}Pt();hl();It();function S2(t){let e=Vi[t];return e?e.lowering==="inline-css"||e.lowering==="class-name":!1}function Kn(t,e,r,n){if(t.kind==="component"){let{name:i,props:o}=t;if(r.has(i)||!Ct.has(i)){for(let s of t.children)Kn(s,e,r,n);return}for(let s of Object.keys(o))S2(s)&&(Ku(s,i)||n.push(`${e}: <${i}> does not accept property "${s}"`));for(let s of t.children)Kn(s,e,r,n);return}if(t.kind==="map"){Kn(t.body,e,r,n);return}if(t.kind==="fragment"){for(let i of t.children)Kn(i,e,r,n);return}}async function Ih(t,e=[]){let r=new Set(e),n=[];for(let i of t)Kn(i.root,i.source,r,n);if(n.length>0)throw new Error(`View property validation failed:
400
+ `)}`);let o={version:1,source:Lm(process.cwd(),Vm(t.sourcePath)),viewModel:i.viewModel,exportName:i.exportName,root:i.root},s=await f2(o.root,{...e,targets:t.targets??e.targets});if(e.extensionRegistry){let a=Mm(o.root,s.map(l=>l.root),e.extensionRegistry,t.targets??["react"],{screen:o.source,partials:s.map(l=>l.source)});if(a.errors.length>0)throw new Error(`Extension validation errors in ${t.sourcePath}:
401
+ ${a.errors.map(l=>` - ${l}`).join(`
402
+ `)}`);i.warnings.push(...a.warnings)}for(let a of i.warnings)console.warn(`Warning in ${t.sourcePath}: ${a}`);return{screen:o,partials:s}}Ot();Ul();mt();function d2(t){let e=no[t];return e?e.lowering==="inline-css"||e.lowering==="class-name":!1}function di(t,e,r,n){if(t.kind==="component"){let{name:i,props:o}=t;if(r.has(i)||!st.has(i)){for(let s of t.children)di(s,e,r,n);return}for(let s of Object.keys(o))d2(s)&&(Cp(s,i)||n.push(`${e}: <${i}> does not accept property "${s}"`));for(let s of t.children)di(s,e,r,n);return}if(t.kind==="map"){di(t.body,e,r,n);return}if(t.kind==="fragment"){for(let i of t.children)di(i,e,r,n);return}}async function Dm(t,e=[]){let r=new Set(e),n=[];for(let i of t)di(i.root,i.source,r,n);if(n.length>0)throw new Error(`View property validation failed:
290
403
  ${n.map(i=>` - ${i}`).join(`
291
- `)}`)}var Ny=ku(Ry(),1);Ir();Ft();import{readFile as Ty}from"node:fs/promises";import{resolve as Ay}from"node:path";var sP=Ny.default,aP=Ay(ke(),"spec/ui-dsl-extensions.meta.json"),$s;async function lP(){if($s)return $s;let t=JSON.parse(await Ty(aP,"utf-8"));return $s=new sP({allErrors:!0,strict:!1}).compile(t),$s}async function Oy(t){if(!t)return{extensions:{}};let e=Ay(t),r=await Ty(e,"utf-8"),n=st.load(r),i=await lP();if(!i(n)){let o=i.errors?.map(s=>`${s.instancePath||"/"} ${s.message??""}`).join("; ")??"unknown";throw new Error(`Extension registry validation failed (${e}): ${o}`)}return n}qn();async function My(t,e,r){return(await Xd()).renderReactPreviewBundle(t,e,r)}var $u="view-contracts:screen/",xs="view-contracts:theme.css";var ht={dispatch:"view-contracts:runtime/dispatch",style:"view-contracts:runtime/style",types:"view-contracts:runtime/types",styleHelpers:"view-contracts:runtime/style-helpers",contracts:"view-contracts:contracts",extensions:"view-contracts:extensions",mock:"view-contracts:preview/mock"};async function uP(t){if(!t.extensions)return{allowlistExtra:t.allowlistExtra??[]};let e=await Oy(t.extensions),r=[...new Set([...t.allowlistExtra??[],...Object.keys(e.extensions)])];return{extensionRegistry:e,allowlistExtra:r}}async function Ly(t,e){let r=await qt(t),i=(await Wu(r.bindings)).views.find(g=>g.screenName===e);if(!i)throw new Error(`No view binding for screen "${e}"`);if(!i.targets.includes("react"))throw new Error(`Screen "${e}" is not a react target`);let{extensionRegistry:o,allowlistExtra:s}=await uP(r),a=xe(t),{screen:u,partials:c}=await Ch({sourcePath:cP(a,i.source),exportName:i.exportName,screenName:i.screenName},{allowlistExtra:s,extensionRegistry:o}),{tokensPath:p,themePath:f}=ji(r),{themeIR:d}=await Bo(p,f);await zn(r,t);let m=[u,...c];return await Ih(m,s),cl(m,d),My(u,c,{runtimeImportFrom:ht.dispatch,extensionsImportFrom:ht.extensions,contractsImportFrom:ht.contracts,allowlistExtra:s,previewImports:ht})}Pt();Ga();import{resolve as jy}from"node:path";var Dy="\0";function Vy(t){return`${Dy}${t}`}function qy(t){let e="";async function r(){let o=await qt(t.configPath);e=await qd(t.configPath,o)}function n(o){return o.startsWith(e)&&o.endsWith(".mock.yaml")}function i(o,s){let a=o.moduleGraph.getModuleById(Vy(`${Hn}${s}`));return a?(o.moduleGraph.invalidateModule(a),[a]):[]}return{name:"view-contracts-preview-mock",enforce:"pre",async buildStart(){await r()},resolveId(o){return o.startsWith(Hn)?Vy(o):null},async load(o){let s=Dd(o.slice(Dy.length));if(!s)return null;try{let a=await qt(t.configPath);return await Vd(t.configPath,a,s)}catch(a){let u=a instanceof Error?a.message:String(a);this.error(`Preview mock failed for ${s}:
292
- ${u}`)}},configureServer(o){r(),o.watcher.on("change",s=>{if(!n(s))return;let a=jy(s).slice(e.length+1).replace(/\.mock\.yaml$/,"");i(o,a)})},handleHotUpdate({file:o,server:s}){if(!n(o))return;let a=jy(o).slice(e.length+1).replace(/\.mock\.yaml$/,"");return i(s,a)}}}var pP="\0";function ks(t){return`${pP}${t}`}function dP(t){let e=ks($u);if(!t.startsWith(e))return null;let r=t.slice(e.length);return r.endsWith(".tsx")?r.slice(0,-4):r}function hP(t){let e="",r="",n=[],i,o,s="";async function a(){let f=await qt(t.configPath);e=xe(t.configPath),r=f.viewsDir,n=[],f.design?.tokens&&n.push(f.design.tokens),f.design?.theme&&n.push(f.design.theme),o=f.design?.extensionsCss,i=f.extensions,s=Dn()}function u(f){let d=f.moduleGraph.getModuleById(ks(xs));return d?(f.moduleGraph.invalidateModule(d),[d]):[]}function c(f,d){let m=f.moduleGraph.getModulesByFile(d);if(m)for(let g of m)f.moduleGraph.invalidateModule(g);(d.endsWith(".view.tsx")||d.includes("/views/"))&&f.moduleGraph.invalidateAll()}function p(f){return n.some(d=>f===d)||f===s||o!==void 0&&f===o}return{name:"view-contracts-preview",enforce:"pre",async buildStart(){await a()},resolveId(f){return f===xs||f.startsWith($u)?ks(f):null},async load(f){if(f===ks(xs)){let m=await qt(t.configPath);return await Fn(m,t.configPath)}let d=dP(f);if(d)try{let m=await Ly(t.configPath,d),{code:g}=await fP(m,{loader:"tsx",format:"esm",jsx:"automatic",jsxImportSource:"react",target:"es2022"});return g}catch(m){let g=m instanceof Error?m.message:String(m);this.error(`Preview compile failed for ${d}:
293
- ${g}`)}return null},configureServer(f){a(),f.watcher.on("change",d=>{p(d)&&u(f),(d.startsWith(r)||p(d)||i&&d===i||Ja(d))&&c(f,d)})},handleHotUpdate({file:f,server:d}){if(p(f))return c(d,f),u(d);if(f.startsWith(r)||i&&f===i||Ja(f))return c(d,f),[...d.moduleGraph.getModulesByFile(f)??[]]}}}function mP(t){let e=ke(),r=Ur();return[{find:"@view-contracts/core",replacement:Sr(e,"dist/dsl.js")},{find:ht.dispatch,replacement:Sr(r,"dispatch.ts")},{find:ht.style,replacement:Sr(r,"style.ts")},{find:ht.types,replacement:Sr(r,"types.ts")},{find:ht.styleHelpers,replacement:Sr(e,"dist/preview-style-helpers.js")},{find:ht.contracts,replacement:Sr(t,"contracts/view-models.ts")},{find:ht.extensions,replacement:Sr(t,"src/components/extensions.tsx")}]}function gP(t,e){return[t,e,ke()]}export{gP as previewFsAllowPaths,mP as previewRuntimeAliases,qy as viewContractsPreviewMockPlugin,hP as viewContractsPreviewPlugin};
404
+ `)}`)}var Fv=np(qv(),1);jr();Lt();import{readFile as Bv}from"node:fs/promises";import{resolve as Hv}from"node:path";var XP=Fv.default,QP=Hv(Ee(),"spec/ui-dsl-extensions.meta.json"),Ks;async function ZP(){if(Ks)return Ks;let t=JSON.parse(await Bv(QP,"utf-8"));return Ks=new XP({allErrors:!0,strict:!1}).compile(t),Ks}async function Wv(t){if(!t)return{extensions:{}};let e=Hv(t),r=await Bv(e,"utf-8"),n=ht.load(r),i=await ZP();if(!i(n)){let o=i.errors?.map(s=>`${s.instancePath||"/"} ${s.message??""}`).join("; ")??"unknown";throw new Error(`Extension registry validation failed (${e}): ${o}`)}return n}ri();async function zv(t,e,r){return(await sm()).renderReactPreviewBundle(t,e,r)}var tp="view-contracts:screen/",Ys="view-contracts:theme.css";var $t={dispatch:"view-contracts:runtime/dispatch",style:"view-contracts:runtime/style",types:"view-contracts:runtime/types",styleHelpers:"view-contracts:runtime/style-helpers",contracts:"view-contracts:contracts",extensions:"view-contracts:extensions",mock:"view-contracts:preview/mock"};async function tI(t){if(!t.extensions)return{allowlistExtra:t.allowlistExtra??[]};let e=await Wv(t.extensions),r=[...new Set([...t.allowlistExtra??[],...Object.keys(e.extensions)])];return{extensionRegistry:e,allowlistExtra:r}}async function Uv(t,e){let r=await Jt(t),i=(await Sp(r.bindings)).views.find(g=>g.screenName===e);if(!i)throw new Error(`No view binding for screen "${e}"`);if(!i.targets.includes("react"))throw new Error(`Screen "${e}" is not a react target`);let{extensionRegistry:o,allowlistExtra:s}=await tI(r),a=Te(t),{screen:l,partials:u}=await jm({sourcePath:eI(a,i.source),exportName:i.exportName,screenName:i.screenName},{allowlistExtra:s,extensionRegistry:o}),{tokensPath:f,themePath:p}=ro(r),{themeIR:d}=await ds(f,p);await ci(r,t);let m=[l,...u];return await Dm(m,s),Fl(m,d),zv(l,u,{runtimeImportFrom:$t.dispatch,extensionsImportFrom:$t.extensions,contractsImportFrom:$t.contracts,allowlistExtra:s,previewImports:$t})}Ot();Qo();import{resolve as Gv}from"node:path";var Kv="\0";function Jv(t){return`${Kv}${t}`}function Yv(t){let e="";async function r(){let o=await Jt(t.configPath);e=await gh(t.configPath,o)}function n(o){return o.startsWith(e)&&o.endsWith(".mock.yaml")}function i(o,s){let a=o.moduleGraph.getModuleById(Jv(`${oi}${s}`));return a?(o.moduleGraph.invalidateModule(a),[a]):[]}return{name:"view-contracts-preview-mock",enforce:"pre",async buildStart(){await r()},resolveId(o){return o.startsWith(oi)?Jv(o):null},async load(o){let s=mh(o.slice(Kv.length));if(!s)return null;try{let a=await Jt(t.configPath);return await hh(t.configPath,a,s)}catch(a){let l=a instanceof Error?a.message:String(a);this.error(`Preview mock failed for ${s}:
405
+ ${l}`)}},configureServer(o){r(),o.watcher.on("change",s=>{if(!n(s))return;let a=Gv(s).slice(e.length+1).replace(/\.mock\.yaml$/,"");i(o,a)})},handleHotUpdate({file:o,server:s}){if(!n(o))return;let a=Gv(o).slice(e.length+1).replace(/\.mock\.yaml$/,"");return i(s,a)}}}var nI="\0";function Xs(t){return`${nI}${t}`}function iI(t){let e=Xs(tp);if(!t.startsWith(e))return null;let r=t.slice(e.length);return r.endsWith(".tsx")?r.slice(0,-4):r}function oI(t){let e="",r="",n=[],i,o,s="";async function a(){let p=await Jt(t.configPath);e=Te(t.configPath),r=p.viewsDir,n=[],p.design?.tokens&&n.push(p.design.tokens),p.design?.theme&&n.push(p.design.theme),o=p.design?.extensionsCss,i=p.extensions,s=ti()}function l(p){let d=p.moduleGraph.getModuleById(Xs(Ys));return d?(p.moduleGraph.invalidateModule(d),[d]):[]}function u(p,d){let m=p.moduleGraph.getModulesByFile(d);if(m)for(let g of m)p.moduleGraph.invalidateModule(g);(d.endsWith(".view.tsx")||d.includes("/views/"))&&p.moduleGraph.invalidateAll()}function f(p){return n.some(d=>p===d)||p===s||o!==void 0&&p===o}return{name:"view-contracts-preview",enforce:"pre",async buildStart(){await a()},resolveId(p){return p===Ys||p.startsWith(tp)?Xs(p):null},async load(p){if(p===Xs(Ys)){let m=await Jt(t.configPath);return await ni(m,t.configPath)}let d=iI(p);if(d)try{let m=await Uv(t.configPath,d),{code:g}=await rI(m,{loader:"tsx",format:"esm",jsx:"automatic",jsxImportSource:"react",target:"es2022"});return g}catch(m){let g=m instanceof Error?m.message:String(m);this.error(`Preview compile failed for ${d}:
406
+ ${g}`)}return null},configureServer(p){a(),p.watcher.on("change",d=>{f(d)&&l(p),(d.startsWith(r)||f(d)||i&&d===i||El(d))&&u(p,d)})},handleHotUpdate({file:p,server:d}){if(f(p))return u(d,p),l(d);if(p.startsWith(r)||i&&p===i||El(p))return u(d,p),[...d.moduleGraph.getModulesByFile(p)??[]]}}}function sI(t){let e=Ee(),r=tn();return[{find:"@view-contracts/core",replacement:Ar(e,"dist/dsl.js")},{find:$t.dispatch,replacement:Ar(r,"dispatch.ts")},{find:$t.style,replacement:Ar(r,"style.ts")},{find:$t.types,replacement:Ar(r,"types.ts")},{find:$t.styleHelpers,replacement:Ar(e,"dist/preview-style-helpers.js")},{find:$t.contracts,replacement:Ar(t,"contracts/view-models.ts")},{find:$t.extensions,replacement:Ar(t,"src/components/extensions.tsx")}]}function aI(t,e){return[t,e,Ee()]}export{aI as previewFsAllowPaths,sI as previewRuntimeAliases,Yv as viewContractsPreviewMockPlugin,oI as viewContractsPreviewPlugin};
294
407
  /*! Bundled license information:
295
408
 
296
409
  js-yaml/dist/js-yaml.mjs: