mdat 1.0.1 → 1.0.2
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 +105 -127
- package/dist/api.d.ts +2 -2
- package/dist/config.d.ts +3 -3
- package/dist/index.js +86 -90
- package/dist/mdat-json-loader.d.ts +1 -1
- package/dist/processors.d.ts +3 -3
- package/dist/readme/api.d.ts +2 -2
- package/dist/readme/config.d.ts +3 -2
- package/dist/readme/rules/table-of-contents.d.ts +1 -1
- package/dist/readme/rules/utilities/cli-help/help-object-to-markdown.d.ts +1 -1
- package/dist/readme/rules/utilities/cli-help/help-string-to-object.d.ts +1 -1
- package/dist/readme/rules/utilities/cli-help/parsers/meow.d.ts +1 -1
- package/dist/readme/rules/utilities/cli-help/parsers/yargs.d.ts +1 -1
- package/dist/utilities.d.ts +1 -1
- package/package.json +15 -15
package/dist/index.js
CHANGED
|
@@ -1,116 +1,112 @@
|
|
|
1
|
-
var eE=Object.create;var ou=Object.defineProperty;var tE=Object.getOwnPropertyDescriptor;var rE=Object.getOwnPropertyNames;var nE=Object.getPrototypeOf,iE=Object.prototype.hasOwnProperty;var au=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),oE=(e,t)=>{for(var r in t)ou(e,r,{get:t[r],enumerable:!0})},aE=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of rE(t))!iE.call(e,i)&&i!==r&&ou(e,i,{get:()=>t[i],enumerable:!(n=tE(t,i))||n.enumerable});return e};var mf=(e,t,r)=>(r=e!=null?eE(nE(e)):{},aE(t||!e||!e.__esModule?ou(r,"default",{value:e,enumerable:!0}):r,e));var wf=au((V1,AE)=>{AE.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 vf=au((G1,Sf)=>{"use strict";var TE=wf();Sf.exports=new Map(Object.entries(TE))});var dm=au((L2,mm)=>{"use strict";var Aa=Object.prototype.hasOwnProperty,pm=Object.prototype.toString,am=Object.defineProperty,sm=Object.getOwnPropertyDescriptor,um=function(t){return typeof Array.isArray=="function"?Array.isArray(t):pm.call(t)==="[object Array]"},lm=function(t){if(!t||pm.call(t)!=="[object Object]")return!1;var r=Aa.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&Aa.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!n)return!1;var i;for(i in t);return typeof i>"u"||Aa.call(t,i)},cm=function(t,r){am&&r.name==="__proto__"?am(t,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):t[r.name]=r.newValue},fm=function(t,r){if(r==="__proto__")if(Aa.call(t,r)){if(sm)return sm(t,r).value}else return;return t[r]};mm.exports=function e(){var t,r,n,i,o,a,s=arguments[0],u=1,l=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},u=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});u<l;++u)if(t=arguments[u],t!=null)for(r in t)n=fm(s,r),i=fm(t,r),s!==i&&(c&&i&&(lm(i)||(o=um(i)))?(o?(o=!1,a=n&&um(n)?n:[]):a=n&&lm(n)?n:{},cm(s,{name:r,newValue:e(c,a,i)})):typeof i<"u"&&cm(s,{name:r,newValue:i}));return s}});var df=(e=0)=>t=>`\x1B[${t+e}m`,hf=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,gf=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,be={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]}},D1=Object.keys(be.modifier),sE=Object.keys(be.color),uE=Object.keys(be.bgColor),F1=[...sE,...uE];function lE(){let e=new Map;for(let[t,r]of Object.entries(be)){for(let[n,i]of Object.entries(r))be[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=be[n],e.set(i[0],i[1]);Object.defineProperty(be,t,{value:r,enumerable:!1})}return Object.defineProperty(be,"codes",{value:e,enumerable:!1}),be.color.close="\x1B[39m",be.bgColor.close="\x1B[49m",be.color.ansi=df(),be.color.ansi256=hf(),be.color.ansi16m=gf(),be.bgColor.ansi=df(10),be.bgColor.ansi256=hf(10),be.bgColor.ansi16m=gf(10),Object.defineProperties(be,{rgbToAnsi256:{value(t,r,n){return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.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:t=>be.rgbToAnsi256(...be.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,n,i;if(t>=232)r=((t-232)*10+8)/255,n=r,i=r;else{t-=16;let s=t%36;r=Math.floor(t/36)/5,n=Math.floor(s/6)/5,i=s%6/5}let o=Math.max(r,n,i)*2;if(o===0)return 30;let a=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return o===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(t,r,n)=>be.ansi256ToAnsi(be.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>be.ansi256ToAnsi(be.hexToAnsi256(t)),enumerable:!1}}),be}var cE=lE(),Mt=cE;import su from"node:process";import fE from"node:os";import xf from"node:tty";function It(e,t=globalThis.Deno?globalThis.Deno.args:su.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n<i)}var{env:ve}=su,Vo;It("no-color")||It("no-colors")||It("color=false")||It("color=never")?Vo=0:(It("color")||It("colors")||It("color=true")||It("color=always"))&&(Vo=1);function pE(){if("FORCE_COLOR"in ve)return ve.FORCE_COLOR==="true"?1:ve.FORCE_COLOR==="false"?0:ve.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(ve.FORCE_COLOR,10),3)}function mE(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function dE(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=pE();n!==void 0&&(Vo=n);let i=r?Vo:n;if(i===0)return 0;if(r){if(It("color=16m")||It("color=full")||It("color=truecolor"))return 3;if(It("color=256"))return 2}if("TF_BUILD"in ve&&"AGENT_NAME"in ve)return 1;if(e&&!t&&i===void 0)return 0;let o=i||0;if(ve.TERM==="dumb")return o;if(su.platform==="win32"){let a=fE.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in ve)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(a=>a in ve)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(a=>a in ve)||ve.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in ve)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ve.TEAMCITY_VERSION)?1:0;if(ve.COLORTERM==="truecolor"||ve.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in ve){let a=Number.parseInt((ve.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ve.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ve.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ve.TERM)||"COLORTERM"in ve?1:o}function yf(e,t={}){let r=dE(e,{streamIsTTY:e&&e.isTTY,...t});return mE(r)}var hE={stdout:yf({isTTY:xf.isatty(1)}),stderr:yf({isTTY:xf.isatty(2)})},Ef=hE;function bf(e,t,r){let n=e.indexOf(t);if(n===-1)return e;let i=t.length,o=0,a="";do a+=e.slice(o,n)+t+r,o=n+i,n=e.indexOf(t,o);while(n!==-1);return a+=e.slice(o),a}function kf(e,t,r,n){let i=0,o="";do{let a=e[n-1]==="\r";o+=e.slice(i,a?n-1:n)+t+(a?`\r
|
|
2
|
-
|
|
3
|
-
`)
|
|
4
|
-
`,i)}while(n!==-1);return o+=e.slice(i),o}var{stdout:Af,stderr:Tf}=Ef,uu=Symbol("GENERATOR"),Un=Symbol("STYLER"),Hi=Symbol("IS_EMPTY"),Cf=["ansi","ansi","ansi256","ansi16m"],zn=Object.create(null),gE=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Af?Af.level:0;e.level=t.level===void 0?r:t.level};var xE=e=>{let t=(...r)=>r.join(" ");return gE(t,e),Object.setPrototypeOf(t,Wi.prototype),t};function Wi(e){return xE(e)}Object.setPrototypeOf(Wi.prototype,Function.prototype);for(let[e,t]of Object.entries(Mt))zn[e]={get(){let r=Go(this,cu(t.open,t.close,this[Un]),this[Hi]);return Object.defineProperty(this,e,{value:r}),r}};zn.visible={get(){let e=Go(this,this[Un],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var lu=(e,t,r,...n)=>e==="rgb"?t==="ansi16m"?Mt[r].ansi16m(...n):t==="ansi256"?Mt[r].ansi256(Mt.rgbToAnsi256(...n)):Mt[r].ansi(Mt.rgbToAnsi(...n)):e==="hex"?lu("rgb",t,r,...Mt.hexToRgb(...n)):Mt[r][e](...n),yE=["rgb","hex","ansi256"];for(let e of yE){zn[e]={get(){let{level:r}=this;return function(...n){let i=cu(lu(e,Cf[r],"color",...n),Mt.color.close,this[Un]);return Go(this,i,this[Hi])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);zn[t]={get(){let{level:r}=this;return function(...n){let i=cu(lu(e,Cf[r],"bgColor",...n),Mt.bgColor.close,this[Un]);return Go(this,i,this[Hi])}}}}var EE=Object.defineProperties(()=>{},{...zn,level:{enumerable:!0,get(){return this[uu].level},set(e){this[uu].level=e}}}),cu=(e,t,r)=>{let n,i;return r===void 0?(n=e,i=t):(n=r.openAll+e,i=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:i,parent:r}},Go=(e,t,r)=>{let n=(...i)=>bE(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,EE),n[uu]=e,n[Un]=t,n[Hi]=r,n},bE=(e,t)=>{if(e.level<=0||!t)return e[Hi]?"":t;let r=e[Un];if(r===void 0)return t;let{openAll:n,closeAll:i}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=bf(t,r.close,r.open),r=r.parent;let o=t.indexOf(`
|
|
5
|
-
`);return o!==-1&&(t=kf(t,i,n,o)),n+t+i};Object.defineProperties(Wi.prototype,zn);var kE=Wi(),$1=Wi({level:Tf?Tf.level:0});var fu=kE;import{cosmiconfig as Yf}from"cosmiconfig";import{TypeScriptLoader as Xf}from"cosmiconfig-typescript-loader";import Gb from"node:fs/promises";import ep from"node:path";var pu=mf(vf(),1);function mu(e,t,r){if(typeof t=="number"&&(r=t),pu.default.has(e.toLowerCase())){t=pu.default.get(e.toLowerCase());let n=e.charAt(0);n===n.toUpperCase()&&(t=n+t.slice(1)),e===e.toUpperCase()&&(t=t.toUpperCase())}else typeof t!="string"&&(t=(e.replace(/(?:s|x|z|ch|sh)$/i,"$&e").replace(/([^aeiou])y$/i,"$1ie")+"s").replace(/i?e?s$/i,n=>e.slice(-1)===e.slice(-1).toLowerCase()?n.toLowerCase():n.toUpperCase()));return Math.abs(r)===1?e:t}import{readPackage as Hb}from"read-pkg";import{deepMergeDefined as Qo,log as Ft,optionsSchema as Wb,rulesSchema as Kb}from"remark-mdat";var oe;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function r(i){throw new Error}e.assertNever=r,e.arrayToEnum=i=>{let o={};for(let a of i)o[a]=a;return o},e.getValidEnumValues=i=>{let o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(let s of o)a[s]=i[s];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let o=[];for(let a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(let a of i)if(o(a))return a},e.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(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=n,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(oe||(oe={}));var hu;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(hu||(hu={}));var F=oe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),fr=e=>{switch(typeof e){case"undefined":return F.undefined;case"string":return F.string;case"number":return isNaN(e)?F.nan:F.number;case"boolean":return F.boolean;case"function":return F.function;case"bigint":return F.bigint;case"symbol":return F.symbol;case"object":return Array.isArray(e)?F.array:e===null?F.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?F.promise:typeof Map<"u"&&e instanceof Map?F.map:typeof Set<"u"&&e instanceof Set?F.set:typeof Date<"u"&&e instanceof Date?F.date:F.object;default:return F.unknown}},w=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"]),CE=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),At=class e extends Error{get errors(){return this.issues}constructor(t){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=t}format(t){let r=t||function(o){return o.message},n={_errors:[]},i=o=>{for(let a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let s=n,u=0;for(;u<a.path.length;){let l=a.path[u];u===a.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(r(a))):s[l]=s[l]||{_errors:[]},s=s[l],u++}}};return i(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,oe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=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(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};At.create=e=>new At(e);var qn=(e,t)=>{let r;switch(e.code){case w.invalid_type:e.received===F.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case w.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,oe.jsonStringifyReplacer)}`;break;case w.unrecognized_keys:r=`Unrecognized key(s) in object: ${oe.joinValues(e.keys,", ")}`;break;case w.invalid_union:r="Invalid input";break;case w.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${oe.joinValues(e.options)}`;break;case w.invalid_enum_value:r=`Invalid enum value. Expected ${oe.joinValues(e.options)}, received '${e.received}'`;break;case w.invalid_arguments:r="Invalid function arguments";break;case w.invalid_return_type:r="Invalid function return type";break;case w.invalid_date:r="Invalid date";break;case w.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:oe.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case w.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case w.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case w.custom:r="Invalid input";break;case w.invalid_intersection_types:r="Intersection results could not be merged";break;case w.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case w.not_finite:r="Number must be finite";break;default:r=t.defaultError,oe.assertNever(e)}return{message:r}},Df=qn;function wE(e){Df=e}function Ho(){return Df}var Wo=e=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,o=[...r,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let s="",u=n.filter(l=>!!l).slice().reverse();for(let l of u)s=l(a,{data:t,defaultError:s}).message;return{...i,path:o,message:s}},SE=[];function I(e,t){let r=Ho(),n=Wo({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===qn?void 0:qn].filter(i=>!!i)});e.common.issues.push(n)}var Je=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let i of r){if(i.status==="aborted")return q;i.status==="dirty"&&t.dirty(),n.push(i.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let i of r){let o=await i.key,a=await i.value;n.push({key:o,value:a})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let i of r){let{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return q;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(n[o.value]=a.value)}return{status:t.value,value:n}}},q=Object.freeze({status:"aborted"}),$n=e=>({status:"dirty",value:e}),at=e=>({status:"valid",value:e}),gu=e=>e.status==="aborted",xu=e=>e.status==="dirty",Xr=e=>e.status==="valid",Yi=e=>typeof Promise<"u"&&e instanceof Promise;function Ko(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function Ff(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r}var M;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(M||(M={}));var Ki,Zi,Dt=class{constructor(t,r,n,i){this._cachedPath=[],this.parent=t,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}},_f=(e,t)=>{if(Xr(t))return{success:!0,data:t.value};if(!e.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 At(e.common.issues);return this._error=r,this._error}}};function K(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,s)=>{var u,l;let{message:c}=e;return a.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:(u=c??n)!==null&&u!==void 0?u:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(l=c??r)!==null&&l!==void 0?l:s.defaultError}},description:i}}var Z=class{get description(){return this._def.description}_getType(t){return fr(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:fr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Je,ctx:{common:t.parent.common,data:t.data,parsedType:fr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(Yi(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,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:t,parsedType:fr(t)},o=this._parseSync({data:t,path:i.path,parent:i});return _f(i,o)}"~validate"(t){var r,n;let i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fr(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:i});return Xr(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:t,path:[],parent:i}).then(o=>Xr(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fr(t)},i=this._parse({data:t,path:n.path,parent:n}),o=await(Yi(i)?i:Promise.resolve(i));return _f(n,o)}refine(t,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,o)=>{let a=t(i),s=()=>o.addIssue({code:w.custom,...n(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,r){return this._refinement((n,i)=>t(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(t){return new Tt({schema:this,typeName:$.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,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 Rt.create(this,this._def)}nullable(){return Gt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return mr.create(this)}promise(){return vr.create(this,this._def)}or(t){return on.create([this,t],this._def)}and(t){return an.create(this,t,this._def)}transform(t){return new Tt({...K(this._def),schema:this,typeName:$.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new fn({...K(this._def),innerType:this,defaultValue:r,typeName:$.ZodDefault})}brand(){return new Xi({typeName:$.ZodBranded,type:this,...K(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new pn({...K(this._def),innerType:this,catchValue:r,typeName:$.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Ji.create(this,t)}readonly(){return mn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},vE=/^c[^\s-]{8,}$/i,_E=/^[0-9a-z]+$/,IE=/^[0-9A-HJKMNP-TV-Z]{26}$/i,RE=/^[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,DE=/^[a-z0-9_-]{21}$/i,FE=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,OE=/^[-+]?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)?)??$/,NE=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,LE="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",du,PE=/^(?:(?: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])$/,ME=/^(?:(?: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])$/,BE=/^(([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]))$/,UE=/^(([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])$/,zE=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,jE=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Of="((\\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])))",$E=new RegExp(`^${Of}$`);function Nf(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function qE(e){return new RegExp(`^${Nf(e)}$`)}function Lf(e){let t=`${Of}T${Nf(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function VE(e,t){return!!((t==="v4"||!t)&&PE.test(e)||(t==="v6"||!t)&&BE.test(e))}function GE(e,t){if(!FE.test(e))return!1;try{let[r]=e.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||t&&i.alg!==t)}catch{return!1}}function HE(e,t){return!!((t==="v4"||!t)&&ME.test(e)||(t==="v6"||!t)&&UE.test(e))}var wr=class e extends Z{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==F.string){let o=this._getOrReturnCtx(t);return I(o,{code:w.invalid_type,expected:F.string,received:o.parsedType}),q}let n=new Je,i;for(let o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),I(i,{code:w.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")t.data.length>o.value&&(i=this._getOrReturnCtx(t,i),I(i,{code:w.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let a=t.data.length>o.value,s=t.data.length<o.value;(a||s)&&(i=this._getOrReturnCtx(t,i),a?I(i,{code:w.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&I(i,{code:w.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")NE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"email",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")du||(du=new RegExp(LE,"u")),du.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"emoji",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")RE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"uuid",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")DE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"nanoid",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")vE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"cuid",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")_E.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"cuid2",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")IE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"ulid",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),I(i,{validation:"url",code:w.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"regex",code:w.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(t,i),I(i,{code:w.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(i=this._getOrReturnCtx(t,i),I(i,{code:w.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),I(i,{code:w.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?Lf(o).test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{code:w.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?$E.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{code:w.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?qE(o).test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{code:w.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?OE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"duration",code:w.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?VE(t.data,o.version)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"ip",code:w.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?GE(t.data,o.alg)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"jwt",code:w.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?HE(t.data,o.version)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"cidr",code:w.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?zE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"base64",code:w.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?jE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"base64url",code:w.invalid_string,message:o.message}),n.dirty()):oe.assertNever(o);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(i=>t.test(i),{validation:r,code:w.invalid_string,...M.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...M.errToObj(t)})}url(t){return this._addCheck({kind:"url",...M.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...M.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...M.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...M.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...M.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...M.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...M.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...M.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...M.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...M.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...M.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...M.errToObj(t)})}datetime(t){var r,n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(r=t?.offset)!==null&&r!==void 0?r:!1,local:(n=t?.local)!==null&&n!==void 0?n:!1,...M.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...M.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...M.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...M.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...M.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...M.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...M.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...M.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...M.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...M.errToObj(r)})}nonempty(t){return this.min(1,M.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};wr.create=e=>{var t;return new wr({checks:[],typeName:$.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...K(e)})};function WE(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}var Jr=class e extends Z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==F.number){let o=this._getOrReturnCtx(t);return I(o,{code:w.invalid_type,expected:F.number,received:o.parsedType}),q}let n,i=new Je;for(let o of this._def.checks)o.kind==="int"?oe.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),I(n,{code:w.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),I(n,{code:w.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),I(n,{code:w.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?WE(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),I(n,{code:w.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),I(n,{code:w.not_finite,message:o.message}),i.dirty()):oe.assertNever(o);return{status:i.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,M.toString(r))}gt(t,r){return this.setLimit("min",t,!1,M.toString(r))}lte(t,r){return this.setLimit("max",t,!0,M.toString(r))}lt(t,r){return this.setLimit("max",t,!1,M.toString(r))}setLimit(t,r,n,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:M.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:M.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:M.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:M.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:M.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:M.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:M.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:M.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:M.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:M.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&oe.isInteger(t.value))}get isFinite(){let t=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"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};Jr.create=e=>new Jr({checks:[],typeName:$.ZodNumber,coerce:e?.coerce||!1,...K(e)});var Qr=class e extends Z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==F.bigint)return this._getInvalidInput(t);let n,i=new Je;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),I(n,{code:w.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),I(n,{code:w.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),I(n,{code:w.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):oe.assertNever(o);return{status:i.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return I(r,{code:w.invalid_type,expected:F.bigint,received:r.parsedType}),q}gte(t,r){return this.setLimit("min",t,!0,M.toString(r))}gt(t,r){return this.setLimit("min",t,!1,M.toString(r))}lte(t,r){return this.setLimit("max",t,!0,M.toString(r))}lt(t,r){return this.setLimit("max",t,!1,M.toString(r))}setLimit(t,r,n,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:M.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:M.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:M.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:M.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:M.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:M.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Qr.create=e=>{var t;return new Qr({checks:[],typeName:$.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...K(e)})};var en=class extends Z{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==F.boolean){let n=this._getOrReturnCtx(t);return I(n,{code:w.invalid_type,expected:F.boolean,received:n.parsedType}),q}return at(t.data)}};en.create=e=>new en({typeName:$.ZodBoolean,coerce:e?.coerce||!1,...K(e)});var tn=class e extends Z{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==F.date){let o=this._getOrReturnCtx(t);return I(o,{code:w.invalid_type,expected:F.date,received:o.parsedType}),q}if(isNaN(t.data.getTime())){let o=this._getOrReturnCtx(t);return I(o,{code:w.invalid_date}),q}let n=new Je,i;for(let o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),I(i,{code:w.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(i=this._getOrReturnCtx(t,i),I(i,{code:w.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(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:M.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:M.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};tn.create=e=>new tn({checks:[],coerce:e?.coerce||!1,typeName:$.ZodDate,...K(e)});var Vn=class extends Z{_parse(t){if(this._getType(t)!==F.symbol){let n=this._getOrReturnCtx(t);return I(n,{code:w.invalid_type,expected:F.symbol,received:n.parsedType}),q}return at(t.data)}};Vn.create=e=>new Vn({typeName:$.ZodSymbol,...K(e)});var rn=class extends Z{_parse(t){if(this._getType(t)!==F.undefined){let n=this._getOrReturnCtx(t);return I(n,{code:w.invalid_type,expected:F.undefined,received:n.parsedType}),q}return at(t.data)}};rn.create=e=>new rn({typeName:$.ZodUndefined,...K(e)});var nn=class extends Z{_parse(t){if(this._getType(t)!==F.null){let n=this._getOrReturnCtx(t);return I(n,{code:w.invalid_type,expected:F.null,received:n.parsedType}),q}return at(t.data)}};nn.create=e=>new nn({typeName:$.ZodNull,...K(e)});var Sr=class extends Z{constructor(){super(...arguments),this._any=!0}_parse(t){return at(t.data)}};Sr.create=e=>new Sr({typeName:$.ZodAny,...K(e)});var pr=class extends Z{constructor(){super(...arguments),this._unknown=!0}_parse(t){return at(t.data)}};pr.create=e=>new pr({typeName:$.ZodUnknown,...K(e)});var Bt=class extends Z{_parse(t){let r=this._getOrReturnCtx(t);return I(r,{code:w.invalid_type,expected:F.never,received:r.parsedType}),q}};Bt.create=e=>new Bt({typeName:$.ZodNever,...K(e)});var Gn=class extends Z{_parse(t){if(this._getType(t)!==F.undefined){let n=this._getOrReturnCtx(t);return I(n,{code:w.invalid_type,expected:F.void,received:n.parsedType}),q}return at(t.data)}};Gn.create=e=>new Gn({typeName:$.ZodVoid,...K(e)});var mr=class e extends Z{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),i=this._def;if(r.parsedType!==F.array)return I(r,{code:w.invalid_type,expected:F.array,received:r.parsedType}),q;if(i.exactLength!==null){let a=r.data.length>i.exactLength.value,s=r.data.length<i.exactLength.value;(a||s)&&(I(r,{code:a?w.too_big:w.too_small,minimum:s?i.exactLength.value:void 0,maximum:a?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&&(I(r,{code:w.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&&(I(r,{code:w.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((a,s)=>i.type._parseAsync(new Dt(r,a,r.path,s)))).then(a=>Je.mergeArray(n,a));let o=[...r.data].map((a,s)=>i.type._parseSync(new Dt(r,a,r.path,s)));return Je.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:M.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:M.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:M.toString(r)}})}nonempty(t){return this.min(1,t)}};mr.create=(e,t)=>new mr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:$.ZodArray,...K(t)});function jn(e){if(e instanceof dt){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Rt.create(jn(n))}return new dt({...e._def,shape:()=>t})}else return e instanceof mr?new mr({...e._def,type:jn(e.element)}):e instanceof Rt?Rt.create(jn(e.unwrap())):e instanceof Gt?Gt.create(jn(e.unwrap())):e instanceof Vt?Vt.create(e.items.map(t=>jn(t))):e}var dt=class e extends Z{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=oe.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==F.object){let l=this._getOrReturnCtx(t);return I(l,{code:w.invalid_type,expected:F.object,received:l.parsedType}),q}let{status:n,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Bt&&this._def.unknownKeys==="strip"))for(let l in i.data)a.includes(l)||s.push(l);let u=[];for(let l of a){let c=o[l],f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new Dt(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Bt){let l=this._def.unknownKeys;if(l==="passthrough")for(let c of s)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")s.length>0&&(I(i,{code:w.unrecognized_keys,keys:s}),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 s){let f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new Dt(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=>Je.mergeObjectSync(n,l)):Je.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(t){return M.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var i,o,a,s;let u=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,r,n).message)!==null&&a!==void 0?a:n.defaultError;return r.code==="unrecognized_keys"?{message:(s=M.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:$.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};return oe.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new e({...this._def,shape:()=>r})}omit(t){let r={};return oe.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new e({...this._def,shape:()=>r})}deepPartial(){return jn(this)}partial(t){let r={};return oe.objectKeys(this.shape).forEach(n=>{let i=this.shape[n];t&&!t[n]?r[n]=i:r[n]=i.optional()}),new e({...this._def,shape:()=>r})}required(t){let r={};return oe.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof Rt;)o=o._def.innerType;r[n]=o}}),new e({...this._def,shape:()=>r})}keyof(){return Pf(oe.objectKeys(this.shape))}};dt.create=(e,t)=>new dt({shape:()=>e,unknownKeys:"strip",catchall:Bt.create(),typeName:$.ZodObject,...K(t)});dt.strictCreate=(e,t)=>new dt({shape:()=>e,unknownKeys:"strict",catchall:Bt.create(),typeName:$.ZodObject,...K(t)});dt.lazycreate=(e,t)=>new dt({shape:e,unknownKeys:"strip",catchall:Bt.create(),typeName:$.ZodObject,...K(t)});var on=class extends Z{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function i(o){for(let s of o)if(s.result.status==="valid")return s.result;for(let s of o)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;let a=o.map(s=>new At(s.ctx.common.issues));return I(r,{code:w.invalid_union,unionErrors:a}),q}if(r.common.async)return Promise.all(n.map(async o=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(i);{let o,a=[];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&&a.push(l.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let s=a.map(u=>new At(u));return I(r,{code:w.invalid_union,unionErrors:s}),q}}get options(){return this._def.options}};on.create=(e,t)=>new on({options:e,typeName:$.ZodUnion,...K(t)});var cr=e=>e instanceof sn?cr(e.schema):e instanceof Tt?cr(e.innerType()):e instanceof un?[e.value]:e instanceof ln?e.options:e instanceof cn?oe.objectValues(e.enum):e instanceof fn?cr(e._def.innerType):e instanceof rn?[void 0]:e instanceof nn?[null]:e instanceof Rt?[void 0,...cr(e.unwrap())]:e instanceof Gt?[null,...cr(e.unwrap())]:e instanceof Xi||e instanceof mn?cr(e.unwrap()):e instanceof pn?cr(e._def.innerType):[],Zo=class e extends Z{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==F.object)return I(r,{code:w.invalid_type,expected:F.object,received:r.parsedType}),q;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}):(I(r,{code:w.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),q)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let i=new Map;for(let o of r){let a=cr(o.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let s of a){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new e({typeName:$.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:i,...K(n)})}};function yu(e,t){let r=fr(e),n=fr(t);if(e===t)return{valid:!0,data:e};if(r===F.object&&n===F.object){let i=oe.objectKeys(t),o=oe.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(let s of o){let u=yu(e[s],t[s]);if(!u.valid)return{valid:!1};a[s]=u.data}return{valid:!0,data:a}}else if(r===F.array&&n===F.array){if(e.length!==t.length)return{valid:!1};let i=[];for(let o=0;o<e.length;o++){let a=e[o],s=t[o],u=yu(a,s);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return r===F.date&&n===F.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var an=class extends Z{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),i=(o,a)=>{if(gu(o)||gu(a))return q;let s=yu(o.value,a.value);return s.valid?((xu(o)||xu(a))&&r.dirty(),{status:r.value,value:s.data}):(I(n,{code:w.invalid_intersection_types}),q)};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,a])=>i(o,a)):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}))}};an.create=(e,t,r)=>new an({left:e,right:t,typeName:$.ZodIntersection,...K(r)});var Vt=class e extends Z{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==F.array)return I(n,{code:w.invalid_type,expected:F.array,received:n.parsedType}),q;if(n.data.length<this._def.items.length)return I(n,{code:w.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),q;!this._def.rest&&n.data.length>this._def.items.length&&(I(n,{code:w.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...n.data].map((a,s)=>{let u=this._def.items[s]||this._def.rest;return u?u._parse(new Dt(n,a,n.path,s)):null}).filter(a=>!!a);return n.common.async?Promise.all(o).then(a=>Je.mergeArray(r,a)):Je.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Vt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Vt({items:e,typeName:$.ZodTuple,rest:null,...K(t)})};var Yo=class e extends Z{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==F.object)return I(n,{code:w.invalid_type,expected:F.object,received:n.parsedType}),q;let i=[],o=this._def.keyType,a=this._def.valueType;for(let s in n.data)i.push({key:o._parse(new Dt(n,s,n.path,s)),value:a._parse(new Dt(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?Je.mergeObjectAsync(r,i):Je.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof Z?new e({keyType:t,valueType:r,typeName:$.ZodRecord,...K(n)}):new e({keyType:wr.create(),valueType:t,typeName:$.ZodRecord,...K(r)})}},Hn=class extends Z{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==F.map)return I(n,{code:w.invalid_type,expected:F.map,received:n.parsedType}),q;let i=this._def.keyType,o=this._def.valueType,a=[...n.data.entries()].map(([s,u],l)=>({key:i._parse(new Dt(n,s,n.path,[l,"key"])),value:o._parse(new Dt(n,u,n.path,[l,"value"]))}));if(n.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let u of a){let l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return q;(l.status==="dirty"||c.status==="dirty")&&r.dirty(),s.set(l.value,c.value)}return{status:r.value,value:s}})}else{let s=new Map;for(let u of a){let l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return q;(l.status==="dirty"||c.status==="dirty")&&r.dirty(),s.set(l.value,c.value)}return{status:r.value,value:s}}}};Hn.create=(e,t,r)=>new Hn({valueType:t,keyType:e,typeName:$.ZodMap,...K(r)});var Wn=class e extends Z{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==F.set)return I(n,{code:w.invalid_type,expected:F.set,received:n.parsedType}),q;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(I(n,{code:w.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&&(I(n,{code:w.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let o=this._def.valueType;function a(u){let l=new Set;for(let c of u){if(c.status==="aborted")return q;c.status==="dirty"&&r.dirty(),l.add(c.value)}return{status:r.value,value:l}}let s=[...n.data.values()].map((u,l)=>o._parse(new Dt(n,u,n.path,l)));return n.common.async?Promise.all(s).then(u=>a(u)):a(s)}min(t,r){return new e({...this._def,minSize:{value:t,message:M.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:M.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Wn.create=(e,t)=>new Wn({valueType:e,minSize:null,maxSize:null,typeName:$.ZodSet,...K(t)});var Xo=class e extends Z{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==F.function)return I(r,{code:w.invalid_type,expected:F.function,received:r.parsedType}),q;function n(s,u){return Wo({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ho(),qn].filter(l=>!!l),issueData:{code:w.invalid_arguments,argumentsError:u}})}function i(s,u){return Wo({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ho(),qn].filter(l=>!!l),issueData:{code:w.invalid_return_type,returnTypeError:u}})}let o={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof vr){let s=this;return at(async function(...u){let l=new At([]),c=await s._def.args.parseAsync(u,o).catch(m=>{throw l.addIssue(n(u,m)),l}),f=await Reflect.apply(a,this,c);return await s._def.returns._def.type.parseAsync(f,o).catch(m=>{throw l.addIssue(i(f,m)),l})})}else{let s=this;return at(function(...u){let l=s._def.args.safeParse(u,o);if(!l.success)throw new At([n(u,l.error)]);let c=Reflect.apply(a,this,l.data),f=s._def.returns.safeParse(c,o);if(!f.success)throw new At([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Vt.create(t).rest(pr.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||Vt.create([]).rest(pr.create()),returns:r||pr.create(),typeName:$.ZodFunction,...K(n)})}},sn=class extends Z{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};sn.create=(e,t)=>new sn({getter:e,typeName:$.ZodLazy,...K(t)});var un=class extends Z{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return I(r,{received:r.data,code:w.invalid_literal,expected:this._def.value}),q}return{status:"valid",value:t.data}}get value(){return this._def.value}};un.create=(e,t)=>new un({value:e,typeName:$.ZodLiteral,...K(t)});function Pf(e,t){return new ln({values:e,typeName:$.ZodEnum,...K(t)})}var ln=class e extends Z{constructor(){super(...arguments),Ki.set(this,void 0)}_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return I(r,{expected:oe.joinValues(n),received:r.parsedType,code:w.invalid_type}),q}if(Ko(this,Ki,"f")||Ff(this,Ki,new Set(this._def.values),"f"),!Ko(this,Ki,"f").has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return I(r,{received:r.data,code:w.invalid_enum_value,options:n}),q}return at(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};Ki=new WeakMap;ln.create=Pf;var cn=class extends Z{constructor(){super(...arguments),Zi.set(this,void 0)}_parse(t){let r=oe.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==F.string&&n.parsedType!==F.number){let i=oe.objectValues(r);return I(n,{expected:oe.joinValues(i),received:n.parsedType,code:w.invalid_type}),q}if(Ko(this,Zi,"f")||Ff(this,Zi,new Set(oe.getValidEnumValues(this._def.values)),"f"),!Ko(this,Zi,"f").has(t.data)){let i=oe.objectValues(r);return I(n,{received:n.data,code:w.invalid_enum_value,options:i}),q}return at(t.data)}get enum(){return this._def.values}};Zi=new WeakMap;cn.create=(e,t)=>new cn({values:e,typeName:$.ZodNativeEnum,...K(t)});var vr=class extends Z{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==F.promise&&r.common.async===!1)return I(r,{code:w.invalid_type,expected:F.promise,received:r.parsedType}),q;let n=r.parsedType===F.promise?r.data:Promise.resolve(r.data);return at(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};vr.create=(e,t)=>new vr({type:e,typeName:$.ZodPromise,...K(t)});var Tt=class extends Z{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:a=>{I(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){let a=i.transform(n.data,o);if(n.common.async)return Promise.resolve(a).then(async s=>{if(r.value==="aborted")return q;let u=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return u.status==="aborted"?q:u.status==="dirty"||r.value==="dirty"?$n(u.value):u});{if(r.value==="aborted")return q;let s=this._def.schema._parseSync({data:a,path:n.path,parent:n});return s.status==="aborted"?q:s.status==="dirty"||r.value==="dirty"?$n(s.value):s}}if(i.type==="refinement"){let a=s=>{let u=i.refinement(s,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 s};if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?q:(s.status==="dirty"&&r.dirty(),a(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?q:(s.status==="dirty"&&r.dirty(),a(s.value).then(()=>({status:r.value,value:s.value}))))}if(i.type==="transform")if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Xr(a))return a;let s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>Xr(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:r.value,value:s})):a);oe.assertNever(i)}};Tt.create=(e,t,r)=>new Tt({schema:e,typeName:$.ZodEffects,effect:t,...K(r)});Tt.createWithPreprocess=(e,t,r)=>new Tt({schema:t,effect:{type:"preprocess",transform:e},typeName:$.ZodEffects,...K(r)});var Rt=class extends Z{_parse(t){return this._getType(t)===F.undefined?at(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Rt.create=(e,t)=>new Rt({innerType:e,typeName:$.ZodOptional,...K(t)});var Gt=class extends Z{_parse(t){return this._getType(t)===F.null?at(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Gt.create=(e,t)=>new Gt({innerType:e,typeName:$.ZodNullable,...K(t)});var fn=class extends Z{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===F.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};fn.create=(e,t)=>new fn({innerType:e,typeName:$.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...K(t)});var pn=class extends Z{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Yi(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new At(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new At(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};pn.create=(e,t)=>new pn({innerType:e,typeName:$.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...K(t)});var Kn=class extends Z{_parse(t){if(this._getType(t)!==F.nan){let n=this._getOrReturnCtx(t);return I(n,{code:w.invalid_type,expected:F.nan,received:n.parsedType}),q}return{status:"valid",value:t.data}}};Kn.create=e=>new Kn({typeName:$.ZodNaN,...K(e)});var KE=Symbol("zod_brand"),Xi=class extends Z{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},Ji=class e extends Z{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);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"?q:o.status==="dirty"?(r.dirty(),$n(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"?q:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:$.ZodPipeline})}},mn=class extends Z{_parse(t){let r=this._def.innerType._parse(t),n=i=>(Xr(i)&&(i.value=Object.freeze(i.value)),i);return Yi(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};mn.create=(e,t)=>new mn({innerType:e,typeName:$.ZodReadonly,...K(t)});function If(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function Mf(e,t={},r){return e?Sr.create().superRefine((n,i)=>{var o,a;let s=e(n);if(s instanceof Promise)return s.then(u=>{var l,c;if(!u){let f=If(t,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(!s){let u=If(t,n),l=(a=(o=u.fatal)!==null&&o!==void 0?o:r)!==null&&a!==void 0?a:!0;i.addIssue({code:"custom",...u,fatal:l})}}):Sr.create()}var ZE={object:dt.lazycreate},$;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})($||($={}));var YE=(e,t={message:`Input not instance of ${e.name}`})=>Mf(r=>r instanceof e,t),Bf=wr.create,Uf=Jr.create,XE=Kn.create,JE=Qr.create,zf=en.create,QE=tn.create,eb=Vn.create,tb=rn.create,rb=nn.create,nb=Sr.create,ib=pr.create,ob=Bt.create,ab=Gn.create,sb=mr.create,ub=dt.create,lb=dt.strictCreate,cb=on.create,fb=Zo.create,pb=an.create,mb=Vt.create,db=Yo.create,hb=Hn.create,gb=Wn.create,xb=Xo.create,yb=sn.create,Eb=un.create,bb=ln.create,kb=cn.create,Ab=vr.create,Rf=Tt.create,Tb=Rt.create,Cb=Gt.create,wb=Tt.createWithPreprocess,Sb=Ji.create,vb=()=>Bf().optional(),_b=()=>Uf().optional(),Ib=()=>zf().optional(),Rb={string:e=>wr.create({...e,coerce:!0}),number:e=>Jr.create({...e,coerce:!0}),boolean:e=>en.create({...e,coerce:!0}),bigint:e=>Qr.create({...e,coerce:!0}),date:e=>tn.create({...e,coerce:!0})},Db=q,L=Object.freeze({__proto__:null,defaultErrorMap:qn,setErrorMap:wE,getErrorMap:Ho,makeIssue:Wo,EMPTY_PATH:SE,addIssueToContext:I,ParseStatus:Je,INVALID:q,DIRTY:$n,OK:at,isAborted:gu,isDirty:xu,isValid:Xr,isAsync:Yi,get util(){return oe},get objectUtil(){return hu},ZodParsedType:F,getParsedType:fr,ZodType:Z,datetimeRegex:Lf,ZodString:wr,ZodNumber:Jr,ZodBigInt:Qr,ZodBoolean:en,ZodDate:tn,ZodSymbol:Vn,ZodUndefined:rn,ZodNull:nn,ZodAny:Sr,ZodUnknown:pr,ZodNever:Bt,ZodVoid:Gn,ZodArray:mr,ZodObject:dt,ZodUnion:on,ZodDiscriminatedUnion:Zo,ZodIntersection:an,ZodTuple:Vt,ZodRecord:Yo,ZodMap:Hn,ZodSet:Wn,ZodFunction:Xo,ZodLazy:sn,ZodLiteral:un,ZodEnum:ln,ZodNativeEnum:cn,ZodPromise:vr,ZodEffects:Tt,ZodTransformer:Tt,ZodOptional:Rt,ZodNullable:Gt,ZodDefault:fn,ZodCatch:pn,ZodNaN:Kn,BRAND:KE,ZodBranded:Xi,ZodPipeline:Ji,ZodReadonly:mn,custom:Mf,Schema:Z,ZodSchema:Z,late:ZE,get ZodFirstPartyTypeKind(){return $},coerce:Rb,any:nb,array:sb,bigint:JE,boolean:zf,date:QE,discriminatedUnion:fb,effect:Rf,enum:bb,function:xb,instanceof:YE,intersection:pb,lazy:yb,literal:Eb,map:hb,nan:XE,nativeEnum:kb,never:ob,null:rb,nullable:Cb,number:Uf,object:ub,oboolean:Ib,onumber:_b,optional:Tb,ostring:vb,pipeline:Sb,preprocess:wb,promise:Ab,record:db,set:gb,strictObject:lb,string:Bf,symbol:eb,transformer:Rf,tuple:mb,undefined:tb,union:cb,unknown:ib,void:ab,NEVER:Db,ZodIssueCode:w,quotelessJson:CE,ZodError:At});import{defaultLoaders as Fb}from"cosmiconfig";function Eu(e,t){let r=Fb[".json"],n=r(e,t);return jf(n)}function jf(e,t="",r={}){for(let[n,i]of Object.entries(e)){let o=t?`${t}.${n}`:n;typeof i=="object"&&i!==null&&!Array.isArray(i)?jf(i,o,r):i===null?r[o]="null":r[o]=i.toString()}return r}import jb from"node:fs";import dr from"node:path";import Mb from"node:process";import Ob from"node:process";import Nb from"node:fs/promises";import{fileURLToPath as Lb}from"node:url";import Zn from"node:path";var $f=e=>e instanceof URL?Lb(e):e;async function Jo(e,{cwd:t=Ob.cwd(),type:r="file",stopAt:n}={}){let i=Zn.resolve($f(t)??""),{root:o}=Zn.parse(i);n=Zn.resolve(i,$f(n??o));let a=Zn.isAbsolute(e);for(;i;){let s=a?e:Zn.join(i,e);try{let u=await Nb.stat(s);if(r==="file"&&u.isFile()||r==="directory"&&u.isDirectory())return s}catch{}if(i===n||i===o)break;i=Zn.dirname(i)}}async function qf({cwd:e=Mb.cwd()}={}){return Jo("package.json",{cwd:e})}import Bb from"node:fs";import Ub from"node:fs/promises";async function bu(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await Ub[e](r))[t]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}function ku(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return Bb[e](r)[t]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}var Yn=bu.bind(void 0,"stat","isFile"),aO=bu.bind(void 0,"stat","isDirectory"),sO=bu.bind(void 0,"lstat","isSymbolicLink"),Au=ku.bind(void 0,"statSync","isFile"),uO=ku.bind(void 0,"statSync","isDirectory"),lO=ku.bind(void 0,"lstatSync","isSymbolicLink");import{log as Gf}from"remark-mdat";import{Configuration as $b}from"unified-engine";import zb from"node:os";var Vf=zb.homedir();function Tu(e){if(typeof e!="string")throw new TypeError(`Expected a string, got ${typeof e}`);return Vf?e.replace(/^~(?=$|\/|\\)/,Vf):e}function qb(e,t){let r=t===0?1:Math.floor(Math.log10(Math.abs(t))+1);return e.toString().padStart(r,"0")}function Wf(e,t,r,n){let i=[];for(let[o,a]of e.entries()){let s=r&&e.length>1?`-${qb(o+1,e.length+1)}`:"",u=Vb(a,t,r,n,s);i.push(u)}return i}function Vb(e,t,r,n,i=""){let o=Hf(e),a=t?Hf(t):void 0;if(!Au(o))throw new Error(`Input file not found: "${o}"`);if(a){if(Au(a))throw new Error(`Output path must be a directory, received a file path: "${a}"`);jb.mkdirSync(a,{recursive:!0})}let s=r?dr.basename(r,dr.extname(r)):dr.basename(o,dr.extname(o)),u=`.${n??(r&&dr.extname(r)!==""?dr.extname(r):dr.extname(e)===""?"":dr.extname(e))}`,l=`${s}${i}${u}`,c=a??dr.dirname(o);return{input:o,name:l,output:c}}function Hf(e){return Tu(e)}async function Kf(){return qf()}function Zf(e){return e==null?[]:Array.isArray(e)?e:[e]}async function Cu(){let e=new $b({cwd:process.cwd(),detectConfig:!0,packageField:"remarkConfig",rcName:".remarkrc"}),t=await new Promise(r=>{e.load("",(n,i)=>{if(n){console.error(n),r();return}r(i)})});if(t){let{filePath:r}=t;return r===void 0?Gf.info('No ambient Remark configuration file found"'):Gf.info(`Found and loaded ambient Remark configuration from "${r}"`),t}throw new Error("Failed to load ambient remark configuration")}var Jf=Wb.merge(L.object({assetsPath:L.string().optional(),packageFile:L.string().optional()})).describe("Config Extension");async function Ut(e){let{additionalConfig:t,additionalRules:r,searchFrom:n}=e??{},i={addMetaComment:!1,assetsPath:"./assets",closingPrefix:"/",keywordPrefix:"",metaCommentIdentifier:"+",packageFile:await Kf(),rules:{mdat:"Powered by the Markdown Autophagic Template system: [mdat](https://github.com/kitschpatrol/mdat)."}},o=Yf("mdat",{loaders:{".ts":Xf()}}),a=await o.search(n);if(a){let{config:s,filepath:u}=a,l=s;if(Ft.info(`Using config from "${u}"`),u.endsWith("package.json")&&typeof s=="string"){Ft.info(`Detected shared config string: "${s}"`);let{default:f}=await import(s);l=f}let c=Qf(l,Jf);c&&(i=Qo(i,c))}if(t!==void 0){let s=Array.isArray(t)?t:[t];for(let u of s){let l;if(typeof u=="string"){let f=await o.load(u);if(f==null)continue;let{config:p,filepath:m}=f;Ft.info(`Loaded additional config from "${m}"`),l=p}else l=u;if(l===void 0)continue;Ft.info("Merging configuration object");let c=Qf(l,Jf);c!==void 0&&(i=Qo(i,c))}}if(r!==void 0){let s=Array.isArray(r)?r:[r],u=Yf("mdat",{loaders:{".json":Eu,".ts":Xf()}});for(let l of s){let c;if(typeof l=="string"){let p;if(ep.basename(l).endsWith("package.json")){let E=await Gb.readFile(l,"utf8");p={config:Eu(l,E),filepath:l}}else p=await u.load(l);if(p==null)continue;let{config:m,filepath:h}=p;Ft.info(`Loaded additional config from "${h}"`),c=m}else c=l;if(c===void 0)continue;Ft.info("Merging rules into configuration object");let f=Zb(c,Kb);f!==void 0&&(i=Qo(i,f))}}if(i.rules){let s=Object.keys(i.rules).sort().map(u=>`"${fu.bold.green(u)}"`);Ft.info(`Loaded ${fu.bold(s.length)} mdat comment expansion ${mu("rule",s.length)}:`);for(let u of s)Ft.info(` ${u}`)}else Ft.error("No rules loaded from additional configurations or rules, using default.");return ea=i,i}function Zb(e,t){if(t.safeParse(e).success)return{rules:e};Ft.error(`Rules object has the wrong shape. Ignoring and using default configuration:
|
|
6
|
-
${JSON.stringify(e,void 0,2)}`)}function Qf(e,t){if(t.safeParse(e).success)return e;Ft.error(`Config object has the wrong shape. Ignoring and using default configuration:
|
|
7
|
-
${JSON.stringify(e,void 0,2)}`)}var ea;async function dn(){return ea===void 0&&(Ft.warn("getConfig(): config was undefined"),ea??=await Ut()),ea}var wu;async function Ct(){let{packageFile:e}=await dn();if(e===void 0)throw new Error("No packageFile found or set in config");if(wu??=await Hb({cwd:ep.dirname(e)}),wu===void 0)throw new Error("No package.json found");return wu}function Yb(e,t){return Qo(e,t)}var Xb={};function hr(e,t){let r=t||Xb,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return rp(e,n,i)}function rp(e,t,r){if(Jb(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return tp(e.children,t,r)}return Array.isArray(e)?tp(e,t,r):""}function tp(e,t,r){let n=[],i=-1;for(;++i<e.length;)n[i]=rp(e[i],t,r);return n.join("")}function Jb(e){return!!(e&&typeof e=="object")}var Su={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:`
|
|
8
|
-
`,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 Qb={}.hasOwnProperty;function Xn(e){return Qb.call(Su,e)?Su[e]:!1}function De(e,t,r,n){let i=e.length,o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,r=r>0?r:0,n.length<1e4)a=Array.from(n),a.unshift(t,r),e.splice(...a);else for(r&&e.splice(t,r);o<n.length;)a=n.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function st(e,t){return e.length>0?(De(e,e.length,0,t),e):t}var np={}.hasOwnProperty;function ta(e){let t={},r=-1;for(;++r<e.length;)ek(t,e[r]);return t}function ek(e,t){let r;for(r in t){let i=(np.call(e,r)?e[r]:void 0)||(e[r]={}),o=t[r],a;if(o)for(a in o){np.call(i,a)||(i[a]=[]);let s=o[a];tk(i[a],Array.isArray(s)?s:s?[s]:[])}}}function tk(e,t){let r=-1,n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);De(e,0,0,n)}function ra(e,t){let r=Number.parseInt(e,t);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 Qe(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var je=_r(/[A-Za-z]/),$e=_r(/[\dA-Za-z]/),ip=_r(/[#-'*+\--9=?A-Z^-~]/);function hn(e){return e!==null&&(e<32||e===127)}var Qi=_r(/\d/),op=_r(/[\dA-Fa-f]/),ap=_r(/[!-/:-@[-`{-~]/);function R(e){return e!==null&&e<-2}function Y(e){return e!==null&&(e<0||e===32)}function z(e){return e===-2||e===-1||e===32}var gn=_r(new RegExp("\\p{P}|\\p{S}","u")),Ht=_r(/\s/);function _r(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function U(e,t,r,n){let i=n?n-1:Number.POSITIVE_INFINITY,o=0;return a;function a(u){return z(u)?(e.enter(r),s(u)):t(u)}function s(u){return z(u)&&o++<i?(e.consume(u),s):(e.exit(r),t(u))}}var sp={tokenize:rk};function rk(e){let t=e.attempt(this.parser.constructs.contentInitial,n,i),r;return t;function n(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),U(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){let u=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=u),r=u,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return R(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}var lp={tokenize:nk},up={tokenize:ik};function nk(e){let t=this,r=[],n=0,i,o,a;return s;function s(y){if(n<r.length){let S=r[n];return t.containerState=S[1],e.attempt(S[0].continuation,u,l)(y)}return l(y)}function u(y){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&k();let S=t.events.length,v=S,A;for(;v--;)if(t.events[v][0]==="exit"&&t.events[v][1].type==="chunkFlow"){A=t.events[v][1].end;break}x(n);let te=S;for(;te<t.events.length;)t.events[te][1].end={...A},te++;return De(t.events,v+1,0,t.events.slice(S)),t.events.length=te,l(y)}return s(y)}function l(y){if(n===r.length){if(!i)return p(y);if(i.currentConstruct&&i.currentConstruct.concrete)return h(y);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(up,c,f)(y)}function c(y){return i&&k(),x(n),p(y)}function f(y){return t.parser.lazy[t.now().line]=n!==r.length,a=t.now().offset,h(y)}function p(y){return t.containerState={},e.attempt(up,m,h)(y)}function m(y){return n++,r.push([t.currentConstruct,t.containerState]),p(y)}function h(y){if(y===null){i&&k(),x(0),e.consume(y);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),E(y)}function E(y){if(y===null){C(e.exit("chunkFlow"),!0),x(0),e.consume(y);return}return R(y)?(e.consume(y),C(e.exit("chunkFlow")),n=0,t.interrupt=void 0,s):(e.consume(y),E)}function C(y,S){let v=t.sliceStream(y);if(S&&v.push(null),y.previous=o,o&&(o.next=y),o=y,i.defineSkip(y.start),i.write(v),t.parser.lazy[y.start.line]){let A=i.events.length;for(;A--;)if(i.events[A][1].start.offset<a&&(!i.events[A][1].end||i.events[A][1].end.offset>a))return;let te=t.events.length,J=te,re,b;for(;J--;)if(t.events[J][0]==="exit"&&t.events[J][1].type==="chunkFlow"){if(re){b=t.events[J][1].end;break}re=!0}for(x(n),A=te;A<t.events.length;)t.events[A][1].end={...b},A++;De(t.events,J+1,0,t.events.slice(te)),t.events.length=A}}function x(y){let S=r.length;for(;S-- >y;){let v=r[S];t.containerState=v[1],v[0].exit.call(t,e)}r.length=y}function k(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function ik(e,t,r){return U(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function gr(e){if(e===null||Y(e)||Ht(e))return 1;if(gn(e))return 2}function Ir(e,t,r){let n=[],i=-1;for(;++i<e.length;){let o=e[i].resolveAll;o&&!n.includes(o)&&(t=o(t,r),n.push(o))}return t}var eo={name:"attention",resolveAll:ok,tokenize:ak};function ok(e,t){let r=-1,n,i,o,a,s,u,l,c;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;u=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;let f={...e[n][1].end},p={...e[r][1].start};cp(f,-u),cp(p,u),a={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...e[n][1].end}},s={type:u>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:p},o={type:u>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[r][1].start}},i={type:u>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},e[n][1].end={...a.start},e[r][1].start={...s.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=st(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=st(l,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),l=st(l,Ir(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),l=st(l,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[r][1].end.offset-e[r][1].start.offset?(c=2,l=st(l,[["enter",e[r][1],t],["exit",e[r][1],t]])):c=0,De(e,n-1,r-n+3,l),r=n+l.length-c-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function ak(e,t){let r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=gr(n),o;return a;function a(u){return o=u,e.enter("attentionSequence"),s(u)}function s(u){if(u===o)return e.consume(u),s;let l=e.exit("attentionSequence"),c=gr(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)),t(u)}}function cp(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var vu={name:"autolink",tokenize:sk};function sk(e,t,r){let n=0;return i;function i(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(m){return je(m)?(e.consume(m),a):m===64?r(m):l(m)}function a(m){return m===43||m===45||m===46||$e(m)?(n=1,s(m)):l(m)}function s(m){return m===58?(e.consume(m),n=0,u):(m===43||m===45||m===46||$e(m))&&n++<32?(e.consume(m),s):(n=0,l(m))}function u(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||hn(m)?r(m):(e.consume(m),u)}function l(m){return m===64?(e.consume(m),c):ip(m)?(e.consume(m),l):r(m)}function c(m){return $e(m)?f(m):r(m)}function f(m){return m===46?(e.consume(m),n=0,c):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):p(m)}function p(m){if((m===45||$e(m))&&n++<63){let h=m===45?p:f;return e.consume(m),h}return r(m)}}var Wt={partial:!0,tokenize:uk};function uk(e,t,r){return n;function n(o){return z(o)?U(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||R(o)?t(o):r(o)}}var na={continuation:{tokenize:ck},exit:fk,name:"blockQuote",tokenize:lk};function lk(e,t,r){let n=this;return i;function i(a){if(a===62){let s=n.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return r(a)}function o(a){return z(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function ck(e,t,r){let n=this;return i;function i(a){return z(a)?U(e,o,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(na,t,r)(a)}}function fk(e){e.exit("blockQuote")}var ia={name:"characterEscape",tokenize:pk};function pk(e,t,r){return n;function n(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return ap(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(o)}}var oa={name:"characterReference",tokenize:mk};function mk(e,t,r){let n=this,i=0,o,a;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,a=$e,c(f))}function l(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=op,c):(e.enter("characterReferenceValue"),o=7,a=Qi,c(f))}function c(f){if(f===59&&i){let p=e.exit("characterReferenceValue");return a===$e&&!Xn(n.sliceSerialize(p))?r(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(f)&&i++<o?(e.consume(f),c):r(f)}}var fp={partial:!0,tokenize:hk},aa={concrete:!0,name:"codeFenced",tokenize:dk};function dk(e,t,r){let n=this,i={partial:!0,tokenize:v},o=0,a=0,s;return u;function u(A){return l(A)}function l(A){let te=n.events[n.events.length-1];return o=te&&te[1].type==="linePrefix"?te[2].sliceSerialize(te[1],!0).length:0,s=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(A)}function c(A){return A===s?(a++,e.consume(A),c):a<3?r(A):(e.exit("codeFencedFenceSequence"),z(A)?U(e,f,"whitespace")(A):f(A))}function f(A){return A===null||R(A)?(e.exit("codeFencedFence"),n.interrupt?t(A):e.check(fp,E,S)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(A))}function p(A){return A===null||R(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(A)):z(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),U(e,m,"whitespace")(A)):A===96&&A===s?r(A):(e.consume(A),p)}function m(A){return A===null||R(A)?f(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(A))}function h(A){return A===null||R(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(A)):A===96&&A===s?r(A):(e.consume(A),h)}function E(A){return e.attempt(i,S,C)(A)}function C(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),x}function x(A){return o>0&&z(A)?U(e,k,"linePrefix",o+1)(A):k(A)}function k(A){return A===null||R(A)?e.check(fp,E,S)(A):(e.enter("codeFlowValue"),y(A))}function y(A){return A===null||R(A)?(e.exit("codeFlowValue"),k(A)):(e.consume(A),y)}function S(A){return e.exit("codeFenced"),t(A)}function v(A,te,J){let re=0;return b;function b(G){return A.enter("lineEnding"),A.consume(G),A.exit("lineEnding"),ce}function ce(G){return A.enter("codeFencedFence"),z(G)?U(A,Q,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):Q(G)}function Q(G){return G===s?(A.enter("codeFencedFenceSequence"),B(G)):J(G)}function B(G){return G===s?(re++,A.consume(G),B):re>=a?(A.exit("codeFencedFenceSequence"),z(G)?U(A,V,"whitespace")(G):V(G)):J(G)}function V(G){return G===null||R(G)?(A.exit("codeFencedFence"),te(G)):J(G)}}}function hk(e,t,r){let n=this;return i;function i(a){return a===null?r(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}var to={name:"codeIndented",tokenize:xk},gk={partial:!0,tokenize:yk};function xk(e,t,r){let n=this;return i;function i(l){return e.enter("codeIndented"),U(e,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?a(l):r(l)}function a(l){return l===null?u(l):R(l)?e.attempt(gk,a,u)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||R(l)?(e.exit("codeFlowValue"),a(l)):(e.consume(l),s)}function u(l){return e.exit("codeIndented"),t(l)}}function yk(e,t,r){let n=this;return i;function i(a){return n.parser.lazy[n.now().line]?r(a):R(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):U(e,o,"linePrefix",5)(a)}function o(a){let s=n.events[n.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):R(a)?i(a):r(a)}}var _u={name:"codeText",previous:bk,resolve:Ek,tokenize:kk};function Ek(e){let t=e.length-4,r=3,n,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)i===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(i=n):(n===t||e[n][1].type==="lineEnding")&&(e[i][1].type="codeTextData",n!==i+2&&(e[i][1].end=e[n-1][1].end,e.splice(i+2,n-i-2),t-=n-i-2,n=i+2),i=void 0);return e}function bk(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function kk(e,t,r){let n=this,i=0,o,a;return s;function s(p){return e.enter("codeText"),e.enter("codeTextSequence"),u(p)}function u(p){return p===96?(e.consume(p),i++,u):(e.exit("codeTextSequence"),l(p))}function l(p){return p===null?r(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),l):p===96?(a=e.enter("codeTextSequence"),o=0,f(p)):R(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(p))}function c(p){return p===null||p===32||p===96||R(p)?(e.exit("codeTextData"),l(p)):(e.consume(p),c)}function f(p){return p===96?(e.consume(p),o++,f):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(a.type="codeTextData",c(p))}}var sa=class{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){let n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,r,n){let i=r||0;this.setCursor(Math.trunc(t));let o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&ro(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ro(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ro(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){let r=this.left.splice(t,Number.POSITIVE_INFINITY);ro(this.right,r.reverse())}else{let r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ro(this.left,r.reverse())}}};function ro(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function ua(e){let t={},r=-1,n,i,o,a,s,u,l,c=new sa(e);for(;++r<c.length;){for(;r in t;)r=t[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(t,Ak(c,r)),r=t[r],l=!0);else if(n[1]._container){for(o=r,i=void 0;o--;)if(a=c.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(n[1].end={...c.get(i)[1].start},s=c.slice(i,r),s.unshift(n),c.splice(i,r-i+1,s))}}return De(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function Ak(e,t){let r=e.get(t)[1],n=e.get(t)[2],i=t-1,o=[],a=r._tokenizer;a||(a=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));let s=a.events,u=[],l={},c,f,p=-1,m=r,h=0,E=0,C=[E];for(;m;){for(;e.get(++i)[1]!==m;);o.push(i),m._tokenizer||(c=n.sliceStream(m),m.next||c.push(null),f&&a.defineSkip(m.start),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=m,m=m.next}for(m=r;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(E=p+1,C.push(E),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(a.events=[],m?(m._tokenizer=void 0,m.previous=void 0):C.pop(),p=C.length;p--;){let x=s.slice(C[p],C[p+1]),k=o.pop();u.push([k,k+x.length-1]),e.splice(k,2,x)}for(u.reverse(),p=-1;++p<u.length;)l[h+u[p][0]]=h+u[p][1],h+=u[p][1]-u[p][0]-1;return l}var Iu={resolve:Ck,tokenize:wk},Tk={partial:!0,tokenize:Sk};function Ck(e){return ua(e),e}function wk(e,t){let r;return n;function n(s){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):R(s)?e.check(Tk,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function Sk(e,t,r){let n=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),U(e,o,"linePrefix")}function o(a){if(a===null||R(a))return r(a);let s=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(n.parser.constructs.flow,r,t)(a)}}function la(e,t,r,n,i,o,a,s,u){let l=u||Number.POSITIVE_INFINITY,c=0;return f;function f(x){return x===60?(e.enter(n),e.enter(i),e.enter(o),e.consume(x),e.exit(o),p):x===null||x===32||x===41||hn(x)?r(x):(e.enter(n),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),E(x))}function p(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===62?(e.exit("chunkString"),e.exit(s),p(x)):x===null||x===60||R(x)?r(x):(e.consume(x),x===92?h:m)}function h(x){return x===60||x===62||x===92?(e.consume(x),m):m(x)}function E(x){return!c&&(x===null||x===41||Y(x))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(n),t(x)):c<l&&x===40?(e.consume(x),c++,E):x===41?(e.consume(x),c--,E):x===null||x===32||x===40||hn(x)?r(x):(e.consume(x),x===92?C:E)}function C(x){return x===40||x===41||x===92?(e.consume(x),E):E(x)}}function ca(e,t,r,n,i,o){let a=this,s=0,u;return l;function l(m){return e.enter(n),e.enter(i),e.consume(m),e.exit(i),e.enter(o),c}function c(m){return s>999||m===null||m===91||m===93&&!u||m===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?r(m):m===93?(e.exit(o),e.enter(i),e.consume(m),e.exit(i),e.exit(n),t):R(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===null||m===91||m===93||R(m)||s++>999?(e.exit("chunkString"),c(m)):(e.consume(m),u||(u=!z(m)),m===92?p:f)}function p(m){return m===91||m===92||m===93?(e.consume(m),s++,f):f(m)}}function fa(e,t,r,n,i,o){let a;return s;function s(p){return p===34||p===39||p===40?(e.enter(n),e.enter(i),e.consume(p),e.exit(i),a=p===40?41:p,u):r(p)}function u(p){return p===a?(e.enter(i),e.consume(p),e.exit(i),e.exit(n),t):(e.enter(o),l(p))}function l(p){return p===a?(e.exit(o),u(a)):p===null?r(p):R(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),U(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===a||p===null||R(p)?(e.exit("chunkString"),l(p)):(e.consume(p),p===92?f:c)}function f(p){return p===a||p===92?(e.consume(p),c):c(p)}}function xn(e,t){let r;return n;function n(i){return R(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n):z(i)?U(e,n,r?"linePrefix":"lineSuffix")(i):t(i)}}var Ru={name:"definition",tokenize:_k},vk={partial:!0,tokenize:Ik};function _k(e,t,r){let n=this,i;return o;function o(m){return e.enter("definition"),a(m)}function a(m){return ca.call(n,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function s(m){return i=Qe(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),u):r(m)}function u(m){return Y(m)?xn(e,l)(m):l(m)}function l(m){return la(e,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function c(m){return e.attempt(vk,f,f)(m)}function f(m){return z(m)?U(e,p,"whitespace")(m):p(m)}function p(m){return m===null||R(m)?(e.exit("definition"),n.parser.defined.push(i),t(m)):r(m)}}function Ik(e,t,r){return n;function n(s){return Y(s)?xn(e,i)(s):r(s)}function i(s){return fa(e,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return z(s)?U(e,a,"whitespace")(s):a(s)}function a(s){return s===null||R(s)?t(s):r(s)}}var Du={name:"hardBreakEscape",tokenize:Rk};function Rk(e,t,r){return n;function n(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return R(o)?(e.exit("hardBreakEscape"),t(o)):r(o)}}var Fu={name:"headingAtx",resolve:Dk,tokenize:Fk};function Dk(e,t){let r=e.length-2,n=3,i,o;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},o={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},De(e,n,r-n+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Fk(e,t,r){let n=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&n++<6?(e.consume(c),a):c===null||Y(c)?(e.exit("atxHeadingSequence"),s(c)):r(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||R(c)?(e.exit("atxHeading"),t(c)):z(c)?U(e,s,"whitespace")(c):(e.enter("atxHeadingText"),l(c))}function u(c){return c===35?(e.consume(c),u):(e.exit("atxHeadingSequence"),s(c))}function l(c){return c===null||c===35||Y(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),l)}}var pp=["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"],Ou=["pre","script","style","textarea"];var Nu={concrete:!0,name:"htmlFlow",resolveTo:Lk,tokenize:Pk},Ok={partial:!0,tokenize:Bk},Nk={partial:!0,tokenize:Mk};function Lk(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Pk(e,t,r){let n=this,i,o,a,s,u;return l;function l(g){return c(g)}function c(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),f}function f(g){return g===33?(e.consume(g),p):g===47?(e.consume(g),o=!0,E):g===63?(e.consume(g),i=3,n.interrupt?t:d):je(g)?(e.consume(g),a=String.fromCharCode(g),C):r(g)}function p(g){return g===45?(e.consume(g),i=2,m):g===91?(e.consume(g),i=5,s=0,h):je(g)?(e.consume(g),i=4,n.interrupt?t:d):r(g)}function m(g){return g===45?(e.consume(g),n.interrupt?t:d):r(g)}function h(g){let Xe="CDATA[";return g===Xe.charCodeAt(s++)?(e.consume(g),s===Xe.length?n.interrupt?t:Q:h):r(g)}function E(g){return je(g)?(e.consume(g),a=String.fromCharCode(g),C):r(g)}function C(g){if(g===null||g===47||g===62||Y(g)){let Xe=g===47,ze=a.toLowerCase();return!Xe&&!o&&Ou.includes(ze)?(i=1,n.interrupt?t(g):Q(g)):pp.includes(a.toLowerCase())?(i=6,Xe?(e.consume(g),x):n.interrupt?t(g):Q(g)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(g):o?k(g):y(g))}return g===45||$e(g)?(e.consume(g),a+=String.fromCharCode(g),C):r(g)}function x(g){return g===62?(e.consume(g),n.interrupt?t:Q):r(g)}function k(g){return z(g)?(e.consume(g),k):b(g)}function y(g){return g===47?(e.consume(g),b):g===58||g===95||je(g)?(e.consume(g),S):z(g)?(e.consume(g),y):b(g)}function S(g){return g===45||g===46||g===58||g===95||$e(g)?(e.consume(g),S):v(g)}function v(g){return g===61?(e.consume(g),A):z(g)?(e.consume(g),v):y(g)}function A(g){return g===null||g===60||g===61||g===62||g===96?r(g):g===34||g===39?(e.consume(g),u=g,te):z(g)?(e.consume(g),A):J(g)}function te(g){return g===u?(e.consume(g),u=null,re):g===null||R(g)?r(g):(e.consume(g),te)}function J(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||Y(g)?v(g):(e.consume(g),J)}function re(g){return g===47||g===62||z(g)?y(g):r(g)}function b(g){return g===62?(e.consume(g),ce):r(g)}function ce(g){return g===null||R(g)?Q(g):z(g)?(e.consume(g),ce):r(g)}function Q(g){return g===45&&i===2?(e.consume(g),ae):g===60&&i===1?(e.consume(g),xe):g===62&&i===4?(e.consume(g),it):g===63&&i===3?(e.consume(g),d):g===93&&i===5?(e.consume(g),Et):R(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Ok,vt,B)(g)):g===null||R(g)?(e.exit("htmlFlowData"),B(g)):(e.consume(g),Q)}function B(g){return e.check(Nk,V,vt)(g)}function V(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),G}function G(g){return g===null||R(g)?B(g):(e.enter("htmlFlowData"),Q(g))}function ae(g){return g===45?(e.consume(g),d):Q(g)}function xe(g){return g===47?(e.consume(g),a="",Ye):Q(g)}function Ye(g){if(g===62){let Xe=a.toLowerCase();return Ou.includes(Xe)?(e.consume(g),it):Q(g)}return je(g)&&a.length<8?(e.consume(g),a+=String.fromCharCode(g),Ye):Q(g)}function Et(g){return g===93?(e.consume(g),d):Q(g)}function d(g){return g===62?(e.consume(g),it):g===45&&i===2?(e.consume(g),d):Q(g)}function it(g){return g===null||R(g)?(e.exit("htmlFlowData"),vt(g)):(e.consume(g),it)}function vt(g){return e.exit("htmlFlow"),t(g)}}function Mk(e,t,r){let n=this;return i;function i(a){return R(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):r(a)}function o(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}function Bk(e,t,r){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Wt,t,r)}}var Lu={name:"htmlText",tokenize:Uk};function Uk(e,t,r){let n=this,i,o,a;return s;function s(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),u}function u(d){return d===33?(e.consume(d),l):d===47?(e.consume(d),v):d===63?(e.consume(d),y):je(d)?(e.consume(d),J):r(d)}function l(d){return d===45?(e.consume(d),c):d===91?(e.consume(d),o=0,h):je(d)?(e.consume(d),k):r(d)}function c(d){return d===45?(e.consume(d),m):r(d)}function f(d){return d===null?r(d):d===45?(e.consume(d),p):R(d)?(a=f,xe(d)):(e.consume(d),f)}function p(d){return d===45?(e.consume(d),m):f(d)}function m(d){return d===62?ae(d):d===45?p(d):f(d)}function h(d){let it="CDATA[";return d===it.charCodeAt(o++)?(e.consume(d),o===it.length?E:h):r(d)}function E(d){return d===null?r(d):d===93?(e.consume(d),C):R(d)?(a=E,xe(d)):(e.consume(d),E)}function C(d){return d===93?(e.consume(d),x):E(d)}function x(d){return d===62?ae(d):d===93?(e.consume(d),x):E(d)}function k(d){return d===null||d===62?ae(d):R(d)?(a=k,xe(d)):(e.consume(d),k)}function y(d){return d===null?r(d):d===63?(e.consume(d),S):R(d)?(a=y,xe(d)):(e.consume(d),y)}function S(d){return d===62?ae(d):y(d)}function v(d){return je(d)?(e.consume(d),A):r(d)}function A(d){return d===45||$e(d)?(e.consume(d),A):te(d)}function te(d){return R(d)?(a=te,xe(d)):z(d)?(e.consume(d),te):ae(d)}function J(d){return d===45||$e(d)?(e.consume(d),J):d===47||d===62||Y(d)?re(d):r(d)}function re(d){return d===47?(e.consume(d),ae):d===58||d===95||je(d)?(e.consume(d),b):R(d)?(a=re,xe(d)):z(d)?(e.consume(d),re):ae(d)}function b(d){return d===45||d===46||d===58||d===95||$e(d)?(e.consume(d),b):ce(d)}function ce(d){return d===61?(e.consume(d),Q):R(d)?(a=ce,xe(d)):z(d)?(e.consume(d),ce):re(d)}function Q(d){return d===null||d===60||d===61||d===62||d===96?r(d):d===34||d===39?(e.consume(d),i=d,B):R(d)?(a=Q,xe(d)):z(d)?(e.consume(d),Q):(e.consume(d),V)}function B(d){return d===i?(e.consume(d),i=void 0,G):d===null?r(d):R(d)?(a=B,xe(d)):(e.consume(d),B)}function V(d){return d===null||d===34||d===39||d===60||d===61||d===96?r(d):d===47||d===62||Y(d)?re(d):(e.consume(d),V)}function G(d){return d===47||d===62||Y(d)?re(d):r(d)}function ae(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),t):r(d)}function xe(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Ye}function Ye(d){return z(d)?U(e,Et,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):Et(d)}function Et(d){return e.enter("htmlTextData"),a(d)}}var yn={name:"labelEnd",resolveAll:qk,resolveTo:Vk,tokenize:Gk},zk={tokenize:Hk},jk={tokenize:Wk},$k={tokenize:Kk};function qk(e){let t=-1,r=[];for(;++t<e.length;){let n=e[t][1];if(r.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){let i=n.type==="labelImage"?4:2;n.type="data",t+=i}}return e.length!==r.length&&De(e,0,e.length,r),e}function Vk(e,t){let r=e.length,n=0,i,o,a,s;for(;r--;)if(i=e[r][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[r][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[r][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=r,i.type!=="labelLink")){n=2;break}}else i.type==="labelEnd"&&(a=r);let u={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[o][1].start},end:{...e[a][1].end}},c={type:"labelText",start:{...e[o+n+2][1].end},end:{...e[a-2][1].start}};return s=[["enter",u,t],["enter",l,t]],s=st(s,e.slice(o+1,o+n+3)),s=st(s,[["enter",c,t]]),s=st(s,Ir(t.parser.constructs.insideSpan.null,e.slice(o+n+4,a-3),t)),s=st(s,[["exit",c,t],e[a-2],e[a-1],["exit",l,t]]),s=st(s,e.slice(a+1)),s=st(s,[["exit",u,t]]),De(e,o,e.length,s),e}function Gk(e,t,r){let n=this,i=n.events.length,o,a;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 s;function s(p){return o?o._inactive?f(p):(a=n.parser.defined.includes(Qe(n.sliceSerialize({start:o.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):r(p)}function u(p){return p===40?e.attempt(zk,c,a?c:f)(p):p===91?e.attempt(jk,c,a?l:f)(p):a?c(p):f(p)}function l(p){return e.attempt($k,c,f)(p)}function c(p){return t(p)}function f(p){return o._balanced=!0,r(p)}}function Hk(e,t,r){return n;function n(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return Y(f)?xn(e,o)(f):o(f)}function o(f){return f===41?c(f):la(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return Y(f)?xn(e,u)(f):c(f)}function s(f){return r(f)}function u(f){return f===34||f===39||f===40?fa(e,l,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function l(f){return Y(f)?xn(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):r(f)}}function Wk(e,t,r){let n=this;return i;function i(s){return ca.call(n,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return n.parser.defined.includes(Qe(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function a(s){return r(s)}}function Kk(e,t,r){return n;function n(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):r(o)}}var Pu={name:"labelStartImage",resolveAll:yn.resolveAll,tokenize:Zk};function Zk(e,t,r){let n=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):r(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):t(s)}}var Mu={name:"labelStartLink",resolveAll:yn.resolveAll,tokenize:Yk};function Yk(e,t,r){let n=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(a):t(a)}}var no={name:"lineEnding",tokenize:Xk};function Xk(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),U(e,t,"linePrefix")}}var En={name:"thematicBreak",tokenize:Jk};function Jk(e,t,r){let n=0,i;return o;function o(l){return e.enter("thematicBreak"),a(l)}function a(l){return i=l,s(l)}function s(l){return l===i?(e.enter("thematicBreakSequence"),u(l)):n>=3&&(l===null||R(l))?(e.exit("thematicBreak"),t(l)):r(l)}function u(l){return l===i?(e.consume(l),n++,u):(e.exit("thematicBreakSequence"),z(l)?U(e,s,"whitespace")(l):s(l))}}var et={continuation:{tokenize:rA},exit:iA,name:"list",tokenize:tA},Qk={partial:!0,tokenize:oA},eA={partial:!0,tokenize:nA};function tA(e,t,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,a=0;return s;function s(m){let h=n.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!n.containerState.marker||m===n.containerState.marker:Qi(m)){if(n.containerState.type||(n.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(En,r,l)(m):l(m);if(!n.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(m)}return r(m)}function u(m){return Qi(m)&&++a<10?(e.consume(m),u):(!n.interrupt||a<2)&&(n.containerState.marker?m===n.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),l(m)):r(m)}function l(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||m,e.check(Wt,n.interrupt?r:c,e.attempt(Qk,p,f))}function c(m){return n.containerState.initialBlankLine=!0,o++,p(m)}function f(m){return z(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):r(m)}function p(m){return n.containerState.size=o+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function rA(e,t,r){let n=this;return n.containerState._closeFlow=void 0,e.check(Wt,i,o);function i(s){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,U(e,t,"listItemIndent",n.containerState.size+1)(s)}function o(s){return n.containerState.furtherBlankLines||!z(s)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,a(s)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(eA,t,a)(s))}function a(s){return n.containerState._closeFlow=!0,n.interrupt=void 0,U(e,e.attempt(et,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function nA(e,t,r){let n=this;return U(e,i,"listItemIndent",n.containerState.size+1);function i(o){let a=n.events[n.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===n.containerState.size?t(o):r(o)}}function iA(e){e.exit(this.containerState.type)}function oA(e,t,r){let n=this;return U(e,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){let a=n.events[n.events.length-1];return!z(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):r(o)}}var pa={name:"setextUnderline",resolveTo:aA,tokenize:sA};function aA(e,t){let r=e.length,n,i,o;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(i=r)}else e[r][1].type==="content"&&e.splice(r,1),!o&&e[r][1].type==="definition"&&(o=r);let a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=a,e.push(["exit",a,t]),e}function sA(e,t,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)?(e.enter("setextHeadingLine"),i=l,a(l)):r(l)}function a(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===i?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),z(l)?U(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||R(l)?(e.exit("setextHeadingLine"),t(l)):r(l)}}var mp={tokenize:uA};function uA(e){let t=this,r=e.attempt(Wt,n,e.attempt(this.parser.constructs.flowInitial,i,U(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Iu,i)),"linePrefix")));return r;function n(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,r}}var dp={resolveAll:yp()},hp=xp("string"),gp=xp("text");function xp(e){return{resolveAll:yp(e==="text"?lA:void 0),tokenize:t};function t(r){let n=this,i=this.parser.constructs[e],o=r.attempt(i,a,s);return a;function a(c){return l(c)?o(c):s(c)}function s(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 m=f[p];if(!m.previous||m.previous.call(n,n.previous))return!0}return!1}}}function yp(e){return t;function t(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 e?e(r,n):r}}function lA(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){let n=e[r-1][1],i=t.sliceStream(n),o=i.length,a=-1,s=0,u;for(;o--;){let l=i[o];if(typeof l=="string"){for(a=l.length;l.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(l===-2)u=!0,s++;else if(l!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(s=0),s){let l={type:r===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:n.start._bufferIndex+a,_index:n.start._index+o,line:n.end.line,column:n.end.column-s,offset:n.end.offset-s},end:{...n.end}};n.end={...l.start},n.start.offset===n.end.offset?Object.assign(n,l):(e.splice(r,0,["enter",l,t],["exit",l,t]),r+=2)}r++}return e}var Bu={};oE(Bu,{attentionMarkers:()=>xA,contentInitial:()=>fA,disable:()=>yA,document:()=>cA,flow:()=>mA,flowInitial:()=>pA,insideSpan:()=>gA,string:()=>dA,text:()=>hA});var cA={42:et,43:et,45:et,48:et,49:et,50:et,51:et,52:et,53:et,54:et,55:et,56:et,57:et,62:na},fA={91:Ru},pA={[-2]:to,[-1]:to,32:to},mA={35:Fu,42:En,45:[pa,En],60:Nu,61:pa,95:En,96:aa,126:aa},dA={38:oa,92:ia},hA={[-5]:no,[-4]:no,[-3]:no,33:Pu,38:oa,42:eo,60:[vu,Lu],91:Mu,92:[Du,ia],93:yn,95:eo,96:_u},gA={null:[eo,dp]},xA={null:[42,95]},yA={null:[]};function Ep(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0},i={},o=[],a=[],s=[],u=!0,l={attempt:re(te),check:re(J),consume:S,enter:v,exit:A,interrupt:re(J,{interrupt:!0})},c={code:null,containerState:{},defineSkip:x,events:[],now:C,parser:e,previous:null,sliceSerialize:h,sliceStream:E,write:m},f=t.tokenize.call(c,l),p;return t.resolveAll&&o.push(t),c;function m(B){return a=st(a,B),k(),a[a.length-1]!==null?[]:(b(t,0),c.events=Ir(o,c.events,c),c.events)}function h(B,V){return bA(E(B),V)}function E(B){return EA(a,B)}function C(){let{_bufferIndex:B,_index:V,line:G,column:ae,offset:xe}=n;return{_bufferIndex:B,_index:V,line:G,column:ae,offset:xe}}function x(B){i[B.line]=B.column,Q()}function k(){let B;for(;n._index<a.length;){let V=a[n._index];if(typeof V=="string")for(B=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===B&&n._bufferIndex<V.length;)y(V.charCodeAt(n._bufferIndex));else y(V)}}function y(B){u=void 0,p=B,f=f(B)}function S(B){R(B)?(n.line++,n.column=1,n.offset+=B===-3?2:1,Q()):B!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===a[n._index].length&&(n._bufferIndex=-1,n._index++)),c.previous=B,u=!0}function v(B,V){let G=V||{};return G.type=B,G.start=C(),c.events.push(["enter",G,c]),s.push(G),G}function A(B){let V=s.pop();return V.end=C(),c.events.push(["exit",V,c]),V}function te(B,V){b(B,V.from)}function J(B,V){V.restore()}function re(B,V){return G;function G(ae,xe,Ye){let Et,d,it,vt;return Array.isArray(ae)?Xe(ae):"tokenize"in ae?Xe([ae]):g(ae);function g(se){return _t;function _t(Te){let Ke=Te!==null&&se[Te],ot=Te!==null&&se.null,bt=[...Array.isArray(Ke)?Ke:Ke?[Ke]:[],...Array.isArray(ot)?ot:ot?[ot]:[]];return Xe(bt)(Te)}}function Xe(se){return Et=se,d=0,se.length===0?Ye:ze(se[d])}function ze(se){return _t;function _t(Te){return vt=ce(),it=se,se.partial||(c.currentConstruct=se),se.name&&c.parser.constructs.disable.null.includes(se.name)?Re(Te):se.tokenize.call(V?Object.assign(Object.create(c),V):c,l,Pn,Re)(Te)}}function Pn(se){return u=!0,B(it,vt),xe}function Re(se){return u=!0,vt.restore(),++d<Et.length?ze(Et[d]):Ye}}}function b(B,V){B.resolveAll&&!o.includes(B)&&o.push(B),B.resolve&&De(c.events,V,c.events.length-V,B.resolve(c.events.slice(V),c)),B.resolveTo&&(c.events=B.resolveTo(c.events,c))}function ce(){let B=C(),V=c.previous,G=c.currentConstruct,ae=c.events.length,xe=Array.from(s);return{from:ae,restore:Ye};function Ye(){n=B,c.previous=V,c.currentConstruct=G,c.events.length=ae,s=xe,Q()}}function Q(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function EA(e,t){let r=t.start._index,n=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex,a;if(r===i)a=[e[r].slice(n,o)];else{if(a=e.slice(r,i),n>-1){let s=a[0];typeof s=="string"?a[0]=s.slice(n):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function bA(e,t){let r=-1,n=[],i;for(;++r<e.length;){let o=e[r],a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
|
|
1
|
+
var Py=Object.create;var Qs=Object.defineProperty;var My=Object.getOwnPropertyDescriptor;var By=Object.getOwnPropertyNames;var Uy=Object.getPrototypeOf,zy=Object.prototype.hasOwnProperty;var Po=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),jy=(e,t)=>{for(var r in t)Qs(e,r,{get:t[r],enumerable:!0})},$y=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of By(t))!zy.call(e,i)&&i!==r&&Qs(e,i,{get:()=>t[i],enumerable:!(n=My(t,i))||n.enumerable});return e};var eu=(e,t,r)=>(r=e!=null?Py(Uy(e)):{},$y(t||!e||!e.__esModule?Qs(r,"default",{value:e,enumerable:!0}):r,e));var of=Po((n0,tu)=>{"use strict";var Bo=process||{},rf=Bo.argv||[],Mo=Bo.env||{},qy=!(Mo.NO_COLOR||rf.includes("--no-color"))&&(!!Mo.FORCE_COLOR||rf.includes("--color")||Bo.platform==="win32"||(Bo.stdout||{}).isTTY&&Mo.TERM!=="dumb"||!!Mo.CI),Vy=(e,t,r=e)=>n=>{let i=""+n,o=i.indexOf(t,e.length);return~o?e+Gy(i,t,r,o)+t:e+i+t},Gy=(e,t,r,n)=>{let i="",o=0;do i+=e.substring(o,n)+r,o=n+t.length,n=e.indexOf(t,o);while(~n);return i+e.substring(o)},nf=(e=qy)=>{let t=e?Vy:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};tu.exports=nf();tu.exports.createColors=nf});var af=Po((i0,Hy)=>{Hy.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 uf=Po((o0,sf)=>{"use strict";var Wy=af();sf.exports=new Map(Object.entries(Wy))});var Zp=Po((KB,Kp)=>{"use strict";var ga=Object.prototype.hasOwnProperty,Wp=Object.prototype.toString,jp=Object.defineProperty,$p=Object.getOwnPropertyDescriptor,qp=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Wp.call(t)==="[object Array]"},Vp=function(t){if(!t||Wp.call(t)!=="[object Object]")return!1;var r=ga.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&ga.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!n)return!1;var i;for(i in t);return typeof i>"u"||ga.call(t,i)},Gp=function(t,r){jp&&r.name==="__proto__"?jp(t,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):t[r.name]=r.newValue},Hp=function(t,r){if(r==="__proto__")if(ga.call(t,r)){if($p)return $p(t,r).value}else return;return t[r]};Kp.exports=function e(){var t,r,n,i,o,a,s=arguments[0],u=1,l=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},u=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});u<l;++u)if(t=arguments[u],t!=null)for(r in t)n=Hp(s,r),i=Hp(t,r),s!==i&&(c&&i&&(Vp(i)||(o=qp(i)))?(o?(o=!1,a=n&&qp(n)?n:[]):a=n&&Vp(n)?n:{},Gp(s,{name:r,newValue:e(c,a,i)})):typeof i<"u"&&Gp(s,{name:r,newValue:i}));return s}});var Ho=eu(of(),1);import{cosmiconfig as Rf}from"cosmiconfig";import{TypeScriptLoader as Ff}from"cosmiconfig-typescript-loader";import hb from"node:fs/promises";import Lf from"node:path";var ru=eu(uf(),1);function nu(e,t,r){if(typeof t=="number"&&(r=t),ru.default.has(e.toLowerCase())){t=ru.default.get(e.toLowerCase());let n=e.charAt(0);n===n.toUpperCase()&&(t=n+t.slice(1)),e===e.toUpperCase()&&(t=t.toUpperCase())}else typeof t!="string"&&(t=(e.replace(/(?:s|x|z|ch|sh)$/i,"$&e").replace(/([^aeiou])y$/i,"$1ie")+"s").replace(/i?e?s$/i,n=>e.slice(-1)===e.slice(-1).toLowerCase()?n.toLowerCase():n.toUpperCase()));return Math.abs(r)===1?e:t}import{readPackage as gb}from"read-pkg";import{deepMergeDefined as Wo,log as It,optionsSchema as xb,rulesSchema as yb}from"remark-mdat";var oe;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function r(i){throw new Error}e.assertNever=r,e.arrayToEnum=i=>{let o={};for(let a of i)o[a]=a;return o},e.getValidEnumValues=i=>{let o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(let s of o)a[s]=i[s];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let o=[];for(let a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(let a of i)if(o(a))return a},e.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(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=n,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(oe||(oe={}));var ou;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(ou||(ou={}));var F=oe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),sr=e=>{switch(typeof e){case"undefined":return F.undefined;case"string":return F.string;case"number":return isNaN(e)?F.nan:F.number;case"boolean":return F.boolean;case"function":return F.function;case"bigint":return F.bigint;case"symbol":return F.symbol;case"object":return Array.isArray(e)?F.array:e===null?F.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?F.promise:typeof Map<"u"&&e instanceof Map?F.map:typeof Set<"u"&&e instanceof Set?F.set:typeof Date<"u"&&e instanceof Date?F.date:F.object;default:return F.unknown}},w=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"]),Ky=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),bt=class e extends Error{get errors(){return this.issues}constructor(t){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=t}format(t){let r=t||function(o){return o.message},n={_errors:[]},i=o=>{for(let a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let s=n,u=0;for(;u<a.path.length;){let l=a.path[u];u===a.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(r(a))):s[l]=s[l]||{_errors:[]},s=s[l],u++}}};return i(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,oe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=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(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};bt.create=e=>new bt(e);var Mn=(e,t)=>{let r;switch(e.code){case w.invalid_type:e.received===F.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case w.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,oe.jsonStringifyReplacer)}`;break;case w.unrecognized_keys:r=`Unrecognized key(s) in object: ${oe.joinValues(e.keys,", ")}`;break;case w.invalid_union:r="Invalid input";break;case w.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${oe.joinValues(e.options)}`;break;case w.invalid_enum_value:r=`Invalid enum value. Expected ${oe.joinValues(e.options)}, received '${e.received}'`;break;case w.invalid_arguments:r="Invalid function arguments";break;case w.invalid_return_type:r="Invalid function return type";break;case w.invalid_date:r="Invalid date";break;case w.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:oe.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case w.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case w.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case w.custom:r="Invalid input";break;case w.invalid_intersection_types:r="Intersection results could not be merged";break;case w.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case w.not_finite:r="Number must be finite";break;default:r=t.defaultError,oe.assertNever(e)}return{message:r}},pf=Mn;function Zy(e){pf=e}function Uo(){return pf}var zo=e=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,o=[...r,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let s="",u=n.filter(l=>!!l).slice().reverse();for(let l of u)s=l(a,{data:t,defaultError:s}).message;return{...i,path:o,message:s}},Yy=[];function I(e,t){let r=Uo(),n=zo({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Mn?void 0:Mn].filter(i=>!!i)});e.common.issues.push(n)}var Ye=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let i of r){if(i.status==="aborted")return q;i.status==="dirty"&&t.dirty(),n.push(i.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let i of r){let o=await i.key,a=await i.value;n.push({key:o,value:a})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let i of r){let{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return q;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(n[o.value]=a.value)}return{status:t.value,value:n}}},q=Object.freeze({status:"aborted"}),Pn=e=>({status:"dirty",value:e}),it=e=>({status:"valid",value:e}),au=e=>e.status==="aborted",su=e=>e.status==="dirty",Wr=e=>e.status==="valid",$i=e=>typeof Promise<"u"&&e instanceof Promise;function jo(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function mf(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r}var M;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(M||(M={}));var zi,ji,vt=class{constructor(t,r,n,i){this._cachedPath=[],this.parent=t,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}},lf=(e,t)=>{if(Wr(t))return{success:!0,data:t.value};if(!e.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 bt(e.common.issues);return this._error=r,this._error}}};function K(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,s)=>{var u,l;let{message:c}=e;return a.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:(u=c??n)!==null&&u!==void 0?u:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(l=c??r)!==null&&l!==void 0?l:s.defaultError}},description:i}}var Z=class{get description(){return this._def.description}_getType(t){return sr(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:sr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ye,ctx:{common:t.parent.common,data:t.data,parsedType:sr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if($i(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,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:t,parsedType:sr(t)},o=this._parseSync({data:t,path:i.path,parent:i});return lf(i,o)}"~validate"(t){var r,n;let i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:sr(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:i});return Wr(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:t,path:[],parent:i}).then(o=>Wr(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:sr(t)},i=this._parse({data:t,path:n.path,parent:n}),o=await($i(i)?i:Promise.resolve(i));return lf(n,o)}refine(t,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,o)=>{let a=t(i),s=()=>o.addIssue({code:w.custom,...n(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,r){return this._refinement((n,i)=>t(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(t){return new kt({schema:this,typeName:$.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,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 _t.create(this,this._def)}nullable(){return jt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return lr.create(this)}promise(){return Tr.create(this,this._def)}or(t){return en.create([this,t],this._def)}and(t){return tn.create(this,t,this._def)}transform(t){return new kt({...K(this._def),schema:this,typeName:$.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new sn({...K(this._def),innerType:this,defaultValue:r,typeName:$.ZodDefault})}brand(){return new qi({typeName:$.ZodBranded,type:this,...K(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new un({...K(this._def),innerType:this,catchValue:r,typeName:$.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Vi.create(this,t)}readonly(){return ln.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Xy=/^c[^\s-]{8,}$/i,Jy=/^[0-9a-z]+$/,Qy=/^[0-9A-HJKMNP-TV-Z]{26}$/i,eE=/^[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,tE=/^[a-z0-9_-]{21}$/i,rE=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,nE=/^[-+]?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)?)??$/,iE=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,oE="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",iu,aE=/^(?:(?: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])$/,sE=/^(?:(?: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])$/,uE=/^(([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]))$/,lE=/^(([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])$/,cE=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,fE=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,df="((\\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])))",pE=new RegExp(`^${df}$`);function hf(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function mE(e){return new RegExp(`^${hf(e)}$`)}function gf(e){let t=`${df}T${hf(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function dE(e,t){return!!((t==="v4"||!t)&&aE.test(e)||(t==="v6"||!t)&&uE.test(e))}function hE(e,t){if(!rE.test(e))return!1;try{let[r]=e.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||t&&i.alg!==t)}catch{return!1}}function gE(e,t){return!!((t==="v4"||!t)&&sE.test(e)||(t==="v6"||!t)&&lE.test(e))}var kr=class e extends Z{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==F.string){let o=this._getOrReturnCtx(t);return I(o,{code:w.invalid_type,expected:F.string,received:o.parsedType}),q}let n=new Ye,i;for(let o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),I(i,{code:w.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")t.data.length>o.value&&(i=this._getOrReturnCtx(t,i),I(i,{code:w.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let a=t.data.length>o.value,s=t.data.length<o.value;(a||s)&&(i=this._getOrReturnCtx(t,i),a?I(i,{code:w.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&I(i,{code:w.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")iE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"email",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")iu||(iu=new RegExp(oE,"u")),iu.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"emoji",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")eE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"uuid",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")tE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"nanoid",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")Xy.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"cuid",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")Jy.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"cuid2",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")Qy.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"ulid",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),I(i,{validation:"url",code:w.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"regex",code:w.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(t,i),I(i,{code:w.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(i=this._getOrReturnCtx(t,i),I(i,{code:w.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),I(i,{code:w.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?gf(o).test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{code:w.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?pE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{code:w.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?mE(o).test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{code:w.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?nE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"duration",code:w.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?dE(t.data,o.version)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"ip",code:w.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?hE(t.data,o.alg)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"jwt",code:w.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?gE(t.data,o.version)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"cidr",code:w.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?cE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"base64",code:w.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?fE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"base64url",code:w.invalid_string,message:o.message}),n.dirty()):oe.assertNever(o);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(i=>t.test(i),{validation:r,code:w.invalid_string,...M.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...M.errToObj(t)})}url(t){return this._addCheck({kind:"url",...M.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...M.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...M.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...M.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...M.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...M.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...M.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...M.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...M.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...M.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...M.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...M.errToObj(t)})}datetime(t){var r,n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(r=t?.offset)!==null&&r!==void 0?r:!1,local:(n=t?.local)!==null&&n!==void 0?n:!1,...M.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...M.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...M.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...M.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...M.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...M.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...M.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...M.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...M.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...M.errToObj(r)})}nonempty(t){return this.min(1,M.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};kr.create=e=>{var t;return new kr({checks:[],typeName:$.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...K(e)})};function xE(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}var Kr=class e extends Z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==F.number){let o=this._getOrReturnCtx(t);return I(o,{code:w.invalid_type,expected:F.number,received:o.parsedType}),q}let n,i=new Ye;for(let o of this._def.checks)o.kind==="int"?oe.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),I(n,{code:w.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),I(n,{code:w.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),I(n,{code:w.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?xE(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),I(n,{code:w.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),I(n,{code:w.not_finite,message:o.message}),i.dirty()):oe.assertNever(o);return{status:i.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,M.toString(r))}gt(t,r){return this.setLimit("min",t,!1,M.toString(r))}lte(t,r){return this.setLimit("max",t,!0,M.toString(r))}lt(t,r){return this.setLimit("max",t,!1,M.toString(r))}setLimit(t,r,n,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:M.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:M.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:M.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:M.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:M.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:M.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:M.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:M.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:M.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:M.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&oe.isInteger(t.value))}get isFinite(){let t=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"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};Kr.create=e=>new Kr({checks:[],typeName:$.ZodNumber,coerce:e?.coerce||!1,...K(e)});var Zr=class e extends Z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==F.bigint)return this._getInvalidInput(t);let n,i=new Ye;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),I(n,{code:w.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),I(n,{code:w.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),I(n,{code:w.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):oe.assertNever(o);return{status:i.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return I(r,{code:w.invalid_type,expected:F.bigint,received:r.parsedType}),q}gte(t,r){return this.setLimit("min",t,!0,M.toString(r))}gt(t,r){return this.setLimit("min",t,!1,M.toString(r))}lte(t,r){return this.setLimit("max",t,!0,M.toString(r))}lt(t,r){return this.setLimit("max",t,!1,M.toString(r))}setLimit(t,r,n,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:M.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:M.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:M.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:M.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:M.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:M.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Zr.create=e=>{var t;return new Zr({checks:[],typeName:$.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...K(e)})};var Yr=class extends Z{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==F.boolean){let n=this._getOrReturnCtx(t);return I(n,{code:w.invalid_type,expected:F.boolean,received:n.parsedType}),q}return it(t.data)}};Yr.create=e=>new Yr({typeName:$.ZodBoolean,coerce:e?.coerce||!1,...K(e)});var Xr=class e extends Z{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==F.date){let o=this._getOrReturnCtx(t);return I(o,{code:w.invalid_type,expected:F.date,received:o.parsedType}),q}if(isNaN(t.data.getTime())){let o=this._getOrReturnCtx(t);return I(o,{code:w.invalid_date}),q}let n=new Ye,i;for(let o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),I(i,{code:w.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(i=this._getOrReturnCtx(t,i),I(i,{code:w.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(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:M.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:M.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};Xr.create=e=>new Xr({checks:[],coerce:e?.coerce||!1,typeName:$.ZodDate,...K(e)});var Bn=class extends Z{_parse(t){if(this._getType(t)!==F.symbol){let n=this._getOrReturnCtx(t);return I(n,{code:w.invalid_type,expected:F.symbol,received:n.parsedType}),q}return it(t.data)}};Bn.create=e=>new Bn({typeName:$.ZodSymbol,...K(e)});var Jr=class extends Z{_parse(t){if(this._getType(t)!==F.undefined){let n=this._getOrReturnCtx(t);return I(n,{code:w.invalid_type,expected:F.undefined,received:n.parsedType}),q}return it(t.data)}};Jr.create=e=>new Jr({typeName:$.ZodUndefined,...K(e)});var Qr=class extends Z{_parse(t){if(this._getType(t)!==F.null){let n=this._getOrReturnCtx(t);return I(n,{code:w.invalid_type,expected:F.null,received:n.parsedType}),q}return it(t.data)}};Qr.create=e=>new Qr({typeName:$.ZodNull,...K(e)});var Ar=class extends Z{constructor(){super(...arguments),this._any=!0}_parse(t){return it(t.data)}};Ar.create=e=>new Ar({typeName:$.ZodAny,...K(e)});var ur=class extends Z{constructor(){super(...arguments),this._unknown=!0}_parse(t){return it(t.data)}};ur.create=e=>new ur({typeName:$.ZodUnknown,...K(e)});var Nt=class extends Z{_parse(t){let r=this._getOrReturnCtx(t);return I(r,{code:w.invalid_type,expected:F.never,received:r.parsedType}),q}};Nt.create=e=>new Nt({typeName:$.ZodNever,...K(e)});var Un=class extends Z{_parse(t){if(this._getType(t)!==F.undefined){let n=this._getOrReturnCtx(t);return I(n,{code:w.invalid_type,expected:F.void,received:n.parsedType}),q}return it(t.data)}};Un.create=e=>new Un({typeName:$.ZodVoid,...K(e)});var lr=class e extends Z{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),i=this._def;if(r.parsedType!==F.array)return I(r,{code:w.invalid_type,expected:F.array,received:r.parsedType}),q;if(i.exactLength!==null){let a=r.data.length>i.exactLength.value,s=r.data.length<i.exactLength.value;(a||s)&&(I(r,{code:a?w.too_big:w.too_small,minimum:s?i.exactLength.value:void 0,maximum:a?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&&(I(r,{code:w.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&&(I(r,{code:w.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((a,s)=>i.type._parseAsync(new vt(r,a,r.path,s)))).then(a=>Ye.mergeArray(n,a));let o=[...r.data].map((a,s)=>i.type._parseSync(new vt(r,a,r.path,s)));return Ye.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:M.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:M.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:M.toString(r)}})}nonempty(t){return this.min(1,t)}};lr.create=(e,t)=>new lr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:$.ZodArray,...K(t)});function Ln(e){if(e instanceof pt){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=_t.create(Ln(n))}return new pt({...e._def,shape:()=>t})}else return e instanceof lr?new lr({...e._def,type:Ln(e.element)}):e instanceof _t?_t.create(Ln(e.unwrap())):e instanceof jt?jt.create(Ln(e.unwrap())):e instanceof zt?zt.create(e.items.map(t=>Ln(t))):e}var pt=class e extends Z{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=oe.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==F.object){let l=this._getOrReturnCtx(t);return I(l,{code:w.invalid_type,expected:F.object,received:l.parsedType}),q}let{status:n,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Nt&&this._def.unknownKeys==="strip"))for(let l in i.data)a.includes(l)||s.push(l);let u=[];for(let l of a){let c=o[l],f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new vt(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Nt){let l=this._def.unknownKeys;if(l==="passthrough")for(let c of s)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")s.length>0&&(I(i,{code:w.unrecognized_keys,keys:s}),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 s){let f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new vt(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=>Ye.mergeObjectSync(n,l)):Ye.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(t){return M.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var i,o,a,s;let u=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,r,n).message)!==null&&a!==void 0?a:n.defaultError;return r.code==="unrecognized_keys"?{message:(s=M.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:$.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};return oe.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new e({...this._def,shape:()=>r})}omit(t){let r={};return oe.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new e({...this._def,shape:()=>r})}deepPartial(){return Ln(this)}partial(t){let r={};return oe.objectKeys(this.shape).forEach(n=>{let i=this.shape[n];t&&!t[n]?r[n]=i:r[n]=i.optional()}),new e({...this._def,shape:()=>r})}required(t){let r={};return oe.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof _t;)o=o._def.innerType;r[n]=o}}),new e({...this._def,shape:()=>r})}keyof(){return xf(oe.objectKeys(this.shape))}};pt.create=(e,t)=>new pt({shape:()=>e,unknownKeys:"strip",catchall:Nt.create(),typeName:$.ZodObject,...K(t)});pt.strictCreate=(e,t)=>new pt({shape:()=>e,unknownKeys:"strict",catchall:Nt.create(),typeName:$.ZodObject,...K(t)});pt.lazycreate=(e,t)=>new pt({shape:e,unknownKeys:"strip",catchall:Nt.create(),typeName:$.ZodObject,...K(t)});var en=class extends Z{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function i(o){for(let s of o)if(s.result.status==="valid")return s.result;for(let s of o)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;let a=o.map(s=>new bt(s.ctx.common.issues));return I(r,{code:w.invalid_union,unionErrors:a}),q}if(r.common.async)return Promise.all(n.map(async o=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(i);{let o,a=[];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&&a.push(l.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let s=a.map(u=>new bt(u));return I(r,{code:w.invalid_union,unionErrors:s}),q}}get options(){return this._def.options}};en.create=(e,t)=>new en({options:e,typeName:$.ZodUnion,...K(t)});var ar=e=>e instanceof rn?ar(e.schema):e instanceof kt?ar(e.innerType()):e instanceof nn?[e.value]:e instanceof on?e.options:e instanceof an?oe.objectValues(e.enum):e instanceof sn?ar(e._def.innerType):e instanceof Jr?[void 0]:e instanceof Qr?[null]:e instanceof _t?[void 0,...ar(e.unwrap())]:e instanceof jt?[null,...ar(e.unwrap())]:e instanceof qi||e instanceof ln?ar(e.unwrap()):e instanceof un?ar(e._def.innerType):[],$o=class e extends Z{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==F.object)return I(r,{code:w.invalid_type,expected:F.object,received:r.parsedType}),q;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}):(I(r,{code:w.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),q)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let i=new Map;for(let o of r){let a=ar(o.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let s of a){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new e({typeName:$.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:i,...K(n)})}};function uu(e,t){let r=sr(e),n=sr(t);if(e===t)return{valid:!0,data:e};if(r===F.object&&n===F.object){let i=oe.objectKeys(t),o=oe.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(let s of o){let u=uu(e[s],t[s]);if(!u.valid)return{valid:!1};a[s]=u.data}return{valid:!0,data:a}}else if(r===F.array&&n===F.array){if(e.length!==t.length)return{valid:!1};let i=[];for(let o=0;o<e.length;o++){let a=e[o],s=t[o],u=uu(a,s);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return r===F.date&&n===F.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var tn=class extends Z{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),i=(o,a)=>{if(au(o)||au(a))return q;let s=uu(o.value,a.value);return s.valid?((su(o)||su(a))&&r.dirty(),{status:r.value,value:s.data}):(I(n,{code:w.invalid_intersection_types}),q)};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,a])=>i(o,a)):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}))}};tn.create=(e,t,r)=>new tn({left:e,right:t,typeName:$.ZodIntersection,...K(r)});var zt=class e extends Z{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==F.array)return I(n,{code:w.invalid_type,expected:F.array,received:n.parsedType}),q;if(n.data.length<this._def.items.length)return I(n,{code:w.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),q;!this._def.rest&&n.data.length>this._def.items.length&&(I(n,{code:w.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...n.data].map((a,s)=>{let u=this._def.items[s]||this._def.rest;return u?u._parse(new vt(n,a,n.path,s)):null}).filter(a=>!!a);return n.common.async?Promise.all(o).then(a=>Ye.mergeArray(r,a)):Ye.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};zt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new zt({items:e,typeName:$.ZodTuple,rest:null,...K(t)})};var qo=class e extends Z{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==F.object)return I(n,{code:w.invalid_type,expected:F.object,received:n.parsedType}),q;let i=[],o=this._def.keyType,a=this._def.valueType;for(let s in n.data)i.push({key:o._parse(new vt(n,s,n.path,s)),value:a._parse(new vt(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?Ye.mergeObjectAsync(r,i):Ye.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof Z?new e({keyType:t,valueType:r,typeName:$.ZodRecord,...K(n)}):new e({keyType:kr.create(),valueType:t,typeName:$.ZodRecord,...K(r)})}},zn=class extends Z{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==F.map)return I(n,{code:w.invalid_type,expected:F.map,received:n.parsedType}),q;let i=this._def.keyType,o=this._def.valueType,a=[...n.data.entries()].map(([s,u],l)=>({key:i._parse(new vt(n,s,n.path,[l,"key"])),value:o._parse(new vt(n,u,n.path,[l,"value"]))}));if(n.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let u of a){let l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return q;(l.status==="dirty"||c.status==="dirty")&&r.dirty(),s.set(l.value,c.value)}return{status:r.value,value:s}})}else{let s=new Map;for(let u of a){let l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return q;(l.status==="dirty"||c.status==="dirty")&&r.dirty(),s.set(l.value,c.value)}return{status:r.value,value:s}}}};zn.create=(e,t,r)=>new zn({valueType:t,keyType:e,typeName:$.ZodMap,...K(r)});var jn=class e extends Z{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==F.set)return I(n,{code:w.invalid_type,expected:F.set,received:n.parsedType}),q;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(I(n,{code:w.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&&(I(n,{code:w.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let o=this._def.valueType;function a(u){let l=new Set;for(let c of u){if(c.status==="aborted")return q;c.status==="dirty"&&r.dirty(),l.add(c.value)}return{status:r.value,value:l}}let s=[...n.data.values()].map((u,l)=>o._parse(new vt(n,u,n.path,l)));return n.common.async?Promise.all(s).then(u=>a(u)):a(s)}min(t,r){return new e({...this._def,minSize:{value:t,message:M.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:M.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};jn.create=(e,t)=>new jn({valueType:e,minSize:null,maxSize:null,typeName:$.ZodSet,...K(t)});var Vo=class e extends Z{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==F.function)return I(r,{code:w.invalid_type,expected:F.function,received:r.parsedType}),q;function n(s,u){return zo({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Uo(),Mn].filter(l=>!!l),issueData:{code:w.invalid_arguments,argumentsError:u}})}function i(s,u){return zo({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Uo(),Mn].filter(l=>!!l),issueData:{code:w.invalid_return_type,returnTypeError:u}})}let o={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof Tr){let s=this;return it(async function(...u){let l=new bt([]),c=await s._def.args.parseAsync(u,o).catch(m=>{throw l.addIssue(n(u,m)),l}),f=await Reflect.apply(a,this,c);return await s._def.returns._def.type.parseAsync(f,o).catch(m=>{throw l.addIssue(i(f,m)),l})})}else{let s=this;return it(function(...u){let l=s._def.args.safeParse(u,o);if(!l.success)throw new bt([n(u,l.error)]);let c=Reflect.apply(a,this,l.data),f=s._def.returns.safeParse(c,o);if(!f.success)throw new bt([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:zt.create(t).rest(ur.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||zt.create([]).rest(ur.create()),returns:r||ur.create(),typeName:$.ZodFunction,...K(n)})}},rn=class extends Z{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};rn.create=(e,t)=>new rn({getter:e,typeName:$.ZodLazy,...K(t)});var nn=class extends Z{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return I(r,{received:r.data,code:w.invalid_literal,expected:this._def.value}),q}return{status:"valid",value:t.data}}get value(){return this._def.value}};nn.create=(e,t)=>new nn({value:e,typeName:$.ZodLiteral,...K(t)});function xf(e,t){return new on({values:e,typeName:$.ZodEnum,...K(t)})}var on=class e extends Z{constructor(){super(...arguments),zi.set(this,void 0)}_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return I(r,{expected:oe.joinValues(n),received:r.parsedType,code:w.invalid_type}),q}if(jo(this,zi,"f")||mf(this,zi,new Set(this._def.values),"f"),!jo(this,zi,"f").has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return I(r,{received:r.data,code:w.invalid_enum_value,options:n}),q}return it(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};zi=new WeakMap;on.create=xf;var an=class extends Z{constructor(){super(...arguments),ji.set(this,void 0)}_parse(t){let r=oe.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==F.string&&n.parsedType!==F.number){let i=oe.objectValues(r);return I(n,{expected:oe.joinValues(i),received:n.parsedType,code:w.invalid_type}),q}if(jo(this,ji,"f")||mf(this,ji,new Set(oe.getValidEnumValues(this._def.values)),"f"),!jo(this,ji,"f").has(t.data)){let i=oe.objectValues(r);return I(n,{received:n.data,code:w.invalid_enum_value,options:i}),q}return it(t.data)}get enum(){return this._def.values}};ji=new WeakMap;an.create=(e,t)=>new an({values:e,typeName:$.ZodNativeEnum,...K(t)});var Tr=class extends Z{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==F.promise&&r.common.async===!1)return I(r,{code:w.invalid_type,expected:F.promise,received:r.parsedType}),q;let n=r.parsedType===F.promise?r.data:Promise.resolve(r.data);return it(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Tr.create=(e,t)=>new Tr({type:e,typeName:$.ZodPromise,...K(t)});var kt=class extends Z{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:a=>{I(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){let a=i.transform(n.data,o);if(n.common.async)return Promise.resolve(a).then(async s=>{if(r.value==="aborted")return q;let u=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return u.status==="aborted"?q:u.status==="dirty"||r.value==="dirty"?Pn(u.value):u});{if(r.value==="aborted")return q;let s=this._def.schema._parseSync({data:a,path:n.path,parent:n});return s.status==="aborted"?q:s.status==="dirty"||r.value==="dirty"?Pn(s.value):s}}if(i.type==="refinement"){let a=s=>{let u=i.refinement(s,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 s};if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?q:(s.status==="dirty"&&r.dirty(),a(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?q:(s.status==="dirty"&&r.dirty(),a(s.value).then(()=>({status:r.value,value:s.value}))))}if(i.type==="transform")if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Wr(a))return a;let s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>Wr(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:r.value,value:s})):a);oe.assertNever(i)}};kt.create=(e,t,r)=>new kt({schema:e,typeName:$.ZodEffects,effect:t,...K(r)});kt.createWithPreprocess=(e,t,r)=>new kt({schema:t,effect:{type:"preprocess",transform:e},typeName:$.ZodEffects,...K(r)});var _t=class extends Z{_parse(t){return this._getType(t)===F.undefined?it(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};_t.create=(e,t)=>new _t({innerType:e,typeName:$.ZodOptional,...K(t)});var jt=class extends Z{_parse(t){return this._getType(t)===F.null?it(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};jt.create=(e,t)=>new jt({innerType:e,typeName:$.ZodNullable,...K(t)});var sn=class extends Z{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===F.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};sn.create=(e,t)=>new sn({innerType:e,typeName:$.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...K(t)});var un=class extends Z{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return $i(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new bt(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new bt(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};un.create=(e,t)=>new un({innerType:e,typeName:$.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...K(t)});var $n=class extends Z{_parse(t){if(this._getType(t)!==F.nan){let n=this._getOrReturnCtx(t);return I(n,{code:w.invalid_type,expected:F.nan,received:n.parsedType}),q}return{status:"valid",value:t.data}}};$n.create=e=>new $n({typeName:$.ZodNaN,...K(e)});var yE=Symbol("zod_brand"),qi=class extends Z{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},Vi=class e extends Z{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);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"?q:o.status==="dirty"?(r.dirty(),Pn(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"?q:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:$.ZodPipeline})}},ln=class extends Z{_parse(t){let r=this._def.innerType._parse(t),n=i=>(Wr(i)&&(i.value=Object.freeze(i.value)),i);return $i(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};ln.create=(e,t)=>new ln({innerType:e,typeName:$.ZodReadonly,...K(t)});function cf(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function yf(e,t={},r){return e?Ar.create().superRefine((n,i)=>{var o,a;let s=e(n);if(s instanceof Promise)return s.then(u=>{var l,c;if(!u){let f=cf(t,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(!s){let u=cf(t,n),l=(a=(o=u.fatal)!==null&&o!==void 0?o:r)!==null&&a!==void 0?a:!0;i.addIssue({code:"custom",...u,fatal:l})}}):Ar.create()}var EE={object:pt.lazycreate},$;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})($||($={}));var bE=(e,t={message:`Input not instance of ${e.name}`})=>yf(r=>r instanceof e,t),Ef=kr.create,bf=Kr.create,kE=$n.create,AE=Zr.create,kf=Yr.create,TE=Xr.create,CE=Bn.create,wE=Jr.create,SE=Qr.create,_E=Ar.create,vE=ur.create,IE=Nt.create,DE=Un.create,RE=lr.create,FE=pt.create,OE=pt.strictCreate,NE=en.create,LE=$o.create,PE=tn.create,ME=zt.create,BE=qo.create,UE=zn.create,zE=jn.create,jE=Vo.create,$E=rn.create,qE=nn.create,VE=on.create,GE=an.create,HE=Tr.create,ff=kt.create,WE=_t.create,KE=jt.create,ZE=kt.createWithPreprocess,YE=Vi.create,XE=()=>Ef().optional(),JE=()=>bf().optional(),QE=()=>kf().optional(),eb={string:e=>kr.create({...e,coerce:!0}),number:e=>Kr.create({...e,coerce:!0}),boolean:e=>Yr.create({...e,coerce:!0}),bigint:e=>Zr.create({...e,coerce:!0}),date:e=>Xr.create({...e,coerce:!0})},tb=q,L=Object.freeze({__proto__:null,defaultErrorMap:Mn,setErrorMap:Zy,getErrorMap:Uo,makeIssue:zo,EMPTY_PATH:Yy,addIssueToContext:I,ParseStatus:Ye,INVALID:q,DIRTY:Pn,OK:it,isAborted:au,isDirty:su,isValid:Wr,isAsync:$i,get util(){return oe},get objectUtil(){return ou},ZodParsedType:F,getParsedType:sr,ZodType:Z,datetimeRegex:gf,ZodString:kr,ZodNumber:Kr,ZodBigInt:Zr,ZodBoolean:Yr,ZodDate:Xr,ZodSymbol:Bn,ZodUndefined:Jr,ZodNull:Qr,ZodAny:Ar,ZodUnknown:ur,ZodNever:Nt,ZodVoid:Un,ZodArray:lr,ZodObject:pt,ZodUnion:en,ZodDiscriminatedUnion:$o,ZodIntersection:tn,ZodTuple:zt,ZodRecord:qo,ZodMap:zn,ZodSet:jn,ZodFunction:Vo,ZodLazy:rn,ZodLiteral:nn,ZodEnum:on,ZodNativeEnum:an,ZodPromise:Tr,ZodEffects:kt,ZodTransformer:kt,ZodOptional:_t,ZodNullable:jt,ZodDefault:sn,ZodCatch:un,ZodNaN:$n,BRAND:yE,ZodBranded:qi,ZodPipeline:Vi,ZodReadonly:ln,custom:yf,Schema:Z,ZodSchema:Z,late:EE,get ZodFirstPartyTypeKind(){return $},coerce:eb,any:_E,array:RE,bigint:AE,boolean:kf,date:TE,discriminatedUnion:LE,effect:ff,enum:VE,function:jE,instanceof:bE,intersection:PE,lazy:$E,literal:qE,map:UE,nan:kE,nativeEnum:GE,never:IE,null:SE,nullable:KE,number:bf,object:FE,oboolean:QE,onumber:JE,optional:WE,ostring:XE,pipeline:YE,preprocess:ZE,promise:HE,record:BE,set:zE,strictObject:OE,string:Ef,symbol:CE,transformer:ff,tuple:ME,undefined:wE,union:NE,unknown:vE,void:DE,NEVER:tb,ZodIssueCode:w,quotelessJson:Ky,ZodError:bt});import{defaultLoaders as rb}from"cosmiconfig";function lu(e,t){let r=rb[".json"],n=r(e,t);return Af(n)}function Af(e,t="",r={}){for(let[n,i]of Object.entries(e)){let o=t?`${t}.${n}`:n;typeof i=="object"&&i!==null&&!Array.isArray(i)?Af(i,o,r):i===null?r[o]="null":r[o]=i.toString()}return r}import fb from"node:fs";import cr from"node:path";import sb from"node:process";import nb from"node:process";import ib from"node:fs/promises";import{fileURLToPath as ob}from"node:url";import qn from"node:path";var Tf=e=>e instanceof URL?ob(e):e;async function Go(e,{cwd:t=nb.cwd(),type:r="file",stopAt:n}={}){let i=qn.resolve(Tf(t)??""),{root:o}=qn.parse(i);n=qn.resolve(i,Tf(n??o));let a=qn.isAbsolute(e);for(;i;){let s=a?e:qn.join(i,e);try{let u=await ib.stat(s);if(r==="file"&&u.isFile()||r==="directory"&&u.isDirectory())return s}catch{}if(i===n||i===o)break;i=qn.dirname(i)}}async function Cf({cwd:e=sb.cwd()}={}){return Go("package.json",{cwd:e})}import ub from"node:fs";import lb from"node:fs/promises";async function cu(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await lb[e](r))[t]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}function fu(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return ub[e](r)[t]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}var Vn=cu.bind(void 0,"stat","isFile"),b0=cu.bind(void 0,"stat","isDirectory"),k0=cu.bind(void 0,"lstat","isSymbolicLink"),pu=fu.bind(void 0,"statSync","isFile"),A0=fu.bind(void 0,"statSync","isDirectory"),T0=fu.bind(void 0,"lstatSync","isSymbolicLink");import{log as Sf}from"remark-mdat";import{Configuration as pb}from"unified-engine";import cb from"node:os";var wf=cb.homedir();function mu(e){if(typeof e!="string")throw new TypeError(`Expected a string, got ${typeof e}`);return wf?e.replace(/^~(?=$|\/|\\)/,wf):e}function mb(e,t){let r=t===0?1:Math.floor(Math.log10(Math.abs(t))+1);return e.toString().padStart(r,"0")}function vf(e,t,r,n){let i=[];for(let[o,a]of e.entries()){let s=r&&e.length>1?`-${mb(o+1,e.length+1)}`:"",u=db(a,t,r,n,s);i.push(u)}return i}function db(e,t,r,n,i=""){let o=_f(e),a=t?_f(t):void 0;if(!pu(o))throw new Error(`Input file not found: "${o}"`);if(a){if(pu(a))throw new Error(`Output path must be a directory, received a file path: "${a}"`);fb.mkdirSync(a,{recursive:!0})}let s=r?cr.basename(r,cr.extname(r)):cr.basename(o,cr.extname(o)),u=`.${n??(r&&cr.extname(r)!==""?cr.extname(r):cr.extname(e)===""?"":cr.extname(e))}`,l=`${s}${i}${u}`,c=a??cr.dirname(o);return{input:o,name:l,output:c}}function _f(e){return mu(e)}async function If(){return Cf()}function Df(e){return e==null?[]:Array.isArray(e)?e:[e]}async function du(){let e=new pb({cwd:process.cwd(),detectConfig:!0,packageField:"remarkConfig",rcName:".remarkrc"}),t=await new Promise(r=>{e.load("",(n,i)=>{if(n){console.error(n),r();return}r(i)})});if(t){let{filePath:r}=t;return r===void 0?Sf.info('No ambient Remark configuration file found"'):Sf.info(`Found and loaded ambient Remark configuration from "${r}"`),t}throw new Error("Failed to load ambient remark configuration")}var Of=xb.merge(L.object({assetsPath:L.string().optional(),packageFile:L.string().optional()})).describe("Config Extension");async function Lt(e){let{additionalConfig:t,additionalRules:r,searchFrom:n}=e??{},i={addMetaComment:!1,assetsPath:"./assets",closingPrefix:"/",keywordPrefix:"",metaCommentIdentifier:"+",packageFile:await If(),rules:{mdat:"Powered by the Markdown Autophagic Template system: [mdat](https://github.com/kitschpatrol/mdat)."}},o=Rf("mdat",{loaders:{".ts":Ff()}}),a=await o.search(n);if(a){let{config:s,filepath:u}=a,l=s;if(It.info(`Using config from "${u}"`),u.endsWith("package.json")&&typeof s=="string"){It.info(`Detected shared config string: "${s}"`);let{default:f}=await import(s);l=f}let c=Nf(l,Of);c&&(i=Wo(i,c))}if(t!==void 0){let s=Array.isArray(t)?t:[t];for(let u of s){let l;if(typeof u=="string"){let f=await o.load(u);if(f==null)continue;let{config:p,filepath:m}=f;It.info(`Loaded additional config from "${m}"`),l=p}else l=u;if(l===void 0)continue;It.info("Merging configuration object");let c=Nf(l,Of);c!==void 0&&(i=Wo(i,c))}}if(r!==void 0){let s=Array.isArray(r)?r:[r],u=Rf("mdat",{loaders:{".json":lu,".ts":Ff()}});for(let l of s){let c;if(typeof l=="string"){let p;if(Lf.basename(l).endsWith("package.json")){let E=await hb.readFile(l,"utf8");p={config:lu(l,E),filepath:l}}else p=await u.load(l);if(p==null)continue;let{config:m,filepath:h}=p;It.info(`Loaded additional config from "${h}"`),c=m}else c=l;if(c===void 0)continue;It.info("Merging rules into configuration object");let f=Eb(c,yb);f!==void 0&&(i=Wo(i,f))}}if(i.rules){let s=Object.keys(i.rules).sort().map(u=>`"${Ho.default.green(Ho.default.bold(u))}"`);It.info(`Loaded ${Ho.default.bold(s.length)} mdat comment expansion ${nu("rule",s.length)}:`);for(let u of s)It.info(` ${u}`)}else It.error("No rules loaded from additional configurations or rules, using default.");return Ko=i,i}function Eb(e,t){if(t.safeParse(e).success)return{rules:e};It.error(`Rules object has the wrong shape. Ignoring and using default configuration:
|
|
2
|
+
${JSON.stringify(e,void 0,2)}`)}function Nf(e,t){if(t.safeParse(e).success)return e;It.error(`Config object has the wrong shape. Ignoring and using default configuration:
|
|
3
|
+
${JSON.stringify(e,void 0,2)}`)}var Ko;async function cn(){return Ko===void 0&&(It.warn("getConfig(): config was undefined"),Ko??=await Lt()),Ko}var hu;async function At(){let{packageFile:e}=await cn();if(e===void 0)throw new Error("No packageFile found or set in config");if(hu??=await gb({cwd:Lf.dirname(e)}),hu===void 0)throw new Error("No package.json found");return hu}function bb(e,t){return Wo(e,t)}var kb={};function fr(e,t){let r=t||kb,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Mf(e,n,i)}function Mf(e,t,r){if(Ab(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Pf(e.children,t,r)}return Array.isArray(e)?Pf(e,t,r):""}function Pf(e,t,r){let n=[],i=-1;for(;++i<e.length;)n[i]=Mf(e[i],t,r);return n.join("")}function Ab(e){return!!(e&&typeof e=="object")}var gu={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:`
|
|
4
|
+
`,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 Tb={}.hasOwnProperty;function Gn(e){return Tb.call(gu,e)?gu[e]:!1}function Ie(e,t,r,n){let i=e.length,o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,r=r>0?r:0,n.length<1e4)a=Array.from(n),a.unshift(t,r),e.splice(...a);else for(r&&e.splice(t,r);o<n.length;)a=n.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function ot(e,t){return e.length>0?(Ie(e,e.length,0,t),e):t}var Bf={}.hasOwnProperty;function Zo(e){let t={},r=-1;for(;++r<e.length;)Cb(t,e[r]);return t}function Cb(e,t){let r;for(r in t){let i=(Bf.call(e,r)?e[r]:void 0)||(e[r]={}),o=t[r],a;if(o)for(a in o){Bf.call(i,a)||(i[a]=[]);let s=o[a];wb(i[a],Array.isArray(s)?s:s?[s]:[])}}}function wb(e,t){let r=-1,n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);Ie(e,0,0,n)}function Yo(e,t){let r=Number.parseInt(e,t);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 Xe(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Ue=Cr(/[A-Za-z]/),ze=Cr(/[\dA-Za-z]/),Uf=Cr(/[#-'*+\--9=?A-Z^-~]/);function fn(e){return e!==null&&(e<32||e===127)}var Gi=Cr(/\d/),zf=Cr(/[\dA-Fa-f]/),jf=Cr(/[!-/:-@[-`{-~]/);function D(e){return e!==null&&e<-2}function Y(e){return e!==null&&(e<0||e===32)}function z(e){return e===-2||e===-1||e===32}var pn=Cr(new RegExp("\\p{P}|\\p{S}","u")),$t=Cr(/\s/);function Cr(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function U(e,t,r,n){let i=n?n-1:Number.POSITIVE_INFINITY,o=0;return a;function a(u){return z(u)?(e.enter(r),s(u)):t(u)}function s(u){return z(u)&&o++<i?(e.consume(u),s):(e.exit(r),t(u))}}var $f={tokenize:Sb};function Sb(e){let t=e.attempt(this.parser.constructs.contentInitial,n,i),r;return t;function n(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),U(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){let u=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=u),r=u,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return D(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}var Vf={tokenize:_b},qf={tokenize:vb};function _b(e){let t=this,r=[],n=0,i,o,a;return s;function s(y){if(n<r.length){let S=r[n];return t.containerState=S[1],e.attempt(S[0].continuation,u,l)(y)}return l(y)}function u(y){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&k();let S=t.events.length,_=S,A;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){A=t.events[_][1].end;break}x(n);let te=S;for(;te<t.events.length;)t.events[te][1].end={...A},te++;return Ie(t.events,_+1,0,t.events.slice(S)),t.events.length=te,l(y)}return s(y)}function l(y){if(n===r.length){if(!i)return p(y);if(i.currentConstruct&&i.currentConstruct.concrete)return h(y);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(qf,c,f)(y)}function c(y){return i&&k(),x(n),p(y)}function f(y){return t.parser.lazy[t.now().line]=n!==r.length,a=t.now().offset,h(y)}function p(y){return t.containerState={},e.attempt(qf,m,h)(y)}function m(y){return n++,r.push([t.currentConstruct,t.containerState]),p(y)}function h(y){if(y===null){i&&k(),x(0),e.consume(y);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),E(y)}function E(y){if(y===null){C(e.exit("chunkFlow"),!0),x(0),e.consume(y);return}return D(y)?(e.consume(y),C(e.exit("chunkFlow")),n=0,t.interrupt=void 0,s):(e.consume(y),E)}function C(y,S){let _=t.sliceStream(y);if(S&&_.push(null),y.previous=o,o&&(o.next=y),o=y,i.defineSkip(y.start),i.write(_),t.parser.lazy[y.start.line]){let A=i.events.length;for(;A--;)if(i.events[A][1].start.offset<a&&(!i.events[A][1].end||i.events[A][1].end.offset>a))return;let te=t.events.length,J=te,re,b;for(;J--;)if(t.events[J][0]==="exit"&&t.events[J][1].type==="chunkFlow"){if(re){b=t.events[J][1].end;break}re=!0}for(x(n),A=te;A<t.events.length;)t.events[A][1].end={...b},A++;Ie(t.events,J+1,0,t.events.slice(te)),t.events.length=A}}function x(y){let S=r.length;for(;S-- >y;){let _=r[S];t.containerState=_[1],_[0].exit.call(t,e)}r.length=y}function k(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function vb(e,t,r){return U(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function pr(e){if(e===null||Y(e)||$t(e))return 1;if(pn(e))return 2}function wr(e,t,r){let n=[],i=-1;for(;++i<e.length;){let o=e[i].resolveAll;o&&!n.includes(o)&&(t=o(t,r),n.push(o))}return t}var Hi={name:"attention",resolveAll:Ib,tokenize:Db};function Ib(e,t){let r=-1,n,i,o,a,s,u,l,c;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;u=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;let f={...e[n][1].end},p={...e[r][1].start};Gf(f,-u),Gf(p,u),a={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...e[n][1].end}},s={type:u>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:p},o={type:u>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[r][1].start}},i={type:u>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},e[n][1].end={...a.start},e[r][1].start={...s.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=ot(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=ot(l,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),l=ot(l,wr(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),l=ot(l,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[r][1].end.offset-e[r][1].start.offset?(c=2,l=ot(l,[["enter",e[r][1],t],["exit",e[r][1],t]])):c=0,Ie(e,n-1,r-n+3,l),r=n+l.length-c-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function Db(e,t){let r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=pr(n),o;return a;function a(u){return o=u,e.enter("attentionSequence"),s(u)}function s(u){if(u===o)return e.consume(u),s;let l=e.exit("attentionSequence"),c=pr(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)),t(u)}}function Gf(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var xu={name:"autolink",tokenize:Rb};function Rb(e,t,r){let n=0;return i;function i(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(m){return Ue(m)?(e.consume(m),a):m===64?r(m):l(m)}function a(m){return m===43||m===45||m===46||ze(m)?(n=1,s(m)):l(m)}function s(m){return m===58?(e.consume(m),n=0,u):(m===43||m===45||m===46||ze(m))&&n++<32?(e.consume(m),s):(n=0,l(m))}function u(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||fn(m)?r(m):(e.consume(m),u)}function l(m){return m===64?(e.consume(m),c):Uf(m)?(e.consume(m),l):r(m)}function c(m){return ze(m)?f(m):r(m)}function f(m){return m===46?(e.consume(m),n=0,c):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):p(m)}function p(m){if((m===45||ze(m))&&n++<63){let h=m===45?p:f;return e.consume(m),h}return r(m)}}var qt={partial:!0,tokenize:Fb};function Fb(e,t,r){return n;function n(o){return z(o)?U(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||D(o)?t(o):r(o)}}var Xo={continuation:{tokenize:Nb},exit:Lb,name:"blockQuote",tokenize:Ob};function Ob(e,t,r){let n=this;return i;function i(a){if(a===62){let s=n.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return r(a)}function o(a){return z(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Nb(e,t,r){let n=this;return i;function i(a){return z(a)?U(e,o,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(Xo,t,r)(a)}}function Lb(e){e.exit("blockQuote")}var Jo={name:"characterEscape",tokenize:Pb};function Pb(e,t,r){return n;function n(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return jf(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(o)}}var Qo={name:"characterReference",tokenize:Mb};function Mb(e,t,r){let n=this,i=0,o,a;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,a=ze,c(f))}function l(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=zf,c):(e.enter("characterReferenceValue"),o=7,a=Gi,c(f))}function c(f){if(f===59&&i){let p=e.exit("characterReferenceValue");return a===ze&&!Gn(n.sliceSerialize(p))?r(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(f)&&i++<o?(e.consume(f),c):r(f)}}var Hf={partial:!0,tokenize:Ub},ea={concrete:!0,name:"codeFenced",tokenize:Bb};function Bb(e,t,r){let n=this,i={partial:!0,tokenize:_},o=0,a=0,s;return u;function u(A){return l(A)}function l(A){let te=n.events[n.events.length-1];return o=te&&te[1].type==="linePrefix"?te[2].sliceSerialize(te[1],!0).length:0,s=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(A)}function c(A){return A===s?(a++,e.consume(A),c):a<3?r(A):(e.exit("codeFencedFenceSequence"),z(A)?U(e,f,"whitespace")(A):f(A))}function f(A){return A===null||D(A)?(e.exit("codeFencedFence"),n.interrupt?t(A):e.check(Hf,E,S)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(A))}function p(A){return A===null||D(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(A)):z(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),U(e,m,"whitespace")(A)):A===96&&A===s?r(A):(e.consume(A),p)}function m(A){return A===null||D(A)?f(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(A))}function h(A){return A===null||D(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(A)):A===96&&A===s?r(A):(e.consume(A),h)}function E(A){return e.attempt(i,S,C)(A)}function C(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),x}function x(A){return o>0&&z(A)?U(e,k,"linePrefix",o+1)(A):k(A)}function k(A){return A===null||D(A)?e.check(Hf,E,S)(A):(e.enter("codeFlowValue"),y(A))}function y(A){return A===null||D(A)?(e.exit("codeFlowValue"),k(A)):(e.consume(A),y)}function S(A){return e.exit("codeFenced"),t(A)}function _(A,te,J){let re=0;return b;function b(G){return A.enter("lineEnding"),A.consume(G),A.exit("lineEnding"),ce}function ce(G){return A.enter("codeFencedFence"),z(G)?U(A,Q,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):Q(G)}function Q(G){return G===s?(A.enter("codeFencedFenceSequence"),B(G)):J(G)}function B(G){return G===s?(re++,A.consume(G),B):re>=a?(A.exit("codeFencedFenceSequence"),z(G)?U(A,V,"whitespace")(G):V(G)):J(G)}function V(G){return G===null||D(G)?(A.exit("codeFencedFence"),te(G)):J(G)}}}function Ub(e,t,r){let n=this;return i;function i(a){return a===null?r(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}var Wi={name:"codeIndented",tokenize:jb},zb={partial:!0,tokenize:$b};function jb(e,t,r){let n=this;return i;function i(l){return e.enter("codeIndented"),U(e,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?a(l):r(l)}function a(l){return l===null?u(l):D(l)?e.attempt(zb,a,u)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||D(l)?(e.exit("codeFlowValue"),a(l)):(e.consume(l),s)}function u(l){return e.exit("codeIndented"),t(l)}}function $b(e,t,r){let n=this;return i;function i(a){return n.parser.lazy[n.now().line]?r(a):D(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):U(e,o,"linePrefix",5)(a)}function o(a){let s=n.events[n.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):D(a)?i(a):r(a)}}var yu={name:"codeText",previous:Vb,resolve:qb,tokenize:Gb};function qb(e){let t=e.length-4,r=3,n,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)i===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(i=n):(n===t||e[n][1].type==="lineEnding")&&(e[i][1].type="codeTextData",n!==i+2&&(e[i][1].end=e[n-1][1].end,e.splice(i+2,n-i-2),t-=n-i-2,n=i+2),i=void 0);return e}function Vb(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Gb(e,t,r){let n=this,i=0,o,a;return s;function s(p){return e.enter("codeText"),e.enter("codeTextSequence"),u(p)}function u(p){return p===96?(e.consume(p),i++,u):(e.exit("codeTextSequence"),l(p))}function l(p){return p===null?r(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),l):p===96?(a=e.enter("codeTextSequence"),o=0,f(p)):D(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(p))}function c(p){return p===null||p===32||p===96||D(p)?(e.exit("codeTextData"),l(p)):(e.consume(p),c)}function f(p){return p===96?(e.consume(p),o++,f):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(a.type="codeTextData",c(p))}}var ta=class{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){let n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,r,n){let i=r||0;this.setCursor(Math.trunc(t));let o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&Ki(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ki(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ki(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){let r=this.left.splice(t,Number.POSITIVE_INFINITY);Ki(this.right,r.reverse())}else{let r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ki(this.left,r.reverse())}}};function Ki(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function ra(e){let t={},r=-1,n,i,o,a,s,u,l,c=new ta(e);for(;++r<c.length;){for(;r in t;)r=t[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(t,Hb(c,r)),r=t[r],l=!0);else if(n[1]._container){for(o=r,i=void 0;o--;)if(a=c.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(n[1].end={...c.get(i)[1].start},s=c.slice(i,r),s.unshift(n),c.splice(i,r-i+1,s))}}return Ie(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function Hb(e,t){let r=e.get(t)[1],n=e.get(t)[2],i=t-1,o=[],a=r._tokenizer;a||(a=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));let s=a.events,u=[],l={},c,f,p=-1,m=r,h=0,E=0,C=[E];for(;m;){for(;e.get(++i)[1]!==m;);o.push(i),m._tokenizer||(c=n.sliceStream(m),m.next||c.push(null),f&&a.defineSkip(m.start),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=m,m=m.next}for(m=r;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(E=p+1,C.push(E),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(a.events=[],m?(m._tokenizer=void 0,m.previous=void 0):C.pop(),p=C.length;p--;){let x=s.slice(C[p],C[p+1]),k=o.pop();u.push([k,k+x.length-1]),e.splice(k,2,x)}for(u.reverse(),p=-1;++p<u.length;)l[h+u[p][0]]=h+u[p][1],h+=u[p][1]-u[p][0]-1;return l}var Eu={resolve:Kb,tokenize:Zb},Wb={partial:!0,tokenize:Yb};function Kb(e){return ra(e),e}function Zb(e,t){let r;return n;function n(s){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):D(s)?e.check(Wb,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function Yb(e,t,r){let n=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),U(e,o,"linePrefix")}function o(a){if(a===null||D(a))return r(a);let s=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(n.parser.constructs.flow,r,t)(a)}}function na(e,t,r,n,i,o,a,s,u){let l=u||Number.POSITIVE_INFINITY,c=0;return f;function f(x){return x===60?(e.enter(n),e.enter(i),e.enter(o),e.consume(x),e.exit(o),p):x===null||x===32||x===41||fn(x)?r(x):(e.enter(n),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),E(x))}function p(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===62?(e.exit("chunkString"),e.exit(s),p(x)):x===null||x===60||D(x)?r(x):(e.consume(x),x===92?h:m)}function h(x){return x===60||x===62||x===92?(e.consume(x),m):m(x)}function E(x){return!c&&(x===null||x===41||Y(x))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(n),t(x)):c<l&&x===40?(e.consume(x),c++,E):x===41?(e.consume(x),c--,E):x===null||x===32||x===40||fn(x)?r(x):(e.consume(x),x===92?C:E)}function C(x){return x===40||x===41||x===92?(e.consume(x),E):E(x)}}function ia(e,t,r,n,i,o){let a=this,s=0,u;return l;function l(m){return e.enter(n),e.enter(i),e.consume(m),e.exit(i),e.enter(o),c}function c(m){return s>999||m===null||m===91||m===93&&!u||m===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?r(m):m===93?(e.exit(o),e.enter(i),e.consume(m),e.exit(i),e.exit(n),t):D(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===null||m===91||m===93||D(m)||s++>999?(e.exit("chunkString"),c(m)):(e.consume(m),u||(u=!z(m)),m===92?p:f)}function p(m){return m===91||m===92||m===93?(e.consume(m),s++,f):f(m)}}function oa(e,t,r,n,i,o){let a;return s;function s(p){return p===34||p===39||p===40?(e.enter(n),e.enter(i),e.consume(p),e.exit(i),a=p===40?41:p,u):r(p)}function u(p){return p===a?(e.enter(i),e.consume(p),e.exit(i),e.exit(n),t):(e.enter(o),l(p))}function l(p){return p===a?(e.exit(o),u(a)):p===null?r(p):D(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),U(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===a||p===null||D(p)?(e.exit("chunkString"),l(p)):(e.consume(p),p===92?f:c)}function f(p){return p===a||p===92?(e.consume(p),c):c(p)}}function mn(e,t){let r;return n;function n(i){return D(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n):z(i)?U(e,n,r?"linePrefix":"lineSuffix")(i):t(i)}}var bu={name:"definition",tokenize:Jb},Xb={partial:!0,tokenize:Qb};function Jb(e,t,r){let n=this,i;return o;function o(m){return e.enter("definition"),a(m)}function a(m){return ia.call(n,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function s(m){return i=Xe(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),u):r(m)}function u(m){return Y(m)?mn(e,l)(m):l(m)}function l(m){return na(e,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function c(m){return e.attempt(Xb,f,f)(m)}function f(m){return z(m)?U(e,p,"whitespace")(m):p(m)}function p(m){return m===null||D(m)?(e.exit("definition"),n.parser.defined.push(i),t(m)):r(m)}}function Qb(e,t,r){return n;function n(s){return Y(s)?mn(e,i)(s):r(s)}function i(s){return oa(e,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return z(s)?U(e,a,"whitespace")(s):a(s)}function a(s){return s===null||D(s)?t(s):r(s)}}var ku={name:"hardBreakEscape",tokenize:ek};function ek(e,t,r){return n;function n(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return D(o)?(e.exit("hardBreakEscape"),t(o)):r(o)}}var Au={name:"headingAtx",resolve:tk,tokenize:rk};function tk(e,t){let r=e.length-2,n=3,i,o;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},o={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},Ie(e,n,r-n+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function rk(e,t,r){let n=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&n++<6?(e.consume(c),a):c===null||Y(c)?(e.exit("atxHeadingSequence"),s(c)):r(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||D(c)?(e.exit("atxHeading"),t(c)):z(c)?U(e,s,"whitespace")(c):(e.enter("atxHeadingText"),l(c))}function u(c){return c===35?(e.consume(c),u):(e.exit("atxHeadingSequence"),s(c))}function l(c){return c===null||c===35||Y(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),l)}}var Wf=["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"],Tu=["pre","script","style","textarea"];var Cu={concrete:!0,name:"htmlFlow",resolveTo:ok,tokenize:ak},nk={partial:!0,tokenize:uk},ik={partial:!0,tokenize:sk};function ok(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function ak(e,t,r){let n=this,i,o,a,s,u;return l;function l(g){return c(g)}function c(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),f}function f(g){return g===33?(e.consume(g),p):g===47?(e.consume(g),o=!0,E):g===63?(e.consume(g),i=3,n.interrupt?t:d):Ue(g)?(e.consume(g),a=String.fromCharCode(g),C):r(g)}function p(g){return g===45?(e.consume(g),i=2,m):g===91?(e.consume(g),i=5,s=0,h):Ue(g)?(e.consume(g),i=4,n.interrupt?t:d):r(g)}function m(g){return g===45?(e.consume(g),n.interrupt?t:d):r(g)}function h(g){let Ze="CDATA[";return g===Ze.charCodeAt(s++)?(e.consume(g),s===Ze.length?n.interrupt?t:Q:h):r(g)}function E(g){return Ue(g)?(e.consume(g),a=String.fromCharCode(g),C):r(g)}function C(g){if(g===null||g===47||g===62||Y(g)){let Ze=g===47,Be=a.toLowerCase();return!Ze&&!o&&Tu.includes(Be)?(i=1,n.interrupt?t(g):Q(g)):Wf.includes(a.toLowerCase())?(i=6,Ze?(e.consume(g),x):n.interrupt?t(g):Q(g)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(g):o?k(g):y(g))}return g===45||ze(g)?(e.consume(g),a+=String.fromCharCode(g),C):r(g)}function x(g){return g===62?(e.consume(g),n.interrupt?t:Q):r(g)}function k(g){return z(g)?(e.consume(g),k):b(g)}function y(g){return g===47?(e.consume(g),b):g===58||g===95||Ue(g)?(e.consume(g),S):z(g)?(e.consume(g),y):b(g)}function S(g){return g===45||g===46||g===58||g===95||ze(g)?(e.consume(g),S):_(g)}function _(g){return g===61?(e.consume(g),A):z(g)?(e.consume(g),_):y(g)}function A(g){return g===null||g===60||g===61||g===62||g===96?r(g):g===34||g===39?(e.consume(g),u=g,te):z(g)?(e.consume(g),A):J(g)}function te(g){return g===u?(e.consume(g),u=null,re):g===null||D(g)?r(g):(e.consume(g),te)}function J(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||Y(g)?_(g):(e.consume(g),J)}function re(g){return g===47||g===62||z(g)?y(g):r(g)}function b(g){return g===62?(e.consume(g),ce):r(g)}function ce(g){return g===null||D(g)?Q(g):z(g)?(e.consume(g),ce):r(g)}function Q(g){return g===45&&i===2?(e.consume(g),ae):g===60&&i===1?(e.consume(g),xe):g===62&&i===4?(e.consume(g),rt):g===63&&i===3?(e.consume(g),d):g===93&&i===5?(e.consume(g),xt):D(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(nk,wt,B)(g)):g===null||D(g)?(e.exit("htmlFlowData"),B(g)):(e.consume(g),Q)}function B(g){return e.check(ik,V,wt)(g)}function V(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),G}function G(g){return g===null||D(g)?B(g):(e.enter("htmlFlowData"),Q(g))}function ae(g){return g===45?(e.consume(g),d):Q(g)}function xe(g){return g===47?(e.consume(g),a="",Ke):Q(g)}function Ke(g){if(g===62){let Ze=a.toLowerCase();return Tu.includes(Ze)?(e.consume(g),rt):Q(g)}return Ue(g)&&a.length<8?(e.consume(g),a+=String.fromCharCode(g),Ke):Q(g)}function xt(g){return g===93?(e.consume(g),d):Q(g)}function d(g){return g===62?(e.consume(g),rt):g===45&&i===2?(e.consume(g),d):Q(g)}function rt(g){return g===null||D(g)?(e.exit("htmlFlowData"),wt(g)):(e.consume(g),rt)}function wt(g){return e.exit("htmlFlow"),t(g)}}function sk(e,t,r){let n=this;return i;function i(a){return D(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):r(a)}function o(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}function uk(e,t,r){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(qt,t,r)}}var wu={name:"htmlText",tokenize:lk};function lk(e,t,r){let n=this,i,o,a;return s;function s(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),u}function u(d){return d===33?(e.consume(d),l):d===47?(e.consume(d),_):d===63?(e.consume(d),y):Ue(d)?(e.consume(d),J):r(d)}function l(d){return d===45?(e.consume(d),c):d===91?(e.consume(d),o=0,h):Ue(d)?(e.consume(d),k):r(d)}function c(d){return d===45?(e.consume(d),m):r(d)}function f(d){return d===null?r(d):d===45?(e.consume(d),p):D(d)?(a=f,xe(d)):(e.consume(d),f)}function p(d){return d===45?(e.consume(d),m):f(d)}function m(d){return d===62?ae(d):d===45?p(d):f(d)}function h(d){let rt="CDATA[";return d===rt.charCodeAt(o++)?(e.consume(d),o===rt.length?E:h):r(d)}function E(d){return d===null?r(d):d===93?(e.consume(d),C):D(d)?(a=E,xe(d)):(e.consume(d),E)}function C(d){return d===93?(e.consume(d),x):E(d)}function x(d){return d===62?ae(d):d===93?(e.consume(d),x):E(d)}function k(d){return d===null||d===62?ae(d):D(d)?(a=k,xe(d)):(e.consume(d),k)}function y(d){return d===null?r(d):d===63?(e.consume(d),S):D(d)?(a=y,xe(d)):(e.consume(d),y)}function S(d){return d===62?ae(d):y(d)}function _(d){return Ue(d)?(e.consume(d),A):r(d)}function A(d){return d===45||ze(d)?(e.consume(d),A):te(d)}function te(d){return D(d)?(a=te,xe(d)):z(d)?(e.consume(d),te):ae(d)}function J(d){return d===45||ze(d)?(e.consume(d),J):d===47||d===62||Y(d)?re(d):r(d)}function re(d){return d===47?(e.consume(d),ae):d===58||d===95||Ue(d)?(e.consume(d),b):D(d)?(a=re,xe(d)):z(d)?(e.consume(d),re):ae(d)}function b(d){return d===45||d===46||d===58||d===95||ze(d)?(e.consume(d),b):ce(d)}function ce(d){return d===61?(e.consume(d),Q):D(d)?(a=ce,xe(d)):z(d)?(e.consume(d),ce):re(d)}function Q(d){return d===null||d===60||d===61||d===62||d===96?r(d):d===34||d===39?(e.consume(d),i=d,B):D(d)?(a=Q,xe(d)):z(d)?(e.consume(d),Q):(e.consume(d),V)}function B(d){return d===i?(e.consume(d),i=void 0,G):d===null?r(d):D(d)?(a=B,xe(d)):(e.consume(d),B)}function V(d){return d===null||d===34||d===39||d===60||d===61||d===96?r(d):d===47||d===62||Y(d)?re(d):(e.consume(d),V)}function G(d){return d===47||d===62||Y(d)?re(d):r(d)}function ae(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),t):r(d)}function xe(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Ke}function Ke(d){return z(d)?U(e,xt,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):xt(d)}function xt(d){return e.enter("htmlTextData"),a(d)}}var dn={name:"labelEnd",resolveAll:mk,resolveTo:dk,tokenize:hk},ck={tokenize:gk},fk={tokenize:xk},pk={tokenize:yk};function mk(e){let t=-1,r=[];for(;++t<e.length;){let n=e[t][1];if(r.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){let i=n.type==="labelImage"?4:2;n.type="data",t+=i}}return e.length!==r.length&&Ie(e,0,e.length,r),e}function dk(e,t){let r=e.length,n=0,i,o,a,s;for(;r--;)if(i=e[r][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[r][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[r][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=r,i.type!=="labelLink")){n=2;break}}else i.type==="labelEnd"&&(a=r);let u={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[o][1].start},end:{...e[a][1].end}},c={type:"labelText",start:{...e[o+n+2][1].end},end:{...e[a-2][1].start}};return s=[["enter",u,t],["enter",l,t]],s=ot(s,e.slice(o+1,o+n+3)),s=ot(s,[["enter",c,t]]),s=ot(s,wr(t.parser.constructs.insideSpan.null,e.slice(o+n+4,a-3),t)),s=ot(s,[["exit",c,t],e[a-2],e[a-1],["exit",l,t]]),s=ot(s,e.slice(a+1)),s=ot(s,[["exit",u,t]]),Ie(e,o,e.length,s),e}function hk(e,t,r){let n=this,i=n.events.length,o,a;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 s;function s(p){return o?o._inactive?f(p):(a=n.parser.defined.includes(Xe(n.sliceSerialize({start:o.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):r(p)}function u(p){return p===40?e.attempt(ck,c,a?c:f)(p):p===91?e.attempt(fk,c,a?l:f)(p):a?c(p):f(p)}function l(p){return e.attempt(pk,c,f)(p)}function c(p){return t(p)}function f(p){return o._balanced=!0,r(p)}}function gk(e,t,r){return n;function n(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return Y(f)?mn(e,o)(f):o(f)}function o(f){return f===41?c(f):na(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return Y(f)?mn(e,u)(f):c(f)}function s(f){return r(f)}function u(f){return f===34||f===39||f===40?oa(e,l,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function l(f){return Y(f)?mn(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):r(f)}}function xk(e,t,r){let n=this;return i;function i(s){return ia.call(n,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return n.parser.defined.includes(Xe(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function a(s){return r(s)}}function yk(e,t,r){return n;function n(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):r(o)}}var Su={name:"labelStartImage",resolveAll:dn.resolveAll,tokenize:Ek};function Ek(e,t,r){let n=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):r(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):t(s)}}var _u={name:"labelStartLink",resolveAll:dn.resolveAll,tokenize:bk};function bk(e,t,r){let n=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(a):t(a)}}var Zi={name:"lineEnding",tokenize:kk};function kk(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),U(e,t,"linePrefix")}}var hn={name:"thematicBreak",tokenize:Ak};function Ak(e,t,r){let n=0,i;return o;function o(l){return e.enter("thematicBreak"),a(l)}function a(l){return i=l,s(l)}function s(l){return l===i?(e.enter("thematicBreakSequence"),u(l)):n>=3&&(l===null||D(l))?(e.exit("thematicBreak"),t(l)):r(l)}function u(l){return l===i?(e.consume(l),n++,u):(e.exit("thematicBreakSequence"),z(l)?U(e,s,"whitespace")(l):s(l))}}var Je={continuation:{tokenize:Sk},exit:vk,name:"list",tokenize:wk},Tk={partial:!0,tokenize:Ik},Ck={partial:!0,tokenize:_k};function wk(e,t,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,a=0;return s;function s(m){let h=n.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!n.containerState.marker||m===n.containerState.marker:Gi(m)){if(n.containerState.type||(n.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(hn,r,l)(m):l(m);if(!n.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(m)}return r(m)}function u(m){return Gi(m)&&++a<10?(e.consume(m),u):(!n.interrupt||a<2)&&(n.containerState.marker?m===n.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),l(m)):r(m)}function l(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||m,e.check(qt,n.interrupt?r:c,e.attempt(Tk,p,f))}function c(m){return n.containerState.initialBlankLine=!0,o++,p(m)}function f(m){return z(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):r(m)}function p(m){return n.containerState.size=o+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function Sk(e,t,r){let n=this;return n.containerState._closeFlow=void 0,e.check(qt,i,o);function i(s){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,U(e,t,"listItemIndent",n.containerState.size+1)(s)}function o(s){return n.containerState.furtherBlankLines||!z(s)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,a(s)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(Ck,t,a)(s))}function a(s){return n.containerState._closeFlow=!0,n.interrupt=void 0,U(e,e.attempt(Je,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function _k(e,t,r){let n=this;return U(e,i,"listItemIndent",n.containerState.size+1);function i(o){let a=n.events[n.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===n.containerState.size?t(o):r(o)}}function vk(e){e.exit(this.containerState.type)}function Ik(e,t,r){let n=this;return U(e,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){let a=n.events[n.events.length-1];return!z(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):r(o)}}var aa={name:"setextUnderline",resolveTo:Dk,tokenize:Rk};function Dk(e,t){let r=e.length,n,i,o;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(i=r)}else e[r][1].type==="content"&&e.splice(r,1),!o&&e[r][1].type==="definition"&&(o=r);let a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=a,e.push(["exit",a,t]),e}function Rk(e,t,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)?(e.enter("setextHeadingLine"),i=l,a(l)):r(l)}function a(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===i?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),z(l)?U(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||D(l)?(e.exit("setextHeadingLine"),t(l)):r(l)}}var Kf={tokenize:Fk};function Fk(e){let t=this,r=e.attempt(qt,n,e.attempt(this.parser.constructs.flowInitial,i,U(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Eu,i)),"linePrefix")));return r;function n(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,r}}var Zf={resolveAll:Qf()},Yf=Jf("string"),Xf=Jf("text");function Jf(e){return{resolveAll:Qf(e==="text"?Ok:void 0),tokenize:t};function t(r){let n=this,i=this.parser.constructs[e],o=r.attempt(i,a,s);return a;function a(c){return l(c)?o(c):s(c)}function s(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 m=f[p];if(!m.previous||m.previous.call(n,n.previous))return!0}return!1}}}function Qf(e){return t;function t(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 e?e(r,n):r}}function Ok(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){let n=e[r-1][1],i=t.sliceStream(n),o=i.length,a=-1,s=0,u;for(;o--;){let l=i[o];if(typeof l=="string"){for(a=l.length;l.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(l===-2)u=!0,s++;else if(l!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(s=0),s){let l={type:r===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:n.start._bufferIndex+a,_index:n.start._index+o,line:n.end.line,column:n.end.column-s,offset:n.end.offset-s},end:{...n.end}};n.end={...l.start},n.start.offset===n.end.offset?Object.assign(n,l):(e.splice(r,0,["enter",l,t],["exit",l,t]),r+=2)}r++}return e}var vu={};jy(vu,{attentionMarkers:()=>jk,contentInitial:()=>Lk,disable:()=>$k,document:()=>Nk,flow:()=>Mk,flowInitial:()=>Pk,insideSpan:()=>zk,string:()=>Bk,text:()=>Uk});var Nk={42:Je,43:Je,45:Je,48:Je,49:Je,50:Je,51:Je,52:Je,53:Je,54:Je,55:Je,56:Je,57:Je,62:Xo},Lk={91:bu},Pk={[-2]:Wi,[-1]:Wi,32:Wi},Mk={35:Au,42:hn,45:[aa,hn],60:Cu,61:aa,95:hn,96:ea,126:ea},Bk={38:Qo,92:Jo},Uk={[-5]:Zi,[-4]:Zi,[-3]:Zi,33:Su,38:Qo,42:Hi,60:[xu,wu],91:_u,92:[ku,Jo],93:dn,95:Hi,96:yu},zk={null:[Hi,Zf]},jk={null:[42,95]},$k={null:[]};function ep(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0},i={},o=[],a=[],s=[],u=!0,l={attempt:re(te),check:re(J),consume:S,enter:_,exit:A,interrupt:re(J,{interrupt:!0})},c={code:null,containerState:{},defineSkip:x,events:[],now:C,parser:e,previous:null,sliceSerialize:h,sliceStream:E,write:m},f=t.tokenize.call(c,l),p;return t.resolveAll&&o.push(t),c;function m(B){return a=ot(a,B),k(),a[a.length-1]!==null?[]:(b(t,0),c.events=wr(o,c.events,c),c.events)}function h(B,V){return Vk(E(B),V)}function E(B){return qk(a,B)}function C(){let{_bufferIndex:B,_index:V,line:G,column:ae,offset:xe}=n;return{_bufferIndex:B,_index:V,line:G,column:ae,offset:xe}}function x(B){i[B.line]=B.column,Q()}function k(){let B;for(;n._index<a.length;){let V=a[n._index];if(typeof V=="string")for(B=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===B&&n._bufferIndex<V.length;)y(V.charCodeAt(n._bufferIndex));else y(V)}}function y(B){u=void 0,p=B,f=f(B)}function S(B){D(B)?(n.line++,n.column=1,n.offset+=B===-3?2:1,Q()):B!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===a[n._index].length&&(n._bufferIndex=-1,n._index++)),c.previous=B,u=!0}function _(B,V){let G=V||{};return G.type=B,G.start=C(),c.events.push(["enter",G,c]),s.push(G),G}function A(B){let V=s.pop();return V.end=C(),c.events.push(["exit",V,c]),V}function te(B,V){b(B,V.from)}function J(B,V){V.restore()}function re(B,V){return G;function G(ae,xe,Ke){let xt,d,rt,wt;return Array.isArray(ae)?Ze(ae):"tokenize"in ae?Ze([ae]):g(ae);function g(se){return St;function St(Ae){let He=Ae!==null&&se[Ae],nt=Ae!==null&&se.null,yt=[...Array.isArray(He)?He:He?[He]:[],...Array.isArray(nt)?nt:nt?[nt]:[]];return Ze(yt)(Ae)}}function Ze(se){return xt=se,d=0,se.length===0?Ke:Be(se[d])}function Be(se){return St;function St(Ae){return wt=ce(),rt=se,se.partial||(c.currentConstruct=se),se.name&&c.parser.constructs.disable.null.includes(se.name)?ve(Ae):se.tokenize.call(V?Object.assign(Object.create(c),V):c,l,Fn,ve)(Ae)}}function Fn(se){return u=!0,B(rt,wt),xe}function ve(se){return u=!0,wt.restore(),++d<xt.length?Be(xt[d]):Ke}}}function b(B,V){B.resolveAll&&!o.includes(B)&&o.push(B),B.resolve&&Ie(c.events,V,c.events.length-V,B.resolve(c.events.slice(V),c)),B.resolveTo&&(c.events=B.resolveTo(c.events,c))}function ce(){let B=C(),V=c.previous,G=c.currentConstruct,ae=c.events.length,xe=Array.from(s);return{from:ae,restore:Ke};function Ke(){n=B,c.previous=V,c.currentConstruct=G,c.events.length=ae,s=xe,Q()}}function Q(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function qk(e,t){let r=t.start._index,n=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex,a;if(r===i)a=[e[r].slice(n,o)];else{if(a=e.slice(r,i),n>-1){let s=a[0];typeof s=="string"?a[0]=s.slice(n):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function Vk(e,t){let r=-1,n=[],i;for(;++r<e.length;){let o=e[r],a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
|
|
9
5
|
`;break}case-3:{a=`\r
|
|
10
|
-
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,n.push(a)}return n.join("")}function Uu(e){let n={constructs:ta([Bu,...(e||{}).extensions||[]]),content:i(sp),defined:[],document:i(lp),flow:i(mp),lazy:{},string:i(hp),text:i(gp)};return n;function i(o){return a;function a(s){return Ep(n,o,s)}}}function zu(e){for(;!ua(e););return e}var bp=/[\0\t\n\r]/g;function ju(){let e=1,t="",r=!0,n;return i;function i(o,a,s){let u=[],l,c,f,p,m;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),f=0,t="",r&&(o.charCodeAt(0)===65279&&f++,r=void 0);f<o.length;){if(bp.lastIndex=f,l=bp.exec(o),p=l&&l.index!==void 0?l.index:o.length,m=o.charCodeAt(p),!l){t=o.slice(f);break}if(m===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)),e+=p-f),m){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:n=!0,e=1}f=p+1}return s&&(n&&u.push(-5),t&&u.push(t),u.push(null)),u}}var kA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ma(e){return e.replace(kA,AA)}function AA(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){let i=r.charCodeAt(1),o=i===120||i===88;return ra(r.slice(o?2:1),o?16:10)}return Xn(r)||e}function Jn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?kp(e.position):"start"in e||"end"in e?kp(e):"line"in e||"column"in e?$u(e):""}function $u(e){return Ap(e&&e.line)+":"+Ap(e&&e.column)}function kp(e){return $u(e&&e.start)+"-"+$u(e&&e.end)}function Ap(e){return e&&typeof e=="number"?e:1}var Cp={}.hasOwnProperty;function qu(e,t,r){return typeof t!="string"&&(r=t,t=void 0),TA(r)(zu(Uu(r).document().write(ju()(e,t,!0))))}function TA(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ff),autolinkProtocol:re,autolinkEmail:re,atxHeading:o(Mn),blockQuote:o(Te),characterEscape:re,characterReference:re,codeFenced:o(Ke),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(Ke,a),codeText:o(ot,a),codeTextData:re,data:re,codeFlowValue:re,definition:o(bt),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(sr),hardBreakEscape:o(qi),hardBreakTrailing:o(qi),htmlFlow:o(cf,a),htmlFlowData:re,htmlText:o(cf,a),htmlTextData:re,image:o(Ky),label:a,link:o(ff),listItem:o(Zy),listItemValue:p,listOrdered:o(pf,f),listUnordered:o(pf),paragraph:o(Yy),reference:g,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(Mn),strong:o(Xy),thematicBreak:o(Qy)},exit:{atxHeading:u(),atxHeadingSequence:v,autolink:u(),autolinkEmail:_t,autolinkProtocol:se,blockQuote:u(),characterEscapeValue:b,characterReferenceMarkerHexadecimal:ze,characterReferenceMarkerNumeric:ze,characterReferenceValue:Pn,characterReference:Re,codeFenced:u(C),codeFencedFence:E,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:b,codeIndented:u(x),codeText:u(G),codeTextData:b,data:b,definition:u(),definitionDestinationString:S,definitionLabelString:k,definitionTitleString:y,emphasis:u(),hardBreakEscape:u(Q),hardBreakTrailing:u(Q),htmlFlow:u(B),htmlFlowData:b,htmlText:u(V),htmlTextData:b,image:u(xe),label:Et,labelText:Ye,lineEnding:ce,link:u(ae),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Xe,resourceDestinationString:d,resourceTitleString:it,resource:vt,setextHeading:u(J),setextHeadingLineSequence:te,setextHeadingText:A,strong:u(),thematicBreak:u()}};wp(t,(e||{}).mdastExtensions||[]);let r={};return n;function n(T){let _={type:"root",children:[]},W={stack:[_],tokenStack:[],config:t,enter:s,exit:l,buffer:a,resume:c,data:r},ne=[],fe=-1;for(;++fe<T.length;)if(T[fe][1].type==="listOrdered"||T[fe][1].type==="listUnordered")if(T[fe][0]==="enter")ne.push(fe);else{let Pt=ne.pop();fe=i(T,Pt,fe)}for(fe=-1;++fe<T.length;){let Pt=t[T[fe][0]];Cp.call(Pt,T[fe][1].type)&&Pt[T[fe][1].type].call(Object.assign({sliceSerialize:T[fe][2].sliceSerialize},W),T[fe][1])}if(W.tokenStack.length>0){let Pt=W.tokenStack[W.tokenStack.length-1];(Pt[1]||Tp).call(W,void 0,Pt[0])}for(_.position={start:Rr(T.length>0?T[0][1].start:{line:1,column:1,offset:0}),end:Rr(T.length>0?T[T.length-2][1].end:{line:1,column:1,offset:0})},fe=-1;++fe<t.transforms.length;)_=t.transforms[fe](_)||_;return _}function i(T,_,W){let ne=_-1,fe=-1,Pt=!1,Yr,ur,Vi,Gi;for(;++ne<=W;){let kt=T[ne];switch(kt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{kt[0]==="enter"?fe++:fe--,Gi=void 0;break}case"lineEndingBlank":{kt[0]==="enter"&&(Yr&&!Gi&&!fe&&!Vi&&(Vi=ne),Gi=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Gi=void 0}if(!fe&&kt[0]==="enter"&&kt[1].type==="listItemPrefix"||fe===-1&&kt[0]==="exit"&&(kt[1].type==="listUnordered"||kt[1].type==="listOrdered")){if(Yr){let Bn=ne;for(ur=void 0;Bn--;){let lr=T[Bn];if(lr[1].type==="lineEnding"||lr[1].type==="lineEndingBlank"){if(lr[0]==="exit")continue;ur&&(T[ur][1].type="lineEndingBlank",Pt=!0),lr[1].type="lineEnding",ur=Bn}else if(!(lr[1].type==="linePrefix"||lr[1].type==="blockQuotePrefix"||lr[1].type==="blockQuotePrefixWhitespace"||lr[1].type==="blockQuoteMarker"||lr[1].type==="listItemIndent"))break}Vi&&(!ur||Vi<ur)&&(Yr._spread=!0),Yr.end=Object.assign({},ur?T[ur][1].start:kt[1].end),T.splice(ur||ne,0,["exit",Yr,kt[2]]),ne++,W++}if(kt[1].type==="listItemPrefix"){let Bn={type:"listItem",_spread:!1,start:Object.assign({},kt[1].start),end:void 0};Yr=Bn,T.splice(ne,0,["enter",Bn,kt[2]]),ne++,W++,Vi=void 0,Gi=!0}}}return T[_][1]._spread=Pt,W}function o(T,_){return W;function W(ne){s.call(this,T(ne),ne),_&&_.call(this,ne)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(T,_,W){this.stack[this.stack.length-1].children.push(T),this.stack.push(T),this.tokenStack.push([_,W||void 0]),T.position={start:Rr(_.start),end:void 0}}function u(T){return _;function _(W){T&&T.call(this,W),l.call(this,W)}}function l(T,_){let W=this.stack.pop(),ne=this.tokenStack.pop();if(ne)ne[0].type!==T.type&&(_?_.call(this,T,ne[0]):(ne[1]||Tp).call(this,T,ne[0]));else throw new Error("Cannot close `"+T.type+"` ("+Jn({start:T.start,end:T.end})+"): it\u2019s not open");W.position.end=Rr(T.end)}function c(){return hr(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(T){if(this.data.expectingFirstListItemValue){let _=this.stack[this.stack.length-2];_.start=Number.parseInt(this.sliceSerialize(T),10),this.data.expectingFirstListItemValue=void 0}}function m(){let T=this.resume(),_=this.stack[this.stack.length-1];_.lang=T}function h(){let T=this.resume(),_=this.stack[this.stack.length-1];_.meta=T}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){let T=this.resume(),_=this.stack[this.stack.length-1];_.value=T.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){let T=this.resume(),_=this.stack[this.stack.length-1];_.value=T.replace(/(\r?\n|\r)$/g,"")}function k(T){let _=this.resume(),W=this.stack[this.stack.length-1];W.label=_,W.identifier=Qe(this.sliceSerialize(T)).toLowerCase()}function y(){let T=this.resume(),_=this.stack[this.stack.length-1];_.title=T}function S(){let T=this.resume(),_=this.stack[this.stack.length-1];_.url=T}function v(T){let _=this.stack[this.stack.length-1];if(!_.depth){let W=this.sliceSerialize(T).length;_.depth=W}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function te(T){let _=this.stack[this.stack.length-1];_.depth=this.sliceSerialize(T).codePointAt(0)===61?1:2}function J(){this.data.setextHeadingSlurpLineEnding=void 0}function re(T){let W=this.stack[this.stack.length-1].children,ne=W[W.length-1];(!ne||ne.type!=="text")&&(ne=Jy(),ne.position={start:Rr(T.start),end:void 0},W.push(ne)),this.stack.push(ne)}function b(T){let _=this.stack.pop();_.value+=this.sliceSerialize(T),_.position.end=Rr(T.end)}function ce(T){let _=this.stack[this.stack.length-1];if(this.data.atHardBreak){let W=_.children[_.children.length-1];W.position.end=Rr(T.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(_.type)&&(re.call(this,T),b.call(this,T))}function Q(){this.data.atHardBreak=!0}function B(){let T=this.resume(),_=this.stack[this.stack.length-1];_.value=T}function V(){let T=this.resume(),_=this.stack[this.stack.length-1];_.value=T}function G(){let T=this.resume(),_=this.stack[this.stack.length-1];_.value=T}function ae(){let T=this.stack[this.stack.length-1];if(this.data.inReference){let _=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=_,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function xe(){let T=this.stack[this.stack.length-1];if(this.data.inReference){let _=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=_,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function Ye(T){let _=this.sliceSerialize(T),W=this.stack[this.stack.length-2];W.label=ma(_),W.identifier=Qe(_).toLowerCase()}function Et(){let T=this.stack[this.stack.length-1],_=this.resume(),W=this.stack[this.stack.length-1];if(this.data.inReference=!0,W.type==="link"){let ne=T.children;W.children=ne}else W.alt=_}function d(){let T=this.resume(),_=this.stack[this.stack.length-1];_.url=T}function it(){let T=this.resume(),_=this.stack[this.stack.length-1];_.title=T}function vt(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function Xe(T){let _=this.resume(),W=this.stack[this.stack.length-1];W.label=_,W.identifier=Qe(this.sliceSerialize(T)).toLowerCase(),this.data.referenceType="full"}function ze(T){this.data.characterReferenceType=T.type}function Pn(T){let _=this.sliceSerialize(T),W=this.data.characterReferenceType,ne;W?(ne=ra(_,W==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ne=Xn(_);let fe=this.stack[this.stack.length-1];fe.value+=ne}function Re(T){let _=this.stack.pop();_.position.end=Rr(T.end)}function se(T){b.call(this,T);let _=this.stack[this.stack.length-1];_.url=this.sliceSerialize(T)}function _t(T){b.call(this,T);let _=this.stack[this.stack.length-1];_.url="mailto:"+this.sliceSerialize(T)}function Te(){return{type:"blockquote",children:[]}}function Ke(){return{type:"code",lang:null,meta:null,value:""}}function ot(){return{type:"inlineCode",value:""}}function bt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function sr(){return{type:"emphasis",children:[]}}function Mn(){return{type:"heading",depth:0,children:[]}}function qi(){return{type:"break"}}function cf(){return{type:"html",value:""}}function Ky(){return{type:"image",title:null,url:"",alt:null}}function ff(){return{type:"link",title:null,url:"",children:[]}}function pf(T){return{type:"list",ordered:T.type==="listOrdered",start:null,spread:T._spread,children:[]}}function Zy(T){return{type:"listItem",spread:T._spread,checked:null,children:[]}}function Yy(){return{type:"paragraph",children:[]}}function Xy(){return{type:"strong",children:[]}}function Jy(){return{type:"text",value:""}}function Qy(){return{type:"thematicBreak"}}}function Rr(e){return{line:e.line,column:e.column,offset:e.offset}}function wp(e,t){let r=-1;for(;++r<t.length;){let n=t[r];Array.isArray(n)?wp(e,n):CA(e,n)}}function CA(e,t){let r;for(r in t)if(Cp.call(t,r))switch(r){case"canContainEols":{let n=t[r];n&&e[r].push(...n);break}case"transforms":{let n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{let n=t[r];n&&Object.assign(e[r],n);break}}}function Tp(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Jn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Jn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Jn({start:t.start,end:t.end})+") is still open")}function da(e){let t=this;t.parser=r;function r(n){return qu(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}var Sp={}.hasOwnProperty;function vp(e,t){let r=t||{};function n(i,...o){let a=n.invalid,s=n.handlers;if(i&&Sp.call(i,e)){let u=String(i[e]);a=Sp.call(s,u)?s[u]:n.unknown}if(a)return a.call(this,i,...o)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}var wA={}.hasOwnProperty;function Vu(e,t){let r=-1,n;if(t.extensions)for(;++r<t.extensions.length;)Vu(e,t.extensions[r]);for(n in t)if(wA.call(t,n))switch(n){case"extensions":break;case"unsafe":{_p(e[n],t[n]);break}case"join":{_p(e[n],t[n]);break}case"handlers":{SA(e[n],t[n]);break}default:e.options[n]=t[n]}return e}function _p(e,t){t&&e.push(...t)}function SA(e,t){t&&Object.assign(e,t)}function Ip(e,t,r,n){let i=r.enter("blockquote"),o=r.createTracker(n);o.move("> "),o.shift(2);let a=r.indentLines(r.containerFlow(e,o.current()),vA);return i(),a}function vA(e,t,r){return">"+(r?"":" ")+e}function ha(e,t){return Rp(e,t.inConstruct,!0)&&!Rp(e,t.notInConstruct,!1)}function Rp(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function Gu(e,t,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===`
|
|
11
|
-
`&&
|
|
12
|
-
`}function
|
|
6
|
+
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,n.push(a)}return n.join("")}function Iu(e){let n={constructs:Zo([vu,...(e||{}).extensions||[]]),content:i($f),defined:[],document:i(Vf),flow:i(Kf),lazy:{},string:i(Yf),text:i(Xf)};return n;function i(o){return a;function a(s){return ep(n,o,s)}}}function Du(e){for(;!ra(e););return e}var tp=/[\0\t\n\r]/g;function Ru(){let e=1,t="",r=!0,n;return i;function i(o,a,s){let u=[],l,c,f,p,m;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),f=0,t="",r&&(o.charCodeAt(0)===65279&&f++,r=void 0);f<o.length;){if(tp.lastIndex=f,l=tp.exec(o),p=l&&l.index!==void 0?l.index:o.length,m=o.charCodeAt(p),!l){t=o.slice(f);break}if(m===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)),e+=p-f),m){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:n=!0,e=1}f=p+1}return s&&(n&&u.push(-5),t&&u.push(t),u.push(null)),u}}var Gk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function sa(e){return e.replace(Gk,Hk)}function Hk(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){let i=r.charCodeAt(1),o=i===120||i===88;return Yo(r.slice(o?2:1),o?16:10)}return Gn(r)||e}function Hn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?rp(e.position):"start"in e||"end"in e?rp(e):"line"in e||"column"in e?Fu(e):""}function Fu(e){return np(e&&e.line)+":"+np(e&&e.column)}function rp(e){return Fu(e&&e.start)+"-"+Fu(e&&e.end)}function np(e){return e&&typeof e=="number"?e:1}var op={}.hasOwnProperty;function Ou(e,t,r){return typeof t!="string"&&(r=t,t=void 0),Wk(r)(Du(Iu(r).document().write(Ru()(e,t,!0))))}function Wk(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ef),autolinkProtocol:re,autolinkEmail:re,atxHeading:o(On),blockQuote:o(Ae),characterEscape:re,characterReference:re,codeFenced:o(He),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(He,a),codeText:o(nt,a),codeTextData:re,data:re,codeFlowValue:re,definition:o(yt),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(nr),hardBreakEscape:o(Mi),hardBreakTrailing:o(Mi),htmlFlow:o(Qc,a),htmlFlowData:re,htmlText:o(Qc,a),htmlTextData:re,image:o(Dy),label:a,link:o(ef),listItem:o(Ry),listItemValue:p,listOrdered:o(tf,f),listUnordered:o(tf),paragraph:o(Fy),reference:g,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(On),strong:o(Oy),thematicBreak:o(Ly)},exit:{atxHeading:u(),atxHeadingSequence:_,autolink:u(),autolinkEmail:St,autolinkProtocol:se,blockQuote:u(),characterEscapeValue:b,characterReferenceMarkerHexadecimal:Be,characterReferenceMarkerNumeric:Be,characterReferenceValue:Fn,characterReference:ve,codeFenced:u(C),codeFencedFence:E,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:b,codeIndented:u(x),codeText:u(G),codeTextData:b,data:b,definition:u(),definitionDestinationString:S,definitionLabelString:k,definitionTitleString:y,emphasis:u(),hardBreakEscape:u(Q),hardBreakTrailing:u(Q),htmlFlow:u(B),htmlFlowData:b,htmlText:u(V),htmlTextData:b,image:u(xe),label:xt,labelText:Ke,lineEnding:ce,link:u(ae),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Ze,resourceDestinationString:d,resourceTitleString:rt,resource:wt,setextHeading:u(J),setextHeadingLineSequence:te,setextHeadingText:A,strong:u(),thematicBreak:u()}};ap(t,(e||{}).mdastExtensions||[]);let r={};return n;function n(T){let v={type:"root",children:[]},W={stack:[v],tokenStack:[],config:t,enter:s,exit:l,buffer:a,resume:c,data:r},ne=[],fe=-1;for(;++fe<T.length;)if(T[fe][1].type==="listOrdered"||T[fe][1].type==="listUnordered")if(T[fe][0]==="enter")ne.push(fe);else{let Ot=ne.pop();fe=i(T,Ot,fe)}for(fe=-1;++fe<T.length;){let Ot=t[T[fe][0]];op.call(Ot,T[fe][1].type)&&Ot[T[fe][1].type].call(Object.assign({sliceSerialize:T[fe][2].sliceSerialize},W),T[fe][1])}if(W.tokenStack.length>0){let Ot=W.tokenStack[W.tokenStack.length-1];(Ot[1]||ip).call(W,void 0,Ot[0])}for(v.position={start:Sr(T.length>0?T[0][1].start:{line:1,column:1,offset:0}),end:Sr(T.length>0?T[T.length-2][1].end:{line:1,column:1,offset:0})},fe=-1;++fe<t.transforms.length;)v=t.transforms[fe](v)||v;return v}function i(T,v,W){let ne=v-1,fe=-1,Ot=!1,Hr,ir,Bi,Ui;for(;++ne<=W;){let Et=T[ne];switch(Et[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Et[0]==="enter"?fe++:fe--,Ui=void 0;break}case"lineEndingBlank":{Et[0]==="enter"&&(Hr&&!Ui&&!fe&&!Bi&&(Bi=ne),Ui=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ui=void 0}if(!fe&&Et[0]==="enter"&&Et[1].type==="listItemPrefix"||fe===-1&&Et[0]==="exit"&&(Et[1].type==="listUnordered"||Et[1].type==="listOrdered")){if(Hr){let Nn=ne;for(ir=void 0;Nn--;){let or=T[Nn];if(or[1].type==="lineEnding"||or[1].type==="lineEndingBlank"){if(or[0]==="exit")continue;ir&&(T[ir][1].type="lineEndingBlank",Ot=!0),or[1].type="lineEnding",ir=Nn}else if(!(or[1].type==="linePrefix"||or[1].type==="blockQuotePrefix"||or[1].type==="blockQuotePrefixWhitespace"||or[1].type==="blockQuoteMarker"||or[1].type==="listItemIndent"))break}Bi&&(!ir||Bi<ir)&&(Hr._spread=!0),Hr.end=Object.assign({},ir?T[ir][1].start:Et[1].end),T.splice(ir||ne,0,["exit",Hr,Et[2]]),ne++,W++}if(Et[1].type==="listItemPrefix"){let Nn={type:"listItem",_spread:!1,start:Object.assign({},Et[1].start),end:void 0};Hr=Nn,T.splice(ne,0,["enter",Nn,Et[2]]),ne++,W++,Bi=void 0,Ui=!0}}}return T[v][1]._spread=Ot,W}function o(T,v){return W;function W(ne){s.call(this,T(ne),ne),v&&v.call(this,ne)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(T,v,W){this.stack[this.stack.length-1].children.push(T),this.stack.push(T),this.tokenStack.push([v,W||void 0]),T.position={start:Sr(v.start),end:void 0}}function u(T){return v;function v(W){T&&T.call(this,W),l.call(this,W)}}function l(T,v){let W=this.stack.pop(),ne=this.tokenStack.pop();if(ne)ne[0].type!==T.type&&(v?v.call(this,T,ne[0]):(ne[1]||ip).call(this,T,ne[0]));else throw new Error("Cannot close `"+T.type+"` ("+Hn({start:T.start,end:T.end})+"): it\u2019s not open");W.position.end=Sr(T.end)}function c(){return fr(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(T){if(this.data.expectingFirstListItemValue){let v=this.stack[this.stack.length-2];v.start=Number.parseInt(this.sliceSerialize(T),10),this.data.expectingFirstListItemValue=void 0}}function m(){let T=this.resume(),v=this.stack[this.stack.length-1];v.lang=T}function h(){let T=this.resume(),v=this.stack[this.stack.length-1];v.meta=T}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){let T=this.resume(),v=this.stack[this.stack.length-1];v.value=T.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){let T=this.resume(),v=this.stack[this.stack.length-1];v.value=T.replace(/(\r?\n|\r)$/g,"")}function k(T){let v=this.resume(),W=this.stack[this.stack.length-1];W.label=v,W.identifier=Xe(this.sliceSerialize(T)).toLowerCase()}function y(){let T=this.resume(),v=this.stack[this.stack.length-1];v.title=T}function S(){let T=this.resume(),v=this.stack[this.stack.length-1];v.url=T}function _(T){let v=this.stack[this.stack.length-1];if(!v.depth){let W=this.sliceSerialize(T).length;v.depth=W}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function te(T){let v=this.stack[this.stack.length-1];v.depth=this.sliceSerialize(T).codePointAt(0)===61?1:2}function J(){this.data.setextHeadingSlurpLineEnding=void 0}function re(T){let W=this.stack[this.stack.length-1].children,ne=W[W.length-1];(!ne||ne.type!=="text")&&(ne=Ny(),ne.position={start:Sr(T.start),end:void 0},W.push(ne)),this.stack.push(ne)}function b(T){let v=this.stack.pop();v.value+=this.sliceSerialize(T),v.position.end=Sr(T.end)}function ce(T){let v=this.stack[this.stack.length-1];if(this.data.atHardBreak){let W=v.children[v.children.length-1];W.position.end=Sr(T.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(v.type)&&(re.call(this,T),b.call(this,T))}function Q(){this.data.atHardBreak=!0}function B(){let T=this.resume(),v=this.stack[this.stack.length-1];v.value=T}function V(){let T=this.resume(),v=this.stack[this.stack.length-1];v.value=T}function G(){let T=this.resume(),v=this.stack[this.stack.length-1];v.value=T}function ae(){let T=this.stack[this.stack.length-1];if(this.data.inReference){let v=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=v,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function xe(){let T=this.stack[this.stack.length-1];if(this.data.inReference){let v=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=v,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function Ke(T){let v=this.sliceSerialize(T),W=this.stack[this.stack.length-2];W.label=sa(v),W.identifier=Xe(v).toLowerCase()}function xt(){let T=this.stack[this.stack.length-1],v=this.resume(),W=this.stack[this.stack.length-1];if(this.data.inReference=!0,W.type==="link"){let ne=T.children;W.children=ne}else W.alt=v}function d(){let T=this.resume(),v=this.stack[this.stack.length-1];v.url=T}function rt(){let T=this.resume(),v=this.stack[this.stack.length-1];v.title=T}function wt(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function Ze(T){let v=this.resume(),W=this.stack[this.stack.length-1];W.label=v,W.identifier=Xe(this.sliceSerialize(T)).toLowerCase(),this.data.referenceType="full"}function Be(T){this.data.characterReferenceType=T.type}function Fn(T){let v=this.sliceSerialize(T),W=this.data.characterReferenceType,ne;W?(ne=Yo(v,W==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ne=Gn(v);let fe=this.stack[this.stack.length-1];fe.value+=ne}function ve(T){let v=this.stack.pop();v.position.end=Sr(T.end)}function se(T){b.call(this,T);let v=this.stack[this.stack.length-1];v.url=this.sliceSerialize(T)}function St(T){b.call(this,T);let v=this.stack[this.stack.length-1];v.url="mailto:"+this.sliceSerialize(T)}function Ae(){return{type:"blockquote",children:[]}}function He(){return{type:"code",lang:null,meta:null,value:""}}function nt(){return{type:"inlineCode",value:""}}function yt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function nr(){return{type:"emphasis",children:[]}}function On(){return{type:"heading",depth:0,children:[]}}function Mi(){return{type:"break"}}function Qc(){return{type:"html",value:""}}function Dy(){return{type:"image",title:null,url:"",alt:null}}function ef(){return{type:"link",title:null,url:"",children:[]}}function tf(T){return{type:"list",ordered:T.type==="listOrdered",start:null,spread:T._spread,children:[]}}function Ry(T){return{type:"listItem",spread:T._spread,checked:null,children:[]}}function Fy(){return{type:"paragraph",children:[]}}function Oy(){return{type:"strong",children:[]}}function Ny(){return{type:"text",value:""}}function Ly(){return{type:"thematicBreak"}}}function Sr(e){return{line:e.line,column:e.column,offset:e.offset}}function ap(e,t){let r=-1;for(;++r<t.length;){let n=t[r];Array.isArray(n)?ap(e,n):Kk(e,n)}}function Kk(e,t){let r;for(r in t)if(op.call(t,r))switch(r){case"canContainEols":{let n=t[r];n&&e[r].push(...n);break}case"transforms":{let n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{let n=t[r];n&&Object.assign(e[r],n);break}}}function ip(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Hn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Hn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Hn({start:t.start,end:t.end})+") is still open")}function ua(e){let t=this;t.parser=r;function r(n){return Ou(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}var sp={}.hasOwnProperty;function up(e,t){let r=t||{};function n(i,...o){let a=n.invalid,s=n.handlers;if(i&&sp.call(i,e)){let u=String(i[e]);a=sp.call(s,u)?s[u]:n.unknown}if(a)return a.call(this,i,...o)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}var Zk={}.hasOwnProperty;function Nu(e,t){let r=-1,n;if(t.extensions)for(;++r<t.extensions.length;)Nu(e,t.extensions[r]);for(n in t)if(Zk.call(t,n))switch(n){case"extensions":break;case"unsafe":{lp(e[n],t[n]);break}case"join":{lp(e[n],t[n]);break}case"handlers":{Yk(e[n],t[n]);break}default:e.options[n]=t[n]}return e}function lp(e,t){t&&e.push(...t)}function Yk(e,t){t&&Object.assign(e,t)}function cp(e,t,r,n){let i=r.enter("blockquote"),o=r.createTracker(n);o.move("> "),o.shift(2);let a=r.indentLines(r.containerFlow(e,o.current()),Xk);return i(),a}function Xk(e,t,r){return">"+(r?"":" ")+e}function la(e,t){return fp(e,t.inConstruct,!0)&&!fp(e,t.notInConstruct,!1)}function fp(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function Lu(e,t,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===`
|
|
7
|
+
`&&la(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return`\\
|
|
8
|
+
`}function pp(e,t){let r=String(e),n=r.indexOf(t),i=n,o=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===i?++o>a&&(a=o):o=1,i=n+t.length,n=r.indexOf(t,i);return a}function Yi(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function mp(e){let t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function dp(e,t,r,n){let i=mp(r),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(Yi(e,r)){let f=r.enter("codeIndented"),p=r.indentLines(o,Jk);return f(),p}let s=r.createTracker(n),u=i.repeat(Math.max(pp(o,i)+1,3)),l=r.enter("codeFenced"),c=s.move(u);if(e.lang){let f=r.enter(`codeFencedLang${a}`);c+=s.move(r.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){let f=r.enter(`codeFencedMeta${a}`);c+=s.move(" "),c+=s.move(r.safe(e.meta,{before:c,after:`
|
|
13
9
|
`,encode:["`"],...s.current()})),f()}return c+=s.move(`
|
|
14
10
|
`),o&&(c+=s.move(o+`
|
|
15
|
-
`)),c+=s.move(u),l(),c}function
|
|
16
|
-
`,...u.current()}))),s(),e.title&&(s=r.enter(`title${o}`),l+=u.move(" "+i),l+=u.move(r.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),s()),a(),l}function
|
|
11
|
+
`)),c+=s.move(u),l(),c}function Jk(e,t,r){return(r?"":" ")+e}function Wn(e){let t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function hp(e,t,r,n){let i=Wn(r),o=i==='"'?"Quote":"Apostrophe",a=r.enter("definition"),s=r.enter("label"),u=r.createTracker(n),l=u.move("[");return l+=u.move(r.safe(r.associationId(e),{before:l,after:"]",...u.current()})),l+=u.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(r.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(s=r.enter("destinationRaw"),l+=u.move(r.safe(e.url,{before:l,after:e.title?" ":`
|
|
12
|
+
`,...u.current()}))),s(),e.title&&(s=r.enter(`title${o}`),l+=u.move(" "+i),l+=u.move(r.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),s()),a(),l}function gp(e){let t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Tt(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Kn(e,t,r){let n=pr(e),i=pr(t);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}}Pu.peek=Qk;function Pu(e,t,r,n){let i=gp(r),o=r.enter("emphasis"),a=r.createTracker(n),s=a.move(i),u=a.move(r.containerPhrasing(e,{after:i,before:s,...a.current()})),l=u.charCodeAt(0),c=Kn(n.before.charCodeAt(n.before.length-1),l,i);c.inside&&(u=Tt(l)+u.slice(1));let f=u.charCodeAt(u.length-1),p=Kn(n.after.charCodeAt(0),f,i);p.inside&&(u=u.slice(0,-1)+Tt(f));let m=a.move(i);return o(),r.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},s+u+m}function Qk(e,t,r){return r.options.emphasis||"*"}var Vt=function(e){if(e==null)return nA;if(typeof e=="function")return ca(e);if(typeof e=="object")return Array.isArray(e)?eA(e):tA(e);if(typeof e=="string")return rA(e);throw new Error("Expected function, string, or object as test")};function eA(e){let t=[],r=-1;for(;++r<e.length;)t[r]=Vt(e[r]);return ca(n);function n(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function tA(e){let t=e;return ca(r);function r(n){let i=n,o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function rA(e){return ca(t);function t(r){return r&&r.type===e}}function ca(e){return t;function t(r,n,i){return!!(iA(r)&&e.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function nA(){return!0}function iA(e){return e!==null&&typeof e=="object"&&"type"in e}function xp(e){return"\x1B[33m"+e+"\x1B[39m"}var yp=[],fa=!0,gn=!1,pa="skip";function Xi(e,t,r,n){let i;typeof t=="function"&&typeof r!="function"?(n=r,r=t):i=t;let o=Vt(i),a=n?-1:1;s(e,void 0,[])();function s(u,l,c){let f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){let m=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+xp(u.type+(m?"<"+m+">":""))+")"})}return p;function p(){let m=yp,h,E,C;if((!t||o(u,l,c[c.length-1]||void 0))&&(m=oA(r(u,c)),m[0]===gn))return m;if("children"in u&&u.children){let x=u;if(x.children&&m[0]!==pa)for(E=(n?x.children.length:-1)+a,C=c.concat(x);E>-1&&E<x.children.length;){let k=x.children[E];if(h=s(k,E,C)(),h[0]===gn)return h;E=typeof h[1]=="number"?h[1]:E+a}}return m}}}function oA(e){return Array.isArray(e)?e:typeof e=="number"?[fa,e]:e==null?yp:[e]}function Ji(e,t,r,n){let i,o,a;typeof t=="function"&&typeof r!="function"?(o=void 0,a=t,i=r):(o=t,a=r,i=n),Xi(e,o,s,i);function s(u,l){let c=l[l.length-1],f=c?c.children.indexOf(u):void 0;return a(u,f,c)}}function ma(e,t){let r=!1;return Ji(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,gn}),!!((!e.depth||e.depth<3)&&fr(e)&&(t.options.setext||r))}function Ep(e,t,r,n){let i=Math.max(Math.min(6,e.depth||1),1),o=r.createTracker(n);if(ma(e,r)){let c=r.enter("headingSetext"),f=r.enter("phrasing"),p=r.containerPhrasing(e,{...o.current(),before:`
|
|
17
13
|
`,after:`
|
|
18
14
|
`});return f(),c(),p+`
|
|
19
15
|
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
20
16
|
`))+1))}let a="#".repeat(i),s=r.enter("headingAtx"),u=r.enter("phrasing");o.move(a+" ");let l=r.containerPhrasing(e,{before:"# ",after:`
|
|
21
|
-
`,...o.current()});return/^[\t ]/.test(l)&&(l=
|
|
22
|
-
`,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:
|
|
23
|
-
]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:
|
|
24
|
-
*])`},{character:"*",inConstruct:"phrasing",notInConstruct:
|
|
17
|
+
`,...o.current()});return/^[\t ]/.test(l)&&(l=Tt(l.charCodeAt(0))+l.slice(1)),l=l?a+" "+l:a,r.options.closeAtx&&(l+=" "+a),u(),s(),l}Mu.peek=aA;function Mu(e){return e.value||""}function aA(){return"<"}Bu.peek=sA;function Bu(e,t,r,n){let i=Wn(r),o=i==='"'?"Quote":"Apostrophe",a=r.enter("image"),s=r.enter("label"),u=r.createTracker(n),l=u.move("![");return l+=u.move(r.safe(e.alt,{before:l,after:"]",...u.current()})),l+=u.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(r.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(s=r.enter("destinationRaw"),l+=u.move(r.safe(e.url,{before:l,after:e.title?" ":")",...u.current()}))),s(),e.title&&(s=r.enter(`title${o}`),l+=u.move(" "+i),l+=u.move(r.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),s()),l+=u.move(")"),a(),l}function sA(){return"!"}Uu.peek=uA;function Uu(e,t,r,n){let i=e.referenceType,o=r.enter("imageReference"),a=r.enter("label"),s=r.createTracker(n),u=s.move("!["),l=r.safe(e.alt,{before:u,after:"]",...s.current()});u+=s.move(l+"]["),a();let c=r.stack;r.stack=[],a=r.enter("reference");let f=r.safe(r.associationId(e),{before:u,after:"]",...s.current()});return a(),r.stack=c,o(),i==="full"||!l||l!==f?u+=s.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function uA(){return"!"}zu.peek=lA;function zu(e,t,r){let n=e.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 a=r.unsafe[o],s=r.compilePattern(a),u;if(a.atBreak)for(;u=s.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 lA(){return"`"}function ju(e,t){let r=fr(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}$u.peek=cA;function $u(e,t,r,n){let i=Wn(r),o=i==='"'?"Quote":"Apostrophe",a=r.createTracker(n),s,u;if(ju(e,r)){let c=r.stack;r.stack=[],s=r.enter("autolink");let f=a.move("<");return f+=a.move(r.containerPhrasing(e,{before:f,after:">",...a.current()})),f+=a.move(">"),s(),r.stack=c,f}s=r.enter("link"),u=r.enter("label");let l=a.move("[");return l+=a.move(r.containerPhrasing(e,{before:l,after:"](",...a.current()})),l+=a.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=r.enter("destinationLiteral"),l+=a.move("<"),l+=a.move(r.safe(e.url,{before:l,after:">",...a.current()})),l+=a.move(">")):(u=r.enter("destinationRaw"),l+=a.move(r.safe(e.url,{before:l,after:e.title?" ":")",...a.current()}))),u(),e.title&&(u=r.enter(`title${o}`),l+=a.move(" "+i),l+=a.move(r.safe(e.title,{before:l,after:i,...a.current()})),l+=a.move(i),u()),l+=a.move(")"),s(),l}function cA(e,t,r){return ju(e,r)?"<":"["}qu.peek=fA;function qu(e,t,r,n){let i=e.referenceType,o=r.enter("linkReference"),a=r.enter("label"),s=r.createTracker(n),u=s.move("["),l=r.containerPhrasing(e,{before:u,after:"]",...s.current()});u+=s.move(l+"]["),a();let c=r.stack;r.stack=[],a=r.enter("reference");let f=r.safe(r.associationId(e),{before:u,after:"]",...s.current()});return a(),r.stack=c,o(),i==="full"||!l||l!==f?u+=s.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function fA(){return"["}function Zn(e){let t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function bp(e){let t=Zn(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function kp(e){let t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function da(e){let t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Ap(e,t,r,n){let i=r.enter("list"),o=r.bulletCurrent,a=e.ordered?kp(r):Zn(r),s=e.ordered?a==="."?")":".":bp(r),u=t&&r.bulletLastUsed?a===r.bulletLastUsed:!1;if(!e.ordered){let c=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&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),da(r)===a&&c){let f=-1;for(;++f<e.children.length;){let p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(a=s),r.bulletCurrent=a;let l=r.containerFlow(e,n);return r.bulletLastUsed=a,r.bulletCurrent=o,i(),l}function Tp(e){let t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Cp(e,t,r,n){let i=Tp(r),o=r.bulletCurrent||Zn(r);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);let s=r.createTracker(n);s.move(o+" ".repeat(a-o.length)),s.shift(a);let u=r.enter("listItem"),l=r.indentLines(r.containerFlow(e,s.current()),c);return u(),l;function c(f,p,m){return p?(m?"":" ".repeat(a))+f:(m?o:o+" ".repeat(a-o.length))+f}}function wp(e,t,r,n){let i=r.enter("paragraph"),o=r.enter("phrasing"),a=r.containerPhrasing(e,n);return o(),i(),a}var Vu=Vt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Sp(e,t,r,n){return(e.children.some(function(a){return Vu(a)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function _p(e){let t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Gu.peek=pA;function Gu(e,t,r,n){let i=_p(r),o=r.enter("strong"),a=r.createTracker(n),s=a.move(i+i),u=a.move(r.containerPhrasing(e,{after:i,before:s,...a.current()})),l=u.charCodeAt(0),c=Kn(n.before.charCodeAt(n.before.length-1),l,i);c.inside&&(u=Tt(l)+u.slice(1));let f=u.charCodeAt(u.length-1),p=Kn(n.after.charCodeAt(0),f,i);p.inside&&(u=u.slice(0,-1)+Tt(f));let m=a.move(i+i);return o(),r.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},s+u+m}function pA(e,t,r){return r.options.strong||"*"}function vp(e,t,r,n){return r.safe(e.value,n)}function Ip(e){let t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Dp(e,t,r){let n=(da(r)+(r.options.ruleSpaces?" ":"")).repeat(Ip(r));return r.options.ruleSpaces?n.slice(0,-1):n}var xn={blockquote:cp,break:Lu,code:dp,definition:hp,emphasis:Pu,hardBreak:Lu,heading:Ep,html:Mu,image:Bu,imageReference:Uu,inlineCode:zu,link:$u,linkReference:qu,list:Ap,listItem:Cp,paragraph:wp,root:Sp,strong:Gu,text:vp,thematicBreak:Dp};var Rp=[mA];function mA(e,t,r,n){if(t.type==="code"&&Yi(t,n)&&(e.type==="list"||e.type===t.type&&Yi(e,n)))return!1;if("spread"in r&&typeof r.spread=="boolean")return e.type==="paragraph"&&(e.type===t.type||t.type==="definition"||t.type==="heading"&&ma(t,n))?void 0:r.spread?1:0}var yn=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],Fp=[{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:`
|
|
18
|
+
`,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:yn},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
|
|
19
|
+
]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:yn},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
|
|
20
|
+
*])`},{character:"*",inConstruct:"phrasing",notInConstruct:yn},{atBreak:!0,character:"+",after:`(?:[ \r
|
|
25
21
|
])`},{atBreak:!0,character:"-",after:`(?:[ \r
|
|
26
22
|
-])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
|
|
27
|
-
]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:
|
|
28
|
-
`)&&c.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),s=" ",l=t.createTracker(r),l.move(o.join("")));let p=t.handle(c,e,t,{...l.current(),after:f,before:s});u&&u===p.slice(0,1)&&(p=
|
|
23
|
+
]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:yn},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:yn},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:yn},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:yn},{atBreak:!0,character:"~"}];function Op(e){return e.label||!e.identifier?e.label||"":sa(e.identifier)}function Np(e){if(!e._compiled){let t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function Lp(e,t,r){let n=t.indexStack,i=e.children||[],o=[],a=-1,s=r.before,u;n.push(-1);let l=t.createTracker(r);for(;++a<i.length;){let c=i[a],f;if(n[n.length-1]=a,a+1<i.length){let h=t.handle.handlers[i[a+1].type];h&&h.peek&&(h=h.peek),f=h?h(i[a+1],e,t,{before:"",after:"",...l.current()}).charAt(0):""}else f=r.after;o.length>0&&(s==="\r"||s===`
|
|
24
|
+
`)&&c.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),s=" ",l=t.createTracker(r),l.move(o.join("")));let p=t.handle(c,e,t,{...l.current(),after:f,before:s});u&&u===p.slice(0,1)&&(p=Tt(u.charCodeAt(0))+p.slice(1));let m=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,u=void 0,m&&(o.length>0&&m.before&&s===o[o.length-1].slice(-1)&&(o[o.length-1]=o[o.length-1].slice(0,-1)+Tt(s.charCodeAt(0))),m.after&&(u=f)),l.move(p),o.push(p),s=p.slice(-1)}return n.pop(),o.join("")}function Pp(e,t,r){let n=t.indexStack,i=e.children||[],o=t.createTracker(r),a=[],s=-1;for(n.push(-1);++s<i.length;){let u=i[s];n[n.length-1]=s,a.push(o.move(t.handle(u,e,t,{before:`
|
|
29
25
|
`,after:`
|
|
30
|
-
`,...o.current()}))),u.type!=="list"&&(t.bulletLastUsed=void 0),s<i.length-1&&a.push(o.move(
|
|
26
|
+
`,...o.current()}))),u.type!=="list"&&(t.bulletLastUsed=void 0),s<i.length-1&&a.push(o.move(dA(u,i[s+1],e,t)))}return n.pop(),a.join("")}function dA(e,t,r,n){let i=n.join.length;for(;i--;){let o=n.join[i](e,t,r,n);if(o===!0||o===1)break;if(typeof o=="number")return`
|
|
31
27
|
`.repeat(1+o);if(o===!1)return`
|
|
32
28
|
|
|
33
29
|
<!---->
|
|
34
30
|
|
|
35
31
|
`}return`
|
|
36
32
|
|
|
37
|
-
`}var
|
|
33
|
+
`}var hA=/\r?\n|\r/g;function Mp(e,t){let r=[],n=0,i=0,o;for(;o=hA.exec(e);)a(e.slice(n,o.index)),r.push(o[0]),n=o.index+o[0].length,i++;return a(e.slice(n)),r.join("");function a(s){r.push(t(s,i,!s))}}function Up(e,t,r){let n=(r.before||"")+(t||"")+(r.after||""),i=[],o=[],a={},s=-1;for(;++s<e.unsafe.length;){let c=e.unsafe[s];if(!la(e.stack,c))continue;let f=e.compilePattern(c),p;for(;p=f.exec(n);){let m="before"in c||!!c.atBreak,h="after"in c,E=p.index+(m?p[1].length:0);i.includes(E)?(a[E].before&&!m&&(a[E].before=!1),a[E].after&&!h&&(a[E].after=!1)):(i.push(E),a[E]={before:m,after:h})}}i.sort(gA);let u=r.before?r.before.length:0,l=n.length-(r.after?r.after.length:0);for(s=-1;++s<i.length;){let c=i[s];c<u||c>=l||c+1<l&&i[s+1]===c+1&&a[c].after&&!a[c+1].before&&!a[c+1].after||i[s-1]===c-1&&a[c].before&&!a[c-1].before&&!a[c-1].after||(u!==c&&o.push(Bp(n.slice(u,c),"\\")),u=c,/[!-/:-@[-`{-~]/.test(n.charAt(c))&&(!r.encode||!r.encode.includes(n.charAt(c)))?o.push("\\"):(o.push(Tt(n.charCodeAt(c))),u++))}return o.push(Bp(n.slice(u,l),r.after)),o.join("")}function gA(e,t){return e-t}function Bp(e,t){let r=/\\(?=[!-/:-@[-`{-~])/g,n=[],i=[],o=e+t,a=-1,s=0,u;for(;u=r.exec(o);)n.push(u.index);for(;++a<n.length;)s!==n[a]&&i.push(e.slice(s,n[a])),i.push("\\"),s=n[a];return i.push(e.slice(s)),i.join("")}function zp(e){let t=e||{},r=t.now||{},n=t.lineShift||0,i=r.line||1,o=r.column||1;return{move:u,current:a,shift:s};function a(){return{now:{line:i,column:o},lineShift:n}}function s(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 Hu(e,t){let r=t||{},n={associationId:Op,containerPhrasing:bA,containerFlow:kA,createTracker:zp,compilePattern:Np,enter:o,handlers:{...xn},handle:void 0,indentLines:Mp,indexStack:[],join:[...Rp],options:{},safe:AA,stack:[],unsafe:[...Fp]};Nu(n,r),n.options.tightDefinitions&&n.join.push(EA),n.handle=up("type",{invalid:xA,unknown:yA,handlers:n.handlers});let i=n.handle(e,void 0,n,{before:`
|
|
38
34
|
`,after:`
|
|
39
35
|
`,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
|
|
40
|
-
`),i;function o(a){return n.stack.push(a),s;function s(){n.stack.pop()}}}function WA(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function KA(e){let t=e;throw new Error("Cannot handle unknown node `"+t.type+"`")}function ZA(e,t){if(e.type==="definition"&&e.type===t.type)return 0}function YA(e,t){return em(e,this,t)}function XA(e,t){return tm(e,this,t)}function JA(e,t){return im(this,e,t)}function ka(e){let t=this;t.compiler=r;function r(n){return rl(n,{...t.data("settings"),...e,extensions:t.data("toMarkdownExtensions")||[]})}}function nl(e){if(e)throw e}var Ca=mf(dm(),1);function so(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function il(){let e=[],t={run:r,use:n};return t;function r(...i){let o=-1,a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(u,...l){let c=e[++o],f=-1;if(u){a(u);return}for(;++f<i.length;)(l[f]===null||l[f]===void 0)&&(l[f]=i[f]);i=l,c?hm(c,s)(...l):a(null,...l)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function hm(e,t){let r;return n;function n(...a){let s=e.length>a.length,u;s&&a.push(i);try{u=e.apply(this,a)}catch(l){let c=l;if(s&&r)throw c;return i(c)}s||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(a,...s){r||(r=!0,t(a,...s))}function o(a){i(null,a)}}import{VFile as QA}from"vfile";var gm=function(e){let n=this.constructor.prototype,i=n[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,n),o};var eT={}.hasOwnProperty,ul=class e extends gm{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=il()}copy(){let t=new e,r=-1;for(;++r<this.attachers.length;){let n=this.attachers[r];t.use(...n)}return t.data((0,Ca.default)(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(sl("data",this.frozen),this.namespace[t]=r,this):eT.call(this.namespace,t)&&this.namespace[t]||void 0:t?(sl("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;let t=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(t,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();let r=Ta(t),n=this.parser||this.Parser;return ol("parse",n),n(String(r),r)}process(t,r){let n=this;return this.freeze(),ol("process",this.parser||this.Parser),al("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(o,a){let s=Ta(t),u=n.parse(s);n.run(u,s,function(c,f,p){if(c||!f||!p)return l(c);let m=f,h=n.stringify(m,p);rT(h)?p.value=h:p.result=h,l(c,p)});function l(c,f){c||!f?a(c):o?o(f):r(void 0,f)}}}processSync(t){let r=!1,n;return this.freeze(),ol("processSync",this.parser||this.Parser),al("processSync",this.compiler||this.Compiler),this.process(t,i),ym("processSync","process",r),n;function i(o,a){r=!0,nl(o),n=a}}run(t,r,n){xm(t),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(a,s){let u=Ta(r);i.run(t,u,l);function l(c,f,p){let m=f||t;c?s(c):a?a(m):n(void 0,m,p)}}}runSync(t,r){let n=!1,i;return this.run(t,r,o),ym("runSync","run",n),i;function o(a,s){nl(a),i=s,n=!0}}stringify(t,r){this.freeze();let n=Ta(r),i=this.compiler||this.Compiler;return al("stringify",i),xm(t),i(t,n)}use(t,...r){let n=this.attachers,i=this.namespace;if(sl("use",this.frozen),t!=null)if(typeof t=="function")u(t,r);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");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 a(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function a(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");s(l.plugins),l.settings&&(i.settings=(0,Ca.default)(!0,i.settings,l.settings))}function s(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[m,...h]=c,E=n[p][1];so(E)&&so(m)&&(m=(0,Ca.default)(!0,E,m)),n[p]=[l,m,...h]}}}},ll=new ul().freeze();function ol(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function al(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function sl(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function xm(e){if(!so(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ym(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ta(e){return tT(e)?e:new QA(e)}function tT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function rT(e){return typeof e=="string"||nT(e)}function nT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var ri=ll().use(da).use(ka).freeze();function cl(e,t){let r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(t);for(;i!==-1;)n++,i=r.indexOf(t,i+t.length);return n}function fl(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function pl(e,t,r){let i=Kt((r||{}).ignore||[]),o=iT(t),a=-1;for(;++a<o.length;)oo(e,"text",s);function s(l,c){let f=-1,p;for(;++f<c.length;){let m=c[f],h=p?p.children:void 0;if(i(m,h?h.indexOf(m):void 0,p))return;p=m}if(p)return u(l,c)}function u(l,c){let f=c[c.length-1],p=o[a][0],m=o[a][1],h=0,C=f.children.indexOf(l),x=!1,k=[];p.lastIndex=0;let y=p.exec(l.value);for(;y;){let S=y.index,v={index:y.index,input:y.input,stack:[...c,l]},A=m(...y,v);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?p.lastIndex=S+1:(h!==S&&k.push({type:"text",value:l.value.slice(h,S)}),Array.isArray(A)?k.push(...A):A&&k.push(A),h=S+y[0].length,x=!0),!p.global)break;y=p.exec(l.value)}return x?(h<l.value.length&&k.push({type:"text",value:l.value.slice(h)}),f.children.splice(C,1,...k)):k=[l],C+k.length}}function iT(e){let t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");let r=!e[0]||Array.isArray(e[0])?e:[e],n=-1;for(;++n<r.length;){let i=r[n];t.push([oT(i[0]),aT(i[1])])}return t}function oT(e){return typeof e=="string"?new RegExp(fl(e),"g"):e}function aT(e){return typeof e=="function"?e:function(){return e}}var ml="phrasing",dl=["autolink","link","image","label"];function gl(){return{transforms:[pT],enter:{literalAutolink:sT,literalAutolinkEmail:hl,literalAutolinkHttp:hl,literalAutolinkWww:hl},exit:{literalAutolink:fT,literalAutolinkEmail:cT,literalAutolinkHttp:uT,literalAutolinkWww:lT}}}function xl(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ml,notInConstruct:dl},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ml,notInConstruct:dl},{character:":",before:"[ps]",after:"\\/",inConstruct:ml,notInConstruct:dl}]}}function sT(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function hl(e){this.config.enter.autolinkProtocol.call(this,e)}function uT(e){this.config.exit.autolinkProtocol.call(this,e)}function lT(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function cT(e){this.config.exit.autolinkEmail.call(this,e)}function fT(e){this.exit(e)}function pT(e){pl(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,mT],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),dT]],{ignore:["link","linkReference"]})}function mT(e,t,r,n,i){let o="";if(!Em(i)||(/^w/i.test(t)&&(r=t+r,t="",o="http://"),!hT(r)))return!1;let a=gT(r+n);if(!a[0])return!1;let s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function dT(e,t,r,n){return!Em(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function hT(e){let t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function gT(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")"),i=cl(e,"("),o=cl(e,")");for(;n!==-1&&i>o;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),o++;return[e,r]}function Em(e,t){let r=e.input.charCodeAt(e.index-1);return(e.index===0||Ht(r)||gn(r))&&(!t||r!==47)}bm.peek=wT;function xT(){this.buffer()}function yT(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ET(){this.buffer()}function bT(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function kT(e){let t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Qe(this.sliceSerialize(e)).toLowerCase(),r.label=t}function AT(e){this.exit(e)}function TT(e){let t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Qe(this.sliceSerialize(e)).toLowerCase(),r.label=t}function CT(e){this.exit(e)}function wT(){return"["}function bm(e,t,r,n){let i=r.createTracker(n),o=i.move("[^"),a=r.enter("footnoteReference"),s=r.enter("reference");return o+=i.move(r.safe(r.associationId(e),{after:"]",before:o})),s(),a(),o+=i.move("]"),o}function yl(){return{enter:{gfmFootnoteCallString:xT,gfmFootnoteCall:yT,gfmFootnoteDefinitionLabelString:ET,gfmFootnoteDefinition:bT},exit:{gfmFootnoteCallString:kT,gfmFootnoteCall:AT,gfmFootnoteDefinitionLabelString:TT,gfmFootnoteDefinition:CT}}}function El(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:bm},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,i,o,a){let s=o.createTracker(a),u=s.move("[^"),l=o.enter("footnoteDefinition"),c=o.enter("label");return u+=s.move(o.safe(o.associationId(n),{before:u,after:"]"})),c(),u+=s.move("]:"),n.children&&n.children.length>0&&(s.shift(4),u+=s.move((t?`
|
|
41
|
-
`:" ")+o.indentLines(o.containerFlow(n,s.current()),t?
|
|
42
|
-
`)}function
|
|
36
|
+
`),i;function o(a){return n.stack.push(a),s;function s(){n.stack.pop()}}}function xA(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function yA(e){let t=e;throw new Error("Cannot handle unknown node `"+t.type+"`")}function EA(e,t){if(e.type==="definition"&&e.type===t.type)return 0}function bA(e,t){return Lp(e,this,t)}function kA(e,t){return Pp(e,this,t)}function AA(e,t){return Up(this,e,t)}function ha(e){let t=this;t.compiler=r;function r(n){return Hu(n,{...t.data("settings"),...e,extensions:t.data("toMarkdownExtensions")||[]})}}function Wu(e){if(e)throw e}var ya=eu(Zp(),1);function Qi(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Ku(){let e=[],t={run:r,use:n};return t;function r(...i){let o=-1,a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(u,...l){let c=e[++o],f=-1;if(u){a(u);return}for(;++f<i.length;)(l[f]===null||l[f]===void 0)&&(l[f]=i[f]);i=l,c?Yp(c,s)(...l):a(null,...l)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Yp(e,t){let r;return n;function n(...a){let s=e.length>a.length,u;s&&a.push(i);try{u=e.apply(this,a)}catch(l){let c=l;if(s&&r)throw c;return i(c)}s||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(a,...s){r||(r=!0,t(a,...s))}function o(a){i(null,a)}}import{VFile as TA}from"vfile";var Xp=function(e){let n=this.constructor.prototype,i=n[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,n),o};var CA={}.hasOwnProperty,Ju=class e extends Xp{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=Ku()}copy(){let t=new e,r=-1;for(;++r<this.attachers.length;){let n=this.attachers[r];t.use(...n)}return t.data((0,ya.default)(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Xu("data",this.frozen),this.namespace[t]=r,this):CA.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Xu("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;let t=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(t,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();let r=xa(t),n=this.parser||this.Parser;return Zu("parse",n),n(String(r),r)}process(t,r){let n=this;return this.freeze(),Zu("process",this.parser||this.Parser),Yu("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(o,a){let s=xa(t),u=n.parse(s);n.run(u,s,function(c,f,p){if(c||!f||!p)return l(c);let m=f,h=n.stringify(m,p);SA(h)?p.value=h:p.result=h,l(c,p)});function l(c,f){c||!f?a(c):o?o(f):r(void 0,f)}}}processSync(t){let r=!1,n;return this.freeze(),Zu("processSync",this.parser||this.Parser),Yu("processSync",this.compiler||this.Compiler),this.process(t,i),Qp("processSync","process",r),n;function i(o,a){r=!0,Wu(o),n=a}}run(t,r,n){Jp(t),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(a,s){let u=xa(r);i.run(t,u,l);function l(c,f,p){let m=f||t;c?s(c):a?a(m):n(void 0,m,p)}}}runSync(t,r){let n=!1,i;return this.run(t,r,o),Qp("runSync","run",n),i;function o(a,s){Wu(a),i=s,n=!0}}stringify(t,r){this.freeze();let n=xa(r),i=this.compiler||this.Compiler;return Yu("stringify",i),Jp(t),i(t,n)}use(t,...r){let n=this.attachers,i=this.namespace;if(Xu("use",this.frozen),t!=null)if(typeof t=="function")u(t,r);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");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 a(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function a(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");s(l.plugins),l.settings&&(i.settings=(0,ya.default)(!0,i.settings,l.settings))}function s(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[m,...h]=c,E=n[p][1];Qi(E)&&Qi(m)&&(m=(0,ya.default)(!0,E,m)),n[p]=[l,m,...h]}}}},Qu=new Ju().freeze();function Zu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Yu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Xu(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Jp(e){if(!Qi(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Qp(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function xa(e){return wA(e)?e:new TA(e)}function wA(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function SA(e){return typeof e=="string"||_A(e)}function _A(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Yn=Qu().use(ua).use(ha).freeze();function el(e,t){let r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(t);for(;i!==-1;)n++,i=r.indexOf(t,i+t.length);return n}function tl(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function rl(e,t,r){let i=Vt((r||{}).ignore||[]),o=vA(t),a=-1;for(;++a<o.length;)Xi(e,"text",s);function s(l,c){let f=-1,p;for(;++f<c.length;){let m=c[f],h=p?p.children:void 0;if(i(m,h?h.indexOf(m):void 0,p))return;p=m}if(p)return u(l,c)}function u(l,c){let f=c[c.length-1],p=o[a][0],m=o[a][1],h=0,C=f.children.indexOf(l),x=!1,k=[];p.lastIndex=0;let y=p.exec(l.value);for(;y;){let S=y.index,_={index:y.index,input:y.input,stack:[...c,l]},A=m(...y,_);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?p.lastIndex=S+1:(h!==S&&k.push({type:"text",value:l.value.slice(h,S)}),Array.isArray(A)?k.push(...A):A&&k.push(A),h=S+y[0].length,x=!0),!p.global)break;y=p.exec(l.value)}return x?(h<l.value.length&&k.push({type:"text",value:l.value.slice(h)}),f.children.splice(C,1,...k)):k=[l],C+k.length}}function vA(e){let t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");let r=!e[0]||Array.isArray(e[0])?e:[e],n=-1;for(;++n<r.length;){let i=r[n];t.push([IA(i[0]),DA(i[1])])}return t}function IA(e){return typeof e=="string"?new RegExp(tl(e),"g"):e}function DA(e){return typeof e=="function"?e:function(){return e}}var nl="phrasing",il=["autolink","link","image","label"];function al(){return{transforms:[PA],enter:{literalAutolink:RA,literalAutolinkEmail:ol,literalAutolinkHttp:ol,literalAutolinkWww:ol},exit:{literalAutolink:LA,literalAutolinkEmail:NA,literalAutolinkHttp:FA,literalAutolinkWww:OA}}}function sl(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:nl,notInConstruct:il},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:nl,notInConstruct:il},{character:":",before:"[ps]",after:"\\/",inConstruct:nl,notInConstruct:il}]}}function RA(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ol(e){this.config.enter.autolinkProtocol.call(this,e)}function FA(e){this.config.exit.autolinkProtocol.call(this,e)}function OA(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function NA(e){this.config.exit.autolinkEmail.call(this,e)}function LA(e){this.exit(e)}function PA(e){rl(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,MA],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),BA]],{ignore:["link","linkReference"]})}function MA(e,t,r,n,i){let o="";if(!em(i)||(/^w/i.test(t)&&(r=t+r,t="",o="http://"),!UA(r)))return!1;let a=zA(r+n);if(!a[0])return!1;let s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function BA(e,t,r,n){return!em(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function UA(e){let t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function zA(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")"),i=el(e,"("),o=el(e,")");for(;n!==-1&&i>o;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),o++;return[e,r]}function em(e,t){let r=e.input.charCodeAt(e.index-1);return(e.index===0||$t(r)||pn(r))&&(!t||r!==47)}tm.peek=ZA;function jA(){this.buffer()}function $A(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function qA(){this.buffer()}function VA(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function GA(e){let t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Xe(this.sliceSerialize(e)).toLowerCase(),r.label=t}function HA(e){this.exit(e)}function WA(e){let t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Xe(this.sliceSerialize(e)).toLowerCase(),r.label=t}function KA(e){this.exit(e)}function ZA(){return"["}function tm(e,t,r,n){let i=r.createTracker(n),o=i.move("[^"),a=r.enter("footnoteReference"),s=r.enter("reference");return o+=i.move(r.safe(r.associationId(e),{after:"]",before:o})),s(),a(),o+=i.move("]"),o}function ul(){return{enter:{gfmFootnoteCallString:jA,gfmFootnoteCall:$A,gfmFootnoteDefinitionLabelString:qA,gfmFootnoteDefinition:VA},exit:{gfmFootnoteCallString:GA,gfmFootnoteCall:HA,gfmFootnoteDefinitionLabelString:WA,gfmFootnoteDefinition:KA}}}function ll(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:tm},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,i,o,a){let s=o.createTracker(a),u=s.move("[^"),l=o.enter("footnoteDefinition"),c=o.enter("label");return u+=s.move(o.safe(o.associationId(n),{before:u,after:"]"})),c(),u+=s.move("]:"),n.children&&n.children.length>0&&(s.shift(4),u+=s.move((t?`
|
|
37
|
+
`:" ")+o.indentLines(o.containerFlow(n,s.current()),t?rm:YA))),l(),u}}function YA(e,t,r){return t===0?e:rm(e,t,r)}function rm(e,t,r){return(r?"":" ")+e}var XA=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];nm.peek=eT;function cl(){return{canContainEols:["delete"],enter:{strikethrough:JA},exit:{strikethrough:QA}}}function fl(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:XA}],handlers:{delete:nm}}}function JA(e){this.enter({type:"delete",children:[]},e)}function QA(e){this.exit(e)}function nm(e,t,r,n){let i=r.createTracker(n),o=r.enter("strikethrough"),a=i.move("~~");return a+=r.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function eT(){return"~"}function tT(e){return e.length}function om(e,t){let r=t||{},n=(r.align||[]).concat(),i=r.stringLength||tT,o=[],a=[],s=[],u=[],l=0,c=-1;for(;++c<e.length;){let E=[],C=[],x=-1;for(e[c].length>l&&(l=e[c].length);++x<e[c].length;){let k=rT(e[c][x]);if(r.alignDelimiters!==!1){let y=i(k);C[x]=y,(u[x]===void 0||y>u[x])&&(u[x]=y)}E.push(k)}a[c]=E,s[c]=C}let f=-1;if(typeof n=="object"&&"length"in n)for(;++f<l;)o[f]=im(n[f]);else{let E=im(n);for(;++f<l;)o[f]=E}f=-1;let p=[],m=[];for(;++f<l;){let E=o[f],C="",x="";E===99?(C=":",x=":"):E===108?C=":":E===114&&(x=":");let k=r.alignDelimiters===!1?1:Math.max(1,u[f]-C.length-x.length),y=C+"-".repeat(k)+x;r.alignDelimiters!==!1&&(k=C.length+k+x.length,k>u[f]&&(u[f]=k),m[f]=k),p[f]=y}a.splice(1,0,p),s.splice(1,0,m),c=-1;let h=[];for(;++c<a.length;){let E=a[c],C=s[c];f=-1;let x=[];for(;++f<l;){let k=E[f]||"",y="",S="";if(r.alignDelimiters!==!1){let _=u[f]-(C[f]||0),A=o[f];A===114?y=" ".repeat(_):A===99?_%2?(y=" ".repeat(_/2+.5),S=" ".repeat(_/2-.5)):(y=" ".repeat(_/2),S=y):S=" ".repeat(_)}r.delimiterStart!==!1&&!f&&x.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&k==="")&&(r.delimiterStart!==!1||f)&&x.push(" "),r.alignDelimiters!==!1&&x.push(y),x.push(k),r.alignDelimiters!==!1&&x.push(S),r.padding!==!1&&x.push(" "),(r.delimiterEnd!==!1||f!==l-1)&&x.push("|")}h.push(r.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return h.join(`
|
|
38
|
+
`)}function rT(e){return e==null?"":String(e)}function im(e){let t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function ml(){return{enter:{table:nT,tableData:am,tableHeader:am,tableRow:oT},exit:{codeText:aT,table:iT,tableData:pl,tableHeader:pl,tableRow:pl}}}function nT(e){let t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function iT(e){this.exit(e),this.data.inTable=void 0}function oT(e){this.enter({type:"tableRow",children:[]},e)}function pl(e){this.exit(e)}function am(e){this.enter({type:"tableCell",children:[]},e)}function aT(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,sT));let r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function sT(e,t){return t==="|"?t:e}function dl(e){let t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,o=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
43
39
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:u,tableRow:s}};function a(m,h,E,C){return l(c(m,E,C),m.align)}function s(m,h,E,C){let x=f(m,E,C),k=l([x]);return k.slice(0,k.indexOf(`
|
|
44
|
-
`))}function u(m,h,E,C){let x=E.enter("tableCell"),k=E.enter("phrasing"),y=E.containerPhrasing(m,{...C,before:o,after:o});return k(),x(),y}function l(m,h){return Cm(m,{align:h,alignDelimiters:n,padding:r,stringLength:i})}function c(m,h,E){let C=m.children,x=-1,k=[],y=h.enter("table");for(;++x<C.length;)k[x]=f(C[x],h,E);return y(),k}function f(m,h,E){let C=m.children,x=-1,k=[],y=h.enter("tableRow");for(;++x<C.length;)k[x]=u(C[x],m,h,E);return y(),k}function p(m,h,E){let C=kn.inlineCode(m,h,E);return E.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function wl(){return{exit:{taskListCheckValueChecked:Sm,taskListCheckValueUnchecked:Sm,paragraph:BT}}}function Sl(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:UT}}}function Sm(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function BT(e){let t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){let r=this.stack[this.stack.length-1];r.type;let n=r.children[0];if(n&&n.type==="text"){let i=t.children,o=-1,a;for(;++o<i.length;){let s=i[o];if(s.type==="paragraph"){a=s;break}}a===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(e)}function UT(e,t,r,n){let i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=r.createTracker(n);o&&s.move(a);let u=kn.listItem(e,t,r,{...n,...s.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(c){return c+a}}function vl(){return[gl(),yl(),bl(),Tl(),wl()]}function _l(e){return{extensions:[xl(),El(e),kl(),Cl(e),Sl()]}}var zT={tokenize:GT,partial:!0},vm={tokenize:HT,partial:!0},_m={tokenize:WT,partial:!0},Im={tokenize:KT,partial:!0},jT={tokenize:ZT,partial:!0},Rm={name:"wwwAutolink",tokenize:qT,previous:Fm},Dm={name:"protocolAutolink",tokenize:VT,previous:Om},xr={name:"emailAutolink",tokenize:$T,previous:Nm},Zt={};function Rl(){return{text:Zt}}var Tn=48;for(;Tn<123;)Zt[Tn]=xr,Tn++,Tn===58?Tn=65:Tn===91&&(Tn=97);Zt[43]=xr;Zt[45]=xr;Zt[46]=xr;Zt[95]=xr;Zt[72]=[xr,Dm];Zt[104]=[xr,Dm];Zt[87]=[xr,Rm];Zt[119]=[xr,Rm];function $T(e,t,r){let n=this,i,o;return a;function a(f){return!Il(f)||!Nm.call(n,n.previous)||Dl(n.events)?r(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return Il(f)?(e.consume(f),s):f===64?(e.consume(f),u):r(f)}function u(f){return f===46?e.check(jT,c,l)(f):f===45||f===95||$e(f)?(o=!0,e.consume(f),u):c(f)}function l(f){return e.consume(f),i=!0,u}function c(f){return o&&i&&je(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):r(f)}}function qT(e,t,r){let n=this;return i;function i(a){return a!==87&&a!==119||!Fm.call(n,n.previous)||Dl(n.events)?r(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(zT,e.attempt(vm,e.attempt(_m,o),r),r)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function VT(e,t,r){let n=this,i="",o=!1;return a;function a(f){return(f===72||f===104)&&Om.call(n,n.previous)&&!Dl(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):r(f)}function s(f){if(je(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),s;if(f===58){let p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(f),u}return r(f)}function u(f){return f===47?(e.consume(f),o?l:(o=!0,u)):r(f)}function l(f){return f===null||hn(f)||Y(f)||Ht(f)||gn(f)?r(f):e.attempt(vm,e.attempt(_m,c),r)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function GT(e,t,r){let n=0;return i;function i(a){return(a===87||a===119)&&n<3?(n++,e.consume(a),i):a===46&&n===3?(e.consume(a),o):r(a)}function o(a){return a===null?r(a):t(a)}}function HT(e,t,r){let n,i,o;return a;function a(l){return l===46||l===95?e.check(Im,u,s)(l):l===null||Y(l)||Ht(l)||l!==45&&gn(l)?u(l):(o=!0,e.consume(l),a)}function s(l){return l===95?n=!0:(i=n,n=void 0),e.consume(l),a}function u(l){return i||n||!o?r(l):t(l)}}function WT(e,t){let r=0,n=0;return i;function i(a){return a===40?(r++,e.consume(a),i):a===41&&n<r?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(Im,t,o)(a):a===null||Y(a)||Ht(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&n++,e.consume(a),i}}function KT(e,t,r){return n;function n(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),n):s===38?(e.consume(s),o):s===93?(e.consume(s),i):s===60||s===null||Y(s)||Ht(s)?t(s):r(s)}function i(s){return s===null||s===40||s===91||Y(s)||Ht(s)?t(s):n(s)}function o(s){return je(s)?a(s):r(s)}function a(s){return s===59?(e.consume(s),n):je(s)?(e.consume(s),a):r(s)}}function ZT(e,t,r){return n;function n(o){return e.consume(o),i}function i(o){return $e(o)?r(o):t(o)}}function Fm(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Y(e)}function Om(e){return!je(e)}function Nm(e){return!(e===47||Il(e))}function Il(e){return e===43||e===45||e===46||e===95||$e(e)}function Dl(e){let t=e.length,r=!1;for(;t--;){let n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}var YT={tokenize:nC,partial:!0};function Fl(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:eC,continuation:{tokenize:tC},exit:rC}},text:{91:{name:"gfmFootnoteCall",tokenize:QT},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:XT,resolveTo:JT}}}}function XT(e,t,r){let n=this,i=n.events.length,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),a;for(;i--;){let u=n.events[i][1];if(u.type==="labelImage"){a=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return s;function s(u){if(!a||!a._balanced)return r(u);let l=Qe(n.sliceSerialize({start:a.end,end:n.now()}));return l.codePointAt(0)!==94||!o.includes(l.slice(1))?r(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function JT(e,t){let r=e.length,n;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){n=e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";let i={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},u=[e[r+1],e[r+2],["enter",i,t],e[r+3],e[r+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(r,e.length-r+1,...u),e}function QT(e,t,r){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o=0,a;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?r(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(f){if(o>999||f===93&&!a||f===null||f===91||Y(f))return r(f);if(f===93){e.exit("chunkString");let p=e.exit("gfmFootnoteCallString");return i.includes(Qe(n.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(f)}return Y(f)||(a=!0),o++,e.consume(f),f===92?c:l}function c(f){return f===91||f===92||f===93?(e.consume(f),o++,l):l(f)}}function eC(e,t,r){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o,a=0,s;return u;function u(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):r(h)}function c(h){if(a>999||h===93&&!s||h===null||h===91||Y(h))return r(h);if(h===93){e.exit("chunkString");let E=e.exit("gfmFootnoteDefinitionLabelString");return o=Qe(n.sliceSerialize(E)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Y(h)||(s=!0),a++,e.consume(h),h===92?f:c}function f(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}function p(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),i.includes(o)||i.push(o),U(e,m,"gfmFootnoteDefinitionWhitespace")):r(h)}function m(h){return t(h)}}function tC(e,t,r){return e.check(Wt,t,e.attempt(YT,t,r))}function rC(e){e.exit("gfmFootnoteDefinition")}function nC(e,t,r){let n=this;return U(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){let a=n.events[n.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(o):r(o)}}function Ol(e){let r=(e||{}).singleTilde,n={name:"strikethrough",tokenize:o,resolveAll:i};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(a,s){let u=-1;for(;++u<a.length;)if(a[u][0]==="enter"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._close){let l=u;for(;l--;)if(a[l][0]==="exit"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._open&&a[u][1].end.offset-a[u][1].start.offset===a[l][1].end.offset-a[l][1].start.offset){a[u][1].type="strikethroughSequence",a[l][1].type="strikethroughSequence";let c={type:"strikethrough",start:Object.assign({},a[l][1].start),end:Object.assign({},a[u][1].end)},f={type:"strikethroughText",start:Object.assign({},a[l][1].end),end:Object.assign({},a[u][1].start)},p=[["enter",c,s],["enter",a[l][1],s],["exit",a[l][1],s],["enter",f,s]],m=s.parser.constructs.insideSpan.null;m&&De(p,p.length,0,Ir(m,a.slice(l+1,u),s)),De(p,p.length,0,[["exit",f,s],["enter",a[u][1],s],["exit",a[u][1],s],["exit",c,s]]),De(a,l-1,u-l+3,p),u=l+p.length-2;break}}for(u=-1;++u<a.length;)a[u][1].type==="strikethroughSequenceTemporary"&&(a[u][1].type="data");return a}function o(a,s,u){let l=this.previous,c=this.events,f=0;return p;function p(h){return l===126&&c[c.length-1][1].type!=="characterEscape"?u(h):(a.enter("strikethroughSequenceTemporary"),m(h))}function m(h){let E=gr(l);if(h===126)return f>1?u(h):(a.consume(h),f++,m);if(f<2&&!r)return u(h);let C=a.exit("strikethroughSequenceTemporary"),x=gr(h);return C._open=!x||x===2&&!!E,C._close=!E||E===2&&!!x,s(h)}}}var wa=class{constructor(){this.map=[]}add(t,r,n){iC(this,t,r,n)}consume(t){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let r=this.map.length,n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push(t.slice()),t.length=0;let i=n.pop();for(;i;){for(let o of i)t.push(o);i=n.pop()}this.map.length=0}};function iC(e,t,r,n){let i=0;if(!(r===0&&n.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=r,e.map[i][2].push(...n);return}i+=1}e.map.push([t,r,n])}}function Lm(e,t){let r=!1,n=[];for(;t<e.length;){let i=e[t];if(r){if(i[0]==="enter")i[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-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);t+=1}return n}function Nl(){return{flow:{null:{name:"table",tokenize:oC,resolveAll:aC}}}}function oC(e,t,r){let n=this,i=0,o=0,a;return s;function s(b){let ce=n.events.length-1;for(;ce>-1;){let V=n.events[ce][1].type;if(V==="lineEnding"||V==="linePrefix")ce--;else break}let Q=ce>-1?n.events[ce][1].type:null,B=Q==="tableHead"||Q==="tableRow"?A:u;return B===A&&n.parser.lazy[n.now().line]?r(b):B(b)}function u(b){return e.enter("tableHead"),e.enter("tableRow"),l(b)}function l(b){return b===124||(a=!0,o+=1),c(b)}function c(b){return b===null?r(b):R(b)?o>1?(o=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),m):r(b):z(b)?U(e,c,"whitespace")(b):(o+=1,a&&(a=!1,i+=1),b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),a=!0,c):(e.enter("data"),f(b)))}function f(b){return b===null||b===124||Y(b)?(e.exit("data"),c(b)):(e.consume(b),b===92?p:f)}function p(b){return b===92||b===124?(e.consume(b),f):f(b)}function m(b){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(b):(e.enter("tableDelimiterRow"),a=!1,z(b)?U(e,h,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):h(b))}function h(b){return b===45||b===58?C(b):b===124?(a=!0,e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),E):v(b)}function E(b){return z(b)?U(e,C,"whitespace")(b):C(b)}function C(b){return b===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),x):b===45?(o+=1,x(b)):b===null||R(b)?S(b):v(b)}function x(b){return b===45?(e.enter("tableDelimiterFiller"),k(b)):v(b)}function k(b){return b===45?(e.consume(b),k):b===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(b))}function y(b){return z(b)?U(e,S,"whitespace")(b):S(b)}function S(b){return b===124?h(b):b===null||R(b)?!a||i!==o?v(b):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(b)):v(b)}function v(b){return r(b)}function A(b){return e.enter("tableRow"),te(b)}function te(b){return b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),te):b===null||R(b)?(e.exit("tableRow"),t(b)):z(b)?U(e,te,"whitespace")(b):(e.enter("data"),J(b))}function J(b){return b===null||b===124||Y(b)?(e.exit("data"),te(b)):(e.consume(b),b===92?re:J)}function re(b){return b===92||b===124?(e.consume(b),J):J(b)}}function aC(e,t){let r=-1,n=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,u=0,l,c,f,p=new wa;for(;++r<e.length;){let m=e[r],h=m[1];m[0]==="enter"?h.type==="tableHead"?(s=!1,u!==0&&(Pm(p,t,u,l,c),c=void 0,u=0),l={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(r,0,[["enter",l,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(n=!0,f=void 0,o=[0,0,0,0],a=[0,r+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(r,0,[["enter",c,t]])),i=h.type==="tableDelimiterRow"?2:c?3:1):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(n=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],f=Sa(p,t,o,i,void 0,f),o=[0,0,0,0]),a[2]=r)):h.type==="tableCellDivider"&&(n?n=!1:(o[1]!==0&&(a[0]=a[1],f=Sa(p,t,o,i,void 0,f)),o=a,a=[o[1],r,0,0])):h.type==="tableHead"?(s=!0,u=r):h.type==="tableRow"||h.type==="tableDelimiterRow"?(u=r,o[1]!==0?(a[0]=a[1],f=Sa(p,t,o,i,r,f)):a[1]!==0&&(f=Sa(p,t,a,i,r,f)),i=0):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(a[3]=r)}for(u!==0&&Pm(p,t,u,l,c),p.consume(t.events),r=-1;++r<t.events.length;){let m=t.events[r];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=Lm(t.events,r))}return e}function Sa(e,t,r,n,i,o){let a=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",s="tableContent";r[0]!==0&&(o.end=Object.assign({},ni(t.events,r[0])),e.add(r[0],0,[["exit",o,t]]));let u=ni(t.events,r[1]);if(o={type:a,start:Object.assign({},u),end:Object.assign({},u)},e.add(r[1],0,[["enter",o,t]]),r[2]!==0){let l=ni(t.events,r[2]),c=ni(t.events,r[3]),f={type:s,start:Object.assign({},l),end:Object.assign({},c)};if(e.add(r[2],0,[["enter",f,t]]),n!==2){let p=t.events[r[2]],m=t.events[r[3]];if(p[1].end=Object.assign({},m[1].end),p[1].type="chunkText",p[1].contentType="text",r[3]>r[2]+1){let h=r[2]+1,E=r[3]-r[2]-1;e.add(h,E,[])}}e.add(r[3]+1,0,[["exit",f,t]])}return i!==void 0&&(o.end=Object.assign({},ni(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Pm(e,t,r,n,i){let o=[],a=ni(t.events,r);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),n.end=Object.assign({},a),o.push(["exit",n,t]),e.add(r+1,0,o)}function ni(e,t){let r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}var sC={name:"tasklistCheck",tokenize:uC};function Ll(){return{text:{91:sC}}}function uC(e,t,r){let n=this;return i;function i(u){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),o)}function o(u){return Y(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),a):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),a):r(u)}function a(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):r(u)}function s(u){return R(u)?t(u):z(u)?e.check({tokenize:lC},t,r)(u):r(u)}}function lC(e,t,r){return U(e,n,"whitespace");function n(i){return i===null?r(i):t(i)}}function Mm(e){return ta([Rl(),Fl(),Ol(e),Nl(),Ll()])}var cC={};function Dr(e){let t=this,r=e||cC,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(Mm(r)),o.push(vl()),a.push(_l(r))}import{mdatCheck as gC,mdatClean as Um,mdatExpand as xC,mdatSplit as zm}from"remark-mdat";import fC from"node:fs";import pC from"node:path";import{VFile as mC}from"vfile";function Pl(e,t,r){let n=Bm(e);if(!r&&typeof t=="function"&&(r=t,t=void 0),!r)return new Promise(o);o(i,r);function i(a){r(void 0,a)}function o(a,s){let u;try{u=pC.resolve(n.cwd,n.path)}catch(c){return s(c)}fC.readFile(u,t,l);function l(c,f){c?s(c):(n.value=f,a(n))}}}function Bm(e){return typeof e=="string"||e instanceof URL?e={path:e}:hC(e)&&(e={path:new TextDecoder().decode(e)}),dC(e)?e:new mC(e)}function dC(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function hC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}import{VFile as yC}from"vfile";async function Fr(e,t,r,n,i,o,a){let s=await t({additionalConfig:o,additionalRules:a});o=s;let u=await Cu(),l=Zf(e),c=Wf(l,i,n,"md"),f=[],p=r(s,u);for(let{input:m,name:h,output:E}of c){let C=await Pl(m),x=await p.process(C);x.dirname=E,x.basename=h,f.push(x)}return f}async function Cn(e,t,r,n,i){let o=await t({additionalConfig:n,additionalRules:i});n=o;let a=await Cu();return r(o,a).process(new yC(e))}function ii(e,t){return ri().use({settings:{bullet:"-",emphasis:"_"}}).use(Dr).use(t).use(()=>async function(n,i){zm(n,i),Um(n,i,e),await xC(n,i,e)})}function uo(e,t){return ri().use({settings:{bullet:"-",emphasis:"_"}}).use(Dr).use(t).use(()=>function(n,i){zm(n,i),Um(n,i,e)})}function oi(e,t){return ri().use({settings:{bullet:"-",emphasis:"_"}}).use(Dr).use(t).use(()=>async function(n,i){await gC(n,i,{...e,paranoid:!1})})}async function EC(e,t,r,n,i){return Fr(e,Ut,ii,t,r,n,i)}async function bC(e,t,r){return Cn(e,Ut,ii,t,r)}async function kC(e,t,r,n,i){return Fr(e,Ut,oi,t,r,n,i)}async function AC(e,t,r){return Cn(e,Ut,oi,t,r)}async function TC(e,t,r,n,i){return Fr(e,Ut,uo,t,r,n,i)}async function CC(e,t,r){return Cn(e,Ut,uo,t,r)}var va={badges:{async content(e){let t=L.object({custom:L.record(L.object({image:L.string(),link:L.string()})).optional(),npm:L.array(L.string()).optional()}).optional().parse(e),r=await Ct(),{name:n}=r,i=[];if(!r.private&&r.publishConfig?.access==="public"&&i.push(`[](https://npmjs.com/package/${n})`),t?.npm!==void 0)for(let a of t.npm)i.push(`[](https://npmjs.com/package/${a})`);let{license:o}=r;if(o!==void 0&&i.push(`[](https://opensource.org/licenses/${o})`),t?.custom!==void 0)for(let[a,{image:s,link:u}]of Object.entries(t.custom))i.push(`[](${u})`);return i.join(`
|
|
45
|
-
`)},order:3}};import{globby as
|
|
40
|
+
`))}function u(m,h,E,C){let x=E.enter("tableCell"),k=E.enter("phrasing"),y=E.containerPhrasing(m,{...C,before:o,after:o});return k(),x(),y}function l(m,h){return om(m,{align:h,alignDelimiters:n,padding:r,stringLength:i})}function c(m,h,E){let C=m.children,x=-1,k=[],y=h.enter("table");for(;++x<C.length;)k[x]=f(C[x],h,E);return y(),k}function f(m,h,E){let C=m.children,x=-1,k=[],y=h.enter("tableRow");for(;++x<C.length;)k[x]=u(C[x],m,h,E);return y(),k}function p(m,h,E){let C=xn.inlineCode(m,h,E);return E.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function hl(){return{exit:{taskListCheckValueChecked:sm,taskListCheckValueUnchecked:sm,paragraph:uT}}}function gl(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:lT}}}function sm(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function uT(e){let t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){let r=this.stack[this.stack.length-1];r.type;let n=r.children[0];if(n&&n.type==="text"){let i=t.children,o=-1,a;for(;++o<i.length;){let s=i[o];if(s.type==="paragraph"){a=s;break}}a===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(e)}function lT(e,t,r,n){let i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=r.createTracker(n);o&&s.move(a);let u=xn.listItem(e,t,r,{...n,...s.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(c){return c+a}}function xl(){return[al(),ul(),cl(),ml(),hl()]}function yl(e){return{extensions:[sl(),ll(e),fl(),dl(e),gl()]}}var cT={tokenize:hT,partial:!0},um={tokenize:gT,partial:!0},lm={tokenize:xT,partial:!0},cm={tokenize:yT,partial:!0},fT={tokenize:ET,partial:!0},fm={name:"wwwAutolink",tokenize:mT,previous:mm},pm={name:"protocolAutolink",tokenize:dT,previous:dm},mr={name:"emailAutolink",tokenize:pT,previous:hm},Gt={};function bl(){return{text:Gt}}var En=48;for(;En<123;)Gt[En]=mr,En++,En===58?En=65:En===91&&(En=97);Gt[43]=mr;Gt[45]=mr;Gt[46]=mr;Gt[95]=mr;Gt[72]=[mr,pm];Gt[104]=[mr,pm];Gt[87]=[mr,fm];Gt[119]=[mr,fm];function pT(e,t,r){let n=this,i,o;return a;function a(f){return!El(f)||!hm.call(n,n.previous)||kl(n.events)?r(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return El(f)?(e.consume(f),s):f===64?(e.consume(f),u):r(f)}function u(f){return f===46?e.check(fT,c,l)(f):f===45||f===95||ze(f)?(o=!0,e.consume(f),u):c(f)}function l(f){return e.consume(f),i=!0,u}function c(f){return o&&i&&Ue(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):r(f)}}function mT(e,t,r){let n=this;return i;function i(a){return a!==87&&a!==119||!mm.call(n,n.previous)||kl(n.events)?r(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(cT,e.attempt(um,e.attempt(lm,o),r),r)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function dT(e,t,r){let n=this,i="",o=!1;return a;function a(f){return(f===72||f===104)&&dm.call(n,n.previous)&&!kl(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):r(f)}function s(f){if(Ue(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),s;if(f===58){let p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(f),u}return r(f)}function u(f){return f===47?(e.consume(f),o?l:(o=!0,u)):r(f)}function l(f){return f===null||fn(f)||Y(f)||$t(f)||pn(f)?r(f):e.attempt(um,e.attempt(lm,c),r)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function hT(e,t,r){let n=0;return i;function i(a){return(a===87||a===119)&&n<3?(n++,e.consume(a),i):a===46&&n===3?(e.consume(a),o):r(a)}function o(a){return a===null?r(a):t(a)}}function gT(e,t,r){let n,i,o;return a;function a(l){return l===46||l===95?e.check(cm,u,s)(l):l===null||Y(l)||$t(l)||l!==45&&pn(l)?u(l):(o=!0,e.consume(l),a)}function s(l){return l===95?n=!0:(i=n,n=void 0),e.consume(l),a}function u(l){return i||n||!o?r(l):t(l)}}function xT(e,t){let r=0,n=0;return i;function i(a){return a===40?(r++,e.consume(a),i):a===41&&n<r?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(cm,t,o)(a):a===null||Y(a)||$t(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&n++,e.consume(a),i}}function yT(e,t,r){return n;function n(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),n):s===38?(e.consume(s),o):s===93?(e.consume(s),i):s===60||s===null||Y(s)||$t(s)?t(s):r(s)}function i(s){return s===null||s===40||s===91||Y(s)||$t(s)?t(s):n(s)}function o(s){return Ue(s)?a(s):r(s)}function a(s){return s===59?(e.consume(s),n):Ue(s)?(e.consume(s),a):r(s)}}function ET(e,t,r){return n;function n(o){return e.consume(o),i}function i(o){return ze(o)?r(o):t(o)}}function mm(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Y(e)}function dm(e){return!Ue(e)}function hm(e){return!(e===47||El(e))}function El(e){return e===43||e===45||e===46||e===95||ze(e)}function kl(e){let t=e.length,r=!1;for(;t--;){let n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}var bT={tokenize:_T,partial:!0};function Al(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:CT,continuation:{tokenize:wT},exit:ST}},text:{91:{name:"gfmFootnoteCall",tokenize:TT},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:kT,resolveTo:AT}}}}function kT(e,t,r){let n=this,i=n.events.length,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),a;for(;i--;){let u=n.events[i][1];if(u.type==="labelImage"){a=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return s;function s(u){if(!a||!a._balanced)return r(u);let l=Xe(n.sliceSerialize({start:a.end,end:n.now()}));return l.codePointAt(0)!==94||!o.includes(l.slice(1))?r(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function AT(e,t){let r=e.length,n;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){n=e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";let i={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},u=[e[r+1],e[r+2],["enter",i,t],e[r+3],e[r+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(r,e.length-r+1,...u),e}function TT(e,t,r){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o=0,a;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?r(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(f){if(o>999||f===93&&!a||f===null||f===91||Y(f))return r(f);if(f===93){e.exit("chunkString");let p=e.exit("gfmFootnoteCallString");return i.includes(Xe(n.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(f)}return Y(f)||(a=!0),o++,e.consume(f),f===92?c:l}function c(f){return f===91||f===92||f===93?(e.consume(f),o++,l):l(f)}}function CT(e,t,r){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o,a=0,s;return u;function u(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):r(h)}function c(h){if(a>999||h===93&&!s||h===null||h===91||Y(h))return r(h);if(h===93){e.exit("chunkString");let E=e.exit("gfmFootnoteDefinitionLabelString");return o=Xe(n.sliceSerialize(E)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Y(h)||(s=!0),a++,e.consume(h),h===92?f:c}function f(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}function p(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),i.includes(o)||i.push(o),U(e,m,"gfmFootnoteDefinitionWhitespace")):r(h)}function m(h){return t(h)}}function wT(e,t,r){return e.check(qt,t,e.attempt(bT,t,r))}function ST(e){e.exit("gfmFootnoteDefinition")}function _T(e,t,r){let n=this;return U(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){let a=n.events[n.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(o):r(o)}}function Tl(e){let r=(e||{}).singleTilde,n={name:"strikethrough",tokenize:o,resolveAll:i};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(a,s){let u=-1;for(;++u<a.length;)if(a[u][0]==="enter"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._close){let l=u;for(;l--;)if(a[l][0]==="exit"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._open&&a[u][1].end.offset-a[u][1].start.offset===a[l][1].end.offset-a[l][1].start.offset){a[u][1].type="strikethroughSequence",a[l][1].type="strikethroughSequence";let c={type:"strikethrough",start:Object.assign({},a[l][1].start),end:Object.assign({},a[u][1].end)},f={type:"strikethroughText",start:Object.assign({},a[l][1].end),end:Object.assign({},a[u][1].start)},p=[["enter",c,s],["enter",a[l][1],s],["exit",a[l][1],s],["enter",f,s]],m=s.parser.constructs.insideSpan.null;m&&Ie(p,p.length,0,wr(m,a.slice(l+1,u),s)),Ie(p,p.length,0,[["exit",f,s],["enter",a[u][1],s],["exit",a[u][1],s],["exit",c,s]]),Ie(a,l-1,u-l+3,p),u=l+p.length-2;break}}for(u=-1;++u<a.length;)a[u][1].type==="strikethroughSequenceTemporary"&&(a[u][1].type="data");return a}function o(a,s,u){let l=this.previous,c=this.events,f=0;return p;function p(h){return l===126&&c[c.length-1][1].type!=="characterEscape"?u(h):(a.enter("strikethroughSequenceTemporary"),m(h))}function m(h){let E=pr(l);if(h===126)return f>1?u(h):(a.consume(h),f++,m);if(f<2&&!r)return u(h);let C=a.exit("strikethroughSequenceTemporary"),x=pr(h);return C._open=!x||x===2&&!!E,C._close=!E||E===2&&!!x,s(h)}}}var Ea=class{constructor(){this.map=[]}add(t,r,n){vT(this,t,r,n)}consume(t){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let r=this.map.length,n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push(t.slice()),t.length=0;let i=n.pop();for(;i;){for(let o of i)t.push(o);i=n.pop()}this.map.length=0}};function vT(e,t,r,n){let i=0;if(!(r===0&&n.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=r,e.map[i][2].push(...n);return}i+=1}e.map.push([t,r,n])}}function gm(e,t){let r=!1,n=[];for(;t<e.length;){let i=e[t];if(r){if(i[0]==="enter")i[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-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);t+=1}return n}function Cl(){return{flow:{null:{name:"table",tokenize:IT,resolveAll:DT}}}}function IT(e,t,r){let n=this,i=0,o=0,a;return s;function s(b){let ce=n.events.length-1;for(;ce>-1;){let V=n.events[ce][1].type;if(V==="lineEnding"||V==="linePrefix")ce--;else break}let Q=ce>-1?n.events[ce][1].type:null,B=Q==="tableHead"||Q==="tableRow"?A:u;return B===A&&n.parser.lazy[n.now().line]?r(b):B(b)}function u(b){return e.enter("tableHead"),e.enter("tableRow"),l(b)}function l(b){return b===124||(a=!0,o+=1),c(b)}function c(b){return b===null?r(b):D(b)?o>1?(o=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),m):r(b):z(b)?U(e,c,"whitespace")(b):(o+=1,a&&(a=!1,i+=1),b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),a=!0,c):(e.enter("data"),f(b)))}function f(b){return b===null||b===124||Y(b)?(e.exit("data"),c(b)):(e.consume(b),b===92?p:f)}function p(b){return b===92||b===124?(e.consume(b),f):f(b)}function m(b){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(b):(e.enter("tableDelimiterRow"),a=!1,z(b)?U(e,h,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):h(b))}function h(b){return b===45||b===58?C(b):b===124?(a=!0,e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),E):_(b)}function E(b){return z(b)?U(e,C,"whitespace")(b):C(b)}function C(b){return b===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),x):b===45?(o+=1,x(b)):b===null||D(b)?S(b):_(b)}function x(b){return b===45?(e.enter("tableDelimiterFiller"),k(b)):_(b)}function k(b){return b===45?(e.consume(b),k):b===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(b))}function y(b){return z(b)?U(e,S,"whitespace")(b):S(b)}function S(b){return b===124?h(b):b===null||D(b)?!a||i!==o?_(b):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(b)):_(b)}function _(b){return r(b)}function A(b){return e.enter("tableRow"),te(b)}function te(b){return b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),te):b===null||D(b)?(e.exit("tableRow"),t(b)):z(b)?U(e,te,"whitespace")(b):(e.enter("data"),J(b))}function J(b){return b===null||b===124||Y(b)?(e.exit("data"),te(b)):(e.consume(b),b===92?re:J)}function re(b){return b===92||b===124?(e.consume(b),J):J(b)}}function DT(e,t){let r=-1,n=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,u=0,l,c,f,p=new Ea;for(;++r<e.length;){let m=e[r],h=m[1];m[0]==="enter"?h.type==="tableHead"?(s=!1,u!==0&&(xm(p,t,u,l,c),c=void 0,u=0),l={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(r,0,[["enter",l,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(n=!0,f=void 0,o=[0,0,0,0],a=[0,r+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(r,0,[["enter",c,t]])),i=h.type==="tableDelimiterRow"?2:c?3:1):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(n=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],f=ba(p,t,o,i,void 0,f),o=[0,0,0,0]),a[2]=r)):h.type==="tableCellDivider"&&(n?n=!1:(o[1]!==0&&(a[0]=a[1],f=ba(p,t,o,i,void 0,f)),o=a,a=[o[1],r,0,0])):h.type==="tableHead"?(s=!0,u=r):h.type==="tableRow"||h.type==="tableDelimiterRow"?(u=r,o[1]!==0?(a[0]=a[1],f=ba(p,t,o,i,r,f)):a[1]!==0&&(f=ba(p,t,a,i,r,f)),i=0):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(a[3]=r)}for(u!==0&&xm(p,t,u,l,c),p.consume(t.events),r=-1;++r<t.events.length;){let m=t.events[r];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=gm(t.events,r))}return e}function ba(e,t,r,n,i,o){let a=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",s="tableContent";r[0]!==0&&(o.end=Object.assign({},Xn(t.events,r[0])),e.add(r[0],0,[["exit",o,t]]));let u=Xn(t.events,r[1]);if(o={type:a,start:Object.assign({},u),end:Object.assign({},u)},e.add(r[1],0,[["enter",o,t]]),r[2]!==0){let l=Xn(t.events,r[2]),c=Xn(t.events,r[3]),f={type:s,start:Object.assign({},l),end:Object.assign({},c)};if(e.add(r[2],0,[["enter",f,t]]),n!==2){let p=t.events[r[2]],m=t.events[r[3]];if(p[1].end=Object.assign({},m[1].end),p[1].type="chunkText",p[1].contentType="text",r[3]>r[2]+1){let h=r[2]+1,E=r[3]-r[2]-1;e.add(h,E,[])}}e.add(r[3]+1,0,[["exit",f,t]])}return i!==void 0&&(o.end=Object.assign({},Xn(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function xm(e,t,r,n,i){let o=[],a=Xn(t.events,r);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),n.end=Object.assign({},a),o.push(["exit",n,t]),e.add(r+1,0,o)}function Xn(e,t){let r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}var RT={name:"tasklistCheck",tokenize:FT};function wl(){return{text:{91:RT}}}function FT(e,t,r){let n=this;return i;function i(u){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),o)}function o(u){return Y(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),a):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),a):r(u)}function a(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):r(u)}function s(u){return D(u)?t(u):z(u)?e.check({tokenize:OT},t,r)(u):r(u)}}function OT(e,t,r){return U(e,n,"whitespace");function n(i){return i===null?r(i):t(i)}}function ym(e){return Zo([bl(),Al(),Tl(e),Cl(),wl()])}var NT={};function _r(e){let t=this,r=e||NT,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(ym(r)),o.push(xl()),a.push(yl(r))}import{mdatCheck as zT,mdatClean as bm,mdatExpand as jT,mdatSplit as km}from"remark-mdat";import LT from"node:fs";import PT from"node:path";import{VFile as MT}from"vfile";function Sl(e,t,r){let n=Em(e);if(!r&&typeof t=="function"&&(r=t,t=void 0),!r)return new Promise(o);o(i,r);function i(a){r(void 0,a)}function o(a,s){let u;try{u=PT.resolve(n.cwd,n.path)}catch(c){return s(c)}LT.readFile(u,t,l);function l(c,f){c?s(c):(n.value=f,a(n))}}}function Em(e){return typeof e=="string"||e instanceof URL?e={path:e}:UT(e)&&(e={path:new TextDecoder().decode(e)}),BT(e)?e:new MT(e)}function BT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function UT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}import{VFile as $T}from"vfile";async function vr(e,t,r,n,i,o,a){let s=await t({additionalConfig:o,additionalRules:a});o=s;let u=await du(),l=Df(e),c=vf(l,i,n,"md"),f=[],p=r(s,u);for(let{input:m,name:h,output:E}of c){let C=await Sl(m),x=await p.process(C);x.dirname=E,x.basename=h,f.push(x)}return f}async function bn(e,t,r,n,i){let o=await t({additionalConfig:n,additionalRules:i});n=o;let a=await du();return r(o,a).process(new $T(e))}function Jn(e,t){return Yn().use({settings:{bullet:"-",emphasis:"_"}}).use(_r).use(t).use(()=>async function(n,i){km(n,i),bm(n,i,e),await jT(n,i,e)})}function eo(e,t){return Yn().use({settings:{bullet:"-",emphasis:"_"}}).use(_r).use(t).use(()=>function(n,i){km(n,i),bm(n,i,e)})}function Qn(e,t){return Yn().use({settings:{bullet:"-",emphasis:"_"}}).use(_r).use(t).use(()=>async function(n,i){await zT(n,i,{...e,paranoid:!1})})}async function qT(e,t,r,n,i){return vr(e,Lt,Jn,t,r,n,i)}async function VT(e,t,r){return bn(e,Lt,Jn,t,r)}async function GT(e,t,r,n,i){return vr(e,Lt,Qn,t,r,n,i)}async function HT(e,t,r){return bn(e,Lt,Qn,t,r)}async function WT(e,t,r,n,i){return vr(e,Lt,eo,t,r,n,i)}async function KT(e,t,r){return bn(e,Lt,eo,t,r)}var ka={badges:{async content(e){let t=L.object({custom:L.record(L.object({image:L.string(),link:L.string()})).optional(),npm:L.array(L.string()).optional()}).optional().parse(e),r=await At(),{name:n}=r,i=[];if(!r.private&&r.publishConfig?.access==="public"&&i.push(`[](https://npmjs.com/package/${n})`),t?.npm!==void 0)for(let a of t.npm)i.push(`[](https://npmjs.com/package/${a})`);let{license:o}=r;if(o!==void 0&&i.push(`[](https://opensource.org/licenses/${o})`),t?.custom!==void 0)for(let[a,{image:s,link:u}]of Object.entries(t.custom))i.push(`[](${u})`);return i.join(`
|
|
41
|
+
`)},order:3}};import{globby as ZT}from"globby";import Aa from"node:path";import{readPackage as YT}from"read-pkg";var Ta={banner:{async content(e){let t=L.object({alt:L.string().optional(),src:L.string().optional()}).optional().parse(e),{assetsPath:r,packageFile:n}=await cn();if(n===void 0)throw new Error("No package.json found");let i=t?.src??await Am(r)??await Am();if(i===void 0)throw new Error("Banner image not found at any typical location, consider adding something at ./assets/banner.webp");if(!Tm(i)&&!await Vn(i))throw new Error(`Banner image not found at "${i}"`);let o=t?.alt??`${(await YT({cwd:Aa.dirname(n)})).name} banner`;if(o===void 0||o==="undefined banner")throw new Error("Banner image alt text not available");return``},order:2}};async function Am(e){let{packageFile:t}=await cn();if(t===void 0)throw new Error("No package.json found");let r=Aa.dirname(t),n=e===void 0?[".","assets","media","readme-assets","readme-media","readme","images",".github/assets"]:[e],i=["banner","cover","demo","header","hero","image","logo","overview","readme","screenshot","screenshots","splash"],o=["png","gif","jpg","jpeg","svg","webp"],a=await ZT(n.map(s=>Aa.join(r,s)),{deep:1,expandDirectories:{extensions:o,files:i}});if(a.length>0)return Aa.relative(process.cwd(),a[0])}function Tm(e,t=!0){if(typeof e!="string")throw new TypeError("Expected a string");if(e=e.trim(),e.includes(" "))return!1;try{return new URL(e),!0}catch{return t?Tm(`https://${e}`,!1):!1}}import{getSoleRule as aF}from"remark-mdat";import{execaCommand as G1}from"execa";import{log as $x}from"remark-mdat";function Cm(e,t=Number.MAX_SAFE_INTEGER){let r=[],n=XT(e,t);return r.push(JT(n)),r.push(QT(e,n)),n.hasMultipleSubcommands&&n.canRecurse&&r.push(eC(n.fullCommandName)),n.defaultCommand?.commandName!==void 0&&r.push(tC(n)),r.push(rC(e,n)),e.positionals&&!n.commandsOnly&&r.push(_l(["Positional Argument","Description","Type","Default"],e.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}\``:""]))),e.commands&&r.push(_l(["Command","Argument","Description"],e.commands.map(i=>[`\`${i.commandName??(i.default?"[default]":"")}\``,i.arguments?i.arguments.map(o=>`\`${o}\``).join(" "):"",`${i.description??""}${i.default?" _(Default command.)_":""}`]))),e.options&&!n.commandsOnly&&r.push(_l(["Option","Argument","Description","Type","Default"],e.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(`
|
|
46
42
|
|
|
47
|
-
`)}function
|
|
43
|
+
`)}function XT(e,t){let r=e.subcommandName===void 0,n=e.commands?e.commands.length>1:!1,i=t>1,o=e.commands?.find(l=>l.default),a=e.commands?.find(l=>l.commandName===void 0),s=`${e.commandName}${e.subcommandName?` ${e.subcommandName}`:""}`,u=i&&n&&o?.commandName!==void 0;return{canRecurse:i,commandsOnly:u,defaultCommand:o,fullCommandName:s,hasMultipleSubcommands:n,isTopLevel:r,topLevelCommand:a}}function JT(e){return`#### ${e.isTopLevel?"Command":"Subcommand"}: \`${e.fullCommandName}\``}function QT(e,t){return t.isTopLevel&&t.topLevelCommand?.description?(e.commands=e.commands?.filter(r=>r!==t.topLevelCommand),t.topLevelCommand.description):e.description??""}function eC(e){return`This section lists top-level commands for \`${e}\`.`}function tC(e){return`If no command is provided, \`${e.defaultCommand?.parentCommandName} ${e.defaultCommand?.commandName}\` is run by default.`}function rC(e,t){let r=t.topLevelCommand?.arguments?` ${t.topLevelCommand.arguments.join(" ")}`:e.arguments?` ${e.arguments.join(" ")}`:"";return`Usage:
|
|
48
44
|
|
|
49
45
|
\`\`\`txt
|
|
50
46
|
${t.fullCommandName}${r}
|
|
51
|
-
\`\`\``}function
|
|
47
|
+
\`\`\``}function _l(e,t){let r=nC(t);e=e.filter((i,o)=>!r.includes(o)),t=t.map(i=>i.filter((o,a)=>!r.includes(a)));let n="";n+=`| ${e.join(" | ")} |
|
|
52
48
|
`,n+=`| ${e.map(()=>"---").join(" | ")} |
|
|
53
49
|
`;for(let i of t)n+=`| ${i.join(" | ")} |
|
|
54
|
-
`;return n}function OC(e){let t=[],r=e[0]?.length||0;for(let n=0;n<r;n++){let i=!0;for(let o of e)if(o[n]!==""){i=!1;break}i&&t.push(n)}return t}import{log as Kc}from"remark-mdat";var NC=typeof global=="object"&&global&&global.Object===Object&&global,Ra=NC;var LC=typeof self=="object"&&self&&self.Object===Object&&self,PC=Ra||LC||Function("return this")(),Pe=PC;var MC=Pe.Symbol,He=MC;var Vm=Object.prototype,BC=Vm.hasOwnProperty,UC=Vm.toString,lo=He?He.toStringTag:void 0;function zC(e){var t=BC.call(e,lo),r=e[lo];try{e[lo]=void 0;var n=!0}catch{}var i=UC.call(e);return n&&(t?e[lo]=r:delete e[lo]),i}var Gm=zC;var jC=Object.prototype,$C=jC.toString;function qC(e){return $C.call(e)}var Hm=qC;var VC="[object Null]",GC="[object Undefined]",Wm=He?He.toStringTag:void 0;function HC(e){return e==null?e===void 0?GC:VC:Wm&&Wm in Object(e)?Gm(e):Hm(e)}var ut=HC;function WC(e){return e!=null&&typeof e=="object"}var Fe=WC;var KC="[object Symbol]";function ZC(e){return typeof e=="symbol"||Fe(e)&&ut(e)==KC}var Or=ZC;function YC(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Yt=YC;var XC=Array.isArray,P=XC;var JC=1/0,Km=He?He.prototype:void 0,Zm=Km?Km.toString:void 0;function Ym(e){if(typeof e=="string")return e;if(P(e))return Yt(e,Ym)+"";if(Or(e))return Zm?Zm.call(e):"";var t=e+"";return t=="0"&&1/e==-JC?"-0":t}var Xm=Ym;var QC=/\s/;function ew(e){for(var t=e.length;t--&&QC.test(e.charAt(t)););return t}var Jm=ew;var tw=/^\s+/;function rw(e){return e&&e.slice(0,Jm(e)+1).replace(tw,"")}var Qm=rw;function nw(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ce=nw;var ed=NaN,iw=/^[-+]0x[0-9a-f]+$/i,ow=/^0b[01]+$/i,aw=/^0o[0-7]+$/i,sw=parseInt;function uw(e){if(typeof e=="number")return e;if(Or(e))return ed;if(Ce(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ce(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Qm(e);var r=ow.test(e);return r||aw.test(e)?sw(e.slice(2),r?2:8):iw.test(e)?ed:+e}var td=uw;var rd=1/0,lw=17976931348623157e292;function cw(e){if(!e)return e===0?e:0;if(e=td(e),e===rd||e===-rd){var t=e<0?-1:1;return t*lw}return e===e?e:0}var nd=cw;function fw(e){var t=nd(e),r=t%1;return t===t?r?t-r:t:0}var Xt=fw;function pw(e){return e}var Ot=pw;var mw="[object AsyncFunction]",dw="[object Function]",hw="[object GeneratorFunction]",gw="[object Proxy]";function xw(e){if(!Ce(e))return!1;var t=ut(e);return t==dw||t==hw||t==mw||t==gw}var lt=xw;var yw=Pe["__core-js_shared__"],Da=yw;var id=function(){var e=/[^.]+$/.exec(Da&&Da.keys&&Da.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ew(e){return!!id&&id in e}var od=Ew;var bw=Function.prototype,kw=bw.toString;function Aw(e){if(e!=null){try{return kw.call(e)}catch{}try{return e+""}catch{}}return""}var yr=Aw;var Tw=/[\\^$.*+?()[\]{}|]/g,Cw=/^\[object .+?Constructor\]$/,ww=Function.prototype,Sw=Object.prototype,vw=ww.toString,_w=Sw.hasOwnProperty,Iw=RegExp("^"+vw.call(_w).replace(Tw,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Rw(e){if(!Ce(e)||od(e))return!1;var t=lt(e)?Iw:Cw;return t.test(yr(e))}var ad=Rw;function Dw(e,t){return e?.[t]}var sd=Dw;function Fw(e,t){var r=sd(e,t);return ad(r)?r:void 0}var ht=Fw;var Ow=ht(Pe,"WeakMap"),Fa=Ow;var ud=Object.create,Nw=function(){function e(){}return function(t){if(!Ce(t))return{};if(ud)return ud(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),ld=Nw;function Lw(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var cd=Lw;function Pw(){}var we=Pw;function Mw(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var fd=Mw;var Bw=800,Uw=16,zw=Date.now;function jw(e){var t=0,r=0;return function(){var n=zw(),i=Uw-(n-r);if(r=n,i>0){if(++t>=Bw)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var pd=jw;function $w(e){return function(){return e}}var md=$w;var qw=function(){try{var e=ht(Object,"defineProperty");return e({},"",{}),e}catch{}}(),ai=qw;var Vw=ai?function(e,t){return ai(e,"toString",{configurable:!0,enumerable:!1,value:md(t),writable:!0})}:Ot,dd=Vw;var Gw=pd(dd),hd=Gw;function Hw(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var Oa=Hw;function Ww(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}var Na=Ww;function Kw(e){return e!==e}var gd=Kw;function Zw(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var xd=Zw;function Yw(e,t,r){return t===t?xd(e,t,r):Na(e,gd,r)}var si=Yw;function Xw(e,t){var r=e==null?0:e.length;return!!r&&si(e,t,0)>-1}var La=Xw;var Jw=9007199254740991,Qw=/^(?:0|[1-9]\d*)$/;function eS(e,t){var r=typeof e;return t=t??Jw,!!t&&(r=="number"||r!="symbol"&&Qw.test(e))&&e>-1&&e%1==0&&e<t}var Nr=eS;function tS(e,t,r){t=="__proto__"&&ai?ai(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var ui=tS;function rS(e,t){return e===t||e!==e&&t!==t}var Jt=rS;var nS=Object.prototype,iS=nS.hasOwnProperty;function oS(e,t,r){var n=e[t];(!(iS.call(e,t)&&Jt(n,r))||r===void 0&&!(t in e))&&ui(e,t,r)}var Lr=oS;function aS(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var s=t[o],u=n?n(r[s],e[s],s,r,e):void 0;u===void 0&&(u=e[s]),i?ui(r,s,u):Lr(r,s,u)}return r}var Qt=aS;var yd=Math.max;function sS(e,t,r){return t=yd(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=yd(n.length-t,0),a=Array(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),cd(e,this,s)}}var Ed=sS;function uS(e,t){return hd(Ed(e,t,Ot),e+"")}var li=uS;var lS=9007199254740991;function cS(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=lS}var ci=cS;function fS(e){return e!=null&&ci(e.length)&&!lt(e)}var Me=fS;function pS(e,t,r){if(!Ce(r))return!1;var n=typeof t;return(n=="number"?Me(r)&&Nr(t,r.length):n=="string"&&t in r)?Jt(r[t],e):!1}var Pr=pS;function mS(e){return li(function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&Pr(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++n<i;){var s=r[n];s&&e(t,s,n,o)}return t})}var bd=mS;var dS=Object.prototype;function hS(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||dS;return e===r}var er=hS;function gS(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var kd=gS;var xS="[object Arguments]";function yS(e){return Fe(e)&&ut(e)==xS}var Bl=yS;var Ad=Object.prototype,ES=Ad.hasOwnProperty,bS=Ad.propertyIsEnumerable,kS=Bl(function(){return arguments}())?Bl:function(e){return Fe(e)&&ES.call(e,"callee")&&!bS.call(e,"callee")},Mr=kS;function AS(){return!1}var Td=AS;var Sd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Cd=Sd&&typeof module=="object"&&module&&!module.nodeType&&module,TS=Cd&&Cd.exports===Sd,wd=TS?Pe.Buffer:void 0,CS=wd?wd.isBuffer:void 0,wS=CS||Td,Er=wS;var SS="[object Arguments]",vS="[object Array]",_S="[object Boolean]",IS="[object Date]",RS="[object Error]",DS="[object Function]",FS="[object Map]",OS="[object Number]",NS="[object Object]",LS="[object RegExp]",PS="[object Set]",MS="[object String]",BS="[object WeakMap]",US="[object ArrayBuffer]",zS="[object DataView]",jS="[object Float32Array]",$S="[object Float64Array]",qS="[object Int8Array]",VS="[object Int16Array]",GS="[object Int32Array]",HS="[object Uint8Array]",WS="[object Uint8ClampedArray]",KS="[object Uint16Array]",ZS="[object Uint32Array]",ye={};ye[jS]=ye[$S]=ye[qS]=ye[VS]=ye[GS]=ye[HS]=ye[WS]=ye[KS]=ye[ZS]=!0;ye[SS]=ye[vS]=ye[US]=ye[_S]=ye[zS]=ye[IS]=ye[RS]=ye[DS]=ye[FS]=ye[OS]=ye[NS]=ye[LS]=ye[PS]=ye[MS]=ye[BS]=!1;function YS(e){return Fe(e)&&ci(e.length)&&!!ye[ut(e)]}var vd=YS;function XS(e){return function(t){return e(t)}}var tr=XS;var _d=typeof exports=="object"&&exports&&!exports.nodeType&&exports,co=_d&&typeof module=="object"&&module&&!module.nodeType&&module,JS=co&&co.exports===_d,Ul=JS&&Ra.process,QS=function(){try{var e=co&&co.require&&co.require("util").types;return e||Ul&&Ul.binding&&Ul.binding("util")}catch{}}(),Nt=QS;var Id=Nt&&Nt.isTypedArray,ev=Id?tr(Id):vd,fi=ev;var tv=Object.prototype,rv=tv.hasOwnProperty;function nv(e,t){var r=P(e),n=!r&&Mr(e),i=!r&&!n&&Er(e),o=!r&&!n&&!i&&fi(e),a=r||n||i||o,s=a?kd(e.length,String):[],u=s.length;for(var l in e)(t||rv.call(e,l))&&!(a&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Nr(l,u)))&&s.push(l);return s}var Pa=nv;function iv(e,t){return function(r){return e(t(r))}}var Ma=iv;var ov=Ma(Object.keys,Object),Rd=ov;var av=Object.prototype,sv=av.hasOwnProperty;function uv(e){if(!er(e))return Rd(e);var t=[];for(var r in Object(e))sv.call(e,r)&&r!="constructor"&&t.push(r);return t}var Ba=uv;function lv(e){return Me(e)?Pa(e):Ba(e)}var pe=lv;var cv=Object.prototype,fv=cv.hasOwnProperty,pv=bd(function(e,t){if(er(t)||Me(t)){Qt(t,pe(t),e);return}for(var r in t)fv.call(t,r)&&Lr(e,r,t[r])}),Ze=pv;function mv(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Dd=mv;var dv=Object.prototype,hv=dv.hasOwnProperty;function gv(e){if(!Ce(e))return Dd(e);var t=er(e),r=[];for(var n in e)n=="constructor"&&(t||!hv.call(e,n))||r.push(n);return r}var Fd=gv;function xv(e){return Me(e)?Pa(e,!0):Fd(e)}var Br=xv;var yv=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ev=/^\w*$/;function bv(e,t){if(P(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Or(e)?!0:Ev.test(e)||!yv.test(e)||t!=null&&e in Object(t)}var pi=bv;var kv=ht(Object,"create"),br=kv;function Av(){this.__data__=br?br(null):{},this.size=0}var Od=Av;function Tv(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Nd=Tv;var Cv="__lodash_hash_undefined__",wv=Object.prototype,Sv=wv.hasOwnProperty;function vv(e){var t=this.__data__;if(br){var r=t[e];return r===Cv?void 0:r}return Sv.call(t,e)?t[e]:void 0}var Ld=vv;var _v=Object.prototype,Iv=_v.hasOwnProperty;function Rv(e){var t=this.__data__;return br?t[e]!==void 0:Iv.call(t,e)}var Pd=Rv;var Dv="__lodash_hash_undefined__";function Fv(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=br&&t===void 0?Dv:t,this}var Md=Fv;function mi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}mi.prototype.clear=Od;mi.prototype.delete=Nd;mi.prototype.get=Ld;mi.prototype.has=Pd;mi.prototype.set=Md;var zl=mi;function Ov(){this.__data__=[],this.size=0}var Bd=Ov;function Nv(e,t){for(var r=e.length;r--;)if(Jt(e[r][0],t))return r;return-1}var Ur=Nv;var Lv=Array.prototype,Pv=Lv.splice;function Mv(e){var t=this.__data__,r=Ur(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Pv.call(t,r,1),--this.size,!0}var Ud=Mv;function Bv(e){var t=this.__data__,r=Ur(t,e);return r<0?void 0:t[r][1]}var zd=Bv;function Uv(e){return Ur(this.__data__,e)>-1}var jd=Uv;function zv(e,t){var r=this.__data__,n=Ur(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var $d=zv;function di(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}di.prototype.clear=Bd;di.prototype.delete=Ud;di.prototype.get=zd;di.prototype.has=jd;di.prototype.set=$d;var zr=di;var jv=ht(Pe,"Map"),jr=jv;function $v(){this.size=0,this.__data__={hash:new zl,map:new(jr||zr),string:new zl}}var qd=$v;function qv(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Vd=qv;function Vv(e,t){var r=e.__data__;return Vd(t)?r[typeof t=="string"?"string":"hash"]:r.map}var $r=Vv;function Gv(e){var t=$r(this,e).delete(e);return this.size-=t?1:0,t}var Gd=Gv;function Hv(e){return $r(this,e).get(e)}var Hd=Hv;function Wv(e){return $r(this,e).has(e)}var Wd=Wv;function Kv(e,t){var r=$r(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Kd=Kv;function hi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}hi.prototype.clear=qd;hi.prototype.delete=Gd;hi.prototype.get=Hd;hi.prototype.has=Wd;hi.prototype.set=Kd;var wn=hi;var Zv="Expected a function";function jl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Zv);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(jl.Cache||wn),r}jl.Cache=wn;var Zd=jl;var Yv=500;function Xv(e){var t=Zd(e,function(n){return r.size===Yv&&r.clear(),n}),r=t.cache;return t}var Yd=Xv;var Jv=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qv=/\\(\\)?/g,e_=Yd(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Jv,function(r,n,i,o){t.push(i?o.replace(Qv,"$1"):n||r)}),t}),Xd=e_;function t_(e){return e==null?"":Xm(e)}var Jd=t_;function r_(e,t){return P(e)?e:pi(e,t)?[e]:Xd(Jd(e))}var qr=r_;var n_=1/0;function i_(e){if(typeof e=="string"||Or(e))return e;var t=e+"";return t=="0"&&1/e==-n_?"-0":t}var rr=i_;function o_(e,t){t=qr(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[rr(t[r++])];return r&&r==n?e:void 0}var gi=o_;function a_(e,t,r){var n=e==null?void 0:gi(e,t);return n===void 0?r:n}var Qd=a_;function s_(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var xi=s_;var eh=He?He.isConcatSpreadable:void 0;function u_(e){return P(e)||Mr(e)||!!(eh&&e&&e[eh])}var th=u_;function rh(e,t,r,n,i){var o=-1,a=e.length;for(r||(r=th),i||(i=[]);++o<a;){var s=e[o];t>0&&r(s)?t>1?rh(s,t-1,r,n,i):xi(i,s):n||(i[i.length]=s)}return i}var yi=rh;function l_(e){var t=e==null?0:e.length;return t?yi(e,1):[]}var qe=l_;var c_=Ma(Object.getPrototypeOf,Object),Ua=c_;function f_(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=e[n+t];return o}var za=f_;function p_(e,t,r,n){var i=-1,o=e==null?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}var nh=p_;function m_(){this.__data__=new zr,this.size=0}var ih=m_;function d_(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var oh=d_;function h_(e){return this.__data__.get(e)}var ah=h_;function g_(e){return this.__data__.has(e)}var sh=g_;var x_=200;function y_(e,t){var r=this.__data__;if(r instanceof zr){var n=r.__data__;if(!jr||n.length<x_-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new wn(n)}return r.set(e,t),this.size=r.size,this}var uh=y_;function Ei(e){var t=this.__data__=new zr(e);this.size=t.size}Ei.prototype.clear=ih;Ei.prototype.delete=oh;Ei.prototype.get=ah;Ei.prototype.has=sh;Ei.prototype.set=uh;var Vr=Ei;function E_(e,t){return e&&Qt(t,pe(t),e)}var lh=E_;function b_(e,t){return e&&Qt(t,Br(t),e)}var ch=b_;var dh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,fh=dh&&typeof module=="object"&&module&&!module.nodeType&&module,k_=fh&&fh.exports===dh,ph=k_?Pe.Buffer:void 0,mh=ph?ph.allocUnsafe:void 0;function A_(e,t){if(t)return e.slice();var r=e.length,n=mh?mh(r):new e.constructor(r);return e.copy(n),n}var hh=A_;function T_(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}var bi=T_;function C_(){return[]}var ja=C_;var w_=Object.prototype,S_=w_.propertyIsEnumerable,gh=Object.getOwnPropertySymbols,v_=gh?function(e){return e==null?[]:(e=Object(e),bi(gh(e),function(t){return S_.call(e,t)}))}:ja,ki=v_;function __(e,t){return Qt(e,ki(e),t)}var xh=__;var I_=Object.getOwnPropertySymbols,R_=I_?function(e){for(var t=[];e;)xi(t,ki(e)),e=Ua(e);return t}:ja,$a=R_;function D_(e,t){return Qt(e,$a(e),t)}var yh=D_;function F_(e,t,r){var n=t(e);return P(e)?n:xi(n,r(e))}var qa=F_;function O_(e){return qa(e,pe,ki)}var fo=O_;function N_(e){return qa(e,Br,$a)}var Va=N_;var L_=ht(Pe,"DataView"),Ga=L_;var P_=ht(Pe,"Promise"),Ha=P_;var M_=ht(Pe,"Set"),Gr=M_;var Eh="[object Map]",B_="[object Object]",bh="[object Promise]",kh="[object Set]",Ah="[object WeakMap]",Th="[object DataView]",U_=yr(Ga),z_=yr(jr),j_=yr(Ha),$_=yr(Gr),q_=yr(Fa),Sn=ut;(Ga&&Sn(new Ga(new ArrayBuffer(1)))!=Th||jr&&Sn(new jr)!=Eh||Ha&&Sn(Ha.resolve())!=bh||Gr&&Sn(new Gr)!=kh||Fa&&Sn(new Fa)!=Ah)&&(Sn=function(e){var t=ut(e),r=t==B_?e.constructor:void 0,n=r?yr(r):"";if(n)switch(n){case U_:return Th;case z_:return Eh;case j_:return bh;case $_:return kh;case q_:return Ah}return t});var zt=Sn;var V_=Object.prototype,G_=V_.hasOwnProperty;function H_(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&G_.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Ch=H_;var W_=Pe.Uint8Array,Ai=W_;function K_(e){var t=new e.constructor(e.byteLength);return new Ai(t).set(new Ai(e)),t}var Ti=K_;function Z_(e,t){var r=t?Ti(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var wh=Z_;var Y_=/\w*$/;function X_(e){var t=new e.constructor(e.source,Y_.exec(e));return t.lastIndex=e.lastIndex,t}var Sh=X_;var vh=He?He.prototype:void 0,_h=vh?vh.valueOf:void 0;function J_(e){return _h?Object(_h.call(e)):{}}var Ih=J_;function Q_(e,t){var r=t?Ti(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Rh=Q_;var eI="[object Boolean]",tI="[object Date]",rI="[object Map]",nI="[object Number]",iI="[object RegExp]",oI="[object Set]",aI="[object String]",sI="[object Symbol]",uI="[object ArrayBuffer]",lI="[object DataView]",cI="[object Float32Array]",fI="[object Float64Array]",pI="[object Int8Array]",mI="[object Int16Array]",dI="[object Int32Array]",hI="[object Uint8Array]",gI="[object Uint8ClampedArray]",xI="[object Uint16Array]",yI="[object Uint32Array]";function EI(e,t,r){var n=e.constructor;switch(t){case uI:return Ti(e);case eI:case tI:return new n(+e);case lI:return wh(e,r);case cI:case fI:case pI:case mI:case dI:case hI:case gI:case xI:case yI:return Rh(e,r);case rI:return new n;case nI:case aI:return new n(e);case iI:return Sh(e);case oI:return new n;case sI:return Ih(e)}}var Dh=EI;function bI(e){return typeof e.constructor=="function"&&!er(e)?ld(Ua(e)):{}}var Fh=bI;var kI="[object Map]";function AI(e){return Fe(e)&&zt(e)==kI}var Oh=AI;var Nh=Nt&&Nt.isMap,TI=Nh?tr(Nh):Oh,Lh=TI;var CI="[object Set]";function wI(e){return Fe(e)&&zt(e)==CI}var Ph=wI;var Mh=Nt&&Nt.isSet,SI=Mh?tr(Mh):Ph,Bh=SI;var vI=1,_I=2,II=4,Uh="[object Arguments]",RI="[object Array]",DI="[object Boolean]",FI="[object Date]",OI="[object Error]",zh="[object Function]",NI="[object GeneratorFunction]",LI="[object Map]",PI="[object Number]",jh="[object Object]",MI="[object RegExp]",BI="[object Set]",UI="[object String]",zI="[object Symbol]",jI="[object WeakMap]",$I="[object ArrayBuffer]",qI="[object DataView]",VI="[object Float32Array]",GI="[object Float64Array]",HI="[object Int8Array]",WI="[object Int16Array]",KI="[object Int32Array]",ZI="[object Uint8Array]",YI="[object Uint8ClampedArray]",XI="[object Uint16Array]",JI="[object Uint32Array]",me={};me[Uh]=me[RI]=me[$I]=me[qI]=me[DI]=me[FI]=me[VI]=me[GI]=me[HI]=me[WI]=me[KI]=me[LI]=me[PI]=me[jh]=me[MI]=me[BI]=me[UI]=me[zI]=me[ZI]=me[YI]=me[XI]=me[JI]=!0;me[OI]=me[zh]=me[jI]=!1;function Wa(e,t,r,n,i,o){var a,s=t&vI,u=t&_I,l=t&II;if(r&&(a=i?r(e,n,i,o):r(e)),a!==void 0)return a;if(!Ce(e))return e;var c=P(e);if(c){if(a=Ch(e),!s)return fd(e,a)}else{var f=zt(e),p=f==zh||f==NI;if(Er(e))return hh(e,s);if(f==jh||f==Uh||p&&!i){if(a=u||p?{}:Fh(e),!s)return u?yh(e,ch(a,e)):xh(e,lh(a,e))}else{if(!me[f])return i?e:{};a=Dh(e,f,s)}}o||(o=new Vr);var m=o.get(e);if(m)return m;o.set(e,a),Bh(e)?e.forEach(function(C){a.add(Wa(C,t,r,C,e,o))}):Lh(e)&&e.forEach(function(C,x){a.set(x,Wa(C,t,r,x,e,o))});var h=l?u?Va:fo:u?Br:pe,E=c?void 0:h(e);return Oa(E||e,function(C,x){E&&(x=C,C=e[x]),Lr(a,x,Wa(C,t,r,x,e,o))}),a}var $h=Wa;var QI=4;function eR(e){return $h(e,QI)}var de=eR;function tR(e){for(var t=-1,r=e==null?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i}var nr=tR;var rR="__lodash_hash_undefined__";function nR(e){return this.__data__.set(e,rR),this}var qh=nR;function iR(e){return this.__data__.has(e)}var Vh=iR;function Ka(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new wn;++t<r;)this.add(e[t])}Ka.prototype.add=Ka.prototype.push=qh;Ka.prototype.has=Vh;var Ci=Ka;function oR(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Za=oR;function aR(e,t){return e.has(t)}var wi=aR;var sR=1,uR=2;function lR(e,t,r,n,i,o){var a=r&sR,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var l=o.get(e),c=o.get(t);if(l&&c)return l==t&&c==e;var f=-1,p=!0,m=r&uR?new Ci:void 0;for(o.set(e,t),o.set(t,e);++f<s;){var h=e[f],E=t[f];if(n)var C=a?n(E,h,f,t,e,o):n(h,E,f,e,t,o);if(C!==void 0){if(C)continue;p=!1;break}if(m){if(!Za(t,function(x,k){if(!wi(m,k)&&(h===x||i(h,x,r,n,o)))return m.push(k)})){p=!1;break}}else if(!(h===E||i(h,E,r,n,o))){p=!1;break}}return o.delete(e),o.delete(t),p}var Ya=lR;function cR(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var Gh=cR;function fR(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Si=fR;var pR=1,mR=2,dR="[object Boolean]",hR="[object Date]",gR="[object Error]",xR="[object Map]",yR="[object Number]",ER="[object RegExp]",bR="[object Set]",kR="[object String]",AR="[object Symbol]",TR="[object ArrayBuffer]",CR="[object DataView]",Hh=He?He.prototype:void 0,$l=Hh?Hh.valueOf:void 0;function wR(e,t,r,n,i,o,a){switch(r){case CR:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case TR:return!(e.byteLength!=t.byteLength||!o(new Ai(e),new Ai(t)));case dR:case hR:case yR:return Jt(+e,+t);case gR:return e.name==t.name&&e.message==t.message;case ER:case kR:return e==t+"";case xR:var s=Gh;case bR:var u=n&pR;if(s||(s=Si),e.size!=t.size&&!u)return!1;var l=a.get(e);if(l)return l==t;n|=mR,a.set(e,t);var c=Ya(s(e),s(t),n,i,o,a);return a.delete(e),c;case AR:if($l)return $l.call(e)==$l.call(t)}return!1}var Wh=wR;var SR=1,vR=Object.prototype,_R=vR.hasOwnProperty;function IR(e,t,r,n,i,o){var a=r&SR,s=fo(e),u=s.length,l=fo(t),c=l.length;if(u!=c&&!a)return!1;for(var f=u;f--;){var p=s[f];if(!(a?p in t:_R.call(t,p)))return!1}var m=o.get(e),h=o.get(t);if(m&&h)return m==t&&h==e;var E=!0;o.set(e,t),o.set(t,e);for(var C=a;++f<u;){p=s[f];var x=e[p],k=t[p];if(n)var y=a?n(k,x,p,t,e,o):n(x,k,p,e,t,o);if(!(y===void 0?x===k||i(x,k,r,n,o):y)){E=!1;break}C||(C=p=="constructor")}if(E&&!C){var S=e.constructor,v=t.constructor;S!=v&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof v=="function"&&v instanceof v)&&(E=!1)}return o.delete(e),o.delete(t),E}var Kh=IR;var RR=1,Zh="[object Arguments]",Yh="[object Array]",Xa="[object Object]",DR=Object.prototype,Xh=DR.hasOwnProperty;function FR(e,t,r,n,i,o){var a=P(e),s=P(t),u=a?Yh:zt(e),l=s?Yh:zt(t);u=u==Zh?Xa:u,l=l==Zh?Xa:l;var c=u==Xa,f=l==Xa,p=u==l;if(p&&Er(e)){if(!Er(t))return!1;a=!0,c=!1}if(p&&!c)return o||(o=new Vr),a||fi(e)?Ya(e,t,r,n,i,o):Wh(e,t,u,r,n,i,o);if(!(r&RR)){var m=c&&Xh.call(e,"__wrapped__"),h=f&&Xh.call(t,"__wrapped__");if(m||h){var E=m?e.value():e,C=h?t.value():t;return o||(o=new Vr),i(E,C,r,n,o)}}return p?(o||(o=new Vr),Kh(e,t,r,n,i,o)):!1}var Jh=FR;function Qh(e,t,r,n,i){return e===t?!0:e==null||t==null||!Fe(e)&&!Fe(t)?e!==e&&t!==t:Jh(e,t,r,n,Qh,i)}var Ja=Qh;var OR=1,NR=2;function LR(e,t,r,n){var i=r.length,o=i,a=!n;if(e==null)return!o;for(e=Object(e);i--;){var s=r[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){s=r[i];var u=s[0],l=e[u],c=s[1];if(a&&s[2]){if(l===void 0&&!(u in e))return!1}else{var f=new Vr;if(n)var p=n(l,c,u,e,t,f);if(!(p===void 0?Ja(c,l,OR|NR,n,f):p))return!1}}return!0}var eg=LR;function PR(e){return e===e&&!Ce(e)}var Qa=PR;function MR(e){for(var t=pe(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Qa(i)]}return t}var tg=MR;function BR(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var es=BR;function UR(e){var t=tg(e);return t.length==1&&t[0][2]?es(t[0][0],t[0][1]):function(r){return r===e||eg(r,e,t)}}var rg=UR;function zR(e,t){return e!=null&&t in Object(e)}var ng=zR;function jR(e,t,r){t=qr(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var a=rr(t[n]);if(!(o=e!=null&&r(e,a)))break;e=e[a]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&ci(i)&&Nr(a,i)&&(P(e)||Mr(e)))}var ts=jR;function $R(e,t){return e!=null&&ts(e,t,ng)}var ig=$R;var qR=1,VR=2;function GR(e,t){return pi(e)&&Qa(t)?es(rr(e),t):function(r){var n=Qd(r,e);return n===void 0&&n===t?ig(r,e):Ja(t,n,qR|VR)}}var og=GR;function HR(e){return function(t){return t?.[e]}}var ag=HR;function WR(e){return function(t){return gi(t,e)}}var sg=WR;function KR(e){return pi(e)?ag(rr(e)):sg(e)}var ug=KR;function ZR(e){return typeof e=="function"?e:e==null?Ot:typeof e=="object"?P(e)?og(e[0],e[1]):rg(e):ug(e)}var Be=ZR;function YR(e,t,r,n){for(var i=-1,o=e==null?0:e.length;++i<o;){var a=e[i];t(n,a,r(a),e)}return n}var lg=YR;function XR(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var u=a[e?s:++i];if(r(o[u],u,o)===!1)break}return t}}var cg=XR;var JR=cg(),fg=JR;function QR(e,t){return e&&fg(e,t,pe)}var pg=QR;function eD(e,t){return function(r,n){if(r==null)return r;if(!Me(r))return e(r,n);for(var i=r.length,o=t?i:-1,a=Object(r);(t?o--:++o<i)&&n(a[o],o,a)!==!1;);return r}}var mg=eD;var tD=mg(pg),gt=tD;function rD(e,t,r,n){return gt(e,function(i,o,a){t(n,i,r(i),a)}),n}var dg=rD;function nD(e,t){return function(r,n){var i=P(r)?lg:dg,o=t?t():{};return i(r,e,Be(n,2),o)}}var hg=nD;var gg=Object.prototype,iD=gg.hasOwnProperty,oD=li(function(e,t){e=Object(e);var r=-1,n=t.length,i=n>2?t[2]:void 0;for(i&&Pr(t[0],t[1],i)&&(n=1);++r<n;)for(var o=t[r],a=Br(o),s=-1,u=a.length;++s<u;){var l=a[s],c=e[l];(c===void 0||Jt(c,gg[l])&&!iD.call(e,l))&&(e[l]=o[l])}return e}),vi=oD;function aD(e){return Fe(e)&&Me(e)}var ql=aD;function sD(e,t,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}var rs=sD;var uD=200;function lD(e,t,r,n){var i=-1,o=La,a=!0,s=e.length,u=[],l=t.length;if(!s)return u;r&&(t=Yt(t,tr(r))),n?(o=rs,a=!1):t.length>=uD&&(o=wi,a=!1,t=new Ci(t));e:for(;++i<s;){var c=e[i],f=r==null?c:r(c);if(c=n||c!==0?c:0,a&&f===f){for(var p=l;p--;)if(t[p]===f)continue e;u.push(c)}else o(t,f,n)||u.push(c)}return u}var xg=lD;var cD=li(function(e,t){return ql(e)?xg(e,yi(t,1,ql,!0)):[]}),Hr=cD;function fD(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var ir=fD;function pD(e,t,r){var n=e==null?0:e.length;return n?(t=r||t===void 0?1:Xt(t),za(e,t<0?0:t,n)):[]}var Oe=pD;function mD(e,t,r){var n=e==null?0:e.length;return n?(t=r||t===void 0?1:Xt(t),t=n-t,za(e,0,t<0?0:t)):[]}var kr=mD;function dD(e){return typeof e=="function"?e:Ot}var yg=dD;function hD(e,t){var r=P(e)?Oa:gt;return r(e,yg(t))}var O=hD;function gD(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var Eg=gD;function xD(e,t){var r=!0;return gt(e,function(n,i,o){return r=!!t(n,i,o),r}),r}var bg=xD;function yD(e,t,r){var n=P(e)?Eg:bg;return r&&Pr(e,t,r)&&(t=void 0),n(e,Be(t,3))}var tt=yD;function ED(e,t){var r=[];return gt(e,function(n,i,o){t(n,i,o)&&r.push(n)}),r}var ns=ED;function bD(e,t){var r=P(e)?bi:ns;return r(e,Be(t,3))}var rt=bD;function kD(e){return function(t,r,n){var i=Object(t);if(!Me(t)){var o=Be(r,3);t=pe(t),r=function(s){return o(i[s],s,i)}}var a=e(t,r,n);return a>-1?i[o?t[a]:a]:void 0}}var kg=kD;var AD=Math.max;function TD(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:Xt(r);return i<0&&(i=AD(n+i,0)),Na(e,Be(t,3),i)}var Ag=TD;var CD=kg(Ag),or=CD;function wD(e){return e&&e.length?e[0]:void 0}var We=wD;function SD(e,t){var r=-1,n=Me(e)?Array(e.length):[];return gt(e,function(i,o,a){n[++r]=t(i,o,a)}),n}var Tg=SD;function vD(e,t){var r=P(e)?Yt:Tg;return r(e,Be(t,3))}var D=vD;function _D(e,t){return yi(D(e,t),1)}var ct=_D;var ID=Object.prototype,RD=ID.hasOwnProperty,DD=hg(function(e,t,r){RD.call(e,r)?e[r].push(t):ui(e,r,[t])}),Vl=DD;var FD=Object.prototype,OD=FD.hasOwnProperty;function ND(e,t){return e!=null&&OD.call(e,t)}var Cg=ND;function LD(e,t){return e!=null&&ts(e,t,Cg)}var N=LD;var PD="[object String]";function MD(e){return typeof e=="string"||!P(e)&&Fe(e)&&ut(e)==PD}var Ve=MD;function BD(e,t){return Yt(t,function(r){return e[r]})}var wg=BD;function UD(e){return e==null?[]:wg(e,pe(e))}var le=UD;var zD=Math.max;function jD(e,t,r,n){e=Me(e)?e:le(e),r=r&&!n?Xt(r):0;var i=e.length;return r<0&&(r=zD(i+r,0)),Ve(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&si(e,t,r)>-1}var ke=jD;var $D=Math.max;function qD(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:Xt(r);return i<0&&(i=$D(n+i,0)),si(e,t,i)}var is=qD;var VD="[object Map]",GD="[object Set]",HD=Object.prototype,WD=HD.hasOwnProperty;function KD(e){if(e==null)return!0;if(Me(e)&&(P(e)||typeof e=="string"||typeof e.splice=="function"||Er(e)||fi(e)||Mr(e)))return!e.length;var t=zt(e);if(t==VD||t==GD)return!e.size;if(er(e))return!Ba(e).length;for(var r in e)if(WD.call(e,r))return!1;return!0}var X=KD;var ZD="[object RegExp]";function YD(e){return Fe(e)&&ut(e)==ZD}var Sg=YD;var vg=Nt&&Nt.isRegExp,XD=vg?tr(vg):Sg,Lt=XD;function JD(e){return e===void 0}var nt=JD;var QD="Expected a function";function e0(e){if(typeof e!="function")throw new TypeError(QD);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}var _g=e0;function t0(e,t,r,n){if(!Ce(e))return e;t=qr(t,e);for(var i=-1,o=t.length,a=o-1,s=e;s!=null&&++i<o;){var u=rr(t[i]),l=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=a){var c=s[u];l=n?n(c,u,s):void 0,l===void 0&&(l=Ce(c)?c:Nr(t[i+1])?[]:{})}Lr(s,u,l),s=s[u]}return e}var Ig=t0;function r0(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var a=t[n],s=gi(e,a);r(s,a)&&Ig(o,qr(a,e),s)}return o}var Rg=r0;function n0(e,t){if(e==null)return{};var r=Yt(Va(e),function(n){return[n]});return t=Be(t),Rg(e,r,function(n,i){return t(n,i[0])})}var xt=n0;function i0(e,t,r,n,i){return i(e,function(o,a,s){r=n?(n=!1,o):t(r,o,a,s)}),r}var Dg=i0;function o0(e,t,r){var n=P(e)?nh:Dg,i=arguments.length<3;return n(e,Be(t,4),r,i,gt)}var Ue=o0;function a0(e,t){var r=P(e)?bi:ns;return r(e,_g(Be(t,3)))}var Wr=a0;function s0(e,t){var r;return gt(e,function(n,i,o){return r=t(n,i,o),!r}),!!r}var Fg=s0;function u0(e,t,r){var n=P(e)?Za:Fg;return r&&Pr(e,t,r)&&(t=void 0),n(e,Be(t,3))}var po=u0;var l0=1/0,c0=Gr&&1/Si(new Gr([,-0]))[1]==l0?function(e){return new Gr(e)}:we,Og=c0;var f0=200;function p0(e,t,r){var n=-1,i=La,o=e.length,a=!0,s=[],u=s;if(r)a=!1,i=rs;else if(o>=f0){var l=t?null:Og(e);if(l)return Si(l);a=!1,i=wi,u=new Ci}else u=t?[]:s;e:for(;++n<o;){var c=e[n],f=t?t(c):c;if(c=r||c!==0?c:0,a&&f===f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),s.push(c)}else i(u,f,r)||(u!==s&&u.push(f),s.push(c))}return s}var Ng=p0;function m0(e){return e&&e.length?Ng(e):[]}var _i=m0;function Ii(e){console&&console.error&&console.error(`Error: ${e}`)}function mo(e){console&&console.warn&&console.warn(`Warning: ${e}`)}function ho(e){let t=new Date().getTime(),r=e();return{time:new Date().getTime()-t,value:r}}function go(e){function t(){}t.prototype=e;let r=new t;function n(){return typeof r.bar}return n(),n(),e;(0,eval)(e)}function d0(e){return h0(e)?e.LABEL:e.name}function h0(e){return Ve(e.LABEL)&&e.LABEL!==""}var St=class{get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){this._definition=t}accept(t){t.visit(this),O(this.definition,r=>{r.accept(t)})}},he=class extends St{constructor(t){super([]),this.idx=1,Ze(this,xt(t,r=>r!==void 0))}set definition(t){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(t){t.visit(this)}},ft=class extends St{constructor(t){super(t.definition),this.orgText="",Ze(this,xt(t,r=>r!==void 0))}},ge=class extends St{constructor(t){super(t.definition),this.ignoreAmbiguities=!1,Ze(this,xt(t,r=>r!==void 0))}},Ee=class extends St{constructor(t){super(t.definition),this.idx=1,Ze(this,xt(t,r=>r!==void 0))}},Ne=class extends St{constructor(t){super(t.definition),this.idx=1,Ze(this,xt(t,r=>r!==void 0))}},Le=class extends St{constructor(t){super(t.definition),this.idx=1,Ze(this,xt(t,r=>r!==void 0))}},ue=class extends St{constructor(t){super(t.definition),this.idx=1,Ze(this,xt(t,r=>r!==void 0))}},_e=class extends St{constructor(t){super(t.definition),this.idx=1,Ze(this,xt(t,r=>r!==void 0))}},Ie=class extends St{get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){super(t.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Ze(this,xt(t,r=>r!==void 0))}},ie=class{constructor(t){this.idx=1,Ze(this,xt(t,r=>r!==void 0))}accept(t){t.visit(this)}};function os(e){return D(e,Ri)}function Ri(e){function t(r){return D(r,Ri)}if(e instanceof he){let r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return Ve(e.label)&&(r.label=e.label),r}else{if(e instanceof ge)return{type:"Alternative",definition:t(e.definition)};if(e instanceof Ee)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Ne)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof Le)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:Ri(new ie({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof _e)return{type:"RepetitionWithSeparator",idx:e.idx,separator:Ri(new ie({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof ue)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof Ie)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof ie){let r={type:"Terminal",name:e.terminalType.name,label:d0(e.terminalType),idx:e.idx};Ve(e.label)&&(r.terminalLabel=e.label);let n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(r.pattern=Lt(n)?n.source:n),r}else{if(e instanceof ft)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}}}var pt=class{visit(t){let r=t;switch(r.constructor){case he:return this.visitNonTerminal(r);case ge:return this.visitAlternative(r);case Ee:return this.visitOption(r);case Ne:return this.visitRepetitionMandatory(r);case Le:return this.visitRepetitionMandatoryWithSeparator(r);case _e:return this.visitRepetitionWithSeparator(r);case ue:return this.visitRepetition(r);case Ie:return this.visitAlternation(r);case ie:return this.visitTerminal(r);case ft:return this.visitRule(r);default:throw Error("non exhaustive match")}}visitNonTerminal(t){}visitAlternative(t){}visitOption(t){}visitRepetition(t){}visitRepetitionMandatory(t){}visitRepetitionMandatoryWithSeparator(t){}visitRepetitionWithSeparator(t){}visitAlternation(t){}visitTerminal(t){}visitRule(t){}};function Gl(e){return e instanceof ge||e instanceof Ee||e instanceof ue||e instanceof Ne||e instanceof Le||e instanceof _e||e instanceof ie||e instanceof ft}function vn(e,t=[]){return e instanceof Ee||e instanceof ue||e instanceof _e?!0:e instanceof Ie?po(e.definition,n=>vn(n,t)):e instanceof he&&ke(t,e)?!1:e instanceof St?(e instanceof he&&t.push(e),tt(e.definition,n=>vn(n,t))):!1}function Hl(e){return e instanceof Ie}function yt(e){if(e instanceof he)return"SUBRULE";if(e instanceof Ee)return"OPTION";if(e instanceof Ie)return"OR";if(e instanceof Ne)return"AT_LEAST_ONE";if(e instanceof Le)return"AT_LEAST_ONE_SEP";if(e instanceof _e)return"MANY_SEP";if(e instanceof ue)return"MANY";if(e instanceof ie)return"CONSUME";throw Error("non exhaustive match")}var Ar=class{walk(t,r=[]){O(t.definition,(n,i)=>{let o=Oe(t.definition,i+1);if(n instanceof he)this.walkProdRef(n,o,r);else if(n instanceof ie)this.walkTerminal(n,o,r);else if(n instanceof ge)this.walkFlat(n,o,r);else if(n instanceof Ee)this.walkOption(n,o,r);else if(n instanceof Ne)this.walkAtLeastOne(n,o,r);else if(n instanceof Le)this.walkAtLeastOneSep(n,o,r);else if(n instanceof _e)this.walkManySep(n,o,r);else if(n instanceof ue)this.walkMany(n,o,r);else if(n instanceof Ie)this.walkOr(n,o,r);else throw Error("non exhaustive match")})}walkTerminal(t,r,n){}walkProdRef(t,r,n){}walkFlat(t,r,n){let i=r.concat(n);this.walk(t,i)}walkOption(t,r,n){let i=r.concat(n);this.walk(t,i)}walkAtLeastOne(t,r,n){let i=[new Ee({definition:t.definition})].concat(r,n);this.walk(t,i)}walkAtLeastOneSep(t,r,n){let i=Lg(t,r,n);this.walk(t,i)}walkMany(t,r,n){let i=[new Ee({definition:t.definition})].concat(r,n);this.walk(t,i)}walkManySep(t,r,n){let i=Lg(t,r,n);this.walk(t,i)}walkOr(t,r,n){let i=r.concat(n);O(t.definition,o=>{let a=new ge({definition:[o]});this.walk(a,i)})}};function Lg(e,t,r){return[new Ee({definition:[new ie({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}function _n(e){if(e instanceof he)return _n(e.referencedRule);if(e instanceof ie)return y0(e);if(Gl(e))return g0(e);if(Hl(e))return x0(e);throw Error("non exhaustive match")}function g0(e){let t=[],r=e.definition,n=0,i=r.length>n,o,a=!0;for(;i&&a;)o=r[n],a=vn(o),t=t.concat(_n(o)),n=n+1,i=r.length>n;return _i(t)}function x0(e){let t=D(e.definition,r=>_n(r));return _i(qe(t))}function y0(e){return[e.terminalType]}var as="_~IN~_";var Wl=class extends Ar{constructor(t){super(),this.topProd=t,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(t,r,n){}walkProdRef(t,r,n){let i=E0(t.referencedRule,t.idx)+this.topProd.name,o=r.concat(n),a=new ge({definition:o}),s=_n(a);this.follows[i]=s}};function Pg(e){let t={};return O(e,r=>{let n=new Wl(r).startWalking();Ze(t,n)}),t}function E0(e,t){return e.name+t+as}function j(e){return e.charCodeAt(0)}function ss(e,t){Array.isArray(e)?e.forEach(function(r){t.push(r)}):t.push(e)}function Di(e,t){if(e[t]===!0)throw"duplicate flag "+t;let r=e[t];e[t]=!0}function In(e){if(e===void 0)throw Error("Internal Error - Should never get here!");return!0}function xo(){throw Error("Internal Error - Should never get here!")}function Kl(e){return e.type==="Character"}var yo=[];for(let e=j("0");e<=j("9");e++)yo.push(e);var Eo=[j("_")].concat(yo);for(let e=j("a");e<=j("z");e++)Eo.push(e);for(let e=j("A");e<=j("Z");e++)Eo.push(e);var Zl=[j(" "),j("\f"),j(`
|
|
55
|
-
`),j("\r"),j(" "),j("\v"),j(" "),j("\xA0"),j("\u1680"),j("\u2000"),j("\u2001"),j("\u2002"),j("\u2003"),j("\u2004"),j("\u2005"),j("\u2006"),j("\u2007"),j("\u2008"),j("\u2009"),j("\u200A"),j("\u2028"),j("\u2029"),j("\u202F"),j("\u205F"),j("\u3000"),j("\uFEFF")];var
|
|
56
|
-
`),j("\r"),j("\u2028"),j("\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 t,r=!1;switch(this.popChar()){case"d":t=
|
|
57
|
-
`);break;case"r":t=j("\r");break;case"t":t=j(" ");break;case"v":t=j("\v");break}return
|
|
58
|
-
`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let t=this.popChar();return{type:"Character",value:j(t)}}}characterClass(){let t=[],r=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),r=!0);this.isClassAtom();){let n=this.classAtom(),i=n.type==="Character";if(
|
|
59
|
-
`: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:j("\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 t=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),t=!1;break;default:this.groupIdx++;break}let r=this.disjunction();this.consumeChar(")");let n={type:"Group",capturing:t,value:r};return t&&(n.idx=this.groupIdx),n}positiveInteger(){let t=this.popChar();if(
|
|
60
|
-
`: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:j(t)}}}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
|
|
50
|
+
`;return n}function nC(e){let t=[],r=e[0]?.length||0;for(let n=0;n<r;n++){let i=!0;for(let o of e)if(o[n]!==""){i=!1;break}i&&t.push(n)}return t}import{log as Bc}from"remark-mdat";var iC=typeof global=="object"&&global&&global.Object===Object&&global,Ca=iC;var oC=typeof self=="object"&&self&&self.Object===Object&&self,aC=Ca||oC||Function("return this")(),Ne=aC;var sC=Ne.Symbol,Ve=sC;var wm=Object.prototype,uC=wm.hasOwnProperty,lC=wm.toString,to=Ve?Ve.toStringTag:void 0;function cC(e){var t=uC.call(e,to),r=e[to];try{e[to]=void 0;var n=!0}catch{}var i=lC.call(e);return n&&(t?e[to]=r:delete e[to]),i}var Sm=cC;var fC=Object.prototype,pC=fC.toString;function mC(e){return pC.call(e)}var _m=mC;var dC="[object Null]",hC="[object Undefined]",vm=Ve?Ve.toStringTag:void 0;function gC(e){return e==null?e===void 0?hC:dC:vm&&vm in Object(e)?Sm(e):_m(e)}var at=gC;function xC(e){return e!=null&&typeof e=="object"}var De=xC;var yC="[object Symbol]";function EC(e){return typeof e=="symbol"||De(e)&&at(e)==yC}var Ir=EC;function bC(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Ht=bC;var kC=Array.isArray,P=kC;var AC=1/0,Im=Ve?Ve.prototype:void 0,Dm=Im?Im.toString:void 0;function Rm(e){if(typeof e=="string")return e;if(P(e))return Ht(e,Rm)+"";if(Ir(e))return Dm?Dm.call(e):"";var t=e+"";return t=="0"&&1/e==-AC?"-0":t}var Fm=Rm;var TC=/\s/;function CC(e){for(var t=e.length;t--&&TC.test(e.charAt(t)););return t}var Om=CC;var wC=/^\s+/;function SC(e){return e&&e.slice(0,Om(e)+1).replace(wC,"")}var Nm=SC;function _C(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Te=_C;var Lm=NaN,vC=/^[-+]0x[0-9a-f]+$/i,IC=/^0b[01]+$/i,DC=/^0o[0-7]+$/i,RC=parseInt;function FC(e){if(typeof e=="number")return e;if(Ir(e))return Lm;if(Te(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Te(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Nm(e);var r=IC.test(e);return r||DC.test(e)?RC(e.slice(2),r?2:8):vC.test(e)?Lm:+e}var Pm=FC;var Mm=1/0,OC=17976931348623157e292;function NC(e){if(!e)return e===0?e:0;if(e=Pm(e),e===Mm||e===-Mm){var t=e<0?-1:1;return t*OC}return e===e?e:0}var Bm=NC;function LC(e){var t=Bm(e),r=t%1;return t===t?r?t-r:t:0}var Wt=LC;function PC(e){return e}var Dt=PC;var MC="[object AsyncFunction]",BC="[object Function]",UC="[object GeneratorFunction]",zC="[object Proxy]";function jC(e){if(!Te(e))return!1;var t=at(e);return t==BC||t==UC||t==MC||t==zC}var st=jC;var $C=Ne["__core-js_shared__"],wa=$C;var Um=function(){var e=/[^.]+$/.exec(wa&&wa.keys&&wa.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function qC(e){return!!Um&&Um in e}var zm=qC;var VC=Function.prototype,GC=VC.toString;function HC(e){if(e!=null){try{return GC.call(e)}catch{}try{return e+""}catch{}}return""}var dr=HC;var WC=/[\\^$.*+?()[\]{}|]/g,KC=/^\[object .+?Constructor\]$/,ZC=Function.prototype,YC=Object.prototype,XC=ZC.toString,JC=YC.hasOwnProperty,QC=RegExp("^"+XC.call(JC).replace(WC,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ew(e){if(!Te(e)||zm(e))return!1;var t=st(e)?QC:KC;return t.test(dr(e))}var jm=ew;function tw(e,t){return e?.[t]}var $m=tw;function rw(e,t){var r=$m(e,t);return jm(r)?r:void 0}var mt=rw;var nw=mt(Ne,"WeakMap"),Sa=nw;var qm=Object.create,iw=function(){function e(){}return function(t){if(!Te(t))return{};if(qm)return qm(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),Vm=iw;function ow(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Gm=ow;function aw(){}var Ce=aw;function sw(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var Hm=sw;var uw=800,lw=16,cw=Date.now;function fw(e){var t=0,r=0;return function(){var n=cw(),i=lw-(n-r);if(r=n,i>0){if(++t>=uw)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Wm=fw;function pw(e){return function(){return e}}var Km=pw;var mw=function(){try{var e=mt(Object,"defineProperty");return e({},"",{}),e}catch{}}(),ei=mw;var dw=ei?function(e,t){return ei(e,"toString",{configurable:!0,enumerable:!1,value:Km(t),writable:!0})}:Dt,Zm=dw;var hw=Wm(Zm),Ym=hw;function gw(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var _a=gw;function xw(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}var va=xw;function yw(e){return e!==e}var Xm=yw;function Ew(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var Jm=Ew;function bw(e,t,r){return t===t?Jm(e,t,r):va(e,Xm,r)}var ti=bw;function kw(e,t){var r=e==null?0:e.length;return!!r&&ti(e,t,0)>-1}var Ia=kw;var Aw=9007199254740991,Tw=/^(?:0|[1-9]\d*)$/;function Cw(e,t){var r=typeof e;return t=t??Aw,!!t&&(r=="number"||r!="symbol"&&Tw.test(e))&&e>-1&&e%1==0&&e<t}var Dr=Cw;function ww(e,t,r){t=="__proto__"&&ei?ei(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var ri=ww;function Sw(e,t){return e===t||e!==e&&t!==t}var Kt=Sw;var _w=Object.prototype,vw=_w.hasOwnProperty;function Iw(e,t,r){var n=e[t];(!(vw.call(e,t)&&Kt(n,r))||r===void 0&&!(t in e))&&ri(e,t,r)}var Rr=Iw;function Dw(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var s=t[o],u=n?n(r[s],e[s],s,r,e):void 0;u===void 0&&(u=e[s]),i?ri(r,s,u):Rr(r,s,u)}return r}var Zt=Dw;var Qm=Math.max;function Rw(e,t,r){return t=Qm(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=Qm(n.length-t,0),a=Array(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),Gm(e,this,s)}}var ed=Rw;function Fw(e,t){return Ym(ed(e,t,Dt),e+"")}var ni=Fw;var Ow=9007199254740991;function Nw(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ow}var ii=Nw;function Lw(e){return e!=null&&ii(e.length)&&!st(e)}var Le=Lw;function Pw(e,t,r){if(!Te(r))return!1;var n=typeof t;return(n=="number"?Le(r)&&Dr(t,r.length):n=="string"&&t in r)?Kt(r[t],e):!1}var Fr=Pw;function Mw(e){return ni(function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&Fr(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++n<i;){var s=r[n];s&&e(t,s,n,o)}return t})}var td=Mw;var Bw=Object.prototype;function Uw(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Bw;return e===r}var Yt=Uw;function zw(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var rd=zw;var jw="[object Arguments]";function $w(e){return De(e)&&at(e)==jw}var vl=$w;var nd=Object.prototype,qw=nd.hasOwnProperty,Vw=nd.propertyIsEnumerable,Gw=vl(function(){return arguments}())?vl:function(e){return De(e)&&qw.call(e,"callee")&&!Vw.call(e,"callee")},Or=Gw;function Hw(){return!1}var id=Hw;var sd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,od=sd&&typeof module=="object"&&module&&!module.nodeType&&module,Ww=od&&od.exports===sd,ad=Ww?Ne.Buffer:void 0,Kw=ad?ad.isBuffer:void 0,Zw=Kw||id,hr=Zw;var Yw="[object Arguments]",Xw="[object Array]",Jw="[object Boolean]",Qw="[object Date]",eS="[object Error]",tS="[object Function]",rS="[object Map]",nS="[object Number]",iS="[object Object]",oS="[object RegExp]",aS="[object Set]",sS="[object String]",uS="[object WeakMap]",lS="[object ArrayBuffer]",cS="[object DataView]",fS="[object Float32Array]",pS="[object Float64Array]",mS="[object Int8Array]",dS="[object Int16Array]",hS="[object Int32Array]",gS="[object Uint8Array]",xS="[object Uint8ClampedArray]",yS="[object Uint16Array]",ES="[object Uint32Array]",ye={};ye[fS]=ye[pS]=ye[mS]=ye[dS]=ye[hS]=ye[gS]=ye[xS]=ye[yS]=ye[ES]=!0;ye[Yw]=ye[Xw]=ye[lS]=ye[Jw]=ye[cS]=ye[Qw]=ye[eS]=ye[tS]=ye[rS]=ye[nS]=ye[iS]=ye[oS]=ye[aS]=ye[sS]=ye[uS]=!1;function bS(e){return De(e)&&ii(e.length)&&!!ye[at(e)]}var ud=bS;function kS(e){return function(t){return e(t)}}var Xt=kS;var ld=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ro=ld&&typeof module=="object"&&module&&!module.nodeType&&module,AS=ro&&ro.exports===ld,Il=AS&&Ca.process,TS=function(){try{var e=ro&&ro.require&&ro.require("util").types;return e||Il&&Il.binding&&Il.binding("util")}catch{}}(),Rt=TS;var cd=Rt&&Rt.isTypedArray,CS=cd?Xt(cd):ud,oi=CS;var wS=Object.prototype,SS=wS.hasOwnProperty;function _S(e,t){var r=P(e),n=!r&&Or(e),i=!r&&!n&&hr(e),o=!r&&!n&&!i&&oi(e),a=r||n||i||o,s=a?rd(e.length,String):[],u=s.length;for(var l in e)(t||SS.call(e,l))&&!(a&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Dr(l,u)))&&s.push(l);return s}var Da=_S;function vS(e,t){return function(r){return e(t(r))}}var Ra=vS;var IS=Ra(Object.keys,Object),fd=IS;var DS=Object.prototype,RS=DS.hasOwnProperty;function FS(e){if(!Yt(e))return fd(e);var t=[];for(var r in Object(e))RS.call(e,r)&&r!="constructor"&&t.push(r);return t}var Fa=FS;function OS(e){return Le(e)?Da(e):Fa(e)}var pe=OS;var NS=Object.prototype,LS=NS.hasOwnProperty,PS=td(function(e,t){if(Yt(t)||Le(t)){Zt(t,pe(t),e);return}for(var r in t)LS.call(t,r)&&Rr(e,r,t[r])}),We=PS;function MS(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var pd=MS;var BS=Object.prototype,US=BS.hasOwnProperty;function zS(e){if(!Te(e))return pd(e);var t=Yt(e),r=[];for(var n in e)n=="constructor"&&(t||!US.call(e,n))||r.push(n);return r}var md=zS;function jS(e){return Le(e)?Da(e,!0):md(e)}var Nr=jS;var $S=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qS=/^\w*$/;function VS(e,t){if(P(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Ir(e)?!0:qS.test(e)||!$S.test(e)||t!=null&&e in Object(t)}var ai=VS;var GS=mt(Object,"create"),gr=GS;function HS(){this.__data__=gr?gr(null):{},this.size=0}var dd=HS;function WS(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var hd=WS;var KS="__lodash_hash_undefined__",ZS=Object.prototype,YS=ZS.hasOwnProperty;function XS(e){var t=this.__data__;if(gr){var r=t[e];return r===KS?void 0:r}return YS.call(t,e)?t[e]:void 0}var gd=XS;var JS=Object.prototype,QS=JS.hasOwnProperty;function e_(e){var t=this.__data__;return gr?t[e]!==void 0:QS.call(t,e)}var xd=e_;var t_="__lodash_hash_undefined__";function r_(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=gr&&t===void 0?t_:t,this}var yd=r_;function si(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}si.prototype.clear=dd;si.prototype.delete=hd;si.prototype.get=gd;si.prototype.has=xd;si.prototype.set=yd;var Dl=si;function n_(){this.__data__=[],this.size=0}var Ed=n_;function i_(e,t){for(var r=e.length;r--;)if(Kt(e[r][0],t))return r;return-1}var Lr=i_;var o_=Array.prototype,a_=o_.splice;function s_(e){var t=this.__data__,r=Lr(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():a_.call(t,r,1),--this.size,!0}var bd=s_;function u_(e){var t=this.__data__,r=Lr(t,e);return r<0?void 0:t[r][1]}var kd=u_;function l_(e){return Lr(this.__data__,e)>-1}var Ad=l_;function c_(e,t){var r=this.__data__,n=Lr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Td=c_;function ui(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ui.prototype.clear=Ed;ui.prototype.delete=bd;ui.prototype.get=kd;ui.prototype.has=Ad;ui.prototype.set=Td;var Pr=ui;var f_=mt(Ne,"Map"),Mr=f_;function p_(){this.size=0,this.__data__={hash:new Dl,map:new(Mr||Pr),string:new Dl}}var Cd=p_;function m_(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var wd=m_;function d_(e,t){var r=e.__data__;return wd(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Br=d_;function h_(e){var t=Br(this,e).delete(e);return this.size-=t?1:0,t}var Sd=h_;function g_(e){return Br(this,e).get(e)}var _d=g_;function x_(e){return Br(this,e).has(e)}var vd=x_;function y_(e,t){var r=Br(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Id=y_;function li(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}li.prototype.clear=Cd;li.prototype.delete=Sd;li.prototype.get=_d;li.prototype.has=vd;li.prototype.set=Id;var kn=li;var E_="Expected a function";function Rl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(E_);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Rl.Cache||kn),r}Rl.Cache=kn;var Dd=Rl;var b_=500;function k_(e){var t=Dd(e,function(n){return r.size===b_&&r.clear(),n}),r=t.cache;return t}var Rd=k_;var A_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,T_=/\\(\\)?/g,C_=Rd(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(A_,function(r,n,i,o){t.push(i?o.replace(T_,"$1"):n||r)}),t}),Fd=C_;function w_(e){return e==null?"":Fm(e)}var Od=w_;function S_(e,t){return P(e)?e:ai(e,t)?[e]:Fd(Od(e))}var Ur=S_;var __=1/0;function v_(e){if(typeof e=="string"||Ir(e))return e;var t=e+"";return t=="0"&&1/e==-__?"-0":t}var Jt=v_;function I_(e,t){t=Ur(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Jt(t[r++])];return r&&r==n?e:void 0}var ci=I_;function D_(e,t,r){var n=e==null?void 0:ci(e,t);return n===void 0?r:n}var Nd=D_;function R_(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var fi=R_;var Ld=Ve?Ve.isConcatSpreadable:void 0;function F_(e){return P(e)||Or(e)||!!(Ld&&e&&e[Ld])}var Pd=F_;function Md(e,t,r,n,i){var o=-1,a=e.length;for(r||(r=Pd),i||(i=[]);++o<a;){var s=e[o];t>0&&r(s)?t>1?Md(s,t-1,r,n,i):fi(i,s):n||(i[i.length]=s)}return i}var pi=Md;function O_(e){var t=e==null?0:e.length;return t?pi(e,1):[]}var je=O_;var N_=Ra(Object.getPrototypeOf,Object),Oa=N_;function L_(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=e[n+t];return o}var Na=L_;function P_(e,t,r,n){var i=-1,o=e==null?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}var Bd=P_;function M_(){this.__data__=new Pr,this.size=0}var Ud=M_;function B_(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var zd=B_;function U_(e){return this.__data__.get(e)}var jd=U_;function z_(e){return this.__data__.has(e)}var $d=z_;var j_=200;function $_(e,t){var r=this.__data__;if(r instanceof Pr){var n=r.__data__;if(!Mr||n.length<j_-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new kn(n)}return r.set(e,t),this.size=r.size,this}var qd=$_;function mi(e){var t=this.__data__=new Pr(e);this.size=t.size}mi.prototype.clear=Ud;mi.prototype.delete=zd;mi.prototype.get=jd;mi.prototype.has=$d;mi.prototype.set=qd;var zr=mi;function q_(e,t){return e&&Zt(t,pe(t),e)}var Vd=q_;function V_(e,t){return e&&Zt(t,Nr(t),e)}var Gd=V_;var Zd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Hd=Zd&&typeof module=="object"&&module&&!module.nodeType&&module,G_=Hd&&Hd.exports===Zd,Wd=G_?Ne.Buffer:void 0,Kd=Wd?Wd.allocUnsafe:void 0;function H_(e,t){if(t)return e.slice();var r=e.length,n=Kd?Kd(r):new e.constructor(r);return e.copy(n),n}var Yd=H_;function W_(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}var di=W_;function K_(){return[]}var La=K_;var Z_=Object.prototype,Y_=Z_.propertyIsEnumerable,Xd=Object.getOwnPropertySymbols,X_=Xd?function(e){return e==null?[]:(e=Object(e),di(Xd(e),function(t){return Y_.call(e,t)}))}:La,hi=X_;function J_(e,t){return Zt(e,hi(e),t)}var Jd=J_;var Q_=Object.getOwnPropertySymbols,ev=Q_?function(e){for(var t=[];e;)fi(t,hi(e)),e=Oa(e);return t}:La,Pa=ev;function tv(e,t){return Zt(e,Pa(e),t)}var Qd=tv;function rv(e,t,r){var n=t(e);return P(e)?n:fi(n,r(e))}var Ma=rv;function nv(e){return Ma(e,pe,hi)}var no=nv;function iv(e){return Ma(e,Nr,Pa)}var Ba=iv;var ov=mt(Ne,"DataView"),Ua=ov;var av=mt(Ne,"Promise"),za=av;var sv=mt(Ne,"Set"),jr=sv;var eh="[object Map]",uv="[object Object]",th="[object Promise]",rh="[object Set]",nh="[object WeakMap]",ih="[object DataView]",lv=dr(Ua),cv=dr(Mr),fv=dr(za),pv=dr(jr),mv=dr(Sa),An=at;(Ua&&An(new Ua(new ArrayBuffer(1)))!=ih||Mr&&An(new Mr)!=eh||za&&An(za.resolve())!=th||jr&&An(new jr)!=rh||Sa&&An(new Sa)!=nh)&&(An=function(e){var t=at(e),r=t==uv?e.constructor:void 0,n=r?dr(r):"";if(n)switch(n){case lv:return ih;case cv:return eh;case fv:return th;case pv:return rh;case mv:return nh}return t});var Pt=An;var dv=Object.prototype,hv=dv.hasOwnProperty;function gv(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&hv.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var oh=gv;var xv=Ne.Uint8Array,gi=xv;function yv(e){var t=new e.constructor(e.byteLength);return new gi(t).set(new gi(e)),t}var xi=yv;function Ev(e,t){var r=t?xi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var ah=Ev;var bv=/\w*$/;function kv(e){var t=new e.constructor(e.source,bv.exec(e));return t.lastIndex=e.lastIndex,t}var sh=kv;var uh=Ve?Ve.prototype:void 0,lh=uh?uh.valueOf:void 0;function Av(e){return lh?Object(lh.call(e)):{}}var ch=Av;function Tv(e,t){var r=t?xi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var fh=Tv;var Cv="[object Boolean]",wv="[object Date]",Sv="[object Map]",_v="[object Number]",vv="[object RegExp]",Iv="[object Set]",Dv="[object String]",Rv="[object Symbol]",Fv="[object ArrayBuffer]",Ov="[object DataView]",Nv="[object Float32Array]",Lv="[object Float64Array]",Pv="[object Int8Array]",Mv="[object Int16Array]",Bv="[object Int32Array]",Uv="[object Uint8Array]",zv="[object Uint8ClampedArray]",jv="[object Uint16Array]",$v="[object Uint32Array]";function qv(e,t,r){var n=e.constructor;switch(t){case Fv:return xi(e);case Cv:case wv:return new n(+e);case Ov:return ah(e,r);case Nv:case Lv:case Pv:case Mv:case Bv:case Uv:case zv:case jv:case $v:return fh(e,r);case Sv:return new n;case _v:case Dv:return new n(e);case vv:return sh(e);case Iv:return new n;case Rv:return ch(e)}}var ph=qv;function Vv(e){return typeof e.constructor=="function"&&!Yt(e)?Vm(Oa(e)):{}}var mh=Vv;var Gv="[object Map]";function Hv(e){return De(e)&&Pt(e)==Gv}var dh=Hv;var hh=Rt&&Rt.isMap,Wv=hh?Xt(hh):dh,gh=Wv;var Kv="[object Set]";function Zv(e){return De(e)&&Pt(e)==Kv}var xh=Zv;var yh=Rt&&Rt.isSet,Yv=yh?Xt(yh):xh,Eh=Yv;var Xv=1,Jv=2,Qv=4,bh="[object Arguments]",eI="[object Array]",tI="[object Boolean]",rI="[object Date]",nI="[object Error]",kh="[object Function]",iI="[object GeneratorFunction]",oI="[object Map]",aI="[object Number]",Ah="[object Object]",sI="[object RegExp]",uI="[object Set]",lI="[object String]",cI="[object Symbol]",fI="[object WeakMap]",pI="[object ArrayBuffer]",mI="[object DataView]",dI="[object Float32Array]",hI="[object Float64Array]",gI="[object Int8Array]",xI="[object Int16Array]",yI="[object Int32Array]",EI="[object Uint8Array]",bI="[object Uint8ClampedArray]",kI="[object Uint16Array]",AI="[object Uint32Array]",me={};me[bh]=me[eI]=me[pI]=me[mI]=me[tI]=me[rI]=me[dI]=me[hI]=me[gI]=me[xI]=me[yI]=me[oI]=me[aI]=me[Ah]=me[sI]=me[uI]=me[lI]=me[cI]=me[EI]=me[bI]=me[kI]=me[AI]=!0;me[nI]=me[kh]=me[fI]=!1;function ja(e,t,r,n,i,o){var a,s=t&Xv,u=t&Jv,l=t&Qv;if(r&&(a=i?r(e,n,i,o):r(e)),a!==void 0)return a;if(!Te(e))return e;var c=P(e);if(c){if(a=oh(e),!s)return Hm(e,a)}else{var f=Pt(e),p=f==kh||f==iI;if(hr(e))return Yd(e,s);if(f==Ah||f==bh||p&&!i){if(a=u||p?{}:mh(e),!s)return u?Qd(e,Gd(a,e)):Jd(e,Vd(a,e))}else{if(!me[f])return i?e:{};a=ph(e,f,s)}}o||(o=new zr);var m=o.get(e);if(m)return m;o.set(e,a),Eh(e)?e.forEach(function(C){a.add(ja(C,t,r,C,e,o))}):gh(e)&&e.forEach(function(C,x){a.set(x,ja(C,t,r,x,e,o))});var h=l?u?Ba:no:u?Nr:pe,E=c?void 0:h(e);return _a(E||e,function(C,x){E&&(x=C,C=e[x]),Rr(a,x,ja(C,t,r,x,e,o))}),a}var Th=ja;var TI=4;function CI(e){return Th(e,TI)}var de=CI;function wI(e){for(var t=-1,r=e==null?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i}var Qt=wI;var SI="__lodash_hash_undefined__";function _I(e){return this.__data__.set(e,SI),this}var Ch=_I;function vI(e){return this.__data__.has(e)}var wh=vI;function $a(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new kn;++t<r;)this.add(e[t])}$a.prototype.add=$a.prototype.push=Ch;$a.prototype.has=wh;var yi=$a;function II(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var qa=II;function DI(e,t){return e.has(t)}var Ei=DI;var RI=1,FI=2;function OI(e,t,r,n,i,o){var a=r&RI,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var l=o.get(e),c=o.get(t);if(l&&c)return l==t&&c==e;var f=-1,p=!0,m=r&FI?new yi:void 0;for(o.set(e,t),o.set(t,e);++f<s;){var h=e[f],E=t[f];if(n)var C=a?n(E,h,f,t,e,o):n(h,E,f,e,t,o);if(C!==void 0){if(C)continue;p=!1;break}if(m){if(!qa(t,function(x,k){if(!Ei(m,k)&&(h===x||i(h,x,r,n,o)))return m.push(k)})){p=!1;break}}else if(!(h===E||i(h,E,r,n,o))){p=!1;break}}return o.delete(e),o.delete(t),p}var Va=OI;function NI(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var Sh=NI;function LI(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var bi=LI;var PI=1,MI=2,BI="[object Boolean]",UI="[object Date]",zI="[object Error]",jI="[object Map]",$I="[object Number]",qI="[object RegExp]",VI="[object Set]",GI="[object String]",HI="[object Symbol]",WI="[object ArrayBuffer]",KI="[object DataView]",_h=Ve?Ve.prototype:void 0,Fl=_h?_h.valueOf:void 0;function ZI(e,t,r,n,i,o,a){switch(r){case KI:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case WI:return!(e.byteLength!=t.byteLength||!o(new gi(e),new gi(t)));case BI:case UI:case $I:return Kt(+e,+t);case zI:return e.name==t.name&&e.message==t.message;case qI:case GI:return e==t+"";case jI:var s=Sh;case VI:var u=n&PI;if(s||(s=bi),e.size!=t.size&&!u)return!1;var l=a.get(e);if(l)return l==t;n|=MI,a.set(e,t);var c=Va(s(e),s(t),n,i,o,a);return a.delete(e),c;case HI:if(Fl)return Fl.call(e)==Fl.call(t)}return!1}var vh=ZI;var YI=1,XI=Object.prototype,JI=XI.hasOwnProperty;function QI(e,t,r,n,i,o){var a=r&YI,s=no(e),u=s.length,l=no(t),c=l.length;if(u!=c&&!a)return!1;for(var f=u;f--;){var p=s[f];if(!(a?p in t:JI.call(t,p)))return!1}var m=o.get(e),h=o.get(t);if(m&&h)return m==t&&h==e;var E=!0;o.set(e,t),o.set(t,e);for(var C=a;++f<u;){p=s[f];var x=e[p],k=t[p];if(n)var y=a?n(k,x,p,t,e,o):n(x,k,p,e,t,o);if(!(y===void 0?x===k||i(x,k,r,n,o):y)){E=!1;break}C||(C=p=="constructor")}if(E&&!C){var S=e.constructor,_=t.constructor;S!=_&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof _=="function"&&_ instanceof _)&&(E=!1)}return o.delete(e),o.delete(t),E}var Ih=QI;var eD=1,Dh="[object Arguments]",Rh="[object Array]",Ga="[object Object]",tD=Object.prototype,Fh=tD.hasOwnProperty;function rD(e,t,r,n,i,o){var a=P(e),s=P(t),u=a?Rh:Pt(e),l=s?Rh:Pt(t);u=u==Dh?Ga:u,l=l==Dh?Ga:l;var c=u==Ga,f=l==Ga,p=u==l;if(p&&hr(e)){if(!hr(t))return!1;a=!0,c=!1}if(p&&!c)return o||(o=new zr),a||oi(e)?Va(e,t,r,n,i,o):vh(e,t,u,r,n,i,o);if(!(r&eD)){var m=c&&Fh.call(e,"__wrapped__"),h=f&&Fh.call(t,"__wrapped__");if(m||h){var E=m?e.value():e,C=h?t.value():t;return o||(o=new zr),i(E,C,r,n,o)}}return p?(o||(o=new zr),Ih(e,t,r,n,i,o)):!1}var Oh=rD;function Nh(e,t,r,n,i){return e===t?!0:e==null||t==null||!De(e)&&!De(t)?e!==e&&t!==t:Oh(e,t,r,n,Nh,i)}var Ha=Nh;var nD=1,iD=2;function oD(e,t,r,n){var i=r.length,o=i,a=!n;if(e==null)return!o;for(e=Object(e);i--;){var s=r[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){s=r[i];var u=s[0],l=e[u],c=s[1];if(a&&s[2]){if(l===void 0&&!(u in e))return!1}else{var f=new zr;if(n)var p=n(l,c,u,e,t,f);if(!(p===void 0?Ha(c,l,nD|iD,n,f):p))return!1}}return!0}var Lh=oD;function aD(e){return e===e&&!Te(e)}var Wa=aD;function sD(e){for(var t=pe(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Wa(i)]}return t}var Ph=sD;function uD(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var Ka=uD;function lD(e){var t=Ph(e);return t.length==1&&t[0][2]?Ka(t[0][0],t[0][1]):function(r){return r===e||Lh(r,e,t)}}var Mh=lD;function cD(e,t){return e!=null&&t in Object(e)}var Bh=cD;function fD(e,t,r){t=Ur(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var a=Jt(t[n]);if(!(o=e!=null&&r(e,a)))break;e=e[a]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&ii(i)&&Dr(a,i)&&(P(e)||Or(e)))}var Za=fD;function pD(e,t){return e!=null&&Za(e,t,Bh)}var Uh=pD;var mD=1,dD=2;function hD(e,t){return ai(e)&&Wa(t)?Ka(Jt(e),t):function(r){var n=Nd(r,e);return n===void 0&&n===t?Uh(r,e):Ha(t,n,mD|dD)}}var zh=hD;function gD(e){return function(t){return t?.[e]}}var jh=gD;function xD(e){return function(t){return ci(t,e)}}var $h=xD;function yD(e){return ai(e)?jh(Jt(e)):$h(e)}var qh=yD;function ED(e){return typeof e=="function"?e:e==null?Dt:typeof e=="object"?P(e)?zh(e[0],e[1]):Mh(e):qh(e)}var Pe=ED;function bD(e,t,r,n){for(var i=-1,o=e==null?0:e.length;++i<o;){var a=e[i];t(n,a,r(a),e)}return n}var Vh=bD;function kD(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var u=a[e?s:++i];if(r(o[u],u,o)===!1)break}return t}}var Gh=kD;var AD=Gh(),Hh=AD;function TD(e,t){return e&&Hh(e,t,pe)}var Wh=TD;function CD(e,t){return function(r,n){if(r==null)return r;if(!Le(r))return e(r,n);for(var i=r.length,o=t?i:-1,a=Object(r);(t?o--:++o<i)&&n(a[o],o,a)!==!1;);return r}}var Kh=CD;var wD=Kh(Wh),dt=wD;function SD(e,t,r,n){return dt(e,function(i,o,a){t(n,i,r(i),a)}),n}var Zh=SD;function _D(e,t){return function(r,n){var i=P(r)?Vh:Zh,o=t?t():{};return i(r,e,Pe(n,2),o)}}var Yh=_D;var Xh=Object.prototype,vD=Xh.hasOwnProperty,ID=ni(function(e,t){e=Object(e);var r=-1,n=t.length,i=n>2?t[2]:void 0;for(i&&Fr(t[0],t[1],i)&&(n=1);++r<n;)for(var o=t[r],a=Nr(o),s=-1,u=a.length;++s<u;){var l=a[s],c=e[l];(c===void 0||Kt(c,Xh[l])&&!vD.call(e,l))&&(e[l]=o[l])}return e}),ki=ID;function DD(e){return De(e)&&Le(e)}var Ol=DD;function RD(e,t,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}var Ya=RD;var FD=200;function OD(e,t,r,n){var i=-1,o=Ia,a=!0,s=e.length,u=[],l=t.length;if(!s)return u;r&&(t=Ht(t,Xt(r))),n?(o=Ya,a=!1):t.length>=FD&&(o=Ei,a=!1,t=new yi(t));e:for(;++i<s;){var c=e[i],f=r==null?c:r(c);if(c=n||c!==0?c:0,a&&f===f){for(var p=l;p--;)if(t[p]===f)continue e;u.push(c)}else o(t,f,n)||u.push(c)}return u}var Jh=OD;var ND=ni(function(e,t){return Ol(e)?Jh(e,pi(t,1,Ol,!0)):[]}),$r=ND;function LD(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var er=LD;function PD(e,t,r){var n=e==null?0:e.length;return n?(t=r||t===void 0?1:Wt(t),Na(e,t<0?0:t,n)):[]}var Re=PD;function MD(e,t,r){var n=e==null?0:e.length;return n?(t=r||t===void 0?1:Wt(t),t=n-t,Na(e,0,t<0?0:t)):[]}var xr=MD;function BD(e){return typeof e=="function"?e:Dt}var Qh=BD;function UD(e,t){var r=P(e)?_a:dt;return r(e,Qh(t))}var O=UD;function zD(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var eg=zD;function jD(e,t){var r=!0;return dt(e,function(n,i,o){return r=!!t(n,i,o),r}),r}var tg=jD;function $D(e,t,r){var n=P(e)?eg:tg;return r&&Fr(e,t,r)&&(t=void 0),n(e,Pe(t,3))}var Qe=$D;function qD(e,t){var r=[];return dt(e,function(n,i,o){t(n,i,o)&&r.push(n)}),r}var Xa=qD;function VD(e,t){var r=P(e)?di:Xa;return r(e,Pe(t,3))}var et=VD;function GD(e){return function(t,r,n){var i=Object(t);if(!Le(t)){var o=Pe(r,3);t=pe(t),r=function(s){return o(i[s],s,i)}}var a=e(t,r,n);return a>-1?i[o?t[a]:a]:void 0}}var rg=GD;var HD=Math.max;function WD(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:Wt(r);return i<0&&(i=HD(n+i,0)),va(e,Pe(t,3),i)}var ng=WD;var KD=rg(ng),tr=KD;function ZD(e){return e&&e.length?e[0]:void 0}var Ge=ZD;function YD(e,t){var r=-1,n=Le(e)?Array(e.length):[];return dt(e,function(i,o,a){n[++r]=t(i,o,a)}),n}var ig=YD;function XD(e,t){var r=P(e)?Ht:ig;return r(e,Pe(t,3))}var R=XD;function JD(e,t){return pi(R(e,t),1)}var ut=JD;var QD=Object.prototype,eR=QD.hasOwnProperty,tR=Yh(function(e,t,r){eR.call(e,r)?e[r].push(t):ri(e,r,[t])}),Nl=tR;var rR=Object.prototype,nR=rR.hasOwnProperty;function iR(e,t){return e!=null&&nR.call(e,t)}var og=iR;function oR(e,t){return e!=null&&Za(e,t,og)}var N=oR;var aR="[object String]";function sR(e){return typeof e=="string"||!P(e)&&De(e)&&at(e)==aR}var $e=sR;function uR(e,t){return Ht(t,function(r){return e[r]})}var ag=uR;function lR(e){return e==null?[]:ag(e,pe(e))}var le=lR;var cR=Math.max;function fR(e,t,r,n){e=Le(e)?e:le(e),r=r&&!n?Wt(r):0;var i=e.length;return r<0&&(r=cR(i+r,0)),$e(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&ti(e,t,r)>-1}var be=fR;var pR=Math.max;function mR(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:Wt(r);return i<0&&(i=pR(n+i,0)),ti(e,t,i)}var Ja=mR;var dR="[object Map]",hR="[object Set]",gR=Object.prototype,xR=gR.hasOwnProperty;function yR(e){if(e==null)return!0;if(Le(e)&&(P(e)||typeof e=="string"||typeof e.splice=="function"||hr(e)||oi(e)||Or(e)))return!e.length;var t=Pt(e);if(t==dR||t==hR)return!e.size;if(Yt(e))return!Fa(e).length;for(var r in e)if(xR.call(e,r))return!1;return!0}var X=yR;var ER="[object RegExp]";function bR(e){return De(e)&&at(e)==ER}var sg=bR;var ug=Rt&&Rt.isRegExp,kR=ug?Xt(ug):sg,Ft=kR;function AR(e){return e===void 0}var tt=AR;var TR="Expected a function";function CR(e){if(typeof e!="function")throw new TypeError(TR);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}var lg=CR;function wR(e,t,r,n){if(!Te(e))return e;t=Ur(t,e);for(var i=-1,o=t.length,a=o-1,s=e;s!=null&&++i<o;){var u=Jt(t[i]),l=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=a){var c=s[u];l=n?n(c,u,s):void 0,l===void 0&&(l=Te(c)?c:Dr(t[i+1])?[]:{})}Rr(s,u,l),s=s[u]}return e}var cg=wR;function SR(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var a=t[n],s=ci(e,a);r(s,a)&&cg(o,Ur(a,e),s)}return o}var fg=SR;function _R(e,t){if(e==null)return{};var r=Ht(Ba(e),function(n){return[n]});return t=Pe(t),fg(e,r,function(n,i){return t(n,i[0])})}var ht=_R;function vR(e,t,r,n,i){return i(e,function(o,a,s){r=n?(n=!1,o):t(r,o,a,s)}),r}var pg=vR;function IR(e,t,r){var n=P(e)?Bd:pg,i=arguments.length<3;return n(e,Pe(t,4),r,i,dt)}var Me=IR;function DR(e,t){var r=P(e)?di:Xa;return r(e,lg(Pe(t,3)))}var qr=DR;function RR(e,t){var r;return dt(e,function(n,i,o){return r=t(n,i,o),!r}),!!r}var mg=RR;function FR(e,t,r){var n=P(e)?qa:mg;return r&&Fr(e,t,r)&&(t=void 0),n(e,Pe(t,3))}var io=FR;var OR=1/0,NR=jr&&1/bi(new jr([,-0]))[1]==OR?function(e){return new jr(e)}:Ce,dg=NR;var LR=200;function PR(e,t,r){var n=-1,i=Ia,o=e.length,a=!0,s=[],u=s;if(r)a=!1,i=Ya;else if(o>=LR){var l=t?null:dg(e);if(l)return bi(l);a=!1,i=Ei,u=new yi}else u=t?[]:s;e:for(;++n<o;){var c=e[n],f=t?t(c):c;if(c=r||c!==0?c:0,a&&f===f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),s.push(c)}else i(u,f,r)||(u!==s&&u.push(f),s.push(c))}return s}var hg=PR;function MR(e){return e&&e.length?hg(e):[]}var Ai=MR;function Ti(e){console&&console.error&&console.error(`Error: ${e}`)}function oo(e){console&&console.warn&&console.warn(`Warning: ${e}`)}function ao(e){let t=new Date().getTime(),r=e();return{time:new Date().getTime()-t,value:r}}function so(e){function t(){}t.prototype=e;let r=new t;function n(){return typeof r.bar}return n(),n(),e;(0,eval)(e)}function BR(e){return UR(e)?e.LABEL:e.name}function UR(e){return $e(e.LABEL)&&e.LABEL!==""}var Ct=class{get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){this._definition=t}accept(t){t.visit(this),O(this.definition,r=>{r.accept(t)})}},he=class extends Ct{constructor(t){super([]),this.idx=1,We(this,ht(t,r=>r!==void 0))}set definition(t){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(t){t.visit(this)}},lt=class extends Ct{constructor(t){super(t.definition),this.orgText="",We(this,ht(t,r=>r!==void 0))}},ge=class extends Ct{constructor(t){super(t.definition),this.ignoreAmbiguities=!1,We(this,ht(t,r=>r!==void 0))}},Ee=class extends Ct{constructor(t){super(t.definition),this.idx=1,We(this,ht(t,r=>r!==void 0))}},Fe=class extends Ct{constructor(t){super(t.definition),this.idx=1,We(this,ht(t,r=>r!==void 0))}},Oe=class extends Ct{constructor(t){super(t.definition),this.idx=1,We(this,ht(t,r=>r!==void 0))}},ue=class extends Ct{constructor(t){super(t.definition),this.idx=1,We(this,ht(t,r=>r!==void 0))}},Se=class extends Ct{constructor(t){super(t.definition),this.idx=1,We(this,ht(t,r=>r!==void 0))}},_e=class extends Ct{get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){super(t.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,We(this,ht(t,r=>r!==void 0))}},ie=class{constructor(t){this.idx=1,We(this,ht(t,r=>r!==void 0))}accept(t){t.visit(this)}};function Qa(e){return R(e,Ci)}function Ci(e){function t(r){return R(r,Ci)}if(e instanceof he){let r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return $e(e.label)&&(r.label=e.label),r}else{if(e instanceof ge)return{type:"Alternative",definition:t(e.definition)};if(e instanceof Ee)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Fe)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof Oe)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:Ci(new ie({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Se)return{type:"RepetitionWithSeparator",idx:e.idx,separator:Ci(new ie({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof ue)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof _e)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof ie){let r={type:"Terminal",name:e.terminalType.name,label:BR(e.terminalType),idx:e.idx};$e(e.label)&&(r.terminalLabel=e.label);let n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(r.pattern=Ft(n)?n.source:n),r}else{if(e instanceof lt)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}}}var ct=class{visit(t){let r=t;switch(r.constructor){case he:return this.visitNonTerminal(r);case ge:return this.visitAlternative(r);case Ee:return this.visitOption(r);case Fe:return this.visitRepetitionMandatory(r);case Oe:return this.visitRepetitionMandatoryWithSeparator(r);case Se:return this.visitRepetitionWithSeparator(r);case ue:return this.visitRepetition(r);case _e:return this.visitAlternation(r);case ie:return this.visitTerminal(r);case lt:return this.visitRule(r);default:throw Error("non exhaustive match")}}visitNonTerminal(t){}visitAlternative(t){}visitOption(t){}visitRepetition(t){}visitRepetitionMandatory(t){}visitRepetitionMandatoryWithSeparator(t){}visitRepetitionWithSeparator(t){}visitAlternation(t){}visitTerminal(t){}visitRule(t){}};function Ll(e){return e instanceof ge||e instanceof Ee||e instanceof ue||e instanceof Fe||e instanceof Oe||e instanceof Se||e instanceof ie||e instanceof lt}function Tn(e,t=[]){return e instanceof Ee||e instanceof ue||e instanceof Se?!0:e instanceof _e?io(e.definition,n=>Tn(n,t)):e instanceof he&&be(t,e)?!1:e instanceof Ct?(e instanceof he&&t.push(e),Qe(e.definition,n=>Tn(n,t))):!1}function Pl(e){return e instanceof _e}function gt(e){if(e instanceof he)return"SUBRULE";if(e instanceof Ee)return"OPTION";if(e instanceof _e)return"OR";if(e instanceof Fe)return"AT_LEAST_ONE";if(e instanceof Oe)return"AT_LEAST_ONE_SEP";if(e instanceof Se)return"MANY_SEP";if(e instanceof ue)return"MANY";if(e instanceof ie)return"CONSUME";throw Error("non exhaustive match")}var yr=class{walk(t,r=[]){O(t.definition,(n,i)=>{let o=Re(t.definition,i+1);if(n instanceof he)this.walkProdRef(n,o,r);else if(n instanceof ie)this.walkTerminal(n,o,r);else if(n instanceof ge)this.walkFlat(n,o,r);else if(n instanceof Ee)this.walkOption(n,o,r);else if(n instanceof Fe)this.walkAtLeastOne(n,o,r);else if(n instanceof Oe)this.walkAtLeastOneSep(n,o,r);else if(n instanceof Se)this.walkManySep(n,o,r);else if(n instanceof ue)this.walkMany(n,o,r);else if(n instanceof _e)this.walkOr(n,o,r);else throw Error("non exhaustive match")})}walkTerminal(t,r,n){}walkProdRef(t,r,n){}walkFlat(t,r,n){let i=r.concat(n);this.walk(t,i)}walkOption(t,r,n){let i=r.concat(n);this.walk(t,i)}walkAtLeastOne(t,r,n){let i=[new Ee({definition:t.definition})].concat(r,n);this.walk(t,i)}walkAtLeastOneSep(t,r,n){let i=gg(t,r,n);this.walk(t,i)}walkMany(t,r,n){let i=[new Ee({definition:t.definition})].concat(r,n);this.walk(t,i)}walkManySep(t,r,n){let i=gg(t,r,n);this.walk(t,i)}walkOr(t,r,n){let i=r.concat(n);O(t.definition,o=>{let a=new ge({definition:[o]});this.walk(a,i)})}};function gg(e,t,r){return[new Ee({definition:[new ie({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}function Cn(e){if(e instanceof he)return Cn(e.referencedRule);if(e instanceof ie)return $R(e);if(Ll(e))return zR(e);if(Pl(e))return jR(e);throw Error("non exhaustive match")}function zR(e){let t=[],r=e.definition,n=0,i=r.length>n,o,a=!0;for(;i&&a;)o=r[n],a=Tn(o),t=t.concat(Cn(o)),n=n+1,i=r.length>n;return Ai(t)}function jR(e){let t=R(e.definition,r=>Cn(r));return Ai(je(t))}function $R(e){return[e.terminalType]}var es="_~IN~_";var Ml=class extends yr{constructor(t){super(),this.topProd=t,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(t,r,n){}walkProdRef(t,r,n){let i=qR(t.referencedRule,t.idx)+this.topProd.name,o=r.concat(n),a=new ge({definition:o}),s=Cn(a);this.follows[i]=s}};function xg(e){let t={};return O(e,r=>{let n=new Ml(r).startWalking();We(t,n)}),t}function qR(e,t){return e.name+t+es}function j(e){return e.charCodeAt(0)}function ts(e,t){Array.isArray(e)?e.forEach(function(r){t.push(r)}):t.push(e)}function wi(e,t){if(e[t]===!0)throw"duplicate flag "+t;let r=e[t];e[t]=!0}function wn(e){if(e===void 0)throw Error("Internal Error - Should never get here!");return!0}function uo(){throw Error("Internal Error - Should never get here!")}function Bl(e){return e.type==="Character"}var lo=[];for(let e=j("0");e<=j("9");e++)lo.push(e);var co=[j("_")].concat(lo);for(let e=j("a");e<=j("z");e++)co.push(e);for(let e=j("A");e<=j("Z");e++)co.push(e);var Ul=[j(" "),j("\f"),j(`
|
|
51
|
+
`),j("\r"),j(" "),j("\v"),j(" "),j("\xA0"),j("\u1680"),j("\u2000"),j("\u2001"),j("\u2002"),j("\u2003"),j("\u2004"),j("\u2005"),j("\u2006"),j("\u2007"),j("\u2008"),j("\u2009"),j("\u200A"),j("\u2028"),j("\u2029"),j("\u202F"),j("\u205F"),j("\u3000"),j("\uFEFF")];var VR=/[0-9a-fA-F]/,rs=/[0-9]/,GR=/[1-9]/,fo=class{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(t){this.idx=t.idx,this.input=t.input,this.groupIdx=t.groupIdx}pattern(t){this.idx=0,this.input=t,this.groupIdx=0,this.consumeChar("/");let r=this.disjunction();this.consumeChar("/");let n={type:"Flags",loc:{begin:this.idx,end:t.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":wi(n,"global");break;case"i":wi(n,"ignoreCase");break;case"m":wi(n,"multiLine");break;case"u":wi(n,"unicode");break;case"y":wi(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 t=[],r=this.idx;for(t.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t,loc:this.loc(r)}}alternative(){let t=[],r=this.idx;for(;this.isTerm();)t.push(this.term());return{type:"Alternative",value:t,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let t=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(t)};case"$":return{type:"EndAnchor",loc:this.loc(t)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(t)};case"B":return{type:"NonWordBoundary",loc:this.loc(t)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break}wn(r);let n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(t)}}return uo()}quantifier(t=!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(t===!0&&r===void 0)return;wn(r);break}if(!(t===!0&&r===void 0)&&wn(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let t,r=this.idx;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group();break}return t===void 0&&this.isPatternCharacter()&&(t=this.patternCharacter()),wn(t)?(t.loc=this.loc(r),this.isQuantifier()&&(t.quantifier=this.quantifier()),t):uo()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[j(`
|
|
52
|
+
`),j("\r"),j("\u2028"),j("\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 t,r=!1;switch(this.popChar()){case"d":t=lo;break;case"D":t=lo,r=!0;break;case"s":t=Ul;break;case"S":t=Ul,r=!0;break;case"w":t=co;break;case"W":t=co,r=!0;break}return wn(t)?{type:"Set",value:t,complement:r}:uo()}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=j("\f");break;case"n":t=j(`
|
|
53
|
+
`);break;case"r":t=j("\r");break;case"t":t=j(" ");break;case"v":t=j("\v");break}return wn(t)?{type:"Character",value:t}:uo()}controlLetterEscapeAtom(){this.consumeChar("c");let t=this.popChar();if(/[a-zA-Z]/.test(t)===!1)throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:j("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let t=this.popChar();return{type:"Character",value:j(t)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
|
54
|
+
`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let t=this.popChar();return{type:"Character",value:j(t)}}}characterClass(){let t=[],r=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),r=!0);this.isClassAtom();){let n=this.classAtom(),i=n.type==="Character";if(Bl(n)&&this.isRangeDash()){this.consumeChar("-");let o=this.classAtom(),a=o.type==="Character";if(Bl(o)){if(o.value<n.value)throw Error("Range out of order in character class");t.push({from:n.value,to:o.value})}else ts(n.value,t),t.push(j("-")),ts(o.value,t)}else ts(n.value,t)}return this.consumeChar("]"),{type:"Set",complement:r,value:t}}classAtom(){switch(this.peekChar()){case"]":case`
|
|
55
|
+
`: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:j("\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 t=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),t=!1;break;default:this.groupIdx++;break}let r=this.disjunction();this.consumeChar(")");let n={type:"Group",capturing:t,value:r};return t&&(n.idx=this.groupIdx),n}positiveInteger(){let t=this.popChar();if(GR.test(t)===!1)throw Error("Expecting a positive integer");for(;rs.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}integerIncludingZero(){let t=this.popChar();if(rs.test(t)===!1)throw Error("Expecting an integer");for(;rs.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}patternCharacter(){let t=this.popChar();switch(t){case`
|
|
56
|
+
`: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:j(t)}}}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 rs.test(this.peekChar(0))}isClassAtom(t=0){switch(this.peekChar(t)){case"]":case`
|
|
61
57
|
`: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 t=this.saveState();try{return this.quantifier(!0)!==void 0}catch{return!1}finally{this.restoreState(t)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case`
|
|
62
|
-
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(t){let r="";for(let i=0;i<t;i++){let o=this.popChar();if(
|
|
63
|
-
`;function
|
|
58
|
+
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(t){let r="";for(let i=0;i<t;i++){let o=this.popChar();if(VR.test(o)===!1)throw Error("Expecting a HexDecimal digits");r+=o}return{type:"Character",value:parseInt(r,16)}}peekChar(t=0){return this.input[this.idx+t]}popChar(){let t=this.peekChar(0);return this.consumeChar(void 0),t}consumeChar(t){if(t!==void 0&&this.input[this.idx]!==t)throw Error("Expected: '"+t+"' 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(t){return{begin:t,end:this.idx}}};var Vr=class{visitChildren(t){for(let r in t){let n=t[r];t.hasOwnProperty(r)&&(n.type!==void 0?this.visit(n):Array.isArray(n)&&n.forEach(i=>{this.visit(i)},this))}}visit(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t);break}this.visitChildren(t)}visitPattern(t){}visitFlags(t){}visitDisjunction(t){}visitAlternative(t){}visitStartAnchor(t){}visitEndAnchor(t){}visitWordBoundary(t){}visitNonWordBoundary(t){}visitLookahead(t){}visitNegativeLookahead(t){}visitCharacter(t){}visitSet(t){}visitGroup(t){}visitGroupBackReference(t){}visitQuantifier(t){}};var ns={},HR=new fo;function Si(e){let t=e.toString();if(ns.hasOwnProperty(t))return ns[t];{let r=HR.pattern(t);return ns[t]=r,r}}function yg(){ns={}}var bg="Complement Sets are not supported for first char optimization",po=`Unable to use "first char" lexer optimizations:
|
|
59
|
+
`;function kg(e,t=!1){try{let r=Si(e);return zl(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===bg)t&&oo(`${po} Unable to optimize: < ${e.toString()} >
|
|
64
60
|
Complement Sets cannot be automatically optimized.
|
|
65
61
|
This will disable the lexer's first char optimizations.
|
|
66
62
|
See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";t&&(n=`
|
|
67
63
|
This will disable the lexer's first char optimizations.
|
|
68
|
-
See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),
|
|
64
|
+
See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),Ti(`${po}
|
|
69
65
|
Failed parsing: < ${e.toString()} >
|
|
70
66
|
Using the @chevrotain/regexp-to-ast library
|
|
71
|
-
Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function
|
|
72
|
-
`],tracer:(k,y)=>y()});let r=t.tracer;r("initCharCodeToOptimizedIndexMap",()=>{
|
|
67
|
+
Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function zl(e,t,r){switch(e.type){case"Disjunction":for(let i=0;i<e.value.length;i++)zl(e.value[i],t,r);break;case"Alternative":let n=e.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 a=o;switch(a.type){case"Character":is(a.value,t,r);break;case"Set":if(a.complement===!0)throw Error(bg);O(a.value,u=>{if(typeof u=="number")is(u,t,r);else{let l=u;if(r===!0)for(let c=l.from;c<=l.to;c++)is(c,t,r);else{for(let c=l.from;c<=l.to&&c<_i;c++)is(c,t,r);if(l.to>=_i){let c=l.from>=_i?l.from:_i,f=l.to,p=rr(c),m=rr(f);for(let h=p;h<=m;h++)t[h]=h}}}});break;case"Group":zl(a.value,t,r);break;default:throw Error("Non Exhaustive Match")}let s=a.quantifier!==void 0&&a.quantifier.atLeast===0;if(a.type==="Group"&&jl(a)===!1||a.type!=="Group"&&s===!1)break}break;default:throw Error("non exhaustive match!")}return le(t)}function is(e,t,r){let n=rr(e);t[n]=n,r===!0&&WR(e,t)}function WR(e,t){let r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){let i=rr(n.charCodeAt(0));t[i]=i}else{let i=r.toLowerCase();if(i!==r){let o=rr(i.charCodeAt(0));t[o]=o}}}function Eg(e,t){return tr(e.value,r=>{if(typeof r=="number")return be(t,r);{let n=r;return tr(t,i=>n.from<=i&&i<=n.to)!==void 0}})}function jl(e){let t=e.quantifier;return t&&t.atLeast===0?!0:e.value?P(e.value)?Qe(e.value,jl):jl(e.value):!1}var $l=class extends Vr{constructor(t){super(),this.targetCharCodes=t,this.found=!1}visitChildren(t){if(this.found!==!0){switch(t.type){case"Lookahead":this.visitLookahead(t);return;case"NegativeLookahead":this.visitNegativeLookahead(t);return}super.visitChildren(t)}}visitCharacter(t){be(this.targetCharCodes,t.value)&&(this.found=!0)}visitSet(t){t.complement?Eg(t,this.targetCharCodes)===void 0&&(this.found=!0):Eg(t,this.targetCharCodes)!==void 0&&(this.found=!0)}};function os(e,t){if(t instanceof RegExp){let r=Si(t),n=new $l(e);return n.visit(r),n.found}else return tr(t,r=>be(e,r.charCodeAt(0)))!==void 0}var Sn="PATTERN",vi="defaultMode",as="modes",Vl=typeof new RegExp("(?:)").sticky=="boolean";function Cg(e,t){t=ki(t,{useSticky:Vl,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
|
|
68
|
+
`],tracer:(k,y)=>y()});let r=t.tracer;r("initCharCodeToOptimizedIndexMap",()=>{f1()});let n;r("Reject Lexer.NA",()=>{n=qr(e,k=>k[Sn]===ee.NA)});let i=!1,o;r("Transform Patterns",()=>{i=!1,o=R(n,k=>{let y=k[Sn];if(Ft(y)){let S=y.source;return S.length===1&&S!=="^"&&S!=="$"&&S!=="."&&!y.ignoreCase?S:S.length===2&&S[0]==="\\"&&!be(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],S[1])?S[1]:t.useSticky?Tg(y):Ag(y)}else{if(st(y))return i=!0,{exec:y};if(typeof y=="object")return i=!0,y;if(typeof y=="string"){if(y.length===1)return y;{let S=y.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),_=new RegExp(S);return t.useSticky?Tg(_):Ag(_)}}else throw Error("non exhaustive match")}})});let a,s,u,l,c;r("misc mapping",()=>{a=R(n,k=>k.tokenTypeIdx),s=R(n,k=>{let y=k.GROUP;if(y!==ee.SKIPPED){if($e(y))return y;if(tt(y))return!1;throw Error("non exhaustive match")}}),u=R(n,k=>{let y=k.LONGER_ALT;if(y)return P(y)?R(y,_=>Ja(n,_)):[Ja(n,y)]}),l=R(n,k=>k.PUSH_MODE),c=R(n,k=>N(k,"POP_MODE"))});let f;r("Line Terminator Handling",()=>{let k=Fg(t.lineTerminatorCharacters);f=R(n,y=>!1),t.positionTracking!=="onlyOffset"&&(f=R(n,y=>N(y,"LINE_BREAKS")?!!y.LINE_BREAKS:Rg(y,k)===!1&&os(k,y.PATTERN)))});let p,m,h,E;r("Misc Mapping #2",()=>{p=R(n,Ig),m=R(o,l1),h=Me(n,(k,y)=>{let S=y.GROUP;return $e(S)&&S!==ee.SKIPPED&&(k[S]=[]),k},{}),E=R(o,(k,y)=>({pattern:o[y],longerAlt:u[y],canLineTerminator:f[y],isCustom:p[y],short:m[y],group:s[y],push:l[y],pop:c[y],tokenTypeIdx:a[y],tokenType:n[y]}))});let C=!0,x=[];return t.safeMode||r("First Char Optimization",()=>{x=Me(n,(k,y,S)=>{if(typeof y.PATTERN=="string"){let _=y.PATTERN.charCodeAt(0),A=rr(_);ql(k,A,E[S])}else if(P(y.START_CHARS_HINT)){let _;O(y.START_CHARS_HINT,A=>{let te=typeof A=="string"?A.charCodeAt(0):A,J=rr(te);_!==J&&(_=J,ql(k,J,E[S]))})}else if(Ft(y.PATTERN))if(y.PATTERN.unicode)C=!1,t.ensureOptimizations&&Ti(`${po} Unable to analyze < ${y.PATTERN.toString()} > pattern.
|
|
73
69
|
The regexp unicode flag is not currently supported by the regexp-to-ast library.
|
|
74
70
|
This will disable the lexer's first char optimizations.
|
|
75
|
-
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let
|
|
71
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let _=kg(y.PATTERN,t.ensureOptimizations);X(_)&&(C=!1),O(_,A=>{ql(k,A,E[S])})}else t.ensureOptimizations&&Ti(`${po} TokenType: <${y.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
|
|
76
72
|
This will disable the lexer's first char optimizations.
|
|
77
|
-
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),C=!1;return k},[])}),{emptyGroups:h,patternIdxToConfig:E,charCodeToPatternIdxToConfig:x,hasCustom:i,canBeOptimized:C}}function
|
|
73
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),C=!1;return k},[])}),{emptyGroups:h,patternIdxToConfig:E,charCodeToPatternIdxToConfig:x,hasCustom:i,canBeOptimized:C}}function wg(e,t){let r=[],n=ZR(e);r=r.concat(n.errors);let i=YR(n.valid),o=i.valid;return r=r.concat(i.errors),r=r.concat(KR(o)),r=r.concat(i1(o)),r=r.concat(o1(o,t)),r=r.concat(a1(o)),r}function KR(e){let t=[],r=et(e,n=>Ft(n[Sn]));return t=t.concat(JR(r)),t=t.concat(t1(r)),t=t.concat(r1(r)),t=t.concat(n1(r)),t=t.concat(QR(r)),t}function ZR(e){let t=et(e,i=>!N(i,Sn)),r=R(t,i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:ke.MISSING_PATTERN,tokenTypes:[i]})),n=$r(e,t);return{errors:r,valid:n}}function YR(e){let t=et(e,i=>{let o=i[Sn];return!Ft(o)&&!st(o)&&!N(o,"exec")&&!$e(o)}),r=R(t,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=$r(e,t);return{errors:r,valid:n}}var XR=/[^\\][$]/;function JR(e){class t extends Vr{constructor(){super(...arguments),this.found=!1}visitEndAnchor(o){this.found=!0}}let r=et(e,i=>{let o=i.PATTERN;try{let a=Si(o),s=new t;return s.visit(a),s.found}catch{return XR.test(o.source)}});return R(r,i=>({message:`Unexpected RegExp Anchor Error:
|
|
78
74
|
Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
|
|
79
|
-
See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:
|
|
75
|
+
See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:ke.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function QR(e){let t=et(e,n=>n.PATTERN.test(""));return R(t,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:ke.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}var e1=/[^\\[][\^]|^\^/;function t1(e){class t extends Vr{constructor(){super(...arguments),this.found=!1}visitStartAnchor(o){this.found=!0}}let r=et(e,i=>{let o=i.PATTERN;try{let a=Si(o),s=new t;return s.visit(a),s.found}catch{return e1.test(o.source)}});return R(r,i=>({message:`Unexpected RegExp Anchor Error:
|
|
80
76
|
Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
|
|
81
|
-
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:
|
|
77
|
+
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:ke.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function r1(e){let t=et(e,n=>{let i=n[Sn];return i instanceof RegExp&&(i.multiline||i.global)});return R(t,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:ke.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}function n1(e){let t=[],r=R(e,o=>Me(e,(a,s)=>(o.PATTERN.source===s.PATTERN.source&&!be(t,s)&&s.PATTERN!==ee.NA&&(t.push(s),a.push(s)),a),[]));r=Qt(r);let n=et(r,o=>o.length>1);return R(n,o=>{let a=R(o,u=>u.name);return{message:`The same RegExp pattern ->${Ge(o).PATTERN}<-has been used in all of the following Token Types: ${a.join(", ")} <-`,type:ke.DUPLICATE_PATTERNS_FOUND,tokenTypes:o}})}function i1(e){let t=et(e,n=>{if(!N(n,"GROUP"))return!1;let i=n.GROUP;return i!==ee.SKIPPED&&i!==ee.NA&&!$e(i)});return R(t,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 o1(e,t){let r=et(e,i=>i.PUSH_MODE!==void 0&&!be(t,i.PUSH_MODE));return R(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 a1(e){let t=[],r=Me(e,(n,i,o)=>{let a=i.PATTERN;return a===ee.NA||($e(a)?n.push({str:a,idx:o,tokenType:i}):Ft(a)&&u1(a)&&n.push({str:a.source,idx:o,tokenType:i})),n},[]);return O(e,(n,i)=>{O(r,({str:o,idx:a,tokenType:s})=>{if(i<a&&s1(o,n.PATTERN)){let u=`Token: ->${s.name}<- can never be matched.
|
|
82
78
|
Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition.
|
|
83
|
-
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:u,type:
|
|
84
|
-
`,type:
|
|
85
|
-
`,type:
|
|
86
|
-
`,type:
|
|
87
|
-
`,type:
|
|
88
|
-
`,type:
|
|
79
|
+
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:u,type:ke.UNREACHABLE_PATTERN,tokenTypes:[n,s]})}})}),t}function s1(e,t){if(Ft(t)){let r=t.exec(e);return r!==null&&r.index===0}else{if(st(t))return t(e,0,[],{});if(N(t,"exec"))return t.exec(e,0,[],{});if(typeof t=="string")return t===e;throw Error("non exhaustive match")}}function u1(e){return tr([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>e.source.indexOf(r)!==-1)===void 0}function Ag(e){let t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}function Tg(e){let t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}function Sg(e,t,r){let n=[];return N(e,vi)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+vi+`> property in its definition
|
|
80
|
+
`,type:ke.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),N(e,as)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+as+`> property in its definition
|
|
81
|
+
`,type:ke.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),N(e,as)&&N(e,vi)&&!N(e.modes,e.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${vi}: <${e.defaultMode}>which does not exist
|
|
82
|
+
`,type:ke.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),N(e,as)&&O(e.modes,(i,o)=>{O(i,(a,s)=>{if(tt(a))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${o}> at index: <${s}>
|
|
83
|
+
`,type:ke.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(N(a,"LONGER_ALT")){let u=P(a.LONGER_ALT)?a.LONGER_ALT:[a.LONGER_ALT];O(u,l=>{!tt(l)&&!be(i,l)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${l.name}> on token <${a.name}> outside of mode <${o}>
|
|
84
|
+
`,type:ke.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}function _g(e,t,r){let n=[],i=!1,o=Qt(je(le(e.modes))),a=qr(o,u=>u[Sn]===ee.NA),s=Fg(r);return t&&O(a,u=>{let l=Rg(u,s);if(l!==!1){let f={message:c1(u,l),type:l.issue,tokenType:u};n.push(f)}else N(u,"LINE_BREAKS")?u.LINE_BREAKS===!0&&(i=!0):os(s,u.PATTERN)&&(i=!0)}),t&&!i&&n.push({message:`Warning: No LINE_BREAKS Found.
|
|
89
85
|
This Lexer has been defined to track line and column information,
|
|
90
86
|
But none of the Token Types can be identified as matching a line terminator.
|
|
91
87
|
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
|
|
92
|
-
for details.`,type:
|
|
88
|
+
for details.`,type:ke.NO_LINE_BREAKS_FLAGS}),n}function vg(e){let t={},r=pe(e);return O(r,n=>{let i=e[n];if(P(i))t[n]=[];else throw Error("non exhaustive match")}),t}function Ig(e){let t=e.PATTERN;if(Ft(t))return!1;if(st(t))return!0;if(N(t,"exec"))return!0;if($e(t))return!1;throw Error("non exhaustive match")}function l1(e){return $e(e)&&e.length===1?e.charCodeAt(0):!1}var Dg={test:function(e){let t=e.length;for(let r=this.lastIndex;r<t;r++){let n=e.charCodeAt(r);if(n===10)return this.lastIndex=r+1,!0;if(n===13)return e.charCodeAt(r+1)===10?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},lastIndex:0};function Rg(e,t){if(N(e,"LINE_BREAKS"))return!1;if(Ft(e.PATTERN)){try{os(t,e.PATTERN)}catch(r){return{issue:ke.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if($e(e.PATTERN))return!1;if(Ig(e))return{issue:ke.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function c1(e,t){if(t.issue===ke.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
|
|
93
89
|
The problem is in the <${e.name}> Token Type
|
|
94
90
|
Root cause: ${t.errMsg}.
|
|
95
|
-
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===
|
|
91
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===ke.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
|
|
96
92
|
The problem is in the <${e.name}> Token Type
|
|
97
|
-
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function
|
|
98
|
-
`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:
|
|
99
|
-
a boolean 2nd argument is no longer supported`);this.config=
|
|
100
|
-
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),P(t)?i={modes:{defaultMode:de(t)},defaultMode:
|
|
93
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function Fg(e){return R(e,r=>$e(r)?r.charCodeAt(0):r)}function ql(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}var _i=256,ss=[];function rr(e){return e<_i?e:ss[e]}function f1(){if(X(ss)){ss=new Array(65536);for(let e=0;e<65536;e++)ss[e]=e>255?255+~~(e/255):e}}function Er(e,t){let r=e.tokenTypeIdx;return r===t.tokenTypeIdx?!0:t.isParent===!0&&t.categoryMatchesMap[r]===!0}function Ii(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}var Og=1,Lg={};function br(e){let t=p1(e);m1(t),h1(t),d1(t),O(t,r=>{r.isParent=r.categoryMatches.length>0})}function p1(e){let t=de(e),r=e,n=!0;for(;n;){r=Qt(je(R(r,o=>o.CATEGORIES)));let i=$r(r,t);t=t.concat(i),X(i)?n=!1:r=i}return t}function m1(e){O(e,t=>{Gl(t)||(Lg[Og]=t,t.tokenTypeIdx=Og++),Ng(t)&&!P(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),Ng(t)||(t.CATEGORIES=[]),g1(t)||(t.categoryMatches=[]),x1(t)||(t.categoryMatchesMap={})})}function d1(e){O(e,t=>{t.categoryMatches=[],O(t.categoryMatchesMap,(r,n)=>{t.categoryMatches.push(Lg[n].tokenTypeIdx)})})}function h1(e){O(e,t=>{Pg([],t)})}function Pg(e,t){O(e,r=>{t.categoryMatchesMap[r.tokenTypeIdx]=!0}),O(t.CATEGORIES,r=>{let n=e.concat(t);be(n,r)||Pg(n,r)})}function Gl(e){return N(e,"tokenTypeIdx")}function Ng(e){return N(e,"CATEGORIES")}function g1(e){return N(e,"categoryMatches")}function x1(e){return N(e,"categoryMatchesMap")}function Mg(e){return N(e,"tokenTypeIdx")}var Hl={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,r,n,i){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`}};var ke;(function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(ke||(ke={}));var mo={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
|
|
94
|
+
`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Hl,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(mo);var ee=class{constructor(t,r=mo){if(this.lexerDefinition=t,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 a=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${a}--> <${i}>`);let{time:s,value:u}=ao(o),l=s>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&l(`${a}<-- <${i}> time: ${s}ms`),this.traceInitIndent--,u}else return o()},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
|
|
95
|
+
a boolean 2nd argument is no longer supported`);this.config=We({},mo,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===mo.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Dg;else if(this.config.lineTerminatorCharacters===mo.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
|
|
96
|
+
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),P(t)?i={modes:{defaultMode:de(t)},defaultMode:vi}:(o=!1,i=de(t))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Sg(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(_g(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},O(i.modes,(s,u)=>{i.modes[u]=qr(s,l=>tt(l))});let a=pe(i.modes);if(O(i.modes,(s,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(wg(s,a))}),X(this.lexerDefinitionErrors)){br(s);let l;this.TRACE_INIT("analyzeTokenTypes",()=>{l=Cg(s,{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=We({},this.emptyGroups,l.emptyGroups),this.hasCustom=l.hasCustom||this.hasCustom,this.canModeBeOptimized[u]=l.canBeOptimized}})}),this.defaultMode=i.defaultMode,!X(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let u=R(this.lexerDefinitionErrors,l=>l.message).join(`-----------------------
|
|
101
97
|
`);throw new Error(`Errors detected in definition of Lexer:
|
|
102
|
-
`+u)}O(this.lexerDefinitionWarning,s=>{
|
|
98
|
+
`+u)}O(this.lexerDefinitionWarning,s=>{oo(s.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(Vl?(this.chopInput=Dt,this.match=this.matchWithTest):(this.updateLastIndex=Ce,this.match=this.matchWithExec),o&&(this.handleModes=Ce),this.trackStartLines===!1&&(this.computeNewColumn=Dt),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=Ce),/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 s=Me(this.canModeBeOptimized,(u,l,c)=>(l===!1&&u.push(c),u),[]);if(r.ensureOptimizations&&!X(s))throw Error(`Lexer Modes: < ${s.join(", ")} > cannot be optimized.
|
|
103
99
|
Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
|
|
104
|
-
Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{
|
|
100
|
+
Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{yg()}),this.TRACE_INIT("toFastProperties",()=>{so(this)})})}tokenize(t,r=this.defaultMode){if(!X(this.lexerDefinitionErrors)){let i=R(this.lexerDefinitionErrors,o=>o.message).join(`-----------------------
|
|
105
101
|
`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
|
|
106
|
-
`+i)}return this.tokenizeInternal(t,r)}tokenizeInternal(t,r){let n,i,o,a,s,u,l,c,f,p,m,h,E,C,x,k,y=t,S=y.length,
|
|
107
|
-
See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return N(e,
|
|
108
|
-
but found: '`+
|
|
109
|
-
${
|
|
102
|
+
`+i)}return this.tokenizeInternal(t,r)}tokenizeInternal(t,r){let n,i,o,a,s,u,l,c,f,p,m,h,E,C,x,k,y=t,S=y.length,_=0,A=0,te=this.hasCustom?0:Math.floor(t.length/10),J=new Array(te),re=[],b=this.trackStartLines?1:void 0,ce=this.trackStartLines?1:void 0,Q=vg(this.emptyGroups),B=this.trackStartLines,V=this.config.lineTerminatorsPattern,G=0,ae=[],xe=[],Ke=[],xt=[];Object.freeze(xt);let d;function rt(){return ae}function wt(ve){let se=rr(ve),St=xe[se];return St===void 0?xt:St}let g=ve=>{if(Ke.length===1&&ve.tokenType.PUSH_MODE===void 0){let se=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(ve);re.push({offset:ve.startOffset,line:ve.startLine,column:ve.startColumn,length:ve.image.length,message:se})}else{Ke.pop();let se=er(Ke);ae=this.patternIdxToConfig[se],xe=this.charCodeToPatternIdxToConfig[se],G=ae.length;let St=this.canModeBeOptimized[se]&&this.config.safeMode===!1;xe&&St?d=wt:d=rt}};function Ze(ve){Ke.push(ve),xe=this.charCodeToPatternIdxToConfig[ve],ae=this.patternIdxToConfig[ve],G=ae.length,G=ae.length;let se=this.canModeBeOptimized[ve]&&this.config.safeMode===!1;xe&&se?d=wt:d=rt}Ze.call(this,r);let Be,Fn=this.config.recoveryEnabled;for(;_<S;){u=null;let ve=y.charCodeAt(_),se=d(ve),St=se.length;for(n=0;n<St;n++){Be=se[n];let Ae=Be.pattern;l=null;let He=Be.short;if(He!==!1?ve===He&&(u=Ae):Be.isCustom===!0?(k=Ae.exec(y,_,J,Q),k!==null?(u=k[0],k.payload!==void 0&&(l=k.payload)):u=null):(this.updateLastIndex(Ae,_),u=this.match(Ae,t,_)),u!==null){if(s=Be.longerAlt,s!==void 0){let nt=s.length;for(o=0;o<nt;o++){let yt=ae[s[o]],nr=yt.pattern;if(c=null,yt.isCustom===!0?(k=nr.exec(y,_,J,Q),k!==null?(a=k[0],k.payload!==void 0&&(c=k.payload)):a=null):(this.updateLastIndex(nr,_),a=this.match(nr,t,_)),a&&a.length>u.length){u=a,l=c,Be=yt;break}}}break}}if(u!==null){if(f=u.length,p=Be.group,p!==void 0&&(m=Be.tokenTypeIdx,h=this.createTokenInstance(u,_,m,Be.tokenType,b,ce,f),this.handlePayload(h,l),p===!1?A=this.addToken(J,A,h):Q[p].push(h)),t=this.chopInput(t,f),_=_+f,ce=this.computeNewColumn(ce,f),B===!0&&Be.canLineTerminator===!0){let Ae=0,He,nt;V.lastIndex=0;do He=V.test(u),He===!0&&(nt=V.lastIndex-1,Ae++);while(He===!0);Ae!==0&&(b=b+Ae,ce=f-nt,this.updateTokenEndLineColumnLocation(h,p,nt,Ae,b,ce,f))}this.handleModes(Be,g,Ze,h)}else{let Ae=_,He=b,nt=ce,yt=Fn===!1;for(;yt===!1&&_<S;)for(t=this.chopInput(t,1),_++,i=0;i<G;i++){let nr=ae[i],On=nr.pattern,Mi=nr.short;if(Mi!==!1?y.charCodeAt(_)===Mi&&(yt=!0):nr.isCustom===!0?yt=On.exec(y,_,J,Q)!==null:(this.updateLastIndex(On,_),yt=On.exec(t)!==null),yt===!0)break}if(E=_-Ae,ce=this.computeNewColumn(ce,E),x=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(y,Ae,E,He,nt),re.push({offset:Ae,line:He,column:nt,length:E,message:x}),Fn===!1)break}}return this.hasCustom||(J.length=A),{tokens:J,groups:Q,errors:re}}handleModes(t,r,n,i){if(t.pop===!0){let o=t.push;r(i),o!==void 0&&n.call(this,o)}else t.push!==void 0&&n.call(this,t.push)}chopInput(t,r){return t.substring(r)}updateLastIndex(t,r){t.lastIndex=r}updateTokenEndLineColumnLocation(t,r,n,i,o,a,s){let u,l;r!==void 0&&(u=n===s-1,l=u?-1:0,i===1&&u===!0||(t.endLine=o+l,t.endColumn=a-1+-l))}computeNewColumn(t,r){return t+r}createOffsetOnlyToken(t,r,n,i){return{image:t,startOffset:r,tokenTypeIdx:n,tokenType:i}}createStartOnlyToken(t,r,n,i,o,a){return{image:t,startOffset:r,startLine:o,startColumn:a,tokenTypeIdx:n,tokenType:i}}createFullToken(t,r,n,i,o,a,s){return{image:t,startOffset:r,endOffset:r+s-1,startLine:o,endLine:o,startColumn:a,endColumn:a+s-1,tokenTypeIdx:n,tokenType:i}}addTokenUsingPush(t,r,n){return t.push(n),r}addTokenUsingMemberAccess(t,r,n){return t[r]=n,r++,r}handlePayloadNoCustom(t,r){}handlePayloadWithCustom(t,r){r!==null&&(t.payload=r)}matchWithTest(t,r,n){return t.test(r)===!0?r.substring(n,t.lastIndex):null}matchWithExec(t,r){let n=t.exec(r);return n!==null?n[0]:null}};ee.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.";ee.NA=/NOT_APPLICABLE/;function _n(e){return Wl(e)?e.LABEL:e.name}function Wl(e){return $e(e.LABEL)&&e.LABEL!==""}var y1="parent",Bg="categories",Ug="label",zg="group",jg="push_mode",$g="pop_mode",qg="longer_alt",Vg="line_breaks",Gg="start_chars_hint";function H(e){return E1(e)}function E1(e){let t=e.pattern,r={};if(r.name=e.name,tt(t)||(r.PATTERN=t),N(e,y1))throw`The parent property is no longer supported.
|
|
103
|
+
See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return N(e,Bg)&&(r.CATEGORIES=e[Bg]),br([r]),N(e,Ug)&&(r.LABEL=e[Ug]),N(e,zg)&&(r.GROUP=e[zg]),N(e,$g)&&(r.POP_MODE=e[$g]),N(e,jg)&&(r.PUSH_MODE=e[jg]),N(e,qg)&&(r.LONGER_ALT=e[qg]),N(e,Vg)&&(r.LINE_BREAKS=e[Vg]),N(e,Gg)&&(r.START_CHARS_HINT=e[Gg]),r}var Mt=H({name:"EOF",pattern:ee.NA});br([Mt]);function vn(e,t,r,n,i,o,a,s){return{image:t,startOffset:r,endOffset:n,startLine:i,endLine:o,startColumn:a,endColumn:s,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function Kl(e,t){return Er(e,t)}var us={buildMismatchTokenMessage({expected:e,actual:t,previous:r,ruleName:n}){return`Expecting ${Wl(e)?`--> ${_n(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:r,customUserDescription:n,ruleName:i}){let o="Expecting: ",s=`
|
|
104
|
+
but found: '`+Ge(t).image+"'";if(n)return o+n+s;{let u=Me(e,(p,m)=>p.concat(m),[]),l=R(u,p=>`[${R(p,m=>_n(m)).join(", ")}]`),f=`one of these possible Token sequences:
|
|
105
|
+
${R(l,(p,m)=>` ${m+1}. ${p}`).join(`
|
|
110
106
|
`)}`;return o+f+s}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r,ruleName:n}){let i="Expecting: ",a=`
|
|
111
|
-
but found: '`+
|
|
112
|
-
<${
|
|
113
|
-
inside top level rule: ->`+e.name+"<-"}}
|
|
107
|
+
but found: '`+Ge(t).image+"'";if(r)return i+r+a;{let u=`expecting at least one iteration which starts with one of these possible Token sequences::
|
|
108
|
+
<${R(e,l=>`[${R(l,c=>_n(c)).join(",")}]`).join(" ,")}>`;return i+u+a}}};Object.freeze(us);var Hg={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<-
|
|
109
|
+
inside top level rule: ->`+e.name+"<-"}},Bt={buildDuplicateFoundError(e,t){function r(c){return c instanceof ie?c.terminalType.name:c instanceof he?c.nonTerminalName:""}let n=e.name,i=Ge(t),o=i.idx,a=gt(i),s=r(i),u=o>0,l=`->${a}${u?o:""}<- ${s?`with argument: ->${s}<-`:""}
|
|
114
110
|
appears more than once (${t.length} times) in the top level rule: ->${n}<-.
|
|
115
111
|
For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES
|
|
116
112
|
`;return l=l.replace(/[ \t]+/g," "),l=l.replace(/\s\s+/g,`
|
|
@@ -118,67 +114,67 @@ inside top level rule: ->`+e.name+"<-"}},$t={buildDuplicateFoundError(e,t){funct
|
|
|
118
114
|
The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.
|
|
119
115
|
To resolve this make sure each Terminal and Non-Terminal names are unique
|
|
120
116
|
This is easy to accomplish by using the convention that Terminal names start with an uppercase letter
|
|
121
|
-
and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(e){let t=
|
|
117
|
+
and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(e){let t=R(e.prefixPath,i=>_n(i)).join(", "),r=e.alternation.idx===0?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix
|
|
122
118
|
in <OR${r}> inside <${e.topLevelRule.name}> Rule,
|
|
123
119
|
<${t}> may appears as a prefix path in all these alternatives.
|
|
124
120
|
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX
|
|
125
|
-
For Further details.`},buildAlternationAmbiguityError(e){let t=
|
|
121
|
+
For Further details.`},buildAlternationAmbiguityError(e){let t=R(e.prefixPath,i=>_n(i)).join(", "),r=e.alternation.idx===0?"":e.alternation.idx,n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in <OR${r}> inside <${e.topLevelRule.name}> Rule,
|
|
126
122
|
<${t}> may appears as a prefix path in all these alternatives.
|
|
127
123
|
`;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
|
|
128
|
-
For Further details.`,n},buildEmptyRepetitionError(e){let t=
|
|
124
|
+
For Further details.`,n},buildEmptyRepetitionError(e){let t=gt(e.repetition);return e.repetition.idx!==0&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.
|
|
129
125
|
This could lead to an infinite loop.`},buildTokenNameError(e){return"deprecated"},buildEmptyAlternationError(e){return`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in <OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.
|
|
130
126
|
Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(e){return`An Alternation cannot have more than 256 alternatives:
|
|
131
127
|
<OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.
|
|
132
|
-
has ${e.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(e){let t=e.topLevelRule.name,r=
|
|
128
|
+
has ${e.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(e){let t=e.topLevelRule.name,r=R(e.leftRecursionPath,o=>o.name),n=`${t} --> ${r.concat([t]).join(" --> ")}`;return`Left Recursion found in grammar.
|
|
133
129
|
rule: <${t}> can be invoked from itself (directly or indirectly)
|
|
134
130
|
without consuming any Tokens. The grammar path that causes this is:
|
|
135
131
|
${n}
|
|
136
132
|
To fix this refactor your grammar to remove the left recursion.
|
|
137
|
-
see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return"deprecated"},buildDuplicateRuleNameError(e){let t;return e.topLevelRule instanceof ft?t=e.topLevelRule.name:t=e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};function px(e,t){let r=new oc(e,t);return r.resolveRefs(),r.errors}var oc=class extends pt{constructor(t,r){super(),this.nameToTopRule=t,this.errMsgProvider=r,this.errors=[]}resolveRefs(){O(le(this.nameToTopRule),t=>{this.currTopLevel=t,t.accept(this)})}visitNonTerminal(t){let r=this.nameToTopRule[t.nonTerminalName];if(r)t.referencedRule=r;else{let n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:n,type:Ge.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}}};var ac=class extends Ar{constructor(t,r){super(),this.topProd=t,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=de(this.path.ruleStack).reverse(),this.occurrenceStack=de(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(t,r=[]){this.found||super.walk(t,r)}walkProdRef(t,r,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){let i=r.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,i)}}updateExpectedNext(){X(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},hs=class extends ac{constructor(t,r){super(t,r),this.path=r,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(t,r,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){let i=r.concat(n),o=new ge({definition:i});this.possibleTokTypes=_n(o),this.found=!0}}},Pi=class extends Ar{constructor(t,r){super(),this.topRule=t,this.occurrence=r,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},gs=class extends Pi{walkMany(t,r,n){if(t.idx===this.occurrence){let i=We(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(t,r,n)}},To=class extends Pi{walkManySep(t,r,n){if(t.idx===this.occurrence){let i=We(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(t,r,n)}},xs=class extends Pi{walkAtLeastOne(t,r,n){if(t.idx===this.occurrence){let i=We(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(t,r,n)}},Co=class extends Pi{walkAtLeastOneSep(t,r,n){if(t.idx===this.occurrence){let i=We(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(t,r,n)}};function ys(e,t,r=[]){r=de(r);let n=[],i=0;function o(s){return s.concat(Oe(e,i+1))}function a(s){let u=ys(o(s),t,r);return n.concat(u)}for(;r.length<t&&i<e.length;){let s=e[i];if(s instanceof ge)return a(s.definition);if(s instanceof he)return a(s.definition);if(s instanceof Ee)n=a(s.definition);else if(s instanceof Ne){let u=s.definition.concat([new ue({definition:s.definition})]);return a(u)}else if(s instanceof Le){let u=[new ge({definition:s.definition}),new ue({definition:[new ie({terminalType:s.separator})].concat(s.definition)})];return a(u)}else if(s instanceof _e){let u=s.definition.concat([new ue({definition:[new ie({terminalType:s.separator})].concat(s.definition)})]);n=a(u)}else if(s instanceof ue){let u=s.definition.concat([new ue({definition:s.definition})]);n=a(u)}else{if(s instanceof Ie)return O(s.definition,u=>{X(u.definition)===!1&&(n=a(u.definition))}),n;if(s instanceof ie)r.push(s.terminalType);else throw Error("non exhaustive match")}i++}return n.push({partialPath:r,suffixDef:Oe(e,i)}),n}function Es(e,t,r,n){let i="EXIT_NONE_TERMINAL",o=[i],a="EXIT_ALTERNATIVE",s=!1,u=t.length,l=u-n-1,c=[],f=[];for(f.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!X(f);){let p=f.pop();if(p===a){s&&ir(f).idx<=l&&f.pop();continue}let m=p.def,h=p.idx,E=p.ruleStack,C=p.occurrenceStack;if(X(m))continue;let x=m[0];if(x===i){let k={idx:h,def:Oe(m),ruleStack:kr(E),occurrenceStack:kr(C)};f.push(k)}else if(x instanceof ie)if(h<u-1){let k=h+1,y=t[k];if(r(y,x.terminalType)){let S={idx:k,def:Oe(m),ruleStack:E,occurrenceStack:C};f.push(S)}}else if(h===u-1)c.push({nextTokenType:x.terminalType,nextTokenOccurrence:x.idx,ruleStack:E,occurrenceStack:C}),s=!0;else throw Error("non exhaustive match");else if(x instanceof he){let k=de(E);k.push(x.nonTerminalName);let y=de(C);y.push(x.idx);let S={idx:h,def:x.definition.concat(o,Oe(m)),ruleStack:k,occurrenceStack:y};f.push(S)}else if(x instanceof Ee){let k={idx:h,def:Oe(m),ruleStack:E,occurrenceStack:C};f.push(k),f.push(a);let y={idx:h,def:x.definition.concat(Oe(m)),ruleStack:E,occurrenceStack:C};f.push(y)}else if(x instanceof Ne){let k=new ue({definition:x.definition,idx:x.idx}),y=x.definition.concat([k],Oe(m)),S={idx:h,def:y,ruleStack:E,occurrenceStack:C};f.push(S)}else if(x instanceof Le){let k=new ie({terminalType:x.separator}),y=new ue({definition:[k].concat(x.definition),idx:x.idx}),S=x.definition.concat([y],Oe(m)),v={idx:h,def:S,ruleStack:E,occurrenceStack:C};f.push(v)}else if(x instanceof _e){let k={idx:h,def:Oe(m),ruleStack:E,occurrenceStack:C};f.push(k),f.push(a);let y=new ie({terminalType:x.separator}),S=new ue({definition:[y].concat(x.definition),idx:x.idx}),v=x.definition.concat([S],Oe(m)),A={idx:h,def:v,ruleStack:E,occurrenceStack:C};f.push(A)}else if(x instanceof ue){let k={idx:h,def:Oe(m),ruleStack:E,occurrenceStack:C};f.push(k),f.push(a);let y=new ue({definition:x.definition,idx:x.idx}),S=x.definition.concat([y],Oe(m)),v={idx:h,def:S,ruleStack:E,occurrenceStack:C};f.push(v)}else if(x instanceof Ie)for(let k=x.definition.length-1;k>=0;k--){let y=x.definition[k],S={idx:h,def:y.definition.concat(Oe(m)),ruleStack:E,occurrenceStack:C};f.push(S),f.push(a)}else if(x instanceof ge)f.push({idx:h,def:x.definition.concat(Oe(m)),ruleStack:E,occurrenceStack:C});else if(x instanceof ft)f.push(Y0(x,h,E,C));else throw Error("non exhaustive match")}return c}function Y0(e,t,r,n){let i=de(r);i.push(e.name);let o=de(n);return o.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:o}}var Se;(function(e){e[e.OPTION=0]="OPTION",e[e.REPETITION=1]="REPETITION",e[e.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",e[e.ALTERNATION=5]="ALTERNATION"})(Se||(Se={}));function ks(e){if(e instanceof Ee||e==="Option")return Se.OPTION;if(e instanceof ue||e==="Repetition")return Se.REPETITION;if(e instanceof Ne||e==="RepetitionMandatory")return Se.REPETITION_MANDATORY;if(e instanceof Le||e==="RepetitionMandatoryWithSeparator")return Se.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof _e||e==="RepetitionWithSeparator")return Se.REPETITION_WITH_SEPARATOR;if(e instanceof Ie||e==="Alternation")return Se.ALTERNATION;throw Error("non exhaustive match")}function dx(e,t,r,n,i,o){let a=wo(e,t,r),s=bx(a)?Li:Tr;return o(a,n,s,i)}function hx(e,t,r,n,i,o){let a=So(e,t,i,r),s=bx(a)?Li:Tr;return o(a[0],s,n)}function gx(e,t,r,n){let i=e.length,o=tt(e,a=>tt(a,s=>s.length===1));if(t)return function(a){let s=D(a,u=>u.GATE);for(let u=0;u<i;u++){let l=e[u],c=l.length,f=s[u];if(!(f!==void 0&&f.call(this)===!1))e:for(let p=0;p<c;p++){let m=l[p],h=m.length;for(let E=0;E<h;E++){let C=this.LA(E+1);if(r(C,m[E])===!1)continue e}return u}}};if(o&&!n){let a=D(e,u=>qe(u)),s=Ue(a,(u,l,c)=>(O(l,f=>{N(u,f.tokenTypeIdx)||(u[f.tokenTypeIdx]=c),O(f.categoryMatches,p=>{N(u,p)||(u[p]=c)})}),u),{});return function(){let u=this.LA(1);return s[u.tokenTypeIdx]}}else return function(){for(let a=0;a<i;a++){let s=e[a],u=s.length;e:for(let l=0;l<u;l++){let c=s[l],f=c.length;for(let p=0;p<f;p++){let m=this.LA(p+1);if(r(m,c[p])===!1)continue e}return a}}}}function xx(e,t,r){let n=tt(e,o=>o.length===1),i=e.length;if(n&&!r){let o=qe(e);if(o.length===1&&X(o[0].categoryMatches)){let s=o[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===s}}else{let a=Ue(o,(s,u,l)=>(s[u.tokenTypeIdx]=!0,O(u.categoryMatches,c=>{s[c]=!0}),s),[]);return function(){let s=this.LA(1);return a[s.tokenTypeIdx]===!0}}}else return function(){e:for(let o=0;o<i;o++){let a=e[o],s=a.length;for(let u=0;u<s;u++){let l=this.LA(u+1);if(t(l,a[u])===!1)continue e}return!0}return!1}}var uc=class extends Ar{constructor(t,r,n){super(),this.topProd=t,this.targetOccurrence=r,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(t,r,n,i){return t.idx===this.targetOccurrence&&this.targetProdType===r?(this.restDef=n.concat(i),!0):!1}walkOption(t,r,n){this.checkIsTarget(t,Se.OPTION,r,n)||super.walkOption(t,r,n)}walkAtLeastOne(t,r,n){this.checkIsTarget(t,Se.REPETITION_MANDATORY,r,n)||super.walkOption(t,r,n)}walkAtLeastOneSep(t,r,n){this.checkIsTarget(t,Se.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||super.walkOption(t,r,n)}walkMany(t,r,n){this.checkIsTarget(t,Se.REPETITION,r,n)||super.walkOption(t,r,n)}walkManySep(t,r,n){this.checkIsTarget(t,Se.REPETITION_WITH_SEPARATOR,r,n)||super.walkOption(t,r,n)}},bs=class extends pt{constructor(t,r,n){super(),this.targetOccurrence=t,this.targetProdType=r,this.targetRef=n,this.result=[]}checkIsTarget(t,r){t.idx===this.targetOccurrence&&this.targetProdType===r&&(this.targetRef===void 0||t===this.targetRef)&&(this.result=t.definition)}visitOption(t){this.checkIsTarget(t,Se.OPTION)}visitRepetition(t){this.checkIsTarget(t,Se.REPETITION)}visitRepetitionMandatory(t){this.checkIsTarget(t,Se.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(t){this.checkIsTarget(t,Se.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(t){this.checkIsTarget(t,Se.REPETITION_WITH_SEPARATOR)}visitAlternation(t){this.checkIsTarget(t,Se.ALTERNATION)}};function mx(e){let t=new Array(e);for(let r=0;r<e;r++)t[r]=[];return t}function sc(e){let t=[""];for(let r=0;r<e.length;r++){let n=e[r],i=[];for(let o=0;o<t.length;o++){let a=t[o];i.push(a+"_"+n.tokenTypeIdx);for(let s=0;s<n.categoryMatches.length;s++){let u="_"+n.categoryMatches[s];i.push(a+u)}}t=i}return t}function X0(e,t,r){for(let n=0;n<e.length;n++){if(n===r)continue;let i=e[n];for(let o=0;o<t.length;o++){let a=t[o];if(i[a]===!0)return!1}}return!0}function yx(e,t){let r=D(e,a=>ys([a],1)),n=mx(r.length),i=D(r,a=>{let s={};return O(a,u=>{let l=sc(u.partialPath);O(l,c=>{s[c]=!0})}),s}),o=r;for(let a=1;a<=t;a++){let s=o;o=mx(s.length);for(let u=0;u<s.length;u++){let l=s[u];for(let c=0;c<l.length;c++){let f=l[c].partialPath,p=l[c].suffixDef,m=sc(f);if(X0(i,m,u)||X(p)||f.length===t){let E=n[u];if(As(E,f)===!1){E.push(f);for(let C=0;C<m.length;C++){let x=m[C];i[u][x]=!0}}}else{let E=ys(p,a+1,f);o[u]=o[u].concat(E),O(E,C=>{let x=sc(C.partialPath);O(x,k=>{i[u][k]=!0})})}}}}return n}function wo(e,t,r,n){let i=new bs(e,Se.ALTERNATION,n);return t.accept(i),yx(i.result,r)}function So(e,t,r,n){let i=new bs(e,r);t.accept(i);let o=i.result,s=new uc(t,e,r).startWalking(),u=new ge({definition:o}),l=new ge({definition:s});return yx([u,l],n)}function As(e,t){e:for(let r=0;r<e.length;r++){let n=e[r];if(n.length===t.length){for(let i=0;i<n.length;i++){let o=t[i],a=n[i];if((o===a||a.categoryMatchesMap[o.tokenTypeIdx]!==void 0)===!1)continue e}return!0}}return!1}function Ex(e,t){return e.length<t.length&&tt(e,(r,n)=>{let i=t[n];return r===i||i.categoryMatchesMap[r.tokenTypeIdx]})}function bx(e){return tt(e,t=>tt(t,r=>tt(r,n=>X(n.categoryMatches))))}function kx(e){let t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return D(t,r=>Object.assign({type:Ge.CUSTOM_LOOKAHEAD_VALIDATION},r))}function Ax(e,t,r,n){let i=ct(e,u=>J0(u,r)),o=iF(e,t,r),a=ct(e,u=>tF(u,r)),s=ct(e,u=>eF(u,e,n,r));return i.concat(o,a,s)}function J0(e,t){let r=new lc;e.accept(r);let n=r.allProductions,i=Vl(n,Q0),o=xt(i,s=>s.length>1);return D(le(o),s=>{let u=We(s),l=t.buildDuplicateFoundError(e,s),c=yt(u),f={message:l,type:Ge.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:c,occurrence:u.idx},p=Tx(u);return p&&(f.parameter=p),f})}function Q0(e){return`${yt(e)}_#_${e.idx}_#_${Tx(e)}`}function Tx(e){return e instanceof ie?e.terminalType.name:e instanceof he?e.nonTerminalName:""}var lc=class extends pt{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(t){this.allProductions.push(t)}visitOption(t){this.allProductions.push(t)}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}visitAlternation(t){this.allProductions.push(t)}visitTerminal(t){this.allProductions.push(t)}};function eF(e,t,r,n){let i=[];if(Ue(t,(a,s)=>s.name===e.name?a+1:a,0)>1){let a=n.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});i.push({message:a,type:Ge.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}function Cx(e,t,r){let n=[],i;return ke(t,e)||(i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:i,type:Ge.INVALID_RULE_OVERRIDE,ruleName:e})),n}function fc(e,t,r,n=[]){let i=[],o=Ts(t.definition);if(X(o))return[];{let a=e.name;ke(o,e)&&i.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:n}),type:Ge.LEFT_RECURSION,ruleName:a});let u=Hr(o,n.concat([e])),l=ct(u,c=>{let f=de(n);return f.push(c),fc(e,c,r,f)});return i.concat(l)}}function Ts(e){let t=[];if(X(e))return t;let r=We(e);if(r instanceof he)t.push(r.referencedRule);else if(r instanceof ge||r instanceof Ee||r instanceof Ne||r instanceof Le||r instanceof _e||r instanceof ue)t=t.concat(Ts(r.definition));else if(r instanceof Ie)t=qe(D(r.definition,o=>Ts(o.definition)));else if(!(r instanceof ie))throw Error("non exhaustive match");let n=vn(r),i=e.length>1;if(n&&i){let o=Oe(e);return t.concat(Ts(o))}else return t}var vo=class extends pt{constructor(){super(...arguments),this.alternations=[]}visitAlternation(t){this.alternations.push(t)}};function wx(e,t){let r=new vo;e.accept(r);let n=r.alternations;return ct(n,o=>{let a=kr(o.definition);return ct(a,(s,u)=>{let l=Es([s],[],Tr,1);return X(l)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:o,emptyChoiceIdx:u}),type:Ge.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:o.idx,alternative:u+1}]:[]})})}function Sx(e,t,r){let n=new vo;e.accept(n);let i=n.alternations;return i=Wr(i,a=>a.ignoreAmbiguities===!0),ct(i,a=>{let s=a.idx,u=a.maxLookahead||t,l=wo(s,e,u,a),c=rF(l,a,e,r),f=nF(l,a,e,r);return c.concat(f)})}var cc=class extends pt{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}};function tF(e,t){let r=new vo;e.accept(r);let n=r.alternations;return ct(n,o=>o.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:o}),type:Ge.TOO_MANY_ALTS,ruleName:e.name,occurrence:o.idx}]:[])}function vx(e,t,r){let n=[];return O(e,i=>{let o=new cc;i.accept(o);let a=o.allProductions;O(a,s=>{let u=ks(s),l=s.maxLookahead||t,c=s.idx,p=So(c,i,u,l)[0];if(X(qe(p))){let m=r.buildEmptyRepetitionError({topLevelRule:i,repetition:s});n.push({message:m,type:Ge.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),n}function rF(e,t,r,n){let i=[],o=Ue(e,(s,u,l)=>(t.definition[l].ignoreAmbiguities===!0||O(u,c=>{let f=[l];O(e,(p,m)=>{l!==m&&As(p,c)&&t.definition[m].ignoreAmbiguities!==!0&&f.push(m)}),f.length>1&&!As(i,c)&&(i.push(c),s.push({alts:f,path:c}))}),s),[]);return D(o,s=>{let u=D(s.alts,c=>c+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:u,prefixPath:s.path}),type:Ge.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:s.alts}})}function nF(e,t,r,n){let i=Ue(e,(a,s,u)=>{let l=D(s,c=>({idx:u,path:c}));return a.concat(l)},[]);return nr(ct(i,a=>{if(t.definition[a.idx].ignoreAmbiguities===!0)return[];let u=a.idx,l=a.path,c=rt(i,p=>t.definition[p.idx].ignoreAmbiguities!==!0&&p.idx<u&&Ex(p.path,l));return D(c,p=>{let m=[p.idx+1,u+1],h=t.idx===0?"":t.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:m,prefixPath:p.path}),type:Ge.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:h,alternatives:m}})}))}function iF(e,t,r){let n=[],i=D(t,o=>o.name);return O(e,o=>{let a=o.name;if(ke(i,a)){let s=r.buildNamespaceConflictError(o);n.push({message:s,type:Ge.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:a})}}),n}function _x(e){let t=vi(e,{errMsgProvider:fx}),r={};return O(e.rules,n=>{r[n.name]=n}),px(r,t.errMsgProvider)}function Ix(e){return e=vi(e,{errMsgProvider:$t}),Ax(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}var Rx="MismatchedTokenException",Dx="NoViableAltException",Fx="EarlyExitException",Ox="NotAllInputParsedException",Nx=[Rx,Dx,Fx,Ox];Object.freeze(Nx);function Zr(e){return ke(Nx,e.name)}var Mi=class extends Error{constructor(t,r){super(t),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},On=class extends Mi{constructor(t,r,n){super(t,r),this.previousToken=n,this.name=Rx}},_o=class extends Mi{constructor(t,r,n){super(t,r),this.previousToken=n,this.name=Dx}},Io=class extends Mi{constructor(t,r){super(t,r),this.name=Ox}},Ro=class extends Mi{constructor(t,r,n){super(t,r),this.previousToken=n,this.name=Fx}};var pc={},dc="InRuleRecoveryException",mc=class extends Error{constructor(t){super(t),this.name=dc}},Cs=class{initRecoverable(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=N(t,"recoveryEnabled")?t.recoveryEnabled:mt.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=oF)}getTokenToInsert(t){let r=Fn(t,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r}canTokenTypeBeInsertedInRecovery(t){return!0}canTokenTypeBeDeletedInRecovery(t){return!0}tryInRepetitionRecovery(t,r,n,i){let o=this.findReSyncTokenType(),a=this.exportLexerState(),s=[],u=!1,l=this.LA(1),c=this.LA(1),f=()=>{let p=this.LA(0),m=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:l,previous:p,ruleName:this.getCurrRuleFullName()}),h=new On(m,l,this.LA(0));h.resyncedTokens=kr(s),this.SAVE_ERROR(h)};for(;!u;)if(this.tokenMatcher(c,i)){f();return}else if(n.call(this)){f(),t.apply(this,r);return}else this.tokenMatcher(c,o)?u=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,s));this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(t,r,n){return!(n===!1||this.tokenMatcher(this.LA(1),t)||this.isBackTracking()||this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,r)))}getFollowsForInRuleRecovery(t,r){let n=this.getCurrentGrammarPath(t,r);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(t,r){if(this.canRecoverWithSingleTokenInsertion(t,r))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t)){let n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new mc("sad sad panda")}canPerformInRuleRecovery(t,r){return this.canRecoverWithSingleTokenInsertion(t,r)||this.canRecoverWithSingleTokenDeletion(t)}canRecoverWithSingleTokenInsertion(t,r){if(!this.canTokenTypeBeInsertedInRecovery(t)||X(r))return!1;let n=this.LA(1);return or(r,o=>this.tokenMatcher(n,o))!==void 0}canRecoverWithSingleTokenDeletion(t){return this.canTokenTypeBeDeletedInRecovery(t)?this.tokenMatcher(this.LA(2),t):!1}isInCurrentRuleReSyncSet(t){let r=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(r);return ke(n,t)}findReSyncTokenType(){let t=this.flattenFollowSet(),r=this.LA(1),n=2;for(;;){let i=or(t,o=>ic(r,o));if(i!==void 0)return i;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return pc;let t=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let t=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return D(t,(n,i)=>i===0?pc:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:r[i],inRule:this.shortRuleNameToFullName(t[i-1])})}flattenFollowSet(){let t=D(this.buildFullFollowKeyStack(),r=>this.getFollowSetFromFollowKey(r));return qe(t)}getFollowSetFromFollowKey(t){if(t===pc)return[jt];let r=t.ruleName+t.idxInCallingRule+as+t.inRule;return this.resyncFollows[r]}addToResyncTokens(t,r){return this.tokenMatcher(t,jt)||r.push(t),r}reSyncTo(t){let r=[],n=this.LA(1);for(;this.tokenMatcher(n,t)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return kr(r)}attemptInRepetitionRecovery(t,r,n,i,o,a,s){}getCurrentGrammarPath(t,r){let n=this.getHumanReadableRuleStack(),i=de(this.RULE_OCCURRENCE_STACK);return{ruleStack:n,occurrenceStack:i,lastTok:t,lastTokOccurrence:r}}getHumanReadableRuleStack(){return D(this.RULE_STACK,t=>this.shortRuleNameToFullName(t))}};function oF(e,t,r,n,i,o,a){let s=this.getKeyForAutomaticLookahead(n,i),u=this.firstAfterRepMap[s];if(u===void 0){let p=this.getCurrRuleFullName(),m=this.getGAstProductions()[p];u=new o(m,i).startWalking(),this.firstAfterRepMap[s]=u}let l=u.token,c=u.occurrence,f=u.isEndOfRule;this.RULE_STACK.length===1&&f&&l===void 0&&(l=jt,c=1),!(l===void 0||c===void 0)&&this.shouldInRepetitionRecoveryBeTried(l,c,a)&&this.tryInRepetitionRecovery(e,t,r,l)}function ws(e,t,r){return r|t|e}var Do=class{constructor(t){var r;this.maxLookahead=(r=t?.maxLookahead)!==null&&r!==void 0?r:mt.maxLookahead}validate(t){let r=this.validateNoLeftRecursion(t.rules);if(X(r)){let n=this.validateEmptyOrAlternatives(t.rules),i=this.validateAmbiguousAlternationAlternatives(t.rules,this.maxLookahead),o=this.validateSomeNonEmptyLookaheadPath(t.rules,this.maxLookahead);return[...r,...n,...i,...o]}return r}validateNoLeftRecursion(t){return ct(t,r=>fc(r,r,$t))}validateEmptyOrAlternatives(t){return ct(t,r=>wx(r,$t))}validateAmbiguousAlternationAlternatives(t,r){return ct(t,n=>Sx(n,r,$t))}validateSomeNonEmptyLookaheadPath(t,r){return vx(t,r,$t)}buildLookaheadForAlternation(t){return dx(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,gx)}buildLookaheadForOptional(t){return hx(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,ks(t.prodType),xx)}};var vs=class{initLooksAhead(t){this.dynamicTokensEnabled=N(t,"dynamicTokensEnabled")?t.dynamicTokensEnabled:mt.dynamicTokensEnabled,this.maxLookahead=N(t,"maxLookahead")?t.maxLookahead:mt.maxLookahead,this.lookaheadStrategy=N(t,"lookaheadStrategy")?t.lookaheadStrategy:new Do({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(t){O(t,r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{let{alternation:n,repetition:i,option:o,repetitionMandatory:a,repetitionMandatoryWithSeparator:s,repetitionWithSeparator:u}=aF(r);O(n,l=>{let c=l.idx===0?"":l.idx;this.TRACE_INIT(`${yt(l)}${c}`,()=>{let f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:l.idx,rule:r,maxLookahead:l.maxLookahead||this.maxLookahead,hasPredicates:l.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),p=ws(this.fullRuleNameToShort[r.name],256,l.idx);this.setLaFuncCache(p,f)})}),O(i,l=>{this.computeLookaheadFunc(r,l.idx,768,"Repetition",l.maxLookahead,yt(l))}),O(o,l=>{this.computeLookaheadFunc(r,l.idx,512,"Option",l.maxLookahead,yt(l))}),O(a,l=>{this.computeLookaheadFunc(r,l.idx,1024,"RepetitionMandatory",l.maxLookahead,yt(l))}),O(s,l=>{this.computeLookaheadFunc(r,l.idx,1536,"RepetitionMandatoryWithSeparator",l.maxLookahead,yt(l))}),O(u,l=>{this.computeLookaheadFunc(r,l.idx,1280,"RepetitionWithSeparator",l.maxLookahead,yt(l))})})})}computeLookaheadFunc(t,r,n,i,o,a){this.TRACE_INIT(`${a}${r===0?"":r}`,()=>{let s=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:t,maxLookahead:o||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),u=ws(this.fullRuleNameToShort[t.name],n,r);this.setLaFuncCache(u,s)})}getKeyForAutomaticLookahead(t,r){let n=this.getLastExplicitRuleShortName();return ws(n,t,r)}getLaFuncFromCache(t){return this.lookAheadFuncsCache.get(t)}setLaFuncCache(t,r){this.lookAheadFuncsCache.set(t,r)}},hc=class extends pt{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(t){this.dslMethods.option.push(t)}visitRepetitionWithSeparator(t){this.dslMethods.repetitionWithSeparator.push(t)}visitRepetitionMandatory(t){this.dslMethods.repetitionMandatory.push(t)}visitRepetitionMandatoryWithSeparator(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)}visitRepetition(t){this.dslMethods.repetition.push(t)}visitAlternation(t){this.dslMethods.alternation.push(t)}},Ss=new hc;function aF(e){Ss.reset(),e.accept(Ss);let t=Ss.dslMethods;return Ss.reset(),t}function yc(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset)}function Ec(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function Lx(e,t,r){e.children[r]===void 0?e.children[r]=[t]:e.children[r].push(t)}function Px(e,t,r){e.children[t]===void 0?e.children[t]=[r]:e.children[t].push(r)}var sF="name";function bc(e,t){Object.defineProperty(e,sF,{enumerable:!1,configurable:!0,writable:!1,value:t})}function uF(e,t){let r=pe(e),n=r.length;for(let i=0;i<n;i++){let o=r[i],a=e[o],s=a.length;for(let u=0;u<s;u++){let l=a[u];l.tokenTypeIdx===void 0&&this[l.name](l.children,t)}}}function Mx(e,t){let r=function(){};bc(r,e+"BaseSemantics");let n={visit:function(i,o){if(P(i)&&(i=i[0]),!nt(i))return this[i.name](i.children,o)},validateVisitor:function(){let i=lF(this,t);if(!X(i)){let o=D(i,a=>a.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
|
|
133
|
+
see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return"deprecated"},buildDuplicateRuleNameError(e){let t;return e.topLevelRule instanceof lt?t=e.topLevelRule.name:t=e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};function Wg(e,t){let r=new Zl(e,t);return r.resolveRefs(),r.errors}var Zl=class extends ct{constructor(t,r){super(),this.nameToTopRule=t,this.errMsgProvider=r,this.errors=[]}resolveRefs(){O(le(this.nameToTopRule),t=>{this.currTopLevel=t,t.accept(this)})}visitNonTerminal(t){let r=this.nameToTopRule[t.nonTerminalName];if(r)t.referencedRule=r;else{let n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:n,type:qe.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}}};var Yl=class extends yr{constructor(t,r){super(),this.topProd=t,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=de(this.path.ruleStack).reverse(),this.occurrenceStack=de(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(t,r=[]){this.found||super.walk(t,r)}walkProdRef(t,r,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){let i=r.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,i)}}updateExpectedNext(){X(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},ls=class extends Yl{constructor(t,r){super(t,r),this.path=r,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(t,r,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){let i=r.concat(n),o=new ge({definition:i});this.possibleTokTypes=Cn(o),this.found=!0}}},Di=class extends yr{constructor(t,r){super(),this.topRule=t,this.occurrence=r,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},cs=class extends Di{walkMany(t,r,n){if(t.idx===this.occurrence){let i=Ge(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(t,r,n)}},ho=class extends Di{walkManySep(t,r,n){if(t.idx===this.occurrence){let i=Ge(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(t,r,n)}},fs=class extends Di{walkAtLeastOne(t,r,n){if(t.idx===this.occurrence){let i=Ge(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(t,r,n)}},go=class extends Di{walkAtLeastOneSep(t,r,n){if(t.idx===this.occurrence){let i=Ge(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(t,r,n)}};function ps(e,t,r=[]){r=de(r);let n=[],i=0;function o(s){return s.concat(Re(e,i+1))}function a(s){let u=ps(o(s),t,r);return n.concat(u)}for(;r.length<t&&i<e.length;){let s=e[i];if(s instanceof ge)return a(s.definition);if(s instanceof he)return a(s.definition);if(s instanceof Ee)n=a(s.definition);else if(s instanceof Fe){let u=s.definition.concat([new ue({definition:s.definition})]);return a(u)}else if(s instanceof Oe){let u=[new ge({definition:s.definition}),new ue({definition:[new ie({terminalType:s.separator})].concat(s.definition)})];return a(u)}else if(s instanceof Se){let u=s.definition.concat([new ue({definition:[new ie({terminalType:s.separator})].concat(s.definition)})]);n=a(u)}else if(s instanceof ue){let u=s.definition.concat([new ue({definition:s.definition})]);n=a(u)}else{if(s instanceof _e)return O(s.definition,u=>{X(u.definition)===!1&&(n=a(u.definition))}),n;if(s instanceof ie)r.push(s.terminalType);else throw Error("non exhaustive match")}i++}return n.push({partialPath:r,suffixDef:Re(e,i)}),n}function ms(e,t,r,n){let i="EXIT_NONE_TERMINAL",o=[i],a="EXIT_ALTERNATIVE",s=!1,u=t.length,l=u-n-1,c=[],f=[];for(f.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!X(f);){let p=f.pop();if(p===a){s&&er(f).idx<=l&&f.pop();continue}let m=p.def,h=p.idx,E=p.ruleStack,C=p.occurrenceStack;if(X(m))continue;let x=m[0];if(x===i){let k={idx:h,def:Re(m),ruleStack:xr(E),occurrenceStack:xr(C)};f.push(k)}else if(x instanceof ie)if(h<u-1){let k=h+1,y=t[k];if(r(y,x.terminalType)){let S={idx:k,def:Re(m),ruleStack:E,occurrenceStack:C};f.push(S)}}else if(h===u-1)c.push({nextTokenType:x.terminalType,nextTokenOccurrence:x.idx,ruleStack:E,occurrenceStack:C}),s=!0;else throw Error("non exhaustive match");else if(x instanceof he){let k=de(E);k.push(x.nonTerminalName);let y=de(C);y.push(x.idx);let S={idx:h,def:x.definition.concat(o,Re(m)),ruleStack:k,occurrenceStack:y};f.push(S)}else if(x instanceof Ee){let k={idx:h,def:Re(m),ruleStack:E,occurrenceStack:C};f.push(k),f.push(a);let y={idx:h,def:x.definition.concat(Re(m)),ruleStack:E,occurrenceStack:C};f.push(y)}else if(x instanceof Fe){let k=new ue({definition:x.definition,idx:x.idx}),y=x.definition.concat([k],Re(m)),S={idx:h,def:y,ruleStack:E,occurrenceStack:C};f.push(S)}else if(x instanceof Oe){let k=new ie({terminalType:x.separator}),y=new ue({definition:[k].concat(x.definition),idx:x.idx}),S=x.definition.concat([y],Re(m)),_={idx:h,def:S,ruleStack:E,occurrenceStack:C};f.push(_)}else if(x instanceof Se){let k={idx:h,def:Re(m),ruleStack:E,occurrenceStack:C};f.push(k),f.push(a);let y=new ie({terminalType:x.separator}),S=new ue({definition:[y].concat(x.definition),idx:x.idx}),_=x.definition.concat([S],Re(m)),A={idx:h,def:_,ruleStack:E,occurrenceStack:C};f.push(A)}else if(x instanceof ue){let k={idx:h,def:Re(m),ruleStack:E,occurrenceStack:C};f.push(k),f.push(a);let y=new ue({definition:x.definition,idx:x.idx}),S=x.definition.concat([y],Re(m)),_={idx:h,def:S,ruleStack:E,occurrenceStack:C};f.push(_)}else if(x instanceof _e)for(let k=x.definition.length-1;k>=0;k--){let y=x.definition[k],S={idx:h,def:y.definition.concat(Re(m)),ruleStack:E,occurrenceStack:C};f.push(S),f.push(a)}else if(x instanceof ge)f.push({idx:h,def:x.definition.concat(Re(m)),ruleStack:E,occurrenceStack:C});else if(x instanceof lt)f.push(b1(x,h,E,C));else throw Error("non exhaustive match")}return c}function b1(e,t,r,n){let i=de(r);i.push(e.name);let o=de(n);return o.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:o}}var we;(function(e){e[e.OPTION=0]="OPTION",e[e.REPETITION=1]="REPETITION",e[e.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",e[e.ALTERNATION=5]="ALTERNATION"})(we||(we={}));function hs(e){if(e instanceof Ee||e==="Option")return we.OPTION;if(e instanceof ue||e==="Repetition")return we.REPETITION;if(e instanceof Fe||e==="RepetitionMandatory")return we.REPETITION_MANDATORY;if(e instanceof Oe||e==="RepetitionMandatoryWithSeparator")return we.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof Se||e==="RepetitionWithSeparator")return we.REPETITION_WITH_SEPARATOR;if(e instanceof _e||e==="Alternation")return we.ALTERNATION;throw Error("non exhaustive match")}function Zg(e,t,r,n,i,o){let a=xo(e,t,r),s=tx(a)?Ii:Er;return o(a,n,s,i)}function Yg(e,t,r,n,i,o){let a=yo(e,t,i,r),s=tx(a)?Ii:Er;return o(a[0],s,n)}function Xg(e,t,r,n){let i=e.length,o=Qe(e,a=>Qe(a,s=>s.length===1));if(t)return function(a){let s=R(a,u=>u.GATE);for(let u=0;u<i;u++){let l=e[u],c=l.length,f=s[u];if(!(f!==void 0&&f.call(this)===!1))e:for(let p=0;p<c;p++){let m=l[p],h=m.length;for(let E=0;E<h;E++){let C=this.LA(E+1);if(r(C,m[E])===!1)continue e}return u}}};if(o&&!n){let a=R(e,u=>je(u)),s=Me(a,(u,l,c)=>(O(l,f=>{N(u,f.tokenTypeIdx)||(u[f.tokenTypeIdx]=c),O(f.categoryMatches,p=>{N(u,p)||(u[p]=c)})}),u),{});return function(){let u=this.LA(1);return s[u.tokenTypeIdx]}}else return function(){for(let a=0;a<i;a++){let s=e[a],u=s.length;e:for(let l=0;l<u;l++){let c=s[l],f=c.length;for(let p=0;p<f;p++){let m=this.LA(p+1);if(r(m,c[p])===!1)continue e}return a}}}}function Jg(e,t,r){let n=Qe(e,o=>o.length===1),i=e.length;if(n&&!r){let o=je(e);if(o.length===1&&X(o[0].categoryMatches)){let s=o[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===s}}else{let a=Me(o,(s,u,l)=>(s[u.tokenTypeIdx]=!0,O(u.categoryMatches,c=>{s[c]=!0}),s),[]);return function(){let s=this.LA(1);return a[s.tokenTypeIdx]===!0}}}else return function(){e:for(let o=0;o<i;o++){let a=e[o],s=a.length;for(let u=0;u<s;u++){let l=this.LA(u+1);if(t(l,a[u])===!1)continue e}return!0}return!1}}var Jl=class extends yr{constructor(t,r,n){super(),this.topProd=t,this.targetOccurrence=r,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(t,r,n,i){return t.idx===this.targetOccurrence&&this.targetProdType===r?(this.restDef=n.concat(i),!0):!1}walkOption(t,r,n){this.checkIsTarget(t,we.OPTION,r,n)||super.walkOption(t,r,n)}walkAtLeastOne(t,r,n){this.checkIsTarget(t,we.REPETITION_MANDATORY,r,n)||super.walkOption(t,r,n)}walkAtLeastOneSep(t,r,n){this.checkIsTarget(t,we.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||super.walkOption(t,r,n)}walkMany(t,r,n){this.checkIsTarget(t,we.REPETITION,r,n)||super.walkOption(t,r,n)}walkManySep(t,r,n){this.checkIsTarget(t,we.REPETITION_WITH_SEPARATOR,r,n)||super.walkOption(t,r,n)}},ds=class extends ct{constructor(t,r,n){super(),this.targetOccurrence=t,this.targetProdType=r,this.targetRef=n,this.result=[]}checkIsTarget(t,r){t.idx===this.targetOccurrence&&this.targetProdType===r&&(this.targetRef===void 0||t===this.targetRef)&&(this.result=t.definition)}visitOption(t){this.checkIsTarget(t,we.OPTION)}visitRepetition(t){this.checkIsTarget(t,we.REPETITION)}visitRepetitionMandatory(t){this.checkIsTarget(t,we.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(t){this.checkIsTarget(t,we.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(t){this.checkIsTarget(t,we.REPETITION_WITH_SEPARATOR)}visitAlternation(t){this.checkIsTarget(t,we.ALTERNATION)}};function Kg(e){let t=new Array(e);for(let r=0;r<e;r++)t[r]=[];return t}function Xl(e){let t=[""];for(let r=0;r<e.length;r++){let n=e[r],i=[];for(let o=0;o<t.length;o++){let a=t[o];i.push(a+"_"+n.tokenTypeIdx);for(let s=0;s<n.categoryMatches.length;s++){let u="_"+n.categoryMatches[s];i.push(a+u)}}t=i}return t}function k1(e,t,r){for(let n=0;n<e.length;n++){if(n===r)continue;let i=e[n];for(let o=0;o<t.length;o++){let a=t[o];if(i[a]===!0)return!1}}return!0}function Qg(e,t){let r=R(e,a=>ps([a],1)),n=Kg(r.length),i=R(r,a=>{let s={};return O(a,u=>{let l=Xl(u.partialPath);O(l,c=>{s[c]=!0})}),s}),o=r;for(let a=1;a<=t;a++){let s=o;o=Kg(s.length);for(let u=0;u<s.length;u++){let l=s[u];for(let c=0;c<l.length;c++){let f=l[c].partialPath,p=l[c].suffixDef,m=Xl(f);if(k1(i,m,u)||X(p)||f.length===t){let E=n[u];if(gs(E,f)===!1){E.push(f);for(let C=0;C<m.length;C++){let x=m[C];i[u][x]=!0}}}else{let E=ps(p,a+1,f);o[u]=o[u].concat(E),O(E,C=>{let x=Xl(C.partialPath);O(x,k=>{i[u][k]=!0})})}}}}return n}function xo(e,t,r,n){let i=new ds(e,we.ALTERNATION,n);return t.accept(i),Qg(i.result,r)}function yo(e,t,r,n){let i=new ds(e,r);t.accept(i);let o=i.result,s=new Jl(t,e,r).startWalking(),u=new ge({definition:o}),l=new ge({definition:s});return Qg([u,l],n)}function gs(e,t){e:for(let r=0;r<e.length;r++){let n=e[r];if(n.length===t.length){for(let i=0;i<n.length;i++){let o=t[i],a=n[i];if((o===a||a.categoryMatchesMap[o.tokenTypeIdx]!==void 0)===!1)continue e}return!0}}return!1}function ex(e,t){return e.length<t.length&&Qe(e,(r,n)=>{let i=t[n];return r===i||i.categoryMatchesMap[r.tokenTypeIdx]})}function tx(e){return Qe(e,t=>Qe(t,r=>Qe(r,n=>X(n.categoryMatches))))}function rx(e){let t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return R(t,r=>Object.assign({type:qe.CUSTOM_LOOKAHEAD_VALIDATION},r))}function nx(e,t,r,n){let i=ut(e,u=>A1(u,r)),o=v1(e,t,r),a=ut(e,u=>w1(u,r)),s=ut(e,u=>C1(u,e,n,r));return i.concat(o,a,s)}function A1(e,t){let r=new Ql;e.accept(r);let n=r.allProductions,i=Nl(n,T1),o=ht(i,s=>s.length>1);return R(le(o),s=>{let u=Ge(s),l=t.buildDuplicateFoundError(e,s),c=gt(u),f={message:l,type:qe.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:c,occurrence:u.idx},p=ix(u);return p&&(f.parameter=p),f})}function T1(e){return`${gt(e)}_#_${e.idx}_#_${ix(e)}`}function ix(e){return e instanceof ie?e.terminalType.name:e instanceof he?e.nonTerminalName:""}var Ql=class extends ct{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(t){this.allProductions.push(t)}visitOption(t){this.allProductions.push(t)}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}visitAlternation(t){this.allProductions.push(t)}visitTerminal(t){this.allProductions.push(t)}};function C1(e,t,r,n){let i=[];if(Me(t,(a,s)=>s.name===e.name?a+1:a,0)>1){let a=n.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});i.push({message:a,type:qe.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}function ox(e,t,r){let n=[],i;return be(t,e)||(i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:i,type:qe.INVALID_RULE_OVERRIDE,ruleName:e})),n}function tc(e,t,r,n=[]){let i=[],o=xs(t.definition);if(X(o))return[];{let a=e.name;be(o,e)&&i.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:n}),type:qe.LEFT_RECURSION,ruleName:a});let u=$r(o,n.concat([e])),l=ut(u,c=>{let f=de(n);return f.push(c),tc(e,c,r,f)});return i.concat(l)}}function xs(e){let t=[];if(X(e))return t;let r=Ge(e);if(r instanceof he)t.push(r.referencedRule);else if(r instanceof ge||r instanceof Ee||r instanceof Fe||r instanceof Oe||r instanceof Se||r instanceof ue)t=t.concat(xs(r.definition));else if(r instanceof _e)t=je(R(r.definition,o=>xs(o.definition)));else if(!(r instanceof ie))throw Error("non exhaustive match");let n=Tn(r),i=e.length>1;if(n&&i){let o=Re(e);return t.concat(xs(o))}else return t}var Eo=class extends ct{constructor(){super(...arguments),this.alternations=[]}visitAlternation(t){this.alternations.push(t)}};function ax(e,t){let r=new Eo;e.accept(r);let n=r.alternations;return ut(n,o=>{let a=xr(o.definition);return ut(a,(s,u)=>{let l=ms([s],[],Er,1);return X(l)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:o,emptyChoiceIdx:u}),type:qe.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:o.idx,alternative:u+1}]:[]})})}function sx(e,t,r){let n=new Eo;e.accept(n);let i=n.alternations;return i=qr(i,a=>a.ignoreAmbiguities===!0),ut(i,a=>{let s=a.idx,u=a.maxLookahead||t,l=xo(s,e,u,a),c=S1(l,a,e,r),f=_1(l,a,e,r);return c.concat(f)})}var ec=class extends ct{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}};function w1(e,t){let r=new Eo;e.accept(r);let n=r.alternations;return ut(n,o=>o.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:o}),type:qe.TOO_MANY_ALTS,ruleName:e.name,occurrence:o.idx}]:[])}function ux(e,t,r){let n=[];return O(e,i=>{let o=new ec;i.accept(o);let a=o.allProductions;O(a,s=>{let u=hs(s),l=s.maxLookahead||t,c=s.idx,p=yo(c,i,u,l)[0];if(X(je(p))){let m=r.buildEmptyRepetitionError({topLevelRule:i,repetition:s});n.push({message:m,type:qe.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),n}function S1(e,t,r,n){let i=[],o=Me(e,(s,u,l)=>(t.definition[l].ignoreAmbiguities===!0||O(u,c=>{let f=[l];O(e,(p,m)=>{l!==m&&gs(p,c)&&t.definition[m].ignoreAmbiguities!==!0&&f.push(m)}),f.length>1&&!gs(i,c)&&(i.push(c),s.push({alts:f,path:c}))}),s),[]);return R(o,s=>{let u=R(s.alts,c=>c+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:u,prefixPath:s.path}),type:qe.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:s.alts}})}function _1(e,t,r,n){let i=Me(e,(a,s,u)=>{let l=R(s,c=>({idx:u,path:c}));return a.concat(l)},[]);return Qt(ut(i,a=>{if(t.definition[a.idx].ignoreAmbiguities===!0)return[];let u=a.idx,l=a.path,c=et(i,p=>t.definition[p.idx].ignoreAmbiguities!==!0&&p.idx<u&&ex(p.path,l));return R(c,p=>{let m=[p.idx+1,u+1],h=t.idx===0?"":t.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:m,prefixPath:p.path}),type:qe.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:h,alternatives:m}})}))}function v1(e,t,r){let n=[],i=R(t,o=>o.name);return O(e,o=>{let a=o.name;if(be(i,a)){let s=r.buildNamespaceConflictError(o);n.push({message:s,type:qe.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:a})}}),n}function lx(e){let t=ki(e,{errMsgProvider:Hg}),r={};return O(e.rules,n=>{r[n.name]=n}),Wg(r,t.errMsgProvider)}function cx(e){return e=ki(e,{errMsgProvider:Bt}),nx(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}var fx="MismatchedTokenException",px="NoViableAltException",mx="EarlyExitException",dx="NotAllInputParsedException",hx=[fx,px,mx,dx];Object.freeze(hx);function Gr(e){return be(hx,e.name)}var Ri=class extends Error{constructor(t,r){super(t),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},In=class extends Ri{constructor(t,r,n){super(t,r),this.previousToken=n,this.name=fx}},bo=class extends Ri{constructor(t,r,n){super(t,r),this.previousToken=n,this.name=px}},ko=class extends Ri{constructor(t,r){super(t,r),this.name=dx}},Ao=class extends Ri{constructor(t,r,n){super(t,r),this.previousToken=n,this.name=mx}};var rc={},ic="InRuleRecoveryException",nc=class extends Error{constructor(t){super(t),this.name=ic}},ys=class{initRecoverable(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=N(t,"recoveryEnabled")?t.recoveryEnabled:ft.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=I1)}getTokenToInsert(t){let r=vn(t,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r}canTokenTypeBeInsertedInRecovery(t){return!0}canTokenTypeBeDeletedInRecovery(t){return!0}tryInRepetitionRecovery(t,r,n,i){let o=this.findReSyncTokenType(),a=this.exportLexerState(),s=[],u=!1,l=this.LA(1),c=this.LA(1),f=()=>{let p=this.LA(0),m=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:l,previous:p,ruleName:this.getCurrRuleFullName()}),h=new In(m,l,this.LA(0));h.resyncedTokens=xr(s),this.SAVE_ERROR(h)};for(;!u;)if(this.tokenMatcher(c,i)){f();return}else if(n.call(this)){f(),t.apply(this,r);return}else this.tokenMatcher(c,o)?u=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,s));this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(t,r,n){return!(n===!1||this.tokenMatcher(this.LA(1),t)||this.isBackTracking()||this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,r)))}getFollowsForInRuleRecovery(t,r){let n=this.getCurrentGrammarPath(t,r);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(t,r){if(this.canRecoverWithSingleTokenInsertion(t,r))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t)){let n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new nc("sad sad panda")}canPerformInRuleRecovery(t,r){return this.canRecoverWithSingleTokenInsertion(t,r)||this.canRecoverWithSingleTokenDeletion(t)}canRecoverWithSingleTokenInsertion(t,r){if(!this.canTokenTypeBeInsertedInRecovery(t)||X(r))return!1;let n=this.LA(1);return tr(r,o=>this.tokenMatcher(n,o))!==void 0}canRecoverWithSingleTokenDeletion(t){return this.canTokenTypeBeDeletedInRecovery(t)?this.tokenMatcher(this.LA(2),t):!1}isInCurrentRuleReSyncSet(t){let r=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(r);return be(n,t)}findReSyncTokenType(){let t=this.flattenFollowSet(),r=this.LA(1),n=2;for(;;){let i=tr(t,o=>Kl(r,o));if(i!==void 0)return i;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return rc;let t=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let t=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return R(t,(n,i)=>i===0?rc:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:r[i],inRule:this.shortRuleNameToFullName(t[i-1])})}flattenFollowSet(){let t=R(this.buildFullFollowKeyStack(),r=>this.getFollowSetFromFollowKey(r));return je(t)}getFollowSetFromFollowKey(t){if(t===rc)return[Mt];let r=t.ruleName+t.idxInCallingRule+es+t.inRule;return this.resyncFollows[r]}addToResyncTokens(t,r){return this.tokenMatcher(t,Mt)||r.push(t),r}reSyncTo(t){let r=[],n=this.LA(1);for(;this.tokenMatcher(n,t)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return xr(r)}attemptInRepetitionRecovery(t,r,n,i,o,a,s){}getCurrentGrammarPath(t,r){let n=this.getHumanReadableRuleStack(),i=de(this.RULE_OCCURRENCE_STACK);return{ruleStack:n,occurrenceStack:i,lastTok:t,lastTokOccurrence:r}}getHumanReadableRuleStack(){return R(this.RULE_STACK,t=>this.shortRuleNameToFullName(t))}};function I1(e,t,r,n,i,o,a){let s=this.getKeyForAutomaticLookahead(n,i),u=this.firstAfterRepMap[s];if(u===void 0){let p=this.getCurrRuleFullName(),m=this.getGAstProductions()[p];u=new o(m,i).startWalking(),this.firstAfterRepMap[s]=u}let l=u.token,c=u.occurrence,f=u.isEndOfRule;this.RULE_STACK.length===1&&f&&l===void 0&&(l=Mt,c=1),!(l===void 0||c===void 0)&&this.shouldInRepetitionRecoveryBeTried(l,c,a)&&this.tryInRepetitionRecovery(e,t,r,l)}function Es(e,t,r){return r|t|e}var To=class{constructor(t){var r;this.maxLookahead=(r=t?.maxLookahead)!==null&&r!==void 0?r:ft.maxLookahead}validate(t){let r=this.validateNoLeftRecursion(t.rules);if(X(r)){let n=this.validateEmptyOrAlternatives(t.rules),i=this.validateAmbiguousAlternationAlternatives(t.rules,this.maxLookahead),o=this.validateSomeNonEmptyLookaheadPath(t.rules,this.maxLookahead);return[...r,...n,...i,...o]}return r}validateNoLeftRecursion(t){return ut(t,r=>tc(r,r,Bt))}validateEmptyOrAlternatives(t){return ut(t,r=>ax(r,Bt))}validateAmbiguousAlternationAlternatives(t,r){return ut(t,n=>sx(n,r,Bt))}validateSomeNonEmptyLookaheadPath(t,r){return ux(t,r,Bt)}buildLookaheadForAlternation(t){return Zg(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,Xg)}buildLookaheadForOptional(t){return Yg(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,hs(t.prodType),Jg)}};var ks=class{initLooksAhead(t){this.dynamicTokensEnabled=N(t,"dynamicTokensEnabled")?t.dynamicTokensEnabled:ft.dynamicTokensEnabled,this.maxLookahead=N(t,"maxLookahead")?t.maxLookahead:ft.maxLookahead,this.lookaheadStrategy=N(t,"lookaheadStrategy")?t.lookaheadStrategy:new To({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(t){O(t,r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{let{alternation:n,repetition:i,option:o,repetitionMandatory:a,repetitionMandatoryWithSeparator:s,repetitionWithSeparator:u}=D1(r);O(n,l=>{let c=l.idx===0?"":l.idx;this.TRACE_INIT(`${gt(l)}${c}`,()=>{let f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:l.idx,rule:r,maxLookahead:l.maxLookahead||this.maxLookahead,hasPredicates:l.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),p=Es(this.fullRuleNameToShort[r.name],256,l.idx);this.setLaFuncCache(p,f)})}),O(i,l=>{this.computeLookaheadFunc(r,l.idx,768,"Repetition",l.maxLookahead,gt(l))}),O(o,l=>{this.computeLookaheadFunc(r,l.idx,512,"Option",l.maxLookahead,gt(l))}),O(a,l=>{this.computeLookaheadFunc(r,l.idx,1024,"RepetitionMandatory",l.maxLookahead,gt(l))}),O(s,l=>{this.computeLookaheadFunc(r,l.idx,1536,"RepetitionMandatoryWithSeparator",l.maxLookahead,gt(l))}),O(u,l=>{this.computeLookaheadFunc(r,l.idx,1280,"RepetitionWithSeparator",l.maxLookahead,gt(l))})})})}computeLookaheadFunc(t,r,n,i,o,a){this.TRACE_INIT(`${a}${r===0?"":r}`,()=>{let s=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:t,maxLookahead:o||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),u=Es(this.fullRuleNameToShort[t.name],n,r);this.setLaFuncCache(u,s)})}getKeyForAutomaticLookahead(t,r){let n=this.getLastExplicitRuleShortName();return Es(n,t,r)}getLaFuncFromCache(t){return this.lookAheadFuncsCache.get(t)}setLaFuncCache(t,r){this.lookAheadFuncsCache.set(t,r)}},oc=class extends ct{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(t){this.dslMethods.option.push(t)}visitRepetitionWithSeparator(t){this.dslMethods.repetitionWithSeparator.push(t)}visitRepetitionMandatory(t){this.dslMethods.repetitionMandatory.push(t)}visitRepetitionMandatoryWithSeparator(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)}visitRepetition(t){this.dslMethods.repetition.push(t)}visitAlternation(t){this.dslMethods.alternation.push(t)}},bs=new oc;function D1(e){bs.reset(),e.accept(bs);let t=bs.dslMethods;return bs.reset(),t}function uc(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset)}function lc(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function gx(e,t,r){e.children[r]===void 0?e.children[r]=[t]:e.children[r].push(t)}function xx(e,t,r){e.children[t]===void 0?e.children[t]=[r]:e.children[t].push(r)}var R1="name";function cc(e,t){Object.defineProperty(e,R1,{enumerable:!1,configurable:!0,writable:!1,value:t})}function F1(e,t){let r=pe(e),n=r.length;for(let i=0;i<n;i++){let o=r[i],a=e[o],s=a.length;for(let u=0;u<s;u++){let l=a[u];l.tokenTypeIdx===void 0&&this[l.name](l.children,t)}}}function yx(e,t){let r=function(){};cc(r,e+"BaseSemantics");let n={visit:function(i,o){if(P(i)&&(i=i[0]),!tt(i))return this[i.name](i.children,o)},validateVisitor:function(){let i=O1(this,t);if(!X(i)){let o=R(i,a=>a.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
|
|
138
134
|
${o.join(`
|
|
139
135
|
|
|
140
136
|
`).replace(/\n/g,`
|
|
141
|
-
`)}`)}}};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=t,r}function
|
|
137
|
+
`)}`)}}};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=t,r}function Ex(e,t,r){let n=function(){};cc(n,e+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return O(t,o=>{i[o]=F1}),n.prototype=i,n.prototype.constructor=n,n}var fc;(function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"})(fc||(fc={}));function O1(e,t){return N1(e,t)}function N1(e,t){let r=et(t,i=>st(e[i])===!1),n=R(r,i=>({msg:`Missing visitor method: <${i}> on ${e.constructor.name} CST Visitor.`,type:fc.MISSING_METHOD,methodName:i}));return Qt(n)}var ws=class{initTreeBuilder(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=N(t,"nodeLocationTracking")?t.nodeLocationTracking:ft.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=Ce,this.cstFinallyStateUpdate=Ce,this.cstPostTerminal=Ce,this.cstPostNonTerminal=Ce,this.cstPostRule=Ce;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=lc,this.setNodeLocationFromNode=lc,this.cstPostRule=Ce,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Ce,this.setNodeLocationFromNode=Ce,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=uc,this.setNodeLocationFromNode=uc,this.cstPostRule=Ce,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Ce,this.setNodeLocationFromNode=Ce,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=Ce,this.setNodeLocationFromNode=Ce,this.cstPostRule=Ce,this.setInitialNodeLocation=Ce;else throw Error(`Invalid <nodeLocationTracking> config option: "${t.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(t){t.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(t){t.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(t){t.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(t){let r=this.LA(1);t.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(t){let r={name:t,children:Object.create(null)};this.setInitialNodeLocation(r),this.CST_STACK.push(r)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(t){let r=this.LA(0),n=t.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(t){let r=this.LA(0),n=t.location;n.startOffset<=r.startOffset?n.endOffset=r.endOffset:n.startOffset=NaN}cstPostTerminal(t,r){let n=this.CST_STACK[this.CST_STACK.length-1];gx(n,r,t),this.setNodeLocationFromToken(n.location,r)}cstPostNonTerminal(t,r){let n=this.CST_STACK[this.CST_STACK.length-1];xx(n,r,t),this.setNodeLocationFromNode(n.location,t.location)}getBaseCstVisitorConstructor(){if(tt(this.baseCstVisitorConstructor)){let t=yx(this.className,pe(this.gastProductionsCache));return this.baseCstVisitorConstructor=t,t}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(tt(this.baseCstVisitorWithDefaultsConstructor)){let t=Ex(this.className,pe(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=t,t}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let t=this.RULE_STACK;return t[t.length-1]}getPreviousExplicitRuleShortName(){let t=this.RULE_STACK;return t[t.length-2]}getLastExplicitRuleOccurrenceIndex(){let t=this.RULE_OCCURRENCE_STACK;return t[t.length-1]}};var Ss=class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(t){if(this.selfAnalysisDone!==!0)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=t,this.tokVectorLength=t.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Fi}LA(t){let r=this.currIdx+t;return r<0||this.tokVectorLength<=r?Fi:this.tokVector[r]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(t){this.currIdx=t}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}};var _s=class{ACTION(t){return t.call(this)}consume(t,r,n){return this.consumeInternal(r,t,n)}subrule(t,r,n){return this.subruleInternal(r,t,n)}option(t,r){return this.optionInternal(r,t)}or(t,r){return this.orInternal(r,t)}many(t,r){return this.manyInternal(t,r)}atLeastOne(t,r){return this.atLeastOneInternal(t,r)}CONSUME(t,r){return this.consumeInternal(t,0,r)}CONSUME1(t,r){return this.consumeInternal(t,1,r)}CONSUME2(t,r){return this.consumeInternal(t,2,r)}CONSUME3(t,r){return this.consumeInternal(t,3,r)}CONSUME4(t,r){return this.consumeInternal(t,4,r)}CONSUME5(t,r){return this.consumeInternal(t,5,r)}CONSUME6(t,r){return this.consumeInternal(t,6,r)}CONSUME7(t,r){return this.consumeInternal(t,7,r)}CONSUME8(t,r){return this.consumeInternal(t,8,r)}CONSUME9(t,r){return this.consumeInternal(t,9,r)}SUBRULE(t,r){return this.subruleInternal(t,0,r)}SUBRULE1(t,r){return this.subruleInternal(t,1,r)}SUBRULE2(t,r){return this.subruleInternal(t,2,r)}SUBRULE3(t,r){return this.subruleInternal(t,3,r)}SUBRULE4(t,r){return this.subruleInternal(t,4,r)}SUBRULE5(t,r){return this.subruleInternal(t,5,r)}SUBRULE6(t,r){return this.subruleInternal(t,6,r)}SUBRULE7(t,r){return this.subruleInternal(t,7,r)}SUBRULE8(t,r){return this.subruleInternal(t,8,r)}SUBRULE9(t,r){return this.subruleInternal(t,9,r)}OPTION(t){return this.optionInternal(t,0)}OPTION1(t){return this.optionInternal(t,1)}OPTION2(t){return this.optionInternal(t,2)}OPTION3(t){return this.optionInternal(t,3)}OPTION4(t){return this.optionInternal(t,4)}OPTION5(t){return this.optionInternal(t,5)}OPTION6(t){return this.optionInternal(t,6)}OPTION7(t){return this.optionInternal(t,7)}OPTION8(t){return this.optionInternal(t,8)}OPTION9(t){return this.optionInternal(t,9)}OR(t){return this.orInternal(t,0)}OR1(t){return this.orInternal(t,1)}OR2(t){return this.orInternal(t,2)}OR3(t){return this.orInternal(t,3)}OR4(t){return this.orInternal(t,4)}OR5(t){return this.orInternal(t,5)}OR6(t){return this.orInternal(t,6)}OR7(t){return this.orInternal(t,7)}OR8(t){return this.orInternal(t,8)}OR9(t){return this.orInternal(t,9)}MANY(t){this.manyInternal(0,t)}MANY1(t){this.manyInternal(1,t)}MANY2(t){this.manyInternal(2,t)}MANY3(t){this.manyInternal(3,t)}MANY4(t){this.manyInternal(4,t)}MANY5(t){this.manyInternal(5,t)}MANY6(t){this.manyInternal(6,t)}MANY7(t){this.manyInternal(7,t)}MANY8(t){this.manyInternal(8,t)}MANY9(t){this.manyInternal(9,t)}MANY_SEP(t){this.manySepFirstInternal(0,t)}MANY_SEP1(t){this.manySepFirstInternal(1,t)}MANY_SEP2(t){this.manySepFirstInternal(2,t)}MANY_SEP3(t){this.manySepFirstInternal(3,t)}MANY_SEP4(t){this.manySepFirstInternal(4,t)}MANY_SEP5(t){this.manySepFirstInternal(5,t)}MANY_SEP6(t){this.manySepFirstInternal(6,t)}MANY_SEP7(t){this.manySepFirstInternal(7,t)}MANY_SEP8(t){this.manySepFirstInternal(8,t)}MANY_SEP9(t){this.manySepFirstInternal(9,t)}AT_LEAST_ONE(t){this.atLeastOneInternal(0,t)}AT_LEAST_ONE1(t){return this.atLeastOneInternal(1,t)}AT_LEAST_ONE2(t){this.atLeastOneInternal(2,t)}AT_LEAST_ONE3(t){this.atLeastOneInternal(3,t)}AT_LEAST_ONE4(t){this.atLeastOneInternal(4,t)}AT_LEAST_ONE5(t){this.atLeastOneInternal(5,t)}AT_LEAST_ONE6(t){this.atLeastOneInternal(6,t)}AT_LEAST_ONE7(t){this.atLeastOneInternal(7,t)}AT_LEAST_ONE8(t){this.atLeastOneInternal(8,t)}AT_LEAST_ONE9(t){this.atLeastOneInternal(9,t)}AT_LEAST_ONE_SEP(t){this.atLeastOneSepFirstInternal(0,t)}AT_LEAST_ONE_SEP1(t){this.atLeastOneSepFirstInternal(1,t)}AT_LEAST_ONE_SEP2(t){this.atLeastOneSepFirstInternal(2,t)}AT_LEAST_ONE_SEP3(t){this.atLeastOneSepFirstInternal(3,t)}AT_LEAST_ONE_SEP4(t){this.atLeastOneSepFirstInternal(4,t)}AT_LEAST_ONE_SEP5(t){this.atLeastOneSepFirstInternal(5,t)}AT_LEAST_ONE_SEP6(t){this.atLeastOneSepFirstInternal(6,t)}AT_LEAST_ONE_SEP7(t){this.atLeastOneSepFirstInternal(7,t)}AT_LEAST_ONE_SEP8(t){this.atLeastOneSepFirstInternal(8,t)}AT_LEAST_ONE_SEP9(t){this.atLeastOneSepFirstInternal(9,t)}RULE(t,r,n=Oi){if(be(this.definedRulesNames,t)){let a={message:Bt.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:qe.DUPLICATE_RULE_NAME,ruleName:t};this.definitionErrors.push(a)}this.definedRulesNames.push(t);let i=this.defineRule(t,r,n);return this[t]=i,i}OVERRIDE_RULE(t,r,n=Oi){let i=ox(t,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);let o=this.defineRule(t,r,n);return this[t]=o,o}BACKTRACK(t,r){return function(){this.isBackTrackingStack.push(1);let n=this.saveRecogState();try{return t.apply(this,r),!0}catch(i){if(Gr(i))return!1;throw i}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Qa(le(this.gastProductionsCache))}};var vs=class{initRecognizerEngine(t,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Ii,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},N(r,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
|
|
142
138
|
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
|
|
143
139
|
For Further details.`);if(P(t)){if(X(t))throw Error(`A Token Vocabulary cannot be empty.
|
|
144
140
|
Note that the first argument for the parser constructor
|
|
145
141
|
is no longer a Token vector (since v4.0).`);if(typeof t[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument.
|
|
146
142
|
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
|
|
147
|
-
For Further details.`)}if(P(t))this.tokensMap=
|
|
148
|
-
Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let i=N(n,"resyncEnabled")?n.resyncEnabled:
|
|
149
|
-
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(
|
|
150
|
-
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},
|
|
143
|
+
For Further details.`)}if(P(t))this.tokensMap=Me(t,(o,a)=>(o[a.name]=a,o),{});else if(N(t,"modes")&&Qe(je(le(t.modes)),Mg)){let o=je(le(t.modes)),a=Ai(o);this.tokensMap=Me(a,(s,u)=>(s[u.name]=u,s),{})}else if(Te(t))this.tokensMap=de(t);else throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=Mt;let n=N(t,"modes")?je(le(t.modes)):le(t),i=Qe(n,o=>X(o.categoryMatches));this.tokenMatcher=i?Ii:Er,br(le(this.tokensMap))}defineRule(t,r,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${t}> may not be defined after the 'performSelfAnalysis' method has been called'
|
|
144
|
+
Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let i=N(n,"resyncEnabled")?n.resyncEnabled:Oi.resyncEnabled,o=N(n,"recoveryValueFunc")?n.recoveryValueFunc:Oi.recoveryValueFunc,a=this.ruleShortNameIdx<<12;this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=t,this.fullRuleNameToShort[t]=a;let s;return this.outputCst===!0?s=function(...c){try{this.ruleInvocationStateUpdate(a,t,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()}}:s=function(...c){try{return this.ruleInvocationStateUpdate(a,t,this.subruleIdx),r.apply(this,c)}catch(f){return this.invokeRuleCatch(f,i,o)}finally{this.ruleFinallyStateUpdate()}},Object.assign(s,{ruleName:t,originalGrammarAction:r})}invokeRuleCatch(t,r,n){let i=this.RULE_STACK.length===1,o=r&&!this.isBackTracking()&&this.recoveryEnabled;if(Gr(t)){let a=t;if(o){let s=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(s))if(a.resyncedTokens=this.reSyncTo(s),this.outputCst){let u=this.CST_STACK[this.CST_STACK.length-1];return u.recoveredNode=!0,u}else return n(t);else{if(this.outputCst){let u=this.CST_STACK[this.CST_STACK.length-1];u.recoveredNode=!0,a.partialCstResult=u}throw a}}else{if(i)return this.moveToTerminatedState(),n(t);throw a}}else throw t}optionInternal(t,r){let n=this.getKeyForAutomaticLookahead(512,r);return this.optionInternalLogic(t,r,n)}optionInternalLogic(t,r,n){let i=this.getLaFuncFromCache(n),o;if(typeof t!="function"){o=t.DEF;let a=t.GATE;if(a!==void 0){let s=i;i=()=>a.call(this)&&s.call(this)}}else o=t;if(i.call(this)===!0)return o.call(this)}atLeastOneInternal(t,r){let n=this.getKeyForAutomaticLookahead(1024,t);return this.atLeastOneInternalLogic(t,r,n)}atLeastOneInternalLogic(t,r,n){let i=this.getLaFuncFromCache(n),o;if(typeof r!="function"){o=r.DEF;let a=r.GATE;if(a!==void 0){let s=i;i=()=>a.call(this)&&s.call(this)}}else o=r;if(i.call(this)===!0){let a=this.doSingleRepetition(o);for(;i.call(this)===!0&&a===!0;)a=this.doSingleRepetition(o)}else throw this.raiseEarlyExitException(t,we.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,r],i,1024,t,fs)}atLeastOneSepFirstInternal(t,r){let n=this.getKeyForAutomaticLookahead(1536,t);this.atLeastOneSepFirstInternalLogic(t,r,n)}atLeastOneSepFirstInternalLogic(t,r,n){let i=r.DEF,o=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let s=()=>this.tokenMatcher(this.LA(1),o);for(;this.tokenMatcher(this.LA(1),o)===!0;)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,o,s,i,go],s,1536,t,go)}else throw this.raiseEarlyExitException(t,we.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG)}manyInternal(t,r){let n=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,r,n)}manyInternalLogic(t,r,n){let i=this.getLaFuncFromCache(n),o;if(typeof r!="function"){o=r.DEF;let s=r.GATE;if(s!==void 0){let u=i;i=()=>s.call(this)&&u.call(this)}}else o=r;let a=!0;for(;i.call(this)===!0&&a===!0;)a=this.doSingleRepetition(o);this.attemptInRepetitionRecovery(this.manyInternal,[t,r],i,768,t,cs,a)}manySepFirstInternal(t,r){let n=this.getKeyForAutomaticLookahead(1280,t);this.manySepFirstInternalLogic(t,r,n)}manySepFirstInternalLogic(t,r,n){let i=r.DEF,o=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let s=()=>this.tokenMatcher(this.LA(1),o);for(;this.tokenMatcher(this.LA(1),o)===!0;)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,o,s,i,ho],s,1280,t,ho)}}repetitionSepSecondInternal(t,r,n,i,o){for(;n();)this.CONSUME(r),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,r,n,i,o],n,1536,t,o)}doSingleRepetition(t){let r=this.getLexerPosition();return t.call(this),this.getLexerPosition()>r}orInternal(t,r){let n=this.getKeyForAutomaticLookahead(256,r),i=P(t)?t:t.DEF,a=this.getLaFuncFromCache(n).call(this,i);if(a!==void 0)return i[a].ALT.call(this);this.raiseNoAltException(r,t.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let t=this.LA(1),r=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:t,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new ko(r,t))}}subruleInternal(t,r,n){let i;try{let o=n!==void 0?n.ARGS:void 0;return this.subruleIdx=r,i=t.apply(this,o),this.cstPostNonTerminal(i,n!==void 0&&n.LABEL!==void 0?n.LABEL:t.ruleName),i}catch(o){throw this.subruleInternalError(o,n,t.ruleName)}}subruleInternalError(t,r,n){throw Gr(t)&&t.partialCstResult!==void 0&&(this.cstPostNonTerminal(t.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:n),delete t.partialCstResult),t}consumeInternal(t,r,n){let i;try{let o=this.LA(1);this.tokenMatcher(o,t)===!0?(this.consumeToken(),i=o):this.consumeInternalError(t,o,n)}catch(o){i=this.consumeInternalRecovery(t,r,o)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:t.name,i),i}consumeInternalError(t,r,n){let i,o=this.LA(0);throw n!==void 0&&n.ERR_MSG?i=n.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:r,previous:o,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new In(i,r,o))}consumeInternalRecovery(t,r,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){let i=this.getFollowsForInRuleRecovery(t,r);try{return this.tryInRuleRecovery(t,i)}catch(o){throw o.name===ic?n:o}}else throw n}saveRecogState(){let t=this.errors,r=de(this.RULE_STACK);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK}}reloadRecogState(t){this.errors=t.errors,this.importLexerState(t.lexerState),this.RULE_STACK=t.RULE_STACK}ruleInvocationStateUpdate(t,r,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(t),this.cstInvocationStateUpdate(r)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let t=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[t]}shortRuleNameToFullName(t){return this.shortRuleNameToFull[t]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Mt)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}};var Is=class{initErrorHandler(t){this._errors=[],this.errorMessageProvider=N(t,"errorMessageProvider")?t.errorMessageProvider:ft.errorMessageProvider}SAVE_ERROR(t){if(Gr(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:de(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return de(this._errors)}set errors(t){this._errors=t}raiseEarlyExitException(t,r,n){let i=this.getCurrRuleFullName(),o=this.getGAstProductions()[i],s=yo(t,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:s,actual:u,previous:this.LA(0),customUserDescription:n,ruleName:i});throw this.SAVE_ERROR(new Ao(l,this.LA(1),this.LA(0)))}raiseNoAltException(t,r){let n=this.getCurrRuleFullName(),i=this.getGAstProductions()[n],o=xo(t,i,this.maxLookahead),a=[];for(let l=1;l<=this.maxLookahead;l++)a.push(this.LA(l));let s=this.LA(0),u=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:o,actual:a,previous:s,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new bo(u,this.LA(1),s))}};var Ds=class{initContentAssist(){}computeContentAssist(t,r){let n=this.gastProductionsCache[t];if(tt(n))throw Error(`Rule ->${t}<- does not exist in this grammar.`);return ms([n],r,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(t){let r=Ge(t.ruleStack),i=this.getGAstProductions()[r];return new ls(i,t).startWalking()}};var Os={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Os);var bx=!0,kx=Math.pow(2,8)-1,Tx=H({name:"RECORDING_PHASE_TOKEN",pattern:ee.NA});br([Tx]);var Cx=vn(Tx,`This IToken indicates the Parser is in Recording Phase
|
|
145
|
+
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(Cx);var P1={name:`This CSTNode indicates the Parser is in Recording Phase
|
|
146
|
+
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},Rs=class{initGastRecorder(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let t=0;t<10;t++){let r=t>0?t:"";this[`CONSUME${r}`]=function(n,i){return this.consumeInternalRecord(n,t,i)},this[`SUBRULE${r}`]=function(n,i){return this.subruleInternalRecord(n,t,i)},this[`OPTION${r}`]=function(n){return this.optionInternalRecord(n,t)},this[`OR${r}`]=function(n){return this.orInternalRecord(n,t)},this[`MANY${r}`]=function(n){this.manyInternalRecord(t,n)},this[`MANY_SEP${r}`]=function(n){this.manySepFirstInternalRecord(t,n)},this[`AT_LEAST_ONE${r}`]=function(n){this.atLeastOneInternalRecord(t,n)},this[`AT_LEAST_ONE_SEP${r}`]=function(n){this.atLeastOneSepFirstInternalRecord(t,n)}}this.consume=function(t,r,n){return this.consumeInternalRecord(r,t,n)},this.subrule=function(t,r,n){return this.subruleInternalRecord(r,t,n)},this.option=function(t,r){return this.optionInternalRecord(r,t)},this.or=function(t,r){return this.orInternalRecord(r,t)},this.many=function(t,r){this.manyInternalRecord(t,r)},this.atLeastOne=function(t,r){this.atLeastOneInternalRecord(t,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 t=this;for(let r=0;r<10;r++){let n=r>0?r:"";delete t[`CONSUME${n}`],delete t[`SUBRULE${n}`],delete t[`OPTION${n}`],delete t[`OR${n}`],delete t[`MANY${n}`],delete t[`MANY_SEP${n}`],delete t[`AT_LEAST_ONE${n}`],delete t[`AT_LEAST_ONE_SEP${n}`]}delete t.consume,delete t.subrule,delete t.option,delete t.or,delete t.many,delete t.atLeastOne,delete t.ACTION,delete t.BACKTRACK,delete t.LA})}ACTION_RECORD(t){}BACKTRACK_RECORD(t,r){return()=>!0}LA_RECORD(t){return Fi}topLevelRuleRecord(t,r){try{let n=new lt({definition:[],name:t});return n.name=t,this.recordingProdStack.push(n),r.call(this),this.recordingProdStack.pop(),n}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+`
|
|
151
147
|
This error was thrown during the "grammar recording phase" For more info see:
|
|
152
|
-
https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}}optionInternalRecord(t,r){return
|
|
153
|
-
inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}let i=
|
|
154
|
-
inside top level rule: <${this.recordingProdStack[0].name}>`);throw a.KNOWN_RECORDER_ERROR=!0,a}let i=
|
|
155
|
-
Idx value must be a none negative value smaller than ${
|
|
148
|
+
https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}}optionInternalRecord(t,r){return wo.call(this,Ee,t,r)}atLeastOneInternalRecord(t,r){wo.call(this,Fe,r,t)}atLeastOneSepFirstInternalRecord(t,r){wo.call(this,Oe,r,t,bx)}manyInternalRecord(t,r){wo.call(this,ue,r,t)}manySepFirstInternalRecord(t,r){wo.call(this,Se,r,t,bx)}orInternalRecord(t,r){return M1.call(this,t,r)}subruleInternalRecord(t,r,n){if(Fs(r),!t||N(t,"ruleName")===!1){let s=new Error(`<SUBRULE${Ax(r)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(t)}>
|
|
149
|
+
inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}let i=er(this.recordingProdStack),o=t.ruleName,a=new he({idx:r,nonTerminalName:o,label:n?.LABEL,referencedRule:void 0});return i.definition.push(a),this.outputCst?P1:Os}consumeInternalRecord(t,r,n){if(Fs(r),!Gl(t)){let a=new Error(`<CONSUME${Ax(r)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(t)}>
|
|
150
|
+
inside top level rule: <${this.recordingProdStack[0].name}>`);throw a.KNOWN_RECORDER_ERROR=!0,a}let i=er(this.recordingProdStack),o=new ie({idx:r,terminalType:t,label:n?.LABEL});return i.definition.push(o),Cx}};function wo(e,t,r,n=!1){Fs(r);let i=er(this.recordingProdStack),o=st(t)?t:t.DEF,a=new e({definition:[],idx:r});return n&&(a.separator=t.SEP),N(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(a),o.call(this),i.definition.push(a),this.recordingProdStack.pop(),Os}function M1(e,t){Fs(t);let r=er(this.recordingProdStack),n=P(e)===!1,i=n===!1?e:e.DEF,o=new _e({definition:[],idx:t,ignoreAmbiguities:n&&e.IGNORE_AMBIGUITIES===!0});N(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD);let a=io(i,s=>st(s.GATE));return o.hasPredicates=a,r.definition.push(o),O(i,s=>{let u=new ge({definition:[]});o.definition.push(u),N(s,"IGNORE_AMBIGUITIES")?u.ignoreAmbiguities=s.IGNORE_AMBIGUITIES:N(s,"GATE")&&(u.ignoreAmbiguities=!0),this.recordingProdStack.push(u),s.ALT.call(this),this.recordingProdStack.pop()}),Os}function Ax(e){return e===0?"":`${e}`}function Fs(e){if(e<0||e>kx){let t=new Error(`Invalid DSL Method idx value: <${e}>
|
|
151
|
+
Idx value must be a none negative value smaller than ${kx+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}var Ns=class{initPerformanceTracer(t){if(N(t,"traceInitPerf")){let r=t.traceInitPerf,n=typeof r=="number";this.traceInitMaxIdent=n?r:1/0,this.traceInitPerf=n?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=ft.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(t,r){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${t}>`);let{time:i,value:o}=ao(r),a=i>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(`${n}<-- <${t}> time: ${i}ms`),this.traceInitIndent--,o}else return r()}};function wx(e,t){t.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(e.prototype,i,o):e.prototype[i]=r.prototype[i]})})}var Fi=vn(Mt,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Fi);var ft=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:us,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Oi=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0}),qe;(function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(qe||(qe={}));var So=class e{static performSelfAnalysis(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let t;this.selfAnalysisDone=!0;let r=this.className;this.TRACE_INIT("toFastProps",()=>{so(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),O(this.definedRulesNames,i=>{let a=this[i].originalGrammarAction,s;this.TRACE_INIT(`${i} Rule`,()=>{s=this.topLevelRuleRecord(i,a)}),this.gastProductionsCache[i]=s})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=lx({rules:le(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(X(n)&&this.skipValidations===!1){let i=cx({rules:le(this.gastProductionsCache),tokenTypes:le(this.tokensMap),errMsgProvider:Bt,grammarName:r}),o=rx({lookaheadStrategy:this.lookaheadStrategy,rules:le(this.gastProductionsCache),tokenTypes:le(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(i,o)}}),X(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let i=xg(le(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:le(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(le(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!X(this.definitionErrors))throw t=R(this.definitionErrors,i=>i.message),new Error(`Parser Definition Errors detected:
|
|
156
152
|
${t.join(`
|
|
157
153
|
-------------------------------
|
|
158
154
|
`)}`)})}constructor(t,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(t,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initContentAssist(),n.initGastRecorder(r),n.initPerformanceTracer(r),N(r,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
|
|
159
155
|
Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
|
|
160
156
|
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
|
|
161
|
-
For further details.`);this.skipValidations=N(r,"skipValidations")?r.skipValidations:
|
|
157
|
+
For further details.`);this.skipValidations=N(r,"skipValidations")?r.skipValidations:ft.skipValidations}};So.DEFER_DEFINITION_ERRORS_HANDLING=!1;wx(So,[ys,ks,ws,Ss,vs,_s,Is,Ds,Rs,Ns]);var Dn=class extends So{constructor(t,r=ft){let n=de(r);n.outputCst=!0,super(t,n)}};var Ps=H({name:"flag",pattern:/--[\w-]+/}),hc=H({longer_alt:Ps,name:"alias",pattern:/-[A-Z]/i}),Sx=H({group:ee.SKIPPED,name:"comma",pattern:/,/}),_x=H({group:ee.SKIPPED,name:"dollar",pattern:/\$/}),Ls=H({group:ee.SKIPPED,name:"whiteSpace",pattern:/ /}),vx=H({group:ee.SKIPPED,name:"newLine",pattern:/\n/}),gc=H({name:"word",pattern:/\S+/}),vo=H({name:"argument",pattern:/(<\S+>|\[.+\])/}),xc=H({name:"programDescription",pattern:/\w.+(?=\n\n {2}Usage)/}),Ix=H({group:ee.SKIPPED,name:"startUsage",pattern:/ {2}Usage\n/,push_mode:"USAGE_MODE"}),Dx=H({group:ee.SKIPPED,name:"endUsage",pattern:/\n/,pop_mode:!0}),yc=H({name:"startOptions",pattern:/ {2}Options\n/,push_mode:"OPTIONS_MODE"}),Ec=H({name:"startRow",pattern:/ {4}/,push_mode:"ROW_MODE"}),bc=H({name:"rowDescription",pattern:/\w.+/}),Rx=H({group:ee.SKIPPED,name:"endRow",pattern:/\n/,pop_mode:!0}),Fx=H({group:ee.SKIPPED,name:"endOptions",pattern:/\n/,pop_mode:!0}),U1=new ee({defaultMode:"DEFAULT_MODE",modes:{DEFAULT_MODE:[Ix,yc,xc,vx,Ls],OPTIONS_MODE:[Fx,Ec],ROW_MODE:[Rx,hc,Ps,Sx,vo,bc,Ls],USAGE_MODE:[Dx,_x,vo,gc,Ls]}}),z1=[Ps,hc,Sx,_x,Ls,vx,gc,vo,xc,Ix,Dx,yc,Ec,bc,Rx,Fx],mc=class extends Dn{sectionRow=this.RULE("sectionRow",()=>{this.CONSUME(Ec),this.MANY(()=>{this.OR([{ALT:()=>this.CONSUME(vo)},{ALT:()=>this.CONSUME(hc)},{ALT:()=>this.CONSUME(Ps)},{ALT:()=>this.CONSUME(bc,{LABEL:"description"})}])})});optionsSection=this.RULE("optionsSection",()=>{this.CONSUME(yc),this.MANY(()=>{this.SUBRULE(this.sectionRow)})});programHelp=this.RULE("programHelp",()=>{this.CONSUME(xc,{LABEL:"description"}),this.AT_LEAST_ONE(()=>{this.CONSUME(gc,{LABEL:"commandName"})}),this.MANY(()=>{this.CONSUME(vo)}),this.OPTION(()=>{this.SUBRULE(this.optionsSection)})});constructor(){super(z1),this.performSelfAnalysis()}},_o=new mc,dc=class extends _o.getBaseCstVisitorConstructor(){constructor(){super(),this.validateVisitor()}optionsSection(t){return t.sectionRow.map(r=>this.visit(r))}programHelp(t){let{command:r,subcommand:n}=Ms(this.getString(t.commandName));return{arguments:this.getArray(t.argument),commandName:r,description:this.getString(t.description),options:t.optionsSection?this.visit(t.optionsSection):void 0,subcommandName:n}}sectionRow(t){return{aliases:this.getArray(t.alias),arguments:this.getArray(t.argument),description:this.getString(t.description,!0),flags:this.getArray(t.flag)}}clean(t){return t.replaceAll(/^[\s[]*(default:)?\s*|[\s\]]*$/g,"")}getArray(t){if(t!==void 0)return t.map(r=>r.image)}getString(t,r=!1){if(t!==void 0)return t.map(n=>r?this.clean(n.image):n.image).join(" ")}},j1=new dc;function Ox(e){let t=U1.tokenize(e);if(t.errors.length>0)throw new Error(`Errors lexing CLI command: ${JSON.stringify(t.errors,void 0,2)}`);_o.input=t.tokens;let r=_o.programHelp();if(_o.errors.length>0)throw new Error(`Errors parsing CLI command help text: ${JSON.stringify(_o.errors,void 0,2)}`);let n;try{n=j1.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 Cc=H({name:"flag",pattern:/--[\w-]+/}),wc=H({name:"alias",pattern:/-[A-Z]/i}),Nx=H({group:ee.SKIPPED,name:"comma",pattern:/,/}),Ni=H({name:"word",pattern:/\S+/}),Do=H({name:"argument",pattern:/<\S+>|\[\S+\]/}),Sc=H({name:"type",pattern:/\[(boolean|string|array|number)\]/}),_c=H({name:"defaultInfo",pattern:/\[default\]/}),vc=H({name:"required",pattern:/\[required\]/}),Ic=H({name:"defaultInfoDescription",pattern:/\[default:\s.+\]/}),Dc=H({name:"choices",pattern:/\[choices:\s.+?\]/}),kc=H({group:ee.SKIPPED,name:"whiteSpace",pattern:/\s/}),Lx=H({group:ee.SKIPPED,name:"startProgramDescription",pattern:/\n\n/,push_mode:"PROGRAM_DESCRIPTION_MODE"}),Rc=H({name:"programDescription",pattern:/.+/}),Px=H({group:ee.SKIPPED,name:"endProgramDescription",pattern:/\n\n/,pop_mode:!0}),Fc=H({name:"startOptionsSection",pattern:/Options:?\n/,push_mode:"SECTION_MODE"}),Oc=H({name:"startPositionalsSection",pattern:/Positionals:\n/,push_mode:"SECTION_MODE"}),Nc=H({name:"startCommandsSection",pattern:/Commands:\n/,push_mode:"SECTION_MODE"}),Lc=H({name:"startRow",pattern:/ {2,}/,push_mode:"ROW_MODE"}),Pc=H({name:"rowDescription",pattern:/ {2}\w.+ {2}/}),Mc=H({name:"rowDescriptionTerminal",pattern:/ {2}\w.+/}),Mx=H({group:ee.SKIPPED,name:"endRow",pattern:/\n/,pop_mode:!0}),Bx=H({group:ee.SKIPPED,name:"endSection",pattern:/\n+/,pop_mode:!0}),$1=new ee({defaultMode:"DEFAULT_MODE",modes:{DEFAULT_MODE:[Fc,Oc,Nc,Lx,Do,Ni,kc],PROGRAM_DESCRIPTION_MODE:[Px,Rc],ROW_MODE:[Mx,Nx,Sc,Pc,Mc,Ic,_c,vc,Dc,Cc,wc,Do,Ni,kc],SECTION_MODE:[Lc,Bx]}}),q1=[Cc,wc,Nx,Ni,Do,Sc,_c,vc,Ic,Dc,kc,Lx,Rc,Px,Fc,Oc,Nc,Lc,Pc,Mc,Mx,Bx],Ac=class extends Dn{sectionRow=this.RULE("sectionRow",()=>{this.CONSUME(Lc),this.OPTION(()=>{this.CONSUME(Ni,{LABEL:"parentCommandName"})}),this.MANY(()=>{this.CONSUME1(Ni,{LABEL:"commandName"})}),this.MANY1(()=>{this.OR([{ALT:()=>this.CONSUME(Do)},{ALT:()=>this.CONSUME(wc)},{ALT:()=>this.CONSUME(Cc)},{ALT:()=>this.CONSUME(Pc,{LABEL:"description"})},{ALT:()=>this.CONSUME(Mc,{LABEL:"description"})},{ALT:()=>this.CONSUME(Sc)},{ALT:()=>this.CONSUME(vc)},{ALT:()=>this.CONSUME(Ic)},{ALT:()=>this.CONSUME(_c)},{ALT:()=>this.CONSUME(Dc)}])})});commandsSection=this.RULE("commandsSection",()=>{this.CONSUME(Nc),this.MANY1(()=>{this.SUBRULE1(this.sectionRow)})});optionsSection=this.RULE("optionsSection",()=>{this.CONSUME(Fc),this.MANY2(()=>{this.SUBRULE2(this.sectionRow)})});positionalsSection=this.RULE("positionalsSection",()=>{this.CONSUME(Oc),this.MANY(()=>{this.SUBRULE(this.sectionRow)})});programHelp=this.RULE("programHelp",()=>{this.AT_LEAST_ONE(()=>{this.CONSUME(Ni,{LABEL:"commandName"})}),this.MANY1(()=>{this.CONSUME(Do)}),this.OPTION(()=>{this.CONSUME(Rc,{LABEL:"description"})}),this.OPTION1(()=>{this.SUBRULE(this.commandsSection)}),this.OPTION2(()=>{this.SUBRULE(this.positionalsSection)}),this.OPTION3(()=>{this.SUBRULE(this.optionsSection)})});constructor(){super(q1),this.performSelfAnalysis()}},Io=new Ac,Tc=class extends Io.getBaseCstVisitorConstructor(){constructor(){super(),this.validateVisitor()}commandsSection(t){return t.sectionRow.map(r=>this.visit(r))}optionsSection(t){return t.sectionRow.map(r=>this.visit(r))}positionalsSection(t){return t.sectionRow.map(r=>this.positionalParentCommandToArguments(this.visit(r)))}programHelp(t){let{command:r,subcommand:n}=Ms(this.getString(t.commandName));return{arguments:this.getArray(t.argument),commandName:r,commands:t.commandsSection?this.visit(t.commandsSection):void 0,description:this.getString(t.description),options:t.optionsSection?this.visit(t.optionsSection):void 0,positionals:t.positionalsSection?this.visit(t.positionalsSection):void 0,subcommandName:n}}sectionRow(t){return{aliases:this.getArray(t.alias),arguments:this.getArray(t.argument),choices:this.splitChoices(this.getString(t.choices)),commandName:this.getString(t.commandName),default:t.defaultInfo?!0:void 0,defaultValue:this.getString(t.defaultInfoDescription,!0),description:this.getString(t.description,!0),flags:this.getArray(t.flag),parentCommandName:this.getString(t.parentCommandName),required:t.required?!0:void 0,type:this.getString(t.type,!0)}}clean(t){return t.endsWith("]]")?t.replaceAll(/(^\[default:\s*)|(\]$)/g,""):t.replaceAll(/^[\s[]*(default:)?\s*|[\s\]]*$/g,"")}getArray(t){if(t!==void 0)return t.map(r=>r.image)}getString(t,r=!1){if(t!==void 0)return t.map(n=>r?this.clean(n.image):n.image).join(" ")}positionalParentCommandToArguments(t){let{arguments:r,parentCommandName:n,...i}=t;return n===void 0?t:{arguments:[n,...r??[]],...i}}splitChoices(t){if(t!==void 0)return this.clean(t.replaceAll(/^\[choices:\s/g,"")).split(", ")}},V1=new Tc;function Ux(e){let t=$1.tokenize(e);if(t.errors.length>0)throw new Error(`Errors lexing CLI command: ${JSON.stringify(t.errors,void 0,2)}`);Io.input=t.tokens;let r=Io.programHelp();if(Io.errors.length>0)throw new Error(`Errors parsing CLI command help text: ${JSON.stringify(Io.errors,void 0,2)}`);let n;try{n=V1.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 zx={yargs:Ux,meow:Ox};function Ms(e){if(e===void 0)throw new Error('Could not find "commandName" entry in help');let t=e.split(" ");if(t.length===0)throw new Error('Could not find "commandName" entry in help');if(t.length===1)return{command:t[0],subcommand:void 0};let r=t.at(-1);return{command:t.slice(0,-1).join(" "),subcommand:r}}function jx(e){for(let[t,r]of Object.entries(zx)){Bc.info(`Trying to parse help string with ${t} parser...`);try{return r(e)}catch(n){n instanceof Error&&Bc.info(`Error in "${t}" parser: ${String(n)}`);continue}}Bc.error("Could not parse help string with any parser")}async function Uc(e,t="--help",r){let n=`${e} ${t}`,i=await K1(n),o=jx(i);return o===void 0?($x.warn("Falling back to basic cli help text output."),W1(i)):H1(e,t,r??Number.MAX_SAFE_INTEGER,o)}async function H1(e,t,r,n){if(r<=0)return $x.info("Max CLI command help depth reached, stopping recursion"),"";let i=Cm(n,r),o=e.split(" ")[0];if(n.commands)for(let a of n.commands){if(!a.parentCommandName||!a.commandName)continue;let s=await Uc(`${o} ${a.commandName}`,t,r-1);if(s==="")return i;i+=`
|
|
162
158
|
|
|
163
|
-
${s}`}return i}function
|
|
159
|
+
${s}`}return i}function W1(e){return`\`\`\`txt
|
|
164
160
|
${e}
|
|
165
|
-
\`\`\``}async function
|
|
161
|
+
\`\`\``}async function K1(e){let t;try{let{stderr:r,stdout:n}=await G1(e);t=n,(t===void 0||t==="")&&(t=r)}catch(r){if(r instanceof Error)throw new TypeError(`Error running CLI help command: "${e}"
|
|
166
162
|
${r.message}
|
|
167
163
|
`)}if(t===void 0||t==="")throw new Error(`No result from running CLI help command: "${e}"
|
|
168
|
-
`);return t}import
|
|
164
|
+
`);return t}import qx from"node:process";import Z1 from"node:path";import Y1 from"node:fs";import X1 from"node:fs/promises";var Vx=qx.platform==="win32",J1=Vx?new Set(qx.env.PATHEXT?.split(";").map(e=>e.toLowerCase())):[];async function Gx(e){try{return await X1.access(e,Y1.X_OK),Vx?J1.has(Z1.extname(e)):!0}catch{return!1}}import Q1 from"node:path";import{log as eF}from"remark-mdat";import tF from"which";async function Hx(e){return e??=await rF(),iF(e)}async function rF(){let e=await At();if(e.bin){let t=typeof e.bin=="string"?e.bin:String(Object.values(e.bin).at(0));if(nF(t))return eF.info(`Inferred <!-- cli-help --> command to run from package.json: ${t}`),t}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 nF(e){let t=Q1.parse(e);return t.root!==""||t.dir!==""}async function iF(e){let t=await tF(e,{nothrow:!0})??void 0;if(t??=await oF(e)??void 0,t!==void 0&&await Gx(t))return t;throw new Error(`The cli-help rule noticed that "${t}" is not executable.`)}async function oF(e){return(await At()).bin?.[e]??void 0}var Bs={"cli-help":{async content(e){let t=L.object({cliCommand:L.string().optional(),depth:L.number().optional(),helpFlag:L.string().optional()}).optional().parse(e),r=await Hx(t?.cliCommand);return Uc(r,t?.helpFlag,t?.depth)}}};var Wx={cli:aF(Bs)};import sF from"node:fs/promises";import Kx from"node:path";var Zx={code:{async content(e){let t=L.object({file:L.string(),language:L.string().optional()}).parse(e),r=(Kx.extname(t.file)??"").replace(/^\./,""),n=await sF.readFile(Kx.join(process.cwd(),t.file),"utf8");return`\`\`\`${r}
|
|
169
165
|
${n}
|
|
170
|
-
\`\`\``}}};var
|
|
171
|
-
[Issues](${t}) and pull requests are welcome.`},order:15}};var
|
|
172
|
-
[${r}](license.txt) \xA9 ${t.name}`},order:16}};var
|
|
173
|
-
`)}var Ty={"size-table":{async content(e){let t=JF.parse(e),r=await Promise.all(t.files.map(async n=>{let i=Ay.join(process.cwd(),n),o=await Xs(i);return[n,o]}));return QF(r,{brotli:t.brotli,gzip:t.gzip,original:t.original,showPercentage:t.showPercentage})}}};var Cy=/[\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 e1=Object.hasOwnProperty,Uo=class{constructor(){this.occurrences,this.reset()}slug(t,r){let n=this,i=t1(t,r===!0),o=i;for(;e1.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 t1(e,t){return typeof e!="string"?"":(t||(e=e.toLowerCase()),e.replace(Cy,"").replace(/ /g,"-"))}function Js(e){return new RegExp("^("+e+")$","i")}var wy=new Uo;function Sy(e,t,r){let n="children"in e?e.children.length:0,i=r.skip?Js(r.skip):void 0,o=Kt(r.parents||function(c){return c===e}),a=[],s,u,l;return wy.reset(),ao(e,"heading",function(c,f,p){let m=hr(c,{includeImageAlt:!1}),h=c.data&&c.data.hProperties&&c.data.hProperties.id,E=wy.slug(h||m);if(o(p)){if(f!==void 0&&t&&!s&&t.test(m)){s=f+1,l=c;return}f!==void 0&&l&&!u&&c.depth<=l.depth&&(u=f),(u||!t)&&(!r.minDepth||c.depth>=r.minDepth)&&(!r.maxDepth||c.depth<=r.maxDepth)&&(!i||!i.test(m))&&a.push({depth:c.depth,children:c.children,id:E})}}),{index:s===void 0?-1:s,endIndex:s===void 0?-1:u||n,map:a}}var vy=typeof self=="object"?self:globalThis,o1=(e,t)=>{let r=(i,o)=>(e.set(o,i),i),n=i=>{if(e.has(i))return e.get(i);let[o,a]=t[i];switch(o){case 0:case-1:return r(a,i);case 1:{let s=r([],i);for(let u of a)s.push(n(u));return s}case 2:{let s=r({},i);for(let[u,l]of a)s[n(u)]=n(l);return s}case 3:return r(new Date(a),i);case 4:{let{source:s,flags:u}=a;return r(new RegExp(s,u),i)}case 5:{let s=r(new Map,i);for(let[u,l]of a)s.set(n(u),n(l));return s}case 6:{let s=r(new Set,i);for(let u of a)s.add(n(u));return s}case 7:{let{name:s,message:u}=a;return r(new vy[s](u),i)}case 8:return r(BigInt(a),i);case"BigInt":return r(Object(BigInt(a)),i);case"ArrayBuffer":return r(new Uint8Array(a).buffer,a);case"DataView":{let{buffer:s}=new Uint8Array(a);return r(new DataView(s),a)}}return r(new vy[o](a),i)};return n},ef=e=>o1(new Map,e)(0);var ji="",{toString:a1}={},{keys:s1}=Object,zo=e=>{let t=typeof e;if(t!=="object"||!e)return[0,t];let r=a1.call(e).slice(8,-1);switch(r){case"Array":return[1,ji];case"Object":return[2,ji];case"Date":return[3,ji];case"RegExp":return[4,ji];case"Map":return[5,ji];case"Set":return[6,ji];case"DataView":return[1,r]}return r.includes("Array")?[1,r]:r.includes("Error")?[7,r]:[2,r]},eu=([e,t])=>e===0&&(t==="function"||t==="symbol"),u1=(e,t,r,n)=>{let i=(a,s)=>{let u=n.push(a)-1;return r.set(s,u),u},o=a=>{if(r.has(a))return r.get(a);let[s,u]=zo(a);switch(s){case 0:{let c=a;switch(u){case"bigint":s=8,c=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([-1],a)}return i([s,c],a)}case 1:{if(u){let p=a;return u==="DataView"?p=new Uint8Array(a.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(a)),i([u,[...p]],a)}let c=[],f=i([s,c],a);for(let p of a)c.push(o(p));return f}case 2:{if(u)switch(u){case"BigInt":return i([u,a.toString()],a);case"Boolean":case"Number":case"String":return i([u,a.valueOf()],a)}if(t&&"toJSON"in a)return o(a.toJSON());let c=[],f=i([s,c],a);for(let p of s1(a))(e||!eu(zo(a[p])))&&c.push([o(p),o(a[p])]);return f}case 3:return i([s,a.toISOString()],a);case 4:{let{source:c,flags:f}=a;return i([s,{source:c,flags:f}],a)}case 5:{let c=[],f=i([s,c],a);for(let[p,m]of a)(e||!(eu(zo(p))||eu(zo(m))))&&c.push([o(p),o(m)]);return f}case 6:{let c=[],f=i([s,c],a);for(let p of a)(e||!eu(zo(p)))&&c.push(o(p));return f}}let{message:l}=a;return i([s,{name:u,message:l}],a)};return o},tf=(e,{json:t,lossy:r}={})=>{let n=[];return u1(!(t||r),!!t,new Map,n)(e),n};var rf=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ef(tf(e,t)):structuredClone(e):(e,t)=>ef(tf(e,t));function Fy(e,t){let{ordered:r=!1,tight:n=!1,prefix:i}=t,o={type:"list",ordered:r,spread:!1,children:[]},a=Number.POSITIVE_INFINITY,s=-1;for(;++s<e.length;)e[s].depth<a&&(a=e[s].depth);for(s=-1;++s<e.length;)e[s].depth-=a-1;for(s=-1;++s<e.length;)jo(e[s],o,{ordered:r,tight:n,prefix:i});return o}function jo(e,t,r){let n=-1,i=t.children[t.children.length-1];if(t.type==="list")if(e.depth===1)t.children.push({type:"listItem",spread:!1,children:[{type:"paragraph",children:[{type:"link",title:null,url:"#"+(r.prefix||"")+e.id,children:nf(e.children)}]}]});else if(t.children.length>0){let o=t.children[t.children.length-1];jo(e,o,r)}else{let o={type:"listItem",spread:!1,children:[]};t.children.push(o),jo(e,o,r)}else if(i&&i.type==="list")e.depth--,jo(e,i,r);else{let o={type:"list",ordered:r.ordered,spread:!1,children:[]};t.children.push(o),e.depth--,jo(e,o,r)}if(t.type==="list"&&!r.tight){for(t.spread=!1;++n<t.children.length;)if(t.children[n].children.length>1){t.spread=!0;break}}else t.spread=!r.tight}function nf(e){let t=[],r=-1;for(;++r<e.length;){let n=l1(e[r]);Array.isArray(n)?t.push(...n):t.push(n)}return t}function l1(e){if(e.type==="footnoteReference")return[];if(e.type==="link"||e.type==="linkReference")return nf(e.children);if("children"in e){let{children:n,position:i,...o}=e;return Object.assign(rf(o),{children:nf(e.children)})}let{position:t,...r}=e;return rf(r)}function of(e,t){let r=t||{},n=r.heading?Js(r.heading):void 0,i=Sy(e,n,r);return{index:n?i.index:void 0,endIndex:n?i.endIndex:void 0,map:i.map.length>0?Fy(i.map,r):void 0}}var tu={"table-of-contents":{applicationOrder:1,async content(e,t){let r=L.object({depth:L.union([L.literal(1),L.literal(2),L.literal(3),L.literal(4),L.literal(5),L.literal(6)]).optional()}).optional().parse(e),n=of(t,{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"},a=ri().use(Dr).stringify(o).replaceAll(`
|
|
166
|
+
\`\`\``}}};var Us={contributing:{async content(){let t=(await At()).bugs?.url;if(t===void 0)throw new Error('Could not find "bugs.url" entry in package.json');return`## Contributing
|
|
167
|
+
[Issues](${t}) and pull requests are welcome.`},order:15}};var zs={description:{async content(){let e=await At();if(e.description===void 0)throw new Error('Could not find "description" entry in package.json');return`**${e.description}**`},order:4}};import{getSoleRule as Yx}from"remark-mdat";var js={license:{async content(){let e=await At(),{author:t,license:r}=e;if(t?.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
|
|
168
|
+
[${r}](license.txt) \xA9 ${t.name}`},order:16}};var Xx={footer:{content:[Yx(Us),Yx(js)],order:17}};import{getSoleRule as Vs}from"remark-mdat";import{getSoleRule as uF}from"remark-mdat";var $s={"short-description":uF(zs)};var qs={title:{applicationOrder:2,async content(e){let{postfix:t,prefix:r,titleCase:n}=L.object({postfix:L.string().optional().default(""),prefix:L.string().optional().default(""),titleCase:L.boolean().optional().default(!1)}).parse(e??{}),{name:i}=await At();return`# ${r}${n?lF(i):i}${t}`},order:1}};function lF(e){return e.split(/[ _-]/).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}var Jx={header:{applicationOrder:2,content:[Vs(qs),Vs(Ta),Vs(ka),Vs($s)],order:1}};import kF from"node:path";import gF from"node:fs/promises";import{promisify as ty}from"node:util";import{brotliCompress as xF,gzip as yF}from"node:zlib";var cF=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],fF=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],pF=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],mF=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Qx=(e,t,r)=>{let n=e;return typeof t=="string"||Array.isArray(t)?n=e.toLocaleString(t,r):(t===!0||r!==void 0)&&(n=e.toLocaleString(void 0,r)),n},ey=e=>{if(typeof e=="number")return Math.log10(e);let t=e.toString(10);return t.length+Math.log10("0."+t.slice(0,15))},dF=e=>typeof e=="number"?Math.log(e):ey(e)*Math.log(10),hF=(e,t)=>{if(typeof e=="number")return e/t;let r=e/BigInt(t),n=e%BigInt(t);return Number(r)+Number(n)/t};function zc(e,t){if(typeof e!="bigint"&&!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};let r=t.bits?t.binary?mF:pF:t.binary?fF:cF,n=t.space?" ":"";if(t.signed&&(typeof e=="number"?e===0:e===0n))return` 0${n}${r[0]}`;let i=e<0,o=i?"-":t.signed?"+":"";i&&(e=-e);let a;if(t.minimumFractionDigits!==void 0&&(a={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(a={maximumFractionDigits:t.maximumFractionDigits,...a}),e<1){let c=Qx(e,t.locale,a);return o+c+n+r[0]}let s=Math.min(Math.floor(t.binary?dF(e)/Math.log(1024):ey(e)/3),r.length-1);e=hF(e,(t.binary?1024:1e3)**s),a||(e=e.toPrecision(3));let u=Qx(Number(e),t.locale,a),l=r[s];return o+u+n+l}var EF=ty(xF),bF=ty(yF);function jc(e,t){let r=t===0?0:(t-e)/t*100;return{bytes:e,bytesPretty:zc(e,{maximumFractionDigits:1}),percent:r,percentPretty:`${Math.round(r)}%`}}async function Gs(e){try{let t=await gF.readFile(e),r=t.length,[n,i]=await Promise.all([EF(t),bF(t)]);return{brotli:jc(n.length,r),gzip:jc(i.length,r),original:jc(r,r)}}catch(t){throw new Error(`Failed to analyze file: ${t instanceof Error?t.message:"Unknown error"}`)}}var AF=L.object({compression:L.enum(["none","brotli","gzip"]).optional().default("none"),file:L.string()});function TF(e,t){switch(t){case"brotli":return e.brotli.bytesPretty;case"gzip":return e.gzip.bytesPretty;case"none":return e.original.bytesPretty}}var ry={size:{async content(e){let t=AF.parse(e),r=kF.join(process.cwd(),t.file),n=await Gs(r);return TF(n,t.compression)}}};import iy from"node:path";var ny=L.union([L.string(),L.array(L.string())]).transform(e=>Array.isArray(e)?e:[e]),CF=L.union([L.object({brotli:L.boolean().optional().default(!0),file:ny,gzip:L.boolean().optional().default(!0),original:L.boolean().optional().default(!0),showPercentage:L.boolean().optional().default(!1)}),L.object({brotli:L.boolean().optional().default(!0),files:ny,gzip:L.boolean().optional().default(!0),original:L.boolean().optional().default(!0),showPercentage:L.boolean().optional().default(!1)})]).transform(e=>{if("file"in e){let{file:t,...r}=e;return{files:t,...r}}return e});function wF(e,t){let r=["File"];t.original&&r.push("Original"),t.gzip&&r.push("Gzip"),t.brotli&&r.push("Brotli");let n=r.map(()=>"---"),i=e.map(([o,a])=>{let s=[iy.basename(o)];return t.original&&s.push(a.original.bytesPretty),t.gzip&&s.push(t.showPercentage?`${a.gzip.bytesPretty} (${a.gzip.percentPretty})`:a.gzip.bytesPretty),t.brotli&&s.push(t.showPercentage?`${a.brotli.bytesPretty} (${a.brotli.percentPretty})`:a.brotli.bytesPretty),s});return[`| ${r.join(" | ")} |`,`| ${n.join(" | ")} |`,...i.map(o=>`| ${o.join(" | ")} |`)].join(`
|
|
169
|
+
`)}var oy={"size-table":{async content(e){let t=CF.parse(e),r=await Promise.all(t.files.map(async n=>{let i=iy.join(process.cwd(),n),o=await Gs(i);return[n,o]}));return wF(r,{brotli:t.brotli,gzip:t.gzip,original:t.original,showPercentage:t.showPercentage})}}};var ay=/[\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 SF=Object.hasOwnProperty,Ro=class{constructor(){this.occurrences,this.reset()}slug(t,r){let n=this,i=_F(t,r===!0),o=i;for(;SF.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 _F(e,t){return typeof e!="string"?"":(t||(e=e.toLowerCase()),e.replace(ay,"").replace(/ /g,"-"))}function Hs(e){return new RegExp("^("+e+")$","i")}var sy=new Ro;function uy(e,t,r){let n="children"in e?e.children.length:0,i=r.skip?Hs(r.skip):void 0,o=Vt(r.parents||function(c){return c===e}),a=[],s,u,l;return sy.reset(),Ji(e,"heading",function(c,f,p){let m=fr(c,{includeImageAlt:!1}),h=c.data&&c.data.hProperties&&c.data.hProperties.id,E=sy.slug(h||m);if(o(p)){if(f!==void 0&&t&&!s&&t.test(m)){s=f+1,l=c;return}f!==void 0&&l&&!u&&c.depth<=l.depth&&(u=f),(u||!t)&&(!r.minDepth||c.depth>=r.minDepth)&&(!r.maxDepth||c.depth<=r.maxDepth)&&(!i||!i.test(m))&&a.push({depth:c.depth,children:c.children,id:E})}}),{index:s===void 0?-1:s,endIndex:s===void 0?-1:u||n,map:a}}var ly=typeof self=="object"?self:globalThis,RF=(e,t)=>{let r=(i,o)=>(e.set(o,i),i),n=i=>{if(e.has(i))return e.get(i);let[o,a]=t[i];switch(o){case 0:case-1:return r(a,i);case 1:{let s=r([],i);for(let u of a)s.push(n(u));return s}case 2:{let s=r({},i);for(let[u,l]of a)s[n(u)]=n(l);return s}case 3:return r(new Date(a),i);case 4:{let{source:s,flags:u}=a;return r(new RegExp(s,u),i)}case 5:{let s=r(new Map,i);for(let[u,l]of a)s.set(n(u),n(l));return s}case 6:{let s=r(new Set,i);for(let u of a)s.add(n(u));return s}case 7:{let{name:s,message:u}=a;return r(new ly[s](u),i)}case 8:return r(BigInt(a),i);case"BigInt":return r(Object(BigInt(a)),i);case"ArrayBuffer":return r(new Uint8Array(a).buffer,a);case"DataView":{let{buffer:s}=new Uint8Array(a);return r(new DataView(s),a)}}return r(new ly[o](a),i)};return n},Vc=e=>RF(new Map,e)(0);var Li="",{toString:FF}={},{keys:OF}=Object,Fo=e=>{let t=typeof e;if(t!=="object"||!e)return[0,t];let r=FF.call(e).slice(8,-1);switch(r){case"Array":return[1,Li];case"Object":return[2,Li];case"Date":return[3,Li];case"RegExp":return[4,Li];case"Map":return[5,Li];case"Set":return[6,Li];case"DataView":return[1,r]}return r.includes("Array")?[1,r]:r.includes("Error")?[7,r]:[2,r]},Ks=([e,t])=>e===0&&(t==="function"||t==="symbol"),NF=(e,t,r,n)=>{let i=(a,s)=>{let u=n.push(a)-1;return r.set(s,u),u},o=a=>{if(r.has(a))return r.get(a);let[s,u]=Fo(a);switch(s){case 0:{let c=a;switch(u){case"bigint":s=8,c=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([-1],a)}return i([s,c],a)}case 1:{if(u){let p=a;return u==="DataView"?p=new Uint8Array(a.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(a)),i([u,[...p]],a)}let c=[],f=i([s,c],a);for(let p of a)c.push(o(p));return f}case 2:{if(u)switch(u){case"BigInt":return i([u,a.toString()],a);case"Boolean":case"Number":case"String":return i([u,a.valueOf()],a)}if(t&&"toJSON"in a)return o(a.toJSON());let c=[],f=i([s,c],a);for(let p of OF(a))(e||!Ks(Fo(a[p])))&&c.push([o(p),o(a[p])]);return f}case 3:return i([s,a.toISOString()],a);case 4:{let{source:c,flags:f}=a;return i([s,{source:c,flags:f}],a)}case 5:{let c=[],f=i([s,c],a);for(let[p,m]of a)(e||!(Ks(Fo(p))||Ks(Fo(m))))&&c.push([o(p),o(m)]);return f}case 6:{let c=[],f=i([s,c],a);for(let p of a)(e||!Ks(Fo(p)))&&c.push(o(p));return f}}let{message:l}=a;return i([s,{name:u,message:l}],a)};return o},Gc=(e,{json:t,lossy:r}={})=>{let n=[];return NF(!(t||r),!!t,new Map,n)(e),n};var Hc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Vc(Gc(e,t)):structuredClone(e):(e,t)=>Vc(Gc(e,t));function dy(e,t){let{ordered:r=!1,tight:n=!1,prefix:i}=t,o={type:"list",ordered:r,spread:!1,children:[]},a=Number.POSITIVE_INFINITY,s=-1;for(;++s<e.length;)e[s].depth<a&&(a=e[s].depth);for(s=-1;++s<e.length;)e[s].depth-=a-1;for(s=-1;++s<e.length;)Oo(e[s],o,{ordered:r,tight:n,prefix:i});return o}function Oo(e,t,r){let n=-1,i=t.children[t.children.length-1];if(t.type==="list")if(e.depth===1)t.children.push({type:"listItem",spread:!1,children:[{type:"paragraph",children:[{type:"link",title:null,url:"#"+(r.prefix||"")+e.id,children:Wc(e.children)}]}]});else if(t.children.length>0){let o=t.children[t.children.length-1];Oo(e,o,r)}else{let o={type:"listItem",spread:!1,children:[]};t.children.push(o),Oo(e,o,r)}else if(i&&i.type==="list")e.depth--,Oo(e,i,r);else{let o={type:"list",ordered:r.ordered,spread:!1,children:[]};t.children.push(o),e.depth--,Oo(e,o,r)}if(t.type==="list"&&!r.tight){for(t.spread=!1;++n<t.children.length;)if(t.children[n].children.length>1){t.spread=!0;break}}else t.spread=!r.tight}function Wc(e){let t=[],r=-1;for(;++r<e.length;){let n=LF(e[r]);Array.isArray(n)?t.push(...n):t.push(n)}return t}function LF(e){if(e.type==="footnoteReference")return[];if(e.type==="link"||e.type==="linkReference")return Wc(e.children);if("children"in e){let{children:n,position:i,...o}=e;return Object.assign(Hc(o),{children:Wc(e.children)})}let{position:t,...r}=e;return Hc(r)}function Kc(e,t){let r=t||{},n=r.heading?Hs(r.heading):void 0,i=uy(e,n,r);return{index:n?i.index:void 0,endIndex:n?i.endIndex:void 0,map:i.map.length>0?dy(i.map,r):void 0}}var Zs={"table-of-contents":{applicationOrder:1,async content(e,t){let r=L.object({depth:L.union([L.literal(1),L.literal(2),L.literal(3),L.literal(4),L.literal(5),L.literal(6)]).optional()}).optional().parse(e),n=Kc(t,{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"},a=Yn().use(_r).stringify(o).replaceAll(`
|
|
174
170
|
|
|
175
171
|
`,`
|
|
176
172
|
`);return[i,a].join(`
|
|
177
|
-
`)},order:6}};import{tldrawToImage as
|
|
178
|
-
<source media="(prefers-color-scheme: dark)" srcset="${
|
|
173
|
+
`)},order:6}};import{tldrawToImage as hy}from"@kitschpatrol/tldraw-cli";import PF from"node:crypto";import Pi from"node:fs/promises";import Ut from"node:path";var Ey={tldraw:{async content(e){let{alt:t="tldraw diagram",src:r}=L.object({alt:L.string().optional(),src:L.string()}).parse(e),{assetsPath:n}=await cn();if(n===void 0)throw new Error("No assets path found");await Pi.mkdir(n,{recursive:!0});let i=await Vn(r)?await xy(r):void 0;if(i!==void 0){let l=Ut.basename(r,Ut.extname(r)),c=Ut.join(n,`${l}-${i}-light.svg`),f=Ut.join(n,`${l}-${i}-dark.svg`);if(await Vn(c)&&await Vn(f))return gy(c,f,t)}let[o]=await hy(r,{dark:!1,format:"svg",output:n,transparent:!0});i??=await xy(o);let a=`${yy(o)}-${i}-light.svg`;await Pi.rename(o,a);let[s]=await hy(r,{dark:!0,format:"svg",output:n,transparent:!0}),u=`${yy(s)}-${i}-dark.svg`;if(await Pi.rename(s,u),i!==void 0){let l=Ut.basename(u),c=Ut.basename(a),f=c.replace(`${i}-light.svg`,""),p=await Pi.readdir(n);for(let m of p){let h=Ut.basename(m);h!==l&&h!==c&&h.startsWith(f)&&h.endsWith(".svg")&&await Pi.rm(Ut.join(n,h))}}return gy(a,u,t)}}};async function gy(e,t,r){let{packageFile:n}=await cn();if(n===void 0)throw new Error("No package file found");let i=Ut.dirname(n),o=Ut.relative(i,e);return`<picture>
|
|
174
|
+
<source media="(prefers-color-scheme: dark)" srcset="${Ut.relative(i,t)}">
|
|
179
175
|
<source media="(prefers-color-scheme: light)" srcset="${o}">
|
|
180
176
|
<img alt="${r}" src="${o}">
|
|
181
|
-
</picture>`}async function
|
|
177
|
+
</picture>`}async function xy(e){let t=await Pi.readFile(e),r=PF.createHash("sha1");return r.update(t),r.digest("hex").slice(0,8)}function yy(e){return e.replace(/\.[^./]+$/,"")}import{getSoleRule as MF}from"remark-mdat";var by={toc:MF(Zs)};var ky={...ka,...Ta,...Wx,...Bs,...Zx,...Us,...zs,...Xx,...Jx,...js,...$s,...ry,...oy,...Zs,...qs,...Ey,...by};async function Rn(e){let t={addMetaComment:!0,rules:ky},{additionalConfig:r=[],...n}=e??{},i=Array.isArray(r)?r:[r],o=await Lt({additionalConfig:[t,...i],...n});if(o.packageFile===void 0)throw new Error("Package file path is required in `mdat readme` config");return o}import Lo from"node:path";import zF from"node:process";import jF from"node:path";import nQ,{promises as Ay}from"node:fs";import{fileURLToPath as $F}from"node:url";var Zc=class{value;next;constructor(t){this.value=t}},No=class{#e;#t;#r;constructor(){this.clear()}enqueue(t){let r=new Zc(t);this.#e?(this.#t.next=r,this.#t=r):(this.#e=r,this.#t=r),this.#r++}dequeue(){let t=this.#e;if(t)return this.#e=this.#e.next,this.#r--,t.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 t=this.#e;for(;t;)yield t.value,t=t.next}*drain(){for(;this.#e;)yield this.dequeue()}};function Ys(e){if(!((Number.isInteger(e)||e===Number.POSITIVE_INFINITY)&&e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");let t=new No,r=0,n=()=>{r--,t.size>0&&t.dequeue()()},i=async(s,u,l)=>{r++;let c=(async()=>s(...l))();u(c);try{await c}catch{}n()},o=(s,u,l)=>{t.enqueue(i.bind(void 0,s,u,l)),(async()=>(await Promise.resolve(),r<e&&t.size>0&&t.dequeue()()))()},a=(s,...u)=>new Promise(l=>{o(s,l,u)});return Object.defineProperties(a,{activeCount:{get:()=>r},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}}}),a}var Xs=class extends Error{constructor(t){super(),this.value=t}},BF=async(e,t)=>t(await e),UF=async e=>{let t=await Promise.all(e);if(t[1]===!0)throw new Xs(t[0]);return!1};async function Yc(e,t,{concurrency:r=Number.POSITIVE_INFINITY,preserveOrder:n=!0}={}){let i=Ys(r),o=[...e].map(s=>[s,i(BF,s,t)]),a=Ys(n?1:Number.POSITIVE_INFINITY);try{await Promise.all(o.map(s=>a(UF,s)))}catch(s){if(s instanceof Xs)return s.value;throw s}}var Ty={directory:"isDirectory",file:"isFile"};function qF(e){if(!Object.hasOwnProperty.call(Ty,e))throw new Error(`Invalid type specified: ${e}`)}var VF=(e,t)=>t[Ty[e]](),GF=e=>e instanceof URL?$F(e):e;async function Xc(e,{cwd:t=zF.cwd(),type:r="file",allowSymlinks:n=!0,concurrency:i,preserveOrder:o}={}){qF(r),t=GF(t);let a=n?Ay.stat:Ay.lstat;return Yc(e,async s=>{try{let u=await a(jF.resolve(t,s));return VF(r,u)}catch{return!1}},{concurrency:i,preserveOrder:o})}import{fileURLToPath as HF}from"node:url";function Jc(e){return e instanceof URL?HF(e):e}var WF=Symbol("findUpStop");async function KF(e,t={}){let r=Lo.resolve(Jc(t.cwd)??""),{root:n}=Lo.parse(r),i=Lo.resolve(r,Jc(t.stopAt??n)),o=t.limit??Number.POSITIVE_INFINITY,a=[e].flat(),s=async l=>{if(typeof e!="function")return Xc(a,l);let c=await e(l.cwd);return typeof c=="string"?Xc([c],l):c},u=[];for(;;){let l=await s({...t,cwd:r});if(l===WF||(l&&u.push(Lo.resolve(r,l)),r===i||u.length>=o))break;r=Lo.dirname(r)}return u}async function Cy(e,t={}){return(await KF(e,{...t,limit:1}))[0]}import ZF from"node:path";async function wy({cwd:e}={}){let t=await Go("package.json",{cwd:e});return t&&ZF.dirname(t)}import{log as Sy}from"remark-mdat";async function YF(){Sy.info("Searching for package directory...");let e=await wy()??process.cwd(),t=await Cy("readme.md",{stopAt:e,type:"file"});if(t!==void 0)return Sy.info(`Found closest readme at "${t}"`),t}async function Js(){let e=await YF();if(e===void 0)throw new Error("No readme found");return e}async function XF(e,t){return _y(void 0,void 0,void 0,e,t)}async function _y(e,t,r,n,i){return e??=await Js(),vr(e,Rn,Jn,t,r,n,i)}async function JF(e,t,r){return bn(e,Rn,Jn,t,r)}async function QF(e,t){return vy(void 0,void 0,void 0,e,t)}async function vy(e,t,r,n,i){return e??=await Js(),vr(e,Rn,Qn,t,r,n,i)}async function e0(e,t,r){return bn(e,Rn,Qn,t,r)}async function t0(e,t){return Iy(void 0,void 0,void 0,e,t)}async function Iy(e,t,r,n,i){return e??=await Js(),vr(e,Rn,eo,t,r,n,i)}export{GT as checkFiles,QF as checkReadme,vy as checkReadmeFiles,e0 as checkReadmeString,HT as checkString,WT as collapseFiles,t0 as collapseReadme,Iy as collapseReadmeFiles,KT as collapseString,qT as expandFiles,XF as expandReadme,_y as expandReadmeFiles,JF as expandReadmeString,VT as expandString,Lt as loadConfig,Rn as loadConfigReadme,bb as mergeConfigs};
|
|
182
178
|
/*! Bundled license information:
|
|
183
179
|
|
|
184
180
|
lodash-es/lodash.js:
|