@zuplo/core 5.2237.0 → 5.2239.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/create.index.minified.js +1 -1
- package/index.minified.js +34 -34
- package/package.json +1 -1
package/index.minified.js
CHANGED
|
@@ -83,10 +83,10 @@ export default {
|
|
|
83
83
|
},
|
|
84
84
|
};
|
|
85
85
|
`,Eje=s(async function({systemDirectory:e,logger:t,config:r}){return _je.default.timeFn("Generating Worker shim",async()=>{t.debug("Generating Worker shim");let n=r?.flags?.esmWorker?yje:gje,i=mje.default.join(e,Yg.WORKER_ENTRY_NAME);try{await hje.default.writeFile(i,n.trimStart(),"utf-8")}catch(o){t.error(o);let a={message:`Error creating file at ${i}`,pluginName:"generate-worker-entry",severity:"error"};return{warnings:[],errors:[a]}}return{warnings:[],errors:[]}})},"generateWorker");sh.generateWorker=Eje});var eH=h(oh=>{"use strict";var i$=oh&&oh.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oh,"__esModule",{value:!0});oh.validateDevPortalJSON=void 0;var bje=i$(gn()),Qs=Yo(),Sje=require("fs/promises"),Xz=i$(require("path")),Qz=kt(),vje=rc(),Oje=i$(_n()),Pje="validate-dev-portal-json",Ije=s(async function({logger:e,sourceDirectory:t}){return Oje.default.timeFn("Validate dev-portal.json file",async()=>{e.debug("Validate dev-portal.json file");let r=Xz.default.join(t,Qz.USER_CONFIG_DIR_NAME),n=Xz.default.join(r,Qz.DEV_PORTAL_CONFIG_FILE);if(!await bje.default.fileExists(n))return e.debug("Project is missing a dev-portal.json file. Skipping validate-dev-portal-json plugin."),new vje.PluginResult;let i=[],o=await(0,Sje.readFile)(n,"utf-8"),a=JSON.parse(o);if(a.enableAuthentication&&a.authentication){let{provider:u}=a.authentication;if(u&&u!=="auth0"&&u!=="okta"&&u!=="azure-ad"&&u!=="clerk"&&u!=="oidc"&&u!=="external"&&i.push({message:"The authentication setting 'provider' is not set or invalid. Valid values are 'auth0', 'okta', 'azure-ad', 'clerk', 'oidc', or 'external'.",pluginName:"validate-dev-portal-json",severity:"warning"}),u==="external"){let{loginUrl:c,logoutUrl:l}=a.authentication;(0,Qs.isNonWhitespaceString)(c)?c.startsWith("$env(")&&!c.startsWith("$env(ZUPLO_PUBLIC_")&&i.push({message:"'loginUrl' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}):i.push({message:"The authentication setting for 'loginUrl' is not set or is an empty string.",pluginName:"validate-dev-portal-json",severity:"warning"}),(0,Qs.isNonWhitespaceString)(l)?l.startsWith("$env(")&&!l.startsWith("$env(ZUPLO_PUBLIC_")&&i.push({message:"'logoutUrl' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}):i.push({message:"The authentication setting for 'logoutUrl' is not set or is an empty string.",pluginName:"validate-dev-portal-json",severity:"warning"})}else if("authority"in a.authentication){let{authority:c}=a.authentication;if(!a.authentication.devPortalClient)i.push({message:"The authentication setting for 'devPortalClient' is not set. This property is required when 'authority' is also set.",pluginName:"validate-dev-portal-json",severity:"warning"});else{let{clientId:l,audience:f}=a.authentication.devPortalClient;(0,Qs.isNonWhitespaceString)(c)?c.startsWith("$env(")&&!c.startsWith("$env(ZUPLO_PUBLIC_")&&i.push({message:"'authority' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}):i.push({message:"The authentication setting for 'authority' is not set or is an empty string.",pluginName:"validate-dev-portal-json",severity:"warning"}),i.push(...Zz({audience:f,clientId:l}))}}else if("issuer"in a.authentication){let{issuer:c,clientId:l,clientSecret:f,audience:d}=a.authentication;(0,Qs.isNonWhitespaceString)(c)?c.startsWith("$env(")&&!c.startsWith("$env(ZUPLO_PUBLIC_")&&i.push({message:"'issuer' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}):i.push({message:"The authentication setting for 'issuer' is not set or is an empty string.",pluginName:"validate-dev-portal-json",severity:"warning"}),i.push(...Zz({audience:d,clientId:l,clientSecret:f}))}else throw new Qs.BuildIssueError({message:"The dev-portal.json is not valid. The 'authentication' section does not have required fields.",severity:"error"},Pje)}if(a.enableMonetization&&a.monetization){let{provider:u}=a.monetization;if((!(0,Qs.isNonWhitespaceString)(u)||u!=="stripe")&&i.push({message:"The monetization setting 'provider' is not set or an empty string. Valid values are 'stripe'.",pluginName:"validate-dev-portal-json",severity:"warning"}),u==="stripe"){let{pricingTableId:c,publishableKey:l,secretKey:f}=a.monetization;(0,Qs.isNonWhitespaceString)(c)?c.startsWith("$env(")?c.startsWith("$env(ZUPLO_PUBLIC_")||i.push({message:"'Pricing Table Id' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration. Field monetization.pricingTableId in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}):c.startsWith("prctbl_")||i.push({message:"'Pricing Table Id' field must start with prctbl_. Field monetization.pricingTableId in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}):i.push({message:"The monetization setting for 'Pricing Table Id' is not set or is an empty string. Field monetization.pricingTableId in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}),(0,Qs.isNonWhitespaceString)(l)?l.startsWith("$env(")?l.startsWith("$env(ZUPLO_PUBLIC_")||i.push({message:"'Publishable Key' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration. Field monetization.publishableKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}):l.startsWith("pk_")||i.push({message:"'Publishable Key' field must start with pk_. Field monetization.publishableKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}):i.push({message:"The monetization setting for 'Publishable Key' is not set or is an empty string. Field monetization.publishableKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}),(0,Qs.isNonWhitespaceString)(f)?f.startsWith("$env(")||i.push({message:"The monetization setting for 'Secret Key' must be an environment variable. Field monetization.secretKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}):i.push({message:"The monetization setting for 'Secret Key' is not set or is an empty string. Field monetization.secretKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"})}}else a.enableMonetization&&!a.monetization&&i.push({message:"Monetization was enabled but no monetization configuration was provider in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"});return{errors:[],warnings:i}})},"validateDevPortalJSON");oh.validateDevPortalJSON=Ije;function Zz({audience:e,clientId:t,clientSecret:r}){let n=[];return e&&e.startsWith("$env(")&&!e.startsWith("$env(ZUPLO_PUBLIC_")&&n.push({message:"'audience' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}),(0,Qs.isNonWhitespaceString)(t)?t.startsWith("$env(")&&!t.startsWith("$env(ZUPLO_PUBLIC_")&&n.push({message:"'clientId' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}):n.push({message:"The authentication setting for 'clientId' is not set or is an empty string.",pluginName:"validate-dev-portal-json",severity:"warning"}),(0,Qs.isNonWhitespaceString)(r)&&!r.startsWith("$env(")&&(r.startsWith("$env(ZUPLO_PUBLIC")&&n.push({message:"The authorization setting for 'Client Secret' should not be a public environment variable. ",pluginName:"validate-dev-portal-json",severity:"warning"}),n.push({message:"The authorization setting for 'Client Secret' must be an environment variable. Field authentication.devPortalClient.secretKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"})),n}s(Zz,"validateCommonAuth")});var c$=h(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});var wje="[",Tje="]",Nje="{",Aje="}",Rje=":",Cje=",",sH="true",oH="false",aH="null",tH='"',$je=new Map([["t",sH],["f",oH],["n",aH]]),o$=new Map([[tH,tH],["\\","\\"],["/","/"],["b","\b"],["n",`
|
|
86
|
-
`],["f","\f"],["r","\r"],["t"," "]]),s$=new Map([[wje,"Punctuator"],[Tje,"Punctuator"],[Nje,"Punctuator"],[Aje,"Punctuator"],[Rje,"Punctuator"],[Cje,"Punctuator"],[sH,"Boolean"],[oH,"Boolean"],[aH,"Null"]]),Uf=class extends Error{static{s(this,"ErrorWithLocation")}constructor(t,{line:r,column:n,index:i}){super(`${t} (${r}:${n})`),this.line=r,this.column=n,this.index=i}},a$=class extends Uf{static{s(this,"UnexpectedChar")}constructor(t,r){super(`Unexpected character ${t} found.`,r)}},ah=class extends Uf{static{s(this,"UnexpectedToken")}constructor(t){super(`Unexpected token ${t.type}(${t.value}) found.`,t.loc.start)}},u$=class extends Uf{static{s(this,"UnexpectedEOF")}constructor(t){super("Unexpected end of input found.",t)}},rH='"',nH="/",iH="*",Dje={comments:!1,ranges:!1};function Lje(e){return/[\s\n]/.test(e)}s(Lje,"isWhitespace");function sc(e){return e>="0"&&e<="9"}s(sc,"isDigit");function jje(e){return sc(e)||/[a-f]/i.test(e)}s(jje,"isHexDigit");function Mje(e){return e>="1"&&e<="9"}s(Mje,"isPositiveDigit");function Uje(e){return/[tfn]/.test(e)}s(Uje,"isKeywordStart");function xje(e){return sc(e)||e==="."||e==="-"}s(xje,"isNumberStart");function uH(e,t){t=Object.freeze({...Dje,...t});let r=-1,n=1,i=0,o=!1,a=[];function u(E,
|
|
86
|
+
`],["f","\f"],["r","\r"],["t"," "]]),s$=new Map([[wje,"Punctuator"],[Tje,"Punctuator"],[Nje,"Punctuator"],[Aje,"Punctuator"],[Rje,"Punctuator"],[Cje,"Punctuator"],[sH,"Boolean"],[oH,"Boolean"],[aH,"Null"]]),Uf=class extends Error{static{s(this,"ErrorWithLocation")}constructor(t,{line:r,column:n,index:i}){super(`${t} (${r}:${n})`),this.line=r,this.column=n,this.index=i}},a$=class extends Uf{static{s(this,"UnexpectedChar")}constructor(t,r){super(`Unexpected character ${t} found.`,r)}},ah=class extends Uf{static{s(this,"UnexpectedToken")}constructor(t){super(`Unexpected token ${t.type}(${t.value}) found.`,t.loc.start)}},u$=class extends Uf{static{s(this,"UnexpectedEOF")}constructor(t){super("Unexpected end of input found.",t)}},rH='"',nH="/",iH="*",Dje={comments:!1,ranges:!1};function Lje(e){return/[\s\n]/.test(e)}s(Lje,"isWhitespace");function sc(e){return e>="0"&&e<="9"}s(sc,"isDigit");function jje(e){return sc(e)||/[a-f]/i.test(e)}s(jje,"isHexDigit");function Mje(e){return e>="1"&&e<="9"}s(Mje,"isPositiveDigit");function Uje(e){return/[tfn]/.test(e)}s(Uje,"isKeywordStart");function xje(e){return sc(e)||e==="."||e==="-"}s(xje,"isNumberStart");function uH(e,t){t=Object.freeze({...Dje,...t});let r=-1,n=1,i=0,o=!1,a=[];function u(E,v,O,I){let w=O.offset+v.length,j=t.ranges?{range:[O.offset,w]}:void 0;return{type:E,value:v,loc:{start:O,end:I||{line:O.line,column:O.column+v.length,offset:w}},...j}}s(u,"createToken");function c(){let E=e.charAt(++r);return o?(n++,i=1,o=!1):i++,E==="\r"?(o=!0,e.charAt(r+1)===`
|
|
87
87
|
`&&r++):E===`
|
|
88
|
-
`&&(o=!0),E}s(c,"next");function l(){return{line:n,column:i,offset:r}}s(l,"locate");function f(E){let
|
|
89
|
-
`);return{value:S,c:E}}if(E===iH){for(;E;)if(S+=E,E=c(),E===iH&&(S+=E,E=c(),E===nH))return S+=E,E=c(),{value:S,c:E};y()}g(E)}s(m,"readComment");function g(E){throw new a$(E,l())}s(g,"unexpected");function y(){throw new u$(l())}s(y,"unexpectedEOF");let b=c();for(;r<e.length;){for(;Lje(b);)b=c();if(!b)break;let E=l();if(s$.has(b))a.push(u(s$.get(b),b,E)),b=c();else if(Uje(b)){let S=f(b),O=S.value;b=S.c,a.push(u(s$.get(O),O,E))}else if(xje(b)){let S=_(b),O=S.value;b=S.c,a.push(u("Number",O,E))}else if(b===rH){let S=d(b),O=S.value;b=S.c,a.push(u("String",O,E))}else if(b===nH&&t.comments){let S=m(b),O=S.value;b=S.c,a.push(u(O.startsWith("//")?"LineComment":"BlockComment",O,E,l()))}else g(b)}return a}s(uH,"tokenize");var Jg={document(e,t={}){return{type:"Document",body:e,...t}},string(e,t={}){return{type:"String",value:e,...t}},number(e,t={}){return{type:"Number",value:e,...t}},boolean(e,t={}){return{type:"Boolean",value:e,...t}},null(e={}){return{type:"Null",value:"null",...e}},array(e,t={}){return{type:"Array",elements:e,...t}},object(e,t={}){return{type:"Object",members:e,...t}},member(e,t,r={}){return{type:"Member",name:e,value:t,...r}}},qje={tokens:!1,comments:!1,ranges:!1};function Fje(e){let t=e.value.slice(1,-1),r="",n=t.indexOf("\\"),i=0;for(;n>=0;){r+=t.slice(i,n);let o=t.charAt(n+1);if(o$.has(o))r+=o$.get(o),i=n+2;else if(o==="u"){let a=t.slice(n+2,n+6);if(a.length<4||/[^0-9a-f]/i.test(a))throw new Uf(`Invalid unicode escape \\u${a}.`,{line:e.loc.start.line,column:e.loc.start.column+n,offset:e.loc.start.offset+n});r+=String.fromCharCode(parseInt(a,16)),i=n+6}else throw new Uf(`Invalid escape \\${o}.`,{line:e.loc.start.line,column:e.loc.start.column+n,offset:e.loc.start.offset+n});n=t.indexOf("\\",i)}return r+=t.slice(i),r}s(Fje,"getStringValue");function kje(e){switch(e.type){case"Boolean":return e.value==="true";case"Number":return Number(e.value);case"Null":return null;case"String":return Fje(e)}}s(kje,"getLiteralValue");function Bje(e,t){t=Object.freeze({...qje,...t});let r=uH(e,{comments:!!t.comments,ranges:!!t.ranges}),n=0;function i(){return r[n++]}s(i,"nextNoComments");function o(){let S=r[n++];return S&&S.type.endsWith("Comment")?o():S}s(o,"nextSkipComments");let a=t.comments?o:i;function u(S,O){if(!S||S.value!==O)throw new ah(S)}s(u,"assertTokenValue");function c(S,O){if(!S||S.type!==O)throw new ah(S)}s(c,"assertTokenType");function l(S,O){return t.ranges?{range:[S.offset,O.offset]}:void 0}s(l,"createRange");function f(S){let O=l(S.loc.start,S.loc.end);return{type:S.type,value:kje(S),loc:{start:{...S.loc.start},end:{...S.loc.end}},...O}}s(f,"createLiteralNode");function d(S){c(S,"String");let O=f(S);S=a(),u(S,":");let I=g(),w=l(O.loc.start,I.loc.end);return Jg.member(O,I,{loc:{start:{...O.loc.start},end:{...I.loc.end}},...w})}s(d,"parseProperty");function _(S){u(S,"{");let O=[],I=a();if(I&&I.value!=="}")do if(O.push(d(I)),I=a(),I.value===",")I=a();else break;while(I);u(I,"}");let w=l(S.loc.start,I.loc.end);return Jg.object(O,{loc:{start:{...S.loc.start},end:{...I.loc.end}},...w})}s(_,"parseObject");function m(S){u(S,"[");let O=[],I=a();if(I&&I.value!=="]")do if(O.push(g(I)),I=a(),I.value===",")I=a();else break;while(I);u(I,"]");let w=l(S.loc.start,I.loc.end);return Jg.array(O,{type:"Array",elements:O,loc:{start:{...S.loc.start},end:{...I.loc.end}},...w})}s(m,"parseArray");function g(S){switch(S=S||a(),S.type){case"String":case"Boolean":case"Number":case"Null":return f(S);case"Punctuator":if(S.value==="{")return _(S);if(S.value==="[")return m(S);default:throw new ah(S)}}s(g,"parseValue");let y=g(),b=a();if(b)throw new ah(b);let E={loc:{start:{line:1,column:1,offset:0},end:{...y.loc.end}}};return t.tokens&&(E.tokens=r),t.ranges&&(E.range=l(E.loc.start,E.loc.end)),Jg.document(y,E)}s(Bje,"parse");var Gje=new Map([["Document",["body"]],["Object",["members"]],["Member",["name","value"]],["Array",["elements"]],["String",[]],["Number",[]],["Boolean",[]],["Null",[]]]);function cH(e){return e&&typeof e=="object"}s(cH,"isObject");function Vje(e){return cH(e)&&typeof e.type=="string"}s(Vje,"isNode");function lH(e,t){function r(n,i){typeof t.enter=="function"&&t.enter(n,i);for(let o of Gje.get(n.type)){let a=n[o];cH(a)&&(Array.isArray(a)?a.forEach(u=>r(u,n)):Vje(a)&&r(a,n))}typeof t.exit=="function"&&t.exit(n,i)}s(r,"visitNode"),r(e)}s(lH,"traverse");function zje(e,t=()=>!0){let r=[];return lH(e,{enter(n,i){r.push({node:n,parent:i,phase:"enter"})},exit(n,i){r.push({node:n,parent:i,phase:"exit"})}}),r.filter(t).values()}s(zje,"iterator");function uh(e){switch(e.type){case"String":case"Number":case"Boolean":return e.value;case"Null":return null;case"Array":return e.elements.map(uh);case"Object":{let t={};return e.members.forEach(r=>{t[uh(r.name)]=uh(r.value)}),t}case"Document":return uh(e.body);case"Property":throw new Error("Cannot evaluate object property outside of an object.");default:throw new Error(`Unknown node type ${e.type}.`)}}s(uh,"evaluate");function Hje(e,{indent:t=0}={}){let r=uh(e);return JSON.stringify(r,null,t)}s(Hje,"print");iu.evaluate=uh;iu.iterator=zje;iu.parse=Bje;iu.print=Hje;iu.tokenize=uH;iu.traverse=lH;iu.types=Jg});var l$=h(Zs=>{"use strict";var Kje=Zs&&Zs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zs,"__esModule",{value:!0});Zs.getSchemaAST=Zs.getSchemaContent=Zs.getFileLineContent=void 0;var Wje=c$(),Yje=Kje(require("fs/promises")),Jje=s((e,t)=>e.split(/\r?\n/)[t-1],"getFileLineContent");Zs.getFileLineContent=Jje;var Xje=s(async e=>{try{return await Yje.default.readFile(e,"utf-8")}catch{return}},"getSchemaContent");Zs.getSchemaContent=Xje;var Qje=s(async e=>{try{return(0,Wje.parse)(e)}catch(t){if(t.column&&t.line&&t.message){let r=(0,Zs.getFileLineContent)(e,t.line);return{column:t.column,line:t.line,length:void 0,lineText:r}}return}},"getSchemaAST");Zs.getSchemaAST=Qje});var fH=h(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.getRouteLocationByValueFromSchema=yn.getRouteLocationByValue=yn.DEFAULT_ROUTES_LOCATION=yn.ROUTES_RELATIVE_PATH=void 0;var Zje=c$(),f$=l$();yn.ROUTES_RELATIVE_PATH="config/routes.json";yn.DEFAULT_ROUTES_LOCATION={file:yn.ROUTES_RELATIVE_PATH};var eMe=s(async(e,t,r)=>{try{if(!e)return yn.DEFAULT_ROUTES_LOCATION;let n=await(0,f$.getSchemaContent)(e);return await(0,yn.getRouteLocationByValueFromSchema)(n,e,t,r)}catch{}return yn.DEFAULT_ROUTES_LOCATION},"getRouteLocationByValue");yn.getRouteLocationByValue=eMe;var tMe=s(async(e,t,r,n)=>{try{if(!e)return yn.DEFAULT_ROUTES_LOCATION;let i=null,o=await(0,f$.getSchemaAST)(e);if(o){for(let{node:a}of(0,Zje.iterator)(o))if(a.value&&a.value===r){i=a.loc;break}if(i!==null){let a=(0,f$.getFileLineContent)(e,i.start.line);return{file:t,line:i.start.line,column:i.start.column,length:i.end.column-i.start.column,lineText:a,suggestion:n}}}}catch{}return yn.DEFAULT_ROUTES_LOCATION},"getRouteLocationByValueFromSchema");yn.getRouteLocationByValueFromSchema=tMe});var d$=h(ch=>{"use strict";Object.defineProperty(ch,"__esModule",{value:!0});ch.OPEN_API_FILE_SUFFIX=ch.USER_SCHEMAS_DIR_NAME=void 0;ch.USER_SCHEMAS_DIR_NAME="schemas";ch.OPEN_API_FILE_SUFFIX=".oas.json"});var yH=h(di=>{"use strict";var dH=di&&di.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(di,"__esModule",{value:!0});di.getFilePathNameFromRefName=di.getFullyQualifiedRefName=di.chaseRefs=di.oasFileInProject=di.getOpenApiFilesByAlphabetical=void 0;var pH=dH(require("fs/promises")),rP=dH(require("path")),hH=d$(),rMe=s(async e=>(await pH.default.readdir(e)).map(r=>`${e}/${r}`).filter(r=>r.endsWith(hH.OPEN_API_FILE_SUFFIX)).sort(),"getOpenApiFilesByAlphabetical");di.getOpenApiFilesByAlphabetical=rMe;var nMe=s(async e=>{let t=rP.default.resolve(e,"config");return(await pH.default.readdir(t)).filter(n=>n.endsWith(hH.OPEN_API_FILE_SUFFIX)).length>=1},"oasFileInProject");di.oasFileInProject=nMe;function mH(e,t,r,n,i,o,a){if(o.has(r))return;let u=n.get(r);o.set(r,i.length),i.push(r),p$(gH(r),t,u,n,i,o,a)}s(mH,"chaseRefs");di.chaseRefs=mH;function p$(e,t,r,n,i,o,a){if(Array.isArray(r))for(let u of r)p$(e,t,u,n,i,o,a);else if(typeof r=="object")for(let u in r){if(u==="$ref"){let c=r[u];a&&(r[u]=a(t,c)),mH(e,t,_H(e,c),n,i,o,a)}p$(e,t,r[u],n,i,o,a)}}s(p$,"lookForRefs");function _H(e,t){let r=t.indexOf("#");return r>=0?`${rP.default.resolve(e,t.substring(0,r))}${t.substring(r)}`:rP.default.resolve(rP.default.dirname(e),t)}s(_H,"getFullyQualifiedRefName");di.getFullyQualifiedRefName=_H;function gH(e){let t=e.indexOf("#");return t>=0?e.substring(0,t):e}s(gH,"getFilePathNameFromRefName");di.getFilePathNameFromRefName=gH});var nP=h(lh=>{"use strict";Object.defineProperty(lh,"__esModule",{value:!0});lh.getDeepKeys=lh.toJSON=void 0;var iMe=["function","symbol","undefined"],sMe=["constructor","prototype","__proto__"],oMe=Object.getPrototypeOf({});function aMe(){let e={},t=this;for(let r of EH(t))if(typeof r=="string"){let n=t[r],i=typeof n;iMe.includes(i)||(e[r]=n)}return e}s(aMe,"toJSON");lh.toJSON=aMe;function EH(e,t=[]){let r=[];for(;e&&e!==oMe;)r=r.concat(Object.getOwnPropertyNames(e),Object.getOwnPropertySymbols(e)),e=Object.getPrototypeOf(e);let n=new Set(r);for(let i of t.concat(sMe))n.delete(i);return n}s(EH,"getDeepKeys");lh.getDeepKeys=EH});var h$=h(fh=>{"use strict";Object.defineProperty(fh,"__esModule",{value:!0});fh.addInspectMethod=fh.format=void 0;var bH=require("util"),uMe=nP(),SH=bH.inspect.custom||Symbol.for("nodejs.util.inspect.custom");fh.format=bH.format;function cMe(e){e[SH]=lMe}s(cMe,"addInspectMethod");fh.addInspectMethod=cMe;function lMe(){let e={},t=this;for(let r of uMe.getDeepKeys(t)){let n=t[r];e[r]=n}return delete e[SH],e}s(lMe,"inspect")});var PH=h(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});Jo.lazyJoinStacks=Jo.joinStacks=Jo.isWritableStack=Jo.isLazyStack=void 0;var fMe=/\r?\n/,dMe=/\bono[ @]/;function pMe(e){return!!(e&&e.configurable&&typeof e.get=="function")}s(pMe,"isLazyStack");Jo.isLazyStack=pMe;function hMe(e){return!!(!e||e.writable||typeof e.set=="function")}s(hMe,"isWritableStack");Jo.isWritableStack=hMe;function vH(e,t){let r=OH(e.stack),n=t?t.stack:void 0;return r&&n?r+`
|
|
88
|
+
`&&(o=!0),E}s(c,"next");function l(){return{line:n,column:i,offset:r}}s(l,"locate");function f(E){let v=$je.get(E);if(e.slice(r,r+v.length)===v)return r+=v.length-1,i+=v.length-1,{value:v,c:c()};for(let O=1;O<v.length;O++)v[O]!==e.charAt(r+O)&&g(c())}s(f,"readKeyword");function d(E){let v=E;for(E=c();E&&E!==rH;){if(E==="\\")if(v+=E,E=c(),o$.has(E))v+=E;else if(E==="u"){v+=E;for(let O=0;O<4;O++)E=c(),jje(E)?v+=E:g(E)}else g(E);else v+=E;E=c()}return E||y(),v+=E,{value:v,c:c()}}s(d,"readString");function _(E){let v="";if(E==="-"&&(v+=E,E=c(),sc(E)||g(E)),E==="0")v+=E,E=c(),sc(E)&&g(E);else{Mje(E)||g(E);do v+=E,E=c();while(sc(E))}if(E===".")do v+=E,E=c();while(sc(E));if(E==="e"||E==="E")for(v+=E,E=c(),(E==="+"||E==="-")&&(v+=E,E=c()),sc(E)||g(E);sc(E);)v+=E,E=c();return{value:v,c:E}}s(_,"readNumber");function m(E){let v=E;if(E=c(),E==="/"){do v+=E,E=c();while(E&&E!=="\r"&&E!==`
|
|
89
|
+
`);return{value:v,c:E}}if(E===iH){for(;E;)if(v+=E,E=c(),E===iH&&(v+=E,E=c(),E===nH))return v+=E,E=c(),{value:v,c:E};y()}g(E)}s(m,"readComment");function g(E){throw new a$(E,l())}s(g,"unexpected");function y(){throw new u$(l())}s(y,"unexpectedEOF");let b=c();for(;r<e.length;){for(;Lje(b);)b=c();if(!b)break;let E=l();if(s$.has(b))a.push(u(s$.get(b),b,E)),b=c();else if(Uje(b)){let v=f(b),O=v.value;b=v.c,a.push(u(s$.get(O),O,E))}else if(xje(b)){let v=_(b),O=v.value;b=v.c,a.push(u("Number",O,E))}else if(b===rH){let v=d(b),O=v.value;b=v.c,a.push(u("String",O,E))}else if(b===nH&&t.comments){let v=m(b),O=v.value;b=v.c,a.push(u(O.startsWith("//")?"LineComment":"BlockComment",O,E,l()))}else g(b)}return a}s(uH,"tokenize");var Jg={document(e,t={}){return{type:"Document",body:e,...t}},string(e,t={}){return{type:"String",value:e,...t}},number(e,t={}){return{type:"Number",value:e,...t}},boolean(e,t={}){return{type:"Boolean",value:e,...t}},null(e={}){return{type:"Null",value:"null",...e}},array(e,t={}){return{type:"Array",elements:e,...t}},object(e,t={}){return{type:"Object",members:e,...t}},member(e,t,r={}){return{type:"Member",name:e,value:t,...r}}},qje={tokens:!1,comments:!1,ranges:!1};function Fje(e){let t=e.value.slice(1,-1),r="",n=t.indexOf("\\"),i=0;for(;n>=0;){r+=t.slice(i,n);let o=t.charAt(n+1);if(o$.has(o))r+=o$.get(o),i=n+2;else if(o==="u"){let a=t.slice(n+2,n+6);if(a.length<4||/[^0-9a-f]/i.test(a))throw new Uf(`Invalid unicode escape \\u${a}.`,{line:e.loc.start.line,column:e.loc.start.column+n,offset:e.loc.start.offset+n});r+=String.fromCharCode(parseInt(a,16)),i=n+6}else throw new Uf(`Invalid escape \\${o}.`,{line:e.loc.start.line,column:e.loc.start.column+n,offset:e.loc.start.offset+n});n=t.indexOf("\\",i)}return r+=t.slice(i),r}s(Fje,"getStringValue");function kje(e){switch(e.type){case"Boolean":return e.value==="true";case"Number":return Number(e.value);case"Null":return null;case"String":return Fje(e)}}s(kje,"getLiteralValue");function Bje(e,t){t=Object.freeze({...qje,...t});let r=uH(e,{comments:!!t.comments,ranges:!!t.ranges}),n=0;function i(){return r[n++]}s(i,"nextNoComments");function o(){let v=r[n++];return v&&v.type.endsWith("Comment")?o():v}s(o,"nextSkipComments");let a=t.comments?o:i;function u(v,O){if(!v||v.value!==O)throw new ah(v)}s(u,"assertTokenValue");function c(v,O){if(!v||v.type!==O)throw new ah(v)}s(c,"assertTokenType");function l(v,O){return t.ranges?{range:[v.offset,O.offset]}:void 0}s(l,"createRange");function f(v){let O=l(v.loc.start,v.loc.end);return{type:v.type,value:kje(v),loc:{start:{...v.loc.start},end:{...v.loc.end}},...O}}s(f,"createLiteralNode");function d(v){c(v,"String");let O=f(v);v=a(),u(v,":");let I=g(),w=l(O.loc.start,I.loc.end);return Jg.member(O,I,{loc:{start:{...O.loc.start},end:{...I.loc.end}},...w})}s(d,"parseProperty");function _(v){u(v,"{");let O=[],I=a();if(I&&I.value!=="}")do if(O.push(d(I)),I=a(),I.value===",")I=a();else break;while(I);u(I,"}");let w=l(v.loc.start,I.loc.end);return Jg.object(O,{loc:{start:{...v.loc.start},end:{...I.loc.end}},...w})}s(_,"parseObject");function m(v){u(v,"[");let O=[],I=a();if(I&&I.value!=="]")do if(O.push(g(I)),I=a(),I.value===",")I=a();else break;while(I);u(I,"]");let w=l(v.loc.start,I.loc.end);return Jg.array(O,{type:"Array",elements:O,loc:{start:{...v.loc.start},end:{...I.loc.end}},...w})}s(m,"parseArray");function g(v){switch(v=v||a(),v.type){case"String":case"Boolean":case"Number":case"Null":return f(v);case"Punctuator":if(v.value==="{")return _(v);if(v.value==="[")return m(v);default:throw new ah(v)}}s(g,"parseValue");let y=g(),b=a();if(b)throw new ah(b);let E={loc:{start:{line:1,column:1,offset:0},end:{...y.loc.end}}};return t.tokens&&(E.tokens=r),t.ranges&&(E.range=l(E.loc.start,E.loc.end)),Jg.document(y,E)}s(Bje,"parse");var Gje=new Map([["Document",["body"]],["Object",["members"]],["Member",["name","value"]],["Array",["elements"]],["String",[]],["Number",[]],["Boolean",[]],["Null",[]]]);function cH(e){return e&&typeof e=="object"}s(cH,"isObject");function Vje(e){return cH(e)&&typeof e.type=="string"}s(Vje,"isNode");function lH(e,t){function r(n,i){typeof t.enter=="function"&&t.enter(n,i);for(let o of Gje.get(n.type)){let a=n[o];cH(a)&&(Array.isArray(a)?a.forEach(u=>r(u,n)):Vje(a)&&r(a,n))}typeof t.exit=="function"&&t.exit(n,i)}s(r,"visitNode"),r(e)}s(lH,"traverse");function zje(e,t=()=>!0){let r=[];return lH(e,{enter(n,i){r.push({node:n,parent:i,phase:"enter"})},exit(n,i){r.push({node:n,parent:i,phase:"exit"})}}),r.filter(t).values()}s(zje,"iterator");function uh(e){switch(e.type){case"String":case"Number":case"Boolean":return e.value;case"Null":return null;case"Array":return e.elements.map(uh);case"Object":{let t={};return e.members.forEach(r=>{t[uh(r.name)]=uh(r.value)}),t}case"Document":return uh(e.body);case"Property":throw new Error("Cannot evaluate object property outside of an object.");default:throw new Error(`Unknown node type ${e.type}.`)}}s(uh,"evaluate");function Hje(e,{indent:t=0}={}){let r=uh(e);return JSON.stringify(r,null,t)}s(Hje,"print");iu.evaluate=uh;iu.iterator=zje;iu.parse=Bje;iu.print=Hje;iu.tokenize=uH;iu.traverse=lH;iu.types=Jg});var l$=h(Zs=>{"use strict";var Kje=Zs&&Zs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zs,"__esModule",{value:!0});Zs.getSchemaAST=Zs.getSchemaContent=Zs.getFileLineContent=void 0;var Wje=c$(),Yje=Kje(require("fs/promises")),Jje=s((e,t)=>e.split(/\r?\n/)[t-1],"getFileLineContent");Zs.getFileLineContent=Jje;var Xje=s(async e=>{try{return await Yje.default.readFile(e,"utf-8")}catch{return}},"getSchemaContent");Zs.getSchemaContent=Xje;var Qje=s(async e=>{try{return(0,Wje.parse)(e)}catch(t){if(t.column&&t.line&&t.message){let r=(0,Zs.getFileLineContent)(e,t.line);return{column:t.column,line:t.line,length:void 0,lineText:r}}return}},"getSchemaAST");Zs.getSchemaAST=Qje});var fH=h(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.getRouteLocationByValueFromSchema=yn.getRouteLocationByValue=yn.DEFAULT_ROUTES_LOCATION=yn.ROUTES_RELATIVE_PATH=void 0;var Zje=c$(),f$=l$();yn.ROUTES_RELATIVE_PATH="config/routes.json";yn.DEFAULT_ROUTES_LOCATION={file:yn.ROUTES_RELATIVE_PATH};var eMe=s(async(e,t,r)=>{try{if(!e)return yn.DEFAULT_ROUTES_LOCATION;let n=await(0,f$.getSchemaContent)(e);return await(0,yn.getRouteLocationByValueFromSchema)(n,e,t,r)}catch{}return yn.DEFAULT_ROUTES_LOCATION},"getRouteLocationByValue");yn.getRouteLocationByValue=eMe;var tMe=s(async(e,t,r,n)=>{try{if(!e)return yn.DEFAULT_ROUTES_LOCATION;let i=null,o=await(0,f$.getSchemaAST)(e);if(o){for(let{node:a}of(0,Zje.iterator)(o))if(a.value&&a.value===r){i=a.loc;break}if(i!==null){let a=(0,f$.getFileLineContent)(e,i.start.line);return{file:t,line:i.start.line,column:i.start.column,length:i.end.column-i.start.column,lineText:a,suggestion:n}}}}catch{}return yn.DEFAULT_ROUTES_LOCATION},"getRouteLocationByValueFromSchema");yn.getRouteLocationByValueFromSchema=tMe});var d$=h(ch=>{"use strict";Object.defineProperty(ch,"__esModule",{value:!0});ch.OPEN_API_FILE_SUFFIX=ch.USER_SCHEMAS_DIR_NAME=void 0;ch.USER_SCHEMAS_DIR_NAME="schemas";ch.OPEN_API_FILE_SUFFIX=".oas.json"});var yH=h(di=>{"use strict";var dH=di&&di.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(di,"__esModule",{value:!0});di.getFilePathNameFromRefName=di.getFullyQualifiedRefName=di.chaseRefs=di.oasFileInProject=di.getOpenApiFilesByAlphabetical=void 0;var pH=dH(require("fs/promises")),rP=dH(require("path")),hH=d$(),rMe=s(async e=>(await pH.default.readdir(e)).map(r=>`${e}/${r}`).filter(r=>r.endsWith(hH.OPEN_API_FILE_SUFFIX)).sort(),"getOpenApiFilesByAlphabetical");di.getOpenApiFilesByAlphabetical=rMe;var nMe=s(async e=>{let t=rP.default.resolve(e,"config");return(await pH.default.readdir(t)).filter(n=>n.endsWith(hH.OPEN_API_FILE_SUFFIX)).length>=1},"oasFileInProject");di.oasFileInProject=nMe;function mH(e,t,r,n,i,o,a){if(o.has(r))return;let u=n.get(r);o.set(r,i.length),i.push(r),p$(gH(r),t,u,n,i,o,a)}s(mH,"chaseRefs");di.chaseRefs=mH;function p$(e,t,r,n,i,o,a){if(Array.isArray(r))for(let u of r)p$(e,t,u,n,i,o,a);else if(typeof r=="object")for(let u in r){if(u==="$ref"){let c=r[u];a&&(r[u]=a(t,c)),mH(e,t,_H(e,c),n,i,o,a)}p$(e,t,r[u],n,i,o,a)}}s(p$,"lookForRefs");function _H(e,t){let r=t.indexOf("#");return r>=0?`${rP.default.resolve(e,t.substring(0,r))}${t.substring(r)}`:rP.default.resolve(rP.default.dirname(e),t)}s(_H,"getFullyQualifiedRefName");di.getFullyQualifiedRefName=_H;function gH(e){let t=e.indexOf("#");return t>=0?e.substring(0,t):e}s(gH,"getFilePathNameFromRefName");di.getFilePathNameFromRefName=gH});var nP=h(lh=>{"use strict";Object.defineProperty(lh,"__esModule",{value:!0});lh.getDeepKeys=lh.toJSON=void 0;var iMe=["function","symbol","undefined"],sMe=["constructor","prototype","__proto__"],oMe=Object.getPrototypeOf({});function aMe(){let e={},t=this;for(let r of EH(t))if(typeof r=="string"){let n=t[r],i=typeof n;iMe.includes(i)||(e[r]=n)}return e}s(aMe,"toJSON");lh.toJSON=aMe;function EH(e,t=[]){let r=[];for(;e&&e!==oMe;)r=r.concat(Object.getOwnPropertyNames(e),Object.getOwnPropertySymbols(e)),e=Object.getPrototypeOf(e);let n=new Set(r);for(let i of t.concat(sMe))n.delete(i);return n}s(EH,"getDeepKeys");lh.getDeepKeys=EH});var h$=h(fh=>{"use strict";Object.defineProperty(fh,"__esModule",{value:!0});fh.addInspectMethod=fh.format=void 0;var bH=require("util"),uMe=nP(),SH=bH.inspect.custom||Symbol.for("nodejs.util.inspect.custom");fh.format=bH.format;function cMe(e){e[SH]=lMe}s(cMe,"addInspectMethod");fh.addInspectMethod=cMe;function lMe(){let e={},t=this;for(let r of uMe.getDeepKeys(t)){let n=t[r];e[r]=n}return delete e[SH],e}s(lMe,"inspect")});var PH=h(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});Jo.lazyJoinStacks=Jo.joinStacks=Jo.isWritableStack=Jo.isLazyStack=void 0;var fMe=/\r?\n/,dMe=/\bono[ @]/;function pMe(e){return!!(e&&e.configurable&&typeof e.get=="function")}s(pMe,"isLazyStack");Jo.isLazyStack=pMe;function hMe(e){return!!(!e||e.writable||typeof e.set=="function")}s(hMe,"isWritableStack");Jo.isWritableStack=hMe;function vH(e,t){let r=OH(e.stack),n=t?t.stack:void 0;return r&&n?r+`
|
|
90
90
|
|
|
91
91
|
`+n:r||n}s(vH,"joinStacks");Jo.joinStacks=vH;function mMe(e,t,r){r?Object.defineProperty(t,"stack",{get:()=>{let n=e.get.apply(t);return vH({stack:n},r)},enumerable:!1,configurable:!0}):_Me(t,e)}s(mMe,"lazyJoinStacks");Jo.lazyJoinStacks=mMe;function OH(e){if(e){let t=e.split(fMe),r;for(let n=0;n<t.length;n++){let i=t[n];if(dMe.test(i))r===void 0&&(r=n);else if(r!==void 0){t.splice(r,n-r);break}}if(t.length>0)return t.join(`
|
|
92
92
|
`)}return e}s(OH,"popStack");function _Me(e,t){Object.defineProperty(e,"stack",{get:()=>OH(t.get.apply(e)),enumerable:!1,configurable:!0})}s(_Me,"lazyPopStack")});var TH=h(sP=>{"use strict";Object.defineProperty(sP,"__esModule",{value:!0});sP.extendError=void 0;var IH=h$(),iP=PH(),wH=nP(),gMe=["name","message","stack"];function yMe(e,t,r){let n=e;return EMe(n,t),t&&typeof t=="object"&&bMe(n,t),n.toJSON=wH.toJSON,IH.addInspectMethod&&IH.addInspectMethod(n),r&&typeof r=="object"&&Object.assign(n,r),n}s(yMe,"extendError");sP.extendError=yMe;function EMe(e,t){let r=Object.getOwnPropertyDescriptor(e,"stack");iP.isLazyStack(r)?iP.lazyJoinStacks(r,e,t):iP.isWritableStack(r)&&(e.stack=iP.joinStacks(e,t))}s(EMe,"extendStack");function bMe(e,t){let r=wH.getDeepKeys(t,gMe),n=e,i=t;for(let o of r)if(n[o]===void 0)try{n[o]=i[o]}catch{}}s(bMe,"mergeErrors")});var NH=h(dh=>{"use strict";Object.defineProperty(dh,"__esModule",{value:!0});dh.normalizeArgs=dh.normalizeOptions=void 0;var SMe=h$();function vMe(e){return e=e||{},{concatMessages:e.concatMessages===void 0?!0:!!e.concatMessages,format:e.format===void 0?SMe.format:typeof e.format=="function"?e.format:!1}}s(vMe,"normalizeOptions");dh.normalizeOptions=vMe;function OMe(e,t){let r,n,i,o="";return typeof e[0]=="string"?i=e:typeof e[1]=="string"?(e[0]instanceof Error?r=e[0]:n=e[0],i=e.slice(1)):(r=e[0],n=e[1],i=e.slice(2)),i.length>0&&(t.format?o=t.format.apply(void 0,i):o=i.join(" ")),t.concatMessages&&r&&r.message&&(o+=(o?`
|
|
@@ -103,13 +103,13 @@ Parsed value is empty`)):n(f)}s(c,"onParsed");function l(f){!f&&t.continueOnErro
|
|
|
103
103
|
`;return u.replace(/\n$/,"")}s(mUe,"makeSnippet");o5.exports=mUe});var En=h((PTt,c5)=>{"use strict";var u5=_h(),_Ue=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],gUe=["scalar","sequence","mapping"];function yUe(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})}),t}s(yUe,"compileStyleAliases");function EUe(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(_Ue.indexOf(r)===-1)throw new u5('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=yUe(t.styleAliases||null),gUe.indexOf(this.kind)===-1)throw new u5('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}s(EUe,"Type");c5.exports=EUe});var N$=h((wTt,f5)=>{"use strict";var ty=_h(),w$=En();function l5(e,t){var r=[];return e[t].forEach(function(n){var i=r.length;r.forEach(function(o,a){o.tag===n.tag&&o.kind===n.kind&&o.multi===n.multi&&(i=a)}),r[i]=n}),r}s(l5,"compileList");function bUe(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function n(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(s(n,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(n);return e}s(bUe,"compileMap");function T$(e){return this.extend(e)}s(T$,"Schema");T$.prototype.extend=s(function(t){var r=[],n=[];if(t instanceof w$)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new ty("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(o){if(!(o instanceof w$))throw new ty("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new ty("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new ty("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(o){if(!(o instanceof w$))throw new ty("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(T$.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=l5(i,"implicit"),i.compiledExplicit=l5(i,"explicit"),i.compiledTypeMap=bUe(i.compiledImplicit,i.compiledExplicit),i},"extend");f5.exports=T$});var A$=h((NTt,d5)=>{"use strict";var SUe=En();d5.exports=new SUe("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var R$=h((ATt,p5)=>{"use strict";var vUe=En();p5.exports=new vUe("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var C$=h((RTt,h5)=>{"use strict";var OUe=En();h5.exports=new OUe("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var $$=h((CTt,m5)=>{"use strict";var PUe=N$();m5.exports=new PUe({explicit:[A$(),R$(),C$()]})});var D$=h(($Tt,_5)=>{"use strict";var IUe=En();function wUe(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}s(wUe,"resolveYamlNull");function TUe(){return null}s(TUe,"constructYamlNull");function NUe(e){return e===null}s(NUe,"isNull");_5.exports=new IUe("tag:yaml.org,2002:null",{kind:"scalar",resolve:wUe,construct:TUe,predicate:NUe,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})});var L$=h((LTt,g5)=>{"use strict";var AUe=En();function RUe(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}s(RUe,"resolveYamlBoolean");function CUe(e){return e==="true"||e==="True"||e==="TRUE"}s(CUe,"constructYamlBoolean");function $Ue(e){return Object.prototype.toString.call(e)==="[object Boolean]"}s($Ue,"isBoolean");g5.exports=new AUe("tag:yaml.org,2002:bool",{kind:"scalar",resolve:RUe,construct:CUe,predicate:$Ue,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})});var j$=h((MTt,y5)=>{"use strict";var DUe=mh(),LUe=En();function jUe(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}s(jUe,"isHexCode");function MUe(e){return 48<=e&&e<=55}s(MUe,"isOctCode");function UUe(e){return 48<=e&&e<=57}s(UUe,"isDecCode");function xUe(e){if(e===null)return!1;var t=e.length,r=0,n=!1,i;if(!t)return!1;if(i=e[r],(i==="-"||i==="+")&&(i=e[++r]),i==="0"){if(r+1===t)return!0;if(i=e[++r],i==="b"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(i!=="0"&&i!=="1")return!1;n=!0}return n&&i!=="_"}if(i==="x"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(!jUe(e.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}if(i==="o"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(!MUe(e.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}}if(i==="_")return!1;for(;r<t;r++)if(i=e[r],i!=="_"){if(!UUe(e.charCodeAt(r)))return!1;n=!0}return!(!n||i==="_")}s(xUe,"resolveYamlInteger");function qUe(e){var t=e,r=1,n;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),n=t[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),t=t.slice(1),n=t[0]),t==="0")return 0;if(n==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}s(qUe,"constructYamlInteger");function FUe(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!DUe.isNegativeZero(e)}s(FUe,"isInteger");y5.exports=new LUe("tag:yaml.org,2002:int",{kind:"scalar",resolve:xUe,construct:qUe,predicate:FUe,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var M$=h((xTt,b5)=>{"use strict";var E5=mh(),kUe=En(),BUe=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function GUe(e){return!(e===null||!BUe.test(e)||e[e.length-1]==="_")}s(GUe,"resolveYamlFloat");function VUe(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}s(VUe,"constructYamlFloat");var zUe=/^[-+]?[0-9]+e/;function HUe(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(E5.isNegativeZero(e))return"-0.0";return r=e.toString(10),zUe.test(r)?r.replace("e",".e"):r}s(HUe,"representYamlFloat");function KUe(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||E5.isNegativeZero(e))}s(KUe,"isFloat");b5.exports=new kUe("tag:yaml.org,2002:float",{kind:"scalar",resolve:GUe,construct:VUe,predicate:KUe,represent:HUe,defaultStyle:"lowercase"})});var U$=h((FTt,S5)=>{"use strict";S5.exports=$$().extend({implicit:[D$(),L$(),j$(),M$()]})});var x$=h((kTt,v5)=>{"use strict";v5.exports=U$()});var q$=h((BTt,I5)=>{"use strict";var WUe=En(),O5=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),P5=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 YUe(e){return e===null?!1:O5.exec(e)!==null||P5.exec(e)!==null}s(YUe,"resolveYamlTimestamp");function JUe(e){var t,r,n,i,o,a,u,c=0,l=null,f,d,_;if(t=O5.exec(e),t===null&&(t=P5.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(r,n,i));if(o=+t[4],a=+t[5],u=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(f=+t[10],d=+(t[11]||0),l=(f*60+d)*6e4,t[9]==="-"&&(l=-l)),_=new Date(Date.UTC(r,n,i,o,a,u,c)),l&&_.setTime(_.getTime()-l),_}s(JUe,"constructYamlTimestamp");function XUe(e){return e.toISOString()}s(XUe,"representYamlTimestamp");I5.exports=new WUe("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:YUe,construct:JUe,instanceOf:Date,represent:XUe})});var F$=h((VTt,w5)=>{"use strict";var QUe=En();function ZUe(e){return e==="<<"||e===null}s(ZUe,"resolveYamlMerge");w5.exports=new QUe("tag:yaml.org,2002:merge",{kind:"scalar",resolve:ZUe})});var B$=h((HTt,T5)=>{"use strict";var exe=En(),k$=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
104
104
|
\r`;function txe(e){if(e===null)return!1;var t,r,n=0,i=e.length,o=k$;for(r=0;r<i;r++)if(t=o.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;n+=6}return n%8===0}s(txe,"resolveYamlBinary");function rxe(e){var t,r,n=e.replace(/[\r\n=]/g,""),i=n.length,o=k$,a=0,u=[];for(t=0;t<i;t++)t%4===0&&t&&(u.push(a>>16&255),u.push(a>>8&255),u.push(a&255)),a=a<<6|o.indexOf(n.charAt(t));return r=i%4*6,r===0?(u.push(a>>16&255),u.push(a>>8&255),u.push(a&255)):r===18?(u.push(a>>10&255),u.push(a>>2&255)):r===12&&u.push(a>>4&255),new Uint8Array(u)}s(rxe,"constructYamlBinary");function nxe(e){var t="",r=0,n,i,o=e.length,a=k$;for(n=0;n<o;n++)n%3===0&&n&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[n];return i=o%3,i===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):i===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):i===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}s(nxe,"representYamlBinary");function ixe(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}s(ixe,"isBinary");T5.exports=new exe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:txe,construct:rxe,predicate:ixe,represent:nxe})});var G$=h((WTt,N5)=>{"use strict";var sxe=En(),oxe=Object.prototype.hasOwnProperty,axe=Object.prototype.toString;function uxe(e){if(e===null)return!0;var t=[],r,n,i,o,a,u=e;for(r=0,n=u.length;r<n;r+=1){if(i=u[r],a=!1,axe.call(i)!=="[object Object]")return!1;for(o in i)if(oxe.call(i,o))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}s(uxe,"resolveYamlOmap");function cxe(e){return e!==null?e:[]}s(cxe,"constructYamlOmap");N5.exports=new sxe("tag:yaml.org,2002:omap",{kind:"sequence",resolve:uxe,construct:cxe})});var V$=h((JTt,A5)=>{"use strict";var lxe=En(),fxe=Object.prototype.toString;function dxe(e){if(e===null)return!0;var t,r,n,i,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(n=a[t],fxe.call(n)!=="[object Object]"||(i=Object.keys(n),i.length!==1))return!1;o[t]=[i[0],n[i[0]]]}return!0}s(dxe,"resolveYamlPairs");function pxe(e){if(e===null)return[];var t,r,n,i,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1)n=a[t],i=Object.keys(n),o[t]=[i[0],n[i[0]]];return o}s(pxe,"constructYamlPairs");A5.exports=new lxe("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:dxe,construct:pxe})});var z$=h((QTt,R5)=>{"use strict";var hxe=En(),mxe=Object.prototype.hasOwnProperty;function _xe(e){if(e===null)return!0;var t,r=e;for(t in r)if(mxe.call(r,t)&&r[t]!==null)return!1;return!0}s(_xe,"resolveYamlSet");function gxe(e){return e!==null?e:{}}s(gxe,"constructYamlSet");R5.exports=new hxe("tag:yaml.org,2002:set",{kind:"mapping",resolve:_xe,construct:gxe})});var fP=h((e1t,C5)=>{"use strict";C5.exports=x$().extend({implicit:[q$(),F$()],explicit:[B$(),G$(),V$(),z$()]})});var K5=h((t1t,Y$)=>{"use strict";var kf=mh(),x5=_h(),yxe=a5(),Exe=fP(),pc=Object.prototype.hasOwnProperty,dP=1,q5=2,F5=3,pP=4,H$=1,bxe=2,$5=3,Sxe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,vxe=/[\x85\u2028\u2029]/,Oxe=/[,\[\]\{\}]/,k5=/^(?:!|!!|![a-z\-]+!)$/i,B5=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function D5(e){return Object.prototype.toString.call(e)}s(D5,"_class");function Qo(e){return e===10||e===13}s(Qo,"is_EOL");function Bf(e){return e===9||e===32}s(Bf,"is_WHITE_SPACE");function hi(e){return e===9||e===32||e===10||e===13}s(hi,"is_WS_OR_EOL");function gh(e){return e===44||e===91||e===93||e===123||e===125}s(gh,"is_FLOW_INDICATOR");function Pxe(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}s(Pxe,"fromHexCode");function Ixe(e){return e===120?2:e===117?4:e===85?8:0}s(Ixe,"escapedHexLen");function wxe(e){return 48<=e&&e<=57?e-48:-1}s(wxe,"fromDecimalCode");function L5(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
105
105
|
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}s(L5,"simpleEscapeSequence");function Txe(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}s(Txe,"charFromCodepoint");var G5=new Array(256),V5=new Array(256);for(Ff=0;Ff<256;Ff++)G5[Ff]=L5(Ff)?1:0,V5[Ff]=L5(Ff);var Ff;function Nxe(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Exe,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}s(Nxe,"State");function z5(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=yxe(r),new x5(t,r)}s(z5,"generateError");function fe(e,t){throw z5(e,t)}s(fe,"throwError");function hP(e,t){e.onWarning&&e.onWarning.call(null,z5(e,t))}s(hP,"throwWarning");var j5={YAML:s(function(t,r,n){var i,o,a;t.version!==null&&fe(t,"duplication of %YAML directive"),n.length!==1&&fe(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&fe(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),a=parseInt(i[2],10),o!==1&&fe(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&hP(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:s(function(t,r,n){var i,o;n.length!==2&&fe(t,"TAG directive accepts exactly two arguments"),i=n[0],o=n[1],k5.test(i)||fe(t,"ill-formed tag handle (first argument) of the TAG directive"),pc.call(t.tagMap,i)&&fe(t,'there is a previously declared suffix for "'+i+'" tag handle'),B5.test(o)||fe(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{fe(t,"tag prefix is malformed: "+o)}t.tagMap[i]=o},"handleTagDirective")};function dc(e,t,r,n){var i,o,a,u;if(t<r){if(u=e.input.slice(t,r),n)for(i=0,o=u.length;i<o;i+=1)a=u.charCodeAt(i),a===9||32<=a&&a<=1114111||fe(e,"expected valid JSON character");else Sxe.test(u)&&fe(e,"the stream contains non-printable characters");e.result+=u}}s(dc,"captureSegment");function M5(e,t,r,n){var i,o,a,u;for(kf.isObject(r)||fe(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(r),a=0,u=i.length;a<u;a+=1)o=i[a],pc.call(t,o)||(t[o]=r[o],n[o]=!0)}s(M5,"mergeMappings");function yh(e,t,r,n,i,o,a,u,c){var l,f;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),l=0,f=i.length;l<f;l+=1)Array.isArray(i[l])&&fe(e,"nested arrays are not supported inside keys"),typeof i=="object"&&D5(i[l])==="[object Object]"&&(i[l]="[object Object]");if(typeof i=="object"&&D5(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(l=0,f=o.length;l<f;l+=1)M5(e,t,o[l],r);else M5(e,t,o,r);else!e.json&&!pc.call(r,i)&&pc.call(t,i)&&(e.line=a||e.line,e.lineStart=u||e.lineStart,e.position=c||e.position,fe(e,"duplicated mapping key")),i==="__proto__"?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:o}):t[i]=o,delete r[i];return t}s(yh,"storeMappingPair");function K$(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):fe(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}s(K$,"readLineBreak");function Tr(e,t,r){for(var n=0,i=e.input.charCodeAt(e.position);i!==0;){for(;Bf(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(Qo(i))for(K$(e),i=e.input.charCodeAt(e.position),n++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return r!==-1&&n!==0&&e.lineIndent<r&&hP(e,"deficient indentation"),n}s(Tr,"skipSeparationSpace");function mP(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||hi(r)))}s(mP,"testDocumentSeparator");function W$(e,t){t===1?e.result+=" ":t>1&&(e.result+=kf.repeat(`
|
|
106
|
-
`,t-1))}s(W$,"writeFoldedLines");function Axe(e,t,r){var n,i,o,a,u,c,l,f,d=e.kind,_=e.result,m;if(m=e.input.charCodeAt(e.position),hi(m)||gh(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(i=e.input.charCodeAt(e.position+1),hi(i)||r&&gh(i)))return!1;for(e.kind="scalar",e.result="",o=a=e.position,u=!1;m!==0;){if(m===58){if(i=e.input.charCodeAt(e.position+1),hi(i)||r&&gh(i))break}else if(m===35){if(n=e.input.charCodeAt(e.position-1),hi(n))break}else{if(e.position===e.lineStart&&mP(e)||r&&gh(m))break;if(Qo(m))if(c=e.line,l=e.lineStart,f=e.lineIndent,Tr(e,!1,-1),e.lineIndent>=t){u=!0,m=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=c,e.lineStart=l,e.lineIndent=f;break}}u&&(dc(e,o,a,!1),W$(e,e.line-c),o=a=e.position,u=!1),Bf(m)||(a=e.position+1),m=e.input.charCodeAt(++e.position)}return dc(e,o,a,!1),e.result?!0:(e.kind=d,e.result=_,!1)}s(Axe,"readPlainScalar");function Rxe(e,t){var r,n,i;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(dc(e,n,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)n=e.position,e.position++,i=e.position;else return!0;else Qo(r)?(dc(e,n,i,!0),W$(e,Tr(e,!1,t)),n=i=e.position):e.position===e.lineStart&&mP(e)?fe(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);fe(e,"unexpected end of the stream within a single quoted scalar")}s(Rxe,"readSingleQuotedScalar");function Cxe(e,t){var r,n,i,o,a,u;if(u=e.input.charCodeAt(e.position),u!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;(u=e.input.charCodeAt(e.position))!==0;){if(u===34)return dc(e,r,e.position,!0),e.position++,!0;if(u===92){if(dc(e,r,e.position,!0),u=e.input.charCodeAt(++e.position),Qo(u))Tr(e,!1,t);else if(u<256&&G5[u])e.result+=V5[u],e.position++;else if((a=Ixe(u))>0){for(i=a,o=0;i>0;i--)u=e.input.charCodeAt(++e.position),(a=Pxe(u))>=0?o=(o<<4)+a:fe(e,"expected hexadecimal character");e.result+=Txe(o),e.position++}else fe(e,"unknown escape sequence");r=n=e.position}else Qo(u)?(dc(e,r,n,!0),W$(e,Tr(e,!1,t)),r=n=e.position):e.position===e.lineStart&&mP(e)?fe(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}fe(e,"unexpected end of the stream within a double quoted scalar")}s(Cxe,"readDoubleQuotedScalar");function $xe(e,t){var r=!0,n,i,o,a=e.tag,u,c=e.anchor,l,f,d,_,m,g=Object.create(null),y,b,E,
|
|
106
|
+
`,t-1))}s(W$,"writeFoldedLines");function Axe(e,t,r){var n,i,o,a,u,c,l,f,d=e.kind,_=e.result,m;if(m=e.input.charCodeAt(e.position),hi(m)||gh(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(i=e.input.charCodeAt(e.position+1),hi(i)||r&&gh(i)))return!1;for(e.kind="scalar",e.result="",o=a=e.position,u=!1;m!==0;){if(m===58){if(i=e.input.charCodeAt(e.position+1),hi(i)||r&&gh(i))break}else if(m===35){if(n=e.input.charCodeAt(e.position-1),hi(n))break}else{if(e.position===e.lineStart&&mP(e)||r&&gh(m))break;if(Qo(m))if(c=e.line,l=e.lineStart,f=e.lineIndent,Tr(e,!1,-1),e.lineIndent>=t){u=!0,m=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=c,e.lineStart=l,e.lineIndent=f;break}}u&&(dc(e,o,a,!1),W$(e,e.line-c),o=a=e.position,u=!1),Bf(m)||(a=e.position+1),m=e.input.charCodeAt(++e.position)}return dc(e,o,a,!1),e.result?!0:(e.kind=d,e.result=_,!1)}s(Axe,"readPlainScalar");function Rxe(e,t){var r,n,i;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(dc(e,n,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)n=e.position,e.position++,i=e.position;else return!0;else Qo(r)?(dc(e,n,i,!0),W$(e,Tr(e,!1,t)),n=i=e.position):e.position===e.lineStart&&mP(e)?fe(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);fe(e,"unexpected end of the stream within a single quoted scalar")}s(Rxe,"readSingleQuotedScalar");function Cxe(e,t){var r,n,i,o,a,u;if(u=e.input.charCodeAt(e.position),u!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;(u=e.input.charCodeAt(e.position))!==0;){if(u===34)return dc(e,r,e.position,!0),e.position++,!0;if(u===92){if(dc(e,r,e.position,!0),u=e.input.charCodeAt(++e.position),Qo(u))Tr(e,!1,t);else if(u<256&&G5[u])e.result+=V5[u],e.position++;else if((a=Ixe(u))>0){for(i=a,o=0;i>0;i--)u=e.input.charCodeAt(++e.position),(a=Pxe(u))>=0?o=(o<<4)+a:fe(e,"expected hexadecimal character");e.result+=Txe(o),e.position++}else fe(e,"unknown escape sequence");r=n=e.position}else Qo(u)?(dc(e,r,n,!0),W$(e,Tr(e,!1,t)),r=n=e.position):e.position===e.lineStart&&mP(e)?fe(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}fe(e,"unexpected end of the stream within a double quoted scalar")}s(Cxe,"readDoubleQuotedScalar");function $xe(e,t){var r=!0,n,i,o,a=e.tag,u,c=e.anchor,l,f,d,_,m,g=Object.create(null),y,b,E,v;if(v=e.input.charCodeAt(e.position),v===91)f=93,m=!1,u=[];else if(v===123)f=125,m=!0,u={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),v=e.input.charCodeAt(++e.position);v!==0;){if(Tr(e,!0,t),v=e.input.charCodeAt(e.position),v===f)return e.position++,e.tag=a,e.anchor=c,e.kind=m?"mapping":"sequence",e.result=u,!0;r?v===44&&fe(e,"expected the node content, but found ','"):fe(e,"missed comma between flow collection entries"),b=y=E=null,d=_=!1,v===63&&(l=e.input.charCodeAt(e.position+1),hi(l)&&(d=_=!0,e.position++,Tr(e,!0,t))),n=e.line,i=e.lineStart,o=e.position,Eh(e,t,dP,!1,!0),b=e.tag,y=e.result,Tr(e,!0,t),v=e.input.charCodeAt(e.position),(_||e.line===n)&&v===58&&(d=!0,v=e.input.charCodeAt(++e.position),Tr(e,!0,t),Eh(e,t,dP,!1,!0),E=e.result),m?yh(e,u,g,b,y,E,n,i,o):d?u.push(yh(e,null,g,b,y,E,n,i,o)):u.push(y),Tr(e,!0,t),v=e.input.charCodeAt(e.position),v===44?(r=!0,v=e.input.charCodeAt(++e.position)):r=!1}fe(e,"unexpected end of the stream within a flow collection")}s($xe,"readFlowCollection");function Dxe(e,t){var r,n,i=H$,o=!1,a=!1,u=t,c=0,l=!1,f,d;if(d=e.input.charCodeAt(e.position),d===124)n=!1;else if(d===62)n=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)H$===i?i=d===43?$5:bxe:fe(e,"repeat of a chomping mode identifier");else if((f=wxe(d))>=0)f===0?fe(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?fe(e,"repeat of an indentation width identifier"):(u=t+f-1,a=!0);else break;if(Bf(d)){do d=e.input.charCodeAt(++e.position);while(Bf(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!Qo(d)&&d!==0)}for(;d!==0;){for(K$(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!a||e.lineIndent<u)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>u&&(u=e.lineIndent),Qo(d)){c++;continue}if(e.lineIndent<u){i===$5?e.result+=kf.repeat(`
|
|
107
107
|
`,o?1+c:c):i===H$&&o&&(e.result+=`
|
|
108
108
|
`);break}for(n?Bf(d)?(l=!0,e.result+=kf.repeat(`
|
|
109
109
|
`,o?1+c:c)):l?(l=!1,e.result+=kf.repeat(`
|
|
110
110
|
`,c+1)):c===0?o&&(e.result+=" "):e.result+=kf.repeat(`
|
|
111
111
|
`,c):e.result+=kf.repeat(`
|
|
112
|
-
`,o?1+c:c),o=!0,a=!0,c=0,r=e.position;!Qo(d)&&d!==0;)d=e.input.charCodeAt(++e.position);dc(e,r,e.position,!1)}return!0}s(Dxe,"readBlockScalar");function U5(e,t){var r,n=e.tag,i=e.anchor,o=[],a,u=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,fe(e,"tab characters must not be used in indentation")),!(c!==45||(a=e.input.charCodeAt(e.position+1),!hi(a))));){if(u=!0,e.position++,Tr(e,!0,-1)&&e.lineIndent<=t){o.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,Eh(e,t,F5,!1,!0),o.push(e.result),Tr(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&c!==0)fe(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return u?(e.tag=n,e.anchor=i,e.kind="sequence",e.result=o,!0):!1}s(U5,"readBlockSequence");function Lxe(e,t,r){var n,i,o,a,u,c,l=e.tag,f=e.anchor,d={},_=Object.create(null),m=null,g=null,y=null,b=!1,E=!1,
|
|
112
|
+
`,o?1+c:c),o=!0,a=!0,c=0,r=e.position;!Qo(d)&&d!==0;)d=e.input.charCodeAt(++e.position);dc(e,r,e.position,!1)}return!0}s(Dxe,"readBlockScalar");function U5(e,t){var r,n=e.tag,i=e.anchor,o=[],a,u=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,fe(e,"tab characters must not be used in indentation")),!(c!==45||(a=e.input.charCodeAt(e.position+1),!hi(a))));){if(u=!0,e.position++,Tr(e,!0,-1)&&e.lineIndent<=t){o.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,Eh(e,t,F5,!1,!0),o.push(e.result),Tr(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&c!==0)fe(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return u?(e.tag=n,e.anchor=i,e.kind="sequence",e.result=o,!0):!1}s(U5,"readBlockSequence");function Lxe(e,t,r){var n,i,o,a,u,c,l=e.tag,f=e.anchor,d={},_=Object.create(null),m=null,g=null,y=null,b=!1,E=!1,v;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),v=e.input.charCodeAt(e.position);v!==0;){if(!b&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,fe(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),o=e.line,(v===63||v===58)&&hi(n))v===63?(b&&(yh(e,d,_,m,g,null,a,u,c),m=g=y=null),E=!0,b=!0,i=!0):b?(b=!1,i=!0):fe(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,v=n;else{if(a=e.line,u=e.lineStart,c=e.position,!Eh(e,r,q5,!1,!0))break;if(e.line===o){for(v=e.input.charCodeAt(e.position);Bf(v);)v=e.input.charCodeAt(++e.position);if(v===58)v=e.input.charCodeAt(++e.position),hi(v)||fe(e,"a whitespace character is expected after the key-value separator within a block mapping"),b&&(yh(e,d,_,m,g,null,a,u,c),m=g=y=null),E=!0,b=!1,i=!1,m=e.tag,g=e.result;else if(E)fe(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=l,e.anchor=f,!0}else if(E)fe(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=l,e.anchor=f,!0}if((e.line===o||e.lineIndent>t)&&(b&&(a=e.line,u=e.lineStart,c=e.position),Eh(e,t,pP,!0,i)&&(b?g=e.result:y=e.result),b||(yh(e,d,_,m,g,y,a,u,c),m=g=y=null),Tr(e,!0,-1),v=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&v!==0)fe(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return b&&yh(e,d,_,m,g,null,a,u,c),E&&(e.tag=l,e.anchor=f,e.kind="mapping",e.result=d),E}s(Lxe,"readBlockMapping");function jxe(e){var t,r=!1,n=!1,i,o,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&fe(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(n=!0,i="!!",a=e.input.charCodeAt(++e.position)):i="!",t=e.position,r){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(o=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):fe(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!hi(a);)a===33&&(n?fe(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),k5.test(i)||fe(e,"named tag handle cannot contain such characters"),n=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),Oxe.test(o)&&fe(e,"tag suffix cannot contain flow indicator characters")}o&&!B5.test(o)&&fe(e,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{fe(e,"tag name is malformed: "+o)}return r?e.tag=o:pc.call(e.tagMap,i)?e.tag=e.tagMap[i]+o:i==="!"?e.tag="!"+o:i==="!!"?e.tag="tag:yaml.org,2002:"+o:fe(e,'undeclared tag handle "'+i+'"'),!0}s(jxe,"readTagProperty");function Mxe(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&fe(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!hi(r)&&!gh(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&fe(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}s(Mxe,"readAnchorProperty");function Uxe(e){var t,r,n;if(n=e.input.charCodeAt(e.position),n!==42)return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!hi(n)&&!gh(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&fe(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),pc.call(e.anchorMap,r)||fe(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Tr(e,!0,-1),!0}s(Uxe,"readAlias");function Eh(e,t,r,n,i){var o,a,u,c=1,l=!1,f=!1,d,_,m,g,y,b;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=a=u=pP===r||F5===r,n&&Tr(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;jxe(e)||Mxe(e);)Tr(e,!0,-1)?(l=!0,u=o,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):u=!1;if(u&&(u=l||i),(c===1||pP===r)&&(dP===r||q5===r?y=t:y=t+1,b=e.position-e.lineStart,c===1?u&&(U5(e,b)||Lxe(e,b,y))||$xe(e,y)?f=!0:(a&&Dxe(e,y)||Rxe(e,y)||Cxe(e,y)?f=!0:Uxe(e)?(f=!0,(e.tag!==null||e.anchor!==null)&&fe(e,"alias node should not have any properties")):Axe(e,y,dP===r)&&(f=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(f=u&&U5(e,b))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&fe(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,_=e.implicitTypes.length;d<_;d+=1)if(g=e.implicitTypes[d],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(pc.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,m=e.typeMap.multi[e.kind||"fallback"],d=0,_=m.length;d<_;d+=1)if(e.tag.slice(0,m[d].tag.length)===m[d].tag){g=m[d];break}g||fe(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&fe(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):fe(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||f}s(Eh,"composeNode");function xxe(e){var t=e.position,r,n,i,o=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(Tr(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(o=!0,a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!hi(a);)a=e.input.charCodeAt(++e.position);for(n=e.input.slice(r,e.position),i=[],n.length<1&&fe(e,"directive name must not be less than one character in length");a!==0;){for(;Bf(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!Qo(a));break}if(Qo(a))break;for(r=e.position;a!==0&&!hi(a);)a=e.input.charCodeAt(++e.position);i.push(e.input.slice(r,e.position))}a!==0&&K$(e),pc.call(j5,n)?j5[n](e,n,i):hP(e,'unknown document directive "'+n+'"')}if(Tr(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Tr(e,!0,-1)):o&&fe(e,"directives end mark is expected"),Eh(e,e.lineIndent-1,pP,!1,!0),Tr(e,!0,-1),e.checkLineBreaks&&vxe.test(e.input.slice(t,e.position))&&hP(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&mP(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Tr(e,!0,-1));return}if(e.position<e.length-1)fe(e,"end of the stream or a document separator is expected");else return}s(xxe,"readDocument");function H5(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
113
113
|
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Nxe(e,t),n=e.indexOf("\0");for(n!==-1&&(r.position=n,fe(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)xxe(r);return r.documents}s(H5,"loadDocuments");function qxe(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var n=H5(e,r);if(typeof t!="function")return n;for(var i=0,o=n.length;i<o;i+=1)t(n[i])}s(qxe,"loadAll");function Fxe(e,t){var r=H5(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new x5("expected a single document in the stream, but found more")}}s(Fxe,"load");Y$.exports.loadAll=qxe;Y$.exports.load=Fxe});var hK=h((n1t,pK)=>{"use strict";var yP=mh(),oy=_h(),kxe=fP(),rK=Object.prototype.toString,nK=Object.prototype.hasOwnProperty,eD=65279,Bxe=9,ny=10,Gxe=13,Vxe=32,zxe=33,Hxe=34,J$=35,Kxe=37,Wxe=38,Yxe=39,Jxe=42,iK=44,Xxe=45,_P=58,Qxe=61,Zxe=62,eqe=63,tqe=64,sK=91,oK=93,rqe=96,aK=123,nqe=124,uK=125,bn={};bn[0]="\\0";bn[7]="\\a";bn[8]="\\b";bn[9]="\\t";bn[10]="\\n";bn[11]="\\v";bn[12]="\\f";bn[13]="\\r";bn[27]="\\e";bn[34]='\\"';bn[92]="\\\\";bn[133]="\\N";bn[160]="\\_";bn[8232]="\\L";bn[8233]="\\P";var iqe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],sqe=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function oqe(e,t){var r,n,i,o,a,u,c;if(t===null)return{};for(r={},n=Object.keys(t),i=0,o=n.length;i<o;i+=1)a=n[i],u=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),c=e.compiledTypeMap.fallback[a],c&&nK.call(c.styleAliases,u)&&(u=c.styleAliases[u]),r[a]=u;return r}s(oqe,"compileStyleMap");function aqe(e){var t,r,n;if(t=e.toString(16).toUpperCase(),e<=255)r="x",n=2;else if(e<=65535)r="u",n=4;else if(e<=4294967295)r="U",n=8;else throw new oy("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+yP.repeat("0",n-t.length)+t}s(aqe,"encodeHex");var uqe=1,iy=2;function cqe(e){this.schema=e.schema||kxe,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=yP.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=oqe(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?iy:uqe,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}s(cqe,"State");function W5(e,t){for(var r=yP.repeat(" ",t),n=0,i=-1,o="",a,u=e.length;n<u;)i=e.indexOf(`
|
|
114
114
|
`,n),i===-1?(a=e.slice(n),n=u):(a=e.slice(n,i+1),n=i+1),a.length&&a!==`
|
|
115
115
|
`&&(o+=r),o+=a;return o}s(W5,"indentString");function X$(e,t){return`
|
|
@@ -135,25 +135,25 @@ export default environment;`;function FFe(e){return{name:"environment",setup(t){
|
|
|
135
135
|
`:""},this._extScope=t,this._scope=new so.Scope({parent:t}),this._nodes=[new jD]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,i){let o=this._scope.toName(r);return n!==void 0&&i&&(this._constants[o.str]=n),this._leafNode(new AD(t,o,n)),o}const(t,r,n){return this._def(so.varKinds.const,t,r,n)}let(t,r,n){return this._def(so.varKinds.let,t,r,n)}var(t,r,n){return this._def(so.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new qP(t,r,n))}add(t,r){return this._leafNode(new RD(t,De.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==Xe.nil&&this._leafNode(new LD(t)),this}object(...t){let r=["{"];for(let[n,i]of t)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,Xe.addCodeArg)(r,i));return r.push("}"),new Xe._Code(r)}if(t,r,n){if(this._blockNode(new Hf(t)),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(t){return this._elseNode(new Hf(t))}else(){return this._elseNode(new Ah)}endIf(){return this._endBlockNode(Hf,Ah)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new MD(t),r)}forRange(t,r,n,i,o=this.opts.es5?so.varKinds.var:so.varKinds.let){let a=this._scope.toName(t);return this._for(new UD(o,a,r,n),()=>i(a))}forOf(t,r,n,i=so.varKinds.const){let o=this._scope.toName(t);if(this.opts.es5){let a=r instanceof Xe.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,Xe._)`${a}.length`,u=>{this.var(o,(0,Xe._)`${a}[${u}]`),n(o)})}return this._for(new FP("of",i,o,r),()=>n(o))}forIn(t,r,n,i=this.opts.es5?so.varKinds.var:so.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,Xe._)`Object.keys(${r})`,n);let o=this._scope.toName(t);return this._for(new FP("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(Kf)}label(t){return this._leafNode(new CD(t))}break(t){return this._leafNode(new $D(t))}return(t){let r=new gy;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(gy)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new xD;if(this._blockNode(i),this.code(t),r){let o=this.name("e");this._currNode=i.catch=new yy(o),r(o)}return n&&(this._currNode=i.finally=new Ey,this.code(n)),this._endBlockNode(yy,Ey)}throw(t){return this._leafNode(new DD(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){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||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=Xe.nil,n,i){return this._blockNode(new _y(t,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(_y)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof Hf))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};De.CodeGen=qD;function Wf(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}s(Wf,"addNames");function kP(e,t){return t instanceof Xe._CodeOrName?Wf(e,t.names):e}s(kP,"addExprNames");function Rh(e,t,r){if(e instanceof Xe.Name)return n(e);if(!i(e))return e;return new Xe._Code(e._items.reduce((o,a)=>(a instanceof Xe.Name&&(a=n(a)),a instanceof Xe._Code?o.push(...a._items):o.push(a),o),[]));function n(o){let a=r[o.str];return a===void 0||t[o.str]!==1?o:(delete t[o.str],a)}function i(o){return o instanceof Xe._Code&&o._items.some(a=>a instanceof Xe.Name&&t[a.str]===1&&r[a.str]!==void 0)}}s(Rh,"optimizeExpr");function JFe(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}s(JFe,"subtractNames");function x9(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,Xe._)`!${FD(e)}`}s(x9,"not");De.not=x9;var XFe=q9(De.operators.AND);function QFe(...e){return e.reduce(XFe)}s(QFe,"and");De.and=QFe;var ZFe=q9(De.operators.OR);function eke(...e){return e.reduce(ZFe)}s(eke,"or");De.or=eke;function q9(e){return(t,r)=>t===Xe.nil?r:r===Xe.nil?t:(0,Xe._)`${FD(t)} ${e} ${FD(r)}`}s(q9,"mappend");function FD(e){return e instanceof Xe.Name?e:(0,Xe._)`(${e})`}s(FD,"par")});var Ve=h(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.checkStrictMode=Le.getErrorPath=Le.Type=Le.useFunc=Le.setEvaluated=Le.evaluatedPropsToName=Le.mergeEvaluated=Le.eachItem=Le.unescapeJsonPointer=Le.escapeJsonPointer=Le.escapeFragment=Le.unescapeFragment=Le.schemaRefOrVal=Le.schemaHasRulesButRef=Le.schemaHasRules=Le.checkUnknownRules=Le.alwaysValidSchema=Le.toHash=void 0;var Mt=Oe(),tke=Nh();function rke(e){let t={};for(let r of e)t[r]=!0;return t}s(rke,"toHash");Le.toHash=rke;function nke(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(B9(e,t),!G9(t,e.self.RULES.all))}s(nke,"alwaysValidSchema");Le.alwaysValidSchema=nke;function B9(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let i=n.RULES.keywords;for(let o in t)i[o]||K9(e,`unknown keyword: "${o}"`)}s(B9,"checkUnknownRules");Le.checkUnknownRules=B9;function G9(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}s(G9,"schemaHasRules");Le.schemaHasRules=G9;function ike(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}s(ike,"schemaHasRulesButRef");Le.schemaHasRulesButRef=ike;function ske({topSchemaRef:e,schemaPath:t},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Mt._)`${r}`}return(0,Mt._)`${e}${t}${(0,Mt.getProperty)(n)}`}s(ske,"schemaRefOrVal");Le.schemaRefOrVal=ske;function oke(e){return V9(decodeURIComponent(e))}s(oke,"unescapeFragment");Le.unescapeFragment=oke;function ake(e){return encodeURIComponent(kD(e))}s(ake,"escapeFragment");Le.escapeFragment=ake;function kD(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}s(kD,"escapeJsonPointer");Le.escapeJsonPointer=kD;function V9(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}s(V9,"unescapeJsonPointer");Le.unescapeJsonPointer=V9;function uke(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}s(uke,"eachItem");Le.eachItem=uke;function F9({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(i,o,a,u)=>{let c=a===void 0?o:a instanceof Mt.Name?(o instanceof Mt.Name?e(i,o,a):t(i,o,a),a):o instanceof Mt.Name?(t(i,a,o),o):r(o,a);return u===Mt.Name&&!(c instanceof Mt.Name)?n(i,c):c}}s(F9,"makeMergeEvaluated");Le.mergeEvaluated={props:F9({mergeNames:(e,t,r)=>e.if((0,Mt._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,Mt._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,Mt._)`${r} || {}`).code((0,Mt._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,Mt._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,Mt._)`${r} || {}`),BD(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:z9}),items:F9({mergeNames:(e,t,r)=>e.if((0,Mt._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,Mt._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,Mt._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,Mt._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function z9(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,Mt._)`{}`);return t!==void 0&&BD(e,r,t),r}s(z9,"evaluatedPropsToName");Le.evaluatedPropsToName=z9;function BD(e,t,r){Object.keys(r).forEach(n=>e.assign((0,Mt._)`${t}${(0,Mt.getProperty)(n)}`,!0))}s(BD,"setEvaluated");Le.setEvaluated=BD;var k9={};function cke(e,t){return e.scopeValue("func",{ref:t,code:k9[t.code]||(k9[t.code]=new tke._Code(t.code))})}s(cke,"useFunc");Le.useFunc=cke;var H9;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(H9=Le.Type||(Le.Type={}));function lke(e,t,r){if(e instanceof Mt.Name){let n=t===H9.Num;return r?n?(0,Mt._)`"[" + ${e} + "]"`:(0,Mt._)`"['" + ${e} + "']"`:n?(0,Mt._)`"/" + ${e}`:(0,Mt._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Mt.getProperty)(e).toString():"/"+kD(e)}s(lke,"getErrorPath");Le.getErrorPath=lke;function K9(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}s(K9,"checkStrictMode");Le.checkStrictMode=K9});var ps=h(GD=>{"use strict";Object.defineProperty(GD,"__esModule",{value:!0});var Sn=Oe(),fke={data:new Sn.Name("data"),valCxt:new Sn.Name("valCxt"),instancePath:new Sn.Name("instancePath"),parentData:new Sn.Name("parentData"),parentDataProperty:new Sn.Name("parentDataProperty"),rootData:new Sn.Name("rootData"),dynamicAnchors:new Sn.Name("dynamicAnchors"),vErrors:new Sn.Name("vErrors"),errors:new Sn.Name("errors"),this:new Sn.Name("this"),self:new Sn.Name("self"),scope:new Sn.Name("scope"),json:new Sn.Name("json"),jsonPos:new Sn.Name("jsonPos"),jsonLen:new Sn.Name("jsonLen"),jsonPart:new Sn.Name("jsonPart")};GD.default=fke});var by=h(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.extendErrors=vn.resetErrorsCount=vn.reportExtraError=vn.reportError=vn.keyword$DataError=vn.keywordError=void 0;var rt=Oe(),GP=Ve(),Fn=ps();vn.keywordError={message:({keyword:e})=>(0,rt.str)`must pass "${e}" keyword validation`};vn.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,rt.str)`"${e}" keyword must be ${t} ($data)`:(0,rt.str)`"${e}" keyword is invalid ($data)`};function dke(e,t=vn.keywordError,r,n){let{it:i}=e,{gen:o,compositeRule:a,allErrors:u}=i,c=J9(e,t,r);n??(a||u)?W9(o,c):Y9(i,(0,rt._)`[${c}]`)}s(dke,"reportError");vn.reportError=dke;function pke(e,t=vn.keywordError,r){let{it:n}=e,{gen:i,compositeRule:o,allErrors:a}=n,u=J9(e,t,r);W9(i,u),o||a||Y9(n,Fn.default.vErrors)}s(pke,"reportExtraError");vn.reportExtraError=pke;function hke(e,t){e.assign(Fn.default.errors,t),e.if((0,rt._)`${Fn.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,rt._)`${Fn.default.vErrors}.length`,t),()=>e.assign(Fn.default.vErrors,null)))}s(hke,"resetErrorsCount");vn.resetErrorsCount=hke;function mke({gen:e,keyword:t,schemaValue:r,data:n,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let a=e.name("err");e.forRange("i",i,Fn.default.errors,u=>{e.const(a,(0,rt._)`${Fn.default.vErrors}[${u}]`),e.if((0,rt._)`${a}.instancePath === undefined`,()=>e.assign((0,rt._)`${a}.instancePath`,(0,rt.strConcat)(Fn.default.instancePath,o.errorPath))),e.assign((0,rt._)`${a}.schemaPath`,(0,rt.str)`${o.errSchemaPath}/${t}`),o.opts.verbose&&(e.assign((0,rt._)`${a}.schema`,r),e.assign((0,rt._)`${a}.data`,n))})}s(mke,"extendErrors");vn.extendErrors=mke;function W9(e,t){let r=e.const("err",t);e.if((0,rt._)`${Fn.default.vErrors} === null`,()=>e.assign(Fn.default.vErrors,(0,rt._)`[${r}]`),(0,rt._)`${Fn.default.vErrors}.push(${r})`),e.code((0,rt._)`${Fn.default.errors}++`)}s(W9,"addError");function Y9(e,t){let{gen:r,validateName:n,schemaEnv:i}=e;i.$async?r.throw((0,rt._)`new ${e.ValidationError}(${t})`):(r.assign((0,rt._)`${n}.errors`,t),r.return(!1))}s(Y9,"returnErrors");var Yf={keyword:new rt.Name("keyword"),schemaPath:new rt.Name("schemaPath"),params:new rt.Name("params"),propertyName:new rt.Name("propertyName"),message:new rt.Name("message"),schema:new rt.Name("schema"),parentSchema:new rt.Name("parentSchema")};function J9(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,rt._)`{}`:_ke(e,t,r)}s(J9,"errorObjectCode");function _ke(e,t,r={}){let{gen:n,it:i}=e,o=[gke(i,r),yke(e,r)];return Eke(e,t,o),n.object(...o)}s(_ke,"errorObject");function gke({errorPath:e},{instancePath:t}){let r=t?(0,rt.str)`${e}${(0,GP.getErrorPath)(t,GP.Type.Str)}`:e;return[Fn.default.instancePath,(0,rt.strConcat)(Fn.default.instancePath,r)]}s(gke,"errorInstancePath");function yke({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let i=n?t:(0,rt.str)`${t}/${e}`;return r&&(i=(0,rt.str)`${i}${(0,GP.getErrorPath)(r,GP.Type.Str)}`),[Yf.schemaPath,i]}s(yke,"errorSchemaPath");function Eke(e,{params:t,message:r},n){let{keyword:i,data:o,schemaValue:a,it:u}=e,{opts:c,propertyName:l,topSchemaRef:f,schemaPath:d}=u;n.push([Yf.keyword,i],[Yf.params,typeof t=="function"?t(e):t||(0,rt._)`{}`]),c.messages&&n.push([Yf.message,typeof r=="function"?r(e):r]),c.verbose&&n.push([Yf.schema,a],[Yf.parentSchema,(0,rt._)`${f}${d}`],[Fn.default.data,o]),l&&n.push([Yf.propertyName,l])}s(Eke,"extraErrorProps")});var Q9=h(Ch=>{"use strict";Object.defineProperty(Ch,"__esModule",{value:!0});Ch.boolOrEmptySchema=Ch.topBoolOrEmptySchema=void 0;var bke=by(),Ske=Oe(),vke=ps(),Oke={message:"boolean schema is false"};function Pke(e){let{gen:t,schema:r,validateName:n}=e;r===!1?X9(e,!1):typeof r=="object"&&r.$async===!0?t.return(vke.default.data):(t.assign((0,Ske._)`${n}.errors`,null),t.return(!0))}s(Pke,"topBoolOrEmptySchema");Ch.topBoolOrEmptySchema=Pke;function Ike(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),X9(e)):r.var(t,!0)}s(Ike,"boolOrEmptySchema");Ch.boolOrEmptySchema=Ike;function X9(e,t){let{gen:r,data:n}=e,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,bke.reportError)(i,Oke,void 0,t)}s(X9,"falseSchemaError")});var VD=h($h=>{"use strict";Object.defineProperty($h,"__esModule",{value:!0});$h.getRules=$h.isJSONType=void 0;var wke=["string","number","integer","boolean","null","object","array"],Tke=new Set(wke);function Nke(e){return typeof e=="string"&&Tke.has(e)}s(Nke,"isJSONType");$h.isJSONType=Nke;function Ake(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}s(Ake,"getRules");$h.getRules=Ake});var zD=h(gc=>{"use strict";Object.defineProperty(gc,"__esModule",{value:!0});gc.shouldUseRule=gc.shouldUseGroup=gc.schemaHasRulesForType=void 0;function Rke({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&Z9(e,n)}s(Rke,"schemaHasRulesForType");gc.schemaHasRulesForType=Rke;function Z9(e,t){return t.rules.some(r=>e7(e,r))}s(Z9,"shouldUseGroup");gc.shouldUseGroup=Z9;function e7(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}s(e7,"shouldUseRule");gc.shouldUseRule=e7});var vy=h(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.reportTypeError=Xr.checkDataTypes=Xr.checkDataType=Xr.coerceAndCheckDataType=Xr.getJSONTypes=Xr.getSchemaTypes=Xr.DataType=void 0;var Cke=VD(),$ke=zD(),Dke=by(),Te=Oe(),t7=Ve(),Sy;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Sy=Xr.DataType||(Xr.DataType={}));function Lke(e){let t=r7(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}s(Lke,"getSchemaTypes");Xr.getSchemaTypes=Lke;function r7(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(Cke.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}s(r7,"getJSONTypes");Xr.getJSONTypes=r7;function jke(e,t){let{gen:r,data:n,opts:i}=e,o=Mke(t,i.coerceTypes),a=t.length>0&&!(o.length===0&&t.length===1&&(0,$ke.schemaHasRulesForType)(e,t[0]));if(a){let u=KD(t,n,i.strictNumbers,Sy.Wrong);r.if(u,()=>{o.length?Uke(e,t,o):WD(e)})}return a}s(jke,"coerceAndCheckDataType");Xr.coerceAndCheckDataType=jke;var n7=new Set(["string","number","integer","boolean","null"]);function Mke(e,t){return t?e.filter(r=>n7.has(r)||t==="array"&&r==="array"):[]}s(Mke,"coerceToTypes");function Uke(e,t,r){let{gen:n,data:i,opts:o}=e,a=n.let("dataType",(0,Te._)`typeof ${i}`),u=n.let("coerced",(0,Te._)`undefined`);o.coerceTypes==="array"&&n.if((0,Te._)`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,Te._)`${i}[0]`).assign(a,(0,Te._)`typeof ${i}`).if(KD(t,i,o.strictNumbers),()=>n.assign(u,i))),n.if((0,Te._)`${u} !== undefined`);for(let l of r)(n7.has(l)||l==="array"&&o.coerceTypes==="array")&&c(l);n.else(),WD(e),n.endIf(),n.if((0,Te._)`${u} !== undefined`,()=>{n.assign(i,u),xke(e,u)});function c(l){switch(l){case"string":n.elseIf((0,Te._)`${a} == "number" || ${a} == "boolean"`).assign(u,(0,Te._)`"" + ${i}`).elseIf((0,Te._)`${i} === null`).assign(u,(0,Te._)`""`);return;case"number":n.elseIf((0,Te._)`${a} == "boolean" || ${i} === null
|
|
136
136
|
|| (${a} == "string" && ${i} && ${i} == +${i})`).assign(u,(0,Te._)`+${i}`);return;case"integer":n.elseIf((0,Te._)`${a} === "boolean" || ${i} === null
|
|
137
137
|
|| (${a} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(u,(0,Te._)`+${i}`);return;case"boolean":n.elseIf((0,Te._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(u,!1).elseIf((0,Te._)`${i} === "true" || ${i} === 1`).assign(u,!0);return;case"null":n.elseIf((0,Te._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(u,null);return;case"array":n.elseIf((0,Te._)`${a} === "string" || ${a} === "number"
|
|
138
|
-
|| ${a} === "boolean" || ${i} === null`).assign(u,(0,Te._)`[${i}]`)}}s(c,"coerceSpecificType")}s(Uke,"coerceData");function xke({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,Te._)`${t} !== undefined`,()=>e.assign((0,Te._)`${t}[${r}]`,n))}s(xke,"assignParentData");function HD(e,t,r,n=Sy.Correct){let i=n===Sy.Correct?Te.operators.EQ:Te.operators.NEQ,o;switch(e){case"null":return(0,Te._)`${t} ${i} null`;case"array":o=(0,Te._)`Array.isArray(${t})`;break;case"object":o=(0,Te._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a((0,Te._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return(0,Te._)`typeof ${t} ${i} ${e}`}return n===Sy.Correct?o:(0,Te.not)(o);function a(u=Te.nil){return(0,Te.and)((0,Te._)`typeof ${t} == "number"`,u,r?(0,Te._)`isFinite(${t})`:Te.nil)}}s(HD,"checkDataType");Xr.checkDataType=HD;function KD(e,t,r,n){if(e.length===1)return HD(e[0],t,r,n);let i,o=(0,t7.toHash)(e);if(o.array&&o.object){let a=(0,Te._)`typeof ${t} != "object"`;i=o.null?a:(0,Te._)`!${t} || ${a}`,delete o.null,delete o.array,delete o.object}else i=Te.nil;o.number&&delete o.integer;for(let a in o)i=(0,Te.and)(i,HD(a,t,r,n));return i}s(KD,"checkDataTypes");Xr.checkDataTypes=KD;var qke={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,Te._)`{type: ${e}}`:(0,Te._)`{type: ${t}}`};function WD(e){let t=Fke(e);(0,Dke.reportError)(t,qke)}s(WD,"reportTypeError");Xr.reportTypeError=WD;function Fke(e){let{gen:t,data:r,schema:n}=e,i=(0,t7.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}s(Fke,"getTypeErrorContext")});var s7=h(VP=>{"use strict";Object.defineProperty(VP,"__esModule",{value:!0});VP.assignDefaults=void 0;var Dh=Oe(),kke=Ve();function Bke(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)i7(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,o)=>i7(e,o,i.default))}s(Bke,"assignDefaults");VP.assignDefaults=Bke;function i7(e,t,r){let{gen:n,compositeRule:i,data:o,opts:a}=e;if(r===void 0)return;let u=(0,Dh._)`${o}${(0,Dh.getProperty)(t)}`;if(i){(0,kke.checkStrictMode)(e,`default is ignored for: ${u}`);return}let c=(0,Dh._)`${u} === undefined`;a.useDefaults==="empty"&&(c=(0,Dh._)`${c} || ${u} === null || ${u} === ""`),n.if(c,(0,Dh._)`${u} = ${(0,Dh.stringify)(r)}`)}s(i7,"assignDefault")});var hs=h(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.validateUnion=Rt.validateArray=Rt.usePattern=Rt.callValidateCode=Rt.schemaProperties=Rt.allSchemaProperties=Rt.noPropertyInData=Rt.propertyInData=Rt.isOwnProperty=Rt.hasPropFunc=Rt.reportMissingProp=Rt.checkMissingProp=Rt.checkReportMissingProp=void 0;var Bt=Oe(),YD=Ve(),yc=ps(),Gke=Ve();function Vke(e,t){let{gen:r,data:n,it:i}=e;r.if(XD(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Bt._)`${t}`},!0),e.error()})}s(Vke,"checkReportMissingProp");Rt.checkReportMissingProp=Vke;function zke({gen:e,data:t,it:{opts:r}},n,i){return(0,Bt.or)(...n.map(o=>(0,Bt.and)(XD(e,t,o,r.ownProperties),(0,Bt._)`${i} = ${o}`)))}s(zke,"checkMissingProp");Rt.checkMissingProp=zke;function Hke(e,t){e.setParams({missingProperty:t},!0),e.error()}s(Hke,"reportMissingProp");Rt.reportMissingProp=Hke;function o7(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Bt._)`Object.prototype.hasOwnProperty`})}s(o7,"hasPropFunc");Rt.hasPropFunc=o7;function JD(e,t,r){return(0,Bt._)`${o7(e)}.call(${t}, ${r})`}s(JD,"isOwnProperty");Rt.isOwnProperty=JD;function Kke(e,t,r,n){let i=(0,Bt._)`${t}${(0,Bt.getProperty)(r)} !== undefined`;return n?(0,Bt._)`${i} && ${JD(e,t,r)}`:i}s(Kke,"propertyInData");Rt.propertyInData=Kke;function XD(e,t,r,n){let i=(0,Bt._)`${t}${(0,Bt.getProperty)(r)} === undefined`;return n?(0,Bt.or)(i,(0,Bt.not)(JD(e,t,r))):i}s(XD,"noPropertyInData");Rt.noPropertyInData=XD;function a7(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}s(a7,"allSchemaProperties");Rt.allSchemaProperties=a7;function Wke(e,t){return a7(t).filter(r=>!(0,YD.alwaysValidSchema)(e,t[r]))}s(Wke,"schemaProperties");Rt.schemaProperties=Wke;function Yke({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:a},u,c,l){let f=l?(0,Bt._)`${e}, ${t}, ${n}${i}`:t,d=[[yc.default.instancePath,(0,Bt.strConcat)(yc.default.instancePath,o)],[yc.default.parentData,a.parentData],[yc.default.parentDataProperty,a.parentDataProperty],[yc.default.rootData,yc.default.rootData]];a.opts.dynamicRef&&d.push([yc.default.dynamicAnchors,yc.default.dynamicAnchors]);let _=(0,Bt._)`${f}, ${r.object(...d)}`;return c!==Bt.nil?(0,Bt._)`${u}.call(${c}, ${_})`:(0,Bt._)`${u}(${_})`}s(Yke,"callValidateCode");Rt.callValidateCode=Yke;var Jke=(0,Bt._)`new RegExp`;function Xke({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,o=i(r,n);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,Bt._)`${i.code==="new RegExp"?Jke:(0,Gke.useFunc)(e,i)}(${r}, ${n})`})}s(Xke,"usePattern");Rt.usePattern=Xke;function Qke(e){let{gen:t,data:r,keyword:n,it:i}=e,o=t.name("valid");if(i.allErrors){let u=t.let("valid",!0);return a(()=>t.assign(u,!1)),u}return t.var(o,!0),a(()=>t.break()),o;function a(u){let c=t.const("len",(0,Bt._)`${r}.length`);t.forRange("i",0,c,l=>{e.subschema({keyword:n,dataProp:l,dataPropType:YD.Type.Num},o),t.if((0,Bt.not)(o),u)})}s(a,"validateItems")}s(Qke,"validateArray");Rt.validateArray=Qke;function Zke(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,YD.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let a=t.let("valid",!1),u=t.name("_valid");t.block(()=>r.forEach((c,l)=>{let f=e.subschema({keyword:n,schemaProp:l,compositeRule:!0},u);t.assign(a,(0,Bt._)`${a} || ${u}`),e.mergeValidEvaluated(f,u)||t.if((0,Bt.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}s(Zke,"validateUnion");Rt.validateUnion=Zke});var l7=h(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});ra.validateKeywordUsage=ra.validSchemaType=ra.funcKeywordCode=ra.macroKeywordCode=void 0;var kn=Oe(),Jf=ps(),eBe=hs(),tBe=by();function rBe(e,t){let{gen:r,keyword:n,schema:i,parentSchema:o,it:a}=e,u=t.macro.call(a.self,i,o,a),c=c7(r,n,u);a.opts.validateSchema!==!1&&a.self.validateSchema(u,!0);let l=r.name("valid");e.subschema({schema:u,schemaPath:kn.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}s(rBe,"macroKeywordCode");ra.macroKeywordCode=rBe;function nBe(e,t){var r;let{gen:n,keyword:i,schema:o,parentSchema:a,$data:u,it:c}=e;sBe(c,t);let l=!u&&t.compile?t.compile.call(c.self,o,a,c):t.validate,f=c7(n,i,l),d=n.let("valid");e.block$data(d,_),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function _(){if(t.errors===!1)y(),t.modifying&&u7(e),b(()=>e.error());else{let E=t.async?m():g();t.modifying&&u7(e),b(()=>iBe(e,E))}}s(_,"validateKeyword");function m(){let E=n.let("ruleErrs",null);return n.try(()=>y((0,kn._)`await `),S=>n.assign(d,!1).if((0,kn._)`${S} instanceof ${c.ValidationError}`,()=>n.assign(E,(0,kn._)`${S}.errors`),()=>n.throw(S))),E}s(m,"validateAsync");function g(){let E=(0,kn._)`${f}.errors`;return n.assign(E,null),y(kn.nil),E}s(g,"validateSync");function y(E=t.async?(0,kn._)`await `:kn.nil){let S=c.opts.passContext?Jf.default.this:Jf.default.self,O=!("compile"in t&&!u||t.schema===!1);n.assign(d,(0,kn._)`${E}${(0,eBe.callValidateCode)(e,f,S,O)}`,t.modifying)}s(y,"assignValid");function b(E){var S;n.if((0,kn.not)((S=t.valid)!==null&&S!==void 0?S:d),E)}s(b,"reportErrs")}s(nBe,"funcKeywordCode");ra.funcKeywordCode=nBe;function u7(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,kn._)`${n.parentData}[${n.parentDataProperty}]`))}s(u7,"modifyData");function iBe(e,t){let{gen:r}=e;r.if((0,kn._)`Array.isArray(${t})`,()=>{r.assign(Jf.default.vErrors,(0,kn._)`${Jf.default.vErrors} === null ? ${t} : ${Jf.default.vErrors}.concat(${t})`).assign(Jf.default.errors,(0,kn._)`${Jf.default.vErrors}.length`),(0,tBe.extendErrors)(e)},()=>e.error())}s(iBe,"addErrs");function sBe({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}s(sBe,"checkAsyncKeyword");function c7(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,kn.stringify)(r)})}s(c7,"useKeyword");function oBe(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}s(oBe,"validSchemaType");ra.validSchemaType=oBe;function aBe({schema:e,opts:t,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 a=i.dependencies;if(a?.some(u=>!Object.prototype.hasOwnProperty.call(e,u)))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){let c=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}s(aBe,"validateKeywordUsage");ra.validateKeywordUsage=aBe});var d7=h(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});Ec.extendSubschemaMode=Ec.extendSubschemaData=Ec.getSubschema=void 0;var na=Oe(),f7=Ve();function uBe(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:a}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let u=e.schema[t];return r===void 0?{schema:u,schemaPath:(0,na._)`${e.schemaPath}${(0,na.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:u[r],schemaPath:(0,na._)`${e.schemaPath}${(0,na.getProperty)(t)}${(0,na.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,f7.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}s(uBe,"getSubschema");Ec.getSubschema=uBe;function cBe(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:a}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:u}=t;if(r!==void 0){let{errorPath:l,dataPathArr:f,opts:d}=t,_=u.let("data",(0,na._)`${t.data}${(0,na.getProperty)(r)}`,!0);c(_),e.errorPath=(0,na.str)`${l}${(0,f7.getErrorPath)(r,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,na._)`${r}`,e.dataPathArr=[...f,e.parentDataProperty]}if(i!==void 0){let l=i instanceof na.Name?i:u.let("data",i,!0);c(l),a!==void 0&&(e.propertyName=a)}o&&(e.dataTypes=o);function c(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}s(c,"dataContextProps")}s(cBe,"extendSubschemaData");Ec.extendSubschemaData=cBe;function lBe(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),o!==void 0&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}s(lBe,"extendSubschemaMode");Ec.extendSubschemaMode=lBe});var Xf=h((TNt,p7)=>{"use strict";p7.exports=s(function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),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 a=o[i];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r},"equal")});var HP=h((ANt,h7)=>{"use strict";var bc=h7.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};zP(t,n,i,e,"",e)};bc.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};bc.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};bc.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};bc.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 zP(e,t,r,n,i,o,a,u,c,l){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,i,o,a,u,c,l);for(var f in n){var d=n[f];if(Array.isArray(d)){if(f in bc.arrayKeywords)for(var _=0;_<d.length;_++)zP(e,t,r,d[_],i+"/"+f+"/"+_,o,i,f,n,_)}else if(f in bc.propsKeywords){if(d&&typeof d=="object")for(var m in d)zP(e,t,r,d[m],i+"/"+f+"/"+fBe(m),o,i,f,n,m)}else(f in bc.keywords||e.allKeys&&!(f in bc.skipKeywords))&&zP(e,t,r,d,i+"/"+f,o,i,f,n)}r(n,i,o,a,u,c,l)}}s(zP,"_traverse");function fBe(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}s(fBe,"escapeJsonPtr")});var Oy=h(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.getSchemaRefs=gi.resolveUrl=gi.normalizeId=gi._getFullPath=gi.getFullPath=gi.inlineRef=void 0;var dBe=Ve(),pBe=Xf(),hBe=HP(),mBe=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function _Be(e,t=!0){return typeof e=="boolean"?!0:t===!0?!QD(e):t?m7(e)<=t:!1}s(_Be,"inlineRef");gi.inlineRef=_Be;var gBe=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function QD(e){for(let t in e){if(gBe.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(QD)||typeof r=="object"&&QD(r))return!0}return!1}s(QD,"hasRef");function m7(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!mBe.has(r)&&(typeof e[r]=="object"&&(0,dBe.eachItem)(e[r],n=>t+=m7(n)),t===1/0))return 1/0}return t}s(m7,"countKeys");function _7(e,t="",r){r!==!1&&(t=Lh(t));let n=e.parse(t);return g7(e,n)}s(_7,"getFullPath");gi.getFullPath=_7;function g7(e,t){return e.serialize(t).split("#")[0]+"#"}s(g7,"_getFullPath");gi._getFullPath=g7;var yBe=/#\/?$/;function Lh(e){return e?e.replace(yBe,""):""}s(Lh,"normalizeId");gi.normalizeId=Lh;function EBe(e,t,r){return r=Lh(r),e.resolve(t,r)}s(EBe,"resolveUrl");gi.resolveUrl=EBe;var bBe=/^[a-z_][-a-z0-9._]*$/i;function SBe(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=Lh(e[r]||t),o={"":i},a=_7(n,i,!1),u={},c=new Set;return hBe(e,{allKeys:!0},(d,_,m,g)=>{if(g===void 0)return;let y=a+_,b=o[g];typeof d[r]=="string"&&(b=E.call(this,d[r])),S.call(this,d.$anchor),S.call(this,d.$dynamicAnchor),o[_]=b;function E(O){let I=this.opts.uriResolver.resolve;if(O=Lh(b?I(b,O):O),c.has(O))throw f(O);c.add(O);let w=this.refs[O];return typeof w=="string"&&(w=this.refs[w]),typeof w=="object"?l(d,w.schema,O):O!==Lh(y)&&(O[0]==="#"?(l(d,u[O],O),u[O]=d):this.refs[O]=y),O}s(E,"addRef");function S(O){if(typeof O=="string"){if(!bBe.test(O))throw new Error(`invalid anchor "${O}"`);E.call(this,`#${O}`)}}s(S,"addAnchor")}),u;function l(d,_,m){if(_!==void 0&&!pBe(d,_))throw f(m)}s(l,"checkAmbiguosRef");function f(d){return new Error(`reference "${d}" resolves to more than one schema`)}s(f,"ambiguos")}s(SBe,"getSchemaRefs");gi.getSchemaRefs=SBe});var jh=h(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});Sc.getData=Sc.KeywordCxt=Sc.validateFunctionCode=void 0;var v7=Q9(),y7=vy(),eL=zD(),KP=vy(),vBe=s7(),Iy=l7(),ZD=d7(),ae=Oe(),Ee=ps(),OBe=Oy(),uu=Ve(),Py=by();function PBe(e){if(I7(e)&&(w7(e),P7(e))){TBe(e);return}O7(e,()=>(0,v7.topBoolOrEmptySchema)(e))}s(PBe,"validateFunctionCode");Sc.validateFunctionCode=PBe;function O7({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,(0,ae._)`${Ee.default.data}, ${Ee.default.valCxt}`,n.$async,()=>{e.code((0,ae._)`"use strict"; ${E7(r,i)}`),wBe(e,i),e.code(o)}):e.func(t,(0,ae._)`${Ee.default.data}, ${IBe(i)}`,n.$async,()=>e.code(E7(r,i)).code(o))}s(O7,"validateFunction");function IBe(e){return(0,ae._)`{${Ee.default.instancePath}="", ${Ee.default.parentData}, ${Ee.default.parentDataProperty}, ${Ee.default.rootData}=${Ee.default.data}${e.dynamicRef?(0,ae._)`, ${Ee.default.dynamicAnchors}={}`:ae.nil}}={}`}s(IBe,"destructureValCxt");function wBe(e,t){e.if(Ee.default.valCxt,()=>{e.var(Ee.default.instancePath,(0,ae._)`${Ee.default.valCxt}.${Ee.default.instancePath}`),e.var(Ee.default.parentData,(0,ae._)`${Ee.default.valCxt}.${Ee.default.parentData}`),e.var(Ee.default.parentDataProperty,(0,ae._)`${Ee.default.valCxt}.${Ee.default.parentDataProperty}`),e.var(Ee.default.rootData,(0,ae._)`${Ee.default.valCxt}.${Ee.default.rootData}`),t.dynamicRef&&e.var(Ee.default.dynamicAnchors,(0,ae._)`${Ee.default.valCxt}.${Ee.default.dynamicAnchors}`)},()=>{e.var(Ee.default.instancePath,(0,ae._)`""`),e.var(Ee.default.parentData,(0,ae._)`undefined`),e.var(Ee.default.parentDataProperty,(0,ae._)`undefined`),e.var(Ee.default.rootData,Ee.default.data),t.dynamicRef&&e.var(Ee.default.dynamicAnchors,(0,ae._)`{}`)})}s(wBe,"destructureValCxtES5");function TBe(e){let{schema:t,opts:r,gen:n}=e;O7(e,()=>{r.$comment&&t.$comment&&N7(e),$Be(e),n.let(Ee.default.vErrors,null),n.let(Ee.default.errors,0),r.unevaluated&&NBe(e),T7(e),jBe(e)})}s(TBe,"topSchemaObjCode");function NBe(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,ae._)`${r}.evaluated`),t.if((0,ae._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,ae._)`${e.evaluated}.props`,(0,ae._)`undefined`)),t.if((0,ae._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,ae._)`${e.evaluated}.items`,(0,ae._)`undefined`))}s(NBe,"resetEvaluated");function E7(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,ae._)`/*# sourceURL=${r} */`:ae.nil}s(E7,"funcSourceUrl");function ABe(e,t){if(I7(e)&&(w7(e),P7(e))){RBe(e,t);return}(0,v7.boolOrEmptySchema)(e,t)}s(ABe,"subschemaCode");function P7({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}s(P7,"schemaCxtHasRules");function I7(e){return typeof e.schema!="boolean"}s(I7,"isSchemaObj");function RBe(e,t){let{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&N7(e),DBe(e),LBe(e);let o=n.const("_errs",Ee.default.errors);T7(e,o),n.var(t,(0,ae._)`${o} === ${Ee.default.errors}`)}s(RBe,"subSchemaObjCode");function w7(e){(0,uu.checkUnknownRules)(e),CBe(e)}s(w7,"checkKeywords");function T7(e,t){if(e.opts.jtd)return b7(e,[],!1,t);let r=(0,y7.getSchemaTypes)(e.schema),n=(0,y7.coerceAndCheckDataType)(e,r);b7(e,r,!n,t)}s(T7,"typeAndKeywords");function CBe(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,uu.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}s(CBe,"checkRefsAndKeywords");function $Be(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,uu.checkStrictMode)(e,"default is ignored in the schema root")}s($Be,"checkNoDefault");function DBe(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,OBe.resolveUrl)(e.opts.uriResolver,e.baseId,t))}s(DBe,"updateContext");function LBe(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}s(LBe,"checkAsyncSchema");function N7({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)e.code((0,ae._)`${Ee.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let a=(0,ae.str)`${n}/$comment`,u=e.scopeValue("root",{ref:t.root});e.code((0,ae._)`${Ee.default.self}.opts.$comment(${o}, ${a}, ${u}.schema)`)}}s(N7,"commentKeyword");function jBe(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if((0,ae._)`${Ee.default.errors} === 0`,()=>t.return(Ee.default.data),()=>t.throw((0,ae._)`new ${i}(${Ee.default.vErrors})`)):(t.assign((0,ae._)`${n}.errors`,Ee.default.vErrors),o.unevaluated&&MBe(e),t.return((0,ae._)`${Ee.default.errors} === 0`))}s(jBe,"returnResults");function MBe({gen:e,evaluated:t,props:r,items:n}){r instanceof ae.Name&&e.assign((0,ae._)`${t}.props`,r),n instanceof ae.Name&&e.assign((0,ae._)`${t}.items`,n)}s(MBe,"assignEvaluated");function b7(e,t,r,n){let{gen:i,schema:o,data:a,allErrors:u,opts:c,self:l}=e,{RULES:f}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,uu.schemaHasRulesButRef)(o,f))){i.block(()=>R7(e,"$ref",f.all.$ref.definition));return}c.jtd||UBe(e,t),i.block(()=>{for(let _ of f.rules)d(_);d(f.post)});function d(_){(0,eL.shouldUseGroup)(o,_)&&(_.type?(i.if((0,KP.checkDataType)(_.type,a,c.strictNumbers)),S7(e,_),t.length===1&&t[0]===_.type&&r&&(i.else(),(0,KP.reportTypeError)(e)),i.endIf()):S7(e,_),u||i.if((0,ae._)`${Ee.default.errors} === ${n||0}`))}s(d,"groupKeywords")}s(b7,"schemaKeywords");function S7(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,vBe.assignDefaults)(e,t.type),r.block(()=>{for(let o of t.rules)(0,eL.shouldUseRule)(n,o)&&R7(e,o.keyword,o.definition,t.type)})}s(S7,"iterateKeywords");function UBe(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(xBe(e,t),e.opts.allowUnionTypes||qBe(e,t),FBe(e,e.dataTypes))}s(UBe,"checkStrictTypes");function xBe(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{A7(e.dataTypes,r)||tL(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),BBe(e,t)}}s(xBe,"checkContextTypes");function qBe(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&tL(e,"use allowUnionTypes to allow union type keyword")}s(qBe,"checkMultipleTypes");function FBe(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,eL.shouldUseRule)(e.schema,i)){let{type:o}=i.definition;o.length&&!o.some(a=>kBe(t,a))&&tL(e,`missing type "${o.join(",")}" for keyword "${n}"`)}}}s(FBe,"checkKeywordTypes");function kBe(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}s(kBe,"hasApplicableType");function A7(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}s(A7,"includesType");function BBe(e,t){let r=[];for(let n of e.dataTypes)A7(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}s(BBe,"narrowSchemaTypes");function tL(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,uu.checkStrictMode)(e,t,e.opts.strictTypes)}s(tL,"strictTypesError");var WP=class{static{s(this,"KeywordCxt")}constructor(t,r,n){if((0,Iy.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,uu.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",C7(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Iy.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=t.gen.const("_errs",Ee.default.errors))}result(t,r,n){this.failResult((0,ae.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,ae.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,ae._)`${r} !== undefined && (${(0,ae.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Py.reportExtraError:Py.reportError)(this,this.def.error,r)}$dataError(){(0,Py.reportError)(this,this.def.$dataError||Py.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Py.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=ae.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=ae.nil,r=ae.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:a}=this;n.if((0,ae.or)((0,ae._)`${i} === undefined`,r)),t!==ae.nil&&n.assign(t,!0),(o.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==ae.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,ae.or)(a(),u());function a(){if(n.length){if(!(r instanceof ae.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,ae._)`${(0,KP.checkDataTypes)(c,r,o.opts.strictNumbers,KP.DataType.Wrong)}`}return ae.nil}function u(){if(i.validateSchema){let c=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,ae._)`!${c}(${r})`}return ae.nil}}subschema(t,r){let n=(0,ZD.getSubschema)(this.it,t);(0,ZD.extendSubschemaData)(n,this.it,t),(0,ZD.extendSubschemaMode)(n,t);let i={...this.it,...n,items:void 0,props:void 0};return ABe(i,r),i}mergeEvaluated(t,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=uu.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=uu.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,ae.Name)),!0}};Sc.KeywordCxt=WP;function R7(e,t,r,n){let i=new WP(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Iy.funcKeywordCode)(i,r):"macro"in r?(0,Iy.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Iy.funcKeywordCode)(i,r)}s(R7,"keywordCode");var GBe=/^\/(?:[^~]|~0|~1)*$/,VBe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function C7(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(e==="")return Ee.default.rootData;if(e[0]==="/"){if(!GBe.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=Ee.default.rootData}else{let l=VBe.exec(e);if(!l)throw new Error(`Invalid JSON-pointer: ${e}`);let f=+l[1];if(i=l[2],i==="#"){if(f>=t)throw new Error(c("property/index",f));return n[t-f]}if(f>t)throw new Error(c("data",f));if(o=r[t-f],!i)return o}let a=o,u=i.split("/");for(let l of u)l&&(o=(0,ae._)`${o}${(0,ae.getProperty)((0,uu.unescapeJsonPointer)(l))}`,a=(0,ae._)`${a} && ${o}`);return a;function c(l,f){return`Cannot access ${l} ${f} levels up, current level is ${t}`}}s(C7,"getData");Sc.getData=C7});var wy=h(nL=>{"use strict";Object.defineProperty(nL,"__esModule",{value:!0});var rL=class extends Error{static{s(this,"ValidationError")}constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};nL.default=rL});var Ty=h(oL=>{"use strict";Object.defineProperty(oL,"__esModule",{value:!0});var iL=Oy(),sL=class extends Error{static{s(this,"MissingRefError")}constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,iL.resolveUrl)(t,r,n),this.missingSchema=(0,iL.normalizeId)((0,iL.getFullPath)(t,this.missingRef))}};oL.default=sL});var Ny=h(ms=>{"use strict";Object.defineProperty(ms,"__esModule",{value:!0});ms.resolveSchema=ms.getCompilingSchema=ms.resolveRef=ms.compileSchema=ms.SchemaEnv=void 0;var oo=Oe(),zBe=wy(),Qf=ps(),ao=Oy(),$7=Ve(),HBe=jh(),Mh=class{static{s(this,"SchemaEnv")}constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,ao.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};ms.SchemaEnv=Mh;function uL(e){let t=D7.call(this,e);if(t)return t;let r=(0,ao.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,a=new oo.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),u;e.$async&&(u=a.scopeValue("Error",{ref:zBe.default,code:(0,oo._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");e.validateName=c;let l={gen:a,allErrors:this.opts.allErrors,data:Qf.default.data,parentData:Qf.default.parentData,parentDataProperty:Qf.default.parentDataProperty,dataNames:[Qf.default.data],dataPathArr:[oo.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,oo.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:u,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:oo.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,oo._)`""`,opts:this.opts,self:this},f;try{this._compilations.add(e),(0,HBe.validateFunctionCode)(l),a.optimize(this.opts.code.optimize);let d=a.toString();f=`${a.scopeRefs(Qf.default.scope)}return ${d}`,this.opts.code.process&&(f=this.opts.code.process(f,e));let m=new Function(`${Qf.default.self}`,`${Qf.default.scope}`,f)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:g,items:y}=l;m.evaluated={props:g instanceof oo.Name?void 0:g,items:y instanceof oo.Name?void 0:y,dynamicProps:g instanceof oo.Name,dynamicItems:y instanceof oo.Name},m.source&&(m.source.evaluated=(0,oo.stringify)(m.evaluated))}return e.validate=m,e}catch(d){throw delete e.validate,delete e.validateName,f&&this.logger.error("Error compiling schema, function code:",f),d}finally{this._compilations.delete(e)}}s(uL,"compileSchema");ms.compileSchema=uL;function KBe(e,t,r){var n;r=(0,ao.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let o=JBe.call(this,e,r);if(o===void 0){let a=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:u}=this.opts;a&&(o=new Mh({schema:a,schemaId:u,root:e,baseId:t}))}if(o!==void 0)return e.refs[r]=WBe.call(this,o)}s(KBe,"resolveRef");ms.resolveRef=KBe;function WBe(e){return(0,ao.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:uL.call(this,e)}s(WBe,"inlineOrCompile");function D7(e){for(let t of this._compilations)if(YBe(t,e))return t}s(D7,"getCompilingSchema");ms.getCompilingSchema=D7;function YBe(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}s(YBe,"sameSchemaEnv");function JBe(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||YP.call(this,e,t)}s(JBe,"resolve");function YP(e,t){let r=this.opts.uriResolver.parse(t),n=(0,ao._getFullPath)(this.opts.uriResolver,r),i=(0,ao.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return aL.call(this,r,e);let o=(0,ao.normalizeId)(n),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){let u=YP.call(this,e,a);return typeof u?.schema!="object"?void 0:aL.call(this,r,u)}if(typeof a?.schema=="object"){if(a.validate||uL.call(this,a),o===(0,ao.normalizeId)(t)){let{schema:u}=a,{schemaId:c}=this.opts,l=u[c];return l&&(i=(0,ao.resolveUrl)(this.opts.uriResolver,i,l)),new Mh({schema:u,schemaId:c,root:e,baseId:i})}return aL.call(this,r,a)}}s(YP,"resolveSchema");ms.resolveSchema=YP;var XBe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function aL(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let u of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,$7.unescapeFragment)(u)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!XBe.has(u)&&l&&(t=(0,ao.resolveUrl)(this.opts.uriResolver,t,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,$7.schemaHasRulesButRef)(r,this.RULES)){let u=(0,ao.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=YP.call(this,n,u)}let{schemaId:a}=this.opts;if(o=o||new Mh({schema:r,schemaId:a,root:n,baseId:t}),o.schema!==o.root.schema)return o}s(aL,"getJsonPointer")});var L7=h((kNt,QBe)=>{QBe.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 XP=h((JP,j7)=>{(function(e,t){typeof JP=="object"&&typeof j7<"u"?t(JP):typeof define=="function"&&define.amd?define(["exports"],t):t(e.URI=e.URI||{})})(JP,function(e){"use strict";function t(){for(var T=arguments.length,P=Array(T),R=0;R<T;R++)P[R]=arguments[R];if(P.length>1){P[0]=P[0].slice(0,-1);for(var C=P.length-1,$=1;$<C;++$)P[$]=P[$].slice(1,-1);return P[C]=P[C].slice(1),P.join("")}else return P[0]}s(t,"merge");function r(T){return"(?:"+T+")"}s(r,"subexp");function n(T){return T===void 0?"undefined":T===null?"null":Object.prototype.toString.call(T).split(" ").pop().split("]").shift().toLowerCase()}s(n,"typeOf");function i(T){return T.toUpperCase()}s(i,"toUpperCase");function o(T){return T!=null?T instanceof Array?T:typeof T.length!="number"||T.split||T.setInterval||T.call?[T]:Array.prototype.slice.call(T):[]}s(o,"toArray");function a(T,P){var R=T;if(P)for(var C in P)R[C]=P[C];return R}s(a,"assign");function u(T){var P="[A-Za-z]",R="[\\x0D]",C="[0-9]",$="[\\x22]",Z=t(C,"[A-Fa-f]"),we="[\\x0A]",ut="[\\x20]",vt=r(r("%[EFef]"+Z+"%"+Z+Z+"%"+Z+Z)+"|"+r("%[89A-Fa-f]"+Z+"%"+Z+Z)+"|"+r("%"+Z+Z)),br="[\\:\\/\\?\\#\\[\\]\\@]",et="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",Qt=t(br,et),Sr=T?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Kt=T?"[\\uE000-\\uF8FF]":"[]",gt=t(P,C,"[\\-\\.\\_\\~]",Sr),Zt=r(P+t(P,C,"[\\+\\-\\.]")+"*"),Nt=r(r(vt+"|"+t(gt,et,"[\\:]"))+"*"),fl=r(r("25[0-5]")+"|"+r("2[0-4]"+C)+"|"+r("1"+C+C)+"|"+r("[1-9]"+C)+"|"+C),Mi=r(r("25[0-5]")+"|"+r("2[0-4]"+C)+"|"+r("1"+C+C)+"|"+r("0?[1-9]"+C)+"|0?0?"+C),Zi=r(Mi+"\\."+Mi+"\\."+Mi+"\\."+Mi),Lt=r(Z+"{1,4}"),Ui=r(r(Lt+"\\:"+Lt)+"|"+Zi),es=r(r(Lt+"\\:")+"{6}"+Ui),Ro=r("\\:\\:"+r(Lt+"\\:")+"{5}"+Ui),dl=r(r(Lt)+"?\\:\\:"+r(Lt+"\\:")+"{4}"+Ui),qa=r(r(r(Lt+"\\:")+"{0,1}"+Lt)+"?\\:\\:"+r(Lt+"\\:")+"{3}"+Ui),tg=r(r(r(Lt+"\\:")+"{0,2}"+Lt)+"?\\:\\:"+r(Lt+"\\:")+"{2}"+Ui),db=r(r(r(Lt+"\\:")+"{0,3}"+Lt)+"?\\:\\:"+Lt+"\\:"+Ui),pb=r(r(r(Lt+"\\:")+"{0,4}"+Lt)+"?\\:\\:"+Ui),dp=r(r(r(Lt+"\\:")+"{0,5}"+Lt)+"?\\:\\:"+Lt),pp=r(r(r(Lt+"\\:")+"{0,6}"+Lt)+"?\\:\\:"),Fa=r([es,Ro,dl,qa,tg,db,pb,dp,pp].join("|")),hp=r(r(gt+"|"+vt)+"+"),PA=r(Fa+"\\%25"+hp),pl=r(Fa+r("\\%25|\\%(?!"+Z+"{2})")+hp),Kpe=r("[vV]"+Z+"+\\."+t(gt,et,"[\\:]")+"+"),Wpe=r("\\["+r(pl+"|"+Fa+"|"+Kpe)+"\\]"),KB=r(r(vt+"|"+t(gt,et))+"*"),rg=r(Wpe+"|"+Zi+"(?!"+KB+")|"+KB),ng=r(C+"*"),WB=r(r(Nt+"@")+"?"+rg+r("\\:"+ng)+"?"),ig=r(vt+"|"+t(gt,et,"[\\:\\@]")),Ype=r(ig+"*"),YB=r(ig+"+"),Jpe=r(r(vt+"|"+t(gt,et,"[\\@]"))+"+"),ka=r(r("\\/"+Ype)+"*"),mp=r("\\/"+r(YB+ka)+"?"),IA=r(Jpe+ka),hb=r(YB+ka),_p="(?!"+ig+")",I0t=r(ka+"|"+mp+"|"+IA+"|"+hb+"|"+_p),gp=r(r(ig+"|"+t("[\\/\\?]",Kt))+"*"),sg=r(r(ig+"|[\\/\\?]")+"*"),JB=r(r("\\/\\/"+WB+ka)+"|"+mp+"|"+hb+"|"+_p),Xpe=r(Zt+"\\:"+JB+r("\\?"+gp)+"?"+r("\\#"+sg)+"?"),Qpe=r(r("\\/\\/"+WB+ka)+"|"+mp+"|"+IA+"|"+_p),Zpe=r(Qpe+r("\\?"+gp)+"?"+r("\\#"+sg)+"?"),w0t=r(Xpe+"|"+Zpe),T0t=r(Zt+"\\:"+JB+r("\\?"+gp)+"?"),N0t="^("+Zt+")\\:"+r(r("\\/\\/("+r("("+Nt+")@")+"?("+rg+")"+r("\\:("+ng+")")+"?)")+"?("+ka+"|"+mp+"|"+hb+"|"+_p+")")+r("\\?("+gp+")")+"?"+r("\\#("+sg+")")+"?$",A0t="^(){0}"+r(r("\\/\\/("+r("("+Nt+")@")+"?("+rg+")"+r("\\:("+ng+")")+"?)")+"?("+ka+"|"+mp+"|"+IA+"|"+_p+")")+r("\\?("+gp+")")+"?"+r("\\#("+sg+")")+"?$",R0t="^("+Zt+")\\:"+r(r("\\/\\/("+r("("+Nt+")@")+"?("+rg+")"+r("\\:("+ng+")")+"?)")+"?("+ka+"|"+mp+"|"+hb+"|"+_p+")")+r("\\?("+gp+")")+"?$",C0t="^"+r("\\#("+sg+")")+"?$",$0t="^"+r("("+Nt+")@")+"?("+rg+")"+r("\\:("+ng+")")+"?$";return{NOT_SCHEME:new RegExp(t("[^]",P,C,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",gt,et),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",gt,et),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",gt,et),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",gt,et),"g"),NOT_QUERY:new RegExp(t("[^\\%]",gt,et,"[\\:\\@\\/\\?]",Kt),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",gt,et,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",gt,et),"g"),UNRESERVED:new RegExp(gt,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",gt,Qt),"g"),PCT_ENCODED:new RegExp(vt,"g"),IPV4ADDRESS:new RegExp("^("+Zi+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Fa+")"+r(r("\\%25|\\%(?!"+Z+"{2})")+"("+hp+")")+"?\\]?$")}}s(u,"buildExps");var c=u(!1),l=u(!0),f=function(){function T(P,R){var C=[],$=!0,Z=!1,we=void 0;try{for(var ut=P[Symbol.iterator](),vt;!($=(vt=ut.next()).done)&&(C.push(vt.value),!(R&&C.length===R));$=!0);}catch(br){Z=!0,we=br}finally{try{!$&&ut.return&&ut.return()}finally{if(Z)throw we}}return C}return s(T,"sliceIterator"),function(P,R){if(Array.isArray(P))return P;if(Symbol.iterator in Object(P))return T(P,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),d=s(function(T){if(Array.isArray(T)){for(var P=0,R=Array(T.length);P<T.length;P++)R[P]=T[P];return R}else return Array.from(T)},"toConsumableArray"),_=2147483647,m=36,g=1,y=26,b=38,E=700,S=72,O=128,I="-",w=/^xn--/,j=/[^\0-\x7E]/,F=/[\x2E\u3002\uFF0E\uFF61]/g,K={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},H=m-g,re=Math.floor,de=String.fromCharCode;function te(T){throw new RangeError(K[T])}s(te,"error$1");function he(T,P){for(var R=[],C=T.length;C--;)R[C]=P(T[C]);return R}s(he,"map");function Ce(T,P){var R=T.split("@"),C="";R.length>1&&(C=R[0]+"@",T=R[1]),T=T.replace(F,".");var $=T.split("."),Z=he($,P).join(".");return C+Z}s(Ce,"mapDomain");function bt(T){for(var P=[],R=0,C=T.length;R<C;){var $=T.charCodeAt(R++);if($>=55296&&$<=56319&&R<C){var Z=T.charCodeAt(R++);(Z&64512)==56320?P.push((($&1023)<<10)+(Z&1023)+65536):(P.push($),R--)}else P.push($)}return P}s(bt,"ucs2decode");var _t=s(function(P){return String.fromCodePoint.apply(String,d(P))},"ucs2encode"),zr=s(function(P){return P-48<10?P-22:P-65<26?P-65:P-97<26?P-97:m},"basicToDigit"),Cn=s(function(P,R){return P+22+75*(P<26)-((R!=0)<<5)},"digitToBasic"),Qi=s(function(P,R,C){var $=0;for(P=C?re(P/E):P>>1,P+=re(P/R);P>H*y>>1;$+=m)P=re(P/H);return re($+(H+1)*P/(P+b))},"adapt"),ja=s(function(P){var R=[],C=P.length,$=0,Z=O,we=S,ut=P.lastIndexOf(I);ut<0&&(ut=0);for(var vt=0;vt<ut;++vt)P.charCodeAt(vt)>=128&&te("not-basic"),R.push(P.charCodeAt(vt));for(var br=ut>0?ut+1:0;br<C;){for(var et=$,Qt=1,Sr=m;;Sr+=m){br>=C&&te("invalid-input");var Kt=zr(P.charCodeAt(br++));(Kt>=m||Kt>re((_-$)/Qt))&&te("overflow"),$+=Kt*Qt;var gt=Sr<=we?g:Sr>=we+y?y:Sr-we;if(Kt<gt)break;var Zt=m-gt;Qt>re(_/Zt)&&te("overflow"),Qt*=Zt}var Nt=R.length+1;we=Qi($-et,Nt,et==0),re($/Nt)>_-Z&&te("overflow"),Z+=re($/Nt),$%=Nt,R.splice($++,0,Z)}return String.fromCodePoint.apply(String,R)},"decode"),$n=s(function(P){var R=[];P=bt(P);var C=P.length,$=O,Z=0,we=S,ut=!0,vt=!1,br=void 0;try{for(var et=P[Symbol.iterator](),Qt;!(ut=(Qt=et.next()).done);ut=!0){var Sr=Qt.value;Sr<128&&R.push(de(Sr))}}catch(pl){vt=!0,br=pl}finally{try{!ut&&et.return&&et.return()}finally{if(vt)throw br}}var Kt=R.length,gt=Kt;for(Kt&&R.push(I);gt<C;){var Zt=_,Nt=!0,fl=!1,Mi=void 0;try{for(var Zi=P[Symbol.iterator](),Lt;!(Nt=(Lt=Zi.next()).done);Nt=!0){var Ui=Lt.value;Ui>=$&&Ui<Zt&&(Zt=Ui)}}catch(pl){fl=!0,Mi=pl}finally{try{!Nt&&Zi.return&&Zi.return()}finally{if(fl)throw Mi}}var es=gt+1;Zt-$>re((_-Z)/es)&&te("overflow"),Z+=(Zt-$)*es,$=Zt;var Ro=!0,dl=!1,qa=void 0;try{for(var tg=P[Symbol.iterator](),db;!(Ro=(db=tg.next()).done);Ro=!0){var pb=db.value;if(pb<$&&++Z>_&&te("overflow"),pb==$){for(var dp=Z,pp=m;;pp+=m){var Fa=pp<=we?g:pp>=we+y?y:pp-we;if(dp<Fa)break;var hp=dp-Fa,PA=m-Fa;R.push(de(Cn(Fa+hp%PA,0))),dp=re(hp/PA)}R.push(de(Cn(dp,0))),we=Qi(Z,es,gt==Kt),Z=0,++gt}}}catch(pl){dl=!0,qa=pl}finally{try{!Ro&&tg.return&&tg.return()}finally{if(dl)throw qa}}++Z,++$}return R.join("")},"encode"),Li=s(function(P){return Ce(P,function(R){return w.test(R)?ja(R.slice(4).toLowerCase()):R})},"toUnicode"),ji=s(function(P){return Ce(P,function(R){return j.test(R)?"xn--"+$n(R):R})},"toASCII"),Ma={version:"2.1.0",ucs2:{decode:bt,encode:_t},decode:ja,encode:$n,toASCII:ji,toUnicode:Li},Hr={};function Dn(T){var P=T.charCodeAt(0),R=void 0;return P<16?R="%0"+P.toString(16).toUpperCase():P<128?R="%"+P.toString(16).toUpperCase():P<2048?R="%"+(P>>6|192).toString(16).toUpperCase()+"%"+(P&63|128).toString(16).toUpperCase():R="%"+(P>>12|224).toString(16).toUpperCase()+"%"+(P>>6&63|128).toString(16).toUpperCase()+"%"+(P&63|128).toString(16).toUpperCase(),R}s(Dn,"pctEncChar");function cp(T){for(var P="",R=0,C=T.length;R<C;){var $=parseInt(T.substr(R+1,2),16);if($<128)P+=String.fromCharCode($),R+=3;else if($>=194&&$<224){if(C-R>=6){var Z=parseInt(T.substr(R+4,2),16);P+=String.fromCharCode(($&31)<<6|Z&63)}else P+=T.substr(R,6);R+=6}else if($>=224){if(C-R>=9){var we=parseInt(T.substr(R+4,2),16),ut=parseInt(T.substr(R+7,2),16);P+=String.fromCharCode(($&15)<<12|(we&63)<<6|ut&63)}else P+=T.substr(R,9);R+=9}else P+=T.substr(R,3),R+=3}return P}s(cp,"pctDecChars");function bA(T,P){function R(C){var $=cp(C);return $.match(P.UNRESERVED)?$:C}return s(R,"decodeUnreserved"),T.scheme&&(T.scheme=String(T.scheme).replace(P.PCT_ENCODED,R).toLowerCase().replace(P.NOT_SCHEME,"")),T.userinfo!==void 0&&(T.userinfo=String(T.userinfo).replace(P.PCT_ENCODED,R).replace(P.NOT_USERINFO,Dn).replace(P.PCT_ENCODED,i)),T.host!==void 0&&(T.host=String(T.host).replace(P.PCT_ENCODED,R).toLowerCase().replace(P.NOT_HOST,Dn).replace(P.PCT_ENCODED,i)),T.path!==void 0&&(T.path=String(T.path).replace(P.PCT_ENCODED,R).replace(T.scheme?P.NOT_PATH:P.NOT_PATH_NOSCHEME,Dn).replace(P.PCT_ENCODED,i)),T.query!==void 0&&(T.query=String(T.query).replace(P.PCT_ENCODED,R).replace(P.NOT_QUERY,Dn).replace(P.PCT_ENCODED,i)),T.fragment!==void 0&&(T.fragment=String(T.fragment).replace(P.PCT_ENCODED,R).replace(P.NOT_FRAGMENT,Dn).replace(P.PCT_ENCODED,i)),T}s(bA,"_normalizeComponentEncoding");function SA(T){return T.replace(/^0*(.*)/,"$1")||"0"}s(SA,"_stripLeadingZeros");function vA(T,P){var R=T.match(P.IPV4ADDRESS)||[],C=f(R,2),$=C[1];return $?$.split(".").map(SA).join("."):T}s(vA,"_normalizeIPv4");function LB(T,P){var R=T.match(P.IPV6ADDRESS)||[],C=f(R,3),$=C[1],Z=C[2];if($){for(var we=$.toLowerCase().split("::").reverse(),ut=f(we,2),vt=ut[0],br=ut[1],et=br?br.split(":").map(SA):[],Qt=vt.split(":").map(SA),Sr=P.IPV4ADDRESS.test(Qt[Qt.length-1]),Kt=Sr?7:8,gt=Qt.length-Kt,Zt=Array(Kt),Nt=0;Nt<Kt;++Nt)Zt[Nt]=et[Nt]||Qt[gt+Nt]||"";Sr&&(Zt[Kt-1]=vA(Zt[Kt-1],P));var fl=Zt.reduce(function(es,Ro,dl){if(!Ro||Ro==="0"){var qa=es[es.length-1];qa&&qa.index+qa.length===dl?qa.length++:es.push({index:dl,length:1})}return es},[]),Mi=fl.sort(function(es,Ro){return Ro.length-es.length})[0],Zi=void 0;if(Mi&&Mi.length>1){var Lt=Zt.slice(0,Mi.index),Ui=Zt.slice(Mi.index+Mi.length);Zi=Lt.join(":")+"::"+Ui.join(":")}else Zi=Zt.join(":");return Z&&(Zi+="%"+Z),Zi}else return T}s(LB,"_normalizeIPv6");var Tpe=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Npe="".match(/(){0}/)[1]===void 0;function Ua(T){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R={},C=P.iri!==!1?l:c;P.reference==="suffix"&&(T=(P.scheme?P.scheme+":":"")+"//"+T);var $=T.match(Tpe);if($){Npe?(R.scheme=$[1],R.userinfo=$[3],R.host=$[4],R.port=parseInt($[5],10),R.path=$[6]||"",R.query=$[7],R.fragment=$[8],isNaN(R.port)&&(R.port=$[5])):(R.scheme=$[1]||void 0,R.userinfo=T.indexOf("@")!==-1?$[3]:void 0,R.host=T.indexOf("//")!==-1?$[4]:void 0,R.port=parseInt($[5],10),R.path=$[6]||"",R.query=T.indexOf("?")!==-1?$[7]:void 0,R.fragment=T.indexOf("#")!==-1?$[8]:void 0,isNaN(R.port)&&(R.port=T.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?$[4]:void 0)),R.host&&(R.host=LB(vA(R.host,C),C)),R.scheme===void 0&&R.userinfo===void 0&&R.host===void 0&&R.port===void 0&&!R.path&&R.query===void 0?R.reference="same-document":R.scheme===void 0?R.reference="relative":R.fragment===void 0?R.reference="absolute":R.reference="uri",P.reference&&P.reference!=="suffix"&&P.reference!==R.reference&&(R.error=R.error||"URI is not a "+P.reference+" reference.");var Z=Hr[(P.scheme||R.scheme||"").toLowerCase()];if(!P.unicodeSupport&&(!Z||!Z.unicodeSupport)){if(R.host&&(P.domainHost||Z&&Z.domainHost))try{R.host=Ma.toASCII(R.host.replace(C.PCT_ENCODED,cp).toLowerCase())}catch(we){R.error=R.error||"Host's domain name can not be converted to ASCII via punycode: "+we}bA(R,c)}else bA(R,C);Z&&Z.parse&&Z.parse(R,P)}else R.error=R.error||"URI can not be parsed.";return R}s(Ua,"parse");function Ape(T,P){var R=P.iri!==!1?l:c,C=[];return T.userinfo!==void 0&&(C.push(T.userinfo),C.push("@")),T.host!==void 0&&C.push(LB(vA(String(T.host),R),R).replace(R.IPV6ADDRESS,function($,Z,we){return"["+Z+(we?"%25"+we:"")+"]"})),(typeof T.port=="number"||typeof T.port=="string")&&(C.push(":"),C.push(String(T.port))),C.length?C.join(""):void 0}s(Ape,"_recomposeAuthority");var jB=/^\.\.?\//,MB=/^\/\.(\/|$)/,UB=/^\/\.\.(\/|$)/,Rpe=/^\/?(?:.|\n)*?(?=\/|$)/;function lp(T){for(var P=[];T.length;)if(T.match(jB))T=T.replace(jB,"");else if(T.match(MB))T=T.replace(MB,"/");else if(T.match(UB))T=T.replace(UB,"/"),P.pop();else if(T==="."||T==="..")T="";else{var R=T.match(Rpe);if(R){var C=R[0];T=T.slice(C.length),P.push(C)}else throw new Error("Unexpected dot segment condition")}return P.join("")}s(lp,"removeDotSegments");function No(T){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R=P.iri?l:c,C=[],$=Hr[(P.scheme||T.scheme||"").toLowerCase()];if($&&$.serialize&&$.serialize(T,P),T.host&&!R.IPV6ADDRESS.test(T.host)){if(P.domainHost||$&&$.domainHost)try{T.host=P.iri?Ma.toUnicode(T.host):Ma.toASCII(T.host.replace(R.PCT_ENCODED,cp).toLowerCase())}catch(ut){T.error=T.error||"Host's domain name can not be converted to "+(P.iri?"Unicode":"ASCII")+" via punycode: "+ut}}bA(T,R),P.reference!=="suffix"&&T.scheme&&(C.push(T.scheme),C.push(":"));var Z=Ape(T,P);if(Z!==void 0&&(P.reference!=="suffix"&&C.push("//"),C.push(Z),T.path&&T.path.charAt(0)!=="/"&&C.push("/")),T.path!==void 0){var we=T.path;!P.absolutePath&&(!$||!$.absolutePath)&&(we=lp(we)),Z===void 0&&(we=we.replace(/^\/\//,"/%2F")),C.push(we)}return T.query!==void 0&&(C.push("?"),C.push(T.query)),T.fragment!==void 0&&(C.push("#"),C.push(T.fragment)),C.join("")}s(No,"serialize");function xB(T,P){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},C=arguments[3],$={};return C||(T=Ua(No(T,R),R),P=Ua(No(P,R),R)),R=R||{},!R.tolerant&&P.scheme?($.scheme=P.scheme,$.userinfo=P.userinfo,$.host=P.host,$.port=P.port,$.path=lp(P.path||""),$.query=P.query):(P.userinfo!==void 0||P.host!==void 0||P.port!==void 0?($.userinfo=P.userinfo,$.host=P.host,$.port=P.port,$.path=lp(P.path||""),$.query=P.query):(P.path?(P.path.charAt(0)==="/"?$.path=lp(P.path):((T.userinfo!==void 0||T.host!==void 0||T.port!==void 0)&&!T.path?$.path="/"+P.path:T.path?$.path=T.path.slice(0,T.path.lastIndexOf("/")+1)+P.path:$.path=P.path,$.path=lp($.path)),$.query=P.query):($.path=T.path,P.query!==void 0?$.query=P.query:$.query=T.query),$.userinfo=T.userinfo,$.host=T.host,$.port=T.port),$.scheme=T.scheme),$.fragment=P.fragment,$}s(xB,"resolveComponents");function Cpe(T,P,R){var C=a({scheme:"null"},R);return No(xB(Ua(T,C),Ua(P,C),C,!0),C)}s(Cpe,"resolve");function $pe(T,P){return typeof T=="string"?T=No(Ua(T,P),P):n(T)==="object"&&(T=Ua(No(T,P),P)),T}s($pe,"normalize");function Dpe(T,P,R){return typeof T=="string"?T=No(Ua(T,R),R):n(T)==="object"&&(T=No(T,R)),typeof P=="string"?P=No(Ua(P,R),R):n(P)==="object"&&(P=No(P,R)),T===P}s(Dpe,"equal");function Lpe(T,P){return T&&T.toString().replace(!P||!P.iri?c.ESCAPE:l.ESCAPE,Dn)}s(Lpe,"escapeComponent");function xa(T,P){return T&&T.toString().replace(!P||!P.iri?c.PCT_ENCODED:l.PCT_ENCODED,cp)}s(xa,"unescapeComponent");var Z_={scheme:"http",domainHost:!0,parse:s(function(P,R){return P.host||(P.error=P.error||"HTTP URIs must have a host."),P},"parse"),serialize:s(function(P,R){var C=String(P.scheme).toLowerCase()==="https";return(P.port===(C?443:80)||P.port==="")&&(P.port=void 0),P.path||(P.path="/"),P},"serialize")},qB={scheme:"https",domainHost:Z_.domainHost,parse:Z_.parse,serialize:Z_.serialize};function FB(T){return typeof T.secure=="boolean"?T.secure:String(T.scheme).toLowerCase()==="wss"}s(FB,"isSecure");var eg={scheme:"ws",domainHost:!0,parse:s(function(P,R){var C=P;return C.secure=FB(C),C.resourceName=(C.path||"/")+(C.query?"?"+C.query:""),C.path=void 0,C.query=void 0,C},"parse"),serialize:s(function(P,R){if((P.port===(FB(P)?443:80)||P.port==="")&&(P.port=void 0),typeof P.secure=="boolean"&&(P.scheme=P.secure?"wss":"ws",P.secure=void 0),P.resourceName){var C=P.resourceName.split("?"),$=f(C,2),Z=$[0],we=$[1];P.path=Z&&Z!=="/"?Z:void 0,P.query=we,P.resourceName=void 0}return P.fragment=void 0,P},"serialize")},kB={scheme:"wss",domainHost:eg.domainHost,parse:eg.parse,serialize:eg.serialize},jpe={},Mpe=!0,BB="[A-Za-z0-9\\-\\.\\_\\~"+(Mpe?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",Ao="[0-9A-Fa-f]",Upe=r(r("%[EFef]"+Ao+"%"+Ao+Ao+"%"+Ao+Ao)+"|"+r("%[89A-Fa-f]"+Ao+"%"+Ao+Ao)+"|"+r("%"+Ao+Ao)),xpe="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",qpe="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",Fpe=t(qpe,'[\\"\\\\]'),kpe="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Bpe=new RegExp(BB,"g"),fp=new RegExp(Upe,"g"),Gpe=new RegExp(t("[^]",xpe,"[\\.]",'[\\"]',Fpe),"g"),GB=new RegExp(t("[^]",BB,kpe),"g"),Vpe=GB;function OA(T){var P=cp(T);return P.match(Bpe)?P:T}s(OA,"decodeUnreserved");var VB={scheme:"mailto",parse:s(function(P,R){var C=P,$=C.to=C.path?C.path.split(","):[];if(C.path=void 0,C.query){for(var Z=!1,we={},ut=C.query.split("&"),vt=0,br=ut.length;vt<br;++vt){var et=ut[vt].split("=");switch(et[0]){case"to":for(var Qt=et[1].split(","),Sr=0,Kt=Qt.length;Sr<Kt;++Sr)$.push(Qt[Sr]);break;case"subject":C.subject=xa(et[1],R);break;case"body":C.body=xa(et[1],R);break;default:Z=!0,we[xa(et[0],R)]=xa(et[1],R);break}}Z&&(C.headers=we)}C.query=void 0;for(var gt=0,Zt=$.length;gt<Zt;++gt){var Nt=$[gt].split("@");if(Nt[0]=xa(Nt[0]),R.unicodeSupport)Nt[1]=xa(Nt[1],R).toLowerCase();else try{Nt[1]=Ma.toASCII(xa(Nt[1],R).toLowerCase())}catch(fl){C.error=C.error||"Email address's domain name can not be converted to ASCII via punycode: "+fl}$[gt]=Nt.join("@")}return C},"parse$$1"),serialize:s(function(P,R){var C=P,$=o(P.to);if($){for(var Z=0,we=$.length;Z<we;++Z){var ut=String($[Z]),vt=ut.lastIndexOf("@"),br=ut.slice(0,vt).replace(fp,OA).replace(fp,i).replace(Gpe,Dn),et=ut.slice(vt+1);try{et=R.iri?Ma.toUnicode(et):Ma.toASCII(xa(et,R).toLowerCase())}catch(gt){C.error=C.error||"Email address's domain name can not be converted to "+(R.iri?"Unicode":"ASCII")+" via punycode: "+gt}$[Z]=br+"@"+et}C.path=$.join(",")}var Qt=P.headers=P.headers||{};P.subject&&(Qt.subject=P.subject),P.body&&(Qt.body=P.body);var Sr=[];for(var Kt in Qt)Qt[Kt]!==jpe[Kt]&&Sr.push(Kt.replace(fp,OA).replace(fp,i).replace(GB,Dn)+"="+Qt[Kt].replace(fp,OA).replace(fp,i).replace(Vpe,Dn));return Sr.length&&(C.query=Sr.join("&")),C},"serialize$$1")},zpe=/^([^\:]+)\:(.*)/,zB={scheme:"urn",parse:s(function(P,R){var C=P.path&&P.path.match(zpe),$=P;if(C){var Z=R.scheme||$.scheme||"urn",we=C[1].toLowerCase(),ut=C[2],vt=Z+":"+(R.nid||we),br=Hr[vt];$.nid=we,$.nss=ut,$.path=void 0,br&&($=br.parse($,R))}else $.error=$.error||"URN can not be parsed.";return $},"parse$$1"),serialize:s(function(P,R){var C=R.scheme||P.scheme||"urn",$=P.nid,Z=C+":"+(R.nid||$),we=Hr[Z];we&&(P=we.serialize(P,R));var ut=P,vt=P.nss;return ut.path=($||R.nid)+":"+vt,ut},"serialize$$1")},Hpe=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,HB={scheme:"urn:uuid",parse:s(function(P,R){var C=P;return C.uuid=C.nss,C.nss=void 0,!R.tolerant&&(!C.uuid||!C.uuid.match(Hpe))&&(C.error=C.error||"UUID is not valid."),C},"parse"),serialize:s(function(P,R){var C=P;return C.nss=(P.uuid||"").toLowerCase(),C},"serialize")};Hr[Z_.scheme]=Z_,Hr[qB.scheme]=qB,Hr[eg.scheme]=eg,Hr[kB.scheme]=kB,Hr[VB.scheme]=VB,Hr[zB.scheme]=zB,Hr[HB.scheme]=HB,e.SCHEMES=Hr,e.pctEncChar=Dn,e.pctDecChars=cp,e.parse=Ua,e.removeDotSegments=lp,e.serialize=No,e.resolveComponents=xB,e.resolve=Cpe,e.normalize=$pe,e.equal=Dpe,e.escapeComponent=Lpe,e.unescapeComponent=xa,Object.defineProperty(e,"__esModule",{value:!0})})});var U7=h(cL=>{"use strict";Object.defineProperty(cL,"__esModule",{value:!0});var M7=XP();M7.code='require("ajv/dist/runtime/uri").default';cL.default=M7});var dL=h(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.CodeGen=Qr.Name=Qr.nil=Qr.stringify=Qr.str=Qr._=Qr.KeywordCxt=void 0;var ZBe=jh();Object.defineProperty(Qr,"KeywordCxt",{enumerable:!0,get:function(){return ZBe.KeywordCxt}});var Uh=Oe();Object.defineProperty(Qr,"_",{enumerable:!0,get:function(){return Uh._}});Object.defineProperty(Qr,"str",{enumerable:!0,get:function(){return Uh.str}});Object.defineProperty(Qr,"stringify",{enumerable:!0,get:function(){return Uh.stringify}});Object.defineProperty(Qr,"nil",{enumerable:!0,get:function(){return Uh.nil}});Object.defineProperty(Qr,"Name",{enumerable:!0,get:function(){return Uh.Name}});Object.defineProperty(Qr,"CodeGen",{enumerable:!0,get:function(){return Uh.CodeGen}});var e3e=wy(),B7=Ty(),t3e=VD(),Ay=Ny(),r3e=Oe(),Ry=Oy(),QP=vy(),fL=Ve(),x7=L7(),n3e=U7(),G7=s((e,t)=>new RegExp(e,t),"defaultRegExp");G7.code="new RegExp";var i3e=["removeAdditional","useDefaults","coerceTypes"],s3e=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),o3e={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."},a3e={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},q7=200;function u3e(e){var t,r,n,i,o,a,u,c,l,f,d,_,m,g,y,b,E,S,O,I,w,j,F,K,H;let re=e.strict,de=(t=e.code)===null||t===void 0?void 0:t.optimize,te=de===!0||de===void 0?1:de||0,he=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:G7,Ce=(i=e.uriResolver)!==null&&i!==void 0?i:n3e.default;return{strictSchema:(a=(o=e.strictSchema)!==null&&o!==void 0?o:re)!==null&&a!==void 0?a:!0,strictNumbers:(c=(u=e.strictNumbers)!==null&&u!==void 0?u:re)!==null&&c!==void 0?c:!0,strictTypes:(f=(l=e.strictTypes)!==null&&l!==void 0?l:re)!==null&&f!==void 0?f:"log",strictTuples:(_=(d=e.strictTuples)!==null&&d!==void 0?d:re)!==null&&_!==void 0?_:"log",strictRequired:(g=(m=e.strictRequired)!==null&&m!==void 0?m:re)!==null&&g!==void 0?g:!1,code:e.code?{...e.code,optimize:te,regExp:he}:{optimize:te,regExp:he},loopRequired:(y=e.loopRequired)!==null&&y!==void 0?y:q7,loopEnum:(b=e.loopEnum)!==null&&b!==void 0?b:q7,meta:(E=e.meta)!==null&&E!==void 0?E:!0,messages:(S=e.messages)!==null&&S!==void 0?S:!0,inlineRefs:(O=e.inlineRefs)!==null&&O!==void 0?O:!0,schemaId:(I=e.schemaId)!==null&&I!==void 0?I:"$id",addUsedSchema:(w=e.addUsedSchema)!==null&&w!==void 0?w:!0,validateSchema:(j=e.validateSchema)!==null&&j!==void 0?j:!0,validateFormats:(F=e.validateFormats)!==null&&F!==void 0?F:!0,unicodeRegExp:(K=e.unicodeRegExp)!==null&&K!==void 0?K:!0,int32range:(H=e.int32range)!==null&&H!==void 0?H:!0,uriResolver:Ce}}s(u3e,"requiredOptions");var Cy=class{static{s(this,"Ajv")}constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...u3e(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new r3e.ValueScope({scope:{},prefixes:s3e,es5:r,lines:n}),this.logger=h3e(t.logger);let i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,t3e.getRules)(),F7.call(this,o3e,t,"NOT SUPPORTED"),F7.call(this,a3e,t,"DEPRECATED","warn"),this._metaOpts=d3e.call(this),t.formats&&l3e.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&f3e.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),c3e.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,i=x7;n==="id"&&(i={...x7},i.id=i.$id,delete i.$id),r&&t&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,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,t,r);async function i(f,d){await o.call(this,f.$schema);let _=this._addSchema(f,d);return _.validate||a.call(this,_)}async function o(f){f&&!this.getSchema(f)&&await i.call(this,{$ref:f},!0)}async function a(f){try{return this._compileSchemaEnv(f)}catch(d){if(!(d instanceof B7.default))throw d;return u.call(this,d),await c.call(this,d.missingSchema),a.call(this,f)}}function u({missingSchema:f,missingRef:d}){if(this.refs[f])throw new Error(`AnySchema ${f} is loaded but ${d} cannot be resolved`)}async function c(f){let d=await l.call(this,f);this.refs[f]||await o.call(this,d.$schema),this.refs[f]||this.addSchema(d,f,r)}async function l(f){let d=this._loading[f];if(d)return d;try{return await(this._loading[f]=n(f))}finally{delete this._loading[f]}}}addSchema(t,r,n,i=this.opts.validateSchema){if(Array.isArray(t)){for(let a of t)this.addSchema(a,void 0,n,i);return this}let o;if(typeof t=="object"){let{schemaId:a}=this.opts;if(o=t[a],o!==void 0&&typeof o!="string")throw new Error(`schema ${a} must be string`)}return r=(0,Ry.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,i,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$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,t);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(t){let r;for(;typeof(r=k7.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,i=new Ay.SchemaEnv({schema:{},schemaId:n});if(r=Ay.resolveSchema.call(this,i,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=k7.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,Ry.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,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(_3e.call(this,n,r),!r)return(0,fL.eachItem)(n,o=>lL.call(this,o)),this;y3e.call(this,r);let i={...r,type:(0,QP.getJSONTypes)(r.type),schemaType:(0,QP.getJSONTypes)(r.schemaType)};return(0,fL.eachItem)(n,i.type.length===0?o=>lL.call(this,o,i):o=>i.type.forEach(a=>lL.call(this,o,i,a))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===t);i>=0&&n.rules.splice(i,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let i of r){let o=i.split("/").slice(1),a=t;for(let u of o)a=a[u];for(let u in n){let c=n[u];if(typeof c!="object")continue;let{$data:l}=c.definition,f=a[u];l&&f&&(a[u]=V7(f))}}return t}_removeAllSchemas(t,r){for(let n in t){let i=t[n];(!r||r.test(n))&&(typeof i=="string"?delete t[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[n]))}}_addSchema(t,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let a,{schemaId:u}=this.opts;if(typeof t=="object")a=t[u];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;n=(0,Ry.normalizeId)(a||n);let l=Ry.getSchemaRefs.call(this,t,n);return c=new Ay.SchemaEnv({schema:t,schemaId:u,meta:r,baseId:n,localRefs:l}),this._cache.set(c.schema,c),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),i&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):Ay.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{Ay.compileSchema.call(this,t)}finally{this.opts=r}}};Qr.default=Cy;Cy.ValidationError=e3e.default;Cy.MissingRefError=B7.default;function F7(e,t,r,n="error"){for(let i in e){let o=i;o in t&&this.logger[n](`${r}: option ${i}. ${e[o]}`)}}s(F7,"checkOptions");function k7(e){return e=(0,Ry.normalizeId)(e),this.schemas[e]||this.refs[e]}s(k7,"getSchEnv");function c3e(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}s(c3e,"addInitialSchemas");function l3e(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}s(l3e,"addInitialFormats");function f3e(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}s(f3e,"addInitialKeywords");function d3e(){let e={...this.opts};for(let t of i3e)delete e[t];return e}s(d3e,"getMetaSchemaOptions");var p3e={log(){},warn(){},error(){}};function h3e(e){if(e===!1)return p3e;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}s(h3e,"getLogger");var m3e=/^[a-z_$][a-z0-9_$:-]*$/i;function _3e(e,t){let{RULES:r}=this;if((0,fL.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!m3e.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}s(_3e,"checkKeyword");function lL(e,t,r){var n;let i=t?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,a=i?o.post:o.rules.find(({type:c})=>c===r);if(a||(a={type:r,rules:[]},o.rules.push(a)),o.keywords[e]=!0,!t)return;let u={keyword:e,definition:{...t,type:(0,QP.getJSONTypes)(t.type),schemaType:(0,QP.getJSONTypes)(t.schemaType)}};t.before?g3e.call(this,a,u,t.before):a.rules.push(u),o.all[e]=u,(n=t.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}s(lL,"addRule");function g3e(e,t,r){let n=e.rules.findIndex(i=>i.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}s(g3e,"addBeforeRule");function y3e(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=V7(t)),e.validateSchema=this.compile(t,!0))}s(y3e,"keywordMetaschema");var E3e={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function V7(e){return{anyOf:[e,E3e]}}s(V7,"schemaOrData")});var z7=h(pL=>{"use strict";Object.defineProperty(pL,"__esModule",{value:!0});var b3e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};pL.default=b3e});var tI=h(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});Zf.callRef=Zf.getValidate=void 0;var S3e=Ty(),H7=hs(),yi=Oe(),xh=ps(),K7=Ny(),ZP=Ve(),v3e={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:o,validateName:a,opts:u,self:c}=n,{root:l}=o;if((r==="#"||r==="#/")&&i===l.baseId)return d();let f=K7.resolveRef.call(c,l,i,r);if(f===void 0)throw new S3e.default(n.opts.uriResolver,i,r);if(f instanceof K7.SchemaEnv)return _(f);return m(f);function d(){if(o===l)return eI(e,a,o,o.$async);let g=t.scopeValue("root",{ref:l});return eI(e,(0,yi._)`${g}.validate`,l,l.$async)}function _(g){let y=W7(e,g);eI(e,y,g,g.$async)}function m(g){let y=t.scopeValue("schema",u.code.source===!0?{ref:g,code:(0,yi.stringify)(g)}:{ref:g}),b=t.name("valid"),E=e.subschema({schema:g,dataTypes:[],schemaPath:yi.nil,topSchemaRef:y,errSchemaPath:r},b);e.mergeEvaluated(E),e.ok(b)}}};function W7(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,yi._)`${r.scopeValue("wrapper",{ref:t})}.validate`}s(W7,"getValidate");Zf.getValidate=W7;function eI(e,t,r,n){let{gen:i,it:o}=e,{allErrors:a,schemaEnv:u,opts:c}=o,l=c.passContext?xh.default.this:yi.nil;n?f():d();function f(){if(!u.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,yi._)`await ${(0,H7.callValidateCode)(e,t,l)}`),m(t),a||i.assign(g,!0)},y=>{i.if((0,yi._)`!(${y} instanceof ${o.ValidationError})`,()=>i.throw(y)),_(y),a||i.assign(g,!1)}),e.ok(g)}s(f,"callAsyncRef");function d(){e.result((0,H7.callValidateCode)(e,t,l),()=>m(t),()=>_(t))}s(d,"callSyncRef");function _(g){let y=(0,yi._)`${g}.errors`;i.assign(xh.default.vErrors,(0,yi._)`${xh.default.vErrors} === null ? ${y} : ${xh.default.vErrors}.concat(${y})`),i.assign(xh.default.errors,(0,yi._)`${xh.default.vErrors}.length`)}s(_,"addErrorsFrom");function m(g){var y;if(!o.opts.unevaluated)return;let b=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(b&&!b.dynamicProps)b.props!==void 0&&(o.props=ZP.mergeEvaluated.props(i,b.props,o.props));else{let E=i.var("props",(0,yi._)`${g}.evaluated.props`);o.props=ZP.mergeEvaluated.props(i,E,o.props,yi.Name)}if(o.items!==!0)if(b&&!b.dynamicItems)b.items!==void 0&&(o.items=ZP.mergeEvaluated.items(i,b.items,o.items));else{let E=i.var("items",(0,yi._)`${g}.evaluated.items`);o.items=ZP.mergeEvaluated.items(i,E,o.items,yi.Name)}}s(m,"addEvaluatedFrom")}s(eI,"callRef");Zf.callRef=eI;Zf.default=v3e});var mL=h(hL=>{"use strict";Object.defineProperty(hL,"__esModule",{value:!0});var O3e=z7(),P3e=tI(),I3e=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",O3e.default,P3e.default];hL.default=I3e});var Y7=h(_L=>{"use strict";Object.defineProperty(_L,"__esModule",{value:!0});var rI=Oe(),vc=rI.operators,nI={maximum:{okStr:"<=",ok:vc.LTE,fail:vc.GT},minimum:{okStr:">=",ok:vc.GTE,fail:vc.LT},exclusiveMaximum:{okStr:"<",ok:vc.LT,fail:vc.GTE},exclusiveMinimum:{okStr:">",ok:vc.GT,fail:vc.LTE}},w3e={message:({keyword:e,schemaCode:t})=>(0,rI.str)`must be ${nI[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,rI._)`{comparison: ${nI[e].okStr}, limit: ${t}}`},T3e={keyword:Object.keys(nI),type:"number",schemaType:"number",$data:!0,error:w3e,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,rI._)`${r} ${nI[t].fail} ${n} || isNaN(${r})`)}};_L.default=T3e});var J7=h(gL=>{"use strict";Object.defineProperty(gL,"__esModule",{value:!0});var $y=Oe(),N3e={message:({schemaCode:e})=>(0,$y.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,$y._)`{multipleOf: ${e}}`},A3e={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:N3e,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,o=i.opts.multipleOfPrecision,a=t.let("res"),u=o?(0,$y._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,$y._)`${a} !== parseInt(${a})`;e.fail$data((0,$y._)`(${n} === 0 || (${a} = ${r}/${n}, ${u}))`)}};gL.default=A3e});var Q7=h(yL=>{"use strict";Object.defineProperty(yL,"__esModule",{value:!0});function X7(e){let t=e.length,r=0,n=0,i;for(;n<t;)r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t&&(i=e.charCodeAt(n),(i&64512)===56320&&n++);return r}s(X7,"ucs2length");yL.default=X7;X7.code='require("ajv/dist/runtime/ucs2length").default'});var Z7=h(EL=>{"use strict";Object.defineProperty(EL,"__esModule",{value:!0});var ed=Oe(),R3e=Ve(),C3e=Q7(),$3e={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,ed.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,ed._)`{limit: ${e}}`},D3e={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:$3e,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,o=t==="maxLength"?ed.operators.GT:ed.operators.LT,a=i.opts.unicode===!1?(0,ed._)`${r}.length`:(0,ed._)`${(0,R3e.useFunc)(e.gen,C3e.default)}(${r})`;e.fail$data((0,ed._)`${a} ${o} ${n}`)}};EL.default=D3e});var eW=h(bL=>{"use strict";Object.defineProperty(bL,"__esModule",{value:!0});var L3e=hs(),iI=Oe(),j3e={message:({schemaCode:e})=>(0,iI.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,iI._)`{pattern: ${e}}`},M3e={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:j3e,code(e){let{data:t,$data:r,schema:n,schemaCode:i,it:o}=e,a=o.opts.unicodeRegExp?"u":"",u=r?(0,iI._)`(new RegExp(${i}, ${a}))`:(0,L3e.usePattern)(e,n);e.fail$data((0,iI._)`!${u}.test(${t})`)}};bL.default=M3e});var tW=h(SL=>{"use strict";Object.defineProperty(SL,"__esModule",{value:!0});var Dy=Oe(),U3e={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,Dy.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Dy._)`{limit: ${e}}`},x3e={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:U3e,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?Dy.operators.GT:Dy.operators.LT;e.fail$data((0,Dy._)`Object.keys(${r}).length ${i} ${n}`)}};SL.default=x3e});var rW=h(vL=>{"use strict";Object.defineProperty(vL,"__esModule",{value:!0});var Ly=hs(),jy=Oe(),q3e=Ve(),F3e={message:({params:{missingProperty:e}})=>(0,jy.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,jy._)`{missingProperty: ${e}}`},k3e={keyword:"required",type:"object",schemaType:"array",$data:!0,error:F3e,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:o,it:a}=e,{opts:u}=a;if(!o&&r.length===0)return;let c=r.length>=u.loopRequired;if(a.allErrors?l():f(),u.strictRequired){let m=e.parentSchema.properties,{definedProperties:g}=e.it;for(let y of r)if(m?.[y]===void 0&&!g.has(y)){let b=a.schemaEnv.baseId+a.errSchemaPath,E=`required property "${y}" is not defined at "${b}" (strictRequired)`;(0,q3e.checkStrictMode)(a,E,a.opts.strictRequired)}}function l(){if(c||o)e.block$data(jy.nil,d);else for(let m of r)(0,Ly.checkReportMissingProp)(e,m)}s(l,"allErrorsMode");function f(){let m=t.let("missing");if(c||o){let g=t.let("valid",!0);e.block$data(g,()=>_(m,g)),e.ok(g)}else t.if((0,Ly.checkMissingProp)(e,r,m)),(0,Ly.reportMissingProp)(e,m),t.else()}s(f,"exitOnErrorMode");function d(){t.forOf("prop",n,m=>{e.setParams({missingProperty:m}),t.if((0,Ly.noPropertyInData)(t,i,m,u.ownProperties),()=>e.error())})}s(d,"loopAllRequired");function _(m,g){e.setParams({missingProperty:m}),t.forOf(m,n,()=>{t.assign(g,(0,Ly.propertyInData)(t,i,m,u.ownProperties)),t.if((0,jy.not)(g),()=>{e.error(),t.break()})},jy.nil)}s(_,"loopUntilMissing")}};vL.default=k3e});var nW=h(OL=>{"use strict";Object.defineProperty(OL,"__esModule",{value:!0});var My=Oe(),B3e={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,My.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,My._)`{limit: ${e}}`},G3e={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:B3e,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?My.operators.GT:My.operators.LT;e.fail$data((0,My._)`${r}.length ${i} ${n}`)}};OL.default=G3e});var sI=h(PL=>{"use strict";Object.defineProperty(PL,"__esModule",{value:!0});var iW=Xf();iW.code='require("ajv/dist/runtime/equal").default';PL.default=iW});var sW=h(wL=>{"use strict";Object.defineProperty(wL,"__esModule",{value:!0});var IL=vy(),Zr=Oe(),V3e=Ve(),z3e=sI(),H3e={message:({params:{i:e,j:t}})=>(0,Zr.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Zr._)`{i: ${e}, j: ${t}}`},K3e={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:H3e,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:o,schemaCode:a,it:u}=e;if(!n&&!i)return;let c=t.let("valid"),l=o.items?(0,IL.getSchemaTypes)(o.items):[];e.block$data(c,f,(0,Zr._)`${a} === false`),e.ok(c);function f(){let g=t.let("i",(0,Zr._)`${r}.length`),y=t.let("j");e.setParams({i:g,j:y}),t.assign(c,!0),t.if((0,Zr._)`${g} > 1`,()=>(d()?_:m)(g,y))}s(f,"validateUniqueItems");function d(){return l.length>0&&!l.some(g=>g==="object"||g==="array")}s(d,"canOptimize");function _(g,y){let b=t.name("item"),E=(0,IL.checkDataTypes)(l,b,u.opts.strictNumbers,IL.DataType.Wrong),S=t.const("indices",(0,Zr._)`{}`);t.for((0,Zr._)`;${g}--;`,()=>{t.let(b,(0,Zr._)`${r}[${g}]`),t.if(E,(0,Zr._)`continue`),l.length>1&&t.if((0,Zr._)`typeof ${b} == "string"`,(0,Zr._)`${b} += "_"`),t.if((0,Zr._)`typeof ${S}[${b}] == "number"`,()=>{t.assign(y,(0,Zr._)`${S}[${b}]`),e.error(),t.assign(c,!1).break()}).code((0,Zr._)`${S}[${b}] = ${g}`)})}s(_,"loopN");function m(g,y){let b=(0,V3e.useFunc)(t,z3e.default),E=t.name("outer");t.label(E).for((0,Zr._)`;${g}--;`,()=>t.for((0,Zr._)`${y} = ${g}; ${y}--;`,()=>t.if((0,Zr._)`${b}(${r}[${g}], ${r}[${y}])`,()=>{e.error(),t.assign(c,!1).break(E)})))}s(m,"loopN2")}};wL.default=K3e});var oW=h(NL=>{"use strict";Object.defineProperty(NL,"__esModule",{value:!0});var TL=Oe(),W3e=Ve(),Y3e=sI(),J3e={message:"must be equal to constant",params:({schemaCode:e})=>(0,TL._)`{allowedValue: ${e}}`},X3e={keyword:"const",$data:!0,error:J3e,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:o}=e;n||o&&typeof o=="object"?e.fail$data((0,TL._)`!${(0,W3e.useFunc)(t,Y3e.default)}(${r}, ${i})`):e.fail((0,TL._)`${o} !== ${r}`)}};NL.default=X3e});var aW=h(AL=>{"use strict";Object.defineProperty(AL,"__esModule",{value:!0});var Uy=Oe(),Q3e=Ve(),Z3e=sI(),e4e={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Uy._)`{allowedValues: ${e}}`},t4e={keyword:"enum",schemaType:"array",$data:!0,error:e4e,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:o,it:a}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let u=i.length>=a.opts.loopEnum,c,l=s(()=>c??(c=(0,Q3e.useFunc)(t,Z3e.default)),"getEql"),f;if(u||n)f=t.let("valid"),e.block$data(f,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=t.const("vSchema",o);f=(0,Uy.or)(...i.map((g,y)=>_(m,y)))}e.pass(f);function d(){t.assign(f,!1),t.forOf("v",o,m=>t.if((0,Uy._)`${l()}(${r}, ${m})`,()=>t.assign(f,!0).break()))}s(d,"loopEnum");function _(m,g){let y=i[g];return typeof y=="object"&&y!==null?(0,Uy._)`${l()}(${r}, ${m}[${g}])`:(0,Uy._)`${r} === ${y}`}s(_,"equalCode")}};AL.default=t4e});var CL=h(RL=>{"use strict";Object.defineProperty(RL,"__esModule",{value:!0});var r4e=Y7(),n4e=J7(),i4e=Z7(),s4e=eW(),o4e=tW(),a4e=rW(),u4e=nW(),c4e=sW(),l4e=oW(),f4e=aW(),d4e=[r4e.default,n4e.default,i4e.default,s4e.default,o4e.default,a4e.default,u4e.default,c4e.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},l4e.default,f4e.default];RL.default=d4e});var DL=h(xy=>{"use strict";Object.defineProperty(xy,"__esModule",{value:!0});xy.validateAdditionalItems=void 0;var td=Oe(),$L=Ve(),p4e={message:({params:{len:e}})=>(0,td.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,td._)`{limit: ${e}}`},h4e={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:p4e,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,$L.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}uW(e,n)}};function uW(e,t){let{gen:r,schema:n,data:i,keyword:o,it:a}=e;a.items=!0;let u=r.const("len",(0,td._)`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,td._)`${u} <= ${t.length}`);else if(typeof n=="object"&&!(0,$L.alwaysValidSchema)(a,n)){let l=r.var("valid",(0,td._)`${u} <= ${t.length}`);r.if((0,td.not)(l),()=>c(l)),e.ok(l)}function c(l){r.forRange("i",t.length,u,f=>{e.subschema({keyword:o,dataProp:f,dataPropType:$L.Type.Num},l),a.allErrors||r.if((0,td.not)(l),()=>r.break())})}s(c,"validateItems")}s(uW,"validateAdditionalItems");xy.validateAdditionalItems=uW;xy.default=h4e});var LL=h(qy=>{"use strict";Object.defineProperty(qy,"__esModule",{value:!0});qy.validateTuple=void 0;var cW=Oe(),oI=Ve(),m4e=hs(),_4e={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return lW(e,"additionalItems",t);r.items=!0,!(0,oI.alwaysValidSchema)(r,t)&&e.ok((0,m4e.validateArray)(e))}};function lW(e,t,r=e.schema){let{gen:n,parentSchema:i,data:o,keyword:a,it:u}=e;f(i),u.opts.unevaluated&&r.length&&u.items!==!0&&(u.items=oI.mergeEvaluated.items(n,r.length,u.items));let c=n.name("valid"),l=n.const("len",(0,cW._)`${o}.length`);r.forEach((d,_)=>{(0,oI.alwaysValidSchema)(u,d)||(n.if((0,cW._)`${l} > ${_}`,()=>e.subschema({keyword:a,schemaProp:_,dataProp:_},c)),e.ok(c))});function f(d){let{opts:_,errSchemaPath:m}=u,g=r.length,y=g===d.minItems&&(g===d.maxItems||d[t]===!1);if(_.strictTuples&&!y){let b=`"${a}" is ${g}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,oI.checkStrictMode)(u,b,_.strictTuples)}}s(f,"checkStrictTuple")}s(lW,"validateTuple");qy.validateTuple=lW;qy.default=_4e});var fW=h(jL=>{"use strict";Object.defineProperty(jL,"__esModule",{value:!0});var g4e=LL(),y4e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,g4e.validateTuple)(e,"items")};jL.default=y4e});var pW=h(ML=>{"use strict";Object.defineProperty(ML,"__esModule",{value:!0});var dW=Oe(),E4e=Ve(),b4e=hs(),S4e=DL(),v4e={message:({params:{len:e}})=>(0,dW.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,dW._)`{limit: ${e}}`},O4e={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:v4e,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,E4e.alwaysValidSchema)(n,t)&&(i?(0,S4e.validateAdditionalItems)(e,i):e.ok((0,b4e.validateArray)(e)))}};ML.default=O4e});var hW=h(UL=>{"use strict";Object.defineProperty(UL,"__esModule",{value:!0});var _s=Oe(),aI=Ve(),P4e={message:({params:{min:e,max:t}})=>t===void 0?(0,_s.str)`must contain at least ${e} valid item(s)`:(0,_s.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,_s._)`{minContains: ${e}}`:(0,_s._)`{minContains: ${e}, maxContains: ${t}}`},I4e={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:P4e,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e,a,u,{minContains:c,maxContains:l}=n;o.opts.next?(a=c===void 0?1:c,u=l):a=1;let f=t.const("len",(0,_s._)`${i}.length`);if(e.setParams({min:a,max:u}),u===void 0&&a===0){(0,aI.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(u!==void 0&&a>u){(0,aI.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,aI.alwaysValidSchema)(o,r)){let y=(0,_s._)`${f} >= ${a}`;u!==void 0&&(y=(0,_s._)`${y} && ${f} <= ${u}`),e.pass(y);return}o.items=!0;let d=t.name("valid");u===void 0&&a===1?m(d,()=>t.if(d,()=>t.break())):a===0?(t.let(d,!0),u!==void 0&&t.if((0,_s._)`${i}.length > 0`,_)):(t.let(d,!1),_()),e.result(d,()=>e.reset());function _(){let y=t.name("_valid"),b=t.let("count",0);m(y,()=>t.if(y,()=>g(b)))}s(_,"validateItemsWithCount");function m(y,b){t.forRange("i",0,f,E=>{e.subschema({keyword:"contains",dataProp:E,dataPropType:aI.Type.Num,compositeRule:!0},y),b()})}s(m,"validateItems");function g(y){t.code((0,_s._)`${y}++`),u===void 0?t.if((0,_s._)`${y} >= ${a}`,()=>t.assign(d,!0).break()):(t.if((0,_s._)`${y} > ${u}`,()=>t.assign(d,!1).break()),a===1?t.assign(d,!0):t.if((0,_s._)`${y} >= ${a}`,()=>t.assign(d,!0)))}s(g,"checkLimits")}};UL.default=I4e});var uI=h(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});ia.validateSchemaDeps=ia.validatePropertyDeps=ia.error=void 0;var xL=Oe(),w4e=Ve(),Fy=hs();ia.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,xL.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,xL._)`{property: ${e},
|
|
138
|
+
|| ${a} === "boolean" || ${i} === null`).assign(u,(0,Te._)`[${i}]`)}}s(c,"coerceSpecificType")}s(Uke,"coerceData");function xke({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,Te._)`${t} !== undefined`,()=>e.assign((0,Te._)`${t}[${r}]`,n))}s(xke,"assignParentData");function HD(e,t,r,n=Sy.Correct){let i=n===Sy.Correct?Te.operators.EQ:Te.operators.NEQ,o;switch(e){case"null":return(0,Te._)`${t} ${i} null`;case"array":o=(0,Te._)`Array.isArray(${t})`;break;case"object":o=(0,Te._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a((0,Te._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return(0,Te._)`typeof ${t} ${i} ${e}`}return n===Sy.Correct?o:(0,Te.not)(o);function a(u=Te.nil){return(0,Te.and)((0,Te._)`typeof ${t} == "number"`,u,r?(0,Te._)`isFinite(${t})`:Te.nil)}}s(HD,"checkDataType");Xr.checkDataType=HD;function KD(e,t,r,n){if(e.length===1)return HD(e[0],t,r,n);let i,o=(0,t7.toHash)(e);if(o.array&&o.object){let a=(0,Te._)`typeof ${t} != "object"`;i=o.null?a:(0,Te._)`!${t} || ${a}`,delete o.null,delete o.array,delete o.object}else i=Te.nil;o.number&&delete o.integer;for(let a in o)i=(0,Te.and)(i,HD(a,t,r,n));return i}s(KD,"checkDataTypes");Xr.checkDataTypes=KD;var qke={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,Te._)`{type: ${e}}`:(0,Te._)`{type: ${t}}`};function WD(e){let t=Fke(e);(0,Dke.reportError)(t,qke)}s(WD,"reportTypeError");Xr.reportTypeError=WD;function Fke(e){let{gen:t,data:r,schema:n}=e,i=(0,t7.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}s(Fke,"getTypeErrorContext")});var s7=h(VP=>{"use strict";Object.defineProperty(VP,"__esModule",{value:!0});VP.assignDefaults=void 0;var Dh=Oe(),kke=Ve();function Bke(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)i7(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,o)=>i7(e,o,i.default))}s(Bke,"assignDefaults");VP.assignDefaults=Bke;function i7(e,t,r){let{gen:n,compositeRule:i,data:o,opts:a}=e;if(r===void 0)return;let u=(0,Dh._)`${o}${(0,Dh.getProperty)(t)}`;if(i){(0,kke.checkStrictMode)(e,`default is ignored for: ${u}`);return}let c=(0,Dh._)`${u} === undefined`;a.useDefaults==="empty"&&(c=(0,Dh._)`${c} || ${u} === null || ${u} === ""`),n.if(c,(0,Dh._)`${u} = ${(0,Dh.stringify)(r)}`)}s(i7,"assignDefault")});var hs=h(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.validateUnion=Rt.validateArray=Rt.usePattern=Rt.callValidateCode=Rt.schemaProperties=Rt.allSchemaProperties=Rt.noPropertyInData=Rt.propertyInData=Rt.isOwnProperty=Rt.hasPropFunc=Rt.reportMissingProp=Rt.checkMissingProp=Rt.checkReportMissingProp=void 0;var Bt=Oe(),YD=Ve(),yc=ps(),Gke=Ve();function Vke(e,t){let{gen:r,data:n,it:i}=e;r.if(XD(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Bt._)`${t}`},!0),e.error()})}s(Vke,"checkReportMissingProp");Rt.checkReportMissingProp=Vke;function zke({gen:e,data:t,it:{opts:r}},n,i){return(0,Bt.or)(...n.map(o=>(0,Bt.and)(XD(e,t,o,r.ownProperties),(0,Bt._)`${i} = ${o}`)))}s(zke,"checkMissingProp");Rt.checkMissingProp=zke;function Hke(e,t){e.setParams({missingProperty:t},!0),e.error()}s(Hke,"reportMissingProp");Rt.reportMissingProp=Hke;function o7(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Bt._)`Object.prototype.hasOwnProperty`})}s(o7,"hasPropFunc");Rt.hasPropFunc=o7;function JD(e,t,r){return(0,Bt._)`${o7(e)}.call(${t}, ${r})`}s(JD,"isOwnProperty");Rt.isOwnProperty=JD;function Kke(e,t,r,n){let i=(0,Bt._)`${t}${(0,Bt.getProperty)(r)} !== undefined`;return n?(0,Bt._)`${i} && ${JD(e,t,r)}`:i}s(Kke,"propertyInData");Rt.propertyInData=Kke;function XD(e,t,r,n){let i=(0,Bt._)`${t}${(0,Bt.getProperty)(r)} === undefined`;return n?(0,Bt.or)(i,(0,Bt.not)(JD(e,t,r))):i}s(XD,"noPropertyInData");Rt.noPropertyInData=XD;function a7(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}s(a7,"allSchemaProperties");Rt.allSchemaProperties=a7;function Wke(e,t){return a7(t).filter(r=>!(0,YD.alwaysValidSchema)(e,t[r]))}s(Wke,"schemaProperties");Rt.schemaProperties=Wke;function Yke({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:a},u,c,l){let f=l?(0,Bt._)`${e}, ${t}, ${n}${i}`:t,d=[[yc.default.instancePath,(0,Bt.strConcat)(yc.default.instancePath,o)],[yc.default.parentData,a.parentData],[yc.default.parentDataProperty,a.parentDataProperty],[yc.default.rootData,yc.default.rootData]];a.opts.dynamicRef&&d.push([yc.default.dynamicAnchors,yc.default.dynamicAnchors]);let _=(0,Bt._)`${f}, ${r.object(...d)}`;return c!==Bt.nil?(0,Bt._)`${u}.call(${c}, ${_})`:(0,Bt._)`${u}(${_})`}s(Yke,"callValidateCode");Rt.callValidateCode=Yke;var Jke=(0,Bt._)`new RegExp`;function Xke({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,o=i(r,n);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,Bt._)`${i.code==="new RegExp"?Jke:(0,Gke.useFunc)(e,i)}(${r}, ${n})`})}s(Xke,"usePattern");Rt.usePattern=Xke;function Qke(e){let{gen:t,data:r,keyword:n,it:i}=e,o=t.name("valid");if(i.allErrors){let u=t.let("valid",!0);return a(()=>t.assign(u,!1)),u}return t.var(o,!0),a(()=>t.break()),o;function a(u){let c=t.const("len",(0,Bt._)`${r}.length`);t.forRange("i",0,c,l=>{e.subschema({keyword:n,dataProp:l,dataPropType:YD.Type.Num},o),t.if((0,Bt.not)(o),u)})}s(a,"validateItems")}s(Qke,"validateArray");Rt.validateArray=Qke;function Zke(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,YD.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let a=t.let("valid",!1),u=t.name("_valid");t.block(()=>r.forEach((c,l)=>{let f=e.subschema({keyword:n,schemaProp:l,compositeRule:!0},u);t.assign(a,(0,Bt._)`${a} || ${u}`),e.mergeValidEvaluated(f,u)||t.if((0,Bt.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}s(Zke,"validateUnion");Rt.validateUnion=Zke});var l7=h(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});ra.validateKeywordUsage=ra.validSchemaType=ra.funcKeywordCode=ra.macroKeywordCode=void 0;var kn=Oe(),Jf=ps(),eBe=hs(),tBe=by();function rBe(e,t){let{gen:r,keyword:n,schema:i,parentSchema:o,it:a}=e,u=t.macro.call(a.self,i,o,a),c=c7(r,n,u);a.opts.validateSchema!==!1&&a.self.validateSchema(u,!0);let l=r.name("valid");e.subschema({schema:u,schemaPath:kn.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}s(rBe,"macroKeywordCode");ra.macroKeywordCode=rBe;function nBe(e,t){var r;let{gen:n,keyword:i,schema:o,parentSchema:a,$data:u,it:c}=e;sBe(c,t);let l=!u&&t.compile?t.compile.call(c.self,o,a,c):t.validate,f=c7(n,i,l),d=n.let("valid");e.block$data(d,_),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function _(){if(t.errors===!1)y(),t.modifying&&u7(e),b(()=>e.error());else{let E=t.async?m():g();t.modifying&&u7(e),b(()=>iBe(e,E))}}s(_,"validateKeyword");function m(){let E=n.let("ruleErrs",null);return n.try(()=>y((0,kn._)`await `),v=>n.assign(d,!1).if((0,kn._)`${v} instanceof ${c.ValidationError}`,()=>n.assign(E,(0,kn._)`${v}.errors`),()=>n.throw(v))),E}s(m,"validateAsync");function g(){let E=(0,kn._)`${f}.errors`;return n.assign(E,null),y(kn.nil),E}s(g,"validateSync");function y(E=t.async?(0,kn._)`await `:kn.nil){let v=c.opts.passContext?Jf.default.this:Jf.default.self,O=!("compile"in t&&!u||t.schema===!1);n.assign(d,(0,kn._)`${E}${(0,eBe.callValidateCode)(e,f,v,O)}`,t.modifying)}s(y,"assignValid");function b(E){var v;n.if((0,kn.not)((v=t.valid)!==null&&v!==void 0?v:d),E)}s(b,"reportErrs")}s(nBe,"funcKeywordCode");ra.funcKeywordCode=nBe;function u7(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,kn._)`${n.parentData}[${n.parentDataProperty}]`))}s(u7,"modifyData");function iBe(e,t){let{gen:r}=e;r.if((0,kn._)`Array.isArray(${t})`,()=>{r.assign(Jf.default.vErrors,(0,kn._)`${Jf.default.vErrors} === null ? ${t} : ${Jf.default.vErrors}.concat(${t})`).assign(Jf.default.errors,(0,kn._)`${Jf.default.vErrors}.length`),(0,tBe.extendErrors)(e)},()=>e.error())}s(iBe,"addErrs");function sBe({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}s(sBe,"checkAsyncKeyword");function c7(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,kn.stringify)(r)})}s(c7,"useKeyword");function oBe(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}s(oBe,"validSchemaType");ra.validSchemaType=oBe;function aBe({schema:e,opts:t,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 a=i.dependencies;if(a?.some(u=>!Object.prototype.hasOwnProperty.call(e,u)))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){let c=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}s(aBe,"validateKeywordUsage");ra.validateKeywordUsage=aBe});var d7=h(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});Ec.extendSubschemaMode=Ec.extendSubschemaData=Ec.getSubschema=void 0;var na=Oe(),f7=Ve();function uBe(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:a}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let u=e.schema[t];return r===void 0?{schema:u,schemaPath:(0,na._)`${e.schemaPath}${(0,na.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:u[r],schemaPath:(0,na._)`${e.schemaPath}${(0,na.getProperty)(t)}${(0,na.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,f7.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}s(uBe,"getSubschema");Ec.getSubschema=uBe;function cBe(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:a}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:u}=t;if(r!==void 0){let{errorPath:l,dataPathArr:f,opts:d}=t,_=u.let("data",(0,na._)`${t.data}${(0,na.getProperty)(r)}`,!0);c(_),e.errorPath=(0,na.str)`${l}${(0,f7.getErrorPath)(r,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,na._)`${r}`,e.dataPathArr=[...f,e.parentDataProperty]}if(i!==void 0){let l=i instanceof na.Name?i:u.let("data",i,!0);c(l),a!==void 0&&(e.propertyName=a)}o&&(e.dataTypes=o);function c(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}s(c,"dataContextProps")}s(cBe,"extendSubschemaData");Ec.extendSubschemaData=cBe;function lBe(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),o!==void 0&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}s(lBe,"extendSubschemaMode");Ec.extendSubschemaMode=lBe});var Xf=h((TNt,p7)=>{"use strict";p7.exports=s(function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),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 a=o[i];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r},"equal")});var HP=h((ANt,h7)=>{"use strict";var bc=h7.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};zP(t,n,i,e,"",e)};bc.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};bc.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};bc.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};bc.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 zP(e,t,r,n,i,o,a,u,c,l){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,i,o,a,u,c,l);for(var f in n){var d=n[f];if(Array.isArray(d)){if(f in bc.arrayKeywords)for(var _=0;_<d.length;_++)zP(e,t,r,d[_],i+"/"+f+"/"+_,o,i,f,n,_)}else if(f in bc.propsKeywords){if(d&&typeof d=="object")for(var m in d)zP(e,t,r,d[m],i+"/"+f+"/"+fBe(m),o,i,f,n,m)}else(f in bc.keywords||e.allKeys&&!(f in bc.skipKeywords))&&zP(e,t,r,d,i+"/"+f,o,i,f,n)}r(n,i,o,a,u,c,l)}}s(zP,"_traverse");function fBe(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}s(fBe,"escapeJsonPtr")});var Oy=h(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.getSchemaRefs=gi.resolveUrl=gi.normalizeId=gi._getFullPath=gi.getFullPath=gi.inlineRef=void 0;var dBe=Ve(),pBe=Xf(),hBe=HP(),mBe=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function _Be(e,t=!0){return typeof e=="boolean"?!0:t===!0?!QD(e):t?m7(e)<=t:!1}s(_Be,"inlineRef");gi.inlineRef=_Be;var gBe=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function QD(e){for(let t in e){if(gBe.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(QD)||typeof r=="object"&&QD(r))return!0}return!1}s(QD,"hasRef");function m7(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!mBe.has(r)&&(typeof e[r]=="object"&&(0,dBe.eachItem)(e[r],n=>t+=m7(n)),t===1/0))return 1/0}return t}s(m7,"countKeys");function _7(e,t="",r){r!==!1&&(t=Lh(t));let n=e.parse(t);return g7(e,n)}s(_7,"getFullPath");gi.getFullPath=_7;function g7(e,t){return e.serialize(t).split("#")[0]+"#"}s(g7,"_getFullPath");gi._getFullPath=g7;var yBe=/#\/?$/;function Lh(e){return e?e.replace(yBe,""):""}s(Lh,"normalizeId");gi.normalizeId=Lh;function EBe(e,t,r){return r=Lh(r),e.resolve(t,r)}s(EBe,"resolveUrl");gi.resolveUrl=EBe;var bBe=/^[a-z_][-a-z0-9._]*$/i;function SBe(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=Lh(e[r]||t),o={"":i},a=_7(n,i,!1),u={},c=new Set;return hBe(e,{allKeys:!0},(d,_,m,g)=>{if(g===void 0)return;let y=a+_,b=o[g];typeof d[r]=="string"&&(b=E.call(this,d[r])),v.call(this,d.$anchor),v.call(this,d.$dynamicAnchor),o[_]=b;function E(O){let I=this.opts.uriResolver.resolve;if(O=Lh(b?I(b,O):O),c.has(O))throw f(O);c.add(O);let w=this.refs[O];return typeof w=="string"&&(w=this.refs[w]),typeof w=="object"?l(d,w.schema,O):O!==Lh(y)&&(O[0]==="#"?(l(d,u[O],O),u[O]=d):this.refs[O]=y),O}s(E,"addRef");function v(O){if(typeof O=="string"){if(!bBe.test(O))throw new Error(`invalid anchor "${O}"`);E.call(this,`#${O}`)}}s(v,"addAnchor")}),u;function l(d,_,m){if(_!==void 0&&!pBe(d,_))throw f(m)}s(l,"checkAmbiguosRef");function f(d){return new Error(`reference "${d}" resolves to more than one schema`)}s(f,"ambiguos")}s(SBe,"getSchemaRefs");gi.getSchemaRefs=SBe});var jh=h(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});Sc.getData=Sc.KeywordCxt=Sc.validateFunctionCode=void 0;var v7=Q9(),y7=vy(),eL=zD(),KP=vy(),vBe=s7(),Iy=l7(),ZD=d7(),ae=Oe(),Ee=ps(),OBe=Oy(),uu=Ve(),Py=by();function PBe(e){if(I7(e)&&(w7(e),P7(e))){TBe(e);return}O7(e,()=>(0,v7.topBoolOrEmptySchema)(e))}s(PBe,"validateFunctionCode");Sc.validateFunctionCode=PBe;function O7({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,(0,ae._)`${Ee.default.data}, ${Ee.default.valCxt}`,n.$async,()=>{e.code((0,ae._)`"use strict"; ${E7(r,i)}`),wBe(e,i),e.code(o)}):e.func(t,(0,ae._)`${Ee.default.data}, ${IBe(i)}`,n.$async,()=>e.code(E7(r,i)).code(o))}s(O7,"validateFunction");function IBe(e){return(0,ae._)`{${Ee.default.instancePath}="", ${Ee.default.parentData}, ${Ee.default.parentDataProperty}, ${Ee.default.rootData}=${Ee.default.data}${e.dynamicRef?(0,ae._)`, ${Ee.default.dynamicAnchors}={}`:ae.nil}}={}`}s(IBe,"destructureValCxt");function wBe(e,t){e.if(Ee.default.valCxt,()=>{e.var(Ee.default.instancePath,(0,ae._)`${Ee.default.valCxt}.${Ee.default.instancePath}`),e.var(Ee.default.parentData,(0,ae._)`${Ee.default.valCxt}.${Ee.default.parentData}`),e.var(Ee.default.parentDataProperty,(0,ae._)`${Ee.default.valCxt}.${Ee.default.parentDataProperty}`),e.var(Ee.default.rootData,(0,ae._)`${Ee.default.valCxt}.${Ee.default.rootData}`),t.dynamicRef&&e.var(Ee.default.dynamicAnchors,(0,ae._)`${Ee.default.valCxt}.${Ee.default.dynamicAnchors}`)},()=>{e.var(Ee.default.instancePath,(0,ae._)`""`),e.var(Ee.default.parentData,(0,ae._)`undefined`),e.var(Ee.default.parentDataProperty,(0,ae._)`undefined`),e.var(Ee.default.rootData,Ee.default.data),t.dynamicRef&&e.var(Ee.default.dynamicAnchors,(0,ae._)`{}`)})}s(wBe,"destructureValCxtES5");function TBe(e){let{schema:t,opts:r,gen:n}=e;O7(e,()=>{r.$comment&&t.$comment&&N7(e),$Be(e),n.let(Ee.default.vErrors,null),n.let(Ee.default.errors,0),r.unevaluated&&NBe(e),T7(e),jBe(e)})}s(TBe,"topSchemaObjCode");function NBe(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,ae._)`${r}.evaluated`),t.if((0,ae._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,ae._)`${e.evaluated}.props`,(0,ae._)`undefined`)),t.if((0,ae._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,ae._)`${e.evaluated}.items`,(0,ae._)`undefined`))}s(NBe,"resetEvaluated");function E7(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,ae._)`/*# sourceURL=${r} */`:ae.nil}s(E7,"funcSourceUrl");function ABe(e,t){if(I7(e)&&(w7(e),P7(e))){RBe(e,t);return}(0,v7.boolOrEmptySchema)(e,t)}s(ABe,"subschemaCode");function P7({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}s(P7,"schemaCxtHasRules");function I7(e){return typeof e.schema!="boolean"}s(I7,"isSchemaObj");function RBe(e,t){let{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&N7(e),DBe(e),LBe(e);let o=n.const("_errs",Ee.default.errors);T7(e,o),n.var(t,(0,ae._)`${o} === ${Ee.default.errors}`)}s(RBe,"subSchemaObjCode");function w7(e){(0,uu.checkUnknownRules)(e),CBe(e)}s(w7,"checkKeywords");function T7(e,t){if(e.opts.jtd)return b7(e,[],!1,t);let r=(0,y7.getSchemaTypes)(e.schema),n=(0,y7.coerceAndCheckDataType)(e,r);b7(e,r,!n,t)}s(T7,"typeAndKeywords");function CBe(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,uu.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}s(CBe,"checkRefsAndKeywords");function $Be(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,uu.checkStrictMode)(e,"default is ignored in the schema root")}s($Be,"checkNoDefault");function DBe(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,OBe.resolveUrl)(e.opts.uriResolver,e.baseId,t))}s(DBe,"updateContext");function LBe(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}s(LBe,"checkAsyncSchema");function N7({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)e.code((0,ae._)`${Ee.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let a=(0,ae.str)`${n}/$comment`,u=e.scopeValue("root",{ref:t.root});e.code((0,ae._)`${Ee.default.self}.opts.$comment(${o}, ${a}, ${u}.schema)`)}}s(N7,"commentKeyword");function jBe(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if((0,ae._)`${Ee.default.errors} === 0`,()=>t.return(Ee.default.data),()=>t.throw((0,ae._)`new ${i}(${Ee.default.vErrors})`)):(t.assign((0,ae._)`${n}.errors`,Ee.default.vErrors),o.unevaluated&&MBe(e),t.return((0,ae._)`${Ee.default.errors} === 0`))}s(jBe,"returnResults");function MBe({gen:e,evaluated:t,props:r,items:n}){r instanceof ae.Name&&e.assign((0,ae._)`${t}.props`,r),n instanceof ae.Name&&e.assign((0,ae._)`${t}.items`,n)}s(MBe,"assignEvaluated");function b7(e,t,r,n){let{gen:i,schema:o,data:a,allErrors:u,opts:c,self:l}=e,{RULES:f}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,uu.schemaHasRulesButRef)(o,f))){i.block(()=>R7(e,"$ref",f.all.$ref.definition));return}c.jtd||UBe(e,t),i.block(()=>{for(let _ of f.rules)d(_);d(f.post)});function d(_){(0,eL.shouldUseGroup)(o,_)&&(_.type?(i.if((0,KP.checkDataType)(_.type,a,c.strictNumbers)),S7(e,_),t.length===1&&t[0]===_.type&&r&&(i.else(),(0,KP.reportTypeError)(e)),i.endIf()):S7(e,_),u||i.if((0,ae._)`${Ee.default.errors} === ${n||0}`))}s(d,"groupKeywords")}s(b7,"schemaKeywords");function S7(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,vBe.assignDefaults)(e,t.type),r.block(()=>{for(let o of t.rules)(0,eL.shouldUseRule)(n,o)&&R7(e,o.keyword,o.definition,t.type)})}s(S7,"iterateKeywords");function UBe(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(xBe(e,t),e.opts.allowUnionTypes||qBe(e,t),FBe(e,e.dataTypes))}s(UBe,"checkStrictTypes");function xBe(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{A7(e.dataTypes,r)||tL(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),BBe(e,t)}}s(xBe,"checkContextTypes");function qBe(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&tL(e,"use allowUnionTypes to allow union type keyword")}s(qBe,"checkMultipleTypes");function FBe(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,eL.shouldUseRule)(e.schema,i)){let{type:o}=i.definition;o.length&&!o.some(a=>kBe(t,a))&&tL(e,`missing type "${o.join(",")}" for keyword "${n}"`)}}}s(FBe,"checkKeywordTypes");function kBe(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}s(kBe,"hasApplicableType");function A7(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}s(A7,"includesType");function BBe(e,t){let r=[];for(let n of e.dataTypes)A7(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}s(BBe,"narrowSchemaTypes");function tL(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,uu.checkStrictMode)(e,t,e.opts.strictTypes)}s(tL,"strictTypesError");var WP=class{static{s(this,"KeywordCxt")}constructor(t,r,n){if((0,Iy.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,uu.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",C7(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Iy.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=t.gen.const("_errs",Ee.default.errors))}result(t,r,n){this.failResult((0,ae.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,ae.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,ae._)`${r} !== undefined && (${(0,ae.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Py.reportExtraError:Py.reportError)(this,this.def.error,r)}$dataError(){(0,Py.reportError)(this,this.def.$dataError||Py.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Py.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=ae.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=ae.nil,r=ae.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:a}=this;n.if((0,ae.or)((0,ae._)`${i} === undefined`,r)),t!==ae.nil&&n.assign(t,!0),(o.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==ae.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,ae.or)(a(),u());function a(){if(n.length){if(!(r instanceof ae.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,ae._)`${(0,KP.checkDataTypes)(c,r,o.opts.strictNumbers,KP.DataType.Wrong)}`}return ae.nil}function u(){if(i.validateSchema){let c=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,ae._)`!${c}(${r})`}return ae.nil}}subschema(t,r){let n=(0,ZD.getSubschema)(this.it,t);(0,ZD.extendSubschemaData)(n,this.it,t),(0,ZD.extendSubschemaMode)(n,t);let i={...this.it,...n,items:void 0,props:void 0};return ABe(i,r),i}mergeEvaluated(t,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=uu.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=uu.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,ae.Name)),!0}};Sc.KeywordCxt=WP;function R7(e,t,r,n){let i=new WP(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Iy.funcKeywordCode)(i,r):"macro"in r?(0,Iy.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Iy.funcKeywordCode)(i,r)}s(R7,"keywordCode");var GBe=/^\/(?:[^~]|~0|~1)*$/,VBe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function C7(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(e==="")return Ee.default.rootData;if(e[0]==="/"){if(!GBe.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=Ee.default.rootData}else{let l=VBe.exec(e);if(!l)throw new Error(`Invalid JSON-pointer: ${e}`);let f=+l[1];if(i=l[2],i==="#"){if(f>=t)throw new Error(c("property/index",f));return n[t-f]}if(f>t)throw new Error(c("data",f));if(o=r[t-f],!i)return o}let a=o,u=i.split("/");for(let l of u)l&&(o=(0,ae._)`${o}${(0,ae.getProperty)((0,uu.unescapeJsonPointer)(l))}`,a=(0,ae._)`${a} && ${o}`);return a;function c(l,f){return`Cannot access ${l} ${f} levels up, current level is ${t}`}}s(C7,"getData");Sc.getData=C7});var wy=h(nL=>{"use strict";Object.defineProperty(nL,"__esModule",{value:!0});var rL=class extends Error{static{s(this,"ValidationError")}constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};nL.default=rL});var Ty=h(oL=>{"use strict";Object.defineProperty(oL,"__esModule",{value:!0});var iL=Oy(),sL=class extends Error{static{s(this,"MissingRefError")}constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,iL.resolveUrl)(t,r,n),this.missingSchema=(0,iL.normalizeId)((0,iL.getFullPath)(t,this.missingRef))}};oL.default=sL});var Ny=h(ms=>{"use strict";Object.defineProperty(ms,"__esModule",{value:!0});ms.resolveSchema=ms.getCompilingSchema=ms.resolveRef=ms.compileSchema=ms.SchemaEnv=void 0;var oo=Oe(),zBe=wy(),Qf=ps(),ao=Oy(),$7=Ve(),HBe=jh(),Mh=class{static{s(this,"SchemaEnv")}constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,ao.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};ms.SchemaEnv=Mh;function uL(e){let t=D7.call(this,e);if(t)return t;let r=(0,ao.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,a=new oo.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),u;e.$async&&(u=a.scopeValue("Error",{ref:zBe.default,code:(0,oo._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");e.validateName=c;let l={gen:a,allErrors:this.opts.allErrors,data:Qf.default.data,parentData:Qf.default.parentData,parentDataProperty:Qf.default.parentDataProperty,dataNames:[Qf.default.data],dataPathArr:[oo.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,oo.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:u,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:oo.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,oo._)`""`,opts:this.opts,self:this},f;try{this._compilations.add(e),(0,HBe.validateFunctionCode)(l),a.optimize(this.opts.code.optimize);let d=a.toString();f=`${a.scopeRefs(Qf.default.scope)}return ${d}`,this.opts.code.process&&(f=this.opts.code.process(f,e));let m=new Function(`${Qf.default.self}`,`${Qf.default.scope}`,f)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:g,items:y}=l;m.evaluated={props:g instanceof oo.Name?void 0:g,items:y instanceof oo.Name?void 0:y,dynamicProps:g instanceof oo.Name,dynamicItems:y instanceof oo.Name},m.source&&(m.source.evaluated=(0,oo.stringify)(m.evaluated))}return e.validate=m,e}catch(d){throw delete e.validate,delete e.validateName,f&&this.logger.error("Error compiling schema, function code:",f),d}finally{this._compilations.delete(e)}}s(uL,"compileSchema");ms.compileSchema=uL;function KBe(e,t,r){var n;r=(0,ao.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let o=JBe.call(this,e,r);if(o===void 0){let a=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:u}=this.opts;a&&(o=new Mh({schema:a,schemaId:u,root:e,baseId:t}))}if(o!==void 0)return e.refs[r]=WBe.call(this,o)}s(KBe,"resolveRef");ms.resolveRef=KBe;function WBe(e){return(0,ao.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:uL.call(this,e)}s(WBe,"inlineOrCompile");function D7(e){for(let t of this._compilations)if(YBe(t,e))return t}s(D7,"getCompilingSchema");ms.getCompilingSchema=D7;function YBe(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}s(YBe,"sameSchemaEnv");function JBe(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||YP.call(this,e,t)}s(JBe,"resolve");function YP(e,t){let r=this.opts.uriResolver.parse(t),n=(0,ao._getFullPath)(this.opts.uriResolver,r),i=(0,ao.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return aL.call(this,r,e);let o=(0,ao.normalizeId)(n),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){let u=YP.call(this,e,a);return typeof u?.schema!="object"?void 0:aL.call(this,r,u)}if(typeof a?.schema=="object"){if(a.validate||uL.call(this,a),o===(0,ao.normalizeId)(t)){let{schema:u}=a,{schemaId:c}=this.opts,l=u[c];return l&&(i=(0,ao.resolveUrl)(this.opts.uriResolver,i,l)),new Mh({schema:u,schemaId:c,root:e,baseId:i})}return aL.call(this,r,a)}}s(YP,"resolveSchema");ms.resolveSchema=YP;var XBe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function aL(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let u of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,$7.unescapeFragment)(u)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!XBe.has(u)&&l&&(t=(0,ao.resolveUrl)(this.opts.uriResolver,t,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,$7.schemaHasRulesButRef)(r,this.RULES)){let u=(0,ao.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=YP.call(this,n,u)}let{schemaId:a}=this.opts;if(o=o||new Mh({schema:r,schemaId:a,root:n,baseId:t}),o.schema!==o.root.schema)return o}s(aL,"getJsonPointer")});var L7=h((kNt,QBe)=>{QBe.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 XP=h((JP,j7)=>{(function(e,t){typeof JP=="object"&&typeof j7<"u"?t(JP):typeof define=="function"&&define.amd?define(["exports"],t):t(e.URI=e.URI||{})})(JP,function(e){"use strict";function t(){for(var T=arguments.length,P=Array(T),R=0;R<T;R++)P[R]=arguments[R];if(P.length>1){P[0]=P[0].slice(0,-1);for(var C=P.length-1,$=1;$<C;++$)P[$]=P[$].slice(1,-1);return P[C]=P[C].slice(1),P.join("")}else return P[0]}s(t,"merge");function r(T){return"(?:"+T+")"}s(r,"subexp");function n(T){return T===void 0?"undefined":T===null?"null":Object.prototype.toString.call(T).split(" ").pop().split("]").shift().toLowerCase()}s(n,"typeOf");function i(T){return T.toUpperCase()}s(i,"toUpperCase");function o(T){return T!=null?T instanceof Array?T:typeof T.length!="number"||T.split||T.setInterval||T.call?[T]:Array.prototype.slice.call(T):[]}s(o,"toArray");function a(T,P){var R=T;if(P)for(var C in P)R[C]=P[C];return R}s(a,"assign");function u(T){var P="[A-Za-z]",R="[\\x0D]",C="[0-9]",$="[\\x22]",Z=t(C,"[A-Fa-f]"),we="[\\x0A]",ut="[\\x20]",vt=r(r("%[EFef]"+Z+"%"+Z+Z+"%"+Z+Z)+"|"+r("%[89A-Fa-f]"+Z+"%"+Z+Z)+"|"+r("%"+Z+Z)),br="[\\:\\/\\?\\#\\[\\]\\@]",et="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",Qt=t(br,et),Sr=T?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Kt=T?"[\\uE000-\\uF8FF]":"[]",gt=t(P,C,"[\\-\\.\\_\\~]",Sr),Zt=r(P+t(P,C,"[\\+\\-\\.]")+"*"),Nt=r(r(vt+"|"+t(gt,et,"[\\:]"))+"*"),fl=r(r("25[0-5]")+"|"+r("2[0-4]"+C)+"|"+r("1"+C+C)+"|"+r("[1-9]"+C)+"|"+C),Mi=r(r("25[0-5]")+"|"+r("2[0-4]"+C)+"|"+r("1"+C+C)+"|"+r("0?[1-9]"+C)+"|0?0?"+C),Zi=r(Mi+"\\."+Mi+"\\."+Mi+"\\."+Mi),Lt=r(Z+"{1,4}"),Ui=r(r(Lt+"\\:"+Lt)+"|"+Zi),es=r(r(Lt+"\\:")+"{6}"+Ui),Ro=r("\\:\\:"+r(Lt+"\\:")+"{5}"+Ui),dl=r(r(Lt)+"?\\:\\:"+r(Lt+"\\:")+"{4}"+Ui),qa=r(r(r(Lt+"\\:")+"{0,1}"+Lt)+"?\\:\\:"+r(Lt+"\\:")+"{3}"+Ui),tg=r(r(r(Lt+"\\:")+"{0,2}"+Lt)+"?\\:\\:"+r(Lt+"\\:")+"{2}"+Ui),db=r(r(r(Lt+"\\:")+"{0,3}"+Lt)+"?\\:\\:"+Lt+"\\:"+Ui),pb=r(r(r(Lt+"\\:")+"{0,4}"+Lt)+"?\\:\\:"+Ui),dp=r(r(r(Lt+"\\:")+"{0,5}"+Lt)+"?\\:\\:"+Lt),pp=r(r(r(Lt+"\\:")+"{0,6}"+Lt)+"?\\:\\:"),Fa=r([es,Ro,dl,qa,tg,db,pb,dp,pp].join("|")),hp=r(r(gt+"|"+vt)+"+"),PA=r(Fa+"\\%25"+hp),pl=r(Fa+r("\\%25|\\%(?!"+Z+"{2})")+hp),Kpe=r("[vV]"+Z+"+\\."+t(gt,et,"[\\:]")+"+"),Wpe=r("\\["+r(pl+"|"+Fa+"|"+Kpe)+"\\]"),KB=r(r(vt+"|"+t(gt,et))+"*"),rg=r(Wpe+"|"+Zi+"(?!"+KB+")|"+KB),ng=r(C+"*"),WB=r(r(Nt+"@")+"?"+rg+r("\\:"+ng)+"?"),ig=r(vt+"|"+t(gt,et,"[\\:\\@]")),Ype=r(ig+"*"),YB=r(ig+"+"),Jpe=r(r(vt+"|"+t(gt,et,"[\\@]"))+"+"),ka=r(r("\\/"+Ype)+"*"),mp=r("\\/"+r(YB+ka)+"?"),IA=r(Jpe+ka),hb=r(YB+ka),_p="(?!"+ig+")",I0t=r(ka+"|"+mp+"|"+IA+"|"+hb+"|"+_p),gp=r(r(ig+"|"+t("[\\/\\?]",Kt))+"*"),sg=r(r(ig+"|[\\/\\?]")+"*"),JB=r(r("\\/\\/"+WB+ka)+"|"+mp+"|"+hb+"|"+_p),Xpe=r(Zt+"\\:"+JB+r("\\?"+gp)+"?"+r("\\#"+sg)+"?"),Qpe=r(r("\\/\\/"+WB+ka)+"|"+mp+"|"+IA+"|"+_p),Zpe=r(Qpe+r("\\?"+gp)+"?"+r("\\#"+sg)+"?"),w0t=r(Xpe+"|"+Zpe),T0t=r(Zt+"\\:"+JB+r("\\?"+gp)+"?"),N0t="^("+Zt+")\\:"+r(r("\\/\\/("+r("("+Nt+")@")+"?("+rg+")"+r("\\:("+ng+")")+"?)")+"?("+ka+"|"+mp+"|"+hb+"|"+_p+")")+r("\\?("+gp+")")+"?"+r("\\#("+sg+")")+"?$",A0t="^(){0}"+r(r("\\/\\/("+r("("+Nt+")@")+"?("+rg+")"+r("\\:("+ng+")")+"?)")+"?("+ka+"|"+mp+"|"+IA+"|"+_p+")")+r("\\?("+gp+")")+"?"+r("\\#("+sg+")")+"?$",R0t="^("+Zt+")\\:"+r(r("\\/\\/("+r("("+Nt+")@")+"?("+rg+")"+r("\\:("+ng+")")+"?)")+"?("+ka+"|"+mp+"|"+hb+"|"+_p+")")+r("\\?("+gp+")")+"?$",C0t="^"+r("\\#("+sg+")")+"?$",$0t="^"+r("("+Nt+")@")+"?("+rg+")"+r("\\:("+ng+")")+"?$";return{NOT_SCHEME:new RegExp(t("[^]",P,C,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",gt,et),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",gt,et),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",gt,et),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",gt,et),"g"),NOT_QUERY:new RegExp(t("[^\\%]",gt,et,"[\\:\\@\\/\\?]",Kt),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",gt,et,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",gt,et),"g"),UNRESERVED:new RegExp(gt,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",gt,Qt),"g"),PCT_ENCODED:new RegExp(vt,"g"),IPV4ADDRESS:new RegExp("^("+Zi+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Fa+")"+r(r("\\%25|\\%(?!"+Z+"{2})")+"("+hp+")")+"?\\]?$")}}s(u,"buildExps");var c=u(!1),l=u(!0),f=function(){function T(P,R){var C=[],$=!0,Z=!1,we=void 0;try{for(var ut=P[Symbol.iterator](),vt;!($=(vt=ut.next()).done)&&(C.push(vt.value),!(R&&C.length===R));$=!0);}catch(br){Z=!0,we=br}finally{try{!$&&ut.return&&ut.return()}finally{if(Z)throw we}}return C}return s(T,"sliceIterator"),function(P,R){if(Array.isArray(P))return P;if(Symbol.iterator in Object(P))return T(P,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),d=s(function(T){if(Array.isArray(T)){for(var P=0,R=Array(T.length);P<T.length;P++)R[P]=T[P];return R}else return Array.from(T)},"toConsumableArray"),_=2147483647,m=36,g=1,y=26,b=38,E=700,v=72,O=128,I="-",w=/^xn--/,j=/[^\0-\x7E]/,F=/[\x2E\u3002\uFF0E\uFF61]/g,K={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},H=m-g,re=Math.floor,de=String.fromCharCode;function te(T){throw new RangeError(K[T])}s(te,"error$1");function he(T,P){for(var R=[],C=T.length;C--;)R[C]=P(T[C]);return R}s(he,"map");function Ce(T,P){var R=T.split("@"),C="";R.length>1&&(C=R[0]+"@",T=R[1]),T=T.replace(F,".");var $=T.split("."),Z=he($,P).join(".");return C+Z}s(Ce,"mapDomain");function bt(T){for(var P=[],R=0,C=T.length;R<C;){var $=T.charCodeAt(R++);if($>=55296&&$<=56319&&R<C){var Z=T.charCodeAt(R++);(Z&64512)==56320?P.push((($&1023)<<10)+(Z&1023)+65536):(P.push($),R--)}else P.push($)}return P}s(bt,"ucs2decode");var _t=s(function(P){return String.fromCodePoint.apply(String,d(P))},"ucs2encode"),zr=s(function(P){return P-48<10?P-22:P-65<26?P-65:P-97<26?P-97:m},"basicToDigit"),Cn=s(function(P,R){return P+22+75*(P<26)-((R!=0)<<5)},"digitToBasic"),Qi=s(function(P,R,C){var $=0;for(P=C?re(P/E):P>>1,P+=re(P/R);P>H*y>>1;$+=m)P=re(P/H);return re($+(H+1)*P/(P+b))},"adapt"),ja=s(function(P){var R=[],C=P.length,$=0,Z=O,we=v,ut=P.lastIndexOf(I);ut<0&&(ut=0);for(var vt=0;vt<ut;++vt)P.charCodeAt(vt)>=128&&te("not-basic"),R.push(P.charCodeAt(vt));for(var br=ut>0?ut+1:0;br<C;){for(var et=$,Qt=1,Sr=m;;Sr+=m){br>=C&&te("invalid-input");var Kt=zr(P.charCodeAt(br++));(Kt>=m||Kt>re((_-$)/Qt))&&te("overflow"),$+=Kt*Qt;var gt=Sr<=we?g:Sr>=we+y?y:Sr-we;if(Kt<gt)break;var Zt=m-gt;Qt>re(_/Zt)&&te("overflow"),Qt*=Zt}var Nt=R.length+1;we=Qi($-et,Nt,et==0),re($/Nt)>_-Z&&te("overflow"),Z+=re($/Nt),$%=Nt,R.splice($++,0,Z)}return String.fromCodePoint.apply(String,R)},"decode"),$n=s(function(P){var R=[];P=bt(P);var C=P.length,$=O,Z=0,we=v,ut=!0,vt=!1,br=void 0;try{for(var et=P[Symbol.iterator](),Qt;!(ut=(Qt=et.next()).done);ut=!0){var Sr=Qt.value;Sr<128&&R.push(de(Sr))}}catch(pl){vt=!0,br=pl}finally{try{!ut&&et.return&&et.return()}finally{if(vt)throw br}}var Kt=R.length,gt=Kt;for(Kt&&R.push(I);gt<C;){var Zt=_,Nt=!0,fl=!1,Mi=void 0;try{for(var Zi=P[Symbol.iterator](),Lt;!(Nt=(Lt=Zi.next()).done);Nt=!0){var Ui=Lt.value;Ui>=$&&Ui<Zt&&(Zt=Ui)}}catch(pl){fl=!0,Mi=pl}finally{try{!Nt&&Zi.return&&Zi.return()}finally{if(fl)throw Mi}}var es=gt+1;Zt-$>re((_-Z)/es)&&te("overflow"),Z+=(Zt-$)*es,$=Zt;var Ro=!0,dl=!1,qa=void 0;try{for(var tg=P[Symbol.iterator](),db;!(Ro=(db=tg.next()).done);Ro=!0){var pb=db.value;if(pb<$&&++Z>_&&te("overflow"),pb==$){for(var dp=Z,pp=m;;pp+=m){var Fa=pp<=we?g:pp>=we+y?y:pp-we;if(dp<Fa)break;var hp=dp-Fa,PA=m-Fa;R.push(de(Cn(Fa+hp%PA,0))),dp=re(hp/PA)}R.push(de(Cn(dp,0))),we=Qi(Z,es,gt==Kt),Z=0,++gt}}}catch(pl){dl=!0,qa=pl}finally{try{!Ro&&tg.return&&tg.return()}finally{if(dl)throw qa}}++Z,++$}return R.join("")},"encode"),Li=s(function(P){return Ce(P,function(R){return w.test(R)?ja(R.slice(4).toLowerCase()):R})},"toUnicode"),ji=s(function(P){return Ce(P,function(R){return j.test(R)?"xn--"+$n(R):R})},"toASCII"),Ma={version:"2.1.0",ucs2:{decode:bt,encode:_t},decode:ja,encode:$n,toASCII:ji,toUnicode:Li},Hr={};function Dn(T){var P=T.charCodeAt(0),R=void 0;return P<16?R="%0"+P.toString(16).toUpperCase():P<128?R="%"+P.toString(16).toUpperCase():P<2048?R="%"+(P>>6|192).toString(16).toUpperCase()+"%"+(P&63|128).toString(16).toUpperCase():R="%"+(P>>12|224).toString(16).toUpperCase()+"%"+(P>>6&63|128).toString(16).toUpperCase()+"%"+(P&63|128).toString(16).toUpperCase(),R}s(Dn,"pctEncChar");function cp(T){for(var P="",R=0,C=T.length;R<C;){var $=parseInt(T.substr(R+1,2),16);if($<128)P+=String.fromCharCode($),R+=3;else if($>=194&&$<224){if(C-R>=6){var Z=parseInt(T.substr(R+4,2),16);P+=String.fromCharCode(($&31)<<6|Z&63)}else P+=T.substr(R,6);R+=6}else if($>=224){if(C-R>=9){var we=parseInt(T.substr(R+4,2),16),ut=parseInt(T.substr(R+7,2),16);P+=String.fromCharCode(($&15)<<12|(we&63)<<6|ut&63)}else P+=T.substr(R,9);R+=9}else P+=T.substr(R,3),R+=3}return P}s(cp,"pctDecChars");function bA(T,P){function R(C){var $=cp(C);return $.match(P.UNRESERVED)?$:C}return s(R,"decodeUnreserved"),T.scheme&&(T.scheme=String(T.scheme).replace(P.PCT_ENCODED,R).toLowerCase().replace(P.NOT_SCHEME,"")),T.userinfo!==void 0&&(T.userinfo=String(T.userinfo).replace(P.PCT_ENCODED,R).replace(P.NOT_USERINFO,Dn).replace(P.PCT_ENCODED,i)),T.host!==void 0&&(T.host=String(T.host).replace(P.PCT_ENCODED,R).toLowerCase().replace(P.NOT_HOST,Dn).replace(P.PCT_ENCODED,i)),T.path!==void 0&&(T.path=String(T.path).replace(P.PCT_ENCODED,R).replace(T.scheme?P.NOT_PATH:P.NOT_PATH_NOSCHEME,Dn).replace(P.PCT_ENCODED,i)),T.query!==void 0&&(T.query=String(T.query).replace(P.PCT_ENCODED,R).replace(P.NOT_QUERY,Dn).replace(P.PCT_ENCODED,i)),T.fragment!==void 0&&(T.fragment=String(T.fragment).replace(P.PCT_ENCODED,R).replace(P.NOT_FRAGMENT,Dn).replace(P.PCT_ENCODED,i)),T}s(bA,"_normalizeComponentEncoding");function SA(T){return T.replace(/^0*(.*)/,"$1")||"0"}s(SA,"_stripLeadingZeros");function vA(T,P){var R=T.match(P.IPV4ADDRESS)||[],C=f(R,2),$=C[1];return $?$.split(".").map(SA).join("."):T}s(vA,"_normalizeIPv4");function LB(T,P){var R=T.match(P.IPV6ADDRESS)||[],C=f(R,3),$=C[1],Z=C[2];if($){for(var we=$.toLowerCase().split("::").reverse(),ut=f(we,2),vt=ut[0],br=ut[1],et=br?br.split(":").map(SA):[],Qt=vt.split(":").map(SA),Sr=P.IPV4ADDRESS.test(Qt[Qt.length-1]),Kt=Sr?7:8,gt=Qt.length-Kt,Zt=Array(Kt),Nt=0;Nt<Kt;++Nt)Zt[Nt]=et[Nt]||Qt[gt+Nt]||"";Sr&&(Zt[Kt-1]=vA(Zt[Kt-1],P));var fl=Zt.reduce(function(es,Ro,dl){if(!Ro||Ro==="0"){var qa=es[es.length-1];qa&&qa.index+qa.length===dl?qa.length++:es.push({index:dl,length:1})}return es},[]),Mi=fl.sort(function(es,Ro){return Ro.length-es.length})[0],Zi=void 0;if(Mi&&Mi.length>1){var Lt=Zt.slice(0,Mi.index),Ui=Zt.slice(Mi.index+Mi.length);Zi=Lt.join(":")+"::"+Ui.join(":")}else Zi=Zt.join(":");return Z&&(Zi+="%"+Z),Zi}else return T}s(LB,"_normalizeIPv6");var Tpe=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Npe="".match(/(){0}/)[1]===void 0;function Ua(T){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R={},C=P.iri!==!1?l:c;P.reference==="suffix"&&(T=(P.scheme?P.scheme+":":"")+"//"+T);var $=T.match(Tpe);if($){Npe?(R.scheme=$[1],R.userinfo=$[3],R.host=$[4],R.port=parseInt($[5],10),R.path=$[6]||"",R.query=$[7],R.fragment=$[8],isNaN(R.port)&&(R.port=$[5])):(R.scheme=$[1]||void 0,R.userinfo=T.indexOf("@")!==-1?$[3]:void 0,R.host=T.indexOf("//")!==-1?$[4]:void 0,R.port=parseInt($[5],10),R.path=$[6]||"",R.query=T.indexOf("?")!==-1?$[7]:void 0,R.fragment=T.indexOf("#")!==-1?$[8]:void 0,isNaN(R.port)&&(R.port=T.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?$[4]:void 0)),R.host&&(R.host=LB(vA(R.host,C),C)),R.scheme===void 0&&R.userinfo===void 0&&R.host===void 0&&R.port===void 0&&!R.path&&R.query===void 0?R.reference="same-document":R.scheme===void 0?R.reference="relative":R.fragment===void 0?R.reference="absolute":R.reference="uri",P.reference&&P.reference!=="suffix"&&P.reference!==R.reference&&(R.error=R.error||"URI is not a "+P.reference+" reference.");var Z=Hr[(P.scheme||R.scheme||"").toLowerCase()];if(!P.unicodeSupport&&(!Z||!Z.unicodeSupport)){if(R.host&&(P.domainHost||Z&&Z.domainHost))try{R.host=Ma.toASCII(R.host.replace(C.PCT_ENCODED,cp).toLowerCase())}catch(we){R.error=R.error||"Host's domain name can not be converted to ASCII via punycode: "+we}bA(R,c)}else bA(R,C);Z&&Z.parse&&Z.parse(R,P)}else R.error=R.error||"URI can not be parsed.";return R}s(Ua,"parse");function Ape(T,P){var R=P.iri!==!1?l:c,C=[];return T.userinfo!==void 0&&(C.push(T.userinfo),C.push("@")),T.host!==void 0&&C.push(LB(vA(String(T.host),R),R).replace(R.IPV6ADDRESS,function($,Z,we){return"["+Z+(we?"%25"+we:"")+"]"})),(typeof T.port=="number"||typeof T.port=="string")&&(C.push(":"),C.push(String(T.port))),C.length?C.join(""):void 0}s(Ape,"_recomposeAuthority");var jB=/^\.\.?\//,MB=/^\/\.(\/|$)/,UB=/^\/\.\.(\/|$)/,Rpe=/^\/?(?:.|\n)*?(?=\/|$)/;function lp(T){for(var P=[];T.length;)if(T.match(jB))T=T.replace(jB,"");else if(T.match(MB))T=T.replace(MB,"/");else if(T.match(UB))T=T.replace(UB,"/"),P.pop();else if(T==="."||T==="..")T="";else{var R=T.match(Rpe);if(R){var C=R[0];T=T.slice(C.length),P.push(C)}else throw new Error("Unexpected dot segment condition")}return P.join("")}s(lp,"removeDotSegments");function No(T){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R=P.iri?l:c,C=[],$=Hr[(P.scheme||T.scheme||"").toLowerCase()];if($&&$.serialize&&$.serialize(T,P),T.host&&!R.IPV6ADDRESS.test(T.host)){if(P.domainHost||$&&$.domainHost)try{T.host=P.iri?Ma.toUnicode(T.host):Ma.toASCII(T.host.replace(R.PCT_ENCODED,cp).toLowerCase())}catch(ut){T.error=T.error||"Host's domain name can not be converted to "+(P.iri?"Unicode":"ASCII")+" via punycode: "+ut}}bA(T,R),P.reference!=="suffix"&&T.scheme&&(C.push(T.scheme),C.push(":"));var Z=Ape(T,P);if(Z!==void 0&&(P.reference!=="suffix"&&C.push("//"),C.push(Z),T.path&&T.path.charAt(0)!=="/"&&C.push("/")),T.path!==void 0){var we=T.path;!P.absolutePath&&(!$||!$.absolutePath)&&(we=lp(we)),Z===void 0&&(we=we.replace(/^\/\//,"/%2F")),C.push(we)}return T.query!==void 0&&(C.push("?"),C.push(T.query)),T.fragment!==void 0&&(C.push("#"),C.push(T.fragment)),C.join("")}s(No,"serialize");function xB(T,P){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},C=arguments[3],$={};return C||(T=Ua(No(T,R),R),P=Ua(No(P,R),R)),R=R||{},!R.tolerant&&P.scheme?($.scheme=P.scheme,$.userinfo=P.userinfo,$.host=P.host,$.port=P.port,$.path=lp(P.path||""),$.query=P.query):(P.userinfo!==void 0||P.host!==void 0||P.port!==void 0?($.userinfo=P.userinfo,$.host=P.host,$.port=P.port,$.path=lp(P.path||""),$.query=P.query):(P.path?(P.path.charAt(0)==="/"?$.path=lp(P.path):((T.userinfo!==void 0||T.host!==void 0||T.port!==void 0)&&!T.path?$.path="/"+P.path:T.path?$.path=T.path.slice(0,T.path.lastIndexOf("/")+1)+P.path:$.path=P.path,$.path=lp($.path)),$.query=P.query):($.path=T.path,P.query!==void 0?$.query=P.query:$.query=T.query),$.userinfo=T.userinfo,$.host=T.host,$.port=T.port),$.scheme=T.scheme),$.fragment=P.fragment,$}s(xB,"resolveComponents");function Cpe(T,P,R){var C=a({scheme:"null"},R);return No(xB(Ua(T,C),Ua(P,C),C,!0),C)}s(Cpe,"resolve");function $pe(T,P){return typeof T=="string"?T=No(Ua(T,P),P):n(T)==="object"&&(T=Ua(No(T,P),P)),T}s($pe,"normalize");function Dpe(T,P,R){return typeof T=="string"?T=No(Ua(T,R),R):n(T)==="object"&&(T=No(T,R)),typeof P=="string"?P=No(Ua(P,R),R):n(P)==="object"&&(P=No(P,R)),T===P}s(Dpe,"equal");function Lpe(T,P){return T&&T.toString().replace(!P||!P.iri?c.ESCAPE:l.ESCAPE,Dn)}s(Lpe,"escapeComponent");function xa(T,P){return T&&T.toString().replace(!P||!P.iri?c.PCT_ENCODED:l.PCT_ENCODED,cp)}s(xa,"unescapeComponent");var Z_={scheme:"http",domainHost:!0,parse:s(function(P,R){return P.host||(P.error=P.error||"HTTP URIs must have a host."),P},"parse"),serialize:s(function(P,R){var C=String(P.scheme).toLowerCase()==="https";return(P.port===(C?443:80)||P.port==="")&&(P.port=void 0),P.path||(P.path="/"),P},"serialize")},qB={scheme:"https",domainHost:Z_.domainHost,parse:Z_.parse,serialize:Z_.serialize};function FB(T){return typeof T.secure=="boolean"?T.secure:String(T.scheme).toLowerCase()==="wss"}s(FB,"isSecure");var eg={scheme:"ws",domainHost:!0,parse:s(function(P,R){var C=P;return C.secure=FB(C),C.resourceName=(C.path||"/")+(C.query?"?"+C.query:""),C.path=void 0,C.query=void 0,C},"parse"),serialize:s(function(P,R){if((P.port===(FB(P)?443:80)||P.port==="")&&(P.port=void 0),typeof P.secure=="boolean"&&(P.scheme=P.secure?"wss":"ws",P.secure=void 0),P.resourceName){var C=P.resourceName.split("?"),$=f(C,2),Z=$[0],we=$[1];P.path=Z&&Z!=="/"?Z:void 0,P.query=we,P.resourceName=void 0}return P.fragment=void 0,P},"serialize")},kB={scheme:"wss",domainHost:eg.domainHost,parse:eg.parse,serialize:eg.serialize},jpe={},Mpe=!0,BB="[A-Za-z0-9\\-\\.\\_\\~"+(Mpe?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",Ao="[0-9A-Fa-f]",Upe=r(r("%[EFef]"+Ao+"%"+Ao+Ao+"%"+Ao+Ao)+"|"+r("%[89A-Fa-f]"+Ao+"%"+Ao+Ao)+"|"+r("%"+Ao+Ao)),xpe="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",qpe="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",Fpe=t(qpe,'[\\"\\\\]'),kpe="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Bpe=new RegExp(BB,"g"),fp=new RegExp(Upe,"g"),Gpe=new RegExp(t("[^]",xpe,"[\\.]",'[\\"]',Fpe),"g"),GB=new RegExp(t("[^]",BB,kpe),"g"),Vpe=GB;function OA(T){var P=cp(T);return P.match(Bpe)?P:T}s(OA,"decodeUnreserved");var VB={scheme:"mailto",parse:s(function(P,R){var C=P,$=C.to=C.path?C.path.split(","):[];if(C.path=void 0,C.query){for(var Z=!1,we={},ut=C.query.split("&"),vt=0,br=ut.length;vt<br;++vt){var et=ut[vt].split("=");switch(et[0]){case"to":for(var Qt=et[1].split(","),Sr=0,Kt=Qt.length;Sr<Kt;++Sr)$.push(Qt[Sr]);break;case"subject":C.subject=xa(et[1],R);break;case"body":C.body=xa(et[1],R);break;default:Z=!0,we[xa(et[0],R)]=xa(et[1],R);break}}Z&&(C.headers=we)}C.query=void 0;for(var gt=0,Zt=$.length;gt<Zt;++gt){var Nt=$[gt].split("@");if(Nt[0]=xa(Nt[0]),R.unicodeSupport)Nt[1]=xa(Nt[1],R).toLowerCase();else try{Nt[1]=Ma.toASCII(xa(Nt[1],R).toLowerCase())}catch(fl){C.error=C.error||"Email address's domain name can not be converted to ASCII via punycode: "+fl}$[gt]=Nt.join("@")}return C},"parse$$1"),serialize:s(function(P,R){var C=P,$=o(P.to);if($){for(var Z=0,we=$.length;Z<we;++Z){var ut=String($[Z]),vt=ut.lastIndexOf("@"),br=ut.slice(0,vt).replace(fp,OA).replace(fp,i).replace(Gpe,Dn),et=ut.slice(vt+1);try{et=R.iri?Ma.toUnicode(et):Ma.toASCII(xa(et,R).toLowerCase())}catch(gt){C.error=C.error||"Email address's domain name can not be converted to "+(R.iri?"Unicode":"ASCII")+" via punycode: "+gt}$[Z]=br+"@"+et}C.path=$.join(",")}var Qt=P.headers=P.headers||{};P.subject&&(Qt.subject=P.subject),P.body&&(Qt.body=P.body);var Sr=[];for(var Kt in Qt)Qt[Kt]!==jpe[Kt]&&Sr.push(Kt.replace(fp,OA).replace(fp,i).replace(GB,Dn)+"="+Qt[Kt].replace(fp,OA).replace(fp,i).replace(Vpe,Dn));return Sr.length&&(C.query=Sr.join("&")),C},"serialize$$1")},zpe=/^([^\:]+)\:(.*)/,zB={scheme:"urn",parse:s(function(P,R){var C=P.path&&P.path.match(zpe),$=P;if(C){var Z=R.scheme||$.scheme||"urn",we=C[1].toLowerCase(),ut=C[2],vt=Z+":"+(R.nid||we),br=Hr[vt];$.nid=we,$.nss=ut,$.path=void 0,br&&($=br.parse($,R))}else $.error=$.error||"URN can not be parsed.";return $},"parse$$1"),serialize:s(function(P,R){var C=R.scheme||P.scheme||"urn",$=P.nid,Z=C+":"+(R.nid||$),we=Hr[Z];we&&(P=we.serialize(P,R));var ut=P,vt=P.nss;return ut.path=($||R.nid)+":"+vt,ut},"serialize$$1")},Hpe=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,HB={scheme:"urn:uuid",parse:s(function(P,R){var C=P;return C.uuid=C.nss,C.nss=void 0,!R.tolerant&&(!C.uuid||!C.uuid.match(Hpe))&&(C.error=C.error||"UUID is not valid."),C},"parse"),serialize:s(function(P,R){var C=P;return C.nss=(P.uuid||"").toLowerCase(),C},"serialize")};Hr[Z_.scheme]=Z_,Hr[qB.scheme]=qB,Hr[eg.scheme]=eg,Hr[kB.scheme]=kB,Hr[VB.scheme]=VB,Hr[zB.scheme]=zB,Hr[HB.scheme]=HB,e.SCHEMES=Hr,e.pctEncChar=Dn,e.pctDecChars=cp,e.parse=Ua,e.removeDotSegments=lp,e.serialize=No,e.resolveComponents=xB,e.resolve=Cpe,e.normalize=$pe,e.equal=Dpe,e.escapeComponent=Lpe,e.unescapeComponent=xa,Object.defineProperty(e,"__esModule",{value:!0})})});var U7=h(cL=>{"use strict";Object.defineProperty(cL,"__esModule",{value:!0});var M7=XP();M7.code='require("ajv/dist/runtime/uri").default';cL.default=M7});var dL=h(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.CodeGen=Qr.Name=Qr.nil=Qr.stringify=Qr.str=Qr._=Qr.KeywordCxt=void 0;var ZBe=jh();Object.defineProperty(Qr,"KeywordCxt",{enumerable:!0,get:function(){return ZBe.KeywordCxt}});var Uh=Oe();Object.defineProperty(Qr,"_",{enumerable:!0,get:function(){return Uh._}});Object.defineProperty(Qr,"str",{enumerable:!0,get:function(){return Uh.str}});Object.defineProperty(Qr,"stringify",{enumerable:!0,get:function(){return Uh.stringify}});Object.defineProperty(Qr,"nil",{enumerable:!0,get:function(){return Uh.nil}});Object.defineProperty(Qr,"Name",{enumerable:!0,get:function(){return Uh.Name}});Object.defineProperty(Qr,"CodeGen",{enumerable:!0,get:function(){return Uh.CodeGen}});var e3e=wy(),B7=Ty(),t3e=VD(),Ay=Ny(),r3e=Oe(),Ry=Oy(),QP=vy(),fL=Ve(),x7=L7(),n3e=U7(),G7=s((e,t)=>new RegExp(e,t),"defaultRegExp");G7.code="new RegExp";var i3e=["removeAdditional","useDefaults","coerceTypes"],s3e=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),o3e={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."},a3e={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},q7=200;function u3e(e){var t,r,n,i,o,a,u,c,l,f,d,_,m,g,y,b,E,v,O,I,w,j,F,K,H;let re=e.strict,de=(t=e.code)===null||t===void 0?void 0:t.optimize,te=de===!0||de===void 0?1:de||0,he=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:G7,Ce=(i=e.uriResolver)!==null&&i!==void 0?i:n3e.default;return{strictSchema:(a=(o=e.strictSchema)!==null&&o!==void 0?o:re)!==null&&a!==void 0?a:!0,strictNumbers:(c=(u=e.strictNumbers)!==null&&u!==void 0?u:re)!==null&&c!==void 0?c:!0,strictTypes:(f=(l=e.strictTypes)!==null&&l!==void 0?l:re)!==null&&f!==void 0?f:"log",strictTuples:(_=(d=e.strictTuples)!==null&&d!==void 0?d:re)!==null&&_!==void 0?_:"log",strictRequired:(g=(m=e.strictRequired)!==null&&m!==void 0?m:re)!==null&&g!==void 0?g:!1,code:e.code?{...e.code,optimize:te,regExp:he}:{optimize:te,regExp:he},loopRequired:(y=e.loopRequired)!==null&&y!==void 0?y:q7,loopEnum:(b=e.loopEnum)!==null&&b!==void 0?b:q7,meta:(E=e.meta)!==null&&E!==void 0?E:!0,messages:(v=e.messages)!==null&&v!==void 0?v:!0,inlineRefs:(O=e.inlineRefs)!==null&&O!==void 0?O:!0,schemaId:(I=e.schemaId)!==null&&I!==void 0?I:"$id",addUsedSchema:(w=e.addUsedSchema)!==null&&w!==void 0?w:!0,validateSchema:(j=e.validateSchema)!==null&&j!==void 0?j:!0,validateFormats:(F=e.validateFormats)!==null&&F!==void 0?F:!0,unicodeRegExp:(K=e.unicodeRegExp)!==null&&K!==void 0?K:!0,int32range:(H=e.int32range)!==null&&H!==void 0?H:!0,uriResolver:Ce}}s(u3e,"requiredOptions");var Cy=class{static{s(this,"Ajv")}constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...u3e(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new r3e.ValueScope({scope:{},prefixes:s3e,es5:r,lines:n}),this.logger=h3e(t.logger);let i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,t3e.getRules)(),F7.call(this,o3e,t,"NOT SUPPORTED"),F7.call(this,a3e,t,"DEPRECATED","warn"),this._metaOpts=d3e.call(this),t.formats&&l3e.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&f3e.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),c3e.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,i=x7;n==="id"&&(i={...x7},i.id=i.$id,delete i.$id),r&&t&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,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,t,r);async function i(f,d){await o.call(this,f.$schema);let _=this._addSchema(f,d);return _.validate||a.call(this,_)}async function o(f){f&&!this.getSchema(f)&&await i.call(this,{$ref:f},!0)}async function a(f){try{return this._compileSchemaEnv(f)}catch(d){if(!(d instanceof B7.default))throw d;return u.call(this,d),await c.call(this,d.missingSchema),a.call(this,f)}}function u({missingSchema:f,missingRef:d}){if(this.refs[f])throw new Error(`AnySchema ${f} is loaded but ${d} cannot be resolved`)}async function c(f){let d=await l.call(this,f);this.refs[f]||await o.call(this,d.$schema),this.refs[f]||this.addSchema(d,f,r)}async function l(f){let d=this._loading[f];if(d)return d;try{return await(this._loading[f]=n(f))}finally{delete this._loading[f]}}}addSchema(t,r,n,i=this.opts.validateSchema){if(Array.isArray(t)){for(let a of t)this.addSchema(a,void 0,n,i);return this}let o;if(typeof t=="object"){let{schemaId:a}=this.opts;if(o=t[a],o!==void 0&&typeof o!="string")throw new Error(`schema ${a} must be string`)}return r=(0,Ry.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,i,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$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,t);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(t){let r;for(;typeof(r=k7.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,i=new Ay.SchemaEnv({schema:{},schemaId:n});if(r=Ay.resolveSchema.call(this,i,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=k7.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,Ry.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,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(_3e.call(this,n,r),!r)return(0,fL.eachItem)(n,o=>lL.call(this,o)),this;y3e.call(this,r);let i={...r,type:(0,QP.getJSONTypes)(r.type),schemaType:(0,QP.getJSONTypes)(r.schemaType)};return(0,fL.eachItem)(n,i.type.length===0?o=>lL.call(this,o,i):o=>i.type.forEach(a=>lL.call(this,o,i,a))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===t);i>=0&&n.rules.splice(i,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let i of r){let o=i.split("/").slice(1),a=t;for(let u of o)a=a[u];for(let u in n){let c=n[u];if(typeof c!="object")continue;let{$data:l}=c.definition,f=a[u];l&&f&&(a[u]=V7(f))}}return t}_removeAllSchemas(t,r){for(let n in t){let i=t[n];(!r||r.test(n))&&(typeof i=="string"?delete t[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[n]))}}_addSchema(t,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let a,{schemaId:u}=this.opts;if(typeof t=="object")a=t[u];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;n=(0,Ry.normalizeId)(a||n);let l=Ry.getSchemaRefs.call(this,t,n);return c=new Ay.SchemaEnv({schema:t,schemaId:u,meta:r,baseId:n,localRefs:l}),this._cache.set(c.schema,c),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),i&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):Ay.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{Ay.compileSchema.call(this,t)}finally{this.opts=r}}};Qr.default=Cy;Cy.ValidationError=e3e.default;Cy.MissingRefError=B7.default;function F7(e,t,r,n="error"){for(let i in e){let o=i;o in t&&this.logger[n](`${r}: option ${i}. ${e[o]}`)}}s(F7,"checkOptions");function k7(e){return e=(0,Ry.normalizeId)(e),this.schemas[e]||this.refs[e]}s(k7,"getSchEnv");function c3e(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}s(c3e,"addInitialSchemas");function l3e(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}s(l3e,"addInitialFormats");function f3e(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}s(f3e,"addInitialKeywords");function d3e(){let e={...this.opts};for(let t of i3e)delete e[t];return e}s(d3e,"getMetaSchemaOptions");var p3e={log(){},warn(){},error(){}};function h3e(e){if(e===!1)return p3e;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}s(h3e,"getLogger");var m3e=/^[a-z_$][a-z0-9_$:-]*$/i;function _3e(e,t){let{RULES:r}=this;if((0,fL.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!m3e.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}s(_3e,"checkKeyword");function lL(e,t,r){var n;let i=t?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,a=i?o.post:o.rules.find(({type:c})=>c===r);if(a||(a={type:r,rules:[]},o.rules.push(a)),o.keywords[e]=!0,!t)return;let u={keyword:e,definition:{...t,type:(0,QP.getJSONTypes)(t.type),schemaType:(0,QP.getJSONTypes)(t.schemaType)}};t.before?g3e.call(this,a,u,t.before):a.rules.push(u),o.all[e]=u,(n=t.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}s(lL,"addRule");function g3e(e,t,r){let n=e.rules.findIndex(i=>i.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}s(g3e,"addBeforeRule");function y3e(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=V7(t)),e.validateSchema=this.compile(t,!0))}s(y3e,"keywordMetaschema");var E3e={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function V7(e){return{anyOf:[e,E3e]}}s(V7,"schemaOrData")});var z7=h(pL=>{"use strict";Object.defineProperty(pL,"__esModule",{value:!0});var b3e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};pL.default=b3e});var tI=h(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});Zf.callRef=Zf.getValidate=void 0;var S3e=Ty(),H7=hs(),yi=Oe(),xh=ps(),K7=Ny(),ZP=Ve(),v3e={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:o,validateName:a,opts:u,self:c}=n,{root:l}=o;if((r==="#"||r==="#/")&&i===l.baseId)return d();let f=K7.resolveRef.call(c,l,i,r);if(f===void 0)throw new S3e.default(n.opts.uriResolver,i,r);if(f instanceof K7.SchemaEnv)return _(f);return m(f);function d(){if(o===l)return eI(e,a,o,o.$async);let g=t.scopeValue("root",{ref:l});return eI(e,(0,yi._)`${g}.validate`,l,l.$async)}function _(g){let y=W7(e,g);eI(e,y,g,g.$async)}function m(g){let y=t.scopeValue("schema",u.code.source===!0?{ref:g,code:(0,yi.stringify)(g)}:{ref:g}),b=t.name("valid"),E=e.subschema({schema:g,dataTypes:[],schemaPath:yi.nil,topSchemaRef:y,errSchemaPath:r},b);e.mergeEvaluated(E),e.ok(b)}}};function W7(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,yi._)`${r.scopeValue("wrapper",{ref:t})}.validate`}s(W7,"getValidate");Zf.getValidate=W7;function eI(e,t,r,n){let{gen:i,it:o}=e,{allErrors:a,schemaEnv:u,opts:c}=o,l=c.passContext?xh.default.this:yi.nil;n?f():d();function f(){if(!u.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,yi._)`await ${(0,H7.callValidateCode)(e,t,l)}`),m(t),a||i.assign(g,!0)},y=>{i.if((0,yi._)`!(${y} instanceof ${o.ValidationError})`,()=>i.throw(y)),_(y),a||i.assign(g,!1)}),e.ok(g)}s(f,"callAsyncRef");function d(){e.result((0,H7.callValidateCode)(e,t,l),()=>m(t),()=>_(t))}s(d,"callSyncRef");function _(g){let y=(0,yi._)`${g}.errors`;i.assign(xh.default.vErrors,(0,yi._)`${xh.default.vErrors} === null ? ${y} : ${xh.default.vErrors}.concat(${y})`),i.assign(xh.default.errors,(0,yi._)`${xh.default.vErrors}.length`)}s(_,"addErrorsFrom");function m(g){var y;if(!o.opts.unevaluated)return;let b=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(b&&!b.dynamicProps)b.props!==void 0&&(o.props=ZP.mergeEvaluated.props(i,b.props,o.props));else{let E=i.var("props",(0,yi._)`${g}.evaluated.props`);o.props=ZP.mergeEvaluated.props(i,E,o.props,yi.Name)}if(o.items!==!0)if(b&&!b.dynamicItems)b.items!==void 0&&(o.items=ZP.mergeEvaluated.items(i,b.items,o.items));else{let E=i.var("items",(0,yi._)`${g}.evaluated.items`);o.items=ZP.mergeEvaluated.items(i,E,o.items,yi.Name)}}s(m,"addEvaluatedFrom")}s(eI,"callRef");Zf.callRef=eI;Zf.default=v3e});var mL=h(hL=>{"use strict";Object.defineProperty(hL,"__esModule",{value:!0});var O3e=z7(),P3e=tI(),I3e=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",O3e.default,P3e.default];hL.default=I3e});var Y7=h(_L=>{"use strict";Object.defineProperty(_L,"__esModule",{value:!0});var rI=Oe(),vc=rI.operators,nI={maximum:{okStr:"<=",ok:vc.LTE,fail:vc.GT},minimum:{okStr:">=",ok:vc.GTE,fail:vc.LT},exclusiveMaximum:{okStr:"<",ok:vc.LT,fail:vc.GTE},exclusiveMinimum:{okStr:">",ok:vc.GT,fail:vc.LTE}},w3e={message:({keyword:e,schemaCode:t})=>(0,rI.str)`must be ${nI[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,rI._)`{comparison: ${nI[e].okStr}, limit: ${t}}`},T3e={keyword:Object.keys(nI),type:"number",schemaType:"number",$data:!0,error:w3e,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,rI._)`${r} ${nI[t].fail} ${n} || isNaN(${r})`)}};_L.default=T3e});var J7=h(gL=>{"use strict";Object.defineProperty(gL,"__esModule",{value:!0});var $y=Oe(),N3e={message:({schemaCode:e})=>(0,$y.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,$y._)`{multipleOf: ${e}}`},A3e={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:N3e,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,o=i.opts.multipleOfPrecision,a=t.let("res"),u=o?(0,$y._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,$y._)`${a} !== parseInt(${a})`;e.fail$data((0,$y._)`(${n} === 0 || (${a} = ${r}/${n}, ${u}))`)}};gL.default=A3e});var Q7=h(yL=>{"use strict";Object.defineProperty(yL,"__esModule",{value:!0});function X7(e){let t=e.length,r=0,n=0,i;for(;n<t;)r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t&&(i=e.charCodeAt(n),(i&64512)===56320&&n++);return r}s(X7,"ucs2length");yL.default=X7;X7.code='require("ajv/dist/runtime/ucs2length").default'});var Z7=h(EL=>{"use strict";Object.defineProperty(EL,"__esModule",{value:!0});var ed=Oe(),R3e=Ve(),C3e=Q7(),$3e={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,ed.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,ed._)`{limit: ${e}}`},D3e={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:$3e,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,o=t==="maxLength"?ed.operators.GT:ed.operators.LT,a=i.opts.unicode===!1?(0,ed._)`${r}.length`:(0,ed._)`${(0,R3e.useFunc)(e.gen,C3e.default)}(${r})`;e.fail$data((0,ed._)`${a} ${o} ${n}`)}};EL.default=D3e});var eW=h(bL=>{"use strict";Object.defineProperty(bL,"__esModule",{value:!0});var L3e=hs(),iI=Oe(),j3e={message:({schemaCode:e})=>(0,iI.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,iI._)`{pattern: ${e}}`},M3e={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:j3e,code(e){let{data:t,$data:r,schema:n,schemaCode:i,it:o}=e,a=o.opts.unicodeRegExp?"u":"",u=r?(0,iI._)`(new RegExp(${i}, ${a}))`:(0,L3e.usePattern)(e,n);e.fail$data((0,iI._)`!${u}.test(${t})`)}};bL.default=M3e});var tW=h(SL=>{"use strict";Object.defineProperty(SL,"__esModule",{value:!0});var Dy=Oe(),U3e={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,Dy.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Dy._)`{limit: ${e}}`},x3e={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:U3e,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?Dy.operators.GT:Dy.operators.LT;e.fail$data((0,Dy._)`Object.keys(${r}).length ${i} ${n}`)}};SL.default=x3e});var rW=h(vL=>{"use strict";Object.defineProperty(vL,"__esModule",{value:!0});var Ly=hs(),jy=Oe(),q3e=Ve(),F3e={message:({params:{missingProperty:e}})=>(0,jy.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,jy._)`{missingProperty: ${e}}`},k3e={keyword:"required",type:"object",schemaType:"array",$data:!0,error:F3e,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:o,it:a}=e,{opts:u}=a;if(!o&&r.length===0)return;let c=r.length>=u.loopRequired;if(a.allErrors?l():f(),u.strictRequired){let m=e.parentSchema.properties,{definedProperties:g}=e.it;for(let y of r)if(m?.[y]===void 0&&!g.has(y)){let b=a.schemaEnv.baseId+a.errSchemaPath,E=`required property "${y}" is not defined at "${b}" (strictRequired)`;(0,q3e.checkStrictMode)(a,E,a.opts.strictRequired)}}function l(){if(c||o)e.block$data(jy.nil,d);else for(let m of r)(0,Ly.checkReportMissingProp)(e,m)}s(l,"allErrorsMode");function f(){let m=t.let("missing");if(c||o){let g=t.let("valid",!0);e.block$data(g,()=>_(m,g)),e.ok(g)}else t.if((0,Ly.checkMissingProp)(e,r,m)),(0,Ly.reportMissingProp)(e,m),t.else()}s(f,"exitOnErrorMode");function d(){t.forOf("prop",n,m=>{e.setParams({missingProperty:m}),t.if((0,Ly.noPropertyInData)(t,i,m,u.ownProperties),()=>e.error())})}s(d,"loopAllRequired");function _(m,g){e.setParams({missingProperty:m}),t.forOf(m,n,()=>{t.assign(g,(0,Ly.propertyInData)(t,i,m,u.ownProperties)),t.if((0,jy.not)(g),()=>{e.error(),t.break()})},jy.nil)}s(_,"loopUntilMissing")}};vL.default=k3e});var nW=h(OL=>{"use strict";Object.defineProperty(OL,"__esModule",{value:!0});var My=Oe(),B3e={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,My.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,My._)`{limit: ${e}}`},G3e={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:B3e,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?My.operators.GT:My.operators.LT;e.fail$data((0,My._)`${r}.length ${i} ${n}`)}};OL.default=G3e});var sI=h(PL=>{"use strict";Object.defineProperty(PL,"__esModule",{value:!0});var iW=Xf();iW.code='require("ajv/dist/runtime/equal").default';PL.default=iW});var sW=h(wL=>{"use strict";Object.defineProperty(wL,"__esModule",{value:!0});var IL=vy(),Zr=Oe(),V3e=Ve(),z3e=sI(),H3e={message:({params:{i:e,j:t}})=>(0,Zr.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Zr._)`{i: ${e}, j: ${t}}`},K3e={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:H3e,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:o,schemaCode:a,it:u}=e;if(!n&&!i)return;let c=t.let("valid"),l=o.items?(0,IL.getSchemaTypes)(o.items):[];e.block$data(c,f,(0,Zr._)`${a} === false`),e.ok(c);function f(){let g=t.let("i",(0,Zr._)`${r}.length`),y=t.let("j");e.setParams({i:g,j:y}),t.assign(c,!0),t.if((0,Zr._)`${g} > 1`,()=>(d()?_:m)(g,y))}s(f,"validateUniqueItems");function d(){return l.length>0&&!l.some(g=>g==="object"||g==="array")}s(d,"canOptimize");function _(g,y){let b=t.name("item"),E=(0,IL.checkDataTypes)(l,b,u.opts.strictNumbers,IL.DataType.Wrong),v=t.const("indices",(0,Zr._)`{}`);t.for((0,Zr._)`;${g}--;`,()=>{t.let(b,(0,Zr._)`${r}[${g}]`),t.if(E,(0,Zr._)`continue`),l.length>1&&t.if((0,Zr._)`typeof ${b} == "string"`,(0,Zr._)`${b} += "_"`),t.if((0,Zr._)`typeof ${v}[${b}] == "number"`,()=>{t.assign(y,(0,Zr._)`${v}[${b}]`),e.error(),t.assign(c,!1).break()}).code((0,Zr._)`${v}[${b}] = ${g}`)})}s(_,"loopN");function m(g,y){let b=(0,V3e.useFunc)(t,z3e.default),E=t.name("outer");t.label(E).for((0,Zr._)`;${g}--;`,()=>t.for((0,Zr._)`${y} = ${g}; ${y}--;`,()=>t.if((0,Zr._)`${b}(${r}[${g}], ${r}[${y}])`,()=>{e.error(),t.assign(c,!1).break(E)})))}s(m,"loopN2")}};wL.default=K3e});var oW=h(NL=>{"use strict";Object.defineProperty(NL,"__esModule",{value:!0});var TL=Oe(),W3e=Ve(),Y3e=sI(),J3e={message:"must be equal to constant",params:({schemaCode:e})=>(0,TL._)`{allowedValue: ${e}}`},X3e={keyword:"const",$data:!0,error:J3e,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:o}=e;n||o&&typeof o=="object"?e.fail$data((0,TL._)`!${(0,W3e.useFunc)(t,Y3e.default)}(${r}, ${i})`):e.fail((0,TL._)`${o} !== ${r}`)}};NL.default=X3e});var aW=h(AL=>{"use strict";Object.defineProperty(AL,"__esModule",{value:!0});var Uy=Oe(),Q3e=Ve(),Z3e=sI(),e4e={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Uy._)`{allowedValues: ${e}}`},t4e={keyword:"enum",schemaType:"array",$data:!0,error:e4e,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:o,it:a}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let u=i.length>=a.opts.loopEnum,c,l=s(()=>c??(c=(0,Q3e.useFunc)(t,Z3e.default)),"getEql"),f;if(u||n)f=t.let("valid"),e.block$data(f,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=t.const("vSchema",o);f=(0,Uy.or)(...i.map((g,y)=>_(m,y)))}e.pass(f);function d(){t.assign(f,!1),t.forOf("v",o,m=>t.if((0,Uy._)`${l()}(${r}, ${m})`,()=>t.assign(f,!0).break()))}s(d,"loopEnum");function _(m,g){let y=i[g];return typeof y=="object"&&y!==null?(0,Uy._)`${l()}(${r}, ${m}[${g}])`:(0,Uy._)`${r} === ${y}`}s(_,"equalCode")}};AL.default=t4e});var CL=h(RL=>{"use strict";Object.defineProperty(RL,"__esModule",{value:!0});var r4e=Y7(),n4e=J7(),i4e=Z7(),s4e=eW(),o4e=tW(),a4e=rW(),u4e=nW(),c4e=sW(),l4e=oW(),f4e=aW(),d4e=[r4e.default,n4e.default,i4e.default,s4e.default,o4e.default,a4e.default,u4e.default,c4e.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},l4e.default,f4e.default];RL.default=d4e});var DL=h(xy=>{"use strict";Object.defineProperty(xy,"__esModule",{value:!0});xy.validateAdditionalItems=void 0;var td=Oe(),$L=Ve(),p4e={message:({params:{len:e}})=>(0,td.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,td._)`{limit: ${e}}`},h4e={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:p4e,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,$L.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}uW(e,n)}};function uW(e,t){let{gen:r,schema:n,data:i,keyword:o,it:a}=e;a.items=!0;let u=r.const("len",(0,td._)`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,td._)`${u} <= ${t.length}`);else if(typeof n=="object"&&!(0,$L.alwaysValidSchema)(a,n)){let l=r.var("valid",(0,td._)`${u} <= ${t.length}`);r.if((0,td.not)(l),()=>c(l)),e.ok(l)}function c(l){r.forRange("i",t.length,u,f=>{e.subschema({keyword:o,dataProp:f,dataPropType:$L.Type.Num},l),a.allErrors||r.if((0,td.not)(l),()=>r.break())})}s(c,"validateItems")}s(uW,"validateAdditionalItems");xy.validateAdditionalItems=uW;xy.default=h4e});var LL=h(qy=>{"use strict";Object.defineProperty(qy,"__esModule",{value:!0});qy.validateTuple=void 0;var cW=Oe(),oI=Ve(),m4e=hs(),_4e={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return lW(e,"additionalItems",t);r.items=!0,!(0,oI.alwaysValidSchema)(r,t)&&e.ok((0,m4e.validateArray)(e))}};function lW(e,t,r=e.schema){let{gen:n,parentSchema:i,data:o,keyword:a,it:u}=e;f(i),u.opts.unevaluated&&r.length&&u.items!==!0&&(u.items=oI.mergeEvaluated.items(n,r.length,u.items));let c=n.name("valid"),l=n.const("len",(0,cW._)`${o}.length`);r.forEach((d,_)=>{(0,oI.alwaysValidSchema)(u,d)||(n.if((0,cW._)`${l} > ${_}`,()=>e.subschema({keyword:a,schemaProp:_,dataProp:_},c)),e.ok(c))});function f(d){let{opts:_,errSchemaPath:m}=u,g=r.length,y=g===d.minItems&&(g===d.maxItems||d[t]===!1);if(_.strictTuples&&!y){let b=`"${a}" is ${g}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,oI.checkStrictMode)(u,b,_.strictTuples)}}s(f,"checkStrictTuple")}s(lW,"validateTuple");qy.validateTuple=lW;qy.default=_4e});var fW=h(jL=>{"use strict";Object.defineProperty(jL,"__esModule",{value:!0});var g4e=LL(),y4e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,g4e.validateTuple)(e,"items")};jL.default=y4e});var pW=h(ML=>{"use strict";Object.defineProperty(ML,"__esModule",{value:!0});var dW=Oe(),E4e=Ve(),b4e=hs(),S4e=DL(),v4e={message:({params:{len:e}})=>(0,dW.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,dW._)`{limit: ${e}}`},O4e={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:v4e,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,E4e.alwaysValidSchema)(n,t)&&(i?(0,S4e.validateAdditionalItems)(e,i):e.ok((0,b4e.validateArray)(e)))}};ML.default=O4e});var hW=h(UL=>{"use strict";Object.defineProperty(UL,"__esModule",{value:!0});var _s=Oe(),aI=Ve(),P4e={message:({params:{min:e,max:t}})=>t===void 0?(0,_s.str)`must contain at least ${e} valid item(s)`:(0,_s.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,_s._)`{minContains: ${e}}`:(0,_s._)`{minContains: ${e}, maxContains: ${t}}`},I4e={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:P4e,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e,a,u,{minContains:c,maxContains:l}=n;o.opts.next?(a=c===void 0?1:c,u=l):a=1;let f=t.const("len",(0,_s._)`${i}.length`);if(e.setParams({min:a,max:u}),u===void 0&&a===0){(0,aI.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(u!==void 0&&a>u){(0,aI.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,aI.alwaysValidSchema)(o,r)){let y=(0,_s._)`${f} >= ${a}`;u!==void 0&&(y=(0,_s._)`${y} && ${f} <= ${u}`),e.pass(y);return}o.items=!0;let d=t.name("valid");u===void 0&&a===1?m(d,()=>t.if(d,()=>t.break())):a===0?(t.let(d,!0),u!==void 0&&t.if((0,_s._)`${i}.length > 0`,_)):(t.let(d,!1),_()),e.result(d,()=>e.reset());function _(){let y=t.name("_valid"),b=t.let("count",0);m(y,()=>t.if(y,()=>g(b)))}s(_,"validateItemsWithCount");function m(y,b){t.forRange("i",0,f,E=>{e.subschema({keyword:"contains",dataProp:E,dataPropType:aI.Type.Num,compositeRule:!0},y),b()})}s(m,"validateItems");function g(y){t.code((0,_s._)`${y}++`),u===void 0?t.if((0,_s._)`${y} >= ${a}`,()=>t.assign(d,!0).break()):(t.if((0,_s._)`${y} > ${u}`,()=>t.assign(d,!1).break()),a===1?t.assign(d,!0):t.if((0,_s._)`${y} >= ${a}`,()=>t.assign(d,!0)))}s(g,"checkLimits")}};UL.default=I4e});var uI=h(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});ia.validateSchemaDeps=ia.validatePropertyDeps=ia.error=void 0;var xL=Oe(),w4e=Ve(),Fy=hs();ia.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,xL.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,xL._)`{property: ${e},
|
|
139
139
|
missingProperty: ${n},
|
|
140
140
|
depsCount: ${t},
|
|
141
|
-
deps: ${r}}`};var T4e={keyword:"dependencies",type:"object",schemaType:"object",error:ia.error,code(e){let[t,r]=N4e(e);mW(e,t),_W(e,r)}};function N4e({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}s(N4e,"splitDependencies");function mW(e,t=e.schema){let{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;let o=r.let("missing");for(let a in t){let u=t[a];if(u.length===0)continue;let c=(0,Fy.propertyInData)(r,n,a,i.opts.ownProperties);e.setParams({property:a,depsCount:u.length,deps:u.join(", ")}),i.allErrors?r.if(c,()=>{for(let l of u)(0,Fy.checkReportMissingProp)(e,l)}):(r.if((0,xL._)`${c} && (${(0,Fy.checkMissingProp)(e,u,o)})`),(0,Fy.reportMissingProp)(e,o),r.else())}}s(mW,"validatePropertyDeps");ia.validatePropertyDeps=mW;function _W(e,t=e.schema){let{gen:r,data:n,keyword:i,it:o}=e,a=r.name("valid");for(let u in t)(0,w4e.alwaysValidSchema)(o,t[u])||(r.if((0,Fy.propertyInData)(r,n,u,o.opts.ownProperties),()=>{let c=e.subschema({keyword:i,schemaProp:u},a);e.mergeValidEvaluated(c,a)},()=>r.var(a,!0)),e.ok(a))}s(_W,"validateSchemaDeps");ia.validateSchemaDeps=_W;ia.default=T4e});var yW=h(qL=>{"use strict";Object.defineProperty(qL,"__esModule",{value:!0});var gW=Oe(),A4e=Ve(),R4e={message:"property name must be valid",params:({params:e})=>(0,gW._)`{propertyName: ${e.propertyName}}`},C4e={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:R4e,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,A4e.alwaysValidSchema)(i,r))return;let o=t.name("valid");t.forIn("key",n,a=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),t.if((0,gW.not)(o),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(o)}};qL.default=C4e});var kL=h(FL=>{"use strict";Object.defineProperty(FL,"__esModule",{value:!0});var cI=hs(),uo=Oe(),$4e=ps(),lI=Ve(),D4e={message:"must NOT have additional properties",params:({params:e})=>(0,uo._)`{additionalProperty: ${e.additionalProperty}}`},L4e={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:D4e,code(e){let{gen:t,schema:r,parentSchema:n,data:i,errsCount:o,it:a}=e;if(!o)throw new Error("ajv implementation error");let{allErrors:u,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,lI.alwaysValidSchema)(a,r))return;let l=(0,cI.allSchemaProperties)(n.properties),f=(0,cI.allSchemaProperties)(n.patternProperties);d(),e.ok((0,uo._)`${o} === ${$4e.default.errors}`);function d(){t.forIn("key",i,b=>{!l.length&&!f.length?g(b):t.if(_(b),()=>g(b))})}s(d,"checkAdditionalProperties");function _(b){let E;if(l.length>8){let S=(0,lI.schemaRefOrVal)(a,n.properties,"properties");E=(0,cI.isOwnProperty)(t,S,b)}else l.length?E=(0,uo.or)(...l.map(S=>(0,uo._)`${b} === ${S}`)):E=uo.nil;return f.length&&(E=(0,uo.or)(E,...f.map(S=>(0,uo._)`${(0,cI.usePattern)(e,S)}.test(${b})`))),(0,uo.not)(E)}s(_,"isAdditional");function m(b){t.code((0,uo._)`delete ${i}[${b}]`)}s(m,"deleteAdditional");function g(b){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(b);return}if(r===!1){e.setParams({additionalProperty:b}),e.error(),u||t.break();return}if(typeof r=="object"&&!(0,lI.alwaysValidSchema)(a,r)){let E=t.name("valid");c.removeAdditional==="failing"?(y(b,E,!1),t.if((0,uo.not)(E),()=>{e.reset(),m(b)})):(y(b,E),u||t.if((0,uo.not)(E),()=>t.break()))}}s(g,"additionalPropertyCode");function y(b,E,S){let O={keyword:"additionalProperties",dataProp:b,dataPropType:lI.Type.Str};S===!1&&Object.assign(O,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(O,E)}s(y,"applyAdditionalSchema")}};FL.default=L4e});var SW=h(GL=>{"use strict";Object.defineProperty(GL,"__esModule",{value:!0});var j4e=jh(),EW=hs(),BL=Ve(),bW=kL(),M4e={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&bW.default.code(new j4e.KeywordCxt(o,bW.default,"additionalProperties"));let a=(0,EW.allSchemaProperties)(r);for(let d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=BL.mergeEvaluated.props(t,(0,BL.toHash)(a),o.props));let u=a.filter(d=>!(0,BL.alwaysValidSchema)(o,r[d]));if(u.length===0)return;let c=t.name("valid");for(let d of u)l(d)?f(d):(t.if((0,EW.propertyInData)(t,i,d,o.opts.ownProperties)),f(d),o.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function l(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}s(l,"hasDefault");function f(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}s(f,"applyPropertySchema")}};GL.default=M4e});var IW=h(VL=>{"use strict";Object.defineProperty(VL,"__esModule",{value:!0});var vW=hs(),fI=Oe(),OW=Ve(),PW=Ve(),U4e={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:o}=e,{opts:a}=o,u=(0,vW.allSchemaProperties)(r),c=u.filter(y=>(0,OW.alwaysValidSchema)(o,r[y]));if(u.length===0||c.length===u.length&&(!o.opts.unevaluated||o.props===!0))return;let l=a.strictSchema&&!a.allowMatchingProperties&&i.properties,f=t.name("valid");o.props!==!0&&!(o.props instanceof fI.Name)&&(o.props=(0,PW.evaluatedPropsToName)(t,o.props));let{props:d}=o;_();function _(){for(let y of u)l&&m(y),o.allErrors?g(y):(t.var(f,!0),g(y),t.if(f))}s(_,"validatePatternProperties");function m(y){for(let b in l)new RegExp(y).test(b)&&(0,OW.checkStrictMode)(o,`property ${b} matches pattern ${y} (use allowMatchingProperties)`)}s(m,"checkMatchingProperties");function g(y){t.forIn("key",n,b=>{t.if((0,fI._)`${(0,vW.usePattern)(e,y)}.test(${b})`,()=>{let E=c.includes(y);E||e.subschema({keyword:"patternProperties",schemaProp:y,dataProp:b,dataPropType:PW.Type.Str},f),o.opts.unevaluated&&d!==!0?t.assign((0,fI._)`${d}[${b}]`,!0):!E&&!o.allErrors&&t.if((0,fI.not)(f),()=>t.break())})})}s(g,"validateProperties")}};VL.default=U4e});var wW=h(zL=>{"use strict";Object.defineProperty(zL,"__esModule",{value:!0});var x4e=Ve(),q4e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,x4e.alwaysValidSchema)(n,r)){e.fail();return}let i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};zL.default=q4e});var TW=h(HL=>{"use strict";Object.defineProperty(HL,"__esModule",{value:!0});var F4e=hs(),k4e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:F4e.validateUnion,error:{message:"must match a schema in anyOf"}};HL.default=k4e});var NW=h(KL=>{"use strict";Object.defineProperty(KL,"__esModule",{value:!0});var dI=Oe(),B4e=Ve(),G4e={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,dI._)`{passingSchemas: ${e.passing}}`},V4e={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:G4e,code(e){let{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,a=t.let("valid",!1),u=t.let("passing",null),c=t.name("_valid");e.setParams({passing:u}),t.block(l),e.result(a,()=>e.reset(),()=>e.error(!0));function l(){o.forEach((f,d)=>{let _;(0,B4e.alwaysValidSchema)(i,f)?t.var(c,!0):_=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,dI._)`${c} && ${a}`).assign(a,!1).assign(u,(0,dI._)`[${u}, ${d}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(u,d),_&&e.mergeEvaluated(_,dI.Name)})})}s(l,"validateOneOf")}};KL.default=V4e});var AW=h(WL=>{"use strict";Object.defineProperty(WL,"__esModule",{value:!0});var z4e=Ve(),H4e={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=t.name("valid");r.forEach((o,a)=>{if((0,z4e.alwaysValidSchema)(n,o))return;let u=e.subschema({keyword:"allOf",schemaProp:a},i);e.ok(i),e.mergeEvaluated(u)})}};WL.default=H4e});var $W=h(YL=>{"use strict";Object.defineProperty(YL,"__esModule",{value:!0});var pI=Oe(),CW=Ve(),K4e={message:({params:e})=>(0,pI.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,pI._)`{failingKeyword: ${e.ifClause}}`},W4e={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:K4e,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,CW.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=RW(n,"then"),o=RW(n,"else");if(!i&&!o)return;let a=t.let("valid",!0),u=t.name("_valid");if(c(),e.reset(),i&&o){let f=t.let("ifClause");e.setParams({ifClause:f}),t.if(u,l("then",f),l("else",f))}else i?t.if(u,l("then")):t.if((0,pI.not)(u),l("else"));e.pass(a,()=>e.error(!0));function c(){let f=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(f)}s(c,"validateIf");function l(f,d){return()=>{let _=e.subschema({keyword:f},u);t.assign(a,u),e.mergeValidEvaluated(_,a),d?t.assign(d,(0,pI._)`${f}`):e.setParams({ifClause:f})}}s(l,"validateClause")}};function RW(e,t){let r=e.schema[t];return r!==void 0&&!(0,CW.alwaysValidSchema)(e,r)}s(RW,"hasSchema");YL.default=W4e});var DW=h(JL=>{"use strict";Object.defineProperty(JL,"__esModule",{value:!0});var Y4e=Ve(),J4e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,Y4e.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};JL.default=J4e});var QL=h(XL=>{"use strict";Object.defineProperty(XL,"__esModule",{value:!0});var X4e=DL(),Q4e=fW(),Z4e=LL(),eGe=pW(),tGe=hW(),rGe=uI(),nGe=yW(),iGe=kL(),sGe=SW(),oGe=IW(),aGe=wW(),uGe=TW(),cGe=NW(),lGe=AW(),fGe=$W(),dGe=DW();function pGe(e=!1){let t=[aGe.default,uGe.default,cGe.default,lGe.default,fGe.default,dGe.default,nGe.default,iGe.default,rGe.default,sGe.default,oGe.default];return e?t.push(Q4e.default,eGe.default):t.push(X4e.default,Z4e.default),t.push(tGe.default),t}s(pGe,"getApplicator");XL.default=pGe});var LW=h(ZL=>{"use strict";Object.defineProperty(ZL,"__esModule",{value:!0});var pr=Oe(),hGe={message:({schemaCode:e})=>(0,pr.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,pr._)`{format: ${e}}`},mGe={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:hGe,code(e,t){let{gen:r,data:n,$data:i,schema:o,schemaCode:a,it:u}=e,{opts:c,errSchemaPath:l,schemaEnv:f,self:d}=u;if(!c.validateFormats)return;i?_():m();function _(){let g=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),y=r.const("fDef",(0,pr._)`${g}[${a}]`),b=r.let("fType"),E=r.let("format");r.if((0,pr._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(b,(0,pr._)`${y}.type || "string"`).assign(E,(0,pr._)`${y}.validate`),()=>r.assign(b,(0,pr._)`"string"`).assign(E,y)),e.fail$data((0,pr.or)(S(),O()));function S(){return c.strictSchema===!1?pr.nil:(0,pr._)`${a} && !${E}`}s(S,"unknownFmt");function O(){let I=f.$async?(0,pr._)`(${y}.async ? await ${E}(${n}) : ${E}(${n}))`:(0,pr._)`${E}(${n})`,w=(0,pr._)`(typeof ${E} == "function" ? ${I} : ${E}.test(${n}))`;return(0,pr._)`${E} && ${E} !== true && ${b} === ${t} && !${w}`}s(O,"invalidFmt")}s(_,"validate$DataFormat");function m(){let g=d.formats[o];if(!g){S();return}if(g===!0)return;let[y,b,E]=O(g);y===t&&e.pass(I());function S(){if(c.strictSchema===!1){d.logger.warn(w());return}throw new Error(w());function w(){return`unknown format "${o}" ignored in schema at path "${l}"`}}s(S,"unknownFormat");function O(w){let j=w instanceof RegExp?(0,pr.regexpCode)(w):c.code.formats?(0,pr._)`${c.code.formats}${(0,pr.getProperty)(o)}`:void 0,F=r.scopeValue("formats",{key:o,ref:w,code:j});return typeof w=="object"&&!(w instanceof RegExp)?[w.type||"string",w.validate,(0,pr._)`${F}.validate`]:["string",w,F]}s(O,"getFormat");function I(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!f.$async)throw new Error("async format in sync schema");return(0,pr._)`await ${E}(${n})`}return typeof b=="function"?(0,pr._)`${E}(${n})`:(0,pr._)`${E}.test(${n})`}s(I,"validCondition")}s(m,"validateFormat")}};ZL.default=mGe});var tj=h(ej=>{"use strict";Object.defineProperty(ej,"__esModule",{value:!0});var _Ge=LW(),gGe=[_Ge.default];ej.default=gGe});var rj=h(qh=>{"use strict";Object.defineProperty(qh,"__esModule",{value:!0});qh.contentVocabulary=qh.metadataVocabulary=void 0;qh.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];qh.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var MW=h(nj=>{"use strict";Object.defineProperty(nj,"__esModule",{value:!0});var yGe=mL(),EGe=CL(),bGe=QL(),SGe=tj(),jW=rj(),vGe=[yGe.default,EGe.default,(0,bGe.default)(),SGe.default,jW.metadataVocabulary,jW.contentVocabulary];nj.default=vGe});var UW=h(ky=>{"use strict";Object.defineProperty(ky,"__esModule",{value:!0});ky.DiscrError=void 0;var OGe;(function(e){e.Tag="tag",e.Mapping="mapping"})(OGe=ky.DiscrError||(ky.DiscrError={}))});var oj=h(sj=>{"use strict";Object.defineProperty(sj,"__esModule",{value:!0});var Fh=Oe(),ij=UW(),xW=Ny(),PGe=Ve(),IGe={message:({params:{discrError:e,tagName:t}})=>e===ij.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Fh._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},wGe={keyword:"discriminator",type:"object",schemaType:"object",error:IGe,code(e){let{gen:t,data:r,schema:n,parentSchema:i,it:o}=e,{oneOf:a}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let u=n.propertyName;if(typeof u!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),l=t.const("tag",(0,Fh._)`${r}${(0,Fh.getProperty)(u)}`);t.if((0,Fh._)`typeof ${l} == "string"`,()=>f(),()=>e.error(!1,{discrError:ij.DiscrError.Tag,tag:l,tagName:u})),e.ok(c);function f(){let m=_();t.if(!1);for(let g in m)t.elseIf((0,Fh._)`${l} === ${g}`),t.assign(c,d(m[g]));t.else(),e.error(!1,{discrError:ij.DiscrError.Mapping,tag:l,tagName:u}),t.endIf()}s(f,"validateMapping");function d(m){let g=t.name("valid"),y=e.subschema({keyword:"oneOf",schemaProp:m},g);return e.mergeEvaluated(y,Fh.Name),g}s(d,"applyTagSchema");function _(){var m;let g={},y=E(i),b=!0;for(let I=0;I<a.length;I++){let w=a[I];w?.$ref&&!(0,PGe.schemaHasRulesButRef)(w,o.self.RULES)&&(w=xW.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,w?.$ref),w instanceof xW.SchemaEnv&&(w=w.schema));let j=(m=w?.properties)===null||m===void 0?void 0:m[u];if(typeof j!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`);b=b&&(y||E(w)),S(j,I)}if(!b)throw new Error(`discriminator: "${u}" must be required`);return g;function E({required:I}){return Array.isArray(I)&&I.includes(u)}function S(I,w){if(I.const)O(I.const,w);else if(I.enum)for(let j of I.enum)O(j,w);else throw new Error(`discriminator: "properties/${u}" must have "const" or "enum"`)}function O(I,w){if(typeof I!="string"||I in g)throw new Error(`discriminator: "${u}" values must be unique strings`);g[I]=w}}s(_,"getMapping")}};sj.default=wGe});var qW=h((WAt,TGe)=>{TGe.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var BW=h((tr,kW)=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.MissingRefError=tr.ValidationError=tr.CodeGen=tr.Name=tr.nil=tr.stringify=tr.str=tr._=tr.KeywordCxt=void 0;var NGe=dL(),AGe=MW(),RGe=oj(),FW=qW(),CGe=["/properties"],hI="http://json-schema.org/draft-07/schema",mI=class extends NGe.default{static{s(this,"Ajv")}_addVocabularies(){super._addVocabularies(),AGe.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(RGe.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(FW,CGe):FW;this.addMetaSchema(t,hI,!1),this.refs["http://json-schema.org/schema"]=hI}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(hI)?hI:void 0)}};kW.exports=tr=mI;Object.defineProperty(tr,"__esModule",{value:!0});tr.default=mI;var $Ge=jh();Object.defineProperty(tr,"KeywordCxt",{enumerable:!0,get:function(){return $Ge.KeywordCxt}});var kh=Oe();Object.defineProperty(tr,"_",{enumerable:!0,get:function(){return kh._}});Object.defineProperty(tr,"str",{enumerable:!0,get:function(){return kh.str}});Object.defineProperty(tr,"stringify",{enumerable:!0,get:function(){return kh.stringify}});Object.defineProperty(tr,"nil",{enumerable:!0,get:function(){return kh.nil}});Object.defineProperty(tr,"Name",{enumerable:!0,get:function(){return kh.Name}});Object.defineProperty(tr,"CodeGen",{enumerable:!0,get:function(){return kh.CodeGen}});var DGe=wy();Object.defineProperty(tr,"ValidationError",{enumerable:!0,get:function(){return DGe.default}});var LGe=Ty();Object.defineProperty(tr,"MissingRefError",{enumerable:!0,get:function(){return LGe.default}})});var WW=h(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.formatNames=sa.fastFormats=sa.fullFormats=void 0;function Bh(e,t){return{validate:e,compare:t}}s(Bh,"fmtDef");sa.fullFormats={date:Bh(zW,cj),time:Bh(HW,lj),"date-time":Bh(xGe,KW),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:kGe,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:WGe,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:BGe,int32:{type:"number",validate:zGe},int64:{type:"number",validate:HGe},float:{type:"number",validate:VW},double:{type:"number",validate:VW},password:!0,binary:!0};sa.fastFormats={...sa.fullFormats,date:Bh(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,cj),time:Bh(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,lj),"date-time":Bh(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,KW),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};sa.formatNames=Object.keys(sa.fullFormats);function jGe(e){return e%4===0&&(e%100!==0||e%400===0)}s(jGe,"isLeapYear");var MGe=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,UGe=[0,31,28,31,30,31,30,31,31,30,31,30,31];function zW(e){let t=MGe.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&i<=(n===2&&jGe(r)?29:UGe[n])}s(zW,"date");function cj(e,t){if(e&&t)return e>t?1:e<t?-1:0}s(cj,"compareDate");var aj=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function HW(e,t){let r=aj.exec(e);if(!r)return!1;let n=+r[1],i=+r[2],o=+r[3],a=r[5];return(n<=23&&i<=59&&o<=59||n===23&&i===59&&o===60)&&(!t||a!=="")}s(HW,"time");function lj(e,t){if(!(e&&t))return;let r=aj.exec(e),n=aj.exec(t);if(r&&n)return e=r[1]+r[2]+r[3]+(r[4]||""),t=n[1]+n[2]+n[3]+(n[4]||""),e>t?1:e<t?-1:0}s(lj,"compareTime");var uj=/t|\s/i;function xGe(e){let t=e.split(uj);return t.length===2&&zW(t[0])&&HW(t[1],!0)}s(xGe,"date_time");function KW(e,t){if(!(e&&t))return;let[r,n]=e.split(uj),[i,o]=t.split(uj),a=cj(r,i);if(a!==void 0)return a||lj(n,o)}s(KW,"compareDateTime");var qGe=/\/|:/,FGe=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function kGe(e){return qGe.test(e)&&FGe.test(e)}s(kGe,"uri");var GW=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function BGe(e){return GW.lastIndex=0,GW.test(e)}s(BGe,"byte");var GGe=-(2**31),VGe=2**31-1;function zGe(e){return Number.isInteger(e)&&e<=VGe&&e>=GGe}s(zGe,"validateInt32");function HGe(e){return Number.isInteger(e)}s(HGe,"validateInt64");function VW(){return!0}s(VW,"validateNumber");var KGe=/[^\\]\\Z/;function WGe(e){if(KGe.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}s(WGe,"regex")});var Vy=h(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.regexpCode=dt.getEsmExportName=dt.getProperty=dt.safeStringify=dt.stringify=dt.strConcat=dt.addCodeArg=dt.str=dt._=dt.nil=dt._Code=dt.Name=dt.IDENTIFIER=dt._CodeOrName=void 0;var By=class{static{s(this,"_CodeOrName")}};dt._CodeOrName=By;dt.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var rd=class extends By{static{s(this,"Name")}constructor(t){if(super(),!dt.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};dt.Name=rd;var gs=class extends By{static{s(this,"_Code")}constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof rd&&(r[n.str]=(r[n.str]||0)+1),r),{})}};dt._Code=gs;dt.nil=new gs("");function YW(e,...t){let r=[e[0]],n=0;for(;n<t.length;)dj(r,t[n]),r.push(e[++n]);return new gs(r)}s(YW,"_");dt._=YW;var fj=new gs("+");function JW(e,...t){let r=[Gy(e[0])],n=0;for(;n<t.length;)r.push(fj),dj(r,t[n]),r.push(fj,Gy(e[++n]));return YGe(r),new gs(r)}s(JW,"str");dt.str=JW;function dj(e,t){t instanceof gs?e.push(...t._items):t instanceof rd?e.push(t):e.push(QGe(t))}s(dj,"addCodeArg");dt.addCodeArg=dj;function YGe(e){let t=1;for(;t<e.length-1;){if(e[t]===fj){let r=JGe(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}s(YGe,"optimize");function JGe(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof rd||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof rd))return`"${e}${t.slice(1)}`}s(JGe,"mergeExprItems");function XGe(e,t){return t.emptyStr()?e:e.emptyStr()?t:JW`${e}${t}`}s(XGe,"strConcat");dt.strConcat=XGe;function QGe(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Gy(Array.isArray(e)?e.join(","):e)}s(QGe,"interpolate");function ZGe(e){return new gs(Gy(e))}s(ZGe,"stringify");dt.stringify=ZGe;function Gy(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}s(Gy,"safeStringify");dt.safeStringify=Gy;function e6e(e){return typeof e=="string"&&dt.IDENTIFIER.test(e)?new gs(`.${e}`):YW`[${e}]`}s(e6e,"getProperty");dt.getProperty=e6e;function t6e(e){if(typeof e=="string"&&dt.IDENTIFIER.test(e))return new gs(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}s(t6e,"getEsmExportName");dt.getEsmExportName=t6e;function r6e(e){return new gs(e.toString())}s(r6e,"regexpCode");dt.regexpCode=r6e});var _j=h(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.ValueScope=Bn.ValueScopeName=Bn.Scope=Bn.varKinds=Bn.UsedValueState=void 0;var Ei=Vy(),pj=class extends Error{static{s(this,"ValueError")}constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},hj;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(hj=Bn.UsedValueState||(Bn.UsedValueState={}));Bn.varKinds={const:new Ei.Name("const"),let:new Ei.Name("let"),var:new Ei.Name("var")};var _I=class{static{s(this,"Scope")}constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof Ei.Name?t:this.name(t)}name(t){return new Ei.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};Bn.Scope=_I;var gI=class extends Ei.Name{static{s(this,"ValueScopeName")}constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,Ei._)`.${new Ei.Name(r)}[${n}]`}};Bn.ValueScopeName=gI;var n6e=(0,Ei._)`\n`,mj=class extends _I{static{s(this,"ValueScope")}constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?n6e:Ei.nil}}get(){return this._scope}name(t){return new gI(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(t),{prefix:o}=i,a=(n=r.key)!==null&&n!==void 0?n:r.ref,u=this._values[o];if(u){let f=u.get(a);if(f)return f}else u=this._values[o]=new Map;u.set(a,i);let c=this._scope[o]||(this._scope[o]=[]),l=c.length;return c[l]=r.ref,i.setValue(r,{property:o,itemIndex:l}),i}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Ei._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(t,r,n={},i){let o=Ei.nil;for(let a in t){let u=t[a];if(!u)continue;let c=n[a]=n[a]||new Map;u.forEach(l=>{if(c.has(l))return;c.set(l,hj.Started);let f=r(l);if(f){let d=this.opts.es5?Bn.varKinds.var:Bn.varKinds.const;o=(0,Ei._)`${o}${d} ${l} = ${f};${this.opts._n}`}else if(f=i?.(l))o=(0,Ei._)`${o}${f}${this.opts._n}`;else throw new pj(l);c.set(l,hj.Completed)})}return o}};Bn.ValueScope=mj});var Re=h(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.or=je.and=je.not=je.CodeGen=je.operators=je.varKinds=je.ValueScopeName=je.ValueScope=je.Scope=je.Name=je.regexpCode=je.stringify=je.getProperty=je.nil=je.strConcat=je.str=je._=void 0;var Qe=Vy(),co=_j(),Oc=Vy();Object.defineProperty(je,"_",{enumerable:!0,get:function(){return Oc._}});Object.defineProperty(je,"str",{enumerable:!0,get:function(){return Oc.str}});Object.defineProperty(je,"strConcat",{enumerable:!0,get:function(){return Oc.strConcat}});Object.defineProperty(je,"nil",{enumerable:!0,get:function(){return Oc.nil}});Object.defineProperty(je,"getProperty",{enumerable:!0,get:function(){return Oc.getProperty}});Object.defineProperty(je,"stringify",{enumerable:!0,get:function(){return Oc.stringify}});Object.defineProperty(je,"regexpCode",{enumerable:!0,get:function(){return Oc.regexpCode}});Object.defineProperty(je,"Name",{enumerable:!0,get:function(){return Oc.Name}});var SI=_j();Object.defineProperty(je,"Scope",{enumerable:!0,get:function(){return SI.Scope}});Object.defineProperty(je,"ValueScope",{enumerable:!0,get:function(){return SI.ValueScope}});Object.defineProperty(je,"ValueScopeName",{enumerable:!0,get:function(){return SI.ValueScopeName}});Object.defineProperty(je,"varKinds",{enumerable:!0,get:function(){return SI.varKinds}});je.operators={GT:new Qe._Code(">"),GTE:new Qe._Code(">="),LT:new Qe._Code("<"),LTE:new Qe._Code("<="),EQ:new Qe._Code("==="),NEQ:new Qe._Code("!=="),NOT:new Qe._Code("!"),OR:new Qe._Code("||"),AND:new Qe._Code("&&"),ADD:new Qe._Code("+")};var cu=class{static{s(this,"Node")}optimizeNodes(){return this}optimizeNames(t,r){return this}},gj=class extends cu{static{s(this,"Def")}constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?co.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=Vh(this.rhs,t,r)),this}get names(){return this.rhs instanceof Qe._CodeOrName?this.rhs.names:{}}},yI=class extends cu{static{s(this,"Assign")}constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof Qe.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=Vh(this.rhs,t,r),this}get names(){let t=this.lhs instanceof Qe.Name?{}:{...this.lhs.names};return bI(t,this.rhs)}},yj=class extends yI{static{s(this,"AssignOp")}constructor(t,r,n,i){super(t,n,i),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},Ej=class extends cu{static{s(this,"Label")}constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},bj=class extends cu{static{s(this,"Break")}constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},Sj=class extends cu{static{s(this,"Throw")}constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},vj=class extends cu{static{s(this,"AnyCode")}constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=Vh(this.code,t,r),this}get names(){return this.code instanceof Qe._CodeOrName?this.code.names:{}}},zy=class extends cu{static{s(this,"ParentNode")}constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,i=n.length;for(;i--;){let o=n[i];o.optimizeNames(t,r)||(i6e(t,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>sd(t,r.names),{})}},lu=class extends zy{static{s(this,"BlockNode")}render(t){return"{"+t._n+super.render(t)+"}"+t._n}},Oj=class extends zy{static{s(this,"Root")}},Gh=class extends lu{static{s(this,"Else")}};Gh.kind="else";var nd=class e extends lu{static{s(this,"If")}constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new Gh(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(XW(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=Vh(this.condition,t,r),this}get names(){let t=super.names;return bI(t,this.condition),this.else&&sd(t,this.else.names),t}};nd.kind="if";var id=class extends lu{static{s(this,"For")}};id.kind="for";var Pj=class extends id{static{s(this,"ForLoop")}constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=Vh(this.iteration,t,r),this}get names(){return sd(super.names,this.iteration.names)}},Ij=class extends id{static{s(this,"ForRange")}constructor(t,r,n,i){super(),this.varKind=t,this.name=r,this.from=n,this.to=i}render(t){let r=t.es5?co.varKinds.var:this.varKind,{name:n,from:i,to:o}=this;return`for(${r} ${n}=${i}; ${n}<${o}; ${n}++)`+super.render(t)}get names(){let t=bI(super.names,this.from);return bI(t,this.to)}},EI=class extends id{static{s(this,"ForIter")}constructor(t,r,n,i){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=i}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=Vh(this.iterable,t,r),this}get names(){return sd(super.names,this.iterable.names)}},Hy=class extends lu{static{s(this,"Func")}constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};Hy.kind="func";var Ky=class extends zy{static{s(this,"Return")}render(t){return"return "+super.render(t)}};Ky.kind="return";var wj=class extends lu{static{s(this,"Try")}render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,i;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(i=this.finally)===null||i===void 0||i.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&sd(t,this.catch.names),this.finally&&sd(t,this.finally.names),t}},Wy=class extends lu{static{s(this,"Catch")}constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};Wy.kind="catch";var Yy=class extends lu{static{s(this,"Finally")}render(t){return"finally"+super.render(t)}};Yy.kind="finally";var Tj=class{static{s(this,"CodeGen")}constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
141
|
+
deps: ${r}}`};var T4e={keyword:"dependencies",type:"object",schemaType:"object",error:ia.error,code(e){let[t,r]=N4e(e);mW(e,t),_W(e,r)}};function N4e({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}s(N4e,"splitDependencies");function mW(e,t=e.schema){let{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;let o=r.let("missing");for(let a in t){let u=t[a];if(u.length===0)continue;let c=(0,Fy.propertyInData)(r,n,a,i.opts.ownProperties);e.setParams({property:a,depsCount:u.length,deps:u.join(", ")}),i.allErrors?r.if(c,()=>{for(let l of u)(0,Fy.checkReportMissingProp)(e,l)}):(r.if((0,xL._)`${c} && (${(0,Fy.checkMissingProp)(e,u,o)})`),(0,Fy.reportMissingProp)(e,o),r.else())}}s(mW,"validatePropertyDeps");ia.validatePropertyDeps=mW;function _W(e,t=e.schema){let{gen:r,data:n,keyword:i,it:o}=e,a=r.name("valid");for(let u in t)(0,w4e.alwaysValidSchema)(o,t[u])||(r.if((0,Fy.propertyInData)(r,n,u,o.opts.ownProperties),()=>{let c=e.subschema({keyword:i,schemaProp:u},a);e.mergeValidEvaluated(c,a)},()=>r.var(a,!0)),e.ok(a))}s(_W,"validateSchemaDeps");ia.validateSchemaDeps=_W;ia.default=T4e});var yW=h(qL=>{"use strict";Object.defineProperty(qL,"__esModule",{value:!0});var gW=Oe(),A4e=Ve(),R4e={message:"property name must be valid",params:({params:e})=>(0,gW._)`{propertyName: ${e.propertyName}}`},C4e={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:R4e,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,A4e.alwaysValidSchema)(i,r))return;let o=t.name("valid");t.forIn("key",n,a=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),t.if((0,gW.not)(o),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(o)}};qL.default=C4e});var kL=h(FL=>{"use strict";Object.defineProperty(FL,"__esModule",{value:!0});var cI=hs(),uo=Oe(),$4e=ps(),lI=Ve(),D4e={message:"must NOT have additional properties",params:({params:e})=>(0,uo._)`{additionalProperty: ${e.additionalProperty}}`},L4e={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:D4e,code(e){let{gen:t,schema:r,parentSchema:n,data:i,errsCount:o,it:a}=e;if(!o)throw new Error("ajv implementation error");let{allErrors:u,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,lI.alwaysValidSchema)(a,r))return;let l=(0,cI.allSchemaProperties)(n.properties),f=(0,cI.allSchemaProperties)(n.patternProperties);d(),e.ok((0,uo._)`${o} === ${$4e.default.errors}`);function d(){t.forIn("key",i,b=>{!l.length&&!f.length?g(b):t.if(_(b),()=>g(b))})}s(d,"checkAdditionalProperties");function _(b){let E;if(l.length>8){let v=(0,lI.schemaRefOrVal)(a,n.properties,"properties");E=(0,cI.isOwnProperty)(t,v,b)}else l.length?E=(0,uo.or)(...l.map(v=>(0,uo._)`${b} === ${v}`)):E=uo.nil;return f.length&&(E=(0,uo.or)(E,...f.map(v=>(0,uo._)`${(0,cI.usePattern)(e,v)}.test(${b})`))),(0,uo.not)(E)}s(_,"isAdditional");function m(b){t.code((0,uo._)`delete ${i}[${b}]`)}s(m,"deleteAdditional");function g(b){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(b);return}if(r===!1){e.setParams({additionalProperty:b}),e.error(),u||t.break();return}if(typeof r=="object"&&!(0,lI.alwaysValidSchema)(a,r)){let E=t.name("valid");c.removeAdditional==="failing"?(y(b,E,!1),t.if((0,uo.not)(E),()=>{e.reset(),m(b)})):(y(b,E),u||t.if((0,uo.not)(E),()=>t.break()))}}s(g,"additionalPropertyCode");function y(b,E,v){let O={keyword:"additionalProperties",dataProp:b,dataPropType:lI.Type.Str};v===!1&&Object.assign(O,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(O,E)}s(y,"applyAdditionalSchema")}};FL.default=L4e});var SW=h(GL=>{"use strict";Object.defineProperty(GL,"__esModule",{value:!0});var j4e=jh(),EW=hs(),BL=Ve(),bW=kL(),M4e={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&bW.default.code(new j4e.KeywordCxt(o,bW.default,"additionalProperties"));let a=(0,EW.allSchemaProperties)(r);for(let d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=BL.mergeEvaluated.props(t,(0,BL.toHash)(a),o.props));let u=a.filter(d=>!(0,BL.alwaysValidSchema)(o,r[d]));if(u.length===0)return;let c=t.name("valid");for(let d of u)l(d)?f(d):(t.if((0,EW.propertyInData)(t,i,d,o.opts.ownProperties)),f(d),o.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function l(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}s(l,"hasDefault");function f(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}s(f,"applyPropertySchema")}};GL.default=M4e});var IW=h(VL=>{"use strict";Object.defineProperty(VL,"__esModule",{value:!0});var vW=hs(),fI=Oe(),OW=Ve(),PW=Ve(),U4e={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:o}=e,{opts:a}=o,u=(0,vW.allSchemaProperties)(r),c=u.filter(y=>(0,OW.alwaysValidSchema)(o,r[y]));if(u.length===0||c.length===u.length&&(!o.opts.unevaluated||o.props===!0))return;let l=a.strictSchema&&!a.allowMatchingProperties&&i.properties,f=t.name("valid");o.props!==!0&&!(o.props instanceof fI.Name)&&(o.props=(0,PW.evaluatedPropsToName)(t,o.props));let{props:d}=o;_();function _(){for(let y of u)l&&m(y),o.allErrors?g(y):(t.var(f,!0),g(y),t.if(f))}s(_,"validatePatternProperties");function m(y){for(let b in l)new RegExp(y).test(b)&&(0,OW.checkStrictMode)(o,`property ${b} matches pattern ${y} (use allowMatchingProperties)`)}s(m,"checkMatchingProperties");function g(y){t.forIn("key",n,b=>{t.if((0,fI._)`${(0,vW.usePattern)(e,y)}.test(${b})`,()=>{let E=c.includes(y);E||e.subschema({keyword:"patternProperties",schemaProp:y,dataProp:b,dataPropType:PW.Type.Str},f),o.opts.unevaluated&&d!==!0?t.assign((0,fI._)`${d}[${b}]`,!0):!E&&!o.allErrors&&t.if((0,fI.not)(f),()=>t.break())})})}s(g,"validateProperties")}};VL.default=U4e});var wW=h(zL=>{"use strict";Object.defineProperty(zL,"__esModule",{value:!0});var x4e=Ve(),q4e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,x4e.alwaysValidSchema)(n,r)){e.fail();return}let i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};zL.default=q4e});var TW=h(HL=>{"use strict";Object.defineProperty(HL,"__esModule",{value:!0});var F4e=hs(),k4e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:F4e.validateUnion,error:{message:"must match a schema in anyOf"}};HL.default=k4e});var NW=h(KL=>{"use strict";Object.defineProperty(KL,"__esModule",{value:!0});var dI=Oe(),B4e=Ve(),G4e={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,dI._)`{passingSchemas: ${e.passing}}`},V4e={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:G4e,code(e){let{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,a=t.let("valid",!1),u=t.let("passing",null),c=t.name("_valid");e.setParams({passing:u}),t.block(l),e.result(a,()=>e.reset(),()=>e.error(!0));function l(){o.forEach((f,d)=>{let _;(0,B4e.alwaysValidSchema)(i,f)?t.var(c,!0):_=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,dI._)`${c} && ${a}`).assign(a,!1).assign(u,(0,dI._)`[${u}, ${d}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(u,d),_&&e.mergeEvaluated(_,dI.Name)})})}s(l,"validateOneOf")}};KL.default=V4e});var AW=h(WL=>{"use strict";Object.defineProperty(WL,"__esModule",{value:!0});var z4e=Ve(),H4e={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=t.name("valid");r.forEach((o,a)=>{if((0,z4e.alwaysValidSchema)(n,o))return;let u=e.subschema({keyword:"allOf",schemaProp:a},i);e.ok(i),e.mergeEvaluated(u)})}};WL.default=H4e});var $W=h(YL=>{"use strict";Object.defineProperty(YL,"__esModule",{value:!0});var pI=Oe(),CW=Ve(),K4e={message:({params:e})=>(0,pI.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,pI._)`{failingKeyword: ${e.ifClause}}`},W4e={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:K4e,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,CW.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=RW(n,"then"),o=RW(n,"else");if(!i&&!o)return;let a=t.let("valid",!0),u=t.name("_valid");if(c(),e.reset(),i&&o){let f=t.let("ifClause");e.setParams({ifClause:f}),t.if(u,l("then",f),l("else",f))}else i?t.if(u,l("then")):t.if((0,pI.not)(u),l("else"));e.pass(a,()=>e.error(!0));function c(){let f=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(f)}s(c,"validateIf");function l(f,d){return()=>{let _=e.subschema({keyword:f},u);t.assign(a,u),e.mergeValidEvaluated(_,a),d?t.assign(d,(0,pI._)`${f}`):e.setParams({ifClause:f})}}s(l,"validateClause")}};function RW(e,t){let r=e.schema[t];return r!==void 0&&!(0,CW.alwaysValidSchema)(e,r)}s(RW,"hasSchema");YL.default=W4e});var DW=h(JL=>{"use strict";Object.defineProperty(JL,"__esModule",{value:!0});var Y4e=Ve(),J4e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,Y4e.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};JL.default=J4e});var QL=h(XL=>{"use strict";Object.defineProperty(XL,"__esModule",{value:!0});var X4e=DL(),Q4e=fW(),Z4e=LL(),eGe=pW(),tGe=hW(),rGe=uI(),nGe=yW(),iGe=kL(),sGe=SW(),oGe=IW(),aGe=wW(),uGe=TW(),cGe=NW(),lGe=AW(),fGe=$W(),dGe=DW();function pGe(e=!1){let t=[aGe.default,uGe.default,cGe.default,lGe.default,fGe.default,dGe.default,nGe.default,iGe.default,rGe.default,sGe.default,oGe.default];return e?t.push(Q4e.default,eGe.default):t.push(X4e.default,Z4e.default),t.push(tGe.default),t}s(pGe,"getApplicator");XL.default=pGe});var LW=h(ZL=>{"use strict";Object.defineProperty(ZL,"__esModule",{value:!0});var pr=Oe(),hGe={message:({schemaCode:e})=>(0,pr.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,pr._)`{format: ${e}}`},mGe={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:hGe,code(e,t){let{gen:r,data:n,$data:i,schema:o,schemaCode:a,it:u}=e,{opts:c,errSchemaPath:l,schemaEnv:f,self:d}=u;if(!c.validateFormats)return;i?_():m();function _(){let g=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),y=r.const("fDef",(0,pr._)`${g}[${a}]`),b=r.let("fType"),E=r.let("format");r.if((0,pr._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(b,(0,pr._)`${y}.type || "string"`).assign(E,(0,pr._)`${y}.validate`),()=>r.assign(b,(0,pr._)`"string"`).assign(E,y)),e.fail$data((0,pr.or)(v(),O()));function v(){return c.strictSchema===!1?pr.nil:(0,pr._)`${a} && !${E}`}s(v,"unknownFmt");function O(){let I=f.$async?(0,pr._)`(${y}.async ? await ${E}(${n}) : ${E}(${n}))`:(0,pr._)`${E}(${n})`,w=(0,pr._)`(typeof ${E} == "function" ? ${I} : ${E}.test(${n}))`;return(0,pr._)`${E} && ${E} !== true && ${b} === ${t} && !${w}`}s(O,"invalidFmt")}s(_,"validate$DataFormat");function m(){let g=d.formats[o];if(!g){v();return}if(g===!0)return;let[y,b,E]=O(g);y===t&&e.pass(I());function v(){if(c.strictSchema===!1){d.logger.warn(w());return}throw new Error(w());function w(){return`unknown format "${o}" ignored in schema at path "${l}"`}}s(v,"unknownFormat");function O(w){let j=w instanceof RegExp?(0,pr.regexpCode)(w):c.code.formats?(0,pr._)`${c.code.formats}${(0,pr.getProperty)(o)}`:void 0,F=r.scopeValue("formats",{key:o,ref:w,code:j});return typeof w=="object"&&!(w instanceof RegExp)?[w.type||"string",w.validate,(0,pr._)`${F}.validate`]:["string",w,F]}s(O,"getFormat");function I(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!f.$async)throw new Error("async format in sync schema");return(0,pr._)`await ${E}(${n})`}return typeof b=="function"?(0,pr._)`${E}(${n})`:(0,pr._)`${E}.test(${n})`}s(I,"validCondition")}s(m,"validateFormat")}};ZL.default=mGe});var tj=h(ej=>{"use strict";Object.defineProperty(ej,"__esModule",{value:!0});var _Ge=LW(),gGe=[_Ge.default];ej.default=gGe});var rj=h(qh=>{"use strict";Object.defineProperty(qh,"__esModule",{value:!0});qh.contentVocabulary=qh.metadataVocabulary=void 0;qh.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];qh.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var MW=h(nj=>{"use strict";Object.defineProperty(nj,"__esModule",{value:!0});var yGe=mL(),EGe=CL(),bGe=QL(),SGe=tj(),jW=rj(),vGe=[yGe.default,EGe.default,(0,bGe.default)(),SGe.default,jW.metadataVocabulary,jW.contentVocabulary];nj.default=vGe});var UW=h(ky=>{"use strict";Object.defineProperty(ky,"__esModule",{value:!0});ky.DiscrError=void 0;var OGe;(function(e){e.Tag="tag",e.Mapping="mapping"})(OGe=ky.DiscrError||(ky.DiscrError={}))});var oj=h(sj=>{"use strict";Object.defineProperty(sj,"__esModule",{value:!0});var Fh=Oe(),ij=UW(),xW=Ny(),PGe=Ve(),IGe={message:({params:{discrError:e,tagName:t}})=>e===ij.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Fh._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},wGe={keyword:"discriminator",type:"object",schemaType:"object",error:IGe,code(e){let{gen:t,data:r,schema:n,parentSchema:i,it:o}=e,{oneOf:a}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let u=n.propertyName;if(typeof u!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),l=t.const("tag",(0,Fh._)`${r}${(0,Fh.getProperty)(u)}`);t.if((0,Fh._)`typeof ${l} == "string"`,()=>f(),()=>e.error(!1,{discrError:ij.DiscrError.Tag,tag:l,tagName:u})),e.ok(c);function f(){let m=_();t.if(!1);for(let g in m)t.elseIf((0,Fh._)`${l} === ${g}`),t.assign(c,d(m[g]));t.else(),e.error(!1,{discrError:ij.DiscrError.Mapping,tag:l,tagName:u}),t.endIf()}s(f,"validateMapping");function d(m){let g=t.name("valid"),y=e.subschema({keyword:"oneOf",schemaProp:m},g);return e.mergeEvaluated(y,Fh.Name),g}s(d,"applyTagSchema");function _(){var m;let g={},y=E(i),b=!0;for(let I=0;I<a.length;I++){let w=a[I];w?.$ref&&!(0,PGe.schemaHasRulesButRef)(w,o.self.RULES)&&(w=xW.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,w?.$ref),w instanceof xW.SchemaEnv&&(w=w.schema));let j=(m=w?.properties)===null||m===void 0?void 0:m[u];if(typeof j!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`);b=b&&(y||E(w)),v(j,I)}if(!b)throw new Error(`discriminator: "${u}" must be required`);return g;function E({required:I}){return Array.isArray(I)&&I.includes(u)}function v(I,w){if(I.const)O(I.const,w);else if(I.enum)for(let j of I.enum)O(j,w);else throw new Error(`discriminator: "properties/${u}" must have "const" or "enum"`)}function O(I,w){if(typeof I!="string"||I in g)throw new Error(`discriminator: "${u}" values must be unique strings`);g[I]=w}}s(_,"getMapping")}};sj.default=wGe});var qW=h((WAt,TGe)=>{TGe.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var BW=h((tr,kW)=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.MissingRefError=tr.ValidationError=tr.CodeGen=tr.Name=tr.nil=tr.stringify=tr.str=tr._=tr.KeywordCxt=void 0;var NGe=dL(),AGe=MW(),RGe=oj(),FW=qW(),CGe=["/properties"],hI="http://json-schema.org/draft-07/schema",mI=class extends NGe.default{static{s(this,"Ajv")}_addVocabularies(){super._addVocabularies(),AGe.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(RGe.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(FW,CGe):FW;this.addMetaSchema(t,hI,!1),this.refs["http://json-schema.org/schema"]=hI}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(hI)?hI:void 0)}};kW.exports=tr=mI;Object.defineProperty(tr,"__esModule",{value:!0});tr.default=mI;var $Ge=jh();Object.defineProperty(tr,"KeywordCxt",{enumerable:!0,get:function(){return $Ge.KeywordCxt}});var kh=Oe();Object.defineProperty(tr,"_",{enumerable:!0,get:function(){return kh._}});Object.defineProperty(tr,"str",{enumerable:!0,get:function(){return kh.str}});Object.defineProperty(tr,"stringify",{enumerable:!0,get:function(){return kh.stringify}});Object.defineProperty(tr,"nil",{enumerable:!0,get:function(){return kh.nil}});Object.defineProperty(tr,"Name",{enumerable:!0,get:function(){return kh.Name}});Object.defineProperty(tr,"CodeGen",{enumerable:!0,get:function(){return kh.CodeGen}});var DGe=wy();Object.defineProperty(tr,"ValidationError",{enumerable:!0,get:function(){return DGe.default}});var LGe=Ty();Object.defineProperty(tr,"MissingRefError",{enumerable:!0,get:function(){return LGe.default}})});var WW=h(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.formatNames=sa.fastFormats=sa.fullFormats=void 0;function Bh(e,t){return{validate:e,compare:t}}s(Bh,"fmtDef");sa.fullFormats={date:Bh(zW,cj),time:Bh(HW,lj),"date-time":Bh(xGe,KW),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:kGe,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:WGe,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:BGe,int32:{type:"number",validate:zGe},int64:{type:"number",validate:HGe},float:{type:"number",validate:VW},double:{type:"number",validate:VW},password:!0,binary:!0};sa.fastFormats={...sa.fullFormats,date:Bh(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,cj),time:Bh(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,lj),"date-time":Bh(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,KW),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};sa.formatNames=Object.keys(sa.fullFormats);function jGe(e){return e%4===0&&(e%100!==0||e%400===0)}s(jGe,"isLeapYear");var MGe=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,UGe=[0,31,28,31,30,31,30,31,31,30,31,30,31];function zW(e){let t=MGe.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&i<=(n===2&&jGe(r)?29:UGe[n])}s(zW,"date");function cj(e,t){if(e&&t)return e>t?1:e<t?-1:0}s(cj,"compareDate");var aj=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function HW(e,t){let r=aj.exec(e);if(!r)return!1;let n=+r[1],i=+r[2],o=+r[3],a=r[5];return(n<=23&&i<=59&&o<=59||n===23&&i===59&&o===60)&&(!t||a!=="")}s(HW,"time");function lj(e,t){if(!(e&&t))return;let r=aj.exec(e),n=aj.exec(t);if(r&&n)return e=r[1]+r[2]+r[3]+(r[4]||""),t=n[1]+n[2]+n[3]+(n[4]||""),e>t?1:e<t?-1:0}s(lj,"compareTime");var uj=/t|\s/i;function xGe(e){let t=e.split(uj);return t.length===2&&zW(t[0])&&HW(t[1],!0)}s(xGe,"date_time");function KW(e,t){if(!(e&&t))return;let[r,n]=e.split(uj),[i,o]=t.split(uj),a=cj(r,i);if(a!==void 0)return a||lj(n,o)}s(KW,"compareDateTime");var qGe=/\/|:/,FGe=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function kGe(e){return qGe.test(e)&&FGe.test(e)}s(kGe,"uri");var GW=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function BGe(e){return GW.lastIndex=0,GW.test(e)}s(BGe,"byte");var GGe=-(2**31),VGe=2**31-1;function zGe(e){return Number.isInteger(e)&&e<=VGe&&e>=GGe}s(zGe,"validateInt32");function HGe(e){return Number.isInteger(e)}s(HGe,"validateInt64");function VW(){return!0}s(VW,"validateNumber");var KGe=/[^\\]\\Z/;function WGe(e){if(KGe.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}s(WGe,"regex")});var Vy=h(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.regexpCode=dt.getEsmExportName=dt.getProperty=dt.safeStringify=dt.stringify=dt.strConcat=dt.addCodeArg=dt.str=dt._=dt.nil=dt._Code=dt.Name=dt.IDENTIFIER=dt._CodeOrName=void 0;var By=class{static{s(this,"_CodeOrName")}};dt._CodeOrName=By;dt.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var rd=class extends By{static{s(this,"Name")}constructor(t){if(super(),!dt.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};dt.Name=rd;var gs=class extends By{static{s(this,"_Code")}constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof rd&&(r[n.str]=(r[n.str]||0)+1),r),{})}};dt._Code=gs;dt.nil=new gs("");function YW(e,...t){let r=[e[0]],n=0;for(;n<t.length;)dj(r,t[n]),r.push(e[++n]);return new gs(r)}s(YW,"_");dt._=YW;var fj=new gs("+");function JW(e,...t){let r=[Gy(e[0])],n=0;for(;n<t.length;)r.push(fj),dj(r,t[n]),r.push(fj,Gy(e[++n]));return YGe(r),new gs(r)}s(JW,"str");dt.str=JW;function dj(e,t){t instanceof gs?e.push(...t._items):t instanceof rd?e.push(t):e.push(QGe(t))}s(dj,"addCodeArg");dt.addCodeArg=dj;function YGe(e){let t=1;for(;t<e.length-1;){if(e[t]===fj){let r=JGe(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}s(YGe,"optimize");function JGe(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof rd||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof rd))return`"${e}${t.slice(1)}`}s(JGe,"mergeExprItems");function XGe(e,t){return t.emptyStr()?e:e.emptyStr()?t:JW`${e}${t}`}s(XGe,"strConcat");dt.strConcat=XGe;function QGe(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Gy(Array.isArray(e)?e.join(","):e)}s(QGe,"interpolate");function ZGe(e){return new gs(Gy(e))}s(ZGe,"stringify");dt.stringify=ZGe;function Gy(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}s(Gy,"safeStringify");dt.safeStringify=Gy;function e6e(e){return typeof e=="string"&&dt.IDENTIFIER.test(e)?new gs(`.${e}`):YW`[${e}]`}s(e6e,"getProperty");dt.getProperty=e6e;function t6e(e){if(typeof e=="string"&&dt.IDENTIFIER.test(e))return new gs(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}s(t6e,"getEsmExportName");dt.getEsmExportName=t6e;function r6e(e){return new gs(e.toString())}s(r6e,"regexpCode");dt.regexpCode=r6e});var _j=h(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.ValueScope=Bn.ValueScopeName=Bn.Scope=Bn.varKinds=Bn.UsedValueState=void 0;var Ei=Vy(),pj=class extends Error{static{s(this,"ValueError")}constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},hj;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(hj=Bn.UsedValueState||(Bn.UsedValueState={}));Bn.varKinds={const:new Ei.Name("const"),let:new Ei.Name("let"),var:new Ei.Name("var")};var _I=class{static{s(this,"Scope")}constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof Ei.Name?t:this.name(t)}name(t){return new Ei.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};Bn.Scope=_I;var gI=class extends Ei.Name{static{s(this,"ValueScopeName")}constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,Ei._)`.${new Ei.Name(r)}[${n}]`}};Bn.ValueScopeName=gI;var n6e=(0,Ei._)`\n`,mj=class extends _I{static{s(this,"ValueScope")}constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?n6e:Ei.nil}}get(){return this._scope}name(t){return new gI(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(t),{prefix:o}=i,a=(n=r.key)!==null&&n!==void 0?n:r.ref,u=this._values[o];if(u){let f=u.get(a);if(f)return f}else u=this._values[o]=new Map;u.set(a,i);let c=this._scope[o]||(this._scope[o]=[]),l=c.length;return c[l]=r.ref,i.setValue(r,{property:o,itemIndex:l}),i}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Ei._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(t,r,n={},i){let o=Ei.nil;for(let a in t){let u=t[a];if(!u)continue;let c=n[a]=n[a]||new Map;u.forEach(l=>{if(c.has(l))return;c.set(l,hj.Started);let f=r(l);if(f){let d=this.opts.es5?Bn.varKinds.var:Bn.varKinds.const;o=(0,Ei._)`${o}${d} ${l} = ${f};${this.opts._n}`}else if(f=i?.(l))o=(0,Ei._)`${o}${f}${this.opts._n}`;else throw new pj(l);c.set(l,hj.Completed)})}return o}};Bn.ValueScope=mj});var Re=h(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.or=je.and=je.not=je.CodeGen=je.operators=je.varKinds=je.ValueScopeName=je.ValueScope=je.Scope=je.Name=je.regexpCode=je.stringify=je.getProperty=je.nil=je.strConcat=je.str=je._=void 0;var Qe=Vy(),co=_j(),Oc=Vy();Object.defineProperty(je,"_",{enumerable:!0,get:function(){return Oc._}});Object.defineProperty(je,"str",{enumerable:!0,get:function(){return Oc.str}});Object.defineProperty(je,"strConcat",{enumerable:!0,get:function(){return Oc.strConcat}});Object.defineProperty(je,"nil",{enumerable:!0,get:function(){return Oc.nil}});Object.defineProperty(je,"getProperty",{enumerable:!0,get:function(){return Oc.getProperty}});Object.defineProperty(je,"stringify",{enumerable:!0,get:function(){return Oc.stringify}});Object.defineProperty(je,"regexpCode",{enumerable:!0,get:function(){return Oc.regexpCode}});Object.defineProperty(je,"Name",{enumerable:!0,get:function(){return Oc.Name}});var SI=_j();Object.defineProperty(je,"Scope",{enumerable:!0,get:function(){return SI.Scope}});Object.defineProperty(je,"ValueScope",{enumerable:!0,get:function(){return SI.ValueScope}});Object.defineProperty(je,"ValueScopeName",{enumerable:!0,get:function(){return SI.ValueScopeName}});Object.defineProperty(je,"varKinds",{enumerable:!0,get:function(){return SI.varKinds}});je.operators={GT:new Qe._Code(">"),GTE:new Qe._Code(">="),LT:new Qe._Code("<"),LTE:new Qe._Code("<="),EQ:new Qe._Code("==="),NEQ:new Qe._Code("!=="),NOT:new Qe._Code("!"),OR:new Qe._Code("||"),AND:new Qe._Code("&&"),ADD:new Qe._Code("+")};var cu=class{static{s(this,"Node")}optimizeNodes(){return this}optimizeNames(t,r){return this}},gj=class extends cu{static{s(this,"Def")}constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?co.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=Vh(this.rhs,t,r)),this}get names(){return this.rhs instanceof Qe._CodeOrName?this.rhs.names:{}}},yI=class extends cu{static{s(this,"Assign")}constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof Qe.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=Vh(this.rhs,t,r),this}get names(){let t=this.lhs instanceof Qe.Name?{}:{...this.lhs.names};return bI(t,this.rhs)}},yj=class extends yI{static{s(this,"AssignOp")}constructor(t,r,n,i){super(t,n,i),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},Ej=class extends cu{static{s(this,"Label")}constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},bj=class extends cu{static{s(this,"Break")}constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},Sj=class extends cu{static{s(this,"Throw")}constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},vj=class extends cu{static{s(this,"AnyCode")}constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=Vh(this.code,t,r),this}get names(){return this.code instanceof Qe._CodeOrName?this.code.names:{}}},zy=class extends cu{static{s(this,"ParentNode")}constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,i=n.length;for(;i--;){let o=n[i];o.optimizeNames(t,r)||(i6e(t,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>sd(t,r.names),{})}},lu=class extends zy{static{s(this,"BlockNode")}render(t){return"{"+t._n+super.render(t)+"}"+t._n}},Oj=class extends zy{static{s(this,"Root")}},Gh=class extends lu{static{s(this,"Else")}};Gh.kind="else";var nd=class e extends lu{static{s(this,"If")}constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new Gh(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(XW(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=Vh(this.condition,t,r),this}get names(){let t=super.names;return bI(t,this.condition),this.else&&sd(t,this.else.names),t}};nd.kind="if";var id=class extends lu{static{s(this,"For")}};id.kind="for";var Pj=class extends id{static{s(this,"ForLoop")}constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=Vh(this.iteration,t,r),this}get names(){return sd(super.names,this.iteration.names)}},Ij=class extends id{static{s(this,"ForRange")}constructor(t,r,n,i){super(),this.varKind=t,this.name=r,this.from=n,this.to=i}render(t){let r=t.es5?co.varKinds.var:this.varKind,{name:n,from:i,to:o}=this;return`for(${r} ${n}=${i}; ${n}<${o}; ${n}++)`+super.render(t)}get names(){let t=bI(super.names,this.from);return bI(t,this.to)}},EI=class extends id{static{s(this,"ForIter")}constructor(t,r,n,i){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=i}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=Vh(this.iterable,t,r),this}get names(){return sd(super.names,this.iterable.names)}},Hy=class extends lu{static{s(this,"Func")}constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};Hy.kind="func";var Ky=class extends zy{static{s(this,"Return")}render(t){return"return "+super.render(t)}};Ky.kind="return";var wj=class extends lu{static{s(this,"Try")}render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,i;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(i=this.finally)===null||i===void 0||i.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&sd(t,this.catch.names),this.finally&&sd(t,this.finally.names),t}},Wy=class extends lu{static{s(this,"Catch")}constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};Wy.kind="catch";var Yy=class extends lu{static{s(this,"Finally")}render(t){return"finally"+super.render(t)}};Yy.kind="finally";var Tj=class{static{s(this,"CodeGen")}constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
142
142
|
`:""},this._extScope=t,this._scope=new co.Scope({parent:t}),this._nodes=[new Oj]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,i){let o=this._scope.toName(r);return n!==void 0&&i&&(this._constants[o.str]=n),this._leafNode(new gj(t,o,n)),o}const(t,r,n){return this._def(co.varKinds.const,t,r,n)}let(t,r,n){return this._def(co.varKinds.let,t,r,n)}var(t,r,n){return this._def(co.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new yI(t,r,n))}add(t,r){return this._leafNode(new yj(t,je.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==Qe.nil&&this._leafNode(new vj(t)),this}object(...t){let r=["{"];for(let[n,i]of t)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,Qe.addCodeArg)(r,i));return r.push("}"),new Qe._Code(r)}if(t,r,n){if(this._blockNode(new nd(t)),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(t){return this._elseNode(new nd(t))}else(){return this._elseNode(new Gh)}endIf(){return this._endBlockNode(nd,Gh)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new Pj(t),r)}forRange(t,r,n,i,o=this.opts.es5?co.varKinds.var:co.varKinds.let){let a=this._scope.toName(t);return this._for(new Ij(o,a,r,n),()=>i(a))}forOf(t,r,n,i=co.varKinds.const){let o=this._scope.toName(t);if(this.opts.es5){let a=r instanceof Qe.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,Qe._)`${a}.length`,u=>{this.var(o,(0,Qe._)`${a}[${u}]`),n(o)})}return this._for(new EI("of",i,o,r),()=>n(o))}forIn(t,r,n,i=this.opts.es5?co.varKinds.var:co.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,Qe._)`Object.keys(${r})`,n);let o=this._scope.toName(t);return this._for(new EI("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(id)}label(t){return this._leafNode(new Ej(t))}break(t){return this._leafNode(new bj(t))}return(t){let r=new Ky;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Ky)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new wj;if(this._blockNode(i),this.code(t),r){let o=this.name("e");this._currNode=i.catch=new Wy(o),r(o)}return n&&(this._currNode=i.finally=new Yy,this.code(n)),this._endBlockNode(Wy,Yy)}throw(t){return this._leafNode(new Sj(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){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||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=Qe.nil,n,i){return this._blockNode(new Hy(t,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Hy)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof nd))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};je.CodeGen=Tj;function sd(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}s(sd,"addNames");function bI(e,t){return t instanceof Qe._CodeOrName?sd(e,t.names):e}s(bI,"addExprNames");function Vh(e,t,r){if(e instanceof Qe.Name)return n(e);if(!i(e))return e;return new Qe._Code(e._items.reduce((o,a)=>(a instanceof Qe.Name&&(a=n(a)),a instanceof Qe._Code?o.push(...a._items):o.push(a),o),[]));function n(o){let a=r[o.str];return a===void 0||t[o.str]!==1?o:(delete t[o.str],a)}function i(o){return o instanceof Qe._Code&&o._items.some(a=>a instanceof Qe.Name&&t[a.str]===1&&r[a.str]!==void 0)}}s(Vh,"optimizeExpr");function i6e(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}s(i6e,"subtractNames");function XW(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,Qe._)`!${Nj(e)}`}s(XW,"not");je.not=XW;var s6e=QW(je.operators.AND);function o6e(...e){return e.reduce(s6e)}s(o6e,"and");je.and=o6e;var a6e=QW(je.operators.OR);function u6e(...e){return e.reduce(a6e)}s(u6e,"or");je.or=u6e;function QW(e){return(t,r)=>t===Qe.nil?r:r===Qe.nil?t:(0,Qe._)`${Nj(t)} ${e} ${Nj(r)}`}s(QW,"mappend");function Nj(e){return e instanceof Qe.Name?e:(0,Qe._)`(${e})`}s(Nj,"par")});var pt=h(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.checkStrictMode=Me.getErrorPath=Me.Type=Me.useFunc=Me.setEvaluated=Me.evaluatedPropsToName=Me.mergeEvaluated=Me.eachItem=Me.unescapeJsonPointer=Me.escapeJsonPointer=Me.escapeFragment=Me.unescapeFragment=Me.schemaRefOrVal=Me.schemaHasRulesButRef=Me.schemaHasRules=Me.checkUnknownRules=Me.alwaysValidSchema=Me.toHash=void 0;var Ut=Re(),c6e=Vy();function l6e(e){let t={};for(let r of e)t[r]=!0;return t}s(l6e,"toHash");Me.toHash=l6e;function f6e(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(tY(e,t),!rY(t,e.self.RULES.all))}s(f6e,"alwaysValidSchema");Me.alwaysValidSchema=f6e;function tY(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let i=n.RULES.keywords;for(let o in t)i[o]||oY(e,`unknown keyword: "${o}"`)}s(tY,"checkUnknownRules");Me.checkUnknownRules=tY;function rY(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}s(rY,"schemaHasRules");Me.schemaHasRules=rY;function d6e(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}s(d6e,"schemaHasRulesButRef");Me.schemaHasRulesButRef=d6e;function p6e({topSchemaRef:e,schemaPath:t},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Ut._)`${r}`}return(0,Ut._)`${e}${t}${(0,Ut.getProperty)(n)}`}s(p6e,"schemaRefOrVal");Me.schemaRefOrVal=p6e;function h6e(e){return nY(decodeURIComponent(e))}s(h6e,"unescapeFragment");Me.unescapeFragment=h6e;function m6e(e){return encodeURIComponent(Aj(e))}s(m6e,"escapeFragment");Me.escapeFragment=m6e;function Aj(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}s(Aj,"escapeJsonPointer");Me.escapeJsonPointer=Aj;function nY(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}s(nY,"unescapeJsonPointer");Me.unescapeJsonPointer=nY;function _6e(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}s(_6e,"eachItem");Me.eachItem=_6e;function ZW({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(i,o,a,u)=>{let c=a===void 0?o:a instanceof Ut.Name?(o instanceof Ut.Name?e(i,o,a):t(i,o,a),a):o instanceof Ut.Name?(t(i,a,o),o):r(o,a);return u===Ut.Name&&!(c instanceof Ut.Name)?n(i,c):c}}s(ZW,"makeMergeEvaluated");Me.mergeEvaluated={props:ZW({mergeNames:(e,t,r)=>e.if((0,Ut._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,Ut._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,Ut._)`${r} || {}`).code((0,Ut._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,Ut._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,Ut._)`${r} || {}`),Rj(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:iY}),items:ZW({mergeNames:(e,t,r)=>e.if((0,Ut._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,Ut._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,Ut._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,Ut._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function iY(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,Ut._)`{}`);return t!==void 0&&Rj(e,r,t),r}s(iY,"evaluatedPropsToName");Me.evaluatedPropsToName=iY;function Rj(e,t,r){Object.keys(r).forEach(n=>e.assign((0,Ut._)`${t}${(0,Ut.getProperty)(n)}`,!0))}s(Rj,"setEvaluated");Me.setEvaluated=Rj;var eY={};function g6e(e,t){return e.scopeValue("func",{ref:t,code:eY[t.code]||(eY[t.code]=new c6e._Code(t.code))})}s(g6e,"useFunc");Me.useFunc=g6e;var sY;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(sY=Me.Type||(Me.Type={}));function y6e(e,t,r){if(e instanceof Ut.Name){let n=t===sY.Num;return r?n?(0,Ut._)`"[" + ${e} + "]"`:(0,Ut._)`"['" + ${e} + "']"`:n?(0,Ut._)`"/" + ${e}`:(0,Ut._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Ut.getProperty)(e).toString():"/"+Aj(e)}s(y6e,"getErrorPath");Me.getErrorPath=y6e;function oY(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}s(oY,"checkStrictMode");Me.checkStrictMode=oY});var fu=h(Cj=>{"use strict";Object.defineProperty(Cj,"__esModule",{value:!0});var On=Re(),E6e={data:new On.Name("data"),valCxt:new On.Name("valCxt"),instancePath:new On.Name("instancePath"),parentData:new On.Name("parentData"),parentDataProperty:new On.Name("parentDataProperty"),rootData:new On.Name("rootData"),dynamicAnchors:new On.Name("dynamicAnchors"),vErrors:new On.Name("vErrors"),errors:new On.Name("errors"),this:new On.Name("this"),self:new On.Name("self"),scope:new On.Name("scope"),json:new On.Name("json"),jsonPos:new On.Name("jsonPos"),jsonLen:new On.Name("jsonLen"),jsonPart:new On.Name("jsonPart")};Cj.default=E6e});var Jy=h(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.extendErrors=Pn.resetErrorsCount=Pn.reportExtraError=Pn.reportError=Pn.keyword$DataError=Pn.keywordError=void 0;var nt=Re(),vI=pt(),Gn=fu();Pn.keywordError={message:({keyword:e})=>(0,nt.str)`must pass "${e}" keyword validation`};Pn.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,nt.str)`"${e}" keyword must be ${t} ($data)`:(0,nt.str)`"${e}" keyword is invalid ($data)`};function b6e(e,t=Pn.keywordError,r,n){let{it:i}=e,{gen:o,compositeRule:a,allErrors:u}=i,c=cY(e,t,r);n??(a||u)?aY(o,c):uY(i,(0,nt._)`[${c}]`)}s(b6e,"reportError");Pn.reportError=b6e;function S6e(e,t=Pn.keywordError,r){let{it:n}=e,{gen:i,compositeRule:o,allErrors:a}=n,u=cY(e,t,r);aY(i,u),o||a||uY(n,Gn.default.vErrors)}s(S6e,"reportExtraError");Pn.reportExtraError=S6e;function v6e(e,t){e.assign(Gn.default.errors,t),e.if((0,nt._)`${Gn.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,nt._)`${Gn.default.vErrors}.length`,t),()=>e.assign(Gn.default.vErrors,null)))}s(v6e,"resetErrorsCount");Pn.resetErrorsCount=v6e;function O6e({gen:e,keyword:t,schemaValue:r,data:n,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let a=e.name("err");e.forRange("i",i,Gn.default.errors,u=>{e.const(a,(0,nt._)`${Gn.default.vErrors}[${u}]`),e.if((0,nt._)`${a}.instancePath === undefined`,()=>e.assign((0,nt._)`${a}.instancePath`,(0,nt.strConcat)(Gn.default.instancePath,o.errorPath))),e.assign((0,nt._)`${a}.schemaPath`,(0,nt.str)`${o.errSchemaPath}/${t}`),o.opts.verbose&&(e.assign((0,nt._)`${a}.schema`,r),e.assign((0,nt._)`${a}.data`,n))})}s(O6e,"extendErrors");Pn.extendErrors=O6e;function aY(e,t){let r=e.const("err",t);e.if((0,nt._)`${Gn.default.vErrors} === null`,()=>e.assign(Gn.default.vErrors,(0,nt._)`[${r}]`),(0,nt._)`${Gn.default.vErrors}.push(${r})`),e.code((0,nt._)`${Gn.default.errors}++`)}s(aY,"addError");function uY(e,t){let{gen:r,validateName:n,schemaEnv:i}=e;i.$async?r.throw((0,nt._)`new ${e.ValidationError}(${t})`):(r.assign((0,nt._)`${n}.errors`,t),r.return(!1))}s(uY,"returnErrors");var od={keyword:new nt.Name("keyword"),schemaPath:new nt.Name("schemaPath"),params:new nt.Name("params"),propertyName:new nt.Name("propertyName"),message:new nt.Name("message"),schema:new nt.Name("schema"),parentSchema:new nt.Name("parentSchema")};function cY(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,nt._)`{}`:P6e(e,t,r)}s(cY,"errorObjectCode");function P6e(e,t,r={}){let{gen:n,it:i}=e,o=[I6e(i,r),w6e(e,r)];return T6e(e,t,o),n.object(...o)}s(P6e,"errorObject");function I6e({errorPath:e},{instancePath:t}){let r=t?(0,nt.str)`${e}${(0,vI.getErrorPath)(t,vI.Type.Str)}`:e;return[Gn.default.instancePath,(0,nt.strConcat)(Gn.default.instancePath,r)]}s(I6e,"errorInstancePath");function w6e({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let i=n?t:(0,nt.str)`${t}/${e}`;return r&&(i=(0,nt.str)`${i}${(0,vI.getErrorPath)(r,vI.Type.Str)}`),[od.schemaPath,i]}s(w6e,"errorSchemaPath");function T6e(e,{params:t,message:r},n){let{keyword:i,data:o,schemaValue:a,it:u}=e,{opts:c,propertyName:l,topSchemaRef:f,schemaPath:d}=u;n.push([od.keyword,i],[od.params,typeof t=="function"?t(e):t||(0,nt._)`{}`]),c.messages&&n.push([od.message,typeof r=="function"?r(e):r]),c.verbose&&n.push([od.schema,a],[od.parentSchema,(0,nt._)`${f}${d}`],[Gn.default.data,o]),l&&n.push([od.propertyName,l])}s(T6e,"extraErrorProps")});var fY=h(zh=>{"use strict";Object.defineProperty(zh,"__esModule",{value:!0});zh.boolOrEmptySchema=zh.topBoolOrEmptySchema=void 0;var N6e=Jy(),A6e=Re(),R6e=fu(),C6e={message:"boolean schema is false"};function $6e(e){let{gen:t,schema:r,validateName:n}=e;r===!1?lY(e,!1):typeof r=="object"&&r.$async===!0?t.return(R6e.default.data):(t.assign((0,A6e._)`${n}.errors`,null),t.return(!0))}s($6e,"topBoolOrEmptySchema");zh.topBoolOrEmptySchema=$6e;function D6e(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),lY(e)):r.var(t,!0)}s(D6e,"boolOrEmptySchema");zh.boolOrEmptySchema=D6e;function lY(e,t){let{gen:r,data:n}=e,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,N6e.reportError)(i,C6e,void 0,t)}s(lY,"falseSchemaError")});var $j=h(Hh=>{"use strict";Object.defineProperty(Hh,"__esModule",{value:!0});Hh.getRules=Hh.isJSONType=void 0;var L6e=["string","number","integer","boolean","null","object","array"],j6e=new Set(L6e);function M6e(e){return typeof e=="string"&&j6e.has(e)}s(M6e,"isJSONType");Hh.isJSONType=M6e;function U6e(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}s(U6e,"getRules");Hh.getRules=U6e});var Dj=h(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});Pc.shouldUseRule=Pc.shouldUseGroup=Pc.schemaHasRulesForType=void 0;function x6e({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&dY(e,n)}s(x6e,"schemaHasRulesForType");Pc.schemaHasRulesForType=x6e;function dY(e,t){return t.rules.some(r=>pY(e,r))}s(dY,"shouldUseGroup");Pc.shouldUseGroup=dY;function pY(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}s(pY,"shouldUseRule");Pc.shouldUseRule=pY});var Qy=h(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.reportTypeError=en.checkDataTypes=en.checkDataType=en.coerceAndCheckDataType=en.getJSONTypes=en.getSchemaTypes=en.DataType=void 0;var q6e=$j(),F6e=Dj(),k6e=Jy(),Ne=Re(),hY=pt(),Xy;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Xy=en.DataType||(en.DataType={}));function B6e(e){let t=mY(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}s(B6e,"getSchemaTypes");en.getSchemaTypes=B6e;function mY(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(q6e.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}s(mY,"getJSONTypes");en.getJSONTypes=mY;function G6e(e,t){let{gen:r,data:n,opts:i}=e,o=V6e(t,i.coerceTypes),a=t.length>0&&!(o.length===0&&t.length===1&&(0,F6e.schemaHasRulesForType)(e,t[0]));if(a){let u=jj(t,n,i.strictNumbers,Xy.Wrong);r.if(u,()=>{o.length?z6e(e,t,o):Mj(e)})}return a}s(G6e,"coerceAndCheckDataType");en.coerceAndCheckDataType=G6e;var _Y=new Set(["string","number","integer","boolean","null"]);function V6e(e,t){return t?e.filter(r=>_Y.has(r)||t==="array"&&r==="array"):[]}s(V6e,"coerceToTypes");function z6e(e,t,r){let{gen:n,data:i,opts:o}=e,a=n.let("dataType",(0,Ne._)`typeof ${i}`),u=n.let("coerced",(0,Ne._)`undefined`);o.coerceTypes==="array"&&n.if((0,Ne._)`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,Ne._)`${i}[0]`).assign(a,(0,Ne._)`typeof ${i}`).if(jj(t,i,o.strictNumbers),()=>n.assign(u,i))),n.if((0,Ne._)`${u} !== undefined`);for(let l of r)(_Y.has(l)||l==="array"&&o.coerceTypes==="array")&&c(l);n.else(),Mj(e),n.endIf(),n.if((0,Ne._)`${u} !== undefined`,()=>{n.assign(i,u),H6e(e,u)});function c(l){switch(l){case"string":n.elseIf((0,Ne._)`${a} == "number" || ${a} == "boolean"`).assign(u,(0,Ne._)`"" + ${i}`).elseIf((0,Ne._)`${i} === null`).assign(u,(0,Ne._)`""`);return;case"number":n.elseIf((0,Ne._)`${a} == "boolean" || ${i} === null
|
|
143
143
|
|| (${a} == "string" && ${i} && ${i} == +${i})`).assign(u,(0,Ne._)`+${i}`);return;case"integer":n.elseIf((0,Ne._)`${a} === "boolean" || ${i} === null
|
|
144
144
|
|| (${a} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(u,(0,Ne._)`+${i}`);return;case"boolean":n.elseIf((0,Ne._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(u,!1).elseIf((0,Ne._)`${i} === "true" || ${i} === 1`).assign(u,!0);return;case"null":n.elseIf((0,Ne._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(u,null);return;case"array":n.elseIf((0,Ne._)`${a} === "string" || ${a} === "number"
|
|
145
|
-
|| ${a} === "boolean" || ${i} === null`).assign(u,(0,Ne._)`[${i}]`)}}s(c,"coerceSpecificType")}s(z6e,"coerceData");function H6e({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,Ne._)`${t} !== undefined`,()=>e.assign((0,Ne._)`${t}[${r}]`,n))}s(H6e,"assignParentData");function Lj(e,t,r,n=Xy.Correct){let i=n===Xy.Correct?Ne.operators.EQ:Ne.operators.NEQ,o;switch(e){case"null":return(0,Ne._)`${t} ${i} null`;case"array":o=(0,Ne._)`Array.isArray(${t})`;break;case"object":o=(0,Ne._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a((0,Ne._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return(0,Ne._)`typeof ${t} ${i} ${e}`}return n===Xy.Correct?o:(0,Ne.not)(o);function a(u=Ne.nil){return(0,Ne.and)((0,Ne._)`typeof ${t} == "number"`,u,r?(0,Ne._)`isFinite(${t})`:Ne.nil)}}s(Lj,"checkDataType");en.checkDataType=Lj;function jj(e,t,r,n){if(e.length===1)return Lj(e[0],t,r,n);let i,o=(0,hY.toHash)(e);if(o.array&&o.object){let a=(0,Ne._)`typeof ${t} != "object"`;i=o.null?a:(0,Ne._)`!${t} || ${a}`,delete o.null,delete o.array,delete o.object}else i=Ne.nil;o.number&&delete o.integer;for(let a in o)i=(0,Ne.and)(i,Lj(a,t,r,n));return i}s(jj,"checkDataTypes");en.checkDataTypes=jj;var K6e={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,Ne._)`{type: ${e}}`:(0,Ne._)`{type: ${t}}`};function Mj(e){let t=W6e(e);(0,k6e.reportError)(t,K6e)}s(Mj,"reportTypeError");en.reportTypeError=Mj;function W6e(e){let{gen:t,data:r,schema:n}=e,i=(0,hY.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}s(W6e,"getTypeErrorContext")});var yY=h(OI=>{"use strict";Object.defineProperty(OI,"__esModule",{value:!0});OI.assignDefaults=void 0;var Kh=Re(),Y6e=pt();function J6e(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)gY(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,o)=>gY(e,o,i.default))}s(J6e,"assignDefaults");OI.assignDefaults=J6e;function gY(e,t,r){let{gen:n,compositeRule:i,data:o,opts:a}=e;if(r===void 0)return;let u=(0,Kh._)`${o}${(0,Kh.getProperty)(t)}`;if(i){(0,Y6e.checkStrictMode)(e,`default is ignored for: ${u}`);return}let c=(0,Kh._)`${u} === undefined`;a.useDefaults==="empty"&&(c=(0,Kh._)`${c} || ${u} === null || ${u} === ""`),n.if(c,(0,Kh._)`${u} = ${(0,Kh.stringify)(r)}`)}s(gY,"assignDefault")});var ys=h(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.validateUnion=Ct.validateArray=Ct.usePattern=Ct.callValidateCode=Ct.schemaProperties=Ct.allSchemaProperties=Ct.noPropertyInData=Ct.propertyInData=Ct.isOwnProperty=Ct.hasPropFunc=Ct.reportMissingProp=Ct.checkMissingProp=Ct.checkReportMissingProp=void 0;var Gt=Re(),Uj=pt(),Ic=fu(),X6e=pt();function Q6e(e,t){let{gen:r,data:n,it:i}=e;r.if(qj(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Gt._)`${t}`},!0),e.error()})}s(Q6e,"checkReportMissingProp");Ct.checkReportMissingProp=Q6e;function Z6e({gen:e,data:t,it:{opts:r}},n,i){return(0,Gt.or)(...n.map(o=>(0,Gt.and)(qj(e,t,o,r.ownProperties),(0,Gt._)`${i} = ${o}`)))}s(Z6e,"checkMissingProp");Ct.checkMissingProp=Z6e;function e8e(e,t){e.setParams({missingProperty:t},!0),e.error()}s(e8e,"reportMissingProp");Ct.reportMissingProp=e8e;function EY(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Gt._)`Object.prototype.hasOwnProperty`})}s(EY,"hasPropFunc");Ct.hasPropFunc=EY;function xj(e,t,r){return(0,Gt._)`${EY(e)}.call(${t}, ${r})`}s(xj,"isOwnProperty");Ct.isOwnProperty=xj;function t8e(e,t,r,n){let i=(0,Gt._)`${t}${(0,Gt.getProperty)(r)} !== undefined`;return n?(0,Gt._)`${i} && ${xj(e,t,r)}`:i}s(t8e,"propertyInData");Ct.propertyInData=t8e;function qj(e,t,r,n){let i=(0,Gt._)`${t}${(0,Gt.getProperty)(r)} === undefined`;return n?(0,Gt.or)(i,(0,Gt.not)(xj(e,t,r))):i}s(qj,"noPropertyInData");Ct.noPropertyInData=qj;function bY(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}s(bY,"allSchemaProperties");Ct.allSchemaProperties=bY;function r8e(e,t){return bY(t).filter(r=>!(0,Uj.alwaysValidSchema)(e,t[r]))}s(r8e,"schemaProperties");Ct.schemaProperties=r8e;function n8e({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:a},u,c,l){let f=l?(0,Gt._)`${e}, ${t}, ${n}${i}`:t,d=[[Ic.default.instancePath,(0,Gt.strConcat)(Ic.default.instancePath,o)],[Ic.default.parentData,a.parentData],[Ic.default.parentDataProperty,a.parentDataProperty],[Ic.default.rootData,Ic.default.rootData]];a.opts.dynamicRef&&d.push([Ic.default.dynamicAnchors,Ic.default.dynamicAnchors]);let _=(0,Gt._)`${f}, ${r.object(...d)}`;return c!==Gt.nil?(0,Gt._)`${u}.call(${c}, ${_})`:(0,Gt._)`${u}(${_})`}s(n8e,"callValidateCode");Ct.callValidateCode=n8e;var i8e=(0,Gt._)`new RegExp`;function s8e({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,o=i(r,n);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,Gt._)`${i.code==="new RegExp"?i8e:(0,X6e.useFunc)(e,i)}(${r}, ${n})`})}s(s8e,"usePattern");Ct.usePattern=s8e;function o8e(e){let{gen:t,data:r,keyword:n,it:i}=e,o=t.name("valid");if(i.allErrors){let u=t.let("valid",!0);return a(()=>t.assign(u,!1)),u}return t.var(o,!0),a(()=>t.break()),o;function a(u){let c=t.const("len",(0,Gt._)`${r}.length`);t.forRange("i",0,c,l=>{e.subschema({keyword:n,dataProp:l,dataPropType:Uj.Type.Num},o),t.if((0,Gt.not)(o),u)})}s(a,"validateItems")}s(o8e,"validateArray");Ct.validateArray=o8e;function a8e(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,Uj.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let a=t.let("valid",!1),u=t.name("_valid");t.block(()=>r.forEach((c,l)=>{let f=e.subschema({keyword:n,schemaProp:l,compositeRule:!0},u);t.assign(a,(0,Gt._)`${a} || ${u}`),e.mergeValidEvaluated(f,u)||t.if((0,Gt.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}s(a8e,"validateUnion");Ct.validateUnion=a8e});var OY=h(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.validateKeywordUsage=oa.validSchemaType=oa.funcKeywordCode=oa.macroKeywordCode=void 0;var Vn=Re(),ad=fu(),u8e=ys(),c8e=Jy();function l8e(e,t){let{gen:r,keyword:n,schema:i,parentSchema:o,it:a}=e,u=t.macro.call(a.self,i,o,a),c=vY(r,n,u);a.opts.validateSchema!==!1&&a.self.validateSchema(u,!0);let l=r.name("valid");e.subschema({schema:u,schemaPath:Vn.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}s(l8e,"macroKeywordCode");oa.macroKeywordCode=l8e;function f8e(e,t){var r;let{gen:n,keyword:i,schema:o,parentSchema:a,$data:u,it:c}=e;p8e(c,t);let l=!u&&t.compile?t.compile.call(c.self,o,a,c):t.validate,f=vY(n,i,l),d=n.let("valid");e.block$data(d,_),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function _(){if(t.errors===!1)y(),t.modifying&&SY(e),b(()=>e.error());else{let E=t.async?m():g();t.modifying&&SY(e),b(()=>d8e(e,E))}}s(_,"validateKeyword");function m(){let E=n.let("ruleErrs",null);return n.try(()=>y((0,Vn._)`await `),S=>n.assign(d,!1).if((0,Vn._)`${S} instanceof ${c.ValidationError}`,()=>n.assign(E,(0,Vn._)`${S}.errors`),()=>n.throw(S))),E}s(m,"validateAsync");function g(){let E=(0,Vn._)`${f}.errors`;return n.assign(E,null),y(Vn.nil),E}s(g,"validateSync");function y(E=t.async?(0,Vn._)`await `:Vn.nil){let S=c.opts.passContext?ad.default.this:ad.default.self,O=!("compile"in t&&!u||t.schema===!1);n.assign(d,(0,Vn._)`${E}${(0,u8e.callValidateCode)(e,f,S,O)}`,t.modifying)}s(y,"assignValid");function b(E){var S;n.if((0,Vn.not)((S=t.valid)!==null&&S!==void 0?S:d),E)}s(b,"reportErrs")}s(f8e,"funcKeywordCode");oa.funcKeywordCode=f8e;function SY(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Vn._)`${n.parentData}[${n.parentDataProperty}]`))}s(SY,"modifyData");function d8e(e,t){let{gen:r}=e;r.if((0,Vn._)`Array.isArray(${t})`,()=>{r.assign(ad.default.vErrors,(0,Vn._)`${ad.default.vErrors} === null ? ${t} : ${ad.default.vErrors}.concat(${t})`).assign(ad.default.errors,(0,Vn._)`${ad.default.vErrors}.length`),(0,c8e.extendErrors)(e)},()=>e.error())}s(d8e,"addErrs");function p8e({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}s(p8e,"checkAsyncKeyword");function vY(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Vn.stringify)(r)})}s(vY,"useKeyword");function h8e(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}s(h8e,"validSchemaType");oa.validSchemaType=h8e;function m8e({schema:e,opts:t,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 a=i.dependencies;if(a?.some(u=>!Object.prototype.hasOwnProperty.call(e,u)))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){let c=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}s(m8e,"validateKeywordUsage");oa.validateKeywordUsage=m8e});var IY=h(wc=>{"use strict";Object.defineProperty(wc,"__esModule",{value:!0});wc.extendSubschemaMode=wc.extendSubschemaData=wc.getSubschema=void 0;var aa=Re(),PY=pt();function _8e(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:a}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let u=e.schema[t];return r===void 0?{schema:u,schemaPath:(0,aa._)`${e.schemaPath}${(0,aa.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:u[r],schemaPath:(0,aa._)`${e.schemaPath}${(0,aa.getProperty)(t)}${(0,aa.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,PY.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}s(_8e,"getSubschema");wc.getSubschema=_8e;function g8e(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:a}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:u}=t;if(r!==void 0){let{errorPath:l,dataPathArr:f,opts:d}=t,_=u.let("data",(0,aa._)`${t.data}${(0,aa.getProperty)(r)}`,!0);c(_),e.errorPath=(0,aa.str)`${l}${(0,PY.getErrorPath)(r,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,aa._)`${r}`,e.dataPathArr=[...f,e.parentDataProperty]}if(i!==void 0){let l=i instanceof aa.Name?i:u.let("data",i,!0);c(l),a!==void 0&&(e.propertyName=a)}o&&(e.dataTypes=o);function c(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}s(c,"dataContextProps")}s(g8e,"extendSubschemaData");wc.extendSubschemaData=g8e;function y8e(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),o!==void 0&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}s(y8e,"extendSubschemaMode");wc.extendSubschemaMode=y8e});var Zy=h(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.getSchemaRefs=bi.resolveUrl=bi.normalizeId=bi._getFullPath=bi.getFullPath=bi.inlineRef=void 0;var E8e=pt(),b8e=Xf(),S8e=HP(),v8e=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function O8e(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Fj(e):t?wY(e)<=t:!1}s(O8e,"inlineRef");bi.inlineRef=O8e;var P8e=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Fj(e){for(let t in e){if(P8e.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Fj)||typeof r=="object"&&Fj(r))return!0}return!1}s(Fj,"hasRef");function wY(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!v8e.has(r)&&(typeof e[r]=="object"&&(0,E8e.eachItem)(e[r],n=>t+=wY(n)),t===1/0))return 1/0}return t}s(wY,"countKeys");function TY(e,t="",r){r!==!1&&(t=Wh(t));let n=e.parse(t);return NY(e,n)}s(TY,"getFullPath");bi.getFullPath=TY;function NY(e,t){return e.serialize(t).split("#")[0]+"#"}s(NY,"_getFullPath");bi._getFullPath=NY;var I8e=/#\/?$/;function Wh(e){return e?e.replace(I8e,""):""}s(Wh,"normalizeId");bi.normalizeId=Wh;function w8e(e,t,r){return r=Wh(r),e.resolve(t,r)}s(w8e,"resolveUrl");bi.resolveUrl=w8e;var T8e=/^[a-z_][-a-z0-9._]*$/i;function N8e(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=Wh(e[r]||t),o={"":i},a=TY(n,i,!1),u={},c=new Set;return S8e(e,{allKeys:!0},(d,_,m,g)=>{if(g===void 0)return;let y=a+_,b=o[g];typeof d[r]=="string"&&(b=E.call(this,d[r])),S.call(this,d.$anchor),S.call(this,d.$dynamicAnchor),o[_]=b;function E(O){let I=this.opts.uriResolver.resolve;if(O=Wh(b?I(b,O):O),c.has(O))throw f(O);c.add(O);let w=this.refs[O];return typeof w=="string"&&(w=this.refs[w]),typeof w=="object"?l(d,w.schema,O):O!==Wh(y)&&(O[0]==="#"?(l(d,u[O],O),u[O]=d):this.refs[O]=y),O}s(E,"addRef");function S(O){if(typeof O=="string"){if(!T8e.test(O))throw new Error(`invalid anchor "${O}"`);E.call(this,`#${O}`)}}s(S,"addAnchor")}),u;function l(d,_,m){if(_!==void 0&&!b8e(d,_))throw f(m)}s(l,"checkAmbiguosRef");function f(d){return new Error(`reference "${d}" resolves to more than one schema`)}s(f,"ambiguos")}s(N8e,"getSchemaRefs");bi.getSchemaRefs=N8e});var r0=h(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});Tc.getData=Tc.KeywordCxt=Tc.validateFunctionCode=void 0;var DY=fY(),AY=Qy(),Bj=Dj(),PI=Qy(),A8e=yY(),t0=OY(),kj=IY(),ue=Re(),be=fu(),R8e=Zy(),du=pt(),e0=Jy();function C8e(e){if(MY(e)&&(UY(e),jY(e))){L8e(e);return}LY(e,()=>(0,DY.topBoolOrEmptySchema)(e))}s(C8e,"validateFunctionCode");Tc.validateFunctionCode=C8e;function LY({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,(0,ue._)`${be.default.data}, ${be.default.valCxt}`,n.$async,()=>{e.code((0,ue._)`"use strict"; ${RY(r,i)}`),D8e(e,i),e.code(o)}):e.func(t,(0,ue._)`${be.default.data}, ${$8e(i)}`,n.$async,()=>e.code(RY(r,i)).code(o))}s(LY,"validateFunction");function $8e(e){return(0,ue._)`{${be.default.instancePath}="", ${be.default.parentData}, ${be.default.parentDataProperty}, ${be.default.rootData}=${be.default.data}${e.dynamicRef?(0,ue._)`, ${be.default.dynamicAnchors}={}`:ue.nil}}={}`}s($8e,"destructureValCxt");function D8e(e,t){e.if(be.default.valCxt,()=>{e.var(be.default.instancePath,(0,ue._)`${be.default.valCxt}.${be.default.instancePath}`),e.var(be.default.parentData,(0,ue._)`${be.default.valCxt}.${be.default.parentData}`),e.var(be.default.parentDataProperty,(0,ue._)`${be.default.valCxt}.${be.default.parentDataProperty}`),e.var(be.default.rootData,(0,ue._)`${be.default.valCxt}.${be.default.rootData}`),t.dynamicRef&&e.var(be.default.dynamicAnchors,(0,ue._)`${be.default.valCxt}.${be.default.dynamicAnchors}`)},()=>{e.var(be.default.instancePath,(0,ue._)`""`),e.var(be.default.parentData,(0,ue._)`undefined`),e.var(be.default.parentDataProperty,(0,ue._)`undefined`),e.var(be.default.rootData,be.default.data),t.dynamicRef&&e.var(be.default.dynamicAnchors,(0,ue._)`{}`)})}s(D8e,"destructureValCxtES5");function L8e(e){let{schema:t,opts:r,gen:n}=e;LY(e,()=>{r.$comment&&t.$comment&&qY(e),q8e(e),n.let(be.default.vErrors,null),n.let(be.default.errors,0),r.unevaluated&&j8e(e),xY(e),B8e(e)})}s(L8e,"topSchemaObjCode");function j8e(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,ue._)`${r}.evaluated`),t.if((0,ue._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,ue._)`${e.evaluated}.props`,(0,ue._)`undefined`)),t.if((0,ue._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,ue._)`${e.evaluated}.items`,(0,ue._)`undefined`))}s(j8e,"resetEvaluated");function RY(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,ue._)`/*# sourceURL=${r} */`:ue.nil}s(RY,"funcSourceUrl");function M8e(e,t){if(MY(e)&&(UY(e),jY(e))){U8e(e,t);return}(0,DY.boolOrEmptySchema)(e,t)}s(M8e,"subschemaCode");function jY({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}s(jY,"schemaCxtHasRules");function MY(e){return typeof e.schema!="boolean"}s(MY,"isSchemaObj");function U8e(e,t){let{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&qY(e),F8e(e),k8e(e);let o=n.const("_errs",be.default.errors);xY(e,o),n.var(t,(0,ue._)`${o} === ${be.default.errors}`)}s(U8e,"subSchemaObjCode");function UY(e){(0,du.checkUnknownRules)(e),x8e(e)}s(UY,"checkKeywords");function xY(e,t){if(e.opts.jtd)return CY(e,[],!1,t);let r=(0,AY.getSchemaTypes)(e.schema),n=(0,AY.coerceAndCheckDataType)(e,r);CY(e,r,!n,t)}s(xY,"typeAndKeywords");function x8e(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,du.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}s(x8e,"checkRefsAndKeywords");function q8e(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,du.checkStrictMode)(e,"default is ignored in the schema root")}s(q8e,"checkNoDefault");function F8e(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,R8e.resolveUrl)(e.opts.uriResolver,e.baseId,t))}s(F8e,"updateContext");function k8e(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}s(k8e,"checkAsyncSchema");function qY({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)e.code((0,ue._)`${be.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let a=(0,ue.str)`${n}/$comment`,u=e.scopeValue("root",{ref:t.root});e.code((0,ue._)`${be.default.self}.opts.$comment(${o}, ${a}, ${u}.schema)`)}}s(qY,"commentKeyword");function B8e(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if((0,ue._)`${be.default.errors} === 0`,()=>t.return(be.default.data),()=>t.throw((0,ue._)`new ${i}(${be.default.vErrors})`)):(t.assign((0,ue._)`${n}.errors`,be.default.vErrors),o.unevaluated&&G8e(e),t.return((0,ue._)`${be.default.errors} === 0`))}s(B8e,"returnResults");function G8e({gen:e,evaluated:t,props:r,items:n}){r instanceof ue.Name&&e.assign((0,ue._)`${t}.props`,r),n instanceof ue.Name&&e.assign((0,ue._)`${t}.items`,n)}s(G8e,"assignEvaluated");function CY(e,t,r,n){let{gen:i,schema:o,data:a,allErrors:u,opts:c,self:l}=e,{RULES:f}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,du.schemaHasRulesButRef)(o,f))){i.block(()=>kY(e,"$ref",f.all.$ref.definition));return}c.jtd||V8e(e,t),i.block(()=>{for(let _ of f.rules)d(_);d(f.post)});function d(_){(0,Bj.shouldUseGroup)(o,_)&&(_.type?(i.if((0,PI.checkDataType)(_.type,a,c.strictNumbers)),$Y(e,_),t.length===1&&t[0]===_.type&&r&&(i.else(),(0,PI.reportTypeError)(e)),i.endIf()):$Y(e,_),u||i.if((0,ue._)`${be.default.errors} === ${n||0}`))}s(d,"groupKeywords")}s(CY,"schemaKeywords");function $Y(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,A8e.assignDefaults)(e,t.type),r.block(()=>{for(let o of t.rules)(0,Bj.shouldUseRule)(n,o)&&kY(e,o.keyword,o.definition,t.type)})}s($Y,"iterateKeywords");function V8e(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(z8e(e,t),e.opts.allowUnionTypes||H8e(e,t),K8e(e,e.dataTypes))}s(V8e,"checkStrictTypes");function z8e(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{FY(e.dataTypes,r)||Gj(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),Y8e(e,t)}}s(z8e,"checkContextTypes");function H8e(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Gj(e,"use allowUnionTypes to allow union type keyword")}s(H8e,"checkMultipleTypes");function K8e(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,Bj.shouldUseRule)(e.schema,i)){let{type:o}=i.definition;o.length&&!o.some(a=>W8e(t,a))&&Gj(e,`missing type "${o.join(",")}" for keyword "${n}"`)}}}s(K8e,"checkKeywordTypes");function W8e(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}s(W8e,"hasApplicableType");function FY(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}s(FY,"includesType");function Y8e(e,t){let r=[];for(let n of e.dataTypes)FY(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}s(Y8e,"narrowSchemaTypes");function Gj(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,du.checkStrictMode)(e,t,e.opts.strictTypes)}s(Gj,"strictTypesError");var II=class{static{s(this,"KeywordCxt")}constructor(t,r,n){if((0,t0.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,du.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",BY(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,t0.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=t.gen.const("_errs",be.default.errors))}result(t,r,n){this.failResult((0,ue.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,ue.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,ue._)`${r} !== undefined && (${(0,ue.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?e0.reportExtraError:e0.reportError)(this,this.def.error,r)}$dataError(){(0,e0.reportError)(this,this.def.$dataError||e0.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,e0.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=ue.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=ue.nil,r=ue.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:a}=this;n.if((0,ue.or)((0,ue._)`${i} === undefined`,r)),t!==ue.nil&&n.assign(t,!0),(o.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==ue.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,ue.or)(a(),u());function a(){if(n.length){if(!(r instanceof ue.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,ue._)`${(0,PI.checkDataTypes)(c,r,o.opts.strictNumbers,PI.DataType.Wrong)}`}return ue.nil}function u(){if(i.validateSchema){let c=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,ue._)`!${c}(${r})`}return ue.nil}}subschema(t,r){let n=(0,kj.getSubschema)(this.it,t);(0,kj.extendSubschemaData)(n,this.it,t),(0,kj.extendSubschemaMode)(n,t);let i={...this.it,...n,items:void 0,props:void 0};return M8e(i,r),i}mergeEvaluated(t,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=du.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=du.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,ue.Name)),!0}};Tc.KeywordCxt=II;function kY(e,t,r,n){let i=new II(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,t0.funcKeywordCode)(i,r):"macro"in r?(0,t0.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,t0.funcKeywordCode)(i,r)}s(kY,"keywordCode");var J8e=/^\/(?:[^~]|~0|~1)*$/,X8e=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function BY(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(e==="")return be.default.rootData;if(e[0]==="/"){if(!J8e.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=be.default.rootData}else{let l=X8e.exec(e);if(!l)throw new Error(`Invalid JSON-pointer: ${e}`);let f=+l[1];if(i=l[2],i==="#"){if(f>=t)throw new Error(c("property/index",f));return n[t-f]}if(f>t)throw new Error(c("data",f));if(o=r[t-f],!i)return o}let a=o,u=i.split("/");for(let l of u)l&&(o=(0,ue._)`${o}${(0,ue.getProperty)((0,du.unescapeJsonPointer)(l))}`,a=(0,ue._)`${a} && ${o}`);return a;function c(l,f){return`Cannot access ${l} ${f} levels up, current level is ${t}`}}s(BY,"getData");Tc.getData=BY});var wI=h(zj=>{"use strict";Object.defineProperty(zj,"__esModule",{value:!0});var Vj=class extends Error{static{s(this,"ValidationError")}constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};zj.default=Vj});var TI=h(Wj=>{"use strict";Object.defineProperty(Wj,"__esModule",{value:!0});var Hj=Zy(),Kj=class extends Error{static{s(this,"MissingRefError")}constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Hj.resolveUrl)(t,r,n),this.missingSchema=(0,Hj.normalizeId)((0,Hj.getFullPath)(t,this.missingRef))}};Wj.default=Kj});var AI=h(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});Es.resolveSchema=Es.getCompilingSchema=Es.resolveRef=Es.compileSchema=Es.SchemaEnv=void 0;var lo=Re(),Q8e=wI(),ud=fu(),fo=Zy(),GY=pt(),Z8e=r0(),Yh=class{static{s(this,"SchemaEnv")}constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,fo.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};Es.SchemaEnv=Yh;function Jj(e){let t=VY.call(this,e);if(t)return t;let r=(0,fo.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,a=new lo.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),u;e.$async&&(u=a.scopeValue("Error",{ref:Q8e.default,code:(0,lo._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");e.validateName=c;let l={gen:a,allErrors:this.opts.allErrors,data:ud.default.data,parentData:ud.default.parentData,parentDataProperty:ud.default.parentDataProperty,dataNames:[ud.default.data],dataPathArr:[lo.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,lo.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:u,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:lo.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,lo._)`""`,opts:this.opts,self:this},f;try{this._compilations.add(e),(0,Z8e.validateFunctionCode)(l),a.optimize(this.opts.code.optimize);let d=a.toString();f=`${a.scopeRefs(ud.default.scope)}return ${d}`,this.opts.code.process&&(f=this.opts.code.process(f,e));let m=new Function(`${ud.default.self}`,`${ud.default.scope}`,f)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:g,items:y}=l;m.evaluated={props:g instanceof lo.Name?void 0:g,items:y instanceof lo.Name?void 0:y,dynamicProps:g instanceof lo.Name,dynamicItems:y instanceof lo.Name},m.source&&(m.source.evaluated=(0,lo.stringify)(m.evaluated))}return e.validate=m,e}catch(d){throw delete e.validate,delete e.validateName,f&&this.logger.error("Error compiling schema, function code:",f),d}finally{this._compilations.delete(e)}}s(Jj,"compileSchema");Es.compileSchema=Jj;function eVe(e,t,r){var n;r=(0,fo.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let o=nVe.call(this,e,r);if(o===void 0){let a=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:u}=this.opts;a&&(o=new Yh({schema:a,schemaId:u,root:e,baseId:t}))}if(o!==void 0)return e.refs[r]=tVe.call(this,o)}s(eVe,"resolveRef");Es.resolveRef=eVe;function tVe(e){return(0,fo.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Jj.call(this,e)}s(tVe,"inlineOrCompile");function VY(e){for(let t of this._compilations)if(rVe(t,e))return t}s(VY,"getCompilingSchema");Es.getCompilingSchema=VY;function rVe(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}s(rVe,"sameSchemaEnv");function nVe(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||NI.call(this,e,t)}s(nVe,"resolve");function NI(e,t){let r=this.opts.uriResolver.parse(t),n=(0,fo._getFullPath)(this.opts.uriResolver,r),i=(0,fo.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return Yj.call(this,r,e);let o=(0,fo.normalizeId)(n),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){let u=NI.call(this,e,a);return typeof u?.schema!="object"?void 0:Yj.call(this,r,u)}if(typeof a?.schema=="object"){if(a.validate||Jj.call(this,a),o===(0,fo.normalizeId)(t)){let{schema:u}=a,{schemaId:c}=this.opts,l=u[c];return l&&(i=(0,fo.resolveUrl)(this.opts.uriResolver,i,l)),new Yh({schema:u,schemaId:c,root:e,baseId:i})}return Yj.call(this,r,a)}}s(NI,"resolveSchema");Es.resolveSchema=NI;var iVe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Yj(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let u of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,GY.unescapeFragment)(u)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!iVe.has(u)&&l&&(t=(0,fo.resolveUrl)(this.opts.uriResolver,t,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,GY.schemaHasRulesButRef)(r,this.RULES)){let u=(0,fo.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=NI.call(this,n,u)}let{schemaId:a}=this.opts;if(o=o||new Yh({schema:r,schemaId:a,root:n,baseId:t}),o.schema!==o.root.schema)return o}s(Yj,"getJsonPointer")});var zY=h((jRt,sVe)=>{sVe.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 KY=h(Xj=>{"use strict";Object.defineProperty(Xj,"__esModule",{value:!0});var HY=XP();HY.code='require("ajv/dist/runtime/uri").default';Xj.default=HY});var tJ=h(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.CodeGen=tn.Name=tn.nil=tn.stringify=tn.str=tn._=tn.KeywordCxt=void 0;var oVe=r0();Object.defineProperty(tn,"KeywordCxt",{enumerable:!0,get:function(){return oVe.KeywordCxt}});var Jh=Re();Object.defineProperty(tn,"_",{enumerable:!0,get:function(){return Jh._}});Object.defineProperty(tn,"str",{enumerable:!0,get:function(){return Jh.str}});Object.defineProperty(tn,"stringify",{enumerable:!0,get:function(){return Jh.stringify}});Object.defineProperty(tn,"nil",{enumerable:!0,get:function(){return Jh.nil}});Object.defineProperty(tn,"Name",{enumerable:!0,get:function(){return Jh.Name}});Object.defineProperty(tn,"CodeGen",{enumerable:!0,get:function(){return Jh.CodeGen}});var aVe=wI(),QY=TI(),uVe=$j(),n0=AI(),cVe=Re(),i0=Zy(),RI=Qy(),Zj=pt(),WY=zY(),lVe=KY(),ZY=s((e,t)=>new RegExp(e,t),"defaultRegExp");ZY.code="new RegExp";var fVe=["removeAdditional","useDefaults","coerceTypes"],dVe=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),pVe={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."},hVe={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},YY=200;function mVe(e){var t,r,n,i,o,a,u,c,l,f,d,_,m,g,y,b,E,S,O,I,w,j,F,K,H;let re=e.strict,de=(t=e.code)===null||t===void 0?void 0:t.optimize,te=de===!0||de===void 0?1:de||0,he=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:ZY,Ce=(i=e.uriResolver)!==null&&i!==void 0?i:lVe.default;return{strictSchema:(a=(o=e.strictSchema)!==null&&o!==void 0?o:re)!==null&&a!==void 0?a:!0,strictNumbers:(c=(u=e.strictNumbers)!==null&&u!==void 0?u:re)!==null&&c!==void 0?c:!0,strictTypes:(f=(l=e.strictTypes)!==null&&l!==void 0?l:re)!==null&&f!==void 0?f:"log",strictTuples:(_=(d=e.strictTuples)!==null&&d!==void 0?d:re)!==null&&_!==void 0?_:"log",strictRequired:(g=(m=e.strictRequired)!==null&&m!==void 0?m:re)!==null&&g!==void 0?g:!1,code:e.code?{...e.code,optimize:te,regExp:he}:{optimize:te,regExp:he},loopRequired:(y=e.loopRequired)!==null&&y!==void 0?y:YY,loopEnum:(b=e.loopEnum)!==null&&b!==void 0?b:YY,meta:(E=e.meta)!==null&&E!==void 0?E:!0,messages:(S=e.messages)!==null&&S!==void 0?S:!0,inlineRefs:(O=e.inlineRefs)!==null&&O!==void 0?O:!0,schemaId:(I=e.schemaId)!==null&&I!==void 0?I:"$id",addUsedSchema:(w=e.addUsedSchema)!==null&&w!==void 0?w:!0,validateSchema:(j=e.validateSchema)!==null&&j!==void 0?j:!0,validateFormats:(F=e.validateFormats)!==null&&F!==void 0?F:!0,unicodeRegExp:(K=e.unicodeRegExp)!==null&&K!==void 0?K:!0,int32range:(H=e.int32range)!==null&&H!==void 0?H:!0,uriResolver:Ce}}s(mVe,"requiredOptions");var s0=class{static{s(this,"Ajv")}constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...mVe(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new cVe.ValueScope({scope:{},prefixes:dVe,es5:r,lines:n}),this.logger=SVe(t.logger);let i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,uVe.getRules)(),JY.call(this,pVe,t,"NOT SUPPORTED"),JY.call(this,hVe,t,"DEPRECATED","warn"),this._metaOpts=EVe.call(this),t.formats&&gVe.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&yVe.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),_Ve.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,i=WY;n==="id"&&(i={...WY},i.id=i.$id,delete i.$id),r&&t&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,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,t,r);async function i(f,d){await o.call(this,f.$schema);let _=this._addSchema(f,d);return _.validate||a.call(this,_)}async function o(f){f&&!this.getSchema(f)&&await i.call(this,{$ref:f},!0)}async function a(f){try{return this._compileSchemaEnv(f)}catch(d){if(!(d instanceof QY.default))throw d;return u.call(this,d),await c.call(this,d.missingSchema),a.call(this,f)}}function u({missingSchema:f,missingRef:d}){if(this.refs[f])throw new Error(`AnySchema ${f} is loaded but ${d} cannot be resolved`)}async function c(f){let d=await l.call(this,f);this.refs[f]||await o.call(this,d.$schema),this.refs[f]||this.addSchema(d,f,r)}async function l(f){let d=this._loading[f];if(d)return d;try{return await(this._loading[f]=n(f))}finally{delete this._loading[f]}}}addSchema(t,r,n,i=this.opts.validateSchema){if(Array.isArray(t)){for(let a of t)this.addSchema(a,void 0,n,i);return this}let o;if(typeof t=="object"){let{schemaId:a}=this.opts;if(o=t[a],o!==void 0&&typeof o!="string")throw new Error(`schema ${a} must be string`)}return r=(0,i0.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,i,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$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,t);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(t){let r;for(;typeof(r=XY.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,i=new n0.SchemaEnv({schema:{},schemaId:n});if(r=n0.resolveSchema.call(this,i,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=XY.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,i0.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,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(OVe.call(this,n,r),!r)return(0,Zj.eachItem)(n,o=>Qj.call(this,o)),this;IVe.call(this,r);let i={...r,type:(0,RI.getJSONTypes)(r.type),schemaType:(0,RI.getJSONTypes)(r.schemaType)};return(0,Zj.eachItem)(n,i.type.length===0?o=>Qj.call(this,o,i):o=>i.type.forEach(a=>Qj.call(this,o,i,a))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===t);i>=0&&n.rules.splice(i,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let i of r){let o=i.split("/").slice(1),a=t;for(let u of o)a=a[u];for(let u in n){let c=n[u];if(typeof c!="object")continue;let{$data:l}=c.definition,f=a[u];l&&f&&(a[u]=eJ(f))}}return t}_removeAllSchemas(t,r){for(let n in t){let i=t[n];(!r||r.test(n))&&(typeof i=="string"?delete t[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[n]))}}_addSchema(t,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let a,{schemaId:u}=this.opts;if(typeof t=="object")a=t[u];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;n=(0,i0.normalizeId)(a||n);let l=i0.getSchemaRefs.call(this,t,n);return c=new n0.SchemaEnv({schema:t,schemaId:u,meta:r,baseId:n,localRefs:l}),this._cache.set(c.schema,c),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),i&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):n0.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{n0.compileSchema.call(this,t)}finally{this.opts=r}}};tn.default=s0;s0.ValidationError=aVe.default;s0.MissingRefError=QY.default;function JY(e,t,r,n="error"){for(let i in e){let o=i;o in t&&this.logger[n](`${r}: option ${i}. ${e[o]}`)}}s(JY,"checkOptions");function XY(e){return e=(0,i0.normalizeId)(e),this.schemas[e]||this.refs[e]}s(XY,"getSchEnv");function _Ve(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}s(_Ve,"addInitialSchemas");function gVe(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}s(gVe,"addInitialFormats");function yVe(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}s(yVe,"addInitialKeywords");function EVe(){let e={...this.opts};for(let t of fVe)delete e[t];return e}s(EVe,"getMetaSchemaOptions");var bVe={log(){},warn(){},error(){}};function SVe(e){if(e===!1)return bVe;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}s(SVe,"getLogger");var vVe=/^[a-z_$][a-z0-9_$:-]*$/i;function OVe(e,t){let{RULES:r}=this;if((0,Zj.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!vVe.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}s(OVe,"checkKeyword");function Qj(e,t,r){var n;let i=t?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,a=i?o.post:o.rules.find(({type:c})=>c===r);if(a||(a={type:r,rules:[]},o.rules.push(a)),o.keywords[e]=!0,!t)return;let u={keyword:e,definition:{...t,type:(0,RI.getJSONTypes)(t.type),schemaType:(0,RI.getJSONTypes)(t.schemaType)}};t.before?PVe.call(this,a,u,t.before):a.rules.push(u),o.all[e]=u,(n=t.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}s(Qj,"addRule");function PVe(e,t,r){let n=e.rules.findIndex(i=>i.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}s(PVe,"addBeforeRule");function IVe(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=eJ(t)),e.validateSchema=this.compile(t,!0))}s(IVe,"keywordMetaschema");var wVe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function eJ(e){return{anyOf:[e,wVe]}}s(eJ,"schemaOrData")});var rJ=h(eM=>{"use strict";Object.defineProperty(eM,"__esModule",{value:!0});var TVe={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};eM.default=TVe});var oJ=h(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});cd.callRef=cd.getValidate=void 0;var NVe=TI(),nJ=ys(),Si=Re(),Xh=fu(),iJ=AI(),CI=pt(),AVe={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:o,validateName:a,opts:u,self:c}=n,{root:l}=o;if((r==="#"||r==="#/")&&i===l.baseId)return d();let f=iJ.resolveRef.call(c,l,i,r);if(f===void 0)throw new NVe.default(n.opts.uriResolver,i,r);if(f instanceof iJ.SchemaEnv)return _(f);return m(f);function d(){if(o===l)return $I(e,a,o,o.$async);let g=t.scopeValue("root",{ref:l});return $I(e,(0,Si._)`${g}.validate`,l,l.$async)}function _(g){let y=sJ(e,g);$I(e,y,g,g.$async)}function m(g){let y=t.scopeValue("schema",u.code.source===!0?{ref:g,code:(0,Si.stringify)(g)}:{ref:g}),b=t.name("valid"),E=e.subschema({schema:g,dataTypes:[],schemaPath:Si.nil,topSchemaRef:y,errSchemaPath:r},b);e.mergeEvaluated(E),e.ok(b)}}};function sJ(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Si._)`${r.scopeValue("wrapper",{ref:t})}.validate`}s(sJ,"getValidate");cd.getValidate=sJ;function $I(e,t,r,n){let{gen:i,it:o}=e,{allErrors:a,schemaEnv:u,opts:c}=o,l=c.passContext?Xh.default.this:Si.nil;n?f():d();function f(){if(!u.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,Si._)`await ${(0,nJ.callValidateCode)(e,t,l)}`),m(t),a||i.assign(g,!0)},y=>{i.if((0,Si._)`!(${y} instanceof ${o.ValidationError})`,()=>i.throw(y)),_(y),a||i.assign(g,!1)}),e.ok(g)}s(f,"callAsyncRef");function d(){e.result((0,nJ.callValidateCode)(e,t,l),()=>m(t),()=>_(t))}s(d,"callSyncRef");function _(g){let y=(0,Si._)`${g}.errors`;i.assign(Xh.default.vErrors,(0,Si._)`${Xh.default.vErrors} === null ? ${y} : ${Xh.default.vErrors}.concat(${y})`),i.assign(Xh.default.errors,(0,Si._)`${Xh.default.vErrors}.length`)}s(_,"addErrorsFrom");function m(g){var y;if(!o.opts.unevaluated)return;let b=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(b&&!b.dynamicProps)b.props!==void 0&&(o.props=CI.mergeEvaluated.props(i,b.props,o.props));else{let E=i.var("props",(0,Si._)`${g}.evaluated.props`);o.props=CI.mergeEvaluated.props(i,E,o.props,Si.Name)}if(o.items!==!0)if(b&&!b.dynamicItems)b.items!==void 0&&(o.items=CI.mergeEvaluated.items(i,b.items,o.items));else{let E=i.var("items",(0,Si._)`${g}.evaluated.items`);o.items=CI.mergeEvaluated.items(i,E,o.items,Si.Name)}}s(m,"addEvaluatedFrom")}s($I,"callRef");cd.callRef=$I;cd.default=AVe});var aJ=h(tM=>{"use strict";Object.defineProperty(tM,"__esModule",{value:!0});var RVe=rJ(),CVe=oJ(),$Ve=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",RVe.default,CVe.default];tM.default=$Ve});var uJ=h(rM=>{"use strict";Object.defineProperty(rM,"__esModule",{value:!0});var DI=Re(),Nc=DI.operators,LI={maximum:{okStr:"<=",ok:Nc.LTE,fail:Nc.GT},minimum:{okStr:">=",ok:Nc.GTE,fail:Nc.LT},exclusiveMaximum:{okStr:"<",ok:Nc.LT,fail:Nc.GTE},exclusiveMinimum:{okStr:">",ok:Nc.GT,fail:Nc.LTE}},DVe={message:({keyword:e,schemaCode:t})=>(0,DI.str)`must be ${LI[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,DI._)`{comparison: ${LI[e].okStr}, limit: ${t}}`},LVe={keyword:Object.keys(LI),type:"number",schemaType:"number",$data:!0,error:DVe,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,DI._)`${r} ${LI[t].fail} ${n} || isNaN(${r})`)}};rM.default=LVe});var cJ=h(nM=>{"use strict";Object.defineProperty(nM,"__esModule",{value:!0});var o0=Re(),jVe={message:({schemaCode:e})=>(0,o0.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,o0._)`{multipleOf: ${e}}`},MVe={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:jVe,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,o=i.opts.multipleOfPrecision,a=t.let("res"),u=o?(0,o0._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,o0._)`${a} !== parseInt(${a})`;e.fail$data((0,o0._)`(${n} === 0 || (${a} = ${r}/${n}, ${u}))`)}};nM.default=MVe});var fJ=h(iM=>{"use strict";Object.defineProperty(iM,"__esModule",{value:!0});function lJ(e){let t=e.length,r=0,n=0,i;for(;n<t;)r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t&&(i=e.charCodeAt(n),(i&64512)===56320&&n++);return r}s(lJ,"ucs2length");iM.default=lJ;lJ.code='require("ajv/dist/runtime/ucs2length").default'});var dJ=h(sM=>{"use strict";Object.defineProperty(sM,"__esModule",{value:!0});var ld=Re(),UVe=pt(),xVe=fJ(),qVe={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,ld.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,ld._)`{limit: ${e}}`},FVe={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:qVe,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,o=t==="maxLength"?ld.operators.GT:ld.operators.LT,a=i.opts.unicode===!1?(0,ld._)`${r}.length`:(0,ld._)`${(0,UVe.useFunc)(e.gen,xVe.default)}(${r})`;e.fail$data((0,ld._)`${a} ${o} ${n}`)}};sM.default=FVe});var pJ=h(oM=>{"use strict";Object.defineProperty(oM,"__esModule",{value:!0});var kVe=ys(),jI=Re(),BVe={message:({schemaCode:e})=>(0,jI.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,jI._)`{pattern: ${e}}`},GVe={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:BVe,code(e){let{data:t,$data:r,schema:n,schemaCode:i,it:o}=e,a=o.opts.unicodeRegExp?"u":"",u=r?(0,jI._)`(new RegExp(${i}, ${a}))`:(0,kVe.usePattern)(e,n);e.fail$data((0,jI._)`!${u}.test(${t})`)}};oM.default=GVe});var hJ=h(aM=>{"use strict";Object.defineProperty(aM,"__esModule",{value:!0});var a0=Re(),VVe={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,a0.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,a0._)`{limit: ${e}}`},zVe={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:VVe,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?a0.operators.GT:a0.operators.LT;e.fail$data((0,a0._)`Object.keys(${r}).length ${i} ${n}`)}};aM.default=zVe});var mJ=h(uM=>{"use strict";Object.defineProperty(uM,"__esModule",{value:!0});var u0=ys(),c0=Re(),HVe=pt(),KVe={message:({params:{missingProperty:e}})=>(0,c0.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,c0._)`{missingProperty: ${e}}`},WVe={keyword:"required",type:"object",schemaType:"array",$data:!0,error:KVe,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:o,it:a}=e,{opts:u}=a;if(!o&&r.length===0)return;let c=r.length>=u.loopRequired;if(a.allErrors?l():f(),u.strictRequired){let m=e.parentSchema.properties,{definedProperties:g}=e.it;for(let y of r)if(m?.[y]===void 0&&!g.has(y)){let b=a.schemaEnv.baseId+a.errSchemaPath,E=`required property "${y}" is not defined at "${b}" (strictRequired)`;(0,HVe.checkStrictMode)(a,E,a.opts.strictRequired)}}function l(){if(c||o)e.block$data(c0.nil,d);else for(let m of r)(0,u0.checkReportMissingProp)(e,m)}s(l,"allErrorsMode");function f(){let m=t.let("missing");if(c||o){let g=t.let("valid",!0);e.block$data(g,()=>_(m,g)),e.ok(g)}else t.if((0,u0.checkMissingProp)(e,r,m)),(0,u0.reportMissingProp)(e,m),t.else()}s(f,"exitOnErrorMode");function d(){t.forOf("prop",n,m=>{e.setParams({missingProperty:m}),t.if((0,u0.noPropertyInData)(t,i,m,u.ownProperties),()=>e.error())})}s(d,"loopAllRequired");function _(m,g){e.setParams({missingProperty:m}),t.forOf(m,n,()=>{t.assign(g,(0,u0.propertyInData)(t,i,m,u.ownProperties)),t.if((0,c0.not)(g),()=>{e.error(),t.break()})},c0.nil)}s(_,"loopUntilMissing")}};uM.default=WVe});var _J=h(cM=>{"use strict";Object.defineProperty(cM,"__esModule",{value:!0});var l0=Re(),YVe={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,l0.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,l0._)`{limit: ${e}}`},JVe={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:YVe,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?l0.operators.GT:l0.operators.LT;e.fail$data((0,l0._)`${r}.length ${i} ${n}`)}};cM.default=JVe});var MI=h(lM=>{"use strict";Object.defineProperty(lM,"__esModule",{value:!0});var gJ=Xf();gJ.code='require("ajv/dist/runtime/equal").default';lM.default=gJ});var yJ=h(dM=>{"use strict";Object.defineProperty(dM,"__esModule",{value:!0});var fM=Qy(),rn=Re(),XVe=pt(),QVe=MI(),ZVe={message:({params:{i:e,j:t}})=>(0,rn.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,rn._)`{i: ${e}, j: ${t}}`},eze={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:ZVe,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:o,schemaCode:a,it:u}=e;if(!n&&!i)return;let c=t.let("valid"),l=o.items?(0,fM.getSchemaTypes)(o.items):[];e.block$data(c,f,(0,rn._)`${a} === false`),e.ok(c);function f(){let g=t.let("i",(0,rn._)`${r}.length`),y=t.let("j");e.setParams({i:g,j:y}),t.assign(c,!0),t.if((0,rn._)`${g} > 1`,()=>(d()?_:m)(g,y))}s(f,"validateUniqueItems");function d(){return l.length>0&&!l.some(g=>g==="object"||g==="array")}s(d,"canOptimize");function _(g,y){let b=t.name("item"),E=(0,fM.checkDataTypes)(l,b,u.opts.strictNumbers,fM.DataType.Wrong),S=t.const("indices",(0,rn._)`{}`);t.for((0,rn._)`;${g}--;`,()=>{t.let(b,(0,rn._)`${r}[${g}]`),t.if(E,(0,rn._)`continue`),l.length>1&&t.if((0,rn._)`typeof ${b} == "string"`,(0,rn._)`${b} += "_"`),t.if((0,rn._)`typeof ${S}[${b}] == "number"`,()=>{t.assign(y,(0,rn._)`${S}[${b}]`),e.error(),t.assign(c,!1).break()}).code((0,rn._)`${S}[${b}] = ${g}`)})}s(_,"loopN");function m(g,y){let b=(0,XVe.useFunc)(t,QVe.default),E=t.name("outer");t.label(E).for((0,rn._)`;${g}--;`,()=>t.for((0,rn._)`${y} = ${g}; ${y}--;`,()=>t.if((0,rn._)`${b}(${r}[${g}], ${r}[${y}])`,()=>{e.error(),t.assign(c,!1).break(E)})))}s(m,"loopN2")}};dM.default=eze});var EJ=h(hM=>{"use strict";Object.defineProperty(hM,"__esModule",{value:!0});var pM=Re(),tze=pt(),rze=MI(),nze={message:"must be equal to constant",params:({schemaCode:e})=>(0,pM._)`{allowedValue: ${e}}`},ize={keyword:"const",$data:!0,error:nze,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:o}=e;n||o&&typeof o=="object"?e.fail$data((0,pM._)`!${(0,tze.useFunc)(t,rze.default)}(${r}, ${i})`):e.fail((0,pM._)`${o} !== ${r}`)}};hM.default=ize});var bJ=h(mM=>{"use strict";Object.defineProperty(mM,"__esModule",{value:!0});var f0=Re(),sze=pt(),oze=MI(),aze={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,f0._)`{allowedValues: ${e}}`},uze={keyword:"enum",schemaType:"array",$data:!0,error:aze,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:o,it:a}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let u=i.length>=a.opts.loopEnum,c,l=s(()=>c??(c=(0,sze.useFunc)(t,oze.default)),"getEql"),f;if(u||n)f=t.let("valid"),e.block$data(f,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=t.const("vSchema",o);f=(0,f0.or)(...i.map((g,y)=>_(m,y)))}e.pass(f);function d(){t.assign(f,!1),t.forOf("v",o,m=>t.if((0,f0._)`${l()}(${r}, ${m})`,()=>t.assign(f,!0).break()))}s(d,"loopEnum");function _(m,g){let y=i[g];return typeof y=="object"&&y!==null?(0,f0._)`${l()}(${r}, ${m}[${g}])`:(0,f0._)`${r} === ${y}`}s(_,"equalCode")}};mM.default=uze});var SJ=h(_M=>{"use strict";Object.defineProperty(_M,"__esModule",{value:!0});var cze=uJ(),lze=cJ(),fze=dJ(),dze=pJ(),pze=hJ(),hze=mJ(),mze=_J(),_ze=yJ(),gze=EJ(),yze=bJ(),Eze=[cze.default,lze.default,fze.default,dze.default,pze.default,hze.default,mze.default,_ze.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},gze.default,yze.default];_M.default=Eze});var yM=h(d0=>{"use strict";Object.defineProperty(d0,"__esModule",{value:!0});d0.validateAdditionalItems=void 0;var fd=Re(),gM=pt(),bze={message:({params:{len:e}})=>(0,fd.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,fd._)`{limit: ${e}}`},Sze={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:bze,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,gM.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}vJ(e,n)}};function vJ(e,t){let{gen:r,schema:n,data:i,keyword:o,it:a}=e;a.items=!0;let u=r.const("len",(0,fd._)`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,fd._)`${u} <= ${t.length}`);else if(typeof n=="object"&&!(0,gM.alwaysValidSchema)(a,n)){let l=r.var("valid",(0,fd._)`${u} <= ${t.length}`);r.if((0,fd.not)(l),()=>c(l)),e.ok(l)}function c(l){r.forRange("i",t.length,u,f=>{e.subschema({keyword:o,dataProp:f,dataPropType:gM.Type.Num},l),a.allErrors||r.if((0,fd.not)(l),()=>r.break())})}s(c,"validateItems")}s(vJ,"validateAdditionalItems");d0.validateAdditionalItems=vJ;d0.default=Sze});var EM=h(p0=>{"use strict";Object.defineProperty(p0,"__esModule",{value:!0});p0.validateTuple=void 0;var OJ=Re(),UI=pt(),vze=ys(),Oze={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return PJ(e,"additionalItems",t);r.items=!0,!(0,UI.alwaysValidSchema)(r,t)&&e.ok((0,vze.validateArray)(e))}};function PJ(e,t,r=e.schema){let{gen:n,parentSchema:i,data:o,keyword:a,it:u}=e;f(i),u.opts.unevaluated&&r.length&&u.items!==!0&&(u.items=UI.mergeEvaluated.items(n,r.length,u.items));let c=n.name("valid"),l=n.const("len",(0,OJ._)`${o}.length`);r.forEach((d,_)=>{(0,UI.alwaysValidSchema)(u,d)||(n.if((0,OJ._)`${l} > ${_}`,()=>e.subschema({keyword:a,schemaProp:_,dataProp:_},c)),e.ok(c))});function f(d){let{opts:_,errSchemaPath:m}=u,g=r.length,y=g===d.minItems&&(g===d.maxItems||d[t]===!1);if(_.strictTuples&&!y){let b=`"${a}" is ${g}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,UI.checkStrictMode)(u,b,_.strictTuples)}}s(f,"checkStrictTuple")}s(PJ,"validateTuple");p0.validateTuple=PJ;p0.default=Oze});var IJ=h(bM=>{"use strict";Object.defineProperty(bM,"__esModule",{value:!0});var Pze=EM(),Ize={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,Pze.validateTuple)(e,"items")};bM.default=Ize});var TJ=h(SM=>{"use strict";Object.defineProperty(SM,"__esModule",{value:!0});var wJ=Re(),wze=pt(),Tze=ys(),Nze=yM(),Aze={message:({params:{len:e}})=>(0,wJ.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,wJ._)`{limit: ${e}}`},Rze={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Aze,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,wze.alwaysValidSchema)(n,t)&&(i?(0,Nze.validateAdditionalItems)(e,i):e.ok((0,Tze.validateArray)(e)))}};SM.default=Rze});var NJ=h(vM=>{"use strict";Object.defineProperty(vM,"__esModule",{value:!0});var bs=Re(),xI=pt(),Cze={message:({params:{min:e,max:t}})=>t===void 0?(0,bs.str)`must contain at least ${e} valid item(s)`:(0,bs.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,bs._)`{minContains: ${e}}`:(0,bs._)`{minContains: ${e}, maxContains: ${t}}`},$ze={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Cze,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e,a,u,{minContains:c,maxContains:l}=n;o.opts.next?(a=c===void 0?1:c,u=l):a=1;let f=t.const("len",(0,bs._)`${i}.length`);if(e.setParams({min:a,max:u}),u===void 0&&a===0){(0,xI.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(u!==void 0&&a>u){(0,xI.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,xI.alwaysValidSchema)(o,r)){let y=(0,bs._)`${f} >= ${a}`;u!==void 0&&(y=(0,bs._)`${y} && ${f} <= ${u}`),e.pass(y);return}o.items=!0;let d=t.name("valid");u===void 0&&a===1?m(d,()=>t.if(d,()=>t.break())):a===0?(t.let(d,!0),u!==void 0&&t.if((0,bs._)`${i}.length > 0`,_)):(t.let(d,!1),_()),e.result(d,()=>e.reset());function _(){let y=t.name("_valid"),b=t.let("count",0);m(y,()=>t.if(y,()=>g(b)))}s(_,"validateItemsWithCount");function m(y,b){t.forRange("i",0,f,E=>{e.subschema({keyword:"contains",dataProp:E,dataPropType:xI.Type.Num,compositeRule:!0},y),b()})}s(m,"validateItems");function g(y){t.code((0,bs._)`${y}++`),u===void 0?t.if((0,bs._)`${y} >= ${a}`,()=>t.assign(d,!0).break()):(t.if((0,bs._)`${y} > ${u}`,()=>t.assign(d,!1).break()),a===1?t.assign(d,!0):t.if((0,bs._)`${y} >= ${a}`,()=>t.assign(d,!0)))}s(g,"checkLimits")}};vM.default=$ze});var CJ=h(ua=>{"use strict";Object.defineProperty(ua,"__esModule",{value:!0});ua.validateSchemaDeps=ua.validatePropertyDeps=ua.error=void 0;var OM=Re(),Dze=pt(),h0=ys();ua.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,OM.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,OM._)`{property: ${e},
|
|
145
|
+
|| ${a} === "boolean" || ${i} === null`).assign(u,(0,Ne._)`[${i}]`)}}s(c,"coerceSpecificType")}s(z6e,"coerceData");function H6e({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,Ne._)`${t} !== undefined`,()=>e.assign((0,Ne._)`${t}[${r}]`,n))}s(H6e,"assignParentData");function Lj(e,t,r,n=Xy.Correct){let i=n===Xy.Correct?Ne.operators.EQ:Ne.operators.NEQ,o;switch(e){case"null":return(0,Ne._)`${t} ${i} null`;case"array":o=(0,Ne._)`Array.isArray(${t})`;break;case"object":o=(0,Ne._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a((0,Ne._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return(0,Ne._)`typeof ${t} ${i} ${e}`}return n===Xy.Correct?o:(0,Ne.not)(o);function a(u=Ne.nil){return(0,Ne.and)((0,Ne._)`typeof ${t} == "number"`,u,r?(0,Ne._)`isFinite(${t})`:Ne.nil)}}s(Lj,"checkDataType");en.checkDataType=Lj;function jj(e,t,r,n){if(e.length===1)return Lj(e[0],t,r,n);let i,o=(0,hY.toHash)(e);if(o.array&&o.object){let a=(0,Ne._)`typeof ${t} != "object"`;i=o.null?a:(0,Ne._)`!${t} || ${a}`,delete o.null,delete o.array,delete o.object}else i=Ne.nil;o.number&&delete o.integer;for(let a in o)i=(0,Ne.and)(i,Lj(a,t,r,n));return i}s(jj,"checkDataTypes");en.checkDataTypes=jj;var K6e={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,Ne._)`{type: ${e}}`:(0,Ne._)`{type: ${t}}`};function Mj(e){let t=W6e(e);(0,k6e.reportError)(t,K6e)}s(Mj,"reportTypeError");en.reportTypeError=Mj;function W6e(e){let{gen:t,data:r,schema:n}=e,i=(0,hY.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}s(W6e,"getTypeErrorContext")});var yY=h(OI=>{"use strict";Object.defineProperty(OI,"__esModule",{value:!0});OI.assignDefaults=void 0;var Kh=Re(),Y6e=pt();function J6e(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)gY(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,o)=>gY(e,o,i.default))}s(J6e,"assignDefaults");OI.assignDefaults=J6e;function gY(e,t,r){let{gen:n,compositeRule:i,data:o,opts:a}=e;if(r===void 0)return;let u=(0,Kh._)`${o}${(0,Kh.getProperty)(t)}`;if(i){(0,Y6e.checkStrictMode)(e,`default is ignored for: ${u}`);return}let c=(0,Kh._)`${u} === undefined`;a.useDefaults==="empty"&&(c=(0,Kh._)`${c} || ${u} === null || ${u} === ""`),n.if(c,(0,Kh._)`${u} = ${(0,Kh.stringify)(r)}`)}s(gY,"assignDefault")});var ys=h(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.validateUnion=Ct.validateArray=Ct.usePattern=Ct.callValidateCode=Ct.schemaProperties=Ct.allSchemaProperties=Ct.noPropertyInData=Ct.propertyInData=Ct.isOwnProperty=Ct.hasPropFunc=Ct.reportMissingProp=Ct.checkMissingProp=Ct.checkReportMissingProp=void 0;var Gt=Re(),Uj=pt(),Ic=fu(),X6e=pt();function Q6e(e,t){let{gen:r,data:n,it:i}=e;r.if(qj(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Gt._)`${t}`},!0),e.error()})}s(Q6e,"checkReportMissingProp");Ct.checkReportMissingProp=Q6e;function Z6e({gen:e,data:t,it:{opts:r}},n,i){return(0,Gt.or)(...n.map(o=>(0,Gt.and)(qj(e,t,o,r.ownProperties),(0,Gt._)`${i} = ${o}`)))}s(Z6e,"checkMissingProp");Ct.checkMissingProp=Z6e;function e8e(e,t){e.setParams({missingProperty:t},!0),e.error()}s(e8e,"reportMissingProp");Ct.reportMissingProp=e8e;function EY(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Gt._)`Object.prototype.hasOwnProperty`})}s(EY,"hasPropFunc");Ct.hasPropFunc=EY;function xj(e,t,r){return(0,Gt._)`${EY(e)}.call(${t}, ${r})`}s(xj,"isOwnProperty");Ct.isOwnProperty=xj;function t8e(e,t,r,n){let i=(0,Gt._)`${t}${(0,Gt.getProperty)(r)} !== undefined`;return n?(0,Gt._)`${i} && ${xj(e,t,r)}`:i}s(t8e,"propertyInData");Ct.propertyInData=t8e;function qj(e,t,r,n){let i=(0,Gt._)`${t}${(0,Gt.getProperty)(r)} === undefined`;return n?(0,Gt.or)(i,(0,Gt.not)(xj(e,t,r))):i}s(qj,"noPropertyInData");Ct.noPropertyInData=qj;function bY(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}s(bY,"allSchemaProperties");Ct.allSchemaProperties=bY;function r8e(e,t){return bY(t).filter(r=>!(0,Uj.alwaysValidSchema)(e,t[r]))}s(r8e,"schemaProperties");Ct.schemaProperties=r8e;function n8e({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:a},u,c,l){let f=l?(0,Gt._)`${e}, ${t}, ${n}${i}`:t,d=[[Ic.default.instancePath,(0,Gt.strConcat)(Ic.default.instancePath,o)],[Ic.default.parentData,a.parentData],[Ic.default.parentDataProperty,a.parentDataProperty],[Ic.default.rootData,Ic.default.rootData]];a.opts.dynamicRef&&d.push([Ic.default.dynamicAnchors,Ic.default.dynamicAnchors]);let _=(0,Gt._)`${f}, ${r.object(...d)}`;return c!==Gt.nil?(0,Gt._)`${u}.call(${c}, ${_})`:(0,Gt._)`${u}(${_})`}s(n8e,"callValidateCode");Ct.callValidateCode=n8e;var i8e=(0,Gt._)`new RegExp`;function s8e({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,o=i(r,n);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,Gt._)`${i.code==="new RegExp"?i8e:(0,X6e.useFunc)(e,i)}(${r}, ${n})`})}s(s8e,"usePattern");Ct.usePattern=s8e;function o8e(e){let{gen:t,data:r,keyword:n,it:i}=e,o=t.name("valid");if(i.allErrors){let u=t.let("valid",!0);return a(()=>t.assign(u,!1)),u}return t.var(o,!0),a(()=>t.break()),o;function a(u){let c=t.const("len",(0,Gt._)`${r}.length`);t.forRange("i",0,c,l=>{e.subschema({keyword:n,dataProp:l,dataPropType:Uj.Type.Num},o),t.if((0,Gt.not)(o),u)})}s(a,"validateItems")}s(o8e,"validateArray");Ct.validateArray=o8e;function a8e(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,Uj.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let a=t.let("valid",!1),u=t.name("_valid");t.block(()=>r.forEach((c,l)=>{let f=e.subschema({keyword:n,schemaProp:l,compositeRule:!0},u);t.assign(a,(0,Gt._)`${a} || ${u}`),e.mergeValidEvaluated(f,u)||t.if((0,Gt.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}s(a8e,"validateUnion");Ct.validateUnion=a8e});var OY=h(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.validateKeywordUsage=oa.validSchemaType=oa.funcKeywordCode=oa.macroKeywordCode=void 0;var Vn=Re(),ad=fu(),u8e=ys(),c8e=Jy();function l8e(e,t){let{gen:r,keyword:n,schema:i,parentSchema:o,it:a}=e,u=t.macro.call(a.self,i,o,a),c=vY(r,n,u);a.opts.validateSchema!==!1&&a.self.validateSchema(u,!0);let l=r.name("valid");e.subschema({schema:u,schemaPath:Vn.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}s(l8e,"macroKeywordCode");oa.macroKeywordCode=l8e;function f8e(e,t){var r;let{gen:n,keyword:i,schema:o,parentSchema:a,$data:u,it:c}=e;p8e(c,t);let l=!u&&t.compile?t.compile.call(c.self,o,a,c):t.validate,f=vY(n,i,l),d=n.let("valid");e.block$data(d,_),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function _(){if(t.errors===!1)y(),t.modifying&&SY(e),b(()=>e.error());else{let E=t.async?m():g();t.modifying&&SY(e),b(()=>d8e(e,E))}}s(_,"validateKeyword");function m(){let E=n.let("ruleErrs",null);return n.try(()=>y((0,Vn._)`await `),v=>n.assign(d,!1).if((0,Vn._)`${v} instanceof ${c.ValidationError}`,()=>n.assign(E,(0,Vn._)`${v}.errors`),()=>n.throw(v))),E}s(m,"validateAsync");function g(){let E=(0,Vn._)`${f}.errors`;return n.assign(E,null),y(Vn.nil),E}s(g,"validateSync");function y(E=t.async?(0,Vn._)`await `:Vn.nil){let v=c.opts.passContext?ad.default.this:ad.default.self,O=!("compile"in t&&!u||t.schema===!1);n.assign(d,(0,Vn._)`${E}${(0,u8e.callValidateCode)(e,f,v,O)}`,t.modifying)}s(y,"assignValid");function b(E){var v;n.if((0,Vn.not)((v=t.valid)!==null&&v!==void 0?v:d),E)}s(b,"reportErrs")}s(f8e,"funcKeywordCode");oa.funcKeywordCode=f8e;function SY(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Vn._)`${n.parentData}[${n.parentDataProperty}]`))}s(SY,"modifyData");function d8e(e,t){let{gen:r}=e;r.if((0,Vn._)`Array.isArray(${t})`,()=>{r.assign(ad.default.vErrors,(0,Vn._)`${ad.default.vErrors} === null ? ${t} : ${ad.default.vErrors}.concat(${t})`).assign(ad.default.errors,(0,Vn._)`${ad.default.vErrors}.length`),(0,c8e.extendErrors)(e)},()=>e.error())}s(d8e,"addErrs");function p8e({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}s(p8e,"checkAsyncKeyword");function vY(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Vn.stringify)(r)})}s(vY,"useKeyword");function h8e(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}s(h8e,"validSchemaType");oa.validSchemaType=h8e;function m8e({schema:e,opts:t,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 a=i.dependencies;if(a?.some(u=>!Object.prototype.hasOwnProperty.call(e,u)))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){let c=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}s(m8e,"validateKeywordUsage");oa.validateKeywordUsage=m8e});var IY=h(wc=>{"use strict";Object.defineProperty(wc,"__esModule",{value:!0});wc.extendSubschemaMode=wc.extendSubschemaData=wc.getSubschema=void 0;var aa=Re(),PY=pt();function _8e(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:a}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let u=e.schema[t];return r===void 0?{schema:u,schemaPath:(0,aa._)`${e.schemaPath}${(0,aa.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:u[r],schemaPath:(0,aa._)`${e.schemaPath}${(0,aa.getProperty)(t)}${(0,aa.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,PY.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}s(_8e,"getSubschema");wc.getSubschema=_8e;function g8e(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:a}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:u}=t;if(r!==void 0){let{errorPath:l,dataPathArr:f,opts:d}=t,_=u.let("data",(0,aa._)`${t.data}${(0,aa.getProperty)(r)}`,!0);c(_),e.errorPath=(0,aa.str)`${l}${(0,PY.getErrorPath)(r,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,aa._)`${r}`,e.dataPathArr=[...f,e.parentDataProperty]}if(i!==void 0){let l=i instanceof aa.Name?i:u.let("data",i,!0);c(l),a!==void 0&&(e.propertyName=a)}o&&(e.dataTypes=o);function c(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}s(c,"dataContextProps")}s(g8e,"extendSubschemaData");wc.extendSubschemaData=g8e;function y8e(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),o!==void 0&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}s(y8e,"extendSubschemaMode");wc.extendSubschemaMode=y8e});var Zy=h(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.getSchemaRefs=bi.resolveUrl=bi.normalizeId=bi._getFullPath=bi.getFullPath=bi.inlineRef=void 0;var E8e=pt(),b8e=Xf(),S8e=HP(),v8e=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function O8e(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Fj(e):t?wY(e)<=t:!1}s(O8e,"inlineRef");bi.inlineRef=O8e;var P8e=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Fj(e){for(let t in e){if(P8e.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Fj)||typeof r=="object"&&Fj(r))return!0}return!1}s(Fj,"hasRef");function wY(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!v8e.has(r)&&(typeof e[r]=="object"&&(0,E8e.eachItem)(e[r],n=>t+=wY(n)),t===1/0))return 1/0}return t}s(wY,"countKeys");function TY(e,t="",r){r!==!1&&(t=Wh(t));let n=e.parse(t);return NY(e,n)}s(TY,"getFullPath");bi.getFullPath=TY;function NY(e,t){return e.serialize(t).split("#")[0]+"#"}s(NY,"_getFullPath");bi._getFullPath=NY;var I8e=/#\/?$/;function Wh(e){return e?e.replace(I8e,""):""}s(Wh,"normalizeId");bi.normalizeId=Wh;function w8e(e,t,r){return r=Wh(r),e.resolve(t,r)}s(w8e,"resolveUrl");bi.resolveUrl=w8e;var T8e=/^[a-z_][-a-z0-9._]*$/i;function N8e(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=Wh(e[r]||t),o={"":i},a=TY(n,i,!1),u={},c=new Set;return S8e(e,{allKeys:!0},(d,_,m,g)=>{if(g===void 0)return;let y=a+_,b=o[g];typeof d[r]=="string"&&(b=E.call(this,d[r])),v.call(this,d.$anchor),v.call(this,d.$dynamicAnchor),o[_]=b;function E(O){let I=this.opts.uriResolver.resolve;if(O=Wh(b?I(b,O):O),c.has(O))throw f(O);c.add(O);let w=this.refs[O];return typeof w=="string"&&(w=this.refs[w]),typeof w=="object"?l(d,w.schema,O):O!==Wh(y)&&(O[0]==="#"?(l(d,u[O],O),u[O]=d):this.refs[O]=y),O}s(E,"addRef");function v(O){if(typeof O=="string"){if(!T8e.test(O))throw new Error(`invalid anchor "${O}"`);E.call(this,`#${O}`)}}s(v,"addAnchor")}),u;function l(d,_,m){if(_!==void 0&&!b8e(d,_))throw f(m)}s(l,"checkAmbiguosRef");function f(d){return new Error(`reference "${d}" resolves to more than one schema`)}s(f,"ambiguos")}s(N8e,"getSchemaRefs");bi.getSchemaRefs=N8e});var r0=h(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});Tc.getData=Tc.KeywordCxt=Tc.validateFunctionCode=void 0;var DY=fY(),AY=Qy(),Bj=Dj(),PI=Qy(),A8e=yY(),t0=OY(),kj=IY(),ue=Re(),be=fu(),R8e=Zy(),du=pt(),e0=Jy();function C8e(e){if(MY(e)&&(UY(e),jY(e))){L8e(e);return}LY(e,()=>(0,DY.topBoolOrEmptySchema)(e))}s(C8e,"validateFunctionCode");Tc.validateFunctionCode=C8e;function LY({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,(0,ue._)`${be.default.data}, ${be.default.valCxt}`,n.$async,()=>{e.code((0,ue._)`"use strict"; ${RY(r,i)}`),D8e(e,i),e.code(o)}):e.func(t,(0,ue._)`${be.default.data}, ${$8e(i)}`,n.$async,()=>e.code(RY(r,i)).code(o))}s(LY,"validateFunction");function $8e(e){return(0,ue._)`{${be.default.instancePath}="", ${be.default.parentData}, ${be.default.parentDataProperty}, ${be.default.rootData}=${be.default.data}${e.dynamicRef?(0,ue._)`, ${be.default.dynamicAnchors}={}`:ue.nil}}={}`}s($8e,"destructureValCxt");function D8e(e,t){e.if(be.default.valCxt,()=>{e.var(be.default.instancePath,(0,ue._)`${be.default.valCxt}.${be.default.instancePath}`),e.var(be.default.parentData,(0,ue._)`${be.default.valCxt}.${be.default.parentData}`),e.var(be.default.parentDataProperty,(0,ue._)`${be.default.valCxt}.${be.default.parentDataProperty}`),e.var(be.default.rootData,(0,ue._)`${be.default.valCxt}.${be.default.rootData}`),t.dynamicRef&&e.var(be.default.dynamicAnchors,(0,ue._)`${be.default.valCxt}.${be.default.dynamicAnchors}`)},()=>{e.var(be.default.instancePath,(0,ue._)`""`),e.var(be.default.parentData,(0,ue._)`undefined`),e.var(be.default.parentDataProperty,(0,ue._)`undefined`),e.var(be.default.rootData,be.default.data),t.dynamicRef&&e.var(be.default.dynamicAnchors,(0,ue._)`{}`)})}s(D8e,"destructureValCxtES5");function L8e(e){let{schema:t,opts:r,gen:n}=e;LY(e,()=>{r.$comment&&t.$comment&&qY(e),q8e(e),n.let(be.default.vErrors,null),n.let(be.default.errors,0),r.unevaluated&&j8e(e),xY(e),B8e(e)})}s(L8e,"topSchemaObjCode");function j8e(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,ue._)`${r}.evaluated`),t.if((0,ue._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,ue._)`${e.evaluated}.props`,(0,ue._)`undefined`)),t.if((0,ue._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,ue._)`${e.evaluated}.items`,(0,ue._)`undefined`))}s(j8e,"resetEvaluated");function RY(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,ue._)`/*# sourceURL=${r} */`:ue.nil}s(RY,"funcSourceUrl");function M8e(e,t){if(MY(e)&&(UY(e),jY(e))){U8e(e,t);return}(0,DY.boolOrEmptySchema)(e,t)}s(M8e,"subschemaCode");function jY({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}s(jY,"schemaCxtHasRules");function MY(e){return typeof e.schema!="boolean"}s(MY,"isSchemaObj");function U8e(e,t){let{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&qY(e),F8e(e),k8e(e);let o=n.const("_errs",be.default.errors);xY(e,o),n.var(t,(0,ue._)`${o} === ${be.default.errors}`)}s(U8e,"subSchemaObjCode");function UY(e){(0,du.checkUnknownRules)(e),x8e(e)}s(UY,"checkKeywords");function xY(e,t){if(e.opts.jtd)return CY(e,[],!1,t);let r=(0,AY.getSchemaTypes)(e.schema),n=(0,AY.coerceAndCheckDataType)(e,r);CY(e,r,!n,t)}s(xY,"typeAndKeywords");function x8e(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,du.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}s(x8e,"checkRefsAndKeywords");function q8e(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,du.checkStrictMode)(e,"default is ignored in the schema root")}s(q8e,"checkNoDefault");function F8e(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,R8e.resolveUrl)(e.opts.uriResolver,e.baseId,t))}s(F8e,"updateContext");function k8e(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}s(k8e,"checkAsyncSchema");function qY({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)e.code((0,ue._)`${be.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let a=(0,ue.str)`${n}/$comment`,u=e.scopeValue("root",{ref:t.root});e.code((0,ue._)`${be.default.self}.opts.$comment(${o}, ${a}, ${u}.schema)`)}}s(qY,"commentKeyword");function B8e(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if((0,ue._)`${be.default.errors} === 0`,()=>t.return(be.default.data),()=>t.throw((0,ue._)`new ${i}(${be.default.vErrors})`)):(t.assign((0,ue._)`${n}.errors`,be.default.vErrors),o.unevaluated&&G8e(e),t.return((0,ue._)`${be.default.errors} === 0`))}s(B8e,"returnResults");function G8e({gen:e,evaluated:t,props:r,items:n}){r instanceof ue.Name&&e.assign((0,ue._)`${t}.props`,r),n instanceof ue.Name&&e.assign((0,ue._)`${t}.items`,n)}s(G8e,"assignEvaluated");function CY(e,t,r,n){let{gen:i,schema:o,data:a,allErrors:u,opts:c,self:l}=e,{RULES:f}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,du.schemaHasRulesButRef)(o,f))){i.block(()=>kY(e,"$ref",f.all.$ref.definition));return}c.jtd||V8e(e,t),i.block(()=>{for(let _ of f.rules)d(_);d(f.post)});function d(_){(0,Bj.shouldUseGroup)(o,_)&&(_.type?(i.if((0,PI.checkDataType)(_.type,a,c.strictNumbers)),$Y(e,_),t.length===1&&t[0]===_.type&&r&&(i.else(),(0,PI.reportTypeError)(e)),i.endIf()):$Y(e,_),u||i.if((0,ue._)`${be.default.errors} === ${n||0}`))}s(d,"groupKeywords")}s(CY,"schemaKeywords");function $Y(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,A8e.assignDefaults)(e,t.type),r.block(()=>{for(let o of t.rules)(0,Bj.shouldUseRule)(n,o)&&kY(e,o.keyword,o.definition,t.type)})}s($Y,"iterateKeywords");function V8e(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(z8e(e,t),e.opts.allowUnionTypes||H8e(e,t),K8e(e,e.dataTypes))}s(V8e,"checkStrictTypes");function z8e(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{FY(e.dataTypes,r)||Gj(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),Y8e(e,t)}}s(z8e,"checkContextTypes");function H8e(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Gj(e,"use allowUnionTypes to allow union type keyword")}s(H8e,"checkMultipleTypes");function K8e(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,Bj.shouldUseRule)(e.schema,i)){let{type:o}=i.definition;o.length&&!o.some(a=>W8e(t,a))&&Gj(e,`missing type "${o.join(",")}" for keyword "${n}"`)}}}s(K8e,"checkKeywordTypes");function W8e(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}s(W8e,"hasApplicableType");function FY(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}s(FY,"includesType");function Y8e(e,t){let r=[];for(let n of e.dataTypes)FY(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}s(Y8e,"narrowSchemaTypes");function Gj(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,du.checkStrictMode)(e,t,e.opts.strictTypes)}s(Gj,"strictTypesError");var II=class{static{s(this,"KeywordCxt")}constructor(t,r,n){if((0,t0.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,du.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",BY(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,t0.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=t.gen.const("_errs",be.default.errors))}result(t,r,n){this.failResult((0,ue.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,ue.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,ue._)`${r} !== undefined && (${(0,ue.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?e0.reportExtraError:e0.reportError)(this,this.def.error,r)}$dataError(){(0,e0.reportError)(this,this.def.$dataError||e0.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,e0.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=ue.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=ue.nil,r=ue.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:a}=this;n.if((0,ue.or)((0,ue._)`${i} === undefined`,r)),t!==ue.nil&&n.assign(t,!0),(o.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==ue.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,ue.or)(a(),u());function a(){if(n.length){if(!(r instanceof ue.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,ue._)`${(0,PI.checkDataTypes)(c,r,o.opts.strictNumbers,PI.DataType.Wrong)}`}return ue.nil}function u(){if(i.validateSchema){let c=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,ue._)`!${c}(${r})`}return ue.nil}}subschema(t,r){let n=(0,kj.getSubschema)(this.it,t);(0,kj.extendSubschemaData)(n,this.it,t),(0,kj.extendSubschemaMode)(n,t);let i={...this.it,...n,items:void 0,props:void 0};return M8e(i,r),i}mergeEvaluated(t,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=du.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=du.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,ue.Name)),!0}};Tc.KeywordCxt=II;function kY(e,t,r,n){let i=new II(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,t0.funcKeywordCode)(i,r):"macro"in r?(0,t0.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,t0.funcKeywordCode)(i,r)}s(kY,"keywordCode");var J8e=/^\/(?:[^~]|~0|~1)*$/,X8e=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function BY(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(e==="")return be.default.rootData;if(e[0]==="/"){if(!J8e.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=be.default.rootData}else{let l=X8e.exec(e);if(!l)throw new Error(`Invalid JSON-pointer: ${e}`);let f=+l[1];if(i=l[2],i==="#"){if(f>=t)throw new Error(c("property/index",f));return n[t-f]}if(f>t)throw new Error(c("data",f));if(o=r[t-f],!i)return o}let a=o,u=i.split("/");for(let l of u)l&&(o=(0,ue._)`${o}${(0,ue.getProperty)((0,du.unescapeJsonPointer)(l))}`,a=(0,ue._)`${a} && ${o}`);return a;function c(l,f){return`Cannot access ${l} ${f} levels up, current level is ${t}`}}s(BY,"getData");Tc.getData=BY});var wI=h(zj=>{"use strict";Object.defineProperty(zj,"__esModule",{value:!0});var Vj=class extends Error{static{s(this,"ValidationError")}constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};zj.default=Vj});var TI=h(Wj=>{"use strict";Object.defineProperty(Wj,"__esModule",{value:!0});var Hj=Zy(),Kj=class extends Error{static{s(this,"MissingRefError")}constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Hj.resolveUrl)(t,r,n),this.missingSchema=(0,Hj.normalizeId)((0,Hj.getFullPath)(t,this.missingRef))}};Wj.default=Kj});var AI=h(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});Es.resolveSchema=Es.getCompilingSchema=Es.resolveRef=Es.compileSchema=Es.SchemaEnv=void 0;var lo=Re(),Q8e=wI(),ud=fu(),fo=Zy(),GY=pt(),Z8e=r0(),Yh=class{static{s(this,"SchemaEnv")}constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,fo.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};Es.SchemaEnv=Yh;function Jj(e){let t=VY.call(this,e);if(t)return t;let r=(0,fo.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,a=new lo.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),u;e.$async&&(u=a.scopeValue("Error",{ref:Q8e.default,code:(0,lo._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");e.validateName=c;let l={gen:a,allErrors:this.opts.allErrors,data:ud.default.data,parentData:ud.default.parentData,parentDataProperty:ud.default.parentDataProperty,dataNames:[ud.default.data],dataPathArr:[lo.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,lo.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:u,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:lo.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,lo._)`""`,opts:this.opts,self:this},f;try{this._compilations.add(e),(0,Z8e.validateFunctionCode)(l),a.optimize(this.opts.code.optimize);let d=a.toString();f=`${a.scopeRefs(ud.default.scope)}return ${d}`,this.opts.code.process&&(f=this.opts.code.process(f,e));let m=new Function(`${ud.default.self}`,`${ud.default.scope}`,f)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:g,items:y}=l;m.evaluated={props:g instanceof lo.Name?void 0:g,items:y instanceof lo.Name?void 0:y,dynamicProps:g instanceof lo.Name,dynamicItems:y instanceof lo.Name},m.source&&(m.source.evaluated=(0,lo.stringify)(m.evaluated))}return e.validate=m,e}catch(d){throw delete e.validate,delete e.validateName,f&&this.logger.error("Error compiling schema, function code:",f),d}finally{this._compilations.delete(e)}}s(Jj,"compileSchema");Es.compileSchema=Jj;function eVe(e,t,r){var n;r=(0,fo.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let o=nVe.call(this,e,r);if(o===void 0){let a=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:u}=this.opts;a&&(o=new Yh({schema:a,schemaId:u,root:e,baseId:t}))}if(o!==void 0)return e.refs[r]=tVe.call(this,o)}s(eVe,"resolveRef");Es.resolveRef=eVe;function tVe(e){return(0,fo.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Jj.call(this,e)}s(tVe,"inlineOrCompile");function VY(e){for(let t of this._compilations)if(rVe(t,e))return t}s(VY,"getCompilingSchema");Es.getCompilingSchema=VY;function rVe(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}s(rVe,"sameSchemaEnv");function nVe(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||NI.call(this,e,t)}s(nVe,"resolve");function NI(e,t){let r=this.opts.uriResolver.parse(t),n=(0,fo._getFullPath)(this.opts.uriResolver,r),i=(0,fo.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return Yj.call(this,r,e);let o=(0,fo.normalizeId)(n),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){let u=NI.call(this,e,a);return typeof u?.schema!="object"?void 0:Yj.call(this,r,u)}if(typeof a?.schema=="object"){if(a.validate||Jj.call(this,a),o===(0,fo.normalizeId)(t)){let{schema:u}=a,{schemaId:c}=this.opts,l=u[c];return l&&(i=(0,fo.resolveUrl)(this.opts.uriResolver,i,l)),new Yh({schema:u,schemaId:c,root:e,baseId:i})}return Yj.call(this,r,a)}}s(NI,"resolveSchema");Es.resolveSchema=NI;var iVe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Yj(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let u of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,GY.unescapeFragment)(u)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!iVe.has(u)&&l&&(t=(0,fo.resolveUrl)(this.opts.uriResolver,t,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,GY.schemaHasRulesButRef)(r,this.RULES)){let u=(0,fo.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=NI.call(this,n,u)}let{schemaId:a}=this.opts;if(o=o||new Yh({schema:r,schemaId:a,root:n,baseId:t}),o.schema!==o.root.schema)return o}s(Yj,"getJsonPointer")});var zY=h((jRt,sVe)=>{sVe.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 KY=h(Xj=>{"use strict";Object.defineProperty(Xj,"__esModule",{value:!0});var HY=XP();HY.code='require("ajv/dist/runtime/uri").default';Xj.default=HY});var tJ=h(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.CodeGen=tn.Name=tn.nil=tn.stringify=tn.str=tn._=tn.KeywordCxt=void 0;var oVe=r0();Object.defineProperty(tn,"KeywordCxt",{enumerable:!0,get:function(){return oVe.KeywordCxt}});var Jh=Re();Object.defineProperty(tn,"_",{enumerable:!0,get:function(){return Jh._}});Object.defineProperty(tn,"str",{enumerable:!0,get:function(){return Jh.str}});Object.defineProperty(tn,"stringify",{enumerable:!0,get:function(){return Jh.stringify}});Object.defineProperty(tn,"nil",{enumerable:!0,get:function(){return Jh.nil}});Object.defineProperty(tn,"Name",{enumerable:!0,get:function(){return Jh.Name}});Object.defineProperty(tn,"CodeGen",{enumerable:!0,get:function(){return Jh.CodeGen}});var aVe=wI(),QY=TI(),uVe=$j(),n0=AI(),cVe=Re(),i0=Zy(),RI=Qy(),Zj=pt(),WY=zY(),lVe=KY(),ZY=s((e,t)=>new RegExp(e,t),"defaultRegExp");ZY.code="new RegExp";var fVe=["removeAdditional","useDefaults","coerceTypes"],dVe=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),pVe={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."},hVe={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},YY=200;function mVe(e){var t,r,n,i,o,a,u,c,l,f,d,_,m,g,y,b,E,v,O,I,w,j,F,K,H;let re=e.strict,de=(t=e.code)===null||t===void 0?void 0:t.optimize,te=de===!0||de===void 0?1:de||0,he=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:ZY,Ce=(i=e.uriResolver)!==null&&i!==void 0?i:lVe.default;return{strictSchema:(a=(o=e.strictSchema)!==null&&o!==void 0?o:re)!==null&&a!==void 0?a:!0,strictNumbers:(c=(u=e.strictNumbers)!==null&&u!==void 0?u:re)!==null&&c!==void 0?c:!0,strictTypes:(f=(l=e.strictTypes)!==null&&l!==void 0?l:re)!==null&&f!==void 0?f:"log",strictTuples:(_=(d=e.strictTuples)!==null&&d!==void 0?d:re)!==null&&_!==void 0?_:"log",strictRequired:(g=(m=e.strictRequired)!==null&&m!==void 0?m:re)!==null&&g!==void 0?g:!1,code:e.code?{...e.code,optimize:te,regExp:he}:{optimize:te,regExp:he},loopRequired:(y=e.loopRequired)!==null&&y!==void 0?y:YY,loopEnum:(b=e.loopEnum)!==null&&b!==void 0?b:YY,meta:(E=e.meta)!==null&&E!==void 0?E:!0,messages:(v=e.messages)!==null&&v!==void 0?v:!0,inlineRefs:(O=e.inlineRefs)!==null&&O!==void 0?O:!0,schemaId:(I=e.schemaId)!==null&&I!==void 0?I:"$id",addUsedSchema:(w=e.addUsedSchema)!==null&&w!==void 0?w:!0,validateSchema:(j=e.validateSchema)!==null&&j!==void 0?j:!0,validateFormats:(F=e.validateFormats)!==null&&F!==void 0?F:!0,unicodeRegExp:(K=e.unicodeRegExp)!==null&&K!==void 0?K:!0,int32range:(H=e.int32range)!==null&&H!==void 0?H:!0,uriResolver:Ce}}s(mVe,"requiredOptions");var s0=class{static{s(this,"Ajv")}constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...mVe(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new cVe.ValueScope({scope:{},prefixes:dVe,es5:r,lines:n}),this.logger=SVe(t.logger);let i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,uVe.getRules)(),JY.call(this,pVe,t,"NOT SUPPORTED"),JY.call(this,hVe,t,"DEPRECATED","warn"),this._metaOpts=EVe.call(this),t.formats&&gVe.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&yVe.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),_Ve.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,i=WY;n==="id"&&(i={...WY},i.id=i.$id,delete i.$id),r&&t&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,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,t,r);async function i(f,d){await o.call(this,f.$schema);let _=this._addSchema(f,d);return _.validate||a.call(this,_)}async function o(f){f&&!this.getSchema(f)&&await i.call(this,{$ref:f},!0)}async function a(f){try{return this._compileSchemaEnv(f)}catch(d){if(!(d instanceof QY.default))throw d;return u.call(this,d),await c.call(this,d.missingSchema),a.call(this,f)}}function u({missingSchema:f,missingRef:d}){if(this.refs[f])throw new Error(`AnySchema ${f} is loaded but ${d} cannot be resolved`)}async function c(f){let d=await l.call(this,f);this.refs[f]||await o.call(this,d.$schema),this.refs[f]||this.addSchema(d,f,r)}async function l(f){let d=this._loading[f];if(d)return d;try{return await(this._loading[f]=n(f))}finally{delete this._loading[f]}}}addSchema(t,r,n,i=this.opts.validateSchema){if(Array.isArray(t)){for(let a of t)this.addSchema(a,void 0,n,i);return this}let o;if(typeof t=="object"){let{schemaId:a}=this.opts;if(o=t[a],o!==void 0&&typeof o!="string")throw new Error(`schema ${a} must be string`)}return r=(0,i0.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,i,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$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,t);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(t){let r;for(;typeof(r=XY.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,i=new n0.SchemaEnv({schema:{},schemaId:n});if(r=n0.resolveSchema.call(this,i,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=XY.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,i0.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,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(OVe.call(this,n,r),!r)return(0,Zj.eachItem)(n,o=>Qj.call(this,o)),this;IVe.call(this,r);let i={...r,type:(0,RI.getJSONTypes)(r.type),schemaType:(0,RI.getJSONTypes)(r.schemaType)};return(0,Zj.eachItem)(n,i.type.length===0?o=>Qj.call(this,o,i):o=>i.type.forEach(a=>Qj.call(this,o,i,a))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===t);i>=0&&n.rules.splice(i,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let i of r){let o=i.split("/").slice(1),a=t;for(let u of o)a=a[u];for(let u in n){let c=n[u];if(typeof c!="object")continue;let{$data:l}=c.definition,f=a[u];l&&f&&(a[u]=eJ(f))}}return t}_removeAllSchemas(t,r){for(let n in t){let i=t[n];(!r||r.test(n))&&(typeof i=="string"?delete t[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[n]))}}_addSchema(t,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let a,{schemaId:u}=this.opts;if(typeof t=="object")a=t[u];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;n=(0,i0.normalizeId)(a||n);let l=i0.getSchemaRefs.call(this,t,n);return c=new n0.SchemaEnv({schema:t,schemaId:u,meta:r,baseId:n,localRefs:l}),this._cache.set(c.schema,c),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),i&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):n0.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{n0.compileSchema.call(this,t)}finally{this.opts=r}}};tn.default=s0;s0.ValidationError=aVe.default;s0.MissingRefError=QY.default;function JY(e,t,r,n="error"){for(let i in e){let o=i;o in t&&this.logger[n](`${r}: option ${i}. ${e[o]}`)}}s(JY,"checkOptions");function XY(e){return e=(0,i0.normalizeId)(e),this.schemas[e]||this.refs[e]}s(XY,"getSchEnv");function _Ve(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}s(_Ve,"addInitialSchemas");function gVe(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}s(gVe,"addInitialFormats");function yVe(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}s(yVe,"addInitialKeywords");function EVe(){let e={...this.opts};for(let t of fVe)delete e[t];return e}s(EVe,"getMetaSchemaOptions");var bVe={log(){},warn(){},error(){}};function SVe(e){if(e===!1)return bVe;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}s(SVe,"getLogger");var vVe=/^[a-z_$][a-z0-9_$:-]*$/i;function OVe(e,t){let{RULES:r}=this;if((0,Zj.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!vVe.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}s(OVe,"checkKeyword");function Qj(e,t,r){var n;let i=t?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,a=i?o.post:o.rules.find(({type:c})=>c===r);if(a||(a={type:r,rules:[]},o.rules.push(a)),o.keywords[e]=!0,!t)return;let u={keyword:e,definition:{...t,type:(0,RI.getJSONTypes)(t.type),schemaType:(0,RI.getJSONTypes)(t.schemaType)}};t.before?PVe.call(this,a,u,t.before):a.rules.push(u),o.all[e]=u,(n=t.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}s(Qj,"addRule");function PVe(e,t,r){let n=e.rules.findIndex(i=>i.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}s(PVe,"addBeforeRule");function IVe(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=eJ(t)),e.validateSchema=this.compile(t,!0))}s(IVe,"keywordMetaschema");var wVe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function eJ(e){return{anyOf:[e,wVe]}}s(eJ,"schemaOrData")});var rJ=h(eM=>{"use strict";Object.defineProperty(eM,"__esModule",{value:!0});var TVe={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};eM.default=TVe});var oJ=h(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});cd.callRef=cd.getValidate=void 0;var NVe=TI(),nJ=ys(),Si=Re(),Xh=fu(),iJ=AI(),CI=pt(),AVe={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:o,validateName:a,opts:u,self:c}=n,{root:l}=o;if((r==="#"||r==="#/")&&i===l.baseId)return d();let f=iJ.resolveRef.call(c,l,i,r);if(f===void 0)throw new NVe.default(n.opts.uriResolver,i,r);if(f instanceof iJ.SchemaEnv)return _(f);return m(f);function d(){if(o===l)return $I(e,a,o,o.$async);let g=t.scopeValue("root",{ref:l});return $I(e,(0,Si._)`${g}.validate`,l,l.$async)}function _(g){let y=sJ(e,g);$I(e,y,g,g.$async)}function m(g){let y=t.scopeValue("schema",u.code.source===!0?{ref:g,code:(0,Si.stringify)(g)}:{ref:g}),b=t.name("valid"),E=e.subschema({schema:g,dataTypes:[],schemaPath:Si.nil,topSchemaRef:y,errSchemaPath:r},b);e.mergeEvaluated(E),e.ok(b)}}};function sJ(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Si._)`${r.scopeValue("wrapper",{ref:t})}.validate`}s(sJ,"getValidate");cd.getValidate=sJ;function $I(e,t,r,n){let{gen:i,it:o}=e,{allErrors:a,schemaEnv:u,opts:c}=o,l=c.passContext?Xh.default.this:Si.nil;n?f():d();function f(){if(!u.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,Si._)`await ${(0,nJ.callValidateCode)(e,t,l)}`),m(t),a||i.assign(g,!0)},y=>{i.if((0,Si._)`!(${y} instanceof ${o.ValidationError})`,()=>i.throw(y)),_(y),a||i.assign(g,!1)}),e.ok(g)}s(f,"callAsyncRef");function d(){e.result((0,nJ.callValidateCode)(e,t,l),()=>m(t),()=>_(t))}s(d,"callSyncRef");function _(g){let y=(0,Si._)`${g}.errors`;i.assign(Xh.default.vErrors,(0,Si._)`${Xh.default.vErrors} === null ? ${y} : ${Xh.default.vErrors}.concat(${y})`),i.assign(Xh.default.errors,(0,Si._)`${Xh.default.vErrors}.length`)}s(_,"addErrorsFrom");function m(g){var y;if(!o.opts.unevaluated)return;let b=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(b&&!b.dynamicProps)b.props!==void 0&&(o.props=CI.mergeEvaluated.props(i,b.props,o.props));else{let E=i.var("props",(0,Si._)`${g}.evaluated.props`);o.props=CI.mergeEvaluated.props(i,E,o.props,Si.Name)}if(o.items!==!0)if(b&&!b.dynamicItems)b.items!==void 0&&(o.items=CI.mergeEvaluated.items(i,b.items,o.items));else{let E=i.var("items",(0,Si._)`${g}.evaluated.items`);o.items=CI.mergeEvaluated.items(i,E,o.items,Si.Name)}}s(m,"addEvaluatedFrom")}s($I,"callRef");cd.callRef=$I;cd.default=AVe});var aJ=h(tM=>{"use strict";Object.defineProperty(tM,"__esModule",{value:!0});var RVe=rJ(),CVe=oJ(),$Ve=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",RVe.default,CVe.default];tM.default=$Ve});var uJ=h(rM=>{"use strict";Object.defineProperty(rM,"__esModule",{value:!0});var DI=Re(),Nc=DI.operators,LI={maximum:{okStr:"<=",ok:Nc.LTE,fail:Nc.GT},minimum:{okStr:">=",ok:Nc.GTE,fail:Nc.LT},exclusiveMaximum:{okStr:"<",ok:Nc.LT,fail:Nc.GTE},exclusiveMinimum:{okStr:">",ok:Nc.GT,fail:Nc.LTE}},DVe={message:({keyword:e,schemaCode:t})=>(0,DI.str)`must be ${LI[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,DI._)`{comparison: ${LI[e].okStr}, limit: ${t}}`},LVe={keyword:Object.keys(LI),type:"number",schemaType:"number",$data:!0,error:DVe,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,DI._)`${r} ${LI[t].fail} ${n} || isNaN(${r})`)}};rM.default=LVe});var cJ=h(nM=>{"use strict";Object.defineProperty(nM,"__esModule",{value:!0});var o0=Re(),jVe={message:({schemaCode:e})=>(0,o0.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,o0._)`{multipleOf: ${e}}`},MVe={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:jVe,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,o=i.opts.multipleOfPrecision,a=t.let("res"),u=o?(0,o0._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,o0._)`${a} !== parseInt(${a})`;e.fail$data((0,o0._)`(${n} === 0 || (${a} = ${r}/${n}, ${u}))`)}};nM.default=MVe});var fJ=h(iM=>{"use strict";Object.defineProperty(iM,"__esModule",{value:!0});function lJ(e){let t=e.length,r=0,n=0,i;for(;n<t;)r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t&&(i=e.charCodeAt(n),(i&64512)===56320&&n++);return r}s(lJ,"ucs2length");iM.default=lJ;lJ.code='require("ajv/dist/runtime/ucs2length").default'});var dJ=h(sM=>{"use strict";Object.defineProperty(sM,"__esModule",{value:!0});var ld=Re(),UVe=pt(),xVe=fJ(),qVe={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,ld.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,ld._)`{limit: ${e}}`},FVe={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:qVe,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,o=t==="maxLength"?ld.operators.GT:ld.operators.LT,a=i.opts.unicode===!1?(0,ld._)`${r}.length`:(0,ld._)`${(0,UVe.useFunc)(e.gen,xVe.default)}(${r})`;e.fail$data((0,ld._)`${a} ${o} ${n}`)}};sM.default=FVe});var pJ=h(oM=>{"use strict";Object.defineProperty(oM,"__esModule",{value:!0});var kVe=ys(),jI=Re(),BVe={message:({schemaCode:e})=>(0,jI.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,jI._)`{pattern: ${e}}`},GVe={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:BVe,code(e){let{data:t,$data:r,schema:n,schemaCode:i,it:o}=e,a=o.opts.unicodeRegExp?"u":"",u=r?(0,jI._)`(new RegExp(${i}, ${a}))`:(0,kVe.usePattern)(e,n);e.fail$data((0,jI._)`!${u}.test(${t})`)}};oM.default=GVe});var hJ=h(aM=>{"use strict";Object.defineProperty(aM,"__esModule",{value:!0});var a0=Re(),VVe={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,a0.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,a0._)`{limit: ${e}}`},zVe={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:VVe,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?a0.operators.GT:a0.operators.LT;e.fail$data((0,a0._)`Object.keys(${r}).length ${i} ${n}`)}};aM.default=zVe});var mJ=h(uM=>{"use strict";Object.defineProperty(uM,"__esModule",{value:!0});var u0=ys(),c0=Re(),HVe=pt(),KVe={message:({params:{missingProperty:e}})=>(0,c0.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,c0._)`{missingProperty: ${e}}`},WVe={keyword:"required",type:"object",schemaType:"array",$data:!0,error:KVe,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:o,it:a}=e,{opts:u}=a;if(!o&&r.length===0)return;let c=r.length>=u.loopRequired;if(a.allErrors?l():f(),u.strictRequired){let m=e.parentSchema.properties,{definedProperties:g}=e.it;for(let y of r)if(m?.[y]===void 0&&!g.has(y)){let b=a.schemaEnv.baseId+a.errSchemaPath,E=`required property "${y}" is not defined at "${b}" (strictRequired)`;(0,HVe.checkStrictMode)(a,E,a.opts.strictRequired)}}function l(){if(c||o)e.block$data(c0.nil,d);else for(let m of r)(0,u0.checkReportMissingProp)(e,m)}s(l,"allErrorsMode");function f(){let m=t.let("missing");if(c||o){let g=t.let("valid",!0);e.block$data(g,()=>_(m,g)),e.ok(g)}else t.if((0,u0.checkMissingProp)(e,r,m)),(0,u0.reportMissingProp)(e,m),t.else()}s(f,"exitOnErrorMode");function d(){t.forOf("prop",n,m=>{e.setParams({missingProperty:m}),t.if((0,u0.noPropertyInData)(t,i,m,u.ownProperties),()=>e.error())})}s(d,"loopAllRequired");function _(m,g){e.setParams({missingProperty:m}),t.forOf(m,n,()=>{t.assign(g,(0,u0.propertyInData)(t,i,m,u.ownProperties)),t.if((0,c0.not)(g),()=>{e.error(),t.break()})},c0.nil)}s(_,"loopUntilMissing")}};uM.default=WVe});var _J=h(cM=>{"use strict";Object.defineProperty(cM,"__esModule",{value:!0});var l0=Re(),YVe={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,l0.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,l0._)`{limit: ${e}}`},JVe={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:YVe,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?l0.operators.GT:l0.operators.LT;e.fail$data((0,l0._)`${r}.length ${i} ${n}`)}};cM.default=JVe});var MI=h(lM=>{"use strict";Object.defineProperty(lM,"__esModule",{value:!0});var gJ=Xf();gJ.code='require("ajv/dist/runtime/equal").default';lM.default=gJ});var yJ=h(dM=>{"use strict";Object.defineProperty(dM,"__esModule",{value:!0});var fM=Qy(),rn=Re(),XVe=pt(),QVe=MI(),ZVe={message:({params:{i:e,j:t}})=>(0,rn.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,rn._)`{i: ${e}, j: ${t}}`},eze={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:ZVe,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:o,schemaCode:a,it:u}=e;if(!n&&!i)return;let c=t.let("valid"),l=o.items?(0,fM.getSchemaTypes)(o.items):[];e.block$data(c,f,(0,rn._)`${a} === false`),e.ok(c);function f(){let g=t.let("i",(0,rn._)`${r}.length`),y=t.let("j");e.setParams({i:g,j:y}),t.assign(c,!0),t.if((0,rn._)`${g} > 1`,()=>(d()?_:m)(g,y))}s(f,"validateUniqueItems");function d(){return l.length>0&&!l.some(g=>g==="object"||g==="array")}s(d,"canOptimize");function _(g,y){let b=t.name("item"),E=(0,fM.checkDataTypes)(l,b,u.opts.strictNumbers,fM.DataType.Wrong),v=t.const("indices",(0,rn._)`{}`);t.for((0,rn._)`;${g}--;`,()=>{t.let(b,(0,rn._)`${r}[${g}]`),t.if(E,(0,rn._)`continue`),l.length>1&&t.if((0,rn._)`typeof ${b} == "string"`,(0,rn._)`${b} += "_"`),t.if((0,rn._)`typeof ${v}[${b}] == "number"`,()=>{t.assign(y,(0,rn._)`${v}[${b}]`),e.error(),t.assign(c,!1).break()}).code((0,rn._)`${v}[${b}] = ${g}`)})}s(_,"loopN");function m(g,y){let b=(0,XVe.useFunc)(t,QVe.default),E=t.name("outer");t.label(E).for((0,rn._)`;${g}--;`,()=>t.for((0,rn._)`${y} = ${g}; ${y}--;`,()=>t.if((0,rn._)`${b}(${r}[${g}], ${r}[${y}])`,()=>{e.error(),t.assign(c,!1).break(E)})))}s(m,"loopN2")}};dM.default=eze});var EJ=h(hM=>{"use strict";Object.defineProperty(hM,"__esModule",{value:!0});var pM=Re(),tze=pt(),rze=MI(),nze={message:"must be equal to constant",params:({schemaCode:e})=>(0,pM._)`{allowedValue: ${e}}`},ize={keyword:"const",$data:!0,error:nze,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:o}=e;n||o&&typeof o=="object"?e.fail$data((0,pM._)`!${(0,tze.useFunc)(t,rze.default)}(${r}, ${i})`):e.fail((0,pM._)`${o} !== ${r}`)}};hM.default=ize});var bJ=h(mM=>{"use strict";Object.defineProperty(mM,"__esModule",{value:!0});var f0=Re(),sze=pt(),oze=MI(),aze={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,f0._)`{allowedValues: ${e}}`},uze={keyword:"enum",schemaType:"array",$data:!0,error:aze,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:o,it:a}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let u=i.length>=a.opts.loopEnum,c,l=s(()=>c??(c=(0,sze.useFunc)(t,oze.default)),"getEql"),f;if(u||n)f=t.let("valid"),e.block$data(f,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=t.const("vSchema",o);f=(0,f0.or)(...i.map((g,y)=>_(m,y)))}e.pass(f);function d(){t.assign(f,!1),t.forOf("v",o,m=>t.if((0,f0._)`${l()}(${r}, ${m})`,()=>t.assign(f,!0).break()))}s(d,"loopEnum");function _(m,g){let y=i[g];return typeof y=="object"&&y!==null?(0,f0._)`${l()}(${r}, ${m}[${g}])`:(0,f0._)`${r} === ${y}`}s(_,"equalCode")}};mM.default=uze});var SJ=h(_M=>{"use strict";Object.defineProperty(_M,"__esModule",{value:!0});var cze=uJ(),lze=cJ(),fze=dJ(),dze=pJ(),pze=hJ(),hze=mJ(),mze=_J(),_ze=yJ(),gze=EJ(),yze=bJ(),Eze=[cze.default,lze.default,fze.default,dze.default,pze.default,hze.default,mze.default,_ze.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},gze.default,yze.default];_M.default=Eze});var yM=h(d0=>{"use strict";Object.defineProperty(d0,"__esModule",{value:!0});d0.validateAdditionalItems=void 0;var fd=Re(),gM=pt(),bze={message:({params:{len:e}})=>(0,fd.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,fd._)`{limit: ${e}}`},Sze={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:bze,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,gM.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}vJ(e,n)}};function vJ(e,t){let{gen:r,schema:n,data:i,keyword:o,it:a}=e;a.items=!0;let u=r.const("len",(0,fd._)`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,fd._)`${u} <= ${t.length}`);else if(typeof n=="object"&&!(0,gM.alwaysValidSchema)(a,n)){let l=r.var("valid",(0,fd._)`${u} <= ${t.length}`);r.if((0,fd.not)(l),()=>c(l)),e.ok(l)}function c(l){r.forRange("i",t.length,u,f=>{e.subschema({keyword:o,dataProp:f,dataPropType:gM.Type.Num},l),a.allErrors||r.if((0,fd.not)(l),()=>r.break())})}s(c,"validateItems")}s(vJ,"validateAdditionalItems");d0.validateAdditionalItems=vJ;d0.default=Sze});var EM=h(p0=>{"use strict";Object.defineProperty(p0,"__esModule",{value:!0});p0.validateTuple=void 0;var OJ=Re(),UI=pt(),vze=ys(),Oze={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return PJ(e,"additionalItems",t);r.items=!0,!(0,UI.alwaysValidSchema)(r,t)&&e.ok((0,vze.validateArray)(e))}};function PJ(e,t,r=e.schema){let{gen:n,parentSchema:i,data:o,keyword:a,it:u}=e;f(i),u.opts.unevaluated&&r.length&&u.items!==!0&&(u.items=UI.mergeEvaluated.items(n,r.length,u.items));let c=n.name("valid"),l=n.const("len",(0,OJ._)`${o}.length`);r.forEach((d,_)=>{(0,UI.alwaysValidSchema)(u,d)||(n.if((0,OJ._)`${l} > ${_}`,()=>e.subschema({keyword:a,schemaProp:_,dataProp:_},c)),e.ok(c))});function f(d){let{opts:_,errSchemaPath:m}=u,g=r.length,y=g===d.minItems&&(g===d.maxItems||d[t]===!1);if(_.strictTuples&&!y){let b=`"${a}" is ${g}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,UI.checkStrictMode)(u,b,_.strictTuples)}}s(f,"checkStrictTuple")}s(PJ,"validateTuple");p0.validateTuple=PJ;p0.default=Oze});var IJ=h(bM=>{"use strict";Object.defineProperty(bM,"__esModule",{value:!0});var Pze=EM(),Ize={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,Pze.validateTuple)(e,"items")};bM.default=Ize});var TJ=h(SM=>{"use strict";Object.defineProperty(SM,"__esModule",{value:!0});var wJ=Re(),wze=pt(),Tze=ys(),Nze=yM(),Aze={message:({params:{len:e}})=>(0,wJ.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,wJ._)`{limit: ${e}}`},Rze={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Aze,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,wze.alwaysValidSchema)(n,t)&&(i?(0,Nze.validateAdditionalItems)(e,i):e.ok((0,Tze.validateArray)(e)))}};SM.default=Rze});var NJ=h(vM=>{"use strict";Object.defineProperty(vM,"__esModule",{value:!0});var bs=Re(),xI=pt(),Cze={message:({params:{min:e,max:t}})=>t===void 0?(0,bs.str)`must contain at least ${e} valid item(s)`:(0,bs.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,bs._)`{minContains: ${e}}`:(0,bs._)`{minContains: ${e}, maxContains: ${t}}`},$ze={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Cze,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e,a,u,{minContains:c,maxContains:l}=n;o.opts.next?(a=c===void 0?1:c,u=l):a=1;let f=t.const("len",(0,bs._)`${i}.length`);if(e.setParams({min:a,max:u}),u===void 0&&a===0){(0,xI.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(u!==void 0&&a>u){(0,xI.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,xI.alwaysValidSchema)(o,r)){let y=(0,bs._)`${f} >= ${a}`;u!==void 0&&(y=(0,bs._)`${y} && ${f} <= ${u}`),e.pass(y);return}o.items=!0;let d=t.name("valid");u===void 0&&a===1?m(d,()=>t.if(d,()=>t.break())):a===0?(t.let(d,!0),u!==void 0&&t.if((0,bs._)`${i}.length > 0`,_)):(t.let(d,!1),_()),e.result(d,()=>e.reset());function _(){let y=t.name("_valid"),b=t.let("count",0);m(y,()=>t.if(y,()=>g(b)))}s(_,"validateItemsWithCount");function m(y,b){t.forRange("i",0,f,E=>{e.subschema({keyword:"contains",dataProp:E,dataPropType:xI.Type.Num,compositeRule:!0},y),b()})}s(m,"validateItems");function g(y){t.code((0,bs._)`${y}++`),u===void 0?t.if((0,bs._)`${y} >= ${a}`,()=>t.assign(d,!0).break()):(t.if((0,bs._)`${y} > ${u}`,()=>t.assign(d,!1).break()),a===1?t.assign(d,!0):t.if((0,bs._)`${y} >= ${a}`,()=>t.assign(d,!0)))}s(g,"checkLimits")}};vM.default=$ze});var CJ=h(ua=>{"use strict";Object.defineProperty(ua,"__esModule",{value:!0});ua.validateSchemaDeps=ua.validatePropertyDeps=ua.error=void 0;var OM=Re(),Dze=pt(),h0=ys();ua.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,OM.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,OM._)`{property: ${e},
|
|
146
146
|
missingProperty: ${n},
|
|
147
147
|
depsCount: ${t},
|
|
148
|
-
deps: ${r}}`};var Lze={keyword:"dependencies",type:"object",schemaType:"object",error:ua.error,code(e){let[t,r]=jze(e);AJ(e,t),RJ(e,r)}};function jze({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}s(jze,"splitDependencies");function AJ(e,t=e.schema){let{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;let o=r.let("missing");for(let a in t){let u=t[a];if(u.length===0)continue;let c=(0,h0.propertyInData)(r,n,a,i.opts.ownProperties);e.setParams({property:a,depsCount:u.length,deps:u.join(", ")}),i.allErrors?r.if(c,()=>{for(let l of u)(0,h0.checkReportMissingProp)(e,l)}):(r.if((0,OM._)`${c} && (${(0,h0.checkMissingProp)(e,u,o)})`),(0,h0.reportMissingProp)(e,o),r.else())}}s(AJ,"validatePropertyDeps");ua.validatePropertyDeps=AJ;function RJ(e,t=e.schema){let{gen:r,data:n,keyword:i,it:o}=e,a=r.name("valid");for(let u in t)(0,Dze.alwaysValidSchema)(o,t[u])||(r.if((0,h0.propertyInData)(r,n,u,o.opts.ownProperties),()=>{let c=e.subschema({keyword:i,schemaProp:u},a);e.mergeValidEvaluated(c,a)},()=>r.var(a,!0)),e.ok(a))}s(RJ,"validateSchemaDeps");ua.validateSchemaDeps=RJ;ua.default=Lze});var DJ=h(PM=>{"use strict";Object.defineProperty(PM,"__esModule",{value:!0});var $J=Re(),Mze=pt(),Uze={message:"property name must be valid",params:({params:e})=>(0,$J._)`{propertyName: ${e.propertyName}}`},xze={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Uze,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,Mze.alwaysValidSchema)(i,r))return;let o=t.name("valid");t.forIn("key",n,a=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),t.if((0,$J.not)(o),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(o)}};PM.default=xze});var wM=h(IM=>{"use strict";Object.defineProperty(IM,"__esModule",{value:!0});var qI=ys(),po=Re(),qze=fu(),FI=pt(),Fze={message:"must NOT have additional properties",params:({params:e})=>(0,po._)`{additionalProperty: ${e.additionalProperty}}`},kze={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Fze,code(e){let{gen:t,schema:r,parentSchema:n,data:i,errsCount:o,it:a}=e;if(!o)throw new Error("ajv implementation error");let{allErrors:u,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,FI.alwaysValidSchema)(a,r))return;let l=(0,qI.allSchemaProperties)(n.properties),f=(0,qI.allSchemaProperties)(n.patternProperties);d(),e.ok((0,po._)`${o} === ${qze.default.errors}`);function d(){t.forIn("key",i,b=>{!l.length&&!f.length?g(b):t.if(_(b),()=>g(b))})}s(d,"checkAdditionalProperties");function _(b){let E;if(l.length>8){let S=(0,FI.schemaRefOrVal)(a,n.properties,"properties");E=(0,qI.isOwnProperty)(t,S,b)}else l.length?E=(0,po.or)(...l.map(S=>(0,po._)`${b} === ${S}`)):E=po.nil;return f.length&&(E=(0,po.or)(E,...f.map(S=>(0,po._)`${(0,qI.usePattern)(e,S)}.test(${b})`))),(0,po.not)(E)}s(_,"isAdditional");function m(b){t.code((0,po._)`delete ${i}[${b}]`)}s(m,"deleteAdditional");function g(b){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(b);return}if(r===!1){e.setParams({additionalProperty:b}),e.error(),u||t.break();return}if(typeof r=="object"&&!(0,FI.alwaysValidSchema)(a,r)){let E=t.name("valid");c.removeAdditional==="failing"?(y(b,E,!1),t.if((0,po.not)(E),()=>{e.reset(),m(b)})):(y(b,E),u||t.if((0,po.not)(E),()=>t.break()))}}s(g,"additionalPropertyCode");function y(b,E,S){let O={keyword:"additionalProperties",dataProp:b,dataPropType:FI.Type.Str};S===!1&&Object.assign(O,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(O,E)}s(y,"applyAdditionalSchema")}};IM.default=kze});var MJ=h(NM=>{"use strict";Object.defineProperty(NM,"__esModule",{value:!0});var Bze=r0(),LJ=ys(),TM=pt(),jJ=wM(),Gze={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&jJ.default.code(new Bze.KeywordCxt(o,jJ.default,"additionalProperties"));let a=(0,LJ.allSchemaProperties)(r);for(let d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=TM.mergeEvaluated.props(t,(0,TM.toHash)(a),o.props));let u=a.filter(d=>!(0,TM.alwaysValidSchema)(o,r[d]));if(u.length===0)return;let c=t.name("valid");for(let d of u)l(d)?f(d):(t.if((0,LJ.propertyInData)(t,i,d,o.opts.ownProperties)),f(d),o.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function l(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}s(l,"hasDefault");function f(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}s(f,"applyPropertySchema")}};NM.default=Gze});var FJ=h(AM=>{"use strict";Object.defineProperty(AM,"__esModule",{value:!0});var UJ=ys(),kI=Re(),xJ=pt(),qJ=pt(),Vze={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:o}=e,{opts:a}=o,u=(0,UJ.allSchemaProperties)(r),c=u.filter(y=>(0,xJ.alwaysValidSchema)(o,r[y]));if(u.length===0||c.length===u.length&&(!o.opts.unevaluated||o.props===!0))return;let l=a.strictSchema&&!a.allowMatchingProperties&&i.properties,f=t.name("valid");o.props!==!0&&!(o.props instanceof kI.Name)&&(o.props=(0,qJ.evaluatedPropsToName)(t,o.props));let{props:d}=o;_();function _(){for(let y of u)l&&m(y),o.allErrors?g(y):(t.var(f,!0),g(y),t.if(f))}s(_,"validatePatternProperties");function m(y){for(let b in l)new RegExp(y).test(b)&&(0,xJ.checkStrictMode)(o,`property ${b} matches pattern ${y} (use allowMatchingProperties)`)}s(m,"checkMatchingProperties");function g(y){t.forIn("key",n,b=>{t.if((0,kI._)`${(0,UJ.usePattern)(e,y)}.test(${b})`,()=>{let E=c.includes(y);E||e.subschema({keyword:"patternProperties",schemaProp:y,dataProp:b,dataPropType:qJ.Type.Str},f),o.opts.unevaluated&&d!==!0?t.assign((0,kI._)`${d}[${b}]`,!0):!E&&!o.allErrors&&t.if((0,kI.not)(f),()=>t.break())})})}s(g,"validateProperties")}};AM.default=Vze});var kJ=h(RM=>{"use strict";Object.defineProperty(RM,"__esModule",{value:!0});var zze=pt(),Hze={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,zze.alwaysValidSchema)(n,r)){e.fail();return}let i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};RM.default=Hze});var BJ=h(CM=>{"use strict";Object.defineProperty(CM,"__esModule",{value:!0});var Kze=ys(),Wze={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Kze.validateUnion,error:{message:"must match a schema in anyOf"}};CM.default=Wze});var GJ=h($M=>{"use strict";Object.defineProperty($M,"__esModule",{value:!0});var BI=Re(),Yze=pt(),Jze={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,BI._)`{passingSchemas: ${e.passing}}`},Xze={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Jze,code(e){let{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,a=t.let("valid",!1),u=t.let("passing",null),c=t.name("_valid");e.setParams({passing:u}),t.block(l),e.result(a,()=>e.reset(),()=>e.error(!0));function l(){o.forEach((f,d)=>{let _;(0,Yze.alwaysValidSchema)(i,f)?t.var(c,!0):_=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,BI._)`${c} && ${a}`).assign(a,!1).assign(u,(0,BI._)`[${u}, ${d}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(u,d),_&&e.mergeEvaluated(_,BI.Name)})})}s(l,"validateOneOf")}};$M.default=Xze});var VJ=h(DM=>{"use strict";Object.defineProperty(DM,"__esModule",{value:!0});var Qze=pt(),Zze={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=t.name("valid");r.forEach((o,a)=>{if((0,Qze.alwaysValidSchema)(n,o))return;let u=e.subschema({keyword:"allOf",schemaProp:a},i);e.ok(i),e.mergeEvaluated(u)})}};DM.default=Zze});var KJ=h(LM=>{"use strict";Object.defineProperty(LM,"__esModule",{value:!0});var GI=Re(),HJ=pt(),eHe={message:({params:e})=>(0,GI.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,GI._)`{failingKeyword: ${e.ifClause}}`},tHe={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:eHe,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,HJ.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=zJ(n,"then"),o=zJ(n,"else");if(!i&&!o)return;let a=t.let("valid",!0),u=t.name("_valid");if(c(),e.reset(),i&&o){let f=t.let("ifClause");e.setParams({ifClause:f}),t.if(u,l("then",f),l("else",f))}else i?t.if(u,l("then")):t.if((0,GI.not)(u),l("else"));e.pass(a,()=>e.error(!0));function c(){let f=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(f)}s(c,"validateIf");function l(f,d){return()=>{let _=e.subschema({keyword:f},u);t.assign(a,u),e.mergeValidEvaluated(_,a),d?t.assign(d,(0,GI._)`${f}`):e.setParams({ifClause:f})}}s(l,"validateClause")}};function zJ(e,t){let r=e.schema[t];return r!==void 0&&!(0,HJ.alwaysValidSchema)(e,r)}s(zJ,"hasSchema");LM.default=tHe});var WJ=h(jM=>{"use strict";Object.defineProperty(jM,"__esModule",{value:!0});var rHe=pt(),nHe={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,rHe.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};jM.default=nHe});var YJ=h(MM=>{"use strict";Object.defineProperty(MM,"__esModule",{value:!0});var iHe=yM(),sHe=IJ(),oHe=EM(),aHe=TJ(),uHe=NJ(),cHe=CJ(),lHe=DJ(),fHe=wM(),dHe=MJ(),pHe=FJ(),hHe=kJ(),mHe=BJ(),_He=GJ(),gHe=VJ(),yHe=KJ(),EHe=WJ();function bHe(e=!1){let t=[hHe.default,mHe.default,_He.default,gHe.default,yHe.default,EHe.default,lHe.default,fHe.default,cHe.default,dHe.default,pHe.default];return e?t.push(sHe.default,aHe.default):t.push(iHe.default,oHe.default),t.push(uHe.default),t}s(bHe,"getApplicator");MM.default=bHe});var JJ=h(UM=>{"use strict";Object.defineProperty(UM,"__esModule",{value:!0});var hr=Re(),SHe={message:({schemaCode:e})=>(0,hr.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,hr._)`{format: ${e}}`},vHe={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:SHe,code(e,t){let{gen:r,data:n,$data:i,schema:o,schemaCode:a,it:u}=e,{opts:c,errSchemaPath:l,schemaEnv:f,self:d}=u;if(!c.validateFormats)return;i?_():m();function _(){let g=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),y=r.const("fDef",(0,hr._)`${g}[${a}]`),b=r.let("fType"),E=r.let("format");r.if((0,hr._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(b,(0,hr._)`${y}.type || "string"`).assign(E,(0,hr._)`${y}.validate`),()=>r.assign(b,(0,hr._)`"string"`).assign(E,y)),e.fail$data((0,hr.or)(S(),O()));function S(){return c.strictSchema===!1?hr.nil:(0,hr._)`${a} && !${E}`}s(S,"unknownFmt");function O(){let I=f.$async?(0,hr._)`(${y}.async ? await ${E}(${n}) : ${E}(${n}))`:(0,hr._)`${E}(${n})`,w=(0,hr._)`(typeof ${E} == "function" ? ${I} : ${E}.test(${n}))`;return(0,hr._)`${E} && ${E} !== true && ${b} === ${t} && !${w}`}s(O,"invalidFmt")}s(_,"validate$DataFormat");function m(){let g=d.formats[o];if(!g){S();return}if(g===!0)return;let[y,b,E]=O(g);y===t&&e.pass(I());function S(){if(c.strictSchema===!1){d.logger.warn(w());return}throw new Error(w());function w(){return`unknown format "${o}" ignored in schema at path "${l}"`}}s(S,"unknownFormat");function O(w){let j=w instanceof RegExp?(0,hr.regexpCode)(w):c.code.formats?(0,hr._)`${c.code.formats}${(0,hr.getProperty)(o)}`:void 0,F=r.scopeValue("formats",{key:o,ref:w,code:j});return typeof w=="object"&&!(w instanceof RegExp)?[w.type||"string",w.validate,(0,hr._)`${F}.validate`]:["string",w,F]}s(O,"getFormat");function I(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!f.$async)throw new Error("async format in sync schema");return(0,hr._)`await ${E}(${n})`}return typeof b=="function"?(0,hr._)`${E}(${n})`:(0,hr._)`${E}.test(${n})`}s(I,"validCondition")}s(m,"validateFormat")}};UM.default=vHe});var XJ=h(xM=>{"use strict";Object.defineProperty(xM,"__esModule",{value:!0});var OHe=JJ(),PHe=[OHe.default];xM.default=PHe});var QJ=h(Qh=>{"use strict";Object.defineProperty(Qh,"__esModule",{value:!0});Qh.contentVocabulary=Qh.metadataVocabulary=void 0;Qh.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Qh.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var eX=h(qM=>{"use strict";Object.defineProperty(qM,"__esModule",{value:!0});var IHe=aJ(),wHe=SJ(),THe=YJ(),NHe=XJ(),ZJ=QJ(),AHe=[IHe.default,wHe.default,(0,THe.default)(),NHe.default,ZJ.metadataVocabulary,ZJ.contentVocabulary];qM.default=AHe});var tX=h(m0=>{"use strict";Object.defineProperty(m0,"__esModule",{value:!0});m0.DiscrError=void 0;var RHe;(function(e){e.Tag="tag",e.Mapping="mapping"})(RHe=m0.DiscrError||(m0.DiscrError={}))});var nX=h(kM=>{"use strict";Object.defineProperty(kM,"__esModule",{value:!0});var Zh=Re(),FM=tX(),rX=AI(),CHe=pt(),$He={message:({params:{discrError:e,tagName:t}})=>e===FM.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Zh._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},DHe={keyword:"discriminator",type:"object",schemaType:"object",error:$He,code(e){let{gen:t,data:r,schema:n,parentSchema:i,it:o}=e,{oneOf:a}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let u=n.propertyName;if(typeof u!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),l=t.const("tag",(0,Zh._)`${r}${(0,Zh.getProperty)(u)}`);t.if((0,Zh._)`typeof ${l} == "string"`,()=>f(),()=>e.error(!1,{discrError:FM.DiscrError.Tag,tag:l,tagName:u})),e.ok(c);function f(){let m=_();t.if(!1);for(let g in m)t.elseIf((0,Zh._)`${l} === ${g}`),t.assign(c,d(m[g]));t.else(),e.error(!1,{discrError:FM.DiscrError.Mapping,tag:l,tagName:u}),t.endIf()}s(f,"validateMapping");function d(m){let g=t.name("valid"),y=e.subschema({keyword:"oneOf",schemaProp:m},g);return e.mergeEvaluated(y,Zh.Name),g}s(d,"applyTagSchema");function _(){var m;let g={},y=E(i),b=!0;for(let I=0;I<a.length;I++){let w=a[I];w?.$ref&&!(0,CHe.schemaHasRulesButRef)(w,o.self.RULES)&&(w=rX.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,w?.$ref),w instanceof rX.SchemaEnv&&(w=w.schema));let j=(m=w?.properties)===null||m===void 0?void 0:m[u];if(typeof j!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`);b=b&&(y||E(w)),S(j,I)}if(!b)throw new Error(`discriminator: "${u}" must be required`);return g;function E({required:I}){return Array.isArray(I)&&I.includes(u)}function S(I,w){if(I.const)O(I.const,w);else if(I.enum)for(let j of I.enum)O(j,w);else throw new Error(`discriminator: "properties/${u}" must have "const" or "enum"`)}function O(I,w){if(typeof I!="string"||I in g)throw new Error(`discriminator: "${u}" values must be unique strings`);g[I]=w}}s(_,"getMapping")}};kM.default=DHe});var iX=h((kCt,LHe)=>{LHe.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var aX=h((rr,oX)=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.MissingRefError=rr.ValidationError=rr.CodeGen=rr.Name=rr.nil=rr.stringify=rr.str=rr._=rr.KeywordCxt=void 0;var jHe=tJ(),MHe=eX(),UHe=nX(),sX=iX(),xHe=["/properties"],VI="http://json-schema.org/draft-07/schema",zI=class extends jHe.default{static{s(this,"Ajv")}_addVocabularies(){super._addVocabularies(),MHe.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(UHe.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(sX,xHe):sX;this.addMetaSchema(t,VI,!1),this.refs["http://json-schema.org/schema"]=VI}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(VI)?VI:void 0)}};oX.exports=rr=zI;Object.defineProperty(rr,"__esModule",{value:!0});rr.default=zI;var qHe=r0();Object.defineProperty(rr,"KeywordCxt",{enumerable:!0,get:function(){return qHe.KeywordCxt}});var em=Re();Object.defineProperty(rr,"_",{enumerable:!0,get:function(){return em._}});Object.defineProperty(rr,"str",{enumerable:!0,get:function(){return em.str}});Object.defineProperty(rr,"stringify",{enumerable:!0,get:function(){return em.stringify}});Object.defineProperty(rr,"nil",{enumerable:!0,get:function(){return em.nil}});Object.defineProperty(rr,"Name",{enumerable:!0,get:function(){return em.Name}});Object.defineProperty(rr,"CodeGen",{enumerable:!0,get:function(){return em.CodeGen}});var FHe=wI();Object.defineProperty(rr,"ValidationError",{enumerable:!0,get:function(){return FHe.default}});var kHe=TI();Object.defineProperty(rr,"MissingRefError",{enumerable:!0,get:function(){return kHe.default}})});var uX=h(tm=>{"use strict";Object.defineProperty(tm,"__esModule",{value:!0});tm.formatLimitDefinition=void 0;var BHe=aX(),ho=Re(),Ac=ho.operators,HI={formatMaximum:{okStr:"<=",ok:Ac.LTE,fail:Ac.GT},formatMinimum:{okStr:">=",ok:Ac.GTE,fail:Ac.LT},formatExclusiveMaximum:{okStr:"<",ok:Ac.LT,fail:Ac.GTE},formatExclusiveMinimum:{okStr:">",ok:Ac.GT,fail:Ac.LTE}},GHe={message:({keyword:e,schemaCode:t})=>ho.str`should be ${HI[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>ho._`{comparison: ${HI[e].okStr}, limit: ${t}}`};tm.formatLimitDefinition={keyword:Object.keys(HI),type:"string",schemaType:"string",$data:!0,error:GHe,code(e){let{gen:t,data:r,schemaCode:n,keyword:i,it:o}=e,{opts:a,self:u}=o;if(!a.validateFormats)return;let c=new BHe.KeywordCxt(o,u.RULES.all.format.definition,"format");c.$data?l():f();function l(){let _=t.scopeValue("formats",{ref:u.formats,code:a.code.formats}),m=t.const("fmt",ho._`${_}[${c.schemaCode}]`);e.fail$data(ho.or(ho._`typeof ${m} != "object"`,ho._`${m} instanceof RegExp`,ho._`typeof ${m}.compare != "function"`,d(m)))}s(l,"validate$DataFormat");function f(){let _=c.schema,m=u.formats[_];if(!m||m===!0)return;if(typeof m!="object"||m instanceof RegExp||typeof m.compare!="function")throw new Error(`"${i}": format "${_}" does not define "compare" function`);let g=t.scopeValue("formats",{key:_,ref:m,code:a.code.formats?ho._`${a.code.formats}${ho.getProperty(_)}`:void 0});e.fail$data(d(g))}s(f,"validateFormat");function d(_){return ho._`${_}.compare(${r}, ${n}) ${HI[i].fail} 0`}s(d,"compareCode")},dependencies:["format"]};var VHe=s(e=>(e.addKeyword(tm.formatLimitDefinition),e),"formatLimitPlugin");tm.default=VHe});var VM=h((_0,fX)=>{"use strict";Object.defineProperty(_0,"__esModule",{value:!0});var rm=WW(),zHe=uX(),BM=Re(),cX=new BM.Name("fullFormats"),HHe=new BM.Name("fastFormats"),GM=s((e,t={keywords:!0})=>{if(Array.isArray(t))return lX(e,t,rm.fullFormats,cX),e;let[r,n]=t.mode==="fast"?[rm.fastFormats,HHe]:[rm.fullFormats,cX],i=t.formats||rm.formatNames;return lX(e,i,r,n),t.keywords&&zHe.default(e),e},"formatsPlugin");GM.get=(e,t="full")=>{let n=(t==="fast"?rm.fastFormats:rm.fullFormats)[e];if(!n)throw new Error(`Unknown format "${e}"`);return n};function lX(e,t,r,n){var i,o;(i=(o=e.opts.code).formats)!==null&&i!==void 0||(o.formats=BM._`require("ajv-formats/dist/formats").${n}`);for(let a of t)e.addFormat(a,r[a])}s(lX,"addFormats");fX.exports=_0=GM;Object.defineProperty(_0,"__esModule",{value:!0});_0.default=GM});var HM=h(g0=>{"use strict";Object.defineProperty(g0,"__esModule",{value:!0});g0.dynamicAnchor=void 0;var zM=Oe(),KHe=ps(),dX=Ny(),WHe=tI(),YHe={keyword:"$dynamicAnchor",schemaType:"string",code:e=>pX(e,e.schema)};function pX(e,t){let{gen:r,it:n}=e;n.schemaEnv.root.dynamicAnchors[t]=!0;let i=(0,zM._)`${KHe.default.dynamicAnchors}${(0,zM.getProperty)(t)}`,o=n.errSchemaPath==="#"?n.validateName:JHe(e);r.if((0,zM._)`!${i}`,()=>r.assign(i,o))}s(pX,"dynamicAnchor");g0.dynamicAnchor=pX;function JHe(e){let{schemaEnv:t,schema:r,self:n}=e.it,{root:i,baseId:o,localRefs:a,meta:u}=t.root,{schemaId:c}=n.opts,l=new dX.SchemaEnv({schema:r,schemaId:c,root:i,baseId:o,localRefs:a,meta:u});return dX.compileSchema.call(n,l),(0,WHe.getValidate)(e,l)}s(JHe,"_getValidate");g0.default=YHe});var KM=h(y0=>{"use strict";Object.defineProperty(y0,"__esModule",{value:!0});y0.dynamicRef=void 0;var hX=Oe(),XHe=ps(),mX=tI(),QHe={keyword:"$dynamicRef",schemaType:"string",code:e=>_X(e,e.schema)};function _X(e,t){let{gen:r,keyword:n,it:i}=e;if(t[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);let o=t.slice(1);if(i.allErrors)a();else{let c=r.let("valid",!1);a(c),e.ok(c)}function a(c){if(i.schemaEnv.root.dynamicAnchors[o]){let l=r.let("_v",(0,hX._)`${XHe.default.dynamicAnchors}${(0,hX.getProperty)(o)}`);r.if(l,u(l,c),u(i.validateName,c))}else u(i.validateName,c)()}s(a,"_dynamicRef");function u(c,l){return l?()=>r.block(()=>{(0,mX.callRef)(e,c),r.let(l,!0)}):()=>(0,mX.callRef)(e,c)}s(u,"_callRef")}s(_X,"dynamicRef");y0.dynamicRef=_X;y0.default=QHe});var gX=h(WM=>{"use strict";Object.defineProperty(WM,"__esModule",{value:!0});var ZHe=HM(),e5e=Ve(),t5e={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,ZHe.dynamicAnchor)(e,""):(0,e5e.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};WM.default=t5e});var yX=h(YM=>{"use strict";Object.defineProperty(YM,"__esModule",{value:!0});var r5e=KM(),n5e={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,r5e.dynamicRef)(e,e.schema)};YM.default=n5e});var EX=h(JM=>{"use strict";Object.defineProperty(JM,"__esModule",{value:!0});var i5e=HM(),s5e=KM(),o5e=gX(),a5e=yX(),u5e=[i5e.default,s5e.default,o5e.default,a5e.default];JM.default=u5e});var SX=h(XM=>{"use strict";Object.defineProperty(XM,"__esModule",{value:!0});var bX=uI(),c5e={keyword:"dependentRequired",type:"object",schemaType:"object",error:bX.error,code:e=>(0,bX.validatePropertyDeps)(e)};XM.default=c5e});var vX=h(QM=>{"use strict";Object.defineProperty(QM,"__esModule",{value:!0});var l5e=uI(),f5e={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,l5e.validateSchemaDeps)(e)};QM.default=f5e});var OX=h(ZM=>{"use strict";Object.defineProperty(ZM,"__esModule",{value:!0});var d5e=Ve(),p5e={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:r}){t.contains===void 0&&(0,d5e.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}};ZM.default=p5e});var PX=h(eU=>{"use strict";Object.defineProperty(eU,"__esModule",{value:!0});var h5e=SX(),m5e=vX(),_5e=OX(),g5e=[h5e.default,m5e.default,_5e.default];eU.default=g5e});var wX=h(tU=>{"use strict";Object.defineProperty(tU,"__esModule",{value:!0});var Rc=Oe(),IX=Ve(),y5e=ps(),E5e={message:"must NOT have unevaluated properties",params:({params:e})=>(0,Rc._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},b5e={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:E5e,code(e){let{gen:t,schema:r,data:n,errsCount:i,it:o}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:a,props:u}=o;u instanceof Rc.Name?t.if((0,Rc._)`${u} !== true`,()=>t.forIn("key",n,d=>t.if(l(u,d),()=>c(d)))):u!==!0&&t.forIn("key",n,d=>u===void 0?c(d):t.if(f(u,d),()=>c(d))),o.props=!0,e.ok((0,Rc._)`${i} === ${y5e.default.errors}`);function c(d){if(r===!1){e.setParams({unevaluatedProperty:d}),e.error(),a||t.break();return}if(!(0,IX.alwaysValidSchema)(o,r)){let _=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:d,dataPropType:IX.Type.Str},_),a||t.if((0,Rc.not)(_),()=>t.break())}}s(c,"unevaluatedPropCode");function l(d,_){return(0,Rc._)`!${d} || !${d}[${_}]`}s(l,"unevaluatedDynamic");function f(d,_){let m=[];for(let g in d)d[g]===!0&&m.push((0,Rc._)`${_} !== ${g}`);return(0,Rc.and)(...m)}s(f,"unevaluatedStatic")}};tU.default=b5e});var NX=h(rU=>{"use strict";Object.defineProperty(rU,"__esModule",{value:!0});var dd=Oe(),TX=Ve(),S5e={message:({params:{len:e}})=>(0,dd.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,dd._)`{limit: ${e}}`},v5e={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:S5e,code(e){let{gen:t,schema:r,data:n,it:i}=e,o=i.items||0;if(o===!0)return;let a=t.const("len",(0,dd._)`${n}.length`);if(r===!1)e.setParams({len:o}),e.fail((0,dd._)`${a} > ${o}`);else if(typeof r=="object"&&!(0,TX.alwaysValidSchema)(i,r)){let c=t.var("valid",(0,dd._)`${a} <= ${o}`);t.if((0,dd.not)(c),()=>u(c,o)),e.ok(c)}i.items=!0;function u(c,l){t.forRange("i",l,a,f=>{e.subschema({keyword:"unevaluatedItems",dataProp:f,dataPropType:TX.Type.Num},c),i.allErrors||t.if((0,dd.not)(c),()=>t.break())})}s(u,"validateItems")}};rU.default=v5e});var AX=h(nU=>{"use strict";Object.defineProperty(nU,"__esModule",{value:!0});var O5e=wX(),P5e=NX(),I5e=[O5e.default,P5e.default];nU.default=I5e});var CX=h(iU=>{"use strict";Object.defineProperty(iU,"__esModule",{value:!0});var w5e=mL(),T5e=CL(),N5e=QL(),A5e=EX(),R5e=PX(),C5e=AX(),$5e=tj(),RX=rj(),D5e=[A5e.default,w5e.default,T5e.default,(0,N5e.default)(!0),$5e.default,RX.metadataVocabulary,RX.contentVocabulary,R5e.default,C5e.default];iU.default=D5e});var $X=h((c$t,L5e)=>{L5e.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 DX=h((l$t,j5e)=>{j5e.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 LX=h((f$t,M5e)=>{M5e.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 jX=h((d$t,U5e)=>{U5e.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 MX=h((p$t,x5e)=>{x5e.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 UX=h((h$t,q5e)=>{q5e.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 xX=h((m$t,F5e)=>{F5e.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 qX=h((_$t,k5e)=>{k5e.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 FX=h(sU=>{"use strict";Object.defineProperty(sU,"__esModule",{value:!0});var B5e=$X(),G5e=DX(),V5e=LX(),z5e=jX(),H5e=MX(),K5e=UX(),W5e=xX(),Y5e=qX(),J5e=["/properties"];function X5e(e){return[B5e,G5e,V5e,z5e,H5e,t(this,K5e),W5e,t(this,Y5e)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function t(r,n){return e?r.$dataMetaSchema(n,J5e):n}s(t,"with$data")}s(X5e,"addMetaSchema2020");sU.default=X5e});var aU=h((nr,kX)=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.MissingRefError=nr.ValidationError=nr.CodeGen=nr.Name=nr.nil=nr.stringify=nr.str=nr._=nr.KeywordCxt=void 0;var Q5e=dL(),Z5e=CX(),eKe=oj(),tKe=FX(),oU="https://json-schema.org/draft/2020-12/schema",KI=class extends Q5e.default{static{s(this,"Ajv2020")}constructor(t={}){super({...t,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),Z5e.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(eKe.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:t,meta:r}=this.opts;r&&(tKe.default.call(this,t),this.refs["http://json-schema.org/schema"]=oU)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(oU)?oU:void 0)}};kX.exports=nr=KI;Object.defineProperty(nr,"__esModule",{value:!0});nr.default=KI;var rKe=jh();Object.defineProperty(nr,"KeywordCxt",{enumerable:!0,get:function(){return rKe.KeywordCxt}});var nm=Oe();Object.defineProperty(nr,"_",{enumerable:!0,get:function(){return nm._}});Object.defineProperty(nr,"str",{enumerable:!0,get:function(){return nm.str}});Object.defineProperty(nr,"stringify",{enumerable:!0,get:function(){return nm.stringify}});Object.defineProperty(nr,"nil",{enumerable:!0,get:function(){return nm.nil}});Object.defineProperty(nr,"Name",{enumerable:!0,get:function(){return nm.Name}});Object.defineProperty(nr,"CodeGen",{enumerable:!0,get:function(){return nm.CodeGen}});var nKe=wy();Object.defineProperty(nr,"ValidationError",{enumerable:!0,get:function(){return nKe.default}});var iKe=Ty();Object.defineProperty(nr,"MissingRefError",{enumerable:!0,get:function(){return iKe.default}})});var uU=h((b0,GX)=>{"use strict";Object.defineProperty(b0,"__esModule",{value:!0});var E0=xP(),mo=Nh();function BX(e,t){if(!e.opts.code.source)throw new Error("moduleCode: ajv instance must have code.source option");let{_n:r}=e.scope.opts;return typeof t=="function"?i(t.source):t!==void 0?o(t,n):o(e.schemas,u=>u.meta?void 0:e.compile(u.schema));function n(u){let c=e.getSchema(u);if(!c)throw new Error(`moduleCode: no schema with id ${u}`);return c}function i(u){let c={},l=u?.validateName,f=a(c,u);return e.opts.code.esm?`"use strict";${r}export const validate = ${l};${r}export default ${l};${r}${f}`:`"use strict";${r}module.exports = ${l};${r}module.exports.default = ${l};${r}${f}`}function o(u,c){var l;let f={},d=(0,mo._)`"use strict";`;for(let _ in u){let m=c(u[_]);if(m){let g=a(f,m.source),y=e.opts.code.esm?(0,mo._)`export const ${(0,mo.getEsmExportName)(_)}`:(0,mo._)`exports${(0,mo.getProperty)(_)}`;d=(0,mo._)`${d}${r}${y} = ${(l=m.source)===null||l===void 0?void 0:l.validateName};${r}${g}`}}return`${d}`}function a(u,c){if(!c)throw new Error('moduleCode: function does not have "source" property');if(_(c.validateName)===E0.UsedValueState.Completed)return mo.nil;m(c.validateName,E0.UsedValueState.Started);let l=e.scope.scopeCode(c.scopeValues,u,d),f=new mo._Code(`${l}${r}${c.validateCode}`);return c.evaluated?(0,mo._)`${f}${c.validateName}.evaluated = ${c.evaluated};${r}`:f;function d(g){var y;let b=(y=g.value)===null||y===void 0?void 0:y.ref;if(g.prefix==="validate"&&typeof b=="function")return a(u,b.source);if((g.prefix==="root"||g.prefix==="wrapper")&&typeof b=="object"){let{validate:E,validateName:S}=b;if(!S)throw new Error("ajv internal error");let O=e.opts.code.es5?E0.varKinds.var:E0.varKinds.const,I=(0,mo._)`${O} ${g} = {validate: ${S}};`;if(_(S)===E0.UsedValueState.Started)return I;let w=a(u,E?.source);return(0,mo._)`${I}${r}${w}`}}function _(g){var y;return(y=u[g.prefix])===null||y===void 0?void 0:y.get(g)}function m(g,y){let{prefix:b}=g;(u[b]=u[b]||new Map).set(g,y)}}}s(BX,"standaloneCode");GX.exports=b0=BX;Object.defineProperty(b0,"__esModule",{value:!0});b0.default=BX});var KX=h(im=>{"use strict";var pu=im&&im.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(im,"__esModule",{value:!0});im.jsonSchemaPlugin=void 0;var VX=Gf(),pd=pu(gn()),sKe=BW(),oKe=pu(VM()),aKe=pu(aU()),uKe=pu(uU()),zX=pu(require("fs/promises")),zi=pu(require("path")),cKe=pu(require("prettier")),S0=kt(),HX=pu(Xs()),lKe=pu(_n()),ca="schemas",WI="json-schema";function fKe(e){return{name:ca,async setup(t){let r=new aKe.default({code:{source:!0},allErrors:!0,strict:!1,verbose:!0,meta:!0});(0,oKe.default)(r,{mode:"fast"}),r.opts.code.formats=(0,sKe._)`require("ajv-formats/dist/formats").fastFormats`;let n=zi.default.join(e.sourceDirectory,S0.USER_SCHEMAS_DIR_NAME),i,o=[],a=[];if(await pd.default.dirExists(n)&&(r.addKeyword("faker"),i=await pd.default.listFolderContents(n,S0.USER_SCHEMAS_DIR_NAME),await Promise.all(i.map(async u=>{try{let c=pd.default.safePath(e.sourceDirectory).resolve(n,u);if(!c.startsWith(n))throw new Error("All schemas must be in the schemas directory");let l=await zX.default.readFile(c,"utf-8");if(l===""||l===void 0)throw new Error(`Schema 'schemas/${u}' is empty and will be ignored.`);let f=JSON.parse(l);if(f.$schema&&f.$schema!=="https://json-schema.org/draft/2020-12/schema")throw new Error(`Error in ${u}: All JSON schemas must use version 2020-12. See release notes for changes: https://json-schema.org/draft/2020-12/release-notes.html`);if(r.$dataMetaSchema,r.addSchema(f,u),r.errors?.length){let d=r.errors[0];o.push({id:"json-schema-validation-error",pluginName:ca,text:`Error: ${d.message}`,location:{file:zi.default.join(S0.USER_SCHEMAS_DIR_NAME,u)},detail:{params:d.params,propertyName:d.propertyName,schemaPath:d.schemaPath,data:d.data}})}}catch(c){if(c.message.endsWith("is empty and will be ignored.")){a.push({id:"empty-json-schema-file",pluginName:ca,text:`Schema 'schemas/${u}' is empty and will be ignored.`,location:{file:`schemas/${u}`,suggestion:"Add schema details or remove the file from the project."},detail:"EmptyJSONSchemaFile",notes:[{text:`Schema 'schemas/${u}' is empty and will be ignored.`,location:{file:`schemas/${u}`,suggestion:"Add schema details or remove the file from the project."}}]});return}let l=await(0,VX.getLocation)(u,e.sourceDirectory,c.message);o.push({id:"json-schema-add-error",pluginName:ca,text:`Error: ${c.message}`,location:l,detail:"InvalidAddSchemaError",notes:[{text:c.message}]})}})),await Promise.all(i.map(async u=>{try{let c=r.getSchema(u);c&&r.compile(c.schema).errors?.forEach(f=>{o.push({text:`Failed to compile ${u}: ${f.message}`})})}catch(c){let l=await(0,VX.getLocation)(u,e.sourceDirectory,c.message);o.push({id:"json-schema-compile-error",pluginName:ca,text:`The schema file '${u}' is not valid. Error: ${c.message}`,location:l,detail:"InvalidSchemaError",notes:[{text:c.message}]})}})),HX.default.DEBUG_BUILD_MODE)){let u=zi.default.resolve(e.outputDirectory,S0.USER_SCHEMAS_DIR_NAME);await pd.default.mkdirIfNotExists(u)}t.onStart(async()=>{if(i)return{errors:o,warnings:a}}),t.onResolve({filter:/schemas\/.*\.json$/},async u=>{let c=zi.default.isAbsolute(u.path)?u.path:zi.default.join(u.resolveDir,u.path);if(u.importer&&u.importer!==zi.default.join(e.sourceDirectory,"config/routes.json"))return{path:c};if(!await pd.default.fileExists(c)){let l="policies.json";return{errors:[{id:"json-schema-build-error",text:`Unable to resolve reference to '${u.path}' from ${l}`,location:{file:zi.default.join(u.resolveDir,l),namespace:WI,line:1,column:0,length:0,lineText:`Invalid JSON schema reference in ${l}`,suggestion:""},detail:"RouteReferenceError",pluginName:ca,notes:[{text:`Unable to resolve reference to '${u.path}' from ${l}`,location:null}]}],namespace:WI,path:c,pluginName:ca}}return{path:c,namespace:WI,pluginName:ca}}),t.onLoad({filter:/.*/,namespace:WI},async u=>lKe.default.timeFn(`Generating json schema data: ${zi.default.basename(u.path)}`,async()=>{let c=[],l;try{let f=zi.default.relative(n,u.path),d=r.getSchema(f);if(!d)throw new Error(`Could not load schema at ${u.path}`);l=d.source?.validateCode;let _=r.compile(d.schema);l=(0,uKe.default)(r,_)}catch(f){c.push({pluginName:ca,text:`Cannot parse project's schemas/${zi.default.basename(u.path)} file. Error: ${f.message}`,location:null,notes:[{text:f.message,location:null}],detail:f})}if(HX.default.DEBUG_BUILD_MODE&&l){let f=zi.default.resolve(e.outputDirectory,S0.USER_SCHEMAS_DIR_NAME),d=zi.default.relative(n,u.path),_=await cKe.default.format(l,{parser:"babel"}),m=pd.default.safePath(e.sourceDirectory).resolve(f,`${d}.js`);await pd.default.mkdirForFilePathIfNotExits(m),await zX.default.writeFile(m,_,"utf-8")}return{contents:l,errors:c,pluginName:ca,resolveDir:zi.default.dirname(u.path),watchFiles:[u.path]}}))}}}s(fKe,"jsonSchemaPlugin");im.jsonSchemaPlugin=fKe});var JX=h(YI=>{"use strict";Object.defineProperty(YI,"__esModule",{value:!0});YI.nodejsCompatPlugin=void 0;var WX=require("path"),YX=["node:assert","node:async_hooks","node:buffer","node:crypto","node:diagnostics_channel","node:events","node:path","node:process","node:stream","node:string_decoder","node:util"],dKe="nodejs-compat-plugin";function pKe({nodeCompatEnabled:e,sourceDirectory:t}){return{name:dKe,setup(r){let n=new Set;r.onStart(()=>{n.clear()}),r.onResolve({filter:/node:.*/},async({path:i,kind:o,resolveDir:a,...u})=>{let c=`${i}:${o}:${a}:${u.importer}`;if(n.has(c))return;if(n.add(c),!e&&i==="node:async_hooks")return{path:(0,WX.resolve)(__dirname,"../../../polyfills/async_hooks.js")};let l=await r.resolve(i,{kind:o,resolveDir:a,importer:u.importer});return l.errors.length>0?e&&YX.includes(i)||i.includes("/")&&YX.includes(i.split("/")[0])?{external:!0}:{external:!0,warnings:l.errors.map(d=>({...d,location:{file:(0,WX.relative)(t,u.importer),line:0,column:0,namespace:"",length:0,lineText:"",suggestion:"Remove the imported node module"},detail:`The package "${i}" wasn't found on the file system but is built into node. If this code is executed it will fail.`}))}:l})}}}s(pKe,"nodejsCompatPlugin");YI.nodejsCompatPlugin=pKe});var zn=h(Hi=>{"use strict";Hi.__esModule=!0;Hi.extend=XX;Hi.indexOf=yKe;Hi.escapeExpression=EKe;Hi.isEmpty=bKe;Hi.createFrame=SKe;Hi.blockParams=vKe;Hi.appendContextPath=OKe;var hKe={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},mKe=/[&<>"'`=]/g,_Ke=/[&<>"'`=]/;function gKe(e){return hKe[e]}s(gKe,"escapeChar");function XX(e){for(var t=1;t<arguments.length;t++)for(var r in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],r)&&(e[r]=arguments[t][r]);return e}s(XX,"extend");var lU=Object.prototype.toString;Hi.toString=lU;var cU=s(function(t){return typeof t=="function"},"isFunction");cU(/x/)&&(Hi.isFunction=cU=s(function(e){return typeof e=="function"&&lU.call(e)==="[object Function]"},"isFunction"));Hi.isFunction=cU;var QX=Array.isArray||function(e){return e&&typeof e=="object"?lU.call(e)==="[object Array]":!1};Hi.isArray=QX;function yKe(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}s(yKe,"indexOf");function EKe(e){if(typeof e!="string"){if(e&&e.toHTML)return e.toHTML();if(e==null)return"";if(!e)return e+"";e=""+e}return _Ke.test(e)?e.replace(mKe,gKe):e}s(EKe,"escapeExpression");function bKe(e){return!e&&e!==0?!0:!!(QX(e)&&e.length===0)}s(bKe,"isEmpty");function SKe(e){var t=XX({},e);return t._parent=e,t}s(SKe,"createFrame");function vKe(e,t){return e.path=t,e}s(vKe,"blockParams");function OKe(e,t){return(e?e+".":"")+t}s(OKe,"appendContextPath")});var Ss=h((JI,ZX)=>{"use strict";JI.__esModule=!0;var fU=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function dU(e,t){var r=t&&t.loc,n=void 0,i=void 0,o=void 0,a=void 0;r&&(n=r.start.line,i=r.end.line,o=r.start.column,a=r.end.column,e+=" - "+n+":"+o);for(var u=Error.prototype.constructor.call(this,e),c=0;c<fU.length;c++)this[fU[c]]=u[fU[c]];Error.captureStackTrace&&Error.captureStackTrace(this,dU);try{r&&(this.lineNumber=n,this.endLineNumber=i,Object.defineProperty?(Object.defineProperty(this,"column",{value:o,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:a,enumerable:!0})):(this.column=o,this.endColumn=a))}catch{}}s(dU,"Exception");dU.prototype=new Error;JI.default=dU;ZX.exports=JI.default});var tQ=h((XI,eQ)=>{"use strict";XI.__esModule=!0;var pU=zn();XI.default=function(e){e.registerHelper("blockHelperMissing",function(t,r){var n=r.inverse,i=r.fn;if(t===!0)return i(this);if(t===!1||t==null)return n(this);if(pU.isArray(t))return t.length>0?(r.ids&&(r.ids=[r.name]),e.helpers.each(t,r)):n(this);if(r.data&&r.ids){var o=pU.createFrame(r.data);o.contextPath=pU.appendContextPath(r.data.contextPath,r.name),r={data:o}}return i(t,r)})};eQ.exports=XI.default});var nQ=h((QI,rQ)=>{"use strict";QI.__esModule=!0;function PKe(e){return e&&e.__esModule?e:{default:e}}s(PKe,"_interopRequireDefault");var v0=zn(),IKe=Ss(),wKe=PKe(IKe);QI.default=function(e){e.registerHelper("each",function(t,r){if(!r)throw new wKe.default("Must pass iterator to #each");var n=r.fn,i=r.inverse,o=0,a="",u=void 0,c=void 0;r.data&&r.ids&&(c=v0.appendContextPath(r.data.contextPath,r.ids[0])+"."),v0.isFunction(t)&&(t=t.call(this)),r.data&&(u=v0.createFrame(r.data));function l(g,y,b){u&&(u.key=g,u.index=y,u.first=y===0,u.last=!!b,c&&(u.contextPath=c+g)),a=a+n(t[g],{data:u,blockParams:v0.blockParams([t[g],g],[c+g,null])})}if(s(l,"execIteration"),t&&typeof t=="object")if(v0.isArray(t))for(var f=t.length;o<f;o++)o in t&&l(o,o,o===t.length-1);else if(global.Symbol&&t[global.Symbol.iterator]){for(var d=[],_=t[global.Symbol.iterator](),m=_.next();!m.done;m=_.next())d.push(m.value);t=d;for(var f=t.length;o<f;o++)l(o,o,o===t.length-1)}else(function(){var g=void 0;Object.keys(t).forEach(function(y){g!==void 0&&l(g,o-1),g=y,o++}),g!==void 0&&l(g,o-1,!0)})();return o===0&&(a=i(this)),a})};rQ.exports=QI.default});var sQ=h((ZI,iQ)=>{"use strict";ZI.__esModule=!0;function TKe(e){return e&&e.__esModule?e:{default:e}}s(TKe,"_interopRequireDefault");var NKe=Ss(),AKe=TKe(NKe);ZI.default=function(e){e.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new AKe.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};iQ.exports=ZI.default});var cQ=h((ew,uQ)=>{"use strict";ew.__esModule=!0;function RKe(e){return e&&e.__esModule?e:{default:e}}s(RKe,"_interopRequireDefault");var oQ=zn(),CKe=Ss(),aQ=RKe(CKe);ew.default=function(e){e.registerHelper("if",function(t,r){if(arguments.length!=2)throw new aQ.default("#if requires exactly one argument");return oQ.isFunction(t)&&(t=t.call(this)),!r.hash.includeZero&&!t||oQ.isEmpty(t)?r.inverse(this):r.fn(this)}),e.registerHelper("unless",function(t,r){if(arguments.length!=2)throw new aQ.default("#unless requires exactly one argument");return e.helpers.if.call(this,t,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};uQ.exports=ew.default});var fQ=h((tw,lQ)=>{"use strict";tw.__esModule=!0;tw.default=function(e){e.registerHelper("log",function(){for(var t=[void 0],r=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)t.push(arguments[n]);var i=1;r.hash.level!=null?i=r.hash.level:r.data&&r.data.level!=null&&(i=r.data.level),t[0]=i,e.log.apply(e,t)})};lQ.exports=tw.default});var pQ=h((rw,dQ)=>{"use strict";rw.__esModule=!0;rw.default=function(e){e.registerHelper("lookup",function(t,r,n){return t&&n.lookupProperty(t,r)})};dQ.exports=rw.default});var mQ=h((nw,hQ)=>{"use strict";nw.__esModule=!0;function $Ke(e){return e&&e.__esModule?e:{default:e}}s($Ke,"_interopRequireDefault");var O0=zn(),DKe=Ss(),LKe=$Ke(DKe);nw.default=function(e){e.registerHelper("with",function(t,r){if(arguments.length!=2)throw new LKe.default("#with requires exactly one argument");O0.isFunction(t)&&(t=t.call(this));var n=r.fn;if(O0.isEmpty(t))return r.inverse(this);var i=r.data;return r.data&&r.ids&&(i=O0.createFrame(r.data),i.contextPath=O0.appendContextPath(r.data.contextPath,r.ids[0])),n(t,{data:i,blockParams:O0.blockParams([t],[i&&i.contextPath])})})};hQ.exports=nw.default});var hU=h(iw=>{"use strict";iw.__esModule=!0;iw.registerDefaultHelpers=YKe;iw.moveHelperToHooks=JKe;function hd(e){return e&&e.__esModule?e:{default:e}}s(hd,"_interopRequireDefault");var jKe=tQ(),MKe=hd(jKe),UKe=nQ(),xKe=hd(UKe),qKe=sQ(),FKe=hd(qKe),kKe=cQ(),BKe=hd(kKe),GKe=fQ(),VKe=hd(GKe),zKe=pQ(),HKe=hd(zKe),KKe=mQ(),WKe=hd(KKe);function YKe(e){MKe.default(e),xKe.default(e),FKe.default(e),BKe.default(e),VKe.default(e),HKe.default(e),WKe.default(e)}s(YKe,"registerDefaultHelpers");function JKe(e,t,r){e.helpers[t]&&(e.hooks[t]=e.helpers[t],r||delete e.helpers[t])}s(JKe,"moveHelperToHooks")});var gQ=h((sw,_Q)=>{"use strict";sw.__esModule=!0;var XKe=zn();sw.default=function(e){e.registerDecorator("inline",function(t,r,n,i){var o=t;return r.partials||(r.partials={},o=s(function(a,u){var c=n.partials;n.partials=XKe.extend({},c,r.partials);var l=t(a,u);return n.partials=c,l},"ret")),r.partials[i.args[0]]=i.fn,o})};_Q.exports=sw.default});var yQ=h(mU=>{"use strict";mU.__esModule=!0;mU.registerDefaultDecorators=t9e;function QKe(e){return e&&e.__esModule?e:{default:e}}s(QKe,"_interopRequireDefault");var ZKe=gQ(),e9e=QKe(ZKe);function t9e(e){e9e.default(e)}s(t9e,"registerDefaultDecorators")});var _U=h((ow,EQ)=>{"use strict";ow.__esModule=!0;var r9e=zn(),sm={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:s(function(t){if(typeof t=="string"){var r=r9e.indexOf(sm.methodMap,t.toLowerCase());r>=0?t=r:t=parseInt(t,10)}return t},"lookupLevel"),log:s(function(t){if(t=sm.lookupLevel(t),typeof console<"u"&&sm.lookupLevel(sm.level)<=t){var r=sm.methodMap[t];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)}},"log")};ow.default=sm;EQ.exports=ow.default});var bQ=h(gU=>{"use strict";gU.__esModule=!0;gU.createNewLookupObject=i9e;var n9e=zn();function i9e(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return n9e.extend.apply(void 0,[Object.create(null)].concat(t))}s(i9e,"createNewLookupObject")});var yU=h(P0=>{"use strict";P0.__esModule=!0;P0.createProtoAccessControl=u9e;P0.resultIsAllowed=c9e;P0.resetLoggedProperties=f9e;function s9e(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}s(s9e,"_interopRequireWildcard");var SQ=bQ(),o9e=_U(),a9e=s9e(o9e),aw=Object.create(null);function u9e(e){var t=Object.create(null);t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1;var r=Object.create(null);return r.__proto__=!1,{properties:{whitelist:SQ.createNewLookupObject(r,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:SQ.createNewLookupObject(t,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}}s(u9e,"createProtoAccessControl");function c9e(e,t,r){return vQ(typeof e=="function"?t.methods:t.properties,r)}s(c9e,"resultIsAllowed");function vQ(e,t){return e.whitelist[t]!==void 0?e.whitelist[t]===!0:e.defaultValue!==void 0?e.defaultValue:(l9e(t),!1)}s(vQ,"checkWhiteList");function l9e(e){aw[e]!==!0&&(aw[e]=!0,a9e.log("error",'Handlebars: Access has been denied to resolve the property "'+e+`" because it is not an "own property" of its parent.
|
|
148
|
+
deps: ${r}}`};var Lze={keyword:"dependencies",type:"object",schemaType:"object",error:ua.error,code(e){let[t,r]=jze(e);AJ(e,t),RJ(e,r)}};function jze({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}s(jze,"splitDependencies");function AJ(e,t=e.schema){let{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;let o=r.let("missing");for(let a in t){let u=t[a];if(u.length===0)continue;let c=(0,h0.propertyInData)(r,n,a,i.opts.ownProperties);e.setParams({property:a,depsCount:u.length,deps:u.join(", ")}),i.allErrors?r.if(c,()=>{for(let l of u)(0,h0.checkReportMissingProp)(e,l)}):(r.if((0,OM._)`${c} && (${(0,h0.checkMissingProp)(e,u,o)})`),(0,h0.reportMissingProp)(e,o),r.else())}}s(AJ,"validatePropertyDeps");ua.validatePropertyDeps=AJ;function RJ(e,t=e.schema){let{gen:r,data:n,keyword:i,it:o}=e,a=r.name("valid");for(let u in t)(0,Dze.alwaysValidSchema)(o,t[u])||(r.if((0,h0.propertyInData)(r,n,u,o.opts.ownProperties),()=>{let c=e.subschema({keyword:i,schemaProp:u},a);e.mergeValidEvaluated(c,a)},()=>r.var(a,!0)),e.ok(a))}s(RJ,"validateSchemaDeps");ua.validateSchemaDeps=RJ;ua.default=Lze});var DJ=h(PM=>{"use strict";Object.defineProperty(PM,"__esModule",{value:!0});var $J=Re(),Mze=pt(),Uze={message:"property name must be valid",params:({params:e})=>(0,$J._)`{propertyName: ${e.propertyName}}`},xze={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Uze,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,Mze.alwaysValidSchema)(i,r))return;let o=t.name("valid");t.forIn("key",n,a=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),t.if((0,$J.not)(o),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(o)}};PM.default=xze});var wM=h(IM=>{"use strict";Object.defineProperty(IM,"__esModule",{value:!0});var qI=ys(),po=Re(),qze=fu(),FI=pt(),Fze={message:"must NOT have additional properties",params:({params:e})=>(0,po._)`{additionalProperty: ${e.additionalProperty}}`},kze={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Fze,code(e){let{gen:t,schema:r,parentSchema:n,data:i,errsCount:o,it:a}=e;if(!o)throw new Error("ajv implementation error");let{allErrors:u,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,FI.alwaysValidSchema)(a,r))return;let l=(0,qI.allSchemaProperties)(n.properties),f=(0,qI.allSchemaProperties)(n.patternProperties);d(),e.ok((0,po._)`${o} === ${qze.default.errors}`);function d(){t.forIn("key",i,b=>{!l.length&&!f.length?g(b):t.if(_(b),()=>g(b))})}s(d,"checkAdditionalProperties");function _(b){let E;if(l.length>8){let v=(0,FI.schemaRefOrVal)(a,n.properties,"properties");E=(0,qI.isOwnProperty)(t,v,b)}else l.length?E=(0,po.or)(...l.map(v=>(0,po._)`${b} === ${v}`)):E=po.nil;return f.length&&(E=(0,po.or)(E,...f.map(v=>(0,po._)`${(0,qI.usePattern)(e,v)}.test(${b})`))),(0,po.not)(E)}s(_,"isAdditional");function m(b){t.code((0,po._)`delete ${i}[${b}]`)}s(m,"deleteAdditional");function g(b){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(b);return}if(r===!1){e.setParams({additionalProperty:b}),e.error(),u||t.break();return}if(typeof r=="object"&&!(0,FI.alwaysValidSchema)(a,r)){let E=t.name("valid");c.removeAdditional==="failing"?(y(b,E,!1),t.if((0,po.not)(E),()=>{e.reset(),m(b)})):(y(b,E),u||t.if((0,po.not)(E),()=>t.break()))}}s(g,"additionalPropertyCode");function y(b,E,v){let O={keyword:"additionalProperties",dataProp:b,dataPropType:FI.Type.Str};v===!1&&Object.assign(O,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(O,E)}s(y,"applyAdditionalSchema")}};IM.default=kze});var MJ=h(NM=>{"use strict";Object.defineProperty(NM,"__esModule",{value:!0});var Bze=r0(),LJ=ys(),TM=pt(),jJ=wM(),Gze={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&jJ.default.code(new Bze.KeywordCxt(o,jJ.default,"additionalProperties"));let a=(0,LJ.allSchemaProperties)(r);for(let d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=TM.mergeEvaluated.props(t,(0,TM.toHash)(a),o.props));let u=a.filter(d=>!(0,TM.alwaysValidSchema)(o,r[d]));if(u.length===0)return;let c=t.name("valid");for(let d of u)l(d)?f(d):(t.if((0,LJ.propertyInData)(t,i,d,o.opts.ownProperties)),f(d),o.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function l(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}s(l,"hasDefault");function f(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}s(f,"applyPropertySchema")}};NM.default=Gze});var FJ=h(AM=>{"use strict";Object.defineProperty(AM,"__esModule",{value:!0});var UJ=ys(),kI=Re(),xJ=pt(),qJ=pt(),Vze={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:o}=e,{opts:a}=o,u=(0,UJ.allSchemaProperties)(r),c=u.filter(y=>(0,xJ.alwaysValidSchema)(o,r[y]));if(u.length===0||c.length===u.length&&(!o.opts.unevaluated||o.props===!0))return;let l=a.strictSchema&&!a.allowMatchingProperties&&i.properties,f=t.name("valid");o.props!==!0&&!(o.props instanceof kI.Name)&&(o.props=(0,qJ.evaluatedPropsToName)(t,o.props));let{props:d}=o;_();function _(){for(let y of u)l&&m(y),o.allErrors?g(y):(t.var(f,!0),g(y),t.if(f))}s(_,"validatePatternProperties");function m(y){for(let b in l)new RegExp(y).test(b)&&(0,xJ.checkStrictMode)(o,`property ${b} matches pattern ${y} (use allowMatchingProperties)`)}s(m,"checkMatchingProperties");function g(y){t.forIn("key",n,b=>{t.if((0,kI._)`${(0,UJ.usePattern)(e,y)}.test(${b})`,()=>{let E=c.includes(y);E||e.subschema({keyword:"patternProperties",schemaProp:y,dataProp:b,dataPropType:qJ.Type.Str},f),o.opts.unevaluated&&d!==!0?t.assign((0,kI._)`${d}[${b}]`,!0):!E&&!o.allErrors&&t.if((0,kI.not)(f),()=>t.break())})})}s(g,"validateProperties")}};AM.default=Vze});var kJ=h(RM=>{"use strict";Object.defineProperty(RM,"__esModule",{value:!0});var zze=pt(),Hze={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,zze.alwaysValidSchema)(n,r)){e.fail();return}let i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};RM.default=Hze});var BJ=h(CM=>{"use strict";Object.defineProperty(CM,"__esModule",{value:!0});var Kze=ys(),Wze={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Kze.validateUnion,error:{message:"must match a schema in anyOf"}};CM.default=Wze});var GJ=h($M=>{"use strict";Object.defineProperty($M,"__esModule",{value:!0});var BI=Re(),Yze=pt(),Jze={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,BI._)`{passingSchemas: ${e.passing}}`},Xze={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Jze,code(e){let{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,a=t.let("valid",!1),u=t.let("passing",null),c=t.name("_valid");e.setParams({passing:u}),t.block(l),e.result(a,()=>e.reset(),()=>e.error(!0));function l(){o.forEach((f,d)=>{let _;(0,Yze.alwaysValidSchema)(i,f)?t.var(c,!0):_=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,BI._)`${c} && ${a}`).assign(a,!1).assign(u,(0,BI._)`[${u}, ${d}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(u,d),_&&e.mergeEvaluated(_,BI.Name)})})}s(l,"validateOneOf")}};$M.default=Xze});var VJ=h(DM=>{"use strict";Object.defineProperty(DM,"__esModule",{value:!0});var Qze=pt(),Zze={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=t.name("valid");r.forEach((o,a)=>{if((0,Qze.alwaysValidSchema)(n,o))return;let u=e.subschema({keyword:"allOf",schemaProp:a},i);e.ok(i),e.mergeEvaluated(u)})}};DM.default=Zze});var KJ=h(LM=>{"use strict";Object.defineProperty(LM,"__esModule",{value:!0});var GI=Re(),HJ=pt(),eHe={message:({params:e})=>(0,GI.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,GI._)`{failingKeyword: ${e.ifClause}}`},tHe={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:eHe,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,HJ.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=zJ(n,"then"),o=zJ(n,"else");if(!i&&!o)return;let a=t.let("valid",!0),u=t.name("_valid");if(c(),e.reset(),i&&o){let f=t.let("ifClause");e.setParams({ifClause:f}),t.if(u,l("then",f),l("else",f))}else i?t.if(u,l("then")):t.if((0,GI.not)(u),l("else"));e.pass(a,()=>e.error(!0));function c(){let f=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(f)}s(c,"validateIf");function l(f,d){return()=>{let _=e.subschema({keyword:f},u);t.assign(a,u),e.mergeValidEvaluated(_,a),d?t.assign(d,(0,GI._)`${f}`):e.setParams({ifClause:f})}}s(l,"validateClause")}};function zJ(e,t){let r=e.schema[t];return r!==void 0&&!(0,HJ.alwaysValidSchema)(e,r)}s(zJ,"hasSchema");LM.default=tHe});var WJ=h(jM=>{"use strict";Object.defineProperty(jM,"__esModule",{value:!0});var rHe=pt(),nHe={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,rHe.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};jM.default=nHe});var YJ=h(MM=>{"use strict";Object.defineProperty(MM,"__esModule",{value:!0});var iHe=yM(),sHe=IJ(),oHe=EM(),aHe=TJ(),uHe=NJ(),cHe=CJ(),lHe=DJ(),fHe=wM(),dHe=MJ(),pHe=FJ(),hHe=kJ(),mHe=BJ(),_He=GJ(),gHe=VJ(),yHe=KJ(),EHe=WJ();function bHe(e=!1){let t=[hHe.default,mHe.default,_He.default,gHe.default,yHe.default,EHe.default,lHe.default,fHe.default,cHe.default,dHe.default,pHe.default];return e?t.push(sHe.default,aHe.default):t.push(iHe.default,oHe.default),t.push(uHe.default),t}s(bHe,"getApplicator");MM.default=bHe});var JJ=h(UM=>{"use strict";Object.defineProperty(UM,"__esModule",{value:!0});var hr=Re(),SHe={message:({schemaCode:e})=>(0,hr.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,hr._)`{format: ${e}}`},vHe={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:SHe,code(e,t){let{gen:r,data:n,$data:i,schema:o,schemaCode:a,it:u}=e,{opts:c,errSchemaPath:l,schemaEnv:f,self:d}=u;if(!c.validateFormats)return;i?_():m();function _(){let g=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),y=r.const("fDef",(0,hr._)`${g}[${a}]`),b=r.let("fType"),E=r.let("format");r.if((0,hr._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(b,(0,hr._)`${y}.type || "string"`).assign(E,(0,hr._)`${y}.validate`),()=>r.assign(b,(0,hr._)`"string"`).assign(E,y)),e.fail$data((0,hr.or)(v(),O()));function v(){return c.strictSchema===!1?hr.nil:(0,hr._)`${a} && !${E}`}s(v,"unknownFmt");function O(){let I=f.$async?(0,hr._)`(${y}.async ? await ${E}(${n}) : ${E}(${n}))`:(0,hr._)`${E}(${n})`,w=(0,hr._)`(typeof ${E} == "function" ? ${I} : ${E}.test(${n}))`;return(0,hr._)`${E} && ${E} !== true && ${b} === ${t} && !${w}`}s(O,"invalidFmt")}s(_,"validate$DataFormat");function m(){let g=d.formats[o];if(!g){v();return}if(g===!0)return;let[y,b,E]=O(g);y===t&&e.pass(I());function v(){if(c.strictSchema===!1){d.logger.warn(w());return}throw new Error(w());function w(){return`unknown format "${o}" ignored in schema at path "${l}"`}}s(v,"unknownFormat");function O(w){let j=w instanceof RegExp?(0,hr.regexpCode)(w):c.code.formats?(0,hr._)`${c.code.formats}${(0,hr.getProperty)(o)}`:void 0,F=r.scopeValue("formats",{key:o,ref:w,code:j});return typeof w=="object"&&!(w instanceof RegExp)?[w.type||"string",w.validate,(0,hr._)`${F}.validate`]:["string",w,F]}s(O,"getFormat");function I(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!f.$async)throw new Error("async format in sync schema");return(0,hr._)`await ${E}(${n})`}return typeof b=="function"?(0,hr._)`${E}(${n})`:(0,hr._)`${E}.test(${n})`}s(I,"validCondition")}s(m,"validateFormat")}};UM.default=vHe});var XJ=h(xM=>{"use strict";Object.defineProperty(xM,"__esModule",{value:!0});var OHe=JJ(),PHe=[OHe.default];xM.default=PHe});var QJ=h(Qh=>{"use strict";Object.defineProperty(Qh,"__esModule",{value:!0});Qh.contentVocabulary=Qh.metadataVocabulary=void 0;Qh.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Qh.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var eX=h(qM=>{"use strict";Object.defineProperty(qM,"__esModule",{value:!0});var IHe=aJ(),wHe=SJ(),THe=YJ(),NHe=XJ(),ZJ=QJ(),AHe=[IHe.default,wHe.default,(0,THe.default)(),NHe.default,ZJ.metadataVocabulary,ZJ.contentVocabulary];qM.default=AHe});var tX=h(m0=>{"use strict";Object.defineProperty(m0,"__esModule",{value:!0});m0.DiscrError=void 0;var RHe;(function(e){e.Tag="tag",e.Mapping="mapping"})(RHe=m0.DiscrError||(m0.DiscrError={}))});var nX=h(kM=>{"use strict";Object.defineProperty(kM,"__esModule",{value:!0});var Zh=Re(),FM=tX(),rX=AI(),CHe=pt(),$He={message:({params:{discrError:e,tagName:t}})=>e===FM.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Zh._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},DHe={keyword:"discriminator",type:"object",schemaType:"object",error:$He,code(e){let{gen:t,data:r,schema:n,parentSchema:i,it:o}=e,{oneOf:a}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let u=n.propertyName;if(typeof u!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),l=t.const("tag",(0,Zh._)`${r}${(0,Zh.getProperty)(u)}`);t.if((0,Zh._)`typeof ${l} == "string"`,()=>f(),()=>e.error(!1,{discrError:FM.DiscrError.Tag,tag:l,tagName:u})),e.ok(c);function f(){let m=_();t.if(!1);for(let g in m)t.elseIf((0,Zh._)`${l} === ${g}`),t.assign(c,d(m[g]));t.else(),e.error(!1,{discrError:FM.DiscrError.Mapping,tag:l,tagName:u}),t.endIf()}s(f,"validateMapping");function d(m){let g=t.name("valid"),y=e.subschema({keyword:"oneOf",schemaProp:m},g);return e.mergeEvaluated(y,Zh.Name),g}s(d,"applyTagSchema");function _(){var m;let g={},y=E(i),b=!0;for(let I=0;I<a.length;I++){let w=a[I];w?.$ref&&!(0,CHe.schemaHasRulesButRef)(w,o.self.RULES)&&(w=rX.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,w?.$ref),w instanceof rX.SchemaEnv&&(w=w.schema));let j=(m=w?.properties)===null||m===void 0?void 0:m[u];if(typeof j!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`);b=b&&(y||E(w)),v(j,I)}if(!b)throw new Error(`discriminator: "${u}" must be required`);return g;function E({required:I}){return Array.isArray(I)&&I.includes(u)}function v(I,w){if(I.const)O(I.const,w);else if(I.enum)for(let j of I.enum)O(j,w);else throw new Error(`discriminator: "properties/${u}" must have "const" or "enum"`)}function O(I,w){if(typeof I!="string"||I in g)throw new Error(`discriminator: "${u}" values must be unique strings`);g[I]=w}}s(_,"getMapping")}};kM.default=DHe});var iX=h((kCt,LHe)=>{LHe.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var aX=h((rr,oX)=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.MissingRefError=rr.ValidationError=rr.CodeGen=rr.Name=rr.nil=rr.stringify=rr.str=rr._=rr.KeywordCxt=void 0;var jHe=tJ(),MHe=eX(),UHe=nX(),sX=iX(),xHe=["/properties"],VI="http://json-schema.org/draft-07/schema",zI=class extends jHe.default{static{s(this,"Ajv")}_addVocabularies(){super._addVocabularies(),MHe.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(UHe.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(sX,xHe):sX;this.addMetaSchema(t,VI,!1),this.refs["http://json-schema.org/schema"]=VI}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(VI)?VI:void 0)}};oX.exports=rr=zI;Object.defineProperty(rr,"__esModule",{value:!0});rr.default=zI;var qHe=r0();Object.defineProperty(rr,"KeywordCxt",{enumerable:!0,get:function(){return qHe.KeywordCxt}});var em=Re();Object.defineProperty(rr,"_",{enumerable:!0,get:function(){return em._}});Object.defineProperty(rr,"str",{enumerable:!0,get:function(){return em.str}});Object.defineProperty(rr,"stringify",{enumerable:!0,get:function(){return em.stringify}});Object.defineProperty(rr,"nil",{enumerable:!0,get:function(){return em.nil}});Object.defineProperty(rr,"Name",{enumerable:!0,get:function(){return em.Name}});Object.defineProperty(rr,"CodeGen",{enumerable:!0,get:function(){return em.CodeGen}});var FHe=wI();Object.defineProperty(rr,"ValidationError",{enumerable:!0,get:function(){return FHe.default}});var kHe=TI();Object.defineProperty(rr,"MissingRefError",{enumerable:!0,get:function(){return kHe.default}})});var uX=h(tm=>{"use strict";Object.defineProperty(tm,"__esModule",{value:!0});tm.formatLimitDefinition=void 0;var BHe=aX(),ho=Re(),Ac=ho.operators,HI={formatMaximum:{okStr:"<=",ok:Ac.LTE,fail:Ac.GT},formatMinimum:{okStr:">=",ok:Ac.GTE,fail:Ac.LT},formatExclusiveMaximum:{okStr:"<",ok:Ac.LT,fail:Ac.GTE},formatExclusiveMinimum:{okStr:">",ok:Ac.GT,fail:Ac.LTE}},GHe={message:({keyword:e,schemaCode:t})=>ho.str`should be ${HI[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>ho._`{comparison: ${HI[e].okStr}, limit: ${t}}`};tm.formatLimitDefinition={keyword:Object.keys(HI),type:"string",schemaType:"string",$data:!0,error:GHe,code(e){let{gen:t,data:r,schemaCode:n,keyword:i,it:o}=e,{opts:a,self:u}=o;if(!a.validateFormats)return;let c=new BHe.KeywordCxt(o,u.RULES.all.format.definition,"format");c.$data?l():f();function l(){let _=t.scopeValue("formats",{ref:u.formats,code:a.code.formats}),m=t.const("fmt",ho._`${_}[${c.schemaCode}]`);e.fail$data(ho.or(ho._`typeof ${m} != "object"`,ho._`${m} instanceof RegExp`,ho._`typeof ${m}.compare != "function"`,d(m)))}s(l,"validate$DataFormat");function f(){let _=c.schema,m=u.formats[_];if(!m||m===!0)return;if(typeof m!="object"||m instanceof RegExp||typeof m.compare!="function")throw new Error(`"${i}": format "${_}" does not define "compare" function`);let g=t.scopeValue("formats",{key:_,ref:m,code:a.code.formats?ho._`${a.code.formats}${ho.getProperty(_)}`:void 0});e.fail$data(d(g))}s(f,"validateFormat");function d(_){return ho._`${_}.compare(${r}, ${n}) ${HI[i].fail} 0`}s(d,"compareCode")},dependencies:["format"]};var VHe=s(e=>(e.addKeyword(tm.formatLimitDefinition),e),"formatLimitPlugin");tm.default=VHe});var VM=h((_0,fX)=>{"use strict";Object.defineProperty(_0,"__esModule",{value:!0});var rm=WW(),zHe=uX(),BM=Re(),cX=new BM.Name("fullFormats"),HHe=new BM.Name("fastFormats"),GM=s((e,t={keywords:!0})=>{if(Array.isArray(t))return lX(e,t,rm.fullFormats,cX),e;let[r,n]=t.mode==="fast"?[rm.fastFormats,HHe]:[rm.fullFormats,cX],i=t.formats||rm.formatNames;return lX(e,i,r,n),t.keywords&&zHe.default(e),e},"formatsPlugin");GM.get=(e,t="full")=>{let n=(t==="fast"?rm.fastFormats:rm.fullFormats)[e];if(!n)throw new Error(`Unknown format "${e}"`);return n};function lX(e,t,r,n){var i,o;(i=(o=e.opts.code).formats)!==null&&i!==void 0||(o.formats=BM._`require("ajv-formats/dist/formats").${n}`);for(let a of t)e.addFormat(a,r[a])}s(lX,"addFormats");fX.exports=_0=GM;Object.defineProperty(_0,"__esModule",{value:!0});_0.default=GM});var HM=h(g0=>{"use strict";Object.defineProperty(g0,"__esModule",{value:!0});g0.dynamicAnchor=void 0;var zM=Oe(),KHe=ps(),dX=Ny(),WHe=tI(),YHe={keyword:"$dynamicAnchor",schemaType:"string",code:e=>pX(e,e.schema)};function pX(e,t){let{gen:r,it:n}=e;n.schemaEnv.root.dynamicAnchors[t]=!0;let i=(0,zM._)`${KHe.default.dynamicAnchors}${(0,zM.getProperty)(t)}`,o=n.errSchemaPath==="#"?n.validateName:JHe(e);r.if((0,zM._)`!${i}`,()=>r.assign(i,o))}s(pX,"dynamicAnchor");g0.dynamicAnchor=pX;function JHe(e){let{schemaEnv:t,schema:r,self:n}=e.it,{root:i,baseId:o,localRefs:a,meta:u}=t.root,{schemaId:c}=n.opts,l=new dX.SchemaEnv({schema:r,schemaId:c,root:i,baseId:o,localRefs:a,meta:u});return dX.compileSchema.call(n,l),(0,WHe.getValidate)(e,l)}s(JHe,"_getValidate");g0.default=YHe});var KM=h(y0=>{"use strict";Object.defineProperty(y0,"__esModule",{value:!0});y0.dynamicRef=void 0;var hX=Oe(),XHe=ps(),mX=tI(),QHe={keyword:"$dynamicRef",schemaType:"string",code:e=>_X(e,e.schema)};function _X(e,t){let{gen:r,keyword:n,it:i}=e;if(t[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);let o=t.slice(1);if(i.allErrors)a();else{let c=r.let("valid",!1);a(c),e.ok(c)}function a(c){if(i.schemaEnv.root.dynamicAnchors[o]){let l=r.let("_v",(0,hX._)`${XHe.default.dynamicAnchors}${(0,hX.getProperty)(o)}`);r.if(l,u(l,c),u(i.validateName,c))}else u(i.validateName,c)()}s(a,"_dynamicRef");function u(c,l){return l?()=>r.block(()=>{(0,mX.callRef)(e,c),r.let(l,!0)}):()=>(0,mX.callRef)(e,c)}s(u,"_callRef")}s(_X,"dynamicRef");y0.dynamicRef=_X;y0.default=QHe});var gX=h(WM=>{"use strict";Object.defineProperty(WM,"__esModule",{value:!0});var ZHe=HM(),e5e=Ve(),t5e={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,ZHe.dynamicAnchor)(e,""):(0,e5e.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};WM.default=t5e});var yX=h(YM=>{"use strict";Object.defineProperty(YM,"__esModule",{value:!0});var r5e=KM(),n5e={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,r5e.dynamicRef)(e,e.schema)};YM.default=n5e});var EX=h(JM=>{"use strict";Object.defineProperty(JM,"__esModule",{value:!0});var i5e=HM(),s5e=KM(),o5e=gX(),a5e=yX(),u5e=[i5e.default,s5e.default,o5e.default,a5e.default];JM.default=u5e});var SX=h(XM=>{"use strict";Object.defineProperty(XM,"__esModule",{value:!0});var bX=uI(),c5e={keyword:"dependentRequired",type:"object",schemaType:"object",error:bX.error,code:e=>(0,bX.validatePropertyDeps)(e)};XM.default=c5e});var vX=h(QM=>{"use strict";Object.defineProperty(QM,"__esModule",{value:!0});var l5e=uI(),f5e={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,l5e.validateSchemaDeps)(e)};QM.default=f5e});var OX=h(ZM=>{"use strict";Object.defineProperty(ZM,"__esModule",{value:!0});var d5e=Ve(),p5e={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:r}){t.contains===void 0&&(0,d5e.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}};ZM.default=p5e});var PX=h(eU=>{"use strict";Object.defineProperty(eU,"__esModule",{value:!0});var h5e=SX(),m5e=vX(),_5e=OX(),g5e=[h5e.default,m5e.default,_5e.default];eU.default=g5e});var wX=h(tU=>{"use strict";Object.defineProperty(tU,"__esModule",{value:!0});var Rc=Oe(),IX=Ve(),y5e=ps(),E5e={message:"must NOT have unevaluated properties",params:({params:e})=>(0,Rc._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},b5e={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:E5e,code(e){let{gen:t,schema:r,data:n,errsCount:i,it:o}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:a,props:u}=o;u instanceof Rc.Name?t.if((0,Rc._)`${u} !== true`,()=>t.forIn("key",n,d=>t.if(l(u,d),()=>c(d)))):u!==!0&&t.forIn("key",n,d=>u===void 0?c(d):t.if(f(u,d),()=>c(d))),o.props=!0,e.ok((0,Rc._)`${i} === ${y5e.default.errors}`);function c(d){if(r===!1){e.setParams({unevaluatedProperty:d}),e.error(),a||t.break();return}if(!(0,IX.alwaysValidSchema)(o,r)){let _=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:d,dataPropType:IX.Type.Str},_),a||t.if((0,Rc.not)(_),()=>t.break())}}s(c,"unevaluatedPropCode");function l(d,_){return(0,Rc._)`!${d} || !${d}[${_}]`}s(l,"unevaluatedDynamic");function f(d,_){let m=[];for(let g in d)d[g]===!0&&m.push((0,Rc._)`${_} !== ${g}`);return(0,Rc.and)(...m)}s(f,"unevaluatedStatic")}};tU.default=b5e});var NX=h(rU=>{"use strict";Object.defineProperty(rU,"__esModule",{value:!0});var dd=Oe(),TX=Ve(),S5e={message:({params:{len:e}})=>(0,dd.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,dd._)`{limit: ${e}}`},v5e={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:S5e,code(e){let{gen:t,schema:r,data:n,it:i}=e,o=i.items||0;if(o===!0)return;let a=t.const("len",(0,dd._)`${n}.length`);if(r===!1)e.setParams({len:o}),e.fail((0,dd._)`${a} > ${o}`);else if(typeof r=="object"&&!(0,TX.alwaysValidSchema)(i,r)){let c=t.var("valid",(0,dd._)`${a} <= ${o}`);t.if((0,dd.not)(c),()=>u(c,o)),e.ok(c)}i.items=!0;function u(c,l){t.forRange("i",l,a,f=>{e.subschema({keyword:"unevaluatedItems",dataProp:f,dataPropType:TX.Type.Num},c),i.allErrors||t.if((0,dd.not)(c),()=>t.break())})}s(u,"validateItems")}};rU.default=v5e});var AX=h(nU=>{"use strict";Object.defineProperty(nU,"__esModule",{value:!0});var O5e=wX(),P5e=NX(),I5e=[O5e.default,P5e.default];nU.default=I5e});var CX=h(iU=>{"use strict";Object.defineProperty(iU,"__esModule",{value:!0});var w5e=mL(),T5e=CL(),N5e=QL(),A5e=EX(),R5e=PX(),C5e=AX(),$5e=tj(),RX=rj(),D5e=[A5e.default,w5e.default,T5e.default,(0,N5e.default)(!0),$5e.default,RX.metadataVocabulary,RX.contentVocabulary,R5e.default,C5e.default];iU.default=D5e});var $X=h((c$t,L5e)=>{L5e.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 DX=h((l$t,j5e)=>{j5e.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 LX=h((f$t,M5e)=>{M5e.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 jX=h((d$t,U5e)=>{U5e.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 MX=h((p$t,x5e)=>{x5e.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 UX=h((h$t,q5e)=>{q5e.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 xX=h((m$t,F5e)=>{F5e.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 qX=h((_$t,k5e)=>{k5e.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 FX=h(sU=>{"use strict";Object.defineProperty(sU,"__esModule",{value:!0});var B5e=$X(),G5e=DX(),V5e=LX(),z5e=jX(),H5e=MX(),K5e=UX(),W5e=xX(),Y5e=qX(),J5e=["/properties"];function X5e(e){return[B5e,G5e,V5e,z5e,H5e,t(this,K5e),W5e,t(this,Y5e)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function t(r,n){return e?r.$dataMetaSchema(n,J5e):n}s(t,"with$data")}s(X5e,"addMetaSchema2020");sU.default=X5e});var aU=h((nr,kX)=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.MissingRefError=nr.ValidationError=nr.CodeGen=nr.Name=nr.nil=nr.stringify=nr.str=nr._=nr.KeywordCxt=void 0;var Q5e=dL(),Z5e=CX(),eKe=oj(),tKe=FX(),oU="https://json-schema.org/draft/2020-12/schema",KI=class extends Q5e.default{static{s(this,"Ajv2020")}constructor(t={}){super({...t,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),Z5e.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(eKe.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:t,meta:r}=this.opts;r&&(tKe.default.call(this,t),this.refs["http://json-schema.org/schema"]=oU)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(oU)?oU:void 0)}};kX.exports=nr=KI;Object.defineProperty(nr,"__esModule",{value:!0});nr.default=KI;var rKe=jh();Object.defineProperty(nr,"KeywordCxt",{enumerable:!0,get:function(){return rKe.KeywordCxt}});var nm=Oe();Object.defineProperty(nr,"_",{enumerable:!0,get:function(){return nm._}});Object.defineProperty(nr,"str",{enumerable:!0,get:function(){return nm.str}});Object.defineProperty(nr,"stringify",{enumerable:!0,get:function(){return nm.stringify}});Object.defineProperty(nr,"nil",{enumerable:!0,get:function(){return nm.nil}});Object.defineProperty(nr,"Name",{enumerable:!0,get:function(){return nm.Name}});Object.defineProperty(nr,"CodeGen",{enumerable:!0,get:function(){return nm.CodeGen}});var nKe=wy();Object.defineProperty(nr,"ValidationError",{enumerable:!0,get:function(){return nKe.default}});var iKe=Ty();Object.defineProperty(nr,"MissingRefError",{enumerable:!0,get:function(){return iKe.default}})});var uU=h((b0,GX)=>{"use strict";Object.defineProperty(b0,"__esModule",{value:!0});var E0=xP(),mo=Nh();function BX(e,t){if(!e.opts.code.source)throw new Error("moduleCode: ajv instance must have code.source option");let{_n:r}=e.scope.opts;return typeof t=="function"?i(t.source):t!==void 0?o(t,n):o(e.schemas,u=>u.meta?void 0:e.compile(u.schema));function n(u){let c=e.getSchema(u);if(!c)throw new Error(`moduleCode: no schema with id ${u}`);return c}function i(u){let c={},l=u?.validateName,f=a(c,u);return e.opts.code.esm?`"use strict";${r}export const validate = ${l};${r}export default ${l};${r}${f}`:`"use strict";${r}module.exports = ${l};${r}module.exports.default = ${l};${r}${f}`}function o(u,c){var l;let f={},d=(0,mo._)`"use strict";`;for(let _ in u){let m=c(u[_]);if(m){let g=a(f,m.source),y=e.opts.code.esm?(0,mo._)`export const ${(0,mo.getEsmExportName)(_)}`:(0,mo._)`exports${(0,mo.getProperty)(_)}`;d=(0,mo._)`${d}${r}${y} = ${(l=m.source)===null||l===void 0?void 0:l.validateName};${r}${g}`}}return`${d}`}function a(u,c){if(!c)throw new Error('moduleCode: function does not have "source" property');if(_(c.validateName)===E0.UsedValueState.Completed)return mo.nil;m(c.validateName,E0.UsedValueState.Started);let l=e.scope.scopeCode(c.scopeValues,u,d),f=new mo._Code(`${l}${r}${c.validateCode}`);return c.evaluated?(0,mo._)`${f}${c.validateName}.evaluated = ${c.evaluated};${r}`:f;function d(g){var y;let b=(y=g.value)===null||y===void 0?void 0:y.ref;if(g.prefix==="validate"&&typeof b=="function")return a(u,b.source);if((g.prefix==="root"||g.prefix==="wrapper")&&typeof b=="object"){let{validate:E,validateName:v}=b;if(!v)throw new Error("ajv internal error");let O=e.opts.code.es5?E0.varKinds.var:E0.varKinds.const,I=(0,mo._)`${O} ${g} = {validate: ${v}};`;if(_(v)===E0.UsedValueState.Started)return I;let w=a(u,E?.source);return(0,mo._)`${I}${r}${w}`}}function _(g){var y;return(y=u[g.prefix])===null||y===void 0?void 0:y.get(g)}function m(g,y){let{prefix:b}=g;(u[b]=u[b]||new Map).set(g,y)}}}s(BX,"standaloneCode");GX.exports=b0=BX;Object.defineProperty(b0,"__esModule",{value:!0});b0.default=BX});var KX=h(im=>{"use strict";var pu=im&&im.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(im,"__esModule",{value:!0});im.jsonSchemaPlugin=void 0;var VX=Gf(),pd=pu(gn()),sKe=BW(),oKe=pu(VM()),aKe=pu(aU()),uKe=pu(uU()),zX=pu(require("fs/promises")),zi=pu(require("path")),cKe=pu(require("prettier")),S0=kt(),HX=pu(Xs()),lKe=pu(_n()),ca="schemas",WI="json-schema";function fKe(e){return{name:ca,async setup(t){let r=new aKe.default({code:{source:!0},allErrors:!0,strict:!1,verbose:!0,meta:!0});(0,oKe.default)(r,{mode:"fast"}),r.opts.code.formats=(0,sKe._)`require("ajv-formats/dist/formats").fastFormats`;let n=zi.default.join(e.sourceDirectory,S0.USER_SCHEMAS_DIR_NAME),i,o=[],a=[];if(await pd.default.dirExists(n)&&(r.addKeyword("faker"),i=await pd.default.listFolderContents(n,S0.USER_SCHEMAS_DIR_NAME),await Promise.all(i.map(async u=>{try{let c=pd.default.safePath(e.sourceDirectory).resolve(n,u);if(!c.startsWith(n))throw new Error("All schemas must be in the schemas directory");let l=await zX.default.readFile(c,"utf-8");if(l===""||l===void 0)throw new Error(`Schema 'schemas/${u}' is empty and will be ignored.`);let f=JSON.parse(l);if(f.$schema&&f.$schema!=="https://json-schema.org/draft/2020-12/schema")throw new Error(`Error in ${u}: All JSON schemas must use version 2020-12. See release notes for changes: https://json-schema.org/draft/2020-12/release-notes.html`);if(r.$dataMetaSchema,r.addSchema(f,u),r.errors?.length){let d=r.errors[0];o.push({id:"json-schema-validation-error",pluginName:ca,text:`Error: ${d.message}`,location:{file:zi.default.join(S0.USER_SCHEMAS_DIR_NAME,u)},detail:{params:d.params,propertyName:d.propertyName,schemaPath:d.schemaPath,data:d.data}})}}catch(c){if(c.message.endsWith("is empty and will be ignored.")){a.push({id:"empty-json-schema-file",pluginName:ca,text:`Schema 'schemas/${u}' is empty and will be ignored.`,location:{file:`schemas/${u}`,suggestion:"Add schema details or remove the file from the project."},detail:"EmptyJSONSchemaFile",notes:[{text:`Schema 'schemas/${u}' is empty and will be ignored.`,location:{file:`schemas/${u}`,suggestion:"Add schema details or remove the file from the project."}}]});return}let l=await(0,VX.getLocation)(u,e.sourceDirectory,c.message);o.push({id:"json-schema-add-error",pluginName:ca,text:`Error: ${c.message}`,location:l,detail:"InvalidAddSchemaError",notes:[{text:c.message}]})}})),await Promise.all(i.map(async u=>{try{let c=r.getSchema(u);c&&r.compile(c.schema).errors?.forEach(f=>{o.push({text:`Failed to compile ${u}: ${f.message}`})})}catch(c){let l=await(0,VX.getLocation)(u,e.sourceDirectory,c.message);o.push({id:"json-schema-compile-error",pluginName:ca,text:`The schema file '${u}' is not valid. Error: ${c.message}`,location:l,detail:"InvalidSchemaError",notes:[{text:c.message}]})}})),HX.default.DEBUG_BUILD_MODE)){let u=zi.default.resolve(e.outputDirectory,S0.USER_SCHEMAS_DIR_NAME);await pd.default.mkdirIfNotExists(u)}t.onStart(async()=>{if(i)return{errors:o,warnings:a}}),t.onResolve({filter:/schemas\/.*\.json$/},async u=>{let c=zi.default.isAbsolute(u.path)?u.path:zi.default.join(u.resolveDir,u.path);if(u.importer&&u.importer!==zi.default.join(e.sourceDirectory,"config/routes.json"))return{path:c};if(!await pd.default.fileExists(c)){let l="policies.json";return{errors:[{id:"json-schema-build-error",text:`Unable to resolve reference to '${u.path}' from ${l}`,location:{file:zi.default.join(u.resolveDir,l),namespace:WI,line:1,column:0,length:0,lineText:`Invalid JSON schema reference in ${l}`,suggestion:""},detail:"RouteReferenceError",pluginName:ca,notes:[{text:`Unable to resolve reference to '${u.path}' from ${l}`,location:null}]}],namespace:WI,path:c,pluginName:ca}}return{path:c,namespace:WI,pluginName:ca}}),t.onLoad({filter:/.*/,namespace:WI},async u=>lKe.default.timeFn(`Generating json schema data: ${zi.default.basename(u.path)}`,async()=>{let c=[],l;try{let f=zi.default.relative(n,u.path),d=r.getSchema(f);if(!d)throw new Error(`Could not load schema at ${u.path}`);l=d.source?.validateCode;let _=r.compile(d.schema);l=(0,uKe.default)(r,_)}catch(f){c.push({pluginName:ca,text:`Cannot parse project's schemas/${zi.default.basename(u.path)} file. Error: ${f.message}`,location:null,notes:[{text:f.message,location:null}],detail:f})}if(HX.default.DEBUG_BUILD_MODE&&l){let f=zi.default.resolve(e.outputDirectory,S0.USER_SCHEMAS_DIR_NAME),d=zi.default.relative(n,u.path),_=await cKe.default.format(l,{parser:"babel"}),m=pd.default.safePath(e.sourceDirectory).resolve(f,`${d}.js`);await pd.default.mkdirForFilePathIfNotExits(m),await zX.default.writeFile(m,_,"utf-8")}return{contents:l,errors:c,pluginName:ca,resolveDir:zi.default.dirname(u.path),watchFiles:[u.path]}}))}}}s(fKe,"jsonSchemaPlugin");im.jsonSchemaPlugin=fKe});var JX=h(YI=>{"use strict";Object.defineProperty(YI,"__esModule",{value:!0});YI.nodejsCompatPlugin=void 0;var WX=require("path"),YX=["node:assert","node:async_hooks","node:buffer","node:crypto","node:diagnostics_channel","node:events","node:path","node:process","node:stream","node:string_decoder","node:util"],dKe="nodejs-compat-plugin";function pKe({nodeCompatEnabled:e,sourceDirectory:t}){return{name:dKe,setup(r){let n=new Set;r.onStart(()=>{n.clear()}),r.onResolve({filter:/node:.*/},async({path:i,kind:o,resolveDir:a,...u})=>{let c=`${i}:${o}:${a}:${u.importer}`;if(n.has(c))return;if(n.add(c),!e&&i==="node:async_hooks")return{path:(0,WX.resolve)(__dirname,"../../../polyfills/async_hooks.js")};let l=await r.resolve(i,{kind:o,resolveDir:a,importer:u.importer});return l.errors.length>0?e&&YX.includes(i)||i.includes("/")&&YX.includes(i.split("/")[0])?{external:!0}:{external:!0,warnings:l.errors.map(d=>({...d,location:{file:(0,WX.relative)(t,u.importer),line:0,column:0,namespace:"",length:0,lineText:"",suggestion:"Remove the imported node module"},detail:`The package "${i}" wasn't found on the file system but is built into node. If this code is executed it will fail.`}))}:l})}}}s(pKe,"nodejsCompatPlugin");YI.nodejsCompatPlugin=pKe});var zn=h(Hi=>{"use strict";Hi.__esModule=!0;Hi.extend=XX;Hi.indexOf=yKe;Hi.escapeExpression=EKe;Hi.isEmpty=bKe;Hi.createFrame=SKe;Hi.blockParams=vKe;Hi.appendContextPath=OKe;var hKe={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},mKe=/[&<>"'`=]/g,_Ke=/[&<>"'`=]/;function gKe(e){return hKe[e]}s(gKe,"escapeChar");function XX(e){for(var t=1;t<arguments.length;t++)for(var r in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],r)&&(e[r]=arguments[t][r]);return e}s(XX,"extend");var lU=Object.prototype.toString;Hi.toString=lU;var cU=s(function(t){return typeof t=="function"},"isFunction");cU(/x/)&&(Hi.isFunction=cU=s(function(e){return typeof e=="function"&&lU.call(e)==="[object Function]"},"isFunction"));Hi.isFunction=cU;var QX=Array.isArray||function(e){return e&&typeof e=="object"?lU.call(e)==="[object Array]":!1};Hi.isArray=QX;function yKe(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}s(yKe,"indexOf");function EKe(e){if(typeof e!="string"){if(e&&e.toHTML)return e.toHTML();if(e==null)return"";if(!e)return e+"";e=""+e}return _Ke.test(e)?e.replace(mKe,gKe):e}s(EKe,"escapeExpression");function bKe(e){return!e&&e!==0?!0:!!(QX(e)&&e.length===0)}s(bKe,"isEmpty");function SKe(e){var t=XX({},e);return t._parent=e,t}s(SKe,"createFrame");function vKe(e,t){return e.path=t,e}s(vKe,"blockParams");function OKe(e,t){return(e?e+".":"")+t}s(OKe,"appendContextPath")});var Ss=h((JI,ZX)=>{"use strict";JI.__esModule=!0;var fU=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function dU(e,t){var r=t&&t.loc,n=void 0,i=void 0,o=void 0,a=void 0;r&&(n=r.start.line,i=r.end.line,o=r.start.column,a=r.end.column,e+=" - "+n+":"+o);for(var u=Error.prototype.constructor.call(this,e),c=0;c<fU.length;c++)this[fU[c]]=u[fU[c]];Error.captureStackTrace&&Error.captureStackTrace(this,dU);try{r&&(this.lineNumber=n,this.endLineNumber=i,Object.defineProperty?(Object.defineProperty(this,"column",{value:o,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:a,enumerable:!0})):(this.column=o,this.endColumn=a))}catch{}}s(dU,"Exception");dU.prototype=new Error;JI.default=dU;ZX.exports=JI.default});var tQ=h((XI,eQ)=>{"use strict";XI.__esModule=!0;var pU=zn();XI.default=function(e){e.registerHelper("blockHelperMissing",function(t,r){var n=r.inverse,i=r.fn;if(t===!0)return i(this);if(t===!1||t==null)return n(this);if(pU.isArray(t))return t.length>0?(r.ids&&(r.ids=[r.name]),e.helpers.each(t,r)):n(this);if(r.data&&r.ids){var o=pU.createFrame(r.data);o.contextPath=pU.appendContextPath(r.data.contextPath,r.name),r={data:o}}return i(t,r)})};eQ.exports=XI.default});var nQ=h((QI,rQ)=>{"use strict";QI.__esModule=!0;function PKe(e){return e&&e.__esModule?e:{default:e}}s(PKe,"_interopRequireDefault");var v0=zn(),IKe=Ss(),wKe=PKe(IKe);QI.default=function(e){e.registerHelper("each",function(t,r){if(!r)throw new wKe.default("Must pass iterator to #each");var n=r.fn,i=r.inverse,o=0,a="",u=void 0,c=void 0;r.data&&r.ids&&(c=v0.appendContextPath(r.data.contextPath,r.ids[0])+"."),v0.isFunction(t)&&(t=t.call(this)),r.data&&(u=v0.createFrame(r.data));function l(g,y,b){u&&(u.key=g,u.index=y,u.first=y===0,u.last=!!b,c&&(u.contextPath=c+g)),a=a+n(t[g],{data:u,blockParams:v0.blockParams([t[g],g],[c+g,null])})}if(s(l,"execIteration"),t&&typeof t=="object")if(v0.isArray(t))for(var f=t.length;o<f;o++)o in t&&l(o,o,o===t.length-1);else if(global.Symbol&&t[global.Symbol.iterator]){for(var d=[],_=t[global.Symbol.iterator](),m=_.next();!m.done;m=_.next())d.push(m.value);t=d;for(var f=t.length;o<f;o++)l(o,o,o===t.length-1)}else(function(){var g=void 0;Object.keys(t).forEach(function(y){g!==void 0&&l(g,o-1),g=y,o++}),g!==void 0&&l(g,o-1,!0)})();return o===0&&(a=i(this)),a})};rQ.exports=QI.default});var sQ=h((ZI,iQ)=>{"use strict";ZI.__esModule=!0;function TKe(e){return e&&e.__esModule?e:{default:e}}s(TKe,"_interopRequireDefault");var NKe=Ss(),AKe=TKe(NKe);ZI.default=function(e){e.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new AKe.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};iQ.exports=ZI.default});var cQ=h((ew,uQ)=>{"use strict";ew.__esModule=!0;function RKe(e){return e&&e.__esModule?e:{default:e}}s(RKe,"_interopRequireDefault");var oQ=zn(),CKe=Ss(),aQ=RKe(CKe);ew.default=function(e){e.registerHelper("if",function(t,r){if(arguments.length!=2)throw new aQ.default("#if requires exactly one argument");return oQ.isFunction(t)&&(t=t.call(this)),!r.hash.includeZero&&!t||oQ.isEmpty(t)?r.inverse(this):r.fn(this)}),e.registerHelper("unless",function(t,r){if(arguments.length!=2)throw new aQ.default("#unless requires exactly one argument");return e.helpers.if.call(this,t,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};uQ.exports=ew.default});var fQ=h((tw,lQ)=>{"use strict";tw.__esModule=!0;tw.default=function(e){e.registerHelper("log",function(){for(var t=[void 0],r=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)t.push(arguments[n]);var i=1;r.hash.level!=null?i=r.hash.level:r.data&&r.data.level!=null&&(i=r.data.level),t[0]=i,e.log.apply(e,t)})};lQ.exports=tw.default});var pQ=h((rw,dQ)=>{"use strict";rw.__esModule=!0;rw.default=function(e){e.registerHelper("lookup",function(t,r,n){return t&&n.lookupProperty(t,r)})};dQ.exports=rw.default});var mQ=h((nw,hQ)=>{"use strict";nw.__esModule=!0;function $Ke(e){return e&&e.__esModule?e:{default:e}}s($Ke,"_interopRequireDefault");var O0=zn(),DKe=Ss(),LKe=$Ke(DKe);nw.default=function(e){e.registerHelper("with",function(t,r){if(arguments.length!=2)throw new LKe.default("#with requires exactly one argument");O0.isFunction(t)&&(t=t.call(this));var n=r.fn;if(O0.isEmpty(t))return r.inverse(this);var i=r.data;return r.data&&r.ids&&(i=O0.createFrame(r.data),i.contextPath=O0.appendContextPath(r.data.contextPath,r.ids[0])),n(t,{data:i,blockParams:O0.blockParams([t],[i&&i.contextPath])})})};hQ.exports=nw.default});var hU=h(iw=>{"use strict";iw.__esModule=!0;iw.registerDefaultHelpers=YKe;iw.moveHelperToHooks=JKe;function hd(e){return e&&e.__esModule?e:{default:e}}s(hd,"_interopRequireDefault");var jKe=tQ(),MKe=hd(jKe),UKe=nQ(),xKe=hd(UKe),qKe=sQ(),FKe=hd(qKe),kKe=cQ(),BKe=hd(kKe),GKe=fQ(),VKe=hd(GKe),zKe=pQ(),HKe=hd(zKe),KKe=mQ(),WKe=hd(KKe);function YKe(e){MKe.default(e),xKe.default(e),FKe.default(e),BKe.default(e),VKe.default(e),HKe.default(e),WKe.default(e)}s(YKe,"registerDefaultHelpers");function JKe(e,t,r){e.helpers[t]&&(e.hooks[t]=e.helpers[t],r||delete e.helpers[t])}s(JKe,"moveHelperToHooks")});var gQ=h((sw,_Q)=>{"use strict";sw.__esModule=!0;var XKe=zn();sw.default=function(e){e.registerDecorator("inline",function(t,r,n,i){var o=t;return r.partials||(r.partials={},o=s(function(a,u){var c=n.partials;n.partials=XKe.extend({},c,r.partials);var l=t(a,u);return n.partials=c,l},"ret")),r.partials[i.args[0]]=i.fn,o})};_Q.exports=sw.default});var yQ=h(mU=>{"use strict";mU.__esModule=!0;mU.registerDefaultDecorators=t9e;function QKe(e){return e&&e.__esModule?e:{default:e}}s(QKe,"_interopRequireDefault");var ZKe=gQ(),e9e=QKe(ZKe);function t9e(e){e9e.default(e)}s(t9e,"registerDefaultDecorators")});var _U=h((ow,EQ)=>{"use strict";ow.__esModule=!0;var r9e=zn(),sm={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:s(function(t){if(typeof t=="string"){var r=r9e.indexOf(sm.methodMap,t.toLowerCase());r>=0?t=r:t=parseInt(t,10)}return t},"lookupLevel"),log:s(function(t){if(t=sm.lookupLevel(t),typeof console<"u"&&sm.lookupLevel(sm.level)<=t){var r=sm.methodMap[t];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)}},"log")};ow.default=sm;EQ.exports=ow.default});var bQ=h(gU=>{"use strict";gU.__esModule=!0;gU.createNewLookupObject=i9e;var n9e=zn();function i9e(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return n9e.extend.apply(void 0,[Object.create(null)].concat(t))}s(i9e,"createNewLookupObject")});var yU=h(P0=>{"use strict";P0.__esModule=!0;P0.createProtoAccessControl=u9e;P0.resultIsAllowed=c9e;P0.resetLoggedProperties=f9e;function s9e(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}s(s9e,"_interopRequireWildcard");var SQ=bQ(),o9e=_U(),a9e=s9e(o9e),aw=Object.create(null);function u9e(e){var t=Object.create(null);t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1;var r=Object.create(null);return r.__proto__=!1,{properties:{whitelist:SQ.createNewLookupObject(r,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:SQ.createNewLookupObject(t,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}}s(u9e,"createProtoAccessControl");function c9e(e,t,r){return vQ(typeof e=="function"?t.methods:t.properties,r)}s(c9e,"resultIsAllowed");function vQ(e,t){return e.whitelist[t]!==void 0?e.whitelist[t]===!0:e.defaultValue!==void 0?e.defaultValue:(l9e(t),!1)}s(vQ,"checkWhiteList");function l9e(e){aw[e]!==!0&&(aw[e]=!0,a9e.log("error",'Handlebars: Access has been denied to resolve the property "'+e+`" because it is not an "own property" of its parent.
|
|
149
149
|
You can add a runtime option to disable the check or this warning:
|
|
150
150
|
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}s(l9e,"logUnexpecedPropertyAccessOnce");function f9e(){Object.keys(aw).forEach(function(e){delete aw[e]})}s(f9e,"resetLoggedProperties")});var cw=h(la=>{"use strict";la.__esModule=!0;la.HandlebarsEnvironment=SU;function OQ(e){return e&&e.__esModule?e:{default:e}}s(OQ,"_interopRequireDefault");var md=zn(),d9e=Ss(),EU=OQ(d9e),p9e=hU(),h9e=yQ(),m9e=_U(),uw=OQ(m9e),_9e=yU(),g9e="4.7.7";la.VERSION=g9e;var y9e=8;la.COMPILER_REVISION=y9e;var E9e=7;la.LAST_COMPATIBLE_COMPILER_REVISION=E9e;var b9e={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"};la.REVISION_CHANGES=b9e;var bU="[object Object]";function SU(e,t,r){this.helpers=e||{},this.partials=t||{},this.decorators=r||{},p9e.registerDefaultHelpers(this),h9e.registerDefaultDecorators(this)}s(SU,"HandlebarsEnvironment");SU.prototype={constructor:SU,logger:uw.default,log:uw.default.log,registerHelper:s(function(t,r){if(md.toString.call(t)===bU){if(r)throw new EU.default("Arg not supported with multiple helpers");md.extend(this.helpers,t)}else this.helpers[t]=r},"registerHelper"),unregisterHelper:s(function(t){delete this.helpers[t]},"unregisterHelper"),registerPartial:s(function(t,r){if(md.toString.call(t)===bU)md.extend(this.partials,t);else{if(typeof r>"u")throw new EU.default('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=r}},"registerPartial"),unregisterPartial:s(function(t){delete this.partials[t]},"unregisterPartial"),registerDecorator:s(function(t,r){if(md.toString.call(t)===bU){if(r)throw new EU.default("Arg not supported with multiple decorators");md.extend(this.decorators,t)}else this.decorators[t]=r},"registerDecorator"),unregisterDecorator:s(function(t){delete this.decorators[t]},"unregisterDecorator"),resetLoggedPropertyAccesses:s(function(){_9e.resetLoggedProperties()},"resetLoggedPropertyAccesses")};var S9e=uw.default.log;la.log=S9e;la.createFrame=md.createFrame;la.logger=uw.default});var IQ=h((lw,PQ)=>{"use strict";lw.__esModule=!0;function vU(e){this.string=e}s(vU,"SafeString");vU.prototype.toString=vU.prototype.toHTML=function(){return""+this.string};lw.default=vU;PQ.exports=lw.default});var wQ=h(OU=>{"use strict";OU.__esModule=!0;OU.wrapHelper=v9e;function v9e(e,t){if(typeof e!="function")return e;var r=s(function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=t(i),e.apply(this,arguments)},"wrapper");return r}s(v9e,"wrapHelper")});var CQ=h(Cc=>{"use strict";Cc.__esModule=!0;Cc.checkRevision=N9e;Cc.template=A9e;Cc.wrapProgram=fw;Cc.resolvePartial=R9e;Cc.invokePartial=C9e;Cc.noop=AQ;function O9e(e){return e&&e.__esModule?e:{default:e}}s(O9e,"_interopRequireDefault");function P9e(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}s(P9e,"_interopRequireWildcard");var I9e=zn(),hu=P9e(I9e),w9e=Ss(),mu=O9e(w9e),_u=cw(),TQ=hU(),T9e=wQ(),NQ=yU();function N9e(e){var t=e&&e[0]||1,r=_u.COMPILER_REVISION;if(!(t>=_u.LAST_COMPATIBLE_COMPILER_REVISION&&t<=_u.COMPILER_REVISION))if(t<_u.LAST_COMPATIBLE_COMPILER_REVISION){var n=_u.REVISION_CHANGES[r],i=_u.REVISION_CHANGES[t];throw new mu.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 mu.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}s(N9e,"checkRevision");function A9e(e,t){if(!t)throw new mu.default("No environment passed to template");if(!e||!e.main)throw new mu.default("Unknown template object: "+typeof e);e.main.decorator=e.main_d,t.VM.checkRevision(e.compiler);var r=e.compiler&&e.compiler[0]===7;function n(a,u,c){c.hash&&(u=hu.extend({},u,c.hash),c.ids&&(c.ids[0]=!0)),a=t.VM.resolvePartial.call(this,a,u,c);var l=hu.extend({},c,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),f=t.VM.invokePartial.call(this,a,u,l);if(f==null&&t.compile&&(c.partials[c.name]=t.compile(a,e.compilerOptions,t),f=c.partials[c.name](u,l)),f!=null){if(c.indent){for(var d=f.split(`
|
|
151
151
|
`),_=0,m=d.length;_<m&&!(!d[_]&&_+1===m);_++)d[_]=c.indent+d[_];f=d.join(`
|
|
152
|
-
`)}return f}else throw new mu.default("The partial "+c.name+" could not be compiled when running in runtime-only mode")}s(n,"invokePartialWrapper");var i={strict:s(function(u,c,l){if(!u||!(c in u))throw new mu.default('"'+c+'" not defined in '+u,{loc:l});return i.lookupProperty(u,c)},"strict"),lookupProperty:s(function(u,c){var l=u[c];if(l==null||Object.prototype.hasOwnProperty.call(u,c)||NQ.resultIsAllowed(l,i.protoAccessControl,c))return l},"lookupProperty"),lookup:s(function(u,c){for(var l=u.length,f=0;f<l;f++){var d=u[f]&&i.lookupProperty(u[f],c);if(d!=null)return u[f][c]}},"lookup"),lambda:s(function(u,c){return typeof u=="function"?u.call(c):u},"lambda"),escapeExpression:hu.escapeExpression,invokePartial:n,fn:s(function(u){var c=e[u];return c.decorator=e[u+"_d"],c},"fn"),programs:[],program:s(function(u,c,l,f,d){var _=this.programs[u],m=this.fn(u);return c||d||f||l?_=fw(this,u,m,c,l,f,d):_||(_=this.programs[u]=fw(this,u,m)),_},"program"),data:s(function(u,c){for(;u&&c--;)u=u._parent;return u},"data"),mergeIfNeeded:s(function(u,c){var l=u||c;return u&&c&&u!==c&&(l=hu.extend({},c,u)),l},"mergeIfNeeded"),nullContext:Object.seal({}),noop:t.VM.noop,compilerInfo:e.compiler};function o(a){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],c=u.data;o._setup(u),!u.partial&&e.useData&&(c=$9e(a,c));var l=void 0,f=e.useBlockParams?[]:void 0;e.useDepths&&(u.depths?l=a!=u.depths[0]?[a].concat(u.depths):u.depths:l=[a]);function d(_){return""+e.main(i,_,i.helpers,i.partials,c,f,l)}return s(d,"main"),d=RQ(e.main,d,i,u.depths||[],c,f),d(a,u)}return s(o,"ret"),o.isTop=!0,o._setup=function(a){if(a.partial)i.protoAccessControl=a.protoAccessControl,i.helpers=a.helpers,i.partials=a.partials,i.decorators=a.decorators,i.hooks=a.hooks;else{var u=hu.extend({},t.helpers,a.helpers);D9e(u,i),i.helpers=u,e.usePartial&&(i.partials=i.mergeIfNeeded(a.partials,t.partials)),(e.usePartial||e.useDecorators)&&(i.decorators=hu.extend({},t.decorators,a.decorators)),i.hooks={},i.protoAccessControl=NQ.createProtoAccessControl(a);var c=a.allowCallsToHelperMissing||r;TQ.moveHelperToHooks(i,"helperMissing",c),TQ.moveHelperToHooks(i,"blockHelperMissing",c)}},o._child=function(a,u,c,l){if(e.useBlockParams&&!c)throw new mu.default("must pass block params");if(e.useDepths&&!l)throw new mu.default("must pass parent depths");return fw(i,a,e[a],u,0,c,l)},o}s(A9e,"template");function fw(e,t,r,n,i,o,a){function u(c){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],f=a;return a&&c!=a[0]&&!(c===e.nullContext&&a[0]===null)&&(f=[c].concat(a)),r(e,c,e.helpers,e.partials,l.data||n,o&&[l.blockParams].concat(o),f)}return s(u,"prog"),u=RQ(r,u,e,a,n,o),u.program=t,u.depth=a?a.length:0,u.blockParams=i||0,u}s(fw,"wrapProgram");function R9e(e,t,r){return e?!e.call&&!r.name&&(r.name=e,e=r.partials[e]):r.name==="@partial-block"?e=r.data["partial-block"]:e=r.partials[r.name],e}s(R9e,"resolvePartial");function C9e(e,t,r){var n=r.data&&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!==AQ&&function(){r.data=_u.createFrame(r.data);var o=r.fn;i=r.data["partial-block"]=s(function(u){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return c.data=_u.createFrame(c.data),c.data["partial-block"]=n,o(u,c)},"partialBlockWrapper"),o.partials&&(r.partials=hu.extend({},r.partials,o.partials))}(),e===void 0&&i&&(e=i),e===void 0)throw new mu.default("The partial "+r.name+" could not be found");if(e instanceof Function)return e(t,r)}s(C9e,"invokePartial");function AQ(){return""}s(AQ,"noop");function $9e(e,t){return(!t||!("root"in t))&&(t=t?_u.createFrame(t):{},t.root=e),t}s($9e,"initData");function RQ(e,t,r,n,i,o){if(e.decorator){var a={};t=e.decorator(t,a,r,n&&n[0],i,o,n),hu.extend(t,a)}return t}s(RQ,"executeDecorators");function D9e(e,t){Object.keys(e).forEach(function(r){var n=e[r];e[r]=L9e(n,t)})}s(D9e,"wrapHelpersToPassLookupProperty");function L9e(e,t){var r=t.lookupProperty;return T9e.wrapHelper(e,function(n){return hu.extend({lookupProperty:r},n)})}s(L9e,"passLookupPropertyOption")});var PU=h((dw,$Q)=>{"use strict";dw.__esModule=!0;dw.default=function(e){var t=typeof global<"u"?global:window,r=t.Handlebars;e.noConflict=function(){return t.Handlebars===e&&(t.Handlebars=r),e}};$Q.exports=dw.default});var UQ=h((pw,MQ)=>{"use strict";pw.__esModule=!0;function wU(e){return e&&e.__esModule?e:{default:e}}s(wU,"_interopRequireDefault");function TU(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}s(TU,"_interopRequireWildcard");var j9e=cw(),DQ=TU(j9e),M9e=IQ(),U9e=wU(M9e),x9e=Ss(),q9e=wU(x9e),F9e=zn(),IU=TU(F9e),k9e=CQ(),LQ=TU(k9e),B9e=PU(),G9e=wU(B9e);function jQ(){var e=new DQ.HandlebarsEnvironment;return IU.extend(e,DQ),e.SafeString=U9e.default,e.Exception=q9e.default,e.Utils=IU,e.escapeExpression=IU.escapeExpression,e.VM=LQ,e.template=function(t){return LQ.template(t,e)},e}s(jQ,"create");var I0=jQ();I0.create=jQ;G9e.default(I0);I0.default=I0;pw.default=I0;MQ.exports=pw.default});var NU=h((hw,qQ)=>{"use strict";hw.__esModule=!0;var xQ={helpers:{helperExpression:s(function(t){return t.type==="SubExpression"||(t.type==="MustacheStatement"||t.type==="BlockStatement")&&!!(t.params&&t.params.length||t.hash)},"helperExpression"),scopedId:s(function(t){return/^\.|this\b/.test(t.original)},"scopedId"),simpleId:s(function(t){return t.parts.length===1&&!xQ.helpers.scopedId(t)&&!t.depth},"simpleId")}};hw.default=xQ;qQ.exports=hw.default});var kQ=h((mw,FQ)=>{"use strict";mw.__esModule=!0;var V9e=function(){var e={trace:s(function(){},"trace"),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:s(function(i,o,a,u,c,l,f){var d=l.length-1;switch(c){case 1:return l[d-1];case 2:this.$=u.prepareProgram(l[d]);break;case 3:this.$=l[d];break;case 4:this.$=l[d];break;case 5:this.$=l[d];break;case 6:this.$=l[d];break;case 7:this.$=l[d];break;case 8:this.$=l[d];break;case 9:this.$={type:"CommentStatement",value:u.stripComment(l[d]),strip:u.stripFlags(l[d],l[d]),loc:u.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:l[d],value:l[d],loc:u.locInfo(this._$)};break;case 11:this.$=u.prepareRawBlock(l[d-2],l[d-1],l[d],this._$);break;case 12:this.$={path:l[d-3],params:l[d-2],hash:l[d-1]};break;case 13:this.$=u.prepareBlock(l[d-3],l[d-2],l[d-1],l[d],!1,this._$);break;case 14:this.$=u.prepareBlock(l[d-3],l[d-2],l[d-1],l[d],!0,this._$);break;case 15:this.$={open:l[d-5],path:l[d-4],params:l[d-3],hash:l[d-2],blockParams:l[d-1],strip:u.stripFlags(l[d-5],l[d])};break;case 16:this.$={path:l[d-4],params:l[d-3],hash:l[d-2],blockParams:l[d-1],strip:u.stripFlags(l[d-5],l[d])};break;case 17:this.$={path:l[d-4],params:l[d-3],hash:l[d-2],blockParams:l[d-1],strip:u.stripFlags(l[d-5],l[d])};break;case 18:this.$={strip:u.stripFlags(l[d-1],l[d-1]),program:l[d]};break;case 19:var _=u.prepareBlock(l[d-2],l[d-1],l[d],l[d],!1,this._$),m=u.prepareProgram([_],l[d-1].loc);m.chained=!0,this.$={strip:l[d-2].strip,program:m,chain:!0};break;case 20:this.$=l[d];break;case 21:this.$={path:l[d-1],strip:u.stripFlags(l[d-2],l[d])};break;case 22:this.$=u.prepareMustache(l[d-3],l[d-2],l[d-1],l[d-4],u.stripFlags(l[d-4],l[d]),this._$);break;case 23:this.$=u.prepareMustache(l[d-3],l[d-2],l[d-1],l[d-4],u.stripFlags(l[d-4],l[d]),this._$);break;case 24:this.$={type:"PartialStatement",name:l[d-3],params:l[d-2],hash:l[d-1],indent:"",strip:u.stripFlags(l[d-4],l[d]),loc:u.locInfo(this._$)};break;case 25:this.$=u.preparePartialBlock(l[d-2],l[d-1],l[d],this._$);break;case 26:this.$={path:l[d-3],params:l[d-2],hash:l[d-1],strip:u.stripFlags(l[d-4],l[d])};break;case 27:this.$=l[d];break;case 28:this.$=l[d];break;case 29:this.$={type:"SubExpression",path:l[d-3],params:l[d-2],hash:l[d-1],loc:u.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:l[d],loc:u.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:u.id(l[d-2]),value:l[d],loc:u.locInfo(this._$)};break;case 32:this.$=u.id(l[d-1]);break;case 33:this.$=l[d];break;case 34:this.$=l[d];break;case 35:this.$={type:"StringLiteral",value:l[d],original:l[d],loc:u.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(l[d]),original:Number(l[d]),loc:u.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:l[d]==="true",original:l[d]==="true",loc:u.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:u.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:u.locInfo(this._$)};break;case 40:this.$=l[d];break;case 41:this.$=l[d];break;case 42:this.$=u.preparePath(!0,l[d],this._$);break;case 43:this.$=u.preparePath(!1,l[d],this._$);break;case 44:l[d-2].push({part:u.id(l[d]),original:l[d],separator:l[d-1]}),this.$=l[d-2];break;case 45:this.$=[{part:u.id(l[d]),original:l[d]}];break;case 46:this.$=[];break;case 47:l[d-1].push(l[d]);break;case 48:this.$=[];break;case 49:l[d-1].push(l[d]);break;case 50:this.$=[];break;case 51:l[d-1].push(l[d]);break;case 58:this.$=[];break;case 59:l[d-1].push(l[d]);break;case 64:this.$=[];break;case 65:l[d-1].push(l[d]);break;case 70:this.$=[];break;case 71:l[d-1].push(l[d]);break;case 78:this.$=[];break;case 79:l[d-1].push(l[d]);break;case 82:this.$=[];break;case 83:l[d-1].push(l[d]);break;case 86:this.$=[];break;case 87:l[d-1].push(l[d]);break;case 90:this.$=[];break;case 91:l[d-1].push(l[d]);break;case 94:this.$=[];break;case 95:l[d-1].push(l[d]);break;case 98:this.$=[l[d]];break;case 99:l[d-1].push(l[d]);break;case 100:this.$=[l[d]];break;case 101:l[d-1].push(l[d]);break}},"anonymous"),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:s(function(i,o){throw new Error(i)},"parseError"),parse:s(function(i){var o=this,a=[0],u=[null],c=[],l=this.table,f="",d=0,_=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 b=this.lexer.yylloc;c.push(b);var E=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function S(_t){a.length=a.length-2*_t,u.length=u.length-_t,c.length=c.length-_t}s(S,"popStack");function O(){var _t;return _t=o.lexer.lex()||1,typeof _t!="number"&&(_t=o.symbols_[_t]||_t),_t}s(O,"lex");for(var I,w,j,F,K,H,re={},de,te,he,Ce;;){if(j=a[a.length-1],this.defaultActions[j]?F=this.defaultActions[j]:((I===null||typeof I>"u")&&(I=O()),F=l[j]&&l[j][I]),typeof F>"u"||!F.length||!F[0]){var bt="";if(!m){Ce=[];for(de in l[j])this.terminals_[de]&&de>2&&Ce.push("'"+this.terminals_[de]+"'");this.lexer.showPosition?bt="Parse error on line "+(d+1)+`:
|
|
152
|
+
`)}return f}else throw new mu.default("The partial "+c.name+" could not be compiled when running in runtime-only mode")}s(n,"invokePartialWrapper");var i={strict:s(function(u,c,l){if(!u||!(c in u))throw new mu.default('"'+c+'" not defined in '+u,{loc:l});return i.lookupProperty(u,c)},"strict"),lookupProperty:s(function(u,c){var l=u[c];if(l==null||Object.prototype.hasOwnProperty.call(u,c)||NQ.resultIsAllowed(l,i.protoAccessControl,c))return l},"lookupProperty"),lookup:s(function(u,c){for(var l=u.length,f=0;f<l;f++){var d=u[f]&&i.lookupProperty(u[f],c);if(d!=null)return u[f][c]}},"lookup"),lambda:s(function(u,c){return typeof u=="function"?u.call(c):u},"lambda"),escapeExpression:hu.escapeExpression,invokePartial:n,fn:s(function(u){var c=e[u];return c.decorator=e[u+"_d"],c},"fn"),programs:[],program:s(function(u,c,l,f,d){var _=this.programs[u],m=this.fn(u);return c||d||f||l?_=fw(this,u,m,c,l,f,d):_||(_=this.programs[u]=fw(this,u,m)),_},"program"),data:s(function(u,c){for(;u&&c--;)u=u._parent;return u},"data"),mergeIfNeeded:s(function(u,c){var l=u||c;return u&&c&&u!==c&&(l=hu.extend({},c,u)),l},"mergeIfNeeded"),nullContext:Object.seal({}),noop:t.VM.noop,compilerInfo:e.compiler};function o(a){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],c=u.data;o._setup(u),!u.partial&&e.useData&&(c=$9e(a,c));var l=void 0,f=e.useBlockParams?[]:void 0;e.useDepths&&(u.depths?l=a!=u.depths[0]?[a].concat(u.depths):u.depths:l=[a]);function d(_){return""+e.main(i,_,i.helpers,i.partials,c,f,l)}return s(d,"main"),d=RQ(e.main,d,i,u.depths||[],c,f),d(a,u)}return s(o,"ret"),o.isTop=!0,o._setup=function(a){if(a.partial)i.protoAccessControl=a.protoAccessControl,i.helpers=a.helpers,i.partials=a.partials,i.decorators=a.decorators,i.hooks=a.hooks;else{var u=hu.extend({},t.helpers,a.helpers);D9e(u,i),i.helpers=u,e.usePartial&&(i.partials=i.mergeIfNeeded(a.partials,t.partials)),(e.usePartial||e.useDecorators)&&(i.decorators=hu.extend({},t.decorators,a.decorators)),i.hooks={},i.protoAccessControl=NQ.createProtoAccessControl(a);var c=a.allowCallsToHelperMissing||r;TQ.moveHelperToHooks(i,"helperMissing",c),TQ.moveHelperToHooks(i,"blockHelperMissing",c)}},o._child=function(a,u,c,l){if(e.useBlockParams&&!c)throw new mu.default("must pass block params");if(e.useDepths&&!l)throw new mu.default("must pass parent depths");return fw(i,a,e[a],u,0,c,l)},o}s(A9e,"template");function fw(e,t,r,n,i,o,a){function u(c){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],f=a;return a&&c!=a[0]&&!(c===e.nullContext&&a[0]===null)&&(f=[c].concat(a)),r(e,c,e.helpers,e.partials,l.data||n,o&&[l.blockParams].concat(o),f)}return s(u,"prog"),u=RQ(r,u,e,a,n,o),u.program=t,u.depth=a?a.length:0,u.blockParams=i||0,u}s(fw,"wrapProgram");function R9e(e,t,r){return e?!e.call&&!r.name&&(r.name=e,e=r.partials[e]):r.name==="@partial-block"?e=r.data["partial-block"]:e=r.partials[r.name],e}s(R9e,"resolvePartial");function C9e(e,t,r){var n=r.data&&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!==AQ&&function(){r.data=_u.createFrame(r.data);var o=r.fn;i=r.data["partial-block"]=s(function(u){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return c.data=_u.createFrame(c.data),c.data["partial-block"]=n,o(u,c)},"partialBlockWrapper"),o.partials&&(r.partials=hu.extend({},r.partials,o.partials))}(),e===void 0&&i&&(e=i),e===void 0)throw new mu.default("The partial "+r.name+" could not be found");if(e instanceof Function)return e(t,r)}s(C9e,"invokePartial");function AQ(){return""}s(AQ,"noop");function $9e(e,t){return(!t||!("root"in t))&&(t=t?_u.createFrame(t):{},t.root=e),t}s($9e,"initData");function RQ(e,t,r,n,i,o){if(e.decorator){var a={};t=e.decorator(t,a,r,n&&n[0],i,o,n),hu.extend(t,a)}return t}s(RQ,"executeDecorators");function D9e(e,t){Object.keys(e).forEach(function(r){var n=e[r];e[r]=L9e(n,t)})}s(D9e,"wrapHelpersToPassLookupProperty");function L9e(e,t){var r=t.lookupProperty;return T9e.wrapHelper(e,function(n){return hu.extend({lookupProperty:r},n)})}s(L9e,"passLookupPropertyOption")});var PU=h((dw,$Q)=>{"use strict";dw.__esModule=!0;dw.default=function(e){var t=typeof global<"u"?global:window,r=t.Handlebars;e.noConflict=function(){return t.Handlebars===e&&(t.Handlebars=r),e}};$Q.exports=dw.default});var UQ=h((pw,MQ)=>{"use strict";pw.__esModule=!0;function wU(e){return e&&e.__esModule?e:{default:e}}s(wU,"_interopRequireDefault");function TU(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}s(TU,"_interopRequireWildcard");var j9e=cw(),DQ=TU(j9e),M9e=IQ(),U9e=wU(M9e),x9e=Ss(),q9e=wU(x9e),F9e=zn(),IU=TU(F9e),k9e=CQ(),LQ=TU(k9e),B9e=PU(),G9e=wU(B9e);function jQ(){var e=new DQ.HandlebarsEnvironment;return IU.extend(e,DQ),e.SafeString=U9e.default,e.Exception=q9e.default,e.Utils=IU,e.escapeExpression=IU.escapeExpression,e.VM=LQ,e.template=function(t){return LQ.template(t,e)},e}s(jQ,"create");var I0=jQ();I0.create=jQ;G9e.default(I0);I0.default=I0;pw.default=I0;MQ.exports=pw.default});var NU=h((hw,qQ)=>{"use strict";hw.__esModule=!0;var xQ={helpers:{helperExpression:s(function(t){return t.type==="SubExpression"||(t.type==="MustacheStatement"||t.type==="BlockStatement")&&!!(t.params&&t.params.length||t.hash)},"helperExpression"),scopedId:s(function(t){return/^\.|this\b/.test(t.original)},"scopedId"),simpleId:s(function(t){return t.parts.length===1&&!xQ.helpers.scopedId(t)&&!t.depth},"simpleId")}};hw.default=xQ;qQ.exports=hw.default});var kQ=h((mw,FQ)=>{"use strict";mw.__esModule=!0;var V9e=function(){var e={trace:s(function(){},"trace"),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:s(function(i,o,a,u,c,l,f){var d=l.length-1;switch(c){case 1:return l[d-1];case 2:this.$=u.prepareProgram(l[d]);break;case 3:this.$=l[d];break;case 4:this.$=l[d];break;case 5:this.$=l[d];break;case 6:this.$=l[d];break;case 7:this.$=l[d];break;case 8:this.$=l[d];break;case 9:this.$={type:"CommentStatement",value:u.stripComment(l[d]),strip:u.stripFlags(l[d],l[d]),loc:u.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:l[d],value:l[d],loc:u.locInfo(this._$)};break;case 11:this.$=u.prepareRawBlock(l[d-2],l[d-1],l[d],this._$);break;case 12:this.$={path:l[d-3],params:l[d-2],hash:l[d-1]};break;case 13:this.$=u.prepareBlock(l[d-3],l[d-2],l[d-1],l[d],!1,this._$);break;case 14:this.$=u.prepareBlock(l[d-3],l[d-2],l[d-1],l[d],!0,this._$);break;case 15:this.$={open:l[d-5],path:l[d-4],params:l[d-3],hash:l[d-2],blockParams:l[d-1],strip:u.stripFlags(l[d-5],l[d])};break;case 16:this.$={path:l[d-4],params:l[d-3],hash:l[d-2],blockParams:l[d-1],strip:u.stripFlags(l[d-5],l[d])};break;case 17:this.$={path:l[d-4],params:l[d-3],hash:l[d-2],blockParams:l[d-1],strip:u.stripFlags(l[d-5],l[d])};break;case 18:this.$={strip:u.stripFlags(l[d-1],l[d-1]),program:l[d]};break;case 19:var _=u.prepareBlock(l[d-2],l[d-1],l[d],l[d],!1,this._$),m=u.prepareProgram([_],l[d-1].loc);m.chained=!0,this.$={strip:l[d-2].strip,program:m,chain:!0};break;case 20:this.$=l[d];break;case 21:this.$={path:l[d-1],strip:u.stripFlags(l[d-2],l[d])};break;case 22:this.$=u.prepareMustache(l[d-3],l[d-2],l[d-1],l[d-4],u.stripFlags(l[d-4],l[d]),this._$);break;case 23:this.$=u.prepareMustache(l[d-3],l[d-2],l[d-1],l[d-4],u.stripFlags(l[d-4],l[d]),this._$);break;case 24:this.$={type:"PartialStatement",name:l[d-3],params:l[d-2],hash:l[d-1],indent:"",strip:u.stripFlags(l[d-4],l[d]),loc:u.locInfo(this._$)};break;case 25:this.$=u.preparePartialBlock(l[d-2],l[d-1],l[d],this._$);break;case 26:this.$={path:l[d-3],params:l[d-2],hash:l[d-1],strip:u.stripFlags(l[d-4],l[d])};break;case 27:this.$=l[d];break;case 28:this.$=l[d];break;case 29:this.$={type:"SubExpression",path:l[d-3],params:l[d-2],hash:l[d-1],loc:u.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:l[d],loc:u.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:u.id(l[d-2]),value:l[d],loc:u.locInfo(this._$)};break;case 32:this.$=u.id(l[d-1]);break;case 33:this.$=l[d];break;case 34:this.$=l[d];break;case 35:this.$={type:"StringLiteral",value:l[d],original:l[d],loc:u.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(l[d]),original:Number(l[d]),loc:u.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:l[d]==="true",original:l[d]==="true",loc:u.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:u.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:u.locInfo(this._$)};break;case 40:this.$=l[d];break;case 41:this.$=l[d];break;case 42:this.$=u.preparePath(!0,l[d],this._$);break;case 43:this.$=u.preparePath(!1,l[d],this._$);break;case 44:l[d-2].push({part:u.id(l[d]),original:l[d],separator:l[d-1]}),this.$=l[d-2];break;case 45:this.$=[{part:u.id(l[d]),original:l[d]}];break;case 46:this.$=[];break;case 47:l[d-1].push(l[d]);break;case 48:this.$=[];break;case 49:l[d-1].push(l[d]);break;case 50:this.$=[];break;case 51:l[d-1].push(l[d]);break;case 58:this.$=[];break;case 59:l[d-1].push(l[d]);break;case 64:this.$=[];break;case 65:l[d-1].push(l[d]);break;case 70:this.$=[];break;case 71:l[d-1].push(l[d]);break;case 78:this.$=[];break;case 79:l[d-1].push(l[d]);break;case 82:this.$=[];break;case 83:l[d-1].push(l[d]);break;case 86:this.$=[];break;case 87:l[d-1].push(l[d]);break;case 90:this.$=[];break;case 91:l[d-1].push(l[d]);break;case 94:this.$=[];break;case 95:l[d-1].push(l[d]);break;case 98:this.$=[l[d]];break;case 99:l[d-1].push(l[d]);break;case 100:this.$=[l[d]];break;case 101:l[d-1].push(l[d]);break}},"anonymous"),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:s(function(i,o){throw new Error(i)},"parseError"),parse:s(function(i){var o=this,a=[0],u=[null],c=[],l=this.table,f="",d=0,_=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 b=this.lexer.yylloc;c.push(b);var E=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function v(_t){a.length=a.length-2*_t,u.length=u.length-_t,c.length=c.length-_t}s(v,"popStack");function O(){var _t;return _t=o.lexer.lex()||1,typeof _t!="number"&&(_t=o.symbols_[_t]||_t),_t}s(O,"lex");for(var I,w,j,F,K,H,re={},de,te,he,Ce;;){if(j=a[a.length-1],this.defaultActions[j]?F=this.defaultActions[j]:((I===null||typeof I>"u")&&(I=O()),F=l[j]&&l[j][I]),typeof F>"u"||!F.length||!F[0]){var bt="";if(!m){Ce=[];for(de in l[j])this.terminals_[de]&&de>2&&Ce.push("'"+this.terminals_[de]+"'");this.lexer.showPosition?bt="Parse error on line "+(d+1)+`:
|
|
153
153
|
`+this.lexer.showPosition()+`
|
|
154
154
|
Expecting `+Ce.join(", ")+", got '"+(this.terminals_[I]||I)+"'":bt="Parse error on line "+(d+1)+": Unexpected "+(I==1?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(bt,{text:this.lexer.match,token:this.terminals_[I]||I,line:this.lexer.yylineno,loc:b,expected:Ce})}}if(F[0]instanceof Array&&F.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+I);switch(F[0]){case 1:a.push(I),u.push(this.lexer.yytext),c.push(this.lexer.yylloc),a.push(F[1]),I=null,w?(I=w,w=null):(_=this.lexer.yyleng,f=this.lexer.yytext,d=this.lexer.yylineno,b=this.lexer.yylloc,m>0&&m--);break;case 2:if(te=this.productions_[F[1]][1],re.$=u[u.length-te],re._$={first_line:c[c.length-(te||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(te||1)].first_column,last_column:c[c.length-1].last_column},E&&(re._$.range=[c[c.length-(te||1)].range[0],c[c.length-1].range[1]]),H=this.performAction.call(re,f,_,d,this.yy,F[1],u,c),typeof H<"u")return H;te&&(a=a.slice(0,-1*te*2),u=u.slice(0,-1*te),c=c.slice(0,-1*te)),a.push(this.productions_[F[1]][0]),u.push(re.$),c.push(re._$),he=l[a[a.length-2]][a[a.length-1]],a.push(he);break;case 3:return!0}}return!0},"parse")},t=function(){var n={EOF:1,parseError:s(function(o,a){if(this.yy.parser)this.yy.parser.parseError(o,a);else throw new Error(o)},"parseError"),setInput:s(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},"setInput"),input:s(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var a=o.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:s(function(o){var a=o.length,u=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a-1),this.offset-=a;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var l=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===c.length?this.yylloc.first_column:0)+c[c.length-u.length].length-u[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[l[0],l[0]+this.yyleng-a]),this},"unput"),more:s(function(){return this._more=!0,this},"more"),less:s(function(o){this.unput(this.match.slice(o))},"less"),pastInput:s(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(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,"")},"upcomingInput"),showPosition:s(function(){var o=this.pastInput(),a=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
155
155
|
`+a+"^"},"showPosition"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,a,u,c,l,f;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),_=0;_<d.length&&(u=this._input.match(this.rules[d[_]]),!(u&&(!a||u[0].length>a[0].length)&&(a=u,c=_,!this.options.flex)));_++);return a?(f=a[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+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],o=this.performAction.call(this,this.yy,this,d[c],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
156
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var o=this.next();return typeof o<"u"?o:this.lex()},"lex"),begin:s(function(o){this.conditionStack.push(o)},"begin"),popState:s(function(){return this.conditionStack.pop()},"popState"),_currentRules:s(function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},"_currentRules"),topState:s(function(){return this.conditionStack[this.conditionStack.length-2]},"topState"),pushState:s(function(o){this.begin(o)},"begin")};return n.options={},n.performAction=s(function(o,a,u,c){function l(d,_){return a.yytext=a.yytext.substring(d,a.yyleng-_+d)}s(l,"strip");var f=c;switch(u){case 0:if(a.yytext.slice(-2)==="\\\\"?(l(0,1),this.begin("mu")):a.yytext.slice(-1)==="\\"?(l(0,1),this.begin("emu")):this.begin("mu"),a.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(l(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(a.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 a.yytext=l(1,2).replace(/\\"/g,'"'),80;break;case 32:return a.yytext=l(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return a.yytext=a.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},"anonymous"),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}();e.lexer=t;function r(){this.yy={}}return s(r,"Parser"),r.prototype=e,e.Parser=r,new r}();mw.default=V9e;FQ.exports=mw.default});var Ew=h((yw,VQ)=>{"use strict";yw.__esModule=!0;function z9e(e){return e&&e.__esModule?e:{default:e}}s(z9e,"_interopRequireDefault");var H9e=Ss(),AU=z9e(H9e);function _w(){this.parents=[]}s(_w,"Visitor");_w.prototype={constructor:_w,mutating:!1,acceptKey:s(function(t,r){var n=this.accept(t[r]);if(this.mutating){if(n&&!_w.prototype[n.type])throw new AU.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+t.type);t[r]=n}},"acceptKey"),acceptRequired:s(function(t,r){if(this.acceptKey(t,r),!t[r])throw new AU.default(t.type+" requires "+r)},"acceptRequired"),acceptArray:s(function(t){for(var r=0,n=t.length;r<n;r++)this.acceptKey(t,r),t[r]||(t.splice(r,1),r--,n--)},"acceptArray"),accept:s(function(t){if(t){if(!this[t.type])throw new AU.default("Unknown type: "+t.type,t);this.current&&this.parents.unshift(this.current),this.current=t;var r=this[t.type](t);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return t}},"accept"),Program:s(function(t){this.acceptArray(t.body)},"Program"),MustacheStatement:gw,Decorator:gw,BlockStatement:BQ,DecoratorBlock:BQ,PartialStatement:GQ,PartialBlockStatement:s(function(t){GQ.call(this,t),this.acceptKey(t,"program")},"PartialBlockStatement"),ContentStatement:s(function(){},"ContentStatement"),CommentStatement:s(function(){},"CommentStatement"),SubExpression:gw,PathExpression:s(function(){},"PathExpression"),StringLiteral:s(function(){},"StringLiteral"),NumberLiteral:s(function(){},"NumberLiteral"),BooleanLiteral:s(function(){},"BooleanLiteral"),UndefinedLiteral:s(function(){},"UndefinedLiteral"),NullLiteral:s(function(){},"NullLiteral"),Hash:s(function(t){this.acceptArray(t.pairs)},"Hash"),HashPair:s(function(t){this.acceptRequired(t,"value")},"HashPair")};function gw(e){this.acceptRequired(e,"path"),this.acceptArray(e.params),this.acceptKey(e,"hash")}s(gw,"visitSubExpression");function BQ(e){gw.call(this,e),this.acceptKey(e,"program"),this.acceptKey(e,"inverse")}s(BQ,"visitBlock");function GQ(e){this.acceptRequired(e,"name"),this.acceptArray(e.params),this.acceptKey(e,"hash")}s(GQ,"visitPartial");yw.default=_w;VQ.exports=yw.default});var HQ=h((bw,zQ)=>{"use strict";bw.__esModule=!0;function K9e(e){return e&&e.__esModule?e:{default:e}}s(K9e,"_interopRequireDefault");var W9e=Ew(),Y9e=K9e(W9e);function fa(){var e=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=e}s(fa,"WhitespaceControl");fa.prototype=new Y9e.default;fa.prototype.Program=function(e){var t=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var n=e.body,i=0,o=n.length;i<o;i++){var a=n[i],u=this.accept(a);if(u){var c=RU(n,i,r),l=CU(n,i,r),f=u.openStandalone&&c,d=u.closeStandalone&&l,_=u.inlineStandalone&&c&&l;u.close&&_d(n,i,!0),u.open&&$c(n,i,!0),t&&_&&(_d(n,i),$c(n,i)&&a.type==="PartialStatement"&&(a.indent=/([ \t]+$)/.exec(n[i-1].original)[1])),t&&f&&(_d((a.program||a.inverse).body),$c(n,i)),t&&d&&(_d(n,i),$c((a.inverse||a.program).body))}}return e};fa.prototype.BlockStatement=fa.prototype.DecoratorBlock=fa.prototype.PartialBlockStatement=function(e){this.accept(e.program),this.accept(e.inverse);var t=e.program||e.inverse,r=e.program&&e.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:e.openStrip.open,close:e.closeStrip.close,openStandalone:CU(t.body),closeStandalone:RU((n||t).body)};if(e.openStrip.close&&_d(t.body,null,!0),r){var a=e.inverseStrip;a.open&&$c(t.body,null,!0),a.close&&_d(n.body,null,!0),e.closeStrip.open&&$c(i.body,null,!0),!this.options.ignoreStandalone&&RU(t.body)&&CU(n.body)&&($c(t.body),_d(n.body))}else e.closeStrip.open&&$c(t.body,null,!0);return o};fa.prototype.Decorator=fa.prototype.MustacheStatement=function(e){return e.strip};fa.prototype.PartialStatement=fa.prototype.CommentStatement=function(e){var t=e.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close}};function RU(e,t,r){t===void 0&&(t=e.length);var n=e[t-1],i=e[t-2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original)}s(RU,"isPrevWhitespace");function CU(e,t,r){t===void 0&&(t=-1);var n=e[t+1],i=e[t+2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original)}s(CU,"isNextWhitespace");function _d(e,t,r){var n=e[t==null?0:t+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}}s(_d,"omitRight");function $c(e,t,r){var n=e[t==null?e.length-1:t-1];if(!(!n||n.type!=="ContentStatement"||!r&&n.leftStripped)){var i=n.value;return n.value=n.value.replace(r?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==i,n.leftStripped}}s($c,"omitLeft");bw.default=fa;zQ.exports=bw.default});var KQ=h(vs=>{"use strict";vs.__esModule=!0;vs.SourceLocation=Q9e;vs.id=Z9e;vs.stripFlags=e7e;vs.stripComment=t7e;vs.preparePath=r7e;vs.prepareMustache=n7e;vs.prepareRawBlock=i7e;vs.prepareBlock=s7e;vs.prepareProgram=o7e;vs.preparePartialBlock=a7e;function J9e(e){return e&&e.__esModule?e:{default:e}}s(J9e,"_interopRequireDefault");var X9e=Ss(),$U=J9e(X9e);function DU(e,t){if(t=t.path?t.path.original:t,e.path.original!==t){var r={loc:e.path.loc};throw new $U.default(e.path.original+" doesn't match "+t,r)}}s(DU,"validateClose");function Q9e(e,t){this.source=e,this.start={line:t.first_line,column:t.first_column},this.end={line:t.last_line,column:t.last_column}}s(Q9e,"SourceLocation");function Z9e(e){return/^\[.*\]$/.test(e)?e.substring(1,e.length-1):e}s(Z9e,"id");function e7e(e,t){return{open:e.charAt(2)==="~",close:t.charAt(t.length-3)==="~"}}s(e7e,"stripFlags");function t7e(e){return e.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}s(t7e,"stripComment");function r7e(e,t,r){r=this.locInfo(r);for(var n=e?"@":"",i=[],o=0,a=0,u=t.length;a<u;a++){var c=t[a].part,l=t[a].original!==c;if(n+=(t[a].separator||"")+c,!l&&(c===".."||c==="."||c==="this")){if(i.length>0)throw new $U.default("Invalid path: "+n,{loc:r});c===".."&&o++}else i.push(c)}return{type:"PathExpression",data:e,depth:o,parts:i,original:n,loc:r}}s(r7e,"preparePath");function n7e(e,t,r,n,i,o){var a=n.charAt(3)||n.charAt(2),u=a!=="{"&&a!=="&",c=/\*/.test(n);return{type:c?"Decorator":"MustacheStatement",path:e,params:t,hash:r,escaped:u,strip:i,loc:this.locInfo(o)}}s(n7e,"prepareMustache");function i7e(e,t,r,n){DU(e,r),n=this.locInfo(n);var i={type:"Program",body:t,strip:{},loc:n};return{type:"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}}s(i7e,"prepareRawBlock");function s7e(e,t,r,n,i,o){n&&n.path&&DU(e,n);var a=/\*/.test(e.open);t.blockParams=e.blockParams;var u=void 0,c=void 0;if(r){if(a)throw new $U.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),c=r.strip,u=r.program}return i&&(i=u,u=t,t=i),{type:a?"DecoratorBlock":"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:t,inverse:u,openStrip:e.strip,inverseStrip:c,closeStrip:n&&n.strip,loc:this.locInfo(o)}}s(s7e,"prepareBlock");function o7e(e,t){if(!t&&e.length){var r=e[0].loc,n=e[e.length-1].loc;r&&n&&(t={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:e,strip:{},loc:t}}s(o7e,"prepareProgram");function a7e(e,t,r,n){return DU(e,r),{type:"PartialBlockStatement",name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:r&&r.strip,loc:this.locInfo(n)}}s(a7e,"preparePartialBlock")});var JQ=h(w0=>{"use strict";w0.__esModule=!0;w0.parseWithoutProcessing=YQ;w0.parse=m7e;function u7e(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}s(u7e,"_interopRequireWildcard");function WQ(e){return e&&e.__esModule?e:{default:e}}s(WQ,"_interopRequireDefault");var c7e=kQ(),LU=WQ(c7e),l7e=HQ(),f7e=WQ(l7e),d7e=KQ(),p7e=u7e(d7e),h7e=zn();w0.parser=LU.default;var Sw={};h7e.extend(Sw,p7e);function YQ(e,t){if(e.type==="Program")return e;LU.default.yy=Sw,Sw.locInfo=function(n){return new Sw.SourceLocation(t&&t.srcName,n)};var r=LU.default.parse(e);return r}s(YQ,"parseWithoutProcessing");function m7e(e,t){var r=YQ(e,t),n=new f7e.default(t);return n.accept(r)}s(m7e,"parse")});var eZ=h(R0=>{"use strict";R0.__esModule=!0;R0.Compiler=jU;R0.precompile=E7e;R0.compile=b7e;function QQ(e){return e&&e.__esModule?e:{default:e}}s(QQ,"_interopRequireDefault");var _7e=Ss(),N0=QQ(_7e),A0=zn(),g7e=NU(),T0=QQ(g7e),y7e=[].slice;function jU(){}s(jU,"Compiler");jU.prototype={compiler:jU,equals:s(function(t){var r=this.opcodes.length;if(t.opcodes.length!==r)return!1;for(var n=0;n<r;n++){var i=this.opcodes[n],o=t.opcodes[n];if(i.opcode!==o.opcode||!ZQ(i.args,o.args))return!1}r=this.children.length;for(var n=0;n<r;n++)if(!this.children[n].equals(t.children[n]))return!1;return!0},"equals"),guid:0,compile:s(function(t,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=A0.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},r.knownHelpers),this.accept(t)},"compile"),compileProgram:s(function(t){var r=new this.compiler,n=r.compile(t,this.options),i=this.guid++;return this.usePartial=this.usePartial||n.usePartial,this.children[i]=n,this.useDepths=this.useDepths||n.useDepths,i},"compileProgram"),accept:s(function(t){if(!this[t.type])throw new N0.default("Unknown type: "+t.type,t);this.sourceNode.unshift(t);var r=this[t.type](t);return this.sourceNode.shift(),r},"accept"),Program:s(function(t){this.options.blockParams.unshift(t.blockParams);for(var r=t.body,n=r.length,i=0;i<n;i++)this.accept(r[i]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=t.blockParams?t.blockParams.length:0,this},"Program"),BlockStatement:s(function(t){XQ(t);var r=t.program,n=t.inverse;r=r&&this.compileProgram(r),n=n&&this.compileProgram(n);var i=this.classifySexpr(t);i==="helper"?this.helperSexpr(t,r,n):i==="simple"?(this.simpleSexpr(t),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",t.path.original)):(this.ambiguousSexpr(t,r,n),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},"BlockStatement"),DecoratorBlock:s(function(t){var r=t.program&&this.compileProgram(t.program),n=this.setupFullMustacheParams(t,r,void 0),i=t.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,i.original)},"DecoratorBlock"),PartialStatement:s(function(t){this.usePartial=!0;var r=t.program;r&&(r=this.compileProgram(t.program));var n=t.params;if(n.length>1)throw new N0.default("Unsupported number of partial arguments: "+n.length,t);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var i=t.name.original,o=t.name.type==="SubExpression";o&&this.accept(t.name),this.setupFullMustacheParams(t,r,void 0,!0);var a=t.indent||"";this.options.preventIndent&&a&&(this.opcode("appendContent",a),a=""),this.opcode("invokePartial",o,i,a),this.opcode("append")},"PartialStatement"),PartialBlockStatement:s(function(t){this.PartialStatement(t)},"PartialBlockStatement"),MustacheStatement:s(function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},"MustacheStatement"),Decorator:s(function(t){this.DecoratorBlock(t)},"Decorator"),ContentStatement:s(function(t){t.value&&this.opcode("appendContent",t.value)},"ContentStatement"),CommentStatement:s(function(){},"CommentStatement"),SubExpression:s(function(t){XQ(t);var r=this.classifySexpr(t);r==="simple"?this.simpleSexpr(t):r==="helper"?this.helperSexpr(t):this.ambiguousSexpr(t)},"SubExpression"),ambiguousSexpr:s(function(t,r,n){var i=t.path,o=i.parts[0],a=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,a)},"ambiguousSexpr"),simpleSexpr:s(function(t){var r=t.path;r.strict=!0,this.accept(r),this.opcode("resolvePossibleLambda")},"simpleSexpr"),helperSexpr:s(function(t,r,n){var i=this.setupFullMustacheParams(t,r,n),o=t.path,a=o.parts[0];if(this.options.knownHelpers[a])this.opcode("invokeKnownHelper",i.length,a);else{if(this.options.knownHelpersOnly)throw new N0.default("You specified knownHelpersOnly, but used the unknown helper "+a,t);o.strict=!0,o.falsy=!0,this.accept(o),this.opcode("invokeHelper",i.length,o.original,T0.default.helpers.simpleId(o))}},"helperSexpr"),PathExpression:s(function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var r=t.parts[0],n=T0.default.helpers.scopedId(t),i=!t.depth&&!n&&this.blockParamIndex(r);i?this.opcode("lookupBlockParam",i,t.parts):r?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,n):this.opcode("pushContext")},"PathExpression"),StringLiteral:s(function(t){this.opcode("pushString",t.value)},"StringLiteral"),NumberLiteral:s(function(t){this.opcode("pushLiteral",t.value)},"NumberLiteral"),BooleanLiteral:s(function(t){this.opcode("pushLiteral",t.value)},"BooleanLiteral"),UndefinedLiteral:s(function(){this.opcode("pushLiteral","undefined")},"UndefinedLiteral"),NullLiteral:s(function(){this.opcode("pushLiteral","null")},"NullLiteral"),Hash:s(function(t){var r=t.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")},"Hash"),opcode:s(function(t){this.opcodes.push({opcode:t,args:y7e.call(arguments,1),loc:this.sourceNode[0].loc})},"opcode"),addDepth:s(function(t){t&&(this.useDepths=!0)},"addDepth"),classifySexpr:s(function(t){var r=T0.default.helpers.simpleId(t.path),n=r&&!!this.blockParamIndex(t.path.parts[0]),i=!n&&T0.default.helpers.helperExpression(t),o=!n&&(i||r);if(o&&!i){var a=t.path.parts[0],u=this.options;u.knownHelpers[a]?i=!0:u.knownHelpersOnly&&(o=!1)}return i?"helper":o?"ambiguous":"simple"},"classifySexpr"),pushParams:s(function(t){for(var r=0,n=t.length;r<n;r++)this.pushParam(t[r])},"pushParams"),pushParam:s(function(t){var r=t.value!=null?t.value:t.original||"";if(this.stringParams)r.replace&&(r=r.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),t.depth&&this.addDepth(t.depth),this.opcode("getContext",t.depth||0),this.opcode("pushStringParam",r,t.type),t.type==="SubExpression"&&this.accept(t);else{if(this.trackIds){var n=void 0;if(t.parts&&!T0.default.helpers.scopedId(t)&&!t.depth&&(n=this.blockParamIndex(t.parts[0])),n){var i=t.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,i)}else r=t.original||r,r.replace&&(r=r.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",t.type,r)}this.accept(t)}},"pushParam"),setupFullMustacheParams:s(function(t,r,n,i){var o=t.params;return this.pushParams(o),this.opcode("pushProgram",r),this.opcode("pushProgram",n),t.hash?this.accept(t.hash):this.opcode("emptyHash",i),o},"setupFullMustacheParams"),blockParamIndex:s(function(t){for(var r=0,n=this.options.blockParams.length;r<n;r++){var i=this.options.blockParams[r],o=i&&A0.indexOf(i,t);if(i&&o>=0)return[r,o]}},"blockParamIndex")};function E7e(e,t,r){if(e==null||typeof e!="string"&&e.type!=="Program")throw new N0.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+e);t=t||{},"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var n=r.parse(e,t),i=new r.Compiler().compile(n,t);return new r.JavaScriptCompiler().compile(i,t)}s(E7e,"precompile");function b7e(e,t,r){if(t===void 0&&(t={}),e==null||typeof e!="string"&&e.type!=="Program")throw new N0.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+e);t=A0.extend({},t),"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var n=void 0;function i(){var a=r.parse(e,t),u=new r.Compiler().compile(a,t),c=new r.JavaScriptCompiler().compile(u,t,void 0,!0);return r.template(c)}s(i,"compileInput");function o(a,u){return n||(n=i()),n.call(this,a,u)}return s(o,"ret"),o._setup=function(a){return n||(n=i()),n._setup(a)},o._child=function(a,u,c,l){return n||(n=i()),n._child(a,u,c,l)},o}s(b7e,"compile");function ZQ(e,t){if(e===t)return!0;if(A0.isArray(e)&&A0.isArray(t)&&e.length===t.length){for(var r=0;r<e.length;r++)if(!ZQ(e[r],t[r]))return!1;return!0}}s(ZQ,"argEquals");function XQ(e){if(!e.path.parts){var t=e.path;e.path={type:"PathExpression",data:!1,depth:0,parts:[t.original+""],original:t.original+"",loc:t.loc}}}s(XQ,"transformLiteralToPath")});var rZ=h(MU=>{var tZ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");MU.encode=function(e){if(0<=e&&e<tZ.length)return tZ[e];throw new TypeError("Must be between 0 and 63: "+e)};MU.decode=function(e){var t=65,r=90,n=97,i=122,o=48,a=57,u=43,c=47,l=26,f=52;return t<=e&&e<=r?e-t:n<=e&&e<=i?e-n+l:o<=e&&e<=a?e-o+f:e==u?62:e==c?63:-1}});var qU=h(xU=>{var nZ=rZ(),UU=5,iZ=1<<UU,sZ=iZ-1,oZ=iZ;function S7e(e){return e<0?(-e<<1)+1:(e<<1)+0}s(S7e,"toVLQSigned");function v7e(e){var t=(e&1)===1,r=e>>1;return t?-r:r}s(v7e,"fromVLQSigned");xU.encode=s(function(t){var r="",n,i=S7e(t);do n=i&sZ,i>>>=UU,i>0&&(n|=oZ),r+=nZ.encode(n);while(i>0);return r},"base64VLQ_encode");xU.decode=s(function(t,r,n){var i=t.length,o=0,a=0,u,c;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=nZ.decode(t.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));u=!!(c&oZ),c&=sZ,o=o+(c<<a),a+=UU}while(u);n.value=v7e(o),n.rest=r},"base64VLQ_decode")});var um=h(In=>{function O7e(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}s(O7e,"getArg");In.getArg=O7e;var aZ=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,P7e=/^data:.+\,.+$/;function C0(e){var t=e.match(aZ);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}s(C0,"urlParse");In.urlParse=C0;function om(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}s(om,"urlGenerate");In.urlGenerate=om;function FU(e){var t=e,r=C0(e);if(r){if(!r.path)return e;t=r.path}for(var n=In.isAbsolute(t),i=t.split(/\/+/),o,a=0,u=i.length-1;u>=0;u--)o=i[u],o==="."?i.splice(u,1):o===".."?a++:a>0&&(o===""?(i.splice(u+1,a),a=0):(i.splice(u,2),a--));return t=i.join("/"),t===""&&(t=n?"/":"."),r?(r.path=t,om(r)):t}s(FU,"normalize");In.normalize=FU;function uZ(e,t){e===""&&(e="."),t===""&&(t=".");var r=C0(t),n=C0(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),om(r);if(r||t.match(P7e))return t;if(n&&!n.host&&!n.path)return n.host=t,om(n);var i=t.charAt(0)==="/"?t:FU(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=i,om(n)):i}s(uZ,"join");In.join=uZ;In.isAbsolute=function(e){return e.charAt(0)==="/"||aZ.test(e)};function I7e(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var r=0;t.indexOf(e+"/")!==0;){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/)))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}s(I7e,"relative");In.relative=I7e;var cZ=function(){var e=Object.create(null);return!("__proto__"in e)}();function lZ(e){return e}s(lZ,"identity");function w7e(e){return fZ(e)?"$"+e:e}s(w7e,"toSetString");In.toSetString=cZ?lZ:w7e;function T7e(e){return fZ(e)?e.slice(1):e}s(T7e,"fromSetString");In.fromSetString=cZ?lZ:T7e;function fZ(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var r=t-10;r>=0;r--)if(e.charCodeAt(r)!==36)return!1;return!0}s(fZ,"isProtoString");function N7e(e,t,r){var n=am(e.source,t.source);return n!==0||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:am(e.name,t.name)}s(N7e,"compareByOriginalPositions");In.compareByOriginalPositions=N7e;function A7e(e,t,r){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0||r)||(n=am(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:am(e.name,t.name)}s(A7e,"compareByGeneratedPositionsDeflated");In.compareByGeneratedPositionsDeflated=A7e;function am(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}s(am,"strcmp");function R7e(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=am(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:am(e.name,t.name)}s(R7e,"compareByGeneratedPositionsInflated");In.compareByGeneratedPositionsInflated=R7e;function C7e(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}s(C7e,"parseSourceMapInput");In.parseSourceMapInput=C7e;function $7e(e,t,r){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),r){var n=C0(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))}t=uZ(om(n),t)}return FU(t)}s($7e,"computeSourceURL");In.computeSourceURL=$7e});var GU=h(dZ=>{var kU=um(),BU=Object.prototype.hasOwnProperty,gd=typeof Map<"u";function gu(){this._array=[],this._set=gd?new Map:Object.create(null)}s(gu,"ArraySet");gu.fromArray=s(function(t,r){for(var n=new gu,i=0,o=t.length;i<o;i++)n.add(t[i],r);return n},"ArraySet_fromArray");gu.prototype.size=s(function(){return gd?this._set.size:Object.getOwnPropertyNames(this._set).length},"ArraySet_size");gu.prototype.add=s(function(t,r){var n=gd?t:kU.toSetString(t),i=gd?this.has(t):BU.call(this._set,n),o=this._array.length;(!i||r)&&this._array.push(t),i||(gd?this._set.set(t,o):this._set[n]=o)},"ArraySet_add");gu.prototype.has=s(function(t){if(gd)return this._set.has(t);var r=kU.toSetString(t);return BU.call(this._set,r)},"ArraySet_has");gu.prototype.indexOf=s(function(t){if(gd){var r=this._set.get(t);if(r>=0)return r}else{var n=kU.toSetString(t);if(BU.call(this._set,n))return this._set[n]}throw new Error('"'+t+'" is not in the set.')},"ArraySet_indexOf");gu.prototype.at=s(function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)},"ArraySet_at");gu.prototype.toArray=s(function(){return this._array.slice()},"ArraySet_toArray");dZ.ArraySet=gu});var mZ=h(hZ=>{var pZ=um();function D7e(e,t){var r=e.generatedLine,n=t.generatedLine,i=e.generatedColumn,o=t.generatedColumn;return n>r||n==r&&o>=i||pZ.compareByGeneratedPositionsInflated(e,t)<=0}s(D7e,"generatedPositionAfter");function vw(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}s(vw,"MappingList");vw.prototype.unsortedForEach=s(function(t,r){this._array.forEach(t,r)},"MappingList_forEach");vw.prototype.add=s(function(t){D7e(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))},"MappingList_add");vw.prototype.toArray=s(function(){return this._sorted||(this._array.sort(pZ.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},"MappingList_toArray");hZ.MappingList=vw});var VU=h(_Z=>{var $0=qU(),Ar=um(),Ow=GU().ArraySet,L7e=mZ().MappingList;function Os(e){e||(e={}),this._file=Ar.getArg(e,"file",null),this._sourceRoot=Ar.getArg(e,"sourceRoot",null),this._skipValidation=Ar.getArg(e,"skipValidation",!1),this._sources=new Ow,this._names=new Ow,this._mappings=new L7e,this._sourcesContents=null}s(Os,"SourceMapGenerator");Os.prototype._version=3;Os.fromSourceMap=s(function(t){var r=t.sourceRoot,n=new Os({file:t.file,sourceRoot:r});return t.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,r!=null&&(o.source=Ar.relative(r,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),n.addMapping(o)}),t.sources.forEach(function(i){var o=i;r!==null&&(o=Ar.relative(r,i)),n._sources.has(o)||n._sources.add(o);var a=t.sourceContentFor(i);a!=null&&n.setSourceContent(i,a)}),n},"SourceMapGenerator_fromSourceMap");Os.prototype.addMapping=s(function(t){var r=Ar.getArg(t,"generated"),n=Ar.getArg(t,"original",null),i=Ar.getArg(t,"source",null),o=Ar.getArg(t,"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})},"SourceMapGenerator_addMapping");Os.prototype.setSourceContent=s(function(t,r){var n=t;this._sourceRoot!=null&&(n=Ar.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Ar.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Ar.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},"SourceMapGenerator_setSourceContent");Os.prototype.applySourceMap=s(function(t,r,n){var i=r;if(r==null){if(t.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=t.file}var o=this._sourceRoot;o!=null&&(i=Ar.relative(o,i));var a=new Ow,u=new Ow;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var l=t.originalPositionFor({line:c.originalLine,column:c.originalColumn});l.source!=null&&(c.source=l.source,n!=null&&(c.source=Ar.join(n,c.source)),o!=null&&(c.source=Ar.relative(o,c.source)),c.originalLine=l.line,c.originalColumn=l.column,l.name!=null&&(c.name=l.name))}var f=c.source;f!=null&&!a.has(f)&&a.add(f);var d=c.name;d!=null&&!u.has(d)&&u.add(d)},this),this._sources=a,this._names=u,t.sources.forEach(function(c){var l=t.sourceContentFor(c);l!=null&&(n!=null&&(c=Ar.join(n,c)),o!=null&&(c=Ar.relative(o,c)),this.setSourceContent(c,l))},this)},"SourceMapGenerator_applySourceMap");Os.prototype._validateMapping=s(function(t,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(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!r&&!n&&!i)){if(t&&"line"in t&&"column"in t&&r&&"line"in r&&"column"in r&&t.line>0&&t.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:i}))}},"SourceMapGenerator_validateMapping");Os.prototype._serializeMappings=s(function(){for(var t=0,r=1,n=0,i=0,o=0,a=0,u="",c,l,f,d,_=this._mappings.toArray(),m=0,g=_.length;m<g;m++){if(l=_[m],c="",l.generatedLine!==r)for(t=0;l.generatedLine!==r;)c+=";",r++;else if(m>0){if(!Ar.compareByGeneratedPositionsInflated(l,_[m-1]))continue;c+=","}c+=$0.encode(l.generatedColumn-t),t=l.generatedColumn,l.source!=null&&(d=this._sources.indexOf(l.source),c+=$0.encode(d-a),a=d,c+=$0.encode(l.originalLine-1-i),i=l.originalLine-1,c+=$0.encode(l.originalColumn-n),n=l.originalColumn,l.name!=null&&(f=this._names.indexOf(l.name),c+=$0.encode(f-o),o=f)),u+=c}return u},"SourceMapGenerator_serializeMappings");Os.prototype._generateSourcesContent=s(function(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Ar.relative(r,n));var i=Ar.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)},"SourceMapGenerator_generateSourcesContent");Os.prototype.toJSON=s(function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t},"SourceMapGenerator_toJSON");Os.prototype.toString=s(function(){return JSON.stringify(this.toJSON())},"SourceMapGenerator_toString");_Z.SourceMapGenerator=Os});var gZ=h(yd=>{yd.GREATEST_LOWER_BOUND=1;yd.LEAST_UPPER_BOUND=2;function zU(e,t,r,n,i,o){var a=Math.floor((t-e)/2)+e,u=i(r,n[a],!0);return u===0?a:u>0?t-a>1?zU(a,t,r,n,i,o):o==yd.LEAST_UPPER_BOUND?t<n.length?t:-1:a:a-e>1?zU(e,a,r,n,i,o):o==yd.LEAST_UPPER_BOUND?a:e<0?-1:e}s(zU,"recursiveSearch");yd.search=s(function(t,r,n,i){if(r.length===0)return-1;var o=zU(-1,r.length,t,r,n,i||yd.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&n(r[o],r[o-1],!0)===0;)--o;return o},"search")});var EZ=h(yZ=>{function HU(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}s(HU,"swap");function j7e(e,t){return Math.round(e+Math.random()*(t-e))}s(j7e,"randomIntInRange");function KU(e,t,r,n){if(r<n){var i=j7e(r,n),o=r-1;HU(e,i,n);for(var a=e[n],u=r;u<n;u++)t(e[u],a)<=0&&(o+=1,HU(e,o,u));HU(e,o+1,u);var c=o+1;KU(e,t,r,c-1),KU(e,t,c+1,n)}}s(KU,"doQuickSort");yZ.quickSort=function(e,t){KU(e,t,0,e.length-1)}});var SZ=h(Pw=>{var se=um(),WU=gZ(),cm=GU().ArraySet,M7e=qU(),D0=EZ().quickSort;function Vt(e,t){var r=e;return typeof e=="string"&&(r=se.parseSourceMapInput(e)),r.sections!=null?new _o(r,t):new nn(r,t)}s(Vt,"SourceMapConsumer");Vt.fromSourceMap=function(e,t){return nn.fromSourceMap(e,t)};Vt.prototype._version=3;Vt.prototype.__generatedMappings=null;Object.defineProperty(Vt.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});Vt.prototype.__originalMappings=null;Object.defineProperty(Vt.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});Vt.prototype._charIsMappingSeparator=s(function(t,r){var n=t.charAt(r);return n===";"||n===","},"SourceMapConsumer_charIsMappingSeparator");Vt.prototype._parseMappings=s(function(t,r){throw new Error("Subclasses must implement _parseMappings")},"SourceMapConsumer_parseMappings");Vt.GENERATED_ORDER=1;Vt.ORIGINAL_ORDER=2;Vt.GREATEST_LOWER_BOUND=1;Vt.LEAST_UPPER_BOUND=2;Vt.prototype.eachMapping=s(function(t,r,n){var i=r||null,o=n||Vt.GENERATED_ORDER,a;switch(o){case Vt.GENERATED_ORDER:a=this._generatedMappings;break;case Vt.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;a.map(function(c){var l=c.source===null?null:this._sources.at(c.source);return l=se.computeSourceURL(u,l,this._sourceMapURL),{source:l,generatedLine:c.generatedLine,generatedColumn:c.generatedColumn,originalLine:c.originalLine,originalColumn:c.originalColumn,name:c.name===null?null:this._names.at(c.name)}},this).forEach(t,i)},"SourceMapConsumer_eachMapping");Vt.prototype.allGeneratedPositionsFor=s(function(t){var r=se.getArg(t,"line"),n={source:se.getArg(t,"source"),originalLine:r,originalColumn:se.getArg(t,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",se.compareByOriginalPositions,WU.LEAST_UPPER_BOUND);if(o>=0){var a=this._originalMappings[o];if(t.column===void 0)for(var u=a.originalLine;a&&a.originalLine===u;)i.push({line:se.getArg(a,"generatedLine",null),column:se.getArg(a,"generatedColumn",null),lastColumn:se.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++o];else for(var c=a.originalColumn;a&&a.originalLine===r&&a.originalColumn==c;)i.push({line:se.getArg(a,"generatedLine",null),column:se.getArg(a,"generatedColumn",null),lastColumn:se.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++o]}return i},"SourceMapConsumer_allGeneratedPositionsFor");Pw.SourceMapConsumer=Vt;function nn(e,t){var r=e;typeof e=="string"&&(r=se.parseSourceMapInput(e));var n=se.getArg(r,"version"),i=se.getArg(r,"sources"),o=se.getArg(r,"names",[]),a=se.getArg(r,"sourceRoot",null),u=se.getArg(r,"sourcesContent",null),c=se.getArg(r,"mappings"),l=se.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);a&&(a=se.normalize(a)),i=i.map(String).map(se.normalize).map(function(f){return a&&se.isAbsolute(a)&&se.isAbsolute(f)?se.relative(a,f):f}),this._names=cm.fromArray(o.map(String),!0),this._sources=cm.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(f){return se.computeSourceURL(a,f,t)}),this.sourceRoot=a,this.sourcesContent=u,this._mappings=c,this._sourceMapURL=t,this.file=l}s(nn,"BasicSourceMapConsumer");nn.prototype=Object.create(Vt.prototype);nn.prototype.consumer=Vt;nn.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null&&(t=se.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1};nn.fromSourceMap=s(function(t,r){var n=Object.create(nn.prototype),i=n._names=cm.fromArray(t._names.toArray(),!0),o=n._sources=cm.fromArray(t._sources.toArray(),!0);n.sourceRoot=t._sourceRoot,n.sourcesContent=t._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=t._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(m){return se.computeSourceURL(n.sourceRoot,m,r)});for(var a=t._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],l=0,f=a.length;l<f;l++){var d=a[l],_=new bZ;_.generatedLine=d.generatedLine,_.generatedColumn=d.generatedColumn,d.source&&(_.source=o.indexOf(d.source),_.originalLine=d.originalLine,_.originalColumn=d.originalColumn,d.name&&(_.name=i.indexOf(d.name)),c.push(_)),u.push(_)}return D0(n.__originalMappings,se.compareByOriginalPositions),n},"SourceMapConsumer_fromSourceMap");nn.prototype._version=3;Object.defineProperty(nn.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function bZ(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}s(bZ,"Mapping");nn.prototype._parseMappings=s(function(t,r){for(var n=1,i=0,o=0,a=0,u=0,c=0,l=t.length,f=0,d={},_={},m=[],g=[],y,b,E,S,O;f<l;)if(t.charAt(f)===";")n++,f++,i=0;else if(t.charAt(f)===",")f++;else{for(y=new bZ,y.generatedLine=n,S=f;S<l&&!this._charIsMappingSeparator(t,S);S++);if(b=t.slice(f,S),E=d[b],E)f+=b.length;else{for(E=[];f<S;)M7e.decode(t,f,_),O=_.value,f=_.rest,E.push(O);if(E.length===2)throw new Error("Found a source, but no line and column");if(E.length===3)throw new Error("Found a source and line, but no column");d[b]=E}y.generatedColumn=i+E[0],i=y.generatedColumn,E.length>1&&(y.source=u+E[1],u+=E[1],y.originalLine=o+E[2],o=y.originalLine,y.originalLine+=1,y.originalColumn=a+E[3],a=y.originalColumn,E.length>4&&(y.name=c+E[4],c+=E[4])),g.push(y),typeof y.originalLine=="number"&&m.push(y)}D0(g,se.compareByGeneratedPositionsDeflated),this.__generatedMappings=g,D0(m,se.compareByOriginalPositions),this.__originalMappings=m},"SourceMapConsumer_parseMappings");nn.prototype._findMapping=s(function(t,r,n,i,o,a){if(t[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[n]);if(t[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[i]);return WU.search(t,r,o,a)},"SourceMapConsumer_findMapping");nn.prototype.computeColumnSpans=s(function(){for(var t=0;t<this._generatedMappings.length;++t){var r=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var n=this._generatedMappings[t+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}},"SourceMapConsumer_computeColumnSpans");nn.prototype.originalPositionFor=s(function(t){var r={generatedLine:se.getArg(t,"line"),generatedColumn:se.getArg(t,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",se.compareByGeneratedPositionsDeflated,se.getArg(t,"bias",Vt.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var o=se.getArg(i,"source",null);o!==null&&(o=this._sources.at(o),o=se.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var a=se.getArg(i,"name",null);return a!==null&&(a=this._names.at(a)),{source:o,line:se.getArg(i,"originalLine",null),column:se.getArg(i,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},"SourceMapConsumer_originalPositionFor");nn.prototype.hasContentsOfAllSources=s(function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null}):!1},"BasicSourceMapConsumer_hasContentsOfAllSources");nn.prototype.sourceContentFor=s(function(t,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(t);if(n>=0)return this.sourcesContent[n];var i=t;this.sourceRoot!=null&&(i=se.relative(this.sourceRoot,i));var o;if(this.sourceRoot!=null&&(o=se.urlParse(this.sourceRoot))){var a=i.replace(/^file:\/\//,"");if(o.scheme=="file"&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];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.')},"SourceMapConsumer_sourceContentFor");nn.prototype.generatedPositionFor=s(function(t){var r=se.getArg(t,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:se.getArg(t,"line"),originalColumn:se.getArg(t,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",se.compareByOriginalPositions,se.getArg(t,"bias",Vt.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===n.source)return{line:se.getArg(o,"generatedLine",null),column:se.getArg(o,"generatedColumn",null),lastColumn:se.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},"SourceMapConsumer_generatedPositionFor");Pw.BasicSourceMapConsumer=nn;function _o(e,t){var r=e;typeof e=="string"&&(r=se.parseSourceMapInput(e));var n=se.getArg(r,"version"),i=se.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new cm,this._names=new cm;var o={line:-1,column:0};this._sections=i.map(function(a){if(a.url)throw new Error("Support for url field in sections not implemented.");var u=se.getArg(a,"offset"),c=se.getArg(u,"line"),l=se.getArg(u,"column");if(c<o.line||c===o.line&&l<o.column)throw new Error("Section offsets must be ordered and non-overlapping.");return o=u,{generatedOffset:{generatedLine:c+1,generatedColumn:l+1},consumer:new Vt(se.getArg(a,"map"),t)}})}s(_o,"IndexedSourceMapConsumer");_o.prototype=Object.create(Vt.prototype);_o.prototype.constructor=Vt;_o.prototype._version=3;Object.defineProperty(_o.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}});_o.prototype.originalPositionFor=s(function(t){var r={generatedLine:se.getArg(t,"line"),generatedColumn:se.getArg(t,"column")},n=WU.search(r,this._sections,function(o,a){var u=o.generatedLine-a.generatedOffset.generatedLine;return u||o.generatedColumn-a.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:t.bias}):{source:null,line:null,column:null,name:null}},"IndexedSourceMapConsumer_originalPositionFor");_o.prototype.hasContentsOfAllSources=s(function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})},"IndexedSourceMapConsumer_hasContentsOfAllSources");_o.prototype.sourceContentFor=s(function(t,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],o=i.consumer.sourceContentFor(t,!0);if(o)return o}if(r)return null;throw new Error('"'+t+'" is not in the SourceMap.')},"IndexedSourceMapConsumer_sourceContentFor");_o.prototype.generatedPositionFor=s(function(t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(se.getArg(t,"source"))!==-1){var i=n.consumer.generatedPositionFor(t);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}},"IndexedSourceMapConsumer_generatedPositionFor");_o.prototype._parseMappings=s(function(t,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],o=i.consumer._generatedMappings,a=0;a<o.length;a++){var u=o[a],c=i.consumer._sources.at(u.source);c=se.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL),this._sources.add(c),c=this._sources.indexOf(c);var l=null;u.name&&(l=i.consumer._names.at(u.name),this._names.add(l),l=this._names.indexOf(l));var f={source:c,generatedLine:u.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:u.generatedColumn+(i.generatedOffset.generatedLine===u.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:u.originalLine,originalColumn:u.originalColumn,name:l};this.__generatedMappings.push(f),typeof f.originalLine=="number"&&this.__originalMappings.push(f)}D0(this.__generatedMappings,se.compareByGeneratedPositionsDeflated),D0(this.__originalMappings,se.compareByOriginalPositions)},"IndexedSourceMapConsumer_parseMappings");Pw.IndexedSourceMapConsumer=_o});var OZ=h(vZ=>{var U7e=VU().SourceMapGenerator,Iw=um(),x7e=/(\r?\n)/,q7e=10,lm="$$$isSourceNode$$$";function Ki(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=r??null,this.name=i??null,this[lm]=!0,n!=null&&this.add(n)}s(Ki,"SourceNode");Ki.fromStringWithSourceMap=s(function(t,r,n){var i=new Ki,o=t.split(x7e),a=0,u=s(function(){var _=g(),m=g()||"";return _+m;function g(){return a<o.length?o[a++]:void 0}},"shiftNextLine"),c=1,l=0,f=null;return r.eachMapping(function(_){if(f!==null)if(c<_.generatedLine)d(f,u()),c++,l=0;else{var m=o[a]||"",g=m.substr(0,_.generatedColumn-l);o[a]=m.substr(_.generatedColumn-l),l=_.generatedColumn,d(f,g),f=_;return}for(;c<_.generatedLine;)i.add(u()),c++;if(l<_.generatedColumn){var m=o[a]||"";i.add(m.substr(0,_.generatedColumn)),o[a]=m.substr(_.generatedColumn),l=_.generatedColumn}f=_},this),a<o.length&&(f&&d(f,u()),i.add(o.splice(a).join(""))),r.sources.forEach(function(_){var m=r.sourceContentFor(_);m!=null&&(n!=null&&(_=Iw.join(n,_)),i.setSourceContent(_,m))}),i;function d(_,m){if(_===null||_.source===void 0)i.add(m);else{var g=n?Iw.join(n,_.source):_.source;i.add(new Ki(_.originalLine,_.originalColumn,g,m,_.name))}}s(d,"addMappingWithCode")},"SourceNode_fromStringWithSourceMap");Ki.prototype.add=s(function(t){if(Array.isArray(t))t.forEach(function(r){this.add(r)},this);else if(t[lm]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this},"SourceNode_add");Ki.prototype.prepend=s(function(t){if(Array.isArray(t))for(var r=t.length-1;r>=0;r--)this.prepend(t[r]);else if(t[lm]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this},"SourceNode_prepend");Ki.prototype.walk=s(function(t){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[lm]?r.walk(t):r!==""&&t(r,{source:this.source,line:this.line,column:this.column,name:this.name})},"SourceNode_walk");Ki.prototype.join=s(function(t){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(t);r.push(this.children[n]),this.children=r}return this},"SourceNode_join");Ki.prototype.replaceRight=s(function(t,r){var n=this.children[this.children.length-1];return n[lm]?n.replaceRight(t,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(t,r):this.children.push("".replace(t,r)),this},"SourceNode_replaceRight");Ki.prototype.setSourceContent=s(function(t,r){this.sourceContents[Iw.toSetString(t)]=r},"SourceNode_setSourceContent");Ki.prototype.walkSourceContents=s(function(t){for(var r=0,n=this.children.length;r<n;r++)this.children[r][lm]&&this.children[r].walkSourceContents(t);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)t(Iw.fromSetString(i[r]),this.sourceContents[i[r]])},"SourceNode_walkSourceContents");Ki.prototype.toString=s(function(){var t="";return this.walk(function(r){t+=r}),t},"SourceNode_toString");Ki.prototype.toStringWithSourceMap=s(function(t){var r={code:"",line:1,column:0},n=new U7e(t),i=!1,o=null,a=null,u=null,c=null;return this.walk(function(l,f){r.code+=l,f.source!==null&&f.line!==null&&f.column!==null?((o!==f.source||a!==f.line||u!==f.column||c!==f.name)&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name}),o=f.source,a=f.line,u=f.column,c=f.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),o=null,i=!1);for(var d=0,_=l.length;d<_;d++)l.charCodeAt(d)===q7e?(r.line++,r.column=0,d+1===_?(o=null,i=!1):i&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name})):r.column++}),this.walkSourceContents(function(l,f){n.setSourceContent(l,f)}),{code:r.code,map:n}},"SourceNode_toStringWithSourceMap");vZ.SourceNode=Ki});var PZ=h(ww=>{ww.SourceMapGenerator=VU().SourceMapGenerator;ww.SourceMapConsumer=SZ().SourceMapConsumer;ww.SourceNode=OZ().SourceNode});var NZ=h((Tw,TZ)=>{"use strict";Tw.__esModule=!0;var JU=zn(),Ed=void 0;try{(typeof define!="function"||!define.amd)&&(IZ=PZ(),Ed=IZ.SourceNode)}catch{}var IZ;Ed||(Ed=s(function(e,t,r,n){this.src="",n&&this.add(n)},"SourceNode"),Ed.prototype={add:s(function(t){JU.isArray(t)&&(t=t.join("")),this.src+=t},"add"),prepend:s(function(t){JU.isArray(t)&&(t=t.join("")),this.src=t+this.src},"prepend"),toStringWithSourceMap:s(function(){return{code:this.toString()}},"toStringWithSourceMap"),toString:s(function(){return this.src},"toString")});function YU(e,t,r){if(JU.isArray(e)){for(var n=[],i=0,o=e.length;i<o;i++)n.push(t.wrap(e[i],r));return n}else if(typeof e=="boolean"||typeof e=="number")return e+"";return e}s(YU,"castChunk");function wZ(e){this.srcFile=e,this.source=[]}s(wZ,"CodeGen");wZ.prototype={isEmpty:s(function(){return!this.source.length},"isEmpty"),prepend:s(function(t,r){this.source.unshift(this.wrap(t,r))},"prepend"),push:s(function(t,r){this.source.push(this.wrap(t,r))},"push"),merge:s(function(){var t=this.empty();return this.each(function(r){t.add([" ",r,`
|
|
156
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var o=this.next();return typeof o<"u"?o:this.lex()},"lex"),begin:s(function(o){this.conditionStack.push(o)},"begin"),popState:s(function(){return this.conditionStack.pop()},"popState"),_currentRules:s(function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},"_currentRules"),topState:s(function(){return this.conditionStack[this.conditionStack.length-2]},"topState"),pushState:s(function(o){this.begin(o)},"begin")};return n.options={},n.performAction=s(function(o,a,u,c){function l(d,_){return a.yytext=a.yytext.substring(d,a.yyleng-_+d)}s(l,"strip");var f=c;switch(u){case 0:if(a.yytext.slice(-2)==="\\\\"?(l(0,1),this.begin("mu")):a.yytext.slice(-1)==="\\"?(l(0,1),this.begin("emu")):this.begin("mu"),a.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(l(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(a.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 a.yytext=l(1,2).replace(/\\"/g,'"'),80;break;case 32:return a.yytext=l(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return a.yytext=a.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},"anonymous"),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}();e.lexer=t;function r(){this.yy={}}return s(r,"Parser"),r.prototype=e,e.Parser=r,new r}();mw.default=V9e;FQ.exports=mw.default});var Ew=h((yw,VQ)=>{"use strict";yw.__esModule=!0;function z9e(e){return e&&e.__esModule?e:{default:e}}s(z9e,"_interopRequireDefault");var H9e=Ss(),AU=z9e(H9e);function _w(){this.parents=[]}s(_w,"Visitor");_w.prototype={constructor:_w,mutating:!1,acceptKey:s(function(t,r){var n=this.accept(t[r]);if(this.mutating){if(n&&!_w.prototype[n.type])throw new AU.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+t.type);t[r]=n}},"acceptKey"),acceptRequired:s(function(t,r){if(this.acceptKey(t,r),!t[r])throw new AU.default(t.type+" requires "+r)},"acceptRequired"),acceptArray:s(function(t){for(var r=0,n=t.length;r<n;r++)this.acceptKey(t,r),t[r]||(t.splice(r,1),r--,n--)},"acceptArray"),accept:s(function(t){if(t){if(!this[t.type])throw new AU.default("Unknown type: "+t.type,t);this.current&&this.parents.unshift(this.current),this.current=t;var r=this[t.type](t);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return t}},"accept"),Program:s(function(t){this.acceptArray(t.body)},"Program"),MustacheStatement:gw,Decorator:gw,BlockStatement:BQ,DecoratorBlock:BQ,PartialStatement:GQ,PartialBlockStatement:s(function(t){GQ.call(this,t),this.acceptKey(t,"program")},"PartialBlockStatement"),ContentStatement:s(function(){},"ContentStatement"),CommentStatement:s(function(){},"CommentStatement"),SubExpression:gw,PathExpression:s(function(){},"PathExpression"),StringLiteral:s(function(){},"StringLiteral"),NumberLiteral:s(function(){},"NumberLiteral"),BooleanLiteral:s(function(){},"BooleanLiteral"),UndefinedLiteral:s(function(){},"UndefinedLiteral"),NullLiteral:s(function(){},"NullLiteral"),Hash:s(function(t){this.acceptArray(t.pairs)},"Hash"),HashPair:s(function(t){this.acceptRequired(t,"value")},"HashPair")};function gw(e){this.acceptRequired(e,"path"),this.acceptArray(e.params),this.acceptKey(e,"hash")}s(gw,"visitSubExpression");function BQ(e){gw.call(this,e),this.acceptKey(e,"program"),this.acceptKey(e,"inverse")}s(BQ,"visitBlock");function GQ(e){this.acceptRequired(e,"name"),this.acceptArray(e.params),this.acceptKey(e,"hash")}s(GQ,"visitPartial");yw.default=_w;VQ.exports=yw.default});var HQ=h((bw,zQ)=>{"use strict";bw.__esModule=!0;function K9e(e){return e&&e.__esModule?e:{default:e}}s(K9e,"_interopRequireDefault");var W9e=Ew(),Y9e=K9e(W9e);function fa(){var e=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=e}s(fa,"WhitespaceControl");fa.prototype=new Y9e.default;fa.prototype.Program=function(e){var t=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var n=e.body,i=0,o=n.length;i<o;i++){var a=n[i],u=this.accept(a);if(u){var c=RU(n,i,r),l=CU(n,i,r),f=u.openStandalone&&c,d=u.closeStandalone&&l,_=u.inlineStandalone&&c&&l;u.close&&_d(n,i,!0),u.open&&$c(n,i,!0),t&&_&&(_d(n,i),$c(n,i)&&a.type==="PartialStatement"&&(a.indent=/([ \t]+$)/.exec(n[i-1].original)[1])),t&&f&&(_d((a.program||a.inverse).body),$c(n,i)),t&&d&&(_d(n,i),$c((a.inverse||a.program).body))}}return e};fa.prototype.BlockStatement=fa.prototype.DecoratorBlock=fa.prototype.PartialBlockStatement=function(e){this.accept(e.program),this.accept(e.inverse);var t=e.program||e.inverse,r=e.program&&e.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:e.openStrip.open,close:e.closeStrip.close,openStandalone:CU(t.body),closeStandalone:RU((n||t).body)};if(e.openStrip.close&&_d(t.body,null,!0),r){var a=e.inverseStrip;a.open&&$c(t.body,null,!0),a.close&&_d(n.body,null,!0),e.closeStrip.open&&$c(i.body,null,!0),!this.options.ignoreStandalone&&RU(t.body)&&CU(n.body)&&($c(t.body),_d(n.body))}else e.closeStrip.open&&$c(t.body,null,!0);return o};fa.prototype.Decorator=fa.prototype.MustacheStatement=function(e){return e.strip};fa.prototype.PartialStatement=fa.prototype.CommentStatement=function(e){var t=e.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close}};function RU(e,t,r){t===void 0&&(t=e.length);var n=e[t-1],i=e[t-2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original)}s(RU,"isPrevWhitespace");function CU(e,t,r){t===void 0&&(t=-1);var n=e[t+1],i=e[t+2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original)}s(CU,"isNextWhitespace");function _d(e,t,r){var n=e[t==null?0:t+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}}s(_d,"omitRight");function $c(e,t,r){var n=e[t==null?e.length-1:t-1];if(!(!n||n.type!=="ContentStatement"||!r&&n.leftStripped)){var i=n.value;return n.value=n.value.replace(r?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==i,n.leftStripped}}s($c,"omitLeft");bw.default=fa;zQ.exports=bw.default});var KQ=h(vs=>{"use strict";vs.__esModule=!0;vs.SourceLocation=Q9e;vs.id=Z9e;vs.stripFlags=e7e;vs.stripComment=t7e;vs.preparePath=r7e;vs.prepareMustache=n7e;vs.prepareRawBlock=i7e;vs.prepareBlock=s7e;vs.prepareProgram=o7e;vs.preparePartialBlock=a7e;function J9e(e){return e&&e.__esModule?e:{default:e}}s(J9e,"_interopRequireDefault");var X9e=Ss(),$U=J9e(X9e);function DU(e,t){if(t=t.path?t.path.original:t,e.path.original!==t){var r={loc:e.path.loc};throw new $U.default(e.path.original+" doesn't match "+t,r)}}s(DU,"validateClose");function Q9e(e,t){this.source=e,this.start={line:t.first_line,column:t.first_column},this.end={line:t.last_line,column:t.last_column}}s(Q9e,"SourceLocation");function Z9e(e){return/^\[.*\]$/.test(e)?e.substring(1,e.length-1):e}s(Z9e,"id");function e7e(e,t){return{open:e.charAt(2)==="~",close:t.charAt(t.length-3)==="~"}}s(e7e,"stripFlags");function t7e(e){return e.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}s(t7e,"stripComment");function r7e(e,t,r){r=this.locInfo(r);for(var n=e?"@":"",i=[],o=0,a=0,u=t.length;a<u;a++){var c=t[a].part,l=t[a].original!==c;if(n+=(t[a].separator||"")+c,!l&&(c===".."||c==="."||c==="this")){if(i.length>0)throw new $U.default("Invalid path: "+n,{loc:r});c===".."&&o++}else i.push(c)}return{type:"PathExpression",data:e,depth:o,parts:i,original:n,loc:r}}s(r7e,"preparePath");function n7e(e,t,r,n,i,o){var a=n.charAt(3)||n.charAt(2),u=a!=="{"&&a!=="&",c=/\*/.test(n);return{type:c?"Decorator":"MustacheStatement",path:e,params:t,hash:r,escaped:u,strip:i,loc:this.locInfo(o)}}s(n7e,"prepareMustache");function i7e(e,t,r,n){DU(e,r),n=this.locInfo(n);var i={type:"Program",body:t,strip:{},loc:n};return{type:"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}}s(i7e,"prepareRawBlock");function s7e(e,t,r,n,i,o){n&&n.path&&DU(e,n);var a=/\*/.test(e.open);t.blockParams=e.blockParams;var u=void 0,c=void 0;if(r){if(a)throw new $U.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),c=r.strip,u=r.program}return i&&(i=u,u=t,t=i),{type:a?"DecoratorBlock":"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:t,inverse:u,openStrip:e.strip,inverseStrip:c,closeStrip:n&&n.strip,loc:this.locInfo(o)}}s(s7e,"prepareBlock");function o7e(e,t){if(!t&&e.length){var r=e[0].loc,n=e[e.length-1].loc;r&&n&&(t={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:e,strip:{},loc:t}}s(o7e,"prepareProgram");function a7e(e,t,r,n){return DU(e,r),{type:"PartialBlockStatement",name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:r&&r.strip,loc:this.locInfo(n)}}s(a7e,"preparePartialBlock")});var JQ=h(w0=>{"use strict";w0.__esModule=!0;w0.parseWithoutProcessing=YQ;w0.parse=m7e;function u7e(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}s(u7e,"_interopRequireWildcard");function WQ(e){return e&&e.__esModule?e:{default:e}}s(WQ,"_interopRequireDefault");var c7e=kQ(),LU=WQ(c7e),l7e=HQ(),f7e=WQ(l7e),d7e=KQ(),p7e=u7e(d7e),h7e=zn();w0.parser=LU.default;var Sw={};h7e.extend(Sw,p7e);function YQ(e,t){if(e.type==="Program")return e;LU.default.yy=Sw,Sw.locInfo=function(n){return new Sw.SourceLocation(t&&t.srcName,n)};var r=LU.default.parse(e);return r}s(YQ,"parseWithoutProcessing");function m7e(e,t){var r=YQ(e,t),n=new f7e.default(t);return n.accept(r)}s(m7e,"parse")});var eZ=h(R0=>{"use strict";R0.__esModule=!0;R0.Compiler=jU;R0.precompile=E7e;R0.compile=b7e;function QQ(e){return e&&e.__esModule?e:{default:e}}s(QQ,"_interopRequireDefault");var _7e=Ss(),N0=QQ(_7e),A0=zn(),g7e=NU(),T0=QQ(g7e),y7e=[].slice;function jU(){}s(jU,"Compiler");jU.prototype={compiler:jU,equals:s(function(t){var r=this.opcodes.length;if(t.opcodes.length!==r)return!1;for(var n=0;n<r;n++){var i=this.opcodes[n],o=t.opcodes[n];if(i.opcode!==o.opcode||!ZQ(i.args,o.args))return!1}r=this.children.length;for(var n=0;n<r;n++)if(!this.children[n].equals(t.children[n]))return!1;return!0},"equals"),guid:0,compile:s(function(t,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=A0.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},r.knownHelpers),this.accept(t)},"compile"),compileProgram:s(function(t){var r=new this.compiler,n=r.compile(t,this.options),i=this.guid++;return this.usePartial=this.usePartial||n.usePartial,this.children[i]=n,this.useDepths=this.useDepths||n.useDepths,i},"compileProgram"),accept:s(function(t){if(!this[t.type])throw new N0.default("Unknown type: "+t.type,t);this.sourceNode.unshift(t);var r=this[t.type](t);return this.sourceNode.shift(),r},"accept"),Program:s(function(t){this.options.blockParams.unshift(t.blockParams);for(var r=t.body,n=r.length,i=0;i<n;i++)this.accept(r[i]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=t.blockParams?t.blockParams.length:0,this},"Program"),BlockStatement:s(function(t){XQ(t);var r=t.program,n=t.inverse;r=r&&this.compileProgram(r),n=n&&this.compileProgram(n);var i=this.classifySexpr(t);i==="helper"?this.helperSexpr(t,r,n):i==="simple"?(this.simpleSexpr(t),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",t.path.original)):(this.ambiguousSexpr(t,r,n),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},"BlockStatement"),DecoratorBlock:s(function(t){var r=t.program&&this.compileProgram(t.program),n=this.setupFullMustacheParams(t,r,void 0),i=t.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,i.original)},"DecoratorBlock"),PartialStatement:s(function(t){this.usePartial=!0;var r=t.program;r&&(r=this.compileProgram(t.program));var n=t.params;if(n.length>1)throw new N0.default("Unsupported number of partial arguments: "+n.length,t);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var i=t.name.original,o=t.name.type==="SubExpression";o&&this.accept(t.name),this.setupFullMustacheParams(t,r,void 0,!0);var a=t.indent||"";this.options.preventIndent&&a&&(this.opcode("appendContent",a),a=""),this.opcode("invokePartial",o,i,a),this.opcode("append")},"PartialStatement"),PartialBlockStatement:s(function(t){this.PartialStatement(t)},"PartialBlockStatement"),MustacheStatement:s(function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},"MustacheStatement"),Decorator:s(function(t){this.DecoratorBlock(t)},"Decorator"),ContentStatement:s(function(t){t.value&&this.opcode("appendContent",t.value)},"ContentStatement"),CommentStatement:s(function(){},"CommentStatement"),SubExpression:s(function(t){XQ(t);var r=this.classifySexpr(t);r==="simple"?this.simpleSexpr(t):r==="helper"?this.helperSexpr(t):this.ambiguousSexpr(t)},"SubExpression"),ambiguousSexpr:s(function(t,r,n){var i=t.path,o=i.parts[0],a=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,a)},"ambiguousSexpr"),simpleSexpr:s(function(t){var r=t.path;r.strict=!0,this.accept(r),this.opcode("resolvePossibleLambda")},"simpleSexpr"),helperSexpr:s(function(t,r,n){var i=this.setupFullMustacheParams(t,r,n),o=t.path,a=o.parts[0];if(this.options.knownHelpers[a])this.opcode("invokeKnownHelper",i.length,a);else{if(this.options.knownHelpersOnly)throw new N0.default("You specified knownHelpersOnly, but used the unknown helper "+a,t);o.strict=!0,o.falsy=!0,this.accept(o),this.opcode("invokeHelper",i.length,o.original,T0.default.helpers.simpleId(o))}},"helperSexpr"),PathExpression:s(function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var r=t.parts[0],n=T0.default.helpers.scopedId(t),i=!t.depth&&!n&&this.blockParamIndex(r);i?this.opcode("lookupBlockParam",i,t.parts):r?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,n):this.opcode("pushContext")},"PathExpression"),StringLiteral:s(function(t){this.opcode("pushString",t.value)},"StringLiteral"),NumberLiteral:s(function(t){this.opcode("pushLiteral",t.value)},"NumberLiteral"),BooleanLiteral:s(function(t){this.opcode("pushLiteral",t.value)},"BooleanLiteral"),UndefinedLiteral:s(function(){this.opcode("pushLiteral","undefined")},"UndefinedLiteral"),NullLiteral:s(function(){this.opcode("pushLiteral","null")},"NullLiteral"),Hash:s(function(t){var r=t.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")},"Hash"),opcode:s(function(t){this.opcodes.push({opcode:t,args:y7e.call(arguments,1),loc:this.sourceNode[0].loc})},"opcode"),addDepth:s(function(t){t&&(this.useDepths=!0)},"addDepth"),classifySexpr:s(function(t){var r=T0.default.helpers.simpleId(t.path),n=r&&!!this.blockParamIndex(t.path.parts[0]),i=!n&&T0.default.helpers.helperExpression(t),o=!n&&(i||r);if(o&&!i){var a=t.path.parts[0],u=this.options;u.knownHelpers[a]?i=!0:u.knownHelpersOnly&&(o=!1)}return i?"helper":o?"ambiguous":"simple"},"classifySexpr"),pushParams:s(function(t){for(var r=0,n=t.length;r<n;r++)this.pushParam(t[r])},"pushParams"),pushParam:s(function(t){var r=t.value!=null?t.value:t.original||"";if(this.stringParams)r.replace&&(r=r.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),t.depth&&this.addDepth(t.depth),this.opcode("getContext",t.depth||0),this.opcode("pushStringParam",r,t.type),t.type==="SubExpression"&&this.accept(t);else{if(this.trackIds){var n=void 0;if(t.parts&&!T0.default.helpers.scopedId(t)&&!t.depth&&(n=this.blockParamIndex(t.parts[0])),n){var i=t.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,i)}else r=t.original||r,r.replace&&(r=r.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",t.type,r)}this.accept(t)}},"pushParam"),setupFullMustacheParams:s(function(t,r,n,i){var o=t.params;return this.pushParams(o),this.opcode("pushProgram",r),this.opcode("pushProgram",n),t.hash?this.accept(t.hash):this.opcode("emptyHash",i),o},"setupFullMustacheParams"),blockParamIndex:s(function(t){for(var r=0,n=this.options.blockParams.length;r<n;r++){var i=this.options.blockParams[r],o=i&&A0.indexOf(i,t);if(i&&o>=0)return[r,o]}},"blockParamIndex")};function E7e(e,t,r){if(e==null||typeof e!="string"&&e.type!=="Program")throw new N0.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+e);t=t||{},"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var n=r.parse(e,t),i=new r.Compiler().compile(n,t);return new r.JavaScriptCompiler().compile(i,t)}s(E7e,"precompile");function b7e(e,t,r){if(t===void 0&&(t={}),e==null||typeof e!="string"&&e.type!=="Program")throw new N0.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+e);t=A0.extend({},t),"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var n=void 0;function i(){var a=r.parse(e,t),u=new r.Compiler().compile(a,t),c=new r.JavaScriptCompiler().compile(u,t,void 0,!0);return r.template(c)}s(i,"compileInput");function o(a,u){return n||(n=i()),n.call(this,a,u)}return s(o,"ret"),o._setup=function(a){return n||(n=i()),n._setup(a)},o._child=function(a,u,c,l){return n||(n=i()),n._child(a,u,c,l)},o}s(b7e,"compile");function ZQ(e,t){if(e===t)return!0;if(A0.isArray(e)&&A0.isArray(t)&&e.length===t.length){for(var r=0;r<e.length;r++)if(!ZQ(e[r],t[r]))return!1;return!0}}s(ZQ,"argEquals");function XQ(e){if(!e.path.parts){var t=e.path;e.path={type:"PathExpression",data:!1,depth:0,parts:[t.original+""],original:t.original+"",loc:t.loc}}}s(XQ,"transformLiteralToPath")});var rZ=h(MU=>{var tZ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");MU.encode=function(e){if(0<=e&&e<tZ.length)return tZ[e];throw new TypeError("Must be between 0 and 63: "+e)};MU.decode=function(e){var t=65,r=90,n=97,i=122,o=48,a=57,u=43,c=47,l=26,f=52;return t<=e&&e<=r?e-t:n<=e&&e<=i?e-n+l:o<=e&&e<=a?e-o+f:e==u?62:e==c?63:-1}});var qU=h(xU=>{var nZ=rZ(),UU=5,iZ=1<<UU,sZ=iZ-1,oZ=iZ;function S7e(e){return e<0?(-e<<1)+1:(e<<1)+0}s(S7e,"toVLQSigned");function v7e(e){var t=(e&1)===1,r=e>>1;return t?-r:r}s(v7e,"fromVLQSigned");xU.encode=s(function(t){var r="",n,i=S7e(t);do n=i&sZ,i>>>=UU,i>0&&(n|=oZ),r+=nZ.encode(n);while(i>0);return r},"base64VLQ_encode");xU.decode=s(function(t,r,n){var i=t.length,o=0,a=0,u,c;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=nZ.decode(t.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));u=!!(c&oZ),c&=sZ,o=o+(c<<a),a+=UU}while(u);n.value=v7e(o),n.rest=r},"base64VLQ_decode")});var um=h(In=>{function O7e(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}s(O7e,"getArg");In.getArg=O7e;var aZ=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,P7e=/^data:.+\,.+$/;function C0(e){var t=e.match(aZ);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}s(C0,"urlParse");In.urlParse=C0;function om(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}s(om,"urlGenerate");In.urlGenerate=om;function FU(e){var t=e,r=C0(e);if(r){if(!r.path)return e;t=r.path}for(var n=In.isAbsolute(t),i=t.split(/\/+/),o,a=0,u=i.length-1;u>=0;u--)o=i[u],o==="."?i.splice(u,1):o===".."?a++:a>0&&(o===""?(i.splice(u+1,a),a=0):(i.splice(u,2),a--));return t=i.join("/"),t===""&&(t=n?"/":"."),r?(r.path=t,om(r)):t}s(FU,"normalize");In.normalize=FU;function uZ(e,t){e===""&&(e="."),t===""&&(t=".");var r=C0(t),n=C0(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),om(r);if(r||t.match(P7e))return t;if(n&&!n.host&&!n.path)return n.host=t,om(n);var i=t.charAt(0)==="/"?t:FU(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=i,om(n)):i}s(uZ,"join");In.join=uZ;In.isAbsolute=function(e){return e.charAt(0)==="/"||aZ.test(e)};function I7e(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var r=0;t.indexOf(e+"/")!==0;){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/)))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}s(I7e,"relative");In.relative=I7e;var cZ=function(){var e=Object.create(null);return!("__proto__"in e)}();function lZ(e){return e}s(lZ,"identity");function w7e(e){return fZ(e)?"$"+e:e}s(w7e,"toSetString");In.toSetString=cZ?lZ:w7e;function T7e(e){return fZ(e)?e.slice(1):e}s(T7e,"fromSetString");In.fromSetString=cZ?lZ:T7e;function fZ(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var r=t-10;r>=0;r--)if(e.charCodeAt(r)!==36)return!1;return!0}s(fZ,"isProtoString");function N7e(e,t,r){var n=am(e.source,t.source);return n!==0||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:am(e.name,t.name)}s(N7e,"compareByOriginalPositions");In.compareByOriginalPositions=N7e;function A7e(e,t,r){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0||r)||(n=am(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:am(e.name,t.name)}s(A7e,"compareByGeneratedPositionsDeflated");In.compareByGeneratedPositionsDeflated=A7e;function am(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}s(am,"strcmp");function R7e(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=am(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:am(e.name,t.name)}s(R7e,"compareByGeneratedPositionsInflated");In.compareByGeneratedPositionsInflated=R7e;function C7e(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}s(C7e,"parseSourceMapInput");In.parseSourceMapInput=C7e;function $7e(e,t,r){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),r){var n=C0(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))}t=uZ(om(n),t)}return FU(t)}s($7e,"computeSourceURL");In.computeSourceURL=$7e});var GU=h(dZ=>{var kU=um(),BU=Object.prototype.hasOwnProperty,gd=typeof Map<"u";function gu(){this._array=[],this._set=gd?new Map:Object.create(null)}s(gu,"ArraySet");gu.fromArray=s(function(t,r){for(var n=new gu,i=0,o=t.length;i<o;i++)n.add(t[i],r);return n},"ArraySet_fromArray");gu.prototype.size=s(function(){return gd?this._set.size:Object.getOwnPropertyNames(this._set).length},"ArraySet_size");gu.prototype.add=s(function(t,r){var n=gd?t:kU.toSetString(t),i=gd?this.has(t):BU.call(this._set,n),o=this._array.length;(!i||r)&&this._array.push(t),i||(gd?this._set.set(t,o):this._set[n]=o)},"ArraySet_add");gu.prototype.has=s(function(t){if(gd)return this._set.has(t);var r=kU.toSetString(t);return BU.call(this._set,r)},"ArraySet_has");gu.prototype.indexOf=s(function(t){if(gd){var r=this._set.get(t);if(r>=0)return r}else{var n=kU.toSetString(t);if(BU.call(this._set,n))return this._set[n]}throw new Error('"'+t+'" is not in the set.')},"ArraySet_indexOf");gu.prototype.at=s(function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)},"ArraySet_at");gu.prototype.toArray=s(function(){return this._array.slice()},"ArraySet_toArray");dZ.ArraySet=gu});var mZ=h(hZ=>{var pZ=um();function D7e(e,t){var r=e.generatedLine,n=t.generatedLine,i=e.generatedColumn,o=t.generatedColumn;return n>r||n==r&&o>=i||pZ.compareByGeneratedPositionsInflated(e,t)<=0}s(D7e,"generatedPositionAfter");function vw(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}s(vw,"MappingList");vw.prototype.unsortedForEach=s(function(t,r){this._array.forEach(t,r)},"MappingList_forEach");vw.prototype.add=s(function(t){D7e(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))},"MappingList_add");vw.prototype.toArray=s(function(){return this._sorted||(this._array.sort(pZ.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},"MappingList_toArray");hZ.MappingList=vw});var VU=h(_Z=>{var $0=qU(),Ar=um(),Ow=GU().ArraySet,L7e=mZ().MappingList;function Os(e){e||(e={}),this._file=Ar.getArg(e,"file",null),this._sourceRoot=Ar.getArg(e,"sourceRoot",null),this._skipValidation=Ar.getArg(e,"skipValidation",!1),this._sources=new Ow,this._names=new Ow,this._mappings=new L7e,this._sourcesContents=null}s(Os,"SourceMapGenerator");Os.prototype._version=3;Os.fromSourceMap=s(function(t){var r=t.sourceRoot,n=new Os({file:t.file,sourceRoot:r});return t.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,r!=null&&(o.source=Ar.relative(r,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),n.addMapping(o)}),t.sources.forEach(function(i){var o=i;r!==null&&(o=Ar.relative(r,i)),n._sources.has(o)||n._sources.add(o);var a=t.sourceContentFor(i);a!=null&&n.setSourceContent(i,a)}),n},"SourceMapGenerator_fromSourceMap");Os.prototype.addMapping=s(function(t){var r=Ar.getArg(t,"generated"),n=Ar.getArg(t,"original",null),i=Ar.getArg(t,"source",null),o=Ar.getArg(t,"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})},"SourceMapGenerator_addMapping");Os.prototype.setSourceContent=s(function(t,r){var n=t;this._sourceRoot!=null&&(n=Ar.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Ar.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Ar.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},"SourceMapGenerator_setSourceContent");Os.prototype.applySourceMap=s(function(t,r,n){var i=r;if(r==null){if(t.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=t.file}var o=this._sourceRoot;o!=null&&(i=Ar.relative(o,i));var a=new Ow,u=new Ow;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var l=t.originalPositionFor({line:c.originalLine,column:c.originalColumn});l.source!=null&&(c.source=l.source,n!=null&&(c.source=Ar.join(n,c.source)),o!=null&&(c.source=Ar.relative(o,c.source)),c.originalLine=l.line,c.originalColumn=l.column,l.name!=null&&(c.name=l.name))}var f=c.source;f!=null&&!a.has(f)&&a.add(f);var d=c.name;d!=null&&!u.has(d)&&u.add(d)},this),this._sources=a,this._names=u,t.sources.forEach(function(c){var l=t.sourceContentFor(c);l!=null&&(n!=null&&(c=Ar.join(n,c)),o!=null&&(c=Ar.relative(o,c)),this.setSourceContent(c,l))},this)},"SourceMapGenerator_applySourceMap");Os.prototype._validateMapping=s(function(t,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(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!r&&!n&&!i)){if(t&&"line"in t&&"column"in t&&r&&"line"in r&&"column"in r&&t.line>0&&t.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:i}))}},"SourceMapGenerator_validateMapping");Os.prototype._serializeMappings=s(function(){for(var t=0,r=1,n=0,i=0,o=0,a=0,u="",c,l,f,d,_=this._mappings.toArray(),m=0,g=_.length;m<g;m++){if(l=_[m],c="",l.generatedLine!==r)for(t=0;l.generatedLine!==r;)c+=";",r++;else if(m>0){if(!Ar.compareByGeneratedPositionsInflated(l,_[m-1]))continue;c+=","}c+=$0.encode(l.generatedColumn-t),t=l.generatedColumn,l.source!=null&&(d=this._sources.indexOf(l.source),c+=$0.encode(d-a),a=d,c+=$0.encode(l.originalLine-1-i),i=l.originalLine-1,c+=$0.encode(l.originalColumn-n),n=l.originalColumn,l.name!=null&&(f=this._names.indexOf(l.name),c+=$0.encode(f-o),o=f)),u+=c}return u},"SourceMapGenerator_serializeMappings");Os.prototype._generateSourcesContent=s(function(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Ar.relative(r,n));var i=Ar.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)},"SourceMapGenerator_generateSourcesContent");Os.prototype.toJSON=s(function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t},"SourceMapGenerator_toJSON");Os.prototype.toString=s(function(){return JSON.stringify(this.toJSON())},"SourceMapGenerator_toString");_Z.SourceMapGenerator=Os});var gZ=h(yd=>{yd.GREATEST_LOWER_BOUND=1;yd.LEAST_UPPER_BOUND=2;function zU(e,t,r,n,i,o){var a=Math.floor((t-e)/2)+e,u=i(r,n[a],!0);return u===0?a:u>0?t-a>1?zU(a,t,r,n,i,o):o==yd.LEAST_UPPER_BOUND?t<n.length?t:-1:a:a-e>1?zU(e,a,r,n,i,o):o==yd.LEAST_UPPER_BOUND?a:e<0?-1:e}s(zU,"recursiveSearch");yd.search=s(function(t,r,n,i){if(r.length===0)return-1;var o=zU(-1,r.length,t,r,n,i||yd.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&n(r[o],r[o-1],!0)===0;)--o;return o},"search")});var EZ=h(yZ=>{function HU(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}s(HU,"swap");function j7e(e,t){return Math.round(e+Math.random()*(t-e))}s(j7e,"randomIntInRange");function KU(e,t,r,n){if(r<n){var i=j7e(r,n),o=r-1;HU(e,i,n);for(var a=e[n],u=r;u<n;u++)t(e[u],a)<=0&&(o+=1,HU(e,o,u));HU(e,o+1,u);var c=o+1;KU(e,t,r,c-1),KU(e,t,c+1,n)}}s(KU,"doQuickSort");yZ.quickSort=function(e,t){KU(e,t,0,e.length-1)}});var SZ=h(Pw=>{var se=um(),WU=gZ(),cm=GU().ArraySet,M7e=qU(),D0=EZ().quickSort;function Vt(e,t){var r=e;return typeof e=="string"&&(r=se.parseSourceMapInput(e)),r.sections!=null?new _o(r,t):new nn(r,t)}s(Vt,"SourceMapConsumer");Vt.fromSourceMap=function(e,t){return nn.fromSourceMap(e,t)};Vt.prototype._version=3;Vt.prototype.__generatedMappings=null;Object.defineProperty(Vt.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});Vt.prototype.__originalMappings=null;Object.defineProperty(Vt.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});Vt.prototype._charIsMappingSeparator=s(function(t,r){var n=t.charAt(r);return n===";"||n===","},"SourceMapConsumer_charIsMappingSeparator");Vt.prototype._parseMappings=s(function(t,r){throw new Error("Subclasses must implement _parseMappings")},"SourceMapConsumer_parseMappings");Vt.GENERATED_ORDER=1;Vt.ORIGINAL_ORDER=2;Vt.GREATEST_LOWER_BOUND=1;Vt.LEAST_UPPER_BOUND=2;Vt.prototype.eachMapping=s(function(t,r,n){var i=r||null,o=n||Vt.GENERATED_ORDER,a;switch(o){case Vt.GENERATED_ORDER:a=this._generatedMappings;break;case Vt.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;a.map(function(c){var l=c.source===null?null:this._sources.at(c.source);return l=se.computeSourceURL(u,l,this._sourceMapURL),{source:l,generatedLine:c.generatedLine,generatedColumn:c.generatedColumn,originalLine:c.originalLine,originalColumn:c.originalColumn,name:c.name===null?null:this._names.at(c.name)}},this).forEach(t,i)},"SourceMapConsumer_eachMapping");Vt.prototype.allGeneratedPositionsFor=s(function(t){var r=se.getArg(t,"line"),n={source:se.getArg(t,"source"),originalLine:r,originalColumn:se.getArg(t,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",se.compareByOriginalPositions,WU.LEAST_UPPER_BOUND);if(o>=0){var a=this._originalMappings[o];if(t.column===void 0)for(var u=a.originalLine;a&&a.originalLine===u;)i.push({line:se.getArg(a,"generatedLine",null),column:se.getArg(a,"generatedColumn",null),lastColumn:se.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++o];else for(var c=a.originalColumn;a&&a.originalLine===r&&a.originalColumn==c;)i.push({line:se.getArg(a,"generatedLine",null),column:se.getArg(a,"generatedColumn",null),lastColumn:se.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++o]}return i},"SourceMapConsumer_allGeneratedPositionsFor");Pw.SourceMapConsumer=Vt;function nn(e,t){var r=e;typeof e=="string"&&(r=se.parseSourceMapInput(e));var n=se.getArg(r,"version"),i=se.getArg(r,"sources"),o=se.getArg(r,"names",[]),a=se.getArg(r,"sourceRoot",null),u=se.getArg(r,"sourcesContent",null),c=se.getArg(r,"mappings"),l=se.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);a&&(a=se.normalize(a)),i=i.map(String).map(se.normalize).map(function(f){return a&&se.isAbsolute(a)&&se.isAbsolute(f)?se.relative(a,f):f}),this._names=cm.fromArray(o.map(String),!0),this._sources=cm.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(f){return se.computeSourceURL(a,f,t)}),this.sourceRoot=a,this.sourcesContent=u,this._mappings=c,this._sourceMapURL=t,this.file=l}s(nn,"BasicSourceMapConsumer");nn.prototype=Object.create(Vt.prototype);nn.prototype.consumer=Vt;nn.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null&&(t=se.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1};nn.fromSourceMap=s(function(t,r){var n=Object.create(nn.prototype),i=n._names=cm.fromArray(t._names.toArray(),!0),o=n._sources=cm.fromArray(t._sources.toArray(),!0);n.sourceRoot=t._sourceRoot,n.sourcesContent=t._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=t._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(m){return se.computeSourceURL(n.sourceRoot,m,r)});for(var a=t._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],l=0,f=a.length;l<f;l++){var d=a[l],_=new bZ;_.generatedLine=d.generatedLine,_.generatedColumn=d.generatedColumn,d.source&&(_.source=o.indexOf(d.source),_.originalLine=d.originalLine,_.originalColumn=d.originalColumn,d.name&&(_.name=i.indexOf(d.name)),c.push(_)),u.push(_)}return D0(n.__originalMappings,se.compareByOriginalPositions),n},"SourceMapConsumer_fromSourceMap");nn.prototype._version=3;Object.defineProperty(nn.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function bZ(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}s(bZ,"Mapping");nn.prototype._parseMappings=s(function(t,r){for(var n=1,i=0,o=0,a=0,u=0,c=0,l=t.length,f=0,d={},_={},m=[],g=[],y,b,E,v,O;f<l;)if(t.charAt(f)===";")n++,f++,i=0;else if(t.charAt(f)===",")f++;else{for(y=new bZ,y.generatedLine=n,v=f;v<l&&!this._charIsMappingSeparator(t,v);v++);if(b=t.slice(f,v),E=d[b],E)f+=b.length;else{for(E=[];f<v;)M7e.decode(t,f,_),O=_.value,f=_.rest,E.push(O);if(E.length===2)throw new Error("Found a source, but no line and column");if(E.length===3)throw new Error("Found a source and line, but no column");d[b]=E}y.generatedColumn=i+E[0],i=y.generatedColumn,E.length>1&&(y.source=u+E[1],u+=E[1],y.originalLine=o+E[2],o=y.originalLine,y.originalLine+=1,y.originalColumn=a+E[3],a=y.originalColumn,E.length>4&&(y.name=c+E[4],c+=E[4])),g.push(y),typeof y.originalLine=="number"&&m.push(y)}D0(g,se.compareByGeneratedPositionsDeflated),this.__generatedMappings=g,D0(m,se.compareByOriginalPositions),this.__originalMappings=m},"SourceMapConsumer_parseMappings");nn.prototype._findMapping=s(function(t,r,n,i,o,a){if(t[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[n]);if(t[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[i]);return WU.search(t,r,o,a)},"SourceMapConsumer_findMapping");nn.prototype.computeColumnSpans=s(function(){for(var t=0;t<this._generatedMappings.length;++t){var r=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var n=this._generatedMappings[t+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}},"SourceMapConsumer_computeColumnSpans");nn.prototype.originalPositionFor=s(function(t){var r={generatedLine:se.getArg(t,"line"),generatedColumn:se.getArg(t,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",se.compareByGeneratedPositionsDeflated,se.getArg(t,"bias",Vt.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var o=se.getArg(i,"source",null);o!==null&&(o=this._sources.at(o),o=se.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var a=se.getArg(i,"name",null);return a!==null&&(a=this._names.at(a)),{source:o,line:se.getArg(i,"originalLine",null),column:se.getArg(i,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},"SourceMapConsumer_originalPositionFor");nn.prototype.hasContentsOfAllSources=s(function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null}):!1},"BasicSourceMapConsumer_hasContentsOfAllSources");nn.prototype.sourceContentFor=s(function(t,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(t);if(n>=0)return this.sourcesContent[n];var i=t;this.sourceRoot!=null&&(i=se.relative(this.sourceRoot,i));var o;if(this.sourceRoot!=null&&(o=se.urlParse(this.sourceRoot))){var a=i.replace(/^file:\/\//,"");if(o.scheme=="file"&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];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.')},"SourceMapConsumer_sourceContentFor");nn.prototype.generatedPositionFor=s(function(t){var r=se.getArg(t,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:se.getArg(t,"line"),originalColumn:se.getArg(t,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",se.compareByOriginalPositions,se.getArg(t,"bias",Vt.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===n.source)return{line:se.getArg(o,"generatedLine",null),column:se.getArg(o,"generatedColumn",null),lastColumn:se.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},"SourceMapConsumer_generatedPositionFor");Pw.BasicSourceMapConsumer=nn;function _o(e,t){var r=e;typeof e=="string"&&(r=se.parseSourceMapInput(e));var n=se.getArg(r,"version"),i=se.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new cm,this._names=new cm;var o={line:-1,column:0};this._sections=i.map(function(a){if(a.url)throw new Error("Support for url field in sections not implemented.");var u=se.getArg(a,"offset"),c=se.getArg(u,"line"),l=se.getArg(u,"column");if(c<o.line||c===o.line&&l<o.column)throw new Error("Section offsets must be ordered and non-overlapping.");return o=u,{generatedOffset:{generatedLine:c+1,generatedColumn:l+1},consumer:new Vt(se.getArg(a,"map"),t)}})}s(_o,"IndexedSourceMapConsumer");_o.prototype=Object.create(Vt.prototype);_o.prototype.constructor=Vt;_o.prototype._version=3;Object.defineProperty(_o.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}});_o.prototype.originalPositionFor=s(function(t){var r={generatedLine:se.getArg(t,"line"),generatedColumn:se.getArg(t,"column")},n=WU.search(r,this._sections,function(o,a){var u=o.generatedLine-a.generatedOffset.generatedLine;return u||o.generatedColumn-a.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:t.bias}):{source:null,line:null,column:null,name:null}},"IndexedSourceMapConsumer_originalPositionFor");_o.prototype.hasContentsOfAllSources=s(function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})},"IndexedSourceMapConsumer_hasContentsOfAllSources");_o.prototype.sourceContentFor=s(function(t,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],o=i.consumer.sourceContentFor(t,!0);if(o)return o}if(r)return null;throw new Error('"'+t+'" is not in the SourceMap.')},"IndexedSourceMapConsumer_sourceContentFor");_o.prototype.generatedPositionFor=s(function(t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(se.getArg(t,"source"))!==-1){var i=n.consumer.generatedPositionFor(t);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}},"IndexedSourceMapConsumer_generatedPositionFor");_o.prototype._parseMappings=s(function(t,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],o=i.consumer._generatedMappings,a=0;a<o.length;a++){var u=o[a],c=i.consumer._sources.at(u.source);c=se.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL),this._sources.add(c),c=this._sources.indexOf(c);var l=null;u.name&&(l=i.consumer._names.at(u.name),this._names.add(l),l=this._names.indexOf(l));var f={source:c,generatedLine:u.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:u.generatedColumn+(i.generatedOffset.generatedLine===u.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:u.originalLine,originalColumn:u.originalColumn,name:l};this.__generatedMappings.push(f),typeof f.originalLine=="number"&&this.__originalMappings.push(f)}D0(this.__generatedMappings,se.compareByGeneratedPositionsDeflated),D0(this.__originalMappings,se.compareByOriginalPositions)},"IndexedSourceMapConsumer_parseMappings");Pw.IndexedSourceMapConsumer=_o});var OZ=h(vZ=>{var U7e=VU().SourceMapGenerator,Iw=um(),x7e=/(\r?\n)/,q7e=10,lm="$$$isSourceNode$$$";function Ki(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=r??null,this.name=i??null,this[lm]=!0,n!=null&&this.add(n)}s(Ki,"SourceNode");Ki.fromStringWithSourceMap=s(function(t,r,n){var i=new Ki,o=t.split(x7e),a=0,u=s(function(){var _=g(),m=g()||"";return _+m;function g(){return a<o.length?o[a++]:void 0}},"shiftNextLine"),c=1,l=0,f=null;return r.eachMapping(function(_){if(f!==null)if(c<_.generatedLine)d(f,u()),c++,l=0;else{var m=o[a]||"",g=m.substr(0,_.generatedColumn-l);o[a]=m.substr(_.generatedColumn-l),l=_.generatedColumn,d(f,g),f=_;return}for(;c<_.generatedLine;)i.add(u()),c++;if(l<_.generatedColumn){var m=o[a]||"";i.add(m.substr(0,_.generatedColumn)),o[a]=m.substr(_.generatedColumn),l=_.generatedColumn}f=_},this),a<o.length&&(f&&d(f,u()),i.add(o.splice(a).join(""))),r.sources.forEach(function(_){var m=r.sourceContentFor(_);m!=null&&(n!=null&&(_=Iw.join(n,_)),i.setSourceContent(_,m))}),i;function d(_,m){if(_===null||_.source===void 0)i.add(m);else{var g=n?Iw.join(n,_.source):_.source;i.add(new Ki(_.originalLine,_.originalColumn,g,m,_.name))}}s(d,"addMappingWithCode")},"SourceNode_fromStringWithSourceMap");Ki.prototype.add=s(function(t){if(Array.isArray(t))t.forEach(function(r){this.add(r)},this);else if(t[lm]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this},"SourceNode_add");Ki.prototype.prepend=s(function(t){if(Array.isArray(t))for(var r=t.length-1;r>=0;r--)this.prepend(t[r]);else if(t[lm]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this},"SourceNode_prepend");Ki.prototype.walk=s(function(t){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[lm]?r.walk(t):r!==""&&t(r,{source:this.source,line:this.line,column:this.column,name:this.name})},"SourceNode_walk");Ki.prototype.join=s(function(t){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(t);r.push(this.children[n]),this.children=r}return this},"SourceNode_join");Ki.prototype.replaceRight=s(function(t,r){var n=this.children[this.children.length-1];return n[lm]?n.replaceRight(t,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(t,r):this.children.push("".replace(t,r)),this},"SourceNode_replaceRight");Ki.prototype.setSourceContent=s(function(t,r){this.sourceContents[Iw.toSetString(t)]=r},"SourceNode_setSourceContent");Ki.prototype.walkSourceContents=s(function(t){for(var r=0,n=this.children.length;r<n;r++)this.children[r][lm]&&this.children[r].walkSourceContents(t);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)t(Iw.fromSetString(i[r]),this.sourceContents[i[r]])},"SourceNode_walkSourceContents");Ki.prototype.toString=s(function(){var t="";return this.walk(function(r){t+=r}),t},"SourceNode_toString");Ki.prototype.toStringWithSourceMap=s(function(t){var r={code:"",line:1,column:0},n=new U7e(t),i=!1,o=null,a=null,u=null,c=null;return this.walk(function(l,f){r.code+=l,f.source!==null&&f.line!==null&&f.column!==null?((o!==f.source||a!==f.line||u!==f.column||c!==f.name)&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name}),o=f.source,a=f.line,u=f.column,c=f.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),o=null,i=!1);for(var d=0,_=l.length;d<_;d++)l.charCodeAt(d)===q7e?(r.line++,r.column=0,d+1===_?(o=null,i=!1):i&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name})):r.column++}),this.walkSourceContents(function(l,f){n.setSourceContent(l,f)}),{code:r.code,map:n}},"SourceNode_toStringWithSourceMap");vZ.SourceNode=Ki});var PZ=h(ww=>{ww.SourceMapGenerator=VU().SourceMapGenerator;ww.SourceMapConsumer=SZ().SourceMapConsumer;ww.SourceNode=OZ().SourceNode});var NZ=h((Tw,TZ)=>{"use strict";Tw.__esModule=!0;var JU=zn(),Ed=void 0;try{(typeof define!="function"||!define.amd)&&(IZ=PZ(),Ed=IZ.SourceNode)}catch{}var IZ;Ed||(Ed=s(function(e,t,r,n){this.src="",n&&this.add(n)},"SourceNode"),Ed.prototype={add:s(function(t){JU.isArray(t)&&(t=t.join("")),this.src+=t},"add"),prepend:s(function(t){JU.isArray(t)&&(t=t.join("")),this.src=t+this.src},"prepend"),toStringWithSourceMap:s(function(){return{code:this.toString()}},"toStringWithSourceMap"),toString:s(function(){return this.src},"toString")});function YU(e,t,r){if(JU.isArray(e)){for(var n=[],i=0,o=e.length;i<o;i++)n.push(t.wrap(e[i],r));return n}else if(typeof e=="boolean"||typeof e=="number")return e+"";return e}s(YU,"castChunk");function wZ(e){this.srcFile=e,this.source=[]}s(wZ,"CodeGen");wZ.prototype={isEmpty:s(function(){return!this.source.length},"isEmpty"),prepend:s(function(t,r){this.source.unshift(this.wrap(t,r))},"prepend"),push:s(function(t,r){this.source.push(this.wrap(t,r))},"push"),merge:s(function(){var t=this.empty();return this.each(function(r){t.add([" ",r,`
|
|
157
157
|
`])}),t},"merge"),each:s(function(t){for(var r=0,n=this.source.length;r<n;r++)t(this.source[r])},"each"),empty:s(function(){var t=this.currentLocation||{start:{}};return new Ed(t.start.line,t.start.column,this.srcFile)},"empty"),wrap:s(function(t){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return t instanceof Ed?t:(t=YU(t,this,r),new Ed(r.start.line,r.start.column,this.srcFile,t))},"wrap"),functionCall:s(function(t,r,n){return n=this.generateList(n),this.wrap([t,r?"."+r+"(":"(",n,")"])},"functionCall"),quotedString:s(function(t){return'"'+(t+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},"quotedString"),objectLiteral:s(function(t){var r=this,n=[];Object.keys(t).forEach(function(o){var a=YU(t[o],r);a!=="undefined"&&n.push([r.quotedString(o),":",a])});var i=this.generateList(n);return i.prepend("{"),i.add("}"),i},"objectLiteral"),generateList:s(function(t){for(var r=this.empty(),n=0,i=t.length;n<i;n++)n&&r.add(","),r.add(YU(t[n],this));return r},"generateList"),generateArray:s(function(t){var r=this.generateList(t);return r.prepend("["),r.add("]"),r},"generateArray")};Tw.default=wZ;TZ.exports=Tw.default});var DZ=h((Nw,$Z)=>{"use strict";Nw.__esModule=!0;function CZ(e){return e&&e.__esModule?e:{default:e}}s(CZ,"_interopRequireDefault");var AZ=cw(),F7e=Ss(),XU=CZ(F7e),k7e=zn(),B7e=NZ(),RZ=CZ(B7e);function fm(e){this.value=e}s(fm,"Literal");function dm(){}s(dm,"JavaScriptCompiler");dm.prototype={nameLookup:s(function(t,r){return this.internalNameLookup(t,r)},"nameLookup"),depthedLookup:s(function(t){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(t),")"]},"depthedLookup"),compilerInfo:s(function(){var t=AZ.COMPILER_REVISION,r=AZ.REVISION_CHANGES[t];return[t,r]},"compilerInfo"),appendToBuffer:s(function(t,r,n){return k7e.isArray(t)||(t=[t]),t=this.source.wrap(t,r),this.environment.isSimple?["return ",t,";"]:n?["buffer += ",t,";"]:(t.appendToBuffer=!0,t)},"appendToBuffer"),initializeBuffer:s(function(){return this.quotedString("")},"initializeBuffer"),internalNameLookup:s(function(t,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",t,",",JSON.stringify(r),")"]},"internalNameLookup"),lookupPropertyFunctionIsUsed:!1,compile:s(function(t,r,n,i){this.environment=t,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(t,r),this.useDepths=this.useDepths||t.useDepths||t.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||t.useBlockParams;var o=t.opcodes,a=void 0,u=void 0,c=void 0,l=void 0;for(c=0,l=o.length;c<l;c++)a=o[c],this.source.currentLocation=a.loc,u=u||a.loc,this[a.opcode].apply(this,a.args);if(this.source.currentLocation=u,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new XU.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(),`;
|
|
158
158
|
`]),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) {
|
|
159
159
|
`),this.decorators.push(`}
|
|
@@ -171,16 +171,16 @@ Expecting `+Ce.join(", ")+", got '"+(this.terminals_[I]||I)+"'":bt="Parse error
|
|
|
171
171
|
`:""},this._extScope=t,this._scope=new go.Scope({parent:t}),this._nodes=[new _x]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,i){let o=this._scope.toName(r);return n!==void 0&&i&&(this._constants[o.str]=n),this._leafNode(new lx(t,o,n)),o}const(t,r,n){return this._def(go.varKinds.const,t,r,n)}let(t,r,n){return this._def(go.varKinds.let,t,r,n)}var(t,r,n){return this._def(go.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new qw(t,r,n))}add(t,r){return this._leafNode(new fx(t,Ue.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==Ze.nil&&this._leafNode(new mx(t)),this}object(...t){let r=["{"];for(let[n,i]of t)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,Ze.addCodeArg)(r,i));return r.push("}"),new Ze._Code(r)}if(t,r,n){if(this._blockNode(new vd(t)),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(t){return this._elseNode(new vd(t))}else(){return this._elseNode(new _m)}endIf(){return this._endBlockNode(vd,_m)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new gx(t),r)}forRange(t,r,n,i,o=this.opts.es5?go.varKinds.var:go.varKinds.let){let a=this._scope.toName(t);return this._for(new yx(o,a,r,n),()=>i(a))}forOf(t,r,n,i=go.varKinds.const){let o=this._scope.toName(t);if(this.opts.es5){let a=r instanceof Ze.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,Ze._)`${a}.length`,u=>{this.var(o,(0,Ze._)`${a}[${u}]`),n(o)})}return this._for(new Fw("of",i,o,r),()=>n(o))}forIn(t,r,n,i=this.opts.es5?go.varKinds.var:go.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,Ze._)`Object.keys(${r})`,n);let o=this._scope.toName(t);return this._for(new Fw("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(Od)}label(t){return this._leafNode(new dx(t))}break(t){return this._leafNode(new px(t))}return(t){let r=new B0;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(B0)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new Ex;if(this._blockNode(i),this.code(t),r){let o=this.name("e");this._currNode=i.catch=new G0(o),r(o)}return n&&(this._currNode=i.finally=new V0,this.code(n)),this._endBlockNode(G0,V0)}throw(t){return this._leafNode(new hx(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){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||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=Ze.nil,n,i){return this._blockNode(new k0(t,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(k0)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof vd))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};Ue.CodeGen=bx;function Pd(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}s(Pd,"addNames");function kw(e,t){return t instanceof Ze._CodeOrName?Pd(e,t.names):e}s(kw,"addExprNames");function gm(e,t,r){if(e instanceof Ze.Name)return n(e);if(!i(e))return e;return new Ze._Code(e._items.reduce((o,a)=>(a instanceof Ze.Name&&(a=n(a)),a instanceof Ze._Code?o.push(...a._items):o.push(a),o),[]));function n(o){let a=r[o.str];return a===void 0||t[o.str]!==1?o:(delete t[o.str],a)}function i(o){return o instanceof Ze._Code&&o._items.some(a=>a instanceof Ze.Name&&t[a.str]===1&&r[a.str]!==void 0)}}s(gm,"optimizeExpr");function FWe(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}s(FWe,"subtractNames");function oee(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,Ze._)`!${Sx(e)}`}s(oee,"not");Ue.not=oee;var kWe=aee(Ue.operators.AND);function BWe(...e){return e.reduce(kWe)}s(BWe,"and");Ue.and=BWe;var GWe=aee(Ue.operators.OR);function VWe(...e){return e.reduce(GWe)}s(VWe,"or");Ue.or=VWe;function aee(e){return(t,r)=>t===Ze.nil?r:r===Ze.nil?t:(0,Ze._)`${Sx(t)} ${e} ${Sx(r)}`}s(aee,"mappend");function Sx(e){return e instanceof Ze.Name?e:(0,Ze._)`(${e})`}s(Sx,"par")});var ze=h(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.checkStrictMode=xe.getErrorPath=xe.Type=xe.useFunc=xe.setEvaluated=xe.evaluatedPropsToName=xe.mergeEvaluated=xe.eachItem=xe.unescapeJsonPointer=xe.escapeJsonPointer=xe.escapeFragment=xe.unescapeFragment=xe.schemaRefOrVal=xe.schemaHasRulesButRef=xe.schemaHasRules=xe.checkUnknownRules=xe.alwaysValidSchema=xe.toHash=void 0;var xt=Pe(),zWe=q0();function HWe(e){let t={};for(let r of e)t[r]=!0;return t}s(HWe,"toHash");xe.toHash=HWe;function KWe(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(lee(e,t),!fee(t,e.self.RULES.all))}s(KWe,"alwaysValidSchema");xe.alwaysValidSchema=KWe;function lee(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let i=n.RULES.keywords;for(let o in t)i[o]||mee(e,`unknown keyword: "${o}"`)}s(lee,"checkUnknownRules");xe.checkUnknownRules=lee;function fee(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}s(fee,"schemaHasRules");xe.schemaHasRules=fee;function WWe(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}s(WWe,"schemaHasRulesButRef");xe.schemaHasRulesButRef=WWe;function YWe({topSchemaRef:e,schemaPath:t},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,xt._)`${r}`}return(0,xt._)`${e}${t}${(0,xt.getProperty)(n)}`}s(YWe,"schemaRefOrVal");xe.schemaRefOrVal=YWe;function JWe(e){return dee(decodeURIComponent(e))}s(JWe,"unescapeFragment");xe.unescapeFragment=JWe;function XWe(e){return encodeURIComponent(vx(e))}s(XWe,"escapeFragment");xe.escapeFragment=XWe;function vx(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}s(vx,"escapeJsonPointer");xe.escapeJsonPointer=vx;function dee(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}s(dee,"unescapeJsonPointer");xe.unescapeJsonPointer=dee;function QWe(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}s(QWe,"eachItem");xe.eachItem=QWe;function uee({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(i,o,a,u)=>{let c=a===void 0?o:a instanceof xt.Name?(o instanceof xt.Name?e(i,o,a):t(i,o,a),a):o instanceof xt.Name?(t(i,a,o),o):r(o,a);return u===xt.Name&&!(c instanceof xt.Name)?n(i,c):c}}s(uee,"makeMergeEvaluated");xe.mergeEvaluated={props:uee({mergeNames:(e,t,r)=>e.if((0,xt._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,xt._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,xt._)`${r} || {}`).code((0,xt._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,xt._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,xt._)`${r} || {}`),Ox(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:pee}),items:uee({mergeNames:(e,t,r)=>e.if((0,xt._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,xt._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,xt._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,xt._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function pee(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,xt._)`{}`);return t!==void 0&&Ox(e,r,t),r}s(pee,"evaluatedPropsToName");xe.evaluatedPropsToName=pee;function Ox(e,t,r){Object.keys(r).forEach(n=>e.assign((0,xt._)`${t}${(0,xt.getProperty)(n)}`,!0))}s(Ox,"setEvaluated");xe.setEvaluated=Ox;var cee={};function ZWe(e,t){return e.scopeValue("func",{ref:t,code:cee[t.code]||(cee[t.code]=new zWe._Code(t.code))})}s(ZWe,"useFunc");xe.useFunc=ZWe;var hee;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(hee=xe.Type||(xe.Type={}));function eYe(e,t,r){if(e instanceof xt.Name){let n=t===hee.Num;return r?n?(0,xt._)`"[" + ${e} + "]"`:(0,xt._)`"['" + ${e} + "']"`:n?(0,xt._)`"/" + ${e}`:(0,xt._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,xt.getProperty)(e).toString():"/"+vx(e)}s(eYe,"getErrorPath");xe.getErrorPath=eYe;function mee(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}s(mee,"checkStrictMode");xe.checkStrictMode=mee});var Is=h(Px=>{"use strict";Object.defineProperty(Px,"__esModule",{value:!0});var wn=Pe(),tYe={data:new wn.Name("data"),valCxt:new wn.Name("valCxt"),instancePath:new wn.Name("instancePath"),parentData:new wn.Name("parentData"),parentDataProperty:new wn.Name("parentDataProperty"),rootData:new wn.Name("rootData"),dynamicAnchors:new wn.Name("dynamicAnchors"),vErrors:new wn.Name("vErrors"),errors:new wn.Name("errors"),this:new wn.Name("this"),self:new wn.Name("self"),scope:new wn.Name("scope"),json:new wn.Name("json"),jsonPos:new wn.Name("jsonPos"),jsonLen:new wn.Name("jsonLen"),jsonPart:new wn.Name("jsonPart")};Px.default=tYe});var z0=h(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.extendErrors=Tn.resetErrorsCount=Tn.reportExtraError=Tn.reportError=Tn.keyword$DataError=Tn.keywordError=void 0;var st=Pe(),Gw=ze(),Kn=Is();Tn.keywordError={message:({keyword:e})=>(0,st.str)`must pass "${e}" keyword validation`};Tn.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,st.str)`"${e}" keyword must be ${t} ($data)`:(0,st.str)`"${e}" keyword is invalid ($data)`};function rYe(e,t=Tn.keywordError,r,n){let{it:i}=e,{gen:o,compositeRule:a,allErrors:u}=i,c=yee(e,t,r);n??(a||u)?_ee(o,c):gee(i,(0,st._)`[${c}]`)}s(rYe,"reportError");Tn.reportError=rYe;function nYe(e,t=Tn.keywordError,r){let{it:n}=e,{gen:i,compositeRule:o,allErrors:a}=n,u=yee(e,t,r);_ee(i,u),o||a||gee(n,Kn.default.vErrors)}s(nYe,"reportExtraError");Tn.reportExtraError=nYe;function iYe(e,t){e.assign(Kn.default.errors,t),e.if((0,st._)`${Kn.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,st._)`${Kn.default.vErrors}.length`,t),()=>e.assign(Kn.default.vErrors,null)))}s(iYe,"resetErrorsCount");Tn.resetErrorsCount=iYe;function sYe({gen:e,keyword:t,schemaValue:r,data:n,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let a=e.name("err");e.forRange("i",i,Kn.default.errors,u=>{e.const(a,(0,st._)`${Kn.default.vErrors}[${u}]`),e.if((0,st._)`${a}.instancePath === undefined`,()=>e.assign((0,st._)`${a}.instancePath`,(0,st.strConcat)(Kn.default.instancePath,o.errorPath))),e.assign((0,st._)`${a}.schemaPath`,(0,st.str)`${o.errSchemaPath}/${t}`),o.opts.verbose&&(e.assign((0,st._)`${a}.schema`,r),e.assign((0,st._)`${a}.data`,n))})}s(sYe,"extendErrors");Tn.extendErrors=sYe;function _ee(e,t){let r=e.const("err",t);e.if((0,st._)`${Kn.default.vErrors} === null`,()=>e.assign(Kn.default.vErrors,(0,st._)`[${r}]`),(0,st._)`${Kn.default.vErrors}.push(${r})`),e.code((0,st._)`${Kn.default.errors}++`)}s(_ee,"addError");function gee(e,t){let{gen:r,validateName:n,schemaEnv:i}=e;i.$async?r.throw((0,st._)`new ${e.ValidationError}(${t})`):(r.assign((0,st._)`${n}.errors`,t),r.return(!1))}s(gee,"returnErrors");var Id={keyword:new st.Name("keyword"),schemaPath:new st.Name("schemaPath"),params:new st.Name("params"),propertyName:new st.Name("propertyName"),message:new st.Name("message"),schema:new st.Name("schema"),parentSchema:new st.Name("parentSchema")};function yee(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,st._)`{}`:oYe(e,t,r)}s(yee,"errorObjectCode");function oYe(e,t,r={}){let{gen:n,it:i}=e,o=[aYe(i,r),uYe(e,r)];return cYe(e,t,o),n.object(...o)}s(oYe,"errorObject");function aYe({errorPath:e},{instancePath:t}){let r=t?(0,st.str)`${e}${(0,Gw.getErrorPath)(t,Gw.Type.Str)}`:e;return[Kn.default.instancePath,(0,st.strConcat)(Kn.default.instancePath,r)]}s(aYe,"errorInstancePath");function uYe({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let i=n?t:(0,st.str)`${t}/${e}`;return r&&(i=(0,st.str)`${i}${(0,Gw.getErrorPath)(r,Gw.Type.Str)}`),[Id.schemaPath,i]}s(uYe,"errorSchemaPath");function cYe(e,{params:t,message:r},n){let{keyword:i,data:o,schemaValue:a,it:u}=e,{opts:c,propertyName:l,topSchemaRef:f,schemaPath:d}=u;n.push([Id.keyword,i],[Id.params,typeof t=="function"?t(e):t||(0,st._)`{}`]),c.messages&&n.push([Id.message,typeof r=="function"?r(e):r]),c.verbose&&n.push([Id.schema,a],[Id.parentSchema,(0,st._)`${f}${d}`],[Kn.default.data,o]),l&&n.push([Id.propertyName,l])}s(cYe,"extraErrorProps")});var bee=h(ym=>{"use strict";Object.defineProperty(ym,"__esModule",{value:!0});ym.boolOrEmptySchema=ym.topBoolOrEmptySchema=void 0;var lYe=z0(),fYe=Pe(),dYe=Is(),pYe={message:"boolean schema is false"};function hYe(e){let{gen:t,schema:r,validateName:n}=e;r===!1?Eee(e,!1):typeof r=="object"&&r.$async===!0?t.return(dYe.default.data):(t.assign((0,fYe._)`${n}.errors`,null),t.return(!0))}s(hYe,"topBoolOrEmptySchema");ym.topBoolOrEmptySchema=hYe;function mYe(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),Eee(e)):r.var(t,!0)}s(mYe,"boolOrEmptySchema");ym.boolOrEmptySchema=mYe;function Eee(e,t){let{gen:r,data:n}=e,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,lYe.reportError)(i,pYe,void 0,t)}s(Eee,"falseSchemaError")});var Ix=h(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0});Em.getRules=Em.isJSONType=void 0;var _Ye=["string","number","integer","boolean","null","object","array"],gYe=new Set(_Ye);function yYe(e){return typeof e=="string"&&gYe.has(e)}s(yYe,"isJSONType");Em.isJSONType=yYe;function EYe(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}s(EYe,"getRules");Em.getRules=EYe});var wx=h(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:!0});jc.shouldUseRule=jc.shouldUseGroup=jc.schemaHasRulesForType=void 0;function bYe({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&See(e,n)}s(bYe,"schemaHasRulesForType");jc.schemaHasRulesForType=bYe;function See(e,t){return t.rules.some(r=>vee(e,r))}s(See,"shouldUseGroup");jc.shouldUseGroup=See;function vee(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}s(vee,"shouldUseRule");jc.shouldUseRule=vee});var K0=h(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.reportTypeError=sn.checkDataTypes=sn.checkDataType=sn.coerceAndCheckDataType=sn.getJSONTypes=sn.getSchemaTypes=sn.DataType=void 0;var SYe=Ix(),vYe=wx(),OYe=z0(),Ae=Pe(),Oee=ze(),H0;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(H0=sn.DataType||(sn.DataType={}));function PYe(e){let t=Pee(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}s(PYe,"getSchemaTypes");sn.getSchemaTypes=PYe;function Pee(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(SYe.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}s(Pee,"getJSONTypes");sn.getJSONTypes=Pee;function IYe(e,t){let{gen:r,data:n,opts:i}=e,o=wYe(t,i.coerceTypes),a=t.length>0&&!(o.length===0&&t.length===1&&(0,vYe.schemaHasRulesForType)(e,t[0]));if(a){let u=Nx(t,n,i.strictNumbers,H0.Wrong);r.if(u,()=>{o.length?TYe(e,t,o):Ax(e)})}return a}s(IYe,"coerceAndCheckDataType");sn.coerceAndCheckDataType=IYe;var Iee=new Set(["string","number","integer","boolean","null"]);function wYe(e,t){return t?e.filter(r=>Iee.has(r)||t==="array"&&r==="array"):[]}s(wYe,"coerceToTypes");function TYe(e,t,r){let{gen:n,data:i,opts:o}=e,a=n.let("dataType",(0,Ae._)`typeof ${i}`),u=n.let("coerced",(0,Ae._)`undefined`);o.coerceTypes==="array"&&n.if((0,Ae._)`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,Ae._)`${i}[0]`).assign(a,(0,Ae._)`typeof ${i}`).if(Nx(t,i,o.strictNumbers),()=>n.assign(u,i))),n.if((0,Ae._)`${u} !== undefined`);for(let l of r)(Iee.has(l)||l==="array"&&o.coerceTypes==="array")&&c(l);n.else(),Ax(e),n.endIf(),n.if((0,Ae._)`${u} !== undefined`,()=>{n.assign(i,u),NYe(e,u)});function c(l){switch(l){case"string":n.elseIf((0,Ae._)`${a} == "number" || ${a} == "boolean"`).assign(u,(0,Ae._)`"" + ${i}`).elseIf((0,Ae._)`${i} === null`).assign(u,(0,Ae._)`""`);return;case"number":n.elseIf((0,Ae._)`${a} == "boolean" || ${i} === null
|
|
172
172
|
|| (${a} == "string" && ${i} && ${i} == +${i})`).assign(u,(0,Ae._)`+${i}`);return;case"integer":n.elseIf((0,Ae._)`${a} === "boolean" || ${i} === null
|
|
173
173
|
|| (${a} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(u,(0,Ae._)`+${i}`);return;case"boolean":n.elseIf((0,Ae._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(u,!1).elseIf((0,Ae._)`${i} === "true" || ${i} === 1`).assign(u,!0);return;case"null":n.elseIf((0,Ae._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(u,null);return;case"array":n.elseIf((0,Ae._)`${a} === "string" || ${a} === "number"
|
|
174
|
-
|| ${a} === "boolean" || ${i} === null`).assign(u,(0,Ae._)`[${i}]`)}}s(c,"coerceSpecificType")}s(TYe,"coerceData");function NYe({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,Ae._)`${t} !== undefined`,()=>e.assign((0,Ae._)`${t}[${r}]`,n))}s(NYe,"assignParentData");function Tx(e,t,r,n=H0.Correct){let i=n===H0.Correct?Ae.operators.EQ:Ae.operators.NEQ,o;switch(e){case"null":return(0,Ae._)`${t} ${i} null`;case"array":o=(0,Ae._)`Array.isArray(${t})`;break;case"object":o=(0,Ae._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a((0,Ae._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return(0,Ae._)`typeof ${t} ${i} ${e}`}return n===H0.Correct?o:(0,Ae.not)(o);function a(u=Ae.nil){return(0,Ae.and)((0,Ae._)`typeof ${t} == "number"`,u,r?(0,Ae._)`isFinite(${t})`:Ae.nil)}}s(Tx,"checkDataType");sn.checkDataType=Tx;function Nx(e,t,r,n){if(e.length===1)return Tx(e[0],t,r,n);let i,o=(0,Oee.toHash)(e);if(o.array&&o.object){let a=(0,Ae._)`typeof ${t} != "object"`;i=o.null?a:(0,Ae._)`!${t} || ${a}`,delete o.null,delete o.array,delete o.object}else i=Ae.nil;o.number&&delete o.integer;for(let a in o)i=(0,Ae.and)(i,Tx(a,t,r,n));return i}s(Nx,"checkDataTypes");sn.checkDataTypes=Nx;var AYe={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,Ae._)`{type: ${e}}`:(0,Ae._)`{type: ${t}}`};function Ax(e){let t=RYe(e);(0,OYe.reportError)(t,AYe)}s(Ax,"reportTypeError");sn.reportTypeError=Ax;function RYe(e){let{gen:t,data:r,schema:n}=e,i=(0,Oee.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}s(RYe,"getTypeErrorContext")});var Tee=h(Vw=>{"use strict";Object.defineProperty(Vw,"__esModule",{value:!0});Vw.assignDefaults=void 0;var bm=Pe(),CYe=ze();function $Ye(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)wee(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,o)=>wee(e,o,i.default))}s($Ye,"assignDefaults");Vw.assignDefaults=$Ye;function wee(e,t,r){let{gen:n,compositeRule:i,data:o,opts:a}=e;if(r===void 0)return;let u=(0,bm._)`${o}${(0,bm.getProperty)(t)}`;if(i){(0,CYe.checkStrictMode)(e,`default is ignored for: ${u}`);return}let c=(0,bm._)`${u} === undefined`;a.useDefaults==="empty"&&(c=(0,bm._)`${c} || ${u} === null || ${u} === ""`),n.if(c,(0,bm._)`${u} = ${(0,bm.stringify)(r)}`)}s(wee,"assignDefault")});var ws=h($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.validateUnion=$t.validateArray=$t.usePattern=$t.callValidateCode=$t.schemaProperties=$t.allSchemaProperties=$t.noPropertyInData=$t.propertyInData=$t.isOwnProperty=$t.hasPropFunc=$t.reportMissingProp=$t.checkMissingProp=$t.checkReportMissingProp=void 0;var zt=Pe(),Rx=ze(),Mc=Is(),DYe=ze();function LYe(e,t){let{gen:r,data:n,it:i}=e;r.if($x(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,zt._)`${t}`},!0),e.error()})}s(LYe,"checkReportMissingProp");$t.checkReportMissingProp=LYe;function jYe({gen:e,data:t,it:{opts:r}},n,i){return(0,zt.or)(...n.map(o=>(0,zt.and)($x(e,t,o,r.ownProperties),(0,zt._)`${i} = ${o}`)))}s(jYe,"checkMissingProp");$t.checkMissingProp=jYe;function MYe(e,t){e.setParams({missingProperty:t},!0),e.error()}s(MYe,"reportMissingProp");$t.reportMissingProp=MYe;function Nee(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,zt._)`Object.prototype.hasOwnProperty`})}s(Nee,"hasPropFunc");$t.hasPropFunc=Nee;function Cx(e,t,r){return(0,zt._)`${Nee(e)}.call(${t}, ${r})`}s(Cx,"isOwnProperty");$t.isOwnProperty=Cx;function UYe(e,t,r,n){let i=(0,zt._)`${t}${(0,zt.getProperty)(r)} !== undefined`;return n?(0,zt._)`${i} && ${Cx(e,t,r)}`:i}s(UYe,"propertyInData");$t.propertyInData=UYe;function $x(e,t,r,n){let i=(0,zt._)`${t}${(0,zt.getProperty)(r)} === undefined`;return n?(0,zt.or)(i,(0,zt.not)(Cx(e,t,r))):i}s($x,"noPropertyInData");$t.noPropertyInData=$x;function Aee(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}s(Aee,"allSchemaProperties");$t.allSchemaProperties=Aee;function xYe(e,t){return Aee(t).filter(r=>!(0,Rx.alwaysValidSchema)(e,t[r]))}s(xYe,"schemaProperties");$t.schemaProperties=xYe;function qYe({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:a},u,c,l){let f=l?(0,zt._)`${e}, ${t}, ${n}${i}`:t,d=[[Mc.default.instancePath,(0,zt.strConcat)(Mc.default.instancePath,o)],[Mc.default.parentData,a.parentData],[Mc.default.parentDataProperty,a.parentDataProperty],[Mc.default.rootData,Mc.default.rootData]];a.opts.dynamicRef&&d.push([Mc.default.dynamicAnchors,Mc.default.dynamicAnchors]);let _=(0,zt._)`${f}, ${r.object(...d)}`;return c!==zt.nil?(0,zt._)`${u}.call(${c}, ${_})`:(0,zt._)`${u}(${_})`}s(qYe,"callValidateCode");$t.callValidateCode=qYe;var FYe=(0,zt._)`new RegExp`;function kYe({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,o=i(r,n);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,zt._)`${i.code==="new RegExp"?FYe:(0,DYe.useFunc)(e,i)}(${r}, ${n})`})}s(kYe,"usePattern");$t.usePattern=kYe;function BYe(e){let{gen:t,data:r,keyword:n,it:i}=e,o=t.name("valid");if(i.allErrors){let u=t.let("valid",!0);return a(()=>t.assign(u,!1)),u}return t.var(o,!0),a(()=>t.break()),o;function a(u){let c=t.const("len",(0,zt._)`${r}.length`);t.forRange("i",0,c,l=>{e.subschema({keyword:n,dataProp:l,dataPropType:Rx.Type.Num},o),t.if((0,zt.not)(o),u)})}s(a,"validateItems")}s(BYe,"validateArray");$t.validateArray=BYe;function GYe(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,Rx.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let a=t.let("valid",!1),u=t.name("_valid");t.block(()=>r.forEach((c,l)=>{let f=e.subschema({keyword:n,schemaProp:l,compositeRule:!0},u);t.assign(a,(0,zt._)`${a} || ${u}`),e.mergeValidEvaluated(f,u)||t.if((0,zt.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}s(GYe,"validateUnion");$t.validateUnion=GYe});var $ee=h(pa=>{"use strict";Object.defineProperty(pa,"__esModule",{value:!0});pa.validateKeywordUsage=pa.validSchemaType=pa.funcKeywordCode=pa.macroKeywordCode=void 0;var Wn=Pe(),wd=Is(),VYe=ws(),zYe=z0();function HYe(e,t){let{gen:r,keyword:n,schema:i,parentSchema:o,it:a}=e,u=t.macro.call(a.self,i,o,a),c=Cee(r,n,u);a.opts.validateSchema!==!1&&a.self.validateSchema(u,!0);let l=r.name("valid");e.subschema({schema:u,schemaPath:Wn.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}s(HYe,"macroKeywordCode");pa.macroKeywordCode=HYe;function KYe(e,t){var r;let{gen:n,keyword:i,schema:o,parentSchema:a,$data:u,it:c}=e;YYe(c,t);let l=!u&&t.compile?t.compile.call(c.self,o,a,c):t.validate,f=Cee(n,i,l),d=n.let("valid");e.block$data(d,_),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function _(){if(t.errors===!1)y(),t.modifying&&Ree(e),b(()=>e.error());else{let E=t.async?m():g();t.modifying&&Ree(e),b(()=>WYe(e,E))}}s(_,"validateKeyword");function m(){let E=n.let("ruleErrs",null);return n.try(()=>y((0,Wn._)`await `),S=>n.assign(d,!1).if((0,Wn._)`${S} instanceof ${c.ValidationError}`,()=>n.assign(E,(0,Wn._)`${S}.errors`),()=>n.throw(S))),E}s(m,"validateAsync");function g(){let E=(0,Wn._)`${f}.errors`;return n.assign(E,null),y(Wn.nil),E}s(g,"validateSync");function y(E=t.async?(0,Wn._)`await `:Wn.nil){let S=c.opts.passContext?wd.default.this:wd.default.self,O=!("compile"in t&&!u||t.schema===!1);n.assign(d,(0,Wn._)`${E}${(0,VYe.callValidateCode)(e,f,S,O)}`,t.modifying)}s(y,"assignValid");function b(E){var S;n.if((0,Wn.not)((S=t.valid)!==null&&S!==void 0?S:d),E)}s(b,"reportErrs")}s(KYe,"funcKeywordCode");pa.funcKeywordCode=KYe;function Ree(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Wn._)`${n.parentData}[${n.parentDataProperty}]`))}s(Ree,"modifyData");function WYe(e,t){let{gen:r}=e;r.if((0,Wn._)`Array.isArray(${t})`,()=>{r.assign(wd.default.vErrors,(0,Wn._)`${wd.default.vErrors} === null ? ${t} : ${wd.default.vErrors}.concat(${t})`).assign(wd.default.errors,(0,Wn._)`${wd.default.vErrors}.length`),(0,zYe.extendErrors)(e)},()=>e.error())}s(WYe,"addErrs");function YYe({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}s(YYe,"checkAsyncKeyword");function Cee(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Wn.stringify)(r)})}s(Cee,"useKeyword");function JYe(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}s(JYe,"validSchemaType");pa.validSchemaType=JYe;function XYe({schema:e,opts:t,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 a=i.dependencies;if(a?.some(u=>!Object.prototype.hasOwnProperty.call(e,u)))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){let c=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}s(XYe,"validateKeywordUsage");pa.validateKeywordUsage=XYe});var Lee=h(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});Uc.extendSubschemaMode=Uc.extendSubschemaData=Uc.getSubschema=void 0;var ha=Pe(),Dee=ze();function QYe(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:a}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let u=e.schema[t];return r===void 0?{schema:u,schemaPath:(0,ha._)`${e.schemaPath}${(0,ha.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:u[r],schemaPath:(0,ha._)`${e.schemaPath}${(0,ha.getProperty)(t)}${(0,ha.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Dee.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}s(QYe,"getSubschema");Uc.getSubschema=QYe;function ZYe(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:a}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:u}=t;if(r!==void 0){let{errorPath:l,dataPathArr:f,opts:d}=t,_=u.let("data",(0,ha._)`${t.data}${(0,ha.getProperty)(r)}`,!0);c(_),e.errorPath=(0,ha.str)`${l}${(0,Dee.getErrorPath)(r,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,ha._)`${r}`,e.dataPathArr=[...f,e.parentDataProperty]}if(i!==void 0){let l=i instanceof ha.Name?i:u.let("data",i,!0);c(l),a!==void 0&&(e.propertyName=a)}o&&(e.dataTypes=o);function c(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}s(c,"dataContextProps")}s(ZYe,"extendSubschemaData");Uc.extendSubschemaData=ZYe;function eJe(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),o!==void 0&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}s(eJe,"extendSubschemaMode");Uc.extendSubschemaMode=eJe});var W0=h(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.getSchemaRefs=Oi.resolveUrl=Oi.normalizeId=Oi._getFullPath=Oi.getFullPath=Oi.inlineRef=void 0;var tJe=ze(),rJe=Xf(),nJe=HP(),iJe=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function sJe(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Dx(e):t?jee(e)<=t:!1}s(sJe,"inlineRef");Oi.inlineRef=sJe;var oJe=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Dx(e){for(let t in e){if(oJe.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Dx)||typeof r=="object"&&Dx(r))return!0}return!1}s(Dx,"hasRef");function jee(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!iJe.has(r)&&(typeof e[r]=="object"&&(0,tJe.eachItem)(e[r],n=>t+=jee(n)),t===1/0))return 1/0}return t}s(jee,"countKeys");function Mee(e,t="",r){r!==!1&&(t=Sm(t));let n=e.parse(t);return Uee(e,n)}s(Mee,"getFullPath");Oi.getFullPath=Mee;function Uee(e,t){return e.serialize(t).split("#")[0]+"#"}s(Uee,"_getFullPath");Oi._getFullPath=Uee;var aJe=/#\/?$/;function Sm(e){return e?e.replace(aJe,""):""}s(Sm,"normalizeId");Oi.normalizeId=Sm;function uJe(e,t,r){return r=Sm(r),e.resolve(t,r)}s(uJe,"resolveUrl");Oi.resolveUrl=uJe;var cJe=/^[a-z_][-a-z0-9._]*$/i;function lJe(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=Sm(e[r]||t),o={"":i},a=Mee(n,i,!1),u={},c=new Set;return nJe(e,{allKeys:!0},(d,_,m,g)=>{if(g===void 0)return;let y=a+_,b=o[g];typeof d[r]=="string"&&(b=E.call(this,d[r])),S.call(this,d.$anchor),S.call(this,d.$dynamicAnchor),o[_]=b;function E(O){let I=this.opts.uriResolver.resolve;if(O=Sm(b?I(b,O):O),c.has(O))throw f(O);c.add(O);let w=this.refs[O];return typeof w=="string"&&(w=this.refs[w]),typeof w=="object"?l(d,w.schema,O):O!==Sm(y)&&(O[0]==="#"?(l(d,u[O],O),u[O]=d):this.refs[O]=y),O}s(E,"addRef");function S(O){if(typeof O=="string"){if(!cJe.test(O))throw new Error(`invalid anchor "${O}"`);E.call(this,`#${O}`)}}s(S,"addAnchor")}),u;function l(d,_,m){if(_!==void 0&&!rJe(d,_))throw f(m)}s(l,"checkAmbiguosRef");function f(d){return new Error(`reference "${d}" resolves to more than one schema`)}s(f,"ambiguos")}s(lJe,"getSchemaRefs");Oi.getSchemaRefs=lJe});var X0=h(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});xc.getData=xc.KeywordCxt=xc.validateFunctionCode=void 0;var Bee=bee(),xee=K0(),jx=wx(),zw=K0(),fJe=Tee(),J0=$ee(),Lx=Lee(),ce=Pe(),Se=Is(),dJe=W0(),bu=ze(),Y0=z0();function pJe(e){if(zee(e)&&(Hee(e),Vee(e))){_Je(e);return}Gee(e,()=>(0,Bee.topBoolOrEmptySchema)(e))}s(pJe,"validateFunctionCode");xc.validateFunctionCode=pJe;function Gee({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,(0,ce._)`${Se.default.data}, ${Se.default.valCxt}`,n.$async,()=>{e.code((0,ce._)`"use strict"; ${qee(r,i)}`),mJe(e,i),e.code(o)}):e.func(t,(0,ce._)`${Se.default.data}, ${hJe(i)}`,n.$async,()=>e.code(qee(r,i)).code(o))}s(Gee,"validateFunction");function hJe(e){return(0,ce._)`{${Se.default.instancePath}="", ${Se.default.parentData}, ${Se.default.parentDataProperty}, ${Se.default.rootData}=${Se.default.data}${e.dynamicRef?(0,ce._)`, ${Se.default.dynamicAnchors}={}`:ce.nil}}={}`}s(hJe,"destructureValCxt");function mJe(e,t){e.if(Se.default.valCxt,()=>{e.var(Se.default.instancePath,(0,ce._)`${Se.default.valCxt}.${Se.default.instancePath}`),e.var(Se.default.parentData,(0,ce._)`${Se.default.valCxt}.${Se.default.parentData}`),e.var(Se.default.parentDataProperty,(0,ce._)`${Se.default.valCxt}.${Se.default.parentDataProperty}`),e.var(Se.default.rootData,(0,ce._)`${Se.default.valCxt}.${Se.default.rootData}`),t.dynamicRef&&e.var(Se.default.dynamicAnchors,(0,ce._)`${Se.default.valCxt}.${Se.default.dynamicAnchors}`)},()=>{e.var(Se.default.instancePath,(0,ce._)`""`),e.var(Se.default.parentData,(0,ce._)`undefined`),e.var(Se.default.parentDataProperty,(0,ce._)`undefined`),e.var(Se.default.rootData,Se.default.data),t.dynamicRef&&e.var(Se.default.dynamicAnchors,(0,ce._)`{}`)})}s(mJe,"destructureValCxtES5");function _Je(e){let{schema:t,opts:r,gen:n}=e;Gee(e,()=>{r.$comment&&t.$comment&&Wee(e),SJe(e),n.let(Se.default.vErrors,null),n.let(Se.default.errors,0),r.unevaluated&&gJe(e),Kee(e),PJe(e)})}s(_Je,"topSchemaObjCode");function gJe(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,ce._)`${r}.evaluated`),t.if((0,ce._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,ce._)`${e.evaluated}.props`,(0,ce._)`undefined`)),t.if((0,ce._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,ce._)`${e.evaluated}.items`,(0,ce._)`undefined`))}s(gJe,"resetEvaluated");function qee(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,ce._)`/*# sourceURL=${r} */`:ce.nil}s(qee,"funcSourceUrl");function yJe(e,t){if(zee(e)&&(Hee(e),Vee(e))){EJe(e,t);return}(0,Bee.boolOrEmptySchema)(e,t)}s(yJe,"subschemaCode");function Vee({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}s(Vee,"schemaCxtHasRules");function zee(e){return typeof e.schema!="boolean"}s(zee,"isSchemaObj");function EJe(e,t){let{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&Wee(e),vJe(e),OJe(e);let o=n.const("_errs",Se.default.errors);Kee(e,o),n.var(t,(0,ce._)`${o} === ${Se.default.errors}`)}s(EJe,"subSchemaObjCode");function Hee(e){(0,bu.checkUnknownRules)(e),bJe(e)}s(Hee,"checkKeywords");function Kee(e,t){if(e.opts.jtd)return Fee(e,[],!1,t);let r=(0,xee.getSchemaTypes)(e.schema),n=(0,xee.coerceAndCheckDataType)(e,r);Fee(e,r,!n,t)}s(Kee,"typeAndKeywords");function bJe(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,bu.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}s(bJe,"checkRefsAndKeywords");function SJe(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,bu.checkStrictMode)(e,"default is ignored in the schema root")}s(SJe,"checkNoDefault");function vJe(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,dJe.resolveUrl)(e.opts.uriResolver,e.baseId,t))}s(vJe,"updateContext");function OJe(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}s(OJe,"checkAsyncSchema");function Wee({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)e.code((0,ce._)`${Se.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let a=(0,ce.str)`${n}/$comment`,u=e.scopeValue("root",{ref:t.root});e.code((0,ce._)`${Se.default.self}.opts.$comment(${o}, ${a}, ${u}.schema)`)}}s(Wee,"commentKeyword");function PJe(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if((0,ce._)`${Se.default.errors} === 0`,()=>t.return(Se.default.data),()=>t.throw((0,ce._)`new ${i}(${Se.default.vErrors})`)):(t.assign((0,ce._)`${n}.errors`,Se.default.vErrors),o.unevaluated&&IJe(e),t.return((0,ce._)`${Se.default.errors} === 0`))}s(PJe,"returnResults");function IJe({gen:e,evaluated:t,props:r,items:n}){r instanceof ce.Name&&e.assign((0,ce._)`${t}.props`,r),n instanceof ce.Name&&e.assign((0,ce._)`${t}.items`,n)}s(IJe,"assignEvaluated");function Fee(e,t,r,n){let{gen:i,schema:o,data:a,allErrors:u,opts:c,self:l}=e,{RULES:f}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,bu.schemaHasRulesButRef)(o,f))){i.block(()=>Jee(e,"$ref",f.all.$ref.definition));return}c.jtd||wJe(e,t),i.block(()=>{for(let _ of f.rules)d(_);d(f.post)});function d(_){(0,jx.shouldUseGroup)(o,_)&&(_.type?(i.if((0,zw.checkDataType)(_.type,a,c.strictNumbers)),kee(e,_),t.length===1&&t[0]===_.type&&r&&(i.else(),(0,zw.reportTypeError)(e)),i.endIf()):kee(e,_),u||i.if((0,ce._)`${Se.default.errors} === ${n||0}`))}s(d,"groupKeywords")}s(Fee,"schemaKeywords");function kee(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,fJe.assignDefaults)(e,t.type),r.block(()=>{for(let o of t.rules)(0,jx.shouldUseRule)(n,o)&&Jee(e,o.keyword,o.definition,t.type)})}s(kee,"iterateKeywords");function wJe(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(TJe(e,t),e.opts.allowUnionTypes||NJe(e,t),AJe(e,e.dataTypes))}s(wJe,"checkStrictTypes");function TJe(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{Yee(e.dataTypes,r)||Mx(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),CJe(e,t)}}s(TJe,"checkContextTypes");function NJe(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Mx(e,"use allowUnionTypes to allow union type keyword")}s(NJe,"checkMultipleTypes");function AJe(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,jx.shouldUseRule)(e.schema,i)){let{type:o}=i.definition;o.length&&!o.some(a=>RJe(t,a))&&Mx(e,`missing type "${o.join(",")}" for keyword "${n}"`)}}}s(AJe,"checkKeywordTypes");function RJe(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}s(RJe,"hasApplicableType");function Yee(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}s(Yee,"includesType");function CJe(e,t){let r=[];for(let n of e.dataTypes)Yee(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}s(CJe,"narrowSchemaTypes");function Mx(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,bu.checkStrictMode)(e,t,e.opts.strictTypes)}s(Mx,"strictTypesError");var Hw=class{static{s(this,"KeywordCxt")}constructor(t,r,n){if((0,J0.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,bu.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",Xee(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,J0.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=t.gen.const("_errs",Se.default.errors))}result(t,r,n){this.failResult((0,ce.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,ce.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,ce._)`${r} !== undefined && (${(0,ce.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Y0.reportExtraError:Y0.reportError)(this,this.def.error,r)}$dataError(){(0,Y0.reportError)(this,this.def.$dataError||Y0.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Y0.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=ce.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=ce.nil,r=ce.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:a}=this;n.if((0,ce.or)((0,ce._)`${i} === undefined`,r)),t!==ce.nil&&n.assign(t,!0),(o.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==ce.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,ce.or)(a(),u());function a(){if(n.length){if(!(r instanceof ce.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,ce._)`${(0,zw.checkDataTypes)(c,r,o.opts.strictNumbers,zw.DataType.Wrong)}`}return ce.nil}function u(){if(i.validateSchema){let c=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,ce._)`!${c}(${r})`}return ce.nil}}subschema(t,r){let n=(0,Lx.getSubschema)(this.it,t);(0,Lx.extendSubschemaData)(n,this.it,t),(0,Lx.extendSubschemaMode)(n,t);let i={...this.it,...n,items:void 0,props:void 0};return yJe(i,r),i}mergeEvaluated(t,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=bu.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=bu.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,ce.Name)),!0}};xc.KeywordCxt=Hw;function Jee(e,t,r,n){let i=new Hw(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,J0.funcKeywordCode)(i,r):"macro"in r?(0,J0.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,J0.funcKeywordCode)(i,r)}s(Jee,"keywordCode");var $Je=/^\/(?:[^~]|~0|~1)*$/,DJe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Xee(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(e==="")return Se.default.rootData;if(e[0]==="/"){if(!$Je.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=Se.default.rootData}else{let l=DJe.exec(e);if(!l)throw new Error(`Invalid JSON-pointer: ${e}`);let f=+l[1];if(i=l[2],i==="#"){if(f>=t)throw new Error(c("property/index",f));return n[t-f]}if(f>t)throw new Error(c("data",f));if(o=r[t-f],!i)return o}let a=o,u=i.split("/");for(let l of u)l&&(o=(0,ce._)`${o}${(0,ce.getProperty)((0,bu.unescapeJsonPointer)(l))}`,a=(0,ce._)`${a} && ${o}`);return a;function c(l,f){return`Cannot access ${l} ${f} levels up, current level is ${t}`}}s(Xee,"getData");xc.getData=Xee});var Kw=h(xx=>{"use strict";Object.defineProperty(xx,"__esModule",{value:!0});var Ux=class extends Error{static{s(this,"ValidationError")}constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};xx.default=Ux});var Ww=h(kx=>{"use strict";Object.defineProperty(kx,"__esModule",{value:!0});var qx=W0(),Fx=class extends Error{static{s(this,"MissingRefError")}constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,qx.resolveUrl)(t,r,n),this.missingSchema=(0,qx.normalizeId)((0,qx.getFullPath)(t,this.missingRef))}};kx.default=Fx});var Q0=h(Ts=>{"use strict";Object.defineProperty(Ts,"__esModule",{value:!0});Ts.resolveSchema=Ts.getCompilingSchema=Ts.resolveRef=Ts.compileSchema=Ts.SchemaEnv=void 0;var yo=Pe(),LJe=Kw(),Td=Is(),Eo=W0(),Qee=ze(),jJe=X0(),vm=class{static{s(this,"SchemaEnv")}constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,Eo.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};Ts.SchemaEnv=vm;function Gx(e){let t=Zee.call(this,e);if(t)return t;let r=(0,Eo.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,a=new yo.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),u;e.$async&&(u=a.scopeValue("Error",{ref:LJe.default,code:(0,yo._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");e.validateName=c;let l={gen:a,allErrors:this.opts.allErrors,data:Td.default.data,parentData:Td.default.parentData,parentDataProperty:Td.default.parentDataProperty,dataNames:[Td.default.data],dataPathArr:[yo.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,yo.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:u,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:yo.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,yo._)`""`,opts:this.opts,self:this},f;try{this._compilations.add(e),(0,jJe.validateFunctionCode)(l),a.optimize(this.opts.code.optimize);let d=a.toString();f=`${a.scopeRefs(Td.default.scope)}return ${d}`,this.opts.code.process&&(f=this.opts.code.process(f,e));let m=new Function(`${Td.default.self}`,`${Td.default.scope}`,f)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:g,items:y}=l;m.evaluated={props:g instanceof yo.Name?void 0:g,items:y instanceof yo.Name?void 0:y,dynamicProps:g instanceof yo.Name,dynamicItems:y instanceof yo.Name},m.source&&(m.source.evaluated=(0,yo.stringify)(m.evaluated))}return e.validate=m,e}catch(d){throw delete e.validate,delete e.validateName,f&&this.logger.error("Error compiling schema, function code:",f),d}finally{this._compilations.delete(e)}}s(Gx,"compileSchema");Ts.compileSchema=Gx;function MJe(e,t,r){var n;r=(0,Eo.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let o=qJe.call(this,e,r);if(o===void 0){let a=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:u}=this.opts;a&&(o=new vm({schema:a,schemaId:u,root:e,baseId:t}))}if(o!==void 0)return e.refs[r]=UJe.call(this,o)}s(MJe,"resolveRef");Ts.resolveRef=MJe;function UJe(e){return(0,Eo.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Gx.call(this,e)}s(UJe,"inlineOrCompile");function Zee(e){for(let t of this._compilations)if(xJe(t,e))return t}s(Zee,"getCompilingSchema");Ts.getCompilingSchema=Zee;function xJe(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}s(xJe,"sameSchemaEnv");function qJe(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||Yw.call(this,e,t)}s(qJe,"resolve");function Yw(e,t){let r=this.opts.uriResolver.parse(t),n=(0,Eo._getFullPath)(this.opts.uriResolver,r),i=(0,Eo.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return Bx.call(this,r,e);let o=(0,Eo.normalizeId)(n),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){let u=Yw.call(this,e,a);return typeof u?.schema!="object"?void 0:Bx.call(this,r,u)}if(typeof a?.schema=="object"){if(a.validate||Gx.call(this,a),o===(0,Eo.normalizeId)(t)){let{schema:u}=a,{schemaId:c}=this.opts,l=u[c];return l&&(i=(0,Eo.resolveUrl)(this.opts.uriResolver,i,l)),new vm({schema:u,schemaId:c,root:e,baseId:i})}return Bx.call(this,r,a)}}s(Yw,"resolveSchema");Ts.resolveSchema=Yw;var FJe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Bx(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let u of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,Qee.unescapeFragment)(u)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!FJe.has(u)&&l&&(t=(0,Eo.resolveUrl)(this.opts.uriResolver,t,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,Qee.schemaHasRulesButRef)(r,this.RULES)){let u=(0,Eo.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=Yw.call(this,n,u)}let{schemaId:a}=this.opts;if(o=o||new vm({schema:r,schemaId:a,root:n,baseId:t}),o.schema!==o.root.schema)return o}s(Bx,"getJsonPointer")});var ete=h((jLt,kJe)=>{kJe.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 rte=h(Vx=>{"use strict";Object.defineProperty(Vx,"__esModule",{value:!0});var tte=XP();tte.code='require("ajv/dist/runtime/uri").default';Vx.default=tte});var lte=h(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.CodeGen=on.Name=on.nil=on.stringify=on.str=on._=on.KeywordCxt=void 0;var BJe=X0();Object.defineProperty(on,"KeywordCxt",{enumerable:!0,get:function(){return BJe.KeywordCxt}});var Om=Pe();Object.defineProperty(on,"_",{enumerable:!0,get:function(){return Om._}});Object.defineProperty(on,"str",{enumerable:!0,get:function(){return Om.str}});Object.defineProperty(on,"stringify",{enumerable:!0,get:function(){return Om.stringify}});Object.defineProperty(on,"nil",{enumerable:!0,get:function(){return Om.nil}});Object.defineProperty(on,"Name",{enumerable:!0,get:function(){return Om.Name}});Object.defineProperty(on,"CodeGen",{enumerable:!0,get:function(){return Om.CodeGen}});var GJe=Kw(),ate=Ww(),VJe=Ix(),Z0=Q0(),zJe=Pe(),eE=W0(),Jw=K0(),Hx=ze(),nte=ete(),HJe=rte(),ute=s((e,t)=>new RegExp(e,t),"defaultRegExp");ute.code="new RegExp";var KJe=["removeAdditional","useDefaults","coerceTypes"],WJe=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),YJe={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."},JJe={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},ite=200;function XJe(e){var t,r,n,i,o,a,u,c,l,f,d,_,m,g,y,b,E,S,O,I,w,j,F,K,H;let re=e.strict,de=(t=e.code)===null||t===void 0?void 0:t.optimize,te=de===!0||de===void 0?1:de||0,he=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:ute,Ce=(i=e.uriResolver)!==null&&i!==void 0?i:HJe.default;return{strictSchema:(a=(o=e.strictSchema)!==null&&o!==void 0?o:re)!==null&&a!==void 0?a:!0,strictNumbers:(c=(u=e.strictNumbers)!==null&&u!==void 0?u:re)!==null&&c!==void 0?c:!0,strictTypes:(f=(l=e.strictTypes)!==null&&l!==void 0?l:re)!==null&&f!==void 0?f:"log",strictTuples:(_=(d=e.strictTuples)!==null&&d!==void 0?d:re)!==null&&_!==void 0?_:"log",strictRequired:(g=(m=e.strictRequired)!==null&&m!==void 0?m:re)!==null&&g!==void 0?g:!1,code:e.code?{...e.code,optimize:te,regExp:he}:{optimize:te,regExp:he},loopRequired:(y=e.loopRequired)!==null&&y!==void 0?y:ite,loopEnum:(b=e.loopEnum)!==null&&b!==void 0?b:ite,meta:(E=e.meta)!==null&&E!==void 0?E:!0,messages:(S=e.messages)!==null&&S!==void 0?S:!0,inlineRefs:(O=e.inlineRefs)!==null&&O!==void 0?O:!0,schemaId:(I=e.schemaId)!==null&&I!==void 0?I:"$id",addUsedSchema:(w=e.addUsedSchema)!==null&&w!==void 0?w:!0,validateSchema:(j=e.validateSchema)!==null&&j!==void 0?j:!0,validateFormats:(F=e.validateFormats)!==null&&F!==void 0?F:!0,unicodeRegExp:(K=e.unicodeRegExp)!==null&&K!==void 0?K:!0,int32range:(H=e.int32range)!==null&&H!==void 0?H:!0,uriResolver:Ce}}s(XJe,"requiredOptions");var tE=class{static{s(this,"Ajv")}constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...XJe(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new zJe.ValueScope({scope:{},prefixes:WJe,es5:r,lines:n}),this.logger=nXe(t.logger);let i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,VJe.getRules)(),ste.call(this,YJe,t,"NOT SUPPORTED"),ste.call(this,JJe,t,"DEPRECATED","warn"),this._metaOpts=tXe.call(this),t.formats&&ZJe.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&eXe.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),QJe.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,i=nte;n==="id"&&(i={...nte},i.id=i.$id,delete i.$id),r&&t&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,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,t,r);async function i(f,d){await o.call(this,f.$schema);let _=this._addSchema(f,d);return _.validate||a.call(this,_)}async function o(f){f&&!this.getSchema(f)&&await i.call(this,{$ref:f},!0)}async function a(f){try{return this._compileSchemaEnv(f)}catch(d){if(!(d instanceof ate.default))throw d;return u.call(this,d),await c.call(this,d.missingSchema),a.call(this,f)}}function u({missingSchema:f,missingRef:d}){if(this.refs[f])throw new Error(`AnySchema ${f} is loaded but ${d} cannot be resolved`)}async function c(f){let d=await l.call(this,f);this.refs[f]||await o.call(this,d.$schema),this.refs[f]||this.addSchema(d,f,r)}async function l(f){let d=this._loading[f];if(d)return d;try{return await(this._loading[f]=n(f))}finally{delete this._loading[f]}}}addSchema(t,r,n,i=this.opts.validateSchema){if(Array.isArray(t)){for(let a of t)this.addSchema(a,void 0,n,i);return this}let o;if(typeof t=="object"){let{schemaId:a}=this.opts;if(o=t[a],o!==void 0&&typeof o!="string")throw new Error(`schema ${a} must be string`)}return r=(0,eE.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,i,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$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,t);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(t){let r;for(;typeof(r=ote.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,i=new Z0.SchemaEnv({schema:{},schemaId:n});if(r=Z0.resolveSchema.call(this,i,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=ote.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,eE.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,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(sXe.call(this,n,r),!r)return(0,Hx.eachItem)(n,o=>zx.call(this,o)),this;aXe.call(this,r);let i={...r,type:(0,Jw.getJSONTypes)(r.type),schemaType:(0,Jw.getJSONTypes)(r.schemaType)};return(0,Hx.eachItem)(n,i.type.length===0?o=>zx.call(this,o,i):o=>i.type.forEach(a=>zx.call(this,o,i,a))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===t);i>=0&&n.rules.splice(i,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let i of r){let o=i.split("/").slice(1),a=t;for(let u of o)a=a[u];for(let u in n){let c=n[u];if(typeof c!="object")continue;let{$data:l}=c.definition,f=a[u];l&&f&&(a[u]=cte(f))}}return t}_removeAllSchemas(t,r){for(let n in t){let i=t[n];(!r||r.test(n))&&(typeof i=="string"?delete t[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[n]))}}_addSchema(t,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let a,{schemaId:u}=this.opts;if(typeof t=="object")a=t[u];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;n=(0,eE.normalizeId)(a||n);let l=eE.getSchemaRefs.call(this,t,n);return c=new Z0.SchemaEnv({schema:t,schemaId:u,meta:r,baseId:n,localRefs:l}),this._cache.set(c.schema,c),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),i&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):Z0.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{Z0.compileSchema.call(this,t)}finally{this.opts=r}}};on.default=tE;tE.ValidationError=GJe.default;tE.MissingRefError=ate.default;function ste(e,t,r,n="error"){for(let i in e){let o=i;o in t&&this.logger[n](`${r}: option ${i}. ${e[o]}`)}}s(ste,"checkOptions");function ote(e){return e=(0,eE.normalizeId)(e),this.schemas[e]||this.refs[e]}s(ote,"getSchEnv");function QJe(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}s(QJe,"addInitialSchemas");function ZJe(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}s(ZJe,"addInitialFormats");function eXe(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}s(eXe,"addInitialKeywords");function tXe(){let e={...this.opts};for(let t of KJe)delete e[t];return e}s(tXe,"getMetaSchemaOptions");var rXe={log(){},warn(){},error(){}};function nXe(e){if(e===!1)return rXe;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}s(nXe,"getLogger");var iXe=/^[a-z_$][a-z0-9_$:-]*$/i;function sXe(e,t){let{RULES:r}=this;if((0,Hx.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!iXe.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}s(sXe,"checkKeyword");function zx(e,t,r){var n;let i=t?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,a=i?o.post:o.rules.find(({type:c})=>c===r);if(a||(a={type:r,rules:[]},o.rules.push(a)),o.keywords[e]=!0,!t)return;let u={keyword:e,definition:{...t,type:(0,Jw.getJSONTypes)(t.type),schemaType:(0,Jw.getJSONTypes)(t.schemaType)}};t.before?oXe.call(this,a,u,t.before):a.rules.push(u),o.all[e]=u,(n=t.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}s(zx,"addRule");function oXe(e,t,r){let n=e.rules.findIndex(i=>i.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}s(oXe,"addBeforeRule");function aXe(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=cte(t)),e.validateSchema=this.compile(t,!0))}s(aXe,"keywordMetaschema");var uXe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function cte(e){return{anyOf:[e,uXe]}}s(cte,"schemaOrData")});var fte=h(Kx=>{"use strict";Object.defineProperty(Kx,"__esModule",{value:!0});var cXe={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Kx.default=cXe});var Zw=h(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});Nd.callRef=Nd.getValidate=void 0;var lXe=Ww(),dte=ws(),Pi=Pe(),Pm=Is(),pte=Q0(),Xw=ze(),fXe={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:o,validateName:a,opts:u,self:c}=n,{root:l}=o;if((r==="#"||r==="#/")&&i===l.baseId)return d();let f=pte.resolveRef.call(c,l,i,r);if(f===void 0)throw new lXe.default(n.opts.uriResolver,i,r);if(f instanceof pte.SchemaEnv)return _(f);return m(f);function d(){if(o===l)return Qw(e,a,o,o.$async);let g=t.scopeValue("root",{ref:l});return Qw(e,(0,Pi._)`${g}.validate`,l,l.$async)}function _(g){let y=hte(e,g);Qw(e,y,g,g.$async)}function m(g){let y=t.scopeValue("schema",u.code.source===!0?{ref:g,code:(0,Pi.stringify)(g)}:{ref:g}),b=t.name("valid"),E=e.subschema({schema:g,dataTypes:[],schemaPath:Pi.nil,topSchemaRef:y,errSchemaPath:r},b);e.mergeEvaluated(E),e.ok(b)}}};function hte(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Pi._)`${r.scopeValue("wrapper",{ref:t})}.validate`}s(hte,"getValidate");Nd.getValidate=hte;function Qw(e,t,r,n){let{gen:i,it:o}=e,{allErrors:a,schemaEnv:u,opts:c}=o,l=c.passContext?Pm.default.this:Pi.nil;n?f():d();function f(){if(!u.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,Pi._)`await ${(0,dte.callValidateCode)(e,t,l)}`),m(t),a||i.assign(g,!0)},y=>{i.if((0,Pi._)`!(${y} instanceof ${o.ValidationError})`,()=>i.throw(y)),_(y),a||i.assign(g,!1)}),e.ok(g)}s(f,"callAsyncRef");function d(){e.result((0,dte.callValidateCode)(e,t,l),()=>m(t),()=>_(t))}s(d,"callSyncRef");function _(g){let y=(0,Pi._)`${g}.errors`;i.assign(Pm.default.vErrors,(0,Pi._)`${Pm.default.vErrors} === null ? ${y} : ${Pm.default.vErrors}.concat(${y})`),i.assign(Pm.default.errors,(0,Pi._)`${Pm.default.vErrors}.length`)}s(_,"addErrorsFrom");function m(g){var y;if(!o.opts.unevaluated)return;let b=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(b&&!b.dynamicProps)b.props!==void 0&&(o.props=Xw.mergeEvaluated.props(i,b.props,o.props));else{let E=i.var("props",(0,Pi._)`${g}.evaluated.props`);o.props=Xw.mergeEvaluated.props(i,E,o.props,Pi.Name)}if(o.items!==!0)if(b&&!b.dynamicItems)b.items!==void 0&&(o.items=Xw.mergeEvaluated.items(i,b.items,o.items));else{let E=i.var("items",(0,Pi._)`${g}.evaluated.items`);o.items=Xw.mergeEvaluated.items(i,E,o.items,Pi.Name)}}s(m,"addEvaluatedFrom")}s(Qw,"callRef");Nd.callRef=Qw;Nd.default=fXe});var mte=h(Wx=>{"use strict";Object.defineProperty(Wx,"__esModule",{value:!0});var dXe=fte(),pXe=Zw(),hXe=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",dXe.default,pXe.default];Wx.default=hXe});var _te=h(Yx=>{"use strict";Object.defineProperty(Yx,"__esModule",{value:!0});var eT=Pe(),qc=eT.operators,tT={maximum:{okStr:"<=",ok:qc.LTE,fail:qc.GT},minimum:{okStr:">=",ok:qc.GTE,fail:qc.LT},exclusiveMaximum:{okStr:"<",ok:qc.LT,fail:qc.GTE},exclusiveMinimum:{okStr:">",ok:qc.GT,fail:qc.LTE}},mXe={message:({keyword:e,schemaCode:t})=>(0,eT.str)`must be ${tT[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,eT._)`{comparison: ${tT[e].okStr}, limit: ${t}}`},_Xe={keyword:Object.keys(tT),type:"number",schemaType:"number",$data:!0,error:mXe,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,eT._)`${r} ${tT[t].fail} ${n} || isNaN(${r})`)}};Yx.default=_Xe});var gte=h(Jx=>{"use strict";Object.defineProperty(Jx,"__esModule",{value:!0});var rE=Pe(),gXe={message:({schemaCode:e})=>(0,rE.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,rE._)`{multipleOf: ${e}}`},yXe={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:gXe,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,o=i.opts.multipleOfPrecision,a=t.let("res"),u=o?(0,rE._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,rE._)`${a} !== parseInt(${a})`;e.fail$data((0,rE._)`(${n} === 0 || (${a} = ${r}/${n}, ${u}))`)}};Jx.default=yXe});var Ete=h(Xx=>{"use strict";Object.defineProperty(Xx,"__esModule",{value:!0});function yte(e){let t=e.length,r=0,n=0,i;for(;n<t;)r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t&&(i=e.charCodeAt(n),(i&64512)===56320&&n++);return r}s(yte,"ucs2length");Xx.default=yte;yte.code='require("ajv/dist/runtime/ucs2length").default'});var bte=h(Qx=>{"use strict";Object.defineProperty(Qx,"__esModule",{value:!0});var Ad=Pe(),EXe=ze(),bXe=Ete(),SXe={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Ad.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Ad._)`{limit: ${e}}`},vXe={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:SXe,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,o=t==="maxLength"?Ad.operators.GT:Ad.operators.LT,a=i.opts.unicode===!1?(0,Ad._)`${r}.length`:(0,Ad._)`${(0,EXe.useFunc)(e.gen,bXe.default)}(${r})`;e.fail$data((0,Ad._)`${a} ${o} ${n}`)}};Qx.default=vXe});var Ste=h(Zx=>{"use strict";Object.defineProperty(Zx,"__esModule",{value:!0});var OXe=ws(),rT=Pe(),PXe={message:({schemaCode:e})=>(0,rT.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,rT._)`{pattern: ${e}}`},IXe={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:PXe,code(e){let{data:t,$data:r,schema:n,schemaCode:i,it:o}=e,a=o.opts.unicodeRegExp?"u":"",u=r?(0,rT._)`(new RegExp(${i}, ${a}))`:(0,OXe.usePattern)(e,n);e.fail$data((0,rT._)`!${u}.test(${t})`)}};Zx.default=IXe});var vte=h(eq=>{"use strict";Object.defineProperty(eq,"__esModule",{value:!0});var nE=Pe(),wXe={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,nE.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,nE._)`{limit: ${e}}`},TXe={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:wXe,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?nE.operators.GT:nE.operators.LT;e.fail$data((0,nE._)`Object.keys(${r}).length ${i} ${n}`)}};eq.default=TXe});var Ote=h(tq=>{"use strict";Object.defineProperty(tq,"__esModule",{value:!0});var iE=ws(),sE=Pe(),NXe=ze(),AXe={message:({params:{missingProperty:e}})=>(0,sE.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,sE._)`{missingProperty: ${e}}`},RXe={keyword:"required",type:"object",schemaType:"array",$data:!0,error:AXe,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:o,it:a}=e,{opts:u}=a;if(!o&&r.length===0)return;let c=r.length>=u.loopRequired;if(a.allErrors?l():f(),u.strictRequired){let m=e.parentSchema.properties,{definedProperties:g}=e.it;for(let y of r)if(m?.[y]===void 0&&!g.has(y)){let b=a.schemaEnv.baseId+a.errSchemaPath,E=`required property "${y}" is not defined at "${b}" (strictRequired)`;(0,NXe.checkStrictMode)(a,E,a.opts.strictRequired)}}function l(){if(c||o)e.block$data(sE.nil,d);else for(let m of r)(0,iE.checkReportMissingProp)(e,m)}s(l,"allErrorsMode");function f(){let m=t.let("missing");if(c||o){let g=t.let("valid",!0);e.block$data(g,()=>_(m,g)),e.ok(g)}else t.if((0,iE.checkMissingProp)(e,r,m)),(0,iE.reportMissingProp)(e,m),t.else()}s(f,"exitOnErrorMode");function d(){t.forOf("prop",n,m=>{e.setParams({missingProperty:m}),t.if((0,iE.noPropertyInData)(t,i,m,u.ownProperties),()=>e.error())})}s(d,"loopAllRequired");function _(m,g){e.setParams({missingProperty:m}),t.forOf(m,n,()=>{t.assign(g,(0,iE.propertyInData)(t,i,m,u.ownProperties)),t.if((0,sE.not)(g),()=>{e.error(),t.break()})},sE.nil)}s(_,"loopUntilMissing")}};tq.default=RXe});var Pte=h(rq=>{"use strict";Object.defineProperty(rq,"__esModule",{value:!0});var oE=Pe(),CXe={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,oE.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,oE._)`{limit: ${e}}`},$Xe={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:CXe,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?oE.operators.GT:oE.operators.LT;e.fail$data((0,oE._)`${r}.length ${i} ${n}`)}};rq.default=$Xe});var nT=h(nq=>{"use strict";Object.defineProperty(nq,"__esModule",{value:!0});var Ite=Xf();Ite.code='require("ajv/dist/runtime/equal").default';nq.default=Ite});var wte=h(sq=>{"use strict";Object.defineProperty(sq,"__esModule",{value:!0});var iq=K0(),an=Pe(),DXe=ze(),LXe=nT(),jXe={message:({params:{i:e,j:t}})=>(0,an.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,an._)`{i: ${e}, j: ${t}}`},MXe={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:jXe,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:o,schemaCode:a,it:u}=e;if(!n&&!i)return;let c=t.let("valid"),l=o.items?(0,iq.getSchemaTypes)(o.items):[];e.block$data(c,f,(0,an._)`${a} === false`),e.ok(c);function f(){let g=t.let("i",(0,an._)`${r}.length`),y=t.let("j");e.setParams({i:g,j:y}),t.assign(c,!0),t.if((0,an._)`${g} > 1`,()=>(d()?_:m)(g,y))}s(f,"validateUniqueItems");function d(){return l.length>0&&!l.some(g=>g==="object"||g==="array")}s(d,"canOptimize");function _(g,y){let b=t.name("item"),E=(0,iq.checkDataTypes)(l,b,u.opts.strictNumbers,iq.DataType.Wrong),S=t.const("indices",(0,an._)`{}`);t.for((0,an._)`;${g}--;`,()=>{t.let(b,(0,an._)`${r}[${g}]`),t.if(E,(0,an._)`continue`),l.length>1&&t.if((0,an._)`typeof ${b} == "string"`,(0,an._)`${b} += "_"`),t.if((0,an._)`typeof ${S}[${b}] == "number"`,()=>{t.assign(y,(0,an._)`${S}[${b}]`),e.error(),t.assign(c,!1).break()}).code((0,an._)`${S}[${b}] = ${g}`)})}s(_,"loopN");function m(g,y){let b=(0,DXe.useFunc)(t,LXe.default),E=t.name("outer");t.label(E).for((0,an._)`;${g}--;`,()=>t.for((0,an._)`${y} = ${g}; ${y}--;`,()=>t.if((0,an._)`${b}(${r}[${g}], ${r}[${y}])`,()=>{e.error(),t.assign(c,!1).break(E)})))}s(m,"loopN2")}};sq.default=MXe});var Tte=h(aq=>{"use strict";Object.defineProperty(aq,"__esModule",{value:!0});var oq=Pe(),UXe=ze(),xXe=nT(),qXe={message:"must be equal to constant",params:({schemaCode:e})=>(0,oq._)`{allowedValue: ${e}}`},FXe={keyword:"const",$data:!0,error:qXe,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:o}=e;n||o&&typeof o=="object"?e.fail$data((0,oq._)`!${(0,UXe.useFunc)(t,xXe.default)}(${r}, ${i})`):e.fail((0,oq._)`${o} !== ${r}`)}};aq.default=FXe});var Nte=h(uq=>{"use strict";Object.defineProperty(uq,"__esModule",{value:!0});var aE=Pe(),kXe=ze(),BXe=nT(),GXe={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,aE._)`{allowedValues: ${e}}`},VXe={keyword:"enum",schemaType:"array",$data:!0,error:GXe,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:o,it:a}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let u=i.length>=a.opts.loopEnum,c,l=s(()=>c??(c=(0,kXe.useFunc)(t,BXe.default)),"getEql"),f;if(u||n)f=t.let("valid"),e.block$data(f,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=t.const("vSchema",o);f=(0,aE.or)(...i.map((g,y)=>_(m,y)))}e.pass(f);function d(){t.assign(f,!1),t.forOf("v",o,m=>t.if((0,aE._)`${l()}(${r}, ${m})`,()=>t.assign(f,!0).break()))}s(d,"loopEnum");function _(m,g){let y=i[g];return typeof y=="object"&&y!==null?(0,aE._)`${l()}(${r}, ${m}[${g}])`:(0,aE._)`${r} === ${y}`}s(_,"equalCode")}};uq.default=VXe});var Ate=h(cq=>{"use strict";Object.defineProperty(cq,"__esModule",{value:!0});var zXe=_te(),HXe=gte(),KXe=bte(),WXe=Ste(),YXe=vte(),JXe=Ote(),XXe=Pte(),QXe=wte(),ZXe=Tte(),eQe=Nte(),tQe=[zXe.default,HXe.default,KXe.default,WXe.default,YXe.default,JXe.default,XXe.default,QXe.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},ZXe.default,eQe.default];cq.default=tQe});var fq=h(uE=>{"use strict";Object.defineProperty(uE,"__esModule",{value:!0});uE.validateAdditionalItems=void 0;var Rd=Pe(),lq=ze(),rQe={message:({params:{len:e}})=>(0,Rd.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Rd._)`{limit: ${e}}`},nQe={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:rQe,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,lq.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Rte(e,n)}};function Rte(e,t){let{gen:r,schema:n,data:i,keyword:o,it:a}=e;a.items=!0;let u=r.const("len",(0,Rd._)`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,Rd._)`${u} <= ${t.length}`);else if(typeof n=="object"&&!(0,lq.alwaysValidSchema)(a,n)){let l=r.var("valid",(0,Rd._)`${u} <= ${t.length}`);r.if((0,Rd.not)(l),()=>c(l)),e.ok(l)}function c(l){r.forRange("i",t.length,u,f=>{e.subschema({keyword:o,dataProp:f,dataPropType:lq.Type.Num},l),a.allErrors||r.if((0,Rd.not)(l),()=>r.break())})}s(c,"validateItems")}s(Rte,"validateAdditionalItems");uE.validateAdditionalItems=Rte;uE.default=nQe});var dq=h(cE=>{"use strict";Object.defineProperty(cE,"__esModule",{value:!0});cE.validateTuple=void 0;var Cte=Pe(),iT=ze(),iQe=ws(),sQe={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return $te(e,"additionalItems",t);r.items=!0,!(0,iT.alwaysValidSchema)(r,t)&&e.ok((0,iQe.validateArray)(e))}};function $te(e,t,r=e.schema){let{gen:n,parentSchema:i,data:o,keyword:a,it:u}=e;f(i),u.opts.unevaluated&&r.length&&u.items!==!0&&(u.items=iT.mergeEvaluated.items(n,r.length,u.items));let c=n.name("valid"),l=n.const("len",(0,Cte._)`${o}.length`);r.forEach((d,_)=>{(0,iT.alwaysValidSchema)(u,d)||(n.if((0,Cte._)`${l} > ${_}`,()=>e.subschema({keyword:a,schemaProp:_,dataProp:_},c)),e.ok(c))});function f(d){let{opts:_,errSchemaPath:m}=u,g=r.length,y=g===d.minItems&&(g===d.maxItems||d[t]===!1);if(_.strictTuples&&!y){let b=`"${a}" is ${g}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,iT.checkStrictMode)(u,b,_.strictTuples)}}s(f,"checkStrictTuple")}s($te,"validateTuple");cE.validateTuple=$te;cE.default=sQe});var Dte=h(pq=>{"use strict";Object.defineProperty(pq,"__esModule",{value:!0});var oQe=dq(),aQe={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,oQe.validateTuple)(e,"items")};pq.default=aQe});var jte=h(hq=>{"use strict";Object.defineProperty(hq,"__esModule",{value:!0});var Lte=Pe(),uQe=ze(),cQe=ws(),lQe=fq(),fQe={message:({params:{len:e}})=>(0,Lte.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Lte._)`{limit: ${e}}`},dQe={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:fQe,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,uQe.alwaysValidSchema)(n,t)&&(i?(0,lQe.validateAdditionalItems)(e,i):e.ok((0,cQe.validateArray)(e)))}};hq.default=dQe});var Mte=h(mq=>{"use strict";Object.defineProperty(mq,"__esModule",{value:!0});var Ns=Pe(),sT=ze(),pQe={message:({params:{min:e,max:t}})=>t===void 0?(0,Ns.str)`must contain at least ${e} valid item(s)`:(0,Ns.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Ns._)`{minContains: ${e}}`:(0,Ns._)`{minContains: ${e}, maxContains: ${t}}`},hQe={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:pQe,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e,a,u,{minContains:c,maxContains:l}=n;o.opts.next?(a=c===void 0?1:c,u=l):a=1;let f=t.const("len",(0,Ns._)`${i}.length`);if(e.setParams({min:a,max:u}),u===void 0&&a===0){(0,sT.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(u!==void 0&&a>u){(0,sT.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,sT.alwaysValidSchema)(o,r)){let y=(0,Ns._)`${f} >= ${a}`;u!==void 0&&(y=(0,Ns._)`${y} && ${f} <= ${u}`),e.pass(y);return}o.items=!0;let d=t.name("valid");u===void 0&&a===1?m(d,()=>t.if(d,()=>t.break())):a===0?(t.let(d,!0),u!==void 0&&t.if((0,Ns._)`${i}.length > 0`,_)):(t.let(d,!1),_()),e.result(d,()=>e.reset());function _(){let y=t.name("_valid"),b=t.let("count",0);m(y,()=>t.if(y,()=>g(b)))}s(_,"validateItemsWithCount");function m(y,b){t.forRange("i",0,f,E=>{e.subschema({keyword:"contains",dataProp:E,dataPropType:sT.Type.Num,compositeRule:!0},y),b()})}s(m,"validateItems");function g(y){t.code((0,Ns._)`${y}++`),u===void 0?t.if((0,Ns._)`${y} >= ${a}`,()=>t.assign(d,!0).break()):(t.if((0,Ns._)`${y} > ${u}`,()=>t.assign(d,!1).break()),a===1?t.assign(d,!0):t.if((0,Ns._)`${y} >= ${a}`,()=>t.assign(d,!0)))}s(g,"checkLimits")}};mq.default=hQe});var oT=h(ma=>{"use strict";Object.defineProperty(ma,"__esModule",{value:!0});ma.validateSchemaDeps=ma.validatePropertyDeps=ma.error=void 0;var _q=Pe(),mQe=ze(),lE=ws();ma.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,_q.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,_q._)`{property: ${e},
|
|
174
|
+
|| ${a} === "boolean" || ${i} === null`).assign(u,(0,Ae._)`[${i}]`)}}s(c,"coerceSpecificType")}s(TYe,"coerceData");function NYe({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,Ae._)`${t} !== undefined`,()=>e.assign((0,Ae._)`${t}[${r}]`,n))}s(NYe,"assignParentData");function Tx(e,t,r,n=H0.Correct){let i=n===H0.Correct?Ae.operators.EQ:Ae.operators.NEQ,o;switch(e){case"null":return(0,Ae._)`${t} ${i} null`;case"array":o=(0,Ae._)`Array.isArray(${t})`;break;case"object":o=(0,Ae._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a((0,Ae._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return(0,Ae._)`typeof ${t} ${i} ${e}`}return n===H0.Correct?o:(0,Ae.not)(o);function a(u=Ae.nil){return(0,Ae.and)((0,Ae._)`typeof ${t} == "number"`,u,r?(0,Ae._)`isFinite(${t})`:Ae.nil)}}s(Tx,"checkDataType");sn.checkDataType=Tx;function Nx(e,t,r,n){if(e.length===1)return Tx(e[0],t,r,n);let i,o=(0,Oee.toHash)(e);if(o.array&&o.object){let a=(0,Ae._)`typeof ${t} != "object"`;i=o.null?a:(0,Ae._)`!${t} || ${a}`,delete o.null,delete o.array,delete o.object}else i=Ae.nil;o.number&&delete o.integer;for(let a in o)i=(0,Ae.and)(i,Tx(a,t,r,n));return i}s(Nx,"checkDataTypes");sn.checkDataTypes=Nx;var AYe={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,Ae._)`{type: ${e}}`:(0,Ae._)`{type: ${t}}`};function Ax(e){let t=RYe(e);(0,OYe.reportError)(t,AYe)}s(Ax,"reportTypeError");sn.reportTypeError=Ax;function RYe(e){let{gen:t,data:r,schema:n}=e,i=(0,Oee.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}s(RYe,"getTypeErrorContext")});var Tee=h(Vw=>{"use strict";Object.defineProperty(Vw,"__esModule",{value:!0});Vw.assignDefaults=void 0;var bm=Pe(),CYe=ze();function $Ye(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)wee(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,o)=>wee(e,o,i.default))}s($Ye,"assignDefaults");Vw.assignDefaults=$Ye;function wee(e,t,r){let{gen:n,compositeRule:i,data:o,opts:a}=e;if(r===void 0)return;let u=(0,bm._)`${o}${(0,bm.getProperty)(t)}`;if(i){(0,CYe.checkStrictMode)(e,`default is ignored for: ${u}`);return}let c=(0,bm._)`${u} === undefined`;a.useDefaults==="empty"&&(c=(0,bm._)`${c} || ${u} === null || ${u} === ""`),n.if(c,(0,bm._)`${u} = ${(0,bm.stringify)(r)}`)}s(wee,"assignDefault")});var ws=h($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.validateUnion=$t.validateArray=$t.usePattern=$t.callValidateCode=$t.schemaProperties=$t.allSchemaProperties=$t.noPropertyInData=$t.propertyInData=$t.isOwnProperty=$t.hasPropFunc=$t.reportMissingProp=$t.checkMissingProp=$t.checkReportMissingProp=void 0;var zt=Pe(),Rx=ze(),Mc=Is(),DYe=ze();function LYe(e,t){let{gen:r,data:n,it:i}=e;r.if($x(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,zt._)`${t}`},!0),e.error()})}s(LYe,"checkReportMissingProp");$t.checkReportMissingProp=LYe;function jYe({gen:e,data:t,it:{opts:r}},n,i){return(0,zt.or)(...n.map(o=>(0,zt.and)($x(e,t,o,r.ownProperties),(0,zt._)`${i} = ${o}`)))}s(jYe,"checkMissingProp");$t.checkMissingProp=jYe;function MYe(e,t){e.setParams({missingProperty:t},!0),e.error()}s(MYe,"reportMissingProp");$t.reportMissingProp=MYe;function Nee(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,zt._)`Object.prototype.hasOwnProperty`})}s(Nee,"hasPropFunc");$t.hasPropFunc=Nee;function Cx(e,t,r){return(0,zt._)`${Nee(e)}.call(${t}, ${r})`}s(Cx,"isOwnProperty");$t.isOwnProperty=Cx;function UYe(e,t,r,n){let i=(0,zt._)`${t}${(0,zt.getProperty)(r)} !== undefined`;return n?(0,zt._)`${i} && ${Cx(e,t,r)}`:i}s(UYe,"propertyInData");$t.propertyInData=UYe;function $x(e,t,r,n){let i=(0,zt._)`${t}${(0,zt.getProperty)(r)} === undefined`;return n?(0,zt.or)(i,(0,zt.not)(Cx(e,t,r))):i}s($x,"noPropertyInData");$t.noPropertyInData=$x;function Aee(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}s(Aee,"allSchemaProperties");$t.allSchemaProperties=Aee;function xYe(e,t){return Aee(t).filter(r=>!(0,Rx.alwaysValidSchema)(e,t[r]))}s(xYe,"schemaProperties");$t.schemaProperties=xYe;function qYe({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:a},u,c,l){let f=l?(0,zt._)`${e}, ${t}, ${n}${i}`:t,d=[[Mc.default.instancePath,(0,zt.strConcat)(Mc.default.instancePath,o)],[Mc.default.parentData,a.parentData],[Mc.default.parentDataProperty,a.parentDataProperty],[Mc.default.rootData,Mc.default.rootData]];a.opts.dynamicRef&&d.push([Mc.default.dynamicAnchors,Mc.default.dynamicAnchors]);let _=(0,zt._)`${f}, ${r.object(...d)}`;return c!==zt.nil?(0,zt._)`${u}.call(${c}, ${_})`:(0,zt._)`${u}(${_})`}s(qYe,"callValidateCode");$t.callValidateCode=qYe;var FYe=(0,zt._)`new RegExp`;function kYe({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,o=i(r,n);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,zt._)`${i.code==="new RegExp"?FYe:(0,DYe.useFunc)(e,i)}(${r}, ${n})`})}s(kYe,"usePattern");$t.usePattern=kYe;function BYe(e){let{gen:t,data:r,keyword:n,it:i}=e,o=t.name("valid");if(i.allErrors){let u=t.let("valid",!0);return a(()=>t.assign(u,!1)),u}return t.var(o,!0),a(()=>t.break()),o;function a(u){let c=t.const("len",(0,zt._)`${r}.length`);t.forRange("i",0,c,l=>{e.subschema({keyword:n,dataProp:l,dataPropType:Rx.Type.Num},o),t.if((0,zt.not)(o),u)})}s(a,"validateItems")}s(BYe,"validateArray");$t.validateArray=BYe;function GYe(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,Rx.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let a=t.let("valid",!1),u=t.name("_valid");t.block(()=>r.forEach((c,l)=>{let f=e.subschema({keyword:n,schemaProp:l,compositeRule:!0},u);t.assign(a,(0,zt._)`${a} || ${u}`),e.mergeValidEvaluated(f,u)||t.if((0,zt.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}s(GYe,"validateUnion");$t.validateUnion=GYe});var $ee=h(pa=>{"use strict";Object.defineProperty(pa,"__esModule",{value:!0});pa.validateKeywordUsage=pa.validSchemaType=pa.funcKeywordCode=pa.macroKeywordCode=void 0;var Wn=Pe(),wd=Is(),VYe=ws(),zYe=z0();function HYe(e,t){let{gen:r,keyword:n,schema:i,parentSchema:o,it:a}=e,u=t.macro.call(a.self,i,o,a),c=Cee(r,n,u);a.opts.validateSchema!==!1&&a.self.validateSchema(u,!0);let l=r.name("valid");e.subschema({schema:u,schemaPath:Wn.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}s(HYe,"macroKeywordCode");pa.macroKeywordCode=HYe;function KYe(e,t){var r;let{gen:n,keyword:i,schema:o,parentSchema:a,$data:u,it:c}=e;YYe(c,t);let l=!u&&t.compile?t.compile.call(c.self,o,a,c):t.validate,f=Cee(n,i,l),d=n.let("valid");e.block$data(d,_),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function _(){if(t.errors===!1)y(),t.modifying&&Ree(e),b(()=>e.error());else{let E=t.async?m():g();t.modifying&&Ree(e),b(()=>WYe(e,E))}}s(_,"validateKeyword");function m(){let E=n.let("ruleErrs",null);return n.try(()=>y((0,Wn._)`await `),v=>n.assign(d,!1).if((0,Wn._)`${v} instanceof ${c.ValidationError}`,()=>n.assign(E,(0,Wn._)`${v}.errors`),()=>n.throw(v))),E}s(m,"validateAsync");function g(){let E=(0,Wn._)`${f}.errors`;return n.assign(E,null),y(Wn.nil),E}s(g,"validateSync");function y(E=t.async?(0,Wn._)`await `:Wn.nil){let v=c.opts.passContext?wd.default.this:wd.default.self,O=!("compile"in t&&!u||t.schema===!1);n.assign(d,(0,Wn._)`${E}${(0,VYe.callValidateCode)(e,f,v,O)}`,t.modifying)}s(y,"assignValid");function b(E){var v;n.if((0,Wn.not)((v=t.valid)!==null&&v!==void 0?v:d),E)}s(b,"reportErrs")}s(KYe,"funcKeywordCode");pa.funcKeywordCode=KYe;function Ree(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Wn._)`${n.parentData}[${n.parentDataProperty}]`))}s(Ree,"modifyData");function WYe(e,t){let{gen:r}=e;r.if((0,Wn._)`Array.isArray(${t})`,()=>{r.assign(wd.default.vErrors,(0,Wn._)`${wd.default.vErrors} === null ? ${t} : ${wd.default.vErrors}.concat(${t})`).assign(wd.default.errors,(0,Wn._)`${wd.default.vErrors}.length`),(0,zYe.extendErrors)(e)},()=>e.error())}s(WYe,"addErrs");function YYe({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}s(YYe,"checkAsyncKeyword");function Cee(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Wn.stringify)(r)})}s(Cee,"useKeyword");function JYe(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}s(JYe,"validSchemaType");pa.validSchemaType=JYe;function XYe({schema:e,opts:t,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 a=i.dependencies;if(a?.some(u=>!Object.prototype.hasOwnProperty.call(e,u)))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){let c=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}s(XYe,"validateKeywordUsage");pa.validateKeywordUsage=XYe});var Lee=h(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});Uc.extendSubschemaMode=Uc.extendSubschemaData=Uc.getSubschema=void 0;var ha=Pe(),Dee=ze();function QYe(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:a}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let u=e.schema[t];return r===void 0?{schema:u,schemaPath:(0,ha._)`${e.schemaPath}${(0,ha.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:u[r],schemaPath:(0,ha._)`${e.schemaPath}${(0,ha.getProperty)(t)}${(0,ha.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Dee.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}s(QYe,"getSubschema");Uc.getSubschema=QYe;function ZYe(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:a}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:u}=t;if(r!==void 0){let{errorPath:l,dataPathArr:f,opts:d}=t,_=u.let("data",(0,ha._)`${t.data}${(0,ha.getProperty)(r)}`,!0);c(_),e.errorPath=(0,ha.str)`${l}${(0,Dee.getErrorPath)(r,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,ha._)`${r}`,e.dataPathArr=[...f,e.parentDataProperty]}if(i!==void 0){let l=i instanceof ha.Name?i:u.let("data",i,!0);c(l),a!==void 0&&(e.propertyName=a)}o&&(e.dataTypes=o);function c(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}s(c,"dataContextProps")}s(ZYe,"extendSubschemaData");Uc.extendSubschemaData=ZYe;function eJe(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),o!==void 0&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}s(eJe,"extendSubschemaMode");Uc.extendSubschemaMode=eJe});var W0=h(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.getSchemaRefs=Oi.resolveUrl=Oi.normalizeId=Oi._getFullPath=Oi.getFullPath=Oi.inlineRef=void 0;var tJe=ze(),rJe=Xf(),nJe=HP(),iJe=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function sJe(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Dx(e):t?jee(e)<=t:!1}s(sJe,"inlineRef");Oi.inlineRef=sJe;var oJe=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Dx(e){for(let t in e){if(oJe.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Dx)||typeof r=="object"&&Dx(r))return!0}return!1}s(Dx,"hasRef");function jee(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!iJe.has(r)&&(typeof e[r]=="object"&&(0,tJe.eachItem)(e[r],n=>t+=jee(n)),t===1/0))return 1/0}return t}s(jee,"countKeys");function Mee(e,t="",r){r!==!1&&(t=Sm(t));let n=e.parse(t);return Uee(e,n)}s(Mee,"getFullPath");Oi.getFullPath=Mee;function Uee(e,t){return e.serialize(t).split("#")[0]+"#"}s(Uee,"_getFullPath");Oi._getFullPath=Uee;var aJe=/#\/?$/;function Sm(e){return e?e.replace(aJe,""):""}s(Sm,"normalizeId");Oi.normalizeId=Sm;function uJe(e,t,r){return r=Sm(r),e.resolve(t,r)}s(uJe,"resolveUrl");Oi.resolveUrl=uJe;var cJe=/^[a-z_][-a-z0-9._]*$/i;function lJe(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=Sm(e[r]||t),o={"":i},a=Mee(n,i,!1),u={},c=new Set;return nJe(e,{allKeys:!0},(d,_,m,g)=>{if(g===void 0)return;let y=a+_,b=o[g];typeof d[r]=="string"&&(b=E.call(this,d[r])),v.call(this,d.$anchor),v.call(this,d.$dynamicAnchor),o[_]=b;function E(O){let I=this.opts.uriResolver.resolve;if(O=Sm(b?I(b,O):O),c.has(O))throw f(O);c.add(O);let w=this.refs[O];return typeof w=="string"&&(w=this.refs[w]),typeof w=="object"?l(d,w.schema,O):O!==Sm(y)&&(O[0]==="#"?(l(d,u[O],O),u[O]=d):this.refs[O]=y),O}s(E,"addRef");function v(O){if(typeof O=="string"){if(!cJe.test(O))throw new Error(`invalid anchor "${O}"`);E.call(this,`#${O}`)}}s(v,"addAnchor")}),u;function l(d,_,m){if(_!==void 0&&!rJe(d,_))throw f(m)}s(l,"checkAmbiguosRef");function f(d){return new Error(`reference "${d}" resolves to more than one schema`)}s(f,"ambiguos")}s(lJe,"getSchemaRefs");Oi.getSchemaRefs=lJe});var X0=h(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});xc.getData=xc.KeywordCxt=xc.validateFunctionCode=void 0;var Bee=bee(),xee=K0(),jx=wx(),zw=K0(),fJe=Tee(),J0=$ee(),Lx=Lee(),ce=Pe(),Se=Is(),dJe=W0(),bu=ze(),Y0=z0();function pJe(e){if(zee(e)&&(Hee(e),Vee(e))){_Je(e);return}Gee(e,()=>(0,Bee.topBoolOrEmptySchema)(e))}s(pJe,"validateFunctionCode");xc.validateFunctionCode=pJe;function Gee({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,(0,ce._)`${Se.default.data}, ${Se.default.valCxt}`,n.$async,()=>{e.code((0,ce._)`"use strict"; ${qee(r,i)}`),mJe(e,i),e.code(o)}):e.func(t,(0,ce._)`${Se.default.data}, ${hJe(i)}`,n.$async,()=>e.code(qee(r,i)).code(o))}s(Gee,"validateFunction");function hJe(e){return(0,ce._)`{${Se.default.instancePath}="", ${Se.default.parentData}, ${Se.default.parentDataProperty}, ${Se.default.rootData}=${Se.default.data}${e.dynamicRef?(0,ce._)`, ${Se.default.dynamicAnchors}={}`:ce.nil}}={}`}s(hJe,"destructureValCxt");function mJe(e,t){e.if(Se.default.valCxt,()=>{e.var(Se.default.instancePath,(0,ce._)`${Se.default.valCxt}.${Se.default.instancePath}`),e.var(Se.default.parentData,(0,ce._)`${Se.default.valCxt}.${Se.default.parentData}`),e.var(Se.default.parentDataProperty,(0,ce._)`${Se.default.valCxt}.${Se.default.parentDataProperty}`),e.var(Se.default.rootData,(0,ce._)`${Se.default.valCxt}.${Se.default.rootData}`),t.dynamicRef&&e.var(Se.default.dynamicAnchors,(0,ce._)`${Se.default.valCxt}.${Se.default.dynamicAnchors}`)},()=>{e.var(Se.default.instancePath,(0,ce._)`""`),e.var(Se.default.parentData,(0,ce._)`undefined`),e.var(Se.default.parentDataProperty,(0,ce._)`undefined`),e.var(Se.default.rootData,Se.default.data),t.dynamicRef&&e.var(Se.default.dynamicAnchors,(0,ce._)`{}`)})}s(mJe,"destructureValCxtES5");function _Je(e){let{schema:t,opts:r,gen:n}=e;Gee(e,()=>{r.$comment&&t.$comment&&Wee(e),SJe(e),n.let(Se.default.vErrors,null),n.let(Se.default.errors,0),r.unevaluated&&gJe(e),Kee(e),PJe(e)})}s(_Je,"topSchemaObjCode");function gJe(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,ce._)`${r}.evaluated`),t.if((0,ce._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,ce._)`${e.evaluated}.props`,(0,ce._)`undefined`)),t.if((0,ce._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,ce._)`${e.evaluated}.items`,(0,ce._)`undefined`))}s(gJe,"resetEvaluated");function qee(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,ce._)`/*# sourceURL=${r} */`:ce.nil}s(qee,"funcSourceUrl");function yJe(e,t){if(zee(e)&&(Hee(e),Vee(e))){EJe(e,t);return}(0,Bee.boolOrEmptySchema)(e,t)}s(yJe,"subschemaCode");function Vee({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}s(Vee,"schemaCxtHasRules");function zee(e){return typeof e.schema!="boolean"}s(zee,"isSchemaObj");function EJe(e,t){let{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&Wee(e),vJe(e),OJe(e);let o=n.const("_errs",Se.default.errors);Kee(e,o),n.var(t,(0,ce._)`${o} === ${Se.default.errors}`)}s(EJe,"subSchemaObjCode");function Hee(e){(0,bu.checkUnknownRules)(e),bJe(e)}s(Hee,"checkKeywords");function Kee(e,t){if(e.opts.jtd)return Fee(e,[],!1,t);let r=(0,xee.getSchemaTypes)(e.schema),n=(0,xee.coerceAndCheckDataType)(e,r);Fee(e,r,!n,t)}s(Kee,"typeAndKeywords");function bJe(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,bu.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}s(bJe,"checkRefsAndKeywords");function SJe(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,bu.checkStrictMode)(e,"default is ignored in the schema root")}s(SJe,"checkNoDefault");function vJe(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,dJe.resolveUrl)(e.opts.uriResolver,e.baseId,t))}s(vJe,"updateContext");function OJe(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}s(OJe,"checkAsyncSchema");function Wee({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)e.code((0,ce._)`${Se.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let a=(0,ce.str)`${n}/$comment`,u=e.scopeValue("root",{ref:t.root});e.code((0,ce._)`${Se.default.self}.opts.$comment(${o}, ${a}, ${u}.schema)`)}}s(Wee,"commentKeyword");function PJe(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if((0,ce._)`${Se.default.errors} === 0`,()=>t.return(Se.default.data),()=>t.throw((0,ce._)`new ${i}(${Se.default.vErrors})`)):(t.assign((0,ce._)`${n}.errors`,Se.default.vErrors),o.unevaluated&&IJe(e),t.return((0,ce._)`${Se.default.errors} === 0`))}s(PJe,"returnResults");function IJe({gen:e,evaluated:t,props:r,items:n}){r instanceof ce.Name&&e.assign((0,ce._)`${t}.props`,r),n instanceof ce.Name&&e.assign((0,ce._)`${t}.items`,n)}s(IJe,"assignEvaluated");function Fee(e,t,r,n){let{gen:i,schema:o,data:a,allErrors:u,opts:c,self:l}=e,{RULES:f}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,bu.schemaHasRulesButRef)(o,f))){i.block(()=>Jee(e,"$ref",f.all.$ref.definition));return}c.jtd||wJe(e,t),i.block(()=>{for(let _ of f.rules)d(_);d(f.post)});function d(_){(0,jx.shouldUseGroup)(o,_)&&(_.type?(i.if((0,zw.checkDataType)(_.type,a,c.strictNumbers)),kee(e,_),t.length===1&&t[0]===_.type&&r&&(i.else(),(0,zw.reportTypeError)(e)),i.endIf()):kee(e,_),u||i.if((0,ce._)`${Se.default.errors} === ${n||0}`))}s(d,"groupKeywords")}s(Fee,"schemaKeywords");function kee(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,fJe.assignDefaults)(e,t.type),r.block(()=>{for(let o of t.rules)(0,jx.shouldUseRule)(n,o)&&Jee(e,o.keyword,o.definition,t.type)})}s(kee,"iterateKeywords");function wJe(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(TJe(e,t),e.opts.allowUnionTypes||NJe(e,t),AJe(e,e.dataTypes))}s(wJe,"checkStrictTypes");function TJe(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{Yee(e.dataTypes,r)||Mx(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),CJe(e,t)}}s(TJe,"checkContextTypes");function NJe(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Mx(e,"use allowUnionTypes to allow union type keyword")}s(NJe,"checkMultipleTypes");function AJe(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,jx.shouldUseRule)(e.schema,i)){let{type:o}=i.definition;o.length&&!o.some(a=>RJe(t,a))&&Mx(e,`missing type "${o.join(",")}" for keyword "${n}"`)}}}s(AJe,"checkKeywordTypes");function RJe(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}s(RJe,"hasApplicableType");function Yee(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}s(Yee,"includesType");function CJe(e,t){let r=[];for(let n of e.dataTypes)Yee(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}s(CJe,"narrowSchemaTypes");function Mx(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,bu.checkStrictMode)(e,t,e.opts.strictTypes)}s(Mx,"strictTypesError");var Hw=class{static{s(this,"KeywordCxt")}constructor(t,r,n){if((0,J0.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,bu.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",Xee(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,J0.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=t.gen.const("_errs",Se.default.errors))}result(t,r,n){this.failResult((0,ce.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,ce.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,ce._)`${r} !== undefined && (${(0,ce.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Y0.reportExtraError:Y0.reportError)(this,this.def.error,r)}$dataError(){(0,Y0.reportError)(this,this.def.$dataError||Y0.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Y0.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=ce.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=ce.nil,r=ce.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:a}=this;n.if((0,ce.or)((0,ce._)`${i} === undefined`,r)),t!==ce.nil&&n.assign(t,!0),(o.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==ce.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,ce.or)(a(),u());function a(){if(n.length){if(!(r instanceof ce.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,ce._)`${(0,zw.checkDataTypes)(c,r,o.opts.strictNumbers,zw.DataType.Wrong)}`}return ce.nil}function u(){if(i.validateSchema){let c=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,ce._)`!${c}(${r})`}return ce.nil}}subschema(t,r){let n=(0,Lx.getSubschema)(this.it,t);(0,Lx.extendSubschemaData)(n,this.it,t),(0,Lx.extendSubschemaMode)(n,t);let i={...this.it,...n,items:void 0,props:void 0};return yJe(i,r),i}mergeEvaluated(t,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=bu.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=bu.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,ce.Name)),!0}};xc.KeywordCxt=Hw;function Jee(e,t,r,n){let i=new Hw(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,J0.funcKeywordCode)(i,r):"macro"in r?(0,J0.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,J0.funcKeywordCode)(i,r)}s(Jee,"keywordCode");var $Je=/^\/(?:[^~]|~0|~1)*$/,DJe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Xee(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(e==="")return Se.default.rootData;if(e[0]==="/"){if(!$Je.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=Se.default.rootData}else{let l=DJe.exec(e);if(!l)throw new Error(`Invalid JSON-pointer: ${e}`);let f=+l[1];if(i=l[2],i==="#"){if(f>=t)throw new Error(c("property/index",f));return n[t-f]}if(f>t)throw new Error(c("data",f));if(o=r[t-f],!i)return o}let a=o,u=i.split("/");for(let l of u)l&&(o=(0,ce._)`${o}${(0,ce.getProperty)((0,bu.unescapeJsonPointer)(l))}`,a=(0,ce._)`${a} && ${o}`);return a;function c(l,f){return`Cannot access ${l} ${f} levels up, current level is ${t}`}}s(Xee,"getData");xc.getData=Xee});var Kw=h(xx=>{"use strict";Object.defineProperty(xx,"__esModule",{value:!0});var Ux=class extends Error{static{s(this,"ValidationError")}constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};xx.default=Ux});var Ww=h(kx=>{"use strict";Object.defineProperty(kx,"__esModule",{value:!0});var qx=W0(),Fx=class extends Error{static{s(this,"MissingRefError")}constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,qx.resolveUrl)(t,r,n),this.missingSchema=(0,qx.normalizeId)((0,qx.getFullPath)(t,this.missingRef))}};kx.default=Fx});var Q0=h(Ts=>{"use strict";Object.defineProperty(Ts,"__esModule",{value:!0});Ts.resolveSchema=Ts.getCompilingSchema=Ts.resolveRef=Ts.compileSchema=Ts.SchemaEnv=void 0;var yo=Pe(),LJe=Kw(),Td=Is(),Eo=W0(),Qee=ze(),jJe=X0(),vm=class{static{s(this,"SchemaEnv")}constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,Eo.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};Ts.SchemaEnv=vm;function Gx(e){let t=Zee.call(this,e);if(t)return t;let r=(0,Eo.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,a=new yo.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),u;e.$async&&(u=a.scopeValue("Error",{ref:LJe.default,code:(0,yo._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");e.validateName=c;let l={gen:a,allErrors:this.opts.allErrors,data:Td.default.data,parentData:Td.default.parentData,parentDataProperty:Td.default.parentDataProperty,dataNames:[Td.default.data],dataPathArr:[yo.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,yo.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:u,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:yo.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,yo._)`""`,opts:this.opts,self:this},f;try{this._compilations.add(e),(0,jJe.validateFunctionCode)(l),a.optimize(this.opts.code.optimize);let d=a.toString();f=`${a.scopeRefs(Td.default.scope)}return ${d}`,this.opts.code.process&&(f=this.opts.code.process(f,e));let m=new Function(`${Td.default.self}`,`${Td.default.scope}`,f)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:g,items:y}=l;m.evaluated={props:g instanceof yo.Name?void 0:g,items:y instanceof yo.Name?void 0:y,dynamicProps:g instanceof yo.Name,dynamicItems:y instanceof yo.Name},m.source&&(m.source.evaluated=(0,yo.stringify)(m.evaluated))}return e.validate=m,e}catch(d){throw delete e.validate,delete e.validateName,f&&this.logger.error("Error compiling schema, function code:",f),d}finally{this._compilations.delete(e)}}s(Gx,"compileSchema");Ts.compileSchema=Gx;function MJe(e,t,r){var n;r=(0,Eo.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let o=qJe.call(this,e,r);if(o===void 0){let a=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:u}=this.opts;a&&(o=new vm({schema:a,schemaId:u,root:e,baseId:t}))}if(o!==void 0)return e.refs[r]=UJe.call(this,o)}s(MJe,"resolveRef");Ts.resolveRef=MJe;function UJe(e){return(0,Eo.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Gx.call(this,e)}s(UJe,"inlineOrCompile");function Zee(e){for(let t of this._compilations)if(xJe(t,e))return t}s(Zee,"getCompilingSchema");Ts.getCompilingSchema=Zee;function xJe(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}s(xJe,"sameSchemaEnv");function qJe(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||Yw.call(this,e,t)}s(qJe,"resolve");function Yw(e,t){let r=this.opts.uriResolver.parse(t),n=(0,Eo._getFullPath)(this.opts.uriResolver,r),i=(0,Eo.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return Bx.call(this,r,e);let o=(0,Eo.normalizeId)(n),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){let u=Yw.call(this,e,a);return typeof u?.schema!="object"?void 0:Bx.call(this,r,u)}if(typeof a?.schema=="object"){if(a.validate||Gx.call(this,a),o===(0,Eo.normalizeId)(t)){let{schema:u}=a,{schemaId:c}=this.opts,l=u[c];return l&&(i=(0,Eo.resolveUrl)(this.opts.uriResolver,i,l)),new vm({schema:u,schemaId:c,root:e,baseId:i})}return Bx.call(this,r,a)}}s(Yw,"resolveSchema");Ts.resolveSchema=Yw;var FJe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Bx(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let u of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,Qee.unescapeFragment)(u)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!FJe.has(u)&&l&&(t=(0,Eo.resolveUrl)(this.opts.uriResolver,t,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,Qee.schemaHasRulesButRef)(r,this.RULES)){let u=(0,Eo.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=Yw.call(this,n,u)}let{schemaId:a}=this.opts;if(o=o||new vm({schema:r,schemaId:a,root:n,baseId:t}),o.schema!==o.root.schema)return o}s(Bx,"getJsonPointer")});var ete=h((jLt,kJe)=>{kJe.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 rte=h(Vx=>{"use strict";Object.defineProperty(Vx,"__esModule",{value:!0});var tte=XP();tte.code='require("ajv/dist/runtime/uri").default';Vx.default=tte});var lte=h(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.CodeGen=on.Name=on.nil=on.stringify=on.str=on._=on.KeywordCxt=void 0;var BJe=X0();Object.defineProperty(on,"KeywordCxt",{enumerable:!0,get:function(){return BJe.KeywordCxt}});var Om=Pe();Object.defineProperty(on,"_",{enumerable:!0,get:function(){return Om._}});Object.defineProperty(on,"str",{enumerable:!0,get:function(){return Om.str}});Object.defineProperty(on,"stringify",{enumerable:!0,get:function(){return Om.stringify}});Object.defineProperty(on,"nil",{enumerable:!0,get:function(){return Om.nil}});Object.defineProperty(on,"Name",{enumerable:!0,get:function(){return Om.Name}});Object.defineProperty(on,"CodeGen",{enumerable:!0,get:function(){return Om.CodeGen}});var GJe=Kw(),ate=Ww(),VJe=Ix(),Z0=Q0(),zJe=Pe(),eE=W0(),Jw=K0(),Hx=ze(),nte=ete(),HJe=rte(),ute=s((e,t)=>new RegExp(e,t),"defaultRegExp");ute.code="new RegExp";var KJe=["removeAdditional","useDefaults","coerceTypes"],WJe=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),YJe={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."},JJe={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},ite=200;function XJe(e){var t,r,n,i,o,a,u,c,l,f,d,_,m,g,y,b,E,v,O,I,w,j,F,K,H;let re=e.strict,de=(t=e.code)===null||t===void 0?void 0:t.optimize,te=de===!0||de===void 0?1:de||0,he=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:ute,Ce=(i=e.uriResolver)!==null&&i!==void 0?i:HJe.default;return{strictSchema:(a=(o=e.strictSchema)!==null&&o!==void 0?o:re)!==null&&a!==void 0?a:!0,strictNumbers:(c=(u=e.strictNumbers)!==null&&u!==void 0?u:re)!==null&&c!==void 0?c:!0,strictTypes:(f=(l=e.strictTypes)!==null&&l!==void 0?l:re)!==null&&f!==void 0?f:"log",strictTuples:(_=(d=e.strictTuples)!==null&&d!==void 0?d:re)!==null&&_!==void 0?_:"log",strictRequired:(g=(m=e.strictRequired)!==null&&m!==void 0?m:re)!==null&&g!==void 0?g:!1,code:e.code?{...e.code,optimize:te,regExp:he}:{optimize:te,regExp:he},loopRequired:(y=e.loopRequired)!==null&&y!==void 0?y:ite,loopEnum:(b=e.loopEnum)!==null&&b!==void 0?b:ite,meta:(E=e.meta)!==null&&E!==void 0?E:!0,messages:(v=e.messages)!==null&&v!==void 0?v:!0,inlineRefs:(O=e.inlineRefs)!==null&&O!==void 0?O:!0,schemaId:(I=e.schemaId)!==null&&I!==void 0?I:"$id",addUsedSchema:(w=e.addUsedSchema)!==null&&w!==void 0?w:!0,validateSchema:(j=e.validateSchema)!==null&&j!==void 0?j:!0,validateFormats:(F=e.validateFormats)!==null&&F!==void 0?F:!0,unicodeRegExp:(K=e.unicodeRegExp)!==null&&K!==void 0?K:!0,int32range:(H=e.int32range)!==null&&H!==void 0?H:!0,uriResolver:Ce}}s(XJe,"requiredOptions");var tE=class{static{s(this,"Ajv")}constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...XJe(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new zJe.ValueScope({scope:{},prefixes:WJe,es5:r,lines:n}),this.logger=nXe(t.logger);let i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,VJe.getRules)(),ste.call(this,YJe,t,"NOT SUPPORTED"),ste.call(this,JJe,t,"DEPRECATED","warn"),this._metaOpts=tXe.call(this),t.formats&&ZJe.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&eXe.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),QJe.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,i=nte;n==="id"&&(i={...nte},i.id=i.$id,delete i.$id),r&&t&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,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,t,r);async function i(f,d){await o.call(this,f.$schema);let _=this._addSchema(f,d);return _.validate||a.call(this,_)}async function o(f){f&&!this.getSchema(f)&&await i.call(this,{$ref:f},!0)}async function a(f){try{return this._compileSchemaEnv(f)}catch(d){if(!(d instanceof ate.default))throw d;return u.call(this,d),await c.call(this,d.missingSchema),a.call(this,f)}}function u({missingSchema:f,missingRef:d}){if(this.refs[f])throw new Error(`AnySchema ${f} is loaded but ${d} cannot be resolved`)}async function c(f){let d=await l.call(this,f);this.refs[f]||await o.call(this,d.$schema),this.refs[f]||this.addSchema(d,f,r)}async function l(f){let d=this._loading[f];if(d)return d;try{return await(this._loading[f]=n(f))}finally{delete this._loading[f]}}}addSchema(t,r,n,i=this.opts.validateSchema){if(Array.isArray(t)){for(let a of t)this.addSchema(a,void 0,n,i);return this}let o;if(typeof t=="object"){let{schemaId:a}=this.opts;if(o=t[a],o!==void 0&&typeof o!="string")throw new Error(`schema ${a} must be string`)}return r=(0,eE.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,i,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$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,t);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(t){let r;for(;typeof(r=ote.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,i=new Z0.SchemaEnv({schema:{},schemaId:n});if(r=Z0.resolveSchema.call(this,i,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=ote.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,eE.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,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(sXe.call(this,n,r),!r)return(0,Hx.eachItem)(n,o=>zx.call(this,o)),this;aXe.call(this,r);let i={...r,type:(0,Jw.getJSONTypes)(r.type),schemaType:(0,Jw.getJSONTypes)(r.schemaType)};return(0,Hx.eachItem)(n,i.type.length===0?o=>zx.call(this,o,i):o=>i.type.forEach(a=>zx.call(this,o,i,a))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===t);i>=0&&n.rules.splice(i,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let i of r){let o=i.split("/").slice(1),a=t;for(let u of o)a=a[u];for(let u in n){let c=n[u];if(typeof c!="object")continue;let{$data:l}=c.definition,f=a[u];l&&f&&(a[u]=cte(f))}}return t}_removeAllSchemas(t,r){for(let n in t){let i=t[n];(!r||r.test(n))&&(typeof i=="string"?delete t[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[n]))}}_addSchema(t,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let a,{schemaId:u}=this.opts;if(typeof t=="object")a=t[u];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;n=(0,eE.normalizeId)(a||n);let l=eE.getSchemaRefs.call(this,t,n);return c=new Z0.SchemaEnv({schema:t,schemaId:u,meta:r,baseId:n,localRefs:l}),this._cache.set(c.schema,c),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),i&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):Z0.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{Z0.compileSchema.call(this,t)}finally{this.opts=r}}};on.default=tE;tE.ValidationError=GJe.default;tE.MissingRefError=ate.default;function ste(e,t,r,n="error"){for(let i in e){let o=i;o in t&&this.logger[n](`${r}: option ${i}. ${e[o]}`)}}s(ste,"checkOptions");function ote(e){return e=(0,eE.normalizeId)(e),this.schemas[e]||this.refs[e]}s(ote,"getSchEnv");function QJe(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}s(QJe,"addInitialSchemas");function ZJe(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}s(ZJe,"addInitialFormats");function eXe(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}s(eXe,"addInitialKeywords");function tXe(){let e={...this.opts};for(let t of KJe)delete e[t];return e}s(tXe,"getMetaSchemaOptions");var rXe={log(){},warn(){},error(){}};function nXe(e){if(e===!1)return rXe;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}s(nXe,"getLogger");var iXe=/^[a-z_$][a-z0-9_$:-]*$/i;function sXe(e,t){let{RULES:r}=this;if((0,Hx.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!iXe.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}s(sXe,"checkKeyword");function zx(e,t,r){var n;let i=t?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,a=i?o.post:o.rules.find(({type:c})=>c===r);if(a||(a={type:r,rules:[]},o.rules.push(a)),o.keywords[e]=!0,!t)return;let u={keyword:e,definition:{...t,type:(0,Jw.getJSONTypes)(t.type),schemaType:(0,Jw.getJSONTypes)(t.schemaType)}};t.before?oXe.call(this,a,u,t.before):a.rules.push(u),o.all[e]=u,(n=t.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}s(zx,"addRule");function oXe(e,t,r){let n=e.rules.findIndex(i=>i.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}s(oXe,"addBeforeRule");function aXe(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=cte(t)),e.validateSchema=this.compile(t,!0))}s(aXe,"keywordMetaschema");var uXe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function cte(e){return{anyOf:[e,uXe]}}s(cte,"schemaOrData")});var fte=h(Kx=>{"use strict";Object.defineProperty(Kx,"__esModule",{value:!0});var cXe={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Kx.default=cXe});var Zw=h(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});Nd.callRef=Nd.getValidate=void 0;var lXe=Ww(),dte=ws(),Pi=Pe(),Pm=Is(),pte=Q0(),Xw=ze(),fXe={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:o,validateName:a,opts:u,self:c}=n,{root:l}=o;if((r==="#"||r==="#/")&&i===l.baseId)return d();let f=pte.resolveRef.call(c,l,i,r);if(f===void 0)throw new lXe.default(n.opts.uriResolver,i,r);if(f instanceof pte.SchemaEnv)return _(f);return m(f);function d(){if(o===l)return Qw(e,a,o,o.$async);let g=t.scopeValue("root",{ref:l});return Qw(e,(0,Pi._)`${g}.validate`,l,l.$async)}function _(g){let y=hte(e,g);Qw(e,y,g,g.$async)}function m(g){let y=t.scopeValue("schema",u.code.source===!0?{ref:g,code:(0,Pi.stringify)(g)}:{ref:g}),b=t.name("valid"),E=e.subschema({schema:g,dataTypes:[],schemaPath:Pi.nil,topSchemaRef:y,errSchemaPath:r},b);e.mergeEvaluated(E),e.ok(b)}}};function hte(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Pi._)`${r.scopeValue("wrapper",{ref:t})}.validate`}s(hte,"getValidate");Nd.getValidate=hte;function Qw(e,t,r,n){let{gen:i,it:o}=e,{allErrors:a,schemaEnv:u,opts:c}=o,l=c.passContext?Pm.default.this:Pi.nil;n?f():d();function f(){if(!u.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,Pi._)`await ${(0,dte.callValidateCode)(e,t,l)}`),m(t),a||i.assign(g,!0)},y=>{i.if((0,Pi._)`!(${y} instanceof ${o.ValidationError})`,()=>i.throw(y)),_(y),a||i.assign(g,!1)}),e.ok(g)}s(f,"callAsyncRef");function d(){e.result((0,dte.callValidateCode)(e,t,l),()=>m(t),()=>_(t))}s(d,"callSyncRef");function _(g){let y=(0,Pi._)`${g}.errors`;i.assign(Pm.default.vErrors,(0,Pi._)`${Pm.default.vErrors} === null ? ${y} : ${Pm.default.vErrors}.concat(${y})`),i.assign(Pm.default.errors,(0,Pi._)`${Pm.default.vErrors}.length`)}s(_,"addErrorsFrom");function m(g){var y;if(!o.opts.unevaluated)return;let b=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(b&&!b.dynamicProps)b.props!==void 0&&(o.props=Xw.mergeEvaluated.props(i,b.props,o.props));else{let E=i.var("props",(0,Pi._)`${g}.evaluated.props`);o.props=Xw.mergeEvaluated.props(i,E,o.props,Pi.Name)}if(o.items!==!0)if(b&&!b.dynamicItems)b.items!==void 0&&(o.items=Xw.mergeEvaluated.items(i,b.items,o.items));else{let E=i.var("items",(0,Pi._)`${g}.evaluated.items`);o.items=Xw.mergeEvaluated.items(i,E,o.items,Pi.Name)}}s(m,"addEvaluatedFrom")}s(Qw,"callRef");Nd.callRef=Qw;Nd.default=fXe});var mte=h(Wx=>{"use strict";Object.defineProperty(Wx,"__esModule",{value:!0});var dXe=fte(),pXe=Zw(),hXe=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",dXe.default,pXe.default];Wx.default=hXe});var _te=h(Yx=>{"use strict";Object.defineProperty(Yx,"__esModule",{value:!0});var eT=Pe(),qc=eT.operators,tT={maximum:{okStr:"<=",ok:qc.LTE,fail:qc.GT},minimum:{okStr:">=",ok:qc.GTE,fail:qc.LT},exclusiveMaximum:{okStr:"<",ok:qc.LT,fail:qc.GTE},exclusiveMinimum:{okStr:">",ok:qc.GT,fail:qc.LTE}},mXe={message:({keyword:e,schemaCode:t})=>(0,eT.str)`must be ${tT[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,eT._)`{comparison: ${tT[e].okStr}, limit: ${t}}`},_Xe={keyword:Object.keys(tT),type:"number",schemaType:"number",$data:!0,error:mXe,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,eT._)`${r} ${tT[t].fail} ${n} || isNaN(${r})`)}};Yx.default=_Xe});var gte=h(Jx=>{"use strict";Object.defineProperty(Jx,"__esModule",{value:!0});var rE=Pe(),gXe={message:({schemaCode:e})=>(0,rE.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,rE._)`{multipleOf: ${e}}`},yXe={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:gXe,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,o=i.opts.multipleOfPrecision,a=t.let("res"),u=o?(0,rE._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,rE._)`${a} !== parseInt(${a})`;e.fail$data((0,rE._)`(${n} === 0 || (${a} = ${r}/${n}, ${u}))`)}};Jx.default=yXe});var Ete=h(Xx=>{"use strict";Object.defineProperty(Xx,"__esModule",{value:!0});function yte(e){let t=e.length,r=0,n=0,i;for(;n<t;)r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t&&(i=e.charCodeAt(n),(i&64512)===56320&&n++);return r}s(yte,"ucs2length");Xx.default=yte;yte.code='require("ajv/dist/runtime/ucs2length").default'});var bte=h(Qx=>{"use strict";Object.defineProperty(Qx,"__esModule",{value:!0});var Ad=Pe(),EXe=ze(),bXe=Ete(),SXe={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Ad.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Ad._)`{limit: ${e}}`},vXe={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:SXe,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,o=t==="maxLength"?Ad.operators.GT:Ad.operators.LT,a=i.opts.unicode===!1?(0,Ad._)`${r}.length`:(0,Ad._)`${(0,EXe.useFunc)(e.gen,bXe.default)}(${r})`;e.fail$data((0,Ad._)`${a} ${o} ${n}`)}};Qx.default=vXe});var Ste=h(Zx=>{"use strict";Object.defineProperty(Zx,"__esModule",{value:!0});var OXe=ws(),rT=Pe(),PXe={message:({schemaCode:e})=>(0,rT.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,rT._)`{pattern: ${e}}`},IXe={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:PXe,code(e){let{data:t,$data:r,schema:n,schemaCode:i,it:o}=e,a=o.opts.unicodeRegExp?"u":"",u=r?(0,rT._)`(new RegExp(${i}, ${a}))`:(0,OXe.usePattern)(e,n);e.fail$data((0,rT._)`!${u}.test(${t})`)}};Zx.default=IXe});var vte=h(eq=>{"use strict";Object.defineProperty(eq,"__esModule",{value:!0});var nE=Pe(),wXe={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,nE.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,nE._)`{limit: ${e}}`},TXe={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:wXe,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?nE.operators.GT:nE.operators.LT;e.fail$data((0,nE._)`Object.keys(${r}).length ${i} ${n}`)}};eq.default=TXe});var Ote=h(tq=>{"use strict";Object.defineProperty(tq,"__esModule",{value:!0});var iE=ws(),sE=Pe(),NXe=ze(),AXe={message:({params:{missingProperty:e}})=>(0,sE.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,sE._)`{missingProperty: ${e}}`},RXe={keyword:"required",type:"object",schemaType:"array",$data:!0,error:AXe,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:o,it:a}=e,{opts:u}=a;if(!o&&r.length===0)return;let c=r.length>=u.loopRequired;if(a.allErrors?l():f(),u.strictRequired){let m=e.parentSchema.properties,{definedProperties:g}=e.it;for(let y of r)if(m?.[y]===void 0&&!g.has(y)){let b=a.schemaEnv.baseId+a.errSchemaPath,E=`required property "${y}" is not defined at "${b}" (strictRequired)`;(0,NXe.checkStrictMode)(a,E,a.opts.strictRequired)}}function l(){if(c||o)e.block$data(sE.nil,d);else for(let m of r)(0,iE.checkReportMissingProp)(e,m)}s(l,"allErrorsMode");function f(){let m=t.let("missing");if(c||o){let g=t.let("valid",!0);e.block$data(g,()=>_(m,g)),e.ok(g)}else t.if((0,iE.checkMissingProp)(e,r,m)),(0,iE.reportMissingProp)(e,m),t.else()}s(f,"exitOnErrorMode");function d(){t.forOf("prop",n,m=>{e.setParams({missingProperty:m}),t.if((0,iE.noPropertyInData)(t,i,m,u.ownProperties),()=>e.error())})}s(d,"loopAllRequired");function _(m,g){e.setParams({missingProperty:m}),t.forOf(m,n,()=>{t.assign(g,(0,iE.propertyInData)(t,i,m,u.ownProperties)),t.if((0,sE.not)(g),()=>{e.error(),t.break()})},sE.nil)}s(_,"loopUntilMissing")}};tq.default=RXe});var Pte=h(rq=>{"use strict";Object.defineProperty(rq,"__esModule",{value:!0});var oE=Pe(),CXe={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,oE.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,oE._)`{limit: ${e}}`},$Xe={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:CXe,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?oE.operators.GT:oE.operators.LT;e.fail$data((0,oE._)`${r}.length ${i} ${n}`)}};rq.default=$Xe});var nT=h(nq=>{"use strict";Object.defineProperty(nq,"__esModule",{value:!0});var Ite=Xf();Ite.code='require("ajv/dist/runtime/equal").default';nq.default=Ite});var wte=h(sq=>{"use strict";Object.defineProperty(sq,"__esModule",{value:!0});var iq=K0(),an=Pe(),DXe=ze(),LXe=nT(),jXe={message:({params:{i:e,j:t}})=>(0,an.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,an._)`{i: ${e}, j: ${t}}`},MXe={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:jXe,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:o,schemaCode:a,it:u}=e;if(!n&&!i)return;let c=t.let("valid"),l=o.items?(0,iq.getSchemaTypes)(o.items):[];e.block$data(c,f,(0,an._)`${a} === false`),e.ok(c);function f(){let g=t.let("i",(0,an._)`${r}.length`),y=t.let("j");e.setParams({i:g,j:y}),t.assign(c,!0),t.if((0,an._)`${g} > 1`,()=>(d()?_:m)(g,y))}s(f,"validateUniqueItems");function d(){return l.length>0&&!l.some(g=>g==="object"||g==="array")}s(d,"canOptimize");function _(g,y){let b=t.name("item"),E=(0,iq.checkDataTypes)(l,b,u.opts.strictNumbers,iq.DataType.Wrong),v=t.const("indices",(0,an._)`{}`);t.for((0,an._)`;${g}--;`,()=>{t.let(b,(0,an._)`${r}[${g}]`),t.if(E,(0,an._)`continue`),l.length>1&&t.if((0,an._)`typeof ${b} == "string"`,(0,an._)`${b} += "_"`),t.if((0,an._)`typeof ${v}[${b}] == "number"`,()=>{t.assign(y,(0,an._)`${v}[${b}]`),e.error(),t.assign(c,!1).break()}).code((0,an._)`${v}[${b}] = ${g}`)})}s(_,"loopN");function m(g,y){let b=(0,DXe.useFunc)(t,LXe.default),E=t.name("outer");t.label(E).for((0,an._)`;${g}--;`,()=>t.for((0,an._)`${y} = ${g}; ${y}--;`,()=>t.if((0,an._)`${b}(${r}[${g}], ${r}[${y}])`,()=>{e.error(),t.assign(c,!1).break(E)})))}s(m,"loopN2")}};sq.default=MXe});var Tte=h(aq=>{"use strict";Object.defineProperty(aq,"__esModule",{value:!0});var oq=Pe(),UXe=ze(),xXe=nT(),qXe={message:"must be equal to constant",params:({schemaCode:e})=>(0,oq._)`{allowedValue: ${e}}`},FXe={keyword:"const",$data:!0,error:qXe,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:o}=e;n||o&&typeof o=="object"?e.fail$data((0,oq._)`!${(0,UXe.useFunc)(t,xXe.default)}(${r}, ${i})`):e.fail((0,oq._)`${o} !== ${r}`)}};aq.default=FXe});var Nte=h(uq=>{"use strict";Object.defineProperty(uq,"__esModule",{value:!0});var aE=Pe(),kXe=ze(),BXe=nT(),GXe={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,aE._)`{allowedValues: ${e}}`},VXe={keyword:"enum",schemaType:"array",$data:!0,error:GXe,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:o,it:a}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let u=i.length>=a.opts.loopEnum,c,l=s(()=>c??(c=(0,kXe.useFunc)(t,BXe.default)),"getEql"),f;if(u||n)f=t.let("valid"),e.block$data(f,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=t.const("vSchema",o);f=(0,aE.or)(...i.map((g,y)=>_(m,y)))}e.pass(f);function d(){t.assign(f,!1),t.forOf("v",o,m=>t.if((0,aE._)`${l()}(${r}, ${m})`,()=>t.assign(f,!0).break()))}s(d,"loopEnum");function _(m,g){let y=i[g];return typeof y=="object"&&y!==null?(0,aE._)`${l()}(${r}, ${m}[${g}])`:(0,aE._)`${r} === ${y}`}s(_,"equalCode")}};uq.default=VXe});var Ate=h(cq=>{"use strict";Object.defineProperty(cq,"__esModule",{value:!0});var zXe=_te(),HXe=gte(),KXe=bte(),WXe=Ste(),YXe=vte(),JXe=Ote(),XXe=Pte(),QXe=wte(),ZXe=Tte(),eQe=Nte(),tQe=[zXe.default,HXe.default,KXe.default,WXe.default,YXe.default,JXe.default,XXe.default,QXe.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},ZXe.default,eQe.default];cq.default=tQe});var fq=h(uE=>{"use strict";Object.defineProperty(uE,"__esModule",{value:!0});uE.validateAdditionalItems=void 0;var Rd=Pe(),lq=ze(),rQe={message:({params:{len:e}})=>(0,Rd.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Rd._)`{limit: ${e}}`},nQe={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:rQe,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,lq.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Rte(e,n)}};function Rte(e,t){let{gen:r,schema:n,data:i,keyword:o,it:a}=e;a.items=!0;let u=r.const("len",(0,Rd._)`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,Rd._)`${u} <= ${t.length}`);else if(typeof n=="object"&&!(0,lq.alwaysValidSchema)(a,n)){let l=r.var("valid",(0,Rd._)`${u} <= ${t.length}`);r.if((0,Rd.not)(l),()=>c(l)),e.ok(l)}function c(l){r.forRange("i",t.length,u,f=>{e.subschema({keyword:o,dataProp:f,dataPropType:lq.Type.Num},l),a.allErrors||r.if((0,Rd.not)(l),()=>r.break())})}s(c,"validateItems")}s(Rte,"validateAdditionalItems");uE.validateAdditionalItems=Rte;uE.default=nQe});var dq=h(cE=>{"use strict";Object.defineProperty(cE,"__esModule",{value:!0});cE.validateTuple=void 0;var Cte=Pe(),iT=ze(),iQe=ws(),sQe={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return $te(e,"additionalItems",t);r.items=!0,!(0,iT.alwaysValidSchema)(r,t)&&e.ok((0,iQe.validateArray)(e))}};function $te(e,t,r=e.schema){let{gen:n,parentSchema:i,data:o,keyword:a,it:u}=e;f(i),u.opts.unevaluated&&r.length&&u.items!==!0&&(u.items=iT.mergeEvaluated.items(n,r.length,u.items));let c=n.name("valid"),l=n.const("len",(0,Cte._)`${o}.length`);r.forEach((d,_)=>{(0,iT.alwaysValidSchema)(u,d)||(n.if((0,Cte._)`${l} > ${_}`,()=>e.subschema({keyword:a,schemaProp:_,dataProp:_},c)),e.ok(c))});function f(d){let{opts:_,errSchemaPath:m}=u,g=r.length,y=g===d.minItems&&(g===d.maxItems||d[t]===!1);if(_.strictTuples&&!y){let b=`"${a}" is ${g}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,iT.checkStrictMode)(u,b,_.strictTuples)}}s(f,"checkStrictTuple")}s($te,"validateTuple");cE.validateTuple=$te;cE.default=sQe});var Dte=h(pq=>{"use strict";Object.defineProperty(pq,"__esModule",{value:!0});var oQe=dq(),aQe={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,oQe.validateTuple)(e,"items")};pq.default=aQe});var jte=h(hq=>{"use strict";Object.defineProperty(hq,"__esModule",{value:!0});var Lte=Pe(),uQe=ze(),cQe=ws(),lQe=fq(),fQe={message:({params:{len:e}})=>(0,Lte.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Lte._)`{limit: ${e}}`},dQe={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:fQe,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,uQe.alwaysValidSchema)(n,t)&&(i?(0,lQe.validateAdditionalItems)(e,i):e.ok((0,cQe.validateArray)(e)))}};hq.default=dQe});var Mte=h(mq=>{"use strict";Object.defineProperty(mq,"__esModule",{value:!0});var Ns=Pe(),sT=ze(),pQe={message:({params:{min:e,max:t}})=>t===void 0?(0,Ns.str)`must contain at least ${e} valid item(s)`:(0,Ns.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Ns._)`{minContains: ${e}}`:(0,Ns._)`{minContains: ${e}, maxContains: ${t}}`},hQe={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:pQe,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e,a,u,{minContains:c,maxContains:l}=n;o.opts.next?(a=c===void 0?1:c,u=l):a=1;let f=t.const("len",(0,Ns._)`${i}.length`);if(e.setParams({min:a,max:u}),u===void 0&&a===0){(0,sT.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(u!==void 0&&a>u){(0,sT.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,sT.alwaysValidSchema)(o,r)){let y=(0,Ns._)`${f} >= ${a}`;u!==void 0&&(y=(0,Ns._)`${y} && ${f} <= ${u}`),e.pass(y);return}o.items=!0;let d=t.name("valid");u===void 0&&a===1?m(d,()=>t.if(d,()=>t.break())):a===0?(t.let(d,!0),u!==void 0&&t.if((0,Ns._)`${i}.length > 0`,_)):(t.let(d,!1),_()),e.result(d,()=>e.reset());function _(){let y=t.name("_valid"),b=t.let("count",0);m(y,()=>t.if(y,()=>g(b)))}s(_,"validateItemsWithCount");function m(y,b){t.forRange("i",0,f,E=>{e.subschema({keyword:"contains",dataProp:E,dataPropType:sT.Type.Num,compositeRule:!0},y),b()})}s(m,"validateItems");function g(y){t.code((0,Ns._)`${y}++`),u===void 0?t.if((0,Ns._)`${y} >= ${a}`,()=>t.assign(d,!0).break()):(t.if((0,Ns._)`${y} > ${u}`,()=>t.assign(d,!1).break()),a===1?t.assign(d,!0):t.if((0,Ns._)`${y} >= ${a}`,()=>t.assign(d,!0)))}s(g,"checkLimits")}};mq.default=hQe});var oT=h(ma=>{"use strict";Object.defineProperty(ma,"__esModule",{value:!0});ma.validateSchemaDeps=ma.validatePropertyDeps=ma.error=void 0;var _q=Pe(),mQe=ze(),lE=ws();ma.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,_q.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,_q._)`{property: ${e},
|
|
175
175
|
missingProperty: ${n},
|
|
176
176
|
depsCount: ${t},
|
|
177
|
-
deps: ${r}}`};var _Qe={keyword:"dependencies",type:"object",schemaType:"object",error:ma.error,code(e){let[t,r]=gQe(e);Ute(e,t),xte(e,r)}};function gQe({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}s(gQe,"splitDependencies");function Ute(e,t=e.schema){let{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;let o=r.let("missing");for(let a in t){let u=t[a];if(u.length===0)continue;let c=(0,lE.propertyInData)(r,n,a,i.opts.ownProperties);e.setParams({property:a,depsCount:u.length,deps:u.join(", ")}),i.allErrors?r.if(c,()=>{for(let l of u)(0,lE.checkReportMissingProp)(e,l)}):(r.if((0,_q._)`${c} && (${(0,lE.checkMissingProp)(e,u,o)})`),(0,lE.reportMissingProp)(e,o),r.else())}}s(Ute,"validatePropertyDeps");ma.validatePropertyDeps=Ute;function xte(e,t=e.schema){let{gen:r,data:n,keyword:i,it:o}=e,a=r.name("valid");for(let u in t)(0,mQe.alwaysValidSchema)(o,t[u])||(r.if((0,lE.propertyInData)(r,n,u,o.opts.ownProperties),()=>{let c=e.subschema({keyword:i,schemaProp:u},a);e.mergeValidEvaluated(c,a)},()=>r.var(a,!0)),e.ok(a))}s(xte,"validateSchemaDeps");ma.validateSchemaDeps=xte;ma.default=_Qe});var Fte=h(gq=>{"use strict";Object.defineProperty(gq,"__esModule",{value:!0});var qte=Pe(),yQe=ze(),EQe={message:"property name must be valid",params:({params:e})=>(0,qte._)`{propertyName: ${e.propertyName}}`},bQe={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:EQe,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,yQe.alwaysValidSchema)(i,r))return;let o=t.name("valid");t.forIn("key",n,a=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),t.if((0,qte.not)(o),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(o)}};gq.default=bQe});var Eq=h(yq=>{"use strict";Object.defineProperty(yq,"__esModule",{value:!0});var aT=ws(),bo=Pe(),SQe=Is(),uT=ze(),vQe={message:"must NOT have additional properties",params:({params:e})=>(0,bo._)`{additionalProperty: ${e.additionalProperty}}`},OQe={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:vQe,code(e){let{gen:t,schema:r,parentSchema:n,data:i,errsCount:o,it:a}=e;if(!o)throw new Error("ajv implementation error");let{allErrors:u,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,uT.alwaysValidSchema)(a,r))return;let l=(0,aT.allSchemaProperties)(n.properties),f=(0,aT.allSchemaProperties)(n.patternProperties);d(),e.ok((0,bo._)`${o} === ${SQe.default.errors}`);function d(){t.forIn("key",i,b=>{!l.length&&!f.length?g(b):t.if(_(b),()=>g(b))})}s(d,"checkAdditionalProperties");function _(b){let E;if(l.length>8){let S=(0,uT.schemaRefOrVal)(a,n.properties,"properties");E=(0,aT.isOwnProperty)(t,S,b)}else l.length?E=(0,bo.or)(...l.map(S=>(0,bo._)`${b} === ${S}`)):E=bo.nil;return f.length&&(E=(0,bo.or)(E,...f.map(S=>(0,bo._)`${(0,aT.usePattern)(e,S)}.test(${b})`))),(0,bo.not)(E)}s(_,"isAdditional");function m(b){t.code((0,bo._)`delete ${i}[${b}]`)}s(m,"deleteAdditional");function g(b){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(b);return}if(r===!1){e.setParams({additionalProperty:b}),e.error(),u||t.break();return}if(typeof r=="object"&&!(0,uT.alwaysValidSchema)(a,r)){let E=t.name("valid");c.removeAdditional==="failing"?(y(b,E,!1),t.if((0,bo.not)(E),()=>{e.reset(),m(b)})):(y(b,E),u||t.if((0,bo.not)(E),()=>t.break()))}}s(g,"additionalPropertyCode");function y(b,E,S){let O={keyword:"additionalProperties",dataProp:b,dataPropType:uT.Type.Str};S===!1&&Object.assign(O,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(O,E)}s(y,"applyAdditionalSchema")}};yq.default=OQe});var Gte=h(Sq=>{"use strict";Object.defineProperty(Sq,"__esModule",{value:!0});var PQe=X0(),kte=ws(),bq=ze(),Bte=Eq(),IQe={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Bte.default.code(new PQe.KeywordCxt(o,Bte.default,"additionalProperties"));let a=(0,kte.allSchemaProperties)(r);for(let d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=bq.mergeEvaluated.props(t,(0,bq.toHash)(a),o.props));let u=a.filter(d=>!(0,bq.alwaysValidSchema)(o,r[d]));if(u.length===0)return;let c=t.name("valid");for(let d of u)l(d)?f(d):(t.if((0,kte.propertyInData)(t,i,d,o.opts.ownProperties)),f(d),o.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function l(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}s(l,"hasDefault");function f(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}s(f,"applyPropertySchema")}};Sq.default=IQe});var Kte=h(vq=>{"use strict";Object.defineProperty(vq,"__esModule",{value:!0});var Vte=ws(),cT=Pe(),zte=ze(),Hte=ze(),wQe={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:o}=e,{opts:a}=o,u=(0,Vte.allSchemaProperties)(r),c=u.filter(y=>(0,zte.alwaysValidSchema)(o,r[y]));if(u.length===0||c.length===u.length&&(!o.opts.unevaluated||o.props===!0))return;let l=a.strictSchema&&!a.allowMatchingProperties&&i.properties,f=t.name("valid");o.props!==!0&&!(o.props instanceof cT.Name)&&(o.props=(0,Hte.evaluatedPropsToName)(t,o.props));let{props:d}=o;_();function _(){for(let y of u)l&&m(y),o.allErrors?g(y):(t.var(f,!0),g(y),t.if(f))}s(_,"validatePatternProperties");function m(y){for(let b in l)new RegExp(y).test(b)&&(0,zte.checkStrictMode)(o,`property ${b} matches pattern ${y} (use allowMatchingProperties)`)}s(m,"checkMatchingProperties");function g(y){t.forIn("key",n,b=>{t.if((0,cT._)`${(0,Vte.usePattern)(e,y)}.test(${b})`,()=>{let E=c.includes(y);E||e.subschema({keyword:"patternProperties",schemaProp:y,dataProp:b,dataPropType:Hte.Type.Str},f),o.opts.unevaluated&&d!==!0?t.assign((0,cT._)`${d}[${b}]`,!0):!E&&!o.allErrors&&t.if((0,cT.not)(f),()=>t.break())})})}s(g,"validateProperties")}};vq.default=wQe});var Wte=h(Oq=>{"use strict";Object.defineProperty(Oq,"__esModule",{value:!0});var TQe=ze(),NQe={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,TQe.alwaysValidSchema)(n,r)){e.fail();return}let i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Oq.default=NQe});var Yte=h(Pq=>{"use strict";Object.defineProperty(Pq,"__esModule",{value:!0});var AQe=ws(),RQe={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:AQe.validateUnion,error:{message:"must match a schema in anyOf"}};Pq.default=RQe});var Jte=h(Iq=>{"use strict";Object.defineProperty(Iq,"__esModule",{value:!0});var lT=Pe(),CQe=ze(),$Qe={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,lT._)`{passingSchemas: ${e.passing}}`},DQe={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:$Qe,code(e){let{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,a=t.let("valid",!1),u=t.let("passing",null),c=t.name("_valid");e.setParams({passing:u}),t.block(l),e.result(a,()=>e.reset(),()=>e.error(!0));function l(){o.forEach((f,d)=>{let _;(0,CQe.alwaysValidSchema)(i,f)?t.var(c,!0):_=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,lT._)`${c} && ${a}`).assign(a,!1).assign(u,(0,lT._)`[${u}, ${d}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(u,d),_&&e.mergeEvaluated(_,lT.Name)})})}s(l,"validateOneOf")}};Iq.default=DQe});var Xte=h(wq=>{"use strict";Object.defineProperty(wq,"__esModule",{value:!0});var LQe=ze(),jQe={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=t.name("valid");r.forEach((o,a)=>{if((0,LQe.alwaysValidSchema)(n,o))return;let u=e.subschema({keyword:"allOf",schemaProp:a},i);e.ok(i),e.mergeEvaluated(u)})}};wq.default=jQe});var ere=h(Tq=>{"use strict";Object.defineProperty(Tq,"__esModule",{value:!0});var fT=Pe(),Zte=ze(),MQe={message:({params:e})=>(0,fT.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,fT._)`{failingKeyword: ${e.ifClause}}`},UQe={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:MQe,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,Zte.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=Qte(n,"then"),o=Qte(n,"else");if(!i&&!o)return;let a=t.let("valid",!0),u=t.name("_valid");if(c(),e.reset(),i&&o){let f=t.let("ifClause");e.setParams({ifClause:f}),t.if(u,l("then",f),l("else",f))}else i?t.if(u,l("then")):t.if((0,fT.not)(u),l("else"));e.pass(a,()=>e.error(!0));function c(){let f=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(f)}s(c,"validateIf");function l(f,d){return()=>{let _=e.subschema({keyword:f},u);t.assign(a,u),e.mergeValidEvaluated(_,a),d?t.assign(d,(0,fT._)`${f}`):e.setParams({ifClause:f})}}s(l,"validateClause")}};function Qte(e,t){let r=e.schema[t];return r!==void 0&&!(0,Zte.alwaysValidSchema)(e,r)}s(Qte,"hasSchema");Tq.default=UQe});var tre=h(Nq=>{"use strict";Object.defineProperty(Nq,"__esModule",{value:!0});var xQe=ze(),qQe={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,xQe.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Nq.default=qQe});var rre=h(Aq=>{"use strict";Object.defineProperty(Aq,"__esModule",{value:!0});var FQe=fq(),kQe=Dte(),BQe=dq(),GQe=jte(),VQe=Mte(),zQe=oT(),HQe=Fte(),KQe=Eq(),WQe=Gte(),YQe=Kte(),JQe=Wte(),XQe=Yte(),QQe=Jte(),ZQe=Xte(),eZe=ere(),tZe=tre();function rZe(e=!1){let t=[JQe.default,XQe.default,QQe.default,ZQe.default,eZe.default,tZe.default,HQe.default,KQe.default,zQe.default,WQe.default,YQe.default];return e?t.push(kQe.default,GQe.default):t.push(FQe.default,BQe.default),t.push(VQe.default),t}s(rZe,"getApplicator");Aq.default=rZe});var Cq=h(fE=>{"use strict";Object.defineProperty(fE,"__esModule",{value:!0});fE.dynamicAnchor=void 0;var Rq=Pe(),nZe=Is(),nre=Q0(),iZe=Zw(),sZe={keyword:"$dynamicAnchor",schemaType:"string",code:e=>ire(e,e.schema)};function ire(e,t){let{gen:r,it:n}=e;n.schemaEnv.root.dynamicAnchors[t]=!0;let i=(0,Rq._)`${nZe.default.dynamicAnchors}${(0,Rq.getProperty)(t)}`,o=n.errSchemaPath==="#"?n.validateName:oZe(e);r.if((0,Rq._)`!${i}`,()=>r.assign(i,o))}s(ire,"dynamicAnchor");fE.dynamicAnchor=ire;function oZe(e){let{schemaEnv:t,schema:r,self:n}=e.it,{root:i,baseId:o,localRefs:a,meta:u}=t.root,{schemaId:c}=n.opts,l=new nre.SchemaEnv({schema:r,schemaId:c,root:i,baseId:o,localRefs:a,meta:u});return nre.compileSchema.call(n,l),(0,iZe.getValidate)(e,l)}s(oZe,"_getValidate");fE.default=sZe});var $q=h(dE=>{"use strict";Object.defineProperty(dE,"__esModule",{value:!0});dE.dynamicRef=void 0;var sre=Pe(),aZe=Is(),ore=Zw(),uZe={keyword:"$dynamicRef",schemaType:"string",code:e=>are(e,e.schema)};function are(e,t){let{gen:r,keyword:n,it:i}=e;if(t[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);let o=t.slice(1);if(i.allErrors)a();else{let c=r.let("valid",!1);a(c),e.ok(c)}function a(c){if(i.schemaEnv.root.dynamicAnchors[o]){let l=r.let("_v",(0,sre._)`${aZe.default.dynamicAnchors}${(0,sre.getProperty)(o)}`);r.if(l,u(l,c),u(i.validateName,c))}else u(i.validateName,c)()}s(a,"_dynamicRef");function u(c,l){return l?()=>r.block(()=>{(0,ore.callRef)(e,c),r.let(l,!0)}):()=>(0,ore.callRef)(e,c)}s(u,"_callRef")}s(are,"dynamicRef");dE.dynamicRef=are;dE.default=uZe});var ure=h(Dq=>{"use strict";Object.defineProperty(Dq,"__esModule",{value:!0});var cZe=Cq(),lZe=ze(),fZe={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,cZe.dynamicAnchor)(e,""):(0,lZe.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};Dq.default=fZe});var cre=h(Lq=>{"use strict";Object.defineProperty(Lq,"__esModule",{value:!0});var dZe=$q(),pZe={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,dZe.dynamicRef)(e,e.schema)};Lq.default=pZe});var lre=h(jq=>{"use strict";Object.defineProperty(jq,"__esModule",{value:!0});var hZe=Cq(),mZe=$q(),_Ze=ure(),gZe=cre(),yZe=[hZe.default,mZe.default,_Ze.default,gZe.default];jq.default=yZe});var dre=h(Mq=>{"use strict";Object.defineProperty(Mq,"__esModule",{value:!0});var fre=oT(),EZe={keyword:"dependentRequired",type:"object",schemaType:"object",error:fre.error,code:e=>(0,fre.validatePropertyDeps)(e)};Mq.default=EZe});var pre=h(Uq=>{"use strict";Object.defineProperty(Uq,"__esModule",{value:!0});var bZe=oT(),SZe={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,bZe.validateSchemaDeps)(e)};Uq.default=SZe});var hre=h(xq=>{"use strict";Object.defineProperty(xq,"__esModule",{value:!0});var vZe=ze(),OZe={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:r}){t.contains===void 0&&(0,vZe.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}};xq.default=OZe});var mre=h(qq=>{"use strict";Object.defineProperty(qq,"__esModule",{value:!0});var PZe=dre(),IZe=pre(),wZe=hre(),TZe=[PZe.default,IZe.default,wZe.default];qq.default=TZe});var gre=h(Fq=>{"use strict";Object.defineProperty(Fq,"__esModule",{value:!0});var Fc=Pe(),_re=ze(),NZe=Is(),AZe={message:"must NOT have unevaluated properties",params:({params:e})=>(0,Fc._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},RZe={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:AZe,code(e){let{gen:t,schema:r,data:n,errsCount:i,it:o}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:a,props:u}=o;u instanceof Fc.Name?t.if((0,Fc._)`${u} !== true`,()=>t.forIn("key",n,d=>t.if(l(u,d),()=>c(d)))):u!==!0&&t.forIn("key",n,d=>u===void 0?c(d):t.if(f(u,d),()=>c(d))),o.props=!0,e.ok((0,Fc._)`${i} === ${NZe.default.errors}`);function c(d){if(r===!1){e.setParams({unevaluatedProperty:d}),e.error(),a||t.break();return}if(!(0,_re.alwaysValidSchema)(o,r)){let _=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:d,dataPropType:_re.Type.Str},_),a||t.if((0,Fc.not)(_),()=>t.break())}}s(c,"unevaluatedPropCode");function l(d,_){return(0,Fc._)`!${d} || !${d}[${_}]`}s(l,"unevaluatedDynamic");function f(d,_){let m=[];for(let g in d)d[g]===!0&&m.push((0,Fc._)`${_} !== ${g}`);return(0,Fc.and)(...m)}s(f,"unevaluatedStatic")}};Fq.default=RZe});var Ere=h(kq=>{"use strict";Object.defineProperty(kq,"__esModule",{value:!0});var Cd=Pe(),yre=ze(),CZe={message:({params:{len:e}})=>(0,Cd.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Cd._)`{limit: ${e}}`},$Ze={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:CZe,code(e){let{gen:t,schema:r,data:n,it:i}=e,o=i.items||0;if(o===!0)return;let a=t.const("len",(0,Cd._)`${n}.length`);if(r===!1)e.setParams({len:o}),e.fail((0,Cd._)`${a} > ${o}`);else if(typeof r=="object"&&!(0,yre.alwaysValidSchema)(i,r)){let c=t.var("valid",(0,Cd._)`${a} <= ${o}`);t.if((0,Cd.not)(c),()=>u(c,o)),e.ok(c)}i.items=!0;function u(c,l){t.forRange("i",l,a,f=>{e.subschema({keyword:"unevaluatedItems",dataProp:f,dataPropType:yre.Type.Num},c),i.allErrors||t.if((0,Cd.not)(c),()=>t.break())})}s(u,"validateItems")}};kq.default=$Ze});var bre=h(Bq=>{"use strict";Object.defineProperty(Bq,"__esModule",{value:!0});var DZe=gre(),LZe=Ere(),jZe=[DZe.default,LZe.default];Bq.default=jZe});var Sre=h(Gq=>{"use strict";Object.defineProperty(Gq,"__esModule",{value:!0});var mr=Pe(),MZe={message:({schemaCode:e})=>(0,mr.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,mr._)`{format: ${e}}`},UZe={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:MZe,code(e,t){let{gen:r,data:n,$data:i,schema:o,schemaCode:a,it:u}=e,{opts:c,errSchemaPath:l,schemaEnv:f,self:d}=u;if(!c.validateFormats)return;i?_():m();function _(){let g=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),y=r.const("fDef",(0,mr._)`${g}[${a}]`),b=r.let("fType"),E=r.let("format");r.if((0,mr._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(b,(0,mr._)`${y}.type || "string"`).assign(E,(0,mr._)`${y}.validate`),()=>r.assign(b,(0,mr._)`"string"`).assign(E,y)),e.fail$data((0,mr.or)(S(),O()));function S(){return c.strictSchema===!1?mr.nil:(0,mr._)`${a} && !${E}`}s(S,"unknownFmt");function O(){let I=f.$async?(0,mr._)`(${y}.async ? await ${E}(${n}) : ${E}(${n}))`:(0,mr._)`${E}(${n})`,w=(0,mr._)`(typeof ${E} == "function" ? ${I} : ${E}.test(${n}))`;return(0,mr._)`${E} && ${E} !== true && ${b} === ${t} && !${w}`}s(O,"invalidFmt")}s(_,"validate$DataFormat");function m(){let g=d.formats[o];if(!g){S();return}if(g===!0)return;let[y,b,E]=O(g);y===t&&e.pass(I());function S(){if(c.strictSchema===!1){d.logger.warn(w());return}throw new Error(w());function w(){return`unknown format "${o}" ignored in schema at path "${l}"`}}s(S,"unknownFormat");function O(w){let j=w instanceof RegExp?(0,mr.regexpCode)(w):c.code.formats?(0,mr._)`${c.code.formats}${(0,mr.getProperty)(o)}`:void 0,F=r.scopeValue("formats",{key:o,ref:w,code:j});return typeof w=="object"&&!(w instanceof RegExp)?[w.type||"string",w.validate,(0,mr._)`${F}.validate`]:["string",w,F]}s(O,"getFormat");function I(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!f.$async)throw new Error("async format in sync schema");return(0,mr._)`await ${E}(${n})`}return typeof b=="function"?(0,mr._)`${E}(${n})`:(0,mr._)`${E}.test(${n})`}s(I,"validCondition")}s(m,"validateFormat")}};Gq.default=UZe});var vre=h(Vq=>{"use strict";Object.defineProperty(Vq,"__esModule",{value:!0});var xZe=Sre(),qZe=[xZe.default];Vq.default=qZe});var Ore=h(Im=>{"use strict";Object.defineProperty(Im,"__esModule",{value:!0});Im.contentVocabulary=Im.metadataVocabulary=void 0;Im.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Im.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Ire=h(zq=>{"use strict";Object.defineProperty(zq,"__esModule",{value:!0});var FZe=mte(),kZe=Ate(),BZe=rre(),GZe=lre(),VZe=mre(),zZe=bre(),HZe=vre(),Pre=Ore(),KZe=[GZe.default,FZe.default,kZe.default,(0,BZe.default)(!0),HZe.default,Pre.metadataVocabulary,Pre.contentVocabulary,VZe.default,zZe.default];zq.default=KZe});var wre=h(pE=>{"use strict";Object.defineProperty(pE,"__esModule",{value:!0});pE.DiscrError=void 0;var WZe;(function(e){e.Tag="tag",e.Mapping="mapping"})(WZe=pE.DiscrError||(pE.DiscrError={}))});var Nre=h(Kq=>{"use strict";Object.defineProperty(Kq,"__esModule",{value:!0});var wm=Pe(),Hq=wre(),Tre=Q0(),YZe=ze(),JZe={message:({params:{discrError:e,tagName:t}})=>e===Hq.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,wm._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},XZe={keyword:"discriminator",type:"object",schemaType:"object",error:JZe,code(e){let{gen:t,data:r,schema:n,parentSchema:i,it:o}=e,{oneOf:a}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let u=n.propertyName;if(typeof u!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),l=t.const("tag",(0,wm._)`${r}${(0,wm.getProperty)(u)}`);t.if((0,wm._)`typeof ${l} == "string"`,()=>f(),()=>e.error(!1,{discrError:Hq.DiscrError.Tag,tag:l,tagName:u})),e.ok(c);function f(){let m=_();t.if(!1);for(let g in m)t.elseIf((0,wm._)`${l} === ${g}`),t.assign(c,d(m[g]));t.else(),e.error(!1,{discrError:Hq.DiscrError.Mapping,tag:l,tagName:u}),t.endIf()}s(f,"validateMapping");function d(m){let g=t.name("valid"),y=e.subschema({keyword:"oneOf",schemaProp:m},g);return e.mergeEvaluated(y,wm.Name),g}s(d,"applyTagSchema");function _(){var m;let g={},y=E(i),b=!0;for(let I=0;I<a.length;I++){let w=a[I];w?.$ref&&!(0,YZe.schemaHasRulesButRef)(w,o.self.RULES)&&(w=Tre.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,w?.$ref),w instanceof Tre.SchemaEnv&&(w=w.schema));let j=(m=w?.properties)===null||m===void 0?void 0:m[u];if(typeof j!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`);b=b&&(y||E(w)),S(j,I)}if(!b)throw new Error(`discriminator: "${u}" must be required`);return g;function E({required:I}){return Array.isArray(I)&&I.includes(u)}function S(I,w){if(I.const)O(I.const,w);else if(I.enum)for(let j of I.enum)O(j,w);else throw new Error(`discriminator: "properties/${u}" must have "const" or "enum"`)}function O(I,w){if(typeof I!="string"||I in g)throw new Error(`discriminator: "${u}" values must be unique strings`);g[I]=w}}s(_,"getMapping")}};Kq.default=XZe});var Are=h((nMt,QZe)=>{QZe.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 Rre=h((iMt,ZZe)=>{ZZe.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 Cre=h((sMt,eet)=>{eet.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 $re=h((oMt,tet)=>{tet.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 Dre=h((aMt,ret)=>{ret.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 Lre=h((uMt,net)=>{net.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 jre=h((cMt,iet)=>{iet.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 Mre=h((lMt,set)=>{set.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 Ure=h(Wq=>{"use strict";Object.defineProperty(Wq,"__esModule",{value:!0});var oet=Are(),aet=Rre(),uet=Cre(),cet=$re(),fet=Dre(),det=Lre(),pet=jre(),het=Mre(),met=["/properties"];function _et(e){return[oet,aet,uet,cet,fet,t(this,det),pet,t(this,het)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function t(r,n){return e?r.$dataMetaSchema(n,met):n}s(t,"with$data")}s(_et,"addMetaSchema2020");Wq.default=_et});var qre=h((ir,xre)=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.MissingRefError=ir.ValidationError=ir.CodeGen=ir.Name=ir.nil=ir.stringify=ir.str=ir._=ir.KeywordCxt=void 0;var get=lte(),yet=Ire(),Eet=Nre(),bet=Ure(),Yq="https://json-schema.org/draft/2020-12/schema",dT=class extends get.default{static{s(this,"Ajv2020")}constructor(t={}){super({...t,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),yet.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(Eet.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:t,meta:r}=this.opts;r&&(bet.default.call(this,t),this.refs["http://json-schema.org/schema"]=Yq)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Yq)?Yq:void 0)}};xre.exports=ir=dT;Object.defineProperty(ir,"__esModule",{value:!0});ir.default=dT;var vet=X0();Object.defineProperty(ir,"KeywordCxt",{enumerable:!0,get:function(){return vet.KeywordCxt}});var Tm=Pe();Object.defineProperty(ir,"_",{enumerable:!0,get:function(){return Tm._}});Object.defineProperty(ir,"str",{enumerable:!0,get:function(){return Tm.str}});Object.defineProperty(ir,"stringify",{enumerable:!0,get:function(){return Tm.stringify}});Object.defineProperty(ir,"nil",{enumerable:!0,get:function(){return Tm.nil}});Object.defineProperty(ir,"Name",{enumerable:!0,get:function(){return Tm.Name}});Object.defineProperty(ir,"CodeGen",{enumerable:!0,get:function(){return Tm.CodeGen}});var Oet=Kw();Object.defineProperty(ir,"ValidationError",{enumerable:!0,get:function(){return Oet.default}});var Pet=Ww();Object.defineProperty(ir,"MissingRefError",{enumerable:!0,get:function(){return Pet.default}})});var kre=h(Nm=>{"use strict";var Fre=Nm&&Nm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Nm,"__esModule",{value:!0});Nm.JsonValidator=void 0;var Iet=Fre(VM()),wet=Fre(qre()),Jq=class e{static{s(this,"JsonValidator")}static#t=new e;static get instance(){return e.#t}ajv;constructor(){this.ajv=new wet.default({allErrors:!0,allowUnionTypes:!0}),this.ajv.addKeyword("faker"),(0,Iet.default)(this.ajv,{mode:"fast"})}addSchema(t,r){this.ajv.addSchema(t,r)}compile(t){let r=this.ajv.compile(t);return s(i=>({isValid:r(i),errors:this.toSimpleErrors(r.errors,i),warnings:[]}),"validator")}toSimpleErrors(t,r){let n=[];return t?.forEach(i=>{i.keyword==="enum"&&i.params.allowedValues&&Array.isArray(i.params.allowedValues)&&(i.message+=`; ${i.params.allowedValues.join(", ")}`),i.instancePath&&(i.instancePath=i.instancePath.replaceAll(/(\/)?(~1)(\/)?/gm,"/"));let o={details:{}},a=i.instancePath.split("/");if(a.length>2){let c=a[1],l=a[2]?parseInt(a[2]):0,f=a[3],d=isNaN(l)?void 0:r[c][l][f];o={details:{property:c,index:l,field:f,fieldValue:d}}}if(i.keyword==="required"&&i.params.missingProperty&&i.instancePath&&(i.message=`A 'path' is missing required property '${i.params.missingProperty}'`),i.keyword==="additionalProperties"&&i.params.additionalProperty&&i.instancePath&&(i.message=`A 'path' should NOT include property '${i.params.additionalProperty}'`),i.keyword==="type"&&i.params.type&&i.instancePath){let c=i.instancePath.split("/"),l=c[c.length-1];i.message=`Value of property '${l}' must be '${i.params.type}'`}let u=Object.assign(i,o);n.push(u)}),n}};Nm.JsonValidator=Jq});var pT=h(_a=>{"use strict";var Am=_a&&_a.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_a,"__esModule",{value:!0});_a.policiesConfigurationValidatorFn=_a.openAPIRouteConfigurationValidatorFn=_a.routeConfigurationValidatorFn=void 0;var Tet=Am(QZ()),Bre=Am(ZZ()),Net=Am(eee()),Gre=Am(tee()),Vre=Am(ree()),Aet=Am(nee()),Ret=kre(),Su=Ret.JsonValidator.instance;Su.addSchema(Aet.default,"routes.schema.json");Su.addSchema(Vre.default,"route-configuration.schema.json");Su.addSchema(Net.default,"policy-configuration.schema.json");Su.addSchema(Bre.default,"policies.schema.json");Su.addSchema(Gre.default,"open-api-route-configuration.schema.json");Su.addSchema(Tet.default,"fragments.schema.json");_a.routeConfigurationValidatorFn=Su.compile(Vre.default);_a.openAPIRouteConfigurationValidatorFn=Su.compile(Gre.default);_a.policiesConfigurationValidatorFn=Su.compile(Bre.default)});var zre=h(hT=>{"use strict";Object.defineProperty(hT,"__esModule",{value:!0});hT.PoliciesConfigurationValidator=void 0;var Cet=pT(),Xq=class{static{s(this,"PoliciesConfigurationValidator")}results;validate(t){return this.results=(0,Cet.policiesConfigurationValidatorFn)(t),this.results}};hT.PoliciesConfigurationValidator=Xq});var Hre=h(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0});Rm.OpenAPIGlobalValidator=Rm.OpenAPILocalizedValidator=void 0;var $et=pT(),Qq=class{static{s(this,"OpenAPILocalizedValidator")}results;validate(t){return this.results=(0,$et.openAPIRouteConfigurationValidatorFn)(t),this.results}};Rm.OpenAPILocalizedValidator=Qq;var Zq=class{static{s(this,"OpenAPIGlobalValidator")}validate(t){return[]}};Rm.OpenAPIGlobalValidator=Zq});var r2=h(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.testPosition=Ii.CodeGenError=Ii.JSON_ENV_REGEX=Ii.JSON_IMPORT_REGEX=Ii.ROUTE_ENV_REGEX=Ii.ROUTE_IMPORT_REGEX=void 0;var e2=Dc();Ii.ROUTE_IMPORT_REGEX=/\$import\((.*)\)/;Ii.ROUTE_ENV_REGEX=/\$env\((.*?)\)/g;Ii.JSON_IMPORT_REGEX=/require\("(.*)"\)/;Ii.JSON_ENV_REGEX=/\${environment.(.*)}/;var t2=class extends Error{static{s(this,"CodeGenError")}location;constructor(t,r,n,i){super(t),this.location={file:r,namespace:"",line:n?n.line:0,column:n?n.column:0,length:0,lineText:i??"",suggestion:""}}};Ii.CodeGenError=t2;var Det=s(e=>{let t=[],r=e;for(;r.parent;)t.push(r),r=r.parent;return t.reverse()},"invertTree"),Let=s((e,t)=>{if(!e)return!1;let r=Det(e);return t.split("/").every((o,a)=>{let u=r[a];return u?o==="*"||(0,e2.isAstProperty)(u)&&u.name.value===o?!0:o==="{}"?u.type===e2.SyntaxType.Object:o==="[]"?u.type===e2.SyntaxType.Array:!1:!1})},"testPosition");Ii.testPosition=Let});var Kre=h($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});$m.getEnvStatementTransformer=$m.AstTransformer=void 0;var Cm=Dc(),jet=jw(),hE=r2(),n2=class{static{s(this,"AstTransformer")}errors=[];transform(t){return this.visitor(t),t}visitor(t){this.visit(t),(0,Cm.isAstObject)(t)?t.children.forEach(r=>{this.visitor(r)}):(0,Cm.isAstArray)(t)?t.children.forEach(r=>{this.visitor(r)}):(0,Cm.isAstProperty)(t)&&this.visitor(t.value)}};$m.AstTransformer=n2;var Met=s((e,t,r)=>n=>{if(!(0,Cm.isAstProperty)(n)||!(0,Cm.isAstLiteral)(n.value)||typeof n.value.value!="string")return;if(!e.some(o=>(0,hE.testPosition)(n,o))){hE.ROUTE_ENV_REGEX.test(n.value.value)&&t.push(new hE.CodeGenError("An $env() statement is not expected at this location.",r,n.location,n.value.value));return}let i=new RegExp(hE.ROUTE_ENV_REGEX).exec(n.value.value);if(i?.length===2&&i[0]===n.value.value){let o={type:Cm.SyntaxType.FunctionBody,parent:null,value:`environment["${i[1]}"]`};n.value=o}else{let o=n.value.value.replaceAll(new RegExp(hE.ROUTE_ENV_REGEX),(a,u)=>`\${environment["${u}"] ? environment["${u}"] : ""}`);o!==n.value.value&&(n.value=jet.factory.createTemplateString(o,n))}},"getEnvStatementTransformer");$m.getEnvStatementTransformer=Met});var Xre=h(Dm=>{"use strict";var Uet=Dm&&Dm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Dm,"__esModule",{value:!0});Dm.OpenAPIRoutesFragmentAstTransformer=void 0;var xet=Uet(require("path")),As=Dc(),i2=jw(),Wre=Kre(),So=r2(),mE="config/routes.json",qet=["handler/{}/options/*","policies/[]/{}/handler/{}/options/*","corsPolicies/[]/{}/*"],Fet=["handler/{}/module","handler/{}/options/{}/policies/{}/inbound/[]/{}/module","handler/{}/options/{}/policies/{}/outbound/[]/{}/module","policies/[]/{}/handler/{}/module","policies/[]/{}/handler/{}/options/{}/identifier/{}/module","policies/[]/{}/handler/{}/options/{}/validator"],Yre=["handler/{}/options/*","policies/[]/{}/handler/{}/options/*"],ket="handler/{}/options/{}/rewritePattern",Bet="handler/{}/options/{}/baseUrl",s2=class extends Wre.AstTransformer{static{s(this,"OpenAPIRoutesFragmentAstTransformer")}visit(t){this.rewriteHandlerFunction(t),this.rewriteForwardFunction(t),this.replaceImportStatements(t),this.replaceEnvStatements(t)}rewriteHandlerFunction(t){if(!(!(0,As.isAstProperty)(t)||!(0,As.isAstLiteral)(t.value)||typeof t.value.value!="string")&&(0,So.testPosition)(t,ket)){if(!t.parent||!(0,As.isAstObject)(t.parent)){this.errors.push(new So.CodeGenError("Invalid node, expected object",mE,t.parent?t.parent.location:t.location,void 0));return}let r=t.value.value,n={type:As.SyntaxType.FunctionBody,parent:null,value:Jre(r)},i=i2.factory.createProperty("__rewriteFunction",n,t);t.parent.children.push(i)}}rewriteForwardFunction(t){if(!(!(0,As.isAstProperty)(t)||!(0,As.isAstLiteral)(t.value)||typeof t.value.value!="string")&&(0,So.testPosition)(t,Bet)){if(!t.parent||!(0,As.isAstObject)(t.parent)){this.errors.push(new So.CodeGenError("Invalid node, expected object",mE,t.parent?t.parent.location:t.location,void 0));return}let r=t.value.value,n={type:As.SyntaxType.FunctionBody,parent:null,value:Jre(r)},i=i2.factory.createProperty("__rewriteFunction",n,t);t.parent.children.push(i)}}replaceImportStatements(t){if(!(0,As.isAstProperty)(t)||!(0,As.isAstLiteral)(t.value))return;let r=t.value.value;if(typeof r!="string")return;if(!Fet.some(a=>(0,So.testPosition)(t,a))&&!Yre.some(a=>(0,So.testPosition)(t,a))){if(So.ROUTE_IMPORT_REGEX.test(r)){if(t.name.value==="$ref")return;this.errors.push(new So.CodeGenError("An $import() statement is not expected at this location.",mE,t.location,r))}return}let n=So.ROUTE_IMPORT_REGEX.exec(r);if(Yre.some(a=>(0,So.testPosition)(t,a))&&!n)return;if(!n){this.errors.push(new So.CodeGenError("Invalid $import() statement",mE,t.location,r));return}let i=n[1];i.startsWith(".")&&(i=xet.default.join("..",i));let o={name:null,type:As.SyntaxType.FunctionCall,parent:t.parent,children:[]};o.name={value:"require",type:As.SyntaxType.Identifier,parent:o},o.children.push(i2.factory.createLiteral(i,o)),t.value=o}replaceEnvStatements=(0,Wre.getEnvStatementTransformer)(qet,this.errors,mE)};Dm.OpenAPIRoutesFragmentAstTransformer=s2;function Jre(e){return`(request, context) => {
|
|
177
|
+
deps: ${r}}`};var _Qe={keyword:"dependencies",type:"object",schemaType:"object",error:ma.error,code(e){let[t,r]=gQe(e);Ute(e,t),xte(e,r)}};function gQe({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}s(gQe,"splitDependencies");function Ute(e,t=e.schema){let{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;let o=r.let("missing");for(let a in t){let u=t[a];if(u.length===0)continue;let c=(0,lE.propertyInData)(r,n,a,i.opts.ownProperties);e.setParams({property:a,depsCount:u.length,deps:u.join(", ")}),i.allErrors?r.if(c,()=>{for(let l of u)(0,lE.checkReportMissingProp)(e,l)}):(r.if((0,_q._)`${c} && (${(0,lE.checkMissingProp)(e,u,o)})`),(0,lE.reportMissingProp)(e,o),r.else())}}s(Ute,"validatePropertyDeps");ma.validatePropertyDeps=Ute;function xte(e,t=e.schema){let{gen:r,data:n,keyword:i,it:o}=e,a=r.name("valid");for(let u in t)(0,mQe.alwaysValidSchema)(o,t[u])||(r.if((0,lE.propertyInData)(r,n,u,o.opts.ownProperties),()=>{let c=e.subschema({keyword:i,schemaProp:u},a);e.mergeValidEvaluated(c,a)},()=>r.var(a,!0)),e.ok(a))}s(xte,"validateSchemaDeps");ma.validateSchemaDeps=xte;ma.default=_Qe});var Fte=h(gq=>{"use strict";Object.defineProperty(gq,"__esModule",{value:!0});var qte=Pe(),yQe=ze(),EQe={message:"property name must be valid",params:({params:e})=>(0,qte._)`{propertyName: ${e.propertyName}}`},bQe={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:EQe,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,yQe.alwaysValidSchema)(i,r))return;let o=t.name("valid");t.forIn("key",n,a=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),t.if((0,qte.not)(o),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(o)}};gq.default=bQe});var Eq=h(yq=>{"use strict";Object.defineProperty(yq,"__esModule",{value:!0});var aT=ws(),bo=Pe(),SQe=Is(),uT=ze(),vQe={message:"must NOT have additional properties",params:({params:e})=>(0,bo._)`{additionalProperty: ${e.additionalProperty}}`},OQe={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:vQe,code(e){let{gen:t,schema:r,parentSchema:n,data:i,errsCount:o,it:a}=e;if(!o)throw new Error("ajv implementation error");let{allErrors:u,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,uT.alwaysValidSchema)(a,r))return;let l=(0,aT.allSchemaProperties)(n.properties),f=(0,aT.allSchemaProperties)(n.patternProperties);d(),e.ok((0,bo._)`${o} === ${SQe.default.errors}`);function d(){t.forIn("key",i,b=>{!l.length&&!f.length?g(b):t.if(_(b),()=>g(b))})}s(d,"checkAdditionalProperties");function _(b){let E;if(l.length>8){let v=(0,uT.schemaRefOrVal)(a,n.properties,"properties");E=(0,aT.isOwnProperty)(t,v,b)}else l.length?E=(0,bo.or)(...l.map(v=>(0,bo._)`${b} === ${v}`)):E=bo.nil;return f.length&&(E=(0,bo.or)(E,...f.map(v=>(0,bo._)`${(0,aT.usePattern)(e,v)}.test(${b})`))),(0,bo.not)(E)}s(_,"isAdditional");function m(b){t.code((0,bo._)`delete ${i}[${b}]`)}s(m,"deleteAdditional");function g(b){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(b);return}if(r===!1){e.setParams({additionalProperty:b}),e.error(),u||t.break();return}if(typeof r=="object"&&!(0,uT.alwaysValidSchema)(a,r)){let E=t.name("valid");c.removeAdditional==="failing"?(y(b,E,!1),t.if((0,bo.not)(E),()=>{e.reset(),m(b)})):(y(b,E),u||t.if((0,bo.not)(E),()=>t.break()))}}s(g,"additionalPropertyCode");function y(b,E,v){let O={keyword:"additionalProperties",dataProp:b,dataPropType:uT.Type.Str};v===!1&&Object.assign(O,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(O,E)}s(y,"applyAdditionalSchema")}};yq.default=OQe});var Gte=h(Sq=>{"use strict";Object.defineProperty(Sq,"__esModule",{value:!0});var PQe=X0(),kte=ws(),bq=ze(),Bte=Eq(),IQe={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Bte.default.code(new PQe.KeywordCxt(o,Bte.default,"additionalProperties"));let a=(0,kte.allSchemaProperties)(r);for(let d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=bq.mergeEvaluated.props(t,(0,bq.toHash)(a),o.props));let u=a.filter(d=>!(0,bq.alwaysValidSchema)(o,r[d]));if(u.length===0)return;let c=t.name("valid");for(let d of u)l(d)?f(d):(t.if((0,kte.propertyInData)(t,i,d,o.opts.ownProperties)),f(d),o.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function l(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}s(l,"hasDefault");function f(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}s(f,"applyPropertySchema")}};Sq.default=IQe});var Kte=h(vq=>{"use strict";Object.defineProperty(vq,"__esModule",{value:!0});var Vte=ws(),cT=Pe(),zte=ze(),Hte=ze(),wQe={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:o}=e,{opts:a}=o,u=(0,Vte.allSchemaProperties)(r),c=u.filter(y=>(0,zte.alwaysValidSchema)(o,r[y]));if(u.length===0||c.length===u.length&&(!o.opts.unevaluated||o.props===!0))return;let l=a.strictSchema&&!a.allowMatchingProperties&&i.properties,f=t.name("valid");o.props!==!0&&!(o.props instanceof cT.Name)&&(o.props=(0,Hte.evaluatedPropsToName)(t,o.props));let{props:d}=o;_();function _(){for(let y of u)l&&m(y),o.allErrors?g(y):(t.var(f,!0),g(y),t.if(f))}s(_,"validatePatternProperties");function m(y){for(let b in l)new RegExp(y).test(b)&&(0,zte.checkStrictMode)(o,`property ${b} matches pattern ${y} (use allowMatchingProperties)`)}s(m,"checkMatchingProperties");function g(y){t.forIn("key",n,b=>{t.if((0,cT._)`${(0,Vte.usePattern)(e,y)}.test(${b})`,()=>{let E=c.includes(y);E||e.subschema({keyword:"patternProperties",schemaProp:y,dataProp:b,dataPropType:Hte.Type.Str},f),o.opts.unevaluated&&d!==!0?t.assign((0,cT._)`${d}[${b}]`,!0):!E&&!o.allErrors&&t.if((0,cT.not)(f),()=>t.break())})})}s(g,"validateProperties")}};vq.default=wQe});var Wte=h(Oq=>{"use strict";Object.defineProperty(Oq,"__esModule",{value:!0});var TQe=ze(),NQe={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,TQe.alwaysValidSchema)(n,r)){e.fail();return}let i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Oq.default=NQe});var Yte=h(Pq=>{"use strict";Object.defineProperty(Pq,"__esModule",{value:!0});var AQe=ws(),RQe={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:AQe.validateUnion,error:{message:"must match a schema in anyOf"}};Pq.default=RQe});var Jte=h(Iq=>{"use strict";Object.defineProperty(Iq,"__esModule",{value:!0});var lT=Pe(),CQe=ze(),$Qe={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,lT._)`{passingSchemas: ${e.passing}}`},DQe={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:$Qe,code(e){let{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,a=t.let("valid",!1),u=t.let("passing",null),c=t.name("_valid");e.setParams({passing:u}),t.block(l),e.result(a,()=>e.reset(),()=>e.error(!0));function l(){o.forEach((f,d)=>{let _;(0,CQe.alwaysValidSchema)(i,f)?t.var(c,!0):_=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,lT._)`${c} && ${a}`).assign(a,!1).assign(u,(0,lT._)`[${u}, ${d}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(u,d),_&&e.mergeEvaluated(_,lT.Name)})})}s(l,"validateOneOf")}};Iq.default=DQe});var Xte=h(wq=>{"use strict";Object.defineProperty(wq,"__esModule",{value:!0});var LQe=ze(),jQe={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=t.name("valid");r.forEach((o,a)=>{if((0,LQe.alwaysValidSchema)(n,o))return;let u=e.subschema({keyword:"allOf",schemaProp:a},i);e.ok(i),e.mergeEvaluated(u)})}};wq.default=jQe});var ere=h(Tq=>{"use strict";Object.defineProperty(Tq,"__esModule",{value:!0});var fT=Pe(),Zte=ze(),MQe={message:({params:e})=>(0,fT.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,fT._)`{failingKeyword: ${e.ifClause}}`},UQe={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:MQe,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,Zte.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=Qte(n,"then"),o=Qte(n,"else");if(!i&&!o)return;let a=t.let("valid",!0),u=t.name("_valid");if(c(),e.reset(),i&&o){let f=t.let("ifClause");e.setParams({ifClause:f}),t.if(u,l("then",f),l("else",f))}else i?t.if(u,l("then")):t.if((0,fT.not)(u),l("else"));e.pass(a,()=>e.error(!0));function c(){let f=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(f)}s(c,"validateIf");function l(f,d){return()=>{let _=e.subschema({keyword:f},u);t.assign(a,u),e.mergeValidEvaluated(_,a),d?t.assign(d,(0,fT._)`${f}`):e.setParams({ifClause:f})}}s(l,"validateClause")}};function Qte(e,t){let r=e.schema[t];return r!==void 0&&!(0,Zte.alwaysValidSchema)(e,r)}s(Qte,"hasSchema");Tq.default=UQe});var tre=h(Nq=>{"use strict";Object.defineProperty(Nq,"__esModule",{value:!0});var xQe=ze(),qQe={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,xQe.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Nq.default=qQe});var rre=h(Aq=>{"use strict";Object.defineProperty(Aq,"__esModule",{value:!0});var FQe=fq(),kQe=Dte(),BQe=dq(),GQe=jte(),VQe=Mte(),zQe=oT(),HQe=Fte(),KQe=Eq(),WQe=Gte(),YQe=Kte(),JQe=Wte(),XQe=Yte(),QQe=Jte(),ZQe=Xte(),eZe=ere(),tZe=tre();function rZe(e=!1){let t=[JQe.default,XQe.default,QQe.default,ZQe.default,eZe.default,tZe.default,HQe.default,KQe.default,zQe.default,WQe.default,YQe.default];return e?t.push(kQe.default,GQe.default):t.push(FQe.default,BQe.default),t.push(VQe.default),t}s(rZe,"getApplicator");Aq.default=rZe});var Cq=h(fE=>{"use strict";Object.defineProperty(fE,"__esModule",{value:!0});fE.dynamicAnchor=void 0;var Rq=Pe(),nZe=Is(),nre=Q0(),iZe=Zw(),sZe={keyword:"$dynamicAnchor",schemaType:"string",code:e=>ire(e,e.schema)};function ire(e,t){let{gen:r,it:n}=e;n.schemaEnv.root.dynamicAnchors[t]=!0;let i=(0,Rq._)`${nZe.default.dynamicAnchors}${(0,Rq.getProperty)(t)}`,o=n.errSchemaPath==="#"?n.validateName:oZe(e);r.if((0,Rq._)`!${i}`,()=>r.assign(i,o))}s(ire,"dynamicAnchor");fE.dynamicAnchor=ire;function oZe(e){let{schemaEnv:t,schema:r,self:n}=e.it,{root:i,baseId:o,localRefs:a,meta:u}=t.root,{schemaId:c}=n.opts,l=new nre.SchemaEnv({schema:r,schemaId:c,root:i,baseId:o,localRefs:a,meta:u});return nre.compileSchema.call(n,l),(0,iZe.getValidate)(e,l)}s(oZe,"_getValidate");fE.default=sZe});var $q=h(dE=>{"use strict";Object.defineProperty(dE,"__esModule",{value:!0});dE.dynamicRef=void 0;var sre=Pe(),aZe=Is(),ore=Zw(),uZe={keyword:"$dynamicRef",schemaType:"string",code:e=>are(e,e.schema)};function are(e,t){let{gen:r,keyword:n,it:i}=e;if(t[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);let o=t.slice(1);if(i.allErrors)a();else{let c=r.let("valid",!1);a(c),e.ok(c)}function a(c){if(i.schemaEnv.root.dynamicAnchors[o]){let l=r.let("_v",(0,sre._)`${aZe.default.dynamicAnchors}${(0,sre.getProperty)(o)}`);r.if(l,u(l,c),u(i.validateName,c))}else u(i.validateName,c)()}s(a,"_dynamicRef");function u(c,l){return l?()=>r.block(()=>{(0,ore.callRef)(e,c),r.let(l,!0)}):()=>(0,ore.callRef)(e,c)}s(u,"_callRef")}s(are,"dynamicRef");dE.dynamicRef=are;dE.default=uZe});var ure=h(Dq=>{"use strict";Object.defineProperty(Dq,"__esModule",{value:!0});var cZe=Cq(),lZe=ze(),fZe={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,cZe.dynamicAnchor)(e,""):(0,lZe.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};Dq.default=fZe});var cre=h(Lq=>{"use strict";Object.defineProperty(Lq,"__esModule",{value:!0});var dZe=$q(),pZe={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,dZe.dynamicRef)(e,e.schema)};Lq.default=pZe});var lre=h(jq=>{"use strict";Object.defineProperty(jq,"__esModule",{value:!0});var hZe=Cq(),mZe=$q(),_Ze=ure(),gZe=cre(),yZe=[hZe.default,mZe.default,_Ze.default,gZe.default];jq.default=yZe});var dre=h(Mq=>{"use strict";Object.defineProperty(Mq,"__esModule",{value:!0});var fre=oT(),EZe={keyword:"dependentRequired",type:"object",schemaType:"object",error:fre.error,code:e=>(0,fre.validatePropertyDeps)(e)};Mq.default=EZe});var pre=h(Uq=>{"use strict";Object.defineProperty(Uq,"__esModule",{value:!0});var bZe=oT(),SZe={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,bZe.validateSchemaDeps)(e)};Uq.default=SZe});var hre=h(xq=>{"use strict";Object.defineProperty(xq,"__esModule",{value:!0});var vZe=ze(),OZe={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:r}){t.contains===void 0&&(0,vZe.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}};xq.default=OZe});var mre=h(qq=>{"use strict";Object.defineProperty(qq,"__esModule",{value:!0});var PZe=dre(),IZe=pre(),wZe=hre(),TZe=[PZe.default,IZe.default,wZe.default];qq.default=TZe});var gre=h(Fq=>{"use strict";Object.defineProperty(Fq,"__esModule",{value:!0});var Fc=Pe(),_re=ze(),NZe=Is(),AZe={message:"must NOT have unevaluated properties",params:({params:e})=>(0,Fc._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},RZe={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:AZe,code(e){let{gen:t,schema:r,data:n,errsCount:i,it:o}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:a,props:u}=o;u instanceof Fc.Name?t.if((0,Fc._)`${u} !== true`,()=>t.forIn("key",n,d=>t.if(l(u,d),()=>c(d)))):u!==!0&&t.forIn("key",n,d=>u===void 0?c(d):t.if(f(u,d),()=>c(d))),o.props=!0,e.ok((0,Fc._)`${i} === ${NZe.default.errors}`);function c(d){if(r===!1){e.setParams({unevaluatedProperty:d}),e.error(),a||t.break();return}if(!(0,_re.alwaysValidSchema)(o,r)){let _=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:d,dataPropType:_re.Type.Str},_),a||t.if((0,Fc.not)(_),()=>t.break())}}s(c,"unevaluatedPropCode");function l(d,_){return(0,Fc._)`!${d} || !${d}[${_}]`}s(l,"unevaluatedDynamic");function f(d,_){let m=[];for(let g in d)d[g]===!0&&m.push((0,Fc._)`${_} !== ${g}`);return(0,Fc.and)(...m)}s(f,"unevaluatedStatic")}};Fq.default=RZe});var Ere=h(kq=>{"use strict";Object.defineProperty(kq,"__esModule",{value:!0});var Cd=Pe(),yre=ze(),CZe={message:({params:{len:e}})=>(0,Cd.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Cd._)`{limit: ${e}}`},$Ze={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:CZe,code(e){let{gen:t,schema:r,data:n,it:i}=e,o=i.items||0;if(o===!0)return;let a=t.const("len",(0,Cd._)`${n}.length`);if(r===!1)e.setParams({len:o}),e.fail((0,Cd._)`${a} > ${o}`);else if(typeof r=="object"&&!(0,yre.alwaysValidSchema)(i,r)){let c=t.var("valid",(0,Cd._)`${a} <= ${o}`);t.if((0,Cd.not)(c),()=>u(c,o)),e.ok(c)}i.items=!0;function u(c,l){t.forRange("i",l,a,f=>{e.subschema({keyword:"unevaluatedItems",dataProp:f,dataPropType:yre.Type.Num},c),i.allErrors||t.if((0,Cd.not)(c),()=>t.break())})}s(u,"validateItems")}};kq.default=$Ze});var bre=h(Bq=>{"use strict";Object.defineProperty(Bq,"__esModule",{value:!0});var DZe=gre(),LZe=Ere(),jZe=[DZe.default,LZe.default];Bq.default=jZe});var Sre=h(Gq=>{"use strict";Object.defineProperty(Gq,"__esModule",{value:!0});var mr=Pe(),MZe={message:({schemaCode:e})=>(0,mr.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,mr._)`{format: ${e}}`},UZe={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:MZe,code(e,t){let{gen:r,data:n,$data:i,schema:o,schemaCode:a,it:u}=e,{opts:c,errSchemaPath:l,schemaEnv:f,self:d}=u;if(!c.validateFormats)return;i?_():m();function _(){let g=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),y=r.const("fDef",(0,mr._)`${g}[${a}]`),b=r.let("fType"),E=r.let("format");r.if((0,mr._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(b,(0,mr._)`${y}.type || "string"`).assign(E,(0,mr._)`${y}.validate`),()=>r.assign(b,(0,mr._)`"string"`).assign(E,y)),e.fail$data((0,mr.or)(v(),O()));function v(){return c.strictSchema===!1?mr.nil:(0,mr._)`${a} && !${E}`}s(v,"unknownFmt");function O(){let I=f.$async?(0,mr._)`(${y}.async ? await ${E}(${n}) : ${E}(${n}))`:(0,mr._)`${E}(${n})`,w=(0,mr._)`(typeof ${E} == "function" ? ${I} : ${E}.test(${n}))`;return(0,mr._)`${E} && ${E} !== true && ${b} === ${t} && !${w}`}s(O,"invalidFmt")}s(_,"validate$DataFormat");function m(){let g=d.formats[o];if(!g){v();return}if(g===!0)return;let[y,b,E]=O(g);y===t&&e.pass(I());function v(){if(c.strictSchema===!1){d.logger.warn(w());return}throw new Error(w());function w(){return`unknown format "${o}" ignored in schema at path "${l}"`}}s(v,"unknownFormat");function O(w){let j=w instanceof RegExp?(0,mr.regexpCode)(w):c.code.formats?(0,mr._)`${c.code.formats}${(0,mr.getProperty)(o)}`:void 0,F=r.scopeValue("formats",{key:o,ref:w,code:j});return typeof w=="object"&&!(w instanceof RegExp)?[w.type||"string",w.validate,(0,mr._)`${F}.validate`]:["string",w,F]}s(O,"getFormat");function I(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!f.$async)throw new Error("async format in sync schema");return(0,mr._)`await ${E}(${n})`}return typeof b=="function"?(0,mr._)`${E}(${n})`:(0,mr._)`${E}.test(${n})`}s(I,"validCondition")}s(m,"validateFormat")}};Gq.default=UZe});var vre=h(Vq=>{"use strict";Object.defineProperty(Vq,"__esModule",{value:!0});var xZe=Sre(),qZe=[xZe.default];Vq.default=qZe});var Ore=h(Im=>{"use strict";Object.defineProperty(Im,"__esModule",{value:!0});Im.contentVocabulary=Im.metadataVocabulary=void 0;Im.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Im.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Ire=h(zq=>{"use strict";Object.defineProperty(zq,"__esModule",{value:!0});var FZe=mte(),kZe=Ate(),BZe=rre(),GZe=lre(),VZe=mre(),zZe=bre(),HZe=vre(),Pre=Ore(),KZe=[GZe.default,FZe.default,kZe.default,(0,BZe.default)(!0),HZe.default,Pre.metadataVocabulary,Pre.contentVocabulary,VZe.default,zZe.default];zq.default=KZe});var wre=h(pE=>{"use strict";Object.defineProperty(pE,"__esModule",{value:!0});pE.DiscrError=void 0;var WZe;(function(e){e.Tag="tag",e.Mapping="mapping"})(WZe=pE.DiscrError||(pE.DiscrError={}))});var Nre=h(Kq=>{"use strict";Object.defineProperty(Kq,"__esModule",{value:!0});var wm=Pe(),Hq=wre(),Tre=Q0(),YZe=ze(),JZe={message:({params:{discrError:e,tagName:t}})=>e===Hq.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,wm._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},XZe={keyword:"discriminator",type:"object",schemaType:"object",error:JZe,code(e){let{gen:t,data:r,schema:n,parentSchema:i,it:o}=e,{oneOf:a}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let u=n.propertyName;if(typeof u!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),l=t.const("tag",(0,wm._)`${r}${(0,wm.getProperty)(u)}`);t.if((0,wm._)`typeof ${l} == "string"`,()=>f(),()=>e.error(!1,{discrError:Hq.DiscrError.Tag,tag:l,tagName:u})),e.ok(c);function f(){let m=_();t.if(!1);for(let g in m)t.elseIf((0,wm._)`${l} === ${g}`),t.assign(c,d(m[g]));t.else(),e.error(!1,{discrError:Hq.DiscrError.Mapping,tag:l,tagName:u}),t.endIf()}s(f,"validateMapping");function d(m){let g=t.name("valid"),y=e.subschema({keyword:"oneOf",schemaProp:m},g);return e.mergeEvaluated(y,wm.Name),g}s(d,"applyTagSchema");function _(){var m;let g={},y=E(i),b=!0;for(let I=0;I<a.length;I++){let w=a[I];w?.$ref&&!(0,YZe.schemaHasRulesButRef)(w,o.self.RULES)&&(w=Tre.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,w?.$ref),w instanceof Tre.SchemaEnv&&(w=w.schema));let j=(m=w?.properties)===null||m===void 0?void 0:m[u];if(typeof j!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`);b=b&&(y||E(w)),v(j,I)}if(!b)throw new Error(`discriminator: "${u}" must be required`);return g;function E({required:I}){return Array.isArray(I)&&I.includes(u)}function v(I,w){if(I.const)O(I.const,w);else if(I.enum)for(let j of I.enum)O(j,w);else throw new Error(`discriminator: "properties/${u}" must have "const" or "enum"`)}function O(I,w){if(typeof I!="string"||I in g)throw new Error(`discriminator: "${u}" values must be unique strings`);g[I]=w}}s(_,"getMapping")}};Kq.default=XZe});var Are=h((nMt,QZe)=>{QZe.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 Rre=h((iMt,ZZe)=>{ZZe.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 Cre=h((sMt,eet)=>{eet.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 $re=h((oMt,tet)=>{tet.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 Dre=h((aMt,ret)=>{ret.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 Lre=h((uMt,net)=>{net.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 jre=h((cMt,iet)=>{iet.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 Mre=h((lMt,set)=>{set.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 Ure=h(Wq=>{"use strict";Object.defineProperty(Wq,"__esModule",{value:!0});var oet=Are(),aet=Rre(),uet=Cre(),cet=$re(),fet=Dre(),det=Lre(),pet=jre(),het=Mre(),met=["/properties"];function _et(e){return[oet,aet,uet,cet,fet,t(this,det),pet,t(this,het)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function t(r,n){return e?r.$dataMetaSchema(n,met):n}s(t,"with$data")}s(_et,"addMetaSchema2020");Wq.default=_et});var qre=h((ir,xre)=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.MissingRefError=ir.ValidationError=ir.CodeGen=ir.Name=ir.nil=ir.stringify=ir.str=ir._=ir.KeywordCxt=void 0;var get=lte(),yet=Ire(),Eet=Nre(),bet=Ure(),Yq="https://json-schema.org/draft/2020-12/schema",dT=class extends get.default{static{s(this,"Ajv2020")}constructor(t={}){super({...t,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),yet.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(Eet.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:t,meta:r}=this.opts;r&&(bet.default.call(this,t),this.refs["http://json-schema.org/schema"]=Yq)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Yq)?Yq:void 0)}};xre.exports=ir=dT;Object.defineProperty(ir,"__esModule",{value:!0});ir.default=dT;var vet=X0();Object.defineProperty(ir,"KeywordCxt",{enumerable:!0,get:function(){return vet.KeywordCxt}});var Tm=Pe();Object.defineProperty(ir,"_",{enumerable:!0,get:function(){return Tm._}});Object.defineProperty(ir,"str",{enumerable:!0,get:function(){return Tm.str}});Object.defineProperty(ir,"stringify",{enumerable:!0,get:function(){return Tm.stringify}});Object.defineProperty(ir,"nil",{enumerable:!0,get:function(){return Tm.nil}});Object.defineProperty(ir,"Name",{enumerable:!0,get:function(){return Tm.Name}});Object.defineProperty(ir,"CodeGen",{enumerable:!0,get:function(){return Tm.CodeGen}});var Oet=Kw();Object.defineProperty(ir,"ValidationError",{enumerable:!0,get:function(){return Oet.default}});var Pet=Ww();Object.defineProperty(ir,"MissingRefError",{enumerable:!0,get:function(){return Pet.default}})});var kre=h(Nm=>{"use strict";var Fre=Nm&&Nm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Nm,"__esModule",{value:!0});Nm.JsonValidator=void 0;var Iet=Fre(VM()),wet=Fre(qre()),Jq=class e{static{s(this,"JsonValidator")}static#t=new e;static get instance(){return e.#t}ajv;constructor(){this.ajv=new wet.default({allErrors:!0,allowUnionTypes:!0}),this.ajv.addKeyword("faker"),(0,Iet.default)(this.ajv,{mode:"fast"})}addSchema(t,r){this.ajv.addSchema(t,r)}compile(t){let r=this.ajv.compile(t);return s(i=>({isValid:r(i),errors:this.toSimpleErrors(r.errors,i),warnings:[]}),"validator")}toSimpleErrors(t,r){let n=[];return t?.forEach(i=>{i.keyword==="enum"&&i.params.allowedValues&&Array.isArray(i.params.allowedValues)&&(i.message+=`; ${i.params.allowedValues.join(", ")}`),i.instancePath&&(i.instancePath=i.instancePath.replaceAll(/(\/)?(~1)(\/)?/gm,"/"));let o={details:{}},a=i.instancePath.split("/");if(a.length>2){let c=a[1],l=a[2]?parseInt(a[2]):0,f=a[3],d=isNaN(l)?void 0:r[c][l][f];o={details:{property:c,index:l,field:f,fieldValue:d}}}if(i.keyword==="required"&&i.params.missingProperty&&i.instancePath&&(i.message=`A 'path' is missing required property '${i.params.missingProperty}'`),i.keyword==="additionalProperties"&&i.params.additionalProperty&&i.instancePath&&(i.message=`A 'path' should NOT include property '${i.params.additionalProperty}'`),i.keyword==="type"&&i.params.type&&i.instancePath){let c=i.instancePath.split("/"),l=c[c.length-1];i.message=`Value of property '${l}' must be '${i.params.type}'`}let u=Object.assign(i,o);n.push(u)}),n}};Nm.JsonValidator=Jq});var pT=h(_a=>{"use strict";var Am=_a&&_a.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_a,"__esModule",{value:!0});_a.policiesConfigurationValidatorFn=_a.openAPIRouteConfigurationValidatorFn=_a.routeConfigurationValidatorFn=void 0;var Tet=Am(QZ()),Bre=Am(ZZ()),Net=Am(eee()),Gre=Am(tee()),Vre=Am(ree()),Aet=Am(nee()),Ret=kre(),Su=Ret.JsonValidator.instance;Su.addSchema(Aet.default,"routes.schema.json");Su.addSchema(Vre.default,"route-configuration.schema.json");Su.addSchema(Net.default,"policy-configuration.schema.json");Su.addSchema(Bre.default,"policies.schema.json");Su.addSchema(Gre.default,"open-api-route-configuration.schema.json");Su.addSchema(Tet.default,"fragments.schema.json");_a.routeConfigurationValidatorFn=Su.compile(Vre.default);_a.openAPIRouteConfigurationValidatorFn=Su.compile(Gre.default);_a.policiesConfigurationValidatorFn=Su.compile(Bre.default)});var zre=h(hT=>{"use strict";Object.defineProperty(hT,"__esModule",{value:!0});hT.PoliciesConfigurationValidator=void 0;var Cet=pT(),Xq=class{static{s(this,"PoliciesConfigurationValidator")}results;validate(t){return this.results=(0,Cet.policiesConfigurationValidatorFn)(t),this.results}};hT.PoliciesConfigurationValidator=Xq});var Hre=h(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0});Rm.OpenAPIGlobalValidator=Rm.OpenAPILocalizedValidator=void 0;var $et=pT(),Qq=class{static{s(this,"OpenAPILocalizedValidator")}results;validate(t){return this.results=(0,$et.openAPIRouteConfigurationValidatorFn)(t),this.results}};Rm.OpenAPILocalizedValidator=Qq;var Zq=class{static{s(this,"OpenAPIGlobalValidator")}validate(t){return[]}};Rm.OpenAPIGlobalValidator=Zq});var r2=h(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.testPosition=Ii.CodeGenError=Ii.JSON_ENV_REGEX=Ii.JSON_IMPORT_REGEX=Ii.ROUTE_ENV_REGEX=Ii.ROUTE_IMPORT_REGEX=void 0;var e2=Dc();Ii.ROUTE_IMPORT_REGEX=/\$import\((.*)\)/;Ii.ROUTE_ENV_REGEX=/\$env\((.*?)\)/g;Ii.JSON_IMPORT_REGEX=/require\("(.*)"\)/;Ii.JSON_ENV_REGEX=/\${environment.(.*)}/;var t2=class extends Error{static{s(this,"CodeGenError")}location;constructor(t,r,n,i){super(t),this.location={file:r,namespace:"",line:n?n.line:0,column:n?n.column:0,length:0,lineText:i??"",suggestion:""}}};Ii.CodeGenError=t2;var Det=s(e=>{let t=[],r=e;for(;r.parent;)t.push(r),r=r.parent;return t.reverse()},"invertTree"),Let=s((e,t)=>{if(!e)return!1;let r=Det(e);return t.split("/").every((o,a)=>{let u=r[a];return u?o==="*"||(0,e2.isAstProperty)(u)&&u.name.value===o?!0:o==="{}"?u.type===e2.SyntaxType.Object:o==="[]"?u.type===e2.SyntaxType.Array:!1:!1})},"testPosition");Ii.testPosition=Let});var Kre=h($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});$m.getEnvStatementTransformer=$m.AstTransformer=void 0;var Cm=Dc(),jet=jw(),hE=r2(),n2=class{static{s(this,"AstTransformer")}errors=[];transform(t){return this.visitor(t),t}visitor(t){this.visit(t),(0,Cm.isAstObject)(t)?t.children.forEach(r=>{this.visitor(r)}):(0,Cm.isAstArray)(t)?t.children.forEach(r=>{this.visitor(r)}):(0,Cm.isAstProperty)(t)&&this.visitor(t.value)}};$m.AstTransformer=n2;var Met=s((e,t,r)=>n=>{if(!(0,Cm.isAstProperty)(n)||!(0,Cm.isAstLiteral)(n.value)||typeof n.value.value!="string")return;if(!e.some(o=>(0,hE.testPosition)(n,o))){hE.ROUTE_ENV_REGEX.test(n.value.value)&&t.push(new hE.CodeGenError("An $env() statement is not expected at this location.",r,n.location,n.value.value));return}let i=new RegExp(hE.ROUTE_ENV_REGEX).exec(n.value.value);if(i?.length===2&&i[0]===n.value.value){let o={type:Cm.SyntaxType.FunctionBody,parent:null,value:`environment["${i[1]}"]`};n.value=o}else{let o=n.value.value.replaceAll(new RegExp(hE.ROUTE_ENV_REGEX),(a,u)=>`\${environment["${u}"] ? environment["${u}"] : ""}`);o!==n.value.value&&(n.value=jet.factory.createTemplateString(o,n))}},"getEnvStatementTransformer");$m.getEnvStatementTransformer=Met});var Xre=h(Dm=>{"use strict";var Uet=Dm&&Dm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Dm,"__esModule",{value:!0});Dm.OpenAPIRoutesFragmentAstTransformer=void 0;var xet=Uet(require("path")),As=Dc(),i2=jw(),Wre=Kre(),So=r2(),mE="config/routes.json",qet=["handler/{}/options/*","policies/[]/{}/handler/{}/options/*","corsPolicies/[]/{}/*"],Fet=["handler/{}/module","handler/{}/options/{}/policies/{}/inbound/[]/{}/module","handler/{}/options/{}/policies/{}/outbound/[]/{}/module","policies/[]/{}/handler/{}/module","policies/[]/{}/handler/{}/options/{}/identifier/{}/module","policies/[]/{}/handler/{}/options/{}/validator"],Yre=["handler/{}/options/*","policies/[]/{}/handler/{}/options/*"],ket="handler/{}/options/{}/rewritePattern",Bet="handler/{}/options/{}/baseUrl",s2=class extends Wre.AstTransformer{static{s(this,"OpenAPIRoutesFragmentAstTransformer")}visit(t){this.rewriteHandlerFunction(t),this.rewriteForwardFunction(t),this.replaceImportStatements(t),this.replaceEnvStatements(t)}rewriteHandlerFunction(t){if(!(!(0,As.isAstProperty)(t)||!(0,As.isAstLiteral)(t.value)||typeof t.value.value!="string")&&(0,So.testPosition)(t,ket)){if(!t.parent||!(0,As.isAstObject)(t.parent)){this.errors.push(new So.CodeGenError("Invalid node, expected object",mE,t.parent?t.parent.location:t.location,void 0));return}let r=t.value.value,n={type:As.SyntaxType.FunctionBody,parent:null,value:Jre(r)},i=i2.factory.createProperty("__rewriteFunction",n,t);t.parent.children.push(i)}}rewriteForwardFunction(t){if(!(!(0,As.isAstProperty)(t)||!(0,As.isAstLiteral)(t.value)||typeof t.value.value!="string")&&(0,So.testPosition)(t,Bet)){if(!t.parent||!(0,As.isAstObject)(t.parent)){this.errors.push(new So.CodeGenError("Invalid node, expected object",mE,t.parent?t.parent.location:t.location,void 0));return}let r=t.value.value,n={type:As.SyntaxType.FunctionBody,parent:null,value:Jre(r)},i=i2.factory.createProperty("__rewriteFunction",n,t);t.parent.children.push(i)}}replaceImportStatements(t){if(!(0,As.isAstProperty)(t)||!(0,As.isAstLiteral)(t.value))return;let r=t.value.value;if(typeof r!="string")return;if(!Fet.some(a=>(0,So.testPosition)(t,a))&&!Yre.some(a=>(0,So.testPosition)(t,a))){if(So.ROUTE_IMPORT_REGEX.test(r)){if(t.name.value==="$ref")return;this.errors.push(new So.CodeGenError("An $import() statement is not expected at this location.",mE,t.location,r))}return}let n=So.ROUTE_IMPORT_REGEX.exec(r);if(Yre.some(a=>(0,So.testPosition)(t,a))&&!n)return;if(!n){this.errors.push(new So.CodeGenError("Invalid $import() statement",mE,t.location,r));return}let i=n[1];i.startsWith(".")&&(i=xet.default.join("..",i));let o={name:null,type:As.SyntaxType.FunctionCall,parent:t.parent,children:[]};o.name={value:"require",type:As.SyntaxType.Identifier,parent:o},o.children.push(i2.factory.createLiteral(i,o)),t.value=o}replaceEnvStatements=(0,Wre.getEnvStatementTransformer)(qet,this.errors,mE)};Dm.OpenAPIRoutesFragmentAstTransformer=s2;function Jre(e){return`(request, context) => {
|
|
178
178
|
const { params, url, query, method, headers } = request;
|
|
179
179
|
const { host, hostname, origin, pathname, port, search } = new URL(url);
|
|
180
180
|
const e = encodeURIComponent;
|
|
181
181
|
const env = environment;
|
|
182
182
|
return \`${e.replaceAll("`","\\`")}\`
|
|
183
|
-
}`}s(Jre,"buildRewriteFunction")});var Qre=h(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});ga.OPEN_API_MODE=ga.URL_PATTERN_MODE=ga.OPEN_API_ROUTE_EXTENSION=ga.OPEN_API_PATH_EXTENSION=void 0;ga.OPEN_API_PATH_EXTENSION="x-zuplo-path";ga.OPEN_API_ROUTE_EXTENSION="x-zuplo-route";ga.URL_PATTERN_MODE="url-pattern";ga.OPEN_API_MODE="open-api"});var hne=h((NMt,pne)=>{"use strict";var u2=Object.defineProperty,Get=Object.getOwnPropertyDescriptor,Vet=Object.getOwnPropertyNames,zet=Object.prototype.hasOwnProperty,Het=s((e,t)=>{for(var r in t)u2(e,r,{get:t[r],enumerable:!0})},"Oe"),Ket=s((e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Vet(t))!zet.call(e,i)&&i!==r&&u2(e,i,{get:()=>t[i],enumerable:!(n=Get(t,i))||n.enumerable});return e},"ke"),Wet=s(e=>Ket(u2({},"__esModule",{value:!0}),e),"Te"),tne={};Het(tne,{URLPattern:()=>btt});pne.exports=Wet(tne);var yE=class{static{s(this,"R")}type=3;name="";prefix="";value="";suffix="";modifier=3;constructor(e,t,r,n,i,o){this.type=e,this.name=t,this.prefix=r,this.value=n,this.suffix=i,this.modifier=o}hasCustomName(){return this.name!==""&&typeof this.name!="number"}},Yet=/[$_\p{ID_Start}]/u,Jet=/[$_\u200C\u200D\p{ID_Continue}]/u,a2=".*";function Xet(e,t){return(t?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(e)}s(Xet,"we");function rne(e,t=!1){let r=[],n=0;for(;n<e.length;){let i=e[n],o=s(function(a){if(!t)throw new TypeError(a);r.push({type:"INVALID_CHAR",index:n,value:e[n++]})},"c");if(i==="*"){r.push({type:"ASTERISK",index:n,value:e[n++]});continue}if(i==="+"||i==="?"){r.push({type:"OTHER_MODIFIER",index:n,value:e[n++]});continue}if(i==="\\"){r.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});continue}if(i==="{"){r.push({type:"OPEN",index:n,value:e[n++]});continue}if(i==="}"){r.push({type:"CLOSE",index:n,value:e[n++]});continue}if(i===":"){let a="",u=n+1;for(;u<e.length;){let c=e.substr(u,1);if(u===n+1&&Yet.test(c)||u!==n+1&&Jet.test(c)){a+=e[u++];continue}break}if(!a){o(`Missing parameter name at ${n}`);continue}r.push({type:"NAME",index:n,value:a}),n=u;continue}if(i==="("){let a=1,u="",c=n+1,l=!1;if(e[c]==="?"){o(`Pattern cannot start with "?" at ${c}`);continue}for(;c<e.length;){if(!Xet(e[c],!1)){o(`Invalid character '${e[c]}' at ${c}.`),l=!0;break}if(e[c]==="\\"){u+=e[c++]+e[c++];continue}if(e[c]===")"){if(a--,a===0){c++;break}}else if(e[c]==="("&&(a++,e[c+1]!=="?")){o(`Capturing groups are not allowed at ${c}`),l=!0;break}u+=e[c++]}if(l)continue;if(a){o(`Unbalanced pattern at ${n}`);continue}if(!u){o(`Missing pattern at ${n}`);continue}r.push({type:"REGEX",index:n,value:u}),n=c;continue}r.push({type:"CHAR",index:n,value:e[n++]})}return r.push({type:"END",index:n,value:""}),r}s(rne,"D");function nne(e,t={}){let r=rne(e);t.delimiter??="/#?",t.prefixes??="./";let n=`[^${Rs(t.delimiter)}]+?`,i=[],o=0,a=0,u="",c=new Set,l=s(O=>{if(a<r.length&&r[a].type===O)return r[a++].value},"o"),f=s(()=>l("OTHER_MODIFIER")??l("ASTERISK"),"f"),d=s(O=>{let I=l(O);if(I!==void 0)return I;let{type:w,index:j}=r[a];throw new TypeError(`Unexpected ${w} at ${j}, expected ${O}`)},"d"),_=s(()=>{let O="",I;for(;I=l("CHAR")??l("ESCAPED_CHAR");)O+=I;return O},"T"),m=s(O=>O,"xe"),g=t.encodePart||m,y="",b=s(O=>{y+=O},"U"),E=s(()=>{y.length&&(i.push(new yE(3,"","",g(y),"",3)),y="")},"$"),S=s((O,I,w,j,F)=>{let K=3;switch(F){case"?":K=1;break;case"*":K=0;break;case"+":K=2;break}if(!I&&!w&&K===3){b(O);return}if(E(),!I&&!w){if(!O)return;i.push(new yE(3,"","",g(O),"",K));return}let H;w?w==="*"?H=a2:H=w:H=n;let re=2;H===n?(re=1,H=""):H===a2&&(re=0,H="");let de;if(I?de=I:w&&(de=o++),c.has(de))throw new TypeError(`Duplicate name '${de}'.`);c.add(de),i.push(new yE(re,de,g(O),H,g(j),K))},"X");for(;a<r.length;){let O=l("CHAR"),I=l("NAME"),w=l("REGEX");if(!I&&!w&&(w=l("ASTERISK")),I||w){let F=O??"";t.prefixes.indexOf(F)===-1&&(b(F),F=""),E();let K=f();S(F,I,w,"",K);continue}let j=O??l("ESCAPED_CHAR");if(j){b(j);continue}if(l("OPEN")){let F=_(),K=l("NAME"),H=l("REGEX");!K&&!H&&(H=l("ASTERISK"));let re=_();d("CLOSE");let de=f();S(F,K,H,re,de);continue}E(),d("END")}return i}s(nne,"F");function Rs(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}s(Rs,"S");function Zre(e){return e&&e.ignoreCase?"ui":"u"}s(Zre,"B");function Qet(e,t,r){return ine(nne(e,r),t,r)}s(Qet,"q");function Lm(e){switch(e){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}}s(Lm,"k");function ine(e,t,r={}){r.delimiter??="/#?",r.prefixes??="./",r.sensitive??=!1,r.strict??=!1,r.end??=!0,r.start??=!0,r.endsWith="";let n=r.start?"^":"";for(let u of e){if(u.type===3){u.modifier===3?n+=Rs(u.value):n+=`(?:${Rs(u.value)})${Lm(u.modifier)}`;continue}t&&t.push(u.name);let c=`[^${Rs(r.delimiter)}]+?`,l=u.value;if(u.type===1?l=c:u.type===0&&(l=a2),!u.prefix.length&&!u.suffix.length){u.modifier===3||u.modifier===1?n+=`(${l})${Lm(u.modifier)}`:n+=`((?:${l})${Lm(u.modifier)})`;continue}if(u.modifier===3||u.modifier===1){n+=`(?:${Rs(u.prefix)}(${l})${Rs(u.suffix)})`,n+=Lm(u.modifier);continue}n+=`(?:${Rs(u.prefix)}`,n+=`((?:${l})(?:`,n+=Rs(u.suffix),n+=Rs(u.prefix),n+=`(?:${l}))*)${Rs(u.suffix)})`,u.modifier===0&&(n+="?")}let i=`[${Rs(r.endsWith)}]|$`,o=`[${Rs(r.delimiter)}]`;if(r.end)return r.strict||(n+=`${o}?`),r.endsWith.length?n+=`(?=${i})`:n+="$",new RegExp(n,Zre(r));r.strict||(n+=`(?:${o}(?=${i}))?`);let a=!1;if(e.length){let u=e[e.length-1];u.type===3&&u.modifier===3&&(a=r.delimiter.indexOf(u)>-1)}return a||(n+=`(?=${o}|${i})`),new RegExp(n,Zre(r))}s(ine,"W");var Bc={delimiter:"",prefixes:"",sensitive:!0,strict:!0},Zet={delimiter:".",prefixes:"",sensitive:!0,strict:!0},ett={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function ttt(e,t){return e.length?e[0]==="/"?!0:!t||e.length<2?!1:(e[0]=="\\"||e[0]=="{")&&e[1]=="/":!1}s(ttt,"ee");function sne(e,t){return e.startsWith(t)?e.substring(t.length,e.length):e}s(sne,"te");function rtt(e,t){return e.endsWith(t)?e.substr(0,e.length-t.length):e}s(rtt,"Ce");function one(e){return!e||e.length<2?!1:e[0]==="["||(e[0]==="\\"||e[0]==="{")&&e[1]==="["}s(one,"_");var ane=["ftp","file","http","https","ws","wss"];function une(e){if(!e)return!0;for(let t of ane)if(e.test(t))return!0;return!1}s(une,"N");function ntt(e,t){if(e=sne(e,"#"),t||e==="")return e;let r=new URL("https://example.com");return r.hash=e,r.hash?r.hash.substring(1,r.hash.length):""}s(ntt,"ne");function itt(e,t){if(e=sne(e,"?"),t||e==="")return e;let r=new URL("https://example.com");return r.search=e,r.search?r.search.substring(1,r.search.length):""}s(itt,"se");function stt(e,t){return t||e===""?e:one(e)?fne(e):lne(e)}s(stt,"ie");function ott(e,t){if(t||e==="")return e;let r=new URL("https://example.com");return r.password=e,r.password}s(ott,"ae");function att(e,t){if(t||e==="")return e;let r=new URL("https://example.com");return r.username=e,r.username}s(att,"oe");function utt(e,t,r){if(r||e==="")return e;if(t&&!ane.includes(t))return new URL(`${t}:${e}`).pathname;let n=e[0]=="/";return e=new URL(n?e:"/-"+e,"https://example.com").pathname,n||(e=e.substring(2,e.length)),e}s(utt,"ce");function ctt(e,t,r){return cne(t)===e&&(e=""),r||e===""?e:dne(e)}s(ctt,"le");function ltt(e,t){return e=rtt(e,":"),t||e===""?e:c2(e)}s(ltt,"fe");function cne(e){switch(e){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}s(cne,"z");function c2(e){if(e==="")return e;if(/^[-+.A-Za-z0-9]*$/.test(e))return e.toLowerCase();throw new TypeError(`Invalid protocol '${e}'.`)}s(c2,"y");function ftt(e){if(e==="")return e;let t=new URL("https://example.com");return t.username=e,t.username}s(ftt,"he");function dtt(e){if(e==="")return e;let t=new URL("https://example.com");return t.password=e,t.password}s(dtt,"ue");function lne(e){if(e==="")return e;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(e))throw new TypeError(`Invalid hostname '${e}'`);let t=new URL("https://example.com");return t.hostname=e,t.hostname}s(lne,"j");function fne(e){if(e==="")return e;if(/[^0-9a-fA-F[\]:]/g.test(e))throw new TypeError(`Invalid IPv6 hostname '${e}'`);return e.toLowerCase()}s(fne,"K");function dne(e){if(e===""||/^[0-9]*$/.test(e)&&parseInt(e)<=65535)return e;throw new TypeError(`Invalid port '${e}'.`)}s(dne,"G");function ptt(e){if(e==="")return e;let t=new URL("https://example.com");return t.pathname=e[0]!=="/"?"/-"+e:e,e[0]!=="/"?t.pathname.substring(2,t.pathname.length):t.pathname}s(ptt,"de");function htt(e){return e===""?e:new URL(`data:${e}`).pathname}s(htt,"pe");function mtt(e){if(e==="")return e;let t=new URL("https://example.com");return t.search=e,t.search.substring(1,t.search.length)}s(mtt,"ge");function _tt(e){if(e==="")return e;let t=new URL("https://example.com");return t.hash=e,t.hash.substring(1,t.hash.length)}s(_tt,"me");var gtt=class{static{s(this,"H")}#t;#r=[];#n={};#e=0;#s=1;#c=0;#f=0;#l=0;#a=0;#i=!1;constructor(e){this.#t=e}get result(){return this.#n}parse(){for(this.#r=rne(this.#t,!0);this.#e<this.#r.length;this.#e+=this.#s){if(this.#s=1,this.#r[this.#e].type==="END"){if(this.#f===0){this.#_(),this.#y()?this.#u(9,1):this.#P()?this.#u(8,1):this.#u(7,0);continue}else if(this.#f===2){this.#p(5);continue}this.#u(10,0);break}if(this.#l>0)if(this.#o())this.#l-=1;else continue;if(this.#I()){this.#l+=1;continue}switch(this.#f){case 0:this.#w()&&this.#p(1);break;case 1:if(this.#w()){this.#$();let e=7,t=1;this.#A()?(e=2,t=3):this.#i&&(e=2),this.#u(e,t)}break;case 2:this.#O()?this.#p(3):(this.#m()||this.#P()||this.#y())&&this.#p(5);break;case 3:this.#v()?this.#u(4,1):this.#O()&&this.#u(5,1);break;case 4:this.#O()&&this.#u(5,1);break;case 5:this.#S()?this.#a+=1:this.#R()&&(this.#a-=1),this.#T()&&!this.#a?this.#u(6,1):this.#m()?this.#u(7,0):this.#P()?this.#u(8,1):this.#y()&&this.#u(9,1);break;case 6:this.#m()?this.#u(7,0):this.#P()?this.#u(8,1):this.#y()&&this.#u(9,1);break;case 7:this.#P()?this.#u(8,1):this.#y()&&this.#u(9,1);break;case 8:this.#y()&&this.#u(9,1);break;case 9:break;case 10:break}}this.#n.hostname!==void 0&&this.#n.port===void 0&&(this.#n.port="")}#u(e,t){switch(this.#f){case 0:break;case 1:this.#n.protocol=this.#g();break;case 2:break;case 3:this.#n.username=this.#g();break;case 4:this.#n.password=this.#g();break;case 5:this.#n.hostname=this.#g();break;case 6:this.#n.port=this.#g();break;case 7:this.#n.pathname=this.#g();break;case 8:this.#n.search=this.#g();break;case 9:this.#n.hash=this.#g();break;case 10:break}this.#f!==0&&e!==10&&([1,2,3,4].includes(this.#f)&&[6,7,8,9].includes(e)&&(this.#n.hostname??=""),[1,2,3,4,5,6].includes(this.#f)&&[8,9].includes(e)&&(this.#n.pathname??=this.#i?"/":""),[1,2,3,4,5,6,7].includes(this.#f)&&e===9&&(this.#n.search??="")),this.#E(e,t)}#E(e,t){this.#f=e,this.#c=this.#e+t,this.#e+=t,this.#s=0}#_(){this.#e=this.#c,this.#s=0}#p(e){this.#_(),this.#f=e}#b(e){return e<0&&(e=this.#r.length-e),e<this.#r.length?this.#r[e]:this.#r[this.#r.length-1]}#d(e,t){let r=this.#b(e);return r.value===t&&(r.type==="CHAR"||r.type==="ESCAPED_CHAR"||r.type==="INVALID_CHAR")}#w(){return this.#d(this.#e,":")}#A(){return this.#d(this.#e+1,"/")&&this.#d(this.#e+2,"/")}#O(){return this.#d(this.#e,"@")}#v(){return this.#d(this.#e,":")}#T(){return this.#d(this.#e,":")}#m(){return this.#d(this.#e,"/")}#P(){if(this.#d(this.#e,"?"))return!0;if(this.#r[this.#e].value!=="?")return!1;let e=this.#b(this.#e-1);return e.type!=="NAME"&&e.type!=="REGEX"&&e.type!=="CLOSE"&&e.type!=="ASTERISK"}#y(){return this.#d(this.#e,"#")}#I(){return this.#r[this.#e].type=="OPEN"}#o(){return this.#r[this.#e].type=="CLOSE"}#S(){return this.#d(this.#e,"[")}#R(){return this.#d(this.#e,"]")}#g(){let e=this.#r[this.#e],t=this.#b(this.#c).index;return this.#t.substring(t,e.index)}#$(){let e={};Object.assign(e,Bc),e.encodePart=c2;let t=Qet(this.#g(),void 0,e);this.#i=une(t)}},o2=["protocol","username","password","hostname","port","pathname","search","hash"],kc="*";function ene(e,t){if(typeof e!="string")throw new TypeError("parameter 1 is not of type 'string'.");let r=new URL(e,t);return{protocol:r.protocol.substring(0,r.protocol.length-1),username:r.username,password:r.password,hostname:r.hostname,port:r.port,pathname:r.pathname,search:r.search!==""?r.search.substring(1,r.search.length):void 0,hash:r.hash!==""?r.hash.substring(1,r.hash.length):void 0}}s(ene,"Se");function vu(e,t){return t?gE(e):e}s(vu,"b");function _E(e,t,r){let n;if(typeof t.baseURL=="string")try{n=new URL(t.baseURL),t.protocol===void 0&&(e.protocol=vu(n.protocol.substring(0,n.protocol.length-1),r)),!r&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&(e.username=vu(n.username,r)),!r&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&t.password===void 0&&(e.password=vu(n.password,r)),t.protocol===void 0&&t.hostname===void 0&&(e.hostname=vu(n.hostname,r)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&(e.port=vu(n.port,r)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&(e.pathname=vu(n.pathname,r)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&(e.search=vu(n.search.substring(1,n.search.length),r)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&t.hash===void 0&&(e.hash=vu(n.hash.substring(1,n.hash.length),r))}catch{throw new TypeError(`invalid baseURL '${t.baseURL}'.`)}if(typeof t.protocol=="string"&&(e.protocol=ltt(t.protocol,r)),typeof t.username=="string"&&(e.username=att(t.username,r)),typeof t.password=="string"&&(e.password=ott(t.password,r)),typeof t.hostname=="string"&&(e.hostname=stt(t.hostname,r)),typeof t.port=="string"&&(e.port=ctt(t.port,e.protocol,r)),typeof t.pathname=="string"){if(e.pathname=t.pathname,n&&!ttt(e.pathname,r)){let i=n.pathname.lastIndexOf("/");i>=0&&(e.pathname=vu(n.pathname.substring(0,i+1),r)+e.pathname)}e.pathname=utt(e.pathname,e.protocol,r)}return typeof t.search=="string"&&(e.search=itt(t.search,r)),typeof t.hash=="string"&&(e.hash=ntt(t.hash,r)),e}s(_E,"w");function gE(e){return e.replace(/([+*?:{}()\\])/g,"\\$1")}s(gE,"C");function ytt(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}s(ytt,"Le");function Ett(e,t){t.delimiter??="/#?",t.prefixes??="./",t.sensitive??=!1,t.strict??=!1,t.end??=!0,t.start??=!0,t.endsWith="";let r=".*",n=`[^${ytt(t.delimiter)}]+?`,i=/[$_\u200C\u200D\p{ID_Continue}]/u,o="";for(let a=0;a<e.length;++a){let u=e[a];if(u.type===3){if(u.modifier===3){o+=gE(u.value);continue}o+=`{${gE(u.value)}}${Lm(u.modifier)}`;continue}let c=u.hasCustomName(),l=!!u.suffix.length||!!u.prefix.length&&(u.prefix.length!==1||!t.prefixes.includes(u.prefix)),f=a>0?e[a-1]:null,d=a<e.length-1?e[a+1]:null;if(!l&&c&&u.type===1&&u.modifier===3&&d&&!d.prefix.length&&!d.suffix.length)if(d.type===3){let _=d.value.length>0?d.value[0]:"";l=i.test(_)}else l=!d.hasCustomName();if(!l&&!u.prefix.length&&f&&f.type===3){let _=f.value[f.value.length-1];l=t.prefixes.includes(_)}l&&(o+="{"),o+=gE(u.prefix),c&&(o+=`:${u.name}`),u.type===2?o+=`(${u.value})`:u.type===1?c||(o+=`(${n})`):u.type===0&&(!c&&(!f||f.type===3||f.modifier!==3||l||u.prefix!=="")?o+="*":o+=`(${r})`),u.type===1&&c&&u.suffix.length&&i.test(u.suffix[0])&&(o+="\\"),o+=gE(u.suffix),l&&(o+="}"),u.modifier!==3&&(o+=Lm(u.modifier))}return o}s(Ett,"Ie");var btt=class{static{s(this,"Y")}#t;#r={};#n={};#e={};#s={};#c=!1;constructor(e={},t,r){try{let n;if(typeof t=="string"?n=t:r=t,typeof e=="string"){let u=new gtt(e);if(u.parse(),e=u.result,n===void 0&&typeof e.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.");e.baseURL=n}else{if(!e||typeof e!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(n)throw new TypeError("parameter 1 is not of type 'string'.")}typeof r>"u"&&(r={ignoreCase:!1});let i={ignoreCase:r.ignoreCase===!0},o={pathname:kc,protocol:kc,username:kc,password:kc,hostname:kc,port:kc,search:kc,hash:kc};this.#t=_E(o,e,!0),cne(this.#t.protocol)===this.#t.port&&(this.#t.port="");let a;for(a of o2){if(!(a in this.#t))continue;let u={},c=this.#t[a];switch(this.#n[a]=[],a){case"protocol":Object.assign(u,Bc),u.encodePart=c2;break;case"username":Object.assign(u,Bc),u.encodePart=ftt;break;case"password":Object.assign(u,Bc),u.encodePart=dtt;break;case"hostname":Object.assign(u,Zet),one(c)?u.encodePart=fne:u.encodePart=lne;break;case"port":Object.assign(u,Bc),u.encodePart=dne;break;case"pathname":une(this.#r.protocol)?(Object.assign(u,ett,i),u.encodePart=ptt):(Object.assign(u,Bc,i),u.encodePart=htt);break;case"search":Object.assign(u,Bc,i),u.encodePart=mtt;break;case"hash":Object.assign(u,Bc,i),u.encodePart=_tt;break}try{this.#s[a]=nne(c,u),this.#r[a]=ine(this.#s[a],this.#n[a],u),this.#e[a]=Ett(this.#s[a],u),this.#c=this.#c||this.#s[a].some(l=>l.type===2)}catch{throw new TypeError(`invalid ${a} pattern '${this.#t[a]}'.`)}}}catch(n){throw new TypeError(`Failed to construct 'URLPattern': ${n.message}`)}}test(e={},t){let r={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof e!="string"&&t)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof e>"u")return!1;try{typeof e=="object"?r=_E(r,e,!1):r=_E(r,ene(e,t),!1)}catch{return!1}let n;for(n of o2)if(!this.#r[n].exec(r[n]))return!1;return!0}exec(e={},t){let r={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof e!="string"&&t)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof e>"u")return;try{typeof e=="object"?r=_E(r,e,!1):r=_E(r,ene(e,t),!1)}catch{return null}let n={};t?n.inputs=[e,t]:n.inputs=[e];let i;for(i of o2){let o=this.#r[i].exec(r[i]);if(!o)return null;let a={};for(let[u,c]of this.#n[i].entries())if(typeof c=="string"||typeof c=="number"){let l=o[u+1];a[c]=l}n[i]={input:r[i]??"",groups:a}}return n}static compareComponent(e,t,r){let n=s((u,c)=>{for(let l of["type","modifier","prefix","value","suffix"]){if(u[l]<c[l])return-1;if(u[l]!==c[l])return 1}return 0},"a"),i=new yE(3,"","","","",3),o=new yE(0,"","","","",3),a=s((u,c)=>{let l=0;for(;l<Math.min(u.length,c.length);++l){let f=n(u[l],c[l]);if(f)return f}return u.length===c.length?0:n(u[l]??i,c[l]??i)},"s");return!t.#e[e]&&!r.#e[e]?0:t.#e[e]&&!r.#e[e]?a(t.#s[e],[o]):!t.#e[e]&&r.#e[e]?a([o],r.#s[e]):a(t.#s[e],r.#s[e])}get protocol(){return this.#e.protocol}get username(){return this.#e.username}get password(){return this.#e.password}get hostname(){return this.#e.hostname}get port(){return this.#e.port}get pathname(){return this.#e.pathname}get search(){return this.#e.search}get hash(){return this.#e.hash}get hasRegExpGroups(){return this.#c}}});var gne=h((DMt,_ne)=>{var{URLPattern:mne}=hne();_ne.exports={URLPattern:mne};globalThis.URLPattern||(globalThis.URLPattern=mne)});var Nne=h(Ea=>{"use strict";var p2=Ea&&Ea.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ea,"__esModule",{value:!0});Ea.embellishWithRawOpenApi=Ea.embellishWithPathPattern=Ea.compileRoutes=void 0;var Stt=require("@zuplo/runtime/internal"),l2=p2(gn()),vtt=p2(kZ()),ya=require("jsonc-parser"),d2=p2(require("path")),_T=ex(),yne=YZ(),vo=Dc(),EE=jw(),Ene=JZ(),Ott=XZ(),bne=tx(),Ptt=zre(),Itt=Hre(),Sne=Xre(),Yn=Qre(),Pne=globalThis;Pne.URLPattern||gne();var wtt=Pne.URLPattern,Ttt=vtt.default.compile(`
|
|
183
|
+
}`}s(Jre,"buildRewriteFunction")});var Qre=h(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});ga.OPEN_API_MODE=ga.URL_PATTERN_MODE=ga.OPEN_API_ROUTE_EXTENSION=ga.OPEN_API_PATH_EXTENSION=void 0;ga.OPEN_API_PATH_EXTENSION="x-zuplo-path";ga.OPEN_API_ROUTE_EXTENSION="x-zuplo-route";ga.URL_PATTERN_MODE="url-pattern";ga.OPEN_API_MODE="open-api"});var hne=h((NMt,pne)=>{"use strict";var u2=Object.defineProperty,Get=Object.getOwnPropertyDescriptor,Vet=Object.getOwnPropertyNames,zet=Object.prototype.hasOwnProperty,Het=s((e,t)=>{for(var r in t)u2(e,r,{get:t[r],enumerable:!0})},"Oe"),Ket=s((e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Vet(t))!zet.call(e,i)&&i!==r&&u2(e,i,{get:()=>t[i],enumerable:!(n=Get(t,i))||n.enumerable});return e},"ke"),Wet=s(e=>Ket(u2({},"__esModule",{value:!0}),e),"Te"),tne={};Het(tne,{URLPattern:()=>btt});pne.exports=Wet(tne);var yE=class{static{s(this,"R")}type=3;name="";prefix="";value="";suffix="";modifier=3;constructor(e,t,r,n,i,o){this.type=e,this.name=t,this.prefix=r,this.value=n,this.suffix=i,this.modifier=o}hasCustomName(){return this.name!==""&&typeof this.name!="number"}},Yet=/[$_\p{ID_Start}]/u,Jet=/[$_\u200C\u200D\p{ID_Continue}]/u,a2=".*";function Xet(e,t){return(t?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(e)}s(Xet,"we");function rne(e,t=!1){let r=[],n=0;for(;n<e.length;){let i=e[n],o=s(function(a){if(!t)throw new TypeError(a);r.push({type:"INVALID_CHAR",index:n,value:e[n++]})},"c");if(i==="*"){r.push({type:"ASTERISK",index:n,value:e[n++]});continue}if(i==="+"||i==="?"){r.push({type:"OTHER_MODIFIER",index:n,value:e[n++]});continue}if(i==="\\"){r.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});continue}if(i==="{"){r.push({type:"OPEN",index:n,value:e[n++]});continue}if(i==="}"){r.push({type:"CLOSE",index:n,value:e[n++]});continue}if(i===":"){let a="",u=n+1;for(;u<e.length;){let c=e.substr(u,1);if(u===n+1&&Yet.test(c)||u!==n+1&&Jet.test(c)){a+=e[u++];continue}break}if(!a){o(`Missing parameter name at ${n}`);continue}r.push({type:"NAME",index:n,value:a}),n=u;continue}if(i==="("){let a=1,u="",c=n+1,l=!1;if(e[c]==="?"){o(`Pattern cannot start with "?" at ${c}`);continue}for(;c<e.length;){if(!Xet(e[c],!1)){o(`Invalid character '${e[c]}' at ${c}.`),l=!0;break}if(e[c]==="\\"){u+=e[c++]+e[c++];continue}if(e[c]===")"){if(a--,a===0){c++;break}}else if(e[c]==="("&&(a++,e[c+1]!=="?")){o(`Capturing groups are not allowed at ${c}`),l=!0;break}u+=e[c++]}if(l)continue;if(a){o(`Unbalanced pattern at ${n}`);continue}if(!u){o(`Missing pattern at ${n}`);continue}r.push({type:"REGEX",index:n,value:u}),n=c;continue}r.push({type:"CHAR",index:n,value:e[n++]})}return r.push({type:"END",index:n,value:""}),r}s(rne,"D");function nne(e,t={}){let r=rne(e);t.delimiter??="/#?",t.prefixes??="./";let n=`[^${Rs(t.delimiter)}]+?`,i=[],o=0,a=0,u="",c=new Set,l=s(O=>{if(a<r.length&&r[a].type===O)return r[a++].value},"o"),f=s(()=>l("OTHER_MODIFIER")??l("ASTERISK"),"f"),d=s(O=>{let I=l(O);if(I!==void 0)return I;let{type:w,index:j}=r[a];throw new TypeError(`Unexpected ${w} at ${j}, expected ${O}`)},"d"),_=s(()=>{let O="",I;for(;I=l("CHAR")??l("ESCAPED_CHAR");)O+=I;return O},"T"),m=s(O=>O,"xe"),g=t.encodePart||m,y="",b=s(O=>{y+=O},"U"),E=s(()=>{y.length&&(i.push(new yE(3,"","",g(y),"",3)),y="")},"$"),v=s((O,I,w,j,F)=>{let K=3;switch(F){case"?":K=1;break;case"*":K=0;break;case"+":K=2;break}if(!I&&!w&&K===3){b(O);return}if(E(),!I&&!w){if(!O)return;i.push(new yE(3,"","",g(O),"",K));return}let H;w?w==="*"?H=a2:H=w:H=n;let re=2;H===n?(re=1,H=""):H===a2&&(re=0,H="");let de;if(I?de=I:w&&(de=o++),c.has(de))throw new TypeError(`Duplicate name '${de}'.`);c.add(de),i.push(new yE(re,de,g(O),H,g(j),K))},"X");for(;a<r.length;){let O=l("CHAR"),I=l("NAME"),w=l("REGEX");if(!I&&!w&&(w=l("ASTERISK")),I||w){let F=O??"";t.prefixes.indexOf(F)===-1&&(b(F),F=""),E();let K=f();v(F,I,w,"",K);continue}let j=O??l("ESCAPED_CHAR");if(j){b(j);continue}if(l("OPEN")){let F=_(),K=l("NAME"),H=l("REGEX");!K&&!H&&(H=l("ASTERISK"));let re=_();d("CLOSE");let de=f();v(F,K,H,re,de);continue}E(),d("END")}return i}s(nne,"F");function Rs(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}s(Rs,"S");function Zre(e){return e&&e.ignoreCase?"ui":"u"}s(Zre,"B");function Qet(e,t,r){return ine(nne(e,r),t,r)}s(Qet,"q");function Lm(e){switch(e){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}}s(Lm,"k");function ine(e,t,r={}){r.delimiter??="/#?",r.prefixes??="./",r.sensitive??=!1,r.strict??=!1,r.end??=!0,r.start??=!0,r.endsWith="";let n=r.start?"^":"";for(let u of e){if(u.type===3){u.modifier===3?n+=Rs(u.value):n+=`(?:${Rs(u.value)})${Lm(u.modifier)}`;continue}t&&t.push(u.name);let c=`[^${Rs(r.delimiter)}]+?`,l=u.value;if(u.type===1?l=c:u.type===0&&(l=a2),!u.prefix.length&&!u.suffix.length){u.modifier===3||u.modifier===1?n+=`(${l})${Lm(u.modifier)}`:n+=`((?:${l})${Lm(u.modifier)})`;continue}if(u.modifier===3||u.modifier===1){n+=`(?:${Rs(u.prefix)}(${l})${Rs(u.suffix)})`,n+=Lm(u.modifier);continue}n+=`(?:${Rs(u.prefix)}`,n+=`((?:${l})(?:`,n+=Rs(u.suffix),n+=Rs(u.prefix),n+=`(?:${l}))*)${Rs(u.suffix)})`,u.modifier===0&&(n+="?")}let i=`[${Rs(r.endsWith)}]|$`,o=`[${Rs(r.delimiter)}]`;if(r.end)return r.strict||(n+=`${o}?`),r.endsWith.length?n+=`(?=${i})`:n+="$",new RegExp(n,Zre(r));r.strict||(n+=`(?:${o}(?=${i}))?`);let a=!1;if(e.length){let u=e[e.length-1];u.type===3&&u.modifier===3&&(a=r.delimiter.indexOf(u)>-1)}return a||(n+=`(?=${o}|${i})`),new RegExp(n,Zre(r))}s(ine,"W");var Bc={delimiter:"",prefixes:"",sensitive:!0,strict:!0},Zet={delimiter:".",prefixes:"",sensitive:!0,strict:!0},ett={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function ttt(e,t){return e.length?e[0]==="/"?!0:!t||e.length<2?!1:(e[0]=="\\"||e[0]=="{")&&e[1]=="/":!1}s(ttt,"ee");function sne(e,t){return e.startsWith(t)?e.substring(t.length,e.length):e}s(sne,"te");function rtt(e,t){return e.endsWith(t)?e.substr(0,e.length-t.length):e}s(rtt,"Ce");function one(e){return!e||e.length<2?!1:e[0]==="["||(e[0]==="\\"||e[0]==="{")&&e[1]==="["}s(one,"_");var ane=["ftp","file","http","https","ws","wss"];function une(e){if(!e)return!0;for(let t of ane)if(e.test(t))return!0;return!1}s(une,"N");function ntt(e,t){if(e=sne(e,"#"),t||e==="")return e;let r=new URL("https://example.com");return r.hash=e,r.hash?r.hash.substring(1,r.hash.length):""}s(ntt,"ne");function itt(e,t){if(e=sne(e,"?"),t||e==="")return e;let r=new URL("https://example.com");return r.search=e,r.search?r.search.substring(1,r.search.length):""}s(itt,"se");function stt(e,t){return t||e===""?e:one(e)?fne(e):lne(e)}s(stt,"ie");function ott(e,t){if(t||e==="")return e;let r=new URL("https://example.com");return r.password=e,r.password}s(ott,"ae");function att(e,t){if(t||e==="")return e;let r=new URL("https://example.com");return r.username=e,r.username}s(att,"oe");function utt(e,t,r){if(r||e==="")return e;if(t&&!ane.includes(t))return new URL(`${t}:${e}`).pathname;let n=e[0]=="/";return e=new URL(n?e:"/-"+e,"https://example.com").pathname,n||(e=e.substring(2,e.length)),e}s(utt,"ce");function ctt(e,t,r){return cne(t)===e&&(e=""),r||e===""?e:dne(e)}s(ctt,"le");function ltt(e,t){return e=rtt(e,":"),t||e===""?e:c2(e)}s(ltt,"fe");function cne(e){switch(e){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}s(cne,"z");function c2(e){if(e==="")return e;if(/^[-+.A-Za-z0-9]*$/.test(e))return e.toLowerCase();throw new TypeError(`Invalid protocol '${e}'.`)}s(c2,"y");function ftt(e){if(e==="")return e;let t=new URL("https://example.com");return t.username=e,t.username}s(ftt,"he");function dtt(e){if(e==="")return e;let t=new URL("https://example.com");return t.password=e,t.password}s(dtt,"ue");function lne(e){if(e==="")return e;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(e))throw new TypeError(`Invalid hostname '${e}'`);let t=new URL("https://example.com");return t.hostname=e,t.hostname}s(lne,"j");function fne(e){if(e==="")return e;if(/[^0-9a-fA-F[\]:]/g.test(e))throw new TypeError(`Invalid IPv6 hostname '${e}'`);return e.toLowerCase()}s(fne,"K");function dne(e){if(e===""||/^[0-9]*$/.test(e)&&parseInt(e)<=65535)return e;throw new TypeError(`Invalid port '${e}'.`)}s(dne,"G");function ptt(e){if(e==="")return e;let t=new URL("https://example.com");return t.pathname=e[0]!=="/"?"/-"+e:e,e[0]!=="/"?t.pathname.substring(2,t.pathname.length):t.pathname}s(ptt,"de");function htt(e){return e===""?e:new URL(`data:${e}`).pathname}s(htt,"pe");function mtt(e){if(e==="")return e;let t=new URL("https://example.com");return t.search=e,t.search.substring(1,t.search.length)}s(mtt,"ge");function _tt(e){if(e==="")return e;let t=new URL("https://example.com");return t.hash=e,t.hash.substring(1,t.hash.length)}s(_tt,"me");var gtt=class{static{s(this,"H")}#t;#r=[];#n={};#e=0;#s=1;#c=0;#f=0;#l=0;#a=0;#i=!1;constructor(e){this.#t=e}get result(){return this.#n}parse(){for(this.#r=rne(this.#t,!0);this.#e<this.#r.length;this.#e+=this.#s){if(this.#s=1,this.#r[this.#e].type==="END"){if(this.#f===0){this.#_(),this.#y()?this.#u(9,1):this.#P()?this.#u(8,1):this.#u(7,0);continue}else if(this.#f===2){this.#p(5);continue}this.#u(10,0);break}if(this.#l>0)if(this.#o())this.#l-=1;else continue;if(this.#I()){this.#l+=1;continue}switch(this.#f){case 0:this.#w()&&this.#p(1);break;case 1:if(this.#w()){this.#$();let e=7,t=1;this.#A()?(e=2,t=3):this.#i&&(e=2),this.#u(e,t)}break;case 2:this.#O()?this.#p(3):(this.#m()||this.#P()||this.#y())&&this.#p(5);break;case 3:this.#v()?this.#u(4,1):this.#O()&&this.#u(5,1);break;case 4:this.#O()&&this.#u(5,1);break;case 5:this.#S()?this.#a+=1:this.#R()&&(this.#a-=1),this.#T()&&!this.#a?this.#u(6,1):this.#m()?this.#u(7,0):this.#P()?this.#u(8,1):this.#y()&&this.#u(9,1);break;case 6:this.#m()?this.#u(7,0):this.#P()?this.#u(8,1):this.#y()&&this.#u(9,1);break;case 7:this.#P()?this.#u(8,1):this.#y()&&this.#u(9,1);break;case 8:this.#y()&&this.#u(9,1);break;case 9:break;case 10:break}}this.#n.hostname!==void 0&&this.#n.port===void 0&&(this.#n.port="")}#u(e,t){switch(this.#f){case 0:break;case 1:this.#n.protocol=this.#g();break;case 2:break;case 3:this.#n.username=this.#g();break;case 4:this.#n.password=this.#g();break;case 5:this.#n.hostname=this.#g();break;case 6:this.#n.port=this.#g();break;case 7:this.#n.pathname=this.#g();break;case 8:this.#n.search=this.#g();break;case 9:this.#n.hash=this.#g();break;case 10:break}this.#f!==0&&e!==10&&([1,2,3,4].includes(this.#f)&&[6,7,8,9].includes(e)&&(this.#n.hostname??=""),[1,2,3,4,5,6].includes(this.#f)&&[8,9].includes(e)&&(this.#n.pathname??=this.#i?"/":""),[1,2,3,4,5,6,7].includes(this.#f)&&e===9&&(this.#n.search??="")),this.#E(e,t)}#E(e,t){this.#f=e,this.#c=this.#e+t,this.#e+=t,this.#s=0}#_(){this.#e=this.#c,this.#s=0}#p(e){this.#_(),this.#f=e}#b(e){return e<0&&(e=this.#r.length-e),e<this.#r.length?this.#r[e]:this.#r[this.#r.length-1]}#d(e,t){let r=this.#b(e);return r.value===t&&(r.type==="CHAR"||r.type==="ESCAPED_CHAR"||r.type==="INVALID_CHAR")}#w(){return this.#d(this.#e,":")}#A(){return this.#d(this.#e+1,"/")&&this.#d(this.#e+2,"/")}#O(){return this.#d(this.#e,"@")}#v(){return this.#d(this.#e,":")}#T(){return this.#d(this.#e,":")}#m(){return this.#d(this.#e,"/")}#P(){if(this.#d(this.#e,"?"))return!0;if(this.#r[this.#e].value!=="?")return!1;let e=this.#b(this.#e-1);return e.type!=="NAME"&&e.type!=="REGEX"&&e.type!=="CLOSE"&&e.type!=="ASTERISK"}#y(){return this.#d(this.#e,"#")}#I(){return this.#r[this.#e].type=="OPEN"}#o(){return this.#r[this.#e].type=="CLOSE"}#S(){return this.#d(this.#e,"[")}#R(){return this.#d(this.#e,"]")}#g(){let e=this.#r[this.#e],t=this.#b(this.#c).index;return this.#t.substring(t,e.index)}#$(){let e={};Object.assign(e,Bc),e.encodePart=c2;let t=Qet(this.#g(),void 0,e);this.#i=une(t)}},o2=["protocol","username","password","hostname","port","pathname","search","hash"],kc="*";function ene(e,t){if(typeof e!="string")throw new TypeError("parameter 1 is not of type 'string'.");let r=new URL(e,t);return{protocol:r.protocol.substring(0,r.protocol.length-1),username:r.username,password:r.password,hostname:r.hostname,port:r.port,pathname:r.pathname,search:r.search!==""?r.search.substring(1,r.search.length):void 0,hash:r.hash!==""?r.hash.substring(1,r.hash.length):void 0}}s(ene,"Se");function vu(e,t){return t?gE(e):e}s(vu,"b");function _E(e,t,r){let n;if(typeof t.baseURL=="string")try{n=new URL(t.baseURL),t.protocol===void 0&&(e.protocol=vu(n.protocol.substring(0,n.protocol.length-1),r)),!r&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&(e.username=vu(n.username,r)),!r&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&t.password===void 0&&(e.password=vu(n.password,r)),t.protocol===void 0&&t.hostname===void 0&&(e.hostname=vu(n.hostname,r)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&(e.port=vu(n.port,r)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&(e.pathname=vu(n.pathname,r)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&(e.search=vu(n.search.substring(1,n.search.length),r)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&t.hash===void 0&&(e.hash=vu(n.hash.substring(1,n.hash.length),r))}catch{throw new TypeError(`invalid baseURL '${t.baseURL}'.`)}if(typeof t.protocol=="string"&&(e.protocol=ltt(t.protocol,r)),typeof t.username=="string"&&(e.username=att(t.username,r)),typeof t.password=="string"&&(e.password=ott(t.password,r)),typeof t.hostname=="string"&&(e.hostname=stt(t.hostname,r)),typeof t.port=="string"&&(e.port=ctt(t.port,e.protocol,r)),typeof t.pathname=="string"){if(e.pathname=t.pathname,n&&!ttt(e.pathname,r)){let i=n.pathname.lastIndexOf("/");i>=0&&(e.pathname=vu(n.pathname.substring(0,i+1),r)+e.pathname)}e.pathname=utt(e.pathname,e.protocol,r)}return typeof t.search=="string"&&(e.search=itt(t.search,r)),typeof t.hash=="string"&&(e.hash=ntt(t.hash,r)),e}s(_E,"w");function gE(e){return e.replace(/([+*?:{}()\\])/g,"\\$1")}s(gE,"C");function ytt(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}s(ytt,"Le");function Ett(e,t){t.delimiter??="/#?",t.prefixes??="./",t.sensitive??=!1,t.strict??=!1,t.end??=!0,t.start??=!0,t.endsWith="";let r=".*",n=`[^${ytt(t.delimiter)}]+?`,i=/[$_\u200C\u200D\p{ID_Continue}]/u,o="";for(let a=0;a<e.length;++a){let u=e[a];if(u.type===3){if(u.modifier===3){o+=gE(u.value);continue}o+=`{${gE(u.value)}}${Lm(u.modifier)}`;continue}let c=u.hasCustomName(),l=!!u.suffix.length||!!u.prefix.length&&(u.prefix.length!==1||!t.prefixes.includes(u.prefix)),f=a>0?e[a-1]:null,d=a<e.length-1?e[a+1]:null;if(!l&&c&&u.type===1&&u.modifier===3&&d&&!d.prefix.length&&!d.suffix.length)if(d.type===3){let _=d.value.length>0?d.value[0]:"";l=i.test(_)}else l=!d.hasCustomName();if(!l&&!u.prefix.length&&f&&f.type===3){let _=f.value[f.value.length-1];l=t.prefixes.includes(_)}l&&(o+="{"),o+=gE(u.prefix),c&&(o+=`:${u.name}`),u.type===2?o+=`(${u.value})`:u.type===1?c||(o+=`(${n})`):u.type===0&&(!c&&(!f||f.type===3||f.modifier!==3||l||u.prefix!=="")?o+="*":o+=`(${r})`),u.type===1&&c&&u.suffix.length&&i.test(u.suffix[0])&&(o+="\\"),o+=gE(u.suffix),l&&(o+="}"),u.modifier!==3&&(o+=Lm(u.modifier))}return o}s(Ett,"Ie");var btt=class{static{s(this,"Y")}#t;#r={};#n={};#e={};#s={};#c=!1;constructor(e={},t,r){try{let n;if(typeof t=="string"?n=t:r=t,typeof e=="string"){let u=new gtt(e);if(u.parse(),e=u.result,n===void 0&&typeof e.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.");e.baseURL=n}else{if(!e||typeof e!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(n)throw new TypeError("parameter 1 is not of type 'string'.")}typeof r>"u"&&(r={ignoreCase:!1});let i={ignoreCase:r.ignoreCase===!0},o={pathname:kc,protocol:kc,username:kc,password:kc,hostname:kc,port:kc,search:kc,hash:kc};this.#t=_E(o,e,!0),cne(this.#t.protocol)===this.#t.port&&(this.#t.port="");let a;for(a of o2){if(!(a in this.#t))continue;let u={},c=this.#t[a];switch(this.#n[a]=[],a){case"protocol":Object.assign(u,Bc),u.encodePart=c2;break;case"username":Object.assign(u,Bc),u.encodePart=ftt;break;case"password":Object.assign(u,Bc),u.encodePart=dtt;break;case"hostname":Object.assign(u,Zet),one(c)?u.encodePart=fne:u.encodePart=lne;break;case"port":Object.assign(u,Bc),u.encodePart=dne;break;case"pathname":une(this.#r.protocol)?(Object.assign(u,ett,i),u.encodePart=ptt):(Object.assign(u,Bc,i),u.encodePart=htt);break;case"search":Object.assign(u,Bc,i),u.encodePart=mtt;break;case"hash":Object.assign(u,Bc,i),u.encodePart=_tt;break}try{this.#s[a]=nne(c,u),this.#r[a]=ine(this.#s[a],this.#n[a],u),this.#e[a]=Ett(this.#s[a],u),this.#c=this.#c||this.#s[a].some(l=>l.type===2)}catch{throw new TypeError(`invalid ${a} pattern '${this.#t[a]}'.`)}}}catch(n){throw new TypeError(`Failed to construct 'URLPattern': ${n.message}`)}}test(e={},t){let r={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof e!="string"&&t)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof e>"u")return!1;try{typeof e=="object"?r=_E(r,e,!1):r=_E(r,ene(e,t),!1)}catch{return!1}let n;for(n of o2)if(!this.#r[n].exec(r[n]))return!1;return!0}exec(e={},t){let r={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof e!="string"&&t)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof e>"u")return;try{typeof e=="object"?r=_E(r,e,!1):r=_E(r,ene(e,t),!1)}catch{return null}let n={};t?n.inputs=[e,t]:n.inputs=[e];let i;for(i of o2){let o=this.#r[i].exec(r[i]);if(!o)return null;let a={};for(let[u,c]of this.#n[i].entries())if(typeof c=="string"||typeof c=="number"){let l=o[u+1];a[c]=l}n[i]={input:r[i]??"",groups:a}}return n}static compareComponent(e,t,r){let n=s((u,c)=>{for(let l of["type","modifier","prefix","value","suffix"]){if(u[l]<c[l])return-1;if(u[l]!==c[l])return 1}return 0},"a"),i=new yE(3,"","","","",3),o=new yE(0,"","","","",3),a=s((u,c)=>{let l=0;for(;l<Math.min(u.length,c.length);++l){let f=n(u[l],c[l]);if(f)return f}return u.length===c.length?0:n(u[l]??i,c[l]??i)},"s");return!t.#e[e]&&!r.#e[e]?0:t.#e[e]&&!r.#e[e]?a(t.#s[e],[o]):!t.#e[e]&&r.#e[e]?a([o],r.#s[e]):a(t.#s[e],r.#s[e])}get protocol(){return this.#e.protocol}get username(){return this.#e.username}get password(){return this.#e.password}get hostname(){return this.#e.hostname}get port(){return this.#e.port}get pathname(){return this.#e.pathname}get search(){return this.#e.search}get hash(){return this.#e.hash}get hasRegExpGroups(){return this.#c}}});var gne=h((DMt,_ne)=>{var{URLPattern:mne}=hne();_ne.exports={URLPattern:mne};globalThis.URLPattern||(globalThis.URLPattern=mne)});var Nne=h(Ea=>{"use strict";var p2=Ea&&Ea.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ea,"__esModule",{value:!0});Ea.embellishWithRawOpenApi=Ea.embellishWithPathPattern=Ea.compileRoutes=void 0;var Stt=require("@zuplo/runtime/internal"),l2=p2(gn()),vtt=p2(kZ()),ya=require("jsonc-parser"),d2=p2(require("path")),_T=ex(),yne=YZ(),vo=Dc(),EE=jw(),Ene=JZ(),Ott=XZ(),bne=tx(),Ptt=zre(),Itt=Hre(),Sne=Xre(),Yn=Qre(),Pne=globalThis;Pne.URLPattern||gne();var wtt=Pne.URLPattern,Ttt=vtt.default.compile(`
|
|
184
184
|
import { environment } from "@zuplo/runtime";
|
|
185
185
|
import rawRouteData from "./raw.json";
|
|
186
186
|
const routes = () => ({
|
|
@@ -196,7 +196,7 @@ Expecting `+Ce.join(", ")+", got '"+(this.terminals_[I]||I)+"'":bt="Parse error
|
|
|
196
196
|
],
|
|
197
197
|
});
|
|
198
198
|
export default routes;
|
|
199
|
-
`);async function Ntt(e,t){let r=[],n=[],i=[],o=new Ptt.PoliciesConfigurationValidator,a=JSON.parse(t.content),u=o.validate(a);if(!u.isValid)return{content:"",errors:[{text:JSON.stringify(u.errors),location:{line:0,column:0,file:"/config/policies.json"}}]};let c=new yne.AstAdapter().parse(JSON.stringify(a)),l=[],f=[],d=new Sne.OpenAPIRoutesFragmentAstTransformer,_=new Ene.SourceGenerator,m,g,y=c.children.find(w=>w.name.value==="policies");if(y){let w=d.transform(y);m=_.generate(w),l=a.policies.map(({name:j})=>j)}let b=c.children.find(w=>w.name.value==="corsPolicies");if(b){let w=d.transform(b);g=_.generate(w),f=a.corsPolicies.map(({name:j})=>j)}let E=[];for(let w=0;w<e.length;w++){let j=[],F=e[w],K=(0,bne.parse)(F.content,j);if(j.length>0)return{content:"",errors:j.map(te=>({text:(0,ya.printParseErrorCode)(te.error),location:{file:F.fileName,line:te.line,column:te.column}}))};if(K){E.push(K);let te=(0,ya.findNodeAtLocation)(K,["paths"]);if(te&&te.children){for(let he of te.children)if(he.children){let Ce=mT(he),bt=Ce[Yn.OPEN_API_PATH_EXTENSION]?.pathMode;if(bt){if(bt!==Yn.OPEN_API_MODE&&bt!==Yn.URL_PATTERN_MODE)return{content:"",errors:[{text:`Unknown path mode ${bt}`,location:{line:0,column:0,file:F.fileName}}]}}else bt=Yn.OPEN_API_MODE;for(let[_t,zr]of Object.entries(Ce))if(_t!==Yn.OPEN_API_PATH_EXTENSION){let Cn=_t,Qi=zr,ja=Qi[Yn.OPEN_API_ROUTE_EXTENSION];if(ja){let Li=new Itt.OpenAPILocalizedValidator().validate(ja);if(Li.isValid){let ji=f2(he),Ma=vne(he,[ji,Cn,Yn.OPEN_API_ROUTE_EXTENSION]),Hr=await jtt(Ma,F);if(!Hr.valid)return{content:"",errors:[{text:Hr.errorMsg??`Unknown error on handler for path '${ji}'`,location:{line:Hr.line??0,column:Hr.column??0,file:F.fileName}}]};let Dn=Utt(Ma,F);if(!Dn.valid)return{content:"",errors:Dn.errors};Dn.warnings&&i.push(...Dn.warnings),r.push({path:ji,pathPattern:ji,pathMode:bt,httpMethod:Cn,rawOpenAPI:Qi,config:vne(he,[ji,Cn,Yn.OPEN_API_ROUTE_EXTENSION])})}else return{content:"",errors:[{text:JSON.stringify(Li.errors),location:{line:0,column:0,file:F.fileName}}]}}else{let $n=f2(he),Li={corsPolicy:"none",handler:Ltt($n,K)};r.push({path:$n,pathPattern:$n,pathMode:Yn.OPEN_API_MODE,rawOpenAPI:Qi,httpMethod:Cn,config:(0,bne.parse)(JSON.stringify(Li))})}}}}}let H=[];for(let te=0;te<e.length;te++){let he=e[te],Ce=E.at(te);if(Ce){let bt=(0,ya.findNodeAtLocation)(Ce,["paths"]);if(bt&&bt.children){for(let _t of bt.children)if(_t.children){let zr=mT(_t);for(let[Cn,Qi]of Object.entries(zr))if(Cn!==Yn.OPEN_API_PATH_EXTENSION){let $n=Qi[Yn.OPEN_API_ROUTE_EXTENSION];if($n&&"policies"in $n){let Li=$n.policies;Li.inbound?.forEach(ji=>{l.includes(ji)||H.push({text:`Policy '${ji}' does not exist in policies.json. Please add it and rebuild.`,location:{line:zr.line,column:zr.column,file:he.fileName}})}),Li.outbound?.forEach(ji=>{l.includes(ji)||H.push({text:`Policy '${ji}' does not exist in policies.json. Please add it and rebuild.`,location:{line:zr.line,column:zr.column,file:he.fileName}})})}}}}}}if(H.length>0)return{content:"",errors:H};let re=[],de=["none","anything-goes"];for(let te=0;te<e.length;te++){let he=e[te],Ce=E.at(te);if(Ce){let bt=(0,ya.findNodeAtLocation)(Ce,["paths"]);if(bt&&bt.children){for(let _t of bt.children)if(_t.children){let zr=mT(_t);for(let[Cn,Qi]of Object.entries(zr))if(Cn!==Yn.OPEN_API_PATH_EXTENSION){let $n=Qi[Yn.OPEN_API_ROUTE_EXTENSION];if($n&&"corsPolicy"in $n){let Li=$n.corsPolicy;if(de.includes(Li))continue;f.includes(Li)||re.push({text:`Cors policy '${Li}' does not exist in policies.json. Please add it and rebuild.`,location:{line:zr.line,column:zr.column,file:he.fileName}})}}}}}}if(re.length>0)return{content:"",errors:re};for(let te of r){let he=new Sne.OpenAPIRoutesFragmentAstTransformer,Ce=new yne.AstAdapter().convert(te.config);Ctt(Ce,te),Ine(Ce,te),$tt(Ce,te),Dtt(Ce),wne(d2.default.basename(e[w].fileName,".oas.json"),te.path,te.httpMethod,Ce);let bt=he.transform(Ce),_t=he.errors;if(_t.length>0)return{content:"",errors:[{text:JSON.stringify(_t),location:{line:0,column:0,file:F.fileName}}]};let Cn=new Ene.SourceGenerator().generate(bt);n.push(Cn)}}let S=new Map,O=[];for(let w=0;w<e.length;w++){let j=e[w],F=E.at(w);if(F){let K=(0,ya.findNodeAtLocation)(F,["paths"]);if(K&&K.children){for(let H of K.children)if(H.children){let re=mT(H);for(let de of Object.keys(re)){if(de===Yn.OPEN_API_PATH_EXTENSION)continue;let te=de,he=f2(H),Ce=te.replace(/\s+/g,"").split(",");if(S.has(he)){let bt=S.get(he)?.methods??[];Ce.forEach(_t=>{bt?.includes(_t)?O.push({text:`Cannot have duplicate routes declared. Route '${_t.toUpperCase()} ${he}' declared more than once.`,location:{line:H.line,column:H.column,file:j.fileName}}):bt.push(_t)}),S.set(he,{methods:bt})}else{try{new wtt({pathname:he})}catch{O.push({text:`Path ${he} contains invalid characters.`,location:{line:H.line,column:H.column,file:j.fileName}})}S.set(he,{methods:Ce})}}}}}}return O.length>0?{content:"",errors:O}:{content:Ttt({routes:n,policies:m??"policies: []",corsPolicies:g??"corsPolicies: []"}),errors:[],warnings:i}}s(Ntt,"compileRoutes");Ea.compileRoutes=Ntt;var Att=0,Rtt=1;function Ctt(e,t){let r={type:vo.SyntaxType.Property,parent:e,name:null,value:null};r.name={value:"path",type:vo.SyntaxType.Identifier,parent:r},r.value=EE.factory.createLiteral(t.path,r),e.children.unshift(r)}s(Ctt,"embellishWithPath");function Ine(e,t){let r={type:vo.SyntaxType.Property,parent:e,name:null,value:null};if(r.name={value:"pathPattern",type:vo.SyntaxType.Identifier,parent:r},t.pathMode===Yn.URL_PATTERN_MODE)r.value=EE.factory.createLiteral(t.path,r);else{let n=/{(\S+?)}/gm,i=":$1",o=t.path.replace(n,i);t.path.endsWith("/")||(o=o+"{/}?"),r.value=EE.factory.createLiteral(o,r)}e.children.unshift(r)}s(Ine,"embellishWithPathPattern");Ea.embellishWithPathPattern=Ine;function $tt(e,t){let r={type:vo.SyntaxType.Property,parent:e,name:null,value:null};r.name={value:"methods",type:vo.SyntaxType.Identifier,parent:r};let n=t.httpMethod.split(/,/).map(i=>i.trim().toUpperCase());r.value=EE.factory.createArrayOfLiterals(n,r),e.children.unshift(r)}s($tt,"embellishWithMethods");function Dtt(e){let t={type:vo.SyntaxType.Property,parent:e,name:null,value:null};t.name={value:"version",type:vo.SyntaxType.Identifier,parent:t},t.value=EE.factory.createLiteral("none",t),e.children.unshift(t)}s(Dtt,"embellishWithVersion");function wne(e,t,r,n){let i={type:vo.SyntaxType.Property,parent:n,name:null,value:null};i.name={value:"raw",type:vo.SyntaxType.Identifier,parent:n};let o=(0,Stt.getRawOperationDataIdentifierName)(e,t,r);i.value={type:vo.SyntaxType.FunctionBody,parent:i,value:`() => {return rawRouteData.${o};}`},n.children.unshift(i)}s(wne,"embellishWithRawOpenApi");Ea.embellishWithRawOpenApi=wne;function mT(e){return(0,_T.assert)(e.type==="property"),(0,_T.assert)(Array.isArray(e.children)),(0,ya.getNodeValue)(e.children[Rtt])}s(mT,"evaluatePathItem");function f2(e){return(0,_T.assert)(e.type==="property"),(0,_T.assert)(Array.isArray(e.children)),(0,ya.getNodeValue)(e.children[Att])}s(f2,"evaluatePath");function vne(e,t){return(0,ya.findNodeAtLocation)(e.parent,t)}s(vne,"extractZuploRouteNode");function Tne(e){return(0,ya.getNodeValue)(e)}s(Tne,"evaluateZuploRouteNode");function Ltt(e,t){let r=/{(\S+?)}/gm,n="${params.$1}",i=e.replace(r,n),o=(0,ya.getNodeValue)(t);return{export:"urlRewriteHandler",module:"$import(@zuplo/runtime)",options:{rewritePattern:`${o.servers&&o.servers.length>0?o.servers[0].url:"http://example.com"}${i}`,forwardSearch:!0}}}s(Ltt,"addDefaultUrlRewriteHandler");async function jtt(e,t){let r=Tne(e),n=r.handler.module.replace(/^\$import\(/,"").replace(/\)$/,""),i=d2.default.join(d2.default.dirname(t.fileName),"..",`${n}.ts`),o=r.handler.export;if(n==="@zuplo/runtime")return{valid:!0};if(await l2.default.fileExists(i)){let a=await(0,Ott.getJSFileExports)(i);if(a===null)return{valid:!1,errorMsg:`Could not find any export due to a compile error in '${l2.default.getParentDirFilename(i)}'`};if(!a.has(o)){let u=`Could not find export "${o}" in '${l2.default.getParentDirFilename(i)}'`,c=0,l=0;if(e.children)for(let f of e.children)f.children&&f.children.forEach(d=>{d.value==="handler"&&(c=d.line,l=d.column)});return{valid:!1,errorMsg:u,line:c,column:l}}return{valid:!0}}else return{valid:!1,errorMsg:`Could not find module '${n}'`}}s(jtt,"checkModuleIsValid");var One=s((e,t)=>{let r=0,n=0;if(e.children)for(let i of e.children)i.children&&i.children.forEach(o=>{o.value==="options"&&o.children?.forEach(a=>{o.value===t&&(r=a.line,n=a.column)})});return{line:r,column:n}},"getHandlerOptionLocation"),Mtt="$env(";function Utt(e,t){let r=Tne(e),n=r.handler.export;if(n!=="urlForwardHandler"&&n!=="urlRewriteHandler")return{valid:!0};let i="rewritePattern";n==="urlForwardHandler"&&(i="baseUrl");let o=r.handler.options[i];if(!o){let a=One(e,i);return{valid:!1,errors:[{text:`Invalid request handler configuration. handler.options.${i} is required but was not provided.`,location:{file:t.fileName,line:a.line,column:a.column}}]}}if(o.includes(Mtt)){let a=One(e,i);return{valid:!0,warnings:[{text:`Invalid environment variable access syntax detected. Use \${env.VAR_NAME} instead of $env(VAR_NAME) for handler.options.${i}.`,location:{file:t.fileName,line:a.line,column:a.column}}]}}return{valid:!0}}s(Utt,"checkHandlerIsValid")});var Rne=h(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.routeConfigurationValidatorFn=Gc.policiesConfigurationValidatorFn=Gc.compileRoutes=void 0;var xtt=Nne();Object.defineProperty(Gc,"compileRoutes",{enumerable:!0,get:function(){return xtt.compileRoutes}});var Ane=pT();Object.defineProperty(Gc,"policiesConfigurationValidatorFn",{enumerable:!0,get:function(){return Ane.policiesConfigurationValidatorFn}});Object.defineProperty(Gc,"routeConfigurationValidatorFn",{enumerable:!0,get:function(){return Ane.routeConfigurationValidatorFn}})});var Lne=h((UMt,Dne)=>{"use strict";var h2=s(e=>{if(!e)return;let t=e.cause;if(typeof t=="function"){let r=e.cause();return r instanceof Error?r:void 0}else return t instanceof Error?t:void 0},"getErrorCause"),Cne=s((e,t)=>{if(!(e instanceof Error))return"";let r=e.stack||"";if(t.has(e))return r+`
|
|
199
|
+
`);async function Ntt(e,t){let r=[],n=[],i=[],o=new Ptt.PoliciesConfigurationValidator,a=JSON.parse(t.content),u=o.validate(a);if(!u.isValid)return{content:"",errors:[{text:JSON.stringify(u.errors),location:{line:0,column:0,file:"/config/policies.json"}}]};let c=new yne.AstAdapter().parse(JSON.stringify(a)),l=[],f=[],d=new Sne.OpenAPIRoutesFragmentAstTransformer,_=new Ene.SourceGenerator,m,g,y=c.children.find(w=>w.name.value==="policies");if(y){let w=d.transform(y);m=_.generate(w),l=a.policies.map(({name:j})=>j)}let b=c.children.find(w=>w.name.value==="corsPolicies");if(b){let w=d.transform(b);g=_.generate(w),f=a.corsPolicies.map(({name:j})=>j)}let E=[];for(let w=0;w<e.length;w++){let j=[],F=e[w],K=(0,bne.parse)(F.content,j);if(j.length>0)return{content:"",errors:j.map(te=>({text:(0,ya.printParseErrorCode)(te.error),location:{file:F.fileName,line:te.line,column:te.column}}))};if(K){E.push(K);let te=(0,ya.findNodeAtLocation)(K,["paths"]);if(te&&te.children){for(let he of te.children)if(he.children){let Ce=mT(he),bt=Ce[Yn.OPEN_API_PATH_EXTENSION]?.pathMode;if(bt){if(bt!==Yn.OPEN_API_MODE&&bt!==Yn.URL_PATTERN_MODE)return{content:"",errors:[{text:`Unknown path mode ${bt}`,location:{line:0,column:0,file:F.fileName}}]}}else bt=Yn.OPEN_API_MODE;for(let[_t,zr]of Object.entries(Ce))if(_t!==Yn.OPEN_API_PATH_EXTENSION){let Cn=_t,Qi=zr,ja=Qi[Yn.OPEN_API_ROUTE_EXTENSION];if(ja){let Li=new Itt.OpenAPILocalizedValidator().validate(ja);if(Li.isValid){let ji=f2(he),Ma=vne(he,[ji,Cn,Yn.OPEN_API_ROUTE_EXTENSION]),Hr=await jtt(Ma,F);if(!Hr.valid)return{content:"",errors:[{text:Hr.errorMsg??`Unknown error on handler for path '${ji}'`,location:{line:Hr.line??0,column:Hr.column??0,file:F.fileName}}]};let Dn=Utt(Ma,F);if(!Dn.valid)return{content:"",errors:Dn.errors};Dn.warnings&&i.push(...Dn.warnings),r.push({path:ji,pathPattern:ji,pathMode:bt,httpMethod:Cn,rawOpenAPI:Qi,config:vne(he,[ji,Cn,Yn.OPEN_API_ROUTE_EXTENSION])})}else return{content:"",errors:[{text:JSON.stringify(Li.errors),location:{line:0,column:0,file:F.fileName}}]}}else{let $n=f2(he),Li={corsPolicy:"none",handler:Ltt($n,K)};r.push({path:$n,pathPattern:$n,pathMode:Yn.OPEN_API_MODE,rawOpenAPI:Qi,httpMethod:Cn,config:(0,bne.parse)(JSON.stringify(Li))})}}}}}let H=[];for(let te=0;te<e.length;te++){let he=e[te],Ce=E.at(te);if(Ce){let bt=(0,ya.findNodeAtLocation)(Ce,["paths"]);if(bt&&bt.children){for(let _t of bt.children)if(_t.children){let zr=mT(_t);for(let[Cn,Qi]of Object.entries(zr))if(Cn!==Yn.OPEN_API_PATH_EXTENSION){let $n=Qi[Yn.OPEN_API_ROUTE_EXTENSION];if($n&&"policies"in $n){let Li=$n.policies;Li.inbound?.forEach(ji=>{l.includes(ji)||H.push({text:`Policy '${ji}' does not exist in policies.json. Please add it and rebuild.`,location:{line:zr.line,column:zr.column,file:he.fileName}})}),Li.outbound?.forEach(ji=>{l.includes(ji)||H.push({text:`Policy '${ji}' does not exist in policies.json. Please add it and rebuild.`,location:{line:zr.line,column:zr.column,file:he.fileName}})})}}}}}}if(H.length>0)return{content:"",errors:H};let re=[],de=["none","anything-goes"];for(let te=0;te<e.length;te++){let he=e[te],Ce=E.at(te);if(Ce){let bt=(0,ya.findNodeAtLocation)(Ce,["paths"]);if(bt&&bt.children){for(let _t of bt.children)if(_t.children){let zr=mT(_t);for(let[Cn,Qi]of Object.entries(zr))if(Cn!==Yn.OPEN_API_PATH_EXTENSION){let $n=Qi[Yn.OPEN_API_ROUTE_EXTENSION];if($n&&"corsPolicy"in $n){let Li=$n.corsPolicy;if(de.includes(Li))continue;f.includes(Li)||re.push({text:`Cors policy '${Li}' does not exist in policies.json. Please add it and rebuild.`,location:{line:zr.line,column:zr.column,file:he.fileName}})}}}}}}if(re.length>0)return{content:"",errors:re};for(let te of r){let he=new Sne.OpenAPIRoutesFragmentAstTransformer,Ce=new yne.AstAdapter().convert(te.config);Ctt(Ce,te),Ine(Ce,te),$tt(Ce,te),Dtt(Ce),wne(d2.default.basename(e[w].fileName,".oas.json"),te.path,te.httpMethod,Ce);let bt=he.transform(Ce),_t=he.errors;if(_t.length>0)return{content:"",errors:[{text:JSON.stringify(_t),location:{line:0,column:0,file:F.fileName}}]};let Cn=new Ene.SourceGenerator().generate(bt);n.push(Cn)}}let v=new Map,O=[];for(let w=0;w<e.length;w++){let j=e[w],F=E.at(w);if(F){let K=(0,ya.findNodeAtLocation)(F,["paths"]);if(K&&K.children){for(let H of K.children)if(H.children){let re=mT(H);for(let de of Object.keys(re)){if(de===Yn.OPEN_API_PATH_EXTENSION)continue;let te=de,he=f2(H),Ce=te.replace(/\s+/g,"").split(",");if(v.has(he)){let bt=v.get(he)?.methods??[];Ce.forEach(_t=>{bt?.includes(_t)?O.push({text:`Cannot have duplicate routes declared. Route '${_t.toUpperCase()} ${he}' declared more than once.`,location:{line:H.line,column:H.column,file:j.fileName}}):bt.push(_t)}),v.set(he,{methods:bt})}else{try{new wtt({pathname:he})}catch{O.push({text:`Path ${he} contains invalid characters.`,location:{line:H.line,column:H.column,file:j.fileName}})}v.set(he,{methods:Ce})}}}}}}return O.length>0?{content:"",errors:O}:{content:Ttt({routes:n,policies:m??"policies: []",corsPolicies:g??"corsPolicies: []"}),errors:[],warnings:i}}s(Ntt,"compileRoutes");Ea.compileRoutes=Ntt;var Att=0,Rtt=1;function Ctt(e,t){let r={type:vo.SyntaxType.Property,parent:e,name:null,value:null};r.name={value:"path",type:vo.SyntaxType.Identifier,parent:r},r.value=EE.factory.createLiteral(t.path,r),e.children.unshift(r)}s(Ctt,"embellishWithPath");function Ine(e,t){let r={type:vo.SyntaxType.Property,parent:e,name:null,value:null};if(r.name={value:"pathPattern",type:vo.SyntaxType.Identifier,parent:r},t.pathMode===Yn.URL_PATTERN_MODE)r.value=EE.factory.createLiteral(t.path,r);else{let n=/{(\S+?)}/gm,i=":$1",o=t.path.replace(n,i);t.path.endsWith("/")||(o=o+"{/}?"),r.value=EE.factory.createLiteral(o,r)}e.children.unshift(r)}s(Ine,"embellishWithPathPattern");Ea.embellishWithPathPattern=Ine;function $tt(e,t){let r={type:vo.SyntaxType.Property,parent:e,name:null,value:null};r.name={value:"methods",type:vo.SyntaxType.Identifier,parent:r};let n=t.httpMethod.split(/,/).map(i=>i.trim().toUpperCase());r.value=EE.factory.createArrayOfLiterals(n,r),e.children.unshift(r)}s($tt,"embellishWithMethods");function Dtt(e){let t={type:vo.SyntaxType.Property,parent:e,name:null,value:null};t.name={value:"version",type:vo.SyntaxType.Identifier,parent:t},t.value=EE.factory.createLiteral("none",t),e.children.unshift(t)}s(Dtt,"embellishWithVersion");function wne(e,t,r,n){let i={type:vo.SyntaxType.Property,parent:n,name:null,value:null};i.name={value:"raw",type:vo.SyntaxType.Identifier,parent:n};let o=(0,Stt.getRawOperationDataIdentifierName)(e,t,r);i.value={type:vo.SyntaxType.FunctionBody,parent:i,value:`() => {return rawRouteData.${o};}`},n.children.unshift(i)}s(wne,"embellishWithRawOpenApi");Ea.embellishWithRawOpenApi=wne;function mT(e){return(0,_T.assert)(e.type==="property"),(0,_T.assert)(Array.isArray(e.children)),(0,ya.getNodeValue)(e.children[Rtt])}s(mT,"evaluatePathItem");function f2(e){return(0,_T.assert)(e.type==="property"),(0,_T.assert)(Array.isArray(e.children)),(0,ya.getNodeValue)(e.children[Att])}s(f2,"evaluatePath");function vne(e,t){return(0,ya.findNodeAtLocation)(e.parent,t)}s(vne,"extractZuploRouteNode");function Tne(e){return(0,ya.getNodeValue)(e)}s(Tne,"evaluateZuploRouteNode");function Ltt(e,t){let r=/{(\S+?)}/gm,n="${params.$1}",i=e.replace(r,n),o=(0,ya.getNodeValue)(t);return{export:"urlRewriteHandler",module:"$import(@zuplo/runtime)",options:{rewritePattern:`${o.servers&&o.servers.length>0?o.servers[0].url:"http://example.com"}${i}`,forwardSearch:!0}}}s(Ltt,"addDefaultUrlRewriteHandler");async function jtt(e,t){let r=Tne(e),n=r.handler.module.replace(/^\$import\(/,"").replace(/\)$/,""),i=d2.default.join(d2.default.dirname(t.fileName),"..",`${n}.ts`),o=r.handler.export;if(n==="@zuplo/runtime")return{valid:!0};if(await l2.default.fileExists(i)){let a=await(0,Ott.getJSFileExports)(i);if(a===null)return{valid:!1,errorMsg:`Could not find any export due to a compile error in '${l2.default.getParentDirFilename(i)}'`};if(!a.has(o)){let u=`Could not find export "${o}" in '${l2.default.getParentDirFilename(i)}'`,c=0,l=0;if(e.children)for(let f of e.children)f.children&&f.children.forEach(d=>{d.value==="handler"&&(c=d.line,l=d.column)});return{valid:!1,errorMsg:u,line:c,column:l}}return{valid:!0}}else return{valid:!1,errorMsg:`Could not find module '${n}'`}}s(jtt,"checkModuleIsValid");var One=s((e,t)=>{let r=0,n=0;if(e.children)for(let i of e.children)i.children&&i.children.forEach(o=>{o.value==="options"&&o.children?.forEach(a=>{o.value===t&&(r=a.line,n=a.column)})});return{line:r,column:n}},"getHandlerOptionLocation"),Mtt="$env(";function Utt(e,t){let r=Tne(e),n=r.handler.export;if(n!=="urlForwardHandler"&&n!=="urlRewriteHandler")return{valid:!0};let i="rewritePattern";n==="urlForwardHandler"&&(i="baseUrl");let o=r.handler.options[i];if(!o){let a=One(e,i);return{valid:!1,errors:[{text:`Invalid request handler configuration. handler.options.${i} is required but was not provided.`,location:{file:t.fileName,line:a.line,column:a.column}}]}}if(o.includes(Mtt)){let a=One(e,i);return{valid:!0,warnings:[{text:`Invalid environment variable access syntax detected. Use \${env.VAR_NAME} instead of $env(VAR_NAME) for handler.options.${i}.`,location:{file:t.fileName,line:a.line,column:a.column}}]}}return{valid:!0}}s(Utt,"checkHandlerIsValid")});var Rne=h(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.routeConfigurationValidatorFn=Gc.policiesConfigurationValidatorFn=Gc.compileRoutes=void 0;var xtt=Nne();Object.defineProperty(Gc,"compileRoutes",{enumerable:!0,get:function(){return xtt.compileRoutes}});var Ane=pT();Object.defineProperty(Gc,"policiesConfigurationValidatorFn",{enumerable:!0,get:function(){return Ane.policiesConfigurationValidatorFn}});Object.defineProperty(Gc,"routeConfigurationValidatorFn",{enumerable:!0,get:function(){return Ane.routeConfigurationValidatorFn}})});var Lne=h((UMt,Dne)=>{"use strict";var h2=s(e=>{if(!e)return;let t=e.cause;if(typeof t=="function"){let r=e.cause();return r instanceof Error?r:void 0}else return t instanceof Error?t:void 0},"getErrorCause"),Cne=s((e,t)=>{if(!(e instanceof Error))return"";let r=e.stack||"";if(t.has(e))return r+`
|
|
200
200
|
causes have become circular...`;let n=h2(e);return n?(t.add(e),r+`
|
|
201
201
|
caused by: `+Cne(n,t)):r},"_stackWithCauses"),qtt=s(e=>Cne(e,new Set),"stackWithCauses"),$ne=s((e,t,r)=>{if(!(e instanceof Error))return"";let n=r?"":e.message||"";if(t.has(e))return n+": ...";let i=h2(e);if(i){t.add(e);let o=typeof e.cause=="function";return n+(o?"":": ")+$ne(i,t,o)}else return n},"_messageWithCauses"),Ftt=s(e=>$ne(e,new Set),"messageWithCauses");Dne.exports={getErrorCause:h2,stackWithCauses:qtt,messageWithCauses:Ftt}});var Une=h((qMt,Mne)=>{"use strict";Mne.exports=g2;var{messageWithCauses:ktt,stackWithCauses:Btt}=Lne(),{toString:Gtt}=Object.prototype,m2=Symbol("circular-ref-tag"),_2=Symbol("pino-raw-err-ref"),jne=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[_2]},set:function(e){this[_2]=e}}});Object.defineProperty(jne,_2,{writable:!0,value:{}});function g2(e){if(!(e instanceof Error))return e;e[m2]=void 0;let t=Object.create(jne);t.type=Gtt.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=ktt(e),t.stack=Btt(e),global.AggregateError!==void 0&&e instanceof global.AggregateError&&Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(r=>g2(r)));for(let r in e)if(t[r]===void 0){let n=e[r];n instanceof Error?r!=="cause"&&!Object.prototype.hasOwnProperty.call(n,m2)&&(t[r]=g2(n)):t[r]=n}return delete e[m2],t.raw=e,t}s(g2,"errSerializer")});var kne=h((kMt,Fne)=>{"use strict";Fne.exports={mapHttpRequest:Vtt,reqSerializer:qne};var y2=Symbol("pino-raw-req-ref"),xne=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[y2]},set:function(e){this[y2]=e}}});Object.defineProperty(xne,y2,{writable:!0,value:{}});function qne(e){let t=e.info||e.socket,r=Object.create(xne);if(r.id=typeof e.id=="function"?e.id():e.id||(e.info?e.info.id:void 0),r.method=e.method,e.originalUrl)r.url=e.originalUrl;else{let n=e.path;r.url=typeof n=="string"?n:e.url?e.url.path||e.url:void 0}return e.query&&(r.query=e.query),e.params&&(r.params=e.params),r.headers=e.headers,r.remoteAddress=t&&t.remoteAddress,r.remotePort=t&&t.remotePort,r.raw=e.raw||e,r}s(qne,"reqSerializer");function Vtt(e){return{req:qne(e)}}s(Vtt,"mapHttpRequest")});var zne=h((GMt,Vne)=>{"use strict";Vne.exports={mapHttpResponse:ztt,resSerializer:Gne};var E2=Symbol("pino-raw-res-ref"),Bne=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[E2]},set:function(e){this[E2]=e}}});Object.defineProperty(Bne,E2,{writable:!0,value:{}});function Gne(e){let t=Object.create(Bne);return t.statusCode=e.headersSent?e.statusCode:null,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}s(Gne,"resSerializer");function ztt(e){return{res:Gne(e)}}s(ztt,"mapHttpResponse")});var S2=h((zMt,Hne)=>{"use strict";var b2=Une(),gT=kne(),yT=zne();Hne.exports={err:b2,mapHttpRequest:gT.mapHttpRequest,mapHttpResponse:yT.mapHttpResponse,req:gT.reqSerializer,res:yT.resSerializer,wrapErrorSerializer:s(function(t){return t===b2?t:s(function(n){return t(b2(n))},"wrapErrSerializer")},"wrapErrorSerializer"),wrapRequestSerializer:s(function(t){return t===gT.reqSerializer?t:s(function(n){return t(gT.reqSerializer(n))},"wrappedReqSerializer")},"wrapRequestSerializer"),wrapResponseSerializer:s(function(t){return t===yT.resSerializer?t:s(function(n){return t(yT.resSerializer(n))},"wrappedResSerializer")},"wrapResponseSerializer")}});var v2=h((KMt,Kne)=>{"use strict";function Htt(e,t){return t}s(Htt,"noOpPrepareStackTrace");Kne.exports=s(function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=Htt;let r=new Error().stack;if(Error.prepareStackTrace=t,!Array.isArray(r))return;let n=r.slice(2),i=[];for(let o of n)o&&i.push(o.getFileName());return i},"getCallers")});var Yne=h((YMt,Wne)=>{"use strict";var{createContext:Ktt,runInContext:Wtt}=require("vm");Wne.exports=Ytt;function Ytt(e={}){let{ERR_PATHS_MUST_BE_STRINGS:t=s(()=>"fast-redact - Paths must be (non-empty) strings","ERR_PATHS_MUST_BE_STRINGS"),ERR_INVALID_PATH:r=s(n=>`fast-redact \u2013 Invalid path (${n})`,"ERR_INVALID_PATH")}=e;return s(function({paths:i}){i.forEach(o=>{if(typeof o!="string")throw Error(t());try{if(/〇/.test(o))throw Error();let a=new Proxy({},{get:()=>a,set:()=>{throw Error()}}),u=(o[0]==="["?"":".")+o.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").replace(/\[\*\]/g,"[\u3007]");if(/\n|\r|;/.test(u)||/\/\*/.test(u))throw Error();Wtt(`
|
|
202
202
|
(function () {
|
|
@@ -249,7 +249,7 @@ caused by: `+Cne(n,t)):r},"_stackWithCauses"),qtt=s(e=>Cne(e,new Set),"stackWith
|
|
|
249
249
|
var s = this.serialize(o)
|
|
250
250
|
this.restore(o)
|
|
251
251
|
return s
|
|
252
|
-
`}s(rrt,"resultTmpl");function nrt(e,t){return e===!0?"throw Error('fast-redact: primitives cannot be redacted')":t===!1?"return o":"return this.serialize(o)"}s(nrt,"strictImpl")});var O2=h((rUt,rie)=>{"use strict";rie.exports={groupRedact:srt,groupRestore:irt,nestedRedact:art,nestedRestore:ort};function irt({keys:e,values:t,target:r}){if(r==null)return;let n=e.length;for(var i=0;i<n;i++){let o=e[i];r[o]=t[i]}}s(irt,"groupRestore");function srt(e,t,r,n,i){let o=tie(e,t);if(o==null)return{keys:null,values:null,target:null,flat:!0};let a=Object.keys(o),u=a.length,c=t.length,l=i?[...t]:void 0,f=new Array(u);for(var d=0;d<u;d++){let _=a[d];f[d]=o[_],i?(l[c]=_,o[_]=r(o[_],l)):n?o[_]=r(o[_]):o[_]=r}return{keys:a,values:f,target:o,flat:!0}}s(srt,"groupRedact");function ort(e){let t=e.length;for(var r=0;r<t;r++){let{key:i,target:o,value:a}=e[r];if(bT(o,i)&&(o[i]=a),typeof o=="object"){let u=Object.keys(o);for(var n=0;n<u.length;n++){let c=u[n],l=o[c];bT(l,i)&&(l[i]=a)}}}}s(ort,"nestedRestore");function art(e,t,r,n,i,o,a){let u=tie(t,r);if(u==null)return;let c=Object.keys(u),l=c.length;for(var f=0;f<l;f++){let d=c[f],{value:_,parent:m,exists:g}=urt(u,d,r,n,i,o,a);g===!0&&m!==null&&e.push({key:n[n.length-1],target:m,value:_})}return e}s(art,"nestedRedact");function bT(e,t){return e!=null?"hasOwn"in Object?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t):!1}s(bT,"has");function urt(e,t,r,n,i,o,a){let u=n.length,c=u-1,l=t;var f=-1,d,_,m,g=null,y=!0,b=null;if(m=d=e[t],typeof d!="object")return{value:null,parent:null,exists:y};for(;d!=null&&++f<u;){if(t=n[f],g=m,t!=="*"&&!b&&!(typeof d=="object"&&t in d)){y=!1;break}if(!(t==="*"&&(b=t,f!==c))){if(b){let
|
|
252
|
+
`}s(rrt,"resultTmpl");function nrt(e,t){return e===!0?"throw Error('fast-redact: primitives cannot be redacted')":t===!1?"return o":"return this.serialize(o)"}s(nrt,"strictImpl")});var O2=h((rUt,rie)=>{"use strict";rie.exports={groupRedact:srt,groupRestore:irt,nestedRedact:art,nestedRestore:ort};function irt({keys:e,values:t,target:r}){if(r==null)return;let n=e.length;for(var i=0;i<n;i++){let o=e[i];r[o]=t[i]}}s(irt,"groupRestore");function srt(e,t,r,n,i){let o=tie(e,t);if(o==null)return{keys:null,values:null,target:null,flat:!0};let a=Object.keys(o),u=a.length,c=t.length,l=i?[...t]:void 0,f=new Array(u);for(var d=0;d<u;d++){let _=a[d];f[d]=o[_],i?(l[c]=_,o[_]=r(o[_],l)):n?o[_]=r(o[_]):o[_]=r}return{keys:a,values:f,target:o,flat:!0}}s(srt,"groupRedact");function ort(e){let t=e.length;for(var r=0;r<t;r++){let{key:i,target:o,value:a}=e[r];if(bT(o,i)&&(o[i]=a),typeof o=="object"){let u=Object.keys(o);for(var n=0;n<u.length;n++){let c=u[n],l=o[c];bT(l,i)&&(l[i]=a)}}}}s(ort,"nestedRestore");function art(e,t,r,n,i,o,a){let u=tie(t,r);if(u==null)return;let c=Object.keys(u),l=c.length;for(var f=0;f<l;f++){let d=c[f],{value:_,parent:m,exists:g}=urt(u,d,r,n,i,o,a);g===!0&&m!==null&&e.push({key:n[n.length-1],target:m,value:_})}return e}s(art,"nestedRedact");function bT(e,t){return e!=null?"hasOwn"in Object?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t):!1}s(bT,"has");function urt(e,t,r,n,i,o,a){let u=n.length,c=u-1,l=t;var f=-1,d,_,m,g=null,y=!0,b=null;if(m=d=e[t],typeof d!="object")return{value:null,parent:null,exists:y};for(;d!=null&&++f<u;){if(t=n[f],g=m,t!=="*"&&!b&&!(typeof d=="object"&&t in d)){y=!1;break}if(!(t==="*"&&(b=t,f!==c))){if(b){let v=Object.keys(d);for(var E=0;E<v.length;E++){let O=v[E],I=d[O],w=t==="*";(w||typeof I=="object"&&I!==null&&t in I)&&(w?m=I:m=I[t],_=f!==c?m:o?a?i(m,[...r,l,...n]):i(m):i,w?d[O]=_:I[t]===_?y=!1:I[t]=_===void 0&&i!==void 0||bT(I,t)&&_===m?I[t]:_)}b=null}else m=d[t],_=f!==c?m:o?a?i(m,[...r,l,...n]):i(m):i,d[t]=bT(d,t)&&_===m||_===void 0&&i!==void 0?d[t]:_,d=d[t];if(typeof d!="object")break;m===g&&(y=!1)}}return{value:m,parent:g,exists:y}}s(urt,"specialSet");function tie(e,t){for(var r=-1,n=t.length,i=e;i!=null&&++r<n;)i=i[t[r]];return i}s(tie,"get")});var iie=h((iUt,nie)=>{"use strict";var{groupRestore:crt,nestedRestore:lrt}=O2();nie.exports=frt;function frt({secret:e,wcLen:t}){return s(function(){if(this.restore)return;let n=Object.keys(e),i=drt(e,n),o=t>0,a=o?{secret:e,groupRestore:crt,nestedRestore:lrt}:{secret:e};this.restore=Function("o",prt(i,n,o)).bind(a)},"compileRestore")}s(frt,"restorer");function drt(e,t){return t.map(r=>{let{circle:n,escPath:i,leadingBracket:o}=e[r],u=n?`o.${n} = secret[${i}].val`:`o${o?"":"."}${r} = secret[${i}].val`,c=`secret[${i}].val = undefined`;return`
|
|
253
253
|
if (secret[${i}].val !== undefined) {
|
|
254
254
|
try { ${u} } catch (e) {}
|
|
255
255
|
${c}
|
|
@@ -269,41 +269,41 @@ caused by: `+Cne(n,t)):r},"_stackWithCauses"),qtt=s(e=>Cne(e,new Set),"stackWith
|
|
|
269
269
|
`:""}
|
|
270
270
|
${e}
|
|
271
271
|
return o
|
|
272
|
-
`}s(prt,"restoreTmpl")});var oie=h((oUt,sie)=>{"use strict";sie.exports=hrt;function hrt(e){let{secret:t,censor:r,compileRestore:n,serialize:i,groupRedact:o,nestedRedact:a,wildcards:u,wcLen:c}=e,l=[{secret:t,censor:r,compileRestore:n}];return i!==!1&&l.push({serialize:i}),c>0&&l.push({groupRedact:o,nestedRedact:a,wildcards:u,wcLen:c}),Object.assign(...l)}s(hrt,"state")});var cie=h((uUt,uie)=>{"use strict";var aie=Yne(),mrt=Qne(),_rt=eie(),grt=iie(),{groupRedact:yrt,nestedRedact:Ert}=O2(),brt=oie(),Srt=ET(),vrt=aie(),P2=s(e=>e,"noop");P2.restore=P2;var Ort="[REDACTED]";I2.rx=Srt;I2.validator=aie;uie.exports=I2;function I2(e={}){let t=Array.from(new Set(e.paths||[])),r="serialize"in e&&(e.serialize===!1||typeof e.serialize=="function")?e.serialize:JSON.stringify,n=e.remove;if(n===!0&&r!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let i=n===!0?void 0:"censor"in e?e.censor:Ort,o=typeof i=="function",a=o&&i.length>1;if(t.length===0)return r||P2;vrt({paths:t,serialize:r,censor:i});let{wildcards:u,wcLen:c,secret:l}=mrt({paths:t,censor:i}),f=grt({secret:l,wcLen:c}),d="strict"in e?e.strict:!0;return _rt({secret:l,wcLen:c,serialize:r,strict:d,isCensorFct:o,censorFctTakesPath:a},brt({secret:l,censor:i,compileRestore:f,serialize:r,groupRedact:yrt,nestedRedact:Ert,wildcards:u,wcLen:c}))}s(I2,"fastRedact")});var jm=h((lUt,lie)=>{"use strict";var Prt=Symbol("pino.setLevel"),Irt=Symbol("pino.getLevel"),wrt=Symbol("pino.levelVal"),Trt=Symbol("pino.levelComp"),Nrt=Symbol("pino.useLevelLabels"),Art=Symbol("pino.useOnlyCustomLevels"),Rrt=Symbol("pino.mixin"),Crt=Symbol("pino.lsCache"),$rt=Symbol("pino.chindings"),Drt=Symbol("pino.asJson"),Lrt=Symbol("pino.write"),jrt=Symbol("pino.redactFmt"),Mrt=Symbol("pino.time"),Urt=Symbol("pino.timeSliceIndex"),xrt=Symbol("pino.stream"),qrt=Symbol("pino.stringify"),Frt=Symbol("pino.stringifySafe"),krt=Symbol("pino.stringifiers"),Brt=Symbol("pino.end"),Grt=Symbol("pino.formatOpts"),Vrt=Symbol("pino.messageKey"),zrt=Symbol("pino.errorKey"),Hrt=Symbol("pino.nestedKey"),Krt=Symbol("pino.nestedKeyStr"),Wrt=Symbol("pino.mixinMergeStrategy"),Yrt=Symbol("pino.msgPrefix"),Jrt=Symbol("pino.wildcardFirst"),Xrt=Symbol.for("pino.serializers"),Qrt=Symbol.for("pino.formatters"),Zrt=Symbol.for("pino.hooks"),ent=Symbol.for("pino.metadata");lie.exports={setLevelSym:Prt,getLevelSym:Irt,levelValSym:wrt,levelCompSym:Trt,useLevelLabelsSym:Nrt,mixinSym:Rrt,lsCacheSym:Crt,chindingsSym:$rt,asJsonSym:Drt,writeSym:Lrt,serializersSym:Xrt,redactFmtSym:jrt,timeSym:Mrt,timeSliceIndexSym:Urt,streamSym:xrt,stringifySym:qrt,stringifySafeSym:Frt,stringifiersSym:krt,endSym:Brt,formatOptsSym:Grt,messageKeySym:Vrt,errorKeySym:zrt,nestedKeySym:Hrt,wildcardFirstSym:Jrt,needsMetadataGsym:ent,useOnlyCustomLevelsSym:Art,formattersSym:Qrt,hooksSym:Zrt,nestedKeyStrSym:Krt,mixinMergeStrategySym:Wrt,msgPrefixSym:Yrt}});var N2=h((fUt,hie)=>{"use strict";var T2=cie(),{redactFmtSym:tnt,wildcardFirstSym:ST}=jm(),{rx:w2,validator:rnt}=T2,fie=rnt({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:e=>`pino \u2013 redact paths array contains an invalid path (${e})`}),die="[Redacted]",pie=!1;function nnt(e,t){let{paths:r,censor:n}=int(e),i=r.reduce((u,c)=>{w2.lastIndex=0;let l=w2.exec(c),f=w2.exec(c),d=l[1]!==void 0?l[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):l[0];if(d==="*"&&(d=ST),f===null)return u[d]=null,u;if(u[d]===null)return u;let{index:_}=f,m=`${c.substr(_,c.length-1)}`;return u[d]=u[d]||[],d!==ST&&u[d].length===0&&u[d].push(...u[ST]||[]),d===ST&&Object.keys(u).forEach(function(g){u[g]&&u[g].push(m)}),u[d].push(m),u},{}),o={[tnt]:T2({paths:r,censor:n,serialize:t,strict:pie})},a=s((...u)=>t(typeof n=="function"?n(...u):n),"topCensor");return[...Object.keys(i),...Object.getOwnPropertySymbols(i)].reduce((u,c)=>{if(i[c]===null)u[c]=l=>a(l,[c]);else{let l=typeof n=="function"?(f,d)=>n(f,[c,...d]):n;u[c]=T2({paths:i[c],censor:l,serialize:t,strict:pie})}return u},o)}s(nnt,"redaction");function int(e){if(Array.isArray(e))return e={paths:e,censor:die},fie(e),e;let{paths:t,censor:r=die,remove:n}=e;if(Array.isArray(t)===!1)throw Error("pino \u2013 redact must contain an array of strings");return n===!0&&(r=void 0),fie({paths:t,censor:r}),{paths:t,censor:r}}s(int,"handle");hie.exports=nnt});var _ie=h((pUt,mie)=>{"use strict";var snt=s(()=>"","nullTime"),ont=s(()=>`,"time":${Date.now()}`,"epochTime"),ant=s(()=>`,"time":${Math.round(Date.now()/1e3)}`,"unixTime"),unt=s(()=>`,"time":"${new Date(Date.now()).toISOString()}"`,"isoTime");mie.exports={nullTime:snt,epochTime:ont,unixTime:ant,isoTime:unt}});var yie=h((mUt,gie)=>{"use strict";function cnt(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}s(cnt,"tryStringify");gie.exports=lnt;function lnt(e,t,r){var n=r&&r.stringify||cnt,i=1;if(typeof e=="object"&&e!==null){var o=t.length+i;if(o===1)return e;var a=new Array(o);a[0]=n(e);for(var u=1;u<o;u++)a[u]=n(t[u]);return a.join(" ")}if(typeof e!="string")return e;var c=t.length;if(c===0)return e;for(var l="",f=1-i,d=-1,_=e&&e.length||0,m=0;m<_;){if(e.charCodeAt(m)===37&&m+1<_){switch(d=d>-1?d:0,e.charCodeAt(m+1)){case 100:case 102:if(f>=c||t[f]==null)break;d<m&&(l+=e.slice(d,m)),l+=Number(t[f]),d=m+2,m++;break;case 105:if(f>=c||t[f]==null)break;d<m&&(l+=e.slice(d,m)),l+=Math.floor(Number(t[f])),d=m+2,m++;break;case 79:case 111:case 106:if(f>=c||t[f]===void 0)break;d<m&&(l+=e.slice(d,m));var g=typeof t[f];if(g==="string"){l+="'"+t[f]+"'",d=m+2,m++;break}if(g==="function"){l+=t[f].name||"<anonymous>",d=m+2,m++;break}l+=n(t[f]),d=m+2,m++;break;case 115:if(f>=c)break;d<m&&(l+=e.slice(d,m)),l+=String(t[f]),d=m+2,m++;break;case 37:d<m&&(l+=e.slice(d,m)),l+="%",d=m+2,m++,f--;break}++f}++m}return d===-1?e:(d<_&&(l+=e.slice(d)),l)}s(lnt,"format")});var R2=h((gUt,A2)=>{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let t=function(r){if((r>0&&r<1/0)===!1)throw typeof r!="number"&&typeof r!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(e,0,0,Number(r))};s(t,"sleep");let e=new Int32Array(new SharedArrayBuffer(4));A2.exports=t}else{let e=function(t){if((t>0&&t<1/0)===!1)throw typeof t!="number"&&typeof t!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let n=Date.now()+Number(t);for(;n>Date.now(););};s(e,"sleep"),A2.exports=e}});var wie=h((EUt,Iie)=>{"use strict";var _r=require("fs"),fnt=require("events"),dnt=require("util").inherits,Eie=require("path"),$2=R2(),vT=100,OT=Buffer.allocUnsafe(0),pnt=16*1024,bie="buffer",Sie="utf8";function vie(e,t){t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;function r(o,a){if(o){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",o)}):t.emit("error",o);return}t.fd=a,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!(t._reopening||t.destroyed)&&(!t._writing&&t._len>t.minLength||t._flushPending)&&t._actualWrite()}s(r,"fileOpened");let n=t.append?"a":"w",i=t.mode;if(t.sync)try{t.mkdir&&_r.mkdirSync(Eie.dirname(e),{recursive:!0});let o=_r.openSync(e,n,i);r(null,o)}catch(o){throw r(o),o}else t.mkdir?_r.mkdir(Eie.dirname(e),{recursive:!0},o=>{if(o)return r(o);_r.open(e,n,i,r)}):_r.open(e,n,i,r)}s(vie,"openFile");function Oo(e){if(!(this instanceof Oo))return new Oo(e);let{fd:t,dest:r,minLength:n,maxLength:i,maxWrite:o,sync:a,append:u=!0,mkdir:c,retryEAGAIN:l,fsync:f,contentMode:d,mode:_}=e||{};t=t||r,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(n||0,16387),this.file=null,this.destroyed=!1,this.minLength=n||0,this.maxLength=i||0,this.maxWrite=o||pnt,this.sync=a||!1,this.writable=!0,this._fsync=f||!1,this.append=u||!1,this.mode=_,this.retryEAGAIN=l||(()=>!0),this.mkdir=c||!1;let m,g;if(d===bie)this._writingBuf=OT,this.write=_nt,this.flush=ynt,this.flushSync=bnt,this._actualWrite=vnt,m=s(()=>_r.writeSync(this.fd,this._writingBuf),"fsWriteSync"),g=s(()=>_r.write(this.fd,this._writingBuf,this.release),"fsWrite");else if(d===void 0||d===Sie)this._writingBuf="",this.write=mnt,this.flush=gnt,this.flushSync=Ent,this._actualWrite=Snt,m=s(()=>_r.writeSync(this.fd,this._writingBuf,"utf8"),"fsWriteSync"),g=s(()=>_r.write(this.fd,this._writingBuf,"utf8",this.release),"fsWrite");else throw new Error(`SonicBoom supports "${Sie}" and "${bie}", but passed ${d}`);if(typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")vie(t,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(y,b)=>{if(y){if((y.code==="EAGAIN"||y.code==="EBUSY")&&this.retryEAGAIN(y,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{$2(vT),this.release(void 0,0)}catch(O){this.release(O)}else setTimeout(g,vT);else this._writing=!1,this.emit("error",y);return}this.emit("write",b);let E=C2(this._writingBuf,this._len,b);if(this._len=E.len,this._writingBuf=E.writingBuf,this._writingBuf.length){if(!this.sync){g();return}try{do{let O=m(),I=C2(this._writingBuf,this._len,O);this._len=I.len,this._writingBuf=I.writingBuf}while(this._writingBuf.length)}catch(O){this.release(O);return}}this._fsync&&_r.fsyncSync(this.fd);let S=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):S>this.minLength?this._actualWrite():this._ending?S>0?this._actualWrite():(this._writing=!1,PT(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(hnt,this)):this.emit("drain"))},this.on("newListener",function(y){y==="drain"&&(this._asyncDrainScheduled=!1)})}s(Oo,"SonicBoom");function C2(e,t,r){return typeof e=="string"&&Buffer.byteLength(e)!==r&&(r=Buffer.from(e).subarray(0,r).toString().length),t=Math.max(t-r,0),e=e.slice(r),{writingBuf:e,len:t}}s(C2,"releaseWritingBuf");function hnt(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}s(hnt,"emitDrain");dnt(Oo,fnt);function Oie(e,t){return e.length===0?OT:e.length===1?e[0]:Buffer.concat(e,t)}s(Oie,"mergeBuf");function mnt(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||r[r.length-1].length+e.length>this.maxWrite?r.push(""+e):r[r.length-1]+=e,this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}s(mnt,"write");function _nt(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs,n=this._lens;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||n[n.length-1]+e.length>this.maxWrite?(r.push([e]),n.push(e.length)):(r[r.length-1].push(e),n[n.length-1]+=e.length),this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}s(_nt,"writeBuffer");function Pie(e){this._flushPending=!0;let t=s(()=>{this._fsync?(this._flushPending=!1,e()):_r.fsync(this.fd,n=>{this._flushPending=!1,e(n)}),this.off("error",r)},"onDrain"),r=s(n=>{this._flushPending=!1,e(n),this.off("drain",t)},"onError");this.once("drain",t),this.once("error",r)}s(Pie,"callFlushCallbackOnDrain");function gnt(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e?.();return}e&&Pie.call(this,e),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}s(gnt,"flush");function ynt(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e?.();return}e&&Pie.call(this,e),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}s(ynt,"flushBuffer");Oo.prototype.reopen=function(e){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen(e)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&_r.close(t,r=>{if(r)return this.emit("error",r)})}),vie(e||this.file,this)};Oo.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}this._ending||(this._ending=!0,!this._writing&&(this._len>0&&this.fd>=0?this._actualWrite():PT(this)))};function Ent(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");let e="";for(;this._bufs.length||e;){e.length<=0&&(e=this._bufs[0]);try{let t=_r.writeSync(this.fd,e,"utf8"),r=C2(e,this._len,t);e=r.writingBuf,this._len=r.len,e.length<=0&&this._bufs.shift()}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;$2(vT)}}try{_r.fsyncSync(this.fd)}catch{}}s(Ent,"flushSync");function bnt(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift([this._writingBuf]),this._writingBuf=OT);let e=OT;for(;this._bufs.length||e.length;){e.length<=0&&(e=Oie(this._bufs[0],this._lens[0]));try{let t=_r.writeSync(this.fd,e);e=e.subarray(t),this._len=Math.max(this._len-t,0),e.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;$2(vT)}}}s(bnt,"flushBufferSync");Oo.prototype.destroy=function(){this.destroyed||PT(this)};function Snt(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf||this._bufs.shift()||"",this.sync)try{let t=_r.writeSync(this.fd,this._writingBuf,"utf8");e(null,t)}catch(t){e(t)}else _r.write(this.fd,this._writingBuf,"utf8",e)}s(Snt,"actualWrite");function vnt(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:Oie(this._bufs.shift(),this._lens.shift()),this.sync)try{let t=_r.writeSync(this.fd,this._writingBuf);e(null,t)}catch(t){e(t)}else _r.write(this.fd,this._writingBuf,e)}s(vnt,"actualWriteBuffer");function PT(e){if(e.fd===-1){e.once("ready",PT.bind(null,e));return}e.destroyed=!0,e._bufs=[],e._lens=[],_r.fsync(e.fd,t);function t(){e.fd!==1&&e.fd!==2?_r.close(e.fd,r):r()}s(t,"closeWrapped");function r(n){if(n){e.emit("error",n);return}e._ending&&!e._writing&&e.emit("finish"),e.emit("close")}s(r,"done")}s(PT,"actualClose");Oo.SonicBoom=Oo;Oo.default=Oo;Iie.exports=Oo});var D2=h((SUt,$ie)=>{"use strict";var Vc={exit:[],beforeExit:[]},Tie={exit:Pnt,beforeExit:Int},Nie=new FinalizationRegistry(wnt);function Ont(e){Vc[e].length>0||process.on(e,Tie[e])}s(Ont,"install");function Aie(e){Vc[e].length>0||process.removeListener(e,Tie[e])}s(Aie,"uninstall");function Pnt(){Rie("exit")}s(Pnt,"onExit");function Int(){Rie("beforeExit")}s(Int,"onBeforeExit");function Rie(e){for(let t of Vc[e]){let r=t.deref(),n=t.fn;r!==void 0&&n(r,e)}}s(Rie,"callRefs");function wnt(e){for(let t of["exit","beforeExit"]){let r=Vc[t].indexOf(e);Vc[t].splice(r,r+1),Aie(t)}}s(wnt,"clear");function Cie(e,t,r){if(t===void 0)throw new Error("the object can't be undefined");Ont(e);let n=new WeakRef(t);n.fn=r,Nie.register(t,n),Vc[e].push(n)}s(Cie,"_register");function Tnt(e,t){Cie("exit",e,t)}s(Tnt,"register");function Nnt(e,t){Cie("beforeExit",e,t)}s(Nnt,"registerBeforeExit");function Ant(e){Nie.unregister(e);for(let t of["exit","beforeExit"])Vc[t]=Vc[t].filter(r=>{let n=r.deref();return n&&n!==e}),Aie(t)}s(Ant,"unregister");$ie.exports={register:Tnt,registerBeforeExit:Nnt,unregister:Ant}});var M2=h((OUt,Die)=>{"use strict";var{createRequire:Rnt}=require("module"),Cnt=v2(),{join:L2,isAbsolute:$nt,sep:Dnt}=require("path"),Lnt=R2(),j2=D2(),jnt=require("thread-stream");function Mnt(e){j2.register(e,xnt),j2.registerBeforeExit(e,qnt),e.on("close",function(){j2.unregister(e)})}s(Mnt,"setupOnExit");function Unt(e,t,r){let n=new jnt({filename:e,workerData:t,workerOpts:r});n.on("ready",i),n.on("close",function(){process.removeListener("exit",o)}),process.on("exit",o);function i(){process.removeListener("exit",o),n.unref(),r.autoEnd!==!1&&Mnt(n)}s(i,"onReady");function o(){n.closed||(n.flushSync(),Lnt(100),n.end())}return s(o,"onExit"),n}s(Unt,"buildStream");function xnt(e){e.ref(),e.flushSync(),e.end(),e.once("close",function(){e.unref()})}s(xnt,"autoEnd");function qnt(e){e.flushSync()}s(qnt,"flush");function Fnt(e){let{pipeline:t,targets:r,levels:n,dedupe:i,options:o={},worker:a={},caller:u=Cnt()}=e,c=typeof u=="string"?[u]:u,l="__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{},f=e.target;if(f&&r)throw new Error("only one of target or targets can be specified");return r?(f=l["pino-worker"]||L2(__dirname,"worker.js"),o.targets=r.map(_=>({..._,target:d(_.target)}))):t&&(f=l["pino-pipeline-worker"]||L2(__dirname,"worker-pipeline.js"),o.targets=t.map(_=>({..._,target:d(_.target)}))),n&&(o.levels=n),i&&(o.dedupe=i),Unt(d(f),o,a);function d(_){if(_=l[_]||_,$nt(_)||_.indexOf("file://")===0)return _;if(_==="pino/file")return L2(__dirname,"..","file.js");let m;for(let g of c)try{let y=g==="node:repl"?process.cwd()+Dnt:g;m=Rnt(y).resolve(_);break}catch{continue}if(!m)throw new Error(`unable to determine transport target for "${_}"`);return m}s(d,"fixTarget")}s(Fnt,"transport");Die.exports=Fnt});var TT=h((IUt,Vie)=>{"use strict";var Lie=yie(),{mapHttpRequest:knt,mapHttpResponse:Bnt}=S2(),x2=wie(),jie=D2(),{lsCacheSym:Gnt,chindingsSym:xie,writeSym:Mie,serializersSym:qie,formatOptsSym:Uie,endSym:Vnt,stringifiersSym:Fie,stringifySym:kie,stringifySafeSym:q2,wildcardFirstSym:Bie,nestedKeySym:znt,formattersSym:Gie,messageKeySym:Hnt,errorKeySym:Knt,nestedKeyStrSym:Wnt,msgPrefixSym:IT}=jm(),{isMainThread:Ynt}=require("worker_threads"),Jnt=M2();function Mm(){}s(Mm,"noop");function Xnt(e,t){if(!t)return r;return s(function(...i){t.call(this,i,r,e)},"hookWrappedLog");function r(n,...i){if(typeof n=="object"){let o=n;n!==null&&(n.method&&n.headers&&n.socket?n=knt(n):typeof n.setHeader=="function"&&(n=Bnt(n)));let a;o===null&&i.length===0?a=[null]:(o=i.shift(),a=i),typeof this[IT]=="string"&&o!==void 0&&o!==null&&(o=this[IT]+o),this[Mie](n,Lie(o,a,this[Uie]),e)}else{let o=n===void 0?i.shift():n;typeof this[IT]=="string"&&o!==void 0&&o!==null&&(o=this[IT]+o),this[Mie](null,Lie(o,i,this[Uie]),e)}}}s(Xnt,"genLog");function U2(e){let t="",r=0,n=!1,i=255,o=e.length;if(o>100)return JSON.stringify(e);for(var a=0;a<o&&i>=32;a++)i=e.charCodeAt(a),(i===34||i===92)&&(t+=e.slice(r,a)+"\\",r=a,n=!0);return n?t+=e.slice(r):t=e,i<32?JSON.stringify(e):'"'+t+'"'}s(U2,"asString");function Qnt(e,t,r,n){let i=this[kie],o=this[q2],a=this[Fie],u=this[Vnt],c=this[xie],l=this[qie],f=this[Gie],d=this[Hnt],_=this[Knt],m=this[Gnt][r]+n;m=m+c;let g;f.log&&(e=f.log(e));let y=a[Bie],b="";for(let S in e)if(g=e[S],Object.prototype.hasOwnProperty.call(e,S)&&g!==void 0){l[S]?g=l[S](g):S===_&&l.err&&(g=l.err(g));let O=a[S]||y;switch(typeof g){case"undefined":case"function":continue;case"number":Number.isFinite(g)===!1&&(g=null);case"boolean":O&&(g=O(g));break;case"string":g=(O||U2)(g);break;default:g=(O||i)(g,o)}if(g===void 0)continue;let I=U2(S);b+=","+I+":"+g}let E="";if(t!==void 0){g=l[d]?l[d](t):t;let S=a[d]||y;switch(typeof g){case"function":break;case"number":Number.isFinite(g)===!1&&(g=null);case"boolean":S&&(g=S(g)),E=',"'+d+'":'+g;break;case"string":g=(S||U2)(g),E=',"'+d+'":'+g;break;default:g=(S||i)(g,o),E=',"'+d+'":'+g}}return this[znt]&&b?m+this[Wnt]+b.slice(1)+"}"+E+u:m+b+E+u}s(Qnt,"asJson");function Znt(e,t){let r,n=e[xie],i=e[kie],o=e[q2],a=e[Fie],u=a[Bie],c=e[qie],l=e[Gie].bindings;t=l(t);for(let f in t)if(r=t[f],(f!=="level"&&f!=="serializers"&&f!=="formatters"&&f!=="customLevels"&&t.hasOwnProperty(f)&&r!==void 0)===!0){if(r=c[f]?c[f](r):r,r=(a[f]||u||i)(r,o),r===void 0)continue;n+=',"'+f+'":'+r}return n}s(Znt,"asChindings");function eit(e){return e.write!==e.constructor.prototype.write}s(eit,"hasBeenTampered");var tit=process.env.NODE_V8_COVERAGE||process.env.V8_COVERAGE;function wT(e){let t=new x2(e);return t.on("error",r),!tit&&!e.sync&&Ynt&&(jie.register(t,rit),t.on("close",function(){jie.unregister(t)})),t;function r(n){if(n.code==="EPIPE"){t.write=Mm,t.end=Mm,t.flushSync=Mm,t.destroy=Mm;return}t.removeListener("error",r),t.emit("error",n)}s(r,"filterBrokenPipe")}s(wT,"buildSafeSonicBoom");function rit(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}s(rit,"autoEnd");function nit(e){return s(function(r,n,i={},o){if(typeof i=="string")o=wT({dest:i}),i={};else if(typeof o=="string"){if(i&&i.transport)throw Error("only one of option.transport or stream can be specified");o=wT({dest:o})}else if(i instanceof x2||i.writable||i._writableState)o=i,i={};else if(i.transport){if(i.transport instanceof x2||i.transport.writable||i.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(i.transport.targets&&i.transport.targets.length&&i.formatters&&typeof i.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let c;i.customLevels&&(c=i.useOnlyCustomLevels?i.customLevels:Object.assign({},i.levels,i.customLevels)),o=Jnt({caller:n,...i.transport,levels:c})}if(i=Object.assign({},e,i),i.serializers=Object.assign({},e.serializers,i.serializers),i.formatters=Object.assign({},e.formatters,i.formatters),i.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:a,onChild:u}=i;return a===!1&&(i.level="silent"),u||(i.onChild=Mm),o||(eit(process.stdout)?o=process.stdout:o=wT({fd:process.stdout.fd||1})),{opts:i,stream:o}},"normalizeArgs")}s(nit,"createArgsNormalizer");function iit(e,t){try{return JSON.stringify(e)}catch{try{return(t||this[q2])(e)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}s(iit,"stringify");function sit(e,t,r){return{level:e,bindings:t,log:r}}s(sit,"buildFormatters");function oit(e){let t=Number(e);return typeof e=="string"&&Number.isFinite(t)?t:e===void 0?1:e}s(oit,"normalizeDestFileDescriptor");Vie.exports={noop:Mm,buildSafeSonicBoom:wT,asChindings:Znt,asJson:Qnt,genLog:Xnt,createArgsNormalizer:nit,stringify:iit,buildFormatters:sit,normalizeDestFileDescriptor:oit}});var NT=h((TUt,zie)=>{var ait={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},uit={ASC:"ASC",DESC:"DESC"};zie.exports={DEFAULT_LEVELS:ait,SORTING_ORDER:uit}});var B2=h((NUt,Yie)=>{"use strict";var{lsCacheSym:cit,levelValSym:F2,useOnlyCustomLevelsSym:lit,streamSym:fit,formattersSym:dit,hooksSym:pit,levelCompSym:Hie}=jm(),{noop:hit,genLog:$d}=TT(),{DEFAULT_LEVELS:ba,SORTING_ORDER:Kie}=NT(),Wie={fatal:e=>{let t=$d(ba.fatal,e);return function(...r){let n=this[fit];if(t.call(this,...r),typeof n.flushSync=="function")try{n.flushSync()}catch{}}},error:e=>$d(ba.error,e),warn:e=>$d(ba.warn,e),info:e=>$d(ba.info,e),debug:e=>$d(ba.debug,e),trace:e=>$d(ba.trace,e)},k2=Object.keys(ba).reduce((e,t)=>(e[ba[t]]=t,e),{}),mit=Object.keys(k2).reduce((e,t)=>(e[t]='{"level":'+Number(t),e),{});function _it(e){let t=e[dit].level,{labels:r}=e.levels,n={};for(let i in r){let o=t(r[i],Number(i));n[i]=JSON.stringify(o).slice(0,-1)}return e[cit]=n,e}s(_it,"genLsCache");function git(e,t){if(t)return!1;switch(e){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}s(git,"isStandardLevel");function yit(e){let{labels:t,values:r}=this.levels;if(typeof e=="number"){if(t[e]===void 0)throw Error("unknown level value"+e);e=t[e]}if(r[e]===void 0)throw Error("unknown level "+e);let n=this[F2],i=this[F2]=r[e],o=this[lit],a=this[Hie],u=this[pit].logMethod;for(let c in r){if(a(r[c],i)===!1){this[c]=hit;continue}this[c]=git(c,o)?Wie[c](u):$d(r[c],u)}this.emit("level-change",e,i,t[n],n,this)}s(yit,"setLevel");function Eit(e){let{levels:t,levelVal:r}=this;return t&&t.labels?t.labels[r]:""}s(Eit,"getLevel");function bit(e){let{values:t}=this.levels,r=t[e];return r!==void 0&&this[Hie](r,this[F2])}s(bit,"isLevelEnabled");function Sit(e,t,r){return e===Kie.DESC?t<=r:t>=r}s(Sit,"compareLevel");function vit(e){return typeof e=="string"?Sit.bind(null,e):e}s(vit,"genLevelComparison");function Oit(e=null,t=!1){let r=e?Object.keys(e).reduce((o,a)=>(o[e[a]]=a,o),{}):null,n=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:k2,r),i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:ba,e);return{labels:n,values:i}}s(Oit,"mappings");function Pit(e,t,r){if(typeof e=="number"){if(![].concat(Object.keys(t||{}).map(o=>t[o]),r?[]:Object.keys(k2).map(o=>+o),1/0).includes(e))throw Error(`default level:${e} must be included in custom levels`);return}let n=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:ba,t);if(!(e in n))throw Error(`default level:${e} must be included in custom levels`)}s(Pit,"assertDefaultLevelFound");function Iit(e,t){let{labels:r,values:n}=e;for(let i in t){if(i in n)throw Error("levels cannot be overridden");if(t[i]in r)throw Error("pre-existing level values cannot be used for new levels")}}s(Iit,"assertNoLevelCollisions");function wit(e){if(typeof e!="function"&&!(typeof e=="string"&&Object.values(Kie).includes(e)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}s(wit,"assertLevelComparison");Yie.exports={initialLsCache:mit,genLsCache:_it,levelMethods:Wie,getLevel:Eit,setLevel:yit,isLevelEnabled:bit,mappings:Oit,assertNoLevelCollisions:Iit,assertDefaultLevelFound:Pit,genLevelComparison:vit,assertLevelComparison:wit}});var G2=h((RUt,Jie)=>{"use strict";Jie.exports={version:"8.19.0"}});var ase=h(($Ut,ose)=>{"use strict";var{EventEmitter:Tit}=require("events"),{lsCacheSym:Nit,levelValSym:Ait,setLevelSym:z2,getLevelSym:Xie,chindingsSym:H2,parsedChindingsSym:Rit,mixinSym:Cit,asJsonSym:rse,writeSym:$it,mixinMergeStrategySym:Dit,timeSym:Lit,timeSliceIndexSym:jit,streamSym:nse,serializersSym:Dd,formattersSym:V2,errorKeySym:Mit,messageKeySym:Uit,useOnlyCustomLevelsSym:xit,needsMetadataGsym:qit,redactFmtSym:Fit,stringifySym:kit,formatOptsSym:Bit,stringifiersSym:Git,msgPrefixSym:Qie}=jm(),{getLevel:Vit,setLevel:zit,isLevelEnabled:Hit,mappings:Kit,initialLsCache:Wit,genLsCache:Yit,assertNoLevelCollisions:Jit}=B2(),{asChindings:ise,asJson:Xit,buildFormatters:Zie,stringify:ese}=TT(),{version:Qit}=G2(),Zit=N2(),est=class{static{s(this,"Pino")}},sse={constructor:est,child:tst,bindings:rst,setBindings:nst,flush:ast,isLevelEnabled:Hit,version:Qit,get level(){return this[Xie]()},set level(e){this[z2](e)},get levelVal(){return this[Ait]},set levelVal(e){throw Error("levelVal is read-only")},[Nit]:Wit,[$it]:sst,[rse]:Xit,[Xie]:Vit,[z2]:zit};Object.setPrototypeOf(sse,Tit.prototype);ose.exports=function(){return Object.create(sse)};var tse=s(e=>e,"resetChildingsFormatter");function tst(e,t){if(!e)throw Error("missing bindings for child Pino");t=t||{};let r=this[Dd],n=this[V2],i=Object.create(this);if(t.hasOwnProperty("serializers")===!0){i[Dd]=Object.create(null);for(let f in r)i[Dd][f]=r[f];let c=Object.getOwnPropertySymbols(r);for(var o=0;o<c.length;o++){let f=c[o];i[Dd][f]=r[f]}for(let f in t.serializers)i[Dd][f]=t.serializers[f];let l=Object.getOwnPropertySymbols(t.serializers);for(var a=0;a<l.length;a++){let f=l[a];i[Dd][f]=t.serializers[f]}}else i[Dd]=r;if(t.hasOwnProperty("formatters")){let{level:c,bindings:l,log:f}=t.formatters;i[V2]=Zie(c||n.level,l||tse,f||n.log)}else i[V2]=Zie(n.level,tse,n.log);if(t.hasOwnProperty("customLevels")===!0&&(Jit(this.levels,t.customLevels),i.levels=Kit(t.customLevels,i[xit]),Yit(i)),typeof t.redact=="object"&&t.redact!==null||Array.isArray(t.redact)){i.redact=t.redact;let c=Zit(i.redact,ese),l={stringify:c[Fit]};i[kit]=ese,i[Git]=c,i[Bit]=l}typeof t.msgPrefix=="string"&&(i[Qie]=(this[Qie]||"")+t.msgPrefix),i[H2]=ise(i,e);let u=t.level||this.level;return i[z2](u),this.onChild(i),i}s(tst,"child");function rst(){let t=`{${this[H2].substr(1)}}`,r=JSON.parse(t);return delete r.pid,delete r.hostname,r}s(rst,"bindings");function nst(e){let t=ise(this,e);this[H2]=t,delete this[Rit]}s(nst,"setBindings");function ist(e,t){return Object.assign(t,e)}s(ist,"defaultMixinMergeStrategy");function sst(e,t,r){let n=this[Lit](),i=this[Cit],o=this[Mit],a=this[Uit],u=this[Dit]||ist,c;e==null?c={}:e instanceof Error?(c={[o]:e},t===void 0&&(t=e.message)):(c=e,t===void 0&&e[a]===void 0&&e[o]&&(t=e[o].message)),i&&(c=u(c,i(c,r,this)));let l=this[rse](c,t,r,n),f=this[nse];f[qit]===!0&&(f.lastLevel=r,f.lastObj=c,f.lastMsg=t,f.lastTime=n.slice(this[jit]),f.lastLogger=this),f.write(l)}s(sst,"write");function ost(){}s(ost,"noop");function ast(e){if(e!=null&&typeof e!="function")throw Error("callback must be a function");let t=this[nse];typeof t.flush=="function"?t.flush(e||ost):e&&e()}s(ast,"flush")});var dse=h((J2,fse)=>{"use strict";var{hasOwnProperty:AT}=Object.prototype,jd=Y2();jd.configure=Y2;jd.stringify=jd;jd.default=jd;J2.stringify=jd;J2.configure=Y2;fse.exports=jd;var ust=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;function zc(e){return e.length<5e3&&!ust.test(e)?`"${e}"`:JSON.stringify(e)}s(zc,"strEscape");function K2(e){if(e.length>200)return e.sort();for(let t=1;t<e.length;t++){let r=e[t],n=t;for(;n!==0&&e[n-1]>r;)e[n]=e[n-1],n--;e[n]=r}return e}s(K2,"insertSort");var cst=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function W2(e){return cst.call(e)!==void 0&&e.length!==0}s(W2,"isTypedArrayWithEntries");function use(e,t,r){e.length<r&&(r=e.length);let n=t===","?"":" ",i=`"0":${n}${e[0]}`;for(let o=1;o<r;o++)i+=`${t}"${o}":${n}${e[o]}`;return i}s(use,"stringifyTypedArray");function lst(e){if(AT.call(e,"circularValue")){let t=e.circularValue;if(typeof t=="string")return`"${t}"`;if(t==null)return t;if(t===Error||t===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}s(lst,"getCircularValueOption");function cse(e,t){let r;if(AT.call(e,t)&&(r=e[t],typeof r!="boolean"))throw new TypeError(`The "${t}" argument must be of type boolean`);return r===void 0?!0:r}s(cse,"getBooleanOption");function lse(e,t){let r;if(AT.call(e,t)){if(r=e[t],typeof r!="number")throw new TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${t}" argument must be an integer`);if(r<1)throw new RangeError(`The "${t}" argument must be >= 1`)}return r===void 0?1/0:r}s(lse,"getPositiveIntegerOption");function Ld(e){return e===1?"1 item":`${e} items`}s(Ld,"getItemCount");function fst(e){let t=new Set;for(let r of e)(typeof r=="string"||typeof r=="number")&&t.add(String(r));return t}s(fst,"getUniqueReplacerSet");function dst(e){if(AT.call(e,"strict")){let t=e.strict;if(typeof t!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(t)return r=>{let n=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(n+=` (${r.toString()})`),new Error(n)}}}s(dst,"getStrictOption");function Y2(e){e={...e};let t=dst(e);t&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let r=lst(e),n=cse(e,"bigint"),i=cse(e,"deterministic"),o=lse(e,"maximumDepth"),a=lse(e,"maximumBreadth");function u(_,m,g,y,b,E){let S=m[_];switch(typeof S=="object"&&S!==null&&typeof S.toJSON=="function"&&(S=S.toJSON(_)),S=y.call(m,_,S),typeof S){case"string":return zc(S);case"object":{if(S===null)return"null";if(g.indexOf(S)!==-1)return r;let O="",I=",",w=E;if(Array.isArray(S)){if(S.length===0)return"[]";if(o<g.length+1)return'"[Array]"';g.push(S),b!==""&&(E+=b,O+=`
|
|
272
|
+
`}s(prt,"restoreTmpl")});var oie=h((oUt,sie)=>{"use strict";sie.exports=hrt;function hrt(e){let{secret:t,censor:r,compileRestore:n,serialize:i,groupRedact:o,nestedRedact:a,wildcards:u,wcLen:c}=e,l=[{secret:t,censor:r,compileRestore:n}];return i!==!1&&l.push({serialize:i}),c>0&&l.push({groupRedact:o,nestedRedact:a,wildcards:u,wcLen:c}),Object.assign(...l)}s(hrt,"state")});var cie=h((uUt,uie)=>{"use strict";var aie=Yne(),mrt=Qne(),_rt=eie(),grt=iie(),{groupRedact:yrt,nestedRedact:Ert}=O2(),brt=oie(),Srt=ET(),vrt=aie(),P2=s(e=>e,"noop");P2.restore=P2;var Ort="[REDACTED]";I2.rx=Srt;I2.validator=aie;uie.exports=I2;function I2(e={}){let t=Array.from(new Set(e.paths||[])),r="serialize"in e&&(e.serialize===!1||typeof e.serialize=="function")?e.serialize:JSON.stringify,n=e.remove;if(n===!0&&r!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let i=n===!0?void 0:"censor"in e?e.censor:Ort,o=typeof i=="function",a=o&&i.length>1;if(t.length===0)return r||P2;vrt({paths:t,serialize:r,censor:i});let{wildcards:u,wcLen:c,secret:l}=mrt({paths:t,censor:i}),f=grt({secret:l,wcLen:c}),d="strict"in e?e.strict:!0;return _rt({secret:l,wcLen:c,serialize:r,strict:d,isCensorFct:o,censorFctTakesPath:a},brt({secret:l,censor:i,compileRestore:f,serialize:r,groupRedact:yrt,nestedRedact:Ert,wildcards:u,wcLen:c}))}s(I2,"fastRedact")});var jm=h((lUt,lie)=>{"use strict";var Prt=Symbol("pino.setLevel"),Irt=Symbol("pino.getLevel"),wrt=Symbol("pino.levelVal"),Trt=Symbol("pino.levelComp"),Nrt=Symbol("pino.useLevelLabels"),Art=Symbol("pino.useOnlyCustomLevels"),Rrt=Symbol("pino.mixin"),Crt=Symbol("pino.lsCache"),$rt=Symbol("pino.chindings"),Drt=Symbol("pino.asJson"),Lrt=Symbol("pino.write"),jrt=Symbol("pino.redactFmt"),Mrt=Symbol("pino.time"),Urt=Symbol("pino.timeSliceIndex"),xrt=Symbol("pino.stream"),qrt=Symbol("pino.stringify"),Frt=Symbol("pino.stringifySafe"),krt=Symbol("pino.stringifiers"),Brt=Symbol("pino.end"),Grt=Symbol("pino.formatOpts"),Vrt=Symbol("pino.messageKey"),zrt=Symbol("pino.errorKey"),Hrt=Symbol("pino.nestedKey"),Krt=Symbol("pino.nestedKeyStr"),Wrt=Symbol("pino.mixinMergeStrategy"),Yrt=Symbol("pino.msgPrefix"),Jrt=Symbol("pino.wildcardFirst"),Xrt=Symbol.for("pino.serializers"),Qrt=Symbol.for("pino.formatters"),Zrt=Symbol.for("pino.hooks"),ent=Symbol.for("pino.metadata");lie.exports={setLevelSym:Prt,getLevelSym:Irt,levelValSym:wrt,levelCompSym:Trt,useLevelLabelsSym:Nrt,mixinSym:Rrt,lsCacheSym:Crt,chindingsSym:$rt,asJsonSym:Drt,writeSym:Lrt,serializersSym:Xrt,redactFmtSym:jrt,timeSym:Mrt,timeSliceIndexSym:Urt,streamSym:xrt,stringifySym:qrt,stringifySafeSym:Frt,stringifiersSym:krt,endSym:Brt,formatOptsSym:Grt,messageKeySym:Vrt,errorKeySym:zrt,nestedKeySym:Hrt,wildcardFirstSym:Jrt,needsMetadataGsym:ent,useOnlyCustomLevelsSym:Art,formattersSym:Qrt,hooksSym:Zrt,nestedKeyStrSym:Krt,mixinMergeStrategySym:Wrt,msgPrefixSym:Yrt}});var N2=h((fUt,hie)=>{"use strict";var T2=cie(),{redactFmtSym:tnt,wildcardFirstSym:ST}=jm(),{rx:w2,validator:rnt}=T2,fie=rnt({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:e=>`pino \u2013 redact paths array contains an invalid path (${e})`}),die="[Redacted]",pie=!1;function nnt(e,t){let{paths:r,censor:n}=int(e),i=r.reduce((u,c)=>{w2.lastIndex=0;let l=w2.exec(c),f=w2.exec(c),d=l[1]!==void 0?l[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):l[0];if(d==="*"&&(d=ST),f===null)return u[d]=null,u;if(u[d]===null)return u;let{index:_}=f,m=`${c.substr(_,c.length-1)}`;return u[d]=u[d]||[],d!==ST&&u[d].length===0&&u[d].push(...u[ST]||[]),d===ST&&Object.keys(u).forEach(function(g){u[g]&&u[g].push(m)}),u[d].push(m),u},{}),o={[tnt]:T2({paths:r,censor:n,serialize:t,strict:pie})},a=s((...u)=>t(typeof n=="function"?n(...u):n),"topCensor");return[...Object.keys(i),...Object.getOwnPropertySymbols(i)].reduce((u,c)=>{if(i[c]===null)u[c]=l=>a(l,[c]);else{let l=typeof n=="function"?(f,d)=>n(f,[c,...d]):n;u[c]=T2({paths:i[c],censor:l,serialize:t,strict:pie})}return u},o)}s(nnt,"redaction");function int(e){if(Array.isArray(e))return e={paths:e,censor:die},fie(e),e;let{paths:t,censor:r=die,remove:n}=e;if(Array.isArray(t)===!1)throw Error("pino \u2013 redact must contain an array of strings");return n===!0&&(r=void 0),fie({paths:t,censor:r}),{paths:t,censor:r}}s(int,"handle");hie.exports=nnt});var _ie=h((pUt,mie)=>{"use strict";var snt=s(()=>"","nullTime"),ont=s(()=>`,"time":${Date.now()}`,"epochTime"),ant=s(()=>`,"time":${Math.round(Date.now()/1e3)}`,"unixTime"),unt=s(()=>`,"time":"${new Date(Date.now()).toISOString()}"`,"isoTime");mie.exports={nullTime:snt,epochTime:ont,unixTime:ant,isoTime:unt}});var yie=h((mUt,gie)=>{"use strict";function cnt(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}s(cnt,"tryStringify");gie.exports=lnt;function lnt(e,t,r){var n=r&&r.stringify||cnt,i=1;if(typeof e=="object"&&e!==null){var o=t.length+i;if(o===1)return e;var a=new Array(o);a[0]=n(e);for(var u=1;u<o;u++)a[u]=n(t[u]);return a.join(" ")}if(typeof e!="string")return e;var c=t.length;if(c===0)return e;for(var l="",f=1-i,d=-1,_=e&&e.length||0,m=0;m<_;){if(e.charCodeAt(m)===37&&m+1<_){switch(d=d>-1?d:0,e.charCodeAt(m+1)){case 100:case 102:if(f>=c||t[f]==null)break;d<m&&(l+=e.slice(d,m)),l+=Number(t[f]),d=m+2,m++;break;case 105:if(f>=c||t[f]==null)break;d<m&&(l+=e.slice(d,m)),l+=Math.floor(Number(t[f])),d=m+2,m++;break;case 79:case 111:case 106:if(f>=c||t[f]===void 0)break;d<m&&(l+=e.slice(d,m));var g=typeof t[f];if(g==="string"){l+="'"+t[f]+"'",d=m+2,m++;break}if(g==="function"){l+=t[f].name||"<anonymous>",d=m+2,m++;break}l+=n(t[f]),d=m+2,m++;break;case 115:if(f>=c)break;d<m&&(l+=e.slice(d,m)),l+=String(t[f]),d=m+2,m++;break;case 37:d<m&&(l+=e.slice(d,m)),l+="%",d=m+2,m++,f--;break}++f}++m}return d===-1?e:(d<_&&(l+=e.slice(d)),l)}s(lnt,"format")});var R2=h((gUt,A2)=>{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let t=function(r){if((r>0&&r<1/0)===!1)throw typeof r!="number"&&typeof r!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(e,0,0,Number(r))};s(t,"sleep");let e=new Int32Array(new SharedArrayBuffer(4));A2.exports=t}else{let e=function(t){if((t>0&&t<1/0)===!1)throw typeof t!="number"&&typeof t!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let n=Date.now()+Number(t);for(;n>Date.now(););};s(e,"sleep"),A2.exports=e}});var wie=h((EUt,Iie)=>{"use strict";var _r=require("fs"),fnt=require("events"),dnt=require("util").inherits,Eie=require("path"),$2=R2(),vT=100,OT=Buffer.allocUnsafe(0),pnt=16*1024,bie="buffer",Sie="utf8";function vie(e,t){t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;function r(o,a){if(o){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",o)}):t.emit("error",o);return}t.fd=a,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!(t._reopening||t.destroyed)&&(!t._writing&&t._len>t.minLength||t._flushPending)&&t._actualWrite()}s(r,"fileOpened");let n=t.append?"a":"w",i=t.mode;if(t.sync)try{t.mkdir&&_r.mkdirSync(Eie.dirname(e),{recursive:!0});let o=_r.openSync(e,n,i);r(null,o)}catch(o){throw r(o),o}else t.mkdir?_r.mkdir(Eie.dirname(e),{recursive:!0},o=>{if(o)return r(o);_r.open(e,n,i,r)}):_r.open(e,n,i,r)}s(vie,"openFile");function Oo(e){if(!(this instanceof Oo))return new Oo(e);let{fd:t,dest:r,minLength:n,maxLength:i,maxWrite:o,sync:a,append:u=!0,mkdir:c,retryEAGAIN:l,fsync:f,contentMode:d,mode:_}=e||{};t=t||r,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(n||0,16387),this.file=null,this.destroyed=!1,this.minLength=n||0,this.maxLength=i||0,this.maxWrite=o||pnt,this.sync=a||!1,this.writable=!0,this._fsync=f||!1,this.append=u||!1,this.mode=_,this.retryEAGAIN=l||(()=>!0),this.mkdir=c||!1;let m,g;if(d===bie)this._writingBuf=OT,this.write=_nt,this.flush=ynt,this.flushSync=bnt,this._actualWrite=vnt,m=s(()=>_r.writeSync(this.fd,this._writingBuf),"fsWriteSync"),g=s(()=>_r.write(this.fd,this._writingBuf,this.release),"fsWrite");else if(d===void 0||d===Sie)this._writingBuf="",this.write=mnt,this.flush=gnt,this.flushSync=Ent,this._actualWrite=Snt,m=s(()=>_r.writeSync(this.fd,this._writingBuf,"utf8"),"fsWriteSync"),g=s(()=>_r.write(this.fd,this._writingBuf,"utf8",this.release),"fsWrite");else throw new Error(`SonicBoom supports "${Sie}" and "${bie}", but passed ${d}`);if(typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")vie(t,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(y,b)=>{if(y){if((y.code==="EAGAIN"||y.code==="EBUSY")&&this.retryEAGAIN(y,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{$2(vT),this.release(void 0,0)}catch(O){this.release(O)}else setTimeout(g,vT);else this._writing=!1,this.emit("error",y);return}this.emit("write",b);let E=C2(this._writingBuf,this._len,b);if(this._len=E.len,this._writingBuf=E.writingBuf,this._writingBuf.length){if(!this.sync){g();return}try{do{let O=m(),I=C2(this._writingBuf,this._len,O);this._len=I.len,this._writingBuf=I.writingBuf}while(this._writingBuf.length)}catch(O){this.release(O);return}}this._fsync&&_r.fsyncSync(this.fd);let v=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):v>this.minLength?this._actualWrite():this._ending?v>0?this._actualWrite():(this._writing=!1,PT(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(hnt,this)):this.emit("drain"))},this.on("newListener",function(y){y==="drain"&&(this._asyncDrainScheduled=!1)})}s(Oo,"SonicBoom");function C2(e,t,r){return typeof e=="string"&&Buffer.byteLength(e)!==r&&(r=Buffer.from(e).subarray(0,r).toString().length),t=Math.max(t-r,0),e=e.slice(r),{writingBuf:e,len:t}}s(C2,"releaseWritingBuf");function hnt(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}s(hnt,"emitDrain");dnt(Oo,fnt);function Oie(e,t){return e.length===0?OT:e.length===1?e[0]:Buffer.concat(e,t)}s(Oie,"mergeBuf");function mnt(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||r[r.length-1].length+e.length>this.maxWrite?r.push(""+e):r[r.length-1]+=e,this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}s(mnt,"write");function _nt(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs,n=this._lens;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||n[n.length-1]+e.length>this.maxWrite?(r.push([e]),n.push(e.length)):(r[r.length-1].push(e),n[n.length-1]+=e.length),this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}s(_nt,"writeBuffer");function Pie(e){this._flushPending=!0;let t=s(()=>{this._fsync?(this._flushPending=!1,e()):_r.fsync(this.fd,n=>{this._flushPending=!1,e(n)}),this.off("error",r)},"onDrain"),r=s(n=>{this._flushPending=!1,e(n),this.off("drain",t)},"onError");this.once("drain",t),this.once("error",r)}s(Pie,"callFlushCallbackOnDrain");function gnt(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e?.();return}e&&Pie.call(this,e),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}s(gnt,"flush");function ynt(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e?.();return}e&&Pie.call(this,e),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}s(ynt,"flushBuffer");Oo.prototype.reopen=function(e){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen(e)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&_r.close(t,r=>{if(r)return this.emit("error",r)})}),vie(e||this.file,this)};Oo.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}this._ending||(this._ending=!0,!this._writing&&(this._len>0&&this.fd>=0?this._actualWrite():PT(this)))};function Ent(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");let e="";for(;this._bufs.length||e;){e.length<=0&&(e=this._bufs[0]);try{let t=_r.writeSync(this.fd,e,"utf8"),r=C2(e,this._len,t);e=r.writingBuf,this._len=r.len,e.length<=0&&this._bufs.shift()}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;$2(vT)}}try{_r.fsyncSync(this.fd)}catch{}}s(Ent,"flushSync");function bnt(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift([this._writingBuf]),this._writingBuf=OT);let e=OT;for(;this._bufs.length||e.length;){e.length<=0&&(e=Oie(this._bufs[0],this._lens[0]));try{let t=_r.writeSync(this.fd,e);e=e.subarray(t),this._len=Math.max(this._len-t,0),e.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;$2(vT)}}}s(bnt,"flushBufferSync");Oo.prototype.destroy=function(){this.destroyed||PT(this)};function Snt(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf||this._bufs.shift()||"",this.sync)try{let t=_r.writeSync(this.fd,this._writingBuf,"utf8");e(null,t)}catch(t){e(t)}else _r.write(this.fd,this._writingBuf,"utf8",e)}s(Snt,"actualWrite");function vnt(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:Oie(this._bufs.shift(),this._lens.shift()),this.sync)try{let t=_r.writeSync(this.fd,this._writingBuf);e(null,t)}catch(t){e(t)}else _r.write(this.fd,this._writingBuf,e)}s(vnt,"actualWriteBuffer");function PT(e){if(e.fd===-1){e.once("ready",PT.bind(null,e));return}e.destroyed=!0,e._bufs=[],e._lens=[],_r.fsync(e.fd,t);function t(){e.fd!==1&&e.fd!==2?_r.close(e.fd,r):r()}s(t,"closeWrapped");function r(n){if(n){e.emit("error",n);return}e._ending&&!e._writing&&e.emit("finish"),e.emit("close")}s(r,"done")}s(PT,"actualClose");Oo.SonicBoom=Oo;Oo.default=Oo;Iie.exports=Oo});var D2=h((SUt,$ie)=>{"use strict";var Vc={exit:[],beforeExit:[]},Tie={exit:Pnt,beforeExit:Int},Nie=new FinalizationRegistry(wnt);function Ont(e){Vc[e].length>0||process.on(e,Tie[e])}s(Ont,"install");function Aie(e){Vc[e].length>0||process.removeListener(e,Tie[e])}s(Aie,"uninstall");function Pnt(){Rie("exit")}s(Pnt,"onExit");function Int(){Rie("beforeExit")}s(Int,"onBeforeExit");function Rie(e){for(let t of Vc[e]){let r=t.deref(),n=t.fn;r!==void 0&&n(r,e)}}s(Rie,"callRefs");function wnt(e){for(let t of["exit","beforeExit"]){let r=Vc[t].indexOf(e);Vc[t].splice(r,r+1),Aie(t)}}s(wnt,"clear");function Cie(e,t,r){if(t===void 0)throw new Error("the object can't be undefined");Ont(e);let n=new WeakRef(t);n.fn=r,Nie.register(t,n),Vc[e].push(n)}s(Cie,"_register");function Tnt(e,t){Cie("exit",e,t)}s(Tnt,"register");function Nnt(e,t){Cie("beforeExit",e,t)}s(Nnt,"registerBeforeExit");function Ant(e){Nie.unregister(e);for(let t of["exit","beforeExit"])Vc[t]=Vc[t].filter(r=>{let n=r.deref();return n&&n!==e}),Aie(t)}s(Ant,"unregister");$ie.exports={register:Tnt,registerBeforeExit:Nnt,unregister:Ant}});var M2=h((OUt,Die)=>{"use strict";var{createRequire:Rnt}=require("module"),Cnt=v2(),{join:L2,isAbsolute:$nt,sep:Dnt}=require("path"),Lnt=R2(),j2=D2(),jnt=require("thread-stream");function Mnt(e){j2.register(e,xnt),j2.registerBeforeExit(e,qnt),e.on("close",function(){j2.unregister(e)})}s(Mnt,"setupOnExit");function Unt(e,t,r){let n=new jnt({filename:e,workerData:t,workerOpts:r});n.on("ready",i),n.on("close",function(){process.removeListener("exit",o)}),process.on("exit",o);function i(){process.removeListener("exit",o),n.unref(),r.autoEnd!==!1&&Mnt(n)}s(i,"onReady");function o(){n.closed||(n.flushSync(),Lnt(100),n.end())}return s(o,"onExit"),n}s(Unt,"buildStream");function xnt(e){e.ref(),e.flushSync(),e.end(),e.once("close",function(){e.unref()})}s(xnt,"autoEnd");function qnt(e){e.flushSync()}s(qnt,"flush");function Fnt(e){let{pipeline:t,targets:r,levels:n,dedupe:i,options:o={},worker:a={},caller:u=Cnt()}=e,c=typeof u=="string"?[u]:u,l="__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{},f=e.target;if(f&&r)throw new Error("only one of target or targets can be specified");return r?(f=l["pino-worker"]||L2(__dirname,"worker.js"),o.targets=r.map(_=>({..._,target:d(_.target)}))):t&&(f=l["pino-pipeline-worker"]||L2(__dirname,"worker-pipeline.js"),o.targets=t.map(_=>({..._,target:d(_.target)}))),n&&(o.levels=n),i&&(o.dedupe=i),Unt(d(f),o,a);function d(_){if(_=l[_]||_,$nt(_)||_.indexOf("file://")===0)return _;if(_==="pino/file")return L2(__dirname,"..","file.js");let m;for(let g of c)try{let y=g==="node:repl"?process.cwd()+Dnt:g;m=Rnt(y).resolve(_);break}catch{continue}if(!m)throw new Error(`unable to determine transport target for "${_}"`);return m}s(d,"fixTarget")}s(Fnt,"transport");Die.exports=Fnt});var TT=h((IUt,Vie)=>{"use strict";var Lie=yie(),{mapHttpRequest:knt,mapHttpResponse:Bnt}=S2(),x2=wie(),jie=D2(),{lsCacheSym:Gnt,chindingsSym:xie,writeSym:Mie,serializersSym:qie,formatOptsSym:Uie,endSym:Vnt,stringifiersSym:Fie,stringifySym:kie,stringifySafeSym:q2,wildcardFirstSym:Bie,nestedKeySym:znt,formattersSym:Gie,messageKeySym:Hnt,errorKeySym:Knt,nestedKeyStrSym:Wnt,msgPrefixSym:IT}=jm(),{isMainThread:Ynt}=require("worker_threads"),Jnt=M2();function Mm(){}s(Mm,"noop");function Xnt(e,t){if(!t)return r;return s(function(...i){t.call(this,i,r,e)},"hookWrappedLog");function r(n,...i){if(typeof n=="object"){let o=n;n!==null&&(n.method&&n.headers&&n.socket?n=knt(n):typeof n.setHeader=="function"&&(n=Bnt(n)));let a;o===null&&i.length===0?a=[null]:(o=i.shift(),a=i),typeof this[IT]=="string"&&o!==void 0&&o!==null&&(o=this[IT]+o),this[Mie](n,Lie(o,a,this[Uie]),e)}else{let o=n===void 0?i.shift():n;typeof this[IT]=="string"&&o!==void 0&&o!==null&&(o=this[IT]+o),this[Mie](null,Lie(o,i,this[Uie]),e)}}}s(Xnt,"genLog");function U2(e){let t="",r=0,n=!1,i=255,o=e.length;if(o>100)return JSON.stringify(e);for(var a=0;a<o&&i>=32;a++)i=e.charCodeAt(a),(i===34||i===92)&&(t+=e.slice(r,a)+"\\",r=a,n=!0);return n?t+=e.slice(r):t=e,i<32?JSON.stringify(e):'"'+t+'"'}s(U2,"asString");function Qnt(e,t,r,n){let i=this[kie],o=this[q2],a=this[Fie],u=this[Vnt],c=this[xie],l=this[qie],f=this[Gie],d=this[Hnt],_=this[Knt],m=this[Gnt][r]+n;m=m+c;let g;f.log&&(e=f.log(e));let y=a[Bie],b="";for(let v in e)if(g=e[v],Object.prototype.hasOwnProperty.call(e,v)&&g!==void 0){l[v]?g=l[v](g):v===_&&l.err&&(g=l.err(g));let O=a[v]||y;switch(typeof g){case"undefined":case"function":continue;case"number":Number.isFinite(g)===!1&&(g=null);case"boolean":O&&(g=O(g));break;case"string":g=(O||U2)(g);break;default:g=(O||i)(g,o)}if(g===void 0)continue;let I=U2(v);b+=","+I+":"+g}let E="";if(t!==void 0){g=l[d]?l[d](t):t;let v=a[d]||y;switch(typeof g){case"function":break;case"number":Number.isFinite(g)===!1&&(g=null);case"boolean":v&&(g=v(g)),E=',"'+d+'":'+g;break;case"string":g=(v||U2)(g),E=',"'+d+'":'+g;break;default:g=(v||i)(g,o),E=',"'+d+'":'+g}}return this[znt]&&b?m+this[Wnt]+b.slice(1)+"}"+E+u:m+b+E+u}s(Qnt,"asJson");function Znt(e,t){let r,n=e[xie],i=e[kie],o=e[q2],a=e[Fie],u=a[Bie],c=e[qie],l=e[Gie].bindings;t=l(t);for(let f in t)if(r=t[f],(f!=="level"&&f!=="serializers"&&f!=="formatters"&&f!=="customLevels"&&t.hasOwnProperty(f)&&r!==void 0)===!0){if(r=c[f]?c[f](r):r,r=(a[f]||u||i)(r,o),r===void 0)continue;n+=',"'+f+'":'+r}return n}s(Znt,"asChindings");function eit(e){return e.write!==e.constructor.prototype.write}s(eit,"hasBeenTampered");var tit=process.env.NODE_V8_COVERAGE||process.env.V8_COVERAGE;function wT(e){let t=new x2(e);return t.on("error",r),!tit&&!e.sync&&Ynt&&(jie.register(t,rit),t.on("close",function(){jie.unregister(t)})),t;function r(n){if(n.code==="EPIPE"){t.write=Mm,t.end=Mm,t.flushSync=Mm,t.destroy=Mm;return}t.removeListener("error",r),t.emit("error",n)}s(r,"filterBrokenPipe")}s(wT,"buildSafeSonicBoom");function rit(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}s(rit,"autoEnd");function nit(e){return s(function(r,n,i={},o){if(typeof i=="string")o=wT({dest:i}),i={};else if(typeof o=="string"){if(i&&i.transport)throw Error("only one of option.transport or stream can be specified");o=wT({dest:o})}else if(i instanceof x2||i.writable||i._writableState)o=i,i={};else if(i.transport){if(i.transport instanceof x2||i.transport.writable||i.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(i.transport.targets&&i.transport.targets.length&&i.formatters&&typeof i.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let c;i.customLevels&&(c=i.useOnlyCustomLevels?i.customLevels:Object.assign({},i.levels,i.customLevels)),o=Jnt({caller:n,...i.transport,levels:c})}if(i=Object.assign({},e,i),i.serializers=Object.assign({},e.serializers,i.serializers),i.formatters=Object.assign({},e.formatters,i.formatters),i.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:a,onChild:u}=i;return a===!1&&(i.level="silent"),u||(i.onChild=Mm),o||(eit(process.stdout)?o=process.stdout:o=wT({fd:process.stdout.fd||1})),{opts:i,stream:o}},"normalizeArgs")}s(nit,"createArgsNormalizer");function iit(e,t){try{return JSON.stringify(e)}catch{try{return(t||this[q2])(e)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}s(iit,"stringify");function sit(e,t,r){return{level:e,bindings:t,log:r}}s(sit,"buildFormatters");function oit(e){let t=Number(e);return typeof e=="string"&&Number.isFinite(t)?t:e===void 0?1:e}s(oit,"normalizeDestFileDescriptor");Vie.exports={noop:Mm,buildSafeSonicBoom:wT,asChindings:Znt,asJson:Qnt,genLog:Xnt,createArgsNormalizer:nit,stringify:iit,buildFormatters:sit,normalizeDestFileDescriptor:oit}});var NT=h((TUt,zie)=>{var ait={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},uit={ASC:"ASC",DESC:"DESC"};zie.exports={DEFAULT_LEVELS:ait,SORTING_ORDER:uit}});var B2=h((NUt,Yie)=>{"use strict";var{lsCacheSym:cit,levelValSym:F2,useOnlyCustomLevelsSym:lit,streamSym:fit,formattersSym:dit,hooksSym:pit,levelCompSym:Hie}=jm(),{noop:hit,genLog:$d}=TT(),{DEFAULT_LEVELS:ba,SORTING_ORDER:Kie}=NT(),Wie={fatal:e=>{let t=$d(ba.fatal,e);return function(...r){let n=this[fit];if(t.call(this,...r),typeof n.flushSync=="function")try{n.flushSync()}catch{}}},error:e=>$d(ba.error,e),warn:e=>$d(ba.warn,e),info:e=>$d(ba.info,e),debug:e=>$d(ba.debug,e),trace:e=>$d(ba.trace,e)},k2=Object.keys(ba).reduce((e,t)=>(e[ba[t]]=t,e),{}),mit=Object.keys(k2).reduce((e,t)=>(e[t]='{"level":'+Number(t),e),{});function _it(e){let t=e[dit].level,{labels:r}=e.levels,n={};for(let i in r){let o=t(r[i],Number(i));n[i]=JSON.stringify(o).slice(0,-1)}return e[cit]=n,e}s(_it,"genLsCache");function git(e,t){if(t)return!1;switch(e){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}s(git,"isStandardLevel");function yit(e){let{labels:t,values:r}=this.levels;if(typeof e=="number"){if(t[e]===void 0)throw Error("unknown level value"+e);e=t[e]}if(r[e]===void 0)throw Error("unknown level "+e);let n=this[F2],i=this[F2]=r[e],o=this[lit],a=this[Hie],u=this[pit].logMethod;for(let c in r){if(a(r[c],i)===!1){this[c]=hit;continue}this[c]=git(c,o)?Wie[c](u):$d(r[c],u)}this.emit("level-change",e,i,t[n],n,this)}s(yit,"setLevel");function Eit(e){let{levels:t,levelVal:r}=this;return t&&t.labels?t.labels[r]:""}s(Eit,"getLevel");function bit(e){let{values:t}=this.levels,r=t[e];return r!==void 0&&this[Hie](r,this[F2])}s(bit,"isLevelEnabled");function Sit(e,t,r){return e===Kie.DESC?t<=r:t>=r}s(Sit,"compareLevel");function vit(e){return typeof e=="string"?Sit.bind(null,e):e}s(vit,"genLevelComparison");function Oit(e=null,t=!1){let r=e?Object.keys(e).reduce((o,a)=>(o[e[a]]=a,o),{}):null,n=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:k2,r),i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:ba,e);return{labels:n,values:i}}s(Oit,"mappings");function Pit(e,t,r){if(typeof e=="number"){if(![].concat(Object.keys(t||{}).map(o=>t[o]),r?[]:Object.keys(k2).map(o=>+o),1/0).includes(e))throw Error(`default level:${e} must be included in custom levels`);return}let n=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:ba,t);if(!(e in n))throw Error(`default level:${e} must be included in custom levels`)}s(Pit,"assertDefaultLevelFound");function Iit(e,t){let{labels:r,values:n}=e;for(let i in t){if(i in n)throw Error("levels cannot be overridden");if(t[i]in r)throw Error("pre-existing level values cannot be used for new levels")}}s(Iit,"assertNoLevelCollisions");function wit(e){if(typeof e!="function"&&!(typeof e=="string"&&Object.values(Kie).includes(e)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}s(wit,"assertLevelComparison");Yie.exports={initialLsCache:mit,genLsCache:_it,levelMethods:Wie,getLevel:Eit,setLevel:yit,isLevelEnabled:bit,mappings:Oit,assertNoLevelCollisions:Iit,assertDefaultLevelFound:Pit,genLevelComparison:vit,assertLevelComparison:wit}});var G2=h((RUt,Jie)=>{"use strict";Jie.exports={version:"8.19.0"}});var ase=h(($Ut,ose)=>{"use strict";var{EventEmitter:Tit}=require("events"),{lsCacheSym:Nit,levelValSym:Ait,setLevelSym:z2,getLevelSym:Xie,chindingsSym:H2,parsedChindingsSym:Rit,mixinSym:Cit,asJsonSym:rse,writeSym:$it,mixinMergeStrategySym:Dit,timeSym:Lit,timeSliceIndexSym:jit,streamSym:nse,serializersSym:Dd,formattersSym:V2,errorKeySym:Mit,messageKeySym:Uit,useOnlyCustomLevelsSym:xit,needsMetadataGsym:qit,redactFmtSym:Fit,stringifySym:kit,formatOptsSym:Bit,stringifiersSym:Git,msgPrefixSym:Qie}=jm(),{getLevel:Vit,setLevel:zit,isLevelEnabled:Hit,mappings:Kit,initialLsCache:Wit,genLsCache:Yit,assertNoLevelCollisions:Jit}=B2(),{asChindings:ise,asJson:Xit,buildFormatters:Zie,stringify:ese}=TT(),{version:Qit}=G2(),Zit=N2(),est=class{static{s(this,"Pino")}},sse={constructor:est,child:tst,bindings:rst,setBindings:nst,flush:ast,isLevelEnabled:Hit,version:Qit,get level(){return this[Xie]()},set level(e){this[z2](e)},get levelVal(){return this[Ait]},set levelVal(e){throw Error("levelVal is read-only")},[Nit]:Wit,[$it]:sst,[rse]:Xit,[Xie]:Vit,[z2]:zit};Object.setPrototypeOf(sse,Tit.prototype);ose.exports=function(){return Object.create(sse)};var tse=s(e=>e,"resetChildingsFormatter");function tst(e,t){if(!e)throw Error("missing bindings for child Pino");t=t||{};let r=this[Dd],n=this[V2],i=Object.create(this);if(t.hasOwnProperty("serializers")===!0){i[Dd]=Object.create(null);for(let f in r)i[Dd][f]=r[f];let c=Object.getOwnPropertySymbols(r);for(var o=0;o<c.length;o++){let f=c[o];i[Dd][f]=r[f]}for(let f in t.serializers)i[Dd][f]=t.serializers[f];let l=Object.getOwnPropertySymbols(t.serializers);for(var a=0;a<l.length;a++){let f=l[a];i[Dd][f]=t.serializers[f]}}else i[Dd]=r;if(t.hasOwnProperty("formatters")){let{level:c,bindings:l,log:f}=t.formatters;i[V2]=Zie(c||n.level,l||tse,f||n.log)}else i[V2]=Zie(n.level,tse,n.log);if(t.hasOwnProperty("customLevels")===!0&&(Jit(this.levels,t.customLevels),i.levels=Kit(t.customLevels,i[xit]),Yit(i)),typeof t.redact=="object"&&t.redact!==null||Array.isArray(t.redact)){i.redact=t.redact;let c=Zit(i.redact,ese),l={stringify:c[Fit]};i[kit]=ese,i[Git]=c,i[Bit]=l}typeof t.msgPrefix=="string"&&(i[Qie]=(this[Qie]||"")+t.msgPrefix),i[H2]=ise(i,e);let u=t.level||this.level;return i[z2](u),this.onChild(i),i}s(tst,"child");function rst(){let t=`{${this[H2].substr(1)}}`,r=JSON.parse(t);return delete r.pid,delete r.hostname,r}s(rst,"bindings");function nst(e){let t=ise(this,e);this[H2]=t,delete this[Rit]}s(nst,"setBindings");function ist(e,t){return Object.assign(t,e)}s(ist,"defaultMixinMergeStrategy");function sst(e,t,r){let n=this[Lit](),i=this[Cit],o=this[Mit],a=this[Uit],u=this[Dit]||ist,c;e==null?c={}:e instanceof Error?(c={[o]:e},t===void 0&&(t=e.message)):(c=e,t===void 0&&e[a]===void 0&&e[o]&&(t=e[o].message)),i&&(c=u(c,i(c,r,this)));let l=this[rse](c,t,r,n),f=this[nse];f[qit]===!0&&(f.lastLevel=r,f.lastObj=c,f.lastMsg=t,f.lastTime=n.slice(this[jit]),f.lastLogger=this),f.write(l)}s(sst,"write");function ost(){}s(ost,"noop");function ast(e){if(e!=null&&typeof e!="function")throw Error("callback must be a function");let t=this[nse];typeof t.flush=="function"?t.flush(e||ost):e&&e()}s(ast,"flush")});var dse=h((J2,fse)=>{"use strict";var{hasOwnProperty:AT}=Object.prototype,jd=Y2();jd.configure=Y2;jd.stringify=jd;jd.default=jd;J2.stringify=jd;J2.configure=Y2;fse.exports=jd;var ust=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;function zc(e){return e.length<5e3&&!ust.test(e)?`"${e}"`:JSON.stringify(e)}s(zc,"strEscape");function K2(e){if(e.length>200)return e.sort();for(let t=1;t<e.length;t++){let r=e[t],n=t;for(;n!==0&&e[n-1]>r;)e[n]=e[n-1],n--;e[n]=r}return e}s(K2,"insertSort");var cst=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function W2(e){return cst.call(e)!==void 0&&e.length!==0}s(W2,"isTypedArrayWithEntries");function use(e,t,r){e.length<r&&(r=e.length);let n=t===","?"":" ",i=`"0":${n}${e[0]}`;for(let o=1;o<r;o++)i+=`${t}"${o}":${n}${e[o]}`;return i}s(use,"stringifyTypedArray");function lst(e){if(AT.call(e,"circularValue")){let t=e.circularValue;if(typeof t=="string")return`"${t}"`;if(t==null)return t;if(t===Error||t===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}s(lst,"getCircularValueOption");function cse(e,t){let r;if(AT.call(e,t)&&(r=e[t],typeof r!="boolean"))throw new TypeError(`The "${t}" argument must be of type boolean`);return r===void 0?!0:r}s(cse,"getBooleanOption");function lse(e,t){let r;if(AT.call(e,t)){if(r=e[t],typeof r!="number")throw new TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${t}" argument must be an integer`);if(r<1)throw new RangeError(`The "${t}" argument must be >= 1`)}return r===void 0?1/0:r}s(lse,"getPositiveIntegerOption");function Ld(e){return e===1?"1 item":`${e} items`}s(Ld,"getItemCount");function fst(e){let t=new Set;for(let r of e)(typeof r=="string"||typeof r=="number")&&t.add(String(r));return t}s(fst,"getUniqueReplacerSet");function dst(e){if(AT.call(e,"strict")){let t=e.strict;if(typeof t!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(t)return r=>{let n=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(n+=` (${r.toString()})`),new Error(n)}}}s(dst,"getStrictOption");function Y2(e){e={...e};let t=dst(e);t&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let r=lst(e),n=cse(e,"bigint"),i=cse(e,"deterministic"),o=lse(e,"maximumDepth"),a=lse(e,"maximumBreadth");function u(_,m,g,y,b,E){let v=m[_];switch(typeof v=="object"&&v!==null&&typeof v.toJSON=="function"&&(v=v.toJSON(_)),v=y.call(m,_,v),typeof v){case"string":return zc(v);case"object":{if(v===null)return"null";if(g.indexOf(v)!==-1)return r;let O="",I=",",w=E;if(Array.isArray(v)){if(v.length===0)return"[]";if(o<g.length+1)return'"[Array]"';g.push(v),b!==""&&(E+=b,O+=`
|
|
273
273
|
${E}`,I=`,
|
|
274
|
-
${E}`);let de=Math.min(
|
|
275
|
-
${w}`),g.pop(),`[${O}]`}let j=Object.keys(
|
|
276
|
-
${E}`,K=" ");let re=Math.min(F,a);i&&!W2(
|
|
274
|
+
${E}`);let de=Math.min(v.length,a),te=0;for(;te<de-1;te++){let Ce=u(String(te),v,g,y,b,E);O+=Ce!==void 0?Ce:"null",O+=I}let he=u(String(te),v,g,y,b,E);if(O+=he!==void 0?he:"null",v.length-1>a){let Ce=v.length-a-1;O+=`${I}"... ${Ld(Ce)} not stringified"`}return b!==""&&(O+=`
|
|
275
|
+
${w}`),g.pop(),`[${O}]`}let j=Object.keys(v),F=j.length;if(F===0)return"{}";if(o<g.length+1)return'"[Object]"';let K="",H="";b!==""&&(E+=b,I=`,
|
|
276
|
+
${E}`,K=" ");let re=Math.min(F,a);i&&!W2(v)&&(j=K2(j)),g.push(v);for(let de=0;de<re;de++){let te=j[de],he=u(te,v,g,y,b,E);he!==void 0&&(O+=`${H}${zc(te)}:${K}${he}`,H=I)}if(F>a){let de=F-a;O+=`${H}"...":${K}"${Ld(de)} not stringified"`,H=I}return b!==""&&H.length>1&&(O=`
|
|
277
277
|
${E}${O}
|
|
278
|
-
${w}`),g.pop(),`{${O}}`}case"number":return isFinite(
|
|
278
|
+
${w}`),g.pop(),`{${O}}`}case"number":return isFinite(v)?String(v):t?t(v):"null";case"boolean":return v===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(v);default:return t?t(v):void 0}}s(u,"stringifyFnReplacer");function c(_,m,g,y,b,E){switch(typeof m=="object"&&m!==null&&typeof m.toJSON=="function"&&(m=m.toJSON(_)),typeof m){case"string":return zc(m);case"object":{if(m===null)return"null";if(g.indexOf(m)!==-1)return r;let v=E,O="",I=",";if(Array.isArray(m)){if(m.length===0)return"[]";if(o<g.length+1)return'"[Array]"';g.push(m),b!==""&&(E+=b,O+=`
|
|
279
279
|
${E}`,I=`,
|
|
280
280
|
${E}`);let F=Math.min(m.length,a),K=0;for(;K<F-1;K++){let re=c(String(K),m[K],g,y,b,E);O+=re!==void 0?re:"null",O+=I}let H=c(String(K),m[K],g,y,b,E);if(O+=H!==void 0?H:"null",m.length-1>a){let re=m.length-a-1;O+=`${I}"... ${Ld(re)} not stringified"`}return b!==""&&(O+=`
|
|
281
|
-
${
|
|
281
|
+
${v}`),g.pop(),`[${O}]`}g.push(m);let w="";b!==""&&(E+=b,I=`,
|
|
282
282
|
${E}`,w=" ");let j="";for(let F of y){let K=c(F,m[F],g,y,b,E);K!==void 0&&(O+=`${j}${zc(F)}:${w}${K}`,j=I)}return b!==""&&j.length>1&&(O=`
|
|
283
283
|
${E}${O}
|
|
284
|
-
${
|
|
284
|
+
${v}`),g.pop(),`{${O}}`}case"number":return isFinite(m)?String(m):t?t(m):"null";case"boolean":return m===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(m);default:return t?t(m):void 0}}s(c,"stringifyArrayReplacer");function l(_,m,g,y,b){switch(typeof m){case"string":return zc(m);case"object":{if(m===null)return"null";if(typeof m.toJSON=="function"){if(m=m.toJSON(_),typeof m!="object")return l(_,m,g,y,b);if(m===null)return"null"}if(g.indexOf(m)!==-1)return r;let E=b;if(Array.isArray(m)){if(m.length===0)return"[]";if(o<g.length+1)return'"[Array]"';g.push(m),b+=y;let K=`
|
|
285
285
|
${b}`,H=`,
|
|
286
286
|
${b}`,re=Math.min(m.length,a),de=0;for(;de<re-1;de++){let he=l(String(de),m[de],g,y,b);K+=he!==void 0?he:"null",K+=H}let te=l(String(de),m[de],g,y,b);if(K+=te!==void 0?te:"null",m.length-1>a){let he=m.length-a-1;K+=`${H}"... ${Ld(he)} not stringified"`}return K+=`
|
|
287
|
-
${E}`,g.pop(),`[${K}]`}let
|
|
288
|
-
${b}`,w="",j="",F=Math.min(O,a);W2(m)&&(w+=use(m,I,a),
|
|
287
|
+
${E}`,g.pop(),`[${K}]`}let v=Object.keys(m),O=v.length;if(O===0)return"{}";if(o<g.length+1)return'"[Object]"';b+=y;let I=`,
|
|
288
|
+
${b}`,w="",j="",F=Math.min(O,a);W2(m)&&(w+=use(m,I,a),v=v.slice(m.length),F-=m.length,j=I),i&&(v=K2(v)),g.push(m);for(let K=0;K<F;K++){let H=v[K],re=l(H,m[H],g,y,b);re!==void 0&&(w+=`${j}${zc(H)}: ${re}`,j=I)}if(O>a){let K=O-a;w+=`${j}"...": "${Ld(K)} not stringified"`,j=I}return j!==""&&(w=`
|
|
289
289
|
${b}${w}
|
|
290
|
-
${E}`),g.pop(),`{${w}}`}case"number":return isFinite(m)?String(m):t?t(m):"null";case"boolean":return m===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(m);default:return t?t(m):void 0}}s(l,"stringifyIndent");function f(_,m,g){switch(typeof m){case"string":return zc(m);case"object":{if(m===null)return"null";if(typeof m.toJSON=="function"){if(m=m.toJSON(_),typeof m!="object")return f(_,m,g);if(m===null)return"null"}if(g.indexOf(m)!==-1)return r;let y="";if(Array.isArray(m)){if(m.length===0)return"[]";if(o<g.length+1)return'"[Array]"';g.push(m);let I=Math.min(m.length,a),w=0;for(;w<I-1;w++){let F=f(String(w),m[w],g);y+=F!==void 0?F:"null",y+=","}let j=f(String(w),m[w],g);if(y+=j!==void 0?j:"null",m.length-1>a){let F=m.length-a-1;y+=`,"... ${Ld(F)} not stringified"`}return g.pop(),`[${y}]`}let b=Object.keys(m),E=b.length;if(E===0)return"{}";if(o<g.length+1)return'"[Object]"';let
|
|
290
|
+
${E}`),g.pop(),`{${w}}`}case"number":return isFinite(m)?String(m):t?t(m):"null";case"boolean":return m===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(m);default:return t?t(m):void 0}}s(l,"stringifyIndent");function f(_,m,g){switch(typeof m){case"string":return zc(m);case"object":{if(m===null)return"null";if(typeof m.toJSON=="function"){if(m=m.toJSON(_),typeof m!="object")return f(_,m,g);if(m===null)return"null"}if(g.indexOf(m)!==-1)return r;let y="";if(Array.isArray(m)){if(m.length===0)return"[]";if(o<g.length+1)return'"[Array]"';g.push(m);let I=Math.min(m.length,a),w=0;for(;w<I-1;w++){let F=f(String(w),m[w],g);y+=F!==void 0?F:"null",y+=","}let j=f(String(w),m[w],g);if(y+=j!==void 0?j:"null",m.length-1>a){let F=m.length-a-1;y+=`,"... ${Ld(F)} not stringified"`}return g.pop(),`[${y}]`}let b=Object.keys(m),E=b.length;if(E===0)return"{}";if(o<g.length+1)return'"[Object]"';let v="",O=Math.min(E,a);W2(m)&&(y+=use(m,",",a),b=b.slice(m.length),O-=m.length,v=","),i&&(b=K2(b)),g.push(m);for(let I=0;I<O;I++){let w=b[I],j=f(w,m[w],g);j!==void 0&&(y+=`${v}${zc(w)}:${j}`,v=",")}if(E>a){let I=E-a;y+=`${v}"...":"${Ld(I)} not stringified"`}return g.pop(),`{${y}}`}case"number":return isFinite(m)?String(m):t?t(m):"null";case"boolean":return m===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(m);default:return t?t(m):void 0}}s(f,"stringifySimple");function d(_,m,g){if(arguments.length>1){let y="";if(typeof g=="number"?y=" ".repeat(Math.min(g,10)):typeof g=="string"&&(y=g.slice(0,10)),m!=null){if(typeof m=="function")return u("",{"":_},[],m,y,"");if(Array.isArray(m))return c("",_,[],fst(m),y,"")}if(y.length!==0)return l("",_,[],y,"")}return f("",_,[])}return s(d,"stringify"),d}s(Y2,"configure")});var mse=h((jUt,hse)=>{"use strict";var X2=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:pse}=NT(),pst=pse.info;function hst(e,t){let r=0;e=e||[],t=t||{dedupe:!1};let n=Object.create(pse);n.silent=1/0,t.levels&&typeof t.levels=="object"&&Object.keys(t.levels).forEach(f=>{n[f]=t.levels[f]});let i={write:o,add:u,flushSync:a,end:c,minLevel:0,streams:[],clone:l,[X2]:!0,streamLevels:n};return Array.isArray(e)?e.forEach(u,i):u.call(i,e),e=null,i;function o(f){let d,_=this.lastLevel,{streams:m}=this,g=0,y;for(let b=_st(m.length,t.dedupe);yst(b,m.length,t.dedupe);b=gst(b,t.dedupe))if(d=m[b],d.level<=_){if(g!==0&&g!==d.level)break;if(y=d.stream,y[X2]){let{lastTime:E,lastMsg:v,lastObj:O,lastLogger:I}=this;y.lastLevel=_,y.lastTime=E,y.lastMsg=v,y.lastObj=O,y.lastLogger=I}y.write(f),t.dedupe&&(g=d.level)}else if(!t.dedupe)break}s(o,"write");function a(){for(let{stream:f}of this.streams)typeof f.flushSync=="function"&&f.flushSync()}s(a,"flushSync");function u(f){if(!f)return i;let d=typeof f.write=="function"||f.stream,_=f.write?f:f.stream;if(!d)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:m,streamLevels:g}=this,y;typeof f.levelVal=="number"?y=f.levelVal:typeof f.level=="string"?y=g[f.level]:typeof f.level=="number"?y=f.level:y=pst;let b={stream:_,level:y,levelVal:void 0,id:r++};return m.unshift(b),m.sort(mst),this.minLevel=m[0].level,i}s(u,"add");function c(){for(let{stream:f}of this.streams)typeof f.flushSync=="function"&&f.flushSync(),f.end()}s(c,"end");function l(f){let d=new Array(this.streams.length);for(let _=0;_<d.length;_++)d[_]={level:f,stream:this.streams[_].stream};return{write:o,add:u,minLevel:f,streams:d,clone:l,flushSync:a,[X2]:!0}}s(l,"clone")}s(hst,"multistream");function mst(e,t){return e.level-t.level}s(mst,"compareByLevel");function _st(e,t){return t?e-1:0}s(_st,"initLoopVar");function gst(e,t){return t?e-1:e+1}s(gst,"adjustLoopVar");function yst(e,t,r){return r?e>=0:e<t}s(yst,"checkLoopVar");hse.exports=hst});var Nse=h((UUt,Cs)=>{"use strict";var Est=require("os"),Ose=S2(),bst=v2(),Sst=N2(),Pse=_ie(),vst=ase(),Ise=jm(),{configure:Ost}=dse(),{assertDefaultLevelFound:Pst,mappings:wse,genLsCache:Ist,genLevelComparison:wst,assertLevelComparison:Tst}=B2(),{DEFAULT_LEVELS:Nst,SORTING_ORDER:Ast}=NT(),{createArgsNormalizer:Rst,asChindings:Cst,buildSafeSonicBoom:_se,buildFormatters:$st,stringify:Q2,normalizeDestFileDescriptor:gse,noop:Dst}=TT(),{version:Lst}=G2(),{chindingsSym:yse,redactFmtSym:jst,serializersSym:Ese,timeSym:Mst,timeSliceIndexSym:Ust,streamSym:xst,stringifySym:bse,stringifySafeSym:Z2,stringifiersSym:Sse,setLevelSym:qst,endSym:Fst,formatOptsSym:kst,messageKeySym:Bst,errorKeySym:Gst,nestedKeySym:Vst,mixinSym:zst,levelCompSym:Hst,useOnlyCustomLevelsSym:Kst,formattersSym:vse,hooksSym:Wst,nestedKeyStrSym:Yst,mixinMergeStrategySym:Jst,msgPrefixSym:Xst}=Ise,{epochTime:Tse,nullTime:Qst}=Pse,{pid:Zst}=process,eot=Est.hostname(),tot=Ose.err,rot={level:"info",levelComparison:Ast.ASC,levels:Nst,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:Zst,hostname:eot},serializers:Object.assign(Object.create(null),{err:tot}),formatters:Object.assign(Object.create(null),{bindings(e){return e},level(e,t){return{level:t}}}),hooks:{logMethod:void 0},timestamp:Tse,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},not=Rst(rot),iot=Object.assign(Object.create(null),Ose);function eF(...e){let t={},{opts:r,stream:n}=not(t,bst(),...e),{redact:i,crlf:o,serializers:a,timestamp:u,messageKey:c,errorKey:l,nestedKey:f,base:d,name:_,level:m,customLevels:g,levelComparison:y,mixin:b,mixinMergeStrategy:E,useOnlyCustomLevels:v,formatters:O,hooks:I,depthLimit:w,edgeLimit:j,onChild:F,msgPrefix:K}=r,H=Ost({maximumDepth:w,maximumBreadth:j}),re=$st(O.level,O.bindings,O.log),de=Q2.bind({[Z2]:H}),te=i?Sst(i,de):{},he=i?{stringify:te[jst]}:{stringify:de},Ce="}"+(o?`\r
|
|
291
291
|
`:`
|
|
292
|
-
`),bt=Cst.bind(null,{[yse]:"",[Ese]:a,[Sse]:te,[bse]:Q2,[Z2]:H,[vse]:re}),_t="";d!==null&&(_===void 0?_t=bt(d):_t=bt(Object.assign({},d,{name:_})));let zr=u instanceof Function?u:u?Tse:Qst,Cn=zr().indexOf(":")+1;if(
|
|
292
|
+
`),bt=Cst.bind(null,{[yse]:"",[Ese]:a,[Sse]:te,[bse]:Q2,[Z2]:H,[vse]:re}),_t="";d!==null&&(_===void 0?_t=bt(d):_t=bt(Object.assign({},d,{name:_})));let zr=u instanceof Function?u:u?Tse:Qst,Cn=zr().indexOf(":")+1;if(v&&!g)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(b&&typeof b!="function")throw Error(`Unknown mixin type "${typeof b}" - expected "function"`);if(K&&typeof K!="string")throw Error(`Unknown msgPrefix type "${typeof K}" - expected "string"`);Pst(m,g,v);let Qi=wse(g,v);Tst(y);let ja=wst(y);return Object.assign(t,{levels:Qi,[Hst]:ja,[Kst]:v,[xst]:n,[Mst]:zr,[Ust]:Cn,[bse]:Q2,[Z2]:H,[Sse]:te,[Fst]:Ce,[kst]:he,[Bst]:c,[Gst]:l,[Vst]:f,[Yst]:f?`,${JSON.stringify(f)}:{`:"",[Ese]:a,[zst]:b,[Jst]:E,[yse]:_t,[vse]:re,[Wst]:I,silent:Dst,onChild:F,[Xst]:K}),Object.setPrototypeOf(t,vst()),Ist(t),t[qst](m),t}s(eF,"pino");Cs.exports=eF;Cs.exports.destination=(e=process.stdout.fd)=>typeof e=="object"?(e.dest=gse(e.dest||process.stdout.fd),_se(e)):_se({dest:gse(e),minLength:0});Cs.exports.transport=M2();Cs.exports.multistream=mse();Cs.exports.levels=wse();Cs.exports.stdSerializers=iot;Cs.exports.stdTimeFunctions=Object.assign({},Pse);Cs.exports.symbols=Ise;Cs.exports.version=Lst;Cs.exports.default=eF;Cs.exports.pino=eF});var Ase=h(tF=>{"use strict";Object.defineProperty(tF,"__esModule",{value:!0});var bE="<unknown>";function sot(e){var t=e.split(`
|
|
293
293
|
`);return t.reduce(function(r,n){var i=uot(n)||lot(n)||pot(n)||got(n)||mot(n);return i&&r.push(i),r},[])}s(sot,"parse");var oot=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,aot=/\((\S*)(?::(\d+))(?::(\d+))\)/;function uot(e){var t=oot.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=aot.exec(t[2]);return n&&i!=null&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{file:r?null:t[2],methodName:t[1]||bE,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}s(uot,"parseChrome");var cot=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function lot(e){var t=cot.exec(e);return t?{file:t[2],methodName:t[1]||bE,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}s(lot,"parseWinjs");var fot=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,dot=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function pot(e){var t=fot.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=dot.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||bE,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}s(pot,"parseGecko");var hot=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function mot(e){var t=hot.exec(e);return t?{file:t[3],methodName:t[1]||bE,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}s(mot,"parseJSC");var _ot=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function got(e){var t=_ot.exec(e);return t?{file:t[2],methodName:t[1]||bE,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}s(got,"parseNode");tF.parse=sot});var rF=h(Sa=>{"use strict";Object.defineProperty(Sa,"__esModule",{value:!0});Sa.getLoggerContext=Sa.requestIdGenerator=Sa.REQUEST_ID_HEADER=Sa.LEGACY_REQUEST_ID_HEADER=void 0;var yot=require("crypto");Sa.LEGACY_REQUEST_ID_HEADER="zuplo-request-id";Sa.REQUEST_ID_HEADER="zp-rid";var Eot=s(e=>{let t=e.headers["zuplo-request-id"],r=e.headers["X-GitHub-Delivery"];return t?`${t}`:r?`${r}`:(0,yot.randomUUID)()},"requestIdGenerator");Sa.requestIdGenerator=Eot;function bot(e){let t=e.raw.url??"",r={};try{let n=e.headers["zuplo-user"]??e.user?.sub;n&&(r.userSub=`${n}`);let i=t.match(/(deployments)\/([a-zA-Z-0-9]*)/);i&&i!==null&&i.length>=2&&(r.deployment=i[2]);let o=t.match(/(accounts)\/([a-zA-Z-0-9]*)/);o&&o!==null&&o.length>=2&&(r.account=o[2]);let a=t.match(/(projects)\/([a-zA-Z-0-9]*)/);a&&a!==null&&a.length>=2&&(r.project=a[2])}catch{}return r}s(bot,"getLoggerContext");Sa.getLoggerContext=bot});var $se=h(Nn=>{"use strict";var Sot=Nn&&Nn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Nn,"__esModule",{value:!0});Nn.createNewLogger=Nn.logger=Nn.GOOGLE_LABELS_PROPERTY=Nn.GOOGLE_TRACE_PROPERTY=void 0;var RT=Sot(Nse()),vot=Ase(),Oot=rF();Nn.GOOGLE_TRACE_PROPERTY="logging.googleapis.com/trace";Nn.GOOGLE_LABELS_PROPERTY="logging.googleapis.com/labels";var Rse="zuplo-production";Nn.logger=Cse();function Pot(e){return JSON.stringify(e).replace(/^{/,"").replace(/}$/,"")}s(Pot,"flatJSONString");function Iot(e,t,r){if(e.length===2&&typeof e[1]=="object"&&e[1]!==null&&(e[0]=`${e[0]} ${JSON.stringify(e[1])}`),e.length>1&&typeof e[0]=="object"&&typeof e[1]=="string"){let i=e[0];i.err instanceof Error&&i.err.stack&&(e[1]=i.err.stack,delete i.err.stack)}let n;try{let i=`{${this?.[RT.default.symbols.chindingsSym]?.slice(1)||""}}`;if(n=JSON.parse(i),n){if(n.trace&&(n[Nn.GOOGLE_TRACE_PROPERTY]=`projects/${Rse}/traces/${n.trace}`),!n.trace&&n[Nn.GOOGLE_TRACE_PROPERTY]&&delete n[Nn.GOOGLE_TRACE_PROPERTY],r>=50){let u=Error().stack?.split(`
|
|
294
|
-
`).slice(2).filter(c=>!c.includes("node_modules/pino")&&!c.includes("node_modules\\pino")&&!c.includes("node_modules/launchdarkly-node-server-sdk")&&!c.includes("node_modules\\launchdarkly-node-server-sdk"))[0].substr(7);n.caller=u}return n.caller&&r<50&&delete n.caller,this[RT.default.symbols.chindingsSym]=`,${Pot(n)}`,t.apply(this,e)}}catch{}return t.apply(this,e)}s(Iot,"logMethod");function Cse({defaultLabels:e={},logStream:t,loggerOptions:r}={}){let n={level:r?.level??process.env.LOG_LEVEL??"info",redact:['requestHeaders["authorization"]','requestHeaders["cookie"]','requestHeaders["cf-access-jwt-assertion"]','requestHeaders["cf-access-client-secret"]','requestHeaders["cf-access-client-id"]','responseHeaders["authorization"]','responseHeaders["cookie"]','responseHeaders["cf-access-jwt-assertion"]','responseHeaders["cf-access-client-secret"]','responseHeaders["cf-access-client-id"]',"cookie"]},i={project_id:Rse};return n.hooks=r?.hooks??{logMethod:Iot},n.formatters={bindings(o){return i.pid=o.pid,i.hostname=o.hostname,i}},process.env.LOG_FORMAT===void 0||process.env.LOG_FORMAT==="pretty"?n.transport={target:"@zuplo/pino-pretty-configurations"}:process.env.LOG_FORMAT==="gcp"&&(n.messageKey="message",n.formatters={level(o,a){return{severity:wot(a)}},log(o){let a=e;if(o.err&&o.err.stack)try{let u=(0,vot.parse)(o.err.stack);u.length>0&&(o["logging.googleapis.com/sourceLocation"]={file:u[0].file,line:u[0].lineNumber,function:u[0].methodName})}catch{}if(o.req){let u=o.req;o.requestHeaders=u.raw.headers,o.httpRequest={...(o.httpRequest,{requestMethod:u.method,requestUrl:u.url,userAgent:u.headers["user-agent"],remoteIp:u.ip,protocol:u.protocol})};let c=u.headers["zp-rid"]??o.trace;a.requestId=c,u.headers["cf-ray"]&&(a.rayId=u.headers["cf-ray"]),u.headers["cf-worker"]&&(a.worker=u.headers["cf-worker"]);let l=(0,Oot.getLoggerContext)(u);l&&(o={...o,...l})}if(o.res){let u=o.res;o.responseHeaders=u.getHeaders(),o.httpRequest={...(o.httpRequest,{requestMethod:u.request?u.request.method:"",requestUrl:u.request?u.request.url:"",status:u.statusCode,userAgent:u.request?u.request.headers["user-agent"]:"",latency:`${Tot(u.getResponseTime()/1e3,9)}s`,remoteIp:u.request?u.request.ip:"",protocol:u.request?u.request.protocol:""})}}return o[Nn.GOOGLE_LABELS_PROPERTY]=a,o}},n.serializers={req(o){},res(o){},responseTime:function(o){}}),t?(0,RT.default)(n,t):(0,RT.default)(n)}s(Cse,"createNewLogger");Nn.createNewLogger=Cse;function wot(e){return e===10||e===20?"debug":e===30?"info":e===40?"warning":e===50?"error":e===5?"internal":e>=60?"critical":"default"}s(wot,"pinoLevelToStackDriverSeverity");function Tot(e,t){return Math.trunc(e*Math.pow(10,t))/Math.pow(10,t)}s(Tot,"truncateToDecimalPlace")});var Um=h(Hc=>{"use strict";var Not=Hc&&Hc.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Dse=Hc&&Hc.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Not(t,e,r)};Object.defineProperty(Hc,"__esModule",{value:!0});Dse($se(),Hc);Dse(rF(),Hc)});var xse=h((HUt,Use)=>{"use strict";Use.exports=jse;function jse(e,t,r){e instanceof RegExp&&(e=Lse(e,r)),t instanceof RegExp&&(t=Lse(t,r));var n=Mse(e,t,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+e.length,n[1]),post:r.slice(n[1]+t.length)}}s(jse,"balanced");function Lse(e,t){var r=t.match(e);return r?r[0]:null}s(Lse,"maybeMatch");jse.range=Mse;function Mse(e,t,r){var n,i,o,a,u,c=r.indexOf(e),l=r.indexOf(t,c+1),f=c;if(c>=0&&l>0){if(e===t)return[c,l];for(n=[],o=r.length;f>=0&&!u;)f==c?(n.push(f),c=r.indexOf(e,f+1)):n.length==1?u=[n.pop(),l]:(i=n.pop(),i<o&&(o=i,a=l),l=r.indexOf(t,f+1)),f=c<l&&c>=0?c:l;n.length&&(u=[o,a])}return u}s(Mse,"range")});var Hse=h((WUt,zse)=>{var qse=xse();zse.exports=Cot;var Fse="\0SLASH"+Math.random()+"\0",kse="\0OPEN"+Math.random()+"\0",iF="\0CLOSE"+Math.random()+"\0",Bse="\0COMMA"+Math.random()+"\0",Gse="\0PERIOD"+Math.random()+"\0";function nF(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}s(nF,"numeric");function Aot(e){return e.split("\\\\").join(Fse).split("\\{").join(kse).split("\\}").join(iF).split("\\,").join(Bse).split("\\.").join(Gse)}s(Aot,"escapeBraces");function Rot(e){return e.split(Fse).join("\\").split(kse).join("{").split(iF).join("}").split(Bse).join(",").split(Gse).join(".")}s(Rot,"unescapeBraces");function Vse(e){if(!e)return[""];var t=[],r=qse("{","}",e);if(!r)return e.split(",");var n=r.pre,i=r.body,o=r.post,a=n.split(",");a[a.length-1]+="{"+i+"}";var u=Vse(o);return o.length&&(a[a.length-1]+=u.shift(),a.push.apply(a,u)),t.push.apply(t,a),t}s(Vse,"parseCommaParts");function Cot(e){return e?(e.substr(0,2)==="{}"&&(e="\\{\\}"+e.substr(2)),SE(Aot(e),!0).map(Rot)):[]}s(Cot,"expandTop");function $ot(e){return"{"+e+"}"}s($ot,"embrace");function Dot(e){return/^-?0\d/.test(e)}s(Dot,"isPadded");function Lot(e,t){return e<=t}s(Lot,"lte");function jot(e,t){return e>=t}s(jot,"gte");function SE(e,t){var r=[],n=qse("{","}",e);if(!n)return[e];var i=n.pre,o=n.post.length?SE(n.post,!1):[""];if(/\$$/.test(n.pre))for(var a=0;a<o.length;a++){var u=i+"{"+n.body+"}"+o[a];r.push(u)}else{var c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),f=c||l,d=n.body.indexOf(",")>=0;if(!f&&!d)return n.post.match(/,.*\}/)?(e=n.pre+"{"+n.body+iF+n.post,SE(e)):[e];var _;if(f)_=n.body.split(/\.\./);else if(_=Vse(n.body),_.length===1&&(_=SE(_[0],!1).map($ot),_.length===1))return o.map(function(re){return n.pre+_[0]+re});var m;if(f){var g=nF(_[0]),y=nF(_[1]),b=Math.max(_[0].length,_[1].length),E=_.length==3?Math.abs(nF(_[2])):1,S=Lot,O=y<g;O&&(E*=-1,S=jot);var I=_.some(Dot);m=[];for(var w=g;S(w,y);w+=E){var j;if(l)j=String.fromCharCode(w),j==="\\"&&(j="");else if(j=String(w),I){var F=b-j.length;if(F>0){var K=new Array(F+1).join("0");w<0?j="-"+K+j.slice(1):j=K+j}}m.push(j)}}else{m=[];for(var H=0;H<_.length;H++)m.push.apply(m,SE(_[H],!1))}for(var H=0;H<m.length;H++)for(var a=0;a<o.length;a++){var u=i+m[H]+o[a];(!t||f||u)&&r.push(u)}}return r}s(SE,"expand")});var Kse=h(CT=>{"use strict";Object.defineProperty(CT,"__esModule",{value:!0});CT.assertValidPattern=void 0;var Mot=1024*64,Uot=s(e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>Mot)throw new TypeError("pattern is too long")},"assertValidPattern");CT.assertValidPattern=Uot});var Yse=h($T=>{"use strict";Object.defineProperty($T,"__esModule",{value:!0});$T.parseClass=void 0;var xot={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},vE=s(e=>e.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),qot=s(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),Wse=s(e=>e.join(""),"rangesToString"),Fot=s((e,t)=>{let r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let n=[],i=[],o=r+1,a=!1,u=!1,c=!1,l=!1,f=r,d="";e:for(;o<e.length;){let y=e.charAt(o);if((y==="!"||y==="^")&&o===r+1){l=!0,o++;continue}if(y==="]"&&a&&!c){f=o+1;break}if(a=!0,y==="\\"&&!c){c=!0,o++;continue}if(y==="["&&!c){for(let[b,[E,S,O]]of Object.entries(xot))if(e.startsWith(b,o)){if(d)return["$.",!1,e.length-r,!0];o+=b.length,O?i.push(E):n.push(E),u=u||S;continue e}}if(c=!1,d){y>d?n.push(vE(d)+"-"+vE(y)):y===d&&n.push(vE(y)),d="",o++;continue}if(e.startsWith("-]",o+1)){n.push(vE(y+"-")),o+=2;continue}if(e.startsWith("-",o+1)){d=y,o+=2;continue}n.push(vE(y)),o++}if(f<o)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,e.length-r,!0];if(i.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!l){let y=n[0].length===2?n[0].slice(-1):n[0];return[qot(y),!1,f-r,!1]}let _="["+(l?"^":"")+Wse(n)+"]",m="["+(l?"":"^")+Wse(i)+"]";return[n.length&&i.length?"("+_+"|"+m+")":n.length?_:m,u,f-r,!0]},"parseClass");$T.parseClass=Fot});var LT=h(DT=>{"use strict";Object.defineProperty(DT,"__esModule",{value:!0});DT.unescape=void 0;var kot=s((e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),"unescape");DT.unescape=kot});var aF=h(UT=>{"use strict";Object.defineProperty(UT,"__esModule",{value:!0});UT.AST=void 0;var Bot=Yse(),jT=LT(),Got=new Set(["!","?","+","*","@"]),Jse=s(e=>Got.has(e),"isExtglobType"),Vot="(?!(?:^|/)\\.\\.?(?:$|/))",MT="(?!\\.)",zot=new Set(["[","."]),Hot=new Set(["..","."]),Kot=new Set("().*{}+?[]^$\\!"),Wot=s(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),oF="[^/]",Xse=oF+"*?",Qse=oF+"+?",sF=class e{static{s(this,"AST")}type;#t;#r;#n=!1;#e=[];#s;#c;#f;#l=!1;#a;#i;#u=!1;constructor(t,r,n={}){this.type=t,t&&(this.#r=!0),this.#s=r,this.#t=this.#s?this.#s.#t:this,this.#a=this.#t===this?n:this.#t.#a,this.#f=this.#t===this?[]:this.#t.#f,t==="!"&&!this.#t.#l&&this.#f.push(this),this.#c=this.#s?this.#s.#e.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let t of this.#e)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#i!==void 0?this.#i:this.type?this.#i=this.type+"("+this.#e.map(t=>String(t)).join("|")+")":this.#i=this.#e.map(t=>String(t)).join("")}#E(){if(this!==this.#t)throw new Error("should only call on root");if(this.#l)return this;this.toString(),this.#l=!0;let t;for(;t=this.#f.pop();){if(t.type!=="!")continue;let r=t,n=r.#s;for(;n;){for(let i=r.#c+1;!n.type&&i<n.#e.length;i++)for(let o of t.#e){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(n.#e[i])}r=n,n=r.#s}}return this}push(...t){for(let r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof e&&r.#s===this))throw new Error("invalid part: "+r);this.#e.push(r)}}toJSON(){let t=this.type===null?this.#e.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#l&&this.#s?.type==="!")&&t.push({}),t}isStart(){if(this.#t===this)return!0;if(!this.#s?.isStart())return!1;if(this.#c===0)return!0;let t=this.#s;for(let r=0;r<this.#c;r++){let n=t.#e[r];if(!(n instanceof e&&n.type==="!"))return!1}return!0}isEnd(){if(this.#t===this||this.#s?.type==="!")return!0;if(!this.#s?.isEnd())return!1;if(!this.type)return this.#s?.isEnd();let t=this.#s?this.#s.#e.length:0;return this.#c===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let r=new e(this.type,t);for(let n of this.#e)r.copyIn(n);return r}static#_(t,r,n,i){let o=!1,a=!1,u=-1,c=!1;if(r.type===null){let m=n,g="";for(;m<t.length;){let y=t.charAt(m++);if(o||y==="\\"){o=!o,g+=y;continue}if(a){m===u+1?(y==="^"||y==="!")&&(c=!0):y==="]"&&!(m===u+2&&c)&&(a=!1),g+=y;continue}else if(y==="["){a=!0,u=m,c=!1,g+=y;continue}if(!i.noext&&Jse(y)&&t.charAt(m)==="("){r.push(g),g="";let b=new e(y,r);m=e.#_(t,b,m,i),r.push(b);continue}g+=y}return r.push(g),m}let l=n+1,f=new e(null,r),d=[],_="";for(;l<t.length;){let m=t.charAt(l++);if(o||m==="\\"){o=!o,_+=m;continue}if(a){l===u+1?(m==="^"||m==="!")&&(c=!0):m==="]"&&!(l===u+2&&c)&&(a=!1),_+=m;continue}else if(m==="["){a=!0,u=l,c=!1,_+=m;continue}if(Jse(m)&&t.charAt(l)==="("){f.push(_),_="";let g=new e(m,f);f.push(g),l=e.#_(t,g,l,i);continue}if(m==="|"){f.push(_),_="",d.push(f),f=new e(null,r);continue}if(m===")")return _===""&&r.#e.length===0&&(r.#u=!0),f.push(_),_="",r.push(...d,f),l;_+=m}return r.type=null,r.#r=void 0,r.#e=[t.substring(n-1)],l}static fromGlob(t,r={}){let n=new e(null,void 0,r);return e.#_(t,n,0,r),n}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();let t=this.toString(),[r,n,i,o]=this.toRegExpSource();if(!(i||this.#r||this.#a.nocase&&!this.#a.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;let u=(this.#a.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${r}$`,u),{_src:r,_glob:t})}toRegExpSource(t){let r=t??!!this.#a.dot;if(this.#t===this&&this.#E(),!this.type){let c=this.isStart()&&this.isEnd(),l=this.#e.map(m=>{let[g,y,b,E]=typeof m=="string"?e.#b(m,this.#r,c):m.toRegExpSource(t);return this.#r=this.#r||b,this.#n=this.#n||E,g}).join(""),f="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&Hot.has(this.#e[0]))){let g=zot,y=r&&g.has(l.charAt(0))||l.startsWith("\\.")&&g.has(l.charAt(2))||l.startsWith("\\.\\.")&&g.has(l.charAt(4)),b=!r&&!t&&g.has(l.charAt(0));f=y?Vot:b?MT:""}let d="";return this.isEnd()&&this.#t.#l&&this.#s?.type==="!"&&(d="(?:$|\\/)"),[f+l+d,(0,jT.unescape)(l),this.#r=!!this.#r,this.#n]}let n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",o=this.#p(r);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let c=this.toString();return this.#e=[c],this.type=null,this.#r=void 0,[c,(0,jT.unescape)(this.toString()),!1,!1]}let a=!n||t||r||!MT?"":this.#p(!0);a===o&&(a=""),a&&(o=`(?:${o})(?:${a})*?`);let u="";if(this.type==="!"&&this.#u)u=(this.isStart()&&!r?MT:"")+Qse;else{let c=this.type==="!"?"))"+(this.isStart()&&!r&&!t?MT:"")+Xse+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;u=i+o+c}return[u,(0,jT.unescape)(o),this.#r=!!this.#r,this.#n]}#p(t){return this.#e.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[n,i,o,a]=r.toRegExpSource(t);return this.#n=this.#n||a,n}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#b(t,r,n=!1){let i=!1,o="",a=!1;for(let u=0;u<t.length;u++){let c=t.charAt(u);if(i){i=!1,o+=(Kot.has(c)?"\\":"")+c;continue}if(c==="\\"){u===t.length-1?o+="\\\\":i=!0;continue}if(c==="["){let[l,f,d,_]=(0,Bot.parseClass)(t,u);if(d){o+=l,a=a||f,u+=d-1,r=r||_;continue}}if(c==="*"){n&&t==="*"?o+=Qse:o+=Xse,r=!0;continue}if(c==="?"){o+=oF,r=!0;continue}o+=Wot(c)}return[o,(0,jT.unescape)(t),!!r,a]}};UT.AST=sF});var uF=h(xT=>{"use strict";Object.defineProperty(xT,"__esModule",{value:!0});xT.escape=void 0;var Yot=s((e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),"escape");xT.escape=Yot});var Kc=h(oe=>{"use strict";var Jot=oe&&oe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oe,"__esModule",{value:!0});oe.unescape=oe.escape=oe.AST=oe.Minimatch=oe.match=oe.makeRe=oe.braceExpand=oe.defaults=oe.filter=oe.GLOBSTAR=oe.sep=oe.minimatch=void 0;var Xot=Jot(Hse()),qT=Kse(),toe=aF(),Qot=uF(),Zot=LT(),eat=s((e,t,r={})=>((0,qT.assertValidPattern)(t),!r.nocomment&&t.charAt(0)==="#"?!1:new Md(t,r).match(e)),"minimatch");oe.minimatch=eat;var tat=/^\*+([^+@!?\*\[\(]*)$/,rat=s(e=>t=>!t.startsWith(".")&&t.endsWith(e),"starDotExtTest"),nat=s(e=>t=>t.endsWith(e),"starDotExtTestDot"),iat=s(e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),"starDotExtTestNocase"),sat=s(e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),"starDotExtTestNocaseDot"),oat=/^\*+\.\*+$/,aat=s(e=>!e.startsWith(".")&&e.includes("."),"starDotStarTest"),uat=s(e=>e!=="."&&e!==".."&&e.includes("."),"starDotStarTestDot"),cat=/^\.\*+$/,lat=s(e=>e!=="."&&e!==".."&&e.startsWith("."),"dotStarTest"),fat=/^\*+$/,dat=s(e=>e.length!==0&&!e.startsWith("."),"starTest"),pat=s(e=>e.length!==0&&e!=="."&&e!=="..","starTestDot"),hat=/^\?+([^+@!?\*\[\(]*)?$/,mat=s(([e,t=""])=>{let r=roe([e]);return t?(t=t.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(t)):r},"qmarksTestNocase"),_at=s(([e,t=""])=>{let r=noe([e]);return t?(t=t.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(t)):r},"qmarksTestNocaseDot"),gat=s(([e,t=""])=>{let r=noe([e]);return t?n=>r(n)&&n.endsWith(t):r},"qmarksTestDot"),yat=s(([e,t=""])=>{let r=roe([e]);return t?n=>r(n)&&n.endsWith(t):r},"qmarksTest"),roe=s(([e])=>{let t=e.length;return r=>r.length===t&&!r.startsWith(".")},"qmarksTestNoExt"),noe=s(([e])=>{let t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},"qmarksTestNoExtDot"),ioe=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Zse={win32:{sep:"\\"},posix:{sep:"/"}};oe.sep=ioe==="win32"?Zse.win32.sep:Zse.posix.sep;oe.minimatch.sep=oe.sep;oe.GLOBSTAR=Symbol("globstar **");oe.minimatch.GLOBSTAR=oe.GLOBSTAR;var Eat="[^/]",bat=Eat+"*?",Sat="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",vat="(?:(?!(?:\\/|^)\\.).)*?",Oat=s((e,t={})=>r=>(0,oe.minimatch)(r,e,t),"filter");oe.filter=Oat;oe.minimatch.filter=oe.filter;var $s=s((e,t={})=>Object.assign({},e,t),"ext"),Pat=s(e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return oe.minimatch;let t=oe.minimatch;return Object.assign(s((n,i,o={})=>t(n,i,$s(e,o)),"m"),{Minimatch:class extends t.Minimatch{static{s(this,"Minimatch")}constructor(i,o={}){super(i,$s(e,o))}static defaults(i){return t.defaults($s(e,i)).Minimatch}},AST:class extends t.AST{static{s(this,"AST")}constructor(i,o,a={}){super(i,o,$s(e,a))}static fromGlob(i,o={}){return t.AST.fromGlob(i,$s(e,o))}},unescape:(n,i={})=>t.unescape(n,$s(e,i)),escape:(n,i={})=>t.escape(n,$s(e,i)),filter:(n,i={})=>t.filter(n,$s(e,i)),defaults:n=>t.defaults($s(e,n)),makeRe:(n,i={})=>t.makeRe(n,$s(e,i)),braceExpand:(n,i={})=>t.braceExpand(n,$s(e,i)),match:(n,i,o={})=>t.match(n,i,$s(e,o)),sep:t.sep,GLOBSTAR:oe.GLOBSTAR})},"defaults");oe.defaults=Pat;oe.minimatch.defaults=oe.defaults;var Iat=s((e,t={})=>((0,qT.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,Xot.default)(e)),"braceExpand");oe.braceExpand=Iat;oe.minimatch.braceExpand=oe.braceExpand;var wat=s((e,t={})=>new Md(e,t).makeRe(),"makeRe");oe.makeRe=wat;oe.minimatch.makeRe=oe.makeRe;var Tat=s((e,t,r={})=>{let n=new Md(t,r);return e=e.filter(i=>n.match(i)),n.options.nonull&&!e.length&&e.push(t),e},"match");oe.match=Tat;oe.minimatch.match=oe.match;var eoe=/[?*]|[+@!]\(.*?\)|\[|\]/,Nat=s(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),Md=class{static{s(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,r={}){(0,qT.assertValidPattern)(t),r=r||{},this.options=r,this.pattern=t,this.platform=r.platform||ioe,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map((o,a,u)=>{if(this.isWindows&&this.windowsNoMagicRoot){let c=o[0]===""&&o[1]===""&&(o[2]==="?"||!eoe.test(o[2]))&&!eoe.test(o[3]),l=/^[a-z]:/i.test(o[0]);if(c)return[...o.slice(0,4),...o.slice(4).map(f=>this.parse(f))];if(l)return[o[0],...o.slice(1).map(f=>this.parse(f))]}return o.map(c=>this.parse(c))});if(this.debug(this.pattern,i),this.set=i.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){let a=this.set[o];a[0]===""&&a[1]===""&&this.globParts[o][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let n=0;n<t.length;n++)for(let i=0;i<t[n].length;i++)t[n][i]==="**"&&(t[n][i]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let i=n;for(;r[i+1]==="**";)i++;i!==n&&r.splice(n,i-n)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((n,i)=>{let o=n[n.length-1];return i==="**"&&o==="**"?n:i===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(n.pop(),n):(n.push(i),n)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){let o=t[i];i===1&&o===""&&t[0]===""||(o==="."||o==="")&&(r=!0,t.splice(i,1),i--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let n=0;for(;(n=t.indexOf("..",n+1))!==-1;){let i=t[n-1];i&&i!=="."&&i!==".."&&i!=="**"&&(r=!0,t.splice(n-1,2),n-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let n of t){let i=-1;for(;(i=n.indexOf("**",i+1))!==-1;){let a=i;for(;n[a+1]==="**";)a++;a>i&&n.splice(i+1,a-i);let u=n[i+1],c=n[i+2],l=n[i+3];if(u!==".."||!c||c==="."||c===".."||!l||l==="."||l==="..")continue;r=!0,n.splice(i,1);let f=n.slice(0);f[i]="**",t.push(f),i--}if(!this.preserveMultipleSlashes){for(let a=1;a<n.length-1;a++){let u=n[a];a===1&&u===""&&n[0]===""||(u==="."||u==="")&&(r=!0,n.splice(a,1),a--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(r=!0,n.pop())}let o=0;for(;(o=n.indexOf("..",o+1))!==-1;){let a=n[o-1];if(a&&a!=="."&&a!==".."&&a!=="**"){r=!0;let c=o===1&&n[o+1]==="**"?["."]:[];n.splice(o-1,2,...c),n.length===0&&n.push(""),o-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let n=r+1;n<t.length;n++){let i=this.partsMatch(t[r],t[n],!this.preserveMultipleSlashes);i&&(t[r]=i,t[n]=[])}return t.filter(r=>r.length)}partsMatch(t,r,n=!1){let i=0,o=0,a=[],u="";for(;i<t.length&&o<r.length;)if(t[i]===r[o])a.push(u==="b"?r[o]:t[i]),i++,o++;else if(n&&t[i]==="**"&&r[o]===t[i+1])a.push(t[i]),i++;else if(n&&r[o]==="**"&&t[i]===r[o+1])a.push(r[o]),o++;else if(t[i]==="*"&&r[o]&&(this.options.dot||!r[o].startsWith("."))&&r[o]!=="**"){if(u==="b")return!1;u="a",a.push(t[i]),i++,o++}else if(r[o]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(u==="a")return!1;u="b",a.push(r[o]),i++,o++}else return!1;return t.length===r.length&&a}parseNegate(){if(this.nonegate)return;let t=this.pattern,r=!1,n=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)r=!r,n++;n&&(this.pattern=t.slice(n)),this.negate=r}matchOne(t,r,n=!1){let i=this.options;if(this.isWindows){let y=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),b=!y&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),E=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),S=!E&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),O=b?3:y?0:void 0,I=S?3:E?0:void 0;if(typeof O=="number"&&typeof I=="number"){let[w,j]=[t[O],r[I]];w.toLowerCase()===j.toLowerCase()&&(r[I]=w,I>O?r=r.slice(I):O>I&&(t=t.slice(O)))}}let{optimizationLevel:o=1}=this.options;o>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:r}),this.debug("matchOne",t.length,r.length);for(var a=0,u=0,c=t.length,l=r.length;a<c&&u<l;a++,u++){this.debug("matchOne loop");var f=r[u],d=t[a];if(this.debug(r,f,d),f===!1)return!1;if(f===oe.GLOBSTAR){this.debug("GLOBSTAR",[r,f,d]);var _=a,m=u+1;if(m===l){for(this.debug("** at the end");a<c;a++)if(t[a]==="."||t[a]===".."||!i.dot&&t[a].charAt(0)===".")return!1;return!0}for(;_<c;){var g=t[_];if(this.debug(`
|
|
294
|
+
`).slice(2).filter(c=>!c.includes("node_modules/pino")&&!c.includes("node_modules\\pino")&&!c.includes("node_modules/launchdarkly-node-server-sdk")&&!c.includes("node_modules\\launchdarkly-node-server-sdk"))[0].substr(7);n.caller=u}return n.caller&&r<50&&delete n.caller,this[RT.default.symbols.chindingsSym]=`,${Pot(n)}`,t.apply(this,e)}}catch{}return t.apply(this,e)}s(Iot,"logMethod");function Cse({defaultLabels:e={},logStream:t,loggerOptions:r}={}){let n={level:r?.level??process.env.LOG_LEVEL??"info",redact:['requestHeaders["authorization"]','requestHeaders["cookie"]','requestHeaders["cf-access-jwt-assertion"]','requestHeaders["cf-access-client-secret"]','requestHeaders["cf-access-client-id"]','responseHeaders["authorization"]','responseHeaders["cookie"]','responseHeaders["cf-access-jwt-assertion"]','responseHeaders["cf-access-client-secret"]','responseHeaders["cf-access-client-id"]',"cookie"]},i={project_id:Rse};return n.hooks=r?.hooks??{logMethod:Iot},n.formatters={bindings(o){return i.pid=o.pid,i.hostname=o.hostname,i}},process.env.LOG_FORMAT===void 0||process.env.LOG_FORMAT==="pretty"?n.transport={target:"@zuplo/pino-pretty-configurations"}:process.env.LOG_FORMAT==="gcp"&&(n.messageKey="message",n.formatters={level(o,a){return{severity:wot(a)}},log(o){let a=e;if(o.err&&o.err.stack)try{let u=(0,vot.parse)(o.err.stack);u.length>0&&(o["logging.googleapis.com/sourceLocation"]={file:u[0].file,line:u[0].lineNumber,function:u[0].methodName})}catch{}if(o.req){let u=o.req;o.requestHeaders=u.raw.headers,o.httpRequest={...(o.httpRequest,{requestMethod:u.method,requestUrl:u.url,userAgent:u.headers["user-agent"],remoteIp:u.ip,protocol:u.protocol})};let c=u.headers["zp-rid"]??o.trace;a.requestId=c,u.headers["cf-ray"]&&(a.rayId=u.headers["cf-ray"]),u.headers["cf-worker"]&&(a.worker=u.headers["cf-worker"]);let l=(0,Oot.getLoggerContext)(u);l&&(o={...o,...l})}if(o.res){let u=o.res;o.responseHeaders=u.getHeaders(),o.httpRequest={...(o.httpRequest,{requestMethod:u.request?u.request.method:"",requestUrl:u.request?u.request.url:"",status:u.statusCode,userAgent:u.request?u.request.headers["user-agent"]:"",latency:`${Tot(u.getResponseTime()/1e3,9)}s`,remoteIp:u.request?u.request.ip:"",protocol:u.request?u.request.protocol:""})}}return o[Nn.GOOGLE_LABELS_PROPERTY]=a,o}},n.serializers={req(o){},res(o){},responseTime:function(o){}}),t?(0,RT.default)(n,t):(0,RT.default)(n)}s(Cse,"createNewLogger");Nn.createNewLogger=Cse;function wot(e){return e===10||e===20?"debug":e===30?"info":e===40?"warning":e===50?"error":e===5?"internal":e>=60?"critical":"default"}s(wot,"pinoLevelToStackDriverSeverity");function Tot(e,t){return Math.trunc(e*Math.pow(10,t))/Math.pow(10,t)}s(Tot,"truncateToDecimalPlace")});var Um=h(Hc=>{"use strict";var Not=Hc&&Hc.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Dse=Hc&&Hc.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Not(t,e,r)};Object.defineProperty(Hc,"__esModule",{value:!0});Dse($se(),Hc);Dse(rF(),Hc)});var xse=h((HUt,Use)=>{"use strict";Use.exports=jse;function jse(e,t,r){e instanceof RegExp&&(e=Lse(e,r)),t instanceof RegExp&&(t=Lse(t,r));var n=Mse(e,t,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+e.length,n[1]),post:r.slice(n[1]+t.length)}}s(jse,"balanced");function Lse(e,t){var r=t.match(e);return r?r[0]:null}s(Lse,"maybeMatch");jse.range=Mse;function Mse(e,t,r){var n,i,o,a,u,c=r.indexOf(e),l=r.indexOf(t,c+1),f=c;if(c>=0&&l>0){if(e===t)return[c,l];for(n=[],o=r.length;f>=0&&!u;)f==c?(n.push(f),c=r.indexOf(e,f+1)):n.length==1?u=[n.pop(),l]:(i=n.pop(),i<o&&(o=i,a=l),l=r.indexOf(t,f+1)),f=c<l&&c>=0?c:l;n.length&&(u=[o,a])}return u}s(Mse,"range")});var Hse=h((WUt,zse)=>{var qse=xse();zse.exports=Cot;var Fse="\0SLASH"+Math.random()+"\0",kse="\0OPEN"+Math.random()+"\0",iF="\0CLOSE"+Math.random()+"\0",Bse="\0COMMA"+Math.random()+"\0",Gse="\0PERIOD"+Math.random()+"\0";function nF(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}s(nF,"numeric");function Aot(e){return e.split("\\\\").join(Fse).split("\\{").join(kse).split("\\}").join(iF).split("\\,").join(Bse).split("\\.").join(Gse)}s(Aot,"escapeBraces");function Rot(e){return e.split(Fse).join("\\").split(kse).join("{").split(iF).join("}").split(Bse).join(",").split(Gse).join(".")}s(Rot,"unescapeBraces");function Vse(e){if(!e)return[""];var t=[],r=qse("{","}",e);if(!r)return e.split(",");var n=r.pre,i=r.body,o=r.post,a=n.split(",");a[a.length-1]+="{"+i+"}";var u=Vse(o);return o.length&&(a[a.length-1]+=u.shift(),a.push.apply(a,u)),t.push.apply(t,a),t}s(Vse,"parseCommaParts");function Cot(e){return e?(e.substr(0,2)==="{}"&&(e="\\{\\}"+e.substr(2)),SE(Aot(e),!0).map(Rot)):[]}s(Cot,"expandTop");function $ot(e){return"{"+e+"}"}s($ot,"embrace");function Dot(e){return/^-?0\d/.test(e)}s(Dot,"isPadded");function Lot(e,t){return e<=t}s(Lot,"lte");function jot(e,t){return e>=t}s(jot,"gte");function SE(e,t){var r=[],n=qse("{","}",e);if(!n)return[e];var i=n.pre,o=n.post.length?SE(n.post,!1):[""];if(/\$$/.test(n.pre))for(var a=0;a<o.length;a++){var u=i+"{"+n.body+"}"+o[a];r.push(u)}else{var c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),f=c||l,d=n.body.indexOf(",")>=0;if(!f&&!d)return n.post.match(/,.*\}/)?(e=n.pre+"{"+n.body+iF+n.post,SE(e)):[e];var _;if(f)_=n.body.split(/\.\./);else if(_=Vse(n.body),_.length===1&&(_=SE(_[0],!1).map($ot),_.length===1))return o.map(function(re){return n.pre+_[0]+re});var m;if(f){var g=nF(_[0]),y=nF(_[1]),b=Math.max(_[0].length,_[1].length),E=_.length==3?Math.abs(nF(_[2])):1,v=Lot,O=y<g;O&&(E*=-1,v=jot);var I=_.some(Dot);m=[];for(var w=g;v(w,y);w+=E){var j;if(l)j=String.fromCharCode(w),j==="\\"&&(j="");else if(j=String(w),I){var F=b-j.length;if(F>0){var K=new Array(F+1).join("0");w<0?j="-"+K+j.slice(1):j=K+j}}m.push(j)}}else{m=[];for(var H=0;H<_.length;H++)m.push.apply(m,SE(_[H],!1))}for(var H=0;H<m.length;H++)for(var a=0;a<o.length;a++){var u=i+m[H]+o[a];(!t||f||u)&&r.push(u)}}return r}s(SE,"expand")});var Kse=h(CT=>{"use strict";Object.defineProperty(CT,"__esModule",{value:!0});CT.assertValidPattern=void 0;var Mot=1024*64,Uot=s(e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>Mot)throw new TypeError("pattern is too long")},"assertValidPattern");CT.assertValidPattern=Uot});var Yse=h($T=>{"use strict";Object.defineProperty($T,"__esModule",{value:!0});$T.parseClass=void 0;var xot={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},vE=s(e=>e.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),qot=s(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),Wse=s(e=>e.join(""),"rangesToString"),Fot=s((e,t)=>{let r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let n=[],i=[],o=r+1,a=!1,u=!1,c=!1,l=!1,f=r,d="";e:for(;o<e.length;){let y=e.charAt(o);if((y==="!"||y==="^")&&o===r+1){l=!0,o++;continue}if(y==="]"&&a&&!c){f=o+1;break}if(a=!0,y==="\\"&&!c){c=!0,o++;continue}if(y==="["&&!c){for(let[b,[E,v,O]]of Object.entries(xot))if(e.startsWith(b,o)){if(d)return["$.",!1,e.length-r,!0];o+=b.length,O?i.push(E):n.push(E),u=u||v;continue e}}if(c=!1,d){y>d?n.push(vE(d)+"-"+vE(y)):y===d&&n.push(vE(y)),d="",o++;continue}if(e.startsWith("-]",o+1)){n.push(vE(y+"-")),o+=2;continue}if(e.startsWith("-",o+1)){d=y,o+=2;continue}n.push(vE(y)),o++}if(f<o)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,e.length-r,!0];if(i.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!l){let y=n[0].length===2?n[0].slice(-1):n[0];return[qot(y),!1,f-r,!1]}let _="["+(l?"^":"")+Wse(n)+"]",m="["+(l?"":"^")+Wse(i)+"]";return[n.length&&i.length?"("+_+"|"+m+")":n.length?_:m,u,f-r,!0]},"parseClass");$T.parseClass=Fot});var LT=h(DT=>{"use strict";Object.defineProperty(DT,"__esModule",{value:!0});DT.unescape=void 0;var kot=s((e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),"unescape");DT.unescape=kot});var aF=h(UT=>{"use strict";Object.defineProperty(UT,"__esModule",{value:!0});UT.AST=void 0;var Bot=Yse(),jT=LT(),Got=new Set(["!","?","+","*","@"]),Jse=s(e=>Got.has(e),"isExtglobType"),Vot="(?!(?:^|/)\\.\\.?(?:$|/))",MT="(?!\\.)",zot=new Set(["[","."]),Hot=new Set(["..","."]),Kot=new Set("().*{}+?[]^$\\!"),Wot=s(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),oF="[^/]",Xse=oF+"*?",Qse=oF+"+?",sF=class e{static{s(this,"AST")}type;#t;#r;#n=!1;#e=[];#s;#c;#f;#l=!1;#a;#i;#u=!1;constructor(t,r,n={}){this.type=t,t&&(this.#r=!0),this.#s=r,this.#t=this.#s?this.#s.#t:this,this.#a=this.#t===this?n:this.#t.#a,this.#f=this.#t===this?[]:this.#t.#f,t==="!"&&!this.#t.#l&&this.#f.push(this),this.#c=this.#s?this.#s.#e.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let t of this.#e)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#i!==void 0?this.#i:this.type?this.#i=this.type+"("+this.#e.map(t=>String(t)).join("|")+")":this.#i=this.#e.map(t=>String(t)).join("")}#E(){if(this!==this.#t)throw new Error("should only call on root");if(this.#l)return this;this.toString(),this.#l=!0;let t;for(;t=this.#f.pop();){if(t.type!=="!")continue;let r=t,n=r.#s;for(;n;){for(let i=r.#c+1;!n.type&&i<n.#e.length;i++)for(let o of t.#e){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(n.#e[i])}r=n,n=r.#s}}return this}push(...t){for(let r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof e&&r.#s===this))throw new Error("invalid part: "+r);this.#e.push(r)}}toJSON(){let t=this.type===null?this.#e.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#l&&this.#s?.type==="!")&&t.push({}),t}isStart(){if(this.#t===this)return!0;if(!this.#s?.isStart())return!1;if(this.#c===0)return!0;let t=this.#s;for(let r=0;r<this.#c;r++){let n=t.#e[r];if(!(n instanceof e&&n.type==="!"))return!1}return!0}isEnd(){if(this.#t===this||this.#s?.type==="!")return!0;if(!this.#s?.isEnd())return!1;if(!this.type)return this.#s?.isEnd();let t=this.#s?this.#s.#e.length:0;return this.#c===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let r=new e(this.type,t);for(let n of this.#e)r.copyIn(n);return r}static#_(t,r,n,i){let o=!1,a=!1,u=-1,c=!1;if(r.type===null){let m=n,g="";for(;m<t.length;){let y=t.charAt(m++);if(o||y==="\\"){o=!o,g+=y;continue}if(a){m===u+1?(y==="^"||y==="!")&&(c=!0):y==="]"&&!(m===u+2&&c)&&(a=!1),g+=y;continue}else if(y==="["){a=!0,u=m,c=!1,g+=y;continue}if(!i.noext&&Jse(y)&&t.charAt(m)==="("){r.push(g),g="";let b=new e(y,r);m=e.#_(t,b,m,i),r.push(b);continue}g+=y}return r.push(g),m}let l=n+1,f=new e(null,r),d=[],_="";for(;l<t.length;){let m=t.charAt(l++);if(o||m==="\\"){o=!o,_+=m;continue}if(a){l===u+1?(m==="^"||m==="!")&&(c=!0):m==="]"&&!(l===u+2&&c)&&(a=!1),_+=m;continue}else if(m==="["){a=!0,u=l,c=!1,_+=m;continue}if(Jse(m)&&t.charAt(l)==="("){f.push(_),_="";let g=new e(m,f);f.push(g),l=e.#_(t,g,l,i);continue}if(m==="|"){f.push(_),_="",d.push(f),f=new e(null,r);continue}if(m===")")return _===""&&r.#e.length===0&&(r.#u=!0),f.push(_),_="",r.push(...d,f),l;_+=m}return r.type=null,r.#r=void 0,r.#e=[t.substring(n-1)],l}static fromGlob(t,r={}){let n=new e(null,void 0,r);return e.#_(t,n,0,r),n}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();let t=this.toString(),[r,n,i,o]=this.toRegExpSource();if(!(i||this.#r||this.#a.nocase&&!this.#a.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;let u=(this.#a.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${r}$`,u),{_src:r,_glob:t})}toRegExpSource(t){let r=t??!!this.#a.dot;if(this.#t===this&&this.#E(),!this.type){let c=this.isStart()&&this.isEnd(),l=this.#e.map(m=>{let[g,y,b,E]=typeof m=="string"?e.#b(m,this.#r,c):m.toRegExpSource(t);return this.#r=this.#r||b,this.#n=this.#n||E,g}).join(""),f="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&Hot.has(this.#e[0]))){let g=zot,y=r&&g.has(l.charAt(0))||l.startsWith("\\.")&&g.has(l.charAt(2))||l.startsWith("\\.\\.")&&g.has(l.charAt(4)),b=!r&&!t&&g.has(l.charAt(0));f=y?Vot:b?MT:""}let d="";return this.isEnd()&&this.#t.#l&&this.#s?.type==="!"&&(d="(?:$|\\/)"),[f+l+d,(0,jT.unescape)(l),this.#r=!!this.#r,this.#n]}let n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",o=this.#p(r);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let c=this.toString();return this.#e=[c],this.type=null,this.#r=void 0,[c,(0,jT.unescape)(this.toString()),!1,!1]}let a=!n||t||r||!MT?"":this.#p(!0);a===o&&(a=""),a&&(o=`(?:${o})(?:${a})*?`);let u="";if(this.type==="!"&&this.#u)u=(this.isStart()&&!r?MT:"")+Qse;else{let c=this.type==="!"?"))"+(this.isStart()&&!r&&!t?MT:"")+Xse+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;u=i+o+c}return[u,(0,jT.unescape)(o),this.#r=!!this.#r,this.#n]}#p(t){return this.#e.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[n,i,o,a]=r.toRegExpSource(t);return this.#n=this.#n||a,n}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#b(t,r,n=!1){let i=!1,o="",a=!1;for(let u=0;u<t.length;u++){let c=t.charAt(u);if(i){i=!1,o+=(Kot.has(c)?"\\":"")+c;continue}if(c==="\\"){u===t.length-1?o+="\\\\":i=!0;continue}if(c==="["){let[l,f,d,_]=(0,Bot.parseClass)(t,u);if(d){o+=l,a=a||f,u+=d-1,r=r||_;continue}}if(c==="*"){n&&t==="*"?o+=Qse:o+=Xse,r=!0;continue}if(c==="?"){o+=oF,r=!0;continue}o+=Wot(c)}return[o,(0,jT.unescape)(t),!!r,a]}};UT.AST=sF});var uF=h(xT=>{"use strict";Object.defineProperty(xT,"__esModule",{value:!0});xT.escape=void 0;var Yot=s((e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),"escape");xT.escape=Yot});var Kc=h(oe=>{"use strict";var Jot=oe&&oe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oe,"__esModule",{value:!0});oe.unescape=oe.escape=oe.AST=oe.Minimatch=oe.match=oe.makeRe=oe.braceExpand=oe.defaults=oe.filter=oe.GLOBSTAR=oe.sep=oe.minimatch=void 0;var Xot=Jot(Hse()),qT=Kse(),toe=aF(),Qot=uF(),Zot=LT(),eat=s((e,t,r={})=>((0,qT.assertValidPattern)(t),!r.nocomment&&t.charAt(0)==="#"?!1:new Md(t,r).match(e)),"minimatch");oe.minimatch=eat;var tat=/^\*+([^+@!?\*\[\(]*)$/,rat=s(e=>t=>!t.startsWith(".")&&t.endsWith(e),"starDotExtTest"),nat=s(e=>t=>t.endsWith(e),"starDotExtTestDot"),iat=s(e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),"starDotExtTestNocase"),sat=s(e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),"starDotExtTestNocaseDot"),oat=/^\*+\.\*+$/,aat=s(e=>!e.startsWith(".")&&e.includes("."),"starDotStarTest"),uat=s(e=>e!=="."&&e!==".."&&e.includes("."),"starDotStarTestDot"),cat=/^\.\*+$/,lat=s(e=>e!=="."&&e!==".."&&e.startsWith("."),"dotStarTest"),fat=/^\*+$/,dat=s(e=>e.length!==0&&!e.startsWith("."),"starTest"),pat=s(e=>e.length!==0&&e!=="."&&e!=="..","starTestDot"),hat=/^\?+([^+@!?\*\[\(]*)?$/,mat=s(([e,t=""])=>{let r=roe([e]);return t?(t=t.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(t)):r},"qmarksTestNocase"),_at=s(([e,t=""])=>{let r=noe([e]);return t?(t=t.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(t)):r},"qmarksTestNocaseDot"),gat=s(([e,t=""])=>{let r=noe([e]);return t?n=>r(n)&&n.endsWith(t):r},"qmarksTestDot"),yat=s(([e,t=""])=>{let r=roe([e]);return t?n=>r(n)&&n.endsWith(t):r},"qmarksTest"),roe=s(([e])=>{let t=e.length;return r=>r.length===t&&!r.startsWith(".")},"qmarksTestNoExt"),noe=s(([e])=>{let t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},"qmarksTestNoExtDot"),ioe=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Zse={win32:{sep:"\\"},posix:{sep:"/"}};oe.sep=ioe==="win32"?Zse.win32.sep:Zse.posix.sep;oe.minimatch.sep=oe.sep;oe.GLOBSTAR=Symbol("globstar **");oe.minimatch.GLOBSTAR=oe.GLOBSTAR;var Eat="[^/]",bat=Eat+"*?",Sat="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",vat="(?:(?!(?:\\/|^)\\.).)*?",Oat=s((e,t={})=>r=>(0,oe.minimatch)(r,e,t),"filter");oe.filter=Oat;oe.minimatch.filter=oe.filter;var $s=s((e,t={})=>Object.assign({},e,t),"ext"),Pat=s(e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return oe.minimatch;let t=oe.minimatch;return Object.assign(s((n,i,o={})=>t(n,i,$s(e,o)),"m"),{Minimatch:class extends t.Minimatch{static{s(this,"Minimatch")}constructor(i,o={}){super(i,$s(e,o))}static defaults(i){return t.defaults($s(e,i)).Minimatch}},AST:class extends t.AST{static{s(this,"AST")}constructor(i,o,a={}){super(i,o,$s(e,a))}static fromGlob(i,o={}){return t.AST.fromGlob(i,$s(e,o))}},unescape:(n,i={})=>t.unescape(n,$s(e,i)),escape:(n,i={})=>t.escape(n,$s(e,i)),filter:(n,i={})=>t.filter(n,$s(e,i)),defaults:n=>t.defaults($s(e,n)),makeRe:(n,i={})=>t.makeRe(n,$s(e,i)),braceExpand:(n,i={})=>t.braceExpand(n,$s(e,i)),match:(n,i,o={})=>t.match(n,i,$s(e,o)),sep:t.sep,GLOBSTAR:oe.GLOBSTAR})},"defaults");oe.defaults=Pat;oe.minimatch.defaults=oe.defaults;var Iat=s((e,t={})=>((0,qT.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,Xot.default)(e)),"braceExpand");oe.braceExpand=Iat;oe.minimatch.braceExpand=oe.braceExpand;var wat=s((e,t={})=>new Md(e,t).makeRe(),"makeRe");oe.makeRe=wat;oe.minimatch.makeRe=oe.makeRe;var Tat=s((e,t,r={})=>{let n=new Md(t,r);return e=e.filter(i=>n.match(i)),n.options.nonull&&!e.length&&e.push(t),e},"match");oe.match=Tat;oe.minimatch.match=oe.match;var eoe=/[?*]|[+@!]\(.*?\)|\[|\]/,Nat=s(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),Md=class{static{s(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,r={}){(0,qT.assertValidPattern)(t),r=r||{},this.options=r,this.pattern=t,this.platform=r.platform||ioe,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map((o,a,u)=>{if(this.isWindows&&this.windowsNoMagicRoot){let c=o[0]===""&&o[1]===""&&(o[2]==="?"||!eoe.test(o[2]))&&!eoe.test(o[3]),l=/^[a-z]:/i.test(o[0]);if(c)return[...o.slice(0,4),...o.slice(4).map(f=>this.parse(f))];if(l)return[o[0],...o.slice(1).map(f=>this.parse(f))]}return o.map(c=>this.parse(c))});if(this.debug(this.pattern,i),this.set=i.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){let a=this.set[o];a[0]===""&&a[1]===""&&this.globParts[o][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let n=0;n<t.length;n++)for(let i=0;i<t[n].length;i++)t[n][i]==="**"&&(t[n][i]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let i=n;for(;r[i+1]==="**";)i++;i!==n&&r.splice(n,i-n)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((n,i)=>{let o=n[n.length-1];return i==="**"&&o==="**"?n:i===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(n.pop(),n):(n.push(i),n)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){let o=t[i];i===1&&o===""&&t[0]===""||(o==="."||o==="")&&(r=!0,t.splice(i,1),i--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let n=0;for(;(n=t.indexOf("..",n+1))!==-1;){let i=t[n-1];i&&i!=="."&&i!==".."&&i!=="**"&&(r=!0,t.splice(n-1,2),n-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let n of t){let i=-1;for(;(i=n.indexOf("**",i+1))!==-1;){let a=i;for(;n[a+1]==="**";)a++;a>i&&n.splice(i+1,a-i);let u=n[i+1],c=n[i+2],l=n[i+3];if(u!==".."||!c||c==="."||c===".."||!l||l==="."||l==="..")continue;r=!0,n.splice(i,1);let f=n.slice(0);f[i]="**",t.push(f),i--}if(!this.preserveMultipleSlashes){for(let a=1;a<n.length-1;a++){let u=n[a];a===1&&u===""&&n[0]===""||(u==="."||u==="")&&(r=!0,n.splice(a,1),a--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(r=!0,n.pop())}let o=0;for(;(o=n.indexOf("..",o+1))!==-1;){let a=n[o-1];if(a&&a!=="."&&a!==".."&&a!=="**"){r=!0;let c=o===1&&n[o+1]==="**"?["."]:[];n.splice(o-1,2,...c),n.length===0&&n.push(""),o-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let n=r+1;n<t.length;n++){let i=this.partsMatch(t[r],t[n],!this.preserveMultipleSlashes);i&&(t[r]=i,t[n]=[])}return t.filter(r=>r.length)}partsMatch(t,r,n=!1){let i=0,o=0,a=[],u="";for(;i<t.length&&o<r.length;)if(t[i]===r[o])a.push(u==="b"?r[o]:t[i]),i++,o++;else if(n&&t[i]==="**"&&r[o]===t[i+1])a.push(t[i]),i++;else if(n&&r[o]==="**"&&t[i]===r[o+1])a.push(r[o]),o++;else if(t[i]==="*"&&r[o]&&(this.options.dot||!r[o].startsWith("."))&&r[o]!=="**"){if(u==="b")return!1;u="a",a.push(t[i]),i++,o++}else if(r[o]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(u==="a")return!1;u="b",a.push(r[o]),i++,o++}else return!1;return t.length===r.length&&a}parseNegate(){if(this.nonegate)return;let t=this.pattern,r=!1,n=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)r=!r,n++;n&&(this.pattern=t.slice(n)),this.negate=r}matchOne(t,r,n=!1){let i=this.options;if(this.isWindows){let y=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),b=!y&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),E=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),v=!E&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),O=b?3:y?0:void 0,I=v?3:E?0:void 0;if(typeof O=="number"&&typeof I=="number"){let[w,j]=[t[O],r[I]];w.toLowerCase()===j.toLowerCase()&&(r[I]=w,I>O?r=r.slice(I):O>I&&(t=t.slice(O)))}}let{optimizationLevel:o=1}=this.options;o>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:r}),this.debug("matchOne",t.length,r.length);for(var a=0,u=0,c=t.length,l=r.length;a<c&&u<l;a++,u++){this.debug("matchOne loop");var f=r[u],d=t[a];if(this.debug(r,f,d),f===!1)return!1;if(f===oe.GLOBSTAR){this.debug("GLOBSTAR",[r,f,d]);var _=a,m=u+1;if(m===l){for(this.debug("** at the end");a<c;a++)if(t[a]==="."||t[a]===".."||!i.dot&&t[a].charAt(0)===".")return!1;return!0}for(;_<c;){var g=t[_];if(this.debug(`
|
|
295
295
|
globstar while`,t,_,r,m,g),this.matchOne(t.slice(_),r.slice(m),n))return this.debug("globstar found match!",_,c,g),!0;if(g==="."||g===".."||!i.dot&&g.charAt(0)==="."){this.debug("dot detected!",t,_,r,m);break}this.debug("globstar swallow a segment, and continue"),_++}return!!(n&&(this.debug(`
|
|
296
|
-
>>> no match, partial?`,t,_,r,m),_===c))}let y;if(typeof f=="string"?(y=d===f,this.debug("string match",f,d,y)):(y=f.test(d),this.debug("pattern match",f,d,y)),!y)return!1}if(a===c&&u===l)return!0;if(a===c)return n;if(u===l)return a===c-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return(0,oe.braceExpand)(this.pattern,this.options)}parse(t){(0,qT.assertValidPattern)(t);let r=this.options;if(t==="**")return oe.GLOBSTAR;if(t==="")return"";let n,i=null;(n=t.match(fat))?i=r.dot?pat:dat:(n=t.match(tat))?i=(r.nocase?r.dot?sat:iat:r.dot?nat:rat)(n[1]):(n=t.match(hat))?i=(r.nocase?r.dot?_at:mat:r.dot?gat:yat)(n):(n=t.match(oat))?i=r.dot?uat:aat:(n=t.match(cat))&&(i=lat);let o=toe.AST.fromGlob(t,this.options).toMMPattern();return i?Object.assign(o,{test:i}):o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?bat:r.dot?Sat:vat,i=new Set(r.nocase?["i"]:[]),o=t.map(c=>{let l=c.map(f=>{if(f instanceof RegExp)for(let d of f.flags.split(""))i.add(d);return typeof f=="string"?Nat(f):f===oe.GLOBSTAR?oe.GLOBSTAR:f._src});return l.forEach((f,d)=>{let _=l[d+1],m=l[d-1];f!==oe.GLOBSTAR||m===oe.GLOBSTAR||(m===void 0?_!==void 0&&_!==oe.GLOBSTAR?l[d+1]="(?:\\/|"+n+"\\/)?"+_:l[d]=n:_===void 0?l[d-1]=m+"(?:\\/|"+n+")?":_!==oe.GLOBSTAR&&(l[d-1]=m+"(?:\\/|\\/"+n+"\\/)"+_,l[d+1]=oe.GLOBSTAR))}),l.filter(f=>f!==oe.GLOBSTAR).join("/")}).join("|"),[a,u]=t.length>1?["(?:",")"]:["",""];o="^"+a+o+u+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;let n=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let o=this.set;this.debug(this.pattern,"set",o);let a=i[i.length-1];if(!a)for(let u=i.length-2;!a&&u>=0;u--)a=i[u];for(let u=0;u<o.length;u++){let c=o[u],l=i;if(n.matchBase&&c.length===1&&(l=[a]),this.matchOne(l,c,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(t){return oe.minimatch.defaults(t).Minimatch}};oe.Minimatch=Md;var Aat=aF();Object.defineProperty(oe,"AST",{enumerable:!0,get:function(){return Aat.AST}});var Rat=uF();Object.defineProperty(oe,"escape",{enumerable:!0,get:function(){return Rat.escape}});var Cat=LT();Object.defineProperty(oe,"unescape",{enumerable:!0,get:function(){return Cat.unescape}});oe.minimatch.AST=toe.AST;oe.minimatch.Minimatch=Md;oe.minimatch.escape=Qot.escape;oe.minimatch.unescape=Zot.unescape});var coe=h(kT=>{"use strict";Object.defineProperty(kT,"__esModule",{value:!0});kT.LRUCache=void 0;var OE=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,ooe=new Set,cF=typeof process=="object"&&process?process:{},aoe=s((e,t,r,n)=>{typeof cF.emitWarning=="function"?cF.emitWarning(e,t,r,n):console.error(`[${r}] ${t}: ${e}`)},"emitWarning"),FT=globalThis.AbortController,soe=globalThis.AbortSignal;if(typeof FT>"u"){soe=class{static{s(this,"AbortSignal")}onabort;_onabort=[];reason;aborted=!1;addEventListener(n,i){this._onabort.push(i)}},FT=class{static{s(this,"AbortController")}constructor(){t()}signal=new soe;abort(n){if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(let i of this.signal._onabort)i(n);this.signal.onabort?.(n)}}};let e=cF.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=s(()=>{e&&(e=!1,aoe("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))},"warnACPolyfill")}var $at=s(e=>!ooe.has(e),"shouldWarn"),dxt=Symbol("type"),Wc=s(e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),"isPosInt"),uoe=s(e=>Wc(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?xm:null:null,"getUintArray"),xm=class extends Array{static{s(this,"ZeroArray")}constructor(t){super(t),this.fill(0)}},lF=class e{static{s(this,"Stack")}heap;length;static#t=!1;static create(t){let r=uoe(t);if(!r)return[];e.#t=!0;let n=new e(t,r);return e.#t=!1,n}constructor(t,r){if(!e.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},fF=class e{static{s(this,"LRUCache")}#t;#r;#n;#e;#s;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#c;#f;#l;#a;#i;#u;#E;#_;#p;#b;#d;#w;#A;#O;#v;#T;#m;static unsafeExposeInternals(t){return{starts:t.#A,ttls:t.#O,sizes:t.#w,keyMap:t.#l,keyList:t.#a,valList:t.#i,next:t.#u,prev:t.#E,get head(){return t.#_},get tail(){return t.#p},free:t.#b,isBackgroundFetch:r=>t.#h(r),backgroundFetch:(r,n,i,o)=>t.#j(r,n,i,o),moveToTail:r=>t.#L(r),indexes:r=>t.#N(r),rindexes:r=>t.#C(r),isStale:r=>t.#S(r)}}get max(){return this.#t}get maxSize(){return this.#r}get calculatedSize(){return this.#f}get size(){return this.#c}get fetchMethod(){return this.#s}get dispose(){return this.#n}get disposeAfter(){return this.#e}constructor(t){let{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:o,updateAgeOnGet:a,updateAgeOnHas:u,allowStale:c,dispose:l,disposeAfter:f,noDisposeOnSet:d,noUpdateTTL:_,maxSize:m=0,maxEntrySize:g=0,sizeCalculation:y,fetchMethod:b,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:S,allowStaleOnFetchRejection:O,allowStaleOnFetchAbort:I,ignoreFetchAbort:w}=t;if(r!==0&&!Wc(r))throw new TypeError("max option must be a nonnegative integer");let j=r?uoe(r):Array;if(!j)throw new Error("invalid max value: "+r);if(this.#t=r,this.#r=m,this.maxEntrySize=g||this.#r,this.sizeCalculation=y,this.sizeCalculation){if(!this.#r&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(b!==void 0&&typeof b!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#s=b,this.#T=!!b,this.#l=new Map,this.#a=new Array(r).fill(void 0),this.#i=new Array(r).fill(void 0),this.#u=new j(r),this.#E=new j(r),this.#_=0,this.#p=0,this.#b=lF.create(r),this.#c=0,this.#f=0,typeof l=="function"&&(this.#n=l),typeof f=="function"?(this.#e=f,this.#d=[]):(this.#e=void 0,this.#d=void 0),this.#v=!!this.#n,this.#m=!!this.#e,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!_,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!O,this.allowStaleOnFetchAbort=!!I,this.ignoreFetchAbort=!!w,this.maxEntrySize!==0){if(this.#r!==0&&!Wc(this.#r))throw new TypeError("maxSize must be a positive integer if specified");if(!Wc(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#R()}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!u,this.ttlResolution=Wc(i)||i===0?i:1,this.ttlAutopurge=!!o,this.ttl=n||0,this.ttl){if(!Wc(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P()}if(this.#t===0&&this.ttl===0&&this.#r===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#r){let F="LRU_CACHE_UNBOUNDED";$at(F)&&(ooe.add(F),aoe("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",F,e))}}getRemainingTTL(t){return this.#l.has(t)?1/0:0}#P(){let t=new xm(this.#t),r=new xm(this.#t);this.#O=t,this.#A=r,this.#o=(o,a,u=OE.now())=>{if(r[o]=a!==0?u:0,t[o]=a,a!==0&&this.ttlAutopurge){let c=setTimeout(()=>{this.#S(o)&&this.delete(this.#a[o])},a+1);c.unref&&c.unref()}},this.#y=o=>{r[o]=t[o]!==0?OE.now():0},this.#I=(o,a)=>{if(t[a]){let u=t[a],c=r[a];o.ttl=u,o.start=c,o.now=n||i();let l=o.now-c;o.remainingTTL=u-l}};let n=0,i=s(()=>{let o=OE.now();if(this.ttlResolution>0){n=o;let a=setTimeout(()=>n=0,this.ttlResolution);a.unref&&a.unref()}return o},"getNow");this.getRemainingTTL=o=>{let a=this.#l.get(o);if(a===void 0)return 0;let u=t[a],c=r[a];if(u===0||c===0)return 1/0;let l=(n||i())-c;return u-l},this.#S=o=>t[o]!==0&&r[o]!==0&&(n||i())-r[o]>t[o]}#y=()=>{};#I=()=>{};#o=()=>{};#S=()=>!1;#R(){let t=new xm(this.#t);this.#f=0,this.#w=t,this.#g=r=>{this.#f-=t[r],t[r]=0},this.#M=(r,n,i,o)=>{if(this.#h(n))return 0;if(!Wc(i))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(i=o(n,r),!Wc(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#$=(r,n,i)=>{if(t[r]=n,this.#r){let o=this.#r-t[r];for(;this.#f>o;)this.#D(!0)}this.#f+=t[r],i&&(i.entrySize=n,i.totalCalculatedSize=this.#f)}}#g=t=>{};#$=(t,r,n)=>{};#M=(t,r,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#N({allowStale:t=this.allowStale}={}){if(this.#c)for(let r=this.#p;!(!this.#U(r)||((t||!this.#S(r))&&(yield r),r===this.#_));)r=this.#E[r]}*#C({allowStale:t=this.allowStale}={}){if(this.#c)for(let r=this.#_;!(!this.#U(r)||((t||!this.#S(r))&&(yield r),r===this.#p));)r=this.#u[r]}#U(t){return t!==void 0&&this.#l.get(this.#a[t])===t}*entries(){for(let t of this.#N())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#h(this.#i[t])&&(yield[this.#a[t],this.#i[t]])}*rentries(){for(let t of this.#C())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#h(this.#i[t])&&(yield[this.#a[t],this.#i[t]])}*keys(){for(let t of this.#N()){let r=this.#a[t];r!==void 0&&!this.#h(this.#i[t])&&(yield r)}}*rkeys(){for(let t of this.#C()){let r=this.#a[t];r!==void 0&&!this.#h(this.#i[t])&&(yield r)}}*values(){for(let t of this.#N())this.#i[t]!==void 0&&!this.#h(this.#i[t])&&(yield this.#i[t])}*rvalues(){for(let t of this.#C())this.#i[t]!==void 0&&!this.#h(this.#i[t])&&(yield this.#i[t])}[Symbol.iterator](){return this.entries()}find(t,r={}){for(let n of this.#N()){let i=this.#i[n],o=this.#h(i)?i.__staleWhileFetching:i;if(o!==void 0&&t(o,this.#a[n],this))return this.get(this.#a[n],r)}}forEach(t,r=this){for(let n of this.#N()){let i=this.#i[n],o=this.#h(i)?i.__staleWhileFetching:i;o!==void 0&&t.call(r,o,this.#a[n],this)}}rforEach(t,r=this){for(let n of this.#C()){let i=this.#i[n],o=this.#h(i)?i.__staleWhileFetching:i;o!==void 0&&t.call(r,o,this.#a[n],this)}}purgeStale(){let t=!1;for(let r of this.#C({allowStale:!0}))this.#S(r)&&(this.delete(this.#a[r]),t=!0);return t}dump(){let t=[];for(let r of this.#N({allowStale:!0})){let n=this.#a[r],i=this.#i[r],o=this.#h(i)?i.__staleWhileFetching:i;if(o===void 0||n===void 0)continue;let a={value:o};if(this.#O&&this.#A){a.ttl=this.#O[r];let u=OE.now()-this.#A[r];a.start=Math.floor(Date.now()-u)}this.#w&&(a.size=this.#w[r]),t.unshift([n,a])}return t}load(t){this.clear();for(let[r,n]of t){if(n.start){let i=Date.now()-n.start;n.start=OE.now()-i}this.set(r,n.value,n)}}set(t,r,n={}){if(r===void 0)return this.delete(t),this;let{ttl:i=this.ttl,start:o,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:u=this.sizeCalculation,status:c}=n,{noUpdateTTL:l=this.noUpdateTTL}=n,f=this.#M(t,r,n.size||0,u);if(this.maxEntrySize&&f>this.maxEntrySize)return c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this.delete(t),this;let d=this.#c===0?void 0:this.#l.get(t);if(d===void 0)d=this.#c===0?this.#p:this.#b.length!==0?this.#b.pop():this.#c===this.#t?this.#D(!1):this.#c,this.#a[d]=t,this.#i[d]=r,this.#l.set(t,d),this.#u[this.#p]=d,this.#E[d]=this.#p,this.#p=d,this.#c++,this.#$(d,f,c),c&&(c.set="add"),l=!1;else{this.#L(d);let _=this.#i[d];if(r!==_){if(this.#T&&this.#h(_)){_.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:m}=_;m!==void 0&&!a&&(this.#v&&this.#n?.(m,t,"set"),this.#m&&this.#d?.push([m,t,"set"]))}else a||(this.#v&&this.#n?.(_,t,"set"),this.#m&&this.#d?.push([_,t,"set"]));if(this.#g(d),this.#$(d,f,c),this.#i[d]=r,c){c.set="replace";let m=_&&this.#h(_)?_.__staleWhileFetching:_;m!==void 0&&(c.oldValue=m)}}else c&&(c.set="update")}if(i!==0&&!this.#O&&this.#P(),this.#O&&(l||this.#o(d,i,o),c&&this.#I(c,d)),!a&&this.#m&&this.#d){let _=this.#d,m;for(;m=_?.shift();)this.#e?.(...m)}return this}pop(){try{for(;this.#c;){let t=this.#i[this.#_];if(this.#D(!0),this.#h(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#m&&this.#d){let t=this.#d,r;for(;r=t?.shift();)this.#e?.(...r)}}}#D(t){let r=this.#_,n=this.#a[r],i=this.#i[r];return this.#T&&this.#h(i)?i.__abortController.abort(new Error("evicted")):(this.#v||this.#m)&&(this.#v&&this.#n?.(i,n,"evict"),this.#m&&this.#d?.push([i,n,"evict"])),this.#g(r),t&&(this.#a[r]=void 0,this.#i[r]=void 0,this.#b.push(r)),this.#c===1?(this.#_=this.#p=0,this.#b.length=0):this.#_=this.#u[r],this.#l.delete(n),this.#c--,r}has(t,r={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=r,o=this.#l.get(t);if(o!==void 0){let a=this.#i[o];if(this.#h(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#S(o))i&&(i.has="stale",this.#I(i,o));else return n&&this.#y(o),i&&(i.has="hit",this.#I(i,o)),!0}else i&&(i.has="miss");return!1}peek(t,r={}){let{allowStale:n=this.allowStale}=r,i=this.#l.get(t);if(i!==void 0&&(n||!this.#S(i))){let o=this.#i[i];return this.#h(o)?o.__staleWhileFetching:o}}#j(t,r,n,i){let o=r===void 0?void 0:this.#i[r];if(this.#h(o))return o;let a=new FT,{signal:u}=n;u?.addEventListener("abort",()=>a.abort(u.reason),{signal:a.signal});let c={signal:a.signal,options:n,context:i},l=s((y,b=!1)=>{let{aborted:E}=a.signal,S=n.ignoreFetchAbort&&y!==void 0;if(n.status&&(E&&!b?(n.status.fetchAborted=!0,n.status.fetchError=a.signal.reason,S&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),E&&!S&&!b)return d(a.signal.reason);let O=m;return this.#i[r]===m&&(y===void 0?O.__staleWhileFetching?this.#i[r]=O.__staleWhileFetching:this.delete(t):(n.status&&(n.status.fetchUpdated=!0),this.set(t,y,c.options))),y},"cb"),f=s(y=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=y),d(y)),"eb"),d=s(y=>{let{aborted:b}=a.signal,E=b&&n.allowStaleOnFetchAbort,S=E||n.allowStaleOnFetchRejection,O=S||n.noDeleteOnFetchRejection,I=m;if(this.#i[r]===m&&(!O||I.__staleWhileFetching===void 0?this.delete(t):E||(this.#i[r]=I.__staleWhileFetching)),S)return n.status&&I.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),I.__staleWhileFetching;if(I.__returned===I)throw y},"fetchFail"),_=s((y,b)=>{let E=this.#s?.(t,o,c);E&&E instanceof Promise&&E.then(S=>y(S===void 0?void 0:S),b),a.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(y(void 0),n.allowStaleOnFetchAbort&&(y=s(S=>l(S,!0),"res")))})},"pcall");n.status&&(n.status.fetchDispatched=!0);let m=new Promise(_).then(l,f),g=Object.assign(m,{__abortController:a,__staleWhileFetching:o,__returned:void 0});return r===void 0?(this.set(t,g,{...c.options,status:void 0}),r=this.#l.get(t)):this.#i[r]=g,g}#h(t){if(!this.#T)return!1;let r=t;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof FT}async fetch(t,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:c=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:_=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:y,forceRefresh:b=!1,status:E,signal:S}=r;if(!this.#T)return E&&(E.fetch="get"),this.get(t,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,status:E});let O={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,ttl:a,noDisposeOnSet:u,size:c,sizeCalculation:l,noUpdateTTL:f,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:_,allowStaleOnFetchAbort:g,ignoreFetchAbort:m,status:E,signal:S},I=this.#l.get(t);if(I===void 0){E&&(E.fetch="miss");let w=this.#j(t,I,O,y);return w.__returned=w}else{let w=this.#i[I];if(this.#h(w)){let re=n&&w.__staleWhileFetching!==void 0;return E&&(E.fetch="inflight",re&&(E.returnedStale=!0)),re?w.__staleWhileFetching:w.__returned=w}let j=this.#S(I);if(!b&&!j)return E&&(E.fetch="hit"),this.#L(I),i&&this.#y(I),E&&this.#I(E,I),w;let F=this.#j(t,I,O,y),H=F.__staleWhileFetching!==void 0&&n;return E&&(E.fetch=j?"stale":"refresh",H&&j&&(E.returnedStale=!0)),H?F.__staleWhileFetching:F.__returned=F}}get(t,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:a}=r,u=this.#l.get(t);if(u!==void 0){let c=this.#i[u],l=this.#h(c);return a&&this.#I(a,u),this.#S(u)?(a&&(a.get="stale"),l?(a&&n&&c.__staleWhileFetching!==void 0&&(a.returnedStale=!0),n?c.__staleWhileFetching:void 0):(o||this.delete(t),a&&n&&(a.returnedStale=!0),n?c:void 0)):(a&&(a.get="hit"),l?c.__staleWhileFetching:(this.#L(u),i&&this.#y(u),c))}else a&&(a.get="miss")}#x(t,r){this.#E[r]=t,this.#u[t]=r}#L(t){t!==this.#p&&(t===this.#_?this.#_=this.#u[t]:this.#x(this.#E[t],this.#u[t]),this.#x(this.#p,t),this.#p=t)}delete(t){let r=!1;if(this.#c!==0){let n=this.#l.get(t);if(n!==void 0)if(r=!0,this.#c===1)this.clear();else{this.#g(n);let i=this.#i[n];this.#h(i)?i.__abortController.abort(new Error("deleted")):(this.#v||this.#m)&&(this.#v&&this.#n?.(i,t,"delete"),this.#m&&this.#d?.push([i,t,"delete"])),this.#l.delete(t),this.#a[n]=void 0,this.#i[n]=void 0,n===this.#p?this.#p=this.#E[n]:n===this.#_?this.#_=this.#u[n]:(this.#u[this.#E[n]]=this.#u[n],this.#E[this.#u[n]]=this.#E[n]),this.#c--,this.#b.push(n)}}if(this.#m&&this.#d?.length){let n=this.#d,i;for(;i=n?.shift();)this.#e?.(...i)}return r}clear(){for(let t of this.#C({allowStale:!0})){let r=this.#i[t];if(this.#h(r))r.__abortController.abort(new Error("deleted"));else{let n=this.#a[t];this.#v&&this.#n?.(r,n,"delete"),this.#m&&this.#d?.push([r,n,"delete"])}}if(this.#l.clear(),this.#i.fill(void 0),this.#a.fill(void 0),this.#O&&this.#A&&(this.#O.fill(0),this.#A.fill(0)),this.#w&&this.#w.fill(0),this.#_=0,this.#p=0,this.#b.length=0,this.#f=0,this.#c=0,this.#m&&this.#d){let t=this.#d,r;for(;r=t?.shift();)this.#e?.(...r)}}};kT.LRUCache=fF});var EF=h(Xn=>{"use strict";var Dat=Xn&&Xn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xn,"__esModule",{value:!0});Xn.Minipass=Xn.isWritable=Xn.isReadable=Xn.isStream=void 0;var loe=typeof process=="object"&&process?process:{stdout:null,stderr:null},yF=require("events"),hoe=Dat(require("stream")),Lat=require("string_decoder"),jat=s(e=>!!e&&typeof e=="object"&&(e instanceof WT||e instanceof hoe.default||(0,Xn.isReadable)(e)||(0,Xn.isWritable)(e)),"isStream");Xn.isStream=jat;var Mat=s(e=>!!e&&typeof e=="object"&&e instanceof yF.EventEmitter&&typeof e.pipe=="function"&&e.pipe!==hoe.default.Writable.prototype.pipe,"isReadable");Xn.isReadable=Mat;var Uat=s(e=>!!e&&typeof e=="object"&&e instanceof yF.EventEmitter&&typeof e.write=="function"&&typeof e.end=="function","isWritable");Xn.isWritable=Uat;var Ou=Symbol("EOF"),Pu=Symbol("maybeEmitEnd"),Yc=Symbol("emittedEnd"),BT=Symbol("emittingEnd"),PE=Symbol("emittedError"),GT=Symbol("closed"),foe=Symbol("read"),VT=Symbol("flush"),doe=Symbol("flushChunk"),Po=Symbol("encoding"),qm=Symbol("decoder"),Fr=Symbol("flowing"),IE=Symbol("paused"),Fm=Symbol("resume"),kr=Symbol("buffer"),Jn=Symbol("pipes"),Br=Symbol("bufferLength"),dF=Symbol("bufferPush"),zT=Symbol("bufferShift"),An=Symbol("objectMode"),gr=Symbol("destroyed"),pF=Symbol("error"),hF=Symbol("emitData"),poe=Symbol("emitEnd"),mF=Symbol("emitEnd2"),va=Symbol("async"),_F=Symbol("abort"),HT=Symbol("aborted"),wE=Symbol("signal"),Ud=Symbol("dataListeners"),Wi=Symbol("discarded"),TE=s(e=>Promise.resolve().then(e),"defer"),xat=s(e=>e(),"nodefer"),qat=s(e=>e==="end"||e==="finish"||e==="prefinish","isEndish"),Fat=s(e=>e instanceof ArrayBuffer||!!e&&typeof e=="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0,"isArrayBufferLike"),kat=s(e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e),"isArrayBufferView"),KT=class{static{s(this,"Pipe")}src;dest;opts;ondrain;constructor(t,r,n){this.src=t,this.dest=r,this.opts=n,this.ondrain=()=>t[Fm](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},gF=class extends KT{static{s(this,"PipeProxyErrors")}unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,r,n){super(t,r,n),this.proxyErrors=i=>r.emit("error",i),t.on("error",this.proxyErrors)}},Bat=s(e=>!!e.objectMode,"isObjectModeOptions"),Gat=s(e=>!e.objectMode&&!!e.encoding&&e.encoding!=="buffer","isEncodingOptions"),WT=class extends yF.EventEmitter{static{s(this,"Minipass")}[Fr]=!1;[IE]=!1;[Jn]=[];[kr]=[];[An];[Po];[va];[qm];[Ou]=!1;[Yc]=!1;[BT]=!1;[GT]=!1;[PE]=null;[Br]=0;[gr]=!1;[wE];[HT]=!1;[Ud]=0;[Wi]=!1;writable=!0;readable=!0;constructor(...t){let r=t[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");Bat(r)?(this[An]=!0,this[Po]=null):Gat(r)?(this[Po]=r.encoding,this[An]=!1):(this[An]=!1,this[Po]=null),this[va]=!!r.async,this[qm]=this[Po]?new Lat.StringDecoder(this[Po]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[kr]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Jn]});let{signal:n}=r;n&&(this[wE]=n,n.aborted?this[_F]():n.addEventListener("abort",()=>this[_F]()))}get bufferLength(){return this[Br]}get encoding(){return this[Po]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[An]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[va]}set async(t){this[va]=this[va]||!!t}[_F](){this[HT]=!0,this.emit("abort",this[wE]?.reason),this.destroy(this[wE]?.reason)}get aborted(){return this[HT]}set aborted(t){}write(t,r,n){if(this[HT])return!1;if(this[Ou])throw new Error("write after end");if(this[gr])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(n=r,r="utf8"),r||(r="utf8");let i=this[va]?TE:xat;if(!this[An]&&!Buffer.isBuffer(t)){if(kat(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(Fat(t))t=Buffer.from(t);else if(typeof t!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[An]?(this[Fr]&&this[Br]!==0&&this[VT](!0),this[Fr]?this.emit("data",t):this[dF](t),this[Br]!==0&&this.emit("readable"),n&&i(n),this[Fr]):t.length?(typeof t=="string"&&!(r===this[Po]&&!this[qm]?.lastNeed)&&(t=Buffer.from(t,r)),Buffer.isBuffer(t)&&this[Po]&&(t=this[qm].write(t)),this[Fr]&&this[Br]!==0&&this[VT](!0),this[Fr]?this.emit("data",t):this[dF](t),this[Br]!==0&&this.emit("readable"),n&&i(n),this[Fr]):(this[Br]!==0&&this.emit("readable"),n&&i(n),this[Fr])}read(t){if(this[gr])return null;if(this[Wi]=!1,this[Br]===0||t===0||t&&t>this[Br])return this[Pu](),null;this[An]&&(t=null),this[kr].length>1&&!this[An]&&(this[kr]=[this[Po]?this[kr].join(""):Buffer.concat(this[kr],this[Br])]);let r=this[foe](t||null,this[kr][0]);return this[Pu](),r}[foe](t,r){if(this[An])this[zT]();else{let n=r;t===n.length||t===null?this[zT]():typeof n=="string"?(this[kr][0]=n.slice(t),r=n.slice(0,t),this[Br]-=t):(this[kr][0]=n.subarray(t),r=n.subarray(0,t),this[Br]-=t)}return this.emit("data",r),!this[kr].length&&!this[Ou]&&this.emit("drain"),r}end(t,r,n){return typeof t=="function"&&(n=t,t=void 0),typeof r=="function"&&(n=r,r="utf8"),t!==void 0&&this.write(t,r),n&&this.once("end",n),this[Ou]=!0,this.writable=!1,(this[Fr]||!this[IE])&&this[Pu](),this}[Fm](){this[gr]||(!this[Ud]&&!this[Jn].length&&(this[Wi]=!0),this[IE]=!1,this[Fr]=!0,this.emit("resume"),this[kr].length?this[VT]():this[Ou]?this[Pu]():this.emit("drain"))}resume(){return this[Fm]()}pause(){this[Fr]=!1,this[IE]=!0,this[Wi]=!1}get destroyed(){return this[gr]}get flowing(){return this[Fr]}get paused(){return this[IE]}[dF](t){this[An]?this[Br]+=1:this[Br]+=t.length,this[kr].push(t)}[zT](){return this[An]?this[Br]-=1:this[Br]-=this[kr][0].length,this[kr].shift()}[VT](t=!1){do;while(this[doe](this[zT]())&&this[kr].length);!t&&!this[kr].length&&!this[Ou]&&this.emit("drain")}[doe](t){return this.emit("data",t),this[Fr]}pipe(t,r){if(this[gr])return t;this[Wi]=!1;let n=this[Yc];return r=r||{},t===loe.stdout||t===loe.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,n?r.end&&t.end():(this[Jn].push(r.proxyErrors?new gF(this,t,r):new KT(this,t,r)),this[va]?TE(()=>this[Fm]()):this[Fm]()),t}unpipe(t){let r=this[Jn].find(n=>n.dest===t);r&&(this[Jn].length===1?(this[Fr]&&this[Ud]===0&&(this[Fr]=!1),this[Jn]=[]):this[Jn].splice(this[Jn].indexOf(r),1),r.unpipe())}addListener(t,r){return this.on(t,r)}on(t,r){let n=super.on(t,r);if(t==="data")this[Wi]=!1,this[Ud]++,!this[Jn].length&&!this[Fr]&&this[Fm]();else if(t==="readable"&&this[Br]!==0)super.emit("readable");else if(qat(t)&&this[Yc])super.emit(t),this.removeAllListeners(t);else if(t==="error"&&this[PE]){let i=r;this[va]?TE(()=>i.call(this,this[PE])):i.call(this,this[PE])}return n}removeListener(t,r){return this.off(t,r)}off(t,r){let n=super.off(t,r);return t==="data"&&(this[Ud]=this.listeners("data").length,this[Ud]===0&&!this[Wi]&&!this[Jn].length&&(this[Fr]=!1)),n}removeAllListeners(t){let r=super.removeAllListeners(t);return(t==="data"||t===void 0)&&(this[Ud]=0,!this[Wi]&&!this[Jn].length&&(this[Fr]=!1)),r}get emittedEnd(){return this[Yc]}[Pu](){!this[BT]&&!this[Yc]&&!this[gr]&&this[kr].length===0&&this[Ou]&&(this[BT]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[GT]&&this.emit("close"),this[BT]=!1)}emit(t,...r){let n=r[0];if(t!=="error"&&t!=="close"&&t!==gr&&this[gr])return!1;if(t==="data")return!this[An]&&!n?!1:this[va]?(TE(()=>this[hF](n)),!0):this[hF](n);if(t==="end")return this[poe]();if(t==="close"){if(this[GT]=!0,!this[Yc]&&!this[gr])return!1;let o=super.emit("close");return this.removeAllListeners("close"),o}else if(t==="error"){this[PE]=n,super.emit(pF,n);let o=!this[wE]||this.listeners("error").length?super.emit("error",n):!1;return this[Pu](),o}else if(t==="resume"){let o=super.emit("resume");return this[Pu](),o}else if(t==="finish"||t==="prefinish"){let o=super.emit(t);return this.removeAllListeners(t),o}let i=super.emit(t,...r);return this[Pu](),i}[hF](t){for(let n of this[Jn])n.dest.write(t)===!1&&this.pause();let r=this[Wi]?!1:super.emit("data",t);return this[Pu](),r}[poe](){return this[Yc]?!1:(this[Yc]=!0,this.readable=!1,this[va]?(TE(()=>this[mF]()),!0):this[mF]())}[mF](){if(this[qm]){let r=this[qm].end();if(r){for(let n of this[Jn])n.dest.write(r);this[Wi]||super.emit("data",r)}}for(let r of this[Jn])r.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[An]||(t.dataLength=0);let r=this.promise();return this.on("data",n=>{t.push(n),this[An]||(t.dataLength+=n.length)}),await r,t}async concat(){if(this[An])throw new Error("cannot concat in objectMode");let t=await this.collect();return this[Po]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,r)=>{this.on(gr,()=>r(new Error("stream destroyed"))),this.on("error",n=>r(n)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[Wi]=!1;let t=!1,r=s(async()=>(this.pause(),t=!0,{value:void 0,done:!0}),"stop");return{next:s(()=>{if(t)return r();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[Ou])return r();let o,a,u=s(d=>{this.off("data",c),this.off("end",l),this.off(gr,f),r(),a(d)},"onerr"),c=s(d=>{this.off("error",u),this.off("end",l),this.off(gr,f),this.pause(),o({value:d,done:!!this[Ou]})},"ondata"),l=s(()=>{this.off("error",u),this.off("data",c),this.off(gr,f),r(),o({done:!0,value:void 0})},"onend"),f=s(()=>u(new Error("stream destroyed")),"ondestroy");return new Promise((d,_)=>{a=_,o=d,this.once(gr,f),this.once("error",u),this.once("end",l),this.once("data",c)})},"next"),throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Wi]=!1;let t=!1,r=s(()=>(this.pause(),this.off(pF,r),this.off(gr,r),this.off("end",r),t=!0,{done:!0,value:void 0}),"stop"),n=s(()=>{if(t)return r();let i=this.read();return i===null?r():{done:!1,value:i}},"next");return this.once("end",r),this.once(pF,r),this.once(gr,r),{next:n,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(t){if(this[gr])return t?this.emit("error",t):this.emit(gr),this;this[gr]=!0,this[Wi]=!0,this[kr].length=0,this[Br]=0;let r=this;return typeof r.close=="function"&&!this[GT]&&r.close(),t?this.emit("error",t):this.emit(gr),this}static get isStream(){return Xn.isStream}};Xn.Minipass=WT});var Aoe=h(Ot=>{"use strict";var Vat=Ot&&Ot.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),zat=Ot&&Ot.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Hat=Ot&&Ot.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Vat(t,e,r);return zat(t,e),t};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.PathScurry=Ot.Path=Ot.PathScurryDarwin=Ot.PathScurryPosix=Ot.PathScurryWin32=Ot.PathScurryBase=Ot.PathPosix=Ot.PathWin32=Ot.PathBase=Ot.ChildrenCache=Ot.ResolveCache=void 0;var boe=coe(),ZT=require("path"),Kat=require("url"),Wat=Hat(require("fs")),AE=require("fs"),Yat=AE.realpathSync.native,YT=require("fs/promises"),moe=EF(),RE={lstatSync:AE.lstatSync,readdir:AE.readdir,readdirSync:AE.readdirSync,readlinkSync:AE.readlinkSync,realpathSync:Yat,promises:{lstat:YT.lstat,readdir:YT.readdir,readlink:YT.readlink,realpath:YT.realpath}},Soe=s(e=>!e||e===RE||e===Wat?RE:{...RE,...e,promises:{...RE.promises,...e.promises||{}}},"fsFromOption"),voe=/^\\\\\?\\([a-z]:)\\?$/i,Jat=s(e=>e.replace(/\//g,"\\").replace(voe,"$1\\"),"uncToDrive"),Xat=/[\\\/]/,Ls=0,Ooe=1,Poe=2,Oa=4,Ioe=6,woe=8,xd=10,Toe=12,Ds=15,NE=~Ds,bF=16,_oe=32,CE=64,Io=128,JT=256,QT=512,goe=CE|Io|QT,Qat=1023,SF=s(e=>e.isFile()?woe:e.isDirectory()?Oa:e.isSymbolicLink()?xd:e.isCharacterDevice()?Poe:e.isBlockDevice()?Ioe:e.isSocket()?Toe:e.isFIFO()?Ooe:Ls,"entToType"),yoe=new Map,$E=s(e=>{let t=yoe.get(e);if(t)return t;let r=e.normalize("NFKD");return yoe.set(e,r),r},"normalize"),Eoe=new Map,XT=s(e=>{let t=Eoe.get(e);if(t)return t;let r=$E(e.toLowerCase());return Eoe.set(e,r),r},"normalizeNocase"),DE=class extends boe.LRUCache{static{s(this,"ResolveCache")}constructor(){super({max:256})}};Ot.ResolveCache=DE;var e1=class extends boe.LRUCache{static{s(this,"ChildrenCache")}constructor(t=16*1024){super({maxSize:t,sizeCalculation:r=>r.length+1})}};Ot.ChildrenCache=e1;var Noe=Symbol("PathScurry setAsCwd"),un=class{static{s(this,"PathBase")}name;root;roots;parent;nocase;#t;#r;get dev(){return this.#r}#n;get mode(){return this.#n}#e;get nlink(){return this.#e}#s;get uid(){return this.#s}#c;get gid(){return this.#c}#f;get rdev(){return this.#f}#l;get blksize(){return this.#l}#a;get ino(){return this.#a}#i;get size(){return this.#i}#u;get blocks(){return this.#u}#E;get atimeMs(){return this.#E}#_;get mtimeMs(){return this.#_}#p;get ctimeMs(){return this.#p}#b;get birthtimeMs(){return this.#b}#d;get atime(){return this.#d}#w;get mtime(){return this.#w}#A;get ctime(){return this.#A}#O;get birthtime(){return this.#O}#v;#T;#m;#P;#y;#I;#o;#S;#R;#g;get path(){return(this.parent||this).fullpath()}constructor(t,r=Ls,n,i,o,a,u){this.name=t,this.#v=o?XT(t):$E(t),this.#o=r&Qat,this.nocase=o,this.roots=i,this.root=n||this,this.#S=a,this.#m=u.fullpath,this.#y=u.relative,this.#I=u.relativePosix,this.parent=u.parent,this.parent?this.#t=this.parent.#t:this.#t=Soe(u.fs)}depth(){return this.#T!==void 0?this.#T:this.parent?this.#T=this.parent.depth()+1:this.#T=0}childrenCache(){return this.#S}resolve(t){if(!t)return this;let r=this.getRootString(t),i=t.substring(r.length).split(this.splitSep);return r?this.getRoot(r).#$(i):this.#$(i)}#$(t){let r=this;for(let n of t)r=r.child(n);return r}children(){let t=this.#S.get(this);if(t)return t;let r=Object.assign([],{provisional:0});return this.#S.set(this,r),this.#o&=~bF,r}child(t,r){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let n=this.children(),i=this.nocase?XT(t):$E(t);for(let c of n)if(c.#v===i)return c;let o=this.parent?this.sep:"",a=this.#m?this.#m+o+t:void 0,u=this.newChild(t,Ls,{...r,parent:this,fullpath:a});return this.canReaddir()||(u.#o|=Io),n.push(u),u}relative(){if(this.#y!==void 0)return this.#y;let t=this.name,r=this.parent;if(!r)return this.#y=this.name;let n=r.relative();return n+(!n||!r.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.#I!==void 0)return this.#I;let t=this.name,r=this.parent;if(!r)return this.#I=this.fullpathPosix();let n=r.relativePosix();return n+(!n||!r.parent?"":"/")+t}fullpath(){if(this.#m!==void 0)return this.#m;let t=this.name,r=this.parent;if(!r)return this.#m=this.name;let i=r.fullpath()+(r.parent?this.sep:"")+t;return this.#m=i}fullpathPosix(){if(this.#P!==void 0)return this.#P;if(this.sep==="/")return this.#P=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#P=`//?/${i}`:this.#P=i}let t=this.parent,r=t.fullpathPosix(),n=r+(!r||!t.parent?"":"/")+this.name;return this.#P=n}isUnknown(){return(this.#o&Ds)===Ls}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#o&Ds)===woe}isDirectory(){return(this.#o&Ds)===Oa}isCharacterDevice(){return(this.#o&Ds)===Poe}isBlockDevice(){return(this.#o&Ds)===Ioe}isFIFO(){return(this.#o&Ds)===Ooe}isSocket(){return(this.#o&Ds)===Toe}isSymbolicLink(){return(this.#o&xd)===xd}lstatCached(){return this.#o&_oe?this:void 0}readlinkCached(){return this.#R}realpathCached(){return this.#g}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#R)return!0;if(!this.parent)return!1;let t=this.#o&Ds;return!(t!==Ls&&t!==xd||this.#o&JT||this.#o&Io)}calledReaddir(){return!!(this.#o&bF)}isENOENT(){return!!(this.#o&Io)}isNamed(t){return this.nocase?this.#v===XT(t):this.#v===$E(t)}async readlink(){let t=this.#R;if(t)return t;if(this.canReadlink()&&this.parent)try{let r=await this.#t.promises.readlink(this.fullpath()),n=this.parent.resolve(r);if(n)return this.#R=n}catch(r){this.#x(r.code);return}}readlinkSync(){let t=this.#R;if(t)return t;if(this.canReadlink()&&this.parent)try{let r=this.#t.readlinkSync(this.fullpath()),n=this.parent.resolve(r);if(n)return this.#R=n}catch(r){this.#x(r.code);return}}#M(t){this.#o|=bF;for(let r=t.provisional;r<t.length;r++)t[r].#N()}#N(){this.#o&Io||(this.#o=(this.#o|Io)&NE,this.#C())}#C(){let t=this.children();t.provisional=0;for(let r of t)r.#N()}#U(){this.#o|=QT,this.#D()}#D(){if(this.#o&CE)return;let t=this.#o;(t&Ds)===Oa&&(t&=NE),this.#o=t|CE,this.#C()}#j(t=""){t==="ENOTDIR"||t==="EPERM"?this.#D():t==="ENOENT"?this.#N():this.children().provisional=0}#h(t=""){t==="ENOTDIR"?this.parent.#D():t==="ENOENT"&&this.#N()}#x(t=""){let r=this.#o;r|=JT,t==="ENOENT"&&(r|=Io),(t==="EINVAL"||t==="UNKNOWN")&&(r&=NE),this.#o=r,t==="ENOTDIR"&&this.parent&&this.parent.#D()}#L(t,r){return this.#V(t,r)||this.#G(t,r)}#G(t,r){let n=SF(t),i=this.newChild(t.name,n,{parent:this}),o=i.#o&Ds;return o!==Oa&&o!==xd&&o!==Ls&&(i.#o|=CE),r.unshift(i),r.provisional++,i}#V(t,r){for(let n=r.provisional;n<r.length;n++){let i=r[n];if((this.nocase?XT(t.name):$E(t.name))===i.#v)return this.#z(t,i,n,r)}}#z(t,r,n,i){let o=r.name;return r.#o=r.#o&NE|SF(t),o!==t.name&&(r.name=t.name),n!==i.provisional&&(n===i.length-1?i.pop():i.splice(n,1),i.unshift(r)),i.provisional++,r}async lstat(){if(!(this.#o&Io))try{return this.#B(await this.#t.promises.lstat(this.fullpath())),this}catch(t){this.#h(t.code)}}lstatSync(){if(!(this.#o&Io))try{return this.#B(this.#t.lstatSync(this.fullpath())),this}catch(t){this.#h(t.code)}}#B(t){let{atime:r,atimeMs:n,birthtime:i,birthtimeMs:o,blksize:a,blocks:u,ctime:c,ctimeMs:l,dev:f,gid:d,ino:_,mode:m,mtime:g,mtimeMs:y,nlink:b,rdev:E,size:S,uid:O}=t;this.#d=r,this.#E=n,this.#O=i,this.#b=o,this.#l=a,this.#u=u,this.#A=c,this.#p=l,this.#r=f,this.#c=d,this.#a=_,this.#n=m,this.#w=g,this.#_=y,this.#e=b,this.#f=E,this.#i=S,this.#s=O;let I=SF(t);this.#o=this.#o&NE|I|_oe,I!==Ls&&I!==Oa&&I!==xd&&(this.#o|=CE)}#F=[];#k=!1;#H(t){this.#k=!1;let r=this.#F.slice();this.#F.length=0,r.forEach(n=>n(null,t))}readdirCB(t,r=!1){if(!this.canReaddir()){r?t(null,[]):queueMicrotask(()=>t(null,[]));return}let n=this.children();if(this.calledReaddir()){let o=n.slice(0,n.provisional);r?t(null,o):queueMicrotask(()=>t(null,o));return}if(this.#F.push(t),this.#k)return;this.#k=!0;let i=this.fullpath();this.#t.readdir(i,{withFileTypes:!0},(o,a)=>{if(o)this.#j(o.code),n.provisional=0;else{for(let u of a)this.#L(u,n);this.#M(n)}this.#H(n.slice(0,n.provisional))})}#q;async readdir(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let r=this.fullpath();if(this.#q)await this.#q;else{let n=s(()=>{},"resolve");this.#q=new Promise(i=>n=i);try{for(let i of await this.#t.promises.readdir(r,{withFileTypes:!0}))this.#L(i,t);this.#M(t)}catch(i){this.#j(i.code),t.provisional=0}this.#q=void 0,n()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let r=this.fullpath();try{for(let n of this.#t.readdirSync(r,{withFileTypes:!0}))this.#L(n,t);this.#M(t)}catch(n){this.#j(n.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(this.#o&goe)return!1;let t=Ds&this.#o;return t===Ls||t===Oa||t===xd}shouldWalk(t,r){return(this.#o&Oa)===Oa&&!(this.#o&goe)&&!t.has(this)&&(!r||r(this))}async realpath(){if(this.#g)return this.#g;if(!((QT|JT|Io)&this.#o))try{let t=await this.#t.promises.realpath(this.fullpath());return this.#g=this.resolve(t)}catch{this.#U()}}realpathSync(){if(this.#g)return this.#g;if(!((QT|JT|Io)&this.#o))try{let t=this.#t.realpathSync(this.fullpath());return this.#g=this.resolve(t)}catch{this.#U()}}[Noe](t){if(t===this)return;let r=new Set([]),n=[],i=this;for(;i&&i.parent;)r.add(i),i.#y=n.join(this.sep),i.#I=n.join("/"),i=i.parent,n.push("..");for(i=t;i&&i.parent&&!r.has(i);)i.#y=void 0,i.#I=void 0,i=i.parent}};Ot.PathBase=un;var LE=class e extends un{static{s(this,"PathWin32")}sep="\\";splitSep=Xat;constructor(t,r=Ls,n,i,o,a,u){super(t,r,n,i,o,a,u)}newChild(t,r=Ls,n={}){return new e(t,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}getRootString(t){return ZT.win32.parse(t).root}getRoot(t){if(t=Jat(t.toUpperCase()),t===this.root.name)return this.root;for(let[r,n]of Object.entries(this.roots))if(this.sameRoot(t,r))return this.roots[t]=n;return this.roots[t]=new UE(t,this).root}sameRoot(t,r=this.root.name){return t=t.toUpperCase().replace(/\//g,"\\").replace(voe,"$1\\"),t===r}};Ot.PathWin32=LE;var jE=class e extends un{static{s(this,"PathPosix")}splitSep="/";sep="/";constructor(t,r=Ls,n,i,o,a,u){super(t,r,n,i,o,a,u)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,r=Ls,n={}){return new e(t,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}};Ot.PathPosix=jE;var ME=class{static{s(this,"PathScurryBase")}root;rootPath;roots;cwd;#t;#r;#n;nocase;#e;constructor(t=process.cwd(),r,n,{nocase:i,childrenCacheSize:o=16*1024,fs:a=RE}={}){this.#e=Soe(a),(t instanceof URL||t.startsWith("file://"))&&(t=(0,Kat.fileURLToPath)(t));let u=r.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(u),this.#t=new DE,this.#r=new DE,this.#n=new e1(o);let c=u.substring(this.rootPath.length).split(n);if(c.length===1&&!c[0]&&c.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#e),this.roots[this.rootPath]=this.root;let l=this.root,f=c.length-1,d=r.sep,_=this.rootPath,m=!1;for(let g of c){let y=f--;l=l.child(g,{relative:new Array(y).fill("..").join(d),relativePosix:new Array(y).fill("..").join("/"),fullpath:_+=(m?"":d)+g}),m=!0}this.cwd=l}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#n}resolve(...t){let r="";for(let o=t.length-1;o>=0;o--){let a=t[o];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let n=this.#t.get(r);if(n!==void 0)return n;let i=this.cwd.resolve(r).fullpath();return this.#t.set(r,i),i}resolvePosix(...t){let r="";for(let o=t.length-1;o>=0;o--){let a=t[o];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let n=this.#r.get(r);if(n!==void 0)return n;let i=this.cwd.resolve(r).fullpathPosix();return this.#r.set(r,i),i}relative(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,r={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n}=r;if(t.canReaddir()){let i=await t.readdir();return n?i:i.map(o=>o.name)}else return[]}readdirSync(t=this.cwd,r={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n=!0}=r;return t.canReaddir()?n?t.readdirSync():t.readdirSync().map(i=>i.name):[]}async lstat(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t.withFileTypes,t=this.cwd);let n=await t.readlink();return r?n:n?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t.withFileTypes,t=this.cwd);let n=t.readlinkSync();return r?n:n?.fullpath()}async realpath(t=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t.withFileTypes,t=this.cwd);let n=await t.realpath();return r?n:n?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t.withFileTypes,t=this.cwd);let n=t.realpathSync();return r?n:n?.fullpath()}async walk(t=this.cwd,r={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r,u=[];(!o||o(t))&&u.push(n?t:t.fullpath());let c=new Set,l=s((d,_)=>{c.add(d),d.readdirCB((m,g)=>{if(m)return _(m);let y=g.length;if(!y)return _();let b=s(()=>{--y===0&&_()},"next");for(let E of g)(!o||o(E))&&u.push(n?E:E.fullpath()),i&&E.isSymbolicLink()?E.realpath().then(S=>S?.isUnknown()?S.lstat():S).then(S=>S?.shouldWalk(c,a)?l(S,b):b()):E.shouldWalk(c,a)?l(E,b):b()},!0)},"walk"),f=t;return new Promise((d,_)=>{l(f,m=>{if(m)return _(m);d(u)})})}walkSync(t=this.cwd,r={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r,u=[];(!o||o(t))&&u.push(n?t:t.fullpath());let c=new Set([t]);for(let l of c){let f=l.readdirSync();for(let d of f){(!o||o(d))&&u.push(n?d:d.fullpath());let _=d;if(d.isSymbolicLink()){if(!(i&&(_=d.realpathSync())))continue;_.isUnknown()&&_.lstatSync()}_.shouldWalk(c,a)&&c.add(_)}}return u}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,r={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd),this.stream(t,r)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,r={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r;(!o||o(t))&&(yield n?t:t.fullpath());let u=new Set([t]);for(let c of u){let l=c.readdirSync();for(let f of l){(!o||o(f))&&(yield n?f:f.fullpath());let d=f;if(f.isSymbolicLink()){if(!(i&&(d=f.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(u,a)&&u.add(d)}}}stream(t=this.cwd,r={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r,u=new moe.Minipass({objectMode:!0});(!o||o(t))&&u.write(n?t:t.fullpath());let c=new Set,l=[t],f=0,d=s(()=>{let _=!1;for(;!_;){let m=l.shift();if(!m){f===0&&u.end();return}f++,c.add(m);let g=s((b,E,S=!1)=>{if(b)return u.emit("error",b);if(i&&!S){let O=[];for(let I of E)I.isSymbolicLink()&&O.push(I.realpath().then(w=>w?.isUnknown()?w.lstat():w));if(O.length){Promise.all(O).then(()=>g(null,E,!0));return}}for(let O of E)O&&(!o||o(O))&&(u.write(n?O:O.fullpath())||(_=!0));f--;for(let O of E){let I=O.realpathCached()||O;I.shouldWalk(c,a)&&l.push(I)}_&&!u.flowing?u.once("drain",d):y||d()},"onReaddir"),y=!0;m.readdirCB(g,!0),y=!1}},"process");return d(),u}streamSync(t=this.cwd,r={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r,u=new moe.Minipass({objectMode:!0}),c=new Set;(!o||o(t))&&u.write(n?t:t.fullpath());let l=[t],f=0,d=s(()=>{let _=!1;for(;!_;){let m=l.shift();if(!m){f===0&&u.end();return}f++,c.add(m);let g=m.readdirSync();for(let y of g)(!o||o(y))&&(u.write(n?y:y.fullpath())||(_=!0));f--;for(let y of g){let b=y;if(y.isSymbolicLink()){if(!(i&&(b=y.realpathSync())))continue;b.isUnknown()&&b.lstatSync()}b.shouldWalk(c,a)&&l.push(b)}}_&&!u.flowing&&u.once("drain",d)},"process");return d(),u}chdir(t=this.cwd){let r=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[Noe](r)}};Ot.PathScurryBase=ME;var UE=class extends ME{static{s(this,"PathScurryWin32")}sep="\\";constructor(t=process.cwd(),r={}){let{nocase:n=!0}=r;super(t,ZT.win32,"\\",{...r,nocase:n}),this.nocase=n;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(t){return ZT.win32.parse(t).root.toUpperCase()}newRoot(t){return new LE(this.rootPath,Oa,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}};Ot.PathScurryWin32=UE;var xE=class extends ME{static{s(this,"PathScurryPosix")}sep="/";constructor(t=process.cwd(),r={}){let{nocase:n=!1}=r;super(t,ZT.posix,"/",{...r,nocase:n}),this.nocase=n}parseRootPath(t){return"/"}newRoot(t){return new jE(this.rootPath,Oa,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}};Ot.PathScurryPosix=xE;var t1=class extends xE{static{s(this,"PathScurryDarwin")}constructor(t=process.cwd(),r={}){let{nocase:n=!0}=r;super(t,{...r,nocase:n})}};Ot.PathScurryDarwin=t1;Ot.Path=process.platform==="win32"?LE:jE;Ot.PathScurry=process.platform==="win32"?UE:process.platform==="darwin"?t1:xE});var OF=h(r1=>{"use strict";Object.defineProperty(r1,"__esModule",{value:!0});r1.Pattern=void 0;var Zat=Kc(),eut=s(e=>e.length>=1,"isPatternList"),tut=s(e=>e.length>=1,"isGlobList"),vF=class e{static{s(this,"Pattern")}#t;#r;#n;length;#e;#s;#c;#f;#l;#a;#i=!0;constructor(t,r,n,i){if(!eut(t))throw new TypeError("empty pattern list");if(!tut(r))throw new TypeError("empty glob list");if(r.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,n<0||n>=this.length)throw new TypeError("index out of range");if(this.#t=t,this.#r=r,this.#n=n,this.#e=i,this.#n===0){if(this.isUNC()){let[o,a,u,c,...l]=this.#t,[f,d,_,m,...g]=this.#r;l[0]===""&&(l.shift(),g.shift());let y=[o,a,u,c,""].join("/"),b=[f,d,_,m,""].join("/");this.#t=[y,...l],this.#r=[b,...g],this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){let[o,...a]=this.#t,[u,...c]=this.#r;a[0]===""&&(a.shift(),c.shift());let l=o+"/",f=u+"/";this.#t=[l,...a],this.#r=[f,...c],this.length=this.#t.length}}}pattern(){return this.#t[this.#n]}isString(){return typeof this.#t[this.#n]=="string"}isGlobstar(){return this.#t[this.#n]===Zat.GLOBSTAR}isRegExp(){return this.#t[this.#n]instanceof RegExp}globString(){return this.#c=this.#c||(this.#n===0?this.isAbsolute()?this.#r[0]+this.#r.slice(1).join("/"):this.#r.join("/"):this.#r.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#s!==void 0?this.#s:this.hasMore()?(this.#s=new e(this.#t,this.#r,this.#n+1,this.#e),this.#s.#a=this.#a,this.#s.#l=this.#l,this.#s.#f=this.#f,this.#s):this.#s=null}isUNC(){let t=this.#t;return this.#l!==void 0?this.#l:this.#l=this.#e==="win32"&&this.#n===0&&t[0]===""&&t[1]===""&&typeof t[2]=="string"&&!!t[2]&&typeof t[3]=="string"&&!!t[3]}isDrive(){let t=this.#t;return this.#f!==void 0?this.#f:this.#f=this.#e==="win32"&&this.#n===0&&this.length>1&&typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){let t=this.#t;return this.#a!==void 0?this.#a:this.#a=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){let t=this.#t[0];return typeof t=="string"&&this.isAbsolute()&&this.#n===0?t:""}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#i)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#i?!1:(this.#i=!1,!0)}};r1.Pattern=vF});var Coe=h(n1=>{"use strict";Object.defineProperty(n1,"__esModule",{value:!0});n1.Ignore=void 0;var Roe=Kc(),rut=OF(),nut=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",PF=class{static{s(this,"Ignore")}relative;relativeChildren;absolute;absoluteChildren;constructor(t,{nobrace:r,nocase:n,noext:i,noglobstar:o,platform:a=nut}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[];let u={dot:!0,nobrace:r,nocase:n,noext:i,noglobstar:o,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let c of t){let l=new Roe.Minimatch(c,u);for(let f=0;f<l.set.length;f++){let d=l.set[f],_=l.globParts[f];if(!d||!_)throw new Error("invalid pattern object");let m=new rut.Pattern(d,_,0,a),g=new Roe.Minimatch(m.globString(),u),y=_[_.length-1]==="**",b=m.isAbsolute();b?this.absolute.push(g):this.relative.push(g),y&&(b?this.absoluteChildren.push(g):this.relativeChildren.push(g))}}}ignored(t){let r=t.fullpath(),n=`${r}/`,i=t.relative()||".",o=`${i}/`;for(let a of this.relative)if(a.match(i)||a.match(o))return!0;for(let a of this.absolute)if(a.match(r)||a.match(n))return!0;return!1}childrenIgnored(t){let r=t.fullpath()+"/",n=(t.relative()||".")+"/";for(let i of this.relativeChildren)if(i.match(n))return!0;for(let i of this.absoluteChildren)if(i.match(r))return!0;return!1}};n1.Ignore=PF});var Doe=h(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});Pa.Processor=Pa.SubWalks=Pa.MatchRecord=Pa.HasWalkedCache=void 0;var $oe=Kc(),i1=class e{static{s(this,"HasWalkedCache")}store;constructor(t=new Map){this.store=t}copy(){return new e(new Map(this.store))}hasWalked(t,r){return this.store.get(t.fullpath())?.has(r.globString())}storeWalked(t,r){let n=t.fullpath(),i=this.store.get(n);i?i.add(r.globString()):this.store.set(n,new Set([r.globString()]))}};Pa.HasWalkedCache=i1;var s1=class{static{s(this,"MatchRecord")}store=new Map;add(t,r,n){let i=(r?2:0)|(n?1:0),o=this.store.get(t);this.store.set(t,o===void 0?i:i&o)}entries(){return[...this.store.entries()].map(([t,r])=>[t,!!(r&2),!!(r&1)])}};Pa.MatchRecord=s1;var o1=class{static{s(this,"SubWalks")}store=new Map;add(t,r){if(!t.canReaddir())return;let n=this.store.get(t);n?n.find(i=>i.globString()===r.globString())||n.push(r):this.store.set(t,[r])}get(t){let r=this.store.get(t);if(!r)throw new Error("attempting to walk unknown path");return r}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return[...this.store.keys()].filter(t=>t.canReaddir())}};Pa.SubWalks=o1;var IF=class e{static{s(this,"Processor")}hasWalkedCache;matches=new s1;subwalks=new o1;patterns;follow;dot;opts;constructor(t,r){this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=r?r.copy():new i1}processPatterns(t,r){this.patterns=r;let n=r.map(i=>[t,i]);for(let[i,o]of n){this.hasWalkedCache.storeWalked(i,o);let a=o.root(),u=o.isAbsolute()&&this.opts.absolute!==!1;if(a){i=i.resolve(a==="/"&&this.opts.root!==void 0?this.opts.root:a);let d=o.rest();if(d)o=d;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let c,l,f=!1;for(;typeof(c=o.pattern())=="string"&&(l=o.rest());)i=i.resolve(c),o=l,f=!0;if(c=o.pattern(),l=o.rest(),f){if(this.hasWalkedCache.hasWalked(i,o))continue;this.hasWalkedCache.storeWalked(i,o)}if(typeof c=="string"){let d=c===".."||c===""||c===".";this.matches.add(i.resolve(c),u,d);continue}else if(c===$oe.GLOBSTAR){(!i.isSymbolicLink()||this.follow||o.checkFollowGlobstar())&&this.subwalks.add(i,o);let d=l?.pattern(),_=l?.rest();if(!l||(d===""||d===".")&&!_)this.matches.add(i,u,d===""||d===".");else if(d===".."){let m=i.parent||i;_?this.hasWalkedCache.hasWalked(m,_)||this.subwalks.add(m,_):this.matches.add(m,u,!0)}}else c instanceof RegExp&&this.subwalks.add(i,o)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new e(this.opts,this.hasWalkedCache)}filterEntries(t,r){let n=this.subwalks.get(t),i=this.child();for(let o of r)for(let a of n){let u=a.isAbsolute(),c=a.pattern(),l=a.rest();c===$oe.GLOBSTAR?i.testGlobstar(o,a,l,u):c instanceof RegExp?i.testRegExp(o,c,l,u):i.testString(o,c,l,u)}return i}testGlobstar(t,r,n,i){if((this.dot||!t.name.startsWith("."))&&(r.hasMore()||this.matches.add(t,i,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,r):t.isSymbolicLink()&&(n&&r.checkFollowGlobstar()?this.subwalks.add(t,n):r.markFollowGlobstar()&&this.subwalks.add(t,r)))),n){let o=n.pattern();if(typeof o=="string"&&o!==".."&&o!==""&&o!==".")this.testString(t,o,n.rest(),i);else if(o===".."){let a=t.parent||t;this.subwalks.add(a,n)}else o instanceof RegExp&&this.testRegExp(t,o,n.rest(),i)}}testRegExp(t,r,n,i){r.test(t.name)&&(n?this.subwalks.add(t,n):this.matches.add(t,i,!1))}testString(t,r,n,i){t.isNamed(r)&&(n?this.subwalks.add(t,n):this.matches.add(t,i,!1))}};Pa.Processor=IF});var Moe=h(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.GlobStream=Jc.GlobWalker=Jc.GlobUtil=void 0;var iut=EF(),Loe=Coe(),joe=Doe(),sut=s((e,t)=>typeof e=="string"?new Loe.Ignore([e],t):Array.isArray(e)?new Loe.Ignore(e,t):e,"makeIgnore"),qE=class{static{s(this,"GlobUtil")}path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#t=[];#r;#n;signal;maxDepth;constructor(t,r,n){this.patterns=t,this.path=r,this.opts=n,this.#n=!n.posix&&n.platform==="win32"?"\\":"/",n.ignore&&(this.#r=sut(n.ignore,n)),this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0}))}#e(t){return this.seen.has(t)||!!this.#r?.ignored?.(t)}#s(t){return!!this.#r?.childrenIgnored?.(t)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let t;for(;!this.paused&&(t=this.#t.shift());)t()}onResume(t){this.signal?.aborted||(this.paused?this.#t.push(t):t())}async matchCheck(t,r){if(r&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=t.realpathCached()||await t.realpath(),!n)return;t=n}let i=t.isUnknown()||this.opts.stat;return this.matchCheckTest(i?await t.lstat():t,r)}matchCheckTest(t,r){return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!r||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&!this.#e(t)?t:void 0}matchCheckSync(t,r){if(r&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=t.realpathCached()||t.realpathSync(),!n)return;t=n}let i=t.isUnknown()||this.opts.stat;return this.matchCheckTest(i?t.lstatSync():t,r)}matchFinish(t,r){if(this.#e(t))return;let n=this.opts.absolute===void 0?r:this.opts.absolute;this.seen.add(t);let i=this.opts.mark&&t.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(n){let o=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(o+i)}else{let o=this.opts.posix?t.relativePosix():t.relative(),a=this.opts.dotRelative&&!o.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(o?a+o+i:"."+i)}}async match(t,r,n){let i=await this.matchCheck(t,n);i&&this.matchFinish(i,r)}matchSync(t,r,n){let i=this.matchCheckSync(t,n);i&&this.matchFinish(i,r)}walkCB(t,r,n){this.signal?.aborted&&n(),this.walkCB2(t,r,new joe.Processor(this.opts),n)}walkCB2(t,r,n,i){if(this.#s(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(t,r,n,i));return}n.processPatterns(t,r);let o=1,a=s(()=>{--o===0&&i()},"next");for(let[u,c,l]of n.matches.entries())this.#e(u)||(o++,this.match(u,c,l).then(()=>a()));for(let u of n.subwalkTargets()){if(this.maxDepth!==1/0&&u.depth()>=this.maxDepth)continue;o++;let c=u.readdirCached();u.calledReaddir()?this.walkCB3(u,c,n,a):u.readdirCB((l,f)=>this.walkCB3(u,f,n,a),!0)}a()}walkCB3(t,r,n,i){n=n.filterEntries(t,r);let o=1,a=s(()=>{--o===0&&i()},"next");for(let[u,c,l]of n.matches.entries())this.#e(u)||(o++,this.match(u,c,l).then(()=>a()));for(let[u,c]of n.subwalks.entries())o++,this.walkCB2(u,c,n.child(),a);a()}walkCBSync(t,r,n){this.signal?.aborted&&n(),this.walkCB2Sync(t,r,new joe.Processor(this.opts),n)}walkCB2Sync(t,r,n,i){if(this.#s(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(t,r,n,i));return}n.processPatterns(t,r);let o=1,a=s(()=>{--o===0&&i()},"next");for(let[u,c,l]of n.matches.entries())this.#e(u)||this.matchSync(u,c,l);for(let u of n.subwalkTargets()){if(this.maxDepth!==1/0&&u.depth()>=this.maxDepth)continue;o++;let c=u.readdirSync();this.walkCB3Sync(u,c,n,a)}a()}walkCB3Sync(t,r,n,i){n=n.filterEntries(t,r);let o=1,a=s(()=>{--o===0&&i()},"next");for(let[u,c,l]of n.matches.entries())this.#e(u)||this.matchSync(u,c,l);for(let[u,c]of n.subwalks.entries())o++,this.walkCB2Sync(u,c,n.child(),a);a()}};Jc.GlobUtil=qE;var wF=class extends qE{static{s(this,"GlobWalker")}matches;constructor(t,r,n){super(t,r,n),this.matches=new Set}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,r)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?r(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}};Jc.GlobWalker=wF;var TF=class extends qE{static{s(this,"GlobStream")}results;constructor(t,r,n){super(t,r,n),this.results=new iut.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(t){this.results.write(t),this.results.flowing||this.pause()}stream(){let t=this.path;return t.isUnknown()?t.lstat().then(()=>{this.walkCB(t,this.patterns,()=>this.results.end())}):this.walkCB(t,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};Jc.GlobStream=TF});var AF=h(c1=>{"use strict";Object.defineProperty(c1,"__esModule",{value:!0});c1.Glob=void 0;var out=Kc(),a1=Aoe(),aut=require("url"),uut=OF(),u1=Moe(),cut=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",NF=class{static{s(this,"Glob")}absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;opts;patterns;constructor(t,r){if(!r)throw new TypeError("glob options required");if(this.withFileTypes=!!r.withFileTypes,this.signal=r.signal,this.follow=!!r.follow,this.dot=!!r.dot,this.dotRelative=!!r.dotRelative,this.nodir=!!r.nodir,this.mark=!!r.mark,r.cwd?(r.cwd instanceof URL||r.cwd.startsWith("file://"))&&(r.cwd=(0,aut.fileURLToPath)(r.cwd)):this.cwd="",this.cwd=r.cwd||"",this.root=r.root,this.magicalBraces=!!r.magicalBraces,this.nobrace=!!r.nobrace,this.noext=!!r.noext,this.realpath=!!r.realpath,this.absolute=r.absolute,this.noglobstar=!!r.noglobstar,this.matchBase=!!r.matchBase,this.maxDepth=typeof r.maxDepth=="number"?r.maxDepth:1/0,this.stat=!!r.stat,this.ignore=r.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof t=="string"&&(t=[t]),this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(t=t.map(c=>c.replace(/\\/g,"/"))),this.matchBase){if(r.noglobstar)throw new TypeError("base matching requires globstar");t=t.map(c=>c.includes("/")?c:`./**/${c}`)}if(this.pattern=t,this.platform=r.platform||cut,this.opts={...r,platform:this.platform},r.scurry){if(this.scurry=r.scurry,r.nocase!==void 0&&r.nocase!==r.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let c=r.platform==="win32"?a1.PathScurryWin32:r.platform==="darwin"?a1.PathScurryDarwin:r.platform?a1.PathScurryPosix:a1.PathScurry;this.scurry=new c(this.cwd,{nocase:r.nocase,fs:r.fs})}this.nocase=this.scurry.nocase;let n=this.platform==="darwin"||this.platform==="win32",i={...r,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:n,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},o=this.pattern.map(c=>new out.Minimatch(c,i)),[a,u]=o.reduce((c,l)=>(c[0].push(...l.set),c[1].push(...l.globParts),c),[[],[]]);this.patterns=a.map((c,l)=>{let f=u[l];if(!f)throw new Error("invalid pattern object");return new uut.Pattern(c,f,0,this.platform)})}async walk(){return[...await new u1.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walk()]}walkSync(){return[...new u1.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walkSync()]}stream(){return new u1.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).stream()}streamSync(){return new u1.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};c1.Glob=NF});var RF=h(l1=>{"use strict";Object.defineProperty(l1,"__esModule",{value:!0});l1.hasMagic=void 0;var lut=Kc(),fut=s((e,t={})=>{Array.isArray(e)||(e=[e]);for(let r of e)if(new lut.Minimatch(r,t).hasMagic())return!0;return!1},"hasMagic");l1.hasMagic=fut});var Foe=h(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.glob=qe.hasMagic=qe.Glob=qe.unescape=qe.escape=qe.sync=qe.iterate=qe.iterateSync=qe.stream=qe.streamSync=qe.globIterate=qe.globIterateSync=qe.globSync=qe.globStream=qe.globStreamSync=void 0;var Uoe=Kc(),qd=AF(),dut=RF();function FE(e,t={}){return new qd.Glob(e,t).streamSync()}s(FE,"globStreamSync");qe.globStreamSync=FE;function CF(e,t={}){return new qd.Glob(e,t).stream()}s(CF,"globStream");qe.globStream=CF;function $F(e,t={}){return new qd.Glob(e,t).walkSync()}s($F,"globSync");qe.globSync=$F;async function xoe(e,t={}){return new qd.Glob(e,t).walk()}s(xoe,"glob_");function kE(e,t={}){return new qd.Glob(e,t).iterateSync()}s(kE,"globIterateSync");qe.globIterateSync=kE;function DF(e,t={}){return new qd.Glob(e,t).iterate()}s(DF,"globIterate");qe.globIterate=DF;qe.streamSync=FE;qe.stream=Object.assign(CF,{sync:FE});qe.iterateSync=kE;qe.iterate=Object.assign(DF,{sync:kE});qe.sync=Object.assign($F,{stream:FE,iterate:kE});var qoe=Kc();Object.defineProperty(qe,"escape",{enumerable:!0,get:function(){return qoe.escape}});Object.defineProperty(qe,"unescape",{enumerable:!0,get:function(){return qoe.unescape}});var put=AF();Object.defineProperty(qe,"Glob",{enumerable:!0,get:function(){return put.Glob}});var hut=RF();Object.defineProperty(qe,"hasMagic",{enumerable:!0,get:function(){return hut.hasMagic}});qe.glob=Object.assign(xoe,{glob:xoe,globSync:$F,sync:qe.sync,globStream:CF,stream:qe.stream,globStreamSync:FE,streamSync:qe.streamSync,globIterate:DF,iterate:qe.iterate,globIterateSync:kE,iterateSync:qe.iterateSync,Glob:qd.Glob,hasMagic:dut.hasMagic,escape:Uoe.escape,unescape:Uoe.unescape});qe.glob.glob=qe.glob});var Voe=h(km=>{"use strict";var LF=km&&km.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(km,"__esModule",{value:!0});km.lookupFiles=void 0;var mut=Um(),koe=LF(Foe()),f1=LF(require("fs")),Boe=LF(require("path")),_ut=s(e=>Boe.default.basename(e).startsWith("."),"isHiddenOnUnix"),gut=s((e,t=[])=>t.map(r=>r.startsWith(".")?r:`.${r}`).some(r=>e.endsWith(r)),"hasMatchingExtname");function Goe(e,t=[],r=!1){let n=[],i;if(!f1.default.existsSync(e)){let o;if(koe.default.hasMagic(e))o=e;else{let a=t.map(u=>u.startsWith(".")?u:`.${u}`).join("|");o=`${e}+(${a})`,mut.logger.debug("looking for files using glob pattern: %s",o)}if(n.push(...koe.default.sync(o,{nodir:!0})),!n.length)throw Error(`Cannot find any files matching pattern "${e}"`);return n}try{if(i=f1.default.statSync(e),i.isFile())return[e]}catch{return[]}return f1.default.readdirSync(e).forEach(o=>{let a=Boe.default.join(e,o),u;try{if(u=f1.default.statSync(a),u.isDirectory()){r&&n.push(...Goe(a,t,r));return}}catch{return}if(!t.length)throw Error(`Argument '${t}' required when argument '${e}' is a directory`);!u.isFile()||!gut(a,t)||_ut(a)||n.push(a)}),n}s(Goe,"lookupFiles");km.lookupFiles=Goe});var zoe=h(Gm=>{"use strict";var BE=Gm&&Gm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gm,"__esModule",{value:!0});Gm.openApiRoutesPlugin=void 0;var jF=Gf(),yut=Rne(),MF=BE(gn()),UF=BE(require("fs/promises")),wo=BE(require("path")),xF=kt(),Eut=BE(Xs()),but=BE(_n()),Sut=Voe(),Bm="open-api-routes-plugin",d1="open-api-routes-json";function vut(e){return{name:"open-api-routes-plugin",setup(t){t.onResolve({filter:/routes.json$/},r=>({watchFiles:[...(0,Sut.lookupFiles)(wo.default.join(e.sourceDirectory,xF.USER_CONFIG_DIR_NAME),[".oas.json"],!0),wo.default.join(e.sourceDirectory,xF.USER_CONFIG_DIR_NAME,xF.POLICIES_CONFIG_FILE)],namespace:d1,path:wo.default.isAbsolute(r.path)?r.path:wo.default.join(r.resolveDir,r.path),pluginName:Bm})),t.onResolve({filter:/^\.\.\/modules\/.*/,namespace:d1},async r=>{let n=wo.default.join(r.resolveDir,`${r.path}.ts`);if(!await MF.default.fileExists(n)){let i=`$import(.${r.path.replace(/^../,"")})`,o=wo.default.resolve(e.sourceDirectory,"config"),a=await(0,jF.getOpenApiFilesByAlphabetical)(o),u=await(0,jF.getRouteLocationByValue)(a[0],i,"Update your route configuration to use code from the 'modules' folder");return{errors:[{id:"route-build-error",text:`Invalid handler reference in routes.json. Unable to resolve reference to '${i}' from routes.json`,location:u,detail:"RouteReferenceError",pluginName:Bm}],namespace:d1,path:r.path,pluginName:Bm}}}),t.onLoad({filter:/.*/,namespace:d1},async r=>but.default.timeFn("Generating route.json data",async()=>{let n=wo.default.resolve(e.sourceDirectory,"config"),i=await(0,jF.getOpenApiFilesByAlphabetical)(n),o=await Promise.all(i.map(async l=>({content:await UF.default.readFile(l,"utf-8"),fileName:l}))),a=wo.default.resolve(n,"policies.json");if(!await MF.default.fileExists(a))return{errors:[{text:"The project must include a policies file ('/config/policies.json')",detail:"OASPoliciesFileMissing",pluginName:Bm,location:{line:0,column:0,file:"/config/policies.json"}}],pluginName:Bm};let u={content:await UF.default.readFile(a,"utf-8"),fileName:a},c=await(0,yut.compileRoutes)(o,u);if(Eut.default.DEBUG_BUILD_MODE&&c.content){let l=wo.default.join(e.sourceDirectory,"dist"),f=wo.default.resolve(l,"routes.js");await MF.default.mkdirForFilePathIfNotExits(f),await UF.default.writeFile(f,c.content,"utf-8")}return{contents:c.content,errors:c.errors,pluginName:Bm,resolveDir:wo.default.dirname(r.path),watchFiles:[r.path]}}))}}}s(vut,"openApiRoutesPlugin");Gm.openApiRoutesPlugin=vut});var Qoe=h(Xc=>{"use strict";var GE=Xc&&Xc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xc,"__esModule",{value:!0});Xc.generateRawRouteSource=Xc.rawRoutePlugin=void 0;var zm=Gf(),Woe=require("@zuplo/runtime/internal"),Hoe=GE(gn()),Yoe=GE(require("fs/promises")),Vm=GE(require("path")),Out=GE(require("prettier")),Put=kt(),Iut=GE(Xs()),qF="raw-route-plugin",Koe="raw-route";function wut(e){return{name:"raw-route-plugin",setup(t){t.onResolve({filter:/raw.json$/},r=>({namespace:Koe,path:r.path,pluginName:qF})),t.onLoad({filter:/.*/,namespace:Koe},async r=>{let n=Vm.default.resolve(e.sourceDirectory,Put.USER_CONFIG_DIR_NAME);if(!await Hoe.default.dirExists(n))return{loader:"js",resolveDir:Vm.default.dirname(r.path),pluginName:qF};let i=await(0,zm.getOpenApiFilesByAlphabetical)(n),o=await Joe({oasFiles:i,sourceDirectory:e.sourceDirectory,logger:e.logger});if(Iut.default.DEBUG_BUILD_MODE&&o){let a=Vm.default.join(e.sourceDirectory,"dist"),u=Vm.default.resolve(a,"raw-routes.js");await Hoe.default.mkdirForFilePathIfNotExits(u);let c=await Out.default.format(o,{parser:"babel"});await Yoe.default.writeFile(u,c,"utf-8")}return{contents:o,loader:"js",resolveDir:Vm.default.dirname(r.path),pluginName:qF}})}}}s(wut,"rawRoutePlugin");Xc.rawRoutePlugin=wut;async function Joe({oasFiles:e,sourceDirectory:t,logger:r}){let n=[],i=[],o=[],a=new zm.RefParser(t,r);n.push("const rawRouteData = {");for(let c of e){let l=await Yoe.default.readFile(c,"utf-8"),f=Vm.default.basename(c,".oas.json"),d=JSON.parse(l),_=await a.resolve(c),m=d.paths,g=[],y=new Map;for(let b in m){let E=m[b];for(let S in E){let{description:O,...I}=E[S],w=(0,Woe.getRawOperationDataIdentifierName)(f,b,S);o.push(Nut(c,f,w,I,_,g,y))}}i.push(Tut(c,f,_,g,y))}return n.push(o.join(",")),n.push("};"),n.push("export default rawRouteData;"),i.join(`
|
|
296
|
+
>>> no match, partial?`,t,_,r,m),_===c))}let y;if(typeof f=="string"?(y=d===f,this.debug("string match",f,d,y)):(y=f.test(d),this.debug("pattern match",f,d,y)),!y)return!1}if(a===c&&u===l)return!0;if(a===c)return n;if(u===l)return a===c-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return(0,oe.braceExpand)(this.pattern,this.options)}parse(t){(0,qT.assertValidPattern)(t);let r=this.options;if(t==="**")return oe.GLOBSTAR;if(t==="")return"";let n,i=null;(n=t.match(fat))?i=r.dot?pat:dat:(n=t.match(tat))?i=(r.nocase?r.dot?sat:iat:r.dot?nat:rat)(n[1]):(n=t.match(hat))?i=(r.nocase?r.dot?_at:mat:r.dot?gat:yat)(n):(n=t.match(oat))?i=r.dot?uat:aat:(n=t.match(cat))&&(i=lat);let o=toe.AST.fromGlob(t,this.options).toMMPattern();return i?Object.assign(o,{test:i}):o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?bat:r.dot?Sat:vat,i=new Set(r.nocase?["i"]:[]),o=t.map(c=>{let l=c.map(f=>{if(f instanceof RegExp)for(let d of f.flags.split(""))i.add(d);return typeof f=="string"?Nat(f):f===oe.GLOBSTAR?oe.GLOBSTAR:f._src});return l.forEach((f,d)=>{let _=l[d+1],m=l[d-1];f!==oe.GLOBSTAR||m===oe.GLOBSTAR||(m===void 0?_!==void 0&&_!==oe.GLOBSTAR?l[d+1]="(?:\\/|"+n+"\\/)?"+_:l[d]=n:_===void 0?l[d-1]=m+"(?:\\/|"+n+")?":_!==oe.GLOBSTAR&&(l[d-1]=m+"(?:\\/|\\/"+n+"\\/)"+_,l[d+1]=oe.GLOBSTAR))}),l.filter(f=>f!==oe.GLOBSTAR).join("/")}).join("|"),[a,u]=t.length>1?["(?:",")"]:["",""];o="^"+a+o+u+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;let n=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let o=this.set;this.debug(this.pattern,"set",o);let a=i[i.length-1];if(!a)for(let u=i.length-2;!a&&u>=0;u--)a=i[u];for(let u=0;u<o.length;u++){let c=o[u],l=i;if(n.matchBase&&c.length===1&&(l=[a]),this.matchOne(l,c,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(t){return oe.minimatch.defaults(t).Minimatch}};oe.Minimatch=Md;var Aat=aF();Object.defineProperty(oe,"AST",{enumerable:!0,get:function(){return Aat.AST}});var Rat=uF();Object.defineProperty(oe,"escape",{enumerable:!0,get:function(){return Rat.escape}});var Cat=LT();Object.defineProperty(oe,"unescape",{enumerable:!0,get:function(){return Cat.unescape}});oe.minimatch.AST=toe.AST;oe.minimatch.Minimatch=Md;oe.minimatch.escape=Qot.escape;oe.minimatch.unescape=Zot.unescape});var coe=h(kT=>{"use strict";Object.defineProperty(kT,"__esModule",{value:!0});kT.LRUCache=void 0;var OE=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,ooe=new Set,cF=typeof process=="object"&&process?process:{},aoe=s((e,t,r,n)=>{typeof cF.emitWarning=="function"?cF.emitWarning(e,t,r,n):console.error(`[${r}] ${t}: ${e}`)},"emitWarning"),FT=globalThis.AbortController,soe=globalThis.AbortSignal;if(typeof FT>"u"){soe=class{static{s(this,"AbortSignal")}onabort;_onabort=[];reason;aborted=!1;addEventListener(n,i){this._onabort.push(i)}},FT=class{static{s(this,"AbortController")}constructor(){t()}signal=new soe;abort(n){if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(let i of this.signal._onabort)i(n);this.signal.onabort?.(n)}}};let e=cF.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=s(()=>{e&&(e=!1,aoe("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))},"warnACPolyfill")}var $at=s(e=>!ooe.has(e),"shouldWarn"),dxt=Symbol("type"),Wc=s(e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),"isPosInt"),uoe=s(e=>Wc(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?xm:null:null,"getUintArray"),xm=class extends Array{static{s(this,"ZeroArray")}constructor(t){super(t),this.fill(0)}},lF=class e{static{s(this,"Stack")}heap;length;static#t=!1;static create(t){let r=uoe(t);if(!r)return[];e.#t=!0;let n=new e(t,r);return e.#t=!1,n}constructor(t,r){if(!e.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},fF=class e{static{s(this,"LRUCache")}#t;#r;#n;#e;#s;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#c;#f;#l;#a;#i;#u;#E;#_;#p;#b;#d;#w;#A;#O;#v;#T;#m;static unsafeExposeInternals(t){return{starts:t.#A,ttls:t.#O,sizes:t.#w,keyMap:t.#l,keyList:t.#a,valList:t.#i,next:t.#u,prev:t.#E,get head(){return t.#_},get tail(){return t.#p},free:t.#b,isBackgroundFetch:r=>t.#h(r),backgroundFetch:(r,n,i,o)=>t.#j(r,n,i,o),moveToTail:r=>t.#L(r),indexes:r=>t.#N(r),rindexes:r=>t.#C(r),isStale:r=>t.#S(r)}}get max(){return this.#t}get maxSize(){return this.#r}get calculatedSize(){return this.#f}get size(){return this.#c}get fetchMethod(){return this.#s}get dispose(){return this.#n}get disposeAfter(){return this.#e}constructor(t){let{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:o,updateAgeOnGet:a,updateAgeOnHas:u,allowStale:c,dispose:l,disposeAfter:f,noDisposeOnSet:d,noUpdateTTL:_,maxSize:m=0,maxEntrySize:g=0,sizeCalculation:y,fetchMethod:b,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:v,allowStaleOnFetchRejection:O,allowStaleOnFetchAbort:I,ignoreFetchAbort:w}=t;if(r!==0&&!Wc(r))throw new TypeError("max option must be a nonnegative integer");let j=r?uoe(r):Array;if(!j)throw new Error("invalid max value: "+r);if(this.#t=r,this.#r=m,this.maxEntrySize=g||this.#r,this.sizeCalculation=y,this.sizeCalculation){if(!this.#r&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(b!==void 0&&typeof b!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#s=b,this.#T=!!b,this.#l=new Map,this.#a=new Array(r).fill(void 0),this.#i=new Array(r).fill(void 0),this.#u=new j(r),this.#E=new j(r),this.#_=0,this.#p=0,this.#b=lF.create(r),this.#c=0,this.#f=0,typeof l=="function"&&(this.#n=l),typeof f=="function"?(this.#e=f,this.#d=[]):(this.#e=void 0,this.#d=void 0),this.#v=!!this.#n,this.#m=!!this.#e,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!_,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!O,this.allowStaleOnFetchAbort=!!I,this.ignoreFetchAbort=!!w,this.maxEntrySize!==0){if(this.#r!==0&&!Wc(this.#r))throw new TypeError("maxSize must be a positive integer if specified");if(!Wc(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#R()}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!v,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!u,this.ttlResolution=Wc(i)||i===0?i:1,this.ttlAutopurge=!!o,this.ttl=n||0,this.ttl){if(!Wc(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P()}if(this.#t===0&&this.ttl===0&&this.#r===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#r){let F="LRU_CACHE_UNBOUNDED";$at(F)&&(ooe.add(F),aoe("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",F,e))}}getRemainingTTL(t){return this.#l.has(t)?1/0:0}#P(){let t=new xm(this.#t),r=new xm(this.#t);this.#O=t,this.#A=r,this.#o=(o,a,u=OE.now())=>{if(r[o]=a!==0?u:0,t[o]=a,a!==0&&this.ttlAutopurge){let c=setTimeout(()=>{this.#S(o)&&this.delete(this.#a[o])},a+1);c.unref&&c.unref()}},this.#y=o=>{r[o]=t[o]!==0?OE.now():0},this.#I=(o,a)=>{if(t[a]){let u=t[a],c=r[a];o.ttl=u,o.start=c,o.now=n||i();let l=o.now-c;o.remainingTTL=u-l}};let n=0,i=s(()=>{let o=OE.now();if(this.ttlResolution>0){n=o;let a=setTimeout(()=>n=0,this.ttlResolution);a.unref&&a.unref()}return o},"getNow");this.getRemainingTTL=o=>{let a=this.#l.get(o);if(a===void 0)return 0;let u=t[a],c=r[a];if(u===0||c===0)return 1/0;let l=(n||i())-c;return u-l},this.#S=o=>t[o]!==0&&r[o]!==0&&(n||i())-r[o]>t[o]}#y=()=>{};#I=()=>{};#o=()=>{};#S=()=>!1;#R(){let t=new xm(this.#t);this.#f=0,this.#w=t,this.#g=r=>{this.#f-=t[r],t[r]=0},this.#M=(r,n,i,o)=>{if(this.#h(n))return 0;if(!Wc(i))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(i=o(n,r),!Wc(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#$=(r,n,i)=>{if(t[r]=n,this.#r){let o=this.#r-t[r];for(;this.#f>o;)this.#D(!0)}this.#f+=t[r],i&&(i.entrySize=n,i.totalCalculatedSize=this.#f)}}#g=t=>{};#$=(t,r,n)=>{};#M=(t,r,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#N({allowStale:t=this.allowStale}={}){if(this.#c)for(let r=this.#p;!(!this.#U(r)||((t||!this.#S(r))&&(yield r),r===this.#_));)r=this.#E[r]}*#C({allowStale:t=this.allowStale}={}){if(this.#c)for(let r=this.#_;!(!this.#U(r)||((t||!this.#S(r))&&(yield r),r===this.#p));)r=this.#u[r]}#U(t){return t!==void 0&&this.#l.get(this.#a[t])===t}*entries(){for(let t of this.#N())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#h(this.#i[t])&&(yield[this.#a[t],this.#i[t]])}*rentries(){for(let t of this.#C())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#h(this.#i[t])&&(yield[this.#a[t],this.#i[t]])}*keys(){for(let t of this.#N()){let r=this.#a[t];r!==void 0&&!this.#h(this.#i[t])&&(yield r)}}*rkeys(){for(let t of this.#C()){let r=this.#a[t];r!==void 0&&!this.#h(this.#i[t])&&(yield r)}}*values(){for(let t of this.#N())this.#i[t]!==void 0&&!this.#h(this.#i[t])&&(yield this.#i[t])}*rvalues(){for(let t of this.#C())this.#i[t]!==void 0&&!this.#h(this.#i[t])&&(yield this.#i[t])}[Symbol.iterator](){return this.entries()}find(t,r={}){for(let n of this.#N()){let i=this.#i[n],o=this.#h(i)?i.__staleWhileFetching:i;if(o!==void 0&&t(o,this.#a[n],this))return this.get(this.#a[n],r)}}forEach(t,r=this){for(let n of this.#N()){let i=this.#i[n],o=this.#h(i)?i.__staleWhileFetching:i;o!==void 0&&t.call(r,o,this.#a[n],this)}}rforEach(t,r=this){for(let n of this.#C()){let i=this.#i[n],o=this.#h(i)?i.__staleWhileFetching:i;o!==void 0&&t.call(r,o,this.#a[n],this)}}purgeStale(){let t=!1;for(let r of this.#C({allowStale:!0}))this.#S(r)&&(this.delete(this.#a[r]),t=!0);return t}dump(){let t=[];for(let r of this.#N({allowStale:!0})){let n=this.#a[r],i=this.#i[r],o=this.#h(i)?i.__staleWhileFetching:i;if(o===void 0||n===void 0)continue;let a={value:o};if(this.#O&&this.#A){a.ttl=this.#O[r];let u=OE.now()-this.#A[r];a.start=Math.floor(Date.now()-u)}this.#w&&(a.size=this.#w[r]),t.unshift([n,a])}return t}load(t){this.clear();for(let[r,n]of t){if(n.start){let i=Date.now()-n.start;n.start=OE.now()-i}this.set(r,n.value,n)}}set(t,r,n={}){if(r===void 0)return this.delete(t),this;let{ttl:i=this.ttl,start:o,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:u=this.sizeCalculation,status:c}=n,{noUpdateTTL:l=this.noUpdateTTL}=n,f=this.#M(t,r,n.size||0,u);if(this.maxEntrySize&&f>this.maxEntrySize)return c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this.delete(t),this;let d=this.#c===0?void 0:this.#l.get(t);if(d===void 0)d=this.#c===0?this.#p:this.#b.length!==0?this.#b.pop():this.#c===this.#t?this.#D(!1):this.#c,this.#a[d]=t,this.#i[d]=r,this.#l.set(t,d),this.#u[this.#p]=d,this.#E[d]=this.#p,this.#p=d,this.#c++,this.#$(d,f,c),c&&(c.set="add"),l=!1;else{this.#L(d);let _=this.#i[d];if(r!==_){if(this.#T&&this.#h(_)){_.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:m}=_;m!==void 0&&!a&&(this.#v&&this.#n?.(m,t,"set"),this.#m&&this.#d?.push([m,t,"set"]))}else a||(this.#v&&this.#n?.(_,t,"set"),this.#m&&this.#d?.push([_,t,"set"]));if(this.#g(d),this.#$(d,f,c),this.#i[d]=r,c){c.set="replace";let m=_&&this.#h(_)?_.__staleWhileFetching:_;m!==void 0&&(c.oldValue=m)}}else c&&(c.set="update")}if(i!==0&&!this.#O&&this.#P(),this.#O&&(l||this.#o(d,i,o),c&&this.#I(c,d)),!a&&this.#m&&this.#d){let _=this.#d,m;for(;m=_?.shift();)this.#e?.(...m)}return this}pop(){try{for(;this.#c;){let t=this.#i[this.#_];if(this.#D(!0),this.#h(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#m&&this.#d){let t=this.#d,r;for(;r=t?.shift();)this.#e?.(...r)}}}#D(t){let r=this.#_,n=this.#a[r],i=this.#i[r];return this.#T&&this.#h(i)?i.__abortController.abort(new Error("evicted")):(this.#v||this.#m)&&(this.#v&&this.#n?.(i,n,"evict"),this.#m&&this.#d?.push([i,n,"evict"])),this.#g(r),t&&(this.#a[r]=void 0,this.#i[r]=void 0,this.#b.push(r)),this.#c===1?(this.#_=this.#p=0,this.#b.length=0):this.#_=this.#u[r],this.#l.delete(n),this.#c--,r}has(t,r={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=r,o=this.#l.get(t);if(o!==void 0){let a=this.#i[o];if(this.#h(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#S(o))i&&(i.has="stale",this.#I(i,o));else return n&&this.#y(o),i&&(i.has="hit",this.#I(i,o)),!0}else i&&(i.has="miss");return!1}peek(t,r={}){let{allowStale:n=this.allowStale}=r,i=this.#l.get(t);if(i!==void 0&&(n||!this.#S(i))){let o=this.#i[i];return this.#h(o)?o.__staleWhileFetching:o}}#j(t,r,n,i){let o=r===void 0?void 0:this.#i[r];if(this.#h(o))return o;let a=new FT,{signal:u}=n;u?.addEventListener("abort",()=>a.abort(u.reason),{signal:a.signal});let c={signal:a.signal,options:n,context:i},l=s((y,b=!1)=>{let{aborted:E}=a.signal,v=n.ignoreFetchAbort&&y!==void 0;if(n.status&&(E&&!b?(n.status.fetchAborted=!0,n.status.fetchError=a.signal.reason,v&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),E&&!v&&!b)return d(a.signal.reason);let O=m;return this.#i[r]===m&&(y===void 0?O.__staleWhileFetching?this.#i[r]=O.__staleWhileFetching:this.delete(t):(n.status&&(n.status.fetchUpdated=!0),this.set(t,y,c.options))),y},"cb"),f=s(y=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=y),d(y)),"eb"),d=s(y=>{let{aborted:b}=a.signal,E=b&&n.allowStaleOnFetchAbort,v=E||n.allowStaleOnFetchRejection,O=v||n.noDeleteOnFetchRejection,I=m;if(this.#i[r]===m&&(!O||I.__staleWhileFetching===void 0?this.delete(t):E||(this.#i[r]=I.__staleWhileFetching)),v)return n.status&&I.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),I.__staleWhileFetching;if(I.__returned===I)throw y},"fetchFail"),_=s((y,b)=>{let E=this.#s?.(t,o,c);E&&E instanceof Promise&&E.then(v=>y(v===void 0?void 0:v),b),a.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(y(void 0),n.allowStaleOnFetchAbort&&(y=s(v=>l(v,!0),"res")))})},"pcall");n.status&&(n.status.fetchDispatched=!0);let m=new Promise(_).then(l,f),g=Object.assign(m,{__abortController:a,__staleWhileFetching:o,__returned:void 0});return r===void 0?(this.set(t,g,{...c.options,status:void 0}),r=this.#l.get(t)):this.#i[r]=g,g}#h(t){if(!this.#T)return!1;let r=t;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof FT}async fetch(t,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:c=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:_=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:y,forceRefresh:b=!1,status:E,signal:v}=r;if(!this.#T)return E&&(E.fetch="get"),this.get(t,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,status:E});let O={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,ttl:a,noDisposeOnSet:u,size:c,sizeCalculation:l,noUpdateTTL:f,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:_,allowStaleOnFetchAbort:g,ignoreFetchAbort:m,status:E,signal:v},I=this.#l.get(t);if(I===void 0){E&&(E.fetch="miss");let w=this.#j(t,I,O,y);return w.__returned=w}else{let w=this.#i[I];if(this.#h(w)){let re=n&&w.__staleWhileFetching!==void 0;return E&&(E.fetch="inflight",re&&(E.returnedStale=!0)),re?w.__staleWhileFetching:w.__returned=w}let j=this.#S(I);if(!b&&!j)return E&&(E.fetch="hit"),this.#L(I),i&&this.#y(I),E&&this.#I(E,I),w;let F=this.#j(t,I,O,y),H=F.__staleWhileFetching!==void 0&&n;return E&&(E.fetch=j?"stale":"refresh",H&&j&&(E.returnedStale=!0)),H?F.__staleWhileFetching:F.__returned=F}}get(t,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:a}=r,u=this.#l.get(t);if(u!==void 0){let c=this.#i[u],l=this.#h(c);return a&&this.#I(a,u),this.#S(u)?(a&&(a.get="stale"),l?(a&&n&&c.__staleWhileFetching!==void 0&&(a.returnedStale=!0),n?c.__staleWhileFetching:void 0):(o||this.delete(t),a&&n&&(a.returnedStale=!0),n?c:void 0)):(a&&(a.get="hit"),l?c.__staleWhileFetching:(this.#L(u),i&&this.#y(u),c))}else a&&(a.get="miss")}#x(t,r){this.#E[r]=t,this.#u[t]=r}#L(t){t!==this.#p&&(t===this.#_?this.#_=this.#u[t]:this.#x(this.#E[t],this.#u[t]),this.#x(this.#p,t),this.#p=t)}delete(t){let r=!1;if(this.#c!==0){let n=this.#l.get(t);if(n!==void 0)if(r=!0,this.#c===1)this.clear();else{this.#g(n);let i=this.#i[n];this.#h(i)?i.__abortController.abort(new Error("deleted")):(this.#v||this.#m)&&(this.#v&&this.#n?.(i,t,"delete"),this.#m&&this.#d?.push([i,t,"delete"])),this.#l.delete(t),this.#a[n]=void 0,this.#i[n]=void 0,n===this.#p?this.#p=this.#E[n]:n===this.#_?this.#_=this.#u[n]:(this.#u[this.#E[n]]=this.#u[n],this.#E[this.#u[n]]=this.#E[n]),this.#c--,this.#b.push(n)}}if(this.#m&&this.#d?.length){let n=this.#d,i;for(;i=n?.shift();)this.#e?.(...i)}return r}clear(){for(let t of this.#C({allowStale:!0})){let r=this.#i[t];if(this.#h(r))r.__abortController.abort(new Error("deleted"));else{let n=this.#a[t];this.#v&&this.#n?.(r,n,"delete"),this.#m&&this.#d?.push([r,n,"delete"])}}if(this.#l.clear(),this.#i.fill(void 0),this.#a.fill(void 0),this.#O&&this.#A&&(this.#O.fill(0),this.#A.fill(0)),this.#w&&this.#w.fill(0),this.#_=0,this.#p=0,this.#b.length=0,this.#f=0,this.#c=0,this.#m&&this.#d){let t=this.#d,r;for(;r=t?.shift();)this.#e?.(...r)}}};kT.LRUCache=fF});var EF=h(Xn=>{"use strict";var Dat=Xn&&Xn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xn,"__esModule",{value:!0});Xn.Minipass=Xn.isWritable=Xn.isReadable=Xn.isStream=void 0;var loe=typeof process=="object"&&process?process:{stdout:null,stderr:null},yF=require("events"),hoe=Dat(require("stream")),Lat=require("string_decoder"),jat=s(e=>!!e&&typeof e=="object"&&(e instanceof WT||e instanceof hoe.default||(0,Xn.isReadable)(e)||(0,Xn.isWritable)(e)),"isStream");Xn.isStream=jat;var Mat=s(e=>!!e&&typeof e=="object"&&e instanceof yF.EventEmitter&&typeof e.pipe=="function"&&e.pipe!==hoe.default.Writable.prototype.pipe,"isReadable");Xn.isReadable=Mat;var Uat=s(e=>!!e&&typeof e=="object"&&e instanceof yF.EventEmitter&&typeof e.write=="function"&&typeof e.end=="function","isWritable");Xn.isWritable=Uat;var Ou=Symbol("EOF"),Pu=Symbol("maybeEmitEnd"),Yc=Symbol("emittedEnd"),BT=Symbol("emittingEnd"),PE=Symbol("emittedError"),GT=Symbol("closed"),foe=Symbol("read"),VT=Symbol("flush"),doe=Symbol("flushChunk"),Po=Symbol("encoding"),qm=Symbol("decoder"),Fr=Symbol("flowing"),IE=Symbol("paused"),Fm=Symbol("resume"),kr=Symbol("buffer"),Jn=Symbol("pipes"),Br=Symbol("bufferLength"),dF=Symbol("bufferPush"),zT=Symbol("bufferShift"),An=Symbol("objectMode"),gr=Symbol("destroyed"),pF=Symbol("error"),hF=Symbol("emitData"),poe=Symbol("emitEnd"),mF=Symbol("emitEnd2"),va=Symbol("async"),_F=Symbol("abort"),HT=Symbol("aborted"),wE=Symbol("signal"),Ud=Symbol("dataListeners"),Wi=Symbol("discarded"),TE=s(e=>Promise.resolve().then(e),"defer"),xat=s(e=>e(),"nodefer"),qat=s(e=>e==="end"||e==="finish"||e==="prefinish","isEndish"),Fat=s(e=>e instanceof ArrayBuffer||!!e&&typeof e=="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0,"isArrayBufferLike"),kat=s(e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e),"isArrayBufferView"),KT=class{static{s(this,"Pipe")}src;dest;opts;ondrain;constructor(t,r,n){this.src=t,this.dest=r,this.opts=n,this.ondrain=()=>t[Fm](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},gF=class extends KT{static{s(this,"PipeProxyErrors")}unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,r,n){super(t,r,n),this.proxyErrors=i=>r.emit("error",i),t.on("error",this.proxyErrors)}},Bat=s(e=>!!e.objectMode,"isObjectModeOptions"),Gat=s(e=>!e.objectMode&&!!e.encoding&&e.encoding!=="buffer","isEncodingOptions"),WT=class extends yF.EventEmitter{static{s(this,"Minipass")}[Fr]=!1;[IE]=!1;[Jn]=[];[kr]=[];[An];[Po];[va];[qm];[Ou]=!1;[Yc]=!1;[BT]=!1;[GT]=!1;[PE]=null;[Br]=0;[gr]=!1;[wE];[HT]=!1;[Ud]=0;[Wi]=!1;writable=!0;readable=!0;constructor(...t){let r=t[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");Bat(r)?(this[An]=!0,this[Po]=null):Gat(r)?(this[Po]=r.encoding,this[An]=!1):(this[An]=!1,this[Po]=null),this[va]=!!r.async,this[qm]=this[Po]?new Lat.StringDecoder(this[Po]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[kr]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Jn]});let{signal:n}=r;n&&(this[wE]=n,n.aborted?this[_F]():n.addEventListener("abort",()=>this[_F]()))}get bufferLength(){return this[Br]}get encoding(){return this[Po]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[An]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[va]}set async(t){this[va]=this[va]||!!t}[_F](){this[HT]=!0,this.emit("abort",this[wE]?.reason),this.destroy(this[wE]?.reason)}get aborted(){return this[HT]}set aborted(t){}write(t,r,n){if(this[HT])return!1;if(this[Ou])throw new Error("write after end");if(this[gr])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(n=r,r="utf8"),r||(r="utf8");let i=this[va]?TE:xat;if(!this[An]&&!Buffer.isBuffer(t)){if(kat(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(Fat(t))t=Buffer.from(t);else if(typeof t!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[An]?(this[Fr]&&this[Br]!==0&&this[VT](!0),this[Fr]?this.emit("data",t):this[dF](t),this[Br]!==0&&this.emit("readable"),n&&i(n),this[Fr]):t.length?(typeof t=="string"&&!(r===this[Po]&&!this[qm]?.lastNeed)&&(t=Buffer.from(t,r)),Buffer.isBuffer(t)&&this[Po]&&(t=this[qm].write(t)),this[Fr]&&this[Br]!==0&&this[VT](!0),this[Fr]?this.emit("data",t):this[dF](t),this[Br]!==0&&this.emit("readable"),n&&i(n),this[Fr]):(this[Br]!==0&&this.emit("readable"),n&&i(n),this[Fr])}read(t){if(this[gr])return null;if(this[Wi]=!1,this[Br]===0||t===0||t&&t>this[Br])return this[Pu](),null;this[An]&&(t=null),this[kr].length>1&&!this[An]&&(this[kr]=[this[Po]?this[kr].join(""):Buffer.concat(this[kr],this[Br])]);let r=this[foe](t||null,this[kr][0]);return this[Pu](),r}[foe](t,r){if(this[An])this[zT]();else{let n=r;t===n.length||t===null?this[zT]():typeof n=="string"?(this[kr][0]=n.slice(t),r=n.slice(0,t),this[Br]-=t):(this[kr][0]=n.subarray(t),r=n.subarray(0,t),this[Br]-=t)}return this.emit("data",r),!this[kr].length&&!this[Ou]&&this.emit("drain"),r}end(t,r,n){return typeof t=="function"&&(n=t,t=void 0),typeof r=="function"&&(n=r,r="utf8"),t!==void 0&&this.write(t,r),n&&this.once("end",n),this[Ou]=!0,this.writable=!1,(this[Fr]||!this[IE])&&this[Pu](),this}[Fm](){this[gr]||(!this[Ud]&&!this[Jn].length&&(this[Wi]=!0),this[IE]=!1,this[Fr]=!0,this.emit("resume"),this[kr].length?this[VT]():this[Ou]?this[Pu]():this.emit("drain"))}resume(){return this[Fm]()}pause(){this[Fr]=!1,this[IE]=!0,this[Wi]=!1}get destroyed(){return this[gr]}get flowing(){return this[Fr]}get paused(){return this[IE]}[dF](t){this[An]?this[Br]+=1:this[Br]+=t.length,this[kr].push(t)}[zT](){return this[An]?this[Br]-=1:this[Br]-=this[kr][0].length,this[kr].shift()}[VT](t=!1){do;while(this[doe](this[zT]())&&this[kr].length);!t&&!this[kr].length&&!this[Ou]&&this.emit("drain")}[doe](t){return this.emit("data",t),this[Fr]}pipe(t,r){if(this[gr])return t;this[Wi]=!1;let n=this[Yc];return r=r||{},t===loe.stdout||t===loe.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,n?r.end&&t.end():(this[Jn].push(r.proxyErrors?new gF(this,t,r):new KT(this,t,r)),this[va]?TE(()=>this[Fm]()):this[Fm]()),t}unpipe(t){let r=this[Jn].find(n=>n.dest===t);r&&(this[Jn].length===1?(this[Fr]&&this[Ud]===0&&(this[Fr]=!1),this[Jn]=[]):this[Jn].splice(this[Jn].indexOf(r),1),r.unpipe())}addListener(t,r){return this.on(t,r)}on(t,r){let n=super.on(t,r);if(t==="data")this[Wi]=!1,this[Ud]++,!this[Jn].length&&!this[Fr]&&this[Fm]();else if(t==="readable"&&this[Br]!==0)super.emit("readable");else if(qat(t)&&this[Yc])super.emit(t),this.removeAllListeners(t);else if(t==="error"&&this[PE]){let i=r;this[va]?TE(()=>i.call(this,this[PE])):i.call(this,this[PE])}return n}removeListener(t,r){return this.off(t,r)}off(t,r){let n=super.off(t,r);return t==="data"&&(this[Ud]=this.listeners("data").length,this[Ud]===0&&!this[Wi]&&!this[Jn].length&&(this[Fr]=!1)),n}removeAllListeners(t){let r=super.removeAllListeners(t);return(t==="data"||t===void 0)&&(this[Ud]=0,!this[Wi]&&!this[Jn].length&&(this[Fr]=!1)),r}get emittedEnd(){return this[Yc]}[Pu](){!this[BT]&&!this[Yc]&&!this[gr]&&this[kr].length===0&&this[Ou]&&(this[BT]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[GT]&&this.emit("close"),this[BT]=!1)}emit(t,...r){let n=r[0];if(t!=="error"&&t!=="close"&&t!==gr&&this[gr])return!1;if(t==="data")return!this[An]&&!n?!1:this[va]?(TE(()=>this[hF](n)),!0):this[hF](n);if(t==="end")return this[poe]();if(t==="close"){if(this[GT]=!0,!this[Yc]&&!this[gr])return!1;let o=super.emit("close");return this.removeAllListeners("close"),o}else if(t==="error"){this[PE]=n,super.emit(pF,n);let o=!this[wE]||this.listeners("error").length?super.emit("error",n):!1;return this[Pu](),o}else if(t==="resume"){let o=super.emit("resume");return this[Pu](),o}else if(t==="finish"||t==="prefinish"){let o=super.emit(t);return this.removeAllListeners(t),o}let i=super.emit(t,...r);return this[Pu](),i}[hF](t){for(let n of this[Jn])n.dest.write(t)===!1&&this.pause();let r=this[Wi]?!1:super.emit("data",t);return this[Pu](),r}[poe](){return this[Yc]?!1:(this[Yc]=!0,this.readable=!1,this[va]?(TE(()=>this[mF]()),!0):this[mF]())}[mF](){if(this[qm]){let r=this[qm].end();if(r){for(let n of this[Jn])n.dest.write(r);this[Wi]||super.emit("data",r)}}for(let r of this[Jn])r.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[An]||(t.dataLength=0);let r=this.promise();return this.on("data",n=>{t.push(n),this[An]||(t.dataLength+=n.length)}),await r,t}async concat(){if(this[An])throw new Error("cannot concat in objectMode");let t=await this.collect();return this[Po]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,r)=>{this.on(gr,()=>r(new Error("stream destroyed"))),this.on("error",n=>r(n)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[Wi]=!1;let t=!1,r=s(async()=>(this.pause(),t=!0,{value:void 0,done:!0}),"stop");return{next:s(()=>{if(t)return r();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[Ou])return r();let o,a,u=s(d=>{this.off("data",c),this.off("end",l),this.off(gr,f),r(),a(d)},"onerr"),c=s(d=>{this.off("error",u),this.off("end",l),this.off(gr,f),this.pause(),o({value:d,done:!!this[Ou]})},"ondata"),l=s(()=>{this.off("error",u),this.off("data",c),this.off(gr,f),r(),o({done:!0,value:void 0})},"onend"),f=s(()=>u(new Error("stream destroyed")),"ondestroy");return new Promise((d,_)=>{a=_,o=d,this.once(gr,f),this.once("error",u),this.once("end",l),this.once("data",c)})},"next"),throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Wi]=!1;let t=!1,r=s(()=>(this.pause(),this.off(pF,r),this.off(gr,r),this.off("end",r),t=!0,{done:!0,value:void 0}),"stop"),n=s(()=>{if(t)return r();let i=this.read();return i===null?r():{done:!1,value:i}},"next");return this.once("end",r),this.once(pF,r),this.once(gr,r),{next:n,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(t){if(this[gr])return t?this.emit("error",t):this.emit(gr),this;this[gr]=!0,this[Wi]=!0,this[kr].length=0,this[Br]=0;let r=this;return typeof r.close=="function"&&!this[GT]&&r.close(),t?this.emit("error",t):this.emit(gr),this}static get isStream(){return Xn.isStream}};Xn.Minipass=WT});var Aoe=h(Ot=>{"use strict";var Vat=Ot&&Ot.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),zat=Ot&&Ot.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Hat=Ot&&Ot.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Vat(t,e,r);return zat(t,e),t};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.PathScurry=Ot.Path=Ot.PathScurryDarwin=Ot.PathScurryPosix=Ot.PathScurryWin32=Ot.PathScurryBase=Ot.PathPosix=Ot.PathWin32=Ot.PathBase=Ot.ChildrenCache=Ot.ResolveCache=void 0;var boe=coe(),ZT=require("path"),Kat=require("url"),Wat=Hat(require("fs")),AE=require("fs"),Yat=AE.realpathSync.native,YT=require("fs/promises"),moe=EF(),RE={lstatSync:AE.lstatSync,readdir:AE.readdir,readdirSync:AE.readdirSync,readlinkSync:AE.readlinkSync,realpathSync:Yat,promises:{lstat:YT.lstat,readdir:YT.readdir,readlink:YT.readlink,realpath:YT.realpath}},Soe=s(e=>!e||e===RE||e===Wat?RE:{...RE,...e,promises:{...RE.promises,...e.promises||{}}},"fsFromOption"),voe=/^\\\\\?\\([a-z]:)\\?$/i,Jat=s(e=>e.replace(/\//g,"\\").replace(voe,"$1\\"),"uncToDrive"),Xat=/[\\\/]/,Ls=0,Ooe=1,Poe=2,Oa=4,Ioe=6,woe=8,xd=10,Toe=12,Ds=15,NE=~Ds,bF=16,_oe=32,CE=64,Io=128,JT=256,QT=512,goe=CE|Io|QT,Qat=1023,SF=s(e=>e.isFile()?woe:e.isDirectory()?Oa:e.isSymbolicLink()?xd:e.isCharacterDevice()?Poe:e.isBlockDevice()?Ioe:e.isSocket()?Toe:e.isFIFO()?Ooe:Ls,"entToType"),yoe=new Map,$E=s(e=>{let t=yoe.get(e);if(t)return t;let r=e.normalize("NFKD");return yoe.set(e,r),r},"normalize"),Eoe=new Map,XT=s(e=>{let t=Eoe.get(e);if(t)return t;let r=$E(e.toLowerCase());return Eoe.set(e,r),r},"normalizeNocase"),DE=class extends boe.LRUCache{static{s(this,"ResolveCache")}constructor(){super({max:256})}};Ot.ResolveCache=DE;var e1=class extends boe.LRUCache{static{s(this,"ChildrenCache")}constructor(t=16*1024){super({maxSize:t,sizeCalculation:r=>r.length+1})}};Ot.ChildrenCache=e1;var Noe=Symbol("PathScurry setAsCwd"),un=class{static{s(this,"PathBase")}name;root;roots;parent;nocase;#t;#r;get dev(){return this.#r}#n;get mode(){return this.#n}#e;get nlink(){return this.#e}#s;get uid(){return this.#s}#c;get gid(){return this.#c}#f;get rdev(){return this.#f}#l;get blksize(){return this.#l}#a;get ino(){return this.#a}#i;get size(){return this.#i}#u;get blocks(){return this.#u}#E;get atimeMs(){return this.#E}#_;get mtimeMs(){return this.#_}#p;get ctimeMs(){return this.#p}#b;get birthtimeMs(){return this.#b}#d;get atime(){return this.#d}#w;get mtime(){return this.#w}#A;get ctime(){return this.#A}#O;get birthtime(){return this.#O}#v;#T;#m;#P;#y;#I;#o;#S;#R;#g;get path(){return(this.parent||this).fullpath()}constructor(t,r=Ls,n,i,o,a,u){this.name=t,this.#v=o?XT(t):$E(t),this.#o=r&Qat,this.nocase=o,this.roots=i,this.root=n||this,this.#S=a,this.#m=u.fullpath,this.#y=u.relative,this.#I=u.relativePosix,this.parent=u.parent,this.parent?this.#t=this.parent.#t:this.#t=Soe(u.fs)}depth(){return this.#T!==void 0?this.#T:this.parent?this.#T=this.parent.depth()+1:this.#T=0}childrenCache(){return this.#S}resolve(t){if(!t)return this;let r=this.getRootString(t),i=t.substring(r.length).split(this.splitSep);return r?this.getRoot(r).#$(i):this.#$(i)}#$(t){let r=this;for(let n of t)r=r.child(n);return r}children(){let t=this.#S.get(this);if(t)return t;let r=Object.assign([],{provisional:0});return this.#S.set(this,r),this.#o&=~bF,r}child(t,r){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let n=this.children(),i=this.nocase?XT(t):$E(t);for(let c of n)if(c.#v===i)return c;let o=this.parent?this.sep:"",a=this.#m?this.#m+o+t:void 0,u=this.newChild(t,Ls,{...r,parent:this,fullpath:a});return this.canReaddir()||(u.#o|=Io),n.push(u),u}relative(){if(this.#y!==void 0)return this.#y;let t=this.name,r=this.parent;if(!r)return this.#y=this.name;let n=r.relative();return n+(!n||!r.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.#I!==void 0)return this.#I;let t=this.name,r=this.parent;if(!r)return this.#I=this.fullpathPosix();let n=r.relativePosix();return n+(!n||!r.parent?"":"/")+t}fullpath(){if(this.#m!==void 0)return this.#m;let t=this.name,r=this.parent;if(!r)return this.#m=this.name;let i=r.fullpath()+(r.parent?this.sep:"")+t;return this.#m=i}fullpathPosix(){if(this.#P!==void 0)return this.#P;if(this.sep==="/")return this.#P=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#P=`//?/${i}`:this.#P=i}let t=this.parent,r=t.fullpathPosix(),n=r+(!r||!t.parent?"":"/")+this.name;return this.#P=n}isUnknown(){return(this.#o&Ds)===Ls}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#o&Ds)===woe}isDirectory(){return(this.#o&Ds)===Oa}isCharacterDevice(){return(this.#o&Ds)===Poe}isBlockDevice(){return(this.#o&Ds)===Ioe}isFIFO(){return(this.#o&Ds)===Ooe}isSocket(){return(this.#o&Ds)===Toe}isSymbolicLink(){return(this.#o&xd)===xd}lstatCached(){return this.#o&_oe?this:void 0}readlinkCached(){return this.#R}realpathCached(){return this.#g}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#R)return!0;if(!this.parent)return!1;let t=this.#o&Ds;return!(t!==Ls&&t!==xd||this.#o&JT||this.#o&Io)}calledReaddir(){return!!(this.#o&bF)}isENOENT(){return!!(this.#o&Io)}isNamed(t){return this.nocase?this.#v===XT(t):this.#v===$E(t)}async readlink(){let t=this.#R;if(t)return t;if(this.canReadlink()&&this.parent)try{let r=await this.#t.promises.readlink(this.fullpath()),n=this.parent.resolve(r);if(n)return this.#R=n}catch(r){this.#x(r.code);return}}readlinkSync(){let t=this.#R;if(t)return t;if(this.canReadlink()&&this.parent)try{let r=this.#t.readlinkSync(this.fullpath()),n=this.parent.resolve(r);if(n)return this.#R=n}catch(r){this.#x(r.code);return}}#M(t){this.#o|=bF;for(let r=t.provisional;r<t.length;r++)t[r].#N()}#N(){this.#o&Io||(this.#o=(this.#o|Io)&NE,this.#C())}#C(){let t=this.children();t.provisional=0;for(let r of t)r.#N()}#U(){this.#o|=QT,this.#D()}#D(){if(this.#o&CE)return;let t=this.#o;(t&Ds)===Oa&&(t&=NE),this.#o=t|CE,this.#C()}#j(t=""){t==="ENOTDIR"||t==="EPERM"?this.#D():t==="ENOENT"?this.#N():this.children().provisional=0}#h(t=""){t==="ENOTDIR"?this.parent.#D():t==="ENOENT"&&this.#N()}#x(t=""){let r=this.#o;r|=JT,t==="ENOENT"&&(r|=Io),(t==="EINVAL"||t==="UNKNOWN")&&(r&=NE),this.#o=r,t==="ENOTDIR"&&this.parent&&this.parent.#D()}#L(t,r){return this.#V(t,r)||this.#G(t,r)}#G(t,r){let n=SF(t),i=this.newChild(t.name,n,{parent:this}),o=i.#o&Ds;return o!==Oa&&o!==xd&&o!==Ls&&(i.#o|=CE),r.unshift(i),r.provisional++,i}#V(t,r){for(let n=r.provisional;n<r.length;n++){let i=r[n];if((this.nocase?XT(t.name):$E(t.name))===i.#v)return this.#z(t,i,n,r)}}#z(t,r,n,i){let o=r.name;return r.#o=r.#o&NE|SF(t),o!==t.name&&(r.name=t.name),n!==i.provisional&&(n===i.length-1?i.pop():i.splice(n,1),i.unshift(r)),i.provisional++,r}async lstat(){if(!(this.#o&Io))try{return this.#B(await this.#t.promises.lstat(this.fullpath())),this}catch(t){this.#h(t.code)}}lstatSync(){if(!(this.#o&Io))try{return this.#B(this.#t.lstatSync(this.fullpath())),this}catch(t){this.#h(t.code)}}#B(t){let{atime:r,atimeMs:n,birthtime:i,birthtimeMs:o,blksize:a,blocks:u,ctime:c,ctimeMs:l,dev:f,gid:d,ino:_,mode:m,mtime:g,mtimeMs:y,nlink:b,rdev:E,size:v,uid:O}=t;this.#d=r,this.#E=n,this.#O=i,this.#b=o,this.#l=a,this.#u=u,this.#A=c,this.#p=l,this.#r=f,this.#c=d,this.#a=_,this.#n=m,this.#w=g,this.#_=y,this.#e=b,this.#f=E,this.#i=v,this.#s=O;let I=SF(t);this.#o=this.#o&NE|I|_oe,I!==Ls&&I!==Oa&&I!==xd&&(this.#o|=CE)}#F=[];#k=!1;#H(t){this.#k=!1;let r=this.#F.slice();this.#F.length=0,r.forEach(n=>n(null,t))}readdirCB(t,r=!1){if(!this.canReaddir()){r?t(null,[]):queueMicrotask(()=>t(null,[]));return}let n=this.children();if(this.calledReaddir()){let o=n.slice(0,n.provisional);r?t(null,o):queueMicrotask(()=>t(null,o));return}if(this.#F.push(t),this.#k)return;this.#k=!0;let i=this.fullpath();this.#t.readdir(i,{withFileTypes:!0},(o,a)=>{if(o)this.#j(o.code),n.provisional=0;else{for(let u of a)this.#L(u,n);this.#M(n)}this.#H(n.slice(0,n.provisional))})}#q;async readdir(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let r=this.fullpath();if(this.#q)await this.#q;else{let n=s(()=>{},"resolve");this.#q=new Promise(i=>n=i);try{for(let i of await this.#t.promises.readdir(r,{withFileTypes:!0}))this.#L(i,t);this.#M(t)}catch(i){this.#j(i.code),t.provisional=0}this.#q=void 0,n()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let r=this.fullpath();try{for(let n of this.#t.readdirSync(r,{withFileTypes:!0}))this.#L(n,t);this.#M(t)}catch(n){this.#j(n.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(this.#o&goe)return!1;let t=Ds&this.#o;return t===Ls||t===Oa||t===xd}shouldWalk(t,r){return(this.#o&Oa)===Oa&&!(this.#o&goe)&&!t.has(this)&&(!r||r(this))}async realpath(){if(this.#g)return this.#g;if(!((QT|JT|Io)&this.#o))try{let t=await this.#t.promises.realpath(this.fullpath());return this.#g=this.resolve(t)}catch{this.#U()}}realpathSync(){if(this.#g)return this.#g;if(!((QT|JT|Io)&this.#o))try{let t=this.#t.realpathSync(this.fullpath());return this.#g=this.resolve(t)}catch{this.#U()}}[Noe](t){if(t===this)return;let r=new Set([]),n=[],i=this;for(;i&&i.parent;)r.add(i),i.#y=n.join(this.sep),i.#I=n.join("/"),i=i.parent,n.push("..");for(i=t;i&&i.parent&&!r.has(i);)i.#y=void 0,i.#I=void 0,i=i.parent}};Ot.PathBase=un;var LE=class e extends un{static{s(this,"PathWin32")}sep="\\";splitSep=Xat;constructor(t,r=Ls,n,i,o,a,u){super(t,r,n,i,o,a,u)}newChild(t,r=Ls,n={}){return new e(t,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}getRootString(t){return ZT.win32.parse(t).root}getRoot(t){if(t=Jat(t.toUpperCase()),t===this.root.name)return this.root;for(let[r,n]of Object.entries(this.roots))if(this.sameRoot(t,r))return this.roots[t]=n;return this.roots[t]=new UE(t,this).root}sameRoot(t,r=this.root.name){return t=t.toUpperCase().replace(/\//g,"\\").replace(voe,"$1\\"),t===r}};Ot.PathWin32=LE;var jE=class e extends un{static{s(this,"PathPosix")}splitSep="/";sep="/";constructor(t,r=Ls,n,i,o,a,u){super(t,r,n,i,o,a,u)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,r=Ls,n={}){return new e(t,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}};Ot.PathPosix=jE;var ME=class{static{s(this,"PathScurryBase")}root;rootPath;roots;cwd;#t;#r;#n;nocase;#e;constructor(t=process.cwd(),r,n,{nocase:i,childrenCacheSize:o=16*1024,fs:a=RE}={}){this.#e=Soe(a),(t instanceof URL||t.startsWith("file://"))&&(t=(0,Kat.fileURLToPath)(t));let u=r.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(u),this.#t=new DE,this.#r=new DE,this.#n=new e1(o);let c=u.substring(this.rootPath.length).split(n);if(c.length===1&&!c[0]&&c.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#e),this.roots[this.rootPath]=this.root;let l=this.root,f=c.length-1,d=r.sep,_=this.rootPath,m=!1;for(let g of c){let y=f--;l=l.child(g,{relative:new Array(y).fill("..").join(d),relativePosix:new Array(y).fill("..").join("/"),fullpath:_+=(m?"":d)+g}),m=!0}this.cwd=l}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#n}resolve(...t){let r="";for(let o=t.length-1;o>=0;o--){let a=t[o];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let n=this.#t.get(r);if(n!==void 0)return n;let i=this.cwd.resolve(r).fullpath();return this.#t.set(r,i),i}resolvePosix(...t){let r="";for(let o=t.length-1;o>=0;o--){let a=t[o];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let n=this.#r.get(r);if(n!==void 0)return n;let i=this.cwd.resolve(r).fullpathPosix();return this.#r.set(r,i),i}relative(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,r={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n}=r;if(t.canReaddir()){let i=await t.readdir();return n?i:i.map(o=>o.name)}else return[]}readdirSync(t=this.cwd,r={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n=!0}=r;return t.canReaddir()?n?t.readdirSync():t.readdirSync().map(i=>i.name):[]}async lstat(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t.withFileTypes,t=this.cwd);let n=await t.readlink();return r?n:n?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t.withFileTypes,t=this.cwd);let n=t.readlinkSync();return r?n:n?.fullpath()}async realpath(t=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t.withFileTypes,t=this.cwd);let n=await t.realpath();return r?n:n?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t.withFileTypes,t=this.cwd);let n=t.realpathSync();return r?n:n?.fullpath()}async walk(t=this.cwd,r={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r,u=[];(!o||o(t))&&u.push(n?t:t.fullpath());let c=new Set,l=s((d,_)=>{c.add(d),d.readdirCB((m,g)=>{if(m)return _(m);let y=g.length;if(!y)return _();let b=s(()=>{--y===0&&_()},"next");for(let E of g)(!o||o(E))&&u.push(n?E:E.fullpath()),i&&E.isSymbolicLink()?E.realpath().then(v=>v?.isUnknown()?v.lstat():v).then(v=>v?.shouldWalk(c,a)?l(v,b):b()):E.shouldWalk(c,a)?l(E,b):b()},!0)},"walk"),f=t;return new Promise((d,_)=>{l(f,m=>{if(m)return _(m);d(u)})})}walkSync(t=this.cwd,r={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r,u=[];(!o||o(t))&&u.push(n?t:t.fullpath());let c=new Set([t]);for(let l of c){let f=l.readdirSync();for(let d of f){(!o||o(d))&&u.push(n?d:d.fullpath());let _=d;if(d.isSymbolicLink()){if(!(i&&(_=d.realpathSync())))continue;_.isUnknown()&&_.lstatSync()}_.shouldWalk(c,a)&&c.add(_)}}return u}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,r={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd),this.stream(t,r)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,r={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r;(!o||o(t))&&(yield n?t:t.fullpath());let u=new Set([t]);for(let c of u){let l=c.readdirSync();for(let f of l){(!o||o(f))&&(yield n?f:f.fullpath());let d=f;if(f.isSymbolicLink()){if(!(i&&(d=f.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(u,a)&&u.add(d)}}}stream(t=this.cwd,r={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r,u=new moe.Minipass({objectMode:!0});(!o||o(t))&&u.write(n?t:t.fullpath());let c=new Set,l=[t],f=0,d=s(()=>{let _=!1;for(;!_;){let m=l.shift();if(!m){f===0&&u.end();return}f++,c.add(m);let g=s((b,E,v=!1)=>{if(b)return u.emit("error",b);if(i&&!v){let O=[];for(let I of E)I.isSymbolicLink()&&O.push(I.realpath().then(w=>w?.isUnknown()?w.lstat():w));if(O.length){Promise.all(O).then(()=>g(null,E,!0));return}}for(let O of E)O&&(!o||o(O))&&(u.write(n?O:O.fullpath())||(_=!0));f--;for(let O of E){let I=O.realpathCached()||O;I.shouldWalk(c,a)&&l.push(I)}_&&!u.flowing?u.once("drain",d):y||d()},"onReaddir"),y=!0;m.readdirCB(g,!0),y=!1}},"process");return d(),u}streamSync(t=this.cwd,r={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r,u=new moe.Minipass({objectMode:!0}),c=new Set;(!o||o(t))&&u.write(n?t:t.fullpath());let l=[t],f=0,d=s(()=>{let _=!1;for(;!_;){let m=l.shift();if(!m){f===0&&u.end();return}f++,c.add(m);let g=m.readdirSync();for(let y of g)(!o||o(y))&&(u.write(n?y:y.fullpath())||(_=!0));f--;for(let y of g){let b=y;if(y.isSymbolicLink()){if(!(i&&(b=y.realpathSync())))continue;b.isUnknown()&&b.lstatSync()}b.shouldWalk(c,a)&&l.push(b)}}_&&!u.flowing&&u.once("drain",d)},"process");return d(),u}chdir(t=this.cwd){let r=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[Noe](r)}};Ot.PathScurryBase=ME;var UE=class extends ME{static{s(this,"PathScurryWin32")}sep="\\";constructor(t=process.cwd(),r={}){let{nocase:n=!0}=r;super(t,ZT.win32,"\\",{...r,nocase:n}),this.nocase=n;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(t){return ZT.win32.parse(t).root.toUpperCase()}newRoot(t){return new LE(this.rootPath,Oa,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}};Ot.PathScurryWin32=UE;var xE=class extends ME{static{s(this,"PathScurryPosix")}sep="/";constructor(t=process.cwd(),r={}){let{nocase:n=!1}=r;super(t,ZT.posix,"/",{...r,nocase:n}),this.nocase=n}parseRootPath(t){return"/"}newRoot(t){return new jE(this.rootPath,Oa,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}};Ot.PathScurryPosix=xE;var t1=class extends xE{static{s(this,"PathScurryDarwin")}constructor(t=process.cwd(),r={}){let{nocase:n=!0}=r;super(t,{...r,nocase:n})}};Ot.PathScurryDarwin=t1;Ot.Path=process.platform==="win32"?LE:jE;Ot.PathScurry=process.platform==="win32"?UE:process.platform==="darwin"?t1:xE});var OF=h(r1=>{"use strict";Object.defineProperty(r1,"__esModule",{value:!0});r1.Pattern=void 0;var Zat=Kc(),eut=s(e=>e.length>=1,"isPatternList"),tut=s(e=>e.length>=1,"isGlobList"),vF=class e{static{s(this,"Pattern")}#t;#r;#n;length;#e;#s;#c;#f;#l;#a;#i=!0;constructor(t,r,n,i){if(!eut(t))throw new TypeError("empty pattern list");if(!tut(r))throw new TypeError("empty glob list");if(r.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,n<0||n>=this.length)throw new TypeError("index out of range");if(this.#t=t,this.#r=r,this.#n=n,this.#e=i,this.#n===0){if(this.isUNC()){let[o,a,u,c,...l]=this.#t,[f,d,_,m,...g]=this.#r;l[0]===""&&(l.shift(),g.shift());let y=[o,a,u,c,""].join("/"),b=[f,d,_,m,""].join("/");this.#t=[y,...l],this.#r=[b,...g],this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){let[o,...a]=this.#t,[u,...c]=this.#r;a[0]===""&&(a.shift(),c.shift());let l=o+"/",f=u+"/";this.#t=[l,...a],this.#r=[f,...c],this.length=this.#t.length}}}pattern(){return this.#t[this.#n]}isString(){return typeof this.#t[this.#n]=="string"}isGlobstar(){return this.#t[this.#n]===Zat.GLOBSTAR}isRegExp(){return this.#t[this.#n]instanceof RegExp}globString(){return this.#c=this.#c||(this.#n===0?this.isAbsolute()?this.#r[0]+this.#r.slice(1).join("/"):this.#r.join("/"):this.#r.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#s!==void 0?this.#s:this.hasMore()?(this.#s=new e(this.#t,this.#r,this.#n+1,this.#e),this.#s.#a=this.#a,this.#s.#l=this.#l,this.#s.#f=this.#f,this.#s):this.#s=null}isUNC(){let t=this.#t;return this.#l!==void 0?this.#l:this.#l=this.#e==="win32"&&this.#n===0&&t[0]===""&&t[1]===""&&typeof t[2]=="string"&&!!t[2]&&typeof t[3]=="string"&&!!t[3]}isDrive(){let t=this.#t;return this.#f!==void 0?this.#f:this.#f=this.#e==="win32"&&this.#n===0&&this.length>1&&typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){let t=this.#t;return this.#a!==void 0?this.#a:this.#a=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){let t=this.#t[0];return typeof t=="string"&&this.isAbsolute()&&this.#n===0?t:""}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#i)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#i?!1:(this.#i=!1,!0)}};r1.Pattern=vF});var Coe=h(n1=>{"use strict";Object.defineProperty(n1,"__esModule",{value:!0});n1.Ignore=void 0;var Roe=Kc(),rut=OF(),nut=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",PF=class{static{s(this,"Ignore")}relative;relativeChildren;absolute;absoluteChildren;constructor(t,{nobrace:r,nocase:n,noext:i,noglobstar:o,platform:a=nut}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[];let u={dot:!0,nobrace:r,nocase:n,noext:i,noglobstar:o,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let c of t){let l=new Roe.Minimatch(c,u);for(let f=0;f<l.set.length;f++){let d=l.set[f],_=l.globParts[f];if(!d||!_)throw new Error("invalid pattern object");let m=new rut.Pattern(d,_,0,a),g=new Roe.Minimatch(m.globString(),u),y=_[_.length-1]==="**",b=m.isAbsolute();b?this.absolute.push(g):this.relative.push(g),y&&(b?this.absoluteChildren.push(g):this.relativeChildren.push(g))}}}ignored(t){let r=t.fullpath(),n=`${r}/`,i=t.relative()||".",o=`${i}/`;for(let a of this.relative)if(a.match(i)||a.match(o))return!0;for(let a of this.absolute)if(a.match(r)||a.match(n))return!0;return!1}childrenIgnored(t){let r=t.fullpath()+"/",n=(t.relative()||".")+"/";for(let i of this.relativeChildren)if(i.match(n))return!0;for(let i of this.absoluteChildren)if(i.match(r))return!0;return!1}};n1.Ignore=PF});var Doe=h(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});Pa.Processor=Pa.SubWalks=Pa.MatchRecord=Pa.HasWalkedCache=void 0;var $oe=Kc(),i1=class e{static{s(this,"HasWalkedCache")}store;constructor(t=new Map){this.store=t}copy(){return new e(new Map(this.store))}hasWalked(t,r){return this.store.get(t.fullpath())?.has(r.globString())}storeWalked(t,r){let n=t.fullpath(),i=this.store.get(n);i?i.add(r.globString()):this.store.set(n,new Set([r.globString()]))}};Pa.HasWalkedCache=i1;var s1=class{static{s(this,"MatchRecord")}store=new Map;add(t,r,n){let i=(r?2:0)|(n?1:0),o=this.store.get(t);this.store.set(t,o===void 0?i:i&o)}entries(){return[...this.store.entries()].map(([t,r])=>[t,!!(r&2),!!(r&1)])}};Pa.MatchRecord=s1;var o1=class{static{s(this,"SubWalks")}store=new Map;add(t,r){if(!t.canReaddir())return;let n=this.store.get(t);n?n.find(i=>i.globString()===r.globString())||n.push(r):this.store.set(t,[r])}get(t){let r=this.store.get(t);if(!r)throw new Error("attempting to walk unknown path");return r}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return[...this.store.keys()].filter(t=>t.canReaddir())}};Pa.SubWalks=o1;var IF=class e{static{s(this,"Processor")}hasWalkedCache;matches=new s1;subwalks=new o1;patterns;follow;dot;opts;constructor(t,r){this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=r?r.copy():new i1}processPatterns(t,r){this.patterns=r;let n=r.map(i=>[t,i]);for(let[i,o]of n){this.hasWalkedCache.storeWalked(i,o);let a=o.root(),u=o.isAbsolute()&&this.opts.absolute!==!1;if(a){i=i.resolve(a==="/"&&this.opts.root!==void 0?this.opts.root:a);let d=o.rest();if(d)o=d;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let c,l,f=!1;for(;typeof(c=o.pattern())=="string"&&(l=o.rest());)i=i.resolve(c),o=l,f=!0;if(c=o.pattern(),l=o.rest(),f){if(this.hasWalkedCache.hasWalked(i,o))continue;this.hasWalkedCache.storeWalked(i,o)}if(typeof c=="string"){let d=c===".."||c===""||c===".";this.matches.add(i.resolve(c),u,d);continue}else if(c===$oe.GLOBSTAR){(!i.isSymbolicLink()||this.follow||o.checkFollowGlobstar())&&this.subwalks.add(i,o);let d=l?.pattern(),_=l?.rest();if(!l||(d===""||d===".")&&!_)this.matches.add(i,u,d===""||d===".");else if(d===".."){let m=i.parent||i;_?this.hasWalkedCache.hasWalked(m,_)||this.subwalks.add(m,_):this.matches.add(m,u,!0)}}else c instanceof RegExp&&this.subwalks.add(i,o)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new e(this.opts,this.hasWalkedCache)}filterEntries(t,r){let n=this.subwalks.get(t),i=this.child();for(let o of r)for(let a of n){let u=a.isAbsolute(),c=a.pattern(),l=a.rest();c===$oe.GLOBSTAR?i.testGlobstar(o,a,l,u):c instanceof RegExp?i.testRegExp(o,c,l,u):i.testString(o,c,l,u)}return i}testGlobstar(t,r,n,i){if((this.dot||!t.name.startsWith("."))&&(r.hasMore()||this.matches.add(t,i,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,r):t.isSymbolicLink()&&(n&&r.checkFollowGlobstar()?this.subwalks.add(t,n):r.markFollowGlobstar()&&this.subwalks.add(t,r)))),n){let o=n.pattern();if(typeof o=="string"&&o!==".."&&o!==""&&o!==".")this.testString(t,o,n.rest(),i);else if(o===".."){let a=t.parent||t;this.subwalks.add(a,n)}else o instanceof RegExp&&this.testRegExp(t,o,n.rest(),i)}}testRegExp(t,r,n,i){r.test(t.name)&&(n?this.subwalks.add(t,n):this.matches.add(t,i,!1))}testString(t,r,n,i){t.isNamed(r)&&(n?this.subwalks.add(t,n):this.matches.add(t,i,!1))}};Pa.Processor=IF});var Moe=h(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.GlobStream=Jc.GlobWalker=Jc.GlobUtil=void 0;var iut=EF(),Loe=Coe(),joe=Doe(),sut=s((e,t)=>typeof e=="string"?new Loe.Ignore([e],t):Array.isArray(e)?new Loe.Ignore(e,t):e,"makeIgnore"),qE=class{static{s(this,"GlobUtil")}path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#t=[];#r;#n;signal;maxDepth;constructor(t,r,n){this.patterns=t,this.path=r,this.opts=n,this.#n=!n.posix&&n.platform==="win32"?"\\":"/",n.ignore&&(this.#r=sut(n.ignore,n)),this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0}))}#e(t){return this.seen.has(t)||!!this.#r?.ignored?.(t)}#s(t){return!!this.#r?.childrenIgnored?.(t)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let t;for(;!this.paused&&(t=this.#t.shift());)t()}onResume(t){this.signal?.aborted||(this.paused?this.#t.push(t):t())}async matchCheck(t,r){if(r&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=t.realpathCached()||await t.realpath(),!n)return;t=n}let i=t.isUnknown()||this.opts.stat;return this.matchCheckTest(i?await t.lstat():t,r)}matchCheckTest(t,r){return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!r||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&!this.#e(t)?t:void 0}matchCheckSync(t,r){if(r&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=t.realpathCached()||t.realpathSync(),!n)return;t=n}let i=t.isUnknown()||this.opts.stat;return this.matchCheckTest(i?t.lstatSync():t,r)}matchFinish(t,r){if(this.#e(t))return;let n=this.opts.absolute===void 0?r:this.opts.absolute;this.seen.add(t);let i=this.opts.mark&&t.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(n){let o=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(o+i)}else{let o=this.opts.posix?t.relativePosix():t.relative(),a=this.opts.dotRelative&&!o.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(o?a+o+i:"."+i)}}async match(t,r,n){let i=await this.matchCheck(t,n);i&&this.matchFinish(i,r)}matchSync(t,r,n){let i=this.matchCheckSync(t,n);i&&this.matchFinish(i,r)}walkCB(t,r,n){this.signal?.aborted&&n(),this.walkCB2(t,r,new joe.Processor(this.opts),n)}walkCB2(t,r,n,i){if(this.#s(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(t,r,n,i));return}n.processPatterns(t,r);let o=1,a=s(()=>{--o===0&&i()},"next");for(let[u,c,l]of n.matches.entries())this.#e(u)||(o++,this.match(u,c,l).then(()=>a()));for(let u of n.subwalkTargets()){if(this.maxDepth!==1/0&&u.depth()>=this.maxDepth)continue;o++;let c=u.readdirCached();u.calledReaddir()?this.walkCB3(u,c,n,a):u.readdirCB((l,f)=>this.walkCB3(u,f,n,a),!0)}a()}walkCB3(t,r,n,i){n=n.filterEntries(t,r);let o=1,a=s(()=>{--o===0&&i()},"next");for(let[u,c,l]of n.matches.entries())this.#e(u)||(o++,this.match(u,c,l).then(()=>a()));for(let[u,c]of n.subwalks.entries())o++,this.walkCB2(u,c,n.child(),a);a()}walkCBSync(t,r,n){this.signal?.aborted&&n(),this.walkCB2Sync(t,r,new joe.Processor(this.opts),n)}walkCB2Sync(t,r,n,i){if(this.#s(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(t,r,n,i));return}n.processPatterns(t,r);let o=1,a=s(()=>{--o===0&&i()},"next");for(let[u,c,l]of n.matches.entries())this.#e(u)||this.matchSync(u,c,l);for(let u of n.subwalkTargets()){if(this.maxDepth!==1/0&&u.depth()>=this.maxDepth)continue;o++;let c=u.readdirSync();this.walkCB3Sync(u,c,n,a)}a()}walkCB3Sync(t,r,n,i){n=n.filterEntries(t,r);let o=1,a=s(()=>{--o===0&&i()},"next");for(let[u,c,l]of n.matches.entries())this.#e(u)||this.matchSync(u,c,l);for(let[u,c]of n.subwalks.entries())o++,this.walkCB2Sync(u,c,n.child(),a);a()}};Jc.GlobUtil=qE;var wF=class extends qE{static{s(this,"GlobWalker")}matches;constructor(t,r,n){super(t,r,n),this.matches=new Set}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,r)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?r(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}};Jc.GlobWalker=wF;var TF=class extends qE{static{s(this,"GlobStream")}results;constructor(t,r,n){super(t,r,n),this.results=new iut.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(t){this.results.write(t),this.results.flowing||this.pause()}stream(){let t=this.path;return t.isUnknown()?t.lstat().then(()=>{this.walkCB(t,this.patterns,()=>this.results.end())}):this.walkCB(t,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};Jc.GlobStream=TF});var AF=h(c1=>{"use strict";Object.defineProperty(c1,"__esModule",{value:!0});c1.Glob=void 0;var out=Kc(),a1=Aoe(),aut=require("url"),uut=OF(),u1=Moe(),cut=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",NF=class{static{s(this,"Glob")}absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;opts;patterns;constructor(t,r){if(!r)throw new TypeError("glob options required");if(this.withFileTypes=!!r.withFileTypes,this.signal=r.signal,this.follow=!!r.follow,this.dot=!!r.dot,this.dotRelative=!!r.dotRelative,this.nodir=!!r.nodir,this.mark=!!r.mark,r.cwd?(r.cwd instanceof URL||r.cwd.startsWith("file://"))&&(r.cwd=(0,aut.fileURLToPath)(r.cwd)):this.cwd="",this.cwd=r.cwd||"",this.root=r.root,this.magicalBraces=!!r.magicalBraces,this.nobrace=!!r.nobrace,this.noext=!!r.noext,this.realpath=!!r.realpath,this.absolute=r.absolute,this.noglobstar=!!r.noglobstar,this.matchBase=!!r.matchBase,this.maxDepth=typeof r.maxDepth=="number"?r.maxDepth:1/0,this.stat=!!r.stat,this.ignore=r.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof t=="string"&&(t=[t]),this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(t=t.map(c=>c.replace(/\\/g,"/"))),this.matchBase){if(r.noglobstar)throw new TypeError("base matching requires globstar");t=t.map(c=>c.includes("/")?c:`./**/${c}`)}if(this.pattern=t,this.platform=r.platform||cut,this.opts={...r,platform:this.platform},r.scurry){if(this.scurry=r.scurry,r.nocase!==void 0&&r.nocase!==r.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let c=r.platform==="win32"?a1.PathScurryWin32:r.platform==="darwin"?a1.PathScurryDarwin:r.platform?a1.PathScurryPosix:a1.PathScurry;this.scurry=new c(this.cwd,{nocase:r.nocase,fs:r.fs})}this.nocase=this.scurry.nocase;let n=this.platform==="darwin"||this.platform==="win32",i={...r,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:n,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},o=this.pattern.map(c=>new out.Minimatch(c,i)),[a,u]=o.reduce((c,l)=>(c[0].push(...l.set),c[1].push(...l.globParts),c),[[],[]]);this.patterns=a.map((c,l)=>{let f=u[l];if(!f)throw new Error("invalid pattern object");return new uut.Pattern(c,f,0,this.platform)})}async walk(){return[...await new u1.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walk()]}walkSync(){return[...new u1.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walkSync()]}stream(){return new u1.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).stream()}streamSync(){return new u1.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};c1.Glob=NF});var RF=h(l1=>{"use strict";Object.defineProperty(l1,"__esModule",{value:!0});l1.hasMagic=void 0;var lut=Kc(),fut=s((e,t={})=>{Array.isArray(e)||(e=[e]);for(let r of e)if(new lut.Minimatch(r,t).hasMagic())return!0;return!1},"hasMagic");l1.hasMagic=fut});var Foe=h(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.glob=qe.hasMagic=qe.Glob=qe.unescape=qe.escape=qe.sync=qe.iterate=qe.iterateSync=qe.stream=qe.streamSync=qe.globIterate=qe.globIterateSync=qe.globSync=qe.globStream=qe.globStreamSync=void 0;var Uoe=Kc(),qd=AF(),dut=RF();function FE(e,t={}){return new qd.Glob(e,t).streamSync()}s(FE,"globStreamSync");qe.globStreamSync=FE;function CF(e,t={}){return new qd.Glob(e,t).stream()}s(CF,"globStream");qe.globStream=CF;function $F(e,t={}){return new qd.Glob(e,t).walkSync()}s($F,"globSync");qe.globSync=$F;async function xoe(e,t={}){return new qd.Glob(e,t).walk()}s(xoe,"glob_");function kE(e,t={}){return new qd.Glob(e,t).iterateSync()}s(kE,"globIterateSync");qe.globIterateSync=kE;function DF(e,t={}){return new qd.Glob(e,t).iterate()}s(DF,"globIterate");qe.globIterate=DF;qe.streamSync=FE;qe.stream=Object.assign(CF,{sync:FE});qe.iterateSync=kE;qe.iterate=Object.assign(DF,{sync:kE});qe.sync=Object.assign($F,{stream:FE,iterate:kE});var qoe=Kc();Object.defineProperty(qe,"escape",{enumerable:!0,get:function(){return qoe.escape}});Object.defineProperty(qe,"unescape",{enumerable:!0,get:function(){return qoe.unescape}});var put=AF();Object.defineProperty(qe,"Glob",{enumerable:!0,get:function(){return put.Glob}});var hut=RF();Object.defineProperty(qe,"hasMagic",{enumerable:!0,get:function(){return hut.hasMagic}});qe.glob=Object.assign(xoe,{glob:xoe,globSync:$F,sync:qe.sync,globStream:CF,stream:qe.stream,globStreamSync:FE,streamSync:qe.streamSync,globIterate:DF,iterate:qe.iterate,globIterateSync:kE,iterateSync:qe.iterateSync,Glob:qd.Glob,hasMagic:dut.hasMagic,escape:Uoe.escape,unescape:Uoe.unescape});qe.glob.glob=qe.glob});var Voe=h(km=>{"use strict";var LF=km&&km.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(km,"__esModule",{value:!0});km.lookupFiles=void 0;var mut=Um(),koe=LF(Foe()),f1=LF(require("fs")),Boe=LF(require("path")),_ut=s(e=>Boe.default.basename(e).startsWith("."),"isHiddenOnUnix"),gut=s((e,t=[])=>t.map(r=>r.startsWith(".")?r:`.${r}`).some(r=>e.endsWith(r)),"hasMatchingExtname");function Goe(e,t=[],r=!1){let n=[],i;if(!f1.default.existsSync(e)){let o;if(koe.default.hasMagic(e))o=e;else{let a=t.map(u=>u.startsWith(".")?u:`.${u}`).join("|");o=`${e}+(${a})`,mut.logger.debug("looking for files using glob pattern: %s",o)}if(n.push(...koe.default.sync(o,{nodir:!0})),!n.length)throw Error(`Cannot find any files matching pattern "${e}"`);return n}try{if(i=f1.default.statSync(e),i.isFile())return[e]}catch{return[]}return f1.default.readdirSync(e).forEach(o=>{let a=Boe.default.join(e,o),u;try{if(u=f1.default.statSync(a),u.isDirectory()){r&&n.push(...Goe(a,t,r));return}}catch{return}if(!t.length)throw Error(`Argument '${t}' required when argument '${e}' is a directory`);!u.isFile()||!gut(a,t)||_ut(a)||n.push(a)}),n}s(Goe,"lookupFiles");km.lookupFiles=Goe});var zoe=h(Gm=>{"use strict";var BE=Gm&&Gm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gm,"__esModule",{value:!0});Gm.openApiRoutesPlugin=void 0;var jF=Gf(),yut=Rne(),MF=BE(gn()),UF=BE(require("fs/promises")),wo=BE(require("path")),xF=kt(),Eut=BE(Xs()),but=BE(_n()),Sut=Voe(),Bm="open-api-routes-plugin",d1="open-api-routes-json";function vut(e){return{name:"open-api-routes-plugin",setup(t){t.onResolve({filter:/routes.json$/},r=>({watchFiles:[...(0,Sut.lookupFiles)(wo.default.join(e.sourceDirectory,xF.USER_CONFIG_DIR_NAME),[".oas.json"],!0),wo.default.join(e.sourceDirectory,xF.USER_CONFIG_DIR_NAME,xF.POLICIES_CONFIG_FILE)],namespace:d1,path:wo.default.isAbsolute(r.path)?r.path:wo.default.join(r.resolveDir,r.path),pluginName:Bm})),t.onResolve({filter:/^\.\.\/modules\/.*/,namespace:d1},async r=>{let n=wo.default.join(r.resolveDir,`${r.path}.ts`);if(!await MF.default.fileExists(n)){let i=`$import(.${r.path.replace(/^../,"")})`,o=wo.default.resolve(e.sourceDirectory,"config"),a=await(0,jF.getOpenApiFilesByAlphabetical)(o),u=await(0,jF.getRouteLocationByValue)(a[0],i,"Update your route configuration to use code from the 'modules' folder");return{errors:[{id:"route-build-error",text:`Invalid handler reference in routes.json. Unable to resolve reference to '${i}' from routes.json`,location:u,detail:"RouteReferenceError",pluginName:Bm}],namespace:d1,path:r.path,pluginName:Bm}}}),t.onLoad({filter:/.*/,namespace:d1},async r=>but.default.timeFn("Generating route.json data",async()=>{let n=wo.default.resolve(e.sourceDirectory,"config"),i=await(0,jF.getOpenApiFilesByAlphabetical)(n),o=await Promise.all(i.map(async l=>({content:await UF.default.readFile(l,"utf-8"),fileName:l}))),a=wo.default.resolve(n,"policies.json");if(!await MF.default.fileExists(a))return{errors:[{text:"The project must include a policies file ('/config/policies.json')",detail:"OASPoliciesFileMissing",pluginName:Bm,location:{line:0,column:0,file:"/config/policies.json"}}],pluginName:Bm};let u={content:await UF.default.readFile(a,"utf-8"),fileName:a},c=await(0,yut.compileRoutes)(o,u);if(Eut.default.DEBUG_BUILD_MODE&&c.content){let l=wo.default.join(e.sourceDirectory,"dist"),f=wo.default.resolve(l,"routes.js");await MF.default.mkdirForFilePathIfNotExits(f),await UF.default.writeFile(f,c.content,"utf-8")}return{contents:c.content,errors:c.errors,pluginName:Bm,resolveDir:wo.default.dirname(r.path),watchFiles:[r.path]}}))}}}s(vut,"openApiRoutesPlugin");Gm.openApiRoutesPlugin=vut});var Qoe=h(Xc=>{"use strict";var GE=Xc&&Xc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xc,"__esModule",{value:!0});Xc.generateRawRouteSource=Xc.rawRoutePlugin=void 0;var zm=Gf(),Woe=require("@zuplo/runtime/internal"),Hoe=GE(gn()),Yoe=GE(require("fs/promises")),Vm=GE(require("path")),Out=GE(require("prettier")),Put=kt(),Iut=GE(Xs()),qF="raw-route-plugin",Koe="raw-route";function wut(e){return{name:"raw-route-plugin",setup(t){t.onResolve({filter:/raw.json$/},r=>({namespace:Koe,path:r.path,pluginName:qF})),t.onLoad({filter:/.*/,namespace:Koe},async r=>{let n=Vm.default.resolve(e.sourceDirectory,Put.USER_CONFIG_DIR_NAME);if(!await Hoe.default.dirExists(n))return{loader:"js",resolveDir:Vm.default.dirname(r.path),pluginName:qF};let i=await(0,zm.getOpenApiFilesByAlphabetical)(n),o=await Joe({oasFiles:i,sourceDirectory:e.sourceDirectory,logger:e.logger});if(Iut.default.DEBUG_BUILD_MODE&&o){let a=Vm.default.join(e.sourceDirectory,"dist"),u=Vm.default.resolve(a,"raw-routes.js");await Hoe.default.mkdirForFilePathIfNotExits(u);let c=await Out.default.format(o,{parser:"babel"});await Yoe.default.writeFile(u,c,"utf-8")}return{contents:o,loader:"js",resolveDir:Vm.default.dirname(r.path),pluginName:qF}})}}}s(wut,"rawRoutePlugin");Xc.rawRoutePlugin=wut;async function Joe({oasFiles:e,sourceDirectory:t,logger:r}){let n=[],i=[],o=[],a=new zm.RefParser(t,r);n.push("const rawRouteData = {");for(let c of e){let l=await Yoe.default.readFile(c,"utf-8"),f=Vm.default.basename(c,".oas.json"),d=JSON.parse(l),_=await a.resolve(c),m=d.paths,g=[],y=new Map;for(let b in m){let E=m[b];for(let v in E){let{description:O,...I}=E[v],w=(0,Woe.getRawOperationDataIdentifierName)(f,b,v);o.push(Nut(c,f,w,I,_,g,y))}}i.push(Tut(c,f,_,g,y))}return n.push(o.join(",")),n.push("};"),n.push("export default rawRouteData;"),i.join(`
|
|
297
297
|
`)+n.join(`
|
|
298
298
|
`)}s(Joe,"generateRawRouteSource");Xc.generateRawRouteSource=Joe;function Tut(e,t,r,n,i){let o=[];for(let u=0;u<n.length;u++){let c=Xoe(t,u);o.push(`const ${c} = {`);let l=r.get(n.at(u));o.push(p1((0,zm.getFilePathNameFromRefName)(n.at(u)),t,l,r,n,i)),o.push("};")}return o.join(`
|
|
299
299
|
`)}s(Tut,"generateRefs");function Nut(e,t,r,n,i,o,a){let u=[];u.push(`${r}: {`);let c=p1(e,t,n,i,o,a);return u.push(c),u.push("}"),u.join(`
|
|
300
300
|
`)}s(Nut,"getJsonEntry");function p1(e,t,r,n,i,o){let a=[];for(let u in r){let c=r[u];if(u==="$ref")return(0,zm.chaseRefs)(e,t,(0,zm.getFullyQualifiedRefName)(e,c),n,i,o),`$REF:${Xoe(t,o.get((0,zm.getFullyQualifiedRefName)(e,c)))}`;switch(typeof c){case"string":{a.push(`"${u}": ${JSON.stringify(c)},`);break}case"number":case"boolean":{a.push(`"${u}":${c},`);break}default:if(Array.isArray(c))a.push(`"${u}":[`),c.forEach(l=>{if(typeof l=="object"){let f=p1(e,t,l,n,i,o);if(f.startsWith("$REF")){let d=f.split(":")[1];a.push(`${d},`)}else a.push("{"),a.push(f),a.push("},")}else a.push(`${JSON.stringify(l)},`)}),a.push("],");else{let l=p1(e,t,c,n,i,o);if(l.startsWith("$REF")){let f=l.split(":")[1];a.push(`${u}: ${f},`)}else a.push(`"${u}":{`),a.push(l),a.push("},")}}}return a.join(`
|
|
301
|
-
`)}s(p1,"processNode");function Xoe(e,t){return(0,Woe.sanitizedIdentifierName)(e)+`_refsData_${t}`}s(Xoe,"getRefIdentifierName")});var eae=h(Hm=>{"use strict";var m1=Hm&&Hm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hm,"__esModule",{value:!0});Hm.runtimeConfigPlugin=void 0;var Aut=m1(gn()),Rut=m1(require("fs/promises")),FF=m1(require("path")),Cut=m1(_n()),h1="runtime-config",Zoe="runtime-config-plugin";function $ut(){return{name:h1,setup(e){e.onResolve({filter:/^\.\.\/modules\/zuplo.runtime.ts$/},t=>({namespace:Zoe,path:FF.default.isAbsolute(t.path)?t.path:FF.default.join(t.resolveDir,t.path),pluginName:h1})),e.onLoad({filter:/.*/,namespace:Zoe},async t=>Cut.default.timeFn("Generating zuplo.runtime.ts data",async()=>{let r="export const runtimeInit = undefined;",n=[];return await Aut.default.fileExists(t.path)?(r=await Rut.default.readFile(t.path,"utf-8"),{contents:r,loader:"ts",resolveDir:FF.default.dirname(t.path),errors:n,pluginName:h1,watchFiles:[t.path]}):{contents:r,loader:"ts",errors:n,pluginName:h1}}))}}}s($ut,"runtimeConfigPlugin");Hm.runtimeConfigPlugin=$ut});var oae=h(js=>{"use strict";var Fd=js&&js.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(js,"__esModule",{value:!0});js.isPolicyPresentInOperation=js.getPolicyNamesReferencingPolicyHandlers=js.schemaValidationSource=js.schemaValidationPlugin=void 0;var Km=Gf(),VE=require("@zuplo/runtime/internal"),tae=Fd(gn()),Dut=Fd(aU()),Lut=Fd(uU()),_1=Fd(require("fs/promises")),Qc=Fd(require("path")),jut=Fd(require("prettier")),kF=kt(),Mut=Fd(Xs()),BF="schema-validation-plugin",rae="schema-validation",Uut="module.exports = {}";function xut(e){return{name:"schema-validation-plugin",setup(t){t.onResolve({filter:/ajv-schema.json$/},r=>({namespace:rae,path:r.path,pluginName:BF})),t.onLoad({filter:/.*/,namespace:rae},async r=>{let n=Qc.default.resolve(e.sourceDirectory,kF.USER_CONFIG_DIR_NAME,"policies.json");if(!e.isOpenApiBased||!await tae.default.fileExists(n))return{contents:Uut,loader:"js",resolveDir:Qc.default.dirname(r.path),pluginName:BF};let i=await qut(e.sourceDirectory),o=Qc.default.resolve(e.sourceDirectory,kF.USER_CONFIG_DIR_NAME),a=await(0,Km.getOpenApiFilesByAlphabetical)(o),u=await kut(a,i),c=await nae({oasFiles:a,routesWithSchemaValidation:u,sourceDirectory:e.sourceDirectory,logger:e.logger});if(Mut.default.DEBUG_BUILD_MODE&&c){let l=Qc.default.join(e.sourceDirectory,kF.BUILD_OUTPUT_DIR),f=Qc.default.resolve(l,"schema-validation.js");await tae.default.mkdirForFilePathIfNotExits(f);let d=await jut.default.format(c,{parser:"babel"});await _1.default.writeFile(f,d,"utf-8")}return{contents:c,loader:"js",resolveDir:Qc.default.dirname(r.path),pluginName:BF}})}}}s(xut,"schemaValidationPlugin");js.schemaValidationPlugin=xut;async function nae({oasFiles:e,routesWithSchemaValidation:t,sourceDirectory:r,logger:n}){let i="",o=new Km.RefParser(r,n);if(t.length===0)return i;let a=new Dut.default({code:{source:!0},allErrors:!0,strict:!1,verbose:!0,meta:!0});for(let u of e){let c=await _1.default.readFile(u,"utf-8"),l=Qc.default.basename(u,".oas.json"),f=t.filter(y=>y.fileName===l),d=await o.resolve(u),_=JSON.parse(c),m=[],g=new Map;f.forEach(y=>{let b=_.paths[y.path][y.method];if(b.requestBody){let E;if(b.requestBody.$ref){let
|
|
302
|
-
`},nodePaths:aae,entryPoints:[a],...c,sourcemap:"linked",legalComments:"linked",treeShaking:!0,bundle:!0,...u,external:[],logLevel:"silent",conditions:Zc.BUILD_CONDITIONS,plugins:[(0,Kut.environmentPlugin)({sourceDirectory:n}),(0,zut.blockRemoteModulePlugin)({logger:i}),(0,Jut.openApiRoutesPlugin)({sourceDirectory:n,outputDirectory:r}),(0,Xut.rawRoutePlugin)({sourceDirectory:n,logger:i}),(0,Zut.schemaValidationPlugin)({sourceDirectory:n,logger:i,isOpenApiBased:!0}),(0,Qut.runtimeConfigPlugin)(),(0,Hut.devPortalConfigPlugin)({sourceDirectory:n}),(0,Wut.jsonSchemaPlugin)({sourceDirectory:n,outputDirectory:r}),(0,Yut.nodejsCompatPlugin)({nodeCompatEnabled:o?.esmWorker===!0,sourceDirectory:n})]}}s(tct,"getBaseESBuildConfig");Zc.default=tct});var E1=h(Ms=>{"use strict";Object.defineProperty(Ms,"__esModule",{value:!0});Ms.formatBuildResult=Ms.BUILD_TASK_PLUGIN_NAME=Ms.ESBUILD_PLUGIN_NAME=void 0;Ms.ESBUILD_PLUGIN_NAME="run-esbuild";Ms.BUILD_TASK_PLUGIN_NAME="build-task";var rct=s((e,t)=>{let r=t;if(t.includes(e)){let n=new RegExp(`.*(${e})`,"g");r=t.replace(n,"")}return r.match(/^(\/)?(\.\.(\/)?)+/)&&(r=r.replace(/^(\/)?(\.\.(\/)?)+/,"/")),r},"removePrefixFromString"),nct=s((e,t)=>{let r=t;if(r.includes(e)){let n=new RegExp(`[a-zA-Z0-9-_.\\/]+(${e})`,"g");r=r.replace(n,"")}return r},"cleanFilePathsInMessage"),y1=s((e,t,r)=>{if(!e||e.length<=0)return e;let n=e.filter(i=>i.message!=='Could not resolve "@zuplo/runtime"');return n&&n.length>0&&n.forEach(i=>{i.location&&i.location.file&&(i.location.file=rct(t,i.location.file)),i.location&&i.location.lineText&&i.location.lineText.includes("@zuplo/core/index.minified.js")&&(i.location.lineText=i.location.lineText.substring(0,200)+"...<Truncated>"),i.message=nct(t,i.message),i.notes&&i.notes.length>0&&delete i.notes,i.text&&delete i.text,i.pluginName===""&&(i.pluginName=r)}),n},"cleanDataOnBuildIssue");function ict(e,t,r){try{e.buildTaskResult&&(e.buildTaskResult.errors&&(e.buildTaskResult.errors=y1(e.buildTaskResult.errors,t,Ms.BUILD_TASK_PLUGIN_NAME)),e.buildTaskResult.warnings&&(e.buildTaskResult.warnings=y1(e.buildTaskResult.warnings,t,Ms.BUILD_TASK_PLUGIN_NAME))),e.compilerResult&&(e.compilerResult.errors&&(e.compilerResult.errors=y1(e.compilerResult.errors,t,Ms.ESBUILD_PLUGIN_NAME)),e.compilerResult.warnings&&(e.compilerResult.warnings=y1(e.compilerResult.warnings,t,Ms.ESBUILD_PLUGIN_NAME)))}catch(n){r.error("Error while formatting buildResult. Err: ",n)}return e}s(ict,"formatBuildResult");Ms.formatBuildResult=ict});var lae=h(Us=>{"use strict";var sct=Us&&Us.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),oct=Us&&Us.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),act=Us&&Us.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&sct(t,e,r);return oct(t,e),t},cae=Us&&Us.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Us,"__esModule",{value:!0});Us.getRunEsBuildPlugin=void 0;var uct=Gf(),uae=Yo(),cct=act(require("esbuild")),lct=cae(_n()),fct=AP(),dct=cae(VF()),zF=E1(),pct=s(function(e){return s(async function({systemDirectory:r,outputDirectory:n,sourceDirectory:i,dev:o,generateSourceMaps:a,buildId:u,logger:c,config:l}){return lct.default.timeFn("Running esbuild",async()=>{c.info(`Running build_id: ${u}`);let f=await(0,dct.default)({systemDirectory:r,outputDirectory:n,generateSourceMaps:a,sourceDirectory:i,dev:o,logger:c,flags:l.flags}),d,_=new Date;try{if(!await(0,uct.oasFileInProject)(i))throw new Error("Failed to build project because no open-api file was found on the 'config' folder");d=await cct.build(f)}catch(g){if(c.error(g),g.errors||g.warnings)d=g;else if(g.message.includes("Failed to build project because no open-api file was found on the 'config' folder"))d={warnings:[],errors:[{id:"missing-open-api-file",text:"Failed to build project because no open-api file was found on the 'config' folder",pluginName:zF.ESBUILD_PLUGIN_NAME,location:null,notes:[],detail:"Failed to build project because no open-api file was found on the 'config' folder"}],outputFiles:void 0,metafile:void 0,mangleCache:void 0};else throw g}let m=new Date;if(e(new fct.CompilerResult(d,{endBuildTime:m,startBuildTime:_,buildId:u??""})),d.errors.length>0){d.errors.length>1&&(d.errors.length=1);let g=d.errors[0];c.debug(g)}return{warnings:[...d.warnings.map(g=>({message:g.text,pluginName:zF.ESBUILD_PLUGIN_NAME,severity:uae.WARNING_SEVERITY}))],errors:[...d.errors.map(g=>({message:g.text,pluginName:zF.ESBUILD_PLUGIN_NAME,severity:uae.ERROR_SEVERITY}))]}})},"runEsbuild")},"getRunEsBuildPlugin");Us.getRunEsBuildPlugin=pct});var KF=h(Ym=>{"use strict";var dae=Ym&&Ym.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ym,"__esModule",{value:!0});Ym.build=void 0;var Wm=Yo(),hct=require("crypto"),mct=require("fs"),zE=dae(require("path")),fae=kt(),_ct=rc(),gct=dae(_n()),yct=Fz(),Ect=Bz(),bct=Gz(),Sct=Vz(),vct=Yz(),Oct=Jz(),Pct=eH(),Ict=l9(),wct=d9(),Tct=lae(),HF=E1(),b1;try{let e=(0,mct.readFileSync)(zE.default.resolve(__dirname,"../../package.json"),"utf-8");b1=JSON.parse(e).version}catch{b1="0.0.0"}async function Nct({sourceDirectory:e,deploymentName:t=zE.default.basename(e),dev:r,entitlements:n,environmentType:i,generateSourceMaps:o=!1,logger:a,noCompile:u=!1,postBuildTasks:c,projectId:l,publicZuploEnvironmentVariables:f={}}){let d=(0,hct.randomUUID)(),_=a.child({buildId:d});return gct.default.timeFn(`Run build with build_id: ${d}`,async()=>{let m=await(0,yct.getZuploConfig)(e),g=zE.default.join(e,fae.BUILD_OUTPUT_DIR),y;if("errors"in m)y={status:"Failed",flags:void 0,compatibilityDate:void 0,runtimeVersion:b1,outputPath:g,buildTaskResult:{buildTime:"",buildTimeMs:0,status:Wm.FAILURE_STATUS,buildId:d,warnings:[],errors:m.errors}};else{let E={dev:r,generateSourceMaps:o,deploymentName:t,sourceDirectory:e,outputDirectory:g,systemDirectory:zE.default.join(e,fae.GENERATED_SOURCE_DIR_NAME),buildId:d,logger:_,config:m.config,publicZuploEnvironmentVariables:f,projectId:l,entitlements:n,environmentType:i},S=[];S.push(Ect.cleanOutput),S.push(bct.createSystemDir),S.push(Sct.checkForDeprecations),S.push(vct.generateBuildData),S.push(Pct.validateDevPortalJSON),S.push(Ict.validateOpenAPIFiles),S.push(Oct.generateWorker);let O,I=s(K=>{O=K},"compileCallback");u||S.push((0,Tct.getRunEsBuildPlugin)(I)),S.push(wct.verifyWorkerOutput),c&&S.push(...c);let w=await(0,_ct.runPlugins)(S,E),j=w.errors.length>0?Wm.FAILURE_STATUS:w.warnings.length>0?Wm.WARNING_STATUS:Wm.GOOD_STATUS;y={status:j==="Failed"||O===void 0||O.status==="Failed"?"Failed":j==="Warnings"||O.status==="Warnings"?"Warnings":"Good",compatibilityDate:m.config.compatibilityDate,runtimeVersion:b1,outputPath:g,compilerResult:O,buildTaskResult:{buildTime:"",buildTimeMs:0,status:j,buildId:d,warnings:w.warnings,errors:w.errors},flags:m.config.flags}}if(y.buildTaskResult.warnings.length>0){y.buildTaskResult.warnings.forEach(S=>{_.warn(S)});let E=y.buildTaskResult.warnings.filter(S=>S.pluginName!=="runEsbuild"&&S.pluginName!==HF.ESBUILD_PLUGIN_NAME);E.length>0&&(y.buildTaskResult.warnings=E),y.buildTaskResult.status=Wm.WARNING_STATUS}if(y.buildTaskResult.errors.length>0){y.buildTaskResult.errors.forEach(S=>{_.error(S)});let E=y.buildTaskResult.errors.filter(S=>S.pluginName!=="runEsbuild"&&S.pluginName!==HF.ESBUILD_PLUGIN_NAME);E.length>0&&(y.buildTaskResult.errors=E),y.buildTaskResult.status=Wm.FAILURE_STATUS}if(_.debug(`Build ${y.compilerResult?.buildId??d} completed ${u?"on watch mode":"with compiler status "+y.compilerResult?.status} and build task status ${y.buildTaskResult.status}`),y.compilerResult){let{metafile:E,...S}=y.compilerResult;_.debug(`Compiler results for build ${y.compilerResult?.buildId??d}`,S)}_.debug(`Build task results for build ${y.buildTaskResult?.buildId??d}`,y.buildTaskResult);let b=zE.default.basename(e);return(0,HF.formatBuildResult)(y,b,_)})}s(Nct,"build");Ym.build=Nct});var v1=h(xs=>{"use strict";var Act=xs&&xs.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Rct=xs&&xs.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Cct=xs&&xs.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Act(t,e,r);return Rct(t,e),t},S1=xs&&xs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xs,"__esModule",{value:!0});xs.BuildWatcher=void 0;var pae=Yo(),$ct=S1(require("chokidar")),Dct=Cct(require("esbuild")),hae=require("crypto"),Lct=S1(require("events")),HE=S1(require("path")),mae=kt(),jct=KF(),_ae=AP(),Mct=S1(VF()),gae=E1(),WF=class extends Lct.default{static{s(this,"WatchEmitter")}},YF=class{static{s(this,"BuildWatcher")}esbuildContext;emitter=new WF;envFilesWatcher;outputDirectory;sourceDirectory;dev;generateSourceMaps;logger;publicZuploEnvironmentVariables;projectName;constructor({sourceDirectory:t,dev:r,generateSourceMaps:n,logger:i,publicZuploEnvironmentVariables:o={}}){this.sourceDirectory=t,this.dev=r,this.outputDirectory=HE.default.join(t,mae.BUILD_OUTPUT_DIR),this.generateSourceMaps=n??!1,this.logger=i,this.publicZuploEnvironmentVariables=o,this.projectName=HE.default.basename(t),this.envFilesWatcher=$ct.default.watch([HE.default.join(t,".env"),HE.default.join(t,".env.zuplo")])}watchEnvFiles(){this.envFilesWatcher.on("change",async()=>{this.emitter.emit("reload",null,null)}),this.envFilesWatcher.on("add",async()=>{this.emitter.emit("reload",null,null)}),this.envFilesWatcher.on("unlink",async()=>{this.emitter.emit("reload",null,null)})}onReload=t=>{this.emitter.on("reload",t)};async start(){let{sourceDirectory:t}=this;if(this.esbuildContext!==void 0)throw new Error("Watcher cannot be started more than once");let r=await(0,jct.build)({sourceDirectory:t,noCompile:!0,dev:this.dev,generateSourceMaps:this.generateSourceMaps,publicZuploEnvironmentVariables:this.publicZuploEnvironmentVariables,logger:this.logger}),n=await(0,Mct.default)({systemDirectory:HE.default.join(t,mae.GENERATED_SOURCE_DIR_NAME),outputDirectory:this.outputDirectory,sourceDirectory:t,dev:this.dev,generateSourceMaps:this.generateSourceMaps,logger:this.logger,flags:r.flags}),i=this;n.plugins?.push({name:"on-end",setup(o){o.onEnd(a=>{i.logger.debug("Watcher (build) reloaded");let u;if(a)if(u=new _ae.CompilerResult(a),u.errors.length>0){let c={status:"Failed",runtimeVersion:"0.0.0",buildTaskResult:{buildTime:"",buildTimeMs:0,status:pae.FAILURE_STATUS,buildId:(0,hae.randomUUID)(),warnings:[],errors:[]}};c.compilerResult=u,(0,gae.formatBuildResult)(c,i.projectName,i.logger),i.logger.error(c.compilerResult.errors,"Build errors")}else i.logger.debug(`Successfully rebuilt watched project. Build id ${u.buildId}`);i.emitter.emit("reload",r,null,u)})}}),this.esbuildContext=await Dct.context(n);try{let o=await this.esbuildContext.rebuild();if(o.errors.length>0){let a={status:"Failed",runtimeVersion:"0.0.0",buildTaskResult:{buildTime:"",buildTimeMs:0,status:pae.FAILURE_STATUS,buildId:(0,hae.randomUUID)(),warnings:[],errors:[]}};a.compilerResult=new _ae.CompilerResult(o),(0,gae.formatBuildResult)(a,this.projectName,this.logger),this.logger.error(a.compilerResult.errors,"Build errors")}}catch(o){throw await this.close(),o}await this.esbuildContext.watch()}async close(){try{await this.envFilesWatcher.close(),this.esbuildContext&&(await this.esbuildContext.dispose(),this.logger.debug("ESBuild watcher closed"))}catch(t){this.logger.error(t)}}};xs.BuildWatcher=YF});var JF=h(O1=>{"use strict";Object.defineProperty(O1,"__esModule",{value:!0});O1.HttpStatusCode=void 0;var yae;(function(e){e[e.CONTINUE=100]="CONTINUE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.PROCESSING=102]="PROCESSING",e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.ACCEPTED=202]="ACCEPTED",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.ALREADY_REPORTED=208]="ALREADY_REPORTED",e[e.IM_USED=226]="IM_USED",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.FOUND=302]="FOUND",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.USE_PROXY=305]="USE_PROXY",e[e.SWITCH_PROXY=306]="SWITCH_PROXY",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.GONE=410]="GONE",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",e[e.URI_TOO_LONG=414]="URI_TOO_LONG",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.RANGE_NOT_SATISFIABLE=416]="RANGE_NOT_SATISFIABLE",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.LOCKED=423]="LOCKED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.VARIANT_ALSO_NEGOTIATES=506]="VARIANT_ALSO_NEGOTIATES",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.LOOP_DETECTED=508]="LOOP_DETECTED",e[e.NOT_EXTENDED=510]="NOT_EXTENDED",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED"})(yae||(O1.HttpStatusCode=yae={}))});var Eae=h(P1=>{"use strict";Object.defineProperty(P1,"__esModule",{value:!0});P1.getSourceControlProviderLabel=void 0;function Uct(e){let t="";switch(e){case"GITLAB":t="GitLab";break;case"GITHUB":t="GitHub";break;case"BITBUCKET":t="BitBucket";break;default:t=e;break}return t}s(Uct,"getSourceControlProviderLabel");P1.getSourceControlProviderLabel=Uct});var Sae=h(v=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0});v.DEPLOYMENT_NO_ACCESS=v.INVALID_SOURCE_REPO_URL=v.SHARED_PROJECT_PREVIOUSLY_INITIALIZED=v.PROJECT_MUST_HAVE_ONE_MEMBER=v.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS=v.PROJECT_MEMBER_ALREADY_EXISTS=v.PROJECT_MEMBER_NOT_FOUND=v.INVALID_TEMPLATE_REPOSITORY=v.INCORRECT_PROJECT_TEMPLATE=v.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS=v.PROJECT_NOT_FOUND=v.PROJECT_NOT_FOUND_FOR_SOURCE_REPO=v.PROJECT_SHARING_DISABLED_ON_ACCOUNT=v.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED=v.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED=v.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE=v.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER=v.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND=v.ACCOUNT_MEMBER_INVITE_INVALID=v.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST=v.ACCOUNT_MEMBER_DOES_NOT_EXIST=v.ACCOUNT_MEMBER_INFO_MISSING=v.ACCOUNT_MEMBER_ALREADY_EXISTS=v.ACCOUNT_UPDATE_INFO_MISSING=v.ACCOUNT_INFO_MISSING=v.ACCOUNT_DOES_NOT_EXISTS=v.INVALID_ACCOUNT_LABEL_ENDING=v.INVALID_ACCOUNT_NAME_ENDING=v.ACCOUNT_NAME_ALREADY_IN_USE=v.INVALID_ACCOUNT_LABEL=v.INVALID_ACCOUNT_NAME=v.ACCOUNT_LABEL_LENGTH_LIMIT_REACHED=v.ACCOUNT_NAME_LENGTH_LIMIT_REACHED=v.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD=v.ACCOUNT_NAME_USES_RESERVED_KEYWORD=v.ACCOUNT_ALREADY_EXISTS=v.ACCOUNT_NOT_FOUND=v.USER_IS_NOT_SERVICE_ACCOUNT=v.USER_REMOVE_NOT_MEMBER_ACCOUNT=v.USER_HAS_NO_ACCESS_TO_ACCOUNT=v.USER_DETAILS_CANNOT_BE_FOUND=v.USER_ALREADY_EXISTS=v.CLIENT_NOT_FOUND=v.FORBIDDEN=v.UNAUTHORIZED=v.METHOD_NOT_ALLOWED=v.NOT_FOUND=v.CONFLICT=v.BAD_REQUEST=v.INTERNAL_SERVER_ERROR=void 0;v.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=v.GITHUB_INTEGRATION_ALREADY_EXISTS=v.FEATURE_FLAGS_NOT_FOUND=v.MAX_ALLOWED_PROJECTS_LIMIT_REACHED=v.PROJECT_ALREADY_HAS_REPO=v.PROJECT_INVALID_NAME=v.FAILED_TO_REVOKE_GH_TOKEN=v.USER_ACCOUNT_NOT_FS_MIGRATED=v.USER_NO_ACCESS_GITLAB_REPO=v.USER_NO_ACCESS_BITBUCKET_REPO=v.GITHUB_APP_CONFIGURATION_NOT_FOUND=v.GITHUB_APP_NO_USER_ACCESS_=v.GITHUB_APP_NO_NAMESPACE_ACCESS=v.GENERIC_GITHUB_BRANCH_INFO_ERROR=v.GITHUB_USER_NO_READ_ACCESS_REPO=v.USER_NO_PULL_ACCESS_GITHUB_REPO=v.USER_NO_ACCESS_GITHUB_REPO=v.PROJECT_SHARING_REQUIRES_GIT_REPO=v.PROJECT_INVALID_GIT_REPO=v.PROJECT_INVALID_GIT_CLONE=v.USER_IS_PROJECT_MEMBER=v.USER_HAS_NO_ACCESS_TO_PROJECT=v.RUNTIME_FLAG_KEY_NOT_VALID=v.RUNTIME_FLAG_NOT_FOUND=v.RUNTIME_FLAG_ALREADY_EXISTS=v.PROJECT_NO_MEMBERS=v.PROJECT_ALREADY_EXISTS=v.SERVICE_CONFIGURATION_FAILED_DECRYPTION=v.WORKING_COPY_SERVICE_NOT_CREATED=v.WORKING_COPY_SERVICE_NOT_DELETED=v.WORKING_COPY_SERVICE_NOT_FOUND=v.SERVICE_CONFIGURATION_NOT_FOUND=v.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE=v.DEPLOYMENT_INCORRECT_STATUS_PAUSE=v.DEPLOYMENT_NOT_WORKING_COPY=v.DEPLOYMENT_LOG_NOT_FOUND=v.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY=v.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB=v.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT=v.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT=v.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED=v.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE=v.DEPLOYMENT_DELETE_ERROR=v.DEPLOYMENT_CANNOT_DELETE_INSTANCE=v.DEPLOYMENT_INVALID_MULTI_PART=v.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART=v.DEPLOYMENT_FILE_DOES_NOT_EXISTS=v.DEPLOYMENT_NOT_FOUND=v.DEFAULT_DEPLOYMENT_DOES_NOT_EXIST=v.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH=void 0;v.THIRD_PARTY_APP_CONNECTION_NOT_FOUND=v.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND=v.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR=v.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR=v.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST=v.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR=v.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED=v.SOURCE_CONTROL_REMOTE_BRANCH_EXISTS=v.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND=v.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION=v.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING=v.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING=v.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS=v.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS=v.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED=v.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS=v.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND=v.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND=v.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE=v.SOURCE_CONTROL_REPO_OPERATION_ERROR=v.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE=v.SOURCE_CONTROL_REPO_NOT_FOUND=v.SOURCE_CONTROL_AUTHENTICATION_FAILED=v.EXTERNAL_SERVICE_GENERIC_ERROR=v.API_USER_NO_ACCESS=v.EXTERNAL_USER_NOT_CONFIGURED=v.EXTERNAL_USER_NO_ACCESS=v.API_KEY_CANNOT_BE_CREATED=v.CONSUMER_CANNOT_BE_CREATED=v.CONSUMER_DOES_NOT_EXIST=v.CONSUMER_NO_ACCESS=v.GITLAB_ACCESS_LEVEL_CHECK_FAIL=v.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=v.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=v.GITLAB_DUPLICATE_REPO=v.GITLAB_FAILED_DURING_REPO_CREATION=v.GITLAB_QUERY_USER_INFO_FAILED=v.BITBUCKET_FAILED_DURING_REPO_CREATION=v.BITBUCKET_WORKSPACE_MISCONFIGURATION=v.BITBUCKET_QUERY_USER_INFO_FAILED=v.GITHUB_INTEGRATION_INVALID_REPO=v.GIT_CREATE_PROJECT_WITH_INVALID_REPO=v.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=v.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=v.GITHUB_INTEGRATION_DUPLICATE_REPO=v.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED=v.GITHUB_INTEGRATION_AUTHENTICATION_FAILED=v.GITHUB_INTEGRATION_BRANCH_BEHIND=v.GITHUB_INTEGRATION_NOT_FOUND=v.GITHUB_REPOSITORY_NOT_FOUND=void 0;v.RBACCONFIGURATION_REQUIRE_ENVIRONMENTS=v.RBACCONFIGURATION_DOES_NOT_EXISTS=v.RBAC_INVALID_EXPIRATION_DATE=v.ACCOUNT_RBAC_DISABLED=v.METERING_BUCKET_CREATION_FAILED=v.UNABLE_UPGRADE_PLAN=v.BUCKET_NOT_FOUND=v.BUCKET_API_KEY_SERVICE_CONFLICT=v.DIRECTORY_DELETE_FAILED=v.FILE_DELETE_FAILED=v.CANNOT_DELETE_SOLE_OPEN_API_FILE=v.CANNOT_DELETE_ESSENTIAL_DIRECTORY=v.CANNOT_DELETE_ESSENTIAL_FILE=v.FILE_WRITE_FAILED=v.FILE_RENAME_FAILED=v.FILE_RENAME_FILE_ALREADY_EXISTS=v.FILE_RENAME_CANNOT_CHANGE_EXTENSION=v.FILE_RENAME_PATHS_MATCH=v.DIRECTORY_CREATION_FAILED=v.DIRECTORY_OR_FILE_DOES_NOT_EXIST=v.DIRECTORY_DOES_NOT_EXIST=v.DIRECTORY_ALREADY_EXISTS=v.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=v.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=v.FAILED_DOWNLOAD_FROM_STORAGE=v.CANNOT_FIND_SRC_DIRECTORY=v.CANNOT_READ_PACKAGE_JSON=v.PACKAGE_JSON_NOT_FOUND=v.RUNTIME_VERSION_INCORRECT_FORMAT=v.MIGRATIONS_ONLY_ON_WORKING_COPY=v.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=v.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=v.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR=v.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2=v.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE=v.NO_GLOBAL_SYMBOLS=v.NO_ZUPLO_PREFIXED_VARIABLES=v.NON_EMPTY_TARGETS_REQUIRED=v.CONFLICTING_TYPES=v.OVERLAPPING_TARGETS=v.INVALID_BRANCH_NAME=v.TARGET_BRANCH_ONLY_FOR_PREVIEW=v.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY=v.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE=v.DEPLOYMENT_NAME_MISSING=v.NON_EXISTENT_ENVIRONMENT_VARIABLE=v.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE=v.ENVIRONMENT_VARIABLE_VALIDATION_ERROR=v.DUPLICATE_ENVIRONMENT_VARIABLE=v.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION=void 0;v.RBACCONFIGURATION_INVALID_OPENFGA_CONFIG=v.RBACCONFIGURATION_INVALID_PROJECT_PROVIDED=v.RBACCONFIGURATION_ACCOUNT_HAS_NO_PROJECTS=v.RBACCONFIGURATION_REQUIRE_PROJECTS=v.RBACCONFIGURATION_INVALID_ENVIRONMENTS=void 0;var N=JF(),bae=Eae(),xct="https://github.com/apps/zuplo/installations/new";v.INTERNAL_SERVER_ERROR={type:"https://zup.fail/http-status/500",title:"Internal Server Error",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR};v.BAD_REQUEST={type:"https://zup.fail/http-status/400",title:"Bad Request",status:N.HttpStatusCode.BAD_REQUEST};v.CONFLICT={type:"https://zup.fail/http-status/409",title:"Conflict",status:N.HttpStatusCode.CONFLICT};v.NOT_FOUND={type:"https://zup.fail/http-status/404",title:"Not Found",status:N.HttpStatusCode.NOT_FOUND};v.METHOD_NOT_ALLOWED={type:"https://zup.fail/http-status/405",title:"Method Not Allowed",status:N.HttpStatusCode.METHOD_NOT_ALLOWED};v.UNAUTHORIZED={type:"https://zup.fail/http-status/401",title:"Unauthorized",status:N.HttpStatusCode.UNAUTHORIZED};v.FORBIDDEN={type:"https://zup.fail/http-status/403",title:"Forbidden",status:N.HttpStatusCode.FORBIDDEN};v.CLIENT_NOT_FOUND={type:"https://zup.fail/client-not-found",title:"Client not found",status:N.HttpStatusCode.NOT_FOUND};v.USER_ALREADY_EXISTS={type:"https://zup.fail/user-already-exists",title:"User already exists",status:N.HttpStatusCode.CONFLICT};v.USER_DETAILS_CANNOT_BE_FOUND={type:"https://zup.fail/user-details-cannot-be-found",title:"User cannot be found",status:N.HttpStatusCode.NOT_FOUND};v.USER_HAS_NO_ACCESS_TO_ACCOUNT={type:"https://zup.fail/user-has-no-access-to-account",title:"Not a member of the account",status:N.HttpStatusCode.UNAUTHORIZED};v.USER_REMOVE_NOT_MEMBER_ACCOUNT={type:"https://zup.fail/removed-user-not-account-member",title:"The user being removed is not a member of the account",status:N.HttpStatusCode.BAD_REQUEST};v.USER_IS_NOT_SERVICE_ACCOUNT={type:"https://zup.fail/user-not-service-account",title:"User is not a service account",status:N.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_NOT_FOUND={type:"https://zup.fail/account-not-found",title:"Account not found",status:N.HttpStatusCode.NOT_FOUND};v.ACCOUNT_ALREADY_EXISTS={type:"https://zup.fail/account-already-exists",title:"Account already exists",status:N.HttpStatusCode.CONFLICT};v.ACCOUNT_NAME_USES_RESERVED_KEYWORD={type:"https://zup.fail/account-name-reserved-keyword",title:"The account name can not use reserved keyword 'zuplo'",status:N.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD={type:"https://zup.fail/account-use-reserved-keyword",title:"The account name can not start with a reserved keyword",status:N.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_NAME_LENGTH_LIMIT_REACHED={type:"https://zup.fail/account-name-length-limit",title:"The account name exceeds the 200 character limit",status:N.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_LABEL_LENGTH_LIMIT_REACHED={type:"https://zup.fail/account-label-length-limit",title:"The account label exceeds the 200 character limit",status:N.HttpStatusCode.BAD_REQUEST};v.INVALID_ACCOUNT_NAME={type:"https://zup.fail/invalid-account-name",title:"The account name can only contain lower-cased characters, numbers, dashes and underscores",status:N.HttpStatusCode.BAD_REQUEST};v.INVALID_ACCOUNT_LABEL={type:"https://zup.fail/invalid-account-label",title:"The account label can only contain alpha-numeric characters, spaces, dashes and underscores",status:N.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_NAME_ALREADY_IN_USE={type:"https://zup.fail/account-name-in-use",title:"The account name is already taken. Please try again using a different name.",status:N.HttpStatusCode.BAD_REQUEST};v.INVALID_ACCOUNT_NAME_ENDING={type:"https://zup.fail/invalid-account-name-ending",title:"The account name can not end with a dash or underscore character",status:N.HttpStatusCode.BAD_REQUEST};v.INVALID_ACCOUNT_LABEL_ENDING={type:"https://zup.fail/invalid-account-label-ending",title:"The account label can not end with a dash or underscore character",status:N.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_DOES_NOT_EXISTS={type:"https://zup.fail/account-does-not-exists",title:"You are not a member of any accounts",status:N.HttpStatusCode.NOT_FOUND};v.ACCOUNT_INFO_MISSING={type:"https://zup.fail/account-info-missing",title:"Account information is required",status:N.HttpStatusCode.NOT_FOUND};v.ACCOUNT_UPDATE_INFO_MISSING={type:"https://zup.fail/account-update-info-missing",title:"Account information is insufficient for this operation.",status:N.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/account-member-already-exists",title:"Account member already exists",status:N.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_MEMBER_INFO_MISSING={type:"https://zup.fail/account-member-info-missing",title:"Account member information is required",status:N.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_MEMBER_DOES_NOT_EXIST={type:"https://zup.fail/account-member-does-not-exists",title:"Account member information cannot be found",status:N.HttpStatusCode.NOT_FOUND};v.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST={type:"https://zup.fail/account-member-invite-does-not-exist",title:"Account member invite cannot be found",status:N.HttpStatusCode.NOT_FOUND};v.ACCOUNT_MEMBER_INVITE_INVALID={type:"https://zup.fail/account-member-invite-invalid",title:"Account member invite is invalid",status:N.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND={type:"https://zup.fail/account-member-invite-failed-send",title:"We were not able to send the account member invite. Please try again or contact support.",status:N.HttpStatusCode.BAD_REQUEST};v.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER={type:"https://zup.fail/account-member-cannot-be-invited",title:"The user is already part of the account.",status:N.HttpStatusCode.BAD_REQUEST};v.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE={type:"https://zup.fail/existing-pending-account-member-invites",title:"The user has a pending invitation to this account.",status:N.HttpStatusCode.BAD_REQUEST};v.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED={type:"https://zup.fail/no-multi-account-members",title:"Account is not configured for multiple members",status:N.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED={type:"https://zup.fail/account-members-limit-reached",title:"This account has reached the limit of users allowed by its current billing plan.",status:N.HttpStatusCode.BAD_REQUEST};v.PROJECT_SHARING_DISABLED_ON_ACCOUNT={type:"https://zup.fail/project-sharing-disabled-on-account",title:"Project sharing is not enabled on account",status:N.HttpStatusCode.FORBIDDEN};v.PROJECT_NOT_FOUND_FOR_SOURCE_REPO={type:"https://zup.fail/project-not-found-for-source-repo",title:"Project not found for provided repository",status:N.HttpStatusCode.NOT_FOUND};v.PROJECT_NOT_FOUND={type:"https://zup.fail/project-not-found",title:"Project not found",status:N.HttpStatusCode.NOT_FOUND};v.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS={type:"https://zup.fail/project-cannot-be-deleted-protected-deployments-exists",title:"Project cannot be deleted because it has protected deployments",detail:"Project has protected deployments. Make sure to remove the use of custom domains before trying to delete the project.",status:N.HttpStatusCode.FORBIDDEN};v.INCORRECT_PROJECT_TEMPLATE={type:"https://zup.fail/incorrect-project-template",title:"Incorrect project template name",status:N.HttpStatusCode.BAD_REQUEST};var qct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:`The repository '${e} is not a valid Zuplo template repository`,status:N.HttpStatusCode.FORBIDDEN}),"INVALID_TEMPLATE_REPOSITORY");v.INVALID_TEMPLATE_REPOSITORY=qct;v.PROJECT_MEMBER_NOT_FOUND={type:"https://zup.fail/project-member-not-found",title:"Project Member not found",status:N.HttpStatusCode.NOT_FOUND};v.PROJECT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/project-member-already-exists",title:"Project Member already exists",status:N.HttpStatusCode.BAD_REQUEST};v.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS={type:"https://zup.fail/cannt-delete-your-own-project-member",title:"Can not delete your own Project Member record",status:N.HttpStatusCode.BAD_REQUEST};v.PROJECT_MUST_HAVE_ONE_MEMBER={type:"https://zup.fail/project-must-have-one-member",title:"Project must have at least one member",status:N.HttpStatusCode.BAD_REQUEST};v.SHARED_PROJECT_PREVIOUSLY_INITIALIZED={type:"https://zup.fail/project-previously-initialized",title:"Project was previously initialized",status:N.HttpStatusCode.BAD_REQUEST};v.INVALID_SOURCE_REPO_URL={type:"https://zup.fail/invalid-source-repo-url",title:"Project is not connected to source control, a sourceRepoUrl property must be specified and valid",status:N.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_NO_ACCESS={type:"https://zup.fail/deployment-no-access",title:"User does not have access to deployment",status:N.HttpStatusCode.FORBIDDEN};v.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH={type:"https://zup.fail/deployment-branch-does-not-exist",title:"A deployment record cannot be found for the provided branch.",detail:"You can only update a project's default branch to one that has been deployed.",status:N.HttpStatusCode.FORBIDDEN};v.DEFAULT_DEPLOYMENT_DOES_NOT_EXIST={type:"https://zup.fail/default-deployment-does-not-exist",title:"A default deployment record cannot be found for the project.",detail:"You can only update a project's default branch to one that has been deployed.",status:N.HttpStatusCode.FORBIDDEN};v.DEPLOYMENT_NOT_FOUND={type:"https://zup.fail/deployment-not-found",title:"Deployment was not found",status:N.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_FILE_DOES_NOT_EXISTS={type:"https://zup.fail/deployment-file-does-not-exists",title:"Files were not found",status:N.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART={type:"https://zup.fail/deployment-request-is-not-multi-part",title:"Request is not multipart.",status:N.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_INVALID_MULTI_PART={type:"https://zup.fail/deployment-invalid-multi-part",title:"Invalid request format. Must be multi-part file upload.",status:N.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_CANNOT_DELETE_INSTANCE={type:"https://zup.fail/deployment-cannot-delete-instance",title:"Cannot delete instance of the deployment. Invalid account or project.",status:N.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_DELETE_ERROR={type:"https://zup.fail/deployment-delete-error",title:"Error deleting deployment instance.",status:N.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE={type:"https://zup.fail/deployment-invalid-environment-to-delete",title:"Invalid environment to delete deployment",status:N.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED={type:"https://zup.fail/deployment-is-protected-cannot-be-deleted",title:"Deployment is protected and cannot be deleted",status:N.HttpStatusCode.FORBIDDEN};v.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid account",status:N.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid project name",status:N.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid user sub",status:N.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY={type:"https://zup.fail/deployment-cannot-be-deleted",title:"Deployment cannot be deleted since is a working copy",status:N.HttpStatusCode.FORBIDDEN};v.DEPLOYMENT_LOG_NOT_FOUND={type:"https://zup.fail/deployment-log-not-found",title:"DeploymentLog was not found",status:N.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_NOT_WORKING_COPY={type:"https://zup.fail/deployment-not-working-copy",title:"Deployment is not working copy.",status:N.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_INCORRECT_STATUS_PAUSE={type:"https://zup.fail/deployment-incorrect-status-pause",title:"Deployment is not in a state to be paused.",status:N.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE={type:"https://zup.fail/deployment-incorrect-status-unpause",title:"Deployment is not in a state to be unpaused.",status:N.HttpStatusCode.BAD_REQUEST};v.SERVICE_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Service configuration not found.",status:N.HttpStatusCode.NOT_FOUND};v.WORKING_COPY_SERVICE_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Working Copy service not found.",status:N.HttpStatusCode.NOT_FOUND};v.WORKING_COPY_SERVICE_NOT_DELETED={type:"https://zup.fail/working-copy-service-not-deleted",title:"Working Copy service failed to be deleted.",status:N.HttpStatusCode.BAD_REQUEST};v.WORKING_COPY_SERVICE_NOT_CREATED={type:"https://zup.fail/working-copy-service-not-created",title:"Working Copy service failed to be created.",status:N.HttpStatusCode.BAD_REQUEST};v.SERVICE_CONFIGURATION_FAILED_DECRYPTION={type:"https://zup.fail/service-config-not-decrypted",title:"Service configuration failed to decrypt.",status:N.HttpStatusCode.BAD_REQUEST};v.PROJECT_ALREADY_EXISTS={type:"https://zup.fail/project-already-exists",title:"Project already exists.",status:N.HttpStatusCode.BAD_REQUEST};v.PROJECT_NO_MEMBERS={type:"https://zup.fail/project-no-members",title:"Cannot find project members.",status:N.HttpStatusCode.NOT_FOUND};v.RUNTIME_FLAG_ALREADY_EXISTS={type:"https://zup.fail/runtime-flag-already-exists",title:"RuntimeFlag already exists.",status:N.HttpStatusCode.BAD_REQUEST};v.RUNTIME_FLAG_NOT_FOUND={type:"https://zup.fail/runtime-flag-not-found",title:"RuntimeFlag was not found.",status:N.HttpStatusCode.NOT_FOUND};v.RUNTIME_FLAG_KEY_NOT_VALID={type:"https://zup.fail/runtime-flag-key-not-valid",title:"RuntimeFlag key must be snake case",status:N.HttpStatusCode.BAD_REQUEST};v.USER_HAS_NO_ACCESS_TO_PROJECT={type:"https://zup.fail/user-has-no-access-to-project",title:"Not a member of the project",status:N.HttpStatusCode.FORBIDDEN};v.USER_IS_PROJECT_MEMBER={type:"https://zup.fail/user-is-project-member",title:"The user is already a project member.",status:N.HttpStatusCode.BAD_REQUEST};v.PROJECT_INVALID_GIT_CLONE={type:"https://zup.fail/project-invalid-git-clone",title:"Project requires defaultBranch & sourceRepoUrl for creation from a GitHub repository.",status:N.HttpStatusCode.BAD_REQUEST};v.PROJECT_INVALID_GIT_REPO={type:"https://zup.fail/project-invalid-git-repo",title:"The current source control repository is already in use by a Zuplo project",status:N.HttpStatusCode.BAD_REQUEST};v.PROJECT_SHARING_REQUIRES_GIT_REPO={type:"https://zup.fail/project-sharing-requires-git-repo",title:"The current project is not connected to a source control repository.",status:N.HttpStatusCode.BAD_REQUEST};var Fct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:N.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITHUB_REPO");v.USER_NO_ACCESS_GITHUB_REPO=Fct;var kct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have pull access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:N.HttpStatusCode.FORBIDDEN}),"USER_NO_PULL_ACCESS_GITHUB_REPO");v.USER_NO_PULL_ACCESS_GITHUB_REPO=kct;var Bct=s(({repositoryUrl:e})=>({type:"https://zup.fail/no-read-access-github-repo",title:"You do not have read access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:N.HttpStatusCode.FORBIDDEN}),"GITHUB_USER_NO_READ_ACCESS_REPO");v.GITHUB_USER_NO_READ_ACCESS_REPO=Bct;v.GENERIC_GITHUB_BRANCH_INFO_ERROR={type:"https://zup.fail/gh-branch-info-error",title:"There was an error getting branch information for the GitHub repository associated to the project.",status:N.HttpStatusCode.BAD_REQUEST};v.GITHUB_APP_NO_NAMESPACE_ACCESS={type:"https://zup.fail/no-namespace-access-github-app",title:"The Zuplo GitHub app does not have access to the repositories under the namespace provided. Make sure to configure the GitHub Zuplo App on the repository.",status:N.HttpStatusCode.FORBIDDEN};var Gct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:"The Zuplo GitHub app does not have access to the repository. Make sure to configure the GitHub Zuplo App on the repository.",detail:`The Zuplo GitHub app has not been granted access to the repository '${e}'. Go to '${xct}' to add the repository.`,status:N.HttpStatusCode.FORBIDDEN}),"GITHUB_APP_NO_USER_ACCESS_");v.GITHUB_APP_NO_USER_ACCESS_=Gct;v.GITHUB_APP_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/gh-app-not-found",title:"Global GitHub App configuration not found",status:N.HttpStatusCode.NOT_FOUND};var Vct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-bitbucket-repo",title:"You do not have access to the Bitbucket repository associated to the project. Ask your Bitbucket admin for access and try again.",detail:`User does not have access to the Bitbucket repository associated to the project. Update the user permissions in '${e}' to add a new collaborator.`,status:N.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_BITBUCKET_REPO");v.USER_NO_ACCESS_BITBUCKET_REPO=Vct;var zct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-gitlab-repo",title:"You do not have access to the GitLab repository associated to the project. Ask your GitLab admin for access and try again.",detail:`User does not have access to the GitLab repository associated to the project. Update the user permissions in '${e}' to add a new collaborator.`,status:N.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITLAB_REPO");v.USER_NO_ACCESS_GITLAB_REPO=zct;v.USER_ACCOUNT_NOT_FS_MIGRATED={type:"https://zup.fail/user-account-not-fs-migrated",title:"User account is in a plan that does not allow project sharing. Please contact your account admin.",status:N.HttpStatusCode.FORBIDDEN};v.FAILED_TO_REVOKE_GH_TOKEN={type:"https://zup.fail/failed-to-revoke-gh-token",title:"Failed to revoke GitHub token for the user",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR};v.PROJECT_INVALID_NAME={type:"https://zup.fail/project-invalid-name",title:"Project name is invalid, it only can contain letter, number and dashes.",status:N.HttpStatusCode.BAD_REQUEST};v.PROJECT_ALREADY_HAS_REPO={type:"https://zup.fail/project-already-has-repo",title:"The current project has been previously linked to a source control repository",status:N.HttpStatusCode.BAD_REQUEST};v.MAX_ALLOWED_PROJECTS_LIMIT_REACHED={type:"https://zup.fail/max-allowed-projects-limit-reached",title:"Your account has reached the maximum number of projects allowed.",status:N.HttpStatusCode.BAD_REQUEST};v.FEATURE_FLAGS_NOT_FOUND={type:"https://zup.fail/feature-flags-not-found",title:"Error trying to retrieve feature flags for this user",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR};v.GITHUB_INTEGRATION_ALREADY_EXISTS={type:"https://zup.fail/github-integration-already-exists",title:"Error trying to create GitHub Integration, already exists.",status:N.HttpStatusCode.BAD_REQUEST};var Hct=s(({repositoryUrl:e})=>({type:"https://zup.fail/github-integration-not-found",title:"Cannot find a project configured for this repository",status:N.HttpStatusCode.CONFLICT,detail:`The repository ${e} does not have a GitHub configured project.`}),"GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND");v.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=Hct;var Kct=s(({repositoryUrl:e})=>({type:"https://zup.fail/github-repo-not-found",title:"Cannot find a provided GitHub repository",status:N.HttpStatusCode.CONFLICT,detail:`The GitHub repository ${e} was not found.`}),"GITHUB_REPOSITORY_NOT_FOUND");v.GITHUB_REPOSITORY_NOT_FOUND=Kct;v.GITHUB_INTEGRATION_NOT_FOUND={type:"https://zup.fail/github-integration-not-found",title:"Project is not integrated with GitHub",status:N.HttpStatusCode.NOT_FOUND,detail:"The project does not have a GitHub integration configured."};v.GITHUB_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/github-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:N.HttpStatusCode.BAD_REQUEST};v.GITHUB_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/github-integration-authentication-failed",title:"GitHub integration: Authentication failed",status:N.HttpStatusCode.FORBIDDEN};v.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED={type:"https://zup.fail/github-integration-query-user-info-failed",title:"Failed while requesting basic user info from GitHub",status:N.HttpStatusCode.FORBIDDEN};var Wct=s(({repositoryName:e,orgName:t})=>({type:"https://zup.fail/github-integration-duplicate-repo",title:"A repository with that name already exists in GitHub",details:`A repository named '${e}' already exists on GitHub org '${t}'.`,instance:e,status:N.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_DUPLICATE_REPO");v.GITHUB_INTEGRATION_DUPLICATE_REPO=Wct;var Yct=s(({repositoryName:e,details:t})=>({type:"https://zup.fail/github-integration-failed-repo-creation",title:"Failed to create a new repository in GitHub",details:t,instance:e,status:N.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION");v.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=Yct;var Jct=s(({repositoryUrl:e})=>({type:"https://zup.fail/create-project-invalid-empty-repo",title:"The repository is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${e}' is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:e,status:N.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_EMPTY_REPO");v.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=Jct;var Xct=s(({repositoryUrl:e})=>({type:"https://zup.fail/create-project-invalid-git-repo",title:"We can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${e}' is not a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:e,status:N.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_INVALID_REPO");v.GIT_CREATE_PROJECT_WITH_INVALID_REPO=Xct;var Qct=s(({repositoryUrl:e})=>({type:"https://zup.fail/github-integration-invalid-repo",title:"We can only connect to an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.",details:`Repository '${e}' is not an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.`,instance:e,status:N.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_INVALID_REPO");v.GITHUB_INTEGRATION_INVALID_REPO=Qct;v.BITBUCKET_QUERY_USER_INFO_FAILED={type:"https://zup.fail/bitbucket-query-user-info-failed",title:"Failed while requesting basic user info from Bitbucket",status:N.HttpStatusCode.FORBIDDEN};v.BITBUCKET_WORKSPACE_MISCONFIGURATION={type:"https://zup.fail/bitbucket-workspace-misconfiguration",title:"Bitbucket source control configuration is missing workspace information",status:N.HttpStatusCode.FORBIDDEN};var Zct=s(({details:e})=>({type:"https://zup.fail/bitbucket-failed-repo-creation",title:"Failed to create a new repository in Bitbucket",details:e,status:N.HttpStatusCode.BAD_REQUEST}),"BITBUCKET_FAILED_DURING_REPO_CREATION");v.BITBUCKET_FAILED_DURING_REPO_CREATION=Zct;v.GITLAB_QUERY_USER_INFO_FAILED={type:"https://zup.fail/gitlab-query-user-info-failed",title:"Failed while requesting basic user info from GitLab",status:N.HttpStatusCode.FORBIDDEN};var elt=s(({details:e})=>({type:"https://zup.fail/gitlab-failed-repo-creation",title:"Failed to create a new repository in GitLab",details:e,status:N.HttpStatusCode.BAD_REQUEST}),"GITLAB_FAILED_DURING_REPO_CREATION");v.GITLAB_FAILED_DURING_REPO_CREATION=elt;var tlt=s(({repositoryName:e,orgName:t})=>({type:"https://zup.fail/gitlab-duplicate-repo",title:"A repository with that name already exists in GitLab",details:`A repository named '${e}' already exists in GitLab team '${t}'.`,instance:e,status:N.HttpStatusCode.BAD_REQUEST}),"GITLAB_DUPLICATE_REPO");v.GITLAB_DUPLICATE_REPO=tlt;var rlt=s(({orgName:e})=>({type:"https://zup.fail/gitlab-create-repo-perm",title:"The user's GitLab group access level does not allow for repository creation.",details:"The user's GitLab group access level does not allow for repository creation.",instance:e,status:N.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_PERM_CREATE_REPO");v.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=rlt;var nlt=s(({namespaceLabel:e})=>({type:"https://zup.fail/gitlab-insufficient-namespace-access",title:`The user's GitLab access level does not allow the use of namespace '${e}'.`,details:`The user's GitLab access level does not allow the use of namespace '${e}'.`,instance:e,status:N.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_NAMESPACE_ACCESS");v.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=nlt;var ilt=s(({orgName:e})=>({type:"https://zup.fail/gitlab-access-check-fail",title:"Failed to verify user's GitLab group access level",instance:e,status:N.HttpStatusCode.BAD_REQUEST}),"GITLAB_ACCESS_LEVEL_CHECK_FAIL");v.GITLAB_ACCESS_LEVEL_CHECK_FAIL=ilt;v.CONSUMER_NO_ACCESS={type:"https://zup.fail/consumer-no-access",title:"User does not have access to this consumer.",status:N.HttpStatusCode.UNAUTHORIZED};v.CONSUMER_DOES_NOT_EXIST={type:"https://zup.fail/consumer-does-not-exist",title:"Consumer does not exist or cannot be accessed.",status:N.HttpStatusCode.NOT_FOUND};v.CONSUMER_CANNOT_BE_CREATED={type:"https://zup.fail/consumer-not-created",title:"Failed to create consumer",status:N.HttpStatusCode.BAD_GATEWAY};v.API_KEY_CANNOT_BE_CREATED={type:"https://zup.fail/api-key-not-created",title:"Failed to create api key",status:N.HttpStatusCode.BAD_GATEWAY};v.EXTERNAL_USER_NO_ACCESS={type:"https://zup.fail/external-user-no-access",title:"User does not have access to this external user.",status:N.HttpStatusCode.UNAUTHORIZED};v.EXTERNAL_USER_NOT_CONFIGURED={type:"https://zup.fail/external-user-not-configured",title:"User is not setup as an External User (Key Manager)",status:N.HttpStatusCode.FORBIDDEN};v.API_USER_NO_ACCESS={type:"https://zup.fail/api-user-no-access",title:"Api user does not have access to this endpoint.",status:N.HttpStatusCode.FORBIDDEN};v.EXTERNAL_SERVICE_GENERIC_ERROR={type:"https://zup.fail/external-service-generic-error",title:"Unable to complete API request for External Service.",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR};var slt=s(({sourceControlProvider:e})=>({type:"https://zup.fail/source-control-authentication-failed",title:"Source provider authentication failed",detail:`Could not authenticate to ${(0,bae.getSourceControlProviderLabel)(e)}`,status:N.HttpStatusCode.UNAUTHORIZED}),"SOURCE_CONTROL_AUTHENTICATION_FAILED");v.SOURCE_CONTROL_AUTHENTICATION_FAILED=slt;var olt=s(({sourceControlProvider:e})=>({type:"https://zup.fail/source-control-repo-not-found",title:"We cannot connect to the repository associated to the project, verify your source control access configuration and try again.",detail:`Could not connect to ${(0,bae.getSourceControlProviderLabel)(e)} repository`,status:N.HttpStatusCode.NOT_FOUND}),"SOURCE_CONTROL_REPO_NOT_FOUND");v.SOURCE_CONTROL_REPO_NOT_FOUND=olt;v.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE={type:"https://zup.fail/source-control-empty-commit",title:"Commit operation failed because you provided an empty message. Please try again by providing a commit message.",status:N.HttpStatusCode.BAD_REQUEST};var alt=s(({repoURL:e,operation:t})=>({type:`https://zup.fail/source-control-repo-${t}-error`,title:`Failed on ${t} operation to repository '${e}'. Verify you have read & write access to the repository and try again.`,detail:"Verify your source control configuration and make sure you have been granted read & write access to the repository",status:N.HttpStatusCode.FORBIDDEN}),"SOURCE_CONTROL_REPO_OPERATION_ERROR");v.SOURCE_CONTROL_REPO_OPERATION_ERROR=alt;v.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE={type:"https://zup.fail/source-control-write-access-issue",title:"You do not have write access to the repository, verify your source control access configuration and try again.",detail:"Verify your source control configuration and make sure you have been granted access to the repository",status:N.HttpStatusCode.FORBIDDEN};v.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/source-control-configuration-not-found",title:"Source control configuration not found for this account.",status:N.HttpStatusCode.NOT_FOUND};v.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND={type:"https://zup.fail/source-control-credentials-not-found",title:"Source control credentials not found for this user. Verify your user's source control connection and try again.",status:N.HttpStatusCode.NOT_FOUND};v.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-refresh-source-control-credentials",title:"Failed to refresh Source Control credentials. Verify your user's source control connection and try again.",status:N.HttpStatusCode.FORBIDDEN};v.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED={type:"https://zup.fail/new-gh-config-required",title:"Current Source Control credentials are using the previous Zuplo GitHup App. Re-authenticate using the latest Zuplo GitHup App via Profile UI and try again.",status:N.HttpStatusCode.FORBIDDEN};v.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS={type:"https://zup.fail/gh-app-revoked-access",title:"Current Source Control credentials are invalid. Re-authenticate to GitHub via Profile UI and try again.",status:N.HttpStatusCode.UNAUTHORIZED};v.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-revoke-source-control-credentials",title:"Failed to revoke Source Control access token for the user",status:N.HttpStatusCode.FORBIDDEN};v.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING={type:"https://zup.fail/source-control-configuration-info-missing",title:"Source Control Configuration information is insufficient for this operation.",status:N.HttpStatusCode.BAD_REQUEST};v.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING={type:"https://zup.fail/source-control-configuration-bb-workspace-missing",title:"Source Control Configuration for Bitbucket must include a workspace configuration (additionalMetadata).",status:N.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION={type:"https://zup.fail/preexisiting-source-control-configuration-on-account",title:"This account already has a Source Control Configuration for this provider.",detail:"This account has a pre-existing Source Control Configuration for this provider. Delete or update the existing configuration.",status:N.HttpStatusCode.BAD_REQUEST};v.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/source-control-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:N.HttpStatusCode.BAD_REQUEST};v.SOURCE_CONTROL_REMOTE_BRANCH_EXISTS={type:"https://zup.fail/source-control-integration-branch-behind",title:"The branch exists in the remote repository. Please try again with a different branch name.",status:N.HttpStatusCode.BAD_REQUEST};v.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/source-control-integration-authentication-failed",title:"Source control integration: Authentication failed",status:N.HttpStatusCode.FORBIDDEN};v.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR={type:"https://zup.fail/third-party-app-auth0-clients-endpoint-error",title:"Error Creating an Auth0 Client through tenant api",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR};v.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST={type:"https://zup.fail/third-party-app-auth0-config-does-not-exist",title:"Auth0 Configuration does not exist for account and environment",status:N.HttpStatusCode.NOT_FOUND};v.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR={type:"https://zup.fail/third-party-app-auth0-client-not-found-error",title:"Third Party App Not Found",status:N.HttpStatusCode.NOT_FOUND};v.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR={type:"https://zup.fail/third-party-app-auth-scope-config-error",title:"API Scope configuration at Auth0 end Error",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR};v.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND={type:"https://zup.fail/third-party-app-connections-not-found",title:"Cannot find auth0 tenant connections",status:N.HttpStatusCode.FAILED_DEPENDENCY};v.THIRD_PARTY_APP_CONNECTION_NOT_FOUND={type:"https://zup.fail/third-party-app-connection-not-found",title:"Cannot find connection with the given name",status:N.HttpStatusCode.FAILED_DEPENDENCY};v.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION={type:"https://zup.fail/third-party-app-cannot-link-tpa-to-connection",title:"Cannot link a connection to a third party app",status:N.HttpStatusCode.FAILED_DEPENDENCY};v.DUPLICATE_ENVIRONMENT_VARIABLE={type:"https://zup.fail/duplicate-environment-variable",title:"Duplicate environment variable",status:N.HttpStatusCode.BAD_REQUEST};v.ENVIRONMENT_VARIABLE_VALIDATION_ERROR={type:"https://zup.fail/environment-variables-validation-error",title:"Environment variable configuration is invalid",status:N.HttpStatusCode.BAD_REQUEST};v.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE={type:"https://zup.fail/environment-variables-cannot-be-retrieved-invalid-env-type",title:"Env vars will not be retrieved since the deployment is from non valid environment type",status:N.HttpStatusCode.BAD_REQUEST};v.NON_EXISTENT_ENVIRONMENT_VARIABLE={type:"https://zup.fail/non-existent-environment-variable",title:"Environment variable doesn't exist",status:N.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_NAME_MISSING={type:"https://zup.fail/deployment-name-missing",title:"Deployment name missing",status:N.HttpStatusCode.BAD_REQUEST};v.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE={type:"https://zup.fail/invalidly-named-environment-variable",title:"Environment variable needs a valid name",status:N.HttpStatusCode.BAD_REQUEST};v.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY={type:"https://zup.fail/personal-override-only-for-working-copy",title:"A personal override can only be used for a working-copy environment variable",status:N.HttpStatusCode.BAD_REQUEST};v.TARGET_BRANCH_ONLY_FOR_PREVIEW={type:"https://zup.fail/target-branch-only-for-preview",title:"A target branch can only be used for preview environment variables",status:N.HttpStatusCode.BAD_REQUEST};v.INVALID_BRANCH_NAME={type:"https://zup.fail/invalid-branch-name",title:"Branch name is invalid",status:N.HttpStatusCode.BAD_REQUEST};v.OVERLAPPING_TARGETS={type:"https://zup.fail/overlapping-targets",title:"The environments of this environment variable overlaps with an existing environment variable",status:N.HttpStatusCode.BAD_REQUEST};v.CONFLICTING_TYPES={type:"https://zup.fail/conflicting-types",title:"The type of this environment variable conflicts with an existing environment variable with the same name",status:N.HttpStatusCode.BAD_REQUEST};v.NON_EMPTY_TARGETS_REQUIRED={type:"https://zup.fail/non-empty-targets-required",title:"The environment targets for this environment variable cannot be empty.",status:N.HttpStatusCode.BAD_REQUEST};v.NO_ZUPLO_PREFIXED_VARIABLES={type:"https://zup.fail/no-zuplo-prefixed-variables",title:"Environment variables should not start with the reserved prefix of ZUPLO or __ZUPLO",status:N.HttpStatusCode.BAD_REQUEST};v.NO_GLOBAL_SYMBOLS={type:"https://zup.fail/no-global-symbols",title:"Environment variables cannot be named after global variables.",status:N.HttpStatusCode.BAD_REQUEST};v.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE={type:"https://zup.fail/deployer-non-valid-deployment-environment-type",title:"Deployment cannot be different than preview or production",status:N.HttpStatusCode.BAD_REQUEST};v.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2={type:"https://zup.fail/deployer-cannot-deploy-using-env-vars-v2",title:"Deployer was not able to deploy zup using environment variables v2",status:N.HttpStatusCode.FORBIDDEN};v.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR={type:"https://zup.fail/deleting-zuplo-environment-variables-error",title:"Problems deleting ZUPLO environment variables for deployment",status:N.HttpStatusCode.NOT_FOUND};var ult=s(({operation:e,path:t})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:"Cannot modify file on read-only environment",detail:`Cannot ${e} file ${t} for a read-only environment. Read-only environments cannot be edited.`,status:N.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT");v.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=ult;var clt=s(()=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:"Cannot modify files on read-only environment",detail:"Cannot save files on a read-only environment. Read-only environments cannot be edited.",status:N.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT");v.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=clt;v.MIGRATIONS_ONLY_ON_WORKING_COPY={type:"https://zup.fail/migration-only-on-working-copy",title:"Migrations can only run on working copies.",status:N.HttpStatusCode.BAD_REQUEST};v.RUNTIME_VERSION_INCORRECT_FORMAT={type:"https://zup.fail/migration-incorrect-runtime-version-format",title:"Runtime version is in an incorrect format.",status:N.HttpStatusCode.BAD_REQUEST};v.PACKAGE_JSON_NOT_FOUND={type:"https://zup.fail/no-pkg-file-found",title:"No package.json file found.",status:N.HttpStatusCode.NOT_FOUND};v.CANNOT_READ_PACKAGE_JSON={type:"https://zup.fail/cannot-read-pkg-file",title:"Cannot read package.json file.",status:N.HttpStatusCode.BAD_REQUEST};v.CANNOT_FIND_SRC_DIRECTORY={type:"https://zup.fail/cannot-find-src-dir",title:"Cannot find source directory.",status:N.HttpStatusCode.BAD_REQUEST};v.FAILED_DOWNLOAD_FROM_STORAGE={type:"https://zup.fail/failed-download-storage",title:"Failed to download content from storage.",status:N.HttpStatusCode.BAD_REQUEST};var llt=s(({path:e})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:"Cannot create directory on read-only environment",detail:`Cannot create folder ${e} for a read-only environment. Read-only environments cannot be edited.`,status:N.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT");v.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=llt;var flt=s(({path:e})=>({type:"https://zup.fail/directory-creation-in-non-allowed-location",title:"Directory creation attempted in non allowed location",detail:`Directory creation in ${e} is not allowed.`,instance:e,status:N.HttpStatusCode.BAD_REQUEST}),"CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION");v.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=flt;var dlt=s(({path:e})=>({type:"https://zup.fail/directory-already-exists",title:"Directory already exists",status:N.HttpStatusCode.BAD_REQUEST,detail:`Directory already exists at ${e}.`}),"DIRECTORY_ALREADY_EXISTS");v.DIRECTORY_ALREADY_EXISTS=dlt;var plt=s(({path:e})=>({type:"https://zup.fail/directory-does-not-exist",title:"Directory does not exist",status:N.HttpStatusCode.BAD_REQUEST,detail:`No directory at ${e}`}),"DIRECTORY_DOES_NOT_EXIST");v.DIRECTORY_DOES_NOT_EXIST=plt;var hlt=s(({path:e})=>({type:"https://zup.fail/directory-or-file-does-not-exist",title:"Directory or File does not exist",status:N.HttpStatusCode.BAD_REQUEST,detail:`No file/directory at ${e}`}),"DIRECTORY_OR_FILE_DOES_NOT_EXIST");v.DIRECTORY_OR_FILE_DOES_NOT_EXIST=hlt;var mlt=s(({path:e})=>({type:"https://zup.fail/directory-creation-failure",title:"Directory creation failed",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to create directory at ${e}. Please try again or contact support.`}),"DIRECTORY_CREATION_FAILED");v.DIRECTORY_CREATION_FAILED=mlt;var _lt=s(({path:e})=>({type:"https://zup.fail/file-rename-paths-match",title:"New file name matches old file name",status:N.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the old path ${e} matched the provided new path. Please choose a different name.`}),"FILE_RENAME_PATHS_MATCH");v.FILE_RENAME_PATHS_MATCH=_lt;var glt=s(({oldExtension:e,newExtension:t})=>({type:"https://zup.fail/file-rename-cannot-change-extension",title:"Cannot change extension of renamed file",status:N.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the new extension ${t} must match the old extension ${e}.`}),"FILE_RENAME_CANNOT_CHANGE_EXTENSION");v.FILE_RENAME_CANNOT_CHANGE_EXTENSION=glt;var ylt=s(({path:e})=>({type:"https://zup.fail/file-rename-file-exists",title:"File already exists",status:N.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, there already exists a file at ${e}. Please choose a different name.`}),"FILE_RENAME_FILE_ALREADY_EXISTS");v.FILE_RENAME_FILE_ALREADY_EXISTS=ylt;var Elt=s(({path:e})=>({type:"https://zup.fail/file-rename-failure",title:"File rename failed",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to rename file ${e}. Please try again or contact support.`}),"FILE_RENAME_FAILED");v.FILE_RENAME_FAILED=Elt;var blt=s(({path:e})=>({type:"https://zup.fail/file-write-failure",title:"File write failed",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to write file ${e}. Please try again or contact support.`}),"FILE_WRITE_FAILED");v.FILE_WRITE_FAILED=blt;var Slt=s(({path:e})=>({type:"https://zup.fail/essential-file-deletion",title:"Cannot delete essential file",status:N.HttpStatusCode.BAD_REQUEST,detail:`File '${e}' cannot be deleted. It is an essential file.`}),"CANNOT_DELETE_ESSENTIAL_FILE");v.CANNOT_DELETE_ESSENTIAL_FILE=Slt;var vlt=s(({path:e})=>({type:"https://zup.fail/essential-directory-deletion",title:"Cannot delete essential file",status:N.HttpStatusCode.BAD_REQUEST,detail:`Directory '${e}' cannot be deleted. It is an essential directory.`}),"CANNOT_DELETE_ESSENTIAL_DIRECTORY");v.CANNOT_DELETE_ESSENTIAL_DIRECTORY=vlt;var Olt=s(()=>({type:"https://zup.fail/sole-open-api-file-deletion",title:"Cannot delete sole OpenAPI file",status:N.HttpStatusCode.BAD_REQUEST,detail:"Your project must have at least 1 OpenAPI file."}),"CANNOT_DELETE_SOLE_OPEN_API_FILE");v.CANNOT_DELETE_SOLE_OPEN_API_FILE=Olt;var Plt=s(({path:e})=>({type:"https://zup.fail/file-delete-failure",title:"File deletion failed",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete file ${e}. Please try again or contact support.`}),"FILE_DELETE_FAILED");v.FILE_DELETE_FAILED=Plt;var Ilt=s(({path:e})=>({type:"https://zup.fail/directory-delete-failure",title:"Directory deletion failed",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete directory ${e}. Please try again or contact support.`}),"DIRECTORY_DELETE_FAILED");v.DIRECTORY_DELETE_FAILED=Ilt;v.BUCKET_API_KEY_SERVICE_CONFLICT={type:"https://zup.fail/bucket-api-key-service-error",title:"Bucket name conflicts",status:N.HttpStatusCode.CONFLICT};v.BUCKET_NOT_FOUND={type:"https://zup.fail/bucket-not-found",title:"Bucket cannot be found",status:N.HttpStatusCode.NOT_FOUND};v.UNABLE_UPGRADE_PLAN={type:"https://zup.fail/cant-upgrade-plan",title:"Can't upgrade to selected plan",status:N.HttpStatusCode.BAD_REQUEST};v.METERING_BUCKET_CREATION_FAILED={type:"https://zup.fail/metering-bucket-creation-failed",title:"Failed to create metering buckets for project",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR};v.ACCOUNT_RBAC_DISABLED={type:"https://zup.fail/account_rbac_disabled",title:"Account does not have RBAC enabled. Please contact support to get this feature enabled.",status:N.HttpStatusCode.FORBIDDEN};v.RBAC_INVALID_EXPIRATION_DATE={type:"https://zup.fail/rbac_invalid_expiration_date",title:"Invalid expiration date provided",detail:"The expiration date provided must be greater than the current date",status:N.HttpStatusCode.BAD_REQUEST};v.RBACCONFIGURATION_DOES_NOT_EXISTS={type:"https://zup.fail/rbacconfiguration-does-not-exists",title:"RBAC Configuration can not be found",status:N.HttpStatusCode.NOT_FOUND};v.RBACCONFIGURATION_REQUIRE_ENVIRONMENTS={type:"https://zup.fail/rbacconfiguration-required-environments",title:"RBAC Configuration must provide environment configuration",status:N.HttpStatusCode.BAD_REQUEST};v.RBACCONFIGURATION_INVALID_ENVIRONMENTS={type:"https://zup.fail/rbacconfiguration-invalid-environments",title:"RBAC Configuration must provide valid environment configuration",detail:"'production', 'preview' and 'development' are the only valid environment values for RBAC Configuration",status:N.HttpStatusCode.BAD_REQUEST};v.RBACCONFIGURATION_REQUIRE_PROJECTS={type:"https://zup.fail/rbacconfiguration-required-projects",title:"RBAC Configuration must provide which project access to configure",status:N.HttpStatusCode.BAD_REQUEST};v.RBACCONFIGURATION_ACCOUNT_HAS_NO_PROJECTS={type:"https://zup.fail/rbacconfiguration-no-projects",title:"Cannot find the specified projects on this account",status:N.HttpStatusCode.BAD_REQUEST};v.RBACCONFIGURATION_INVALID_PROJECT_PROVIDED={type:"https://zup.fail/rbacconfiguration-invalid-project",title:"One or more of the projects provided is not part of the account or does not exist",status:N.HttpStatusCode.BAD_REQUEST};v.RBACCONFIGURATION_INVALID_OPENFGA_CONFIG={type:"https://zup.fail/rbacconfiguration-invalid-openfga-config",title:"The provided configuration caused an unexpected error. Please contact support.",status:N.HttpStatusCode.BAD_REQUEST}});var Oae=h(wi=>{"use strict";var wlt=wi&&wi.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Tlt=wi&&wi.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Nlt=wi&&wi.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&wlt(t,e,r);return Tlt(t,e),t};Object.defineProperty(wi,"__esModule",{value:!0});wi.ApiNotFoundError=wi.ApiError=wi.Problems=void 0;var vae=Nlt(Sae());wi.Problems=vae;var I1=class extends Error{static{s(this,"ApiError")}type;status;detail;instance;constructor(t){if(super(t.title),!t.type.startsWith("https://zup.fail/"))throw new Error(`Invalid 'type' specified on ApiError, must be a URI starting with 'https://zup.fail/'. Type was set to ${t.type}`);this.name="ApiProblemError",this.type=t.type,this.status=t.status,this.detail=t.detail,this.instance=t.instance}};wi.ApiError=I1;var XF=class extends I1{static{s(this,"ApiNotFoundError")}constructor(t={}){super({...t,...vae.NOT_FOUND}),this.name="ApiNotFoundProblemError"}};wi.ApiNotFoundError=XF});var Pae=h(Iu=>{"use strict";var Alt=Iu&&Iu.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Rlt=Iu&&Iu.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Alt(t,e,r)};Object.defineProperty(Iu,"__esModule",{value:!0});Iu.HttpStatusCode=void 0;Rlt(Oae(),Iu);var Clt=JF();Object.defineProperty(Iu,"HttpStatusCode",{enumerable:!0,get:function(){return Clt.HttpStatusCode}})});var wae=h((aqt,Iae)=>{"use strict";function $lt(e){return e>=55296&&e<=56319}s($lt,"isHighSurrogate");function Dlt(e){return e>=56320&&e<=57343}s(Dlt,"isLowSurrogate");Iae.exports=s(function(t,r,n){if(typeof r!="string")throw new Error("Input must be string");for(var i=r.length,o=0,a,u,c=0;c<i;c+=1){if(a=r.charCodeAt(c),u=r[c],$lt(a)&&Dlt(r.charCodeAt(c+1))&&(c+=1,u+=r[c]),o+=t(u),o===n)return r.slice(0,c+1);if(o>n)return r.slice(0,c-u.length+1)}return r},"truncate")});var Nae=h((cqt,Tae)=>{"use strict";var Llt=wae(),jlt=Buffer.byteLength.bind(Buffer);Tae.exports=Llt.bind(null,jlt)});var QF=h(Jm=>{"use strict";var Mlt=Jm&&Jm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Jm,"__esModule",{value:!0});Jm.sanitize=void 0;var Ult=Mlt(Nae()),xlt=/[/?<>\\:*|"]/g,qlt=/[\x00-\x1f\x80-\x9f]/g,Flt=/^\.+$/,klt=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,Blt=/[. ]+$/;function Glt(e,t=""){if(typeof e!="string")throw new Error("Input must be string");let r=e.replace(xlt,t).replace(qlt,t).replace(Flt,t).replace(klt,t).replace(Blt,t);return(0,Ult.default)(r,255)}s(Glt,"sanitize");Jm.sanitize=Glt});var $ae=h(Xm=>{"use strict";var Cae=Xm&&Xm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xm,"__esModule",{value:!0});Xm.createProjectDirs=void 0;var Aae=Cae(require("fs/promises")),Vlt=Cae(require("path")),KE=kt(),Rae=rc(),zlt=s(async function({sourceDirectory:e,logger:t}){t.debug("Creating project directories");let r=[KE.USER_MODULES_DIR_NAME,KE.USER_CONFIG_DIR_NAME,KE.USER_TEST_DIR_NAME,KE.USER_SCHEMAS_DIR_NAME,KE.USER_DOCS_DIR_NAME,".vscode"];try{await Aae.default.mkdir(e);for(let n of r)await Aae.default.mkdir(Vlt.default.join(e,n),{recursive:!0})}catch(n){return t.error(n),new Rae.PluginResult({message:`Cannot create project directory tree at ${e}`,pluginName:"create-project-dirs",severity:"error"})}return new Rae.PluginResult},"createProjectDirs");Xm.createProjectDirs=zlt});var Mae=h(Qm=>{"use strict";var jae=Qm&&Qm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qm,"__esModule",{value:!0});Qm.generateFromTemplate=void 0;var Hlt=require("fs"),Dae=jae(require("fs/promises")),Lae=jae(require("path"));async function Klt(e){let t=Lae.default.resolve(__dirname,"..","templates",e);if((0,Hlt.existsSync)(t))return await Dae.default.readFile(t,"utf-8");{let r=Lae.default.resolve(__dirname,"templates",e);return await Dae.default.readFile(r,"utf-8")}}s(Klt,"generateFromTemplate");Qm.generateFromTemplate=Klt});var Ti=h(Zm=>{"use strict";var w1=Zm&&Zm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zm,"__esModule",{value:!0});Zm.generateFileFromTemplate=void 0;var Wlt=w1(gn()),Ylt=w1(require("fs/promises")),Jlt=w1(require("path")),Xlt=w1(_n()),Qlt=Mae(),Zlt=s(function(e,t){return async({sourceDirectory:r,logger:n})=>Xlt.default.timeFn(`Generating ${e}`,async()=>{n.debug(`Generating ${e}`);let i=Jlt.default.join(r,e);return await Wlt.default.fileExists(i)?(n.debug({sourceDirectory:r},`${e} already exists, skipping`),{warnings:[],errors:[]}):eft(i,t,n)})},"generateFileFromTemplate");Zm.generateFileFromTemplate=Zlt;async function eft(e,t,r){let n=await(0,Qlt.generateFromTemplate)(t);try{await Ylt.default.writeFile(e,n,"utf-8"),r.debug(`File written to ${e}`)}catch(i){r.error(i);let o={message:`Error creating file at ${e}`,pluginName:"generate-file",severity:"error"};return{warnings:[],errors:[o]}}return{warnings:[],errors:[]}}s(eft,"writeTemplate")});var xae=h(e_=>{"use strict";var tft=e_&&e_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e_,"__esModule",{value:!0});e_.generateDefaultDocsMarkdown=void 0;var rft=tft(require("path")),Uae=kt(),nft=Ti();e_.generateDefaultDocsMarkdown=(0,nft.generateFileFromTemplate)(rft.default.join(Uae.USER_DOCS_DIR_NAME,Uae.DEFAULT_DOCS_MARKDOWN_FILE),"markdown.template.md")});var Fae=h(t_=>{"use strict";var ift=t_&&t_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t_,"__esModule",{value:!0});t_.generateDefaultDocsSidebar=void 0;var sft=ift(require("path")),qae=kt(),oft=Ti();t_.generateDefaultDocsSidebar=(0,oft.generateFileFromTemplate)(sft.default.join(qae.USER_DOCS_DIR_NAME,qae.DOCS_SIDEBAR_FILE),"sidebar.template.json")});var Bae=h(r_=>{"use strict";var aft=r_&&r_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r_,"__esModule",{value:!0});r_.generateDefaultDocsTheme=void 0;var uft=aft(require("path")),kae=kt(),cft=Ti();r_.generateDefaultDocsTheme=(0,cft.generateFileFromTemplate)(uft.default.join(kae.USER_DOCS_DIR_NAME,kae.DOCS_THEME_FILE),"dev-portal.theme.template.css")});var Vae=h(n_=>{"use strict";var lft=n_&&n_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n_,"__esModule",{value:!0});n_.generateDefaultModule=void 0;var fft=lft(require("path")),Gae=kt(),dft=Ti();n_.generateDefaultModule=(0,dft.generateFileFromTemplate)(fft.default.join(Gae.USER_MODULES_DIR_NAME,Gae.DEFAULT_MODULE_FILE),"hello-world.template.ts")});var Hae=h(i_=>{"use strict";var pft=i_&&i_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i_,"__esModule",{value:!0});i_.generateDevPortalConfigJson=void 0;var hft=pft(require("path")),zae=kt(),mft=Ti();i_.generateDevPortalConfigJson=(0,mft.generateFileFromTemplate)(hft.default.join(zae.USER_CONFIG_DIR_NAME,zae.DEV_PORTAL_CONFIG_FILE),"dev-portal.template.json")});var Kae=h(T1=>{"use strict";Object.defineProperty(T1,"__esModule",{value:!0});T1.generateEnvironment=void 0;var _ft=Ti();T1.generateEnvironment=(0,_ft.generateFileFromTemplate)(".env","env.template")});var Wae=h(N1=>{"use strict";Object.defineProperty(N1,"__esModule",{value:!0});N1.generateESLint=void 0;var gft=Ti();N1.generateESLint=(0,gft.generateFileFromTemplate)(".eslintrc.js","eslintrc.template.js")});var Yae=h(A1=>{"use strict";Object.defineProperty(A1,"__esModule",{value:!0});A1.generateGitignore=void 0;var yft=Ti();A1.generateGitignore=(0,yft.generateFileFromTemplate)(".gitignore","gitignore.template.ignore")});var Jae=h(s_=>{"use strict";var Eft=s_&&s_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(s_,"__esModule",{value:!0});s_.generateLaunchJson=void 0;var bft=Eft(require("path")),Sft=Ti();s_.generateLaunchJson=(0,Sft.generateFileFromTemplate)(bft.default.join(".vscode","launch.json"),"launch.template.jsonc")});var Qae=h(o_=>{"use strict";var vft=o_&&o_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o_,"__esModule",{value:!0});o_.generateRouteOasConfig=void 0;var Oft=vft(require("path")),Xae=kt(),Pft=Ti();o_.generateRouteOasConfig=(0,Pft.generateFileFromTemplate)(Oft.default.join(Xae.USER_CONFIG_DIR_NAME,Xae.ROUTES_OAS_CONFIG_FILE),"routes.oas.template.json")});var tue=h(qs=>{"use strict";var ZF=qs&&qs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qs,"__esModule",{value:!0});qs.updateProjectPackageJson=qs.getProjectPackageJson=qs.getPackageOverrides=qs.generateDefaultPackageJson=void 0;var Zae=ZF(require("fs/promises")),ek=ZF(require("path")),Ift=ZF(Xs());async function wft(e,t=Ift.default.USE_MONOREPO_PACKAGES){let r={name:e,version:"1.0.0",author:"",copyright:"",scripts:{dev:"zup dev",test:"zup test"},dependencies:{zuplo:"latest"}};if(t){let n=eue();r.overrides=n,r.dependencies["@zuplo/runtime"]=n["@zuplo/runtime"],r.devDependencies&&"@zuplo/core"in r.devDependencies&&(r.devDependencies["@zuplo/core"]=n["@zuplo/core"]),"@zuplo/core"in r.dependencies&&(r.dependencies["@zuplo/core"]=n["@zuplo/core"])}return r}s(wft,"generateDefaultPackageJson");qs.generateDefaultPackageJson=wft;function eue(){let e=ek.default.resolve(__dirname,"..","..");return{"@zuplo/core":`file:${e}/core`,"@zuplo/runtime":`file:${e}/runtime`,"@zuplo/debug":`file:${e}/debug`,"@zuplo/errors":`file:${e}/errors`}}s(eue,"getPackageOverrides");qs.getPackageOverrides=eue;async function Tft(e){let t=ek.default.join(e,"package.json"),r=await Zae.default.readFile(t,"utf-8");return JSON.parse(r)}s(Tft,"getProjectPackageJson");qs.getProjectPackageJson=Tft;async function Nft(e,t){let r=ek.default.join(e,"package.json"),n=JSON.stringify(t,void 0,2);await Zae.default.writeFile(r,n,"utf-8")}s(Nft,"updateProjectPackageJson");qs.updateProjectPackageJson=Nft});var iue=h(R1=>{"use strict";Object.defineProperty(R1,"__esModule",{value:!0});R1.generatePackageJson=void 0;var rue=tue(),nue=rc(),Aft=s(async function({sourceDirectory:e,name:t,logger:r}){let n=await(0,rue.generateDefaultPackageJson)(t);try{await(0,rue.updateProjectPackageJson)(e,n)}catch(i){return r.error(i),new nue.PluginResult({message:"Error creating package.json",pluginName:"generate-package-json",severity:"error"})}return new nue.PluginResult},"generatePackageJson");R1.generatePackageJson=Aft});var oue=h(a_=>{"use strict";var Rft=a_&&a_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a_,"__esModule",{value:!0});a_.generatePoliciesConfig=void 0;var Cft=Rft(require("path")),sue=kt(),$ft=Ti();a_.generatePoliciesConfig=(0,$ft.generateFileFromTemplate)(Cft.default.join(sue.USER_CONFIG_DIR_NAME,sue.POLICIES_CONFIG_FILE),"policies.template.json")});var aue=h(u_=>{"use strict";var Dft=u_&&u_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(u_,"__esModule",{value:!0});u_.generateSettingsJson=void 0;var Lft=Dft(require("path")),jft=Ti();u_.generateSettingsJson=(0,jft.generateFileFromTemplate)(Lft.default.join(".vscode","settings.json"),"settings.template.jsonc")});var uue=h(C1=>{"use strict";Object.defineProperty(C1,"__esModule",{value:!0});C1.generateTSConfig=void 0;var Mft=Ti();C1.generateTSConfig=(0,Mft.generateFileFromTemplate)("tsconfig.json","tsconfig.template.json")});var lue=h(c_=>{"use strict";var Uft=c_&&c_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(c_,"__esModule",{value:!0});c_.generateZuploJson=void 0;var xft=Yo(),qft=require("fs/promises"),Fft=Uft(require("path")),kft=kt(),cue=rc(),Bft=s(async function({name:e,sourceDirectory:t,logger:r}){let n={version:1,project:e,compatibilityDate:xft.DEFAULT_COMPATIBILITY_DATE},i=Fft.default.join(t,kft.ZUPLO_PREFERRED_JSON_FILE),o=JSON.stringify(n,null,2);try{await(0,qft.writeFile)(i,o,"utf-8")}catch(a){return r.error(a),new cue.PluginResult({message:"Error creating zuplo.jsonc",pluginName:"generate-zuplo-json",severity:"error"})}return new cue.PluginResult},"generateZuploJson");c_.generateZuploJson=Bft});var hue=h(l_=>{"use strict";var pue=l_&&l_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(l_,"__esModule",{value:!0});l_.create=void 0;var fue=Pae(),Gft=pue(gn()),Vft=require("fs/promises"),zft=pue(require("path")),Hft=rc(),due=QF(),Kft=$ae(),Wft=xae(),Yft=Fae(),Jft=Bae(),Xft=Vae(),Qft=Hae(),Zft=Kae(),edt=Wae(),tdt=Yae(),rdt=Jae(),ndt=Qae(),idt=iue(),sdt=oue(),odt=aue(),adt=uue(),udt=lue();async function cdt({name:e,accountName:t="",rootDirectory:r,logger:n}){let i=(0,due.sanitize)(e),o=(0,due.sanitize)(t),a=zft.default.join(r,o,i),u={name:e,sourceDirectory:a,logger:n},c=[];if(await Gft.default.dirExists(a))throw new fue.ApiError({type:"https://zup.fail/project-already-exists-at-directory",title:"The project already exists in the specified directory",status:fue.HttpStatusCode.BAD_REQUEST,detail:`Project already exists at ${a}`});c.push(Kft.createProjectDirs,ndt.generateRouteOasConfig,udt.generateZuploJson,Qft.generateDevPortalConfigJson,Xft.generateDefaultModule,Yft.generateDefaultDocsSidebar,Wft.generateDefaultDocsMarkdown,Jft.generateDefaultDocsTheme,sdt.generatePoliciesConfig),c.push(adt.generateTSConfig,tdt.generateGitignore,idt.generatePackageJson,Zft.generateEnvironment,edt.generateESLint,rdt.generateLaunchJson,odt.generateSettingsJson);let{errors:l,warnings:f}=await(0,Hft.runPlugins)(c,u);if(f.length>0&&f.forEach(_=>{n.warn(_)}),l.length>0){await(0,Vft.rm)(a,{recursive:!0,force:!0});let _=l[0];throw _ instanceof Error?_:new Error(_.message)}return{sourceDirectory:a,projectName:e}}s(cdt,"create");l_.create=cdt});var Eue=h((qqt,yue)=>{yue.exports=gue;gue.sync=fdt;var mue=require("fs");function ldt(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var i=r[n].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}s(ldt,"checkPathExt");function _ue(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:ldt(t,r)}s(_ue,"checkStat");function gue(e,t,r){mue.stat(e,function(n,i){r(n,n?!1:_ue(i,e,t))})}s(gue,"isexe");function fdt(e,t){return _ue(mue.statSync(e),e,t)}s(fdt,"sync")});var Pue=h((kqt,Oue)=>{Oue.exports=Sue;Sue.sync=ddt;var bue=require("fs");function Sue(e,t,r){bue.stat(e,function(n,i){r(n,n?!1:vue(i,t))})}s(Sue,"isexe");function ddt(e,t){return vue(bue.statSync(e),t)}s(ddt,"sync");function vue(e,t){return e.isFile()&&pdt(e,t)}s(vue,"checkStat");function pdt(e,t){var r=e.mode,n=e.uid,i=e.gid,o=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),a=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),u=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),f=u|c,d=r&l||r&c&&i===a||r&u&&n===o||r&f&&o===0;return d}s(pdt,"checkMode")});var wue=h((Vqt,Iue)=>{var Gqt=require("fs"),$1;process.platform==="win32"||global.TESTING_WINDOWS?$1=Eue():$1=Pue();Iue.exports=tk;tk.sync=hdt;function tk(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,i){tk(e,t||{},function(o,a){o?i(o):n(a)})})}$1(e,t||{},function(n,i){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,i=!1),r(n,i)})}s(tk,"isexe");function hdt(e,t){try{return $1.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}s(hdt,"sync")});var Due=h((Hqt,$ue)=>{var f_=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Tue=require("path"),mdt=f_?";":":",Nue=wue(),Aue=s(e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),"getNotFoundError"),Rue=s((e,t)=>{let r=t.colon||mdt,n=e.match(/\//)||f_&&e.match(/\\/)?[""]:[...f_?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],i=f_?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=f_?i.split(r):[""];return f_&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:i}},"getPathInfo"),Cue=s((e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:i,pathExtExe:o}=Rue(e,t),a=[],u=s(l=>new Promise((f,d)=>{if(l===n.length)return t.all&&a.length?f(a):d(Aue(e));let _=n[l],m=/^".*"$/.test(_)?_.slice(1,-1):_,g=Tue.join(m,e),y=!m&&/^\.[\\\/]/.test(e)?e.slice(0,2)+g:g;f(c(y,l,0))}),"step"),c=s((l,f,d)=>new Promise((_,m)=>{if(d===i.length)return _(u(f+1));let g=i[d];Nue(l+g,{pathExt:o},(y,b)=>{if(!y&&b)if(t.all)a.push(l+g);else return _(l+g);return _(c(l,f,d+1))})}),"subStep");return r?u(0).then(l=>r(null,l),r):u(0)},"which"),_dt=s((e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:i}=Rue(e,t),o=[];for(let a=0;a<r.length;a++){let u=r[a],c=/^".*"$/.test(u)?u.slice(1,-1):u,l=Tue.join(c,e),f=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+l:l;for(let d=0;d<n.length;d++){let _=f+n[d];try{if(Nue.sync(_,{pathExt:i}))if(t.all)o.push(_);else return _}catch{}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw Aue(e)},"whichSync");$ue.exports=Cue;Cue.sync=_dt});var nk=h((Wqt,rk)=>{"use strict";var Lue=s((e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"},"pathKey");rk.exports=Lue;rk.exports.default=Lue});var xue=h((Jqt,Uue)=>{"use strict";var jue=require("path"),gdt=Due(),ydt=nk();function Mue(e,t){let r=e.options.env||process.env,n=process.cwd(),i=e.options.cwd!=null,o=i&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(e.options.cwd)}catch{}let a;try{a=gdt.sync(e.command,{path:r[ydt({env:r})],pathExt:t?jue.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return a&&(a=jue.resolve(i?e.options.cwd:"",a)),a}s(Mue,"resolveCommandAttempt");function Edt(e){return Mue(e)||Mue(e,!0)}s(Edt,"resolveCommand");Uue.exports=Edt});var que=h((Qqt,sk)=>{"use strict";var ik=/([()\][%!^"`<>&|;, *?])/g;function bdt(e){return e=e.replace(ik,"^$1"),e}s(bdt,"escapeCommand");function Sdt(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(ik,"^$1"),t&&(e=e.replace(ik,"^$1")),e}s(Sdt,"escapeArgument");sk.exports.command=bdt;sk.exports.argument=Sdt});var kue=h((e2t,Fue)=>{"use strict";Fue.exports=/^#!(.*)/});var Gue=h((t2t,Bue)=>{"use strict";var vdt=kue();Bue.exports=(e="")=>{let t=e.match(vdt);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),i=r.split("/").pop();return i==="env"?n:n?`${i} ${n}`:i}});var zue=h((r2t,Vue)=>{"use strict";var ok=require("fs"),Odt=Gue();function Pdt(e){let r=Buffer.alloc(150),n;try{n=ok.openSync(e,"r"),ok.readSync(n,r,0,150,0),ok.closeSync(n)}catch{}return Odt(r.toString())}s(Pdt,"readShebang");Vue.exports=Pdt});var Yue=h((i2t,Wue)=>{"use strict";var Idt=require("path"),Hue=xue(),Kue=que(),wdt=zue(),Tdt=process.platform==="win32",Ndt=/\.(?:com|exe)$/i,Adt=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Rdt(e){e.file=Hue(e);let t=e.file&&wdt(e.file);return t?(e.args.unshift(e.file),e.command=t,Hue(e)):e.file}s(Rdt,"detectShebang");function Cdt(e){if(!Tdt)return e;let t=Rdt(e),r=!Ndt.test(t);if(e.options.forceShell||r){let n=Adt.test(t);e.command=Idt.normalize(e.command),e.command=Kue.command(e.command),e.args=e.args.map(o=>Kue.argument(o,n));let i=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${i}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}s(Cdt,"parseNonShell");function $dt(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:Cdt(n)}s($dt,"parse");Wue.exports=$dt});var Que=h((o2t,Xue)=>{"use strict";var ak=process.platform==="win32";function uk(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}s(uk,"notFoundError");function Ddt(e,t){if(!ak)return;let r=e.emit;e.emit=function(n,i){if(n==="exit"){let o=Jue(i,t,"spawn");if(o)return r.call(e,"error",o)}return r.apply(e,arguments)}}s(Ddt,"hookChildProcess");function Jue(e,t){return ak&&e===1&&!t.file?uk(t.original,"spawn"):null}s(Jue,"verifyENOENT");function Ldt(e,t){return ak&&e===1&&!t.file?uk(t.original,"spawnSync"):null}s(Ldt,"verifyENOENTSync");Xue.exports={hookChildProcess:Ddt,verifyENOENT:Jue,verifyENOENTSync:Ldt,notFoundError:uk}});var tce=h((u2t,d_)=>{"use strict";var Zue=require("child_process"),ck=Yue(),lk=Que();function ece(e,t,r){let n=ck(e,t,r),i=Zue.spawn(n.command,n.args,n.options);return lk.hookChildProcess(i,n),i}s(ece,"spawn");function jdt(e,t,r){let n=ck(e,t,r),i=Zue.spawnSync(n.command,n.args,n.options);return i.error=i.error||lk.verifyENOENTSync(i.status,n),i}s(jdt,"spawnSync");d_.exports=ece;d_.exports.spawn=ece;d_.exports.sync=jdt;d_.exports._parse=ck;d_.exports._enoent=lk});var nce=h((l2t,rce)=>{"use strict";rce.exports=e=>{let t=typeof e=="string"?`
|
|
301
|
+
`)}s(p1,"processNode");function Xoe(e,t){return(0,Woe.sanitizedIdentifierName)(e)+`_refsData_${t}`}s(Xoe,"getRefIdentifierName")});var eae=h(Hm=>{"use strict";var m1=Hm&&Hm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hm,"__esModule",{value:!0});Hm.runtimeConfigPlugin=void 0;var Aut=m1(gn()),Rut=m1(require("fs/promises")),FF=m1(require("path")),Cut=m1(_n()),h1="runtime-config",Zoe="runtime-config-plugin";function $ut(){return{name:h1,setup(e){e.onResolve({filter:/^\.\.\/modules\/zuplo.runtime.ts$/},t=>({namespace:Zoe,path:FF.default.isAbsolute(t.path)?t.path:FF.default.join(t.resolveDir,t.path),pluginName:h1})),e.onLoad({filter:/.*/,namespace:Zoe},async t=>Cut.default.timeFn("Generating zuplo.runtime.ts data",async()=>{let r="export const runtimeInit = undefined;",n=[];return await Aut.default.fileExists(t.path)?(r=await Rut.default.readFile(t.path,"utf-8"),{contents:r,loader:"ts",resolveDir:FF.default.dirname(t.path),errors:n,pluginName:h1,watchFiles:[t.path]}):{contents:r,loader:"ts",errors:n,pluginName:h1}}))}}}s($ut,"runtimeConfigPlugin");Hm.runtimeConfigPlugin=$ut});var oae=h(js=>{"use strict";var Fd=js&&js.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(js,"__esModule",{value:!0});js.isPolicyPresentInOperation=js.getPolicyNamesReferencingPolicyHandlers=js.schemaValidationSource=js.schemaValidationPlugin=void 0;var Km=Gf(),VE=require("@zuplo/runtime/internal"),tae=Fd(gn()),Dut=Fd(aU()),Lut=Fd(uU()),_1=Fd(require("fs/promises")),Qc=Fd(require("path")),jut=Fd(require("prettier")),kF=kt(),Mut=Fd(Xs()),BF="schema-validation-plugin",rae="schema-validation",Uut="module.exports = {}";function xut(e){return{name:"schema-validation-plugin",setup(t){t.onResolve({filter:/ajv-schema.json$/},r=>({namespace:rae,path:r.path,pluginName:BF})),t.onLoad({filter:/.*/,namespace:rae},async r=>{let n=Qc.default.resolve(e.sourceDirectory,kF.USER_CONFIG_DIR_NAME,"policies.json");if(!e.isOpenApiBased||!await tae.default.fileExists(n))return{contents:Uut,loader:"js",resolveDir:Qc.default.dirname(r.path),pluginName:BF};let i=await qut(e.sourceDirectory),o=Qc.default.resolve(e.sourceDirectory,kF.USER_CONFIG_DIR_NAME),a=await(0,Km.getOpenApiFilesByAlphabetical)(o),u=await kut(a,i),c=await nae({oasFiles:a,routesWithSchemaValidation:u,sourceDirectory:e.sourceDirectory,logger:e.logger});if(Mut.default.DEBUG_BUILD_MODE&&c){let l=Qc.default.join(e.sourceDirectory,kF.BUILD_OUTPUT_DIR),f=Qc.default.resolve(l,"schema-validation.js");await tae.default.mkdirForFilePathIfNotExits(f);let d=await jut.default.format(c,{parser:"babel"});await _1.default.writeFile(f,d,"utf-8")}return{contents:c,loader:"js",resolveDir:Qc.default.dirname(r.path),pluginName:BF}})}}}s(xut,"schemaValidationPlugin");js.schemaValidationPlugin=xut;async function nae({oasFiles:e,routesWithSchemaValidation:t,sourceDirectory:r,logger:n}){let i="",o=new Km.RefParser(r,n);if(t.length===0)return i;let a=new Dut.default({code:{source:!0},allErrors:!0,strict:!1,verbose:!0,meta:!0});for(let u of e){let c=await _1.default.readFile(u,"utf-8"),l=Qc.default.basename(u,".oas.json"),f=t.filter(y=>y.fileName===l),d=await o.resolve(u),_=JSON.parse(c),m=[],g=new Map;f.forEach(y=>{let b=_.paths[y.path][y.method];if(b.requestBody){let E;if(b.requestBody.$ref){let v=b.requestBody.$ref;E=d.get(v)?.content}else b.requestBody.content&&(E=b.requestBody.content);if(E)for(let v in E){let O=E[v].schema,I=(0,VE.getIdForRequestBodySchema)(y.path,y.method,v);O.$id=I,a.addSchema(O),GF(O,u,l,a,d,m,g)}}if(b.parameters)for(let E of b.parameters){let v=E.$ref?d.get(E.$ref):E,O=v.schema.$ref?d.get(v.schema.$ref):v.schema,I=(0,VE.getIdForParameterSchema)(y.path,y.method,v.in,v.name);O.$id=I,a.addSchema(O),GF(v,u,l,a,d,m,g)}});for(let y of m){let b=d.get(y),E=(0,VE.getIdForRefSchema)(l,y);a.addSchema(b,E)}}return i=(0,Lut.default)(a),i}s(nae,"schemaValidationSource");js.schemaValidationSource=nae;function GF(e,t,r,n,i,o,a){for(let u in e){let c=e[u];if(u==="$ref"){let l=(0,VE.getIdForRefSchema)(r,(0,Km.getFullyQualifiedRefName)(t,c));e[u]=l,(0,Km.chaseRefs)(t,r,(0,Km.getFullyQualifiedRefName)(t,c),i,o,a,(f,d)=>(0,VE.getIdForRefSchema)(f,(0,Km.getFullyQualifiedRefName)(t,d)))}else typeof c=="object"&&GF(c,t,r,n,i,o,a)}}s(GF,"addRefsToSchema");async function qut(e){let t=new Set(["RequestValidationInboundPolicy"]),r=await _1.default.readFile(`${e}/config/policies.json`,"utf-8"),n=JSON.parse(r);return iae(n,t)}s(qut,"getPolicyNamesUsingSchemaValidationPolicies");function iae(e,t){let r=new Set;e.policies?.forEach(i=>{i.handler?.export&&t.has(i.handler.export)&&i.handler.module==="$import(@zuplo/runtime)"&&r.add(i.name)});let n=Fut(e,r);return new Set([...r,...n])}s(iae,"getPolicyNamesReferencingPolicyHandlers");js.getPolicyNamesReferencingPolicyHandlers=iae;function Fut(e,t){let r=new Set;return e.policies?.forEach(n=>{n.handler?.export==="CompositeInboundPolicy"&&n.handler?.options?.policies?.forEach(i=>{t.has(i)&&r.add(n.name)})}),r}s(Fut,"getCompositePoliciesContainingPolicy");function sae(e,t){if(!e["x-zuplo-route"]||!e["x-zuplo-route"].policies)return!1;let r=e["x-zuplo-route"].policies.inbound;if(r){for(let i of r)if(t.has(i))return!0}let n=e["x-zuplo-route"].policies.outbound;if(n){for(let i of n)if(t.has(i))return!0}return!1}s(sae,"isPolicyPresentInOperation");js.isPolicyPresentInOperation=sae;async function kut(e,t){let r=[];for(let n of e){let i=await _1.default.readFile(n,"utf-8"),a=JSON.parse(i).paths;for(let u in a){let c=a[u];for(let l in c){let f=c[l];sae(f,t)&&r.push({fileName:Qc.default.basename(n,".oas.json"),path:u,method:l})}}}return r}s(kut,"getRoutesContainingPolicies")});var VF=h(Zc=>{"use strict";var But=Zc&&Zc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zc,"__esModule",{value:!0});Zc.BUILD_CONDITIONS=void 0;var Gut=w9(),g1=But(require("path")),Vut=kt(),zut=T9(),Hut=C9(),Kut=j9(),Wut=KX(),Yut=JX(),Jut=zoe(),Xut=Qoe(),Qut=eae(),Zut=oae(),ect=(0,Gut.debug)("zuplo:core:build");Zc.BUILD_CONDITIONS=["workerd","worker","browser"];var aae=[...process.env.GLOBAL_MODULE_LOCATION?[process.env.GLOBAL_MODULE_LOCATION]:[],g1.default.resolve(__dirname,"..","..","..","node_modules"),g1.default.resolve(__dirname,"..","..","..","..","..","node_modules"),...require.main?.paths??[]];async function tct({dev:e=!1,systemDirectory:t,outputDirectory:r,sourceDirectory:n,logger:i,flags:o}){let a=g1.default.join(t,Vut.WORKER_ENTRY_NAME);ect(`Building with node paths: ${aae.join(", ")}`);let u=e===!1?{minify:!0}:{minify:!1,keepNames:!0,metafile:!0},c={platform:"browser",target:"es2022",outfile:g1.default.join(r,"worker.js")};return{format:o?.esmWorker===!0?"esm":"iife",banner:{js:`'use strict';
|
|
302
|
+
`},nodePaths:aae,entryPoints:[a],...c,sourcemap:"linked",legalComments:"linked",treeShaking:!0,bundle:!0,...u,external:[],logLevel:"silent",conditions:Zc.BUILD_CONDITIONS,plugins:[(0,Kut.environmentPlugin)({sourceDirectory:n}),(0,zut.blockRemoteModulePlugin)({logger:i}),(0,Jut.openApiRoutesPlugin)({sourceDirectory:n,outputDirectory:r}),(0,Xut.rawRoutePlugin)({sourceDirectory:n,logger:i}),(0,Zut.schemaValidationPlugin)({sourceDirectory:n,logger:i,isOpenApiBased:!0}),(0,Qut.runtimeConfigPlugin)(),(0,Hut.devPortalConfigPlugin)({sourceDirectory:n}),(0,Wut.jsonSchemaPlugin)({sourceDirectory:n,outputDirectory:r}),(0,Yut.nodejsCompatPlugin)({nodeCompatEnabled:o?.esmWorker===!0,sourceDirectory:n})]}}s(tct,"getBaseESBuildConfig");Zc.default=tct});var E1=h(Ms=>{"use strict";Object.defineProperty(Ms,"__esModule",{value:!0});Ms.formatBuildResult=Ms.BUILD_TASK_PLUGIN_NAME=Ms.ESBUILD_PLUGIN_NAME=void 0;Ms.ESBUILD_PLUGIN_NAME="run-esbuild";Ms.BUILD_TASK_PLUGIN_NAME="build-task";var rct=s((e,t)=>{let r=t;if(t.includes(e)){let n=new RegExp(`.*(${e})`,"g");r=t.replace(n,"")}return r.match(/^(\/)?(\.\.(\/)?)+/)&&(r=r.replace(/^(\/)?(\.\.(\/)?)+/,"/")),r},"removePrefixFromString"),nct=s((e,t)=>{let r=t;if(r.includes(e)){let n=new RegExp(`[a-zA-Z0-9-_.\\/]+(${e})`,"g");r=r.replace(n,"")}return r},"cleanFilePathsInMessage"),y1=s((e,t,r)=>{if(!e||e.length<=0)return e;let n=e.filter(i=>i.message!=='Could not resolve "@zuplo/runtime"');return n&&n.length>0&&n.forEach(i=>{i.location&&i.location.file&&(i.location.file=rct(t,i.location.file)),i.location&&i.location.lineText&&i.location.lineText.includes("@zuplo/core/index.minified.js")&&(i.location.lineText=i.location.lineText.substring(0,200)+"...<Truncated>"),i.message=nct(t,i.message),i.notes&&i.notes.length>0&&delete i.notes,i.text&&delete i.text,i.pluginName===""&&(i.pluginName=r)}),n},"cleanDataOnBuildIssue");function ict(e,t,r){try{e.buildTaskResult&&(e.buildTaskResult.errors&&(e.buildTaskResult.errors=y1(e.buildTaskResult.errors,t,Ms.BUILD_TASK_PLUGIN_NAME)),e.buildTaskResult.warnings&&(e.buildTaskResult.warnings=y1(e.buildTaskResult.warnings,t,Ms.BUILD_TASK_PLUGIN_NAME))),e.compilerResult&&(e.compilerResult.errors&&(e.compilerResult.errors=y1(e.compilerResult.errors,t,Ms.ESBUILD_PLUGIN_NAME)),e.compilerResult.warnings&&(e.compilerResult.warnings=y1(e.compilerResult.warnings,t,Ms.ESBUILD_PLUGIN_NAME)))}catch(n){r.error("Error while formatting buildResult. Err: ",n)}return e}s(ict,"formatBuildResult");Ms.formatBuildResult=ict});var lae=h(Us=>{"use strict";var sct=Us&&Us.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),oct=Us&&Us.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),act=Us&&Us.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&sct(t,e,r);return oct(t,e),t},cae=Us&&Us.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Us,"__esModule",{value:!0});Us.getRunEsBuildPlugin=void 0;var uct=Gf(),uae=Yo(),cct=act(require("esbuild")),lct=cae(_n()),fct=AP(),dct=cae(VF()),zF=E1(),pct=s(function(e){return s(async function({systemDirectory:r,outputDirectory:n,sourceDirectory:i,dev:o,generateSourceMaps:a,buildId:u,logger:c,config:l}){return lct.default.timeFn("Running esbuild",async()=>{c.info(`Running build_id: ${u}`);let f=await(0,dct.default)({systemDirectory:r,outputDirectory:n,generateSourceMaps:a,sourceDirectory:i,dev:o,logger:c,flags:l.flags}),d,_=new Date;try{if(!await(0,uct.oasFileInProject)(i))throw new Error("Failed to build project because no open-api file was found on the 'config' folder");d=await cct.build(f)}catch(g){if(c.error(g),g.errors||g.warnings)d=g;else if(g.message.includes("Failed to build project because no open-api file was found on the 'config' folder"))d={warnings:[],errors:[{id:"missing-open-api-file",text:"Failed to build project because no open-api file was found on the 'config' folder",pluginName:zF.ESBUILD_PLUGIN_NAME,location:null,notes:[],detail:"Failed to build project because no open-api file was found on the 'config' folder"}],outputFiles:void 0,metafile:void 0,mangleCache:void 0};else throw g}let m=new Date;if(e(new fct.CompilerResult(d,{endBuildTime:m,startBuildTime:_,buildId:u??""})),d.errors.length>0){d.errors.length>1&&(d.errors.length=1);let g=d.errors[0];c.debug(g)}return{warnings:[...d.warnings.map(g=>({message:g.text,pluginName:zF.ESBUILD_PLUGIN_NAME,severity:uae.WARNING_SEVERITY}))],errors:[...d.errors.map(g=>({message:g.text,pluginName:zF.ESBUILD_PLUGIN_NAME,severity:uae.ERROR_SEVERITY}))]}})},"runEsbuild")},"getRunEsBuildPlugin");Us.getRunEsBuildPlugin=pct});var KF=h(Ym=>{"use strict";var dae=Ym&&Ym.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ym,"__esModule",{value:!0});Ym.build=void 0;var Wm=Yo(),hct=require("crypto"),mct=require("fs"),zE=dae(require("path")),fae=kt(),_ct=rc(),gct=dae(_n()),yct=Fz(),Ect=Bz(),bct=Gz(),Sct=Vz(),vct=Yz(),Oct=Jz(),Pct=eH(),Ict=l9(),wct=d9(),Tct=lae(),HF=E1(),b1;try{let e=(0,mct.readFileSync)(zE.default.resolve(__dirname,"../../package.json"),"utf-8");b1=JSON.parse(e).version}catch{b1="0.0.0"}async function Nct({sourceDirectory:e,deploymentName:t=zE.default.basename(e),dev:r,entitlements:n,environmentType:i,generateSourceMaps:o=!1,logger:a,noCompile:u=!1,postBuildTasks:c,projectId:l,publicZuploEnvironmentVariables:f={}}){let d=(0,hct.randomUUID)(),_=a.child({buildId:d});return gct.default.timeFn(`Run build with build_id: ${d}`,async()=>{let m=await(0,yct.getZuploConfig)(e),g=zE.default.join(e,fae.BUILD_OUTPUT_DIR),y;if("errors"in m)y={status:"Failed",flags:void 0,compatibilityDate:void 0,runtimeVersion:b1,outputPath:g,buildTaskResult:{buildTime:"",buildTimeMs:0,status:Wm.FAILURE_STATUS,buildId:d,warnings:[],errors:m.errors}};else{let E={dev:r,generateSourceMaps:o,deploymentName:t,sourceDirectory:e,outputDirectory:g,systemDirectory:zE.default.join(e,fae.GENERATED_SOURCE_DIR_NAME),buildId:d,logger:_,config:m.config,publicZuploEnvironmentVariables:f,projectId:l,entitlements:n,environmentType:i},v=[];v.push(Ect.cleanOutput),v.push(bct.createSystemDir),v.push(Sct.checkForDeprecations),v.push(vct.generateBuildData),v.push(Pct.validateDevPortalJSON),v.push(Ict.validateOpenAPIFiles),v.push(Oct.generateWorker);let O,I=s(K=>{O=K},"compileCallback");u||v.push((0,Tct.getRunEsBuildPlugin)(I)),v.push(wct.verifyWorkerOutput),c&&v.push(...c);let w=await(0,_ct.runPlugins)(v,E),j=w.errors.length>0?Wm.FAILURE_STATUS:w.warnings.length>0?Wm.WARNING_STATUS:Wm.GOOD_STATUS;y={status:j==="Failed"||O===void 0||O.status==="Failed"?"Failed":j==="Warnings"||O.status==="Warnings"?"Warnings":"Good",compatibilityDate:m.config.compatibilityDate,runtimeVersion:b1,outputPath:g,compilerResult:O,buildTaskResult:{buildTime:"",buildTimeMs:0,status:j,buildId:d,warnings:w.warnings,errors:w.errors},flags:m.config.flags}}if(y.buildTaskResult.warnings.length>0){y.buildTaskResult.warnings.forEach(v=>{_.warn(v)});let E=y.buildTaskResult.warnings.filter(v=>v.pluginName!=="runEsbuild"&&v.pluginName!==HF.ESBUILD_PLUGIN_NAME);E.length>0&&(y.buildTaskResult.warnings=E),y.buildTaskResult.status=Wm.WARNING_STATUS}if(y.buildTaskResult.errors.length>0){y.buildTaskResult.errors.forEach(v=>{_.error(v)});let E=y.buildTaskResult.errors.filter(v=>v.pluginName!=="runEsbuild"&&v.pluginName!==HF.ESBUILD_PLUGIN_NAME);E.length>0&&(y.buildTaskResult.errors=E),y.buildTaskResult.status=Wm.FAILURE_STATUS}if(_.debug(`Build ${y.compilerResult?.buildId??d} completed ${u?"on watch mode":"with compiler status "+y.compilerResult?.status} and build task status ${y.buildTaskResult.status}`),y.compilerResult){let{metafile:E,...v}=y.compilerResult;_.debug(`Compiler results for build ${y.compilerResult?.buildId??d}`,v)}_.debug(`Build task results for build ${y.buildTaskResult?.buildId??d}`,y.buildTaskResult);let b=zE.default.basename(e);return(0,HF.formatBuildResult)(y,b,_)})}s(Nct,"build");Ym.build=Nct});var v1=h(xs=>{"use strict";var Act=xs&&xs.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Rct=xs&&xs.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Cct=xs&&xs.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Act(t,e,r);return Rct(t,e),t},S1=xs&&xs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xs,"__esModule",{value:!0});xs.BuildWatcher=void 0;var pae=Yo(),$ct=S1(require("chokidar")),Dct=Cct(require("esbuild")),hae=require("crypto"),Lct=S1(require("events")),HE=S1(require("path")),mae=kt(),jct=KF(),_ae=AP(),Mct=S1(VF()),gae=E1(),WF=class extends Lct.default{static{s(this,"WatchEmitter")}},YF=class{static{s(this,"BuildWatcher")}esbuildContext;emitter=new WF;envFilesWatcher;outputDirectory;sourceDirectory;dev;generateSourceMaps;logger;publicZuploEnvironmentVariables;projectName;constructor({sourceDirectory:t,dev:r,generateSourceMaps:n,logger:i,publicZuploEnvironmentVariables:o={}}){this.sourceDirectory=t,this.dev=r,this.outputDirectory=HE.default.join(t,mae.BUILD_OUTPUT_DIR),this.generateSourceMaps=n??!1,this.logger=i,this.publicZuploEnvironmentVariables=o,this.projectName=HE.default.basename(t),this.envFilesWatcher=$ct.default.watch([HE.default.join(t,".env"),HE.default.join(t,".env.zuplo")])}watchEnvFiles(){this.envFilesWatcher.on("change",async()=>{this.emitter.emit("reload",null,null)}),this.envFilesWatcher.on("add",async()=>{this.emitter.emit("reload",null,null)}),this.envFilesWatcher.on("unlink",async()=>{this.emitter.emit("reload",null,null)})}onReload=t=>{this.emitter.on("reload",t)};async start(){let{sourceDirectory:t}=this;if(this.esbuildContext!==void 0)throw new Error("Watcher cannot be started more than once");let r=await(0,jct.build)({sourceDirectory:t,noCompile:!0,dev:this.dev,generateSourceMaps:this.generateSourceMaps,publicZuploEnvironmentVariables:this.publicZuploEnvironmentVariables,logger:this.logger}),n=await(0,Mct.default)({systemDirectory:HE.default.join(t,mae.GENERATED_SOURCE_DIR_NAME),outputDirectory:this.outputDirectory,sourceDirectory:t,dev:this.dev,generateSourceMaps:this.generateSourceMaps,logger:this.logger,flags:r.flags}),i=this;n.plugins?.push({name:"on-end",setup(o){o.onEnd(a=>{i.logger.debug("Watcher (build) reloaded");let u;if(a)if(u=new _ae.CompilerResult(a),u.errors.length>0){let c={status:"Failed",runtimeVersion:"0.0.0",buildTaskResult:{buildTime:"",buildTimeMs:0,status:pae.FAILURE_STATUS,buildId:(0,hae.randomUUID)(),warnings:[],errors:[]}};c.compilerResult=u,(0,gae.formatBuildResult)(c,i.projectName,i.logger),i.logger.error(c.compilerResult.errors,"Build errors")}else i.logger.debug(`Successfully rebuilt watched project. Build id ${u.buildId}`);i.emitter.emit("reload",r,null,u)})}}),this.esbuildContext=await Dct.context(n);try{let o=await this.esbuildContext.rebuild();if(o.errors.length>0){let a={status:"Failed",runtimeVersion:"0.0.0",buildTaskResult:{buildTime:"",buildTimeMs:0,status:pae.FAILURE_STATUS,buildId:(0,hae.randomUUID)(),warnings:[],errors:[]}};a.compilerResult=new _ae.CompilerResult(o),(0,gae.formatBuildResult)(a,this.projectName,this.logger),this.logger.error(a.compilerResult.errors,"Build errors")}}catch(o){throw await this.close(),o}await this.esbuildContext.watch()}async close(){try{await this.envFilesWatcher.close(),this.esbuildContext&&(await this.esbuildContext.dispose(),this.logger.debug("ESBuild watcher closed"))}catch(t){this.logger.error(t)}}};xs.BuildWatcher=YF});var JF=h(O1=>{"use strict";Object.defineProperty(O1,"__esModule",{value:!0});O1.HttpStatusCode=void 0;var yae;(function(e){e[e.CONTINUE=100]="CONTINUE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.PROCESSING=102]="PROCESSING",e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.ACCEPTED=202]="ACCEPTED",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.ALREADY_REPORTED=208]="ALREADY_REPORTED",e[e.IM_USED=226]="IM_USED",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.FOUND=302]="FOUND",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.USE_PROXY=305]="USE_PROXY",e[e.SWITCH_PROXY=306]="SWITCH_PROXY",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.GONE=410]="GONE",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",e[e.URI_TOO_LONG=414]="URI_TOO_LONG",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.RANGE_NOT_SATISFIABLE=416]="RANGE_NOT_SATISFIABLE",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.LOCKED=423]="LOCKED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.VARIANT_ALSO_NEGOTIATES=506]="VARIANT_ALSO_NEGOTIATES",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.LOOP_DETECTED=508]="LOOP_DETECTED",e[e.NOT_EXTENDED=510]="NOT_EXTENDED",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED"})(yae||(O1.HttpStatusCode=yae={}))});var Eae=h(P1=>{"use strict";Object.defineProperty(P1,"__esModule",{value:!0});P1.getSourceControlProviderLabel=void 0;function Uct(e){let t="";switch(e){case"GITLAB":t="GitLab";break;case"GITHUB":t="GitHub";break;case"BITBUCKET":t="BitBucket";break;default:t=e;break}return t}s(Uct,"getSourceControlProviderLabel");P1.getSourceControlProviderLabel=Uct});var Sae=h(S=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});S.DEPLOYMENT_NO_ACCESS=S.INVALID_SOURCE_REPO_URL=S.SHARED_PROJECT_PREVIOUSLY_INITIALIZED=S.PROJECT_MUST_HAVE_ONE_MEMBER=S.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS=S.PROJECT_MEMBER_ALREADY_EXISTS=S.PROJECT_MEMBER_NOT_FOUND=S.INVALID_TEMPLATE_REPOSITORY=S.INCORRECT_PROJECT_TEMPLATE=S.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS=S.PROJECT_NOT_FOUND=S.PROJECT_NOT_FOUND_FOR_SOURCE_REPO=S.PROJECT_SHARING_DISABLED_ON_ACCOUNT=S.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED=S.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED=S.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE=S.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER=S.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND=S.ACCOUNT_MEMBER_INVITE_INVALID=S.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST=S.ACCOUNT_MEMBER_DOES_NOT_EXIST=S.ACCOUNT_MEMBER_INFO_MISSING=S.ACCOUNT_MEMBER_ALREADY_EXISTS=S.ACCOUNT_UPDATE_INFO_MISSING=S.ACCOUNT_INFO_MISSING=S.ACCOUNT_DOES_NOT_EXISTS=S.INVALID_ACCOUNT_LABEL_ENDING=S.INVALID_ACCOUNT_NAME_ENDING=S.ACCOUNT_NAME_ALREADY_IN_USE=S.INVALID_ACCOUNT_LABEL=S.INVALID_ACCOUNT_NAME=S.ACCOUNT_LABEL_LENGTH_LIMIT_REACHED=S.ACCOUNT_NAME_LENGTH_LIMIT_REACHED=S.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD=S.ACCOUNT_NAME_USES_RESERVED_KEYWORD=S.ACCOUNT_ALREADY_EXISTS=S.ACCOUNT_NOT_FOUND=S.USER_IS_NOT_SERVICE_ACCOUNT=S.USER_REMOVE_NOT_MEMBER_ACCOUNT=S.USER_HAS_NO_ACCESS_TO_ACCOUNT=S.USER_DETAILS_CANNOT_BE_FOUND=S.USER_ALREADY_EXISTS=S.CLIENT_NOT_FOUND=S.FORBIDDEN=S.UNAUTHORIZED=S.METHOD_NOT_ALLOWED=S.NOT_FOUND=S.CONFLICT=S.BAD_REQUEST=S.INTERNAL_SERVER_ERROR=void 0;S.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=S.GITHUB_INTEGRATION_ALREADY_EXISTS=S.FEATURE_FLAGS_NOT_FOUND=S.MAX_ALLOWED_PROJECTS_LIMIT_REACHED=S.PROJECT_ALREADY_HAS_REPO=S.PROJECT_INVALID_NAME=S.FAILED_TO_REVOKE_GH_TOKEN=S.USER_ACCOUNT_NOT_FS_MIGRATED=S.USER_NO_ACCESS_GITLAB_REPO=S.USER_NO_ACCESS_BITBUCKET_REPO=S.GITHUB_APP_CONFIGURATION_NOT_FOUND=S.GITHUB_APP_NO_USER_ACCESS_=S.GITHUB_APP_NO_NAMESPACE_ACCESS=S.GENERIC_GITHUB_BRANCH_INFO_ERROR=S.GITHUB_USER_NO_READ_ACCESS_REPO=S.USER_NO_PULL_ACCESS_GITHUB_REPO=S.USER_NO_ACCESS_GITHUB_REPO=S.PROJECT_SHARING_REQUIRES_GIT_REPO=S.PROJECT_INVALID_GIT_REPO=S.PROJECT_INVALID_GIT_CLONE=S.USER_IS_PROJECT_MEMBER=S.USER_HAS_NO_ACCESS_TO_PROJECT=S.RUNTIME_FLAG_KEY_NOT_VALID=S.RUNTIME_FLAG_NOT_FOUND=S.RUNTIME_FLAG_ALREADY_EXISTS=S.PROJECT_NO_MEMBERS=S.PROJECT_ALREADY_EXISTS=S.SERVICE_CONFIGURATION_FAILED_DECRYPTION=S.WORKING_COPY_SERVICE_NOT_CREATED=S.WORKING_COPY_SERVICE_NOT_DELETED=S.WORKING_COPY_SERVICE_NOT_FOUND=S.SERVICE_CONFIGURATION_NOT_FOUND=S.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE=S.DEPLOYMENT_INCORRECT_STATUS_PAUSE=S.DEPLOYMENT_NOT_WORKING_COPY=S.DEPLOYMENT_LOG_NOT_FOUND=S.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY=S.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB=S.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT=S.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT=S.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED=S.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE=S.DEPLOYMENT_DELETE_ERROR=S.DEPLOYMENT_CANNOT_DELETE_INSTANCE=S.DEPLOYMENT_INVALID_MULTI_PART=S.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART=S.DEPLOYMENT_FILE_DOES_NOT_EXISTS=S.DEPLOYMENT_NOT_FOUND=S.DEFAULT_DEPLOYMENT_DOES_NOT_EXIST=S.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH=void 0;S.THIRD_PARTY_APP_CONNECTION_NOT_FOUND=S.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND=S.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR=S.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR=S.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST=S.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR=S.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED=S.SOURCE_CONTROL_REMOTE_BRANCH_EXISTS=S.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND=S.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION=S.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING=S.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING=S.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS=S.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS=S.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED=S.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS=S.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND=S.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND=S.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE=S.SOURCE_CONTROL_REPO_OPERATION_ERROR=S.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE=S.SOURCE_CONTROL_REPO_NOT_FOUND=S.SOURCE_CONTROL_AUTHENTICATION_FAILED=S.EXTERNAL_SERVICE_GENERIC_ERROR=S.API_USER_NO_ACCESS=S.EXTERNAL_USER_NOT_CONFIGURED=S.EXTERNAL_USER_NO_ACCESS=S.API_KEY_CANNOT_BE_CREATED=S.CONSUMER_CANNOT_BE_CREATED=S.CONSUMER_DOES_NOT_EXIST=S.CONSUMER_NO_ACCESS=S.GITLAB_ACCESS_LEVEL_CHECK_FAIL=S.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=S.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=S.GITLAB_DUPLICATE_REPO=S.GITLAB_FAILED_DURING_REPO_CREATION=S.GITLAB_QUERY_USER_INFO_FAILED=S.BITBUCKET_FAILED_DURING_REPO_CREATION=S.BITBUCKET_WORKSPACE_MISCONFIGURATION=S.BITBUCKET_QUERY_USER_INFO_FAILED=S.GITHUB_INTEGRATION_INVALID_REPO=S.GIT_CREATE_PROJECT_WITH_INVALID_REPO=S.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=S.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=S.GITHUB_INTEGRATION_DUPLICATE_REPO=S.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED=S.GITHUB_INTEGRATION_AUTHENTICATION_FAILED=S.GITHUB_INTEGRATION_BRANCH_BEHIND=S.GITHUB_INTEGRATION_NOT_FOUND=S.GITHUB_REPOSITORY_NOT_FOUND=void 0;S.RBACCONFIGURATION_REQUIRE_ENVIRONMENTS=S.RBACCONFIGURATION_DOES_NOT_EXISTS=S.RBAC_INVALID_EXPIRATION_DATE=S.ACCOUNT_RBAC_DISABLED=S.METERING_BUCKET_CREATION_FAILED=S.UNABLE_UPGRADE_PLAN=S.BUCKET_NOT_FOUND=S.BUCKET_API_KEY_SERVICE_CONFLICT=S.DIRECTORY_DELETE_FAILED=S.FILE_DELETE_FAILED=S.CANNOT_DELETE_SOLE_OPEN_API_FILE=S.CANNOT_DELETE_ESSENTIAL_DIRECTORY=S.CANNOT_DELETE_ESSENTIAL_FILE=S.FILE_WRITE_FAILED=S.FILE_RENAME_FAILED=S.FILE_RENAME_FILE_ALREADY_EXISTS=S.FILE_RENAME_CANNOT_CHANGE_EXTENSION=S.FILE_RENAME_PATHS_MATCH=S.DIRECTORY_CREATION_FAILED=S.DIRECTORY_OR_FILE_DOES_NOT_EXIST=S.DIRECTORY_DOES_NOT_EXIST=S.DIRECTORY_ALREADY_EXISTS=S.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=S.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=S.FAILED_DOWNLOAD_FROM_STORAGE=S.CANNOT_FIND_SRC_DIRECTORY=S.CANNOT_READ_PACKAGE_JSON=S.PACKAGE_JSON_NOT_FOUND=S.RUNTIME_VERSION_INCORRECT_FORMAT=S.MIGRATIONS_ONLY_ON_WORKING_COPY=S.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=S.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=S.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR=S.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2=S.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE=S.NO_GLOBAL_SYMBOLS=S.NO_ZUPLO_PREFIXED_VARIABLES=S.NON_EMPTY_TARGETS_REQUIRED=S.CONFLICTING_TYPES=S.OVERLAPPING_TARGETS=S.INVALID_BRANCH_NAME=S.TARGET_BRANCH_ONLY_FOR_PREVIEW=S.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY=S.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE=S.DEPLOYMENT_NAME_MISSING=S.NON_EXISTENT_ENVIRONMENT_VARIABLE=S.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE=S.ENVIRONMENT_VARIABLE_VALIDATION_ERROR=S.DUPLICATE_ENVIRONMENT_VARIABLE=S.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION=void 0;S.RBACCONFIGURATION_DELETE_MISCONFIGURATION=S.RBACCONFIGURATION_INVALID_OPENFGA_CONFIG=S.RBACCONFIGURATION_INVALID_PROJECT_PROVIDED=S.RBACCONFIGURATION_ACCOUNT_HAS_NO_PROJECTS=S.RBACCONFIGURATION_REQUIRE_PROJECTS=S.RBACCONFIGURATION_INVALID_ENVIRONMENTS=void 0;var N=JF(),bae=Eae(),xct="https://github.com/apps/zuplo/installations/new";S.INTERNAL_SERVER_ERROR={type:"https://zup.fail/http-status/500",title:"Internal Server Error",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR};S.BAD_REQUEST={type:"https://zup.fail/http-status/400",title:"Bad Request",status:N.HttpStatusCode.BAD_REQUEST};S.CONFLICT={type:"https://zup.fail/http-status/409",title:"Conflict",status:N.HttpStatusCode.CONFLICT};S.NOT_FOUND={type:"https://zup.fail/http-status/404",title:"Not Found",status:N.HttpStatusCode.NOT_FOUND};S.METHOD_NOT_ALLOWED={type:"https://zup.fail/http-status/405",title:"Method Not Allowed",status:N.HttpStatusCode.METHOD_NOT_ALLOWED};S.UNAUTHORIZED={type:"https://zup.fail/http-status/401",title:"Unauthorized",status:N.HttpStatusCode.UNAUTHORIZED};S.FORBIDDEN={type:"https://zup.fail/http-status/403",title:"Forbidden",status:N.HttpStatusCode.FORBIDDEN};S.CLIENT_NOT_FOUND={type:"https://zup.fail/client-not-found",title:"Client not found",status:N.HttpStatusCode.NOT_FOUND};S.USER_ALREADY_EXISTS={type:"https://zup.fail/user-already-exists",title:"User already exists",status:N.HttpStatusCode.CONFLICT};S.USER_DETAILS_CANNOT_BE_FOUND={type:"https://zup.fail/user-details-cannot-be-found",title:"User cannot be found",status:N.HttpStatusCode.NOT_FOUND};S.USER_HAS_NO_ACCESS_TO_ACCOUNT={type:"https://zup.fail/user-has-no-access-to-account",title:"Not a member of the account",status:N.HttpStatusCode.UNAUTHORIZED};S.USER_REMOVE_NOT_MEMBER_ACCOUNT={type:"https://zup.fail/removed-user-not-account-member",title:"The user being removed is not a member of the account",status:N.HttpStatusCode.BAD_REQUEST};S.USER_IS_NOT_SERVICE_ACCOUNT={type:"https://zup.fail/user-not-service-account",title:"User is not a service account",status:N.HttpStatusCode.BAD_REQUEST};S.ACCOUNT_NOT_FOUND={type:"https://zup.fail/account-not-found",title:"Account not found",status:N.HttpStatusCode.NOT_FOUND};S.ACCOUNT_ALREADY_EXISTS={type:"https://zup.fail/account-already-exists",title:"Account already exists",status:N.HttpStatusCode.CONFLICT};S.ACCOUNT_NAME_USES_RESERVED_KEYWORD={type:"https://zup.fail/account-name-reserved-keyword",title:"The account name can not use reserved keyword 'zuplo'",status:N.HttpStatusCode.BAD_REQUEST};S.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD={type:"https://zup.fail/account-use-reserved-keyword",title:"The account name can not start with a reserved keyword",status:N.HttpStatusCode.BAD_REQUEST};S.ACCOUNT_NAME_LENGTH_LIMIT_REACHED={type:"https://zup.fail/account-name-length-limit",title:"The account name exceeds the 200 character limit",status:N.HttpStatusCode.BAD_REQUEST};S.ACCOUNT_LABEL_LENGTH_LIMIT_REACHED={type:"https://zup.fail/account-label-length-limit",title:"The account label exceeds the 200 character limit",status:N.HttpStatusCode.BAD_REQUEST};S.INVALID_ACCOUNT_NAME={type:"https://zup.fail/invalid-account-name",title:"The account name can only contain lower-cased characters, numbers, dashes and underscores",status:N.HttpStatusCode.BAD_REQUEST};S.INVALID_ACCOUNT_LABEL={type:"https://zup.fail/invalid-account-label",title:"The account label can only contain alpha-numeric characters, spaces, dashes and underscores",status:N.HttpStatusCode.BAD_REQUEST};S.ACCOUNT_NAME_ALREADY_IN_USE={type:"https://zup.fail/account-name-in-use",title:"The account name is already taken. Please try again using a different name.",status:N.HttpStatusCode.BAD_REQUEST};S.INVALID_ACCOUNT_NAME_ENDING={type:"https://zup.fail/invalid-account-name-ending",title:"The account name can not end with a dash or underscore character",status:N.HttpStatusCode.BAD_REQUEST};S.INVALID_ACCOUNT_LABEL_ENDING={type:"https://zup.fail/invalid-account-label-ending",title:"The account label can not end with a dash or underscore character",status:N.HttpStatusCode.BAD_REQUEST};S.ACCOUNT_DOES_NOT_EXISTS={type:"https://zup.fail/account-does-not-exists",title:"You are not a member of any accounts",status:N.HttpStatusCode.NOT_FOUND};S.ACCOUNT_INFO_MISSING={type:"https://zup.fail/account-info-missing",title:"Account information is required",status:N.HttpStatusCode.NOT_FOUND};S.ACCOUNT_UPDATE_INFO_MISSING={type:"https://zup.fail/account-update-info-missing",title:"Account information is insufficient for this operation.",status:N.HttpStatusCode.BAD_REQUEST};S.ACCOUNT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/account-member-already-exists",title:"Account member already exists",status:N.HttpStatusCode.BAD_REQUEST};S.ACCOUNT_MEMBER_INFO_MISSING={type:"https://zup.fail/account-member-info-missing",title:"Account member information is required",status:N.HttpStatusCode.BAD_REQUEST};S.ACCOUNT_MEMBER_DOES_NOT_EXIST={type:"https://zup.fail/account-member-does-not-exists",title:"Account member information cannot be found",status:N.HttpStatusCode.NOT_FOUND};S.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST={type:"https://zup.fail/account-member-invite-does-not-exist",title:"Account member invite cannot be found",status:N.HttpStatusCode.NOT_FOUND};S.ACCOUNT_MEMBER_INVITE_INVALID={type:"https://zup.fail/account-member-invite-invalid",title:"Account member invite is invalid",status:N.HttpStatusCode.BAD_REQUEST};S.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND={type:"https://zup.fail/account-member-invite-failed-send",title:"We were not able to send the account member invite. Please try again or contact support.",status:N.HttpStatusCode.BAD_REQUEST};S.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER={type:"https://zup.fail/account-member-cannot-be-invited",title:"The user is already part of the account.",status:N.HttpStatusCode.BAD_REQUEST};S.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE={type:"https://zup.fail/existing-pending-account-member-invites",title:"The user has a pending invitation to this account.",status:N.HttpStatusCode.BAD_REQUEST};S.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED={type:"https://zup.fail/no-multi-account-members",title:"Account is not configured for multiple members",status:N.HttpStatusCode.BAD_REQUEST};S.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED={type:"https://zup.fail/account-members-limit-reached",title:"This account has reached the limit of users allowed by its current billing plan.",status:N.HttpStatusCode.BAD_REQUEST};S.PROJECT_SHARING_DISABLED_ON_ACCOUNT={type:"https://zup.fail/project-sharing-disabled-on-account",title:"Project sharing is not enabled on account",status:N.HttpStatusCode.FORBIDDEN};S.PROJECT_NOT_FOUND_FOR_SOURCE_REPO={type:"https://zup.fail/project-not-found-for-source-repo",title:"Project not found for provided repository",status:N.HttpStatusCode.NOT_FOUND};S.PROJECT_NOT_FOUND={type:"https://zup.fail/project-not-found",title:"Project not found",status:N.HttpStatusCode.NOT_FOUND};S.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS={type:"https://zup.fail/project-cannot-be-deleted-protected-deployments-exists",title:"Project cannot be deleted because it has protected deployments",detail:"Project has protected deployments. Make sure to remove the use of custom domains before trying to delete the project.",status:N.HttpStatusCode.FORBIDDEN};S.INCORRECT_PROJECT_TEMPLATE={type:"https://zup.fail/incorrect-project-template",title:"Incorrect project template name",status:N.HttpStatusCode.BAD_REQUEST};var qct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:`The repository '${e} is not a valid Zuplo template repository`,status:N.HttpStatusCode.FORBIDDEN}),"INVALID_TEMPLATE_REPOSITORY");S.INVALID_TEMPLATE_REPOSITORY=qct;S.PROJECT_MEMBER_NOT_FOUND={type:"https://zup.fail/project-member-not-found",title:"Project Member not found",status:N.HttpStatusCode.NOT_FOUND};S.PROJECT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/project-member-already-exists",title:"Project Member already exists",status:N.HttpStatusCode.BAD_REQUEST};S.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS={type:"https://zup.fail/cannt-delete-your-own-project-member",title:"Can not delete your own Project Member record",status:N.HttpStatusCode.BAD_REQUEST};S.PROJECT_MUST_HAVE_ONE_MEMBER={type:"https://zup.fail/project-must-have-one-member",title:"Project must have at least one member",status:N.HttpStatusCode.BAD_REQUEST};S.SHARED_PROJECT_PREVIOUSLY_INITIALIZED={type:"https://zup.fail/project-previously-initialized",title:"Project was previously initialized",status:N.HttpStatusCode.BAD_REQUEST};S.INVALID_SOURCE_REPO_URL={type:"https://zup.fail/invalid-source-repo-url",title:"Project is not connected to source control, a sourceRepoUrl property must be specified and valid",status:N.HttpStatusCode.BAD_REQUEST};S.DEPLOYMENT_NO_ACCESS={type:"https://zup.fail/deployment-no-access",title:"User does not have access to deployment",status:N.HttpStatusCode.FORBIDDEN};S.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH={type:"https://zup.fail/deployment-branch-does-not-exist",title:"A deployment record cannot be found for the provided branch.",detail:"You can only update a project's default branch to one that has been deployed.",status:N.HttpStatusCode.FORBIDDEN};S.DEFAULT_DEPLOYMENT_DOES_NOT_EXIST={type:"https://zup.fail/default-deployment-does-not-exist",title:"A default deployment record cannot be found for the project.",detail:"You can only update a project's default branch to one that has been deployed.",status:N.HttpStatusCode.FORBIDDEN};S.DEPLOYMENT_NOT_FOUND={type:"https://zup.fail/deployment-not-found",title:"Deployment was not found",status:N.HttpStatusCode.NOT_FOUND};S.DEPLOYMENT_FILE_DOES_NOT_EXISTS={type:"https://zup.fail/deployment-file-does-not-exists",title:"Files were not found",status:N.HttpStatusCode.NOT_FOUND};S.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART={type:"https://zup.fail/deployment-request-is-not-multi-part",title:"Request is not multipart.",status:N.HttpStatusCode.BAD_REQUEST};S.DEPLOYMENT_INVALID_MULTI_PART={type:"https://zup.fail/deployment-invalid-multi-part",title:"Invalid request format. Must be multi-part file upload.",status:N.HttpStatusCode.BAD_REQUEST};S.DEPLOYMENT_CANNOT_DELETE_INSTANCE={type:"https://zup.fail/deployment-cannot-delete-instance",title:"Cannot delete instance of the deployment. Invalid account or project.",status:N.HttpStatusCode.NOT_FOUND};S.DEPLOYMENT_DELETE_ERROR={type:"https://zup.fail/deployment-delete-error",title:"Error deleting deployment instance.",status:N.HttpStatusCode.NOT_FOUND};S.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE={type:"https://zup.fail/deployment-invalid-environment-to-delete",title:"Invalid environment to delete deployment",status:N.HttpStatusCode.BAD_REQUEST};S.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED={type:"https://zup.fail/deployment-is-protected-cannot-be-deleted",title:"Deployment is protected and cannot be deleted",status:N.HttpStatusCode.FORBIDDEN};S.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid account",status:N.HttpStatusCode.NOT_FOUND};S.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid project name",status:N.HttpStatusCode.NOT_FOUND};S.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid user sub",status:N.HttpStatusCode.NOT_FOUND};S.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY={type:"https://zup.fail/deployment-cannot-be-deleted",title:"Deployment cannot be deleted since is a working copy",status:N.HttpStatusCode.FORBIDDEN};S.DEPLOYMENT_LOG_NOT_FOUND={type:"https://zup.fail/deployment-log-not-found",title:"DeploymentLog was not found",status:N.HttpStatusCode.NOT_FOUND};S.DEPLOYMENT_NOT_WORKING_COPY={type:"https://zup.fail/deployment-not-working-copy",title:"Deployment is not working copy.",status:N.HttpStatusCode.BAD_REQUEST};S.DEPLOYMENT_INCORRECT_STATUS_PAUSE={type:"https://zup.fail/deployment-incorrect-status-pause",title:"Deployment is not in a state to be paused.",status:N.HttpStatusCode.BAD_REQUEST};S.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE={type:"https://zup.fail/deployment-incorrect-status-unpause",title:"Deployment is not in a state to be unpaused.",status:N.HttpStatusCode.BAD_REQUEST};S.SERVICE_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Service configuration not found.",status:N.HttpStatusCode.NOT_FOUND};S.WORKING_COPY_SERVICE_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Working Copy service not found.",status:N.HttpStatusCode.NOT_FOUND};S.WORKING_COPY_SERVICE_NOT_DELETED={type:"https://zup.fail/working-copy-service-not-deleted",title:"Working Copy service failed to be deleted.",status:N.HttpStatusCode.BAD_REQUEST};S.WORKING_COPY_SERVICE_NOT_CREATED={type:"https://zup.fail/working-copy-service-not-created",title:"Working Copy service failed to be created.",status:N.HttpStatusCode.BAD_REQUEST};S.SERVICE_CONFIGURATION_FAILED_DECRYPTION={type:"https://zup.fail/service-config-not-decrypted",title:"Service configuration failed to decrypt.",status:N.HttpStatusCode.BAD_REQUEST};S.PROJECT_ALREADY_EXISTS={type:"https://zup.fail/project-already-exists",title:"Project already exists.",status:N.HttpStatusCode.BAD_REQUEST};S.PROJECT_NO_MEMBERS={type:"https://zup.fail/project-no-members",title:"Cannot find project members.",status:N.HttpStatusCode.NOT_FOUND};S.RUNTIME_FLAG_ALREADY_EXISTS={type:"https://zup.fail/runtime-flag-already-exists",title:"RuntimeFlag already exists.",status:N.HttpStatusCode.BAD_REQUEST};S.RUNTIME_FLAG_NOT_FOUND={type:"https://zup.fail/runtime-flag-not-found",title:"RuntimeFlag was not found.",status:N.HttpStatusCode.NOT_FOUND};S.RUNTIME_FLAG_KEY_NOT_VALID={type:"https://zup.fail/runtime-flag-key-not-valid",title:"RuntimeFlag key must be snake case",status:N.HttpStatusCode.BAD_REQUEST};S.USER_HAS_NO_ACCESS_TO_PROJECT={type:"https://zup.fail/user-has-no-access-to-project",title:"Not a member of the project",status:N.HttpStatusCode.FORBIDDEN};S.USER_IS_PROJECT_MEMBER={type:"https://zup.fail/user-is-project-member",title:"The user is already a project member.",status:N.HttpStatusCode.BAD_REQUEST};S.PROJECT_INVALID_GIT_CLONE={type:"https://zup.fail/project-invalid-git-clone",title:"Project requires defaultBranch & sourceRepoUrl for creation from a GitHub repository.",status:N.HttpStatusCode.BAD_REQUEST};S.PROJECT_INVALID_GIT_REPO={type:"https://zup.fail/project-invalid-git-repo",title:"The current source control repository is already in use by a Zuplo project",status:N.HttpStatusCode.BAD_REQUEST};S.PROJECT_SHARING_REQUIRES_GIT_REPO={type:"https://zup.fail/project-sharing-requires-git-repo",title:"The current project is not connected to a source control repository.",status:N.HttpStatusCode.BAD_REQUEST};var Fct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:N.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITHUB_REPO");S.USER_NO_ACCESS_GITHUB_REPO=Fct;var kct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have pull access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:N.HttpStatusCode.FORBIDDEN}),"USER_NO_PULL_ACCESS_GITHUB_REPO");S.USER_NO_PULL_ACCESS_GITHUB_REPO=kct;var Bct=s(({repositoryUrl:e})=>({type:"https://zup.fail/no-read-access-github-repo",title:"You do not have read access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:N.HttpStatusCode.FORBIDDEN}),"GITHUB_USER_NO_READ_ACCESS_REPO");S.GITHUB_USER_NO_READ_ACCESS_REPO=Bct;S.GENERIC_GITHUB_BRANCH_INFO_ERROR={type:"https://zup.fail/gh-branch-info-error",title:"There was an error getting branch information for the GitHub repository associated to the project.",status:N.HttpStatusCode.BAD_REQUEST};S.GITHUB_APP_NO_NAMESPACE_ACCESS={type:"https://zup.fail/no-namespace-access-github-app",title:"The Zuplo GitHub app does not have access to the repositories under the namespace provided. Make sure to configure the GitHub Zuplo App on the repository.",status:N.HttpStatusCode.FORBIDDEN};var Gct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:"The Zuplo GitHub app does not have access to the repository. Make sure to configure the GitHub Zuplo App on the repository.",detail:`The Zuplo GitHub app has not been granted access to the repository '${e}'. Go to '${xct}' to add the repository.`,status:N.HttpStatusCode.FORBIDDEN}),"GITHUB_APP_NO_USER_ACCESS_");S.GITHUB_APP_NO_USER_ACCESS_=Gct;S.GITHUB_APP_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/gh-app-not-found",title:"Global GitHub App configuration not found",status:N.HttpStatusCode.NOT_FOUND};var Vct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-bitbucket-repo",title:"You do not have access to the Bitbucket repository associated to the project. Ask your Bitbucket admin for access and try again.",detail:`User does not have access to the Bitbucket repository associated to the project. Update the user permissions in '${e}' to add a new collaborator.`,status:N.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_BITBUCKET_REPO");S.USER_NO_ACCESS_BITBUCKET_REPO=Vct;var zct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-gitlab-repo",title:"You do not have access to the GitLab repository associated to the project. Ask your GitLab admin for access and try again.",detail:`User does not have access to the GitLab repository associated to the project. Update the user permissions in '${e}' to add a new collaborator.`,status:N.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITLAB_REPO");S.USER_NO_ACCESS_GITLAB_REPO=zct;S.USER_ACCOUNT_NOT_FS_MIGRATED={type:"https://zup.fail/user-account-not-fs-migrated",title:"User account is in a plan that does not allow project sharing. Please contact your account admin.",status:N.HttpStatusCode.FORBIDDEN};S.FAILED_TO_REVOKE_GH_TOKEN={type:"https://zup.fail/failed-to-revoke-gh-token",title:"Failed to revoke GitHub token for the user",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR};S.PROJECT_INVALID_NAME={type:"https://zup.fail/project-invalid-name",title:"Project name is invalid, it only can contain letter, number and dashes.",status:N.HttpStatusCode.BAD_REQUEST};S.PROJECT_ALREADY_HAS_REPO={type:"https://zup.fail/project-already-has-repo",title:"The current project has been previously linked to a source control repository",status:N.HttpStatusCode.BAD_REQUEST};S.MAX_ALLOWED_PROJECTS_LIMIT_REACHED={type:"https://zup.fail/max-allowed-projects-limit-reached",title:"Your account has reached the maximum number of projects allowed.",status:N.HttpStatusCode.BAD_REQUEST};S.FEATURE_FLAGS_NOT_FOUND={type:"https://zup.fail/feature-flags-not-found",title:"Error trying to retrieve feature flags for this user",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR};S.GITHUB_INTEGRATION_ALREADY_EXISTS={type:"https://zup.fail/github-integration-already-exists",title:"Error trying to create GitHub Integration, already exists.",status:N.HttpStatusCode.BAD_REQUEST};var Hct=s(({repositoryUrl:e})=>({type:"https://zup.fail/github-integration-not-found",title:"Cannot find a project configured for this repository",status:N.HttpStatusCode.CONFLICT,detail:`The repository ${e} does not have a GitHub configured project.`}),"GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND");S.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=Hct;var Kct=s(({repositoryUrl:e})=>({type:"https://zup.fail/github-repo-not-found",title:"Cannot find a provided GitHub repository",status:N.HttpStatusCode.CONFLICT,detail:`The GitHub repository ${e} was not found.`}),"GITHUB_REPOSITORY_NOT_FOUND");S.GITHUB_REPOSITORY_NOT_FOUND=Kct;S.GITHUB_INTEGRATION_NOT_FOUND={type:"https://zup.fail/github-integration-not-found",title:"Project is not integrated with GitHub",status:N.HttpStatusCode.NOT_FOUND,detail:"The project does not have a GitHub integration configured."};S.GITHUB_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/github-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:N.HttpStatusCode.BAD_REQUEST};S.GITHUB_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/github-integration-authentication-failed",title:"GitHub integration: Authentication failed",status:N.HttpStatusCode.FORBIDDEN};S.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED={type:"https://zup.fail/github-integration-query-user-info-failed",title:"Failed while requesting basic user info from GitHub",status:N.HttpStatusCode.FORBIDDEN};var Wct=s(({repositoryName:e,orgName:t})=>({type:"https://zup.fail/github-integration-duplicate-repo",title:"A repository with that name already exists in GitHub",details:`A repository named '${e}' already exists on GitHub org '${t}'.`,instance:e,status:N.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_DUPLICATE_REPO");S.GITHUB_INTEGRATION_DUPLICATE_REPO=Wct;var Yct=s(({repositoryName:e,details:t})=>({type:"https://zup.fail/github-integration-failed-repo-creation",title:"Failed to create a new repository in GitHub",details:t,instance:e,status:N.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION");S.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=Yct;var Jct=s(({repositoryUrl:e})=>({type:"https://zup.fail/create-project-invalid-empty-repo",title:"The repository is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${e}' is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:e,status:N.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_EMPTY_REPO");S.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=Jct;var Xct=s(({repositoryUrl:e})=>({type:"https://zup.fail/create-project-invalid-git-repo",title:"We can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${e}' is not a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:e,status:N.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_INVALID_REPO");S.GIT_CREATE_PROJECT_WITH_INVALID_REPO=Xct;var Qct=s(({repositoryUrl:e})=>({type:"https://zup.fail/github-integration-invalid-repo",title:"We can only connect to an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.",details:`Repository '${e}' is not an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.`,instance:e,status:N.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_INVALID_REPO");S.GITHUB_INTEGRATION_INVALID_REPO=Qct;S.BITBUCKET_QUERY_USER_INFO_FAILED={type:"https://zup.fail/bitbucket-query-user-info-failed",title:"Failed while requesting basic user info from Bitbucket",status:N.HttpStatusCode.FORBIDDEN};S.BITBUCKET_WORKSPACE_MISCONFIGURATION={type:"https://zup.fail/bitbucket-workspace-misconfiguration",title:"Bitbucket source control configuration is missing workspace information",status:N.HttpStatusCode.FORBIDDEN};var Zct=s(({details:e})=>({type:"https://zup.fail/bitbucket-failed-repo-creation",title:"Failed to create a new repository in Bitbucket",details:e,status:N.HttpStatusCode.BAD_REQUEST}),"BITBUCKET_FAILED_DURING_REPO_CREATION");S.BITBUCKET_FAILED_DURING_REPO_CREATION=Zct;S.GITLAB_QUERY_USER_INFO_FAILED={type:"https://zup.fail/gitlab-query-user-info-failed",title:"Failed while requesting basic user info from GitLab",status:N.HttpStatusCode.FORBIDDEN};var elt=s(({details:e})=>({type:"https://zup.fail/gitlab-failed-repo-creation",title:"Failed to create a new repository in GitLab",details:e,status:N.HttpStatusCode.BAD_REQUEST}),"GITLAB_FAILED_DURING_REPO_CREATION");S.GITLAB_FAILED_DURING_REPO_CREATION=elt;var tlt=s(({repositoryName:e,orgName:t})=>({type:"https://zup.fail/gitlab-duplicate-repo",title:"A repository with that name already exists in GitLab",details:`A repository named '${e}' already exists in GitLab team '${t}'.`,instance:e,status:N.HttpStatusCode.BAD_REQUEST}),"GITLAB_DUPLICATE_REPO");S.GITLAB_DUPLICATE_REPO=tlt;var rlt=s(({orgName:e})=>({type:"https://zup.fail/gitlab-create-repo-perm",title:"The user's GitLab group access level does not allow for repository creation.",details:"The user's GitLab group access level does not allow for repository creation.",instance:e,status:N.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_PERM_CREATE_REPO");S.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=rlt;var nlt=s(({namespaceLabel:e})=>({type:"https://zup.fail/gitlab-insufficient-namespace-access",title:`The user's GitLab access level does not allow the use of namespace '${e}'.`,details:`The user's GitLab access level does not allow the use of namespace '${e}'.`,instance:e,status:N.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_NAMESPACE_ACCESS");S.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=nlt;var ilt=s(({orgName:e})=>({type:"https://zup.fail/gitlab-access-check-fail",title:"Failed to verify user's GitLab group access level",instance:e,status:N.HttpStatusCode.BAD_REQUEST}),"GITLAB_ACCESS_LEVEL_CHECK_FAIL");S.GITLAB_ACCESS_LEVEL_CHECK_FAIL=ilt;S.CONSUMER_NO_ACCESS={type:"https://zup.fail/consumer-no-access",title:"User does not have access to this consumer.",status:N.HttpStatusCode.UNAUTHORIZED};S.CONSUMER_DOES_NOT_EXIST={type:"https://zup.fail/consumer-does-not-exist",title:"Consumer does not exist or cannot be accessed.",status:N.HttpStatusCode.NOT_FOUND};S.CONSUMER_CANNOT_BE_CREATED={type:"https://zup.fail/consumer-not-created",title:"Failed to create consumer",status:N.HttpStatusCode.BAD_GATEWAY};S.API_KEY_CANNOT_BE_CREATED={type:"https://zup.fail/api-key-not-created",title:"Failed to create api key",status:N.HttpStatusCode.BAD_GATEWAY};S.EXTERNAL_USER_NO_ACCESS={type:"https://zup.fail/external-user-no-access",title:"User does not have access to this external user.",status:N.HttpStatusCode.UNAUTHORIZED};S.EXTERNAL_USER_NOT_CONFIGURED={type:"https://zup.fail/external-user-not-configured",title:"User is not setup as an External User (Key Manager)",status:N.HttpStatusCode.FORBIDDEN};S.API_USER_NO_ACCESS={type:"https://zup.fail/api-user-no-access",title:"Api user does not have access to this endpoint.",status:N.HttpStatusCode.FORBIDDEN};S.EXTERNAL_SERVICE_GENERIC_ERROR={type:"https://zup.fail/external-service-generic-error",title:"Unable to complete API request for External Service.",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR};var slt=s(({sourceControlProvider:e})=>({type:"https://zup.fail/source-control-authentication-failed",title:"Source provider authentication failed",detail:`Could not authenticate to ${(0,bae.getSourceControlProviderLabel)(e)}`,status:N.HttpStatusCode.UNAUTHORIZED}),"SOURCE_CONTROL_AUTHENTICATION_FAILED");S.SOURCE_CONTROL_AUTHENTICATION_FAILED=slt;var olt=s(({sourceControlProvider:e})=>({type:"https://zup.fail/source-control-repo-not-found",title:"We cannot connect to the repository associated to the project, verify your source control access configuration and try again.",detail:`Could not connect to ${(0,bae.getSourceControlProviderLabel)(e)} repository`,status:N.HttpStatusCode.NOT_FOUND}),"SOURCE_CONTROL_REPO_NOT_FOUND");S.SOURCE_CONTROL_REPO_NOT_FOUND=olt;S.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE={type:"https://zup.fail/source-control-empty-commit",title:"Commit operation failed because you provided an empty message. Please try again by providing a commit message.",status:N.HttpStatusCode.BAD_REQUEST};var alt=s(({repoURL:e,operation:t})=>({type:`https://zup.fail/source-control-repo-${t}-error`,title:`Failed on ${t} operation to repository '${e}'. Verify you have read & write access to the repository and try again.`,detail:"Verify your source control configuration and make sure you have been granted read & write access to the repository",status:N.HttpStatusCode.FORBIDDEN}),"SOURCE_CONTROL_REPO_OPERATION_ERROR");S.SOURCE_CONTROL_REPO_OPERATION_ERROR=alt;S.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE={type:"https://zup.fail/source-control-write-access-issue",title:"You do not have write access to the repository, verify your source control access configuration and try again.",detail:"Verify your source control configuration and make sure you have been granted access to the repository",status:N.HttpStatusCode.FORBIDDEN};S.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/source-control-configuration-not-found",title:"Source control configuration not found for this account.",status:N.HttpStatusCode.NOT_FOUND};S.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND={type:"https://zup.fail/source-control-credentials-not-found",title:"Source control credentials not found for this user. Verify your user's source control connection and try again.",status:N.HttpStatusCode.NOT_FOUND};S.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-refresh-source-control-credentials",title:"Failed to refresh Source Control credentials. Verify your user's source control connection and try again.",status:N.HttpStatusCode.FORBIDDEN};S.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED={type:"https://zup.fail/new-gh-config-required",title:"Current Source Control credentials are using the previous Zuplo GitHup App. Re-authenticate using the latest Zuplo GitHup App via Profile UI and try again.",status:N.HttpStatusCode.FORBIDDEN};S.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS={type:"https://zup.fail/gh-app-revoked-access",title:"Current Source Control credentials are invalid. Re-authenticate to GitHub via Profile UI and try again.",status:N.HttpStatusCode.UNAUTHORIZED};S.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-revoke-source-control-credentials",title:"Failed to revoke Source Control access token for the user",status:N.HttpStatusCode.FORBIDDEN};S.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING={type:"https://zup.fail/source-control-configuration-info-missing",title:"Source Control Configuration information is insufficient for this operation.",status:N.HttpStatusCode.BAD_REQUEST};S.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING={type:"https://zup.fail/source-control-configuration-bb-workspace-missing",title:"Source Control Configuration for Bitbucket must include a workspace configuration (additionalMetadata).",status:N.HttpStatusCode.BAD_REQUEST};S.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION={type:"https://zup.fail/preexisiting-source-control-configuration-on-account",title:"This account already has a Source Control Configuration for this provider.",detail:"This account has a pre-existing Source Control Configuration for this provider. Delete or update the existing configuration.",status:N.HttpStatusCode.BAD_REQUEST};S.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/source-control-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:N.HttpStatusCode.BAD_REQUEST};S.SOURCE_CONTROL_REMOTE_BRANCH_EXISTS={type:"https://zup.fail/source-control-integration-branch-behind",title:"The branch exists in the remote repository. Please try again with a different branch name.",status:N.HttpStatusCode.BAD_REQUEST};S.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/source-control-integration-authentication-failed",title:"Source control integration: Authentication failed",status:N.HttpStatusCode.FORBIDDEN};S.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR={type:"https://zup.fail/third-party-app-auth0-clients-endpoint-error",title:"Error Creating an Auth0 Client through tenant api",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR};S.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST={type:"https://zup.fail/third-party-app-auth0-config-does-not-exist",title:"Auth0 Configuration does not exist for account and environment",status:N.HttpStatusCode.NOT_FOUND};S.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR={type:"https://zup.fail/third-party-app-auth0-client-not-found-error",title:"Third Party App Not Found",status:N.HttpStatusCode.NOT_FOUND};S.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR={type:"https://zup.fail/third-party-app-auth-scope-config-error",title:"API Scope configuration at Auth0 end Error",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR};S.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND={type:"https://zup.fail/third-party-app-connections-not-found",title:"Cannot find auth0 tenant connections",status:N.HttpStatusCode.FAILED_DEPENDENCY};S.THIRD_PARTY_APP_CONNECTION_NOT_FOUND={type:"https://zup.fail/third-party-app-connection-not-found",title:"Cannot find connection with the given name",status:N.HttpStatusCode.FAILED_DEPENDENCY};S.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION={type:"https://zup.fail/third-party-app-cannot-link-tpa-to-connection",title:"Cannot link a connection to a third party app",status:N.HttpStatusCode.FAILED_DEPENDENCY};S.DUPLICATE_ENVIRONMENT_VARIABLE={type:"https://zup.fail/duplicate-environment-variable",title:"Duplicate environment variable",status:N.HttpStatusCode.BAD_REQUEST};S.ENVIRONMENT_VARIABLE_VALIDATION_ERROR={type:"https://zup.fail/environment-variables-validation-error",title:"Environment variable configuration is invalid",status:N.HttpStatusCode.BAD_REQUEST};S.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE={type:"https://zup.fail/environment-variables-cannot-be-retrieved-invalid-env-type",title:"Env vars will not be retrieved since the deployment is from non valid environment type",status:N.HttpStatusCode.BAD_REQUEST};S.NON_EXISTENT_ENVIRONMENT_VARIABLE={type:"https://zup.fail/non-existent-environment-variable",title:"Environment variable doesn't exist",status:N.HttpStatusCode.NOT_FOUND};S.DEPLOYMENT_NAME_MISSING={type:"https://zup.fail/deployment-name-missing",title:"Deployment name missing",status:N.HttpStatusCode.BAD_REQUEST};S.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE={type:"https://zup.fail/invalidly-named-environment-variable",title:"Environment variable needs a valid name",status:N.HttpStatusCode.BAD_REQUEST};S.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY={type:"https://zup.fail/personal-override-only-for-working-copy",title:"A personal override can only be used for a working-copy environment variable",status:N.HttpStatusCode.BAD_REQUEST};S.TARGET_BRANCH_ONLY_FOR_PREVIEW={type:"https://zup.fail/target-branch-only-for-preview",title:"A target branch can only be used for preview environment variables",status:N.HttpStatusCode.BAD_REQUEST};S.INVALID_BRANCH_NAME={type:"https://zup.fail/invalid-branch-name",title:"Branch name is invalid",status:N.HttpStatusCode.BAD_REQUEST};S.OVERLAPPING_TARGETS={type:"https://zup.fail/overlapping-targets",title:"The environments of this environment variable overlaps with an existing environment variable",status:N.HttpStatusCode.BAD_REQUEST};S.CONFLICTING_TYPES={type:"https://zup.fail/conflicting-types",title:"The type of this environment variable conflicts with an existing environment variable with the same name",status:N.HttpStatusCode.BAD_REQUEST};S.NON_EMPTY_TARGETS_REQUIRED={type:"https://zup.fail/non-empty-targets-required",title:"The environment targets for this environment variable cannot be empty.",status:N.HttpStatusCode.BAD_REQUEST};S.NO_ZUPLO_PREFIXED_VARIABLES={type:"https://zup.fail/no-zuplo-prefixed-variables",title:"Environment variables should not start with the reserved prefix of ZUPLO or __ZUPLO",status:N.HttpStatusCode.BAD_REQUEST};S.NO_GLOBAL_SYMBOLS={type:"https://zup.fail/no-global-symbols",title:"Environment variables cannot be named after global variables.",status:N.HttpStatusCode.BAD_REQUEST};S.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE={type:"https://zup.fail/deployer-non-valid-deployment-environment-type",title:"Deployment cannot be different than preview or production",status:N.HttpStatusCode.BAD_REQUEST};S.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2={type:"https://zup.fail/deployer-cannot-deploy-using-env-vars-v2",title:"Deployer was not able to deploy zup using environment variables v2",status:N.HttpStatusCode.FORBIDDEN};S.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR={type:"https://zup.fail/deleting-zuplo-environment-variables-error",title:"Problems deleting ZUPLO environment variables for deployment",status:N.HttpStatusCode.NOT_FOUND};var ult=s(({operation:e,path:t})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:"Cannot modify file on read-only environment",detail:`Cannot ${e} file ${t} for a read-only environment. Read-only environments cannot be edited.`,status:N.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT");S.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=ult;var clt=s(()=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:"Cannot modify files on read-only environment",detail:"Cannot save files on a read-only environment. Read-only environments cannot be edited.",status:N.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT");S.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=clt;S.MIGRATIONS_ONLY_ON_WORKING_COPY={type:"https://zup.fail/migration-only-on-working-copy",title:"Migrations can only run on working copies.",status:N.HttpStatusCode.BAD_REQUEST};S.RUNTIME_VERSION_INCORRECT_FORMAT={type:"https://zup.fail/migration-incorrect-runtime-version-format",title:"Runtime version is in an incorrect format.",status:N.HttpStatusCode.BAD_REQUEST};S.PACKAGE_JSON_NOT_FOUND={type:"https://zup.fail/no-pkg-file-found",title:"No package.json file found.",status:N.HttpStatusCode.NOT_FOUND};S.CANNOT_READ_PACKAGE_JSON={type:"https://zup.fail/cannot-read-pkg-file",title:"Cannot read package.json file.",status:N.HttpStatusCode.BAD_REQUEST};S.CANNOT_FIND_SRC_DIRECTORY={type:"https://zup.fail/cannot-find-src-dir",title:"Cannot find source directory.",status:N.HttpStatusCode.BAD_REQUEST};S.FAILED_DOWNLOAD_FROM_STORAGE={type:"https://zup.fail/failed-download-storage",title:"Failed to download content from storage.",status:N.HttpStatusCode.BAD_REQUEST};var llt=s(({path:e})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:"Cannot create directory on read-only environment",detail:`Cannot create folder ${e} for a read-only environment. Read-only environments cannot be edited.`,status:N.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT");S.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=llt;var flt=s(({path:e})=>({type:"https://zup.fail/directory-creation-in-non-allowed-location",title:"Directory creation attempted in non allowed location",detail:`Directory creation in ${e} is not allowed.`,instance:e,status:N.HttpStatusCode.BAD_REQUEST}),"CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION");S.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=flt;var dlt=s(({path:e})=>({type:"https://zup.fail/directory-already-exists",title:"Directory already exists",status:N.HttpStatusCode.BAD_REQUEST,detail:`Directory already exists at ${e}.`}),"DIRECTORY_ALREADY_EXISTS");S.DIRECTORY_ALREADY_EXISTS=dlt;var plt=s(({path:e})=>({type:"https://zup.fail/directory-does-not-exist",title:"Directory does not exist",status:N.HttpStatusCode.BAD_REQUEST,detail:`No directory at ${e}`}),"DIRECTORY_DOES_NOT_EXIST");S.DIRECTORY_DOES_NOT_EXIST=plt;var hlt=s(({path:e})=>({type:"https://zup.fail/directory-or-file-does-not-exist",title:"Directory or File does not exist",status:N.HttpStatusCode.BAD_REQUEST,detail:`No file/directory at ${e}`}),"DIRECTORY_OR_FILE_DOES_NOT_EXIST");S.DIRECTORY_OR_FILE_DOES_NOT_EXIST=hlt;var mlt=s(({path:e})=>({type:"https://zup.fail/directory-creation-failure",title:"Directory creation failed",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to create directory at ${e}. Please try again or contact support.`}),"DIRECTORY_CREATION_FAILED");S.DIRECTORY_CREATION_FAILED=mlt;var _lt=s(({path:e})=>({type:"https://zup.fail/file-rename-paths-match",title:"New file name matches old file name",status:N.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the old path ${e} matched the provided new path. Please choose a different name.`}),"FILE_RENAME_PATHS_MATCH");S.FILE_RENAME_PATHS_MATCH=_lt;var glt=s(({oldExtension:e,newExtension:t})=>({type:"https://zup.fail/file-rename-cannot-change-extension",title:"Cannot change extension of renamed file",status:N.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the new extension ${t} must match the old extension ${e}.`}),"FILE_RENAME_CANNOT_CHANGE_EXTENSION");S.FILE_RENAME_CANNOT_CHANGE_EXTENSION=glt;var ylt=s(({path:e})=>({type:"https://zup.fail/file-rename-file-exists",title:"File already exists",status:N.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, there already exists a file at ${e}. Please choose a different name.`}),"FILE_RENAME_FILE_ALREADY_EXISTS");S.FILE_RENAME_FILE_ALREADY_EXISTS=ylt;var Elt=s(({path:e})=>({type:"https://zup.fail/file-rename-failure",title:"File rename failed",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to rename file ${e}. Please try again or contact support.`}),"FILE_RENAME_FAILED");S.FILE_RENAME_FAILED=Elt;var blt=s(({path:e})=>({type:"https://zup.fail/file-write-failure",title:"File write failed",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to write file ${e}. Please try again or contact support.`}),"FILE_WRITE_FAILED");S.FILE_WRITE_FAILED=blt;var Slt=s(({path:e})=>({type:"https://zup.fail/essential-file-deletion",title:"Cannot delete essential file",status:N.HttpStatusCode.BAD_REQUEST,detail:`File '${e}' cannot be deleted. It is an essential file.`}),"CANNOT_DELETE_ESSENTIAL_FILE");S.CANNOT_DELETE_ESSENTIAL_FILE=Slt;var vlt=s(({path:e})=>({type:"https://zup.fail/essential-directory-deletion",title:"Cannot delete essential file",status:N.HttpStatusCode.BAD_REQUEST,detail:`Directory '${e}' cannot be deleted. It is an essential directory.`}),"CANNOT_DELETE_ESSENTIAL_DIRECTORY");S.CANNOT_DELETE_ESSENTIAL_DIRECTORY=vlt;var Olt=s(()=>({type:"https://zup.fail/sole-open-api-file-deletion",title:"Cannot delete sole OpenAPI file",status:N.HttpStatusCode.BAD_REQUEST,detail:"Your project must have at least 1 OpenAPI file."}),"CANNOT_DELETE_SOLE_OPEN_API_FILE");S.CANNOT_DELETE_SOLE_OPEN_API_FILE=Olt;var Plt=s(({path:e})=>({type:"https://zup.fail/file-delete-failure",title:"File deletion failed",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete file ${e}. Please try again or contact support.`}),"FILE_DELETE_FAILED");S.FILE_DELETE_FAILED=Plt;var Ilt=s(({path:e})=>({type:"https://zup.fail/directory-delete-failure",title:"Directory deletion failed",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete directory ${e}. Please try again or contact support.`}),"DIRECTORY_DELETE_FAILED");S.DIRECTORY_DELETE_FAILED=Ilt;S.BUCKET_API_KEY_SERVICE_CONFLICT={type:"https://zup.fail/bucket-api-key-service-error",title:"Bucket name conflicts",status:N.HttpStatusCode.CONFLICT};S.BUCKET_NOT_FOUND={type:"https://zup.fail/bucket-not-found",title:"Bucket cannot be found",status:N.HttpStatusCode.NOT_FOUND};S.UNABLE_UPGRADE_PLAN={type:"https://zup.fail/cant-upgrade-plan",title:"Can't upgrade to selected plan",status:N.HttpStatusCode.BAD_REQUEST};S.METERING_BUCKET_CREATION_FAILED={type:"https://zup.fail/metering-bucket-creation-failed",title:"Failed to create metering buckets for project",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR};S.ACCOUNT_RBAC_DISABLED={type:"https://zup.fail/account_rbac_disabled",title:"Account does not have RBAC enabled. Please contact support to get this feature enabled.",status:N.HttpStatusCode.FORBIDDEN};S.RBAC_INVALID_EXPIRATION_DATE={type:"https://zup.fail/rbac_invalid_expiration_date",title:"Invalid expiration date provided",detail:"The expiration date provided must be greater than the current date",status:N.HttpStatusCode.BAD_REQUEST};S.RBACCONFIGURATION_DOES_NOT_EXISTS={type:"https://zup.fail/rbacconfiguration-does-not-exists",title:"RBAC Configuration can not be found",status:N.HttpStatusCode.NOT_FOUND};S.RBACCONFIGURATION_REQUIRE_ENVIRONMENTS={type:"https://zup.fail/rbacconfiguration-required-environments",title:"RBAC Configuration must provide environment configuration",status:N.HttpStatusCode.BAD_REQUEST};S.RBACCONFIGURATION_INVALID_ENVIRONMENTS={type:"https://zup.fail/rbacconfiguration-invalid-environments",title:"RBAC Configuration must provide valid environment configuration",detail:"'production', 'preview' and 'development' are the only valid environment values for RBAC Configuration",status:N.HttpStatusCode.BAD_REQUEST};S.RBACCONFIGURATION_REQUIRE_PROJECTS={type:"https://zup.fail/rbacconfiguration-required-projects",title:"RBAC Configuration must provide which project access to configure",status:N.HttpStatusCode.BAD_REQUEST};S.RBACCONFIGURATION_ACCOUNT_HAS_NO_PROJECTS={type:"https://zup.fail/rbacconfiguration-no-projects",title:"Cannot find the specified projects on this account",status:N.HttpStatusCode.BAD_REQUEST};S.RBACCONFIGURATION_INVALID_PROJECT_PROVIDED={type:"https://zup.fail/rbacconfiguration-invalid-project",title:"One or more of the projects provided is not part of the account or does not exist",status:N.HttpStatusCode.BAD_REQUEST};S.RBACCONFIGURATION_INVALID_OPENFGA_CONFIG={type:"https://zup.fail/rbacconfiguration-invalid-openfga-config",title:"The provided configuration caused an unexpected error. Please contact support.",status:N.HttpStatusCode.BAD_REQUEST};S.RBACCONFIGURATION_DELETE_MISCONFIGURATION={type:"https://zup.fail/rbacconfiguration-delete-misconfiguration",title:"The provided configuration was not correctly created and cannot be deleted. Please contact support.",status:N.HttpStatusCode.BAD_REQUEST}});var Oae=h(wi=>{"use strict";var wlt=wi&&wi.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Tlt=wi&&wi.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Nlt=wi&&wi.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&wlt(t,e,r);return Tlt(t,e),t};Object.defineProperty(wi,"__esModule",{value:!0});wi.ApiNotFoundError=wi.ApiError=wi.Problems=void 0;var vae=Nlt(Sae());wi.Problems=vae;var I1=class extends Error{static{s(this,"ApiError")}type;status;detail;instance;constructor(t){if(super(t.title),!t.type.startsWith("https://zup.fail/"))throw new Error(`Invalid 'type' specified on ApiError, must be a URI starting with 'https://zup.fail/'. Type was set to ${t.type}`);this.name="ApiProblemError",this.type=t.type,this.status=t.status,this.detail=t.detail,this.instance=t.instance}};wi.ApiError=I1;var XF=class extends I1{static{s(this,"ApiNotFoundError")}constructor(t={}){super({...t,...vae.NOT_FOUND}),this.name="ApiNotFoundProblemError"}};wi.ApiNotFoundError=XF});var Pae=h(Iu=>{"use strict";var Alt=Iu&&Iu.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Rlt=Iu&&Iu.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Alt(t,e,r)};Object.defineProperty(Iu,"__esModule",{value:!0});Iu.HttpStatusCode=void 0;Rlt(Oae(),Iu);var Clt=JF();Object.defineProperty(Iu,"HttpStatusCode",{enumerable:!0,get:function(){return Clt.HttpStatusCode}})});var wae=h((aqt,Iae)=>{"use strict";function $lt(e){return e>=55296&&e<=56319}s($lt,"isHighSurrogate");function Dlt(e){return e>=56320&&e<=57343}s(Dlt,"isLowSurrogate");Iae.exports=s(function(t,r,n){if(typeof r!="string")throw new Error("Input must be string");for(var i=r.length,o=0,a,u,c=0;c<i;c+=1){if(a=r.charCodeAt(c),u=r[c],$lt(a)&&Dlt(r.charCodeAt(c+1))&&(c+=1,u+=r[c]),o+=t(u),o===n)return r.slice(0,c+1);if(o>n)return r.slice(0,c-u.length+1)}return r},"truncate")});var Nae=h((cqt,Tae)=>{"use strict";var Llt=wae(),jlt=Buffer.byteLength.bind(Buffer);Tae.exports=Llt.bind(null,jlt)});var QF=h(Jm=>{"use strict";var Mlt=Jm&&Jm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Jm,"__esModule",{value:!0});Jm.sanitize=void 0;var Ult=Mlt(Nae()),xlt=/[/?<>\\:*|"]/g,qlt=/[\x00-\x1f\x80-\x9f]/g,Flt=/^\.+$/,klt=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,Blt=/[. ]+$/;function Glt(e,t=""){if(typeof e!="string")throw new Error("Input must be string");let r=e.replace(xlt,t).replace(qlt,t).replace(Flt,t).replace(klt,t).replace(Blt,t);return(0,Ult.default)(r,255)}s(Glt,"sanitize");Jm.sanitize=Glt});var $ae=h(Xm=>{"use strict";var Cae=Xm&&Xm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xm,"__esModule",{value:!0});Xm.createProjectDirs=void 0;var Aae=Cae(require("fs/promises")),Vlt=Cae(require("path")),KE=kt(),Rae=rc(),zlt=s(async function({sourceDirectory:e,logger:t}){t.debug("Creating project directories");let r=[KE.USER_MODULES_DIR_NAME,KE.USER_CONFIG_DIR_NAME,KE.USER_TEST_DIR_NAME,KE.USER_SCHEMAS_DIR_NAME,KE.USER_DOCS_DIR_NAME,".vscode"];try{await Aae.default.mkdir(e);for(let n of r)await Aae.default.mkdir(Vlt.default.join(e,n),{recursive:!0})}catch(n){return t.error(n),new Rae.PluginResult({message:`Cannot create project directory tree at ${e}`,pluginName:"create-project-dirs",severity:"error"})}return new Rae.PluginResult},"createProjectDirs");Xm.createProjectDirs=zlt});var Mae=h(Qm=>{"use strict";var jae=Qm&&Qm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qm,"__esModule",{value:!0});Qm.generateFromTemplate=void 0;var Hlt=require("fs"),Dae=jae(require("fs/promises")),Lae=jae(require("path"));async function Klt(e){let t=Lae.default.resolve(__dirname,"..","templates",e);if((0,Hlt.existsSync)(t))return await Dae.default.readFile(t,"utf-8");{let r=Lae.default.resolve(__dirname,"templates",e);return await Dae.default.readFile(r,"utf-8")}}s(Klt,"generateFromTemplate");Qm.generateFromTemplate=Klt});var Ti=h(Zm=>{"use strict";var w1=Zm&&Zm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zm,"__esModule",{value:!0});Zm.generateFileFromTemplate=void 0;var Wlt=w1(gn()),Ylt=w1(require("fs/promises")),Jlt=w1(require("path")),Xlt=w1(_n()),Qlt=Mae(),Zlt=s(function(e,t){return async({sourceDirectory:r,logger:n})=>Xlt.default.timeFn(`Generating ${e}`,async()=>{n.debug(`Generating ${e}`);let i=Jlt.default.join(r,e);return await Wlt.default.fileExists(i)?(n.debug({sourceDirectory:r},`${e} already exists, skipping`),{warnings:[],errors:[]}):eft(i,t,n)})},"generateFileFromTemplate");Zm.generateFileFromTemplate=Zlt;async function eft(e,t,r){let n=await(0,Qlt.generateFromTemplate)(t);try{await Ylt.default.writeFile(e,n,"utf-8"),r.debug(`File written to ${e}`)}catch(i){r.error(i);let o={message:`Error creating file at ${e}`,pluginName:"generate-file",severity:"error"};return{warnings:[],errors:[o]}}return{warnings:[],errors:[]}}s(eft,"writeTemplate")});var xae=h(e_=>{"use strict";var tft=e_&&e_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e_,"__esModule",{value:!0});e_.generateDefaultDocsMarkdown=void 0;var rft=tft(require("path")),Uae=kt(),nft=Ti();e_.generateDefaultDocsMarkdown=(0,nft.generateFileFromTemplate)(rft.default.join(Uae.USER_DOCS_DIR_NAME,Uae.DEFAULT_DOCS_MARKDOWN_FILE),"markdown.template.md")});var Fae=h(t_=>{"use strict";var ift=t_&&t_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t_,"__esModule",{value:!0});t_.generateDefaultDocsSidebar=void 0;var sft=ift(require("path")),qae=kt(),oft=Ti();t_.generateDefaultDocsSidebar=(0,oft.generateFileFromTemplate)(sft.default.join(qae.USER_DOCS_DIR_NAME,qae.DOCS_SIDEBAR_FILE),"sidebar.template.json")});var Bae=h(r_=>{"use strict";var aft=r_&&r_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r_,"__esModule",{value:!0});r_.generateDefaultDocsTheme=void 0;var uft=aft(require("path")),kae=kt(),cft=Ti();r_.generateDefaultDocsTheme=(0,cft.generateFileFromTemplate)(uft.default.join(kae.USER_DOCS_DIR_NAME,kae.DOCS_THEME_FILE),"dev-portal.theme.template.css")});var Vae=h(n_=>{"use strict";var lft=n_&&n_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n_,"__esModule",{value:!0});n_.generateDefaultModule=void 0;var fft=lft(require("path")),Gae=kt(),dft=Ti();n_.generateDefaultModule=(0,dft.generateFileFromTemplate)(fft.default.join(Gae.USER_MODULES_DIR_NAME,Gae.DEFAULT_MODULE_FILE),"hello-world.template.ts")});var Hae=h(i_=>{"use strict";var pft=i_&&i_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i_,"__esModule",{value:!0});i_.generateDevPortalConfigJson=void 0;var hft=pft(require("path")),zae=kt(),mft=Ti();i_.generateDevPortalConfigJson=(0,mft.generateFileFromTemplate)(hft.default.join(zae.USER_CONFIG_DIR_NAME,zae.DEV_PORTAL_CONFIG_FILE),"dev-portal.template.json")});var Kae=h(T1=>{"use strict";Object.defineProperty(T1,"__esModule",{value:!0});T1.generateEnvironment=void 0;var _ft=Ti();T1.generateEnvironment=(0,_ft.generateFileFromTemplate)(".env","env.template")});var Wae=h(N1=>{"use strict";Object.defineProperty(N1,"__esModule",{value:!0});N1.generateESLint=void 0;var gft=Ti();N1.generateESLint=(0,gft.generateFileFromTemplate)(".eslintrc.js","eslintrc.template.js")});var Yae=h(A1=>{"use strict";Object.defineProperty(A1,"__esModule",{value:!0});A1.generateGitignore=void 0;var yft=Ti();A1.generateGitignore=(0,yft.generateFileFromTemplate)(".gitignore","gitignore.template.ignore")});var Jae=h(s_=>{"use strict";var Eft=s_&&s_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(s_,"__esModule",{value:!0});s_.generateLaunchJson=void 0;var bft=Eft(require("path")),Sft=Ti();s_.generateLaunchJson=(0,Sft.generateFileFromTemplate)(bft.default.join(".vscode","launch.json"),"launch.template.jsonc")});var Qae=h(o_=>{"use strict";var vft=o_&&o_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o_,"__esModule",{value:!0});o_.generateRouteOasConfig=void 0;var Oft=vft(require("path")),Xae=kt(),Pft=Ti();o_.generateRouteOasConfig=(0,Pft.generateFileFromTemplate)(Oft.default.join(Xae.USER_CONFIG_DIR_NAME,Xae.ROUTES_OAS_CONFIG_FILE),"routes.oas.template.json")});var tue=h(qs=>{"use strict";var ZF=qs&&qs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qs,"__esModule",{value:!0});qs.updateProjectPackageJson=qs.getProjectPackageJson=qs.getPackageOverrides=qs.generateDefaultPackageJson=void 0;var Zae=ZF(require("fs/promises")),ek=ZF(require("path")),Ift=ZF(Xs());async function wft(e,t=Ift.default.USE_MONOREPO_PACKAGES){let r={name:e,version:"1.0.0",author:"",copyright:"",scripts:{dev:"zup dev",test:"zup test"},dependencies:{zuplo:"latest"}};if(t){let n=eue();r.overrides=n,r.dependencies["@zuplo/runtime"]=n["@zuplo/runtime"],r.devDependencies&&"@zuplo/core"in r.devDependencies&&(r.devDependencies["@zuplo/core"]=n["@zuplo/core"]),"@zuplo/core"in r.dependencies&&(r.dependencies["@zuplo/core"]=n["@zuplo/core"])}return r}s(wft,"generateDefaultPackageJson");qs.generateDefaultPackageJson=wft;function eue(){let e=ek.default.resolve(__dirname,"..","..");return{"@zuplo/core":`file:${e}/core`,"@zuplo/runtime":`file:${e}/runtime`,"@zuplo/debug":`file:${e}/debug`,"@zuplo/errors":`file:${e}/errors`}}s(eue,"getPackageOverrides");qs.getPackageOverrides=eue;async function Tft(e){let t=ek.default.join(e,"package.json"),r=await Zae.default.readFile(t,"utf-8");return JSON.parse(r)}s(Tft,"getProjectPackageJson");qs.getProjectPackageJson=Tft;async function Nft(e,t){let r=ek.default.join(e,"package.json"),n=JSON.stringify(t,void 0,2);await Zae.default.writeFile(r,n,"utf-8")}s(Nft,"updateProjectPackageJson");qs.updateProjectPackageJson=Nft});var iue=h(R1=>{"use strict";Object.defineProperty(R1,"__esModule",{value:!0});R1.generatePackageJson=void 0;var rue=tue(),nue=rc(),Aft=s(async function({sourceDirectory:e,name:t,logger:r}){let n=await(0,rue.generateDefaultPackageJson)(t);try{await(0,rue.updateProjectPackageJson)(e,n)}catch(i){return r.error(i),new nue.PluginResult({message:"Error creating package.json",pluginName:"generate-package-json",severity:"error"})}return new nue.PluginResult},"generatePackageJson");R1.generatePackageJson=Aft});var oue=h(a_=>{"use strict";var Rft=a_&&a_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a_,"__esModule",{value:!0});a_.generatePoliciesConfig=void 0;var Cft=Rft(require("path")),sue=kt(),$ft=Ti();a_.generatePoliciesConfig=(0,$ft.generateFileFromTemplate)(Cft.default.join(sue.USER_CONFIG_DIR_NAME,sue.POLICIES_CONFIG_FILE),"policies.template.json")});var aue=h(u_=>{"use strict";var Dft=u_&&u_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(u_,"__esModule",{value:!0});u_.generateSettingsJson=void 0;var Lft=Dft(require("path")),jft=Ti();u_.generateSettingsJson=(0,jft.generateFileFromTemplate)(Lft.default.join(".vscode","settings.json"),"settings.template.jsonc")});var uue=h(C1=>{"use strict";Object.defineProperty(C1,"__esModule",{value:!0});C1.generateTSConfig=void 0;var Mft=Ti();C1.generateTSConfig=(0,Mft.generateFileFromTemplate)("tsconfig.json","tsconfig.template.json")});var lue=h(c_=>{"use strict";var Uft=c_&&c_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(c_,"__esModule",{value:!0});c_.generateZuploJson=void 0;var xft=Yo(),qft=require("fs/promises"),Fft=Uft(require("path")),kft=kt(),cue=rc(),Bft=s(async function({name:e,sourceDirectory:t,logger:r}){let n={version:1,project:e,compatibilityDate:xft.DEFAULT_COMPATIBILITY_DATE},i=Fft.default.join(t,kft.ZUPLO_PREFERRED_JSON_FILE),o=JSON.stringify(n,null,2);try{await(0,qft.writeFile)(i,o,"utf-8")}catch(a){return r.error(a),new cue.PluginResult({message:"Error creating zuplo.jsonc",pluginName:"generate-zuplo-json",severity:"error"})}return new cue.PluginResult},"generateZuploJson");c_.generateZuploJson=Bft});var hue=h(l_=>{"use strict";var pue=l_&&l_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(l_,"__esModule",{value:!0});l_.create=void 0;var fue=Pae(),Gft=pue(gn()),Vft=require("fs/promises"),zft=pue(require("path")),Hft=rc(),due=QF(),Kft=$ae(),Wft=xae(),Yft=Fae(),Jft=Bae(),Xft=Vae(),Qft=Hae(),Zft=Kae(),edt=Wae(),tdt=Yae(),rdt=Jae(),ndt=Qae(),idt=iue(),sdt=oue(),odt=aue(),adt=uue(),udt=lue();async function cdt({name:e,accountName:t="",rootDirectory:r,logger:n}){let i=(0,due.sanitize)(e),o=(0,due.sanitize)(t),a=zft.default.join(r,o,i),u={name:e,sourceDirectory:a,logger:n},c=[];if(await Gft.default.dirExists(a))throw new fue.ApiError({type:"https://zup.fail/project-already-exists-at-directory",title:"The project already exists in the specified directory",status:fue.HttpStatusCode.BAD_REQUEST,detail:`Project already exists at ${a}`});c.push(Kft.createProjectDirs,ndt.generateRouteOasConfig,udt.generateZuploJson,Qft.generateDevPortalConfigJson,Xft.generateDefaultModule,Yft.generateDefaultDocsSidebar,Wft.generateDefaultDocsMarkdown,Jft.generateDefaultDocsTheme,sdt.generatePoliciesConfig),c.push(adt.generateTSConfig,tdt.generateGitignore,idt.generatePackageJson,Zft.generateEnvironment,edt.generateESLint,rdt.generateLaunchJson,odt.generateSettingsJson);let{errors:l,warnings:f}=await(0,Hft.runPlugins)(c,u);if(f.length>0&&f.forEach(_=>{n.warn(_)}),l.length>0){await(0,Vft.rm)(a,{recursive:!0,force:!0});let _=l[0];throw _ instanceof Error?_:new Error(_.message)}return{sourceDirectory:a,projectName:e}}s(cdt,"create");l_.create=cdt});var Eue=h((qqt,yue)=>{yue.exports=gue;gue.sync=fdt;var mue=require("fs");function ldt(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var i=r[n].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}s(ldt,"checkPathExt");function _ue(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:ldt(t,r)}s(_ue,"checkStat");function gue(e,t,r){mue.stat(e,function(n,i){r(n,n?!1:_ue(i,e,t))})}s(gue,"isexe");function fdt(e,t){return _ue(mue.statSync(e),e,t)}s(fdt,"sync")});var Pue=h((kqt,Oue)=>{Oue.exports=Sue;Sue.sync=ddt;var bue=require("fs");function Sue(e,t,r){bue.stat(e,function(n,i){r(n,n?!1:vue(i,t))})}s(Sue,"isexe");function ddt(e,t){return vue(bue.statSync(e),t)}s(ddt,"sync");function vue(e,t){return e.isFile()&&pdt(e,t)}s(vue,"checkStat");function pdt(e,t){var r=e.mode,n=e.uid,i=e.gid,o=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),a=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),u=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),f=u|c,d=r&l||r&c&&i===a||r&u&&n===o||r&f&&o===0;return d}s(pdt,"checkMode")});var wue=h((Vqt,Iue)=>{var Gqt=require("fs"),$1;process.platform==="win32"||global.TESTING_WINDOWS?$1=Eue():$1=Pue();Iue.exports=tk;tk.sync=hdt;function tk(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,i){tk(e,t||{},function(o,a){o?i(o):n(a)})})}$1(e,t||{},function(n,i){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,i=!1),r(n,i)})}s(tk,"isexe");function hdt(e,t){try{return $1.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}s(hdt,"sync")});var Due=h((Hqt,$ue)=>{var f_=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Tue=require("path"),mdt=f_?";":":",Nue=wue(),Aue=s(e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),"getNotFoundError"),Rue=s((e,t)=>{let r=t.colon||mdt,n=e.match(/\//)||f_&&e.match(/\\/)?[""]:[...f_?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],i=f_?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=f_?i.split(r):[""];return f_&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:i}},"getPathInfo"),Cue=s((e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:i,pathExtExe:o}=Rue(e,t),a=[],u=s(l=>new Promise((f,d)=>{if(l===n.length)return t.all&&a.length?f(a):d(Aue(e));let _=n[l],m=/^".*"$/.test(_)?_.slice(1,-1):_,g=Tue.join(m,e),y=!m&&/^\.[\\\/]/.test(e)?e.slice(0,2)+g:g;f(c(y,l,0))}),"step"),c=s((l,f,d)=>new Promise((_,m)=>{if(d===i.length)return _(u(f+1));let g=i[d];Nue(l+g,{pathExt:o},(y,b)=>{if(!y&&b)if(t.all)a.push(l+g);else return _(l+g);return _(c(l,f,d+1))})}),"subStep");return r?u(0).then(l=>r(null,l),r):u(0)},"which"),_dt=s((e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:i}=Rue(e,t),o=[];for(let a=0;a<r.length;a++){let u=r[a],c=/^".*"$/.test(u)?u.slice(1,-1):u,l=Tue.join(c,e),f=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+l:l;for(let d=0;d<n.length;d++){let _=f+n[d];try{if(Nue.sync(_,{pathExt:i}))if(t.all)o.push(_);else return _}catch{}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw Aue(e)},"whichSync");$ue.exports=Cue;Cue.sync=_dt});var nk=h((Wqt,rk)=>{"use strict";var Lue=s((e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"},"pathKey");rk.exports=Lue;rk.exports.default=Lue});var xue=h((Jqt,Uue)=>{"use strict";var jue=require("path"),gdt=Due(),ydt=nk();function Mue(e,t){let r=e.options.env||process.env,n=process.cwd(),i=e.options.cwd!=null,o=i&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(e.options.cwd)}catch{}let a;try{a=gdt.sync(e.command,{path:r[ydt({env:r})],pathExt:t?jue.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return a&&(a=jue.resolve(i?e.options.cwd:"",a)),a}s(Mue,"resolveCommandAttempt");function Edt(e){return Mue(e)||Mue(e,!0)}s(Edt,"resolveCommand");Uue.exports=Edt});var que=h((Qqt,sk)=>{"use strict";var ik=/([()\][%!^"`<>&|;, *?])/g;function bdt(e){return e=e.replace(ik,"^$1"),e}s(bdt,"escapeCommand");function Sdt(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(ik,"^$1"),t&&(e=e.replace(ik,"^$1")),e}s(Sdt,"escapeArgument");sk.exports.command=bdt;sk.exports.argument=Sdt});var kue=h((e2t,Fue)=>{"use strict";Fue.exports=/^#!(.*)/});var Gue=h((t2t,Bue)=>{"use strict";var vdt=kue();Bue.exports=(e="")=>{let t=e.match(vdt);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),i=r.split("/").pop();return i==="env"?n:n?`${i} ${n}`:i}});var zue=h((r2t,Vue)=>{"use strict";var ok=require("fs"),Odt=Gue();function Pdt(e){let r=Buffer.alloc(150),n;try{n=ok.openSync(e,"r"),ok.readSync(n,r,0,150,0),ok.closeSync(n)}catch{}return Odt(r.toString())}s(Pdt,"readShebang");Vue.exports=Pdt});var Yue=h((i2t,Wue)=>{"use strict";var Idt=require("path"),Hue=xue(),Kue=que(),wdt=zue(),Tdt=process.platform==="win32",Ndt=/\.(?:com|exe)$/i,Adt=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Rdt(e){e.file=Hue(e);let t=e.file&&wdt(e.file);return t?(e.args.unshift(e.file),e.command=t,Hue(e)):e.file}s(Rdt,"detectShebang");function Cdt(e){if(!Tdt)return e;let t=Rdt(e),r=!Ndt.test(t);if(e.options.forceShell||r){let n=Adt.test(t);e.command=Idt.normalize(e.command),e.command=Kue.command(e.command),e.args=e.args.map(o=>Kue.argument(o,n));let i=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${i}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}s(Cdt,"parseNonShell");function $dt(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:Cdt(n)}s($dt,"parse");Wue.exports=$dt});var Que=h((o2t,Xue)=>{"use strict";var ak=process.platform==="win32";function uk(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}s(uk,"notFoundError");function Ddt(e,t){if(!ak)return;let r=e.emit;e.emit=function(n,i){if(n==="exit"){let o=Jue(i,t,"spawn");if(o)return r.call(e,"error",o)}return r.apply(e,arguments)}}s(Ddt,"hookChildProcess");function Jue(e,t){return ak&&e===1&&!t.file?uk(t.original,"spawn"):null}s(Jue,"verifyENOENT");function Ldt(e,t){return ak&&e===1&&!t.file?uk(t.original,"spawnSync"):null}s(Ldt,"verifyENOENTSync");Xue.exports={hookChildProcess:Ddt,verifyENOENT:Jue,verifyENOENTSync:Ldt,notFoundError:uk}});var tce=h((u2t,d_)=>{"use strict";var Zue=require("child_process"),ck=Yue(),lk=Que();function ece(e,t,r){let n=ck(e,t,r),i=Zue.spawn(n.command,n.args,n.options);return lk.hookChildProcess(i,n),i}s(ece,"spawn");function jdt(e,t,r){let n=ck(e,t,r),i=Zue.spawnSync(n.command,n.args,n.options);return i.error=i.error||lk.verifyENOENTSync(i.status,n),i}s(jdt,"spawnSync");d_.exports=ece;d_.exports.spawn=ece;d_.exports.sync=jdt;d_.exports._parse=ck;d_.exports._enoent=lk});var nce=h((l2t,rce)=>{"use strict";rce.exports=e=>{let t=typeof e=="string"?`
|
|
303
303
|
`:`
|
|
304
304
|
`.charCodeAt(),r=typeof e=="string"?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}});var oce=h((f2t,YE)=>{"use strict";var WE=require("path"),ice=nk(),sce=s(e=>{e={cwd:process.cwd(),path:process.env[ice()],execPath:process.execPath,...e};let t,r=WE.resolve(e.cwd),n=[];for(;t!==r;)n.push(WE.join(r,"node_modules/.bin")),t=r,r=WE.resolve(r,"..");let i=WE.resolve(e.cwd,e.execPath,"..");return n.push(i),n.concat(e.path).join(WE.delimiter)},"npmRunPath");YE.exports=sce;YE.exports.default=sce;YE.exports.env=e=>{e={env:process.env,...e};let t={...e.env},r=ice({env:t});return e.path=t[r],t[r]=YE.exports(e),t}});var uce=h((p2t,fk)=>{"use strict";var ace=s((e,t)=>{for(let r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e},"mimicFn");fk.exports=ace;fk.exports.default=ace});var lce=h((m2t,L1)=>{"use strict";var Mdt=uce(),D1=new WeakMap,cce=s((e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let r,n=0,i=e.displayName||e.name||"<anonymous>",o=s(function(...a){if(D1.set(o,++n),n===1)r=e.apply(this,a),e=null;else if(t.throw===!0)throw new Error(`Function \`${i}\` can only be called once`);return r},"onetime");return Mdt(o,e),D1.set(o,n),o},"onetime");L1.exports=cce;L1.exports.default=cce;L1.exports.callCount=e=>{if(!D1.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return D1.get(e)}});var fce=h(j1=>{"use strict";Object.defineProperty(j1,"__esModule",{value:!0});j1.SIGNALS=void 0;var Udt=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];j1.SIGNALS=Udt});var dk=h(p_=>{"use strict";Object.defineProperty(p_,"__esModule",{value:!0});p_.SIGRTMAX=p_.getRealtimeSignals=void 0;var xdt=s(function(){let e=pce-dce+1;return Array.from({length:e},qdt)},"getRealtimeSignals");p_.getRealtimeSignals=xdt;var qdt=s(function(e,t){return{name:`SIGRT${t+1}`,number:dce+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},"getRealtimeSignal"),dce=34,pce=64;p_.SIGRTMAX=pce});var hce=h(M1=>{"use strict";Object.defineProperty(M1,"__esModule",{value:!0});M1.getSignals=void 0;var Fdt=require("os"),kdt=fce(),Bdt=dk(),Gdt=s(function(){let e=(0,Bdt.getRealtimeSignals)();return[...kdt.SIGNALS,...e].map(Vdt)},"getSignals");M1.getSignals=Gdt;var Vdt=s(function({name:e,number:t,description:r,action:n,forced:i=!1,standard:o}){let{signals:{[e]:a}}=Fdt.constants,u=a!==void 0;return{name:e,number:u?a:t,description:r,supported:u,action:n,forced:i,standard:o}},"normalizeSignal")});var _ce=h(h_=>{"use strict";Object.defineProperty(h_,"__esModule",{value:!0});h_.signalsByNumber=h_.signalsByName=void 0;var zdt=require("os"),mce=hce(),Hdt=dk(),Kdt=s(function(){return(0,mce.getSignals)().reduce(Wdt,{})},"getSignalsByName"),Wdt=s(function(e,{name:t,number:r,description:n,supported:i,action:o,forced:a,standard:u}){return{...e,[t]:{name:t,number:r,description:n,supported:i,action:o,forced:a,standard:u}}},"getSignalByName"),Ydt=Kdt();h_.signalsByName=Ydt;var Jdt=s(function(){let e=(0,mce.getSignals)(),t=Hdt.SIGRTMAX+1,r=Array.from({length:t},(n,i)=>Xdt(i,e));return Object.assign({},...r)},"getSignalsByNumber"),Xdt=s(function(e,t){let r=Qdt(e,t);if(r===void 0)return{};let{name:n,description:i,supported:o,action:a,forced:u,standard:c}=r;return{[e]:{name:n,number:e,description:i,supported:o,action:a,forced:u,standard:c}}},"getSignalByNumber"),Qdt=s(function(e,t){let r=t.find(({name:n})=>zdt.constants.signals[n]===e);return r!==void 0?r:t.find(n=>n.number===e)},"findSignalByNumber"),Zdt=Jdt();h_.signalsByNumber=Zdt});var yce=h((P2t,gce)=>{"use strict";var{signalsByName:ept}=_ce(),tpt=s(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:i,exitCode:o,isCanceled:a})=>e?`timed out after ${t} milliseconds`:a?"was canceled":r!==void 0?`failed with ${r}`:n!==void 0?`was killed with ${n} (${i})`:o!==void 0?`failed with exit code ${o}`:"failed","getErrorPrefix"),rpt=s(({stdout:e,stderr:t,all:r,error:n,signal:i,exitCode:o,command:a,escapedCommand:u,timedOut:c,isCanceled:l,killed:f,parsed:{options:{timeout:d}}})=>{o=o===null?void 0:o,i=i===null?void 0:i;let _=i===void 0?void 0:ept[i].description,m=n&&n.code,y=`Command ${tpt({timedOut:c,timeout:d,errorCode:m,signal:i,signalDescription:_,exitCode:o,isCanceled:l})}: ${a}`,b=Object.prototype.toString.call(n)==="[object Error]",E=b?`${y}
|
|
305
|
-
${n.message}`:y,
|
|
306
|
-
`);return b?(n.originalMessage=n.message,n.message=S):n=new Error(S),n.shortMessage=E,n.command=a,n.escapedCommand=u,n.exitCode=o,n.signal=i,n.signalDescription=_,n.stdout=e,n.stderr=t,r!==void 0&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!c,n.isCanceled=l,n.killed=f&&!c,n},"makeError");gce.exports=rpt});var bce=h((w2t,pk)=>{"use strict";var U1=["stdin","stdout","stderr"],npt=s(e=>U1.some(t=>e[t]!==void 0),"hasAlias"),Ece=s(e=>{if(!e)return;let{stdio:t}=e;if(t===void 0)return U1.map(n=>e[n]);if(npt(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${U1.map(n=>`\`${n}\``).join(", ")}`);if(typeof t=="string")return t;if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);let r=Math.max(t.length,U1.length);return Array.from({length:r},(n,i)=>t[i])},"normalizeStdio");pk.exports=Ece;pk.exports.node=e=>{let t=Ece(e);return t==="ipc"?"ipc":t===void 0||typeof t=="string"?[t,t,t,"ipc"]:t.includes("ipc")?t:[...t,"ipc"]}});var Sce=h((N2t,x1)=>{x1.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&x1.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&x1.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var wce=h((A2t,g_)=>{var Wt=global.process,kd=s(function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"},"processOk");kd(Wt)?(vce=require("assert"),m_=Sce(),Oce=/^win/i.test(Wt.platform),JE=require("events"),typeof JE!="function"&&(JE=JE.EventEmitter),Wt.__signal_exit_emitter__?Gr=Wt.__signal_exit_emitter__:(Gr=Wt.__signal_exit_emitter__=new JE,Gr.count=0,Gr.emitted={}),Gr.infinite||(Gr.setMaxListeners(1/0),Gr.infinite=!0),g_.exports=function(e,t){if(!kd(global.process))return function(){};vce.equal(typeof e,"function","a callback must be provided for exit handler"),__===!1&&hk();var r="exit";t&&t.alwaysLast&&(r="afterexit");var n=s(function(){Gr.removeListener(r,e),Gr.listeners("exit").length===0&&Gr.listeners("afterexit").length===0&&q1()},"remove");return Gr.on(r,e),n},q1=s(function(){!__||!kd(global.process)||(__=!1,m_.forEach(function(t){try{Wt.removeListener(t,F1[t])}catch{}}),Wt.emit=k1,Wt.reallyExit=mk,Gr.count-=1)},"unload"),g_.exports.unload=q1,Bd=s(function(t,r,n){Gr.emitted[t]||(Gr.emitted[t]=!0,Gr.emit(t,r,n))},"emit"),F1={},m_.forEach(function(e){F1[e]=s(function(){if(kd(global.process)){var r=Wt.listeners(e);r.length===Gr.count&&(q1(),Bd("exit",null,e),Bd("afterexit",null,e),Oce&&e==="SIGHUP"&&(e="SIGINT"),Wt.kill(Wt.pid,e))}},"listener")}),g_.exports.signals=function(){return m_},__=!1,hk=s(function(){__||!kd(global.process)||(__=!0,Gr.count+=1,m_=m_.filter(function(t){try{return Wt.on(t,F1[t]),!0}catch{return!1}}),Wt.emit=Ice,Wt.reallyExit=Pce)},"load"),g_.exports.load=hk,mk=Wt.reallyExit,Pce=s(function(t){kd(global.process)&&(Wt.exitCode=t||0,Bd("exit",Wt.exitCode,null),Bd("afterexit",Wt.exitCode,null),mk.call(Wt,Wt.exitCode))},"processReallyExit"),k1=Wt.emit,Ice=s(function(t,r){if(t==="exit"&&kd(global.process)){r!==void 0&&(Wt.exitCode=r);var n=k1.apply(this,arguments);return Bd("exit",Wt.exitCode,null),Bd("afterexit",Wt.exitCode,null),n}else return k1.apply(this,arguments)},"processEmit")):g_.exports=function(){return function(){}};var vce,m_,Oce,JE,Gr,q1,Bd,F1,__,hk,mk,Pce,k1,Ice});var Nce=h((C2t,Tce)=>{"use strict";var ipt=require("os"),spt=wce(),opt=1e3*5,apt=s((e,t="SIGTERM",r={})=>{let n=e(t);return upt(e,t,r,n),n},"spawnedKill"),upt=s((e,t,r,n)=>{if(!cpt(t,r,n))return;let i=fpt(r),o=setTimeout(()=>{e("SIGKILL")},i);o.unref&&o.unref()},"setKillTimeout"),cpt=s((e,{forceKillAfterTimeout:t},r)=>lpt(e)&&t!==!1&&r,"shouldForceKill"),lpt=s(e=>e===ipt.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM","isSigterm"),fpt=s(({forceKillAfterTimeout:e=!0})=>{if(e===!0)return opt;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},"getForceKillAfterTimeout"),dpt=s((e,t)=>{e.kill()&&(t.isCanceled=!0)},"spawnedCancel"),ppt=s((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))},"timeoutKill"),hpt=s((e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(t===0||t===void 0)return n;let i,o=new Promise((u,c)=>{i=setTimeout(()=>{ppt(e,r,c)},t)}),a=n.finally(()=>{clearTimeout(i)});return Promise.race([o,a])},"setupTimeout"),mpt=s(({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},"validateTimeout"),_pt=s(async(e,{cleanup:t,detached:r},n)=>{if(!t||r)return n;let i=spt(()=>{e.kill()});return n.finally(()=>{i()})},"setExitHandler");Tce.exports={spawnedKill:apt,spawnedCancel:dpt,setupTimeout:hpt,validateTimeout:mpt,setExitHandler:_pt}});var Rce=h((D2t,Ace)=>{"use strict";var Ia=s(e=>e!==null&&typeof e=="object"&&typeof e.pipe=="function","isStream");Ia.writable=e=>Ia(e)&&e.writable!==!1&&typeof e._write=="function"&&typeof e._writableState=="object";Ia.readable=e=>Ia(e)&&e.readable!==!1&&typeof e._read=="function"&&typeof e._readableState=="object";Ia.duplex=e=>Ia.writable(e)&&Ia.readable(e);Ia.transform=e=>Ia.duplex(e)&&typeof e._transform=="function";Ace.exports=Ia});var $ce=h((j2t,Cce)=>{"use strict";var{PassThrough:gpt}=require("stream");Cce.exports=e=>{e={...e};let{array:t}=e,{encoding:r}=e,n=r==="buffer",i=!1;t?i=!(r||n):r=r||"utf8",n&&(r=null);let o=new gpt({objectMode:i});r&&o.setEncoding(r);let a=0,u=[];return o.on("data",c=>{u.push(c),i?a=u.length:a+=c.length}),o.getBufferedValue=()=>t?u:n?Buffer.concat(u,a):u.join(""),o.getBufferedLength=()=>a,o}});var Dce=h((M2t,XE)=>{"use strict";var{constants:ypt}=require("buffer"),Ept=require("stream"),{promisify:bpt}=require("util"),Spt=$ce(),vpt=bpt(Ept.pipeline),B1=class extends Error{static{s(this,"MaxBufferError")}constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function _k(e,t){if(!e)throw new Error("Expected a stream");t={maxBuffer:1/0,...t};let{maxBuffer:r}=t,n=Spt(t);return await new Promise((i,o)=>{let a=s(u=>{u&&n.getBufferedLength()<=ypt.MAX_LENGTH&&(u.bufferedData=n.getBufferedValue()),o(u)},"rejectPromise");(async()=>{try{await vpt(e,n),i()}catch(u){a(u)}})(),n.on("data",()=>{n.getBufferedLength()>r&&a(new B1)})}),n.getBufferedValue()}s(_k,"getStream");XE.exports=_k;XE.exports.buffer=(e,t)=>_k(e,{...t,encoding:"buffer"});XE.exports.array=(e,t)=>_k(e,{...t,array:!0});XE.exports.MaxBufferError=B1});var jce=h((x2t,Lce)=>{"use strict";var{PassThrough:Opt}=require("stream");Lce.exports=function(){var e=[],t=new Opt({objectMode:!0});return t.setMaxListeners(0),t.add=r,t.isEmpty=n,t.on("unpipe",i),Array.prototype.slice.call(arguments).forEach(r),t;function r(o){return Array.isArray(o)?(o.forEach(r),this):(e.push(o),o.once("end",i.bind(null,o)),o.once("error",t.emit.bind(t,"error")),o.pipe(t,{end:!1}),this)}s(r,"add");function n(){return e.length==0}s(n,"isEmpty");function i(o){e=e.filter(function(a){return a!==o}),!e.length&&t.readable&&t.end()}s(i,"remove")}});var qce=h((F2t,xce)=>{"use strict";var Uce=Rce(),Mce=Dce(),Ppt=jce(),Ipt=s((e,t)=>{t===void 0||e.stdin===void 0||(Uce(t)?t.pipe(e.stdin):e.stdin.end(t))},"handleInput"),wpt=s((e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;let r=Ppt();return e.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r},"makeAllStream"),gk=s(async(e,t)=>{if(e){e.destroy();try{return await t}catch(r){return r.bufferedData}}},"getBufferedData"),yk=s((e,{encoding:t,buffer:r,maxBuffer:n})=>{if(!(!e||!r))return t?Mce(e,{encoding:t,maxBuffer:n}):Mce.buffer(e,{maxBuffer:n})},"getStreamPromise"),Tpt=s(async({stdout:e,stderr:t,all:r},{encoding:n,buffer:i,maxBuffer:o},a)=>{let u=yk(e,{encoding:n,buffer:i,maxBuffer:o}),c=yk(t,{encoding:n,buffer:i,maxBuffer:o}),l=yk(r,{encoding:n,buffer:i,maxBuffer:o*2});try{return await Promise.all([a,u,c,l])}catch(f){return Promise.all([{error:f,signal:f.signal,timedOut:f.timedOut},gk(e,u),gk(t,c),gk(r,l)])}},"getSpawnedResult"),Npt=s(({input:e})=>{if(Uce(e))throw new TypeError("The `input` option cannot be a stream in sync mode")},"validateInputSync");xce.exports={handleInput:Ipt,makeAllStream:wpt,getSpawnedResult:Tpt,validateInputSync:Npt}});var kce=h((B2t,Fce)=>{"use strict";var Apt=(async()=>{})().constructor.prototype,Rpt=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Apt,e)]),Cpt=s((e,t)=>{for(let[r,n]of Rpt){let i=typeof t=="function"?(...o)=>Reflect.apply(n.value,t(),o):n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:i})}return e},"mergePromise"),$pt=s(e=>new Promise((t,r)=>{e.on("exit",(n,i)=>{t({exitCode:n,signal:i})}),e.on("error",n=>{r(n)}),e.stdin&&e.stdin.on("error",n=>{r(n)})}),"getSpawnedPromise");Fce.exports={mergePromise:Cpt,getSpawnedPromise:$pt}});var Vce=h((V2t,Gce)=>{"use strict";var Bce=s((e,t=[])=>Array.isArray(t)?[e,...t]:[e],"normalizeArgs"),Dpt=/^[\w.-]+$/,Lpt=/"/g,jpt=s(e=>typeof e!="string"||Dpt.test(e)?e:`"${e.replace(Lpt,'\\"')}"`,"escapeArg"),Mpt=s((e,t)=>Bce(e,t).join(" "),"joinCommand"),Upt=s((e,t)=>Bce(e,t).map(r=>jpt(r)).join(" "),"getEscapedCommand"),xpt=/ +/g,qpt=s(e=>{let t=[];for(let r of e.trim().split(xpt)){let n=t[t.length-1];n&&n.endsWith("\\")?t[t.length-1]=`${n.slice(0,-1)} ${r}`:t.push(r)}return t},"parseCommand");Gce.exports={joinCommand:Mpt,getEscapedCommand:Upt,parseCommand:qpt}});var Xce=h((H2t,y_)=>{"use strict";var Fpt=require("path"),Ek=require("child_process"),kpt=tce(),Bpt=nce(),Gpt=oce(),Vpt=lce(),G1=yce(),Hce=bce(),{spawnedKill:zpt,spawnedCancel:Hpt,setupTimeout:Kpt,validateTimeout:Wpt,setExitHandler:Ypt}=Nce(),{handleInput:Jpt,getSpawnedResult:Xpt,makeAllStream:Qpt,validateInputSync:Zpt}=qce(),{mergePromise:zce,getSpawnedPromise:eht}=kce(),{joinCommand:Kce,parseCommand:Wce,getEscapedCommand:Yce}=Vce(),tht=1e3*1e3*100,rht=s(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:i})=>{let o=t?{...process.env,...e}:e;return r?Gpt.env({env:o,cwd:n,execPath:i}):o},"getEnv"),Jce=s((e,t,r={})=>{let n=kpt._parse(e,t,r);return e=n.command,t=n.args,r=n.options,r={maxBuffer:tht,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:r.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...r},r.env=rht(r),r.stdio=Hce(r),process.platform==="win32"&&Fpt.basename(e,".exe")==="cmd"&&t.unshift("/q"),{file:e,args:t,options:r,parsed:n}},"handleArguments"),QE=s((e,t,r)=>typeof t!="string"&&!Buffer.isBuffer(t)?r===void 0?void 0:"":e.stripFinalNewline?Bpt(t):t,"handleOutput"),V1=s((e,t,r)=>{let n=Jce(e,t,r),i=Kce(e,t),o=Yce(e,t);Wpt(n.options);let a;try{a=Ek.spawn(n.file,n.args,n.options)}catch(m){let g=new Ek.ChildProcess,y=Promise.reject(G1({error:m,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return zce(g,y)}let u=eht(a),c=Kpt(a,n.options,u),l=Ypt(a,n.options,c),f={isCanceled:!1};a.kill=zpt.bind(null,a.kill.bind(a)),a.cancel=Hpt.bind(null,a,f);let _=Vpt(s(async()=>{let[{error:m,exitCode:g,signal:y,timedOut:b},E,S,O]=await Xpt(a,n.options,l),I=QE(n.options,E),w=QE(n.options,S),j=QE(n.options,O);if(m||g!==0||y!==null){let F=G1({error:m,exitCode:g,signal:y,stdout:I,stderr:w,all:j,command:i,escapedCommand:o,parsed:n,timedOut:b,isCanceled:f.isCanceled,killed:a.killed});if(!n.options.reject)return F;throw F}return{command:i,escapedCommand:o,exitCode:0,stdout:I,stderr:w,all:j,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},"handlePromise"));return Jpt(a,n.options.input),a.all=Qpt(a,n.options),zce(a,_)},"execa");y_.exports=V1;y_.exports.sync=(e,t,r)=>{let n=Jce(e,t,r),i=Kce(e,t),o=Yce(e,t);Zpt(n.options);let a;try{a=Ek.spawnSync(n.file,n.args,n.options)}catch(l){throw G1({error:l,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:n,timedOut:!1,isCanceled:!1,killed:!1})}let u=QE(n.options,a.stdout,a.error),c=QE(n.options,a.stderr,a.error);if(a.error||a.status!==0||a.signal!==null){let l=G1({stdout:u,stderr:c,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:o,parsed:n,timedOut:a.error&&a.error.code==="ETIMEDOUT",isCanceled:!1,killed:a.signal!==null});if(!n.options.reject)return l;throw l}return{command:i,escapedCommand:o,exitCode:0,stdout:u,stderr:c,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}};y_.exports.command=(e,t)=>{let[r,...n]=Wce(e);return V1(r,n,t)};y_.exports.commandSync=(e,t)=>{let[r,...n]=Wce(e);return V1.sync(r,n,t)};y_.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&typeof t=="object"&&(r=t,t=[]);let n=Hce.node(r),i=process.execArgv.filter(u=>!u.startsWith("--inspect")),{nodePath:o=process.execPath,nodeOptions:a=i}=r;return V1(o,[...a,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})}});var Sk=h(el=>{"use strict";var bk=el&&el.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(el,"__esModule",{value:!0});el.setEnvironment=el.loadEnvironment=void 0;var nht=bk(Xce()),Qce=bk(AA()),z1=bk(require("path")),H1=require("fs");async function iht(e){return Zce(process.env,e)}s(iht,"loadEnvironment");el.loadEnvironment=iht;async function Zce(e,t){if(e.__ZUPLO_LOG_LEVEL=process.env.__ZUPLO_LOG_LEVEL??process.env.LOG_LEVEL,e.__ZUPLO_LOG_FORMAT=process.env.__ZUPLO_LOG_FORMAT??process.env.LOG_FORMAT,e.LOG_LEVEL=process.env.LOG_LEVEL??process.env.LOG_LEVEL,e.LOG_FORMAT=process.env.LOG_FORMAT??process.env.LOG_FORMAT,e.GIT_SHA=process.env.GIT_SHA??await sht(t),process.env.__ZUPLO_CONFIG&&(e.__ZUPLO_CONFIG=process.env.__ZUPLO_CONFIG),(0,H1.existsSync)(z1.default.join(t,".env"))){let r=(0,H1.readFileSync)(z1.default.join(t,".env"),"utf8"),n=Qce.default.parse(r);for(let i of Object.keys(n))e[i]=n[i]}if((0,H1.existsSync)(z1.default.join(t,".env.zuplo"))){let r=(0,H1.readFileSync)(z1.default.join(t,".env.zuplo"),"utf8"),n=Qce.default.parse(r);for(let i of Object.keys(n))e[i]=n[i]}for(let r of Object.keys(e))e[r]===void 0&&delete e[r];return e}s(Zce,"setEnvironment");el.setEnvironment=Zce;async function sht(e){let t="unknown";try{let{stdout:r}=await(0,nht.default)("git",["rev-parse","HEAD"],{cwd:e});r.trim().length===40&&(t=r.trim())}catch{}return t}s(sht,"getGitSha")});var ot={};ihe(ot,{__addDisposableResource:()=>ble,__assign:()=>K1,__asyncDelegator:()=>dle,__asyncGenerator:()=>fle,__asyncValues:()=>ple,__await:()=>E_,__awaiter:()=>sle,__classPrivateFieldGet:()=>gle,__classPrivateFieldIn:()=>Ele,__classPrivateFieldSet:()=>yle,__createBinding:()=>Y1,__decorate:()=>rle,__disposeResources:()=>Sle,__esDecorate:()=>oht,__exportStar:()=>ale,__extends:()=>ele,__generator:()=>ole,__importDefault:()=>_le,__importStar:()=>mle,__makeTemplateObject:()=>hle,__metadata:()=>ile,__param:()=>nle,__propKey:()=>uht,__read:()=>Ok,__rest:()=>tle,__runInitializers:()=>aht,__setFunctionName:()=>cht,__spread:()=>ule,__spreadArray:()=>lle,__spreadArrays:()=>cle,__values:()=>W1,default:()=>dht});function ele(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");vk(e,t);function r(){this.constructor=e}s(r,"__"),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function tle(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function rle(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(a=e[u])&&(o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o}function nle(e,t){return function(r,n){t(r,n,e)}}function oht(e,t,r,n,i,o){function a(E){if(E!==void 0&&typeof E!="function")throw new TypeError("Function expected");return E}s(a,"accept");for(var u=n.kind,c=u==="getter"?"get":u==="setter"?"set":"value",l=!t&&e?n.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d,_=!1,m=r.length-1;m>=0;m--){var g={};for(var y in n)g[y]=y==="access"?{}:n[y];for(var y in n.access)g.access[y]=n.access[y];g.addInitializer=function(E){if(_)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(E||null))};var b=(0,r[m])(u==="accessor"?{get:f.get,set:f.set}:f[c],g);if(u==="accessor"){if(b===void 0)continue;if(b===null||typeof b!="object")throw new TypeError("Object expected");(d=a(b.get))&&(f.get=d),(d=a(b.set))&&(f.set=d),(d=a(b.init))&&i.unshift(d)}else(d=a(b))&&(u==="field"?i.unshift(d):f[c]=d)}l&&Object.defineProperty(l,n.name,f),_=!0}function aht(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function uht(e){return typeof e=="symbol"?e:"".concat(e)}function cht(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function ile(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function sle(e,t,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return s(i,"adopt"),new(r||(r=Promise))(function(o,a){function u(f){try{l(n.next(f))}catch(d){a(d)}}s(u,"fulfilled");function c(f){try{l(n.throw(f))}catch(d){a(d)}}s(c,"rejected");function l(f){f.done?o(f.value):i(f.value).then(u,c)}s(l,"step"),l((n=n.apply(e,t||[])).next())})}function ole(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(l){return function(f){return c([l,f])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(r=0)),r;)try{if(n=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1],o=l;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(l);break}o[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(f){l=[6,f],i=0}finally{n=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function ale(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Y1(t,e,r)}function W1(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ok(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function ule(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ok(arguments[t]));return e}function cle(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var o=arguments[t],a=0,u=o.length;a<u;a++,i++)n[i]=o[a];return n}function lle(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function E_(e){return this instanceof E_?(this.v=e,this):new E_(e)}function fle(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,o=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(_){n[_]&&(i[_]=function(m){return new Promise(function(g,y){o.push([_,m,g,y])>1||u(_,m)})})}function u(_,m){try{c(n[_](m))}catch(g){d(o[0][3],g)}}function c(_){_.value instanceof E_?Promise.resolve(_.value.v).then(l,f):d(o[0][2],_)}function l(_){u("next",_)}function f(_){u("throw",_)}function d(_,m){_(m),o.shift(),o.length&&u(o[0][0],o[0][1])}}function dle(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,o){t[i]=e[i]?function(a){return(r=!r)?{value:E_(e[i](a)),done:!1}:o?o(a):a}:o}}function ple(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof W1=="function"?W1(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=e[o]&&function(a){return new Promise(function(u,c){a=e[o](a),i(u,c,a.done,a.value)})}}function i(o,a,u,c){Promise.resolve(c).then(function(l){o({value:l,done:u})},a)}}function hle(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function mle(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Y1(t,e,r);return lht(t,e),t}function _le(e){return e&&e.__esModule?e:{default:e}}function gle(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function yle(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r}function Ele(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function ble(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if(typeof n!="function")throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}function Sle(e){function t(n){e.error=e.hasError?new fht(n,e.error,"An error was suppressed during disposal."):n,e.hasError=!0}s(t,"fail");function r(){for(;e.stack.length;){var n=e.stack.pop();try{var i=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(i).then(r,function(o){return t(o),r()})}catch(o){t(o)}}if(e.hasError)throw e.error}return s(r,"next"),r()}var vk,K1,Y1,lht,fht,dht,at=nhe(()=>{vk=s(function(e,t){return vk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},vk(e,t)},"extendStatics");s(ele,"__extends");K1=s(function(){return K1=Object.assign||s(function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},"__assign"),K1.apply(this,arguments)},"__assign");s(tle,"__rest");s(rle,"__decorate");s(nle,"__param");s(oht,"__esDecorate");s(aht,"__runInitializers");s(uht,"__propKey");s(cht,"__setFunctionName");s(ile,"__metadata");s(sle,"__awaiter");s(ole,"__generator");Y1=Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]};s(ale,"__exportStar");s(W1,"__values");s(Ok,"__read");s(ule,"__spread");s(cle,"__spreadArrays");s(lle,"__spreadArray");s(E_,"__await");s(fle,"__asyncGenerator");s(dle,"__asyncDelegator");s(ple,"__asyncValues");s(hle,"__makeTemplateObject");lht=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};s(mle,"__importStar");s(_le,"__importDefault");s(gle,"__classPrivateFieldGet");s(yle,"__classPrivateFieldSet");s(Ele,"__classPrivateFieldIn");s(ble,"__addDisposableResource");fht=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};s(Sle,"__disposeResources");dht={__extends:ele,__assign:K1,__rest:tle,__decorate:rle,__param:nle,__metadata:ile,__awaiter:sle,__generator:ole,__createBinding:Y1,__exportStar:ale,__values:W1,__read:Ok,__spread:ule,__spreadArrays:cle,__spreadArray:lle,__await:E_,__asyncGenerator:fle,__asyncDelegator:dle,__asyncValues:ple,__makeTemplateObject:hle,__importStar:mle,__importDefault:_le,__classPrivateFieldGet:gle,__classPrivateFieldSet:yle,__classPrivateFieldIn:Ele,__addDisposableResource:ble,__disposeResources:Sle}});var Ole=h((X2t,vle)=>{var b_=1e3,S_=b_*60,v_=S_*60,Gd=v_*24,pht=Gd*7,hht=Gd*365.25;vle.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return mht(e);if(r==="number"&&isFinite(e))return t.long?ght(e):_ht(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function mht(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*hht;case"weeks":case"week":case"w":return r*pht;case"days":case"day":case"d":return r*Gd;case"hours":case"hour":case"hrs":case"hr":case"h":return r*v_;case"minutes":case"minute":case"mins":case"min":case"m":return r*S_;case"seconds":case"second":case"secs":case"sec":case"s":return r*b_;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}s(mht,"parse");function _ht(e){var t=Math.abs(e);return t>=Gd?Math.round(e/Gd)+"d":t>=v_?Math.round(e/v_)+"h":t>=S_?Math.round(e/S_)+"m":t>=b_?Math.round(e/b_)+"s":e+"ms"}s(_ht,"fmtShort");function ght(e){var t=Math.abs(e);return t>=Gd?J1(e,t,Gd,"day"):t>=v_?J1(e,t,v_,"hour"):t>=S_?J1(e,t,S_,"minute"):t>=b_?J1(e,t,b_,"second"):e+" ms"}s(ght,"fmtLong");function J1(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}s(J1,"plural")});var Pk=h((Z2t,Ple)=>{function yht(e){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=i,r.enabled=a,r.humanize=Ole(),r.destroy=l,Object.keys(e).forEach(f=>{r[f]=e[f]}),r.names=[],r.skips=[],r.formatters={};function t(f){let d=0;for(let _=0;_<f.length;_++)d=(d<<5)-d+f.charCodeAt(_),d|=0;return r.colors[Math.abs(d)%r.colors.length]}s(t,"selectColor"),r.selectColor=t;function r(f){let d,_=null,m,g;function y(...b){if(!y.enabled)return;let E=y,S=Number(new Date),O=S-(d||S);E.diff=O,E.prev=d,E.curr=S,d=S,b[0]=r.coerce(b[0]),typeof b[0]!="string"&&b.unshift("%O");let I=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,(j,F)=>{if(j==="%%")return"%";I++;let K=r.formatters[F];if(typeof K=="function"){let H=b[I];j=K.call(E,H),b.splice(I,1),I--}return j}),r.formatArgs.call(E,b),(E.log||r.log).apply(E,b)}return s(y,"debug"),y.namespace=f,y.useColors=r.useColors(),y.color=r.selectColor(f),y.extend=n,y.destroy=r.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:()=>_!==null?_:(m!==r.namespaces&&(m=r.namespaces,g=r.enabled(f)),g),set:b=>{_=b}}),typeof r.init=="function"&&r.init(y),y}s(r,"createDebug");function n(f,d){let _=r(this.namespace+(typeof d>"u"?":":d)+f);return _.log=this.log,_}s(n,"extend");function i(f){r.save(f),r.namespaces=f,r.names=[],r.skips=[];let d,_=(typeof f=="string"?f:"").split(/[\s,]+/),m=_.length;for(d=0;d<m;d++)_[d]&&(f=_[d].replace(/\*/g,".*?"),f[0]==="-"?r.skips.push(new RegExp("^"+f.slice(1)+"$")):r.names.push(new RegExp("^"+f+"$")))}s(i,"enable");function o(){let f=[...r.names.map(u),...r.skips.map(u).map(d=>"-"+d)].join(",");return r.enable(""),f}s(o,"disable");function a(f){if(f[f.length-1]==="*")return!0;let d,_;for(d=0,_=r.skips.length;d<_;d++)if(r.skips[d].test(f))return!1;for(d=0,_=r.names.length;d<_;d++)if(r.names[d].test(f))return!0;return!1}s(a,"enabled");function u(f){return f.toString().substring(2,f.toString().length-2).replace(/\.\*\?$/,"*")}s(u,"toNamespace");function c(f){return f instanceof Error?f.stack||f.message:f}s(c,"coerce");function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return s(l,"destroy"),r.enable(r.load()),r}s(yht,"setup");Ple.exports=yht});var Ile=h((Yi,X1)=>{Yi.formatArgs=bht;Yi.save=Sht;Yi.load=vht;Yi.useColors=Eht;Yi.storage=Oht();Yi.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Yi.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Eht(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}s(Eht,"useColors");function bht(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+X1.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),e.splice(n,0,t)}s(bht,"formatArgs");Yi.log=console.debug||console.log||(()=>{});function Sht(e){try{e?Yi.storage.setItem("debug",e):Yi.storage.removeItem("debug")}catch{}}s(Sht,"save");function vht(){let e;try{e=Yi.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}s(vht,"load");function Oht(){try{return localStorage}catch{}}s(Oht,"localstorage");X1.exports=Pk()(Yi);var{formatters:Pht}=X1.exports;Pht.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Tle=h((rFt,wle)=>{"use strict";wle.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n<i)}});var Rle=h((nFt,Ale)=>{"use strict";var Iht=require("os"),Nle=require("tty"),Fs=Tle(),{env:Vr}=process,Q1;Fs("no-color")||Fs("no-colors")||Fs("color=false")||Fs("color=never")?Q1=0:(Fs("color")||Fs("colors")||Fs("color=true")||Fs("color=always"))&&(Q1=1);function wht(){if("FORCE_COLOR"in Vr)return Vr.FORCE_COLOR==="true"?1:Vr.FORCE_COLOR==="false"?0:Vr.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Vr.FORCE_COLOR,10),3)}s(wht,"envForceColor");function Tht(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}s(Tht,"translateLevel");function Nht(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=wht();n!==void 0&&(Q1=n);let i=r?Q1:n;if(i===0)return 0;if(r){if(Fs("color=16m")||Fs("color=full")||Fs("color=truecolor"))return 3;if(Fs("color=256"))return 2}if(e&&!t&&i===void 0)return 0;let o=i||0;if(Vr.TERM==="dumb")return o;if(process.platform==="win32"){let a=Iht.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in Vr)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(a=>a in Vr)||Vr.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in Vr)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Vr.TEAMCITY_VERSION)?1:0;if(Vr.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Vr){let a=Number.parseInt((Vr.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Vr.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Vr.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Vr.TERM)||"COLORTERM"in Vr?1:o}s(Nht,"supportsColor");function Ik(e,t={}){let r=Nht(e,{streamIsTTY:e&&e.isTTY,...t});return Tht(r)}s(Ik,"getSupportLevel");Ale.exports={supportsColor:Ik,stdout:Ik({isTTY:Nle.isatty(1)}),stderr:Ik({isTTY:Nle.isatty(2)})}});var $le=h((cn,eN)=>{var Aht=require("tty"),Z1=require("util");cn.init=Mht;cn.log=Dht;cn.formatArgs=Cht;cn.save=Lht;cn.load=jht;cn.useColors=Rht;cn.destroy=Z1.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");cn.colors=[6,2,3,4,5,1];try{let e=Rle();e&&(e.stderr||e).level>=2&&(cn.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}cn.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(i,o)=>o.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function Rht(){return"colors"in cn.inspectOpts?!!cn.inspectOpts.colors:Aht.isatty(process.stderr.fd)}s(Rht,"useColors");function Cht(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${i};1m${t} \x1B[0m`;e[0]=o+e[0].split(`
|
|
305
|
+
${n.message}`:y,v=[E,t,e].filter(Boolean).join(`
|
|
306
|
+
`);return b?(n.originalMessage=n.message,n.message=v):n=new Error(v),n.shortMessage=E,n.command=a,n.escapedCommand=u,n.exitCode=o,n.signal=i,n.signalDescription=_,n.stdout=e,n.stderr=t,r!==void 0&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!c,n.isCanceled=l,n.killed=f&&!c,n},"makeError");gce.exports=rpt});var bce=h((w2t,pk)=>{"use strict";var U1=["stdin","stdout","stderr"],npt=s(e=>U1.some(t=>e[t]!==void 0),"hasAlias"),Ece=s(e=>{if(!e)return;let{stdio:t}=e;if(t===void 0)return U1.map(n=>e[n]);if(npt(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${U1.map(n=>`\`${n}\``).join(", ")}`);if(typeof t=="string")return t;if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);let r=Math.max(t.length,U1.length);return Array.from({length:r},(n,i)=>t[i])},"normalizeStdio");pk.exports=Ece;pk.exports.node=e=>{let t=Ece(e);return t==="ipc"?"ipc":t===void 0||typeof t=="string"?[t,t,t,"ipc"]:t.includes("ipc")?t:[...t,"ipc"]}});var Sce=h((N2t,x1)=>{x1.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&x1.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&x1.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var wce=h((A2t,g_)=>{var Wt=global.process,kd=s(function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"},"processOk");kd(Wt)?(vce=require("assert"),m_=Sce(),Oce=/^win/i.test(Wt.platform),JE=require("events"),typeof JE!="function"&&(JE=JE.EventEmitter),Wt.__signal_exit_emitter__?Gr=Wt.__signal_exit_emitter__:(Gr=Wt.__signal_exit_emitter__=new JE,Gr.count=0,Gr.emitted={}),Gr.infinite||(Gr.setMaxListeners(1/0),Gr.infinite=!0),g_.exports=function(e,t){if(!kd(global.process))return function(){};vce.equal(typeof e,"function","a callback must be provided for exit handler"),__===!1&&hk();var r="exit";t&&t.alwaysLast&&(r="afterexit");var n=s(function(){Gr.removeListener(r,e),Gr.listeners("exit").length===0&&Gr.listeners("afterexit").length===0&&q1()},"remove");return Gr.on(r,e),n},q1=s(function(){!__||!kd(global.process)||(__=!1,m_.forEach(function(t){try{Wt.removeListener(t,F1[t])}catch{}}),Wt.emit=k1,Wt.reallyExit=mk,Gr.count-=1)},"unload"),g_.exports.unload=q1,Bd=s(function(t,r,n){Gr.emitted[t]||(Gr.emitted[t]=!0,Gr.emit(t,r,n))},"emit"),F1={},m_.forEach(function(e){F1[e]=s(function(){if(kd(global.process)){var r=Wt.listeners(e);r.length===Gr.count&&(q1(),Bd("exit",null,e),Bd("afterexit",null,e),Oce&&e==="SIGHUP"&&(e="SIGINT"),Wt.kill(Wt.pid,e))}},"listener")}),g_.exports.signals=function(){return m_},__=!1,hk=s(function(){__||!kd(global.process)||(__=!0,Gr.count+=1,m_=m_.filter(function(t){try{return Wt.on(t,F1[t]),!0}catch{return!1}}),Wt.emit=Ice,Wt.reallyExit=Pce)},"load"),g_.exports.load=hk,mk=Wt.reallyExit,Pce=s(function(t){kd(global.process)&&(Wt.exitCode=t||0,Bd("exit",Wt.exitCode,null),Bd("afterexit",Wt.exitCode,null),mk.call(Wt,Wt.exitCode))},"processReallyExit"),k1=Wt.emit,Ice=s(function(t,r){if(t==="exit"&&kd(global.process)){r!==void 0&&(Wt.exitCode=r);var n=k1.apply(this,arguments);return Bd("exit",Wt.exitCode,null),Bd("afterexit",Wt.exitCode,null),n}else return k1.apply(this,arguments)},"processEmit")):g_.exports=function(){return function(){}};var vce,m_,Oce,JE,Gr,q1,Bd,F1,__,hk,mk,Pce,k1,Ice});var Nce=h((C2t,Tce)=>{"use strict";var ipt=require("os"),spt=wce(),opt=1e3*5,apt=s((e,t="SIGTERM",r={})=>{let n=e(t);return upt(e,t,r,n),n},"spawnedKill"),upt=s((e,t,r,n)=>{if(!cpt(t,r,n))return;let i=fpt(r),o=setTimeout(()=>{e("SIGKILL")},i);o.unref&&o.unref()},"setKillTimeout"),cpt=s((e,{forceKillAfterTimeout:t},r)=>lpt(e)&&t!==!1&&r,"shouldForceKill"),lpt=s(e=>e===ipt.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM","isSigterm"),fpt=s(({forceKillAfterTimeout:e=!0})=>{if(e===!0)return opt;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},"getForceKillAfterTimeout"),dpt=s((e,t)=>{e.kill()&&(t.isCanceled=!0)},"spawnedCancel"),ppt=s((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))},"timeoutKill"),hpt=s((e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(t===0||t===void 0)return n;let i,o=new Promise((u,c)=>{i=setTimeout(()=>{ppt(e,r,c)},t)}),a=n.finally(()=>{clearTimeout(i)});return Promise.race([o,a])},"setupTimeout"),mpt=s(({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},"validateTimeout"),_pt=s(async(e,{cleanup:t,detached:r},n)=>{if(!t||r)return n;let i=spt(()=>{e.kill()});return n.finally(()=>{i()})},"setExitHandler");Tce.exports={spawnedKill:apt,spawnedCancel:dpt,setupTimeout:hpt,validateTimeout:mpt,setExitHandler:_pt}});var Rce=h((D2t,Ace)=>{"use strict";var Ia=s(e=>e!==null&&typeof e=="object"&&typeof e.pipe=="function","isStream");Ia.writable=e=>Ia(e)&&e.writable!==!1&&typeof e._write=="function"&&typeof e._writableState=="object";Ia.readable=e=>Ia(e)&&e.readable!==!1&&typeof e._read=="function"&&typeof e._readableState=="object";Ia.duplex=e=>Ia.writable(e)&&Ia.readable(e);Ia.transform=e=>Ia.duplex(e)&&typeof e._transform=="function";Ace.exports=Ia});var $ce=h((j2t,Cce)=>{"use strict";var{PassThrough:gpt}=require("stream");Cce.exports=e=>{e={...e};let{array:t}=e,{encoding:r}=e,n=r==="buffer",i=!1;t?i=!(r||n):r=r||"utf8",n&&(r=null);let o=new gpt({objectMode:i});r&&o.setEncoding(r);let a=0,u=[];return o.on("data",c=>{u.push(c),i?a=u.length:a+=c.length}),o.getBufferedValue=()=>t?u:n?Buffer.concat(u,a):u.join(""),o.getBufferedLength=()=>a,o}});var Dce=h((M2t,XE)=>{"use strict";var{constants:ypt}=require("buffer"),Ept=require("stream"),{promisify:bpt}=require("util"),Spt=$ce(),vpt=bpt(Ept.pipeline),B1=class extends Error{static{s(this,"MaxBufferError")}constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function _k(e,t){if(!e)throw new Error("Expected a stream");t={maxBuffer:1/0,...t};let{maxBuffer:r}=t,n=Spt(t);return await new Promise((i,o)=>{let a=s(u=>{u&&n.getBufferedLength()<=ypt.MAX_LENGTH&&(u.bufferedData=n.getBufferedValue()),o(u)},"rejectPromise");(async()=>{try{await vpt(e,n),i()}catch(u){a(u)}})(),n.on("data",()=>{n.getBufferedLength()>r&&a(new B1)})}),n.getBufferedValue()}s(_k,"getStream");XE.exports=_k;XE.exports.buffer=(e,t)=>_k(e,{...t,encoding:"buffer"});XE.exports.array=(e,t)=>_k(e,{...t,array:!0});XE.exports.MaxBufferError=B1});var jce=h((x2t,Lce)=>{"use strict";var{PassThrough:Opt}=require("stream");Lce.exports=function(){var e=[],t=new Opt({objectMode:!0});return t.setMaxListeners(0),t.add=r,t.isEmpty=n,t.on("unpipe",i),Array.prototype.slice.call(arguments).forEach(r),t;function r(o){return Array.isArray(o)?(o.forEach(r),this):(e.push(o),o.once("end",i.bind(null,o)),o.once("error",t.emit.bind(t,"error")),o.pipe(t,{end:!1}),this)}s(r,"add");function n(){return e.length==0}s(n,"isEmpty");function i(o){e=e.filter(function(a){return a!==o}),!e.length&&t.readable&&t.end()}s(i,"remove")}});var qce=h((F2t,xce)=>{"use strict";var Uce=Rce(),Mce=Dce(),Ppt=jce(),Ipt=s((e,t)=>{t===void 0||e.stdin===void 0||(Uce(t)?t.pipe(e.stdin):e.stdin.end(t))},"handleInput"),wpt=s((e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;let r=Ppt();return e.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r},"makeAllStream"),gk=s(async(e,t)=>{if(e){e.destroy();try{return await t}catch(r){return r.bufferedData}}},"getBufferedData"),yk=s((e,{encoding:t,buffer:r,maxBuffer:n})=>{if(!(!e||!r))return t?Mce(e,{encoding:t,maxBuffer:n}):Mce.buffer(e,{maxBuffer:n})},"getStreamPromise"),Tpt=s(async({stdout:e,stderr:t,all:r},{encoding:n,buffer:i,maxBuffer:o},a)=>{let u=yk(e,{encoding:n,buffer:i,maxBuffer:o}),c=yk(t,{encoding:n,buffer:i,maxBuffer:o}),l=yk(r,{encoding:n,buffer:i,maxBuffer:o*2});try{return await Promise.all([a,u,c,l])}catch(f){return Promise.all([{error:f,signal:f.signal,timedOut:f.timedOut},gk(e,u),gk(t,c),gk(r,l)])}},"getSpawnedResult"),Npt=s(({input:e})=>{if(Uce(e))throw new TypeError("The `input` option cannot be a stream in sync mode")},"validateInputSync");xce.exports={handleInput:Ipt,makeAllStream:wpt,getSpawnedResult:Tpt,validateInputSync:Npt}});var kce=h((B2t,Fce)=>{"use strict";var Apt=(async()=>{})().constructor.prototype,Rpt=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Apt,e)]),Cpt=s((e,t)=>{for(let[r,n]of Rpt){let i=typeof t=="function"?(...o)=>Reflect.apply(n.value,t(),o):n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:i})}return e},"mergePromise"),$pt=s(e=>new Promise((t,r)=>{e.on("exit",(n,i)=>{t({exitCode:n,signal:i})}),e.on("error",n=>{r(n)}),e.stdin&&e.stdin.on("error",n=>{r(n)})}),"getSpawnedPromise");Fce.exports={mergePromise:Cpt,getSpawnedPromise:$pt}});var Vce=h((V2t,Gce)=>{"use strict";var Bce=s((e,t=[])=>Array.isArray(t)?[e,...t]:[e],"normalizeArgs"),Dpt=/^[\w.-]+$/,Lpt=/"/g,jpt=s(e=>typeof e!="string"||Dpt.test(e)?e:`"${e.replace(Lpt,'\\"')}"`,"escapeArg"),Mpt=s((e,t)=>Bce(e,t).join(" "),"joinCommand"),Upt=s((e,t)=>Bce(e,t).map(r=>jpt(r)).join(" "),"getEscapedCommand"),xpt=/ +/g,qpt=s(e=>{let t=[];for(let r of e.trim().split(xpt)){let n=t[t.length-1];n&&n.endsWith("\\")?t[t.length-1]=`${n.slice(0,-1)} ${r}`:t.push(r)}return t},"parseCommand");Gce.exports={joinCommand:Mpt,getEscapedCommand:Upt,parseCommand:qpt}});var Xce=h((H2t,y_)=>{"use strict";var Fpt=require("path"),Ek=require("child_process"),kpt=tce(),Bpt=nce(),Gpt=oce(),Vpt=lce(),G1=yce(),Hce=bce(),{spawnedKill:zpt,spawnedCancel:Hpt,setupTimeout:Kpt,validateTimeout:Wpt,setExitHandler:Ypt}=Nce(),{handleInput:Jpt,getSpawnedResult:Xpt,makeAllStream:Qpt,validateInputSync:Zpt}=qce(),{mergePromise:zce,getSpawnedPromise:eht}=kce(),{joinCommand:Kce,parseCommand:Wce,getEscapedCommand:Yce}=Vce(),tht=1e3*1e3*100,rht=s(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:i})=>{let o=t?{...process.env,...e}:e;return r?Gpt.env({env:o,cwd:n,execPath:i}):o},"getEnv"),Jce=s((e,t,r={})=>{let n=kpt._parse(e,t,r);return e=n.command,t=n.args,r=n.options,r={maxBuffer:tht,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:r.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...r},r.env=rht(r),r.stdio=Hce(r),process.platform==="win32"&&Fpt.basename(e,".exe")==="cmd"&&t.unshift("/q"),{file:e,args:t,options:r,parsed:n}},"handleArguments"),QE=s((e,t,r)=>typeof t!="string"&&!Buffer.isBuffer(t)?r===void 0?void 0:"":e.stripFinalNewline?Bpt(t):t,"handleOutput"),V1=s((e,t,r)=>{let n=Jce(e,t,r),i=Kce(e,t),o=Yce(e,t);Wpt(n.options);let a;try{a=Ek.spawn(n.file,n.args,n.options)}catch(m){let g=new Ek.ChildProcess,y=Promise.reject(G1({error:m,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return zce(g,y)}let u=eht(a),c=Kpt(a,n.options,u),l=Ypt(a,n.options,c),f={isCanceled:!1};a.kill=zpt.bind(null,a.kill.bind(a)),a.cancel=Hpt.bind(null,a,f);let _=Vpt(s(async()=>{let[{error:m,exitCode:g,signal:y,timedOut:b},E,v,O]=await Xpt(a,n.options,l),I=QE(n.options,E),w=QE(n.options,v),j=QE(n.options,O);if(m||g!==0||y!==null){let F=G1({error:m,exitCode:g,signal:y,stdout:I,stderr:w,all:j,command:i,escapedCommand:o,parsed:n,timedOut:b,isCanceled:f.isCanceled,killed:a.killed});if(!n.options.reject)return F;throw F}return{command:i,escapedCommand:o,exitCode:0,stdout:I,stderr:w,all:j,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},"handlePromise"));return Jpt(a,n.options.input),a.all=Qpt(a,n.options),zce(a,_)},"execa");y_.exports=V1;y_.exports.sync=(e,t,r)=>{let n=Jce(e,t,r),i=Kce(e,t),o=Yce(e,t);Zpt(n.options);let a;try{a=Ek.spawnSync(n.file,n.args,n.options)}catch(l){throw G1({error:l,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:n,timedOut:!1,isCanceled:!1,killed:!1})}let u=QE(n.options,a.stdout,a.error),c=QE(n.options,a.stderr,a.error);if(a.error||a.status!==0||a.signal!==null){let l=G1({stdout:u,stderr:c,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:o,parsed:n,timedOut:a.error&&a.error.code==="ETIMEDOUT",isCanceled:!1,killed:a.signal!==null});if(!n.options.reject)return l;throw l}return{command:i,escapedCommand:o,exitCode:0,stdout:u,stderr:c,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}};y_.exports.command=(e,t)=>{let[r,...n]=Wce(e);return V1(r,n,t)};y_.exports.commandSync=(e,t)=>{let[r,...n]=Wce(e);return V1.sync(r,n,t)};y_.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&typeof t=="object"&&(r=t,t=[]);let n=Hce.node(r),i=process.execArgv.filter(u=>!u.startsWith("--inspect")),{nodePath:o=process.execPath,nodeOptions:a=i}=r;return V1(o,[...a,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})}});var Sk=h(el=>{"use strict";var bk=el&&el.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(el,"__esModule",{value:!0});el.setEnvironment=el.loadEnvironment=void 0;var nht=bk(Xce()),Qce=bk(AA()),z1=bk(require("path")),H1=require("fs");async function iht(e){return Zce(process.env,e)}s(iht,"loadEnvironment");el.loadEnvironment=iht;async function Zce(e,t){if(e.__ZUPLO_LOG_LEVEL=process.env.__ZUPLO_LOG_LEVEL??process.env.LOG_LEVEL,e.__ZUPLO_LOG_FORMAT=process.env.__ZUPLO_LOG_FORMAT??process.env.LOG_FORMAT,e.LOG_LEVEL=process.env.LOG_LEVEL??process.env.LOG_LEVEL,e.LOG_FORMAT=process.env.LOG_FORMAT??process.env.LOG_FORMAT,e.GIT_SHA=process.env.GIT_SHA??await sht(t),process.env.__ZUPLO_CONFIG&&(e.__ZUPLO_CONFIG=process.env.__ZUPLO_CONFIG),(0,H1.existsSync)(z1.default.join(t,".env"))){let r=(0,H1.readFileSync)(z1.default.join(t,".env"),"utf8"),n=Qce.default.parse(r);for(let i of Object.keys(n))e[i]=n[i]}if((0,H1.existsSync)(z1.default.join(t,".env.zuplo"))){let r=(0,H1.readFileSync)(z1.default.join(t,".env.zuplo"),"utf8"),n=Qce.default.parse(r);for(let i of Object.keys(n))e[i]=n[i]}for(let r of Object.keys(e))e[r]===void 0&&delete e[r];return e}s(Zce,"setEnvironment");el.setEnvironment=Zce;async function sht(e){let t="unknown";try{let{stdout:r}=await(0,nht.default)("git",["rev-parse","HEAD"],{cwd:e});r.trim().length===40&&(t=r.trim())}catch{}return t}s(sht,"getGitSha")});var ot={};ihe(ot,{__addDisposableResource:()=>ble,__assign:()=>K1,__asyncDelegator:()=>dle,__asyncGenerator:()=>fle,__asyncValues:()=>ple,__await:()=>E_,__awaiter:()=>sle,__classPrivateFieldGet:()=>gle,__classPrivateFieldIn:()=>Ele,__classPrivateFieldSet:()=>yle,__createBinding:()=>Y1,__decorate:()=>rle,__disposeResources:()=>Sle,__esDecorate:()=>oht,__exportStar:()=>ale,__extends:()=>ele,__generator:()=>ole,__importDefault:()=>_le,__importStar:()=>mle,__makeTemplateObject:()=>hle,__metadata:()=>ile,__param:()=>nle,__propKey:()=>uht,__read:()=>Ok,__rest:()=>tle,__runInitializers:()=>aht,__setFunctionName:()=>cht,__spread:()=>ule,__spreadArray:()=>lle,__spreadArrays:()=>cle,__values:()=>W1,default:()=>dht});function ele(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");vk(e,t);function r(){this.constructor=e}s(r,"__"),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function tle(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function rle(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(a=e[u])&&(o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o}function nle(e,t){return function(r,n){t(r,n,e)}}function oht(e,t,r,n,i,o){function a(E){if(E!==void 0&&typeof E!="function")throw new TypeError("Function expected");return E}s(a,"accept");for(var u=n.kind,c=u==="getter"?"get":u==="setter"?"set":"value",l=!t&&e?n.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d,_=!1,m=r.length-1;m>=0;m--){var g={};for(var y in n)g[y]=y==="access"?{}:n[y];for(var y in n.access)g.access[y]=n.access[y];g.addInitializer=function(E){if(_)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(E||null))};var b=(0,r[m])(u==="accessor"?{get:f.get,set:f.set}:f[c],g);if(u==="accessor"){if(b===void 0)continue;if(b===null||typeof b!="object")throw new TypeError("Object expected");(d=a(b.get))&&(f.get=d),(d=a(b.set))&&(f.set=d),(d=a(b.init))&&i.unshift(d)}else(d=a(b))&&(u==="field"?i.unshift(d):f[c]=d)}l&&Object.defineProperty(l,n.name,f),_=!0}function aht(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function uht(e){return typeof e=="symbol"?e:"".concat(e)}function cht(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function ile(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function sle(e,t,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return s(i,"adopt"),new(r||(r=Promise))(function(o,a){function u(f){try{l(n.next(f))}catch(d){a(d)}}s(u,"fulfilled");function c(f){try{l(n.throw(f))}catch(d){a(d)}}s(c,"rejected");function l(f){f.done?o(f.value):i(f.value).then(u,c)}s(l,"step"),l((n=n.apply(e,t||[])).next())})}function ole(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(l){return function(f){return c([l,f])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(r=0)),r;)try{if(n=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1],o=l;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(l);break}o[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(f){l=[6,f],i=0}finally{n=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function ale(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Y1(t,e,r)}function W1(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ok(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function ule(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ok(arguments[t]));return e}function cle(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var o=arguments[t],a=0,u=o.length;a<u;a++,i++)n[i]=o[a];return n}function lle(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function E_(e){return this instanceof E_?(this.v=e,this):new E_(e)}function fle(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,o=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(_){n[_]&&(i[_]=function(m){return new Promise(function(g,y){o.push([_,m,g,y])>1||u(_,m)})})}function u(_,m){try{c(n[_](m))}catch(g){d(o[0][3],g)}}function c(_){_.value instanceof E_?Promise.resolve(_.value.v).then(l,f):d(o[0][2],_)}function l(_){u("next",_)}function f(_){u("throw",_)}function d(_,m){_(m),o.shift(),o.length&&u(o[0][0],o[0][1])}}function dle(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,o){t[i]=e[i]?function(a){return(r=!r)?{value:E_(e[i](a)),done:!1}:o?o(a):a}:o}}function ple(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof W1=="function"?W1(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=e[o]&&function(a){return new Promise(function(u,c){a=e[o](a),i(u,c,a.done,a.value)})}}function i(o,a,u,c){Promise.resolve(c).then(function(l){o({value:l,done:u})},a)}}function hle(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function mle(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Y1(t,e,r);return lht(t,e),t}function _le(e){return e&&e.__esModule?e:{default:e}}function gle(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function yle(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r}function Ele(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function ble(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if(typeof n!="function")throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}function Sle(e){function t(n){e.error=e.hasError?new fht(n,e.error,"An error was suppressed during disposal."):n,e.hasError=!0}s(t,"fail");function r(){for(;e.stack.length;){var n=e.stack.pop();try{var i=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(i).then(r,function(o){return t(o),r()})}catch(o){t(o)}}if(e.hasError)throw e.error}return s(r,"next"),r()}var vk,K1,Y1,lht,fht,dht,at=nhe(()=>{vk=s(function(e,t){return vk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},vk(e,t)},"extendStatics");s(ele,"__extends");K1=s(function(){return K1=Object.assign||s(function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},"__assign"),K1.apply(this,arguments)},"__assign");s(tle,"__rest");s(rle,"__decorate");s(nle,"__param");s(oht,"__esDecorate");s(aht,"__runInitializers");s(uht,"__propKey");s(cht,"__setFunctionName");s(ile,"__metadata");s(sle,"__awaiter");s(ole,"__generator");Y1=Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]};s(ale,"__exportStar");s(W1,"__values");s(Ok,"__read");s(ule,"__spread");s(cle,"__spreadArrays");s(lle,"__spreadArray");s(E_,"__await");s(fle,"__asyncGenerator");s(dle,"__asyncDelegator");s(ple,"__asyncValues");s(hle,"__makeTemplateObject");lht=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};s(mle,"__importStar");s(_le,"__importDefault");s(gle,"__classPrivateFieldGet");s(yle,"__classPrivateFieldSet");s(Ele,"__classPrivateFieldIn");s(ble,"__addDisposableResource");fht=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};s(Sle,"__disposeResources");dht={__extends:ele,__assign:K1,__rest:tle,__decorate:rle,__param:nle,__metadata:ile,__awaiter:sle,__generator:ole,__createBinding:Y1,__exportStar:ale,__values:W1,__read:Ok,__spread:ule,__spreadArrays:cle,__spreadArray:lle,__await:E_,__asyncGenerator:fle,__asyncDelegator:dle,__asyncValues:ple,__makeTemplateObject:hle,__importStar:mle,__importDefault:_le,__classPrivateFieldGet:gle,__classPrivateFieldSet:yle,__classPrivateFieldIn:Ele,__addDisposableResource:ble,__disposeResources:Sle}});var Ole=h((X2t,vle)=>{var b_=1e3,S_=b_*60,v_=S_*60,Gd=v_*24,pht=Gd*7,hht=Gd*365.25;vle.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return mht(e);if(r==="number"&&isFinite(e))return t.long?ght(e):_ht(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function mht(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*hht;case"weeks":case"week":case"w":return r*pht;case"days":case"day":case"d":return r*Gd;case"hours":case"hour":case"hrs":case"hr":case"h":return r*v_;case"minutes":case"minute":case"mins":case"min":case"m":return r*S_;case"seconds":case"second":case"secs":case"sec":case"s":return r*b_;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}s(mht,"parse");function _ht(e){var t=Math.abs(e);return t>=Gd?Math.round(e/Gd)+"d":t>=v_?Math.round(e/v_)+"h":t>=S_?Math.round(e/S_)+"m":t>=b_?Math.round(e/b_)+"s":e+"ms"}s(_ht,"fmtShort");function ght(e){var t=Math.abs(e);return t>=Gd?J1(e,t,Gd,"day"):t>=v_?J1(e,t,v_,"hour"):t>=S_?J1(e,t,S_,"minute"):t>=b_?J1(e,t,b_,"second"):e+" ms"}s(ght,"fmtLong");function J1(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}s(J1,"plural")});var Pk=h((Z2t,Ple)=>{function yht(e){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=i,r.enabled=a,r.humanize=Ole(),r.destroy=l,Object.keys(e).forEach(f=>{r[f]=e[f]}),r.names=[],r.skips=[],r.formatters={};function t(f){let d=0;for(let _=0;_<f.length;_++)d=(d<<5)-d+f.charCodeAt(_),d|=0;return r.colors[Math.abs(d)%r.colors.length]}s(t,"selectColor"),r.selectColor=t;function r(f){let d,_=null,m,g;function y(...b){if(!y.enabled)return;let E=y,v=Number(new Date),O=v-(d||v);E.diff=O,E.prev=d,E.curr=v,d=v,b[0]=r.coerce(b[0]),typeof b[0]!="string"&&b.unshift("%O");let I=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,(j,F)=>{if(j==="%%")return"%";I++;let K=r.formatters[F];if(typeof K=="function"){let H=b[I];j=K.call(E,H),b.splice(I,1),I--}return j}),r.formatArgs.call(E,b),(E.log||r.log).apply(E,b)}return s(y,"debug"),y.namespace=f,y.useColors=r.useColors(),y.color=r.selectColor(f),y.extend=n,y.destroy=r.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:()=>_!==null?_:(m!==r.namespaces&&(m=r.namespaces,g=r.enabled(f)),g),set:b=>{_=b}}),typeof r.init=="function"&&r.init(y),y}s(r,"createDebug");function n(f,d){let _=r(this.namespace+(typeof d>"u"?":":d)+f);return _.log=this.log,_}s(n,"extend");function i(f){r.save(f),r.namespaces=f,r.names=[],r.skips=[];let d,_=(typeof f=="string"?f:"").split(/[\s,]+/),m=_.length;for(d=0;d<m;d++)_[d]&&(f=_[d].replace(/\*/g,".*?"),f[0]==="-"?r.skips.push(new RegExp("^"+f.slice(1)+"$")):r.names.push(new RegExp("^"+f+"$")))}s(i,"enable");function o(){let f=[...r.names.map(u),...r.skips.map(u).map(d=>"-"+d)].join(",");return r.enable(""),f}s(o,"disable");function a(f){if(f[f.length-1]==="*")return!0;let d,_;for(d=0,_=r.skips.length;d<_;d++)if(r.skips[d].test(f))return!1;for(d=0,_=r.names.length;d<_;d++)if(r.names[d].test(f))return!0;return!1}s(a,"enabled");function u(f){return f.toString().substring(2,f.toString().length-2).replace(/\.\*\?$/,"*")}s(u,"toNamespace");function c(f){return f instanceof Error?f.stack||f.message:f}s(c,"coerce");function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return s(l,"destroy"),r.enable(r.load()),r}s(yht,"setup");Ple.exports=yht});var Ile=h((Yi,X1)=>{Yi.formatArgs=bht;Yi.save=Sht;Yi.load=vht;Yi.useColors=Eht;Yi.storage=Oht();Yi.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Yi.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Eht(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}s(Eht,"useColors");function bht(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+X1.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),e.splice(n,0,t)}s(bht,"formatArgs");Yi.log=console.debug||console.log||(()=>{});function Sht(e){try{e?Yi.storage.setItem("debug",e):Yi.storage.removeItem("debug")}catch{}}s(Sht,"save");function vht(){let e;try{e=Yi.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}s(vht,"load");function Oht(){try{return localStorage}catch{}}s(Oht,"localstorage");X1.exports=Pk()(Yi);var{formatters:Pht}=X1.exports;Pht.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Tle=h((rFt,wle)=>{"use strict";wle.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n<i)}});var Rle=h((nFt,Ale)=>{"use strict";var Iht=require("os"),Nle=require("tty"),Fs=Tle(),{env:Vr}=process,Q1;Fs("no-color")||Fs("no-colors")||Fs("color=false")||Fs("color=never")?Q1=0:(Fs("color")||Fs("colors")||Fs("color=true")||Fs("color=always"))&&(Q1=1);function wht(){if("FORCE_COLOR"in Vr)return Vr.FORCE_COLOR==="true"?1:Vr.FORCE_COLOR==="false"?0:Vr.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Vr.FORCE_COLOR,10),3)}s(wht,"envForceColor");function Tht(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}s(Tht,"translateLevel");function Nht(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=wht();n!==void 0&&(Q1=n);let i=r?Q1:n;if(i===0)return 0;if(r){if(Fs("color=16m")||Fs("color=full")||Fs("color=truecolor"))return 3;if(Fs("color=256"))return 2}if(e&&!t&&i===void 0)return 0;let o=i||0;if(Vr.TERM==="dumb")return o;if(process.platform==="win32"){let a=Iht.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in Vr)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(a=>a in Vr)||Vr.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in Vr)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Vr.TEAMCITY_VERSION)?1:0;if(Vr.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Vr){let a=Number.parseInt((Vr.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Vr.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Vr.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Vr.TERM)||"COLORTERM"in Vr?1:o}s(Nht,"supportsColor");function Ik(e,t={}){let r=Nht(e,{streamIsTTY:e&&e.isTTY,...t});return Tht(r)}s(Ik,"getSupportLevel");Ale.exports={supportsColor:Ik,stdout:Ik({isTTY:Nle.isatty(1)}),stderr:Ik({isTTY:Nle.isatty(2)})}});var $le=h((cn,eN)=>{var Aht=require("tty"),Z1=require("util");cn.init=Mht;cn.log=Dht;cn.formatArgs=Cht;cn.save=Lht;cn.load=jht;cn.useColors=Rht;cn.destroy=Z1.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");cn.colors=[6,2,3,4,5,1];try{let e=Rle();e&&(e.stderr||e).level>=2&&(cn.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}cn.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(i,o)=>o.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function Rht(){return"colors"in cn.inspectOpts?!!cn.inspectOpts.colors:Aht.isatty(process.stderr.fd)}s(Rht,"useColors");function Cht(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${i};1m${t} \x1B[0m`;e[0]=o+e[0].split(`
|
|
307
307
|
`).join(`
|
|
308
308
|
`+o),e.push(i+"m+"+eN.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=$ht()+t+" "+e[0]}s(Cht,"formatArgs");function $ht(){return cn.inspectOpts.hideDate?"":new Date().toISOString()+" "}s($ht,"getDate");function Dht(...e){return process.stderr.write(Z1.format(...e)+`
|
|
309
309
|
`)}s(Dht,"log");function Lht(e){e?process.env.DEBUG=e:delete process.env.DEBUG}s(Lht,"save");function jht(){return process.env.DEBUG}s(jht,"load");function Mht(e){e.inspectOpts={};let t=Object.keys(cn.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=cn.inspectOpts[t[r]]}s(Mht,"init");eN.exports=Pk()(cn);var{formatters:Cle}=eN.exports;Cle.o=function(e){return this.inspectOpts.colors=this.useColors,Z1.inspect(e,this.inspectOpts).split(`
|
|
@@ -311,7 +311,7 @@ ${n.message}`:y,S=[E,t,e].filter(Boolean).join(`
|
|
|
311
311
|
=== buffer[%d] ===`,r);for(let i=0;i<r;i+=16){n+=`
|
|
312
312
|
${O_(i.toString(16),8)}: `;let o="",a;for(a=0;a<16&&i+a<t.byteLength;a++){let u=t[i+a];n+=`${O_(u.toString(16),2)} `,o+=u>31&&u<255?String.fromCharCode(u):"\xB7",a===7&&(n+=" ")}n+=`${Mle((17-a)*3," ")}${o}`}return n+=`
|
|
313
313
|
`,r!==t.byteLength&&(n+=Tk(`=== (truncated %d bytes) ===
|
|
314
|
-
`,t.byteLength-r)),n}s(Zht,"dumpBuffer");Yt.dumpBuffer=Zht;function emt(e){let t=e.length,r=new Uint8Array(new ArrayBuffer(t*4)),n=0;for(let i=0;i<t;i++){let o=e.charCodeAt(i);if(o<=127)r[n++]=o;else if(o<=2047)r[n++]=192|o>>>6,r[n++]=128|o>>>0&63;else if(o<=55295||o>=57344)r[n++]=224|o>>>12,r[n++]=128|o>>>6&63,r[n++]=128|o>>>0&63;else{if(i+1>=t)throw new RangeError(rl.RANGE_INVALID_UTF8);let a=o-55296,u=e.charCodeAt(++i)-56320,c=(a<<10|u)+65536;r[n++]=240|c>>>18,r[n++]=128|c>>>12&63,r[n++]=128|c>>>6&63,r[n++]=128|c>>>0&63}}return r.subarray(0,n)}s(emt,"encodeUtf8");Yt.encodeUtf8=emt;function Tk(e,...t){let r=e.length,n,i=0,o,a=!1,u=0,c=!1,l,f="";function d(){return t[i++]}s(d,"nextArg");function _(){let m="";for(;/\d/.test(e[u]);)m+=e[u++],o=e[u];return m.length>0?parseInt(m,10):null}for(s(_,"slurpNumber");u<r;++u)if(o=e[u],a)switch(a=!1,o==="."?(c=!1,o=e[++u]):o==="0"&&e[u+1]==="."?(c=!0,u+=2,o=e[u]):c=!0,l=_(),o){case"a":f+="0x"+O_(parseInt(String(d()),10).toString(16),8);break;case"b":f+=parseInt(String(d()),10).toString(2);break;case"c":n=d(),typeof n=="string"||n instanceof String?f+=n:f+=String.fromCharCode(parseInt(String(n),10));break;case"d":f+=parseInt(String(d()),10);break;case"f":{let m=parseFloat(String(d())).toFixed(l||6);f+=c?m:m.replace(/^0/,"");break}case"j":f+=JSON.stringify(d());break;case"o":f+="0"+parseInt(String(d()),10).toString(8);break;case"s":f+=d();break;case"x":f+="0x"+parseInt(String(d()),10).toString(16);break;case"X":f+="0x"+parseInt(String(d()),10).toString(16).toUpperCase();break;default:f+=o;break}else o==="%"?a=!0:f+=o;return f}s(Tk,"format");Yt.format=Tk;function tmt(e){return e}s(tmt,"identity");Yt.identity=tmt;function O_(e,t,r="0"){return e.length>=t?e:new Array(t-e.length+1).join(r)+e}s(O_,"pad");Yt.pad=O_;function rmt(e){return e+7&-8}s(rmt,"padToWord");Yt.padToWord=rmt;function Mle(e,t){let r="",n=e,i=t;if(n<1||n>Number.MAX_VALUE)return r;do n%2&&(r+=i),n=Math.floor(n/2),n&&(i+=i);while(n);return r}s(Mle,"repeat");Yt.repeat=Mle;var rN=s(e=>parseInt(String(e)).toString(16),"hex");ZE.default.formatters.h=rN;ZE.default.formatters.x=e=>`0x${rN(e)}`;ZE.default.formatters.a=e=>`0x${O_(rN(e),8)}`;ZE.default.formatters.X=e=>`0x${rN(e).toUpperCase()}`});var tb=h(eb=>{"use strict";Object.defineProperty(eb,"__esModule",{value:!0});eb.ArenaKind=void 0;var nmt;(function(e){e[e.SINGLE_SEGMENT=0]="SINGLE_SEGMENT",e[e.MULTI_SEGMENT=1]="MULTI_SEGMENT"})(nmt=eb.ArenaKind||(eb.ArenaKind={}))});var Ak=h(nN=>{"use strict";Object.defineProperty(nN,"__esModule",{value:!0});nN.ArenaAllocationResult=void 0;var imt=(at(),ct(ot)),smt=imt.__importDefault(mt()),Ule=smt.default("capnp:serialization:arena:arena-allocation-result");Ule("load");var Nk=class{static{s(this,"ArenaAllocationResult")}constructor(t,r){this.id=t,this.buffer=r,Ule("new",this)}};nN.ArenaAllocationResult=Nk});var $k=h(wa=>{"use strict";Object.defineProperty(wa,"__esModule",{value:!0});wa.getNumSegments=wa.getBuffer=wa.allocate=wa.MultiSegmentArena=void 0;var omt=(at(),ct(ot)),amt=omt.__importDefault(mt()),umt=Ji(),cmt=Qn(),Rk=Ni(),lmt=Ak(),fmt=tb(),xle=amt.default("capnp:arena:multi");xle("load");var P_=class{static{s(this,"MultiSegmentArena")}constructor(t=[]){this.kind=fmt.ArenaKind.MULTI_SEGMENT,this.buffers=t,xle("new %s",this)}toString(){return Rk.format("MultiSegmentArena_segments:%d",Ck(this))}};wa.MultiSegmentArena=P_;P_.allocate=qle;P_.getBuffer=Fle;P_.getNumSegments=Ck;function qle(e,t){let r=new ArrayBuffer(Rk.padToWord(Math.max(e,umt.DEFAULT_BUFFER_SIZE)));return t.buffers.push(r),new lmt.ArenaAllocationResult(t.buffers.length-1,r)}s(qle,"allocate");wa.allocate=qle;function Fle(e,t){if(e<0||e>=t.buffers.length)throw new Error(Rk.format(cmt.SEG_ID_OUT_OF_BOUNDS,e));return t.buffers[e]}s(Fle,"getBuffer");wa.getBuffer=Fle;function Ck(e){return e.buffers.length}s(Ck,"getNumSegments");wa.getNumSegments=Ck});var jk=h(Ta=>{"use strict";Object.defineProperty(Ta,"__esModule",{value:!0});Ta.getNumSegments=Ta.getBuffer=Ta.allocate=Ta.SingleSegmentArena=void 0;var dmt=(at(),ct(ot)),pmt=dmt.__importDefault(mt()),Dk=Ji(),kle=Qn(),iN=Ni(),hmt=Ak(),mmt=tb(),Lk=pmt.default("capnp:arena:single");Lk("load");var I_=class{static{s(this,"SingleSegmentArena")}constructor(t=new ArrayBuffer(Dk.DEFAULT_BUFFER_SIZE)){if(this.kind=mmt.ArenaKind.SINGLE_SEGMENT,t.byteLength&7)throw new Error(iN.format(kle.SEG_NOT_WORD_ALIGNED,t.byteLength));this.buffer=t,Lk("new %s",this)}toString(){return iN.format("SingleSegmentArena_len:%x",this.buffer.byteLength)}};Ta.SingleSegmentArena=I_;I_.allocate=Ble;I_.getBuffer=Gle;I_.getNumSegments=Vle;function Ble(e,t,r){Lk("Allocating %x bytes for segment 0 in %s.",e,r);let n=t.length>0?t[0].buffer:r.buffer;return e<Dk.MIN_SINGLE_SEGMENT_GROWTH?e=Dk.MIN_SINGLE_SEGMENT_GROWTH:e=iN.padToWord(e),r.buffer=new ArrayBuffer(n.byteLength+e),new Float64Array(r.buffer).set(new Float64Array(n)),new hmt.ArenaAllocationResult(0,r.buffer)}s(Ble,"allocate");Ta.allocate=Ble;function Gle(e,t){if(e!==0)throw new Error(iN.format(kle.SEG_GET_NON_ZERO_SINGLE,e));return t.buffer}s(Gle,"getBuffer");Ta.getBuffer=Gle;function Vle(){return 1}s(Vle,"getNumSegments");Ta.getNumSegments=Vle});var Wle=h(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.getNumSegments=Na.getBuffer=Na.allocate=Na.Arena=void 0;var _mt=(at(),ct(ot)),gmt=_mt.__importDefault(mt()),Mk=Qn(),w_=tb(),Uk=$k(),xk=jk(),ymt=gmt.default("capnp:arena");ymt("load");var T_=class{static{s(this,"Arena")}};Na.Arena=T_;T_.allocate=zle;T_.getBuffer=Hle;T_.getNumSegments=Kle;function zle(e,t,r){switch(r.kind){case w_.ArenaKind.MULTI_SEGMENT:return Uk.MultiSegmentArena.allocate(e,r);case w_.ArenaKind.SINGLE_SEGMENT:return xk.SingleSegmentArena.allocate(e,t,r);default:return Mk.assertNever(r)}}s(zle,"allocate");Na.allocate=zle;function Hle(e,t){switch(t.kind){case w_.ArenaKind.MULTI_SEGMENT:return Uk.MultiSegmentArena.getBuffer(e,t);case w_.ArenaKind.SINGLE_SEGMENT:return xk.SingleSegmentArena.getBuffer(e,t);default:return Mk.assertNever(t)}}s(Hle,"getBuffer");Na.getBuffer=Hle;function Kle(e){switch(e.kind){case w_.ArenaKind.MULTI_SEGMENT:return Uk.MultiSegmentArena.getNumSegments(e);case w_.ArenaKind.SINGLE_SEGMENT:return xk.SingleSegmentArena.getNumSegments();default:return Mk.assertNever(e)}}s(Kle,"getNumSegments");Na.getNumSegments=Kle});var Yle=h(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});Aa.SingleSegmentArena=Aa.MultiSegmentArena=Aa.ArenaKind=Aa.Arena=void 0;var Emt=Wle();Object.defineProperty(Aa,"Arena",{enumerable:!0,get:function(){return Emt.Arena}});var bmt=tb();Object.defineProperty(Aa,"ArenaKind",{enumerable:!0,get:function(){return bmt.ArenaKind}});var Smt=$k();Object.defineProperty(Aa,"MultiSegmentArena",{enumerable:!0,get:function(){return Smt.MultiSegmentArena}});var vmt=jk();Object.defineProperty(Aa,"SingleSegmentArena",{enumerable:!0,get:function(){return vmt.SingleSegmentArena}})});var tfe=h(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});Ai.unpack=Ai.pack=Ai.getZeroByteCount=Ai.getUnpackedByteLength=Ai.getTagByte=Ai.getHammingWeight=void 0;var Jle=Ji(),Omt=Qn();function Xle(e){let t=e-(e>>1&1431655765);return t=(t&858993459)+(t>>2&858993459),(t+(t>>4)&252645135)*16843009>>24}s(Xle,"getHammingWeight");Ai.getHammingWeight=Xle;function Qle(e,t,r,n,i,o,a,u){return(e===0?0:1)|(t===0?0:2)|(r===0?0:4)|(n===0?0:8)|(i===0?0:16)|(o===0?0:32)|(a===0?0:64)|(u===0?0:128)}s(Qle,"getTagByte");Ai.getTagByte=Qle;function Zle(e){let t=new Uint8Array(e),r=0,n=119;for(let i=0;i<t.byteLength;){let o=t[i];n===0?(r+=o,i++,n=119):n===255?(r+=o,i+=o*8+1,n=119):(r++,i+=Xle(o)+1,n=o)}return r*8}s(Zle,"getUnpackedByteLength");Ai.getUnpackedByteLength=Zle;function efe(e,t,r,n,i,o,a,u){return(e===0?1:0)+(t===0?1:0)+(r===0?1:0)+(n===0?1:0)+(i===0?1:0)+(o===0?1:0)+(a===0?1:0)+(u===0?1:0)}s(efe,"getZeroByteCount");Ai.getZeroByteCount=efe;function Pmt(e,t=0,r){if(e.byteLength%8!==0)throw new Error(Omt.MSG_PACK_NOT_WORD_ALIGNED);let n=new Uint8Array(e,t,r),i=[],o=119,a=NaN,u=0,c=Jle.PACK_SPAN_THRESHOLD;for(let l=0;l<n.byteLength;l+=8){let f=n[l],d=n[l+1],_=n[l+2],m=n[l+3],g=n[l+4],y=n[l+5],b=n[l+6],E=n[l+7],S=Qle(f,d,_,m,g,y,b,E),O=!0;switch(o){case 0:S!==0||u>=255?(i.push(u),u=0,O=!1):u++;break;case 255:{let I=efe(f,d,_,m,g,y,b,E);c-=I,c<=0||u>=255?(i[a]=u,u=0,c=Jle.PACK_SPAN_THRESHOLD,O=!1):(i.push(f,d,_,m,g,y,b,E),u++);break}default:O=!1;break}O||(i.push(S),o=S,f!==0&&i.push(f),d!==0&&i.push(d),_!==0&&i.push(_),m!==0&&i.push(m),g!==0&&i.push(g),y!==0&&i.push(y),b!==0&&i.push(b),E!==0&&i.push(E),S===255&&(a=i.length,i.push(0)))}return o===0?i.push(u):o===255&&(i[a]=u),new Uint8Array(i).buffer}s(Pmt,"pack");Ai.pack=Pmt;function Imt(e){let t=new Uint8Array(e),r=new Uint8Array(new ArrayBuffer(Zle(e))),n=119;for(let i=0,o=0;i<t.byteLength;){let a=t[i];if(n===0)o+=a*8,i++,n=119;else if(n===255){let u=a*8;r.set(t.subarray(i+1,i+1+u),o),o+=u,i+=1+u,n=119}else{i++;for(let u=1;u<=128;u<<=1)a&u&&(r[o]=t[i++]),o++;n=a}}return r.buffer}s(Imt,"unpack");Ai.unpack=Imt});var zd=h(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});ks.padToWord=ks.getWordLength=ks.getDataWordLength=ks.getByteLength=ks.ObjectSize=void 0;var rfe=(at(),ct(ot)),wmt=rfe.__importDefault(mt()),nfe=rfe.__importStar(Ni()),Tmt=wmt.default("capnp:object-size");Tmt("load");var sN=class{static{s(this,"ObjectSize")}constructor(t,r){this.dataByteLength=t,this.pointerLength=r}toString(){return nfe.format("ObjectSize_dw:%d,pc:%d",ife(this),this.pointerLength)}};ks.ObjectSize=sN;function Nmt(e){return e.dataByteLength+e.pointerLength*8}s(Nmt,"getByteLength");ks.getByteLength=Nmt;function ife(e){return e.dataByteLength/8}s(ife,"getDataWordLength");ks.getDataWordLength=ife;function Amt(e){return e.dataByteLength/8+e.pointerLength}s(Amt,"getWordLength");ks.getWordLength=Amt;function Rmt(e){return new sN(nfe.padToWord(e.dataByteLength),e.pointerLength)}s(Rmt,"padToWord");ks.padToWord=Rmt});var Hd=h(rb=>{"use strict";Object.defineProperty(rb,"__esModule",{value:!0});rb.PointerType=void 0;var Cmt;(function(e){e[e.STRUCT=0]="STRUCT",e[e.LIST=1]="LIST",e[e.FAR=2]="FAR",e[e.OTHER=3]="OTHER"})(Cmt=rb.PointerType||(rb.PointerType={}))});var kk=h(aN=>{"use strict";Object.defineProperty(aN,"__esModule",{value:!0});aN.Orphan=void 0;var $mt=(at(),ct(ot)),Dmt=$mt.__importDefault(mt()),oN=Qn(),qk=Ni(),sfe=cr(),Lmt=zd(),Ri=Jt(),nl=Hd(),ofe=Dmt.default("capnp:orphan");ofe("load");var Fk=class{static{s(this,"Orphan")}constructor(t){let r=Ri.getContent(t);switch(this.segment=r.segment,this.byteOffset=r.byteOffset,this._capnp={},this._capnp.type=Ri.getTargetPointerType(t),this._capnp.type){case nl.PointerType.STRUCT:this._capnp.size=Ri.getTargetStructSize(t);break;case nl.PointerType.LIST:this._capnp.length=Ri.getTargetListLength(t),this._capnp.elementSize=Ri.getTargetListElementSize(t),this._capnp.elementSize===sfe.ListElementSize.COMPOSITE&&(this._capnp.size=Ri.getTargetCompositeListSize(t));break;case nl.PointerType.OTHER:this._capnp.capId=Ri.getCapabilityId(t);break;default:throw new Error(oN.PTR_INVALID_POINTER_TYPE)}Ri.erasePointer(t)}_moveTo(t){if(this._capnp===void 0)throw new Error(qk.format(oN.PTR_ALREADY_ADOPTED,this));if(this.segment.message!==t.segment.message)throw new Error(qk.format(oN.PTR_ADOPT_WRONG_MESSAGE,this,t));Ri.erase(t);let r=Ri.initPointer(this.segment,this.byteOffset,t);switch(this._capnp.type){case nl.PointerType.STRUCT:Ri.setStructPointer(r.offsetWords,this._capnp.size,r.pointer);break;case nl.PointerType.LIST:{let n=r.offsetWords;this._capnp.elementSize===sfe.ListElementSize.COMPOSITE&&n--,Ri.setListPointer(n,this._capnp.elementSize,this._capnp.length,r.pointer,this._capnp.size);break}case nl.PointerType.OTHER:Ri.setInterfacePointer(this._capnp.capId,r.pointer);break;default:throw new Error(oN.PTR_INVALID_POINTER_TYPE)}this._capnp=void 0}dispose(){if(this._capnp===void 0){ofe("not disposing an already disposed orphan",this);return}switch(this._capnp.type){case nl.PointerType.STRUCT:this.segment.fillZeroWords(this.byteOffset,Lmt.getWordLength(this._capnp.size));break;case nl.PointerType.LIST:{let t=Ri.getListByteLength(this._capnp.elementSize,this._capnp.length,this._capnp.size);this.segment.fillZeroWords(this.byteOffset,t);break}default:break}this._capnp=void 0}toString(){return qk.format("Orphan_%d@%a,type:%s",this.segment.id,this.byteOffset,this._capnp&&this._capnp.type)}};aN.Orphan=Fk});var afe=h(uN=>{"use strict";Object.defineProperty(uN,"__esModule",{value:!0});uN.PointerAllocationResult=void 0;var jmt=(at(),ct(ot)),Mmt=jmt.__importDefault(mt()),Umt=Mmt.default("capnp:pointer-allocation-result");Umt("load");var Bk=class{static{s(this,"PointerAllocationResult")}constructor(t,r){this.pointer=t,this.offsetWords=r}};uN.PointerAllocationResult=Bk});var Jt=h(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.trackPointerAllocation=V.copyFromStruct=V.copyFromList=V.validate=V.setStructPointer=V.setListPointer=V.setInterfacePointer=V.setFarPointer=V.relocateTo=V.isNull=V.isDoubleFar=V.initPointer=V.getTargetStructSize=V.getTargetPointerType=V.getTargetListLength=V.getTargetListElementSize=V.getTargetCompositeListSize=V.getTargetCompositeListTag=V.getStructSize=V.getStructPointerLength=V.getStructDataWords=V.getPointerType=V.getOffsetWords=V.getListLength=V.getListElementSize=V.getFarSegmentId=V.getContent=V.getCapabilityId=V.followFars=V.followFar=V.erasePointer=V.erase=V.copyFrom=V.add=V.getListElementByteLength=V.getListByteLength=V.dump=V.disown=V.adopt=V.Pointer=void 0;var xmt=(at(),ct(ot)),qmt=xmt.__importDefault(mt()),R_=Ji(),ln=Ni(),Ht=cr(),Xi=zd(),Fmt=kk(),Gk=afe(),Ci=Hd(),Zn=Qn(),N_=qmt.default("capnp:pointer");N_("load");var yr=class{static{s(this,"Pointer")}constructor(t,r,n=R_.MAX_DEPTH){if(this._capnp={compositeList:!1,depthLimit:n},this.segment=t,this.byteOffset=r,n===0)throw new Error(ln.format(Zn.PTR_DEPTH_LIMIT_EXCEEDED,this));if(Efe(t.message,this),r<0||r>t.byteLength)throw new Error(ln.format(Zn.PTR_OFFSET_OUT_OF_BOUNDS,r));N_("new %s",this)}toString(){return ln.format("Pointer_%d@%a,%s,limit:%x",this.segment.id,this.byteOffset,zk(this),this._capnp.depthLimit)}};V.Pointer=yr;yr.adopt=ufe;yr.copyFrom=nb;yr.disown=cfe;yr.dump=zk;yr.isNull=ob;yr._capnp={displayName:"Pointer"};function ufe(e,t){e._moveTo(t)}s(ufe,"adopt");V.adopt=ufe;function cfe(e){return new Fmt.Orphan(e)}s(cfe,"disown");V.disown=cfe;function zk(e){return ln.bufferToHex(e.segment.buffer.slice(e.byteOffset,e.byteOffset+8))}s(zk,"dump");V.dump=zk;function kmt(e,t,r){switch(e){case Ht.ListElementSize.BIT:return ln.padToWord(t+7>>>3);case Ht.ListElementSize.BYTE:case Ht.ListElementSize.BYTE_2:case Ht.ListElementSize.BYTE_4:case Ht.ListElementSize.BYTE_8:case Ht.ListElementSize.POINTER:case Ht.ListElementSize.VOID:return ln.padToWord(lN(e)*t);case Ht.ListElementSize.COMPOSITE:if(r===void 0)throw new Error(ln.format(Zn.PTR_INVALID_LIST_SIZE,NaN));return t*ln.padToWord(Xi.getByteLength(r));default:throw new Error(Zn.PTR_INVALID_LIST_SIZE)}}s(kmt,"getListByteLength");V.getListByteLength=kmt;function lN(e){switch(e){case Ht.ListElementSize.BIT:return NaN;case Ht.ListElementSize.BYTE:return 1;case Ht.ListElementSize.BYTE_2:return 2;case Ht.ListElementSize.BYTE_4:return 4;case Ht.ListElementSize.BYTE_8:case Ht.ListElementSize.POINTER:return 8;case Ht.ListElementSize.COMPOSITE:return NaN;case Ht.ListElementSize.VOID:return 0;default:throw new Error(ln.format(Zn.PTR_INVALID_LIST_SIZE,e))}}s(lN,"getListElementByteLength");V.getListElementByteLength=lN;function Vk(e,t){return new yr(t.segment,t.byteOffset+e,t._capnp.depthLimit)}s(Vk,"add");V.add=Vk;function nb(e,t){if(t.segment===e.segment&&t.byteOffset===e.byteOffset){N_("ignoring copy operation from identical pointer %s",e);return}if(A_(t),!ob(e))switch(D_(e)){case Ci.PointerType.STRUCT:yfe(e,t);break;case Ci.PointerType.LIST:gfe(e,t);break;default:throw new Error(ln.format(Zn.PTR_INVALID_POINTER_TYPE,D_(t)))}}s(nb,"copyFrom");V.copyFrom=nb;function A_(e){if(ob(e))return;let t;switch(D_(e)){case Ci.PointerType.STRUCT:{let r=Jk(e);t=C_(e),t.segment.fillZeroWords(t.byteOffset,r.dataByteLength/8);for(let n=0;n<r.pointerLength;n++)A_(Vk(n*8,t));break}case Ci.PointerType.LIST:{let r=dN(e),n=Yk(e),i=ln.padToWord(n*lN(r));if(t=C_(e),r===Ht.ListElementSize.POINTER){for(let o=0;o<n;o++)A_(new yr(t.segment,t.byteOffset+o*8,e._capnp.depthLimit-1));break}else if(r===Ht.ListElementSize.COMPOSITE){let o=Vk(-8,t),a=sb(o),u=Xi.getByteLength(a);i=$_(o),t.segment.setWordZero(t.byteOffset-8);for(let c=0;c<n;c++)for(let l=0;l<a.pointerLength;l++)A_(new yr(t.segment,t.byteOffset+c*u+l*8,e._capnp.depthLimit-1))}t.segment.fillZeroWords(t.byteOffset,i);break}case Ci.PointerType.OTHER:break;default:throw new Error(ln.format(Zn.PTR_INVALID_POINTER_TYPE,D_(e)))}Hk(e)}s(A_,"erase");V.erase=A_;function Hk(e){if(ib(e)===Ci.PointerType.FAR){let t=fN(e);hN(e)&&t.segment.setWordZero(t.byteOffset+8),t.segment.setWordZero(t.byteOffset)}e.segment.setWordZero(e.byteOffset)}s(Hk,"erasePointer");V.erasePointer=Hk;function fN(e){let t=e.segment.message.getSegment(e.segment.getUint32(e.byteOffset+4)),r=e.segment.getUint32(e.byteOffset)>>>3;return new yr(t,r*8,e._capnp.depthLimit-1)}s(fN,"followFar");V.followFar=fN;function il(e){if(ib(e)===Ci.PointerType.FAR){let t=fN(e);return hN(e)&&(t.byteOffset+=8),t}return e}s(il,"followFars");V.followFars=il;function Bmt(e){return e.segment.getUint32(e.byteOffset+4)}s(Bmt,"getCapabilityId");V.getCapabilityId=Bmt;function Gmt(e){return D_(e)===Ci.PointerType.LIST&&dN(e)===Ht.ListElementSize.COMPOSITE}s(Gmt,"isCompositeList");function C_(e,t){let r;if(hN(e)){let n=fN(e);r=new yr(e.segment.message.getSegment(lfe(n)),$_(n)*8)}else{let n=il(e);r=new yr(n.segment,n.byteOffset+8+$_(n)*8)}return Gmt(e)&&(r.byteOffset+=8),!t&&e._capnp.compositeIndex!==void 0&&(r.byteOffset-=8,r.byteOffset+=8+e._capnp.compositeIndex*Xi.getByteLength(Xi.padToWord(sb(r)))),r}s(C_,"getContent");V.getContent=C_;function lfe(e){return e.segment.getUint32(e.byteOffset+4)}s(lfe,"getFarSegmentId");V.getFarSegmentId=lfe;function Kk(e){return e.segment.getUint32(e.byteOffset+4)&R_.LIST_SIZE_MASK}s(Kk,"getListElementSize");V.getListElementSize=Kk;function ffe(e){return e.segment.getUint32(e.byteOffset+4)>>>3}s(ffe,"getListLength");V.getListLength=ffe;function $_(e){let t=e.segment.getInt32(e.byteOffset);return t&2?t>>3:t>>2}s($_,"getOffsetWords");V.getOffsetWords=$_;function ib(e){return e.segment.getUint32(e.byteOffset)&R_.POINTER_TYPE_MASK}s(ib,"getPointerType");V.getPointerType=ib;function dfe(e){return e.segment.getUint16(e.byteOffset+4)}s(dfe,"getStructDataWords");V.getStructDataWords=dfe;function pfe(e){return e.segment.getUint16(e.byteOffset+6)}s(pfe,"getStructPointerLength");V.getStructPointerLength=pfe;function sb(e){return new Xi.ObjectSize(dfe(e)*8,pfe(e))}s(sb,"getStructSize");V.getStructSize=sb;function Wk(e){let t=C_(e);return t.byteOffset-=8,t}s(Wk,"getTargetCompositeListTag");V.getTargetCompositeListTag=Wk;function hfe(e){return sb(Wk(e))}s(hfe,"getTargetCompositeListSize");V.getTargetCompositeListSize=hfe;function dN(e){return Kk(il(e))}s(dN,"getTargetListElementSize");V.getTargetListElementSize=dN;function Yk(e){let t=il(e);return Kk(t)===Ht.ListElementSize.COMPOSITE?$_(Wk(e)):ffe(t)}s(Yk,"getTargetListLength");V.getTargetListLength=Yk;function D_(e){let t=ib(il(e));if(t===Ci.PointerType.FAR)throw new Error(ln.format(Zn.PTR_INVALID_FAR_TARGET,e));return t}s(D_,"getTargetPointerType");V.getTargetPointerType=D_;function Jk(e){return sb(il(e))}s(Jk,"getTargetStructSize");V.getTargetStructSize=Jk;function pN(e,t,r){if(r.segment!==e){if(N_("Initializing far pointer %s -> %s.",r,e),!e.hasCapacity(8)){let i=r.segment.allocate(16);return N_("GAH! Initializing double-far pointer in %s from %s -> %s.",r,e,i),cN(!0,i.byteOffset/8,i.segment.id,r),cN(!1,t/8,e.id,i),i.byteOffset+=8,new Gk.PointerAllocationResult(i,0)}let n=e.allocate(8);if(n.segment.id!==e.id)throw new Error(Zn.INVARIANT_UNREACHABLE_CODE);return cN(!1,n.byteOffset/8,n.segment.id,r),new Gk.PointerAllocationResult(n,(t-n.byteOffset-8)/8)}return N_("Initializing intra-segment pointer %s -> %a.",r,t),new Gk.PointerAllocationResult(r,(t-r.byteOffset-8)/8)}s(pN,"initPointer");V.initPointer=pN;function hN(e){return ib(e)===Ci.PointerType.FAR&&(e.segment.getUint32(e.byteOffset)&R_.POINTER_DOUBLE_FAR_MASK)!==0}s(hN,"isDoubleFar");V.isDoubleFar=hN;function ob(e){return e.segment.isWordZero(e.byteOffset)}s(ob,"isNull");V.isNull=ob;function Vmt(e,t){let r=il(t),n=r.segment.getUint8(r.byteOffset)&3,i=r.segment.getUint32(r.byteOffset+4);A_(e);let o=pN(r.segment,r.byteOffset+8+$_(r)*8,e);o.pointer.segment.setUint32(o.pointer.byteOffset,n|o.offsetWords<<2),o.pointer.segment.setUint32(o.pointer.byteOffset+4,i),Hk(t)}s(Vmt,"relocateTo");V.relocateTo=Vmt;function cN(e,t,r,n){let i=Ci.PointerType.FAR,o=e?1:0,a=t,u=r;n.segment.setUint32(n.byteOffset,i|o<<2|a<<3),n.segment.setUint32(n.byteOffset+4,u)}s(cN,"setFarPointer");V.setFarPointer=cN;function zmt(e,t){t.segment.setUint32(t.byteOffset,Ci.PointerType.OTHER),t.segment.setUint32(t.byteOffset+4,e)}s(zmt,"setInterfacePointer");V.setInterfacePointer=zmt;function mfe(e,t,r,n,i){let o=Ci.PointerType.LIST,a=e,u=t,c=r;if(t===Ht.ListElementSize.COMPOSITE){if(i===void 0)throw new TypeError(Zn.TYPE_COMPOSITE_SIZE_UNDEFINED);c*=Xi.getWordLength(i)}n.segment.setUint32(n.byteOffset,o|a<<2),n.segment.setUint32(n.byteOffset+4,u|c<<3)}s(mfe,"setListPointer");V.setListPointer=mfe;function _fe(e,t,r){let n=Ci.PointerType.STRUCT,i=e,o=Xi.getDataWordLength(t),a=t.pointerLength;r.segment.setUint32(r.byteOffset,n|i<<2),r.segment.setUint16(r.byteOffset+4,o),r.segment.setUint16(r.byteOffset+6,a)}s(_fe,"setStructPointer");V.setStructPointer=_fe;function Hmt(e,t,r){if(ob(t))return;let n=il(t);if((n.segment.getUint32(n.byteOffset)&R_.POINTER_TYPE_MASK)!==e)throw new Error(ln.format(Zn.PTR_WRONG_POINTER_TYPE,t,e));if(r!==void 0&&(n.segment.getUint32(n.byteOffset+4)&R_.LIST_SIZE_MASK)!==r)throw new Error(ln.format(Zn.PTR_WRONG_LIST_TYPE,t,Ht.ListElementSize[r]))}s(Hmt,"validate");V.validate=Hmt;function gfe(e,t){if(t._capnp.depthLimit<=0)throw new Error(Zn.PTR_DEPTH_LIMIT_EXCEEDED);let r=C_(e),n=dN(e),i=Yk(e),o,a,u;if(n===Ht.ListElementSize.POINTER){u=t.segment.allocate(i<<3);for(let l=0;l<i;l++){let f=new yr(r.segment,r.byteOffset+(l<<3),e._capnp.depthLimit-1),d=new yr(u.segment,u.byteOffset+(l<<3),t._capnp.depthLimit-1);nb(f,d)}}else if(n===Ht.ListElementSize.COMPOSITE){if(o=Xi.padToWord(hfe(e)),a=Xi.getByteLength(o),u=t.segment.allocate(Xi.getByteLength(o)*i+8),u.segment.copyWord(u.byteOffset,r.segment,r.byteOffset-8),o.dataByteLength>0){let l=Xi.getWordLength(o)*i;u.segment.copyWords(u.byteOffset+8,r.segment,r.byteOffset,l)}for(let l=0;l<i;l++)for(let f=0;f<o.pointerLength;f++){let d=l*a+o.dataByteLength+(f<<3),_=new yr(r.segment,r.byteOffset+d,e._capnp.depthLimit-1),m=new yr(u.segment,u.byteOffset+d+8,t._capnp.depthLimit-1);nb(_,m)}}else{let l=ln.padToWord(n===Ht.ListElementSize.BIT?i+7>>>3:lN(n)*i),f=l>>>3;u=t.segment.allocate(l),u.segment.copyWords(u.byteOffset,r.segment,r.byteOffset,f)}let c=pN(u.segment,u.byteOffset,t);mfe(c.offsetWords,n,i,c.pointer,o)}s(gfe,"copyFromList");V.copyFromList=gfe;function yfe(e,t){if(t._capnp.depthLimit<=0)throw new Error(Zn.PTR_DEPTH_LIMIT_EXCEEDED);let r=C_(e),n=Jk(e),i=Xi.getDataWordLength(n),o=t.segment.allocate(Xi.getByteLength(n));o.segment.copyWords(o.byteOffset,r.segment,r.byteOffset,i);for(let u=0;u<n.pointerLength;u++){let c=n.dataByteLength+u*8,l=new yr(r.segment,r.byteOffset+c,e._capnp.depthLimit-1),f=new yr(o.segment,o.byteOffset+c,t._capnp.depthLimit-1);nb(l,f)}if(t._capnp.compositeList)return;let a=pN(o.segment,o.byteOffset,t);_fe(a.offsetWords,n,a.pointer)}s(yfe,"copyFromStruct");V.copyFromStruct=yfe;function Efe(e,t){if(e._capnp.traversalLimit-=8,e._capnp.traversalLimit<=0)throw new Error(ln.format(Zn.PTR_TRAVERSAL_LIMIT_EXCEEDED,t))}s(Efe,"trackPointerAllocation");V.trackPointerAllocation=Efe});var Lr=h(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});Ra.set=Ra.get=Ra.initList=Ra.List=void 0;var Kmt=(at(),ct(ot)),Wmt=Kmt.__importDefault(mt()),bfe=Qn(),Xk=Ni(),wu=cr(),Sfe=zd(),Kd=Jt(),vfe=Wmt.default("capnp:list");vfe("load");var Wd=class extends Kd.Pointer{static{s(this,"List")}static toString(){return this._capnp.displayName}all(t){let r=this.getLength();for(let n=0;n<r;n++)if(!t(this.get(n),n))return!1;return!0}any(t){let r=this.getLength();for(let n=0;n<r;n++)if(t(this.get(n),n))return!0;return!1}ap(t){let r=this.getLength(),n=[];for(let i=0;i<r;i++)n.push(...t.map(o=>o(this.get(i),i)));return n}concat(t){let r=this.getLength(),n=t.getLength(),i=new Array(r+n);for(let o=0;o<r;o++)i[o]=this.get(o);for(let o=0;o<n;o++)i[o+r]=t.get(o);return i}drop(t){let r=this.getLength(),n=new Array(r);for(let i=t;i<r;i++)n[i]=this.get(i);return n}dropWhile(t){let r=this.getLength(),n=[],i=!0;for(let o=0;o<r;o++){let a=this.get(o);i&&(i=t(a,o)),i||n.push(a)}return n}empty(){return[]}every(t){return this.all(t)}filter(t){let r=this.getLength(),n=[];for(let i=0;i<r;i++){let o=this.get(i);t(o,i)&&n.push(o)}return n}find(t){let r=this.getLength();for(let n=0;n<r;n++){let i=this.get(n);if(t(i,n))return i}}findIndex(t){let r=this.getLength();for(let n=0;n<r;n++){let i=this.get(n);if(t(i,n))return n}return-1}forEach(t){let r=this.getLength();for(let n=0;n<r;n++)t(this.get(n),n)}get(t){return Qk(t,this)}getLength(){return Kd.getTargetListLength(this)}groupBy(t){let r=this.getLength(),n={};for(let i=0;i<r;i++){let o=this.get(i);n[t(o,i)]=o}return n}intersperse(t){let r=this.getLength(),n=new Array(r);for(let i=0;i<r;i++)i>0&&n.push(t),n.push(this.get(i));return n}map(t){let r=this.getLength(),n=new Array(r);for(let i=0;i<r;i++)n[i]=t(this.get(i),i);return n}reduce(t,r){let n=0,i;for(r===void 0?(i=this.get(0),n++):i=r;n<this.getLength();n++)i=t(i,this.get(n),n);return i}set(t,r){Zk(t,r,this)}slice(t=0,r){let n=r?Math.min(this.getLength(),r):this.getLength(),i=new Array(n-t);for(let o=t;o<n;o++)i[o]=this.get(o);return i}some(t){return this.any(t)}take(t){let r=Math.min(this.getLength(),t),n=new Array(r);for(let i=0;i<r;i++)n[i]=this.get(i);return n}takeWhile(t){let r=this.getLength(),n=[],i;for(let o=0;o<r;o++){let a=this.get(o);if(i=t(a,o),!i)return n;n.push(a)}return n}toArray(){return this.map(Xk.identity)}toString(){return`List_${super.toString()}`}};Ra.List=Wd;Wd._capnp={displayName:"List<Generic>",size:wu.ListElementSize.VOID};Wd.get=Qk;Wd.initList=Ofe;Wd.set=Zk;function Ofe(e,t,r,n){let i;switch(e){case wu.ListElementSize.BIT:i=r.segment.allocate(Math.ceil(t/8));break;case wu.ListElementSize.BYTE:case wu.ListElementSize.BYTE_2:case wu.ListElementSize.BYTE_4:case wu.ListElementSize.BYTE_8:case wu.ListElementSize.POINTER:i=r.segment.allocate(t*Kd.getListElementByteLength(e));break;case wu.ListElementSize.COMPOSITE:{if(n===void 0)throw new Error(Xk.format(bfe.PTR_COMPOSITE_SIZE_UNDEFINED));n=Sfe.padToWord(n);let a=Sfe.getByteLength(n)*t;i=r.segment.allocate(a+8),Kd.setStructPointer(t,n,i),vfe("Wrote composite tag word %s for %s.",i,r);break}case wu.ListElementSize.VOID:Kd.setListPointer(0,e,t,r);return;default:throw new Error(Xk.format(bfe.PTR_INVALID_LIST_SIZE,e))}let o=Kd.initPointer(i.segment,i.byteOffset,r);Kd.setListPointer(o.offsetWords,e,t,o.pointer,n)}s(Ofe,"initList");Ra.initList=Ofe;function Qk(e,t){throw new TypeError}s(Qk,"get");Ra.get=Qk;function Zk(e,t,r){throw new TypeError}s(Zk,"set");Ra.set=Zk});var L_=h(mN=>{"use strict";Object.defineProperty(mN,"__esModule",{value:!0});mN.PointerList=void 0;var Ymt=(at(),ct(ot)),Jmt=Ymt.__importDefault(mt()),Xmt=cr(),Qmt=Lr(),Pfe=Jt(),Zmt=Jmt.default("capnp:list:composite");Zmt("load");function e_t(e){var t;return t=class extends Qmt.List{static{s(this,"_a")}get(r){let n=Pfe.getContent(this);return new e(n.segment,n.byteOffset+r*8,this._capnp.depthLimit-1)}set(r,n){Pfe.copyFrom(n,this.get(r))}toString(){return`Pointer_${super.toString()},cls:${e.toString()}`}},t._capnp={displayName:`List<${e._capnp.displayName}>`,size:Xmt.ListElementSize.POINTER},t}s(e_t,"PointerList");mN.PointerList=e_t});var Ife=h(_N=>{"use strict";Object.defineProperty(_N,"__esModule",{value:!0});_N.AnyPointerList=void 0;var t_t=Jt(),r_t=L_();_N.AnyPointerList=r_t.PointerList(t_t.Pointer)});var Tfe=h(yN=>{"use strict";Object.defineProperty(yN,"__esModule",{value:!0});yN.BoolList=void 0;var n_t=(at(),ct(ot)),i_t=n_t.__importDefault(mt()),s_t=cr(),o_t=Lr(),wfe=Jt(),a_t=i_t.default("capnp:list:composite");a_t("load");var gN=class extends o_t.List{static{s(this,"BoolList")}get(t){let r=1<<t%8,n=t>>>3,i=wfe.getContent(this);return(i.segment.getUint8(i.byteOffset+n)&r)!==0}set(t,r){let n=1<<t%8,i=wfe.getContent(this),o=i.byteOffset+(t>>>3),a=i.segment.getUint8(o);i.segment.setUint8(o,r?a|n:a&~n)}toString(){return`Bool_${super.toString()}`}};yN.BoolList=gN;gN._capnp={displayName:"List<boolean>",size:s_t.ListElementSize.BIT}});var Nfe=h(EN=>{"use strict";Object.defineProperty(EN,"__esModule",{value:!0});EN.CompositeList=void 0;var u_t=(at(),ct(ot)),c_t=u_t.__importDefault(mt()),l_t=cr(),f_t=Lr(),d_t=Jt(),p_t=c_t.default("capnp:list:composite");p_t("load");function h_t(e){var t;return t=class extends f_t.List{static{s(this,"_a")}get(r){return new e(this.segment,this.byteOffset,this._capnp.depthLimit-1,r)}set(r,n){d_t.copyFrom(n,this.get(r))}toString(){return`Composite_${super.toString()},cls:${e.toString()}`}},t._capnp={compositeSize:e._capnp.size,displayName:`List<${e._capnp.displayName}>`,size:l_t.ListElementSize.COMPOSITE},t}s(h_t,"CompositeList");EN.CompositeList=h_t});var SN=h(bN=>{"use strict";Object.defineProperty(bN,"__esModule",{value:!0});bN.Data=void 0;var m_t=(at(),ct(ot)),__t=m_t.__importDefault(mt()),g_t=cr(),y_t=Lr(),Yd=Jt(),E_t=Hd(),eB=__t.default("capnp:data");eB("load");var tB=class extends y_t.List{static{s(this,"Data")}static fromPointer(t){return Yd.validate(E_t.PointerType.LIST,t,g_t.ListElementSize.BYTE),this._fromPointerUnchecked(t)}static _fromPointerUnchecked(t){return new this(t.segment,t.byteOffset,t._capnp.depthLimit)}copyBuffer(t){let r=Yd.getContent(this),n=this.getLength(),i=t.byteLength,o=t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,Math.min(n,i)),a=new Uint8Array(r.segment.buffer,r.byteOffset,this.getLength());a.set(o),n>i?(eB("Zeroing out remaining %d bytes after copy into %s.",n-i,this),a.fill(0,i,n)):n<i&&eB("Truncated %d bytes from source buffer while copying to %s.",i-n,this)}get(t){let r=Yd.getContent(this);return r.segment.getUint8(r.byteOffset+t)}set(t,r){let n=Yd.getContent(this);n.segment.setUint8(n.byteOffset+t,r)}toArrayBuffer(){let t=Yd.getContent(this);return t.segment.buffer.slice(t.byteOffset,t.byteOffset+this.getLength())}toDataView(){let t=Yd.getContent(this);return new DataView(t.segment.buffer,t.byteOffset,this.getLength())}toString(){return`Data_${super.toString()}`}toUint8Array(){let t=Yd.getContent(this);return new Uint8Array(t.segment.buffer,t.byteOffset,this.getLength())}};bN.Data=tB});var Afe=h(vN=>{"use strict";Object.defineProperty(vN,"__esModule",{value:!0});vN.DataList=void 0;var b_t=SN(),S_t=L_();vN.DataList=S_t.PointerList(b_t.Data)});var Cfe=h(PN=>{"use strict";Object.defineProperty(PN,"__esModule",{value:!0});PN.Float32List=void 0;var v_t=(at(),ct(ot)),O_t=v_t.__importDefault(mt()),P_t=cr(),I_t=Lr(),Rfe=Jt(),w_t=O_t.default("capnp:list:composite");w_t("load");var ON=class extends I_t.List{static{s(this,"Float32List")}get(t){let r=Rfe.getContent(this);return r.segment.getFloat32(r.byteOffset+t*4)}set(t,r){let n=Rfe.getContent(this);n.segment.setFloat32(n.byteOffset+t*4,r)}toString(){return`Float32_${super.toString()}`}};PN.Float32List=ON;ON._capnp={displayName:"List<Float32>",size:P_t.ListElementSize.BYTE_4}});var Dfe=h(wN=>{"use strict";Object.defineProperty(wN,"__esModule",{value:!0});wN.Float64List=void 0;var T_t=(at(),ct(ot)),N_t=T_t.__importDefault(mt()),A_t=cr(),R_t=Lr(),$fe=Jt(),C_t=N_t.default("capnp:list:composite");C_t("load");var IN=class extends R_t.List{static{s(this,"Float64List")}get(t){let r=$fe.getContent(this);return r.segment.getFloat64(r.byteOffset+t*8)}set(t,r){let n=$fe.getContent(this);n.segment.setFloat64(n.byteOffset+t*8,r)}toString(){return`Float64_${super.toString()}`}};wN.Float64List=IN;IN._capnp={displayName:"List<Float64>",size:A_t.ListElementSize.BYTE_8}});var jfe=h(NN=>{"use strict";Object.defineProperty(NN,"__esModule",{value:!0});NN.Int8List=void 0;var $_t=(at(),ct(ot)),D_t=$_t.__importDefault(mt()),L_t=cr(),j_t=Lr(),Lfe=Jt(),M_t=D_t.default("capnp:list:composite");M_t("load");var TN=class extends j_t.List{static{s(this,"Int8List")}get(t){let r=Lfe.getContent(this);return r.segment.getInt8(r.byteOffset+t)}set(t,r){let n=Lfe.getContent(this);n.segment.setInt8(n.byteOffset+t,r)}toString(){return`Int8_${super.toString()}`}};NN.Int8List=TN;TN._capnp={displayName:"List<Int8>",size:L_t.ListElementSize.BYTE}});var Ufe=h(RN=>{"use strict";Object.defineProperty(RN,"__esModule",{value:!0});RN.Int16List=void 0;var U_t=(at(),ct(ot)),x_t=U_t.__importDefault(mt()),q_t=cr(),F_t=Lr(),Mfe=Jt(),k_t=x_t.default("capnp:list:composite");k_t("load");var AN=class extends F_t.List{static{s(this,"Int16List")}get(t){let r=Mfe.getContent(this);return r.segment.getInt16(r.byteOffset+t*2)}set(t,r){let n=Mfe.getContent(this);n.segment.setInt16(n.byteOffset+t*2,r)}toString(){return`Int16_${super.toString()}`}};RN.Int16List=AN;AN._capnp={displayName:"List<Int16>",size:q_t.ListElementSize.BYTE_2}});var qfe=h($N=>{"use strict";Object.defineProperty($N,"__esModule",{value:!0});$N.Int32List=void 0;var B_t=(at(),ct(ot)),G_t=B_t.__importDefault(mt()),V_t=cr(),z_t=Lr(),xfe=Jt(),H_t=G_t.default("capnp:list:composite");H_t("load");var CN=class extends z_t.List{static{s(this,"Int32List")}get(t){let r=xfe.getContent(this);return r.segment.getInt32(r.byteOffset+t*4)}set(t,r){let n=xfe.getContent(this);n.segment.setInt32(n.byteOffset+t*4,r)}toString(){return`Int32_${super.toString()}`}};$N.Int32List=CN;CN._capnp={displayName:"List<Int32>",size:V_t.ListElementSize.BYTE_4}});var kfe=h(LN=>{"use strict";Object.defineProperty(LN,"__esModule",{value:!0});LN.Int64List=void 0;var K_t=(at(),ct(ot)),W_t=K_t.__importDefault(mt()),Y_t=cr(),J_t=Lr(),Ffe=Jt(),X_t=W_t.default("capnp:list:composite");X_t("load");var DN=class extends J_t.List{static{s(this,"Int64List")}get(t){let r=Ffe.getContent(this);return r.segment.getInt64(r.byteOffset+t*8)}set(t,r){let n=Ffe.getContent(this);n.segment.setInt64(n.byteOffset+t*8,r)}toString(){return`Int64_${super.toString()}`}};LN.Int64List=DN;DN._capnp={displayName:"List<Int64>",size:Y_t.ListElementSize.BYTE_8}});var nB=h(jN=>{"use strict";Object.defineProperty(jN,"__esModule",{value:!0});jN.Interface=void 0;var Q_t=Ji(),Z_t=Qn(),egt=Ni(),tgt=Jt(),rB=class extends tgt.Pointer{static{s(this,"Interface")}constructor(t,r,n=Q_t.MAX_DEPTH){throw super(t,r,n),new Error(egt.format(Z_t.NOT_IMPLEMENTED,"new Interface"))}};jN.Interface=rB});var Bfe=h(MN=>{"use strict";Object.defineProperty(MN,"__esModule",{value:!0});MN.InterfaceList=void 0;var rgt=nB(),ngt=L_();MN.InterfaceList=ngt.PointerList(rgt.Interface)});var sB=h(xN=>{"use strict";Object.defineProperty(xN,"__esModule",{value:!0});xN.Uint64=void 0;var igt=(at(),ct(ot)),sgt=igt.__importDefault(mt()),UN=Ji(),ogt=Qn(),agt=Ni(),Gfe=sgt.default("capnp:uint64");Gfe("load");var iB=class e{static{s(this,"Uint64")}constructor(t){if(t.byteLength<8)throw new RangeError(ogt.RANGE_INT64_UNDERFLOW);this.buffer=t}static fromArrayBuffer(t,r=0,n=!1){return n?new this(new Uint8Array(t,r,8)):new this(new Uint8Array(t.slice(r,r+8)))}static fromDataView(t,r=0,n=!1){return n?new this(new Uint8Array(t.buffer,t.byteOffset+r,8)):new this(new Uint8Array(t.buffer.slice(t.byteOffset+r,t.byteLength+r+8)))}static fromHexString(t){if(t.substr(0,2)==="0x"&&(t=t.substr(2)),t.length<1)return e.fromNumber(0);if(t[0]==="-")throw new RangeError("Source must not be negative.");if(t=agt.pad(t,16),t.length!==16)throw new RangeError("Source string must contain at most 16 hexadecimal digits.");let r=t.toLowerCase().replace(/[^\da-f]/g,""),n=new Uint8Array(new ArrayBuffer(8));for(let i=0;i<8;i++)n[7-i]=parseInt(r.substr(i*2,2),16);return new e(n)}static fromNumber(t){let r=new this(new Uint8Array(8));return r.setValue(t),r}static fromUint8Array(t,r=0,n=!1){return n?new this(t.subarray(r,r+8)):new this(new Uint8Array(t.buffer.slice(t.byteOffset+r,t.byteOffset+r+8)))}equals(t){for(let r=0;r<8;r++)if(this.buffer[r]!==t.buffer[r])return!1;return!0}inspect(){return`[Uint64 ${this.toString(10)} 0x${this.toHexString()}]`}isZero(){for(let t=0;t<8;t++)if(this.buffer[t]!==0)return!1;return!0}setValue(t,r){let n=t,i=r;if(i===void 0){if(i=n,i=Math.abs(i),n=i%UN.VAL32,i=i/UN.VAL32,i>UN.VAL32)throw new RangeError(`${t} is outside Uint64 range`);i=i>>>0}for(let o=0;o<8;o++)this.buffer[o]=n&255,n=o===3?i:n>>>8}toNumber(t){let r=this.buffer,n=0,i=0,o=1;for(;i<8;){let a=r[i];n+=a*o,o*=256,i++}return!t&&n>=UN.MAX_SAFE_INTEGER?(Gfe("Coercing out of range value %d to Infinity.",n),1/0):n}valueOf(){return this.toNumber(!1)}toArrayBuffer(){return this.buffer.buffer}toDataView(){return new DataView(this.buffer.buffer)}toHexString(){let t="";for(let r=7;r>=0;r--){let n=this.buffer[r].toString(16);n.length===1&&(n="0"+n),t+=n}return t}toString(t){return this.toNumber(!0).toString(t)}toUint8Array(){return this.buffer}};xN.Uint64=iB});var zfe=h(FN=>{"use strict";Object.defineProperty(FN,"__esModule",{value:!0});FN.Int64=void 0;var ugt=(at(),ct(ot)),cgt=ugt.__importDefault(mt()),qN=Ji(),lgt=Ni(),fgt=sB(),Vfe=cgt.default("capnp:int64");Vfe("load");var oB=class e extends fgt.Uint64{static{s(this,"Int64")}static fromArrayBuffer(t,r=0,n=!1){return n?new this(new Uint8Array(t,r,8)):new this(new Uint8Array(t.slice(r,r+8)))}static fromDataView(t,r=0,n=!1){return n?new this(new Uint8Array(t.buffer,t.byteOffset+r,8)):new this(new Uint8Array(t.buffer.slice(t.byteOffset+r,t.byteLength+r+8)))}static fromNumber(t){let r=new this(new Uint8Array(8));return r.setValue(t),r}static fromHexString(t){if(t.substr(0,2)==="0x"&&(t=t.substr(2)),t.length<1)return e.fromNumber(0);let r=t[0]==="-";if(r&&(t=t.substr(1)),t=lgt.pad(t,16),t.length!==16)throw new RangeError("Source string must contain at most 16 hexadecimal digits.");let n=t.toLowerCase().replace(/[^\da-f]/g,""),i=new Uint8Array(new ArrayBuffer(8));for(let a=0;a<8;a++)i[7-a]=parseInt(n.substr(a*2,2),16);let o=new e(i);return r&&o.negate(),o}static fromUint8Array(t,r=0,n=!1){return n?new this(t.subarray(r,r+8)):new this(new Uint8Array(t.buffer.slice(t.byteOffset+r,t.byteOffset+r+8)))}equals(t){return super.equals(t)}inspect(){return`[Int64 ${this.toString(10)} 0x${this.toHexString()}]`}negate(){for(let t=this.buffer,r=1,n=0;n<8;n++){let i=(t[n]^255)+r;t[n]=i&255,r=i>>8}}setValue(t,r){let n=!1,i=t,o=r;if(o===void 0){if(o=i,n=o<0,o=Math.abs(o),i=o%qN.VAL32,o=o/qN.VAL32,o>qN.VAL32)throw new RangeError(`${t} is outside Int64 range`);o=o>>>0}for(let a=0;a<8;a++)this.buffer[a]=i&255,i=a===3?o:i>>>8;n&&this.negate()}toHexString(){let t=this.buffer,r=t[7]&128;r&&this.negate();let n="";for(let i=7;i>=0;i--){let o=t[i].toString(16);o.length===1&&(o="0"+o),n+=o}return r&&(this.negate(),n="-"+n),n}toNumber(t){let r=this.buffer,n=r[7]&128,i=0,o=1,a=0,u=1;for(;a<8;){let c=r[a];n&&(c=(c^255)+o,o=c>>8,c=c&255),i+=c*u,u*=256,a++}return!t&&i>=qN.MAX_SAFE_INTEGER?(Vfe("Coercing out of range value %d to Infinity.",i),n?-1/0:1/0):n?-i:i}};FN.Int64=oB});var kN=h(j_=>{"use strict";Object.defineProperty(j_,"__esModule",{value:!0});j_.Uint64=j_.Int64=void 0;var dgt=zfe();Object.defineProperty(j_,"Int64",{enumerable:!0,get:function(){return dgt.Int64}});var pgt=sB();Object.defineProperty(j_,"Uint64",{enumerable:!0,get:function(){return pgt.Uint64}})});var zN=h(VN=>{"use strict";Object.defineProperty(VN,"__esModule",{value:!0});VN.Text=void 0;var hgt=(at(),ct(ot)),mgt=hgt.__importDefault(mt()),Hfe=Ni(),Kfe=cr(),Wfe=Lr(),Jd=Jt(),_gt=Hd(),BN=mgt.default("capnp:text");BN("load");var GN=class extends Wfe.List{static{s(this,"Text")}static fromPointer(t){return Jd.validate(_gt.PointerType.LIST,t,Kfe.ListElementSize.BYTE),ggt(t)}get(t=0){if(t!==0&&BN("Called get() on %s with a strange index (%d).",this,t),Jd.isNull(this))return"";let r=Jd.getContent(this);return Hfe.decodeUtf8(new Uint8Array(r.segment.buffer,r.byteOffset+t,this.getLength()-t))}getLength(){return super.getLength()-1}set(t,r){t!==0&&BN("Called set() on %s with a strange index (%d).",this,t);let n=Hfe.encodeUtf8(r),i=n.byteLength+t,o,a;if(!Jd.isNull(this)){o=Jd.getContent(this);let c=this.getLength();c>=t?c=t:BN("%d byte gap exists between original text and new text in %s.",t-c,this),a=new Uint8Array(o.segment.buffer.slice(o.byteOffset,o.byteOffset+Math.min(c,t))),Jd.erase(this)}Wfe.initList(Kfe.ListElementSize.BYTE,i+1,this),o=Jd.getContent(this);let u=new Uint8Array(o.segment.buffer,o.byteOffset,i);a&&u.set(a),u.set(n,t)}toString(){return`Text_${super.toString()}`}};VN.Text=GN;function ggt(e){return new GN(e.segment,e.byteOffset,e._capnp.depthLimit)}s(ggt,"textFromPointerUnchecked")});var JN=h(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.checkPointerBounds=q.checkDataBounds=q.testWhich=q.setVoid=q.setUint8=q.setUint64=q.setUint32=q.setUint16=q.setText=q.setPointer=q.setInt8=q.setInt64=q.setInt32=q.setInt16=q.setFloat64=q.setFloat32=q.setBit=q.initList=q.initData=q.getVoid=q.getUint8=q.getUint64=q.getUint32=q.getUint16=q.getText=q.getStruct=q.getSize=q.getPointerSection=q.getPointerAs=q.getPointer=q.getList=q.getInt8=q.getInt64=q.getInt32=q.getInt16=q.getFloat64=q.getFloat32=q.getDataSection=q.getData=q.getBit=q.getAs=q.disown=q.adopt=q.resize=q.initStructAt=q.initStruct=q.Struct=void 0;var ygt=(at(),ct(ot)),Egt=ygt.__importDefault(mt()),sr=Ji(),Yfe=kN(),Xd=Ni(),HN=cr(),To=zd(),Jfe=SN(),KN=Lr(),me=Jt(),aB=Hd(),Xfe=zN(),sl=Qn(),uB=Egt.default("capnp:struct");uB("load");var Dt=new DataView(new ArrayBuffer(8)),Fe=class extends me.Pointer{static{s(this,"Struct")}constructor(t,r,n=sr.MAX_DEPTH,i){super(t,r,n),this._capnp.compositeIndex=i,this._capnp.compositeList=i!==void 0}static toString(){return this._capnp.displayName}toString(){return`Struct_${super.toString()}${this._capnp.compositeIndex===void 0?"":`,ci:${this._capnp.compositeIndex}`}`}};q.Struct=Fe;Fe._capnp={displayName:"Struct"};Fe.getAs=ede;Fe.getBit=tde;Fe.getData=rde;Fe.getFloat32=nde;Fe.getFloat64=ide;Fe.getUint8=mde;Fe.getUint16=dde;Fe.getUint32=pde;Fe.getUint64=hde;Fe.getInt8=ude;Fe.getInt16=sde;Fe.getInt32=ode;Fe.getInt64=ade;Fe.getList=cde;Fe.getPointer=ab;Fe.getPointerAs=YN;Fe.getStruct=lde;Fe.getText=fde;Fe.initData=_de;Fe.initList=gde;Fe.initStruct=WN;Fe.initStructAt=Qfe;Fe.setBit=yde;Fe.setFloat32=Ede;Fe.setFloat64=bde;Fe.setUint8=Ade;Fe.setUint16=wde;Fe.setUint32=Tde;Fe.setUint64=Nde;Fe.setInt8=Pde;Fe.setInt16=Sde;Fe.setInt32=vde;Fe.setInt64=Ode;Fe.setText=Ide;Fe.testWhich=Rde;function WN(e,t){if(t._capnp.compositeIndex!==void 0)throw new Error(Xd.format(sl.PTR_INIT_COMPOSITE_STRUCT,t));me.erase(t);let r=t.segment.allocate(To.getByteLength(e)),n=me.initPointer(r.segment,r.byteOffset,t);me.setStructPointer(n.offsetWords,e,n.pointer)}s(WN,"initStruct");q.initStruct=WN;function Qfe(e,t,r){let n=YN(e,t,r);return WN(t._capnp.size,n),n}s(Qfe,"initStructAt");q.initStructAt=Qfe;function Zfe(e,t){let r=ub(t),n=me.getContent(t),i=t.segment.allocate(To.getByteLength(e));i.segment.copyWords(i.byteOffset,n.segment,n.byteOffset,Math.min(To.getDataWordLength(r),To.getDataWordLength(e)));let o=me.initPointer(i.segment,i.byteOffset,t);me.setStructPointer(o.offsetWords,e,o.pointer);for(let a=0;a<Math.min(r.pointerLength,e.pointerLength);a++){let u=new me.Pointer(n.segment,n.byteOffset+r.dataByteLength+a*8);if(me.isNull(u))continue;let c=me.followFars(u),l=me.getContent(u),f=new me.Pointer(i.segment,i.byteOffset+e.dataByteLength+a*8);me.getTargetPointerType(u)===aB.PointerType.LIST&&me.getTargetListElementSize(u)===HN.ListElementSize.COMPOSITE&&(l.byteOffset-=8);let d=me.initPointer(l.segment,l.byteOffset,f),_=c.segment.getUint8(c.byteOffset)&3,m=c.segment.getUint32(c.byteOffset+4);d.pointer.segment.setUint32(d.pointer.byteOffset,_|d.offsetWords<<2),d.pointer.segment.setUint32(d.pointer.byteOffset+4,m)}n.segment.fillZeroWords(n.byteOffset,To.getWordLength(r))}s(Zfe,"resize");q.resize=Zfe;function bgt(e,t){if(t._capnp.compositeIndex!==void 0)throw new Error(Xd.format(sl.PTR_ADOPT_COMPOSITE_STRUCT,t));me.Pointer.adopt(e,t)}s(bgt,"adopt");q.adopt=bgt;function Sgt(e){if(e._capnp.compositeIndex!==void 0)throw new Error(Xd.format(sl.PTR_DISOWN_COMPOSITE_STRUCT,e));return me.Pointer.disown(e)}s(Sgt,"disown");q.disown=Sgt;function ede(e,t){return new e(t.segment,t.byteOffset,t._capnp.depthLimit,t._capnp.compositeIndex)}s(ede,"getAs");q.getAs=ede;function tde(e,t,r){let n=Math.floor(e/8),i=1<<e%8;ar(n,1,t);let o=or(t),a=o.segment.getUint8(o.byteOffset+n);if(r===void 0)return(a&i)!==0;let u=r.getUint8(0);return((a^u)&i)!==0}s(tde,"getBit");q.getBit=tde;function rde(e,t,r){Zd(e,t);let n=Qd(t);n.byteOffset+=e*8;let i=new Jfe.Data(n.segment,n.byteOffset,t._capnp.depthLimit-1);return me.isNull(i)&&(r?me.Pointer.copyFrom(r,i):KN.List.initList(HN.ListElementSize.BYTE,0,i)),i}s(rde,"getData");q.getData=rde;function or(e){return me.getContent(e)}s(or,"getDataSection");q.getDataSection=or;function nde(e,t,r){ar(e,4,t);let n=or(t);if(r===void 0)return n.segment.getFloat32(n.byteOffset+e);let i=n.segment.getUint32(n.byteOffset+e)^r.getUint32(0,!0);return Dt.setUint32(0,i,sr.NATIVE_LITTLE_ENDIAN),Dt.getFloat32(0,sr.NATIVE_LITTLE_ENDIAN)}s(nde,"getFloat32");q.getFloat32=nde;function ide(e,t,r){ar(e,8,t);let n=or(t);if(r!==void 0){let i=n.segment.getUint32(n.byteOffset+e)^r.getUint32(0,!0),o=n.segment.getUint32(n.byteOffset+e+4)^r.getUint32(4,!0);return Dt.setUint32(0,i,sr.NATIVE_LITTLE_ENDIAN),Dt.setUint32(4,o,sr.NATIVE_LITTLE_ENDIAN),Dt.getFloat64(0,sr.NATIVE_LITTLE_ENDIAN)}return n.segment.getFloat64(n.byteOffset+e)}s(ide,"getFloat64");q.getFloat64=ide;function sde(e,t,r){ar(e,2,t);let n=or(t);if(r===void 0)return n.segment.getInt16(n.byteOffset+e);let i=n.segment.getUint16(n.byteOffset+e)^r.getUint16(0,!0);return Dt.setUint16(0,i,sr.NATIVE_LITTLE_ENDIAN),Dt.getInt16(0,sr.NATIVE_LITTLE_ENDIAN)}s(sde,"getInt16");q.getInt16=sde;function ode(e,t,r){ar(e,4,t);let n=or(t);if(r===void 0)return n.segment.getInt32(n.byteOffset+e);let i=n.segment.getUint32(n.byteOffset+e)^r.getUint16(0,!0);return Dt.setUint32(0,i,sr.NATIVE_LITTLE_ENDIAN),Dt.getInt32(0,sr.NATIVE_LITTLE_ENDIAN)}s(ode,"getInt32");q.getInt32=ode;function ade(e,t,r){ar(e,8,t);let n=or(t);if(r===void 0)return n.segment.getInt64(n.byteOffset+e);let i=n.segment.getUint32(n.byteOffset+e)^r.getUint32(0,!0),o=n.segment.getUint32(n.byteOffset+e+4)^r.getUint32(4,!0);return Dt.setUint32(0,i,sr.NATIVE_LITTLE_ENDIAN),Dt.setUint32(4,o,sr.NATIVE_LITTLE_ENDIAN),new Yfe.Int64(new Uint8Array(Dt.buffer.slice(0)))}s(ade,"getInt64");q.getInt64=ade;function ude(e,t,r){ar(e,1,t);let n=or(t);if(r===void 0)return n.segment.getInt8(n.byteOffset+e);let i=n.segment.getUint8(n.byteOffset+e)^r.getUint8(0);return Dt.setUint8(0,i),Dt.getInt8(0)}s(ude,"getInt8");q.getInt8=ude;function cde(e,t,r,n){Zd(e,r);let i=Qd(r);i.byteOffset+=e*8;let o=new t(i.segment,i.byteOffset,r._capnp.depthLimit-1);if(me.isNull(o))n?me.Pointer.copyFrom(n,o):KN.List.initList(t._capnp.size,0,o,t._capnp.compositeSize);else if(t._capnp.compositeSize!==void 0){let a=me.getTargetCompositeListSize(o),u=t._capnp.compositeSize;if(u.dataByteLength>a.dataByteLength||u.pointerLength>a.pointerLength){let c=me.getContent(o),l=me.getTargetListLength(o);uB("resizing composite list %s due to protocol upgrade, new size: %d",o,To.getByteLength(u)*l);let f=o.segment.allocate(To.getByteLength(u)*l+8),d=me.initPointer(f.segment,f.byteOffset,o);me.setListPointer(d.offsetWords,t._capnp.size,l,d.pointer,u),me.setStructPointer(l,u,f),f.byteOffset+=8;for(let _=0;_<l;_++){let m=c.byteOffset+_*To.getByteLength(a),g=f.byteOffset+_*To.getByteLength(u);f.segment.copyWords(g,c.segment,m,To.getWordLength(a));for(let y=0;y<a.pointerLength;y++){let b=new me.Pointer(c.segment,m+a.dataByteLength+y*8),E=new me.Pointer(f.segment,g+u.dataByteLength+y*8),S=me.followFars(b),O=me.getContent(b);me.getTargetPointerType(b)===aB.PointerType.LIST&&me.getTargetListElementSize(b)===HN.ListElementSize.COMPOSITE&&(O.byteOffset-=8);let I=me.initPointer(O.segment,O.byteOffset,E),w=S.segment.getUint8(S.byteOffset)&3,j=S.segment.getUint32(S.byteOffset+4);I.pointer.segment.setUint32(I.pointer.byteOffset,w|I.offsetWords<<2),I.pointer.segment.setUint32(I.pointer.byteOffset+4,j)}}c.segment.fillZeroWords(c.byteOffset,To.getWordLength(a)*l)}}return o}s(cde,"getList");q.getList=cde;function ab(e,t){Zd(e,t);let r=Qd(t);return r.byteOffset+=e*8,new me.Pointer(r.segment,r.byteOffset,t._capnp.depthLimit-1)}s(ab,"getPointer");q.getPointer=ab;function YN(e,t,r){Zd(e,r);let n=Qd(r);return n.byteOffset+=e*8,new t(n.segment,n.byteOffset,r._capnp.depthLimit-1)}s(YN,"getPointerAs");q.getPointerAs=YN;function Qd(e){let t=me.getContent(e);return t.byteOffset+=Xd.padToWord(ub(e).dataByteLength),t}s(Qd,"getPointerSection");q.getPointerSection=Qd;function ub(e){if(e._capnp.compositeIndex!==void 0){let t=me.getContent(e,!0);return t.byteOffset-=8,me.getStructSize(t)}return me.getTargetStructSize(e)}s(ub,"getSize");q.getSize=ub;function lde(e,t,r,n){let i=YN(e,t,r);if(me.isNull(i))n?me.Pointer.copyFrom(n,i):WN(t._capnp.size,i);else{me.validate(aB.PointerType.STRUCT,i);let o=me.getTargetStructSize(i);(o.dataByteLength<t._capnp.size.dataByteLength||o.pointerLength<t._capnp.size.pointerLength)&&(uB("need to resize child struct %s",i),Zfe(t._capnp.size,i))}return i}s(lde,"getStruct");q.getStruct=lde;function fde(e,t,r){let n=Xfe.Text.fromPointer(ab(e,t));return me.isNull(n)&&r&&n.set(0,r),n.get(0)}s(fde,"getText");q.getText=fde;function dde(e,t,r){ar(e,2,t);let n=or(t);return r===void 0?n.segment.getUint16(n.byteOffset+e):n.segment.getUint16(n.byteOffset+e)^r.getUint16(0,!0)}s(dde,"getUint16");q.getUint16=dde;function pde(e,t,r){ar(e,4,t);let n=or(t);return r===void 0?n.segment.getUint32(n.byteOffset+e):n.segment.getUint32(n.byteOffset+e)^r.getUint32(0,!0)}s(pde,"getUint32");q.getUint32=pde;function hde(e,t,r){ar(e,8,t);let n=or(t);if(r===void 0)return n.segment.getUint64(n.byteOffset+e);let i=n.segment.getUint32(n.byteOffset+e)^r.getUint32(0,!0),o=n.segment.getUint32(n.byteOffset+e+4)^r.getUint32(4,!0);return Dt.setUint32(0,i,sr.NATIVE_LITTLE_ENDIAN),Dt.setUint32(4,o,sr.NATIVE_LITTLE_ENDIAN),new Yfe.Uint64(new Uint8Array(Dt.buffer.slice(0)))}s(hde,"getUint64");q.getUint64=hde;function mde(e,t,r){ar(e,1,t);let n=or(t);return r===void 0?n.segment.getUint8(n.byteOffset+e):n.segment.getUint8(n.byteOffset+e)^r.getUint8(0)}s(mde,"getUint8");q.getUint8=mde;function vgt(){throw new Error(sl.INVARIANT_UNREACHABLE_CODE)}s(vgt,"getVoid");q.getVoid=vgt;function _de(e,t,r){Zd(e,r);let n=Qd(r);n.byteOffset+=e*8;let i=new Jfe.Data(n.segment,n.byteOffset,r._capnp.depthLimit-1);return me.erase(i),KN.List.initList(HN.ListElementSize.BYTE,t,i),i}s(_de,"initData");q.initData=_de;function gde(e,t,r,n){Zd(e,n);let i=Qd(n);i.byteOffset+=e*8;let o=new t(i.segment,i.byteOffset,n._capnp.depthLimit-1);return me.erase(o),KN.List.initList(t._capnp.size,r,o,t._capnp.compositeSize),o}s(gde,"initList");q.initList=gde;function yde(e,t,r,n){let i=Math.floor(e/8),o=1<<e%8;ar(i,1,r);let a=or(r),u=a.segment.getUint8(a.byteOffset+i);n!==void 0&&(t=n.getUint8(0)&o?!t:t),a.segment.setUint8(a.byteOffset+i,t?u|o:u&~o)}s(yde,"setBit");q.setBit=yde;function Ede(e,t,r,n){ar(e,4,r);let i=or(r);if(n!==void 0){Dt.setFloat32(0,t,sr.NATIVE_LITTLE_ENDIAN);let o=Dt.getUint32(0,sr.NATIVE_LITTLE_ENDIAN)^n.getUint32(0,!0);i.segment.setUint32(i.byteOffset+e,o);return}i.segment.setFloat32(i.byteOffset+e,t)}s(Ede,"setFloat32");q.setFloat32=Ede;function bde(e,t,r,n){ar(e,8,r);let i=or(r);if(n!==void 0){Dt.setFloat64(0,t,sr.NATIVE_LITTLE_ENDIAN);let o=Dt.getUint32(0,sr.NATIVE_LITTLE_ENDIAN)^n.getUint32(0,!0),a=Dt.getUint32(4,sr.NATIVE_LITTLE_ENDIAN)^n.getUint32(4,!0);i.segment.setUint32(i.byteOffset+e,o),i.segment.setUint32(i.byteOffset+e+4,a);return}i.segment.setFloat64(i.byteOffset+e,t)}s(bde,"setFloat64");q.setFloat64=bde;function Sde(e,t,r,n){ar(e,2,r);let i=or(r);if(n!==void 0){Dt.setInt16(0,t,sr.NATIVE_LITTLE_ENDIAN);let o=Dt.getUint16(0,sr.NATIVE_LITTLE_ENDIAN)^n.getUint16(0,!0);i.segment.setUint16(i.byteOffset+e,o);return}i.segment.setInt16(i.byteOffset+e,t)}s(Sde,"setInt16");q.setInt16=Sde;function vde(e,t,r,n){ar(e,4,r);let i=or(r);if(n!==void 0){Dt.setInt32(0,t,sr.NATIVE_LITTLE_ENDIAN);let o=Dt.getUint32(0,sr.NATIVE_LITTLE_ENDIAN)^n.getUint32(0,!0);i.segment.setUint32(i.byteOffset+e,o);return}i.segment.setInt32(i.byteOffset+e,t)}s(vde,"setInt32");q.setInt32=vde;function Ode(e,t,r,n){ar(e,8,r);let i=or(r);if(n!==void 0){for(let o=0;o<8;o++)i.segment.setUint8(i.byteOffset+e+o,t.buffer[o]^n.getUint8(o));return}i.segment.setInt64(i.byteOffset+e,t)}s(Ode,"setInt64");q.setInt64=Ode;function Pde(e,t,r,n){ar(e,1,r);let i=or(r);if(n!==void 0){Dt.setInt8(0,t);let o=Dt.getUint8(0)^n.getUint8(0);i.segment.setUint8(i.byteOffset+e,o);return}i.segment.setInt8(i.byteOffset+e,t)}s(Pde,"setInt8");q.setInt8=Pde;function Ogt(e,t,r){me.copyFrom(t,ab(e,r))}s(Ogt,"setPointer");q.setPointer=Ogt;function Ide(e,t,r){Xfe.Text.fromPointer(ab(e,r)).set(0,t)}s(Ide,"setText");q.setText=Ide;function wde(e,t,r,n){ar(e,2,r);let i=or(r);n!==void 0&&(t^=n.getUint16(0,!0)),i.segment.setUint16(i.byteOffset+e,t)}s(wde,"setUint16");q.setUint16=wde;function Tde(e,t,r,n){ar(e,4,r);let i=or(r);n!==void 0&&(t^=n.getUint32(0,!0)),i.segment.setUint32(i.byteOffset+e,t)}s(Tde,"setUint32");q.setUint32=Tde;function Nde(e,t,r,n){ar(e,8,r);let i=or(r);if(n!==void 0){for(let o=0;o<8;o++)i.segment.setUint8(i.byteOffset+e+o,t.buffer[o]^n.getUint8(o));return}i.segment.setUint64(i.byteOffset+e,t)}s(Nde,"setUint64");q.setUint64=Nde;function Ade(e,t,r,n){ar(e,1,r);let i=or(r);n!==void 0&&(t^=n.getUint8(0)),i.segment.setUint8(i.byteOffset+e,t)}s(Ade,"setUint8");q.setUint8=Ade;function Pgt(){throw new Error(sl.INVARIANT_UNREACHABLE_CODE)}s(Pgt,"setVoid");q.setVoid=Pgt;function Rde(e,t,r,n){if(t!==r)throw new Error(Xd.format(sl.PTR_INVALID_UNION_ACCESS,n,e,t,r))}s(Rde,"testWhich");q.testWhich=Rde;function ar(e,t,r){let n=ub(r).dataByteLength;if(e<0||t<0||e+t>n)throw new Error(Xd.format(sl.PTR_STRUCT_DATA_OUT_OF_BOUNDS,r,t,e,n))}s(ar,"checkDataBounds");q.checkDataBounds=ar;function Zd(e,t){let r=ub(t).pointerLength;if(e<0||e>=r)throw new Error(Xd.format(sl.PTR_STRUCT_POINTER_OUT_OF_BOUNDS,t,e,r))}s(Zd,"checkPointerBounds");q.checkPointerBounds=Zd});var Dde=h(QN=>{"use strict";Object.defineProperty(QN,"__esModule",{value:!0});QN.TextList=void 0;var Igt=(at(),ct(ot)),wgt=Igt.__importDefault(mt()),Tgt=cr(),Ngt=Lr(),Cde=zN(),$de=Jt(),Agt=wgt.default("capnp:list:composite");Agt("load");var XN=class extends Ngt.List{static{s(this,"TextList")}get(t){let r=$de.getContent(this);return r.byteOffset+=t*8,Cde.Text.fromPointer(r).get(0)}set(t,r){let n=$de.getContent(this);n.byteOffset+=t*8,Cde.Text.fromPointer(n).set(0,r)}toString(){return`Text_${super.toString()}`}};QN.TextList=XN;XN._capnp={displayName:"List<Text>",size:Tgt.ListElementSize.POINTER}});var jde=h(eA=>{"use strict";Object.defineProperty(eA,"__esModule",{value:!0});eA.Uint8List=void 0;var Rgt=(at(),ct(ot)),Cgt=Rgt.__importDefault(mt()),$gt=cr(),Dgt=Lr(),Lde=Jt(),Lgt=Cgt.default("capnp:list:composite");Lgt("load");var ZN=class extends Dgt.List{static{s(this,"Uint8List")}get(t){let r=Lde.getContent(this);return r.segment.getUint8(r.byteOffset+t)}set(t,r){let n=Lde.getContent(this);n.segment.setUint8(n.byteOffset+t,r)}toString(){return`Uint8_${super.toString()}`}};eA.Uint8List=ZN;ZN._capnp={displayName:"List<Uint8>",size:$gt.ListElementSize.BYTE}});var Ude=h(rA=>{"use strict";Object.defineProperty(rA,"__esModule",{value:!0});rA.Uint16List=void 0;var jgt=(at(),ct(ot)),Mgt=jgt.__importDefault(mt()),Ugt=cr(),xgt=Lr(),Mde=Jt(),qgt=Mgt.default("capnp:list:composite");qgt("load");var tA=class extends xgt.List{static{s(this,"Uint16List")}get(t){let r=Mde.getContent(this);return r.segment.getUint16(r.byteOffset+t*2)}set(t,r){let n=Mde.getContent(this);n.segment.setUint16(n.byteOffset+t*2,r)}toString(){return`Uint16_${super.toString()}`}};rA.Uint16List=tA;tA._capnp={displayName:"List<Uint16>",size:Ugt.ListElementSize.BYTE_2}});var qde=h(iA=>{"use strict";Object.defineProperty(iA,"__esModule",{value:!0});iA.Uint32List=void 0;var Fgt=(at(),ct(ot)),kgt=Fgt.__importDefault(mt()),Bgt=cr(),Ggt=Lr(),xde=Jt(),Vgt=kgt.default("capnp:list:composite");Vgt("load");var nA=class extends Ggt.List{static{s(this,"Uint32List")}get(t){let r=xde.getContent(this);return r.segment.getUint32(r.byteOffset+t*4)}set(t,r){let n=xde.getContent(this);n.segment.setUint32(n.byteOffset+t*4,r)}toString(){return`Uint32_${super.toString()}`}};iA.Uint32List=nA;nA._capnp={displayName:"List<Uint32>",size:Bgt.ListElementSize.BYTE_4}});var kde=h(oA=>{"use strict";Object.defineProperty(oA,"__esModule",{value:!0});oA.Uint64List=void 0;var zgt=(at(),ct(ot)),Hgt=zgt.__importDefault(mt()),Kgt=cr(),Wgt=Lr(),Fde=Jt(),Ygt=Hgt.default("capnp:list:composite");Ygt("load");var sA=class extends Wgt.List{static{s(this,"Uint64List")}get(t){let r=Fde.getContent(this);return r.segment.getUint64(r.byteOffset+t*8)}set(t,r){let n=Fde.getContent(this);n.segment.setUint64(n.byteOffset+t*8,r)}toString(){return`Uint64_${super.toString()}`}};oA.Uint64List=sA;sA._capnp={displayName:"List<Uint64>",size:Kgt.ListElementSize.BYTE_8}});var cB=h(M_=>{"use strict";Object.defineProperty(M_,"__esModule",{value:!0});M_.VOID=M_.Void=void 0;var Jgt=zd(),Xgt=JN(),aA=class extends Xgt.Struct{static{s(this,"Void")}};M_.Void=aA;aA._capnp={displayName:"Void",id:"0",size:new Jgt.ObjectSize(0,0)};M_.VOID=void 0});var Bde=h(uA=>{"use strict";Object.defineProperty(uA,"__esModule",{value:!0});uA.VoidList=void 0;var Qgt=L_(),Zgt=cB();uA.VoidList=Qgt.PointerList(Zgt.Void)});var cA=h(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.VoidList=le.VOID=le.Void=le.Uint64List=le.Uint32List=le.Uint16List=le.Uint8List=le.TextList=le.Text=le.Struct=le.Pointer=le.PointerType=le.PointerList=le.Orphan=le.List=le.InterfaceList=le.Interface=le.Int64List=le.Int32List=le.Int16List=le.Int8List=le.Float64List=le.Float32List=le.DataList=le.Data=le.CompositeList=le.BoolList=le.AnyPointerList=void 0;var eyt=Ife();Object.defineProperty(le,"AnyPointerList",{enumerable:!0,get:function(){return eyt.AnyPointerList}});var tyt=Tfe();Object.defineProperty(le,"BoolList",{enumerable:!0,get:function(){return tyt.BoolList}});var ryt=Nfe();Object.defineProperty(le,"CompositeList",{enumerable:!0,get:function(){return ryt.CompositeList}});var nyt=SN();Object.defineProperty(le,"Data",{enumerable:!0,get:function(){return nyt.Data}});var iyt=Afe();Object.defineProperty(le,"DataList",{enumerable:!0,get:function(){return iyt.DataList}});var syt=Cfe();Object.defineProperty(le,"Float32List",{enumerable:!0,get:function(){return syt.Float32List}});var oyt=Dfe();Object.defineProperty(le,"Float64List",{enumerable:!0,get:function(){return oyt.Float64List}});var ayt=jfe();Object.defineProperty(le,"Int8List",{enumerable:!0,get:function(){return ayt.Int8List}});var uyt=Ufe();Object.defineProperty(le,"Int16List",{enumerable:!0,get:function(){return uyt.Int16List}});var cyt=qfe();Object.defineProperty(le,"Int32List",{enumerable:!0,get:function(){return cyt.Int32List}});var lyt=kfe();Object.defineProperty(le,"Int64List",{enumerable:!0,get:function(){return lyt.Int64List}});var fyt=nB();Object.defineProperty(le,"Interface",{enumerable:!0,get:function(){return fyt.Interface}});var dyt=Bfe();Object.defineProperty(le,"InterfaceList",{enumerable:!0,get:function(){return dyt.InterfaceList}});var pyt=Lr();Object.defineProperty(le,"List",{enumerable:!0,get:function(){return pyt.List}});var hyt=kk();Object.defineProperty(le,"Orphan",{enumerable:!0,get:function(){return hyt.Orphan}});var myt=L_();Object.defineProperty(le,"PointerList",{enumerable:!0,get:function(){return myt.PointerList}});var _yt=Hd();Object.defineProperty(le,"PointerType",{enumerable:!0,get:function(){return _yt.PointerType}});var gyt=Jt();Object.defineProperty(le,"Pointer",{enumerable:!0,get:function(){return gyt.Pointer}});var yyt=JN();Object.defineProperty(le,"Struct",{enumerable:!0,get:function(){return yyt.Struct}});var Eyt=zN();Object.defineProperty(le,"Text",{enumerable:!0,get:function(){return Eyt.Text}});var byt=Dde();Object.defineProperty(le,"TextList",{enumerable:!0,get:function(){return byt.TextList}});var Syt=jde();Object.defineProperty(le,"Uint8List",{enumerable:!0,get:function(){return Syt.Uint8List}});var vyt=Ude();Object.defineProperty(le,"Uint16List",{enumerable:!0,get:function(){return vyt.Uint16List}});var Oyt=qde();Object.defineProperty(le,"Uint32List",{enumerable:!0,get:function(){return Oyt.Uint32List}});var Pyt=kde();Object.defineProperty(le,"Uint64List",{enumerable:!0,get:function(){return Pyt.Uint64List}});var Gde=cB();Object.defineProperty(le,"Void",{enumerable:!0,get:function(){return Gde.Void}});Object.defineProperty(le,"VOID",{enumerable:!0,get:function(){return Gde.VOID}});var Iyt=Bde();Object.defineProperty(le,"VoidList",{enumerable:!0,get:function(){return Iyt.VoidList}})});var Hde=h(lA=>{"use strict";var zde;Object.defineProperty(lA,"__esModule",{value:!0});lA.Segment=void 0;var wyt=(at(),ct(ot)),Tyt=wyt.__importDefault(mt()),cb=Ji(),U_=Qn(),Vde=kN(),ep=Ni(),Nyt=cA(),lb=Tyt.default("capnp:segment");lb("load");var lB=class{static{s(this,"Segment")}constructor(t,r,n,i=0){this[zde]="Segment",this.id=t,this.message=r,this.buffer=n,this._dv=new DataView(n),this.byteOffset=0,this.byteLength=i}allocate(t){lb("allocate(%d)",t);let r=this;if(t=ep.padToWord(t),t>cb.MAX_SEGMENT_LENGTH-8)throw new Error(ep.format(U_.SEG_SIZE_OVERFLOW,t));r.hasCapacity(t)||(r=r.message.allocateSegment(t));let n=r.byteLength;return r.byteLength=r.byteLength+t,lb("Allocated %x bytes in %s (requested segment: %s).",t,this,r),new Nyt.Pointer(r,n)}copyWord(t,r,n){let i=r._dv.getFloat64(n,cb.NATIVE_LITTLE_ENDIAN);this._dv.setFloat64(t,i,cb.NATIVE_LITTLE_ENDIAN)}copyWords(t,r,n,i){let o=new Float64Array(this.buffer,t,i),a=new Float64Array(r.buffer,n,i);o.set(a)}fillZeroWords(t,r){new Float64Array(this.buffer,t,r).fill(0)}getBigInt64(t,r){throw new Error(ep.format(U_.NOT_IMPLEMENTED,t,r))}getBigUint64(t,r){throw new Error(ep.format(U_.NOT_IMPLEMENTED,t,r))}getCapacity(){return this.buffer.byteLength}getFloat32(t){return this._dv.getFloat32(t,!0)}getFloat64(t){return this._dv.getFloat64(t,!0)}getInt16(t){return this._dv.getInt16(t,!0)}getInt32(t){return this._dv.getInt32(t,!0)}getInt64(t){return new Vde.Int64(new Uint8Array(this.buffer.slice(t,t+8)))}getInt8(t){return this._dv.getInt8(t)}getUint16(t){return this._dv.getUint16(t,!0)}getUint32(t){return this._dv.getUint32(t,!0)}getUint64(t){return new Vde.Uint64(new Uint8Array(this.buffer.slice(t,t+8)))}getUint8(t){return this._dv.getUint8(t)}hasCapacity(t){return lb("hasCapacity(%d)",t),this.buffer.byteLength-this.byteLength>=t}isWordZero(t){return this._dv.getFloat64(t,cb.NATIVE_LITTLE_ENDIAN)===0}replaceBuffer(t){if(lb("replaceBuffer(%p)",t),this.buffer!==t){if(t.byteLength<this.byteLength)throw new Error(U_.SEG_REPLACEMENT_BUFFER_TOO_SMALL);this._dv=new DataView(t),this.buffer=t}}setBigInt64(t,r,n){throw new Error(ep.format(U_.NOT_IMPLEMENTED,t,r,n))}setBigUint64(t,r,n){throw new Error(ep.format(U_.NOT_IMPLEMENTED,t,r,n))}setFloat32(t,r){this._dv.setFloat32(t,r,!0)}setFloat64(t,r){this._dv.setFloat64(t,r,!0)}setInt16(t,r){this._dv.setInt16(t,r,!0)}setInt32(t,r){this._dv.setInt32(t,r,!0)}setInt8(t,r){this._dv.setInt8(t,r)}setInt64(t,r){this._dv.setUint8(t,r.buffer[0]),this._dv.setUint8(t+1,r.buffer[1]),this._dv.setUint8(t+2,r.buffer[2]),this._dv.setUint8(t+3,r.buffer[3]),this._dv.setUint8(t+4,r.buffer[4]),this._dv.setUint8(t+5,r.buffer[5]),this._dv.setUint8(t+6,r.buffer[6]),this._dv.setUint8(t+7,r.buffer[7])}setUint16(t,r){this._dv.setUint16(t,r,!0)}setUint32(t,r){this._dv.setUint32(t,r,!0)}setUint64(t,r){this._dv.setUint8(t+0,r.buffer[0]),this._dv.setUint8(t+1,r.buffer[1]),this._dv.setUint8(t+2,r.buffer[2]),this._dv.setUint8(t+3,r.buffer[3]),this._dv.setUint8(t+4,r.buffer[4]),this._dv.setUint8(t+5,r.buffer[5]),this._dv.setUint8(t+6,r.buffer[6]),this._dv.setUint8(t+7,r.buffer[7])}setUint8(t,r){this._dv.setUint8(t,r)}setWordZero(t){this._dv.setFloat64(t,0,cb.NATIVE_LITTLE_ENDIAN)}toString(){return ep.format("Segment_id:%d,off:%a,len:%a,cap:%a",this.id,this.byteLength,this.byteOffset,this.buffer.byteLength)}};lA.Segment=lB;zde=Symbol.toStringTag});var tpe=h(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.getStreamFrame=Pt.toPackedArrayBuffer=Pt.toArrayBuffer=Pt.setRoot=Pt.readRawPointer=Pt.initRoot=Pt.getSegment=Pt.getRoot=Pt.dump=Pt.allocateSegment=Pt.preallocateSegments=Pt.getFramedSegments=Pt.initMessage=Pt.Message=void 0;var Ayt=(at(),ct(ot)),Ryt=Ayt.__importDefault(mt()),fb=Ji(),x_=Qn(),q_=Ni(),ol=Yle(),fB=tfe(),fA=cA(),dB=Hde(),Kde=Jt(),Wde=JN(),Ca=Ryt.default("capnp:message");Ca("load");var Bs=class{static{s(this,"Message")}constructor(t,r=!0,n=!1){this._capnp=Yde(t,r,n),t&&!Qde(t)&&Xde(this),Ca("new %s",this)}allocateSegment(t){return dA(t,this)}dump(){return pB(this)}getRoot(t){return hB(t,this)}getSegment(t){return pA(t,this)}initRoot(t){return mB(t,this)}setRoot(t){epe(t,this)}toArrayBuffer(){return _B(this)}toPackedArrayBuffer(){return gB(this)}toString(){return`Message_arena:${this._capnp.arena}`}};Pt.Message=Bs;Bs.allocateSegment=dA;Bs.dump=pB;Bs.getRoot=hB;Bs.getSegment=pA;Bs.initRoot=mB;Bs.readRawPointer=Zde;Bs.toArrayBuffer=_B;Bs.toPackedArrayBuffer=gB;function Yde(e,t=!0,r=!1){if(e===void 0)return{arena:new ol.SingleSegmentArena,segments:[],traversalLimit:fb.DEFAULT_TRAVERSE_LIMIT};if(Qde(e))return{arena:e,segments:[],traversalLimit:fb.DEFAULT_TRAVERSE_LIMIT};let n=e;return Cyt(n)&&(n=n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength)),t&&(n=fB.unpack(n)),r?{arena:new ol.SingleSegmentArena(n),segments:[],traversalLimit:fb.DEFAULT_TRAVERSE_LIMIT}:{arena:new ol.MultiSegmentArena(Jde(n)),segments:[],traversalLimit:fb.DEFAULT_TRAVERSE_LIMIT}}s(Yde,"initMessage");Pt.initMessage=Yde;function Jde(e){let t=new DataView(e),r=t.getUint32(0,!0)+1,n=new Array(r);Ca("reading %d framed segments from stream",r);let i=4+r*4;if(i+=i%8,i+r*4>e.byteLength)throw new Error(x_.MSG_INVALID_FRAME_HEADER);for(let o=0;o<r;o++){let a=t.getUint32(4+o*4,!0)*8;if(i+a>e.byteLength)throw new Error(x_.MSG_INVALID_FRAME_HEADER);n[o]=e.slice(i,i+a),i+=a}return n}s(Jde,"getFramedSegments");Pt.getFramedSegments=Jde;function Xde(e){let t=ol.Arena.getNumSegments(e._capnp.arena);if(t<1)throw new Error(x_.MSG_NO_SEGMENTS_IN_ARENA);e._capnp.segments=new Array(t);for(let r=0;r<t;r++){let n=ol.Arena.getBuffer(r,e._capnp.arena),i=new dB.Segment(r,e,n,n.byteLength);e._capnp.segments[r]=i}}s(Xde,"preallocateSegments");Pt.preallocateSegments=Xde;function Cyt(e){return e.byteOffset!==void 0}s(Cyt,"isArrayBufferView");function Qde(e){return e.kind!==void 0}s(Qde,"isAnyArena");function dA(e,t){Ca("allocating %x bytes for %s",e,t);let r=ol.Arena.allocate(e,t._capnp.segments,t._capnp.arena),n;if(r.id===t._capnp.segments.length)n=new dB.Segment(r.id,t,r.buffer),Ca("adding new segment %s",n),t._capnp.segments.push(n);else{if(r.id<0||r.id>t._capnp.segments.length)throw new Error(q_.format(x_.MSG_SEGMENT_OUT_OF_BOUNDS,r.id,t));n=t._capnp.segments[r.id],Ca("replacing segment %s with buffer (len:%d)",n,r.buffer.byteLength),n.replaceBuffer(r.buffer)}return n}s(dA,"allocateSegment");Pt.allocateSegment=dA;function pB(e){let t="";if(e._capnp.segments.length===0)return`================
|
|
314
|
+
`,t.byteLength-r)),n}s(Zht,"dumpBuffer");Yt.dumpBuffer=Zht;function emt(e){let t=e.length,r=new Uint8Array(new ArrayBuffer(t*4)),n=0;for(let i=0;i<t;i++){let o=e.charCodeAt(i);if(o<=127)r[n++]=o;else if(o<=2047)r[n++]=192|o>>>6,r[n++]=128|o>>>0&63;else if(o<=55295||o>=57344)r[n++]=224|o>>>12,r[n++]=128|o>>>6&63,r[n++]=128|o>>>0&63;else{if(i+1>=t)throw new RangeError(rl.RANGE_INVALID_UTF8);let a=o-55296,u=e.charCodeAt(++i)-56320,c=(a<<10|u)+65536;r[n++]=240|c>>>18,r[n++]=128|c>>>12&63,r[n++]=128|c>>>6&63,r[n++]=128|c>>>0&63}}return r.subarray(0,n)}s(emt,"encodeUtf8");Yt.encodeUtf8=emt;function Tk(e,...t){let r=e.length,n,i=0,o,a=!1,u=0,c=!1,l,f="";function d(){return t[i++]}s(d,"nextArg");function _(){let m="";for(;/\d/.test(e[u]);)m+=e[u++],o=e[u];return m.length>0?parseInt(m,10):null}for(s(_,"slurpNumber");u<r;++u)if(o=e[u],a)switch(a=!1,o==="."?(c=!1,o=e[++u]):o==="0"&&e[u+1]==="."?(c=!0,u+=2,o=e[u]):c=!0,l=_(),o){case"a":f+="0x"+O_(parseInt(String(d()),10).toString(16),8);break;case"b":f+=parseInt(String(d()),10).toString(2);break;case"c":n=d(),typeof n=="string"||n instanceof String?f+=n:f+=String.fromCharCode(parseInt(String(n),10));break;case"d":f+=parseInt(String(d()),10);break;case"f":{let m=parseFloat(String(d())).toFixed(l||6);f+=c?m:m.replace(/^0/,"");break}case"j":f+=JSON.stringify(d());break;case"o":f+="0"+parseInt(String(d()),10).toString(8);break;case"s":f+=d();break;case"x":f+="0x"+parseInt(String(d()),10).toString(16);break;case"X":f+="0x"+parseInt(String(d()),10).toString(16).toUpperCase();break;default:f+=o;break}else o==="%"?a=!0:f+=o;return f}s(Tk,"format");Yt.format=Tk;function tmt(e){return e}s(tmt,"identity");Yt.identity=tmt;function O_(e,t,r="0"){return e.length>=t?e:new Array(t-e.length+1).join(r)+e}s(O_,"pad");Yt.pad=O_;function rmt(e){return e+7&-8}s(rmt,"padToWord");Yt.padToWord=rmt;function Mle(e,t){let r="",n=e,i=t;if(n<1||n>Number.MAX_VALUE)return r;do n%2&&(r+=i),n=Math.floor(n/2),n&&(i+=i);while(n);return r}s(Mle,"repeat");Yt.repeat=Mle;var rN=s(e=>parseInt(String(e)).toString(16),"hex");ZE.default.formatters.h=rN;ZE.default.formatters.x=e=>`0x${rN(e)}`;ZE.default.formatters.a=e=>`0x${O_(rN(e),8)}`;ZE.default.formatters.X=e=>`0x${rN(e).toUpperCase()}`});var tb=h(eb=>{"use strict";Object.defineProperty(eb,"__esModule",{value:!0});eb.ArenaKind=void 0;var nmt;(function(e){e[e.SINGLE_SEGMENT=0]="SINGLE_SEGMENT",e[e.MULTI_SEGMENT=1]="MULTI_SEGMENT"})(nmt=eb.ArenaKind||(eb.ArenaKind={}))});var Ak=h(nN=>{"use strict";Object.defineProperty(nN,"__esModule",{value:!0});nN.ArenaAllocationResult=void 0;var imt=(at(),ct(ot)),smt=imt.__importDefault(mt()),Ule=smt.default("capnp:serialization:arena:arena-allocation-result");Ule("load");var Nk=class{static{s(this,"ArenaAllocationResult")}constructor(t,r){this.id=t,this.buffer=r,Ule("new",this)}};nN.ArenaAllocationResult=Nk});var $k=h(wa=>{"use strict";Object.defineProperty(wa,"__esModule",{value:!0});wa.getNumSegments=wa.getBuffer=wa.allocate=wa.MultiSegmentArena=void 0;var omt=(at(),ct(ot)),amt=omt.__importDefault(mt()),umt=Ji(),cmt=Qn(),Rk=Ni(),lmt=Ak(),fmt=tb(),xle=amt.default("capnp:arena:multi");xle("load");var P_=class{static{s(this,"MultiSegmentArena")}constructor(t=[]){this.kind=fmt.ArenaKind.MULTI_SEGMENT,this.buffers=t,xle("new %s",this)}toString(){return Rk.format("MultiSegmentArena_segments:%d",Ck(this))}};wa.MultiSegmentArena=P_;P_.allocate=qle;P_.getBuffer=Fle;P_.getNumSegments=Ck;function qle(e,t){let r=new ArrayBuffer(Rk.padToWord(Math.max(e,umt.DEFAULT_BUFFER_SIZE)));return t.buffers.push(r),new lmt.ArenaAllocationResult(t.buffers.length-1,r)}s(qle,"allocate");wa.allocate=qle;function Fle(e,t){if(e<0||e>=t.buffers.length)throw new Error(Rk.format(cmt.SEG_ID_OUT_OF_BOUNDS,e));return t.buffers[e]}s(Fle,"getBuffer");wa.getBuffer=Fle;function Ck(e){return e.buffers.length}s(Ck,"getNumSegments");wa.getNumSegments=Ck});var jk=h(Ta=>{"use strict";Object.defineProperty(Ta,"__esModule",{value:!0});Ta.getNumSegments=Ta.getBuffer=Ta.allocate=Ta.SingleSegmentArena=void 0;var dmt=(at(),ct(ot)),pmt=dmt.__importDefault(mt()),Dk=Ji(),kle=Qn(),iN=Ni(),hmt=Ak(),mmt=tb(),Lk=pmt.default("capnp:arena:single");Lk("load");var I_=class{static{s(this,"SingleSegmentArena")}constructor(t=new ArrayBuffer(Dk.DEFAULT_BUFFER_SIZE)){if(this.kind=mmt.ArenaKind.SINGLE_SEGMENT,t.byteLength&7)throw new Error(iN.format(kle.SEG_NOT_WORD_ALIGNED,t.byteLength));this.buffer=t,Lk("new %s",this)}toString(){return iN.format("SingleSegmentArena_len:%x",this.buffer.byteLength)}};Ta.SingleSegmentArena=I_;I_.allocate=Ble;I_.getBuffer=Gle;I_.getNumSegments=Vle;function Ble(e,t,r){Lk("Allocating %x bytes for segment 0 in %s.",e,r);let n=t.length>0?t[0].buffer:r.buffer;return e<Dk.MIN_SINGLE_SEGMENT_GROWTH?e=Dk.MIN_SINGLE_SEGMENT_GROWTH:e=iN.padToWord(e),r.buffer=new ArrayBuffer(n.byteLength+e),new Float64Array(r.buffer).set(new Float64Array(n)),new hmt.ArenaAllocationResult(0,r.buffer)}s(Ble,"allocate");Ta.allocate=Ble;function Gle(e,t){if(e!==0)throw new Error(iN.format(kle.SEG_GET_NON_ZERO_SINGLE,e));return t.buffer}s(Gle,"getBuffer");Ta.getBuffer=Gle;function Vle(){return 1}s(Vle,"getNumSegments");Ta.getNumSegments=Vle});var Wle=h(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.getNumSegments=Na.getBuffer=Na.allocate=Na.Arena=void 0;var _mt=(at(),ct(ot)),gmt=_mt.__importDefault(mt()),Mk=Qn(),w_=tb(),Uk=$k(),xk=jk(),ymt=gmt.default("capnp:arena");ymt("load");var T_=class{static{s(this,"Arena")}};Na.Arena=T_;T_.allocate=zle;T_.getBuffer=Hle;T_.getNumSegments=Kle;function zle(e,t,r){switch(r.kind){case w_.ArenaKind.MULTI_SEGMENT:return Uk.MultiSegmentArena.allocate(e,r);case w_.ArenaKind.SINGLE_SEGMENT:return xk.SingleSegmentArena.allocate(e,t,r);default:return Mk.assertNever(r)}}s(zle,"allocate");Na.allocate=zle;function Hle(e,t){switch(t.kind){case w_.ArenaKind.MULTI_SEGMENT:return Uk.MultiSegmentArena.getBuffer(e,t);case w_.ArenaKind.SINGLE_SEGMENT:return xk.SingleSegmentArena.getBuffer(e,t);default:return Mk.assertNever(t)}}s(Hle,"getBuffer");Na.getBuffer=Hle;function Kle(e){switch(e.kind){case w_.ArenaKind.MULTI_SEGMENT:return Uk.MultiSegmentArena.getNumSegments(e);case w_.ArenaKind.SINGLE_SEGMENT:return xk.SingleSegmentArena.getNumSegments();default:return Mk.assertNever(e)}}s(Kle,"getNumSegments");Na.getNumSegments=Kle});var Yle=h(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});Aa.SingleSegmentArena=Aa.MultiSegmentArena=Aa.ArenaKind=Aa.Arena=void 0;var Emt=Wle();Object.defineProperty(Aa,"Arena",{enumerable:!0,get:function(){return Emt.Arena}});var bmt=tb();Object.defineProperty(Aa,"ArenaKind",{enumerable:!0,get:function(){return bmt.ArenaKind}});var Smt=$k();Object.defineProperty(Aa,"MultiSegmentArena",{enumerable:!0,get:function(){return Smt.MultiSegmentArena}});var vmt=jk();Object.defineProperty(Aa,"SingleSegmentArena",{enumerable:!0,get:function(){return vmt.SingleSegmentArena}})});var tfe=h(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});Ai.unpack=Ai.pack=Ai.getZeroByteCount=Ai.getUnpackedByteLength=Ai.getTagByte=Ai.getHammingWeight=void 0;var Jle=Ji(),Omt=Qn();function Xle(e){let t=e-(e>>1&1431655765);return t=(t&858993459)+(t>>2&858993459),(t+(t>>4)&252645135)*16843009>>24}s(Xle,"getHammingWeight");Ai.getHammingWeight=Xle;function Qle(e,t,r,n,i,o,a,u){return(e===0?0:1)|(t===0?0:2)|(r===0?0:4)|(n===0?0:8)|(i===0?0:16)|(o===0?0:32)|(a===0?0:64)|(u===0?0:128)}s(Qle,"getTagByte");Ai.getTagByte=Qle;function Zle(e){let t=new Uint8Array(e),r=0,n=119;for(let i=0;i<t.byteLength;){let o=t[i];n===0?(r+=o,i++,n=119):n===255?(r+=o,i+=o*8+1,n=119):(r++,i+=Xle(o)+1,n=o)}return r*8}s(Zle,"getUnpackedByteLength");Ai.getUnpackedByteLength=Zle;function efe(e,t,r,n,i,o,a,u){return(e===0?1:0)+(t===0?1:0)+(r===0?1:0)+(n===0?1:0)+(i===0?1:0)+(o===0?1:0)+(a===0?1:0)+(u===0?1:0)}s(efe,"getZeroByteCount");Ai.getZeroByteCount=efe;function Pmt(e,t=0,r){if(e.byteLength%8!==0)throw new Error(Omt.MSG_PACK_NOT_WORD_ALIGNED);let n=new Uint8Array(e,t,r),i=[],o=119,a=NaN,u=0,c=Jle.PACK_SPAN_THRESHOLD;for(let l=0;l<n.byteLength;l+=8){let f=n[l],d=n[l+1],_=n[l+2],m=n[l+3],g=n[l+4],y=n[l+5],b=n[l+6],E=n[l+7],v=Qle(f,d,_,m,g,y,b,E),O=!0;switch(o){case 0:v!==0||u>=255?(i.push(u),u=0,O=!1):u++;break;case 255:{let I=efe(f,d,_,m,g,y,b,E);c-=I,c<=0||u>=255?(i[a]=u,u=0,c=Jle.PACK_SPAN_THRESHOLD,O=!1):(i.push(f,d,_,m,g,y,b,E),u++);break}default:O=!1;break}O||(i.push(v),o=v,f!==0&&i.push(f),d!==0&&i.push(d),_!==0&&i.push(_),m!==0&&i.push(m),g!==0&&i.push(g),y!==0&&i.push(y),b!==0&&i.push(b),E!==0&&i.push(E),v===255&&(a=i.length,i.push(0)))}return o===0?i.push(u):o===255&&(i[a]=u),new Uint8Array(i).buffer}s(Pmt,"pack");Ai.pack=Pmt;function Imt(e){let t=new Uint8Array(e),r=new Uint8Array(new ArrayBuffer(Zle(e))),n=119;for(let i=0,o=0;i<t.byteLength;){let a=t[i];if(n===0)o+=a*8,i++,n=119;else if(n===255){let u=a*8;r.set(t.subarray(i+1,i+1+u),o),o+=u,i+=1+u,n=119}else{i++;for(let u=1;u<=128;u<<=1)a&u&&(r[o]=t[i++]),o++;n=a}}return r.buffer}s(Imt,"unpack");Ai.unpack=Imt});var zd=h(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});ks.padToWord=ks.getWordLength=ks.getDataWordLength=ks.getByteLength=ks.ObjectSize=void 0;var rfe=(at(),ct(ot)),wmt=rfe.__importDefault(mt()),nfe=rfe.__importStar(Ni()),Tmt=wmt.default("capnp:object-size");Tmt("load");var sN=class{static{s(this,"ObjectSize")}constructor(t,r){this.dataByteLength=t,this.pointerLength=r}toString(){return nfe.format("ObjectSize_dw:%d,pc:%d",ife(this),this.pointerLength)}};ks.ObjectSize=sN;function Nmt(e){return e.dataByteLength+e.pointerLength*8}s(Nmt,"getByteLength");ks.getByteLength=Nmt;function ife(e){return e.dataByteLength/8}s(ife,"getDataWordLength");ks.getDataWordLength=ife;function Amt(e){return e.dataByteLength/8+e.pointerLength}s(Amt,"getWordLength");ks.getWordLength=Amt;function Rmt(e){return new sN(nfe.padToWord(e.dataByteLength),e.pointerLength)}s(Rmt,"padToWord");ks.padToWord=Rmt});var Hd=h(rb=>{"use strict";Object.defineProperty(rb,"__esModule",{value:!0});rb.PointerType=void 0;var Cmt;(function(e){e[e.STRUCT=0]="STRUCT",e[e.LIST=1]="LIST",e[e.FAR=2]="FAR",e[e.OTHER=3]="OTHER"})(Cmt=rb.PointerType||(rb.PointerType={}))});var kk=h(aN=>{"use strict";Object.defineProperty(aN,"__esModule",{value:!0});aN.Orphan=void 0;var $mt=(at(),ct(ot)),Dmt=$mt.__importDefault(mt()),oN=Qn(),qk=Ni(),sfe=cr(),Lmt=zd(),Ri=Jt(),nl=Hd(),ofe=Dmt.default("capnp:orphan");ofe("load");var Fk=class{static{s(this,"Orphan")}constructor(t){let r=Ri.getContent(t);switch(this.segment=r.segment,this.byteOffset=r.byteOffset,this._capnp={},this._capnp.type=Ri.getTargetPointerType(t),this._capnp.type){case nl.PointerType.STRUCT:this._capnp.size=Ri.getTargetStructSize(t);break;case nl.PointerType.LIST:this._capnp.length=Ri.getTargetListLength(t),this._capnp.elementSize=Ri.getTargetListElementSize(t),this._capnp.elementSize===sfe.ListElementSize.COMPOSITE&&(this._capnp.size=Ri.getTargetCompositeListSize(t));break;case nl.PointerType.OTHER:this._capnp.capId=Ri.getCapabilityId(t);break;default:throw new Error(oN.PTR_INVALID_POINTER_TYPE)}Ri.erasePointer(t)}_moveTo(t){if(this._capnp===void 0)throw new Error(qk.format(oN.PTR_ALREADY_ADOPTED,this));if(this.segment.message!==t.segment.message)throw new Error(qk.format(oN.PTR_ADOPT_WRONG_MESSAGE,this,t));Ri.erase(t);let r=Ri.initPointer(this.segment,this.byteOffset,t);switch(this._capnp.type){case nl.PointerType.STRUCT:Ri.setStructPointer(r.offsetWords,this._capnp.size,r.pointer);break;case nl.PointerType.LIST:{let n=r.offsetWords;this._capnp.elementSize===sfe.ListElementSize.COMPOSITE&&n--,Ri.setListPointer(n,this._capnp.elementSize,this._capnp.length,r.pointer,this._capnp.size);break}case nl.PointerType.OTHER:Ri.setInterfacePointer(this._capnp.capId,r.pointer);break;default:throw new Error(oN.PTR_INVALID_POINTER_TYPE)}this._capnp=void 0}dispose(){if(this._capnp===void 0){ofe("not disposing an already disposed orphan",this);return}switch(this._capnp.type){case nl.PointerType.STRUCT:this.segment.fillZeroWords(this.byteOffset,Lmt.getWordLength(this._capnp.size));break;case nl.PointerType.LIST:{let t=Ri.getListByteLength(this._capnp.elementSize,this._capnp.length,this._capnp.size);this.segment.fillZeroWords(this.byteOffset,t);break}default:break}this._capnp=void 0}toString(){return qk.format("Orphan_%d@%a,type:%s",this.segment.id,this.byteOffset,this._capnp&&this._capnp.type)}};aN.Orphan=Fk});var afe=h(uN=>{"use strict";Object.defineProperty(uN,"__esModule",{value:!0});uN.PointerAllocationResult=void 0;var jmt=(at(),ct(ot)),Mmt=jmt.__importDefault(mt()),Umt=Mmt.default("capnp:pointer-allocation-result");Umt("load");var Bk=class{static{s(this,"PointerAllocationResult")}constructor(t,r){this.pointer=t,this.offsetWords=r}};uN.PointerAllocationResult=Bk});var Jt=h(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.trackPointerAllocation=V.copyFromStruct=V.copyFromList=V.validate=V.setStructPointer=V.setListPointer=V.setInterfacePointer=V.setFarPointer=V.relocateTo=V.isNull=V.isDoubleFar=V.initPointer=V.getTargetStructSize=V.getTargetPointerType=V.getTargetListLength=V.getTargetListElementSize=V.getTargetCompositeListSize=V.getTargetCompositeListTag=V.getStructSize=V.getStructPointerLength=V.getStructDataWords=V.getPointerType=V.getOffsetWords=V.getListLength=V.getListElementSize=V.getFarSegmentId=V.getContent=V.getCapabilityId=V.followFars=V.followFar=V.erasePointer=V.erase=V.copyFrom=V.add=V.getListElementByteLength=V.getListByteLength=V.dump=V.disown=V.adopt=V.Pointer=void 0;var xmt=(at(),ct(ot)),qmt=xmt.__importDefault(mt()),R_=Ji(),ln=Ni(),Ht=cr(),Xi=zd(),Fmt=kk(),Gk=afe(),Ci=Hd(),Zn=Qn(),N_=qmt.default("capnp:pointer");N_("load");var yr=class{static{s(this,"Pointer")}constructor(t,r,n=R_.MAX_DEPTH){if(this._capnp={compositeList:!1,depthLimit:n},this.segment=t,this.byteOffset=r,n===0)throw new Error(ln.format(Zn.PTR_DEPTH_LIMIT_EXCEEDED,this));if(Efe(t.message,this),r<0||r>t.byteLength)throw new Error(ln.format(Zn.PTR_OFFSET_OUT_OF_BOUNDS,r));N_("new %s",this)}toString(){return ln.format("Pointer_%d@%a,%s,limit:%x",this.segment.id,this.byteOffset,zk(this),this._capnp.depthLimit)}};V.Pointer=yr;yr.adopt=ufe;yr.copyFrom=nb;yr.disown=cfe;yr.dump=zk;yr.isNull=ob;yr._capnp={displayName:"Pointer"};function ufe(e,t){e._moveTo(t)}s(ufe,"adopt");V.adopt=ufe;function cfe(e){return new Fmt.Orphan(e)}s(cfe,"disown");V.disown=cfe;function zk(e){return ln.bufferToHex(e.segment.buffer.slice(e.byteOffset,e.byteOffset+8))}s(zk,"dump");V.dump=zk;function kmt(e,t,r){switch(e){case Ht.ListElementSize.BIT:return ln.padToWord(t+7>>>3);case Ht.ListElementSize.BYTE:case Ht.ListElementSize.BYTE_2:case Ht.ListElementSize.BYTE_4:case Ht.ListElementSize.BYTE_8:case Ht.ListElementSize.POINTER:case Ht.ListElementSize.VOID:return ln.padToWord(lN(e)*t);case Ht.ListElementSize.COMPOSITE:if(r===void 0)throw new Error(ln.format(Zn.PTR_INVALID_LIST_SIZE,NaN));return t*ln.padToWord(Xi.getByteLength(r));default:throw new Error(Zn.PTR_INVALID_LIST_SIZE)}}s(kmt,"getListByteLength");V.getListByteLength=kmt;function lN(e){switch(e){case Ht.ListElementSize.BIT:return NaN;case Ht.ListElementSize.BYTE:return 1;case Ht.ListElementSize.BYTE_2:return 2;case Ht.ListElementSize.BYTE_4:return 4;case Ht.ListElementSize.BYTE_8:case Ht.ListElementSize.POINTER:return 8;case Ht.ListElementSize.COMPOSITE:return NaN;case Ht.ListElementSize.VOID:return 0;default:throw new Error(ln.format(Zn.PTR_INVALID_LIST_SIZE,e))}}s(lN,"getListElementByteLength");V.getListElementByteLength=lN;function Vk(e,t){return new yr(t.segment,t.byteOffset+e,t._capnp.depthLimit)}s(Vk,"add");V.add=Vk;function nb(e,t){if(t.segment===e.segment&&t.byteOffset===e.byteOffset){N_("ignoring copy operation from identical pointer %s",e);return}if(A_(t),!ob(e))switch(D_(e)){case Ci.PointerType.STRUCT:yfe(e,t);break;case Ci.PointerType.LIST:gfe(e,t);break;default:throw new Error(ln.format(Zn.PTR_INVALID_POINTER_TYPE,D_(t)))}}s(nb,"copyFrom");V.copyFrom=nb;function A_(e){if(ob(e))return;let t;switch(D_(e)){case Ci.PointerType.STRUCT:{let r=Jk(e);t=C_(e),t.segment.fillZeroWords(t.byteOffset,r.dataByteLength/8);for(let n=0;n<r.pointerLength;n++)A_(Vk(n*8,t));break}case Ci.PointerType.LIST:{let r=dN(e),n=Yk(e),i=ln.padToWord(n*lN(r));if(t=C_(e),r===Ht.ListElementSize.POINTER){for(let o=0;o<n;o++)A_(new yr(t.segment,t.byteOffset+o*8,e._capnp.depthLimit-1));break}else if(r===Ht.ListElementSize.COMPOSITE){let o=Vk(-8,t),a=sb(o),u=Xi.getByteLength(a);i=$_(o),t.segment.setWordZero(t.byteOffset-8);for(let c=0;c<n;c++)for(let l=0;l<a.pointerLength;l++)A_(new yr(t.segment,t.byteOffset+c*u+l*8,e._capnp.depthLimit-1))}t.segment.fillZeroWords(t.byteOffset,i);break}case Ci.PointerType.OTHER:break;default:throw new Error(ln.format(Zn.PTR_INVALID_POINTER_TYPE,D_(e)))}Hk(e)}s(A_,"erase");V.erase=A_;function Hk(e){if(ib(e)===Ci.PointerType.FAR){let t=fN(e);hN(e)&&t.segment.setWordZero(t.byteOffset+8),t.segment.setWordZero(t.byteOffset)}e.segment.setWordZero(e.byteOffset)}s(Hk,"erasePointer");V.erasePointer=Hk;function fN(e){let t=e.segment.message.getSegment(e.segment.getUint32(e.byteOffset+4)),r=e.segment.getUint32(e.byteOffset)>>>3;return new yr(t,r*8,e._capnp.depthLimit-1)}s(fN,"followFar");V.followFar=fN;function il(e){if(ib(e)===Ci.PointerType.FAR){let t=fN(e);return hN(e)&&(t.byteOffset+=8),t}return e}s(il,"followFars");V.followFars=il;function Bmt(e){return e.segment.getUint32(e.byteOffset+4)}s(Bmt,"getCapabilityId");V.getCapabilityId=Bmt;function Gmt(e){return D_(e)===Ci.PointerType.LIST&&dN(e)===Ht.ListElementSize.COMPOSITE}s(Gmt,"isCompositeList");function C_(e,t){let r;if(hN(e)){let n=fN(e);r=new yr(e.segment.message.getSegment(lfe(n)),$_(n)*8)}else{let n=il(e);r=new yr(n.segment,n.byteOffset+8+$_(n)*8)}return Gmt(e)&&(r.byteOffset+=8),!t&&e._capnp.compositeIndex!==void 0&&(r.byteOffset-=8,r.byteOffset+=8+e._capnp.compositeIndex*Xi.getByteLength(Xi.padToWord(sb(r)))),r}s(C_,"getContent");V.getContent=C_;function lfe(e){return e.segment.getUint32(e.byteOffset+4)}s(lfe,"getFarSegmentId");V.getFarSegmentId=lfe;function Kk(e){return e.segment.getUint32(e.byteOffset+4)&R_.LIST_SIZE_MASK}s(Kk,"getListElementSize");V.getListElementSize=Kk;function ffe(e){return e.segment.getUint32(e.byteOffset+4)>>>3}s(ffe,"getListLength");V.getListLength=ffe;function $_(e){let t=e.segment.getInt32(e.byteOffset);return t&2?t>>3:t>>2}s($_,"getOffsetWords");V.getOffsetWords=$_;function ib(e){return e.segment.getUint32(e.byteOffset)&R_.POINTER_TYPE_MASK}s(ib,"getPointerType");V.getPointerType=ib;function dfe(e){return e.segment.getUint16(e.byteOffset+4)}s(dfe,"getStructDataWords");V.getStructDataWords=dfe;function pfe(e){return e.segment.getUint16(e.byteOffset+6)}s(pfe,"getStructPointerLength");V.getStructPointerLength=pfe;function sb(e){return new Xi.ObjectSize(dfe(e)*8,pfe(e))}s(sb,"getStructSize");V.getStructSize=sb;function Wk(e){let t=C_(e);return t.byteOffset-=8,t}s(Wk,"getTargetCompositeListTag");V.getTargetCompositeListTag=Wk;function hfe(e){return sb(Wk(e))}s(hfe,"getTargetCompositeListSize");V.getTargetCompositeListSize=hfe;function dN(e){return Kk(il(e))}s(dN,"getTargetListElementSize");V.getTargetListElementSize=dN;function Yk(e){let t=il(e);return Kk(t)===Ht.ListElementSize.COMPOSITE?$_(Wk(e)):ffe(t)}s(Yk,"getTargetListLength");V.getTargetListLength=Yk;function D_(e){let t=ib(il(e));if(t===Ci.PointerType.FAR)throw new Error(ln.format(Zn.PTR_INVALID_FAR_TARGET,e));return t}s(D_,"getTargetPointerType");V.getTargetPointerType=D_;function Jk(e){return sb(il(e))}s(Jk,"getTargetStructSize");V.getTargetStructSize=Jk;function pN(e,t,r){if(r.segment!==e){if(N_("Initializing far pointer %s -> %s.",r,e),!e.hasCapacity(8)){let i=r.segment.allocate(16);return N_("GAH! Initializing double-far pointer in %s from %s -> %s.",r,e,i),cN(!0,i.byteOffset/8,i.segment.id,r),cN(!1,t/8,e.id,i),i.byteOffset+=8,new Gk.PointerAllocationResult(i,0)}let n=e.allocate(8);if(n.segment.id!==e.id)throw new Error(Zn.INVARIANT_UNREACHABLE_CODE);return cN(!1,n.byteOffset/8,n.segment.id,r),new Gk.PointerAllocationResult(n,(t-n.byteOffset-8)/8)}return N_("Initializing intra-segment pointer %s -> %a.",r,t),new Gk.PointerAllocationResult(r,(t-r.byteOffset-8)/8)}s(pN,"initPointer");V.initPointer=pN;function hN(e){return ib(e)===Ci.PointerType.FAR&&(e.segment.getUint32(e.byteOffset)&R_.POINTER_DOUBLE_FAR_MASK)!==0}s(hN,"isDoubleFar");V.isDoubleFar=hN;function ob(e){return e.segment.isWordZero(e.byteOffset)}s(ob,"isNull");V.isNull=ob;function Vmt(e,t){let r=il(t),n=r.segment.getUint8(r.byteOffset)&3,i=r.segment.getUint32(r.byteOffset+4);A_(e);let o=pN(r.segment,r.byteOffset+8+$_(r)*8,e);o.pointer.segment.setUint32(o.pointer.byteOffset,n|o.offsetWords<<2),o.pointer.segment.setUint32(o.pointer.byteOffset+4,i),Hk(t)}s(Vmt,"relocateTo");V.relocateTo=Vmt;function cN(e,t,r,n){let i=Ci.PointerType.FAR,o=e?1:0,a=t,u=r;n.segment.setUint32(n.byteOffset,i|o<<2|a<<3),n.segment.setUint32(n.byteOffset+4,u)}s(cN,"setFarPointer");V.setFarPointer=cN;function zmt(e,t){t.segment.setUint32(t.byteOffset,Ci.PointerType.OTHER),t.segment.setUint32(t.byteOffset+4,e)}s(zmt,"setInterfacePointer");V.setInterfacePointer=zmt;function mfe(e,t,r,n,i){let o=Ci.PointerType.LIST,a=e,u=t,c=r;if(t===Ht.ListElementSize.COMPOSITE){if(i===void 0)throw new TypeError(Zn.TYPE_COMPOSITE_SIZE_UNDEFINED);c*=Xi.getWordLength(i)}n.segment.setUint32(n.byteOffset,o|a<<2),n.segment.setUint32(n.byteOffset+4,u|c<<3)}s(mfe,"setListPointer");V.setListPointer=mfe;function _fe(e,t,r){let n=Ci.PointerType.STRUCT,i=e,o=Xi.getDataWordLength(t),a=t.pointerLength;r.segment.setUint32(r.byteOffset,n|i<<2),r.segment.setUint16(r.byteOffset+4,o),r.segment.setUint16(r.byteOffset+6,a)}s(_fe,"setStructPointer");V.setStructPointer=_fe;function Hmt(e,t,r){if(ob(t))return;let n=il(t);if((n.segment.getUint32(n.byteOffset)&R_.POINTER_TYPE_MASK)!==e)throw new Error(ln.format(Zn.PTR_WRONG_POINTER_TYPE,t,e));if(r!==void 0&&(n.segment.getUint32(n.byteOffset+4)&R_.LIST_SIZE_MASK)!==r)throw new Error(ln.format(Zn.PTR_WRONG_LIST_TYPE,t,Ht.ListElementSize[r]))}s(Hmt,"validate");V.validate=Hmt;function gfe(e,t){if(t._capnp.depthLimit<=0)throw new Error(Zn.PTR_DEPTH_LIMIT_EXCEEDED);let r=C_(e),n=dN(e),i=Yk(e),o,a,u;if(n===Ht.ListElementSize.POINTER){u=t.segment.allocate(i<<3);for(let l=0;l<i;l++){let f=new yr(r.segment,r.byteOffset+(l<<3),e._capnp.depthLimit-1),d=new yr(u.segment,u.byteOffset+(l<<3),t._capnp.depthLimit-1);nb(f,d)}}else if(n===Ht.ListElementSize.COMPOSITE){if(o=Xi.padToWord(hfe(e)),a=Xi.getByteLength(o),u=t.segment.allocate(Xi.getByteLength(o)*i+8),u.segment.copyWord(u.byteOffset,r.segment,r.byteOffset-8),o.dataByteLength>0){let l=Xi.getWordLength(o)*i;u.segment.copyWords(u.byteOffset+8,r.segment,r.byteOffset,l)}for(let l=0;l<i;l++)for(let f=0;f<o.pointerLength;f++){let d=l*a+o.dataByteLength+(f<<3),_=new yr(r.segment,r.byteOffset+d,e._capnp.depthLimit-1),m=new yr(u.segment,u.byteOffset+d+8,t._capnp.depthLimit-1);nb(_,m)}}else{let l=ln.padToWord(n===Ht.ListElementSize.BIT?i+7>>>3:lN(n)*i),f=l>>>3;u=t.segment.allocate(l),u.segment.copyWords(u.byteOffset,r.segment,r.byteOffset,f)}let c=pN(u.segment,u.byteOffset,t);mfe(c.offsetWords,n,i,c.pointer,o)}s(gfe,"copyFromList");V.copyFromList=gfe;function yfe(e,t){if(t._capnp.depthLimit<=0)throw new Error(Zn.PTR_DEPTH_LIMIT_EXCEEDED);let r=C_(e),n=Jk(e),i=Xi.getDataWordLength(n),o=t.segment.allocate(Xi.getByteLength(n));o.segment.copyWords(o.byteOffset,r.segment,r.byteOffset,i);for(let u=0;u<n.pointerLength;u++){let c=n.dataByteLength+u*8,l=new yr(r.segment,r.byteOffset+c,e._capnp.depthLimit-1),f=new yr(o.segment,o.byteOffset+c,t._capnp.depthLimit-1);nb(l,f)}if(t._capnp.compositeList)return;let a=pN(o.segment,o.byteOffset,t);_fe(a.offsetWords,n,a.pointer)}s(yfe,"copyFromStruct");V.copyFromStruct=yfe;function Efe(e,t){if(e._capnp.traversalLimit-=8,e._capnp.traversalLimit<=0)throw new Error(ln.format(Zn.PTR_TRAVERSAL_LIMIT_EXCEEDED,t))}s(Efe,"trackPointerAllocation");V.trackPointerAllocation=Efe});var Lr=h(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});Ra.set=Ra.get=Ra.initList=Ra.List=void 0;var Kmt=(at(),ct(ot)),Wmt=Kmt.__importDefault(mt()),bfe=Qn(),Xk=Ni(),wu=cr(),Sfe=zd(),Kd=Jt(),vfe=Wmt.default("capnp:list");vfe("load");var Wd=class extends Kd.Pointer{static{s(this,"List")}static toString(){return this._capnp.displayName}all(t){let r=this.getLength();for(let n=0;n<r;n++)if(!t(this.get(n),n))return!1;return!0}any(t){let r=this.getLength();for(let n=0;n<r;n++)if(t(this.get(n),n))return!0;return!1}ap(t){let r=this.getLength(),n=[];for(let i=0;i<r;i++)n.push(...t.map(o=>o(this.get(i),i)));return n}concat(t){let r=this.getLength(),n=t.getLength(),i=new Array(r+n);for(let o=0;o<r;o++)i[o]=this.get(o);for(let o=0;o<n;o++)i[o+r]=t.get(o);return i}drop(t){let r=this.getLength(),n=new Array(r);for(let i=t;i<r;i++)n[i]=this.get(i);return n}dropWhile(t){let r=this.getLength(),n=[],i=!0;for(let o=0;o<r;o++){let a=this.get(o);i&&(i=t(a,o)),i||n.push(a)}return n}empty(){return[]}every(t){return this.all(t)}filter(t){let r=this.getLength(),n=[];for(let i=0;i<r;i++){let o=this.get(i);t(o,i)&&n.push(o)}return n}find(t){let r=this.getLength();for(let n=0;n<r;n++){let i=this.get(n);if(t(i,n))return i}}findIndex(t){let r=this.getLength();for(let n=0;n<r;n++){let i=this.get(n);if(t(i,n))return n}return-1}forEach(t){let r=this.getLength();for(let n=0;n<r;n++)t(this.get(n),n)}get(t){return Qk(t,this)}getLength(){return Kd.getTargetListLength(this)}groupBy(t){let r=this.getLength(),n={};for(let i=0;i<r;i++){let o=this.get(i);n[t(o,i)]=o}return n}intersperse(t){let r=this.getLength(),n=new Array(r);for(let i=0;i<r;i++)i>0&&n.push(t),n.push(this.get(i));return n}map(t){let r=this.getLength(),n=new Array(r);for(let i=0;i<r;i++)n[i]=t(this.get(i),i);return n}reduce(t,r){let n=0,i;for(r===void 0?(i=this.get(0),n++):i=r;n<this.getLength();n++)i=t(i,this.get(n),n);return i}set(t,r){Zk(t,r,this)}slice(t=0,r){let n=r?Math.min(this.getLength(),r):this.getLength(),i=new Array(n-t);for(let o=t;o<n;o++)i[o]=this.get(o);return i}some(t){return this.any(t)}take(t){let r=Math.min(this.getLength(),t),n=new Array(r);for(let i=0;i<r;i++)n[i]=this.get(i);return n}takeWhile(t){let r=this.getLength(),n=[],i;for(let o=0;o<r;o++){let a=this.get(o);if(i=t(a,o),!i)return n;n.push(a)}return n}toArray(){return this.map(Xk.identity)}toString(){return`List_${super.toString()}`}};Ra.List=Wd;Wd._capnp={displayName:"List<Generic>",size:wu.ListElementSize.VOID};Wd.get=Qk;Wd.initList=Ofe;Wd.set=Zk;function Ofe(e,t,r,n){let i;switch(e){case wu.ListElementSize.BIT:i=r.segment.allocate(Math.ceil(t/8));break;case wu.ListElementSize.BYTE:case wu.ListElementSize.BYTE_2:case wu.ListElementSize.BYTE_4:case wu.ListElementSize.BYTE_8:case wu.ListElementSize.POINTER:i=r.segment.allocate(t*Kd.getListElementByteLength(e));break;case wu.ListElementSize.COMPOSITE:{if(n===void 0)throw new Error(Xk.format(bfe.PTR_COMPOSITE_SIZE_UNDEFINED));n=Sfe.padToWord(n);let a=Sfe.getByteLength(n)*t;i=r.segment.allocate(a+8),Kd.setStructPointer(t,n,i),vfe("Wrote composite tag word %s for %s.",i,r);break}case wu.ListElementSize.VOID:Kd.setListPointer(0,e,t,r);return;default:throw new Error(Xk.format(bfe.PTR_INVALID_LIST_SIZE,e))}let o=Kd.initPointer(i.segment,i.byteOffset,r);Kd.setListPointer(o.offsetWords,e,t,o.pointer,n)}s(Ofe,"initList");Ra.initList=Ofe;function Qk(e,t){throw new TypeError}s(Qk,"get");Ra.get=Qk;function Zk(e,t,r){throw new TypeError}s(Zk,"set");Ra.set=Zk});var L_=h(mN=>{"use strict";Object.defineProperty(mN,"__esModule",{value:!0});mN.PointerList=void 0;var Ymt=(at(),ct(ot)),Jmt=Ymt.__importDefault(mt()),Xmt=cr(),Qmt=Lr(),Pfe=Jt(),Zmt=Jmt.default("capnp:list:composite");Zmt("load");function e_t(e){var t;return t=class extends Qmt.List{static{s(this,"_a")}get(r){let n=Pfe.getContent(this);return new e(n.segment,n.byteOffset+r*8,this._capnp.depthLimit-1)}set(r,n){Pfe.copyFrom(n,this.get(r))}toString(){return`Pointer_${super.toString()},cls:${e.toString()}`}},t._capnp={displayName:`List<${e._capnp.displayName}>`,size:Xmt.ListElementSize.POINTER},t}s(e_t,"PointerList");mN.PointerList=e_t});var Ife=h(_N=>{"use strict";Object.defineProperty(_N,"__esModule",{value:!0});_N.AnyPointerList=void 0;var t_t=Jt(),r_t=L_();_N.AnyPointerList=r_t.PointerList(t_t.Pointer)});var Tfe=h(yN=>{"use strict";Object.defineProperty(yN,"__esModule",{value:!0});yN.BoolList=void 0;var n_t=(at(),ct(ot)),i_t=n_t.__importDefault(mt()),s_t=cr(),o_t=Lr(),wfe=Jt(),a_t=i_t.default("capnp:list:composite");a_t("load");var gN=class extends o_t.List{static{s(this,"BoolList")}get(t){let r=1<<t%8,n=t>>>3,i=wfe.getContent(this);return(i.segment.getUint8(i.byteOffset+n)&r)!==0}set(t,r){let n=1<<t%8,i=wfe.getContent(this),o=i.byteOffset+(t>>>3),a=i.segment.getUint8(o);i.segment.setUint8(o,r?a|n:a&~n)}toString(){return`Bool_${super.toString()}`}};yN.BoolList=gN;gN._capnp={displayName:"List<boolean>",size:s_t.ListElementSize.BIT}});var Nfe=h(EN=>{"use strict";Object.defineProperty(EN,"__esModule",{value:!0});EN.CompositeList=void 0;var u_t=(at(),ct(ot)),c_t=u_t.__importDefault(mt()),l_t=cr(),f_t=Lr(),d_t=Jt(),p_t=c_t.default("capnp:list:composite");p_t("load");function h_t(e){var t;return t=class extends f_t.List{static{s(this,"_a")}get(r){return new e(this.segment,this.byteOffset,this._capnp.depthLimit-1,r)}set(r,n){d_t.copyFrom(n,this.get(r))}toString(){return`Composite_${super.toString()},cls:${e.toString()}`}},t._capnp={compositeSize:e._capnp.size,displayName:`List<${e._capnp.displayName}>`,size:l_t.ListElementSize.COMPOSITE},t}s(h_t,"CompositeList");EN.CompositeList=h_t});var SN=h(bN=>{"use strict";Object.defineProperty(bN,"__esModule",{value:!0});bN.Data=void 0;var m_t=(at(),ct(ot)),__t=m_t.__importDefault(mt()),g_t=cr(),y_t=Lr(),Yd=Jt(),E_t=Hd(),eB=__t.default("capnp:data");eB("load");var tB=class extends y_t.List{static{s(this,"Data")}static fromPointer(t){return Yd.validate(E_t.PointerType.LIST,t,g_t.ListElementSize.BYTE),this._fromPointerUnchecked(t)}static _fromPointerUnchecked(t){return new this(t.segment,t.byteOffset,t._capnp.depthLimit)}copyBuffer(t){let r=Yd.getContent(this),n=this.getLength(),i=t.byteLength,o=t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,Math.min(n,i)),a=new Uint8Array(r.segment.buffer,r.byteOffset,this.getLength());a.set(o),n>i?(eB("Zeroing out remaining %d bytes after copy into %s.",n-i,this),a.fill(0,i,n)):n<i&&eB("Truncated %d bytes from source buffer while copying to %s.",i-n,this)}get(t){let r=Yd.getContent(this);return r.segment.getUint8(r.byteOffset+t)}set(t,r){let n=Yd.getContent(this);n.segment.setUint8(n.byteOffset+t,r)}toArrayBuffer(){let t=Yd.getContent(this);return t.segment.buffer.slice(t.byteOffset,t.byteOffset+this.getLength())}toDataView(){let t=Yd.getContent(this);return new DataView(t.segment.buffer,t.byteOffset,this.getLength())}toString(){return`Data_${super.toString()}`}toUint8Array(){let t=Yd.getContent(this);return new Uint8Array(t.segment.buffer,t.byteOffset,this.getLength())}};bN.Data=tB});var Afe=h(vN=>{"use strict";Object.defineProperty(vN,"__esModule",{value:!0});vN.DataList=void 0;var b_t=SN(),S_t=L_();vN.DataList=S_t.PointerList(b_t.Data)});var Cfe=h(PN=>{"use strict";Object.defineProperty(PN,"__esModule",{value:!0});PN.Float32List=void 0;var v_t=(at(),ct(ot)),O_t=v_t.__importDefault(mt()),P_t=cr(),I_t=Lr(),Rfe=Jt(),w_t=O_t.default("capnp:list:composite");w_t("load");var ON=class extends I_t.List{static{s(this,"Float32List")}get(t){let r=Rfe.getContent(this);return r.segment.getFloat32(r.byteOffset+t*4)}set(t,r){let n=Rfe.getContent(this);n.segment.setFloat32(n.byteOffset+t*4,r)}toString(){return`Float32_${super.toString()}`}};PN.Float32List=ON;ON._capnp={displayName:"List<Float32>",size:P_t.ListElementSize.BYTE_4}});var Dfe=h(wN=>{"use strict";Object.defineProperty(wN,"__esModule",{value:!0});wN.Float64List=void 0;var T_t=(at(),ct(ot)),N_t=T_t.__importDefault(mt()),A_t=cr(),R_t=Lr(),$fe=Jt(),C_t=N_t.default("capnp:list:composite");C_t("load");var IN=class extends R_t.List{static{s(this,"Float64List")}get(t){let r=$fe.getContent(this);return r.segment.getFloat64(r.byteOffset+t*8)}set(t,r){let n=$fe.getContent(this);n.segment.setFloat64(n.byteOffset+t*8,r)}toString(){return`Float64_${super.toString()}`}};wN.Float64List=IN;IN._capnp={displayName:"List<Float64>",size:A_t.ListElementSize.BYTE_8}});var jfe=h(NN=>{"use strict";Object.defineProperty(NN,"__esModule",{value:!0});NN.Int8List=void 0;var $_t=(at(),ct(ot)),D_t=$_t.__importDefault(mt()),L_t=cr(),j_t=Lr(),Lfe=Jt(),M_t=D_t.default("capnp:list:composite");M_t("load");var TN=class extends j_t.List{static{s(this,"Int8List")}get(t){let r=Lfe.getContent(this);return r.segment.getInt8(r.byteOffset+t)}set(t,r){let n=Lfe.getContent(this);n.segment.setInt8(n.byteOffset+t,r)}toString(){return`Int8_${super.toString()}`}};NN.Int8List=TN;TN._capnp={displayName:"List<Int8>",size:L_t.ListElementSize.BYTE}});var Ufe=h(RN=>{"use strict";Object.defineProperty(RN,"__esModule",{value:!0});RN.Int16List=void 0;var U_t=(at(),ct(ot)),x_t=U_t.__importDefault(mt()),q_t=cr(),F_t=Lr(),Mfe=Jt(),k_t=x_t.default("capnp:list:composite");k_t("load");var AN=class extends F_t.List{static{s(this,"Int16List")}get(t){let r=Mfe.getContent(this);return r.segment.getInt16(r.byteOffset+t*2)}set(t,r){let n=Mfe.getContent(this);n.segment.setInt16(n.byteOffset+t*2,r)}toString(){return`Int16_${super.toString()}`}};RN.Int16List=AN;AN._capnp={displayName:"List<Int16>",size:q_t.ListElementSize.BYTE_2}});var qfe=h($N=>{"use strict";Object.defineProperty($N,"__esModule",{value:!0});$N.Int32List=void 0;var B_t=(at(),ct(ot)),G_t=B_t.__importDefault(mt()),V_t=cr(),z_t=Lr(),xfe=Jt(),H_t=G_t.default("capnp:list:composite");H_t("load");var CN=class extends z_t.List{static{s(this,"Int32List")}get(t){let r=xfe.getContent(this);return r.segment.getInt32(r.byteOffset+t*4)}set(t,r){let n=xfe.getContent(this);n.segment.setInt32(n.byteOffset+t*4,r)}toString(){return`Int32_${super.toString()}`}};$N.Int32List=CN;CN._capnp={displayName:"List<Int32>",size:V_t.ListElementSize.BYTE_4}});var kfe=h(LN=>{"use strict";Object.defineProperty(LN,"__esModule",{value:!0});LN.Int64List=void 0;var K_t=(at(),ct(ot)),W_t=K_t.__importDefault(mt()),Y_t=cr(),J_t=Lr(),Ffe=Jt(),X_t=W_t.default("capnp:list:composite");X_t("load");var DN=class extends J_t.List{static{s(this,"Int64List")}get(t){let r=Ffe.getContent(this);return r.segment.getInt64(r.byteOffset+t*8)}set(t,r){let n=Ffe.getContent(this);n.segment.setInt64(n.byteOffset+t*8,r)}toString(){return`Int64_${super.toString()}`}};LN.Int64List=DN;DN._capnp={displayName:"List<Int64>",size:Y_t.ListElementSize.BYTE_8}});var nB=h(jN=>{"use strict";Object.defineProperty(jN,"__esModule",{value:!0});jN.Interface=void 0;var Q_t=Ji(),Z_t=Qn(),egt=Ni(),tgt=Jt(),rB=class extends tgt.Pointer{static{s(this,"Interface")}constructor(t,r,n=Q_t.MAX_DEPTH){throw super(t,r,n),new Error(egt.format(Z_t.NOT_IMPLEMENTED,"new Interface"))}};jN.Interface=rB});var Bfe=h(MN=>{"use strict";Object.defineProperty(MN,"__esModule",{value:!0});MN.InterfaceList=void 0;var rgt=nB(),ngt=L_();MN.InterfaceList=ngt.PointerList(rgt.Interface)});var sB=h(xN=>{"use strict";Object.defineProperty(xN,"__esModule",{value:!0});xN.Uint64=void 0;var igt=(at(),ct(ot)),sgt=igt.__importDefault(mt()),UN=Ji(),ogt=Qn(),agt=Ni(),Gfe=sgt.default("capnp:uint64");Gfe("load");var iB=class e{static{s(this,"Uint64")}constructor(t){if(t.byteLength<8)throw new RangeError(ogt.RANGE_INT64_UNDERFLOW);this.buffer=t}static fromArrayBuffer(t,r=0,n=!1){return n?new this(new Uint8Array(t,r,8)):new this(new Uint8Array(t.slice(r,r+8)))}static fromDataView(t,r=0,n=!1){return n?new this(new Uint8Array(t.buffer,t.byteOffset+r,8)):new this(new Uint8Array(t.buffer.slice(t.byteOffset+r,t.byteLength+r+8)))}static fromHexString(t){if(t.substr(0,2)==="0x"&&(t=t.substr(2)),t.length<1)return e.fromNumber(0);if(t[0]==="-")throw new RangeError("Source must not be negative.");if(t=agt.pad(t,16),t.length!==16)throw new RangeError("Source string must contain at most 16 hexadecimal digits.");let r=t.toLowerCase().replace(/[^\da-f]/g,""),n=new Uint8Array(new ArrayBuffer(8));for(let i=0;i<8;i++)n[7-i]=parseInt(r.substr(i*2,2),16);return new e(n)}static fromNumber(t){let r=new this(new Uint8Array(8));return r.setValue(t),r}static fromUint8Array(t,r=0,n=!1){return n?new this(t.subarray(r,r+8)):new this(new Uint8Array(t.buffer.slice(t.byteOffset+r,t.byteOffset+r+8)))}equals(t){for(let r=0;r<8;r++)if(this.buffer[r]!==t.buffer[r])return!1;return!0}inspect(){return`[Uint64 ${this.toString(10)} 0x${this.toHexString()}]`}isZero(){for(let t=0;t<8;t++)if(this.buffer[t]!==0)return!1;return!0}setValue(t,r){let n=t,i=r;if(i===void 0){if(i=n,i=Math.abs(i),n=i%UN.VAL32,i=i/UN.VAL32,i>UN.VAL32)throw new RangeError(`${t} is outside Uint64 range`);i=i>>>0}for(let o=0;o<8;o++)this.buffer[o]=n&255,n=o===3?i:n>>>8}toNumber(t){let r=this.buffer,n=0,i=0,o=1;for(;i<8;){let a=r[i];n+=a*o,o*=256,i++}return!t&&n>=UN.MAX_SAFE_INTEGER?(Gfe("Coercing out of range value %d to Infinity.",n),1/0):n}valueOf(){return this.toNumber(!1)}toArrayBuffer(){return this.buffer.buffer}toDataView(){return new DataView(this.buffer.buffer)}toHexString(){let t="";for(let r=7;r>=0;r--){let n=this.buffer[r].toString(16);n.length===1&&(n="0"+n),t+=n}return t}toString(t){return this.toNumber(!0).toString(t)}toUint8Array(){return this.buffer}};xN.Uint64=iB});var zfe=h(FN=>{"use strict";Object.defineProperty(FN,"__esModule",{value:!0});FN.Int64=void 0;var ugt=(at(),ct(ot)),cgt=ugt.__importDefault(mt()),qN=Ji(),lgt=Ni(),fgt=sB(),Vfe=cgt.default("capnp:int64");Vfe("load");var oB=class e extends fgt.Uint64{static{s(this,"Int64")}static fromArrayBuffer(t,r=0,n=!1){return n?new this(new Uint8Array(t,r,8)):new this(new Uint8Array(t.slice(r,r+8)))}static fromDataView(t,r=0,n=!1){return n?new this(new Uint8Array(t.buffer,t.byteOffset+r,8)):new this(new Uint8Array(t.buffer.slice(t.byteOffset+r,t.byteLength+r+8)))}static fromNumber(t){let r=new this(new Uint8Array(8));return r.setValue(t),r}static fromHexString(t){if(t.substr(0,2)==="0x"&&(t=t.substr(2)),t.length<1)return e.fromNumber(0);let r=t[0]==="-";if(r&&(t=t.substr(1)),t=lgt.pad(t,16),t.length!==16)throw new RangeError("Source string must contain at most 16 hexadecimal digits.");let n=t.toLowerCase().replace(/[^\da-f]/g,""),i=new Uint8Array(new ArrayBuffer(8));for(let a=0;a<8;a++)i[7-a]=parseInt(n.substr(a*2,2),16);let o=new e(i);return r&&o.negate(),o}static fromUint8Array(t,r=0,n=!1){return n?new this(t.subarray(r,r+8)):new this(new Uint8Array(t.buffer.slice(t.byteOffset+r,t.byteOffset+r+8)))}equals(t){return super.equals(t)}inspect(){return`[Int64 ${this.toString(10)} 0x${this.toHexString()}]`}negate(){for(let t=this.buffer,r=1,n=0;n<8;n++){let i=(t[n]^255)+r;t[n]=i&255,r=i>>8}}setValue(t,r){let n=!1,i=t,o=r;if(o===void 0){if(o=i,n=o<0,o=Math.abs(o),i=o%qN.VAL32,o=o/qN.VAL32,o>qN.VAL32)throw new RangeError(`${t} is outside Int64 range`);o=o>>>0}for(let a=0;a<8;a++)this.buffer[a]=i&255,i=a===3?o:i>>>8;n&&this.negate()}toHexString(){let t=this.buffer,r=t[7]&128;r&&this.negate();let n="";for(let i=7;i>=0;i--){let o=t[i].toString(16);o.length===1&&(o="0"+o),n+=o}return r&&(this.negate(),n="-"+n),n}toNumber(t){let r=this.buffer,n=r[7]&128,i=0,o=1,a=0,u=1;for(;a<8;){let c=r[a];n&&(c=(c^255)+o,o=c>>8,c=c&255),i+=c*u,u*=256,a++}return!t&&i>=qN.MAX_SAFE_INTEGER?(Vfe("Coercing out of range value %d to Infinity.",i),n?-1/0:1/0):n?-i:i}};FN.Int64=oB});var kN=h(j_=>{"use strict";Object.defineProperty(j_,"__esModule",{value:!0});j_.Uint64=j_.Int64=void 0;var dgt=zfe();Object.defineProperty(j_,"Int64",{enumerable:!0,get:function(){return dgt.Int64}});var pgt=sB();Object.defineProperty(j_,"Uint64",{enumerable:!0,get:function(){return pgt.Uint64}})});var zN=h(VN=>{"use strict";Object.defineProperty(VN,"__esModule",{value:!0});VN.Text=void 0;var hgt=(at(),ct(ot)),mgt=hgt.__importDefault(mt()),Hfe=Ni(),Kfe=cr(),Wfe=Lr(),Jd=Jt(),_gt=Hd(),BN=mgt.default("capnp:text");BN("load");var GN=class extends Wfe.List{static{s(this,"Text")}static fromPointer(t){return Jd.validate(_gt.PointerType.LIST,t,Kfe.ListElementSize.BYTE),ggt(t)}get(t=0){if(t!==0&&BN("Called get() on %s with a strange index (%d).",this,t),Jd.isNull(this))return"";let r=Jd.getContent(this);return Hfe.decodeUtf8(new Uint8Array(r.segment.buffer,r.byteOffset+t,this.getLength()-t))}getLength(){return super.getLength()-1}set(t,r){t!==0&&BN("Called set() on %s with a strange index (%d).",this,t);let n=Hfe.encodeUtf8(r),i=n.byteLength+t,o,a;if(!Jd.isNull(this)){o=Jd.getContent(this);let c=this.getLength();c>=t?c=t:BN("%d byte gap exists between original text and new text in %s.",t-c,this),a=new Uint8Array(o.segment.buffer.slice(o.byteOffset,o.byteOffset+Math.min(c,t))),Jd.erase(this)}Wfe.initList(Kfe.ListElementSize.BYTE,i+1,this),o=Jd.getContent(this);let u=new Uint8Array(o.segment.buffer,o.byteOffset,i);a&&u.set(a),u.set(n,t)}toString(){return`Text_${super.toString()}`}};VN.Text=GN;function ggt(e){return new GN(e.segment,e.byteOffset,e._capnp.depthLimit)}s(ggt,"textFromPointerUnchecked")});var JN=h(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.checkPointerBounds=q.checkDataBounds=q.testWhich=q.setVoid=q.setUint8=q.setUint64=q.setUint32=q.setUint16=q.setText=q.setPointer=q.setInt8=q.setInt64=q.setInt32=q.setInt16=q.setFloat64=q.setFloat32=q.setBit=q.initList=q.initData=q.getVoid=q.getUint8=q.getUint64=q.getUint32=q.getUint16=q.getText=q.getStruct=q.getSize=q.getPointerSection=q.getPointerAs=q.getPointer=q.getList=q.getInt8=q.getInt64=q.getInt32=q.getInt16=q.getFloat64=q.getFloat32=q.getDataSection=q.getData=q.getBit=q.getAs=q.disown=q.adopt=q.resize=q.initStructAt=q.initStruct=q.Struct=void 0;var ygt=(at(),ct(ot)),Egt=ygt.__importDefault(mt()),sr=Ji(),Yfe=kN(),Xd=Ni(),HN=cr(),To=zd(),Jfe=SN(),KN=Lr(),me=Jt(),aB=Hd(),Xfe=zN(),sl=Qn(),uB=Egt.default("capnp:struct");uB("load");var Dt=new DataView(new ArrayBuffer(8)),Fe=class extends me.Pointer{static{s(this,"Struct")}constructor(t,r,n=sr.MAX_DEPTH,i){super(t,r,n),this._capnp.compositeIndex=i,this._capnp.compositeList=i!==void 0}static toString(){return this._capnp.displayName}toString(){return`Struct_${super.toString()}${this._capnp.compositeIndex===void 0?"":`,ci:${this._capnp.compositeIndex}`}`}};q.Struct=Fe;Fe._capnp={displayName:"Struct"};Fe.getAs=ede;Fe.getBit=tde;Fe.getData=rde;Fe.getFloat32=nde;Fe.getFloat64=ide;Fe.getUint8=mde;Fe.getUint16=dde;Fe.getUint32=pde;Fe.getUint64=hde;Fe.getInt8=ude;Fe.getInt16=sde;Fe.getInt32=ode;Fe.getInt64=ade;Fe.getList=cde;Fe.getPointer=ab;Fe.getPointerAs=YN;Fe.getStruct=lde;Fe.getText=fde;Fe.initData=_de;Fe.initList=gde;Fe.initStruct=WN;Fe.initStructAt=Qfe;Fe.setBit=yde;Fe.setFloat32=Ede;Fe.setFloat64=bde;Fe.setUint8=Ade;Fe.setUint16=wde;Fe.setUint32=Tde;Fe.setUint64=Nde;Fe.setInt8=Pde;Fe.setInt16=Sde;Fe.setInt32=vde;Fe.setInt64=Ode;Fe.setText=Ide;Fe.testWhich=Rde;function WN(e,t){if(t._capnp.compositeIndex!==void 0)throw new Error(Xd.format(sl.PTR_INIT_COMPOSITE_STRUCT,t));me.erase(t);let r=t.segment.allocate(To.getByteLength(e)),n=me.initPointer(r.segment,r.byteOffset,t);me.setStructPointer(n.offsetWords,e,n.pointer)}s(WN,"initStruct");q.initStruct=WN;function Qfe(e,t,r){let n=YN(e,t,r);return WN(t._capnp.size,n),n}s(Qfe,"initStructAt");q.initStructAt=Qfe;function Zfe(e,t){let r=ub(t),n=me.getContent(t),i=t.segment.allocate(To.getByteLength(e));i.segment.copyWords(i.byteOffset,n.segment,n.byteOffset,Math.min(To.getDataWordLength(r),To.getDataWordLength(e)));let o=me.initPointer(i.segment,i.byteOffset,t);me.setStructPointer(o.offsetWords,e,o.pointer);for(let a=0;a<Math.min(r.pointerLength,e.pointerLength);a++){let u=new me.Pointer(n.segment,n.byteOffset+r.dataByteLength+a*8);if(me.isNull(u))continue;let c=me.followFars(u),l=me.getContent(u),f=new me.Pointer(i.segment,i.byteOffset+e.dataByteLength+a*8);me.getTargetPointerType(u)===aB.PointerType.LIST&&me.getTargetListElementSize(u)===HN.ListElementSize.COMPOSITE&&(l.byteOffset-=8);let d=me.initPointer(l.segment,l.byteOffset,f),_=c.segment.getUint8(c.byteOffset)&3,m=c.segment.getUint32(c.byteOffset+4);d.pointer.segment.setUint32(d.pointer.byteOffset,_|d.offsetWords<<2),d.pointer.segment.setUint32(d.pointer.byteOffset+4,m)}n.segment.fillZeroWords(n.byteOffset,To.getWordLength(r))}s(Zfe,"resize");q.resize=Zfe;function bgt(e,t){if(t._capnp.compositeIndex!==void 0)throw new Error(Xd.format(sl.PTR_ADOPT_COMPOSITE_STRUCT,t));me.Pointer.adopt(e,t)}s(bgt,"adopt");q.adopt=bgt;function Sgt(e){if(e._capnp.compositeIndex!==void 0)throw new Error(Xd.format(sl.PTR_DISOWN_COMPOSITE_STRUCT,e));return me.Pointer.disown(e)}s(Sgt,"disown");q.disown=Sgt;function ede(e,t){return new e(t.segment,t.byteOffset,t._capnp.depthLimit,t._capnp.compositeIndex)}s(ede,"getAs");q.getAs=ede;function tde(e,t,r){let n=Math.floor(e/8),i=1<<e%8;ar(n,1,t);let o=or(t),a=o.segment.getUint8(o.byteOffset+n);if(r===void 0)return(a&i)!==0;let u=r.getUint8(0);return((a^u)&i)!==0}s(tde,"getBit");q.getBit=tde;function rde(e,t,r){Zd(e,t);let n=Qd(t);n.byteOffset+=e*8;let i=new Jfe.Data(n.segment,n.byteOffset,t._capnp.depthLimit-1);return me.isNull(i)&&(r?me.Pointer.copyFrom(r,i):KN.List.initList(HN.ListElementSize.BYTE,0,i)),i}s(rde,"getData");q.getData=rde;function or(e){return me.getContent(e)}s(or,"getDataSection");q.getDataSection=or;function nde(e,t,r){ar(e,4,t);let n=or(t);if(r===void 0)return n.segment.getFloat32(n.byteOffset+e);let i=n.segment.getUint32(n.byteOffset+e)^r.getUint32(0,!0);return Dt.setUint32(0,i,sr.NATIVE_LITTLE_ENDIAN),Dt.getFloat32(0,sr.NATIVE_LITTLE_ENDIAN)}s(nde,"getFloat32");q.getFloat32=nde;function ide(e,t,r){ar(e,8,t);let n=or(t);if(r!==void 0){let i=n.segment.getUint32(n.byteOffset+e)^r.getUint32(0,!0),o=n.segment.getUint32(n.byteOffset+e+4)^r.getUint32(4,!0);return Dt.setUint32(0,i,sr.NATIVE_LITTLE_ENDIAN),Dt.setUint32(4,o,sr.NATIVE_LITTLE_ENDIAN),Dt.getFloat64(0,sr.NATIVE_LITTLE_ENDIAN)}return n.segment.getFloat64(n.byteOffset+e)}s(ide,"getFloat64");q.getFloat64=ide;function sde(e,t,r){ar(e,2,t);let n=or(t);if(r===void 0)return n.segment.getInt16(n.byteOffset+e);let i=n.segment.getUint16(n.byteOffset+e)^r.getUint16(0,!0);return Dt.setUint16(0,i,sr.NATIVE_LITTLE_ENDIAN),Dt.getInt16(0,sr.NATIVE_LITTLE_ENDIAN)}s(sde,"getInt16");q.getInt16=sde;function ode(e,t,r){ar(e,4,t);let n=or(t);if(r===void 0)return n.segment.getInt32(n.byteOffset+e);let i=n.segment.getUint32(n.byteOffset+e)^r.getUint16(0,!0);return Dt.setUint32(0,i,sr.NATIVE_LITTLE_ENDIAN),Dt.getInt32(0,sr.NATIVE_LITTLE_ENDIAN)}s(ode,"getInt32");q.getInt32=ode;function ade(e,t,r){ar(e,8,t);let n=or(t);if(r===void 0)return n.segment.getInt64(n.byteOffset+e);let i=n.segment.getUint32(n.byteOffset+e)^r.getUint32(0,!0),o=n.segment.getUint32(n.byteOffset+e+4)^r.getUint32(4,!0);return Dt.setUint32(0,i,sr.NATIVE_LITTLE_ENDIAN),Dt.setUint32(4,o,sr.NATIVE_LITTLE_ENDIAN),new Yfe.Int64(new Uint8Array(Dt.buffer.slice(0)))}s(ade,"getInt64");q.getInt64=ade;function ude(e,t,r){ar(e,1,t);let n=or(t);if(r===void 0)return n.segment.getInt8(n.byteOffset+e);let i=n.segment.getUint8(n.byteOffset+e)^r.getUint8(0);return Dt.setUint8(0,i),Dt.getInt8(0)}s(ude,"getInt8");q.getInt8=ude;function cde(e,t,r,n){Zd(e,r);let i=Qd(r);i.byteOffset+=e*8;let o=new t(i.segment,i.byteOffset,r._capnp.depthLimit-1);if(me.isNull(o))n?me.Pointer.copyFrom(n,o):KN.List.initList(t._capnp.size,0,o,t._capnp.compositeSize);else if(t._capnp.compositeSize!==void 0){let a=me.getTargetCompositeListSize(o),u=t._capnp.compositeSize;if(u.dataByteLength>a.dataByteLength||u.pointerLength>a.pointerLength){let c=me.getContent(o),l=me.getTargetListLength(o);uB("resizing composite list %s due to protocol upgrade, new size: %d",o,To.getByteLength(u)*l);let f=o.segment.allocate(To.getByteLength(u)*l+8),d=me.initPointer(f.segment,f.byteOffset,o);me.setListPointer(d.offsetWords,t._capnp.size,l,d.pointer,u),me.setStructPointer(l,u,f),f.byteOffset+=8;for(let _=0;_<l;_++){let m=c.byteOffset+_*To.getByteLength(a),g=f.byteOffset+_*To.getByteLength(u);f.segment.copyWords(g,c.segment,m,To.getWordLength(a));for(let y=0;y<a.pointerLength;y++){let b=new me.Pointer(c.segment,m+a.dataByteLength+y*8),E=new me.Pointer(f.segment,g+u.dataByteLength+y*8),v=me.followFars(b),O=me.getContent(b);me.getTargetPointerType(b)===aB.PointerType.LIST&&me.getTargetListElementSize(b)===HN.ListElementSize.COMPOSITE&&(O.byteOffset-=8);let I=me.initPointer(O.segment,O.byteOffset,E),w=v.segment.getUint8(v.byteOffset)&3,j=v.segment.getUint32(v.byteOffset+4);I.pointer.segment.setUint32(I.pointer.byteOffset,w|I.offsetWords<<2),I.pointer.segment.setUint32(I.pointer.byteOffset+4,j)}}c.segment.fillZeroWords(c.byteOffset,To.getWordLength(a)*l)}}return o}s(cde,"getList");q.getList=cde;function ab(e,t){Zd(e,t);let r=Qd(t);return r.byteOffset+=e*8,new me.Pointer(r.segment,r.byteOffset,t._capnp.depthLimit-1)}s(ab,"getPointer");q.getPointer=ab;function YN(e,t,r){Zd(e,r);let n=Qd(r);return n.byteOffset+=e*8,new t(n.segment,n.byteOffset,r._capnp.depthLimit-1)}s(YN,"getPointerAs");q.getPointerAs=YN;function Qd(e){let t=me.getContent(e);return t.byteOffset+=Xd.padToWord(ub(e).dataByteLength),t}s(Qd,"getPointerSection");q.getPointerSection=Qd;function ub(e){if(e._capnp.compositeIndex!==void 0){let t=me.getContent(e,!0);return t.byteOffset-=8,me.getStructSize(t)}return me.getTargetStructSize(e)}s(ub,"getSize");q.getSize=ub;function lde(e,t,r,n){let i=YN(e,t,r);if(me.isNull(i))n?me.Pointer.copyFrom(n,i):WN(t._capnp.size,i);else{me.validate(aB.PointerType.STRUCT,i);let o=me.getTargetStructSize(i);(o.dataByteLength<t._capnp.size.dataByteLength||o.pointerLength<t._capnp.size.pointerLength)&&(uB("need to resize child struct %s",i),Zfe(t._capnp.size,i))}return i}s(lde,"getStruct");q.getStruct=lde;function fde(e,t,r){let n=Xfe.Text.fromPointer(ab(e,t));return me.isNull(n)&&r&&n.set(0,r),n.get(0)}s(fde,"getText");q.getText=fde;function dde(e,t,r){ar(e,2,t);let n=or(t);return r===void 0?n.segment.getUint16(n.byteOffset+e):n.segment.getUint16(n.byteOffset+e)^r.getUint16(0,!0)}s(dde,"getUint16");q.getUint16=dde;function pde(e,t,r){ar(e,4,t);let n=or(t);return r===void 0?n.segment.getUint32(n.byteOffset+e):n.segment.getUint32(n.byteOffset+e)^r.getUint32(0,!0)}s(pde,"getUint32");q.getUint32=pde;function hde(e,t,r){ar(e,8,t);let n=or(t);if(r===void 0)return n.segment.getUint64(n.byteOffset+e);let i=n.segment.getUint32(n.byteOffset+e)^r.getUint32(0,!0),o=n.segment.getUint32(n.byteOffset+e+4)^r.getUint32(4,!0);return Dt.setUint32(0,i,sr.NATIVE_LITTLE_ENDIAN),Dt.setUint32(4,o,sr.NATIVE_LITTLE_ENDIAN),new Yfe.Uint64(new Uint8Array(Dt.buffer.slice(0)))}s(hde,"getUint64");q.getUint64=hde;function mde(e,t,r){ar(e,1,t);let n=or(t);return r===void 0?n.segment.getUint8(n.byteOffset+e):n.segment.getUint8(n.byteOffset+e)^r.getUint8(0)}s(mde,"getUint8");q.getUint8=mde;function vgt(){throw new Error(sl.INVARIANT_UNREACHABLE_CODE)}s(vgt,"getVoid");q.getVoid=vgt;function _de(e,t,r){Zd(e,r);let n=Qd(r);n.byteOffset+=e*8;let i=new Jfe.Data(n.segment,n.byteOffset,r._capnp.depthLimit-1);return me.erase(i),KN.List.initList(HN.ListElementSize.BYTE,t,i),i}s(_de,"initData");q.initData=_de;function gde(e,t,r,n){Zd(e,n);let i=Qd(n);i.byteOffset+=e*8;let o=new t(i.segment,i.byteOffset,n._capnp.depthLimit-1);return me.erase(o),KN.List.initList(t._capnp.size,r,o,t._capnp.compositeSize),o}s(gde,"initList");q.initList=gde;function yde(e,t,r,n){let i=Math.floor(e/8),o=1<<e%8;ar(i,1,r);let a=or(r),u=a.segment.getUint8(a.byteOffset+i);n!==void 0&&(t=n.getUint8(0)&o?!t:t),a.segment.setUint8(a.byteOffset+i,t?u|o:u&~o)}s(yde,"setBit");q.setBit=yde;function Ede(e,t,r,n){ar(e,4,r);let i=or(r);if(n!==void 0){Dt.setFloat32(0,t,sr.NATIVE_LITTLE_ENDIAN);let o=Dt.getUint32(0,sr.NATIVE_LITTLE_ENDIAN)^n.getUint32(0,!0);i.segment.setUint32(i.byteOffset+e,o);return}i.segment.setFloat32(i.byteOffset+e,t)}s(Ede,"setFloat32");q.setFloat32=Ede;function bde(e,t,r,n){ar(e,8,r);let i=or(r);if(n!==void 0){Dt.setFloat64(0,t,sr.NATIVE_LITTLE_ENDIAN);let o=Dt.getUint32(0,sr.NATIVE_LITTLE_ENDIAN)^n.getUint32(0,!0),a=Dt.getUint32(4,sr.NATIVE_LITTLE_ENDIAN)^n.getUint32(4,!0);i.segment.setUint32(i.byteOffset+e,o),i.segment.setUint32(i.byteOffset+e+4,a);return}i.segment.setFloat64(i.byteOffset+e,t)}s(bde,"setFloat64");q.setFloat64=bde;function Sde(e,t,r,n){ar(e,2,r);let i=or(r);if(n!==void 0){Dt.setInt16(0,t,sr.NATIVE_LITTLE_ENDIAN);let o=Dt.getUint16(0,sr.NATIVE_LITTLE_ENDIAN)^n.getUint16(0,!0);i.segment.setUint16(i.byteOffset+e,o);return}i.segment.setInt16(i.byteOffset+e,t)}s(Sde,"setInt16");q.setInt16=Sde;function vde(e,t,r,n){ar(e,4,r);let i=or(r);if(n!==void 0){Dt.setInt32(0,t,sr.NATIVE_LITTLE_ENDIAN);let o=Dt.getUint32(0,sr.NATIVE_LITTLE_ENDIAN)^n.getUint32(0,!0);i.segment.setUint32(i.byteOffset+e,o);return}i.segment.setInt32(i.byteOffset+e,t)}s(vde,"setInt32");q.setInt32=vde;function Ode(e,t,r,n){ar(e,8,r);let i=or(r);if(n!==void 0){for(let o=0;o<8;o++)i.segment.setUint8(i.byteOffset+e+o,t.buffer[o]^n.getUint8(o));return}i.segment.setInt64(i.byteOffset+e,t)}s(Ode,"setInt64");q.setInt64=Ode;function Pde(e,t,r,n){ar(e,1,r);let i=or(r);if(n!==void 0){Dt.setInt8(0,t);let o=Dt.getUint8(0)^n.getUint8(0);i.segment.setUint8(i.byteOffset+e,o);return}i.segment.setInt8(i.byteOffset+e,t)}s(Pde,"setInt8");q.setInt8=Pde;function Ogt(e,t,r){me.copyFrom(t,ab(e,r))}s(Ogt,"setPointer");q.setPointer=Ogt;function Ide(e,t,r){Xfe.Text.fromPointer(ab(e,r)).set(0,t)}s(Ide,"setText");q.setText=Ide;function wde(e,t,r,n){ar(e,2,r);let i=or(r);n!==void 0&&(t^=n.getUint16(0,!0)),i.segment.setUint16(i.byteOffset+e,t)}s(wde,"setUint16");q.setUint16=wde;function Tde(e,t,r,n){ar(e,4,r);let i=or(r);n!==void 0&&(t^=n.getUint32(0,!0)),i.segment.setUint32(i.byteOffset+e,t)}s(Tde,"setUint32");q.setUint32=Tde;function Nde(e,t,r,n){ar(e,8,r);let i=or(r);if(n!==void 0){for(let o=0;o<8;o++)i.segment.setUint8(i.byteOffset+e+o,t.buffer[o]^n.getUint8(o));return}i.segment.setUint64(i.byteOffset+e,t)}s(Nde,"setUint64");q.setUint64=Nde;function Ade(e,t,r,n){ar(e,1,r);let i=or(r);n!==void 0&&(t^=n.getUint8(0)),i.segment.setUint8(i.byteOffset+e,t)}s(Ade,"setUint8");q.setUint8=Ade;function Pgt(){throw new Error(sl.INVARIANT_UNREACHABLE_CODE)}s(Pgt,"setVoid");q.setVoid=Pgt;function Rde(e,t,r,n){if(t!==r)throw new Error(Xd.format(sl.PTR_INVALID_UNION_ACCESS,n,e,t,r))}s(Rde,"testWhich");q.testWhich=Rde;function ar(e,t,r){let n=ub(r).dataByteLength;if(e<0||t<0||e+t>n)throw new Error(Xd.format(sl.PTR_STRUCT_DATA_OUT_OF_BOUNDS,r,t,e,n))}s(ar,"checkDataBounds");q.checkDataBounds=ar;function Zd(e,t){let r=ub(t).pointerLength;if(e<0||e>=r)throw new Error(Xd.format(sl.PTR_STRUCT_POINTER_OUT_OF_BOUNDS,t,e,r))}s(Zd,"checkPointerBounds");q.checkPointerBounds=Zd});var Dde=h(QN=>{"use strict";Object.defineProperty(QN,"__esModule",{value:!0});QN.TextList=void 0;var Igt=(at(),ct(ot)),wgt=Igt.__importDefault(mt()),Tgt=cr(),Ngt=Lr(),Cde=zN(),$de=Jt(),Agt=wgt.default("capnp:list:composite");Agt("load");var XN=class extends Ngt.List{static{s(this,"TextList")}get(t){let r=$de.getContent(this);return r.byteOffset+=t*8,Cde.Text.fromPointer(r).get(0)}set(t,r){let n=$de.getContent(this);n.byteOffset+=t*8,Cde.Text.fromPointer(n).set(0,r)}toString(){return`Text_${super.toString()}`}};QN.TextList=XN;XN._capnp={displayName:"List<Text>",size:Tgt.ListElementSize.POINTER}});var jde=h(eA=>{"use strict";Object.defineProperty(eA,"__esModule",{value:!0});eA.Uint8List=void 0;var Rgt=(at(),ct(ot)),Cgt=Rgt.__importDefault(mt()),$gt=cr(),Dgt=Lr(),Lde=Jt(),Lgt=Cgt.default("capnp:list:composite");Lgt("load");var ZN=class extends Dgt.List{static{s(this,"Uint8List")}get(t){let r=Lde.getContent(this);return r.segment.getUint8(r.byteOffset+t)}set(t,r){let n=Lde.getContent(this);n.segment.setUint8(n.byteOffset+t,r)}toString(){return`Uint8_${super.toString()}`}};eA.Uint8List=ZN;ZN._capnp={displayName:"List<Uint8>",size:$gt.ListElementSize.BYTE}});var Ude=h(rA=>{"use strict";Object.defineProperty(rA,"__esModule",{value:!0});rA.Uint16List=void 0;var jgt=(at(),ct(ot)),Mgt=jgt.__importDefault(mt()),Ugt=cr(),xgt=Lr(),Mde=Jt(),qgt=Mgt.default("capnp:list:composite");qgt("load");var tA=class extends xgt.List{static{s(this,"Uint16List")}get(t){let r=Mde.getContent(this);return r.segment.getUint16(r.byteOffset+t*2)}set(t,r){let n=Mde.getContent(this);n.segment.setUint16(n.byteOffset+t*2,r)}toString(){return`Uint16_${super.toString()}`}};rA.Uint16List=tA;tA._capnp={displayName:"List<Uint16>",size:Ugt.ListElementSize.BYTE_2}});var qde=h(iA=>{"use strict";Object.defineProperty(iA,"__esModule",{value:!0});iA.Uint32List=void 0;var Fgt=(at(),ct(ot)),kgt=Fgt.__importDefault(mt()),Bgt=cr(),Ggt=Lr(),xde=Jt(),Vgt=kgt.default("capnp:list:composite");Vgt("load");var nA=class extends Ggt.List{static{s(this,"Uint32List")}get(t){let r=xde.getContent(this);return r.segment.getUint32(r.byteOffset+t*4)}set(t,r){let n=xde.getContent(this);n.segment.setUint32(n.byteOffset+t*4,r)}toString(){return`Uint32_${super.toString()}`}};iA.Uint32List=nA;nA._capnp={displayName:"List<Uint32>",size:Bgt.ListElementSize.BYTE_4}});var kde=h(oA=>{"use strict";Object.defineProperty(oA,"__esModule",{value:!0});oA.Uint64List=void 0;var zgt=(at(),ct(ot)),Hgt=zgt.__importDefault(mt()),Kgt=cr(),Wgt=Lr(),Fde=Jt(),Ygt=Hgt.default("capnp:list:composite");Ygt("load");var sA=class extends Wgt.List{static{s(this,"Uint64List")}get(t){let r=Fde.getContent(this);return r.segment.getUint64(r.byteOffset+t*8)}set(t,r){let n=Fde.getContent(this);n.segment.setUint64(n.byteOffset+t*8,r)}toString(){return`Uint64_${super.toString()}`}};oA.Uint64List=sA;sA._capnp={displayName:"List<Uint64>",size:Kgt.ListElementSize.BYTE_8}});var cB=h(M_=>{"use strict";Object.defineProperty(M_,"__esModule",{value:!0});M_.VOID=M_.Void=void 0;var Jgt=zd(),Xgt=JN(),aA=class extends Xgt.Struct{static{s(this,"Void")}};M_.Void=aA;aA._capnp={displayName:"Void",id:"0",size:new Jgt.ObjectSize(0,0)};M_.VOID=void 0});var Bde=h(uA=>{"use strict";Object.defineProperty(uA,"__esModule",{value:!0});uA.VoidList=void 0;var Qgt=L_(),Zgt=cB();uA.VoidList=Qgt.PointerList(Zgt.Void)});var cA=h(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.VoidList=le.VOID=le.Void=le.Uint64List=le.Uint32List=le.Uint16List=le.Uint8List=le.TextList=le.Text=le.Struct=le.Pointer=le.PointerType=le.PointerList=le.Orphan=le.List=le.InterfaceList=le.Interface=le.Int64List=le.Int32List=le.Int16List=le.Int8List=le.Float64List=le.Float32List=le.DataList=le.Data=le.CompositeList=le.BoolList=le.AnyPointerList=void 0;var eyt=Ife();Object.defineProperty(le,"AnyPointerList",{enumerable:!0,get:function(){return eyt.AnyPointerList}});var tyt=Tfe();Object.defineProperty(le,"BoolList",{enumerable:!0,get:function(){return tyt.BoolList}});var ryt=Nfe();Object.defineProperty(le,"CompositeList",{enumerable:!0,get:function(){return ryt.CompositeList}});var nyt=SN();Object.defineProperty(le,"Data",{enumerable:!0,get:function(){return nyt.Data}});var iyt=Afe();Object.defineProperty(le,"DataList",{enumerable:!0,get:function(){return iyt.DataList}});var syt=Cfe();Object.defineProperty(le,"Float32List",{enumerable:!0,get:function(){return syt.Float32List}});var oyt=Dfe();Object.defineProperty(le,"Float64List",{enumerable:!0,get:function(){return oyt.Float64List}});var ayt=jfe();Object.defineProperty(le,"Int8List",{enumerable:!0,get:function(){return ayt.Int8List}});var uyt=Ufe();Object.defineProperty(le,"Int16List",{enumerable:!0,get:function(){return uyt.Int16List}});var cyt=qfe();Object.defineProperty(le,"Int32List",{enumerable:!0,get:function(){return cyt.Int32List}});var lyt=kfe();Object.defineProperty(le,"Int64List",{enumerable:!0,get:function(){return lyt.Int64List}});var fyt=nB();Object.defineProperty(le,"Interface",{enumerable:!0,get:function(){return fyt.Interface}});var dyt=Bfe();Object.defineProperty(le,"InterfaceList",{enumerable:!0,get:function(){return dyt.InterfaceList}});var pyt=Lr();Object.defineProperty(le,"List",{enumerable:!0,get:function(){return pyt.List}});var hyt=kk();Object.defineProperty(le,"Orphan",{enumerable:!0,get:function(){return hyt.Orphan}});var myt=L_();Object.defineProperty(le,"PointerList",{enumerable:!0,get:function(){return myt.PointerList}});var _yt=Hd();Object.defineProperty(le,"PointerType",{enumerable:!0,get:function(){return _yt.PointerType}});var gyt=Jt();Object.defineProperty(le,"Pointer",{enumerable:!0,get:function(){return gyt.Pointer}});var yyt=JN();Object.defineProperty(le,"Struct",{enumerable:!0,get:function(){return yyt.Struct}});var Eyt=zN();Object.defineProperty(le,"Text",{enumerable:!0,get:function(){return Eyt.Text}});var byt=Dde();Object.defineProperty(le,"TextList",{enumerable:!0,get:function(){return byt.TextList}});var Syt=jde();Object.defineProperty(le,"Uint8List",{enumerable:!0,get:function(){return Syt.Uint8List}});var vyt=Ude();Object.defineProperty(le,"Uint16List",{enumerable:!0,get:function(){return vyt.Uint16List}});var Oyt=qde();Object.defineProperty(le,"Uint32List",{enumerable:!0,get:function(){return Oyt.Uint32List}});var Pyt=kde();Object.defineProperty(le,"Uint64List",{enumerable:!0,get:function(){return Pyt.Uint64List}});var Gde=cB();Object.defineProperty(le,"Void",{enumerable:!0,get:function(){return Gde.Void}});Object.defineProperty(le,"VOID",{enumerable:!0,get:function(){return Gde.VOID}});var Iyt=Bde();Object.defineProperty(le,"VoidList",{enumerable:!0,get:function(){return Iyt.VoidList}})});var Hde=h(lA=>{"use strict";var zde;Object.defineProperty(lA,"__esModule",{value:!0});lA.Segment=void 0;var wyt=(at(),ct(ot)),Tyt=wyt.__importDefault(mt()),cb=Ji(),U_=Qn(),Vde=kN(),ep=Ni(),Nyt=cA(),lb=Tyt.default("capnp:segment");lb("load");var lB=class{static{s(this,"Segment")}constructor(t,r,n,i=0){this[zde]="Segment",this.id=t,this.message=r,this.buffer=n,this._dv=new DataView(n),this.byteOffset=0,this.byteLength=i}allocate(t){lb("allocate(%d)",t);let r=this;if(t=ep.padToWord(t),t>cb.MAX_SEGMENT_LENGTH-8)throw new Error(ep.format(U_.SEG_SIZE_OVERFLOW,t));r.hasCapacity(t)||(r=r.message.allocateSegment(t));let n=r.byteLength;return r.byteLength=r.byteLength+t,lb("Allocated %x bytes in %s (requested segment: %s).",t,this,r),new Nyt.Pointer(r,n)}copyWord(t,r,n){let i=r._dv.getFloat64(n,cb.NATIVE_LITTLE_ENDIAN);this._dv.setFloat64(t,i,cb.NATIVE_LITTLE_ENDIAN)}copyWords(t,r,n,i){let o=new Float64Array(this.buffer,t,i),a=new Float64Array(r.buffer,n,i);o.set(a)}fillZeroWords(t,r){new Float64Array(this.buffer,t,r).fill(0)}getBigInt64(t,r){throw new Error(ep.format(U_.NOT_IMPLEMENTED,t,r))}getBigUint64(t,r){throw new Error(ep.format(U_.NOT_IMPLEMENTED,t,r))}getCapacity(){return this.buffer.byteLength}getFloat32(t){return this._dv.getFloat32(t,!0)}getFloat64(t){return this._dv.getFloat64(t,!0)}getInt16(t){return this._dv.getInt16(t,!0)}getInt32(t){return this._dv.getInt32(t,!0)}getInt64(t){return new Vde.Int64(new Uint8Array(this.buffer.slice(t,t+8)))}getInt8(t){return this._dv.getInt8(t)}getUint16(t){return this._dv.getUint16(t,!0)}getUint32(t){return this._dv.getUint32(t,!0)}getUint64(t){return new Vde.Uint64(new Uint8Array(this.buffer.slice(t,t+8)))}getUint8(t){return this._dv.getUint8(t)}hasCapacity(t){return lb("hasCapacity(%d)",t),this.buffer.byteLength-this.byteLength>=t}isWordZero(t){return this._dv.getFloat64(t,cb.NATIVE_LITTLE_ENDIAN)===0}replaceBuffer(t){if(lb("replaceBuffer(%p)",t),this.buffer!==t){if(t.byteLength<this.byteLength)throw new Error(U_.SEG_REPLACEMENT_BUFFER_TOO_SMALL);this._dv=new DataView(t),this.buffer=t}}setBigInt64(t,r,n){throw new Error(ep.format(U_.NOT_IMPLEMENTED,t,r,n))}setBigUint64(t,r,n){throw new Error(ep.format(U_.NOT_IMPLEMENTED,t,r,n))}setFloat32(t,r){this._dv.setFloat32(t,r,!0)}setFloat64(t,r){this._dv.setFloat64(t,r,!0)}setInt16(t,r){this._dv.setInt16(t,r,!0)}setInt32(t,r){this._dv.setInt32(t,r,!0)}setInt8(t,r){this._dv.setInt8(t,r)}setInt64(t,r){this._dv.setUint8(t,r.buffer[0]),this._dv.setUint8(t+1,r.buffer[1]),this._dv.setUint8(t+2,r.buffer[2]),this._dv.setUint8(t+3,r.buffer[3]),this._dv.setUint8(t+4,r.buffer[4]),this._dv.setUint8(t+5,r.buffer[5]),this._dv.setUint8(t+6,r.buffer[6]),this._dv.setUint8(t+7,r.buffer[7])}setUint16(t,r){this._dv.setUint16(t,r,!0)}setUint32(t,r){this._dv.setUint32(t,r,!0)}setUint64(t,r){this._dv.setUint8(t+0,r.buffer[0]),this._dv.setUint8(t+1,r.buffer[1]),this._dv.setUint8(t+2,r.buffer[2]),this._dv.setUint8(t+3,r.buffer[3]),this._dv.setUint8(t+4,r.buffer[4]),this._dv.setUint8(t+5,r.buffer[5]),this._dv.setUint8(t+6,r.buffer[6]),this._dv.setUint8(t+7,r.buffer[7])}setUint8(t,r){this._dv.setUint8(t,r)}setWordZero(t){this._dv.setFloat64(t,0,cb.NATIVE_LITTLE_ENDIAN)}toString(){return ep.format("Segment_id:%d,off:%a,len:%a,cap:%a",this.id,this.byteLength,this.byteOffset,this.buffer.byteLength)}};lA.Segment=lB;zde=Symbol.toStringTag});var tpe=h(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.getStreamFrame=Pt.toPackedArrayBuffer=Pt.toArrayBuffer=Pt.setRoot=Pt.readRawPointer=Pt.initRoot=Pt.getSegment=Pt.getRoot=Pt.dump=Pt.allocateSegment=Pt.preallocateSegments=Pt.getFramedSegments=Pt.initMessage=Pt.Message=void 0;var Ayt=(at(),ct(ot)),Ryt=Ayt.__importDefault(mt()),fb=Ji(),x_=Qn(),q_=Ni(),ol=Yle(),fB=tfe(),fA=cA(),dB=Hde(),Kde=Jt(),Wde=JN(),Ca=Ryt.default("capnp:message");Ca("load");var Bs=class{static{s(this,"Message")}constructor(t,r=!0,n=!1){this._capnp=Yde(t,r,n),t&&!Qde(t)&&Xde(this),Ca("new %s",this)}allocateSegment(t){return dA(t,this)}dump(){return pB(this)}getRoot(t){return hB(t,this)}getSegment(t){return pA(t,this)}initRoot(t){return mB(t,this)}setRoot(t){epe(t,this)}toArrayBuffer(){return _B(this)}toPackedArrayBuffer(){return gB(this)}toString(){return`Message_arena:${this._capnp.arena}`}};Pt.Message=Bs;Bs.allocateSegment=dA;Bs.dump=pB;Bs.getRoot=hB;Bs.getSegment=pA;Bs.initRoot=mB;Bs.readRawPointer=Zde;Bs.toArrayBuffer=_B;Bs.toPackedArrayBuffer=gB;function Yde(e,t=!0,r=!1){if(e===void 0)return{arena:new ol.SingleSegmentArena,segments:[],traversalLimit:fb.DEFAULT_TRAVERSE_LIMIT};if(Qde(e))return{arena:e,segments:[],traversalLimit:fb.DEFAULT_TRAVERSE_LIMIT};let n=e;return Cyt(n)&&(n=n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength)),t&&(n=fB.unpack(n)),r?{arena:new ol.SingleSegmentArena(n),segments:[],traversalLimit:fb.DEFAULT_TRAVERSE_LIMIT}:{arena:new ol.MultiSegmentArena(Jde(n)),segments:[],traversalLimit:fb.DEFAULT_TRAVERSE_LIMIT}}s(Yde,"initMessage");Pt.initMessage=Yde;function Jde(e){let t=new DataView(e),r=t.getUint32(0,!0)+1,n=new Array(r);Ca("reading %d framed segments from stream",r);let i=4+r*4;if(i+=i%8,i+r*4>e.byteLength)throw new Error(x_.MSG_INVALID_FRAME_HEADER);for(let o=0;o<r;o++){let a=t.getUint32(4+o*4,!0)*8;if(i+a>e.byteLength)throw new Error(x_.MSG_INVALID_FRAME_HEADER);n[o]=e.slice(i,i+a),i+=a}return n}s(Jde,"getFramedSegments");Pt.getFramedSegments=Jde;function Xde(e){let t=ol.Arena.getNumSegments(e._capnp.arena);if(t<1)throw new Error(x_.MSG_NO_SEGMENTS_IN_ARENA);e._capnp.segments=new Array(t);for(let r=0;r<t;r++){let n=ol.Arena.getBuffer(r,e._capnp.arena),i=new dB.Segment(r,e,n,n.byteLength);e._capnp.segments[r]=i}}s(Xde,"preallocateSegments");Pt.preallocateSegments=Xde;function Cyt(e){return e.byteOffset!==void 0}s(Cyt,"isArrayBufferView");function Qde(e){return e.kind!==void 0}s(Qde,"isAnyArena");function dA(e,t){Ca("allocating %x bytes for %s",e,t);let r=ol.Arena.allocate(e,t._capnp.segments,t._capnp.arena),n;if(r.id===t._capnp.segments.length)n=new dB.Segment(r.id,t,r.buffer),Ca("adding new segment %s",n),t._capnp.segments.push(n);else{if(r.id<0||r.id>t._capnp.segments.length)throw new Error(q_.format(x_.MSG_SEGMENT_OUT_OF_BOUNDS,r.id,t));n=t._capnp.segments[r.id],Ca("replacing segment %s with buffer (len:%d)",n,r.buffer.byteLength),n.replaceBuffer(r.buffer)}return n}s(dA,"allocateSegment");Pt.allocateSegment=dA;function pB(e){let t="";if(e._capnp.segments.length===0)return`================
|
|
315
315
|
No Segments
|
|
316
316
|
================
|
|
317
317
|
`;for(let r=0;r<e._capnp.segments.length;r++){t+=`================
|