import{g as Tt,j as Je}from"./react-vendor-BVoutfaX.js";function yr(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const xr=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kr=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,br={};function Un(e,n){return(br.jsx?kr:xr).test(e)}const wr=/[ \t\n\f\r]/g;function Sr(e){return typeof e=="object"?e.type==="text"?Vn(e.value):!1:Vn(e)}function Vn(e){return e.replace(wr,"")===""}class je{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}je.prototype.normal={};je.prototype.property={};je.prototype.space=void 0;function At(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new je(t,r,n)}function hn(e){return e.toLowerCase()}class J{constructor(n,t){this.attribute=t,this.property=n}}J.prototype.attribute="";J.prototype.booleanish=!1;J.prototype.boolean=!1;J.prototype.commaOrSpaceSeparated=!1;J.prototype.commaSeparated=!1;J.prototype.defined=!1;J.prototype.mustUseProperty=!1;J.prototype.number=!1;J.prototype.overloadedBoolean=!1;J.prototype.property="";J.prototype.spaceSeparated=!1;J.prototype.space=void 0;let Cr=0;const D=ke(),W=ke(),mn=ke(),k=ke(),q=ke(),Ie=ke(),ee=ke();function ke(){return 2**++Cr}const dn=Object.freeze(Object.defineProperty({__proto__:null,boolean:D,booleanish:W,commaOrSpaceSeparated:ee,commaSeparated:Ie,number:k,overloadedBoolean:mn,spaceSeparated:q},Symbol.toStringTag,{value:"Module"})),Ze=Object.keys(dn);class Cn extends J{constructor(n,t,r,i){let l=-1;if(super(n,t),qn(this,"space",i),typeof r=="number")for(;++l4&&t.slice(0,4)==="data"&&Pr.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace($n,vr);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!$n.test(l)){let o=l.replace(Ar,Lr);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}i=Cn}return new i(r,n)}function Lr(e){return"-"+e.toLowerCase()}function vr(e){return e.charAt(1).toUpperCase()}const Dr=At([Pt,Er,vt,Dt,Ot],"html"),En=At([Pt,Ir,vt,Dt,Ot],"svg");function Or(e){return e.join(" ").trim()}var Ce={},en,Wn;function _r(){if(Wn)return en;Wn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,u=/^\s+|\s+$/g,c=` `,a="/",s="*",f="",d="comment",p="declaration";function w(I,x){if(typeof I!="string")throw new TypeError("First argument must be a string");if(!I)return[];x=x||{};var L=1,E=1;function B(P){var S=P.match(n);S&&(L+=S.length);var M=P.lastIndexOf(c);E=~M?P.length-M:E+P.length}function H(){var P={line:L,column:E};return function(S){return S.position=new y(P),F(),S}}function y(P){this.start=P,this.end={line:L,column:E},this.source=x.source}y.prototype.content=I;function _(P){var S=new Error(x.source+":"+L+":"+E+": "+P);if(S.reason=P,S.filename=x.source,S.line=L,S.column=E,S.source=I,!x.silent)throw S}function U(P){var S=P.exec(I);if(S){var M=S[0];return B(M),I=I.slice(M.length),S}}function F(){U(t)}function R(P){var S;for(P=P||[];S=A();)S!==!1&&P.push(S);return P}function A(){var P=H();if(!(a!=I.charAt(0)||s!=I.charAt(1))){for(var S=2;f!=I.charAt(S)&&(s!=I.charAt(S)||a!=I.charAt(S+1));)++S;if(S+=2,f===I.charAt(S-1))return _("End of comment missing");var M=I.slice(2,S-2);return E+=2,B(M),I=I.slice(S),E+=2,P({type:d,comment:M})}}function T(){var P=H(),S=U(r);if(S){if(A(),!U(i))return _("property missing ':'");var M=U(l),Y=P({type:p,property:C(S[0].replace(e,f)),value:M?C(M[0].replace(e,f)):f});return U(o),Y}}function V(){var P=[];R(P);for(var S;S=T();)S!==!1&&(P.push(S),R(P));return P}return F(),V()}function C(I){return I?I.replace(u,f):f}return en=w,en}var Yn;function Nr(){if(Yn)return Ce;Yn=1;var e=Ce&&Ce.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.default=t;const n=e(_r());function t(r,i){let l=null;if(!r||typeof r!="string")return l;const o=(0,n.default)(r),u=typeof i=="function";return o.forEach(c=>{if(c.type!=="declaration")return;const{property:a,value:s}=c;u?i(a,s,c):s&&(l=l||{},l[a]=s)}),l}return Ce}var De={},Xn;function Fr(){if(Xn)return De;Xn=1,Object.defineProperty(De,"__esModule",{value:!0}),De.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,l=function(a){return!a||t.test(a)||e.test(a)},o=function(a,s){return s.toUpperCase()},u=function(a,s){return"".concat(s,"-")},c=function(a,s){return s===void 0&&(s={}),l(a)?a:(a=a.toLowerCase(),s.reactCompat?a=a.replace(i,u):a=a.replace(r,u),a.replace(n,o))};return De.camelCase=c,De}var Oe,Qn;function Rr(){if(Qn)return Oe;Qn=1;var e=Oe&&Oe.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e(Nr()),t=Fr();function r(i,l){var o={};return!i||typeof i!="string"||(0,n.default)(i,function(u,c){u&&c&&(o[(0,t.camelCase)(u,l)]=c)}),o}return r.default=r,Oe=r,Oe}var Mr=Rr();const Br=Tt(Mr),_t=Nt("end"),In=Nt("start");function Nt(e){return n;function n(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function jr(e){const n=In(e),t=_t(e);if(n&&t)return{start:n,end:t}}function Fe(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Kn(e.position):"start"in e||"end"in e?Kn(e):"line"in e||"column"in e?gn(e):""}function gn(e){return Gn(e&&e.line)+":"+Gn(e&&e.column)}function Kn(e){return gn(e&&e.start)+"-"+gn(e&&e.end)}function Gn(e){return e&&typeof e=="number"?e:1}class Q extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",l={},o=!1;if(t&&("line"in t&&"column"in t?l={place:t}:"start"in t&&"end"in t?l={place:t}:"type"in t?l={ancestors:[t],place:t.position}:l={...t}),typeof n=="string"?i=n:!l.cause&&n&&(o=!0,i=n.message,l.cause=n),!l.ruleId&&!l.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?l.ruleId=r:(l.source=r.slice(0,c),l.ruleId=r.slice(c+1))}if(!l.place&&l.ancestors&&l.ancestors){const c=l.ancestors[l.ancestors.length-1];c&&(l.place=c.position)}const u=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=Fe(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Q.prototype.file="";Q.prototype.name="";Q.prototype.reason="";Q.prototype.message="";Q.prototype.stack="";Q.prototype.column=void 0;Q.prototype.line=void 0;Q.prototype.ancestors=void 0;Q.prototype.cause=void 0;Q.prototype.fatal=void 0;Q.prototype.place=void 0;Q.prototype.ruleId=void 0;Q.prototype.source=void 0;const Tn={}.hasOwnProperty,Hr=new Map,Ur=/[A-Z]/g,Vr=new Set(["table","tbody","thead","tfoot","tr"]),qr=new Set(["td","th"]),Ft="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function $r(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Zr(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Jr(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?En:Dr,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},l=Rt(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function Rt(e,n,t){if(n.type==="element")return Wr(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Yr(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Qr(e,n,t);if(n.type==="mdxjsEsm")return Xr(e,n);if(n.type==="root")return Kr(e,n,t);if(n.type==="text")return Gr(e,n)}function Wr(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=En,e.schema=i),e.ancestors.push(n);const l=Bt(e,n.tagName,!1),o=ei(e,n);let u=Pn(e,n);return Vr.has(n.tagName)&&(u=u.filter(function(c){return typeof c=="string"?!Sr(c):!0})),Mt(e,o,l,n),An(o,u),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function Yr(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Be(e,n.position)}function Xr(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Be(e,n.position)}function Qr(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=En,e.schema=i),e.ancestors.push(n);const l=n.name===null?e.Fragment:Bt(e,n.name,!0),o=ni(e,n),u=Pn(e,n);return Mt(e,o,l,n),An(o,u),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function Kr(e,n,t){const r={};return An(r,Pn(e,n)),e.create(n,e.Fragment,r,t)}function Gr(e,n){return n.value}function Mt(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function An(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Jr(e,n,t){return r;function r(i,l,o,u){const a=Array.isArray(o.children)?t:n;return u?a(l,o,u):a(l,o)}}function Zr(e,n){return t;function t(r,i,l,o){const u=Array.isArray(l.children),c=In(r);return n(i,l,o,u,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function ei(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&Tn.call(n.properties,i)){const l=ti(e,i,n.properties[i]);if(l){const[o,u]=l;e.tableCellAlignToStyle&&o==="align"&&typeof u=="string"&&qr.has(n.tagName)?r=u:t[o]=u}}if(r){const l=t.style||(t.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function ni(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const u=o.properties[0];u.type,Object.assign(t,e.evaluater.evaluateExpression(u.argument))}else Be(e,n.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,l=e.evaluater.evaluateExpression(u.expression)}else Be(e,n.position);else l=r.value===null?!0:r.value;t[i]=l}return t}function Pn(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:Hr;for(;++ri?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);l0?(se(e,e.length,0,n),e):n}const et={}.hasOwnProperty;function ci(e){const n={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Te(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ae=ge(/[A-Za-z]/),ne=ge(/[\dA-Za-z]/),hi=ge(/[#-'*+\--9=?A-Z^-~]/);function yn(e){return e!==null&&(e<32||e===127)}const xn=ge(/\d/),mi=ge(/[\dA-Fa-f]/),di=ge(/[!-/:-@[-`{-~]/);function z(e){return e!==null&&e<-2}function G(e){return e!==null&&(e<0||e===32)}function N(e){return e===-2||e===-1||e===32}const gi=ge(new RegExp("\\p{P}|\\p{S}","u")),yi=ge(/\s/);function ge(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Pe(e){const n=[];let t=-1,r=0,i=0;for(;++t55295&&l<57344){const u=e.charCodeAt(t+1);l<56320&&u>56319&&u<57344?(o=String.fromCharCode(l,u),i=1):o="�"}else o=String.fromCharCode(l);o&&(n.push(e.slice(r,t),encodeURIComponent(o)),r=t+i+1,o=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function $(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(c){return N(c)?(e.enter(t),u(c)):n(c)}function u(c){return N(c)&&l++o))return;const _=n.events.length;let U=_,F,R;for(;U--;)if(n.events[U][0]==="exit"&&n.events[U][1].type==="chunkFlow"){if(F){R=n.events[U][1].end;break}F=!0}for(x(r),y=_;yE;){const H=t[B];n.containerState=H[1],H[0].exit.call(n,e)}t.length=E}function L(){i.write([null]),l=void 0,i=void 0,n.containerState._closeFlow=void 0}}function Si(e,n,t){return $(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function tt(e){if(e===null||G(e)||yi(e))return 1;if(gi(e))return 2}function Ln(e,n,t){const r=[];let i=-1;for(;++i1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const f={...e[r][1].end},d={...e[t][1].start};rt(f,-c),rt(d,c),o={type:c>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},u={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:d},l={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:c>1?"strong":"emphasis",start:{...o.start},end:{...u.end}},e[r][1].end={...o.start},e[t][1].start={...u.end},a=[],e[r][1].end.offset-e[r][1].start.offset&&(a=te(a,[["enter",e[r][1],n],["exit",e[r][1],n]])),a=te(a,[["enter",i,n],["enter",o,n],["exit",o,n],["enter",l,n]]),a=te(a,Ln(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),a=te(a,[["exit",l,n],["enter",u,n],["exit",u,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(s=2,a=te(a,[["enter",e[t][1],n],["exit",e[t][1],n]])):s=0,se(e,r-1,t-r+3,a),t=r+a.length-s-2;break}}for(t=-1;++t0&&N(y)?$(e,L,"linePrefix",l+1)(y):L(y)}function L(y){return y===null||z(y)?e.check(it,C,B)(y):(e.enter("codeFlowValue"),E(y))}function E(y){return y===null||z(y)?(e.exit("codeFlowValue"),L(y)):(e.consume(y),E)}function B(y){return e.exit("codeFenced"),n(y)}function H(y,_,U){let F=0;return R;function R(S){return y.enter("lineEnding"),y.consume(S),y.exit("lineEnding"),A}function A(S){return y.enter("codeFencedFence"),N(S)?$(y,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):T(S)}function T(S){return S===u?(y.enter("codeFencedFenceSequence"),V(S)):U(S)}function V(S){return S===u?(F++,y.consume(S),V):F>=o?(y.exit("codeFencedFenceSequence"),N(S)?$(y,P,"whitespace")(S):P(S)):U(S)}function P(S){return S===null||z(S)?(y.exit("codeFencedFence"),_(S)):U(S)}}}function _i(e,n,t){const r=this;return i;function i(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}const tn={name:"codeIndented",tokenize:Fi},Ni={partial:!0,tokenize:Ri};function Fi(e,n,t){const r=this;return i;function i(a){return e.enter("codeIndented"),$(e,l,"linePrefix",5)(a)}function l(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?o(a):t(a)}function o(a){return a===null?c(a):z(a)?e.attempt(Ni,o,c)(a):(e.enter("codeFlowValue"),u(a))}function u(a){return a===null||z(a)?(e.exit("codeFlowValue"),o(a)):(e.consume(a),u)}function c(a){return e.exit("codeIndented"),n(a)}}function Ri(e,n,t){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?t(o):z(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):$(e,l,"linePrefix",5)(o)}function l(o){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?n(o):z(o)?i(o):t(o)}}const Mi={name:"codeText",previous:ji,resolve:Bi,tokenize:Hi};function Bi(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return nthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&_e(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),_e(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),_e(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n=4?n(o):e.interrupt(r.parser.constructs.flow,t,n)(o)}}function Wt(e,n,t,r,i,l,o,u,c){const a=c||Number.POSITIVE_INFINITY;let s=0;return f;function f(x){return x===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(x),e.exit(l),d):x===null||x===32||x===41||yn(x)?t(x):(e.enter(r),e.enter(o),e.enter(u),e.enter("chunkString",{contentType:"string"}),C(x))}function d(x){return x===62?(e.enter(l),e.consume(x),e.exit(l),e.exit(i),e.exit(r),n):(e.enter(u),e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===62?(e.exit("chunkString"),e.exit(u),d(x)):x===null||x===60||z(x)?t(x):(e.consume(x),x===92?w:p)}function w(x){return x===60||x===62||x===92?(e.consume(x),p):p(x)}function C(x){return!s&&(x===null||x===41||G(x))?(e.exit("chunkString"),e.exit(u),e.exit(o),e.exit(r),n(x)):s999||p===null||p===91||p===93&&!c||p===94&&!u&&"_hiddenFootnoteSupport"in o.parser.constructs?t(p):p===93?(e.exit(l),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):z(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),s):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||z(p)||u++>999?(e.exit("chunkString"),s(p)):(e.consume(p),c||(c=!N(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),u++,f):f(p)}}function Xt(e,n,t,r,i,l){let o;return u;function u(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),o=d===40?41:d,c):t(d)}function c(d){return d===o?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),n):(e.enter(l),a(d))}function a(d){return d===o?(e.exit(l),c(o)):d===null?t(d):z(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),$(e,a,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),s(d))}function s(d){return d===o||d===null||z(d)?(e.exit("chunkString"),a(d)):(e.consume(d),d===92?f:s)}function f(d){return d===o||d===92?(e.consume(d),s):s(d)}}function Re(e,n){let t;return r;function r(i){return z(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):N(i)?$(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const Qi={name:"definition",tokenize:Gi},Ki={partial:!0,tokenize:Ji};function Gi(e,n,t){const r=this;let i;return l;function l(p){return e.enter("definition"),o(p)}function o(p){return Yt.call(r,e,u,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function u(p){return i=Te(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),c):t(p)}function c(p){return G(p)?Re(e,a)(p):a(p)}function a(p){return Wt(e,s,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function s(p){return e.attempt(Ki,f,f)(p)}function f(p){return N(p)?$(e,d,"whitespace")(p):d(p)}function d(p){return p===null||z(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function Ji(e,n,t){return r;function r(u){return G(u)?Re(e,i)(u):t(u)}function i(u){return Xt(e,l,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function l(u){return N(u)?$(e,o,"whitespace")(u):o(u)}function o(u){return u===null||z(u)?n(u):t(u)}}const Zi={name:"hardBreakEscape",tokenize:el};function el(e,n,t){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return z(l)?(e.exit("hardBreakEscape"),n(l)):t(l)}}const nl={name:"headingAtx",resolve:tl,tokenize:rl};function tl(e,n){let t=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},l={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},se(e,r,t-r+1,[["enter",i,n],["enter",l,n],["exit",l,n],["exit",i,n]])),e}function rl(e,n,t){let r=0;return i;function i(s){return e.enter("atxHeading"),l(s)}function l(s){return e.enter("atxHeadingSequence"),o(s)}function o(s){return s===35&&r++<6?(e.consume(s),o):s===null||G(s)?(e.exit("atxHeadingSequence"),u(s)):t(s)}function u(s){return s===35?(e.enter("atxHeadingSequence"),c(s)):s===null||z(s)?(e.exit("atxHeading"),n(s)):N(s)?$(e,u,"whitespace")(s):(e.enter("atxHeadingText"),a(s))}function c(s){return s===35?(e.consume(s),c):(e.exit("atxHeadingSequence"),u(s))}function a(s){return s===null||s===35||G(s)?(e.exit("atxHeadingText"),u(s)):(e.consume(s),a)}}const il=["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"],ot=["pre","script","style","textarea"],ll={concrete:!0,name:"htmlFlow",resolveTo:al,tokenize:sl},ol={partial:!0,tokenize:pl},ul={partial:!0,tokenize:cl};function al(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function sl(e,n,t){const r=this;let i,l,o,u,c;return a;function a(m){return s(m)}function s(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),f}function f(m){return m===33?(e.consume(m),d):m===47?(e.consume(m),l=!0,C):m===63?(e.consume(m),i=3,r.interrupt?n:h):ae(m)?(e.consume(m),o=String.fromCharCode(m),I):t(m)}function d(m){return m===45?(e.consume(m),i=2,p):m===91?(e.consume(m),i=5,u=0,w):ae(m)?(e.consume(m),i=4,r.interrupt?n:h):t(m)}function p(m){return m===45?(e.consume(m),r.interrupt?n:h):t(m)}function w(m){const le="CDATA[";return m===le.charCodeAt(u++)?(e.consume(m),u===le.length?r.interrupt?n:T:w):t(m)}function C(m){return ae(m)?(e.consume(m),o=String.fromCharCode(m),I):t(m)}function I(m){if(m===null||m===47||m===62||G(m)){const le=m===47,ye=o.toLowerCase();return!le&&!l&&ot.includes(ye)?(i=1,r.interrupt?n(m):T(m)):il.includes(o.toLowerCase())?(i=6,le?(e.consume(m),x):r.interrupt?n(m):T(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(m):l?L(m):E(m))}return m===45||ne(m)?(e.consume(m),o+=String.fromCharCode(m),I):t(m)}function x(m){return m===62?(e.consume(m),r.interrupt?n:T):t(m)}function L(m){return N(m)?(e.consume(m),L):R(m)}function E(m){return m===47?(e.consume(m),R):m===58||m===95||ae(m)?(e.consume(m),B):N(m)?(e.consume(m),E):R(m)}function B(m){return m===45||m===46||m===58||m===95||ne(m)?(e.consume(m),B):H(m)}function H(m){return m===61?(e.consume(m),y):N(m)?(e.consume(m),H):E(m)}function y(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),c=m,_):N(m)?(e.consume(m),y):U(m)}function _(m){return m===c?(e.consume(m),c=null,F):m===null||z(m)?t(m):(e.consume(m),_)}function U(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||G(m)?H(m):(e.consume(m),U)}function F(m){return m===47||m===62||N(m)?E(m):t(m)}function R(m){return m===62?(e.consume(m),A):t(m)}function A(m){return m===null||z(m)?T(m):N(m)?(e.consume(m),A):t(m)}function T(m){return m===45&&i===2?(e.consume(m),M):m===60&&i===1?(e.consume(m),Y):m===62&&i===4?(e.consume(m),ie):m===63&&i===3?(e.consume(m),h):m===93&&i===5?(e.consume(m),ce):z(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(ol,pe,V)(m)):m===null||z(m)?(e.exit("htmlFlowData"),V(m)):(e.consume(m),T)}function V(m){return e.check(ul,P,pe)(m)}function P(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),S}function S(m){return m===null||z(m)?V(m):(e.enter("htmlFlowData"),T(m))}function M(m){return m===45?(e.consume(m),h):T(m)}function Y(m){return m===47?(e.consume(m),o="",re):T(m)}function re(m){if(m===62){const le=o.toLowerCase();return ot.includes(le)?(e.consume(m),ie):T(m)}return ae(m)&&o.length<8?(e.consume(m),o+=String.fromCharCode(m),re):T(m)}function ce(m){return m===93?(e.consume(m),h):T(m)}function h(m){return m===62?(e.consume(m),ie):m===45&&i===2?(e.consume(m),h):T(m)}function ie(m){return m===null||z(m)?(e.exit("htmlFlowData"),pe(m)):(e.consume(m),ie)}function pe(m){return e.exit("htmlFlow"),n(m)}}function cl(e,n,t){const r=this;return i;function i(o){return z(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):t(o)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}function pl(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Qe,n,t)}}const fl={name:"htmlText",tokenize:hl};function hl(e,n,t){const r=this;let i,l,o;return u;function u(h){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(h),c}function c(h){return h===33?(e.consume(h),a):h===47?(e.consume(h),H):h===63?(e.consume(h),E):ae(h)?(e.consume(h),U):t(h)}function a(h){return h===45?(e.consume(h),s):h===91?(e.consume(h),l=0,w):ae(h)?(e.consume(h),L):t(h)}function s(h){return h===45?(e.consume(h),p):t(h)}function f(h){return h===null?t(h):h===45?(e.consume(h),d):z(h)?(o=f,Y(h)):(e.consume(h),f)}function d(h){return h===45?(e.consume(h),p):f(h)}function p(h){return h===62?M(h):h===45?d(h):f(h)}function w(h){const ie="CDATA[";return h===ie.charCodeAt(l++)?(e.consume(h),l===ie.length?C:w):t(h)}function C(h){return h===null?t(h):h===93?(e.consume(h),I):z(h)?(o=C,Y(h)):(e.consume(h),C)}function I(h){return h===93?(e.consume(h),x):C(h)}function x(h){return h===62?M(h):h===93?(e.consume(h),x):C(h)}function L(h){return h===null||h===62?M(h):z(h)?(o=L,Y(h)):(e.consume(h),L)}function E(h){return h===null?t(h):h===63?(e.consume(h),B):z(h)?(o=E,Y(h)):(e.consume(h),E)}function B(h){return h===62?M(h):E(h)}function H(h){return ae(h)?(e.consume(h),y):t(h)}function y(h){return h===45||ne(h)?(e.consume(h),y):_(h)}function _(h){return z(h)?(o=_,Y(h)):N(h)?(e.consume(h),_):M(h)}function U(h){return h===45||ne(h)?(e.consume(h),U):h===47||h===62||G(h)?F(h):t(h)}function F(h){return h===47?(e.consume(h),M):h===58||h===95||ae(h)?(e.consume(h),R):z(h)?(o=F,Y(h)):N(h)?(e.consume(h),F):M(h)}function R(h){return h===45||h===46||h===58||h===95||ne(h)?(e.consume(h),R):A(h)}function A(h){return h===61?(e.consume(h),T):z(h)?(o=A,Y(h)):N(h)?(e.consume(h),A):F(h)}function T(h){return h===null||h===60||h===61||h===62||h===96?t(h):h===34||h===39?(e.consume(h),i=h,V):z(h)?(o=T,Y(h)):N(h)?(e.consume(h),T):(e.consume(h),P)}function V(h){return h===i?(e.consume(h),i=void 0,S):h===null?t(h):z(h)?(o=V,Y(h)):(e.consume(h),V)}function P(h){return h===null||h===34||h===39||h===60||h===61||h===96?t(h):h===47||h===62||G(h)?F(h):(e.consume(h),P)}function S(h){return h===47||h===62||G(h)?F(h):t(h)}function M(h){return h===62?(e.consume(h),e.exit("htmlTextData"),e.exit("htmlText"),n):t(h)}function Y(h){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),re}function re(h){return N(h)?$(e,ce,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h):ce(h)}function ce(h){return e.enter("htmlTextData"),o(h)}}const vn={name:"labelEnd",resolveAll:yl,resolveTo:xl,tokenize:kl},ml={tokenize:bl},dl={tokenize:wl},gl={tokenize:Sl};function yl(e){let n=-1;const t=[];for(;++n=3&&(a===null||z(a))?(e.exit("thematicBreak"),n(a)):t(a)}function c(a){return a===i?(e.consume(a),r++,c):(e.exit("thematicBreakSequence"),N(a)?$(e,u,"whitespace")(a):u(a))}}const K={continuation:{tokenize:Dl},exit:_l,name:"list",tokenize:vl},zl={partial:!0,tokenize:Nl},Ll={partial:!0,tokenize:Ol};function vl(e,n,t){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return u;function u(p){const w=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:xn(p)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(We,t,a)(p):a(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(p)}return t(p)}function c(p){return xn(p)&&++o<10?(e.consume(p),c):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),a(p)):t(p)}function a(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Qe,r.interrupt?t:s,e.attempt(zl,d,f))}function s(p){return r.containerState.initialBlankLine=!0,l++,d(p)}function f(p){return N(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):t(p)}function d(p){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function Dl(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Qe,i,l);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,$(e,n,"listItemIndent",r.containerState.size+1)(u)}function l(u){return r.containerState.furtherBlankLines||!N(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Ll,n,o)(u))}function o(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,$(e,e.attempt(K,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function Ol(e,n,t){const r=this;return $(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?n(l):t(l)}}function _l(e){e.exit(this.containerState.type)}function Nl(e,n,t){const r=this;return $(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!N(l)&&o&&o[1].type==="listItemPrefixWhitespace"?n(l):t(l)}}const ut={name:"setextUnderline",resolveTo:Fl,tokenize:Rl};function Fl(e,n){let t=e.length,r,i,l;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!l&&e[t][1].type==="definition"&&(l=t);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,n]),e.splice(l+1,0,["exit",e[r][1],n]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,n]),e}function Rl(e,n,t){const r=this;let i;return l;function l(a){let s=r.events.length,f;for(;s--;)if(r.events[s][1].type!=="lineEnding"&&r.events[s][1].type!=="linePrefix"&&r.events[s][1].type!=="content"){f=r.events[s][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=a,o(a)):t(a)}function o(a){return e.enter("setextHeadingLineSequence"),u(a)}function u(a){return a===i?(e.consume(a),u):(e.exit("setextHeadingLineSequence"),N(a)?$(e,c,"lineSuffix")(a):c(a))}function c(a){return a===null||z(a)?(e.exit("setextHeadingLine"),n(a)):t(a)}}const Ml={tokenize:Bl};function Bl(e){const n=this,t=e.attempt(Qe,r,e.attempt(this.parser.constructs.flowInitial,i,$(e,e.attempt(this.parser.constructs.flow,i,e.attempt(qi,i)),"linePrefix")));return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const jl={resolveAll:Kt()},Hl=Qt("string"),Ul=Qt("text");function Qt(e){return{resolveAll:Kt(e==="text"?Vl:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],l=t.attempt(i,o,u);return o;function o(s){return a(s)?l(s):u(s)}function u(s){if(s===null){t.consume(s);return}return t.enter("data"),t.consume(s),c}function c(s){return a(s)?(t.exit("data"),l(s)):(t.consume(s),c)}function a(s){if(s===null)return!0;const f=i[s];let d=-1;if(f)for(;++d-1){const u=o[0];typeof u=="string"?o[0]=u.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function to(e,n){let t=-1;const r=[];let i;for(;++t0){const oe=v.tokenStack[v.tokenStack.length-1];(oe[1]||st).call(v,void 0,oe[0])}for(b.position={start:de(g.length>0?g[0][1].start:{line:1,column:1,offset:0}),end:de(g.length>0?g[g.length-2][1].end:{line:1,column:1,offset:0})},j=-1;++j0&&(r.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(l.data={meta:n.meta}),e.patch(n,l),l=e.applyData(n,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(n,l),l}function yo(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function xo(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ko(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),i=Pe(r.toLowerCase()),l=e.footnoteOrder.indexOf(r);let o,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=l+1,u+=1,e.footnoteCounts.set(r,u);const c={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+i,id:t+"fnref-"+i+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,c);const a={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(n,a),e.applyData(n,a)}function bo(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function wo(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function Zt(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const i=e.all(n),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function So(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Zt(e,n);const i={src:Pe(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,l),e.applyData(n,l)}function Co(e,n){const t={src:Pe(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function Eo(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function Io(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Zt(e,n);const i={href:Pe(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function To(e,n){const t={href:Pe(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Ao(e,n,t){const r=e.all(n),i=t?Po(t):er(n),l={},o=[];if(typeof n.checked=="boolean"){const s=r[0];let f;s&&s.type==="element"&&s.tagName==="p"?f=s:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let u=-1;for(;++u1}function zo(e,n){const t={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++i0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},u=In(n.children[1]),c=_t(n.children[n.children.length-1]);u&&c&&(o.position={start:u,end:c}),i.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,l),e.applyData(n,l)}function _o(e,n,t){const r=t?t.children:void 0,l=(r?r.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,u=o?o.length:n.children.length;let c=-1;const a=[];for(;++c0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return l.push(ft(n.slice(i),i>0,!1)),l.join("")}function ft(e,n,t){let r=0,i=e.length;if(n){let l=e.codePointAt(r);for(;l===ct||l===pt;)r++,l=e.codePointAt(r)}if(t){let l=e.codePointAt(i-1);for(;l===ct||l===pt;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Ro(e,n){const t={type:"text",value:Fo(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function Mo(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const Bo={blockquote:ho,break:mo,code:go,delete:yo,emphasis:xo,footnoteReference:ko,heading:bo,html:wo,imageReference:So,image:Co,inlineCode:Eo,linkReference:Io,link:To,listItem:Ao,list:zo,paragraph:Lo,root:vo,strong:Do,table:Oo,tableCell:No,tableRow:_o,text:Ro,thematicBreak:Mo,toml:Ve,yaml:Ve,definition:Ve,footnoteDefinition:Ve};function Ve(){}const nr=-1,Ke=0,Me=1,Ye=2,Dn=3,On=4,_n=5,Nn=6,tr=7,rr=8,ht=typeof self=="object"?self:globalThis,jo=(e,n)=>{const t=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,o]=n[i];switch(l){case Ke:case nr:return t(o,i);case Me:{const u=t([],i);for(const c of o)u.push(r(c));return u}case Ye:{const u=t({},i);for(const[c,a]of o)u[r(c)]=r(a);return u}case Dn:return t(new Date(o),i);case On:{const{source:u,flags:c}=o;return t(new RegExp(u,c),i)}case _n:{const u=t(new Map,i);for(const[c,a]of o)u.set(r(c),r(a));return u}case Nn:{const u=t(new Set,i);for(const c of o)u.add(r(c));return u}case tr:{const{name:u,message:c}=o;return t(new ht[u](c),i)}case rr:return t(BigInt(o),i);case"BigInt":return t(Object(BigInt(o)),i);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:u}=new Uint8Array(o);return t(new DataView(u),o)}}return t(new ht[l](o),i)};return r},mt=e=>jo(new Map,e)(0),Ee="",{toString:Ho}={},{keys:Uo}=Object,Ne=e=>{const n=typeof e;if(n!=="object"||!e)return[Ke,n];const t=Ho.call(e).slice(8,-1);switch(t){case"Array":return[Me,Ee];case"Object":return[Ye,Ee];case"Date":return[Dn,Ee];case"RegExp":return[On,Ee];case"Map":return[_n,Ee];case"Set":return[Nn,Ee];case"DataView":return[Me,t]}return t.includes("Array")?[Me,t]:t.includes("Error")?[tr,t]:[Ye,t]},qe=([e,n])=>e===Ke&&(n==="function"||n==="symbol"),Vo=(e,n,t,r)=>{const i=(o,u)=>{const c=r.push(o)-1;return t.set(u,c),c},l=o=>{if(t.has(o))return t.get(o);let[u,c]=Ne(o);switch(u){case Ke:{let s=o;switch(c){case"bigint":u=rr,s=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);s=null;break;case"undefined":return i([nr],o)}return i([u,s],o)}case Me:{if(c){let d=o;return c==="DataView"?d=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(d=new Uint8Array(o)),i([c,[...d]],o)}const s=[],f=i([u,s],o);for(const d of o)s.push(l(d));return f}case Ye:{if(c)switch(c){case"BigInt":return i([c,o.toString()],o);case"Boolean":case"Number":case"String":return i([c,o.valueOf()],o)}if(n&&"toJSON"in o)return l(o.toJSON());const s=[],f=i([u,s],o);for(const d of Uo(o))(e||!qe(Ne(o[d])))&&s.push([l(d),l(o[d])]);return f}case Dn:return i([u,o.toISOString()],o);case On:{const{source:s,flags:f}=o;return i([u,{source:s,flags:f}],o)}case _n:{const s=[],f=i([u,s],o);for(const[d,p]of o)(e||!(qe(Ne(d))||qe(Ne(p))))&&s.push([l(d),l(p)]);return f}case Nn:{const s=[],f=i([u,s],o);for(const d of o)(e||!qe(Ne(d)))&&s.push(l(d));return f}}const{message:a}=o;return i([u,{name:c,message:a}],o)};return l},dt=(e,{json:n,lossy:t}={})=>{const r=[];return Vo(!(n||t),!!n,new Map,r)(e),r},Xe=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?mt(dt(e,n)):structuredClone(e):(e,n)=>mt(dt(e,n));function qo(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function $o(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function Wo(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||qo,r=e.options.footnoteBackLabel||$o,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let c=-1;for(;++c0&&w.push({type:"text",value:" "});let L=typeof t=="string"?t:t(c,p);typeof L=="string"&&(L={type:"text",value:L}),w.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+d+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,p),className:["data-footnote-backref"]},children:Array.isArray(L)?L:[L]})}const I=s[s.length-1];if(I&&I.type==="element"&&I.tagName==="p"){const L=I.children[I.children.length-1];L&&L.type==="text"?L.value+=" ":I.children.push({type:"text",value:" "}),I.children.push(...w)}else s.push(...w);const x={type:"element",tagName:"li",properties:{id:n+"fn-"+d},children:e.wrap(s,!0)};e.patch(a,x),u.push(x)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Xe(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:` `}]}}const ir=(function(e){if(e==null)return Ko;if(typeof e=="function")return Ge(e);if(typeof e=="object")return Array.isArray(e)?Yo(e):Xo(e);if(typeof e=="string")return Qo(e);throw new Error("Expected function, string, or object as test")});function Yo(e){const n=[];let t=-1;for(;++t":""))+")"})}return d;function d(){let p=lr,w,C,I;if((!n||l(c,a,s[s.length-1]||void 0))&&(p=nu(t(c,s)),p[0]===gt))return p;if("children"in c&&c.children){const x=c;if(x.children&&p[0]!==Zo)for(C=(r?x.children.length:-1)+o,I=s.concat(x);C>-1&&C0&&t.push({type:"text",value:` `}),t}function yt(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function xt(e,n){const t=ru(e,n),r=t.one(e,void 0),i=Wo(t),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&l.children.push({type:"text",value:` `},i),l}function au(e,n){return e&&"run"in e?async function(t,r){const i=xt(t,{file:r,...n});await e.run(i,r)}:function(t,r){return xt(t,{file:r,...e||n})}}function kt(e){if(e)throw e}var ln,bt;function su(){if(bt)return ln;bt=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(a){return typeof Array.isArray=="function"?Array.isArray(a):n.call(a)==="[object Array]"},l=function(a){if(!a||n.call(a)!=="[object Object]")return!1;var s=e.call(a,"constructor"),f=a.constructor&&a.constructor.prototype&&e.call(a.constructor.prototype,"isPrototypeOf");if(a.constructor&&!s&&!f)return!1;var d;for(d in a);return typeof d>"u"||e.call(a,d)},o=function(a,s){t&&s.name==="__proto__"?t(a,s.name,{enumerable:!0,configurable:!0,value:s.newValue,writable:!0}):a[s.name]=s.newValue},u=function(a,s){if(s==="__proto__")if(e.call(a,s)){if(r)return r(a,s).value}else return;return a[s]};return ln=function c(){var a,s,f,d,p,w,C=arguments[0],I=1,x=arguments.length,L=!1;for(typeof C=="boolean"&&(L=C,C=arguments[1]||{},I=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});Io.length;let c;u&&o.push(i);try{c=e.apply(this,o)}catch(a){const s=a;if(u&&t)throw s;return i(s)}u||(c&&c.then&&typeof c.then=="function"?c.then(l,i):c instanceof Error?i(c):l(c))}function i(o,...u){t||(t=!0,n(o,...u))}function l(o){i(null,o)}}const ue={basename:hu,dirname:mu,extname:du,join:gu,sep:"/"};function hu(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');He(e);let t=0,r=-1,i=e.length,l;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let o=-1,u=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else o<0&&(l=!0,o=i+1),u>-1&&(e.codePointAt(i)===n.codePointAt(u--)?u<0&&(r=i):(u=-1,r=o));return t===r?r=o:r<0&&(r=e.length),e.slice(t,r)}function mu(e){if(He(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function du(e){He(e);let n=e.length,t=-1,r=0,i=-1,l=0,o;for(;n--;){const u=e.codePointAt(n);if(u===47){if(o){r=n+1;break}continue}t<0&&(o=!0,t=n+1),u===46?i<0?i=n:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||t<0||l===0||l===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function gu(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function xu(e,n){let t="",r=0,i=-1,l=0,o=-1,u,c;for(;++o<=e.length;){if(o2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",r=0):(t=t.slice(0,c),r=t.length-1-t.lastIndexOf("/")),i=o,l=0;continue}}else if(t.length>0){t="",r=0,i=o,l=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,o):t=e.slice(i+1,o),r=o-i-1;i=o,l=0}else u===46&&l>-1?l++:l=-1}return t}function He(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const ku={cwd:bu};function bu(){return"/"}function Sn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function wu(e){if(typeof e=="string")e=new URL(e);else if(!Sn(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return Su(e)}function Su(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t0){let[p,...w]=s;const C=r[d][1];wn(C)&&wn(p)&&(p=on(!0,C,p)),r[d]=[a,p,...w]}}}}const Tu=new Fn().freeze();function cn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function pn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function fn(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function St(e){if(!wn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ct(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function $e(e){return Au(e)?e:new ur(e)}function Au(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Pu(e){return typeof e=="string"||zu(e)}function zu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Lu="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Et=[],It={allowDangerousHtml:!0},vu=/^(https?|ircs?|mailto|xmpp)$/i,Du=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Mu(e){const n=Ou(e),t=_u(e);return Nu(n.runSync(n.parse(t),t),e)}function Ou(e){const n=e.rehypePlugins||Et,t=e.remarkPlugins||Et,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...It}:It;return Tu().use(fo).use(t).use(au,r).use(n)}function _u(e){const n=e.children||"",t=new ur;return typeof n=="string"&&(t.value=n),t}function Nu(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,l=n.disallowedElements,o=n.skipHtml,u=n.unwrapDisallowed,c=n.urlTransform||Fu;for(const s of Du)Object.hasOwn(n,s.from)&&(""+s.from+(s.to?"use `"+s.to+"` instead":"remove it")+Lu+s.id,void 0);return or(e,a),$r(e,{Fragment:Je.Fragment,components:i,ignoreInvalidStyle:!0,jsx:Je.jsx,jsxs:Je.jsxs,passKeys:!0,passNode:!0});function a(s,f,d){if(s.type==="raw"&&d&&typeof f=="number")return o?d.children.splice(f,1):d.children[f]={type:"text",value:s.value},f;if(s.type==="element"){let p;for(p in nn)if(Object.hasOwn(nn,p)&&Object.hasOwn(s.properties,p)){const w=s.properties[p],C=nn[p];(C===null||C.includes(s.tagName))&&(s.properties[p]=c(String(w||""),p,s))}}if(s.type==="element"){let p=t?!t.includes(s.tagName):l?l.includes(s.tagName):!1;if(!p&&r&&typeof f=="number"&&(p=!r(s,f,d)),p&&d&&typeof f=="number")return u&&s.children?d.children.splice(f,1,...s.children):d.children.splice(f,1),f}}}function Fu(e){const n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return n===-1||i!==-1&&n>i||t!==-1&&n>t||r!==-1&&n>r||vu.test(e.slice(0,n))?e:""}export{Mu as M};