@useago/sdk 0.4.3 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react.cjs CHANGED
@@ -1,35 +1,35 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const fe=require("./rolldown-runtime-CaekUdDJ.cjs"),li=require("./AgoClient-D4EL6nva.cjs"),_t=require("./createFormCollector-Wb8Rr-U2.cjs"),oi=require("./createMockClient-zHQ0cjUH.cjs");let M=require("react");M=fe.__toESM(M,1);let T=require("react/jsx-runtime");function qn(e){const[n,t]=(0,M.useState)(!1),r=(0,M.useRef)(null),i=(0,M.useMemo)(()=>{r.current&&r.current.destroy();const l=new li.AgoClient(e);return r.current=l,l},[e.baseUrl,e.widgetId]);return(0,M.useEffect)(()=>(t(!0),()=>{r.current?.destroy(),r.current=null}),[i]),(0,M.useEffect)(()=>{r.current&&r.current.updateConfig({agent:e.agent,defaultAgentId:e.defaultAgentId,permission:e.permission,userEmail:e.userEmail,userJwt:e.userJwt,debug:e.debug})},[e.agent,e.defaultAgentId,e.permission,e.userEmail,e.userJwt,e.debug]),{client:i,isReady:n}}var Rt=(0,M.createContext)(null),ai=({children:e,client:n,tools:t,helpers:r,pageContext:i,...l})=>{const{client:o}=qn(n?{baseUrl:""}:l),a=n||o;return(0,M.useEffect)(()=>{if(!(!t||t.length===0)){for(const u of t)a.register(u);return()=>{for(const u of t)a.unregisterFunction(u.name)}}},[a,t]),(0,M.useEffect)(()=>{if(!r)return;const u=[];return Promise.resolve().then(()=>require("./functions-DsmzgHjC.cjs")).then(c=>c.functions_exports).then(c=>{for(const[f,s]of Object.entries(r)){const h=c[f];if(!h){console.warn(`[AGO] Unknown helper: "${f}"`);continue}const p=s===!0?h:{...h,handler:s};a.register(p),u.push(p.name)}}),()=>{for(const c of u)a.unregisterFunction(c)}},[a,r]),(0,M.useEffect)(()=>{i==="auto"&&a.enableAutoPageContext()},[a,i]),(0,T.jsx)(Rt.Provider,{value:a,children:e})};function Xe(){const e=(0,M.useContext)(Rt);if(!e)throw new Error('useAgoClient must be used within an <AgoProvider>. Wrap your component tree with <AgoProvider baseUrl="...">.');return e}function Ye(){return(0,M.useContext)(Rt)}function Ot({client:e,conversationId:n}={}){const t=Ye(),r=e||t;if(!r)throw new Error("useMessages requires an AgoClient. Either pass it as options.client or wrap your app in <AgoProvider>.");const[i,l]=(0,M.useState)([]),[o,a]=(0,M.useState)(n),[u,c]=(0,M.useState)(!1),[f,s]=(0,M.useState)(null);(0,M.useEffect)(()=>{n&&n!==o&&(a(n),h(n))},[n]);const h=async p=>{try{l(await r.getMessages(p))}catch(x){s(x instanceof Error?x:new Error("Failed to load messages"))}};return(0,M.useEffect)(()=>{const p=d=>{o||a(d.conversationId)},x=d=>{l(v=>{const C=v[v.length-1];return C&&C.id===d.messageId?[...v.slice(0,-1),{...C,content:C.content+d.content}]:v})},k=d=>{l(v=>{const C=v.findIndex(A=>A.id===d.id);return C>=0?[...v.slice(0,C),d,...v.slice(C+1)]:[...v,d]}),c(!1)},S=d=>{s(new Error(d.error)),c(!1)};return r.on("message:start",p),r.on("message:chunk",x),r.on("message:complete",k),r.on("message:error",S),()=>{r.off("message:start",p),r.off("message:chunk",x),r.off("message:complete",k),r.off("message:error",S)}},[r,o]),{messages:i,isLoading:u,error:f,sendMessage:(0,M.useCallback)(async(p,x)=>{c(!0),s(null);const k={id:`temp-${Date.now()}`,conversationId:o||"",content:p,role:"user",status:"DONE",createdAt:new Date},S={id:`temp-assistant-${Date.now()}`,conversationId:o||"",content:"",role:"assistant",status:"IN_PROGRESS",createdAt:new Date};l(d=>[...d,k,S]);try{const d=await r.sendMessage(p,{conversationId:o,files:x});return d.conversationId&&!o&&a(d.conversationId),l(v=>{const C=v.filter(z=>!z.id.startsWith("temp-")),A={...k,id:k.id.replace("temp-","user-"),conversationId:d.conversationId};return C.some(z=>z.id===d.id)?[...C,A].sort((z,w)=>new Date(z.createdAt).getTime()-new Date(w.createdAt).getTime()):[...C,A,d]}),d}catch(d){return s(d instanceof Error?d:new Error("Failed to send message")),c(!1),l(v=>v.filter(C=>!C.id.startsWith("temp-"))),null}},[r,o]),clearMessages:(0,M.useCallback)(()=>{l([]),a(void 0),s(null)},[]),conversationId:o}}function ui(e,n){const t=n||{};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}var si=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ci=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fi={};function rn(e,n){return((n||fi).jsx?ci:si).test(e)}var pi=/[ \t\n\f\r]/g;function hi(e){return typeof e=="object"?e.type==="text"?ln(e.value):!1:ln(e)}function ln(e){return e.replace(pi,"")===""}var Qe=class{constructor(e,n,t){this.normal=n,this.property=e,t&&(this.space=t)}};Qe.prototype.normal={};Qe.prototype.property={};Qe.prototype.space=void 0;function Un(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new Qe(t,r,n)}function Et(e){return e.toLowerCase()}var re=class{constructor(e,n){this.attribute=n,this.property=e}};re.prototype.attribute="";re.prototype.booleanish=!1;re.prototype.boolean=!1;re.prototype.commaOrSpaceSeparated=!1;re.prototype.commaSeparated=!1;re.prototype.defined=!1;re.prototype.mustUseProperty=!1;re.prototype.number=!1;re.prototype.overloadedBoolean=!1;re.prototype.property="";re.prototype.spaceSeparated=!1;re.prototype.space=void 0;var It=fe.__exportAll({boolean:()=>N,booleanish:()=>K,commaOrSpaceSeparated:()=>le,commaSeparated:()=>Me,number:()=>E,overloadedBoolean:()=>At,spaceSeparated:()=>W}),mi=0,N=Ie(),K=Ie(),At=Ie(),E=Ie(),W=Ie(),Me=Ie(),le=Ie();function Ie(){return 2**++mi}var ct=Object.keys(It),Nt=class extends re{constructor(e,n,t,r){let i=-1;if(super(e,n),on(this,"space",r),typeof t=="number")for(;++i<ct.length;){const l=ct[i];on(this,ct[i],(t&It[l])===It[l])}}};Nt.prototype.defined=!0;function on(e,n,t){t&&(e[n]=t)}function Re(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const l=new Nt(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),n[r]=l,t[Et(r)]=r,t[Et(l.attribute)]=r}return new Qe(n,t,e.space)}var $n=Re({properties:{ariaActiveDescendant:null,ariaAtomic:K,ariaAutoComplete:null,ariaBusy:K,ariaChecked:K,ariaColCount:E,ariaColIndex:E,ariaColSpan:E,ariaControls:W,ariaCurrent:null,ariaDescribedBy:W,ariaDetails:null,ariaDisabled:K,ariaDropEffect:W,ariaErrorMessage:null,ariaExpanded:K,ariaFlowTo:W,ariaGrabbed:K,ariaHasPopup:null,ariaHidden:K,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:W,ariaLevel:E,ariaLive:null,ariaModal:K,ariaMultiLine:K,ariaMultiSelectable:K,ariaOrientation:null,ariaOwns:W,ariaPlaceholder:null,ariaPosInSet:E,ariaPressed:K,ariaReadOnly:K,ariaRelevant:null,ariaRequired:K,ariaRoleDescription:W,ariaRowCount:E,ariaRowIndex:E,ariaRowSpan:E,ariaSelected:K,ariaSetSize:E,ariaSort:null,ariaValueMax:E,ariaValueMin:E,ariaValueNow:E,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function Vn(e,n){return n in e?e[n]:n}function Wn(e,n){return Vn(e,n.toLowerCase())}var gi=Re({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Me,acceptCharset:W,accessKey:W,action:null,allow:null,allowFullScreen:N,allowPaymentRequest:N,allowUserMedia:N,alt:null,as:null,async:N,autoCapitalize:null,autoComplete:W,autoFocus:N,autoPlay:N,blocking:W,capture:null,charSet:null,checked:N,cite:null,className:W,cols:E,colSpan:null,content:null,contentEditable:K,controls:N,controlsList:W,coords:E|Me,crossOrigin:null,data:null,dateTime:null,decoding:null,default:N,defer:N,dir:null,dirName:null,disabled:N,download:At,draggable:K,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:N,formTarget:null,headers:W,height:E,hidden:At,high:E,href:null,hrefLang:null,htmlFor:W,httpEquiv:W,id:null,imageSizes:null,imageSrcSet:null,inert:N,inputMode:null,integrity:null,is:null,isMap:N,itemId:null,itemProp:W,itemRef:W,itemScope:N,itemType:W,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:N,low:E,manifest:null,max:null,maxLength:E,media:null,method:null,min:null,minLength:E,multiple:N,muted:N,name:null,nonce:null,noModule:N,noValidate:N,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:N,optimum:E,pattern:null,ping:W,placeholder:null,playsInline:N,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:N,referrerPolicy:null,rel:W,required:N,reversed:N,rows:E,rowSpan:E,sandbox:W,scope:null,scoped:N,seamless:N,selected:N,shadowRootClonable:N,shadowRootDelegatesFocus:N,shadowRootMode:null,shape:null,size:E,sizes:null,slot:null,span:E,spellCheck:K,src:null,srcDoc:null,srcLang:null,srcSet:null,start:E,step:null,style:null,tabIndex:E,target:null,title:null,translate:null,type:null,typeMustMatch:N,useMap:null,value:K,width:E,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:W,axis:null,background:null,bgColor:null,border:E,borderColor:null,bottomMargin:E,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:N,declare:N,event:null,face:null,frame:null,frameBorder:null,hSpace:E,leftMargin:E,link:null,longDesc:null,lowSrc:null,marginHeight:E,marginWidth:E,noResize:N,noHref:N,noShade:N,noWrap:N,object:null,profile:null,prompt:null,rev:null,rightMargin:E,rules:null,scheme:null,scrolling:K,standby:null,summary:null,text:null,topMargin:E,valueType:null,version:null,vAlign:null,vLink:null,vSpace:E,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:N,disableRemotePlayback:N,prefix:null,property:null,results:E,security:null,unselectable:null},space:"html",transform:Wn}),di=Re({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",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:le,accentHeight:E,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:E,amplitude:E,arabicForm:null,ascent:E,attributeName:null,attributeType:null,azimuth:E,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:E,by:null,calcMode:null,capHeight:E,className:W,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:E,diffuseConstant:E,direction:null,display:null,dur:null,divisor:E,dominantBaseline:null,download:N,dx:null,dy:null,edgeMode:null,editable:null,elevation:E,enableBackground:null,end:null,event:null,exponent:E,externalResourcesRequired:null,fill:null,fillOpacity:E,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:Me,g2:Me,glyphName:Me,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:E,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:E,horizOriginX:E,horizOriginY:E,id:null,ideographic:E,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:E,k:E,k1:E,k2:E,k3:E,k4:E,kernelMatrix:le,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:E,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:E,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:E,overlineThickness:E,paintOrder:null,panose1:null,path:null,pathLength:E,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:W,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:E,pointsAtY:E,pointsAtZ:E,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:le,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:le,rev:le,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:le,requiredFeatures:le,requiredFonts:le,requiredFormats:le,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:E,specularExponent:E,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:E,strikethroughThickness:E,string:null,stroke:null,strokeDashArray:le,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:E,strokeOpacity:E,strokeWidth:null,style:null,surfaceScale:E,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:le,tabIndex:E,tableValues:null,target:null,targetX:E,targetY:E,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:le,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:E,underlineThickness:E,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:E,values:null,vAlphabetic:E,vMathematical:E,vectorEffect:null,vHanging:E,vIdeographic:E,version:null,vertAdvY:E,vertOriginX:E,vertOriginY:E,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:E,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Vn}),Xn=Re({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Yn=Re({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Wn}),Qn=Re({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),xi={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"},yi=/[A-Z]/g,an=/-[a-z]/g,ki=/^data[-\w.:]+$/i;function bi(e,n){const t=Et(n);let r=n,i=re;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&ki.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace(an,vi);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!an.test(l)){let o=l.replace(yi,wi);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}i=Nt}return new i(r,n)}function wi(e){return"-"+e.toLowerCase()}function vi(e){return e.charAt(1).toUpperCase()}var Ci=Un([$n,gi,Xn,Yn,Qn],"html"),Bt=Un([$n,di,Xn,Yn,Qn],"svg");function Si(e){return e.join(" ").trim()}var Ei=fe.__commonJSMin(((e,n)=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
2
- `,s="/",h="*",p="",x="comment",k="declaration";function S(v,C){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];C=C||{};var A=1,z=1;function w(R){var D=R.match(r);D&&(A+=D.length);var J=R.lastIndexOf(f);z=~J?R.length-J:z+R.length}function B(){var R={line:A,column:z};return function(D){return D.position=new _(R),P(),D}}function _(R){this.start=R,this.end={line:A,column:z},this.source=C.source}_.prototype.content=v;function j(R){var D=new Error(C.source+":"+A+":"+z+": "+R);if(D.reason=R,D.filename=C.source,D.line=A,D.column=z,D.source=v,!C.silent)throw D}function y(R){var D=R.exec(v);if(D){var J=D[0];return w(J),v=v.slice(J.length),D}}function P(){y(i)}function L(R){var D;for(R=R||[];D=$();)D!==!1&&R.push(D);return R}function $(){var R=B();if(!(s!=v.charAt(0)||h!=v.charAt(1))){for(var D=2;p!=v.charAt(D)&&(h!=v.charAt(D)||s!=v.charAt(D+1));)++D;if(D+=2,p===v.charAt(D-1))return j("End of comment missing");var J=v.slice(2,D-2);return z+=2,w(J),v=v.slice(D),z+=2,R({type:x,comment:J})}}function X(){var R=B(),D=y(l);if(D){if($(),!y(o))return j("property missing ':'");var J=y(a),ue=R({type:k,property:d(D[0].replace(t,p)),value:J?d(J[0].replace(t,p)):p});return y(u),ue}}function q(){var R=[];L(R);for(var D;D=X();)D!==!1&&(R.push(D),L(R));return R}return P(),q()}function d(v){return v?v.replace(c,p):p}n.exports=S})),Ii=fe.__commonJSMin((e=>{var n=e&&e.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var t=n(Ei());function r(i,l){let o=null;if(!i||typeof i!="string")return o;const a=(0,t.default)(i),u=typeof l=="function";return a.forEach(c=>{if(c.type!=="declaration")return;const{property:f,value:s}=c;u?l(f,s,c):s&&(o=o||{},o[f]=s)}),o}})),Ai=fe.__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,o=function(f){return!f||r.test(f)||n.test(f)},a=function(f,s){return s.toUpperCase()},u=function(f,s){return"".concat(s,"-")},c=function(f,s){return s===void 0&&(s={}),o(f)?f:(f=f.toLowerCase(),s.reactCompat?f=f.replace(l,u):f=f.replace(i,u),f.replace(t,a))};e.camelCase=c})),Ti=fe.__commonJSMin(((e,n)=>{var t=(e&&e.__importDefault||function(l){return l&&l.__esModule?l:{default:l}})(Ii()),r=Ai();function i(l,o){var a={};return!l||typeof l!="string"||(0,t.default)(l,function(u,c){u&&c&&(a[(0,r.camelCase)(u,o)]=c)}),a}i.default=i,n.exports=i})),Jn=Kn("end"),jt=Kn("start");function Kn(e){return n;function n(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Pi(e){const n=jt(e),t=Jn(e);if(n&&t)return{start:n,end:t}}function Ue(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?un(e.position):"start"in e||"end"in e?un(e):"line"in e||"column"in e?Tt(e):""}function Tt(e){return sn(e&&e.line)+":"+sn(e&&e.column)}function un(e){return Tt(e&&e.start)+"-"+Tt(e&&e.end)}function sn(e){return e&&typeof e=="number"?e:1}var ee=class extends Error{constructor(e,n,t){super(),typeof n=="string"&&(t=n,n=void 0);let r="",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 e=="string"?r=e:!i.cause&&e&&(l=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof t=="string"){const a=t.indexOf(":");a===-1?i.ruleId=t:(i.source=t.slice(0,a),i.ruleId=t.slice(a+1))}if(!i.place&&i.ancestors&&i.ancestors){const a=i.ancestors[i.ancestors.length-1];a&&(i.place=a.position)}const o=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=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=o?o.line:void 0,this.name=Ue(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}};ee.prototype.file="";ee.prototype.name="";ee.prototype.reason="";ee.prototype.message="";ee.prototype.stack="";ee.prototype.column=void 0;ee.prototype.line=void 0;ee.prototype.ancestors=void 0;ee.prototype.cause=void 0;ee.prototype.fatal=void 0;ee.prototype.place=void 0;ee.prototype.ruleId=void 0;ee.prototype.source=void 0;var Li=fe.__toESM(Ti(),1),Ht={}.hasOwnProperty,zi=new Map,Di=/[A-Z]/g,Fi=new Set(["table","tbody","thead","tfoot","tr"]),Mi=new Set(["td","th"]),Gn="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function _i(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Ui(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=qi(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Bt:Ci,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},l=Zn(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function Zn(e,n,t){if(n.type==="element")return Ri(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Oi(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Bi(e,n,t);if(n.type==="mdxjsEsm")return Ni(e,n);if(n.type==="root")return ji(e,n,t);if(n.type==="text")return Hi(e,n)}function Ri(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Bt,e.schema=i),e.ancestors.push(n);const l=tr(e,n.tagName,!1),o=$i(e,n);let a=Ut(e,n);return Fi.has(n.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!hi(u):!0})),er(e,o,l,n),qt(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function Oi(e,n){if(n.data&&n.data.estree&&e.evaluater){const t=n.data.estree.body[0];return t.type,e.evaluater.evaluateExpression(t.expression)}Ve(e,n.position)}function Ni(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Ve(e,n.position)}function Bi(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=Bt,e.schema=i),e.ancestors.push(n);const l=n.name===null?e.Fragment:tr(e,n.name,!0),o=Vi(e,n),a=Ut(e,n);return er(e,o,l,n),qt(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function ji(e,n,t){const r={};return qt(r,Ut(e,n)),e.create(n,e.Fragment,r,t)}function Hi(e,n){return n.value}function er(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function qt(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function qi(e,n,t){return r;function r(i,l,o,a){const u=Array.isArray(o.children)?t:n;return a?u(l,o,a):u(l,o)}}function Ui(e,n){return t;function t(r,i,l,o){const a=Array.isArray(l.children),u=jt(r);return n(i,l,o,a,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function $i(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&Ht.call(n.properties,i)){const l=Wi(e,i,n.properties[i]);if(l){const[o,a]=l;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&Mi.has(n.tagName)?r=a:t[o]=a}}if(r){const l=t.style||(t.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function Vi(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const l=i.expression;l.type;const o=l.properties[0];o.type,Object.assign(t,e.evaluater.evaluateExpression(o.argument))}else Ve(e,n.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,l=e.evaluater.evaluateExpression(o.expression)}else Ve(e,n.position);else l=r.value===null?!0:r.value;t[i]=l}return t}function Ut(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:zi;for(;++r<n.children.length;){const l=n.children[r];let o;if(e.passKeys){const u=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(u){const c=i.get(u)||0;o=u+"-"+c,i.set(u,c+1)}}const a=Zn(e,l,o);a!==void 0&&t.push(a)}return t}function Wi(e,n,t){const r=bi(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?ui(t):Si(t)),r.property==="style"){let i=typeof t=="object"?t:Xi(e,String(t));return e.stylePropertyNameCase==="css"&&(i=Yi(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?xi[r.property]||r.property:r.attribute,t]}}function Xi(e,n){try{return(0,Li.default)(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,i=new ee("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Gn+"#cannot-parse-style-attribute",i}}function tr(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let l=-1,o;for(;++l<i.length;){const a=rn(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};o=o?{type:"MemberExpression",object:o,property:a,computed:!!(l&&a.type==="Literal"),optional:!1}:a}r=o}else r=rn(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return Ht.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ve(e)}function Ve(e,n){const t=new ee("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=Gn+"#cannot-handle-mdx-estrees-without-createevaluater",t}function Yi(e){const n={};let t;for(t in e)Ht.call(e,t)&&(n[Qi(t)]=e[t]);return n}function Qi(e){let n=e.replace(Di,Ji);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function Ji(e){return"-"+e.toLowerCase()}var 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"]},Ki={};function $t(e,n){const t=n||Ki;return nr(e,typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,typeof t.includeHtml=="boolean"?t.includeHtml:!0)}function nr(e,n,t){if(Gi(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return cn(e.children,n,t)}return Array.isArray(e)?cn(e,n,t):""}function cn(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=nr(e[i],n,t);return r.join("")}function Gi(e){return!!(e&&typeof e=="object")}var fn=document.createElement("i");function Vt(e){const n="&"+e+";";fn.innerHTML=n;const t=fn.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function oe(e,n,t,r){const i=e.length;let l=0,o;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);l<r.length;)o=r.slice(l,l+1e4),o.unshift(n,0),e.splice(...o),l+=1e4,n+=1e4}function ae(e,n){return e.length>0?(oe(e,e.length,0,n),e):n}var pn={}.hasOwnProperty;function rr(e){const n={};let t=-1;for(;++t<e.length;)Zi(n,e[t]);return n}function Zi(e,n){let t;for(t in n){const r=(pn.call(e,t)?e[t]:void 0)||(e[t]={}),i=n[t];let l;if(i)for(l in i){pn.call(r,l)||(r[l]=[]);const o=i[l];el(r[l],Array.isArray(o)?o:o?[o]:[])}}}function el(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);oe(e,0,0,r)}function ir(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function se(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var te=ve(/[A-Za-z]/),Z=ve(/[\dA-Za-z]/),tl=ve(/[#-'*+\--9=?A-Z^-~]/);function rt(e){return e!==null&&(e<32||e===127)}var Pt=ve(/\d/),nl=ve(/[\dA-Fa-f]/),rl=ve(/[!-/:-@[-`{-~]/);function F(e){return e!==null&&e<-2}function V(e){return e!==null&&(e<0||e===32)}function H(e){return e===-2||e===-1||e===32}var ot=ve(new RegExp("\\p{P}|\\p{S}","u")),Ee=ve(/\s/);function ve(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Oe(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const l=e.charCodeAt(t);let o="";if(l===37&&Z(e.charCodeAt(t+1))&&Z(e.charCodeAt(t+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){const a=e.charCodeAt(t+1);l<56320&&a>56319&&a<57344?(o=String.fromCharCode(l,a),i=1):o="�"}else o=String.fromCharCode(l);o&&(n.push(e.slice(r,t),encodeURIComponent(o)),r=t+i+1,o=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function U(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(u){return H(u)?(e.enter(t),a(u)):n(u)}function a(u){return H(u)&&l++<i?(e.consume(u),a):(e.exit(t),n(u))}}var il={tokenize:ll};function ll(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),U(e,n,"linePrefix")}function i(a){return e.enter("paragraph"),l(a)}function l(a){const u=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=u),t=u,o(a)}function o(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return F(a)?(e.consume(a),e.exit("chunkText"),l):(e.consume(a),o)}}var ol={tokenize:al},hn={tokenize:ul};function al(e){const n=this,t=[];let r=0,i,l,o;return a;function a(C){if(r<t.length){const A=t[r];return n.containerState=A[1],e.attempt(A[0].continuation,u,c)(C)}return c(C)}function u(C){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&v();const A=n.events.length;let z=A,w;for(;z--;)if(n.events[z][0]==="exit"&&n.events[z][1].type==="chunkFlow"){w=n.events[z][1].end;break}d(r);let B=A;for(;B<n.events.length;)n.events[B][1].end={...w},B++;return oe(n.events,z+1,0,n.events.slice(A)),n.events.length=B,c(C)}return a(C)}function c(C){if(r===t.length){if(!i)return h(C);if(i.currentConstruct&&i.currentConstruct.concrete)return x(C);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(hn,f,s)(C)}function f(C){return i&&v(),d(r),h(C)}function s(C){return n.parser.lazy[n.now().line]=r!==t.length,o=n.now().offset,x(C)}function h(C){return n.containerState={},e.attempt(hn,p,x)(C)}function p(C){return r++,t.push([n.currentConstruct,n.containerState]),h(C)}function x(C){if(C===null){i&&v(),d(0),e.consume(C);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),k(C)}function k(C){if(C===null){S(e.exit("chunkFlow"),!0),d(0),e.consume(C);return}return F(C)?(e.consume(C),S(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(C),k)}function S(C,A){const z=n.sliceStream(C);if(A&&z.push(null),C.previous=l,l&&(l.next=C),l=C,i.defineSkip(C.start),i.write(z),n.parser.lazy[C.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<o&&(!i.events[w][1].end||i.events[w][1].end.offset>o))return;const B=n.events.length;let _=B,j,y;for(;_--;)if(n.events[_][0]==="exit"&&n.events[_][1].type==="chunkFlow"){if(j){y=n.events[_][1].end;break}j=!0}for(d(r),w=B;w<n.events.length;)n.events[w][1].end={...y},w++;oe(n.events,_+1,0,n.events.slice(B)),n.events.length=w}}function d(C){let A=t.length;for(;A-- >C;){const z=t[A];n.containerState=z[1],z[0].exit.call(n,e)}t.length=C}function v(){i.write([null]),l=void 0,i=void 0,n.containerState._closeFlow=void 0}}function ul(e,n,t){return U(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function _e(e){if(e===null||V(e)||Ee(e))return 1;if(ot(e))return 2}function at(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(n=l(n,t),r.push(l))}return n}var Lt={name:"attention",resolveAll:sl,tokenize:cl};function sl(e,n){let t=-1,r,i,l,o,a,u,c,f;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const s={...e[r][1].end},h={...e[t][1].start};mn(s,-u),mn(h,u),o={type:u>1?"strongSequence":"emphasisSequence",start:s,end:{...e[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:h},l={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:u>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[t][1].start={...a.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=ae(c,[["enter",e[r][1],n],["exit",e[r][1],n]])),c=ae(c,[["enter",i,n],["enter",o,n],["exit",o,n],["enter",l,n]]),c=ae(c,at(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),c=ae(c,[["exit",l,n],["enter",a,n],["exit",a,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(f=2,c=ae(c,[["enter",e[t][1],n],["exit",e[t][1],n]])):f=0,oe(e,r-1,t-r+3,c),t=r+c.length-f-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function cl(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=_e(r);let l;return o;function o(u){return l=u,e.enter("attentionSequence"),a(u)}function a(u){if(u===l)return e.consume(u),a;const c=e.exit("attentionSequence"),f=_e(u),s=!f||f===2&&i||t.includes(u),h=!i||i===2&&f||t.includes(r);return c._open=!!(l===42?s:s&&(i||!h)),c._close=!!(l===42?h:h&&(f||!s)),n(u)}}function mn(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}var fl={name:"autolink",tokenize:pl};function pl(e,n,t){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(p){return te(p)?(e.consume(p),o):p===64?t(p):c(p)}function o(p){return p===43||p===45||p===46||Z(p)?(r=1,a(p)):c(p)}function a(p){return p===58?(e.consume(p),r=0,u):(p===43||p===45||p===46||Z(p))&&r++<32?(e.consume(p),a):(r=0,c(p))}function u(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),n):p===null||p===32||p===60||rt(p)?t(p):(e.consume(p),u)}function c(p){return p===64?(e.consume(p),f):tl(p)?(e.consume(p),c):t(p)}function f(p){return Z(p)?s(p):t(p)}function s(p){return p===46?(e.consume(p),r=0,f):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),n):h(p)}function h(p){if((p===45||Z(p))&&r++<63){const x=p===45?h:s;return e.consume(p),x}return t(p)}}var Je={partial:!0,tokenize:hl};function hl(e,n,t){return r;function r(l){return H(l)?U(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||F(l)?n(l):t(l)}}var lr={continuation:{tokenize:gl},exit:dl,name:"blockQuote",tokenize:ml};function ml(e,n,t){const r=this;return i;function i(o){if(o===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),l}return t(o)}function l(o){return H(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(o))}}function gl(e,n,t){const r=this;return i;function i(o){return H(o)?U(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return e.attempt(lr,n,t)(o)}}function dl(e){e.exit("blockQuote")}var or={name:"characterEscape",tokenize:xl};function xl(e,n,t){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return rl(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(l)}}var ar={name:"characterReference",tokenize:yl};function yl(e,n,t){const r=this;let i=0,l,o;return a;function a(s){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),u}function u(s){return s===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(s),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),l=31,o=Z,f(s))}function c(s){return s===88||s===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(s),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=nl,f):(e.enter("characterReferenceValue"),l=7,o=Pt,f(s))}function f(s){if(s===59&&i){const h=e.exit("characterReferenceValue");return o===Z&&!Vt(r.sliceSerialize(h))?t(s):(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return o(s)&&i++<l?(e.consume(s),f):t(s)}}var gn={partial:!0,tokenize:bl},dn={concrete:!0,name:"codeFenced",tokenize:kl};function kl(e,n,t){const r=this,i={partial:!0,tokenize:z};let l=0,o=0,a;return u;function u(w){return c(w)}function c(w){const B=r.events[r.events.length-1];return l=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,a=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(w)}function f(w){return w===a?(o++,e.consume(w),f):o<3?t(w):(e.exit("codeFencedFenceSequence"),H(w)?U(e,s,"whitespace")(w):s(w))}function s(w){return w===null||F(w)?(e.exit("codeFencedFence"),r.interrupt?n(w):e.check(gn,k,A)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(w))}function h(w){return w===null||F(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),s(w)):H(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),U(e,p,"whitespace")(w)):w===96&&w===a?t(w):(e.consume(w),h)}function p(w){return w===null||F(w)?s(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(w))}function x(w){return w===null||F(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),s(w)):w===96&&w===a?t(w):(e.consume(w),x)}function k(w){return e.attempt(i,A,S)(w)}function S(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),d}function d(w){return l>0&&H(w)?U(e,v,"linePrefix",l+1)(w):v(w)}function v(w){return w===null||F(w)?e.check(gn,k,A)(w):(e.enter("codeFlowValue"),C(w))}function C(w){return w===null||F(w)?(e.exit("codeFlowValue"),v(w)):(e.consume(w),C)}function A(w){return e.exit("codeFenced"),n(w)}function z(w,B,_){let j=0;return y;function y(q){return w.enter("lineEnding"),w.consume(q),w.exit("lineEnding"),P}function P(q){return w.enter("codeFencedFence"),H(q)?U(w,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):L(q)}function L(q){return q===a?(w.enter("codeFencedFenceSequence"),$(q)):_(q)}function $(q){return q===a?(j++,w.consume(q),$):j>=o?(w.exit("codeFencedFenceSequence"),H(q)?U(w,X,"whitespace")(q):X(q)):_(q)}function X(q){return q===null||F(q)?(w.exit("codeFencedFence"),B(q)):_(q)}}}function bl(e,n,t){const r=this;return i;function i(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}var pt={name:"codeIndented",tokenize:vl},wl={partial:!0,tokenize:Cl};function vl(e,n,t){const r=this;return i;function i(c){return e.enter("codeIndented"),U(e,l,"linePrefix",5)(c)}function l(c){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?o(c):t(c)}function o(c){return c===null?u(c):F(c)?e.attempt(wl,o,u)(c):(e.enter("codeFlowValue"),a(c))}function a(c){return c===null||F(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),a)}function u(c){return e.exit("codeIndented"),n(c)}}function Cl(e,n,t){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?t(o):F(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):U(e,l,"linePrefix",5)(o)}function l(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(o):F(o)?i(o):t(o)}}var Sl={name:"codeText",previous:Il,resolve:El,tokenize:Al};function El(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),n-=r-i-2,r=i+2),i=void 0);return e}function Il(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Al(e,n,t){let r=0,i,l;return o;function o(s){return e.enter("codeText"),e.enter("codeTextSequence"),a(s)}function a(s){return s===96?(e.consume(s),r++,a):(e.exit("codeTextSequence"),u(s))}function u(s){return s===null?t(s):s===32?(e.enter("space"),e.consume(s),e.exit("space"),u):s===96?(l=e.enter("codeTextSequence"),i=0,f(s)):F(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(s))}function c(s){return s===null||s===32||s===96||F(s)?(e.exit("codeTextData"),u(s)):(e.consume(s),c)}function f(s){return s===96?(e.consume(s),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(s)):(l.type="codeTextData",c(s))}}var Tl=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){const t=n??Number.POSITIVE_INFINITY;return t<this.left.length?this.left.slice(e,t):e>this.left.length?this.right.slice(this.right.length-t+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-t+this.left.length).reverse())}splice(e,n,t){const r=n||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return t&&He(this.left,t),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),He(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),He(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const n=this.left.splice(e,Number.POSITIVE_INFINITY);He(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);He(this.left,n.reverse())}}};function He(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function ur(e){const n={};let t=-1,r,i,l,o,a,u,c;const f=new Tl(e);for(;++t<f.length;){for(;t in n;)t=n[t];if(r=f.get(t),t&&r[1].type==="chunkFlow"&&f.get(t-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,l=0,l<u.length&&u[l][1].type==="lineEndingBlank"&&(l+=2),l<u.length&&u[l][1].type==="content"))for(;++l<u.length&&u[l][1].type!=="content";)u[l][1].type==="chunkText"&&(u[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,Pl(f,t)),t=n[t],c=!0);else if(r[1]._container){for(l=t,i=void 0;l--;)if(o=f.get(l),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=l);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,t),a.unshift(r),f.splice(i,t-i+1,a))}}return oe(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!c}function Pl(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const l=[];let o=t._tokenizer;o||(o=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const a=o.events,u=[],c={};let f,s,h=-1,p=t,x=0,k=0;const S=[k];for(;p;){for(;e.get(++i)[1]!==p;);l.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),s&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(f),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),s=p,p=p.next}for(p=t;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(k=h+1,S.push(k),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):S.pop(),h=S.length;h--;){const d=a.slice(S[h],S[h+1]),v=l.pop();u.push([v,v+d.length-1]),e.splice(v,2,d)}for(u.reverse(),h=-1;++h<u.length;)c[x+u[h][0]]=x+u[h][1],x+=u[h][1]-u[h][0]-1;return c}var Ll={resolve:Dl,tokenize:Fl},zl={partial:!0,tokenize:Ml};function Dl(e){return ur(e),e}function Fl(e,n){let t;return r;function r(a){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?l(a):F(a)?e.check(zl,o,l)(a):(e.consume(a),i)}function l(a){return e.exit("chunkContent"),e.exit("content"),n(a)}function o(a){return e.consume(a),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function Ml(e,n,t){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),U(e,l,"linePrefix")}function l(o){if(o===null||F(o))return t(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(o):e.interrupt(r.parser.constructs.flow,t,n)(o)}}function sr(e,n,t,r,i,l,o,a,u){const c=u||Number.POSITIVE_INFINITY;let f=0;return s;function s(d){return d===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(d),e.exit(l),h):d===null||d===32||d===41||rt(d)?t(d):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),k(d))}function h(d){return d===62?(e.enter(l),e.consume(d),e.exit(l),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(d))}function p(d){return d===62?(e.exit("chunkString"),e.exit(a),h(d)):d===null||d===60||F(d)?t(d):(e.consume(d),d===92?x:p)}function x(d){return d===60||d===62||d===92?(e.consume(d),p):p(d)}function k(d){return!f&&(d===null||d===41||V(d))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),n(d)):f<c&&d===40?(e.consume(d),f++,k):d===41?(e.consume(d),f--,k):d===null||d===32||d===40||rt(d)?t(d):(e.consume(d),d===92?S:k)}function S(d){return d===40||d===41||d===92?(e.consume(d),k):k(d)}}function cr(e,n,t,r,i,l){const o=this;let a=0,u;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(l),f}function f(p){return a>999||p===null||p===91||p===93&&!u||p===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?t(p):p===93?(e.exit(l),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):F(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),s(p))}function s(p){return p===null||p===91||p===93||F(p)||a++>999?(e.exit("chunkString"),f(p)):(e.consume(p),u||(u=!H(p)),p===92?h:s)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,s):s(p)}}function fr(e,n,t,r,i,l){let o;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),o=h===40?41:h,u):t(h)}function u(h){return h===o?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),n):(e.enter(l),c(h))}function c(h){return h===o?(e.exit(l),u(o)):h===null?t(h):F(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),U(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===o||h===null||F(h)?(e.exit("chunkString"),c(h)):(e.consume(h),h===92?s:f)}function s(h){return h===o||h===92?(e.consume(h),f):f(h)}}function $e(e,n){let t;return r;function r(i){return F(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):H(i)?U(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}var _l={name:"definition",tokenize:Ol},Rl={partial:!0,tokenize:Nl};function Ol(e,n,t){const r=this;let i;return l;function l(p){return e.enter("definition"),o(p)}function o(p){return cr.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=se(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):t(p)}function u(p){return V(p)?$e(e,c)(p):c(p)}function c(p){return sr(e,f,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(Rl,s,s)(p)}function s(p){return H(p)?U(e,h,"whitespace")(p):h(p)}function h(p){return p===null||F(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function Nl(e,n,t){return r;function r(a){return V(a)?$e(e,i)(a):t(a)}function i(a){return fr(e,l,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function l(a){return H(a)?U(e,o,"whitespace")(a):o(a)}function o(a){return a===null||F(a)?n(a):t(a)}}var Bl={name:"hardBreakEscape",tokenize:jl};function jl(e,n,t){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return F(l)?(e.exit("hardBreakEscape"),n(l)):t(l)}}var Hl={name:"headingAtx",resolve:ql,tokenize:Ul};function ql(e,n){let t=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},l={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},oe(e,r,t-r+1,[["enter",i,n],["enter",l,n],["exit",l,n],["exit",i,n]])),e}function Ul(e,n,t){let r=0;return i;function i(f){return e.enter("atxHeading"),l(f)}function l(f){return e.enter("atxHeadingSequence"),o(f)}function o(f){return f===35&&r++<6?(e.consume(f),o):f===null||V(f)?(e.exit("atxHeadingSequence"),a(f)):t(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),u(f)):f===null||F(f)?(e.exit("atxHeading"),n(f)):H(f)?U(e,a,"whitespace")(f):(e.enter("atxHeadingText"),c(f))}function u(f){return f===35?(e.consume(f),u):(e.exit("atxHeadingSequence"),a(f))}function c(f){return f===null||f===35||V(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),c)}}var $l=["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"],xn=["pre","script","style","textarea"],Vl={concrete:!0,name:"htmlFlow",resolveTo:Yl,tokenize:Ql},Wl={partial:!0,tokenize:Kl},Xl={partial:!0,tokenize:Jl};function Yl(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Ql(e,n,t){const r=this;let i,l,o,a,u;return c;function c(g){return f(g)}function f(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),s}function s(g){return g===33?(e.consume(g),h):g===47?(e.consume(g),l=!0,k):g===63?(e.consume(g),i=3,r.interrupt?n:m):te(g)?(e.consume(g),o=String.fromCharCode(g),S):t(g)}function h(g){return g===45?(e.consume(g),i=2,p):g===91?(e.consume(g),i=5,a=0,x):te(g)?(e.consume(g),i=4,r.interrupt?n:m):t(g)}function p(g){return g===45?(e.consume(g),r.interrupt?n:m):t(g)}function x(g){return g==="CDATA[".charCodeAt(a++)?(e.consume(g),a===6?r.interrupt?n:L:x):t(g)}function k(g){return te(g)?(e.consume(g),o=String.fromCharCode(g),S):t(g)}function S(g){if(g===null||g===47||g===62||V(g)){const ke=g===47,Ce=o.toLowerCase();return!ke&&!l&&xn.includes(Ce)?(i=1,r.interrupt?n(g):L(g)):$l.includes(o.toLowerCase())?(i=6,ke?(e.consume(g),d):r.interrupt?n(g):L(g)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(g):l?v(g):C(g))}return g===45||Z(g)?(e.consume(g),o+=String.fromCharCode(g),S):t(g)}function d(g){return g===62?(e.consume(g),r.interrupt?n:L):t(g)}function v(g){return H(g)?(e.consume(g),v):y(g)}function C(g){return g===47?(e.consume(g),y):g===58||g===95||te(g)?(e.consume(g),A):H(g)?(e.consume(g),C):y(g)}function A(g){return g===45||g===46||g===58||g===95||Z(g)?(e.consume(g),A):z(g)}function z(g){return g===61?(e.consume(g),w):H(g)?(e.consume(g),z):C(g)}function w(g){return g===null||g===60||g===61||g===62||g===96?t(g):g===34||g===39?(e.consume(g),u=g,B):H(g)?(e.consume(g),w):_(g)}function B(g){return g===u?(e.consume(g),u=null,j):g===null||F(g)?t(g):(e.consume(g),B)}function _(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||V(g)?z(g):(e.consume(g),_)}function j(g){return g===47||g===62||H(g)?C(g):t(g)}function y(g){return g===62?(e.consume(g),P):t(g)}function P(g){return g===null||F(g)?L(g):H(g)?(e.consume(g),P):t(g)}function L(g){return g===45&&i===2?(e.consume(g),R):g===60&&i===1?(e.consume(g),D):g===62&&i===4?(e.consume(g),ye):g===63&&i===3?(e.consume(g),m):g===93&&i===5?(e.consume(g),ue):F(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Wl,he,$)(g)):g===null||F(g)?(e.exit("htmlFlowData"),$(g)):(e.consume(g),L)}function $(g){return e.check(Xl,X,he)(g)}function X(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),q}function q(g){return g===null||F(g)?$(g):(e.enter("htmlFlowData"),L(g))}function R(g){return g===45?(e.consume(g),m):L(g)}function D(g){return g===47?(e.consume(g),o="",J):L(g)}function J(g){if(g===62){const ke=o.toLowerCase();return xn.includes(ke)?(e.consume(g),ye):L(g)}return te(g)&&o.length<8?(e.consume(g),o+=String.fromCharCode(g),J):L(g)}function ue(g){return g===93?(e.consume(g),m):L(g)}function m(g){return g===62?(e.consume(g),ye):g===45&&i===2?(e.consume(g),m):L(g)}function ye(g){return g===null||F(g)?(e.exit("htmlFlowData"),he(g)):(e.consume(g),ye)}function he(g){return e.exit("htmlFlow"),n(g)}}function Jl(e,n,t){const r=this;return i;function i(o){return F(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):t(o)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}function Kl(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Je,n,t)}}var Gl={name:"htmlText",tokenize:Zl};function Zl(e,n,t){const r=this;let i,l,o;return a;function a(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),u}function u(m){return m===33?(e.consume(m),c):m===47?(e.consume(m),z):m===63?(e.consume(m),C):te(m)?(e.consume(m),_):t(m)}function c(m){return m===45?(e.consume(m),f):m===91?(e.consume(m),l=0,x):te(m)?(e.consume(m),v):t(m)}function f(m){return m===45?(e.consume(m),p):t(m)}function s(m){return m===null?t(m):m===45?(e.consume(m),h):F(m)?(o=s,D(m)):(e.consume(m),s)}function h(m){return m===45?(e.consume(m),p):s(m)}function p(m){return m===62?R(m):m===45?h(m):s(m)}function x(m){return m==="CDATA[".charCodeAt(l++)?(e.consume(m),l===6?k:x):t(m)}function k(m){return m===null?t(m):m===93?(e.consume(m),S):F(m)?(o=k,D(m)):(e.consume(m),k)}function S(m){return m===93?(e.consume(m),d):k(m)}function d(m){return m===62?R(m):m===93?(e.consume(m),d):k(m)}function v(m){return m===null||m===62?R(m):F(m)?(o=v,D(m)):(e.consume(m),v)}function C(m){return m===null?t(m):m===63?(e.consume(m),A):F(m)?(o=C,D(m)):(e.consume(m),C)}function A(m){return m===62?R(m):C(m)}function z(m){return te(m)?(e.consume(m),w):t(m)}function w(m){return m===45||Z(m)?(e.consume(m),w):B(m)}function B(m){return F(m)?(o=B,D(m)):H(m)?(e.consume(m),B):R(m)}function _(m){return m===45||Z(m)?(e.consume(m),_):m===47||m===62||V(m)?j(m):t(m)}function j(m){return m===47?(e.consume(m),R):m===58||m===95||te(m)?(e.consume(m),y):F(m)?(o=j,D(m)):H(m)?(e.consume(m),j):R(m)}function y(m){return m===45||m===46||m===58||m===95||Z(m)?(e.consume(m),y):P(m)}function P(m){return m===61?(e.consume(m),L):F(m)?(o=P,D(m)):H(m)?(e.consume(m),P):j(m)}function L(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),i=m,$):F(m)?(o=L,D(m)):H(m)?(e.consume(m),L):(e.consume(m),X)}function $(m){return m===i?(e.consume(m),i=void 0,q):m===null?t(m):F(m)?(o=$,D(m)):(e.consume(m),$)}function X(m){return m===null||m===34||m===39||m===60||m===61||m===96?t(m):m===47||m===62||V(m)?j(m):(e.consume(m),X)}function q(m){return m===47||m===62||V(m)?j(m):t(m)}function R(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),n):t(m)}function D(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),J}function J(m){return H(m)?U(e,ue,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):ue(m)}function ue(m){return e.enter("htmlTextData"),o(m)}}var Wt={name:"labelEnd",resolveAll:ro,resolveTo:io,tokenize:lo},eo={tokenize:oo},to={tokenize:ao},no={tokenize:uo};function ro(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&oe(e,0,e.length,t),e}function io(e,n){let t=e.length,r=0,i,l,o,a;for(;t--;)if(i=e[t][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=t);const u={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[l][1].start},end:{...e[o][1].end}},f={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",u,n],["enter",c,n]],a=ae(a,e.slice(l+1,l+r+3)),a=ae(a,[["enter",f,n]]),a=ae(a,at(n.parser.constructs.insideSpan.null,e.slice(l+r+4,o-3),n)),a=ae(a,[["exit",f,n],e[o-2],e[o-1],["exit",c,n]]),a=ae(a,e.slice(o+1)),a=ae(a,[["exit",u,n]]),oe(e,l,e.length,a),e}function lo(e,n,t){const r=this;let i=r.events.length,l,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return a;function a(h){return l?l._inactive?s(h):(o=r.parser.defined.includes(se(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),u):t(h)}function u(h){return h===40?e.attempt(eo,f,o?f:s)(h):h===91?e.attempt(to,f,o?c:s)(h):o?f(h):s(h)}function c(h){return e.attempt(no,f,s)(h)}function f(h){return n(h)}function s(h){return l._balanced=!0,t(h)}}function oo(e,n,t){return r;function r(s){return e.enter("resource"),e.enter("resourceMarker"),e.consume(s),e.exit("resourceMarker"),i}function i(s){return V(s)?$e(e,l)(s):l(s)}function l(s){return s===41?f(s):sr(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(s)}function o(s){return V(s)?$e(e,u)(s):f(s)}function a(s){return t(s)}function u(s){return s===34||s===39||s===40?fr(e,c,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(s):f(s)}function c(s){return V(s)?$e(e,f)(s):f(s)}function f(s){return s===41?(e.enter("resourceMarker"),e.consume(s),e.exit("resourceMarker"),e.exit("resource"),n):t(s)}}function ao(e,n,t){const r=this;return i;function i(a){return cr.call(r,e,l,o,"reference","referenceMarker","referenceString")(a)}function l(a){return r.parser.defined.includes(se(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(a):t(a)}function o(a){return t(a)}}function uo(e,n,t){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),n):t(l)}}var so={name:"labelStartImage",resolveAll:Wt.resolveAll,tokenize:co};function co(e,n,t){const r=this;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"),e.exit("labelImage"),o):t(a)}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}var fo={name:"labelStartLink",resolveAll:Wt.resolveAll,tokenize:po};function po(e,n,t){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),l}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(o):n(o)}}var ht={name:"lineEnding",tokenize:ho};function ho(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),U(e,n,"linePrefix")}}var nt={name:"thematicBreak",tokenize:mo};function mo(e,n,t){let r=0,i;return l;function l(c){return e.enter("thematicBreak"),o(c)}function o(c){return i=c,a(c)}function a(c){return c===i?(e.enter("thematicBreakSequence"),u(c)):r>=3&&(c===null||F(c))?(e.exit("thematicBreak"),n(c)):t(c)}function u(c){return c===i?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),H(c)?U(e,a,"whitespace")(c):a(c))}}var ne={continuation:{tokenize:ko},exit:wo,name:"list",tokenize:yo},go={partial:!0,tokenize:vo},xo={partial:!0,tokenize:bo};function yo(e,n,t){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(p){const x=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Pt(p)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(nt,t,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return t(p)}function u(p){return Pt(p)&&++o<10?(e.consume(p),u):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):t(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Je,r.interrupt?t:f,e.attempt(go,h,s))}function f(p){return r.containerState.initialBlankLine=!0,l++,h(p)}function s(p){return H(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):t(p)}function h(p){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function ko(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Je,i,l);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,U(e,n,"listItemIndent",r.containerState.size+1)(a)}function l(a){return r.containerState.furtherBlankLines||!H(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(xo,n,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,U(e,e.attempt(ne,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function bo(e,n,t){const r=this;return U(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?n(l):t(l)}}function wo(e){e.exit(this.containerState.type)}function vo(e,n,t){const r=this;return U(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!H(l)&&o&&o[1].type==="listItemPrefixWhitespace"?n(l):t(l)}}var yn={name:"setextUnderline",resolveTo:Co,tokenize:So};function Co(e,n){let t=e.length,r,i,l;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!l&&e[t][1].type==="definition"&&(l=t);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,n]),e.splice(l+1,0,["exit",e[r][1],n]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,n]),e}function So(e,n,t){const r=this;let i;return l;function l(c){let f=r.events.length,s;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){s=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter("setextHeadingLine"),i=c,o(c)):t(c)}function o(c){return e.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===i?(e.consume(c),a):(e.exit("setextHeadingLineSequence"),H(c)?U(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||F(c)?(e.exit("setextHeadingLine"),n(c)):t(c)}}var Eo={tokenize:Io};function Io(e){const n=this,t=e.attempt(Je,r,e.attempt(this.parser.constructs.flowInitial,i,U(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Ll,i)),"linePrefix")));return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n.currentConstruct=void 0,t}}var Ao={resolveAll:hr()},To=pr("string"),Po=pr("text");function pr(e){return{resolveAll:hr(e==="text"?Lo:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],l=t.attempt(i,o,a);return o;function o(f){return c(f)?l(f):a(f)}function a(f){if(f===null){t.consume(f);return}return t.enter("data"),t.consume(f),u}function u(f){return c(f)?(t.exit("data"),l(f)):(t.consume(f),u)}function c(f){if(f===null)return!0;const s=i[f];let h=-1;if(s)for(;++h<s.length;){const p=s[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function hr(e){return n;function n(t,r){let i=-1,l;for(;++i<=t.length;)l===void 0?t[i]&&t[i][1].type==="data"&&(l=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==l+2&&(t[l][1].end=t[i-1][1].end,t.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(t,r):t}}function Lo(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],i=n.sliceStream(r);let l=i.length,o=-1,a=0,u;for(;l--;){const c=i[l];if(typeof c=="string"){for(o=c.length;c.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(c===-2)u=!0,a++;else if(c!==-1){l++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(a=0),a){const c={type:t===e.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?o:r.start._bufferIndex+o,_index:r.start._index+l,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(t,0,["enter",c,n],["exit",c,n]),t+=2)}t++}return e}var zo=fe.__exportAll({attentionMarkers:()=>Bo,contentInitial:()=>Fo,disable:()=>jo,document:()=>Do,flow:()=>_o,flowInitial:()=>Mo,insideSpan:()=>No,string:()=>Ro,text:()=>Oo}),Do={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:lr},Fo={91:_l},Mo={[-2]:pt,[-1]:pt,32:pt},_o={35:Hl,42:nt,45:[yn,nt],60:Vl,61:yn,95:nt,96:dn,126:dn},Ro={38:ar,92:or},Oo={[-5]:ht,[-4]:ht,[-3]:ht,33:so,38:ar,42:Lt,60:[fl,Gl],91:fo,92:[Bl,or],93:Wt,95:Lt,96:Sl},No={null:[Lt,Ao]},Bo={null:[42,95]},jo={null:[]};function Ho(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},l=[];let o=[],a=[];const u={attempt:B(z),check:B(w),consume:v,enter:C,exit:A,interrupt:B(w,{interrupt:!0})},c={code:null,containerState:{},defineSkip:k,events:[],now:x,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:s};let f=n.tokenize.call(c,u);return n.resolveAll&&l.push(n),c;function s(P){return o=ae(o,P),S(),o[o.length-1]!==null?[]:(_(n,0),c.events=at(l,c.events,c),c.events)}function h(P,L){return Uo(p(P),L)}function p(P){return qo(o,P)}function x(){const{_bufferIndex:P,_index:L,line:$,column:X,offset:q}=r;return{_bufferIndex:P,_index:L,line:$,column:X,offset:q}}function k(P){i[P.line]=P.column,y()}function S(){let P;for(;r._index<o.length;){const L=o[r._index];if(typeof L=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<L.length;)d(L.charCodeAt(r._bufferIndex));else d(L)}}function d(P){f=f(P)}function v(P){F(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,y()):P!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=P}function C(P,L){const $=L||{};return $.type=P,$.start=x(),c.events.push(["enter",$,c]),a.push($),$}function A(P){const L=a.pop();return L.end=x(),c.events.push(["exit",L,c]),L}function z(P,L){_(P,L.from)}function w(P,L){L.restore()}function B(P,L){return $;function $(X,q,R){let D,J,ue,m;return Array.isArray(X)?he(X):"tokenize"in X?he([X]):ye(X);function ye(G){return Ne;function Ne(me){const Ae=me!==null&&G[me],Te=me!==null&&G.null;return he([...Array.isArray(Ae)?Ae:Ae?[Ae]:[],...Array.isArray(Te)?Te:Te?[Te]:[]])(me)}}function he(G){return D=G,J=0,G.length===0?R:g(G[J])}function g(G){return Ne;function Ne(me){return m=j(),ue=G,G.partial||(c.currentConstruct=G),G.name&&c.parser.constructs.disable.null.includes(G.name)?Ce(me):G.tokenize.call(L?Object.assign(Object.create(c),L):c,u,ke,Ce)(me)}}function ke(G){return P(ue,m),q}function Ce(G){return m.restore(),++J<D.length?g(D[J]):R}}}function _(P,L){P.resolveAll&&!l.includes(P)&&l.push(P),P.resolve&&oe(c.events,L,c.events.length-L,P.resolve(c.events.slice(L),c)),P.resolveTo&&(c.events=P.resolveTo(c.events,c))}function j(){const P=x(),L=c.previous,$=c.currentConstruct,X=c.events.length,q=Array.from(a);return{from:X,restore:R};function R(){r=P,c.previous=L,c.currentConstruct=$,c.events.length=X,a=q,y()}}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function qo(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,l=n.end._bufferIndex;let o;if(t===i)o=[e[t].slice(r,l)];else{if(o=e.slice(t,i),r>-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function Uo(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const l=e[t];let o;if(typeof l=="string")o=l;else switch(l){case-5:o="\r";break;case-4:o=`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const fe=require("./rolldown-runtime-CaekUdDJ.cjs"),li=require("./AgoClient-D4EL6nva.cjs"),Ve=require("./createFormCollector-BMTdfhHg.cjs"),oi=require("./createMockClient-zHQ0cjUH.cjs");let F=require("react");F=fe.__toESM(F,1);let T=require("react/jsx-runtime");function qn(e){const[n,t]=(0,F.useState)(!1),r=(0,F.useRef)(null),i=(0,F.useMemo)(()=>{r.current&&r.current.destroy();const l=new li.AgoClient(e);return r.current=l,l},[e.baseUrl,e.widgetId]);return(0,F.useEffect)(()=>(t(!0),()=>{r.current?.destroy(),r.current=null}),[i]),(0,F.useEffect)(()=>{r.current&&r.current.updateConfig({agent:e.agent,defaultAgentId:e.defaultAgentId,permission:e.permission,userEmail:e.userEmail,userJwt:e.userJwt,debug:e.debug})},[e.agent,e.defaultAgentId,e.permission,e.userEmail,e.userJwt,e.debug]),{client:i,isReady:n}}var Rt=(0,F.createContext)(null),ai=({children:e,client:n,tools:t,helpers:r,pageContext:i,...l})=>{const{client:o}=qn(n?{baseUrl:""}:l),a=n||o;return(0,F.useEffect)(()=>{if(!(!t||t.length===0)){for(const u of t)a.register(u);return()=>{for(const u of t)a.unregisterFunction(u.name)}}},[a,t]),(0,F.useEffect)(()=>{if(!r)return;const u=[];return Promise.resolve().then(()=>require("./functions-DsmzgHjC.cjs")).then(c=>c.functions_exports).then(c=>{for(const[f,s]of Object.entries(r)){const h=c[f];if(!h){console.warn(`[AGO] Unknown helper: "${f}"`);continue}const p=s===!0?h:{...h,handler:s};a.register(p),u.push(p.name)}}),()=>{for(const c of u)a.unregisterFunction(c)}},[a,r]),(0,F.useEffect)(()=>{i==="auto"&&a.enableAutoPageContext()},[a,i]),(0,T.jsx)(Rt.Provider,{value:a,children:e})};function Ye(){const e=(0,F.useContext)(Rt);if(!e)throw new Error('useAgoClient must be used within an <AgoProvider>. Wrap your component tree with <AgoProvider baseUrl="...">.');return e}function Qe(){return(0,F.useContext)(Rt)}function Ot({client:e,conversationId:n}={}){const t=Qe(),r=e||t;if(!r)throw new Error("useMessages requires an AgoClient. Either pass it as options.client or wrap your app in <AgoProvider>.");const[i,l]=(0,F.useState)([]),[o,a]=(0,F.useState)(n),[u,c]=(0,F.useState)(!1),[f,s]=(0,F.useState)(null);(0,F.useEffect)(()=>{n&&n!==o&&(a(n),h(n))},[n]);const h=async p=>{try{l(await r.getMessages(p))}catch(x){s(x instanceof Error?x:new Error("Failed to load messages"))}};return(0,F.useEffect)(()=>{const p=d=>{o||a(d.conversationId)},x=d=>{l(v=>{const C=v[v.length-1];return C&&C.id===d.messageId?[...v.slice(0,-1),{...C,content:C.content+d.content}]:v})},k=d=>{l(v=>{const C=v.findIndex(A=>A.id===d.id);return C>=0?[...v.slice(0,C),d,...v.slice(C+1)]:[...v,d]}),c(!1)},S=d=>{s(new Error(d.error)),c(!1)};return r.on("message:start",p),r.on("message:chunk",x),r.on("message:complete",k),r.on("message:error",S),()=>{r.off("message:start",p),r.off("message:chunk",x),r.off("message:complete",k),r.off("message:error",S)}},[r,o]),{messages:i,isLoading:u,error:f,sendMessage:(0,F.useCallback)(async(p,x)=>{c(!0),s(null);const k={id:`temp-${Date.now()}`,conversationId:o||"",content:p,role:"user",status:"DONE",createdAt:new Date},S={id:`temp-assistant-${Date.now()}`,conversationId:o||"",content:"",role:"assistant",status:"IN_PROGRESS",createdAt:new Date};l(d=>[...d,k,S]);try{const d=await r.sendMessage(p,{conversationId:o,files:x});return d.conversationId&&!o&&a(d.conversationId),l(v=>{const C=v.filter(z=>!z.id.startsWith("temp-")),A={...k,id:k.id.replace("temp-","user-"),conversationId:d.conversationId};return C.some(z=>z.id===d.id)?[...C,A].sort((z,w)=>new Date(z.createdAt).getTime()-new Date(w.createdAt).getTime()):[...C,A,d]}),d}catch(d){return s(d instanceof Error?d:new Error("Failed to send message")),c(!1),l(v=>v.filter(C=>!C.id.startsWith("temp-"))),null}},[r,o]),clearMessages:(0,F.useCallback)(()=>{l([]),a(void 0),s(null)},[]),conversationId:o}}var Un=({onSend:e,disabled:n=!1,placeholder:t="Type a message...",allowFiles:r=!1,className:i=""})=>{const[l,o]=(0,F.useState)(""),[a,u]=(0,F.useState)([]),c=(0,F.useRef)(null),f=(0,F.useCallback)(k=>{k.preventDefault(),(l.trim()||a.length>0)&&(e(l.trim(),a.length>0?a:void 0),o(""),u([]))},[l,a,e]),s=(0,F.useCallback)(k=>{k.key==="Enter"&&!k.shiftKey&&(k.preventDefault(),f(k))},[f]),h=(0,F.useCallback)(k=>{const S=Array.from(k.target.files||[]);u(d=>[...d,...S])},[]),p=(0,F.useCallback)(k=>{u(S=>S.filter((d,v)=>v!==k))},[]),x=l.trim()||a.length>0;return(0,T.jsxs)("form",{onSubmit:f,className:`ago-chat-input ${i}`,style:{display:"flex",flexDirection:"column",gap:"8px",padding:"12px 16px",borderTop:"1px solid #dee3e8",backgroundColor:"#fff"},children:[a.length>0&&(0,T.jsx)("div",{className:"ago-chat-input__files",style:{display:"flex",flexWrap:"wrap",gap:"6px"},children:a.map((k,S)=>(0,T.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"6px",padding:"4px 10px",backgroundColor:"#f0f2f5",borderRadius:"6px",fontSize:"12px",color:"#30373e"},children:[(0,T.jsx)("span",{style:{maxWidth:"120px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:k.name}),(0,T.jsx)("button",{type:"button",onClick:()=>p(S),style:{border:"none",background:"none",cursor:"pointer",padding:"0",color:"#6b6d6f",fontSize:"14px",lineHeight:1},children:"×"})]},S))}),(0,T.jsxs)("div",{style:{display:"flex",gap:"8px",alignItems:"flex-end"},children:[r&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("button",{type:"button",onClick:()=>c.current?.click(),disabled:n,style:{padding:"8px",border:"1px solid #dee3e8",borderRadius:"8px",backgroundColor:"#fff",cursor:n?"not-allowed":"pointer",color:"#6b6d6f",fontSize:"16px",lineHeight:1},children:"+"}),(0,T.jsx)("input",{ref:c,type:"file",multiple:!0,onChange:h,style:{display:"none"}})]}),(0,T.jsx)("textarea",{value:l,onChange:k=>o(k.target.value),onKeyDown:s,placeholder:t,disabled:n,rows:1,style:{flex:1,padding:"10px 14px",border:"1px solid #dee3e8",borderRadius:"20px",resize:"none",outline:"none",fontFamily:"inherit",fontSize:"14px",color:"#30373e",backgroundColor:"#f8f8f8",transition:"border-color 0.15s"},onFocus:k=>{k.currentTarget.style.borderColor="#1b5fc4"},onBlur:k=>{k.currentTarget.style.borderColor="#dee3e8"}}),(0,T.jsx)("button",{type:"submit",disabled:n||!x,style:{padding:"10px 18px",border:"none",borderRadius:"20px",backgroundColor:n||!x?"#b5bfc8":"#03182f",color:"#fff",cursor:n||!x?"not-allowed":"pointer",fontWeight:500,fontSize:"14px",transition:"background-color 0.15s"},children:"Send"})]})]})};function ui(e,n){const t=n||{};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}var si=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ci=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fi={};function rn(e,n){return((n||fi).jsx?ci:si).test(e)}var pi=/[ \t\n\f\r]/g;function hi(e){return typeof e=="object"?e.type==="text"?ln(e.value):!1:ln(e)}function ln(e){return e.replace(pi,"")===""}var Je=class{constructor(e,n,t){this.normal=n,this.property=e,t&&(this.space=t)}};Je.prototype.normal={};Je.prototype.property={};Je.prototype.space=void 0;function $n(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new Je(t,r,n)}function It(e){return e.toLowerCase()}var re=class{constructor(e,n){this.attribute=n,this.property=e}};re.prototype.attribute="";re.prototype.booleanish=!1;re.prototype.boolean=!1;re.prototype.commaOrSpaceSeparated=!1;re.prototype.commaSeparated=!1;re.prototype.defined=!1;re.prototype.mustUseProperty=!1;re.prototype.number=!1;re.prototype.overloadedBoolean=!1;re.prototype.property="";re.prototype.spaceSeparated=!1;re.prototype.space=void 0;var At=fe.__exportAll({boolean:()=>N,booleanish:()=>K,commaOrSpaceSeparated:()=>le,commaSeparated:()=>Me,number:()=>E,overloadedBoolean:()=>Tt,spaceSeparated:()=>W}),mi=0,N=Ie(),K=Ie(),Tt=Ie(),E=Ie(),W=Ie(),Me=Ie(),le=Ie();function Ie(){return 2**++mi}var ft=Object.keys(At),Nt=class extends re{constructor(e,n,t,r){let i=-1;if(super(e,n),on(this,"space",r),typeof t=="number")for(;++i<ft.length;){const l=ft[i];on(this,ft[i],(t&At[l])===At[l])}}};Nt.prototype.defined=!0;function on(e,n,t){t&&(e[n]=t)}function Re(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const l=new Nt(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),n[r]=l,t[It(r)]=r,t[It(l.attribute)]=r}return new Je(n,t,e.space)}var Vn=Re({properties:{ariaActiveDescendant:null,ariaAtomic:K,ariaAutoComplete:null,ariaBusy:K,ariaChecked:K,ariaColCount:E,ariaColIndex:E,ariaColSpan:E,ariaControls:W,ariaCurrent:null,ariaDescribedBy:W,ariaDetails:null,ariaDisabled:K,ariaDropEffect:W,ariaErrorMessage:null,ariaExpanded:K,ariaFlowTo:W,ariaGrabbed:K,ariaHasPopup:null,ariaHidden:K,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:W,ariaLevel:E,ariaLive:null,ariaModal:K,ariaMultiLine:K,ariaMultiSelectable:K,ariaOrientation:null,ariaOwns:W,ariaPlaceholder:null,ariaPosInSet:E,ariaPressed:K,ariaReadOnly:K,ariaRelevant:null,ariaRequired:K,ariaRoleDescription:W,ariaRowCount:E,ariaRowIndex:E,ariaRowSpan:E,ariaSelected:K,ariaSetSize:E,ariaSort:null,ariaValueMax:E,ariaValueMin:E,ariaValueNow:E,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function Wn(e,n){return n in e?e[n]:n}function Xn(e,n){return Wn(e,n.toLowerCase())}var gi=Re({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Me,acceptCharset:W,accessKey:W,action:null,allow:null,allowFullScreen:N,allowPaymentRequest:N,allowUserMedia:N,alt:null,as:null,async:N,autoCapitalize:null,autoComplete:W,autoFocus:N,autoPlay:N,blocking:W,capture:null,charSet:null,checked:N,cite:null,className:W,cols:E,colSpan:null,content:null,contentEditable:K,controls:N,controlsList:W,coords:E|Me,crossOrigin:null,data:null,dateTime:null,decoding:null,default:N,defer:N,dir:null,dirName:null,disabled:N,download:Tt,draggable:K,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:N,formTarget:null,headers:W,height:E,hidden:Tt,high:E,href:null,hrefLang:null,htmlFor:W,httpEquiv:W,id:null,imageSizes:null,imageSrcSet:null,inert:N,inputMode:null,integrity:null,is:null,isMap:N,itemId:null,itemProp:W,itemRef:W,itemScope:N,itemType:W,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:N,low:E,manifest:null,max:null,maxLength:E,media:null,method:null,min:null,minLength:E,multiple:N,muted:N,name:null,nonce:null,noModule:N,noValidate:N,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:N,optimum:E,pattern:null,ping:W,placeholder:null,playsInline:N,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:N,referrerPolicy:null,rel:W,required:N,reversed:N,rows:E,rowSpan:E,sandbox:W,scope:null,scoped:N,seamless:N,selected:N,shadowRootClonable:N,shadowRootDelegatesFocus:N,shadowRootMode:null,shape:null,size:E,sizes:null,slot:null,span:E,spellCheck:K,src:null,srcDoc:null,srcLang:null,srcSet:null,start:E,step:null,style:null,tabIndex:E,target:null,title:null,translate:null,type:null,typeMustMatch:N,useMap:null,value:K,width:E,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:W,axis:null,background:null,bgColor:null,border:E,borderColor:null,bottomMargin:E,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:N,declare:N,event:null,face:null,frame:null,frameBorder:null,hSpace:E,leftMargin:E,link:null,longDesc:null,lowSrc:null,marginHeight:E,marginWidth:E,noResize:N,noHref:N,noShade:N,noWrap:N,object:null,profile:null,prompt:null,rev:null,rightMargin:E,rules:null,scheme:null,scrolling:K,standby:null,summary:null,text:null,topMargin:E,valueType:null,version:null,vAlign:null,vLink:null,vSpace:E,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:N,disableRemotePlayback:N,prefix:null,property:null,results:E,security:null,unselectable:null},space:"html",transform:Xn}),di=Re({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",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:le,accentHeight:E,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:E,amplitude:E,arabicForm:null,ascent:E,attributeName:null,attributeType:null,azimuth:E,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:E,by:null,calcMode:null,capHeight:E,className:W,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:E,diffuseConstant:E,direction:null,display:null,dur:null,divisor:E,dominantBaseline:null,download:N,dx:null,dy:null,edgeMode:null,editable:null,elevation:E,enableBackground:null,end:null,event:null,exponent:E,externalResourcesRequired:null,fill:null,fillOpacity:E,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:Me,g2:Me,glyphName:Me,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:E,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:E,horizOriginX:E,horizOriginY:E,id:null,ideographic:E,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:E,k:E,k1:E,k2:E,k3:E,k4:E,kernelMatrix:le,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:E,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:E,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:E,overlineThickness:E,paintOrder:null,panose1:null,path:null,pathLength:E,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:W,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:E,pointsAtY:E,pointsAtZ:E,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:le,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:le,rev:le,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:le,requiredFeatures:le,requiredFonts:le,requiredFormats:le,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:E,specularExponent:E,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:E,strikethroughThickness:E,string:null,stroke:null,strokeDashArray:le,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:E,strokeOpacity:E,strokeWidth:null,style:null,surfaceScale:E,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:le,tabIndex:E,tableValues:null,target:null,targetX:E,targetY:E,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:le,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:E,underlineThickness:E,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:E,values:null,vAlphabetic:E,vMathematical:E,vectorEffect:null,vHanging:E,vIdeographic:E,version:null,vertAdvY:E,vertOriginX:E,vertOriginY:E,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:E,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Wn}),Yn=Re({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Qn=Re({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Xn}),Jn=Re({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),xi={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"},yi=/[A-Z]/g,an=/-[a-z]/g,ki=/^data[-\w.:]+$/i;function bi(e,n){const t=It(n);let r=n,i=re;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&ki.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace(an,vi);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!an.test(l)){let o=l.replace(yi,wi);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}i=Nt}return new i(r,n)}function wi(e){return"-"+e.toLowerCase()}function vi(e){return e.charAt(1).toUpperCase()}var Ci=$n([Vn,gi,Yn,Qn,Jn],"html"),Bt=$n([Vn,di,Yn,Qn,Jn],"svg");function Si(e){return e.join(" ").trim()}var Ei=fe.__commonJSMin(((e,n)=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
2
+ `,s="/",h="*",p="",x="comment",k="declaration";function S(v,C){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];C=C||{};var A=1,z=1;function w(R){var D=R.match(r);D&&(A+=D.length);var J=R.lastIndexOf(f);z=~J?R.length-J:z+R.length}function B(){var R={line:A,column:z};return function(D){return D.position=new _(R),P(),D}}function _(R){this.start=R,this.end={line:A,column:z},this.source=C.source}_.prototype.content=v;function j(R){var D=new Error(C.source+":"+A+":"+z+": "+R);if(D.reason=R,D.filename=C.source,D.line=A,D.column=z,D.source=v,!C.silent)throw D}function y(R){var D=R.exec(v);if(D){var J=D[0];return w(J),v=v.slice(J.length),D}}function P(){y(i)}function L(R){var D;for(R=R||[];D=$();)D!==!1&&R.push(D);return R}function $(){var R=B();if(!(s!=v.charAt(0)||h!=v.charAt(1))){for(var D=2;p!=v.charAt(D)&&(h!=v.charAt(D)||s!=v.charAt(D+1));)++D;if(D+=2,p===v.charAt(D-1))return j("End of comment missing");var J=v.slice(2,D-2);return z+=2,w(J),v=v.slice(D),z+=2,R({type:x,comment:J})}}function X(){var R=B(),D=y(l);if(D){if($(),!y(o))return j("property missing ':'");var J=y(a),ue=R({type:k,property:d(D[0].replace(t,p)),value:J?d(J[0].replace(t,p)):p});return y(u),ue}}function q(){var R=[];L(R);for(var D;D=X();)D!==!1&&(R.push(D),L(R));return R}return P(),q()}function d(v){return v?v.replace(c,p):p}n.exports=S})),Ii=fe.__commonJSMin((e=>{var n=e&&e.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var t=n(Ei());function r(i,l){let o=null;if(!i||typeof i!="string")return o;const a=(0,t.default)(i),u=typeof l=="function";return a.forEach(c=>{if(c.type!=="declaration")return;const{property:f,value:s}=c;u?l(f,s,c):s&&(o=o||{},o[f]=s)}),o}})),Ai=fe.__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,o=function(f){return!f||r.test(f)||n.test(f)},a=function(f,s){return s.toUpperCase()},u=function(f,s){return"".concat(s,"-")},c=function(f,s){return s===void 0&&(s={}),o(f)?f:(f=f.toLowerCase(),s.reactCompat?f=f.replace(l,u):f=f.replace(i,u),f.replace(t,a))};e.camelCase=c})),Ti=fe.__commonJSMin(((e,n)=>{var t=(e&&e.__importDefault||function(l){return l&&l.__esModule?l:{default:l}})(Ii()),r=Ai();function i(l,o){var a={};return!l||typeof l!="string"||(0,t.default)(l,function(u,c){u&&c&&(a[(0,r.camelCase)(u,o)]=c)}),a}i.default=i,n.exports=i})),Kn=Gn("end"),jt=Gn("start");function Gn(e){return n;function n(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Pi(e){const n=jt(e),t=Kn(e);if(n&&t)return{start:n,end:t}}function Ue(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?un(e.position):"start"in e||"end"in e?un(e):"line"in e||"column"in e?Pt(e):""}function Pt(e){return sn(e&&e.line)+":"+sn(e&&e.column)}function un(e){return Pt(e&&e.start)+"-"+Pt(e&&e.end)}function sn(e){return e&&typeof e=="number"?e:1}var ee=class extends Error{constructor(e,n,t){super(),typeof n=="string"&&(t=n,n=void 0);let r="",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 e=="string"?r=e:!i.cause&&e&&(l=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof t=="string"){const a=t.indexOf(":");a===-1?i.ruleId=t:(i.source=t.slice(0,a),i.ruleId=t.slice(a+1))}if(!i.place&&i.ancestors&&i.ancestors){const a=i.ancestors[i.ancestors.length-1];a&&(i.place=a.position)}const o=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=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=o?o.line:void 0,this.name=Ue(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}};ee.prototype.file="";ee.prototype.name="";ee.prototype.reason="";ee.prototype.message="";ee.prototype.stack="";ee.prototype.column=void 0;ee.prototype.line=void 0;ee.prototype.ancestors=void 0;ee.prototype.cause=void 0;ee.prototype.fatal=void 0;ee.prototype.place=void 0;ee.prototype.ruleId=void 0;ee.prototype.source=void 0;var Li=fe.__toESM(Ti(),1),Ht={}.hasOwnProperty,zi=new Map,Di=/[A-Z]/g,Fi=new Set(["table","tbody","thead","tfoot","tr"]),Mi=new Set(["td","th"]),Zn="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function _i(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Ui(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=qi(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Bt:Ci,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},l=er(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function er(e,n,t){if(n.type==="element")return Ri(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Oi(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Bi(e,n,t);if(n.type==="mdxjsEsm")return Ni(e,n);if(n.type==="root")return ji(e,n,t);if(n.type==="text")return Hi(e,n)}function Ri(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Bt,e.schema=i),e.ancestors.push(n);const l=nr(e,n.tagName,!1),o=$i(e,n);let a=Ut(e,n);return Fi.has(n.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!hi(u):!0})),tr(e,o,l,n),qt(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function Oi(e,n){if(n.data&&n.data.estree&&e.evaluater){const t=n.data.estree.body[0];return t.type,e.evaluater.evaluateExpression(t.expression)}We(e,n.position)}function Ni(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);We(e,n.position)}function Bi(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=Bt,e.schema=i),e.ancestors.push(n);const l=n.name===null?e.Fragment:nr(e,n.name,!0),o=Vi(e,n),a=Ut(e,n);return tr(e,o,l,n),qt(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function ji(e,n,t){const r={};return qt(r,Ut(e,n)),e.create(n,e.Fragment,r,t)}function Hi(e,n){return n.value}function tr(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function qt(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function qi(e,n,t){return r;function r(i,l,o,a){const u=Array.isArray(o.children)?t:n;return a?u(l,o,a):u(l,o)}}function Ui(e,n){return t;function t(r,i,l,o){const a=Array.isArray(l.children),u=jt(r);return n(i,l,o,a,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function $i(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&Ht.call(n.properties,i)){const l=Wi(e,i,n.properties[i]);if(l){const[o,a]=l;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&Mi.has(n.tagName)?r=a:t[o]=a}}if(r){const l=t.style||(t.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function Vi(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const l=i.expression;l.type;const o=l.properties[0];o.type,Object.assign(t,e.evaluater.evaluateExpression(o.argument))}else We(e,n.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,l=e.evaluater.evaluateExpression(o.expression)}else We(e,n.position);else l=r.value===null?!0:r.value;t[i]=l}return t}function Ut(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:zi;for(;++r<n.children.length;){const l=n.children[r];let o;if(e.passKeys){const u=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(u){const c=i.get(u)||0;o=u+"-"+c,i.set(u,c+1)}}const a=er(e,l,o);a!==void 0&&t.push(a)}return t}function Wi(e,n,t){const r=bi(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?ui(t):Si(t)),r.property==="style"){let i=typeof t=="object"?t:Xi(e,String(t));return e.stylePropertyNameCase==="css"&&(i=Yi(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?xi[r.property]||r.property:r.attribute,t]}}function Xi(e,n){try{return(0,Li.default)(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,i=new ee("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Zn+"#cannot-parse-style-attribute",i}}function nr(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let l=-1,o;for(;++l<i.length;){const a=rn(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};o=o?{type:"MemberExpression",object:o,property:a,computed:!!(l&&a.type==="Literal"),optional:!1}:a}r=o}else r=rn(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return Ht.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);We(e)}function We(e,n){const t=new ee("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=Zn+"#cannot-handle-mdx-estrees-without-createevaluater",t}function Yi(e){const n={};let t;for(t in e)Ht.call(e,t)&&(n[Qi(t)]=e[t]);return n}function Qi(e){let n=e.replace(Di,Ji);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function Ji(e){return"-"+e.toLowerCase()}var pt={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"]},Ki={};function $t(e,n){const t=n||Ki;return rr(e,typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,typeof t.includeHtml=="boolean"?t.includeHtml:!0)}function rr(e,n,t){if(Gi(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return cn(e.children,n,t)}return Array.isArray(e)?cn(e,n,t):""}function cn(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=rr(e[i],n,t);return r.join("")}function Gi(e){return!!(e&&typeof e=="object")}var fn=document.createElement("i");function Vt(e){const n="&"+e+";";fn.innerHTML=n;const t=fn.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function oe(e,n,t,r){const i=e.length;let l=0,o;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);l<r.length;)o=r.slice(l,l+1e4),o.unshift(n,0),e.splice(...o),l+=1e4,n+=1e4}function ae(e,n){return e.length>0?(oe(e,e.length,0,n),e):n}var pn={}.hasOwnProperty;function ir(e){const n={};let t=-1;for(;++t<e.length;)Zi(n,e[t]);return n}function Zi(e,n){let t;for(t in n){const r=(pn.call(e,t)?e[t]:void 0)||(e[t]={}),i=n[t];let l;if(i)for(l in i){pn.call(r,l)||(r[l]=[]);const o=i[l];el(r[l],Array.isArray(o)?o:o?[o]:[])}}}function el(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);oe(e,0,0,r)}function lr(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function se(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var te=ve(/[A-Za-z]/),Z=ve(/[\dA-Za-z]/),tl=ve(/[#-'*+\--9=?A-Z^-~]/);function it(e){return e!==null&&(e<32||e===127)}var Lt=ve(/\d/),nl=ve(/[\dA-Fa-f]/),rl=ve(/[!-/:-@[-`{-~]/);function M(e){return e!==null&&e<-2}function V(e){return e!==null&&(e<0||e===32)}function H(e){return e===-2||e===-1||e===32}var at=ve(new RegExp("\\p{P}|\\p{S}","u")),Ee=ve(/\s/);function ve(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Oe(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const l=e.charCodeAt(t);let o="";if(l===37&&Z(e.charCodeAt(t+1))&&Z(e.charCodeAt(t+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){const a=e.charCodeAt(t+1);l<56320&&a>56319&&a<57344?(o=String.fromCharCode(l,a),i=1):o="�"}else o=String.fromCharCode(l);o&&(n.push(e.slice(r,t),encodeURIComponent(o)),r=t+i+1,o=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function U(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(u){return H(u)?(e.enter(t),a(u)):n(u)}function a(u){return H(u)&&l++<i?(e.consume(u),a):(e.exit(t),n(u))}}var il={tokenize:ll};function ll(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),U(e,n,"linePrefix")}function i(a){return e.enter("paragraph"),l(a)}function l(a){const u=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=u),t=u,o(a)}function o(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return M(a)?(e.consume(a),e.exit("chunkText"),l):(e.consume(a),o)}}var ol={tokenize:al},hn={tokenize:ul};function al(e){const n=this,t=[];let r=0,i,l,o;return a;function a(C){if(r<t.length){const A=t[r];return n.containerState=A[1],e.attempt(A[0].continuation,u,c)(C)}return c(C)}function u(C){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&v();const A=n.events.length;let z=A,w;for(;z--;)if(n.events[z][0]==="exit"&&n.events[z][1].type==="chunkFlow"){w=n.events[z][1].end;break}d(r);let B=A;for(;B<n.events.length;)n.events[B][1].end={...w},B++;return oe(n.events,z+1,0,n.events.slice(A)),n.events.length=B,c(C)}return a(C)}function c(C){if(r===t.length){if(!i)return h(C);if(i.currentConstruct&&i.currentConstruct.concrete)return x(C);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(hn,f,s)(C)}function f(C){return i&&v(),d(r),h(C)}function s(C){return n.parser.lazy[n.now().line]=r!==t.length,o=n.now().offset,x(C)}function h(C){return n.containerState={},e.attempt(hn,p,x)(C)}function p(C){return r++,t.push([n.currentConstruct,n.containerState]),h(C)}function x(C){if(C===null){i&&v(),d(0),e.consume(C);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),k(C)}function k(C){if(C===null){S(e.exit("chunkFlow"),!0),d(0),e.consume(C);return}return M(C)?(e.consume(C),S(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(C),k)}function S(C,A){const z=n.sliceStream(C);if(A&&z.push(null),C.previous=l,l&&(l.next=C),l=C,i.defineSkip(C.start),i.write(z),n.parser.lazy[C.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<o&&(!i.events[w][1].end||i.events[w][1].end.offset>o))return;const B=n.events.length;let _=B,j,y;for(;_--;)if(n.events[_][0]==="exit"&&n.events[_][1].type==="chunkFlow"){if(j){y=n.events[_][1].end;break}j=!0}for(d(r),w=B;w<n.events.length;)n.events[w][1].end={...y},w++;oe(n.events,_+1,0,n.events.slice(B)),n.events.length=w}}function d(C){let A=t.length;for(;A-- >C;){const z=t[A];n.containerState=z[1],z[0].exit.call(n,e)}t.length=C}function v(){i.write([null]),l=void 0,i=void 0,n.containerState._closeFlow=void 0}}function ul(e,n,t){return U(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function _e(e){if(e===null||V(e)||Ee(e))return 1;if(at(e))return 2}function ut(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(n=l(n,t),r.push(l))}return n}var zt={name:"attention",resolveAll:sl,tokenize:cl};function sl(e,n){let t=-1,r,i,l,o,a,u,c,f;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const s={...e[r][1].end},h={...e[t][1].start};mn(s,-u),mn(h,u),o={type:u>1?"strongSequence":"emphasisSequence",start:s,end:{...e[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:h},l={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:u>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[t][1].start={...a.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=ae(c,[["enter",e[r][1],n],["exit",e[r][1],n]])),c=ae(c,[["enter",i,n],["enter",o,n],["exit",o,n],["enter",l,n]]),c=ae(c,ut(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),c=ae(c,[["exit",l,n],["enter",a,n],["exit",a,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(f=2,c=ae(c,[["enter",e[t][1],n],["exit",e[t][1],n]])):f=0,oe(e,r-1,t-r+3,c),t=r+c.length-f-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function cl(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=_e(r);let l;return o;function o(u){return l=u,e.enter("attentionSequence"),a(u)}function a(u){if(u===l)return e.consume(u),a;const c=e.exit("attentionSequence"),f=_e(u),s=!f||f===2&&i||t.includes(u),h=!i||i===2&&f||t.includes(r);return c._open=!!(l===42?s:s&&(i||!h)),c._close=!!(l===42?h:h&&(f||!s)),n(u)}}function mn(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}var fl={name:"autolink",tokenize:pl};function pl(e,n,t){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(p){return te(p)?(e.consume(p),o):p===64?t(p):c(p)}function o(p){return p===43||p===45||p===46||Z(p)?(r=1,a(p)):c(p)}function a(p){return p===58?(e.consume(p),r=0,u):(p===43||p===45||p===46||Z(p))&&r++<32?(e.consume(p),a):(r=0,c(p))}function u(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),n):p===null||p===32||p===60||it(p)?t(p):(e.consume(p),u)}function c(p){return p===64?(e.consume(p),f):tl(p)?(e.consume(p),c):t(p)}function f(p){return Z(p)?s(p):t(p)}function s(p){return p===46?(e.consume(p),r=0,f):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),n):h(p)}function h(p){if((p===45||Z(p))&&r++<63){const x=p===45?h:s;return e.consume(p),x}return t(p)}}var Ke={partial:!0,tokenize:hl};function hl(e,n,t){return r;function r(l){return H(l)?U(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||M(l)?n(l):t(l)}}var or={continuation:{tokenize:gl},exit:dl,name:"blockQuote",tokenize:ml};function ml(e,n,t){const r=this;return i;function i(o){if(o===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),l}return t(o)}function l(o){return H(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(o))}}function gl(e,n,t){const r=this;return i;function i(o){return H(o)?U(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return e.attempt(or,n,t)(o)}}function dl(e){e.exit("blockQuote")}var ar={name:"characterEscape",tokenize:xl};function xl(e,n,t){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return rl(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(l)}}var ur={name:"characterReference",tokenize:yl};function yl(e,n,t){const r=this;let i=0,l,o;return a;function a(s){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),u}function u(s){return s===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(s),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),l=31,o=Z,f(s))}function c(s){return s===88||s===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(s),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=nl,f):(e.enter("characterReferenceValue"),l=7,o=Lt,f(s))}function f(s){if(s===59&&i){const h=e.exit("characterReferenceValue");return o===Z&&!Vt(r.sliceSerialize(h))?t(s):(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return o(s)&&i++<l?(e.consume(s),f):t(s)}}var gn={partial:!0,tokenize:bl},dn={concrete:!0,name:"codeFenced",tokenize:kl};function kl(e,n,t){const r=this,i={partial:!0,tokenize:z};let l=0,o=0,a;return u;function u(w){return c(w)}function c(w){const B=r.events[r.events.length-1];return l=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,a=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(w)}function f(w){return w===a?(o++,e.consume(w),f):o<3?t(w):(e.exit("codeFencedFenceSequence"),H(w)?U(e,s,"whitespace")(w):s(w))}function s(w){return w===null||M(w)?(e.exit("codeFencedFence"),r.interrupt?n(w):e.check(gn,k,A)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(w))}function h(w){return w===null||M(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),s(w)):H(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),U(e,p,"whitespace")(w)):w===96&&w===a?t(w):(e.consume(w),h)}function p(w){return w===null||M(w)?s(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(w))}function x(w){return w===null||M(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),s(w)):w===96&&w===a?t(w):(e.consume(w),x)}function k(w){return e.attempt(i,A,S)(w)}function S(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),d}function d(w){return l>0&&H(w)?U(e,v,"linePrefix",l+1)(w):v(w)}function v(w){return w===null||M(w)?e.check(gn,k,A)(w):(e.enter("codeFlowValue"),C(w))}function C(w){return w===null||M(w)?(e.exit("codeFlowValue"),v(w)):(e.consume(w),C)}function A(w){return e.exit("codeFenced"),n(w)}function z(w,B,_){let j=0;return y;function y(q){return w.enter("lineEnding"),w.consume(q),w.exit("lineEnding"),P}function P(q){return w.enter("codeFencedFence"),H(q)?U(w,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):L(q)}function L(q){return q===a?(w.enter("codeFencedFenceSequence"),$(q)):_(q)}function $(q){return q===a?(j++,w.consume(q),$):j>=o?(w.exit("codeFencedFenceSequence"),H(q)?U(w,X,"whitespace")(q):X(q)):_(q)}function X(q){return q===null||M(q)?(w.exit("codeFencedFence"),B(q)):_(q)}}}function bl(e,n,t){const r=this;return i;function i(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}var ht={name:"codeIndented",tokenize:vl},wl={partial:!0,tokenize:Cl};function vl(e,n,t){const r=this;return i;function i(c){return e.enter("codeIndented"),U(e,l,"linePrefix",5)(c)}function l(c){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?o(c):t(c)}function o(c){return c===null?u(c):M(c)?e.attempt(wl,o,u)(c):(e.enter("codeFlowValue"),a(c))}function a(c){return c===null||M(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),a)}function u(c){return e.exit("codeIndented"),n(c)}}function Cl(e,n,t){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?t(o):M(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):U(e,l,"linePrefix",5)(o)}function l(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(o):M(o)?i(o):t(o)}}var Sl={name:"codeText",previous:Il,resolve:El,tokenize:Al};function El(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),n-=r-i-2,r=i+2),i=void 0);return e}function Il(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Al(e,n,t){let r=0,i,l;return o;function o(s){return e.enter("codeText"),e.enter("codeTextSequence"),a(s)}function a(s){return s===96?(e.consume(s),r++,a):(e.exit("codeTextSequence"),u(s))}function u(s){return s===null?t(s):s===32?(e.enter("space"),e.consume(s),e.exit("space"),u):s===96?(l=e.enter("codeTextSequence"),i=0,f(s)):M(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(s))}function c(s){return s===null||s===32||s===96||M(s)?(e.exit("codeTextData"),u(s)):(e.consume(s),c)}function f(s){return s===96?(e.consume(s),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(s)):(l.type="codeTextData",c(s))}}var Tl=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){const t=n??Number.POSITIVE_INFINITY;return t<this.left.length?this.left.slice(e,t):e>this.left.length?this.right.slice(this.right.length-t+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-t+this.left.length).reverse())}splice(e,n,t){const r=n||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return t&&He(this.left,t),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),He(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),He(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const n=this.left.splice(e,Number.POSITIVE_INFINITY);He(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);He(this.left,n.reverse())}}};function He(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function sr(e){const n={};let t=-1,r,i,l,o,a,u,c;const f=new Tl(e);for(;++t<f.length;){for(;t in n;)t=n[t];if(r=f.get(t),t&&r[1].type==="chunkFlow"&&f.get(t-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,l=0,l<u.length&&u[l][1].type==="lineEndingBlank"&&(l+=2),l<u.length&&u[l][1].type==="content"))for(;++l<u.length&&u[l][1].type!=="content";)u[l][1].type==="chunkText"&&(u[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,Pl(f,t)),t=n[t],c=!0);else if(r[1]._container){for(l=t,i=void 0;l--;)if(o=f.get(l),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=l);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,t),a.unshift(r),f.splice(i,t-i+1,a))}}return oe(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!c}function Pl(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const l=[];let o=t._tokenizer;o||(o=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const a=o.events,u=[],c={};let f,s,h=-1,p=t,x=0,k=0;const S=[k];for(;p;){for(;e.get(++i)[1]!==p;);l.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),s&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(f),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),s=p,p=p.next}for(p=t;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(k=h+1,S.push(k),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):S.pop(),h=S.length;h--;){const d=a.slice(S[h],S[h+1]),v=l.pop();u.push([v,v+d.length-1]),e.splice(v,2,d)}for(u.reverse(),h=-1;++h<u.length;)c[x+u[h][0]]=x+u[h][1],x+=u[h][1]-u[h][0]-1;return c}var Ll={resolve:Dl,tokenize:Fl},zl={partial:!0,tokenize:Ml};function Dl(e){return sr(e),e}function Fl(e,n){let t;return r;function r(a){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?l(a):M(a)?e.check(zl,o,l)(a):(e.consume(a),i)}function l(a){return e.exit("chunkContent"),e.exit("content"),n(a)}function o(a){return e.consume(a),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function Ml(e,n,t){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),U(e,l,"linePrefix")}function l(o){if(o===null||M(o))return t(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(o):e.interrupt(r.parser.constructs.flow,t,n)(o)}}function cr(e,n,t,r,i,l,o,a,u){const c=u||Number.POSITIVE_INFINITY;let f=0;return s;function s(d){return d===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(d),e.exit(l),h):d===null||d===32||d===41||it(d)?t(d):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),k(d))}function h(d){return d===62?(e.enter(l),e.consume(d),e.exit(l),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(d))}function p(d){return d===62?(e.exit("chunkString"),e.exit(a),h(d)):d===null||d===60||M(d)?t(d):(e.consume(d),d===92?x:p)}function x(d){return d===60||d===62||d===92?(e.consume(d),p):p(d)}function k(d){return!f&&(d===null||d===41||V(d))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),n(d)):f<c&&d===40?(e.consume(d),f++,k):d===41?(e.consume(d),f--,k):d===null||d===32||d===40||it(d)?t(d):(e.consume(d),d===92?S:k)}function S(d){return d===40||d===41||d===92?(e.consume(d),k):k(d)}}function fr(e,n,t,r,i,l){const o=this;let a=0,u;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(l),f}function f(p){return a>999||p===null||p===91||p===93&&!u||p===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?t(p):p===93?(e.exit(l),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):M(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),s(p))}function s(p){return p===null||p===91||p===93||M(p)||a++>999?(e.exit("chunkString"),f(p)):(e.consume(p),u||(u=!H(p)),p===92?h:s)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,s):s(p)}}function pr(e,n,t,r,i,l){let o;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),o=h===40?41:h,u):t(h)}function u(h){return h===o?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),n):(e.enter(l),c(h))}function c(h){return h===o?(e.exit(l),u(o)):h===null?t(h):M(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),U(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===o||h===null||M(h)?(e.exit("chunkString"),c(h)):(e.consume(h),h===92?s:f)}function s(h){return h===o||h===92?(e.consume(h),f):f(h)}}function $e(e,n){let t;return r;function r(i){return M(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):H(i)?U(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}var _l={name:"definition",tokenize:Ol},Rl={partial:!0,tokenize:Nl};function Ol(e,n,t){const r=this;let i;return l;function l(p){return e.enter("definition"),o(p)}function o(p){return fr.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=se(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):t(p)}function u(p){return V(p)?$e(e,c)(p):c(p)}function c(p){return cr(e,f,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(Rl,s,s)(p)}function s(p){return H(p)?U(e,h,"whitespace")(p):h(p)}function h(p){return p===null||M(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function Nl(e,n,t){return r;function r(a){return V(a)?$e(e,i)(a):t(a)}function i(a){return pr(e,l,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function l(a){return H(a)?U(e,o,"whitespace")(a):o(a)}function o(a){return a===null||M(a)?n(a):t(a)}}var Bl={name:"hardBreakEscape",tokenize:jl};function jl(e,n,t){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return M(l)?(e.exit("hardBreakEscape"),n(l)):t(l)}}var Hl={name:"headingAtx",resolve:ql,tokenize:Ul};function ql(e,n){let t=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},l={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},oe(e,r,t-r+1,[["enter",i,n],["enter",l,n],["exit",l,n],["exit",i,n]])),e}function Ul(e,n,t){let r=0;return i;function i(f){return e.enter("atxHeading"),l(f)}function l(f){return e.enter("atxHeadingSequence"),o(f)}function o(f){return f===35&&r++<6?(e.consume(f),o):f===null||V(f)?(e.exit("atxHeadingSequence"),a(f)):t(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),u(f)):f===null||M(f)?(e.exit("atxHeading"),n(f)):H(f)?U(e,a,"whitespace")(f):(e.enter("atxHeadingText"),c(f))}function u(f){return f===35?(e.consume(f),u):(e.exit("atxHeadingSequence"),a(f))}function c(f){return f===null||f===35||V(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),c)}}var $l=["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"],xn=["pre","script","style","textarea"],Vl={concrete:!0,name:"htmlFlow",resolveTo:Yl,tokenize:Ql},Wl={partial:!0,tokenize:Kl},Xl={partial:!0,tokenize:Jl};function Yl(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Ql(e,n,t){const r=this;let i,l,o,a,u;return c;function c(g){return f(g)}function f(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),s}function s(g){return g===33?(e.consume(g),h):g===47?(e.consume(g),l=!0,k):g===63?(e.consume(g),i=3,r.interrupt?n:m):te(g)?(e.consume(g),o=String.fromCharCode(g),S):t(g)}function h(g){return g===45?(e.consume(g),i=2,p):g===91?(e.consume(g),i=5,a=0,x):te(g)?(e.consume(g),i=4,r.interrupt?n:m):t(g)}function p(g){return g===45?(e.consume(g),r.interrupt?n:m):t(g)}function x(g){return g==="CDATA[".charCodeAt(a++)?(e.consume(g),a===6?r.interrupt?n:L:x):t(g)}function k(g){return te(g)?(e.consume(g),o=String.fromCharCode(g),S):t(g)}function S(g){if(g===null||g===47||g===62||V(g)){const ke=g===47,Ce=o.toLowerCase();return!ke&&!l&&xn.includes(Ce)?(i=1,r.interrupt?n(g):L(g)):$l.includes(o.toLowerCase())?(i=6,ke?(e.consume(g),d):r.interrupt?n(g):L(g)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(g):l?v(g):C(g))}return g===45||Z(g)?(e.consume(g),o+=String.fromCharCode(g),S):t(g)}function d(g){return g===62?(e.consume(g),r.interrupt?n:L):t(g)}function v(g){return H(g)?(e.consume(g),v):y(g)}function C(g){return g===47?(e.consume(g),y):g===58||g===95||te(g)?(e.consume(g),A):H(g)?(e.consume(g),C):y(g)}function A(g){return g===45||g===46||g===58||g===95||Z(g)?(e.consume(g),A):z(g)}function z(g){return g===61?(e.consume(g),w):H(g)?(e.consume(g),z):C(g)}function w(g){return g===null||g===60||g===61||g===62||g===96?t(g):g===34||g===39?(e.consume(g),u=g,B):H(g)?(e.consume(g),w):_(g)}function B(g){return g===u?(e.consume(g),u=null,j):g===null||M(g)?t(g):(e.consume(g),B)}function _(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||V(g)?z(g):(e.consume(g),_)}function j(g){return g===47||g===62||H(g)?C(g):t(g)}function y(g){return g===62?(e.consume(g),P):t(g)}function P(g){return g===null||M(g)?L(g):H(g)?(e.consume(g),P):t(g)}function L(g){return g===45&&i===2?(e.consume(g),R):g===60&&i===1?(e.consume(g),D):g===62&&i===4?(e.consume(g),ye):g===63&&i===3?(e.consume(g),m):g===93&&i===5?(e.consume(g),ue):M(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Wl,he,$)(g)):g===null||M(g)?(e.exit("htmlFlowData"),$(g)):(e.consume(g),L)}function $(g){return e.check(Xl,X,he)(g)}function X(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),q}function q(g){return g===null||M(g)?$(g):(e.enter("htmlFlowData"),L(g))}function R(g){return g===45?(e.consume(g),m):L(g)}function D(g){return g===47?(e.consume(g),o="",J):L(g)}function J(g){if(g===62){const ke=o.toLowerCase();return xn.includes(ke)?(e.consume(g),ye):L(g)}return te(g)&&o.length<8?(e.consume(g),o+=String.fromCharCode(g),J):L(g)}function ue(g){return g===93?(e.consume(g),m):L(g)}function m(g){return g===62?(e.consume(g),ye):g===45&&i===2?(e.consume(g),m):L(g)}function ye(g){return g===null||M(g)?(e.exit("htmlFlowData"),he(g)):(e.consume(g),ye)}function he(g){return e.exit("htmlFlow"),n(g)}}function Jl(e,n,t){const r=this;return i;function i(o){return M(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):t(o)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}function Kl(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ke,n,t)}}var Gl={name:"htmlText",tokenize:Zl};function Zl(e,n,t){const r=this;let i,l,o;return a;function a(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),u}function u(m){return m===33?(e.consume(m),c):m===47?(e.consume(m),z):m===63?(e.consume(m),C):te(m)?(e.consume(m),_):t(m)}function c(m){return m===45?(e.consume(m),f):m===91?(e.consume(m),l=0,x):te(m)?(e.consume(m),v):t(m)}function f(m){return m===45?(e.consume(m),p):t(m)}function s(m){return m===null?t(m):m===45?(e.consume(m),h):M(m)?(o=s,D(m)):(e.consume(m),s)}function h(m){return m===45?(e.consume(m),p):s(m)}function p(m){return m===62?R(m):m===45?h(m):s(m)}function x(m){return m==="CDATA[".charCodeAt(l++)?(e.consume(m),l===6?k:x):t(m)}function k(m){return m===null?t(m):m===93?(e.consume(m),S):M(m)?(o=k,D(m)):(e.consume(m),k)}function S(m){return m===93?(e.consume(m),d):k(m)}function d(m){return m===62?R(m):m===93?(e.consume(m),d):k(m)}function v(m){return m===null||m===62?R(m):M(m)?(o=v,D(m)):(e.consume(m),v)}function C(m){return m===null?t(m):m===63?(e.consume(m),A):M(m)?(o=C,D(m)):(e.consume(m),C)}function A(m){return m===62?R(m):C(m)}function z(m){return te(m)?(e.consume(m),w):t(m)}function w(m){return m===45||Z(m)?(e.consume(m),w):B(m)}function B(m){return M(m)?(o=B,D(m)):H(m)?(e.consume(m),B):R(m)}function _(m){return m===45||Z(m)?(e.consume(m),_):m===47||m===62||V(m)?j(m):t(m)}function j(m){return m===47?(e.consume(m),R):m===58||m===95||te(m)?(e.consume(m),y):M(m)?(o=j,D(m)):H(m)?(e.consume(m),j):R(m)}function y(m){return m===45||m===46||m===58||m===95||Z(m)?(e.consume(m),y):P(m)}function P(m){return m===61?(e.consume(m),L):M(m)?(o=P,D(m)):H(m)?(e.consume(m),P):j(m)}function L(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),i=m,$):M(m)?(o=L,D(m)):H(m)?(e.consume(m),L):(e.consume(m),X)}function $(m){return m===i?(e.consume(m),i=void 0,q):m===null?t(m):M(m)?(o=$,D(m)):(e.consume(m),$)}function X(m){return m===null||m===34||m===39||m===60||m===61||m===96?t(m):m===47||m===62||V(m)?j(m):(e.consume(m),X)}function q(m){return m===47||m===62||V(m)?j(m):t(m)}function R(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),n):t(m)}function D(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),J}function J(m){return H(m)?U(e,ue,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):ue(m)}function ue(m){return e.enter("htmlTextData"),o(m)}}var Wt={name:"labelEnd",resolveAll:ro,resolveTo:io,tokenize:lo},eo={tokenize:oo},to={tokenize:ao},no={tokenize:uo};function ro(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&oe(e,0,e.length,t),e}function io(e,n){let t=e.length,r=0,i,l,o,a;for(;t--;)if(i=e[t][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=t);const u={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[l][1].start},end:{...e[o][1].end}},f={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",u,n],["enter",c,n]],a=ae(a,e.slice(l+1,l+r+3)),a=ae(a,[["enter",f,n]]),a=ae(a,ut(n.parser.constructs.insideSpan.null,e.slice(l+r+4,o-3),n)),a=ae(a,[["exit",f,n],e[o-2],e[o-1],["exit",c,n]]),a=ae(a,e.slice(o+1)),a=ae(a,[["exit",u,n]]),oe(e,l,e.length,a),e}function lo(e,n,t){const r=this;let i=r.events.length,l,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return a;function a(h){return l?l._inactive?s(h):(o=r.parser.defined.includes(se(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),u):t(h)}function u(h){return h===40?e.attempt(eo,f,o?f:s)(h):h===91?e.attempt(to,f,o?c:s)(h):o?f(h):s(h)}function c(h){return e.attempt(no,f,s)(h)}function f(h){return n(h)}function s(h){return l._balanced=!0,t(h)}}function oo(e,n,t){return r;function r(s){return e.enter("resource"),e.enter("resourceMarker"),e.consume(s),e.exit("resourceMarker"),i}function i(s){return V(s)?$e(e,l)(s):l(s)}function l(s){return s===41?f(s):cr(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(s)}function o(s){return V(s)?$e(e,u)(s):f(s)}function a(s){return t(s)}function u(s){return s===34||s===39||s===40?pr(e,c,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(s):f(s)}function c(s){return V(s)?$e(e,f)(s):f(s)}function f(s){return s===41?(e.enter("resourceMarker"),e.consume(s),e.exit("resourceMarker"),e.exit("resource"),n):t(s)}}function ao(e,n,t){const r=this;return i;function i(a){return fr.call(r,e,l,o,"reference","referenceMarker","referenceString")(a)}function l(a){return r.parser.defined.includes(se(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(a):t(a)}function o(a){return t(a)}}function uo(e,n,t){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),n):t(l)}}var so={name:"labelStartImage",resolveAll:Wt.resolveAll,tokenize:co};function co(e,n,t){const r=this;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"),e.exit("labelImage"),o):t(a)}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}var fo={name:"labelStartLink",resolveAll:Wt.resolveAll,tokenize:po};function po(e,n,t){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),l}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(o):n(o)}}var mt={name:"lineEnding",tokenize:ho};function ho(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),U(e,n,"linePrefix")}}var rt={name:"thematicBreak",tokenize:mo};function mo(e,n,t){let r=0,i;return l;function l(c){return e.enter("thematicBreak"),o(c)}function o(c){return i=c,a(c)}function a(c){return c===i?(e.enter("thematicBreakSequence"),u(c)):r>=3&&(c===null||M(c))?(e.exit("thematicBreak"),n(c)):t(c)}function u(c){return c===i?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),H(c)?U(e,a,"whitespace")(c):a(c))}}var ne={continuation:{tokenize:ko},exit:wo,name:"list",tokenize:yo},go={partial:!0,tokenize:vo},xo={partial:!0,tokenize:bo};function yo(e,n,t){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(p){const x=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Lt(p)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(rt,t,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return t(p)}function u(p){return Lt(p)&&++o<10?(e.consume(p),u):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):t(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?t:f,e.attempt(go,h,s))}function f(p){return r.containerState.initialBlankLine=!0,l++,h(p)}function s(p){return H(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):t(p)}function h(p){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function ko(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Ke,i,l);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,U(e,n,"listItemIndent",r.containerState.size+1)(a)}function l(a){return r.containerState.furtherBlankLines||!H(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(xo,n,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,U(e,e.attempt(ne,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function bo(e,n,t){const r=this;return U(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?n(l):t(l)}}function wo(e){e.exit(this.containerState.type)}function vo(e,n,t){const r=this;return U(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!H(l)&&o&&o[1].type==="listItemPrefixWhitespace"?n(l):t(l)}}var yn={name:"setextUnderline",resolveTo:Co,tokenize:So};function Co(e,n){let t=e.length,r,i,l;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!l&&e[t][1].type==="definition"&&(l=t);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,n]),e.splice(l+1,0,["exit",e[r][1],n]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,n]),e}function So(e,n,t){const r=this;let i;return l;function l(c){let f=r.events.length,s;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){s=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter("setextHeadingLine"),i=c,o(c)):t(c)}function o(c){return e.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===i?(e.consume(c),a):(e.exit("setextHeadingLineSequence"),H(c)?U(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||M(c)?(e.exit("setextHeadingLine"),n(c)):t(c)}}var Eo={tokenize:Io};function Io(e){const n=this,t=e.attempt(Ke,r,e.attempt(this.parser.constructs.flowInitial,i,U(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Ll,i)),"linePrefix")));return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n.currentConstruct=void 0,t}}var Ao={resolveAll:mr()},To=hr("string"),Po=hr("text");function hr(e){return{resolveAll:mr(e==="text"?Lo:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],l=t.attempt(i,o,a);return o;function o(f){return c(f)?l(f):a(f)}function a(f){if(f===null){t.consume(f);return}return t.enter("data"),t.consume(f),u}function u(f){return c(f)?(t.exit("data"),l(f)):(t.consume(f),u)}function c(f){if(f===null)return!0;const s=i[f];let h=-1;if(s)for(;++h<s.length;){const p=s[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function mr(e){return n;function n(t,r){let i=-1,l;for(;++i<=t.length;)l===void 0?t[i]&&t[i][1].type==="data"&&(l=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==l+2&&(t[l][1].end=t[i-1][1].end,t.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(t,r):t}}function Lo(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],i=n.sliceStream(r);let l=i.length,o=-1,a=0,u;for(;l--;){const c=i[l];if(typeof c=="string"){for(o=c.length;c.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(c===-2)u=!0,a++;else if(c!==-1){l++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(a=0),a){const c={type:t===e.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?o:r.start._bufferIndex+o,_index:r.start._index+l,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(t,0,["enter",c,n],["exit",c,n]),t+=2)}t++}return e}var zo=fe.__exportAll({attentionMarkers:()=>Bo,contentInitial:()=>Fo,disable:()=>jo,document:()=>Do,flow:()=>_o,flowInitial:()=>Mo,insideSpan:()=>No,string:()=>Ro,text:()=>Oo}),Do={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:or},Fo={91:_l},Mo={[-2]:ht,[-1]:ht,32:ht},_o={35:Hl,42:rt,45:[yn,rt],60:Vl,61:yn,95:rt,96:dn,126:dn},Ro={38:ur,92:ar},Oo={[-5]:mt,[-4]:mt,[-3]:mt,33:so,38:ur,42:zt,60:[fl,Gl],91:fo,92:[Bl,ar],93:Wt,95:zt,96:Sl},No={null:[zt,Ao]},Bo={null:[42,95]},jo={null:[]};function Ho(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},l=[];let o=[],a=[];const u={attempt:B(z),check:B(w),consume:v,enter:C,exit:A,interrupt:B(w,{interrupt:!0})},c={code:null,containerState:{},defineSkip:k,events:[],now:x,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:s};let f=n.tokenize.call(c,u);return n.resolveAll&&l.push(n),c;function s(P){return o=ae(o,P),S(),o[o.length-1]!==null?[]:(_(n,0),c.events=ut(l,c.events,c),c.events)}function h(P,L){return Uo(p(P),L)}function p(P){return qo(o,P)}function x(){const{_bufferIndex:P,_index:L,line:$,column:X,offset:q}=r;return{_bufferIndex:P,_index:L,line:$,column:X,offset:q}}function k(P){i[P.line]=P.column,y()}function S(){let P;for(;r._index<o.length;){const L=o[r._index];if(typeof L=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<L.length;)d(L.charCodeAt(r._bufferIndex));else d(L)}}function d(P){f=f(P)}function v(P){M(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,y()):P!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=P}function C(P,L){const $=L||{};return $.type=P,$.start=x(),c.events.push(["enter",$,c]),a.push($),$}function A(P){const L=a.pop();return L.end=x(),c.events.push(["exit",L,c]),L}function z(P,L){_(P,L.from)}function w(P,L){L.restore()}function B(P,L){return $;function $(X,q,R){let D,J,ue,m;return Array.isArray(X)?he(X):"tokenize"in X?he([X]):ye(X);function ye(G){return Ne;function Ne(me){const Ae=me!==null&&G[me],Te=me!==null&&G.null;return he([...Array.isArray(Ae)?Ae:Ae?[Ae]:[],...Array.isArray(Te)?Te:Te?[Te]:[]])(me)}}function he(G){return D=G,J=0,G.length===0?R:g(G[J])}function g(G){return Ne;function Ne(me){return m=j(),ue=G,G.partial||(c.currentConstruct=G),G.name&&c.parser.constructs.disable.null.includes(G.name)?Ce(me):G.tokenize.call(L?Object.assign(Object.create(c),L):c,u,ke,Ce)(me)}}function ke(G){return P(ue,m),q}function Ce(G){return m.restore(),++J<D.length?g(D[J]):R}}}function _(P,L){P.resolveAll&&!l.includes(P)&&l.push(P),P.resolve&&oe(c.events,L,c.events.length-L,P.resolve(c.events.slice(L),c)),P.resolveTo&&(c.events=P.resolveTo(c.events,c))}function j(){const P=x(),L=c.previous,$=c.currentConstruct,X=c.events.length,q=Array.from(a);return{from:X,restore:R};function R(){r=P,c.previous=L,c.currentConstruct=$,c.events.length=X,a=q,y()}}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function qo(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,l=n.end._bufferIndex;let o;if(t===i)o=[e[t].slice(r,l)];else{if(o=e.slice(t,i),r>-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function Uo(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const l=e[t];let o;if(typeof l=="string")o=l;else switch(l){case-5:o="\r";break;case-4:o=`
3
3
  `;break;case-3:o=`\r
4
- `;break;case-2:o=n?" ":" ";break;case-1:if(!n&&i)continue;o=" ";break;default:o=String.fromCharCode(l)}i=l===-2,r.push(o)}return r.join("")}function $o(e){const n={constructs:rr([zo,...(e||{}).extensions||[]]),content:t(il),defined:[],document:t(ol),flow:t(Eo),lazy:{},string:t(To),text:t(Po)};return n;function t(r){return i;function i(l){return Ho(n,r,l)}}}function Vo(e){for(;!ur(e););return e}var kn=/[\0\t\n\r]/g;function Wo(){let e=1,n="",t=!0,r;return i;function i(l,o,a){const u=[];let c,f,s,h,p;for(l=n+(typeof l=="string"?l.toString():new TextDecoder(o||void 0).decode(l)),s=0,n="",t&&(l.charCodeAt(0)===65279&&s++,t=void 0);s<l.length;){if(kn.lastIndex=s,c=kn.exec(l),h=c&&c.index!==void 0?c.index:l.length,p=l.charCodeAt(h),!c){n=l.slice(s);break}if(p===10&&s===h&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),s<h&&(u.push(l.slice(s,h)),e+=h-s),p){case 0:u.push(65533),e++;break;case 9:for(f=Math.ceil(e/4)*4,u.push(-2);e++<f;)u.push(-1);break;case 10:u.push(-4),e=1;break;default:r=!0,e=1}s=h+1}return a&&(r&&u.push(-5),n&&u.push(n),u.push(null)),u}}var Xo=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Yo(e){return e.replace(Xo,Qo)}function Qo(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const r=t.charCodeAt(1),i=r===120||r===88;return ir(t.slice(i?2:1),i?16:10)}return Vt(t)||e}var mr={}.hasOwnProperty;function Jo(e,n,t){return typeof n!="string"&&(t=n,n=void 0),Ko(t)(Vo($o(t).document().write(Wo()(e,n,!0))))}function Ko(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(tn),autolinkProtocol:j,autolinkEmail:j,atxHeading:l(Gt),blockQuote:l(Te),characterEscape:j,characterReference:j,codeFenced:l(Kt),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:l(Kt,o),codeText:l(Jr,o),codeTextData:j,data:j,codeFlowValue:j,definition:l(Kr),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:l(Gr),hardBreakEscape:l(Zt),hardBreakTrailing:l(Zt),htmlFlow:l(en,o),htmlFlowData:j,htmlText:l(en,o),htmlTextData:j,image:l(Zr),label:o,link:l(tn),listItem:l(ei),listItemValue:h,listOrdered:l(nn,s),listUnordered:l(nn),paragraph:l(ti),reference:g,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:l(Gt),strong:l(ni),thematicBreak:l(ii)},exit:{atxHeading:u(),atxHeadingSequence:z,autolink:u(),autolinkEmail:Ae,autolinkProtocol:me,blockQuote:u(),characterEscapeValue:y,characterReferenceMarkerHexadecimal:Ce,characterReferenceMarkerNumeric:Ce,characterReferenceValue:G,characterReference:Ne,codeFenced:u(S),codeFencedFence:k,codeFencedFenceInfo:p,codeFencedFenceMeta:x,codeFlowValue:y,codeIndented:u(d),codeText:u(q),codeTextData:y,data:y,definition:u(),definitionDestinationString:A,definitionLabelString:v,definitionTitleString:C,emphasis:u(),hardBreakEscape:u(L),hardBreakTrailing:u(L),htmlFlow:u($),htmlFlowData:y,htmlText:u(X),htmlTextData:y,image:u(D),label:ue,labelText:J,lineEnding:P,link:u(R),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ke,resourceDestinationString:m,resourceTitleString:ye,resource:he,setextHeading:u(_),setextHeadingLineSequence:B,setextHeadingText:w,strong:u(),thematicBreak:u()}};gr(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(b){let I={type:"root",children:[]};const O={stack:[I],tokenStack:[],config:n,enter:a,exit:c,buffer:o,resume:f,data:t},Y=[];let Q=-1;for(;++Q<b.length;)(b[Q][1].type==="listOrdered"||b[Q][1].type==="listUnordered")&&(b[Q][0]==="enter"?Y.push(Q):Q=i(b,Y.pop(),Q));for(Q=-1;++Q<b.length;){const be=n[b[Q][0]];mr.call(be,b[Q][1].type)&&be[b[Q][1].type].call(Object.assign({sliceSerialize:b[Q][2].sliceSerialize},O),b[Q][1])}if(O.tokenStack.length>0){const be=O.tokenStack[O.tokenStack.length-1];(be[1]||bn).call(O,void 0,be[0])}for(I.position={start:we(b.length>0?b[0][1].start:{line:1,column:1,offset:0}),end:we(b.length>0?b[b.length-2][1].end:{line:1,column:1,offset:0})},Q=-1;++Q<n.transforms.length;)I=n.transforms[Q](I)||I;return I}function i(b,I,O){let Y=I-1,Q=-1,be=!1,Pe,ge,Be,je;for(;++Y<=O;){const ie=b[Y];switch(ie[1].type){case"listUnordered":case"listOrdered":case"blockQuote":ie[0]==="enter"?Q++:Q--,je=void 0;break;case"lineEndingBlank":ie[0]==="enter"&&(Pe&&!je&&!Q&&!Be&&(Be=Y),je=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:je=void 0}if(!Q&&ie[0]==="enter"&&ie[1].type==="listItemPrefix"||Q===-1&&ie[0]==="exit"&&(ie[1].type==="listUnordered"||ie[1].type==="listOrdered")){if(Pe){let Le=Y;for(ge=void 0;Le--;){const de=b[Le];if(de[1].type==="lineEnding"||de[1].type==="lineEndingBlank"){if(de[0]==="exit")continue;ge&&(b[ge][1].type="lineEndingBlank",be=!0),de[1].type="lineEnding",ge=Le}else if(!(de[1].type==="linePrefix"||de[1].type==="blockQuotePrefix"||de[1].type==="blockQuotePrefixWhitespace"||de[1].type==="blockQuoteMarker"||de[1].type==="listItemIndent"))break}Be&&(!ge||Be<ge)&&(Pe._spread=!0),Pe.end=Object.assign({},ge?b[ge][1].start:ie[1].end),b.splice(ge||Y,0,["exit",Pe,ie[2]]),Y++,O++}if(ie[1].type==="listItemPrefix"){const Le={type:"listItem",_spread:!1,start:Object.assign({},ie[1].start),end:void 0};Pe=Le,b.splice(Y,0,["enter",Le,ie[2]]),Y++,O++,Be=void 0,je=!0}}}return b[I][1]._spread=be,O}function l(b,I){return O;function O(Y){a.call(this,b(Y),Y),I&&I.call(this,Y)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(b,I,O){this.stack[this.stack.length-1].children.push(b),this.stack.push(b),this.tokenStack.push([I,O||void 0]),b.position={start:we(I.start),end:void 0}}function u(b){return I;function I(O){b&&b.call(this,O),c.call(this,O)}}function c(b,I){const O=this.stack.pop(),Y=this.tokenStack.pop();if(Y)Y[0].type!==b.type&&(I?I.call(this,b,Y[0]):(Y[1]||bn).call(this,b,Y[0]));else throw new Error("Cannot close `"+b.type+"` ("+Ue({start:b.start,end:b.end})+"): it’s not open");O.position.end=we(b.end)}function f(){return $t(this.stack.pop())}function s(){this.data.expectingFirstListItemValue=!0}function h(b){if(this.data.expectingFirstListItemValue){const I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(b),10),this.data.expectingFirstListItemValue=void 0}}function p(){const b=this.resume(),I=this.stack[this.stack.length-1];I.lang=b}function x(){const b=this.resume(),I=this.stack[this.stack.length-1];I.meta=b}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const b=this.resume(),I=this.stack[this.stack.length-1];I.value=b.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function d(){const b=this.resume(),I=this.stack[this.stack.length-1];I.value=b.replace(/(\r?\n|\r)$/g,"")}function v(b){const I=this.resume(),O=this.stack[this.stack.length-1];O.label=I,O.identifier=se(this.sliceSerialize(b)).toLowerCase()}function C(){const b=this.resume(),I=this.stack[this.stack.length-1];I.title=b}function A(){const b=this.resume(),I=this.stack[this.stack.length-1];I.url=b}function z(b){const I=this.stack[this.stack.length-1];I.depth||(I.depth=this.sliceSerialize(b).length)}function w(){this.data.setextHeadingSlurpLineEnding=!0}function B(b){const I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(b).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function j(b){const I=this.stack[this.stack.length-1].children;let O=I[I.length-1];(!O||O.type!=="text")&&(O=ri(),O.position={start:we(b.start),end:void 0},I.push(O)),this.stack.push(O)}function y(b){const I=this.stack.pop();I.value+=this.sliceSerialize(b),I.position.end=we(b.end)}function P(b){const I=this.stack[this.stack.length-1];if(this.data.atHardBreak){const O=I.children[I.children.length-1];O.position.end=we(b.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(I.type)&&(j.call(this,b),y.call(this,b))}function L(){this.data.atHardBreak=!0}function $(){const b=this.resume(),I=this.stack[this.stack.length-1];I.value=b}function X(){const b=this.resume(),I=this.stack[this.stack.length-1];I.value=b}function q(){const b=this.resume(),I=this.stack[this.stack.length-1];I.value=b}function R(){const b=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=I,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function D(){const b=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=I,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function J(b){const I=this.sliceSerialize(b),O=this.stack[this.stack.length-2];O.label=Yo(I),O.identifier=se(I).toLowerCase()}function ue(){const b=this.stack[this.stack.length-1],I=this.resume(),O=this.stack[this.stack.length-1];this.data.inReference=!0,O.type==="link"?O.children=b.children:O.alt=I}function m(){const b=this.resume(),I=this.stack[this.stack.length-1];I.url=b}function ye(){const b=this.resume(),I=this.stack[this.stack.length-1];I.title=b}function he(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function ke(b){const I=this.resume(),O=this.stack[this.stack.length-1];O.label=I,O.identifier=se(this.sliceSerialize(b)).toLowerCase(),this.data.referenceType="full"}function Ce(b){this.data.characterReferenceType=b.type}function G(b){const I=this.sliceSerialize(b),O=this.data.characterReferenceType;let Y;O?(Y=ir(I,O==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Y=Vt(I);const Q=this.stack[this.stack.length-1];Q.value+=Y}function Ne(b){const I=this.stack.pop();I.position.end=we(b.end)}function me(b){y.call(this,b);const I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(b)}function Ae(b){y.call(this,b);const I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(b)}function Te(){return{type:"blockquote",children:[]}}function Kt(){return{type:"code",lang:null,meta:null,value:""}}function Jr(){return{type:"inlineCode",value:""}}function Kr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Gr(){return{type:"emphasis",children:[]}}function Gt(){return{type:"heading",depth:0,children:[]}}function Zt(){return{type:"break"}}function en(){return{type:"html",value:""}}function Zr(){return{type:"image",title:null,url:"",alt:null}}function tn(){return{type:"link",title:null,url:"",children:[]}}function nn(b){return{type:"list",ordered:b.type==="listOrdered",start:null,spread:b._spread,children:[]}}function ei(b){return{type:"listItem",spread:b._spread,checked:null,children:[]}}function ti(){return{type:"paragraph",children:[]}}function ni(){return{type:"strong",children:[]}}function ri(){return{type:"text",value:""}}function ii(){return{type:"thematicBreak"}}}function we(e){return{line:e.line,column:e.column,offset:e.offset}}function gr(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?gr(e,r):Go(e,r)}}function Go(e,n){let t;for(t in n)if(mr.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function bn(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Ue({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Ue({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Ue({start:n.start,end:n.end})+") is still open")}function Zo(e){const n=this;n.parser=t;function t(r){return Jo(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function ea(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function ta(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
4
+ `;break;case-2:o=n?" ":" ";break;case-1:if(!n&&i)continue;o=" ";break;default:o=String.fromCharCode(l)}i=l===-2,r.push(o)}return r.join("")}function $o(e){const n={constructs:ir([zo,...(e||{}).extensions||[]]),content:t(il),defined:[],document:t(ol),flow:t(Eo),lazy:{},string:t(To),text:t(Po)};return n;function t(r){return i;function i(l){return Ho(n,r,l)}}}function Vo(e){for(;!sr(e););return e}var kn=/[\0\t\n\r]/g;function Wo(){let e=1,n="",t=!0,r;return i;function i(l,o,a){const u=[];let c,f,s,h,p;for(l=n+(typeof l=="string"?l.toString():new TextDecoder(o||void 0).decode(l)),s=0,n="",t&&(l.charCodeAt(0)===65279&&s++,t=void 0);s<l.length;){if(kn.lastIndex=s,c=kn.exec(l),h=c&&c.index!==void 0?c.index:l.length,p=l.charCodeAt(h),!c){n=l.slice(s);break}if(p===10&&s===h&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),s<h&&(u.push(l.slice(s,h)),e+=h-s),p){case 0:u.push(65533),e++;break;case 9:for(f=Math.ceil(e/4)*4,u.push(-2);e++<f;)u.push(-1);break;case 10:u.push(-4),e=1;break;default:r=!0,e=1}s=h+1}return a&&(r&&u.push(-5),n&&u.push(n),u.push(null)),u}}var Xo=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Yo(e){return e.replace(Xo,Qo)}function Qo(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const r=t.charCodeAt(1),i=r===120||r===88;return lr(t.slice(i?2:1),i?16:10)}return Vt(t)||e}var gr={}.hasOwnProperty;function Jo(e,n,t){return typeof n!="string"&&(t=n,n=void 0),Ko(t)(Vo($o(t).document().write(Wo()(e,n,!0))))}function Ko(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(tn),autolinkProtocol:j,autolinkEmail:j,atxHeading:l(Gt),blockQuote:l(Te),characterEscape:j,characterReference:j,codeFenced:l(Kt),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:l(Kt,o),codeText:l(Jr,o),codeTextData:j,data:j,codeFlowValue:j,definition:l(Kr),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:l(Gr),hardBreakEscape:l(Zt),hardBreakTrailing:l(Zt),htmlFlow:l(en,o),htmlFlowData:j,htmlText:l(en,o),htmlTextData:j,image:l(Zr),label:o,link:l(tn),listItem:l(ei),listItemValue:h,listOrdered:l(nn,s),listUnordered:l(nn),paragraph:l(ti),reference:g,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:l(Gt),strong:l(ni),thematicBreak:l(ii)},exit:{atxHeading:u(),atxHeadingSequence:z,autolink:u(),autolinkEmail:Ae,autolinkProtocol:me,blockQuote:u(),characterEscapeValue:y,characterReferenceMarkerHexadecimal:Ce,characterReferenceMarkerNumeric:Ce,characterReferenceValue:G,characterReference:Ne,codeFenced:u(S),codeFencedFence:k,codeFencedFenceInfo:p,codeFencedFenceMeta:x,codeFlowValue:y,codeIndented:u(d),codeText:u(q),codeTextData:y,data:y,definition:u(),definitionDestinationString:A,definitionLabelString:v,definitionTitleString:C,emphasis:u(),hardBreakEscape:u(L),hardBreakTrailing:u(L),htmlFlow:u($),htmlFlowData:y,htmlText:u(X),htmlTextData:y,image:u(D),label:ue,labelText:J,lineEnding:P,link:u(R),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ke,resourceDestinationString:m,resourceTitleString:ye,resource:he,setextHeading:u(_),setextHeadingLineSequence:B,setextHeadingText:w,strong:u(),thematicBreak:u()}};dr(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(b){let I={type:"root",children:[]};const O={stack:[I],tokenStack:[],config:n,enter:a,exit:c,buffer:o,resume:f,data:t},Y=[];let Q=-1;for(;++Q<b.length;)(b[Q][1].type==="listOrdered"||b[Q][1].type==="listUnordered")&&(b[Q][0]==="enter"?Y.push(Q):Q=i(b,Y.pop(),Q));for(Q=-1;++Q<b.length;){const be=n[b[Q][0]];gr.call(be,b[Q][1].type)&&be[b[Q][1].type].call(Object.assign({sliceSerialize:b[Q][2].sliceSerialize},O),b[Q][1])}if(O.tokenStack.length>0){const be=O.tokenStack[O.tokenStack.length-1];(be[1]||bn).call(O,void 0,be[0])}for(I.position={start:we(b.length>0?b[0][1].start:{line:1,column:1,offset:0}),end:we(b.length>0?b[b.length-2][1].end:{line:1,column:1,offset:0})},Q=-1;++Q<n.transforms.length;)I=n.transforms[Q](I)||I;return I}function i(b,I,O){let Y=I-1,Q=-1,be=!1,Pe,ge,Be,je;for(;++Y<=O;){const ie=b[Y];switch(ie[1].type){case"listUnordered":case"listOrdered":case"blockQuote":ie[0]==="enter"?Q++:Q--,je=void 0;break;case"lineEndingBlank":ie[0]==="enter"&&(Pe&&!je&&!Q&&!Be&&(Be=Y),je=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:je=void 0}if(!Q&&ie[0]==="enter"&&ie[1].type==="listItemPrefix"||Q===-1&&ie[0]==="exit"&&(ie[1].type==="listUnordered"||ie[1].type==="listOrdered")){if(Pe){let Le=Y;for(ge=void 0;Le--;){const de=b[Le];if(de[1].type==="lineEnding"||de[1].type==="lineEndingBlank"){if(de[0]==="exit")continue;ge&&(b[ge][1].type="lineEndingBlank",be=!0),de[1].type="lineEnding",ge=Le}else if(!(de[1].type==="linePrefix"||de[1].type==="blockQuotePrefix"||de[1].type==="blockQuotePrefixWhitespace"||de[1].type==="blockQuoteMarker"||de[1].type==="listItemIndent"))break}Be&&(!ge||Be<ge)&&(Pe._spread=!0),Pe.end=Object.assign({},ge?b[ge][1].start:ie[1].end),b.splice(ge||Y,0,["exit",Pe,ie[2]]),Y++,O++}if(ie[1].type==="listItemPrefix"){const Le={type:"listItem",_spread:!1,start:Object.assign({},ie[1].start),end:void 0};Pe=Le,b.splice(Y,0,["enter",Le,ie[2]]),Y++,O++,Be=void 0,je=!0}}}return b[I][1]._spread=be,O}function l(b,I){return O;function O(Y){a.call(this,b(Y),Y),I&&I.call(this,Y)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(b,I,O){this.stack[this.stack.length-1].children.push(b),this.stack.push(b),this.tokenStack.push([I,O||void 0]),b.position={start:we(I.start),end:void 0}}function u(b){return I;function I(O){b&&b.call(this,O),c.call(this,O)}}function c(b,I){const O=this.stack.pop(),Y=this.tokenStack.pop();if(Y)Y[0].type!==b.type&&(I?I.call(this,b,Y[0]):(Y[1]||bn).call(this,b,Y[0]));else throw new Error("Cannot close `"+b.type+"` ("+Ue({start:b.start,end:b.end})+"): it’s not open");O.position.end=we(b.end)}function f(){return $t(this.stack.pop())}function s(){this.data.expectingFirstListItemValue=!0}function h(b){if(this.data.expectingFirstListItemValue){const I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(b),10),this.data.expectingFirstListItemValue=void 0}}function p(){const b=this.resume(),I=this.stack[this.stack.length-1];I.lang=b}function x(){const b=this.resume(),I=this.stack[this.stack.length-1];I.meta=b}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const b=this.resume(),I=this.stack[this.stack.length-1];I.value=b.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function d(){const b=this.resume(),I=this.stack[this.stack.length-1];I.value=b.replace(/(\r?\n|\r)$/g,"")}function v(b){const I=this.resume(),O=this.stack[this.stack.length-1];O.label=I,O.identifier=se(this.sliceSerialize(b)).toLowerCase()}function C(){const b=this.resume(),I=this.stack[this.stack.length-1];I.title=b}function A(){const b=this.resume(),I=this.stack[this.stack.length-1];I.url=b}function z(b){const I=this.stack[this.stack.length-1];I.depth||(I.depth=this.sliceSerialize(b).length)}function w(){this.data.setextHeadingSlurpLineEnding=!0}function B(b){const I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(b).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function j(b){const I=this.stack[this.stack.length-1].children;let O=I[I.length-1];(!O||O.type!=="text")&&(O=ri(),O.position={start:we(b.start),end:void 0},I.push(O)),this.stack.push(O)}function y(b){const I=this.stack.pop();I.value+=this.sliceSerialize(b),I.position.end=we(b.end)}function P(b){const I=this.stack[this.stack.length-1];if(this.data.atHardBreak){const O=I.children[I.children.length-1];O.position.end=we(b.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(I.type)&&(j.call(this,b),y.call(this,b))}function L(){this.data.atHardBreak=!0}function $(){const b=this.resume(),I=this.stack[this.stack.length-1];I.value=b}function X(){const b=this.resume(),I=this.stack[this.stack.length-1];I.value=b}function q(){const b=this.resume(),I=this.stack[this.stack.length-1];I.value=b}function R(){const b=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=I,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function D(){const b=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=I,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function J(b){const I=this.sliceSerialize(b),O=this.stack[this.stack.length-2];O.label=Yo(I),O.identifier=se(I).toLowerCase()}function ue(){const b=this.stack[this.stack.length-1],I=this.resume(),O=this.stack[this.stack.length-1];this.data.inReference=!0,O.type==="link"?O.children=b.children:O.alt=I}function m(){const b=this.resume(),I=this.stack[this.stack.length-1];I.url=b}function ye(){const b=this.resume(),I=this.stack[this.stack.length-1];I.title=b}function he(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function ke(b){const I=this.resume(),O=this.stack[this.stack.length-1];O.label=I,O.identifier=se(this.sliceSerialize(b)).toLowerCase(),this.data.referenceType="full"}function Ce(b){this.data.characterReferenceType=b.type}function G(b){const I=this.sliceSerialize(b),O=this.data.characterReferenceType;let Y;O?(Y=lr(I,O==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Y=Vt(I);const Q=this.stack[this.stack.length-1];Q.value+=Y}function Ne(b){const I=this.stack.pop();I.position.end=we(b.end)}function me(b){y.call(this,b);const I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(b)}function Ae(b){y.call(this,b);const I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(b)}function Te(){return{type:"blockquote",children:[]}}function Kt(){return{type:"code",lang:null,meta:null,value:""}}function Jr(){return{type:"inlineCode",value:""}}function Kr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Gr(){return{type:"emphasis",children:[]}}function Gt(){return{type:"heading",depth:0,children:[]}}function Zt(){return{type:"break"}}function en(){return{type:"html",value:""}}function Zr(){return{type:"image",title:null,url:"",alt:null}}function tn(){return{type:"link",title:null,url:"",children:[]}}function nn(b){return{type:"list",ordered:b.type==="listOrdered",start:null,spread:b._spread,children:[]}}function ei(b){return{type:"listItem",spread:b._spread,checked:null,children:[]}}function ti(){return{type:"paragraph",children:[]}}function ni(){return{type:"strong",children:[]}}function ri(){return{type:"text",value:""}}function ii(){return{type:"thematicBreak"}}}function we(e){return{line:e.line,column:e.column,offset:e.offset}}function dr(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?dr(e,r):Go(e,r)}}function Go(e,n){let t;for(t in n)if(gr.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function bn(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Ue({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Ue({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Ue({start:n.start,end:n.end})+") is still open")}function Zo(e){const n=this;n.parser=t;function t(r){return Jo(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function ea(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function ta(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
5
5
  `}]}function na(e,n){const t=n.value?n.value+`
6
- `:"",r={},i=n.lang?n.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(l.data={meta:n.meta}),e.patch(n,l),l=e.applyData(n,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(n,l),l}function ra(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ia(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function la(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),i=Oe(r.toLowerCase()),l=e.footnoteOrder.indexOf(r);let o,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=l+1,a+=1,e.footnoteCounts.set(r,a);const u={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+i,id:t+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,u);const c={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(n,c),e.applyData(n,c)}function oa(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function aa(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function dr(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const i=e.all(n),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function ua(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return dr(e,n);const i={src:Oe(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,l),e.applyData(n,l)}function sa(e,n){const t={src:Oe(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function ca(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function fa(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return dr(e,n);const i={href:Oe(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function pa(e,n){const t={href:Oe(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function ha(e,n,t){const r=e.all(n),i=t?ma(t):xr(n),l={},o=[];if(typeof n.checked=="boolean"){const f=r[0];let s;f&&f.type==="element"&&f.tagName==="p"?s=f:(s={type:"element",tagName:"p",properties:{},children:[]},r.unshift(s)),s.children.length>0&&s.children.unshift({type:"text",value:" "}),s.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const f=r[a];(i||a!==0||f.type!=="element"||f.tagName!=="p")&&o.push({type:"text",value:`
6
+ `:"",r={},i=n.lang?n.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(l.data={meta:n.meta}),e.patch(n,l),l=e.applyData(n,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(n,l),l}function ra(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ia(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function la(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),i=Oe(r.toLowerCase()),l=e.footnoteOrder.indexOf(r);let o,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=l+1,a+=1,e.footnoteCounts.set(r,a);const u={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+i,id:t+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,u);const c={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(n,c),e.applyData(n,c)}function oa(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function aa(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function xr(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const i=e.all(n),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function ua(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return xr(e,n);const i={src:Oe(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,l),e.applyData(n,l)}function sa(e,n){const t={src:Oe(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function ca(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function fa(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return xr(e,n);const i={href:Oe(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function pa(e,n){const t={href:Oe(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function ha(e,n,t){const r=e.all(n),i=t?ma(t):yr(n),l={},o=[];if(typeof n.checked=="boolean"){const f=r[0];let s;f&&f.type==="element"&&f.tagName==="p"?s=f:(s={type:"element",tagName:"p",properties:{},children:[]},r.unshift(s)),s.children.length>0&&s.children.unshift({type:"text",value:" "}),s.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const f=r[a];(i||a!==0||f.type!=="element"||f.tagName!=="p")&&o.push({type:"text",value:`
7
7
  `}),f.type==="element"&&f.tagName==="p"&&!i?o.push(...f.children):o.push(f)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:`
8
- `});const c={type:"element",tagName:"li",properties:l,children:o};return e.patch(n,c),e.applyData(n,c)}function ma(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r<t.length;)n=xr(t[r])}return n}function xr(e){const n=e.spread;return n??e.children.length>1}function ga(e,n){const t={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const l={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,l),e.applyData(n,l)}function da(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function xa(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function ya(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ka(e,n){const t=e.all(n),r=t.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],o),i.push(o)}if(t.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},a=jt(n.children[1]),u=Jn(n.children[n.children.length-1]);a&&u&&(o.position={start:a,end:u}),i.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,l),e.applyData(n,l)}function ba(e,n,t){const r=t?t.children:void 0,i=(r?r.indexOf(n):1)===0?"th":"td",l=t&&t.type==="table"?t.align:void 0,o=l?l.length:n.children.length;let a=-1;const u=[];for(;++a<o;){const f=n.children[a],s={},h=l?l[a]:void 0;h&&(s.align=h);let p={type:"element",tagName:i,properties:s,children:[]};f&&(p.children=e.all(f),e.patch(f,p),p=e.applyData(f,p)),u.push(p)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(n,c),e.applyData(n,c)}function wa(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}var wn=9,vn=32;function va(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),i=0;const l=[];for(;r;)l.push(Cn(n.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return l.push(Cn(n.slice(i),i>0,!1)),l.join("")}function Cn(e,n,t){let r=0,i=e.length;if(n){let l=e.codePointAt(r);for(;l===wn||l===vn;)r++,l=e.codePointAt(r)}if(t){let l=e.codePointAt(i-1);for(;l===wn||l===vn;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Ca(e,n){const t={type:"text",value:va(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function Sa(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}var Ea={blockquote:ea,break:ta,code:na,delete:ra,emphasis:ia,footnoteReference:la,heading:oa,html:aa,imageReference:ua,image:sa,inlineCode:ca,linkReference:fa,link:pa,listItem:ha,list:ga,paragraph:da,root:xa,strong:ya,table:ka,tableCell:wa,tableRow:ba,text:Ca,thematicBreak:Sa,toml:Ge,yaml:Ge,definition:Ge,footnoteDefinition:Ge};function Ge(){}var Sn=typeof self=="object"?self:globalThis,Ia=(e,n)=>{const t=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,o]=n[i];switch(l){case 0:case-1:return t(o,i);case 1:{const a=t([],i);for(const u of o)a.push(r(u));return a}case 2:{const a=t({},i);for(const[u,c]of o)a[r(u)]=r(c);return a}case 3:return t(new Date(o),i);case 4:{const{source:a,flags:u}=o;return t(new RegExp(a,u),i)}case 5:{const a=t(new Map,i);for(const[u,c]of o)a.set(r(u),r(c));return a}case 6:{const a=t(new Set,i);for(const u of o)a.add(r(u));return a}case 7:{const{name:a,message:u}=o;return t(new Sn[a](u),i)}case 8:return t(BigInt(o),i);case"BigInt":return t(Object(BigInt(o)),i);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:a}=new Uint8Array(o);return t(new DataView(a),o)}}return t(new Sn[l](o),i)};return r},En=e=>Ia(new Map,e)(0),ze="",{toString:Aa}={},{keys:Ta}=Object,qe=e=>{const n=typeof e;if(n!=="object"||!e)return[0,n];const t=Aa.call(e).slice(8,-1);switch(t){case"Array":return[1,ze];case"Object":return[2,ze];case"Date":return[3,ze];case"RegExp":return[4,ze];case"Map":return[5,ze];case"Set":return[6,ze];case"DataView":return[1,t]}return t.includes("Array")?[1,t]:t.includes("Error")?[7,t]:[2,t]},Ze=([e,n])=>e===0&&(n==="function"||n==="symbol"),Pa=(e,n,t,r)=>{const i=(o,a)=>{const u=r.push(o)-1;return t.set(a,u),u},l=o=>{if(t.has(o))return t.get(o);let[a,u]=qe(o);switch(a){case 0:{let f=o;switch(u){case"bigint":a=8,f=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);f=null;break;case"undefined":return i([-1],o)}return i([a,f],o)}case 1:{if(u){let h=o;return u==="DataView"?h=new Uint8Array(o.buffer):u==="ArrayBuffer"&&(h=new Uint8Array(o)),i([u,[...h]],o)}const f=[],s=i([a,f],o);for(const h of o)f.push(l(h));return s}case 2:{if(u)switch(u){case"BigInt":return i([u,o.toString()],o);case"Boolean":case"Number":case"String":return i([u,o.valueOf()],o)}if(n&&"toJSON"in o)return l(o.toJSON());const f=[],s=i([a,f],o);for(const h of Ta(o))(e||!Ze(qe(o[h])))&&f.push([l(h),l(o[h])]);return s}case 3:return i([a,o.toISOString()],o);case 4:{const{source:f,flags:s}=o;return i([a,{source:f,flags:s}],o)}case 5:{const f=[],s=i([a,f],o);for(const[h,p]of o)(e||!(Ze(qe(h))||Ze(qe(p))))&&f.push([l(h),l(p)]);return s}case 6:{const f=[],s=i([a,f],o);for(const h of o)(e||!Ze(qe(h)))&&f.push(l(h));return s}}const{message:c}=o;return i([a,{name:u,message:c}],o)};return l},In=(e,{json:n,lossy:t}={})=>{const r=[];return Pa(!(n||t),!!n,new Map,r)(e),r},it=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?En(In(e,n)):structuredClone(e):(e,n)=>En(In(e,n));function La(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function za(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function Da(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||La,r=e.options.footnoteBackLabel||za,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const f=e.all(c),s=String(c.identifier).toUpperCase(),h=Oe(s.toLowerCase());let p=0;const x=[],k=e.footnoteCounts.get(s);for(;k!==void 0&&++p<=k;){x.length>0&&x.push({type:"text",value:" "});let v=typeof t=="string"?t:t(u,p);typeof v=="string"&&(v={type:"text",value:v}),x.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,p),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const S=f[f.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const v=S.children[S.children.length-1];v&&v.type==="text"?v.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...x)}else f.push(...x);const d={type:"element",tagName:"li",properties:{id:n+"fn-"+h},children:e.wrap(f,!0)};e.patch(c,d),a.push(d)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...it(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
8
+ `});const c={type:"element",tagName:"li",properties:l,children:o};return e.patch(n,c),e.applyData(n,c)}function ma(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r<t.length;)n=yr(t[r])}return n}function yr(e){const n=e.spread;return n??e.children.length>1}function ga(e,n){const t={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const l={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,l),e.applyData(n,l)}function da(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function xa(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function ya(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ka(e,n){const t=e.all(n),r=t.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],o),i.push(o)}if(t.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},a=jt(n.children[1]),u=Kn(n.children[n.children.length-1]);a&&u&&(o.position={start:a,end:u}),i.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,l),e.applyData(n,l)}function ba(e,n,t){const r=t?t.children:void 0,i=(r?r.indexOf(n):1)===0?"th":"td",l=t&&t.type==="table"?t.align:void 0,o=l?l.length:n.children.length;let a=-1;const u=[];for(;++a<o;){const f=n.children[a],s={},h=l?l[a]:void 0;h&&(s.align=h);let p={type:"element",tagName:i,properties:s,children:[]};f&&(p.children=e.all(f),e.patch(f,p),p=e.applyData(f,p)),u.push(p)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(n,c),e.applyData(n,c)}function wa(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}var wn=9,vn=32;function va(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),i=0;const l=[];for(;r;)l.push(Cn(n.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return l.push(Cn(n.slice(i),i>0,!1)),l.join("")}function Cn(e,n,t){let r=0,i=e.length;if(n){let l=e.codePointAt(r);for(;l===wn||l===vn;)r++,l=e.codePointAt(r)}if(t){let l=e.codePointAt(i-1);for(;l===wn||l===vn;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Ca(e,n){const t={type:"text",value:va(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function Sa(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}var Ea={blockquote:ea,break:ta,code:na,delete:ra,emphasis:ia,footnoteReference:la,heading:oa,html:aa,imageReference:ua,image:sa,inlineCode:ca,linkReference:fa,link:pa,listItem:ha,list:ga,paragraph:da,root:xa,strong:ya,table:ka,tableCell:wa,tableRow:ba,text:Ca,thematicBreak:Sa,toml:Ze,yaml:Ze,definition:Ze,footnoteDefinition:Ze};function Ze(){}var Sn=typeof self=="object"?self:globalThis,Ia=(e,n)=>{const t=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,o]=n[i];switch(l){case 0:case-1:return t(o,i);case 1:{const a=t([],i);for(const u of o)a.push(r(u));return a}case 2:{const a=t({},i);for(const[u,c]of o)a[r(u)]=r(c);return a}case 3:return t(new Date(o),i);case 4:{const{source:a,flags:u}=o;return t(new RegExp(a,u),i)}case 5:{const a=t(new Map,i);for(const[u,c]of o)a.set(r(u),r(c));return a}case 6:{const a=t(new Set,i);for(const u of o)a.add(r(u));return a}case 7:{const{name:a,message:u}=o;return t(new Sn[a](u),i)}case 8:return t(BigInt(o),i);case"BigInt":return t(Object(BigInt(o)),i);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:a}=new Uint8Array(o);return t(new DataView(a),o)}}return t(new Sn[l](o),i)};return r},En=e=>Ia(new Map,e)(0),ze="",{toString:Aa}={},{keys:Ta}=Object,qe=e=>{const n=typeof e;if(n!=="object"||!e)return[0,n];const t=Aa.call(e).slice(8,-1);switch(t){case"Array":return[1,ze];case"Object":return[2,ze];case"Date":return[3,ze];case"RegExp":return[4,ze];case"Map":return[5,ze];case"Set":return[6,ze];case"DataView":return[1,t]}return t.includes("Array")?[1,t]:t.includes("Error")?[7,t]:[2,t]},et=([e,n])=>e===0&&(n==="function"||n==="symbol"),Pa=(e,n,t,r)=>{const i=(o,a)=>{const u=r.push(o)-1;return t.set(a,u),u},l=o=>{if(t.has(o))return t.get(o);let[a,u]=qe(o);switch(a){case 0:{let f=o;switch(u){case"bigint":a=8,f=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);f=null;break;case"undefined":return i([-1],o)}return i([a,f],o)}case 1:{if(u){let h=o;return u==="DataView"?h=new Uint8Array(o.buffer):u==="ArrayBuffer"&&(h=new Uint8Array(o)),i([u,[...h]],o)}const f=[],s=i([a,f],o);for(const h of o)f.push(l(h));return s}case 2:{if(u)switch(u){case"BigInt":return i([u,o.toString()],o);case"Boolean":case"Number":case"String":return i([u,o.valueOf()],o)}if(n&&"toJSON"in o)return l(o.toJSON());const f=[],s=i([a,f],o);for(const h of Ta(o))(e||!et(qe(o[h])))&&f.push([l(h),l(o[h])]);return s}case 3:return i([a,o.toISOString()],o);case 4:{const{source:f,flags:s}=o;return i([a,{source:f,flags:s}],o)}case 5:{const f=[],s=i([a,f],o);for(const[h,p]of o)(e||!(et(qe(h))||et(qe(p))))&&f.push([l(h),l(p)]);return s}case 6:{const f=[],s=i([a,f],o);for(const h of o)(e||!et(qe(h)))&&f.push(l(h));return s}}const{message:c}=o;return i([a,{name:u,message:c}],o)};return l},In=(e,{json:n,lossy:t}={})=>{const r=[];return Pa(!(n||t),!!n,new Map,r)(e),r},lt=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?En(In(e,n)):structuredClone(e):(e,n)=>En(In(e,n));function La(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function za(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function Da(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||La,r=e.options.footnoteBackLabel||za,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const f=e.all(c),s=String(c.identifier).toUpperCase(),h=Oe(s.toLowerCase());let p=0;const x=[],k=e.footnoteCounts.get(s);for(;k!==void 0&&++p<=k;){x.length>0&&x.push({type:"text",value:" "});let v=typeof t=="string"?t:t(u,p);typeof v=="string"&&(v={type:"text",value:v}),x.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,p),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const S=f[f.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const v=S.children[S.children.length-1];v&&v.type==="text"?v.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...x)}else f.push(...x);const d={type:"element",tagName:"li",properties:{id:n+"fn-"+h},children:e.wrap(f,!0)};e.patch(c,d),a.push(d)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...lt(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
9
9
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
10
- `}]}}var ut=(function(e){if(e==null)return Ra;if(typeof e=="function")return st(e);if(typeof e=="object")return Array.isArray(e)?Fa(e):Ma(e);if(typeof e=="string")return _a(e);throw new Error("Expected function, string, or object as test")});function Fa(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=ut(e[t]);return st(r);function r(...i){let l=-1;for(;++l<n.length;)if(n[l].apply(this,i))return!0;return!1}}function Ma(e){const n=e;return st(t);function t(r){const i=r;let l;for(l in e)if(i[l]!==n[l])return!1;return!0}}function _a(e){return st(n);function n(t){return t&&t.type===e}}function st(e){return n;function n(t,r,i){return!!(Oa(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function Ra(){return!0}function Oa(e){return e!==null&&typeof e=="object"&&"type"in e}var yr=[];function kr(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;const l=ut(i),o=r?-1:1;a(e,void 0,[])();function a(u,c,f){const s=u&&typeof u=="object"?u:{};if(typeof s.type=="string"){const p=typeof s.tagName=="string"?s.tagName:typeof s.name=="string"?s.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(u.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=yr,x,k,S;if((!n||l(u,c,f[f.length-1]||void 0))&&(p=Na(t(u,f)),p[0]===!1))return p;if("children"in u&&u.children){const d=u;if(d.children&&p[0]!=="skip")for(k=(r?d.children.length:-1)+o,S=f.concat(d);k>-1&&k<d.children.length;){const v=d.children[k];if(x=a(v,k,S)(),x[0]===!1)return x;k=typeof x[1]=="number"?x[1]:k+o}}return p}}}function Na(e){return Array.isArray(e)?e:typeof e=="number"?[!0,e]:e==null?yr:[e]}function Xt(e,n,t,r){let i,l,o;typeof n=="function"&&typeof t!="function"?(l=void 0,o=n,i=t):(l=n,o=t,i=r),kr(e,l,a,i);function a(u,c){const f=c[c.length-1],s=f?f.children.indexOf(u):void 0;return o(u,s,f)}}var zt={}.hasOwnProperty,Ba={};function ja(e,n){const t=n||Ba,r=new Map,i=new Map,l={all:a,applyData:qa,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Ea,...t.handlers},one:o,options:t,patch:Ha,wrap:$a};return Xt(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const c=u.type==="definition"?r:i,f=String(u.identifier).toUpperCase();c.has(f)||c.set(f,u)}}),l;function o(u,c){const f=u.type,s=l.handlers[f];if(zt.call(l.handlers,f)&&s)return s(l,u,c);if(l.options.passThrough&&l.options.passThrough.includes(f)){if("children"in u){const{children:h,...p}=u,x=it(p);return x.children=l.all(u),x}return it(u)}return(l.options.unknownHandler||Ua)(l,u,c)}function a(u){const c=[];if("children"in u){const f=u.children;let s=-1;for(;++s<f.length;){const h=l.one(f[s],u);if(h){if(s&&f[s-1].type==="break"&&(!Array.isArray(h)&&h.type==="text"&&(h.value=An(h.value)),!Array.isArray(h)&&h.type==="element")){const p=h.children[0];p&&p.type==="text"&&(p.value=An(p.value))}Array.isArray(h)?c.push(...h):c.push(h)}}}return c}}function Ha(e,n){e.position&&(n.position=Pi(e))}function qa(e,n){let t=n;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;typeof r=="string"&&(t.type==="element"?t.tagName=r:t={type:"element",tagName:r,properties:{},children:"children"in t?t.children:[t]}),t.type==="element"&&l&&Object.assign(t.properties,it(l)),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function Ua(e,n){const t=n.data||{},r="value"in n&&!(zt.call(t,"hProperties")||zt.call(t,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function $a(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
10
+ `}]}}var st=(function(e){if(e==null)return Ra;if(typeof e=="function")return ct(e);if(typeof e=="object")return Array.isArray(e)?Fa(e):Ma(e);if(typeof e=="string")return _a(e);throw new Error("Expected function, string, or object as test")});function Fa(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=st(e[t]);return ct(r);function r(...i){let l=-1;for(;++l<n.length;)if(n[l].apply(this,i))return!0;return!1}}function Ma(e){const n=e;return ct(t);function t(r){const i=r;let l;for(l in e)if(i[l]!==n[l])return!1;return!0}}function _a(e){return ct(n);function n(t){return t&&t.type===e}}function ct(e){return n;function n(t,r,i){return!!(Oa(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function Ra(){return!0}function Oa(e){return e!==null&&typeof e=="object"&&"type"in e}var kr=[];function br(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;const l=st(i),o=r?-1:1;a(e,void 0,[])();function a(u,c,f){const s=u&&typeof u=="object"?u:{};if(typeof s.type=="string"){const p=typeof s.tagName=="string"?s.tagName:typeof s.name=="string"?s.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(u.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=kr,x,k,S;if((!n||l(u,c,f[f.length-1]||void 0))&&(p=Na(t(u,f)),p[0]===!1))return p;if("children"in u&&u.children){const d=u;if(d.children&&p[0]!=="skip")for(k=(r?d.children.length:-1)+o,S=f.concat(d);k>-1&&k<d.children.length;){const v=d.children[k];if(x=a(v,k,S)(),x[0]===!1)return x;k=typeof x[1]=="number"?x[1]:k+o}}return p}}}function Na(e){return Array.isArray(e)?e:typeof e=="number"?[!0,e]:e==null?kr:[e]}function Xt(e,n,t,r){let i,l,o;typeof n=="function"&&typeof t!="function"?(l=void 0,o=n,i=t):(l=n,o=t,i=r),br(e,l,a,i);function a(u,c){const f=c[c.length-1],s=f?f.children.indexOf(u):void 0;return o(u,s,f)}}var Dt={}.hasOwnProperty,Ba={};function ja(e,n){const t=n||Ba,r=new Map,i=new Map,l={all:a,applyData:qa,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Ea,...t.handlers},one:o,options:t,patch:Ha,wrap:$a};return Xt(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const c=u.type==="definition"?r:i,f=String(u.identifier).toUpperCase();c.has(f)||c.set(f,u)}}),l;function o(u,c){const f=u.type,s=l.handlers[f];if(Dt.call(l.handlers,f)&&s)return s(l,u,c);if(l.options.passThrough&&l.options.passThrough.includes(f)){if("children"in u){const{children:h,...p}=u,x=lt(p);return x.children=l.all(u),x}return lt(u)}return(l.options.unknownHandler||Ua)(l,u,c)}function a(u){const c=[];if("children"in u){const f=u.children;let s=-1;for(;++s<f.length;){const h=l.one(f[s],u);if(h){if(s&&f[s-1].type==="break"&&(!Array.isArray(h)&&h.type==="text"&&(h.value=An(h.value)),!Array.isArray(h)&&h.type==="element")){const p=h.children[0];p&&p.type==="text"&&(p.value=An(p.value))}Array.isArray(h)?c.push(...h):c.push(h)}}}return c}}function Ha(e,n){e.position&&(n.position=Pi(e))}function qa(e,n){let t=n;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;typeof r=="string"&&(t.type==="element"?t.tagName=r:t={type:"element",tagName:r,properties:{},children:"children"in t?t.children:[t]}),t.type==="element"&&l&&Object.assign(t.properties,lt(l)),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function Ua(e,n){const t=n.data||{},r="value"in n&&!(Dt.call(t,"hProperties")||Dt.call(t,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function $a(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
11
11
  `});++r<e.length;)r&&t.push({type:"text",value:`
12
12
  `}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:`
13
13
  `}),t}function An(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function Tn(e,n){const t=ja(e,n),r=t.one(e,void 0),i=Da(t),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&("children"in l,l.children.push({type:"text",value:`
14
- `},i)),l}function Va(e,n){return e&&"run"in e?async function(t,r){const i=Tn(t,{file:r,...n});await e.run(i,r)}:function(t,r){return Tn(t,{file:r,...e||n})}}function Pn(e){if(e)throw e}var Wa=fe.__commonJSMin(((e,n)=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,l=Object.getOwnPropertyDescriptor,o=function(s){return typeof Array.isArray=="function"?Array.isArray(s):r.call(s)==="[object Array]"},a=function(s){if(!s||r.call(s)!=="[object Object]")return!1;var h=t.call(s,"constructor"),p=s.constructor&&s.constructor.prototype&&t.call(s.constructor.prototype,"isPrototypeOf");if(s.constructor&&!h&&!p)return!1;var x;for(x in s);return typeof x>"u"||t.call(s,x)},u=function(s,h){i&&h.name==="__proto__"?i(s,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):s[h.name]=h.newValue},c=function(s,h){if(h==="__proto__")if(t.call(s,h)){if(l)return l(s,h).value}else return;return s[h]};n.exports=function f(){var s,h,p,x,k,S,d=arguments[0],v=1,C=arguments.length,A=!1;for(typeof d=="boolean"&&(A=d,d=arguments[1]||{},v=2),(d==null||typeof d!="object"&&typeof d!="function")&&(d={});v<C;++v)if(s=arguments[v],s!=null)for(h in s)p=c(d,h),x=c(s,h),d!==x&&(A&&x&&(a(x)||(k=o(x)))?(k?(k=!1,S=p&&o(p)?p:[]):S=p&&a(p)?p:{},u(d,{name:h,newValue:f(A,S,x)})):typeof x<"u"&&u(d,{name:h,newValue:x}));return d}}));function Dt(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Xa(){const e=[],n={run:t,use:r};return n;function t(...i){let l=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(u,...c){const f=e[++l];let s=-1;if(u){o(u);return}for(;++s<i.length;)(c[s]===null||c[s]===void 0)&&(c[s]=i[s]);i=c,f?Ya(f,a)(...c):o(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function Ya(e,n){let t;return r;function r(...o){const a=e.length>o.length;let u;a&&o.push(i);try{u=e.apply(this,o)}catch(c){const f=c;if(a&&t)throw f;return i(f)}a||(u&&u.then&&typeof u.then=="function"?u.then(l,i):u instanceof Error?i(u):l(u))}function i(o,...a){t||(t=!0,n(o,...a))}function l(o){i(null,o)}}var ce={basename:Qa,dirname:Ja,extname:Ka,join:Ga,sep:"/"};function Qa(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Ke(e);let t=0,r=-1,i=e.length,l;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let o=-1,a=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else o<0&&(l=!0,o=i+1),a>-1&&(e.codePointAt(i)===n.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return t===r?r=o:r<0&&(r=e.length),e.slice(t,r)}function Ja(e){if(Ke(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Ka(e){Ke(e);let n=e.length,t=-1,r=0,i=-1,l=0,o;for(;n--;){const a=e.codePointAt(n);if(a===47){if(o){r=n+1;break}continue}t<0&&(o=!0,t=n+1),a===46?i<0?i=n:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||t<0||l===0||l===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function Ga(...e){let n=-1,t;for(;++n<e.length;)Ke(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":Za(t)}function Za(e){Ke(e);const n=e.codePointAt(0)===47;let t=eu(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function eu(e,n){let t="",r=0,i=-1,l=0,o=-1,a,u;for(;++o<=e.length;){if(o<e.length)a=e.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||l===1))if(i!==o-1&&l===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(u=t.lastIndexOf("/"),u!==t.length-1){u<0?(t="",r=0):(t=t.slice(0,u),r=t.length-1-t.lastIndexOf("/")),i=o,l=0;continue}}else if(t.length>0){t="",r=0,i=o,l=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,o):t=e.slice(i+1,o),r=o-i-1;i=o,l=0}else a===46&&l>-1?l++:l=-1}return t}function Ke(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var tu={cwd:nu};function nu(){return"/"}function Ft(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function ru(e){if(typeof e=="string")e=new URL(e);else if(!Ft(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return iu(e)}function iu(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){const r=n.codePointAt(t+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(n)}var mt=["history","path","basename","stem","extname","dirname"],br=class{constructor(e){let n;e?Ft(e)?n={path:e}:typeof e=="string"||lu(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":tu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let t=-1;for(;++t<mt.length;){const i=mt[t];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let r;for(r in n)mt.includes(r)||(this[r]=n[r])}get basename(){return typeof this.path=="string"?ce.basename(this.path):void 0}set basename(e){dt(e,"basename"),gt(e,"basename"),this.path=ce.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?ce.dirname(this.path):void 0}set dirname(e){Ln(this.basename,"dirname"),this.path=ce.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?ce.extname(this.path):void 0}set extname(e){if(gt(e,"extname"),Ln(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ce.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Ft(e)&&(e=ru(e)),dt(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?ce.basename(this.path,this.extname):void 0}set stem(e){dt(e,"stem"),gt(e,"stem"),this.path=ce.join(this.dirname||"",e+(this.extname||""))}fail(e,n,t){const r=this.message(e,n,t);throw r.fatal=!0,r}info(e,n,t){const r=this.message(e,n,t);return r.fatal=void 0,r}message(e,n,t){const r=new ee(e,n,t);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}};function gt(e,n){if(e&&e.includes(ce.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ce.sep+"`")}function dt(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function Ln(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function lu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var ou=(function(e){const n=this.constructor.prototype,t=n[e],r=function(){return t.apply(r,arguments)};return Object.setPrototypeOf(r,n),r}),xt=fe.__toESM(Wa(),1),au={}.hasOwnProperty,uu=class wr extends ou{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=Xa()}copy(){const n=new wr;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data((0,xt.default)(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(bt("data",this.frozen),this.namespace[n]=t,this):au.call(this.namespace,n)&&this.namespace[n]||void 0:n?(bt("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=et(n),r=this.parser||this.Parser;return yt("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),yt("process",this.parser||this.Parser),kt("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(l,o){const a=et(n),u=r.parse(a);r.run(u,a,function(f,s,h){if(f||!s||!h)return c(f);const p=s,x=r.stringify(p,h);fu(x)?h.value=x:h.result=x,c(f,h)});function c(f,s){f||!s?o(f):l?l(s):t(void 0,s)}}}processSync(n){let t=!1,r;return this.freeze(),yt("processSync",this.parser||this.Parser),kt("processSync",this.compiler||this.Compiler),this.process(n,i),Dn("processSync","process",t),r;function i(l,o){t=!0,Pn(l),r=o}}run(n,t,r){zn(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?l(void 0,r):new Promise(l);function l(o,a){const u=et(t);i.run(n,u,c);function c(f,s,h){const p=s||n;f?a(f):o?o(p):r(void 0,p,h)}}}runSync(n,t){let r=!1,i;return this.run(n,t,l),Dn("runSync","run",r),i;function l(o,a){Pn(o),i=a,r=!0}}stringify(n,t){this.freeze();const r=et(t),i=this.compiler||this.Compiler;return kt("stringify",i),zn(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if(bt("use",this.frozen),n!=null)if(typeof n=="function")u(n,t);else if(typeof n=="object")Array.isArray(n)?a(n):o(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function l(c){if(typeof c=="function")u(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[f,...s]=c;u(f,s)}else o(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function o(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");a(c.plugins),c.settings&&(i.settings=(0,xt.default)(!0,i.settings,c.settings))}function a(c){let f=-1;if(c!=null)if(Array.isArray(c))for(;++f<c.length;){const s=c[f];l(s)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function u(c,f){let s=-1,h=-1;for(;++s<r.length;)if(r[s][0]===c){h=s;break}if(h===-1)r.push([c,...f]);else if(f.length>0){let[p,...x]=f;const k=r[h][1];Dt(k)&&Dt(p)&&(p=(0,xt.default)(!0,k,p)),r[h]=[c,p,...x]}}}},su=new uu().freeze();function yt(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function kt(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function bt(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function zn(e){if(!Dt(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Dn(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function et(e){return cu(e)?e:new br(e)}function cu(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function fu(e){return typeof e=="string"||pu(e)}function pu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Fn=[],Mn={allowDangerousHtml:!0},hu=/^(https?|ircs?|mailto|xmpp)$/i,mu=[{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 gu(e){const n=du(e),t=xu(e);return yu(n.runSync(n.parse(t),t),e)}function du(e){const n=e.rehypePlugins||Fn,t=e.remarkPlugins||Fn,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Mn}:Mn;return su().use(Zo).use(t).use(Va,r).use(n)}function xu(e){const n=e.children||"",t=new br;return typeof n=="string"?t.value=n:""+n,t}function yu(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,l=n.disallowedElements,o=n.skipHtml,a=n.unwrapDisallowed,u=n.urlTransform||ku;for(const f of mu)Object.hasOwn(n,f.from)&&""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+f.id;return n.className&&(e={type:"element",tagName:"div",properties:{className:n.className},children:e.type==="root"?e.children:[e]}),Xt(e,c),_i(e,{Fragment:T.Fragment,components:i,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0});function c(f,s,h){if(f.type==="raw"&&h&&typeof s=="number")return o?h.children.splice(s,1):h.children[s]={type:"text",value:f.value},s;if(f.type==="element"){let p;for(p in ft)if(Object.hasOwn(ft,p)&&Object.hasOwn(f.properties,p)){const x=f.properties[p],k=ft[p];(k===null||k.includes(f.tagName))&&(f.properties[p]=u(String(x||""),p,f))}}if(f.type==="element"){let p=t?!t.includes(f.tagName):l?l.includes(f.tagName):!1;if(!p&&r&&typeof s=="number"&&(p=!r(f,s,h)),p&&h&&typeof s=="number")return a&&f.children?h.children.splice(s,1,...f.children):h.children.splice(s,1),s}}}function ku(e){const n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return n===-1||i!==-1&&n>i||t!==-1&&n>t||r!==-1&&n>r||hu.test(e.slice(0,n))?e:""}function _n(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+n.length);return r}function bu(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function wu(e,n,t){const r=ut((t||{}).ignore||[]),i=vu(n);let l=-1;for(;++l<i.length;)kr(e,"text",o);function o(u,c){let f=-1,s;for(;++f<c.length;){const h=c[f],p=s?s.children:void 0;if(r(h,p?p.indexOf(h):void 0,s))return;s=h}if(s)return a(u,c)}function a(u,c){const f=c[c.length-1],s=i[l][0],h=i[l][1];let p=0;const x=f.children.indexOf(u);let k=!1,S=[];s.lastIndex=0;let d=s.exec(u.value);for(;d;){const v=d.index,C={index:d.index,input:d.input,stack:[...c,u]};let A=h(...d,C);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?s.lastIndex=v+1:(p!==v&&S.push({type:"text",value:u.value.slice(p,v)}),Array.isArray(A)?S.push(...A):A&&S.push(A),p=v+d[0].length,k=!0),!s.global)break;d=s.exec(u.value)}return k?(p<u.value.length&&S.push({type:"text",value:u.value.slice(p)}),f.children.splice(x,1,...S)):S=[u],x+S.length}}function vu(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<t.length;){const i=t[r];n.push([Cu(i[0]),Su(i[1])])}return n}function Cu(e){return typeof e=="string"?new RegExp(bu(e),"g"):e}function Su(e){return typeof e=="function"?e:function(){return e}}var wt="phrasing",vt=["autolink","link","image","label"];function Eu(){return{transforms:[Du],enter:{literalAutolink:Au,literalAutolinkEmail:Ct,literalAutolinkHttp:Ct,literalAutolinkWww:Ct},exit:{literalAutolink:zu,literalAutolinkEmail:Lu,literalAutolinkHttp:Tu,literalAutolinkWww:Pu}}}function Iu(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:wt,notInConstruct:vt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:wt,notInConstruct:vt},{character:":",before:"[ps]",after:"\\/",inConstruct:wt,notInConstruct:vt}]}}function Au(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ct(e){this.config.enter.autolinkProtocol.call(this,e)}function Tu(e){this.config.exit.autolinkProtocol.call(this,e)}function Pu(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function Lu(e){this.config.exit.autolinkEmail.call(this,e)}function zu(e){this.exit(e)}function Du(e){wu(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Fu],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Mu]],{ignore:["link","linkReference"]})}function Fu(e,n,t,r,i){let l="";if(!vr(i)||(/^w/i.test(n)&&(t=n+t,n="",l="http://"),!_u(t)))return!1;const o=Ru(t+r);if(!o[0])return!1;const a={type:"link",title:null,url:l+n+o[0],children:[{type:"text",value:n+o[0]}]};return o[1]?[a,{type:"text",value:o[1]}]:a}function Mu(e,n,t,r){return!vr(r,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function _u(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function Ru(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const i=_n(e,"(");let l=_n(e,")");for(;r!==-1&&i>l;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),l++;return[e,t]}function vr(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Ee(t)||ot(t))&&(!n||t!==47)}Cr.peek=Vu;function Ou(){this.buffer()}function Nu(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Bu(){this.buffer()}function ju(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Hu(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=se(this.sliceSerialize(e)).toLowerCase(),t.label=n}function qu(e){this.exit(e)}function Uu(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=se(this.sliceSerialize(e)).toLowerCase(),t.label=n}function $u(e){this.exit(e)}function Vu(){return"["}function Cr(e,n,t,r){const i=t.createTracker(r);let l=i.move("[^");const o=t.enter("footnoteReference"),a=t.enter("reference");return l+=i.move(t.safe(t.associationId(e),{after:"]",before:l})),a(),o(),l+=i.move("]"),l}function Wu(){return{enter:{gfmFootnoteCallString:Ou,gfmFootnoteCall:Nu,gfmFootnoteDefinitionLabelString:Bu,gfmFootnoteDefinition:ju},exit:{gfmFootnoteCallString:Hu,gfmFootnoteCall:qu,gfmFootnoteDefinitionLabelString:Uu,gfmFootnoteDefinition:$u}}}function Xu(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:Cr},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,i,l,o){const a=l.createTracker(o);let u=a.move("[^");const c=l.enter("footnoteDefinition"),f=l.enter("label");return u+=a.move(l.safe(l.associationId(r),{before:u,after:"]"})),f(),u+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),u+=a.move((n?`
15
- `:" ")+l.indentLines(l.containerFlow(r,a.current()),n?Sr:Yu))),c(),u}}function Yu(e,n,t){return n===0?e:Sr(e,n,t)}function Sr(e,n,t){return(t?"":" ")+e}var Qu=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Er.peek=es;function Ju(){return{canContainEols:["delete"],enter:{strikethrough:Gu},exit:{strikethrough:Zu}}}function Ku(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Qu}],handlers:{delete:Er}}}function Gu(e){this.enter({type:"delete",children:[]},e)}function Zu(e){this.exit(e)}function Er(e,n,t,r){const i=t.createTracker(r),l=t.enter("strikethrough");let o=i.move("~~");return o+=t.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),l(),o}function es(){return"~"}function ts(e){return e.length}function ns(e,n){const t=n||{},r=(t.align||[]).concat(),i=t.stringLength||ts,l=[],o=[],a=[],u=[];let c=0,f=-1;for(;++f<e.length;){const k=[],S=[];let d=-1;for(e[f].length>c&&(c=e[f].length);++d<e[f].length;){const v=rs(e[f][d]);if(t.alignDelimiters!==!1){const C=i(v);S[d]=C,(u[d]===void 0||C>u[d])&&(u[d]=C)}k.push(v)}o[f]=k,a[f]=S}let s=-1;if(typeof r=="object"&&"length"in r)for(;++s<c;)l[s]=Rn(r[s]);else{const k=Rn(r);for(;++s<c;)l[s]=k}s=-1;const h=[],p=[];for(;++s<c;){const k=l[s];let S="",d="";k===99?(S=":",d=":"):k===108?S=":":k===114&&(d=":");let v=t.alignDelimiters===!1?1:Math.max(1,u[s]-S.length-d.length);const C=S+"-".repeat(v)+d;t.alignDelimiters!==!1&&(v=S.length+v+d.length,v>u[s]&&(u[s]=v),p[s]=v),h[s]=C}o.splice(1,0,h),a.splice(1,0,p),f=-1;const x=[];for(;++f<o.length;){const k=o[f],S=a[f];s=-1;const d=[];for(;++s<c;){const v=k[s]||"";let C="",A="";if(t.alignDelimiters!==!1){const z=u[s]-(S[s]||0),w=l[s];w===114?C=" ".repeat(z):w===99?z%2?(C=" ".repeat(z/2+.5),A=" ".repeat(z/2-.5)):(C=" ".repeat(z/2),A=C):A=" ".repeat(z)}t.delimiterStart!==!1&&!s&&d.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&v==="")&&(t.delimiterStart!==!1||s)&&d.push(" "),t.alignDelimiters!==!1&&d.push(C),d.push(v),t.alignDelimiters!==!1&&d.push(A),t.padding!==!1&&d.push(" "),(t.delimiterEnd!==!1||s!==c-1)&&d.push("|")}x.push(t.delimiterEnd===!1?d.join("").replace(/ +$/,""):d.join(""))}return x.join(`
14
+ `},i)),l}function Va(e,n){return e&&"run"in e?async function(t,r){const i=Tn(t,{file:r,...n});await e.run(i,r)}:function(t,r){return Tn(t,{file:r,...e||n})}}function Pn(e){if(e)throw e}var Wa=fe.__commonJSMin(((e,n)=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,l=Object.getOwnPropertyDescriptor,o=function(s){return typeof Array.isArray=="function"?Array.isArray(s):r.call(s)==="[object Array]"},a=function(s){if(!s||r.call(s)!=="[object Object]")return!1;var h=t.call(s,"constructor"),p=s.constructor&&s.constructor.prototype&&t.call(s.constructor.prototype,"isPrototypeOf");if(s.constructor&&!h&&!p)return!1;var x;for(x in s);return typeof x>"u"||t.call(s,x)},u=function(s,h){i&&h.name==="__proto__"?i(s,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):s[h.name]=h.newValue},c=function(s,h){if(h==="__proto__")if(t.call(s,h)){if(l)return l(s,h).value}else return;return s[h]};n.exports=function f(){var s,h,p,x,k,S,d=arguments[0],v=1,C=arguments.length,A=!1;for(typeof d=="boolean"&&(A=d,d=arguments[1]||{},v=2),(d==null||typeof d!="object"&&typeof d!="function")&&(d={});v<C;++v)if(s=arguments[v],s!=null)for(h in s)p=c(d,h),x=c(s,h),d!==x&&(A&&x&&(a(x)||(k=o(x)))?(k?(k=!1,S=p&&o(p)?p:[]):S=p&&a(p)?p:{},u(d,{name:h,newValue:f(A,S,x)})):typeof x<"u"&&u(d,{name:h,newValue:x}));return d}}));function Ft(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Xa(){const e=[],n={run:t,use:r};return n;function t(...i){let l=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(u,...c){const f=e[++l];let s=-1;if(u){o(u);return}for(;++s<i.length;)(c[s]===null||c[s]===void 0)&&(c[s]=i[s]);i=c,f?Ya(f,a)(...c):o(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function Ya(e,n){let t;return r;function r(...o){const a=e.length>o.length;let u;a&&o.push(i);try{u=e.apply(this,o)}catch(c){const f=c;if(a&&t)throw f;return i(f)}a||(u&&u.then&&typeof u.then=="function"?u.then(l,i):u instanceof Error?i(u):l(u))}function i(o,...a){t||(t=!0,n(o,...a))}function l(o){i(null,o)}}var ce={basename:Qa,dirname:Ja,extname:Ka,join:Ga,sep:"/"};function Qa(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Ge(e);let t=0,r=-1,i=e.length,l;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let o=-1,a=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else o<0&&(l=!0,o=i+1),a>-1&&(e.codePointAt(i)===n.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return t===r?r=o:r<0&&(r=e.length),e.slice(t,r)}function Ja(e){if(Ge(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Ka(e){Ge(e);let n=e.length,t=-1,r=0,i=-1,l=0,o;for(;n--;){const a=e.codePointAt(n);if(a===47){if(o){r=n+1;break}continue}t<0&&(o=!0,t=n+1),a===46?i<0?i=n:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||t<0||l===0||l===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function Ga(...e){let n=-1,t;for(;++n<e.length;)Ge(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":Za(t)}function Za(e){Ge(e);const n=e.codePointAt(0)===47;let t=eu(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function eu(e,n){let t="",r=0,i=-1,l=0,o=-1,a,u;for(;++o<=e.length;){if(o<e.length)a=e.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||l===1))if(i!==o-1&&l===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(u=t.lastIndexOf("/"),u!==t.length-1){u<0?(t="",r=0):(t=t.slice(0,u),r=t.length-1-t.lastIndexOf("/")),i=o,l=0;continue}}else if(t.length>0){t="",r=0,i=o,l=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,o):t=e.slice(i+1,o),r=o-i-1;i=o,l=0}else a===46&&l>-1?l++:l=-1}return t}function Ge(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var tu={cwd:nu};function nu(){return"/"}function Mt(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function ru(e){if(typeof e=="string")e=new URL(e);else if(!Mt(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return iu(e)}function iu(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){const r=n.codePointAt(t+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(n)}var gt=["history","path","basename","stem","extname","dirname"],wr=class{constructor(e){let n;e?Mt(e)?n={path:e}:typeof e=="string"||lu(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":tu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let t=-1;for(;++t<gt.length;){const i=gt[t];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let r;for(r in n)gt.includes(r)||(this[r]=n[r])}get basename(){return typeof this.path=="string"?ce.basename(this.path):void 0}set basename(e){xt(e,"basename"),dt(e,"basename"),this.path=ce.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?ce.dirname(this.path):void 0}set dirname(e){Ln(this.basename,"dirname"),this.path=ce.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?ce.extname(this.path):void 0}set extname(e){if(dt(e,"extname"),Ln(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ce.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Mt(e)&&(e=ru(e)),xt(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?ce.basename(this.path,this.extname):void 0}set stem(e){xt(e,"stem"),dt(e,"stem"),this.path=ce.join(this.dirname||"",e+(this.extname||""))}fail(e,n,t){const r=this.message(e,n,t);throw r.fatal=!0,r}info(e,n,t){const r=this.message(e,n,t);return r.fatal=void 0,r}message(e,n,t){const r=new ee(e,n,t);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}};function dt(e,n){if(e&&e.includes(ce.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ce.sep+"`")}function xt(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function Ln(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function lu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var ou=(function(e){const n=this.constructor.prototype,t=n[e],r=function(){return t.apply(r,arguments)};return Object.setPrototypeOf(r,n),r}),yt=fe.__toESM(Wa(),1),au={}.hasOwnProperty,uu=class vr extends ou{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=Xa()}copy(){const n=new vr;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data((0,yt.default)(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(wt("data",this.frozen),this.namespace[n]=t,this):au.call(this.namespace,n)&&this.namespace[n]||void 0:n?(wt("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=tt(n),r=this.parser||this.Parser;return kt("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),kt("process",this.parser||this.Parser),bt("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(l,o){const a=tt(n),u=r.parse(a);r.run(u,a,function(f,s,h){if(f||!s||!h)return c(f);const p=s,x=r.stringify(p,h);fu(x)?h.value=x:h.result=x,c(f,h)});function c(f,s){f||!s?o(f):l?l(s):t(void 0,s)}}}processSync(n){let t=!1,r;return this.freeze(),kt("processSync",this.parser||this.Parser),bt("processSync",this.compiler||this.Compiler),this.process(n,i),Dn("processSync","process",t),r;function i(l,o){t=!0,Pn(l),r=o}}run(n,t,r){zn(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?l(void 0,r):new Promise(l);function l(o,a){const u=tt(t);i.run(n,u,c);function c(f,s,h){const p=s||n;f?a(f):o?o(p):r(void 0,p,h)}}}runSync(n,t){let r=!1,i;return this.run(n,t,l),Dn("runSync","run",r),i;function l(o,a){Pn(o),i=a,r=!0}}stringify(n,t){this.freeze();const r=tt(t),i=this.compiler||this.Compiler;return bt("stringify",i),zn(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if(wt("use",this.frozen),n!=null)if(typeof n=="function")u(n,t);else if(typeof n=="object")Array.isArray(n)?a(n):o(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function l(c){if(typeof c=="function")u(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[f,...s]=c;u(f,s)}else o(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function o(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");a(c.plugins),c.settings&&(i.settings=(0,yt.default)(!0,i.settings,c.settings))}function a(c){let f=-1;if(c!=null)if(Array.isArray(c))for(;++f<c.length;){const s=c[f];l(s)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function u(c,f){let s=-1,h=-1;for(;++s<r.length;)if(r[s][0]===c){h=s;break}if(h===-1)r.push([c,...f]);else if(f.length>0){let[p,...x]=f;const k=r[h][1];Ft(k)&&Ft(p)&&(p=(0,yt.default)(!0,k,p)),r[h]=[c,p,...x]}}}},su=new uu().freeze();function kt(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function bt(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function wt(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function zn(e){if(!Ft(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Dn(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function tt(e){return cu(e)?e:new wr(e)}function cu(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function fu(e){return typeof e=="string"||pu(e)}function pu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Fn=[],Mn={allowDangerousHtml:!0},hu=/^(https?|ircs?|mailto|xmpp)$/i,mu=[{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 gu(e){const n=du(e),t=xu(e);return yu(n.runSync(n.parse(t),t),e)}function du(e){const n=e.rehypePlugins||Fn,t=e.remarkPlugins||Fn,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Mn}:Mn;return su().use(Zo).use(t).use(Va,r).use(n)}function xu(e){const n=e.children||"",t=new wr;return typeof n=="string"?t.value=n:""+n,t}function yu(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,l=n.disallowedElements,o=n.skipHtml,a=n.unwrapDisallowed,u=n.urlTransform||ku;for(const f of mu)Object.hasOwn(n,f.from)&&""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+f.id;return n.className&&(e={type:"element",tagName:"div",properties:{className:n.className},children:e.type==="root"?e.children:[e]}),Xt(e,c),_i(e,{Fragment:T.Fragment,components:i,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0});function c(f,s,h){if(f.type==="raw"&&h&&typeof s=="number")return o?h.children.splice(s,1):h.children[s]={type:"text",value:f.value},s;if(f.type==="element"){let p;for(p in pt)if(Object.hasOwn(pt,p)&&Object.hasOwn(f.properties,p)){const x=f.properties[p],k=pt[p];(k===null||k.includes(f.tagName))&&(f.properties[p]=u(String(x||""),p,f))}}if(f.type==="element"){let p=t?!t.includes(f.tagName):l?l.includes(f.tagName):!1;if(!p&&r&&typeof s=="number"&&(p=!r(f,s,h)),p&&h&&typeof s=="number")return a&&f.children?h.children.splice(s,1,...f.children):h.children.splice(s,1),s}}}function ku(e){const n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return n===-1||i!==-1&&n>i||t!==-1&&n>t||r!==-1&&n>r||hu.test(e.slice(0,n))?e:""}function _n(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+n.length);return r}function bu(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function wu(e,n,t){const r=st((t||{}).ignore||[]),i=vu(n);let l=-1;for(;++l<i.length;)br(e,"text",o);function o(u,c){let f=-1,s;for(;++f<c.length;){const h=c[f],p=s?s.children:void 0;if(r(h,p?p.indexOf(h):void 0,s))return;s=h}if(s)return a(u,c)}function a(u,c){const f=c[c.length-1],s=i[l][0],h=i[l][1];let p=0;const x=f.children.indexOf(u);let k=!1,S=[];s.lastIndex=0;let d=s.exec(u.value);for(;d;){const v=d.index,C={index:d.index,input:d.input,stack:[...c,u]};let A=h(...d,C);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?s.lastIndex=v+1:(p!==v&&S.push({type:"text",value:u.value.slice(p,v)}),Array.isArray(A)?S.push(...A):A&&S.push(A),p=v+d[0].length,k=!0),!s.global)break;d=s.exec(u.value)}return k?(p<u.value.length&&S.push({type:"text",value:u.value.slice(p)}),f.children.splice(x,1,...S)):S=[u],x+S.length}}function vu(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<t.length;){const i=t[r];n.push([Cu(i[0]),Su(i[1])])}return n}function Cu(e){return typeof e=="string"?new RegExp(bu(e),"g"):e}function Su(e){return typeof e=="function"?e:function(){return e}}var vt="phrasing",Ct=["autolink","link","image","label"];function Eu(){return{transforms:[Du],enter:{literalAutolink:Au,literalAutolinkEmail:St,literalAutolinkHttp:St,literalAutolinkWww:St},exit:{literalAutolink:zu,literalAutolinkEmail:Lu,literalAutolinkHttp:Tu,literalAutolinkWww:Pu}}}function Iu(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:vt,notInConstruct:Ct},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:vt,notInConstruct:Ct},{character:":",before:"[ps]",after:"\\/",inConstruct:vt,notInConstruct:Ct}]}}function Au(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function St(e){this.config.enter.autolinkProtocol.call(this,e)}function Tu(e){this.config.exit.autolinkProtocol.call(this,e)}function Pu(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function Lu(e){this.config.exit.autolinkEmail.call(this,e)}function zu(e){this.exit(e)}function Du(e){wu(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Fu],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Mu]],{ignore:["link","linkReference"]})}function Fu(e,n,t,r,i){let l="";if(!Cr(i)||(/^w/i.test(n)&&(t=n+t,n="",l="http://"),!_u(t)))return!1;const o=Ru(t+r);if(!o[0])return!1;const a={type:"link",title:null,url:l+n+o[0],children:[{type:"text",value:n+o[0]}]};return o[1]?[a,{type:"text",value:o[1]}]:a}function Mu(e,n,t,r){return!Cr(r,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function _u(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function Ru(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const i=_n(e,"(");let l=_n(e,")");for(;r!==-1&&i>l;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),l++;return[e,t]}function Cr(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Ee(t)||at(t))&&(!n||t!==47)}Sr.peek=Vu;function Ou(){this.buffer()}function Nu(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Bu(){this.buffer()}function ju(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Hu(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=se(this.sliceSerialize(e)).toLowerCase(),t.label=n}function qu(e){this.exit(e)}function Uu(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=se(this.sliceSerialize(e)).toLowerCase(),t.label=n}function $u(e){this.exit(e)}function Vu(){return"["}function Sr(e,n,t,r){const i=t.createTracker(r);let l=i.move("[^");const o=t.enter("footnoteReference"),a=t.enter("reference");return l+=i.move(t.safe(t.associationId(e),{after:"]",before:l})),a(),o(),l+=i.move("]"),l}function Wu(){return{enter:{gfmFootnoteCallString:Ou,gfmFootnoteCall:Nu,gfmFootnoteDefinitionLabelString:Bu,gfmFootnoteDefinition:ju},exit:{gfmFootnoteCallString:Hu,gfmFootnoteCall:qu,gfmFootnoteDefinitionLabelString:Uu,gfmFootnoteDefinition:$u}}}function Xu(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:Sr},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,i,l,o){const a=l.createTracker(o);let u=a.move("[^");const c=l.enter("footnoteDefinition"),f=l.enter("label");return u+=a.move(l.safe(l.associationId(r),{before:u,after:"]"})),f(),u+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),u+=a.move((n?`
15
+ `:" ")+l.indentLines(l.containerFlow(r,a.current()),n?Er:Yu))),c(),u}}function Yu(e,n,t){return n===0?e:Er(e,n,t)}function Er(e,n,t){return(t?"":" ")+e}var Qu=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ir.peek=es;function Ju(){return{canContainEols:["delete"],enter:{strikethrough:Gu},exit:{strikethrough:Zu}}}function Ku(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Qu}],handlers:{delete:Ir}}}function Gu(e){this.enter({type:"delete",children:[]},e)}function Zu(e){this.exit(e)}function Ir(e,n,t,r){const i=t.createTracker(r),l=t.enter("strikethrough");let o=i.move("~~");return o+=t.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),l(),o}function es(){return"~"}function ts(e){return e.length}function ns(e,n){const t=n||{},r=(t.align||[]).concat(),i=t.stringLength||ts,l=[],o=[],a=[],u=[];let c=0,f=-1;for(;++f<e.length;){const k=[],S=[];let d=-1;for(e[f].length>c&&(c=e[f].length);++d<e[f].length;){const v=rs(e[f][d]);if(t.alignDelimiters!==!1){const C=i(v);S[d]=C,(u[d]===void 0||C>u[d])&&(u[d]=C)}k.push(v)}o[f]=k,a[f]=S}let s=-1;if(typeof r=="object"&&"length"in r)for(;++s<c;)l[s]=Rn(r[s]);else{const k=Rn(r);for(;++s<c;)l[s]=k}s=-1;const h=[],p=[];for(;++s<c;){const k=l[s];let S="",d="";k===99?(S=":",d=":"):k===108?S=":":k===114&&(d=":");let v=t.alignDelimiters===!1?1:Math.max(1,u[s]-S.length-d.length);const C=S+"-".repeat(v)+d;t.alignDelimiters!==!1&&(v=S.length+v+d.length,v>u[s]&&(u[s]=v),p[s]=v),h[s]=C}o.splice(1,0,h),a.splice(1,0,p),f=-1;const x=[];for(;++f<o.length;){const k=o[f],S=a[f];s=-1;const d=[];for(;++s<c;){const v=k[s]||"";let C="",A="";if(t.alignDelimiters!==!1){const z=u[s]-(S[s]||0),w=l[s];w===114?C=" ".repeat(z):w===99?z%2?(C=" ".repeat(z/2+.5),A=" ".repeat(z/2-.5)):(C=" ".repeat(z/2),A=C):A=" ".repeat(z)}t.delimiterStart!==!1&&!s&&d.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&v==="")&&(t.delimiterStart!==!1||s)&&d.push(" "),t.alignDelimiters!==!1&&d.push(C),d.push(v),t.alignDelimiters!==!1&&d.push(A),t.padding!==!1&&d.push(" "),(t.delimiterEnd!==!1||s!==c-1)&&d.push("|")}x.push(t.delimiterEnd===!1?d.join("").replace(/ +$/,""):d.join(""))}return x.join(`
16
16
  `)}function rs(e){return e==null?"":String(e)}function Rn(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function is(e,n,t,r){const i=t.enter("blockquote"),l=t.createTracker(r);l.move("> "),l.shift(2);const o=t.indentLines(t.containerFlow(e,l.current()),ls);return i(),o}function ls(e,n,t){return">"+(t?"":" ")+e}function os(e,n){return On(e,n.inConstruct,!0)&&!On(e,n.notInConstruct,!1)}function On(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++r<n.length;)if(e.includes(n[r]))return!0;return!1}function Nn(e,n,t,r){let i=-1;for(;++i<t.unsafe.length;)if(t.unsafe[i].character===`
17
17
  `&&os(t.stack,t.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
18
18
  `}function as(e,n){const t=String(e);let r=t.indexOf(n),i=r,l=0,o=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++l>o&&(o=l):l=1,i=r+n.length,r=t.indexOf(n,i);return o}function us(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function ss(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function cs(e,n,t,r){const i=ss(t),l=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(us(e,t)){const s=t.enter("codeIndented"),h=t.indentLines(l,fs);return s(),h}const a=t.createTracker(r),u=i.repeat(Math.max(as(l,i)+1,3)),c=t.enter("codeFenced");let f=a.move(u);if(e.lang){const s=t.enter(`codeFencedLang${o}`);f+=a.move(t.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),s()}if(e.lang&&e.meta){const s=t.enter(`codeFencedMeta${o}`);f+=a.move(" "),f+=a.move(t.safe(e.meta,{before:f,after:`
19
19
  `,encode:["`"],...a.current()})),s()}return f+=a.move(`
20
20
  `),l&&(f+=a.move(l+`
21
21
  `)),f+=a.move(u),c(),f}function fs(e,n,t){return(t?"":" ")+e}function Yt(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function ps(e,n,t,r){const i=Yt(t),l=i==='"'?"Quote":"Apostrophe",o=t.enter("definition");let a=t.enter("label");const u=t.createTracker(r);let c=u.move("[");return c+=u.move(t.safe(t.associationId(e),{before:c,after:"]",...u.current()})),c+=u.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(t.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(a=t.enter("destinationRaw"),c+=u.move(t.safe(e.url,{before:c,after:e.title?" ":`
22
- `,...u.current()}))),a(),e.title&&(a=t.enter(`title${l}`),c+=u.move(" "+i),c+=u.move(t.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),a()),o(),c}function hs(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function We(e){return"&#x"+e.toString(16).toUpperCase()+";"}function lt(e,n,t){const r=_e(e),i=_e(n);return r===void 0?i===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Ir.peek=ms;function Ir(e,n,t,r){const i=hs(t),l=t.enter("emphasis"),o=t.createTracker(r),a=o.move(i);let u=o.move(t.containerPhrasing(e,{after:i,before:a,...o.current()}));const c=u.charCodeAt(0),f=lt(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(u=We(c)+u.slice(1));const s=u.charCodeAt(u.length-1),h=lt(r.after.charCodeAt(0),s,i);h.inside&&(u=u.slice(0,-1)+We(s));const p=o.move(i);return l(),t.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},a+u+p}function ms(e,n,t){return t.options.emphasis||"*"}function gs(e,n){let t=!1;return Xt(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,!1}),!!((!e.depth||e.depth<3)&&$t(e)&&(n.options.setext||t))}function ds(e,n,t,r){const i=Math.max(Math.min(6,e.depth||1),1),l=t.createTracker(r);if(gs(e,t)){const f=t.enter("headingSetext"),s=t.enter("phrasing"),h=t.containerPhrasing(e,{...l.current(),before:`
22
+ `,...u.current()}))),a(),e.title&&(a=t.enter(`title${l}`),c+=u.move(" "+i),c+=u.move(t.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),a()),o(),c}function hs(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function Xe(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ot(e,n,t){const r=_e(e),i=_e(n);return r===void 0?i===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Ar.peek=ms;function Ar(e,n,t,r){const i=hs(t),l=t.enter("emphasis"),o=t.createTracker(r),a=o.move(i);let u=o.move(t.containerPhrasing(e,{after:i,before:a,...o.current()}));const c=u.charCodeAt(0),f=ot(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(u=Xe(c)+u.slice(1));const s=u.charCodeAt(u.length-1),h=ot(r.after.charCodeAt(0),s,i);h.inside&&(u=u.slice(0,-1)+Xe(s));const p=o.move(i);return l(),t.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},a+u+p}function ms(e,n,t){return t.options.emphasis||"*"}function gs(e,n){let t=!1;return Xt(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,!1}),!!((!e.depth||e.depth<3)&&$t(e)&&(n.options.setext||t))}function ds(e,n,t,r){const i=Math.max(Math.min(6,e.depth||1),1),l=t.createTracker(r);if(gs(e,t)){const f=t.enter("headingSetext"),s=t.enter("phrasing"),h=t.containerPhrasing(e,{...l.current(),before:`
23
23
  `,after:`
24
24
  `});return s(),f(),h+`
25
25
  `+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
26
26
  `))+1))}const o="#".repeat(i),a=t.enter("headingAtx"),u=t.enter("phrasing");l.move(o+" ");let c=t.containerPhrasing(e,{before:"# ",after:`
27
- `,...l.current()});return/^[\t ]/.test(c)&&(c=We(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,t.options.closeAtx&&(c+=" "+o),u(),a(),c}Ar.peek=xs;function Ar(e){return e.value||""}function xs(){return"<"}Tr.peek=ys;function Tr(e,n,t,r){const i=Yt(t),l=i==='"'?"Quote":"Apostrophe",o=t.enter("image");let a=t.enter("label");const u=t.createTracker(r);let c=u.move("![");return c+=u.move(t.safe(e.alt,{before:c,after:"]",...u.current()})),c+=u.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(t.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(a=t.enter("destinationRaw"),c+=u.move(t.safe(e.url,{before:c,after:e.title?" ":")",...u.current()}))),a(),e.title&&(a=t.enter(`title${l}`),c+=u.move(" "+i),c+=u.move(t.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),a()),c+=u.move(")"),o(),c}function ys(){return"!"}Pr.peek=ks;function Pr(e,n,t,r){const i=e.referenceType,l=t.enter("imageReference");let o=t.enter("label");const a=t.createTracker(r);let u=a.move("![");const c=t.safe(e.alt,{before:u,after:"]",...a.current()});u+=a.move(c+"]["),o();const f=t.stack;t.stack=[],o=t.enter("reference");const s=t.safe(t.associationId(e),{before:u,after:"]",...a.current()});return o(),t.stack=f,l(),i==="full"||!c||c!==s?u+=a.move(s+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function ks(){return"!"}Lr.peek=bs;function Lr(e,n,t){let r=e.value||"",i="`",l=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++l<t.unsafe.length;){const o=t.unsafe[l],a=t.compilePattern(o);let u;if(o.atBreak)for(;u=a.exec(r);){let c=u.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(u.index+1)}}return i+r+i}function bs(){return"`"}function zr(e,n){const t=$t(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Dr.peek=ws;function Dr(e,n,t,r){const i=Yt(t),l=i==='"'?"Quote":"Apostrophe",o=t.createTracker(r);let a,u;if(zr(e,t)){const f=t.stack;t.stack=[],a=t.enter("autolink");let s=o.move("<");return s+=o.move(t.containerPhrasing(e,{before:s,after:">",...o.current()})),s+=o.move(">"),a(),t.stack=f,s}a=t.enter("link"),u=t.enter("label");let c=o.move("[");return c+=o.move(t.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=t.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(t.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(u=t.enter("destinationRaw"),c+=o.move(t.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=t.enter(`title${l}`),c+=o.move(" "+i),c+=o.move(t.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),u()),c+=o.move(")"),a(),c}function ws(e,n,t){return zr(e,t)?"<":"["}Fr.peek=vs;function Fr(e,n,t,r){const i=e.referenceType,l=t.enter("linkReference");let o=t.enter("label");const a=t.createTracker(r);let u=a.move("[");const c=t.containerPhrasing(e,{before:u,after:"]",...a.current()});u+=a.move(c+"]["),o();const f=t.stack;t.stack=[],o=t.enter("reference");const s=t.safe(t.associationId(e),{before:u,after:"]",...a.current()});return o(),t.stack=f,l(),i==="full"||!c||c!==s?u+=a.move(s+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function vs(){return"["}function Qt(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function Cs(e){const n=Qt(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function Ss(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Mr(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function Es(e,n,t,r){const i=t.enter("list"),l=t.bulletCurrent;let o=e.ordered?Ss(t):Qt(t);const a=e.ordered?o==="."?")":".":Cs(t);let u=n&&t.bulletLastUsed?o===t.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&f&&(!f.children||!f.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(u=!0),Mr(t)===o&&f){let s=-1;for(;++s<e.children.length;){const h=e.children[s];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(o=a),t.bulletCurrent=o;const c=t.containerFlow(e,r);return t.bulletLastUsed=o,t.bulletCurrent=l,i(),c}function Is(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function As(e,n,t,r){const i=Is(t);let l=t.bulletCurrent||Qt(t);n&&n.type==="list"&&n.ordered&&(l=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+l);let o=l.length+1;(i==="tab"||i==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(o=Math.ceil(o/4)*4);const a=t.createTracker(r);a.move(l+" ".repeat(o-l.length)),a.shift(o);const u=t.enter("listItem"),c=t.indentLines(t.containerFlow(e,a.current()),f);return u(),c;function f(s,h,p){return h?(p?"":" ".repeat(o))+s:(p?l:l+" ".repeat(o-l.length))+s}}function Ts(e,n,t,r){const i=t.enter("paragraph"),l=t.enter("phrasing"),o=t.containerPhrasing(e,r);return l(),i(),o}var Ps=ut(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Ls(e,n,t,r){return(e.children.some(function(i){return Ps(i)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function zs(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}_r.peek=Ds;function _r(e,n,t,r){const i=zs(t),l=t.enter("strong"),o=t.createTracker(r),a=o.move(i+i);let u=o.move(t.containerPhrasing(e,{after:i,before:a,...o.current()}));const c=u.charCodeAt(0),f=lt(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(u=We(c)+u.slice(1));const s=u.charCodeAt(u.length-1),h=lt(r.after.charCodeAt(0),s,i);h.inside&&(u=u.slice(0,-1)+We(s));const p=o.move(i+i);return l(),t.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},a+u+p}function Ds(e,n,t){return t.options.strong||"*"}function Fs(e,n,t,r){return t.safe(e.value,r)}function Ms(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function _s(e,n,t){const r=(Mr(t)+(t.options.ruleSpaces?" ":"")).repeat(Ms(t));return t.options.ruleSpaces?r.slice(0,-1):r}var Rr={blockquote:is,break:Nn,code:cs,definition:ps,emphasis:Ir,hardBreak:Nn,heading:ds,html:Ar,image:Tr,imageReference:Pr,inlineCode:Lr,link:Dr,linkReference:Fr,list:Es,listItem:As,paragraph:Ts,root:Ls,strong:_r,text:Fs,thematicBreak:_s};function Rs(){return{enter:{table:Os,tableData:Bn,tableHeader:Bn,tableRow:Bs},exit:{codeText:js,table:Ns,tableData:St,tableHeader:St,tableRow:St}}}function Os(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function Ns(e){this.exit(e),this.data.inTable=void 0}function Bs(e){this.enter({type:"tableRow",children:[]},e)}function St(e){this.exit(e)}function Bn(e){this.enter({type:"tableCell",children:[]},e)}function js(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Hs));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function Hs(e,n){return n==="|"?n:e}function qs(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,i=n.stringLength,l=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
27
+ `,...l.current()});return/^[\t ]/.test(c)&&(c=Xe(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,t.options.closeAtx&&(c+=" "+o),u(),a(),c}Tr.peek=xs;function Tr(e){return e.value||""}function xs(){return"<"}Pr.peek=ys;function Pr(e,n,t,r){const i=Yt(t),l=i==='"'?"Quote":"Apostrophe",o=t.enter("image");let a=t.enter("label");const u=t.createTracker(r);let c=u.move("![");return c+=u.move(t.safe(e.alt,{before:c,after:"]",...u.current()})),c+=u.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(t.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(a=t.enter("destinationRaw"),c+=u.move(t.safe(e.url,{before:c,after:e.title?" ":")",...u.current()}))),a(),e.title&&(a=t.enter(`title${l}`),c+=u.move(" "+i),c+=u.move(t.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),a()),c+=u.move(")"),o(),c}function ys(){return"!"}Lr.peek=ks;function Lr(e,n,t,r){const i=e.referenceType,l=t.enter("imageReference");let o=t.enter("label");const a=t.createTracker(r);let u=a.move("![");const c=t.safe(e.alt,{before:u,after:"]",...a.current()});u+=a.move(c+"]["),o();const f=t.stack;t.stack=[],o=t.enter("reference");const s=t.safe(t.associationId(e),{before:u,after:"]",...a.current()});return o(),t.stack=f,l(),i==="full"||!c||c!==s?u+=a.move(s+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function ks(){return"!"}zr.peek=bs;function zr(e,n,t){let r=e.value||"",i="`",l=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++l<t.unsafe.length;){const o=t.unsafe[l],a=t.compilePattern(o);let u;if(o.atBreak)for(;u=a.exec(r);){let c=u.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(u.index+1)}}return i+r+i}function bs(){return"`"}function Dr(e,n){const t=$t(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Fr.peek=ws;function Fr(e,n,t,r){const i=Yt(t),l=i==='"'?"Quote":"Apostrophe",o=t.createTracker(r);let a,u;if(Dr(e,t)){const f=t.stack;t.stack=[],a=t.enter("autolink");let s=o.move("<");return s+=o.move(t.containerPhrasing(e,{before:s,after:">",...o.current()})),s+=o.move(">"),a(),t.stack=f,s}a=t.enter("link"),u=t.enter("label");let c=o.move("[");return c+=o.move(t.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=t.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(t.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(u=t.enter("destinationRaw"),c+=o.move(t.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=t.enter(`title${l}`),c+=o.move(" "+i),c+=o.move(t.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),u()),c+=o.move(")"),a(),c}function ws(e,n,t){return Dr(e,t)?"<":"["}Mr.peek=vs;function Mr(e,n,t,r){const i=e.referenceType,l=t.enter("linkReference");let o=t.enter("label");const a=t.createTracker(r);let u=a.move("[");const c=t.containerPhrasing(e,{before:u,after:"]",...a.current()});u+=a.move(c+"]["),o();const f=t.stack;t.stack=[],o=t.enter("reference");const s=t.safe(t.associationId(e),{before:u,after:"]",...a.current()});return o(),t.stack=f,l(),i==="full"||!c||c!==s?u+=a.move(s+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function vs(){return"["}function Qt(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function Cs(e){const n=Qt(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function Ss(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function _r(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function Es(e,n,t,r){const i=t.enter("list"),l=t.bulletCurrent;let o=e.ordered?Ss(t):Qt(t);const a=e.ordered?o==="."?")":".":Cs(t);let u=n&&t.bulletLastUsed?o===t.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&f&&(!f.children||!f.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(u=!0),_r(t)===o&&f){let s=-1;for(;++s<e.children.length;){const h=e.children[s];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(o=a),t.bulletCurrent=o;const c=t.containerFlow(e,r);return t.bulletLastUsed=o,t.bulletCurrent=l,i(),c}function Is(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function As(e,n,t,r){const i=Is(t);let l=t.bulletCurrent||Qt(t);n&&n.type==="list"&&n.ordered&&(l=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+l);let o=l.length+1;(i==="tab"||i==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(o=Math.ceil(o/4)*4);const a=t.createTracker(r);a.move(l+" ".repeat(o-l.length)),a.shift(o);const u=t.enter("listItem"),c=t.indentLines(t.containerFlow(e,a.current()),f);return u(),c;function f(s,h,p){return h?(p?"":" ".repeat(o))+s:(p?l:l+" ".repeat(o-l.length))+s}}function Ts(e,n,t,r){const i=t.enter("paragraph"),l=t.enter("phrasing"),o=t.containerPhrasing(e,r);return l(),i(),o}var Ps=st(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Ls(e,n,t,r){return(e.children.some(function(i){return Ps(i)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function zs(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}Rr.peek=Ds;function Rr(e,n,t,r){const i=zs(t),l=t.enter("strong"),o=t.createTracker(r),a=o.move(i+i);let u=o.move(t.containerPhrasing(e,{after:i,before:a,...o.current()}));const c=u.charCodeAt(0),f=ot(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(u=Xe(c)+u.slice(1));const s=u.charCodeAt(u.length-1),h=ot(r.after.charCodeAt(0),s,i);h.inside&&(u=u.slice(0,-1)+Xe(s));const p=o.move(i+i);return l(),t.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},a+u+p}function Ds(e,n,t){return t.options.strong||"*"}function Fs(e,n,t,r){return t.safe(e.value,r)}function Ms(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function _s(e,n,t){const r=(_r(t)+(t.options.ruleSpaces?" ":"")).repeat(Ms(t));return t.options.ruleSpaces?r.slice(0,-1):r}var Or={blockquote:is,break:Nn,code:cs,definition:ps,emphasis:Ar,hardBreak:Nn,heading:ds,html:Tr,image:Pr,imageReference:Lr,inlineCode:zr,link:Fr,linkReference:Mr,list:Es,listItem:As,paragraph:Ts,root:Ls,strong:Rr,text:Fs,thematicBreak:_s};function Rs(){return{enter:{table:Os,tableData:Bn,tableHeader:Bn,tableRow:Bs},exit:{codeText:js,table:Ns,tableData:Et,tableHeader:Et,tableRow:Et}}}function Os(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function Ns(e){this.exit(e),this.data.inTable=void 0}function Bs(e){this.enter({type:"tableRow",children:[]},e)}function Et(e){this.exit(e)}function Bn(e){this.enter({type:"tableCell",children:[]},e)}function js(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Hs));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function Hs(e,n){return n==="|"?n:e}function qs(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,i=n.stringLength,l=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
28
28
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:o,tableCell:u,tableRow:a}};function o(p,x,k,S){return c(f(p,k,S),p.align)}function a(p,x,k,S){const d=c([s(p,k,S)]);return d.slice(0,d.indexOf(`
29
- `))}function u(p,x,k,S){const d=k.enter("tableCell"),v=k.enter("phrasing"),C=k.containerPhrasing(p,{...S,before:l,after:l});return v(),d(),C}function c(p,x){return ns(p,{align:x,alignDelimiters:r,padding:t,stringLength:i})}function f(p,x,k){const S=p.children;let d=-1;const v=[],C=x.enter("table");for(;++d<S.length;)v[d]=s(S[d],x,k);return C(),v}function s(p,x,k){const S=p.children;let d=-1;const v=[],C=x.enter("tableRow");for(;++d<S.length;)v[d]=u(S[d],p,x,k);return C(),v}function h(p,x,k){let S=Rr.inlineCode(p,x,k);return k.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function Us(){return{exit:{taskListCheckValueChecked:jn,taskListCheckValueUnchecked:jn,paragraph:Vs}}}function $s(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Ws}}}function jn(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function Vs(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const t=this.stack[this.stack.length-1];t.type;const r=t.children[0];if(r&&r.type==="text"){const i=n.children;let l=-1,o;for(;++l<i.length;){const a=i[l];if(a.type==="paragraph"){o=a;break}}o===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Ws(e,n,t,r){const i=e.children[0],l=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",a=t.createTracker(r);l&&a.move(o);let u=Rr.listItem(e,n,t,{...r,...a.current()});return l&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),u;function c(f){return f+o}}function Xs(){return[Eu(),Wu(),Ju(),Rs(),Us()]}function Ys(e){return{extensions:[Iu(),Xu(e),Ku(),qs(e),$s()]}}var Qs={tokenize:tc,partial:!0},Or={tokenize:nc,partial:!0},Nr={tokenize:rc,partial:!0},Br={tokenize:ic,partial:!0},Js={tokenize:lc,partial:!0},jr={name:"wwwAutolink",tokenize:Zs,previous:qr},Hr={name:"protocolAutolink",tokenize:ec,previous:Ur},xe={name:"emailAutolink",tokenize:Gs,previous:$r},pe={};function Ks(){return{text:pe}}var Se=48;for(;Se<123;)pe[Se]=xe,Se++,Se===58?Se=65:Se===91&&(Se=97);pe[43]=xe;pe[45]=xe;pe[46]=xe;pe[95]=xe;pe[72]=[xe,Hr];pe[104]=[xe,Hr];pe[87]=[xe,jr];pe[119]=[xe,jr];function Gs(e,n,t){const r=this;let i,l;return o;function o(s){return!Mt(s)||!$r.call(r,r.previous)||Jt(r.events)?t(s):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(s))}function a(s){return Mt(s)?(e.consume(s),a):s===64?(e.consume(s),u):t(s)}function u(s){return s===46?e.check(Js,f,c)(s):s===45||s===95||Z(s)?(l=!0,e.consume(s),u):f(s)}function c(s){return e.consume(s),i=!0,u}function f(s){return l&&i&&te(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(s)):t(s)}}function Zs(e,n,t){const r=this;return i;function i(o){return o!==87&&o!==119||!qr.call(r,r.previous)||Jt(r.events)?t(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Qs,e.attempt(Or,e.attempt(Nr,l),t),t)(o))}function l(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(o)}}function ec(e,n,t){const r=this;let i="",l=!1;return o;function o(s){return(s===72||s===104)&&Ur.call(r,r.previous)&&!Jt(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(s),e.consume(s),a):t(s)}function a(s){if(te(s)&&i.length<5)return i+=String.fromCodePoint(s),e.consume(s),a;if(s===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(s),u}return t(s)}function u(s){return s===47?(e.consume(s),l?c:(l=!0,u)):t(s)}function c(s){return s===null||rt(s)||V(s)||Ee(s)||ot(s)?t(s):e.attempt(Or,e.attempt(Nr,f),t)(s)}function f(s){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(s)}}function tc(e,n,t){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),l):t(o)}function l(o){return o===null?t(o):n(o)}}function nc(e,n,t){let r,i,l;return o;function o(c){return c===46||c===95?e.check(Br,u,a)(c):c===null||V(c)||Ee(c)||c!==45&&ot(c)?u(c):(l=!0,e.consume(c),o)}function a(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),o}function u(c){return i||r||!l?t(c):n(c)}}function rc(e,n){let t=0,r=0;return i;function i(o){return o===40?(t++,e.consume(o),i):o===41&&r<t?l(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Br,n,l)(o):o===null||V(o)||Ee(o)?n(o):(e.consume(o),i)}function l(o){return o===41&&r++,e.consume(o),i}}function ic(e,n,t){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),l):a===93?(e.consume(a),i):a===60||a===null||V(a)||Ee(a)?n(a):t(a)}function i(a){return a===null||a===40||a===91||V(a)||Ee(a)?n(a):r(a)}function l(a){return te(a)?o(a):t(a)}function o(a){return a===59?(e.consume(a),r):te(a)?(e.consume(a),o):t(a)}}function lc(e,n,t){return r;function r(l){return e.consume(l),i}function i(l){return Z(l)?t(l):n(l)}}function qr(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||V(e)}function Ur(e){return!te(e)}function $r(e){return!(e===47||Mt(e))}function Mt(e){return e===43||e===45||e===46||e===95||Z(e)}function Jt(e){let n=e.length,t=!1;for(;n--;){const r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}var oc={tokenize:mc,partial:!0};function ac(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:fc,continuation:{tokenize:pc},exit:hc}},text:{91:{name:"gfmFootnoteCall",tokenize:cc},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:uc,resolveTo:sc}}}}function uc(e,n,t){const r=this;let i=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){o=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return a;function a(u){if(!o||!o._balanced)return t(u);const c=se(r.sliceSerialize({start:o.end,end:r.now()}));return c.codePointAt(0)!==94||!l.includes(c.slice(1))?t(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),n(u))}}function sc(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},a=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",i,n],["exit",i,n],["enter",l,n],["enter",o,n],["exit",o,n],["exit",l,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...a),e}function cc(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l=0,o;return a;function a(s){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),u}function u(s){return s!==94?t(s):(e.enter("gfmFootnoteCallMarker"),e.consume(s),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(s){if(l>999||s===93&&!o||s===null||s===91||V(s))return t(s);if(s===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(se(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(s)}return V(s)||(o=!0),l++,e.consume(s),s===92?f:c}function f(s){return s===91||s===92||s===93?(e.consume(s),l++,c):c(s)}}function fc(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l,o=0,a;return u;function u(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):t(x)}function f(x){if(o>999||x===93&&!a||x===null||x===91||V(x))return t(x);if(x===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return l=se(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return V(x)||(a=!0),o++,e.consume(x),x===92?s:f}function s(x){return x===91||x===92||x===93?(e.consume(x),o++,f):f(x)}function h(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),i.includes(l)||i.push(l),U(e,p,"gfmFootnoteDefinitionWhitespace")):t(x)}function p(x){return n(x)}}function pc(e,n,t){return e.check(Je,n,e.attempt(oc,n,t))}function hc(e){e.exit("gfmFootnoteDefinition")}function mc(e,n,t){const r=this;return U(e,i,"gfmFootnoteDefinitionIndent",5);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?n(l):t(l)}}function gc(e){let n=(e||{}).singleTilde;const t={name:"strikethrough",tokenize:i,resolveAll:r};return n==null&&(n=!0),{text:{126:t},insideSpan:{null:[t]},attentionMarkers:{null:[126]}};function r(l,o){let a=-1;for(;++a<l.length;)if(l[a][0]==="enter"&&l[a][1].type==="strikethroughSequenceTemporary"&&l[a][1]._close){let u=a;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[a][1].end.offset-l[a][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[a][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[a][1].end)},f={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[a][1].start)},s=[["enter",c,o],["enter",l[u][1],o],["exit",l[u][1],o],["enter",f,o]],h=o.parser.constructs.insideSpan.null;h&&oe(s,s.length,0,at(h,l.slice(u+1,a),o)),oe(s,s.length,0,[["exit",f,o],["enter",l[a][1],o],["exit",l[a][1],o],["exit",c,o]]),oe(l,u-1,a-u+3,s),a=u+s.length-2;break}}for(a=-1;++a<l.length;)l[a][1].type==="strikethroughSequenceTemporary"&&(l[a][1].type="data");return l}function i(l,o,a){const u=this.previous,c=this.events;let f=0;return s;function s(p){return u===126&&c[c.length-1][1].type!=="characterEscape"?a(p):(l.enter("strikethroughSequenceTemporary"),h(p))}function h(p){const x=_e(u);if(p===126)return f>1?a(p):(l.consume(p),f++,h);if(f<2&&!n)return a(p);const k=l.exit("strikethroughSequenceTemporary"),S=_e(p);return k._open=!S||S===2&&!!x,k._close=!x||x===2&&!!S,o(p)}}}var dc=class{constructor(){this.map=[]}add(e,n,t){xc(this,e,n,t)}consume(e){if(this.map.sort(function(i,l){return i[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const t=[];for(;n>0;)n-=1,t.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];t.push(e.slice()),e.length=0;let r=t.pop();for(;r;){for(const i of r)e.push(i);r=t.pop()}this.map.length=0}};function xc(e,n,t,r){let i=0;if(!(t===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===n){e.map[i][1]+=t,e.map[i][2].push(...r);return}i+=1}e.map.push([n,t,r])}}function yc(e,n){let t=!1;const r=[];for(;n<e.length;){const i=e[n];if(t){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const l=r.length-1;r[l]=r[l]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(t=!0);n+=1}return r}function kc(){return{flow:{null:{name:"table",tokenize:bc,resolveAll:wc}}}}function bc(e,n,t){const r=this;let i=0,l=0,o;return a;function a(y){let P=r.events.length-1;for(;P>-1;){const X=r.events[P][1].type;if(X==="lineEnding"||X==="linePrefix")P--;else break}const L=P>-1?r.events[P][1].type:null,$=L==="tableHead"||L==="tableRow"?w:u;return $===w&&r.parser.lazy[r.now().line]?t(y):$(y)}function u(y){return e.enter("tableHead"),e.enter("tableRow"),c(y)}function c(y){return y===124||(o=!0,l+=1),f(y)}function f(y){return y===null?t(y):F(y)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):t(y):H(y)?U(e,f,"whitespace")(y):(l+=1,o&&(o=!1,i+=1),y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),o=!0,f):(e.enter("data"),s(y)))}function s(y){return y===null||y===124||V(y)?(e.exit("data"),f(y)):(e.consume(y),y===92?h:s)}function h(y){return y===92||y===124?(e.consume(y),s):s(y)}function p(y){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(y):(e.enter("tableDelimiterRow"),o=!1,H(y)?U(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):x(y))}function x(y){return y===45||y===58?S(y):y===124?(o=!0,e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),k):z(y)}function k(y){return H(y)?U(e,S,"whitespace")(y):S(y)}function S(y){return y===58?(l+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),d):y===45?(l+=1,d(y)):y===null||F(y)?A(y):z(y)}function d(y){return y===45?(e.enter("tableDelimiterFiller"),v(y)):z(y)}function v(y){return y===45?(e.consume(y),v):y===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(y))}function C(y){return H(y)?U(e,A,"whitespace")(y):A(y)}function A(y){return y===124?x(y):y===null||F(y)?!o||i!==l?z(y):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(y)):z(y)}function z(y){return t(y)}function w(y){return e.enter("tableRow"),B(y)}function B(y){return y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),B):y===null||F(y)?(e.exit("tableRow"),n(y)):H(y)?U(e,B,"whitespace")(y):(e.enter("data"),_(y))}function _(y){return y===null||y===124||V(y)?(e.exit("data"),B(y)):(e.consume(y),y===92?j:_)}function j(y){return y===92||y===124?(e.consume(y),_):_(y)}}function wc(e,n){let t=-1,r=!0,i=0,l=[0,0,0,0],o=[0,0,0,0],a=!1,u=0,c,f,s;const h=new dc;for(;++t<e.length;){const p=e[t],x=p[1];p[0]==="enter"?x.type==="tableHead"?(a=!1,u!==0&&(Hn(h,n,u,c,f),f=void 0,u=0),c={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},h.add(t,0,[["enter",c,n]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,s=void 0,l=[0,0,0,0],o=[0,t+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},h.add(t,0,[["enter",f,n]])),i=x.type==="tableDelimiterRow"?2:f?3:1):i&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(l[1]!==0&&(o[0]=o[1],s=tt(h,n,l,i,void 0,s),l=[0,0,0,0]),o[2]=t)):x.type==="tableCellDivider"&&(r?r=!1:(l[1]!==0&&(o[0]=o[1],s=tt(h,n,l,i,void 0,s)),l=o,o=[l[1],t,0,0])):x.type==="tableHead"?(a=!0,u=t):x.type==="tableRow"||x.type==="tableDelimiterRow"?(u=t,l[1]!==0?(o[0]=o[1],s=tt(h,n,l,i,t,s)):o[1]!==0&&(s=tt(h,n,o,i,t,s)),i=0):i&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(o[3]=t)}for(u!==0&&Hn(h,n,u,c,f),h.consume(n.events),t=-1;++t<n.events.length;){const p=n.events[t];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=yc(n.events,t))}return e}function tt(e,n,t,r,i,l){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";t[0]!==0&&(l.end=Object.assign({},Fe(n.events,t[0])),e.add(t[0],0,[["exit",l,n]]));const u=Fe(n.events,t[1]);if(l={type:o,start:Object.assign({},u),end:Object.assign({},u)},e.add(t[1],0,[["enter",l,n]]),t[2]!==0){const c=Fe(n.events,t[2]),f=Fe(n.events,t[3]),s={type:a,start:Object.assign({},c),end:Object.assign({},f)};if(e.add(t[2],0,[["enter",s,n]]),r!==2){const h=n.events[t[2]],p=n.events[t[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",t[3]>t[2]+1){const x=t[2]+1,k=t[3]-t[2]-1;e.add(x,k,[])}}e.add(t[3]+1,0,[["exit",s,n]])}return i!==void 0&&(l.end=Object.assign({},Fe(n.events,i)),e.add(i,0,[["exit",l,n]]),l=void 0),l}function Hn(e,n,t,r,i){const l=[],o=Fe(n.events,t);i&&(i.end=Object.assign({},o),l.push(["exit",i,n])),r.end=Object.assign({},o),l.push(["exit",r,n]),e.add(t+1,0,l)}function Fe(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}var vc={name:"tasklistCheck",tokenize:Sc};function Cc(){return{text:{91:vc}}}function Sc(e,n,t){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),l)}function l(u){return V(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),o):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),o):t(u)}function o(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):t(u)}function a(u){return F(u)?n(u):H(u)?e.check({tokenize:Ec},n,t)(u):t(u)}}function Ec(e,n,t){return U(e,r,"whitespace");function r(i){return i===null?t(i):n(i)}}function Ic(e){return rr([Ks(),ac(),gc(e),kc(),Cc()])}var Ac={};function Tc(e){const n=this,t=e||Ac,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),l=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Ic(t)),l.push(Xs()),o.push(Ys(t))}var Pc=({href:e,children:n,...t})=>(0,T.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",style:{color:"#1b5fc4",textDecoration:"underline"},...t,children:n}),Lc=({children:e,...n})=>(0,T.jsx)("p",{style:{margin:"0 0 8px 0",lineHeight:"1.6"},...n,children:e}),De=(e,n)=>{const t=({children:r,...i})=>M.default.createElement(`h${e}`,{style:{margin:"16px 0 8px 0",fontSize:n,fontWeight:600,lineHeight:"1.3"},...i},r);return t.displayName=`MarkdownHeading${e}`,t},zc=({children:e,...n})=>(0,T.jsx)("ul",{style:{margin:"0 0 8px 0",paddingLeft:"20px",listStyleType:"disc",listStylePosition:"outside"},...n,children:e}),Dc=({children:e,...n})=>(0,T.jsx)("ol",{style:{margin:"0 0 8px 0",paddingLeft:"20px",listStyleType:"decimal",listStylePosition:"outside"},...n,children:e}),Fc=({children:e,...n})=>(0,T.jsx)("li",{style:{display:"list-item",margin:"2px 0",lineHeight:"1.6"},...n,children:e}),Mc=({className:e,children:n,...t})=>e!==void 0||String(n).includes(`
30
- `)?(0,T.jsx)("code",{style:{display:"block",background:"#f5f5f5",padding:"8px 12px",borderRadius:"6px",fontSize:"13px",overflowX:"auto",fontFamily:'"IBM Plex Mono", monospace'},...t,children:n}):(0,T.jsx)("code",{style:{background:"#f0f2f5",padding:"2px 5px",borderRadius:"4px",fontSize:"13px",fontFamily:'"IBM Plex Mono", monospace'},...t,children:n}),_c=({children:e,...n})=>(0,T.jsx)("pre",{style:{margin:"0 0 8px 0"},...n,children:e}),Rc=({children:e,...n})=>(0,T.jsx)("blockquote",{style:{borderLeft:"4px solid #dee3e8",paddingLeft:"12px",margin:"0 0 8px 0",fontStyle:"italic",color:"#6b6d6f"},...n,children:e}),Oc=({children:e,...n})=>(0,T.jsx)("div",{style:{overflowX:"auto",margin:"0 0 8px 0"},children:(0,T.jsx)("table",{style:{borderCollapse:"collapse",width:"100%",fontSize:"13px"},...n,children:e})}),Nc=({children:e,...n})=>(0,T.jsx)("th",{style:{border:"1px solid #dee3e8",padding:"6px 10px",textAlign:"left",backgroundColor:"#f5f7fa",fontWeight:600},...n,children:e}),Bc=({children:e,...n})=>(0,T.jsx)("td",{style:{border:"1px solid #dee3e8",padding:"6px 10px"},...n,children:e}),jc=({alt:e,...n})=>(0,T.jsx)("img",{alt:e??"",style:{maxWidth:"100%",borderRadius:"8px",margin:"4px 0"},...n}),Hc=e=>(0,T.jsx)("hr",{style:{border:"none",borderTop:"1px solid #dee3e8",margin:"12px 0"},...e}),qc={a:Pc,p:Lc,h1:De(1,"20px"),h2:De(2,"18px"),h3:De(3,"16px"),h4:De(4,"15px"),h5:De(5,"14px"),h6:De(6,"13px"),ul:zc,ol:Dc,li:Fc,code:Mc,pre:_c,blockquote:Rc,table:Oc,th:Nc,td:Bc,img:jc,hr:Hc},Uc=[Tc],Vr=({content:e})=>(0,T.jsx)(gu,{remarkPlugins:Uc,components:qc,children:e}),$c=({source:e,index:n})=>{const t=(0,T.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",width:"100%",minWidth:0},children:[(0,T.jsx)("div",{style:{flexShrink:0,width:"18px",height:"18px",borderRadius:"3px",border:"1px solid #1b5fc4",color:"#1b5fc4",fontSize:"11px",fontWeight:500,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#f0f4ff"},children:n+1}),(0,T.jsx)("div",{style:{fontSize:"12px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"#30373e"},title:e.title,children:e.title})]}),r={display:"flex",alignItems:"center",padding:"8px 10px",border:"1px solid #dee3e8",borderRadius:"8px",backgroundColor:"#fff",cursor:e.url?"pointer":"default",textDecoration:"none",color:"inherit",minWidth:0,transition:"border-color 0.15s"};return e.url?(0,T.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",style:r,onMouseEnter:i=>{i.currentTarget.style.borderColor="#1b5fc4"},onMouseLeave:i=>{i.currentTarget.style.borderColor="#dee3e8"},children:t}):(0,T.jsx)("div",{style:r,children:t})},Vc=()=>(0,T.jsxs)("div",{style:{display:"flex",gap:"4px",padding:"4px 0"},children:[[0,1,2].map(e=>(0,T.jsx)("div",{style:{width:"6px",height:"6px",borderRadius:"50%",backgroundColor:"#b5bfc8",animation:"ago-pulse 1.2s ease-in-out infinite",animationDelay:`${e*.2}s`}},e)),(0,T.jsx)("style",{children:`
29
+ `))}function u(p,x,k,S){const d=k.enter("tableCell"),v=k.enter("phrasing"),C=k.containerPhrasing(p,{...S,before:l,after:l});return v(),d(),C}function c(p,x){return ns(p,{align:x,alignDelimiters:r,padding:t,stringLength:i})}function f(p,x,k){const S=p.children;let d=-1;const v=[],C=x.enter("table");for(;++d<S.length;)v[d]=s(S[d],x,k);return C(),v}function s(p,x,k){const S=p.children;let d=-1;const v=[],C=x.enter("tableRow");for(;++d<S.length;)v[d]=u(S[d],p,x,k);return C(),v}function h(p,x,k){let S=Or.inlineCode(p,x,k);return k.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function Us(){return{exit:{taskListCheckValueChecked:jn,taskListCheckValueUnchecked:jn,paragraph:Vs}}}function $s(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Ws}}}function jn(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function Vs(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const t=this.stack[this.stack.length-1];t.type;const r=t.children[0];if(r&&r.type==="text"){const i=n.children;let l=-1,o;for(;++l<i.length;){const a=i[l];if(a.type==="paragraph"){o=a;break}}o===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Ws(e,n,t,r){const i=e.children[0],l=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",a=t.createTracker(r);l&&a.move(o);let u=Or.listItem(e,n,t,{...r,...a.current()});return l&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),u;function c(f){return f+o}}function Xs(){return[Eu(),Wu(),Ju(),Rs(),Us()]}function Ys(e){return{extensions:[Iu(),Xu(e),Ku(),qs(e),$s()]}}var Qs={tokenize:tc,partial:!0},Nr={tokenize:nc,partial:!0},Br={tokenize:rc,partial:!0},jr={tokenize:ic,partial:!0},Js={tokenize:lc,partial:!0},Hr={name:"wwwAutolink",tokenize:Zs,previous:Ur},qr={name:"protocolAutolink",tokenize:ec,previous:$r},xe={name:"emailAutolink",tokenize:Gs,previous:Vr},pe={};function Ks(){return{text:pe}}var Se=48;for(;Se<123;)pe[Se]=xe,Se++,Se===58?Se=65:Se===91&&(Se=97);pe[43]=xe;pe[45]=xe;pe[46]=xe;pe[95]=xe;pe[72]=[xe,qr];pe[104]=[xe,qr];pe[87]=[xe,Hr];pe[119]=[xe,Hr];function Gs(e,n,t){const r=this;let i,l;return o;function o(s){return!_t(s)||!Vr.call(r,r.previous)||Jt(r.events)?t(s):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(s))}function a(s){return _t(s)?(e.consume(s),a):s===64?(e.consume(s),u):t(s)}function u(s){return s===46?e.check(Js,f,c)(s):s===45||s===95||Z(s)?(l=!0,e.consume(s),u):f(s)}function c(s){return e.consume(s),i=!0,u}function f(s){return l&&i&&te(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(s)):t(s)}}function Zs(e,n,t){const r=this;return i;function i(o){return o!==87&&o!==119||!Ur.call(r,r.previous)||Jt(r.events)?t(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Qs,e.attempt(Nr,e.attempt(Br,l),t),t)(o))}function l(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(o)}}function ec(e,n,t){const r=this;let i="",l=!1;return o;function o(s){return(s===72||s===104)&&$r.call(r,r.previous)&&!Jt(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(s),e.consume(s),a):t(s)}function a(s){if(te(s)&&i.length<5)return i+=String.fromCodePoint(s),e.consume(s),a;if(s===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(s),u}return t(s)}function u(s){return s===47?(e.consume(s),l?c:(l=!0,u)):t(s)}function c(s){return s===null||it(s)||V(s)||Ee(s)||at(s)?t(s):e.attempt(Nr,e.attempt(Br,f),t)(s)}function f(s){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(s)}}function tc(e,n,t){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),l):t(o)}function l(o){return o===null?t(o):n(o)}}function nc(e,n,t){let r,i,l;return o;function o(c){return c===46||c===95?e.check(jr,u,a)(c):c===null||V(c)||Ee(c)||c!==45&&at(c)?u(c):(l=!0,e.consume(c),o)}function a(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),o}function u(c){return i||r||!l?t(c):n(c)}}function rc(e,n){let t=0,r=0;return i;function i(o){return o===40?(t++,e.consume(o),i):o===41&&r<t?l(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(jr,n,l)(o):o===null||V(o)||Ee(o)?n(o):(e.consume(o),i)}function l(o){return o===41&&r++,e.consume(o),i}}function ic(e,n,t){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),l):a===93?(e.consume(a),i):a===60||a===null||V(a)||Ee(a)?n(a):t(a)}function i(a){return a===null||a===40||a===91||V(a)||Ee(a)?n(a):r(a)}function l(a){return te(a)?o(a):t(a)}function o(a){return a===59?(e.consume(a),r):te(a)?(e.consume(a),o):t(a)}}function lc(e,n,t){return r;function r(l){return e.consume(l),i}function i(l){return Z(l)?t(l):n(l)}}function Ur(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||V(e)}function $r(e){return!te(e)}function Vr(e){return!(e===47||_t(e))}function _t(e){return e===43||e===45||e===46||e===95||Z(e)}function Jt(e){let n=e.length,t=!1;for(;n--;){const r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}var oc={tokenize:mc,partial:!0};function ac(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:fc,continuation:{tokenize:pc},exit:hc}},text:{91:{name:"gfmFootnoteCall",tokenize:cc},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:uc,resolveTo:sc}}}}function uc(e,n,t){const r=this;let i=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){o=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return a;function a(u){if(!o||!o._balanced)return t(u);const c=se(r.sliceSerialize({start:o.end,end:r.now()}));return c.codePointAt(0)!==94||!l.includes(c.slice(1))?t(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),n(u))}}function sc(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},a=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",i,n],["exit",i,n],["enter",l,n],["enter",o,n],["exit",o,n],["exit",l,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...a),e}function cc(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l=0,o;return a;function a(s){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),u}function u(s){return s!==94?t(s):(e.enter("gfmFootnoteCallMarker"),e.consume(s),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(s){if(l>999||s===93&&!o||s===null||s===91||V(s))return t(s);if(s===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(se(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(s)}return V(s)||(o=!0),l++,e.consume(s),s===92?f:c}function f(s){return s===91||s===92||s===93?(e.consume(s),l++,c):c(s)}}function fc(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l,o=0,a;return u;function u(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):t(x)}function f(x){if(o>999||x===93&&!a||x===null||x===91||V(x))return t(x);if(x===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return l=se(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return V(x)||(a=!0),o++,e.consume(x),x===92?s:f}function s(x){return x===91||x===92||x===93?(e.consume(x),o++,f):f(x)}function h(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),i.includes(l)||i.push(l),U(e,p,"gfmFootnoteDefinitionWhitespace")):t(x)}function p(x){return n(x)}}function pc(e,n,t){return e.check(Ke,n,e.attempt(oc,n,t))}function hc(e){e.exit("gfmFootnoteDefinition")}function mc(e,n,t){const r=this;return U(e,i,"gfmFootnoteDefinitionIndent",5);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?n(l):t(l)}}function gc(e){let n=(e||{}).singleTilde;const t={name:"strikethrough",tokenize:i,resolveAll:r};return n==null&&(n=!0),{text:{126:t},insideSpan:{null:[t]},attentionMarkers:{null:[126]}};function r(l,o){let a=-1;for(;++a<l.length;)if(l[a][0]==="enter"&&l[a][1].type==="strikethroughSequenceTemporary"&&l[a][1]._close){let u=a;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[a][1].end.offset-l[a][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[a][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[a][1].end)},f={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[a][1].start)},s=[["enter",c,o],["enter",l[u][1],o],["exit",l[u][1],o],["enter",f,o]],h=o.parser.constructs.insideSpan.null;h&&oe(s,s.length,0,ut(h,l.slice(u+1,a),o)),oe(s,s.length,0,[["exit",f,o],["enter",l[a][1],o],["exit",l[a][1],o],["exit",c,o]]),oe(l,u-1,a-u+3,s),a=u+s.length-2;break}}for(a=-1;++a<l.length;)l[a][1].type==="strikethroughSequenceTemporary"&&(l[a][1].type="data");return l}function i(l,o,a){const u=this.previous,c=this.events;let f=0;return s;function s(p){return u===126&&c[c.length-1][1].type!=="characterEscape"?a(p):(l.enter("strikethroughSequenceTemporary"),h(p))}function h(p){const x=_e(u);if(p===126)return f>1?a(p):(l.consume(p),f++,h);if(f<2&&!n)return a(p);const k=l.exit("strikethroughSequenceTemporary"),S=_e(p);return k._open=!S||S===2&&!!x,k._close=!x||x===2&&!!S,o(p)}}}var dc=class{constructor(){this.map=[]}add(e,n,t){xc(this,e,n,t)}consume(e){if(this.map.sort(function(i,l){return i[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const t=[];for(;n>0;)n-=1,t.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];t.push(e.slice()),e.length=0;let r=t.pop();for(;r;){for(const i of r)e.push(i);r=t.pop()}this.map.length=0}};function xc(e,n,t,r){let i=0;if(!(t===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===n){e.map[i][1]+=t,e.map[i][2].push(...r);return}i+=1}e.map.push([n,t,r])}}function yc(e,n){let t=!1;const r=[];for(;n<e.length;){const i=e[n];if(t){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const l=r.length-1;r[l]=r[l]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(t=!0);n+=1}return r}function kc(){return{flow:{null:{name:"table",tokenize:bc,resolveAll:wc}}}}function bc(e,n,t){const r=this;let i=0,l=0,o;return a;function a(y){let P=r.events.length-1;for(;P>-1;){const X=r.events[P][1].type;if(X==="lineEnding"||X==="linePrefix")P--;else break}const L=P>-1?r.events[P][1].type:null,$=L==="tableHead"||L==="tableRow"?w:u;return $===w&&r.parser.lazy[r.now().line]?t(y):$(y)}function u(y){return e.enter("tableHead"),e.enter("tableRow"),c(y)}function c(y){return y===124||(o=!0,l+=1),f(y)}function f(y){return y===null?t(y):M(y)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):t(y):H(y)?U(e,f,"whitespace")(y):(l+=1,o&&(o=!1,i+=1),y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),o=!0,f):(e.enter("data"),s(y)))}function s(y){return y===null||y===124||V(y)?(e.exit("data"),f(y)):(e.consume(y),y===92?h:s)}function h(y){return y===92||y===124?(e.consume(y),s):s(y)}function p(y){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(y):(e.enter("tableDelimiterRow"),o=!1,H(y)?U(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):x(y))}function x(y){return y===45||y===58?S(y):y===124?(o=!0,e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),k):z(y)}function k(y){return H(y)?U(e,S,"whitespace")(y):S(y)}function S(y){return y===58?(l+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),d):y===45?(l+=1,d(y)):y===null||M(y)?A(y):z(y)}function d(y){return y===45?(e.enter("tableDelimiterFiller"),v(y)):z(y)}function v(y){return y===45?(e.consume(y),v):y===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(y))}function C(y){return H(y)?U(e,A,"whitespace")(y):A(y)}function A(y){return y===124?x(y):y===null||M(y)?!o||i!==l?z(y):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(y)):z(y)}function z(y){return t(y)}function w(y){return e.enter("tableRow"),B(y)}function B(y){return y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),B):y===null||M(y)?(e.exit("tableRow"),n(y)):H(y)?U(e,B,"whitespace")(y):(e.enter("data"),_(y))}function _(y){return y===null||y===124||V(y)?(e.exit("data"),B(y)):(e.consume(y),y===92?j:_)}function j(y){return y===92||y===124?(e.consume(y),_):_(y)}}function wc(e,n){let t=-1,r=!0,i=0,l=[0,0,0,0],o=[0,0,0,0],a=!1,u=0,c,f,s;const h=new dc;for(;++t<e.length;){const p=e[t],x=p[1];p[0]==="enter"?x.type==="tableHead"?(a=!1,u!==0&&(Hn(h,n,u,c,f),f=void 0,u=0),c={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},h.add(t,0,[["enter",c,n]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,s=void 0,l=[0,0,0,0],o=[0,t+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},h.add(t,0,[["enter",f,n]])),i=x.type==="tableDelimiterRow"?2:f?3:1):i&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(l[1]!==0&&(o[0]=o[1],s=nt(h,n,l,i,void 0,s),l=[0,0,0,0]),o[2]=t)):x.type==="tableCellDivider"&&(r?r=!1:(l[1]!==0&&(o[0]=o[1],s=nt(h,n,l,i,void 0,s)),l=o,o=[l[1],t,0,0])):x.type==="tableHead"?(a=!0,u=t):x.type==="tableRow"||x.type==="tableDelimiterRow"?(u=t,l[1]!==0?(o[0]=o[1],s=nt(h,n,l,i,t,s)):o[1]!==0&&(s=nt(h,n,o,i,t,s)),i=0):i&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(o[3]=t)}for(u!==0&&Hn(h,n,u,c,f),h.consume(n.events),t=-1;++t<n.events.length;){const p=n.events[t];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=yc(n.events,t))}return e}function nt(e,n,t,r,i,l){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";t[0]!==0&&(l.end=Object.assign({},Fe(n.events,t[0])),e.add(t[0],0,[["exit",l,n]]));const u=Fe(n.events,t[1]);if(l={type:o,start:Object.assign({},u),end:Object.assign({},u)},e.add(t[1],0,[["enter",l,n]]),t[2]!==0){const c=Fe(n.events,t[2]),f=Fe(n.events,t[3]),s={type:a,start:Object.assign({},c),end:Object.assign({},f)};if(e.add(t[2],0,[["enter",s,n]]),r!==2){const h=n.events[t[2]],p=n.events[t[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",t[3]>t[2]+1){const x=t[2]+1,k=t[3]-t[2]-1;e.add(x,k,[])}}e.add(t[3]+1,0,[["exit",s,n]])}return i!==void 0&&(l.end=Object.assign({},Fe(n.events,i)),e.add(i,0,[["exit",l,n]]),l=void 0),l}function Hn(e,n,t,r,i){const l=[],o=Fe(n.events,t);i&&(i.end=Object.assign({},o),l.push(["exit",i,n])),r.end=Object.assign({},o),l.push(["exit",r,n]),e.add(t+1,0,l)}function Fe(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}var vc={name:"tasklistCheck",tokenize:Sc};function Cc(){return{text:{91:vc}}}function Sc(e,n,t){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),l)}function l(u){return V(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),o):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),o):t(u)}function o(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):t(u)}function a(u){return M(u)?n(u):H(u)?e.check({tokenize:Ec},n,t)(u):t(u)}}function Ec(e,n,t){return U(e,r,"whitespace");function r(i){return i===null?t(i):n(i)}}function Ic(e){return ir([Ks(),ac(),gc(e),kc(),Cc()])}var Ac={};function Tc(e){const n=this,t=e||Ac,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),l=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Ic(t)),l.push(Xs()),o.push(Ys(t))}var Pc=({href:e,children:n,...t})=>(0,T.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",style:{color:"#1b5fc4",textDecoration:"underline"},...t,children:n}),Lc=({children:e,...n})=>(0,T.jsx)("p",{style:{margin:"0 0 8px 0",lineHeight:"1.6"},...n,children:e}),De=(e,n)=>{const t=({children:r,...i})=>F.default.createElement(`h${e}`,{style:{margin:"16px 0 8px 0",fontSize:n,fontWeight:600,lineHeight:"1.3"},...i},r);return t.displayName=`MarkdownHeading${e}`,t},zc=({children:e,...n})=>(0,T.jsx)("ul",{style:{margin:"0 0 8px 0",paddingLeft:"20px",listStyleType:"disc",listStylePosition:"outside"},...n,children:e}),Dc=({children:e,...n})=>(0,T.jsx)("ol",{style:{margin:"0 0 8px 0",paddingLeft:"20px",listStyleType:"decimal",listStylePosition:"outside"},...n,children:e}),Fc=({children:e,...n})=>(0,T.jsx)("li",{style:{display:"list-item",margin:"2px 0",lineHeight:"1.6"},...n,children:e}),Mc=({className:e,children:n,...t})=>e!==void 0||String(n).includes(`
30
+ `)?(0,T.jsx)("code",{style:{display:"block",background:"#f5f5f5",padding:"8px 12px",borderRadius:"6px",fontSize:"13px",overflowX:"auto",fontFamily:'"IBM Plex Mono", monospace'},...t,children:n}):(0,T.jsx)("code",{style:{background:"#f0f2f5",padding:"2px 5px",borderRadius:"4px",fontSize:"13px",fontFamily:'"IBM Plex Mono", monospace'},...t,children:n}),_c=({children:e,...n})=>(0,T.jsx)("pre",{style:{margin:"0 0 8px 0"},...n,children:e}),Rc=({children:e,...n})=>(0,T.jsx)("blockquote",{style:{borderLeft:"4px solid #dee3e8",paddingLeft:"12px",margin:"0 0 8px 0",fontStyle:"italic",color:"#6b6d6f"},...n,children:e}),Oc=({children:e,...n})=>(0,T.jsx)("div",{style:{overflowX:"auto",margin:"0 0 8px 0"},children:(0,T.jsx)("table",{style:{borderCollapse:"collapse",width:"100%",fontSize:"13px"},...n,children:e})}),Nc=({children:e,...n})=>(0,T.jsx)("th",{style:{border:"1px solid #dee3e8",padding:"6px 10px",textAlign:"left",backgroundColor:"#f5f7fa",fontWeight:600},...n,children:e}),Bc=({children:e,...n})=>(0,T.jsx)("td",{style:{border:"1px solid #dee3e8",padding:"6px 10px"},...n,children:e}),jc=({alt:e,...n})=>(0,T.jsx)("img",{alt:e??"",style:{maxWidth:"100%",borderRadius:"8px",margin:"4px 0"},...n}),Hc=e=>(0,T.jsx)("hr",{style:{border:"none",borderTop:"1px solid #dee3e8",margin:"12px 0"},...e}),qc={a:Pc,p:Lc,h1:De(1,"20px"),h2:De(2,"18px"),h3:De(3,"16px"),h4:De(4,"15px"),h5:De(5,"14px"),h6:De(6,"13px"),ul:zc,ol:Dc,li:Fc,code:Mc,pre:_c,blockquote:Rc,table:Oc,th:Nc,td:Bc,img:jc,hr:Hc},Uc=[Tc],Wr=({content:e})=>(0,T.jsx)(gu,{remarkPlugins:Uc,components:qc,children:e}),$c=({source:e,index:n})=>{const t=(0,T.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",width:"100%",minWidth:0},children:[(0,T.jsx)("div",{style:{flexShrink:0,width:"18px",height:"18px",borderRadius:"3px",border:"1px solid #1b5fc4",color:"#1b5fc4",fontSize:"11px",fontWeight:500,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#f0f4ff"},children:n+1}),(0,T.jsx)("div",{style:{fontSize:"12px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"#30373e"},title:e.title,children:e.title})]}),r={display:"flex",alignItems:"center",padding:"8px 10px",border:"1px solid #dee3e8",borderRadius:"8px",backgroundColor:"#fff",cursor:e.url?"pointer":"default",textDecoration:"none",color:"inherit",minWidth:0,transition:"border-color 0.15s"};return e.url?(0,T.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",style:r,onMouseEnter:i=>{i.currentTarget.style.borderColor="#1b5fc4"},onMouseLeave:i=>{i.currentTarget.style.borderColor="#dee3e8"},children:t}):(0,T.jsx)("div",{style:r,children:t})},Vc=()=>(0,T.jsxs)("div",{style:{display:"flex",gap:"4px",padding:"4px 0"},children:[[0,1,2].map(e=>(0,T.jsx)("div",{style:{width:"6px",height:"6px",borderRadius:"50%",backgroundColor:"#b5bfc8",animation:"ago-pulse 1.2s ease-in-out infinite",animationDelay:`${e*.2}s`}},e)),(0,T.jsx)("style",{children:`
31
31
  @keyframes ago-pulse {
32
32
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
33
33
  40% { opacity: 1; transform: scale(1); }
34
34
  }
35
- `})]}),Wr=({message:e,className:n="",showAgentName:t=!1,onFollowUpClick:r})=>{const i=e.role==="user",l=e.status==="IN_PROGRESS";return(0,T.jsxs)("div",{className:`ago-message ago-message--${e.role} ${n}`,style:{display:"flex",flexDirection:"column",alignItems:i?"flex-end":"flex-start",marginBottom:"16px"},children:[!i&&t&&e.agent&&(0,T.jsx)("div",{className:"ago-message__agent",style:{display:"flex",alignItems:"center",gap:"6px",fontSize:"13px",fontWeight:500,color:"#30373e",marginBottom:"6px",padding:"0 4px"},children:e.agent.displayName||e.agent.name}),!i&&e.sources&&e.sources.length>0&&(0,T.jsx)("div",{className:"ago-message__sources",style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"6px",marginBottom:"10px",width:"100%",maxWidth:"85%"},children:e.sources.map((o,a)=>(0,T.jsx)($c,{source:o,index:a},o.id))}),(0,T.jsx)("div",{className:"ago-message__content",style:{maxWidth:i?"75%":"100%",padding:i?"10px 14px":"2px 8px",borderRadius:i?"16px":"0",backgroundColor:i?"#03182f":"transparent",color:i?"#fff":"#30373e",wordBreak:"break-word",fontSize:"14px",lineHeight:"1.6"},children:e.content?(0,T.jsx)(Vr,{content:e.content}):l&&(0,T.jsx)(Vc,{})}),e.followUpReplies&&e.followUpReplies.length>0&&(0,T.jsx)("div",{className:"ago-message__followups",style:{display:"flex",flexWrap:"wrap",gap:"8px",marginTop:"10px"},children:e.followUpReplies.map((o,a)=>(0,T.jsx)("button",{type:"button",className:"ago-message__followup-btn",disabled:!r,onClick:r?()=>r(o):void 0,style:{padding:"6px 14px",fontSize:"13px",borderRadius:"16px",border:"1px solid #dee3e8",backgroundColor:"#fff",color:"#30373e",cursor:r?"pointer":"default",transition:"border-color 0.15s"},onMouseEnter:u=>{u.currentTarget.style.borderColor="#1b5fc4"},onMouseLeave:u=>{u.currentTarget.style.borderColor="#dee3e8"},children:o},a))})]})},Xr=({onSend:e,disabled:n=!1,placeholder:t="Type a message...",allowFiles:r=!1,className:i=""})=>{const[l,o]=(0,M.useState)(""),[a,u]=(0,M.useState)([]),c=(0,M.useRef)(null),f=(0,M.useCallback)(k=>{k.preventDefault(),(l.trim()||a.length>0)&&(e(l.trim(),a.length>0?a:void 0),o(""),u([]))},[l,a,e]),s=(0,M.useCallback)(k=>{k.key==="Enter"&&!k.shiftKey&&(k.preventDefault(),f(k))},[f]),h=(0,M.useCallback)(k=>{const S=Array.from(k.target.files||[]);u(d=>[...d,...S])},[]),p=(0,M.useCallback)(k=>{u(S=>S.filter((d,v)=>v!==k))},[]),x=l.trim()||a.length>0;return(0,T.jsxs)("form",{onSubmit:f,className:`ago-chat-input ${i}`,style:{display:"flex",flexDirection:"column",gap:"8px",padding:"12px 16px",borderTop:"1px solid #dee3e8",backgroundColor:"#fff"},children:[a.length>0&&(0,T.jsx)("div",{className:"ago-chat-input__files",style:{display:"flex",flexWrap:"wrap",gap:"6px"},children:a.map((k,S)=>(0,T.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"6px",padding:"4px 10px",backgroundColor:"#f0f2f5",borderRadius:"6px",fontSize:"12px",color:"#30373e"},children:[(0,T.jsx)("span",{style:{maxWidth:"120px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:k.name}),(0,T.jsx)("button",{type:"button",onClick:()=>p(S),style:{border:"none",background:"none",cursor:"pointer",padding:"0",color:"#6b6d6f",fontSize:"14px",lineHeight:1},children:"×"})]},S))}),(0,T.jsxs)("div",{style:{display:"flex",gap:"8px",alignItems:"flex-end"},children:[r&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("button",{type:"button",onClick:()=>c.current?.click(),disabled:n,style:{padding:"8px",border:"1px solid #dee3e8",borderRadius:"8px",backgroundColor:"#fff",cursor:n?"not-allowed":"pointer",color:"#6b6d6f",fontSize:"16px",lineHeight:1},children:"+"}),(0,T.jsx)("input",{ref:c,type:"file",multiple:!0,onChange:h,style:{display:"none"}})]}),(0,T.jsx)("textarea",{value:l,onChange:k=>o(k.target.value),onKeyDown:s,placeholder:t,disabled:n,rows:1,style:{flex:1,padding:"10px 14px",border:"1px solid #dee3e8",borderRadius:"20px",resize:"none",outline:"none",fontFamily:"inherit",fontSize:"14px",color:"#30373e",backgroundColor:"#f8f8f8",transition:"border-color 0.15s"},onFocus:k=>{k.currentTarget.style.borderColor="#1b5fc4"},onBlur:k=>{k.currentTarget.style.borderColor="#dee3e8"}}),(0,T.jsx)("button",{type:"submit",disabled:n||!x,style:{padding:"10px 18px",border:"none",borderRadius:"20px",backgroundColor:n||!x?"#b5bfc8":"#03182f",color:"#fff",cursor:n||!x?"not-allowed":"pointer",fontWeight:500,fontSize:"14px",transition:"background-color 0.15s"},children:"Send"})]})]})},Wc=({client:e,conversationId:n,title:t="Chat",welcomeMessage:r="Hello! How can I help you today?",placeholder:i="Type a message...",allowFiles:l=!1,height:o=500,logoUrl:a,showAgentName:u=!1,forms:c,onFollowUpClick:f,className:s="",onMessageSent:h,onMessageReceived:p})=>{const x=(0,M.useRef)(null),k=Ye(),S=e??k,{messages:d,isLoading:v,error:C,sendMessage:A}=Ot({client:e,conversationId:n}),z=(0,M.useMemo)(()=>(c??[]).map(_=>_t.createFormCollector(_)),[c?JSON.stringify(c.map(_=>[_.name,_.schema,_.submit??!1,_.description])):""]);(0,M.useEffect)(()=>{if(!S||z.length===0)return;const _=z.map(j=>j.install(S));return()=>_.forEach(j=>j())},[S,z]),(0,M.useEffect)(()=>{x.current?.scrollIntoView({behavior:"smooth"})},[d]),(0,M.useEffect)(()=>{const _=d[d.length-1];_&&_.role==="assistant"&&_.status==="DONE"&&p&&p({id:_.id,content:_.content})},[d,p]);const w=async(_,j)=>{h?.(_),await A(_,j)},B=f===!1?void 0:f??(_=>w(_));return(0,T.jsxs)("div",{className:`ago-chat-widget ${s}`,style:{display:"flex",flexDirection:"column",height:typeof o=="number"?`${o}px`:o,border:"1px solid #dee3e8",borderRadius:"16px",overflow:"hidden",backgroundColor:"#fff",fontFamily:'"IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',boxShadow:"rgba(15, 15, 15, 0.08) 0px 2px 16px 0px"},children:[(0,T.jsxs)("div",{className:"ago-chat-widget__header",style:{padding:"14px 16px",borderBottom:"1px solid #dee3e8",backgroundColor:"#03182f",color:"#e8f0fe",display:"flex",alignItems:"center",gap:"10px"},children:[a&&(0,T.jsx)("img",{src:a,alt:"Logo",style:{height:"24px",width:"auto"}}),(0,T.jsx)("h3",{style:{margin:0,fontSize:"15px",fontWeight:600},children:t})]}),(0,T.jsxs)("div",{className:"ago-chat-widget__messages",style:{flex:1,overflow:"auto",padding:"16px",backgroundColor:"#fbfbfb"},children:[d.length===0?(0,T.jsx)("div",{style:{textAlign:"center",color:"#6b6d6f",padding:"24px 16px",fontSize:"14px",lineHeight:"1.5"},children:r}):d.map(_=>(0,T.jsx)(Wr,{message:_,showAgentName:u,onFollowUpClick:B},_.id)),C&&(0,T.jsx)("div",{style:{padding:"10px 14px",backgroundColor:"#fef2f2",color:"#dc2626",borderRadius:"12px",marginTop:"8px",fontSize:"13px",border:"1px solid #fecaca"},children:C.message}),(0,T.jsx)("div",{ref:x})]}),(0,T.jsx)(Xr,{onSend:w,disabled:v,placeholder:i,allowFiles:l})]})};function Yr({client:e,autoLoad:n=!0}={}){const t=Ye(),r=e||t;if(!r)throw new Error("useConversation requires an AgoClient. Either pass it as options.client or wrap your app in <AgoProvider>.");const[i,l]=(0,M.useState)([]),[o,a]=(0,M.useState)(null),[u,c]=(0,M.useState)(!1),[f,s]=(0,M.useState)(null),h=(0,M.useCallback)(async()=>{c(!0),s(null);try{l(await r.getConversations())}catch(k){s(k instanceof Error?k:new Error("Failed to load conversations"))}finally{c(!1)}},[r]),p=(0,M.useCallback)(async k=>{c(!0),s(null);try{a(await r.getConversation(k))}catch(S){s(S instanceof Error?S:new Error("Failed to load conversation"))}finally{c(!1)}},[r]),x=(0,M.useCallback)(()=>{a(null)},[]);return(0,M.useEffect)(()=>{n&&h()},[n,h]),{conversations:i,currentConversation:o,isLoading:u,error:f,selectConversation:p,startNewConversation:x,refreshConversations:h}}function Xc(e={}){const n=Ye(),t=e.client||n;if(!t)throw new Error("useChat requires an AgoClient. Either pass it as options.client or wrap your app in <AgoProvider>.");const r=Ot({client:t,conversationId:e.conversationId}),i=Yr({client:t,autoLoad:e.autoLoad});return{messages:r.messages,isLoading:r.isLoading,error:r.error||i.error,sendMessage:r.sendMessage,clearMessages:r.clearMessages,conversationId:r.conversationId,conversations:i.conversations,currentConversation:i.currentConversation,isConversationsLoading:i.isLoading,selectConversation:i.selectConversation,startNewConversation:i.startNewConversation,refreshConversations:i.refreshConversations}}function Yc(e,n){const t=Xe(),{name:r,description:i,parameters:l,handler:o}=typeof e=="string"?{name:e,...n}:e,a=(0,M.useRef)(o);a.current=o,(0,M.useEffect)(()=>{const u=c=>a.current(c);return t.registerFunction(r,u,{description:i,parameters:l}),()=>{t.unregisterFunction(r)}},[t,r,i,l])}function Qc(e,n){const t=Xe(),r=(0,M.useRef)(e);r.current=e,(0,M.useEffect)(()=>(t.registerNavigationFunction(i=>r.current(i),n),()=>{t.unregisterFunction("navigateToPage")}),[t,n])}function Jc(e,n){const t=Xe(),r=(0,M.useId)(),i=n??r,l=(0,M.useRef)(e);l.current=e;const o=typeof e=="function";(0,M.useEffect)(()=>{if(typeof l.current=="function"){const a=()=>l.current();return t.addDynamicContext(i,a),()=>{t.removeDynamicContext(i)}}return t.setContext(i,l.current),()=>{t.removeContext(i)}},[t,i,o,o?"":JSON.stringify(e)])}function Qr(e){return(0,M.useSyncExternalStore)(e.subscribe,e.get,e.get)}function Kc(e){const n=Xe(),t=JSON.stringify(e.schema),r=e.submit,i=r?typeof r=="string"?`client:${r}`:r.via==="backend"?`backend:${r.destination}`:"handler"in r?"client:handler":`client:${r.url}`:"none",l=(0,M.useMemo)(()=>_t.createFormCollector(e),[e.name,t,i]);(0,M.useEffect)(()=>l.install(n),[n,l]);const o=Qr(l.store);return{...l,state:o}}exports.AgoProvider=ai;exports.ChatInput=Xr;exports.ChatWidget=Wc;exports.Markdown=Vr;exports.Message=Wr;exports.createFormCollector=_t.createFormCollector;exports.createMockClient=oi.createMockClient;exports.useAgo=qn;exports.useAgoClient=Xe;exports.useAgoContext=Jc;exports.useAgoFunction=Yc;exports.useAgoNavigation=Qc;exports.useAgoStore=Qr;exports.useChat=Xc;exports.useConversation=Yr;exports.useFormCollector=Kc;exports.useMessages=Ot;exports.useOptionalAgoClient=Ye;
35
+ `})]}),Xr=({message:e,className:n="",showAgentName:t=!1,onFollowUpClick:r})=>{const i=e.role==="user",l=e.status==="IN_PROGRESS";return(0,T.jsxs)("div",{className:`ago-message ago-message--${e.role} ${n}`,style:{display:"flex",flexDirection:"column",alignItems:i?"flex-end":"flex-start",marginBottom:"16px"},children:[!i&&t&&e.agent&&(0,T.jsx)("div",{className:"ago-message__agent",style:{display:"flex",alignItems:"center",gap:"6px",fontSize:"13px",fontWeight:500,color:"#30373e",marginBottom:"6px",padding:"0 4px"},children:e.agent.displayName||e.agent.name}),!i&&e.sources&&e.sources.length>0&&(0,T.jsx)("div",{className:"ago-message__sources",style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"6px",marginBottom:"10px",width:"100%",maxWidth:"85%"},children:e.sources.map((o,a)=>(0,T.jsx)($c,{source:o,index:a},o.id))}),(0,T.jsx)("div",{className:"ago-message__content",style:{maxWidth:i?"75%":"100%",padding:i?"10px 14px":"2px 8px",borderRadius:i?"16px":"0",backgroundColor:i?"#03182f":"transparent",color:i?"#fff":"#30373e",wordBreak:"break-word",fontSize:"14px",lineHeight:"1.6"},children:e.content?(0,T.jsx)(Wr,{content:e.content}):l&&(0,T.jsx)(Vc,{})}),e.followUpReplies&&e.followUpReplies.length>0&&(0,T.jsx)("div",{className:"ago-message__followups",style:{display:"flex",flexWrap:"wrap",gap:"8px",marginTop:"10px"},children:e.followUpReplies.map((o,a)=>(0,T.jsx)("button",{type:"button",className:"ago-message__followup-btn",disabled:!r,onClick:r?()=>r(o):void 0,style:{padding:"6px 14px",fontSize:"13px",borderRadius:"16px",border:"1px solid #dee3e8",backgroundColor:"#fff",color:"#30373e",cursor:r?"pointer":"default",transition:"border-color 0.15s"},onMouseEnter:u=>{u.currentTarget.style.borderColor="#1b5fc4"},onMouseLeave:u=>{u.currentTarget.style.borderColor="#dee3e8"},children:o},a))})]})},Wc=({client:e,conversationId:n,title:t="Chat",welcomeMessage:r="Hello! How can I help you today?",placeholder:i="Type a message...",allowFiles:l=!1,height:o=500,logoUrl:a,showAgentName:u=!1,forms:c,onFollowUpClick:f,className:s="",onMessageSent:h,onMessageReceived:p})=>{const x=(0,F.useRef)(null),k=Qe(),S=e??k,{messages:d,isLoading:v,error:C,sendMessage:A}=Ot({client:e,conversationId:n}),z=(0,F.useMemo)(()=>(c??[]).map(_=>Ve.createFormCollector(_)),[c?JSON.stringify(c.map(_=>[_.name,_.schema,_.submit??!1,_.description])):""]);(0,F.useEffect)(()=>{if(!S||z.length===0)return;const _=z.map(j=>j.install(S));return()=>_.forEach(j=>j())},[S,z]),(0,F.useEffect)(()=>{x.current?.scrollIntoView({behavior:"smooth"})},[d]),(0,F.useEffect)(()=>{const _=d[d.length-1];_&&_.role==="assistant"&&_.status==="DONE"&&p&&p({id:_.id,content:_.content})},[d,p]);const w=async(_,j)=>{h?.(_),await A(_,j)},B=f===!1?void 0:f??(_=>w(_));return(0,T.jsxs)("div",{className:`ago-chat-widget ${s}`,style:{display:"flex",flexDirection:"column",height:typeof o=="number"?`${o}px`:o,border:"1px solid #dee3e8",borderRadius:"16px",overflow:"hidden",backgroundColor:"#fff",fontFamily:'"IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',textAlign:"left",boxShadow:"rgba(15, 15, 15, 0.08) 0px 2px 16px 0px"},children:[(0,T.jsxs)("div",{className:"ago-chat-widget__header",style:{padding:"14px 16px",borderBottom:"1px solid #dee3e8",backgroundColor:"#03182f",color:"#e8f0fe",display:"flex",alignItems:"center",gap:"10px"},children:[a&&(0,T.jsx)("img",{src:a,alt:"Logo",style:{height:"24px",width:"auto"}}),(0,T.jsx)("h3",{style:{margin:0,fontSize:"15px",fontWeight:600},children:t})]}),(0,T.jsxs)("div",{className:"ago-chat-widget__messages",style:{flex:1,overflow:"auto",padding:"16px",backgroundColor:"#fbfbfb"},children:[d.length===0?(0,T.jsx)("div",{style:{textAlign:"center",color:"#6b6d6f",padding:"24px 16px",fontSize:"14px",lineHeight:"1.5"},children:r}):d.map(_=>(0,T.jsx)(Xr,{message:_,showAgentName:u,onFollowUpClick:B},_.id)),C&&(0,T.jsx)("div",{style:{padding:"10px 14px",backgroundColor:"#fef2f2",color:"#dc2626",borderRadius:"12px",marginTop:"8px",fontSize:"13px",border:"1px solid #fecaca"},children:C.message}),(0,T.jsx)("div",{ref:x})]}),(0,T.jsx)(Un,{onSend:w,disabled:v,placeholder:i,allowFiles:l})]})};function Yr({client:e,autoLoad:n=!0}={}){const t=Qe(),r=e||t;if(!r)throw new Error("useConversation requires an AgoClient. Either pass it as options.client or wrap your app in <AgoProvider>.");const[i,l]=(0,F.useState)([]),[o,a]=(0,F.useState)(null),[u,c]=(0,F.useState)(!1),[f,s]=(0,F.useState)(null),h=(0,F.useCallback)(async()=>{c(!0),s(null);try{l(await r.getConversations())}catch(k){s(k instanceof Error?k:new Error("Failed to load conversations"))}finally{c(!1)}},[r]),p=(0,F.useCallback)(async k=>{c(!0),s(null);try{a(await r.getConversation(k))}catch(S){s(S instanceof Error?S:new Error("Failed to load conversation"))}finally{c(!1)}},[r]),x=(0,F.useCallback)(()=>{a(null)},[]);return(0,F.useEffect)(()=>{n&&h()},[n,h]),{conversations:i,currentConversation:o,isLoading:u,error:f,selectConversation:p,startNewConversation:x,refreshConversations:h}}function Xc(e={}){const n=Qe(),t=e.client||n;if(!t)throw new Error("useChat requires an AgoClient. Either pass it as options.client or wrap your app in <AgoProvider>.");const r=Ot({client:t,conversationId:e.conversationId}),i=Yr({client:t,autoLoad:e.autoLoad});return{messages:r.messages,isLoading:r.isLoading,error:r.error||i.error,sendMessage:r.sendMessage,clearMessages:r.clearMessages,conversationId:r.conversationId,conversations:i.conversations,currentConversation:i.currentConversation,isConversationsLoading:i.isLoading,selectConversation:i.selectConversation,startNewConversation:i.startNewConversation,refreshConversations:i.refreshConversations}}function Yc(e,n){const t=Ye(),{name:r,description:i,parameters:l,handler:o}=typeof e=="string"?{name:e,...n}:e,a=(0,F.useRef)(o);a.current=o,(0,F.useEffect)(()=>{const u=c=>a.current(c);return t.registerFunction(r,u,{description:i,parameters:l}),()=>{t.unregisterFunction(r)}},[t,r,i,l])}function Qc(e,n){const t=Ye(),r=(0,F.useRef)(e);r.current=e,(0,F.useEffect)(()=>(t.registerNavigationFunction(i=>r.current(i),n),()=>{t.unregisterFunction("navigateToPage")}),[t,n])}function Jc(e,n){const t=Ye(),r=(0,F.useId)(),i=n??r,l=(0,F.useRef)(e);l.current=e;const o=typeof e=="function";(0,F.useEffect)(()=>{if(typeof l.current=="function"){const a=()=>l.current();return t.addDynamicContext(i,a),()=>{t.removeDynamicContext(i)}}return t.setContext(i,l.current),()=>{t.removeContext(i)}},[t,i,o,o?"":JSON.stringify(e)])}function Qr(e){return(0,F.useSyncExternalStore)(e.subscribe,e.get,e.get)}function Kc(e){const n=Ye(),t=JSON.stringify(e.schema),r=e.submit,i=r?typeof r=="string"?`client:${r}`:r.via==="backend"?`backend:${r.destination}`:"handler"in r?"client:handler":`client:${r.url}`:"none",l=(0,F.useMemo)(()=>Ve.createFormCollector(e),[e.name,t,i]);(0,F.useEffect)(()=>l.install(n),[n,l]);const o=Qr(l.store),a=(0,F.useMemo)(()=>Ve.deriveFormStatus(e.schema,o.values),[o,e.schema]),u=(0,F.useMemo)(()=>({...o,...a}),[o,a]);return{...l,state:u}}exports.AgoProvider=ai;exports.ChatInput=Un;exports.ChatWidget=Wc;exports.Markdown=Wr;exports.Message=Xr;exports.createFormCollector=Ve.createFormCollector;exports.createMockClient=oi.createMockClient;exports.deriveFormStatus=Ve.deriveFormStatus;exports.useAgo=qn;exports.useAgoClient=Ye;exports.useAgoContext=Jc;exports.useAgoFunction=Yc;exports.useAgoNavigation=Qc;exports.useAgoStore=Qr;exports.useChat=Xc;exports.useConversation=Yr;exports.useFormCollector=Kc;exports.useMessages=Ot;exports.useOptionalAgoClient=Qe;