@dsrcjs/ai-widget 0.0.0-stage → 1.0.6

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.
@@ -0,0 +1,57 @@
1
+ import type { Corner } from './drag';
2
+ import { type Lang } from './i18n';
3
+ import type { ThemeOptions } from './theme';
4
+ export type { Lang } from './i18n';
5
+ export type { Scheme, ThemeOptions } from './theme';
6
+ export type Position = Corner;
7
+ /**
8
+ * Where the widget talks to when no `apiUrl` is given, baked in at build time (`VITE_WIDGET_API_URL`). The published
9
+ * bundle is built without one, so a site passes `api-url`; `''` = the page's own origin.
10
+ */
11
+ export declare const DEFAULT_API_URL: string;
12
+ export interface WidgetOptions {
13
+ /** Public site key (`WidgetSite.key`): only for sites that asked for one (own branding, origins, higher limits). */
14
+ siteKey?: string;
15
+ /** Backend origin, e.g. `https://ai-dana.example.kz` (`''` = same origin); default: `DEFAULT_API_URL`. */
16
+ apiUrl?: string;
17
+ /** Default: `<html lang>` → browser language → `ru`. */
18
+ lang?: Lang;
19
+ /** Layer 2 of the theme, over the admin theme. */
20
+ theme?: ThemeOptions;
21
+ position?: Position;
22
+ /** Launcher drag, default `true`; never on screens below 640px. */
23
+ draggable?: boolean;
24
+ defaultOpen?: boolean;
25
+ onOpenChange?: (open: boolean) => void;
26
+ /** The site's own visitor id (a UUID); otherwise one is kept in localStorage `aid_visitor`. */
27
+ visitorId?: string;
28
+ }
29
+ export interface Handle {
30
+ open: () => void;
31
+ close: () => void;
32
+ unmount: () => void;
33
+ /** Merges into the JS theme layer; pass `{ primary: undefined }`-style keys to drop a value. */
34
+ setTheme: (theme: ThemeOptions) => void;
35
+ setLang: (lang: Lang) => void;
36
+ }
37
+ /** Launcher button + chat window, fixed over the page. Without a container a host is appended to `document.body`. */
38
+ export declare function mountLauncher(options: WidgetOptions): Handle;
39
+ export declare function mountLauncher(container: HTMLElement | null | undefined, options: WidgetOptions): Handle;
40
+ /** The chat window only, filling `container`; the page decides when to show it and how big it is. */
41
+ export declare const mount: (container: HTMLElement, options: WidgetOptions) => Handle;
42
+ /**
43
+ * `<ai-dana-chat lang="ru" launcher position="bottom-right" theme="auto">`; `site-key` and `api-url` are optional,
44
+ * without `launcher` only the window is rendered and the element should be sized by the page.
45
+ */
46
+ export declare class AiDanaChatElement extends HTMLElement {
47
+ static observedAttributes: string[];
48
+ private handle;
49
+ connectedCallback(): void;
50
+ disconnectedCallback(): void;
51
+ attributeChangedCallback(name: string, previous: string | null, next: string | null): void;
52
+ open(): void;
53
+ close(): void;
54
+ /** Layer 2 from page scripts: `document.querySelector('ai-dana-chat').setTheme({ primary: '#0a7' })`. */
55
+ setTheme(theme: ThemeOptions): void;
56
+ setLang(lang: Lang): void;
57
+ }
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ import{i as a,D as s,m as t,k as m}from"./index-DizTRH1P.js";export{a as AiDanaChatElement,s as DEFAULT_API_URL,t as mount,m as mountLauncher};
@@ -0,0 +1,34 @@
1
+ import{g as Uo,j as T,d as Se,v as Ce,u as vt,w as Dn,A as Ho,s as Ln,e as Vo,C as Fn,f as qo,h as Wo}from"./index-DizTRH1P.js";function $o(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Ko=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Qo=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Jo={};function zn(e,t){return(Jo.jsx?Qo:Ko).test(e)}const Xo=/[ \t\n\f\r]/g;function Yo(e){return typeof e=="object"?e.type==="text"?Mn(e.value):!1:Mn(e)}function Mn(e){return e.replace(Xo,"")===""}class Ve{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ve.prototype.normal={},Ve.prototype.property={},Ve.prototype.space=void 0;function On(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Ve(n,r,t)}function bt(e){return e.toLowerCase()}class te{constructor(t,n){this.attribute=n,this.property=t}}te.prototype.attribute="",te.prototype.booleanish=!1,te.prototype.boolean=!1,te.prototype.commaOrSpaceSeparated=!1,te.prototype.commaSeparated=!1,te.prototype.defined=!1,te.prototype.mustUseProperty=!1,te.prototype.number=!1,te.prototype.overloadedBoolean=!1,te.prototype.property="",te.prototype.spaceSeparated=!1,te.prototype.space=void 0;let Zo=0;const M=Ee(),K=Ee(),wt=Ee(),C=Ee(),H=Ee(),Ie=Ee(),oe=Ee();function Ee(){return 2**++Zo}const St=Object.freeze(Object.defineProperty({__proto__:null,boolean:M,booleanish:K,commaOrSpaceSeparated:oe,commaSeparated:Ie,number:C,overloadedBoolean:wt,spaceSeparated:H},Symbol.toStringTag,{value:"Module"})),Ct=Object.keys(St);class It extends te{constructor(t,n,r,o){let i=-1;if(super(t,n),jn(this,"space",o),typeof r=="number")for(;++i<Ct.length;){const l=Ct[i];jn(this,Ct[i],(r&St[l])===St[l])}}}It.prototype.defined=!0;function jn(e,t,n){n&&(e[t]=n)}function Me(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new It(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[bt(r)]=r,n[bt(i.attribute)]=r}return new Ve(t,n,e.space)}const Nn=Me({properties:{ariaActiveDescendant:null,ariaAtomic:K,ariaAutoComplete:null,ariaBusy:K,ariaChecked:K,ariaColCount:C,ariaColIndex:C,ariaColSpan:C,ariaControls:H,ariaCurrent:null,ariaDescribedBy:H,ariaDetails:null,ariaDisabled:K,ariaDropEffect:H,ariaErrorMessage:null,ariaExpanded:K,ariaFlowTo:H,ariaGrabbed:K,ariaHasPopup:null,ariaHidden:K,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:H,ariaLevel:C,ariaLive:null,ariaModal:K,ariaMultiLine:K,ariaMultiSelectable:K,ariaOrientation:null,ariaOwns:H,ariaPlaceholder:null,ariaPosInSet:C,ariaPressed:K,ariaReadOnly:K,ariaRelevant:null,ariaRequired:K,ariaRoleDescription:H,ariaRowCount:C,ariaRowIndex:C,ariaRowSpan:C,ariaSelected:K,ariaSetSize:C,ariaSort:null,ariaValueMax:C,ariaValueMin:C,ariaValueNow:C,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Rn(e,t){return t in e?e[t]:t}function _n(e,t){return Rn(e,t.toLowerCase())}const Go=Me({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ie,acceptCharset:H,accessKey:H,action:null,allow:null,allowFullScreen:M,allowPaymentRequest:M,allowUserMedia:M,alpha:M,alt:null,as:null,async:M,autoCapitalize:null,autoComplete:H,autoFocus:M,autoPlay:M,blocking:H,capture:null,charSet:null,checked:M,cite:null,className:H,closedBy:null,colorSpace:null,cols:C,colSpan:C,command:null,commandFor:null,content:null,contentEditable:K,controls:M,controlsList:H,coords:C|Ie,crossOrigin:null,data:null,dateTime:null,decoding:null,default:M,defer:M,dir:null,dirName:null,disabled:M,download:wt,draggable:K,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:M,formTarget:null,headers:H,height:C,hidden:wt,high:C,href:null,hrefLang:null,htmlFor:H,httpEquiv:H,id:null,imageSizes:null,imageSrcSet:null,inert:M,inputMode:null,integrity:null,is:null,isMap:M,itemId:null,itemProp:H,itemRef:H,itemScope:M,itemType:H,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:M,low:C,manifest:null,max:null,maxLength:C,media:null,method:null,min:null,minLength:C,multiple:M,muted:M,name:null,nonce:null,noModule:M,noValidate:M,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:M,optimum:C,pattern:null,ping:H,placeholder:null,playsInline:M,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:M,referrerPolicy:null,rel:H,required:M,reversed:M,rows:C,rowSpan:C,sandbox:H,scope:null,scoped:M,seamless:M,selected:M,shadowRootClonable:M,shadowRootCustomElementRegistry:M,shadowRootDelegatesFocus:M,shadowRootMode:null,shadowRootSerializable:M,shape:null,size:C,sizes:null,slot:null,span:C,spellCheck:K,src:null,srcDoc:null,srcLang:null,srcSet:null,start:C,step:null,style:null,tabIndex:C,target:null,title:null,translate:null,type:null,typeMustMatch:M,useMap:null,value:K,width:C,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:H,axis:null,background:null,bgColor:null,border:C,borderColor:null,bottomMargin:C,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:M,declare:M,event:null,face:null,frame:null,frameBorder:null,hSpace:C,leftMargin:C,link:null,longDesc:null,lowSrc:null,marginHeight:C,marginWidth:C,noResize:M,noHref:M,noShade:M,noWrap:M,object:null,profile:null,prompt:null,rev:null,rightMargin:C,rules:null,scheme:null,scrolling:K,standby:null,summary:null,text:null,topMargin:C,valueType:null,version:null,vAlign:null,vLink:null,vSpace:C,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:M,disablePictureInPicture:M,disableRemotePlayback:M,exportParts:Ie,part:H,prefix:null,property:null,results:C,security:null,unselectable:null},space:"html",transform:_n}),ei=Me({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:oe,accentHeight:C,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:C,amplitude:C,arabicForm:null,ascent:C,attributeName:null,attributeType:null,azimuth:C,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:C,by:null,calcMode:null,capHeight:C,className:H,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:C,diffuseConstant:C,direction:null,display:null,dur:null,divisor:C,dominantBaseline:null,download:M,dx:null,dy:null,edgeMode:null,editable:null,elevation:C,enableBackground:null,end:null,event:null,exponent:C,externalResourcesRequired:null,fill:null,fillOpacity:C,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ie,g2:Ie,glyphName:Ie,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:C,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:C,horizOriginX:C,horizOriginY:C,id:null,ideographic:C,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:C,k:C,k1:C,k2:C,k3:C,k4:C,kernelMatrix:oe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:C,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:C,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:C,overlineThickness:C,paintOrder:null,panose1:null,path:null,pathLength:C,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:H,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:C,pointsAtY:C,pointsAtZ:C,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:oe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:oe,rev:oe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:oe,requiredFeatures:oe,requiredFonts:oe,requiredFormats:oe,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:C,specularExponent:C,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:C,strikethroughThickness:C,string:null,stroke:null,strokeDashArray:oe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:C,strokeOpacity:C,strokeWidth:null,style:null,surfaceScale:C,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:oe,tabIndex:C,tableValues:null,target:null,targetX:C,targetY:C,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:oe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:C,underlineThickness:C,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:C,values:null,vAlphabetic:C,vMathematical:C,vectorEffect:null,vHanging:C,vIdeographic:C,version:null,vertAdvY:C,vertOriginX:C,vertOriginY:C,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:C,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Rn}),Bn=Me({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Un=Me({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_n}),Hn=Me({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),ti={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},ni=/[A-Z]/g,Vn=/-[a-z]/g,ri=/^data[-\w.:]+$/i;function oi(e,t){const n=bt(t);let r=t,o=te;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&ri.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(Vn,li);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!Vn.test(i)){let l=i.replace(ni,ii);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=It}return new o(r,t)}function ii(e){return"-"+e.toLowerCase()}function li(e){return e.charAt(1).toUpperCase()}const si=On([Nn,Go,Bn,Un,Hn],"html"),Et=On([Nn,ei,Bn,Un,Hn],"svg");function ai(e){return e.join(" ").trim()}var qn=/\/\*(?:[^*]|\*(?!\/))*\*\//g,ci=/\n/g,ui=/^\s*/,fi=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,pi=/^:\s*/,hi=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,di=/^[;\s]*/,mi=`
2
+ `,Wn="/",$n="*",qe="",gi="comment",yi="declaration";function xi(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(m){var y=m.match(ci);y&&(n+=y.length);var b=m.lastIndexOf(mi);r=~b?m.length-b:r+m.length}function i(){var m={line:n,column:r};return function(y){return y.position=new l(m),c(),y}}function l(m){this.start=m,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;function s(m){var y=new Error(t.source+":"+n+":"+r+": "+m);if(y.reason=m,y.filename=t.source,y.line=n,y.column=r,y.source=e,!t.silent)throw y}function a(m){var y=m.exec(e);if(y){var b=y[0];return o(b),e=e.slice(b.length),y}}function c(){a(ui)}function u(m){for(var y;y=f();)m.push(y);return m}function f(){var m=i();if(!(Wn!=e.charAt(0)||$n!=e.charAt(1))){for(var y=2;qe!=e.charAt(y)&&($n!=e.charAt(y)||Wn!=e.charAt(y+1));)++y;if(y+=2,qe===e.charAt(y-1))return s("End of comment missing");var b=e.slice(2,y-2);return r+=2,o(b),e=e.slice(y),r+=2,m({type:gi,comment:b})}}function h(){var m=i(),y=a(fi);if(y){if(f(),!a(pi))return s("property missing ':'");var b=a(hi),x=m({type:yi,property:y[0].replace(qn,qe).trim(),value:b?b[0].replace(qn,qe).trim():qe});return a(di),x}}function p(){var m=[];u(m);for(var y;y=h();)m.push(y),u(m);return m}return c(),p()}function ki(e,t){let n=null;if(!e||typeof e!="string")return n;const r=xi(e),o=typeof t=="function";return r.forEach(i=>{if(i.type!=="declaration")return;const{property:l,value:s}=i;o?t(l,s,i):s&&(n=n??{},n[l]=s)}),n}const Kn=Qn("end"),At=Qn("start");function Qn(e){return t;function t(n){const r=n&&n.position&&n.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 vi(e){const t=At(e),n=Kn(e);if(t&&n)return{start:t,end:n}}function We(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Jn(e.position):"start"in e||"end"in e?Jn(e):"line"in e||"column"in e?Tt(e):""}function Tt(e){return Xn(e&&e.line)+":"+Xn(e&&e.column)}function Jn(e){return Tt(e&&e.start)+"-"+Tt(e&&e.end)}function Xn(e){return e&&typeof e=="number"?e:1}class G extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",i={},l=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?o=t:!i.cause&&t&&(l=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?i.ruleId=r:(i.source=r.slice(0,a),i.ruleId=r.slice(a+1))}if(!i.place&&i.ancestors&&i.ancestors){const a=i.ancestors[i.ancestors.length-1];a&&(i.place=a.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=s?s.line:void 0,this.name=We(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=l&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}G.prototype.file="",G.prototype.name="",G.prototype.reason="",G.prototype.message="",G.prototype.stack="",G.prototype.column=void 0,G.prototype.line=void 0,G.prototype.ancestors=void 0,G.prototype.cause=void 0,G.prototype.fatal=void 0,G.prototype.place=void 0,G.prototype.ruleId=void 0,G.prototype.source=void 0;const Pt={}.hasOwnProperty,bi=new Map,wi=/[A-Z]/g,Si=/-([a-z])/g,Ci=new Set(["table","tbody","thead","tfoot","tr"]),Ii=new Set(["td","th"]),Yn="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ei(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Mi(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=zi(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Et:si,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=Zn(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Zn(e,t,n){if(t.type==="element")return Ai(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Ti(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Di(e,t,n);if(t.type==="mdxjsEsm")return Pi(e,t);if(t.type==="root")return Li(e,t,n);if(t.type==="text")return Fi(e,t)}function Ai(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Et,e.schema=o),e.ancestors.push(t);const i=er(e,t.tagName,!1),l=Oi(e,t);let s=Lt(e,t);return Ci.has(t.tagName)&&(s=s.filter(function(a){return typeof a=="string"?!Yo(a):!0})),Gn(e,l,i,t),Dt(l,s),e.ancestors.pop(),e.schema=r,e.create(t,i,l,n)}function Ti(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}$e(e,t.position)}function Pi(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);$e(e,t.position)}function Di(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Et,e.schema=o),e.ancestors.push(t);const i=t.name===null?e.Fragment:er(e,t.name,!0),l=ji(e,t),s=Lt(e,t);return Gn(e,l,i,t),Dt(l,s),e.ancestors.pop(),e.schema=r,e.create(t,i,l,n)}function Li(e,t,n){const r={};return Dt(r,Lt(e,t)),e.create(t,e.Fragment,r,n)}function Fi(e,t){return t.value}function Gn(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Dt(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function zi(e,t,n){return r;function r(o,i,l,s){const a=Array.isArray(l.children)?n:t;return s?a(i,l,s):a(i,l)}}function Mi(e,t){return n;function n(r,o,i,l){const s=Array.isArray(i.children),a=At(r);return t(o,i,l,s,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}function Oi(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Pt.call(t.properties,o)){const i=Ni(e,o,t.properties[o]);if(i){const[l,s]=i;e.tableCellAlignToStyle&&l==="align"&&typeof s=="string"&&Ii.has(t.tagName)?r=s:n[l]=s}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function ji(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const i=o.expression;i.type;const l=i.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else $e(e,t.position);else{const{name:o}=r;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,i=e.evaluater.evaluateExpression(l.expression)}else $e(e,t.position);else i=r.value===null?!0:r.value;n[o]=i}return n}function Lt(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:bi;for(;++r<t.children.length;){const i=t.children[r];let l;if(e.passKeys){const a=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(a){const c=o.get(a)||0;l=a+"-"+c,o.set(a,c+1)}}const s=Zn(e,i,l);s!==void 0&&n.push(s)}return n}function Ni(e,t,n){if(n==null||typeof n=="number"&&Number.isNaN(n))return;const r=oi(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?$o(n):ai(n)),r.property==="style"?["style",typeof n=="object"?e.stylePropertyNameCase==="dom"?n:_i(n):Ri(e,String(n))]:[e.elementAttributeNameCase==="react"&&r.space?ti[r.property]||r.property:r.attribute,n]}function Ri(e,t){const n={};try{ki(t,function(r,o){if(r&&o){let i=r;i.slice(0,2)!=="--"&&(i=i.toLowerCase(),e.stylePropertyNameCase==="dom"&&(i.slice(0,4)==="-ms-"&&(i=i.slice(1)),i=i.replace(Si,Hi))),n[i]=o}})}catch(r){if(e.ignoreInvalidStyle)return{};const o=r,i=new G("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Yn+"#cannot-parse-style-attribute",i}return n}function er(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let i=-1,l;for(;++i<o.length;){const s=zn(o[i])?{type:"Identifier",name:o[i]}:{type:"Literal",value:o[i]};l=l?{type:"MemberExpression",object:l,property:s,computed:!!(i&&s.type==="Literal"),optional:!1}:s}r=l}else r=zn(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Pt.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);$e(e)}function $e(e,t){const n=new G("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Yn+"#cannot-handle-mdx-estrees-without-createevaluater",n}function _i(e){const t={};let n;for(n in e)Pt.call(e,n)&&(t[Bi(n)]=e[n]);return t}function Bi(e){if(e.slice(0,2)==="--")return e;let t=e.replace(wi,Ui);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Ui(e){return"-"+e.toLowerCase()}function Hi(e,t){return t.toUpperCase()}const Ft={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Vi={};function zt(e,t){const n=Vi,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return tr(e,r,o)}function tr(e,t,n){if(qi(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return nr(e.children,t,n)}return Array.isArray(e)?nr(e,t,n):""}function nr(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=tr(e[o],t,n);return r.join("")}function qi(e){return!!(e&&typeof e=="object")}const rr=document.createElement("i");function Mt(e){const t="&"+e+";";rr.innerHTML=t;const n=rr.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ue(e,t,n,r){const o=e.length;let i=0,l;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);i<r.length;)l=r.slice(i,i+1e4),l.unshift(t,0),e.splice(...l),i+=1e4,t+=1e4}function le(e,t){return e.length>0?(ue(e,e.length,0,t),e):t}const or={}.hasOwnProperty;function ir(e){const t={};let n=-1;for(;++n<e.length;)Wi(t,e[n]);return t}function Wi(e,t){let n;for(n in t){const r=(or.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){or.call(r,i)||(r[i]=[]);const l=o[i];$i(r[i],Array.isArray(l)?l:l?[l]:[])}}}function $i(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ue(e,0,0,r)}function lr(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"\uFFFD":String.fromCodePoint(n)}function fe(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const X=ve(/[A-Za-z]/),Y=ve(/[\dA-Za-z]/),Ki=ve(/[#-'*+\--9=?A-Z^-~]/);function Ge(e){return e!==null&&(e<32||e===127)}const Ot=ve(/\d/),Qi=ve(/[\dA-Fa-f]/),sr=ve(/[!-/:-@[-`{-~]/);function P(e){return e!==null&&e<-2}function V(e){return e!==null&&(e<0||e===32)}function j(e){return e===-2||e===-1||e===32}const et=ve(/\p{P}|\p{S}/u),Ae=ve(/\s/);function ve(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Oe(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let l="";if(i===37&&Y(e.charCodeAt(n+1))&&Y(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(l=String.fromCharCode(i));else if(i>55295&&i<57344){const s=e.charCodeAt(n+1);i<56320&&s>56319&&s<57344?(l=String.fromCharCode(i,s),o=1):l="\uFFFD"}else l=String.fromCharCode(i);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function _(e,t,n,r){const o=r?r-1:1/0;let i=0;return l;function l(a){return j(a)?(e.enter(n),s(a)):t(a)}function s(a){return j(a)&&i++<o?(e.consume(a),s):(e.exit(n),t(a))}}function ar(e,t,n,r,o,i){let l=0;return s;function s(u){return j(u)?(e.enter(r),a(u)):c(u)}function a(u){return j(u)&&l<i?(e.consume(u),l++,a):(e.exit(r),c(u))}function c(u){return l>=o?t(u):n(u)}}const Ji={tokenize:Xi};function Xi(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),_(e,t,"linePrefix")}function o(s){return e.enter("paragraph"),i(s)}function i(s){const a=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,l(s)}function l(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return P(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),l)}}let tt=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){cr(this,e,t,n,!1)}addBefore(e,t,n){cr(this,e,t,n,!0)}consume(e){if(this.map.sort(function(o,i){return o[0]-i[0]}),this.map.length===0)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const o of r)e.push(o);r=n.pop()}this.map.length=0,this.index.clear()}};function cr(e,t,n,r,o){if(n===0&&r.length===0)return;const i=e.index.get(t);if(i){i[1]+=n,o?(r.push(...i[2]),i[2]=r):i[2].push(...r);return}const l=[t,n,r];e.map.push(l),e.index.set(t,l)}const Yi={tokenize:Zi},ur={tokenize:Gi};function Zi(e){const t=this,n=[];let r=0,o,i,l;return s;function s(S){if(r<n.length){const L=n[r];return t.containerState=L[1],e.attempt(L[0].continuation,a,c)(S)}return c(S)}function a(S){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&E();const L=t.events.length;let F=L,w;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){w=t.events[F][1].end;break}x(r);let O=L;for(;O<t.events.length;)t.events[O][1].end={...w},O++;const B=new tt;return B.add(F+1,0,t.events.slice(L)),B.add(L,O-L,[]),B.consume(t.events),c(S)}return s(S)}function c(S){if(r===n.length){if(!o)return h(S);if(o.currentConstruct&&o.currentConstruct.concrete)return m(S);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ur,u,f)(S)}function u(S){return o&&E(),x(r),h(S)}function f(S){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,m(S)}function h(S){return t.containerState={},e.attempt(ur,p,m)(S)}function p(S){return r++,n.push([t.currentConstruct,t.containerState]),h(S)}function m(S){if(S===null){o&&E(),x(0),e.consume(S);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:i}),y(S)}function y(S){if(S===null){b(e.exit("chunkFlow"),!0),x(0),e.consume(S);return}return P(S)?(e.consume(S),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(S),y)}function b(S,L){const F=t.sliceStream(S);if(L&&F.push(null),S.previous=i,i&&(i.next=S),i=S,o.defineSkip(S.start),o.write(F),t.parser.lazy[S.start.line]){let w=o.events.length;for(;w--;)if(o.events[w][1].start.offset<l&&(!o.events[w][1].end||o.events[w][1].end.offset>l))return;const O=t.events.length;let B=O,$,k;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){if($){k=t.events[B][1].end;break}$=!0}for(x(r),w=O;w<t.events.length;)t.events[w][1].end={...k},w++;const A=new tt;A.add(B+1,0,t.events.slice(O)),A.add(O,w-O,[]),A.consume(t.events)}}function x(S){let L=n.length;for(;L-- >S;){const F=n[L];t.containerState=F[1],F[0].exit.call(t,e)}n.length=S}function E(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function Gi(e,t,n){return _(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function be(e){if(e===null||V(e)||Ae(e))return 1;if(et(e))return 2}function nt(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const jt={name:"attention",resolveAll:el,tokenize:tl};function el(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){let o=n;for(;o--;)if(e[o][0]==="exit"&&e[o][1].type==="attentionSequence"&&e[o][1]._open&&t.sliceSerialize(e[o][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[o][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[o][1].end.offset-e[o][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;const i=e[o][1].end.offset-e[o][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,l={...e[o][1].end},s={...e[n][1].start};fr(l,-i),fr(s,i);const a={type:i>1?"strongSequence":"emphasisSequence",start:l,end:{...e[o][1].end}},c={type:i>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:s},u={type:i>1?"strongText":"emphasisText",start:{...e[o][1].end},end:{...e[n][1].start}},f={type:i>1?"strong":"emphasis",start:{...a.start},end:{...c.end}};e[o][1].end={...a.start},e[n][1].start={...c.end},r=[],e[o][1].end.offset-e[o][1].start.offset&&(r=le(r,[["enter",e[o][1],t],["exit",e[o][1],t]])),r=le(r,[["enter",f,t],["enter",a,t],["exit",a,t],["enter",u,t]]),r=le(r,nt(t.parser.constructs.insideSpan.null,e.slice(o+1,n),t)),r=le(r,[["exit",u,t],["enter",c,t],["exit",c,t],["exit",f,t]]);let h=0;e[n][1].end.offset-e[n][1].start.offset&&(h=2,r=le(r,[["enter",e[n][1],t],["exit",e[n][1],t]])),ue(e,o-1,n-o+3,r),n=o+r.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function tl(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=be(r);let i;return l;function l(a){return i=a,e.enter("attentionSequence"),s(a)}function s(a){if(a===i)return e.consume(a),s;const c=e.exit("attentionSequence"),u=be(a),f=!u||u===2&&o||n.includes(a)&&a!==42&&a!==95,h=!o||o===2&&u||n.includes(r)&&r!==42&&r!==95;return c._open=!!(i===42?f:f&&(o||!h)),c._close=!!(i===42?h:h&&(u||!f)),t(a)}}function fr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const nl={name:"autolink",tokenize:rl};function rl(e,t,n){let r=0;return o;function o(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(p){return X(p)?(e.consume(p),l):p===64?n(p):c(p)}function l(p){return p===43||p===45||p===46||Y(p)?(r=1,s(p)):c(p)}function s(p){return p===58?(e.consume(p),r=0,a):(p===43||p===45||p===46||Y(p))&&r++<32?(e.consume(p),s):(r=0,c(p))}function a(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Ge(p)?n(p):(e.consume(p),a)}function c(p){return p===64?(e.consume(p),u):Ki(p)?(e.consume(p),c):n(p)}function u(p){return Y(p)?f(p):n(p)}function f(p){return p===46?(e.consume(p),r=0,u):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||Y(p))&&r++<63){const m=p===45?h:f;return e.consume(p),m}return n(p)}}const Ke={partial:!0,tokenize:ol};function ol(e,t,n){return r;function r(i){return j(i)?_(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||P(i)?t(i):n(i)}}const pr={continuation:{tokenize:ll},exit:sl,name:"blockQuote",tokenize:il};function il(e,t,n){const r=this;return o;function o(l){if(l===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),i}return n(l)}function i(l){return j(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function ll(e,t,n){const r=this;return o;function o(l){return j(l)?_(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):i(l)}function i(l){return e.attempt(pr,t,n)(l)}}function sl(e){e.exit("blockQuote")}const hr={name:"characterEscape",tokenize:al};function al(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return sr(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const dr={name:"characterReference",tokenize:cl};function cl(e,t,n){const r=this;let o=0,i,l;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),a}function a(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),i=31,l=Y,u(f))}function c(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,l=Qi,u):(e.enter("characterReferenceValue"),i=7,l=Ot,u(f))}function u(f){if(f===59&&o){const h=e.exit("characterReferenceValue");return l===Y&&!Mt(r.sliceSerialize(h))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(f)&&o++<i?(e.consume(f),u):n(f)}}const Nt={partial:!0,tokenize:ul};function ul(e,t,n){const r=this;return o;function o(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i)}function i(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const mr={concrete:!0,name:"codeFenced",tokenize:fl};function fl(e,t,n){const r=this,o={partial:!0,tokenize:F};let i=0,l=0,s;return a;function a(w){return c(w)}function c(w){const O=r.events[r.events.length-1];return i=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,s=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(w)}function u(w){return w===s?(l++,e.consume(w),u):l<3?n(w):(e.exit("codeFencedFenceSequence"),j(w)?_(e,f,"whitespace")(w):f(w))}function f(w){return w===null||P(w)?(e.exit("codeFencedFence"),r.interrupt?t(w):e.check(Nt,y,L)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(w))}function h(w){return w===null||P(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(w)):j(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),_(e,p,"whitespace")(w)):w===96&&w===s?n(w):(e.consume(w),h)}function p(w){return w===null||P(w)?f(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(w))}function m(w){return w===null||P(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(w)):w===96&&w===s?n(w):(e.consume(w),m)}function y(w){return e.attempt(o,L,b)(w)}function b(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),x}function x(w){return i>0&&j(w)?_(e,E,"linePrefix",i+1)(w):E(w)}function E(w){return w===null||P(w)?e.check(Nt,y,L)(w):(e.enter("codeFlowValue"),S(w))}function S(w){return w===null||P(w)?(e.exit("codeFlowValue"),E(w)):(e.consume(w),S)}function L(w){return e.exit("codeFenced"),t(w)}function F(w,O,B){let $=0;return k;function k(N){return w.enter("lineEnding"),w.consume(N),w.exit("lineEnding"),A}function A(N){return w.enter("codeFencedFence"),j(N)?_(w,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):D(N)}function D(N){return N===s?(w.enter("codeFencedFenceSequence"),U(N)):B(N)}function U(N){return N===s?($++,w.consume(N),U):$>=l?(w.exit("codeFencedFenceSequence"),j(N)?_(w,W,"whitespace")(N):W(N)):B(N)}function W(N){return N===null||P(N)?(w.exit("codeFencedFence"),O(N)):B(N)}}}const Rt={name:"codeIndented",tokenize:hl},pl={partial:!0,tokenize:dl};function hl(e,t,n){return r;function r(s){return e.enter("codeIndented"),ar(e,o,n,"linePrefix",4,4)(s)}function o(s){return s===null?l(s):P(s)?e.attempt(pl,o,l)(s):(e.enter("codeFlowValue"),i(s))}function i(s){return s===null||P(s)?(e.exit("codeFlowValue"),o(s)):(e.consume(s),i)}function l(s){return e.exit("codeIndented"),t(s)}}function dl(e,t,n){const r=this;return o;function o(l){return r.parser.lazy[r.now().line]?n(l):P(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):ar(e,t,i,"linePrefix",4,4)(l)}function i(l){return P(l)?o(l):n(l)}}const ml={name:"codeText",previous:yl,resolve:gl,tokenize:xl};function gl(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function yl(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function xl(e,t,n){let r=0,o,i;return l;function l(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),a(f))}function a(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),a):f===96?(i=e.enter("codeTextSequence"),o=0,u(f)):P(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),a):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||P(f)?(e.exit("codeTextData"),a(f)):(e.consume(f),c)}function u(f){return f===96?(e.consume(f),o++,u):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(i.type="codeTextData",c(f))}}class kl{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,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Qe(this.left,r),i.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),Qe(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Qe(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){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Qe(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Qe(this.left,n.reverse())}}}function Qe(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function gr(e){const t={};let n=-1,r,o,i,l,s,a,c;const u=new kl(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(a=r[1]._tokenizer.events,i=0,i<a.length&&a[i][1].type==="lineEndingBlank"&&(i+=2),i<a.length&&a[i][1].type==="content"))for(;++i<a.length&&a[i][1].type!=="content";)a[i][1].type==="chunkText"&&(a[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,vl(u,n)),n=t[n],c=!0);else if(r[1]._container){for(i=n,o=void 0;i--;)if(l=u.get(i),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(o&&(u.get(o)[1].type="lineEndingBlank"),l[1].type="lineEnding",o=i);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;o&&(r[1].end={...u.get(o)[1].start},s=u.slice(o,n),s.unshift(r),u.splice(o,n-o+1,s))}}return ue(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function vl(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const s=l.events,a=[],c={};let u,f,h=-1,p=n,m=0,y=0;const b=[y];for(;p;){for(;e.get(++o)[1]!==p;);i.push(o),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),f&&l.defineSkip(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(u),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++h<s.length;)s[h][0]==="exit"&&s[h-1][0]==="enter"&&s[h][1].type===s[h-1][1].type&&s[h][1].start.line!==s[h][1].end.line&&(y=h+1,b.push(y),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):b.pop(),h=b.length;h--;){const x=s.slice(b[h],b[h+1]),E=i.pop();a.push([E,E+x.length-1]),e.splice(E,2,x)}for(a.reverse(),h=-1;++h<a.length;)c[m+a[h][0]]=m+a[h][1],m+=a[h][1]-a[h][0]-1;return c}const bl={resolve:Sl,tokenize:Cl},wl={partial:!0,tokenize:Il};function Sl(e){return gr(e),e}function Cl(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(s)}function o(s){return s===null?i(s):P(s)?e.check(wl,l,i)(s):(e.consume(s),o)}function i(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function l(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function Il(e,t,n){const r=this;return o;function o(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),_(e,i,"linePrefix")}function i(l){if(l===null||P(l))return n(l);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function yr(e,t,n,r,o,i,l,s,a){const c=a||Number.POSITIVE_INFINITY;let u=0;return f;function f(x){return x===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(x),e.exit(i),h):x===null||x===32||x===41||Ge(x)?n(x):(e.enter(r),e.enter(l),e.enter(s),e.enter("chunkString",{contentType:"string"}),y(x))}function h(x){return x===62?(e.enter(i),e.consume(x),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===62?(e.exit("chunkString"),e.exit(s),h(x)):x===null||x===60||P(x)?n(x):(e.consume(x),x===92?m:p)}function m(x){return x===60||x===62||x===92?(e.consume(x),p):p(x)}function y(x){return!u&&(x===null||x===41||V(x))?(e.exit("chunkString"),e.exit(s),e.exit(l),e.exit(r),t(x)):u<c&&x===40?(e.consume(x),u++,y):x===41?(e.consume(x),u--,y):x===null||x===32||x===40||Ge(x)?n(x):(e.consume(x),x===92?b:y)}function b(x){return x===40||x===41||x===92?(e.consume(x),y):y(x)}}function xr(e,t,n,r,o,i){const l=this;let s=0,a;return c;function c(p){return e.enter(r),e.enter(o),e.consume(p),e.exit(o),e.enter(i),u}function u(p){return s>999||p===null||p===91||p===93&&!a||p===94&&!s&&"_hiddenFootnoteSupport"in l.parser.constructs?n(p):p===93?(e.exit(i),e.enter(o),e.consume(p),e.exit(o),e.exit(r),t):P(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||P(p)||s++>999?(e.exit("chunkString"),u(p)):(e.consume(p),a||(a=!j(p)),p===92?h:f)}function h(p){return p===91||p===92||p===93?(e.consume(p),s++,f):f(p)}}function kr(e,t,n,r,o,i){let l;return s;function s(h){return h===34||h===39||h===40?(e.enter(r),e.enter(o),e.consume(h),e.exit(o),l=h===40?41:h,a):n(h)}function a(h){return h===l?(e.enter(o),e.consume(h),e.exit(o),e.exit(r),t):(e.enter(i),c(h))}function c(h){return h===l?(e.exit(i),a(l)):h===null?n(h):P(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),_(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===l||h===null||P(h)?(e.exit("chunkString"),c(h)):(e.consume(h),h===92?f:u)}function f(h){return h===l||h===92?(e.consume(h),u):u(h)}}function Je(e,t){let n;return r;function r(o){return P(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):j(o)?_(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const El={name:"definition",tokenize:Tl},Al={partial:!0,tokenize:Pl};function Tl(e,t,n){const r=this;let o;return i;function i(p){return e.enter("definition"),l(p)}function l(p){return xr.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return o=fe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),a):n(p)}function a(p){return V(p)?Je(e,c)(p):c(p)}function c(p){return yr(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function u(p){return e.attempt(Al,f,f)(p)}function f(p){return j(p)?_(e,h,"whitespace")(p):h(p)}function h(p){return p===null||P(p)?(e.exit("definition"),r.parser.defined.push(o),t(p)):n(p)}}function Pl(e,t,n){return r;function r(s){return V(s)?Je(e,o)(s):n(s)}function o(s){return kr(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return j(s)?_(e,l,"whitespace")(s):l(s)}function l(s){return s===null||P(s)?t(s):n(s)}}const Dl={name:"hardBreakEscape",tokenize:Ll};function Ll(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return P(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const Fl={name:"headingAtx",resolve:zl,tokenize:Ml};function zl(e,t){let n=e.length-2,r=3;if(e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r){const o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"};ue(e,r,n-r+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])}return e}function Ml(e,t,n){let r=0;return o;function o(u){return e.enter("atxHeading"),i(u)}function i(u){return e.enter("atxHeadingSequence"),l(u)}function l(u){return u===35&&r++<6?(e.consume(u),l):u===null||V(u)?(e.exit("atxHeadingSequence"),s(u)):n(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),a(u)):u===null||P(u)?(e.exit("atxHeading"),t(u)):j(u)?_(e,s,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function a(u){return u===35?(e.consume(u),a):(e.exit("atxHeadingSequence"),s(u))}function c(u){return u===null||u===35||V(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),c)}}const vr=["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"],_t=["pre","script","style","textarea"],Ol={concrete:!0,name:"htmlFlow",resolveTo:Nl,tokenize:Rl},jl={partial:!0,tokenize:_l};function Nl(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 Rl(e,t,n){const r=this;let o,i,l,s,a;return c;function c(g){return u(g)}function u(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),f}function f(g){return g===33?(e.consume(g),h):g===47?(e.consume(g),i=!0,y):g===63?(e.consume(g),o=3,r.interrupt?t:d):X(g)?(e.consume(g),l=String.fromCharCode(g),b):n(g)}function h(g){return g===45?(e.consume(g),o=2,p):g===91?(e.consume(g),o=5,s=0,m):X(g)?(e.consume(g),o=4,r.interrupt?t:d):n(g)}function p(g){return g===45?(e.consume(g),r.interrupt?t:d):n(g)}function m(g){const ce="CDATA[";return g===ce.charCodeAt(s++)?(e.consume(g),s===ce.length?r.interrupt?t:D:m):n(g)}function y(g){return X(g)?(e.consume(g),l=String.fromCharCode(g),b):n(g)}function b(g){if(g===null||g===47||g===62||V(g)){const ce=g===47,De=l.toLowerCase();return!ce&&!i&&_t.includes(De)?(o=1,r.interrupt?t(g):D(g)):vr.includes(l.toLowerCase())?(o=6,ce?(e.consume(g),x):r.interrupt?t(g):D(g)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(g):i?E(g):S(g))}return g===45||Y(g)?(e.consume(g),l+=String.fromCharCode(g),b):n(g)}function x(g){return g===62?(e.consume(g),r.interrupt?t:D):n(g)}function E(g){return j(g)?(e.consume(g),E):k(g)}function S(g){return g===47?(e.consume(g),k):g===58||g===95||X(g)?(e.consume(g),L):j(g)?(e.consume(g),S):k(g)}function L(g){return g===45||g===46||g===58||g===95||Y(g)?(e.consume(g),L):F(g)}function F(g){return g===61?(e.consume(g),w):j(g)?(e.consume(g),F):S(g)}function w(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),a=g,O):j(g)?(e.consume(g),w):B(g)}function O(g){return g===a?(e.consume(g),a=null,$):g===null||P(g)?n(g):(e.consume(g),O)}function B(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||V(g)?F(g):(e.consume(g),B)}function $(g){return g===47||g===62||j(g)?S(g):n(g)}function k(g){return g===62?(e.consume(g),A):n(g)}function A(g){return g===null||P(g)?D(g):j(g)?(e.consume(g),A):n(g)}function D(g){return g===45&&o===2?(e.consume(g),Z):g===60&&o===1?(e.consume(g),J):g===62&&o===4?(e.consume(g),ae):g===63&&o===3?(e.consume(g),d):g===93&&o===5?(e.consume(g),de):P(g)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(jl,me,U)(g)):g===null||P(g)?(e.exit("htmlFlowData"),U(g)):(e.consume(g),D)}function U(g){return e.check(Nt,W,me)(g)}function W(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),N}function N(g){return g===null||P(g)?U(g):(e.enter("htmlFlowData"),D(g))}function Z(g){return g===45?(e.consume(g),d):D(g)}function J(g){return g===47?(e.consume(g),l="",se):D(g)}function se(g){if(g===62){const ce=l.toLowerCase();return _t.includes(ce)?(e.consume(g),ae):D(g)}return X(g)&&l.length<8?(e.consume(g),l+=String.fromCharCode(g),se):D(g)}function de(g){return g===93?(e.consume(g),d):D(g)}function d(g){return g===62?(e.consume(g),ae):g===45&&o===2?(e.consume(g),d):D(g)}function ae(g){return g===null||P(g)?(e.exit("htmlFlowData"),me(g)):(e.consume(g),ae)}function me(g){return e.exit("htmlFlow"),t(g)}}function _l(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Ke,t,n)}}const Bl={name:"htmlText",tokenize:Ul};function Ul(e,t,n){const r=this;let o,i,l;return s;function s(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),a}function a(d){return d===33?(e.consume(d),c):d===47?(e.consume(d),F):d===63?(e.consume(d),S):X(d)?(e.consume(d),B):n(d)}function c(d){return d===45?(e.consume(d),u):d===91?(e.consume(d),i=0,m):X(d)?(e.consume(d),E):n(d)}function u(d){return d===45?(e.consume(d),p):n(d)}function f(d){return d===null?n(d):d===45?(e.consume(d),h):P(d)?(l=f,J(d)):(e.consume(d),f)}function h(d){return d===45?(e.consume(d),p):f(d)}function p(d){return d===62?Z(d):d===45?h(d):f(d)}function m(d){const ae="CDATA[";return d===ae.charCodeAt(i++)?(e.consume(d),i===ae.length?y:m):n(d)}function y(d){return d===null?n(d):d===93?(e.consume(d),b):P(d)?(l=y,J(d)):(e.consume(d),y)}function b(d){return d===93?(e.consume(d),x):y(d)}function x(d){return d===62?Z(d):d===93?(e.consume(d),x):y(d)}function E(d){return d===null||d===62?Z(d):P(d)?(l=E,J(d)):(e.consume(d),E)}function S(d){return d===null?n(d):d===63?(e.consume(d),L):P(d)?(l=S,J(d)):(e.consume(d),S)}function L(d){return d===62?Z(d):S(d)}function F(d){return X(d)?(e.consume(d),w):n(d)}function w(d){return d===45||Y(d)?(e.consume(d),w):O(d)}function O(d){return P(d)?(l=O,J(d)):j(d)?(e.consume(d),O):Z(d)}function B(d){return d===45||Y(d)?(e.consume(d),B):d===47||d===62||V(d)?$(d):n(d)}function $(d){return d===47?(e.consume(d),Z):d===58||d===95||X(d)?(e.consume(d),k):P(d)?(l=$,J(d)):j(d)?(e.consume(d),$):Z(d)}function k(d){return d===45||d===46||d===58||d===95||Y(d)?(e.consume(d),k):A(d)}function A(d){return d===61?(e.consume(d),D):P(d)?(l=A,J(d)):j(d)?(e.consume(d),A):$(d)}function D(d){return d===null||d===60||d===61||d===62||d===96?n(d):d===34||d===39?(e.consume(d),o=d,U):P(d)?(l=D,J(d)):j(d)?(e.consume(d),D):(e.consume(d),W)}function U(d){return d===o?(e.consume(d),o=void 0,N):d===null?n(d):P(d)?(l=U,J(d)):(e.consume(d),U)}function W(d){return d===null||d===34||d===39||d===60||d===61||d===96?n(d):d===47||d===62||V(d)?$(d):(e.consume(d),W)}function N(d){return d===47||d===62||V(d)?$(d):n(d)}function Z(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),t):n(d)}function J(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),se}function se(d){return j(d)?_(e,de,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):de(d)}function de(d){return e.enter("htmlTextData"),l(d)}}const Bt={name:"labelEnd",resolveAll:Wl,resolveTo:$l,tokenize:Kl},Hl={tokenize:Ql},Vl={tokenize:Jl},ql={tokenize:Xl};function Wl(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&ue(e,0,e.length,n),e}function $l(e,t){let n=e.length,r=0,o,i,l;for(;n--;){const u=e[n][1];if(o){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;e[n][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(i){if(e[n][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(o=n,u.type!=="labelLink")){r=2;break}}else u.type==="labelEnd"&&(i=n)}const s={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},a={type:"label",start:{...e[o][1].start},end:{...e[i][1].end}},c={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[i-2][1].start}};return l=[["enter",s,t],["enter",a,t]],l=le(l,e.slice(o+1,o+r+3)),l=le(l,[["enter",c,t]]),l=le(l,nt(t.parser.constructs.insideSpan.null,e.slice(o+r+4,i-3),t)),l=le(l,[["exit",c,t],e[i-2],e[i-1],["exit",a,t]]),l=le(l,e.slice(i+1)),l=le(l,[["exit",s,t]]),ue(e,o,e.length,l),e}function Kl(e,t,n){const r=this,o=r._labelStarts;let i,l;if(o){for(;o.length>0&&o[o.length-1]._balanced;)o.pop();i=o[o.length-1]}return s;function s(h){return i?i._inactive?f(h):(l=r.parser.defined.includes(fe(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),a):n(h)}function a(h){return h===40?e.attempt(Hl,u,l?u:f)(h):h===91?e.attempt(Vl,u,l?c:f)(h):l?u(h):f(h)}function c(h){return e.attempt(ql,u,f)(h)}function u(h){return o.pop(),t(h)}function f(h){return i._balanced=!0,n(h)}}function Ql(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),o}function o(f){return V(f)?Je(e,i)(f):i(f)}function i(f){return f===41?u(f):yr(e,l,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function l(f){return V(f)?Je(e,a)(f):u(f)}function s(f){return n(f)}function a(f){return f===34||f===39||f===40?kr(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):u(f)}function c(f){return V(f)?Je(e,u)(f):u(f)}function u(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function Jl(e,t,n){const r=this;return o;function o(s){return xr.call(r,e,i,l,"reference","referenceMarker","referenceString")(s)}function i(s){return r.parser.defined.includes(fe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function l(s){return n(s)}}function Xl(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),o}function o(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const Yl={name:"labelStartImage",resolveAll:Bt.resolveAll,tokenize:Zl};function Zl(e,t,n){const r=this;let o;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),l}function l(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),o=e.exit("labelImage"),s):n(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(o),t(a))}}const Gl={name:"labelStartLink",resolveAll:Bt.resolveAll,tokenize:es};function es(e,t,n){const r=this;let o;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),o=e.exit("labelLink"),l}function l(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(o),t(s))}}const Ut={name:"lineEnding",tokenize:ts};function ts(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),_(e,t,"linePrefix")}}const rt={name:"thematicBreak",tokenize:ns};function ns(e,t,n){let r=0,o;return i;function i(c){return e.enter("thematicBreak"),l(c)}function l(c){return o=c,s(c)}function s(c){return c===o?(e.enter("thematicBreakSequence"),a(c)):r>=3&&(c===null||P(c))?(e.exit("thematicBreak"),t(c)):n(c)}function a(c){return c===o?(e.consume(c),r++,a):(e.exit("thematicBreakSequence"),j(c)?_(e,s,"whitespace")(c):s(c))}}const ne={continuation:{tokenize:ls},exit:as,name:"list",tokenize:is},rs={partial:!0,tokenize:cs},os={partial:!0,tokenize:ss};function is(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=0;return s;function s(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Ot(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(rt,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(p)}return n(p)}function a(p){return Ot(p)&&++l<10?(e.consume(p),a):(!r.interrupt||l<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Ke,r.interrupt?n:u,e.attempt(rs,h,f))}function u(p){return r.containerState.initialBlankLine=!0,i++,h(p)}function f(p){return j(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function ls(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ke,o,i);function o(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,_(e,t,"listItemIndent",r.containerState.size+1)(s)}function i(s){return r.containerState.furtherBlankLines||!j(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(os,t,l)(s))}function l(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,_(e,e.attempt(ne,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function ss(e,t,n){const r=this;return _(e,o,"listItemIndent",r.containerState.size+1);function o(i){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(i):n(i)}}function as(e){e.exit(this.containerState.type)}function cs(e,t,n){const r=this;return _(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(i){const l=r.events[r.events.length-1];return!j(i)&&l&&l[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const br={name:"setextUnderline",resolveTo:us,tokenize:fs};function us(e,t){const n=new tt;let r=e.length,o,i,l;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){o=r;break}e[r][1].type==="paragraph"&&(i=r)}else e[r][1].type==="content"&&n.add(r,1,[]),!l&&e[r][1].type==="definition"&&(l=r);const s={type:"setextHeading",start:{...e[o][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(n.add(i,0,[["enter",s,t]]),n.add(l+1,0,[["exit",e[o][1],t]]),e[o][1].end={...e[l][1].end}):e[o][1]=s,n.add(e.length,0,[["exit",s,t]]),n.consume(e),e}function fs(e,t,n){const r=this;let o;return i;function i(c){let u=r.events.length,f;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){f=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),o=c,l(c)):n(c)}function l(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===o?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),j(c)?_(e,a,"lineSuffix")(c):a(c))}function a(c){return c===null||P(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const ps={tokenize:hs};function hs(e){const t=this,n=e.attempt(Ke,r,e.attempt(this.parser.constructs.flowInitial,o,_(e,e.attempt(this.parser.constructs.flow,o,e.attempt(bl,o)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const ds={resolveAll:Sr()},ms=wr("string"),gs=wr("text");function wr(e){return{resolveAll:Sr(e==="text"?ys:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],i=n.attempt(o,l,s);return l;function l(u){return c(u)?i(u):s(u)}function s(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),a}function a(u){return c(u)?(n.exit("data"),i(u)):(n.consume(u),a)}function c(u){if(u===null)return!0;const f=o[u];let h=-1;if(f)for(;++h<f.length;){const p=f[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Sr(e){return t;function t(n,r){let o=-1,i;for(;++o<=n.length;)i===void 0?n[o]&&n[o][1].type==="data"&&(i=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==i+2&&(n[i][1].end=n[o-1][1].end,n.splice(i+2,o-i-2),o=i+2),i=void 0);return e?e(n,r):n}}function ys(e,t){const n=new tt;let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const o=e[r-1][1],i=t.sliceStream(o);let l=i.length,s=-1,a=0,c;for(;l--;){const u=i[l];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(u===-2)c=!0,a++;else if(u!==-1){l++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(a=0),a){const u={type:r===e.length||c||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?s:o.start._bufferIndex+s,_index:o.start._index+l,line:o.end.line,column:o.end.column-a,offset:o.end.offset-a},end:{...o.end}};o.end={...u.start},o.start.offset===o.end.offset?Object.assign(o,u):n.add(r,0,[["enter",u,t],["exit",u,t]])}r++}return n.consume(e),e}const xs={42:ne,43:ne,45:ne,48:ne,49:ne,50:ne,51:ne,52:ne,53:ne,54:ne,55:ne,56:ne,57:ne,62:pr},ks={91:El},vs={[-2]:Rt,[-1]:Rt,32:Rt},bs={35:Fl,42:rt,45:[br,rt],60:Ol,61:br,95:rt,96:mr,126:mr},ws={38:dr,92:hr},Ss={[-5]:Ut,[-4]:Ut,[-3]:Ut,33:Yl,38:dr,42:jt,60:[nl,Bl],91:Gl,92:[Dl,hr],93:Bt,95:jt,96:ml},Cs={null:[jt,ds]},Is={null:[42,95]},Es={null:[]},As=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Is,contentInitial:ks,disable:Es,document:xs,flow:bs,flowInitial:vs,insideSpan:Cs,string:ws,text:Ss},Symbol.toStringTag,{value:"Module"}));function Ts(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},i=[];let l=[],s=[];const a={attempt:O(F),check:O(w),consume:E,enter:S,exit:L,interrupt:O(w,{interrupt:!0})},c={code:null,containerState:{},defineSkip:y,events:[],now:m,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:f};let u=t.tokenize.call(c,a);return t.resolveAll&&i.push(t),c;function f(A){return l=le(l,A),b(),l[l.length-1]!==null?[]:(B(t,0),c.events=nt(i,c.events,c),c.events)}function h(A,D){return Ds(p(A),D)}function p(A){return Ps(l,A)}function m(){const{_bufferIndex:A,_index:D,line:U,column:W,offset:N}=r;return{_bufferIndex:A,_index:D,line:U,column:W,offset:N}}function y(A){o[A.line]=A.column,k()}function b(){for(;r._index<l.length;){const A=l[r._index];if(typeof A=="string"){const D=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===D&&r._bufferIndex<A.length;)x(A.charCodeAt(r._bufferIndex))}else x(A)}}function x(A){u=u(A)}function E(A){P(A)?(r.line++,r.column=1,r.offset+=A===-3?2:1,k()):A!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=A}function S(A,D){const U=D||{};return U.type=A,U.start=m(),c.events.push(["enter",U,c]),s.push(U),U}function L(A){const D=s.pop();return D.end=m(),c.events.push(["exit",D,c]),D}function F(A,D){B(A,D.from)}function w(A,D){D.restore()}function O(A,D){return U;function U(W,N,Z){let J,se,de,d;return Array.isArray(W)?me(W):"tokenize"in W?me([W]):ae(W);function ae(Q){return _e;function _e(ke){const Le=ke!==null&&Q[ke],Fe=ke!==null&&Q.null,xt=[...Array.isArray(Le)?Le:Le?[Le]:[],...Array.isArray(Fe)?Fe:Fe?[Fe]:[]];return me(xt)(ke)}}function me(Q){return J=Q,se=0,Q.length===0?Z:g(Q[se])}function g(Q){return _e;function _e(ke){return d=$(),de=Q,Q.partial||(c.currentConstruct=Q),Q.name&&c.parser.constructs.disable.null.includes(Q.name)?De():Q.tokenize.call(D?Object.assign(Object.create(c),D):c,a,ce,De)(ke)}}function ce(Q){return A(de,d),N}function De(Q){return d.restore(),++se<J.length?g(J[se]):Z}}}function B(A,D){A.resolveAll&&!i.includes(A)&&i.push(A),A.resolve&&ue(c.events,D,c.events.length-D,A.resolve(c.events.slice(D),c)),A.resolveTo&&(c.events=A.resolveTo(c.events,c))}function $(){const A=m(),D=c.previous,U=c.currentConstruct,W=c.events.length,N=Array.from(s);return{from:W,restore:Z};function Z(){r=A,c.previous=D,c.currentConstruct=U,c.events.length=W,s=N,k()}}function k(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function Ps(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let l;if(n===o)l=[e[n].slice(r,i)];else{if(l=e.slice(n,o),r>-1){const s=l[0];typeof s=="string"?l[0]=s.slice(r):l.shift()}i>0&&l.push(e[o].slice(0,i))}return l}function Ds(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let l;if(typeof i=="string")l=i;else switch(i){case-5:{l="\r";break}case-4:{l=`
3
+ `;break}case-3:{l=`\r
4
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&o)continue;l=" ";break}default:l=String.fromCharCode(i)}o=i===-2,r.push(l)}return r.join("")}function Ls(e){const t={constructs:ir([As,...(e||{}).extensions||[]]),content:n(Ji),defined:[],document:n(Yi),flow:n(ps),lazy:{},string:n(ms),text:n(gs)};return t;function n(r){return o;function o(i){return Ts(t,r,i)}}}function Fs(e){for(;!gr(e););return e}const Cr=/[\0\t\n\r]/g;function zs(){let e=1,t="",n=!0,r;return o;function o(i,l,s){i=t+(typeof i=="string"?i.toString():new TextDecoder(l||void 0).decode(i));const a=[];let c=0;for(t="",n&&(i.charCodeAt(0)===65279&&c++,n=void 0);c<i.length;){Cr.lastIndex=c;const u=Cr.exec(i),f=u&&u.index!==void 0?u.index:i.length,h=i.charCodeAt(f);if(!u){t=i.slice(c);break}if(h===10&&c===f&&r)a.push(-3),r=void 0;else switch(r&&(a.push(-5),r=void 0),c<f&&(a.push(i.slice(c,f)),e+=f-c),h){case 0:{a.push(65533),e++;break}case 9:{const p=Math.ceil(e/4)*4;for(a.push(-2);e++<p;)a.push(-1);break}case 10:{a.push(-4),e=1;break}default:r=!0,e=1}c=f+1}return s&&(r&&a.push(-5),t&&a.push(t),a.push(null)),a}}const Ms=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Os(e){return e.replace(Ms,js)}function js(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const r=n.charCodeAt(1),o=r===120||r===88;return lr(n.slice(o?2:1),o?16:10)}return Mt(n)||e}const Ir={}.hasOwnProperty;function Ns(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Rs(n)(Fs(Ls(n).document().write(zs()(e,t,!0))))}function Rs(e){const t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(An),autolinkProtocol:k,autolinkEmail:k,atxHeading:l(Cn),blockQuote:l(xt),characterEscape:k,characterReference:k,codeFenced:l(Sn),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:l(Sn,s),codeText:l(Fo,s),codeTextData:k,data:k,codeFlowValue:k,definition:l(zo),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:l(Mo),hardBreakEscape:l(In),hardBreakTrailing:l(In),htmlFlow:l(En,s),htmlFlowData:k,htmlText:l(En,s),htmlTextData:k,image:l(Oo),label:s,link:l(An),listItem:l(jo),listItemValue:p,listOrdered:l(Tn,h),listUnordered:l(Tn),paragraph:l(No),reference:ce,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:l(Cn),strong:l(Ro),thematicBreak:l(Bo)},exit:{atxHeading:c(),atxHeadingSequence:w,autolink:c(),autolinkEmail:Fe,autolinkProtocol:Le,blockQuote:c(),characterEscapeValue:A,characterReferenceMarkerHexadecimal:Q,characterReferenceMarkerNumeric:Q,characterReferenceValue:_e,characterReference:ke,codeFenced:c(x),codeFencedFence:b,codeFencedFenceInfo:m,codeFencedFenceMeta:y,codeFlowValue:A,codeIndented:c(E),codeText:c(Z),codeTextData:A,data:A,definition:c(),definitionDestinationString:F,definitionLabelString:S,definitionTitleString:L,emphasis:c(),hardBreakEscape:c(U),hardBreakTrailing:c(U),htmlFlow:c(W),htmlFlowData:A,htmlText:c(N),htmlTextData:A,image:c(se),label:d,labelText:de,lineEnding:D,link:c(J),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:De,resourceDestinationString:ae,resourceTitleString:me,resource:g,setextHeading:c($),setextHeadingLineSequence:B,setextHeadingText:O,strong:c(),thematicBreak:c()}};Er(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(v){let I={type:"root",children:[],position:void 0};const z={stack:[I],tokenStack:[],config:t,enter:a,exit:u,buffer:s,resume:f,data:n},R=[],ie=[];let q=-1;for(;++q<v.length;)if(ie.push(v[q]),v[q][1].type==="listOrdered"||v[q][1].type==="listUnordered")if(v[q][0]==="enter")R.push(ie.length-1);else{const ee=R.pop();i(ie,ee)}for(v=ie,q=-1;++q<v.length;){const ee=t[v[q][0]];v[q][0]==="enter"&&t.beforeEnter.length>0&&o(t.beforeEnter,{...z,sliceSerialize:v[q][2].sliceSerialize},v[q][1]),Ir.call(ee,v[q][1].type)&&ee[v[q][1].type].call({...z,sliceSerialize:v[q][2].sliceSerialize},v[q][1]),v[q][0]==="exit"&&t.afterExit.length>0&&o(t.afterExit,{...z,sliceSerialize:v[q][2].sliceSerialize},v[q][1])}if(z.tokenStack.length>0){const ee=z.tokenStack[z.tokenStack.length-1];(ee[1]||Ar).call(z,void 0,ee[0])}for(I.position={start:we(v.length>0?v[0][1].start:{line:1,column:1,offset:0}),end:we(v.length>0?v[v.length-2][1].end:{line:1,column:1,offset:0})},q=-1;++q<t.transforms.length;)I=t.transforms[q](I)||I;return I}function o(v,I,z){let R=-1;for(;++R<v.length;)v[R].call(I,z)}function i(v,I){const z=v.length-1;let R=I-1,ie=-1,q=!1,ee,ge,Be,Ue;const He=[];for(;++R<=z;){const re=v[R];switch(re[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{re[0]==="enter"?ie++:ie--,Ue=void 0;break}case"lineEndingBlank":{re[0]==="enter"&&(ee&&!Ue&&!ie&&!Be&&(Be=R),Ue=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ue=void 0}if(!ie&&re[0]==="enter"&&re[1].type==="listItemPrefix"||ie===-1&&re[0]==="exit"&&(re[1].type==="listUnordered"||re[1].type==="listOrdered")){if(ee){let ze=R;for(ge=void 0;ze--;){const ye=v[ze];if(ye[1].type==="lineEnding"||ye[1].type==="lineEndingBlank"){if(ye[0]==="exit")continue;ge&&(v[ge][1].type="lineEndingBlank",q=!0),ye[1].type="lineEnding",ge=ze}else if(!(ye[1].type==="linePrefix"||ye[1].type==="blockQuotePrefix"||ye[1].type==="blockQuotePrefixWhitespace"||ye[1].type==="blockQuoteMarker"||ye[1].type==="listItemIndent"))break}Be&&(!ge||Be<ge)&&(ee._spread=!0),ee.end=Object.assign({},ge?v[ge][1].start:re[1].end),He.push({at:ge||R,event:["exit",ee,re[2]]})}if(re[1].type==="listItemPrefix"){const ze={type:"listItem",_spread:!1,start:Object.assign({},re[1].start),end:void 0};ee=ze,He.push({at:R,event:["enter",ze,re[2]]}),Be=void 0,Ue=!0}}}const Pn=v.splice(I);let kt=0;for(R=-1;++R<Pn.length;){for(;kt<He.length&&He[kt].at===I+R;)v.push(He[kt++].event);v.push(Pn[R])}v[I][1]._spread=q}function l(v,I){return z;function z(R){a.call(this,v(R),R),I&&I.call(this,R)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(v,I,z){this.stack[this.stack.length-1].children.push(v),this.stack.push(v),this.tokenStack.push([I,z||void 0]),v.position={start:we(I.start),end:void 0}}function c(v){return I;function I(z){v&&v.call(this,z),u.call(this,z)}}function u(v,I){const z=this.stack.pop(),R=this.tokenStack.pop();if(!R)throw new Error("Cannot close `"+v.type+"` ("+We({start:v.start,end:v.end})+"): it\u2019s not open");R[0].type!==v.type&&(I?I.call(this,v,R[0]):(R[1]||Ar).call(this,v,R[0])),z.position.end=we(v.end)}function f(){return zt(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function p(v){if(this.data.expectingFirstListItemValue){const I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(v),10),this.data.expectingFirstListItemValue=void 0}}function m(){const v=this.resume(),I=this.stack[this.stack.length-1];I.lang=v}function y(){const v=this.resume(),I=this.stack[this.stack.length-1];I.meta=v}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function x(){const v=this.resume(),I=this.stack[this.stack.length-1];I.value=v.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const v=this.resume(),I=this.stack[this.stack.length-1];I.value=v.replace(/(\r?\n|\r)$/g,"")}function S(v){const I=this.resume(),z=this.stack[this.stack.length-1];z.label=I,z.identifier=fe(this.sliceSerialize(v)).toLowerCase()}function L(){const v=this.resume(),I=this.stack[this.stack.length-1];I.title=v}function F(){const v=this.resume(),I=this.stack[this.stack.length-1];I.url=v}function w(v){const I=this.stack[this.stack.length-1];if(!I.depth){const z=this.sliceSerialize(v).length;I.depth=z}}function O(){this.data.setextHeadingSlurpLineEnding=!0}function B(v){const I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(v).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function k(v){const I=this.stack[this.stack.length-1].children;let z=I[I.length-1];(!z||z.type!=="text")&&(z=_o(),z.position={start:we(v.start),end:void 0},I.push(z)),this.stack.push(z)}function A(v){const I=this.stack.pop();I.value+=this.sliceSerialize(v),I.position.end=we(v.end)}function D(v){const I=this.stack[this.stack.length-1];if(this.data.atHardBreak){const z=I.children[I.children.length-1];z.position.end=we(v.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(I.type)&&(k.call(this,v),A.call(this,v))}function U(){this.data.atHardBreak=!0}function W(){const v=this.resume(),I=this.stack[this.stack.length-1];I.value=v}function N(){const v=this.resume(),I=this.stack[this.stack.length-1];I.value=v}function Z(){const v=this.resume(),I=this.stack[this.stack.length-1];I.value=v}function J(){const v=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";v.type+="Reference",v.referenceType=I,delete v.url,delete v.title}else delete v.identifier,delete v.label;this.data.referenceType=void 0}function se(){const v=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";v.type+="Reference",v.referenceType=I,delete v.url,delete v.title}else delete v.identifier,delete v.label;this.data.referenceType=void 0}function de(v){const I=this.sliceSerialize(v),z=this.stack[this.stack.length-2];z.label=Os(I),z.identifier=fe(I).toLowerCase()}function d(){const v=this.stack[this.stack.length-1],I=this.resume(),z=this.stack[this.stack.length-1];if(this.data.inReference=!0,z.type==="link"){const R=v.children;z.children=R}else z.alt=I}function ae(){const v=this.resume(),I=this.stack[this.stack.length-1];I.url=v}function me(){const v=this.resume(),I=this.stack[this.stack.length-1];I.title=v}function g(){this.data.inReference=void 0}function ce(){this.data.referenceType="collapsed"}function De(v){const I=this.resume(),z=this.stack[this.stack.length-1];z.label=I,z.identifier=fe(this.sliceSerialize(v)).toLowerCase(),this.data.referenceType="full"}function Q(v){this.data.characterReferenceType=v.type}function _e(v){const I=this.sliceSerialize(v),z=this.data.characterReferenceType;let R;z?(R=lr(I,z==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):R=Mt(I);const ie=this.stack[this.stack.length-1];ie.value+=R}function ke(v){const I=this.stack.pop();I.position.end=we(v.end)}function Le(v){A.call(this,v);const I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(v)}function Fe(v){A.call(this,v);const I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(v)}function xt(){return{type:"blockquote",children:[],position:void 0}}function Sn(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function Fo(){return{type:"inlineCode",value:"",position:void 0}}function zo(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function Mo(){return{type:"emphasis",children:[],position:void 0}}function Cn(){return{type:"heading",depth:0,children:[],position:void 0}}function In(){return{type:"break",position:void 0}}function En(){return{type:"html",value:"",position:void 0}}function Oo(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function An(){return{type:"link",title:null,url:"",children:[],position:void 0}}function Tn(v){return{type:"list",ordered:v.type==="listOrdered",start:null,spread:v._spread,children:[],position:void 0}}function jo(v){return{type:"listItem",spread:v._spread,checked:null,children:[],position:void 0}}function No(){return{type:"paragraph",children:[],position:void 0}}function Ro(){return{type:"strong",children:[],position:void 0}}function _o(){return{type:"text",value:"",position:void 0}}function Bo(){return{type:"thematicBreak",position:void 0}}}function we(e){return{line:e.line,column:e.column,offset:e.offset}}function Er(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Er(e,r):_s(e,r)}}function _s(e,t){let n;for(n in t)if(Ir.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"afterExit":case"beforeEnter":{const r=t[n];r&&e[n].push(r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Ar(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+We({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+We({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+We({start:t.start,end:t.end})+") is still open")}function Bs(e){const t=this;t.parser=n;function n(r){return Ns(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Us(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Hs(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
5
+ `}]}function Vs(e,t){const n=t.value?t.value+`
6
+ `:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function qs(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ws(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $s(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=Oe(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let l,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=i+1,s+=1,e.footnoteCounts.set(r,s);const a={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,a);const c={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,c),e.applyData(t,c)}function Ks(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Qs(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Tr(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&l.type==="text"?l.value+=r:o.push({type:"text",value:r}),o}function Js(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Tr(e,t);const o={src:Oe(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)}function Xs(e,t){const n={src:Oe(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Ys(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Zs(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Tr(e,t);const o={href:Oe(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Gs(e,t){const n={href:Oe(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ea(e,t,n){const r=e.all(t),o=n?ta(n):Pr(t),i={},l=[];if(typeof t.checked=="boolean"){const u=r[0];let f;u&&u.type==="element"&&u.tagName==="p"?f=u:(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:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const u=r[s];(o||s!==0||u.type!=="element"||u.tagName!=="p")&&l.push({type:"text",value:`
7
+ `}),u.type==="element"&&u.tagName==="p"&&!o?l.push(...u.children):l.push(u)}const a=r[r.length-1];a&&(o||a.type!=="element"||a.tagName!=="p")&&l.push({type:"text",value:`
8
+ `});const c={type:"element",tagName:"li",properties:i,children:l};return e.patch(t,c),e.applyData(t,c)}function ta(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Pr(n[r])}return t}function Pr(e){return e.spread??e.children.length>1}function na(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const l=r[o];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function ra(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oa(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function ia(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function la(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),o.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=At(t.children[1]),a=Kn(t.children[t.children.length-1]);s&&a&&(l.position={start:s,end:a}),o.push(l)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)}function sa(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",i=n&&n.type==="table"?n.align:void 0,l=i?i.length:t.children.length;let s=-1;const a=[];for(;++s<l;){const u=t.children[s],f={},h=i?i[s]:void 0;h&&(f.align=h);let p={type:"element",tagName:o,properties:f,children:[]};u&&(p.children=e.all(u),e.patch(u,p),p=e.applyData(u,p)),a.push(p)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(a,!0)};return e.patch(t,c),e.applyData(t,c)}function aa(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Dr=9,Lr=32;function ca(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(Fr(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(Fr(t.slice(o),o>0,!1)),i.join("")}function Fr(e,t,n){let r=0,o=e.length;if(t){let i=e.codePointAt(r);for(;i===Dr||i===Lr;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(o-1);for(;i===Dr||i===Lr;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function ua(e,t){const n={type:"text",value:ca(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function fa(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const pa={blockquote:Us,break:Hs,code:Vs,delete:qs,emphasis:Ws,footnoteReference:$s,heading:Ks,html:Qs,imageReference:Js,image:Xs,inlineCode:Ys,linkReference:Zs,link:Gs,listItem:ea,list:na,paragraph:ra,root:oa,strong:ia,table:la,tableCell:aa,tableRow:sa,text:ua,thematicBreak:fa,toml:ot,yaml:ot,definition:ot,footnoteDefinition:ot};function ot(){}const zr=-1,it=0,Xe=1,lt=2,Ht=3,Vt=4,qt=5,Wt=6,Mr=7,Or=8,{defineProperty:ha}=Object,jr=typeof self=="object"?self:globalThis,Nr=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new jr[e](t)},da=(e,t)=>{const n=(o,i)=>(e.set(i,o),o),r=o=>{if(e.has(o))return e.get(o);const[i,l]=t[o];switch(i){case it:case zr:return n(l,o);case Xe:{const s=n([],o);for(const a of l)s.push(r(a));return s}case lt:{const s=n({},o);for(const[a,c]of l){const u=r(a),f=r(c);u==="__proto__"?ha(s,u,{value:f,configurable:!0,enumerable:!0,writable:!0}):s[u]=f}return s}case Ht:return n(new Date(l),o);case Vt:{const{source:s,flags:a}=l;return n(new RegExp(s,a),o)}case qt:{const s=n(new Map,o);for(const[a,c]of l)s.set(r(a),r(c));return s}case Wt:{const s=n(new Set,o);for(const a of l)s.add(r(a));return s}case Mr:{const{name:s,message:a}=l;return n(typeof jr[s]=="function"?Nr(s,a):new Error(a),o)}case Or:return n(BigInt(l),o);case"BigInt":return n(Object(BigInt(l)),o);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:s}=new Uint8Array(l);return n(new DataView(s),l)}case"-0":return-0}return n(Nr(i,l),o)};return r},Rr=e=>da(new Map,e)(0),Te="",{toString:ma}={},{keys:ga,is:ya}=Object,Ye=e=>{const t=typeof e;if(t!=="object"||!e)return[it,t];const n=ma.call(e).slice(8,-1);switch(n){case"Array":return[Xe,Te];case"Object":return[lt,Te];case"Date":return[Ht,Te];case"RegExp":return[Vt,Te];case"Map":return[qt,Te];case"Set":return[Wt,Te];case"DataView":return[Xe,n]}return n.includes("Array")?[Xe,n]:e instanceof Error?[Mr,e.name||"Error"]:[lt,n]},st=([e,t])=>e===it&&(t==="function"||t==="symbol"),xa=(e,t,n,r)=>{const o=(l,s)=>{const a=r.push(l)-1;return n.set(s,a),a},i=l=>{if(n.has(l))return n.get(l);let[s,a]=Ye(l);switch(s){case it:{let u=l;switch(a){case"bigint":s=Or,u=l.toString();break;case"number":if(!l&&ya(l,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);u=null;break;case"undefined":return o([zr],l)}return o([s,u],l)}case Xe:{if(a){let h=l;return a==="DataView"?h=new Uint8Array(l.buffer):a==="ArrayBuffer"&&(h=new Uint8Array(l)),o([a,[...h]],l)}const u=[],f=o([s,u],l);for(const h of l)u.push(i(h));return f}case lt:{if(a)switch(a){case"BigInt":return o([a,l.toString()],l);case"Boolean":case"Number":case"String":return o([a,l.valueOf()],l)}if(t&&"toJSON"in l)return i(l.toJSON());const u=[],f=o([s,u],l);for(const h of ga(l))(e||!st(Ye(l[h])))&&u.push([i(h),i(l[h])]);return f}case Ht:return o([s,isNaN(l.getTime())?Te:l.toISOString()],l);case Vt:{const{source:u,flags:f}=l;return o([s,{source:u,flags:f}],l)}case qt:{const u=[],f=o([s,u],l);for(const[h,p]of l)(e||!(st(Ye(h))||st(Ye(p))))&&u.push([i(h),i(p)]);return f}case Wt:{const u=[],f=o([s,u],l);for(const h of l)(e||!st(Ye(h)))&&u.push(i(h));return f}}const{message:c}=l;return o([s,{name:a,message:c}],l)};return i},_r=(e,{json:t,lossy:n}={})=>{const r=[];return xa(!(t||n),!!t,new Map,r)(e),r},at=typeof structuredClone=="function"?((e,t)=>t&&("json"in t||"lossy"in t)?Rr(_r(e,t)):structuredClone(e)):(e,t)=>Rr(_r(e,t));function ka(e,t){const n=[{type:"text",value:"\u21A9"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function va(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function ba(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||ka,r=e.options.footnoteBackLabel||va,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let a=-1;for(;++a<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[a]);if(!c)continue;const u=e.all(c),f=String(c.identifier).toUpperCase(),h=Oe(f.toLowerCase());let p=0;const m=[],y=e.footnoteCounts.get(f);for(;y!==void 0&&++p<=y;){m.length>0&&m.push({type:"text",value:" "});let E=typeof n=="string"?n:n(a,p);typeof E=="string"&&(E={type:"text",value:E}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(a,p),className:["data-footnote-backref"]},children:Array.isArray(E)?E:[E]})}const b=u[u.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const E=b.children[b.children.length-1];E&&E.type==="text"?E.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...m)}else u.push(...m);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(u,!0)};e.patch(c,x),s.push(x)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...at(l),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
9
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
10
+ `}]}}const ct=(function(e){if(e==null)return Ia;if(typeof e=="function")return ut(e);if(typeof e=="object")return Array.isArray(e)?wa(e):Sa(e);if(typeof e=="string")return Ca(e);throw new Error("Expected function, string, or object as test")});function wa(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ct(e[n]);return ut(r);function r(...o){let i=-1;for(;++i<t.length;)if(t[i].apply(this,o))return!0;return!1}}function Sa(e){const t=e;return ut(n);function n(r){const o=r;let i;for(i in e)if(o[i]!==t[i])return!1;return!0}}function Ca(e){return ut(t);function t(n){return n&&n.type===e}}function ut(e){return t;function t(n,r,o){return!!(Ea(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function Ia(){return!0}function Ea(e){return e!==null&&typeof e=="object"&&"type"in e}const Br=[],Aa=!0,ft=!1,$t="skip";function Kt(e,t,n,r){if(!e||typeof e!="object")throw new Error("Unexpected value `"+e+"` for `tree`, expected node");let o=!0,i,l,s,a;if(typeof n=="function"||n&&typeof n=="object"?(i=t,l=n,r&&(o=!1)):(l=t,n&&(o=!1)),typeof l=="function")s=l;else if(l&&typeof l=="object"){if(!(l.enter===null||l.enter===void 0))if(typeof l.enter=="function")s=l.enter;else throw new Error("Unexpected value `"+l.enter+"` for `visitors.enter`, expected optional visitor");if(typeof l.exit=="function")a=l.exit;else throw new Error("Unexpected value `"+l.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw new Error("Unexpected value `"+l+"` for `enter` or `visitors`, expected visitor or object with visitors");const c=ct(i),u=o?1:-1;f(e,void 0,[])();function f(h,p,m){const y=h&&typeof h=="object"?h:{};if(typeof y.type=="string"){const x=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(h.type+(x?"<"+x+">":""))+")"})}return b;function b(){const x=!i||c(h,p,m[m.length-1]||void 0);let E=Br;if(s&&x&&(E=Ur(s(h,m,p)),E[0]===ft))return E;if("children"in h&&h.children){const S=h;if(S.children&&E[0]!==$t){let L=(o?-1:S.children.length)+u;const F=[...m,S];for(;L>-1&&L<S.children.length;){const w=S.children[L],O=f(w,L,F)();if(O[0]===ft)return O;L=typeof O[1]=="number"?O[1]:L+u}}}if(a&&x){const S=Ur(a(h,m,p));if(S[0]===$t)throw new Error("Unexpected value `"+S[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(S[0]===ft||typeof S[1]=="number")return S}return E}}}function Ur(e){return Array.isArray(e)?e:typeof e=="number"?[Aa,e]:e==null?Br:[e]}function Qt(e,t,n,r){let o,i,l;i=t,l=n,typeof i=="function"?Kt(e,o,Jt(i),l):Kt(e,o,Ta(i),l)}function Ta(e){return!e||typeof e!="object"?e:{enter:typeof e.enter=="function"?Jt(e.enter):e.enter,exit:typeof e.exit=="function"?Jt(e.exit):e.exit}}function Jt(e){return t;function t(n,r,o){return e(n,o,r[r.length-1])}}const Xt={}.hasOwnProperty,Pa={};function Da(e,t){const n=t||Pa,r=new Map,o=new Map,i=new Map,l={...pa,...n.handlers},s={all:c,applyData:Fa,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:l,one:a,options:n,patch:La,wrap:Ma};return Qt(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const f=u.type==="definition"?r:o,h=String(u.identifier).toUpperCase();f.has(h)||f.set(h,u)}}),s;function a(u,f){const h=u.type,p=s.handlers[h];if(Xt.call(s.handlers,h)&&p)return p(s,u,f);if(s.options.passThrough&&s.options.passThrough.includes(h)){if("children"in u){const{children:m,...y}=u,b=at(y);return b.children=s.all(u),b}return at(u)}return(s.options.unknownHandler||za)(s,u,f)}function c(u){const f=[];if("children"in u){const h=u.children;let p=-1;for(;++p<h.length;){const m=s.one(h[p],u);if(m){if(p&&h[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=Hr(m.value)),!Array.isArray(m)&&m.type==="element")){const y=m.children[0];y&&y.type==="text"&&(y.value=Hr(y.value))}Array.isArray(m)?f.push(...m):f.push(m)}}}return f}}function La(e,t){e.position&&(t.position=vi(e))}function Fa(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&i&&Object.assign(n.properties,at(i)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function za(e,t){const n=t.data||{},r="value"in t&&!(Xt.call(n,"hProperties")||Xt.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Ma(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
11
+ `});++r<e.length;)r&&n.push({type:"text",value:`
12
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
13
+ `}),n}function Hr(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Vr(e,t){const n=Da(e,t),r=n.one(e,void 0),o=ba(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:`
14
+ `},o),i}function Oa(e,t){return e&&"run"in e?async function(n,r){const o=Vr(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Vr(n,{file:r,...e||t})}}function qr(e){if(e)throw e}var Yt,Wr;function ja(){if(Wr)return Yt;Wr=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(a){return typeof Array.isArray=="function"?Array.isArray(a):t.call(a)==="[object Array]"},i=function(a){if(!a||t.call(a)!=="[object Object]")return!1;var c=e.call(a,"constructor"),u=a.constructor&&a.constructor.prototype&&e.call(a.constructor.prototype,"isPrototypeOf");if(a.constructor&&!c&&!u)return!1;var f;for(f in a);return typeof f>"u"||e.call(a,f)},l=function(a,c){n&&c.name==="__proto__"?n(a,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):a[c.name]=c.newValue},s=function(a,c){if(c==="__proto__")if(e.call(a,c)){if(r)return r(a,c).value}else return;return a[c]};return Yt=function a(){var c,u,f,h,p,m,y=arguments[0],b=1,x=arguments.length,E=!1;for(typeof y=="boolean"&&(E=y,y=arguments[1]||{},b=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});b<x;++b)if(c=arguments[b],c!=null)for(u in c)f=s(y,u),h=s(c,u),y!==h&&(E&&h&&(i(h)||(p=o(h)))?(p?(p=!1,m=f&&o(f)?f:[]):m=f&&i(f)?f:{},l(y,{name:u,newValue:a(E,m,h)})):typeof h<"u"&&l(y,{name:u,newValue:h}));return y},Yt}var Na=ja();const Zt=Uo(Na);function Gt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Ra(){const e=[],t={run:n,use:r};return t;function n(...o){let i=-1;const l=o.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);s(null,...o);function s(a,...c){const u=e[++i];let f=-1;if(a){l(a);return}for(;++f<o.length;)(c[f]===null||c[f]===void 0)&&(c[f]=o[f]);o=c,u?_a(u,s)(...c):l(null,...c)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function _a(e,t){let n;return r;function r(...l){const s=e.length>l.length;let a;s&&l.push(o);try{a=e.apply(this,l)}catch(c){const u=c;if(s&&n)throw u;return o(u)}s||(a&&a.then&&typeof a.then=="function"?a.then(i,o):a instanceof Error?o(a):i(a))}function o(l,...s){n||(n=!0,t(l,...s))}function i(l){o(null,l)}}const pe={basename:Ba,dirname:Ua,extname:Ha,join:Va,sep:"/"};function Ba(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ze(e);let n=0,r=-1,o=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else r<0&&(i=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,s=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else l<0&&(i=!0,l=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(r=o):(s=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function Ua(e){if(Ze(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Ha(e){Ze(e);let t=e.length,n=-1,r=0,o=-1,i=0,l;for(;t--;){const s=e.codePointAt(t);if(s===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),s===46?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||n<0||i===0||i===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function Va(...e){let t=-1,n;for(;++t<e.length;)Ze(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":qa(n)}function qa(e){Ze(e);const t=e.codePointAt(0)===47;let n=Wa(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Wa(e,t){let n="",r=0,o=-1,i=0,l=-1,s,a;for(;++l<=e.length;){if(l<e.length)s=e.codePointAt(l);else{if(s===47)break;s=47}if(s===47){if(!(o===l-1||i===1))if(o!==l-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(a=n.lastIndexOf("/"),a!==n.length-1){a<0?(n="",r=0):(n=n.slice(0,a),r=n.length-1-n.lastIndexOf("/")),o=l,i=0;continue}}else if(n.length>0){n="",r=0,o=l,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,l):n=e.slice(o+1,l),r=l-o-1;o=l,i=0}else s===46&&i>-1?i++:i=-1}return n}function Ze(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const $a={cwd:Ka};function Ka(){return"/"}function en(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Qa(e){if(typeof e=="string")e=new URL(e);else if(!en(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Ja(e)}function Ja(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 t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const tn=["history","path","basename","stem","extname","dirname"];class $r{constructor(t){let n;t?en(t)?n={path:t}:typeof t=="string"||Xa(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":$a.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<tn.length;){const i=tn[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let o;for(o in n)tn.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?pe.basename(this.path):void 0}set basename(t){rn(t,"basename"),nn(t,"basename"),this.path=pe.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?pe.dirname(this.path):void 0}set dirname(t){Kr(this.basename,"dirname"),this.path=pe.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?pe.extname(this.path):void 0}set extname(t){if(nn(t,"extname"),Kr(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=pe.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){en(t)&&(t=Qa(t)),rn(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?pe.basename(this.path,this.extname):void 0}set stem(t){rn(t,"stem"),nn(t,"stem"),this.path=pe.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new G(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function nn(e,t){if(e&&e.includes(pe.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+pe.sep+"`")}function rn(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Kr(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Xa(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Ya=(function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Za={}.hasOwnProperty;class wn extends Ya{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=Ra()}copy(){const t=new wn;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Zt(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(sn("data",this.frozen),this.namespace[t]=n,this):Za.call(this.namespace,t)&&this.namespace[t]||void 0:t?(sn("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=pt(t),r=this.parser||this.Parser;return on("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),on("process",this.parser||this.Parser),ln("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,l){const s=pt(t),a=r.parse(s);r.run(a,s,function(u,f,h){if(u||!f||!h)return c(u);const p=f,m=r.stringify(p,h);tc(m)?h.value=m:h.result=m,c(u,h)});function c(u,f){u||!f?l(u):i?i(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),on("processSync",this.parser||this.Parser),ln("processSync",this.compiler||this.Compiler),this.process(t,o),Jr("processSync","process",n),r;function o(i,l){n=!0,qr(i),r=l}}run(t,n,r){Qr(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(l,s){const a=pt(n);o.run(t,a,c);function c(u,f,h){const p=f||t;u?s(u):l?l(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,o;return this.run(t,n,i),Jr("runSync","run",r),o;function i(l,s){qr(l),o=s,r=!0}}stringify(t,n){this.freeze();const r=pt(n),o=this.compiler||this.Compiler;return ln("stringify",o),Qr(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(sn("use",this.frozen),t!=null)if(typeof t=="function")a(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(c){if(typeof c=="function")a(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...f]=c;a(u,f)}else l(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function l(c){if(!("plugins"in c)&&!("settings"in c))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(c.plugins),c.settings&&(o.settings=Zt(!0,o.settings,c.settings))}function s(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const f=c[u];i(f)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function a(c,u){let f=-1,h=-1;for(;++f<r.length;)if(r[f][0]===c){h=f;break}if(h===-1)r.push([c,...u]);else if(u.length>0){let[p,...m]=u;const y=r[h][1];Gt(y)&&Gt(p)&&(p=Zt(!0,y,p)),r[h]=[c,p,...m]}}}}const Ga=new wn().freeze();function on(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ln(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function sn(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 Qr(e){if(!Gt(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Jr(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function pt(e){return ec(e)?e:new $r(e)}function ec(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function tc(e){return typeof e=="string"||nc(e)}function nc(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rc="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Xr=[],Yr={allowDangerousHtml:!0},oc=/^(https?|ircs?|mailto|xmpp)$/i,ic=[{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:"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 lc(e){const t=sc(e),n=ac(e);return cc(t.runSync(t.parse(n),n),e)}function sc(e){const t=e.rehypePlugins||Xr,n=e.remarkPlugins||Xr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Yr}:Yr;return Ga().use(Bs).use(n).use(Oa,r).use(t)}function ac(e){const t=e.children||"",n=new $r;return typeof t=="string"&&(n.value=t),n}function cc(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,i=t.disallowedElements,l=t.skipHtml,s=t.unwrapDisallowed,a=t.urlTransform||uc;for(const u of ic)Object.hasOwn(t,u.from)&&""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+rc+u.id;return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Qt(e,c),Ei(e,{Fragment:T.Fragment,components:o,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0});function c(u,f,h){if(u.type==="raw"&&h&&typeof f=="number")return l?h.children.splice(f,1):h.children[f]={type:"text",value:u.value},f;if(u.type==="element"){let p;for(p in Ft)if(Object.hasOwn(Ft,p)&&Object.hasOwn(u.properties,p)){const m=u.properties[p],y=Ft[p];(y===null||y.includes(u.tagName))&&(u.properties[p]=a(String(m||""),p,u))}}if(u.type==="element"){let p=n?!n.includes(u.tagName):i?i.includes(u.tagName):!1;if(!p&&r&&typeof f=="number"&&(p=!r(u,f,h)),p&&h&&typeof f=="number")return s&&u.children?h.children.splice(f,1,...u.children):h.children.splice(f,1),f}}}function uc(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||oc.test(e.slice(0,t))?e:""}function fc(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Zr(e,t,n){const r=ct((n||{}).ignore||[]),o=pc(t);let i=-1;for(;++i<o.length;)Kt(e,l);function l(a,c,u){if(a.type==="text"&&typeof u=="number")return s(a,c,u);if(r(a,u,c[c.length-1]))return $t}function s(a,c,u){const f=c[c.length-1],h=o[i][0],p=o[i][1];let m=0,y=!1,b=[];h.lastIndex=0;let x=h.exec(a.value);for(;x;){const S=x.index,L={index:x.index,input:x.input,stack:[...c,a]};let F=p(...x,L);if(typeof F=="string"&&(F=F.length>0?{type:"text",value:F}:void 0),F===!1)h.lastIndex=S+1;else{if(m!==S&&E({type:"text",value:a.value.slice(m,S)}),Array.isArray(F))for(const w of F)E(w);else F&&E(F);m=S+x[0].length,y=!0}if(!h.global)break;x=h.exec(a.value)}return y?(m<a.value.length&&E({type:"text",value:a.value.slice(m)}),f.children.splice(u,1,...b)):b=[a],u+b.length;function E(S){const L=b[b.length-1];L&&L.type==="text"&&S.type==="text"?L.value+=S.value:b.push(S)}}}function pc(e){if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=[],n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([hc(o[0]),dc(o[1])])}return t}function hc(e){return typeof e=="string"?new RegExp(fc(e),"g"):e}function dc(e){return typeof e=="function"?e:function(){return e}}function mc(e){Zr(e,[/\r?\n|\r/g,gc])}function gc(){return{type:"break"}}function yc(){return function(e){mc(e)}}function Gr(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}const an="phrasing",cn=["autolink","link","image","label"];function xc(){return{transforms:[Ic],enter:{literalAutolink:vc,literalAutolinkEmail:un,literalAutolinkHttp:un,literalAutolinkWww:un},exit:{literalAutolink:Cc,literalAutolinkEmail:Sc,literalAutolinkHttp:bc,literalAutolinkWww:wc}}}function kc(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:an,notInConstruct:cn},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:an,notInConstruct:cn},{character:":",before:"[ps]",after:"\\/",inConstruct:an,notInConstruct:cn}]}}function vc(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function un(e){this.config.enter.autolinkProtocol.call(this,e)}function bc(e){this.config.exit.autolinkProtocol.call(this,e)}function wc(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Sc(e){this.config.exit.autolinkEmail.call(this,e)}function Cc(e){this.exit(e)}function Ic(e){Zr(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Ec],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Ac]],{ignore:["link","linkReference"]})}function Ec(e,t,n,r,o){let i="";if(!eo(o)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!Tc(n)))return!1;const l=Pc(n+r);if(!l[0])return!1;const s={type:"link",title:null,url:i+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[s,{type:"text",value:l[1]}]:s}function Ac(e,t,n,r){return!eo(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Tc(e){const 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 Pc(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=Gr(e,"(");let i=Gr(e,")");for(;r!==-1&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function eo(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ae(n)||et(n))&&(!t||n!==47)}to.peek=Rc;function Dc(){this.buffer()}function Lc(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Fc(){this.buffer()}function zc(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Mc(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fe(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Oc(e){this.exit(e)}function jc(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fe(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Nc(e){this.exit(e)}function Rc(){return"["}function to(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const l=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),s(),l(),i+=o.move("]"),i}function _c(){return{enter:{gfmFootnoteCallString:Dc,gfmFootnoteCall:Lc,gfmFootnoteDefinitionLabelString:Fc,gfmFootnoteDefinition:zc},exit:{gfmFootnoteCallString:Mc,gfmFootnoteCall:Oc,gfmFootnoteDefinitionLabelString:jc,gfmFootnoteDefinition:Nc}}}function Bc(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:to},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,i,l){const s=i.createTracker(l);let a=s.move("[^");const c=i.enter("footnoteDefinition"),u=i.enter("label");return a+=s.move(i.safe(i.associationId(r),{before:a,after:"]"})),u(),a+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),a+=s.move((t?`
15
+ `:" ")+i.indentLines(i.containerFlow(r,s.current()),t?no:Uc))),c(),a}}function Uc(e,t,n){return t===0?e:no(e,t,n)}function no(e,t,n){return(n?"":" ")+e}const Hc=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];fn.attention=Kc,fn.peek=Qc;function Vc(){return{canContainEols:["delete"],enter:{strikethrough:Wc},exit:{strikethrough:$c}}}function qc(){return{handlers:{delete:fn},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Hc}]}}function Wc(e){this.enter({type:"delete",children:[],position:void 0},e)}function $c(e){this.exit(e)}function fn(e,t,n,r){const o=n.createTracker(r),i=n.stack.includes("strikethrough")?"~":"~~",l=n.enter("strikethrough");let s=o.move(i);return s+=n.containerPhrasing(e,{...o.current(),before:s,after:"~"}),s+=o.move(i),l(),s}function Kc(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function Qc(){return"~"}function Jc(e){return e.length}function Xc(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||Jc,i=[],l=[],s=[],a=[];let c=0,u=-1;for(;++u<e.length;){const y=[],b=[];let x=-1;for(e[u].length>c&&(c=e[u].length);++x<e[u].length;){const E=Yc(e[u][x]);if(n.alignDelimiters!==!1){const S=o(E);b[x]=S,(a[x]===void 0||S>a[x])&&(a[x]=S)}y.push(E)}l[u]=y,s[u]=b}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<c;)i[f]=ro(r[f]);else{const y=ro(r);for(;++f<c;)i[f]=y}f=-1;const h=[],p=[];for(;++f<c;){const y=i[f];let b="",x="";y===99?(b=":",x=":"):y===108?b=":":y===114&&(x=":");let E=n.alignDelimiters===!1?1:Math.max(1,a[f]-b.length-x.length);const S=b+"-".repeat(E)+x;n.alignDelimiters!==!1&&(E=b.length+E+x.length,E>a[f]&&(a[f]=E),p[f]=E),h[f]=S}l.splice(1,0,h),s.splice(1,0,p),u=-1;const m=[];for(;++u<l.length;){const y=l[u],b=s[u];f=-1;const x=[];for(;++f<c;){const E=y[f]||"";let S="",L="";if(n.alignDelimiters!==!1){const F=a[f]-(b[f]||0),w=i[f];w===114?S=" ".repeat(F):w===99?F%2?(S=" ".repeat(F/2+.5),L=" ".repeat(F/2-.5)):(S=" ".repeat(F/2),L=S):L=" ".repeat(F)}n.delimiterStart!==!1&&!f&&x.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&E==="")&&(n.delimiterStart!==!1||f)&&x.push(" "),n.alignDelimiters!==!1&&x.push(S),x.push(E),n.alignDelimiters!==!1&&x.push(L),n.padding!==!1&&x.push(" "),(n.delimiterEnd!==!1||f!==c-1)&&x.push("|")}m.push(n.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return m.join(`
16
+ `)}function Yc(e){return e==null?"":String(e)}function ro(e){const 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}const Zc=ct(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Gc(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const l=n.indentLines(n.containerFlow(e,i.current()),eu);return o(),l}function eu(e,t,n){return">"+(n?"":" ")+e}function tu(e,t){return oo(e,t.inConstruct,!0)&&!oo(e,t.notInConstruct,!1)}function oo(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function io(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;){const i=n.unsafe[o];if(i.character===`
17
+ `&&!i.before&&!i.after&&tu(n.stack,i))return/[\t ]/.test(r.before)?"":" "}return`\\
18
+ `}function nu(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++i>l&&(l=i):i=1,o=r+t.length,r=n.indexOf(t,o);return l}function ru(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function ou(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function iu(e,t,n,r){const o=ou(n),i=e.value||"";if(ru(e,n)){const f=n.enter("codeIndented"),h=n.indentLines(i,lu);return f(),h}const l=n.createTracker(r),s=o.repeat(Math.max(nu(i,o)+1,3)),a=n.enter("codeFenced"),c=o==="`"?"GraveAccent":"Tilde";let u=l.move(s);if(e.lang){const f=n.enter(`codeFencedLang${c}`);u+=l.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...l.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${c}`);u+=l.move(" "),u+=l.move(n.safe(e.meta,{before:u,after:`
19
+ `,encode:["`"],...l.current()})),f()}return u+=l.move(`
20
+ `),i&&(u+=l.move(i+`
21
+ `)),u+=l.move(s),a(),u}function lu(e,t,n){return(n?"":" ")+e}function pn(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function su(e,t,n,r){const o=pn(n),i=o==='"'?"Quote":"Apostrophe",l=n.enter("definition");let s=n.enter("label");const a=n.createTracker(r);let c=a.move("[");return c+=a.move(n.safe(n.associationId(e),{before:c,after:"]",...a.current()})),c+=a.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(s=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":`
22
+ `,...a.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=a.move(" "+o),c+=a.move(n.safe(e.title,{before:c,after:o,...a.current()})),c+=a.move(o),s()),l(),c}function au(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function ht(e){const t=e.codePointAt(0);return t===void 0?"":String.fromCodePoint(t)}function je(e){const t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function lo(e){return"&#x"+e.toString(16).toUpperCase()+";"}function so(e,t,n){const r=be(e),o=be(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function cu(e){if(e.charCodeAt(0)!==60)return;const t=e.charCodeAt(1);if(t===33){const s=e.charCodeAt(2);return s===45?2:s===91?5:X(s)?4:void 0}if(t===63)return 3;const n=t===47,r=n?2:1;let o=r,i=e.charCodeAt(o);if(!X(i))return;for(;i===45||Y(i);)i=e.charCodeAt(++o);const l=e.slice(r,o).toLowerCase();return!n&&i!==47&&_t.includes(l)?1:vr.includes(l)?6:7}const uu=new Map([["*",!1],["_",!0]]);function fu(e,t,n){const r=new Set;for(const i of e){const l=n.get(i);if(l&&i.attention&&t.some(s=>s.attention===i.attention))for(const s of l.tokens)r.add(s.attention)}const o=[];for(const i of e)i.attention&&r.delete(i.attention)&&o.push(i.attention);return o.reverse(),o}function ao(e,t,n){const r=[],o=new Map,i=new Map;let l=0;for(;l<e.length;){if(!e[l].attention){l++;continue}const s=e[l].value.charAt(0),a=uu.get(s);let c=l+1;for(;c<e.length&&e[c].attention&&e[c].value.charAt(0)===s;)c++;const u=l?e[l-1].value:t,f=be(u.charCodeAt(u.length-1)),h=be((c<e.length?e[c].value:n).charCodeAt(0)),p=!h||h===2&&!!f,m=!f||f===2&&!!h,y={tokens:e.slice(l,c),markers:[],start:0,end:0,open:a?p&&(!!f||!m):p,close:a?m&&(!!h||!p):m,split:a!==void 0};for(const b of y.tokens){o.set(b,[...y.tokens]),i.set(b,y);let x=b.value.length;for(;x--;)y.markers.push(b)}y.end=y.markers.length,r.push(y),l=c}for(hu(r,o),l=-1;++l<e.length;){const s=o.get(e[l]);if(s)return{attention:fu(e,s,i),index:l}}}function dt(e,t){const n=e[t?0:e.length-1];if(!n||n.attention)return;const r=t?ht(n.value):je(n.value),o=lo(r.codePointAt(0));if(t)n.value=o+n.value.slice(r.length);else{let i=n.value.slice(0,n.value.length-r.length),l=0;for(;i.charCodeAt(i.length-1-l)===92;)l++;l%2&&(i+="\\"),n.value=i+o}}function pu(e,t,n,r,o){for(const i of n.attention){const l=t.get(i)||i.sequences[0];for(const s of i.sequences){if(s===l)continue;const a=new Map(t);a.set(i,s);const c=dn(e,a,r,o),u=ao(c,r,o);if(!u||u.index>n.index)return{chosen:a,mistake:u,tokens:c}}}}function hu(e,t){const n=new Map;for(const r of e){const o=r.tokens[0].value.charAt(0);let i=n.get(o);i||(i=[],n.set(o,i));let l=r.close?i.length:0;for(;l--&&r.start<r.end;){const s=i[l],a=s.end-s.start,c=r.end-r.start;if(r.split?(s.close||r.open)&&c%3&&!((a+c)%3):a!==s.markers.length||a!==c)continue;const u=r.split?a>1&&c>1?2:1:c,f=s.markers.slice(s.end-u,s.end),h=r.markers.slice(r.start,r.start+u),p=f[0],m=h[0];if(p===f[u-1]&&p.value.length===u&&m===h[u-1]&&m.value.length===u&&p.attention===m.attention)t.delete(p),t.delete(m);else{const y=[...new Set([...f,...h])];for(const b of y){const x=t.get(b);x&&x.push(...y)}}s.end-=u,r.start+=u,s.start===s.end&&i.splice(l,1),l=i.length}r.open&&r.start<r.end&&i.push(r)}}function du(e,t,n){if(t.length===0)throw new Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw new Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(const o of n)if(!Number.isSafeInteger(o)||o<1)throw new Error("Cannot serialize `"+e+"` as attention with `"+o+"` as size, expected positive integer");const r=[];for(const o of t){if(o.length!==1)throw new Error("Cannot serialize `"+e+"` as attention with `"+o+"` as marker, expected a single ascii character");if(!sr(o.charCodeAt(0)))throw new Error("Cannot serialize `"+e+"` as attention with `"+o+"` as marker, expected ascii punctuation");for(const i of n)r.push(o.repeat(i))}return r}function mu(e,t,n){const r=t.indexStack,o=e.children||[],i=[];let l=-1,s=n.before;r.push(-1);let a=t.createTracker(n);for(;++l<o.length;){const c=o[l];let u;if(r[r.length-1]=l,l+1<o.length){let p=t.handle.handlers[o[l+1].type];p&&p.peek&&(p=p.peek),u=p?ht(p(o[l+1],e,t,{before:"",after:"",...a.current()})):""}else u=n.after;const f=i[i.length-1];typeof f=="string"&&(s==="\r"||s===`
23
+ `)&&c.type==="html"&&cu(c.value)!==7&&(i[i.length-1]=f.replace(/(\r?\n|\r)$/," "),s=" ",a=t.createTracker(n),a.move(mt(i,n.before,n.after)));const h=t.handle.handlers[c.type];if(h&&h.attention){const p=hn(c,h.attention,t,a);i.push(p),s=je(p.sequences[0])}else{const p=t.handle(c,e,t,{...a.current(),after:u,before:s});if(!p)continue;a.move(p),i.push(p),s=je(p)}}return r.pop(),i}function hn(e,t,n,r){const{construct:o,markers:i,sizes:l}=t(e,n),s=du(e.type,i,l),a=s[0],c=n.enter(o);r.move(a);const u=mu(e,n,{...r.current(),before:a,after:a});return r.move(mt(u,a,a)),r.move(a),c(),{children:u,sequences:s}}function dn(e,t,n,r){const o=[];let i,l=je(n),s=-1;for(;++s<e.length;){const a=e[s];if(typeof a=="string"){const S={value:a,attention:void 0};i&&i===ht(a)&&dt([S],!0),i=void 0,o.push(S),S.value&&(l=je(S.value));continue}const c=t.get(a)||a.sequences[0],u=c.charAt(0),f=e[s+1],h=l,p=ht(f===void 0?r:typeof f=="string"?f:t.get(f)||f.sequences[0]),m=dn(a.children,t,c,c),y=m.length>0?m[0].value:"",b=so(h.charCodeAt(h.length-1),y.charCodeAt(0),u);b.inside&&dt(m,!0);const x=m.length>0?je(m[m.length-1].value):"",E=so(p.charCodeAt(0),x.charCodeAt(x.length-1),u);E.inside&&dt(m,!1),b.outside&&h!==`
24
+ `&&h!=="\r"&&dt(o,!1),E.outside&&(i=p),o.push({value:c,attention:a},...m,{value:c,attention:a}),l=c.charAt(c.length-1)}return o}function mt(e,t,n){let r=new Map;const o=dn(e,r,t,n);let i=o,l=ao(i,t,n);for(;l;){const a=pu(e,r,l,t,n);if(!a){i=o;break}r=a.chosen,i=a.tokens,l=a.mistake}let s="";for(const a of i)s+=a.value;return s}mn.attention=co,mn.peek=gu;function mn(e,t,n,r){const o=n.enter("phrasing"),i=hn(e,co,n,n.createTracker(r)),l=mt([i],r.before,r.after);return o(),l}function co(e,t){return{construct:"emphasis",markers:au(t)==="*"?["*","_"]:["_","*"],sizes:[1]}}function gu(e,t,n){return n.options.emphasis||"*"}function yu(e,t){let n=!1;return Qt(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,ft}),!!((!e.depth||e.depth<3)&&zt(e)&&(t.options.setext||n))}function xu(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(yu(e,n)){const f=n.enter("headingSetext"),h=n.enter("phrasing"),p=n.containerPhrasing(e,{...i.current(),before:`
25
+ `,after:`
26
+ `});return h(),f(),p+`
27
+ `+(o===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
28
+ `))+1))}const l="#".repeat(o),s=n.enter("headingAtx"),a=n.enter("phrasing");i.move(l+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
29
+ `,...i.current()});const u=c.charCodeAt(0);return(u===9||u===32)&&(c=lo(u)+c.slice(1)),c=c?l+" "+c:l,n.options.closeAtx&&(c+=" "+l),a(),s(),c}uo.peek=ku;function uo(e){return e.value||""}function ku(){return"<"}fo.peek=vu;function fo(e,t,n,r){const o=pn(n),i=o==='"'?"Quote":"Apostrophe",l=n.enter("image");let s=n.enter("label");const a=n.createTracker(r);let c=a.move("![");return c+=a.move(n.safe(e.alt,{before:c,after:"]",...a.current()})),c+=a.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(s=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=a.move(" "+o),c+=a.move(n.safe(e.title,{before:c,after:o,...a.current()})),c+=a.move(o),s()),c+=a.move(")"),l(),c}function vu(){return"!"}po.peek=bu;function po(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let l=n.enter("label");const s=n.createTracker(r);let a=s.move("![");const c=n.safe(e.alt,{before:a,after:"]",...s.current()});a+=s.move(c+"]["),l();const u=n.stack;n.stack=u.filter(function(h){return h!=="phrasing"}),l=n.enter("reference");const f=n.safe(n.associationId(e),{before:a,after:"]",...s.current()});return l(),n.stack=u,i(),o==="full"||!c||c!==f?a+=s.move(f+"]"):o==="shortcut"?a=a.slice(0,-1):a+=s.move("]"),a}function bu(){return"!"}ho.peek=wu;function ho(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const l=n.unsafe[i],s=n.compilePattern(l);if(!l.atBreak)continue;let a;for(;a=s.exec(r);){let c=a.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(a.index+1)}}return o+r+o}function wu(){return"`"}function mo(e,t){const n=zt(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][+\-.a-z]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}go.peek=Su;function go(e,t,n,r){const o=pn(n),i=o==='"'?"Quote":"Apostrophe",l=n.createTracker(r);if(mo(e,n)){const m=n.stack;n.stack=m.filter(function(x){return x!=="phrasing"});const y=n.enter("autolink");let b=l.move("<");return b+=l.move(n.containerPhrasing(e,{before:b,after:">",...l.current()})),b+=l.move(">"),y(),n.stack=m,b}const s=n.enter("link");let a=n.enter("label"),c=l.move("[");const u=n.containerPhrasing(e,{before:c,after:"](",...l.current()});c+=l.move(u),a(),c+=l.move("](");const f=/[\0- \u007F]/.test(e.url),h=r.before.charAt(r.before.length-1);let p=e.title||void 0;if(!p&&!f&&(h===`
30
+ `||h==="\r")){let m=0;for(;m<u.length&&u.charCodeAt(m)!==93;)m+=u.charCodeAt(m)===92?2:1;u.charCodeAt(m+1)===58&&(p="")}return!e.url&&typeof p=="string"||f?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:typeof p=="string"?" ":")",...l.current()}))),a(),typeof p=="string"&&(a=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(p,{before:c,after:o,...l.current()})),c+=l.move(o),a()),c+=l.move(")"),s(),c}function Su(e,t,n){return mo(e,n)?"<":"["}yo.peek=Cu;function yo(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let l=n.enter("label");const s=n.createTracker(r);let a=s.move("[");const c=n.containerPhrasing(e,{before:a,after:"]",...s.current()});a+=s.move(c+"]["),l();const u=n.stack;n.stack=u.filter(function(h){return h!=="phrasing"}),l=n.enter("reference");const f=n.safe(n.associationId(e),{before:a,after:"]",...s.current()});return l(),n.stack=u,i(),o==="full"||!c||c!==f?a+=s.move(f+"]"):o==="shortcut"?a=a.slice(0,-1):a+=s.move("]"),a}function Cu(){return"["}function gn(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Iu(e){const t=gn(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Eu(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function xo(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Au(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let l=e.ordered?Eu(n):gn(n);const s=e.ordered?l==="."?")":".":Iu(n);let a=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&u&&(!u.children||!u.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(a=!0),xo(n)===l&&u){let f=-1;for(;++f<e.children.length;){const h=e.children[f];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){a=!0;break}}}}a&&(l=s),n.bulletCurrent=l;const c=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=i,o(),c}function Tu(e){const 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 Pu(e,t,n,r){const o=Tu(n);let i=n.bulletCurrent||gn(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let l=i.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const s=n.createTracker(r);s.move(i+" ".repeat(l-i.length)),s.shift(l);const a=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),u);return a(),c;function u(f,h,p){return h?(p?"":" ".repeat(l))+f:(p?i:i+" ".repeat(l-i.length))+f}}function Du(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),l=n.containerPhrasing(e,r);return i(),o(),l}function Lu(e,t,n,r){if(!e.children.some(function(l){return Zc(l)}))return n.containerFlow(e,r);const o=n.enter("phrasing"),i=n.containerPhrasing(e,r);return o(),i}function Fu(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}yn.attention=ko,yn.peek=zu;function yn(e,t,n,r){const o=n.enter("phrasing"),i=hn(e,ko,n,n.createTracker(r)),l=mt([i],r.before,r.after);return o(),l}function ko(e,t){return{construct:"strong",markers:Fu(t)==="*"?["*","_"]:["_","*"],sizes:[2]}}function zu(e,t,n){return n.options.strong||"*"}function Mu(e,t,n,r){const o=t?t.children:[],i=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...r,afterNode:o[i+1],beforeNode:o[i-1]})}function Ou(e){const 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 ju(e,t,n){const r=(xo(n)+(n.options.ruleSpaces?" ":"")).repeat(Ou(n));return n.options.ruleSpaces?r.slice(0,-1):r}const vo={blockquote:Gc,break:io,code:iu,definition:su,emphasis:mn,hardBreak:io,heading:xu,html:uo,image:fo,imageReference:po,inlineCode:ho,link:go,linkReference:yo,list:Au,listItem:Pu,paragraph:Du,root:Lu,strong:yn,text:Mu,thematicBreak:ju};function Nu(){return{enter:{table:Ru,tableData:bo,tableHeader:bo,tableRow:Bu},exit:{codeText:Uu,table:_u,tableData:xn,tableHeader:xn,tableRow:xn}}}function Ru(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function _u(e){this.exit(e),this.data.inTable=void 0}function Bu(e){this.enter({type:"tableRow",children:[]},e)}function xn(e){this.exit(e)}function bo(e){this.enter({type:"tableCell",children:[]},e)}function Uu(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Hu));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Hu(e,t){return t==="|"?t:e}function Vu(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
31
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:l,tableCell:a,tableRow:s}};function l(p,m,y,b){return c(u(p,y,b),p.align)}function s(p,m,y,b){const x=f(p,y,b),E=c([x]);return E.slice(0,E.indexOf(`
32
+ `))}function a(p,m,y,b){const x=y.enter("tableCell"),E=y.enter("phrasing"),S=y.containerPhrasing(p,{...b,before:i,after:i});return E(),x(),S}function c(p,m){return Xc(p,{align:m,alignDelimiters:r,padding:n,stringLength:o})}function u(p,m,y){const b=p.children;let x=-1;const E=[],S=m.enter("table");for(;++x<b.length;)E[x]=f(b[x],m,y);return S(),E}function f(p,m,y){const b=p.children;let x=-1;const E=[],S=m.enter("tableRow");for(;++x<b.length;)E[x]=a(b[x],p,m,y);return S(),E}function h(p,m,y){let b=vo.inlineCode(p,m,y);return y.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function qu(){return{exit:{taskListCheckValueChecked:wo,taskListCheckValueUnchecked:wo,paragraph:$u}}}function Wu(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Ku}}}function wo(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function $u(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let i=-1,l;for(;++i<o.length;){const s=o[i];if(s.type==="paragraph"){l=s;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Ku(e,t,n,r){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(l);let a=vo.listItem(e,t,n,{...r,...s.current()});return i&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),a;function c(u){return u+l}}function Qu(){return[xc(),_c(),Vc(),Nu(),qu()]}function Ju(e){return{extensions:[kc(),Bc(e),qc(),Vu(e),Wu()]}}const Xu={tokenize:nf,partial:!0},So={tokenize:rf,partial:!0},Co={tokenize:of,partial:!0},Io={tokenize:lf,partial:!0},Yu={tokenize:sf,partial:!0},Eo={name:"wwwAutolink",tokenize:ef,previous:To},Ao={name:"protocolAutolink",tokenize:tf,previous:Po},xe={name:"emailAutolink",tokenize:Gu,previous:Do},he={};function Zu(){return{text:he}}let Pe=48;for(;Pe<123;)he[Pe]=xe,Pe++,Pe===58?Pe=65:Pe===91&&(Pe=97);he[43]=xe,he[45]=xe,he[46]=xe,he[95]=xe,he[72]=[xe,Ao],he[104]=[xe,Ao],he[87]=[xe,Eo],he[119]=[xe,Eo];function Gu(e,t,n){const r=this;let o,i;return l;function l(f){return!kn(f)||!Do.call(r,r.previous)||vn(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return kn(f)?(e.consume(f),s):f===64?(e.consume(f),a):n(f)}function a(f){return f===46?e.check(Yu,u,c)(f):f===45||f===95||Y(f)?(i=!0,e.consume(f),a):u(f)}function c(f){return e.consume(f),o=!0,a}function u(f){return i&&o&&X(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function ef(e,t,n){const r=this;return o;function o(l){return l!==87&&l!==119||!To.call(r,r.previous)||vn(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Xu,e.attempt(So,e.attempt(Co,i),n),n)(l))}function i(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function tf(e,t,n){const r=this;let o="",i=!1;return l;function l(f){return(f===72||f===104)&&Po.call(r,r.previous)&&!vn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(X(f)&&o.length<5)return o+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const h=o.toLowerCase();if(h==="http"||h==="https")return e.consume(f),a}return n(f)}function a(f){return f===47?(e.consume(f),i?c:(i=!0,a)):n(f)}function c(f){return f===null||Ge(f)||V(f)||Ae(f)||et(f)?n(f):e.attempt(So,e.attempt(Co,u),n)(f)}function u(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function nf(e,t,n){let r=0;return o;function o(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),o):l===46&&r===3?(e.consume(l),i):n(l)}function i(l){return l===null?n(l):t(l)}}function rf(e,t,n){let r,o,i;return l;function l(c){return c===46||c===95?e.check(Io,a,s)(c):c===null||V(c)||Ae(c)||c!==45&&et(c)?a(c):(i=!0,e.consume(c),l)}function s(c){return c===95?r=!0:(o=r,r=void 0),e.consume(c),l}function a(c){return o||r||!i?n(c):t(c)}}function of(e,t){let n=0,r=0;return o;function o(l){return l===40?(n++,e.consume(l),o):l===41&&r<n?i(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(Io,t,i)(l):l===null||V(l)||Ae(l)?t(l):(e.consume(l),o)}function i(l){return l===41&&r++,e.consume(l),o}}function lf(e,t,n){return r;function r(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),r):s===38?(e.consume(s),i):s===93?(e.consume(s),o):s===60||s===null||V(s)||Ae(s)?t(s):n(s)}function o(s){return s===null||s===40||s===91||V(s)||Ae(s)?t(s):r(s)}function i(s){return X(s)?l(s):n(s)}function l(s){return s===59?(e.consume(s),r):X(s)?(e.consume(s),l):n(s)}}function sf(e,t,n){return r;function r(i){return e.consume(i),o}function o(i){return Y(i)?n(i):t(i)}}function To(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||V(e)}function Po(e){return!X(e)}function Do(e){return!(e===47||kn(e))}function kn(e){return e===43||e===45||e===46||e===95||Y(e)}function vn(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const af={tokenize:gf,partial:!0};function cf(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:hf,continuation:{tokenize:df},exit:mf}},text:{91:{name:"gfmFootnoteCall",tokenize:pf},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:uf,resolveTo:ff}}}}function uf(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;o--;){const a=r.events[o][1];if(a.type==="labelImage"){l=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return s;function s(a){if(!l||!l._balanced)return n(a);const c=fe(r.sliceSerialize({start:l.end,end:r.now()}));return c.codePointAt(0)!==94||!i.includes(c.slice(1))?n(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a))}}function ff(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function pf(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,l;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),a}function a(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(f){if(i>999||f===93&&!l||f===null||f===91||V(f))return n(f);if(f===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return o.includes(fe(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return V(f)||(l=!0),i++,e.consume(f),f===92?u:c}function u(f){return f===91||f===92||f===93?(e.consume(f),i++,c):c(f)}}function hf(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,l=0,s;return a;function a(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(m)}function u(m){if(l>999||m===93&&!s||m===null||m===91||V(m))return n(m);if(m===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return i=fe(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return V(m)||(s=!0),l++,e.consume(m),m===92?f:u}function f(m){return m===91||m===92||m===93?(e.consume(m),l++,u):u(m)}function h(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),o.includes(i)||o.push(i),_(e,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return t(m)}}function df(e,t,n){return e.check(Ke,t,e.attempt(af,t,n))}function mf(e){e.exit("gfmFootnoteDefinition")}function gf(e,t,n){const r=this;return _(e,o,"gfmFootnoteDefinitionIndent",5);function o(i){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(i):n(i)}}function yf(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:o,resolveAll:r};return t==null&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(i,l){let s=-1;for(;++s<i.length;)if(i[s][0]==="enter"&&i[s][1].type==="strikethroughSequenceTemporary"&&i[s][1]._close){let a=s;for(;a--;)if(i[a][0]==="exit"&&i[a][1].type==="strikethroughSequenceTemporary"&&i[a][1]._open&&i[s][1].end.offset-i[s][1].start.offset===i[a][1].end.offset-i[a][1].start.offset){i[s][1].type="strikethroughSequence",i[a][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},i[a][1].start),end:Object.assign({},i[s][1].end)},u={type:"strikethroughText",start:Object.assign({},i[a][1].end),end:Object.assign({},i[s][1].start)},f=[["enter",c,l],["enter",i[a][1],l],["exit",i[a][1],l],["enter",u,l]],h=l.parser.constructs.insideSpan.null;h&&ue(f,f.length,0,nt(h,i.slice(a+1,s),l)),ue(f,f.length,0,[["exit",u,l],["enter",i[s][1],l],["exit",i[s][1],l],["exit",c,l]]),ue(i,a-1,s-a+3,f),s=a+f.length-2;break}}for(s=-1;++s<i.length;)i[s][1].type==="strikethroughSequenceTemporary"&&(i[s][1].type="data");return i}function o(i,l,s){const a=this.previous,c=this.events;let u=0;return f;function f(p){return a===126&&c[c.length-1][1].type!=="characterEscape"?s(p):(i.enter("strikethroughSequenceTemporary"),h(p))}function h(p){const m=be(a);if(p===126)return u>1?s(p):(i.consume(p),u++,h);if(u<2&&!t)return s(p);const y=i.exit("strikethroughSequenceTemporary"),b=be(p);return y._open=!b||b===2&&!!m,y._close=!m||m===2&&!!b,l(p)}}}class xf{constructor(){this.map=[],this.index=new Map}add(t,n,r){kf(this,t,n,r)}consume(t){if(this.map.sort(function(i,l){return i[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const i of o)t.push(i);o=r.pop()}this.map.length=0,this.index.clear()}}function kf(e,t,n,r){if(n===0&&r.length===0)return;const o=e.index.get(t);if(o){o[1]+=n,o[2].push(...r);return}const i=[t,n,r];e.map.push(i),e.index.set(t,i)}function vf(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function bf(){return{flow:{null:{name:"table",tokenize:wf,resolveAll:Sf}}}}function wf(e,t,n){const r=this;let o=0,i=0,l;return s;function s(k){let A=r.events.length-1;for(;A>-1;){const{type:W}=r.events[A][1];if(W==="lineEnding"||W==="linePrefix")A--;else break}const D=A>-1?r.events[A][1].type:null,U=D==="tableHead"||D==="tableRow"?w:a;return U===w&&r.parser.lazy[r.now().line]?n(k):U(k)}function a(k){return e.enter("tableHead"),e.enter("tableRow"),c(k)}function c(k){return k===124||(l=!0,i+=1),u(k)}function u(k){return k===null?n(k):P(k)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),p):n(k):j(k)?_(e,u,"whitespace")(k):(i+=1,l&&(l=!1,o+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),l=!0,u):(e.enter("data"),f(k)))}function f(k){return k===null||k===124||V(k)?(e.exit("data"),u(k)):(e.consume(k),k===92?h:f)}function h(k){return k===92||k===124?(e.consume(k),f):f(k)}function p(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(k):(e.enter("tableDelimiterRow"),l=!1,j(k)?_(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):m(k))}function m(k){return k===45||k===58?b(k):k===124?(l=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),y):F(k)}function y(k){return j(k)?_(e,b,"whitespace")(k):b(k)}function b(k){return k===58?(i+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),x):k===45?(i+=1,x(k)):k===null||P(k)?L(k):F(k)}function x(k){return k===45?(e.enter("tableDelimiterFiller"),E(k)):F(k)}function E(k){return k===45?(e.consume(k),E):k===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),S):(e.exit("tableDelimiterFiller"),S(k))}function S(k){return j(k)?_(e,L,"whitespace")(k):L(k)}function L(k){return k===124?m(k):k===null||P(k)?!l||o!==i?F(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):F(k)}function F(k){return n(k)}function w(k){return e.enter("tableRow"),O(k)}function O(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),O):k===null||P(k)?(e.exit("tableRow"),t(k)):j(k)?_(e,O,"whitespace")(k):(e.enter("data"),B(k))}function B(k){return k===null||k===124||V(k)?(e.exit("data"),O(k)):(e.consume(k),k===92?$:B)}function $(k){return k===92||k===124?(e.consume(k),B):B(k)}}function Sf(e,t){let n=-1,r=!0,o=0,i=[0,0,0,0],l=[0,0,0,0],s=!1,a=0,c,u,f;const h=new xf;for(;++n<e.length;){const p=e[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(s=!1,a!==0&&(Lo(h,t,a,c,u),u=void 0,a=0),c={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(n,0,[["enter",c,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,f=void 0,i=[0,0,0,0],l=[0,n+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(n,0,[["enter",u,t]])),o=m.type==="tableDelimiterRow"?2:u?3:1):o&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(i[1]!==0&&(l[0]=l[1],f=gt(h,t,i,o,void 0,f),i=[0,0,0,0]),l[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(l[0]=l[1],f=gt(h,t,i,o,void 0,f)),i=l,l=[i[1],n,0,0])):m.type==="tableHead"?(s=!0,a=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(a=n,i[1]!==0?(l[0]=l[1],f=gt(h,t,i,o,n,f)):l[1]!==0&&(f=gt(h,t,l,o,n,f)),o=0):o&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(l[3]=n)}for(a!==0&&Lo(h,t,a,c,u),h.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=vf(t.events,n))}return e}function gt(e,t,n,r,o,i){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},Ne(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const a=Ne(t.events,n[1]);if(i={type:l,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const c=Ne(t.events,n[2]),u=Ne(t.events,n[3]),f={type:s,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const h=t.events[n[2]],p=t.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,y=n[3]-n[2]-1;e.add(m,y,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return o!==void 0&&(i.end=Object.assign({},Ne(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function Lo(e,t,n,r,o){const i=[],l=Ne(t.events,n);o&&(o.end=Object.assign({},l),i.push(["exit",o,t])),r.end=Object.assign({},l),i.push(["exit",r,t]),e.add(n+1,0,i)}function Ne(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Cf={name:"tasklistCheck",tokenize:Ef};function If(){return{text:{91:Cf}}}function Ef(e,t,n){const r=this;return o;function o(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),i)}function i(a){return V(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),l):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),l):n(a)}function l(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(a)}function s(a){return P(a)?t(a):j(a)?e.check({tokenize:Af},t,n)(a):n(a)}}function Af(e,t,n){return _(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function Tf(e){return ir([Zu(),cf(),yf(e),bf(),If()])}const Pf={};function Df(e){const t=this,n=e||Pf,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(Tf(n)),i.push(Qu()),l.push(Ju(n))}const Lf=2e3,Ff=[Df,yc],yt=e=>typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(yt).join(""):Se.isValidElement(e)?yt(e.props.children):"",zf=({code:e})=>{const{t}=vt(),[n,r]=Se.useState(!1),o=Se.useRef(void 0);Se.useEffect(()=>()=>{window.clearTimeout(o.current)},[]);const i=t(n?"copied":"copy");return T.jsxs("button",{type:"button","aria-label":i,onClick:()=>{Wo(e).then(l=>{l&&(r(!0),window.clearTimeout(o.current),o.current=window.setTimeout(()=>{r(!1)},Lf))})},className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-2xs text-muted-foreground hover:bg-background/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[n?T.jsx(Fn,{className:"size-3.5","aria-hidden":"true"}):T.jsx(qo,{className:"size-3.5","aria-hidden":"true"}),T.jsx("span",{children:i})]})},Mf=({children:e})=>{const t=Se.Children.toArray(e)[0],n=Se.isValidElement(t)?t.props.className??"":"",r=/language-([\w+#-]+)/.exec(n)?.[1];return T.jsxs("div",{className:"mt-3 overflow-hidden rounded-lg border bg-muted/60 first:mt-0",children:[T.jsxs("div",{className:"flex h-8 items-center justify-between border-b bg-muted px-3",children:[T.jsx("span",{className:"font-mono text-2xs lowercase text-muted-foreground",children:r??"text"}),T.jsx(zf,{code:yt(e).replace(/\n$/,"")})]}),T.jsx("pre",{className:"overflow-x-auto p-3 font-mono text-[13px] leading-relaxed",children:e})]})},bn="text-primary underline underline-offset-2 hover:text-primary/80",Of=({href:e,children:t})=>{const{api:n}=vt(),r=e??"";if(Dn(r,n.apiUrl))return T.jsx(Vo,{url:r,name:yt(t)||"file",className:`${bn} inline p-0 text-left`,children:t});const o=Ln(r);return o?T.jsx("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:bn,children:t}):T.jsx("span",{children:t})},jf=({src:e,alt:t})=>{const{api:n}=vt(),r=typeof e=="string"?e:"";if(Dn(r,n.apiUrl))return T.jsx(Ho,{url:r,alt:t??""});const o=t===void 0||t===""?r:t,i=Ln(r);return i?T.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:bn,children:o}):T.jsx("span",{children:o})},Re="mt-3 first:mt-0",Nf=({checked:e})=>T.jsx("span",{role:"img","aria-label":e?"\u2611":"\u2610",className:Ce("inline-flex size-4 shrink-0 items-center justify-center rounded border",e?"border-primary bg-primary text-primary-foreground":"bg-background"),children:e?T.jsx(Fn,{className:"size-3","aria-hidden":"true"}):null}),Rf={p:({children:e})=>T.jsx("p",{className:Re,children:e}),strong:({children:e})=>T.jsx("strong",{className:"font-semibold",children:e}),ul:({children:e,className:t})=>t?.includes("contains-task-list")?T.jsx("ul",{className:Ce(Re,"list-none pl-0.5"),children:e}):T.jsx("ul",{className:Ce(Re,"list-disc pl-[22px] [&_li+li]:mt-1 [&_ul]:mt-1"),children:e}),ol:({children:e})=>T.jsx("ol",{className:Ce(Re,"list-decimal pl-[22px] [&_li+li]:mt-1"),children:e}),li:({children:e,className:t})=>t?.includes("task-list-item")?T.jsx("li",{className:"flex items-center gap-2",children:e}):T.jsx("li",{children:e}),input:({checked:e,type:t})=>t==="checkbox"?T.jsx(Nf,{checked:e===!0}):null,h1:({children:e})=>T.jsx("h1",{className:"mt-5 text-3xl font-semibold leading-[1.3] first:mt-0",children:e}),h2:({children:e,className:t})=>T.jsx("h2",{className:Ce("mt-[18px] text-2xl font-semibold leading-[1.35] first:mt-0",t),children:e}),h3:({children:e})=>T.jsx("h3",{className:"mt-4 text-[17px] font-semibold first:mt-0",children:e}),h4:({children:e})=>T.jsx("h4",{className:"mt-3 text-[15px] font-semibold first:mt-0",children:e}),h5:({children:e})=>T.jsx("h5",{className:"mt-3 text-sm font-semibold first:mt-0",children:e}),h6:({children:e})=>T.jsx("h6",{className:"mt-3 text-[13px] font-semibold text-muted-foreground first:mt-0",children:e}),code:({children:e,className:t})=>t?.includes("language-")?T.jsx("code",{className:t,children:e}):T.jsx("code",{className:"rounded-[5px] border bg-muted px-[5px] py-px font-mono text-[13.5px]",children:e}),pre:({children:e})=>T.jsx(Mf,{children:e}),blockquote:({children:e})=>T.jsx("blockquote",{className:Ce(Re,"border-l-[3px] py-0.5 pl-3.5 text-muted-foreground"),children:e}),a:({href:e,children:t})=>T.jsx(Of,{href:e,children:t}),sup:({children:e})=>T.jsx("sup",{className:"text-[11px] [&_a]:no-underline",children:e}),section:({children:e,...t})=>"data-footnotes"in t?T.jsx("section",{className:"mt-3 border-t pt-2 text-[13px] text-muted-foreground",children:e}):T.jsx("section",{children:e}),img:({src:e,alt:t})=>T.jsx(jf,{src:e,alt:t}),table:({children:e})=>T.jsx("div",{className:Ce(Re,"overflow-x-auto rounded-[10px] border"),children:T.jsx("table",{className:"min-w-full border-collapse text-[13.5px]",children:e})}),thead:({children:e})=>T.jsx("thead",{className:"bg-muted",children:e}),tr:({children:e})=>T.jsx("tr",{className:"border-b last:border-b-0",children:e}),th:({children:e})=>T.jsx("th",{className:"whitespace-nowrap px-3 py-[7px] text-left font-semibold",children:e}),td:({children:e})=>T.jsx("td",{className:"whitespace-nowrap px-3 py-[7px]",children:e}),hr:()=>T.jsx("hr",{className:"my-4 border-0 border-t"})},_f=Se.memo(function({children:e}){return T.jsx(lc,{remarkPlugins:Ff,components:Rf,skipHtml:!0,children:e.replace(/\\r\\n/g,`
33
+ `).replace(/\\n/g,`
34
+ `)})});export{_f as MarkdownImpl};
@@ -0,0 +1,8 @@
1
+ import{S as u,b as I,a as v,r as A,o as E,c as M,t as O}from"./index-DizTRH1P.js";const S=()=>({parts:[]}),w=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),i=e=>typeof e=="string";function N(e,t){w(t)&&(e.metadata={...e.metadata,...t})}function b(e,t){for(const r of e.parts)if(r.type==="text"&&r.id===t)return r;const n={type:"text",id:t,text:""};return e.parts.push(n),n}function T(e,t,n){if(n.transient===!0)return;const r=i(n.id)?n.id:void 0,s=r==null?void 0:e.parts.find(a=>a.type===t&&a.id===r);s!=null&&s.type!=="text"?s.data=n.data:e.parts.push({type:t,...r!=null?{id:r}:{},data:n.data})}function D(e,t){if(!w(t)||!i(t.type))throw new u("stream_error");switch(t.type){case"start":case"finish":case"message-metadata":N(e,t.messageMetadata);return;case"text-start":i(t.id)&&b(e,t.id);return;case"text-delta":i(t.id)&&i(t.delta)&&(b(e,t.id).text+=t.delta);return;case"data-step":case"data-attachment":case"data-block":T(e,t.type,t);return;case"error":throw new u(i(t.errorText)&&t.errorText!==""?t.errorText:"stream_error");default:return}}const _="[DONE]";function g(){const e=new Error("The operation was aborted.");return e.name="AbortError",e}function j(e){let t;for(const n of e.split(`
2
+ `)){if(n.startsWith(":"))continue;const r=n.indexOf(":");if((r===-1?n:n.slice(0,r))!=="data")continue;let s=r===-1?"":n.slice(r+1);s.startsWith(" ")&&(s=s.slice(1)),(t??(t=[])).push(s)}return t?.join(`
3
+ `)}async function*k(e,t){const n=e.getReader(),r=()=>{n.cancel().catch(()=>{})};t?.addEventListener("abort",r,{once:!0});const s=new TextDecoder;let a="";try{if(t?.aborted)throw g();for(;;){const{done:d,value:c}=await n.read();if(t?.aborted)throw g();if(d)return;a+=s.decode(c,{stream:!0});const o=a.endsWith("\r")?"\r":"";a=a.slice(0,a.length-o.length).replace(/\r\n?/g,`
4
+ `);for(let l=a.indexOf(`
5
+
6
+ `);l!==-1;l=a.indexOf(`
7
+
8
+ `)){const f=j(a.slice(0,l));if(a=a.slice(l+2),f===_)return;f!==void 0&&(yield f)}a+=o}}finally{t?.removeEventListener("abort",r),r()}}const p=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),m=e=>typeof e=="string"&&e!=="";function y(e){return m(e)?e:typeof e=="number"&&Number.isInteger(e)?String(e):void 0}function C(e){if(!p(e))return;const t=y(e.threadId),n=y(e.userMessageId),r=y(e.assistantMessageId);if(!(t==null||n==null||r==null||typeof e.mode!="string"))return{threadId:t,userMessageId:n,assistantMessageId:r,mode:e.mode}}function W(e,t){if(!p(t)||!m(t.node)||t.status!=="running"&&t.status!=="done"||typeof t.attempt!="number"||!Number.isInteger(t.attempt)||t.attempt<=0)return;const n={id:e,node:t.node,status:t.status,attempt:t.attempt},{durationMs:r}=t;if(r!==void 0){if(typeof r!="number"||r<0)return;n.durationMs=r}const{label:s,total:a}=t;return typeof s=="string"&&(n.label=s),(a===null||typeof a=="number"&&Number.isFinite(a))&&(n.total=a),n}function L(e){if(!p(e)||!m(e.url))return;const{name:t}=e;if(!(t!=null&&typeof t!="string"))return{name:t?.trim()?t:R(e.url),url:e.url}}function R(e){const t=e.split("?")[0]??e,n=t.slice(t.lastIndexOf("/")+1);try{return decodeURIComponent(n)}catch{return n}}function x(e){const t={text:"",steps:[],attachments:[],blocks:[],metadata:C(e.metadata)};for(const n of e.parts)if(n.type==="text")t.text+=n.text;else if(n.type==="data-step"){const r=n.id!=null?W(n.id,n.data):void 0;r!=null&&t.steps.push(r)}else if(n.type==="data-block"){const r=O(n.data);r!=null&&t.blocks.push(r)}else{const r=L(n.data);r!=null&&t.attachments.push(r)}return t}async function h(e,t,n){const r=await I(e),s=S();let a=!1,d=0;const c=()=>{d=Date.now(),a=!1,t(x(s))};try{for await(const o of k(r,n))D(s,U(o)),a=!0,Date.now()-d>=v&&c()}catch(o){throw a&&c(),o instanceof Error&&o.name==="AbortError"||o instanceof u?o:new u(o instanceof Error?o.message:"stream_error")}a&&c()}function U(e){try{return JSON.parse(e)}catch{throw new u("stream_error")}}async function F({transport:e,request:t,threadId:n,signal:r,onSnapshot:s}){const a=await E(e,M(t,n),r);await h(a,s,r)}async function J(e,t,n,r){const s=await A(e,t,n);await h(s,r,n)}export{h as readUiMessageStream,J as resumeChatAnswer,F as streamChatAnswer,x as toSnapshot};