mdat 1.0.0 → 1.0.1
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/bin/cli.js +1 -1
- package/package.json +8 -9
- package/readme.md +3 -3
package/bin/cli.js
CHANGED
|
@@ -66,7 +66,7 @@ ${m.join(`
|
|
|
66
66
|
`;p.forEach(m=>{d+=m}),e.fail(d)}};let u={};o.conflicts=function(f,p){H("<string|object> [array|string]",[f,p],arguments.length),typeof f=="object"?Object.keys(f).forEach(d=>{o.conflicts(d,f[d])}):(t.global(f),u[f]||(u[f]=[]),Array.isArray(p)?p.forEach(d=>o.conflicts(f,d)):u[f].push(p))},o.getConflicting=()=>u,o.conflicting=function(f){Object.keys(f).forEach(p=>{u[p]&&u[p].forEach(d=>{d&&f[p]!==void 0&&f[d]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",p,d))})}),t.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(u).forEach(p=>{u[p].forEach(d=>{d&&f[r.Parser.camelCase(p)]!==void 0&&f[r.Parser.camelCase(d)]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",p,d))})})},o.recommendCommands=function(f,p){p=p.sort((g,b)=>b.length-g.length);let m=null,y=1/0;for(let g=0,b;(b=p[g])!==void 0;g++){let w=Oh(f,b);w<=3&&w<y&&(y=w,m=b)}m&&e.fail(n("Did you mean %s?",m))},o.reset=function(f){return s=hn(s,p=>!f[p]),u=hn(u,p=>!f[p]),o};let l=[];return o.freeze=function(){l.push({implied:s,conflicting:u})},o.unfreeze=function(){let f=l.pop();Nt(f,void 0,r),{implied:s,conflicting:u}=f},o}var Tc=[],cs;function fs(t,e,r,n){cs=n;let i={};if(Object.prototype.hasOwnProperty.call(t,"extends")){if(typeof t.extends!="string")return i;let o=/\.json|\..*rc$/.test(t.extends),s=null;if(o)s=fk(e,t.extends);else try{s=Tr.resolve(t.extends)}catch{return t}ck(s),Tc.push(s),i=o?JSON.parse(cs.readFileSync(s,"utf8")):Tr(t.extends),delete t.extends,i=fs(i,cs.path.dirname(s),r,cs)}return Tc=[],r?Fh(i,t):Object.assign({},i,t)}function ck(t){if(Tc.indexOf(t)>-1)throw new $e(`Circular extended configurations: '${t}'.`)}function fk(t,e){return cs.path.resolve(t,e)}function Fh(t,e){let r={};function n(i){return i&&typeof i=="object"&&!Array.isArray(i)}Object.assign(r,t);for(let i of Object.keys(e))n(e[i])&&n(r[i])?r[i]=Fh(t[i],e[i]):r[i]=e[i];return r}var Y=function(t,e,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 e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},h=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},ot,Yn,ps,ar,Xt,Ca,gn,Zn,wa,ur,ka,lr,_r,Jt,cr,Ta,Zi,Ct,re,_a,Sa,Qt,Xn,Xi,Jn,xn,va,fe,Qn,ei,ti,ge,Ia,Sr,tt;function Qh(t){return(e=[],r=t.process.cwd(),n)=>{let i=new Lc(e,r,n,t);return Object.defineProperty(i,"argv",{get:()=>i.parse(),enumerable:!0}),i.help(),i.version(),i}}var Nh=Symbol("copyDoubleDash"),Ph=Symbol("copyDoubleDash"),_c=Symbol("deleteFromParserHintObject"),Lh=Symbol("emitWarning"),Mh=Symbol("freeze"),Bh=Symbol("getDollarZero"),ri=Symbol("getParserConfiguration"),jh=Symbol("getUsageConfiguration"),Sc=Symbol("guessLocale"),Uh=Symbol("guessVersion"),zh=Symbol("parsePositionalNumbers"),vc=Symbol("pkgUp"),yn=Symbol("populateParserHintArray"),Ji=Symbol("populateParserHintSingleValueDictionary"),Ic=Symbol("populateParserHintArrayDictionary"),Oc=Symbol("populateParserHintDictionary"),Dc=Symbol("sanitizeKey"),Rc=Symbol("setKey"),Fc=Symbol("unfreeze"),$h=Symbol("validateAsync"),qh=Symbol("getCommandInstance"),Vh=Symbol("getContext"),Gh=Symbol("getHasOutput"),Wh=Symbol("getLoggerInstance"),Hh=Symbol("getParseContext"),Kh=Symbol("getUsageInstance"),Yh=Symbol("getValidationInstance"),Oa=Symbol("hasParseCallback"),Zh=Symbol("isGlobalContext"),ni=Symbol("postProcess"),Xh=Symbol("rebase"),Nc=Symbol("reset"),ds=Symbol("runYargsParserAndExecuteCommands"),Pc=Symbol("runValidation"),Jh=Symbol("setHasOutput"),ii=Symbol("kTrackManuallySetKeys"),Lc=class{constructor(e=[],r,n,i){this.customScriptName=!1,this.parsed=!1,ot.set(this,void 0),Yn.set(this,void 0),ps.set(this,{commands:[],fullCommands:[]}),ar.set(this,null),Xt.set(this,null),Ca.set(this,"show-hidden"),gn.set(this,null),Zn.set(this,!0),wa.set(this,{}),ur.set(this,!0),ka.set(this,[]),lr.set(this,void 0),_r.set(this,{}),Jt.set(this,!1),cr.set(this,null),Ta.set(this,!0),Zi.set(this,void 0),Ct.set(this,""),re.set(this,void 0),_a.set(this,void 0),Sa.set(this,{}),Qt.set(this,null),Xn.set(this,null),Xi.set(this,{}),Jn.set(this,{}),xn.set(this,void 0),va.set(this,!1),fe.set(this,void 0),Qn.set(this,!1),ei.set(this,!1),ti.set(this,!1),ge.set(this,void 0),Ia.set(this,{}),Sr.set(this,null),tt.set(this,void 0),Y(this,fe,i,"f"),Y(this,xn,e,"f"),Y(this,Yn,r,"f"),Y(this,_a,n,"f"),Y(this,lr,new ba(this),"f"),this.$0=this[Bh](),this[Nc](),Y(this,ot,h(this,ot,"f"),"f"),Y(this,ge,h(this,ge,"f"),"f"),Y(this,tt,h(this,tt,"f"),"f"),Y(this,re,h(this,re,"f"),"f"),h(this,re,"f").showHiddenOpt=h(this,Ca,"f"),Y(this,Zi,this[Ph](),"f")}addHelpOpt(e,r){let n="help";return H("[string|boolean] [string]",[e,r],arguments.length),h(this,cr,"f")&&(this[_c](h(this,cr,"f")),Y(this,cr,null,"f")),e===!1&&r===void 0?this:(Y(this,cr,typeof e=="string"?e:n,"f"),this.boolean(h(this,cr,"f")),this.describe(h(this,cr,"f"),r||h(this,ge,"f").deferY18nLookup("Show help")),this)}help(e,r){return this.addHelpOpt(e,r)}addShowHiddenOpt(e,r){if(H("[string|boolean] [string]",[e,r],arguments.length),e===!1&&r===void 0)return this;let n=typeof e=="string"?e:h(this,Ca,"f");return this.boolean(n),this.describe(n,r||h(this,ge,"f").deferY18nLookup("Show hidden options")),h(this,re,"f").showHiddenOpt=n,this}showHidden(e,r){return this.addShowHiddenOpt(e,r)}alias(e,r){return H("<object|string|array> [string|array]",[e,r],arguments.length),this[Ic](this.alias.bind(this),"alias",e,r),this}array(e){return H("<array|string>",[e],arguments.length),this[yn]("array",e),this[ii](e),this}boolean(e){return H("<array|string>",[e],arguments.length),this[yn]("boolean",e),this[ii](e),this}check(e,r){return H("<function> [boolean]",[e,r],arguments.length),this.middleware((n,i)=>Kn(()=>e(n,i.getOptions()),o=>(o?(typeof o=="string"||o instanceof Error)&&h(this,ge,"f").fail(o.toString(),o):h(this,ge,"f").fail(h(this,fe,"f").y18n.__("Argument check failed: %s",e.toString())),n),o=>(h(this,ge,"f").fail(o.message?o.message:o.toString(),o),n)),!1,r),this}choices(e,r){return H("<object|string|array> [string|array]",[e,r],arguments.length),this[Ic](this.choices.bind(this),"choices",e,r),this}coerce(e,r){if(H("<object|string|array> [function]",[e,r],arguments.length),Array.isArray(e)){if(!r)throw new $e("coerce callback must be provided");for(let n of e)this.coerce(n,r);return this}else if(typeof e=="object"){for(let n of Object.keys(e))this.coerce(n,e[n]);return this}if(!r)throw new $e("coerce callback must be provided");return h(this,re,"f").key[e]=!0,h(this,lr,"f").addCoerceMiddleware((n,i)=>{let o;return Object.prototype.hasOwnProperty.call(n,e)?Kn(()=>(o=i.getAliases(),r(n[e])),a=>{n[e]=a;let u=i.getInternalMethods().getParserConfiguration()["strip-aliased"];if(o[e]&&u!==!0)for(let l of o[e])n[l]=a;return n},a=>{throw new $e(a.message)}):n},e),this}conflicts(e,r){return H("<string|object> [string|array]",[e,r],arguments.length),h(this,tt,"f").conflicts(e,r),this}config(e="config",r,n){return H("[object|string] [string|function] [function]",[e,r,n],arguments.length),typeof e=="object"&&!Array.isArray(e)?(e=fs(e,h(this,Yn,"f"),this[ri]()["deep-merge-config"]||!1,h(this,fe,"f")),h(this,re,"f").configObjects=(h(this,re,"f").configObjects||[]).concat(e),this):(typeof r=="function"&&(n=r,r=void 0),this.describe(e,r||h(this,ge,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(e)?e:[e]).forEach(i=>{h(this,re,"f").config[i]=n||!0}),this)}completion(e,r,n){return H("[string] [string|boolean|function] [function]",[e,r,n],arguments.length),typeof r=="function"&&(n=r,r=void 0),Y(this,Xt,e||h(this,Xt,"f")||"completion","f"),!r&&r!==!1&&(r="generate completion script"),this.command(h(this,Xt,"f"),r),n&&h(this,ar,"f").registerFunction(n),this}command(e,r,n,i,o,s){return H("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[e,r,n,i,o,s],arguments.length),h(this,ot,"f").addHandler(e,r,n,i,o,s),this}commands(e,r,n,i,o,s){return this.command(e,r,n,i,o,s)}commandDir(e,r){H("<string> [object]",[e,r],arguments.length);let n=h(this,_a,"f")||h(this,fe,"f").require;return h(this,ot,"f").addDirectory(e,n,h(this,fe,"f").getCallerFile(),r),this}count(e){return H("<array|string>",[e],arguments.length),this[yn]("count",e),this[ii](e),this}default(e,r,n){return H("<object|string|array> [*] [string]",[e,r,n],arguments.length),n&&(Ec(e,h(this,fe,"f")),h(this,re,"f").defaultDescription[e]=n),typeof r=="function"&&(Ec(e,h(this,fe,"f")),h(this,re,"f").defaultDescription[e]||(h(this,re,"f").defaultDescription[e]=h(this,ge,"f").functionDescription(r)),r=r.call()),this[Ji](this.default.bind(this),"default",e,r),this}defaults(e,r,n){return this.default(e,r,n)}demandCommand(e=1,r,n,i){return H("[number] [number|string] [string|null|undefined] [string|null|undefined]",[e,r,n,i],arguments.length),typeof r!="number"&&(n=r,r=1/0),this.global("_",!1),h(this,re,"f").demandedCommands._={min:e,max:r,minMsg:n,maxMsg:i},this}demand(e,r,n){return Array.isArray(r)?(r.forEach(i=>{Nt(n,!0,h(this,fe,"f")),this.demandOption(i,n)}),r=1/0):typeof r!="number"&&(n=r,r=1/0),typeof e=="number"?(Nt(n,!0,h(this,fe,"f")),this.demandCommand(e,r,n,n)):Array.isArray(e)?e.forEach(i=>{Nt(n,!0,h(this,fe,"f")),this.demandOption(i,n)}):typeof n=="string"?this.demandOption(e,n):(n===!0||typeof n>"u")&&this.demandOption(e),this}demandOption(e,r){return H("<object|string|array> [string]",[e,r],arguments.length),this[Ji](this.demandOption.bind(this),"demandedOptions",e,r),this}deprecateOption(e,r){return H("<string> [string|boolean]",[e,r],arguments.length),h(this,re,"f").deprecatedOptions[e]=r,this}describe(e,r){return H("<object|string|array> [string]",[e,r],arguments.length),this[Rc](e,!0),h(this,ge,"f").describe(e,r),this}detectLocale(e){return H("<boolean>",[e],arguments.length),Y(this,Zn,e,"f"),this}env(e){return H("[string|boolean]",[e],arguments.length),e===!1?delete h(this,re,"f").envPrefix:h(this,re,"f").envPrefix=e||"",this}epilogue(e){return H("<string>",[e],arguments.length),h(this,ge,"f").epilog(e),this}epilog(e){return this.epilogue(e)}example(e,r){return H("<string|array> [string]",[e,r],arguments.length),Array.isArray(e)?e.forEach(n=>this.example(...n)):h(this,ge,"f").example(e,r),this}exit(e,r){Y(this,Jt,!0,"f"),Y(this,gn,r,"f"),h(this,ur,"f")&&h(this,fe,"f").process.exit(e)}exitProcess(e=!0){return H("[boolean]",[e],arguments.length),Y(this,ur,e,"f"),this}fail(e){if(H("<function|boolean>",[e],arguments.length),typeof e=="boolean"&&e!==!1)throw new $e("Invalid first argument. Expected function or boolean 'false'");return h(this,ge,"f").failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,r){return H("<array> [function]",[e,r],arguments.length),r?h(this,ar,"f").getCompletion(e,r):new Promise((n,i)=>{h(this,ar,"f").getCompletion(e,(o,s)=>{o?i(o):n(s)})})}getDemandedOptions(){return H([],0),h(this,re,"f").demandedOptions}getDemandedCommands(){return H([],0),h(this,re,"f").demandedCommands}getDeprecatedOptions(){return H([],0),h(this,re,"f").deprecatedOptions}getDetectLocale(){return h(this,Zn,"f")}getExitProcess(){return h(this,ur,"f")}getGroups(){return Object.assign({},h(this,_r,"f"),h(this,Jn,"f"))}getHelp(){if(Y(this,Jt,!0,"f"),!h(this,ge,"f").hasCachedHelpMessage()){if(!this.parsed){let r=this[ds](h(this,xn,"f"),void 0,void 0,0,!0);if(qe(r))return r.then(()=>h(this,ge,"f").help())}let e=h(this,ot,"f").runDefaultBuilderOn(this);if(qe(e))return e.then(()=>h(this,ge,"f").help())}return Promise.resolve(h(this,ge,"f").help())}getOptions(){return h(this,re,"f")}getStrict(){return h(this,Qn,"f")}getStrictCommands(){return h(this,ei,"f")}getStrictOptions(){return h(this,ti,"f")}global(e,r){return H("<string|array> [boolean]",[e,r],arguments.length),e=[].concat(e),r!==!1?h(this,re,"f").local=h(this,re,"f").local.filter(n=>e.indexOf(n)===-1):e.forEach(n=>{h(this,re,"f").local.includes(n)||h(this,re,"f").local.push(n)}),this}group(e,r){H("<string|array> <string>",[e,r],arguments.length);let n=h(this,Jn,"f")[r]||h(this,_r,"f")[r];h(this,Jn,"f")[r]&&delete h(this,Jn,"f")[r];let i={};return h(this,_r,"f")[r]=(n||[]).concat(e).filter(o=>i[o]?!1:i[o]=!0),this}hide(e){return H("<string>",[e],arguments.length),h(this,re,"f").hiddenOptions.push(e),this}implies(e,r){return H("<string|object> [number|string|array]",[e,r],arguments.length),h(this,tt,"f").implies(e,r),this}locale(e){return H("[string]",[e],arguments.length),e===void 0?(this[Sc](),h(this,fe,"f").y18n.getLocale()):(Y(this,Zn,!1,"f"),h(this,fe,"f").y18n.setLocale(e),this)}middleware(e,r,n){return h(this,lr,"f").addMiddleware(e,!!r,n)}nargs(e,r){return H("<string|object|array> [number]",[e,r],arguments.length),this[Ji](this.nargs.bind(this),"narg",e,r),this}normalize(e){return H("<array|string>",[e],arguments.length),this[yn]("normalize",e),this}number(e){return H("<array|string>",[e],arguments.length),this[yn]("number",e),this[ii](e),this}option(e,r){if(H("<string|object> [object]",[e,r],arguments.length),typeof e=="object")Object.keys(e).forEach(n=>{this.options(n,e[n])});else{typeof r!="object"&&(r={}),this[ii](e),h(this,Sr,"f")&&(e==="version"||r?.alias==="version")&&this[Lh](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
|
|
67
67
|
`),void 0,"versionWarning"),h(this,re,"f").key[e]=!0,r.alias&&this.alias(e,r.alias);let n=r.deprecate||r.deprecated;n&&this.deprecateOption(e,n);let i=r.demand||r.required||r.require;i&&this.demand(e,i),r.demandOption&&this.demandOption(e,typeof r.demandOption=="string"?r.demandOption:void 0),r.conflicts&&this.conflicts(e,r.conflicts),"default"in r&&this.default(e,r.default),r.implies!==void 0&&this.implies(e,r.implies),r.nargs!==void 0&&this.nargs(e,r.nargs),r.config&&this.config(e,r.configParser),r.normalize&&this.normalize(e),r.choices&&this.choices(e,r.choices),r.coerce&&this.coerce(e,r.coerce),r.group&&this.group(e,r.group),(r.boolean||r.type==="boolean")&&(this.boolean(e),r.alias&&this.boolean(r.alias)),(r.array||r.type==="array")&&(this.array(e),r.alias&&this.array(r.alias)),(r.number||r.type==="number")&&(this.number(e),r.alias&&this.number(r.alias)),(r.string||r.type==="string")&&(this.string(e),r.alias&&this.string(r.alias)),(r.count||r.type==="count")&&this.count(e),typeof r.global=="boolean"&&this.global(e,r.global),r.defaultDescription&&(h(this,re,"f").defaultDescription[e]=r.defaultDescription),r.skipValidation&&this.skipValidation(e);let o=r.describe||r.description||r.desc,s=h(this,ge,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(s,e)||typeof o=="string")&&this.describe(e,o),r.hidden&&this.hide(e),r.requiresArg&&this.requiresArg(e)}return this}options(e,r){return this.option(e,r)}parse(e,r,n){H("[string|array] [function|boolean|object] [function]",[e,r,n],arguments.length),this[Mh](),typeof e>"u"&&(e=h(this,xn,"f")),typeof r=="object"&&(Y(this,Xn,r,"f"),r=n),typeof r=="function"&&(Y(this,Qt,r,"f"),r=!1),r||Y(this,xn,e,"f"),h(this,Qt,"f")&&Y(this,ur,!1,"f");let i=this[ds](e,!!r),o=this.parsed;return h(this,ar,"f").setParsed(this.parsed),qe(i)?i.then(s=>(h(this,Qt,"f")&&h(this,Qt,"f").call(this,h(this,gn,"f"),s,h(this,Ct,"f")),s)).catch(s=>{throw h(this,Qt,"f")&&h(this,Qt,"f")(s,this.parsed.argv,h(this,Ct,"f")),s}).finally(()=>{this[Fc](),this.parsed=o}):(h(this,Qt,"f")&&h(this,Qt,"f").call(this,h(this,gn,"f"),i,h(this,Ct,"f")),this[Fc](),this.parsed=o,i)}parseAsync(e,r,n){let i=this.parse(e,r,n);return qe(i)?i:Promise.resolve(i)}parseSync(e,r,n){let i=this.parse(e,r,n);if(qe(i))throw new $e(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return i}parserConfiguration(e){return H("<object>",[e],arguments.length),Y(this,Sa,e,"f"),this}pkgConf(e,r){H("<string> [string]",[e,r],arguments.length);let n=null,i=this[vc](r||h(this,Yn,"f"));return i[e]&&typeof i[e]=="object"&&(n=fs(i[e],r||h(this,Yn,"f"),this[ri]()["deep-merge-config"]||!1,h(this,fe,"f")),h(this,re,"f").configObjects=(h(this,re,"f").configObjects||[]).concat(n)),this}positional(e,r){H("<string> <object>",[e,r],arguments.length);let n=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];r=hn(r,(s,a)=>s==="type"&&!["string","number","boolean"].includes(a)?!1:n.includes(s));let i=h(this,ps,"f").fullCommands[h(this,ps,"f").fullCommands.length-1],o=i?h(this,ot,"f").cmdToParseOptions(i):{array:[],alias:{},default:{},demand:{}};return Ki(o).forEach(s=>{let a=o[s];Array.isArray(a)?a.indexOf(e)!==-1&&(r[s]=!0):a[e]&&!(s in r)&&(r[s]=a[e])}),this.group(e,h(this,ge,"f").getPositionalGroupName()),this.option(e,r)}recommendCommands(e=!0){return H("[boolean]",[e],arguments.length),Y(this,va,e,"f"),this}required(e,r,n){return this.demand(e,r,n)}require(e,r,n){return this.demand(e,r,n)}requiresArg(e){return H("<array|string|object> [number]",[e],arguments.length),typeof e=="string"&&h(this,re,"f").narg[e]?this:(this[Ji](this.requiresArg.bind(this),"narg",e,NaN),this)}showCompletionScript(e,r){return H("[string] [string]",[e,r],arguments.length),e=e||this.$0,h(this,Zi,"f").log(h(this,ar,"f").generateCompletionScript(e,r||h(this,Xt,"f")||"completion")),this}showHelp(e){if(H("[string|function]",[e],arguments.length),Y(this,Jt,!0,"f"),!h(this,ge,"f").hasCachedHelpMessage()){if(!this.parsed){let n=this[ds](h(this,xn,"f"),void 0,void 0,0,!0);if(qe(n))return n.then(()=>{h(this,ge,"f").showHelp(e)}),this}let r=h(this,ot,"f").runDefaultBuilderOn(this);if(qe(r))return r.then(()=>{h(this,ge,"f").showHelp(e)}),this}return h(this,ge,"f").showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,r){return H("[boolean|string] [string]",[e,r],arguments.length),h(this,ge,"f").showHelpOnFail(e,r),this}showVersion(e){return H("[string|function]",[e],arguments.length),h(this,ge,"f").showVersion(e),this}skipValidation(e){return H("<array|string>",[e],arguments.length),this[yn]("skipValidation",e),this}strict(e){return H("[boolean]",[e],arguments.length),Y(this,Qn,e!==!1,"f"),this}strictCommands(e){return H("[boolean]",[e],arguments.length),Y(this,ei,e!==!1,"f"),this}strictOptions(e){return H("[boolean]",[e],arguments.length),Y(this,ti,e!==!1,"f"),this}string(e){return H("<array|string>",[e],arguments.length),this[yn]("string",e),this[ii](e),this}terminalWidth(){return H([],0),h(this,fe,"f").process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return H("<object>",[e],arguments.length),Y(this,Zn,!1,"f"),h(this,fe,"f").y18n.updateLocale(e),this}usage(e,r,n,i){if(H("<string|null|undefined> [string|boolean] [function|object] [function]",[e,r,n,i],arguments.length),r!==void 0){if(Nt(e,null,h(this,fe,"f")),(e||"").match(/^\$0( |$)/))return this.command(e,r,n,i);throw new $e(".usage() description must start with $0 if being used as alias for .command()")}else return h(this,ge,"f").usage(e),this}usageConfiguration(e){return H("<object>",[e],arguments.length),Y(this,Ia,e,"f"),this}version(e,r,n){let i="version";if(H("[boolean|string] [string] [string]",[e,r,n],arguments.length),h(this,Sr,"f")&&(this[_c](h(this,Sr,"f")),h(this,ge,"f").version(void 0),Y(this,Sr,null,"f")),arguments.length===0)n=this[Uh](),e=i;else if(arguments.length===1){if(e===!1)return this;n=e,e=i}else arguments.length===2&&(n=r,r=void 0);return Y(this,Sr,typeof e=="string"?e:i,"f"),r=r||h(this,ge,"f").deferY18nLookup("Show version number"),h(this,ge,"f").version(n||void 0),this.boolean(h(this,Sr,"f")),this.describe(h(this,Sr,"f"),r),this}wrap(e){return H("<number|null|undefined>",[e],arguments.length),h(this,ge,"f").wrap(e),this}[(ot=new WeakMap,Yn=new WeakMap,ps=new WeakMap,ar=new WeakMap,Xt=new WeakMap,Ca=new WeakMap,gn=new WeakMap,Zn=new WeakMap,wa=new WeakMap,ur=new WeakMap,ka=new WeakMap,lr=new WeakMap,_r=new WeakMap,Jt=new WeakMap,cr=new WeakMap,Ta=new WeakMap,Zi=new WeakMap,Ct=new WeakMap,re=new WeakMap,_a=new WeakMap,Sa=new WeakMap,Qt=new WeakMap,Xn=new WeakMap,Xi=new WeakMap,Jn=new WeakMap,xn=new WeakMap,va=new WeakMap,fe=new WeakMap,Qn=new WeakMap,ei=new WeakMap,ti=new WeakMap,ge=new WeakMap,Ia=new WeakMap,Sr=new WeakMap,tt=new WeakMap,Nh)](e){if(!e._||!e["--"])return e;e._.push.apply(e._,e["--"]);try{delete e["--"]}catch{}return e}[Ph](){return{log:(...e)=>{this[Oa]()||console.log(...e),Y(this,Jt,!0,"f"),h(this,Ct,"f").length&&Y(this,Ct,h(this,Ct,"f")+`
|
|
68
68
|
`,"f"),Y(this,Ct,h(this,Ct,"f")+e.join(" "),"f")},error:(...e)=>{this[Oa]()||console.error(...e),Y(this,Jt,!0,"f"),h(this,Ct,"f").length&&Y(this,Ct,h(this,Ct,"f")+`
|
|
69
|
-
`,"f"),Y(this,Ct,h(this,Ct,"f")+e.join(" "),"f")}}}[_c](e){Ki(h(this,re,"f")).forEach(r=>{if((i=>i==="configObjects")(r))return;let n=h(this,re,"f")[r];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n=="object"&&delete n[e]}),delete h(this,ge,"f").getDescriptions()[e]}[Lh](e,r,n){h(this,wa,"f")[n]||(h(this,fe,"f").process.emitWarning(e,r),h(this,wa,"f")[n]=!0)}[Mh](){h(this,ka,"f").push({options:h(this,re,"f"),configObjects:h(this,re,"f").configObjects.slice(0),exitProcess:h(this,ur,"f"),groups:h(this,_r,"f"),strict:h(this,Qn,"f"),strictCommands:h(this,ei,"f"),strictOptions:h(this,ti,"f"),completionCommand:h(this,Xt,"f"),output:h(this,Ct,"f"),exitError:h(this,gn,"f"),hasOutput:h(this,Jt,"f"),parsed:this.parsed,parseFn:h(this,Qt,"f"),parseContext:h(this,Xn,"f")}),h(this,ge,"f").freeze(),h(this,tt,"f").freeze(),h(this,ot,"f").freeze(),h(this,lr,"f").freeze()}[Bh](){let e="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(h(this,fe,"f").process.argv()[0])?r=h(this,fe,"f").process.argv().slice(1,2):r=h(this,fe,"f").process.argv().slice(0,1),e=r.map(n=>{let i=this[Xh](h(this,Yn,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&i.length<n.length?i:n}).join(" ").trim(),h(this,fe,"f").getEnv("_")&&h(this,fe,"f").getProcessArgvBin()===h(this,fe,"f").getEnv("_")&&(e=h(this,fe,"f").getEnv("_").replace(`${h(this,fe,"f").path.dirname(h(this,fe,"f").process.execPath())}/`,"")),e}[ri](){return h(this,Sa,"f")}[jh](){return h(this,Ia,"f")}[Sc](){if(!h(this,Zn,"f"))return;let e=h(this,fe,"f").getEnv("LC_ALL")||h(this,fe,"f").getEnv("LC_MESSAGES")||h(this,fe,"f").getEnv("LANG")||h(this,fe,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[Uh](){return this[vc]().version||"unknown"}[zh](e){let r=e["--"]?e["--"]:e._;for(let n=0,i;(i=r[n])!==void 0;n++)h(this,fe,"f").Parser.looksLikeNumber(i)&&Number.isSafeInteger(Math.floor(parseFloat(`${i}`)))&&(r[n]=Number(i));return e}[vc](e){let r=e||"*";if(h(this,Xi,"f")[r])return h(this,Xi,"f")[r];let n={};try{let i=e||h(this,fe,"f").mainFilename;!e&&h(this,fe,"f").path.extname(i)&&(i=h(this,fe,"f").path.dirname(i));let o=h(this,fe,"f").findUp(i,(s,a)=>{if(a.includes("package.json"))return"package.json"});Nt(o,void 0,h(this,fe,"f")),n=JSON.parse(h(this,fe,"f").readFileSync(o,"utf8"))}catch{}return h(this,Xi,"f")[r]=n||{},h(this,Xi,"f")[r]}[yn](e,r){r=[].concat(r),r.forEach(n=>{n=this[Dc](n),h(this,re,"f")[e].push(n)})}[Ji](e,r,n,i){this[Oc](e,r,n,i,(o,s,a)=>{h(this,re,"f")[o][s]=a})}[Ic](e,r,n,i){this[Oc](e,r,n,i,(o,s,a)=>{h(this,re,"f")[o][s]=(h(this,re,"f")[o][s]||[]).concat(a)})}[Oc](e,r,n,i,o){if(Array.isArray(n))n.forEach(s=>{e(s,i)});else if((s=>typeof s=="object")(n))for(let s of Ki(n))e(s,n[s]);else o(r,this[Dc](n),i)}[Dc](e){return e==="__proto__"?"___proto___":e}[Rc](e,r){return this[Ji](this[Rc].bind(this),"key",e,r),this}[Fc](){var e,r,n,i,o,s,a,u,l,c,f,p;let d=h(this,ka,"f").pop();Nt(d,void 0,h(this,fe,"f"));let m;e=this,r=this,n=this,i=this,o=this,s=this,a=this,u=this,l=this,c=this,f=this,p=this,{options:{set value(y){Y(e,re,y,"f")}}.value,configObjects:m,exitProcess:{set value(y){Y(r,ur,y,"f")}}.value,groups:{set value(y){Y(n,_r,y,"f")}}.value,output:{set value(y){Y(i,Ct,y,"f")}}.value,exitError:{set value(y){Y(o,gn,y,"f")}}.value,hasOutput:{set value(y){Y(s,Jt,y,"f")}}.value,parsed:this.parsed,strict:{set value(y){Y(a,Qn,y,"f")}}.value,strictCommands:{set value(y){Y(u,ei,y,"f")}}.value,strictOptions:{set value(y){Y(l,ti,y,"f")}}.value,completionCommand:{set value(y){Y(c,Xt,y,"f")}}.value,parseFn:{set value(y){Y(f,Qt,y,"f")}}.value,parseContext:{set value(y){Y(p,Xn,y,"f")}}.value}=d,h(this,re,"f").configObjects=m,h(this,ge,"f").unfreeze(),h(this,tt,"f").unfreeze(),h(this,ot,"f").unfreeze(),h(this,lr,"f").unfreeze()}[$h](e,r){return Kn(r,n=>(e(n),n))}getInternalMethods(){return{getCommandInstance:this[qh].bind(this),getContext:this[Vh].bind(this),getHasOutput:this[Gh].bind(this),getLoggerInstance:this[Wh].bind(this),getParseContext:this[Hh].bind(this),getParserConfiguration:this[ri].bind(this),getUsageConfiguration:this[jh].bind(this),getUsageInstance:this[Kh].bind(this),getValidationInstance:this[Yh].bind(this),hasParseCallback:this[Oa].bind(this),isGlobalContext:this[Zh].bind(this),postProcess:this[ni].bind(this),reset:this[Nc].bind(this),runValidation:this[Pc].bind(this),runYargsParserAndExecuteCommands:this[ds].bind(this),setHasOutput:this[Jh].bind(this)}}[qh](){return h(this,ot,"f")}[Vh](){return h(this,ps,"f")}[Gh](){return h(this,Jt,"f")}[Wh](){return h(this,Zi,"f")}[Hh](){return h(this,Xn,"f")||{}}[Kh](){return h(this,ge,"f")}[Yh](){return h(this,tt,"f")}[Oa](){return!!h(this,Qt,"f")}[Zh](){return h(this,Ta,"f")}[ni](e,r,n,i){return n||qe(e)||(r||(e=this[Nh](e)),(this[ri]()["parse-positional-numbers"]||this[ri]()["parse-positional-numbers"]===void 0)&&(e=this[zh](e)),i&&(e=Hn(e,this,h(this,lr,"f").getMiddleware(),!1))),e}[Nc](e={}){Y(this,re,h(this,re,"f")||{},"f");let r={};r.local=h(this,re,"f").local||[],r.configObjects=h(this,re,"f").configObjects||[];let n={};r.local.forEach(s=>{n[s]=!0,(e[s]||[]).forEach(a=>{n[a]=!0})}),Object.assign(h(this,Jn,"f"),Object.keys(h(this,_r,"f")).reduce((s,a)=>{let u=h(this,_r,"f")[a].filter(l=>!(l in n));return u.length>0&&(s[a]=u),s},{})),Y(this,_r,{},"f");let i=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],o=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return i.forEach(s=>{r[s]=(h(this,re,"f")[s]||[]).filter(a=>!n[a])}),o.forEach(s=>{r[s]=hn(h(this,re,"f")[s],a=>!n[a])}),r.envPrefix=h(this,re,"f").envPrefix,Y(this,re,r,"f"),Y(this,ge,h(this,ge,"f")?h(this,ge,"f").reset(n):_h(this,h(this,fe,"f")),"f"),Y(this,tt,h(this,tt,"f")?h(this,tt,"f").reset(n):Rh(this,h(this,ge,"f"),h(this,fe,"f")),"f"),Y(this,ot,h(this,ot,"f")?h(this,ot,"f").reset():wh(h(this,ge,"f"),h(this,tt,"f"),h(this,lr,"f"),h(this,fe,"f")),"f"),h(this,ar,"f")||Y(this,ar,Ih(this,h(this,ge,"f"),h(this,ot,"f"),h(this,fe,"f")),"f"),h(this,lr,"f").reset(),Y(this,Xt,null,"f"),Y(this,Ct,"","f"),Y(this,gn,null,"f"),Y(this,Jt,!1,"f"),this.parsed=!1,this}[Xh](e,r){return h(this,fe,"f").path.relative(e,r)}[ds](e,r,n,i=0,o=!1){let s=!!n||o;e=e||h(this,xn,"f"),h(this,re,"f").__=h(this,fe,"f").y18n.__,h(this,re,"f").configuration=this[ri]();let a=!!h(this,re,"f").configuration["populate--"],u=Object.assign({},h(this,re,"f").configuration,{"populate--":!0}),l=h(this,fe,"f").Parser.detailed(e,Object.assign({},h(this,re,"f"),{configuration:{"parse-positional-numbers":!1,...u}})),c=Object.assign(l.argv,h(this,Xn,"f")),f,p=l.aliases,d=!1,m=!1;Object.keys(c).forEach(y=>{y===h(this,cr,"f")&&c[y]?d=!0:y===h(this,Sr,"f")&&c[y]&&(m=!0)}),c.$0=this.$0,this.parsed=l,i===0&&h(this,ge,"f").clearCachedHelpMessage();try{if(this[Sc](),r)return this[ni](c,a,!!n,!1);h(this,cr,"f")&&[h(this,cr,"f")].concat(p[h(this,cr,"f")]||[]).filter(C=>C.length>1).includes(""+c._[c._.length-1])&&(c._.pop(),d=!0),Y(this,Ta,!1,"f");let y=h(this,ot,"f").getCommands(),g=h(this,ar,"f").completionKey in c,b=d||g||o;if(c._.length){if(y.length){let w;for(let C=i||0,D;c._[C]!==void 0;C++)if(D=String(c._[C]),y.includes(D)&&D!==h(this,Xt,"f")){let R=h(this,ot,"f").runCommand(D,this,l,C+1,o,d||m||o);return this[ni](R,a,!!n,!1)}else if(!w&&D!==h(this,Xt,"f")){w=D;break}!h(this,ot,"f").hasDefaultCommand()&&h(this,va,"f")&&w&&!b&&h(this,tt,"f").recommendCommands(w,y)}h(this,Xt,"f")&&c._.includes(h(this,Xt,"f"))&&!g&&(h(this,ur,"f")&&mn(!0),this.showCompletionScript(),this.exit(0))}if(h(this,ot,"f").hasDefaultCommand()&&!b){let w=h(this,ot,"f").runCommand(null,this,l,0,o,d||m||o);return this[ni](w,a,!!n,!1)}if(g){h(this,ur,"f")&&mn(!0),e=[].concat(e);let w=e.slice(e.indexOf(`--${h(this,ar,"f").completionKey}`)+1);return h(this,ar,"f").getCompletion(w,(C,D)=>{if(C)throw new $e(C.message);(D||[]).forEach(R=>{h(this,Zi,"f").log(R)}),this.exit(0)}),this[ni](c,!a,!!n,!1)}if(h(this,Jt,"f")||(d?(h(this,ur,"f")&&mn(!0),s=!0,this.showHelp("log"),this.exit(0)):m&&(h(this,ur,"f")&&mn(!0),s=!0,h(this,ge,"f").showVersion("log"),this.exit(0))),!s&&h(this,re,"f").skipValidation.length>0&&(s=Object.keys(c).some(w=>h(this,re,"f").skipValidation.indexOf(w)>=0&&c[w]===!0)),!s){if(l.error)throw new $e(l.error.message);if(!g){let w=this[Pc](p,{},l.error);n||(f=Hn(c,this,h(this,lr,"f").getMiddleware(),!0)),f=this[$h](w,f??c),qe(f)&&!n&&(f=f.then(()=>Hn(c,this,h(this,lr,"f").getMiddleware(),!1)))}}}catch(y){if(y instanceof $e)h(this,ge,"f").fail(y.message,y);else throw y}return this[ni](f??c,a,!!n,!0)}[Pc](e,r,n,i){let o={...this.getDemandedOptions()};return s=>{if(n)throw new $e(n.message);h(this,tt,"f").nonOptionCount(s),h(this,tt,"f").requiredArguments(s,o);let a=!1;h(this,ei,"f")&&(a=h(this,tt,"f").unknownCommands(s)),h(this,Qn,"f")&&!a?h(this,tt,"f").unknownArguments(s,e,r,!!i):h(this,ti,"f")&&h(this,tt,"f").unknownArguments(s,e,{},!1,!1),h(this,tt,"f").limitedChoices(s),h(this,tt,"f").implications(s),h(this,tt,"f").conflicting(s)}}[Jh](){Y(this,Jt,!0,"f")}[ii](e){if(typeof e=="string")h(this,re,"f").key[e]=!0;else for(let r of e)h(this,re,"f").key[r]=!0}};function kh(t){return!!t&&typeof t.getInternalMethods=="function"}var pk=Qh(bc),em=pk;var tm="1.0.0";import{cosmiconfig as _m}from"cosmiconfig";import{TypeScriptLoader as Sm}from"cosmiconfig-typescript-loader";import MT from"node:fs/promises";import Om from"node:path";var Mc=jd(im(),1);function Bc(t,e,r){if(typeof e=="number"&&(r=e),Mc.default.has(t.toLowerCase())){e=Mc.default.get(t.toLowerCase());let n=t.charAt(0);n===n.toUpperCase()&&(e=n+e.slice(1)),t===t.toUpperCase()&&(e=e.toUpperCase())}else typeof e!="string"&&(e=(t.replace(/(?:s|x|z|ch|sh)$/i,"$&e").replace(/([^aeiou])y$/i,"$1ie")+"s").replace(/i?e?s$/i,n=>t.slice(-1)===t.slice(-1).toLowerCase()?n.toLowerCase():n.toUpperCase()));return Math.abs(r)===1?t:e}import{readPackage as BT}from"read-pkg";import{deepMergeDefined as Yc,log as dr,optionsSchema as jT,rulesSchema as UT}from"remark-mdat";var Oe;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{let o={};for(let s of i)o[s]=s;return o},t.getValidEnumValues=i=>{let o=t.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),s={};for(let a of o)s[a]=i[a];return t.objectValues(s)},t.objectValues=i=>t.objectKeys(i).map(function(o){return i[o]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let o=[];for(let s in i)Object.prototype.hasOwnProperty.call(i,s)&&o.push(s);return o},t.find=(i,o)=>{for(let s of i)if(o(s))return s},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,o=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}t.joinValues=n,t.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(Oe||(Oe={}));var Uc;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Uc||(Uc={}));var V=Oe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Xr=t=>{switch(typeof t){case"undefined":return V.undefined;case"string":return V.string;case"number":return isNaN(t)?V.nan:V.number;case"boolean":return V.boolean;case"function":return V.function;case"bigint":return V.bigint;case"symbol":return V.symbol;case"object":return Array.isArray(t)?V.array:t===null?V.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?V.promise:typeof Map<"u"&&t instanceof Map?V.map:typeof Set<"u"&&t instanceof Set?V.set:typeof Date<"u"&&t instanceof Date?V.date:V.object;default:return V.unknown}},N=Oe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),gk=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),er=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(o){return o.message},n={_errors:[]},i=o=>{for(let s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)n._errors.push(r(s));else{let a=n,u=0;for(;u<s.path.length;){let l=s.path[u];u===s.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(r(s))):a[l]=a[l]||{_errors:[]},a=a[l],u++}}};return i(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Oe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};er.create=t=>new er(t);var to=(t,e)=>{let r;switch(t.code){case N.invalid_type:t.received===V.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case N.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Oe.jsonStringifyReplacer)}`;break;case N.unrecognized_keys:r=`Unrecognized key(s) in object: ${Oe.joinValues(t.keys,", ")}`;break;case N.invalid_union:r="Invalid input";break;case N.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Oe.joinValues(t.options)}`;break;case N.invalid_enum_value:r=`Invalid enum value. Expected ${Oe.joinValues(t.options)}, received '${t.received}'`;break;case N.invalid_arguments:r="Invalid function arguments";break;case N.invalid_return_type:r="Invalid function return type";break;case N.invalid_date:r="Invalid date";break;case N.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Oe.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case N.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case N.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case N.custom:r="Invalid input";break;case N.invalid_intersection_types:r="Intersection results could not be merged";break;case N.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case N.not_finite:r="Number must be finite";break;default:r=e.defaultError,Oe.assertNever(t)}return{message:r}},um=to;function xk(t){um=t}function Da(){return um}var Ra=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,o=[...r,...i.path||[]],s={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let a="",u=n.filter(l=>!!l).slice().reverse();for(let l of u)a=l(s,{data:e,defaultError:a}).message;return{...i,path:o,message:a}},yk=[];function U(t,e){let r=Da(),n=Ra({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===to?void 0:to].filter(i=>!!i)});t.common.issues.push(n)}var vt=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let i of r){if(i.status==="aborted")return pe;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let i of r){let o=await i.key,s=await i.value;n.push({key:o,value:s})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:o,value:s}=i;if(o.status==="aborted"||s.status==="aborted")return pe;o.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||i.alwaysSet)&&(n[o.value]=s.value)}return{status:e.value,value:n}}},pe=Object.freeze({status:"aborted"}),eo=t=>({status:"dirty",value:t}),Pt=t=>({status:"valid",value:t}),zc=t=>t.status==="aborted",$c=t=>t.status==="dirty",oi=t=>t.status==="valid",gs=t=>typeof Promise<"u"&&t instanceof Promise;function Fa(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function lm(t,e,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 e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r}var Q;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Q||(Q={}));var hs,ms,pr=class{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},om=(t,e)=>{if(oi(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new er(t.common.issues);return this._error=r,this._error}}};function Ae(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(s,a)=>{var u,l;let{message:c}=t;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:(u=c??n)!==null&&u!==void 0?u:a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:(l=c??r)!==null&&l!==void 0?l:a.defaultError}},description:i}}var Ce=class{get description(){return this._def.description}_getType(e){return Xr(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Xr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new vt,ctx:{common:e.parent.common,data:e.data,parsedType:Xr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(gs(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;let i={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xr(e)},o=this._parseSync({data:e,path:i.path,parent:i});return om(i,o)}"~validate"(e){var r,n;let i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xr(e)};if(!this["~standard"].async)try{let o=this._parseSync({data:e,path:[],parent:i});return oi(o)?{value:o.value}:{issues:i.common.issues}}catch(o){!((n=(r=o?.message)===null||r===void 0?void 0:r.toLowerCase())===null||n===void 0)&&n.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:i}).then(o=>oi(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xr(e)},i=this._parse({data:e,path:n.path,parent:n}),o=await(gs(i)?i:Promise.resolve(i));return om(n,o)}refine(e,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,o)=>{let s=e(i),a=()=>o.addIssue({code:N.custom,...n(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(u=>u?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new tr({schema:this,typeName:le.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return fr.create(this,this._def)}nullable(){return Ir.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Qr.create(this)}promise(){return An.create(this,this._def)}or(e){return pi.create([this,e],this._def)}and(e){return di.create(this,e,this._def)}transform(e){return new tr({...Ae(this._def),schema:this,typeName:le.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new yi({...Ae(this._def),innerType:this,defaultValue:r,typeName:le.ZodDefault})}brand(){return new xs({typeName:le.ZodBranded,type:this,...Ae(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new bi({...Ae(this._def),innerType:this,catchValue:r,typeName:le.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return ys.create(this,e)}readonly(){return Ei.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},bk=/^c[^\s-]{8,}$/i,Ek=/^[0-9a-z]+$/,Ak=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ck=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,wk=/^[a-z0-9_-]{21}$/i,kk=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Tk=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,_k=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Sk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",jc,vk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ik=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Ok=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Dk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Rk=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Fk=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,cm="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Nk=new RegExp(`^${cm}$`);function fm(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Pk(t){return new RegExp(`^${fm(t)}$`)}function pm(t){let e=`${cm}T${fm(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function Lk(t,e){return!!((e==="v4"||!e)&&vk.test(t)||(e==="v6"||!e)&&Ok.test(t))}function Mk(t,e){if(!kk.test(t))return!1;try{let[r]=t.split("."),n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));return!(typeof i!="object"||i===null||!i.typ||!i.alg||e&&i.alg!==e)}catch{return!1}}function Bk(t,e){return!!((e==="v4"||!e)&&Ik.test(t)||(e==="v6"||!e)&&Dk.test(t))}var bn=class t extends Ce{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==V.string){let o=this._getOrReturnCtx(e);return U(o,{code:N.invalid_type,expected:V.string,received:o.parsedType}),pe}let n=new vt,i;for(let o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(i=this._getOrReturnCtx(e,i),U(i,{code:N.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")e.data.length>o.value&&(i=this._getOrReturnCtx(e,i),U(i,{code:N.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let s=e.data.length>o.value,a=e.data.length<o.value;(s||a)&&(i=this._getOrReturnCtx(e,i),s?U(i,{code:N.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&U(i,{code:N.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")_k.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"email",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")jc||(jc=new RegExp(Sk,"u")),jc.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"emoji",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")Ck.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"uuid",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")wk.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"nanoid",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")bk.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"cuid",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")Ek.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"cuid2",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")Ak.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"ulid",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),U(i,{validation:"url",code:N.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"regex",code:N.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(e,i),U(i,{code:N.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(i=this._getOrReturnCtx(e,i),U(i,{code:N.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(i=this._getOrReturnCtx(e,i),U(i,{code:N.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?pm(o).test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{code:N.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?Nk.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{code:N.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?Pk(o).test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{code:N.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?Tk.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"duration",code:N.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?Lk(e.data,o.version)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"ip",code:N.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?Mk(e.data,o.alg)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"jwt",code:N.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?Bk(e.data,o.version)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"cidr",code:N.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?Rk.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"base64",code:N.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?Fk.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"base64url",code:N.invalid_string,message:o.message}),n.dirty()):Oe.assertNever(o);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:N.invalid_string,...Q.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Q.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Q.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Q.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Q.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Q.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Q.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Q.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Q.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Q.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Q.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Q.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Q.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Q.errToObj(e)})}datetime(e){var r,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(r=e?.offset)!==null&&r!==void 0?r:!1,local:(n=e?.local)!==null&&n!==void 0?n:!1,...Q.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...Q.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Q.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...Q.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...Q.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...Q.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...Q.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...Q.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...Q.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...Q.errToObj(r)})}nonempty(e){return this.min(1,Q.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};bn.create=t=>{var e;return new bn({checks:[],typeName:le.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...Ae(t)})};function jk(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,o=parseInt(t.toFixed(i).replace(".","")),s=parseInt(e.toFixed(i).replace(".",""));return o%s/Math.pow(10,i)}var si=class t extends Ce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==V.number){let o=this._getOrReturnCtx(e);return U(o,{code:N.invalid_type,expected:V.number,received:o.parsedType}),pe}let n,i=new vt;for(let o of this._def.checks)o.kind==="int"?Oe.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{code:N.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?jk(e.data,o.value)!==0&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{code:N.not_finite,message:o.message}),i.dirty()):Oe.assertNever(o);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,Q.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Q.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Q.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Q.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:Q.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Q.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Q.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Q.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Q.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Q.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Q.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:Q.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Q.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Q.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Oe.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};si.create=t=>new si({checks:[],typeName:le.ZodNumber,coerce:t?.coerce||!1,...Ae(t)});var ai=class t extends Ce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==V.bigint)return this._getInvalidInput(e);let n,i=new vt;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):Oe.assertNever(o);return{status:i.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return U(r,{code:N.invalid_type,expected:V.bigint,received:r.parsedType}),pe}gte(e,r){return this.setLimit("min",e,!0,Q.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Q.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Q.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Q.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:Q.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Q.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Q.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Q.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Q.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Q.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};ai.create=t=>{var e;return new ai({checks:[],typeName:le.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...Ae(t)})};var ui=class extends Ce{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==V.boolean){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:V.boolean,received:n.parsedType}),pe}return Pt(e.data)}};ui.create=t=>new ui({typeName:le.ZodBoolean,coerce:t?.coerce||!1,...Ae(t)});var li=class t extends Ce{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==V.date){let o=this._getOrReturnCtx(e);return U(o,{code:N.invalid_type,expected:V.date,received:o.parsedType}),pe}if(isNaN(e.data.getTime())){let o=this._getOrReturnCtx(e);return U(o,{code:N.invalid_date}),pe}let n=new vt,i;for(let o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(i=this._getOrReturnCtx(e,i),U(i,{code:N.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(i=this._getOrReturnCtx(e,i),U(i,{code:N.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):Oe.assertNever(o);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:Q.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:Q.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};li.create=t=>new li({checks:[],coerce:t?.coerce||!1,typeName:le.ZodDate,...Ae(t)});var ro=class extends Ce{_parse(e){if(this._getType(e)!==V.symbol){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:V.symbol,received:n.parsedType}),pe}return Pt(e.data)}};ro.create=t=>new ro({typeName:le.ZodSymbol,...Ae(t)});var ci=class extends Ce{_parse(e){if(this._getType(e)!==V.undefined){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:V.undefined,received:n.parsedType}),pe}return Pt(e.data)}};ci.create=t=>new ci({typeName:le.ZodUndefined,...Ae(t)});var fi=class extends Ce{_parse(e){if(this._getType(e)!==V.null){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:V.null,received:n.parsedType}),pe}return Pt(e.data)}};fi.create=t=>new fi({typeName:le.ZodNull,...Ae(t)});var En=class extends Ce{constructor(){super(...arguments),this._any=!0}_parse(e){return Pt(e.data)}};En.create=t=>new En({typeName:le.ZodAny,...Ae(t)});var Jr=class extends Ce{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Pt(e.data)}};Jr.create=t=>new Jr({typeName:le.ZodUnknown,...Ae(t)});var Er=class extends Ce{_parse(e){let r=this._getOrReturnCtx(e);return U(r,{code:N.invalid_type,expected:V.never,received:r.parsedType}),pe}};Er.create=t=>new Er({typeName:le.ZodNever,...Ae(t)});var no=class extends Ce{_parse(e){if(this._getType(e)!==V.undefined){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:V.void,received:n.parsedType}),pe}return Pt(e.data)}};no.create=t=>new no({typeName:le.ZodVoid,...Ae(t)});var Qr=class t extends Ce{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==V.array)return U(r,{code:N.invalid_type,expected:V.array,received:r.parsedType}),pe;if(i.exactLength!==null){let s=r.data.length>i.exactLength.value,a=r.data.length<i.exactLength.value;(s||a)&&(U(r,{code:s?N.too_big:N.too_small,minimum:a?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(U(r,{code:N.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(U(r,{code:N.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>i.type._parseAsync(new pr(r,s,r.path,a)))).then(s=>vt.mergeArray(n,s));let o=[...r.data].map((s,a)=>i.type._parseSync(new pr(r,s,r.path,a)));return vt.mergeArray(n,o)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:Q.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:Q.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:Q.toString(r)}})}nonempty(e){return this.min(1,e)}};Qr.create=(t,e)=>new Qr({type:t,minLength:null,maxLength:null,exactLength:null,typeName:le.ZodArray,...Ae(e)});function Qi(t){if(t instanceof Vt){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=fr.create(Qi(n))}return new Vt({...t._def,shape:()=>e})}else return t instanceof Qr?new Qr({...t._def,type:Qi(t.element)}):t instanceof fr?fr.create(Qi(t.unwrap())):t instanceof Ir?Ir.create(Qi(t.unwrap())):t instanceof vr?vr.create(t.items.map(e=>Qi(e))):t}var Vt=class t extends Ce{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=Oe.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==V.object){let l=this._getOrReturnCtx(e);return U(l,{code:N.invalid_type,expected:V.object,received:l.parsedType}),pe}let{status:n,ctx:i}=this._processInputParams(e),{shape:o,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Er&&this._def.unknownKeys==="strip"))for(let l in i.data)s.includes(l)||a.push(l);let u=[];for(let l of s){let c=o[l],f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new pr(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Er){let l=this._def.unknownKeys;if(l==="passthrough")for(let c of a)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")a.length>0&&(U(i,{code:N.unrecognized_keys,keys:a}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let l=this._def.catchall;for(let c of a){let f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new pr(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let l=[];for(let c of u){let f=await c.key,p=await c.value;l.push({key:f,value:p,alwaysSet:c.alwaysSet})}return l}).then(l=>vt.mergeObjectSync(n,l)):vt.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return Q.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,o,s,a;let u=(s=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,r,n).message)!==null&&s!==void 0?s:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=Q.errToObj(e).message)!==null&&a!==void 0?a:u}:{message:u}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:le.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return Oe.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}omit(e){let r={};return Oe.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}deepPartial(){return Qi(this)}partial(e){let r={};return Oe.objectKeys(this.shape).forEach(n=>{let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}),new t({...this._def,shape:()=>r})}required(e){let r={};return Oe.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof fr;)o=o._def.innerType;r[n]=o}}),new t({...this._def,shape:()=>r})}keyof(){return dm(Oe.objectKeys(this.shape))}};Vt.create=(t,e)=>new Vt({shape:()=>t,unknownKeys:"strip",catchall:Er.create(),typeName:le.ZodObject,...Ae(e)});Vt.strictCreate=(t,e)=>new Vt({shape:()=>t,unknownKeys:"strict",catchall:Er.create(),typeName:le.ZodObject,...Ae(e)});Vt.lazycreate=(t,e)=>new Vt({shape:t,unknownKeys:"strip",catchall:Er.create(),typeName:le.ZodObject,...Ae(e)});var pi=class extends Ce{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(o){for(let a of o)if(a.result.status==="valid")return a.result;for(let a of o)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=o.map(a=>new er(a.ctx.common.issues));return U(r,{code:N.invalid_union,unionErrors:s}),pe}if(r.common.async)return Promise.all(n.map(async o=>{let s={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(i);{let o,s=[];for(let u of n){let l={...r,common:{...r.common,issues:[]},parent:null},c=u._parseSync({data:r.data,path:r.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!o&&(o={result:c,ctx:l}),l.common.issues.length&&s.push(l.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let a=s.map(u=>new er(u));return U(r,{code:N.invalid_union,unionErrors:a}),pe}}get options(){return this._def.options}};pi.create=(t,e)=>new pi({options:t,typeName:le.ZodUnion,...Ae(e)});var Zr=t=>t instanceof hi?Zr(t.schema):t instanceof tr?Zr(t.innerType()):t instanceof mi?[t.value]:t instanceof gi?t.options:t instanceof xi?Oe.objectValues(t.enum):t instanceof yi?Zr(t._def.innerType):t instanceof ci?[void 0]:t instanceof fi?[null]:t instanceof fr?[void 0,...Zr(t.unwrap())]:t instanceof Ir?[null,...Zr(t.unwrap())]:t instanceof xs||t instanceof Ei?Zr(t.unwrap()):t instanceof bi?Zr(t._def.innerType):[],Na=class t extends Ce{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==V.object)return U(r,{code:N.invalid_type,expected:V.object,received:r.parsedType}),pe;let n=this.discriminator,i=r.data[n],o=this.optionsMap.get(i);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(U(r,{code:N.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),pe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let i=new Map;for(let o of r){let s=Zr(o.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of s){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,o)}}return new t({typeName:le.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...Ae(n)})}};function qc(t,e){let r=Xr(t),n=Xr(e);if(t===e)return{valid:!0,data:t};if(r===V.object&&n===V.object){let i=Oe.objectKeys(e),o=Oe.objectKeys(t).filter(a=>i.indexOf(a)!==-1),s={...t,...e};for(let a of o){let u=qc(t[a],e[a]);if(!u.valid)return{valid:!1};s[a]=u.data}return{valid:!0,data:s}}else if(r===V.array&&n===V.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let o=0;o<t.length;o++){let s=t[o],a=e[o],u=qc(s,a);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return r===V.date&&n===V.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var di=class extends Ce{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(o,s)=>{if(zc(o)||zc(s))return pe;let a=qc(o.value,s.value);return a.valid?(($c(o)||$c(s))&&r.dirty(),{status:r.value,value:a.data}):(U(n,{code:N.invalid_intersection_types}),pe)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,s])=>i(o,s)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};di.create=(t,e,r)=>new di({left:t,right:e,typeName:le.ZodIntersection,...Ae(r)});var vr=class t extends Ce{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.array)return U(n,{code:N.invalid_type,expected:V.array,received:n.parsedType}),pe;if(n.data.length<this._def.items.length)return U(n,{code:N.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),pe;!this._def.rest&&n.data.length>this._def.items.length&&(U(n,{code:N.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...n.data].map((s,a)=>{let u=this._def.items[a]||this._def.rest;return u?u._parse(new pr(n,s,n.path,a)):null}).filter(s=>!!s);return n.common.async?Promise.all(o).then(s=>vt.mergeArray(r,s)):vt.mergeArray(r,o)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};vr.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new vr({items:t,typeName:le.ZodTuple,rest:null,...Ae(e)})};var Pa=class t extends Ce{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.object)return U(n,{code:N.invalid_type,expected:V.object,received:n.parsedType}),pe;let i=[],o=this._def.keyType,s=this._def.valueType;for(let a in n.data)i.push({key:o._parse(new pr(n,a,n.path,a)),value:s._parse(new pr(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?vt.mergeObjectAsync(r,i):vt.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof Ce?new t({keyType:e,valueType:r,typeName:le.ZodRecord,...Ae(n)}):new t({keyType:bn.create(),valueType:e,typeName:le.ZodRecord,...Ae(r)})}},io=class extends Ce{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.map)return U(n,{code:N.invalid_type,expected:V.map,received:n.parsedType}),pe;let i=this._def.keyType,o=this._def.valueType,s=[...n.data.entries()].map(([a,u],l)=>({key:i._parse(new pr(n,a,n.path,[l,"key"])),value:o._parse(new pr(n,u,n.path,[l,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let u of s){let l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return pe;(l.status==="dirty"||c.status==="dirty")&&r.dirty(),a.set(l.value,c.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let u of s){let l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return pe;(l.status==="dirty"||c.status==="dirty")&&r.dirty(),a.set(l.value,c.value)}return{status:r.value,value:a}}}};io.create=(t,e,r)=>new io({valueType:e,keyType:t,typeName:le.ZodMap,...Ae(r)});var oo=class t extends Ce{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.set)return U(n,{code:N.invalid_type,expected:V.set,received:n.parsedType}),pe;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(U(n,{code:N.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(U(n,{code:N.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let o=this._def.valueType;function s(u){let l=new Set;for(let c of u){if(c.status==="aborted")return pe;c.status==="dirty"&&r.dirty(),l.add(c.value)}return{status:r.value,value:l}}let a=[...n.data.values()].map((u,l)=>o._parse(new pr(n,u,n.path,l)));return n.common.async?Promise.all(a).then(u=>s(u)):s(a)}min(e,r){return new t({...this._def,minSize:{value:e,message:Q.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:Q.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};oo.create=(t,e)=>new oo({valueType:t,minSize:null,maxSize:null,typeName:le.ZodSet,...Ae(e)});var La=class t extends Ce{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==V.function)return U(r,{code:N.invalid_type,expected:V.function,received:r.parsedType}),pe;function n(a,u){return Ra({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Da(),to].filter(l=>!!l),issueData:{code:N.invalid_arguments,argumentsError:u}})}function i(a,u){return Ra({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Da(),to].filter(l=>!!l),issueData:{code:N.invalid_return_type,returnTypeError:u}})}let o={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof An){let a=this;return Pt(async function(...u){let l=new er([]),c=await a._def.args.parseAsync(u,o).catch(d=>{throw l.addIssue(n(u,d)),l}),f=await Reflect.apply(s,this,c);return await a._def.returns._def.type.parseAsync(f,o).catch(d=>{throw l.addIssue(i(f,d)),l})})}else{let a=this;return Pt(function(...u){let l=a._def.args.safeParse(u,o);if(!l.success)throw new er([n(u,l.error)]);let c=Reflect.apply(s,this,l.data),f=a._def.returns.safeParse(c,o);if(!f.success)throw new er([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:vr.create(e).rest(Jr.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||vr.create([]).rest(Jr.create()),returns:r||Jr.create(),typeName:le.ZodFunction,...Ae(n)})}},hi=class extends Ce{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};hi.create=(t,e)=>new hi({getter:t,typeName:le.ZodLazy,...Ae(e)});var mi=class extends Ce{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return U(r,{received:r.data,code:N.invalid_literal,expected:this._def.value}),pe}return{status:"valid",value:e.data}}get value(){return this._def.value}};mi.create=(t,e)=>new mi({value:t,typeName:le.ZodLiteral,...Ae(e)});function dm(t,e){return new gi({values:t,typeName:le.ZodEnum,...Ae(e)})}var gi=class t extends Ce{constructor(){super(...arguments),hs.set(this,void 0)}_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return U(r,{expected:Oe.joinValues(n),received:r.parsedType,code:N.invalid_type}),pe}if(Fa(this,hs,"f")||lm(this,hs,new Set(this._def.values),"f"),!Fa(this,hs,"f").has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return U(r,{received:r.data,code:N.invalid_enum_value,options:n}),pe}return Pt(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};hs=new WeakMap;gi.create=dm;var xi=class extends Ce{constructor(){super(...arguments),ms.set(this,void 0)}_parse(e){let r=Oe.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==V.string&&n.parsedType!==V.number){let i=Oe.objectValues(r);return U(n,{expected:Oe.joinValues(i),received:n.parsedType,code:N.invalid_type}),pe}if(Fa(this,ms,"f")||lm(this,ms,new Set(Oe.getValidEnumValues(this._def.values)),"f"),!Fa(this,ms,"f").has(e.data)){let i=Oe.objectValues(r);return U(n,{received:n.data,code:N.invalid_enum_value,options:i}),pe}return Pt(e.data)}get enum(){return this._def.values}};ms=new WeakMap;xi.create=(t,e)=>new xi({values:t,typeName:le.ZodNativeEnum,...Ae(e)});var An=class extends Ce{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==V.promise&&r.common.async===!1)return U(r,{code:N.invalid_type,expected:V.promise,received:r.parsedType}),pe;let n=r.parsedType===V.promise?r.data:Promise.resolve(r.data);return Pt(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};An.create=(t,e)=>new An({type:t,typeName:le.ZodPromise,...Ae(e)});var tr=class extends Ce{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===le.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,o={addIssue:s=>{U(n,s),s.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){let s=i.transform(n.data,o);if(n.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return pe;let u=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return u.status==="aborted"?pe:u.status==="dirty"||r.value==="dirty"?eo(u.value):u});{if(r.value==="aborted")return pe;let a=this._def.schema._parseSync({data:s,path:n.path,parent:n});return a.status==="aborted"?pe:a.status==="dirty"||r.value==="dirty"?eo(a.value):a}}if(i.type==="refinement"){let s=a=>{let u=i.refinement(a,o);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?pe:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?pe:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(i.type==="transform")if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!oi(s))return s;let a=i.transform(s.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>oi(s)?Promise.resolve(i.transform(s.value,o)).then(a=>({status:r.value,value:a})):s);Oe.assertNever(i)}};tr.create=(t,e,r)=>new tr({schema:t,typeName:le.ZodEffects,effect:e,...Ae(r)});tr.createWithPreprocess=(t,e,r)=>new tr({schema:e,effect:{type:"preprocess",transform:t},typeName:le.ZodEffects,...Ae(r)});var fr=class extends Ce{_parse(e){return this._getType(e)===V.undefined?Pt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};fr.create=(t,e)=>new fr({innerType:t,typeName:le.ZodOptional,...Ae(e)});var Ir=class extends Ce{_parse(e){return this._getType(e)===V.null?Pt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Ir.create=(t,e)=>new Ir({innerType:t,typeName:le.ZodNullable,...Ae(e)});var yi=class extends Ce{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===V.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};yi.create=(t,e)=>new yi({innerType:t,typeName:le.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ae(e)});var bi=class extends Ce{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return gs(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new er(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new er(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};bi.create=(t,e)=>new bi({innerType:t,typeName:le.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ae(e)});var so=class extends Ce{_parse(e){if(this._getType(e)!==V.nan){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:V.nan,received:n.parsedType}),pe}return{status:"valid",value:e.data}}};so.create=t=>new so({typeName:le.ZodNaN,...Ae(t)});var Uk=Symbol("zod_brand"),xs=class extends Ce{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},ys=class t extends Ce{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?pe:o.status==="dirty"?(r.dirty(),eo(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?pe:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:le.ZodPipeline})}},Ei=class extends Ce{_parse(e){let r=this._def.innerType._parse(e),n=i=>(oi(i)&&(i.value=Object.freeze(i.value)),i);return gs(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};Ei.create=(t,e)=>new Ei({innerType:t,typeName:le.ZodReadonly,...Ae(e)});function sm(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function hm(t,e={},r){return t?En.create().superRefine((n,i)=>{var o,s;let a=t(n);if(a instanceof Promise)return a.then(u=>{var l,c;if(!u){let f=sm(e,n),p=(c=(l=f.fatal)!==null&&l!==void 0?l:r)!==null&&c!==void 0?c:!0;i.addIssue({code:"custom",...f,fatal:p})}});if(!a){let u=sm(e,n),l=(s=(o=u.fatal)!==null&&o!==void 0?o:r)!==null&&s!==void 0?s:!0;i.addIssue({code:"custom",...u,fatal:l})}}):En.create()}var zk={object:Vt.lazycreate},le;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(le||(le={}));var $k=(t,e={message:`Input not instance of ${t.name}`})=>hm(r=>r instanceof t,e),mm=bn.create,gm=si.create,qk=so.create,Vk=ai.create,xm=ui.create,Gk=li.create,Wk=ro.create,Hk=ci.create,Kk=fi.create,Yk=En.create,Zk=Jr.create,Xk=Er.create,Jk=no.create,Qk=Qr.create,eT=Vt.create,tT=Vt.strictCreate,rT=pi.create,nT=Na.create,iT=di.create,oT=vr.create,sT=Pa.create,aT=io.create,uT=oo.create,lT=La.create,cT=hi.create,fT=mi.create,pT=gi.create,dT=xi.create,hT=An.create,am=tr.create,mT=fr.create,gT=Ir.create,xT=tr.createWithPreprocess,yT=ys.create,bT=()=>mm().optional(),ET=()=>gm().optional(),AT=()=>xm().optional(),CT={string:t=>bn.create({...t,coerce:!0}),number:t=>si.create({...t,coerce:!0}),boolean:t=>ui.create({...t,coerce:!0}),bigint:t=>ai.create({...t,coerce:!0}),date:t=>li.create({...t,coerce:!0})},wT=pe,X=Object.freeze({__proto__:null,defaultErrorMap:to,setErrorMap:xk,getErrorMap:Da,makeIssue:Ra,EMPTY_PATH:yk,addIssueToContext:U,ParseStatus:vt,INVALID:pe,DIRTY:eo,OK:Pt,isAborted:zc,isDirty:$c,isValid:oi,isAsync:gs,get util(){return Oe},get objectUtil(){return Uc},ZodParsedType:V,getParsedType:Xr,ZodType:Ce,datetimeRegex:pm,ZodString:bn,ZodNumber:si,ZodBigInt:ai,ZodBoolean:ui,ZodDate:li,ZodSymbol:ro,ZodUndefined:ci,ZodNull:fi,ZodAny:En,ZodUnknown:Jr,ZodNever:Er,ZodVoid:no,ZodArray:Qr,ZodObject:Vt,ZodUnion:pi,ZodDiscriminatedUnion:Na,ZodIntersection:di,ZodTuple:vr,ZodRecord:Pa,ZodMap:io,ZodSet:oo,ZodFunction:La,ZodLazy:hi,ZodLiteral:mi,ZodEnum:gi,ZodNativeEnum:xi,ZodPromise:An,ZodEffects:tr,ZodTransformer:tr,ZodOptional:fr,ZodNullable:Ir,ZodDefault:yi,ZodCatch:bi,ZodNaN:so,BRAND:Uk,ZodBranded:xs,ZodPipeline:ys,ZodReadonly:Ei,custom:hm,Schema:Ce,ZodSchema:Ce,late:zk,get ZodFirstPartyTypeKind(){return le},coerce:CT,any:Yk,array:Qk,bigint:Vk,boolean:xm,date:Gk,discriminatedUnion:nT,effect:am,enum:pT,function:lT,instanceof:$k,intersection:iT,lazy:cT,literal:fT,map:aT,nan:qk,nativeEnum:dT,never:Xk,null:Kk,nullable:gT,number:gm,object:eT,oboolean:AT,onumber:ET,optional:mT,ostring:bT,pipeline:yT,preprocess:xT,promise:hT,record:sT,set:uT,strictObject:tT,string:mm,symbol:Wk,transformer:am,tuple:oT,undefined:Hk,union:rT,unknown:Zk,void:Jk,NEVER:wT,ZodIssueCode:N,quotelessJson:gk,ZodError:er});import{defaultLoaders as kT}from"cosmiconfig";function Vc(t,e){let r=kT[".json"],n=r(t,e);return ym(n)}function ym(t,e="",r={}){for(let[n,i]of Object.entries(t)){let o=e?`${e}.${n}`:n;typeof i=="object"&&i!==null&&!Array.isArray(i)?ym(i,o,r):i===null?r[o]="null":r[o]=i.toString()}return r}import FT from"node:fs";import en from"node:path";import IT from"node:process";import TT from"node:process";import _T from"node:fs/promises";import{fileURLToPath as ST}from"node:url";import ao from"node:path";var bm=t=>t instanceof URL?ST(t):t;async function Ma(t,{cwd:e=TT.cwd(),type:r="file",stopAt:n}={}){let i=ao.resolve(bm(e)??""),{root:o}=ao.parse(i);n=ao.resolve(i,bm(n??o));let s=ao.isAbsolute(t);for(;i;){let a=s?t:ao.join(i,t);try{let u=await _T.stat(a);if(r==="file"&&u.isFile()||r==="directory"&&u.isDirectory())return a}catch{}if(i===n||i===o)break;i=ao.dirname(i)}}async function Em({cwd:t=IT.cwd()}={}){return Ma("package.json",{cwd:t})}import OT from"node:fs";import DT from"node:fs/promises";async function Gc(t,e,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await DT[t](r))[e]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}function Wc(t,e,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return OT[t](r)[e]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}var uo=Gc.bind(void 0,"stat","isFile"),s2=Gc.bind(void 0,"stat","isDirectory"),a2=Gc.bind(void 0,"lstat","isSymbolicLink"),Hc=Wc.bind(void 0,"statSync","isFile"),u2=Wc.bind(void 0,"statSync","isDirectory"),l2=Wc.bind(void 0,"lstatSync","isSymbolicLink");import{log as Cm}from"remark-mdat";import{Configuration as NT}from"unified-engine";import RT from"node:os";var Am=RT.homedir();function Kc(t){if(typeof t!="string")throw new TypeError(`Expected a string, got ${typeof t}`);return Am?t.replace(/^~(?=$|\/|\\)/,Am):t}function PT(t,e){let r=e===0?1:Math.floor(Math.log10(Math.abs(e))+1);return t.toString().padStart(r,"0")}function km(t,e,r,n){let i=[];for(let[o,s]of t.entries()){let a=r&&t.length>1?`-${PT(o+1,t.length+1)}`:"",u=LT(s,e,r,n,a);i.push(u)}return i}function LT(t,e,r,n,i=""){let o=wm(t),s=e?wm(e):void 0;if(!Hc(o))throw new Error(`Input file not found: "${o}"`);if(s){if(Hc(s))throw new Error(`Output path must be a directory, received a file path: "${s}"`);FT.mkdirSync(s,{recursive:!0})}let a=r?en.basename(r,en.extname(r)):en.basename(o,en.extname(o)),u=`.${n??(r&&en.extname(r)!==""?en.extname(r):en.extname(t)===""?"":en.extname(t))}`,l=`${a}${i}${u}`,c=s??en.dirname(o);return{input:o,name:l,output:c}}function wm(t){return Kc(t)}async function Ba(){return Em()}function ja(t){return t==null?[]:Array.isArray(t)?t:[t]}async function Tm(){let t=new NT({cwd:process.cwd(),detectConfig:!0,packageField:"remarkConfig",rcName:".remarkrc"}),e=await new Promise(r=>{t.load("",(n,i)=>{if(n){console.error(n),r();return}r(i)})});if(e){let{filePath:r}=e;return r===void 0?Cm.info('No ambient Remark configuration file found"'):Cm.info(`Found and loaded ambient Remark configuration from "${r}"`),e}throw new Error("Failed to load ambient remark configuration")}var vm=jT.merge(X.object({assetsPath:X.string().optional(),packageFile:X.string().optional()})).describe("Config Extension");async function Ai(t){let{additionalConfig:e,additionalRules:r,searchFrom:n}=t??{},i={addMetaComment:!1,assetsPath:"./assets",closingPrefix:"/",keywordPrefix:"",metaCommentIdentifier:"+",packageFile:await Ba(),rules:{mdat:"Powered by the Markdown Autophagic Template system: [mdat](https://github.com/kitschpatrol/mdat)."}},o=_m("mdat",{loaders:{".ts":Sm()}}),s=await o.search(n);if(s){let{config:a,filepath:u}=s,l=a;if(dr.info(`Using config from "${u}"`),u.endsWith("package.json")&&typeof a=="string"){dr.info(`Detected shared config string: "${a}"`);let{default:f}=await import(a);l=f}let c=Im(l,vm);c&&(i=Yc(i,c))}if(e!==void 0){let a=Array.isArray(e)?e:[e];for(let u of a){let l;if(typeof u=="string"){let f=await o.load(u);if(f==null)continue;let{config:p,filepath:d}=f;dr.info(`Loaded additional config from "${d}"`),l=p}else l=u;if(l===void 0)continue;dr.info("Merging configuration object");let c=Im(l,vm);c!==void 0&&(i=Yc(i,c))}}if(r!==void 0){let a=Array.isArray(r)?r:[r],u=_m("mdat",{loaders:{".json":Vc,".ts":Sm()}});for(let l of a){let c;if(typeof l=="string"){let p;if(Om.basename(l).endsWith("package.json")){let y=await MT.readFile(l,"utf8");p={config:Vc(l,y),filepath:l}}else p=await u.load(l);if(p==null)continue;let{config:d,filepath:m}=p;dr.info(`Loaded additional config from "${m}"`),c=d}else c=l;if(c===void 0)continue;dr.info("Merging rules into configuration object");let f=zT(c,UT);f!==void 0&&(i=Yc(i,f))}}if(i.rules){let a=Object.keys(i.rules).sort().map(u=>`"${St.bold.green(u)}"`);dr.info(`Loaded ${St.bold(a.length)} mdat comment expansion ${Bc("rule",a.length)}:`);for(let u of a)dr.info(` ${u}`)}else dr.error("No rules loaded from additional configurations or rules, using default.");return Ua=i,i}function zT(t,e){if(e.safeParse(t).success)return{rules:t};dr.error(`Rules object has the wrong shape. Ignoring and using default configuration:
|
|
69
|
+
`,"f"),Y(this,Ct,h(this,Ct,"f")+e.join(" "),"f")}}}[_c](e){Ki(h(this,re,"f")).forEach(r=>{if((i=>i==="configObjects")(r))return;let n=h(this,re,"f")[r];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n=="object"&&delete n[e]}),delete h(this,ge,"f").getDescriptions()[e]}[Lh](e,r,n){h(this,wa,"f")[n]||(h(this,fe,"f").process.emitWarning(e,r),h(this,wa,"f")[n]=!0)}[Mh](){h(this,ka,"f").push({options:h(this,re,"f"),configObjects:h(this,re,"f").configObjects.slice(0),exitProcess:h(this,ur,"f"),groups:h(this,_r,"f"),strict:h(this,Qn,"f"),strictCommands:h(this,ei,"f"),strictOptions:h(this,ti,"f"),completionCommand:h(this,Xt,"f"),output:h(this,Ct,"f"),exitError:h(this,gn,"f"),hasOutput:h(this,Jt,"f"),parsed:this.parsed,parseFn:h(this,Qt,"f"),parseContext:h(this,Xn,"f")}),h(this,ge,"f").freeze(),h(this,tt,"f").freeze(),h(this,ot,"f").freeze(),h(this,lr,"f").freeze()}[Bh](){let e="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(h(this,fe,"f").process.argv()[0])?r=h(this,fe,"f").process.argv().slice(1,2):r=h(this,fe,"f").process.argv().slice(0,1),e=r.map(n=>{let i=this[Xh](h(this,Yn,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&i.length<n.length?i:n}).join(" ").trim(),h(this,fe,"f").getEnv("_")&&h(this,fe,"f").getProcessArgvBin()===h(this,fe,"f").getEnv("_")&&(e=h(this,fe,"f").getEnv("_").replace(`${h(this,fe,"f").path.dirname(h(this,fe,"f").process.execPath())}/`,"")),e}[ri](){return h(this,Sa,"f")}[jh](){return h(this,Ia,"f")}[Sc](){if(!h(this,Zn,"f"))return;let e=h(this,fe,"f").getEnv("LC_ALL")||h(this,fe,"f").getEnv("LC_MESSAGES")||h(this,fe,"f").getEnv("LANG")||h(this,fe,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[Uh](){return this[vc]().version||"unknown"}[zh](e){let r=e["--"]?e["--"]:e._;for(let n=0,i;(i=r[n])!==void 0;n++)h(this,fe,"f").Parser.looksLikeNumber(i)&&Number.isSafeInteger(Math.floor(parseFloat(`${i}`)))&&(r[n]=Number(i));return e}[vc](e){let r=e||"*";if(h(this,Xi,"f")[r])return h(this,Xi,"f")[r];let n={};try{let i=e||h(this,fe,"f").mainFilename;!e&&h(this,fe,"f").path.extname(i)&&(i=h(this,fe,"f").path.dirname(i));let o=h(this,fe,"f").findUp(i,(s,a)=>{if(a.includes("package.json"))return"package.json"});Nt(o,void 0,h(this,fe,"f")),n=JSON.parse(h(this,fe,"f").readFileSync(o,"utf8"))}catch{}return h(this,Xi,"f")[r]=n||{},h(this,Xi,"f")[r]}[yn](e,r){r=[].concat(r),r.forEach(n=>{n=this[Dc](n),h(this,re,"f")[e].push(n)})}[Ji](e,r,n,i){this[Oc](e,r,n,i,(o,s,a)=>{h(this,re,"f")[o][s]=a})}[Ic](e,r,n,i){this[Oc](e,r,n,i,(o,s,a)=>{h(this,re,"f")[o][s]=(h(this,re,"f")[o][s]||[]).concat(a)})}[Oc](e,r,n,i,o){if(Array.isArray(n))n.forEach(s=>{e(s,i)});else if((s=>typeof s=="object")(n))for(let s of Ki(n))e(s,n[s]);else o(r,this[Dc](n),i)}[Dc](e){return e==="__proto__"?"___proto___":e}[Rc](e,r){return this[Ji](this[Rc].bind(this),"key",e,r),this}[Fc](){var e,r,n,i,o,s,a,u,l,c,f,p;let d=h(this,ka,"f").pop();Nt(d,void 0,h(this,fe,"f"));let m;e=this,r=this,n=this,i=this,o=this,s=this,a=this,u=this,l=this,c=this,f=this,p=this,{options:{set value(y){Y(e,re,y,"f")}}.value,configObjects:m,exitProcess:{set value(y){Y(r,ur,y,"f")}}.value,groups:{set value(y){Y(n,_r,y,"f")}}.value,output:{set value(y){Y(i,Ct,y,"f")}}.value,exitError:{set value(y){Y(o,gn,y,"f")}}.value,hasOutput:{set value(y){Y(s,Jt,y,"f")}}.value,parsed:this.parsed,strict:{set value(y){Y(a,Qn,y,"f")}}.value,strictCommands:{set value(y){Y(u,ei,y,"f")}}.value,strictOptions:{set value(y){Y(l,ti,y,"f")}}.value,completionCommand:{set value(y){Y(c,Xt,y,"f")}}.value,parseFn:{set value(y){Y(f,Qt,y,"f")}}.value,parseContext:{set value(y){Y(p,Xn,y,"f")}}.value}=d,h(this,re,"f").configObjects=m,h(this,ge,"f").unfreeze(),h(this,tt,"f").unfreeze(),h(this,ot,"f").unfreeze(),h(this,lr,"f").unfreeze()}[$h](e,r){return Kn(r,n=>(e(n),n))}getInternalMethods(){return{getCommandInstance:this[qh].bind(this),getContext:this[Vh].bind(this),getHasOutput:this[Gh].bind(this),getLoggerInstance:this[Wh].bind(this),getParseContext:this[Hh].bind(this),getParserConfiguration:this[ri].bind(this),getUsageConfiguration:this[jh].bind(this),getUsageInstance:this[Kh].bind(this),getValidationInstance:this[Yh].bind(this),hasParseCallback:this[Oa].bind(this),isGlobalContext:this[Zh].bind(this),postProcess:this[ni].bind(this),reset:this[Nc].bind(this),runValidation:this[Pc].bind(this),runYargsParserAndExecuteCommands:this[ds].bind(this),setHasOutput:this[Jh].bind(this)}}[qh](){return h(this,ot,"f")}[Vh](){return h(this,ps,"f")}[Gh](){return h(this,Jt,"f")}[Wh](){return h(this,Zi,"f")}[Hh](){return h(this,Xn,"f")||{}}[Kh](){return h(this,ge,"f")}[Yh](){return h(this,tt,"f")}[Oa](){return!!h(this,Qt,"f")}[Zh](){return h(this,Ta,"f")}[ni](e,r,n,i){return n||qe(e)||(r||(e=this[Nh](e)),(this[ri]()["parse-positional-numbers"]||this[ri]()["parse-positional-numbers"]===void 0)&&(e=this[zh](e)),i&&(e=Hn(e,this,h(this,lr,"f").getMiddleware(),!1))),e}[Nc](e={}){Y(this,re,h(this,re,"f")||{},"f");let r={};r.local=h(this,re,"f").local||[],r.configObjects=h(this,re,"f").configObjects||[];let n={};r.local.forEach(s=>{n[s]=!0,(e[s]||[]).forEach(a=>{n[a]=!0})}),Object.assign(h(this,Jn,"f"),Object.keys(h(this,_r,"f")).reduce((s,a)=>{let u=h(this,_r,"f")[a].filter(l=>!(l in n));return u.length>0&&(s[a]=u),s},{})),Y(this,_r,{},"f");let i=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],o=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return i.forEach(s=>{r[s]=(h(this,re,"f")[s]||[]).filter(a=>!n[a])}),o.forEach(s=>{r[s]=hn(h(this,re,"f")[s],a=>!n[a])}),r.envPrefix=h(this,re,"f").envPrefix,Y(this,re,r,"f"),Y(this,ge,h(this,ge,"f")?h(this,ge,"f").reset(n):_h(this,h(this,fe,"f")),"f"),Y(this,tt,h(this,tt,"f")?h(this,tt,"f").reset(n):Rh(this,h(this,ge,"f"),h(this,fe,"f")),"f"),Y(this,ot,h(this,ot,"f")?h(this,ot,"f").reset():wh(h(this,ge,"f"),h(this,tt,"f"),h(this,lr,"f"),h(this,fe,"f")),"f"),h(this,ar,"f")||Y(this,ar,Ih(this,h(this,ge,"f"),h(this,ot,"f"),h(this,fe,"f")),"f"),h(this,lr,"f").reset(),Y(this,Xt,null,"f"),Y(this,Ct,"","f"),Y(this,gn,null,"f"),Y(this,Jt,!1,"f"),this.parsed=!1,this}[Xh](e,r){return h(this,fe,"f").path.relative(e,r)}[ds](e,r,n,i=0,o=!1){let s=!!n||o;e=e||h(this,xn,"f"),h(this,re,"f").__=h(this,fe,"f").y18n.__,h(this,re,"f").configuration=this[ri]();let a=!!h(this,re,"f").configuration["populate--"],u=Object.assign({},h(this,re,"f").configuration,{"populate--":!0}),l=h(this,fe,"f").Parser.detailed(e,Object.assign({},h(this,re,"f"),{configuration:{"parse-positional-numbers":!1,...u}})),c=Object.assign(l.argv,h(this,Xn,"f")),f,p=l.aliases,d=!1,m=!1;Object.keys(c).forEach(y=>{y===h(this,cr,"f")&&c[y]?d=!0:y===h(this,Sr,"f")&&c[y]&&(m=!0)}),c.$0=this.$0,this.parsed=l,i===0&&h(this,ge,"f").clearCachedHelpMessage();try{if(this[Sc](),r)return this[ni](c,a,!!n,!1);h(this,cr,"f")&&[h(this,cr,"f")].concat(p[h(this,cr,"f")]||[]).filter(C=>C.length>1).includes(""+c._[c._.length-1])&&(c._.pop(),d=!0),Y(this,Ta,!1,"f");let y=h(this,ot,"f").getCommands(),g=h(this,ar,"f").completionKey in c,b=d||g||o;if(c._.length){if(y.length){let w;for(let C=i||0,D;c._[C]!==void 0;C++)if(D=String(c._[C]),y.includes(D)&&D!==h(this,Xt,"f")){let R=h(this,ot,"f").runCommand(D,this,l,C+1,o,d||m||o);return this[ni](R,a,!!n,!1)}else if(!w&&D!==h(this,Xt,"f")){w=D;break}!h(this,ot,"f").hasDefaultCommand()&&h(this,va,"f")&&w&&!b&&h(this,tt,"f").recommendCommands(w,y)}h(this,Xt,"f")&&c._.includes(h(this,Xt,"f"))&&!g&&(h(this,ur,"f")&&mn(!0),this.showCompletionScript(),this.exit(0))}if(h(this,ot,"f").hasDefaultCommand()&&!b){let w=h(this,ot,"f").runCommand(null,this,l,0,o,d||m||o);return this[ni](w,a,!!n,!1)}if(g){h(this,ur,"f")&&mn(!0),e=[].concat(e);let w=e.slice(e.indexOf(`--${h(this,ar,"f").completionKey}`)+1);return h(this,ar,"f").getCompletion(w,(C,D)=>{if(C)throw new $e(C.message);(D||[]).forEach(R=>{h(this,Zi,"f").log(R)}),this.exit(0)}),this[ni](c,!a,!!n,!1)}if(h(this,Jt,"f")||(d?(h(this,ur,"f")&&mn(!0),s=!0,this.showHelp("log"),this.exit(0)):m&&(h(this,ur,"f")&&mn(!0),s=!0,h(this,ge,"f").showVersion("log"),this.exit(0))),!s&&h(this,re,"f").skipValidation.length>0&&(s=Object.keys(c).some(w=>h(this,re,"f").skipValidation.indexOf(w)>=0&&c[w]===!0)),!s){if(l.error)throw new $e(l.error.message);if(!g){let w=this[Pc](p,{},l.error);n||(f=Hn(c,this,h(this,lr,"f").getMiddleware(),!0)),f=this[$h](w,f??c),qe(f)&&!n&&(f=f.then(()=>Hn(c,this,h(this,lr,"f").getMiddleware(),!1)))}}}catch(y){if(y instanceof $e)h(this,ge,"f").fail(y.message,y);else throw y}return this[ni](f??c,a,!!n,!0)}[Pc](e,r,n,i){let o={...this.getDemandedOptions()};return s=>{if(n)throw new $e(n.message);h(this,tt,"f").nonOptionCount(s),h(this,tt,"f").requiredArguments(s,o);let a=!1;h(this,ei,"f")&&(a=h(this,tt,"f").unknownCommands(s)),h(this,Qn,"f")&&!a?h(this,tt,"f").unknownArguments(s,e,r,!!i):h(this,ti,"f")&&h(this,tt,"f").unknownArguments(s,e,{},!1,!1),h(this,tt,"f").limitedChoices(s),h(this,tt,"f").implications(s),h(this,tt,"f").conflicting(s)}}[Jh](){Y(this,Jt,!0,"f")}[ii](e){if(typeof e=="string")h(this,re,"f").key[e]=!0;else for(let r of e)h(this,re,"f").key[r]=!0}};function kh(t){return!!t&&typeof t.getInternalMethods=="function"}var pk=Qh(bc),em=pk;var tm="1.0.1";import{cosmiconfig as _m}from"cosmiconfig";import{TypeScriptLoader as Sm}from"cosmiconfig-typescript-loader";import MT from"node:fs/promises";import Om from"node:path";var Mc=jd(im(),1);function Bc(t,e,r){if(typeof e=="number"&&(r=e),Mc.default.has(t.toLowerCase())){e=Mc.default.get(t.toLowerCase());let n=t.charAt(0);n===n.toUpperCase()&&(e=n+e.slice(1)),t===t.toUpperCase()&&(e=e.toUpperCase())}else typeof e!="string"&&(e=(t.replace(/(?:s|x|z|ch|sh)$/i,"$&e").replace(/([^aeiou])y$/i,"$1ie")+"s").replace(/i?e?s$/i,n=>t.slice(-1)===t.slice(-1).toLowerCase()?n.toLowerCase():n.toUpperCase()));return Math.abs(r)===1?t:e}import{readPackage as BT}from"read-pkg";import{deepMergeDefined as Yc,log as dr,optionsSchema as jT,rulesSchema as UT}from"remark-mdat";var Oe;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{let o={};for(let s of i)o[s]=s;return o},t.getValidEnumValues=i=>{let o=t.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),s={};for(let a of o)s[a]=i[a];return t.objectValues(s)},t.objectValues=i=>t.objectKeys(i).map(function(o){return i[o]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let o=[];for(let s in i)Object.prototype.hasOwnProperty.call(i,s)&&o.push(s);return o},t.find=(i,o)=>{for(let s of i)if(o(s))return s},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,o=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}t.joinValues=n,t.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(Oe||(Oe={}));var Uc;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Uc||(Uc={}));var V=Oe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Xr=t=>{switch(typeof t){case"undefined":return V.undefined;case"string":return V.string;case"number":return isNaN(t)?V.nan:V.number;case"boolean":return V.boolean;case"function":return V.function;case"bigint":return V.bigint;case"symbol":return V.symbol;case"object":return Array.isArray(t)?V.array:t===null?V.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?V.promise:typeof Map<"u"&&t instanceof Map?V.map:typeof Set<"u"&&t instanceof Set?V.set:typeof Date<"u"&&t instanceof Date?V.date:V.object;default:return V.unknown}},N=Oe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),gk=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),er=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(o){return o.message},n={_errors:[]},i=o=>{for(let s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)n._errors.push(r(s));else{let a=n,u=0;for(;u<s.path.length;){let l=s.path[u];u===s.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(r(s))):a[l]=a[l]||{_errors:[]},a=a[l],u++}}};return i(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Oe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};er.create=t=>new er(t);var to=(t,e)=>{let r;switch(t.code){case N.invalid_type:t.received===V.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case N.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Oe.jsonStringifyReplacer)}`;break;case N.unrecognized_keys:r=`Unrecognized key(s) in object: ${Oe.joinValues(t.keys,", ")}`;break;case N.invalid_union:r="Invalid input";break;case N.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Oe.joinValues(t.options)}`;break;case N.invalid_enum_value:r=`Invalid enum value. Expected ${Oe.joinValues(t.options)}, received '${t.received}'`;break;case N.invalid_arguments:r="Invalid function arguments";break;case N.invalid_return_type:r="Invalid function return type";break;case N.invalid_date:r="Invalid date";break;case N.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Oe.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case N.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case N.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case N.custom:r="Invalid input";break;case N.invalid_intersection_types:r="Intersection results could not be merged";break;case N.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case N.not_finite:r="Number must be finite";break;default:r=e.defaultError,Oe.assertNever(t)}return{message:r}},um=to;function xk(t){um=t}function Da(){return um}var Ra=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,o=[...r,...i.path||[]],s={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let a="",u=n.filter(l=>!!l).slice().reverse();for(let l of u)a=l(s,{data:e,defaultError:a}).message;return{...i,path:o,message:a}},yk=[];function U(t,e){let r=Da(),n=Ra({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===to?void 0:to].filter(i=>!!i)});t.common.issues.push(n)}var vt=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let i of r){if(i.status==="aborted")return pe;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let i of r){let o=await i.key,s=await i.value;n.push({key:o,value:s})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:o,value:s}=i;if(o.status==="aborted"||s.status==="aborted")return pe;o.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||i.alwaysSet)&&(n[o.value]=s.value)}return{status:e.value,value:n}}},pe=Object.freeze({status:"aborted"}),eo=t=>({status:"dirty",value:t}),Pt=t=>({status:"valid",value:t}),zc=t=>t.status==="aborted",$c=t=>t.status==="dirty",oi=t=>t.status==="valid",gs=t=>typeof Promise<"u"&&t instanceof Promise;function Fa(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function lm(t,e,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 e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r}var Q;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Q||(Q={}));var hs,ms,pr=class{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},om=(t,e)=>{if(oi(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new er(t.common.issues);return this._error=r,this._error}}};function Ae(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(s,a)=>{var u,l;let{message:c}=t;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:(u=c??n)!==null&&u!==void 0?u:a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:(l=c??r)!==null&&l!==void 0?l:a.defaultError}},description:i}}var Ce=class{get description(){return this._def.description}_getType(e){return Xr(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Xr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new vt,ctx:{common:e.parent.common,data:e.data,parsedType:Xr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(gs(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;let i={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xr(e)},o=this._parseSync({data:e,path:i.path,parent:i});return om(i,o)}"~validate"(e){var r,n;let i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xr(e)};if(!this["~standard"].async)try{let o=this._parseSync({data:e,path:[],parent:i});return oi(o)?{value:o.value}:{issues:i.common.issues}}catch(o){!((n=(r=o?.message)===null||r===void 0?void 0:r.toLowerCase())===null||n===void 0)&&n.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:i}).then(o=>oi(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xr(e)},i=this._parse({data:e,path:n.path,parent:n}),o=await(gs(i)?i:Promise.resolve(i));return om(n,o)}refine(e,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,o)=>{let s=e(i),a=()=>o.addIssue({code:N.custom,...n(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(u=>u?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new tr({schema:this,typeName:le.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return fr.create(this,this._def)}nullable(){return Ir.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Qr.create(this)}promise(){return An.create(this,this._def)}or(e){return pi.create([this,e],this._def)}and(e){return di.create(this,e,this._def)}transform(e){return new tr({...Ae(this._def),schema:this,typeName:le.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new yi({...Ae(this._def),innerType:this,defaultValue:r,typeName:le.ZodDefault})}brand(){return new xs({typeName:le.ZodBranded,type:this,...Ae(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new bi({...Ae(this._def),innerType:this,catchValue:r,typeName:le.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return ys.create(this,e)}readonly(){return Ei.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},bk=/^c[^\s-]{8,}$/i,Ek=/^[0-9a-z]+$/,Ak=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ck=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,wk=/^[a-z0-9_-]{21}$/i,kk=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Tk=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,_k=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Sk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",jc,vk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ik=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Ok=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Dk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Rk=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Fk=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,cm="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Nk=new RegExp(`^${cm}$`);function fm(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Pk(t){return new RegExp(`^${fm(t)}$`)}function pm(t){let e=`${cm}T${fm(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function Lk(t,e){return!!((e==="v4"||!e)&&vk.test(t)||(e==="v6"||!e)&&Ok.test(t))}function Mk(t,e){if(!kk.test(t))return!1;try{let[r]=t.split("."),n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));return!(typeof i!="object"||i===null||!i.typ||!i.alg||e&&i.alg!==e)}catch{return!1}}function Bk(t,e){return!!((e==="v4"||!e)&&Ik.test(t)||(e==="v6"||!e)&&Dk.test(t))}var bn=class t extends Ce{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==V.string){let o=this._getOrReturnCtx(e);return U(o,{code:N.invalid_type,expected:V.string,received:o.parsedType}),pe}let n=new vt,i;for(let o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(i=this._getOrReturnCtx(e,i),U(i,{code:N.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")e.data.length>o.value&&(i=this._getOrReturnCtx(e,i),U(i,{code:N.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let s=e.data.length>o.value,a=e.data.length<o.value;(s||a)&&(i=this._getOrReturnCtx(e,i),s?U(i,{code:N.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&U(i,{code:N.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")_k.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"email",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")jc||(jc=new RegExp(Sk,"u")),jc.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"emoji",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")Ck.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"uuid",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")wk.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"nanoid",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")bk.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"cuid",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")Ek.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"cuid2",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")Ak.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"ulid",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),U(i,{validation:"url",code:N.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"regex",code:N.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(e,i),U(i,{code:N.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(i=this._getOrReturnCtx(e,i),U(i,{code:N.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(i=this._getOrReturnCtx(e,i),U(i,{code:N.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?pm(o).test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{code:N.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?Nk.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{code:N.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?Pk(o).test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{code:N.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?Tk.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"duration",code:N.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?Lk(e.data,o.version)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"ip",code:N.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?Mk(e.data,o.alg)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"jwt",code:N.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?Bk(e.data,o.version)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"cidr",code:N.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?Rk.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"base64",code:N.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?Fk.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"base64url",code:N.invalid_string,message:o.message}),n.dirty()):Oe.assertNever(o);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:N.invalid_string,...Q.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Q.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Q.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Q.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Q.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Q.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Q.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Q.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Q.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Q.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Q.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Q.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Q.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Q.errToObj(e)})}datetime(e){var r,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(r=e?.offset)!==null&&r!==void 0?r:!1,local:(n=e?.local)!==null&&n!==void 0?n:!1,...Q.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...Q.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Q.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...Q.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...Q.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...Q.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...Q.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...Q.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...Q.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...Q.errToObj(r)})}nonempty(e){return this.min(1,Q.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};bn.create=t=>{var e;return new bn({checks:[],typeName:le.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...Ae(t)})};function jk(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,o=parseInt(t.toFixed(i).replace(".","")),s=parseInt(e.toFixed(i).replace(".",""));return o%s/Math.pow(10,i)}var si=class t extends Ce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==V.number){let o=this._getOrReturnCtx(e);return U(o,{code:N.invalid_type,expected:V.number,received:o.parsedType}),pe}let n,i=new vt;for(let o of this._def.checks)o.kind==="int"?Oe.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{code:N.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?jk(e.data,o.value)!==0&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{code:N.not_finite,message:o.message}),i.dirty()):Oe.assertNever(o);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,Q.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Q.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Q.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Q.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:Q.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Q.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Q.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Q.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Q.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Q.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Q.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:Q.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Q.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Q.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Oe.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};si.create=t=>new si({checks:[],typeName:le.ZodNumber,coerce:t?.coerce||!1,...Ae(t)});var ai=class t extends Ce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==V.bigint)return this._getInvalidInput(e);let n,i=new vt;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):Oe.assertNever(o);return{status:i.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return U(r,{code:N.invalid_type,expected:V.bigint,received:r.parsedType}),pe}gte(e,r){return this.setLimit("min",e,!0,Q.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Q.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Q.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Q.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:Q.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Q.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Q.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Q.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Q.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Q.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};ai.create=t=>{var e;return new ai({checks:[],typeName:le.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...Ae(t)})};var ui=class extends Ce{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==V.boolean){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:V.boolean,received:n.parsedType}),pe}return Pt(e.data)}};ui.create=t=>new ui({typeName:le.ZodBoolean,coerce:t?.coerce||!1,...Ae(t)});var li=class t extends Ce{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==V.date){let o=this._getOrReturnCtx(e);return U(o,{code:N.invalid_type,expected:V.date,received:o.parsedType}),pe}if(isNaN(e.data.getTime())){let o=this._getOrReturnCtx(e);return U(o,{code:N.invalid_date}),pe}let n=new vt,i;for(let o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(i=this._getOrReturnCtx(e,i),U(i,{code:N.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(i=this._getOrReturnCtx(e,i),U(i,{code:N.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):Oe.assertNever(o);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:Q.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:Q.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};li.create=t=>new li({checks:[],coerce:t?.coerce||!1,typeName:le.ZodDate,...Ae(t)});var ro=class extends Ce{_parse(e){if(this._getType(e)!==V.symbol){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:V.symbol,received:n.parsedType}),pe}return Pt(e.data)}};ro.create=t=>new ro({typeName:le.ZodSymbol,...Ae(t)});var ci=class extends Ce{_parse(e){if(this._getType(e)!==V.undefined){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:V.undefined,received:n.parsedType}),pe}return Pt(e.data)}};ci.create=t=>new ci({typeName:le.ZodUndefined,...Ae(t)});var fi=class extends Ce{_parse(e){if(this._getType(e)!==V.null){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:V.null,received:n.parsedType}),pe}return Pt(e.data)}};fi.create=t=>new fi({typeName:le.ZodNull,...Ae(t)});var En=class extends Ce{constructor(){super(...arguments),this._any=!0}_parse(e){return Pt(e.data)}};En.create=t=>new En({typeName:le.ZodAny,...Ae(t)});var Jr=class extends Ce{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Pt(e.data)}};Jr.create=t=>new Jr({typeName:le.ZodUnknown,...Ae(t)});var Er=class extends Ce{_parse(e){let r=this._getOrReturnCtx(e);return U(r,{code:N.invalid_type,expected:V.never,received:r.parsedType}),pe}};Er.create=t=>new Er({typeName:le.ZodNever,...Ae(t)});var no=class extends Ce{_parse(e){if(this._getType(e)!==V.undefined){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:V.void,received:n.parsedType}),pe}return Pt(e.data)}};no.create=t=>new no({typeName:le.ZodVoid,...Ae(t)});var Qr=class t extends Ce{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==V.array)return U(r,{code:N.invalid_type,expected:V.array,received:r.parsedType}),pe;if(i.exactLength!==null){let s=r.data.length>i.exactLength.value,a=r.data.length<i.exactLength.value;(s||a)&&(U(r,{code:s?N.too_big:N.too_small,minimum:a?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(U(r,{code:N.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(U(r,{code:N.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>i.type._parseAsync(new pr(r,s,r.path,a)))).then(s=>vt.mergeArray(n,s));let o=[...r.data].map((s,a)=>i.type._parseSync(new pr(r,s,r.path,a)));return vt.mergeArray(n,o)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:Q.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:Q.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:Q.toString(r)}})}nonempty(e){return this.min(1,e)}};Qr.create=(t,e)=>new Qr({type:t,minLength:null,maxLength:null,exactLength:null,typeName:le.ZodArray,...Ae(e)});function Qi(t){if(t instanceof Vt){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=fr.create(Qi(n))}return new Vt({...t._def,shape:()=>e})}else return t instanceof Qr?new Qr({...t._def,type:Qi(t.element)}):t instanceof fr?fr.create(Qi(t.unwrap())):t instanceof Ir?Ir.create(Qi(t.unwrap())):t instanceof vr?vr.create(t.items.map(e=>Qi(e))):t}var Vt=class t extends Ce{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=Oe.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==V.object){let l=this._getOrReturnCtx(e);return U(l,{code:N.invalid_type,expected:V.object,received:l.parsedType}),pe}let{status:n,ctx:i}=this._processInputParams(e),{shape:o,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Er&&this._def.unknownKeys==="strip"))for(let l in i.data)s.includes(l)||a.push(l);let u=[];for(let l of s){let c=o[l],f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new pr(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Er){let l=this._def.unknownKeys;if(l==="passthrough")for(let c of a)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")a.length>0&&(U(i,{code:N.unrecognized_keys,keys:a}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let l=this._def.catchall;for(let c of a){let f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new pr(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let l=[];for(let c of u){let f=await c.key,p=await c.value;l.push({key:f,value:p,alwaysSet:c.alwaysSet})}return l}).then(l=>vt.mergeObjectSync(n,l)):vt.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return Q.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,o,s,a;let u=(s=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,r,n).message)!==null&&s!==void 0?s:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=Q.errToObj(e).message)!==null&&a!==void 0?a:u}:{message:u}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:le.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return Oe.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}omit(e){let r={};return Oe.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}deepPartial(){return Qi(this)}partial(e){let r={};return Oe.objectKeys(this.shape).forEach(n=>{let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}),new t({...this._def,shape:()=>r})}required(e){let r={};return Oe.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof fr;)o=o._def.innerType;r[n]=o}}),new t({...this._def,shape:()=>r})}keyof(){return dm(Oe.objectKeys(this.shape))}};Vt.create=(t,e)=>new Vt({shape:()=>t,unknownKeys:"strip",catchall:Er.create(),typeName:le.ZodObject,...Ae(e)});Vt.strictCreate=(t,e)=>new Vt({shape:()=>t,unknownKeys:"strict",catchall:Er.create(),typeName:le.ZodObject,...Ae(e)});Vt.lazycreate=(t,e)=>new Vt({shape:t,unknownKeys:"strip",catchall:Er.create(),typeName:le.ZodObject,...Ae(e)});var pi=class extends Ce{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(o){for(let a of o)if(a.result.status==="valid")return a.result;for(let a of o)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=o.map(a=>new er(a.ctx.common.issues));return U(r,{code:N.invalid_union,unionErrors:s}),pe}if(r.common.async)return Promise.all(n.map(async o=>{let s={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(i);{let o,s=[];for(let u of n){let l={...r,common:{...r.common,issues:[]},parent:null},c=u._parseSync({data:r.data,path:r.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!o&&(o={result:c,ctx:l}),l.common.issues.length&&s.push(l.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let a=s.map(u=>new er(u));return U(r,{code:N.invalid_union,unionErrors:a}),pe}}get options(){return this._def.options}};pi.create=(t,e)=>new pi({options:t,typeName:le.ZodUnion,...Ae(e)});var Zr=t=>t instanceof hi?Zr(t.schema):t instanceof tr?Zr(t.innerType()):t instanceof mi?[t.value]:t instanceof gi?t.options:t instanceof xi?Oe.objectValues(t.enum):t instanceof yi?Zr(t._def.innerType):t instanceof ci?[void 0]:t instanceof fi?[null]:t instanceof fr?[void 0,...Zr(t.unwrap())]:t instanceof Ir?[null,...Zr(t.unwrap())]:t instanceof xs||t instanceof Ei?Zr(t.unwrap()):t instanceof bi?Zr(t._def.innerType):[],Na=class t extends Ce{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==V.object)return U(r,{code:N.invalid_type,expected:V.object,received:r.parsedType}),pe;let n=this.discriminator,i=r.data[n],o=this.optionsMap.get(i);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(U(r,{code:N.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),pe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let i=new Map;for(let o of r){let s=Zr(o.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of s){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,o)}}return new t({typeName:le.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...Ae(n)})}};function qc(t,e){let r=Xr(t),n=Xr(e);if(t===e)return{valid:!0,data:t};if(r===V.object&&n===V.object){let i=Oe.objectKeys(e),o=Oe.objectKeys(t).filter(a=>i.indexOf(a)!==-1),s={...t,...e};for(let a of o){let u=qc(t[a],e[a]);if(!u.valid)return{valid:!1};s[a]=u.data}return{valid:!0,data:s}}else if(r===V.array&&n===V.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let o=0;o<t.length;o++){let s=t[o],a=e[o],u=qc(s,a);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return r===V.date&&n===V.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var di=class extends Ce{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(o,s)=>{if(zc(o)||zc(s))return pe;let a=qc(o.value,s.value);return a.valid?(($c(o)||$c(s))&&r.dirty(),{status:r.value,value:a.data}):(U(n,{code:N.invalid_intersection_types}),pe)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,s])=>i(o,s)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};di.create=(t,e,r)=>new di({left:t,right:e,typeName:le.ZodIntersection,...Ae(r)});var vr=class t extends Ce{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.array)return U(n,{code:N.invalid_type,expected:V.array,received:n.parsedType}),pe;if(n.data.length<this._def.items.length)return U(n,{code:N.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),pe;!this._def.rest&&n.data.length>this._def.items.length&&(U(n,{code:N.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...n.data].map((s,a)=>{let u=this._def.items[a]||this._def.rest;return u?u._parse(new pr(n,s,n.path,a)):null}).filter(s=>!!s);return n.common.async?Promise.all(o).then(s=>vt.mergeArray(r,s)):vt.mergeArray(r,o)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};vr.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new vr({items:t,typeName:le.ZodTuple,rest:null,...Ae(e)})};var Pa=class t extends Ce{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.object)return U(n,{code:N.invalid_type,expected:V.object,received:n.parsedType}),pe;let i=[],o=this._def.keyType,s=this._def.valueType;for(let a in n.data)i.push({key:o._parse(new pr(n,a,n.path,a)),value:s._parse(new pr(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?vt.mergeObjectAsync(r,i):vt.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof Ce?new t({keyType:e,valueType:r,typeName:le.ZodRecord,...Ae(n)}):new t({keyType:bn.create(),valueType:e,typeName:le.ZodRecord,...Ae(r)})}},io=class extends Ce{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.map)return U(n,{code:N.invalid_type,expected:V.map,received:n.parsedType}),pe;let i=this._def.keyType,o=this._def.valueType,s=[...n.data.entries()].map(([a,u],l)=>({key:i._parse(new pr(n,a,n.path,[l,"key"])),value:o._parse(new pr(n,u,n.path,[l,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let u of s){let l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return pe;(l.status==="dirty"||c.status==="dirty")&&r.dirty(),a.set(l.value,c.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let u of s){let l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return pe;(l.status==="dirty"||c.status==="dirty")&&r.dirty(),a.set(l.value,c.value)}return{status:r.value,value:a}}}};io.create=(t,e,r)=>new io({valueType:e,keyType:t,typeName:le.ZodMap,...Ae(r)});var oo=class t extends Ce{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.set)return U(n,{code:N.invalid_type,expected:V.set,received:n.parsedType}),pe;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(U(n,{code:N.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(U(n,{code:N.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let o=this._def.valueType;function s(u){let l=new Set;for(let c of u){if(c.status==="aborted")return pe;c.status==="dirty"&&r.dirty(),l.add(c.value)}return{status:r.value,value:l}}let a=[...n.data.values()].map((u,l)=>o._parse(new pr(n,u,n.path,l)));return n.common.async?Promise.all(a).then(u=>s(u)):s(a)}min(e,r){return new t({...this._def,minSize:{value:e,message:Q.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:Q.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};oo.create=(t,e)=>new oo({valueType:t,minSize:null,maxSize:null,typeName:le.ZodSet,...Ae(e)});var La=class t extends Ce{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==V.function)return U(r,{code:N.invalid_type,expected:V.function,received:r.parsedType}),pe;function n(a,u){return Ra({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Da(),to].filter(l=>!!l),issueData:{code:N.invalid_arguments,argumentsError:u}})}function i(a,u){return Ra({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Da(),to].filter(l=>!!l),issueData:{code:N.invalid_return_type,returnTypeError:u}})}let o={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof An){let a=this;return Pt(async function(...u){let l=new er([]),c=await a._def.args.parseAsync(u,o).catch(d=>{throw l.addIssue(n(u,d)),l}),f=await Reflect.apply(s,this,c);return await a._def.returns._def.type.parseAsync(f,o).catch(d=>{throw l.addIssue(i(f,d)),l})})}else{let a=this;return Pt(function(...u){let l=a._def.args.safeParse(u,o);if(!l.success)throw new er([n(u,l.error)]);let c=Reflect.apply(s,this,l.data),f=a._def.returns.safeParse(c,o);if(!f.success)throw new er([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:vr.create(e).rest(Jr.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||vr.create([]).rest(Jr.create()),returns:r||Jr.create(),typeName:le.ZodFunction,...Ae(n)})}},hi=class extends Ce{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};hi.create=(t,e)=>new hi({getter:t,typeName:le.ZodLazy,...Ae(e)});var mi=class extends Ce{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return U(r,{received:r.data,code:N.invalid_literal,expected:this._def.value}),pe}return{status:"valid",value:e.data}}get value(){return this._def.value}};mi.create=(t,e)=>new mi({value:t,typeName:le.ZodLiteral,...Ae(e)});function dm(t,e){return new gi({values:t,typeName:le.ZodEnum,...Ae(e)})}var gi=class t extends Ce{constructor(){super(...arguments),hs.set(this,void 0)}_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return U(r,{expected:Oe.joinValues(n),received:r.parsedType,code:N.invalid_type}),pe}if(Fa(this,hs,"f")||lm(this,hs,new Set(this._def.values),"f"),!Fa(this,hs,"f").has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return U(r,{received:r.data,code:N.invalid_enum_value,options:n}),pe}return Pt(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};hs=new WeakMap;gi.create=dm;var xi=class extends Ce{constructor(){super(...arguments),ms.set(this,void 0)}_parse(e){let r=Oe.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==V.string&&n.parsedType!==V.number){let i=Oe.objectValues(r);return U(n,{expected:Oe.joinValues(i),received:n.parsedType,code:N.invalid_type}),pe}if(Fa(this,ms,"f")||lm(this,ms,new Set(Oe.getValidEnumValues(this._def.values)),"f"),!Fa(this,ms,"f").has(e.data)){let i=Oe.objectValues(r);return U(n,{received:n.data,code:N.invalid_enum_value,options:i}),pe}return Pt(e.data)}get enum(){return this._def.values}};ms=new WeakMap;xi.create=(t,e)=>new xi({values:t,typeName:le.ZodNativeEnum,...Ae(e)});var An=class extends Ce{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==V.promise&&r.common.async===!1)return U(r,{code:N.invalid_type,expected:V.promise,received:r.parsedType}),pe;let n=r.parsedType===V.promise?r.data:Promise.resolve(r.data);return Pt(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};An.create=(t,e)=>new An({type:t,typeName:le.ZodPromise,...Ae(e)});var tr=class extends Ce{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===le.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,o={addIssue:s=>{U(n,s),s.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){let s=i.transform(n.data,o);if(n.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return pe;let u=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return u.status==="aborted"?pe:u.status==="dirty"||r.value==="dirty"?eo(u.value):u});{if(r.value==="aborted")return pe;let a=this._def.schema._parseSync({data:s,path:n.path,parent:n});return a.status==="aborted"?pe:a.status==="dirty"||r.value==="dirty"?eo(a.value):a}}if(i.type==="refinement"){let s=a=>{let u=i.refinement(a,o);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?pe:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?pe:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(i.type==="transform")if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!oi(s))return s;let a=i.transform(s.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>oi(s)?Promise.resolve(i.transform(s.value,o)).then(a=>({status:r.value,value:a})):s);Oe.assertNever(i)}};tr.create=(t,e,r)=>new tr({schema:t,typeName:le.ZodEffects,effect:e,...Ae(r)});tr.createWithPreprocess=(t,e,r)=>new tr({schema:e,effect:{type:"preprocess",transform:t},typeName:le.ZodEffects,...Ae(r)});var fr=class extends Ce{_parse(e){return this._getType(e)===V.undefined?Pt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};fr.create=(t,e)=>new fr({innerType:t,typeName:le.ZodOptional,...Ae(e)});var Ir=class extends Ce{_parse(e){return this._getType(e)===V.null?Pt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Ir.create=(t,e)=>new Ir({innerType:t,typeName:le.ZodNullable,...Ae(e)});var yi=class extends Ce{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===V.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};yi.create=(t,e)=>new yi({innerType:t,typeName:le.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ae(e)});var bi=class extends Ce{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return gs(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new er(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new er(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};bi.create=(t,e)=>new bi({innerType:t,typeName:le.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ae(e)});var so=class extends Ce{_parse(e){if(this._getType(e)!==V.nan){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:V.nan,received:n.parsedType}),pe}return{status:"valid",value:e.data}}};so.create=t=>new so({typeName:le.ZodNaN,...Ae(t)});var Uk=Symbol("zod_brand"),xs=class extends Ce{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},ys=class t extends Ce{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?pe:o.status==="dirty"?(r.dirty(),eo(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?pe:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:le.ZodPipeline})}},Ei=class extends Ce{_parse(e){let r=this._def.innerType._parse(e),n=i=>(oi(i)&&(i.value=Object.freeze(i.value)),i);return gs(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};Ei.create=(t,e)=>new Ei({innerType:t,typeName:le.ZodReadonly,...Ae(e)});function sm(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function hm(t,e={},r){return t?En.create().superRefine((n,i)=>{var o,s;let a=t(n);if(a instanceof Promise)return a.then(u=>{var l,c;if(!u){let f=sm(e,n),p=(c=(l=f.fatal)!==null&&l!==void 0?l:r)!==null&&c!==void 0?c:!0;i.addIssue({code:"custom",...f,fatal:p})}});if(!a){let u=sm(e,n),l=(s=(o=u.fatal)!==null&&o!==void 0?o:r)!==null&&s!==void 0?s:!0;i.addIssue({code:"custom",...u,fatal:l})}}):En.create()}var zk={object:Vt.lazycreate},le;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(le||(le={}));var $k=(t,e={message:`Input not instance of ${t.name}`})=>hm(r=>r instanceof t,e),mm=bn.create,gm=si.create,qk=so.create,Vk=ai.create,xm=ui.create,Gk=li.create,Wk=ro.create,Hk=ci.create,Kk=fi.create,Yk=En.create,Zk=Jr.create,Xk=Er.create,Jk=no.create,Qk=Qr.create,eT=Vt.create,tT=Vt.strictCreate,rT=pi.create,nT=Na.create,iT=di.create,oT=vr.create,sT=Pa.create,aT=io.create,uT=oo.create,lT=La.create,cT=hi.create,fT=mi.create,pT=gi.create,dT=xi.create,hT=An.create,am=tr.create,mT=fr.create,gT=Ir.create,xT=tr.createWithPreprocess,yT=ys.create,bT=()=>mm().optional(),ET=()=>gm().optional(),AT=()=>xm().optional(),CT={string:t=>bn.create({...t,coerce:!0}),number:t=>si.create({...t,coerce:!0}),boolean:t=>ui.create({...t,coerce:!0}),bigint:t=>ai.create({...t,coerce:!0}),date:t=>li.create({...t,coerce:!0})},wT=pe,X=Object.freeze({__proto__:null,defaultErrorMap:to,setErrorMap:xk,getErrorMap:Da,makeIssue:Ra,EMPTY_PATH:yk,addIssueToContext:U,ParseStatus:vt,INVALID:pe,DIRTY:eo,OK:Pt,isAborted:zc,isDirty:$c,isValid:oi,isAsync:gs,get util(){return Oe},get objectUtil(){return Uc},ZodParsedType:V,getParsedType:Xr,ZodType:Ce,datetimeRegex:pm,ZodString:bn,ZodNumber:si,ZodBigInt:ai,ZodBoolean:ui,ZodDate:li,ZodSymbol:ro,ZodUndefined:ci,ZodNull:fi,ZodAny:En,ZodUnknown:Jr,ZodNever:Er,ZodVoid:no,ZodArray:Qr,ZodObject:Vt,ZodUnion:pi,ZodDiscriminatedUnion:Na,ZodIntersection:di,ZodTuple:vr,ZodRecord:Pa,ZodMap:io,ZodSet:oo,ZodFunction:La,ZodLazy:hi,ZodLiteral:mi,ZodEnum:gi,ZodNativeEnum:xi,ZodPromise:An,ZodEffects:tr,ZodTransformer:tr,ZodOptional:fr,ZodNullable:Ir,ZodDefault:yi,ZodCatch:bi,ZodNaN:so,BRAND:Uk,ZodBranded:xs,ZodPipeline:ys,ZodReadonly:Ei,custom:hm,Schema:Ce,ZodSchema:Ce,late:zk,get ZodFirstPartyTypeKind(){return le},coerce:CT,any:Yk,array:Qk,bigint:Vk,boolean:xm,date:Gk,discriminatedUnion:nT,effect:am,enum:pT,function:lT,instanceof:$k,intersection:iT,lazy:cT,literal:fT,map:aT,nan:qk,nativeEnum:dT,never:Xk,null:Kk,nullable:gT,number:gm,object:eT,oboolean:AT,onumber:ET,optional:mT,ostring:bT,pipeline:yT,preprocess:xT,promise:hT,record:sT,set:uT,strictObject:tT,string:mm,symbol:Wk,transformer:am,tuple:oT,undefined:Hk,union:rT,unknown:Zk,void:Jk,NEVER:wT,ZodIssueCode:N,quotelessJson:gk,ZodError:er});import{defaultLoaders as kT}from"cosmiconfig";function Vc(t,e){let r=kT[".json"],n=r(t,e);return ym(n)}function ym(t,e="",r={}){for(let[n,i]of Object.entries(t)){let o=e?`${e}.${n}`:n;typeof i=="object"&&i!==null&&!Array.isArray(i)?ym(i,o,r):i===null?r[o]="null":r[o]=i.toString()}return r}import FT from"node:fs";import en from"node:path";import IT from"node:process";import TT from"node:process";import _T from"node:fs/promises";import{fileURLToPath as ST}from"node:url";import ao from"node:path";var bm=t=>t instanceof URL?ST(t):t;async function Ma(t,{cwd:e=TT.cwd(),type:r="file",stopAt:n}={}){let i=ao.resolve(bm(e)??""),{root:o}=ao.parse(i);n=ao.resolve(i,bm(n??o));let s=ao.isAbsolute(t);for(;i;){let a=s?t:ao.join(i,t);try{let u=await _T.stat(a);if(r==="file"&&u.isFile()||r==="directory"&&u.isDirectory())return a}catch{}if(i===n||i===o)break;i=ao.dirname(i)}}async function Em({cwd:t=IT.cwd()}={}){return Ma("package.json",{cwd:t})}import OT from"node:fs";import DT from"node:fs/promises";async function Gc(t,e,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await DT[t](r))[e]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}function Wc(t,e,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return OT[t](r)[e]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}var uo=Gc.bind(void 0,"stat","isFile"),s2=Gc.bind(void 0,"stat","isDirectory"),a2=Gc.bind(void 0,"lstat","isSymbolicLink"),Hc=Wc.bind(void 0,"statSync","isFile"),u2=Wc.bind(void 0,"statSync","isDirectory"),l2=Wc.bind(void 0,"lstatSync","isSymbolicLink");import{log as Cm}from"remark-mdat";import{Configuration as NT}from"unified-engine";import RT from"node:os";var Am=RT.homedir();function Kc(t){if(typeof t!="string")throw new TypeError(`Expected a string, got ${typeof t}`);return Am?t.replace(/^~(?=$|\/|\\)/,Am):t}function PT(t,e){let r=e===0?1:Math.floor(Math.log10(Math.abs(e))+1);return t.toString().padStart(r,"0")}function km(t,e,r,n){let i=[];for(let[o,s]of t.entries()){let a=r&&t.length>1?`-${PT(o+1,t.length+1)}`:"",u=LT(s,e,r,n,a);i.push(u)}return i}function LT(t,e,r,n,i=""){let o=wm(t),s=e?wm(e):void 0;if(!Hc(o))throw new Error(`Input file not found: "${o}"`);if(s){if(Hc(s))throw new Error(`Output path must be a directory, received a file path: "${s}"`);FT.mkdirSync(s,{recursive:!0})}let a=r?en.basename(r,en.extname(r)):en.basename(o,en.extname(o)),u=`.${n??(r&&en.extname(r)!==""?en.extname(r):en.extname(t)===""?"":en.extname(t))}`,l=`${a}${i}${u}`,c=s??en.dirname(o);return{input:o,name:l,output:c}}function wm(t){return Kc(t)}async function Ba(){return Em()}function ja(t){return t==null?[]:Array.isArray(t)?t:[t]}async function Tm(){let t=new NT({cwd:process.cwd(),detectConfig:!0,packageField:"remarkConfig",rcName:".remarkrc"}),e=await new Promise(r=>{t.load("",(n,i)=>{if(n){console.error(n),r();return}r(i)})});if(e){let{filePath:r}=e;return r===void 0?Cm.info('No ambient Remark configuration file found"'):Cm.info(`Found and loaded ambient Remark configuration from "${r}"`),e}throw new Error("Failed to load ambient remark configuration")}var vm=jT.merge(X.object({assetsPath:X.string().optional(),packageFile:X.string().optional()})).describe("Config Extension");async function Ai(t){let{additionalConfig:e,additionalRules:r,searchFrom:n}=t??{},i={addMetaComment:!1,assetsPath:"./assets",closingPrefix:"/",keywordPrefix:"",metaCommentIdentifier:"+",packageFile:await Ba(),rules:{mdat:"Powered by the Markdown Autophagic Template system: [mdat](https://github.com/kitschpatrol/mdat)."}},o=_m("mdat",{loaders:{".ts":Sm()}}),s=await o.search(n);if(s){let{config:a,filepath:u}=s,l=a;if(dr.info(`Using config from "${u}"`),u.endsWith("package.json")&&typeof a=="string"){dr.info(`Detected shared config string: "${a}"`);let{default:f}=await import(a);l=f}let c=Im(l,vm);c&&(i=Yc(i,c))}if(e!==void 0){let a=Array.isArray(e)?e:[e];for(let u of a){let l;if(typeof u=="string"){let f=await o.load(u);if(f==null)continue;let{config:p,filepath:d}=f;dr.info(`Loaded additional config from "${d}"`),l=p}else l=u;if(l===void 0)continue;dr.info("Merging configuration object");let c=Im(l,vm);c!==void 0&&(i=Yc(i,c))}}if(r!==void 0){let a=Array.isArray(r)?r:[r],u=_m("mdat",{loaders:{".json":Vc,".ts":Sm()}});for(let l of a){let c;if(typeof l=="string"){let p;if(Om.basename(l).endsWith("package.json")){let y=await MT.readFile(l,"utf8");p={config:Vc(l,y),filepath:l}}else p=await u.load(l);if(p==null)continue;let{config:d,filepath:m}=p;dr.info(`Loaded additional config from "${m}"`),c=d}else c=l;if(c===void 0)continue;dr.info("Merging rules into configuration object");let f=zT(c,UT);f!==void 0&&(i=Yc(i,f))}}if(i.rules){let a=Object.keys(i.rules).sort().map(u=>`"${St.bold.green(u)}"`);dr.info(`Loaded ${St.bold(a.length)} mdat comment expansion ${Bc("rule",a.length)}:`);for(let u of a)dr.info(` ${u}`)}else dr.error("No rules loaded from additional configurations or rules, using default.");return Ua=i,i}function zT(t,e){if(e.safeParse(t).success)return{rules:t};dr.error(`Rules object has the wrong shape. Ignoring and using default configuration:
|
|
70
70
|
${JSON.stringify(t,void 0,2)}`)}function Im(t,e){if(e.safeParse(t).success)return t;dr.error(`Config object has the wrong shape. Ignoring and using default configuration:
|
|
71
71
|
${JSON.stringify(t,void 0,2)}`)}var Ua;async function Or(){return Ua===void 0&&(dr.warn("getConfig(): config was undefined"),Ua??=await Ai()),Ua}var Zc;async function rr(){let{packageFile:t}=await Or();if(t===void 0)throw new Error("No packageFile found or set in config");if(Zc??=await BT({cwd:Om.dirname(t)}),Zc===void 0)throw new Error("No package.json found");return Zc}var $T={};function tn(t,e){let r=e||$T,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Rm(t,n,i)}function Rm(t,e,r){if(qT(t)){if("value"in t)return t.type==="html"&&!r?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return Dm(t.children,e,r)}return Array.isArray(t)?Dm(t,e,r):""}function Dm(t,e,r){let n=[],i=-1;for(;++i<t.length;)n[i]=Rm(t[i],e,r);return n.join("")}function qT(t){return!!(t&&typeof t=="object")}var Xc={AElig:"\xC6",AMP:"&",Aacute:"\xC1",Abreve:"\u0102",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",Aring:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",Atilde:"\xC3",Auml:"\xC4",Backslash:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",Bcy:"\u0411",Because:"\u2235",Bernoullis:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",Bscr:"\u212C",Bumpeq:"\u224E",CHcy:"\u0427",COPY:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",Cayleys:"\u212D",Ccaron:"\u010C",Ccedil:"\xC7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010A",Cedilla:"\xB8",CenterDot:"\xB7",Cfr:"\u212D",Chi:"\u03A7",CircleDot:"\u2299",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",Colon:"\u2237",Colone:"\u2A74",Congruent:"\u2261",Conint:"\u222F",ContourIntegral:"\u222E",Copf:"\u2102",Coproduct:"\u2210",CounterClockwiseContourIntegral:"\u2233",Cross:"\u2A2F",Cscr:"\u{1D49E}",Cup:"\u22D3",CupCap:"\u224D",DD:"\u2145",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040F",Dagger:"\u2021",Darr:"\u21A1",Dashv:"\u2AE4",Dcaron:"\u010E",Dcy:"\u0414",Del:"\u2207",Delta:"\u0394",Dfr:"\u{1D507}",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",Diamond:"\u22C4",DifferentialD:"\u2146",Dopf:"\u{1D53B}",Dot:"\xA8",DotDot:"\u20DC",DotEqual:"\u2250",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",Downarrow:"\u21D3",Dscr:"\u{1D49F}",Dstrok:"\u0110",ENG:"\u014A",ETH:"\xD0",Eacute:"\xC9",Ecaron:"\u011A",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\u{1D508}",Egrave:"\xC8",Element:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\u{1D53C}",Epsilon:"\u0395",Equal:"\u2A75",EqualTilde:"\u2242",Equilibrium:"\u21CC",Escr:"\u2130",Esim:"\u2A73",Eta:"\u0397",Euml:"\xCB",Exists:"\u2203",ExponentialE:"\u2147",Fcy:"\u0424",Ffr:"\u{1D509}",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",Fopf:"\u{1D53D}",ForAll:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",Gamma:"\u0393",Gammad:"\u03DC",Gbreve:"\u011E",Gcedil:"\u0122",Gcirc:"\u011C",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\u{1D50A}",Gg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",Gt:"\u226B",HARDcy:"\u042A",Hacek:"\u02C7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210C",HilbertSpace:"\u210B",Hopf:"\u210D",HorizontalLine:"\u2500",Hscr:"\u210B",Hstrok:"\u0126",HumpDownHump:"\u224E",HumpEqual:"\u224F",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xCD",Icirc:"\xCE",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Igrave:"\xCC",Im:"\u2111",Imacr:"\u012A",ImaginaryI:"\u2148",Implies:"\u21D2",Int:"\u222C",Integral:"\u222B",Intersection:"\u22C2",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",Iogon:"\u012E",Iopf:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",LJcy:"\u0409",LT:"<",Lacute:"\u0139",Lambda:"\u039B",Lang:"\u27EA",Laplacetrf:"\u2112",Larr:"\u219E",Lcaron:"\u013D",Lcedil:"\u013B",Lcy:"\u041B",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",LeftRightArrow:"\u2194",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",Leftarrow:"\u21D0",Leftrightarrow:"\u21D4",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",LessLess:"\u2AA1",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",Lfr:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",LongLeftRightArrow:"\u27F7",LongRightArrow:"\u27F6",Longleftarrow:"\u27F8",Longleftrightarrow:"\u27FA",Longrightarrow:"\u27F9",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",Lscr:"\u2112",Lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",Mopf:"\u{1D544}",Mscr:"\u2133",Mu:"\u039C",NJcy:"\u040A",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041D",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
|
|
72
72
|
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",UpTee:"\u22A5",UpTeeArrow:"\u21A5",Uparrow:"\u21D1",Updownarrow:"\u21D5",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\u{1D4B0}",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",ZeroWidthSpace:"\u200B",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\u{1D4B5}",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acirc:"\xE2",acute:"\xB4",acy:"\u0430",aelig:"\xE6",af:"\u2061",afr:"\u{1D51E}",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",amp:"&",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",aogon:"\u0105",aopf:"\u{1D552}",ap:"\u2248",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",apid:"\u224B",apos:"'",approx:"\u2248",approxeq:"\u224A",aring:"\xE5",ascr:"\u{1D4B6}",ast:"*",asymp:"\u2248",asympeq:"\u224D",atilde:"\xE3",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",beta:"\u03B2",beth:"\u2136",between:"\u226C",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255D",boxUR:"\u255A",boxUl:"\u255C",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256C",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256B",boxVl:"\u2562",boxVr:"\u255F",boxbox:"\u29C9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250C",boxh:"\u2500",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",bprime:"\u2035",breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",bumpeq:"\u224F",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",ccaps:"\u2A4D",ccaron:"\u010D",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cedil:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",cfr:"\u{1D520}",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledR:"\xAE",circledS:"\u24C8",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",conint:"\u222E",copf:"\u{1D554}",coprod:"\u2210",copy:"\xA9",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dArr:"\u21D3",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",darr:"\u2193",dash:"\u2010",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",dcaron:"\u010F",dcy:"\u0434",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",ddotseq:"\u2A77",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",dharl:"\u21C3",dharr:"\u21C2",diam:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",dot:"\u02D9",doteq:"\u2250",doteqdot:"\u2251",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",downarrow:"\u2193",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eDDot:"\u2A77",eDot:"\u2251",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\u2256",ecirc:"\xEA",ecolon:"\u2255",ecy:"\u044D",edot:"\u0117",ee:"\u2147",efDot:"\u2252",efr:"\u{1D522}",eg:"\u2A9A",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",equals:"=",equest:"\u225F",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",erarr:"\u2971",escr:"\u212F",esdot:"\u2250",esim:"\u2242",eta:"\u03B7",eth:"\xF0",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",expectation:"\u2130",exponentiale:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",gE:"\u2267",gEl:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gammad:"\u03DD",gap:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",ge:"\u2265",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",gjcy:"\u0453",gl:"\u2277",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gopf:"\u{1D558}",grave:"`",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hArr:"\u21D4",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",hardcy:"\u044A",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",hbar:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",hslash:"\u210F",hstrok:"\u0127",hybull:"\u2043",hyphen:"\u2010",iacute:"\xED",ic:"\u2063",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",image:"\u2111",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",int:"\u222B",intcal:"\u22BA",integers:"\u2124",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\u{1D55A}",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",isin:"\u2208",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",iukcy:"\u0456",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",lAarr:"\u21DA",lArr:"\u21D0",lAtail:"\u291B",lBarr:"\u290E",lE:"\u2266",lEg:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",lambda:"\u03BB",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",laquo:"\xAB",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lceil:"\u2308",lcub:"{",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leftarrow:"\u2190",leftarrowtail:"\u21A2",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",leftthreetimes:"\u22CB",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",lessgtr:"\u2276",lesssim:"\u2272",lfisht:"\u297C",lfloor:"\u230A",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",lstrok:"\u0142",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",measuredangle:"\u2221",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",mopf:"\u{1D55E}",mp:"\u2213",mscr:"\u{1D4C2}",mstpos:"\u223E",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nGtv:"\u226B\u0338",nLeftarrow:"\u21CD",nLeftrightarrow:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nLtv:"\u226A\u0338",nRightarrow:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nabla:"\u2207",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",neArr:"\u21D7",nearhk:"\u2924",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",nexist:"\u2204",nexists:"\u2204",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",ngsim:"\u2275",ngt:"\u226F",ngtr:"\u226F",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",nlArr:"\u21CD",nlE:"\u2266\u0338",nlarr:"\u219A",nldr:"\u2025",nle:"\u2270",nleftarrow:"\u219A",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nlsim:"\u2274",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nmid:"\u2224",nopf:"\u{1D55F}",not:"\xAC",notin:"\u2209",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22AD",nvHarr:"\u2904",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwArr:"\u21D6",nwarhk:"\u2923",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",oS:"\u24C8",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",ocirc:"\xF4",ocy:"\u043E",odash:"\u229D",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\u{1D52C}",ogon:"\u02DB",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",oopf:"\u{1D560}",opar:"\u29B7",operp:"\u29B9",oplus:"\u2295",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oscr:"\u2134",oslash:"\xF8",osol:"\u2298",otilde:"\xF5",otimes:"\u2297",otimesas:"\u2A36",ouml:"\xF6",ovbar:"\u233D",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",pfr:"\u{1D52D}",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",pointint:"\u2A15",popf:"\u{1D561}",pound:"\xA3",pr:"\u227A",prE:"\u2AB3",prap:"\u2AB7",prcue:"\u227C",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",primes:"\u2119",prnE:"\u2AB5",prnap:"\u2AB9",prnsim:"\u22E8",prod:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",pscr:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qint:"\u2A0C",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',rAarr:"\u21DB",rArr:"\u21D2",rAtail:"\u291C",rBarr:"\u290F",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rarrw:"\u219D",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rceil:"\u2309",rcub:"}",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",reg:"\xAE",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",rightarrow:"\u2192",rightarrowtail:"\u21A3",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",rightthreetimes:"\u22CC",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",rsaquo:"\u203A",rscr:"\u{1D4C7}",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",sbquo:"\u201A",sc:"\u227B",scE:"\u2AB4",scap:"\u2AB8",scaron:"\u0161",sccue:"\u227D",sce:"\u2AB0",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",scnap:"\u2ABA",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",seArr:"\u21D8",searhk:"\u2925",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shortmid:"\u2223",shortparallel:"\u2225",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",square:"\u25A1",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",subE:"\u2AC5",subdot:"\u2ABD",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",sum:"\u2211",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",sup:"\u2283",supE:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supe:"\u2287",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swarhk:"\u2926",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tbrk:"\u23B4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",tfr:"\u{1D531}",there4:"\u2234",therefore:"\u2234",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223C",thorn:"\xFE",tilde:"\u02DC",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",uArr:"\u21D1",uHar:"\u2963",uacute:"\xFA",uarr:"\u2191",ubrcy:"\u045E",ubreve:"\u016D",ucirc:"\xFB",ucy:"\u0443",udarr:"\u21C5",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",ufr:"\u{1D532}",ugrave:"\xF9",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",uml:"\xA8",uogon:"\u0173",uopf:"\u{1D566}",uparrow:"\u2191",updownarrow:"\u2195",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",upsi:"\u03C5",upsih:"\u03D2",upsilon:"\u03C5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\u{1D4CA}",utdot:"\u22F0",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",uuml:"\xFC",uwangle:"\u29A7",vArr:"\u21D5",vBar:"\u2AE8",vBarv:"\u2AE9",vDash:"\u22A8",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vcy:"\u0432",vdash:"\u22A2",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",vert:"|",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",wfr:"\u{1D534}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",yen:"\xA5",yfr:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeetrf:"\u2128",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"};var VT={}.hasOwnProperty;function lo(t){return VT.call(Xc,t)?Xc[t]:!1}function st(t,e,r,n){let i=t.length,o=0,s;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,r=r>0?r:0,n.length<1e4)s=Array.from(n),s.unshift(e,r),t.splice(...s);else for(r&&t.splice(e,r);o<n.length;)s=n.slice(o,o+1e4),s.unshift(e,0),t.splice(...s),o+=1e4,e+=1e4}function Lt(t,e){return t.length>0?(st(t,t.length,0,e),t):e}var Fm={}.hasOwnProperty;function za(t){let e={},r=-1;for(;++r<t.length;)GT(e,t[r]);return e}function GT(t,e){let r;for(r in e){let i=(Fm.call(t,r)?t[r]:void 0)||(t[r]={}),o=e[r],s;if(o)for(s in o){Fm.call(i,s)||(i[s]=[]);let a=o[s];WT(i[s],Array.isArray(a)?a:a?[a]:[])}}}function WT(t,e){let r=-1,n=[];for(;++r<e.length;)(e[r].add==="after"?t:n).push(e[r]);st(t,0,0,n)}function $a(t,e){let r=Number.parseInt(t,e);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"\uFFFD":String.fromCodePoint(r)}function It(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var xt=Cn(/[A-Za-z]/),yt=Cn(/[\dA-Za-z]/),Nm=Cn(/[#-'*+\--9=?A-Z^-~]/);function Ci(t){return t!==null&&(t<32||t===127)}var bs=Cn(/\d/),Pm=Cn(/[\dA-Fa-f]/),Lm=Cn(/[!-/:-@[-`{-~]/);function z(t){return t!==null&&t<-2}function ke(t){return t!==null&&(t<0||t===32)}function se(t){return t===-2||t===-1||t===32}var wi=Cn(new RegExp("\\p{P}|\\p{S}","u")),Dr=Cn(/\s/);function Cn(t){return e;function e(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}function ie(t,e,r,n){let i=n?n-1:Number.POSITIVE_INFINITY,o=0;return s;function s(u){return se(u)?(t.enter(r),a(u)):e(u)}function a(u){return se(u)&&o++<i?(t.consume(u),a):(t.exit(r),e(u))}}var Mm={tokenize:HT};function HT(t){let e=t.attempt(this.parser.constructs.contentInitial,n,i),r;return e;function n(a){if(a===null){t.consume(a);return}return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),ie(t,e,"linePrefix")}function i(a){return t.enter("paragraph"),o(a)}function o(a){let u=t.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=u),r=u,s(a)}function s(a){if(a===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(a);return}return z(a)?(t.consume(a),t.exit("chunkText"),o):(t.consume(a),s)}}var jm={tokenize:KT},Bm={tokenize:YT};function KT(t){let e=this,r=[],n=0,i,o,s;return a;function a(C){if(n<r.length){let D=r[n];return e.containerState=D[1],t.attempt(D[0].continuation,u,l)(C)}return l(C)}function u(C){if(n++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&w();let D=e.events.length,R=D,S;for(;R--;)if(e.events[R][0]==="exit"&&e.events[R][1].type==="chunkFlow"){S=e.events[R][1].end;break}b(n);let de=D;for(;de<e.events.length;)e.events[de][1].end={...S},de++;return st(e.events,R+1,0,e.events.slice(D)),e.events.length=de,l(C)}return a(C)}function l(C){if(n===r.length){if(!i)return p(C);if(i.currentConstruct&&i.currentConstruct.concrete)return m(C);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(Bm,c,f)(C)}function c(C){return i&&w(),b(n),p(C)}function f(C){return e.parser.lazy[e.now().line]=n!==r.length,s=e.now().offset,m(C)}function p(C){return e.containerState={},t.attempt(Bm,d,m)(C)}function d(C){return n++,r.push([e.currentConstruct,e.containerState]),p(C)}function m(C){if(C===null){i&&w(),b(0),t.consume(C);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),y(C)}function y(C){if(C===null){g(t.exit("chunkFlow"),!0),b(0),t.consume(C);return}return z(C)?(t.consume(C),g(t.exit("chunkFlow")),n=0,e.interrupt=void 0,a):(t.consume(C),y)}function g(C,D){let R=e.sliceStream(C);if(D&&R.push(null),C.previous=o,o&&(o.next=C),o=C,i.defineSkip(C.start),i.write(R),e.parser.lazy[C.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<s&&(!i.events[S][1].end||i.events[S][1].end.offset>s))return;let de=e.events.length,ye=de,be,_;for(;ye--;)if(e.events[ye][0]==="exit"&&e.events[ye][1].type==="chunkFlow"){if(be){_=e.events[ye][1].end;break}be=!0}for(b(n),S=de;S<e.events.length;)e.events[S][1].end={..._},S++;st(e.events,ye+1,0,e.events.slice(de)),e.events.length=S}}function b(C){let D=r.length;for(;D-- >C;){let R=r[D];e.containerState=R[1],R[0].exit.call(e,t)}r.length=C}function w(){i.write([null]),o=void 0,i=void 0,e.containerState._closeFlow=void 0}}function YT(t,e,r){return ie(t,t.attempt(this.parser.constructs.document,e,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function rn(t){if(t===null||ke(t)||Dr(t))return 1;if(wi(t))return 2}function wn(t,e,r){let n=[],i=-1;for(;++i<t.length;){let o=t[i].resolveAll;o&&!n.includes(o)&&(e=o(e,r),n.push(o))}return e}var Es={name:"attention",resolveAll:ZT,tokenize:XT};function ZT(t,e){let r=-1,n,i,o,s,a,u,l,c;for(;++r<t.length;)if(t[r][0]==="enter"&&t[r][1].type==="attentionSequence"&&t[r][1]._close){for(n=r;n--;)if(t[n][0]==="exit"&&t[n][1].type==="attentionSequence"&&t[n][1]._open&&e.sliceSerialize(t[n][1]).charCodeAt(0)===e.sliceSerialize(t[r][1]).charCodeAt(0)){if((t[n][1]._close||t[r][1]._open)&&(t[r][1].end.offset-t[r][1].start.offset)%3&&!((t[n][1].end.offset-t[n][1].start.offset+t[r][1].end.offset-t[r][1].start.offset)%3))continue;u=t[n][1].end.offset-t[n][1].start.offset>1&&t[r][1].end.offset-t[r][1].start.offset>1?2:1;let f={...t[n][1].end},p={...t[r][1].start};Um(f,-u),Um(p,u),s={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...t[n][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...t[r][1].start},end:p},o={type:u>1?"strongText":"emphasisText",start:{...t[n][1].end},end:{...t[r][1].start}},i={type:u>1?"strong":"emphasis",start:{...s.start},end:{...a.end}},t[n][1].end={...s.start},t[r][1].start={...a.end},l=[],t[n][1].end.offset-t[n][1].start.offset&&(l=Lt(l,[["enter",t[n][1],e],["exit",t[n][1],e]])),l=Lt(l,[["enter",i,e],["enter",s,e],["exit",s,e],["enter",o,e]]),l=Lt(l,wn(e.parser.constructs.insideSpan.null,t.slice(n+1,r),e)),l=Lt(l,[["exit",o,e],["enter",a,e],["exit",a,e],["exit",i,e]]),t[r][1].end.offset-t[r][1].start.offset?(c=2,l=Lt(l,[["enter",t[r][1],e],["exit",t[r][1],e]])):c=0,st(t,n-1,r-n+3,l),r=n+l.length-c-2;break}}for(r=-1;++r<t.length;)t[r][1].type==="attentionSequence"&&(t[r][1].type="data");return t}function XT(t,e){let r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=rn(n),o;return s;function s(u){return o=u,t.enter("attentionSequence"),a(u)}function a(u){if(u===o)return t.consume(u),a;let l=t.exit("attentionSequence"),c=rn(u),f=!c||c===2&&i||r.includes(u),p=!i||i===2&&c||r.includes(n);return l._open=!!(o===42?f:f&&(i||!p)),l._close=!!(o===42?p:p&&(c||!f)),e(u)}}function Um(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}var Jc={name:"autolink",tokenize:JT};function JT(t,e,r){let n=0;return i;function i(d){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(d),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o}function o(d){return xt(d)?(t.consume(d),s):d===64?r(d):l(d)}function s(d){return d===43||d===45||d===46||yt(d)?(n=1,a(d)):l(d)}function a(d){return d===58?(t.consume(d),n=0,u):(d===43||d===45||d===46||yt(d))&&n++<32?(t.consume(d),a):(n=0,l(d))}function u(d){return d===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(d),t.exit("autolinkMarker"),t.exit("autolink"),e):d===null||d===32||d===60||Ci(d)?r(d):(t.consume(d),u)}function l(d){return d===64?(t.consume(d),c):Nm(d)?(t.consume(d),l):r(d)}function c(d){return yt(d)?f(d):r(d)}function f(d){return d===46?(t.consume(d),n=0,c):d===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(d),t.exit("autolinkMarker"),t.exit("autolink"),e):p(d)}function p(d){if((d===45||yt(d))&&n++<63){let m=d===45?p:f;return t.consume(d),m}return r(d)}}var Rr={partial:!0,tokenize:QT};function QT(t,e,r){return n;function n(o){return se(o)?ie(t,i,"linePrefix")(o):i(o)}function i(o){return o===null||z(o)?e(o):r(o)}}var qa={continuation:{tokenize:t_},exit:r_,name:"blockQuote",tokenize:e_};function e_(t,e,r){let n=this;return i;function i(s){if(s===62){let a=n.containerState;return a.open||(t.enter("blockQuote",{_container:!0}),a.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(s),t.exit("blockQuoteMarker"),o}return r(s)}function o(s){return se(s)?(t.enter("blockQuotePrefixWhitespace"),t.consume(s),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(s))}}function t_(t,e,r){let n=this;return i;function i(s){return se(s)?ie(t,o,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return t.attempt(qa,e,r)(s)}}function r_(t){t.exit("blockQuote")}var Va={name:"characterEscape",tokenize:n_};function n_(t,e,r){return n;function n(o){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(o),t.exit("escapeMarker"),i}function i(o){return Lm(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):r(o)}}var Ga={name:"characterReference",tokenize:i_};function i_(t,e,r){let n=this,i=0,o,s;return a;function a(f){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),u}function u(f){return f===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(f),t.exit("characterReferenceMarkerNumeric"),l):(t.enter("characterReferenceValue"),o=31,s=yt,c(f))}function l(f){return f===88||f===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(f),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),o=6,s=Pm,c):(t.enter("characterReferenceValue"),o=7,s=bs,c(f))}function c(f){if(f===59&&i){let p=t.exit("characterReferenceValue");return s===yt&&!lo(n.sliceSerialize(p))?r(f):(t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return s(f)&&i++<o?(t.consume(f),c):r(f)}}var zm={partial:!0,tokenize:s_},Wa={concrete:!0,name:"codeFenced",tokenize:o_};function o_(t,e,r){let n=this,i={partial:!0,tokenize:R},o=0,s=0,a;return u;function u(S){return l(S)}function l(S){let de=n.events[n.events.length-1];return o=de&&de[1].type==="linePrefix"?de[2].sliceSerialize(de[1],!0).length:0,a=S,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),c(S)}function c(S){return S===a?(s++,t.consume(S),c):s<3?r(S):(t.exit("codeFencedFenceSequence"),se(S)?ie(t,f,"whitespace")(S):f(S))}function f(S){return S===null||z(S)?(t.exit("codeFencedFence"),n.interrupt?e(S):t.check(zm,y,D)(S)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),p(S))}function p(S){return S===null||z(S)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),f(S)):se(S)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),ie(t,d,"whitespace")(S)):S===96&&S===a?r(S):(t.consume(S),p)}function d(S){return S===null||z(S)?f(S):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),m(S))}function m(S){return S===null||z(S)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),f(S)):S===96&&S===a?r(S):(t.consume(S),m)}function y(S){return t.attempt(i,D,g)(S)}function g(S){return t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),b}function b(S){return o>0&&se(S)?ie(t,w,"linePrefix",o+1)(S):w(S)}function w(S){return S===null||z(S)?t.check(zm,y,D)(S):(t.enter("codeFlowValue"),C(S))}function C(S){return S===null||z(S)?(t.exit("codeFlowValue"),w(S)):(t.consume(S),C)}function D(S){return t.exit("codeFenced"),e(S)}function R(S,de,ye){let be=0;return _;function _(j){return S.enter("lineEnding"),S.consume(j),S.exit("lineEnding"),L}function L(j){return S.enter("codeFencedFence"),se(j)?ie(S,F,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):F(j)}function F(j){return j===a?(S.enter("codeFencedFenceSequence"),v(j)):ye(j)}function v(j){return j===a?(be++,S.consume(j),v):be>=s?(S.exit("codeFencedFenceSequence"),se(j)?ie(S,P,"whitespace")(j):P(j)):ye(j)}function P(j){return j===null||z(j)?(S.exit("codeFencedFence"),de(j)):ye(j)}}}function s_(t,e,r){let n=this;return i;function i(s){return s===null?r(s):(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o)}function o(s){return n.parser.lazy[n.now().line]?r(s):e(s)}}var As={name:"codeIndented",tokenize:u_},a_={partial:!0,tokenize:l_};function u_(t,e,r){let n=this;return i;function i(l){return t.enter("codeIndented"),ie(t,o,"linePrefix",5)(l)}function o(l){let c=n.events[n.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(l):r(l)}function s(l){return l===null?u(l):z(l)?t.attempt(a_,s,u)(l):(t.enter("codeFlowValue"),a(l))}function a(l){return l===null||z(l)?(t.exit("codeFlowValue"),s(l)):(t.consume(l),a)}function u(l){return t.exit("codeIndented"),e(l)}}function l_(t,e,r){let n=this;return i;function i(s){return n.parser.lazy[n.now().line]?r(s):z(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),i):ie(t,o,"linePrefix",5)(s)}function o(s){let a=n.events[n.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):z(s)?i(s):r(s)}}var Qc={name:"codeText",previous:f_,resolve:c_,tokenize:p_};function c_(t){let e=t.length-4,r=3,n,i;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(n=r;++n<e;)if(t[n][1].type==="codeTextData"){t[r][1].type="codeTextPadding",t[e][1].type="codeTextPadding",r+=2,e-=2;break}}for(n=r-1,e++;++n<=e;)i===void 0?n!==e&&t[n][1].type!=="lineEnding"&&(i=n):(n===e||t[n][1].type==="lineEnding")&&(t[i][1].type="codeTextData",n!==i+2&&(t[i][1].end=t[n-1][1].end,t.splice(i+2,n-i-2),e-=n-i-2,n=i+2),i=void 0);return t}function f_(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function p_(t,e,r){let n=this,i=0,o,s;return a;function a(p){return t.enter("codeText"),t.enter("codeTextSequence"),u(p)}function u(p){return p===96?(t.consume(p),i++,u):(t.exit("codeTextSequence"),l(p))}function l(p){return p===null?r(p):p===32?(t.enter("space"),t.consume(p),t.exit("space"),l):p===96?(s=t.enter("codeTextSequence"),o=0,f(p)):z(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),l):(t.enter("codeTextData"),c(p))}function c(p){return p===null||p===32||p===96||z(p)?(t.exit("codeTextData"),l(p)):(t.consume(p),c)}function f(p){return p===96?(t.consume(p),o++,f):o===i?(t.exit("codeTextSequence"),t.exit("codeText"),e(p)):(s.type="codeTextData",c(p))}}var Ha=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,r){let n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,r,n){let i=r||0;this.setCursor(Math.trunc(e));let o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&Cs(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Cs(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Cs(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let r=this.left.splice(e,Number.POSITIVE_INFINITY);Cs(this.right,r.reverse())}else{let r=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Cs(this.left,r.reverse())}}};function Cs(t,e){let r=0;if(e.length<1e4)t.push(...e);else for(;r<e.length;)t.push(...e.slice(r,r+1e4)),r+=1e4}function Ka(t){let e={},r=-1,n,i,o,s,a,u,l,c=new Ha(t);for(;++r<c.length;){for(;r in e;)r=e[r];if(n=c.get(r),r&&n[1].type==="chunkFlow"&&c.get(r-1)[1].type==="listItemPrefix"&&(u=n[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(n[0]==="enter")n[1].contentType&&(Object.assign(e,d_(c,r)),r=e[r],l=!0);else if(n[1]._container){for(o=r,i=void 0;o--;)if(s=c.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(n[1].end={...c.get(i)[1].start},a=c.slice(i,r),a.unshift(n),c.splice(i,r-i+1,a))}}return st(t,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function d_(t,e){let r=t.get(e)[1],n=t.get(e)[2],i=e-1,o=[],s=r._tokenizer;s||(s=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));let a=s.events,u=[],l={},c,f,p=-1,d=r,m=0,y=0,g=[y];for(;d;){for(;t.get(++i)[1]!==d;);o.push(i),d._tokenizer||(c=n.sliceStream(d),d.next||c.push(null),f&&s.defineSkip(d.start),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=d,d=d.next}for(d=r;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(y=p+1,g.push(y),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(s.events=[],d?(d._tokenizer=void 0,d.previous=void 0):g.pop(),p=g.length;p--;){let b=a.slice(g[p],g[p+1]),w=o.pop();u.push([w,w+b.length-1]),t.splice(w,2,b)}for(u.reverse(),p=-1;++p<u.length;)l[m+u[p][0]]=m+u[p][1],m+=u[p][1]-u[p][0]-1;return l}var ef={resolve:m_,tokenize:g_},h_={partial:!0,tokenize:x_};function m_(t){return Ka(t),t}function g_(t,e){let r;return n;function n(a){return t.enter("content"),r=t.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):z(a)?t.check(h_,s,o)(a):(t.consume(a),i)}function o(a){return t.exit("chunkContent"),t.exit("content"),e(a)}function s(a){return t.consume(a),t.exit("chunkContent"),r.next=t.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function x_(t,e,r){let n=this;return i;function i(s){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),ie(t,o,"linePrefix")}function o(s){if(s===null||z(s))return r(s);let a=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):t.interrupt(n.parser.constructs.flow,r,e)(s)}}function Ya(t,e,r,n,i,o,s,a,u){let l=u||Number.POSITIVE_INFINITY,c=0;return f;function f(b){return b===60?(t.enter(n),t.enter(i),t.enter(o),t.consume(b),t.exit(o),p):b===null||b===32||b===41||Ci(b)?r(b):(t.enter(n),t.enter(s),t.enter(a),t.enter("chunkString",{contentType:"string"}),y(b))}function p(b){return b===62?(t.enter(o),t.consume(b),t.exit(o),t.exit(i),t.exit(n),e):(t.enter(a),t.enter("chunkString",{contentType:"string"}),d(b))}function d(b){return b===62?(t.exit("chunkString"),t.exit(a),p(b)):b===null||b===60||z(b)?r(b):(t.consume(b),b===92?m:d)}function m(b){return b===60||b===62||b===92?(t.consume(b),d):d(b)}function y(b){return!c&&(b===null||b===41||ke(b))?(t.exit("chunkString"),t.exit(a),t.exit(s),t.exit(n),e(b)):c<l&&b===40?(t.consume(b),c++,y):b===41?(t.consume(b),c--,y):b===null||b===32||b===40||Ci(b)?r(b):(t.consume(b),b===92?g:y)}function g(b){return b===40||b===41||b===92?(t.consume(b),y):y(b)}}function Za(t,e,r,n,i,o){let s=this,a=0,u;return l;function l(d){return t.enter(n),t.enter(i),t.consume(d),t.exit(i),t.enter(o),c}function c(d){return a>999||d===null||d===91||d===93&&!u||d===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?r(d):d===93?(t.exit(o),t.enter(i),t.consume(d),t.exit(i),t.exit(n),e):z(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),c):(t.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||z(d)||a++>999?(t.exit("chunkString"),c(d)):(t.consume(d),u||(u=!se(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(t.consume(d),a++,f):f(d)}}function Xa(t,e,r,n,i,o){let s;return a;function a(p){return p===34||p===39||p===40?(t.enter(n),t.enter(i),t.consume(p),t.exit(i),s=p===40?41:p,u):r(p)}function u(p){return p===s?(t.enter(i),t.consume(p),t.exit(i),t.exit(n),e):(t.enter(o),l(p))}function l(p){return p===s?(t.exit(o),u(s)):p===null?r(p):z(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),ie(t,l,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===s||p===null||z(p)?(t.exit("chunkString"),l(p)):(t.consume(p),p===92?f:c)}function f(p){return p===s||p===92?(t.consume(p),c):c(p)}}function ki(t,e){let r;return n;function n(i){return z(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),r=!0,n):se(i)?ie(t,n,r?"linePrefix":"lineSuffix")(i):e(i)}}var tf={name:"definition",tokenize:b_},y_={partial:!0,tokenize:E_};function b_(t,e,r){let n=this,i;return o;function o(d){return t.enter("definition"),s(d)}function s(d){return Za.call(n,t,a,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function a(d){return i=It(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),d===58?(t.enter("definitionMarker"),t.consume(d),t.exit("definitionMarker"),u):r(d)}function u(d){return ke(d)?ki(t,l)(d):l(d)}function l(d){return Ya(t,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return t.attempt(y_,f,f)(d)}function f(d){return se(d)?ie(t,p,"whitespace")(d):p(d)}function p(d){return d===null||z(d)?(t.exit("definition"),n.parser.defined.push(i),e(d)):r(d)}}function E_(t,e,r){return n;function n(a){return ke(a)?ki(t,i)(a):r(a)}function i(a){return Xa(t,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return se(a)?ie(t,s,"whitespace")(a):s(a)}function s(a){return a===null||z(a)?e(a):r(a)}}var rf={name:"hardBreakEscape",tokenize:A_};function A_(t,e,r){return n;function n(o){return t.enter("hardBreakEscape"),t.consume(o),i}function i(o){return z(o)?(t.exit("hardBreakEscape"),e(o)):r(o)}}var nf={name:"headingAtx",resolve:C_,tokenize:w_};function C_(t,e){let r=t.length-2,n=3,i,o;return t[n][1].type==="whitespace"&&(n+=2),r-2>n&&t[r][1].type==="whitespace"&&(r-=2),t[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&t[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:t[n][1].start,end:t[r][1].end},o={type:"chunkText",start:t[n][1].start,end:t[r][1].end,contentType:"text"},st(t,n,r-n+1,[["enter",i,e],["enter",o,e],["exit",o,e],["exit",i,e]])),t}function w_(t,e,r){let n=0;return i;function i(c){return t.enter("atxHeading"),o(c)}function o(c){return t.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&n++<6?(t.consume(c),s):c===null||ke(c)?(t.exit("atxHeadingSequence"),a(c)):r(c)}function a(c){return c===35?(t.enter("atxHeadingSequence"),u(c)):c===null||z(c)?(t.exit("atxHeading"),e(c)):se(c)?ie(t,a,"whitespace")(c):(t.enter("atxHeadingText"),l(c))}function u(c){return c===35?(t.consume(c),u):(t.exit("atxHeadingSequence"),a(c))}function l(c){return c===null||c===35||ke(c)?(t.exit("atxHeadingText"),a(c)):(t.consume(c),l)}}var $m=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],of=["pre","script","style","textarea"];var sf={concrete:!0,name:"htmlFlow",resolveTo:__,tokenize:S_},k_={partial:!0,tokenize:I_},T_={partial:!0,tokenize:v_};function __(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function S_(t,e,r){let n=this,i,o,s,a,u;return l;function l(E){return c(E)}function c(E){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(E),f}function f(E){return E===33?(t.consume(E),p):E===47?(t.consume(E),o=!0,y):E===63?(t.consume(E),i=3,n.interrupt?e:x):xt(E)?(t.consume(E),s=String.fromCharCode(E),g):r(E)}function p(E){return E===45?(t.consume(E),i=2,d):E===91?(t.consume(E),i=5,a=0,m):xt(E)?(t.consume(E),i=4,n.interrupt?e:x):r(E)}function d(E){return E===45?(t.consume(E),n.interrupt?e:x):r(E)}function m(E){let W="CDATA[";return E===W.charCodeAt(a++)?(t.consume(E),a===W.length?n.interrupt?e:F:m):r(E)}function y(E){return xt(E)?(t.consume(E),s=String.fromCharCode(E),g):r(E)}function g(E){if(E===null||E===47||E===62||ke(E)){let W=E===47,Ye=s.toLowerCase();return!W&&!o&&of.includes(Ye)?(i=1,n.interrupt?e(E):F(E)):$m.includes(s.toLowerCase())?(i=6,W?(t.consume(E),b):n.interrupt?e(E):F(E)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(E):o?w(E):C(E))}return E===45||yt(E)?(t.consume(E),s+=String.fromCharCode(E),g):r(E)}function b(E){return E===62?(t.consume(E),n.interrupt?e:F):r(E)}function w(E){return se(E)?(t.consume(E),w):_(E)}function C(E){return E===47?(t.consume(E),_):E===58||E===95||xt(E)?(t.consume(E),D):se(E)?(t.consume(E),C):_(E)}function D(E){return E===45||E===46||E===58||E===95||yt(E)?(t.consume(E),D):R(E)}function R(E){return E===61?(t.consume(E),S):se(E)?(t.consume(E),R):C(E)}function S(E){return E===null||E===60||E===61||E===62||E===96?r(E):E===34||E===39?(t.consume(E),u=E,de):se(E)?(t.consume(E),S):ye(E)}function de(E){return E===u?(t.consume(E),u=null,be):E===null||z(E)?r(E):(t.consume(E),de)}function ye(E){return E===null||E===34||E===39||E===47||E===60||E===61||E===62||E===96||ke(E)?R(E):(t.consume(E),ye)}function be(E){return E===47||E===62||se(E)?C(E):r(E)}function _(E){return E===62?(t.consume(E),L):r(E)}function L(E){return E===null||z(E)?F(E):se(E)?(t.consume(E),L):r(E)}function F(E){return E===45&&i===2?(t.consume(E),ae):E===60&&i===1?(t.consume(E),ee):E===62&&i===4?(t.consume(E),Ue):E===63&&i===3?(t.consume(E),x):E===93&&i===5?(t.consume(E),it):z(E)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(k_,Qe,v)(E)):E===null||z(E)?(t.exit("htmlFlowData"),v(E)):(t.consume(E),F)}function v(E){return t.check(T_,P,Qe)(E)}function P(E){return t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),j}function j(E){return E===null||z(E)?v(E):(t.enter("htmlFlowData"),F(E))}function ae(E){return E===45?(t.consume(E),x):F(E)}function ee(E){return E===47?(t.consume(E),s="",_e):F(E)}function _e(E){if(E===62){let W=s.toLowerCase();return of.includes(W)?(t.consume(E),Ue):F(E)}return xt(E)&&s.length<8?(t.consume(E),s+=String.fromCharCode(E),_e):F(E)}function it(E){return E===93?(t.consume(E),x):F(E)}function x(E){return E===62?(t.consume(E),Ue):E===45&&i===2?(t.consume(E),x):F(E)}function Ue(E){return E===null||z(E)?(t.exit("htmlFlowData"),Qe(E)):(t.consume(E),Ue)}function Qe(E){return t.exit("htmlFlow"),e(E)}}function v_(t,e,r){let n=this;return i;function i(s){return z(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o):r(s)}function o(s){return n.parser.lazy[n.now().line]?r(s):e(s)}}function I_(t,e,r){return n;function n(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(Rr,e,r)}}var af={name:"htmlText",tokenize:O_};function O_(t,e,r){let n=this,i,o,s;return a;function a(x){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(x),u}function u(x){return x===33?(t.consume(x),l):x===47?(t.consume(x),R):x===63?(t.consume(x),C):xt(x)?(t.consume(x),ye):r(x)}function l(x){return x===45?(t.consume(x),c):x===91?(t.consume(x),o=0,m):xt(x)?(t.consume(x),w):r(x)}function c(x){return x===45?(t.consume(x),d):r(x)}function f(x){return x===null?r(x):x===45?(t.consume(x),p):z(x)?(s=f,ee(x)):(t.consume(x),f)}function p(x){return x===45?(t.consume(x),d):f(x)}function d(x){return x===62?ae(x):x===45?p(x):f(x)}function m(x){let Ue="CDATA[";return x===Ue.charCodeAt(o++)?(t.consume(x),o===Ue.length?y:m):r(x)}function y(x){return x===null?r(x):x===93?(t.consume(x),g):z(x)?(s=y,ee(x)):(t.consume(x),y)}function g(x){return x===93?(t.consume(x),b):y(x)}function b(x){return x===62?ae(x):x===93?(t.consume(x),b):y(x)}function w(x){return x===null||x===62?ae(x):z(x)?(s=w,ee(x)):(t.consume(x),w)}function C(x){return x===null?r(x):x===63?(t.consume(x),D):z(x)?(s=C,ee(x)):(t.consume(x),C)}function D(x){return x===62?ae(x):C(x)}function R(x){return xt(x)?(t.consume(x),S):r(x)}function S(x){return x===45||yt(x)?(t.consume(x),S):de(x)}function de(x){return z(x)?(s=de,ee(x)):se(x)?(t.consume(x),de):ae(x)}function ye(x){return x===45||yt(x)?(t.consume(x),ye):x===47||x===62||ke(x)?be(x):r(x)}function be(x){return x===47?(t.consume(x),ae):x===58||x===95||xt(x)?(t.consume(x),_):z(x)?(s=be,ee(x)):se(x)?(t.consume(x),be):ae(x)}function _(x){return x===45||x===46||x===58||x===95||yt(x)?(t.consume(x),_):L(x)}function L(x){return x===61?(t.consume(x),F):z(x)?(s=L,ee(x)):se(x)?(t.consume(x),L):be(x)}function F(x){return x===null||x===60||x===61||x===62||x===96?r(x):x===34||x===39?(t.consume(x),i=x,v):z(x)?(s=F,ee(x)):se(x)?(t.consume(x),F):(t.consume(x),P)}function v(x){return x===i?(t.consume(x),i=void 0,j):x===null?r(x):z(x)?(s=v,ee(x)):(t.consume(x),v)}function P(x){return x===null||x===34||x===39||x===60||x===61||x===96?r(x):x===47||x===62||ke(x)?be(x):(t.consume(x),P)}function j(x){return x===47||x===62||ke(x)?be(x):r(x)}function ae(x){return x===62?(t.consume(x),t.exit("htmlTextData"),t.exit("htmlText"),e):r(x)}function ee(x){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),_e}function _e(x){return se(x)?ie(t,it,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):it(x)}function it(x){return t.enter("htmlTextData"),s(x)}}var Ti={name:"labelEnd",resolveAll:N_,resolveTo:P_,tokenize:L_},D_={tokenize:M_},R_={tokenize:B_},F_={tokenize:j_};function N_(t){let e=-1,r=[];for(;++e<t.length;){let n=t[e][1];if(r.push(t[e]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){let i=n.type==="labelImage"?4:2;n.type="data",e+=i}}return t.length!==r.length&&st(t,0,t.length,r),t}function P_(t,e){let r=t.length,n=0,i,o,s,a;for(;r--;)if(i=t[r][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[r][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(t[r][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=r,i.type!=="labelLink")){n=2;break}}else i.type==="labelEnd"&&(s=r);let u={type:t[o][1].type==="labelLink"?"link":"image",start:{...t[o][1].start},end:{...t[t.length-1][1].end}},l={type:"label",start:{...t[o][1].start},end:{...t[s][1].end}},c={type:"labelText",start:{...t[o+n+2][1].end},end:{...t[s-2][1].start}};return a=[["enter",u,e],["enter",l,e]],a=Lt(a,t.slice(o+1,o+n+3)),a=Lt(a,[["enter",c,e]]),a=Lt(a,wn(e.parser.constructs.insideSpan.null,t.slice(o+n+4,s-3),e)),a=Lt(a,[["exit",c,e],t[s-2],t[s-1],["exit",l,e]]),a=Lt(a,t.slice(s+1)),a=Lt(a,[["exit",u,e]]),st(t,o,t.length,a),t}function L_(t,e,r){let n=this,i=n.events.length,o,s;for(;i--;)if((n.events[i][1].type==="labelImage"||n.events[i][1].type==="labelLink")&&!n.events[i][1]._balanced){o=n.events[i][1];break}return a;function a(p){return o?o._inactive?f(p):(s=n.parser.defined.includes(It(n.sliceSerialize({start:o.end,end:n.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(p),t.exit("labelMarker"),t.exit("labelEnd"),u):r(p)}function u(p){return p===40?t.attempt(D_,c,s?c:f)(p):p===91?t.attempt(R_,c,s?l:f)(p):s?c(p):f(p)}function l(p){return t.attempt(F_,c,f)(p)}function c(p){return e(p)}function f(p){return o._balanced=!0,r(p)}}function M_(t,e,r){return n;function n(f){return t.enter("resource"),t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),i}function i(f){return ke(f)?ki(t,o)(f):o(f)}function o(f){return f===41?c(f):Ya(t,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return ke(f)?ki(t,u)(f):c(f)}function a(f){return r(f)}function u(f){return f===34||f===39||f===40?Xa(t,l,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function l(f){return ke(f)?ki(t,c)(f):c(f)}function c(f){return f===41?(t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),t.exit("resource"),e):r(f)}}function B_(t,e,r){let n=this;return i;function i(a){return Za.call(n,t,o,s,"reference","referenceMarker","referenceString")(a)}function o(a){return n.parser.defined.includes(It(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?e(a):r(a)}function s(a){return r(a)}}function j_(t,e,r){return n;function n(o){return t.enter("reference"),t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),i}function i(o){return o===93?(t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),t.exit("reference"),e):r(o)}}var uf={name:"labelStartImage",resolveAll:Ti.resolveAll,tokenize:U_};function U_(t,e,r){let n=this;return i;function i(a){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(a),t.exit("labelImageMarker"),o}function o(a){return a===91?(t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelImage"),s):r(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(a):e(a)}}var lf={name:"labelStartLink",resolveAll:Ti.resolveAll,tokenize:z_};function z_(t,e,r){let n=this;return i;function i(s){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(s),t.exit("labelMarker"),t.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):e(s)}}var ws={name:"lineEnding",tokenize:$_};function $_(t,e){return r;function r(n){return t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),ie(t,e,"linePrefix")}}var _i={name:"thematicBreak",tokenize:q_};function q_(t,e,r){let n=0,i;return o;function o(l){return t.enter("thematicBreak"),s(l)}function s(l){return i=l,a(l)}function a(l){return l===i?(t.enter("thematicBreakSequence"),u(l)):n>=3&&(l===null||z(l))?(t.exit("thematicBreak"),e(l)):r(l)}function u(l){return l===i?(t.consume(l),n++,u):(t.exit("thematicBreakSequence"),se(l)?ie(t,a,"whitespace")(l):a(l))}}var Ot={continuation:{tokenize:H_},exit:Y_,name:"list",tokenize:W_},V_={partial:!0,tokenize:Z_},G_={partial:!0,tokenize:K_};function W_(t,e,r){let n=this,i=n.events[n.events.length-1],o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(d){let m=n.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!n.containerState.marker||d===n.containerState.marker:bs(d)){if(n.containerState.type||(n.containerState.type=m,t.enter(m,{_container:!0})),m==="listUnordered")return t.enter("listItemPrefix"),d===42||d===45?t.check(_i,r,l)(d):l(d);if(!n.interrupt||d===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),u(d)}return r(d)}function u(d){return bs(d)&&++s<10?(t.consume(d),u):(!n.interrupt||s<2)&&(n.containerState.marker?d===n.containerState.marker:d===41||d===46)?(t.exit("listItemValue"),l(d)):r(d)}function l(d){return t.enter("listItemMarker"),t.consume(d),t.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||d,t.check(Rr,n.interrupt?r:c,t.attempt(V_,p,f))}function c(d){return n.containerState.initialBlankLine=!0,o++,p(d)}function f(d){return se(d)?(t.enter("listItemPrefixWhitespace"),t.consume(d),t.exit("listItemPrefixWhitespace"),p):r(d)}function p(d){return n.containerState.size=o+n.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(d)}}function H_(t,e,r){let n=this;return n.containerState._closeFlow=void 0,t.check(Rr,i,o);function i(a){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,ie(t,e,"listItemIndent",n.containerState.size+1)(a)}function o(a){return n.containerState.furtherBlankLines||!se(a)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,s(a)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,t.attempt(G_,e,s)(a))}function s(a){return n.containerState._closeFlow=!0,n.interrupt=void 0,ie(t,t.attempt(Ot,e,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function K_(t,e,r){let n=this;return ie(t,i,"listItemIndent",n.containerState.size+1);function i(o){let s=n.events[n.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===n.containerState.size?e(o):r(o)}}function Y_(t){t.exit(this.containerState.type)}function Z_(t,e,r){let n=this;return ie(t,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){let s=n.events[n.events.length-1];return!se(o)&&s&&s[1].type==="listItemPrefixWhitespace"?e(o):r(o)}}var Ja={name:"setextUnderline",resolveTo:X_,tokenize:J_};function X_(t,e){let r=t.length,n,i,o;for(;r--;)if(t[r][0]==="enter"){if(t[r][1].type==="content"){n=r;break}t[r][1].type==="paragraph"&&(i=r)}else t[r][1].type==="content"&&t.splice(r,1),!o&&t[r][1].type==="definition"&&(o=r);let s={type:"setextHeading",start:{...t[n][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",o?(t.splice(i,0,["enter",s,e]),t.splice(o+1,0,["exit",t[n][1],e]),t[n][1].end={...t[o][1].end}):t[n][1]=s,t.push(["exit",s,e]),t}function J_(t,e,r){let n=this,i;return o;function o(l){let c=n.events.length,f;for(;c--;)if(n.events[c][1].type!=="lineEnding"&&n.events[c][1].type!=="linePrefix"&&n.events[c][1].type!=="content"){f=n.events[c][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||f)?(t.enter("setextHeadingLine"),i=l,s(l)):r(l)}function s(l){return t.enter("setextHeadingLineSequence"),a(l)}function a(l){return l===i?(t.consume(l),a):(t.exit("setextHeadingLineSequence"),se(l)?ie(t,u,"lineSuffix")(l):u(l))}function u(l){return l===null||z(l)?(t.exit("setextHeadingLine"),e(l)):r(l)}}var qm={tokenize:Q_};function Q_(t){let e=this,r=t.attempt(Rr,n,t.attempt(this.parser.constructs.flowInitial,i,ie(t,t.attempt(this.parser.constructs.flow,i,t.attempt(ef,i)),"linePrefix")));return r;function n(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),e.currentConstruct=void 0,r}function i(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),e.currentConstruct=void 0,r}}var Vm={resolveAll:Km()},Gm=Hm("string"),Wm=Hm("text");function Hm(t){return{resolveAll:Km(t==="text"?eS:void 0),tokenize:e};function e(r){let n=this,i=this.parser.constructs[t],o=r.attempt(i,s,a);return s;function s(c){return l(c)?o(c):a(c)}function a(c){if(c===null){r.consume(c);return}return r.enter("data"),r.consume(c),u}function u(c){return l(c)?(r.exit("data"),o(c)):(r.consume(c),u)}function l(c){if(c===null)return!0;let f=i[c],p=-1;if(f)for(;++p<f.length;){let d=f[p];if(!d.previous||d.previous.call(n,n.previous))return!0}return!1}}}function Km(t){return e;function e(r,n){let i=-1,o;for(;++i<=r.length;)o===void 0?r[i]&&r[i][1].type==="data"&&(o=i,i++):(!r[i]||r[i][1].type!=="data")&&(i!==o+2&&(r[o][1].end=r[i-1][1].end,r.splice(o+2,i-o-2),i=o+2),o=void 0);return t?t(r,n):r}}function eS(t,e){let r=0;for(;++r<=t.length;)if((r===t.length||t[r][1].type==="lineEnding")&&t[r-1][1].type==="data"){let n=t[r-1][1],i=e.sliceStream(n),o=i.length,s=-1,a=0,u;for(;o--;){let l=i[o];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(l===-2)u=!0,a++;else if(l!==-1){o++;break}}if(e._contentTypeTextTrailing&&r===t.length&&(a=0),a){let l={type:r===t.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:n.start._bufferIndex+s,_index:n.start._index+o,line:n.end.line,column:n.end.column-a,offset:n.end.offset-a},end:{...n.end}};n.end={...l.start},n.start.offset===n.end.offset?Object.assign(n,l):(t.splice(r,0,["enter",l,e],["exit",l,e]),r+=2)}r++}return t}var cf={};HC(cf,{attentionMarkers:()=>uS,contentInitial:()=>rS,disable:()=>lS,document:()=>tS,flow:()=>iS,flowInitial:()=>nS,insideSpan:()=>aS,string:()=>oS,text:()=>sS});var tS={42:Ot,43:Ot,45:Ot,48:Ot,49:Ot,50:Ot,51:Ot,52:Ot,53:Ot,54:Ot,55:Ot,56:Ot,57:Ot,62:qa},rS={91:tf},nS={[-2]:As,[-1]:As,32:As},iS={35:nf,42:_i,45:[Ja,_i],60:sf,61:Ja,95:_i,96:Wa,126:Wa},oS={38:Ga,92:Va},sS={[-5]:ws,[-4]:ws,[-3]:ws,33:uf,38:Ga,42:Es,60:[Jc,af],91:lf,92:[rf,Va],93:Ti,95:Es,96:Qc},aS={null:[Es,Vm]},uS={null:[42,95]},lS={null:[]};function Ym(t,e,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0},i={},o=[],s=[],a=[],u=!0,l={attempt:be(de),check:be(ye),consume:D,enter:R,exit:S,interrupt:be(ye,{interrupt:!0})},c={code:null,containerState:{},defineSkip:b,events:[],now:g,parser:t,previous:null,sliceSerialize:m,sliceStream:y,write:d},f=e.tokenize.call(c,l),p;return e.resolveAll&&o.push(e),c;function d(v){return s=Lt(s,v),w(),s[s.length-1]!==null?[]:(_(e,0),c.events=wn(o,c.events,c),c.events)}function m(v,P){return fS(y(v),P)}function y(v){return cS(s,v)}function g(){let{_bufferIndex:v,_index:P,line:j,column:ae,offset:ee}=n;return{_bufferIndex:v,_index:P,line:j,column:ae,offset:ee}}function b(v){i[v.line]=v.column,F()}function w(){let v;for(;n._index<s.length;){let P=s[n._index];if(typeof P=="string")for(v=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===v&&n._bufferIndex<P.length;)C(P.charCodeAt(n._bufferIndex));else C(P)}}function C(v){u=void 0,p=v,f=f(v)}function D(v){z(v)?(n.line++,n.column=1,n.offset+=v===-3?2:1,F()):v!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===s[n._index].length&&(n._bufferIndex=-1,n._index++)),c.previous=v,u=!0}function R(v,P){let j=P||{};return j.type=v,j.start=g(),c.events.push(["enter",j,c]),a.push(j),j}function S(v){let P=a.pop();return P.end=g(),c.events.push(["exit",P,c]),P}function de(v,P){_(v,P.from)}function ye(v,P){P.restore()}function be(v,P){return j;function j(ae,ee,_e){let it,x,Ue,Qe;return Array.isArray(ae)?W(ae):"tokenize"in ae?W([ae]):E(ae);function E(oe){return ce;function ce(me){let we=me!==null&&oe[me],Fe=me!==null&&oe.null,ze=[...Array.isArray(we)?we:we?[we]:[],...Array.isArray(Fe)?Fe:Fe?[Fe]:[]];return W(ze)(me)}}function W(oe){return it=oe,x=0,oe.length===0?_e:Ye(oe[x])}function Ye(oe){return ce;function ce(me){return Qe=L(),Ue=oe,oe.partial||(c.currentConstruct=oe),oe.name&&c.parser.constructs.disable.null.includes(oe.name)?he(me):oe.tokenize.call(P?Object.assign(Object.create(c),P):c,l,ne,he)(me)}}function ne(oe){return u=!0,v(Ue,Qe),ee}function he(oe){return u=!0,Qe.restore(),++x<it.length?Ye(it[x]):_e}}}function _(v,P){v.resolveAll&&!o.includes(v)&&o.push(v),v.resolve&&st(c.events,P,c.events.length-P,v.resolve(c.events.slice(P),c)),v.resolveTo&&(c.events=v.resolveTo(c.events,c))}function L(){let v=g(),P=c.previous,j=c.currentConstruct,ae=c.events.length,ee=Array.from(a);return{from:ae,restore:_e};function _e(){n=v,c.previous=P,c.currentConstruct=j,c.events.length=ae,a=ee,F()}}function F(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function cS(t,e){let r=e.start._index,n=e.start._bufferIndex,i=e.end._index,o=e.end._bufferIndex,s;if(r===i)s=[t[r].slice(n,o)];else{if(s=t.slice(r,i),n>-1){let a=s[0];typeof a=="string"?s[0]=a.slice(n):s.shift()}o>0&&s.push(t[i].slice(0,o))}return s}function fS(t,e){let r=-1,n=[],i;for(;++r<t.length;){let o=t[r],s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mdat",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "CLI tool and library implementing the Markdown Autophagic Template (MDAT) system. MDAT lets you use comments as dynamic content templates in Markdown files, making it easy to generate and update readme boilerplate.",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "CLI tool and TypeScript library implementing the Markdown Autophagic Template (MDAT) system. MDAT lets you use comments as dynamic content templates in Markdown files, making it easy to generate and update readme boilerplate.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mdat",
|
|
7
7
|
"markdown",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"bugs": "https://github.com/kitschpatrol/mdat/issues",
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|
|
20
|
-
"url": "https://github.com/kitschpatrol/mdat"
|
|
20
|
+
"url": "git+https://github.com/kitschpatrol/mdat.git"
|
|
21
21
|
},
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"author": {
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@clack/prompts": "^0.10.0",
|
|
41
|
-
"@kitschpatrol/tldraw-cli": "^4.6.
|
|
41
|
+
"@kitschpatrol/tldraw-cli": "^4.6.31",
|
|
42
42
|
"@types/mdast": "^4.0.4",
|
|
43
|
-
"@types/node": "18.19.
|
|
43
|
+
"@types/node": "^18.19.79",
|
|
44
44
|
"@types/unist": "^3.0.3",
|
|
45
45
|
"@types/which": "^3.0.4",
|
|
46
46
|
"@types/yargs": "^17.0.33",
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
"execa": "^9.5.2",
|
|
50
50
|
"globby": "^14.1.0",
|
|
51
51
|
"read-pkg": "^9.0.1",
|
|
52
|
-
"remark-mdat": "^1.0.
|
|
52
|
+
"remark-mdat": "^1.0.2",
|
|
53
53
|
"type-fest": "^4.36.0",
|
|
54
54
|
"unified-engine": "^11.2.2",
|
|
55
55
|
"vfile": "^6.0.3",
|
|
56
56
|
"which": "^5.0.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@kitschpatrol/shared-config": "^5.0
|
|
59
|
+
"@kitschpatrol/shared-config": "^5.2.0",
|
|
60
60
|
"bumpp": "^10.0.3",
|
|
61
61
|
"chalk": "^5.4.1",
|
|
62
62
|
"chevrotain": "^11.0.3",
|
|
@@ -81,8 +81,7 @@
|
|
|
81
81
|
"zod": "^3.24.2"
|
|
82
82
|
},
|
|
83
83
|
"engines": {
|
|
84
|
-
"node": "^18.19.0 || >=20.11.0"
|
|
85
|
-
"pnpm": ">=10.0.0"
|
|
84
|
+
"node": "^18.19.0 || >=20.11.0"
|
|
86
85
|
},
|
|
87
86
|
"publishConfig": {
|
|
88
87
|
"access": "public"
|
package/readme.md
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
<!-- description -->
|
|
17
17
|
|
|
18
|
-
**CLI tool and library implementing the Markdown Autophagic Template (MDAT) system. MDAT lets you use comments as dynamic content templates in Markdown files, making it easy to generate and update readme boilerplate.**
|
|
18
|
+
**CLI tool and TypeScript library implementing the Markdown Autophagic Template (MDAT) system. MDAT lets you use comments as dynamic content templates in Markdown files, making it easy to generate and update readme boilerplate.**
|
|
19
19
|
|
|
20
20
|
<!-- /description -->
|
|
21
21
|
|
|
@@ -745,8 +745,8 @@ See the [Examples section](https://github.com/kitschpatrol/remark-mdat#examples)
|
|
|
745
745
|
|
|
746
746
|
| File | Original | Gzip | Brotli |
|
|
747
747
|
| ------------ | -------- | ------- | ------ |
|
|
748
|
-
| package.json | 2.
|
|
749
|
-
| readme.md | 57.
|
|
748
|
+
| package.json | 2.7 kB | 1.2 kB | 1.1 kB |
|
|
749
|
+
| readme.md | 57.5 kB | 11.4 kB | 9.1 kB |
|
|
750
750
|
|
|
751
751
|
<!-- /size-table -->
|
|
752
752
|
|