mdat 1.0.1 → 1.0.3

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 CHANGED
@@ -1,18 +1,14 @@
1
1
  #!/usr/bin/env node
2
- var $C=Object.create;var ec=Object.defineProperty;var qC=Object.getOwnPropertyDescriptor;var VC=Object.getOwnPropertyNames;var GC=Object.getPrototypeOf,WC=Object.prototype.hasOwnProperty;var Tr=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var tc=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),HC=(t,e)=>{for(var r in e)ec(t,r,{get:e[r],enumerable:!0})},KC=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of VC(e))!WC.call(t,i)&&i!==r&&ec(t,i,{get:()=>e[i],enumerable:!(n=qC(e,i))||n.enumerable});return t};var jd=(t,e,r)=>(r=t!=null?$C(GC(t)):{},KC(e||!t||!t.__esModule?ec(r,"default",{value:t,enumerable:!0}):r,t));var rm=tc((Vj,hk)=>{hk.exports={addendum:"addenda",aircraft:"aircraft",alga:"algae",alumna:"alumnae",alumnus:"alumni",alveolus:"alveoli",amoeba:"amoebae",analysis:"analyses",antenna:"antennae",antithesis:"antitheses",apex:"apices",appendix:"appendices",automaton:"automata",axis:"axes",bacillus:"bacilli",bacterium:"bacteria",baculum:"bacula",barracks:"barracks",basis:"bases",beau:"beaux",bison:"bison",buffalo:"buffalo",bureau:"bureaus",cactus:"cacti",calf:"calves",carcinoma:"carcinomata",carp:"carp",census:"censuses",chassis:"chassis",cherub:"cherubim",child:"children",ch\u00E2teau:"ch\xE2teaus",cloaca:"cloacae",cod:"cod",codex:"codices",concerto:"concerti",consortium:"consortia",corpus:"corpora",crisis:"crises",criterion:"criteria",curriculum:"curricula",cystoma:"cystomata",datum:"data",deer:"deer",diagnosis:"diagnoses",die:"dice",dwarf:"dwarfs",echo:"echoes",elf:"elves",elk:"elk",ellipsis:"ellipses",embargo:"embargoes",emphasis:"emphases",erratum:"errata","faux pas":"faux pas",fez:"fezes",firmware:"firmware",fish:"fish",focus:"foci",foot:"feet",formula:"formulae",fungus:"fungi",gallows:"gallows",genus:"genera",glomerulus:"glomeruli",goose:"geese",graffito:"graffiti",grouse:"grouse",half:"halves",hamulus:"hamuli",hero:"heroes",hippopotamus:"hippopotami",hoof:"hooves",hovercraft:"hovercraft",hypothesis:"hypotheses",iliac:"ilia",incubus:"incubi",index:"indices",interstitium:"interstitia",kakapo:"kakapo",knife:"knives",larva:"larvae",leaf:"leaves",libretto:"libretti",life:"lives",loaf:"loaves",loculus:"loculi",locus:"loci",louse:"lice",man:"men",matrix:"matrices",means:"means",measles:"measles",media:"media",medium:"media",memorandum:"memoranda",millennium:"millennia",minutia:"minutiae",moose:"moose",mouse:"mice",nebula:"nebulae",nemesis:"nemeses",neurosis:"neuroses",news:"news",nucleolus:"nucleoli",nucleus:"nuclei",oasis:"oases",occiput:"occipita",offspring:"offspring",omphalos:"omphaloi",opus:"opera",ovum:"ova",ox:"oxen",paralysis:"paralyses",parenthesis:"parentheses",person:"people",phenomenon:"phenomena",phylum:"phyla",pike:"pike",polyhedron:"polyhedra",potato:"potatoes",primus:"primi",prognosis:"prognoses",quiz:"quizzes",radius:"radii",referendum:"referenda",salmon:"salmon",scarf:"scarves",scrotum:"scrota",self:"selves",seminoma:"seminomata",series:"series",sheep:"sheep",shelf:"shelves",shrimp:"shrimp",simulacrum:"simulacra",soliloquy:"soliloquies",spacecraft:"spacecraft",species:"species",spectrum:"spectra",squid:"squid",stimulus:"stimuli",stratum:"strata",swine:"swine",syconium:"syconia",syllabus:"syllabi",symposium:"symposia",synopsis:"synopses",synthesis:"syntheses",tableau:"tableaus",testis:"testes",that:"those",thesis:"theses",thief:"thieves",this:"these",thrombus:"thrombi",tomato:"tomatoes",tooth:"teeth",torus:"tori",trout:"trout",tuna:"tuna",umbilicus:"umbilici",uterus:"uteri",vertebra:"vertebrae",vertex:"vertices",veto:"vetoes",vita:"vitae",vortex:"vortices",watercraft:"watercraft",wharf:"wharves",wife:"wives",wolf:"wolves",woman:"women"}});var im=tc((Gj,nm)=>{"use strict";var mk=rm();nm.exports=new Map(Object.entries(mk))});var Vg=tc((P3,qg)=>{"use strict";var uu=Object.prototype.hasOwnProperty,$g=Object.prototype.toString,Lg=Object.defineProperty,Mg=Object.getOwnPropertyDescriptor,Bg=function(e){return typeof Array.isArray=="function"?Array.isArray(e):$g.call(e)==="[object Array]"},jg=function(e){if(!e||$g.call(e)!=="[object Object]")return!1;var r=uu.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&uu.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;var i;for(i in e);return typeof i>"u"||uu.call(e,i)},Ug=function(e,r){Lg&&r.name==="__proto__"?Lg(e,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):e[r.name]=r.newValue},zg=function(e,r){if(r==="__proto__")if(uu.call(e,r)){if(Mg)return Mg(e,r).value}else return;return e[r]};qg.exports=function t(){var e,r,n,i,o,s,a=arguments[0],u=1,l=arguments.length,c=!1;for(typeof a=="boolean"&&(c=a,a=arguments[1]||{},u=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});u<l;++u)if(e=arguments[u],e!=null)for(r in e)n=zg(a,r),i=zg(e,r),a!==i&&(c&&i&&(jg(i)||(o=Bg(i)))?(o?(o=!1,s=n&&Bg(n)?n:[]):s=n&&jg(n)?n:{},Ug(a,{name:r,newValue:t(c,s,i)})):typeof i<"u"&&Ug(a,{name:r,newValue:i}));return a}});var Ud=(t=0)=>e=>`\x1B[${e+t}m`,zd=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,$d=(t=0)=>(e,r,n)=>`\x1B[${38+t};2;${e};${r};${n}m`,We={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},bM=Object.keys(We.modifier),YC=Object.keys(We.color),ZC=Object.keys(We.bgColor),EM=[...YC,...ZC];function XC(){let t=new Map;for(let[e,r]of Object.entries(We)){for(let[n,i]of Object.entries(r))We[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=We[n],t.set(i[0],i[1]);Object.defineProperty(We,e,{value:r,enumerable:!1})}return Object.defineProperty(We,"codes",{value:t,enumerable:!1}),We.color.close="\x1B[39m",We.bgColor.close="\x1B[49m",We.color.ansi=Ud(),We.color.ansi256=zd(),We.color.ansi16m=$d(),We.bgColor.ansi=Ud(10),We.bgColor.ansi256=zd(10),We.bgColor.ansi16m=$d(10),Object.defineProperties(We,{rgbToAnsi256:{value(e,r,n){return e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(o=>o+o).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:e=>We.rgbToAnsi256(...We.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,n,i;if(e>=232)r=((e-232)*10+8)/255,n=r,i=r;else{e-=16;let a=e%36;r=Math.floor(e/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let o=Math.max(r,n,i)*2;if(o===0)return 30;let s=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return o===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(e,r,n)=>We.ansi256ToAnsi(We.rgbToAnsi256(e,r,n)),enumerable:!1},hexToAnsi:{value:e=>We.ansi256ToAnsi(We.hexToAnsi256(e)),enumerable:!1}}),We}var JC=XC(),yr=JC;import rc from"node:process";import QC from"node:os";import qd from"node:tty";function or(t,e=globalThis.Deno?globalThis.Deno.args:rc.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}var{env:et}=rc,pa;or("no-color")||or("no-colors")||or("color=false")||or("color=never")?pa=0:(or("color")||or("colors")||or("color=true")||or("color=always"))&&(pa=1);function ew(){if("FORCE_COLOR"in et)return et.FORCE_COLOR==="true"?1:et.FORCE_COLOR==="false"?0:et.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(et.FORCE_COLOR,10),3)}function tw(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function rw(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let n=ew();n!==void 0&&(pa=n);let i=r?pa:n;if(i===0)return 0;if(r){if(or("color=16m")||or("color=full")||or("color=truecolor"))return 3;if(or("color=256"))return 2}if("TF_BUILD"in et&&"AGENT_NAME"in et)return 1;if(t&&!e&&i===void 0)return 0;let o=i||0;if(et.TERM==="dumb")return o;if(rc.platform==="win32"){let s=QC.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in et)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(s=>s in et)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(s=>s in et)||et.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in et)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(et.TEAMCITY_VERSION)?1:0;if(et.COLORTERM==="truecolor"||et.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in et){let s=Number.parseInt((et.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(et.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(et.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(et.TERM)||"COLORTERM"in et?1:o}function Vd(t,e={}){let r=rw(t,{streamIsTTY:t&&t.isTTY,...e});return tw(r)}var nw={stdout:Vd({isTTY:qd.isatty(1)}),stderr:Vd({isTTY:qd.isatty(2)})},Gd=nw;function Wd(t,e,r){let n=t.indexOf(e);if(n===-1)return t;let i=e.length,o=0,s="";do s+=t.slice(o,n)+e+r,o=n+i,n=t.indexOf(e,o);while(n!==-1);return s+=t.slice(o),s}function Hd(t,e,r,n){let i=0,o="";do{let s=t[n-1]==="\r";o+=t.slice(i,s?n-1:n)+e+(s?`\r
3
- `:`
4
- `)+r,i=n+1,n=t.indexOf(`
5
- `,i)}while(n!==-1);return o+=t.slice(i),o}var{stdout:Kd,stderr:Yd}=Gd,nc=Symbol("GENERATOR"),Wi=Symbol("STYLER"),ss=Symbol("IS_EMPTY"),Zd=["ansi","ansi","ansi256","ansi16m"],Hi=Object.create(null),iw=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Kd?Kd.level:0;t.level=e.level===void 0?r:e.level};var ow=t=>{let e=(...r)=>r.join(" ");return iw(e,t),Object.setPrototypeOf(e,as.prototype),e};function as(t){return ow(t)}Object.setPrototypeOf(as.prototype,Function.prototype);for(let[t,e]of Object.entries(yr))Hi[t]={get(){let r=da(this,oc(e.open,e.close,this[Wi]),this[ss]);return Object.defineProperty(this,t,{value:r}),r}};Hi.visible={get(){let t=da(this,this[Wi],!0);return Object.defineProperty(this,"visible",{value:t}),t}};var ic=(t,e,r,...n)=>t==="rgb"?e==="ansi16m"?yr[r].ansi16m(...n):e==="ansi256"?yr[r].ansi256(yr.rgbToAnsi256(...n)):yr[r].ansi(yr.rgbToAnsi(...n)):t==="hex"?ic("rgb",e,r,...yr.hexToRgb(...n)):yr[r][t](...n),sw=["rgb","hex","ansi256"];for(let t of sw){Hi[t]={get(){let{level:r}=this;return function(...n){let i=oc(ic(t,Zd[r],"color",...n),yr.color.close,this[Wi]);return da(this,i,this[ss])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);Hi[e]={get(){let{level:r}=this;return function(...n){let i=oc(ic(t,Zd[r],"bgColor",...n),yr.bgColor.close,this[Wi]);return da(this,i,this[ss])}}}}var aw=Object.defineProperties(()=>{},{...Hi,level:{enumerable:!0,get(){return this[nc].level},set(t){this[nc].level=t}}}),oc=(t,e,r)=>{let n,i;return r===void 0?(n=t,i=e):(n=r.openAll+t,i=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:i,parent:r}},da=(t,e,r)=>{let n=(...i)=>uw(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,aw),n[nc]=t,n[Wi]=e,n[ss]=r,n},uw=(t,e)=>{if(t.level<=0||!e)return t[ss]?"":e;let r=t[Wi];if(r===void 0)return e;let{openAll:n,closeAll:i}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=Wd(e,r.close,r.open),r=r.parent;let o=e.indexOf(`
6
- `);return o!==-1&&(e=Hd(e,i,n,o)),n+e+i};Object.defineProperties(as.prototype,Hi);var lw=as(),OM=as({level:Yd?Yd.level:0});var St=lw;var Xd=t=>Number.isFinite(t)?t:0;function cw(t){return{days:Math.trunc(t/864e5),hours:Math.trunc(t/36e5%24),minutes:Math.trunc(t/6e4%60),seconds:Math.trunc(t/1e3%60),milliseconds:Math.trunc(t%1e3),microseconds:Math.trunc(Xd(t*1e3)%1e3),nanoseconds:Math.trunc(Xd(t*1e6)%1e3)}}function fw(t){return{days:t/86400000n,hours:t/3600000n%24n,minutes:t/60000n%60n,seconds:t/1000n%60n,milliseconds:t%1000n,microseconds:0n,nanoseconds:0n}}function sc(t){switch(typeof t){case"number":{if(Number.isFinite(t))return cw(t);break}case"bigint":return fw(t)}throw new TypeError("Expected a finite number or bigint")}var pw=t=>t===0||t===0n,dw=(t,e)=>e===1||e===1n?t:`${t}s`,hw=1e-7,mw=24n*60n*60n*1000n;function Kr(t,e){let r=typeof t=="bigint";if(!r&&!Number.isFinite(t))throw new TypeError("Expected a finite number or bigint");e={...e};let n=t<0?"-":"";t=t<0?-t:t,e.colonNotation&&(e.compact=!1,e.formatSubMilliseconds=!1,e.separateMilliseconds=!1,e.verbose=!1),e.compact&&(e.unitCount=1,e.secondsDecimalDigits=0,e.millisecondsDecimalDigits=0);let i=[],o=(c,f)=>{let p=Math.floor(c*10**f+hw);return(Math.round(p)/10**f).toFixed(f)},s=(c,f,p,d)=>{if(!((i.length===0||!e.colonNotation)&&pw(c)&&!(e.colonNotation&&p==="m"))){if(d??=String(c),e.colonNotation){let m=d.includes(".")?d.split(".")[0].length:d.length,y=i.length>0?2:1;d="0".repeat(Math.max(0,y-m))+d}else d+=e.verbose?" "+dw(f,c):p;i.push(d)}},a=sc(t),u=BigInt(a.days);if(e.hideYearAndDays?s(BigInt(u)*24n+BigInt(a.hours),"hour","h"):(e.hideYear?s(u,"day","d"):(s(u/365n,"year","y"),s(u%365n,"day","d")),s(Number(a.hours),"hour","h")),s(Number(a.minutes),"minute","m"),!e.hideSeconds)if(e.separateMilliseconds||e.formatSubMilliseconds||!e.colonNotation&&t<1e3){let c=Number(a.seconds),f=Number(a.milliseconds),p=Number(a.microseconds),d=Number(a.nanoseconds);if(s(c,"second","s"),e.formatSubMilliseconds)s(f,"millisecond","ms"),s(p,"microsecond","\xB5s"),s(d,"nanosecond","ns");else{let m=f+p/1e3+d/1e6,y=typeof e.millisecondsDecimalDigits=="number"?e.millisecondsDecimalDigits:0,g=m>=1?Math.round(m):Math.ceil(m),b=y?m.toFixed(y):g;s(Number.parseFloat(b),"millisecond","ms",b)}}else{let c=(r?Number(t%mw):t)/1e3%60,f=typeof e.secondsDecimalDigits=="number"?e.secondsDecimalDigits:1,p=o(c,f),d=e.keepDecimalsOnWholeSeconds?p:p.replace(/\.0+$/,"");s(Number.parseFloat(d),"second","s",d)}if(i.length===0)return n+"0"+(e.verbose?" milliseconds":"ms");let l=e.colonNotation?":":" ";return typeof e.unitCount=="number"&&(i=i.slice(0,Math.max(e.unitCount,1))),n+i.join(l)}import{getMdatReports as xM,log as gt,reporterMdat as ts}from"remark-mdat";import Jd from"node:fs";import Qd from"node:path";import{VFile as gw}from"vfile";function ac(t,e,r){let n=uc(t);if(!r&&typeof e=="function"&&(r=e,e=void 0),!r)return new Promise(o);o(i,r);function i(s){r(void 0,s)}function o(s,a){let u;try{u=Qd.resolve(n.cwd,n.path)}catch(c){return a(c)}Jd.readFile(u,e,l);function l(c,f){c?a(c):(n.value=f,s(n))}}}function uc(t){return typeof t=="string"||t instanceof URL?t={path:t}:yw(t)&&(t={path:new TextDecoder().decode(t)}),xw(t)?t:new gw(t)}function pn(t,e,r){let n=uc(t);if(!r&&typeof e=="function"&&(r=e,e=void 0),!r)return new Promise(o);o(i,r);function i(s){r(void 0,s)}function o(s,a){let u;try{u=Qd.resolve(n.cwd,n.path)}catch(c){return a(c)}Jd.writeFile(u,n.value||"",e||void 0,l);function l(c){c?a(c):s(n)}}}function xw(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function yw(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}import{notStrictEqual as qw,strictEqual as Vw}from"assert";var bw={right:kw,center:Tw},Ew=0,ha=1,Aw=2,ma=3,lc=class{constructor(e){var r;this.width=e.width,this.wrap=(r=e.wrap)!==null&&r!==void 0?r:!0,this.rows=[]}span(...e){let r=this.div(...e);r.span=!0}resetOutput(){this.rows=[]}div(...e){if(e.length===0&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...e)&&typeof e[0]=="string")return this.applyLayoutDSL(e[0]);let r=e.map(n=>typeof n=="string"?this.colFromString(n):n);return this.rows.push(r),r}shouldApplyLayoutDSL(...e){return e.length===1&&typeof e[0]=="string"&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){let r=e.split(`
7
- `).map(i=>i.split(" ")),n=0;return r.forEach(i=>{i.length>1&&Zt.stringWidth(i[0])>n&&(n=Math.min(Math.floor(this.width*.5),Zt.stringWidth(i[0])))}),r.forEach(i=>{this.div(...i.map((o,s)=>({text:o.trim(),padding:this.measurePadding(o),width:s===0&&i.length>1?n:void 0})))}),this.rows[this.rows.length-1]}colFromString(e){return{text:e,padding:this.measurePadding(e)}}measurePadding(e){let r=Zt.stripAnsi(e);return[0,r.match(/\s*$/)[0].length,0,r.match(/^\s*/)[0].length]}toString(){let e=[];return this.rows.forEach(r=>{this.rowToString(r,e)}),e.filter(r=>!r.hidden).map(r=>r.text).join(`
8
- `)}rowToString(e,r){return this.rasterize(e).forEach((n,i)=>{let o="";n.forEach((s,a)=>{let{width:u}=e[a],l=this.negatePadding(e[a]),c=s;if(l>Zt.stringWidth(s)&&(c+=" ".repeat(l-Zt.stringWidth(s))),e[a].align&&e[a].align!=="left"&&this.wrap){let p=bw[e[a].align];c=p(c,l),Zt.stringWidth(c)<l&&(c+=" ".repeat((u||0)-Zt.stringWidth(c)-1))}let f=e[a].padding||[0,0,0,0];f[ma]&&(o+=" ".repeat(f[ma])),o+=eh(e[a],c,"| "),o+=c,o+=eh(e[a],c," |"),f[ha]&&(o+=" ".repeat(f[ha])),i===0&&r.length>0&&(o=this.renderInline(o,r[r.length-1]))}),r.push({text:o.replace(/ +$/,""),span:e.span})}),r}renderInline(e,r){let n=e.match(/^ */),i=n?n[0].length:0,o=r.text,s=Zt.stringWidth(o.trimRight());return r.span?this.wrap?i<s?e:(r.hidden=!0,o.trimRight()+" ".repeat(i-s)+e.trimLeft()):(r.hidden=!0,o+e):e}rasterize(e){let r=[],n=this.columnWidths(e),i;return e.forEach((o,s)=>{o.width=n[s],this.wrap?i=Zt.wrap(o.text,this.negatePadding(o),{hard:!0}).split(`
2
+ var kk=Object.create;var Zl=Object.defineProperty;var wk=Object.getOwnPropertyDescriptor;var Ck=Object.getOwnPropertyNames;var Tk=Object.getPrototypeOf,_k=Object.prototype.hasOwnProperty;var Er=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var sa=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Od=(t,e)=>{for(var r in e)Zl(t,r,{get:e[r],enumerable:!0})},Sk=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ck(e))!_k.call(t,i)&&i!==r&&Zl(t,i,{get:()=>e[i],enumerable:!(n=wk(e,i))||n.enumerable});return t};var ns=(t,e,r)=>(r=t!=null?kk(Tk(t)):{},Sk(e||!t||!t.__esModule?Zl(r,"default",{value:t,enumerable:!0}):r,t));var la=sa((VL,Xl)=>{"use strict";var ua=process||{},vd=ua.argv||[],aa=ua.env||{},Ik=!(aa.NO_COLOR||vd.includes("--no-color"))&&(!!aa.FORCE_COLOR||vd.includes("--color")||ua.platform==="win32"||(ua.stdout||{}).isTTY&&aa.TERM!=="dumb"||!!aa.CI),Ok=(t,e,r=t)=>n=>{let i=""+n,o=i.indexOf(e,t.length);return~o?t+vk(i,e,r,o)+e:t+i+e},vk=(t,e,r,n)=>{let i="",o=0;do i+=t.substring(o,n)+r,o=n+e.length,n=t.indexOf(e,o);while(~n);return i+t.substring(o)},Dd=(t=Ik)=>{let e=t?Ok:()=>String;return{isColorSupported:t,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};Xl.exports=Dd();Xl.exports.createColors=Dd});var Mh=sa((nj,Pw)=>{Pw.exports={addendum:"addenda",aircraft:"aircraft",alga:"algae",alumna:"alumnae",alumnus:"alumni",alveolus:"alveoli",amoeba:"amoebae",analysis:"analyses",antenna:"antennae",antithesis:"antitheses",apex:"apices",appendix:"appendices",automaton:"automata",axis:"axes",bacillus:"bacilli",bacterium:"bacteria",baculum:"bacula",barracks:"barracks",basis:"bases",beau:"beaux",bison:"bison",buffalo:"buffalo",bureau:"bureaus",cactus:"cacti",calf:"calves",carcinoma:"carcinomata",carp:"carp",census:"censuses",chassis:"chassis",cherub:"cherubim",child:"children",ch\u00E2teau:"ch\xE2teaus",cloaca:"cloacae",cod:"cod",codex:"codices",concerto:"concerti",consortium:"consortia",corpus:"corpora",crisis:"crises",criterion:"criteria",curriculum:"curricula",cystoma:"cystomata",datum:"data",deer:"deer",diagnosis:"diagnoses",die:"dice",dwarf:"dwarfs",echo:"echoes",elf:"elves",elk:"elk",ellipsis:"ellipses",embargo:"embargoes",emphasis:"emphases",erratum:"errata","faux pas":"faux pas",fez:"fezes",firmware:"firmware",fish:"fish",focus:"foci",foot:"feet",formula:"formulae",fungus:"fungi",gallows:"gallows",genus:"genera",glomerulus:"glomeruli",goose:"geese",graffito:"graffiti",grouse:"grouse",half:"halves",hamulus:"hamuli",hero:"heroes",hippopotamus:"hippopotami",hoof:"hooves",hovercraft:"hovercraft",hypothesis:"hypotheses",iliac:"ilia",incubus:"incubi",index:"indices",interstitium:"interstitia",kakapo:"kakapo",knife:"knives",larva:"larvae",leaf:"leaves",libretto:"libretti",life:"lives",loaf:"loaves",loculus:"loculi",locus:"loci",louse:"lice",man:"men",matrix:"matrices",means:"means",measles:"measles",media:"media",medium:"media",memorandum:"memoranda",millennium:"millennia",minutia:"minutiae",moose:"moose",mouse:"mice",nebula:"nebulae",nemesis:"nemeses",neurosis:"neuroses",news:"news",nucleolus:"nucleoli",nucleus:"nuclei",oasis:"oases",occiput:"occipita",offspring:"offspring",omphalos:"omphaloi",opus:"opera",ovum:"ova",ox:"oxen",paralysis:"paralyses",parenthesis:"parentheses",person:"people",phenomenon:"phenomena",phylum:"phyla",pike:"pike",polyhedron:"polyhedra",potato:"potatoes",primus:"primi",prognosis:"prognoses",quiz:"quizzes",radius:"radii",referendum:"referenda",salmon:"salmon",scarf:"scarves",scrotum:"scrota",self:"selves",seminoma:"seminomata",series:"series",sheep:"sheep",shelf:"shelves",shrimp:"shrimp",simulacrum:"simulacra",soliloquy:"soliloquies",spacecraft:"spacecraft",species:"species",spectrum:"spectra",squid:"squid",stimulus:"stimuli",stratum:"strata",swine:"swine",syconium:"syconia",syllabus:"syllabi",symposium:"symposia",synopsis:"synopses",synthesis:"syntheses",tableau:"tableaus",testis:"testes",that:"those",thesis:"theses",thief:"thieves",this:"these",thrombus:"thrombi",tomato:"tomatoes",tooth:"teeth",torus:"tori",trout:"trout",tuna:"tuna",umbilicus:"umbilici",uterus:"uteri",vertebra:"vertebrae",vertex:"vertices",veto:"vetoes",vita:"vitae",vortex:"vortices",watercraft:"watercraft",wharf:"wharves",wife:"wives",wolf:"wolves",woman:"women"}});var jh=sa((ij,Bh)=>{"use strict";var Lw=Mh();Bh.exports=new Map(Object.entries(Lw))});var wg=sa((E3,kg)=>{"use strict";var iu=Object.prototype.hasOwnProperty,Ag=Object.prototype.toString,mg=Object.defineProperty,gg=Object.getOwnPropertyDescriptor,xg=function(e){return typeof Array.isArray=="function"?Array.isArray(e):Ag.call(e)==="[object Array]"},yg=function(e){if(!e||Ag.call(e)!=="[object Object]")return!1;var r=iu.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&iu.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;var i;for(i in e);return typeof i>"u"||iu.call(e,i)},bg=function(e,r){mg&&r.name==="__proto__"?mg(e,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):e[r.name]=r.newValue},Eg=function(e,r){if(r==="__proto__")if(iu.call(e,r)){if(gg)return gg(e,r).value}else return;return e[r]};kg.exports=function t(){var e,r,n,i,o,s,a=arguments[0],u=1,l=arguments.length,c=!1;for(typeof a=="boolean"&&(c=a,a=arguments[1]||{},u=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});u<l;++u)if(e=arguments[u],e!=null)for(r in e)n=Eg(a,r),i=Eg(e,r),a!==i&&(c&&i&&(yg(i)||(o=xg(i)))?(o?(o=!1,s=n&&xg(n)?n:[]):s=n&&yg(n)?n:{},bg(a,{name:r,newValue:t(c,s,i)})):typeof i<"u"&&bg(a,{name:r,newValue:i}));return a}});var es=ns(la(),1);var Rd=t=>Number.isFinite(t)?t:0;function Dk(t){return{days:Math.trunc(t/864e5),hours:Math.trunc(t/36e5%24),minutes:Math.trunc(t/6e4%60),seconds:Math.trunc(t/1e3%60),milliseconds:Math.trunc(t%1e3),microseconds:Math.trunc(Rd(t*1e3)%1e3),nanoseconds:Math.trunc(Rd(t*1e6)%1e3)}}function Rk(t){return{days:t/86400000n,hours:t/3600000n%24n,minutes:t/60000n%60n,seconds:t/1000n%60n,milliseconds:t%1000n,microseconds:0n,nanoseconds:0n}}function Jl(t){switch(typeof t){case"number":{if(Number.isFinite(t))return Dk(t);break}case"bigint":return Rk(t)}throw new TypeError("Expected a finite number or bigint")}var Fk=t=>t===0||t===0n,Nk=(t,e)=>e===1||e===1n?t:`${t}s`,Pk=1e-7,Lk=24n*60n*60n*1000n;function Gr(t,e){let r=typeof t=="bigint";if(!r&&!Number.isFinite(t))throw new TypeError("Expected a finite number or bigint");e={...e};let n=t<0?"-":"";t=t<0?-t:t,e.colonNotation&&(e.compact=!1,e.formatSubMilliseconds=!1,e.separateMilliseconds=!1,e.verbose=!1),e.compact&&(e.unitCount=1,e.secondsDecimalDigits=0,e.millisecondsDecimalDigits=0);let i=[],o=(c,f)=>{let p=Math.floor(c*10**f+Pk);return(Math.round(p)/10**f).toFixed(f)},s=(c,f,p,d)=>{if(!((i.length===0||!e.colonNotation)&&Fk(c)&&!(e.colonNotation&&p==="m"))){if(d??=String(c),e.colonNotation){let m=d.includes(".")?d.split(".")[0].length:d.length,y=i.length>0?2:1;d="0".repeat(Math.max(0,y-m))+d}else d+=e.verbose?" "+Nk(f,c):p;i.push(d)}},a=Jl(t),u=BigInt(a.days);if(e.hideYearAndDays?s(BigInt(u)*24n+BigInt(a.hours),"hour","h"):(e.hideYear?s(u,"day","d"):(s(u/365n,"year","y"),s(u%365n,"day","d")),s(Number(a.hours),"hour","h")),s(Number(a.minutes),"minute","m"),!e.hideSeconds)if(e.separateMilliseconds||e.formatSubMilliseconds||!e.colonNotation&&t<1e3){let c=Number(a.seconds),f=Number(a.milliseconds),p=Number(a.microseconds),d=Number(a.nanoseconds);if(s(c,"second","s"),e.formatSubMilliseconds)s(f,"millisecond","ms"),s(p,"microsecond","\xB5s"),s(d,"nanosecond","ns");else{let m=f+p/1e3+d/1e6,y=typeof e.millisecondsDecimalDigits=="number"?e.millisecondsDecimalDigits:0,g=m>=1?Math.round(m):Math.ceil(m),b=y?m.toFixed(y):g;s(Number.parseFloat(b),"millisecond","ms",b)}}else{let c=(r?Number(t%Lk):t)/1e3%60,f=typeof e.secondsDecimalDigits=="number"?e.secondsDecimalDigits:1,p=o(c,f),d=e.keepDecimalsOnWholeSeconds?p:p.replace(/\.0+$/,"");s(Number.parseFloat(d),"second","s",d)}if(i.length===0)return n+"0"+(e.verbose?" milliseconds":"ms");let l=e.colonNotation?":":" ";return typeof e.unitCount=="number"&&(i=i.slice(0,Math.max(e.unitCount,1))),n+i.join(l)}import{getMdatReports as $L,log as ht,reporterMdat as Xo}from"remark-mdat";import Fd from"fs";import Nd from"path";import{VFile as Mk}from"vfile";function Ql(t,e,r){let n=ec(t);if(!r&&typeof e=="function"&&(r=e,e=void 0),!r)return new Promise(o);o(i,r);function i(s){r(void 0,s)}function o(s,a){let u;try{u=Nd.resolve(n.cwd,n.path)}catch(c){return a(c)}Fd.readFile(u,e,l);function l(c,f){c?a(c):(n.value=f,s(n))}}}function ec(t){return typeof t=="string"||t instanceof URL?t={path:t}:jk(t)&&(t={path:new TextDecoder().decode(t)}),Bk(t)?t:new Mk(t)}function ln(t,e,r){let n=ec(t);if(!r&&typeof e=="function"&&(r=e,e=void 0),!r)return new Promise(o);o(i,r);function i(s){r(void 0,s)}function o(s,a){let u;try{u=Nd.resolve(n.cwd,n.path)}catch(c){return a(c)}Fd.writeFile(u,n.value||"",e||void 0,l);function l(c){c?a(c):s(n)}}}function Bk(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function jk(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}import{notStrictEqual as cw,strictEqual as fw}from"assert";var Uk={right:Gk,center:Wk},zk=0,ca=1,$k=2,fa=3,tc=class{constructor(e){var r;this.width=e.width,this.wrap=(r=e.wrap)!==null&&r!==void 0?r:!0,this.rows=[]}span(...e){let r=this.div(...e);r.span=!0}resetOutput(){this.rows=[]}div(...e){if(e.length===0&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...e)&&typeof e[0]=="string")return this.applyLayoutDSL(e[0]);let r=e.map(n=>typeof n=="string"?this.colFromString(n):n);return this.rows.push(r),r}shouldApplyLayoutDSL(...e){return e.length===1&&typeof e[0]=="string"&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){let r=e.split(`
3
+ `).map(i=>i.split(" ")),n=0;return r.forEach(i=>{i.length>1&&Kt.stringWidth(i[0])>n&&(n=Math.min(Math.floor(this.width*.5),Kt.stringWidth(i[0])))}),r.forEach(i=>{this.div(...i.map((o,s)=>({text:o.trim(),padding:this.measurePadding(o),width:s===0&&i.length>1?n:void 0})))}),this.rows[this.rows.length-1]}colFromString(e){return{text:e,padding:this.measurePadding(e)}}measurePadding(e){let r=Kt.stripAnsi(e);return[0,r.match(/\s*$/)[0].length,0,r.match(/^\s*/)[0].length]}toString(){let e=[];return this.rows.forEach(r=>{this.rowToString(r,e)}),e.filter(r=>!r.hidden).map(r=>r.text).join(`
4
+ `)}rowToString(e,r){return this.rasterize(e).forEach((n,i)=>{let o="";n.forEach((s,a)=>{let{width:u}=e[a],l=this.negatePadding(e[a]),c=s;if(l>Kt.stringWidth(s)&&(c+=" ".repeat(l-Kt.stringWidth(s))),e[a].align&&e[a].align!=="left"&&this.wrap){let p=Uk[e[a].align];c=p(c,l),Kt.stringWidth(c)<l&&(c+=" ".repeat((u||0)-Kt.stringWidth(c)-1))}let f=e[a].padding||[0,0,0,0];f[fa]&&(o+=" ".repeat(f[fa])),o+=Pd(e[a],c,"| "),o+=c,o+=Pd(e[a],c," |"),f[ca]&&(o+=" ".repeat(f[ca])),i===0&&r.length>0&&(o=this.renderInline(o,r[r.length-1]))}),r.push({text:o.replace(/ +$/,""),span:e.span})}),r}renderInline(e,r){let n=e.match(/^ */),i=n?n[0].length:0,o=r.text,s=Kt.stringWidth(o.trimRight());return r.span?this.wrap?i<s?e:(r.hidden=!0,o.trimRight()+" ".repeat(i-s)+e.trimLeft()):(r.hidden=!0,o+e):e}rasterize(e){let r=[],n=this.columnWidths(e),i;return e.forEach((o,s)=>{o.width=n[s],this.wrap?i=Kt.wrap(o.text,this.negatePadding(o),{hard:!0}).split(`
9
5
  `):i=o.text.split(`
10
- `),o.border&&(i.unshift("."+"-".repeat(this.negatePadding(o)+2)+"."),i.push("'"+"-".repeat(this.negatePadding(o)+2)+"'")),o.padding&&(i.unshift(...new Array(o.padding[Ew]||0).fill("")),i.push(...new Array(o.padding[Aw]||0).fill(""))),i.forEach((a,u)=>{r[u]||r.push([]);let l=r[u];for(let c=0;c<s;c++)l[c]===void 0&&l.push("");l.push(a)})}),r}negatePadding(e){let r=e.width||0;return e.padding&&(r-=(e.padding[ma]||0)+(e.padding[ha]||0)),e.border&&(r-=4),r}columnWidths(e){if(!this.wrap)return e.map(s=>s.width||Zt.stringWidth(s.text));let r=e.length,n=this.width,i=e.map(s=>{if(s.width)return r--,n-=s.width,s.width}),o=r?Math.floor(n/r):0;return i.map((s,a)=>s===void 0?Math.max(o,Cw(e[a])):s)}};function eh(t,e,r){return t.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?r:" ":""}function Cw(t){let e=t.padding||[],r=1+(e[ma]||0)+(e[ha]||0);return t.border?r+4:r}function ww(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function kw(t,e){t=t.trim();let r=Zt.stringWidth(t);return r<e?" ".repeat(e-r)+t:t}function Tw(t,e){t=t.trim();let r=Zt.stringWidth(t);return r>=e?t:" ".repeat(e-r>>1)+t}var Zt;function th(t,e){return Zt=e,new lc({width:t?.width||ww(),wrap:t?.wrap})}var rh=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function cc(t){return t.replace(rh,"")}function nh(t,e){let[r,n]=t.match(rh)||["",""];t=cc(t);let i="";for(let o=0;o<t.length;o++)o!==0&&o%e===0&&(i+=`
11
- `),i+=t.charAt(o);return r&&n&&(i=`${r}${i}${n}`),i}function fc(t){return th(t,{stringWidth:e=>[...e].length,stripAnsi:cc,wrap:nh})}import{dirname as ih,resolve as oh}from"path";import{readdirSync as _w,statSync as Sw}from"fs";function sh(t,e){let r=oh(".",t),n;for(Sw(r).isDirectory()||(r=ih(r));;){if(n=e(r,_w(r)),n)return oh(r,n);if(r=ih(n=r),n===r)break}}import{inspect as Gw}from"util";import{readFileSync as Ww}from"fs";import{fileURLToPath as Hw}from"url";import{format as Ow}from"util";import{normalize as Dw,resolve as Rw}from"path";function Wn(t){if(t!==t.toLowerCase()&&t!==t.toUpperCase()||(t=t.toLowerCase()),t.indexOf("-")===-1&&t.indexOf("_")===-1)return t;{let r="",n=!1,i=t.match(/^-+/);for(let o=i?i[0].length:0;o<t.length;o++){let s=t.charAt(o);n&&(n=!1,s=s.toUpperCase()),o!==0&&(s==="-"||s==="_")?n=!0:s!=="-"&&s!=="_"&&(r+=s)}return r}}function ga(t,e){let r=t.toLowerCase();e=e||"-";let n="";for(let i=0;i<t.length;i++){let o=r.charAt(i),s=t.charAt(i);o!==s&&i>0?n+=`${e}${r.charAt(i)}`:n+=s}return n}function xa(t){return t==null?!1:typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^0[^.]/.test(t)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function ah(t){if(Array.isArray(t))return t.map(s=>typeof s!="string"?s+"":s);t=t.trim();let e=0,r=null,n=null,i=null,o=[];for(let s=0;s<t.length;s++){if(r=n,n=t.charAt(s),n===" "&&!i){r!==" "&&e++;continue}n===i?i=null:(n==="'"||n==='"')&&!i&&(i=n),o[e]||(o[e]=""),o[e]+=n}return o}var sr;(function(t){t.BOOLEAN="boolean",t.STRING="string",t.NUMBER="number",t.ARRAY="array"})(sr||(sr={}));var Yr,ya=class{constructor(e){Yr=e}parse(e,r){let n=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},r),i=ah(e),o=typeof e=="string",s=vw(Object.assign(Object.create(null),n.alias)),a=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},n.configuration),u=Object.assign(Object.create(null),n.default),l=n.configObjects||[],c=n.envPrefix,f=a["populate--"],p=f?"--":"_",d=Object.create(null),m=Object.create(null),y=n.__||Yr.format,g={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},b=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,w=new RegExp("^--"+a["negation-prefix"]+"(.+)");[].concat(n.array||[]).filter(Boolean).forEach(function(A){let k=typeof A=="object"?A.key:A,M=Object.keys(A).map(function(I){return{boolean:"bools",string:"strings",number:"numbers"}[I]}).filter(Boolean).pop();M&&(g[M][k]=!0),g.arrays[k]=!0,g.keys.push(k)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(A){g.bools[A]=!0,g.keys.push(A)}),[].concat(n.string||[]).filter(Boolean).forEach(function(A){g.strings[A]=!0,g.keys.push(A)}),[].concat(n.number||[]).filter(Boolean).forEach(function(A){g.numbers[A]=!0,g.keys.push(A)}),[].concat(n.count||[]).filter(Boolean).forEach(function(A){g.counts[A]=!0,g.keys.push(A)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(A){g.normalize[A]=!0,g.keys.push(A)}),typeof n.narg=="object"&&Object.entries(n.narg).forEach(([A,k])=>{typeof k=="number"&&(g.nargs[A]=k,g.keys.push(A))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([A,k])=>{typeof k=="function"&&(g.coercions[A]=k,g.keys.push(A))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(A){g.configs[A]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([A,k])=>{(typeof k=="boolean"||typeof k=="function")&&(g.configs[A]=k)})),E(n.key,s,n.default,g.arrays),Object.keys(u).forEach(function(A){(g.aliases[A]||[]).forEach(function(k){u[k]=u[A]})});let C=null;qt();let D=[],R=Object.assign(Object.create(null),{_:[]}),S={};for(let A=0;A<i.length;A++){let k=i[A],M=k.replace(/^-{3,}/,"---"),I,T,K,$,te,ft;if(k!=="--"&&/^-/.test(k)&&oe(k))de(k);else if(M.match(/^---+(=|$)/)){de(k);continue}else if(k.match(/^--.+=/)||!a["short-option-groups"]&&k.match(/^-.+=/))$=k.match(/^--?([^=]+)=([\s\S]*)$/),$!==null&&Array.isArray($)&&$.length>=3&&(W($[1],g.arrays)?A=be(A,$[1],i,$[2]):W($[1],g.nargs)!==!1?A=ye(A,$[1],i,$[2]):_($[1],$[2],!0));else if(k.match(w)&&a["boolean-negation"])$=k.match(w),$!==null&&Array.isArray($)&&$.length>=2&&(T=$[1],_(T,W(T,g.arrays)?[!1]:!1));else if(k.match(/^--.+/)||!a["short-option-groups"]&&k.match(/^-[^-]+/))$=k.match(/^--?(.+)/),$!==null&&Array.isArray($)&&$.length>=2&&(T=$[1],W(T,g.arrays)?A=be(A,T,i):W(T,g.nargs)!==!1?A=ye(A,T,i):(te=i[A+1],te!==void 0&&(!te.match(/^-/)||te.match(b))&&!W(T,g.bools)&&!W(T,g.counts)||/^(true|false)$/.test(te)?(_(T,te),A++):_(T,me(T))));else if(k.match(/^-.\..+=/))$=k.match(/^-([^=]+)=([\s\S]*)$/),$!==null&&Array.isArray($)&&$.length>=3&&_($[1],$[2]);else if(k.match(/^-.\..+/)&&!k.match(b))te=i[A+1],$=k.match(/^-(.\..+)/),$!==null&&Array.isArray($)&&$.length>=2&&(T=$[1],te!==void 0&&!te.match(/^-/)&&!W(T,g.bools)&&!W(T,g.counts)?(_(T,te),A++):_(T,me(T)));else if(k.match(/^-[^-]+/)&&!k.match(b)){K=k.slice(1,-1).split(""),I=!1;for(let Tt=0;Tt<K.length;Tt++){if(te=k.slice(Tt+2),K[Tt+1]&&K[Tt+1]==="="){ft=k.slice(Tt+3),T=K[Tt],W(T,g.arrays)?A=be(A,T,i,ft):W(T,g.nargs)!==!1?A=ye(A,T,i,ft):_(T,ft),I=!0;break}if(te==="-"){_(K[Tt],te);continue}if(/[A-Za-z]/.test(K[Tt])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(te)&&W(te,g.bools)===!1){_(K[Tt],te),I=!0;break}if(K[Tt+1]&&K[Tt+1].match(/\W/)){_(K[Tt],te),I=!0;break}else _(K[Tt],me(K[Tt]))}T=k.slice(-1)[0],!I&&T!=="-"&&(W(T,g.arrays)?A=be(A,T,i):W(T,g.nargs)!==!1?A=ye(A,T,i):(te=i[A+1],te!==void 0&&(!/^(-|--)[^-]/.test(te)||te.match(b))&&!W(T,g.bools)&&!W(T,g.counts)||/^(true|false)$/.test(te)?(_(T,te),A++):_(T,me(T))))}else if(k.match(/^-[0-9]$/)&&k.match(b)&&W(k.slice(1),g.bools))T=k.slice(1),_(T,me(T));else if(k==="--"){D=i.slice(A+1);break}else if(a["halt-at-non-option"]){D=i.slice(A);break}else de(k)}ee(R,!0),ee(R,!1),P(R),ae(),x(R,g.aliases,u,!0),_e(R),a["set-placeholder-key"]&&it(R),Object.keys(g.counts).forEach(function(A){Ue(R,A.split("."))||_(A,0)}),f&&D.length&&(R[p]=[]),D.forEach(function(A){R[p].push(A)}),a["camel-case-expansion"]&&a["strip-dashed"]&&Object.keys(R).filter(A=>A!=="--"&&A.includes("-")).forEach(A=>{delete R[A]}),a["strip-aliased"]&&[].concat(...Object.keys(s).map(A=>s[A])).forEach(A=>{a["camel-case-expansion"]&&A.includes("-")&&delete R[A.split(".").map(k=>Wn(k)).join(".")],delete R[A]});function de(A){let k=v("_",A);(typeof k=="string"||typeof k=="number")&&R._.push(k)}function ye(A,k,M,I){let T,K=W(k,g.nargs);if(K=typeof K!="number"||isNaN(K)?1:K,K===0)return ze(I)||(C=Error(y("Argument unexpected for: %s",k))),_(k,me(k)),A;let $=ze(I)?0:1;if(a["nargs-eats-options"])M.length-(A+1)+$<K&&(C=Error(y("Not enough arguments following: %s",k))),$=K;else{for(T=A+1;T<M.length&&(!M[T].match(/^-[^0-9]/)||M[T].match(b)||oe(M[T]));T++)$++;$<K&&(C=Error(y("Not enough arguments following: %s",k)))}let te=Math.min($,K);for(!ze(I)&&te>0&&(_(k,I),te--),T=A+1;T<te+A+1;T++)_(k,M[T]);return A+te}function be(A,k,M,I){let T=[],K=I||M[A+1],$=W(k,g.nargs);if(W(k,g.bools)&&!/^(true|false)$/.test(K))T.push(!0);else if(ze(K)||ze(I)&&/^-/.test(K)&&!b.test(K)&&!oe(K)){if(u[k]!==void 0){let te=u[k];T=Array.isArray(te)?te:[te]}}else{ze(I)||T.push(F(k,I,!0));for(let te=A+1;te<M.length&&!(!a["greedy-arrays"]&&T.length>0||$&&typeof $=="number"&&T.length>=$||(K=M[te],/^-/.test(K)&&!b.test(K)&&!oe(K)));te++)A=te,T.push(F(k,K,o))}return typeof $=="number"&&($&&T.length<$||isNaN($)&&T.length===0)&&(C=Error(y("Not enough arguments following: %s",k))),_(k,T),A}function _(A,k,M=o){if(/-/.test(A)&&a["camel-case-expansion"]){let K=A.split(".").map(function($){return Wn($)}).join(".");L(A,K)}let I=F(A,k,M),T=A.split(".");Qe(R,T,I),g.aliases[A]&&g.aliases[A].forEach(function(K){let $=K.split(".");Qe(R,$,I)}),T.length>1&&a["dot-notation"]&&(g.aliases[T[0]]||[]).forEach(function(K){let $=K.split("."),te=[].concat(T);te.shift(),$=$.concat(te),(g.aliases[A]||[]).includes($.join("."))||Qe(R,$,I)}),W(A,g.normalize)&&!W(A,g.arrays)&&[A].concat(g.aliases[A]||[]).forEach(function($){Object.defineProperty(S,$,{enumerable:!0,get(){return k},set(te){k=typeof te=="string"?Yr.normalize(te):te}})})}function L(A,k){g.aliases[A]&&g.aliases[A].length||(g.aliases[A]=[k],d[k]=!0),g.aliases[k]&&g.aliases[k].length||L(k,A)}function F(A,k,M){M&&(k=Iw(k)),(W(A,g.bools)||W(A,g.counts))&&typeof k=="string"&&(k=k==="true");let I=Array.isArray(k)?k.map(function(T){return v(A,T)}):v(A,k);return W(A,g.counts)&&(ze(I)||typeof I=="boolean")&&(I=pc()),W(A,g.normalize)&&W(A,g.arrays)&&(Array.isArray(k)?I=k.map(T=>Yr.normalize(T)):I=Yr.normalize(k)),I}function v(A,k){return!a["parse-positional-numbers"]&&A==="_"||!W(A,g.strings)&&!W(A,g.bools)&&!Array.isArray(k)&&(xa(k)&&a["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${k}`)))||!ze(k)&&W(A,g.numbers))&&(k=Number(k)),k}function P(A){let k=Object.create(null);x(k,g.aliases,u),Object.keys(g.configs).forEach(function(M){let I=A[M]||k[M];if(I)try{let T=null,K=Yr.resolve(Yr.cwd(),I),$=g.configs[M];if(typeof $=="function"){try{T=$(K)}catch(te){T=te}if(T instanceof Error){C=T;return}}else T=Yr.require(K);j(T)}catch(T){T.name==="PermissionDenied"?C=T:A[M]&&(C=Error(y("Invalid JSON config file: %s",I)))}})}function j(A,k){Object.keys(A).forEach(function(M){let I=A[M],T=k?k+"."+M:M;typeof I=="object"&&I!==null&&!Array.isArray(I)&&a["dot-notation"]?j(I,T):(!Ue(R,T.split("."))||W(T,g.arrays)&&a["combine-arrays"])&&_(T,I)})}function ae(){typeof l<"u"&&l.forEach(function(A){j(A)})}function ee(A,k){if(typeof c>"u")return;let M=typeof c=="string"?c:"",I=Yr.env();Object.keys(I).forEach(function(T){if(M===""||T.lastIndexOf(M,0)===0){let K=T.split("__").map(function($,te){return te===0&&($=$.substring(M.length)),Wn($)});(k&&g.configs[K.join(".")]||!k)&&!Ue(A,K)&&_(K.join("."),I[T])}})}function _e(A){let k,M=new Set;Object.keys(A).forEach(function(I){if(!M.has(I)&&(k=W(I,g.coercions),typeof k=="function"))try{let T=v(I,k(A[I]));[].concat(g.aliases[I]||[],I).forEach(K=>{M.add(K),A[K]=T})}catch(T){C=T}})}function it(A){return g.keys.forEach(k=>{~k.indexOf(".")||typeof A[k]>"u"&&(A[k]=void 0)}),A}function x(A,k,M,I=!1){Object.keys(M).forEach(function(T){Ue(A,T.split("."))||(Qe(A,T.split("."),M[T]),I&&(m[T]=!0),(k[T]||[]).forEach(function(K){Ue(A,K.split("."))||Qe(A,K.split("."),M[T])}))})}function Ue(A,k){let M=A;a["dot-notation"]||(k=[k.join(".")]),k.slice(0,-1).forEach(function(T){M=M[T]||{}});let I=k[k.length-1];return typeof M!="object"?!1:I in M}function Qe(A,k,M){let I=A;a["dot-notation"]||(k=[k.join(".")]),k.slice(0,-1).forEach(function(ft){ft=uh(ft),typeof I=="object"&&I[ft]===void 0&&(I[ft]={}),typeof I[ft]!="object"||Array.isArray(I[ft])?(Array.isArray(I[ft])?I[ft].push({}):I[ft]=[I[ft],{}],I=I[ft][I[ft].length-1]):I=I[ft]});let T=uh(k[k.length-1]),K=W(k.join("."),g.arrays),$=Array.isArray(M),te=a["duplicate-arguments-array"];!te&&W(T,g.nargs)&&(te=!0,(!ze(I[T])&&g.nargs[T]===1||Array.isArray(I[T])&&I[T].length===g.nargs[T])&&(I[T]=void 0)),M===pc()?I[T]=pc(I[T]):Array.isArray(I[T])?te&&K&&$?I[T]=a["flatten-duplicate-arrays"]?I[T].concat(M):(Array.isArray(I[T][0])?I[T]:[I[T]]).concat([M]):!te&&!!K==!!$?I[T]=M:I[T]=I[T].concat([M]):I[T]===void 0&&K?I[T]=$?M:[M]:te&&!(I[T]===void 0||W(T,g.counts)||W(T,g.bools))?I[T]=[I[T],M]:I[T]=M}function E(...A){A.forEach(function(k){Object.keys(k||{}).forEach(function(M){g.aliases[M]||(g.aliases[M]=[].concat(s[M]||[]),g.aliases[M].concat(M).forEach(function(I){if(/-/.test(I)&&a["camel-case-expansion"]){let T=Wn(I);T!==M&&g.aliases[M].indexOf(T)===-1&&(g.aliases[M].push(T),d[T]=!0)}}),g.aliases[M].concat(M).forEach(function(I){if(I.length>1&&/[A-Z]/.test(I)&&a["camel-case-expansion"]){let T=ga(I,"-");T!==M&&g.aliases[M].indexOf(T)===-1&&(g.aliases[M].push(T),d[T]=!0)}}),g.aliases[M].forEach(function(I){g.aliases[I]=[M].concat(g.aliases[M].filter(function(T){return I!==T}))}))})})}function W(A,k){let M=[].concat(g.aliases[A]||[],A),I=Object.keys(k),T=M.find(K=>I.includes(K));return T?k[T]:!1}function Ye(A){let k=Object.keys(g);return[].concat(k.map(I=>g[I])).some(function(I){return Array.isArray(I)?I.includes(A):I[A]})}function ne(A,...k){return[].concat(...k).some(function(I){let T=A.match(I);return T&&Ye(T[1])})}function he(A){if(A.match(b)||!A.match(/^-[^-]+/))return!1;let k=!0,M,I=A.slice(1).split("");for(let T=0;T<I.length;T++){if(M=A.slice(T+2),!Ye(I[T])){k=!1;break}if(I[T+1]&&I[T+1]==="="||M==="-"||/[A-Za-z]/.test(I[T])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(M)||I[T+1]&&I[T+1].match(/\W/))break}return k}function oe(A){return a["unknown-options-as-args"]&&ce(A)}function ce(A){return A=A.replace(/^-{3,}/,"--"),A.match(b)||he(A)?!1:!ne(A,/^-+([^=]+?)=[\s\S]*$/,w,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function me(A){return!W(A,g.bools)&&!W(A,g.counts)&&`${A}`in u?u[A]:we(Fe(A))}function we(A){return{[sr.BOOLEAN]:!0,[sr.STRING]:"",[sr.NUMBER]:void 0,[sr.ARRAY]:[]}[A]}function Fe(A){let k=sr.BOOLEAN;return W(A,g.strings)?k=sr.STRING:W(A,g.numbers)?k=sr.NUMBER:W(A,g.bools)?k=sr.BOOLEAN:W(A,g.arrays)&&(k=sr.ARRAY),k}function ze(A){return A===void 0}function qt(){Object.keys(g.counts).find(A=>W(A,g.arrays)?(C=Error(y("Invalid configuration: %s, opts.count excludes opts.array.",A)),!0):W(A,g.nargs)?(C=Error(y("Invalid configuration: %s, opts.count excludes opts.narg.",A)),!0):!1)}return{aliases:Object.assign({},g.aliases),argv:Object.assign(S,R),configuration:a,defaulted:Object.assign({},m),error:C,newAliases:Object.assign({},d)}}};function vw(t){let e=[],r=Object.create(null),n=!0;for(Object.keys(t).forEach(function(i){e.push([].concat(t[i],i))});n;){n=!1;for(let i=0;i<e.length;i++)for(let o=i+1;o<e.length;o++)if(e[i].filter(function(a){return e[o].indexOf(a)!==-1}).length){e[i]=e[i].concat(e[o]),e.splice(o,1),n=!0;break}}return e.forEach(function(i){i=i.filter(function(s,a,u){return u.indexOf(s)===a});let o=i.pop();o!==void 0&&typeof o=="string"&&(r[o]=i)}),r}function pc(t){return t!==void 0?t+1:1}function uh(t){return t==="__proto__"?"___proto___":t}function Iw(t){return typeof t=="string"&&(t[0]==="'"||t[0]==='"')&&t[t.length-1]===t[0]?t.substring(1,t.length-1):t}import{readFileSync as Fw}from"fs";var dc,hc,mc,lh=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,ch=(hc=(dc=process==null?void 0:process.versions)===null||dc===void 0?void 0:dc.node)!==null&&hc!==void 0?hc:(mc=process==null?void 0:process.version)===null||mc===void 0?void 0:mc.slice(1);if(ch&&Number(ch.match(/^([^.]+)/)[1])<lh)throw Error(`yargs parser supports a minimum Node.js version of ${lh}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);var Nw=process?process.env:{},fh=new ya({cwd:process.cwd,env:()=>Nw,format:Ow,normalize:Dw,resolve:Rw,require:t=>{if(typeof Tr<"u")return Tr(t);if(t.match(/\.json$/))return JSON.parse(Fw(t,"utf8"));throw Error("only .json config files are supported in ESM")}}),us=function(e,r){return fh.parse(e.slice(),r).argv};us.detailed=function(t,e){return fh.parse(t.slice(),e)};us.camelCase=Wn;us.decamelize=ga;us.looksLikeNumber=xa;var gc=us;import{basename as Kw,dirname as Yw,extname as Zw,relative as Xw,resolve as xh}from"path";function ph(){return Pw()?0:1}function Pw(){return Lw()&&!process.defaultApp}function Lw(){return!!process.versions.electron}function xc(t){return t.slice(ph()+1)}function dh(){return process.argv[ph()]}var $e=class t extends Error{constructor(e){super(e||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}};import{readFileSync as Mw,statSync as Bw,writeFile as jw}from"fs";import{format as Uw}from"util";import{resolve as zw}from"path";var hh={fs:{readFileSync:Mw,writeFile:jw},format:Uw,resolve:zw,exists:t=>{try{return Bw(t).isFile()}catch{return!1}}};var br,yc=class{constructor(e){e=e||{},this.directory=e.directory||"./locales",this.updateFiles=typeof e.updateFiles=="boolean"?e.updateFiles:!0,this.locale=e.locale||"en",this.fallbackToLanguage=typeof e.fallbackToLanguage=="boolean"?e.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let r=e.shift(),n=function(){};return typeof e[e.length-1]=="function"&&(n=e.pop()),n=n||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]=r,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),br.format.apply(br.format,[this.cache[this.locale][r]||r].concat(e))}__n(){let e=Array.prototype.slice.call(arguments),r=e.shift(),n=e.shift(),i=e.shift(),o=function(){};typeof e[e.length-1]=="function"&&(o=e.pop()),this.cache[this.locale]||this._readLocaleFile();let s=i===1?r:n;this.cache[this.locale][r]&&(s=this.cache[this.locale][r][i===1?"one":"other"]),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]={one:r,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:o})):o();let a=[s];return~s.indexOf("%d")&&a.push(i),br.format.apply(br.format,a.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this.cache[this.locale][r]=e[r])}_taggedLiteral(e,...r){let n="";return e.forEach(function(i,o){let s=r[o+1];n+=i,typeof s<"u"&&(n+="%s")}),this.__.apply(this,[n].concat([].slice.call(r,1)))}_enqueueWrite(e){this.writeQueue.push(e),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let e=this,r=this.writeQueue[0],n=r.directory,i=r.locale,o=r.cb,s=this._resolveLocaleFile(n,i),a=JSON.stringify(this.cache[i],null,2);br.fs.writeFile(s,a,"utf-8",function(u){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),o(u)})}_readLocaleFile(){let e={},r=this._resolveLocaleFile(this.directory,this.locale);try{br.fs.readFileSync&&(e=JSON.parse(br.fs.readFileSync(r,"utf-8")))}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+r),n.code==="ENOENT")e={};else throw n}this.cache[this.locale]=e}_resolveLocaleFile(e,r){let n=br.resolve(e,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){let i=br.resolve(e,"./",r.split("_")[0]+".json");this._fileExistsSync(i)&&(n=i)}return n}_fileExistsSync(e){return br.exists(e)}};function mh(t,e){br=e;let r=new yc(t);return{__:r.__.bind(r),__n:r.__n.bind(r),setLocale:r.setLocale.bind(r),getLocale:r.getLocale.bind(r),updateLocale:r.updateLocale.bind(r),locale:r.locale}}var $w=t=>mh(t,hh),gh=$w;var Jw="require is not supported by ESM",yh="loading a directory of commands is not supported yet for ESM",ls;try{ls=Hw(import.meta.url)}catch{ls=process.cwd()}var Qw=ls.substring(0,ls.lastIndexOf("node_modules")),bc={assert:{notStrictEqual:qw,strictEqual:Vw},cliui:fc,findUp:sh,getEnv:t=>process.env[t],inspect:Gw,getCallerFile:()=>{throw new $e(yh)},getProcessArgvBin:dh,mainFilename:Qw||process.cwd(),Parser:gc,path:{basename:Kw,dirname:Yw,extname:Zw,relative:Xw,resolve:xh},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(t,e)=>process.emitWarning(t,e),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:Ww,require:()=>{throw new $e(Jw)},requireDirectory:()=>{throw new $e(yh)},stringWidth:t=>[...t].length,y18n:gh({directory:xh(ls,"../../../locales"),updateFiles:!1})};function Nt(t,e,r,n){r.assert.notStrictEqual(t,e,n)}function Ec(t,e){e.assert.strictEqual(typeof t,"string")}function Ki(t){return Object.keys(t)}function qe(t){return!!t&&!!t.then&&typeof t.then=="function"}function dn(t){let r=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,i=r.shift();if(!i)throw new Error(`No command found in: ${t}`);let o={cmd:i.replace(n,""),demanded:[],optional:[]};return r.forEach((s,a)=>{let u=!1;s=s.replace(/\s/g,""),/\.+[\]>]/.test(s)&&a===r.length-1&&(u=!0),/^\[/.test(s)?o.optional.push({cmd:s.replace(n,"").split("|"),variadic:u}):o.demanded.push({cmd:s.replace(n,"").split("|"),variadic:u})}),o}var ek=["first","second","third","fourth","fifth","sixth"];function H(t,e,r){function n(){return typeof t=="object"?[{demanded:[],optional:[]},t,e]:[dn(`cmd ${t}`),e,r]}try{let i=0,[o,s,a]=n(),u=[].slice.call(s);for(;u.length&&u[u.length-1]===void 0;)u.pop();let l=a||u.length;if(l<o.demanded.length)throw new $e(`Not enough arguments provided. Expected ${o.demanded.length} but received ${u.length}.`);let c=o.demanded.length+o.optional.length;if(l>c)throw new $e(`Too many arguments provided. Expected max ${c} but received ${l}.`);o.demanded.forEach(f=>{let p=u.shift(),d=bh(p);f.cmd.filter(y=>y===d||y==="*").length===0&&Eh(d,f.cmd,i),i+=1}),o.optional.forEach(f=>{if(u.length===0)return;let p=u.shift(),d=bh(p);f.cmd.filter(y=>y===d||y==="*").length===0&&Eh(d,f.cmd,i),i+=1})}catch(i){console.warn(i.stack)}}function bh(t){return Array.isArray(t)?"array":t===null?"null":typeof t}function Eh(t,e,r){throw new $e(`Invalid ${ek[r]||"manyith"} argument. Expected ${e.join(" or ")} but received ${t}.`)}var ba=class{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,r,n=!0,i=!1){if(H("<array|function> [boolean] [boolean] [boolean]",[e,r,n],arguments.length),Array.isArray(e)){for(let o=0;o<e.length;o++){if(typeof e[o]!="function")throw Error("middleware must be a function");let s=e[o];s.applyBeforeValidation=r,s.global=n}Array.prototype.push.apply(this.globalMiddleware,e)}else if(typeof e=="function"){let o=e;o.applyBeforeValidation=r,o.global=n,o.mutates=i,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,r){let n=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(i=>{let o=[...n[r]||[],r];return i.option?!o.includes(i.option):!0}),e.option=r,this.addMiddleware(e,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let e=this.frozens.pop();e!==void 0&&(this.globalMiddleware=e)}reset(){this.globalMiddleware=this.globalMiddleware.filter(e=>e.global)}};function Ah(t){return t?t.map(e=>(e.applyBeforeValidation=!1,e)):[]}function Hn(t,e,r,n){return r.reduce((i,o)=>{if(o.applyBeforeValidation!==n)return i;if(o.mutates){if(o.applied)return i;o.applied=!0}if(qe(i))return i.then(s=>Promise.all([s,o(s,e)])).then(([s,a])=>Object.assign(s,a));{let s=o(i,e);return qe(s)?s.then(a=>Object.assign(i,a)):Object.assign(i,s)}},t)}function Kn(t,e,r=n=>{throw n}){try{let n=tk(t)?t():t;return qe(n)?n.then(i=>e(i)):e(n)}catch(n){return r(n)}}function tk(t){return typeof t=="function"}function Ac(t){if(typeof Tr>"u")return null;for(let e=0,r=Object.keys(Tr.cache),n;e<r.length;e++)if(n=Tr.cache[r[e]],n.exports===t)return n;return null}var Yi=/(^\*)|(^\$0)/,Cc=class{constructor(e,r,n,i){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=i,this.usage=e,this.globalMiddleware=n,this.validation=r}addDirectory(e,r,n,i){i=i||{},typeof i.recurse!="boolean"&&(i.recurse=!1),Array.isArray(i.extensions)||(i.extensions=["js"]);let o=typeof i.visit=="function"?i.visit:s=>s;i.visit=(s,a,u)=>{let l=o(s,a,u);if(l){if(this.requireCache.has(a))return l;this.requireCache.add(a),this.addHandler(l)}return l},this.shim.requireDirectory({require:r,filename:n},e,i)}addHandler(e,r,n,i,o,s){let a=[],u=Ah(o);if(i=i||(()=>{}),Array.isArray(e))if(rk(e))[e,...a]=e;else for(let l of e)this.addHandler(l);else if(ik(e)){let l=Array.isArray(e.command)||typeof e.command=="string"?e.command:this.moduleName(e);e.aliases&&(l=[].concat(l).concat(e.aliases)),this.addHandler(l,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated);return}else if(Ch(n)){this.addHandler([e].concat(a),r,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof e=="string"){let l=dn(e);a=a.map(p=>dn(p).cmd);let c=!1,f=[l.cmd].concat(a).filter(p=>Yi.test(p)?(c=!0,!1):!0);f.length===0&&c&&f.push("$0"),c&&(l.cmd=f[0],a=f.slice(1),e=e.replace(Yi,l.cmd)),a.forEach(p=>{this.aliasMap[p]=l.cmd}),r!==!1&&this.usage.command(e,r,c,a,s),this.handlers[l.cmd]={original:e,description:r,handler:i,builder:n||{},middlewares:u,deprecated:s,demanded:l.demanded,optional:l.optional},c&&(this.defaultCommand=this.handlers[l.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(e,r,n,i,o,s){let a=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,u=r.getInternalMethods().getContext(),l=u.commands.slice(),c=!e;e&&(u.commands.push(e),u.fullCommands.push(a.original));let f=this.applyBuilderUpdateUsageAndParse(c,a,r,n.aliases,l,i,o,s);return qe(f)?f.then(p=>this.applyMiddlewareAndGetResult(c,a,p.innerArgv,u,o,p.aliases,r)):this.applyMiddlewareAndGetResult(c,a,f.innerArgv,u,o,f.aliases,r)}applyBuilderUpdateUsageAndParse(e,r,n,i,o,s,a,u){let l=r.builder,c=n;if(Ea(l)){n.getInternalMethods().getUsageInstance().freeze();let f=l(n.getInternalMethods().reset(i),u);if(qe(f))return f.then(p=>(c=kh(p)?p:n,this.parseAndUpdateUsage(e,r,c,o,s,a)))}else nk(l)&&(n.getInternalMethods().getUsageInstance().freeze(),c=n.getInternalMethods().reset(i),Object.keys(r.builder).forEach(f=>{c.option(f,l[f])}));return this.parseAndUpdateUsage(e,r,c,o,s,a)}parseAndUpdateUsage(e,r,n,i,o,s){e&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(i,r),r.description);let a=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,o,s);return qe(a)?a.then(u=>({aliases:n.parsed.aliases,innerArgv:u})):{aliases:n.parsed.aliases,innerArgv:a}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,r){let n=Yi.test(r.original)?r.original.replace(Yi,"").trim():r.original,i=e.filter(o=>!Yi.test(o));return i.push(n),`$0 ${i.join(" ")}`}handleValidationAndGetResult(e,r,n,i,o,s,a,u){if(!s.getInternalMethods().getHasOutput()){let l=s.getInternalMethods().runValidation(o,u,s.parsed.error,e);n=Kn(n,c=>(l(c),c))}if(r.handler&&!s.getInternalMethods().getHasOutput()){s.getInternalMethods().setHasOutput();let l=!!s.getOptions().configuration["populate--"];s.getInternalMethods().postProcess(n,l,!1,!1),n=Hn(n,s,a,!1),n=Kn(n,c=>{let f=r.handler(c);return qe(f)?f.then(()=>c):c}),e||s.getInternalMethods().getUsageInstance().cacheHelpMessage(),qe(n)&&!s.getInternalMethods().hasParseCallback()&&n.catch(c=>{try{s.getInternalMethods().getUsageInstance().fail(null,c)}catch{}})}return e||(i.commands.pop(),i.fullCommands.pop()),n}applyMiddlewareAndGetResult(e,r,n,i,o,s,a){let u={};if(o)return n;a.getInternalMethods().getHasOutput()||(u=this.populatePositionals(r,n,i,a));let l=this.globalMiddleware.getMiddleware().slice(0).concat(r.middlewares),c=Hn(n,a,l,!0);return qe(c)?c.then(f=>this.handleValidationAndGetResult(e,r,f,i,s,a,l,u)):this.handleValidationAndGetResult(e,r,c,i,s,a,l,u)}populatePositionals(e,r,n,i){r._=r._.slice(n.commands.length);let o=e.demanded.slice(0),s=e.optional.slice(0),a={};for(this.validation.positionalCount(o.length,r._.length);o.length;){let u=o.shift();this.populatePositional(u,r,a)}for(;s.length;){let u=s.shift();this.populatePositional(u,r,a)}return r._=n.commands.concat(r._.map(u=>""+u)),this.postProcessPositionals(r,a,this.cmdToParseOptions(e.original),i),a}populatePositional(e,r,n){let i=e.cmd[0];e.variadic?n[i]=r._.splice(0).map(String):r._.length&&(n[i]=[String(r._.shift())])}cmdToParseOptions(e){let r={array:[],default:{},alias:{},demand:{}},n=dn(e);return n.demanded.forEach(i=>{let[o,...s]=i.cmd;i.variadic&&(r.array.push(o),r.default[o]=[]),r.alias[o]=s,r.demand[o]=!0}),n.optional.forEach(i=>{let[o,...s]=i.cmd;i.variadic&&(r.array.push(o),r.default[o]=[]),r.alias[o]=s}),r}postProcessPositionals(e,r,n,i){let o=Object.assign({},i.getOptions());o.default=Object.assign(n.default,o.default);for(let l of Object.keys(n.alias))o.alias[l]=(o.alias[l]||[]).concat(n.alias[l]);o.array=o.array.concat(n.array),o.config={};let s=[];if(Object.keys(r).forEach(l=>{r[l].map(c=>{o.configuration["unknown-options-as-args"]&&(o.key[l]=!0),s.push(`--${l}`),s.push(c)})}),!s.length)return;let a=Object.assign({},o.configuration,{"populate--":!1}),u=this.shim.Parser.detailed(s,Object.assign({},o,{configuration:a}));if(u.error)i.getInternalMethods().getUsageInstance().fail(u.error.message,u.error);else{let l=Object.keys(r);Object.keys(r).forEach(c=>{l.push(...u.aliases[c])}),Object.keys(u.argv).forEach(c=>{l.includes(c)&&(r[c]||(r[c]=u.argv[c]),!this.isInConfigs(i,c)&&!this.isDefaulted(i,c)&&Object.prototype.hasOwnProperty.call(e,c)&&Object.prototype.hasOwnProperty.call(u.argv,c)&&(Array.isArray(e[c])||Array.isArray(u.argv[c]))?e[c]=[].concat(e[c],u.argv[c]):e[c]=u.argv[c])})}}isDefaulted(e,r){let{default:n}=e.getOptions();return Object.prototype.hasOwnProperty.call(n,r)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(r))}isInConfigs(e,r){let{configObjects:n}=e.getOptions();return n.some(i=>Object.prototype.hasOwnProperty.call(i,r))||n.some(i=>Object.prototype.hasOwnProperty.call(i,this.shim.Parser.camelCase(r)))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){let n=Yi.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");e.getInternalMethods().getUsageInstance().usage(n,this.defaultCommand.description)}let r=this.defaultCommand.builder;if(Ea(r))return r(e,!0);Ch(r)||Object.keys(r).forEach(n=>{e.option(n,r[n])})}moduleName(e){let r=Ac(e);if(!r)throw new Error(`No command name given for module: ${this.shim.inspect(e)}`);return this.commandFromFilename(r.filename)}commandFromFilename(e){return this.shim.path.basename(e,this.shim.path.extname(e))}extractDesc({describe:e,description:r,desc:n}){for(let i of[e,r,n]){if(typeof i=="string"||i===!1)return i;Nt(i,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let e=this.frozens.pop();Nt(e,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=e}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}};function wh(t,e,r,n){return new Cc(t,e,r,n)}function Ch(t){return typeof t=="object"&&!!t.builder&&typeof t.handler=="function"}function rk(t){return t.every(e=>typeof e=="string")}function Ea(t){return typeof t=="function"}function nk(t){return typeof t=="object"}function ik(t){return typeof t=="object"&&!Array.isArray(t)}function hn(t={},e=()=>!0){let r={};return Ki(t).forEach(n=>{e(n,t[n])&&(r[n]=t[n])}),r}function mn(t){typeof process>"u"||[process.stdout,process.stderr].forEach(e=>{let r=e;r._handle&&r.isTTY&&typeof r._handle.setBlocking=="function"&&r._handle.setBlocking(t)})}function ok(t){return typeof t=="boolean"}function _h(t,e){let r=e.y18n.__,n={},i=[];n.failFn=function(F){i.push(F)};let o=null,s=null,a=!0;n.showHelpOnFail=function(F=!0,v){let[P,j]=typeof F=="string"?[!0,F]:[F,v];return t.getInternalMethods().isGlobalContext()&&(s=j),o=j,a=P,n};let u=!1;n.fail=function(F,v){let P=t.getInternalMethods().getLoggerInstance();if(i.length)for(let j=i.length-1;j>=0;--j){let ae=i[j];if(ok(ae)){if(v)throw v;if(F)throw Error(F)}else ae(F,v,n)}else{if(t.getExitProcess()&&mn(!0),!u){u=!0,a&&(t.showHelp("error"),P.error()),(F||v)&&P.error(F||v);let j=o||s;j&&((F||v)&&P.error(""),P.error(j))}if(v=v||new $e(F),t.getExitProcess())return t.exit(1);if(t.getInternalMethods().hasParseCallback())return t.exit(1,v);throw v}};let l=[],c=!1;n.usage=(L,F)=>L===null?(c=!0,l=[],n):(c=!1,l.push([L,F||""]),n),n.getUsage=()=>l,n.getUsageDisabled=()=>c,n.getPositionalGroupName=()=>r("Positionals:");let f=[];n.example=(L,F)=>{f.push([L,F||""])};let p=[];n.command=function(F,v,P,j,ae=!1){P&&(p=p.map(ee=>(ee[2]=!1,ee))),p.push([F,v||"",P,j,ae])},n.getCommands=()=>p;let d={};n.describe=function(F,v){Array.isArray(F)?F.forEach(P=>{n.describe(P,v)}):typeof F=="object"?Object.keys(F).forEach(P=>{n.describe(P,F[P])}):d[F]=v},n.getDescriptions=()=>d;let m=[];n.epilog=L=>{m.push(L)};let y=!1,g;n.wrap=L=>{y=!0,g=L},n.getWrap=()=>e.getEnv("YARGS_DISABLE_WRAP")?null:(y||(g=ye(),y=!0),g);let b="__yargsString__:";n.deferY18nLookup=L=>b+L,n.help=function(){if(D)return D;C();let F=t.customScriptName?t.$0:e.path.basename(t.$0),v=t.getDemandedOptions(),P=t.getDemandedCommands(),j=t.getDeprecatedOptions(),ae=t.getGroups(),ee=t.getOptions(),_e=[];_e=_e.concat(Object.keys(d)),_e=_e.concat(Object.keys(v)),_e=_e.concat(Object.keys(P)),_e=_e.concat(Object.keys(ee.default)),_e=_e.filter(S),_e=Object.keys(_e.reduce((ne,he)=>(he!=="_"&&(ne[he]=!0),ne),{}));let it=n.getWrap(),x=e.cliui({width:it,wrap:!!it});if(!c){if(l.length)l.forEach(ne=>{x.div({text:`${ne[0].replace(/\$0/g,F)}`}),ne[1]&&x.div({text:`${ne[1]}`,padding:[1,0,0,0]})}),x.div();else if(p.length){let ne=null;P._?ne=`${F} <${r("command")}>
6
+ `),o.border&&(i.unshift("."+"-".repeat(this.negatePadding(o)+2)+"."),i.push("'"+"-".repeat(this.negatePadding(o)+2)+"'")),o.padding&&(i.unshift(...new Array(o.padding[zk]||0).fill("")),i.push(...new Array(o.padding[$k]||0).fill(""))),i.forEach((a,u)=>{r[u]||r.push([]);let l=r[u];for(let c=0;c<s;c++)l[c]===void 0&&l.push("");l.push(a)})}),r}negatePadding(e){let r=e.width||0;return e.padding&&(r-=(e.padding[fa]||0)+(e.padding[ca]||0)),e.border&&(r-=4),r}columnWidths(e){if(!this.wrap)return e.map(s=>s.width||Kt.stringWidth(s.text));let r=e.length,n=this.width,i=e.map(s=>{if(s.width)return r--,n-=s.width,s.width}),o=r?Math.floor(n/r):0;return i.map((s,a)=>s===void 0?Math.max(o,qk(e[a])):s)}};function Pd(t,e,r){return t.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?r:" ":""}function qk(t){let e=t.padding||[],r=1+(e[fa]||0)+(e[ca]||0);return t.border?r+4:r}function Vk(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function Gk(t,e){t=t.trim();let r=Kt.stringWidth(t);return r<e?" ".repeat(e-r)+t:t}function Wk(t,e){t=t.trim();let r=Kt.stringWidth(t);return r>=e?t:" ".repeat(e-r>>1)+t}var Kt;function Ld(t,e){return Kt=e,new tc({width:t?.width||Vk(),wrap:t?.wrap})}var Md=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function rc(t){return t.replace(Md,"")}function Bd(t,e){let[r,n]=t.match(Md)||["",""];t=rc(t);let i="";for(let o=0;o<t.length;o++)o!==0&&o%e===0&&(i+=`
7
+ `),i+=t.charAt(o);return r&&n&&(i=`${r}${i}${n}`),i}function nc(t){return Ld(t,{stringWidth:e=>[...e].length,stripAnsi:rc,wrap:Bd})}import{dirname as jd,resolve as Ud}from"path";import{readdirSync as Hk,statSync as Kk}from"fs";function zd(t,e){let r=Ud(".",t),n;for(Kk(r).isDirectory()||(r=jd(r));;){if(n=e(r,Hk(r)),n)return Ud(r,n);if(r=jd(n=r),n===r)break}}import{inspect as pw}from"util";import{readFileSync as dw}from"fs";import{fileURLToPath as hw}from"url";import{format as Xk}from"util";import{normalize as Jk,resolve as Qk}from"path";function Vn(t){if(t!==t.toLowerCase()&&t!==t.toUpperCase()||(t=t.toLowerCase()),t.indexOf("-")===-1&&t.indexOf("_")===-1)return t;{let r="",n=!1,i=t.match(/^-+/);for(let o=i?i[0].length:0;o<t.length;o++){let s=t.charAt(o);n&&(n=!1,s=s.toUpperCase()),o!==0&&(s==="-"||s==="_")?n=!0:s!=="-"&&s!=="_"&&(r+=s)}return r}}function pa(t,e){let r=t.toLowerCase();e=e||"-";let n="";for(let i=0;i<t.length;i++){let o=r.charAt(i),s=t.charAt(i);o!==s&&i>0?n+=`${e}${r.charAt(i)}`:n+=s}return n}function da(t){return t==null?!1:typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^0[^.]/.test(t)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function $d(t){if(Array.isArray(t))return t.map(s=>typeof s!="string"?s+"":s);t=t.trim();let e=0,r=null,n=null,i=null,o=[];for(let s=0;s<t.length;s++){if(r=n,n=t.charAt(s),n===" "&&!i){r!==" "&&e++;continue}n===i?i=null:(n==="'"||n==='"')&&!i&&(i=n),o[e]||(o[e]=""),o[e]+=n}return o}var tr;(function(t){t.BOOLEAN="boolean",t.STRING="string",t.NUMBER="number",t.ARRAY="array"})(tr||(tr={}));var Wr,ha=class{constructor(e){Wr=e}parse(e,r){let n=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},r),i=$d(e),o=typeof e=="string",s=Yk(Object.assign(Object.create(null),n.alias)),a=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},n.configuration),u=Object.assign(Object.create(null),n.default),l=n.configObjects||[],c=n.envPrefix,f=a["populate--"],p=f?"--":"_",d=Object.create(null),m=Object.create(null),y=n.__||Wr.format,g={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},b=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,w=new RegExp("^--"+a["negation-prefix"]+"(.+)");[].concat(n.array||[]).filter(Boolean).forEach(function(A){let C=typeof A=="object"?A.key:A,M=Object.keys(A).map(function(O){return{boolean:"bools",string:"strings",number:"numbers"}[O]}).filter(Boolean).pop();M&&(g[M][C]=!0),g.arrays[C]=!0,g.keys.push(C)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(A){g.bools[A]=!0,g.keys.push(A)}),[].concat(n.string||[]).filter(Boolean).forEach(function(A){g.strings[A]=!0,g.keys.push(A)}),[].concat(n.number||[]).filter(Boolean).forEach(function(A){g.numbers[A]=!0,g.keys.push(A)}),[].concat(n.count||[]).filter(Boolean).forEach(function(A){g.counts[A]=!0,g.keys.push(A)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(A){g.normalize[A]=!0,g.keys.push(A)}),typeof n.narg=="object"&&Object.entries(n.narg).forEach(([A,C])=>{typeof C=="number"&&(g.nargs[A]=C,g.keys.push(A))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([A,C])=>{typeof C=="function"&&(g.coercions[A]=C,g.keys.push(A))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(A){g.configs[A]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([A,C])=>{(typeof C=="boolean"||typeof C=="function")&&(g.configs[A]=C)})),E(n.key,s,n.default,g.arrays),Object.keys(u).forEach(function(A){(g.aliases[A]||[]).forEach(function(C){u[C]=u[A]})});let k=null;Ut();let D=[],R=Object.assign(Object.create(null),{_:[]}),S={};for(let A=0;A<i.length;A++){let C=i[A],M=C.replace(/^-{3,}/,"---"),O,T,Y,$,te,lt;if(C!=="--"&&/^-/.test(C)&&oe(C))de(C);else if(M.match(/^---+(=|$)/)){de(C);continue}else if(C.match(/^--.+=/)||!a["short-option-groups"]&&C.match(/^-.+=/))$=C.match(/^--?([^=]+)=([\s\S]*)$/),$!==null&&Array.isArray($)&&$.length>=3&&(W($[1],g.arrays)?A=be(A,$[1],i,$[2]):W($[1],g.nargs)!==!1?A=ye(A,$[1],i,$[2]):_($[1],$[2],!0));else if(C.match(w)&&a["boolean-negation"])$=C.match(w),$!==null&&Array.isArray($)&&$.length>=2&&(T=$[1],_(T,W(T,g.arrays)?[!1]:!1));else if(C.match(/^--.+/)||!a["short-option-groups"]&&C.match(/^-[^-]+/))$=C.match(/^--?(.+)/),$!==null&&Array.isArray($)&&$.length>=2&&(T=$[1],W(T,g.arrays)?A=be(A,T,i):W(T,g.nargs)!==!1?A=ye(A,T,i):(te=i[A+1],te!==void 0&&(!te.match(/^-/)||te.match(b))&&!W(T,g.bools)&&!W(T,g.counts)||/^(true|false)$/.test(te)?(_(T,te),A++):_(T,me(T))));else if(C.match(/^-.\..+=/))$=C.match(/^-([^=]+)=([\s\S]*)$/),$!==null&&Array.isArray($)&&$.length>=3&&_($[1],$[2]);else if(C.match(/^-.\..+/)&&!C.match(b))te=i[A+1],$=C.match(/^-(.\..+)/),$!==null&&Array.isArray($)&&$.length>=2&&(T=$[1],te!==void 0&&!te.match(/^-/)&&!W(T,g.bools)&&!W(T,g.counts)?(_(T,te),A++):_(T,me(T)));else if(C.match(/^-[^-]+/)&&!C.match(b)){Y=C.slice(1,-1).split(""),O=!1;for(let wt=0;wt<Y.length;wt++){if(te=C.slice(wt+2),Y[wt+1]&&Y[wt+1]==="="){lt=C.slice(wt+3),T=Y[wt],W(T,g.arrays)?A=be(A,T,i,lt):W(T,g.nargs)!==!1?A=ye(A,T,i,lt):_(T,lt),O=!0;break}if(te==="-"){_(Y[wt],te);continue}if(/[A-Za-z]/.test(Y[wt])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(te)&&W(te,g.bools)===!1){_(Y[wt],te),O=!0;break}if(Y[wt+1]&&Y[wt+1].match(/\W/)){_(Y[wt],te),O=!0;break}else _(Y[wt],me(Y[wt]))}T=C.slice(-1)[0],!O&&T!=="-"&&(W(T,g.arrays)?A=be(A,T,i):W(T,g.nargs)!==!1?A=ye(A,T,i):(te=i[A+1],te!==void 0&&(!/^(-|--)[^-]/.test(te)||te.match(b))&&!W(T,g.bools)&&!W(T,g.counts)||/^(true|false)$/.test(te)?(_(T,te),A++):_(T,me(T))))}else if(C.match(/^-[0-9]$/)&&C.match(b)&&W(C.slice(1),g.bools))T=C.slice(1),_(T,me(T));else if(C==="--"){D=i.slice(A+1);break}else if(a["halt-at-non-option"]){D=i.slice(A);break}else de(C)}ee(R,!0),ee(R,!1),P(R),ae(),x(R,g.aliases,u,!0),Se(R),a["set-placeholder-key"]&&rt(R),Object.keys(g.counts).forEach(function(A){Ue(R,A.split("."))||_(A,0)}),f&&D.length&&(R[p]=[]),D.forEach(function(A){R[p].push(A)}),a["camel-case-expansion"]&&a["strip-dashed"]&&Object.keys(R).filter(A=>A!=="--"&&A.includes("-")).forEach(A=>{delete R[A]}),a["strip-aliased"]&&[].concat(...Object.keys(s).map(A=>s[A])).forEach(A=>{a["camel-case-expansion"]&&A.includes("-")&&delete R[A.split(".").map(C=>Vn(C)).join(".")],delete R[A]});function de(A){let C=I("_",A);(typeof C=="string"||typeof C=="number")&&R._.push(C)}function ye(A,C,M,O){let T,Y=W(C,g.nargs);if(Y=typeof Y!="number"||isNaN(Y)?1:Y,Y===0)return ze(O)||(k=Error(y("Argument unexpected for: %s",C))),_(C,me(C)),A;let $=ze(O)?0:1;if(a["nargs-eats-options"])M.length-(A+1)+$<Y&&(k=Error(y("Not enough arguments following: %s",C))),$=Y;else{for(T=A+1;T<M.length&&(!M[T].match(/^-[^0-9]/)||M[T].match(b)||oe(M[T]));T++)$++;$<Y&&(k=Error(y("Not enough arguments following: %s",C)))}let te=Math.min($,Y);for(!ze(O)&&te>0&&(_(C,O),te--),T=A+1;T<te+A+1;T++)_(C,M[T]);return A+te}function be(A,C,M,O){let T=[],Y=O||M[A+1],$=W(C,g.nargs);if(W(C,g.bools)&&!/^(true|false)$/.test(Y))T.push(!0);else if(ze(Y)||ze(O)&&/^-/.test(Y)&&!b.test(Y)&&!oe(Y)){if(u[C]!==void 0){let te=u[C];T=Array.isArray(te)?te:[te]}}else{ze(O)||T.push(F(C,O,!0));for(let te=A+1;te<M.length&&!(!a["greedy-arrays"]&&T.length>0||$&&typeof $=="number"&&T.length>=$||(Y=M[te],/^-/.test(Y)&&!b.test(Y)&&!oe(Y)));te++)A=te,T.push(F(C,Y,o))}return typeof $=="number"&&($&&T.length<$||isNaN($)&&T.length===0)&&(k=Error(y("Not enough arguments following: %s",C))),_(C,T),A}function _(A,C,M=o){if(/-/.test(A)&&a["camel-case-expansion"]){let Y=A.split(".").map(function($){return Vn($)}).join(".");L(A,Y)}let O=F(A,C,M),T=A.split(".");Je(R,T,O),g.aliases[A]&&g.aliases[A].forEach(function(Y){let $=Y.split(".");Je(R,$,O)}),T.length>1&&a["dot-notation"]&&(g.aliases[T[0]]||[]).forEach(function(Y){let $=Y.split("."),te=[].concat(T);te.shift(),$=$.concat(te),(g.aliases[A]||[]).includes($.join("."))||Je(R,$,O)}),W(A,g.normalize)&&!W(A,g.arrays)&&[A].concat(g.aliases[A]||[]).forEach(function($){Object.defineProperty(S,$,{enumerable:!0,get(){return C},set(te){C=typeof te=="string"?Wr.normalize(te):te}})})}function L(A,C){g.aliases[A]&&g.aliases[A].length||(g.aliases[A]=[C],d[C]=!0),g.aliases[C]&&g.aliases[C].length||L(C,A)}function F(A,C,M){M&&(C=Zk(C)),(W(A,g.bools)||W(A,g.counts))&&typeof C=="string"&&(C=C==="true");let O=Array.isArray(C)?C.map(function(T){return I(A,T)}):I(A,C);return W(A,g.counts)&&(ze(O)||typeof O=="boolean")&&(O=ic()),W(A,g.normalize)&&W(A,g.arrays)&&(Array.isArray(C)?O=C.map(T=>Wr.normalize(T)):O=Wr.normalize(C)),O}function I(A,C){return!a["parse-positional-numbers"]&&A==="_"||!W(A,g.strings)&&!W(A,g.bools)&&!Array.isArray(C)&&(da(C)&&a["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${C}`)))||!ze(C)&&W(A,g.numbers))&&(C=Number(C)),C}function P(A){let C=Object.create(null);x(C,g.aliases,u),Object.keys(g.configs).forEach(function(M){let O=A[M]||C[M];if(O)try{let T=null,Y=Wr.resolve(Wr.cwd(),O),$=g.configs[M];if(typeof $=="function"){try{T=$(Y)}catch(te){T=te}if(T instanceof Error){k=T;return}}else T=Wr.require(Y);j(T)}catch(T){T.name==="PermissionDenied"?k=T:A[M]&&(k=Error(y("Invalid JSON config file: %s",O)))}})}function j(A,C){Object.keys(A).forEach(function(M){let O=A[M],T=C?C+"."+M:M;typeof O=="object"&&O!==null&&!Array.isArray(O)&&a["dot-notation"]?j(O,T):(!Ue(R,T.split("."))||W(T,g.arrays)&&a["combine-arrays"])&&_(T,O)})}function ae(){typeof l<"u"&&l.forEach(function(A){j(A)})}function ee(A,C){if(typeof c>"u")return;let M=typeof c=="string"?c:"",O=Wr.env();Object.keys(O).forEach(function(T){if(M===""||T.lastIndexOf(M,0)===0){let Y=T.split("__").map(function($,te){return te===0&&($=$.substring(M.length)),Vn($)});(C&&g.configs[Y.join(".")]||!C)&&!Ue(A,Y)&&_(Y.join("."),O[T])}})}function Se(A){let C,M=new Set;Object.keys(A).forEach(function(O){if(!M.has(O)&&(C=W(O,g.coercions),typeof C=="function"))try{let T=I(O,C(A[O]));[].concat(g.aliases[O]||[],O).forEach(Y=>{M.add(Y),A[Y]=T})}catch(T){k=T}})}function rt(A){return g.keys.forEach(C=>{~C.indexOf(".")||typeof A[C]>"u"&&(A[C]=void 0)}),A}function x(A,C,M,O=!1){Object.keys(M).forEach(function(T){Ue(A,T.split("."))||(Je(A,T.split("."),M[T]),O&&(m[T]=!0),(C[T]||[]).forEach(function(Y){Ue(A,Y.split("."))||Je(A,Y.split("."),M[T])}))})}function Ue(A,C){let M=A;a["dot-notation"]||(C=[C.join(".")]),C.slice(0,-1).forEach(function(T){M=M[T]||{}});let O=C[C.length-1];return typeof M!="object"?!1:O in M}function Je(A,C,M){let O=A;a["dot-notation"]||(C=[C.join(".")]),C.slice(0,-1).forEach(function(lt){lt=qd(lt),typeof O=="object"&&O[lt]===void 0&&(O[lt]={}),typeof O[lt]!="object"||Array.isArray(O[lt])?(Array.isArray(O[lt])?O[lt].push({}):O[lt]=[O[lt],{}],O=O[lt][O[lt].length-1]):O=O[lt]});let T=qd(C[C.length-1]),Y=W(C.join("."),g.arrays),$=Array.isArray(M),te=a["duplicate-arguments-array"];!te&&W(T,g.nargs)&&(te=!0,(!ze(O[T])&&g.nargs[T]===1||Array.isArray(O[T])&&O[T].length===g.nargs[T])&&(O[T]=void 0)),M===ic()?O[T]=ic(O[T]):Array.isArray(O[T])?te&&Y&&$?O[T]=a["flatten-duplicate-arrays"]?O[T].concat(M):(Array.isArray(O[T][0])?O[T]:[O[T]]).concat([M]):!te&&!!Y==!!$?O[T]=M:O[T]=O[T].concat([M]):O[T]===void 0&&Y?O[T]=$?M:[M]:te&&!(O[T]===void 0||W(T,g.counts)||W(T,g.bools))?O[T]=[O[T],M]:O[T]=M}function E(...A){A.forEach(function(C){Object.keys(C||{}).forEach(function(M){g.aliases[M]||(g.aliases[M]=[].concat(s[M]||[]),g.aliases[M].concat(M).forEach(function(O){if(/-/.test(O)&&a["camel-case-expansion"]){let T=Vn(O);T!==M&&g.aliases[M].indexOf(T)===-1&&(g.aliases[M].push(T),d[T]=!0)}}),g.aliases[M].concat(M).forEach(function(O){if(O.length>1&&/[A-Z]/.test(O)&&a["camel-case-expansion"]){let T=pa(O,"-");T!==M&&g.aliases[M].indexOf(T)===-1&&(g.aliases[M].push(T),d[T]=!0)}}),g.aliases[M].forEach(function(O){g.aliases[O]=[M].concat(g.aliases[M].filter(function(T){return O!==T}))}))})})}function W(A,C){let M=[].concat(g.aliases[A]||[],A),O=Object.keys(C),T=M.find(Y=>O.includes(Y));return T?C[T]:!1}function Ke(A){let C=Object.keys(g);return[].concat(C.map(O=>g[O])).some(function(O){return Array.isArray(O)?O.includes(A):O[A]})}function ne(A,...C){return[].concat(...C).some(function(O){let T=A.match(O);return T&&Ke(T[1])})}function he(A){if(A.match(b)||!A.match(/^-[^-]+/))return!1;let C=!0,M,O=A.slice(1).split("");for(let T=0;T<O.length;T++){if(M=A.slice(T+2),!Ke(O[T])){C=!1;break}if(O[T+1]&&O[T+1]==="="||M==="-"||/[A-Za-z]/.test(O[T])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(M)||O[T+1]&&O[T+1].match(/\W/))break}return C}function oe(A){return a["unknown-options-as-args"]&&fe(A)}function fe(A){return A=A.replace(/^-{3,}/,"--"),A.match(b)||he(A)?!1:!ne(A,/^-+([^=]+?)=[\s\S]*$/,w,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function me(A){return!W(A,g.bools)&&!W(A,g.counts)&&`${A}`in u?u[A]:we(Fe(A))}function we(A){return{[tr.BOOLEAN]:!0,[tr.STRING]:"",[tr.NUMBER]:void 0,[tr.ARRAY]:[]}[A]}function Fe(A){let C=tr.BOOLEAN;return W(A,g.strings)?C=tr.STRING:W(A,g.numbers)?C=tr.NUMBER:W(A,g.bools)?C=tr.BOOLEAN:W(A,g.arrays)&&(C=tr.ARRAY),C}function ze(A){return A===void 0}function Ut(){Object.keys(g.counts).find(A=>W(A,g.arrays)?(k=Error(y("Invalid configuration: %s, opts.count excludes opts.array.",A)),!0):W(A,g.nargs)?(k=Error(y("Invalid configuration: %s, opts.count excludes opts.narg.",A)),!0):!1)}return{aliases:Object.assign({},g.aliases),argv:Object.assign(S,R),configuration:a,defaulted:Object.assign({},m),error:k,newAliases:Object.assign({},d)}}};function Yk(t){let e=[],r=Object.create(null),n=!0;for(Object.keys(t).forEach(function(i){e.push([].concat(t[i],i))});n;){n=!1;for(let i=0;i<e.length;i++)for(let o=i+1;o<e.length;o++)if(e[i].filter(function(a){return e[o].indexOf(a)!==-1}).length){e[i]=e[i].concat(e[o]),e.splice(o,1),n=!0;break}}return e.forEach(function(i){i=i.filter(function(s,a,u){return u.indexOf(s)===a});let o=i.pop();o!==void 0&&typeof o=="string"&&(r[o]=i)}),r}function ic(t){return t!==void 0?t+1:1}function qd(t){return t==="__proto__"?"___proto___":t}function Zk(t){return typeof t=="string"&&(t[0]==="'"||t[0]==='"')&&t[t.length-1]===t[0]?t.substring(1,t.length-1):t}import{readFileSync as ew}from"fs";var oc,sc,ac,Vd=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,Gd=(sc=(oc=process==null?void 0:process.versions)===null||oc===void 0?void 0:oc.node)!==null&&sc!==void 0?sc:(ac=process==null?void 0:process.version)===null||ac===void 0?void 0:ac.slice(1);if(Gd&&Number(Gd.match(/^([^.]+)/)[1])<Vd)throw Error(`yargs parser supports a minimum Node.js version of ${Vd}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);var tw=process?process.env:{},Wd=new ha({cwd:process.cwd,env:()=>tw,format:Xk,normalize:Jk,resolve:Qk,require:t=>{if(typeof Er<"u")return Er(t);if(t.match(/\.json$/))return JSON.parse(ew(t,"utf8"));throw Error("only .json config files are supported in ESM")}}),is=function(e,r){return Wd.parse(e.slice(),r).argv};is.detailed=function(t,e){return Wd.parse(t.slice(),e)};is.camelCase=Vn;is.decamelize=pa;is.looksLikeNumber=da;var uc=is;import{basename as mw,dirname as gw,extname as xw,relative as yw,resolve as Jd}from"path";function Hd(){return rw()?0:1}function rw(){return nw()&&!process.defaultApp}function nw(){return!!process.versions.electron}function lc(t){return t.slice(Hd()+1)}function Kd(){return process.argv[Hd()]}var $e=class t extends Error{constructor(e){super(e||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}};import{readFileSync as iw,statSync as ow,writeFile as sw}from"fs";import{format as aw}from"util";import{resolve as uw}from"path";var Yd={fs:{readFileSync:iw,writeFile:sw},format:aw,resolve:uw,exists:t=>{try{return ow(t).isFile()}catch{return!1}}};var hr,cc=class{constructor(e){e=e||{},this.directory=e.directory||"./locales",this.updateFiles=typeof e.updateFiles=="boolean"?e.updateFiles:!0,this.locale=e.locale||"en",this.fallbackToLanguage=typeof e.fallbackToLanguage=="boolean"?e.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let r=e.shift(),n=function(){};return typeof e[e.length-1]=="function"&&(n=e.pop()),n=n||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]=r,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),hr.format.apply(hr.format,[this.cache[this.locale][r]||r].concat(e))}__n(){let e=Array.prototype.slice.call(arguments),r=e.shift(),n=e.shift(),i=e.shift(),o=function(){};typeof e[e.length-1]=="function"&&(o=e.pop()),this.cache[this.locale]||this._readLocaleFile();let s=i===1?r:n;this.cache[this.locale][r]&&(s=this.cache[this.locale][r][i===1?"one":"other"]),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]={one:r,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:o})):o();let a=[s];return~s.indexOf("%d")&&a.push(i),hr.format.apply(hr.format,a.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this.cache[this.locale][r]=e[r])}_taggedLiteral(e,...r){let n="";return e.forEach(function(i,o){let s=r[o+1];n+=i,typeof s<"u"&&(n+="%s")}),this.__.apply(this,[n].concat([].slice.call(r,1)))}_enqueueWrite(e){this.writeQueue.push(e),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let e=this,r=this.writeQueue[0],n=r.directory,i=r.locale,o=r.cb,s=this._resolveLocaleFile(n,i),a=JSON.stringify(this.cache[i],null,2);hr.fs.writeFile(s,a,"utf-8",function(u){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),o(u)})}_readLocaleFile(){let e={},r=this._resolveLocaleFile(this.directory,this.locale);try{hr.fs.readFileSync&&(e=JSON.parse(hr.fs.readFileSync(r,"utf-8")))}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+r),n.code==="ENOENT")e={};else throw n}this.cache[this.locale]=e}_resolveLocaleFile(e,r){let n=hr.resolve(e,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){let i=hr.resolve(e,"./",r.split("_")[0]+".json");this._fileExistsSync(i)&&(n=i)}return n}_fileExistsSync(e){return hr.exists(e)}};function Zd(t,e){hr=e;let r=new cc(t);return{__:r.__.bind(r),__n:r.__n.bind(r),setLocale:r.setLocale.bind(r),getLocale:r.getLocale.bind(r),updateLocale:r.updateLocale.bind(r),locale:r.locale}}var lw=t=>Zd(t,Yd),Xd=lw;var bw="require is not supported by ESM",Qd="loading a directory of commands is not supported yet for ESM",os;try{os=hw(import.meta.url)}catch{os=process.cwd()}var Ew=os.substring(0,os.lastIndexOf("node_modules")),fc={assert:{notStrictEqual:cw,strictEqual:fw},cliui:nc,findUp:zd,getEnv:t=>process.env[t],inspect:pw,getCallerFile:()=>{throw new $e(Qd)},getProcessArgvBin:Kd,mainFilename:Ew||process.cwd(),Parser:uc,path:{basename:mw,dirname:gw,extname:xw,relative:yw,resolve:Jd},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(t,e)=>process.emitWarning(t,e),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:dw,require:()=>{throw new $e(bw)},requireDirectory:()=>{throw new $e(Qd)},stringWidth:t=>[...t].length,y18n:Xd({directory:Jd(os,"../../../locales"),updateFiles:!1})};function Rt(t,e,r,n){r.assert.notStrictEqual(t,e,n)}function pc(t,e){e.assert.strictEqual(typeof t,"string")}function Vi(t){return Object.keys(t)}function qe(t){return!!t&&!!t.then&&typeof t.then=="function"}function cn(t){let r=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,i=r.shift();if(!i)throw new Error(`No command found in: ${t}`);let o={cmd:i.replace(n,""),demanded:[],optional:[]};return r.forEach((s,a)=>{let u=!1;s=s.replace(/\s/g,""),/\.+[\]>]/.test(s)&&a===r.length-1&&(u=!0),/^\[/.test(s)?o.optional.push({cmd:s.replace(n,"").split("|"),variadic:u}):o.demanded.push({cmd:s.replace(n,"").split("|"),variadic:u})}),o}var Aw=["first","second","third","fourth","fifth","sixth"];function H(t,e,r){function n(){return typeof t=="object"?[{demanded:[],optional:[]},t,e]:[cn(`cmd ${t}`),e,r]}try{let i=0,[o,s,a]=n(),u=[].slice.call(s);for(;u.length&&u[u.length-1]===void 0;)u.pop();let l=a||u.length;if(l<o.demanded.length)throw new $e(`Not enough arguments provided. Expected ${o.demanded.length} but received ${u.length}.`);let c=o.demanded.length+o.optional.length;if(l>c)throw new $e(`Too many arguments provided. Expected max ${c} but received ${l}.`);o.demanded.forEach(f=>{let p=u.shift(),d=eh(p);f.cmd.filter(y=>y===d||y==="*").length===0&&th(d,f.cmd,i),i+=1}),o.optional.forEach(f=>{if(u.length===0)return;let p=u.shift(),d=eh(p);f.cmd.filter(y=>y===d||y==="*").length===0&&th(d,f.cmd,i),i+=1})}catch(i){console.warn(i.stack)}}function eh(t){return Array.isArray(t)?"array":t===null?"null":typeof t}function th(t,e,r){throw new $e(`Invalid ${Aw[r]||"manyith"} argument. Expected ${e.join(" or ")} but received ${t}.`)}var ma=class{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,r,n=!0,i=!1){if(H("<array|function> [boolean] [boolean] [boolean]",[e,r,n],arguments.length),Array.isArray(e)){for(let o=0;o<e.length;o++){if(typeof e[o]!="function")throw Error("middleware must be a function");let s=e[o];s.applyBeforeValidation=r,s.global=n}Array.prototype.push.apply(this.globalMiddleware,e)}else if(typeof e=="function"){let o=e;o.applyBeforeValidation=r,o.global=n,o.mutates=i,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,r){let n=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(i=>{let o=[...n[r]||[],r];return i.option?!o.includes(i.option):!0}),e.option=r,this.addMiddleware(e,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let e=this.frozens.pop();e!==void 0&&(this.globalMiddleware=e)}reset(){this.globalMiddleware=this.globalMiddleware.filter(e=>e.global)}};function rh(t){return t?t.map(e=>(e.applyBeforeValidation=!1,e)):[]}function Gn(t,e,r,n){return r.reduce((i,o)=>{if(o.applyBeforeValidation!==n)return i;if(o.mutates){if(o.applied)return i;o.applied=!0}if(qe(i))return i.then(s=>Promise.all([s,o(s,e)])).then(([s,a])=>Object.assign(s,a));{let s=o(i,e);return qe(s)?s.then(a=>Object.assign(i,a)):Object.assign(i,s)}},t)}function Wn(t,e,r=n=>{throw n}){try{let n=kw(t)?t():t;return qe(n)?n.then(i=>e(i)):e(n)}catch(n){return r(n)}}function kw(t){return typeof t=="function"}function dc(t){if(typeof Er>"u")return null;for(let e=0,r=Object.keys(Er.cache),n;e<r.length;e++)if(n=Er.cache[r[e]],n.exports===t)return n;return null}var Gi=/(^\*)|(^\$0)/,hc=class{constructor(e,r,n,i){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=i,this.usage=e,this.globalMiddleware=n,this.validation=r}addDirectory(e,r,n,i){i=i||{},typeof i.recurse!="boolean"&&(i.recurse=!1),Array.isArray(i.extensions)||(i.extensions=["js"]);let o=typeof i.visit=="function"?i.visit:s=>s;i.visit=(s,a,u)=>{let l=o(s,a,u);if(l){if(this.requireCache.has(a))return l;this.requireCache.add(a),this.addHandler(l)}return l},this.shim.requireDirectory({require:r,filename:n},e,i)}addHandler(e,r,n,i,o,s){let a=[],u=rh(o);if(i=i||(()=>{}),Array.isArray(e))if(ww(e))[e,...a]=e;else for(let l of e)this.addHandler(l);else if(Tw(e)){let l=Array.isArray(e.command)||typeof e.command=="string"?e.command:this.moduleName(e);e.aliases&&(l=[].concat(l).concat(e.aliases)),this.addHandler(l,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated);return}else if(nh(n)){this.addHandler([e].concat(a),r,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof e=="string"){let l=cn(e);a=a.map(p=>cn(p).cmd);let c=!1,f=[l.cmd].concat(a).filter(p=>Gi.test(p)?(c=!0,!1):!0);f.length===0&&c&&f.push("$0"),c&&(l.cmd=f[0],a=f.slice(1),e=e.replace(Gi,l.cmd)),a.forEach(p=>{this.aliasMap[p]=l.cmd}),r!==!1&&this.usage.command(e,r,c,a,s),this.handlers[l.cmd]={original:e,description:r,handler:i,builder:n||{},middlewares:u,deprecated:s,demanded:l.demanded,optional:l.optional},c&&(this.defaultCommand=this.handlers[l.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(e,r,n,i,o,s){let a=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,u=r.getInternalMethods().getContext(),l=u.commands.slice(),c=!e;e&&(u.commands.push(e),u.fullCommands.push(a.original));let f=this.applyBuilderUpdateUsageAndParse(c,a,r,n.aliases,l,i,o,s);return qe(f)?f.then(p=>this.applyMiddlewareAndGetResult(c,a,p.innerArgv,u,o,p.aliases,r)):this.applyMiddlewareAndGetResult(c,a,f.innerArgv,u,o,f.aliases,r)}applyBuilderUpdateUsageAndParse(e,r,n,i,o,s,a,u){let l=r.builder,c=n;if(ga(l)){n.getInternalMethods().getUsageInstance().freeze();let f=l(n.getInternalMethods().reset(i),u);if(qe(f))return f.then(p=>(c=oh(p)?p:n,this.parseAndUpdateUsage(e,r,c,o,s,a)))}else Cw(l)&&(n.getInternalMethods().getUsageInstance().freeze(),c=n.getInternalMethods().reset(i),Object.keys(r.builder).forEach(f=>{c.option(f,l[f])}));return this.parseAndUpdateUsage(e,r,c,o,s,a)}parseAndUpdateUsage(e,r,n,i,o,s){e&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(i,r),r.description);let a=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,o,s);return qe(a)?a.then(u=>({aliases:n.parsed.aliases,innerArgv:u})):{aliases:n.parsed.aliases,innerArgv:a}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,r){let n=Gi.test(r.original)?r.original.replace(Gi,"").trim():r.original,i=e.filter(o=>!Gi.test(o));return i.push(n),`$0 ${i.join(" ")}`}handleValidationAndGetResult(e,r,n,i,o,s,a,u){if(!s.getInternalMethods().getHasOutput()){let l=s.getInternalMethods().runValidation(o,u,s.parsed.error,e);n=Wn(n,c=>(l(c),c))}if(r.handler&&!s.getInternalMethods().getHasOutput()){s.getInternalMethods().setHasOutput();let l=!!s.getOptions().configuration["populate--"];s.getInternalMethods().postProcess(n,l,!1,!1),n=Gn(n,s,a,!1),n=Wn(n,c=>{let f=r.handler(c);return qe(f)?f.then(()=>c):c}),e||s.getInternalMethods().getUsageInstance().cacheHelpMessage(),qe(n)&&!s.getInternalMethods().hasParseCallback()&&n.catch(c=>{try{s.getInternalMethods().getUsageInstance().fail(null,c)}catch{}})}return e||(i.commands.pop(),i.fullCommands.pop()),n}applyMiddlewareAndGetResult(e,r,n,i,o,s,a){let u={};if(o)return n;a.getInternalMethods().getHasOutput()||(u=this.populatePositionals(r,n,i,a));let l=this.globalMiddleware.getMiddleware().slice(0).concat(r.middlewares),c=Gn(n,a,l,!0);return qe(c)?c.then(f=>this.handleValidationAndGetResult(e,r,f,i,s,a,l,u)):this.handleValidationAndGetResult(e,r,c,i,s,a,l,u)}populatePositionals(e,r,n,i){r._=r._.slice(n.commands.length);let o=e.demanded.slice(0),s=e.optional.slice(0),a={};for(this.validation.positionalCount(o.length,r._.length);o.length;){let u=o.shift();this.populatePositional(u,r,a)}for(;s.length;){let u=s.shift();this.populatePositional(u,r,a)}return r._=n.commands.concat(r._.map(u=>""+u)),this.postProcessPositionals(r,a,this.cmdToParseOptions(e.original),i),a}populatePositional(e,r,n){let i=e.cmd[0];e.variadic?n[i]=r._.splice(0).map(String):r._.length&&(n[i]=[String(r._.shift())])}cmdToParseOptions(e){let r={array:[],default:{},alias:{},demand:{}},n=cn(e);return n.demanded.forEach(i=>{let[o,...s]=i.cmd;i.variadic&&(r.array.push(o),r.default[o]=[]),r.alias[o]=s,r.demand[o]=!0}),n.optional.forEach(i=>{let[o,...s]=i.cmd;i.variadic&&(r.array.push(o),r.default[o]=[]),r.alias[o]=s}),r}postProcessPositionals(e,r,n,i){let o=Object.assign({},i.getOptions());o.default=Object.assign(n.default,o.default);for(let l of Object.keys(n.alias))o.alias[l]=(o.alias[l]||[]).concat(n.alias[l]);o.array=o.array.concat(n.array),o.config={};let s=[];if(Object.keys(r).forEach(l=>{r[l].map(c=>{o.configuration["unknown-options-as-args"]&&(o.key[l]=!0),s.push(`--${l}`),s.push(c)})}),!s.length)return;let a=Object.assign({},o.configuration,{"populate--":!1}),u=this.shim.Parser.detailed(s,Object.assign({},o,{configuration:a}));if(u.error)i.getInternalMethods().getUsageInstance().fail(u.error.message,u.error);else{let l=Object.keys(r);Object.keys(r).forEach(c=>{l.push(...u.aliases[c])}),Object.keys(u.argv).forEach(c=>{l.includes(c)&&(r[c]||(r[c]=u.argv[c]),!this.isInConfigs(i,c)&&!this.isDefaulted(i,c)&&Object.prototype.hasOwnProperty.call(e,c)&&Object.prototype.hasOwnProperty.call(u.argv,c)&&(Array.isArray(e[c])||Array.isArray(u.argv[c]))?e[c]=[].concat(e[c],u.argv[c]):e[c]=u.argv[c])})}}isDefaulted(e,r){let{default:n}=e.getOptions();return Object.prototype.hasOwnProperty.call(n,r)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(r))}isInConfigs(e,r){let{configObjects:n}=e.getOptions();return n.some(i=>Object.prototype.hasOwnProperty.call(i,r))||n.some(i=>Object.prototype.hasOwnProperty.call(i,this.shim.Parser.camelCase(r)))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){let n=Gi.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");e.getInternalMethods().getUsageInstance().usage(n,this.defaultCommand.description)}let r=this.defaultCommand.builder;if(ga(r))return r(e,!0);nh(r)||Object.keys(r).forEach(n=>{e.option(n,r[n])})}moduleName(e){let r=dc(e);if(!r)throw new Error(`No command name given for module: ${this.shim.inspect(e)}`);return this.commandFromFilename(r.filename)}commandFromFilename(e){return this.shim.path.basename(e,this.shim.path.extname(e))}extractDesc({describe:e,description:r,desc:n}){for(let i of[e,r,n]){if(typeof i=="string"||i===!1)return i;Rt(i,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let e=this.frozens.pop();Rt(e,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=e}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}};function ih(t,e,r,n){return new hc(t,e,r,n)}function nh(t){return typeof t=="object"&&!!t.builder&&typeof t.handler=="function"}function ww(t){return t.every(e=>typeof e=="string")}function ga(t){return typeof t=="function"}function Cw(t){return typeof t=="object"}function Tw(t){return typeof t=="object"&&!Array.isArray(t)}function fn(t={},e=()=>!0){let r={};return Vi(t).forEach(n=>{e(n,t[n])&&(r[n]=t[n])}),r}function pn(t){typeof process>"u"||[process.stdout,process.stderr].forEach(e=>{let r=e;r._handle&&r.isTTY&&typeof r._handle.setBlocking=="function"&&r._handle.setBlocking(t)})}function _w(t){return typeof t=="boolean"}function ah(t,e){let r=e.y18n.__,n={},i=[];n.failFn=function(F){i.push(F)};let o=null,s=null,a=!0;n.showHelpOnFail=function(F=!0,I){let[P,j]=typeof F=="string"?[!0,F]:[F,I];return t.getInternalMethods().isGlobalContext()&&(s=j),o=j,a=P,n};let u=!1;n.fail=function(F,I){let P=t.getInternalMethods().getLoggerInstance();if(i.length)for(let j=i.length-1;j>=0;--j){let ae=i[j];if(_w(ae)){if(I)throw I;if(F)throw Error(F)}else ae(F,I,n)}else{if(t.getExitProcess()&&pn(!0),!u){u=!0,a&&(t.showHelp("error"),P.error()),(F||I)&&P.error(F||I);let j=o||s;j&&((F||I)&&P.error(""),P.error(j))}if(I=I||new $e(F),t.getExitProcess())return t.exit(1);if(t.getInternalMethods().hasParseCallback())return t.exit(1,I);throw I}};let l=[],c=!1;n.usage=(L,F)=>L===null?(c=!0,l=[],n):(c=!1,l.push([L,F||""]),n),n.getUsage=()=>l,n.getUsageDisabled=()=>c,n.getPositionalGroupName=()=>r("Positionals:");let f=[];n.example=(L,F)=>{f.push([L,F||""])};let p=[];n.command=function(F,I,P,j,ae=!1){P&&(p=p.map(ee=>(ee[2]=!1,ee))),p.push([F,I||"",P,j,ae])},n.getCommands=()=>p;let d={};n.describe=function(F,I){Array.isArray(F)?F.forEach(P=>{n.describe(P,I)}):typeof F=="object"?Object.keys(F).forEach(P=>{n.describe(P,F[P])}):d[F]=I},n.getDescriptions=()=>d;let m=[];n.epilog=L=>{m.push(L)};let y=!1,g;n.wrap=L=>{y=!0,g=L},n.getWrap=()=>e.getEnv("YARGS_DISABLE_WRAP")?null:(y||(g=ye(),y=!0),g);let b="__yargsString__:";n.deferY18nLookup=L=>b+L,n.help=function(){if(D)return D;k();let F=t.customScriptName?t.$0:e.path.basename(t.$0),I=t.getDemandedOptions(),P=t.getDemandedCommands(),j=t.getDeprecatedOptions(),ae=t.getGroups(),ee=t.getOptions(),Se=[];Se=Se.concat(Object.keys(d)),Se=Se.concat(Object.keys(I)),Se=Se.concat(Object.keys(P)),Se=Se.concat(Object.keys(ee.default)),Se=Se.filter(S),Se=Object.keys(Se.reduce((ne,he)=>(he!=="_"&&(ne[he]=!0),ne),{}));let rt=n.getWrap(),x=e.cliui({width:rt,wrap:!!rt});if(!c){if(l.length)l.forEach(ne=>{x.div({text:`${ne[0].replace(/\$0/g,F)}`}),ne[1]&&x.div({text:`${ne[1]}`,padding:[1,0,0,0]})}),x.div();else if(p.length){let ne=null;P._?ne=`${F} <${r("command")}>
12
8
  `:ne=`${F} [${r("command")}]
13
- `,x.div(`${ne}`)}}if(p.length>1||p.length===1&&!p[0][2]){x.div(r("Commands:"));let ne=t.getInternalMethods().getContext(),he=ne.commands.length?`${ne.commands.join(" ")} `:"";t.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(p=p.sort((ce,me)=>ce[0].localeCompare(me[0])));let oe=F?`${F} `:"";p.forEach(ce=>{let me=`${oe}${he}${ce[0].replace(/^\$0 ?/,"")}`;x.span({text:me,padding:[0,2,0,2],width:w(p,it,`${F}${he}`)+4},{text:ce[1]});let we=[];ce[2]&&we.push(`[${r("default")}]`),ce[3]&&ce[3].length&&we.push(`[${r("aliases:")} ${ce[3].join(", ")}]`),ce[4]&&(typeof ce[4]=="string"?we.push(`[${r("deprecated: %s",ce[4])}]`):we.push(`[${r("deprecated")}]`)),we.length?x.div({text:we.join(" "),padding:[0,0,0,2],align:"right"}):x.div()}),x.div()}let Ue=(Object.keys(ee.alias)||[]).concat(Object.keys(t.parsed.newAliases)||[]);_e=_e.filter(ne=>!t.parsed.newAliases[ne]&&Ue.every(he=>(ee.alias[he]||[]).indexOf(ne)===-1));let Qe=r("Options:");ae[Qe]||(ae[Qe]=[]),R(_e,ee.alias,ae,Qe);let E=ne=>/^--/.test(Aa(ne)),W=Object.keys(ae).filter(ne=>ae[ne].length>0).map(ne=>{let he=ae[ne].filter(S).map(oe=>{if(Ue.includes(oe))return oe;for(let ce=0,me;(me=Ue[ce])!==void 0;ce++)if((ee.alias[me]||[]).includes(oe))return me;return oe});return{groupName:ne,normalizedKeys:he}}).filter(({normalizedKeys:ne})=>ne.length>0).map(({groupName:ne,normalizedKeys:he})=>{let oe=he.reduce((ce,me)=>(ce[me]=[me].concat(ee.alias[me]||[]).map(we=>ne===n.getPositionalGroupName()?we:(/^[0-9]$/.test(we)?ee.boolean.includes(me)?"-":"--":we.length>1?"--":"-")+we).sort((we,Fe)=>E(we)===E(Fe)?0:E(we)?1:-1).join(", "),ce),{});return{groupName:ne,normalizedKeys:he,switches:oe}});if(W.filter(({groupName:ne})=>ne!==n.getPositionalGroupName()).some(({normalizedKeys:ne,switches:he})=>!ne.every(oe=>E(he[oe])))&&W.filter(({groupName:ne})=>ne!==n.getPositionalGroupName()).forEach(({normalizedKeys:ne,switches:he})=>{ne.forEach(oe=>{E(he[oe])&&(he[oe]=sk(he[oe],4))})}),W.forEach(({groupName:ne,normalizedKeys:he,switches:oe})=>{x.div(ne),he.forEach(ce=>{let me=oe[ce],we=d[ce]||"",Fe=null;we.includes(b)&&(we=r(we.substring(b.length))),ee.boolean.includes(ce)&&(Fe=`[${r("boolean")}]`),ee.count.includes(ce)&&(Fe=`[${r("count")}]`),ee.string.includes(ce)&&(Fe=`[${r("string")}]`),ee.normalize.includes(ce)&&(Fe=`[${r("string")}]`),ee.array.includes(ce)&&(Fe=`[${r("array")}]`),ee.number.includes(ce)&&(Fe=`[${r("number")}]`);let ze=k=>typeof k=="string"?`[${r("deprecated: %s",k)}]`:`[${r("deprecated")}]`,qt=[ce in j?ze(j[ce]):null,Fe,ce in v?`[${r("required")}]`:null,ee.choices&&ee.choices[ce]?`[${r("choices:")} ${n.stringifiedValues(ee.choices[ce])}]`:null,de(ee.default[ce],ee.defaultDescription[ce])].filter(Boolean).join(" ");x.span({text:Aa(me),padding:[0,2,0,2+Th(me)],width:w(oe,it)+4},we);let A=t.getInternalMethods().getUsageConfiguration()["hide-types"]===!0;qt&&!A?x.div({text:qt,padding:[0,0,0,2],align:"right"}):x.div()}),x.div()}),f.length&&(x.div(r("Examples:")),f.forEach(ne=>{ne[0]=ne[0].replace(/\$0/g,F)}),f.forEach(ne=>{ne[1]===""?x.div({text:ne[0],padding:[0,2,0,2]}):x.div({text:ne[0],padding:[0,2,0,2],width:w(f,it)+4},{text:ne[1]})}),x.div()),m.length>0){let ne=m.map(he=>he.replace(/\$0/g,F)).join(`
9
+ `,x.div(`${ne}`)}}if(p.length>1||p.length===1&&!p[0][2]){x.div(r("Commands:"));let ne=t.getInternalMethods().getContext(),he=ne.commands.length?`${ne.commands.join(" ")} `:"";t.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(p=p.sort((fe,me)=>fe[0].localeCompare(me[0])));let oe=F?`${F} `:"";p.forEach(fe=>{let me=`${oe}${he}${fe[0].replace(/^\$0 ?/,"")}`;x.span({text:me,padding:[0,2,0,2],width:w(p,rt,`${F}${he}`)+4},{text:fe[1]});let we=[];fe[2]&&we.push(`[${r("default")}]`),fe[3]&&fe[3].length&&we.push(`[${r("aliases:")} ${fe[3].join(", ")}]`),fe[4]&&(typeof fe[4]=="string"?we.push(`[${r("deprecated: %s",fe[4])}]`):we.push(`[${r("deprecated")}]`)),we.length?x.div({text:we.join(" "),padding:[0,0,0,2],align:"right"}):x.div()}),x.div()}let Ue=(Object.keys(ee.alias)||[]).concat(Object.keys(t.parsed.newAliases)||[]);Se=Se.filter(ne=>!t.parsed.newAliases[ne]&&Ue.every(he=>(ee.alias[he]||[]).indexOf(ne)===-1));let Je=r("Options:");ae[Je]||(ae[Je]=[]),R(Se,ee.alias,ae,Je);let E=ne=>/^--/.test(xa(ne)),W=Object.keys(ae).filter(ne=>ae[ne].length>0).map(ne=>{let he=ae[ne].filter(S).map(oe=>{if(Ue.includes(oe))return oe;for(let fe=0,me;(me=Ue[fe])!==void 0;fe++)if((ee.alias[me]||[]).includes(oe))return me;return oe});return{groupName:ne,normalizedKeys:he}}).filter(({normalizedKeys:ne})=>ne.length>0).map(({groupName:ne,normalizedKeys:he})=>{let oe=he.reduce((fe,me)=>(fe[me]=[me].concat(ee.alias[me]||[]).map(we=>ne===n.getPositionalGroupName()?we:(/^[0-9]$/.test(we)?ee.boolean.includes(me)?"-":"--":we.length>1?"--":"-")+we).sort((we,Fe)=>E(we)===E(Fe)?0:E(we)?1:-1).join(", "),fe),{});return{groupName:ne,normalizedKeys:he,switches:oe}});if(W.filter(({groupName:ne})=>ne!==n.getPositionalGroupName()).some(({normalizedKeys:ne,switches:he})=>!ne.every(oe=>E(he[oe])))&&W.filter(({groupName:ne})=>ne!==n.getPositionalGroupName()).forEach(({normalizedKeys:ne,switches:he})=>{ne.forEach(oe=>{E(he[oe])&&(he[oe]=Sw(he[oe],4))})}),W.forEach(({groupName:ne,normalizedKeys:he,switches:oe})=>{x.div(ne),he.forEach(fe=>{let me=oe[fe],we=d[fe]||"",Fe=null;we.includes(b)&&(we=r(we.substring(b.length))),ee.boolean.includes(fe)&&(Fe=`[${r("boolean")}]`),ee.count.includes(fe)&&(Fe=`[${r("count")}]`),ee.string.includes(fe)&&(Fe=`[${r("string")}]`),ee.normalize.includes(fe)&&(Fe=`[${r("string")}]`),ee.array.includes(fe)&&(Fe=`[${r("array")}]`),ee.number.includes(fe)&&(Fe=`[${r("number")}]`);let ze=C=>typeof C=="string"?`[${r("deprecated: %s",C)}]`:`[${r("deprecated")}]`,Ut=[fe in j?ze(j[fe]):null,Fe,fe in I?`[${r("required")}]`:null,ee.choices&&ee.choices[fe]?`[${r("choices:")} ${n.stringifiedValues(ee.choices[fe])}]`:null,de(ee.default[fe],ee.defaultDescription[fe])].filter(Boolean).join(" ");x.span({text:xa(me),padding:[0,2,0,2+sh(me)],width:w(oe,rt)+4},we);let A=t.getInternalMethods().getUsageConfiguration()["hide-types"]===!0;Ut&&!A?x.div({text:Ut,padding:[0,0,0,2],align:"right"}):x.div()}),x.div()}),f.length&&(x.div(r("Examples:")),f.forEach(ne=>{ne[0]=ne[0].replace(/\$0/g,F)}),f.forEach(ne=>{ne[1]===""?x.div({text:ne[0],padding:[0,2,0,2]}):x.div({text:ne[0],padding:[0,2,0,2],width:w(f,rt)+4},{text:ne[1]})}),x.div()),m.length>0){let ne=m.map(he=>he.replace(/\$0/g,F)).join(`
14
10
  `);x.div(`${ne}
15
- `)}return x.toString().replace(/\s*$/,"")};function w(L,F,v){let P=0;return Array.isArray(L)||(L=Object.values(L).map(j=>[j])),L.forEach(j=>{P=Math.max(e.stringWidth(v?`${v} ${Aa(j[0])}`:Aa(j[0]))+Th(j[0]),P)}),F&&(P=Math.min(P,parseInt((F*.5).toString(),10))),P}function C(){let L=t.getDemandedOptions(),F=t.getOptions();(Object.keys(F.alias)||[]).forEach(v=>{F.alias[v].forEach(P=>{d[P]&&n.describe(v,d[P]),P in L&&t.demandOption(v,L[P]),F.boolean.includes(P)&&t.boolean(v),F.count.includes(P)&&t.count(v),F.string.includes(P)&&t.string(v),F.normalize.includes(P)&&t.normalize(v),F.array.includes(P)&&t.array(v),F.number.includes(P)&&t.number(v)})})}let D;n.cacheHelpMessage=function(){D=this.help()},n.clearCachedHelpMessage=function(){D=void 0},n.hasCachedHelpMessage=function(){return!!D};function R(L,F,v,P){let j=[],ae=null;return Object.keys(v).forEach(ee=>{j=j.concat(v[ee])}),L.forEach(ee=>{ae=[ee].concat(F[ee]),ae.some(_e=>j.indexOf(_e)!==-1)||v[P].push(ee)}),j}function S(L){return t.getOptions().hiddenOptions.indexOf(L)<0||t.parsed.argv[t.getOptions().showHiddenOpt]}n.showHelp=L=>{let F=t.getInternalMethods().getLoggerInstance();L||(L="error"),(typeof L=="function"?L:F[L])(n.help())},n.functionDescription=L=>["(",L.name?e.Parser.decamelize(L.name,"-"):r("generated-value"),")"].join(""),n.stringifiedValues=function(F,v){let P="",j=v||", ",ae=[].concat(F);return!F||!ae.length||ae.forEach(ee=>{P.length&&(P+=j),P+=JSON.stringify(ee)}),P};function de(L,F){let v=`[${r("default:")} `;if(L===void 0&&!F)return null;if(F)v+=F;else switch(typeof L){case"string":v+=`"${L}"`;break;case"object":v+=JSON.stringify(L);break;default:v+=L}return`${v}]`}function ye(){return e.process.stdColumns?Math.min(80,e.process.stdColumns):80}let be=null;n.version=L=>{be=L},n.showVersion=L=>{let F=t.getInternalMethods().getLoggerInstance();L||(L="error"),(typeof L=="function"?L:F[L])(be)},n.reset=function(F){return o=null,u=!1,l=[],c=!1,m=[],f=[],p=[],d=hn(d,v=>!F[v]),n};let _=[];return n.freeze=function(){_.push({failMessage:o,failureOutput:u,usages:l,usageDisabled:c,epilogs:m,examples:f,commands:p,descriptions:d})},n.unfreeze=function(F=!1){let v=_.pop();v&&(F?(d={...v.descriptions,...d},p=[...v.commands,...p],l=[...v.usages,...l],f=[...v.examples,...f],m=[...v.epilogs,...m]):{failMessage:o,failureOutput:u,usages:l,usageDisabled:c,epilogs:m,examples:f,commands:p,descriptions:d}=v)},n}function wc(t){return typeof t=="object"}function sk(t,e){return wc(t)?{text:t.text,indentation:t.indentation+e}:{text:t,indentation:e}}function Th(t){return wc(t)?t.indentation:0}function Aa(t){return wc(t)?t.text:t}var Sh=`###-begin-{{app_name}}-completions-###
11
+ `)}return x.toString().replace(/\s*$/,"")};function w(L,F,I){let P=0;return Array.isArray(L)||(L=Object.values(L).map(j=>[j])),L.forEach(j=>{P=Math.max(e.stringWidth(I?`${I} ${xa(j[0])}`:xa(j[0]))+sh(j[0]),P)}),F&&(P=Math.min(P,parseInt((F*.5).toString(),10))),P}function k(){let L=t.getDemandedOptions(),F=t.getOptions();(Object.keys(F.alias)||[]).forEach(I=>{F.alias[I].forEach(P=>{d[P]&&n.describe(I,d[P]),P in L&&t.demandOption(I,L[P]),F.boolean.includes(P)&&t.boolean(I),F.count.includes(P)&&t.count(I),F.string.includes(P)&&t.string(I),F.normalize.includes(P)&&t.normalize(I),F.array.includes(P)&&t.array(I),F.number.includes(P)&&t.number(I)})})}let D;n.cacheHelpMessage=function(){D=this.help()},n.clearCachedHelpMessage=function(){D=void 0},n.hasCachedHelpMessage=function(){return!!D};function R(L,F,I,P){let j=[],ae=null;return Object.keys(I).forEach(ee=>{j=j.concat(I[ee])}),L.forEach(ee=>{ae=[ee].concat(F[ee]),ae.some(Se=>j.indexOf(Se)!==-1)||I[P].push(ee)}),j}function S(L){return t.getOptions().hiddenOptions.indexOf(L)<0||t.parsed.argv[t.getOptions().showHiddenOpt]}n.showHelp=L=>{let F=t.getInternalMethods().getLoggerInstance();L||(L="error"),(typeof L=="function"?L:F[L])(n.help())},n.functionDescription=L=>["(",L.name?e.Parser.decamelize(L.name,"-"):r("generated-value"),")"].join(""),n.stringifiedValues=function(F,I){let P="",j=I||", ",ae=[].concat(F);return!F||!ae.length||ae.forEach(ee=>{P.length&&(P+=j),P+=JSON.stringify(ee)}),P};function de(L,F){let I=`[${r("default:")} `;if(L===void 0&&!F)return null;if(F)I+=F;else switch(typeof L){case"string":I+=`"${L}"`;break;case"object":I+=JSON.stringify(L);break;default:I+=L}return`${I}]`}function ye(){return e.process.stdColumns?Math.min(80,e.process.stdColumns):80}let be=null;n.version=L=>{be=L},n.showVersion=L=>{let F=t.getInternalMethods().getLoggerInstance();L||(L="error"),(typeof L=="function"?L:F[L])(be)},n.reset=function(F){return o=null,u=!1,l=[],c=!1,m=[],f=[],p=[],d=fn(d,I=>!F[I]),n};let _=[];return n.freeze=function(){_.push({failMessage:o,failureOutput:u,usages:l,usageDisabled:c,epilogs:m,examples:f,commands:p,descriptions:d})},n.unfreeze=function(F=!1){let I=_.pop();I&&(F?(d={...I.descriptions,...d},p=[...I.commands,...p],l=[...I.usages,...l],f=[...I.examples,...f],m=[...I.epilogs,...m]):{failMessage:o,failureOutput:u,usages:l,usageDisabled:c,epilogs:m,examples:f,commands:p,descriptions:d}=I)},n}function mc(t){return typeof t=="object"}function Sw(t,e){return mc(t)?{text:t.text,indentation:t.indentation+e}:{text:t,indentation:e}}function sh(t){return mc(t)?t.indentation:0}function xa(t){return mc(t)?t.text:t}var uh=`###-begin-{{app_name}}-completions-###
16
12
  #
17
13
  # yargs command completion script
18
14
  #
@@ -40,7 +36,7 @@ _{{app_name}}_yargs_completions()
40
36
  }
41
37
  complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}
42
38
  ###-end-{{app_name}}-completions-###
43
- `,vh=`#compdef {{app_name}}
39
+ `,lh=`#compdef {{app_name}}
44
40
  ###-begin-{{app_name}}-completions-###
45
41
  #
46
42
  # yargs command completion script
@@ -59,122 +55,122 @@ _{{app_name}}_yargs_completions()
59
55
  }
60
56
  compdef _{{app_name}}_yargs_completions {{app_name}}
61
57
  ###-end-{{app_name}}-completions-###
62
- `;var kc=class{constructor(e,r,n,i){var o,s,a;this.yargs=e,this.usage=r,this.command=n,this.shim=i,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=(a=((o=this.shim.getEnv("SHELL"))===null||o===void 0?void 0:o.includes("zsh"))||((s=this.shim.getEnv("ZSH_NAME"))===null||s===void 0?void 0:s.includes("zsh")))!==null&&a!==void 0?a:!1}defaultCompletion(e,r,n,i){let o=this.command.getCommandHandlers();for(let a=0,u=e.length;a<u;++a)if(o[e[a]]&&o[e[a]].builder){let l=o[e[a]].builder;if(Ea(l)){this.indexAfterLastReset=a+1;let c=this.yargs.getInternalMethods().reset();return l(c,!0),c.argv}}let s=[];this.commandCompletions(s,e,n),this.optionCompletions(s,e,r,n),this.choicesFromOptionsCompletions(s,e,r,n),this.choicesFromPositionalsCompletions(s,e,r,n),i(null,s)}commandCompletions(e,r,n){let i=this.yargs.getInternalMethods().getContext().commands;!n.match(/^-/)&&i[i.length-1]!==n&&!this.previousArgHasChoices(r)&&this.usage.getCommands().forEach(o=>{let s=dn(o[0]).cmd;if(r.indexOf(s)===-1)if(!this.zshShell)e.push(s);else{let a=o[1]||"";e.push(s.replace(/:/g,"\\:")+":"+a)}})}optionCompletions(e,r,n,i){if((i.match(/^-/)||i===""&&e.length===0)&&!this.previousArgHasChoices(r)){let o=this.yargs.getOptions(),s=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(o.key).forEach(a=>{let u=!!o.configuration["boolean-negation"]&&o.boolean.includes(a);!s.includes(a)&&!o.hiddenOptions.includes(a)&&!this.argsContainKey(r,a,u)&&this.completeOptionKey(a,e,i,u&&!!o.default[a])})}}choicesFromOptionsCompletions(e,r,n,i){if(this.previousArgHasChoices(r)){let o=this.getPreviousArgChoices(r);o&&o.length>0&&e.push(...o.map(s=>s.replace(/:/g,"\\:")))}}choicesFromPositionalsCompletions(e,r,n,i){if(i===""&&e.length>0&&this.previousArgHasChoices(r))return;let o=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],s=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),a=o[n._.length-s-1];if(!a)return;let u=this.yargs.getOptions().choices[a]||[];for(let l of u)l.startsWith(i)&&e.push(l.replace(/:/g,"\\:"))}getPreviousArgChoices(e){if(e.length<1)return;let r=e[e.length-1],n="";if(!r.startsWith("-")&&e.length>1&&(n=r,r=e[e.length-2]),!r.startsWith("-"))return;let i=r.replace(/^-+/,""),o=this.yargs.getOptions(),s=[i,...this.yargs.getAliases()[i]||[]],a;for(let u of s)if(Object.prototype.hasOwnProperty.call(o.key,u)&&Array.isArray(o.choices[u])){a=o.choices[u];break}if(a)return a.filter(u=>!n||u.startsWith(n))}previousArgHasChoices(e){let r=this.getPreviousArgChoices(e);return r!==void 0&&r.length>0}argsContainKey(e,r,n){let i=o=>e.indexOf((/^[^0-9]$/.test(o)?"-":"--")+o)!==-1;if(i(r)||n&&i(`no-${r}`))return!0;if(this.aliases){for(let o of this.aliases[r])if(i(o))return!0}return!1}completeOptionKey(e,r,n,i){var o,s,a,u;let l=e;if(this.zshShell){let d=this.usage.getDescriptions(),m=(s=(o=this===null||this===void 0?void 0:this.aliases)===null||o===void 0?void 0:o[e])===null||s===void 0?void 0:s.find(b=>{let w=d[b];return typeof w=="string"&&w.length>0}),y=m?d[m]:void 0,g=(u=(a=d[e])!==null&&a!==void 0?a:y)!==null&&u!==void 0?u:"";l=`${e.replace(/:/g,"\\:")}:${g.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}let c=d=>/^--/.test(d),f=d=>/^[^0-9]$/.test(d),p=!c(n)&&f(e)?"-":"--";r.push(p+l),i&&r.push(p+"no-"+l)}customCompletion(e,r,n,i){if(Nt(this.customCompletionFunction,null,this.shim),uk(this.customCompletionFunction)){let o=this.customCompletionFunction(n,r);return qe(o)?o.then(s=>{this.shim.process.nextTick(()=>{i(null,s)})}).catch(s=>{this.shim.process.nextTick(()=>{i(s,void 0)})}):i(null,o)}else return lk(this.customCompletionFunction)?this.customCompletionFunction(n,r,(o=i)=>this.defaultCompletion(e,r,n,o),o=>{i(null,o)}):this.customCompletionFunction(n,r,o=>{i(null,o)})}getCompletion(e,r){let n=e.length?e[e.length-1]:"",i=this.yargs.parse(e,!0),o=this.customCompletionFunction?s=>this.customCompletion(e,s,n,r):s=>this.defaultCompletion(e,s,n,r);return qe(i)?i.then(o):o(i)}generateCompletionScript(e,r){let n=this.zshShell?vh:Sh,i=this.shim.path.basename(e);return e.match(/\.js$/)&&(e=`./${e}`),n=n.replace(/{{app_name}}/g,i),n=n.replace(/{{completion_command}}/g,r),n.replace(/{{app_path}}/g,e)}registerFunction(e){this.customCompletionFunction=e}setParsed(e){this.aliases=e.aliases}};function Ih(t,e,r,n){return new kc(t,e,r,n)}function uk(t){return t.length<3}function lk(t){return t.length>3}function Oh(t,e){if(t.length===0)return e.length;if(e.length===0)return t.length;let r=[],n;for(n=0;n<=e.length;n++)r[n]=[n];let i;for(i=0;i<=t.length;i++)r[0][i]=i;for(n=1;n<=e.length;n++)for(i=1;i<=t.length;i++)e.charAt(n-1)===t.charAt(i-1)?r[n][i]=r[n-1][i-1]:n>1&&i>1&&e.charAt(n-2)===t.charAt(i-1)&&e.charAt(n-1)===t.charAt(i-2)?r[n][i]=r[n-2][i-2]+1:r[n][i]=Math.min(r[n-1][i-1]+1,Math.min(r[n][i-1]+1,r[n-1][i]+1));return r[e.length][t.length]}var Dh=["$0","--","_"];function Rh(t,e,r){let n=r.y18n.__,i=r.y18n.__n,o={};o.nonOptionCount=function(f){let p=t.getDemandedCommands(),m=f._.length+(f["--"]?f["--"].length:0)-t.getInternalMethods().getContext().commands.length;p._&&(m<p._.min||m>p._.max)&&(m<p._.min?p._.minMsg!==void 0?e.fail(p._.minMsg?p._.minMsg.replace(/\$0/g,m.toString()).replace(/\$1/,p._.min.toString()):null):e.fail(i("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",m,m.toString(),p._.min.toString())):m>p._.max&&(p._.maxMsg!==void 0?e.fail(p._.maxMsg?p._.maxMsg.replace(/\$0/g,m.toString()).replace(/\$1/,p._.max.toString()):null):e.fail(i("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",m,m.toString(),p._.max.toString()))))},o.positionalCount=function(f,p){p<f&&e.fail(i("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",p,p+"",f+""))},o.requiredArguments=function(f,p){let d=null;for(let m of Object.keys(p))(!Object.prototype.hasOwnProperty.call(f,m)||typeof f[m]>"u")&&(d=d||{},d[m]=p[m]);if(d){let m=[];for(let g of Object.keys(d)){let b=d[g];b&&m.indexOf(b)<0&&m.push(b)}let y=m.length?`
58
+ `;var gc=class{constructor(e,r,n,i){var o,s,a;this.yargs=e,this.usage=r,this.command=n,this.shim=i,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=(a=((o=this.shim.getEnv("SHELL"))===null||o===void 0?void 0:o.includes("zsh"))||((s=this.shim.getEnv("ZSH_NAME"))===null||s===void 0?void 0:s.includes("zsh")))!==null&&a!==void 0?a:!1}defaultCompletion(e,r,n,i){let o=this.command.getCommandHandlers();for(let a=0,u=e.length;a<u;++a)if(o[e[a]]&&o[e[a]].builder){let l=o[e[a]].builder;if(ga(l)){this.indexAfterLastReset=a+1;let c=this.yargs.getInternalMethods().reset();return l(c,!0),c.argv}}let s=[];this.commandCompletions(s,e,n),this.optionCompletions(s,e,r,n),this.choicesFromOptionsCompletions(s,e,r,n),this.choicesFromPositionalsCompletions(s,e,r,n),i(null,s)}commandCompletions(e,r,n){let i=this.yargs.getInternalMethods().getContext().commands;!n.match(/^-/)&&i[i.length-1]!==n&&!this.previousArgHasChoices(r)&&this.usage.getCommands().forEach(o=>{let s=cn(o[0]).cmd;if(r.indexOf(s)===-1)if(!this.zshShell)e.push(s);else{let a=o[1]||"";e.push(s.replace(/:/g,"\\:")+":"+a)}})}optionCompletions(e,r,n,i){if((i.match(/^-/)||i===""&&e.length===0)&&!this.previousArgHasChoices(r)){let o=this.yargs.getOptions(),s=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(o.key).forEach(a=>{let u=!!o.configuration["boolean-negation"]&&o.boolean.includes(a);!s.includes(a)&&!o.hiddenOptions.includes(a)&&!this.argsContainKey(r,a,u)&&this.completeOptionKey(a,e,i,u&&!!o.default[a])})}}choicesFromOptionsCompletions(e,r,n,i){if(this.previousArgHasChoices(r)){let o=this.getPreviousArgChoices(r);o&&o.length>0&&e.push(...o.map(s=>s.replace(/:/g,"\\:")))}}choicesFromPositionalsCompletions(e,r,n,i){if(i===""&&e.length>0&&this.previousArgHasChoices(r))return;let o=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],s=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),a=o[n._.length-s-1];if(!a)return;let u=this.yargs.getOptions().choices[a]||[];for(let l of u)l.startsWith(i)&&e.push(l.replace(/:/g,"\\:"))}getPreviousArgChoices(e){if(e.length<1)return;let r=e[e.length-1],n="";if(!r.startsWith("-")&&e.length>1&&(n=r,r=e[e.length-2]),!r.startsWith("-"))return;let i=r.replace(/^-+/,""),o=this.yargs.getOptions(),s=[i,...this.yargs.getAliases()[i]||[]],a;for(let u of s)if(Object.prototype.hasOwnProperty.call(o.key,u)&&Array.isArray(o.choices[u])){a=o.choices[u];break}if(a)return a.filter(u=>!n||u.startsWith(n))}previousArgHasChoices(e){let r=this.getPreviousArgChoices(e);return r!==void 0&&r.length>0}argsContainKey(e,r,n){let i=o=>e.indexOf((/^[^0-9]$/.test(o)?"-":"--")+o)!==-1;if(i(r)||n&&i(`no-${r}`))return!0;if(this.aliases){for(let o of this.aliases[r])if(i(o))return!0}return!1}completeOptionKey(e,r,n,i){var o,s,a,u;let l=e;if(this.zshShell){let d=this.usage.getDescriptions(),m=(s=(o=this===null||this===void 0?void 0:this.aliases)===null||o===void 0?void 0:o[e])===null||s===void 0?void 0:s.find(b=>{let w=d[b];return typeof w=="string"&&w.length>0}),y=m?d[m]:void 0,g=(u=(a=d[e])!==null&&a!==void 0?a:y)!==null&&u!==void 0?u:"";l=`${e.replace(/:/g,"\\:")}:${g.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}let c=d=>/^--/.test(d),f=d=>/^[^0-9]$/.test(d),p=!c(n)&&f(e)?"-":"--";r.push(p+l),i&&r.push(p+"no-"+l)}customCompletion(e,r,n,i){if(Rt(this.customCompletionFunction,null,this.shim),Ow(this.customCompletionFunction)){let o=this.customCompletionFunction(n,r);return qe(o)?o.then(s=>{this.shim.process.nextTick(()=>{i(null,s)})}).catch(s=>{this.shim.process.nextTick(()=>{i(s,void 0)})}):i(null,o)}else return vw(this.customCompletionFunction)?this.customCompletionFunction(n,r,(o=i)=>this.defaultCompletion(e,r,n,o),o=>{i(null,o)}):this.customCompletionFunction(n,r,o=>{i(null,o)})}getCompletion(e,r){let n=e.length?e[e.length-1]:"",i=this.yargs.parse(e,!0),o=this.customCompletionFunction?s=>this.customCompletion(e,s,n,r):s=>this.defaultCompletion(e,s,n,r);return qe(i)?i.then(o):o(i)}generateCompletionScript(e,r){let n=this.zshShell?lh:uh,i=this.shim.path.basename(e);return e.match(/\.js$/)&&(e=`./${e}`),n=n.replace(/{{app_name}}/g,i),n=n.replace(/{{completion_command}}/g,r),n.replace(/{{app_path}}/g,e)}registerFunction(e){this.customCompletionFunction=e}setParsed(e){this.aliases=e.aliases}};function ch(t,e,r,n){return new gc(t,e,r,n)}function Ow(t){return t.length<3}function vw(t){return t.length>3}function fh(t,e){if(t.length===0)return e.length;if(e.length===0)return t.length;let r=[],n;for(n=0;n<=e.length;n++)r[n]=[n];let i;for(i=0;i<=t.length;i++)r[0][i]=i;for(n=1;n<=e.length;n++)for(i=1;i<=t.length;i++)e.charAt(n-1)===t.charAt(i-1)?r[n][i]=r[n-1][i-1]:n>1&&i>1&&e.charAt(n-2)===t.charAt(i-1)&&e.charAt(n-1)===t.charAt(i-2)?r[n][i]=r[n-2][i-2]+1:r[n][i]=Math.min(r[n-1][i-1]+1,Math.min(r[n][i-1]+1,r[n-1][i]+1));return r[e.length][t.length]}var ph=["$0","--","_"];function dh(t,e,r){let n=r.y18n.__,i=r.y18n.__n,o={};o.nonOptionCount=function(f){let p=t.getDemandedCommands(),m=f._.length+(f["--"]?f["--"].length:0)-t.getInternalMethods().getContext().commands.length;p._&&(m<p._.min||m>p._.max)&&(m<p._.min?p._.minMsg!==void 0?e.fail(p._.minMsg?p._.minMsg.replace(/\$0/g,m.toString()).replace(/\$1/,p._.min.toString()):null):e.fail(i("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",m,m.toString(),p._.min.toString())):m>p._.max&&(p._.maxMsg!==void 0?e.fail(p._.maxMsg?p._.maxMsg.replace(/\$0/g,m.toString()).replace(/\$1/,p._.max.toString()):null):e.fail(i("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",m,m.toString(),p._.max.toString()))))},o.positionalCount=function(f,p){p<f&&e.fail(i("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",p,p+"",f+""))},o.requiredArguments=function(f,p){let d=null;for(let m of Object.keys(p))(!Object.prototype.hasOwnProperty.call(f,m)||typeof f[m]>"u")&&(d=d||{},d[m]=p[m]);if(d){let m=[];for(let g of Object.keys(d)){let b=d[g];b&&m.indexOf(b)<0&&m.push(b)}let y=m.length?`
63
59
  ${m.join(`
64
- `)}`:"";e.fail(i("Missing required argument: %s","Missing required arguments: %s",Object.keys(d).length,Object.keys(d).join(", ")+y))}},o.unknownArguments=function(f,p,d,m,y=!0){var g;let b=t.getInternalMethods().getCommandInstance().getCommands(),w=[],C=t.getInternalMethods().getContext();if(Object.keys(f).forEach(D=>{!Dh.includes(D)&&!Object.prototype.hasOwnProperty.call(d,D)&&!Object.prototype.hasOwnProperty.call(t.getInternalMethods().getParseContext(),D)&&!o.isValidAndSomeAliasIsNotNew(D,p)&&w.push(D)}),y&&(C.commands.length>0||b.length>0||m)&&f._.slice(C.commands.length).forEach(D=>{b.includes(""+D)||w.push(""+D)}),y){let R=((g=t.getDemandedCommands()._)===null||g===void 0?void 0:g.max)||0,S=C.commands.length+R;S<f._.length&&f._.slice(S).forEach(de=>{de=String(de),!C.commands.includes(de)&&!w.includes(de)&&w.push(de)})}w.length&&e.fail(i("Unknown argument: %s","Unknown arguments: %s",w.length,w.map(D=>D.trim()?D:`"${D}"`).join(", ")))},o.unknownCommands=function(f){let p=t.getInternalMethods().getCommandInstance().getCommands(),d=[],m=t.getInternalMethods().getContext();return(m.commands.length>0||p.length>0)&&f._.slice(m.commands.length).forEach(y=>{p.includes(""+y)||d.push(""+y)}),d.length>0?(e.fail(i("Unknown command: %s","Unknown commands: %s",d.length,d.join(", "))),!0):!1},o.isValidAndSomeAliasIsNotNew=function(f,p){if(!Object.prototype.hasOwnProperty.call(p,f))return!1;let d=t.parsed.newAliases;return[f,...p[f]].some(m=>!Object.prototype.hasOwnProperty.call(d,m)||!d[f])},o.limitedChoices=function(f){let p=t.getOptions(),d={};if(!Object.keys(p.choices).length)return;Object.keys(f).forEach(g=>{Dh.indexOf(g)===-1&&Object.prototype.hasOwnProperty.call(p.choices,g)&&[].concat(f[g]).forEach(b=>{p.choices[g].indexOf(b)===-1&&b!==void 0&&(d[g]=(d[g]||[]).concat(b))})});let m=Object.keys(d);if(!m.length)return;let y=n("Invalid values:");m.forEach(g=>{y+=`
65
- ${n("Argument: %s, Given: %s, Choices: %s",g,e.stringifiedValues(d[g]),e.stringifiedValues(p.choices[g]))}`}),e.fail(y)};let s={};o.implies=function(f,p){H("<string|object> [array|number|string]",[f,p],arguments.length),typeof f=="object"?Object.keys(f).forEach(d=>{o.implies(d,f[d])}):(t.global(f),s[f]||(s[f]=[]),Array.isArray(p)?p.forEach(d=>o.implies(f,d)):(Nt(p,void 0,r),s[f].push(p)))},o.getImplied=function(){return s};function a(c,f){let p=Number(f);return f=isNaN(p)?f:p,typeof f=="number"?f=c._.length>=f:f.match(/^--no-.+/)?(f=f.match(/^--no-(.+)/)[1],f=!Object.prototype.hasOwnProperty.call(c,f)):f=Object.prototype.hasOwnProperty.call(c,f),f}o.implications=function(f){let p=[];if(Object.keys(s).forEach(d=>{let m=d;(s[d]||[]).forEach(y=>{let g=m,b=y;g=a(f,g),y=a(f,y),g&&!y&&p.push(` ${m} -> ${b}`)})}),p.length){let d=`${n("Implications failed:")}
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
- `),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
- `,"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.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
- ${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
- ${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
- `,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=`
60
+ `)}`:"";e.fail(i("Missing required argument: %s","Missing required arguments: %s",Object.keys(d).length,Object.keys(d).join(", ")+y))}},o.unknownArguments=function(f,p,d,m,y=!0){var g;let b=t.getInternalMethods().getCommandInstance().getCommands(),w=[],k=t.getInternalMethods().getContext();if(Object.keys(f).forEach(D=>{!ph.includes(D)&&!Object.prototype.hasOwnProperty.call(d,D)&&!Object.prototype.hasOwnProperty.call(t.getInternalMethods().getParseContext(),D)&&!o.isValidAndSomeAliasIsNotNew(D,p)&&w.push(D)}),y&&(k.commands.length>0||b.length>0||m)&&f._.slice(k.commands.length).forEach(D=>{b.includes(""+D)||w.push(""+D)}),y){let R=((g=t.getDemandedCommands()._)===null||g===void 0?void 0:g.max)||0,S=k.commands.length+R;S<f._.length&&f._.slice(S).forEach(de=>{de=String(de),!k.commands.includes(de)&&!w.includes(de)&&w.push(de)})}w.length&&e.fail(i("Unknown argument: %s","Unknown arguments: %s",w.length,w.map(D=>D.trim()?D:`"${D}"`).join(", ")))},o.unknownCommands=function(f){let p=t.getInternalMethods().getCommandInstance().getCommands(),d=[],m=t.getInternalMethods().getContext();return(m.commands.length>0||p.length>0)&&f._.slice(m.commands.length).forEach(y=>{p.includes(""+y)||d.push(""+y)}),d.length>0?(e.fail(i("Unknown command: %s","Unknown commands: %s",d.length,d.join(", "))),!0):!1},o.isValidAndSomeAliasIsNotNew=function(f,p){if(!Object.prototype.hasOwnProperty.call(p,f))return!1;let d=t.parsed.newAliases;return[f,...p[f]].some(m=>!Object.prototype.hasOwnProperty.call(d,m)||!d[f])},o.limitedChoices=function(f){let p=t.getOptions(),d={};if(!Object.keys(p.choices).length)return;Object.keys(f).forEach(g=>{ph.indexOf(g)===-1&&Object.prototype.hasOwnProperty.call(p.choices,g)&&[].concat(f[g]).forEach(b=>{p.choices[g].indexOf(b)===-1&&b!==void 0&&(d[g]=(d[g]||[]).concat(b))})});let m=Object.keys(d);if(!m.length)return;let y=n("Invalid values:");m.forEach(g=>{y+=`
61
+ ${n("Argument: %s, Given: %s, Choices: %s",g,e.stringifiedValues(d[g]),e.stringifiedValues(p.choices[g]))}`}),e.fail(y)};let s={};o.implies=function(f,p){H("<string|object> [array|number|string]",[f,p],arguments.length),typeof f=="object"?Object.keys(f).forEach(d=>{o.implies(d,f[d])}):(t.global(f),s[f]||(s[f]=[]),Array.isArray(p)?p.forEach(d=>o.implies(f,d)):(Rt(p,void 0,r),s[f].push(p)))},o.getImplied=function(){return s};function a(c,f){let p=Number(f);return f=isNaN(p)?f:p,typeof f=="number"?f=c._.length>=f:f.match(/^--no-.+/)?(f=f.match(/^--no-(.+)/)[1],f=!Object.prototype.hasOwnProperty.call(c,f)):f=Object.prototype.hasOwnProperty.call(c,f),f}o.implications=function(f){let p=[];if(Object.keys(s).forEach(d=>{let m=d;(s[d]||[]).forEach(y=>{let g=m,b=y;g=a(f,g),y=a(f,y),g&&!y&&p.push(` ${m} -> ${b}`)})}),p.length){let d=`${n("Implications failed:")}
62
+ `;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=fh(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=fn(s,p=>!f[p]),u=fn(u,p=>!f[p]),o};let l=[];return o.freeze=function(){l.push({implied:s,conflicting:u})},o.unfreeze=function(){let f=l.pop();Rt(f,void 0,r),{implied:s,conflicting:u}=f},o}var xc=[],ss;function as(t,e,r,n){ss=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=Rw(e,t.extends);else try{s=Er.resolve(t.extends)}catch{return t}Dw(s),xc.push(s),i=o?JSON.parse(ss.readFileSync(s,"utf8")):Er(t.extends),delete t.extends,i=as(i,ss.path.dirname(s),r,ss)}return xc=[],r?hh(i,t):Object.assign({},i,t)}function Dw(t){if(xc.indexOf(t)>-1)throw new $e(`Circular extended configurations: '${t}'.`)}function Rw(t,e){return ss.path.resolve(t,e)}function hh(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]=hh(t[i],e[i]):r[i]=e[i];return r}var Z=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)},nt,Hn,us,rr,Yt,ya,dn,Kn,ba,nr,Ea,ir,Ar,Zt,or,Aa,Wi,Et,re,ka,wa,Xt,Yn,Hi,Zn,hn,Ca,pe,Xn,Jn,Qn,ge,Ta,kr,Qe;function Nh(t){return(e=[],r=t.process.cwd(),n)=>{let i=new Ic(e,r,n,t);return Object.defineProperty(i,"argv",{get:()=>i.parse(),enumerable:!0}),i.help(),i.version(),i}}var mh=Symbol("copyDoubleDash"),gh=Symbol("copyDoubleDash"),yc=Symbol("deleteFromParserHintObject"),xh=Symbol("emitWarning"),yh=Symbol("freeze"),bh=Symbol("getDollarZero"),ei=Symbol("getParserConfiguration"),Eh=Symbol("getUsageConfiguration"),bc=Symbol("guessLocale"),Ah=Symbol("guessVersion"),kh=Symbol("parsePositionalNumbers"),Ec=Symbol("pkgUp"),mn=Symbol("populateParserHintArray"),Ki=Symbol("populateParserHintSingleValueDictionary"),Ac=Symbol("populateParserHintArrayDictionary"),kc=Symbol("populateParserHintDictionary"),wc=Symbol("sanitizeKey"),Cc=Symbol("setKey"),Tc=Symbol("unfreeze"),wh=Symbol("validateAsync"),Ch=Symbol("getCommandInstance"),Th=Symbol("getContext"),_h=Symbol("getHasOutput"),Sh=Symbol("getLoggerInstance"),Ih=Symbol("getParseContext"),Oh=Symbol("getUsageInstance"),vh=Symbol("getValidationInstance"),_a=Symbol("hasParseCallback"),Dh=Symbol("isGlobalContext"),ti=Symbol("postProcess"),Rh=Symbol("rebase"),_c=Symbol("reset"),ls=Symbol("runYargsParserAndExecuteCommands"),Sc=Symbol("runValidation"),Fh=Symbol("setHasOutput"),ri=Symbol("kTrackManuallySetKeys"),Ic=class{constructor(e=[],r,n,i){this.customScriptName=!1,this.parsed=!1,nt.set(this,void 0),Hn.set(this,void 0),us.set(this,{commands:[],fullCommands:[]}),rr.set(this,null),Yt.set(this,null),ya.set(this,"show-hidden"),dn.set(this,null),Kn.set(this,!0),ba.set(this,{}),nr.set(this,!0),Ea.set(this,[]),ir.set(this,void 0),Ar.set(this,{}),Zt.set(this,!1),or.set(this,null),Aa.set(this,!0),Wi.set(this,void 0),Et.set(this,""),re.set(this,void 0),ka.set(this,void 0),wa.set(this,{}),Xt.set(this,null),Yn.set(this,null),Hi.set(this,{}),Zn.set(this,{}),hn.set(this,void 0),Ca.set(this,!1),pe.set(this,void 0),Xn.set(this,!1),Jn.set(this,!1),Qn.set(this,!1),ge.set(this,void 0),Ta.set(this,{}),kr.set(this,null),Qe.set(this,void 0),Z(this,pe,i,"f"),Z(this,hn,e,"f"),Z(this,Hn,r,"f"),Z(this,ka,n,"f"),Z(this,ir,new ma(this),"f"),this.$0=this[bh](),this[_c](),Z(this,nt,h(this,nt,"f"),"f"),Z(this,ge,h(this,ge,"f"),"f"),Z(this,Qe,h(this,Qe,"f"),"f"),Z(this,re,h(this,re,"f"),"f"),h(this,re,"f").showHiddenOpt=h(this,ya,"f"),Z(this,Wi,this[gh](),"f")}addHelpOpt(e,r){let n="help";return H("[string|boolean] [string]",[e,r],arguments.length),h(this,or,"f")&&(this[yc](h(this,or,"f")),Z(this,or,null,"f")),e===!1&&r===void 0?this:(Z(this,or,typeof e=="string"?e:n,"f"),this.boolean(h(this,or,"f")),this.describe(h(this,or,"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,ya,"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[Ac](this.alias.bind(this),"alias",e,r),this}array(e){return H("<array|string>",[e],arguments.length),this[mn]("array",e),this[ri](e),this}boolean(e){return H("<array|string>",[e],arguments.length),this[mn]("boolean",e),this[ri](e),this}check(e,r){return H("<function> [boolean]",[e,r],arguments.length),this.middleware((n,i)=>Wn(()=>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,pe,"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[Ac](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,ir,"f").addCoerceMiddleware((n,i)=>{let o;return Object.prototype.hasOwnProperty.call(n,e)?Wn(()=>(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,Qe,"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=as(e,h(this,Hn,"f"),this[ei]()["deep-merge-config"]||!1,h(this,pe,"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),Z(this,Yt,e||h(this,Yt,"f")||"completion","f"),!r&&r!==!1&&(r="generate completion script"),this.command(h(this,Yt,"f"),r),n&&h(this,rr,"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,nt,"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,ka,"f")||h(this,pe,"f").require;return h(this,nt,"f").addDirectory(e,n,h(this,pe,"f").getCallerFile(),r),this}count(e){return H("<array|string>",[e],arguments.length),this[mn]("count",e),this[ri](e),this}default(e,r,n){return H("<object|string|array> [*] [string]",[e,r,n],arguments.length),n&&(pc(e,h(this,pe,"f")),h(this,re,"f").defaultDescription[e]=n),typeof r=="function"&&(pc(e,h(this,pe,"f")),h(this,re,"f").defaultDescription[e]||(h(this,re,"f").defaultDescription[e]=h(this,ge,"f").functionDescription(r)),r=r.call()),this[Ki](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=>{Rt(n,!0,h(this,pe,"f")),this.demandOption(i,n)}),r=1/0):typeof r!="number"&&(n=r,r=1/0),typeof e=="number"?(Rt(n,!0,h(this,pe,"f")),this.demandCommand(e,r,n,n)):Array.isArray(e)?e.forEach(i=>{Rt(n,!0,h(this,pe,"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[Ki](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[Cc](e,!0),h(this,ge,"f").describe(e,r),this}detectLocale(e){return H("<boolean>",[e],arguments.length),Z(this,Kn,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){Z(this,Zt,!0,"f"),Z(this,dn,r,"f"),h(this,nr,"f")&&h(this,pe,"f").process.exit(e)}exitProcess(e=!0){return H("[boolean]",[e],arguments.length),Z(this,nr,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,rr,"f").getCompletion(e,r):new Promise((n,i)=>{h(this,rr,"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,Kn,"f")}getExitProcess(){return h(this,nr,"f")}getGroups(){return Object.assign({},h(this,Ar,"f"),h(this,Zn,"f"))}getHelp(){if(Z(this,Zt,!0,"f"),!h(this,ge,"f").hasCachedHelpMessage()){if(!this.parsed){let r=this[ls](h(this,hn,"f"),void 0,void 0,0,!0);if(qe(r))return r.then(()=>h(this,ge,"f").help())}let e=h(this,nt,"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,Xn,"f")}getStrictCommands(){return h(this,Jn,"f")}getStrictOptions(){return h(this,Qn,"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,Zn,"f")[r]||h(this,Ar,"f")[r];h(this,Zn,"f")[r]&&delete h(this,Zn,"f")[r];let i={};return h(this,Ar,"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,Qe,"f").implies(e,r),this}locale(e){return H("[string]",[e],arguments.length),e===void 0?(this[bc](),h(this,pe,"f").y18n.getLocale()):(Z(this,Kn,!1,"f"),h(this,pe,"f").y18n.setLocale(e),this)}middleware(e,r,n){return h(this,ir,"f").addMiddleware(e,!!r,n)}nargs(e,r){return H("<string|object|array> [number]",[e,r],arguments.length),this[Ki](this.nargs.bind(this),"narg",e,r),this}normalize(e){return H("<array|string>",[e],arguments.length),this[mn]("normalize",e),this}number(e){return H("<array|string>",[e],arguments.length),this[mn]("number",e),this[ri](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[ri](e),h(this,kr,"f")&&(e==="version"||r?.alias==="version")&&this[xh](['"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(`
63
+ `),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[yh](),typeof e>"u"&&(e=h(this,hn,"f")),typeof r=="object"&&(Z(this,Yn,r,"f"),r=n),typeof r=="function"&&(Z(this,Xt,r,"f"),r=!1),r||Z(this,hn,e,"f"),h(this,Xt,"f")&&Z(this,nr,!1,"f");let i=this[ls](e,!!r),o=this.parsed;return h(this,rr,"f").setParsed(this.parsed),qe(i)?i.then(s=>(h(this,Xt,"f")&&h(this,Xt,"f").call(this,h(this,dn,"f"),s,h(this,Et,"f")),s)).catch(s=>{throw h(this,Xt,"f")&&h(this,Xt,"f")(s,this.parsed.argv,h(this,Et,"f")),s}).finally(()=>{this[Tc](),this.parsed=o}):(h(this,Xt,"f")&&h(this,Xt,"f").call(this,h(this,dn,"f"),i,h(this,Et,"f")),this[Tc](),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),Z(this,wa,e,"f"),this}pkgConf(e,r){H("<string> [string]",[e,r],arguments.length);let n=null,i=this[Ec](r||h(this,Hn,"f"));return i[e]&&typeof i[e]=="object"&&(n=as(i[e],r||h(this,Hn,"f"),this[ei]()["deep-merge-config"]||!1,h(this,pe,"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=fn(r,(s,a)=>s==="type"&&!["string","number","boolean"].includes(a)?!1:n.includes(s));let i=h(this,us,"f").fullCommands[h(this,us,"f").fullCommands.length-1],o=i?h(this,nt,"f").cmdToParseOptions(i):{array:[],alias:{},default:{},demand:{}};return Vi(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),Z(this,Ca,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[Ki](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,Wi,"f").log(h(this,rr,"f").generateCompletionScript(e,r||h(this,Yt,"f")||"completion")),this}showHelp(e){if(H("[string|function]",[e],arguments.length),Z(this,Zt,!0,"f"),!h(this,ge,"f").hasCachedHelpMessage()){if(!this.parsed){let n=this[ls](h(this,hn,"f"),void 0,void 0,0,!0);if(qe(n))return n.then(()=>{h(this,ge,"f").showHelp(e)}),this}let r=h(this,nt,"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[mn]("skipValidation",e),this}strict(e){return H("[boolean]",[e],arguments.length),Z(this,Xn,e!==!1,"f"),this}strictCommands(e){return H("[boolean]",[e],arguments.length),Z(this,Jn,e!==!1,"f"),this}strictOptions(e){return H("[boolean]",[e],arguments.length),Z(this,Qn,e!==!1,"f"),this}string(e){return H("<array|string>",[e],arguments.length),this[mn]("string",e),this[ri](e),this}terminalWidth(){return H([],0),h(this,pe,"f").process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return H("<object>",[e],arguments.length),Z(this,Kn,!1,"f"),h(this,pe,"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(Rt(e,null,h(this,pe,"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),Z(this,Ta,e,"f"),this}version(e,r,n){let i="version";if(H("[boolean|string] [string] [string]",[e,r,n],arguments.length),h(this,kr,"f")&&(this[yc](h(this,kr,"f")),h(this,ge,"f").version(void 0),Z(this,kr,null,"f")),arguments.length===0)n=this[Ah](),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 Z(this,kr,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,kr,"f")),this.describe(h(this,kr,"f"),r),this}wrap(e){return H("<number|null|undefined>",[e],arguments.length),h(this,ge,"f").wrap(e),this}[(nt=new WeakMap,Hn=new WeakMap,us=new WeakMap,rr=new WeakMap,Yt=new WeakMap,ya=new WeakMap,dn=new WeakMap,Kn=new WeakMap,ba=new WeakMap,nr=new WeakMap,Ea=new WeakMap,ir=new WeakMap,Ar=new WeakMap,Zt=new WeakMap,or=new WeakMap,Aa=new WeakMap,Wi=new WeakMap,Et=new WeakMap,re=new WeakMap,ka=new WeakMap,wa=new WeakMap,Xt=new WeakMap,Yn=new WeakMap,Hi=new WeakMap,Zn=new WeakMap,hn=new WeakMap,Ca=new WeakMap,pe=new WeakMap,Xn=new WeakMap,Jn=new WeakMap,Qn=new WeakMap,ge=new WeakMap,Ta=new WeakMap,kr=new WeakMap,Qe=new WeakMap,mh)](e){if(!e._||!e["--"])return e;e._.push.apply(e._,e["--"]);try{delete e["--"]}catch{}return e}[gh](){return{log:(...e)=>{this[_a]()||console.log(...e),Z(this,Zt,!0,"f"),h(this,Et,"f").length&&Z(this,Et,h(this,Et,"f")+`
64
+ `,"f"),Z(this,Et,h(this,Et,"f")+e.join(" "),"f")},error:(...e)=>{this[_a]()||console.error(...e),Z(this,Zt,!0,"f"),h(this,Et,"f").length&&Z(this,Et,h(this,Et,"f")+`
65
+ `,"f"),Z(this,Et,h(this,Et,"f")+e.join(" "),"f")}}}[yc](e){Vi(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]}[xh](e,r,n){h(this,ba,"f")[n]||(h(this,pe,"f").process.emitWarning(e,r),h(this,ba,"f")[n]=!0)}[yh](){h(this,Ea,"f").push({options:h(this,re,"f"),configObjects:h(this,re,"f").configObjects.slice(0),exitProcess:h(this,nr,"f"),groups:h(this,Ar,"f"),strict:h(this,Xn,"f"),strictCommands:h(this,Jn,"f"),strictOptions:h(this,Qn,"f"),completionCommand:h(this,Yt,"f"),output:h(this,Et,"f"),exitError:h(this,dn,"f"),hasOutput:h(this,Zt,"f"),parsed:this.parsed,parseFn:h(this,Xt,"f"),parseContext:h(this,Yn,"f")}),h(this,ge,"f").freeze(),h(this,Qe,"f").freeze(),h(this,nt,"f").freeze(),h(this,ir,"f").freeze()}[bh](){let e="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(h(this,pe,"f").process.argv()[0])?r=h(this,pe,"f").process.argv().slice(1,2):r=h(this,pe,"f").process.argv().slice(0,1),e=r.map(n=>{let i=this[Rh](h(this,Hn,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&i.length<n.length?i:n}).join(" ").trim(),h(this,pe,"f").getEnv("_")&&h(this,pe,"f").getProcessArgvBin()===h(this,pe,"f").getEnv("_")&&(e=h(this,pe,"f").getEnv("_").replace(`${h(this,pe,"f").path.dirname(h(this,pe,"f").process.execPath())}/`,"")),e}[ei](){return h(this,wa,"f")}[Eh](){return h(this,Ta,"f")}[bc](){if(!h(this,Kn,"f"))return;let e=h(this,pe,"f").getEnv("LC_ALL")||h(this,pe,"f").getEnv("LC_MESSAGES")||h(this,pe,"f").getEnv("LANG")||h(this,pe,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[Ah](){return this[Ec]().version||"unknown"}[kh](e){let r=e["--"]?e["--"]:e._;for(let n=0,i;(i=r[n])!==void 0;n++)h(this,pe,"f").Parser.looksLikeNumber(i)&&Number.isSafeInteger(Math.floor(parseFloat(`${i}`)))&&(r[n]=Number(i));return e}[Ec](e){let r=e||"*";if(h(this,Hi,"f")[r])return h(this,Hi,"f")[r];let n={};try{let i=e||h(this,pe,"f").mainFilename;!e&&h(this,pe,"f").path.extname(i)&&(i=h(this,pe,"f").path.dirname(i));let o=h(this,pe,"f").findUp(i,(s,a)=>{if(a.includes("package.json"))return"package.json"});Rt(o,void 0,h(this,pe,"f")),n=JSON.parse(h(this,pe,"f").readFileSync(o,"utf8"))}catch{}return h(this,Hi,"f")[r]=n||{},h(this,Hi,"f")[r]}[mn](e,r){r=[].concat(r),r.forEach(n=>{n=this[wc](n),h(this,re,"f")[e].push(n)})}[Ki](e,r,n,i){this[kc](e,r,n,i,(o,s,a)=>{h(this,re,"f")[o][s]=a})}[Ac](e,r,n,i){this[kc](e,r,n,i,(o,s,a)=>{h(this,re,"f")[o][s]=(h(this,re,"f")[o][s]||[]).concat(a)})}[kc](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 Vi(n))e(s,n[s]);else o(r,this[wc](n),i)}[wc](e){return e==="__proto__"?"___proto___":e}[Cc](e,r){return this[Ki](this[Cc].bind(this),"key",e,r),this}[Tc](){var e,r,n,i,o,s,a,u,l,c,f,p;let d=h(this,Ea,"f").pop();Rt(d,void 0,h(this,pe,"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){Z(e,re,y,"f")}}.value,configObjects:m,exitProcess:{set value(y){Z(r,nr,y,"f")}}.value,groups:{set value(y){Z(n,Ar,y,"f")}}.value,output:{set value(y){Z(i,Et,y,"f")}}.value,exitError:{set value(y){Z(o,dn,y,"f")}}.value,hasOutput:{set value(y){Z(s,Zt,y,"f")}}.value,parsed:this.parsed,strict:{set value(y){Z(a,Xn,y,"f")}}.value,strictCommands:{set value(y){Z(u,Jn,y,"f")}}.value,strictOptions:{set value(y){Z(l,Qn,y,"f")}}.value,completionCommand:{set value(y){Z(c,Yt,y,"f")}}.value,parseFn:{set value(y){Z(f,Xt,y,"f")}}.value,parseContext:{set value(y){Z(p,Yn,y,"f")}}.value}=d,h(this,re,"f").configObjects=m,h(this,ge,"f").unfreeze(),h(this,Qe,"f").unfreeze(),h(this,nt,"f").unfreeze(),h(this,ir,"f").unfreeze()}[wh](e,r){return Wn(r,n=>(e(n),n))}getInternalMethods(){return{getCommandInstance:this[Ch].bind(this),getContext:this[Th].bind(this),getHasOutput:this[_h].bind(this),getLoggerInstance:this[Sh].bind(this),getParseContext:this[Ih].bind(this),getParserConfiguration:this[ei].bind(this),getUsageConfiguration:this[Eh].bind(this),getUsageInstance:this[Oh].bind(this),getValidationInstance:this[vh].bind(this),hasParseCallback:this[_a].bind(this),isGlobalContext:this[Dh].bind(this),postProcess:this[ti].bind(this),reset:this[_c].bind(this),runValidation:this[Sc].bind(this),runYargsParserAndExecuteCommands:this[ls].bind(this),setHasOutput:this[Fh].bind(this)}}[Ch](){return h(this,nt,"f")}[Th](){return h(this,us,"f")}[_h](){return h(this,Zt,"f")}[Sh](){return h(this,Wi,"f")}[Ih](){return h(this,Yn,"f")||{}}[Oh](){return h(this,ge,"f")}[vh](){return h(this,Qe,"f")}[_a](){return!!h(this,Xt,"f")}[Dh](){return h(this,Aa,"f")}[ti](e,r,n,i){return n||qe(e)||(r||(e=this[mh](e)),(this[ei]()["parse-positional-numbers"]||this[ei]()["parse-positional-numbers"]===void 0)&&(e=this[kh](e)),i&&(e=Gn(e,this,h(this,ir,"f").getMiddleware(),!1))),e}[_c](e={}){Z(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,Zn,"f"),Object.keys(h(this,Ar,"f")).reduce((s,a)=>{let u=h(this,Ar,"f")[a].filter(l=>!(l in n));return u.length>0&&(s[a]=u),s},{})),Z(this,Ar,{},"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]=fn(h(this,re,"f")[s],a=>!n[a])}),r.envPrefix=h(this,re,"f").envPrefix,Z(this,re,r,"f"),Z(this,ge,h(this,ge,"f")?h(this,ge,"f").reset(n):ah(this,h(this,pe,"f")),"f"),Z(this,Qe,h(this,Qe,"f")?h(this,Qe,"f").reset(n):dh(this,h(this,ge,"f"),h(this,pe,"f")),"f"),Z(this,nt,h(this,nt,"f")?h(this,nt,"f").reset():ih(h(this,ge,"f"),h(this,Qe,"f"),h(this,ir,"f"),h(this,pe,"f")),"f"),h(this,rr,"f")||Z(this,rr,ch(this,h(this,ge,"f"),h(this,nt,"f"),h(this,pe,"f")),"f"),h(this,ir,"f").reset(),Z(this,Yt,null,"f"),Z(this,Et,"","f"),Z(this,dn,null,"f"),Z(this,Zt,!1,"f"),this.parsed=!1,this}[Rh](e,r){return h(this,pe,"f").path.relative(e,r)}[ls](e,r,n,i=0,o=!1){let s=!!n||o;e=e||h(this,hn,"f"),h(this,re,"f").__=h(this,pe,"f").y18n.__,h(this,re,"f").configuration=this[ei]();let a=!!h(this,re,"f").configuration["populate--"],u=Object.assign({},h(this,re,"f").configuration,{"populate--":!0}),l=h(this,pe,"f").Parser.detailed(e,Object.assign({},h(this,re,"f"),{configuration:{"parse-positional-numbers":!1,...u}})),c=Object.assign(l.argv,h(this,Yn,"f")),f,p=l.aliases,d=!1,m=!1;Object.keys(c).forEach(y=>{y===h(this,or,"f")&&c[y]?d=!0:y===h(this,kr,"f")&&c[y]&&(m=!0)}),c.$0=this.$0,this.parsed=l,i===0&&h(this,ge,"f").clearCachedHelpMessage();try{if(this[bc](),r)return this[ti](c,a,!!n,!1);h(this,or,"f")&&[h(this,or,"f")].concat(p[h(this,or,"f")]||[]).filter(k=>k.length>1).includes(""+c._[c._.length-1])&&(c._.pop(),d=!0),Z(this,Aa,!1,"f");let y=h(this,nt,"f").getCommands(),g=h(this,rr,"f").completionKey in c,b=d||g||o;if(c._.length){if(y.length){let w;for(let k=i||0,D;c._[k]!==void 0;k++)if(D=String(c._[k]),y.includes(D)&&D!==h(this,Yt,"f")){let R=h(this,nt,"f").runCommand(D,this,l,k+1,o,d||m||o);return this[ti](R,a,!!n,!1)}else if(!w&&D!==h(this,Yt,"f")){w=D;break}!h(this,nt,"f").hasDefaultCommand()&&h(this,Ca,"f")&&w&&!b&&h(this,Qe,"f").recommendCommands(w,y)}h(this,Yt,"f")&&c._.includes(h(this,Yt,"f"))&&!g&&(h(this,nr,"f")&&pn(!0),this.showCompletionScript(),this.exit(0))}if(h(this,nt,"f").hasDefaultCommand()&&!b){let w=h(this,nt,"f").runCommand(null,this,l,0,o,d||m||o);return this[ti](w,a,!!n,!1)}if(g){h(this,nr,"f")&&pn(!0),e=[].concat(e);let w=e.slice(e.indexOf(`--${h(this,rr,"f").completionKey}`)+1);return h(this,rr,"f").getCompletion(w,(k,D)=>{if(k)throw new $e(k.message);(D||[]).forEach(R=>{h(this,Wi,"f").log(R)}),this.exit(0)}),this[ti](c,!a,!!n,!1)}if(h(this,Zt,"f")||(d?(h(this,nr,"f")&&pn(!0),s=!0,this.showHelp("log"),this.exit(0)):m&&(h(this,nr,"f")&&pn(!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[Sc](p,{},l.error);n||(f=Gn(c,this,h(this,ir,"f").getMiddleware(),!0)),f=this[wh](w,f??c),qe(f)&&!n&&(f=f.then(()=>Gn(c,this,h(this,ir,"f").getMiddleware(),!1)))}}}catch(y){if(y instanceof $e)h(this,ge,"f").fail(y.message,y);else throw y}return this[ti](f??c,a,!!n,!0)}[Sc](e,r,n,i){let o={...this.getDemandedOptions()};return s=>{if(n)throw new $e(n.message);h(this,Qe,"f").nonOptionCount(s),h(this,Qe,"f").requiredArguments(s,o);let a=!1;h(this,Jn,"f")&&(a=h(this,Qe,"f").unknownCommands(s)),h(this,Xn,"f")&&!a?h(this,Qe,"f").unknownArguments(s,e,r,!!i):h(this,Qn,"f")&&h(this,Qe,"f").unknownArguments(s,e,{},!1,!1),h(this,Qe,"f").limitedChoices(s),h(this,Qe,"f").implications(s),h(this,Qe,"f").conflicting(s)}}[Fh](){Z(this,Zt,!0,"f")}[ri](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 oh(t){return!!t&&typeof t.getInternalMethods=="function"}var Fw=Nh(fc),Ph=Fw;var Lh="1.0.3";var Pa=ns(la(),1);import{cosmiconfig as om}from"cosmiconfig";import{TypeScriptLoader as sm}from"cosmiconfig-typescript-loader";import sT from"fs/promises";import lm from"path";var Oc=ns(jh(),1);function vc(t,e,r){if(typeof e=="number"&&(r=e),Oc.default.has(t.toLowerCase())){e=Oc.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 aT}from"read-pkg";import{deepMergeDefined as jc,log as lr,optionsSchema as uT,rulesSchema as lT}from"remark-mdat";var K={};Od(K,{BRAND:()=>uC,DIRTY:()=>ni,EMPTY_PATH:()=>Uw,INVALID:()=>ue,NEVER:()=>WC,OK:()=>_t,ParseStatus:()=>Ct,Schema:()=>ke,ZodAny:()=>yn,ZodArray:()=>Zr,ZodBigInt:()=>oi,ZodBoolean:()=>si,ZodBranded:()=>fs,ZodCatch:()=>xi,ZodDate:()=>ai,ZodDefault:()=>gi,ZodDiscriminatedUnion:()=>Oa,ZodEffects:()=>ur,ZodEnum:()=>hi,ZodError:()=>zt,ZodFirstPartyTypeKind:()=>ce,ZodFunction:()=>Da,ZodIntersection:()=>fi,ZodIssueCode:()=>N,ZodLazy:()=>pi,ZodLiteral:()=>di,ZodMap:()=>eo,ZodNaN:()=>ro,ZodNativeEnum:()=>mi,ZodNever:()=>mr,ZodNull:()=>li,ZodNullable:()=>Tr,ZodNumber:()=>ii,ZodObject:()=>$t,ZodOptional:()=>sr,ZodParsedType:()=>q,ZodPipeline:()=>ps,ZodPromise:()=>bn,ZodReadonly:()=>yi,ZodRecord:()=>va,ZodSchema:()=>ke,ZodSet:()=>to,ZodString:()=>xn,ZodSymbol:()=>Ji,ZodTransformer:()=>ur,ZodTuple:()=>Cr,ZodType:()=>ke,ZodUndefined:()=>ui,ZodUnion:()=>ci,ZodUnknown:()=>Yr,ZodVoid:()=>Qi,addIssueToContext:()=>U,any:()=>xC,array:()=>AC,bigint:()=>pC,boolean:()=>Zh,coerce:()=>GC,custom:()=>Hh,date:()=>dC,datetimeRegex:()=>Gh,defaultErrorMap:()=>Hr,discriminatedUnion:()=>TC,effect:()=>MC,enum:()=>NC,function:()=>DC,getErrorMap:()=>Yi,getParsedType:()=>wr,instanceof:()=>cC,intersection:()=>_C,isAborted:()=>Sa,isAsync:()=>Zi,isDirty:()=>Ia,isValid:()=>gn,late:()=>lC,lazy:()=>RC,literal:()=>FC,makeIssue:()=>cs,map:()=>OC,nan:()=>fC,nativeEnum:()=>PC,never:()=>bC,null:()=>gC,nullable:()=>jC,number:()=>Yh,object:()=>kC,objectUtil:()=>Dc,oboolean:()=>VC,onumber:()=>qC,optional:()=>BC,ostring:()=>$C,pipeline:()=>zC,preprocess:()=>UC,promise:()=>LC,quotelessJson:()=>Mw,record:()=>IC,set:()=>vC,setErrorMap:()=>jw,strictObject:()=>wC,string:()=>Kh,symbol:()=>hC,transformer:()=>MC,tuple:()=>SC,undefined:()=>mC,union:()=>CC,unknown:()=>yC,util:()=>_e,void:()=>EC});var _e;(function(t){t.assertEqual=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"&&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})(_e||(_e={}));var Dc;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Dc||(Dc={}));var q=_e.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),wr=t=>{switch(typeof t){case"undefined":return q.undefined;case"string":return q.string;case"number":return Number.isNaN(t)?q.nan:q.number;case"boolean":return q.boolean;case"function":return q.function;case"bigint":return q.bigint;case"symbol":return q.symbol;case"object":return Array.isArray(t)?q.array:t===null?q.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?q.promise:typeof Map<"u"&&t instanceof Map?q.map:typeof Set<"u"&&t instanceof Set?q.set:typeof Date<"u"&&t instanceof Date?q.date:q.object;default:return q.unknown}};var N=_e.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"]),Mw=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),zt=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,_e.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let i of this.issues)if(i.path.length>0){let o=i.path[0];r[o]=r[o]||[],r[o].push(e(i))}else n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};zt.create=t=>new zt(t);var Bw=(t,e)=>{let r;switch(t.code){case N.invalid_type:t.received===q.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case N.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,_e.jsonStringifyReplacer)}`;break;case N.unrecognized_keys:r=`Unrecognized key(s) in object: ${_e.joinValues(t.keys,", ")}`;break;case N.invalid_union:r="Invalid input";break;case N.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${_e.joinValues(t.options)}`;break;case N.invalid_enum_value:r=`Invalid enum value. Expected ${_e.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}"`:_e.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==="bigint"?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,_e.assertNever(t)}return{message:r}},Hr=Bw;var Uh=Hr;function jw(t){Uh=t}function Yi(){return Uh}var cs=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}},Uw=[];function U(t,e){let r=Yi(),n=cs({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Hr?void 0:Hr].filter(i=>!!i)});t.common.issues.push(n)}var Ct=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 ue;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 ue;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}}},ue=Object.freeze({status:"aborted"}),ni=t=>({status:"dirty",value:t}),_t=t=>({status:"valid",value:t}),Sa=t=>t.status==="aborted",Ia=t=>t.status==="dirty",gn=t=>t.status==="valid",Zi=t=>typeof Promise<"u"&&t instanceof Promise;var J;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(J||(J={}));var ar=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||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},zh=(t,e)=>{if(gn(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 zt(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)=>{let{message:u}=t;return s.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:u??n??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:u??r??a.defaultError}},description:i}}var ke=class{get description(){return this._def.description}_getType(e){return wr(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:wr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Ct,ctx:{common:e.parent.common,data:e.data,parsedType:wr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Zi(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){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:wr(e)},i=this._parseSync({data:e,path:n.path,parent:n});return zh(n,i)}"~validate"(e){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:wr(e)};if(!this["~standard"].async)try{let n=this._parseSync({data:e,path:[],parent:r});return gn(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(n=>gn(n)?{value:n.value}:{issues:r.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:wr(e)},i=this._parse({data:e,path:n.path,parent:n}),o=await(Zi(i)?i:Promise.resolve(i));return zh(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 ur({schema:this,typeName:ce.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 sr.create(this,this._def)}nullable(){return Tr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Zr.create(this)}promise(){return bn.create(this,this._def)}or(e){return ci.create([this,e],this._def)}and(e){return fi.create(this,e,this._def)}transform(e){return new ur({...Ae(this._def),schema:this,typeName:ce.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new gi({...Ae(this._def),innerType:this,defaultValue:r,typeName:ce.ZodDefault})}brand(){return new fs({typeName:ce.ZodBranded,type:this,...Ae(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new xi({...Ae(this._def),innerType:this,catchValue:r,typeName:ce.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return ps.create(this,e)}readonly(){return yi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},zw=/^c[^\s-]{8,}$/i,$w=/^[0-9a-z]+$/,qw=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Vw=/^[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,Gw=/^[a-z0-9_-]{21}$/i,Ww=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Hw=/^[-+]?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)?)??$/,Kw=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Yw="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Rc,Zw=/^(?:(?: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])$/,Xw=/^(?:(?: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])$/,Jw=/^(([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]))$/,Qw=/^(([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])$/,eC=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,tC=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,qh="((\\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])))",rC=new RegExp(`^${qh}$`);function Vh(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function nC(t){return new RegExp(`^${Vh(t)}$`)}function Gh(t){let e=`${qh}T${Vh(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 iC(t,e){return!!((e==="v4"||!e)&&Zw.test(t)||(e==="v6"||!e)&&Jw.test(t))}function oC(t,e){if(!Ww.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let 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||"typ"in i&&i?.typ!=="JWT"||!i.alg||e&&i.alg!==e)}catch{return!1}}function sC(t,e){return!!((e==="v4"||!e)&&Xw.test(t)||(e==="v6"||!e)&&Qw.test(t))}var xn=class t extends ke{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==q.string){let o=this._getOrReturnCtx(e);return U(o,{code:N.invalid_type,expected:q.string,received:o.parsedType}),ue}let n=new Ct,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")Kw.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")Rc||(Rc=new RegExp(Yw,"u")),Rc.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")Vw.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")Gw.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")zw.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")$w.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")qw.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"?Gh(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"?rC.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{code:N.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?nC(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"?Hw.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"duration",code:N.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?iC(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"?oC(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"?sC(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"?eC.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"base64",code:N.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?tC.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"base64url",code:N.invalid_string,message:o.message}),n.dirty()):_e.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,...J.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...J.errToObj(e)})}url(e){return this._addCheck({kind:"url",...J.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...J.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...J.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...J.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...J.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...J.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...J.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...J.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...J.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...J.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...J.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...J.errToObj(e)})}datetime(e){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:e?.offset??!1,local:e?.local??!1,...J.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,...J.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...J.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...J.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...J.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...J.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...J.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...J.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...J.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...J.errToObj(r)})}nonempty(e){return this.min(1,J.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}};xn.create=t=>new xn({checks:[],typeName:ce.ZodString,coerce:t?.coerce??!1,...Ae(t)});function aC(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,o=Number.parseInt(t.toFixed(i).replace(".","")),s=Number.parseInt(e.toFixed(i).replace(".",""));return o%s/10**i}var ii=class t extends ke{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)!==q.number){let o=this._getOrReturnCtx(e);return U(o,{code:N.invalid_type,expected:q.number,received:o.parsedType}),ue}let n,i=new Ct;for(let o of this._def.checks)o.kind==="int"?_e.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"?aC(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()):_e.assertNever(o);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,J.toString(r))}gt(e,r){return this.setLimit("min",e,!1,J.toString(r))}lte(e,r){return this.setLimit("max",e,!0,J.toString(r))}lt(e,r){return this.setLimit("max",e,!1,J.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:J.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:J.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:J.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:J.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:J.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:J.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:J.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:J.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:J.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:J.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"&&_e.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)}};ii.create=t=>new ii({checks:[],typeName:ce.ZodNumber,coerce:t?.coerce||!1,...Ae(t)});var oi=class t extends ke{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)!==q.bigint)return this._getInvalidInput(e);let n,i=new Ct;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()):_e.assertNever(o);return{status:i.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return U(r,{code:N.invalid_type,expected:q.bigint,received:r.parsedType}),ue}gte(e,r){return this.setLimit("min",e,!0,J.toString(r))}gt(e,r){return this.setLimit("min",e,!1,J.toString(r))}lte(e,r){return this.setLimit("max",e,!0,J.toString(r))}lt(e,r){return this.setLimit("max",e,!1,J.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:J.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:J.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:J.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:J.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:J.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:J.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}};oi.create=t=>new oi({checks:[],typeName:ce.ZodBigInt,coerce:t?.coerce??!1,...Ae(t)});var si=class extends ke{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==q.boolean){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:q.boolean,received:n.parsedType}),ue}return _t(e.data)}};si.create=t=>new si({typeName:ce.ZodBoolean,coerce:t?.coerce||!1,...Ae(t)});var ai=class t extends ke{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==q.date){let o=this._getOrReturnCtx(e);return U(o,{code:N.invalid_type,expected:q.date,received:o.parsedType}),ue}if(Number.isNaN(e.data.getTime())){let o=this._getOrReturnCtx(e);return U(o,{code:N.invalid_date}),ue}let n=new Ct,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()):_e.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:J.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:J.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}};ai.create=t=>new ai({checks:[],coerce:t?.coerce||!1,typeName:ce.ZodDate,...Ae(t)});var Ji=class extends ke{_parse(e){if(this._getType(e)!==q.symbol){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:q.symbol,received:n.parsedType}),ue}return _t(e.data)}};Ji.create=t=>new Ji({typeName:ce.ZodSymbol,...Ae(t)});var ui=class extends ke{_parse(e){if(this._getType(e)!==q.undefined){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:q.undefined,received:n.parsedType}),ue}return _t(e.data)}};ui.create=t=>new ui({typeName:ce.ZodUndefined,...Ae(t)});var li=class extends ke{_parse(e){if(this._getType(e)!==q.null){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:q.null,received:n.parsedType}),ue}return _t(e.data)}};li.create=t=>new li({typeName:ce.ZodNull,...Ae(t)});var yn=class extends ke{constructor(){super(...arguments),this._any=!0}_parse(e){return _t(e.data)}};yn.create=t=>new yn({typeName:ce.ZodAny,...Ae(t)});var Yr=class extends ke{constructor(){super(...arguments),this._unknown=!0}_parse(e){return _t(e.data)}};Yr.create=t=>new Yr({typeName:ce.ZodUnknown,...Ae(t)});var mr=class extends ke{_parse(e){let r=this._getOrReturnCtx(e);return U(r,{code:N.invalid_type,expected:q.never,received:r.parsedType}),ue}};mr.create=t=>new mr({typeName:ce.ZodNever,...Ae(t)});var Qi=class extends ke{_parse(e){if(this._getType(e)!==q.undefined){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:q.void,received:n.parsedType}),ue}return _t(e.data)}};Qi.create=t=>new Qi({typeName:ce.ZodVoid,...Ae(t)});var Zr=class t extends ke{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==q.array)return U(r,{code:N.invalid_type,expected:q.array,received:r.parsedType}),ue;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 ar(r,s,r.path,a)))).then(s=>Ct.mergeArray(n,s));let o=[...r.data].map((s,a)=>i.type._parseSync(new ar(r,s,r.path,a)));return Ct.mergeArray(n,o)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:J.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:J.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:J.toString(r)}})}nonempty(e){return this.min(1,e)}};Zr.create=(t,e)=>new Zr({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ce.ZodArray,...Ae(e)});function Xi(t){if(t instanceof $t){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=sr.create(Xi(n))}return new $t({...t._def,shape:()=>e})}else return t instanceof Zr?new Zr({...t._def,type:Xi(t.element)}):t instanceof sr?sr.create(Xi(t.unwrap())):t instanceof Tr?Tr.create(Xi(t.unwrap())):t instanceof Cr?Cr.create(t.items.map(e=>Xi(e))):t}var $t=class t extends ke{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=_e.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==q.object){let l=this._getOrReturnCtx(e);return U(l,{code:N.invalid_type,expected:q.object,received:l.parsedType}),ue}let{status:n,ctx:i}=this._processInputParams(e),{shape:o,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof mr&&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 ar(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof mr){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 ar(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=>Ct.mergeObjectSync(n,l)):Ct.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return J.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{let i=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:J.errToObj(e).message??i}:{message:i}}}:{}})}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:ce.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of _e.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let n of _e.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}deepPartial(){return Xi(this)}partial(e){let r={};for(let n of _e.objectKeys(this.shape)){let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let n of _e.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof sr;)o=o._def.innerType;r[n]=o}return new t({...this._def,shape:()=>r})}keyof(){return Wh(_e.objectKeys(this.shape))}};$t.create=(t,e)=>new $t({shape:()=>t,unknownKeys:"strip",catchall:mr.create(),typeName:ce.ZodObject,...Ae(e)});$t.strictCreate=(t,e)=>new $t({shape:()=>t,unknownKeys:"strict",catchall:mr.create(),typeName:ce.ZodObject,...Ae(e)});$t.lazycreate=(t,e)=>new $t({shape:t,unknownKeys:"strip",catchall:mr.create(),typeName:ce.ZodObject,...Ae(e)});var ci=class extends ke{_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 zt(a.ctx.common.issues));return U(r,{code:N.invalid_union,unionErrors:s}),ue}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 zt(u));return U(r,{code:N.invalid_union,unionErrors:a}),ue}}get options(){return this._def.options}};ci.create=(t,e)=>new ci({options:t,typeName:ce.ZodUnion,...Ae(e)});var Kr=t=>t instanceof pi?Kr(t.schema):t instanceof ur?Kr(t.innerType()):t instanceof di?[t.value]:t instanceof hi?t.options:t instanceof mi?_e.objectValues(t.enum):t instanceof gi?Kr(t._def.innerType):t instanceof ui?[void 0]:t instanceof li?[null]:t instanceof sr?[void 0,...Kr(t.unwrap())]:t instanceof Tr?[null,...Kr(t.unwrap())]:t instanceof fs||t instanceof yi?Kr(t.unwrap()):t instanceof xi?Kr(t._def.innerType):[],Oa=class t extends ke{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==q.object)return U(r,{code:N.invalid_type,expected:q.object,received:r.parsedType}),ue;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]}),ue)}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=Kr(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:ce.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...Ae(n)})}};function Fc(t,e){let r=wr(t),n=wr(e);if(t===e)return{valid:!0,data:t};if(r===q.object&&n===q.object){let i=_e.objectKeys(e),o=_e.objectKeys(t).filter(a=>i.indexOf(a)!==-1),s={...t,...e};for(let a of o){let u=Fc(t[a],e[a]);if(!u.valid)return{valid:!1};s[a]=u.data}return{valid:!0,data:s}}else if(r===q.array&&n===q.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=Fc(s,a);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return r===q.date&&n===q.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var fi=class extends ke{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(o,s)=>{if(Sa(o)||Sa(s))return ue;let a=Fc(o.value,s.value);return a.valid?((Ia(o)||Ia(s))&&r.dirty(),{status:r.value,value:a.data}):(U(n,{code:N.invalid_intersection_types}),ue)};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}))}};fi.create=(t,e,r)=>new fi({left:t,right:e,typeName:ce.ZodIntersection,...Ae(r)});var Cr=class t extends ke{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.array)return U(n,{code:N.invalid_type,expected:q.array,received:n.parsedType}),ue;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"}),ue;!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 ar(n,s,n.path,a)):null}).filter(s=>!!s);return n.common.async?Promise.all(o).then(s=>Ct.mergeArray(r,s)):Ct.mergeArray(r,o)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Cr.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Cr({items:t,typeName:ce.ZodTuple,rest:null,...Ae(e)})};var va=class t extends ke{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!==q.object)return U(n,{code:N.invalid_type,expected:q.object,received:n.parsedType}),ue;let i=[],o=this._def.keyType,s=this._def.valueType;for(let a in n.data)i.push({key:o._parse(new ar(n,a,n.path,a)),value:s._parse(new ar(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?Ct.mergeObjectAsync(r,i):Ct.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof ke?new t({keyType:e,valueType:r,typeName:ce.ZodRecord,...Ae(n)}):new t({keyType:xn.create(),valueType:e,typeName:ce.ZodRecord,...Ae(r)})}},eo=class extends ke{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!==q.map)return U(n,{code:N.invalid_type,expected:q.map,received:n.parsedType}),ue;let i=this._def.keyType,o=this._def.valueType,s=[...n.data.entries()].map(([a,u],l)=>({key:i._parse(new ar(n,a,n.path,[l,"key"])),value:o._parse(new ar(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 ue;(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 ue;(l.status==="dirty"||c.status==="dirty")&&r.dirty(),a.set(l.value,c.value)}return{status:r.value,value:a}}}};eo.create=(t,e,r)=>new eo({valueType:e,keyType:t,typeName:ce.ZodMap,...Ae(r)});var to=class t extends ke{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.set)return U(n,{code:N.invalid_type,expected:q.set,received:n.parsedType}),ue;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 ue;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 ar(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:J.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:J.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};to.create=(t,e)=>new to({valueType:t,minSize:null,maxSize:null,typeName:ce.ZodSet,...Ae(e)});var Da=class t extends ke{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==q.function)return U(r,{code:N.invalid_type,expected:q.function,received:r.parsedType}),ue;function n(a,u){return cs({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Yi(),Hr].filter(l=>!!l),issueData:{code:N.invalid_arguments,argumentsError:u}})}function i(a,u){return cs({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Yi(),Hr].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 bn){let a=this;return _t(async function(...u){let l=new zt([]),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 _t(function(...u){let l=a._def.args.safeParse(u,o);if(!l.success)throw new zt([n(u,l.error)]);let c=Reflect.apply(s,this,l.data),f=a._def.returns.safeParse(c,o);if(!f.success)throw new zt([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:Cr.create(e).rest(Yr.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||Cr.create([]).rest(Yr.create()),returns:r||Yr.create(),typeName:ce.ZodFunction,...Ae(n)})}},pi=class extends ke{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})}};pi.create=(t,e)=>new pi({getter:t,typeName:ce.ZodLazy,...Ae(e)});var di=class extends ke{_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}),ue}return{status:"valid",value:e.data}}get value(){return this._def.value}};di.create=(t,e)=>new di({value:t,typeName:ce.ZodLiteral,...Ae(e)});function Wh(t,e){return new hi({values:t,typeName:ce.ZodEnum,...Ae(e)})}var hi=class t extends ke{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return U(r,{expected:_e.joinValues(n),received:r.parsedType,code:N.invalid_type}),ue}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.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}),ue}return _t(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})}};hi.create=Wh;var mi=class extends ke{_parse(e){let r=_e.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==q.string&&n.parsedType!==q.number){let i=_e.objectValues(r);return U(n,{expected:_e.joinValues(i),received:n.parsedType,code:N.invalid_type}),ue}if(this._cache||(this._cache=new Set(_e.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let i=_e.objectValues(r);return U(n,{received:n.data,code:N.invalid_enum_value,options:i}),ue}return _t(e.data)}get enum(){return this._def.values}};mi.create=(t,e)=>new mi({values:t,typeName:ce.ZodNativeEnum,...Ae(e)});var bn=class extends ke{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==q.promise&&r.common.async===!1)return U(r,{code:N.invalid_type,expected:q.promise,received:r.parsedType}),ue;let n=r.parsedType===q.promise?r.data:Promise.resolve(r.data);return _t(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};bn.create=(t,e)=>new bn({type:t,typeName:ce.ZodPromise,...Ae(e)});var ur=class extends ke{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ce.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 ue;let u=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return u.status==="aborted"?ue:u.status==="dirty"?ni(u.value):r.value==="dirty"?ni(u.value):u});{if(r.value==="aborted")return ue;let a=this._def.schema._parseSync({data:s,path:n.path,parent:n});return a.status==="aborted"?ue:a.status==="dirty"?ni(a.value):r.value==="dirty"?ni(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"?ue:(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"?ue:(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(!gn(s))return ue;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=>gn(s)?Promise.resolve(i.transform(s.value,o)).then(a=>({status:r.value,value:a})):ue);_e.assertNever(i)}};ur.create=(t,e,r)=>new ur({schema:t,typeName:ce.ZodEffects,effect:e,...Ae(r)});ur.createWithPreprocess=(t,e,r)=>new ur({schema:e,effect:{type:"preprocess",transform:t},typeName:ce.ZodEffects,...Ae(r)});var sr=class extends ke{_parse(e){return this._getType(e)===q.undefined?_t(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};sr.create=(t,e)=>new sr({innerType:t,typeName:ce.ZodOptional,...Ae(e)});var Tr=class extends ke{_parse(e){return this._getType(e)===q.null?_t(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Tr.create=(t,e)=>new Tr({innerType:t,typeName:ce.ZodNullable,...Ae(e)});var gi=class extends ke{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===q.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};gi.create=(t,e)=>new gi({innerType:t,typeName:ce.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ae(e)});var xi=class extends ke{_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 Zi(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new zt(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new zt(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};xi.create=(t,e)=>new xi({innerType:t,typeName:ce.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ae(e)});var ro=class extends ke{_parse(e){if(this._getType(e)!==q.nan){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:q.nan,received:n.parsedType}),ue}return{status:"valid",value:e.data}}};ro.create=t=>new ro({typeName:ce.ZodNaN,...Ae(t)});var uC=Symbol("zod_brand"),fs=class extends ke{_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}},ps=class t extends ke{_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"?ue:o.status==="dirty"?(r.dirty(),ni(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"?ue: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:ce.ZodPipeline})}},yi=class extends ke{_parse(e){let r=this._def.innerType._parse(e),n=i=>(gn(i)&&(i.value=Object.freeze(i.value)),i);return Zi(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};yi.create=(t,e)=>new yi({innerType:t,typeName:ce.ZodReadonly,...Ae(e)});function $h(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function Hh(t,e={},r){return t?yn.create().superRefine((n,i)=>{let o=t(n);if(o instanceof Promise)return o.then(s=>{if(!s){let a=$h(e,n),u=a.fatal??r??!0;i.addIssue({code:"custom",...a,fatal:u})}});if(!o){let s=$h(e,n),a=s.fatal??r??!0;i.addIssue({code:"custom",...s,fatal:a})}}):yn.create()}var lC={object:$t.lazycreate},ce;(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"})(ce||(ce={}));var cC=(t,e={message:`Input not instance of ${t.name}`})=>Hh(r=>r instanceof t,e),Kh=xn.create,Yh=ii.create,fC=ro.create,pC=oi.create,Zh=si.create,dC=ai.create,hC=Ji.create,mC=ui.create,gC=li.create,xC=yn.create,yC=Yr.create,bC=mr.create,EC=Qi.create,AC=Zr.create,kC=$t.create,wC=$t.strictCreate,CC=ci.create,TC=Oa.create,_C=fi.create,SC=Cr.create,IC=va.create,OC=eo.create,vC=to.create,DC=Da.create,RC=pi.create,FC=di.create,NC=hi.create,PC=mi.create,LC=bn.create,MC=ur.create,BC=sr.create,jC=Tr.create,UC=ur.createWithPreprocess,zC=ps.create,$C=()=>Kh().optional(),qC=()=>Yh().optional(),VC=()=>Zh().optional(),GC={string:(t=>xn.create({...t,coerce:!0})),number:(t=>ii.create({...t,coerce:!0})),boolean:(t=>si.create({...t,coerce:!0})),bigint:(t=>oi.create({...t,coerce:!0})),date:(t=>ai.create({...t,coerce:!0}))};var WC=ue;import{defaultLoaders as HC}from"cosmiconfig";function Nc(t,e){let r=HC[".json"],n=r(t,e);return Xh(n)}function Xh(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)?Xh(i,o,r):i===null?r[o]="null":r[o]=i.toString()}return r}import rT from"fs";import Xr from"path";import JC from"process";import KC from"process";import YC from"fs/promises";import{fileURLToPath as ZC}from"url";import Bj from"fs";import no from"path";var Jh=t=>t instanceof URL?ZC(t):t;async function Ra(t,{cwd:e=KC.cwd(),type:r="file",stopAt:n}={}){let i=no.resolve(Jh(e)??""),{root:o}=no.parse(i);n=no.resolve(i,Jh(n??o));let s=no.isAbsolute(t);for(;i;){let a=s?t:no.join(i,t);try{let u=await YC.stat(a);if(r==="file"&&u.isFile()||r==="directory"&&u.isDirectory())return a}catch{}if(i===n||i===o)break;i=no.dirname(i)}}async function Qh({cwd:t=JC.cwd()}={}){return Ra("package.json",{cwd:t})}import QC from"fs";import eT from"fs/promises";async function Pc(t,e,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await eT[t](r))[e]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}function Lc(t,e,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return QC[t](r)[e]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}var io=Pc.bind(void 0,"stat","isFile"),Wj=Pc.bind(void 0,"stat","isDirectory"),Hj=Pc.bind(void 0,"lstat","isSymbolicLink"),Mc=Lc.bind(void 0,"statSync","isFile"),Kj=Lc.bind(void 0,"statSync","isDirectory"),Yj=Lc.bind(void 0,"lstatSync","isSymbolicLink");import{log as tm}from"remark-mdat";import{Configuration as nT}from"unified-engine";import tT from"os";var em=tT.homedir();function Bc(t){if(typeof t!="string")throw new TypeError(`Expected a string, got ${typeof t}`);return em?t.replace(/^~(?=$|\/|\\)/,em):t}function iT(t,e){let r=e===0?1:Math.floor(Math.log10(Math.abs(e))+1);return t.toString().padStart(r,"0")}function nm(t,e,r,n){let i=[];for(let[o,s]of t.entries()){let a=r&&t.length>1?`-${iT(o+1,t.length+1)}`:"",u=oT(s,e,r,n,a);i.push(u)}return i}function oT(t,e,r,n,i=""){let o=rm(t),s=e?rm(e):void 0;if(!Mc(o))throw new Error(`Input file not found: "${o}"`);if(s){if(Mc(s))throw new Error(`Output path must be a directory, received a file path: "${s}"`);rT.mkdirSync(s,{recursive:!0})}let a=r?Xr.basename(r,Xr.extname(r)):Xr.basename(o,Xr.extname(o)),u=`.${n??(r&&Xr.extname(r)!==""?Xr.extname(r):Xr.extname(t)===""?"":Xr.extname(t))}`,l=`${a}${i}${u}`,c=s??Xr.dirname(o);return{input:o,name:l,output:c}}function rm(t){return Bc(t)}async function Fa(){return Qh()}function Na(t){return t==null?[]:Array.isArray(t)?t:[t]}async function im(){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?tm.info('No ambient Remark configuration file found"'):tm.info(`Found and loaded ambient Remark configuration from "${r}"`),e}throw new Error("Failed to load ambient remark configuration")}var am=uT.merge(K.object({assetsPath:K.string().optional(),packageFile:K.string().optional()})).describe("Config Extension");async function bi(t){let{additionalConfig:e,additionalRules:r,searchFrom:n}=t??{},i={addMetaComment:!1,assetsPath:"./assets",closingPrefix:"/",keywordPrefix:"",metaCommentIdentifier:"+",packageFile:await Fa(),rules:{mdat:"Powered by the Markdown Autophagic Template system: [mdat](https://github.com/kitschpatrol/mdat)."}},o=om("mdat",{loaders:{".ts":sm()}}),s=await o.search(n);if(s){let{config:a,filepath:u}=s,l=a;if(lr.info(`Using config from "${u}"`),u.endsWith("package.json")&&typeof a=="string"){lr.info(`Detected shared config string: "${a}"`);let{default:f}=await import(a);l=f}let c=um(l,am);c&&(i=jc(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;lr.info(`Loaded additional config from "${d}"`),l=p}else l=u;if(l===void 0)continue;lr.info("Merging configuration object");let c=um(l,am);c!==void 0&&(i=jc(i,c))}}if(r!==void 0){let a=Array.isArray(r)?r:[r],u=om("mdat",{loaders:{".json":Nc,".ts":sm()}});for(let l of a){let c;if(typeof l=="string"){let p;if(lm.basename(l).endsWith("package.json")){let y=await sT.readFile(l,"utf8");p={config:Nc(l,y),filepath:l}}else p=await u.load(l);if(p==null)continue;let{config:d,filepath:m}=p;lr.info(`Loaded additional config from "${m}"`),c=d}else c=l;if(c===void 0)continue;lr.info("Merging rules into configuration object");let f=cT(c,lT);f!==void 0&&(i=jc(i,f))}}if(i.rules){let a=Object.keys(i.rules).sort().map(u=>`"${Pa.default.green(Pa.default.bold(u))}"`);lr.info(`Loaded ${Pa.default.bold(a.length)} mdat comment expansion ${vc("rule",a.length)}:`);for(let u of a)lr.info(` ${u}`)}else lr.error("No rules loaded from additional configurations or rules, using default.");return La=i,i}function cT(t,e){if(e.safeParse(t).success)return{rules:t};lr.error(`Rules object has the wrong shape. Ignoring and using default configuration:
66
+ ${JSON.stringify(t,void 0,2)}`)}function um(t,e){if(e.safeParse(t).success)return t;lr.error(`Config object has the wrong shape. Ignoring and using default configuration:
67
+ ${JSON.stringify(t,void 0,2)}`)}var La;async function _r(){return La===void 0&&(lr.warn("getConfig(): config was undefined"),La??=await bi()),La}var Uc;async function Jt(){let{packageFile:t}=await _r();if(t===void 0)throw new Error("No packageFile found or set in config");if(Uc??=await aT({cwd:lm.dirname(t)}),Uc===void 0)throw new Error("No package.json found");return Uc}var fT={};function Jr(t,e){let r=e||fT,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return fm(t,n,i)}function fm(t,e,r){if(pT(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 cm(t.children,e,r)}return Array.isArray(t)?cm(t,e,r):""}function cm(t,e,r){let n=[],i=-1;for(;++i<t.length;)n[i]=fm(t[i],e,r);return n.join("")}function pT(t){return!!(t&&typeof t=="object")}var zc={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:`
68
+ `,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 dT={}.hasOwnProperty;function oo(t){return dT.call(zc,t)?zc[t]:!1}function it(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 Ft(t,e){return t.length>0?(it(t,t.length,0,e),t):e}var pm={}.hasOwnProperty;function Ma(t){let e={},r=-1;for(;++r<t.length;)hT(e,t[r]);return e}function hT(t,e){let r;for(r in e){let i=(pm.call(t,r)?t[r]:void 0)||(t[r]={}),o=e[r],s;if(o)for(s in o){pm.call(i,s)||(i[s]=[]);let a=o[s];mT(i[s],Array.isArray(a)?a:a?[a]:[])}}}function mT(t,e){let r=-1,n=[];for(;++r<e.length;)(e[r].add==="after"?t:n).push(e[r]);it(t,0,0,n)}function Ba(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 St(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var mt=En(/[A-Za-z]/),gt=En(/[\dA-Za-z]/),dm=En(/[#-'*+\--9=?A-Z^-~]/);function Ei(t){return t!==null&&(t<32||t===127)}var ds=En(/\d/),hm=En(/[\dA-Fa-f]/),mm=En(/[!-/:-@[-`{-~]/);function z(t){return t!==null&&t<-2}function Ce(t){return t!==null&&(t<0||t===32)}function se(t){return t===-2||t===-1||t===32}var Ai=En(new RegExp("\\p{P}|\\p{S}","u")),Sr=En(/\s/);function En(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 gm={tokenize:gT};function gT(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 ym={tokenize:xT},xm={tokenize:yT};function xT(t){let e=this,r=[],n=0,i,o,s;return a;function a(k){if(n<r.length){let D=r[n];return e.containerState=D[1],t.attempt(D[0].continuation,u,l)(k)}return l(k)}function u(k){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 it(e.events,R+1,0,e.events.slice(D)),e.events.length=de,l(k)}return a(k)}function l(k){if(n===r.length){if(!i)return p(k);if(i.currentConstruct&&i.currentConstruct.concrete)return m(k);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(xm,c,f)(k)}function c(k){return i&&w(),b(n),p(k)}function f(k){return e.parser.lazy[e.now().line]=n!==r.length,s=e.now().offset,m(k)}function p(k){return e.containerState={},t.attempt(xm,d,m)(k)}function d(k){return n++,r.push([e.currentConstruct,e.containerState]),p(k)}function m(k){if(k===null){i&&w(),b(0),t.consume(k);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),y(k)}function y(k){if(k===null){g(t.exit("chunkFlow"),!0),b(0),t.consume(k);return}return z(k)?(t.consume(k),g(t.exit("chunkFlow")),n=0,e.interrupt=void 0,a):(t.consume(k),y)}function g(k,D){let R=e.sliceStream(k);if(D&&R.push(null),k.previous=o,o&&(o.next=k),o=k,i.defineSkip(k.start),i.write(R),e.parser.lazy[k.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++;it(e.events,ye+1,0,e.events.slice(de)),e.events.length=S}}function b(k){let D=r.length;for(;D-- >k;){let R=r[D];e.containerState=R[1],R[0].exit.call(e,t)}r.length=k}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 Qr(t){if(t===null||Ce(t)||Sr(t))return 1;if(Ai(t))return 2}function An(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 hs={name:"attention",resolveAll:bT,tokenize:ET};function bT(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};bm(f,-u),bm(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=Ft(l,[["enter",t[n][1],e],["exit",t[n][1],e]])),l=Ft(l,[["enter",i,e],["enter",s,e],["exit",s,e],["enter",o,e]]),l=Ft(l,An(e.parser.constructs.insideSpan.null,t.slice(n+1,r),e)),l=Ft(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=Ft(l,[["enter",t[r][1],e],["exit",t[r][1],e]])):c=0,it(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 ET(t,e){let r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=Qr(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=Qr(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 bm(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}var $c={name:"autolink",tokenize:AT};function AT(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 mt(d)?(t.consume(d),s):d===64?r(d):l(d)}function s(d){return d===43||d===45||d===46||gt(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||gt(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||Ei(d)?r(d):(t.consume(d),u)}function l(d){return d===64?(t.consume(d),c):dm(d)?(t.consume(d),l):r(d)}function c(d){return gt(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||gt(d))&&n++<63){let m=d===45?p:f;return t.consume(d),m}return r(d)}}var Ir={partial:!0,tokenize:kT};function kT(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 ja={continuation:{tokenize:CT},exit:TT,name:"blockQuote",tokenize:wT};function wT(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 CT(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(ja,e,r)(s)}}function TT(t){t.exit("blockQuote")}var Ua={name:"characterEscape",tokenize:_T};function _T(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 mm(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):r(o)}}var za={name:"characterReference",tokenize:ST};function ST(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=gt,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=hm,c):(t.enter("characterReferenceValue"),o=7,s=ds,c(f))}function c(f){if(f===59&&i){let p=t.exit("characterReferenceValue");return s===gt&&!oo(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 Em={partial:!0,tokenize:OT},$a={concrete:!0,name:"codeFenced",tokenize:IT};function IT(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(Em,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(Em,y,D)(S):(t.enter("codeFlowValue"),k(S))}function k(S){return S===null||z(S)?(t.exit("codeFlowValue"),w(S)):(t.consume(S),k)}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"),I(j)):ye(j)}function I(j){return j===a?(be++,S.consume(j),I):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 OT(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 ms={name:"codeIndented",tokenize:DT},vT={partial:!0,tokenize:RT};function DT(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(vT,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 RT(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:NT,resolve:FT,tokenize:PT};function FT(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 NT(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function PT(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 qa=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&&gs(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),gs(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),gs(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);gs(this.right,r.reverse())}else{let r=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);gs(this.left,r.reverse())}}};function gs(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 Va(t){let e={},r=-1,n,i,o,s,a,u,l,c=new qa(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,LT(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 it(t,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function LT(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 Vc={resolve:BT,tokenize:jT},MT={partial:!0,tokenize:UT};function BT(t){return Va(t),t}function jT(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(MT,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 UT(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 Ga(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||Ei(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||Ce(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||Ei(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 Wa(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 Ha(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 Gc={name:"definition",tokenize:$T},zT={partial:!0,tokenize:qT};function $T(t,e,r){let n=this,i;return o;function o(d){return t.enter("definition"),s(d)}function s(d){return Wa.call(n,t,a,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function a(d){return i=St(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 Ce(d)?ki(t,l)(d):l(d)}function l(d){return Ga(t,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return t.attempt(zT,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 qT(t,e,r){return n;function n(a){return Ce(a)?ki(t,i)(a):r(a)}function i(a){return Ha(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 Wc={name:"hardBreakEscape",tokenize:VT};function VT(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 Hc={name:"headingAtx",resolve:GT,tokenize:WT};function GT(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"},it(t,n,r-n+1,[["enter",i,e],["enter",o,e],["exit",o,e],["exit",i,e]])),t}function WT(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||Ce(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||Ce(c)?(t.exit("atxHeadingText"),a(c)):(t.consume(c),l)}}var Am=["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"],Kc=["pre","script","style","textarea"];var Yc={concrete:!0,name:"htmlFlow",resolveTo:YT,tokenize:ZT},HT={partial:!0,tokenize:JT},KT={partial:!0,tokenize:XT};function YT(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 ZT(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):mt(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):mt(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 mt(E)?(t.consume(E),s=String.fromCharCode(E),g):r(E)}function g(E){if(E===null||E===47||E===62||Ce(E)){let W=E===47,Ke=s.toLowerCase();return!W&&!o&&Kc.includes(Ke)?(i=1,n.interrupt?e(E):F(E)):Am.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):k(E))}return E===45||gt(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 k(E){return E===47?(t.consume(E),_):E===58||E===95||mt(E)?(t.consume(E),D):se(E)?(t.consume(E),k):_(E)}function D(E){return E===45||E===46||E===58||E===95||gt(E)?(t.consume(E),D):R(E)}function R(E){return E===61?(t.consume(E),S):se(E)?(t.consume(E),R):k(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||Ce(E)?R(E):(t.consume(E),ye)}function be(E){return E===47||E===62||se(E)?k(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),rt):z(E)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(HT,Je,I)(E)):E===null||z(E)?(t.exit("htmlFlowData"),I(E)):(t.consume(E),F)}function I(E){return t.check(KT,P,Je)(E)}function P(E){return t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),j}function j(E){return E===null||z(E)?I(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="",Se):F(E)}function Se(E){if(E===62){let W=s.toLowerCase();return Kc.includes(W)?(t.consume(E),Ue):F(E)}return mt(E)&&s.length<8?(t.consume(E),s+=String.fromCharCode(E),Se):F(E)}function rt(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"),Je(E)):(t.consume(E),Ue)}function Je(E){return t.exit("htmlFlow"),e(E)}}function XT(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 JT(t,e,r){return n;function n(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(Ir,e,r)}}var Zc={name:"htmlText",tokenize:QT};function QT(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),k):mt(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):mt(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 k(x){return x===null?r(x):x===63?(t.consume(x),D):z(x)?(s=k,ee(x)):(t.consume(x),k)}function D(x){return x===62?ae(x):k(x)}function R(x){return mt(x)?(t.consume(x),S):r(x)}function S(x){return x===45||gt(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||gt(x)?(t.consume(x),ye):x===47||x===62||Ce(x)?be(x):r(x)}function be(x){return x===47?(t.consume(x),ae):x===58||x===95||mt(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||gt(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,I):z(x)?(s=F,ee(x)):se(x)?(t.consume(x),F):(t.consume(x),P)}function I(x){return x===i?(t.consume(x),i=void 0,j):x===null?r(x):z(x)?(s=I,ee(x)):(t.consume(x),I)}function P(x){return x===null||x===34||x===39||x===60||x===61||x===96?r(x):x===47||x===62||Ce(x)?be(x):(t.consume(x),P)}function j(x){return x===47||x===62||Ce(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"),Se}function Se(x){return se(x)?ie(t,rt,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):rt(x)}function rt(x){return t.enter("htmlTextData"),s(x)}}var wi={name:"labelEnd",resolveAll:n_,resolveTo:i_,tokenize:o_},e_={tokenize:s_},t_={tokenize:a_},r_={tokenize:u_};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&&it(t,0,t.length,r),t}function i_(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=Ft(a,t.slice(o+1,o+n+3)),a=Ft(a,[["enter",c,e]]),a=Ft(a,An(e.parser.constructs.insideSpan.null,t.slice(o+n+4,s-3),e)),a=Ft(a,[["exit",c,e],t[s-2],t[s-1],["exit",l,e]]),a=Ft(a,t.slice(s+1)),a=Ft(a,[["exit",u,e]]),it(t,o,t.length,a),t}function o_(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(St(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(e_,c,s?c:f)(p):p===91?t.attempt(t_,c,s?l:f)(p):s?c(p):f(p)}function l(p){return t.attempt(r_,c,f)(p)}function c(p){return e(p)}function f(p){return o._balanced=!0,r(p)}}function s_(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 Ce(f)?ki(t,o)(f):o(f)}function o(f){return f===41?c(f):Ga(t,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return Ce(f)?ki(t,u)(f):c(f)}function a(f){return r(f)}function u(f){return f===34||f===39||f===40?Ha(t,l,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function l(f){return Ce(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 a_(t,e,r){let n=this;return i;function i(a){return Wa.call(n,t,o,s,"reference","referenceMarker","referenceString")(a)}function o(a){return n.parser.defined.includes(St(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?e(a):r(a)}function s(a){return r(a)}}function u_(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 Xc={name:"labelStartImage",resolveAll:wi.resolveAll,tokenize:l_};function l_(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 Jc={name:"labelStartLink",resolveAll:wi.resolveAll,tokenize:c_};function c_(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 xs={name:"lineEnding",tokenize:f_};function f_(t,e){return r;function r(n){return t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),ie(t,e,"linePrefix")}}var Ci={name:"thematicBreak",tokenize:p_};function p_(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 It={continuation:{tokenize:g_},exit:y_,name:"list",tokenize:m_},d_={partial:!0,tokenize:b_},h_={partial:!0,tokenize:x_};function m_(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:ds(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(Ci,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 ds(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(Ir,n.interrupt?r:c,t.attempt(d_,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 g_(t,e,r){let n=this;return n.containerState._closeFlow=void 0,t.check(Ir,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(h_,e,s)(a))}function s(a){return n.containerState._closeFlow=!0,n.interrupt=void 0,ie(t,t.attempt(It,e,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function x_(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 b_(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 Ka={name:"setextUnderline",resolveTo:E_,tokenize:A_};function E_(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 A_(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 km={tokenize:k_};function k_(t){let e=this,r=t.attempt(Ir,n,t.attempt(this.parser.constructs.flowInitial,i,ie(t,t.attempt(this.parser.constructs.flow,i,t.attempt(Vc,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 wm={resolveAll:Sm()},Cm=_m("string"),Tm=_m("text");function _m(t){return{resolveAll:Sm(t==="text"?w_: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 Sm(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 w_(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 Qc={};Od(Qc,{attentionMarkers:()=>D_,contentInitial:()=>T_,disable:()=>R_,document:()=>C_,flow:()=>S_,flowInitial:()=>__,insideSpan:()=>v_,string:()=>I_,text:()=>O_});var C_={42:It,43:It,45:It,48:It,49:It,50:It,51:It,52:It,53:It,54:It,55:It,56:It,57:It,62:ja},T_={91:Gc},__={[-2]:ms,[-1]:ms,32:ms},S_={35:Hc,42:Ci,45:[Ka,Ci],60:Yc,61:Ka,95:Ci,96:$a,126:$a},I_={38:za,92:Ua},O_={[-5]:xs,[-4]:xs,[-3]:xs,33:Xc,38:za,42:hs,60:[$c,Zc],91:Jc,92:[Wc,Ua],93:wi,95:hs,96:qc},v_={null:[hs,wm]},D_={null:[42,95]},R_={null:[]};function Im(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(I){return s=Ft(s,I),w(),s[s.length-1]!==null?[]:(_(e,0),c.events=An(o,c.events,c),c.events)}function m(I,P){return N_(y(I),P)}function y(I){return F_(s,I)}function g(){let{_bufferIndex:I,_index:P,line:j,column:ae,offset:ee}=n;return{_bufferIndex:I,_index:P,line:j,column:ae,offset:ee}}function b(I){i[I.line]=I.column,F()}function w(){let I;for(;n._index<s.length;){let P=s[n._index];if(typeof P=="string")for(I=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===I&&n._bufferIndex<P.length;)k(P.charCodeAt(n._bufferIndex));else k(P)}}function k(I){u=void 0,p=I,f=f(I)}function D(I){z(I)?(n.line++,n.column=1,n.offset+=I===-3?2:1,F()):I!==-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=I,u=!0}function R(I,P){let j=P||{};return j.type=I,j.start=g(),c.events.push(["enter",j,c]),a.push(j),j}function S(I){let P=a.pop();return P.end=g(),c.events.push(["exit",P,c]),P}function de(I,P){_(I,P.from)}function ye(I,P){P.restore()}function be(I,P){return j;function j(ae,ee,Se){let rt,x,Ue,Je;return Array.isArray(ae)?W(ae):"tokenize"in ae?W([ae]):E(ae);function E(oe){return fe;function fe(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 rt=oe,x=0,oe.length===0?Se:Ke(oe[x])}function Ke(oe){return fe;function fe(me){return Je=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,I(Ue,Je),ee}function he(oe){return u=!0,Je.restore(),++x<rt.length?Ke(rt[x]):Se}}}function _(I,P){I.resolveAll&&!o.includes(I)&&o.push(I),I.resolve&&it(c.events,P,c.events.length-P,I.resolve(c.events.slice(P),c)),I.resolveTo&&(c.events=I.resolveTo(c.events,c))}function L(){let I=g(),P=c.previous,j=c.currentConstruct,ae=c.events.length,ee=Array.from(a);return{from:ae,restore:Se};function Se(){n=I,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 F_(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 N_(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=`
73
69
  `;break}case-3:{s=`\r
74
- `;break}case-2:{s=e?" ":" ";break}case-1:{if(!e&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,n.push(s)}return n.join("")}function ff(t){let n={constructs:za([cf,...(t||{}).extensions||[]]),content:i(Mm),defined:[],document:i(jm),flow:i(qm),lazy:{},string:i(Gm),text:i(Wm)};return n;function i(o){return s;function s(a){return Ym(n,o,a)}}}function pf(t){for(;!Ka(t););return t}var Zm=/[\0\t\n\r]/g;function df(){let t=1,e="",r=!0,n;return i;function i(o,s,a){let u=[],l,c,f,p,d;for(o=e+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),f=0,e="",r&&(o.charCodeAt(0)===65279&&f++,r=void 0);f<o.length;){if(Zm.lastIndex=f,l=Zm.exec(o),p=l&&l.index!==void 0?l.index:o.length,d=o.charCodeAt(p),!l){e=o.slice(f);break}if(d===10&&f===p&&n)u.push(-3),n=void 0;else switch(n&&(u.push(-5),n=void 0),f<p&&(u.push(o.slice(f,p)),t+=p-f),d){case 0:{u.push(65533),t++;break}case 9:{for(c=Math.ceil(t/4)*4,u.push(-2);t++<c;)u.push(-1);break}case 10:{u.push(-4),t=1;break}default:n=!0,t=1}f=p+1}return a&&(n&&u.push(-5),e&&u.push(e),u.push(null)),u}}var pS=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Qa(t){return t.replace(pS,dS)}function dS(t,e,r){if(e)return e;if(r.charCodeAt(0)===35){let i=r.charCodeAt(1),o=i===120||i===88;return $a(r.slice(o?2:1),o?16:10)}return lo(r)||t}function co(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Xm(t.position):"start"in t||"end"in t?Xm(t):"line"in t||"column"in t?hf(t):""}function hf(t){return Jm(t&&t.line)+":"+Jm(t&&t.column)}function Xm(t){return hf(t&&t.start)+"-"+hf(t&&t.end)}function Jm(t){return t&&typeof t=="number"?t:1}var eg={}.hasOwnProperty;function mf(t,e,r){return typeof e!="string"&&(r=e,e=void 0),hS(r)(pf(ff(r).document().write(df()(t,e,!0))))}function hS(t){let e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(T),autolinkProtocol:be,autolinkEmail:be,atxHeading:o(A),blockQuote:o(me),characterEscape:be,characterReference:be,codeFenced:o(we),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(we,s),codeText:o(Fe,s),codeTextData:be,data:be,codeFlowValue:be,definition:o(ze),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(qt),hardBreakEscape:o(k),hardBreakTrailing:o(k),htmlFlow:o(M,s),htmlFlowData:be,htmlText:o(M,s),htmlTextData:be,image:o(I),label:s,link:o(T),listItem:o($),listItemValue:p,listOrdered:o(K,f),listUnordered:o(K),paragraph:o(te),reference:E,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(A),strong:o(ft),thematicBreak:o(zC)},exit:{atxHeading:u(),atxHeadingSequence:R,autolink:u(),autolinkEmail:ce,autolinkProtocol:oe,blockQuote:u(),characterEscapeValue:_,characterReferenceMarkerHexadecimal:Ye,characterReferenceMarkerNumeric:Ye,characterReferenceValue:ne,characterReference:he,codeFenced:u(g),codeFencedFence:y,codeFencedFenceInfo:d,codeFencedFenceMeta:m,codeFlowValue:_,codeIndented:u(b),codeText:u(j),codeTextData:_,data:_,definition:u(),definitionDestinationString:D,definitionLabelString:w,definitionTitleString:C,emphasis:u(),hardBreakEscape:u(F),hardBreakTrailing:u(F),htmlFlow:u(v),htmlFlowData:_,htmlText:u(P),htmlTextData:_,image:u(ee),label:it,labelText:_e,lineEnding:L,link:u(ae),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:W,resourceDestinationString:x,resourceTitleString:Ue,resource:Qe,setextHeading:u(ye),setextHeadingLineSequence:de,setextHeadingText:S,strong:u(),thematicBreak:u()}};tg(e,(t||{}).mdastExtensions||[]);let r={};return n;function n(O){let B={type:"root",children:[]},Ee={stack:[B],tokenStack:[],config:e,enter:a,exit:l,buffer:s,resume:c,data:r},ve=[],Ne=-1;for(;++Ne<O.length;)if(O[Ne][1].type==="listOrdered"||O[Ne][1].type==="listUnordered")if(O[Ne][0]==="enter")ve.push(Ne);else{let xr=ve.pop();Ne=i(O,xr,Ne)}for(Ne=-1;++Ne<O.length;){let xr=e[O[Ne][0]];eg.call(xr,O[Ne][1].type)&&xr[O[Ne][1].type].call(Object.assign({sliceSerialize:O[Ne][2].sliceSerialize},Ee),O[Ne][1])}if(Ee.tokenStack.length>0){let xr=Ee.tokenStack[Ee.tokenStack.length-1];(xr[1]||Qm).call(Ee,void 0,xr[0])}for(B.position={start:kn(O.length>0?O[0][1].start:{line:1,column:1,offset:0}),end:kn(O.length>0?O[O.length-2][1].end:{line:1,column:1,offset:0})},Ne=-1;++Ne<e.transforms.length;)B=e.transforms[Ne](B)||B;return B}function i(O,B,Ee){let ve=B-1,Ne=-1,xr=!1,Gn,Wr,is,os;for(;++ve<=Ee;){let Yt=O[ve];switch(Yt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Yt[0]==="enter"?Ne++:Ne--,os=void 0;break}case"lineEndingBlank":{Yt[0]==="enter"&&(Gn&&!os&&!Ne&&!is&&(is=ve),os=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:os=void 0}if(!Ne&&Yt[0]==="enter"&&Yt[1].type==="listItemPrefix"||Ne===-1&&Yt[0]==="exit"&&(Yt[1].type==="listUnordered"||Yt[1].type==="listOrdered")){if(Gn){let Gi=ve;for(Wr=void 0;Gi--;){let Hr=O[Gi];if(Hr[1].type==="lineEnding"||Hr[1].type==="lineEndingBlank"){if(Hr[0]==="exit")continue;Wr&&(O[Wr][1].type="lineEndingBlank",xr=!0),Hr[1].type="lineEnding",Wr=Gi}else if(!(Hr[1].type==="linePrefix"||Hr[1].type==="blockQuotePrefix"||Hr[1].type==="blockQuotePrefixWhitespace"||Hr[1].type==="blockQuoteMarker"||Hr[1].type==="listItemIndent"))break}is&&(!Wr||is<Wr)&&(Gn._spread=!0),Gn.end=Object.assign({},Wr?O[Wr][1].start:Yt[1].end),O.splice(Wr||ve,0,["exit",Gn,Yt[2]]),ve++,Ee++}if(Yt[1].type==="listItemPrefix"){let Gi={type:"listItem",_spread:!1,start:Object.assign({},Yt[1].start),end:void 0};Gn=Gi,O.splice(ve,0,["enter",Gi,Yt[2]]),ve++,Ee++,is=void 0,os=!0}}}return O[B][1]._spread=xr,Ee}function o(O,B){return Ee;function Ee(ve){a.call(this,O(ve),ve),B&&B.call(this,ve)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(O,B,Ee){this.stack[this.stack.length-1].children.push(O),this.stack.push(O),this.tokenStack.push([B,Ee||void 0]),O.position={start:kn(B.start),end:void 0}}function u(O){return B;function B(Ee){O&&O.call(this,Ee),l.call(this,Ee)}}function l(O,B){let Ee=this.stack.pop(),ve=this.tokenStack.pop();if(ve)ve[0].type!==O.type&&(B?B.call(this,O,ve[0]):(ve[1]||Qm).call(this,O,ve[0]));else throw new Error("Cannot close `"+O.type+"` ("+co({start:O.start,end:O.end})+"): it\u2019s not open");Ee.position.end=kn(O.end)}function c(){return tn(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(O){if(this.data.expectingFirstListItemValue){let B=this.stack[this.stack.length-2];B.start=Number.parseInt(this.sliceSerialize(O),10),this.data.expectingFirstListItemValue=void 0}}function d(){let O=this.resume(),B=this.stack[this.stack.length-1];B.lang=O}function m(){let O=this.resume(),B=this.stack[this.stack.length-1];B.meta=O}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let O=this.resume(),B=this.stack[this.stack.length-1];B.value=O.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){let O=this.resume(),B=this.stack[this.stack.length-1];B.value=O.replace(/(\r?\n|\r)$/g,"")}function w(O){let B=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=B,Ee.identifier=It(this.sliceSerialize(O)).toLowerCase()}function C(){let O=this.resume(),B=this.stack[this.stack.length-1];B.title=O}function D(){let O=this.resume(),B=this.stack[this.stack.length-1];B.url=O}function R(O){let B=this.stack[this.stack.length-1];if(!B.depth){let Ee=this.sliceSerialize(O).length;B.depth=Ee}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function de(O){let B=this.stack[this.stack.length-1];B.depth=this.sliceSerialize(O).codePointAt(0)===61?1:2}function ye(){this.data.setextHeadingSlurpLineEnding=void 0}function be(O){let Ee=this.stack[this.stack.length-1].children,ve=Ee[Ee.length-1];(!ve||ve.type!=="text")&&(ve=Tt(),ve.position={start:kn(O.start),end:void 0},Ee.push(ve)),this.stack.push(ve)}function _(O){let B=this.stack.pop();B.value+=this.sliceSerialize(O),B.position.end=kn(O.end)}function L(O){let B=this.stack[this.stack.length-1];if(this.data.atHardBreak){let Ee=B.children[B.children.length-1];Ee.position.end=kn(O.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(B.type)&&(be.call(this,O),_.call(this,O))}function F(){this.data.atHardBreak=!0}function v(){let O=this.resume(),B=this.stack[this.stack.length-1];B.value=O}function P(){let O=this.resume(),B=this.stack[this.stack.length-1];B.value=O}function j(){let O=this.resume(),B=this.stack[this.stack.length-1];B.value=O}function ae(){let O=this.stack[this.stack.length-1];if(this.data.inReference){let B=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=B,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function ee(){let O=this.stack[this.stack.length-1];if(this.data.inReference){let B=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=B,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function _e(O){let B=this.sliceSerialize(O),Ee=this.stack[this.stack.length-2];Ee.label=Qa(B),Ee.identifier=It(B).toLowerCase()}function it(){let O=this.stack[this.stack.length-1],B=this.resume(),Ee=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ee.type==="link"){let ve=O.children;Ee.children=ve}else Ee.alt=B}function x(){let O=this.resume(),B=this.stack[this.stack.length-1];B.url=O}function Ue(){let O=this.resume(),B=this.stack[this.stack.length-1];B.title=O}function Qe(){this.data.inReference=void 0}function E(){this.data.referenceType="collapsed"}function W(O){let B=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=B,Ee.identifier=It(this.sliceSerialize(O)).toLowerCase(),this.data.referenceType="full"}function Ye(O){this.data.characterReferenceType=O.type}function ne(O){let B=this.sliceSerialize(O),Ee=this.data.characterReferenceType,ve;Ee?(ve=$a(B,Ee==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ve=lo(B);let Ne=this.stack[this.stack.length-1];Ne.value+=ve}function he(O){let B=this.stack.pop();B.position.end=kn(O.end)}function oe(O){_.call(this,O);let B=this.stack[this.stack.length-1];B.url=this.sliceSerialize(O)}function ce(O){_.call(this,O);let B=this.stack[this.stack.length-1];B.url="mailto:"+this.sliceSerialize(O)}function me(){return{type:"blockquote",children:[]}}function we(){return{type:"code",lang:null,meta:null,value:""}}function Fe(){return{type:"inlineCode",value:""}}function ze(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function qt(){return{type:"emphasis",children:[]}}function A(){return{type:"heading",depth:0,children:[]}}function k(){return{type:"break"}}function M(){return{type:"html",value:""}}function I(){return{type:"image",title:null,url:"",alt:null}}function T(){return{type:"link",title:null,url:"",children:[]}}function K(O){return{type:"list",ordered:O.type==="listOrdered",start:null,spread:O._spread,children:[]}}function $(O){return{type:"listItem",spread:O._spread,checked:null,children:[]}}function te(){return{type:"paragraph",children:[]}}function ft(){return{type:"strong",children:[]}}function Tt(){return{type:"text",value:""}}function zC(){return{type:"thematicBreak"}}}function kn(t){return{line:t.line,column:t.column,offset:t.offset}}function tg(t,e){let r=-1;for(;++r<e.length;){let n=e[r];Array.isArray(n)?tg(t,n):mS(t,n)}}function mS(t,e){let r;for(r in e)if(eg.call(e,r))switch(r){case"canContainEols":{let n=e[r];n&&t[r].push(...n);break}case"transforms":{let n=e[r];n&&t[r].push(...n);break}case"enter":case"exit":{let n=e[r];n&&Object.assign(t[r],n);break}}}function Qm(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+co({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+co({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+co({start:e.start,end:e.end})+") is still open")}function eu(t){let e=this;e.parser=r;function r(n){return mf(n,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}var rg={}.hasOwnProperty;function ng(t,e){let r=e||{};function n(i,...o){let s=n.invalid,a=n.handlers;if(i&&rg.call(i,t)){let u=String(i[t]);s=rg.call(a,u)?a[u]:n.unknown}if(s)return s.call(this,i,...o)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}var gS={}.hasOwnProperty;function gf(t,e){let r=-1,n;if(e.extensions)for(;++r<e.extensions.length;)gf(t,e.extensions[r]);for(n in e)if(gS.call(e,n))switch(n){case"extensions":break;case"unsafe":{ig(t[n],e[n]);break}case"join":{ig(t[n],e[n]);break}case"handlers":{xS(t[n],e[n]);break}default:t.options[n]=e[n]}return t}function ig(t,e){e&&t.push(...e)}function xS(t,e){e&&Object.assign(t,e)}function og(t,e,r,n){let i=r.enter("blockquote"),o=r.createTracker(n);o.move("> "),o.shift(2);let s=r.indentLines(r.containerFlow(t,o.current()),yS);return i(),s}function yS(t,e,r){return">"+(r?"":" ")+t}function tu(t,e){return sg(t,e.inConstruct,!0)&&!sg(t,e.notInConstruct,!1)}function sg(t,e,r){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return r;let n=-1;for(;++n<e.length;)if(t.includes(e[n]))return!0;return!1}function xf(t,e,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===`
75
- `&&tu(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return`\\
76
- `}function ag(t,e){let r=String(t),n=r.indexOf(e),i=n,o=0,s=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===i?++o>s&&(s=o):o=1,i=n+e.length,n=r.indexOf(e,i);return s}function ks(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function ug(t){let e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function lg(t,e,r,n){let i=ug(r),o=t.value||"",s=i==="`"?"GraveAccent":"Tilde";if(ks(t,r)){let f=r.enter("codeIndented"),p=r.indentLines(o,bS);return f(),p}let a=r.createTracker(n),u=i.repeat(Math.max(ag(o,i)+1,3)),l=r.enter("codeFenced"),c=a.move(u);if(t.lang){let f=r.enter(`codeFencedLang${s}`);c+=a.move(r.safe(t.lang,{before:c,after:" ",encode:["`"],...a.current()})),f()}if(t.lang&&t.meta){let f=r.enter(`codeFencedMeta${s}`);c+=a.move(" "),c+=a.move(r.safe(t.meta,{before:c,after:`
70
+ `;break}case-2:{s=e?" ":" ";break}case-1:{if(!e&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,n.push(s)}return n.join("")}function ef(t){let n={constructs:Ma([Qc,...(t||{}).extensions||[]]),content:i(gm),defined:[],document:i(ym),flow:i(km),lazy:{},string:i(Cm),text:i(Tm)};return n;function i(o){return s;function s(a){return Im(n,o,a)}}}function tf(t){for(;!Va(t););return t}var Om=/[\0\t\n\r]/g;function rf(){let t=1,e="",r=!0,n;return i;function i(o,s,a){let u=[],l,c,f,p,d;for(o=e+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),f=0,e="",r&&(o.charCodeAt(0)===65279&&f++,r=void 0);f<o.length;){if(Om.lastIndex=f,l=Om.exec(o),p=l&&l.index!==void 0?l.index:o.length,d=o.charCodeAt(p),!l){e=o.slice(f);break}if(d===10&&f===p&&n)u.push(-3),n=void 0;else switch(n&&(u.push(-5),n=void 0),f<p&&(u.push(o.slice(f,p)),t+=p-f),d){case 0:{u.push(65533),t++;break}case 9:{for(c=Math.ceil(t/4)*4,u.push(-2);t++<c;)u.push(-1);break}case 10:{u.push(-4),t=1;break}default:n=!0,t=1}f=p+1}return a&&(n&&u.push(-5),e&&u.push(e),u.push(null)),u}}var P_=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ya(t){return t.replace(P_,L_)}function L_(t,e,r){if(e)return e;if(r.charCodeAt(0)===35){let i=r.charCodeAt(1),o=i===120||i===88;return Ba(r.slice(o?2:1),o?16:10)}return oo(r)||t}function so(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?vm(t.position):"start"in t||"end"in t?vm(t):"line"in t||"column"in t?nf(t):""}function nf(t){return Dm(t&&t.line)+":"+Dm(t&&t.column)}function vm(t){return nf(t&&t.start)+"-"+nf(t&&t.end)}function Dm(t){return t&&typeof t=="number"?t:1}var Fm={}.hasOwnProperty;function of(t,e,r){return typeof e!="string"&&(r=e,e=void 0),M_(r)(tf(ef(r).document().write(rf()(t,e,!0))))}function M_(t){let e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(T),autolinkProtocol:be,autolinkEmail:be,atxHeading:o(A),blockQuote:o(me),characterEscape:be,characterReference:be,codeFenced:o(we),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(we,s),codeText:o(Fe,s),codeTextData:be,data:be,codeFlowValue:be,definition:o(ze),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(Ut),hardBreakEscape:o(C),hardBreakTrailing:o(C),htmlFlow:o(M,s),htmlFlowData:be,htmlText:o(M,s),htmlTextData:be,image:o(O),label:s,link:o(T),listItem:o($),listItemValue:p,listOrdered:o(Y,f),listUnordered:o(Y),paragraph:o(te),reference:E,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(A),strong:o(lt),thematicBreak:o(Ak)},exit:{atxHeading:u(),atxHeadingSequence:R,autolink:u(),autolinkEmail:fe,autolinkProtocol:oe,blockQuote:u(),characterEscapeValue:_,characterReferenceMarkerHexadecimal:Ke,characterReferenceMarkerNumeric:Ke,characterReferenceValue:ne,characterReference:he,codeFenced:u(g),codeFencedFence:y,codeFencedFenceInfo:d,codeFencedFenceMeta:m,codeFlowValue:_,codeIndented:u(b),codeText:u(j),codeTextData:_,data:_,definition:u(),definitionDestinationString:D,definitionLabelString:w,definitionTitleString:k,emphasis:u(),hardBreakEscape:u(F),hardBreakTrailing:u(F),htmlFlow:u(I),htmlFlowData:_,htmlText:u(P),htmlTextData:_,image:u(ee),label:rt,labelText:Se,lineEnding:L,link:u(ae),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:W,resourceDestinationString:x,resourceTitleString:Ue,resource:Je,setextHeading:u(ye),setextHeadingLineSequence:de,setextHeadingText:S,strong:u(),thematicBreak:u()}};Nm(e,(t||{}).mdastExtensions||[]);let r={};return n;function n(v){let B={type:"root",children:[]},Ee={stack:[B],tokenStack:[],config:e,enter:a,exit:l,buffer:s,resume:c,data:r},Oe=[],Ne=-1;for(;++Ne<v.length;)if(v[Ne][1].type==="listOrdered"||v[Ne][1].type==="listUnordered")if(v[Ne][0]==="enter")Oe.push(Ne);else{let dr=Oe.pop();Ne=i(v,dr,Ne)}for(Ne=-1;++Ne<v.length;){let dr=e[v[Ne][0]];Fm.call(dr,v[Ne][1].type)&&dr[v[Ne][1].type].call(Object.assign({sliceSerialize:v[Ne][2].sliceSerialize},Ee),v[Ne][1])}if(Ee.tokenStack.length>0){let dr=Ee.tokenStack[Ee.tokenStack.length-1];(dr[1]||Rm).call(Ee,void 0,dr[0])}for(B.position={start:kn(v.length>0?v[0][1].start:{line:1,column:1,offset:0}),end:kn(v.length>0?v[v.length-2][1].end:{line:1,column:1,offset:0})},Ne=-1;++Ne<e.transforms.length;)B=e.transforms[Ne](B)||B;return B}function i(v,B,Ee){let Oe=B-1,Ne=-1,dr=!1,qn,qr,ts,rs;for(;++Oe<=Ee;){let Ht=v[Oe];switch(Ht[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ht[0]==="enter"?Ne++:Ne--,rs=void 0;break}case"lineEndingBlank":{Ht[0]==="enter"&&(qn&&!rs&&!Ne&&!ts&&(ts=Oe),rs=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:rs=void 0}if(!Ne&&Ht[0]==="enter"&&Ht[1].type==="listItemPrefix"||Ne===-1&&Ht[0]==="exit"&&(Ht[1].type==="listUnordered"||Ht[1].type==="listOrdered")){if(qn){let qi=Oe;for(qr=void 0;qi--;){let Vr=v[qi];if(Vr[1].type==="lineEnding"||Vr[1].type==="lineEndingBlank"){if(Vr[0]==="exit")continue;qr&&(v[qr][1].type="lineEndingBlank",dr=!0),Vr[1].type="lineEnding",qr=qi}else if(!(Vr[1].type==="linePrefix"||Vr[1].type==="blockQuotePrefix"||Vr[1].type==="blockQuotePrefixWhitespace"||Vr[1].type==="blockQuoteMarker"||Vr[1].type==="listItemIndent"))break}ts&&(!qr||ts<qr)&&(qn._spread=!0),qn.end=Object.assign({},qr?v[qr][1].start:Ht[1].end),v.splice(qr||Oe,0,["exit",qn,Ht[2]]),Oe++,Ee++}if(Ht[1].type==="listItemPrefix"){let qi={type:"listItem",_spread:!1,start:Object.assign({},Ht[1].start),end:void 0};qn=qi,v.splice(Oe,0,["enter",qi,Ht[2]]),Oe++,Ee++,ts=void 0,rs=!0}}}return v[B][1]._spread=dr,Ee}function o(v,B){return Ee;function Ee(Oe){a.call(this,v(Oe),Oe),B&&B.call(this,Oe)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(v,B,Ee){this.stack[this.stack.length-1].children.push(v),this.stack.push(v),this.tokenStack.push([B,Ee||void 0]),v.position={start:kn(B.start),end:void 0}}function u(v){return B;function B(Ee){v&&v.call(this,Ee),l.call(this,Ee)}}function l(v,B){let Ee=this.stack.pop(),Oe=this.tokenStack.pop();if(Oe)Oe[0].type!==v.type&&(B?B.call(this,v,Oe[0]):(Oe[1]||Rm).call(this,v,Oe[0]));else throw new Error("Cannot close `"+v.type+"` ("+so({start:v.start,end:v.end})+"): it\u2019s not open");Ee.position.end=kn(v.end)}function c(){return Jr(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(v){if(this.data.expectingFirstListItemValue){let B=this.stack[this.stack.length-2];B.start=Number.parseInt(this.sliceSerialize(v),10),this.data.expectingFirstListItemValue=void 0}}function d(){let v=this.resume(),B=this.stack[this.stack.length-1];B.lang=v}function m(){let v=this.resume(),B=this.stack[this.stack.length-1];B.meta=v}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let v=this.resume(),B=this.stack[this.stack.length-1];B.value=v.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){let v=this.resume(),B=this.stack[this.stack.length-1];B.value=v.replace(/(\r?\n|\r)$/g,"")}function w(v){let B=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=B,Ee.identifier=St(this.sliceSerialize(v)).toLowerCase()}function k(){let v=this.resume(),B=this.stack[this.stack.length-1];B.title=v}function D(){let v=this.resume(),B=this.stack[this.stack.length-1];B.url=v}function R(v){let B=this.stack[this.stack.length-1];if(!B.depth){let Ee=this.sliceSerialize(v).length;B.depth=Ee}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function de(v){let B=this.stack[this.stack.length-1];B.depth=this.sliceSerialize(v).codePointAt(0)===61?1:2}function ye(){this.data.setextHeadingSlurpLineEnding=void 0}function be(v){let Ee=this.stack[this.stack.length-1].children,Oe=Ee[Ee.length-1];(!Oe||Oe.type!=="text")&&(Oe=wt(),Oe.position={start:kn(v.start),end:void 0},Ee.push(Oe)),this.stack.push(Oe)}function _(v){let B=this.stack.pop();B.value+=this.sliceSerialize(v),B.position.end=kn(v.end)}function L(v){let B=this.stack[this.stack.length-1];if(this.data.atHardBreak){let Ee=B.children[B.children.length-1];Ee.position.end=kn(v.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(B.type)&&(be.call(this,v),_.call(this,v))}function F(){this.data.atHardBreak=!0}function I(){let v=this.resume(),B=this.stack[this.stack.length-1];B.value=v}function P(){let v=this.resume(),B=this.stack[this.stack.length-1];B.value=v}function j(){let v=this.resume(),B=this.stack[this.stack.length-1];B.value=v}function ae(){let v=this.stack[this.stack.length-1];if(this.data.inReference){let B=this.data.referenceType||"shortcut";v.type+="Reference",v.referenceType=B,delete v.url,delete v.title}else delete v.identifier,delete v.label;this.data.referenceType=void 0}function ee(){let v=this.stack[this.stack.length-1];if(this.data.inReference){let B=this.data.referenceType||"shortcut";v.type+="Reference",v.referenceType=B,delete v.url,delete v.title}else delete v.identifier,delete v.label;this.data.referenceType=void 0}function Se(v){let B=this.sliceSerialize(v),Ee=this.stack[this.stack.length-2];Ee.label=Ya(B),Ee.identifier=St(B).toLowerCase()}function rt(){let v=this.stack[this.stack.length-1],B=this.resume(),Ee=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ee.type==="link"){let Oe=v.children;Ee.children=Oe}else Ee.alt=B}function x(){let v=this.resume(),B=this.stack[this.stack.length-1];B.url=v}function Ue(){let v=this.resume(),B=this.stack[this.stack.length-1];B.title=v}function Je(){this.data.inReference=void 0}function E(){this.data.referenceType="collapsed"}function W(v){let B=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=B,Ee.identifier=St(this.sliceSerialize(v)).toLowerCase(),this.data.referenceType="full"}function Ke(v){this.data.characterReferenceType=v.type}function ne(v){let B=this.sliceSerialize(v),Ee=this.data.characterReferenceType,Oe;Ee?(Oe=Ba(B,Ee==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Oe=oo(B);let Ne=this.stack[this.stack.length-1];Ne.value+=Oe}function he(v){let B=this.stack.pop();B.position.end=kn(v.end)}function oe(v){_.call(this,v);let B=this.stack[this.stack.length-1];B.url=this.sliceSerialize(v)}function fe(v){_.call(this,v);let B=this.stack[this.stack.length-1];B.url="mailto:"+this.sliceSerialize(v)}function me(){return{type:"blockquote",children:[]}}function we(){return{type:"code",lang:null,meta:null,value:""}}function Fe(){return{type:"inlineCode",value:""}}function ze(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ut(){return{type:"emphasis",children:[]}}function A(){return{type:"heading",depth:0,children:[]}}function C(){return{type:"break"}}function M(){return{type:"html",value:""}}function O(){return{type:"image",title:null,url:"",alt:null}}function T(){return{type:"link",title:null,url:"",children:[]}}function Y(v){return{type:"list",ordered:v.type==="listOrdered",start:null,spread:v._spread,children:[]}}function $(v){return{type:"listItem",spread:v._spread,checked:null,children:[]}}function te(){return{type:"paragraph",children:[]}}function lt(){return{type:"strong",children:[]}}function wt(){return{type:"text",value:""}}function Ak(){return{type:"thematicBreak"}}}function kn(t){return{line:t.line,column:t.column,offset:t.offset}}function Nm(t,e){let r=-1;for(;++r<e.length;){let n=e[r];Array.isArray(n)?Nm(t,n):B_(t,n)}}function B_(t,e){let r;for(r in e)if(Fm.call(e,r))switch(r){case"canContainEols":{let n=e[r];n&&t[r].push(...n);break}case"transforms":{let n=e[r];n&&t[r].push(...n);break}case"enter":case"exit":{let n=e[r];n&&Object.assign(t[r],n);break}}}function Rm(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+so({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+so({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+so({start:e.start,end:e.end})+") is still open")}function Za(t){let e=this;e.parser=r;function r(n){return of(n,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}var Pm={}.hasOwnProperty;function Lm(t,e){let r=e||{};function n(i,...o){let s=n.invalid,a=n.handlers;if(i&&Pm.call(i,t)){let u=String(i[t]);s=Pm.call(a,u)?a[u]:n.unknown}if(s)return s.call(this,i,...o)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}var j_={}.hasOwnProperty;function sf(t,e){let r=-1,n;if(e.extensions)for(;++r<e.extensions.length;)sf(t,e.extensions[r]);for(n in e)if(j_.call(e,n))switch(n){case"extensions":break;case"unsafe":{Mm(t[n],e[n]);break}case"join":{Mm(t[n],e[n]);break}case"handlers":{U_(t[n],e[n]);break}default:t.options[n]=e[n]}return t}function Mm(t,e){e&&t.push(...e)}function U_(t,e){e&&Object.assign(t,e)}function Bm(t,e,r,n){let i=r.enter("blockquote"),o=r.createTracker(n);o.move("> "),o.shift(2);let s=r.indentLines(r.containerFlow(t,o.current()),z_);return i(),s}function z_(t,e,r){return">"+(r?"":" ")+t}function Xa(t,e){return jm(t,e.inConstruct,!0)&&!jm(t,e.notInConstruct,!1)}function jm(t,e,r){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return r;let n=-1;for(;++n<e.length;)if(t.includes(e[n]))return!0;return!1}function af(t,e,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===`
71
+ `&&Xa(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return`\\
72
+ `}function Um(t,e){let r=String(t),n=r.indexOf(e),i=n,o=0,s=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===i?++o>s&&(s=o):o=1,i=n+e.length,n=r.indexOf(e,i);return s}function ys(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function zm(t){let e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function $m(t,e,r,n){let i=zm(r),o=t.value||"",s=i==="`"?"GraveAccent":"Tilde";if(ys(t,r)){let f=r.enter("codeIndented"),p=r.indentLines(o,$_);return f(),p}let a=r.createTracker(n),u=i.repeat(Math.max(Um(o,i)+1,3)),l=r.enter("codeFenced"),c=a.move(u);if(t.lang){let f=r.enter(`codeFencedLang${s}`);c+=a.move(r.safe(t.lang,{before:c,after:" ",encode:["`"],...a.current()})),f()}if(t.lang&&t.meta){let f=r.enter(`codeFencedMeta${s}`);c+=a.move(" "),c+=a.move(r.safe(t.meta,{before:c,after:`
77
73
  `,encode:["`"],...a.current()})),f()}return c+=a.move(`
78
74
  `),o&&(c+=a.move(o+`
79
- `)),c+=a.move(u),l(),c}function bS(t,e,r){return(r?"":" ")+t}function fo(t){let e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function cg(t,e,r,n){let i=fo(r),o=i==='"'?"Quote":"Apostrophe",s=r.enter("definition"),a=r.enter("label"),u=r.createTracker(n),l=u.move("[");return l+=u.move(r.safe(r.associationId(t),{before:l,after:"]",...u.current()})),l+=u.move("]: "),a(),!t.url||/[\0- \u007F]/.test(t.url)?(a=r.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(r.safe(t.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(a=r.enter("destinationRaw"),l+=u.move(r.safe(t.url,{before:l,after:t.title?" ":`
80
- `,...u.current()}))),a(),t.title&&(a=r.enter(`title${o}`),l+=u.move(" "+i),l+=u.move(r.safe(t.title,{before:l,after:i,...u.current()})),l+=u.move(i),a()),s(),l}function fg(t){let e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}function nr(t){return"&#x"+t.toString(16).toUpperCase()+";"}function po(t,e,r){let n=rn(t),i=rn(e);return n===void 0?i===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}yf.peek=ES;function yf(t,e,r,n){let i=fg(r),o=r.enter("emphasis"),s=r.createTracker(n),a=s.move(i),u=s.move(r.containerPhrasing(t,{after:i,before:a,...s.current()})),l=u.charCodeAt(0),c=po(n.before.charCodeAt(n.before.length-1),l,i);c.inside&&(u=nr(l)+u.slice(1));let f=u.charCodeAt(u.length-1),p=po(n.after.charCodeAt(0),f,i);p.inside&&(u=u.slice(0,-1)+nr(f));let d=s.move(i);return o(),r.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},a+u+d}function ES(t,e,r){return r.options.emphasis||"*"}var Fr=function(t){if(t==null)return kS;if(typeof t=="function")return ru(t);if(typeof t=="object")return Array.isArray(t)?AS(t):CS(t);if(typeof t=="string")return wS(t);throw new Error("Expected function, string, or object as test")};function AS(t){let e=[],r=-1;for(;++r<t.length;)e[r]=Fr(t[r]);return ru(n);function n(...i){let o=-1;for(;++o<e.length;)if(e[o].apply(this,i))return!0;return!1}}function CS(t){let e=t;return ru(r);function r(n){let i=n,o;for(o in t)if(i[o]!==e[o])return!1;return!0}}function wS(t){return ru(e);function e(r){return r&&r.type===t}}function ru(t){return e;function e(r,n,i){return!!(TS(r)&&t.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function kS(){return!0}function TS(t){return t!==null&&typeof t=="object"&&"type"in t}function pg(t){return"\x1B[33m"+t+"\x1B[39m"}var dg=[],nu=!0,Si=!1,iu="skip";function Ts(t,e,r,n){let i;typeof e=="function"&&typeof r!="function"?(n=r,r=e):i=e;let o=Fr(i),s=n?-1:1;a(t,void 0,[])();function a(u,l,c){let f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){let d=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+pg(u.type+(d?"<"+d+">":""))+")"})}return p;function p(){let d=dg,m,y,g;if((!e||o(u,l,c[c.length-1]||void 0))&&(d=_S(r(u,c)),d[0]===Si))return d;if("children"in u&&u.children){let b=u;if(b.children&&d[0]!==iu)for(y=(n?b.children.length:-1)+s,g=c.concat(b);y>-1&&y<b.children.length;){let w=b.children[y];if(m=a(w,y,g)(),m[0]===Si)return m;y=typeof m[1]=="number"?m[1]:y+s}}return d}}}function _S(t){return Array.isArray(t)?t:typeof t=="number"?[nu,t]:t==null?dg:[t]}function _s(t,e,r,n){let i,o,s;typeof e=="function"&&typeof r!="function"?(o=void 0,s=e,i=r):(o=e,s=r,i=n),Ts(t,o,a,i);function a(u,l){let c=l[l.length-1],f=c?c.children.indexOf(u):void 0;return s(u,f,c)}}function ou(t,e){let r=!1;return _s(t,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,Si}),!!((!t.depth||t.depth<3)&&tn(t)&&(e.options.setext||r))}function hg(t,e,r,n){let i=Math.max(Math.min(6,t.depth||1),1),o=r.createTracker(n);if(ou(t,r)){let c=r.enter("headingSetext"),f=r.enter("phrasing"),p=r.containerPhrasing(t,{...o.current(),before:`
75
+ `)),c+=a.move(u),l(),c}function $_(t,e,r){return(r?"":" ")+t}function ao(t){let e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function qm(t,e,r,n){let i=ao(r),o=i==='"'?"Quote":"Apostrophe",s=r.enter("definition"),a=r.enter("label"),u=r.createTracker(n),l=u.move("[");return l+=u.move(r.safe(r.associationId(t),{before:l,after:"]",...u.current()})),l+=u.move("]: "),a(),!t.url||/[\0- \u007F]/.test(t.url)?(a=r.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(r.safe(t.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(a=r.enter("destinationRaw"),l+=u.move(r.safe(t.url,{before:l,after:t.title?" ":`
76
+ `,...u.current()}))),a(),t.title&&(a=r.enter(`title${o}`),l+=u.move(" "+i),l+=u.move(r.safe(t.title,{before:l,after:i,...u.current()})),l+=u.move(i),a()),s(),l}function Vm(t){let e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}function Qt(t){return"&#x"+t.toString(16).toUpperCase()+";"}function uo(t,e,r){let n=Qr(t),i=Qr(e);return n===void 0?i===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}uf.peek=q_;function uf(t,e,r,n){let i=Vm(r),o=r.enter("emphasis"),s=r.createTracker(n),a=s.move(i),u=s.move(r.containerPhrasing(t,{after:i,before:a,...s.current()})),l=u.charCodeAt(0),c=uo(n.before.charCodeAt(n.before.length-1),l,i);c.inside&&(u=Qt(l)+u.slice(1));let f=u.charCodeAt(u.length-1),p=uo(n.after.charCodeAt(0),f,i);p.inside&&(u=u.slice(0,-1)+Qt(f));let d=s.move(i);return o(),r.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},a+u+d}function q_(t,e,r){return r.options.emphasis||"*"}var Or=(function(t){if(t==null)return H_;if(typeof t=="function")return Ja(t);if(typeof t=="object")return Array.isArray(t)?V_(t):G_(t);if(typeof t=="string")return W_(t);throw new Error("Expected function, string, or object as test")});function V_(t){let e=[],r=-1;for(;++r<t.length;)e[r]=Or(t[r]);return Ja(n);function n(...i){let o=-1;for(;++o<e.length;)if(e[o].apply(this,i))return!0;return!1}}function G_(t){let e=t;return Ja(r);function r(n){let i=n,o;for(o in t)if(i[o]!==e[o])return!1;return!0}}function W_(t){return Ja(e);function e(r){return r&&r.type===t}}function Ja(t){return e;function e(r,n,i){return!!(K_(r)&&t.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function H_(){return!0}function K_(t){return t!==null&&typeof t=="object"&&"type"in t}function Gm(t){return"\x1B[33m"+t+"\x1B[39m"}var Wm=[],Qa=!0,Ti=!1,eu="skip";function bs(t,e,r,n){let i;typeof e=="function"&&typeof r!="function"?(n=r,r=e):i=e;let o=Or(i),s=n?-1:1;a(t,void 0,[])();function a(u,l,c){let f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){let d=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+Gm(u.type+(d?"<"+d+">":""))+")"})}return p;function p(){let d=Wm,m,y,g;if((!e||o(u,l,c[c.length-1]||void 0))&&(d=Y_(r(u,c)),d[0]===Ti))return d;if("children"in u&&u.children){let b=u;if(b.children&&d[0]!==eu)for(y=(n?b.children.length:-1)+s,g=c.concat(b);y>-1&&y<b.children.length;){let w=b.children[y];if(m=a(w,y,g)(),m[0]===Ti)return m;y=typeof m[1]=="number"?m[1]:y+s}}return d}}}function Y_(t){return Array.isArray(t)?t:typeof t=="number"?[Qa,t]:t==null?Wm:[t]}function Es(t,e,r,n){let i,o,s;typeof e=="function"&&typeof r!="function"?(o=void 0,s=e,i=r):(o=e,s=r,i=n),bs(t,o,a,i);function a(u,l){let c=l[l.length-1],f=c?c.children.indexOf(u):void 0;return s(u,f,c)}}function tu(t,e){let r=!1;return Es(t,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,Ti}),!!((!t.depth||t.depth<3)&&Jr(t)&&(e.options.setext||r))}function Hm(t,e,r,n){let i=Math.max(Math.min(6,t.depth||1),1),o=r.createTracker(n);if(tu(t,r)){let c=r.enter("headingSetext"),f=r.enter("phrasing"),p=r.containerPhrasing(t,{...o.current(),before:`
81
77
  `,after:`
82
78
  `});return f(),c(),p+`
83
79
  `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
84
80
  `))+1))}let s="#".repeat(i),a=r.enter("headingAtx"),u=r.enter("phrasing");o.move(s+" ");let l=r.containerPhrasing(t,{before:"# ",after:`
85
- `,...o.current()});return/^[\t ]/.test(l)&&(l=nr(l.charCodeAt(0))+l.slice(1)),l=l?s+" "+l:s,r.options.closeAtx&&(l+=" "+s),u(),a(),l}bf.peek=SS;function bf(t){return t.value||""}function SS(){return"<"}Ef.peek=vS;function Ef(t,e,r,n){let i=fo(r),o=i==='"'?"Quote":"Apostrophe",s=r.enter("image"),a=r.enter("label"),u=r.createTracker(n),l=u.move("![");return l+=u.move(r.safe(t.alt,{before:l,after:"]",...u.current()})),l+=u.move("]("),a(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(a=r.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(r.safe(t.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(a=r.enter("destinationRaw"),l+=u.move(r.safe(t.url,{before:l,after:t.title?" ":")",...u.current()}))),a(),t.title&&(a=r.enter(`title${o}`),l+=u.move(" "+i),l+=u.move(r.safe(t.title,{before:l,after:i,...u.current()})),l+=u.move(i),a()),l+=u.move(")"),s(),l}function vS(){return"!"}Af.peek=IS;function Af(t,e,r,n){let i=t.referenceType,o=r.enter("imageReference"),s=r.enter("label"),a=r.createTracker(n),u=a.move("!["),l=r.safe(t.alt,{before:u,after:"]",...a.current()});u+=a.move(l+"]["),s();let c=r.stack;r.stack=[],s=r.enter("reference");let f=r.safe(r.associationId(t),{before:u,after:"]",...a.current()});return s(),r.stack=c,o(),i==="full"||!l||l!==f?u+=a.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function IS(){return"!"}Cf.peek=OS;function Cf(t,e,r){let n=t.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++o<r.unsafe.length;){let s=r.unsafe[o],a=r.compilePattern(s),u;if(s.atBreak)for(;u=a.exec(n);){let l=u.index;n.charCodeAt(l)===10&&n.charCodeAt(l-1)===13&&l--,n=n.slice(0,l)+" "+n.slice(u.index+1)}}return i+n+i}function OS(){return"`"}function wf(t,e){let r=tn(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(r===t.url||"mailto:"+r===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}kf.peek=DS;function kf(t,e,r,n){let i=fo(r),o=i==='"'?"Quote":"Apostrophe",s=r.createTracker(n),a,u;if(wf(t,r)){let c=r.stack;r.stack=[],a=r.enter("autolink");let f=s.move("<");return f+=s.move(r.containerPhrasing(t,{before:f,after:">",...s.current()})),f+=s.move(">"),a(),r.stack=c,f}a=r.enter("link"),u=r.enter("label");let l=s.move("[");return l+=s.move(r.containerPhrasing(t,{before:l,after:"](",...s.current()})),l+=s.move("]("),u(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(u=r.enter("destinationLiteral"),l+=s.move("<"),l+=s.move(r.safe(t.url,{before:l,after:">",...s.current()})),l+=s.move(">")):(u=r.enter("destinationRaw"),l+=s.move(r.safe(t.url,{before:l,after:t.title?" ":")",...s.current()}))),u(),t.title&&(u=r.enter(`title${o}`),l+=s.move(" "+i),l+=s.move(r.safe(t.title,{before:l,after:i,...s.current()})),l+=s.move(i),u()),l+=s.move(")"),a(),l}function DS(t,e,r){return wf(t,r)?"<":"["}Tf.peek=RS;function Tf(t,e,r,n){let i=t.referenceType,o=r.enter("linkReference"),s=r.enter("label"),a=r.createTracker(n),u=a.move("["),l=r.containerPhrasing(t,{before:u,after:"]",...a.current()});u+=a.move(l+"]["),s();let c=r.stack;r.stack=[],s=r.enter("reference");let f=r.safe(r.associationId(t),{before:u,after:"]",...a.current()});return s(),r.stack=c,o(),i==="full"||!l||l!==f?u+=a.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function RS(){return"["}function ho(t){let e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function mg(t){let e=ho(t),r=t.options.bulletOther;if(!r)return e==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+r+"`) to be different");return r}function gg(t){let e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function su(t){let e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function xg(t,e,r,n){let i=r.enter("list"),o=r.bulletCurrent,s=t.ordered?gg(r):ho(r),a=t.ordered?s==="."?")":".":mg(r),u=e&&r.bulletLastUsed?s===r.bulletLastUsed:!1;if(!t.ordered){let c=t.children?t.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(u=!0),su(r)===s&&c){let f=-1;for(;++f<t.children.length;){let p=t.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(s=a),r.bulletCurrent=s;let l=r.containerFlow(t,n);return r.bulletLastUsed=s,r.bulletCurrent=o,i(),l}function yg(t){let e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function bg(t,e,r,n){let i=yg(r),o=r.bulletCurrent||ho(r);e&&e.type==="list"&&e.ordered&&(o=(typeof e.start=="number"&&e.start>-1?e.start:1)+(r.options.incrementListMarker===!1?0:e.children.indexOf(t))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(s=Math.ceil(s/4)*4);let a=r.createTracker(n);a.move(o+" ".repeat(s-o.length)),a.shift(s);let u=r.enter("listItem"),l=r.indentLines(r.containerFlow(t,a.current()),c);return u(),l;function c(f,p,d){return p?(d?"":" ".repeat(s))+f:(d?o:o+" ".repeat(s-o.length))+f}}function Eg(t,e,r,n){let i=r.enter("paragraph"),o=r.enter("phrasing"),s=r.containerPhrasing(t,n);return o(),i(),s}var _f=Fr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Ag(t,e,r,n){return(t.children.some(function(s){return _f(s)})?r.containerPhrasing:r.containerFlow).call(r,t,n)}function Cg(t){let e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}Sf.peek=FS;function Sf(t,e,r,n){let i=Cg(r),o=r.enter("strong"),s=r.createTracker(n),a=s.move(i+i),u=s.move(r.containerPhrasing(t,{after:i,before:a,...s.current()})),l=u.charCodeAt(0),c=po(n.before.charCodeAt(n.before.length-1),l,i);c.inside&&(u=nr(l)+u.slice(1));let f=u.charCodeAt(u.length-1),p=po(n.after.charCodeAt(0),f,i);p.inside&&(u=u.slice(0,-1)+nr(f));let d=s.move(i+i);return o(),r.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},a+u+d}function FS(t,e,r){return r.options.strong||"*"}function wg(t,e,r,n){return r.safe(t.value,n)}function kg(t){let e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function Tg(t,e,r){let n=(su(r)+(r.options.ruleSpaces?" ":"")).repeat(kg(r));return r.options.ruleSpaces?n.slice(0,-1):n}var vi={blockquote:og,break:xf,code:lg,definition:cg,emphasis:yf,hardBreak:xf,heading:hg,html:bf,image:Ef,imageReference:Af,inlineCode:Cf,link:kf,linkReference:Tf,list:xg,listItem:bg,paragraph:Eg,root:Ag,strong:Sf,text:wg,thematicBreak:Tg};var _g=[NS];function NS(t,e,r,n){if(e.type==="code"&&ks(e,n)&&(t.type==="list"||t.type===e.type&&ks(t,n)))return!1;if("spread"in r&&typeof r.spread=="boolean")return t.type==="paragraph"&&(t.type===e.type||e.type==="definition"||e.type==="heading"&&ou(e,n))?void 0:r.spread?1:0}var Ii=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],Sg=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
86
- `,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:Ii},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
87
- ]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:Ii},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
88
- *])`},{character:"*",inConstruct:"phrasing",notInConstruct:Ii},{atBreak:!0,character:"+",after:`(?:[ \r
81
+ `,...o.current()});return/^[\t ]/.test(l)&&(l=Qt(l.charCodeAt(0))+l.slice(1)),l=l?s+" "+l:s,r.options.closeAtx&&(l+=" "+s),u(),a(),l}lf.peek=Z_;function lf(t){return t.value||""}function Z_(){return"<"}cf.peek=X_;function cf(t,e,r,n){let i=ao(r),o=i==='"'?"Quote":"Apostrophe",s=r.enter("image"),a=r.enter("label"),u=r.createTracker(n),l=u.move("![");return l+=u.move(r.safe(t.alt,{before:l,after:"]",...u.current()})),l+=u.move("]("),a(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(a=r.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(r.safe(t.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(a=r.enter("destinationRaw"),l+=u.move(r.safe(t.url,{before:l,after:t.title?" ":")",...u.current()}))),a(),t.title&&(a=r.enter(`title${o}`),l+=u.move(" "+i),l+=u.move(r.safe(t.title,{before:l,after:i,...u.current()})),l+=u.move(i),a()),l+=u.move(")"),s(),l}function X_(){return"!"}ff.peek=J_;function ff(t,e,r,n){let i=t.referenceType,o=r.enter("imageReference"),s=r.enter("label"),a=r.createTracker(n),u=a.move("!["),l=r.safe(t.alt,{before:u,after:"]",...a.current()});u+=a.move(l+"]["),s();let c=r.stack;r.stack=[],s=r.enter("reference");let f=r.safe(r.associationId(t),{before:u,after:"]",...a.current()});return s(),r.stack=c,o(),i==="full"||!l||l!==f?u+=a.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function J_(){return"!"}pf.peek=Q_;function pf(t,e,r){let n=t.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++o<r.unsafe.length;){let s=r.unsafe[o],a=r.compilePattern(s),u;if(s.atBreak)for(;u=a.exec(n);){let l=u.index;n.charCodeAt(l)===10&&n.charCodeAt(l-1)===13&&l--,n=n.slice(0,l)+" "+n.slice(u.index+1)}}return i+n+i}function Q_(){return"`"}function df(t,e){let r=Jr(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(r===t.url||"mailto:"+r===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}hf.peek=eS;function hf(t,e,r,n){let i=ao(r),o=i==='"'?"Quote":"Apostrophe",s=r.createTracker(n),a,u;if(df(t,r)){let c=r.stack;r.stack=[],a=r.enter("autolink");let f=s.move("<");return f+=s.move(r.containerPhrasing(t,{before:f,after:">",...s.current()})),f+=s.move(">"),a(),r.stack=c,f}a=r.enter("link"),u=r.enter("label");let l=s.move("[");return l+=s.move(r.containerPhrasing(t,{before:l,after:"](",...s.current()})),l+=s.move("]("),u(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(u=r.enter("destinationLiteral"),l+=s.move("<"),l+=s.move(r.safe(t.url,{before:l,after:">",...s.current()})),l+=s.move(">")):(u=r.enter("destinationRaw"),l+=s.move(r.safe(t.url,{before:l,after:t.title?" ":")",...s.current()}))),u(),t.title&&(u=r.enter(`title${o}`),l+=s.move(" "+i),l+=s.move(r.safe(t.title,{before:l,after:i,...s.current()})),l+=s.move(i),u()),l+=s.move(")"),a(),l}function eS(t,e,r){return df(t,r)?"<":"["}mf.peek=tS;function mf(t,e,r,n){let i=t.referenceType,o=r.enter("linkReference"),s=r.enter("label"),a=r.createTracker(n),u=a.move("["),l=r.containerPhrasing(t,{before:u,after:"]",...a.current()});u+=a.move(l+"]["),s();let c=r.stack;r.stack=[],s=r.enter("reference");let f=r.safe(r.associationId(t),{before:u,after:"]",...a.current()});return s(),r.stack=c,o(),i==="full"||!l||l!==f?u+=a.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function tS(){return"["}function lo(t){let e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function Km(t){let e=lo(t),r=t.options.bulletOther;if(!r)return e==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+r+"`) to be different");return r}function Ym(t){let e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function ru(t){let e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function Zm(t,e,r,n){let i=r.enter("list"),o=r.bulletCurrent,s=t.ordered?Ym(r):lo(r),a=t.ordered?s==="."?")":".":Km(r),u=e&&r.bulletLastUsed?s===r.bulletLastUsed:!1;if(!t.ordered){let c=t.children?t.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(u=!0),ru(r)===s&&c){let f=-1;for(;++f<t.children.length;){let p=t.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(s=a),r.bulletCurrent=s;let l=r.containerFlow(t,n);return r.bulletLastUsed=s,r.bulletCurrent=o,i(),l}function Xm(t){let e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function Jm(t,e,r,n){let i=Xm(r),o=r.bulletCurrent||lo(r);e&&e.type==="list"&&e.ordered&&(o=(typeof e.start=="number"&&e.start>-1?e.start:1)+(r.options.incrementListMarker===!1?0:e.children.indexOf(t))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(s=Math.ceil(s/4)*4);let a=r.createTracker(n);a.move(o+" ".repeat(s-o.length)),a.shift(s);let u=r.enter("listItem"),l=r.indentLines(r.containerFlow(t,a.current()),c);return u(),l;function c(f,p,d){return p?(d?"":" ".repeat(s))+f:(d?o:o+" ".repeat(s-o.length))+f}}function Qm(t,e,r,n){let i=r.enter("paragraph"),o=r.enter("phrasing"),s=r.containerPhrasing(t,n);return o(),i(),s}var gf=Or(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function eg(t,e,r,n){return(t.children.some(function(s){return gf(s)})?r.containerPhrasing:r.containerFlow).call(r,t,n)}function tg(t){let e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}xf.peek=rS;function xf(t,e,r,n){let i=tg(r),o=r.enter("strong"),s=r.createTracker(n),a=s.move(i+i),u=s.move(r.containerPhrasing(t,{after:i,before:a,...s.current()})),l=u.charCodeAt(0),c=uo(n.before.charCodeAt(n.before.length-1),l,i);c.inside&&(u=Qt(l)+u.slice(1));let f=u.charCodeAt(u.length-1),p=uo(n.after.charCodeAt(0),f,i);p.inside&&(u=u.slice(0,-1)+Qt(f));let d=s.move(i+i);return o(),r.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},a+u+d}function rS(t,e,r){return r.options.strong||"*"}function rg(t,e,r,n){return r.safe(t.value,n)}function ng(t){let e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function ig(t,e,r){let n=(ru(r)+(r.options.ruleSpaces?" ":"")).repeat(ng(r));return r.options.ruleSpaces?n.slice(0,-1):n}var _i={blockquote:Bm,break:af,code:$m,definition:qm,emphasis:uf,hardBreak:af,heading:Hm,html:lf,image:cf,imageReference:ff,inlineCode:pf,link:hf,linkReference:mf,list:Zm,listItem:Jm,paragraph:Qm,root:eg,strong:xf,text:rg,thematicBreak:ig};var og=[nS];function nS(t,e,r,n){if(e.type==="code"&&ys(e,n)&&(t.type==="list"||t.type===e.type&&ys(t,n)))return!1;if("spread"in r&&typeof r.spread=="boolean")return t.type==="paragraph"&&(t.type===e.type||e.type==="definition"||e.type==="heading"&&tu(e,n))?void 0:r.spread?1:0}var Si=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],sg=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
82
+ `,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:Si},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
83
+ ]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:Si},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
84
+ *])`},{character:"*",inConstruct:"phrasing",notInConstruct:Si},{atBreak:!0,character:"+",after:`(?:[ \r
89
85
  ])`},{atBreak:!0,character:"-",after:`(?:[ \r
90
86
  -])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
91
- ]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:Ii},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:Ii},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:Ii},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:Ii},{atBreak:!0,character:"~"}];function vg(t){return t.label||!t.identifier?t.label||"":Qa(t.identifier)}function Ig(t){if(!t._compiled){let e=(t.atBreak?"[\\r\\n][\\t ]*":"")+(t.before?"(?:"+t.before+")":"");t._compiled=new RegExp((e?"("+e+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(t.character)?"\\":"")+t.character+(t.after?"(?:"+t.after+")":""),"g")}return t._compiled}function Og(t,e,r){let n=e.indexStack,i=t.children||[],o=[],s=-1,a=r.before,u;n.push(-1);let l=e.createTracker(r);for(;++s<i.length;){let c=i[s],f;if(n[n.length-1]=s,s+1<i.length){let m=e.handle.handlers[i[s+1].type];m&&m.peek&&(m=m.peek),f=m?m(i[s+1],t,e,{before:"",after:"",...l.current()}).charAt(0):""}else f=r.after;o.length>0&&(a==="\r"||a===`
92
- `)&&c.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),a=" ",l=e.createTracker(r),l.move(o.join("")));let p=e.handle(c,t,e,{...l.current(),after:f,before:a});u&&u===p.slice(0,1)&&(p=nr(u.charCodeAt(0))+p.slice(1));let d=e.attentionEncodeSurroundingInfo;e.attentionEncodeSurroundingInfo=void 0,u=void 0,d&&(o.length>0&&d.before&&a===o[o.length-1].slice(-1)&&(o[o.length-1]=o[o.length-1].slice(0,-1)+nr(a.charCodeAt(0))),d.after&&(u=f)),l.move(p),o.push(p),a=p.slice(-1)}return n.pop(),o.join("")}function Dg(t,e,r){let n=e.indexStack,i=t.children||[],o=e.createTracker(r),s=[],a=-1;for(n.push(-1);++a<i.length;){let u=i[a];n[n.length-1]=a,s.push(o.move(e.handle(u,t,e,{before:`
87
+ ]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:Si},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:Si},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:Si},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:Si},{atBreak:!0,character:"~"}];function ag(t){return t.label||!t.identifier?t.label||"":Ya(t.identifier)}function ug(t){if(!t._compiled){let e=(t.atBreak?"[\\r\\n][\\t ]*":"")+(t.before?"(?:"+t.before+")":"");t._compiled=new RegExp((e?"("+e+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(t.character)?"\\":"")+t.character+(t.after?"(?:"+t.after+")":""),"g")}return t._compiled}function lg(t,e,r){let n=e.indexStack,i=t.children||[],o=[],s=-1,a=r.before,u;n.push(-1);let l=e.createTracker(r);for(;++s<i.length;){let c=i[s],f;if(n[n.length-1]=s,s+1<i.length){let m=e.handle.handlers[i[s+1].type];m&&m.peek&&(m=m.peek),f=m?m(i[s+1],t,e,{before:"",after:"",...l.current()}).charAt(0):""}else f=r.after;o.length>0&&(a==="\r"||a===`
88
+ `)&&c.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),a=" ",l=e.createTracker(r),l.move(o.join("")));let p=e.handle(c,t,e,{...l.current(),after:f,before:a});u&&u===p.slice(0,1)&&(p=Qt(u.charCodeAt(0))+p.slice(1));let d=e.attentionEncodeSurroundingInfo;e.attentionEncodeSurroundingInfo=void 0,u=void 0,d&&(o.length>0&&d.before&&a===o[o.length-1].slice(-1)&&(o[o.length-1]=o[o.length-1].slice(0,-1)+Qt(a.charCodeAt(0))),d.after&&(u=f)),l.move(p),o.push(p),a=p.slice(-1)}return n.pop(),o.join("")}function cg(t,e,r){let n=e.indexStack,i=t.children||[],o=e.createTracker(r),s=[],a=-1;for(n.push(-1);++a<i.length;){let u=i[a];n[n.length-1]=a,s.push(o.move(e.handle(u,t,e,{before:`
93
89
  `,after:`
94
- `,...o.current()}))),u.type!=="list"&&(e.bulletLastUsed=void 0),a<i.length-1&&s.push(o.move(PS(u,i[a+1],t,e)))}return n.pop(),s.join("")}function PS(t,e,r,n){let i=n.join.length;for(;i--;){let o=n.join[i](t,e,r,n);if(o===!0||o===1)break;if(typeof o=="number")return`
90
+ `,...o.current()}))),u.type!=="list"&&(e.bulletLastUsed=void 0),a<i.length-1&&s.push(o.move(iS(u,i[a+1],t,e)))}return n.pop(),s.join("")}function iS(t,e,r,n){let i=n.join.length;for(;i--;){let o=n.join[i](t,e,r,n);if(o===!0||o===1)break;if(typeof o=="number")return`
95
91
  `.repeat(1+o);if(o===!1)return`
96
92
 
97
93
  <!---->
98
94
 
99
95
  `}return`
100
96
 
101
- `}var LS=/\r?\n|\r/g;function Rg(t,e){let r=[],n=0,i=0,o;for(;o=LS.exec(t);)s(t.slice(n,o.index)),r.push(o[0]),n=o.index+o[0].length,i++;return s(t.slice(n)),r.join("");function s(a){r.push(e(a,i,!a))}}function Ng(t,e,r){let n=(r.before||"")+(e||"")+(r.after||""),i=[],o=[],s={},a=-1;for(;++a<t.unsafe.length;){let c=t.unsafe[a];if(!tu(t.stack,c))continue;let f=t.compilePattern(c),p;for(;p=f.exec(n);){let d="before"in c||!!c.atBreak,m="after"in c,y=p.index+(d?p[1].length:0);i.includes(y)?(s[y].before&&!d&&(s[y].before=!1),s[y].after&&!m&&(s[y].after=!1)):(i.push(y),s[y]={before:d,after:m})}}i.sort(MS);let u=r.before?r.before.length:0,l=n.length-(r.after?r.after.length:0);for(a=-1;++a<i.length;){let c=i[a];c<u||c>=l||c+1<l&&i[a+1]===c+1&&s[c].after&&!s[c+1].before&&!s[c+1].after||i[a-1]===c-1&&s[c].before&&!s[c-1].before&&!s[c-1].after||(u!==c&&o.push(Fg(n.slice(u,c),"\\")),u=c,/[!-/:-@[-`{-~]/.test(n.charAt(c))&&(!r.encode||!r.encode.includes(n.charAt(c)))?o.push("\\"):(o.push(nr(n.charCodeAt(c))),u++))}return o.push(Fg(n.slice(u,l),r.after)),o.join("")}function MS(t,e){return t-e}function Fg(t,e){let r=/\\(?=[!-/:-@[-`{-~])/g,n=[],i=[],o=t+e,s=-1,a=0,u;for(;u=r.exec(o);)n.push(u.index);for(;++s<n.length;)a!==n[s]&&i.push(t.slice(a,n[s])),i.push("\\"),a=n[s];return i.push(t.slice(a)),i.join("")}function Pg(t){let e=t||{},r=e.now||{},n=e.lineShift||0,i=r.line||1,o=r.column||1;return{move:u,current:s,shift:a};function s(){return{now:{line:i,column:o},lineShift:n}}function a(l){n+=l}function u(l){let c=l||"",f=c.split(/\r?\n|\r/g),p=f[f.length-1];return i+=f.length-1,o=f.length===1?o+p.length:1+p.length+n,c}}function vf(t,e){let r=e||{},n={associationId:vg,containerPhrasing:zS,containerFlow:$S,createTracker:Pg,compilePattern:Ig,enter:o,handlers:{...vi},handle:void 0,indentLines:Rg,indexStack:[],join:[..._g],options:{},safe:qS,stack:[],unsafe:[...Sg]};gf(n,r),n.options.tightDefinitions&&n.join.push(US),n.handle=ng("type",{invalid:BS,unknown:jS,handlers:n.handlers});let i=n.handle(t,void 0,n,{before:`
97
+ `}var oS=/\r?\n|\r/g;function fg(t,e){let r=[],n=0,i=0,o;for(;o=oS.exec(t);)s(t.slice(n,o.index)),r.push(o[0]),n=o.index+o[0].length,i++;return s(t.slice(n)),r.join("");function s(a){r.push(e(a,i,!a))}}function dg(t,e,r){let n=(r.before||"")+(e||"")+(r.after||""),i=[],o=[],s={},a=-1;for(;++a<t.unsafe.length;){let c=t.unsafe[a];if(!Xa(t.stack,c))continue;let f=t.compilePattern(c),p;for(;p=f.exec(n);){let d="before"in c||!!c.atBreak,m="after"in c,y=p.index+(d?p[1].length:0);i.includes(y)?(s[y].before&&!d&&(s[y].before=!1),s[y].after&&!m&&(s[y].after=!1)):(i.push(y),s[y]={before:d,after:m})}}i.sort(sS);let u=r.before?r.before.length:0,l=n.length-(r.after?r.after.length:0);for(a=-1;++a<i.length;){let c=i[a];c<u||c>=l||c+1<l&&i[a+1]===c+1&&s[c].after&&!s[c+1].before&&!s[c+1].after||i[a-1]===c-1&&s[c].before&&!s[c-1].before&&!s[c-1].after||(u!==c&&o.push(pg(n.slice(u,c),"\\")),u=c,/[!-/:-@[-`{-~]/.test(n.charAt(c))&&(!r.encode||!r.encode.includes(n.charAt(c)))?o.push("\\"):(o.push(Qt(n.charCodeAt(c))),u++))}return o.push(pg(n.slice(u,l),r.after)),o.join("")}function sS(t,e){return t-e}function pg(t,e){let r=/\\(?=[!-/:-@[-`{-~])/g,n=[],i=[],o=t+e,s=-1,a=0,u;for(;u=r.exec(o);)n.push(u.index);for(;++s<n.length;)a!==n[s]&&i.push(t.slice(a,n[s])),i.push("\\"),a=n[s];return i.push(t.slice(a)),i.join("")}function hg(t){let e=t||{},r=e.now||{},n=e.lineShift||0,i=r.line||1,o=r.column||1;return{move:u,current:s,shift:a};function s(){return{now:{line:i,column:o},lineShift:n}}function a(l){n+=l}function u(l){let c=l||"",f=c.split(/\r?\n|\r/g),p=f[f.length-1];return i+=f.length-1,o=f.length===1?o+p.length:1+p.length+n,c}}function yf(t,e){let r=e||{},n={associationId:ag,containerPhrasing:cS,containerFlow:fS,createTracker:hg,compilePattern:ug,enter:o,handlers:{..._i},handle:void 0,indentLines:fg,indexStack:[],join:[...og],options:{},safe:pS,stack:[],unsafe:[...sg]};sf(n,r),n.options.tightDefinitions&&n.join.push(lS),n.handle=Lm("type",{invalid:aS,unknown:uS,handlers:n.handlers});let i=n.handle(t,void 0,n,{before:`
102
98
  `,after:`
103
99
  `,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
104
- `),i;function o(s){return n.stack.push(s),a;function a(){n.stack.pop()}}}function BS(t){throw new Error("Cannot handle value `"+t+"`, expected node")}function jS(t){let e=t;throw new Error("Cannot handle unknown node `"+e.type+"`")}function US(t,e){if(t.type==="definition"&&t.type===e.type)return 0}function zS(t,e){return Og(t,this,e)}function $S(t,e){return Dg(t,this,e)}function qS(t,e){return Ng(this,t,e)}function au(t){let e=this;e.compiler=r;function r(n){return vf(n,{...e.data("settings"),...t,extensions:e.data("toMarkdownExtensions")||[]})}}function If(t){if(t)throw t}var cu=jd(Vg(),1);function Ss(t){if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Of(){let t=[],e={run:r,use:n};return e;function r(...i){let o=-1,s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...i);function a(u,...l){let c=t[++o],f=-1;if(u){s(u);return}for(;++f<i.length;)(l[f]===null||l[f]===void 0)&&(l[f]=i[f]);i=l,c?Gg(c,a)(...l):s(null,...l)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),e}}function Gg(t,e){let r;return n;function n(...s){let a=t.length>s.length,u;a&&s.push(i);try{u=t.apply(this,s)}catch(l){let c=l;if(a&&r)throw c;return i(c)}a||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(s,...a){r||(r=!0,e(s,...a))}function o(s){i(null,s)}}import{VFile as VS}from"vfile";var Wg=function(t){let n=this.constructor.prototype,i=n[t],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,n),o};var GS={}.hasOwnProperty,Nf=class t extends Wg{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Of()}copy(){let e=new t,r=-1;for(;++r<this.attachers.length;){let n=this.attachers[r];e.use(...n)}return e.data((0,cu.default)(!0,{},this.namespace)),e}data(e,r){return typeof e=="string"?arguments.length===2?(Ff("data",this.frozen),this.namespace[e]=r,this):GS.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Ff("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let i=r.call(e,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();let r=lu(e),n=this.parser||this.Parser;return Df("parse",n),n(String(r),r)}process(e,r){let n=this;return this.freeze(),Df("process",this.parser||this.Parser),Rf("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(o,s){let a=lu(e),u=n.parse(a);n.run(u,a,function(c,f,p){if(c||!f||!p)return l(c);let d=f,m=n.stringify(d,p);HS(m)?p.value=m:p.result=m,l(c,p)});function l(c,f){c||!f?s(c):o?o(f):r(void 0,f)}}}processSync(e){let r=!1,n;return this.freeze(),Df("processSync",this.parser||this.Parser),Rf("processSync",this.compiler||this.Compiler),this.process(e,i),Kg("processSync","process",r),n;function i(o,s){r=!0,If(o),n=s}}run(e,r,n){Hg(e),this.freeze();let i=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?o(void 0,n):new Promise(o);function o(s,a){let u=lu(r);i.run(e,u,l);function l(c,f,p){let d=f||e;c?a(c):s?s(d):n(void 0,d,p)}}}runSync(e,r){let n=!1,i;return this.run(e,r,o),Kg("runSync","run",n),i;function o(s,a){If(s),i=a,n=!0}}stringify(e,r){this.freeze();let n=lu(r),i=this.compiler||this.Compiler;return Rf("stringify",i),Hg(e),i(e,n)}use(e,...r){let n=this.attachers,i=this.namespace;if(Ff("use",this.frozen),e!=null)if(typeof e=="function")u(e,r);else if(typeof e=="object")Array.isArray(e)?a(e):s(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function o(l){if(typeof l=="function")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){let[c,...f]=l;u(c,f)}else s(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function s(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(l.plugins),l.settings&&(i.settings=(0,cu.default)(!0,i.settings,l.settings))}function a(l){let c=-1;if(l!=null)if(Array.isArray(l))for(;++c<l.length;){let f=l[c];o(f)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,c){let f=-1,p=-1;for(;++f<n.length;)if(n[f][0]===l){p=f;break}if(p===-1)n.push([l,...c]);else if(c.length>0){let[d,...m]=c,y=n[p][1];Ss(y)&&Ss(d)&&(d=(0,cu.default)(!0,y,d)),n[p]=[l,d,...m]}}}},Pf=new Nf().freeze();function Df(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Rf(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Ff(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Hg(t){if(!Ss(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Kg(t,e,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function lu(t){return WS(t)?t:new VS(t)}function WS(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function HS(t){return typeof t=="string"||KS(t)}function KS(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var mo=Pf().use(eu).use(au).freeze();function Lf(t,e){let r=String(t);if(typeof e!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(e);for(;i!==-1;)n++,i=r.indexOf(e,i+e.length);return n}function Mf(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Bf(t,e,r){let i=Fr((r||{}).ignore||[]),o=YS(e),s=-1;for(;++s<o.length;)Ts(t,"text",a);function a(l,c){let f=-1,p;for(;++f<c.length;){let d=c[f],m=p?p.children:void 0;if(i(d,m?m.indexOf(d):void 0,p))return;p=d}if(p)return u(l,c)}function u(l,c){let f=c[c.length-1],p=o[s][0],d=o[s][1],m=0,g=f.children.indexOf(l),b=!1,w=[];p.lastIndex=0;let C=p.exec(l.value);for(;C;){let D=C.index,R={index:C.index,input:C.input,stack:[...c,l]},S=d(...C,R);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?p.lastIndex=D+1:(m!==D&&w.push({type:"text",value:l.value.slice(m,D)}),Array.isArray(S)?w.push(...S):S&&w.push(S),m=D+C[0].length,b=!0),!p.global)break;C=p.exec(l.value)}return b?(m<l.value.length&&w.push({type:"text",value:l.value.slice(m)}),f.children.splice(g,1,...w)):w=[l],g+w.length}}function YS(t){let e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");let r=!t[0]||Array.isArray(t[0])?t:[t],n=-1;for(;++n<r.length;){let i=r[n];e.push([ZS(i[0]),XS(i[1])])}return e}function ZS(t){return typeof t=="string"?new RegExp(Mf(t),"g"):t}function XS(t){return typeof t=="function"?t:function(){return t}}var jf="phrasing",Uf=["autolink","link","image","label"];function $f(){return{transforms:[n0],enter:{literalAutolink:JS,literalAutolinkEmail:zf,literalAutolinkHttp:zf,literalAutolinkWww:zf},exit:{literalAutolink:r0,literalAutolinkEmail:t0,literalAutolinkHttp:QS,literalAutolinkWww:e0}}}function qf(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:jf,notInConstruct:Uf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:jf,notInConstruct:Uf},{character:":",before:"[ps]",after:"\\/",inConstruct:jf,notInConstruct:Uf}]}}function JS(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function zf(t){this.config.enter.autolinkProtocol.call(this,t)}function QS(t){this.config.exit.autolinkProtocol.call(this,t)}function e0(t){this.config.exit.data.call(this,t);let e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}function t0(t){this.config.exit.autolinkEmail.call(this,t)}function r0(t){this.exit(t)}function n0(t){Bf(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,i0],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),o0]],{ignore:["link","linkReference"]})}function i0(t,e,r,n,i){let o="";if(!Yg(i)||(/^w/i.test(e)&&(r=e+r,e="",o="http://"),!s0(r)))return!1;let s=a0(r+n);if(!s[0])return!1;let a={type:"link",title:null,url:o+e+s[0],children:[{type:"text",value:e+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function o0(t,e,r,n){return!Yg(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+r,children:[{type:"text",value:e+"@"+r}]}}function s0(t){let e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function a0(t){let e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let r=e[0],n=r.indexOf(")"),i=Lf(t,"("),o=Lf(t,")");for(;n!==-1&&i>o;)t+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),o++;return[t,r]}function Yg(t,e){let r=t.input.charCodeAt(t.index-1);return(t.index===0||Dr(r)||wi(r))&&(!e||r!==47)}Zg.peek=g0;function u0(){this.buffer()}function l0(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function c0(){this.buffer()}function f0(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function p0(t){let e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=It(this.sliceSerialize(t)).toLowerCase(),r.label=e}function d0(t){this.exit(t)}function h0(t){let e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=It(this.sliceSerialize(t)).toLowerCase(),r.label=e}function m0(t){this.exit(t)}function g0(){return"["}function Zg(t,e,r,n){let i=r.createTracker(n),o=i.move("[^"),s=r.enter("footnoteReference"),a=r.enter("reference");return o+=i.move(r.safe(r.associationId(t),{after:"]",before:o})),a(),s(),o+=i.move("]"),o}function Vf(){return{enter:{gfmFootnoteCallString:u0,gfmFootnoteCall:l0,gfmFootnoteDefinitionLabelString:c0,gfmFootnoteDefinition:f0},exit:{gfmFootnoteCallString:p0,gfmFootnoteCall:d0,gfmFootnoteDefinitionLabelString:h0,gfmFootnoteDefinition:m0}}}function Gf(t){let e=!1;return t&&t.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:r,footnoteReference:Zg},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,i,o,s){let a=o.createTracker(s),u=a.move("[^"),l=o.enter("footnoteDefinition"),c=o.enter("label");return u+=a.move(o.safe(o.associationId(n),{before:u,after:"]"})),c(),u+=a.move("]:"),n.children&&n.children.length>0&&(a.shift(4),u+=a.move((e?`
105
- `:" ")+o.indentLines(o.containerFlow(n,a.current()),e?Xg:x0))),l(),u}}function x0(t,e,r){return e===0?t:Xg(t,e,r)}function Xg(t,e,r){return(r?"":" ")+t}var y0=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Jg.peek=A0;function Wf(){return{canContainEols:["delete"],enter:{strikethrough:b0},exit:{strikethrough:E0}}}function Hf(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:y0}],handlers:{delete:Jg}}}function b0(t){this.enter({type:"delete",children:[]},t)}function E0(t){this.exit(t)}function Jg(t,e,r,n){let i=r.createTracker(n),o=r.enter("strikethrough"),s=i.move("~~");return s+=r.containerPhrasing(t,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function A0(){return"~"}function C0(t){return t.length}function ex(t,e){let r=e||{},n=(r.align||[]).concat(),i=r.stringLength||C0,o=[],s=[],a=[],u=[],l=0,c=-1;for(;++c<t.length;){let y=[],g=[],b=-1;for(t[c].length>l&&(l=t[c].length);++b<t[c].length;){let w=w0(t[c][b]);if(r.alignDelimiters!==!1){let C=i(w);g[b]=C,(u[b]===void 0||C>u[b])&&(u[b]=C)}y.push(w)}s[c]=y,a[c]=g}let f=-1;if(typeof n=="object"&&"length"in n)for(;++f<l;)o[f]=Qg(n[f]);else{let y=Qg(n);for(;++f<l;)o[f]=y}f=-1;let p=[],d=[];for(;++f<l;){let y=o[f],g="",b="";y===99?(g=":",b=":"):y===108?g=":":y===114&&(b=":");let w=r.alignDelimiters===!1?1:Math.max(1,u[f]-g.length-b.length),C=g+"-".repeat(w)+b;r.alignDelimiters!==!1&&(w=g.length+w+b.length,w>u[f]&&(u[f]=w),d[f]=w),p[f]=C}s.splice(1,0,p),a.splice(1,0,d),c=-1;let m=[];for(;++c<s.length;){let y=s[c],g=a[c];f=-1;let b=[];for(;++f<l;){let w=y[f]||"",C="",D="";if(r.alignDelimiters!==!1){let R=u[f]-(g[f]||0),S=o[f];S===114?C=" ".repeat(R):S===99?R%2?(C=" ".repeat(R/2+.5),D=" ".repeat(R/2-.5)):(C=" ".repeat(R/2),D=C):D=" ".repeat(R)}r.delimiterStart!==!1&&!f&&b.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&w==="")&&(r.delimiterStart!==!1||f)&&b.push(" "),r.alignDelimiters!==!1&&b.push(C),b.push(w),r.alignDelimiters!==!1&&b.push(D),r.padding!==!1&&b.push(" "),(r.delimiterEnd!==!1||f!==l-1)&&b.push("|")}m.push(r.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return m.join(`
106
- `)}function w0(t){return t==null?"":String(t)}function Qg(t){let e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function Yf(){return{enter:{table:k0,tableData:tx,tableHeader:tx,tableRow:_0},exit:{codeText:S0,table:T0,tableData:Kf,tableHeader:Kf,tableRow:Kf}}}function k0(t){let e=t._align;this.enter({type:"table",align:e.map(function(r){return r==="none"?null:r}),children:[]},t),this.data.inTable=!0}function T0(t){this.exit(t),this.data.inTable=void 0}function _0(t){this.enter({type:"tableRow",children:[]},t)}function Kf(t){this.exit(t)}function tx(t){this.enter({type:"tableCell",children:[]},t)}function S0(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,v0));let r=this.stack[this.stack.length-1];r.type,r.value=e,this.exit(t)}function v0(t,e){return e==="|"?e:t}function Zf(t){let e=t||{},r=e.tableCellPadding,n=e.tablePipeAlign,i=e.stringLength,o=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
100
+ `),i;function o(s){return n.stack.push(s),a;function a(){n.stack.pop()}}}function aS(t){throw new Error("Cannot handle value `"+t+"`, expected node")}function uS(t){let e=t;throw new Error("Cannot handle unknown node `"+e.type+"`")}function lS(t,e){if(t.type==="definition"&&t.type===e.type)return 0}function cS(t,e){return lg(t,this,e)}function fS(t,e){return cg(t,this,e)}function pS(t,e){return dg(this,t,e)}function nu(t){let e=this;e.compiler=r;function r(n){return yf(n,{...e.data("settings"),...t,extensions:e.data("toMarkdownExtensions")||[]})}}function bf(t){if(t)throw t}var su=ns(wg(),1);function As(t){if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Ef(){let t=[],e={run:r,use:n};return e;function r(...i){let o=-1,s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...i);function a(u,...l){let c=t[++o],f=-1;if(u){s(u);return}for(;++f<i.length;)(l[f]===null||l[f]===void 0)&&(l[f]=i[f]);i=l,c?Cg(c,a)(...l):s(null,...l)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),e}}function Cg(t,e){let r;return n;function n(...s){let a=t.length>s.length,u;a&&s.push(i);try{u=t.apply(this,s)}catch(l){let c=l;if(a&&r)throw c;return i(c)}a||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(s,...a){r||(r=!0,e(s,...a))}function o(s){i(null,s)}}import{VFile as dS}from"vfile";var Tg=(function(t){let n=this.constructor.prototype,i=n[t],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,n),o});var hS={}.hasOwnProperty,Cf=class t extends Tg{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Ef()}copy(){let e=new t,r=-1;for(;++r<this.attachers.length;){let n=this.attachers[r];e.use(...n)}return e.data((0,su.default)(!0,{},this.namespace)),e}data(e,r){return typeof e=="string"?arguments.length===2?(wf("data",this.frozen),this.namespace[e]=r,this):hS.call(this.namespace,e)&&this.namespace[e]||void 0:e?(wf("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let i=r.call(e,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();let r=ou(e),n=this.parser||this.Parser;return Af("parse",n),n(String(r),r)}process(e,r){let n=this;return this.freeze(),Af("process",this.parser||this.Parser),kf("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(o,s){let a=ou(e),u=n.parse(a);n.run(u,a,function(c,f,p){if(c||!f||!p)return l(c);let d=f,m=n.stringify(d,p);gS(m)?p.value=m:p.result=m,l(c,p)});function l(c,f){c||!f?s(c):o?o(f):r(void 0,f)}}}processSync(e){let r=!1,n;return this.freeze(),Af("processSync",this.parser||this.Parser),kf("processSync",this.compiler||this.Compiler),this.process(e,i),Sg("processSync","process",r),n;function i(o,s){r=!0,bf(o),n=s}}run(e,r,n){_g(e),this.freeze();let i=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?o(void 0,n):new Promise(o);function o(s,a){let u=ou(r);i.run(e,u,l);function l(c,f,p){let d=f||e;c?a(c):s?s(d):n(void 0,d,p)}}}runSync(e,r){let n=!1,i;return this.run(e,r,o),Sg("runSync","run",n),i;function o(s,a){bf(s),i=a,n=!0}}stringify(e,r){this.freeze();let n=ou(r),i=this.compiler||this.Compiler;return kf("stringify",i),_g(e),i(e,n)}use(e,...r){let n=this.attachers,i=this.namespace;if(wf("use",this.frozen),e!=null)if(typeof e=="function")u(e,r);else if(typeof e=="object")Array.isArray(e)?a(e):s(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function o(l){if(typeof l=="function")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){let[c,...f]=l;u(c,f)}else s(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function s(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(l.plugins),l.settings&&(i.settings=(0,su.default)(!0,i.settings,l.settings))}function a(l){let c=-1;if(l!=null)if(Array.isArray(l))for(;++c<l.length;){let f=l[c];o(f)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,c){let f=-1,p=-1;for(;++f<n.length;)if(n[f][0]===l){p=f;break}if(p===-1)n.push([l,...c]);else if(c.length>0){let[d,...m]=c,y=n[p][1];As(y)&&As(d)&&(d=(0,su.default)(!0,y,d)),n[p]=[l,d,...m]}}}},Tf=new Cf().freeze();function Af(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function kf(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function wf(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function _g(t){if(!As(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Sg(t,e,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function ou(t){return mS(t)?t:new dS(t)}function mS(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function gS(t){return typeof t=="string"||xS(t)}function xS(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var co=Tf().use(Za).use(nu).freeze();function _f(t,e){let r=String(t);if(typeof e!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(e);for(;i!==-1;)n++,i=r.indexOf(e,i+e.length);return n}function Sf(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function If(t,e,r){let i=Or((r||{}).ignore||[]),o=yS(e),s=-1;for(;++s<o.length;)bs(t,"text",a);function a(l,c){let f=-1,p;for(;++f<c.length;){let d=c[f],m=p?p.children:void 0;if(i(d,m?m.indexOf(d):void 0,p))return;p=d}if(p)return u(l,c)}function u(l,c){let f=c[c.length-1],p=o[s][0],d=o[s][1],m=0,g=f.children.indexOf(l),b=!1,w=[];p.lastIndex=0;let k=p.exec(l.value);for(;k;){let D=k.index,R={index:k.index,input:k.input,stack:[...c,l]},S=d(...k,R);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?p.lastIndex=D+1:(m!==D&&w.push({type:"text",value:l.value.slice(m,D)}),Array.isArray(S)?w.push(...S):S&&w.push(S),m=D+k[0].length,b=!0),!p.global)break;k=p.exec(l.value)}return b?(m<l.value.length&&w.push({type:"text",value:l.value.slice(m)}),f.children.splice(g,1,...w)):w=[l],g+w.length}}function yS(t){let e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");let r=!t[0]||Array.isArray(t[0])?t:[t],n=-1;for(;++n<r.length;){let i=r[n];e.push([bS(i[0]),ES(i[1])])}return e}function bS(t){return typeof t=="string"?new RegExp(Sf(t),"g"):t}function ES(t){return typeof t=="function"?t:function(){return t}}var Of="phrasing",vf=["autolink","link","image","label"];function Rf(){return{transforms:[_S],enter:{literalAutolink:AS,literalAutolinkEmail:Df,literalAutolinkHttp:Df,literalAutolinkWww:Df},exit:{literalAutolink:TS,literalAutolinkEmail:CS,literalAutolinkHttp:kS,literalAutolinkWww:wS}}}function Ff(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Of,notInConstruct:vf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Of,notInConstruct:vf},{character:":",before:"[ps]",after:"\\/",inConstruct:Of,notInConstruct:vf}]}}function AS(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Df(t){this.config.enter.autolinkProtocol.call(this,t)}function kS(t){this.config.exit.autolinkProtocol.call(this,t)}function wS(t){this.config.exit.data.call(this,t);let e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}function CS(t){this.config.exit.autolinkEmail.call(this,t)}function TS(t){this.exit(t)}function _S(t){If(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,SS],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),IS]],{ignore:["link","linkReference"]})}function SS(t,e,r,n,i){let o="";if(!Ig(i)||(/^w/i.test(e)&&(r=e+r,e="",o="http://"),!OS(r)))return!1;let s=vS(r+n);if(!s[0])return!1;let a={type:"link",title:null,url:o+e+s[0],children:[{type:"text",value:e+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function IS(t,e,r,n){return!Ig(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+r,children:[{type:"text",value:e+"@"+r}]}}function OS(t){let e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function vS(t){let e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let r=e[0],n=r.indexOf(")"),i=_f(t,"("),o=_f(t,")");for(;n!==-1&&i>o;)t+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),o++;return[t,r]}function Ig(t,e){let r=t.input.charCodeAt(t.index-1);return(t.index===0||Sr(r)||Ai(r))&&(!e||r!==47)}Og.peek=jS;function DS(){this.buffer()}function RS(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function FS(){this.buffer()}function NS(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function PS(t){let e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=St(this.sliceSerialize(t)).toLowerCase(),r.label=e}function LS(t){this.exit(t)}function MS(t){let e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=St(this.sliceSerialize(t)).toLowerCase(),r.label=e}function BS(t){this.exit(t)}function jS(){return"["}function Og(t,e,r,n){let i=r.createTracker(n),o=i.move("[^"),s=r.enter("footnoteReference"),a=r.enter("reference");return o+=i.move(r.safe(r.associationId(t),{after:"]",before:o})),a(),s(),o+=i.move("]"),o}function Nf(){return{enter:{gfmFootnoteCallString:DS,gfmFootnoteCall:RS,gfmFootnoteDefinitionLabelString:FS,gfmFootnoteDefinition:NS},exit:{gfmFootnoteCallString:PS,gfmFootnoteCall:LS,gfmFootnoteDefinitionLabelString:MS,gfmFootnoteDefinition:BS}}}function Pf(t){let e=!1;return t&&t.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:r,footnoteReference:Og},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,i,o,s){let a=o.createTracker(s),u=a.move("[^"),l=o.enter("footnoteDefinition"),c=o.enter("label");return u+=a.move(o.safe(o.associationId(n),{before:u,after:"]"})),c(),u+=a.move("]:"),n.children&&n.children.length>0&&(a.shift(4),u+=a.move((e?`
101
+ `:" ")+o.indentLines(o.containerFlow(n,a.current()),e?vg:US))),l(),u}}function US(t,e,r){return e===0?t:vg(t,e,r)}function vg(t,e,r){return(r?"":" ")+t}var zS=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Dg.peek=VS;function Lf(){return{canContainEols:["delete"],enter:{strikethrough:$S},exit:{strikethrough:qS}}}function Mf(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:zS}],handlers:{delete:Dg}}}function $S(t){this.enter({type:"delete",children:[]},t)}function qS(t){this.exit(t)}function Dg(t,e,r,n){let i=r.createTracker(n),o=r.enter("strikethrough"),s=i.move("~~");return s+=r.containerPhrasing(t,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function VS(){return"~"}function GS(t){return t.length}function Fg(t,e){let r=e||{},n=(r.align||[]).concat(),i=r.stringLength||GS,o=[],s=[],a=[],u=[],l=0,c=-1;for(;++c<t.length;){let y=[],g=[],b=-1;for(t[c].length>l&&(l=t[c].length);++b<t[c].length;){let w=WS(t[c][b]);if(r.alignDelimiters!==!1){let k=i(w);g[b]=k,(u[b]===void 0||k>u[b])&&(u[b]=k)}y.push(w)}s[c]=y,a[c]=g}let f=-1;if(typeof n=="object"&&"length"in n)for(;++f<l;)o[f]=Rg(n[f]);else{let y=Rg(n);for(;++f<l;)o[f]=y}f=-1;let p=[],d=[];for(;++f<l;){let y=o[f],g="",b="";y===99?(g=":",b=":"):y===108?g=":":y===114&&(b=":");let w=r.alignDelimiters===!1?1:Math.max(1,u[f]-g.length-b.length),k=g+"-".repeat(w)+b;r.alignDelimiters!==!1&&(w=g.length+w+b.length,w>u[f]&&(u[f]=w),d[f]=w),p[f]=k}s.splice(1,0,p),a.splice(1,0,d),c=-1;let m=[];for(;++c<s.length;){let y=s[c],g=a[c];f=-1;let b=[];for(;++f<l;){let w=y[f]||"",k="",D="";if(r.alignDelimiters!==!1){let R=u[f]-(g[f]||0),S=o[f];S===114?k=" ".repeat(R):S===99?R%2?(k=" ".repeat(R/2+.5),D=" ".repeat(R/2-.5)):(k=" ".repeat(R/2),D=k):D=" ".repeat(R)}r.delimiterStart!==!1&&!f&&b.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&w==="")&&(r.delimiterStart!==!1||f)&&b.push(" "),r.alignDelimiters!==!1&&b.push(k),b.push(w),r.alignDelimiters!==!1&&b.push(D),r.padding!==!1&&b.push(" "),(r.delimiterEnd!==!1||f!==l-1)&&b.push("|")}m.push(r.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return m.join(`
102
+ `)}function WS(t){return t==null?"":String(t)}function Rg(t){let e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function jf(){return{enter:{table:HS,tableData:Ng,tableHeader:Ng,tableRow:YS},exit:{codeText:ZS,table:KS,tableData:Bf,tableHeader:Bf,tableRow:Bf}}}function HS(t){let e=t._align;this.enter({type:"table",align:e.map(function(r){return r==="none"?null:r}),children:[]},t),this.data.inTable=!0}function KS(t){this.exit(t),this.data.inTable=void 0}function YS(t){this.enter({type:"tableRow",children:[]},t)}function Bf(t){this.exit(t)}function Ng(t){this.enter({type:"tableCell",children:[]},t)}function ZS(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,XS));let r=this.stack[this.stack.length-1];r.type,r.value=e,this.exit(t)}function XS(t,e){return e==="|"?e:t}function Uf(t){let e=t||{},r=e.tableCellPadding,n=e.tablePipeAlign,i=e.stringLength,o=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
107
103
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:u,tableRow:a}};function s(d,m,y,g){return l(c(d,y,g),d.align)}function a(d,m,y,g){let b=f(d,y,g),w=l([b]);return w.slice(0,w.indexOf(`
108
- `))}function u(d,m,y,g){let b=y.enter("tableCell"),w=y.enter("phrasing"),C=y.containerPhrasing(d,{...g,before:o,after:o});return w(),b(),C}function l(d,m){return ex(d,{align:m,alignDelimiters:n,padding:r,stringLength:i})}function c(d,m,y){let g=d.children,b=-1,w=[],C=m.enter("table");for(;++b<g.length;)w[b]=f(g[b],m,y);return C(),w}function f(d,m,y){let g=d.children,b=-1,w=[],C=m.enter("tableRow");for(;++b<g.length;)w[b]=u(g[b],d,m,y);return C(),w}function p(d,m,y){let g=vi.inlineCode(d,m,y);return y.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}function Xf(){return{exit:{taskListCheckValueChecked:rx,taskListCheckValueUnchecked:rx,paragraph:I0}}}function Jf(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:O0}}}function rx(t){let e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function I0(t){let e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){let r=this.stack[this.stack.length-1];r.type;let n=r.children[0];if(n&&n.type==="text"){let i=e.children,o=-1,s;for(;++o<i.length;){let a=i[o];if(a.type==="paragraph"){s=a;break}}s===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(t)}function O0(t,e,r,n){let i=t.children[0],o=typeof t.checked=="boolean"&&i&&i.type==="paragraph",s="["+(t.checked?"x":" ")+"] ",a=r.createTracker(n);o&&a.move(s);let u=vi.listItem(t,e,r,{...n,...a.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(c){return c+s}}function Qf(){return[$f(),Vf(),Wf(),Yf(),Xf()]}function ep(t){return{extensions:[qf(),Gf(t),Hf(),Zf(t),Jf()]}}var D0={tokenize:L0,partial:!0},nx={tokenize:M0,partial:!0},ix={tokenize:B0,partial:!0},ox={tokenize:j0,partial:!0},R0={tokenize:U0,partial:!0},sx={name:"wwwAutolink",tokenize:N0,previous:ux},ax={name:"protocolAutolink",tokenize:P0,previous:lx},nn={name:"emailAutolink",tokenize:F0,previous:cx},Nr={};function rp(){return{text:Nr}}var Oi=48;for(;Oi<123;)Nr[Oi]=nn,Oi++,Oi===58?Oi=65:Oi===91&&(Oi=97);Nr[43]=nn;Nr[45]=nn;Nr[46]=nn;Nr[95]=nn;Nr[72]=[nn,ax];Nr[104]=[nn,ax];Nr[87]=[nn,sx];Nr[119]=[nn,sx];function F0(t,e,r){let n=this,i,o;return s;function s(f){return!tp(f)||!cx.call(n,n.previous)||np(n.events)?r(f):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),a(f))}function a(f){return tp(f)?(t.consume(f),a):f===64?(t.consume(f),u):r(f)}function u(f){return f===46?t.check(R0,c,l)(f):f===45||f===95||yt(f)?(o=!0,t.consume(f),u):c(f)}function l(f){return t.consume(f),i=!0,u}function c(f){return o&&i&&xt(n.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(f)):r(f)}}function N0(t,e,r){let n=this;return i;function i(s){return s!==87&&s!==119||!ux.call(n,n.previous)||np(n.events)?r(s):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(D0,t.attempt(nx,t.attempt(ix,o),r),r)(s))}function o(s){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(s)}}function P0(t,e,r){let n=this,i="",o=!1;return s;function s(f){return(f===72||f===104)&&lx.call(n,n.previous)&&!np(n.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),t.consume(f),a):r(f)}function a(f){if(xt(f)&&i.length<5)return i+=String.fromCodePoint(f),t.consume(f),a;if(f===58){let p=i.toLowerCase();if(p==="http"||p==="https")return t.consume(f),u}return r(f)}function u(f){return f===47?(t.consume(f),o?l:(o=!0,u)):r(f)}function l(f){return f===null||Ci(f)||ke(f)||Dr(f)||wi(f)?r(f):t.attempt(nx,t.attempt(ix,c),r)(f)}function c(f){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(f)}}function L0(t,e,r){let n=0;return i;function i(s){return(s===87||s===119)&&n<3?(n++,t.consume(s),i):s===46&&n===3?(t.consume(s),o):r(s)}function o(s){return s===null?r(s):e(s)}}function M0(t,e,r){let n,i,o;return s;function s(l){return l===46||l===95?t.check(ox,u,a)(l):l===null||ke(l)||Dr(l)||l!==45&&wi(l)?u(l):(o=!0,t.consume(l),s)}function a(l){return l===95?n=!0:(i=n,n=void 0),t.consume(l),s}function u(l){return i||n||!o?r(l):e(l)}}function B0(t,e){let r=0,n=0;return i;function i(s){return s===40?(r++,t.consume(s),i):s===41&&n<r?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?t.check(ox,e,o)(s):s===null||ke(s)||Dr(s)?e(s):(t.consume(s),i)}function o(s){return s===41&&n++,t.consume(s),i}}function j0(t,e,r){return n;function n(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(t.consume(a),n):a===38?(t.consume(a),o):a===93?(t.consume(a),i):a===60||a===null||ke(a)||Dr(a)?e(a):r(a)}function i(a){return a===null||a===40||a===91||ke(a)||Dr(a)?e(a):n(a)}function o(a){return xt(a)?s(a):r(a)}function s(a){return a===59?(t.consume(a),n):xt(a)?(t.consume(a),s):r(a)}}function U0(t,e,r){return n;function n(o){return t.consume(o),i}function i(o){return yt(o)?r(o):e(o)}}function ux(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||ke(t)}function lx(t){return!xt(t)}function cx(t){return!(t===47||tp(t))}function tp(t){return t===43||t===45||t===46||t===95||yt(t)}function np(t){let e=t.length,r=!1;for(;e--;){let n=t[e][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return t.length>0&&!r&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}var z0={tokenize:K0,partial:!0};function ip(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:G0,continuation:{tokenize:W0},exit:H0}},text:{91:{name:"gfmFootnoteCall",tokenize:V0},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:$0,resolveTo:q0}}}}function $0(t,e,r){let n=this,i=n.events.length,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),s;for(;i--;){let u=n.events[i][1];if(u.type==="labelImage"){s=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return a;function a(u){if(!s||!s._balanced)return r(u);let l=It(n.sliceSerialize({start:s.end,end:n.now()}));return l.codePointAt(0)!==94||!o.includes(l.slice(1))?r(u):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(u),t.exit("gfmFootnoteCallLabelMarker"),e(u))}}function q0(t,e){let r=t.length,n;for(;r--;)if(t[r][1].type==="labelImage"&&t[r][0]==="enter"){n=t[r][1];break}t[r+1][1].type="data",t[r+3][1].type="gfmFootnoteCallLabelMarker";let i={type:"gfmFootnoteCall",start:Object.assign({},t[r+3][1].start),end:Object.assign({},t[t.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},t[r+3][1].end),end:Object.assign({},t[r+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},t[t.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},u=[t[r+1],t[r+2],["enter",i,e],t[r+3],t[r+4],["enter",o,e],["exit",o,e],["enter",s,e],["enter",a,e],["exit",a,e],["exit",s,e],t[t.length-2],t[t.length-1],["exit",i,e]];return t.splice(r,t.length-r+1,...u),t}function V0(t,e,r){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o=0,s;return a;function a(f){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(f),t.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?r(f):(t.enter("gfmFootnoteCallMarker"),t.consume(f),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",l)}function l(f){if(o>999||f===93&&!s||f===null||f===91||ke(f))return r(f);if(f===93){t.exit("chunkString");let p=t.exit("gfmFootnoteCallString");return i.includes(It(n.sliceSerialize(p)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(f),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):r(f)}return ke(f)||(s=!0),o++,t.consume(f),f===92?c:l}function c(f){return f===91||f===92||f===93?(t.consume(f),o++,l):l(f)}}function G0(t,e,r){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o,s=0,a;return u;function u(m){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(m){return m===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",c):r(m)}function c(m){if(s>999||m===93&&!a||m===null||m===91||ke(m))return r(m);if(m===93){t.exit("chunkString");let y=t.exit("gfmFootnoteDefinitionLabelString");return o=It(n.sliceSerialize(y)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),p}return ke(m)||(a=!0),s++,t.consume(m),m===92?f:c}function f(m){return m===91||m===92||m===93?(t.consume(m),s++,c):c(m)}function p(m){return m===58?(t.enter("definitionMarker"),t.consume(m),t.exit("definitionMarker"),i.includes(o)||i.push(o),ie(t,d,"gfmFootnoteDefinitionWhitespace")):r(m)}function d(m){return e(m)}}function W0(t,e,r){return t.check(Rr,e,t.attempt(z0,e,r))}function H0(t){t.exit("gfmFootnoteDefinition")}function K0(t,e,r){let n=this;return ie(t,i,"gfmFootnoteDefinitionIndent",5);function i(o){let s=n.events[n.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?e(o):r(o)}}function op(t){let r=(t||{}).singleTilde,n={name:"strikethrough",tokenize:o,resolveAll:i};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(s,a){let u=-1;for(;++u<s.length;)if(s[u][0]==="enter"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._close){let l=u;for(;l--;)if(s[l][0]==="exit"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._open&&s[u][1].end.offset-s[u][1].start.offset===s[l][1].end.offset-s[l][1].start.offset){s[u][1].type="strikethroughSequence",s[l][1].type="strikethroughSequence";let c={type:"strikethrough",start:Object.assign({},s[l][1].start),end:Object.assign({},s[u][1].end)},f={type:"strikethroughText",start:Object.assign({},s[l][1].end),end:Object.assign({},s[u][1].start)},p=[["enter",c,a],["enter",s[l][1],a],["exit",s[l][1],a],["enter",f,a]],d=a.parser.constructs.insideSpan.null;d&&st(p,p.length,0,wn(d,s.slice(l+1,u),a)),st(p,p.length,0,[["exit",f,a],["enter",s[u][1],a],["exit",s[u][1],a],["exit",c,a]]),st(s,l-1,u-l+3,p),u=l+p.length-2;break}}for(u=-1;++u<s.length;)s[u][1].type==="strikethroughSequenceTemporary"&&(s[u][1].type="data");return s}function o(s,a,u){let l=this.previous,c=this.events,f=0;return p;function p(m){return l===126&&c[c.length-1][1].type!=="characterEscape"?u(m):(s.enter("strikethroughSequenceTemporary"),d(m))}function d(m){let y=rn(l);if(m===126)return f>1?u(m):(s.consume(m),f++,d);if(f<2&&!r)return u(m);let g=s.exit("strikethroughSequenceTemporary"),b=rn(m);return g._open=!b||b===2&&!!y,g._close=!y||y===2&&!!b,a(m)}}}var fu=class{constructor(){this.map=[]}add(e,r,n){Y0(this,e,r,n)}consume(e){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let r=this.map.length,n=[];for(;r>0;)r-=1,n.push(e.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),e.length=this.map[r][0];n.push(e.slice()),e.length=0;let i=n.pop();for(;i;){for(let o of i)e.push(o);i=n.pop()}this.map.length=0}};function Y0(t,e,r,n){let i=0;if(!(r===0&&n.length===0)){for(;i<t.map.length;){if(t.map[i][0]===e){t.map[i][1]+=r,t.map[i][2].push(...n);return}i+=1}t.map.push([e,r,n])}}function fx(t,e){let r=!1,n=[];for(;e<t.length;){let i=t[e];if(r){if(i[0]==="enter")i[1].type==="tableContent"&&n.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){let o=n.length-1;n[o]=n[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(r=!0);e+=1}return n}function sp(){return{flow:{null:{name:"table",tokenize:Z0,resolveAll:X0}}}}function Z0(t,e,r){let n=this,i=0,o=0,s;return a;function a(_){let L=n.events.length-1;for(;L>-1;){let P=n.events[L][1].type;if(P==="lineEnding"||P==="linePrefix")L--;else break}let F=L>-1?n.events[L][1].type:null,v=F==="tableHead"||F==="tableRow"?S:u;return v===S&&n.parser.lazy[n.now().line]?r(_):v(_)}function u(_){return t.enter("tableHead"),t.enter("tableRow"),l(_)}function l(_){return _===124||(s=!0,o+=1),c(_)}function c(_){return _===null?r(_):z(_)?o>1?(o=0,n.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(_),t.exit("lineEnding"),d):r(_):se(_)?ie(t,c,"whitespace")(_):(o+=1,s&&(s=!1,i+=1),_===124?(t.enter("tableCellDivider"),t.consume(_),t.exit("tableCellDivider"),s=!0,c):(t.enter("data"),f(_)))}function f(_){return _===null||_===124||ke(_)?(t.exit("data"),c(_)):(t.consume(_),_===92?p:f)}function p(_){return _===92||_===124?(t.consume(_),f):f(_)}function d(_){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(_):(t.enter("tableDelimiterRow"),s=!1,se(_)?ie(t,m,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):m(_))}function m(_){return _===45||_===58?g(_):_===124?(s=!0,t.enter("tableCellDivider"),t.consume(_),t.exit("tableCellDivider"),y):R(_)}function y(_){return se(_)?ie(t,g,"whitespace")(_):g(_)}function g(_){return _===58?(o+=1,s=!0,t.enter("tableDelimiterMarker"),t.consume(_),t.exit("tableDelimiterMarker"),b):_===45?(o+=1,b(_)):_===null||z(_)?D(_):R(_)}function b(_){return _===45?(t.enter("tableDelimiterFiller"),w(_)):R(_)}function w(_){return _===45?(t.consume(_),w):_===58?(s=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(_),t.exit("tableDelimiterMarker"),C):(t.exit("tableDelimiterFiller"),C(_))}function C(_){return se(_)?ie(t,D,"whitespace")(_):D(_)}function D(_){return _===124?m(_):_===null||z(_)?!s||i!==o?R(_):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(_)):R(_)}function R(_){return r(_)}function S(_){return t.enter("tableRow"),de(_)}function de(_){return _===124?(t.enter("tableCellDivider"),t.consume(_),t.exit("tableCellDivider"),de):_===null||z(_)?(t.exit("tableRow"),e(_)):se(_)?ie(t,de,"whitespace")(_):(t.enter("data"),ye(_))}function ye(_){return _===null||_===124||ke(_)?(t.exit("data"),de(_)):(t.consume(_),_===92?be:ye)}function be(_){return _===92||_===124?(t.consume(_),ye):ye(_)}}function X0(t,e){let r=-1,n=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],a=!1,u=0,l,c,f,p=new fu;for(;++r<t.length;){let d=t[r],m=d[1];d[0]==="enter"?m.type==="tableHead"?(a=!1,u!==0&&(px(p,e,u,l,c),c=void 0,u=0),l={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(r,0,[["enter",l,e]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(n=!0,f=void 0,o=[0,0,0,0],s=[0,r+1,0,0],a&&(a=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(r,0,[["enter",c,e]])),i=m.type==="tableDelimiterRow"?2:c?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(n=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],f=pu(p,e,o,i,void 0,f),o=[0,0,0,0]),s[2]=r)):m.type==="tableCellDivider"&&(n?n=!1:(o[1]!==0&&(s[0]=s[1],f=pu(p,e,o,i,void 0,f)),o=s,s=[o[1],r,0,0])):m.type==="tableHead"?(a=!0,u=r):m.type==="tableRow"||m.type==="tableDelimiterRow"?(u=r,o[1]!==0?(s[0]=s[1],f=pu(p,e,o,i,r,f)):s[1]!==0&&(f=pu(p,e,s,i,r,f)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(s[3]=r)}for(u!==0&&px(p,e,u,l,c),p.consume(e.events),r=-1;++r<e.events.length;){let d=e.events[r];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=fx(e.events,r))}return t}function pu(t,e,r,n,i,o){let s=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",a="tableContent";r[0]!==0&&(o.end=Object.assign({},go(e.events,r[0])),t.add(r[0],0,[["exit",o,e]]));let u=go(e.events,r[1]);if(o={type:s,start:Object.assign({},u),end:Object.assign({},u)},t.add(r[1],0,[["enter",o,e]]),r[2]!==0){let l=go(e.events,r[2]),c=go(e.events,r[3]),f={type:a,start:Object.assign({},l),end:Object.assign({},c)};if(t.add(r[2],0,[["enter",f,e]]),n!==2){let p=e.events[r[2]],d=e.events[r[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[1].contentType="text",r[3]>r[2]+1){let m=r[2]+1,y=r[3]-r[2]-1;t.add(m,y,[])}}t.add(r[3]+1,0,[["exit",f,e]])}return i!==void 0&&(o.end=Object.assign({},go(e.events,i)),t.add(i,0,[["exit",o,e]]),o=void 0),o}function px(t,e,r,n,i){let o=[],s=go(e.events,r);i&&(i.end=Object.assign({},s),o.push(["exit",i,e])),n.end=Object.assign({},s),o.push(["exit",n,e]),t.add(r+1,0,o)}function go(t,e){let r=t[e],n=r[0]==="enter"?"start":"end";return r[1][n]}var J0={name:"tasklistCheck",tokenize:Q0};function ap(){return{text:{91:J0}}}function Q0(t,e,r){let n=this;return i;function i(u){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(u):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(u),t.exit("taskListCheckMarker"),o)}function o(u){return ke(u)?(t.enter("taskListCheckValueUnchecked"),t.consume(u),t.exit("taskListCheckValueUnchecked"),s):u===88||u===120?(t.enter("taskListCheckValueChecked"),t.consume(u),t.exit("taskListCheckValueChecked"),s):r(u)}function s(u){return u===93?(t.enter("taskListCheckMarker"),t.consume(u),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),a):r(u)}function a(u){return z(u)?e(u):se(u)?t.check({tokenize:ev},e,r)(u):r(u)}}function ev(t,e,r){return ie(t,n,"whitespace");function n(i){return i===null?r(i):e(i)}}function dx(t){return za([rp(),ip(),op(t),sp(),ap()])}var tv={};function Tn(t){let e=this,r=t||tv,n=e.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),s=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(dx(r)),o.push(Qf()),s.push(ep(r))}import{mdatCheck as rv,mdatClean as hx,mdatExpand as nv,mdatSplit as mx}from"remark-mdat";import{VFile as B5}from"vfile";async function _n(t,e,r,n,i,o,s){let a=await e({additionalConfig:o,additionalRules:s});o=a;let u=await Tm(),l=ja(t),c=km(l,i,n,"md"),f=[],p=r(a,u);for(let{input:d,name:m,output:y}of c){let g=await ac(d),b=await p.process(g);b.dirname=y,b.basename=m,f.push(b)}return f}function du(t,e){return mo().use({settings:{bullet:"-",emphasis:"_"}}).use(Tn).use(e).use(()=>async function(n,i){mx(n,i),hx(n,i,t),await nv(n,i,t)})}function hu(t,e){return mo().use({settings:{bullet:"-",emphasis:"_"}}).use(Tn).use(e).use(()=>function(n,i){mx(n,i),hx(n,i,t)})}function mu(t,e){return mo().use({settings:{bullet:"-",emphasis:"_"}}).use(Tn).use(e).use(()=>async function(n,i){await rv(n,i,{...t,paranoid:!1})})}async function gx(t,e,r,n,i){return _n(t,Ai,du,e,r,n,i)}async function xx(t,e,r,n,i){return _n(t,Ai,mu,e,r,n,i)}async function yx(t,e,r,n,i){return _n(t,Ai,hu,e,r,n,i)}var gu={badges:{async content(t){let e=X.object({custom:X.record(X.object({image:X.string(),link:X.string()})).optional(),npm:X.array(X.string()).optional()}).optional().parse(t),r=await rr(),{name:n}=r,i=[];if(!r.private&&r.publishConfig?.access==="public"&&i.push(`[![NPM Package ${n}](https://img.shields.io/npm/v/${n}.svg)](https://npmjs.com/package/${n})`),e?.npm!==void 0)for(let s of e.npm)i.push(`[![NPM Package ${s}](https://img.shields.io/npm/v/${s}.svg)](https://npmjs.com/package/${s})`);let{license:o}=r;if(o!==void 0&&i.push(`[![License: ${o}](https://img.shields.io/badge/License-${o}-yellow.svg)](https://opensource.org/licenses/${o})`),e?.custom!==void 0)for(let[s,{image:a,link:u}]of Object.entries(e.custom))i.push(`[![${s}](${a})](${u})`);return i.join(`
109
- `)},order:3}};import{globby as ov}from"globby";import xu from"node:path";import{readPackage as sv}from"read-pkg";var yu={banner:{async content(t){let e=X.object({alt:X.string().optional(),src:X.string().optional()}).optional().parse(t),{assetsPath:r,packageFile:n}=await Or();if(n===void 0)throw new Error("No package.json found");let i=e?.src??await bx(r)??await bx();if(i===void 0)throw new Error("Banner image not found at any typical location, consider adding something at ./assets/banner.webp");if(!Ex(i)&&!await uo(i))throw new Error(`Banner image not found at "${i}"`);let o=e?.alt??`${(await sv({cwd:xu.dirname(n)})).name} banner`;if(o===void 0||o==="undefined banner")throw new Error("Banner image alt text not available");return`![${o}](${i})`},order:2}};async function bx(t){let{packageFile:e}=await Or();if(e===void 0)throw new Error("No package.json found");let r=xu.dirname(e),n=t===void 0?[".","assets","media","readme-assets","readme-media","readme","images",".github/assets"]:[t],i=["banner","cover","demo","header","hero","image","logo","overview","readme","screenshot","screenshots","splash"],o=["png","gif","jpg","jpeg","svg","webp"],s=await ov(n.map(a=>xu.join(r,a)),{deep:1,expandDirectories:{extensions:o,files:i}});if(s.length>0)return xu.relative(process.cwd(),s[0])}function Ex(t,e=!0){if(typeof t!="string")throw new TypeError("Expected a string");if(t=t.trim(),t.includes(" "))return!1;try{return new URL(t),!0}catch{return e?Ex(`https://${t}`,!1):!1}}import{getSoleRule as gL}from"remark-mdat";import{execaCommand as tL}from"execa";import{log as jA}from"remark-mdat";function Ax(t,e=Number.MAX_SAFE_INTEGER){let r=[],n=av(t,e);return r.push(uv(n)),r.push(lv(t,n)),n.hasMultipleSubcommands&&n.canRecurse&&r.push(cv(n.fullCommandName)),n.defaultCommand?.commandName!==void 0&&r.push(fv(n)),r.push(pv(t,n)),t.positionals&&!n.commandsOnly&&r.push(up(["Positional Argument","Description","Type","Default"],t.positionals.map(i=>[i.arguments?[i.arguments.map(o=>`\`${o}\``)].join(" "):"",`${i.description??""}${i.required===void 0?"":i.required?" _(Required.)_":" _(Optional.)_"}`,i.type?`\`${i.type}\``:"",i.defaultValue?i.defaultValue.includes(" ")?i.defaultValue:`\`${i.defaultValue}\``:""]))),t.commands&&r.push(up(["Command","Argument","Description"],t.commands.map(i=>[`\`${i.commandName??(i.default?"[default]":"")}\``,i.arguments?i.arguments.map(o=>`\`${o}\``).join(" "):"",`${i.description??""}${i.default?" _(Default command.)_":""}`]))),t.options&&!n.commandsOnly&&r.push(up(["Option","Argument","Description","Type","Default"],t.options.map(i=>[i.flags!==void 0||i.aliases!==void 0?[...i.flags??[],...i.aliases??[]].map(o=>`\`${o}\``).join("<br>"):"",i.arguments?i.arguments.map(o=>`\`${o}\``).join(" "):"",i.description??"",i.choices?i.choices.map(o=>`\`${o}\``).join(" "):i.type?`\`${i.type}\``:"",i.defaultValue?i.defaultValue.includes(" ")&&i.choices===void 0?i.defaultValue:`\`${i.defaultValue}\``:""]))),n.canRecurse&&n.hasMultipleSubcommands&&r.push("_See the sections below for more information on each subcommand._"),r.join(`
104
+ `))}function u(d,m,y,g){let b=y.enter("tableCell"),w=y.enter("phrasing"),k=y.containerPhrasing(d,{...g,before:o,after:o});return w(),b(),k}function l(d,m){return Fg(d,{align:m,alignDelimiters:n,padding:r,stringLength:i})}function c(d,m,y){let g=d.children,b=-1,w=[],k=m.enter("table");for(;++b<g.length;)w[b]=f(g[b],m,y);return k(),w}function f(d,m,y){let g=d.children,b=-1,w=[],k=m.enter("tableRow");for(;++b<g.length;)w[b]=u(g[b],d,m,y);return k(),w}function p(d,m,y){let g=_i.inlineCode(d,m,y);return y.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}function zf(){return{exit:{taskListCheckValueChecked:Pg,taskListCheckValueUnchecked:Pg,paragraph:JS}}}function $f(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:QS}}}function Pg(t){let e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function JS(t){let e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){let r=this.stack[this.stack.length-1];r.type;let n=r.children[0];if(n&&n.type==="text"){let i=e.children,o=-1,s;for(;++o<i.length;){let a=i[o];if(a.type==="paragraph"){s=a;break}}s===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(t)}function QS(t,e,r,n){let i=t.children[0],o=typeof t.checked=="boolean"&&i&&i.type==="paragraph",s="["+(t.checked?"x":" ")+"] ",a=r.createTracker(n);o&&a.move(s);let u=_i.listItem(t,e,r,{...n,...a.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(c){return c+s}}function qf(){return[Rf(),Nf(),Lf(),jf(),zf()]}function Vf(t){return{extensions:[Ff(),Pf(t),Mf(),Uf(t),$f()]}}var eI={tokenize:oI,partial:!0},Lg={tokenize:sI,partial:!0},Mg={tokenize:aI,partial:!0},Bg={tokenize:uI,partial:!0},tI={tokenize:lI,partial:!0},jg={name:"wwwAutolink",tokenize:nI,previous:zg},Ug={name:"protocolAutolink",tokenize:iI,previous:$g},en={name:"emailAutolink",tokenize:rI,previous:qg},vr={};function Wf(){return{text:vr}}var Ii=48;for(;Ii<123;)vr[Ii]=en,Ii++,Ii===58?Ii=65:Ii===91&&(Ii=97);vr[43]=en;vr[45]=en;vr[46]=en;vr[95]=en;vr[72]=[en,Ug];vr[104]=[en,Ug];vr[87]=[en,jg];vr[119]=[en,jg];function rI(t,e,r){let n=this,i,o;return s;function s(f){return!Gf(f)||!qg.call(n,n.previous)||Hf(n.events)?r(f):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),a(f))}function a(f){return Gf(f)?(t.consume(f),a):f===64?(t.consume(f),u):r(f)}function u(f){return f===46?t.check(tI,c,l)(f):f===45||f===95||gt(f)?(o=!0,t.consume(f),u):c(f)}function l(f){return t.consume(f),i=!0,u}function c(f){return o&&i&&mt(n.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(f)):r(f)}}function nI(t,e,r){let n=this;return i;function i(s){return s!==87&&s!==119||!zg.call(n,n.previous)||Hf(n.events)?r(s):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(eI,t.attempt(Lg,t.attempt(Mg,o),r),r)(s))}function o(s){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(s)}}function iI(t,e,r){let n=this,i="",o=!1;return s;function s(f){return(f===72||f===104)&&$g.call(n,n.previous)&&!Hf(n.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),t.consume(f),a):r(f)}function a(f){if(mt(f)&&i.length<5)return i+=String.fromCodePoint(f),t.consume(f),a;if(f===58){let p=i.toLowerCase();if(p==="http"||p==="https")return t.consume(f),u}return r(f)}function u(f){return f===47?(t.consume(f),o?l:(o=!0,u)):r(f)}function l(f){return f===null||Ei(f)||Ce(f)||Sr(f)||Ai(f)?r(f):t.attempt(Lg,t.attempt(Mg,c),r)(f)}function c(f){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(f)}}function oI(t,e,r){let n=0;return i;function i(s){return(s===87||s===119)&&n<3?(n++,t.consume(s),i):s===46&&n===3?(t.consume(s),o):r(s)}function o(s){return s===null?r(s):e(s)}}function sI(t,e,r){let n,i,o;return s;function s(l){return l===46||l===95?t.check(Bg,u,a)(l):l===null||Ce(l)||Sr(l)||l!==45&&Ai(l)?u(l):(o=!0,t.consume(l),s)}function a(l){return l===95?n=!0:(i=n,n=void 0),t.consume(l),s}function u(l){return i||n||!o?r(l):e(l)}}function aI(t,e){let r=0,n=0;return i;function i(s){return s===40?(r++,t.consume(s),i):s===41&&n<r?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?t.check(Bg,e,o)(s):s===null||Ce(s)||Sr(s)?e(s):(t.consume(s),i)}function o(s){return s===41&&n++,t.consume(s),i}}function uI(t,e,r){return n;function n(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(t.consume(a),n):a===38?(t.consume(a),o):a===93?(t.consume(a),i):a===60||a===null||Ce(a)||Sr(a)?e(a):r(a)}function i(a){return a===null||a===40||a===91||Ce(a)||Sr(a)?e(a):n(a)}function o(a){return mt(a)?s(a):r(a)}function s(a){return a===59?(t.consume(a),n):mt(a)?(t.consume(a),s):r(a)}}function lI(t,e,r){return n;function n(o){return t.consume(o),i}function i(o){return gt(o)?r(o):e(o)}}function zg(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||Ce(t)}function $g(t){return!mt(t)}function qg(t){return!(t===47||Gf(t))}function Gf(t){return t===43||t===45||t===46||t===95||gt(t)}function Hf(t){let e=t.length,r=!1;for(;e--;){let n=t[e][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return t.length>0&&!r&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}var cI={tokenize:xI,partial:!0};function Kf(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:hI,continuation:{tokenize:mI},exit:gI}},text:{91:{name:"gfmFootnoteCall",tokenize:dI},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:fI,resolveTo:pI}}}}function fI(t,e,r){let n=this,i=n.events.length,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),s;for(;i--;){let u=n.events[i][1];if(u.type==="labelImage"){s=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return a;function a(u){if(!s||!s._balanced)return r(u);let l=St(n.sliceSerialize({start:s.end,end:n.now()}));return l.codePointAt(0)!==94||!o.includes(l.slice(1))?r(u):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(u),t.exit("gfmFootnoteCallLabelMarker"),e(u))}}function pI(t,e){let r=t.length,n;for(;r--;)if(t[r][1].type==="labelImage"&&t[r][0]==="enter"){n=t[r][1];break}t[r+1][1].type="data",t[r+3][1].type="gfmFootnoteCallLabelMarker";let i={type:"gfmFootnoteCall",start:Object.assign({},t[r+3][1].start),end:Object.assign({},t[t.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},t[r+3][1].end),end:Object.assign({},t[r+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},t[t.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},u=[t[r+1],t[r+2],["enter",i,e],t[r+3],t[r+4],["enter",o,e],["exit",o,e],["enter",s,e],["enter",a,e],["exit",a,e],["exit",s,e],t[t.length-2],t[t.length-1],["exit",i,e]];return t.splice(r,t.length-r+1,...u),t}function dI(t,e,r){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o=0,s;return a;function a(f){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(f),t.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?r(f):(t.enter("gfmFootnoteCallMarker"),t.consume(f),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",l)}function l(f){if(o>999||f===93&&!s||f===null||f===91||Ce(f))return r(f);if(f===93){t.exit("chunkString");let p=t.exit("gfmFootnoteCallString");return i.includes(St(n.sliceSerialize(p)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(f),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):r(f)}return Ce(f)||(s=!0),o++,t.consume(f),f===92?c:l}function c(f){return f===91||f===92||f===93?(t.consume(f),o++,l):l(f)}}function hI(t,e,r){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o,s=0,a;return u;function u(m){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(m){return m===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",c):r(m)}function c(m){if(s>999||m===93&&!a||m===null||m===91||Ce(m))return r(m);if(m===93){t.exit("chunkString");let y=t.exit("gfmFootnoteDefinitionLabelString");return o=St(n.sliceSerialize(y)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),p}return Ce(m)||(a=!0),s++,t.consume(m),m===92?f:c}function f(m){return m===91||m===92||m===93?(t.consume(m),s++,c):c(m)}function p(m){return m===58?(t.enter("definitionMarker"),t.consume(m),t.exit("definitionMarker"),i.includes(o)||i.push(o),ie(t,d,"gfmFootnoteDefinitionWhitespace")):r(m)}function d(m){return e(m)}}function mI(t,e,r){return t.check(Ir,e,t.attempt(cI,e,r))}function gI(t){t.exit("gfmFootnoteDefinition")}function xI(t,e,r){let n=this;return ie(t,i,"gfmFootnoteDefinitionIndent",5);function i(o){let s=n.events[n.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?e(o):r(o)}}function Yf(t){let r=(t||{}).singleTilde,n={name:"strikethrough",tokenize:o,resolveAll:i};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(s,a){let u=-1;for(;++u<s.length;)if(s[u][0]==="enter"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._close){let l=u;for(;l--;)if(s[l][0]==="exit"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._open&&s[u][1].end.offset-s[u][1].start.offset===s[l][1].end.offset-s[l][1].start.offset){s[u][1].type="strikethroughSequence",s[l][1].type="strikethroughSequence";let c={type:"strikethrough",start:Object.assign({},s[l][1].start),end:Object.assign({},s[u][1].end)},f={type:"strikethroughText",start:Object.assign({},s[l][1].end),end:Object.assign({},s[u][1].start)},p=[["enter",c,a],["enter",s[l][1],a],["exit",s[l][1],a],["enter",f,a]],d=a.parser.constructs.insideSpan.null;d&&it(p,p.length,0,An(d,s.slice(l+1,u),a)),it(p,p.length,0,[["exit",f,a],["enter",s[u][1],a],["exit",s[u][1],a],["exit",c,a]]),it(s,l-1,u-l+3,p),u=l+p.length-2;break}}for(u=-1;++u<s.length;)s[u][1].type==="strikethroughSequenceTemporary"&&(s[u][1].type="data");return s}function o(s,a,u){let l=this.previous,c=this.events,f=0;return p;function p(m){return l===126&&c[c.length-1][1].type!=="characterEscape"?u(m):(s.enter("strikethroughSequenceTemporary"),d(m))}function d(m){let y=Qr(l);if(m===126)return f>1?u(m):(s.consume(m),f++,d);if(f<2&&!r)return u(m);let g=s.exit("strikethroughSequenceTemporary"),b=Qr(m);return g._open=!b||b===2&&!!y,g._close=!y||y===2&&!!b,a(m)}}}var au=class{constructor(){this.map=[]}add(e,r,n){yI(this,e,r,n)}consume(e){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let r=this.map.length,n=[];for(;r>0;)r-=1,n.push(e.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),e.length=this.map[r][0];n.push(e.slice()),e.length=0;let i=n.pop();for(;i;){for(let o of i)e.push(o);i=n.pop()}this.map.length=0}};function yI(t,e,r,n){let i=0;if(!(r===0&&n.length===0)){for(;i<t.map.length;){if(t.map[i][0]===e){t.map[i][1]+=r,t.map[i][2].push(...n);return}i+=1}t.map.push([e,r,n])}}function Vg(t,e){let r=!1,n=[];for(;e<t.length;){let i=t[e];if(r){if(i[0]==="enter")i[1].type==="tableContent"&&n.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){let o=n.length-1;n[o]=n[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(r=!0);e+=1}return n}function Zf(){return{flow:{null:{name:"table",tokenize:bI,resolveAll:EI}}}}function bI(t,e,r){let n=this,i=0,o=0,s;return a;function a(_){let L=n.events.length-1;for(;L>-1;){let P=n.events[L][1].type;if(P==="lineEnding"||P==="linePrefix")L--;else break}let F=L>-1?n.events[L][1].type:null,I=F==="tableHead"||F==="tableRow"?S:u;return I===S&&n.parser.lazy[n.now().line]?r(_):I(_)}function u(_){return t.enter("tableHead"),t.enter("tableRow"),l(_)}function l(_){return _===124||(s=!0,o+=1),c(_)}function c(_){return _===null?r(_):z(_)?o>1?(o=0,n.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(_),t.exit("lineEnding"),d):r(_):se(_)?ie(t,c,"whitespace")(_):(o+=1,s&&(s=!1,i+=1),_===124?(t.enter("tableCellDivider"),t.consume(_),t.exit("tableCellDivider"),s=!0,c):(t.enter("data"),f(_)))}function f(_){return _===null||_===124||Ce(_)?(t.exit("data"),c(_)):(t.consume(_),_===92?p:f)}function p(_){return _===92||_===124?(t.consume(_),f):f(_)}function d(_){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(_):(t.enter("tableDelimiterRow"),s=!1,se(_)?ie(t,m,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):m(_))}function m(_){return _===45||_===58?g(_):_===124?(s=!0,t.enter("tableCellDivider"),t.consume(_),t.exit("tableCellDivider"),y):R(_)}function y(_){return se(_)?ie(t,g,"whitespace")(_):g(_)}function g(_){return _===58?(o+=1,s=!0,t.enter("tableDelimiterMarker"),t.consume(_),t.exit("tableDelimiterMarker"),b):_===45?(o+=1,b(_)):_===null||z(_)?D(_):R(_)}function b(_){return _===45?(t.enter("tableDelimiterFiller"),w(_)):R(_)}function w(_){return _===45?(t.consume(_),w):_===58?(s=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(_),t.exit("tableDelimiterMarker"),k):(t.exit("tableDelimiterFiller"),k(_))}function k(_){return se(_)?ie(t,D,"whitespace")(_):D(_)}function D(_){return _===124?m(_):_===null||z(_)?!s||i!==o?R(_):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(_)):R(_)}function R(_){return r(_)}function S(_){return t.enter("tableRow"),de(_)}function de(_){return _===124?(t.enter("tableCellDivider"),t.consume(_),t.exit("tableCellDivider"),de):_===null||z(_)?(t.exit("tableRow"),e(_)):se(_)?ie(t,de,"whitespace")(_):(t.enter("data"),ye(_))}function ye(_){return _===null||_===124||Ce(_)?(t.exit("data"),de(_)):(t.consume(_),_===92?be:ye)}function be(_){return _===92||_===124?(t.consume(_),ye):ye(_)}}function EI(t,e){let r=-1,n=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],a=!1,u=0,l,c,f,p=new au;for(;++r<t.length;){let d=t[r],m=d[1];d[0]==="enter"?m.type==="tableHead"?(a=!1,u!==0&&(Gg(p,e,u,l,c),c=void 0,u=0),l={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(r,0,[["enter",l,e]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(n=!0,f=void 0,o=[0,0,0,0],s=[0,r+1,0,0],a&&(a=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(r,0,[["enter",c,e]])),i=m.type==="tableDelimiterRow"?2:c?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(n=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],f=uu(p,e,o,i,void 0,f),o=[0,0,0,0]),s[2]=r)):m.type==="tableCellDivider"&&(n?n=!1:(o[1]!==0&&(s[0]=s[1],f=uu(p,e,o,i,void 0,f)),o=s,s=[o[1],r,0,0])):m.type==="tableHead"?(a=!0,u=r):m.type==="tableRow"||m.type==="tableDelimiterRow"?(u=r,o[1]!==0?(s[0]=s[1],f=uu(p,e,o,i,r,f)):s[1]!==0&&(f=uu(p,e,s,i,r,f)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(s[3]=r)}for(u!==0&&Gg(p,e,u,l,c),p.consume(e.events),r=-1;++r<e.events.length;){let d=e.events[r];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=Vg(e.events,r))}return t}function uu(t,e,r,n,i,o){let s=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",a="tableContent";r[0]!==0&&(o.end=Object.assign({},fo(e.events,r[0])),t.add(r[0],0,[["exit",o,e]]));let u=fo(e.events,r[1]);if(o={type:s,start:Object.assign({},u),end:Object.assign({},u)},t.add(r[1],0,[["enter",o,e]]),r[2]!==0){let l=fo(e.events,r[2]),c=fo(e.events,r[3]),f={type:a,start:Object.assign({},l),end:Object.assign({},c)};if(t.add(r[2],0,[["enter",f,e]]),n!==2){let p=e.events[r[2]],d=e.events[r[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[1].contentType="text",r[3]>r[2]+1){let m=r[2]+1,y=r[3]-r[2]-1;t.add(m,y,[])}}t.add(r[3]+1,0,[["exit",f,e]])}return i!==void 0&&(o.end=Object.assign({},fo(e.events,i)),t.add(i,0,[["exit",o,e]]),o=void 0),o}function Gg(t,e,r,n,i){let o=[],s=fo(e.events,r);i&&(i.end=Object.assign({},s),o.push(["exit",i,e])),n.end=Object.assign({},s),o.push(["exit",n,e]),t.add(r+1,0,o)}function fo(t,e){let r=t[e],n=r[0]==="enter"?"start":"end";return r[1][n]}var AI={name:"tasklistCheck",tokenize:kI};function Xf(){return{text:{91:AI}}}function kI(t,e,r){let n=this;return i;function i(u){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(u):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(u),t.exit("taskListCheckMarker"),o)}function o(u){return Ce(u)?(t.enter("taskListCheckValueUnchecked"),t.consume(u),t.exit("taskListCheckValueUnchecked"),s):u===88||u===120?(t.enter("taskListCheckValueChecked"),t.consume(u),t.exit("taskListCheckValueChecked"),s):r(u)}function s(u){return u===93?(t.enter("taskListCheckMarker"),t.consume(u),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),a):r(u)}function a(u){return z(u)?e(u):se(u)?t.check({tokenize:wI},e,r)(u):r(u)}}function wI(t,e,r){return ie(t,n,"whitespace");function n(i){return i===null?r(i):e(i)}}function Wg(t){return Ma([Wf(),Kf(),Yf(t),Zf(),Xf()])}var CI={};function wn(t){let e=this,r=t||CI,n=e.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),s=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(Wg(r)),o.push(qf()),s.push(Vf(r))}import{mdatCheck as TI,mdatClean as Hg,mdatExpand as _I,mdatSplit as Kg}from"remark-mdat";import{VFile as wV}from"vfile";async function Cn(t,e,r,n,i,o,s){let a=await e({additionalConfig:o,additionalRules:s});o=a;let u=await im(),l=Na(t),c=nm(l,i,n,"md"),f=[],p=r(a,u);for(let{input:d,name:m,output:y}of c){let g=await Ql(d),b=await p.process(g);b.dirname=y,b.basename=m,f.push(b)}return f}function lu(t,e){return co().use({settings:{bullet:"-",emphasis:"_"}}).use(wn).use(e).use(()=>async function(n,i){Kg(n,i),Hg(n,i,t),await _I(n,i,t)})}function cu(t,e){return co().use({settings:{bullet:"-",emphasis:"_"}}).use(wn).use(e).use(()=>function(n,i){Kg(n,i),Hg(n,i,t)})}function fu(t,e){return co().use({settings:{bullet:"-",emphasis:"_"}}).use(wn).use(e).use(()=>async function(n,i){await TI(n,i,{...t,paranoid:!1})})}async function Yg(t,e,r,n,i){return Cn(t,bi,lu,e,r,n,i)}async function Zg(t,e,r,n,i){return Cn(t,bi,fu,e,r,n,i)}async function Xg(t,e,r,n,i){return Cn(t,bi,cu,e,r,n,i)}var pu={badges:{async content(t){let e=K.object({custom:K.record(K.object({image:K.string(),link:K.string()})).optional(),npm:K.array(K.string()).optional()}).optional().parse(t),r=await Jt(),{name:n}=r,i=[];if(!r.private&&r.publishConfig?.access==="public"&&i.push(`[![NPM Package ${n}](https://img.shields.io/npm/v/${n}.svg)](https://npmjs.com/package/${n})`),e?.npm!==void 0)for(let s of e.npm)i.push(`[![NPM Package ${s}](https://img.shields.io/npm/v/${s}.svg)](https://npmjs.com/package/${s})`);let{license:o}=r;if(o!==void 0&&i.push(`[![License: ${o}](https://img.shields.io/badge/License-${o}-yellow.svg)](https://opensource.org/licenses/${o})`),e?.custom!==void 0)for(let[s,{image:a,link:u}]of Object.entries(e.custom))i.push(`[![${s}](${a})](${u})`);return i.join(`
105
+ `)},order:3}};import{globby as II}from"globby";import du from"path";import{readPackage as OI}from"read-pkg";var hu={banner:{async content(t){let e=K.object({alt:K.string().optional(),src:K.string().optional()}).optional().parse(t),{assetsPath:r,packageFile:n}=await _r();if(n===void 0)throw new Error("No package.json found");let i=e?.src??await Jg(r)??await Jg();if(i===void 0)throw new Error("Banner image not found at any typical location, consider adding something at ./assets/banner.webp");if(!Qg(i)&&!await io(i))throw new Error(`Banner image not found at "${i}"`);let o=e?.alt??`${(await OI({cwd:du.dirname(n)})).name} banner`;if(o===void 0||o==="undefined banner")throw new Error("Banner image alt text not available");return`![${o}](${i})`},order:2}};async function Jg(t){let{packageFile:e}=await _r();if(e===void 0)throw new Error("No package.json found");let r=du.dirname(e),n=t===void 0?[".","assets","media","readme-assets","readme-media","readme","images",".github/assets"]:[t],i=["banner","cover","demo","header","hero","image","logo","overview","readme","screenshot","screenshots","splash"],o=["png","gif","jpg","jpeg","svg","webp"],s=await II(n.map(a=>du.join(r,a)),{deep:1,expandDirectories:{extensions:o,files:i}});if(s.length>0)return du.relative(process.cwd(),s[0])}function Qg(t,e=!0){if(typeof t!="string")throw new TypeError("Expected a string");if(t=t.trim(),t.includes(" "))return!1;try{return new URL(t),!0}catch{return e?Qg(`https://${t}`,!1):!1}}import{getSoleRule as jP}from"remark-mdat";import{execaCommand as CP}from"execa";import{log as yA}from"remark-mdat";function ex(t,e=Number.MAX_SAFE_INTEGER){let r=[],n=vI(t,e);return r.push(DI(n)),r.push(RI(t,n)),n.hasMultipleSubcommands&&n.canRecurse&&r.push(FI(n.fullCommandName)),n.defaultCommand?.commandName!==void 0&&r.push(NI(n)),r.push(PI(t,n)),t.positionals&&!n.commandsOnly&&r.push(Jf(["Positional Argument","Description","Type","Default"],t.positionals.map(i=>[i.arguments?[i.arguments.map(o=>`\`${o}\``)].join(" "):"",`${i.description??""}${i.required===void 0?"":i.required?" _(Required.)_":" _(Optional.)_"}`,i.type?`\`${i.type}\``:"",i.defaultValue?i.defaultValue.includes(" ")?i.defaultValue:`\`${i.defaultValue}\``:""]))),t.commands&&r.push(Jf(["Command","Argument","Description"],t.commands.map(i=>[`\`${i.commandName??(i.default?"[default]":"")}\``,i.arguments?i.arguments.map(o=>`\`${o}\``).join(" "):"",`${i.description??""}${i.default?" _(Default command.)_":""}`]))),t.options&&!n.commandsOnly&&r.push(Jf(["Option","Argument","Description","Type","Default"],t.options.map(i=>[i.flags!==void 0||i.aliases!==void 0?[...i.flags??[],...i.aliases??[]].map(o=>`\`${o}\``).join("<br>"):"",i.arguments?i.arguments.map(o=>`\`${o}\``).join(" "):"",i.description??"",i.choices?i.choices.map(o=>`\`${o}\``).join(" "):i.type?`\`${i.type}\``:"",i.defaultValue?i.defaultValue.includes(" ")&&i.choices===void 0?i.defaultValue:`\`${i.defaultValue}\``:""]))),n.canRecurse&&n.hasMultipleSubcommands&&r.push("_See the sections below for more information on each subcommand._"),r.join(`
110
106
 
111
- `)}function av(t,e){let r=t.subcommandName===void 0,n=t.commands?t.commands.length>1:!1,i=e>1,o=t.commands?.find(l=>l.default),s=t.commands?.find(l=>l.commandName===void 0),a=`${t.commandName}${t.subcommandName?` ${t.subcommandName}`:""}`,u=i&&n&&o?.commandName!==void 0;return{canRecurse:i,commandsOnly:u,defaultCommand:o,fullCommandName:a,hasMultipleSubcommands:n,isTopLevel:r,topLevelCommand:s}}function uv(t){return`#### ${t.isTopLevel?"Command":"Subcommand"}: \`${t.fullCommandName}\``}function lv(t,e){return e.isTopLevel&&e.topLevelCommand?.description?(t.commands=t.commands?.filter(r=>r!==e.topLevelCommand),e.topLevelCommand.description):t.description??""}function cv(t){return`This section lists top-level commands for \`${t}\`.`}function fv(t){return`If no command is provided, \`${t.defaultCommand?.parentCommandName} ${t.defaultCommand?.commandName}\` is run by default.`}function pv(t,e){let r=e.topLevelCommand?.arguments?` ${e.topLevelCommand.arguments.join(" ")}`:t.arguments?` ${t.arguments.join(" ")}`:"";return`Usage:
107
+ `)}function vI(t,e){let r=t.subcommandName===void 0,n=t.commands?t.commands.length>1:!1,i=e>1,o=t.commands?.find(l=>l.default),s=t.commands?.find(l=>l.commandName===void 0),a=`${t.commandName}${t.subcommandName?` ${t.subcommandName}`:""}`,u=i&&n&&o?.commandName!==void 0;return{canRecurse:i,commandsOnly:u,defaultCommand:o,fullCommandName:a,hasMultipleSubcommands:n,isTopLevel:r,topLevelCommand:s}}function DI(t){return`#### ${t.isTopLevel?"Command":"Subcommand"}: \`${t.fullCommandName}\``}function RI(t,e){return e.isTopLevel&&e.topLevelCommand?.description?(t.commands=t.commands?.filter(r=>r!==e.topLevelCommand),e.topLevelCommand.description):t.description??""}function FI(t){return`This section lists top-level commands for \`${t}\`.`}function NI(t){return`If no command is provided, \`${t.defaultCommand?.parentCommandName} ${t.defaultCommand?.commandName}\` is run by default.`}function PI(t,e){let r=e.topLevelCommand?.arguments?` ${e.topLevelCommand.arguments.join(" ")}`:t.arguments?` ${t.arguments.join(" ")}`:"";return`Usage:
112
108
 
113
109
  \`\`\`txt
114
110
  ${e.fullCommandName}${r}
115
- \`\`\``}function up(t,e){let r=dv(e);t=t.filter((i,o)=>!r.includes(o)),e=e.map(i=>i.filter((o,s)=>!r.includes(s)));let n="";n+=`| ${t.join(" | ")} |
111
+ \`\`\``}function Jf(t,e){let r=LI(e);t=t.filter((i,o)=>!r.includes(o)),e=e.map(i=>i.filter((o,s)=>!r.includes(s)));let n="";n+=`| ${t.join(" | ")} |
116
112
  `,n+=`| ${t.map(()=>"---").join(" | ")} |
117
113
  `;for(let i of e)n+=`| ${i.join(" | ")} |
118
- `;return n}function dv(t){let e=[],r=t[0]?.length||0;for(let n=0;n<r;n++){let i=!0;for(let o of t)if(o[n]!==""){i=!1;break}i&&e.push(n)}return e}import{log as bd}from"remark-mdat";var hv=typeof global=="object"&&global&&global.Object===Object&&global,bu=hv;var mv=typeof self=="object"&&self&&self.Object===Object&&self,gv=bu||mv||Function("return this")(),pt=gv;var xv=pt.Symbol,wt=xv;var Cx=Object.prototype,yv=Cx.hasOwnProperty,bv=Cx.toString,vs=wt?wt.toStringTag:void 0;function Ev(t){var e=yv.call(t,vs),r=t[vs];try{t[vs]=void 0;var n=!0}catch{}var i=bv.call(t);return n&&(e?t[vs]=r:delete t[vs]),i}var wx=Ev;var Av=Object.prototype,Cv=Av.toString;function wv(t){return Cv.call(t)}var kx=wv;var kv="[object Null]",Tv="[object Undefined]",Tx=wt?wt.toStringTag:void 0;function _v(t){return t==null?t===void 0?Tv:kv:Tx&&Tx in Object(t)?wx(t):kx(t)}var Mt=_v;function Sv(t){return t!=null&&typeof t=="object"}var at=Sv;var vv="[object Symbol]";function Iv(t){return typeof t=="symbol"||at(t)&&Mt(t)==vv}var Sn=Iv;function Ov(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var Pr=Ov;var Dv=Array.isArray,J=Dv;var Rv=1/0,_x=wt?wt.prototype:void 0,Sx=_x?_x.toString:void 0;function vx(t){if(typeof t=="string")return t;if(J(t))return Pr(t,vx)+"";if(Sn(t))return Sx?Sx.call(t):"";var e=t+"";return e=="0"&&1/t==-Rv?"-0":e}var Ix=vx;var Fv=/\s/;function Nv(t){for(var e=t.length;e--&&Fv.test(t.charAt(e)););return e}var Ox=Nv;var Pv=/^\s+/;function Lv(t){return t&&t.slice(0,Ox(t)+1).replace(Pv,"")}var Dx=Lv;function Mv(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Ze=Mv;var Rx=NaN,Bv=/^[-+]0x[0-9a-f]+$/i,jv=/^0b[01]+$/i,Uv=/^0o[0-7]+$/i,zv=parseInt;function $v(t){if(typeof t=="number")return t;if(Sn(t))return Rx;if(Ze(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ze(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Dx(t);var r=jv.test(t);return r||Uv.test(t)?zv(t.slice(2),r?2:8):Bv.test(t)?Rx:+t}var Fx=$v;var Nx=1/0,qv=17976931348623157e292;function Vv(t){if(!t)return t===0?t:0;if(t=Fx(t),t===Nx||t===-Nx){var e=t<0?-1:1;return e*qv}return t===t?t:0}var Px=Vv;function Gv(t){var e=Px(t),r=e%1;return e===e?r?e-r:e:0}var Lr=Gv;function Wv(t){return t}var hr=Wv;var Hv="[object AsyncFunction]",Kv="[object Function]",Yv="[object GeneratorFunction]",Zv="[object Proxy]";function Xv(t){if(!Ze(t))return!1;var e=Mt(t);return e==Kv||e==Yv||e==Hv||e==Zv}var Bt=Xv;var Jv=pt["__core-js_shared__"],Eu=Jv;var Lx=function(){var t=/[^.]+$/.exec(Eu&&Eu.keys&&Eu.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Qv(t){return!!Lx&&Lx in t}var Mx=Qv;var eI=Function.prototype,tI=eI.toString;function rI(t){if(t!=null){try{return tI.call(t)}catch{}try{return t+""}catch{}}return""}var on=rI;var nI=/[\\^$.*+?()[\]{}|]/g,iI=/^\[object .+?Constructor\]$/,oI=Function.prototype,sI=Object.prototype,aI=oI.toString,uI=sI.hasOwnProperty,lI=RegExp("^"+aI.call(uI).replace(nI,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function cI(t){if(!Ze(t)||Mx(t))return!1;var e=Bt(t)?lI:iI;return e.test(on(t))}var Bx=cI;function fI(t,e){return t?.[e]}var jx=fI;function pI(t,e){var r=jx(t,e);return Bx(r)?r:void 0}var Gt=pI;var dI=Gt(pt,"WeakMap"),Au=dI;var Ux=Object.create,hI=function(){function t(){}return function(e){if(!Ze(e))return{};if(Ux)return Ux(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),zx=hI;function mI(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var $x=mI;function gI(){}var Xe=gI;function xI(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var qx=xI;var yI=800,bI=16,EI=Date.now;function AI(t){var e=0,r=0;return function(){var n=EI(),i=bI-(n-r);if(r=n,i>0){if(++e>=yI)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Vx=AI;function CI(t){return function(){return t}}var Gx=CI;var wI=function(){try{var t=Gt(Object,"defineProperty");return t({},"",{}),t}catch{}}(),xo=wI;var kI=xo?function(t,e){return xo(t,"toString",{configurable:!0,enumerable:!1,value:Gx(e),writable:!0})}:hr,Wx=kI;var TI=Vx(Wx),Hx=TI;function _I(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}var Cu=_I;function SI(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}var wu=SI;function vI(t){return t!==t}var Kx=vI;function II(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}var Yx=II;function OI(t,e,r){return e===e?Yx(t,e,r):wu(t,Kx,r)}var yo=OI;function DI(t,e){var r=t==null?0:t.length;return!!r&&yo(t,e,0)>-1}var ku=DI;var RI=9007199254740991,FI=/^(?:0|[1-9]\d*)$/;function NI(t,e){var r=typeof t;return e=e??RI,!!e&&(r=="number"||r!="symbol"&&FI.test(t))&&t>-1&&t%1==0&&t<e}var vn=NI;function PI(t,e,r){e=="__proto__"&&xo?xo(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var bo=PI;function LI(t,e){return t===e||t!==t&&e!==e}var Mr=LI;var MI=Object.prototype,BI=MI.hasOwnProperty;function jI(t,e,r){var n=t[e];(!(BI.call(t,e)&&Mr(n,r))||r===void 0&&!(e in t))&&bo(t,e,r)}var In=jI;function UI(t,e,r,n){var i=!r;r||(r={});for(var o=-1,s=e.length;++o<s;){var a=e[o],u=n?n(r[a],t[a],a,r,t):void 0;u===void 0&&(u=t[a]),i?bo(r,a,u):In(r,a,u)}return r}var Br=UI;var Zx=Math.max;function zI(t,e,r){return e=Zx(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=Zx(n.length-e,0),s=Array(o);++i<o;)s[i]=n[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=n[i];return a[e]=r(s),$x(t,this,a)}}var Xx=zI;function $I(t,e){return Hx(Xx(t,e,hr),t+"")}var Eo=$I;var qI=9007199254740991;function VI(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=qI}var Ao=VI;function GI(t){return t!=null&&Ao(t.length)&&!Bt(t)}var dt=GI;function WI(t,e,r){if(!Ze(r))return!1;var n=typeof e;return(n=="number"?dt(r)&&vn(e,r.length):n=="string"&&e in r)?Mr(r[e],t):!1}var On=WI;function HI(t){return Eo(function(e,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,s&&On(r[0],r[1],s)&&(o=i<3?void 0:o,i=1),e=Object(e);++n<i;){var a=r[n];a&&t(e,a,n,o)}return e})}var Jx=HI;var KI=Object.prototype;function YI(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||KI;return t===r}var jr=YI;function ZI(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Qx=ZI;var XI="[object Arguments]";function JI(t){return at(t)&&Mt(t)==XI}var lp=JI;var ey=Object.prototype,QI=ey.hasOwnProperty,eO=ey.propertyIsEnumerable,tO=lp(function(){return arguments}())?lp:function(t){return at(t)&&QI.call(t,"callee")&&!eO.call(t,"callee")},Dn=tO;function rO(){return!1}var ty=rO;var iy=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ry=iy&&typeof module=="object"&&module&&!module.nodeType&&module,nO=ry&&ry.exports===iy,ny=nO?pt.Buffer:void 0,iO=ny?ny.isBuffer:void 0,oO=iO||ty,sn=oO;var sO="[object Arguments]",aO="[object Array]",uO="[object Boolean]",lO="[object Date]",cO="[object Error]",fO="[object Function]",pO="[object Map]",dO="[object Number]",hO="[object Object]",mO="[object RegExp]",gO="[object Set]",xO="[object String]",yO="[object WeakMap]",bO="[object ArrayBuffer]",EO="[object DataView]",AO="[object Float32Array]",CO="[object Float64Array]",wO="[object Int8Array]",kO="[object Int16Array]",TO="[object Int32Array]",_O="[object Uint8Array]",SO="[object Uint8ClampedArray]",vO="[object Uint16Array]",IO="[object Uint32Array]",Ve={};Ve[AO]=Ve[CO]=Ve[wO]=Ve[kO]=Ve[TO]=Ve[_O]=Ve[SO]=Ve[vO]=Ve[IO]=!0;Ve[sO]=Ve[aO]=Ve[bO]=Ve[uO]=Ve[EO]=Ve[lO]=Ve[cO]=Ve[fO]=Ve[pO]=Ve[dO]=Ve[hO]=Ve[mO]=Ve[gO]=Ve[xO]=Ve[yO]=!1;function OO(t){return at(t)&&Ao(t.length)&&!!Ve[Mt(t)]}var oy=OO;function DO(t){return function(e){return t(e)}}var Ur=DO;var sy=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Is=sy&&typeof module=="object"&&module&&!module.nodeType&&module,RO=Is&&Is.exports===sy,cp=RO&&bu.process,FO=function(){try{var t=Is&&Is.require&&Is.require("util").types;return t||cp&&cp.binding&&cp.binding("util")}catch{}}(),mr=FO;var ay=mr&&mr.isTypedArray,NO=ay?Ur(ay):oy,Co=NO;var PO=Object.prototype,LO=PO.hasOwnProperty;function MO(t,e){var r=J(t),n=!r&&Dn(t),i=!r&&!n&&sn(t),o=!r&&!n&&!i&&Co(t),s=r||n||i||o,a=s?Qx(t.length,String):[],u=a.length;for(var l in t)(e||LO.call(t,l))&&!(s&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||vn(l,u)))&&a.push(l);return a}var Tu=MO;function BO(t,e){return function(r){return t(e(r))}}var _u=BO;var jO=_u(Object.keys,Object),uy=jO;var UO=Object.prototype,zO=UO.hasOwnProperty;function $O(t){if(!jr(t))return uy(t);var e=[];for(var r in Object(t))zO.call(t,r)&&r!="constructor"&&e.push(r);return e}var Su=$O;function qO(t){return dt(t)?Tu(t):Su(t)}var Pe=qO;var VO=Object.prototype,GO=VO.hasOwnProperty,WO=Jx(function(t,e){if(jr(e)||dt(e)){Br(e,Pe(e),t);return}for(var r in e)GO.call(e,r)&&In(t,r,e[r])}),_t=WO;function HO(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var ly=HO;var KO=Object.prototype,YO=KO.hasOwnProperty;function ZO(t){if(!Ze(t))return ly(t);var e=jr(t),r=[];for(var n in t)n=="constructor"&&(e||!YO.call(t,n))||r.push(n);return r}var cy=ZO;function XO(t){return dt(t)?Tu(t,!0):cy(t)}var Rn=XO;var JO=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,QO=/^\w*$/;function eD(t,e){if(J(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Sn(t)?!0:QO.test(t)||!JO.test(t)||e!=null&&t in Object(e)}var wo=eD;var tD=Gt(Object,"create"),an=tD;function rD(){this.__data__=an?an(null):{},this.size=0}var fy=rD;function nD(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var py=nD;var iD="__lodash_hash_undefined__",oD=Object.prototype,sD=oD.hasOwnProperty;function aD(t){var e=this.__data__;if(an){var r=e[t];return r===iD?void 0:r}return sD.call(e,t)?e[t]:void 0}var dy=aD;var uD=Object.prototype,lD=uD.hasOwnProperty;function cD(t){var e=this.__data__;return an?e[t]!==void 0:lD.call(e,t)}var hy=cD;var fD="__lodash_hash_undefined__";function pD(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=an&&e===void 0?fD:e,this}var my=pD;function ko(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ko.prototype.clear=fy;ko.prototype.delete=py;ko.prototype.get=dy;ko.prototype.has=hy;ko.prototype.set=my;var fp=ko;function dD(){this.__data__=[],this.size=0}var gy=dD;function hD(t,e){for(var r=t.length;r--;)if(Mr(t[r][0],e))return r;return-1}var Fn=hD;var mD=Array.prototype,gD=mD.splice;function xD(t){var e=this.__data__,r=Fn(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():gD.call(e,r,1),--this.size,!0}var xy=xD;function yD(t){var e=this.__data__,r=Fn(e,t);return r<0?void 0:e[r][1]}var yy=yD;function bD(t){return Fn(this.__data__,t)>-1}var by=bD;function ED(t,e){var r=this.__data__,n=Fn(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var Ey=ED;function To(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}To.prototype.clear=gy;To.prototype.delete=xy;To.prototype.get=yy;To.prototype.has=by;To.prototype.set=Ey;var Nn=To;var AD=Gt(pt,"Map"),Pn=AD;function CD(){this.size=0,this.__data__={hash:new fp,map:new(Pn||Nn),string:new fp}}var Ay=CD;function wD(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var Cy=wD;function kD(t,e){var r=t.__data__;return Cy(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Ln=kD;function TD(t){var e=Ln(this,t).delete(t);return this.size-=e?1:0,e}var wy=TD;function _D(t){return Ln(this,t).get(t)}var ky=_D;function SD(t){return Ln(this,t).has(t)}var Ty=SD;function vD(t,e){var r=Ln(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var _y=vD;function _o(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}_o.prototype.clear=Ay;_o.prototype.delete=wy;_o.prototype.get=ky;_o.prototype.has=Ty;_o.prototype.set=_y;var Di=_o;var ID="Expected a function";function pp(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(ID);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(pp.Cache||Di),r}pp.Cache=Di;var Sy=pp;var OD=500;function DD(t){var e=Sy(t,function(n){return r.size===OD&&r.clear(),n}),r=e.cache;return e}var vy=DD;var RD=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,FD=/\\(\\)?/g,ND=vy(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(RD,function(r,n,i,o){e.push(i?o.replace(FD,"$1"):n||r)}),e}),Iy=ND;function PD(t){return t==null?"":Ix(t)}var Oy=PD;function LD(t,e){return J(t)?t:wo(t,e)?[t]:Iy(Oy(t))}var Mn=LD;var MD=1/0;function BD(t){if(typeof t=="string"||Sn(t))return t;var e=t+"";return e=="0"&&1/t==-MD?"-0":e}var zr=BD;function jD(t,e){e=Mn(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[zr(e[r++])];return r&&r==n?t:void 0}var So=jD;function UD(t,e,r){var n=t==null?void 0:So(t,e);return n===void 0?r:n}var Dy=UD;function zD(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var vo=zD;var Ry=wt?wt.isConcatSpreadable:void 0;function $D(t){return J(t)||Dn(t)||!!(Ry&&t&&t[Ry])}var Fy=$D;function Ny(t,e,r,n,i){var o=-1,s=t.length;for(r||(r=Fy),i||(i=[]);++o<s;){var a=t[o];e>0&&r(a)?e>1?Ny(a,e-1,r,n,i):vo(i,a):n||(i[i.length]=a)}return i}var Io=Ny;function qD(t){var e=t==null?0:t.length;return e?Io(t,1):[]}var bt=qD;var VD=_u(Object.getPrototypeOf,Object),vu=VD;function GD(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=Array(i);++n<i;)o[n]=t[n+e];return o}var Iu=GD;function WD(t,e,r,n){var i=-1,o=t==null?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}var Py=WD;function HD(){this.__data__=new Nn,this.size=0}var Ly=HD;function KD(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var My=KD;function YD(t){return this.__data__.get(t)}var By=YD;function ZD(t){return this.__data__.has(t)}var jy=ZD;var XD=200;function JD(t,e){var r=this.__data__;if(r instanceof Nn){var n=r.__data__;if(!Pn||n.length<XD-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Di(n)}return r.set(t,e),this.size=r.size,this}var Uy=JD;function Oo(t){var e=this.__data__=new Nn(t);this.size=e.size}Oo.prototype.clear=Ly;Oo.prototype.delete=My;Oo.prototype.get=By;Oo.prototype.has=jy;Oo.prototype.set=Uy;var Bn=Oo;function QD(t,e){return t&&Br(e,Pe(e),t)}var zy=QD;function eR(t,e){return t&&Br(e,Rn(e),t)}var $y=eR;var Wy=typeof exports=="object"&&exports&&!exports.nodeType&&exports,qy=Wy&&typeof module=="object"&&module&&!module.nodeType&&module,tR=qy&&qy.exports===Wy,Vy=tR?pt.Buffer:void 0,Gy=Vy?Vy.allocUnsafe:void 0;function rR(t,e){if(e)return t.slice();var r=t.length,n=Gy?Gy(r):new t.constructor(r);return t.copy(n),n}var Hy=rR;function nR(t,e){for(var r=-1,n=t==null?0:t.length,i=0,o=[];++r<n;){var s=t[r];e(s,r,t)&&(o[i++]=s)}return o}var Do=nR;function iR(){return[]}var Ou=iR;var oR=Object.prototype,sR=oR.propertyIsEnumerable,Ky=Object.getOwnPropertySymbols,aR=Ky?function(t){return t==null?[]:(t=Object(t),Do(Ky(t),function(e){return sR.call(t,e)}))}:Ou,Ro=aR;function uR(t,e){return Br(t,Ro(t),e)}var Yy=uR;var lR=Object.getOwnPropertySymbols,cR=lR?function(t){for(var e=[];t;)vo(e,Ro(t)),t=vu(t);return e}:Ou,Du=cR;function fR(t,e){return Br(t,Du(t),e)}var Zy=fR;function pR(t,e,r){var n=e(t);return J(t)?n:vo(n,r(t))}var Ru=pR;function dR(t){return Ru(t,Pe,Ro)}var Os=dR;function hR(t){return Ru(t,Rn,Du)}var Fu=hR;var mR=Gt(pt,"DataView"),Nu=mR;var gR=Gt(pt,"Promise"),Pu=gR;var xR=Gt(pt,"Set"),jn=xR;var Xy="[object Map]",yR="[object Object]",Jy="[object Promise]",Qy="[object Set]",eb="[object WeakMap]",tb="[object DataView]",bR=on(Nu),ER=on(Pn),AR=on(Pu),CR=on(jn),wR=on(Au),Ri=Mt;(Nu&&Ri(new Nu(new ArrayBuffer(1)))!=tb||Pn&&Ri(new Pn)!=Xy||Pu&&Ri(Pu.resolve())!=Jy||jn&&Ri(new jn)!=Qy||Au&&Ri(new Au)!=eb)&&(Ri=function(t){var e=Mt(t),r=e==yR?t.constructor:void 0,n=r?on(r):"";if(n)switch(n){case bR:return tb;case ER:return Xy;case AR:return Jy;case CR:return Qy;case wR:return eb}return e});var Ar=Ri;var kR=Object.prototype,TR=kR.hasOwnProperty;function _R(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&TR.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var rb=_R;var SR=pt.Uint8Array,Fo=SR;function vR(t){var e=new t.constructor(t.byteLength);return new Fo(e).set(new Fo(t)),e}var No=vR;function IR(t,e){var r=e?No(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var nb=IR;var OR=/\w*$/;function DR(t){var e=new t.constructor(t.source,OR.exec(t));return e.lastIndex=t.lastIndex,e}var ib=DR;var ob=wt?wt.prototype:void 0,sb=ob?ob.valueOf:void 0;function RR(t){return sb?Object(sb.call(t)):{}}var ab=RR;function FR(t,e){var r=e?No(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var ub=FR;var NR="[object Boolean]",PR="[object Date]",LR="[object Map]",MR="[object Number]",BR="[object RegExp]",jR="[object Set]",UR="[object String]",zR="[object Symbol]",$R="[object ArrayBuffer]",qR="[object DataView]",VR="[object Float32Array]",GR="[object Float64Array]",WR="[object Int8Array]",HR="[object Int16Array]",KR="[object Int32Array]",YR="[object Uint8Array]",ZR="[object Uint8ClampedArray]",XR="[object Uint16Array]",JR="[object Uint32Array]";function QR(t,e,r){var n=t.constructor;switch(e){case $R:return No(t);case NR:case PR:return new n(+t);case qR:return nb(t,r);case VR:case GR:case WR:case HR:case KR:case YR:case ZR:case XR:case JR:return ub(t,r);case LR:return new n;case MR:case UR:return new n(t);case BR:return ib(t);case jR:return new n;case zR:return ab(t)}}var lb=QR;function e1(t){return typeof t.constructor=="function"&&!jr(t)?zx(vu(t)):{}}var cb=e1;var t1="[object Map]";function r1(t){return at(t)&&Ar(t)==t1}var fb=r1;var pb=mr&&mr.isMap,n1=pb?Ur(pb):fb,db=n1;var i1="[object Set]";function o1(t){return at(t)&&Ar(t)==i1}var hb=o1;var mb=mr&&mr.isSet,s1=mb?Ur(mb):hb,gb=s1;var a1=1,u1=2,l1=4,xb="[object Arguments]",c1="[object Array]",f1="[object Boolean]",p1="[object Date]",d1="[object Error]",yb="[object Function]",h1="[object GeneratorFunction]",m1="[object Map]",g1="[object Number]",bb="[object Object]",x1="[object RegExp]",y1="[object Set]",b1="[object String]",E1="[object Symbol]",A1="[object WeakMap]",C1="[object ArrayBuffer]",w1="[object DataView]",k1="[object Float32Array]",T1="[object Float64Array]",_1="[object Int8Array]",S1="[object Int16Array]",v1="[object Int32Array]",I1="[object Uint8Array]",O1="[object Uint8ClampedArray]",D1="[object Uint16Array]",R1="[object Uint32Array]",Le={};Le[xb]=Le[c1]=Le[C1]=Le[w1]=Le[f1]=Le[p1]=Le[k1]=Le[T1]=Le[_1]=Le[S1]=Le[v1]=Le[m1]=Le[g1]=Le[bb]=Le[x1]=Le[y1]=Le[b1]=Le[E1]=Le[I1]=Le[O1]=Le[D1]=Le[R1]=!0;Le[d1]=Le[yb]=Le[A1]=!1;function Lu(t,e,r,n,i,o){var s,a=e&a1,u=e&u1,l=e&l1;if(r&&(s=i?r(t,n,i,o):r(t)),s!==void 0)return s;if(!Ze(t))return t;var c=J(t);if(c){if(s=rb(t),!a)return qx(t,s)}else{var f=Ar(t),p=f==yb||f==h1;if(sn(t))return Hy(t,a);if(f==bb||f==xb||p&&!i){if(s=u||p?{}:cb(t),!a)return u?Zy(t,$y(s,t)):Yy(t,zy(s,t))}else{if(!Le[f])return i?t:{};s=lb(t,f,a)}}o||(o=new Bn);var d=o.get(t);if(d)return d;o.set(t,s),gb(t)?t.forEach(function(g){s.add(Lu(g,e,r,g,t,o))}):db(t)&&t.forEach(function(g,b){s.set(b,Lu(g,e,r,b,t,o))});var m=l?u?Fu:Os:u?Rn:Pe,y=c?void 0:m(t);return Cu(y||t,function(g,b){y&&(b=g,g=t[b]),In(s,b,Lu(g,e,r,b,t,o))}),s}var Eb=Lu;var F1=4;function N1(t){return Eb(t,F1)}var Me=N1;function P1(t){for(var e=-1,r=t==null?0:t.length,n=0,i=[];++e<r;){var o=t[e];o&&(i[n++]=o)}return i}var $r=P1;var L1="__lodash_hash_undefined__";function M1(t){return this.__data__.set(t,L1),this}var Ab=M1;function B1(t){return this.__data__.has(t)}var Cb=B1;function Mu(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Di;++e<r;)this.add(t[e])}Mu.prototype.add=Mu.prototype.push=Ab;Mu.prototype.has=Cb;var Po=Mu;function j1(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var Bu=j1;function U1(t,e){return t.has(e)}var Lo=U1;var z1=1,$1=2;function q1(t,e,r,n,i,o){var s=r&z1,a=t.length,u=e.length;if(a!=u&&!(s&&u>a))return!1;var l=o.get(t),c=o.get(e);if(l&&c)return l==e&&c==t;var f=-1,p=!0,d=r&$1?new Po:void 0;for(o.set(t,e),o.set(e,t);++f<a;){var m=t[f],y=e[f];if(n)var g=s?n(y,m,f,e,t,o):n(m,y,f,t,e,o);if(g!==void 0){if(g)continue;p=!1;break}if(d){if(!Bu(e,function(b,w){if(!Lo(d,w)&&(m===b||i(m,b,r,n,o)))return d.push(w)})){p=!1;break}}else if(!(m===y||i(m,y,r,n,o))){p=!1;break}}return o.delete(t),o.delete(e),p}var ju=q1;function V1(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var wb=V1;function G1(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var Mo=G1;var W1=1,H1=2,K1="[object Boolean]",Y1="[object Date]",Z1="[object Error]",X1="[object Map]",J1="[object Number]",Q1="[object RegExp]",eF="[object Set]",tF="[object String]",rF="[object Symbol]",nF="[object ArrayBuffer]",iF="[object DataView]",kb=wt?wt.prototype:void 0,dp=kb?kb.valueOf:void 0;function oF(t,e,r,n,i,o,s){switch(r){case iF:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case nF:return!(t.byteLength!=e.byteLength||!o(new Fo(t),new Fo(e)));case K1:case Y1:case J1:return Mr(+t,+e);case Z1:return t.name==e.name&&t.message==e.message;case Q1:case tF:return t==e+"";case X1:var a=wb;case eF:var u=n&W1;if(a||(a=Mo),t.size!=e.size&&!u)return!1;var l=s.get(t);if(l)return l==e;n|=H1,s.set(t,e);var c=ju(a(t),a(e),n,i,o,s);return s.delete(t),c;case rF:if(dp)return dp.call(t)==dp.call(e)}return!1}var Tb=oF;var sF=1,aF=Object.prototype,uF=aF.hasOwnProperty;function lF(t,e,r,n,i,o){var s=r&sF,a=Os(t),u=a.length,l=Os(e),c=l.length;if(u!=c&&!s)return!1;for(var f=u;f--;){var p=a[f];if(!(s?p in e:uF.call(e,p)))return!1}var d=o.get(t),m=o.get(e);if(d&&m)return d==e&&m==t;var y=!0;o.set(t,e),o.set(e,t);for(var g=s;++f<u;){p=a[f];var b=t[p],w=e[p];if(n)var C=s?n(w,b,p,e,t,o):n(b,w,p,t,e,o);if(!(C===void 0?b===w||i(b,w,r,n,o):C)){y=!1;break}g||(g=p=="constructor")}if(y&&!g){var D=t.constructor,R=e.constructor;D!=R&&"constructor"in t&&"constructor"in e&&!(typeof D=="function"&&D instanceof D&&typeof R=="function"&&R instanceof R)&&(y=!1)}return o.delete(t),o.delete(e),y}var _b=lF;var cF=1,Sb="[object Arguments]",vb="[object Array]",Uu="[object Object]",fF=Object.prototype,Ib=fF.hasOwnProperty;function pF(t,e,r,n,i,o){var s=J(t),a=J(e),u=s?vb:Ar(t),l=a?vb:Ar(e);u=u==Sb?Uu:u,l=l==Sb?Uu:l;var c=u==Uu,f=l==Uu,p=u==l;if(p&&sn(t)){if(!sn(e))return!1;s=!0,c=!1}if(p&&!c)return o||(o=new Bn),s||Co(t)?ju(t,e,r,n,i,o):Tb(t,e,u,r,n,i,o);if(!(r&cF)){var d=c&&Ib.call(t,"__wrapped__"),m=f&&Ib.call(e,"__wrapped__");if(d||m){var y=d?t.value():t,g=m?e.value():e;return o||(o=new Bn),i(y,g,r,n,o)}}return p?(o||(o=new Bn),_b(t,e,r,n,i,o)):!1}var Ob=pF;function Db(t,e,r,n,i){return t===e?!0:t==null||e==null||!at(t)&&!at(e)?t!==t&&e!==e:Ob(t,e,r,n,Db,i)}var zu=Db;var dF=1,hF=2;function mF(t,e,r,n){var i=r.length,o=i,s=!n;if(t==null)return!o;for(t=Object(t);i--;){var a=r[i];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<o;){a=r[i];var u=a[0],l=t[u],c=a[1];if(s&&a[2]){if(l===void 0&&!(u in t))return!1}else{var f=new Bn;if(n)var p=n(l,c,u,t,e,f);if(!(p===void 0?zu(c,l,dF|hF,n,f):p))return!1}}return!0}var Rb=mF;function gF(t){return t===t&&!Ze(t)}var $u=gF;function xF(t){for(var e=Pe(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,$u(i)]}return e}var Fb=xF;function yF(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var qu=yF;function bF(t){var e=Fb(t);return e.length==1&&e[0][2]?qu(e[0][0],e[0][1]):function(r){return r===t||Rb(r,t,e)}}var Nb=bF;function EF(t,e){return t!=null&&e in Object(t)}var Pb=EF;function AF(t,e,r){e=Mn(e,t);for(var n=-1,i=e.length,o=!1;++n<i;){var s=zr(e[n]);if(!(o=t!=null&&r(t,s)))break;t=t[s]}return o||++n!=i?o:(i=t==null?0:t.length,!!i&&Ao(i)&&vn(s,i)&&(J(t)||Dn(t)))}var Vu=AF;function CF(t,e){return t!=null&&Vu(t,e,Pb)}var Lb=CF;var wF=1,kF=2;function TF(t,e){return wo(t)&&$u(e)?qu(zr(t),e):function(r){var n=Dy(r,t);return n===void 0&&n===e?Lb(r,t):zu(e,n,wF|kF)}}var Mb=TF;function _F(t){return function(e){return e?.[t]}}var Bb=_F;function SF(t){return function(e){return So(e,t)}}var jb=SF;function vF(t){return wo(t)?Bb(zr(t)):jb(t)}var Ub=vF;function IF(t){return typeof t=="function"?t:t==null?hr:typeof t=="object"?J(t)?Mb(t[0],t[1]):Nb(t):Ub(t)}var ht=IF;function OF(t,e,r,n){for(var i=-1,o=t==null?0:t.length;++i<o;){var s=t[i];e(n,s,r(s),t)}return n}var zb=OF;function DF(t){return function(e,r,n){for(var i=-1,o=Object(e),s=n(e),a=s.length;a--;){var u=s[t?a:++i];if(r(o[u],u,o)===!1)break}return e}}var $b=DF;var RF=$b(),qb=RF;function FF(t,e){return t&&qb(t,e,Pe)}var Vb=FF;function NF(t,e){return function(r,n){if(r==null)return r;if(!dt(r))return t(r,n);for(var i=r.length,o=e?i:-1,s=Object(r);(e?o--:++o<i)&&n(s[o],o,s)!==!1;);return r}}var Gb=NF;var PF=Gb(Vb),Wt=PF;function LF(t,e,r,n){return Wt(t,function(i,o,s){e(n,i,r(i),s)}),n}var Wb=LF;function MF(t,e){return function(r,n){var i=J(r)?zb:Wb,o=e?e():{};return i(r,t,ht(n,2),o)}}var Hb=MF;var Kb=Object.prototype,BF=Kb.hasOwnProperty,jF=Eo(function(t,e){t=Object(t);var r=-1,n=e.length,i=n>2?e[2]:void 0;for(i&&On(e[0],e[1],i)&&(n=1);++r<n;)for(var o=e[r],s=Rn(o),a=-1,u=s.length;++a<u;){var l=s[a],c=t[l];(c===void 0||Mr(c,Kb[l])&&!BF.call(t,l))&&(t[l]=o[l])}return t}),Bo=jF;function UF(t){return at(t)&&dt(t)}var hp=UF;function zF(t,e,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}var Gu=zF;var $F=200;function qF(t,e,r,n){var i=-1,o=ku,s=!0,a=t.length,u=[],l=e.length;if(!a)return u;r&&(e=Pr(e,Ur(r))),n?(o=Gu,s=!1):e.length>=$F&&(o=Lo,s=!1,e=new Po(e));e:for(;++i<a;){var c=t[i],f=r==null?c:r(c);if(c=n||c!==0?c:0,s&&f===f){for(var p=l;p--;)if(e[p]===f)continue e;u.push(c)}else o(e,f,n)||u.push(c)}return u}var Yb=qF;var VF=Eo(function(t,e){return hp(t)?Yb(t,Io(e,1,hp,!0)):[]}),Un=VF;function GF(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var qr=GF;function WF(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:Lr(e),Iu(t,e<0?0:e,n)):[]}var ut=WF;function HF(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:Lr(e),e=n-e,Iu(t,0,e<0?0:e)):[]}var un=HF;function KF(t){return typeof t=="function"?t:hr}var Zb=KF;function YF(t,e){var r=J(t)?Cu:Wt;return r(t,Zb(e))}var G=YF;function ZF(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}var Xb=ZF;function XF(t,e){var r=!0;return Wt(t,function(n,i,o){return r=!!e(n,i,o),r}),r}var Jb=XF;function JF(t,e,r){var n=J(t)?Xb:Jb;return r&&On(t,e,r)&&(e=void 0),n(t,ht(e,3))}var Dt=JF;function QF(t,e){var r=[];return Wt(t,function(n,i,o){e(n,i,o)&&r.push(n)}),r}var Wu=QF;function eN(t,e){var r=J(t)?Do:Wu;return r(t,ht(e,3))}var Rt=eN;function tN(t){return function(e,r,n){var i=Object(e);if(!dt(e)){var o=ht(r,3);e=Pe(e),r=function(a){return o(i[a],a,i)}}var s=t(e,r,n);return s>-1?i[o?e[s]:s]:void 0}}var Qb=tN;var rN=Math.max;function nN(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:Lr(r);return i<0&&(i=rN(n+i,0)),wu(t,ht(e,3),i)}var eE=nN;var iN=Qb(eE),Vr=iN;function oN(t){return t&&t.length?t[0]:void 0}var kt=oN;function sN(t,e){var r=-1,n=dt(t)?Array(t.length):[];return Wt(t,function(i,o,s){n[++r]=e(i,o,s)}),n}var tE=sN;function aN(t,e){var r=J(t)?Pr:tE;return r(t,ht(e,3))}var q=aN;function uN(t,e){return Io(q(t,e),1)}var jt=uN;var lN=Object.prototype,cN=lN.hasOwnProperty,fN=Hb(function(t,e,r){cN.call(t,r)?t[r].push(e):bo(t,r,[e])}),mp=fN;var pN=Object.prototype,dN=pN.hasOwnProperty;function hN(t,e){return t!=null&&dN.call(t,e)}var rE=hN;function mN(t,e){return t!=null&&Vu(t,e,rE)}var Z=mN;var gN="[object String]";function xN(t){return typeof t=="string"||!J(t)&&at(t)&&Mt(t)==gN}var Et=xN;function yN(t,e){return Pr(e,function(r){return t[r]})}var nE=yN;function bN(t){return t==null?[]:nE(t,Pe(t))}var Re=bN;var EN=Math.max;function AN(t,e,r,n){t=dt(t)?t:Re(t),r=r&&!n?Lr(r):0;var i=t.length;return r<0&&(r=EN(i+r,0)),Et(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&yo(t,e,r)>-1}var He=AN;var CN=Math.max;function wN(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:Lr(r);return i<0&&(i=CN(n+i,0)),yo(t,e,i)}var Hu=wN;var kN="[object Map]",TN="[object Set]",_N=Object.prototype,SN=_N.hasOwnProperty;function vN(t){if(t==null)return!0;if(dt(t)&&(J(t)||typeof t=="string"||typeof t.splice=="function"||sn(t)||Co(t)||Dn(t)))return!t.length;var e=Ar(t);if(e==kN||e==TN)return!t.size;if(jr(t))return!Su(t).length;for(var r in t)if(SN.call(t,r))return!1;return!0}var Te=vN;var IN="[object RegExp]";function ON(t){return at(t)&&Mt(t)==IN}var iE=ON;var oE=mr&&mr.isRegExp,DN=oE?Ur(oE):iE,gr=DN;function RN(t){return t===void 0}var Ft=RN;var FN="Expected a function";function NN(t){if(typeof t!="function")throw new TypeError(FN);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}var sE=NN;function PN(t,e,r,n){if(!Ze(t))return t;e=Mn(e,t);for(var i=-1,o=e.length,s=o-1,a=t;a!=null&&++i<o;){var u=zr(e[i]),l=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return t;if(i!=s){var c=a[u];l=n?n(c,u,a):void 0,l===void 0&&(l=Ze(c)?c:vn(e[i+1])?[]:{})}In(a,u,l),a=a[u]}return t}var aE=PN;function LN(t,e,r){for(var n=-1,i=e.length,o={};++n<i;){var s=e[n],a=So(t,s);r(a,s)&&aE(o,Mn(s,t),a)}return o}var uE=LN;function MN(t,e){if(t==null)return{};var r=Pr(Fu(t),function(n){return[n]});return e=ht(e),uE(t,r,function(n,i){return e(n,i[0])})}var Ht=MN;function BN(t,e,r,n,i){return i(t,function(o,s,a){r=n?(n=!1,o):e(r,o,s,a)}),r}var lE=BN;function jN(t,e,r){var n=J(t)?Py:lE,i=arguments.length<3;return n(t,ht(e,4),r,i,Wt)}var mt=jN;function UN(t,e){var r=J(t)?Do:Wu;return r(t,sE(ht(e,3)))}var zn=UN;function zN(t,e){var r;return Wt(t,function(n,i,o){return r=e(n,i,o),!r}),!!r}var cE=zN;function $N(t,e,r){var n=J(t)?Bu:cE;return r&&On(t,e,r)&&(e=void 0),n(t,ht(e,3))}var Ds=$N;var qN=1/0,VN=jn&&1/Mo(new jn([,-0]))[1]==qN?function(t){return new jn(t)}:Xe,fE=VN;var GN=200;function WN(t,e,r){var n=-1,i=ku,o=t.length,s=!0,a=[],u=a;if(r)s=!1,i=Gu;else if(o>=GN){var l=e?null:fE(t);if(l)return Mo(l);s=!1,i=Lo,u=new Po}else u=e?[]:a;e:for(;++n<o;){var c=t[n],f=e?e(c):c;if(c=r||c!==0?c:0,s&&f===f){for(var p=u.length;p--;)if(u[p]===f)continue e;e&&u.push(f),a.push(c)}else i(u,f,r)||(u!==a&&u.push(f),a.push(c))}return a}var pE=WN;function HN(t){return t&&t.length?pE(t):[]}var jo=HN;function Uo(t){console&&console.error&&console.error(`Error: ${t}`)}function Rs(t){console&&console.warn&&console.warn(`Warning: ${t}`)}function Fs(t){let e=new Date().getTime(),r=t();return{time:new Date().getTime()-e,value:r}}function Ns(t){function e(){}e.prototype=t;let r=new e;function n(){return typeof r.bar}return n(),n(),t;(0,eval)(t)}function KN(t){return YN(t)?t.LABEL:t.name}function YN(t){return Et(t.LABEL)&&t.LABEL!==""}var ir=class{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),G(this.definition,r=>{r.accept(e)})}},Be=class extends ir{constructor(e){super([]),this.idx=1,_t(this,Ht(e,r=>r!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}},Ut=class extends ir{constructor(e){super(e.definition),this.orgText="",_t(this,Ht(e,r=>r!==void 0))}},je=class extends ir{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,_t(this,Ht(e,r=>r!==void 0))}},Ge=class extends ir{constructor(e){super(e.definition),this.idx=1,_t(this,Ht(e,r=>r!==void 0))}},lt=class extends ir{constructor(e){super(e.definition),this.idx=1,_t(this,Ht(e,r=>r!==void 0))}},ct=class extends ir{constructor(e){super(e.definition),this.idx=1,_t(this,Ht(e,r=>r!==void 0))}},De=class extends ir{constructor(e){super(e.definition),this.idx=1,_t(this,Ht(e,r=>r!==void 0))}},rt=class extends ir{constructor(e){super(e.definition),this.idx=1,_t(this,Ht(e,r=>r!==void 0))}},nt=class extends ir{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,_t(this,Ht(e,r=>r!==void 0))}},Ie=class{constructor(e){this.idx=1,_t(this,Ht(e,r=>r!==void 0))}accept(e){e.visit(this)}};function Ku(t){return q(t,zo)}function zo(t){function e(r){return q(r,zo)}if(t instanceof Be){let r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return Et(t.label)&&(r.label=t.label),r}else{if(t instanceof je)return{type:"Alternative",definition:e(t.definition)};if(t instanceof Ge)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof lt)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof ct)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:zo(new Ie({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof rt)return{type:"RepetitionWithSeparator",idx:t.idx,separator:zo(new Ie({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof De)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof nt)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof Ie){let r={type:"Terminal",name:t.terminalType.name,label:KN(t.terminalType),idx:t.idx};Et(t.label)&&(r.terminalLabel=t.label);let n=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(r.pattern=gr(n)?n.source:n),r}else{if(t instanceof Ut)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}}}var zt=class{visit(e){let r=e;switch(r.constructor){case Be:return this.visitNonTerminal(r);case je:return this.visitAlternative(r);case Ge:return this.visitOption(r);case lt:return this.visitRepetitionMandatory(r);case ct:return this.visitRepetitionMandatoryWithSeparator(r);case rt:return this.visitRepetitionWithSeparator(r);case De:return this.visitRepetition(r);case nt:return this.visitAlternation(r);case Ie:return this.visitTerminal(r);case Ut:return this.visitRule(r);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}};function gp(t){return t instanceof je||t instanceof Ge||t instanceof De||t instanceof lt||t instanceof ct||t instanceof rt||t instanceof Ie||t instanceof Ut}function Fi(t,e=[]){return t instanceof Ge||t instanceof De||t instanceof rt?!0:t instanceof nt?Ds(t.definition,n=>Fi(n,e)):t instanceof Be&&He(e,t)?!1:t instanceof ir?(t instanceof Be&&e.push(t),Dt(t.definition,n=>Fi(n,e))):!1}function xp(t){return t instanceof nt}function Kt(t){if(t instanceof Be)return"SUBRULE";if(t instanceof Ge)return"OPTION";if(t instanceof nt)return"OR";if(t instanceof lt)return"AT_LEAST_ONE";if(t instanceof ct)return"AT_LEAST_ONE_SEP";if(t instanceof rt)return"MANY_SEP";if(t instanceof De)return"MANY";if(t instanceof Ie)return"CONSUME";throw Error("non exhaustive match")}var ln=class{walk(e,r=[]){G(e.definition,(n,i)=>{let o=ut(e.definition,i+1);if(n instanceof Be)this.walkProdRef(n,o,r);else if(n instanceof Ie)this.walkTerminal(n,o,r);else if(n instanceof je)this.walkFlat(n,o,r);else if(n instanceof Ge)this.walkOption(n,o,r);else if(n instanceof lt)this.walkAtLeastOne(n,o,r);else if(n instanceof ct)this.walkAtLeastOneSep(n,o,r);else if(n instanceof rt)this.walkManySep(n,o,r);else if(n instanceof De)this.walkMany(n,o,r);else if(n instanceof nt)this.walkOr(n,o,r);else throw Error("non exhaustive match")})}walkTerminal(e,r,n){}walkProdRef(e,r,n){}walkFlat(e,r,n){let i=r.concat(n);this.walk(e,i)}walkOption(e,r,n){let i=r.concat(n);this.walk(e,i)}walkAtLeastOne(e,r,n){let i=[new Ge({definition:e.definition})].concat(r,n);this.walk(e,i)}walkAtLeastOneSep(e,r,n){let i=dE(e,r,n);this.walk(e,i)}walkMany(e,r,n){let i=[new Ge({definition:e.definition})].concat(r,n);this.walk(e,i)}walkManySep(e,r,n){let i=dE(e,r,n);this.walk(e,i)}walkOr(e,r,n){let i=r.concat(n);G(e.definition,o=>{let s=new je({definition:[o]});this.walk(s,i)})}};function dE(t,e,r){return[new Ge({definition:[new Ie({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}function Ni(t){if(t instanceof Be)return Ni(t.referencedRule);if(t instanceof Ie)return JN(t);if(gp(t))return ZN(t);if(xp(t))return XN(t);throw Error("non exhaustive match")}function ZN(t){let e=[],r=t.definition,n=0,i=r.length>n,o,s=!0;for(;i&&s;)o=r[n],s=Fi(o),e=e.concat(Ni(o)),n=n+1,i=r.length>n;return jo(e)}function XN(t){let e=q(t.definition,r=>Ni(r));return jo(bt(e))}function JN(t){return[t.terminalType]}var Yu="_~IN~_";var yp=class extends ln{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,r,n){}walkProdRef(e,r,n){let i=QN(e.referencedRule,e.idx)+this.topProd.name,o=r.concat(n),s=new je({definition:o}),a=Ni(s);this.follows[i]=a}};function hE(t){let e={};return G(t,r=>{let n=new yp(r).startWalking();_t(e,n)}),e}function QN(t,e){return t.name+e+Yu}function ue(t){return t.charCodeAt(0)}function Zu(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}function $o(t,e){if(t[e]===!0)throw"duplicate flag "+e;let r=t[e];t[e]=!0}function Pi(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function Ps(){throw Error("Internal Error - Should never get here!")}function bp(t){return t.type==="Character"}var Ls=[];for(let t=ue("0");t<=ue("9");t++)Ls.push(t);var Ms=[ue("_")].concat(Ls);for(let t=ue("a");t<=ue("z");t++)Ms.push(t);for(let t=ue("A");t<=ue("Z");t++)Ms.push(t);var Ep=[ue(" "),ue("\f"),ue(`
119
- `),ue("\r"),ue(" "),ue("\v"),ue(" "),ue("\xA0"),ue("\u1680"),ue("\u2000"),ue("\u2001"),ue("\u2002"),ue("\u2003"),ue("\u2004"),ue("\u2005"),ue("\u2006"),ue("\u2007"),ue("\u2008"),ue("\u2009"),ue("\u200A"),ue("\u2028"),ue("\u2029"),ue("\u202F"),ue("\u205F"),ue("\u3000"),ue("\uFEFF")];var eP=/[0-9a-fA-F]/,Xu=/[0-9]/,tP=/[1-9]/,Bs=class{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");let r=this.disjunction();this.consumeChar("/");let n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":$o(n,"global");break;case"i":$o(n,"ignoreCase");break;case"m":$o(n,"multiLine");break;case"u":$o(n,"unicode");break;case"y":$o(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:r,loc:this.loc(0)}}disjunction(){let e=[],r=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(r)}}alternative(){let e=[],r=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break}Pi(r);let n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(e)}}return Ps()}quantifier(e=!1){let r,n=this.idx;switch(this.popChar()){case"*":r={atLeast:0,atMost:1/0};break;case"+":r={atLeast:1,atMost:1/0};break;case"?":r={atLeast:0,atMost:1};break;case"{":let i=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:i,atMost:i};break;case",":let o;this.isDigit()?(o=this.integerIncludingZero(),r={atLeast:i,atMost:o}):r={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&r===void 0)return;Pi(r);break}if(!(e===!0&&r===void 0)&&Pi(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let e,r=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),Pi(e)?(e.loc=this.loc(r),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):Ps()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[ue(`
120
- `),ue("\r"),ue("\u2028"),ue("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,r=!1;switch(this.popChar()){case"d":e=Ls;break;case"D":e=Ls,r=!0;break;case"s":e=Ep;break;case"S":e=Ep,r=!0;break;case"w":e=Ms;break;case"W":e=Ms,r=!0;break}return Pi(e)?{type:"Set",value:e,complement:r}:Ps()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=ue("\f");break;case"n":e=ue(`
121
- `);break;case"r":e=ue("\r");break;case"t":e=ue(" ");break;case"v":e=ue("\v");break}return Pi(e)?{type:"Character",value:e}:Ps()}controlLetterEscapeAtom(){this.consumeChar("c");let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:ue("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let e=this.popChar();return{type:"Character",value:ue(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
122
- `:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let e=this.popChar();return{type:"Character",value:ue(e)}}}characterClass(){let e=[],r=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),r=!0);this.isClassAtom();){let n=this.classAtom(),i=n.type==="Character";if(bp(n)&&this.isRangeDash()){this.consumeChar("-");let o=this.classAtom(),s=o.type==="Character";if(bp(o)){if(o.value<n.value)throw Error("Range out of order in character class");e.push({from:n.value,to:o.value})}else Zu(n.value,e),e.push(ue("-")),Zu(o.value,e)}else Zu(n.value,e)}return this.consumeChar("]"),{type:"Set",complement:r,value:e}}classAtom(){switch(this.peekChar()){case"]":case`
123
- `:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:ue("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),e=!1;break;default:this.groupIdx++;break}let r=this.disjunction();this.consumeChar(")");let n={type:"Group",capturing:e,value:r};return e&&(n.idx=this.groupIdx),n}positiveInteger(){let e=this.popChar();if(tP.test(e)===!1)throw Error("Expecting a positive integer");for(;Xu.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(Xu.test(e)===!1)throw Error("Expecting an integer");for(;Xu.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){let e=this.popChar();switch(e){case`
124
- `:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:ue(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return this.peekChar()==="-"&&this.isClassAtom(1)}isDigit(){return Xu.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case`
114
+ `;return n}function LI(t){let e=[],r=t[0]?.length||0;for(let n=0;n<r;n++){let i=!0;for(let o of t)if(o[n]!==""){i=!1;break}i&&e.push(n)}return e}import{log as ld}from"remark-mdat";var MI=typeof global=="object"&&global&&global.Object===Object&&global,mu=MI;var BI=typeof self=="object"&&self&&self.Object===Object&&self,jI=mu||BI||Function("return this")(),ct=jI;var UI=ct.Symbol,At=UI;var tx=Object.prototype,zI=tx.hasOwnProperty,$I=tx.toString,ks=At?At.toStringTag:void 0;function qI(t){var e=zI.call(t,ks),r=t[ks];try{t[ks]=void 0;var n=!0}catch{}var i=$I.call(t);return n&&(e?t[ks]=r:delete t[ks]),i}var rx=qI;var VI=Object.prototype,GI=VI.toString;function WI(t){return GI.call(t)}var nx=WI;var HI="[object Null]",KI="[object Undefined]",ix=At?At.toStringTag:void 0;function YI(t){return t==null?t===void 0?KI:HI:ix&&ix in Object(t)?rx(t):nx(t)}var Nt=YI;function ZI(t){return t!=null&&typeof t=="object"}var ot=ZI;var XI="[object Symbol]";function JI(t){return typeof t=="symbol"||ot(t)&&Nt(t)==XI}var Tn=JI;function QI(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var Dr=QI;var eO=Array.isArray,Q=eO;var tO=1/0,ox=At?At.prototype:void 0,sx=ox?ox.toString:void 0;function ax(t){if(typeof t=="string")return t;if(Q(t))return Dr(t,ax)+"";if(Tn(t))return sx?sx.call(t):"";var e=t+"";return e=="0"&&1/t==-tO?"-0":e}var ux=ax;var rO=/\s/;function nO(t){for(var e=t.length;e--&&rO.test(t.charAt(e)););return e}var lx=nO;var iO=/^\s+/;function oO(t){return t&&t.slice(0,lx(t)+1).replace(iO,"")}var cx=oO;function sO(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Ye=sO;var fx=NaN,aO=/^[-+]0x[0-9a-f]+$/i,uO=/^0b[01]+$/i,lO=/^0o[0-7]+$/i,cO=parseInt;function fO(t){if(typeof t=="number")return t;if(Tn(t))return fx;if(Ye(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ye(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=cx(t);var r=uO.test(t);return r||lO.test(t)?cO(t.slice(2),r?2:8):aO.test(t)?fx:+t}var px=fO;var dx=1/0,pO=17976931348623157e292;function dO(t){if(!t)return t===0?t:0;if(t=px(t),t===dx||t===-dx){var e=t<0?-1:1;return e*pO}return t===t?t:0}var hx=dO;function hO(t){var e=hx(t),r=e%1;return e===e?r?e-r:e:0}var Rr=hO;function mO(t){return t}var cr=mO;var gO="[object AsyncFunction]",xO="[object Function]",yO="[object GeneratorFunction]",bO="[object Proxy]";function EO(t){if(!Ye(t))return!1;var e=Nt(t);return e==xO||e==yO||e==gO||e==bO}var Pt=EO;var AO=ct["__core-js_shared__"],gu=AO;var mx=(function(){var t=/[^.]+$/.exec(gu&&gu.keys&&gu.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function kO(t){return!!mx&&mx in t}var gx=kO;var wO=Function.prototype,CO=wO.toString;function TO(t){if(t!=null){try{return CO.call(t)}catch{}try{return t+""}catch{}}return""}var tn=TO;var _O=/[\\^$.*+?()[\]{}|]/g,SO=/^\[object .+?Constructor\]$/,IO=Function.prototype,OO=Object.prototype,vO=IO.toString,DO=OO.hasOwnProperty,RO=RegExp("^"+vO.call(DO).replace(_O,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function FO(t){if(!Ye(t)||gx(t))return!1;var e=Pt(t)?RO:SO;return e.test(tn(t))}var xx=FO;function NO(t,e){return t?.[e]}var yx=NO;function PO(t,e){var r=yx(t,e);return xx(r)?r:void 0}var qt=PO;var LO=qt(ct,"WeakMap"),xu=LO;var bx=Object.create,MO=(function(){function t(){}return function(e){if(!Ye(e))return{};if(bx)return bx(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}})(),Ex=MO;function BO(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var Ax=BO;function jO(){}var Ze=jO;function UO(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var kx=UO;var zO=800,$O=16,qO=Date.now;function VO(t){var e=0,r=0;return function(){var n=qO(),i=$O-(n-r);if(r=n,i>0){if(++e>=zO)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var wx=VO;function GO(t){return function(){return t}}var Cx=GO;var WO=(function(){try{var t=qt(Object,"defineProperty");return t({},"",{}),t}catch{}})(),po=WO;var HO=po?function(t,e){return po(t,"toString",{configurable:!0,enumerable:!1,value:Cx(e),writable:!0})}:cr,Tx=HO;var KO=wx(Tx),_x=KO;function YO(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}var yu=YO;function ZO(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}var bu=ZO;function XO(t){return t!==t}var Sx=XO;function JO(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}var Ix=JO;function QO(t,e,r){return e===e?Ix(t,e,r):bu(t,Sx,r)}var ho=QO;function ev(t,e){var r=t==null?0:t.length;return!!r&&ho(t,e,0)>-1}var Eu=ev;var tv=9007199254740991,rv=/^(?:0|[1-9]\d*)$/;function nv(t,e){var r=typeof t;return e=e??tv,!!e&&(r=="number"||r!="symbol"&&rv.test(t))&&t>-1&&t%1==0&&t<e}var _n=nv;function iv(t,e,r){e=="__proto__"&&po?po(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var mo=iv;function ov(t,e){return t===e||t!==t&&e!==e}var Fr=ov;var sv=Object.prototype,av=sv.hasOwnProperty;function uv(t,e,r){var n=t[e];(!(av.call(t,e)&&Fr(n,r))||r===void 0&&!(e in t))&&mo(t,e,r)}var Sn=uv;function lv(t,e,r,n){var i=!r;r||(r={});for(var o=-1,s=e.length;++o<s;){var a=e[o],u=n?n(r[a],t[a],a,r,t):void 0;u===void 0&&(u=t[a]),i?mo(r,a,u):Sn(r,a,u)}return r}var Nr=lv;var Ox=Math.max;function cv(t,e,r){return e=Ox(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=Ox(n.length-e,0),s=Array(o);++i<o;)s[i]=n[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=n[i];return a[e]=r(s),Ax(t,this,a)}}var vx=cv;function fv(t,e){return _x(vx(t,e,cr),t+"")}var go=fv;var pv=9007199254740991;function dv(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=pv}var xo=dv;function hv(t){return t!=null&&xo(t.length)&&!Pt(t)}var ft=hv;function mv(t,e,r){if(!Ye(r))return!1;var n=typeof e;return(n=="number"?ft(r)&&_n(e,r.length):n=="string"&&e in r)?Fr(r[e],t):!1}var In=mv;function gv(t){return go(function(e,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,s&&In(r[0],r[1],s)&&(o=i<3?void 0:o,i=1),e=Object(e);++n<i;){var a=r[n];a&&t(e,a,n,o)}return e})}var Dx=gv;var xv=Object.prototype;function yv(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||xv;return t===r}var Pr=yv;function bv(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Rx=bv;var Ev="[object Arguments]";function Av(t){return ot(t)&&Nt(t)==Ev}var Qf=Av;var Fx=Object.prototype,kv=Fx.hasOwnProperty,wv=Fx.propertyIsEnumerable,Cv=Qf((function(){return arguments})())?Qf:function(t){return ot(t)&&kv.call(t,"callee")&&!wv.call(t,"callee")},On=Cv;function Tv(){return!1}var Nx=Tv;var Mx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Px=Mx&&typeof module=="object"&&module&&!module.nodeType&&module,_v=Px&&Px.exports===Mx,Lx=_v?ct.Buffer:void 0,Sv=Lx?Lx.isBuffer:void 0,Iv=Sv||Nx,rn=Iv;var Ov="[object Arguments]",vv="[object Array]",Dv="[object Boolean]",Rv="[object Date]",Fv="[object Error]",Nv="[object Function]",Pv="[object Map]",Lv="[object Number]",Mv="[object Object]",Bv="[object RegExp]",jv="[object Set]",Uv="[object String]",zv="[object WeakMap]",$v="[object ArrayBuffer]",qv="[object DataView]",Vv="[object Float32Array]",Gv="[object Float64Array]",Wv="[object Int8Array]",Hv="[object Int16Array]",Kv="[object Int32Array]",Yv="[object Uint8Array]",Zv="[object Uint8ClampedArray]",Xv="[object Uint16Array]",Jv="[object Uint32Array]",Ve={};Ve[Vv]=Ve[Gv]=Ve[Wv]=Ve[Hv]=Ve[Kv]=Ve[Yv]=Ve[Zv]=Ve[Xv]=Ve[Jv]=!0;Ve[Ov]=Ve[vv]=Ve[$v]=Ve[Dv]=Ve[qv]=Ve[Rv]=Ve[Fv]=Ve[Nv]=Ve[Pv]=Ve[Lv]=Ve[Mv]=Ve[Bv]=Ve[jv]=Ve[Uv]=Ve[zv]=!1;function Qv(t){return ot(t)&&xo(t.length)&&!!Ve[Nt(t)]}var Bx=Qv;function e0(t){return function(e){return t(e)}}var Lr=e0;var jx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ws=jx&&typeof module=="object"&&module&&!module.nodeType&&module,t0=ws&&ws.exports===jx,ep=t0&&mu.process,r0=(function(){try{var t=ws&&ws.require&&ws.require("util").types;return t||ep&&ep.binding&&ep.binding("util")}catch{}})(),fr=r0;var Ux=fr&&fr.isTypedArray,n0=Ux?Lr(Ux):Bx,yo=n0;var i0=Object.prototype,o0=i0.hasOwnProperty;function s0(t,e){var r=Q(t),n=!r&&On(t),i=!r&&!n&&rn(t),o=!r&&!n&&!i&&yo(t),s=r||n||i||o,a=s?Rx(t.length,String):[],u=a.length;for(var l in t)(e||o0.call(t,l))&&!(s&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||_n(l,u)))&&a.push(l);return a}var Au=s0;function a0(t,e){return function(r){return t(e(r))}}var ku=a0;var u0=ku(Object.keys,Object),zx=u0;var l0=Object.prototype,c0=l0.hasOwnProperty;function f0(t){if(!Pr(t))return zx(t);var e=[];for(var r in Object(t))c0.call(t,r)&&r!="constructor"&&e.push(r);return e}var wu=f0;function p0(t){return ft(t)?Au(t):wu(t)}var Pe=p0;var d0=Object.prototype,h0=d0.hasOwnProperty,m0=Dx(function(t,e){if(Pr(e)||ft(e)){Nr(e,Pe(e),t);return}for(var r in e)h0.call(e,r)&&Sn(t,r,e[r])}),Tt=m0;function g0(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var $x=g0;var x0=Object.prototype,y0=x0.hasOwnProperty;function b0(t){if(!Ye(t))return $x(t);var e=Pr(t),r=[];for(var n in t)n=="constructor"&&(e||!y0.call(t,n))||r.push(n);return r}var qx=b0;function E0(t){return ft(t)?Au(t,!0):qx(t)}var vn=E0;var A0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,k0=/^\w*$/;function w0(t,e){if(Q(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Tn(t)?!0:k0.test(t)||!A0.test(t)||e!=null&&t in Object(e)}var bo=w0;var C0=qt(Object,"create"),nn=C0;function T0(){this.__data__=nn?nn(null):{},this.size=0}var Vx=T0;function _0(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Gx=_0;var S0="__lodash_hash_undefined__",I0=Object.prototype,O0=I0.hasOwnProperty;function v0(t){var e=this.__data__;if(nn){var r=e[t];return r===S0?void 0:r}return O0.call(e,t)?e[t]:void 0}var Wx=v0;var D0=Object.prototype,R0=D0.hasOwnProperty;function F0(t){var e=this.__data__;return nn?e[t]!==void 0:R0.call(e,t)}var Hx=F0;var N0="__lodash_hash_undefined__";function P0(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=nn&&e===void 0?N0:e,this}var Kx=P0;function Eo(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Eo.prototype.clear=Vx;Eo.prototype.delete=Gx;Eo.prototype.get=Wx;Eo.prototype.has=Hx;Eo.prototype.set=Kx;var tp=Eo;function L0(){this.__data__=[],this.size=0}var Yx=L0;function M0(t,e){for(var r=t.length;r--;)if(Fr(t[r][0],e))return r;return-1}var Dn=M0;var B0=Array.prototype,j0=B0.splice;function U0(t){var e=this.__data__,r=Dn(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():j0.call(e,r,1),--this.size,!0}var Zx=U0;function z0(t){var e=this.__data__,r=Dn(e,t);return r<0?void 0:e[r][1]}var Xx=z0;function $0(t){return Dn(this.__data__,t)>-1}var Jx=$0;function q0(t,e){var r=this.__data__,n=Dn(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var Qx=q0;function Ao(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ao.prototype.clear=Yx;Ao.prototype.delete=Zx;Ao.prototype.get=Xx;Ao.prototype.has=Jx;Ao.prototype.set=Qx;var Rn=Ao;var V0=qt(ct,"Map"),Fn=V0;function G0(){this.size=0,this.__data__={hash:new tp,map:new(Fn||Rn),string:new tp}}var ey=G0;function W0(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var ty=W0;function H0(t,e){var r=t.__data__;return ty(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Nn=H0;function K0(t){var e=Nn(this,t).delete(t);return this.size-=e?1:0,e}var ry=K0;function Y0(t){return Nn(this,t).get(t)}var ny=Y0;function Z0(t){return Nn(this,t).has(t)}var iy=Z0;function X0(t,e){var r=Nn(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var oy=X0;function ko(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ko.prototype.clear=ey;ko.prototype.delete=ry;ko.prototype.get=ny;ko.prototype.has=iy;ko.prototype.set=oy;var Oi=ko;var J0="Expected a function";function rp(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(J0);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(rp.Cache||Oi),r}rp.Cache=Oi;var sy=rp;var Q0=500;function e1(t){var e=sy(t,function(n){return r.size===Q0&&r.clear(),n}),r=e.cache;return e}var ay=e1;var t1=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r1=/\\(\\)?/g,n1=ay(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(t1,function(r,n,i,o){e.push(i?o.replace(r1,"$1"):n||r)}),e}),uy=n1;function i1(t){return t==null?"":ux(t)}var ly=i1;function o1(t,e){return Q(t)?t:bo(t,e)?[t]:uy(ly(t))}var Pn=o1;var s1=1/0;function a1(t){if(typeof t=="string"||Tn(t))return t;var e=t+"";return e=="0"&&1/t==-s1?"-0":e}var Mr=a1;function u1(t,e){e=Pn(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[Mr(e[r++])];return r&&r==n?t:void 0}var wo=u1;function l1(t,e,r){var n=t==null?void 0:wo(t,e);return n===void 0?r:n}var cy=l1;function c1(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var Co=c1;var fy=At?At.isConcatSpreadable:void 0;function f1(t){return Q(t)||On(t)||!!(fy&&t&&t[fy])}var py=f1;function dy(t,e,r,n,i){var o=-1,s=t.length;for(r||(r=py),i||(i=[]);++o<s;){var a=t[o];e>0&&r(a)?e>1?dy(a,e-1,r,n,i):Co(i,a):n||(i[i.length]=a)}return i}var To=dy;function p1(t){var e=t==null?0:t.length;return e?To(t,1):[]}var xt=p1;var d1=ku(Object.getPrototypeOf,Object),Cu=d1;function h1(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=Array(i);++n<i;)o[n]=t[n+e];return o}var Tu=h1;function m1(t,e,r,n){var i=-1,o=t==null?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}var hy=m1;function g1(){this.__data__=new Rn,this.size=0}var my=g1;function x1(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var gy=x1;function y1(t){return this.__data__.get(t)}var xy=y1;function b1(t){return this.__data__.has(t)}var yy=b1;var E1=200;function A1(t,e){var r=this.__data__;if(r instanceof Rn){var n=r.__data__;if(!Fn||n.length<E1-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Oi(n)}return r.set(t,e),this.size=r.size,this}var by=A1;function _o(t){var e=this.__data__=new Rn(t);this.size=e.size}_o.prototype.clear=my;_o.prototype.delete=gy;_o.prototype.get=xy;_o.prototype.has=yy;_o.prototype.set=by;var Ln=_o;function k1(t,e){return t&&Nr(e,Pe(e),t)}var Ey=k1;function w1(t,e){return t&&Nr(e,vn(e),t)}var Ay=w1;var Ty=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ky=Ty&&typeof module=="object"&&module&&!module.nodeType&&module,C1=ky&&ky.exports===Ty,wy=C1?ct.Buffer:void 0,Cy=wy?wy.allocUnsafe:void 0;function T1(t,e){if(e)return t.slice();var r=t.length,n=Cy?Cy(r):new t.constructor(r);return t.copy(n),n}var _y=T1;function _1(t,e){for(var r=-1,n=t==null?0:t.length,i=0,o=[];++r<n;){var s=t[r];e(s,r,t)&&(o[i++]=s)}return o}var So=_1;function S1(){return[]}var _u=S1;var I1=Object.prototype,O1=I1.propertyIsEnumerable,Sy=Object.getOwnPropertySymbols,v1=Sy?function(t){return t==null?[]:(t=Object(t),So(Sy(t),function(e){return O1.call(t,e)}))}:_u,Io=v1;function D1(t,e){return Nr(t,Io(t),e)}var Iy=D1;var R1=Object.getOwnPropertySymbols,F1=R1?function(t){for(var e=[];t;)Co(e,Io(t)),t=Cu(t);return e}:_u,Su=F1;function N1(t,e){return Nr(t,Su(t),e)}var Oy=N1;function P1(t,e,r){var n=e(t);return Q(t)?n:Co(n,r(t))}var Iu=P1;function L1(t){return Iu(t,Pe,Io)}var Cs=L1;function M1(t){return Iu(t,vn,Su)}var Ou=M1;var B1=qt(ct,"DataView"),vu=B1;var j1=qt(ct,"Promise"),Du=j1;var U1=qt(ct,"Set"),Mn=U1;var vy="[object Map]",z1="[object Object]",Dy="[object Promise]",Ry="[object Set]",Fy="[object WeakMap]",Ny="[object DataView]",$1=tn(vu),q1=tn(Fn),V1=tn(Du),G1=tn(Mn),W1=tn(xu),vi=Nt;(vu&&vi(new vu(new ArrayBuffer(1)))!=Ny||Fn&&vi(new Fn)!=vy||Du&&vi(Du.resolve())!=Dy||Mn&&vi(new Mn)!=Ry||xu&&vi(new xu)!=Fy)&&(vi=function(t){var e=Nt(t),r=e==z1?t.constructor:void 0,n=r?tn(r):"";if(n)switch(n){case $1:return Ny;case q1:return vy;case V1:return Dy;case G1:return Ry;case W1:return Fy}return e});var gr=vi;var H1=Object.prototype,K1=H1.hasOwnProperty;function Y1(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&K1.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var Py=Y1;var Z1=ct.Uint8Array,Oo=Z1;function X1(t){var e=new t.constructor(t.byteLength);return new Oo(e).set(new Oo(t)),e}var vo=X1;function J1(t,e){var r=e?vo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var Ly=J1;var Q1=/\w*$/;function eD(t){var e=new t.constructor(t.source,Q1.exec(t));return e.lastIndex=t.lastIndex,e}var My=eD;var By=At?At.prototype:void 0,jy=By?By.valueOf:void 0;function tD(t){return jy?Object(jy.call(t)):{}}var Uy=tD;function rD(t,e){var r=e?vo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var zy=rD;var nD="[object Boolean]",iD="[object Date]",oD="[object Map]",sD="[object Number]",aD="[object RegExp]",uD="[object Set]",lD="[object String]",cD="[object Symbol]",fD="[object ArrayBuffer]",pD="[object DataView]",dD="[object Float32Array]",hD="[object Float64Array]",mD="[object Int8Array]",gD="[object Int16Array]",xD="[object Int32Array]",yD="[object Uint8Array]",bD="[object Uint8ClampedArray]",ED="[object Uint16Array]",AD="[object Uint32Array]";function kD(t,e,r){var n=t.constructor;switch(e){case fD:return vo(t);case nD:case iD:return new n(+t);case pD:return Ly(t,r);case dD:case hD:case mD:case gD:case xD:case yD:case bD:case ED:case AD:return zy(t,r);case oD:return new n;case sD:case lD:return new n(t);case aD:return My(t);case uD:return new n;case cD:return Uy(t)}}var $y=kD;function wD(t){return typeof t.constructor=="function"&&!Pr(t)?Ex(Cu(t)):{}}var qy=wD;var CD="[object Map]";function TD(t){return ot(t)&&gr(t)==CD}var Vy=TD;var Gy=fr&&fr.isMap,_D=Gy?Lr(Gy):Vy,Wy=_D;var SD="[object Set]";function ID(t){return ot(t)&&gr(t)==SD}var Hy=ID;var Ky=fr&&fr.isSet,OD=Ky?Lr(Ky):Hy,Yy=OD;var vD=1,DD=2,RD=4,Zy="[object Arguments]",FD="[object Array]",ND="[object Boolean]",PD="[object Date]",LD="[object Error]",Xy="[object Function]",MD="[object GeneratorFunction]",BD="[object Map]",jD="[object Number]",Jy="[object Object]",UD="[object RegExp]",zD="[object Set]",$D="[object String]",qD="[object Symbol]",VD="[object WeakMap]",GD="[object ArrayBuffer]",WD="[object DataView]",HD="[object Float32Array]",KD="[object Float64Array]",YD="[object Int8Array]",ZD="[object Int16Array]",XD="[object Int32Array]",JD="[object Uint8Array]",QD="[object Uint8ClampedArray]",eR="[object Uint16Array]",tR="[object Uint32Array]",Le={};Le[Zy]=Le[FD]=Le[GD]=Le[WD]=Le[ND]=Le[PD]=Le[HD]=Le[KD]=Le[YD]=Le[ZD]=Le[XD]=Le[BD]=Le[jD]=Le[Jy]=Le[UD]=Le[zD]=Le[$D]=Le[qD]=Le[JD]=Le[QD]=Le[eR]=Le[tR]=!0;Le[LD]=Le[Xy]=Le[VD]=!1;function Ru(t,e,r,n,i,o){var s,a=e&vD,u=e&DD,l=e&RD;if(r&&(s=i?r(t,n,i,o):r(t)),s!==void 0)return s;if(!Ye(t))return t;var c=Q(t);if(c){if(s=Py(t),!a)return kx(t,s)}else{var f=gr(t),p=f==Xy||f==MD;if(rn(t))return _y(t,a);if(f==Jy||f==Zy||p&&!i){if(s=u||p?{}:qy(t),!a)return u?Oy(t,Ay(s,t)):Iy(t,Ey(s,t))}else{if(!Le[f])return i?t:{};s=$y(t,f,a)}}o||(o=new Ln);var d=o.get(t);if(d)return d;o.set(t,s),Yy(t)?t.forEach(function(g){s.add(Ru(g,e,r,g,t,o))}):Wy(t)&&t.forEach(function(g,b){s.set(b,Ru(g,e,r,b,t,o))});var m=l?u?Ou:Cs:u?vn:Pe,y=c?void 0:m(t);return yu(y||t,function(g,b){y&&(b=g,g=t[b]),Sn(s,b,Ru(g,e,r,b,t,o))}),s}var Qy=Ru;var rR=4;function nR(t){return Qy(t,rR)}var Me=nR;function iR(t){for(var e=-1,r=t==null?0:t.length,n=0,i=[];++e<r;){var o=t[e];o&&(i[n++]=o)}return i}var Br=iR;var oR="__lodash_hash_undefined__";function sR(t){return this.__data__.set(t,oR),this}var eb=sR;function aR(t){return this.__data__.has(t)}var tb=aR;function Fu(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Oi;++e<r;)this.add(t[e])}Fu.prototype.add=Fu.prototype.push=eb;Fu.prototype.has=tb;var Do=Fu;function uR(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var Nu=uR;function lR(t,e){return t.has(e)}var Ro=lR;var cR=1,fR=2;function pR(t,e,r,n,i,o){var s=r&cR,a=t.length,u=e.length;if(a!=u&&!(s&&u>a))return!1;var l=o.get(t),c=o.get(e);if(l&&c)return l==e&&c==t;var f=-1,p=!0,d=r&fR?new Do:void 0;for(o.set(t,e),o.set(e,t);++f<a;){var m=t[f],y=e[f];if(n)var g=s?n(y,m,f,e,t,o):n(m,y,f,t,e,o);if(g!==void 0){if(g)continue;p=!1;break}if(d){if(!Nu(e,function(b,w){if(!Ro(d,w)&&(m===b||i(m,b,r,n,o)))return d.push(w)})){p=!1;break}}else if(!(m===y||i(m,y,r,n,o))){p=!1;break}}return o.delete(t),o.delete(e),p}var Pu=pR;function dR(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var rb=dR;function hR(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var Fo=hR;var mR=1,gR=2,xR="[object Boolean]",yR="[object Date]",bR="[object Error]",ER="[object Map]",AR="[object Number]",kR="[object RegExp]",wR="[object Set]",CR="[object String]",TR="[object Symbol]",_R="[object ArrayBuffer]",SR="[object DataView]",nb=At?At.prototype:void 0,np=nb?nb.valueOf:void 0;function IR(t,e,r,n,i,o,s){switch(r){case SR:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case _R:return!(t.byteLength!=e.byteLength||!o(new Oo(t),new Oo(e)));case xR:case yR:case AR:return Fr(+t,+e);case bR:return t.name==e.name&&t.message==e.message;case kR:case CR:return t==e+"";case ER:var a=rb;case wR:var u=n&mR;if(a||(a=Fo),t.size!=e.size&&!u)return!1;var l=s.get(t);if(l)return l==e;n|=gR,s.set(t,e);var c=Pu(a(t),a(e),n,i,o,s);return s.delete(t),c;case TR:if(np)return np.call(t)==np.call(e)}return!1}var ib=IR;var OR=1,vR=Object.prototype,DR=vR.hasOwnProperty;function RR(t,e,r,n,i,o){var s=r&OR,a=Cs(t),u=a.length,l=Cs(e),c=l.length;if(u!=c&&!s)return!1;for(var f=u;f--;){var p=a[f];if(!(s?p in e:DR.call(e,p)))return!1}var d=o.get(t),m=o.get(e);if(d&&m)return d==e&&m==t;var y=!0;o.set(t,e),o.set(e,t);for(var g=s;++f<u;){p=a[f];var b=t[p],w=e[p];if(n)var k=s?n(w,b,p,e,t,o):n(b,w,p,t,e,o);if(!(k===void 0?b===w||i(b,w,r,n,o):k)){y=!1;break}g||(g=p=="constructor")}if(y&&!g){var D=t.constructor,R=e.constructor;D!=R&&"constructor"in t&&"constructor"in e&&!(typeof D=="function"&&D instanceof D&&typeof R=="function"&&R instanceof R)&&(y=!1)}return o.delete(t),o.delete(e),y}var ob=RR;var FR=1,sb="[object Arguments]",ab="[object Array]",Lu="[object Object]",NR=Object.prototype,ub=NR.hasOwnProperty;function PR(t,e,r,n,i,o){var s=Q(t),a=Q(e),u=s?ab:gr(t),l=a?ab:gr(e);u=u==sb?Lu:u,l=l==sb?Lu:l;var c=u==Lu,f=l==Lu,p=u==l;if(p&&rn(t)){if(!rn(e))return!1;s=!0,c=!1}if(p&&!c)return o||(o=new Ln),s||yo(t)?Pu(t,e,r,n,i,o):ib(t,e,u,r,n,i,o);if(!(r&FR)){var d=c&&ub.call(t,"__wrapped__"),m=f&&ub.call(e,"__wrapped__");if(d||m){var y=d?t.value():t,g=m?e.value():e;return o||(o=new Ln),i(y,g,r,n,o)}}return p?(o||(o=new Ln),ob(t,e,r,n,i,o)):!1}var lb=PR;function cb(t,e,r,n,i){return t===e?!0:t==null||e==null||!ot(t)&&!ot(e)?t!==t&&e!==e:lb(t,e,r,n,cb,i)}var Mu=cb;var LR=1,MR=2;function BR(t,e,r,n){var i=r.length,o=i,s=!n;if(t==null)return!o;for(t=Object(t);i--;){var a=r[i];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<o;){a=r[i];var u=a[0],l=t[u],c=a[1];if(s&&a[2]){if(l===void 0&&!(u in t))return!1}else{var f=new Ln;if(n)var p=n(l,c,u,t,e,f);if(!(p===void 0?Mu(c,l,LR|MR,n,f):p))return!1}}return!0}var fb=BR;function jR(t){return t===t&&!Ye(t)}var Bu=jR;function UR(t){for(var e=Pe(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,Bu(i)]}return e}var pb=UR;function zR(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var ju=zR;function $R(t){var e=pb(t);return e.length==1&&e[0][2]?ju(e[0][0],e[0][1]):function(r){return r===t||fb(r,t,e)}}var db=$R;function qR(t,e){return t!=null&&e in Object(t)}var hb=qR;function VR(t,e,r){e=Pn(e,t);for(var n=-1,i=e.length,o=!1;++n<i;){var s=Mr(e[n]);if(!(o=t!=null&&r(t,s)))break;t=t[s]}return o||++n!=i?o:(i=t==null?0:t.length,!!i&&xo(i)&&_n(s,i)&&(Q(t)||On(t)))}var Uu=VR;function GR(t,e){return t!=null&&Uu(t,e,hb)}var mb=GR;var WR=1,HR=2;function KR(t,e){return bo(t)&&Bu(e)?ju(Mr(t),e):function(r){var n=cy(r,t);return n===void 0&&n===e?mb(r,t):Mu(e,n,WR|HR)}}var gb=KR;function YR(t){return function(e){return e?.[t]}}var xb=YR;function ZR(t){return function(e){return wo(e,t)}}var yb=ZR;function XR(t){return bo(t)?xb(Mr(t)):yb(t)}var bb=XR;function JR(t){return typeof t=="function"?t:t==null?cr:typeof t=="object"?Q(t)?gb(t[0],t[1]):db(t):bb(t)}var pt=JR;function QR(t,e,r,n){for(var i=-1,o=t==null?0:t.length;++i<o;){var s=t[i];e(n,s,r(s),t)}return n}var Eb=QR;function eF(t){return function(e,r,n){for(var i=-1,o=Object(e),s=n(e),a=s.length;a--;){var u=s[t?a:++i];if(r(o[u],u,o)===!1)break}return e}}var Ab=eF;var tF=Ab(),kb=tF;function rF(t,e){return t&&kb(t,e,Pe)}var wb=rF;function nF(t,e){return function(r,n){if(r==null)return r;if(!ft(r))return t(r,n);for(var i=r.length,o=e?i:-1,s=Object(r);(e?o--:++o<i)&&n(s[o],o,s)!==!1;);return r}}var Cb=nF;var iF=Cb(wb),Vt=iF;function oF(t,e,r,n){return Vt(t,function(i,o,s){e(n,i,r(i),s)}),n}var Tb=oF;function sF(t,e){return function(r,n){var i=Q(r)?Eb:Tb,o=e?e():{};return i(r,t,pt(n,2),o)}}var _b=sF;var Sb=Object.prototype,aF=Sb.hasOwnProperty,uF=go(function(t,e){t=Object(t);var r=-1,n=e.length,i=n>2?e[2]:void 0;for(i&&In(e[0],e[1],i)&&(n=1);++r<n;)for(var o=e[r],s=vn(o),a=-1,u=s.length;++a<u;){var l=s[a],c=t[l];(c===void 0||Fr(c,Sb[l])&&!aF.call(t,l))&&(t[l]=o[l])}return t}),No=uF;function lF(t){return ot(t)&&ft(t)}var ip=lF;function cF(t,e,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}var zu=cF;var fF=200;function pF(t,e,r,n){var i=-1,o=Eu,s=!0,a=t.length,u=[],l=e.length;if(!a)return u;r&&(e=Dr(e,Lr(r))),n?(o=zu,s=!1):e.length>=fF&&(o=Ro,s=!1,e=new Do(e));e:for(;++i<a;){var c=t[i],f=r==null?c:r(c);if(c=n||c!==0?c:0,s&&f===f){for(var p=l;p--;)if(e[p]===f)continue e;u.push(c)}else o(e,f,n)||u.push(c)}return u}var Ib=pF;var dF=go(function(t,e){return ip(t)?Ib(t,To(e,1,ip,!0)):[]}),Bn=dF;function hF(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var jr=hF;function mF(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:Rr(e),Tu(t,e<0?0:e,n)):[]}var st=mF;function gF(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:Rr(e),e=n-e,Tu(t,0,e<0?0:e)):[]}var on=gF;function xF(t){return typeof t=="function"?t:cr}var Ob=xF;function yF(t,e){var r=Q(t)?yu:Vt;return r(t,Ob(e))}var G=yF;function bF(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}var vb=bF;function EF(t,e){var r=!0;return Vt(t,function(n,i,o){return r=!!e(n,i,o),r}),r}var Db=EF;function AF(t,e,r){var n=Q(t)?vb:Db;return r&&In(t,e,r)&&(e=void 0),n(t,pt(e,3))}var Ot=AF;function kF(t,e){var r=[];return Vt(t,function(n,i,o){e(n,i,o)&&r.push(n)}),r}var $u=kF;function wF(t,e){var r=Q(t)?So:$u;return r(t,pt(e,3))}var vt=wF;function CF(t){return function(e,r,n){var i=Object(e);if(!ft(e)){var o=pt(r,3);e=Pe(e),r=function(a){return o(i[a],a,i)}}var s=t(e,r,n);return s>-1?i[o?e[s]:s]:void 0}}var Rb=CF;var TF=Math.max;function _F(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:Rr(r);return i<0&&(i=TF(n+i,0)),bu(t,pt(e,3),i)}var Fb=_F;var SF=Rb(Fb),Ur=SF;function IF(t){return t&&t.length?t[0]:void 0}var kt=IF;function OF(t,e){var r=-1,n=ft(t)?Array(t.length):[];return Vt(t,function(i,o,s){n[++r]=e(i,o,s)}),n}var Nb=OF;function vF(t,e){var r=Q(t)?Dr:Nb;return r(t,pt(e,3))}var V=vF;function DF(t,e){return To(V(t,e),1)}var Lt=DF;var RF=Object.prototype,FF=RF.hasOwnProperty,NF=_b(function(t,e,r){FF.call(t,r)?t[r].push(e):mo(t,r,[e])}),op=NF;var PF=Object.prototype,LF=PF.hasOwnProperty;function MF(t,e){return t!=null&&LF.call(t,e)}var Pb=MF;function BF(t,e){return t!=null&&Uu(t,e,Pb)}var X=BF;var jF="[object String]";function UF(t){return typeof t=="string"||!Q(t)&&ot(t)&&Nt(t)==jF}var yt=UF;function zF(t,e){return Dr(e,function(r){return t[r]})}var Lb=zF;function $F(t){return t==null?[]:Lb(t,Pe(t))}var Re=$F;var qF=Math.max;function VF(t,e,r,n){t=ft(t)?t:Re(t),r=r&&!n?Rr(r):0;var i=t.length;return r<0&&(r=qF(i+r,0)),yt(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&ho(t,e,r)>-1}var We=VF;var GF=Math.max;function WF(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:Rr(r);return i<0&&(i=GF(n+i,0)),ho(t,e,i)}var qu=WF;var HF="[object Map]",KF="[object Set]",YF=Object.prototype,ZF=YF.hasOwnProperty;function XF(t){if(t==null)return!0;if(ft(t)&&(Q(t)||typeof t=="string"||typeof t.splice=="function"||rn(t)||yo(t)||On(t)))return!t.length;var e=gr(t);if(e==HF||e==KF)return!t.size;if(Pr(t))return!wu(t).length;for(var r in t)if(ZF.call(t,r))return!1;return!0}var Te=XF;var JF="[object RegExp]";function QF(t){return ot(t)&&Nt(t)==JF}var Mb=QF;var Bb=fr&&fr.isRegExp,eN=Bb?Lr(Bb):Mb,pr=eN;function tN(t){return t===void 0}var Dt=tN;var rN="Expected a function";function nN(t){if(typeof t!="function")throw new TypeError(rN);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}var jb=nN;function iN(t,e,r,n){if(!Ye(t))return t;e=Pn(e,t);for(var i=-1,o=e.length,s=o-1,a=t;a!=null&&++i<o;){var u=Mr(e[i]),l=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return t;if(i!=s){var c=a[u];l=n?n(c,u,a):void 0,l===void 0&&(l=Ye(c)?c:_n(e[i+1])?[]:{})}Sn(a,u,l),a=a[u]}return t}var Ub=iN;function oN(t,e,r){for(var n=-1,i=e.length,o={};++n<i;){var s=e[n],a=wo(t,s);r(a,s)&&Ub(o,Pn(s,t),a)}return o}var zb=oN;function sN(t,e){if(t==null)return{};var r=Dr(Ou(t),function(n){return[n]});return e=pt(e),zb(t,r,function(n,i){return e(n,i[0])})}var Gt=sN;function aN(t,e,r,n,i){return i(t,function(o,s,a){r=n?(n=!1,o):e(r,o,s,a)}),r}var $b=aN;function uN(t,e,r){var n=Q(t)?hy:$b,i=arguments.length<3;return n(t,pt(e,4),r,i,Vt)}var dt=uN;function lN(t,e){var r=Q(t)?So:$u;return r(t,jb(pt(e,3)))}var jn=lN;function cN(t,e){var r;return Vt(t,function(n,i,o){return r=e(n,i,o),!r}),!!r}var qb=cN;function fN(t,e,r){var n=Q(t)?Nu:qb;return r&&In(t,e,r)&&(e=void 0),n(t,pt(e,3))}var Ts=fN;var pN=1/0,dN=Mn&&1/Fo(new Mn([,-0]))[1]==pN?function(t){return new Mn(t)}:Ze,Vb=dN;var hN=200;function mN(t,e,r){var n=-1,i=Eu,o=t.length,s=!0,a=[],u=a;if(r)s=!1,i=zu;else if(o>=hN){var l=e?null:Vb(t);if(l)return Fo(l);s=!1,i=Ro,u=new Do}else u=e?[]:a;e:for(;++n<o;){var c=t[n],f=e?e(c):c;if(c=r||c!==0?c:0,s&&f===f){for(var p=u.length;p--;)if(u[p]===f)continue e;e&&u.push(f),a.push(c)}else i(u,f,r)||(u!==a&&u.push(f),a.push(c))}return a}var Gb=mN;function gN(t){return t&&t.length?Gb(t):[]}var Po=gN;function Lo(t){console&&console.error&&console.error(`Error: ${t}`)}function _s(t){console&&console.warn&&console.warn(`Warning: ${t}`)}function Ss(t){let e=new Date().getTime(),r=t();return{time:new Date().getTime()-e,value:r}}function Is(t){function e(){}e.prototype=t;let r=new e;function n(){return typeof r.bar}return n(),n(),t;(0,eval)(t)}function xN(t){return yN(t)?t.LABEL:t.name}function yN(t){return yt(t.LABEL)&&t.LABEL!==""}var er=class{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),G(this.definition,r=>{r.accept(e)})}},Be=class extends er{constructor(e){super([]),this.idx=1,Tt(this,Gt(e,r=>r!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}},Mt=class extends er{constructor(e){super(e.definition),this.orgText="",Tt(this,Gt(e,r=>r!==void 0))}},je=class extends er{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Tt(this,Gt(e,r=>r!==void 0))}},Ge=class extends er{constructor(e){super(e.definition),this.idx=1,Tt(this,Gt(e,r=>r!==void 0))}},at=class extends er{constructor(e){super(e.definition),this.idx=1,Tt(this,Gt(e,r=>r!==void 0))}},ut=class extends er{constructor(e){super(e.definition),this.idx=1,Tt(this,Gt(e,r=>r!==void 0))}},De=class extends er{constructor(e){super(e.definition),this.idx=1,Tt(this,Gt(e,r=>r!==void 0))}},et=class extends er{constructor(e){super(e.definition),this.idx=1,Tt(this,Gt(e,r=>r!==void 0))}},tt=class extends er{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Tt(this,Gt(e,r=>r!==void 0))}},ve=class{constructor(e){this.idx=1,Tt(this,Gt(e,r=>r!==void 0))}accept(e){e.visit(this)}};function Vu(t){return V(t,Mo)}function Mo(t){function e(r){return V(r,Mo)}if(t instanceof Be){let r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return yt(t.label)&&(r.label=t.label),r}else{if(t instanceof je)return{type:"Alternative",definition:e(t.definition)};if(t instanceof Ge)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof at)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof ut)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:Mo(new ve({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof et)return{type:"RepetitionWithSeparator",idx:t.idx,separator:Mo(new ve({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof De)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof tt)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof ve){let r={type:"Terminal",name:t.terminalType.name,label:xN(t.terminalType),idx:t.idx};yt(t.label)&&(r.terminalLabel=t.label);let n=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(r.pattern=pr(n)?n.source:n),r}else{if(t instanceof Mt)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}}}var Bt=class{visit(e){let r=e;switch(r.constructor){case Be:return this.visitNonTerminal(r);case je:return this.visitAlternative(r);case Ge:return this.visitOption(r);case at:return this.visitRepetitionMandatory(r);case ut:return this.visitRepetitionMandatoryWithSeparator(r);case et:return this.visitRepetitionWithSeparator(r);case De:return this.visitRepetition(r);case tt:return this.visitAlternation(r);case ve:return this.visitTerminal(r);case Mt:return this.visitRule(r);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}};function sp(t){return t instanceof je||t instanceof Ge||t instanceof De||t instanceof at||t instanceof ut||t instanceof et||t instanceof ve||t instanceof Mt}function Di(t,e=[]){return t instanceof Ge||t instanceof De||t instanceof et?!0:t instanceof tt?Ts(t.definition,n=>Di(n,e)):t instanceof Be&&We(e,t)?!1:t instanceof er?(t instanceof Be&&e.push(t),Ot(t.definition,n=>Di(n,e))):!1}function ap(t){return t instanceof tt}function Wt(t){if(t instanceof Be)return"SUBRULE";if(t instanceof Ge)return"OPTION";if(t instanceof tt)return"OR";if(t instanceof at)return"AT_LEAST_ONE";if(t instanceof ut)return"AT_LEAST_ONE_SEP";if(t instanceof et)return"MANY_SEP";if(t instanceof De)return"MANY";if(t instanceof ve)return"CONSUME";throw Error("non exhaustive match")}var sn=class{walk(e,r=[]){G(e.definition,(n,i)=>{let o=st(e.definition,i+1);if(n instanceof Be)this.walkProdRef(n,o,r);else if(n instanceof ve)this.walkTerminal(n,o,r);else if(n instanceof je)this.walkFlat(n,o,r);else if(n instanceof Ge)this.walkOption(n,o,r);else if(n instanceof at)this.walkAtLeastOne(n,o,r);else if(n instanceof ut)this.walkAtLeastOneSep(n,o,r);else if(n instanceof et)this.walkManySep(n,o,r);else if(n instanceof De)this.walkMany(n,o,r);else if(n instanceof tt)this.walkOr(n,o,r);else throw Error("non exhaustive match")})}walkTerminal(e,r,n){}walkProdRef(e,r,n){}walkFlat(e,r,n){let i=r.concat(n);this.walk(e,i)}walkOption(e,r,n){let i=r.concat(n);this.walk(e,i)}walkAtLeastOne(e,r,n){let i=[new Ge({definition:e.definition})].concat(r,n);this.walk(e,i)}walkAtLeastOneSep(e,r,n){let i=Wb(e,r,n);this.walk(e,i)}walkMany(e,r,n){let i=[new Ge({definition:e.definition})].concat(r,n);this.walk(e,i)}walkManySep(e,r,n){let i=Wb(e,r,n);this.walk(e,i)}walkOr(e,r,n){let i=r.concat(n);G(e.definition,o=>{let s=new je({definition:[o]});this.walk(s,i)})}};function Wb(t,e,r){return[new Ge({definition:[new ve({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}function Ri(t){if(t instanceof Be)return Ri(t.referencedRule);if(t instanceof ve)return AN(t);if(sp(t))return bN(t);if(ap(t))return EN(t);throw Error("non exhaustive match")}function bN(t){let e=[],r=t.definition,n=0,i=r.length>n,o,s=!0;for(;i&&s;)o=r[n],s=Di(o),e=e.concat(Ri(o)),n=n+1,i=r.length>n;return Po(e)}function EN(t){let e=V(t.definition,r=>Ri(r));return Po(xt(e))}function AN(t){return[t.terminalType]}var Gu="_~IN~_";var up=class extends sn{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,r,n){}walkProdRef(e,r,n){let i=kN(e.referencedRule,e.idx)+this.topProd.name,o=r.concat(n),s=new je({definition:o}),a=Ri(s);this.follows[i]=a}};function Hb(t){let e={};return G(t,r=>{let n=new up(r).startWalking();Tt(e,n)}),e}function kN(t,e){return t.name+e+Gu}function le(t){return t.charCodeAt(0)}function Wu(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}function Bo(t,e){if(t[e]===!0)throw"duplicate flag "+e;let r=t[e];t[e]=!0}function Fi(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function Os(){throw Error("Internal Error - Should never get here!")}function lp(t){return t.type==="Character"}var vs=[];for(let t=le("0");t<=le("9");t++)vs.push(t);var Ds=[le("_")].concat(vs);for(let t=le("a");t<=le("z");t++)Ds.push(t);for(let t=le("A");t<=le("Z");t++)Ds.push(t);var cp=[le(" "),le("\f"),le(`
115
+ `),le("\r"),le(" "),le("\v"),le(" "),le("\xA0"),le("\u1680"),le("\u2000"),le("\u2001"),le("\u2002"),le("\u2003"),le("\u2004"),le("\u2005"),le("\u2006"),le("\u2007"),le("\u2008"),le("\u2009"),le("\u200A"),le("\u2028"),le("\u2029"),le("\u202F"),le("\u205F"),le("\u3000"),le("\uFEFF")];var wN=/[0-9a-fA-F]/,Hu=/[0-9]/,CN=/[1-9]/,Rs=class{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");let r=this.disjunction();this.consumeChar("/");let n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Bo(n,"global");break;case"i":Bo(n,"ignoreCase");break;case"m":Bo(n,"multiLine");break;case"u":Bo(n,"unicode");break;case"y":Bo(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:r,loc:this.loc(0)}}disjunction(){let e=[],r=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(r)}}alternative(){let e=[],r=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break}Fi(r);let n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(e)}}return Os()}quantifier(e=!1){let r,n=this.idx;switch(this.popChar()){case"*":r={atLeast:0,atMost:1/0};break;case"+":r={atLeast:1,atMost:1/0};break;case"?":r={atLeast:0,atMost:1};break;case"{":let i=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:i,atMost:i};break;case",":let o;this.isDigit()?(o=this.integerIncludingZero(),r={atLeast:i,atMost:o}):r={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&r===void 0)return;Fi(r);break}if(!(e===!0&&r===void 0)&&Fi(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let e,r=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),Fi(e)?(e.loc=this.loc(r),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):Os()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[le(`
116
+ `),le("\r"),le("\u2028"),le("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,r=!1;switch(this.popChar()){case"d":e=vs;break;case"D":e=vs,r=!0;break;case"s":e=cp;break;case"S":e=cp,r=!0;break;case"w":e=Ds;break;case"W":e=Ds,r=!0;break}return Fi(e)?{type:"Set",value:e,complement:r}:Os()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=le("\f");break;case"n":e=le(`
117
+ `);break;case"r":e=le("\r");break;case"t":e=le(" ");break;case"v":e=le("\v");break}return Fi(e)?{type:"Character",value:e}:Os()}controlLetterEscapeAtom(){this.consumeChar("c");let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:le("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let e=this.popChar();return{type:"Character",value:le(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
118
+ `:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let e=this.popChar();return{type:"Character",value:le(e)}}}characterClass(){let e=[],r=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),r=!0);this.isClassAtom();){let n=this.classAtom(),i=n.type==="Character";if(lp(n)&&this.isRangeDash()){this.consumeChar("-");let o=this.classAtom(),s=o.type==="Character";if(lp(o)){if(o.value<n.value)throw Error("Range out of order in character class");e.push({from:n.value,to:o.value})}else Wu(n.value,e),e.push(le("-")),Wu(o.value,e)}else Wu(n.value,e)}return this.consumeChar("]"),{type:"Set",complement:r,value:e}}classAtom(){switch(this.peekChar()){case"]":case`
119
+ `:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:le("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),e=!1;break;default:this.groupIdx++;break}let r=this.disjunction();this.consumeChar(")");let n={type:"Group",capturing:e,value:r};return e&&(n.idx=this.groupIdx),n}positiveInteger(){let e=this.popChar();if(CN.test(e)===!1)throw Error("Expecting a positive integer");for(;Hu.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(Hu.test(e)===!1)throw Error("Expecting an integer");for(;Hu.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){let e=this.popChar();switch(e){case`
120
+ `:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:le(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return this.peekChar()==="-"&&this.isClassAtom(1)}isDigit(){return Hu.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case`
125
121
  `:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return this.peekChar(1)==="?"&&(this.peekChar(2)==="="||this.peekChar(2)==="!");default:return!1}}isQuantifier(){let e=this.saveState();try{return this.quantifier(!0)!==void 0}catch{return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case`
126
- `:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let r="";for(let i=0;i<e;i++){let o=this.popChar();if(eP.test(o)===!1)throw Error("Expecting a HexDecimal digits");r+=o}return{type:"Character",value:parseInt(r,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){let e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(e!==void 0&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}};var $n=class{visitChildren(e){for(let r in e){let n=e[r];e.hasOwnProperty(r)&&(n.type!==void 0?this.visit(n):Array.isArray(n)&&n.forEach(i=>{this.visit(i)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}};var Ju={},rP=new Bs;function qo(t){let e=t.toString();if(Ju.hasOwnProperty(e))return Ju[e];{let r=rP.pattern(e);return Ju[e]=r,r}}function mE(){Ju={}}var xE="Complement Sets are not supported for first char optimization",js=`Unable to use "first char" lexer optimizations:
127
- `;function yE(t,e=!1){try{let r=qo(t);return Ap(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===xE)e&&Rs(`${js} Unable to optimize: < ${t.toString()} >
122
+ `:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let r="";for(let i=0;i<e;i++){let o=this.popChar();if(wN.test(o)===!1)throw Error("Expecting a HexDecimal digits");r+=o}return{type:"Character",value:parseInt(r,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){let e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(e!==void 0&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}};var Un=class{visitChildren(e){for(let r in e){let n=e[r];e.hasOwnProperty(r)&&(n.type!==void 0?this.visit(n):Array.isArray(n)&&n.forEach(i=>{this.visit(i)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}};var Ku={},TN=new Rs;function jo(t){let e=t.toString();if(Ku.hasOwnProperty(e))return Ku[e];{let r=TN.pattern(e);return Ku[e]=r,r}}function Kb(){Ku={}}var Zb="Complement Sets are not supported for first char optimization",Fs=`Unable to use "first char" lexer optimizations:
123
+ `;function Xb(t,e=!1){try{let r=jo(t);return fp(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===Zb)e&&_s(`${Fs} Unable to optimize: < ${t.toString()} >
128
124
  Complement Sets cannot be automatically optimized.
129
125
  This will disable the lexer's first char optimizations.
130
126
  See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";e&&(n=`
131
127
  This will disable the lexer's first char optimizations.
132
- See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),Uo(`${js}
128
+ See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),Lo(`${Fs}
133
129
  Failed parsing: < ${t.toString()} >
134
130
  Using the @chevrotain/regexp-to-ast library
135
- Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function Ap(t,e,r){switch(t.type){case"Disjunction":for(let i=0;i<t.value.length;i++)Ap(t.value[i],e,r);break;case"Alternative":let n=t.value;for(let i=0;i<n.length;i++){let o=n[i];switch(o.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}let s=o;switch(s.type){case"Character":Qu(s.value,e,r);break;case"Set":if(s.complement===!0)throw Error(xE);G(s.value,u=>{if(typeof u=="number")Qu(u,e,r);else{let l=u;if(r===!0)for(let c=l.from;c<=l.to;c++)Qu(c,e,r);else{for(let c=l.from;c<=l.to&&c<Vo;c++)Qu(c,e,r);if(l.to>=Vo){let c=l.from>=Vo?l.from:Vo,f=l.to,p=Gr(c),d=Gr(f);for(let m=p;m<=d;m++)e[m]=m}}}});break;case"Group":Ap(s.value,e,r);break;default:throw Error("Non Exhaustive Match")}let a=s.quantifier!==void 0&&s.quantifier.atLeast===0;if(s.type==="Group"&&Cp(s)===!1||s.type!=="Group"&&a===!1)break}break;default:throw Error("non exhaustive match!")}return Re(e)}function Qu(t,e,r){let n=Gr(t);e[n]=n,r===!0&&nP(t,e)}function nP(t,e){let r=String.fromCharCode(t),n=r.toUpperCase();if(n!==r){let i=Gr(n.charCodeAt(0));e[i]=i}else{let i=r.toLowerCase();if(i!==r){let o=Gr(i.charCodeAt(0));e[o]=o}}}function gE(t,e){return Vr(t.value,r=>{if(typeof r=="number")return He(e,r);{let n=r;return Vr(e,i=>n.from<=i&&i<=n.to)!==void 0}})}function Cp(t){let e=t.quantifier;return e&&e.atLeast===0?!0:t.value?J(t.value)?Dt(t.value,Cp):Cp(t.value):!1}var wp=class extends $n{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return}super.visitChildren(e)}}visitCharacter(e){He(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?gE(e,this.targetCharCodes)===void 0&&(this.found=!0):gE(e,this.targetCharCodes)!==void 0&&(this.found=!0)}};function el(t,e){if(e instanceof RegExp){let r=qo(e),n=new wp(t);return n.visit(r),n.found}else return Vr(e,r=>He(t,r.charCodeAt(0)))!==void 0}var Li="PATTERN",Go="defaultMode",tl="modes",Tp=typeof new RegExp("(?:)").sticky=="boolean";function AE(t,e){e=Bo(e,{useSticky:Tp,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
136
- `],tracer:(w,C)=>C()});let r=e.tracer;r("initCharCodeToOptimizedIndexMap",()=>{AP()});let n;r("Reject Lexer.NA",()=>{n=zn(t,w=>w[Li]===Se.NA)});let i=!1,o;r("Transform Patterns",()=>{i=!1,o=q(n,w=>{let C=w[Li];if(gr(C)){let D=C.source;return D.length===1&&D!=="^"&&D!=="$"&&D!=="."&&!C.ignoreCase?D:D.length===2&&D[0]==="\\"&&!He(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],D[1])?D[1]:e.useSticky?EE(C):bE(C)}else{if(Bt(C))return i=!0,{exec:C};if(typeof C=="object")return i=!0,C;if(typeof C=="string"){if(C.length===1)return C;{let D=C.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),R=new RegExp(D);return e.useSticky?EE(R):bE(R)}}else throw Error("non exhaustive match")}})});let s,a,u,l,c;r("misc mapping",()=>{s=q(n,w=>w.tokenTypeIdx),a=q(n,w=>{let C=w.GROUP;if(C!==Se.SKIPPED){if(Et(C))return C;if(Ft(C))return!1;throw Error("non exhaustive match")}}),u=q(n,w=>{let C=w.LONGER_ALT;if(C)return J(C)?q(C,R=>Hu(n,R)):[Hu(n,C)]}),l=q(n,w=>w.PUSH_MODE),c=q(n,w=>Z(w,"POP_MODE"))});let f;r("Line Terminator Handling",()=>{let w=IE(e.lineTerminatorCharacters);f=q(n,C=>!1),e.positionTracking!=="onlyOffset"&&(f=q(n,C=>Z(C,"LINE_BREAKS")?!!C.LINE_BREAKS:vE(C,w)===!1&&el(w,C.PATTERN)))});let p,d,m,y;r("Misc Mapping #2",()=>{p=q(n,_E),d=q(o,bP),m=mt(n,(w,C)=>{let D=C.GROUP;return Et(D)&&D!==Se.SKIPPED&&(w[D]=[]),w},{}),y=q(o,(w,C)=>({pattern:o[C],longerAlt:u[C],canLineTerminator:f[C],isCustom:p[C],short:d[C],group:a[C],push:l[C],pop:c[C],tokenTypeIdx:s[C],tokenType:n[C]}))});let g=!0,b=[];return e.safeMode||r("First Char Optimization",()=>{b=mt(n,(w,C,D)=>{if(typeof C.PATTERN=="string"){let R=C.PATTERN.charCodeAt(0),S=Gr(R);kp(w,S,y[D])}else if(J(C.START_CHARS_HINT)){let R;G(C.START_CHARS_HINT,S=>{let de=typeof S=="string"?S.charCodeAt(0):S,ye=Gr(de);R!==ye&&(R=ye,kp(w,ye,y[D]))})}else if(gr(C.PATTERN))if(C.PATTERN.unicode)g=!1,e.ensureOptimizations&&Uo(`${js} Unable to analyze < ${C.PATTERN.toString()} > pattern.
131
+ Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function fp(t,e,r){switch(t.type){case"Disjunction":for(let i=0;i<t.value.length;i++)fp(t.value[i],e,r);break;case"Alternative":let n=t.value;for(let i=0;i<n.length;i++){let o=n[i];switch(o.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}let s=o;switch(s.type){case"Character":Yu(s.value,e,r);break;case"Set":if(s.complement===!0)throw Error(Zb);G(s.value,u=>{if(typeof u=="number")Yu(u,e,r);else{let l=u;if(r===!0)for(let c=l.from;c<=l.to;c++)Yu(c,e,r);else{for(let c=l.from;c<=l.to&&c<Uo;c++)Yu(c,e,r);if(l.to>=Uo){let c=l.from>=Uo?l.from:Uo,f=l.to,p=zr(c),d=zr(f);for(let m=p;m<=d;m++)e[m]=m}}}});break;case"Group":fp(s.value,e,r);break;default:throw Error("Non Exhaustive Match")}let a=s.quantifier!==void 0&&s.quantifier.atLeast===0;if(s.type==="Group"&&pp(s)===!1||s.type!=="Group"&&a===!1)break}break;default:throw Error("non exhaustive match!")}return Re(e)}function Yu(t,e,r){let n=zr(t);e[n]=n,r===!0&&_N(t,e)}function _N(t,e){let r=String.fromCharCode(t),n=r.toUpperCase();if(n!==r){let i=zr(n.charCodeAt(0));e[i]=i}else{let i=r.toLowerCase();if(i!==r){let o=zr(i.charCodeAt(0));e[o]=o}}}function Yb(t,e){return Ur(t.value,r=>{if(typeof r=="number")return We(e,r);{let n=r;return Ur(e,i=>n.from<=i&&i<=n.to)!==void 0}})}function pp(t){let e=t.quantifier;return e&&e.atLeast===0?!0:t.value?Q(t.value)?Ot(t.value,pp):pp(t.value):!1}var dp=class extends Un{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return}super.visitChildren(e)}}visitCharacter(e){We(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?Yb(e,this.targetCharCodes)===void 0&&(this.found=!0):Yb(e,this.targetCharCodes)!==void 0&&(this.found=!0)}};function Zu(t,e){if(e instanceof RegExp){let r=jo(e),n=new dp(t);return n.visit(r),n.found}else return Ur(e,r=>We(t,r.charCodeAt(0)))!==void 0}var Ni="PATTERN",zo="defaultMode",Xu="modes",mp=typeof new RegExp("(?:)").sticky=="boolean";function eE(t,e){e=No(e,{useSticky:mp,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
132
+ `],tracer:(w,k)=>k()});let r=e.tracer;r("initCharCodeToOptimizedIndexMap",()=>{VN()});let n;r("Reject Lexer.NA",()=>{n=jn(t,w=>w[Ni]===Ie.NA)});let i=!1,o;r("Transform Patterns",()=>{i=!1,o=V(n,w=>{let k=w[Ni];if(pr(k)){let D=k.source;return D.length===1&&D!=="^"&&D!=="$"&&D!=="."&&!k.ignoreCase?D:D.length===2&&D[0]==="\\"&&!We(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],D[1])?D[1]:e.useSticky?Qb(k):Jb(k)}else{if(Pt(k))return i=!0,{exec:k};if(typeof k=="object")return i=!0,k;if(typeof k=="string"){if(k.length===1)return k;{let D=k.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),R=new RegExp(D);return e.useSticky?Qb(R):Jb(R)}}else throw Error("non exhaustive match")}})});let s,a,u,l,c;r("misc mapping",()=>{s=V(n,w=>w.tokenTypeIdx),a=V(n,w=>{let k=w.GROUP;if(k!==Ie.SKIPPED){if(yt(k))return k;if(Dt(k))return!1;throw Error("non exhaustive match")}}),u=V(n,w=>{let k=w.LONGER_ALT;if(k)return Q(k)?V(k,R=>qu(n,R)):[qu(n,k)]}),l=V(n,w=>w.PUSH_MODE),c=V(n,w=>X(w,"POP_MODE"))});let f;r("Line Terminator Handling",()=>{let w=uE(e.lineTerminatorCharacters);f=V(n,k=>!1),e.positionTracking!=="onlyOffset"&&(f=V(n,k=>X(k,"LINE_BREAKS")?!!k.LINE_BREAKS:aE(k,w)===!1&&Zu(w,k.PATTERN)))});let p,d,m,y;r("Misc Mapping #2",()=>{p=V(n,oE),d=V(o,$N),m=dt(n,(w,k)=>{let D=k.GROUP;return yt(D)&&D!==Ie.SKIPPED&&(w[D]=[]),w},{}),y=V(o,(w,k)=>({pattern:o[k],longerAlt:u[k],canLineTerminator:f[k],isCustom:p[k],short:d[k],group:a[k],push:l[k],pop:c[k],tokenTypeIdx:s[k],tokenType:n[k]}))});let g=!0,b=[];return e.safeMode||r("First Char Optimization",()=>{b=dt(n,(w,k,D)=>{if(typeof k.PATTERN=="string"){let R=k.PATTERN.charCodeAt(0),S=zr(R);hp(w,S,y[D])}else if(Q(k.START_CHARS_HINT)){let R;G(k.START_CHARS_HINT,S=>{let de=typeof S=="string"?S.charCodeAt(0):S,ye=zr(de);R!==ye&&(R=ye,hp(w,ye,y[D]))})}else if(pr(k.PATTERN))if(k.PATTERN.unicode)g=!1,e.ensureOptimizations&&Lo(`${Fs} Unable to analyze < ${k.PATTERN.toString()} > pattern.
137
133
  The regexp unicode flag is not currently supported by the regexp-to-ast library.
138
134
  This will disable the lexer's first char optimizations.
139
- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let R=yE(C.PATTERN,e.ensureOptimizations);Te(R)&&(g=!1),G(R,S=>{kp(w,S,y[D])})}else e.ensureOptimizations&&Uo(`${js} TokenType: <${C.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
135
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let R=Xb(k.PATTERN,e.ensureOptimizations);Te(R)&&(g=!1),G(R,S=>{hp(w,S,y[D])})}else e.ensureOptimizations&&Lo(`${Fs} TokenType: <${k.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
140
136
  This will disable the lexer's first char optimizations.
141
- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),g=!1;return w},[])}),{emptyGroups:m,patternIdxToConfig:y,charCodeToPatternIdxToConfig:b,hasCustom:i,canBeOptimized:g}}function CE(t,e){let r=[],n=oP(t);r=r.concat(n.errors);let i=sP(n.valid),o=i.valid;return r=r.concat(i.errors),r=r.concat(iP(o)),r=r.concat(hP(o)),r=r.concat(mP(o,e)),r=r.concat(gP(o)),r}function iP(t){let e=[],r=Rt(t,n=>gr(n[Li]));return e=e.concat(uP(r)),e=e.concat(fP(r)),e=e.concat(pP(r)),e=e.concat(dP(r)),e=e.concat(lP(r)),e}function oP(t){let e=Rt(t,i=>!Z(i,Li)),r=q(e,i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:Ke.MISSING_PATTERN,tokenTypes:[i]})),n=Un(t,e);return{errors:r,valid:n}}function sP(t){let e=Rt(t,i=>{let o=i[Li];return!gr(o)&&!Bt(o)&&!Z(o,"exec")&&!Et(o)}),r=q(e,i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Ke.INVALID_PATTERN,tokenTypes:[i]})),n=Un(t,e);return{errors:r,valid:n}}var aP=/[^\\][$]/;function uP(t){class e extends $n{constructor(){super(...arguments),this.found=!1}visitEndAnchor(o){this.found=!0}}let r=Rt(t,i=>{let o=i.PATTERN;try{let s=qo(o),a=new e;return a.visit(s),a.found}catch{return aP.test(o.source)}});return q(r,i=>({message:`Unexpected RegExp Anchor Error:
137
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),g=!1;return w},[])}),{emptyGroups:m,patternIdxToConfig:y,charCodeToPatternIdxToConfig:b,hasCustom:i,canBeOptimized:g}}function tE(t,e){let r=[],n=IN(t);r=r.concat(n.errors);let i=ON(n.valid),o=i.valid;return r=r.concat(i.errors),r=r.concat(SN(o)),r=r.concat(MN(o)),r=r.concat(BN(o,e)),r=r.concat(jN(o)),r}function SN(t){let e=[],r=vt(t,n=>pr(n[Ni]));return e=e.concat(DN(r)),e=e.concat(NN(r)),e=e.concat(PN(r)),e=e.concat(LN(r)),e=e.concat(RN(r)),e}function IN(t){let e=vt(t,i=>!X(i,Ni)),r=V(e,i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:He.MISSING_PATTERN,tokenTypes:[i]})),n=Bn(t,e);return{errors:r,valid:n}}function ON(t){let e=vt(t,i=>{let o=i[Ni];return!pr(o)&&!Pt(o)&&!X(o,"exec")&&!yt(o)}),r=V(e,i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:He.INVALID_PATTERN,tokenTypes:[i]})),n=Bn(t,e);return{errors:r,valid:n}}var vN=/[^\\][$]/;function DN(t){class e extends Un{constructor(){super(...arguments),this.found=!1}visitEndAnchor(o){this.found=!0}}let r=vt(t,i=>{let o=i.PATTERN;try{let s=jo(o),a=new e;return a.visit(s),a.found}catch{return vN.test(o.source)}});return V(r,i=>({message:`Unexpected RegExp Anchor Error:
142
138
  Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
143
- See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Ke.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function lP(t){let e=Rt(t,n=>n.PATTERN.test(""));return q(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:Ke.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}var cP=/[^\\[][\^]|^\^/;function fP(t){class e extends $n{constructor(){super(...arguments),this.found=!1}visitStartAnchor(o){this.found=!0}}let r=Rt(t,i=>{let o=i.PATTERN;try{let s=qo(o),a=new e;return a.visit(s),a.found}catch{return cP.test(o.source)}});return q(r,i=>({message:`Unexpected RegExp Anchor Error:
139
+ See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:He.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function RN(t){let e=vt(t,n=>n.PATTERN.test(""));return V(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:He.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}var FN=/[^\\[][\^]|^\^/;function NN(t){class e extends Un{constructor(){super(...arguments),this.found=!1}visitStartAnchor(o){this.found=!0}}let r=vt(t,i=>{let o=i.PATTERN;try{let s=jo(o),a=new e;return a.visit(s),a.found}catch{return FN.test(o.source)}});return V(r,i=>({message:`Unexpected RegExp Anchor Error:
144
140
  Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
145
- See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Ke.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function pP(t){let e=Rt(t,n=>{let i=n[Li];return i instanceof RegExp&&(i.multiline||i.global)});return q(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Ke.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}function dP(t){let e=[],r=q(t,o=>mt(t,(s,a)=>(o.PATTERN.source===a.PATTERN.source&&!He(e,a)&&a.PATTERN!==Se.NA&&(e.push(a),s.push(a)),s),[]));r=$r(r);let n=Rt(r,o=>o.length>1);return q(n,o=>{let s=q(o,u=>u.name);return{message:`The same RegExp pattern ->${kt(o).PATTERN}<-has been used in all of the following Token Types: ${s.join(", ")} <-`,type:Ke.DUPLICATE_PATTERNS_FOUND,tokenTypes:o}})}function hP(t){let e=Rt(t,n=>{if(!Z(n,"GROUP"))return!1;let i=n.GROUP;return i!==Se.SKIPPED&&i!==Se.NA&&!Et(i)});return q(e,n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Ke.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}function mP(t,e){let r=Rt(t,i=>i.PUSH_MODE!==void 0&&!He(e,i.PUSH_MODE));return q(r,i=>({message:`Token Type: ->${i.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${i.PUSH_MODE}<-which does not exist`,type:Ke.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function gP(t){let e=[],r=mt(t,(n,i,o)=>{let s=i.PATTERN;return s===Se.NA||(Et(s)?n.push({str:s,idx:o,tokenType:i}):gr(s)&&yP(s)&&n.push({str:s.source,idx:o,tokenType:i})),n},[]);return G(t,(n,i)=>{G(r,({str:o,idx:s,tokenType:a})=>{if(i<s&&xP(o,n.PATTERN)){let u=`Token: ->${a.name}<- can never be matched.
141
+ See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:He.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function PN(t){let e=vt(t,n=>{let i=n[Ni];return i instanceof RegExp&&(i.multiline||i.global)});return V(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:He.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}function LN(t){let e=[],r=V(t,o=>dt(t,(s,a)=>(o.PATTERN.source===a.PATTERN.source&&!We(e,a)&&a.PATTERN!==Ie.NA&&(e.push(a),s.push(a)),s),[]));r=Br(r);let n=vt(r,o=>o.length>1);return V(n,o=>{let s=V(o,u=>u.name);return{message:`The same RegExp pattern ->${kt(o).PATTERN}<-has been used in all of the following Token Types: ${s.join(", ")} <-`,type:He.DUPLICATE_PATTERNS_FOUND,tokenTypes:o}})}function MN(t){let e=vt(t,n=>{if(!X(n,"GROUP"))return!1;let i=n.GROUP;return i!==Ie.SKIPPED&&i!==Ie.NA&&!yt(i)});return V(e,n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:He.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}function BN(t,e){let r=vt(t,i=>i.PUSH_MODE!==void 0&&!We(e,i.PUSH_MODE));return V(r,i=>({message:`Token Type: ->${i.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${i.PUSH_MODE}<-which does not exist`,type:He.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function jN(t){let e=[],r=dt(t,(n,i,o)=>{let s=i.PATTERN;return s===Ie.NA||(yt(s)?n.push({str:s,idx:o,tokenType:i}):pr(s)&&zN(s)&&n.push({str:s.source,idx:o,tokenType:i})),n},[]);return G(t,(n,i)=>{G(r,({str:o,idx:s,tokenType:a})=>{if(i<s&&UN(o,n.PATTERN)){let u=`Token: ->${a.name}<- can never be matched.
146
142
  Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition.
147
- See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:u,type:Ke.UNREACHABLE_PATTERN,tokenTypes:[n,a]})}})}),e}function xP(t,e){if(gr(e)){let r=e.exec(t);return r!==null&&r.index===0}else{if(Bt(e))return e(t,0,[],{});if(Z(e,"exec"))return e.exec(t,0,[],{});if(typeof e=="string")return e===t;throw Error("non exhaustive match")}}function yP(t){return Vr([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>t.source.indexOf(r)!==-1)===void 0}function bE(t){let e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function EE(t){let e=t.ignoreCase?"iy":"y";return new RegExp(`${t.source}`,e)}function wE(t,e,r){let n=[];return Z(t,Go)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Go+`> property in its definition
148
- `,type:Ke.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Z(t,tl)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+tl+`> property in its definition
149
- `,type:Ke.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Z(t,tl)&&Z(t,Go)&&!Z(t.modes,t.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${Go}: <${t.defaultMode}>which does not exist
150
- `,type:Ke.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Z(t,tl)&&G(t.modes,(i,o)=>{G(i,(s,a)=>{if(Ft(s))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${o}> at index: <${a}>
151
- `,type:Ke.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(Z(s,"LONGER_ALT")){let u=J(s.LONGER_ALT)?s.LONGER_ALT:[s.LONGER_ALT];G(u,l=>{!Ft(l)&&!He(i,l)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${l.name}> on token <${s.name}> outside of mode <${o}>
152
- `,type:Ke.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}function kE(t,e,r){let n=[],i=!1,o=$r(bt(Re(t.modes))),s=zn(o,u=>u[Li]===Se.NA),a=IE(r);return e&&G(s,u=>{let l=vE(u,a);if(l!==!1){let f={message:EP(u,l),type:l.issue,tokenType:u};n.push(f)}else Z(u,"LINE_BREAKS")?u.LINE_BREAKS===!0&&(i=!0):el(a,u.PATTERN)&&(i=!0)}),e&&!i&&n.push({message:`Warning: No LINE_BREAKS Found.
143
+ See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:u,type:He.UNREACHABLE_PATTERN,tokenTypes:[n,a]})}})}),e}function UN(t,e){if(pr(e)){let r=e.exec(t);return r!==null&&r.index===0}else{if(Pt(e))return e(t,0,[],{});if(X(e,"exec"))return e.exec(t,0,[],{});if(typeof e=="string")return e===t;throw Error("non exhaustive match")}}function zN(t){return Ur([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>t.source.indexOf(r)!==-1)===void 0}function Jb(t){let e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function Qb(t){let e=t.ignoreCase?"iy":"y";return new RegExp(`${t.source}`,e)}function rE(t,e,r){let n=[];return X(t,zo)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+zo+`> property in its definition
144
+ `,type:He.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),X(t,Xu)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Xu+`> property in its definition
145
+ `,type:He.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),X(t,Xu)&&X(t,zo)&&!X(t.modes,t.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${zo}: <${t.defaultMode}>which does not exist
146
+ `,type:He.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),X(t,Xu)&&G(t.modes,(i,o)=>{G(i,(s,a)=>{if(Dt(s))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${o}> at index: <${a}>
147
+ `,type:He.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(X(s,"LONGER_ALT")){let u=Q(s.LONGER_ALT)?s.LONGER_ALT:[s.LONGER_ALT];G(u,l=>{!Dt(l)&&!We(i,l)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${l.name}> on token <${s.name}> outside of mode <${o}>
148
+ `,type:He.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}function nE(t,e,r){let n=[],i=!1,o=Br(xt(Re(t.modes))),s=jn(o,u=>u[Ni]===Ie.NA),a=uE(r);return e&&G(s,u=>{let l=aE(u,a);if(l!==!1){let f={message:qN(u,l),type:l.issue,tokenType:u};n.push(f)}else X(u,"LINE_BREAKS")?u.LINE_BREAKS===!0&&(i=!0):Zu(a,u.PATTERN)&&(i=!0)}),e&&!i&&n.push({message:`Warning: No LINE_BREAKS Found.
153
149
  This Lexer has been defined to track line and column information,
154
150
  But none of the Token Types can be identified as matching a line terminator.
155
151
  See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
156
- for details.`,type:Ke.NO_LINE_BREAKS_FLAGS}),n}function TE(t){let e={},r=Pe(t);return G(r,n=>{let i=t[n];if(J(i))e[n]=[];else throw Error("non exhaustive match")}),e}function _E(t){let e=t.PATTERN;if(gr(e))return!1;if(Bt(e))return!0;if(Z(e,"exec"))return!0;if(Et(e))return!1;throw Error("non exhaustive match")}function bP(t){return Et(t)&&t.length===1?t.charCodeAt(0):!1}var SE={test:function(t){let e=t.length;for(let r=this.lastIndex;r<e;r++){let n=t.charCodeAt(r);if(n===10)return this.lastIndex=r+1,!0;if(n===13)return t.charCodeAt(r+1)===10?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},lastIndex:0};function vE(t,e){if(Z(t,"LINE_BREAKS"))return!1;if(gr(t.PATTERN)){try{el(e,t.PATTERN)}catch(r){return{issue:Ke.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(Et(t.PATTERN))return!1;if(_E(t))return{issue:Ke.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function EP(t,e){if(e.issue===Ke.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
152
+ for details.`,type:He.NO_LINE_BREAKS_FLAGS}),n}function iE(t){let e={},r=Pe(t);return G(r,n=>{let i=t[n];if(Q(i))e[n]=[];else throw Error("non exhaustive match")}),e}function oE(t){let e=t.PATTERN;if(pr(e))return!1;if(Pt(e))return!0;if(X(e,"exec"))return!0;if(yt(e))return!1;throw Error("non exhaustive match")}function $N(t){return yt(t)&&t.length===1?t.charCodeAt(0):!1}var sE={test:function(t){let e=t.length;for(let r=this.lastIndex;r<e;r++){let n=t.charCodeAt(r);if(n===10)return this.lastIndex=r+1,!0;if(n===13)return t.charCodeAt(r+1)===10?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},lastIndex:0};function aE(t,e){if(X(t,"LINE_BREAKS"))return!1;if(pr(t.PATTERN)){try{Zu(e,t.PATTERN)}catch(r){return{issue:He.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(yt(t.PATTERN))return!1;if(oE(t))return{issue:He.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function qN(t,e){if(e.issue===He.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
157
153
  The problem is in the <${t.name}> Token Type
158
154
  Root cause: ${e.errMsg}.
159
- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===Ke.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
155
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===He.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
160
156
  The problem is in the <${t.name}> Token Type
161
- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function IE(t){return q(t,r=>Et(r)?r.charCodeAt(0):r)}function kp(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}var Vo=256,rl=[];function Gr(t){return t<Vo?t:rl[t]}function AP(){if(Te(rl)){rl=new Array(65536);for(let t=0;t<65536;t++)rl[t]=t>255?255+~~(t/255):t}}function cn(t,e){let r=t.tokenTypeIdx;return r===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[r]===!0}function Wo(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}var OE=1,RE={};function fn(t){let e=CP(t);wP(e),TP(e),kP(e),G(e,r=>{r.isParent=r.categoryMatches.length>0})}function CP(t){let e=Me(t),r=t,n=!0;for(;n;){r=$r(bt(q(r,o=>o.CATEGORIES)));let i=Un(r,e);e=e.concat(i),Te(i)?n=!1:r=i}return e}function wP(t){G(t,e=>{_p(e)||(RE[OE]=e,e.tokenTypeIdx=OE++),DE(e)&&!J(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),DE(e)||(e.CATEGORIES=[]),_P(e)||(e.categoryMatches=[]),SP(e)||(e.categoryMatchesMap={})})}function kP(t){G(t,e=>{e.categoryMatches=[],G(e.categoryMatchesMap,(r,n)=>{e.categoryMatches.push(RE[n].tokenTypeIdx)})})}function TP(t){G(t,e=>{FE([],e)})}function FE(t,e){G(t,r=>{e.categoryMatchesMap[r.tokenTypeIdx]=!0}),G(e.CATEGORIES,r=>{let n=t.concat(e);He(n,r)||FE(n,r)})}function _p(t){return Z(t,"tokenTypeIdx")}function DE(t){return Z(t,"CATEGORIES")}function _P(t){return Z(t,"categoryMatches")}function SP(t){return Z(t,"categoryMatchesMap")}function NE(t){return Z(t,"tokenTypeIdx")}var Sp={buildUnableToPopLexerModeMessage(t){return`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(t,e,r,n,i){return`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${r} characters.`}};var Ke;(function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(Ke||(Ke={}));var Us={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
162
- `,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Sp,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Us);var Se=class{constructor(e,r=Us){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(i,o)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let s=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${s}--> <${i}>`);let{time:a,value:u}=Fs(o),l=a>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&l(`${s}<-- <${i}> time: ${a}ms`),this.traceInitIndent--,u}else return o()},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
163
- a boolean 2nd argument is no longer supported`);this.config=_t({},Us,r);let n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let i,o=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===Us.lineTerminatorsPattern)this.config.lineTerminatorsPattern=SE;else if(this.config.lineTerminatorCharacters===Us.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
164
- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(r.safeMode&&r.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),J(e)?i={modes:{defaultMode:Me(e)},defaultMode:Go}:(o=!1,i=Me(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(wE(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(kE(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},G(i.modes,(a,u)=>{i.modes[u]=zn(a,l=>Ft(l))});let s=Pe(i.modes);if(G(i.modes,(a,u)=>{this.TRACE_INIT(`Mode: <${u}> processing`,()=>{if(this.modes.push(u),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(CE(a,s))}),Te(this.lexerDefinitionErrors)){fn(a);let l;this.TRACE_INIT("analyzeTokenTypes",()=>{l=AE(a,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:r.positionTracking,ensureOptimizations:r.ensureOptimizations,safeMode:r.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[u]=l.patternIdxToConfig,this.charCodeToPatternIdxToConfig[u]=l.charCodeToPatternIdxToConfig,this.emptyGroups=_t({},this.emptyGroups,l.emptyGroups),this.hasCustom=l.hasCustom||this.hasCustom,this.canModeBeOptimized[u]=l.canBeOptimized}})}),this.defaultMode=i.defaultMode,!Te(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let u=q(this.lexerDefinitionErrors,l=>l.message).join(`-----------------------
157
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function uE(t){return V(t,r=>yt(r)?r.charCodeAt(0):r)}function hp(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}var Uo=256,Ju=[];function zr(t){return t<Uo?t:Ju[t]}function VN(){if(Te(Ju)){Ju=new Array(65536);for(let t=0;t<65536;t++)Ju[t]=t>255?255+~~(t/255):t}}function an(t,e){let r=t.tokenTypeIdx;return r===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[r]===!0}function $o(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}var lE=1,fE={};function un(t){let e=GN(t);WN(e),KN(e),HN(e),G(e,r=>{r.isParent=r.categoryMatches.length>0})}function GN(t){let e=Me(t),r=t,n=!0;for(;n;){r=Br(xt(V(r,o=>o.CATEGORIES)));let i=Bn(r,e);e=e.concat(i),Te(i)?n=!1:r=i}return e}function WN(t){G(t,e=>{gp(e)||(fE[lE]=e,e.tokenTypeIdx=lE++),cE(e)&&!Q(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),cE(e)||(e.CATEGORIES=[]),YN(e)||(e.categoryMatches=[]),ZN(e)||(e.categoryMatchesMap={})})}function HN(t){G(t,e=>{e.categoryMatches=[],G(e.categoryMatchesMap,(r,n)=>{e.categoryMatches.push(fE[n].tokenTypeIdx)})})}function KN(t){G(t,e=>{pE([],e)})}function pE(t,e){G(t,r=>{e.categoryMatchesMap[r.tokenTypeIdx]=!0}),G(e.CATEGORIES,r=>{let n=t.concat(e);We(n,r)||pE(n,r)})}function gp(t){return X(t,"tokenTypeIdx")}function cE(t){return X(t,"CATEGORIES")}function YN(t){return X(t,"categoryMatches")}function ZN(t){return X(t,"categoryMatchesMap")}function dE(t){return X(t,"tokenTypeIdx")}var xp={buildUnableToPopLexerModeMessage(t){return`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(t,e,r,n,i){return`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${r} characters.`}};var He;(function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(He||(He={}));var Ns={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
158
+ `,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:xp,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Ns);var Ie=class{constructor(e,r=Ns){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(i,o)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let s=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${s}--> <${i}>`);let{time:a,value:u}=Ss(o),l=a>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&l(`${s}<-- <${i}> time: ${a}ms`),this.traceInitIndent--,u}else return o()},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
159
+ a boolean 2nd argument is no longer supported`);this.config=Tt({},Ns,r);let n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let i,o=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===Ns.lineTerminatorsPattern)this.config.lineTerminatorsPattern=sE;else if(this.config.lineTerminatorCharacters===Ns.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
160
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(r.safeMode&&r.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),Q(e)?i={modes:{defaultMode:Me(e)},defaultMode:zo}:(o=!1,i=Me(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(rE(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(nE(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},G(i.modes,(a,u)=>{i.modes[u]=jn(a,l=>Dt(l))});let s=Pe(i.modes);if(G(i.modes,(a,u)=>{this.TRACE_INIT(`Mode: <${u}> processing`,()=>{if(this.modes.push(u),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(tE(a,s))}),Te(this.lexerDefinitionErrors)){un(a);let l;this.TRACE_INIT("analyzeTokenTypes",()=>{l=eE(a,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:r.positionTracking,ensureOptimizations:r.ensureOptimizations,safeMode:r.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[u]=l.patternIdxToConfig,this.charCodeToPatternIdxToConfig[u]=l.charCodeToPatternIdxToConfig,this.emptyGroups=Tt({},this.emptyGroups,l.emptyGroups),this.hasCustom=l.hasCustom||this.hasCustom,this.canModeBeOptimized[u]=l.canBeOptimized}})}),this.defaultMode=i.defaultMode,!Te(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let u=V(this.lexerDefinitionErrors,l=>l.message).join(`-----------------------
165
161
  `);throw new Error(`Errors detected in definition of Lexer:
166
- `+u)}G(this.lexerDefinitionWarning,a=>{Rs(a.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(Tp?(this.chopInput=hr,this.match=this.matchWithTest):(this.updateLastIndex=Xe,this.match=this.matchWithExec),o&&(this.handleModes=Xe),this.trackStartLines===!1&&(this.computeNewColumn=hr),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=Xe),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{let a=mt(this.canModeBeOptimized,(u,l,c)=>(l===!1&&u.push(c),u),[]);if(r.ensureOptimizations&&!Te(a))throw Error(`Lexer Modes: < ${a.join(", ")} > cannot be optimized.
162
+ `+u)}G(this.lexerDefinitionWarning,a=>{_s(a.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(mp?(this.chopInput=cr,this.match=this.matchWithTest):(this.updateLastIndex=Ze,this.match=this.matchWithExec),o&&(this.handleModes=Ze),this.trackStartLines===!1&&(this.computeNewColumn=cr),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=Ze),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{let a=dt(this.canModeBeOptimized,(u,l,c)=>(l===!1&&u.push(c),u),[]);if(r.ensureOptimizations&&!Te(a))throw Error(`Lexer Modes: < ${a.join(", ")} > cannot be optimized.
167
163
  Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
168
- Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{mE()}),this.TRACE_INIT("toFastProperties",()=>{Ns(this)})})}tokenize(e,r=this.defaultMode){if(!Te(this.lexerDefinitionErrors)){let i=q(this.lexerDefinitionErrors,o=>o.message).join(`-----------------------
164
+ Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{Kb()}),this.TRACE_INIT("toFastProperties",()=>{Is(this)})})}tokenize(e,r=this.defaultMode){if(!Te(this.lexerDefinitionErrors)){let i=V(this.lexerDefinitionErrors,o=>o.message).join(`-----------------------
169
165
  `);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
170
- `+i)}return this.tokenizeInternal(e,r)}tokenizeInternal(e,r){let n,i,o,s,a,u,l,c,f,p,d,m,y,g,b,w,C=e,D=C.length,R=0,S=0,de=this.hasCustom?0:Math.floor(e.length/10),ye=new Array(de),be=[],_=this.trackStartLines?1:void 0,L=this.trackStartLines?1:void 0,F=TE(this.emptyGroups),v=this.trackStartLines,P=this.config.lineTerminatorsPattern,j=0,ae=[],ee=[],_e=[],it=[];Object.freeze(it);let x;function Ue(){return ae}function Qe(he){let oe=Gr(he),ce=ee[oe];return ce===void 0?it:ce}let E=he=>{if(_e.length===1&&he.tokenType.PUSH_MODE===void 0){let oe=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(he);be.push({offset:he.startOffset,line:he.startLine,column:he.startColumn,length:he.image.length,message:oe})}else{_e.pop();let oe=qr(_e);ae=this.patternIdxToConfig[oe],ee=this.charCodeToPatternIdxToConfig[oe],j=ae.length;let ce=this.canModeBeOptimized[oe]&&this.config.safeMode===!1;ee&&ce?x=Qe:x=Ue}};function W(he){_e.push(he),ee=this.charCodeToPatternIdxToConfig[he],ae=this.patternIdxToConfig[he],j=ae.length,j=ae.length;let oe=this.canModeBeOptimized[he]&&this.config.safeMode===!1;ee&&oe?x=Qe:x=Ue}W.call(this,r);let Ye,ne=this.config.recoveryEnabled;for(;R<D;){u=null;let he=C.charCodeAt(R),oe=x(he),ce=oe.length;for(n=0;n<ce;n++){Ye=oe[n];let me=Ye.pattern;l=null;let we=Ye.short;if(we!==!1?he===we&&(u=me):Ye.isCustom===!0?(w=me.exec(C,R,ye,F),w!==null?(u=w[0],w.payload!==void 0&&(l=w.payload)):u=null):(this.updateLastIndex(me,R),u=this.match(me,e,R)),u!==null){if(a=Ye.longerAlt,a!==void 0){let Fe=a.length;for(o=0;o<Fe;o++){let ze=ae[a[o]],qt=ze.pattern;if(c=null,ze.isCustom===!0?(w=qt.exec(C,R,ye,F),w!==null?(s=w[0],w.payload!==void 0&&(c=w.payload)):s=null):(this.updateLastIndex(qt,R),s=this.match(qt,e,R)),s&&s.length>u.length){u=s,l=c,Ye=ze;break}}}break}}if(u!==null){if(f=u.length,p=Ye.group,p!==void 0&&(d=Ye.tokenTypeIdx,m=this.createTokenInstance(u,R,d,Ye.tokenType,_,L,f),this.handlePayload(m,l),p===!1?S=this.addToken(ye,S,m):F[p].push(m)),e=this.chopInput(e,f),R=R+f,L=this.computeNewColumn(L,f),v===!0&&Ye.canLineTerminator===!0){let me=0,we,Fe;P.lastIndex=0;do we=P.test(u),we===!0&&(Fe=P.lastIndex-1,me++);while(we===!0);me!==0&&(_=_+me,L=f-Fe,this.updateTokenEndLineColumnLocation(m,p,Fe,me,_,L,f))}this.handleModes(Ye,E,W,m)}else{let me=R,we=_,Fe=L,ze=ne===!1;for(;ze===!1&&R<D;)for(e=this.chopInput(e,1),R++,i=0;i<j;i++){let qt=ae[i],A=qt.pattern,k=qt.short;if(k!==!1?C.charCodeAt(R)===k&&(ze=!0):qt.isCustom===!0?ze=A.exec(C,R,ye,F)!==null:(this.updateLastIndex(A,R),ze=A.exec(e)!==null),ze===!0)break}if(y=R-me,L=this.computeNewColumn(L,y),b=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(C,me,y,we,Fe),be.push({offset:me,line:we,column:Fe,length:y,message:b}),ne===!1)break}}return this.hasCustom||(ye.length=S),{tokens:ye,groups:F,errors:be}}handleModes(e,r,n,i){if(e.pop===!0){let o=e.push;r(i),o!==void 0&&n.call(this,o)}else e.push!==void 0&&n.call(this,e.push)}chopInput(e,r){return e.substring(r)}updateLastIndex(e,r){e.lastIndex=r}updateTokenEndLineColumnLocation(e,r,n,i,o,s,a){let u,l;r!==void 0&&(u=n===a-1,l=u?-1:0,i===1&&u===!0||(e.endLine=o+l,e.endColumn=s-1+-l))}computeNewColumn(e,r){return e+r}createOffsetOnlyToken(e,r,n,i){return{image:e,startOffset:r,tokenTypeIdx:n,tokenType:i}}createStartOnlyToken(e,r,n,i,o,s){return{image:e,startOffset:r,startLine:o,startColumn:s,tokenTypeIdx:n,tokenType:i}}createFullToken(e,r,n,i,o,s,a){return{image:e,startOffset:r,endOffset:r+a-1,startLine:o,endLine:o,startColumn:s,endColumn:s+a-1,tokenTypeIdx:n,tokenType:i}}addTokenUsingPush(e,r,n){return e.push(n),r}addTokenUsingMemberAccess(e,r,n){return e[r]=n,r++,r}handlePayloadNoCustom(e,r){}handlePayloadWithCustom(e,r){r!==null&&(e.payload=r)}matchWithTest(e,r,n){return e.test(r)===!0?r.substring(n,e.lastIndex):null}matchWithExec(e,r){let n=e.exec(r);return n!==null?n[0]:null}};Se.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.";Se.NA=/NOT_APPLICABLE/;function Mi(t){return vp(t)?t.LABEL:t.name}function vp(t){return Et(t.LABEL)&&t.LABEL!==""}var vP="parent",PE="categories",LE="label",ME="group",BE="push_mode",jE="pop_mode",UE="longer_alt",zE="line_breaks",$E="start_chars_hint";function xe(t){return IP(t)}function IP(t){let e=t.pattern,r={};if(r.name=t.name,Ft(e)||(r.PATTERN=e),Z(t,vP))throw`The parent property is no longer supported.
171
- See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return Z(t,PE)&&(r.CATEGORIES=t[PE]),fn([r]),Z(t,LE)&&(r.LABEL=t[LE]),Z(t,ME)&&(r.GROUP=t[ME]),Z(t,jE)&&(r.POP_MODE=t[jE]),Z(t,BE)&&(r.PUSH_MODE=t[BE]),Z(t,UE)&&(r.LONGER_ALT=t[UE]),Z(t,zE)&&(r.LINE_BREAKS=t[zE]),Z(t,$E)&&(r.START_CHARS_HINT=t[$E]),r}var Cr=xe({name:"EOF",pattern:Se.NA});fn([Cr]);function Bi(t,e,r,n,i,o,s,a){return{image:e,startOffset:r,endOffset:n,startLine:i,endLine:o,startColumn:s,endColumn:a,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}function Ip(t,e){return cn(t,e)}var nl={buildMismatchTokenMessage({expected:t,actual:e,previous:r,ruleName:n}){return`Expecting ${vp(t)?`--> ${Mi(t)} <--`:`token of type --> ${t.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:t,ruleName:e}){return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,previous:r,customUserDescription:n,ruleName:i}){let o="Expecting: ",a=`
172
- but found: '`+kt(e).image+"'";if(n)return o+n+a;{let u=mt(t,(p,d)=>p.concat(d),[]),l=q(u,p=>`[${q(p,d=>Mi(d)).join(", ")}]`),f=`one of these possible Token sequences:
173
- ${q(l,(p,d)=>` ${d+1}. ${p}`).join(`
166
+ `+i)}return this.tokenizeInternal(e,r)}tokenizeInternal(e,r){let n,i,o,s,a,u,l,c,f,p,d,m,y,g,b,w,k=e,D=k.length,R=0,S=0,de=this.hasCustom?0:Math.floor(e.length/10),ye=new Array(de),be=[],_=this.trackStartLines?1:void 0,L=this.trackStartLines?1:void 0,F=iE(this.emptyGroups),I=this.trackStartLines,P=this.config.lineTerminatorsPattern,j=0,ae=[],ee=[],Se=[],rt=[];Object.freeze(rt);let x;function Ue(){return ae}function Je(he){let oe=zr(he),fe=ee[oe];return fe===void 0?rt:fe}let E=he=>{if(Se.length===1&&he.tokenType.PUSH_MODE===void 0){let oe=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(he);be.push({offset:he.startOffset,line:he.startLine,column:he.startColumn,length:he.image.length,message:oe})}else{Se.pop();let oe=jr(Se);ae=this.patternIdxToConfig[oe],ee=this.charCodeToPatternIdxToConfig[oe],j=ae.length;let fe=this.canModeBeOptimized[oe]&&this.config.safeMode===!1;ee&&fe?x=Je:x=Ue}};function W(he){Se.push(he),ee=this.charCodeToPatternIdxToConfig[he],ae=this.patternIdxToConfig[he],j=ae.length,j=ae.length;let oe=this.canModeBeOptimized[he]&&this.config.safeMode===!1;ee&&oe?x=Je:x=Ue}W.call(this,r);let Ke,ne=this.config.recoveryEnabled;for(;R<D;){u=null;let he=k.charCodeAt(R),oe=x(he),fe=oe.length;for(n=0;n<fe;n++){Ke=oe[n];let me=Ke.pattern;l=null;let we=Ke.short;if(we!==!1?he===we&&(u=me):Ke.isCustom===!0?(w=me.exec(k,R,ye,F),w!==null?(u=w[0],w.payload!==void 0&&(l=w.payload)):u=null):(this.updateLastIndex(me,R),u=this.match(me,e,R)),u!==null){if(a=Ke.longerAlt,a!==void 0){let Fe=a.length;for(o=0;o<Fe;o++){let ze=ae[a[o]],Ut=ze.pattern;if(c=null,ze.isCustom===!0?(w=Ut.exec(k,R,ye,F),w!==null?(s=w[0],w.payload!==void 0&&(c=w.payload)):s=null):(this.updateLastIndex(Ut,R),s=this.match(Ut,e,R)),s&&s.length>u.length){u=s,l=c,Ke=ze;break}}}break}}if(u!==null){if(f=u.length,p=Ke.group,p!==void 0&&(d=Ke.tokenTypeIdx,m=this.createTokenInstance(u,R,d,Ke.tokenType,_,L,f),this.handlePayload(m,l),p===!1?S=this.addToken(ye,S,m):F[p].push(m)),e=this.chopInput(e,f),R=R+f,L=this.computeNewColumn(L,f),I===!0&&Ke.canLineTerminator===!0){let me=0,we,Fe;P.lastIndex=0;do we=P.test(u),we===!0&&(Fe=P.lastIndex-1,me++);while(we===!0);me!==0&&(_=_+me,L=f-Fe,this.updateTokenEndLineColumnLocation(m,p,Fe,me,_,L,f))}this.handleModes(Ke,E,W,m)}else{let me=R,we=_,Fe=L,ze=ne===!1;for(;ze===!1&&R<D;)for(e=this.chopInput(e,1),R++,i=0;i<j;i++){let Ut=ae[i],A=Ut.pattern,C=Ut.short;if(C!==!1?k.charCodeAt(R)===C&&(ze=!0):Ut.isCustom===!0?ze=A.exec(k,R,ye,F)!==null:(this.updateLastIndex(A,R),ze=A.exec(e)!==null),ze===!0)break}if(y=R-me,L=this.computeNewColumn(L,y),b=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(k,me,y,we,Fe),be.push({offset:me,line:we,column:Fe,length:y,message:b}),ne===!1)break}}return this.hasCustom||(ye.length=S),{tokens:ye,groups:F,errors:be}}handleModes(e,r,n,i){if(e.pop===!0){let o=e.push;r(i),o!==void 0&&n.call(this,o)}else e.push!==void 0&&n.call(this,e.push)}chopInput(e,r){return e.substring(r)}updateLastIndex(e,r){e.lastIndex=r}updateTokenEndLineColumnLocation(e,r,n,i,o,s,a){let u,l;r!==void 0&&(u=n===a-1,l=u?-1:0,i===1&&u===!0||(e.endLine=o+l,e.endColumn=s-1+-l))}computeNewColumn(e,r){return e+r}createOffsetOnlyToken(e,r,n,i){return{image:e,startOffset:r,tokenTypeIdx:n,tokenType:i}}createStartOnlyToken(e,r,n,i,o,s){return{image:e,startOffset:r,startLine:o,startColumn:s,tokenTypeIdx:n,tokenType:i}}createFullToken(e,r,n,i,o,s,a){return{image:e,startOffset:r,endOffset:r+a-1,startLine:o,endLine:o,startColumn:s,endColumn:s+a-1,tokenTypeIdx:n,tokenType:i}}addTokenUsingPush(e,r,n){return e.push(n),r}addTokenUsingMemberAccess(e,r,n){return e[r]=n,r++,r}handlePayloadNoCustom(e,r){}handlePayloadWithCustom(e,r){r!==null&&(e.payload=r)}matchWithTest(e,r,n){return e.test(r)===!0?r.substring(n,e.lastIndex):null}matchWithExec(e,r){let n=e.exec(r);return n!==null?n[0]:null}};Ie.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.";Ie.NA=/NOT_APPLICABLE/;function Pi(t){return yp(t)?t.LABEL:t.name}function yp(t){return yt(t.LABEL)&&t.LABEL!==""}var XN="parent",hE="categories",mE="label",gE="group",xE="push_mode",yE="pop_mode",bE="longer_alt",EE="line_breaks",AE="start_chars_hint";function xe(t){return JN(t)}function JN(t){let e=t.pattern,r={};if(r.name=t.name,Dt(e)||(r.PATTERN=e),X(t,XN))throw`The parent property is no longer supported.
167
+ See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return X(t,hE)&&(r.CATEGORIES=t[hE]),un([r]),X(t,mE)&&(r.LABEL=t[mE]),X(t,gE)&&(r.GROUP=t[gE]),X(t,yE)&&(r.POP_MODE=t[yE]),X(t,xE)&&(r.PUSH_MODE=t[xE]),X(t,bE)&&(r.LONGER_ALT=t[bE]),X(t,EE)&&(r.LINE_BREAKS=t[EE]),X(t,AE)&&(r.START_CHARS_HINT=t[AE]),r}var xr=xe({name:"EOF",pattern:Ie.NA});un([xr]);function Li(t,e,r,n,i,o,s,a){return{image:e,startOffset:r,endOffset:n,startLine:i,endLine:o,startColumn:s,endColumn:a,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}function bp(t,e){return an(t,e)}var Qu={buildMismatchTokenMessage({expected:t,actual:e,previous:r,ruleName:n}){return`Expecting ${yp(t)?`--> ${Pi(t)} <--`:`token of type --> ${t.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:t,ruleName:e}){return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,previous:r,customUserDescription:n,ruleName:i}){let o="Expecting: ",a=`
168
+ but found: '`+kt(e).image+"'";if(n)return o+n+a;{let u=dt(t,(p,d)=>p.concat(d),[]),l=V(u,p=>`[${V(p,d=>Pi(d)).join(", ")}]`),f=`one of these possible Token sequences:
169
+ ${V(l,(p,d)=>` ${d+1}. ${p}`).join(`
174
170
  `)}`;return o+f+a}},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:r,ruleName:n}){let i="Expecting: ",s=`
175
171
  but found: '`+kt(e).image+"'";if(r)return i+r+s;{let u=`expecting at least one iteration which starts with one of these possible Token sequences::
176
- <${q(t,l=>`[${q(l,c=>Mi(c)).join(",")}]`).join(" ,")}>`;return i+u+s}}};Object.freeze(nl);var qE={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<-
177
- inside top level rule: ->`+t.name+"<-"}},wr={buildDuplicateFoundError(t,e){function r(c){return c instanceof Ie?c.terminalType.name:c instanceof Be?c.nonTerminalName:""}let n=t.name,i=kt(e),o=i.idx,s=Kt(i),a=r(i),u=o>0,l=`->${s}${u?o:""}<- ${a?`with argument: ->${a}<-`:""}
172
+ <${V(t,l=>`[${V(l,c=>Pi(c)).join(",")}]`).join(" ,")}>`;return i+u+s}}};Object.freeze(Qu);var kE={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<-
173
+ inside top level rule: ->`+t.name+"<-"}},yr={buildDuplicateFoundError(t,e){function r(c){return c instanceof ve?c.terminalType.name:c instanceof Be?c.nonTerminalName:""}let n=t.name,i=kt(e),o=i.idx,s=Wt(i),a=r(i),u=o>0,l=`->${s}${u?o:""}<- ${a?`with argument: ->${a}<-`:""}
178
174
  appears more than once (${e.length} times) in the top level rule: ->${n}<-.
179
175
  For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES
180
176
  `;return l=l.replace(/[ \t]+/g," "),l=l.replace(/\s\s+/g,`
@@ -182,67 +178,67 @@ inside top level rule: ->`+t.name+"<-"}},wr={buildDuplicateFoundError(t,e){funct
182
178
  The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>.
183
179
  To resolve this make sure each Terminal and Non-Terminal names are unique
184
180
  This is easy to accomplish by using the convention that Terminal names start with an uppercase letter
185
- and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(t){let e=q(t.prefixPath,i=>Mi(i)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix
181
+ and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(t){let e=V(t.prefixPath,i=>Pi(i)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix
186
182
  in <OR${r}> inside <${t.topLevelRule.name}> Rule,
187
183
  <${e}> may appears as a prefix path in all these alternatives.
188
184
  See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX
189
- For Further details.`},buildAlternationAmbiguityError(t){let e=q(t.prefixPath,i=>Mi(i)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx,n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in <OR${r}> inside <${t.topLevelRule.name}> Rule,
185
+ For Further details.`},buildAlternationAmbiguityError(t){let e=V(t.prefixPath,i=>Pi(i)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx,n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in <OR${r}> inside <${t.topLevelRule.name}> Rule,
190
186
  <${e}> may appears as a prefix path in all these alternatives.
191
187
  `;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
192
- For Further details.`,n},buildEmptyRepetitionError(t){let e=Kt(t.repetition);return t.repetition.idx!==0&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens.
188
+ For Further details.`,n},buildEmptyRepetitionError(t){let e=Wt(t.repetition);return t.repetition.idx!==0&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens.
193
189
  This could lead to an infinite loop.`},buildTokenNameError(t){return"deprecated"},buildEmptyAlternationError(t){return`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in <OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.
194
190
  Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(t){return`An Alternation cannot have more than 256 alternatives:
195
191
  <OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.
196
- has ${t.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(t){let e=t.topLevelRule.name,r=q(t.leftRecursionPath,o=>o.name),n=`${e} --> ${r.concat([e]).join(" --> ")}`;return`Left Recursion found in grammar.
192
+ has ${t.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(t){let e=t.topLevelRule.name,r=V(t.leftRecursionPath,o=>o.name),n=`${e} --> ${r.concat([e]).join(" --> ")}`;return`Left Recursion found in grammar.
197
193
  rule: <${e}> can be invoked from itself (directly or indirectly)
198
194
  without consuming any Tokens. The grammar path that causes this is:
199
195
  ${n}
200
196
  To fix this refactor your grammar to remove the left recursion.
201
- see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){let e;return t.topLevelRule instanceof Ut?e=t.topLevelRule.name:e=t.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}};function VE(t,e){let r=new Op(t,e);return r.resolveRefs(),r.errors}var Op=class extends zt{constructor(e,r){super(),this.nameToTopRule=e,this.errMsgProvider=r,this.errors=[]}resolveRefs(){G(Re(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let r=this.nameToTopRule[e.nonTerminalName];if(r)e.referencedRule=r;else{let n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:n,type:At.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}};var Dp=class extends ln{constructor(e,r){super(),this.topProd=e,this.path=r,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=Me(this.path.ruleStack).reverse(),this.occurrenceStack=Me(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,r=[]){this.found||super.walk(e,r)}walkProdRef(e,r,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let i=r.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,i)}}updateExpectedNext(){Te(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},il=class extends Dp{constructor(e,r){super(e,r),this.path=r,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,r,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let i=r.concat(n),o=new je({definition:i});this.possibleTokTypes=Ni(o),this.found=!0}}},Ho=class extends ln{constructor(e,r){super(),this.topRule=e,this.occurrence=r,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},ol=class extends Ho{walkMany(e,r,n){if(e.idx===this.occurrence){let i=kt(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof Ie&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(e,r,n)}},zs=class extends Ho{walkManySep(e,r,n){if(e.idx===this.occurrence){let i=kt(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof Ie&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(e,r,n)}},sl=class extends Ho{walkAtLeastOne(e,r,n){if(e.idx===this.occurrence){let i=kt(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof Ie&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(e,r,n)}},$s=class extends Ho{walkAtLeastOneSep(e,r,n){if(e.idx===this.occurrence){let i=kt(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof Ie&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(e,r,n)}};function al(t,e,r=[]){r=Me(r);let n=[],i=0;function o(a){return a.concat(ut(t,i+1))}function s(a){let u=al(o(a),e,r);return n.concat(u)}for(;r.length<e&&i<t.length;){let a=t[i];if(a instanceof je)return s(a.definition);if(a instanceof Be)return s(a.definition);if(a instanceof Ge)n=s(a.definition);else if(a instanceof lt){let u=a.definition.concat([new De({definition:a.definition})]);return s(u)}else if(a instanceof ct){let u=[new je({definition:a.definition}),new De({definition:[new Ie({terminalType:a.separator})].concat(a.definition)})];return s(u)}else if(a instanceof rt){let u=a.definition.concat([new De({definition:[new Ie({terminalType:a.separator})].concat(a.definition)})]);n=s(u)}else if(a instanceof De){let u=a.definition.concat([new De({definition:a.definition})]);n=s(u)}else{if(a instanceof nt)return G(a.definition,u=>{Te(u.definition)===!1&&(n=s(u.definition))}),n;if(a instanceof Ie)r.push(a.terminalType);else throw Error("non exhaustive match")}i++}return n.push({partialPath:r,suffixDef:ut(t,i)}),n}function ul(t,e,r,n){let i="EXIT_NONE_TERMINAL",o=[i],s="EXIT_ALTERNATIVE",a=!1,u=e.length,l=u-n-1,c=[],f=[];for(f.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!Te(f);){let p=f.pop();if(p===s){a&&qr(f).idx<=l&&f.pop();continue}let d=p.def,m=p.idx,y=p.ruleStack,g=p.occurrenceStack;if(Te(d))continue;let b=d[0];if(b===i){let w={idx:m,def:ut(d),ruleStack:un(y),occurrenceStack:un(g)};f.push(w)}else if(b instanceof Ie)if(m<u-1){let w=m+1,C=e[w];if(r(C,b.terminalType)){let D={idx:w,def:ut(d),ruleStack:y,occurrenceStack:g};f.push(D)}}else if(m===u-1)c.push({nextTokenType:b.terminalType,nextTokenOccurrence:b.idx,ruleStack:y,occurrenceStack:g}),a=!0;else throw Error("non exhaustive match");else if(b instanceof Be){let w=Me(y);w.push(b.nonTerminalName);let C=Me(g);C.push(b.idx);let D={idx:m,def:b.definition.concat(o,ut(d)),ruleStack:w,occurrenceStack:C};f.push(D)}else if(b instanceof Ge){let w={idx:m,def:ut(d),ruleStack:y,occurrenceStack:g};f.push(w),f.push(s);let C={idx:m,def:b.definition.concat(ut(d)),ruleStack:y,occurrenceStack:g};f.push(C)}else if(b instanceof lt){let w=new De({definition:b.definition,idx:b.idx}),C=b.definition.concat([w],ut(d)),D={idx:m,def:C,ruleStack:y,occurrenceStack:g};f.push(D)}else if(b instanceof ct){let w=new Ie({terminalType:b.separator}),C=new De({definition:[w].concat(b.definition),idx:b.idx}),D=b.definition.concat([C],ut(d)),R={idx:m,def:D,ruleStack:y,occurrenceStack:g};f.push(R)}else if(b instanceof rt){let w={idx:m,def:ut(d),ruleStack:y,occurrenceStack:g};f.push(w),f.push(s);let C=new Ie({terminalType:b.separator}),D=new De({definition:[C].concat(b.definition),idx:b.idx}),R=b.definition.concat([D],ut(d)),S={idx:m,def:R,ruleStack:y,occurrenceStack:g};f.push(S)}else if(b instanceof De){let w={idx:m,def:ut(d),ruleStack:y,occurrenceStack:g};f.push(w),f.push(s);let C=new De({definition:b.definition,idx:b.idx}),D=b.definition.concat([C],ut(d)),R={idx:m,def:D,ruleStack:y,occurrenceStack:g};f.push(R)}else if(b instanceof nt)for(let w=b.definition.length-1;w>=0;w--){let C=b.definition[w],D={idx:m,def:C.definition.concat(ut(d)),ruleStack:y,occurrenceStack:g};f.push(D),f.push(s)}else if(b instanceof je)f.push({idx:m,def:b.definition.concat(ut(d)),ruleStack:y,occurrenceStack:g});else if(b instanceof Ut)f.push(OP(b,m,y,g));else throw Error("non exhaustive match")}return c}function OP(t,e,r,n){let i=Me(r);i.push(t.name);let o=Me(n);return o.push(1),{idx:e,def:t.definition,ruleStack:i,occurrenceStack:o}}var Je;(function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"})(Je||(Je={}));function cl(t){if(t instanceof Ge||t==="Option")return Je.OPTION;if(t instanceof De||t==="Repetition")return Je.REPETITION;if(t instanceof lt||t==="RepetitionMandatory")return Je.REPETITION_MANDATORY;if(t instanceof ct||t==="RepetitionMandatoryWithSeparator")return Je.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof rt||t==="RepetitionWithSeparator")return Je.REPETITION_WITH_SEPARATOR;if(t instanceof nt||t==="Alternation")return Je.ALTERNATION;throw Error("non exhaustive match")}function WE(t,e,r,n,i,o){let s=qs(t,e,r),a=JE(s)?Wo:cn;return o(s,n,a,i)}function HE(t,e,r,n,i,o){let s=Vs(t,e,i,r),a=JE(s)?Wo:cn;return o(s[0],a,n)}function KE(t,e,r,n){let i=t.length,o=Dt(t,s=>Dt(s,a=>a.length===1));if(e)return function(s){let a=q(s,u=>u.GATE);for(let u=0;u<i;u++){let l=t[u],c=l.length,f=a[u];if(!(f!==void 0&&f.call(this)===!1))e:for(let p=0;p<c;p++){let d=l[p],m=d.length;for(let y=0;y<m;y++){let g=this.LA(y+1);if(r(g,d[y])===!1)continue e}return u}}};if(o&&!n){let s=q(t,u=>bt(u)),a=mt(s,(u,l,c)=>(G(l,f=>{Z(u,f.tokenTypeIdx)||(u[f.tokenTypeIdx]=c),G(f.categoryMatches,p=>{Z(u,p)||(u[p]=c)})}),u),{});return function(){let u=this.LA(1);return a[u.tokenTypeIdx]}}else return function(){for(let s=0;s<i;s++){let a=t[s],u=a.length;e:for(let l=0;l<u;l++){let c=a[l],f=c.length;for(let p=0;p<f;p++){let d=this.LA(p+1);if(r(d,c[p])===!1)continue e}return s}}}}function YE(t,e,r){let n=Dt(t,o=>o.length===1),i=t.length;if(n&&!r){let o=bt(t);if(o.length===1&&Te(o[0].categoryMatches)){let a=o[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===a}}else{let s=mt(o,(a,u,l)=>(a[u.tokenTypeIdx]=!0,G(u.categoryMatches,c=>{a[c]=!0}),a),[]);return function(){let a=this.LA(1);return s[a.tokenTypeIdx]===!0}}}else return function(){e:for(let o=0;o<i;o++){let s=t[o],a=s.length;for(let u=0;u<a;u++){let l=this.LA(u+1);if(e(l,s[u])===!1)continue e}return!0}return!1}}var Fp=class extends ln{constructor(e,r,n){super(),this.topProd=e,this.targetOccurrence=r,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,r,n,i){return e.idx===this.targetOccurrence&&this.targetProdType===r?(this.restDef=n.concat(i),!0):!1}walkOption(e,r,n){this.checkIsTarget(e,Je.OPTION,r,n)||super.walkOption(e,r,n)}walkAtLeastOne(e,r,n){this.checkIsTarget(e,Je.REPETITION_MANDATORY,r,n)||super.walkOption(e,r,n)}walkAtLeastOneSep(e,r,n){this.checkIsTarget(e,Je.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}walkMany(e,r,n){this.checkIsTarget(e,Je.REPETITION,r,n)||super.walkOption(e,r,n)}walkManySep(e,r,n){this.checkIsTarget(e,Je.REPETITION_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}},ll=class extends zt{constructor(e,r,n){super(),this.targetOccurrence=e,this.targetProdType=r,this.targetRef=n,this.result=[]}checkIsTarget(e,r){e.idx===this.targetOccurrence&&this.targetProdType===r&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,Je.OPTION)}visitRepetition(e){this.checkIsTarget(e,Je.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Je.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Je.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Je.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Je.ALTERNATION)}};function GE(t){let e=new Array(t);for(let r=0;r<t;r++)e[r]=[];return e}function Rp(t){let e=[""];for(let r=0;r<t.length;r++){let n=t[r],i=[];for(let o=0;o<e.length;o++){let s=e[o];i.push(s+"_"+n.tokenTypeIdx);for(let a=0;a<n.categoryMatches.length;a++){let u="_"+n.categoryMatches[a];i.push(s+u)}}e=i}return e}function DP(t,e,r){for(let n=0;n<t.length;n++){if(n===r)continue;let i=t[n];for(let o=0;o<e.length;o++){let s=e[o];if(i[s]===!0)return!1}}return!0}function ZE(t,e){let r=q(t,s=>al([s],1)),n=GE(r.length),i=q(r,s=>{let a={};return G(s,u=>{let l=Rp(u.partialPath);G(l,c=>{a[c]=!0})}),a}),o=r;for(let s=1;s<=e;s++){let a=o;o=GE(a.length);for(let u=0;u<a.length;u++){let l=a[u];for(let c=0;c<l.length;c++){let f=l[c].partialPath,p=l[c].suffixDef,d=Rp(f);if(DP(i,d,u)||Te(p)||f.length===e){let y=n[u];if(fl(y,f)===!1){y.push(f);for(let g=0;g<d.length;g++){let b=d[g];i[u][b]=!0}}}else{let y=al(p,s+1,f);o[u]=o[u].concat(y),G(y,g=>{let b=Rp(g.partialPath);G(b,w=>{i[u][w]=!0})})}}}}return n}function qs(t,e,r,n){let i=new ll(t,Je.ALTERNATION,n);return e.accept(i),ZE(i.result,r)}function Vs(t,e,r,n){let i=new ll(t,r);e.accept(i);let o=i.result,a=new Fp(e,t,r).startWalking(),u=new je({definition:o}),l=new je({definition:a});return ZE([u,l],n)}function fl(t,e){e:for(let r=0;r<t.length;r++){let n=t[r];if(n.length===e.length){for(let i=0;i<n.length;i++){let o=e[i],s=n[i];if((o===s||s.categoryMatchesMap[o.tokenTypeIdx]!==void 0)===!1)continue e}return!0}}return!1}function XE(t,e){return t.length<e.length&&Dt(t,(r,n)=>{let i=e[n];return r===i||i.categoryMatchesMap[r.tokenTypeIdx]})}function JE(t){return Dt(t,e=>Dt(e,r=>Dt(r,n=>Te(n.categoryMatches))))}function QE(t){let e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName});return q(e,r=>Object.assign({type:At.CUSTOM_LOOKAHEAD_VALIDATION},r))}function eA(t,e,r,n){let i=jt(t,u=>RP(u,r)),o=BP(t,e,r),s=jt(t,u=>PP(u,r)),a=jt(t,u=>NP(u,t,n,r));return i.concat(o,s,a)}function RP(t,e){let r=new Np;t.accept(r);let n=r.allProductions,i=mp(n,FP),o=Ht(i,a=>a.length>1);return q(Re(o),a=>{let u=kt(a),l=e.buildDuplicateFoundError(t,a),c=Kt(u),f={message:l,type:At.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:c,occurrence:u.idx},p=tA(u);return p&&(f.parameter=p),f})}function FP(t){return`${Kt(t)}_#_${t.idx}_#_${tA(t)}`}function tA(t){return t instanceof Ie?t.terminalType.name:t instanceof Be?t.nonTerminalName:""}var Np=class extends zt{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}};function NP(t,e,r,n){let i=[];if(mt(e,(s,a)=>a.name===t.name?s+1:s,0)>1){let s=n.buildDuplicateRuleNameError({topLevelRule:t,grammarName:r});i.push({message:s,type:At.DUPLICATE_RULE_NAME,ruleName:t.name})}return i}function rA(t,e,r){let n=[],i;return He(e,t)||(i=`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:i,type:At.INVALID_RULE_OVERRIDE,ruleName:t})),n}function Lp(t,e,r,n=[]){let i=[],o=pl(e.definition);if(Te(o))return[];{let s=t.name;He(o,t)&&i.push({message:r.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:n}),type:At.LEFT_RECURSION,ruleName:s});let u=Un(o,n.concat([t])),l=jt(u,c=>{let f=Me(n);return f.push(c),Lp(t,c,r,f)});return i.concat(l)}}function pl(t){let e=[];if(Te(t))return e;let r=kt(t);if(r instanceof Be)e.push(r.referencedRule);else if(r instanceof je||r instanceof Ge||r instanceof lt||r instanceof ct||r instanceof rt||r instanceof De)e=e.concat(pl(r.definition));else if(r instanceof nt)e=bt(q(r.definition,o=>pl(o.definition)));else if(!(r instanceof Ie))throw Error("non exhaustive match");let n=Fi(r),i=t.length>1;if(n&&i){let o=ut(t);return e.concat(pl(o))}else return e}var Gs=class extends zt{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};function nA(t,e){let r=new Gs;t.accept(r);let n=r.alternations;return jt(n,o=>{let s=un(o.definition);return jt(s,(a,u)=>{let l=ul([a],[],cn,1);return Te(l)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:o,emptyChoiceIdx:u}),type:At.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:o.idx,alternative:u+1}]:[]})})}function iA(t,e,r){let n=new Gs;t.accept(n);let i=n.alternations;return i=zn(i,s=>s.ignoreAmbiguities===!0),jt(i,s=>{let a=s.idx,u=s.maxLookahead||e,l=qs(a,t,u,s),c=LP(l,s,t,r),f=MP(l,s,t,r);return c.concat(f)})}var Pp=class extends zt{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}};function PP(t,e){let r=new Gs;t.accept(r);let n=r.alternations;return jt(n,o=>o.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:o}),type:At.TOO_MANY_ALTS,ruleName:t.name,occurrence:o.idx}]:[])}function oA(t,e,r){let n=[];return G(t,i=>{let o=new Pp;i.accept(o);let s=o.allProductions;G(s,a=>{let u=cl(a),l=a.maxLookahead||e,c=a.idx,p=Vs(c,i,u,l)[0];if(Te(bt(p))){let d=r.buildEmptyRepetitionError({topLevelRule:i,repetition:a});n.push({message:d,type:At.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),n}function LP(t,e,r,n){let i=[],o=mt(t,(a,u,l)=>(e.definition[l].ignoreAmbiguities===!0||G(u,c=>{let f=[l];G(t,(p,d)=>{l!==d&&fl(p,c)&&e.definition[d].ignoreAmbiguities!==!0&&f.push(d)}),f.length>1&&!fl(i,c)&&(i.push(c),a.push({alts:f,path:c}))}),a),[]);return q(o,a=>{let u=q(a.alts,c=>c+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:u,prefixPath:a.path}),type:At.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:e.idx,alternatives:a.alts}})}function MP(t,e,r,n){let i=mt(t,(s,a,u)=>{let l=q(a,c=>({idx:u,path:c}));return s.concat(l)},[]);return $r(jt(i,s=>{if(e.definition[s.idx].ignoreAmbiguities===!0)return[];let u=s.idx,l=s.path,c=Rt(i,p=>e.definition[p.idx].ignoreAmbiguities!==!0&&p.idx<u&&XE(p.path,l));return q(c,p=>{let d=[p.idx+1,u+1],m=e.idx===0?"":e.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:d,prefixPath:p.path}),type:At.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:m,alternatives:d}})}))}function BP(t,e,r){let n=[],i=q(e,o=>o.name);return G(t,o=>{let s=o.name;if(He(i,s)){let a=r.buildNamespaceConflictError(o);n.push({message:a,type:At.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:s})}}),n}function sA(t){let e=Bo(t,{errMsgProvider:qE}),r={};return G(t.rules,n=>{r[n.name]=n}),VE(r,e.errMsgProvider)}function aA(t){return t=Bo(t,{errMsgProvider:wr}),eA(t.rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}var uA="MismatchedTokenException",lA="NoViableAltException",cA="EarlyExitException",fA="NotAllInputParsedException",pA=[uA,lA,cA,fA];Object.freeze(pA);function qn(t){return He(pA,t.name)}var Ko=class extends Error{constructor(e,r){super(e),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},ji=class extends Ko{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=uA}},Ws=class extends Ko{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=lA}},Hs=class extends Ko{constructor(e,r){super(e,r),this.name=fA}},Ks=class extends Ko{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=cA}};var Mp={},jp="InRuleRecoveryException",Bp=class extends Error{constructor(e){super(e),this.name=jp}},dl=class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Z(e,"recoveryEnabled")?e.recoveryEnabled:$t.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=jP)}getTokenToInsert(e){let r=Bi(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,r,n,i){let o=this.findReSyncTokenType(),s=this.exportLexerState(),a=[],u=!1,l=this.LA(1),c=this.LA(1),f=()=>{let p=this.LA(0),d=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:l,previous:p,ruleName:this.getCurrRuleFullName()}),m=new ji(d,l,this.LA(0));m.resyncedTokens=un(a),this.SAVE_ERROR(m)};for(;!u;)if(this.tokenMatcher(c,i)){f();return}else if(n.call(this)){f(),e.apply(this,r);return}else this.tokenMatcher(c,o)?u=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,a));this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,r,n){return!(n===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,r)))}getFollowsForInRuleRecovery(e,r){let n=this.getCurrentGrammarPath(e,r);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,r){if(this.canRecoverWithSingleTokenInsertion(e,r))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new Bp("sad sad panda")}canPerformInRuleRecovery(e,r){return this.canRecoverWithSingleTokenInsertion(e,r)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,r){if(!this.canTokenTypeBeInsertedInRecovery(e)||Te(r))return!1;let n=this.LA(1);return Vr(r,o=>this.tokenMatcher(n,o))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){let r=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(r);return He(n,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),r=this.LA(1),n=2;for(;;){let i=Vr(e,o=>Ip(r,o));if(i!==void 0)return i;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return Mp;let e=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return q(e,(n,i)=>i===0?Mp:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:r[i],inRule:this.shortRuleNameToFullName(e[i-1])})}flattenFollowSet(){let e=q(this.buildFullFollowKeyStack(),r=>this.getFollowSetFromFollowKey(r));return bt(e)}getFollowSetFromFollowKey(e){if(e===Mp)return[Cr];let r=e.ruleName+e.idxInCallingRule+Yu+e.inRule;return this.resyncFollows[r]}addToResyncTokens(e,r){return this.tokenMatcher(e,Cr)||r.push(e),r}reSyncTo(e){let r=[],n=this.LA(1);for(;this.tokenMatcher(n,e)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return un(r)}attemptInRepetitionRecovery(e,r,n,i,o,s,a){}getCurrentGrammarPath(e,r){let n=this.getHumanReadableRuleStack(),i=Me(this.RULE_OCCURRENCE_STACK);return{ruleStack:n,occurrenceStack:i,lastTok:e,lastTokOccurrence:r}}getHumanReadableRuleStack(){return q(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}};function jP(t,e,r,n,i,o,s){let a=this.getKeyForAutomaticLookahead(n,i),u=this.firstAfterRepMap[a];if(u===void 0){let p=this.getCurrRuleFullName(),d=this.getGAstProductions()[p];u=new o(d,i).startWalking(),this.firstAfterRepMap[a]=u}let l=u.token,c=u.occurrence,f=u.isEndOfRule;this.RULE_STACK.length===1&&f&&l===void 0&&(l=Cr,c=1),!(l===void 0||c===void 0)&&this.shouldInRepetitionRecoveryBeTried(l,c,s)&&this.tryInRepetitionRecovery(t,e,r,l)}function hl(t,e,r){return r|e|t}var Ys=class{constructor(e){var r;this.maxLookahead=(r=e?.maxLookahead)!==null&&r!==void 0?r:$t.maxLookahead}validate(e){let r=this.validateNoLeftRecursion(e.rules);if(Te(r)){let n=this.validateEmptyOrAlternatives(e.rules),i=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),o=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...r,...n,...i,...o]}return r}validateNoLeftRecursion(e){return jt(e,r=>Lp(r,r,wr))}validateEmptyOrAlternatives(e){return jt(e,r=>nA(r,wr))}validateAmbiguousAlternationAlternatives(e,r){return jt(e,n=>iA(n,r,wr))}validateSomeNonEmptyLookaheadPath(e,r){return oA(e,r,wr)}buildLookaheadForAlternation(e){return WE(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,KE)}buildLookaheadForOptional(e){return HE(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,cl(e.prodType),YE)}};var gl=class{initLooksAhead(e){this.dynamicTokensEnabled=Z(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:$t.dynamicTokensEnabled,this.maxLookahead=Z(e,"maxLookahead")?e.maxLookahead:$t.maxLookahead,this.lookaheadStrategy=Z(e,"lookaheadStrategy")?e.lookaheadStrategy:new Ys({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){G(e,r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{let{alternation:n,repetition:i,option:o,repetitionMandatory:s,repetitionMandatoryWithSeparator:a,repetitionWithSeparator:u}=UP(r);G(n,l=>{let c=l.idx===0?"":l.idx;this.TRACE_INIT(`${Kt(l)}${c}`,()=>{let f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:l.idx,rule:r,maxLookahead:l.maxLookahead||this.maxLookahead,hasPredicates:l.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),p=hl(this.fullRuleNameToShort[r.name],256,l.idx);this.setLaFuncCache(p,f)})}),G(i,l=>{this.computeLookaheadFunc(r,l.idx,768,"Repetition",l.maxLookahead,Kt(l))}),G(o,l=>{this.computeLookaheadFunc(r,l.idx,512,"Option",l.maxLookahead,Kt(l))}),G(s,l=>{this.computeLookaheadFunc(r,l.idx,1024,"RepetitionMandatory",l.maxLookahead,Kt(l))}),G(a,l=>{this.computeLookaheadFunc(r,l.idx,1536,"RepetitionMandatoryWithSeparator",l.maxLookahead,Kt(l))}),G(u,l=>{this.computeLookaheadFunc(r,l.idx,1280,"RepetitionWithSeparator",l.maxLookahead,Kt(l))})})})}computeLookaheadFunc(e,r,n,i,o,s){this.TRACE_INIT(`${s}${r===0?"":r}`,()=>{let a=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:e,maxLookahead:o||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),u=hl(this.fullRuleNameToShort[e.name],n,r);this.setLaFuncCache(u,a)})}getKeyForAutomaticLookahead(e,r){let n=this.getLastExplicitRuleShortName();return hl(n,e,r)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,r){this.lookAheadFuncsCache.set(e,r)}},Up=class extends zt{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},ml=new Up;function UP(t){ml.reset(),t.accept(ml);let e=ml.dslMethods;return ml.reset(),e}function qp(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset)}function Vp(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.startColumn=e.startColumn,t.startLine=e.startLine,t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine)}function dA(t,e,r){t.children[r]===void 0?t.children[r]=[e]:t.children[r].push(e)}function hA(t,e,r){t.children[e]===void 0?t.children[e]=[r]:t.children[e].push(r)}var zP="name";function Gp(t,e){Object.defineProperty(t,zP,{enumerable:!1,configurable:!0,writable:!1,value:e})}function $P(t,e){let r=Pe(t),n=r.length;for(let i=0;i<n;i++){let o=r[i],s=t[o],a=s.length;for(let u=0;u<a;u++){let l=s[u];l.tokenTypeIdx===void 0&&this[l.name](l.children,e)}}}function mA(t,e){let r=function(){};Gp(r,t+"BaseSemantics");let n={visit:function(i,o){if(J(i)&&(i=i[0]),!Ft(i))return this[i.name](i.children,o)},validateVisitor:function(){let i=qP(this,e);if(!Te(i)){let o=q(i,s=>s.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
197
+ see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){let e;return t.topLevelRule instanceof Mt?e=t.topLevelRule.name:e=t.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}};function wE(t,e){let r=new Ep(t,e);return r.resolveRefs(),r.errors}var Ep=class extends Bt{constructor(e,r){super(),this.nameToTopRule=e,this.errMsgProvider=r,this.errors=[]}resolveRefs(){G(Re(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let r=this.nameToTopRule[e.nonTerminalName];if(r)e.referencedRule=r;else{let n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:n,type:bt.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}};var Ap=class extends sn{constructor(e,r){super(),this.topProd=e,this.path=r,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=Me(this.path.ruleStack).reverse(),this.occurrenceStack=Me(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,r=[]){this.found||super.walk(e,r)}walkProdRef(e,r,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let i=r.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,i)}}updateExpectedNext(){Te(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},el=class extends Ap{constructor(e,r){super(e,r),this.path=r,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,r,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let i=r.concat(n),o=new je({definition:i});this.possibleTokTypes=Ri(o),this.found=!0}}},qo=class extends sn{constructor(e,r){super(),this.topRule=e,this.occurrence=r,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},tl=class extends qo{walkMany(e,r,n){if(e.idx===this.occurrence){let i=kt(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof ve&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(e,r,n)}},Ps=class extends qo{walkManySep(e,r,n){if(e.idx===this.occurrence){let i=kt(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof ve&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(e,r,n)}},rl=class extends qo{walkAtLeastOne(e,r,n){if(e.idx===this.occurrence){let i=kt(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof ve&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(e,r,n)}},Ls=class extends qo{walkAtLeastOneSep(e,r,n){if(e.idx===this.occurrence){let i=kt(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof ve&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(e,r,n)}};function nl(t,e,r=[]){r=Me(r);let n=[],i=0;function o(a){return a.concat(st(t,i+1))}function s(a){let u=nl(o(a),e,r);return n.concat(u)}for(;r.length<e&&i<t.length;){let a=t[i];if(a instanceof je)return s(a.definition);if(a instanceof Be)return s(a.definition);if(a instanceof Ge)n=s(a.definition);else if(a instanceof at){let u=a.definition.concat([new De({definition:a.definition})]);return s(u)}else if(a instanceof ut){let u=[new je({definition:a.definition}),new De({definition:[new ve({terminalType:a.separator})].concat(a.definition)})];return s(u)}else if(a instanceof et){let u=a.definition.concat([new De({definition:[new ve({terminalType:a.separator})].concat(a.definition)})]);n=s(u)}else if(a instanceof De){let u=a.definition.concat([new De({definition:a.definition})]);n=s(u)}else{if(a instanceof tt)return G(a.definition,u=>{Te(u.definition)===!1&&(n=s(u.definition))}),n;if(a instanceof ve)r.push(a.terminalType);else throw Error("non exhaustive match")}i++}return n.push({partialPath:r,suffixDef:st(t,i)}),n}function il(t,e,r,n){let i="EXIT_NONE_TERMINAL",o=[i],s="EXIT_ALTERNATIVE",a=!1,u=e.length,l=u-n-1,c=[],f=[];for(f.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!Te(f);){let p=f.pop();if(p===s){a&&jr(f).idx<=l&&f.pop();continue}let d=p.def,m=p.idx,y=p.ruleStack,g=p.occurrenceStack;if(Te(d))continue;let b=d[0];if(b===i){let w={idx:m,def:st(d),ruleStack:on(y),occurrenceStack:on(g)};f.push(w)}else if(b instanceof ve)if(m<u-1){let w=m+1,k=e[w];if(r(k,b.terminalType)){let D={idx:w,def:st(d),ruleStack:y,occurrenceStack:g};f.push(D)}}else if(m===u-1)c.push({nextTokenType:b.terminalType,nextTokenOccurrence:b.idx,ruleStack:y,occurrenceStack:g}),a=!0;else throw Error("non exhaustive match");else if(b instanceof Be){let w=Me(y);w.push(b.nonTerminalName);let k=Me(g);k.push(b.idx);let D={idx:m,def:b.definition.concat(o,st(d)),ruleStack:w,occurrenceStack:k};f.push(D)}else if(b instanceof Ge){let w={idx:m,def:st(d),ruleStack:y,occurrenceStack:g};f.push(w),f.push(s);let k={idx:m,def:b.definition.concat(st(d)),ruleStack:y,occurrenceStack:g};f.push(k)}else if(b instanceof at){let w=new De({definition:b.definition,idx:b.idx}),k=b.definition.concat([w],st(d)),D={idx:m,def:k,ruleStack:y,occurrenceStack:g};f.push(D)}else if(b instanceof ut){let w=new ve({terminalType:b.separator}),k=new De({definition:[w].concat(b.definition),idx:b.idx}),D=b.definition.concat([k],st(d)),R={idx:m,def:D,ruleStack:y,occurrenceStack:g};f.push(R)}else if(b instanceof et){let w={idx:m,def:st(d),ruleStack:y,occurrenceStack:g};f.push(w),f.push(s);let k=new ve({terminalType:b.separator}),D=new De({definition:[k].concat(b.definition),idx:b.idx}),R=b.definition.concat([D],st(d)),S={idx:m,def:R,ruleStack:y,occurrenceStack:g};f.push(S)}else if(b instanceof De){let w={idx:m,def:st(d),ruleStack:y,occurrenceStack:g};f.push(w),f.push(s);let k=new De({definition:b.definition,idx:b.idx}),D=b.definition.concat([k],st(d)),R={idx:m,def:D,ruleStack:y,occurrenceStack:g};f.push(R)}else if(b instanceof tt)for(let w=b.definition.length-1;w>=0;w--){let k=b.definition[w],D={idx:m,def:k.definition.concat(st(d)),ruleStack:y,occurrenceStack:g};f.push(D),f.push(s)}else if(b instanceof je)f.push({idx:m,def:b.definition.concat(st(d)),ruleStack:y,occurrenceStack:g});else if(b instanceof Mt)f.push(QN(b,m,y,g));else throw Error("non exhaustive match")}return c}function QN(t,e,r,n){let i=Me(r);i.push(t.name);let o=Me(n);return o.push(1),{idx:e,def:t.definition,ruleStack:i,occurrenceStack:o}}var Xe;(function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"})(Xe||(Xe={}));function sl(t){if(t instanceof Ge||t==="Option")return Xe.OPTION;if(t instanceof De||t==="Repetition")return Xe.REPETITION;if(t instanceof at||t==="RepetitionMandatory")return Xe.REPETITION_MANDATORY;if(t instanceof ut||t==="RepetitionMandatoryWithSeparator")return Xe.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof et||t==="RepetitionWithSeparator")return Xe.REPETITION_WITH_SEPARATOR;if(t instanceof tt||t==="Alternation")return Xe.ALTERNATION;throw Error("non exhaustive match")}function TE(t,e,r,n,i,o){let s=Ms(t,e,r),a=DE(s)?$o:an;return o(s,n,a,i)}function _E(t,e,r,n,i,o){let s=Bs(t,e,i,r),a=DE(s)?$o:an;return o(s[0],a,n)}function SE(t,e,r,n){let i=t.length,o=Ot(t,s=>Ot(s,a=>a.length===1));if(e)return function(s){let a=V(s,u=>u.GATE);for(let u=0;u<i;u++){let l=t[u],c=l.length,f=a[u];if(!(f!==void 0&&f.call(this)===!1))e:for(let p=0;p<c;p++){let d=l[p],m=d.length;for(let y=0;y<m;y++){let g=this.LA(y+1);if(r(g,d[y])===!1)continue e}return u}}};if(o&&!n){let s=V(t,u=>xt(u)),a=dt(s,(u,l,c)=>(G(l,f=>{X(u,f.tokenTypeIdx)||(u[f.tokenTypeIdx]=c),G(f.categoryMatches,p=>{X(u,p)||(u[p]=c)})}),u),{});return function(){let u=this.LA(1);return a[u.tokenTypeIdx]}}else return function(){for(let s=0;s<i;s++){let a=t[s],u=a.length;e:for(let l=0;l<u;l++){let c=a[l],f=c.length;for(let p=0;p<f;p++){let d=this.LA(p+1);if(r(d,c[p])===!1)continue e}return s}}}}function IE(t,e,r){let n=Ot(t,o=>o.length===1),i=t.length;if(n&&!r){let o=xt(t);if(o.length===1&&Te(o[0].categoryMatches)){let a=o[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===a}}else{let s=dt(o,(a,u,l)=>(a[u.tokenTypeIdx]=!0,G(u.categoryMatches,c=>{a[c]=!0}),a),[]);return function(){let a=this.LA(1);return s[a.tokenTypeIdx]===!0}}}else return function(){e:for(let o=0;o<i;o++){let s=t[o],a=s.length;for(let u=0;u<a;u++){let l=this.LA(u+1);if(e(l,s[u])===!1)continue e}return!0}return!1}}var wp=class extends sn{constructor(e,r,n){super(),this.topProd=e,this.targetOccurrence=r,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,r,n,i){return e.idx===this.targetOccurrence&&this.targetProdType===r?(this.restDef=n.concat(i),!0):!1}walkOption(e,r,n){this.checkIsTarget(e,Xe.OPTION,r,n)||super.walkOption(e,r,n)}walkAtLeastOne(e,r,n){this.checkIsTarget(e,Xe.REPETITION_MANDATORY,r,n)||super.walkOption(e,r,n)}walkAtLeastOneSep(e,r,n){this.checkIsTarget(e,Xe.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}walkMany(e,r,n){this.checkIsTarget(e,Xe.REPETITION,r,n)||super.walkOption(e,r,n)}walkManySep(e,r,n){this.checkIsTarget(e,Xe.REPETITION_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}},ol=class extends Bt{constructor(e,r,n){super(),this.targetOccurrence=e,this.targetProdType=r,this.targetRef=n,this.result=[]}checkIsTarget(e,r){e.idx===this.targetOccurrence&&this.targetProdType===r&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,Xe.OPTION)}visitRepetition(e){this.checkIsTarget(e,Xe.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Xe.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Xe.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Xe.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Xe.ALTERNATION)}};function CE(t){let e=new Array(t);for(let r=0;r<t;r++)e[r]=[];return e}function kp(t){let e=[""];for(let r=0;r<t.length;r++){let n=t[r],i=[];for(let o=0;o<e.length;o++){let s=e[o];i.push(s+"_"+n.tokenTypeIdx);for(let a=0;a<n.categoryMatches.length;a++){let u="_"+n.categoryMatches[a];i.push(s+u)}}e=i}return e}function eP(t,e,r){for(let n=0;n<t.length;n++){if(n===r)continue;let i=t[n];for(let o=0;o<e.length;o++){let s=e[o];if(i[s]===!0)return!1}}return!0}function OE(t,e){let r=V(t,s=>nl([s],1)),n=CE(r.length),i=V(r,s=>{let a={};return G(s,u=>{let l=kp(u.partialPath);G(l,c=>{a[c]=!0})}),a}),o=r;for(let s=1;s<=e;s++){let a=o;o=CE(a.length);for(let u=0;u<a.length;u++){let l=a[u];for(let c=0;c<l.length;c++){let f=l[c].partialPath,p=l[c].suffixDef,d=kp(f);if(eP(i,d,u)||Te(p)||f.length===e){let y=n[u];if(al(y,f)===!1){y.push(f);for(let g=0;g<d.length;g++){let b=d[g];i[u][b]=!0}}}else{let y=nl(p,s+1,f);o[u]=o[u].concat(y),G(y,g=>{let b=kp(g.partialPath);G(b,w=>{i[u][w]=!0})})}}}}return n}function Ms(t,e,r,n){let i=new ol(t,Xe.ALTERNATION,n);return e.accept(i),OE(i.result,r)}function Bs(t,e,r,n){let i=new ol(t,r);e.accept(i);let o=i.result,a=new wp(e,t,r).startWalking(),u=new je({definition:o}),l=new je({definition:a});return OE([u,l],n)}function al(t,e){e:for(let r=0;r<t.length;r++){let n=t[r];if(n.length===e.length){for(let i=0;i<n.length;i++){let o=e[i],s=n[i];if((o===s||s.categoryMatchesMap[o.tokenTypeIdx]!==void 0)===!1)continue e}return!0}}return!1}function vE(t,e){return t.length<e.length&&Ot(t,(r,n)=>{let i=e[n];return r===i||i.categoryMatchesMap[r.tokenTypeIdx]})}function DE(t){return Ot(t,e=>Ot(e,r=>Ot(r,n=>Te(n.categoryMatches))))}function RE(t){let e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName});return V(e,r=>Object.assign({type:bt.CUSTOM_LOOKAHEAD_VALIDATION},r))}function FE(t,e,r,n){let i=Lt(t,u=>tP(u,r)),o=aP(t,e,r),s=Lt(t,u=>iP(u,r)),a=Lt(t,u=>nP(u,t,n,r));return i.concat(o,s,a)}function tP(t,e){let r=new Cp;t.accept(r);let n=r.allProductions,i=op(n,rP),o=Gt(i,a=>a.length>1);return V(Re(o),a=>{let u=kt(a),l=e.buildDuplicateFoundError(t,a),c=Wt(u),f={message:l,type:bt.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:c,occurrence:u.idx},p=NE(u);return p&&(f.parameter=p),f})}function rP(t){return`${Wt(t)}_#_${t.idx}_#_${NE(t)}`}function NE(t){return t instanceof ve?t.terminalType.name:t instanceof Be?t.nonTerminalName:""}var Cp=class extends Bt{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}};function nP(t,e,r,n){let i=[];if(dt(e,(s,a)=>a.name===t.name?s+1:s,0)>1){let s=n.buildDuplicateRuleNameError({topLevelRule:t,grammarName:r});i.push({message:s,type:bt.DUPLICATE_RULE_NAME,ruleName:t.name})}return i}function PE(t,e,r){let n=[],i;return We(e,t)||(i=`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:i,type:bt.INVALID_RULE_OVERRIDE,ruleName:t})),n}function _p(t,e,r,n=[]){let i=[],o=ul(e.definition);if(Te(o))return[];{let s=t.name;We(o,t)&&i.push({message:r.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:n}),type:bt.LEFT_RECURSION,ruleName:s});let u=Bn(o,n.concat([t])),l=Lt(u,c=>{let f=Me(n);return f.push(c),_p(t,c,r,f)});return i.concat(l)}}function ul(t){let e=[];if(Te(t))return e;let r=kt(t);if(r instanceof Be)e.push(r.referencedRule);else if(r instanceof je||r instanceof Ge||r instanceof at||r instanceof ut||r instanceof et||r instanceof De)e=e.concat(ul(r.definition));else if(r instanceof tt)e=xt(V(r.definition,o=>ul(o.definition)));else if(!(r instanceof ve))throw Error("non exhaustive match");let n=Di(r),i=t.length>1;if(n&&i){let o=st(t);return e.concat(ul(o))}else return e}var js=class extends Bt{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};function LE(t,e){let r=new js;t.accept(r);let n=r.alternations;return Lt(n,o=>{let s=on(o.definition);return Lt(s,(a,u)=>{let l=il([a],[],an,1);return Te(l)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:o,emptyChoiceIdx:u}),type:bt.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:o.idx,alternative:u+1}]:[]})})}function ME(t,e,r){let n=new js;t.accept(n);let i=n.alternations;return i=jn(i,s=>s.ignoreAmbiguities===!0),Lt(i,s=>{let a=s.idx,u=s.maxLookahead||e,l=Ms(a,t,u,s),c=oP(l,s,t,r),f=sP(l,s,t,r);return c.concat(f)})}var Tp=class extends Bt{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}};function iP(t,e){let r=new js;t.accept(r);let n=r.alternations;return Lt(n,o=>o.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:o}),type:bt.TOO_MANY_ALTS,ruleName:t.name,occurrence:o.idx}]:[])}function BE(t,e,r){let n=[];return G(t,i=>{let o=new Tp;i.accept(o);let s=o.allProductions;G(s,a=>{let u=sl(a),l=a.maxLookahead||e,c=a.idx,p=Bs(c,i,u,l)[0];if(Te(xt(p))){let d=r.buildEmptyRepetitionError({topLevelRule:i,repetition:a});n.push({message:d,type:bt.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),n}function oP(t,e,r,n){let i=[],o=dt(t,(a,u,l)=>(e.definition[l].ignoreAmbiguities===!0||G(u,c=>{let f=[l];G(t,(p,d)=>{l!==d&&al(p,c)&&e.definition[d].ignoreAmbiguities!==!0&&f.push(d)}),f.length>1&&!al(i,c)&&(i.push(c),a.push({alts:f,path:c}))}),a),[]);return V(o,a=>{let u=V(a.alts,c=>c+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:u,prefixPath:a.path}),type:bt.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:e.idx,alternatives:a.alts}})}function sP(t,e,r,n){let i=dt(t,(s,a,u)=>{let l=V(a,c=>({idx:u,path:c}));return s.concat(l)},[]);return Br(Lt(i,s=>{if(e.definition[s.idx].ignoreAmbiguities===!0)return[];let u=s.idx,l=s.path,c=vt(i,p=>e.definition[p.idx].ignoreAmbiguities!==!0&&p.idx<u&&vE(p.path,l));return V(c,p=>{let d=[p.idx+1,u+1],m=e.idx===0?"":e.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:d,prefixPath:p.path}),type:bt.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:m,alternatives:d}})}))}function aP(t,e,r){let n=[],i=V(e,o=>o.name);return G(t,o=>{let s=o.name;if(We(i,s)){let a=r.buildNamespaceConflictError(o);n.push({message:a,type:bt.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:s})}}),n}function jE(t){let e=No(t,{errMsgProvider:kE}),r={};return G(t.rules,n=>{r[n.name]=n}),wE(r,e.errMsgProvider)}function UE(t){return t=No(t,{errMsgProvider:yr}),FE(t.rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}var zE="MismatchedTokenException",$E="NoViableAltException",qE="EarlyExitException",VE="NotAllInputParsedException",GE=[zE,$E,qE,VE];Object.freeze(GE);function zn(t){return We(GE,t.name)}var Vo=class extends Error{constructor(e,r){super(e),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},Mi=class extends Vo{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=zE}},Us=class extends Vo{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=$E}},zs=class extends Vo{constructor(e,r){super(e,r),this.name=VE}},$s=class extends Vo{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=qE}};var Sp={},Op="InRuleRecoveryException",Ip=class extends Error{constructor(e){super(e),this.name=Op}},ll=class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=X(e,"recoveryEnabled")?e.recoveryEnabled:jt.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=uP)}getTokenToInsert(e){let r=Li(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,r,n,i){let o=this.findReSyncTokenType(),s=this.exportLexerState(),a=[],u=!1,l=this.LA(1),c=this.LA(1),f=()=>{let p=this.LA(0),d=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:l,previous:p,ruleName:this.getCurrRuleFullName()}),m=new Mi(d,l,this.LA(0));m.resyncedTokens=on(a),this.SAVE_ERROR(m)};for(;!u;)if(this.tokenMatcher(c,i)){f();return}else if(n.call(this)){f(),e.apply(this,r);return}else this.tokenMatcher(c,o)?u=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,a));this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,r,n){return!(n===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,r)))}getFollowsForInRuleRecovery(e,r){let n=this.getCurrentGrammarPath(e,r);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,r){if(this.canRecoverWithSingleTokenInsertion(e,r))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new Ip("sad sad panda")}canPerformInRuleRecovery(e,r){return this.canRecoverWithSingleTokenInsertion(e,r)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,r){if(!this.canTokenTypeBeInsertedInRecovery(e)||Te(r))return!1;let n=this.LA(1);return Ur(r,o=>this.tokenMatcher(n,o))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){let r=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(r);return We(n,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),r=this.LA(1),n=2;for(;;){let i=Ur(e,o=>bp(r,o));if(i!==void 0)return i;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return Sp;let e=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return V(e,(n,i)=>i===0?Sp:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:r[i],inRule:this.shortRuleNameToFullName(e[i-1])})}flattenFollowSet(){let e=V(this.buildFullFollowKeyStack(),r=>this.getFollowSetFromFollowKey(r));return xt(e)}getFollowSetFromFollowKey(e){if(e===Sp)return[xr];let r=e.ruleName+e.idxInCallingRule+Gu+e.inRule;return this.resyncFollows[r]}addToResyncTokens(e,r){return this.tokenMatcher(e,xr)||r.push(e),r}reSyncTo(e){let r=[],n=this.LA(1);for(;this.tokenMatcher(n,e)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return on(r)}attemptInRepetitionRecovery(e,r,n,i,o,s,a){}getCurrentGrammarPath(e,r){let n=this.getHumanReadableRuleStack(),i=Me(this.RULE_OCCURRENCE_STACK);return{ruleStack:n,occurrenceStack:i,lastTok:e,lastTokOccurrence:r}}getHumanReadableRuleStack(){return V(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}};function uP(t,e,r,n,i,o,s){let a=this.getKeyForAutomaticLookahead(n,i),u=this.firstAfterRepMap[a];if(u===void 0){let p=this.getCurrRuleFullName(),d=this.getGAstProductions()[p];u=new o(d,i).startWalking(),this.firstAfterRepMap[a]=u}let l=u.token,c=u.occurrence,f=u.isEndOfRule;this.RULE_STACK.length===1&&f&&l===void 0&&(l=xr,c=1),!(l===void 0||c===void 0)&&this.shouldInRepetitionRecoveryBeTried(l,c,s)&&this.tryInRepetitionRecovery(t,e,r,l)}function cl(t,e,r){return r|e|t}var qs=class{constructor(e){var r;this.maxLookahead=(r=e?.maxLookahead)!==null&&r!==void 0?r:jt.maxLookahead}validate(e){let r=this.validateNoLeftRecursion(e.rules);if(Te(r)){let n=this.validateEmptyOrAlternatives(e.rules),i=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),o=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...r,...n,...i,...o]}return r}validateNoLeftRecursion(e){return Lt(e,r=>_p(r,r,yr))}validateEmptyOrAlternatives(e){return Lt(e,r=>LE(r,yr))}validateAmbiguousAlternationAlternatives(e,r){return Lt(e,n=>ME(n,r,yr))}validateSomeNonEmptyLookaheadPath(e,r){return BE(e,r,yr)}buildLookaheadForAlternation(e){return TE(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,SE)}buildLookaheadForOptional(e){return _E(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,sl(e.prodType),IE)}};var pl=class{initLooksAhead(e){this.dynamicTokensEnabled=X(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:jt.dynamicTokensEnabled,this.maxLookahead=X(e,"maxLookahead")?e.maxLookahead:jt.maxLookahead,this.lookaheadStrategy=X(e,"lookaheadStrategy")?e.lookaheadStrategy:new qs({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){G(e,r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{let{alternation:n,repetition:i,option:o,repetitionMandatory:s,repetitionMandatoryWithSeparator:a,repetitionWithSeparator:u}=lP(r);G(n,l=>{let c=l.idx===0?"":l.idx;this.TRACE_INIT(`${Wt(l)}${c}`,()=>{let f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:l.idx,rule:r,maxLookahead:l.maxLookahead||this.maxLookahead,hasPredicates:l.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),p=cl(this.fullRuleNameToShort[r.name],256,l.idx);this.setLaFuncCache(p,f)})}),G(i,l=>{this.computeLookaheadFunc(r,l.idx,768,"Repetition",l.maxLookahead,Wt(l))}),G(o,l=>{this.computeLookaheadFunc(r,l.idx,512,"Option",l.maxLookahead,Wt(l))}),G(s,l=>{this.computeLookaheadFunc(r,l.idx,1024,"RepetitionMandatory",l.maxLookahead,Wt(l))}),G(a,l=>{this.computeLookaheadFunc(r,l.idx,1536,"RepetitionMandatoryWithSeparator",l.maxLookahead,Wt(l))}),G(u,l=>{this.computeLookaheadFunc(r,l.idx,1280,"RepetitionWithSeparator",l.maxLookahead,Wt(l))})})})}computeLookaheadFunc(e,r,n,i,o,s){this.TRACE_INIT(`${s}${r===0?"":r}`,()=>{let a=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:e,maxLookahead:o||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),u=cl(this.fullRuleNameToShort[e.name],n,r);this.setLaFuncCache(u,a)})}getKeyForAutomaticLookahead(e,r){let n=this.getLastExplicitRuleShortName();return cl(n,e,r)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,r){this.lookAheadFuncsCache.set(e,r)}},vp=class extends Bt{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},fl=new vp;function lP(t){fl.reset(),t.accept(fl);let e=fl.dslMethods;return fl.reset(),e}function Fp(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset)}function Np(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.startColumn=e.startColumn,t.startLine=e.startLine,t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine)}function WE(t,e,r){t.children[r]===void 0?t.children[r]=[e]:t.children[r].push(e)}function HE(t,e,r){t.children[e]===void 0?t.children[e]=[r]:t.children[e].push(r)}var cP="name";function Pp(t,e){Object.defineProperty(t,cP,{enumerable:!1,configurable:!0,writable:!1,value:e})}function fP(t,e){let r=Pe(t),n=r.length;for(let i=0;i<n;i++){let o=r[i],s=t[o],a=s.length;for(let u=0;u<a;u++){let l=s[u];l.tokenTypeIdx===void 0&&this[l.name](l.children,e)}}}function KE(t,e){let r=function(){};Pp(r,t+"BaseSemantics");let n={visit:function(i,o){if(Q(i)&&(i=i[0]),!Dt(i))return this[i.name](i.children,o)},validateVisitor:function(){let i=pP(this,e);if(!Te(i)){let o=V(i,s=>s.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
202
198
  ${o.join(`
203
199
 
204
200
  `).replace(/\n/g,`
205
- `)}`)}}};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=e,r}function gA(t,e,r){let n=function(){};Gp(n,t+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return G(e,o=>{i[o]=$P}),n.prototype=i,n.prototype.constructor=n,n}var Wp;(function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"})(Wp||(Wp={}));function qP(t,e){return VP(t,e)}function VP(t,e){let r=Rt(e,i=>Bt(t[i])===!1),n=q(r,i=>({msg:`Missing visitor method: <${i}> on ${t.constructor.name} CST Visitor.`,type:Wp.MISSING_METHOD,methodName:i}));return $r(n)}var El=class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=Z(e,"nodeLocationTracking")?e.nodeLocationTracking:$t.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=Xe,this.cstFinallyStateUpdate=Xe,this.cstPostTerminal=Xe,this.cstPostNonTerminal=Xe,this.cstPostRule=Xe;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Vp,this.setNodeLocationFromNode=Vp,this.cstPostRule=Xe,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Xe,this.setNodeLocationFromNode=Xe,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=qp,this.setNodeLocationFromNode=qp,this.cstPostRule=Xe,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Xe,this.setNodeLocationFromNode=Xe,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=Xe,this.setNodeLocationFromNode=Xe,this.cstPostRule=Xe,this.setInitialNodeLocation=Xe;else throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let r=this.LA(1);e.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let r={name:e,children:Object.create(null)};this.setInitialNodeLocation(r),this.CST_STACK.push(r)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?(n.endOffset=r.endOffset,n.endLine=r.endLine,n.endColumn=r.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){let r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?n.endOffset=r.endOffset:n.startOffset=NaN}cstPostTerminal(e,r){let n=this.CST_STACK[this.CST_STACK.length-1];dA(n,r,e),this.setNodeLocationFromToken(n.location,r)}cstPostNonTerminal(e,r){let n=this.CST_STACK[this.CST_STACK.length-1];hA(n,r,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if(Ft(this.baseCstVisitorConstructor)){let e=mA(this.className,Pe(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(Ft(this.baseCstVisitorWithDefaultsConstructor)){let e=gA(this.className,Pe(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){let e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}};var Al=class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Yo}LA(e){let r=this.currIdx+e;return r<0||this.tokVectorLength<=r?Yo:this.tokVector[r]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}};var Cl=class{ACTION(e){return e.call(this)}consume(e,r,n){return this.consumeInternal(r,e,n)}subrule(e,r,n){return this.subruleInternal(r,e,n)}option(e,r){return this.optionInternal(r,e)}or(e,r){return this.orInternal(r,e)}many(e,r){return this.manyInternal(e,r)}atLeastOne(e,r){return this.atLeastOneInternal(e,r)}CONSUME(e,r){return this.consumeInternal(e,0,r)}CONSUME1(e,r){return this.consumeInternal(e,1,r)}CONSUME2(e,r){return this.consumeInternal(e,2,r)}CONSUME3(e,r){return this.consumeInternal(e,3,r)}CONSUME4(e,r){return this.consumeInternal(e,4,r)}CONSUME5(e,r){return this.consumeInternal(e,5,r)}CONSUME6(e,r){return this.consumeInternal(e,6,r)}CONSUME7(e,r){return this.consumeInternal(e,7,r)}CONSUME8(e,r){return this.consumeInternal(e,8,r)}CONSUME9(e,r){return this.consumeInternal(e,9,r)}SUBRULE(e,r){return this.subruleInternal(e,0,r)}SUBRULE1(e,r){return this.subruleInternal(e,1,r)}SUBRULE2(e,r){return this.subruleInternal(e,2,r)}SUBRULE3(e,r){return this.subruleInternal(e,3,r)}SUBRULE4(e,r){return this.subruleInternal(e,4,r)}SUBRULE5(e,r){return this.subruleInternal(e,5,r)}SUBRULE6(e,r){return this.subruleInternal(e,6,r)}SUBRULE7(e,r){return this.subruleInternal(e,7,r)}SUBRULE8(e,r){return this.subruleInternal(e,8,r)}SUBRULE9(e,r){return this.subruleInternal(e,9,r)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,r,n=Zo){if(He(this.definedRulesNames,e)){let s={message:wr.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:At.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);let i=this.defineRule(e,r,n);return this[e]=i,i}OVERRIDE_RULE(e,r,n=Zo){let i=rA(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);let o=this.defineRule(e,r,n);return this[e]=o,o}BACKTRACK(e,r){return function(){this.isBackTrackingStack.push(1);let n=this.saveRecogState();try{return e.apply(this,r),!0}catch(i){if(qn(i))return!1;throw i}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Ku(Re(this.gastProductionsCache))}};var wl=class{initRecognizerEngine(e,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Wo,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},Z(r,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
201
+ `)}`)}}};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=e,r}function YE(t,e,r){let n=function(){};Pp(n,t+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return G(e,o=>{i[o]=fP}),n.prototype=i,n.prototype.constructor=n,n}var Lp;(function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"})(Lp||(Lp={}));function pP(t,e){return dP(t,e)}function dP(t,e){let r=vt(e,i=>Pt(t[i])===!1),n=V(r,i=>({msg:`Missing visitor method: <${i}> on ${t.constructor.name} CST Visitor.`,type:Lp.MISSING_METHOD,methodName:i}));return Br(n)}var gl=class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=X(e,"nodeLocationTracking")?e.nodeLocationTracking:jt.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=Ze,this.cstFinallyStateUpdate=Ze,this.cstPostTerminal=Ze,this.cstPostNonTerminal=Ze,this.cstPostRule=Ze;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Np,this.setNodeLocationFromNode=Np,this.cstPostRule=Ze,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Ze,this.setNodeLocationFromNode=Ze,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Fp,this.setNodeLocationFromNode=Fp,this.cstPostRule=Ze,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Ze,this.setNodeLocationFromNode=Ze,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=Ze,this.setNodeLocationFromNode=Ze,this.cstPostRule=Ze,this.setInitialNodeLocation=Ze;else throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let r=this.LA(1);e.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let r={name:e,children:Object.create(null)};this.setInitialNodeLocation(r),this.CST_STACK.push(r)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?(n.endOffset=r.endOffset,n.endLine=r.endLine,n.endColumn=r.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){let r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?n.endOffset=r.endOffset:n.startOffset=NaN}cstPostTerminal(e,r){let n=this.CST_STACK[this.CST_STACK.length-1];WE(n,r,e),this.setNodeLocationFromToken(n.location,r)}cstPostNonTerminal(e,r){let n=this.CST_STACK[this.CST_STACK.length-1];HE(n,r,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if(Dt(this.baseCstVisitorConstructor)){let e=KE(this.className,Pe(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(Dt(this.baseCstVisitorWithDefaultsConstructor)){let e=YE(this.className,Pe(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){let e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}};var xl=class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Go}LA(e){let r=this.currIdx+e;return r<0||this.tokVectorLength<=r?Go:this.tokVector[r]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}};var yl=class{ACTION(e){return e.call(this)}consume(e,r,n){return this.consumeInternal(r,e,n)}subrule(e,r,n){return this.subruleInternal(r,e,n)}option(e,r){return this.optionInternal(r,e)}or(e,r){return this.orInternal(r,e)}many(e,r){return this.manyInternal(e,r)}atLeastOne(e,r){return this.atLeastOneInternal(e,r)}CONSUME(e,r){return this.consumeInternal(e,0,r)}CONSUME1(e,r){return this.consumeInternal(e,1,r)}CONSUME2(e,r){return this.consumeInternal(e,2,r)}CONSUME3(e,r){return this.consumeInternal(e,3,r)}CONSUME4(e,r){return this.consumeInternal(e,4,r)}CONSUME5(e,r){return this.consumeInternal(e,5,r)}CONSUME6(e,r){return this.consumeInternal(e,6,r)}CONSUME7(e,r){return this.consumeInternal(e,7,r)}CONSUME8(e,r){return this.consumeInternal(e,8,r)}CONSUME9(e,r){return this.consumeInternal(e,9,r)}SUBRULE(e,r){return this.subruleInternal(e,0,r)}SUBRULE1(e,r){return this.subruleInternal(e,1,r)}SUBRULE2(e,r){return this.subruleInternal(e,2,r)}SUBRULE3(e,r){return this.subruleInternal(e,3,r)}SUBRULE4(e,r){return this.subruleInternal(e,4,r)}SUBRULE5(e,r){return this.subruleInternal(e,5,r)}SUBRULE6(e,r){return this.subruleInternal(e,6,r)}SUBRULE7(e,r){return this.subruleInternal(e,7,r)}SUBRULE8(e,r){return this.subruleInternal(e,8,r)}SUBRULE9(e,r){return this.subruleInternal(e,9,r)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,r,n=Wo){if(We(this.definedRulesNames,e)){let s={message:yr.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:bt.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);let i=this.defineRule(e,r,n);return this[e]=i,i}OVERRIDE_RULE(e,r,n=Wo){let i=PE(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);let o=this.defineRule(e,r,n);return this[e]=o,o}BACKTRACK(e,r){return function(){this.isBackTrackingStack.push(1);let n=this.saveRecogState();try{return e.apply(this,r),!0}catch(i){if(zn(i))return!1;throw i}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Vu(Re(this.gastProductionsCache))}};var bl=class{initRecognizerEngine(e,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=$o,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},X(r,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
206
202
  See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
207
- For Further details.`);if(J(e)){if(Te(e))throw Error(`A Token Vocabulary cannot be empty.
203
+ For Further details.`);if(Q(e)){if(Te(e))throw Error(`A Token Vocabulary cannot be empty.
208
204
  Note that the first argument for the parser constructor
209
205
  is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument.
210
206
  See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
211
- For Further details.`)}if(J(e))this.tokensMap=mt(e,(o,s)=>(o[s.name]=s,o),{});else if(Z(e,"modes")&&Dt(bt(Re(e.modes)),NE)){let o=bt(Re(e.modes)),s=jo(o);this.tokensMap=mt(s,(a,u)=>(a[u.name]=u,a),{})}else if(Ze(e))this.tokensMap=Me(e);else throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=Cr;let n=Z(e,"modes")?bt(Re(e.modes)):Re(e),i=Dt(n,o=>Te(o.categoryMatches));this.tokenMatcher=i?Wo:cn,fn(Re(this.tokensMap))}defineRule(e,r,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'
212
- Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let i=Z(n,"resyncEnabled")?n.resyncEnabled:Zo.resyncEnabled,o=Z(n,"recoveryValueFunc")?n.recoveryValueFunc:Zo.recoveryValueFunc,s=this.ruleShortNameIdx<<12;this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s;let a;return this.outputCst===!0?a=function(...c){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx),r.apply(this,c);let f=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(f),f}catch(f){return this.invokeRuleCatch(f,i,o)}finally{this.ruleFinallyStateUpdate()}}:a=function(...c){try{return this.ruleInvocationStateUpdate(s,e,this.subruleIdx),r.apply(this,c)}catch(f){return this.invokeRuleCatch(f,i,o)}finally{this.ruleFinallyStateUpdate()}},Object.assign(a,{ruleName:e,originalGrammarAction:r})}invokeRuleCatch(e,r,n){let i=this.RULE_STACK.length===1,o=r&&!this.isBackTracking()&&this.recoveryEnabled;if(qn(e)){let s=e;if(o){let a=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(a))if(s.resyncedTokens=this.reSyncTo(a),this.outputCst){let u=this.CST_STACK[this.CST_STACK.length-1];return u.recoveredNode=!0,u}else return n(e);else{if(this.outputCst){let u=this.CST_STACK[this.CST_STACK.length-1];u.recoveredNode=!0,s.partialCstResult=u}throw s}}else{if(i)return this.moveToTerminatedState(),n(e);throw s}}else throw e}optionInternal(e,r){let n=this.getKeyForAutomaticLookahead(512,r);return this.optionInternalLogic(e,r,n)}optionInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),o;if(typeof e!="function"){o=e.DEF;let s=e.GATE;if(s!==void 0){let a=i;i=()=>s.call(this)&&a.call(this)}}else o=e;if(i.call(this)===!0)return o.call(this)}atLeastOneInternal(e,r){let n=this.getKeyForAutomaticLookahead(1024,e);return this.atLeastOneInternalLogic(e,r,n)}atLeastOneInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),o;if(typeof r!="function"){o=r.DEF;let s=r.GATE;if(s!==void 0){let a=i;i=()=>s.call(this)&&a.call(this)}}else o=r;if(i.call(this)===!0){let s=this.doSingleRepetition(o);for(;i.call(this)===!0&&s===!0;)s=this.doSingleRepetition(o)}else throw this.raiseEarlyExitException(e,Je.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,r],i,1024,e,sl)}atLeastOneSepFirstInternal(e,r){let n=this.getKeyForAutomaticLookahead(1536,e);this.atLeastOneSepFirstInternalLogic(e,r,n)}atLeastOneSepFirstInternalLogic(e,r,n){let i=r.DEF,o=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let a=()=>this.tokenMatcher(this.LA(1),o);for(;this.tokenMatcher(this.LA(1),o)===!0;)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,o,a,i,$s],a,1536,e,$s)}else throw this.raiseEarlyExitException(e,Je.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG)}manyInternal(e,r){let n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,r,n)}manyInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),o;if(typeof r!="function"){o=r.DEF;let a=r.GATE;if(a!==void 0){let u=i;i=()=>a.call(this)&&u.call(this)}}else o=r;let s=!0;for(;i.call(this)===!0&&s===!0;)s=this.doSingleRepetition(o);this.attemptInRepetitionRecovery(this.manyInternal,[e,r],i,768,e,ol,s)}manySepFirstInternal(e,r){let n=this.getKeyForAutomaticLookahead(1280,e);this.manySepFirstInternalLogic(e,r,n)}manySepFirstInternalLogic(e,r,n){let i=r.DEF,o=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let a=()=>this.tokenMatcher(this.LA(1),o);for(;this.tokenMatcher(this.LA(1),o)===!0;)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,o,a,i,zs],a,1280,e,zs)}}repetitionSepSecondInternal(e,r,n,i,o){for(;n();)this.CONSUME(r),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,r,n,i,o],n,1536,e,o)}doSingleRepetition(e){let r=this.getLexerPosition();return e.call(this),this.getLexerPosition()>r}orInternal(e,r){let n=this.getKeyForAutomaticLookahead(256,r),i=J(e)?e:e.DEF,s=this.getLaFuncFromCache(n).call(this,i);if(s!==void 0)return i[s].ALT.call(this);this.raiseNoAltException(r,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let e=this.LA(1),r=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Hs(r,e))}}subruleInternal(e,r,n){let i;try{let o=n!==void 0?n.ARGS:void 0;return this.subruleIdx=r,i=e.apply(this,o),this.cstPostNonTerminal(i,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),i}catch(o){throw this.subruleInternalError(o,n,e.ruleName)}}subruleInternalError(e,r,n){throw qn(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,r,n){let i;try{let o=this.LA(1);this.tokenMatcher(o,e)===!0?(this.consumeToken(),i=o):this.consumeInternalError(e,o,n)}catch(o){i=this.consumeInternalRecovery(e,r,o)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,i),i}consumeInternalError(e,r,n){let i,o=this.LA(0);throw n!==void 0&&n.ERR_MSG?i=n.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:r,previous:o,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new ji(i,r,o))}consumeInternalRecovery(e,r,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){let i=this.getFollowsForInRuleRecovery(e,r);try{return this.tryInRuleRecovery(e,i)}catch(o){throw o.name===jp?n:o}}else throw n}saveRecogState(){let e=this.errors,r=Me(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,r,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(r)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Cr)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}};var kl=class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=Z(e,"errorMessageProvider")?e.errorMessageProvider:$t.errorMessageProvider}SAVE_ERROR(e){if(qn(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Me(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return Me(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,r,n){let i=this.getCurrRuleFullName(),o=this.getGAstProductions()[i],a=Vs(e,o,r,this.maxLookahead)[0],u=[];for(let c=1;c<=this.maxLookahead;c++)u.push(this.LA(c));let l=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:u,previous:this.LA(0),customUserDescription:n,ruleName:i});throw this.SAVE_ERROR(new Ks(l,this.LA(1),this.LA(0)))}raiseNoAltException(e,r){let n=this.getCurrRuleFullName(),i=this.getGAstProductions()[n],o=qs(e,i,this.maxLookahead),s=[];for(let l=1;l<=this.maxLookahead;l++)s.push(this.LA(l));let a=this.LA(0),u=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:o,actual:s,previous:a,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Ws(u,this.LA(1),a))}};var Tl=class{initContentAssist(){}computeContentAssist(e,r){let n=this.gastProductionsCache[e];if(Ft(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return ul([n],r,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){let r=kt(e.ruleStack),i=this.getGAstProductions()[r];return new il(i,e).startWalking()}};var vl={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(vl);var xA=!0,yA=Math.pow(2,8)-1,EA=xe({name:"RECORDING_PHASE_TOKEN",pattern:Se.NA});fn([EA]);var AA=Bi(EA,`This IToken indicates the Parser is in Recording Phase
213
- See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(AA);var WP={name:`This CSTNode indicates the Parser is in Recording Phase
214
- See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},_l=class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){let r=e>0?e:"";this[`CONSUME${r}`]=function(n,i){return this.consumeInternalRecord(n,e,i)},this[`SUBRULE${r}`]=function(n,i){return this.subruleInternalRecord(n,e,i)},this[`OPTION${r}`]=function(n){return this.optionInternalRecord(n,e)},this[`OR${r}`]=function(n){return this.orInternalRecord(n,e)},this[`MANY${r}`]=function(n){this.manyInternalRecord(e,n)},this[`MANY_SEP${r}`]=function(n){this.manySepFirstInternalRecord(e,n)},this[`AT_LEAST_ONE${r}`]=function(n){this.atLeastOneInternalRecord(e,n)},this[`AT_LEAST_ONE_SEP${r}`]=function(n){this.atLeastOneSepFirstInternalRecord(e,n)}}this.consume=function(e,r,n){return this.consumeInternalRecord(r,e,n)},this.subrule=function(e,r,n){return this.subruleInternalRecord(r,e,n)},this.option=function(e,r){return this.optionInternalRecord(r,e)},this.or=function(e,r){return this.orInternalRecord(r,e)},this.many=function(e,r){this.manyInternalRecord(e,r)},this.atLeastOne=function(e,r){this.atLeastOneInternalRecord(e,r)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{let e=this;for(let r=0;r<10;r++){let n=r>0?r:"";delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,r){return()=>!0}LA_RECORD(e){return Yo}topLevelRuleRecord(e,r){try{let n=new Ut({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),r.call(this),this.recordingProdStack.pop(),n}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+`
207
+ For Further details.`)}if(Q(e))this.tokensMap=dt(e,(o,s)=>(o[s.name]=s,o),{});else if(X(e,"modes")&&Ot(xt(Re(e.modes)),dE)){let o=xt(Re(e.modes)),s=Po(o);this.tokensMap=dt(s,(a,u)=>(a[u.name]=u,a),{})}else if(Ye(e))this.tokensMap=Me(e);else throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=xr;let n=X(e,"modes")?xt(Re(e.modes)):Re(e),i=Ot(n,o=>Te(o.categoryMatches));this.tokenMatcher=i?$o:an,un(Re(this.tokensMap))}defineRule(e,r,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'
208
+ Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let i=X(n,"resyncEnabled")?n.resyncEnabled:Wo.resyncEnabled,o=X(n,"recoveryValueFunc")?n.recoveryValueFunc:Wo.recoveryValueFunc,s=this.ruleShortNameIdx<<12;this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s;let a;return this.outputCst===!0?a=function(...c){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx),r.apply(this,c);let f=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(f),f}catch(f){return this.invokeRuleCatch(f,i,o)}finally{this.ruleFinallyStateUpdate()}}:a=function(...c){try{return this.ruleInvocationStateUpdate(s,e,this.subruleIdx),r.apply(this,c)}catch(f){return this.invokeRuleCatch(f,i,o)}finally{this.ruleFinallyStateUpdate()}},Object.assign(a,{ruleName:e,originalGrammarAction:r})}invokeRuleCatch(e,r,n){let i=this.RULE_STACK.length===1,o=r&&!this.isBackTracking()&&this.recoveryEnabled;if(zn(e)){let s=e;if(o){let a=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(a))if(s.resyncedTokens=this.reSyncTo(a),this.outputCst){let u=this.CST_STACK[this.CST_STACK.length-1];return u.recoveredNode=!0,u}else return n(e);else{if(this.outputCst){let u=this.CST_STACK[this.CST_STACK.length-1];u.recoveredNode=!0,s.partialCstResult=u}throw s}}else{if(i)return this.moveToTerminatedState(),n(e);throw s}}else throw e}optionInternal(e,r){let n=this.getKeyForAutomaticLookahead(512,r);return this.optionInternalLogic(e,r,n)}optionInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),o;if(typeof e!="function"){o=e.DEF;let s=e.GATE;if(s!==void 0){let a=i;i=()=>s.call(this)&&a.call(this)}}else o=e;if(i.call(this)===!0)return o.call(this)}atLeastOneInternal(e,r){let n=this.getKeyForAutomaticLookahead(1024,e);return this.atLeastOneInternalLogic(e,r,n)}atLeastOneInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),o;if(typeof r!="function"){o=r.DEF;let s=r.GATE;if(s!==void 0){let a=i;i=()=>s.call(this)&&a.call(this)}}else o=r;if(i.call(this)===!0){let s=this.doSingleRepetition(o);for(;i.call(this)===!0&&s===!0;)s=this.doSingleRepetition(o)}else throw this.raiseEarlyExitException(e,Xe.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,r],i,1024,e,rl)}atLeastOneSepFirstInternal(e,r){let n=this.getKeyForAutomaticLookahead(1536,e);this.atLeastOneSepFirstInternalLogic(e,r,n)}atLeastOneSepFirstInternalLogic(e,r,n){let i=r.DEF,o=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let a=()=>this.tokenMatcher(this.LA(1),o);for(;this.tokenMatcher(this.LA(1),o)===!0;)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,o,a,i,Ls],a,1536,e,Ls)}else throw this.raiseEarlyExitException(e,Xe.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG)}manyInternal(e,r){let n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,r,n)}manyInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),o;if(typeof r!="function"){o=r.DEF;let a=r.GATE;if(a!==void 0){let u=i;i=()=>a.call(this)&&u.call(this)}}else o=r;let s=!0;for(;i.call(this)===!0&&s===!0;)s=this.doSingleRepetition(o);this.attemptInRepetitionRecovery(this.manyInternal,[e,r],i,768,e,tl,s)}manySepFirstInternal(e,r){let n=this.getKeyForAutomaticLookahead(1280,e);this.manySepFirstInternalLogic(e,r,n)}manySepFirstInternalLogic(e,r,n){let i=r.DEF,o=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let a=()=>this.tokenMatcher(this.LA(1),o);for(;this.tokenMatcher(this.LA(1),o)===!0;)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,o,a,i,Ps],a,1280,e,Ps)}}repetitionSepSecondInternal(e,r,n,i,o){for(;n();)this.CONSUME(r),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,r,n,i,o],n,1536,e,o)}doSingleRepetition(e){let r=this.getLexerPosition();return e.call(this),this.getLexerPosition()>r}orInternal(e,r){let n=this.getKeyForAutomaticLookahead(256,r),i=Q(e)?e:e.DEF,s=this.getLaFuncFromCache(n).call(this,i);if(s!==void 0)return i[s].ALT.call(this);this.raiseNoAltException(r,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let e=this.LA(1),r=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new zs(r,e))}}subruleInternal(e,r,n){let i;try{let o=n!==void 0?n.ARGS:void 0;return this.subruleIdx=r,i=e.apply(this,o),this.cstPostNonTerminal(i,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),i}catch(o){throw this.subruleInternalError(o,n,e.ruleName)}}subruleInternalError(e,r,n){throw zn(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,r,n){let i;try{let o=this.LA(1);this.tokenMatcher(o,e)===!0?(this.consumeToken(),i=o):this.consumeInternalError(e,o,n)}catch(o){i=this.consumeInternalRecovery(e,r,o)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,i),i}consumeInternalError(e,r,n){let i,o=this.LA(0);throw n!==void 0&&n.ERR_MSG?i=n.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:r,previous:o,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Mi(i,r,o))}consumeInternalRecovery(e,r,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){let i=this.getFollowsForInRuleRecovery(e,r);try{return this.tryInRuleRecovery(e,i)}catch(o){throw o.name===Op?n:o}}else throw n}saveRecogState(){let e=this.errors,r=Me(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,r,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(r)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),xr)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}};var El=class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=X(e,"errorMessageProvider")?e.errorMessageProvider:jt.errorMessageProvider}SAVE_ERROR(e){if(zn(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Me(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return Me(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,r,n){let i=this.getCurrRuleFullName(),o=this.getGAstProductions()[i],a=Bs(e,o,r,this.maxLookahead)[0],u=[];for(let c=1;c<=this.maxLookahead;c++)u.push(this.LA(c));let l=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:u,previous:this.LA(0),customUserDescription:n,ruleName:i});throw this.SAVE_ERROR(new $s(l,this.LA(1),this.LA(0)))}raiseNoAltException(e,r){let n=this.getCurrRuleFullName(),i=this.getGAstProductions()[n],o=Ms(e,i,this.maxLookahead),s=[];for(let l=1;l<=this.maxLookahead;l++)s.push(this.LA(l));let a=this.LA(0),u=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:o,actual:s,previous:a,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Us(u,this.LA(1),a))}};var Al=class{initContentAssist(){}computeContentAssist(e,r){let n=this.gastProductionsCache[e];if(Dt(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return il([n],r,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){let r=kt(e.ruleStack),i=this.getGAstProductions()[r];return new el(i,e).startWalking()}};var Cl={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Cl);var ZE=!0,XE=Math.pow(2,8)-1,QE=xe({name:"RECORDING_PHASE_TOKEN",pattern:Ie.NA});un([QE]);var eA=Li(QE,`This IToken indicates the Parser is in Recording Phase
209
+ See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(eA);var mP={name:`This CSTNode indicates the Parser is in Recording Phase
210
+ See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},kl=class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){let r=e>0?e:"";this[`CONSUME${r}`]=function(n,i){return this.consumeInternalRecord(n,e,i)},this[`SUBRULE${r}`]=function(n,i){return this.subruleInternalRecord(n,e,i)},this[`OPTION${r}`]=function(n){return this.optionInternalRecord(n,e)},this[`OR${r}`]=function(n){return this.orInternalRecord(n,e)},this[`MANY${r}`]=function(n){this.manyInternalRecord(e,n)},this[`MANY_SEP${r}`]=function(n){this.manySepFirstInternalRecord(e,n)},this[`AT_LEAST_ONE${r}`]=function(n){this.atLeastOneInternalRecord(e,n)},this[`AT_LEAST_ONE_SEP${r}`]=function(n){this.atLeastOneSepFirstInternalRecord(e,n)}}this.consume=function(e,r,n){return this.consumeInternalRecord(r,e,n)},this.subrule=function(e,r,n){return this.subruleInternalRecord(r,e,n)},this.option=function(e,r){return this.optionInternalRecord(r,e)},this.or=function(e,r){return this.orInternalRecord(r,e)},this.many=function(e,r){this.manyInternalRecord(e,r)},this.atLeastOne=function(e,r){this.atLeastOneInternalRecord(e,r)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{let e=this;for(let r=0;r<10;r++){let n=r>0?r:"";delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,r){return()=>!0}LA_RECORD(e){return Go}topLevelRuleRecord(e,r){try{let n=new Mt({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),r.call(this),this.recordingProdStack.pop(),n}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+`
215
211
  This error was thrown during the "grammar recording phase" For more info see:
216
- https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}}optionInternalRecord(e,r){return Xs.call(this,Ge,e,r)}atLeastOneInternalRecord(e,r){Xs.call(this,lt,r,e)}atLeastOneSepFirstInternalRecord(e,r){Xs.call(this,ct,r,e,xA)}manyInternalRecord(e,r){Xs.call(this,De,r,e)}manySepFirstInternalRecord(e,r){Xs.call(this,rt,r,e,xA)}orInternalRecord(e,r){return HP.call(this,e,r)}subruleInternalRecord(e,r,n){if(Sl(r),!e||Z(e,"ruleName")===!1){let a=new Error(`<SUBRULE${bA(r)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>
217
- inside top level rule: <${this.recordingProdStack[0].name}>`);throw a.KNOWN_RECORDER_ERROR=!0,a}let i=qr(this.recordingProdStack),o=e.ruleName,s=new Be({idx:r,nonTerminalName:o,label:n?.LABEL,referencedRule:void 0});return i.definition.push(s),this.outputCst?WP:vl}consumeInternalRecord(e,r,n){if(Sl(r),!_p(e)){let s=new Error(`<CONSUME${bA(r)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>
218
- inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}let i=qr(this.recordingProdStack),o=new Ie({idx:r,terminalType:e,label:n?.LABEL});return i.definition.push(o),AA}};function Xs(t,e,r,n=!1){Sl(r);let i=qr(this.recordingProdStack),o=Bt(e)?e:e.DEF,s=new t({definition:[],idx:r});return n&&(s.separator=e.SEP),Z(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(s),o.call(this),i.definition.push(s),this.recordingProdStack.pop(),vl}function HP(t,e){Sl(e);let r=qr(this.recordingProdStack),n=J(t)===!1,i=n===!1?t:t.DEF,o=new nt({definition:[],idx:e,ignoreAmbiguities:n&&t.IGNORE_AMBIGUITIES===!0});Z(t,"MAX_LOOKAHEAD")&&(o.maxLookahead=t.MAX_LOOKAHEAD);let s=Ds(i,a=>Bt(a.GATE));return o.hasPredicates=s,r.definition.push(o),G(i,a=>{let u=new je({definition:[]});o.definition.push(u),Z(a,"IGNORE_AMBIGUITIES")?u.ignoreAmbiguities=a.IGNORE_AMBIGUITIES:Z(a,"GATE")&&(u.ignoreAmbiguities=!0),this.recordingProdStack.push(u),a.ALT.call(this),this.recordingProdStack.pop()}),vl}function bA(t){return t===0?"":`${t}`}function Sl(t){if(t<0||t>yA){let e=new Error(`Invalid DSL Method idx value: <${t}>
219
- Idx value must be a none negative value smaller than ${yA+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}var Il=class{initPerformanceTracer(e){if(Z(e,"traceInitPerf")){let r=e.traceInitPerf,n=typeof r=="number";this.traceInitMaxIdent=n?r:1/0,this.traceInitPerf=n?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=$t.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,r){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${e}>`);let{time:i,value:o}=Fs(r),s=i>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(`${n}<-- <${e}> time: ${i}ms`),this.traceInitIndent--,o}else return r()}};function CA(t,e){e.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(i=>{if(i==="constructor")return;let o=Object.getOwnPropertyDescriptor(n,i);o&&(o.get||o.set)?Object.defineProperty(t.prototype,i,o):t.prototype[i]=r.prototype[i]})})}var Yo=Bi(Cr,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Yo);var $t=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:nl,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Zo=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0}),At;(function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(At||(At={}));var Js=class t{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;let r=this.className;this.TRACE_INIT("toFastProps",()=>{Ns(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),G(this.definedRulesNames,i=>{let s=this[i].originalGrammarAction,a;this.TRACE_INIT(`${i} Rule`,()=>{a=this.topLevelRuleRecord(i,s)}),this.gastProductionsCache[i]=a})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=sA({rules:Re(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(Te(n)&&this.skipValidations===!1){let i=aA({rules:Re(this.gastProductionsCache),tokenTypes:Re(this.tokensMap),errMsgProvider:wr,grammarName:r}),o=QE({lookaheadStrategy:this.lookaheadStrategy,rules:Re(this.gastProductionsCache),tokenTypes:Re(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(i,o)}}),Te(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let i=hE(Re(this.gastProductionsCache));this.resyncFollows=i}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var i,o;(o=(i=this.lookaheadStrategy).initialize)===null||o===void 0||o.call(i,{rules:Re(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Re(this.gastProductionsCache))})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!Te(this.definitionErrors))throw e=q(this.definitionErrors,i=>i.message),new Error(`Parser Definition Errors detected:
212
+ https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}}optionInternalRecord(e,r){return Gs.call(this,Ge,e,r)}atLeastOneInternalRecord(e,r){Gs.call(this,at,r,e)}atLeastOneSepFirstInternalRecord(e,r){Gs.call(this,ut,r,e,ZE)}manyInternalRecord(e,r){Gs.call(this,De,r,e)}manySepFirstInternalRecord(e,r){Gs.call(this,et,r,e,ZE)}orInternalRecord(e,r){return gP.call(this,e,r)}subruleInternalRecord(e,r,n){if(wl(r),!e||X(e,"ruleName")===!1){let a=new Error(`<SUBRULE${JE(r)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>
213
+ inside top level rule: <${this.recordingProdStack[0].name}>`);throw a.KNOWN_RECORDER_ERROR=!0,a}let i=jr(this.recordingProdStack),o=e.ruleName,s=new Be({idx:r,nonTerminalName:o,label:n?.LABEL,referencedRule:void 0});return i.definition.push(s),this.outputCst?mP:Cl}consumeInternalRecord(e,r,n){if(wl(r),!gp(e)){let s=new Error(`<CONSUME${JE(r)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>
214
+ inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}let i=jr(this.recordingProdStack),o=new ve({idx:r,terminalType:e,label:n?.LABEL});return i.definition.push(o),eA}};function Gs(t,e,r,n=!1){wl(r);let i=jr(this.recordingProdStack),o=Pt(e)?e:e.DEF,s=new t({definition:[],idx:r});return n&&(s.separator=e.SEP),X(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(s),o.call(this),i.definition.push(s),this.recordingProdStack.pop(),Cl}function gP(t,e){wl(e);let r=jr(this.recordingProdStack),n=Q(t)===!1,i=n===!1?t:t.DEF,o=new tt({definition:[],idx:e,ignoreAmbiguities:n&&t.IGNORE_AMBIGUITIES===!0});X(t,"MAX_LOOKAHEAD")&&(o.maxLookahead=t.MAX_LOOKAHEAD);let s=Ts(i,a=>Pt(a.GATE));return o.hasPredicates=s,r.definition.push(o),G(i,a=>{let u=new je({definition:[]});o.definition.push(u),X(a,"IGNORE_AMBIGUITIES")?u.ignoreAmbiguities=a.IGNORE_AMBIGUITIES:X(a,"GATE")&&(u.ignoreAmbiguities=!0),this.recordingProdStack.push(u),a.ALT.call(this),this.recordingProdStack.pop()}),Cl}function JE(t){return t===0?"":`${t}`}function wl(t){if(t<0||t>XE){let e=new Error(`Invalid DSL Method idx value: <${t}>
215
+ Idx value must be a none negative value smaller than ${XE+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}var Tl=class{initPerformanceTracer(e){if(X(e,"traceInitPerf")){let r=e.traceInitPerf,n=typeof r=="number";this.traceInitMaxIdent=n?r:1/0,this.traceInitPerf=n?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=jt.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,r){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${e}>`);let{time:i,value:o}=Ss(r),s=i>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(`${n}<-- <${e}> time: ${i}ms`),this.traceInitIndent--,o}else return r()}};function tA(t,e){e.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(i=>{if(i==="constructor")return;let o=Object.getOwnPropertyDescriptor(n,i);o&&(o.get||o.set)?Object.defineProperty(t.prototype,i,o):t.prototype[i]=r.prototype[i]})})}var Go=Li(xr,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Go);var jt=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Qu,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Wo=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0}),bt;(function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(bt||(bt={}));var Ws=class t{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;let r=this.className;this.TRACE_INIT("toFastProps",()=>{Is(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),G(this.definedRulesNames,i=>{let s=this[i].originalGrammarAction,a;this.TRACE_INIT(`${i} Rule`,()=>{a=this.topLevelRuleRecord(i,s)}),this.gastProductionsCache[i]=a})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=jE({rules:Re(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(Te(n)&&this.skipValidations===!1){let i=UE({rules:Re(this.gastProductionsCache),tokenTypes:Re(this.tokensMap),errMsgProvider:yr,grammarName:r}),o=RE({lookaheadStrategy:this.lookaheadStrategy,rules:Re(this.gastProductionsCache),tokenTypes:Re(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(i,o)}}),Te(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let i=Hb(Re(this.gastProductionsCache));this.resyncFollows=i}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var i,o;(o=(i=this.lookaheadStrategy).initialize)===null||o===void 0||o.call(i,{rules:Re(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Re(this.gastProductionsCache))})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!Te(this.definitionErrors))throw e=V(this.definitionErrors,i=>i.message),new Error(`Parser Definition Errors detected:
220
216
  ${e.join(`
221
217
  -------------------------------
222
- `)}`)})}constructor(e,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(e,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initContentAssist(),n.initGastRecorder(r),n.initPerformanceTracer(r),Z(r,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
218
+ `)}`)})}constructor(e,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(e,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initContentAssist(),n.initGastRecorder(r),n.initPerformanceTracer(r),X(r,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
223
219
  Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
224
220
  See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
225
- For further details.`);this.skipValidations=Z(r,"skipValidations")?r.skipValidations:$t.skipValidations}};Js.DEFER_DEFINITION_ERRORS_HANDLING=!1;CA(Js,[dl,gl,El,Al,wl,Cl,kl,Tl,_l,Il]);var Ui=class extends Js{constructor(e,r=$t){let n=Me(r);n.outputCst=!0,super(e,n)}};var Dl=xe({name:"flag",pattern:/--[\w-]+/}),Zp=xe({longer_alt:Dl,name:"alias",pattern:/-[A-Z]/i}),wA=xe({group:Se.SKIPPED,name:"comma",pattern:/,/}),kA=xe({group:Se.SKIPPED,name:"dollar",pattern:/\$/}),Ol=xe({group:Se.SKIPPED,name:"whiteSpace",pattern:/ /}),TA=xe({group:Se.SKIPPED,name:"newLine",pattern:/\n/}),Xp=xe({name:"word",pattern:/\S+/}),ea=xe({name:"argument",pattern:/(<\S+>|\[.+\])/}),Jp=xe({name:"programDescription",pattern:/\w.+(?=\n\n {2}Usage)/}),_A=xe({group:Se.SKIPPED,name:"startUsage",pattern:/ {2}Usage\n/,push_mode:"USAGE_MODE"}),SA=xe({group:Se.SKIPPED,name:"endUsage",pattern:/\n/,pop_mode:!0}),Qp=xe({name:"startOptions",pattern:/ {2}Options\n/,push_mode:"OPTIONS_MODE"}),ed=xe({name:"startRow",pattern:/ {4}/,push_mode:"ROW_MODE"}),td=xe({name:"rowDescription",pattern:/\w.+/}),vA=xe({group:Se.SKIPPED,name:"endRow",pattern:/\n/,pop_mode:!0}),IA=xe({group:Se.SKIPPED,name:"endOptions",pattern:/\n/,pop_mode:!0}),YP=new Se({defaultMode:"DEFAULT_MODE",modes:{DEFAULT_MODE:[_A,Qp,Jp,TA,Ol],OPTIONS_MODE:[IA,ed],ROW_MODE:[vA,Zp,Dl,wA,ea,td,Ol],USAGE_MODE:[SA,kA,ea,Xp,Ol]}}),ZP=[Dl,Zp,wA,kA,Ol,TA,Xp,ea,Jp,_A,SA,Qp,ed,td,vA,IA],Kp=class extends Ui{sectionRow=this.RULE("sectionRow",()=>{this.CONSUME(ed),this.MANY(()=>{this.OR([{ALT:()=>this.CONSUME(ea)},{ALT:()=>this.CONSUME(Zp)},{ALT:()=>this.CONSUME(Dl)},{ALT:()=>this.CONSUME(td,{LABEL:"description"})}])})});optionsSection=this.RULE("optionsSection",()=>{this.CONSUME(Qp),this.MANY(()=>{this.SUBRULE(this.sectionRow)})});programHelp=this.RULE("programHelp",()=>{this.CONSUME(Jp,{LABEL:"description"}),this.AT_LEAST_ONE(()=>{this.CONSUME(Xp,{LABEL:"commandName"})}),this.MANY(()=>{this.CONSUME(ea)}),this.OPTION(()=>{this.SUBRULE(this.optionsSection)})});constructor(){super(ZP),this.performSelfAnalysis()}},Qs=new Kp,Yp=class extends Qs.getBaseCstVisitorConstructor(){constructor(){super(),this.validateVisitor()}optionsSection(e){return e.sectionRow.map(r=>this.visit(r))}programHelp(e){let{command:r,subcommand:n}=Rl(this.getString(e.commandName));return{arguments:this.getArray(e.argument),commandName:r,description:this.getString(e.description),options:e.optionsSection?this.visit(e.optionsSection):void 0,subcommandName:n}}sectionRow(e){return{aliases:this.getArray(e.alias),arguments:this.getArray(e.argument),description:this.getString(e.description,!0),flags:this.getArray(e.flag)}}clean(e){return e.replaceAll(/^[\s[]*(default:)?\s*|[\s\]]*$/g,"")}getArray(e){if(e!==void 0)return e.map(r=>r.image)}getString(e,r=!1){if(e!==void 0)return e.map(n=>r?this.clean(n.image):n.image).join(" ")}},XP=new Yp;function OA(t){let e=YP.tokenize(t);if(e.errors.length>0)throw new Error(`Errors lexing CLI command: ${JSON.stringify(e.errors,void 0,2)}`);Qs.input=e.tokens;let r=Qs.programHelp();if(Qs.errors.length>0)throw new Error(`Errors parsing CLI command help text: ${JSON.stringify(Qs.errors,void 0,2)}`);let n;try{n=XP.visit(r)}catch(i){if(i instanceof Error)throw new TypeError(`Errors visiting CLI command help text: ${String(i)}`)}if(n===void 0)throw new Error("Could not parse help string");return n}var od=xe({name:"flag",pattern:/--[\w-]+/}),sd=xe({name:"alias",pattern:/-[A-Z]/i}),DA=xe({group:Se.SKIPPED,name:"comma",pattern:/,/}),Xo=xe({name:"word",pattern:/\S+/}),ra=xe({name:"argument",pattern:/<\S+>|\[\S+\]/}),ad=xe({name:"type",pattern:/\[(boolean|string|array|number)\]/}),ud=xe({name:"defaultInfo",pattern:/\[default\]/}),ld=xe({name:"required",pattern:/\[required\]/}),cd=xe({name:"defaultInfoDescription",pattern:/\[default:\s.+\]/}),fd=xe({name:"choices",pattern:/\[choices:\s.+?\]/}),rd=xe({group:Se.SKIPPED,name:"whiteSpace",pattern:/\s/}),RA=xe({group:Se.SKIPPED,name:"startProgramDescription",pattern:/\n\n/,push_mode:"PROGRAM_DESCRIPTION_MODE"}),pd=xe({name:"programDescription",pattern:/.+/}),FA=xe({group:Se.SKIPPED,name:"endProgramDescription",pattern:/\n\n/,pop_mode:!0}),dd=xe({name:"startOptionsSection",pattern:/Options:?\n/,push_mode:"SECTION_MODE"}),hd=xe({name:"startPositionalsSection",pattern:/Positionals:\n/,push_mode:"SECTION_MODE"}),md=xe({name:"startCommandsSection",pattern:/Commands:\n/,push_mode:"SECTION_MODE"}),gd=xe({name:"startRow",pattern:/ {2,}/,push_mode:"ROW_MODE"}),xd=xe({name:"rowDescription",pattern:/ {2}\w.+ {2}/}),yd=xe({name:"rowDescriptionTerminal",pattern:/ {2}\w.+/}),NA=xe({group:Se.SKIPPED,name:"endRow",pattern:/\n/,pop_mode:!0}),PA=xe({group:Se.SKIPPED,name:"endSection",pattern:/\n+/,pop_mode:!0}),JP=new Se({defaultMode:"DEFAULT_MODE",modes:{DEFAULT_MODE:[dd,hd,md,RA,ra,Xo,rd],PROGRAM_DESCRIPTION_MODE:[FA,pd],ROW_MODE:[NA,DA,ad,xd,yd,cd,ud,ld,fd,od,sd,ra,Xo,rd],SECTION_MODE:[gd,PA]}}),QP=[od,sd,DA,Xo,ra,ad,ud,ld,cd,fd,rd,RA,pd,FA,dd,hd,md,gd,xd,yd,NA,PA],nd=class extends Ui{sectionRow=this.RULE("sectionRow",()=>{this.CONSUME(gd),this.OPTION(()=>{this.CONSUME(Xo,{LABEL:"parentCommandName"})}),this.MANY(()=>{this.CONSUME1(Xo,{LABEL:"commandName"})}),this.MANY1(()=>{this.OR([{ALT:()=>this.CONSUME(ra)},{ALT:()=>this.CONSUME(sd)},{ALT:()=>this.CONSUME(od)},{ALT:()=>this.CONSUME(xd,{LABEL:"description"})},{ALT:()=>this.CONSUME(yd,{LABEL:"description"})},{ALT:()=>this.CONSUME(ad)},{ALT:()=>this.CONSUME(ld)},{ALT:()=>this.CONSUME(cd)},{ALT:()=>this.CONSUME(ud)},{ALT:()=>this.CONSUME(fd)}])})});commandsSection=this.RULE("commandsSection",()=>{this.CONSUME(md),this.MANY1(()=>{this.SUBRULE1(this.sectionRow)})});optionsSection=this.RULE("optionsSection",()=>{this.CONSUME(dd),this.MANY2(()=>{this.SUBRULE2(this.sectionRow)})});positionalsSection=this.RULE("positionalsSection",()=>{this.CONSUME(hd),this.MANY(()=>{this.SUBRULE(this.sectionRow)})});programHelp=this.RULE("programHelp",()=>{this.AT_LEAST_ONE(()=>{this.CONSUME(Xo,{LABEL:"commandName"})}),this.MANY1(()=>{this.CONSUME(ra)}),this.OPTION(()=>{this.CONSUME(pd,{LABEL:"description"})}),this.OPTION1(()=>{this.SUBRULE(this.commandsSection)}),this.OPTION2(()=>{this.SUBRULE(this.positionalsSection)}),this.OPTION3(()=>{this.SUBRULE(this.optionsSection)})});constructor(){super(QP),this.performSelfAnalysis()}},ta=new nd,id=class extends ta.getBaseCstVisitorConstructor(){constructor(){super(),this.validateVisitor()}commandsSection(e){return e.sectionRow.map(r=>this.visit(r))}optionsSection(e){return e.sectionRow.map(r=>this.visit(r))}positionalsSection(e){return e.sectionRow.map(r=>this.positionalParentCommandToArguments(this.visit(r)))}programHelp(e){let{command:r,subcommand:n}=Rl(this.getString(e.commandName));return{arguments:this.getArray(e.argument),commandName:r,commands:e.commandsSection?this.visit(e.commandsSection):void 0,description:this.getString(e.description),options:e.optionsSection?this.visit(e.optionsSection):void 0,positionals:e.positionalsSection?this.visit(e.positionalsSection):void 0,subcommandName:n}}sectionRow(e){return{aliases:this.getArray(e.alias),arguments:this.getArray(e.argument),choices:this.splitChoices(this.getString(e.choices)),commandName:this.getString(e.commandName),default:e.defaultInfo?!0:void 0,defaultValue:this.getString(e.defaultInfoDescription,!0),description:this.getString(e.description,!0),flags:this.getArray(e.flag),parentCommandName:this.getString(e.parentCommandName),required:e.required?!0:void 0,type:this.getString(e.type,!0)}}clean(e){return e.endsWith("]]")?e.replaceAll(/(^\[default:\s*)|(\]$)/g,""):e.replaceAll(/^[\s[]*(default:)?\s*|[\s\]]*$/g,"")}getArray(e){if(e!==void 0)return e.map(r=>r.image)}getString(e,r=!1){if(e!==void 0)return e.map(n=>r?this.clean(n.image):n.image).join(" ")}positionalParentCommandToArguments(e){let{arguments:r,parentCommandName:n,...i}=e;return n===void 0?e:{arguments:[n,...r??[]],...i}}splitChoices(e){if(e!==void 0)return this.clean(e.replaceAll(/^\[choices:\s/g,"")).split(", ")}},eL=new id;function LA(t){let e=JP.tokenize(t);if(e.errors.length>0)throw new Error(`Errors lexing CLI command: ${JSON.stringify(e.errors,void 0,2)}`);ta.input=e.tokens;let r=ta.programHelp();if(ta.errors.length>0)throw new Error(`Errors parsing CLI command help text: ${JSON.stringify(ta.errors,void 0,2)}`);let n;try{n=eL.visit(r)}catch(i){if(i instanceof Error)throw new TypeError(`Errors visiting CLI command help text: ${String(i)}`)}if(n===void 0)throw new Error("Could not parse help string");return n}var MA={yargs:LA,meow:OA};function Rl(t){if(t===void 0)throw new Error('Could not find "commandName" entry in help');let e=t.split(" ");if(e.length===0)throw new Error('Could not find "commandName" entry in help');if(e.length===1)return{command:e[0],subcommand:void 0};let r=e.at(-1);return{command:e.slice(0,-1).join(" "),subcommand:r}}function BA(t){for(let[e,r]of Object.entries(MA)){bd.info(`Trying to parse help string with ${e} parser...`);try{return r(t)}catch(n){n instanceof Error&&bd.info(`Error in "${e}" parser: ${String(n)}`);continue}}bd.error("Could not parse help string with any parser")}async function Ed(t,e="--help",r){let n=`${t} ${e}`,i=await iL(n),o=BA(i);return o===void 0?(jA.warn("Falling back to basic cli help text output."),nL(i)):rL(t,e,r??Number.MAX_SAFE_INTEGER,o)}async function rL(t,e,r,n){if(r<=0)return jA.info("Max CLI command help depth reached, stopping recursion"),"";let i=Ax(n,r),o=t.split(" ")[0];if(n.commands)for(let s of n.commands){if(!s.parentCommandName||!s.commandName)continue;let a=await Ed(`${o} ${s.commandName}`,e,r-1);if(a==="")return i;i+=`
221
+ For further details.`);this.skipValidations=X(r,"skipValidations")?r.skipValidations:jt.skipValidations}};Ws.DEFER_DEFINITION_ERRORS_HANDLING=!1;tA(Ws,[ll,pl,gl,xl,bl,yl,El,Al,kl,Tl]);var Bi=class extends Ws{constructor(e,r=jt){let n=Me(r);n.outputCst=!0,super(e,n)}};var Sl=xe({name:"flag",pattern:/--[\w-]+/}),Up=xe({longer_alt:Sl,name:"alias",pattern:/-[A-Z]/i}),rA=xe({group:Ie.SKIPPED,name:"comma",pattern:/,/}),nA=xe({group:Ie.SKIPPED,name:"dollar",pattern:/\$/}),_l=xe({group:Ie.SKIPPED,name:"whiteSpace",pattern:/ /}),iA=xe({group:Ie.SKIPPED,name:"newLine",pattern:/\n/}),zp=xe({name:"word",pattern:/\S+/}),Ks=xe({name:"argument",pattern:/(<\S+>|\[.+\])/}),$p=xe({name:"programDescription",pattern:/\w.+(?=\n\n {2}Usage)/}),oA=xe({group:Ie.SKIPPED,name:"startUsage",pattern:/ {2}Usage\n/,push_mode:"USAGE_MODE"}),sA=xe({group:Ie.SKIPPED,name:"endUsage",pattern:/\n/,pop_mode:!0}),qp=xe({name:"startOptions",pattern:/ {2}Options\n/,push_mode:"OPTIONS_MODE"}),Vp=xe({name:"startRow",pattern:/ {4}/,push_mode:"ROW_MODE"}),Gp=xe({name:"rowDescription",pattern:/\w.+/}),aA=xe({group:Ie.SKIPPED,name:"endRow",pattern:/\n/,pop_mode:!0}),uA=xe({group:Ie.SKIPPED,name:"endOptions",pattern:/\n/,pop_mode:!0}),yP=new Ie({defaultMode:"DEFAULT_MODE",modes:{DEFAULT_MODE:[oA,qp,$p,iA,_l],OPTIONS_MODE:[uA,Vp],ROW_MODE:[aA,Up,Sl,rA,Ks,Gp,_l],USAGE_MODE:[sA,nA,Ks,zp,_l]}}),bP=[Sl,Up,rA,nA,_l,iA,zp,Ks,$p,oA,sA,qp,Vp,Gp,aA,uA],Bp=class extends Bi{sectionRow=this.RULE("sectionRow",()=>{this.CONSUME(Vp),this.MANY(()=>{this.OR([{ALT:()=>this.CONSUME(Ks)},{ALT:()=>this.CONSUME(Up)},{ALT:()=>this.CONSUME(Sl)},{ALT:()=>this.CONSUME(Gp,{LABEL:"description"})}])})});optionsSection=this.RULE("optionsSection",()=>{this.CONSUME(qp),this.MANY(()=>{this.SUBRULE(this.sectionRow)})});programHelp=this.RULE("programHelp",()=>{this.CONSUME($p,{LABEL:"description"}),this.AT_LEAST_ONE(()=>{this.CONSUME(zp,{LABEL:"commandName"})}),this.MANY(()=>{this.CONSUME(Ks)}),this.OPTION(()=>{this.SUBRULE(this.optionsSection)})});constructor(){super(bP),this.performSelfAnalysis()}},Hs=new Bp,jp=class extends Hs.getBaseCstVisitorConstructor(){constructor(){super(),this.validateVisitor()}optionsSection(e){return e.sectionRow.map(r=>this.visit(r))}programHelp(e){let{command:r,subcommand:n}=Il(this.getString(e.commandName));return{arguments:this.getArray(e.argument),commandName:r,description:this.getString(e.description),options:e.optionsSection?this.visit(e.optionsSection):void 0,subcommandName:n}}sectionRow(e){return{aliases:this.getArray(e.alias),arguments:this.getArray(e.argument),description:this.getString(e.description,!0),flags:this.getArray(e.flag)}}clean(e){return e.replaceAll(/^[\s[]*(default:)?\s*|[\s\]]*$/g,"")}getArray(e){if(e!==void 0)return e.map(r=>r.image)}getString(e,r=!1){if(e!==void 0)return e.map(n=>r?this.clean(n.image):n.image).join(" ")}},EP=new jp;function lA(t){let e=yP.tokenize(t);if(e.errors.length>0)throw new Error(`Errors lexing CLI command: ${JSON.stringify(e.errors,void 0,2)}`);Hs.input=e.tokens;let r=Hs.programHelp();if(Hs.errors.length>0)throw new Error(`Errors parsing CLI command help text: ${JSON.stringify(Hs.errors,void 0,2)}`);let n;try{n=EP.visit(r)}catch(i){if(i instanceof Error)throw new TypeError(`Errors visiting CLI command help text: ${String(i)}`)}if(n===void 0)throw new Error("Could not parse help string");return n}var Yp=xe({name:"flag",pattern:/--[\w-]+/}),Zp=xe({name:"alias",pattern:/-[A-Z]/i}),cA=xe({group:Ie.SKIPPED,name:"comma",pattern:/,/}),Ho=xe({name:"word",pattern:/\S+/}),Zs=xe({name:"argument",pattern:/<\S+>|\[\S+\]/}),Xp=xe({name:"type",pattern:/\[(boolean|string|array|number)\]/}),Jp=xe({name:"defaultInfo",pattern:/\[default\]/}),Qp=xe({name:"required",pattern:/\[required\]/}),ed=xe({name:"defaultInfoDescription",pattern:/\[default:\s.+\]/}),td=xe({name:"choices",pattern:/\[choices:\s.+?\]/}),Wp=xe({group:Ie.SKIPPED,name:"whiteSpace",pattern:/\s/}),fA=xe({group:Ie.SKIPPED,name:"startProgramDescription",pattern:/\n\n/,push_mode:"PROGRAM_DESCRIPTION_MODE"}),rd=xe({name:"programDescription",pattern:/.+/}),pA=xe({group:Ie.SKIPPED,name:"endProgramDescription",pattern:/\n\n/,pop_mode:!0}),nd=xe({name:"startOptionsSection",pattern:/Options:?\n/,push_mode:"SECTION_MODE"}),id=xe({name:"startPositionalsSection",pattern:/Positionals:\n/,push_mode:"SECTION_MODE"}),od=xe({name:"startCommandsSection",pattern:/Commands:\n/,push_mode:"SECTION_MODE"}),sd=xe({name:"startRow",pattern:/ {2,}/,push_mode:"ROW_MODE"}),ad=xe({name:"rowDescription",pattern:/ {2}\w.+ {2}/}),ud=xe({name:"rowDescriptionTerminal",pattern:/ {2}\w.+/}),dA=xe({group:Ie.SKIPPED,name:"endRow",pattern:/\n/,pop_mode:!0}),hA=xe({group:Ie.SKIPPED,name:"endSection",pattern:/\n+/,pop_mode:!0}),AP=new Ie({defaultMode:"DEFAULT_MODE",modes:{DEFAULT_MODE:[nd,id,od,fA,Zs,Ho,Wp],PROGRAM_DESCRIPTION_MODE:[pA,rd],ROW_MODE:[dA,cA,Xp,ad,ud,ed,Jp,Qp,td,Yp,Zp,Zs,Ho,Wp],SECTION_MODE:[sd,hA]}}),kP=[Yp,Zp,cA,Ho,Zs,Xp,Jp,Qp,ed,td,Wp,fA,rd,pA,nd,id,od,sd,ad,ud,dA,hA],Hp=class extends Bi{sectionRow=this.RULE("sectionRow",()=>{this.CONSUME(sd),this.OPTION(()=>{this.CONSUME(Ho,{LABEL:"parentCommandName"})}),this.MANY(()=>{this.CONSUME1(Ho,{LABEL:"commandName"})}),this.MANY1(()=>{this.OR([{ALT:()=>this.CONSUME(Zs)},{ALT:()=>this.CONSUME(Zp)},{ALT:()=>this.CONSUME(Yp)},{ALT:()=>this.CONSUME(ad,{LABEL:"description"})},{ALT:()=>this.CONSUME(ud,{LABEL:"description"})},{ALT:()=>this.CONSUME(Xp)},{ALT:()=>this.CONSUME(Qp)},{ALT:()=>this.CONSUME(ed)},{ALT:()=>this.CONSUME(Jp)},{ALT:()=>this.CONSUME(td)}])})});commandsSection=this.RULE("commandsSection",()=>{this.CONSUME(od),this.MANY1(()=>{this.SUBRULE1(this.sectionRow)})});optionsSection=this.RULE("optionsSection",()=>{this.CONSUME(nd),this.MANY2(()=>{this.SUBRULE2(this.sectionRow)})});positionalsSection=this.RULE("positionalsSection",()=>{this.CONSUME(id),this.MANY(()=>{this.SUBRULE(this.sectionRow)})});programHelp=this.RULE("programHelp",()=>{this.AT_LEAST_ONE(()=>{this.CONSUME(Ho,{LABEL:"commandName"})}),this.MANY1(()=>{this.CONSUME(Zs)}),this.OPTION(()=>{this.CONSUME(rd,{LABEL:"description"})}),this.OPTION1(()=>{this.SUBRULE(this.commandsSection)}),this.OPTION2(()=>{this.SUBRULE(this.positionalsSection)}),this.OPTION3(()=>{this.SUBRULE(this.optionsSection)})});constructor(){super(kP),this.performSelfAnalysis()}},Ys=new Hp,Kp=class extends Ys.getBaseCstVisitorConstructor(){constructor(){super(),this.validateVisitor()}commandsSection(e){return e.sectionRow.map(r=>this.visit(r))}optionsSection(e){return e.sectionRow.map(r=>this.visit(r))}positionalsSection(e){return e.sectionRow.map(r=>this.positionalParentCommandToArguments(this.visit(r)))}programHelp(e){let{command:r,subcommand:n}=Il(this.getString(e.commandName));return{arguments:this.getArray(e.argument),commandName:r,commands:e.commandsSection?this.visit(e.commandsSection):void 0,description:this.getString(e.description),options:e.optionsSection?this.visit(e.optionsSection):void 0,positionals:e.positionalsSection?this.visit(e.positionalsSection):void 0,subcommandName:n}}sectionRow(e){return{aliases:this.getArray(e.alias),arguments:this.getArray(e.argument),choices:this.splitChoices(this.getString(e.choices)),commandName:this.getString(e.commandName),default:e.defaultInfo?!0:void 0,defaultValue:this.getString(e.defaultInfoDescription,!0),description:this.getString(e.description,!0),flags:this.getArray(e.flag),parentCommandName:this.getString(e.parentCommandName),required:e.required?!0:void 0,type:this.getString(e.type,!0)}}clean(e){return e.endsWith("]]")?e.replaceAll(/(^\[default:\s*)|(\]$)/g,""):e.replaceAll(/^[\s[]*(default:)?\s*|[\s\]]*$/g,"")}getArray(e){if(e!==void 0)return e.map(r=>r.image)}getString(e,r=!1){if(e!==void 0)return e.map(n=>r?this.clean(n.image):n.image).join(" ")}positionalParentCommandToArguments(e){let{arguments:r,parentCommandName:n,...i}=e;return n===void 0?e:{arguments:[n,...r??[]],...i}}splitChoices(e){if(e!==void 0)return this.clean(e.replaceAll(/^\[choices:\s/g,"")).split(", ")}},wP=new Kp;function mA(t){let e=AP.tokenize(t);if(e.errors.length>0)throw new Error(`Errors lexing CLI command: ${JSON.stringify(e.errors,void 0,2)}`);Ys.input=e.tokens;let r=Ys.programHelp();if(Ys.errors.length>0)throw new Error(`Errors parsing CLI command help text: ${JSON.stringify(Ys.errors,void 0,2)}`);let n;try{n=wP.visit(r)}catch(i){if(i instanceof Error)throw new TypeError(`Errors visiting CLI command help text: ${String(i)}`)}if(n===void 0)throw new Error("Could not parse help string");return n}var gA={yargs:mA,meow:lA};function Il(t){if(t===void 0)throw new Error('Could not find "commandName" entry in help');let e=t.split(" ");if(e.length===0)throw new Error('Could not find "commandName" entry in help');if(e.length===1)return{command:e[0],subcommand:void 0};let r=e.at(-1);return{command:e.slice(0,-1).join(" "),subcommand:r}}function xA(t){for(let[e,r]of Object.entries(gA)){ld.info(`Trying to parse help string with ${e} parser...`);try{return r(t)}catch(n){n instanceof Error&&ld.info(`Error in "${e}" parser: ${String(n)}`);continue}}ld.error("Could not parse help string with any parser")}async function cd(t,e="--help",r){let n=`${t} ${e}`,i=await SP(n),o=xA(i);return o===void 0?(yA.warn("Falling back to basic cli help text output."),_P(i)):TP(t,e,r??Number.MAX_SAFE_INTEGER,o)}async function TP(t,e,r,n){if(r<=0)return yA.info("Max CLI command help depth reached, stopping recursion"),"";let i=ex(n,r),o=t.split(" ")[0];if(n.commands)for(let s of n.commands){if(!s.parentCommandName||!s.commandName)continue;let a=await cd(`${o} ${s.commandName}`,e,r-1);if(a==="")return i;i+=`
226
222
 
227
- ${a}`}return i}function nL(t){return`\`\`\`txt
223
+ ${a}`}return i}function _P(t){return`\`\`\`txt
228
224
  ${t}
229
- \`\`\``}async function iL(t){let e;try{let{stderr:r,stdout:n}=await tL(t);e=n,(e===void 0||e==="")&&(e=r)}catch(r){if(r instanceof Error)throw new TypeError(`Error running CLI help command: "${t}"
225
+ \`\`\``}async function SP(t){let e;try{let{stderr:r,stdout:n}=await CP(t);e=n,(e===void 0||e==="")&&(e=r)}catch(r){if(r instanceof Error)throw new TypeError(`Error running CLI help command: "${t}"
230
226
  ${r.message}
231
227
  `)}if(e===void 0||e==="")throw new Error(`No result from running CLI help command: "${t}"
232
- `);return e}import UA from"node:process";import oL from"node:path";import sL from"node:fs";import aL from"node:fs/promises";var zA=UA.platform==="win32",uL=zA?new Set(UA.env.PATHEXT?.split(";").map(t=>t.toLowerCase())):[];async function $A(t){try{return await aL.access(t,sL.X_OK),zA?uL.has(oL.extname(t)):!0}catch{return!1}}import lL from"node:path";import{log as cL}from"remark-mdat";import fL from"which";async function qA(t){return t??=await pL(),hL(t)}async function pL(){let t=await rr();if(t.bin){let e=typeof t.bin=="string"?t.bin:String(Object.values(t.bin).at(0));if(dL(e))return cL.info(`Inferred <!-- cli-help --> command to run from package.json: ${e}`),e}throw new Error(`Could not infer which command to run for the <!-- cli-help --> rule. Please pass a "cliCommand" option to the expansion comment, e.g. <!-- cli-help {cliCommand: './dist/bin.js'} -->`)}function dL(t){let e=lL.parse(t);return e.root!==""||e.dir!==""}async function hL(t){let e=await fL(t,{nothrow:!0})??void 0;if(e===void 0&&(e=await mL(t)??void 0),e!==void 0&&await $A(e))return e;throw new Error(`The cli-help rule noticed that "${e}" is not executable.`)}async function mL(t){return(await rr()).bin?.[t]??void 0}var Fl={"cli-help":{async content(t){let e=X.object({cliCommand:X.string().optional(),depth:X.number().optional(),helpFlag:X.string().optional()}).optional().parse(t),r=await qA(e?.cliCommand);return Ed(r,e?.helpFlag,e?.depth)}}};var VA={cli:gL(Fl)};import xL from"node:fs/promises";import GA from"node:path";var WA={code:{async content(t){let e=X.object({file:X.string(),language:X.string().optional()}).parse(t),r=(GA.extname(e.file)??"").replace(/^\./,""),n=await xL.readFile(GA.join(process.cwd(),e.file),"utf8");return`\`\`\`${r}
228
+ `);return e}import bA from"process";import IP from"path";import OP from"fs";import vP from"fs/promises";var EA=bA.platform==="win32",DP=EA?new Set(bA.env.PATHEXT?.split(";").map(t=>t.toLowerCase())):[];async function AA(t){try{return await vP.access(t,OP.X_OK),EA?DP.has(IP.extname(t)):!0}catch{return!1}}import RP from"path";import{log as FP}from"remark-mdat";import NP from"which";async function kA(t){return t??=await PP(),MP(t)}async function PP(){let t=await Jt();if(t.bin){let e=typeof t.bin=="string"?t.bin:String(Object.values(t.bin).at(0));if(LP(e))return FP.info(`Inferred <!-- cli-help --> command to run from package.json: ${e}`),e}throw new Error(`Could not infer which command to run for the <!-- cli-help --> rule. Please pass a "cliCommand" option to the expansion comment, e.g. <!-- cli-help {cliCommand: './dist/bin.js'} -->`)}function LP(t){let e=RP.parse(t);return e.root!==""||e.dir!==""}async function MP(t){let e=await NP(t,{nothrow:!0})??void 0;if(e??=await BP(t)??void 0,e!==void 0&&await AA(e))return e;throw new Error(`The cli-help rule noticed that "${e}" is not executable.`)}async function BP(t){return(await Jt()).bin?.[t]??void 0}var Ol={"cli-help":{async content(t){let e=K.object({cliCommand:K.string().optional(),depth:K.number().optional(),helpFlag:K.string().optional()}).optional().parse(t),r=await kA(e?.cliCommand);return cd(r,e?.helpFlag,e?.depth)}}};var wA={cli:jP(Ol)};import UP from"fs/promises";import CA from"path";var TA={code:{async content(t){let e=K.object({file:K.string(),language:K.string().optional()}).parse(t),r=(CA.extname(e.file)??"").replace(/^\./,""),n=await UP.readFile(CA.join(process.cwd(),e.file),"utf8");return`\`\`\`${r}
233
229
  ${n}
234
- \`\`\``}}};var Nl={contributing:{async content(){let e=(await rr()).bugs?.url;if(e===void 0)throw new Error('Could not find "bugs.url" entry in package.json');return`## Contributing
235
- [Issues](${e}) and pull requests are welcome.`},order:15}};var Pl={description:{async content(){let t=await rr();if(t.description===void 0)throw new Error('Could not find "description" entry in package.json');return`**${t.description}**`},order:4}};import{getSoleRule as HA}from"remark-mdat";var Ll={license:{async content(){let t=await rr(),{author:e,license:r}=t;if(e?.name===void 0)throw new Error('Could not find "author.name" entry in package.json');if(r===void 0)throw new Error('Could not find "license" entry in package.json');return`## License
236
- [${r}](license.txt) \xA9 ${e.name}`},order:16}};var KA={footer:{content:[HA(Nl),HA(Ll)],order:17}};import{getSoleRule as jl}from"remark-mdat";import{getSoleRule as yL}from"remark-mdat";var Ml={"short-description":yL(Pl)};var Bl={title:{applicationOrder:2,async content(t){let{postfix:e,prefix:r,titleCase:n}=X.object({postfix:X.string().optional().default(""),prefix:X.string().optional().default(""),titleCase:X.boolean().optional().default(!1)}).parse(t??{}),{name:i}=await rr();return`# ${r}${n?bL(i):i}${e}`},order:1}};function bL(t){return t.split(/[ _-]/).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}var YA={header:{applicationOrder:2,content:[jl(Bl),jl(yu),jl(gu),jl(Ml)],order:1}};import IL from"node:path";import kL from"node:fs/promises";import{promisify as XA}from"node:util";import{brotliCompress as TL,gzip as _L}from"node:zlib";var EL=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],AL=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],CL=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],wL=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],ZA=(t,e,r)=>{let n=t;return typeof e=="string"||Array.isArray(e)?n=t.toLocaleString(e,r):(e===!0||r!==void 0)&&(n=t.toLocaleString(void 0,r)),n};function Ad(t,e){if(!Number.isFinite(t))throw new TypeError(`Expected a finite number, got ${typeof t}: ${t}`);e={bits:!1,binary:!1,space:!0,...e};let r=e.bits?e.binary?wL:CL:e.binary?AL:EL,n=e.space?" ":"";if(e.signed&&t===0)return` 0${n}${r[0]}`;let i=t<0,o=i?"-":e.signed?"+":"";i&&(t=-t);let s;if(e.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:e.minimumFractionDigits}),e.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:e.maximumFractionDigits,...s}),t<1){let c=ZA(t,e.locale,s);return o+c+n+r[0]}let a=Math.min(Math.floor(e.binary?Math.log(t)/Math.log(1024):Math.log10(t)/3),r.length-1);t/=(e.binary?1024:1e3)**a,s||(t=t.toPrecision(3));let u=ZA(Number(t),e.locale,s),l=r[a];return o+u+n+l}var SL=XA(TL),vL=XA(_L);function Cd(t,e){let r=e===0?0:(e-t)/e*100;return{bytes:t,bytesPretty:Ad(t,{maximumFractionDigits:1}),percent:r,percentPretty:`${Math.round(r)}%`}}async function Ul(t){try{let e=await kL.readFile(t),r=e.length,[n,i]=await Promise.all([SL(e),vL(e)]);return{brotli:Cd(n.length,r),gzip:Cd(i.length,r),original:Cd(r,r)}}catch(e){throw new Error(`Failed to analyze file: ${e instanceof Error?e.message:"Unknown error"}`)}}var OL=X.object({compression:X.enum(["none","brotli","gzip"]).optional().default("none"),file:X.string()});function DL(t,e){switch(e){case"brotli":return t.brotli.bytesPretty;case"gzip":return t.gzip.bytesPretty;case"none":return t.original.bytesPretty}}var JA={size:{async content(t){let e=OL.parse(t),r=IL.join(process.cwd(),e.file),n=await Ul(r);return DL(n,e.compression)}}};import eC from"node:path";var QA=X.union([X.string(),X.array(X.string())]).transform(t=>Array.isArray(t)?t:[t]),RL=X.union([X.object({brotli:X.boolean().optional().default(!0),file:QA,gzip:X.boolean().optional().default(!0),original:X.boolean().optional().default(!0),showPercentage:X.boolean().optional().default(!1)}),X.object({brotli:X.boolean().optional().default(!0),files:QA,gzip:X.boolean().optional().default(!0),original:X.boolean().optional().default(!0),showPercentage:X.boolean().optional().default(!1)})]).transform(t=>{if("file"in t){let{file:e,...r}=t;return{files:e,...r}}return t});function FL(t,e){let r=["File"];e.original&&r.push("Original"),e.gzip&&r.push("Gzip"),e.brotli&&r.push("Brotli");let n=r.map(()=>"---"),i=t.map(([o,s])=>{let a=[eC.basename(o)];return e.original&&a.push(s.original.bytesPretty),e.gzip&&a.push(e.showPercentage?`${s.gzip.bytesPretty} (${s.gzip.percentPretty})`:s.gzip.bytesPretty),e.brotli&&a.push(e.showPercentage?`${s.brotli.bytesPretty} (${s.brotli.percentPretty})`:s.brotli.bytesPretty),a});return[`| ${r.join(" | ")} |`,`| ${n.join(" | ")} |`,...i.map(o=>`| ${o.join(" | ")} |`)].join(`
237
- `)}var tC={"size-table":{async content(t){let e=RL.parse(t),r=await Promise.all(e.files.map(async n=>{let i=eC.join(process.cwd(),n),o=await Ul(i);return[n,o]}));return FL(r,{brotli:e.brotli,gzip:e.gzip,original:e.original,showPercentage:e.showPercentage})}}};var rC=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g;var NL=Object.hasOwnProperty,na=class{constructor(){this.occurrences,this.reset()}slug(e,r){let n=this,i=PL(e,r===!0),o=i;for(;NL.call(n.occurrences,i);)n.occurrences[o]++,i=o+"-"+n.occurrences[o];return n.occurrences[i]=0,i}reset(){this.occurrences=Object.create(null)}};function PL(t,e){return typeof t!="string"?"":(e||(t=t.toLowerCase()),t.replace(rC,"").replace(/ /g,"-"))}function zl(t){return new RegExp("^("+t+")$","i")}var nC=new na;function iC(t,e,r){let n="children"in t?t.children.length:0,i=r.skip?zl(r.skip):void 0,o=Fr(r.parents||function(c){return c===t}),s=[],a,u,l;return nC.reset(),_s(t,"heading",function(c,f,p){let d=tn(c,{includeImageAlt:!1}),m=c.data&&c.data.hProperties&&c.data.hProperties.id,y=nC.slug(m||d);if(o(p)){if(f!==void 0&&e&&!a&&e.test(d)){a=f+1,l=c;return}f!==void 0&&l&&!u&&c.depth<=l.depth&&(u=f),(u||!e)&&(!r.minDepth||c.depth>=r.minDepth)&&(!r.maxDepth||c.depth<=r.maxDepth)&&(!i||!i.test(d))&&s.push({depth:c.depth,children:c.children,id:y})}}),{index:a===void 0?-1:a,endIndex:a===void 0?-1:u||n,map:s}}var oC=typeof self=="object"?self:globalThis,jL=(t,e)=>{let r=(i,o)=>(t.set(o,i),i),n=i=>{if(t.has(i))return t.get(i);let[o,s]=e[i];switch(o){case 0:case-1:return r(s,i);case 1:{let a=r([],i);for(let u of s)a.push(n(u));return a}case 2:{let a=r({},i);for(let[u,l]of s)a[n(u)]=n(l);return a}case 3:return r(new Date(s),i);case 4:{let{source:a,flags:u}=s;return r(new RegExp(a,u),i)}case 5:{let a=r(new Map,i);for(let[u,l]of s)a.set(n(u),n(l));return a}case 6:{let a=r(new Set,i);for(let u of s)a.add(n(u));return a}case 7:{let{name:a,message:u}=s;return r(new oC[a](u),i)}case 8:return r(BigInt(s),i);case"BigInt":return r(Object(BigInt(s)),i);case"ArrayBuffer":return r(new Uint8Array(s).buffer,s);case"DataView":{let{buffer:a}=new Uint8Array(s);return r(new DataView(a),s)}}return r(new oC[o](s),i)};return n},Td=t=>jL(new Map,t)(0);var Jo="",{toString:UL}={},{keys:zL}=Object,ia=t=>{let e=typeof t;if(e!=="object"||!t)return[0,e];let r=UL.call(t).slice(8,-1);switch(r){case"Array":return[1,Jo];case"Object":return[2,Jo];case"Date":return[3,Jo];case"RegExp":return[4,Jo];case"Map":return[5,Jo];case"Set":return[6,Jo];case"DataView":return[1,r]}return r.includes("Array")?[1,r]:r.includes("Error")?[7,r]:[2,r]},ql=([t,e])=>t===0&&(e==="function"||e==="symbol"),$L=(t,e,r,n)=>{let i=(s,a)=>{let u=n.push(s)-1;return r.set(a,u),u},o=s=>{if(r.has(s))return r.get(s);let[a,u]=ia(s);switch(a){case 0:{let c=s;switch(u){case"bigint":a=8,c=s.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([-1],s)}return i([a,c],s)}case 1:{if(u){let p=s;return u==="DataView"?p=new Uint8Array(s.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(s)),i([u,[...p]],s)}let c=[],f=i([a,c],s);for(let p of s)c.push(o(p));return f}case 2:{if(u)switch(u){case"BigInt":return i([u,s.toString()],s);case"Boolean":case"Number":case"String":return i([u,s.valueOf()],s)}if(e&&"toJSON"in s)return o(s.toJSON());let c=[],f=i([a,c],s);for(let p of zL(s))(t||!ql(ia(s[p])))&&c.push([o(p),o(s[p])]);return f}case 3:return i([a,s.toISOString()],s);case 4:{let{source:c,flags:f}=s;return i([a,{source:c,flags:f}],s)}case 5:{let c=[],f=i([a,c],s);for(let[p,d]of s)(t||!(ql(ia(p))||ql(ia(d))))&&c.push([o(p),o(d)]);return f}case 6:{let c=[],f=i([a,c],s);for(let p of s)(t||!ql(ia(p)))&&c.push(o(p));return f}}let{message:l}=s;return i([a,{name:u,message:l}],s)};return o},_d=(t,{json:e,lossy:r}={})=>{let n=[];return $L(!(e||r),!!e,new Map,n)(t),n};var Sd=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?Td(_d(t,e)):structuredClone(t):(t,e)=>Td(_d(t,e));function cC(t,e){let{ordered:r=!1,tight:n=!1,prefix:i}=e,o={type:"list",ordered:r,spread:!1,children:[]},s=Number.POSITIVE_INFINITY,a=-1;for(;++a<t.length;)t[a].depth<s&&(s=t[a].depth);for(a=-1;++a<t.length;)t[a].depth-=s-1;for(a=-1;++a<t.length;)oa(t[a],o,{ordered:r,tight:n,prefix:i});return o}function oa(t,e,r){let n=-1,i=e.children[e.children.length-1];if(e.type==="list")if(t.depth===1)e.children.push({type:"listItem",spread:!1,children:[{type:"paragraph",children:[{type:"link",title:null,url:"#"+(r.prefix||"")+t.id,children:vd(t.children)}]}]});else if(e.children.length>0){let o=e.children[e.children.length-1];oa(t,o,r)}else{let o={type:"listItem",spread:!1,children:[]};e.children.push(o),oa(t,o,r)}else if(i&&i.type==="list")t.depth--,oa(t,i,r);else{let o={type:"list",ordered:r.ordered,spread:!1,children:[]};e.children.push(o),t.depth--,oa(t,o,r)}if(e.type==="list"&&!r.tight){for(e.spread=!1;++n<e.children.length;)if(e.children[n].children.length>1){e.spread=!0;break}}else e.spread=!r.tight}function vd(t){let e=[],r=-1;for(;++r<t.length;){let n=qL(t[r]);Array.isArray(n)?e.push(...n):e.push(n)}return e}function qL(t){if(t.type==="footnoteReference")return[];if(t.type==="link"||t.type==="linkReference")return vd(t.children);if("children"in t){let{children:n,position:i,...o}=t;return Object.assign(Sd(o),{children:vd(t.children)})}let{position:e,...r}=t;return Sd(r)}function Id(t,e){let r=e||{},n=r.heading?zl(r.heading):void 0,i=iC(t,n,r);return{index:n?i.index:void 0,endIndex:n?i.endIndex:void 0,map:i.map.length>0?cC(i.map,r):void 0}}var Vl={"table-of-contents":{applicationOrder:1,async content(t,e){let r=X.object({depth:X.union([X.literal(1),X.literal(2),X.literal(3),X.literal(4),X.literal(5),X.literal(6)]).optional()}).optional().parse(t),n=Id(e,{heading:null,maxDepth:r?.depth??3,tight:!0}),i="## Table of contents";if(n.map===void 0)throw new Error("Could not generate table of contents");let o={children:n.map.children,type:"root"},s=mo().use(Tn).stringify(o).replaceAll(`
230
+ \`\`\``}}};var vl={contributing:{async content(){let e=(await Jt()).bugs?.url;if(e===void 0)throw new Error('Could not find "bugs.url" entry in package.json');return`## Contributing
231
+ [Issues](${e}) and pull requests are welcome.`},order:15}};var Dl={description:{async content(){let t=await Jt();if(t.description===void 0)throw new Error('Could not find "description" entry in package.json');return`**${t.description}**`},order:4}};import{getSoleRule as _A}from"remark-mdat";var Rl={license:{async content(){let t=await Jt(),{author:e,license:r}=t;if(e?.name===void 0)throw new Error('Could not find "author.name" entry in package.json');if(r===void 0)throw new Error('Could not find "license" entry in package.json');return`## License
232
+ [${r}](license.txt) \xA9 ${e.name}`},order:16}};var SA={footer:{content:[_A(vl),_A(Rl)],order:17}};import{getSoleRule as Pl}from"remark-mdat";import{getSoleRule as zP}from"remark-mdat";var Fl={"short-description":zP(Dl)};var Nl={title:{applicationOrder:2,async content(t){let{postfix:e,prefix:r,titleCase:n}=K.object({postfix:K.string().optional().default(""),prefix:K.string().optional().default(""),titleCase:K.boolean().optional().default(!1)}).parse(t??{}),{name:i}=await Jt();return`# ${r}${n?$P(i):i}${e}`},order:1}};function $P(t){return t.split(/[ _-]/).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}var IA={header:{applicationOrder:2,content:[Pl(Nl),Pl(hu),Pl(pu),Pl(Fl)],order:1}};import eL from"path";import YP from"fs/promises";import{promisify as DA}from"util";import{brotliCompress as ZP,gzip as XP}from"zlib";var qP=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],VP=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],GP=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],WP=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],OA=(t,e,r)=>{let n=t;return typeof e=="string"||Array.isArray(e)?n=t.toLocaleString(e,r):(e===!0||r!==void 0)&&(n=t.toLocaleString(void 0,r)),n},vA=t=>{if(typeof t=="number")return Math.log10(t);let e=t.toString(10);return e.length+Math.log10("0."+e.slice(0,15))},HP=t=>typeof t=="number"?Math.log(t):vA(t)*Math.log(10),KP=(t,e)=>{if(typeof t=="number")return t/e;let r=t/BigInt(e),n=t%BigInt(e);return Number(r)+Number(n)/e};function fd(t,e){if(typeof t!="bigint"&&!Number.isFinite(t))throw new TypeError(`Expected a finite number, got ${typeof t}: ${t}`);e={bits:!1,binary:!1,space:!0,...e};let r=e.bits?e.binary?WP:GP:e.binary?VP:qP,n=e.space?" ":"";if(e.signed&&(typeof t=="number"?t===0:t===0n))return` 0${n}${r[0]}`;let i=t<0,o=i?"-":e.signed?"+":"";i&&(t=-t);let s;if(e.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:e.minimumFractionDigits}),e.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:e.maximumFractionDigits,...s}),t<1){let c=OA(t,e.locale,s);return o+c+n+r[0]}let a=Math.min(Math.floor(e.binary?HP(t)/Math.log(1024):vA(t)/3),r.length-1);if(t=KP(t,(e.binary?1024:1e3)**a),!s){let c=Math.max(3,Number.parseInt(t,10).toString().length);t=t.toPrecision(c)}let u=OA(Number(t),e.locale,s),l=r[a];return o+u+n+l}var JP=DA(ZP),QP=DA(XP);function pd(t,e){let r=e===0?0:(e-t)/e*100;return{bytes:t,bytesPretty:fd(t,{maximumFractionDigits:1}),percent:r,percentPretty:`${Math.round(r)}%`}}async function Ll(t){try{let e=await YP.readFile(t),r=e.length,[n,i]=await Promise.all([JP(e),QP(e)]);return{brotli:pd(n.length,r),gzip:pd(i.length,r),original:pd(r,r)}}catch(e){throw new Error(`Failed to analyze file: ${e instanceof Error?e.message:"Unknown error"}`)}}var tL=K.object({compression:K.enum(["none","brotli","gzip"]).optional().default("none"),file:K.string()});function rL(t,e){switch(e){case"brotli":return t.brotli.bytesPretty;case"gzip":return t.gzip.bytesPretty;case"none":return t.original.bytesPretty}}var RA={size:{async content(t){let e=tL.parse(t),r=eL.join(process.cwd(),e.file),n=await Ll(r);return rL(n,e.compression)}}};import NA from"path";var FA=K.union([K.string(),K.array(K.string())]).transform(t=>Array.isArray(t)?t:[t]),nL=K.union([K.object({brotli:K.boolean().optional().default(!0),file:FA,gzip:K.boolean().optional().default(!0),original:K.boolean().optional().default(!0),showPercentage:K.boolean().optional().default(!1)}),K.object({brotli:K.boolean().optional().default(!0),files:FA,gzip:K.boolean().optional().default(!0),original:K.boolean().optional().default(!0),showPercentage:K.boolean().optional().default(!1)})]).transform(t=>{if("file"in t){let{file:e,...r}=t;return{files:e,...r}}return t});function iL(t,e){let r=["File"];e.original&&r.push("Original"),e.gzip&&r.push("Gzip"),e.brotli&&r.push("Brotli");let n=r.map(()=>"---"),i=t.map(([o,s])=>{let a=[NA.basename(o)];return e.original&&a.push(s.original.bytesPretty),e.gzip&&a.push(e.showPercentage?`${s.gzip.bytesPretty} (${s.gzip.percentPretty})`:s.gzip.bytesPretty),e.brotli&&a.push(e.showPercentage?`${s.brotli.bytesPretty} (${s.brotli.percentPretty})`:s.brotli.bytesPretty),a});return[`| ${r.join(" | ")} |`,`| ${n.join(" | ")} |`,...i.map(o=>`| ${o.join(" | ")} |`)].join(`
233
+ `)}var PA={"size-table":{async content(t){let e=nL.parse(t),r=await Promise.all(e.files.map(async n=>{let i=NA.join(process.cwd(),n),o=await Ll(i);return[n,o]}));return iL(r,{brotli:e.brotli,gzip:e.gzip,original:e.original,showPercentage:e.showPercentage})}}};var LA=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g;var oL=Object.hasOwnProperty,Xs=class{constructor(){this.occurrences,this.reset()}slug(e,r){let n=this,i=sL(e,r===!0),o=i;for(;oL.call(n.occurrences,i);)n.occurrences[o]++,i=o+"-"+n.occurrences[o];return n.occurrences[i]=0,i}reset(){this.occurrences=Object.create(null)}};function sL(t,e){return typeof t!="string"?"":(e||(t=t.toLowerCase()),t.replace(LA,"").replace(/ /g,"-"))}function Ml(t){return new RegExp("^("+t+")$","i")}var MA=new Xs;function BA(t,e,r){let n="children"in t?t.children.length:0,i=r.skip?Ml(r.skip):void 0,o=Or(r.parents||function(c){return c===t}),s=[],a,u,l;return MA.reset(),Es(t,"heading",function(c,f,p){let d=Jr(c,{includeImageAlt:!1}),m=c.data&&c.data.hProperties&&c.data.hProperties.id,y=MA.slug(m||d);if(o(p)){if(f!==void 0&&e&&!a&&e.test(d)){a=f+1,l=c;return}f!==void 0&&l&&!u&&c.depth<=l.depth&&(u=f),(u||!e)&&(!r.minDepth||c.depth>=r.minDepth)&&(!r.maxDepth||c.depth<=r.maxDepth)&&(!i||!i.test(d))&&s.push({depth:c.depth,children:c.children,id:y})}}),{index:a===void 0?-1:a,endIndex:a===void 0?-1:u||n,map:s}}var jA=typeof self=="object"?self:globalThis,cL=(t,e)=>{let r=(i,o)=>(t.set(o,i),i),n=i=>{if(t.has(i))return t.get(i);let[o,s]=e[i];switch(o){case 0:case-1:return r(s,i);case 1:{let a=r([],i);for(let u of s)a.push(n(u));return a}case 2:{let a=r({},i);for(let[u,l]of s)a[n(u)]=n(l);return a}case 3:return r(new Date(s),i);case 4:{let{source:a,flags:u}=s;return r(new RegExp(a,u),i)}case 5:{let a=r(new Map,i);for(let[u,l]of s)a.set(n(u),n(l));return a}case 6:{let a=r(new Set,i);for(let u of s)a.add(n(u));return a}case 7:{let{name:a,message:u}=s;return r(new jA[a](u),i)}case 8:return r(BigInt(s),i);case"BigInt":return r(Object(BigInt(s)),i);case"ArrayBuffer":return r(new Uint8Array(s).buffer,s);case"DataView":{let{buffer:a}=new Uint8Array(s);return r(new DataView(a),s)}}return r(new jA[o](s),i)};return n},md=t=>cL(new Map,t)(0);var Ko="",{toString:fL}={},{keys:pL}=Object,Js=t=>{let e=typeof t;if(e!=="object"||!t)return[0,e];let r=fL.call(t).slice(8,-1);switch(r){case"Array":return[1,Ko];case"Object":return[2,Ko];case"Date":return[3,Ko];case"RegExp":return[4,Ko];case"Map":return[5,Ko];case"Set":return[6,Ko];case"DataView":return[1,r]}return r.includes("Array")?[1,r]:r.includes("Error")?[7,r]:[2,r]},jl=([t,e])=>t===0&&(e==="function"||e==="symbol"),dL=(t,e,r,n)=>{let i=(s,a)=>{let u=n.push(s)-1;return r.set(a,u),u},o=s=>{if(r.has(s))return r.get(s);let[a,u]=Js(s);switch(a){case 0:{let c=s;switch(u){case"bigint":a=8,c=s.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([-1],s)}return i([a,c],s)}case 1:{if(u){let p=s;return u==="DataView"?p=new Uint8Array(s.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(s)),i([u,[...p]],s)}let c=[],f=i([a,c],s);for(let p of s)c.push(o(p));return f}case 2:{if(u)switch(u){case"BigInt":return i([u,s.toString()],s);case"Boolean":case"Number":case"String":return i([u,s.valueOf()],s)}if(e&&"toJSON"in s)return o(s.toJSON());let c=[],f=i([a,c],s);for(let p of pL(s))(t||!jl(Js(s[p])))&&c.push([o(p),o(s[p])]);return f}case 3:return i([a,s.toISOString()],s);case 4:{let{source:c,flags:f}=s;return i([a,{source:c,flags:f}],s)}case 5:{let c=[],f=i([a,c],s);for(let[p,d]of s)(t||!(jl(Js(p))||jl(Js(d))))&&c.push([o(p),o(d)]);return f}case 6:{let c=[],f=i([a,c],s);for(let p of s)(t||!jl(Js(p)))&&c.push(o(p));return f}}let{message:l}=s;return i([a,{name:u,message:l}],s)};return o},gd=(t,{json:e,lossy:r}={})=>{let n=[];return dL(!(e||r),!!e,new Map,n)(t),n};var xd=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?md(gd(t,e)):structuredClone(t):(t,e)=>md(gd(t,e));function VA(t,e){let{ordered:r=!1,tight:n=!1,prefix:i}=e,o={type:"list",ordered:r,spread:!1,children:[]},s=Number.POSITIVE_INFINITY,a=-1;for(;++a<t.length;)t[a].depth<s&&(s=t[a].depth);for(a=-1;++a<t.length;)t[a].depth-=s-1;for(a=-1;++a<t.length;)Qs(t[a],o,{ordered:r,tight:n,prefix:i});return o}function Qs(t,e,r){let n=-1,i=e.children[e.children.length-1];if(e.type==="list")if(t.depth===1)e.children.push({type:"listItem",spread:!1,children:[{type:"paragraph",children:[{type:"link",title:null,url:"#"+(r.prefix||"")+t.id,children:yd(t.children)}]}]});else if(e.children.length>0){let o=e.children[e.children.length-1];Qs(t,o,r)}else{let o={type:"listItem",spread:!1,children:[]};e.children.push(o),Qs(t,o,r)}else if(i&&i.type==="list")t.depth--,Qs(t,i,r);else{let o={type:"list",ordered:r.ordered,spread:!1,children:[]};e.children.push(o),t.depth--,Qs(t,o,r)}if(e.type==="list"&&!r.tight){for(e.spread=!1;++n<e.children.length;)if(e.children[n].children.length>1){e.spread=!0;break}}else e.spread=!r.tight}function yd(t){let e=[],r=-1;for(;++r<t.length;){let n=hL(t[r]);Array.isArray(n)?e.push(...n):e.push(n)}return e}function hL(t){if(t.type==="footnoteReference")return[];if(t.type==="link"||t.type==="linkReference")return yd(t.children);if("children"in t){let{children:n,position:i,...o}=t;return Object.assign(xd(o),{children:yd(t.children)})}let{position:e,...r}=t;return xd(r)}function bd(t,e){let r=e||{},n=r.heading?Ml(r.heading):void 0,i=BA(t,n,r);return{index:n?i.index:void 0,endIndex:n?i.endIndex:void 0,map:i.map.length>0?VA(i.map,r):void 0}}var Ul={"table-of-contents":{applicationOrder:1,async content(t,e){let r=K.object({depth:K.union([K.literal(1),K.literal(2),K.literal(3),K.literal(4),K.literal(5),K.literal(6)]).optional()}).optional().parse(t),n=bd(e,{heading:null,maxDepth:r?.depth??3,tight:!0}),i="## Table of contents";if(n.map===void 0)throw new Error("Could not generate table of contents");let o={children:n.map.children,type:"root"},s=co().use(wn).stringify(o).replaceAll(`
238
234
 
239
235
  `,`
240
236
  `);return[i,s].join(`
241
- `)},order:6}};import{tldrawToImage as fC}from"@kitschpatrol/tldraw-cli";import VL from"node:crypto";import Qo from"node:fs/promises";import kr from"node:path";var mC={tldraw:{async content(t){let{alt:e="tldraw diagram",src:r}=X.object({alt:X.string().optional(),src:X.string()}).parse(t),{assetsPath:n}=await Or();if(n===void 0)throw new Error("No assets path found");await Qo.mkdir(n,{recursive:!0});let i=await uo(r)?await dC(r):void 0;if(i!==void 0){let l=kr.basename(r,kr.extname(r)),c=kr.join(n,`${l}-${i}-light.svg`),f=kr.join(n,`${l}-${i}-dark.svg`);if(await uo(c)&&await uo(f))return pC(c,f,e)}let[o]=await fC(r,{dark:!1,format:"svg",output:n,transparent:!0});i??=await dC(o);let s=`${hC(o)}-${i}-light.svg`;await Qo.rename(o,s);let[a]=await fC(r,{dark:!0,format:"svg",output:n,transparent:!0}),u=`${hC(a)}-${i}-dark.svg`;if(await Qo.rename(a,u),i!==void 0){let l=kr.basename(u),c=kr.basename(s),f=c.replace(`${i}-light.svg`,""),p=await Qo.readdir(n);for(let d of p){let m=kr.basename(d);m!==l&&m!==c&&m.startsWith(f)&&m.endsWith(".svg")&&await Qo.rm(kr.join(n,m))}}return pC(s,u,e)}}};async function pC(t,e,r){let{packageFile:n}=await Or();if(n===void 0)throw new Error("No package file found");let i=kr.dirname(n),o=kr.relative(i,t);return`<picture>
242
- <source media="(prefers-color-scheme: dark)" srcset="${kr.relative(i,e)}">
237
+ `)},order:6}};import{tldrawToImage as GA}from"@kitschpatrol/tldraw-cli";import mL from"crypto";import Yo from"fs/promises";import br from"path";var YA={tldraw:{async content(t){let{alt:e="tldraw diagram",src:r}=K.object({alt:K.string().optional(),src:K.string()}).parse(t),{assetsPath:n}=await _r();if(n===void 0)throw new Error("No assets path found");await Yo.mkdir(n,{recursive:!0});let i=await io(r)?await HA(r):void 0;if(i!==void 0){let l=br.basename(r,br.extname(r)),c=br.join(n,`${l}-${i}-light.svg`),f=br.join(n,`${l}-${i}-dark.svg`);if(await io(c)&&await io(f))return WA(c,f,e)}let[o]=await GA(r,{dark:!1,format:"svg",output:n,transparent:!0});i??=await HA(o);let s=`${KA(o)}-${i}-light.svg`;await Yo.rename(o,s);let[a]=await GA(r,{dark:!0,format:"svg",output:n,transparent:!0}),u=`${KA(a)}-${i}-dark.svg`;if(await Yo.rename(a,u),i!==void 0){let l=br.basename(u),c=br.basename(s),f=c.replace(`${i}-light.svg`,""),p=await Yo.readdir(n);for(let d of p){let m=br.basename(d);m!==l&&m!==c&&m.startsWith(f)&&m.endsWith(".svg")&&await Yo.rm(br.join(n,m))}}return WA(s,u,e)}}};async function WA(t,e,r){let{packageFile:n}=await _r();if(n===void 0)throw new Error("No package file found");let i=br.dirname(n),o=br.relative(i,t);return`<picture>
238
+ <source media="(prefers-color-scheme: dark)" srcset="${br.relative(i,e)}">
243
239
  <source media="(prefers-color-scheme: light)" srcset="${o}">
244
240
  <img alt="${r}" src="${o}">
245
- </picture>`}async function dC(t){let e=await Qo.readFile(t),r=VL.createHash("sha1");return r.update(e),r.digest("hex").slice(0,8)}function hC(t){return t.replace(/\.[^./]+$/,"")}import{getSoleRule as GL}from"remark-mdat";var gC={toc:GL(Vl)};var xC={...gu,...yu,...VA,...Fl,...WA,...Nl,...Pl,...KA,...YA,...Ll,...Ml,...JA,...tC,...Vl,...Bl,...mC,...gC};async function Gl(t){let e={addMetaComment:!0,rules:xC},{additionalConfig:r=[],...n}=t??{},i=Array.isArray(r)?r:[r],o=await Ai({additionalConfig:[e,...i],...n});if(o.packageFile===void 0)throw new Error("Package file path is required in `mdat readme` config");return o}import aa from"node:path";import KL from"node:process";import YL from"node:path";import Lse,{promises as yC}from"node:fs";import{fileURLToPath as ZL}from"node:url";var Od=class{value;next;constructor(e){this.value=e}},sa=class{#e;#t;#r;constructor(){this.clear()}enqueue(e){let r=new Od(e);this.#e?(this.#t.next=r,this.#t=r):(this.#e=r,this.#t=r),this.#r++}dequeue(){let e=this.#e;if(e)return this.#e=this.#e.next,this.#r--,e.value}peek(){if(this.#e)return this.#e.value}clear(){this.#e=void 0,this.#t=void 0,this.#r=0}get size(){return this.#r}*[Symbol.iterator](){let e=this.#e;for(;e;)yield e.value,e=e.next}};function Wl(t){if(!((Number.isInteger(t)||t===Number.POSITIVE_INFINITY)&&t>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=new sa,r=0,n=()=>{r--,e.size>0&&e.dequeue()()},i=async(a,u,l)=>{r++;let c=(async()=>a(...l))();u(c);try{await c}catch{}n()},o=(a,u,l)=>{e.enqueue(i.bind(void 0,a,u,l)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},s=(a,...u)=>new Promise(l=>{o(a,l,u)});return Object.defineProperties(s,{activeCount:{get:()=>r},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),s}var Hl=class extends Error{constructor(e){super(),this.value=e}},WL=async(t,e)=>e(await t),HL=async t=>{let e=await Promise.all(t);if(e[1]===!0)throw new Hl(e[0]);return!1};async function Dd(t,e,{concurrency:r=Number.POSITIVE_INFINITY,preserveOrder:n=!0}={}){let i=Wl(r),o=[...t].map(a=>[a,i(WL,a,e)]),s=Wl(n?1:Number.POSITIVE_INFINITY);try{await Promise.all(o.map(a=>s(HL,a)))}catch(a){if(a instanceof Hl)return a.value;throw a}}var bC={directory:"isDirectory",file:"isFile"};function XL(t){if(!Object.hasOwnProperty.call(bC,t))throw new Error(`Invalid type specified: ${t}`)}var JL=(t,e)=>e[bC[t]](),QL=t=>t instanceof URL?ZL(t):t;async function Rd(t,{cwd:e=KL.cwd(),type:r="file",allowSymlinks:n=!0,concurrency:i,preserveOrder:o}={}){XL(r),e=QL(e);let s=n?yC.stat:yC.lstat;return Dd(t,async a=>{try{let u=await s(YL.resolve(e,a));return JL(r,u)}catch{return!1}},{concurrency:i,preserveOrder:o})}import{fileURLToPath as eM}from"node:url";function Fd(t){return t instanceof URL?eM(t):t}var tM=Symbol("findUpStop");async function rM(t,e={}){let r=aa.resolve(Fd(e.cwd)??""),{root:n}=aa.parse(r),i=aa.resolve(r,Fd(e.stopAt??n)),o=e.limit??Number.POSITIVE_INFINITY,s=[t].flat(),a=async l=>{if(typeof t!="function")return Rd(s,l);let c=await t(l.cwd);return typeof c=="string"?Rd([c],l):c},u=[];for(;;){let l=await a({...e,cwd:r});if(l===tM||(l&&u.push(aa.resolve(r,l)),r===i||u.length>=o))break;r=aa.dirname(r)}return u}async function EC(t,e={}){return(await rM(t,{...e,limit:1}))[0]}import nM from"node:path";async function AC({cwd:t}={}){let e=await Ma("package.json",{cwd:t});return e&&nM.dirname(e)}import{log as CC}from"remark-mdat";async function Nd(){CC.info("Searching for package directory...");let t=await AC()??process.cwd(),e=await EC("readme.md",{stopAt:t,type:"file"});if(e!==void 0)return CC.info(`Found closest readme at "${e}"`),e}async function Kl(){let t=await Nd();if(t===void 0)throw new Error("No readme found");return t}async function Yl(t,e,r,n,i){return t??=await Kl(),_n(t,Gl,du,e,r,n,i)}async function wC(t,e,r,n,i){return t??=await Kl(),_n(t,Gl,mu,e,r,n,i)}async function kC(t,e,r,n,i){return t??=await Kl(),_n(t,Gl,hu,e,r,n,i)}import{confirm as DC,group as cM,intro as fM,note as RC,outro as pM,select as Pd}from"@clack/prompts";import dM from"node:fs/promises";import Zl from"node:path";import{deepMergeDefined as hM}from"remark-mdat";var TC=`<!-- header -->
241
+ </picture>`}async function HA(t){let e=await Yo.readFile(t),r=mL.createHash("sha1");return r.update(e),r.digest("hex").slice(0,8)}function KA(t){return t.replace(/\.[^./]+$/,"")}import{getSoleRule as gL}from"remark-mdat";var ZA={toc:gL(Ul)};var XA={...pu,...hu,...wA,...Ol,...TA,...vl,...Dl,...SA,...IA,...Rl,...Fl,...RA,...PA,...Ul,...Nl,...YA,...ZA};async function zl(t){let e={addMetaComment:!0,rules:XA},{additionalConfig:r=[],...n}=t??{},i=Array.isArray(r)?r:[r],o=await bi({additionalConfig:[e,...i],...n});if(o.packageFile===void 0)throw new Error("Package file path is required in `mdat readme` config");return o}import ta from"path";import bL from"process";import EL from"path";import Ase,{promises as JA}from"fs";import{fileURLToPath as AL}from"url";var Ed=class{value;next;constructor(e){this.value=e}},ea=class{#e;#t;#r;constructor(){this.clear()}enqueue(e){let r=new Ed(e);this.#e?(this.#t.next=r,this.#t=r):(this.#e=r,this.#t=r),this.#r++}dequeue(){let e=this.#e;if(e)return this.#e=this.#e.next,this.#r--,e.value}peek(){if(this.#e)return this.#e.value}clear(){this.#e=void 0,this.#t=void 0,this.#r=0}get size(){return this.#r}*[Symbol.iterator](){let e=this.#e;for(;e;)yield e.value,e=e.next}*drain(){for(;this.#e;)yield this.dequeue()}};function $l(t){if(!((Number.isInteger(t)||t===Number.POSITIVE_INFINITY)&&t>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=new ea,r=0,n=()=>{r--,e.size>0&&e.dequeue()()},i=async(a,u,l)=>{r++;let c=(async()=>a(...l))();u(c);try{await c}catch{}n()},o=(a,u,l)=>{e.enqueue(i.bind(void 0,a,u,l)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},s=(a,...u)=>new Promise(l=>{o(a,l,u)});return Object.defineProperties(s,{activeCount:{get:()=>r},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),s}var ql=class extends Error{constructor(e){super(),this.value=e}},xL=async(t,e)=>e(await t),yL=async t=>{let e=await Promise.all(t);if(e[1]===!0)throw new ql(e[0]);return!1};async function Ad(t,e,{concurrency:r=Number.POSITIVE_INFINITY,preserveOrder:n=!0}={}){let i=$l(r),o=[...t].map(a=>[a,i(xL,a,e)]),s=$l(n?1:Number.POSITIVE_INFINITY);try{await Promise.all(o.map(a=>s(yL,a)))}catch(a){if(a instanceof ql)return a.value;throw a}}var QA={directory:"isDirectory",file:"isFile"};function kL(t){if(!Object.hasOwnProperty.call(QA,t))throw new Error(`Invalid type specified: ${t}`)}var wL=(t,e)=>e[QA[t]](),CL=t=>t instanceof URL?AL(t):t;async function kd(t,{cwd:e=bL.cwd(),type:r="file",allowSymlinks:n=!0,concurrency:i,preserveOrder:o}={}){kL(r),e=CL(e);let s=n?JA.stat:JA.lstat;return Ad(t,async a=>{try{let u=await s(EL.resolve(e,a));return wL(r,u)}catch{return!1}},{concurrency:i,preserveOrder:o})}import{fileURLToPath as TL}from"url";function wd(t){return t instanceof URL?TL(t):t}import Ose,{promises as vse}from"fs";var _L=Symbol("findUpStop");async function SL(t,e={}){let r=ta.resolve(wd(e.cwd)??""),{root:n}=ta.parse(r),i=ta.resolve(r,wd(e.stopAt??n)),o=e.limit??Number.POSITIVE_INFINITY,s=[t].flat(),a=async l=>{if(typeof t!="function")return kd(s,l);let c=await t(l.cwd);return typeof c=="string"?kd([c],l):c},u=[];for(;;){let l=await a({...e,cwd:r});if(l===_L||(l&&u.push(ta.resolve(r,l)),r===i||u.length>=o))break;r=ta.dirname(r)}return u}async function ek(t,e={}){return(await SL(t,{...e,limit:1}))[0]}import IL from"path";async function tk({cwd:t}={}){let e=await Ra("package.json",{cwd:t});return e&&IL.dirname(e)}import{log as rk}from"remark-mdat";async function Cd(){rk.info("Searching for package directory...");let t=await tk()??process.cwd(),e=await ek("readme.md",{stopAt:t,type:"file"});if(e!==void 0)return rk.info(`Found closest readme at "${e}"`),e}async function Vl(){let t=await Cd();if(t===void 0)throw new Error("No readme found");return t}async function Gl(t,e,r,n,i){return t??=await Vl(),Cn(t,zl,lu,e,r,n,i)}async function nk(t,e,r,n,i){return t??=await Vl(),Cn(t,zl,fu,e,r,n,i)}async function ik(t,e,r,n,i){return t??=await Vl(),Cn(t,zl,cu,e,r,n,i)}var $r=ns(la(),1);import{confirm as fk,group as PL,intro as LL,note as pk,outro as ML,select as Td}from"@clack/prompts";import BL from"fs/promises";import Wl from"path";import{deepMergeDefined as jL}from"remark-mdat";var ok=`<!-- header -->
246
242
 
247
243
  <!-- table-of-contents -->
248
244
 
@@ -287,7 +283,7 @@ _List maintainer(s) for a repository, along with one way of contacting them (e.g
287
283
  _State anyone or anything that significantly helped with the development of your project. State public contact hyper-links if applicable._
288
284
 
289
285
  <!-- footer -->
290
- `;var _C=`<!-- title -->
286
+ `;var sk=`<!-- title -->
291
287
 
292
288
  <!-- banner -->
293
289
 
@@ -340,7 +336,7 @@ _State anyone or anything that significantly helped with the development of your
340
336
  <!-- contributing -->
341
337
 
342
338
  <!-- license -->
343
- `;var SC=`<!-- header -->
339
+ `;var ak=`<!-- header -->
344
340
 
345
341
  ## Install
346
342
 
@@ -356,7 +352,7 @@ _State anyone or anything that significantly helped with the development of your
356
352
  \`\`\`
357
353
 
358
354
  <!-- footer -->
359
- `;var vC=`<!-- title -->
355
+ `;var uk=`<!-- title -->
360
356
 
361
357
  <!-- short-description -->
362
358
 
@@ -378,7 +374,7 @@ _State anyone or anything that significantly helped with the development of your
378
374
  <!-- contributing -->
379
375
 
380
376
  <!-- license -->
381
- `;var IC=`<!-- header -->
377
+ `;var lk=`<!-- header -->
382
378
 
383
379
  _Long description goes here._
384
380
 
@@ -441,7 +437,7 @@ _List maintainer(s) for a repository, along with one way of contacting them (e.g
441
437
  _State anyone or anything that significantly helped with the development of your project. State public contact hyper-links if applicable._
442
438
 
443
439
  <!-- footer -->
444
- `;var OC=`<!-- title -->
440
+ `;var ck=`<!-- title -->
445
441
 
446
442
  <!-- banner -->
447
443
 
@@ -512,30 +508,12 @@ _State anyone or anything that significantly helped with the development of your
512
508
  <!-- contributing -->
513
509
 
514
510
  <!-- license -->
515
- `;var zi={"MDAT Readme":{content:{compound:TC,explicit:_C},description:"The house style. An expansive starting point. Prune to your context and taste.",exampleLink:"https://github.com/kitschpatrol/mdat/blob/main/readme.md"},"Standard Readme Basic":{content:{compound:SC,explicit:vC},description:'Includes only the "required" sections from the Standard Readme specification.',exampleLink:"https://github.com/RichardLitt/standard-readme/blob/main/example-readmes/minimal-readme.md"},"Standard Readme Full":{content:{compound:IC,explicit:OC},description:"Includes all sections from the Standard Readme specification.",exampleLink:"https://github.com/RichardLitt/standard-readme/blob/main/example-readmes/maximal-readme.md"}};async function FC(){let t=await Nd(),e=await Ba();return{packageDirectory:e===void 0?void 0:Zl.dirname(Zl.resolve(e)),readmePath:t}}async function NC(){let{packageDirectory:t,readmePath:e}=await FC(),r=Zl.resolve(process.cwd());fM(`Running ${St.bold("mdat readme init")} interactively`);let n=await cM({overwrite:async()=>e===void 0||await DC({message:`Found an existing readme at "${St.blue(e)}". Do you want to overwrite it?`,active:"Overwrite",inactive:"Exit"})?!0:(()=>{throw new Error("`mdat readme init` was cancelled to avoid an overwrite - no changes were made")})(),output:async()=>t!==void 0&&t!==r?Pd({initialValue:t,message:"There's a root package directory nearby, do you want to create the readme there instead of the current directory?",options:[{label:`Create in the current package root: "${St.blue(t)}"`,value:t},{label:`Create in current working directory: "${St.blue(r)}"`,value:r}]}):r,template:async()=>Pd({message:"Which template would you like to use?",options:gM()}),compound:async()=>Pd({message:'Do you want to use "compound comments" where possible, which combine several expansions into a single comment block?',options:[{label:`Yes: Combine things like ${St.green("<!-- title -->")} and ${St.green("<!-- badges -->")} in a single ${St.green("<!-- header -->")} comment.`,value:!0},{label:"No: Use individual MDAT expansion comments for each section.",value:!1}]}),expand:async()=>t===void 0?!1:DC({initialValue:!0,message:"Do you want to run `mdat readme` now to expand the template with content from your package.json?"})},{onCancel(){throw new Error("`mdat readme init` was cancelled - no changes were made")}}),i=await Ld(n);return t===void 0&&RC("No package.json was found. Once you've created one, you can run `mdat readme` to expand the template with content from your package.json."),RC(`Readme created: "${St.bold.blue(i)}"`),pM("Done!"),i}async function Ld(t){let{packageDirectory:e}=await FC(),r=hM({compound:!0,output:e??process.cwd(),overwrite:!0,expand:e!==void 0,template:Object.keys(zi)[0]},t??{}),n=mM(r.template,r.compound),i=Zl.join(r.output,"readme.md");await dM.writeFile(i,n,"utf8");let[o]=await Yl(i);return await pn(o),i}function mM(t,e){let n=zi[t].content[e?"compound":"explicit"];if(n===void 0||n==="")throw new Error(`No template found for "${t}"`);return n}function gM(){return Object.entries(zi).map(([t,e])=>({label:t,hint:e.description,value:t}))}var $i={config:{defaultDescription:"Configuration is loaded if found from the usual places, or defaults are used.",description:"Path(s) to files containing MDAT configuration.",string:!0,type:"array"}},ua={meta:{alias:"m",description:"Embed an extra comment at the top of the generated Markdown warning editors that certain sections of the document have been generated dynamically.",type:"boolean"}},la={name:{alias:"n",defaultDescription:"Same name as input file. Overwrites the input file.",description:"Output file name.",type:"string"}},es={output:{alias:"o",defaultDescription:"Same directory as input file.",description:"Output file directory.",type:"string"}},qi={prefix:{description:"Require a string prefix before all comments to be considered for expansion. Useful if you have a bunch of non-MDAT comments in your Markdown file, or if you're willing to trade some verbosity for safety.",type:"string"}},ca={print:{description:"Print the expanded Markdown to stdout instead of saving to a file. Ignores `--output` and `--name` options.",type:"boolean"}},fa={rules:{alias:"r",description:"Path(s) to files containing MDAT comment expansion rules.",string:!0,type:"array"}},Vn={verbose:{describe:"Enable verbose logging. All verbose logs and prefixed with their log level and are printed to stderr for ease of redirection.",type:"boolean"}},Xl=["files",{array:!0,demandOption:!0,describe:"Markdown file(s) with MDAT placeholder comments.",type:"string"}];var Md={package:{defaultDescription:"The closest package.json file is used by default.",description:"Path to the package.json file to use to populate the readme.",string:!0}},Bd={assets:{defaultDescription:"./assets",description:"Path to find and save readme-related assets.",string:!0}},PC={interactive:{alias:"i",default:!0,description:"Run the guided interactive `init` process. Set explicitly to `false` to use default values and skip the prompt.",type:"boolean"}},LC={overwrite:{default:!1,defaultDescription:"`false`, if an existing readme is found, don't touch it.",description:"Replace an existing readme file if one is found.",type:"boolean"}},MC={expand:{alias:"e",default:!0,description:"Automatically run `mdat readme` immediately after creating the readme template.",type:"boolean"}},BC={template:{alias:"t",choices:Object.keys(zi),default:Object.keys(zi)[0],description:"Specify a template to use for the new readme.",type:"string"}},jC={compound:{alias:"c",default:!0,description:"Use compound comment version of the template to replace several individual comment placeholders where possible. This combines things like `<!-- title -->`, `<!-- badges -->`, etc. in a single `<!-- header -->` comment. It's less clutter when you're editing, but it's also less explicit. The final readme.md output is identical.",type:"boolean"}},Jl=["files",{array:!0,demandOption:!1,describe:"Readme file(s) with MDAT placeholder comments. If not provided, the closest readme.md file is used.",type:"string"}];var Vi=performance.now(),UC=em(xc(process.argv));try{await UC.scriptName("mdat").usage("$0 [command]","Work with MDAT placeholder comments in any Markdown file.").command(["$0 <files..> [options]","expand <files..> [options]"],"Expand MDAT placeholder comments.",t=>t.positional(...Xl).option($i).option(fa).option(es).option(la).option(ua).option(qi).option(ca).option(Vn),async({config:t,files:e,meta:r,name:n,output:i,prefix:o,print:s,rules:a,verbose:u})=>{gt.verbose=u??!1,Ql({name:n,output:i,print:s});let l=rs(t,{addMetaComment:r,keywordPrefix:o}),c=await gx(e,n,i,l,a);for(let f of c)s?process.stdout.write(f.toString()):await pn(f);ts(c),gt.info(`Expanded comments in ${Kr(performance.now()-Vi)}.`),process.exitCode=ns(c)}).command("check <files..> [options]","Validate a Markdown file containing MDAT placeholder comments.",t=>t.positional(...Xl).option($i).option(fa).option(ua).option(qi).option(Vn),async({config:t,files:e,meta:r,prefix:n,rules:i,verbose:o})=>{gt.verbose=o??!1;let s=rs(t,{addMetaComment:r,keywordPrefix:n}),a=await xx(e,void 0,void 0,s,i);ts(a),gt.info(`Checked comments in ${Kr(performance.now()-Vi)}.`),process.exitCode=ns(a)}).command("collapse <files..> [options]","Collapse MDAT placeholder comments.",t=>t.positional(...Xl).option($i).option(es).option(la).option(qi).option(ca).option(Vn),async({config:t,files:e,name:r,output:n,prefix:i,print:o,verbose:s})=>{gt.verbose=s??!1,Ql({name:r,output:n,print:o});let a=rs(t,{keywordPrefix:i}),u=await yx(e,void 0,void 0,a);for(let l of u)o?process.stdout.write(l.toString()):await pn(l);ts(u),gt.info(`Cleaned comments in ${Kr(performance.now()-Vi)}.`),process.exitCode=ns(u)}).command("readme [command]","Work with MDAT comments in your readme.md.",t=>t.command(["$0 [files..] [options]","expand [files..] [options]"],"Expand MDAT comment placeholders in your readme.md using a collection of helpful built-in expansion rules.",e=>e.positional(...Jl).option($i).option(fa).option(es).option(la).option(Md).option(Bd).option(qi).option(ua).option(ca).option(Vn),async({assets:e,config:r,files:n,meta:i,name:o,output:s,package:a,prefix:u,print:l,rules:c,verbose:f})=>{gt.verbose=f??!1,Ql({name:o,output:s,print:l});let p=rs(r,{addMetaComment:i,assetsPath:e,keywordPrefix:u,packageFile:a}),d=await Yl(n,o,s,p,c);for(let y of d)l?process.stdout.write(y.toString()):await pn(y);ts(d);let{packageFile:m}=await Or();gt.info(`Pulled package metadata from: ${St.bold.blue(m)}`),gt.info(`Expanded readme(s) in ${Kr(performance.now()-Vi)}.`),process.exitCode=ns(d)}).command("check [files..] [options]","Validate MDAT placeholder comments in your readme.md.",e=>e.positional(...Jl).option($i).option(fa).option(Md).option(Bd).option(qi).option(ua).option(Vn),async({assets:e,config:r,files:n,meta:i,package:o,prefix:s,rules:a,verbose:u})=>{gt.verbose=u??!1;let l=rs(r,{addMetaComment:i,assetsPath:e,keywordPrefix:s,packageFile:o}),c=await wC(n,void 0,void 0,l,a);ts(c);let{packageFile:f}=await Or();gt.info(`Pulled package metadata from: ${St.bold.blue(f)}`),gt.info(`Checked readme(s) in ${Kr(performance.now()-Vi)}.`),process.exitCode=ns(c)}).command("collapse [files..] [options]","Collapse MDAT placeholder comments in your readme.md.",e=>e.positional(...Jl).option(es).option(la).option(ca).option($i).option(qi).option(Vn),async({config:e,files:r,name:n,output:i,prefix:o,print:s,verbose:a})=>{gt.verbose=a??!1,Ql({name:n,output:i,print:s});let u=rs(e,{keywordPrefix:o}),l=await kC(r,void 0,void 0,u);for(let c of l)s?process.stdout.write(c.toString()):await pn(c);ts(l),gt.info(`Cleaned readme(s) in ${Kr(performance.now()-Vi)}.`),process.exitCode=ns(l)}).command("init [options]","Interactively create a new readme.md file with sensible default MDAT comment placeholders.",e=>e.option(PC).option(LC).option(es).option(MC).option(BC).option(jC).option(Vn),async({compound:e,expand:r,interactive:n,output:i,overwrite:o,template:s,verbose:a})=>{if(gt.verbose=a??!1,n)await NC();else{let u=await Ld({compound:e,expand:r,output:i,overwrite:o,template:s});gt.info(`Created readme at "${St.blue(u)}" in ${Kr(performance.now()-Vi)}.`)}process.exitCode=0}),()=>{gt.error("Root MDAT readme command should be unreachable.")}).help().alias("h","help").version(tm).alias("v","version").wrap(process.stdout.isTTY?Math.min(120,UC.terminalWidth()):0).fail(!1).parse()}catch(t){t instanceof Error&&gt.error(t.message),process.exitCode=1}function Ql(t){t.print&&t.output&&gt.warn("Ignoring --output option because --print is set"),t.print&&t.name&&gt.warn("Ignoring --name option because --print is set")}function rs(t,e){return[...ja(t),e]}function ns(t){return xM(t).reduce((n,i)=>n+i.errors.length,0)>0?1:0}
511
+ `;var ji={"MDAT Readme":{content:{compound:ok,explicit:sk},description:"The house style. An expansive starting point. Prune to your context and taste.",exampleLink:"https://github.com/kitschpatrol/mdat/blob/main/readme.md"},"Standard Readme Basic":{content:{compound:ak,explicit:uk},description:'Includes only the "required" sections from the Standard Readme specification.',exampleLink:"https://github.com/RichardLitt/standard-readme/blob/main/example-readmes/minimal-readme.md"},"Standard Readme Full":{content:{compound:lk,explicit:ck},description:"Includes all sections from the Standard Readme specification.",exampleLink:"https://github.com/RichardLitt/standard-readme/blob/main/example-readmes/maximal-readme.md"}};async function dk(){let t=await Cd(),e=await Fa();return{packageDirectory:e===void 0?void 0:Wl.dirname(Wl.resolve(e)),readmePath:t}}async function hk(){let{packageDirectory:t,readmePath:e}=await dk(),r=Wl.resolve(process.cwd());LL(`Running ${$r.default.bold("mdat readme init")} interactively`);let n=await PL({overwrite:async()=>e===void 0||await fk({message:`Found an existing readme at "${$r.default.blue(e)}". Do you want to overwrite it?`,active:"Overwrite",inactive:"Exit"})?!0:(()=>{throw new Error("`mdat readme init` was cancelled to avoid an overwrite - no changes were made")})(),output:async()=>t!==void 0&&t!==r?Td({initialValue:t,message:"There's a root package directory nearby, do you want to create the readme there instead of the current directory?",options:[{label:`Create in the current package root: "${$r.default.blue(t)}"`,value:t},{label:`Create in current working directory: "${$r.default.blue(r)}"`,value:r}]}):r,template:async()=>Td({message:"Which template would you like to use?",options:zL()}),compound:async()=>Td({message:'Do you want to use "compound comments" where possible, which combine several expansions into a single comment block?',options:[{label:`Yes: Combine things like ${$r.default.green("<!-- title -->")} and ${$r.default.green("<!-- badges -->")} in a single ${$r.default.green("<!-- header -->")} comment.`,value:!0},{label:"No: Use individual MDAT expansion comments for each section.",value:!1}]}),expand:async()=>t===void 0?!1:fk({initialValue:!0,message:"Do you want to run `mdat readme` now to expand the template with content from your package.json?"})},{onCancel(){throw new Error("`mdat readme init` was cancelled - no changes were made")}}),i=await _d(n);return t===void 0&&pk("No package.json was found. Once you've created one, you can run `mdat readme` to expand the template with content from your package.json."),pk(`Readme created: "${$r.default.blue($r.default.bold(i))}"`),ML("Done!"),i}async function _d(t){let{packageDirectory:e}=await dk(),r=jL({compound:!0,output:e??process.cwd(),overwrite:!0,expand:e!==void 0,template:Object.keys(ji)[0]},t??{}),n=UL(r.template,r.compound),i=Wl.join(r.output,"readme.md");await BL.writeFile(i,n,"utf8");let[o]=await Gl(i);return await ln(o),i}function UL(t,e){let n=ji[t].content[e?"compound":"explicit"];if(n===void 0||n==="")throw new Error(`No template found for "${t}"`);return n}function zL(){return Object.entries(ji).map(([t,e])=>({label:t,hint:e.description,value:t}))}var Ui={config:{defaultDescription:"Configuration is loaded if found from the usual places, or defaults are used.",description:"Path(s) to files containing MDAT configuration.",string:!0,type:"array"}},ra={meta:{alias:"m",description:"Embed an extra comment at the top of the generated Markdown warning editors that certain sections of the document have been generated dynamically.",type:"boolean"}},na={name:{alias:"n",defaultDescription:"Same name as input file. Overwrites the input file.",description:"Output file name.",type:"string"}},Zo={output:{alias:"o",defaultDescription:"Same directory as input file.",description:"Output file directory.",type:"string"}},zi={prefix:{description:"Require a string prefix before all comments to be considered for expansion. Useful if you have a bunch of non-MDAT comments in your Markdown file, or if you're willing to trade some verbosity for safety.",type:"string"}},ia={print:{description:"Print the expanded Markdown to stdout instead of saving to a file. Ignores `--output` and `--name` options.",type:"boolean"}},oa={rules:{alias:"r",description:"Path(s) to files containing MDAT comment expansion rules.",string:!0,type:"array"}},$n={verbose:{describe:"Enable verbose logging. All verbose logs and prefixed with their log level and are printed to stderr for ease of redirection.",type:"boolean"}},Hl=["files",{array:!0,demandOption:!0,describe:"Markdown file(s) with MDAT placeholder comments.",type:"string"}];var Sd={package:{defaultDescription:"The closest package.json file is used by default.",description:"Path to the package.json file to use to populate the readme.",string:!0}},Id={assets:{defaultDescription:"./assets",description:"Path to find and save readme-related assets.",string:!0}},mk={interactive:{alias:"i",default:!0,description:"Run the guided interactive `init` process. Set explicitly to `false` to use default values and skip the prompt.",type:"boolean"}},gk={overwrite:{default:!1,defaultDescription:"`false`, if an existing readme is found, don't touch it.",description:"Replace an existing readme file if one is found.",type:"boolean"}},xk={expand:{alias:"e",default:!0,description:"Automatically run `mdat readme` immediately after creating the readme template.",type:"boolean"}},yk={template:{alias:"t",choices:Object.keys(ji),default:Object.keys(ji)[0],description:"Specify a template to use for the new readme.",type:"string"}},bk={compound:{alias:"c",default:!0,description:"Use compound comment version of the template to replace several individual comment placeholders where possible. This combines things like `<!-- title -->`, `<!-- badges -->`, etc. in a single `<!-- header -->` comment. It's less clutter when you're editing, but it's also less explicit. The final readme.md output is identical.",type:"boolean"}},Kl=["files",{array:!0,demandOption:!1,describe:"Readme file(s) with MDAT placeholder comments. If not provided, the closest readme.md file is used.",type:"string"}];var $i=performance.now(),Ek=Ph(lc(process.argv));try{await Ek.scriptName("mdat").usage("$0 [command]","Work with MDAT placeholder comments in any Markdown file.").command(["$0 <files..> [options]","expand <files..> [options]"],"Expand MDAT placeholder comments.",t=>t.positional(...Hl).option(Ui).option(oa).option(Zo).option(na).option(ra).option(zi).option(ia).option($n),async({config:t,files:e,meta:r,name:n,output:i,prefix:o,print:s,rules:a,verbose:u})=>{ht.verbose=u??!1,Yl({name:n,output:i,print:s});let l=Jo(t,{addMetaComment:r,keywordPrefix:o}),c=await Yg(e,n,i,l,a);for(let f of c)s?process.stdout.write(f.toString()):await ln(f);Xo(c),ht.info(`Expanded comments in ${Gr(performance.now()-$i)}.`),process.exitCode=Qo(c)}).command("check <files..> [options]","Validate a Markdown file containing MDAT placeholder comments.",t=>t.positional(...Hl).option(Ui).option(oa).option(ra).option(zi).option($n),async({config:t,files:e,meta:r,prefix:n,rules:i,verbose:o})=>{ht.verbose=o??!1;let s=Jo(t,{addMetaComment:r,keywordPrefix:n}),a=await Zg(e,void 0,void 0,s,i);Xo(a),ht.info(`Checked comments in ${Gr(performance.now()-$i)}.`),process.exitCode=Qo(a)}).command("collapse <files..> [options]","Collapse MDAT placeholder comments.",t=>t.positional(...Hl).option(Ui).option(Zo).option(na).option(zi).option(ia).option($n),async({config:t,files:e,name:r,output:n,prefix:i,print:o,verbose:s})=>{ht.verbose=s??!1,Yl({name:r,output:n,print:o});let a=Jo(t,{keywordPrefix:i}),u=await Xg(e,void 0,void 0,a);for(let l of u)o?process.stdout.write(l.toString()):await ln(l);Xo(u),ht.info(`Cleaned comments in ${Gr(performance.now()-$i)}.`),process.exitCode=Qo(u)}).command("readme [command]","Work with MDAT comments in your readme.md.",t=>t.command(["$0 [files..] [options]","expand [files..] [options]"],"Expand MDAT comment placeholders in your readme.md using a collection of helpful built-in expansion rules.",e=>e.positional(...Kl).option(Ui).option(oa).option(Zo).option(na).option(Sd).option(Id).option(zi).option(ra).option(ia).option($n),async({assets:e,config:r,files:n,meta:i,name:o,output:s,package:a,prefix:u,print:l,rules:c,verbose:f})=>{ht.verbose=f??!1,Yl({name:o,output:s,print:l});let p=Jo(r,{addMetaComment:i,assetsPath:e,keywordPrefix:u,packageFile:a}),d=await Gl(n,o,s,p,c);for(let y of d)l?process.stdout.write(y.toString()):await ln(y);Xo(d);let{packageFile:m}=await _r();ht.info(`Pulled package metadata from: ${es.default.blue(es.default.bold(m))}`),ht.info(`Expanded readme(s) in ${Gr(performance.now()-$i)}.`),process.exitCode=Qo(d)}).command("check [files..] [options]","Validate MDAT placeholder comments in your readme.md.",e=>e.positional(...Kl).option(Ui).option(oa).option(Sd).option(Id).option(zi).option(ra).option($n),async({assets:e,config:r,files:n,meta:i,package:o,prefix:s,rules:a,verbose:u})=>{ht.verbose=u??!1;let l=Jo(r,{addMetaComment:i,assetsPath:e,keywordPrefix:s,packageFile:o}),c=await nk(n,void 0,void 0,l,a);Xo(c);let{packageFile:f}=await _r();ht.info(`Pulled package metadata from: ${es.default.blue(es.default.bold(f))}`),ht.info(`Checked readme(s) in ${Gr(performance.now()-$i)}.`),process.exitCode=Qo(c)}).command("collapse [files..] [options]","Collapse MDAT placeholder comments in your readme.md.",e=>e.positional(...Kl).option(Zo).option(na).option(ia).option(Ui).option(zi).option($n),async({config:e,files:r,name:n,output:i,prefix:o,print:s,verbose:a})=>{ht.verbose=a??!1,Yl({name:n,output:i,print:s});let u=Jo(e,{keywordPrefix:o}),l=await ik(r,void 0,void 0,u);for(let c of l)s?process.stdout.write(c.toString()):await ln(c);Xo(l),ht.info(`Cleaned readme(s) in ${Gr(performance.now()-$i)}.`),process.exitCode=Qo(l)}).command("init [options]","Interactively create a new readme.md file with sensible default MDAT comment placeholders.",e=>e.option(mk).option(gk).option(Zo).option(xk).option(yk).option(bk).option($n),async({compound:e,expand:r,interactive:n,output:i,overwrite:o,template:s,verbose:a})=>{if(ht.verbose=a??!1,n)await hk();else{let u=await _d({compound:e,expand:r,output:i,overwrite:o,template:s});ht.info(`Created readme at "${es.default.blue(u)}" in ${Gr(performance.now()-$i)}.`)}process.exitCode=0}),()=>{ht.error("Root MDAT readme command should be unreachable.")}).help().alias("h","help").version(Lh).alias("v","version").wrap(process.stdout.isTTY?Math.min(120,Ek.terminalWidth()):0).fail(!1).parse()}catch(t){t instanceof Error&&ht.error(t.message),process.exitCode=1}function Yl(t){t.print&&t.output&&ht.warn("Ignoring --output option because --print is set"),t.print&&t.name&&ht.warn("Ignoring --name option because --print is set")}function Jo(t,e){return[...Na(t),e]}function Qo(t){return $L(t).reduce((n,i)=>n+i.errors.length,0)>0?1:0}
516
512
  /*! Bundled license information:
517
513
 
518
514
  yargs-parser/build/lib/string-utils.js:
519
- (**
520
- * @license
521
- * Copyright (c) 2016, Contributors
522
- * SPDX-License-Identifier: ISC
523
- *)
524
-
525
515
  yargs-parser/build/lib/tokenize-arg-string.js:
526
- (**
527
- * @license
528
- * Copyright (c) 2016, Contributors
529
- * SPDX-License-Identifier: ISC
530
- *)
531
-
532
516
  yargs-parser/build/lib/yargs-parser-types.js:
533
- (**
534
- * @license
535
- * Copyright (c) 2016, Contributors
536
- * SPDX-License-Identifier: ISC
537
- *)
538
-
539
517
  yargs-parser/build/lib/yargs-parser.js:
540
518
  (**
541
519
  * @license