@snf/qa-bot-core 0.4.0 → 0.5.0

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.
@@ -5,5 +5,5 @@ import*as e from"react";import t,{forwardRef as n,createContext as r,useContext
5
5
  * Copyright(c) 2015 Andreas Lubbe
6
6
  * Copyright(c) 2015 Tiancheng "Timothy" Gu
7
7
  * MIT Licensed
8
- */var mn,vn;const yn=gn(function(){if(vn)return mn;vn=1;var e=/["'&<>]/;return mn=function(t){var n=""+t,r=e.exec(n);if(!r)return n;var o,i="",l=0,a=0;for(l=r.index;l<n.length;l++){switch(n.charCodeAt(l)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 39:o="&#39;";break;case 60:o="&lt;";break;case 62:o="&gt;";break;default:continue}a!==l&&(i+=n.substring(a,l)),a=l+1,i+=o}return a!==l?i+n.substring(a,l):i}}());function wn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const bn=/(url|image|image-set)\(/i;class kn extends hn{attribute(e,t){return"style"===e&&Object.keys(t).forEach(e=>{String(t[e]).match(bn)&&delete t[e]}),t}}const xn=/^<(!doctype|(html|head|body)(\s|>))/i,En=/^(aria-|data-|\w+:)/iu,Pn=/{{{(\w+)\/?}}}/;function Cn(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}let Sn=class{constructor(e,t={},n=[],r=[]){var o;if(wn(this,"allowed",void 0),wn(this,"banned",void 0),wn(this,"blocked",void 0),wn(this,"container",void 0),wn(this,"content",[]),wn(this,"props",void 0),wn(this,"matchers",void 0),wn(this,"filters",void 0),wn(this,"keyIndex",void 0),"production"!==process.env.NODE_ENV&&e&&"string"!=typeof e)throw new TypeError("Interweave parser requires a valid string.");this.props=t,this.matchers=n,this.filters=[...r,new kn],this.keyIndex=-1,this.container=this.createContainer(e||""),this.allowed=new Set(null!==(o=t.allowList)&&void 0!==o?o:cn),this.banned=new Set(An),this.blocked=new Set(t.blockList)}applyAttributeFilters(e,t){return this.filters.reduce((t,n)=>null!==t&&"function"==typeof n.attribute?n.attribute(e,t):t,t)}applyNodeFilters(e,t){return this.filters.reduce((t,n)=>null!==t&&"function"==typeof n.node?n.node(e,t):t,t)}applyMatchers(e,t){const n={},{props:r}=this;let o=e,i=0,l=null;return this.matchers.forEach(e=>{const a=e.asTag().toLowerCase(),s=this.getTagConfig(a);if(r[e.inverseName]||!this.isTagAllowed(a)||!this.canRenderChild(t,s))return;let A="";for(;o&&(l=e.match(o));){const{index:t,length:a,match:s,valid:c,void:u,...d}=l,f=e.propName+String(i);t>0&&(A+=o.slice(0,t)),c?(A+=u?`{{{${f}/}}}`:`{{{${f}}}}${s}{{{/${f}}}}`,this.keyIndex+=1,i+=1,n[f]={children:s,matcher:e,props:{...r,...d,key:this.keyIndex}}):A+=s,e.greedy?(o=A+o.slice(t+a),A=""):o=o.slice(t+(a||s.length))}e.greedy||(o=A+o)}),0===i?e:this.replaceTokens(o,n)}canRenderChild(e,t){return!(!e.tagName||!t.tagName||e.void)&&(e.children.length>0?e.children.includes(t.tagName):!(e.invalid.length>0&&e.invalid.includes(t.tagName))&&(t.parent.length>0?t.parent.includes(e.tagName):!(!e.self&&e.tagName===t.tagName)&&!!(e&&e.content&t.type)))}convertLineBreaks(e){const{noHtml:t,disableLineBreaks:n}=this.props;if(t||n||e.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return e;let r=e.replace(/\r\n/g,"\n");return r=r.replace(/\n{3,}/g,"\n\n\n"),r=r.replace(/\n/g,"<br/>"),r}createContainer(e){var t;const n=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||Cn)();if(!n)return;const r=null!==(t=this.props.containerTagName)&&void 0!==t?t:"body",o="body"===r||"fragment"===r?n.body:n.createElement(r);if(e.match(xn)){if("production"!==process.env.NODE_ENV)throw new Error("HTML documents as Interweave content are not supported.")}else o.innerHTML=this.convertLineBreaks(this.props.escapeHtml?yn(e):e);return o}extractAttributes(e){const{allowAttributes:t}=this.props,n={};let r=0;return 1===e.nodeType&&e.attributes&&([...e.attributes].forEach(o=>{const{name:i,value:l}=o,a=i.toLowerCase(),s=un[a]||un[i];if(!this.isSafe(e)||!a.match(En)&&(!t&&(!s||2===s)||a.startsWith("on")||l.replace(/(\s|\0|&#x0([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let A="style"===a?this.extractStyleAttribute(e):l;4===s?A=!0:3===s?A=Number.parseFloat(String(A)):5!==s&&(A=String(A)),n[dn[a]||a]=this.applyAttributeFilters(a,A),r+=1}),0!==r)?n:null}extractStyleAttribute(e){const t={};return Array.from(e.style).forEach(n=>{const r=e.style[n];("string"==typeof r||"number"==typeof r)&&(t[n.replace(/-([a-z])/g,(e,t)=>String(t).toUpperCase())]=r)}),t}getTagConfig(e){const t={children:[],content:0,invalid:[],parent:[],self:!0,tagName:"",type:0,void:!1};return sn[e]?{...t,...sn[e],tagName:e}:t}isSafe(e){if(typeof HTMLAnchorElement<"u"&&e instanceof HTMLAnchorElement){const t=e.getAttribute("href");if(null!=t&&t.startsWith("#"))return!0;const n=e.protocol.toLowerCase();return":"===n||"http:"===n||"https:"===n||"mailto:"===n||"tel:"===n}return!0}isTagAllowed(e){return!this.banned.has(e)&&!this.blocked.has(e)&&(this.props.allowElements||this.allowed.has(e))}parse(){return this.container?this.parseNode(this.container,this.getTagConfig(this.container.nodeName.toLowerCase())):[]}parseNode(e,n){const{noHtml:r,noHtmlExceptMatchers:o,allowElements:i,transform:l,transformOnlyAllowList:a}=this.props;let s=[],A="";return[...e.childNodes].forEach(e=>{if(1===e.nodeType){const u=e.nodeName.toLowerCase(),d=this.getTagConfig(u);A&&(s.push(A),A="");const f=this.applyNodeFilters(u,e);if(!f)return;let p;if(l&&(!a||this.isTagAllowed(u))){this.keyIndex+=1;const e=this.keyIndex;p=this.parseNode(f,d);const n=l(f,p,d);if(null===n)return;if(typeof n<"u")return void s.push(t.cloneElement(n,{key:e}));this.keyIndex=e-1}if(this.banned.has(u))return;if(r||o&&"br"!==u||!this.isTagAllowed(u)||!i&&!this.canRenderChild(n,d))s=[...s,...this.parseNode(f,d.tagName?d:n)];else{var c;this.keyIndex+=1;const e=this.extractAttributes(f),n={tagName:u};e&&(n.attributes=e),d.void&&(n.selfClose=d.void),s.push(t.createElement(pn,{...n,key:this.keyIndex},null!==(c=p)&&void 0!==c?c:this.parseNode(f,d)))}}else if(3===e.nodeType){const t=r&&!o?e.textContent:this.applyMatchers(e.textContent||"",n);Array.isArray(t)?s=[...s,...t]:A+=t}}),A&&s.push(A),s}replaceTokens(e,t){if(!e.includes("{{{"))return e;const n=[];let r=e,o=null;for(;o=r.match(Pn);){const[e,i]=o,l=o.index,a=e.includes("/");if("production"!==process.env.NODE_ENV&&!t[i])throw new Error(`Token "${i}" found but no matching element to replace with.`);l>0&&(n.push(r.slice(0,l)),r=r.slice(l));const{children:s,matcher:A,props:c}=t[i];let u;if(a)u=e.length,n.push(A.createElement(s,c));else{const o=r.match(new RegExp(`{{{/${i}}}}`));if("production"!==process.env.NODE_ENV&&!o)throw new Error(`Closing token missing for interpolated element "${i}".`);u=o.index+o[0].length,n.push(A.createElement(this.replaceTokens(r.slice(e.length,o.index),t),c))}r=r.slice(u)}return r.length>0&&n.push(r),0===n.length?"":1===n.length&&"string"==typeof n[0]?n[0]:n}};function Dn(e){var n;const{attributes:r,className:o,containerTagName:i,content:l,emptyContent:a,parsedContent:s,tagName:A,noWrap:c}=e,u=null!==(n=i??A)&&void 0!==n?n:"span",d="fragment"===u||c;let f;if(s)f=s;else{const t=new Sn(l??"",e).parse();t.length>0&&(f=t)}return f||(f=a),d?t.createElement(t.Fragment,null,f):t.createElement(pn,{attributes:r,className:o,tagName:u},f)}function Bn(e){const{attributes:n,className:r,content:o="",disableFilters:i=!1,disableMatchers:l=!1,emptyContent:a=null,filters:s=[],matchers:A=[],onAfterParse:c=null,onBeforeParse:u=null,tagName:d="span",noWrap:f=!1,...p}=e,h=l?[]:A,g=i?[]:s,m=u?[u]:[],v=c?[c]:[];h.forEach(e=>{e.onBeforeParse&&m.push(e.onBeforeParse.bind(e)),e.onAfterParse&&v.push(e.onAfterParse.bind(e))});const y=m.reduce((t,n)=>{const r=n(t,e);if("production"!==process.env.NODE_ENV&&"string"!=typeof r)throw new TypeError("Interweave `onBeforeParse` must return a valid HTML string.");return r},o??""),w=new Sn(y,p,h,g),b=v.reduce((t,n)=>{const r=n(t,e);if("production"!==process.env.NODE_ENV&&!Array.isArray(r))throw new TypeError("Interweave `onAfterParse` must return an array of strings and React elements.");return r},w.parse());return t.createElement(Dn,{attributes:n,className:r,containerTagName:e.containerTagName,emptyContent:a,noWrap:f,parsedContent:0===b.length?void 0:b,tagName:d})}const In=({children:e})=>h("div",{style:{whiteSpace:"normal"},children:h(Bn,{content:"string"==typeof e?e:""})}),Tn={autoConfig:!0},Qn=(e,t,n)=>{var r;if(!e.detail.currPath)return!1;const o=t[e.detail.currPath];return!!o&&((null==(r=o.renderHtml)?void 0:r.map(e=>e.toUpperCase()).includes(n))??!1)},Mn=e=>{const t=[];let n="",r=!1;for(let o=0;o<e.length;o++){const i=e[o];"<"===i?r?(t.push(n),n=i):(r=!0,n=i):">"===i?(n+=i,t.push(n),n="",r=!1):r?n+=i:t.push(i)}return""!==n&&t.push(n),t},On=e=>{const{getFlow:t}=$t(),{messages:n,replaceMessages:r}=en(),{settings:o}=nn(),{hasChatHistoryLoaded:i}=on(),l={...e,...Tn},a=l.htmlComponent?l.htmlComponent:In;s(()=>{var e,t;if(i){const i=[...n];for(let n=0;n<i.length&&n<((null==(e=o.chatHistory)?void 0:e.maxEntries)??30);n++){const e=i[n];null!=(t=e.tags)&&t.includes("rcb-html-renderer-plugin:parsed")&&(e.contentWrapper=a)}r(i)}},[i]);const A=async e=>{var n;const r=null==(n=e.data.message)?void 0:n.sender.toUpperCase();"string"==typeof e.data.message.content&&Qn(e,t(),r)&&("rcb-start-simulate-stream-message"===e.type&&(e.data.simulateStreamChunker=Mn),e.data.message.contentWrapper=a,e.data.message.tags||(e.data.message.tags=[]),e.data.message.tags.push("rcb-html-renderer-plugin:parsed"))};tn(J.PRE_INJECT_MESSAGE,A),tn(J.CHUNK_STREAM_MESSAGE,A),tn(J.START_STREAM_MESSAGE,A),tn(J.START_SIMULATE_STREAM_MESSAGE,A),tn(J.START_SPEAK_AUDIO,async e=>{Qn(e,t(),"BOT")&&(e.data.textToRead=(e=>typeof window.DOMParser<"u"?(new DOMParser).parseFromString(e,"text/html").body.textContent||"":e.replace(/<\/?[^>]+(>|$)/g,""))(e.data.textToRead))});const c={name:"@rcb-plugins/html-renderer"};return null!=l&&l.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0,rcbStartSpeakAudio:!0}}),c};const Ln=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Nn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Rn={};function Hn(e,t){return(Rn.jsx?Nn:Ln).test(e)}const Fn=/[ \t\n\f\r]/g;function zn(e){return""===e.replace(Fn,"")}class jn{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function Un(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new jn(n,r,t)}function _n(e){return e.toLowerCase()}jn.prototype.property={},jn.prototype.normal={},jn.prototype.space=null;class qn{constructor(e,t){this.property=e,this.attribute=t}}qn.prototype.space=null,qn.prototype.boolean=!1,qn.prototype.booleanish=!1,qn.prototype.overloadedBoolean=!1,qn.prototype.number=!1,qn.prototype.commaSeparated=!1,qn.prototype.spaceSeparated=!1,qn.prototype.commaOrSpaceSeparated=!1,qn.prototype.mustUseProperty=!1,qn.prototype.defined=!1;let Vn=0;const Gn=$n(),Wn=$n(),Yn=$n(),Kn=$n(),Xn=$n(),Jn=$n(),Zn=$n();function $n(){return 2**++Vn}const er=Object.freeze(Object.defineProperty({__proto__:null,boolean:Gn,booleanish:Wn,commaOrSpaceSeparated:Zn,commaSeparated:Jn,number:Kn,overloadedBoolean:Yn,spaceSeparated:Xn},Symbol.toStringTag,{value:"Module"})),tr=Object.keys(er);class nr extends qn{constructor(e,t,n,r){let o=-1;if(super(e,t),rr(this,"space",r),"number"==typeof n)for(;++o<tr.length;){const e=tr[o];rr(this,tr[o],(n&er[e])===er[e])}}}function rr(e,t,n){n&&(e[t]=n)}nr.prototype.defined=!0;const or={}.hasOwnProperty;function ir(e){const t={},n={};let r;for(r in e.properties)if(or.call(e.properties,r)){const o=e.properties[r],i=new nr(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[_n(r)]=r,n[_n(i.attribute)]=r}return new jn(t,n,e.space)}const lr=ir({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),ar=ir({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function sr(e,t){return t in e?e[t]:t}function Ar(e,t){return sr(e,t.toLowerCase())}const cr=ir({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Ar,properties:{xmlns:null,xmlnsXLink:null}}),ur=ir({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:Wn,ariaAutoComplete:null,ariaBusy:Wn,ariaChecked:Wn,ariaColCount:Kn,ariaColIndex:Kn,ariaColSpan:Kn,ariaControls:Xn,ariaCurrent:null,ariaDescribedBy:Xn,ariaDetails:null,ariaDisabled:Wn,ariaDropEffect:Xn,ariaErrorMessage:null,ariaExpanded:Wn,ariaFlowTo:Xn,ariaGrabbed:Wn,ariaHasPopup:null,ariaHidden:Wn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Xn,ariaLevel:Kn,ariaLive:null,ariaModal:Wn,ariaMultiLine:Wn,ariaMultiSelectable:Wn,ariaOrientation:null,ariaOwns:Xn,ariaPlaceholder:null,ariaPosInSet:Kn,ariaPressed:Wn,ariaReadOnly:Wn,ariaRelevant:null,ariaRequired:Wn,ariaRoleDescription:Xn,ariaRowCount:Kn,ariaRowIndex:Kn,ariaRowSpan:Kn,ariaSelected:Wn,ariaSetSize:Kn,ariaSort:null,ariaValueMax:Kn,ariaValueMin:Kn,ariaValueNow:Kn,ariaValueText:null,role:null}}),dr=ir({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Ar,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Jn,acceptCharset:Xn,accessKey:Xn,action:null,allow:null,allowFullScreen:Gn,allowPaymentRequest:Gn,allowUserMedia:Gn,alt:null,as:null,async:Gn,autoCapitalize:null,autoComplete:Xn,autoFocus:Gn,autoPlay:Gn,blocking:Xn,capture:null,charSet:null,checked:Gn,cite:null,className:Xn,cols:Kn,colSpan:null,content:null,contentEditable:Wn,controls:Gn,controlsList:Xn,coords:Kn|Jn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Gn,defer:Gn,dir:null,dirName:null,disabled:Gn,download:Yn,draggable:Wn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Gn,formTarget:null,headers:Xn,height:Kn,hidden:Gn,high:Kn,href:null,hrefLang:null,htmlFor:Xn,httpEquiv:Xn,id:null,imageSizes:null,imageSrcSet:null,inert:Gn,inputMode:null,integrity:null,is:null,isMap:Gn,itemId:null,itemProp:Xn,itemRef:Xn,itemScope:Gn,itemType:Xn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Gn,low:Kn,manifest:null,max:null,maxLength:Kn,media:null,method:null,min:null,minLength:Kn,multiple:Gn,muted:Gn,name:null,nonce:null,noModule:Gn,noValidate:Gn,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:Gn,optimum:Kn,pattern:null,ping:Xn,placeholder:null,playsInline:Gn,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Gn,referrerPolicy:null,rel:Xn,required:Gn,reversed:Gn,rows:Kn,rowSpan:Kn,sandbox:Xn,scope:null,scoped:Gn,seamless:Gn,selected:Gn,shadowRootClonable:Gn,shadowRootDelegatesFocus:Gn,shadowRootMode:null,shape:null,size:Kn,sizes:null,slot:null,span:Kn,spellCheck:Wn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Kn,step:null,style:null,tabIndex:Kn,target:null,title:null,translate:null,type:null,typeMustMatch:Gn,useMap:null,value:Wn,width:Kn,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Xn,axis:null,background:null,bgColor:null,border:Kn,borderColor:null,bottomMargin:Kn,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Gn,declare:Gn,event:null,face:null,frame:null,frameBorder:null,hSpace:Kn,leftMargin:Kn,link:null,longDesc:null,lowSrc:null,marginHeight:Kn,marginWidth:Kn,noResize:Gn,noHref:Gn,noShade:Gn,noWrap:Gn,object:null,profile:null,prompt:null,rev:null,rightMargin:Kn,rules:null,scheme:null,scrolling:Wn,standby:null,summary:null,text:null,topMargin:Kn,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Kn,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Gn,disableRemotePlayback:Gn,prefix:null,property:null,results:Kn,security:null,unselectable:null}}),fr=ir({space:"svg",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"},transform:sr,properties:{about:Zn,accentHeight:Kn,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Kn,amplitude:Kn,arabicForm:null,ascent:Kn,attributeName:null,attributeType:null,azimuth:Kn,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Kn,by:null,calcMode:null,capHeight:Kn,className:Xn,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:Kn,diffuseConstant:Kn,direction:null,display:null,dur:null,divisor:Kn,dominantBaseline:null,download:Gn,dx:null,dy:null,edgeMode:null,editable:null,elevation:Kn,enableBackground:null,end:null,event:null,exponent:Kn,externalResourcesRequired:null,fill:null,fillOpacity:Kn,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:Jn,g2:Jn,glyphName:Jn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Kn,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Kn,horizOriginX:Kn,horizOriginY:Kn,id:null,ideographic:Kn,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Kn,k:Kn,k1:Kn,k2:Kn,k3:Kn,k4:Kn,kernelMatrix:Zn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Kn,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:Kn,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:Kn,overlineThickness:Kn,paintOrder:null,panose1:null,path:null,pathLength:Kn,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Xn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Kn,pointsAtY:Kn,pointsAtZ:Kn,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Zn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Zn,rev:Zn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Zn,requiredFeatures:Zn,requiredFonts:Zn,requiredFormats:Zn,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:Kn,specularExponent:Kn,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Kn,strikethroughThickness:Kn,string:null,stroke:null,strokeDashArray:Zn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Kn,strokeOpacity:Kn,strokeWidth:null,style:null,surfaceScale:Kn,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Zn,tabIndex:Kn,tableValues:null,target:null,targetX:Kn,targetY:Kn,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Zn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Kn,underlineThickness:Kn,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Kn,values:null,vAlphabetic:Kn,vMathematical:Kn,vectorEffect:null,vHanging:Kn,vIdeographic:Kn,version:null,vertAdvY:Kn,vertOriginX:Kn,vertOriginY:Kn,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Kn,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),pr=/^data[-\w.:]+$/i,hr=/-[a-z]/g,gr=/[A-Z]/g;function mr(e){return"-"+e.toLowerCase()}function vr(e){return e.charAt(1).toUpperCase()}const yr={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"},wr=Un([ar,lr,cr,ur,dr],"html"),br=Un([ar,lr,cr,ur,fr],"svg");function kr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xr,Er,Pr,Cr={};var Sr=function(){if(Pr)return Cr;Pr=1;var e=Cr&&Cr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.default=function(e,n){var r=null;if(!e||"string"!=typeof e)return r;var o=(0,t.default)(e),i="function"==typeof n;return o.forEach(function(e){if("declaration"===e.type){var t=e.property,o=e.value;i?n(t,o,e):o&&((r=r||{})[t]=o)}}),r};var t=e(function(){if(Er)return xr;Er=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,s="";function A(e){return e?e.replace(a,s):s}return xr=function(a,c){if("string"!=typeof a)throw new TypeError("First argument must be a string");if(!a)return[];c=c||{};var u=1,d=1;function f(e){var n=e.match(t);n&&(u+=n.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function p(){var e={line:u,column:d};return function(t){return t.position=new h(e),v(),t}}function h(e){this.start=e,this.end={line:u,column:d},this.source=c.source}function g(e){var t=new Error(c.source+":"+u+":"+d+": "+e);if(t.reason=e,t.filename=c.source,t.line=u,t.column=d,t.source=a,!c.silent)throw t}function m(e){var t=e.exec(a);if(t){var n=t[0];return f(n),a=a.slice(n.length),t}}function v(){m(n)}function y(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var e=p();if("/"==a.charAt(0)&&"*"==a.charAt(1)){for(var t=2;s!=a.charAt(t)&&("*"!=a.charAt(t)||"/"!=a.charAt(t+1));)++t;if(t+=2,s===a.charAt(t-1))return g("End of comment missing");var n=a.slice(2,t-2);return d+=2,f(n),a=a.slice(t),d+=2,e({type:"comment",comment:n})}}function b(){var t=p(),n=m(r);if(n){if(w(),!m(o))return g("property missing ':'");var a=m(i),c=t({type:"declaration",property:A(n[0].replace(e,s)),value:a?A(a[0].replace(e,s)):s});return m(l),c}}return h.prototype.content=a,v(),function(){var e,t=[];for(y(t);e=b();)!1!==e&&(t.push(e),y(t));return t}()},xr}());return Cr}();const Dr=kr(Sr),Br=Dr.default||Dr,Ir=Qr("end"),Tr=Qr("start");function Qr(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function Mr(e){return e&&"object"==typeof e?"position"in e||"type"in e?Lr(e.position):"start"in e||"end"in e?Lr(e):"line"in e||"column"in e?Or(e):"":""}function Or(e){return Nr(e&&e.line)+":"+Nr(e&&e.column)}function Lr(e){return Or(e&&e.start)+"-"+Or(e&&e.end)}function Nr(e){return e&&"number"==typeof e?e:1}class Rr extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},i=!1;if(t&&(o="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!o.cause&&e&&(i=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){const e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.position)}const l=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=l?l.line:void 0,this.name=Mr(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=i&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Rr.prototype.file="",Rr.prototype.name="",Rr.prototype.reason="",Rr.prototype.message="",Rr.prototype.stack="",Rr.prototype.column=void 0,Rr.prototype.line=void 0,Rr.prototype.ancestors=void 0,Rr.prototype.cause=void 0,Rr.prototype.fatal=void 0,Rr.prototype.place=void 0,Rr.prototype.ruleId=void 0,Rr.prototype.source=void 0;const Hr={}.hasOwnProperty,Fr=new Map,zr=/[A-Z]/g,jr=/-([a-z])/g,Ur=new Set(["table","tbody","thead","tfoot","tr"]),_r=new Set(["td","th"]),qr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Vr(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,o,i){const l=Array.isArray(o.children),a=Tr(n);return t(r,o,i,l,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,o,i){const l=Array.isArray(o.children)?n:t;return i?l(r,o,i):l(r,o)}}(0,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?br:wr,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=Gr(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Gr(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(o=br,e.schema=o),e.ancestors.push(t);const i=Jr(e,t.tagName,!1),l=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&Hr.call(t.properties,o)){const i=Xr(e,o,t.properties[o]);if(i){const[o,l]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof l&&_r.has(t.tagName)?r=l:n[o]=l}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let a=Kr(e,t);return Ur.has(t.tagName)&&(a=a.filter(function(e){return"string"!=typeof e||!function(e){return"object"==typeof e?"text"===e.type&&zn(e.value):zn(e)}(e)})),Wr(e,l,i,t),Yr(l,a),e.ancestors.pop(),e.schema=r,e.create(t,i,l,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Zr(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.name&&"html"===r.space&&(o=br,e.schema=o),e.ancestors.push(t);const i=null===t.name?e.Fragment:Jr(e,t.name,!0),l=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];t.type;const o=t.expression;o.type;const i=o.properties[0];i.type,Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else Zr(e,t.position);else{const o=r.name;let i;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];t.type,i=e.evaluater.evaluateExpression(t.expression)}else Zr(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),a=Kr(e,t);return Wr(e,l,i,t),Yr(l,a),e.ancestors.pop(),e.schema=r,e.create(t,i,l,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Zr(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Yr(r,Kr(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function Wr(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Yr(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Kr(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Fr;for(;++r<t.children.length;){const i=t.children[r];let l;if(e.passKeys){const e="element"===i.type?i.tagName:"mdxJsxFlowElement"===i.type||"mdxJsxTextElement"===i.type?i.name:void 0;if(e){const t=o.get(e)||0;l=e+"-"+t,o.set(e,t+1)}}const a=Gr(e,i,l);void 0!==a&&n.push(a)}return n}function Xr(e,t,n){const r=function(e,t){const n=_n(t);let r=t,o=qn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&pr.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(hr,vr);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!hr.test(e)){let n=e.replace(gr,mr);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=nr}return new o(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):function(e){return e.join(" ").trim()}(n)),"style"===r.property){let t="object"==typeof n?n:function(e,t){const n={};try{Br(t,r)}catch(t){if(!e.ignoreInvalidStyle){const n=t,r=new Rr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=qr+"#cannot-parse-style-attribute",r}}return n;function r(e,t){let r=e;"--"!==r.slice(0,2)&&("-ms-"===r.slice(0,4)&&(r="ms-"+r.slice(4)),r=r.replace(jr,eo)),n[r]=t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Hr.call(e,n)&&(t[$r(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?yr[r.property]||r.property:r.attribute,n]}}function Jr(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=Hn(e[o])?{type:"Identifier",name:e[o]}:{type:"Literal",value:e[o]};n=n?{type:"MemberExpression",object:n,property:t,computed:!(!o||"Literal"!==t.type),optional:!1}:t}r=n}else r=Hn(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return Hr.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Zr(e)}function Zr(e,t){const n=new Rr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=qr+"#cannot-handle-mdx-estrees-without-createevaluater",n}function $r(e){let t=e.replace(zr,to);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function eo(e,t){return t.toUpperCase()}function to(e){return"-"+e.toLowerCase()}const no={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"]},ro={};function oo(e,t,n){if(function(e){return!(!e||"object"!=typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return io(e.children,t,n)}return Array.isArray(e)?io(e,t,n):""}function io(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=oo(e[o],t,n);return r.join("")}const lo=document.createElement("i");function ao(e){const t="&"+e+";";lo.innerHTML=t;const n=lo.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}function so(e,t,n,r){const o=e.length;let i,l=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);l<r.length;)i=r.slice(l,l+1e4),i.unshift(t,0),e.splice(...i),l+=1e4,t+=1e4}function Ao(e,t){return e.length>0?(so(e,e.length,0,t),e):t}const co={}.hasOwnProperty;function uo(e){const t={};let n=-1;for(;++n<e.length;)fo(t,e[n]);return t}function fo(e,t){let n;for(n in t){const r=(co.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){co.call(r,i)||(r[i]=[]);const e=o[i];po(r[i],Array.isArray(e)?e:e?[e]:[])}}}function po(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);so(e,0,0,r)}function ho(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function go(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const mo=Bo(/[A-Za-z]/),vo=Bo(/[\dA-Za-z]/),yo=Bo(/[#-'*+\--9=?A-Z^-~]/);function wo(e){return null!==e&&(e<32||127===e)}const bo=Bo(/\d/),ko=Bo(/[\dA-Fa-f]/),xo=Bo(/[!-/:-@[-`{-~]/);function Eo(e){return null!==e&&e<-2}function Po(e){return null!==e&&(e<0||32===e)}function Co(e){return-2===e||-1===e||32===e}const So=Bo(new RegExp("\\p{P}|\\p{S}","u")),Do=Bo(/\s/);function Bo(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function Io(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let l="";if(37===i&&vo(e.charCodeAt(n+1))&&vo(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(l=String.fromCharCode(i));else if(i>55295&&i<57344){const t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(l=String.fromCharCode(i,t),o=1):l="�"}else l=String.fromCharCode(i);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function To(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){return Co(r)?(e.enter(n),l(r)):t(r)};function l(r){return Co(r)&&i++<o?(e.consume(r),l):(e.exit(n),t(r))}}const Qo={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),To(e,t,"linePrefix")},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Eo(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const Mo={tokenize:function(e){const t=this,n=[];let r,o,i,l=0;return a;function a(r){if(l<n.length){const o=n[l];return t.containerState=o[1],e.attempt(o[0].continuation,s,A)(r)}return A(r)}function s(e){if(l++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&v();const n=t.events.length;let o,i=n;for(;i--;)if("exit"===t.events[i][0]&&"chunkFlow"===t.events[i][1].type){o=t.events[i][1].end;break}m(l);let a=n;for(;a<t.events.length;)t.events[a][1].end={...o},a++;return so(t.events,i+1,0,t.events.slice(n)),t.events.length=a,A(e)}return a(e)}function A(o){if(l===n.length){if(!r)return d(o);if(r.currentConstruct&&r.currentConstruct.concrete)return p(o);t.interrupt=!(!r.currentConstruct||r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Oo,c,u)(o)}function c(e){return r&&v(),m(l),d(e)}function u(e){return t.parser.lazy[t.now().line]=l!==n.length,i=t.now().offset,p(e)}function d(n){return t.containerState={},e.attempt(Oo,f,p)(n)}function f(e){return l++,n.push([t.currentConstruct,t.containerState]),d(e)}function p(n){return null===n?(r&&v(),m(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),h(n))}function h(n){return null===n?(g(e.exit("chunkFlow"),!0),m(0),void e.consume(n)):Eo(n)?(e.consume(n),g(e.exit("chunkFlow")),l=0,t.interrupt=void 0,a):(e.consume(n),h)}function g(e,n){const a=t.sliceStream(e);if(n&&a.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(a),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<i&&(!r.events[e][1].end||r.events[e][1].end.offset>i))return;const n=t.events.length;let o,a,s=n;for(;s--;)if("exit"===t.events[s][0]&&"chunkFlow"===t.events[s][1].type){if(o){a=t.events[s][1].end;break}o=!0}for(m(l),e=n;e<t.events.length;)t.events[e][1].end={...a},e++;so(t.events,s+1,0,t.events.slice(n)),t.events.length=e}}function m(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Oo={tokenize:function(e,t,n){return To(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function Lo(e){return null===e||Po(e)||Do(e)?1:So(e)?2:void 0}function No(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const Ro={name:"attention",resolveAll:function(e,t){let n,r,o,i,l,a,s,A,c=-1;for(;++c<e.length;)if("enter"===e[c][0]&&"attentionSequence"===e[c][1].type&&e[c][1]._close)for(n=c;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[c][1]).charCodeAt(0)){if((e[n][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;a=e[n][1].end.offset-e[n][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;const u={...e[n][1].end},d={...e[c][1].start};Ho(u,-a),Ho(d,a),i={type:a>1?"strongSequence":"emphasisSequence",start:u,end:{...e[n][1].end}},l={type:a>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:d},o={type:a>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[c][1].start}},r={type:a>1?"strong":"emphasis",start:{...i.start},end:{...l.end}},e[n][1].end={...i.start},e[c][1].start={...l.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=Ao(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=Ao(s,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),s=Ao(s,No(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),s=Ao(s,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(A=2,s=Ao(s,[["enter",e[c][1],t],["exit",e[c][1],t]])):A=0,so(e,n-1,c-n+3,s),c=n+s.length-A-2;break}for(c=-1;++c<e.length;)"attentionSequence"===e[c][1].type&&(e[c][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Lo(r);let i;return function(t){return i=t,e.enter("attentionSequence"),l(t)};function l(a){if(a===i)return e.consume(a),l;const s=e.exit("attentionSequence"),A=Lo(a),c=!A||2===A&&o||n.includes(a),u=!o||2===o&&A||n.includes(r);return s._open=!!(42===i?c:c&&(o||!u)),s._close=!!(42===i?u:u&&(A||!c)),t(a)}}};function Ho(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Fo={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return mo(t)?(e.consume(t),i):64===t?n(t):s(t)}function i(e){return 43===e||45===e||46===e||vo(e)?(r=1,l(e)):s(e)}function l(t){return 58===t?(e.consume(t),r=0,a):(43===t||45===t||46===t||vo(t))&&r++<32?(e.consume(t),l):(r=0,s(t))}function a(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||wo(r)?n(r):(e.consume(r),a)}function s(t){return 64===t?(e.consume(t),A):yo(t)?(e.consume(t),s):n(t)}function A(e){return vo(e)?c(e):n(e)}function c(n){return 46===n?(e.consume(n),r=0,A):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):u(n)}function u(t){if((45===t||vo(t))&&r++<63){const n=45===t?u:c;return e.consume(t),n}return n(t)}}};const zo={partial:!0,tokenize:function(e,t,n){return function(t){return Co(t)?To(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||Eo(e)?t(e):n(e)}}};const jo={continuation:{tokenize:function(e,t,n){const r=this;return function(t){return Co(t)?To(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):o(t)};function o(r){return e.attempt(jo,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return Co(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const Uo={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return xo(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const _o={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,l=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),o=31,i=vo,A(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=ko,A):(e.enter("characterReferenceValue"),o=7,i=bo,A(t))}function A(a){if(59===a&&l){const o=e.exit("characterReferenceValue");return i!==vo||ao(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return i(a)&&l++<o?(e.consume(a),A):n(a)}}};const qo={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},Vo={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return l;function l(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s}function s(t){return e.enter("codeFencedFence"),Co(t)?To(e,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):A(t)}function A(t){return t===i?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===i?(o++,e.consume(t),c):o>=a?(e.exit("codeFencedFenceSequence"),Co(t)?To(e,u,"whitespace")(t):u(t)):n(t)}function u(r){return null===r||Eo(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let i,l=0,a=0;return function(t){return function(t){const n=r.events[r.events.length-1];return l=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,i=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s(t)}(t)};function s(t){return t===i?(a++,e.consume(t),s):a<3?n(t):(e.exit("codeFencedFenceSequence"),Co(t)?To(e,A,"whitespace")(t):A(t))}function A(n){return null===n||Eo(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(qo,f,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(n))}function c(t){return null===t||Eo(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),A(t)):Co(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),To(e,u,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),c)}function u(t){return null===t||Eo(t)?A(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||Eo(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),A(t)):96===t&&t===i?n(t):(e.consume(t),d)}function f(t){return e.attempt(o,v,p)(t)}function p(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),h}function h(t){return l>0&&Co(t)?To(e,g,"linePrefix",l+1)(t):g(t)}function g(t){return null===t||Eo(t)?e.check(qo,f,v)(t):(e.enter("codeFlowValue"),m(t))}function m(t){return null===t||Eo(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),m)}function v(n){return e.exit("codeFenced"),t(n)}}};const Go={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),To(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?i(e):n(e)}function i(t){return null===t?a(t):Eo(t)?e.attempt(Wo,i,a)(t):(e.enter("codeFlowValue"),l(t))}function l(t){return null===t||Eo(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),l)}function a(n){return e.exit("codeIndented"),t(n)}}},Wo={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):Eo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):To(e,i,"linePrefix",5)(t)}function i(e){const i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):Eo(e)?o(e):n(e)}}};const Yo={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}for(t=o-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,o,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),l(t)};function l(t){return 96===t?(e.consume(t),i++,l):(e.exit("codeTextSequence"),a(t))}function a(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),a):96===t?(o=e.enter("codeTextSequence"),r=0,A(t)):Eo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):(e.enter("codeTextData"),s(t))}function s(t){return null===t||32===t||96===t||Eo(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),s)}function A(n){return 96===n?(e.consume(n),r++,A):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",s(n))}}};class Ko{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,t){const n=t??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Xo(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Xo(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Xo(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);Xo(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Xo(this.left,t.reverse())}}}function Xo(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Jo(e){const t={};let n,r,o,i,l,a,s,A=-1;const c=new Ko(e);for(;++A<c.length;){for(;A in t;)A=t[A];if(n=c.get(A),A&&"chunkFlow"===n[1].type&&"listItemPrefix"===c.get(A-1)[1].type&&(a=n[1]._tokenizer.events,o=0,o<a.length&&"lineEndingBlank"===a[o][1].type&&(o+=2),o<a.length&&"content"===a[o][1].type))for(;++o<a.length&&"content"!==a[o][1].type;)"chunkText"===a[o][1].type&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,Zo(c,A)),A=t[A],s=!0);else if(n[1]._container){for(o=A,r=void 0;o--;)if(i=c.get(o),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(r&&(c.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);else if("linePrefix"!==i[1].type)break;r&&(n[1].end={...c.get(r)[1].start},l=c.slice(r,A),l.unshift(n),c.splice(r,A-r+1,l))}}return so(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!s}function Zo(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[],l=n._tokenizer||r.parser[n.contentType](n.start),a=l.events,s=[],A={};let c,u,d=-1,f=n,p=0,h=0;const g=[h];for(;f;){for(;e.get(++o)[1]!==f;);i.push(o),f._tokenizer||(c=r.sliceStream(f),f.next||c.push(null),u&&l.defineSkip(f.start),f._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(c),f._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),u=f,f=f.next}for(f=n;++d<a.length;)"exit"===a[d][0]&&"enter"===a[d-1][0]&&a[d][1].type===a[d-1][1].type&&a[d][1].start.line!==a[d][1].end.line&&(h=d+1,g.push(h),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(l.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),d=g.length;d--;){const t=a.slice(g[d],g[d+1]),n=i.pop();s.push([n,n+t.length-1]),e.splice(n,2,t)}for(s.reverse(),d=-1;++d<s.length;)A[p+s[d][0]]=p+s[d][1],p+=s[d][1]-s[d][0]-1;return A}const $o={resolve:function(e){return Jo(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):Eo(t)?e.check(ei,i,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function i(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},ei={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),To(e,o,"linePrefix")};function o(o){if(null===o||Eo(o))return n(o);const i=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}};function ti(e,t,n,r,o,i,l,a,s){const A=s||Number.POSITIVE_INFINITY;let c=0;return function(t){return 60===t?(e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),u):null===t||32===t||41===t||wo(t)?n(t):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),p(t))};function u(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(a),u(t)):null===t||60===t||Eo(t)?n(t):(e.consume(t),92===t?f:d)}function f(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function p(o){return c||null!==o&&41!==o&&!Po(o)?c<A&&40===o?(e.consume(o),c++,p):41===o?(e.consume(o),c--,p):null===o||32===o||40===o||wo(o)?n(o):(e.consume(o),92===o?h:p):(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(o))}function h(t){return 40===t||41===t||92===t?(e.consume(t),p):p(t)}}function ni(e,t,n,r,o,i){const l=this;let a,s=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),A};function A(u){return s>999||null===u||91===u||93===u&&!a||94===u&&!s&&"_hiddenFootnoteSupport"in l.parser.constructs?n(u):93===u?(e.exit(i),e.enter(o),e.consume(u),e.exit(o),e.exit(r),t):Eo(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),A):(e.enter("chunkString",{contentType:"string"}),c(u))}function c(t){return null===t||91===t||93===t||Eo(t)||s++>999?(e.exit("chunkString"),A(t)):(e.consume(t),a||(a=!Co(t)),92===t?u:c)}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}}function ri(e,t,n,r,o,i){let l;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(o),e.consume(t),e.exit(o),l=40===t?41:t,a):n(t)};function a(n){return n===l?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),s(n))}function s(t){return t===l?(e.exit(i),a(l)):null===t?n(t):Eo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),To(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),A(t))}function A(t){return t===l||null===t||Eo(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?c:A)}function c(t){return t===l||92===t?(e.consume(t),A):A(t)}}function oi(e,t){let n;return function r(o){return Eo(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Co(o)?To(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const ii={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return ni.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=go(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),l):n(t)}function l(t){return Po(t)?oi(e,a)(t):a(t)}function a(t){return ti(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(li,A,A)(t)}function A(t){return Co(t)?To(e,c,"whitespace")(t):c(t)}function c(i){return null===i||Eo(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},li={partial:!0,tokenize:function(e,t,n){return function(t){return Po(t)?oi(e,r)(t):n(t)};function r(t){return ri(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return Co(t)?To(e,i,"whitespace")(t):i(t)}function i(e){return null===e||Eo(e)?t(e):n(e)}}};const ai={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return Eo(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const si={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,i=3;return"whitespace"===e[i][1].type&&(i+=2),o-2>i&&"whitespace"===e[o][1].type&&(o-=2),"atxHeadingSequence"===e[o][1].type&&(i===o-1||o-4>i&&"whitespace"===e[o-2][1].type)&&(o-=i+1===o?2:4),o>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},r={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},so(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||Po(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),l(n)):null===n||Eo(n)?(e.exit("atxHeading"),t(n)):Co(n)?To(e,i,"whitespace")(n):(e.enter("atxHeadingText"),a(n))}function l(t){return 35===t?(e.consume(t),l):(e.exit("atxHeadingSequence"),i(t))}function a(t){return null===t||35===t||Po(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),a)}}};const Ai=["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"],ci=["pre","script","style","textarea"],ui={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,n){const r=this;let o,i,l,a,s;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),A}(t)};function A(a){return 33===a?(e.consume(a),c):47===a?(e.consume(a),i=!0,f):63===a?(e.consume(a),o=3,r.interrupt?t:O):mo(a)?(e.consume(a),l=String.fromCharCode(a),p):n(a)}function c(i){return 45===i?(e.consume(i),o=2,u):91===i?(e.consume(i),o=5,a=0,d):mo(i)?(e.consume(i),o=4,r.interrupt?t:O):n(i)}function u(o){return 45===o?(e.consume(o),r.interrupt?t:O):n(o)}function d(o){const i="CDATA[";return o===i.charCodeAt(a++)?(e.consume(o),6===a?r.interrupt?t:C:d):n(o)}function f(t){return mo(t)?(e.consume(t),l=String.fromCharCode(t),p):n(t)}function p(a){if(null===a||47===a||62===a||Po(a)){const s=47===a,A=l.toLowerCase();return s||i||!ci.includes(A)?Ai.includes(l.toLowerCase())?(o=6,s?(e.consume(a),h):r.interrupt?t(a):C(a)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(a):i?g(a):m(a)):(o=1,r.interrupt?t(a):C(a))}return 45===a||vo(a)?(e.consume(a),l+=String.fromCharCode(a),p):n(a)}function h(o){return 62===o?(e.consume(o),r.interrupt?t:C):n(o)}function g(t){return Co(t)?(e.consume(t),g):E(t)}function m(t){return 47===t?(e.consume(t),E):58===t||95===t||mo(t)?(e.consume(t),v):Co(t)?(e.consume(t),m):E(t)}function v(t){return 45===t||46===t||58===t||95===t||vo(t)?(e.consume(t),v):y(t)}function y(t){return 61===t?(e.consume(t),w):Co(t)?(e.consume(t),y):m(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),s=t,b):Co(t)?(e.consume(t),w):k(t)}function b(t){return t===s?(e.consume(t),s=null,x):null===t||Eo(t)?n(t):(e.consume(t),b)}function k(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Po(t)?y(t):(e.consume(t),k)}function x(e){return 47===e||62===e||Co(e)?m(e):n(e)}function E(t){return 62===t?(e.consume(t),P):n(t)}function P(t){return null===t||Eo(t)?C(t):Co(t)?(e.consume(t),P):n(t)}function C(t){return 45===t&&2===o?(e.consume(t),I):60===t&&1===o?(e.consume(t),T):62===t&&4===o?(e.consume(t),L):63===t&&3===o?(e.consume(t),O):93===t&&5===o?(e.consume(t),M):!Eo(t)||6!==o&&7!==o?null===t||Eo(t)?(e.exit("htmlFlowData"),S(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(di,N,S)(t))}function S(t){return e.check(fi,D,N)(t)}function D(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),B}function B(t){return null===t||Eo(t)?S(t):(e.enter("htmlFlowData"),C(t))}function I(t){return 45===t?(e.consume(t),O):C(t)}function T(t){return 47===t?(e.consume(t),l="",Q):C(t)}function Q(t){if(62===t){const n=l.toLowerCase();return ci.includes(n)?(e.consume(t),L):C(t)}return mo(t)&&l.length<8?(e.consume(t),l+=String.fromCharCode(t),Q):C(t)}function M(t){return 93===t?(e.consume(t),O):C(t)}function O(t){return 62===t?(e.consume(t),L):45===t&&2===o?(e.consume(t),O):C(t)}function L(t){return null===t||Eo(t)?(e.exit("htmlFlowData"),N(t)):(e.consume(t),L)}function N(n){return e.exit("htmlFlow"),t(n)}}},di={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(zo,t,n)}}},fi={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return Eo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const pi={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,l;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),s):47===t?(e.consume(t),w):63===t?(e.consume(t),v):mo(t)?(e.consume(t),x):n(t)}function s(t){return 45===t?(e.consume(t),A):91===t?(e.consume(t),i=0,f):mo(t)?(e.consume(t),m):n(t)}function A(t){return 45===t?(e.consume(t),d):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),u):Eo(t)?(l=c,Q(t)):(e.consume(t),c)}function u(t){return 45===t?(e.consume(t),d):c(t)}function d(e){return 62===e?T(e):45===e?u(e):c(e)}function f(t){const r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),6===i?p:f):n(t)}function p(t){return null===t?n(t):93===t?(e.consume(t),h):Eo(t)?(l=p,Q(t)):(e.consume(t),p)}function h(t){return 93===t?(e.consume(t),g):p(t)}function g(t){return 62===t?T(t):93===t?(e.consume(t),g):p(t)}function m(t){return null===t||62===t?T(t):Eo(t)?(l=m,Q(t)):(e.consume(t),m)}function v(t){return null===t?n(t):63===t?(e.consume(t),y):Eo(t)?(l=v,Q(t)):(e.consume(t),v)}function y(e){return 62===e?T(e):v(e)}function w(t){return mo(t)?(e.consume(t),b):n(t)}function b(t){return 45===t||vo(t)?(e.consume(t),b):k(t)}function k(t){return Eo(t)?(l=k,Q(t)):Co(t)?(e.consume(t),k):T(t)}function x(t){return 45===t||vo(t)?(e.consume(t),x):47===t||62===t||Po(t)?E(t):n(t)}function E(t){return 47===t?(e.consume(t),T):58===t||95===t||mo(t)?(e.consume(t),P):Eo(t)?(l=E,Q(t)):Co(t)?(e.consume(t),E):T(t)}function P(t){return 45===t||46===t||58===t||95===t||vo(t)?(e.consume(t),P):C(t)}function C(t){return 61===t?(e.consume(t),S):Eo(t)?(l=C,Q(t)):Co(t)?(e.consume(t),C):E(t)}function S(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,D):Eo(t)?(l=S,Q(t)):Co(t)?(e.consume(t),S):(e.consume(t),B)}function D(t){return t===o?(e.consume(t),o=void 0,I):null===t?n(t):Eo(t)?(l=D,Q(t)):(e.consume(t),D)}function B(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||Po(t)?E(t):(e.consume(t),B)}function I(e){return 47===e||62===e||Po(e)?E(e):n(e)}function T(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function Q(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),M}function M(t){return Co(t)?To(e,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):O(t)}function O(t){return e.enter("htmlTextData"),l(t)}}};const hi={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}return e.length!==n.length&&so(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,o,i,l=e.length,a=0;for(;l--;)if(n=e[l][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[l][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[l][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=l,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(o=l);const s={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},A={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[r+a+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",s,t],["enter",A,t]],i=Ao(i,e.slice(r+1,r+a+3)),i=Ao(i,[["enter",c,t]]),i=Ao(i,No(t.parser.constructs.insideSpan.null,e.slice(r+a+4,o-3),t)),i=Ao(i,[["exit",c,t],e[o-2],e[o-1],["exit",A,t]]),i=Ao(i,e.slice(o+1)),i=Ao(i,[["exit",s,t]]),so(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,l=r.events.length;for(;l--;)if(("labelImage"===r.events[l][1].type||"labelLink"===r.events[l][1].type)&&!r.events[l][1]._balanced){o=r.events[l][1];break}return function(t){return o?o._inactive?c(t):(i=r.parser.defined.includes(go(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a):n(t)};function a(t){return 40===t?e.attempt(gi,A,i?A:c)(t):91===t?e.attempt(mi,A,i?s:c)(t):i?A(t):c(t)}function s(t){return e.attempt(vi,A,c)(t)}function A(e){return t(e)}function c(e){return o._balanced=!0,n(e)}}},gi={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return Po(t)?oi(e,o)(t):o(t)}function o(t){return 41===t?A(t):ti(e,i,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return Po(t)?oi(e,a)(t):A(t)}function l(e){return n(e)}function a(t){return 34===t||39===t||40===t?ri(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):A(t)}function s(t){return Po(t)?oi(e,A)(t):A(t)}function A(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},mi={tokenize:function(e,t,n){const r=this;return function(t){return ni.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(go(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},vi={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const yi={name:"labelStartImage",resolveAll:hi.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const wi={name:"labelStartLink",resolveAll:hi.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const bi={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),To(e,t,"linePrefix")}}};const ki={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,i(e)}(t)};function i(i){return i===r?(e.enter("thematicBreakSequence"),l(i)):o>=3&&(null===i||Eo(i))?(e.exit("thematicBreak"),t(i)):n(i)}function l(t){return t===r?(e.consume(t),o++,l):(e.exit("thematicBreakSequence"),Co(t)?To(e,i,"whitespace")(t):i(t))}}};const xi={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(zo,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,To(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!Co(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Pi,t,o)(n))});function o(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,To(e,e.attempt(xi,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,l=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:bo(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(ki,n,s)(t):s(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(t)}return n(t)};function a(t){return bo(t)&&++l<10?(e.consume(t),a):(!r.interrupt||l<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),s(t)):n(t)}function s(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(zo,r.interrupt?n:A,e.attempt(Ei,u,c))}function A(e){return r.containerState.initialBlankLine=!0,i++,u(e)}function c(t){return Co(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),u):n(t)}function u(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},Ei={partial:!0,tokenize:function(e,t,n){const r=this;return To(e,function(e){const o=r.events[r.events.length-1];return!Co(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Pi={partial:!0,tokenize:function(e,t,n){const r=this;return To(e,function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}};const Ci={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),!o&&"definition"===e[i][1].type&&(o=i);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",l,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=l,e.push(["exit",l,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let l,a=r.events.length;for(;a--;)if("lineEnding"!==r.events[a][1].type&&"linePrefix"!==r.events[a][1].type&&"content"!==r.events[a][1].type){l="paragraph"===r.events[a][1].type;break}return r.parser.lazy[r.now().line]||!r.interrupt&&!l?n(t):(e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),i(t)}(t))};function i(t){return t===o?(e.consume(t),i):(e.exit("setextHeadingLineSequence"),Co(t)?To(e,l,"lineSuffix")(t):l(t))}function l(r){return null===r||Eo(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const Si={tokenize:function(e){const t=this,n=e.attempt(zo,function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,r,To(e,e.attempt(this.parser.constructs.flow,r,e.attempt($o,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const Di={resolveAll:Qi()},Bi=Ti("string"),Ii=Ti("text");function Ti(e){return{resolveAll:Qi("text"===e?Mi:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,l);return i;function i(e){return s(e)?o(e):l(e)}function l(e){if(null!==e)return t.enter("data"),t.consume(e),a;t.consume(e)}function a(e){return s(e)?(t.exit("data"),o(e)):(t.consume(e),a)}function s(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function Qi(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):(!t[o]||"data"!==t[o][1].type)&&(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function Mi(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let i,l=o.length,a=-1,s=0;for(;l--;){const e=o[l];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)s++,a--;if(a)break;a=-1}else if(-2===e)i=!0,s++;else if(-1!==e){l++;break}}if(s){const o={type:n===e.length||i||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?a:r.start._bufferIndex+a,_index:r.start._index+l,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}const Oi={42:xi,43:xi,45:xi,48:xi,49:xi,50:xi,51:xi,52:xi,53:xi,54:xi,55:xi,56:xi,57:xi,62:jo},Li={91:ii},Ni={[-2]:Go,[-1]:Go,32:Go},Ri={35:si,42:ki,45:[Ci,ki],60:ui,61:Ci,95:ki,96:Vo,126:Vo},Hi={38:_o,92:Uo},Fi={[-5]:bi,[-4]:bi,[-3]:bi,33:yi,38:_o,42:Ro,60:[Fo,pi],91:wi,92:[ai,Uo],93:hi,95:Ro,96:Yo},zi={null:[Ro,Di]},ji=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:Li,disable:{null:[]},document:Oi,flow:Ri,flowInitial:Ni,insideSpan:zi,string:Hi,text:Fi},Symbol.toStringTag,{value:"Module"}));function Ui(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},i=[];let l=[],a=[];const s={attempt:h(function(e,t){g(e,t.from)}),check:h(p),consume:function(e){Eo(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,m()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),A.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=d(),A.events.push(["enter",n,A]),a.push(n),n},exit:function(e){const t=a.pop();return t.end=d(),A.events.push(["exit",t,A]),t},interrupt:h(p,{interrupt:!0})},A={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,m()},events:[],now:d,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let l;if("string"==typeof i)l=i;else switch(i){case-5:l="\r";break;case-4:l="\n";break;case-3:l="\r\n";break;case-2:l=t?" ":"\t";break;case-1:if(!t&&o)continue;l=" ";break;default:l=String.fromCharCode(i)}o=-2===i,r.push(l)}return r.join("")}(u(e),t)},sliceStream:u,write:function(e){return l=Ao(l,e),function(){let e;for(;r._index<l.length;){const t=l[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)f(t.charCodeAt(r._bufferIndex));else f(t)}}(),null!==l[l.length-1]?[]:(g(t,0),A.events=No(i,A.events,A),A.events)}};let c=t.tokenize.call(A,s);return t.resolveAll&&i.push(t),A;function u(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let l;if(n===o)l=[e[n].slice(r,i)];else{if(l=e.slice(n,o),r>-1){const e=l[0];"string"==typeof e?l[0]=e.slice(r):l.shift()}i>0&&l.push(e[o].slice(0,i))}return l}(l,e)}function d(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:i}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:i}}function f(e){c=c(e)}function p(e,t){t.restore()}function h(e,t){return function(n,o,i){let l,c,u,f;return Array.isArray(n)?p(n):"tokenize"in n?p([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return p([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function p(e){return l=e,c=0,0===e.length?i:h(e[c])}function h(e){return function(n){return f=function(){const e=d(),t=A.previous,n=A.currentConstruct,o=A.events.length,i=Array.from(a);return{from:o,restore:l};function l(){r=e,A.previous=t,A.currentConstruct=n,A.events.length=o,a=i,m()}}(),u=e,e.partial||(A.currentConstruct=e),e.name&&A.parser.constructs.disable.null.includes(e.name)?v():e.tokenize.call(t?Object.assign(Object.create(A),t):A,s,g,v)(n)}}function g(t){return e(u,f),o}function v(e){return f.restore(),++c<l.length?h(l[c]):i}}}function g(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&so(A.events,t,A.events.length-t,e.resolve(A.events.slice(t),A)),e.resolveTo&&(A.events=e.resolveTo(A.events,A))}function m(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const _i=/[\0\t\n\r]/g;const qi=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Vi(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return ho(n.slice(t?2:1),t?16:10)}return ao(n)||e}const Gi={}.hasOwnProperty;function Wi(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(te),autolinkProtocol:P,autolinkEmail:P,atxHeading:i(J),blockQuote:i(G),characterEscape:P,characterReference:P,codeFenced:i(W),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:i(W,l),codeText:i(Y,l),codeTextData:P,data:P,codeFlowValue:P,definition:i(K),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:i(X),hardBreakEscape:i(Z),hardBreakTrailing:i(Z),htmlFlow:i($,l),htmlFlowData:P,htmlText:i($,l),htmlTextData:P,image:i(ee),label:l,link:i(te),listItem:i(re),listItemValue:d,listOrdered:i(ne,u),listUnordered:i(ne),paragraph:i(oe),reference:F,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:i(J),strong:i(ie),thematicBreak:i(ae)},exit:{atxHeading:s(),atxHeadingSequence:b,autolink:s(),autolinkEmail:V,autolinkProtocol:q,blockQuote:s(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:j,characterReferenceMarkerNumeric:j,characterReferenceValue:U,characterReference:_,codeFenced:s(g),codeFencedFence:h,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:C,codeIndented:s(m),codeText:s(T),codeTextData:C,data:C,definition:s(),definitionDestinationString:w,definitionLabelString:v,definitionTitleString:y,emphasis:s(),hardBreakEscape:s(D),hardBreakTrailing:s(D),htmlFlow:s(B),htmlFlowData:C,htmlText:s(I),htmlTextData:C,image:s(M),label:L,labelText:O,lineEnding:S,link:s(Q),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:z,resourceDestinationString:N,resourceTitleString:R,resource:H,setextHeading:s(E),setextHeadingLineSequence:x,setextHeadingText:k,strong:s(),thematicBreak:s()}};Ki(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const i={stack:[r],tokenStack:[],config:t,enter:a,exit:A,buffer:l,resume:c,data:n},s=[];let u=-1;for(;++u<e.length;)if("listOrdered"===e[u][1].type||"listUnordered"===e[u][1].type)if("enter"===e[u][0])s.push(u);else{u=o(e,s.pop(),u)}for(u=-1;++u<e.length;){const n=t[e[u][0]];Gi.call(n,e[u][1].type)&&n[e[u][1].type].call(Object.assign({sliceSerialize:e[u][2].sliceSerialize},i),e[u][1])}if(i.tokenStack.length>0){const e=i.tokenStack[i.tokenStack.length-1];(e[1]||Ji).call(i,void 0,e[0])}for(r.position={start:Yi(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Yi(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},u=-1;++u<t.transforms.length;)r=t.transforms[u](r)||r;return r}function o(e,t,n){let r,o,i,l,a=t-1,s=-1,A=!1;for(;++a<=n;){const t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,l=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(r&&!l&&!s&&!i&&(i=a),l=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:l=void 0}if(!s&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===s&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let l=a;for(o=void 0;l--;){const t=e[l];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",A=!0),t[1].type="lineEnding",o=l}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}i&&(!o||i<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||a,0,["exit",r,t[2]]),a++,n++}if("listItemPrefix"===t[1].type){const o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(a,0,["enter",o,t[2]]),a++,n++,i=void 0,l=!0}}}return e[t][1]._spread=A,n}function i(e,t){return n;function n(n){a.call(this,e(n),n),t&&t.call(this,n)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Yi(t.start),end:void 0}}function s(e){return t;function t(t){e&&e.call(this,t),A.call(this,t)}}function A(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+Mr({start:e.start,end:e.end})+"): it’s not open");r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Ji).call(this,e,r[0])),n.position.end=Yi(e.end)}function c(){return function(e){return oo(e,"boolean"!=typeof ro.includeImageAlt||ro.includeImageAlt,"boolean"!=typeof ro.includeHtml||ro.includeHtml)}(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function d(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function f(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function p(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function v(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=go(this.sliceSerialize(e)).toLowerCase()}function y(){const e=this.resume();this.stack[this.stack.length-1].title=e}function w(){const e=this.resume();this.stack[this.stack.length-1].url=e}function b(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function x(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function P(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];(!n||"text"!==n.type)&&(n=le(),n.position={start:Yi(e.start),end:void 0},t.push(n)),this.stack.push(n)}function C(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Yi(e.end)}function S(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=Yi(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(P.call(this,e),C.call(this,e))}function D(){this.data.atHardBreak=!0}function B(){const e=this.resume();this.stack[this.stack.length-1].value=e}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.resume();this.stack[this.stack.length-1].value=e}function Q(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function O(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(qi,Vi)}(t),n.identifier=go(t).toLowerCase()}function L(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function N(){const e=this.resume();this.stack[this.stack.length-1].url=e}function R(){const e=this.resume();this.stack[this.stack.length-1].title=e}function H(){this.data.inReference=void 0}function F(){this.data.referenceType="collapsed"}function z(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=go(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function j(e){this.data.characterReferenceType=e.type}function U(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;n?(r=ho(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0):r=ao(t);this.stack[this.stack.length-1].value+=r}function _(e){this.stack.pop().position.end=Yi(e.end)}function q(e){C.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function V(e){C.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function G(){return{type:"blockquote",children:[]}}function W(){return{type:"code",lang:null,meta:null,value:""}}function Y(){return{type:"inlineCode",value:""}}function K(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function X(){return{type:"emphasis",children:[]}}function J(){return{type:"heading",depth:0,children:[]}}function Z(){return{type:"break"}}function $(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function ie(){return{type:"strong",children:[]}}function le(){return{type:"text",value:""}}function ae(){return{type:"thematicBreak"}}}(n)(function(e){for(;!Jo(e););return e}(function(e){const t={constructs:uo([ji,...(e||{}).extensions||[]]),content:n(Qo),defined:[],document:n(Mo),flow:n(Si),lazy:{},string:n(Bi),text:n(Ii)};return t;function n(e){return function(n){return Ui(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,l){const a=[];let s,A,c,u,d;for(o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),c=0,n="",r&&(65279===o.charCodeAt(0)&&c++,r=void 0);c<o.length;){if(_i.lastIndex=c,s=_i.exec(o),u=s&&void 0!==s.index?s.index:o.length,d=o.charCodeAt(u),!s){n=o.slice(c);break}if(10===d&&c===u&&e)a.push(-3),e=void 0;else switch(e&&(a.push(-5),e=void 0),c<u&&(a.push(o.slice(c,u)),t+=u-c),d){case 0:a.push(65533),t++;break;case 9:for(A=4*Math.ceil(t/4),a.push(-2);t++<A;)a.push(-1);break;case 10:a.push(-4),t=1;break;default:e=!0,t=1}c=u+1}return l&&(e&&a.push(-5),n&&a.push(n),a.push(null)),a}}()(e,t,!0))))}function Yi(e){return{line:e.line,column:e.column,offset:e.offset}}function Ki(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Ki(e,r):Xi(e,r)}}function Xi(e,t){let n;for(n in t)if(Gi.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Ji(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Mr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Mr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Mr({start:t.start,end:t.end})+") is still open")}function Zi(e){const t=this;t.parser=function(n){return Wi(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function $i(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&"text"===i.type?i.value="["+i.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&"text"===l.type?l.value+=r:o.push({type:"text",value:r}),o}function el(e){return e.spread??e.children.length>1}function tl(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(nl(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(nl(t.slice(o),o>0,!1)),i.join("")}function nl(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;9===t||32===t;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const rl={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=Io(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);void 0===a?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=i+1,a+=1,e.footnoteCounts.set(r,a);const s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,s);const A={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,A),e.applyData(t,A)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return $i(e,t);const o={src:Io(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){const n={src:Io(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return $i(e,t);const o={href:Io(r.url||"")};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){const n={href:Io(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),o=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=el(n[r])}return t}(n):el(t),i={},l=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const e=r[a];(o||0!==a||"element"!==e.type||"p"!==e.tagName)&&l.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?l.push(e):l.push(...e.children)}const s=r[r.length-1];s&&(o||"element"!==s.type||"p"!==s.tagName)&&l.push({type:"text",value:"\n"});const A={type:"element",tagName:"li",properties:i,children:l};return e.patch(t,A),e.applyData(t,A)},list:function(e,t){const n={},r=e.all(t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){const e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},i=Tr(t.children[1]),l=Ir(t.children[t.children.length-1]);i&&l&&(r.position={start:i,end:l}),o.push(r)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=0===(r?r.indexOf(t):1)?"th":"td",i=n&&"table"===n.type?n.align:void 0,l=i?i.length:t.children.length;let a=-1;const s=[];for(;++a<l;){const n=t.children[a],r={},l=i?i[a]:void 0;l&&(r.align=l);let A={type:"element",tagName:o,properties:r,children:[]};n&&(A.children=e.all(n),e.patch(n,A),A=e.applyData(n,A)),s.push(A)}const A={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,A),e.applyData(t,A)},text:function(e,t){const n={type:"text",value:tl(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:ol,yaml:ol,definition:ol,footnoteDefinition:ol};function ol(){}const il="object"==typeof self?self:globalThis,ll=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[i,l]=t[o];switch(i){case 0:case-1:return n(l,o);case 1:{const e=n([],o);for(const t of l)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of l)e[r(t)]=r(n);return e}case 3:return n(new Date(l),o);case 4:{const{source:e,flags:t}=l;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of l)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of l)e.add(r(t));return e}case 7:{const{name:e,message:t}=l;return n(new il[e](t),o)}case 8:return n(BigInt(l),o);case"BigInt":return n(Object(BigInt(l)),o);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:e}=new Uint8Array(l);return n(new DataView(e),l)}}return n(new il[i](l),o)};return r})(new Map,e)(0),al="",{toString:sl}={},{keys:Al}=Object,cl=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=sl.call(e).slice(8,-1);switch(n){case"Array":return[1,al];case"Object":return[2,al];case"Date":return[3,al];case"RegExp":return[4,al];case"Map":return[5,al];case"Set":return[6,al];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},ul=([e,t])=>0===e&&("function"===t||"symbol"===t),dl=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const o=(e,t)=>{const o=r.push(e)-1;return n.set(t,o),o},i=r=>{if(n.has(r))return n.get(r);let[l,a]=cl(r);switch(l){case 0:{let t=r;switch(a){case"bigint":l=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);t=null;break;case"undefined":return o([-1],r)}return o([l,t],r)}case 1:{if(a){let e=r;return"DataView"===a?e=new Uint8Array(r.buffer):"ArrayBuffer"===a&&(e=new Uint8Array(r)),o([a,[...e]],r)}const e=[],t=o([l,e],r);for(const t of r)e.push(i(t));return t}case 2:{if(a)switch(a){case"BigInt":return o([a,r.toString()],r);case"Boolean":case"Number":case"String":return o([a,r.valueOf()],r)}if(t&&"toJSON"in r)return i(r.toJSON());const n=[],s=o([l,n],r);for(const t of Al(r))(e||!ul(cl(r[t])))&&n.push([i(t),i(r[t])]);return s}case 3:return o([l,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([l,{source:e,flags:t}],r)}case 5:{const t=[],n=o([l,t],r);for(const[n,o]of r)(e||!ul(cl(n))&&!ul(cl(o)))&&t.push([i(n),i(o)]);return n}case 6:{const t=[],n=o([l,t],r);for(const n of r)(e||!ul(cl(n)))&&t.push(i(n));return n}}const{message:s}=r;return o([l,{name:a,message:s}],r)};return i})(!(t||n),!!t,new Map,r)(e),r},fl="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?ll(dl(e,t)):structuredClone(e):(e,t)=>ll(dl(e,t));function pl(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function hl(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const gl=function(e){if(null==e)return vl;if("function"==typeof e)return ml(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=gl(e[n]);return ml(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return ml(n);function n(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}}(e);if("string"==typeof e)return function(e){return ml(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function ml(e){return function(t,n,r){return!(!function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)||!e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function vl(){return!0}const yl=[],wl=!0,bl=!1;function kl(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=gl(o),l=r?-1:1;!function e(o,a,s){const A=o&&"object"==typeof o?o:{};if("string"==typeof A.type){const e="string"==typeof A.tagName?A.tagName:"string"==typeof A.name?A.name:void 0;Object.defineProperty(c,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return c;function c(){let A,c,u,d=yl;if((!t||i(o,a,s[s.length-1]||void 0))&&(d=function(e){return Array.isArray(e)?e:"number"==typeof e?[wl,e]:null==e?yl:[e]}(n(o,s)),d[0]===bl))return d;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==d[0])for(c=(r?t.children.length:-1)+l,u=s.concat(t);c>-1&&c<t.children.length;){const n=t.children[c];if(A=e(n,c,u)(),A[0]===bl)return A;c="number"==typeof A[1]?A[1]:c+l}}return d}}(e,void 0,[])()}function xl(e,t,n,r){let o,i,l;"function"==typeof t?(i=void 0,l=t,o=n):(i=t,l=n,o=r),kl(e,i,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return l(e,r,n)},o)}const El={}.hasOwnProperty,Pl={};function Cl(e,t){const n=t||Pl,r=new Map,o=new Map,i=new Map,l={...rl,...n.handlers},a={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=a.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(!Array.isArray(o)&&"text"===o.type&&(o.value=Tl(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=Tl(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:Dl,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:l,one:function(e,t){const n=e.type,r=a.handlers[n];if(El.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=fl(n);return r.children=a.all(e),r}return fl(e)}return(a.options.unknownHandler||Bl)(a,e,t)},options:n,patch:Sl,wrap:Il};return xl(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:o,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a}function Sl(e,t){e.position&&(t.position=function(e){const t=Tr(e),n=Ir(e);if(t&&n)return{start:t,end:n}}(e))}function Dl(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&o&&Object.assign(n.properties,fl(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Bl(e,t){const n=t.data||{},r=!("value"in t)||El.call(n,"hProperties")||El.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Il(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Tl(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ql(e,t){const n=Cl(e,t),r=n.one(e,void 0),o=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||pl,r=e.options.footnoteBackLabel||hl,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let s=-1;for(;++s<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[s]);if(!o)continue;const i=e.all(o),l=String(o.identifier).toUpperCase(),A=Io(l.toLowerCase());let c=0;const u=[],d=e.footnoteCounts.get(l);for(;void 0!==d&&++c<=d;){u.length>0&&u.push({type:"text",value:" "});let e="string"==typeof n?n:n(s,c);"string"==typeof e&&(e={type:"text",value:e}),u.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+A+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(s,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=i[i.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...u)}else i.push(...u);const p={type:"element",tagName:"li",properties:{id:t+"fn-"+A},children:e.wrap(i,!0)};e.patch(o,p),a.push(p)}if(0!==a.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...fl(l),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:"\n"}]}}(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:"\n"},o),i}function Ml(e,t){return e&&"run"in e?async function(n,r){const o=Ql(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Ql(n,{file:r,...e||t})}}function Ol(e){if(e)throw e}var Ll,Nl;var Rl=function(){if(Nl)return Ll;Nl=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return typeof r>"u"||e.call(n,r)},l=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},a=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return Ll=function e(){var t,n,r,s,A,c,u=arguments[0],d=1,f=arguments.length,p=!1;for("boolean"==typeof u&&(p=u,u=arguments[1]||{},d=2),(null==u||"object"!=typeof u&&"function"!=typeof u)&&(u={});d<f;++d)if(null!=(t=arguments[d]))for(n in t)r=a(u,n),u!==(s=a(t,n))&&(p&&s&&(i(s)||(A=o(s)))?(A?(A=!1,c=r&&o(r)?r:[]):c=r&&i(r)?r:{},l(u,{name:n,newValue:e(p,c,s)})):typeof s<"u"&&l(u,{name:n,newValue:s}));return u},Ll}();const Hl=kr(Rl);function Fl(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function zl(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(i,...l){const a=e[++n];let s=-1;if(i)r(i);else{for(;++s<t.length;)(null===l[s]||void 0===l[s])&&(l[s]=t[s]);t=l,a?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let l;r&&t.push(o);try{l=e.apply(this,t)}catch(e){if(r&&n)throw e;return o(e)}r||(l&&l.then&&"function"==typeof l.then?l.then(i,o):l instanceof Error?o(l):i(l))}function o(e,...r){n||(n=!0,t(e,...r))}function i(e){o(null,e)}}(a,o)(...l):r(null,...l)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const jl={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Ul(e);let n,r=0,o=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let l=-1,a=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else l<0&&(n=!0,l=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(o=i):(a=-1,o=l));return r===o?o=l:o<0&&(o=e.length),e.slice(r,o)},dirname:function(e){if(Ul(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){Ul(e);let t,n=e.length,r=-1,o=0,i=-1,l=0;for(;n--;){const a=e.codePointAt(n);if(47!==a)r<0&&(t=!0,r=n+1),46===a?i<0?i=n:1!==l&&(l=1):i>-1&&(l=-1);else if(t){o=n+1;break}}return i<0||r<0||0===l||1===l&&i===r-1&&i===o+1?"":e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)Ul(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Ul(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,l=-1,a=0,s=-1;for(;++s<=e.length;){if(s<e.length)n=e.codePointAt(s);else{if(47===n)break;n=47}if(47===n){if(l!==s-1&&1!==a)if(l!==s-1&&2===a){if(o.length<2||2!==i||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",i=0):(o=o.slice(0,r),i=o.length-1-o.lastIndexOf("/")),l=s,a=0;continue}}else if(o.length>0){o="",i=0,l=s,a=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(l+1,s):o=e.slice(l+1,s),i=s-l-1;l=s,a=0}else 46===n&&a>-1?a++:a=-1}return o}(e,!t);return 0===n.length&&!t&&(n="."),n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)},sep:"/"};function Ul(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const _l={cwd:function(){return"/"}};function ql(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Vl(e){if("string"==typeof e)e=new URL(e);else if(!ql(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const Gl=["history","path","basename","stem","extname","dirname"];class Wl{constructor(e){let t;var n;t=e?ql(e)?{path:e}:"string"==typeof e||(n=e)&&"object"==typeof n&&"byteLength"in n&&"byteOffset"in n?{value:e}:e:{},this.cwd="cwd"in t?"":_l.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r,o=-1;for(;++o<Gl.length;){const e=Gl[o];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(r in t)Gl.includes(r)||(this[r]=t[r])}get basename(){return"string"==typeof this.path?jl.basename(this.path):void 0}set basename(e){Kl(e,"basename"),Yl(e,"basename"),this.path=jl.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?jl.dirname(this.path):void 0}set dirname(e){Xl(this.basename,"dirname"),this.path=jl.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?jl.extname(this.path):void 0}set extname(e){if(Yl(e,"extname"),Xl(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=jl.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){ql(e)&&(e=Vl(e)),Kl(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?jl.basename(this.path,this.extname):void 0}set stem(e){Kl(e,"stem"),Yl(e,"stem"),this.path=jl.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new Rr(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function Yl(e,t){if(e&&e.includes(jl.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+jl.sep+"`")}function Kl(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Xl(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Jl=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},Zl={}.hasOwnProperty;class $l extends Jl{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=zl()}copy(){const e=new $l;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(Hl(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(ra("data",this.frozen),this.namespace[e]=t,this):Zl.call(this.namespace,e)&&this.namespace[e]||void 0:e?(ra("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=la(e),n=this.parser||this.Parser;return ta("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),ta("process",this.parser||this.Parser),na("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=la(e),l=n.parse(i);function a(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(l,i,function(e,t,r){if(e||!t||!r)return a(e);const o=t,i=n.stringify(o,r);var l;"string"==typeof(l=i)||function(e){return!!(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(l)?r.value=i:r.result=i,a(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),ta("processSync",this.parser||this.Parser),na("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,Ol(e),t=r}),ia("processSync","process",n),t}run(e,t,n){oa(e),this.freeze();const r=this.transformers;return!n&&"function"==typeof t&&(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,i){const l=la(t);r.run(e,l,function(t,r,l){const a=r||e;t?i(t):o?o(a):n(void 0,a,l)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){Ol(e),n=t,r=!0}),ia("runSync","run",r),n}stringify(e,t){this.freeze();const n=la(t),r=this.compiler||this.Compiler;return na("stringify",r),oa(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(ra("use",this.frozen),null!=e)if("function"==typeof e)a(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?l(e):i(e)}return this;function o(e){if("function"==typeof e)a(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;a(t,n)}else i(e)}}function i(e){if(!("plugins"in e)&&!("settings"in e))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");l(e.plugins),e.settings&&(r.settings=Hl(!0,r.settings,e.settings))}function l(e){let t=-1;if(null!=e){if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){o(e[t])}}}function a(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...i]=t;const l=n[o][1];Fl(l)&&Fl(r)&&(r=Hl(!0,l,r)),n[o]=[e,r,...i]}}}}const ea=(new $l).freeze();function ta(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function na(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function ra(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function oa(e){if(!Fl(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function ia(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function la(e){return function(e){return!!(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Wl(e)}const aa=[],sa={allowDangerousHtml:!0},Aa=/^(https?|ircs?|mailto|xmpp)$/i,ca=[{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 ua(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,l=e.disallowedElements,a=e.rehypePlugins||aa,s=e.remarkPlugins||aa,A=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...sa}:sa,c=e.skipHtml,u=e.unwrapDisallowed,d=e.urlTransform||da,f=ea().use(Zi).use(s).use(Ml,A).use(a),p=new Wl;"string"==typeof r&&(p.value=r);for(const t of ca)Object.hasOwn(e,t.from)&&(t.from,t.to&&t.to,t.id);const v=f.parse(p);let y=f.runSync(v,p);return o&&(y={type:"element",tagName:"div",properties:{className:o},children:"root"===y.type?y.children:[y]}),xl(y,function(e,r,o){if("raw"===e.type&&o&&"number"==typeof r)return c?o.children.splice(r,1):o.children[r]={type:"text",value:e.value},r;if("element"===e.type){let t;for(t in no)if(Object.hasOwn(no,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=no[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=d(String(n||""),t,e))}}if("element"===e.type){let i=t?!t.includes(e.tagName):!!l&&l.includes(e.tagName);if(!i&&n&&"number"==typeof r&&(i=!n(e,r,o)),i&&o&&"number"==typeof r)return u&&e.children?o.children.splice(r,1,...e.children):o.children.splice(r,1),r}}),Vr(y,{Fragment:m,components:i,ignoreInvalidStyle:!0,jsx:h,jsxs:g,passKeys:!0,passNode:!0})}function da(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return-1===t||-1!==o&&t>o||-1!==n&&t>n||-1!==r&&t>r||Aa.test(e.slice(0,t))?e:""}const fa=({children:e})=>h("div",{style:{whiteSpace:"normal"},children:h(ua,{components:{p:({...e})=>h("p",{style:{margin:0,marginBottom:"0.5em",lineHeight:1.4,textAlign:"left"},children:e.children}),ul:({...e})=>h("ul",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:e.children}),ol:({...e})=>h("ol",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:e.children}),li:({...e})=>h("li",{style:{marginBottom:"1px",lineHeight:1.4},children:e.children}),code:({inline:e,children:t})=>e?h("code",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"2px 4px",borderRadius:"4px",fontFamily:"inherit",fontSize:"0.95em"},children:t}):h("pre",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"8px",borderRadius:"4px",overflowX:"auto",margin:"0.5em 0",whiteSpace:"pre-wrap"},children:h("code",{children:t})}),blockquote:({...e})=>h("blockquote",{style:{margin:0,paddingLeft:"10px",borderLeft:"2px solid #ccc",color:"#666",fontStyle:"italic"},children:e.children})},children:"string"==typeof e?e:""})}),pa={autoConfig:!0},ha=e=>()=>(e=>{const{getFlow:t}=$t(),{messages:n,replaceMessages:r}=en(),{settings:o}=nn(),{hasChatHistoryLoaded:i}=on(),l={...e,...pa},a=l.markdownComponent?l.markdownComponent:fa;s(()=>{var e,t;if(i){const i=[...n];for(let n=0;n<i.length&&n<((null==(e=o.chatHistory)?void 0:e.maxEntries)??30);n++){const e=i[n];null!=(t=e.tags)&&t.includes("rcb-markdown-renderer-plugin:parsed")&&(e.contentWrapper=a)}r(i)}},[i]);const A=async e=>{var n;const r=null==(n=e.data.message)?void 0:n.sender.toUpperCase();((e,t,n)=>{var r;if("string"!=typeof e.data.message.content||!e.detail.currPath)return!1;const o=t[e.detail.currPath];return!!o&&((null==(r=o.renderMarkdown)?void 0:r.map(e=>e.toUpperCase()).includes(n))??!1)})(e,t(),r)&&(e.data.message.contentWrapper=a,e.data.message.tags||(e.data.message.tags=[]),e.data.message.tags.push("rcb-markdown-renderer-plugin:parsed"))};tn(J.PRE_INJECT_MESSAGE,A),tn(J.CHUNK_STREAM_MESSAGE,A),tn(J.START_STREAM_MESSAGE,A),tn(J.START_SIMULATE_STREAM_MESSAGE,A);const c={name:"@rcb-plugins/markdown-renderer"};return null!=l&&l.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0}}),c})(e),ga={autoConfig:!0,promptBaseColors:{info:"#007bff",warning:"#ffc107",error:"#dc3545",success:"#28a745"},promptHoveredColors:{info:"#0056b3",warning:"#d39e00",error:"#c82333",success:"#218838"},textAreaHighlightColors:{info:"#007bff",warning:"#ffc107",error:"#dc3545",success:"#28a745"}},ma=(e,t,n="validateTextInput")=>{var r;if(null==(r=e.detail)||!r.currPath)return;const o=t[e.detail.currPath];if(!o)return;const i=o[n];return"function"==typeof i?i:void 0},va=e=>{const{showToast:t}=(()=>{const{showToast:e,dismissToast:t,toasts:n,replaceToasts:r}=ct();return{showToast:e,dismissToast:t,toasts:n,replaceToasts:r}})(),{getFlow:n}=$t(),{styles:r,updateStyles:o,replaceStyles:i}=(()=>{const{styles:e,replaceStyles:t,updateStyles:n}=_t();return{styles:e,replaceStyles:t,updateStyles:n}})(),A=(e=>({...ga,...e,promptBaseColors:{...ga.promptBaseColors},promptHoveredColors:{...ga.promptHoveredColors},textAreaHighlightColors:{...ga.textAreaHighlightColors}}))(e),[c,u]=a(0),d=l({});tn(J.USER_SUBMIT_TEXT,e=>{const i=e,l=ma(i,n(),"validateTextInput");if(!l)return;const a=l(i.data.inputText);if(null!=a&&a.success||e.preventDefault(),!a.promptContent)return;0===c&&(d.current=structuredClone(r));const s=((e,t)=>{const n=e.promptType??"info";let r={};return t.advancedStyles&&(r=t.advancedStyles[n]),t.promptBaseColors&&(r.toastPromptStyle={color:t.promptBaseColors[n],borderColor:t.promptBaseColors[n]}),t.promptHoveredColors&&(r.toastPromptHoveredStyle={color:t.promptHoveredColors[n],borderColor:t.promptHoveredColors[n]}),t.textAreaHighlightColors&&(e.highlightTextArea??!0)&&(r.chatInputAreaStyle={boxShadow:`${t.textAreaHighlightColors[n]} 0px 0px 5px`}),r})(a,A);o(s),t(a.promptContent,a.promptDuration??3e3),u(e=>e+1)}),tn(J.USER_UPLOAD_FILE,e=>{var r,o;const i=e,l=null==(o=null==(r=i.data)?void 0:r.files)?void 0:o[0];if(!l)return console.error("No file uploaded."),void e.preventDefault();const a=ma(i,n(),"validateFileInput");if(!a)return void console.error("Validator not found for file input.");const s=a(l);if(!s.success)return console.error("Validation failed:",s),s.promptContent&&t(s.promptContent,s.promptDuration??3e3),void e.preventDefault();console.log("Validation successful:",s)}),tn(J.DISMISS_TOAST,()=>{u(e=>e-1)}),s(()=>{0===c&&setTimeout(()=>{i(d.current)})},[c,i]);const f={name:"@rcb-plugins/input-validator"};return A.autoConfig&&(f.settings={event:{rcbUserSubmitText:!0,rcbUserUploadFile:!0,rcbDismissToast:!0}}),f};function ya(){}function wa(){}const ba=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ka=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xa={};function Ea(e,t){return(xa.jsx?ka:ba).test(e)}const Pa=/[ \t\n\f\r]/g;function Ca(e){return""===e.replace(Pa,"")}class Sa{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function Da(e,t){const n={},r={};for(const t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Sa(n,r,t)}function Ba(e){return e.toLowerCase()}Sa.prototype.normal={},Sa.prototype.property={},Sa.prototype.space=void 0;class Ia{constructor(e,t){this.attribute=t,this.property=e}}Ia.prototype.attribute="",Ia.prototype.booleanish=!1,Ia.prototype.boolean=!1,Ia.prototype.commaOrSpaceSeparated=!1,Ia.prototype.commaSeparated=!1,Ia.prototype.defined=!1,Ia.prototype.mustUseProperty=!1,Ia.prototype.number=!1,Ia.prototype.overloadedBoolean=!1,Ia.prototype.property="",Ia.prototype.spaceSeparated=!1,Ia.prototype.space=void 0;let Ta=0;const Qa=Fa(),Ma=Fa(),Oa=Fa(),La=Fa(),Na=Fa(),Ra=Fa(),Ha=Fa();function Fa(){return 2**++Ta}var za=Object.freeze({__proto__:null,boolean:Qa,booleanish:Ma,commaOrSpaceSeparated:Ha,commaSeparated:Ra,number:La,overloadedBoolean:Oa,spaceSeparated:Na});const ja=Object.keys(za);class Ua extends Ia{constructor(e,t,n,r){let o=-1;if(super(e,t),_a(this,"space",r),"number"==typeof n)for(;++o<ja.length;){const e=ja[o];_a(this,ja[o],(n&za[e])===za[e])}}}function _a(e,t,n){n&&(e[t]=n)}function qa(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new Ua(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Ba(r)]=r,n[Ba(i.attribute)]=r}return new Sa(t,n,e.space)}Ua.prototype.defined=!0;const Va=qa({properties:{ariaActiveDescendant:null,ariaAtomic:Ma,ariaAutoComplete:null,ariaBusy:Ma,ariaChecked:Ma,ariaColCount:La,ariaColIndex:La,ariaColSpan:La,ariaControls:Na,ariaCurrent:null,ariaDescribedBy:Na,ariaDetails:null,ariaDisabled:Ma,ariaDropEffect:Na,ariaErrorMessage:null,ariaExpanded:Ma,ariaFlowTo:Na,ariaGrabbed:Ma,ariaHasPopup:null,ariaHidden:Ma,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Na,ariaLevel:La,ariaLive:null,ariaModal:Ma,ariaMultiLine:Ma,ariaMultiSelectable:Ma,ariaOrientation:null,ariaOwns:Na,ariaPlaceholder:null,ariaPosInSet:La,ariaPressed:Ma,ariaReadOnly:Ma,ariaRelevant:null,ariaRequired:Ma,ariaRoleDescription:Na,ariaRowCount:La,ariaRowIndex:La,ariaRowSpan:La,ariaSelected:Ma,ariaSetSize:La,ariaSort:null,ariaValueMax:La,ariaValueMin:La,ariaValueNow:La,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function Ga(e,t){return t in e?e[t]:t}function Wa(e,t){return Ga(e,t.toLowerCase())}const Ya=qa({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ra,acceptCharset:Na,accessKey:Na,action:null,allow:null,allowFullScreen:Qa,allowPaymentRequest:Qa,allowUserMedia:Qa,alt:null,as:null,async:Qa,autoCapitalize:null,autoComplete:Na,autoFocus:Qa,autoPlay:Qa,blocking:Na,capture:null,charSet:null,checked:Qa,cite:null,className:Na,cols:La,colSpan:null,content:null,contentEditable:Ma,controls:Qa,controlsList:Na,coords:La|Ra,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Qa,defer:Qa,dir:null,dirName:null,disabled:Qa,download:Oa,draggable:Ma,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Qa,formTarget:null,headers:Na,height:La,hidden:Oa,high:La,href:null,hrefLang:null,htmlFor:Na,httpEquiv:Na,id:null,imageSizes:null,imageSrcSet:null,inert:Qa,inputMode:null,integrity:null,is:null,isMap:Qa,itemId:null,itemProp:Na,itemRef:Na,itemScope:Qa,itemType:Na,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Qa,low:La,manifest:null,max:null,maxLength:La,media:null,method:null,min:null,minLength:La,multiple:Qa,muted:Qa,name:null,nonce:null,noModule:Qa,noValidate:Qa,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:Qa,optimum:La,pattern:null,ping:Na,placeholder:null,playsInline:Qa,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Qa,referrerPolicy:null,rel:Na,required:Qa,reversed:Qa,rows:La,rowSpan:La,sandbox:Na,scope:null,scoped:Qa,seamless:Qa,selected:Qa,shadowRootClonable:Qa,shadowRootDelegatesFocus:Qa,shadowRootMode:null,shape:null,size:La,sizes:null,slot:null,span:La,spellCheck:Ma,src:null,srcDoc:null,srcLang:null,srcSet:null,start:La,step:null,style:null,tabIndex:La,target:null,title:null,translate:null,type:null,typeMustMatch:Qa,useMap:null,value:Ma,width:La,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Na,axis:null,background:null,bgColor:null,border:La,borderColor:null,bottomMargin:La,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Qa,declare:Qa,event:null,face:null,frame:null,frameBorder:null,hSpace:La,leftMargin:La,link:null,longDesc:null,lowSrc:null,marginHeight:La,marginWidth:La,noResize:Qa,noHref:Qa,noShade:Qa,noWrap:Qa,object:null,profile:null,prompt:null,rev:null,rightMargin:La,rules:null,scheme:null,scrolling:Ma,standby:null,summary:null,text:null,topMargin:La,valueType:null,version:null,vAlign:null,vLink:null,vSpace:La,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Qa,disableRemotePlayback:Qa,prefix:null,property:null,results:La,security:null,unselectable:null},space:"html",transform:Wa}),Ka=qa({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:Ha,accentHeight:La,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:La,amplitude:La,arabicForm:null,ascent:La,attributeName:null,attributeType:null,azimuth:La,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:La,by:null,calcMode:null,capHeight:La,className:Na,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:La,diffuseConstant:La,direction:null,display:null,dur:null,divisor:La,dominantBaseline:null,download:Qa,dx:null,dy:null,edgeMode:null,editable:null,elevation:La,enableBackground:null,end:null,event:null,exponent:La,externalResourcesRequired:null,fill:null,fillOpacity:La,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:Ra,g2:Ra,glyphName:Ra,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:La,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:La,horizOriginX:La,horizOriginY:La,id:null,ideographic:La,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:La,k:La,k1:La,k2:La,k3:La,k4:La,kernelMatrix:Ha,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:La,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:La,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:La,overlineThickness:La,paintOrder:null,panose1:null,path:null,pathLength:La,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Na,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:La,pointsAtY:La,pointsAtZ:La,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ha,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ha,rev:Ha,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ha,requiredFeatures:Ha,requiredFonts:Ha,requiredFormats:Ha,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:La,specularExponent:La,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:La,strikethroughThickness:La,string:null,stroke:null,strokeDashArray:Ha,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:La,strokeOpacity:La,strokeWidth:null,style:null,surfaceScale:La,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ha,tabIndex:La,tableValues:null,target:null,targetX:La,targetY:La,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ha,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:La,underlineThickness:La,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:La,values:null,vAlphabetic:La,vMathematical:La,vectorEffect:null,vHanging:La,vIdeographic:La,version:null,vertAdvY:La,vertOriginX:La,vertOriginY:La,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:La,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ga}),Xa=qa({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),Ja=qa({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Wa}),Za=qa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),$a={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"},es=/[A-Z]/g,ts=/-[a-z]/g,ns=/^data[-\w.:]+$/i;function rs(e){return"-"+e.toLowerCase()}function os(e){return e.charAt(1).toUpperCase()}const is=Da([Va,Ya,Xa,Ja,Za],"html"),ls=Da([Va,Ka,Xa,Ja,Za],"svg");var as="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ss(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var As={},cs=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,us=/\n/g,ds=/^\s*/,fs=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,ps=/^:\s*/,hs=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,gs=/^[;\s]*/,ms=/^\s+|\s+$/g,vs="";function ys(e){return e?e.replace(ms,vs):vs}var ws=as&&as.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(As,"__esModule",{value:!0}),As.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,bs.default)(e),o="function"==typeof t;return r.forEach(function(e){if("declaration"===e.type){var r=e.property,i=e.value;o?t(r,i,e):i&&((n=n||{})[r]=i)}}),n};var bs=ws(function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(e){var t=e.match(us);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function i(){var e={line:n,column:r};return function(t){return t.position=new l(e),A(),t}}function l(e){this.start=e,this.end={line:n,column:r},this.source=t.source}function a(o){var i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i}function s(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function A(){s(ds)}function c(e){var t;for(e=e||[];t=u();)!1!==t&&e.push(t);return e}function u(){var t=i();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;vs!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,vs===e.charAt(n-1))return a("End of comment missing");var l=e.slice(2,n-2);return r+=2,o(l),e=e.slice(n),r+=2,t({type:"comment",comment:l})}}function d(){var e=i(),t=s(fs);if(t){if(u(),!s(ps))return a("property missing ':'");var n=s(hs),r=e({type:"declaration",property:ys(t[0].replace(cs,vs)),value:n?ys(n[0].replace(cs,vs)):vs});return s(gs),r}}return l.prototype.content=e,A(),function(){var e,t=[];for(c(t);e=d();)!1!==e&&(t.push(e),c(t));return t}()});var ks={};Object.defineProperty(ks,"__esModule",{value:!0}),ks.camelCase=void 0;var xs=/^--[a-zA-Z0-9_-]+$/,Es=/-([a-z])/g,Ps=/^[^-]+$/,Cs=/^-(webkit|moz|ms|o|khtml)-/,Ss=/^-(ms)-/,Ds=function(e,t){return t.toUpperCase()},Bs=function(e,t){return"".concat(t,"-")};ks.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||Ps.test(e)||xs.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(Ss,Bs):e.replace(Cs,Bs)).replace(Es,Ds))};var Is=(as&&as.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(As),Ts=ks;function Qs(e,t){var n={};return e&&"string"==typeof e?((0,Is.default)(e,function(e,r){e&&r&&(n[(0,Ts.camelCase)(e,t)]=r)}),n):n}Qs.default=Qs;var Ms=ss(Qs);const Os=Ns("end"),Ls=Ns("start");function Ns(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function Rs(e){return e&&"object"==typeof e?"position"in e||"type"in e?Fs(e.position):"start"in e||"end"in e?Fs(e):"line"in e||"column"in e?Hs(e):"":""}function Hs(e){return zs(e&&e.line)+":"+zs(e&&e.column)}function Fs(e){return Hs(e&&e.start)+"-"+Hs(e&&e.end)}function zs(e){return e&&"number"==typeof e?e:1}class js extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},i=!1;if(t&&(o="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!o.cause&&e&&(i=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){const e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.position)}const l=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=l?l.line:void 0,this.name=Rs(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=i&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}js.prototype.file="",js.prototype.name="",js.prototype.reason="",js.prototype.message="",js.prototype.stack="",js.prototype.column=void 0,js.prototype.line=void 0,js.prototype.ancestors=void 0,js.prototype.cause=void 0,js.prototype.fatal=void 0,js.prototype.place=void 0,js.prototype.ruleId=void 0,js.prototype.source=void 0;const Us={}.hasOwnProperty,_s=new Map,qs=/[A-Z]/g,Vs=new Set(["table","tbody","thead","tfoot","tr"]),Gs=new Set(["td","th"]),Ws="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ys(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,o,i){const l=Array.isArray(o.children),a=Ls(n);return t(r,o,i,l,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,o,i){const l=Array.isArray(o.children)?n:t;return i?l(r,o,i):l(r,o)}}(0,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?ls:is,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=Ks(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Ks(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(o=ls,e.schema=o);e.ancestors.push(t);const i=eA(e,t.tagName,!1),l=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&Us.call(t.properties,o)){const i=$s(e,o,t.properties[o]);if(i){const[o,l]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof l&&Gs.has(t.tagName)?r=l:n[o]=l}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let a=Zs(e,t);Vs.has(t.tagName)&&(a=a.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&Ca(t.value):Ca(t));var t}));return Xs(e,l,i,t),Js(l,a),e.ancestors.pop(),e.schema=r,e.create(t,i,l,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}tA(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.name&&"html"===r.space&&(o=ls,e.schema=o);e.ancestors.push(t);const i=null===t.name?e.Fragment:eA(e,t.name,!0),l=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];ya(t.type);const o=t.expression;ya(o.type);const i=o.properties[0];ya(i.type),Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else tA(e,t.position);else{const o=r.name;let i;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];ya(t.type),i=e.evaluater.evaluateExpression(t.expression)}else tA(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),a=Zs(e,t);return Xs(e,l,i,t),Js(l,a),e.ancestors.pop(),e.schema=r,e.create(t,i,l,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);tA(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Js(r,Zs(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function Xs(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Js(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Zs(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:_s;for(;++r<t.children.length;){const i=t.children[r];let l;if(e.passKeys){const e="element"===i.type?i.tagName:"mdxJsxFlowElement"===i.type||"mdxJsxTextElement"===i.type?i.name:void 0;if(e){const t=o.get(e)||0;l=e+"-"+t,o.set(e,t+1)}}const a=Ks(e,i,l);void 0!==a&&n.push(a)}return n}function $s(e,t,n){const r=function(e,t){const n=Ba(t);let r=t,o=Ia;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&ns.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(ts,os);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!ts.test(e)){let n=e.replace(es,rs);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=Ua}return new o(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return Ms(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const n=t,r=new js("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Ws+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Us.call(e,n)&&(t[nA(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?$a[r.property]||r.property:r.attribute,n]}}function eA(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=Ea(e[o])?{type:"Identifier",name:e[o]}:{type:"Literal",value:e[o]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(o&&"Literal"===t.type),optional:!1}:t}r=n}else r=Ea(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return Us.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);tA(e)}function tA(e,t){const n=new js("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Ws+"#cannot-handle-mdx-estrees-without-createevaluater",n}function nA(e){let t=e.replace(qs,rA);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function rA(e){return"-"+e.toLowerCase()}const oA={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"]},iA={};function lA(e,t){return aA(e,"boolean"!=typeof iA.includeImageAlt||iA.includeImageAlt,"boolean"!=typeof iA.includeHtml||iA.includeHtml)}function aA(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return sA(e.children,t,n)}return Array.isArray(e)?sA(e,t,n):""}function sA(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=aA(e[o],t,n);return r.join("")}const AA=document.createElement("i");function cA(e){const t="&"+e+";";AA.innerHTML=t;const n=AA.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function uA(e,t,n,r){const o=e.length;let i,l=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);l<r.length;)i=r.slice(l,l+1e4),i.unshift(t,0),e.splice(...i),l+=1e4,t+=1e4}function dA(e,t){return e.length>0?(uA(e,e.length,0,t),e):t}const fA={}.hasOwnProperty;function pA(e){const t={};let n=-1;for(;++n<e.length;)hA(t,e[n]);return t}function hA(e,t){let n;for(n in t){const r=(fA.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){fA.call(r,i)||(r[i]=[]);const e=o[i];gA(r[i],Array.isArray(e)?e:e?[e]:[])}}}function gA(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);uA(e,0,0,r)}function mA(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function vA(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const yA=TA(/[A-Za-z]/),wA=TA(/[\dA-Za-z]/),bA=TA(/[#-'*+\--9=?A-Z^-~]/);function kA(e){return null!==e&&(e<32||127===e)}const xA=TA(/\d/),EA=TA(/[\dA-Fa-f]/),PA=TA(/[!-/:-@[-`{-~]/);function CA(e){return null!==e&&e<-2}function SA(e){return null!==e&&(e<0||32===e)}function DA(e){return-2===e||-1===e||32===e}const BA=TA(/\p{P}|\p{S}/u),IA=TA(/\s/);function TA(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function QA(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let l="";if(37===i&&wA(e.charCodeAt(n+1))&&wA(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(l=String.fromCharCode(i));else if(i>55295&&i<57344){const t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(l=String.fromCharCode(i,t),o=1):l="�"}else l=String.fromCharCode(i);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function MA(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){if(DA(r))return e.enter(n),l(r);return t(r)};function l(r){return DA(r)&&i++<o?(e.consume(r),l):(e.exit(n),t(r))}}const OA={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),MA(e,t,"linePrefix")},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):CA(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const LA={tokenize:function(e){const t=this,n=[];let r,o,i,l=0;return a;function a(r){if(l<n.length){const o=n[l];return t.containerState=o[1],e.attempt(o[0].continuation,s,A)(r)}return A(r)}function s(e){if(l++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&v();const n=t.events.length;let o,i=n;for(;i--;)if("exit"===t.events[i][0]&&"chunkFlow"===t.events[i][1].type){o=t.events[i][1].end;break}m(l);let a=n;for(;a<t.events.length;)t.events[a][1].end={...o},a++;return uA(t.events,i+1,0,t.events.slice(n)),t.events.length=a,A(e)}return a(e)}function A(o){if(l===n.length){if(!r)return d(o);if(r.currentConstruct&&r.currentConstruct.concrete)return p(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(NA,c,u)(o)}function c(e){return r&&v(),m(l),d(e)}function u(e){return t.parser.lazy[t.now().line]=l!==n.length,i=t.now().offset,p(e)}function d(n){return t.containerState={},e.attempt(NA,f,p)(n)}function f(e){return l++,n.push([t.currentConstruct,t.containerState]),d(e)}function p(n){return null===n?(r&&v(),m(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),h(n))}function h(n){return null===n?(g(e.exit("chunkFlow"),!0),m(0),void e.consume(n)):CA(n)?(e.consume(n),g(e.exit("chunkFlow")),l=0,t.interrupt=void 0,a):(e.consume(n),h)}function g(e,n){const a=t.sliceStream(e);if(n&&a.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(a),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<i&&(!r.events[e][1].end||r.events[e][1].end.offset>i))return;const n=t.events.length;let o,a,s=n;for(;s--;)if("exit"===t.events[s][0]&&"chunkFlow"===t.events[s][1].type){if(o){a=t.events[s][1].end;break}o=!0}for(m(l),e=n;e<t.events.length;)t.events[e][1].end={...a},e++;uA(t.events,s+1,0,t.events.slice(n)),t.events.length=e}}function m(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},NA={tokenize:function(e,t,n){return MA(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function RA(e){return null===e||SA(e)||IA(e)?1:BA(e)?2:void 0}function HA(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const FA={name:"attention",resolveAll:function(e,t){let n,r,o,i,l,a,s,A,c=-1;for(;++c<e.length;)if("enter"===e[c][0]&&"attentionSequence"===e[c][1].type&&e[c][1]._close)for(n=c;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[c][1]).charCodeAt(0)){if((e[n][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;a=e[n][1].end.offset-e[n][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;const u={...e[n][1].end},d={...e[c][1].start};zA(u,-a),zA(d,a),i={type:a>1?"strongSequence":"emphasisSequence",start:u,end:{...e[n][1].end}},l={type:a>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:d},o={type:a>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[c][1].start}},r={type:a>1?"strong":"emphasis",start:{...i.start},end:{...l.end}},e[n][1].end={...i.start},e[c][1].start={...l.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=dA(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=dA(s,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),s=dA(s,HA(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),s=dA(s,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(A=2,s=dA(s,[["enter",e[c][1],t],["exit",e[c][1],t]])):A=0,uA(e,n-1,c-n+3,s),c=n+s.length-A-2;break}c=-1;for(;++c<e.length;)"attentionSequence"===e[c][1].type&&(e[c][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=RA(r);let i;return function(t){return i=t,e.enter("attentionSequence"),l(t)};function l(a){if(a===i)return e.consume(a),l;const s=e.exit("attentionSequence"),A=RA(a),c=!A||2===A&&o||n.includes(a),u=!o||2===o&&A||n.includes(r);return s._open=Boolean(42===i?c:c&&(o||!u)),s._close=Boolean(42===i?u:u&&(A||!c)),t(a)}}};function zA(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const jA={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return yA(t)?(e.consume(t),i):64===t?n(t):s(t)}function i(e){return 43===e||45===e||46===e||wA(e)?(r=1,l(e)):s(e)}function l(t){return 58===t?(e.consume(t),r=0,a):(43===t||45===t||46===t||wA(t))&&r++<32?(e.consume(t),l):(r=0,s(t))}function a(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||kA(r)?n(r):(e.consume(r),a)}function s(t){return 64===t?(e.consume(t),A):bA(t)?(e.consume(t),s):n(t)}function A(e){return wA(e)?c(e):n(e)}function c(n){return 46===n?(e.consume(n),r=0,A):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):u(n)}function u(t){if((45===t||wA(t))&&r++<63){const n=45===t?u:c;return e.consume(t),n}return n(t)}}};const UA={partial:!0,tokenize:function(e,t,n){return function(t){return DA(t)?MA(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||CA(e)?t(e):n(e)}}};const _A={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(DA(t))return MA(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(_A,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return DA(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const qA={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return PA(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const VA={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,l=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),o=31,i=wA,A(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=EA,A):(e.enter("characterReferenceValue"),o=7,i=xA,A(t))}function A(a){if(59===a&&l){const o=e.exit("characterReferenceValue");return i!==wA||cA(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return i(a)&&l++<o?(e.consume(a),A):n(a)}}};const GA={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},WA={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return l;function l(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s}function s(t){return e.enter("codeFencedFence"),DA(t)?MA(e,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):A(t)}function A(t){return t===i?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===i?(o++,e.consume(t),c):o>=a?(e.exit("codeFencedFenceSequence"),DA(t)?MA(e,u,"whitespace")(t):u(t)):n(t)}function u(r){return null===r||CA(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let i,l=0,a=0;return function(t){return function(t){const n=r.events[r.events.length-1];return l=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,i=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s(t)}(t)};function s(t){return t===i?(a++,e.consume(t),s):a<3?n(t):(e.exit("codeFencedFenceSequence"),DA(t)?MA(e,A,"whitespace")(t):A(t))}function A(n){return null===n||CA(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(GA,f,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(n))}function c(t){return null===t||CA(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),A(t)):DA(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),MA(e,u,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),c)}function u(t){return null===t||CA(t)?A(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||CA(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),A(t)):96===t&&t===i?n(t):(e.consume(t),d)}function f(t){return e.attempt(o,v,p)(t)}function p(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),h}function h(t){return l>0&&DA(t)?MA(e,g,"linePrefix",l+1)(t):g(t)}function g(t){return null===t||CA(t)?e.check(GA,f,v)(t):(e.enter("codeFlowValue"),m(t))}function m(t){return null===t||CA(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),m)}function v(n){return e.exit("codeFenced"),t(n)}}};const YA={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),MA(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?i(e):n(e)}function i(t){return null===t?a(t):CA(t)?e.attempt(KA,i,a)(t):(e.enter("codeFlowValue"),l(t))}function l(t){return null===t||CA(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),l)}function a(n){return e.exit("codeIndented"),t(n)}}},KA={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):CA(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):MA(e,i,"linePrefix",5)(t)}function i(e){const i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):CA(e)?o(e):n(e)}}};const XA={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}t=o-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,o,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),l(t)};function l(t){return 96===t?(e.consume(t),i++,l):(e.exit("codeTextSequence"),a(t))}function a(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),a):96===t?(o=e.enter("codeTextSequence"),r=0,A(t)):CA(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):(e.enter("codeTextData"),s(t))}function s(t){return null===t||32===t||96===t||CA(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),s)}function A(n){return 96===n?(e.consume(n),r++,A):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",s(n))}}};class JA{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,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&ZA(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),ZA(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),ZA(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);ZA(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);ZA(this.left,t.reverse())}}}function ZA(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function $A(e){const t={};let n,r,o,i,l,a,s,A=-1;const c=new JA(e);for(;++A<c.length;){for(;A in t;)A=t[A];if(n=c.get(A),A&&"chunkFlow"===n[1].type&&"listItemPrefix"===c.get(A-1)[1].type&&(a=n[1]._tokenizer.events,o=0,o<a.length&&"lineEndingBlank"===a[o][1].type&&(o+=2),o<a.length&&"content"===a[o][1].type))for(;++o<a.length&&"content"!==a[o][1].type;)"chunkText"===a[o][1].type&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,ec(c,A)),A=t[A],s=!0);else if(n[1]._container){for(o=A,r=void 0;o--;)if(i=c.get(o),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(r&&(c.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);else if("linePrefix"!==i[1].type&&"listItemIndent"!==i[1].type)break;r&&(n[1].end={...c.get(r)[1].start},l=c.slice(r,A),l.unshift(n),c.splice(r,A-r+1,l))}}return uA(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!s}function ec(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,s=[],A={};let c,u,d=-1,f=n,p=0,h=0;const g=[h];for(;f;){for(;e.get(++o)[1]!==f;);i.push(o),f._tokenizer||(c=r.sliceStream(f),f.next||c.push(null),u&&l.defineSkip(f.start),f._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(c),f._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),u=f,f=f.next}for(f=n;++d<a.length;)"exit"===a[d][0]&&"enter"===a[d-1][0]&&a[d][1].type===a[d-1][1].type&&a[d][1].start.line!==a[d][1].end.line&&(h=d+1,g.push(h),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(l.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),d=g.length;d--;){const t=a.slice(g[d],g[d+1]),n=i.pop();s.push([n,n+t.length-1]),e.splice(n,2,t)}for(s.reverse(),d=-1;++d<s.length;)A[p+s[d][0]]=p+s[d][1],p+=s[d][1]-s[d][0]-1;return A}const tc={resolve:function(e){return $A(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):CA(t)?e.check(nc,i,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function i(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},nc={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),MA(e,o,"linePrefix")};function o(o){if(null===o||CA(o))return n(o);const i=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}};function rc(e,t,n,r,o,i,l,a,s){const A=s||Number.POSITIVE_INFINITY;let c=0;return function(t){if(60===t)return e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),u;if(null===t||32===t||41===t||kA(t))return n(t);return e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),p(t)};function u(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(a),u(t)):null===t||60===t||CA(t)?n(t):(e.consume(t),92===t?f:d)}function f(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function p(o){return c||null!==o&&41!==o&&!SA(o)?c<A&&40===o?(e.consume(o),c++,p):41===o?(e.consume(o),c--,p):null===o||32===o||40===o||kA(o)?n(o):(e.consume(o),92===o?h:p):(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(o))}function h(t){return 40===t||41===t||92===t?(e.consume(t),p):p(t)}}function oc(e,t,n,r,o,i){const l=this;let a,s=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),A};function A(u){return s>999||null===u||91===u||93===u&&!a||94===u&&!s&&"_hiddenFootnoteSupport"in l.parser.constructs?n(u):93===u?(e.exit(i),e.enter(o),e.consume(u),e.exit(o),e.exit(r),t):CA(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),A):(e.enter("chunkString",{contentType:"string"}),c(u))}function c(t){return null===t||91===t||93===t||CA(t)||s++>999?(e.exit("chunkString"),A(t)):(e.consume(t),a||(a=!DA(t)),92===t?u:c)}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}}function ic(e,t,n,r,o,i){let l;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(o),e.consume(t),e.exit(o),l=40===t?41:t,a;return n(t)};function a(n){return n===l?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),s(n))}function s(t){return t===l?(e.exit(i),a(l)):null===t?n(t):CA(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),MA(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),A(t))}function A(t){return t===l||null===t||CA(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?c:A)}function c(t){return t===l||92===t?(e.consume(t),A):A(t)}}function lc(e,t){let n;return function r(o){if(CA(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(DA(o))return MA(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}const ac={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return oc.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=vA(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),l):n(t)}function l(t){return SA(t)?lc(e,a)(t):a(t)}function a(t){return rc(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(sc,A,A)(t)}function A(t){return DA(t)?MA(e,c,"whitespace")(t):c(t)}function c(i){return null===i||CA(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},sc={partial:!0,tokenize:function(e,t,n){return function(t){return SA(t)?lc(e,r)(t):n(t)};function r(t){return ic(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return DA(t)?MA(e,i,"whitespace")(t):i(t)}function i(e){return null===e||CA(e)?t(e):n(e)}}};const Ac={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return CA(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const cc={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,i=3;"whitespace"===e[i][1].type&&(i+=2);o-2>i&&"whitespace"===e[o][1].type&&(o-=2);"atxHeadingSequence"===e[o][1].type&&(i===o-1||o-4>i&&"whitespace"===e[o-2][1].type)&&(o-=i+1===o?2:4);o>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},r={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},uA(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||SA(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),l(n)):null===n||CA(n)?(e.exit("atxHeading"),t(n)):DA(n)?MA(e,i,"whitespace")(n):(e.enter("atxHeadingText"),a(n))}function l(t){return 35===t?(e.consume(t),l):(e.exit("atxHeadingSequence"),i(t))}function a(t){return null===t||35===t||SA(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),a)}}};const uc=["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"],dc=["pre","script","style","textarea"],fc={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let o,i,l,a,s;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),A}(t)};function A(a){return 33===a?(e.consume(a),c):47===a?(e.consume(a),i=!0,f):63===a?(e.consume(a),o=3,r.interrupt?t:O):yA(a)?(e.consume(a),l=String.fromCharCode(a),p):n(a)}function c(i){return 45===i?(e.consume(i),o=2,u):91===i?(e.consume(i),o=5,a=0,d):yA(i)?(e.consume(i),o=4,r.interrupt?t:O):n(i)}function u(o){return 45===o?(e.consume(o),r.interrupt?t:O):n(o)}function d(o){const i="CDATA[";return o===i.charCodeAt(a++)?(e.consume(o),6===a?r.interrupt?t:C:d):n(o)}function f(t){return yA(t)?(e.consume(t),l=String.fromCharCode(t),p):n(t)}function p(a){if(null===a||47===a||62===a||SA(a)){const s=47===a,A=l.toLowerCase();return s||i||!dc.includes(A)?uc.includes(l.toLowerCase())?(o=6,s?(e.consume(a),h):r.interrupt?t(a):C(a)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(a):i?g(a):m(a)):(o=1,r.interrupt?t(a):C(a))}return 45===a||wA(a)?(e.consume(a),l+=String.fromCharCode(a),p):n(a)}function h(o){return 62===o?(e.consume(o),r.interrupt?t:C):n(o)}function g(t){return DA(t)?(e.consume(t),g):E(t)}function m(t){return 47===t?(e.consume(t),E):58===t||95===t||yA(t)?(e.consume(t),v):DA(t)?(e.consume(t),m):E(t)}function v(t){return 45===t||46===t||58===t||95===t||wA(t)?(e.consume(t),v):y(t)}function y(t){return 61===t?(e.consume(t),w):DA(t)?(e.consume(t),y):m(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),s=t,b):DA(t)?(e.consume(t),w):k(t)}function b(t){return t===s?(e.consume(t),s=null,x):null===t||CA(t)?n(t):(e.consume(t),b)}function k(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||SA(t)?y(t):(e.consume(t),k)}function x(e){return 47===e||62===e||DA(e)?m(e):n(e)}function E(t){return 62===t?(e.consume(t),P):n(t)}function P(t){return null===t||CA(t)?C(t):DA(t)?(e.consume(t),P):n(t)}function C(t){return 45===t&&2===o?(e.consume(t),I):60===t&&1===o?(e.consume(t),T):62===t&&4===o?(e.consume(t),L):63===t&&3===o?(e.consume(t),O):93===t&&5===o?(e.consume(t),M):!CA(t)||6!==o&&7!==o?null===t||CA(t)?(e.exit("htmlFlowData"),S(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(pc,N,S)(t))}function S(t){return e.check(hc,D,N)(t)}function D(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),B}function B(t){return null===t||CA(t)?S(t):(e.enter("htmlFlowData"),C(t))}function I(t){return 45===t?(e.consume(t),O):C(t)}function T(t){return 47===t?(e.consume(t),l="",Q):C(t)}function Q(t){if(62===t){const n=l.toLowerCase();return dc.includes(n)?(e.consume(t),L):C(t)}return yA(t)&&l.length<8?(e.consume(t),l+=String.fromCharCode(t),Q):C(t)}function M(t){return 93===t?(e.consume(t),O):C(t)}function O(t){return 62===t?(e.consume(t),L):45===t&&2===o?(e.consume(t),O):C(t)}function L(t){return null===t||CA(t)?(e.exit("htmlFlowData"),N(t)):(e.consume(t),L)}function N(n){return e.exit("htmlFlow"),t(n)}}},pc={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(UA,t,n)}}},hc={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(CA(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o;return n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const gc={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,l;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),s):47===t?(e.consume(t),w):63===t?(e.consume(t),v):yA(t)?(e.consume(t),x):n(t)}function s(t){return 45===t?(e.consume(t),A):91===t?(e.consume(t),i=0,f):yA(t)?(e.consume(t),m):n(t)}function A(t){return 45===t?(e.consume(t),d):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),u):CA(t)?(l=c,Q(t)):(e.consume(t),c)}function u(t){return 45===t?(e.consume(t),d):c(t)}function d(e){return 62===e?T(e):45===e?u(e):c(e)}function f(t){const r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),6===i?p:f):n(t)}function p(t){return null===t?n(t):93===t?(e.consume(t),h):CA(t)?(l=p,Q(t)):(e.consume(t),p)}function h(t){return 93===t?(e.consume(t),g):p(t)}function g(t){return 62===t?T(t):93===t?(e.consume(t),g):p(t)}function m(t){return null===t||62===t?T(t):CA(t)?(l=m,Q(t)):(e.consume(t),m)}function v(t){return null===t?n(t):63===t?(e.consume(t),y):CA(t)?(l=v,Q(t)):(e.consume(t),v)}function y(e){return 62===e?T(e):v(e)}function w(t){return yA(t)?(e.consume(t),b):n(t)}function b(t){return 45===t||wA(t)?(e.consume(t),b):k(t)}function k(t){return CA(t)?(l=k,Q(t)):DA(t)?(e.consume(t),k):T(t)}function x(t){return 45===t||wA(t)?(e.consume(t),x):47===t||62===t||SA(t)?E(t):n(t)}function E(t){return 47===t?(e.consume(t),T):58===t||95===t||yA(t)?(e.consume(t),P):CA(t)?(l=E,Q(t)):DA(t)?(e.consume(t),E):T(t)}function P(t){return 45===t||46===t||58===t||95===t||wA(t)?(e.consume(t),P):C(t)}function C(t){return 61===t?(e.consume(t),S):CA(t)?(l=C,Q(t)):DA(t)?(e.consume(t),C):E(t)}function S(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,D):CA(t)?(l=S,Q(t)):DA(t)?(e.consume(t),S):(e.consume(t),B)}function D(t){return t===o?(e.consume(t),o=void 0,I):null===t?n(t):CA(t)?(l=D,Q(t)):(e.consume(t),D)}function B(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||SA(t)?E(t):(e.consume(t),B)}function I(e){return 47===e||62===e||SA(e)?E(e):n(e)}function T(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function Q(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),M}function M(t){return DA(t)?MA(e,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):O(t)}function O(t){return e.enter("htmlTextData"),l(t)}}};const mc={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&uA(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,o,i,l=e.length,a=0;for(;l--;)if(n=e[l][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[l][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[l][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=l,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(o=l);const s={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},A={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[r+a+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",s,t],["enter",A,t]],i=dA(i,e.slice(r+1,r+a+3)),i=dA(i,[["enter",c,t]]),i=dA(i,HA(t.parser.constructs.insideSpan.null,e.slice(r+a+4,o-3),t)),i=dA(i,[["exit",c,t],e[o-2],e[o-1],["exit",A,t]]),i=dA(i,e.slice(o+1)),i=dA(i,[["exit",s,t]]),uA(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,l=r.events.length;for(;l--;)if(("labelImage"===r.events[l][1].type||"labelLink"===r.events[l][1].type)&&!r.events[l][1]._balanced){o=r.events[l][1];break}return function(t){if(!o)return n(t);if(o._inactive)return c(t);return i=r.parser.defined.includes(vA(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a};function a(t){return 40===t?e.attempt(vc,A,i?A:c)(t):91===t?e.attempt(yc,A,i?s:c)(t):i?A(t):c(t)}function s(t){return e.attempt(wc,A,c)(t)}function A(e){return t(e)}function c(e){return o._balanced=!0,n(e)}}},vc={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return SA(t)?lc(e,o)(t):o(t)}function o(t){return 41===t?A(t):rc(e,i,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return SA(t)?lc(e,a)(t):A(t)}function l(e){return n(e)}function a(t){return 34===t||39===t||40===t?ic(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):A(t)}function s(t){return SA(t)?lc(e,A)(t):A(t)}function A(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},yc={tokenize:function(e,t,n){const r=this;return function(t){return oc.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(vA(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},wc={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const bc={name:"labelStartImage",resolveAll:mc.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const kc={name:"labelStartLink",resolveAll:mc.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const xc={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),MA(e,t,"linePrefix")}}};const Ec={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,i(e)}(t)};function i(i){return i===r?(e.enter("thematicBreakSequence"),l(i)):o>=3&&(null===i||CA(i))?(e.exit("thematicBreak"),t(i)):n(i)}function l(t){return t===r?(e.consume(t),o++,l):(e.exit("thematicBreakSequence"),DA(t)?MA(e,i,"whitespace")(t):i(t))}}};const Pc={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(UA,o,i);function o(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,MA(e,t,"listItemIndent",r.containerState.size+1)(n)}function i(n){return r.containerState.furtherBlankLines||!DA(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Sc,t,l)(n))}function l(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,MA(e,e.attempt(Pc,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,l=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:xA(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(Ec,n,s)(t):s(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(t)}return n(t)};function a(t){return xA(t)&&++l<10?(e.consume(t),a):(!r.interrupt||l<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),s(t)):n(t)}function s(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(UA,r.interrupt?n:A,e.attempt(Cc,u,c))}function A(e){return r.containerState.initialBlankLine=!0,i++,u(e)}function c(t){return DA(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),u):n(t)}function u(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},Cc={partial:!0,tokenize:function(e,t,n){const r=this;return MA(e,function(e){const o=r.events[r.events.length-1];return!DA(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Sc={partial:!0,tokenize:function(e,t,n){const r=this;return MA(e,function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}};const Dc={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),o||"definition"!==e[i][1].type||(o=i);const l={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",l,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=l;return e.push(["exit",l,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let l,a=r.events.length;for(;a--;)if("lineEnding"!==r.events[a][1].type&&"linePrefix"!==r.events[a][1].type&&"content"!==r.events[a][1].type){l="paragraph"===r.events[a][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||l))return e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),i(t)}(t);return n(t)};function i(t){return t===o?(e.consume(t),i):(e.exit("setextHeadingLineSequence"),DA(t)?MA(e,l,"lineSuffix")(t):l(t))}function l(r){return null===r||CA(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const Bc={tokenize:function(e){const t=this,n=e.attempt(UA,function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,r,MA(e,e.attempt(this.parser.constructs.flow,r,e.attempt(tc,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const Ic={resolveAll:Oc()},Tc=Mc("string"),Qc=Mc("text");function Mc(e){return{resolveAll:Oc("text"===e?Lc:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,l);return i;function i(e){return s(e)?o(e):l(e)}function l(e){if(null!==e)return t.enter("data"),t.consume(e),a;t.consume(e)}function a(e){return s(e)?(t.exit("data"),o(e)):(t.consume(e),a)}function s(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function Oc(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):t[o]&&"data"===t[o][1].type||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function Lc(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let i,l=o.length,a=-1,s=0;for(;l--;){const e=o[l];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)s++,a--;if(a)break;a=-1}else if(-2===e)i=!0,s++;else if(-1!==e){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const o={type:n===e.length||i||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?a:r.start._bufferIndex+a,_index:r.start._index+l,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}const Nc={42:Pc,43:Pc,45:Pc,48:Pc,49:Pc,50:Pc,51:Pc,52:Pc,53:Pc,54:Pc,55:Pc,56:Pc,57:Pc,62:_A},Rc={91:ac},Hc={[-2]:YA,[-1]:YA,32:YA},Fc={35:cc,42:Ec,45:[Dc,Ec],60:fc,61:Dc,95:Ec,96:WA,126:WA},zc={38:VA,92:qA},jc={[-5]:xc,[-4]:xc,[-3]:xc,33:bc,38:VA,42:FA,60:[jA,gc],91:kc,92:[Ac,qA],93:mc,95:FA,96:XA},Uc={null:[FA,Ic]};var _c=Object.freeze({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:Rc,disable:{null:[]},document:Nc,flow:Fc,flowInitial:Hc,insideSpan:Uc,string:zc,text:jc});function qc(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},i=[];let l=[],a=[];const s={attempt:g(function(e,t){m(e,t.from)}),check:g(h),consume:function(e){CA(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,v()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++));A.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=d(),A.events.push(["enter",n,A]),a.push(n),n},exit:function(e){const t=a.pop();return t.end=d(),A.events.push(["exit",t,A]),t},interrupt:g(h,{interrupt:!0})},A={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,v()},events:[],now:d,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let l;if("string"==typeof i)l=i;else switch(i){case-5:l="\r";break;case-4:l="\n";break;case-3:l="\r\n";break;case-2:l=t?" ":"\t";break;case-1:if(!t&&o)continue;l=" ";break;default:l=String.fromCharCode(i)}o=-2===i,r.push(l)}return r.join("")}(u(e),t)},sliceStream:u,write:function(e){if(l=dA(l,e),f(),null!==l[l.length-1])return[];return m(t,0),A.events=HA(i,A.events,A),A.events}};let c=t.tokenize.call(A,s);return t.resolveAll&&i.push(t),A;function u(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let l;if(n===o)l=[e[n].slice(r,i)];else{if(l=e.slice(n,o),r>-1){const e=l[0];"string"==typeof e?l[0]=e.slice(r):l.shift()}i>0&&l.push(e[o].slice(0,i))}return l}(l,e)}function d(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:i}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:i}}function f(){let e;for(;r._index<l.length;){const t=l[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)p(t.charCodeAt(r._bufferIndex));else p(t)}}function p(e){c=c(e)}function h(e,t){t.restore()}function g(e,t){return function(n,o,i){let l,c,u,f;return Array.isArray(n)?p(n):"tokenize"in n?p([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return p([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function p(e){return l=e,c=0,0===e.length?i:h(e[c])}function h(e){return function(n){f=function(){const e=d(),t=A.previous,n=A.currentConstruct,o=A.events.length,i=Array.from(a);return{from:o,restore:l};function l(){r=e,A.previous=t,A.currentConstruct=n,A.events.length=o,a=i,v()}}(),u=e,e.partial||(A.currentConstruct=e);if(e.name&&A.parser.constructs.disable.null.includes(e.name))return m();return e.tokenize.call(t?Object.assign(Object.create(A),t):A,s,g,m)(n)}}function g(t){return e(u,f),o}function m(e){return f.restore(),++c<l.length?h(l[c]):i}}}function m(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&uA(A.events,t,A.events.length-t,e.resolve(A.events.slice(t),A)),e.resolveTo&&(A.events=e.resolveTo(A.events,A))}function v(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const Vc=/[\0\t\n\r]/g;const Gc=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Wc(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return mA(n.slice(t?2:1),t?16:10)}return cA(n)||e}const Yc={}.hasOwnProperty;function Kc(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(te),autolinkProtocol:P,autolinkEmail:P,atxHeading:i(J),blockQuote:i(G),characterEscape:P,characterReference:P,codeFenced:i(W),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:i(W,l),codeText:i(Y,l),codeTextData:P,data:P,codeFlowValue:P,definition:i(K),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:i(X),hardBreakEscape:i(Z),hardBreakTrailing:i(Z),htmlFlow:i($,l),htmlFlowData:P,htmlText:i($,l),htmlTextData:P,image:i(ee),label:l,link:i(te),listItem:i(re),listItemValue:d,listOrdered:i(ne,u),listUnordered:i(ne),paragraph:i(oe),reference:F,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:i(J),strong:i(ie),thematicBreak:i(ae)},exit:{atxHeading:s(),atxHeadingSequence:b,autolink:s(),autolinkEmail:V,autolinkProtocol:q,blockQuote:s(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:j,characterReferenceMarkerNumeric:j,characterReferenceValue:U,characterReference:_,codeFenced:s(g),codeFencedFence:h,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:C,codeIndented:s(m),codeText:s(T),codeTextData:C,data:C,definition:s(),definitionDestinationString:w,definitionLabelString:v,definitionTitleString:y,emphasis:s(),hardBreakEscape:s(D),hardBreakTrailing:s(D),htmlFlow:s(B),htmlFlowData:C,htmlText:s(I),htmlTextData:C,image:s(M),label:L,labelText:O,lineEnding:S,link:s(Q),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:z,resourceDestinationString:N,resourceTitleString:R,resource:H,setextHeading:s(E),setextHeadingLineSequence:x,setextHeadingText:k,strong:s(),thematicBreak:s()}};Jc(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const i={stack:[r],tokenStack:[],config:t,enter:a,exit:A,buffer:l,resume:c,data:n},s=[];let u=-1;for(;++u<e.length;)if("listOrdered"===e[u][1].type||"listUnordered"===e[u][1].type)if("enter"===e[u][0])s.push(u);else{u=o(e,s.pop(),u)}for(u=-1;++u<e.length;){const n=t[e[u][0]];Yc.call(n,e[u][1].type)&&n[e[u][1].type].call(Object.assign({sliceSerialize:e[u][2].sliceSerialize},i),e[u][1])}if(i.tokenStack.length>0){const e=i.tokenStack[i.tokenStack.length-1];(e[1]||$c).call(i,void 0,e[0])}for(r.position={start:Xc(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Xc(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},u=-1;++u<t.transforms.length;)r=t.transforms[u](r)||r;return r}function o(e,t,n){let r,o,i,l,a=t-1,s=-1,A=!1;for(;++a<=n;){const t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,l=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||l||s||i||(i=a),l=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:l=void 0}if(!s&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===s&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let l=a;for(o=void 0;l--;){const t=e[l];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",A=!0),t[1].type="lineEnding",o=l}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}i&&(!o||i<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||a,0,["exit",r,t[2]]),a++,n++}if("listItemPrefix"===t[1].type){const o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(a,0,["enter",o,t[2]]),a++,n++,i=void 0,l=!0}}}return e[t][1]._spread=A,n}function i(e,t){return n;function n(n){a.call(this,e(n),n),t&&t.call(this,n)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Xc(t.start),end:void 0}}function s(e){return t;function t(t){e&&e.call(this,t),A.call(this,t)}}function A(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+Rs({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||$c).call(this,e,r[0])}n.position.end=Xc(e.end)}function c(){return lA(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function d(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function f(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function p(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function v(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=vA(this.sliceSerialize(e)).toLowerCase()}function y(){const e=this.resume();this.stack[this.stack.length-1].title=e}function w(){const e=this.resume();this.stack[this.stack.length-1].url=e}function b(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function x(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function P(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=le(),n.position={start:Xc(e.start),end:void 0},t.push(n)),this.stack.push(n)}function C(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Xc(e.end)}function S(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=Xc(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(P.call(this,e),C.call(this,e))}function D(){this.data.atHardBreak=!0}function B(){const e=this.resume();this.stack[this.stack.length-1].value=e}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.resume();this.stack[this.stack.length-1].value=e}function Q(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function O(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(Gc,Wc)}(t),n.identifier=vA(t).toLowerCase()}function L(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function N(){const e=this.resume();this.stack[this.stack.length-1].url=e}function R(){const e=this.resume();this.stack[this.stack.length-1].title=e}function H(){this.data.inReference=void 0}function F(){this.data.referenceType="collapsed"}function z(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=vA(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function j(e){this.data.characterReferenceType=e.type}function U(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=mA(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=cA(t)}this.stack[this.stack.length-1].value+=r}function _(e){this.stack.pop().position.end=Xc(e.end)}function q(e){C.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function V(e){C.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function G(){return{type:"blockquote",children:[]}}function W(){return{type:"code",lang:null,meta:null,value:""}}function Y(){return{type:"inlineCode",value:""}}function K(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function X(){return{type:"emphasis",children:[]}}function J(){return{type:"heading",depth:0,children:[]}}function Z(){return{type:"break"}}function $(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function ie(){return{type:"strong",children:[]}}function le(){return{type:"text",value:""}}function ae(){return{type:"thematicBreak"}}}(n)(function(e){for(;!$A(e););return e}(function(e){const t={constructs:pA([_c,...(e||{}).extensions||[]]),content:n(OA),defined:[],document:n(LA),flow:n(Bc),lazy:{},string:n(Tc),text:n(Qc)};return t;function n(e){return function(n){return qc(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,l){const a=[];let s,A,c,u,d;for(o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),c=0,n="",r&&(65279===o.charCodeAt(0)&&c++,r=void 0);c<o.length;){if(Vc.lastIndex=c,s=Vc.exec(o),u=s&&void 0!==s.index?s.index:o.length,d=o.charCodeAt(u),!s){n=o.slice(c);break}if(10===d&&c===u&&e)a.push(-3),e=void 0;else switch(e&&(a.push(-5),e=void 0),c<u&&(a.push(o.slice(c,u)),t+=u-c),d){case 0:a.push(65533),t++;break;case 9:for(A=4*Math.ceil(t/4),a.push(-2);t++<A;)a.push(-1);break;case 10:a.push(-4),t=1;break;default:e=!0,t=1}c=u+1}return l&&(e&&a.push(-5),n&&a.push(n),a.push(null)),a}}()(e,t,!0))))}function Xc(e){return{line:e.line,column:e.column,offset:e.offset}}function Jc(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Jc(e,r):Zc(e,r)}}function Zc(e,t){let n;for(n in t)if(Yc.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function $c(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Rs({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Rs({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Rs({start:t.start,end:t.end})+") is still open")}function eu(e){const t=this;t.parser=function(n){return Kc(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function tu(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&"text"===i.type?i.value="["+i.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&"text"===l.type?l.value+=r:o.push({type:"text",value:r}),o}function nu(e){const t=e.spread;return null==t?e.children.length>1:t}function ru(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(ou(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(ou(t.slice(o),o>0,!1)),i.join("")}function ou(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;9===t||32===t;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const iu={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=QA(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);void 0===a?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=i+1,a+=1,e.footnoteCounts.set(r,a);const s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,s);const A={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,A),e.applyData(t,A)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return tu(e,t);const o={src:QA(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){const n={src:QA(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return tu(e,t);const o={href:QA(r.url||"")};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){const n={href:QA(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),o=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=nu(n[r])}return t}(n):nu(t),i={},l=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const e=r[a];(o||0!==a||"element"!==e.type||"p"!==e.tagName)&&l.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?l.push(e):l.push(...e.children)}const s=r[r.length-1];s&&(o||"element"!==s.type||"p"!==s.tagName)&&l.push({type:"text",value:"\n"});const A={type:"element",tagName:"li",properties:i,children:l};return e.patch(t,A),e.applyData(t,A)},list:function(e,t){const n={},r=e.all(t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){const e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},i=Ls(t.children[1]),l=Os(t.children[t.children.length-1]);i&&l&&(r.position={start:i,end:l}),o.push(r)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=0===(r?r.indexOf(t):1)?"th":"td",i=n&&"table"===n.type?n.align:void 0,l=i?i.length:t.children.length;let a=-1;const s=[];for(;++a<l;){const n=t.children[a],r={},l=i?i[a]:void 0;l&&(r.align=l);let A={type:"element",tagName:o,properties:r,children:[]};n&&(A.children=e.all(n),e.patch(n,A),A=e.applyData(n,A)),s.push(A)}const A={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,A),e.applyData(t,A)},text:function(e,t){const n={type:"text",value:ru(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:lu,yaml:lu,definition:lu,footnoteDefinition:lu};function lu(){}const au="object"==typeof self?self:globalThis,su=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[i,l]=t[o];switch(i){case 0:case-1:return n(l,o);case 1:{const e=n([],o);for(const t of l)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of l)e[r(t)]=r(n);return e}case 3:return n(new Date(l),o);case 4:{const{source:e,flags:t}=l;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of l)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of l)e.add(r(t));return e}case 7:{const{name:e,message:t}=l;return n(new au[e](t),o)}case 8:return n(BigInt(l),o);case"BigInt":return n(Object(BigInt(l)),o);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:e}=new Uint8Array(l);return n(new DataView(e),l)}}return n(new au[i](l),o)};return r})(new Map,e)(0),Au="",{toString:cu}={},{keys:uu}=Object,du=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=cu.call(e).slice(8,-1);switch(n){case"Array":return[1,Au];case"Object":return[2,Au];case"Date":return[3,Au];case"RegExp":return[4,Au];case"Map":return[5,Au];case"Set":return[6,Au];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},fu=([e,t])=>0===e&&("function"===t||"symbol"===t),pu=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const o=(e,t)=>{const o=r.push(e)-1;return n.set(t,o),o},i=r=>{if(n.has(r))return n.get(r);let[l,a]=du(r);switch(l){case 0:{let t=r;switch(a){case"bigint":l=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);t=null;break;case"undefined":return o([-1],r)}return o([l,t],r)}case 1:{if(a){let e=r;return"DataView"===a?e=new Uint8Array(r.buffer):"ArrayBuffer"===a&&(e=new Uint8Array(r)),o([a,[...e]],r)}const e=[],t=o([l,e],r);for(const t of r)e.push(i(t));return t}case 2:{if(a)switch(a){case"BigInt":return o([a,r.toString()],r);case"Boolean":case"Number":case"String":return o([a,r.valueOf()],r)}if(t&&"toJSON"in r)return i(r.toJSON());const n=[],s=o([l,n],r);for(const t of uu(r))!e&&fu(du(r[t]))||n.push([i(t),i(r[t])]);return s}case 3:return o([l,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([l,{source:e,flags:t}],r)}case 5:{const t=[],n=o([l,t],r);for(const[n,o]of r)(e||!fu(du(n))&&!fu(du(o)))&&t.push([i(n),i(o)]);return n}case 6:{const t=[],n=o([l,t],r);for(const n of r)!e&&fu(du(n))||t.push(i(n));return n}}const{message:s}=r;return o([l,{name:a,message:s}],r)};return i})(!(t||n),!!t,new Map,r)(e),r};var hu="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?su(pu(e,t)):structuredClone(e):(e,t)=>su(pu(e,t));function gu(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function mu(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const vu=function(e){if(null==e)return wu;if("function"==typeof e)return yu(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=vu(e[n]);return yu(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return yu(n);function n(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}}(e);if("string"==typeof e)return function(e){return yu(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function yu(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function wu(){return!0}const bu=[],ku=!0,xu=!1;function Eu(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=vu(o),l=r?-1:1;!function e(o,a,s){const A=o&&"object"==typeof o?o:{};if("string"==typeof A.type){const e="string"==typeof A.tagName?A.tagName:"string"==typeof A.name?A.name:void 0;Object.defineProperty(c,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return c;function c(){let A,c,u,d=bu;if((!t||i(o,a,s[s.length-1]||void 0))&&(d=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[ku,e];return null==e?bu:[e]}(n(o,s)),d[0]===xu))return d;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==d[0])for(c=(r?t.children.length:-1)+l,u=s.concat(t);c>-1&&c<t.children.length;){const n=t.children[c];if(A=e(n,c,u)(),A[0]===xu)return A;c="number"==typeof A[1]?A[1]:c+l}}return d}}(e,void 0,[])()}function Pu(e,t,n,r){let o,i,l;"function"==typeof t&&"function"!=typeof n?(i=void 0,l=t,o=n):(i=t,l=n,o=r),Eu(e,i,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return l(e,r,n)},o)}const Cu={}.hasOwnProperty,Su={};function Du(e,t){e.position&&(t.position=function(e){const t=Ls(e),n=Os(e);if(t&&n)return{start:t,end:n}}(e))}function Bu(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&o&&Object.assign(n.properties,hu(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Iu(e,t){const n=t.data||{},r=!("value"in t)||Cu.call(n,"hProperties")||Cu.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Tu(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Qu(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Mu(e,t){const n=function(e,t){const n=t||Su,r=new Map,o=new Map,i=new Map,l={...iu,...n.handlers},a={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=a.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=Qu(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=Qu(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:Bu,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:l,one:function(e,t){const n=e.type,r=a.handlers[n];if(Cu.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=hu(n);return r.children=a.all(e),r}return hu(e)}return(a.options.unknownHandler||Iu)(a,e,t)},options:n,patch:Du,wrap:Tu};return Pu(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:o,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a}(e,t),r=n.one(e,void 0),o=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||gu,r=e.options.footnoteBackLabel||mu,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let s=-1;for(;++s<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[s]);if(!o)continue;const i=e.all(o),l=String(o.identifier).toUpperCase(),A=QA(l.toLowerCase());let c=0;const u=[],d=e.footnoteCounts.get(l);for(;void 0!==d&&++c<=d;){u.length>0&&u.push({type:"text",value:" "});let e="string"==typeof n?n:n(s,c);"string"==typeof e&&(e={type:"text",value:e}),u.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+A+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(s,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=i[i.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...u)}else i.push(...u);const p={type:"element",tagName:"li",properties:{id:t+"fn-"+A},children:e.wrap(i,!0)};e.patch(o,p),a.push(p)}if(0!==a.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...hu(l),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:"\n"}]}}(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:"\n"},o),i}function Ou(e,t){return e&&"run"in e?async function(n,r){const o=Mu(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Mu(n,{file:r,...e||t})}}function Lu(e){if(e)throw e}var Nu=Object.prototype.hasOwnProperty,Ru=Object.prototype.toString,Hu=Object.defineProperty,Fu=Object.getOwnPropertyDescriptor,zu=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Ru.call(e)},ju=function(e){if(!e||"[object Object]"!==Ru.call(e))return!1;var t,n=Nu.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Nu.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Nu.call(e,t)},Uu=function(e,t){Hu&&"__proto__"===t.name?Hu(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},_u=function(e,t){if("__proto__"===t){if(!Nu.call(e,t))return;if(Fu)return Fu(e,t).value}return e[t]},qu=function e(){var t,n,r,o,i,l,a=arguments[0],s=1,A=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[1]||{},s=2),(null==a||"object"!=typeof a&&"function"!=typeof a)&&(a={});s<A;++s)if(null!=(t=arguments[s]))for(n in t)r=_u(a,n),a!==(o=_u(t,n))&&(c&&o&&(ju(o)||(i=zu(o)))?(i?(i=!1,l=r&&zu(r)?r:[]):l=r&&ju(r)?r:{},Uu(a,{name:n,newValue:e(c,l,o)})):void 0!==o&&Uu(a,{name:n,newValue:o}));return a},Vu=ss(qu);function Gu(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function Wu(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(i,...l){const a=e[++n];let s=-1;if(i)r(i);else{for(;++s<t.length;)null!==l[s]&&void 0!==l[s]||(l[s]=t[s]);t=l,a?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let l;r&&t.push(o);try{l=e.apply(this,t)}catch(e){if(r&&n)throw e;return o(e)}r||(l&&l.then&&"function"==typeof l.then?l.then(i,o):l instanceof Error?o(l):i(l))}function o(e,...r){n||(n=!0,t(e,...r))}function i(e){o(null,e)}}(a,o)(...l):r(null,...l)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const Yu={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Ku(e);let n,r=0,o=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let l=-1,a=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else l<0&&(n=!0,l=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(o=i):(a=-1,o=l));r===o?o=l:o<0&&(o=e.length);return e.slice(r,o)},dirname:function(e){if(Ku(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){Ku(e);let t,n=e.length,r=-1,o=0,i=-1,l=0;for(;n--;){const a=e.codePointAt(n);if(47!==a)r<0&&(t=!0,r=n+1),46===a?i<0?i=n:1!==l&&(l=1):i>-1&&(l=-1);else if(t){o=n+1;break}}if(i<0||r<0||0===l||1===l&&i===r-1&&i===o+1)return"";return e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)Ku(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Ku(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,l=-1,a=0,s=-1;for(;++s<=e.length;){if(s<e.length)n=e.codePointAt(s);else{if(47===n)break;n=47}if(47===n){if(l===s-1||1===a);else if(l!==s-1&&2===a){if(o.length<2||2!==i||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",i=0):(o=o.slice(0,r),i=o.length-1-o.lastIndexOf("/")),l=s,a=0;continue}}else if(o.length>0){o="",i=0,l=s,a=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(l+1,s):o=e.slice(l+1,s),i=s-l-1;l=s,a=0}else 46===n&&a>-1?a++:a=-1}return o}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function Ku(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Xu={cwd:function(){return"/"}};function Ju(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Zu(e){if("string"==typeof e)e=new URL(e);else if(!Ju(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const $u=["history","path","basename","stem","extname","dirname"];class ed{constructor(e){let t;t=e?Ju(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":Xu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<$u.length;){const e=$u[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)$u.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?Yu.basename(this.path):void 0}set basename(e){nd(e,"basename"),td(e,"basename"),this.path=Yu.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?Yu.dirname(this.path):void 0}set dirname(e){rd(this.basename,"dirname"),this.path=Yu.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?Yu.extname(this.path):void 0}set extname(e){if(td(e,"extname"),rd(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Yu.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Ju(e)&&(e=Zu(e)),nd(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?Yu.basename(this.path,this.extname):void 0}set stem(e){nd(e,"stem"),td(e,"stem"),this.path=Yu.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new js(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function td(e,t){if(e&&e.includes(Yu.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Yu.sep+"`")}function nd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function rd(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const od=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},id={}.hasOwnProperty;class ld extends od{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=Wu()}copy(){const e=new ld;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(Vu(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(cd("data",this.frozen),this.namespace[e]=t,this):id.call(this.namespace,e)&&this.namespace[e]||void 0:e?(cd("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=fd(e),n=this.parser||this.Parser;return sd("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),sd("process",this.parser||this.Parser),Ad("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=fd(e),l=n.parse(i);function a(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(l,i,function(e,t,r){if(e||!t||!r)return a(e);const o=t,i=n.stringify(o,r);var l;"string"==typeof(l=i)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(l)?r.value=i:r.result=i,a(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),sd("processSync",this.parser||this.Parser),Ad("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,Lu(e),t=r}),dd("processSync","process",n),t}run(e,t,n){ud(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,i){const l=fd(t);r.run(e,l,function(t,r,l){const a=r||e;t?i(t):o?o(a):n(void 0,a,l)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){Lu(e),n=t,r=!0}),dd("runSync","run",r),n}stringify(e,t){this.freeze();const n=fd(t),r=this.compiler||this.Compiler;return Ad("stringify",r),ud(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(cd("use",this.frozen),null==e);else if("function"==typeof e)a(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?l(e):i(e)}return this;function o(e){if("function"==typeof e)a(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;a(t,n)}else i(e)}}function i(e){if(!("plugins"in e)&&!("settings"in e))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");l(e.plugins),e.settings&&(r.settings=Vu(!0,r.settings,e.settings))}function l(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){o(e[t])}}}function a(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...i]=t;const l=n[o][1];Gu(l)&&Gu(r)&&(r=Vu(!0,l,r)),n[o]=[e,r,...i]}}}}const ad=(new ld).freeze();function sd(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function Ad(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function cd(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ud(e){if(!Gu(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function dd(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function fd(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new ed(e)}const pd=[],hd={allowDangerousHtml:!0},gd=/^(https?|ircs?|mailto|xmpp)$/i,md=[{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 vd(e){const t=function(e){const t=e.rehypePlugins||pd,n=e.remarkPlugins||pd,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...hd}:hd,o=ad().use(eu).use(n).use(Ou,r).use(t);return o}(e),n=function(e){const t=e.children||"",n=new ed;"string"==typeof t&&(n.value=t);return n}(e);return function(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,i=t.disallowedElements,l=t.skipHtml,a=t.unwrapDisallowed,s=t.urlTransform||yd;for(const e of md)Object.hasOwn(t,e.from)&&wa((e.from,e.to&&e.to,e.id));t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:"root"===e.type?e.children:[e]});return Pu(e,A),Ys(e,{Fragment:m,components:o,ignoreInvalidStyle:!0,jsx:h,jsxs:g,passKeys:!0,passNode:!0});function A(e,t,o){if("raw"===e.type&&o&&"number"==typeof t)return l?o.children.splice(t,1):o.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in oA)if(Object.hasOwn(oA,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=oA[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=s(String(n||""),t,e))}}if("element"===e.type){let l=n?!n.includes(e.tagName):!!i&&i.includes(e.tagName);if(!l&&r&&"number"==typeof t&&(l=!r(e,t,o)),l&&o&&"number"==typeof t)return a&&e.children?o.children.splice(t,1,...e.children):o.children.splice(t,1),t}}}(t.runSync(t.parse(n),n),e)}function yd(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return-1===t||-1!==o&&t>o||-1!==n&&t>n||-1!==r&&t>r||gd.test(e.slice(0,t))?e:""}function wd(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}function bd(e,t,n){const r=vu((n||{}).ignore||[]),o=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([kd(e[0]),xd(e[1])])}return t}(t);let i=-1;for(;++i<o.length;)Eu(e,"text",l);function l(e,t){let n,l=-1;for(;++l<t.length;){const e=t[l],o=n?n.children:void 0;if(r(e,o?o.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=o[i][0],l=o[i][1];let a=0;const s=n.children.indexOf(e);let A=!1,c=[];r.lastIndex=0;let u=r.exec(e.value);for(;u;){const n=u.index,o={index:u.index,input:u.input,stack:[...t,e]};let i=l(...u,o);if("string"==typeof i&&(i=i.length>0?{type:"text",value:i}:void 0),!1===i?r.lastIndex=n+1:(a!==n&&c.push({type:"text",value:e.value.slice(a,n)}),Array.isArray(i)?c.push(...i):i&&c.push(i),a=n+u[0].length,A=!0),!r.global)break;u=r.exec(e.value)}A?(a<e.value.length&&c.push({type:"text",value:e.value.slice(a)}),n.children.splice(s,1,...c)):c=[e];return s+c.length}(e,t)}}function kd(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function xd(e){return"function"==typeof e?e:function(){return e}}const Ed="phrasing",Pd=["autolink","link","image","label"];function Cd(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Sd(e){this.config.enter.autolinkProtocol.call(this,e)}function Dd(e){this.config.exit.autolinkProtocol.call(this,e)}function Bd(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Id(e){this.config.exit.autolinkEmail.call(this,e)}function Td(e){this.exit(e)}function Qd(e){bd(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Md],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Od]],{ignore:["link","linkReference"]})}function Md(e,t,n,r,o){let i="";if(!Ld(o))return!1;if(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(n))return!1;const l=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=wd(e,"(");let i=wd(e,")");for(;-1!==r&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}(n+r);if(!l[0])return!1;const a={type:"link",title:null,url:i+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function Od(e,t,n,r){return!(!Ld(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Ld(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||IA(n)||BA(n))&&(!t||47!==n)}function Nd(){this.buffer()}function Rd(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Hd(){this.buffer()}function Fd(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function zd(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=vA(this.sliceSerialize(e)).toLowerCase(),n.label=t}function jd(e){this.exit(e)}function Ud(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=vA(this.sliceSerialize(e)).toLowerCase(),n.label=t}function _d(e){this.exit(e)}function qd(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const l=n.enter("footnoteReference"),a=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),a(),l(),i+=o.move("]"),i}function Vd(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,o){const i=r.createTracker(o);let l=i.move("[^");const a=r.enter("footnoteDefinition"),s=r.enter("label");l+=i.move(r.safe(r.associationId(e),{before:l,after:"]"})),s(),l+=i.move("]:"),e.children&&e.children.length>0&&(i.shift(4),l+=i.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,i.current()),t?Wd:Gd)));return a(),l},footnoteReference:qd},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function Gd(e,t,n){return 0===t?e:Wd(e,t,n)}function Wd(e,t,n){return(n?"":" ")+e}qd.peek=function(){return"["};const Yd=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function Kd(e){this.enter({type:"delete",children:[]},e)}function Xd(e){this.exit(e)}function Jd(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let l=o.move("~~");return l+=n.containerPhrasing(e,{...o.current(),before:l,after:"~"}),l+=o.move("~~"),i(),l}function Zd(e){return e.length}function $d(e){return null==e?"":String(e)}function ef(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function tf(e,t,n){return">"+(n?"":" ")+e}function nf(e,t){return rf(e,t.inConstruct,!0)&&!rf(e,t.notInConstruct,!1)}function rf(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function of(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if("\n"===n.unsafe[o].character&&nf(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function lf(e,t,n){return(n?"":" ")+e}function af(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function sf(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Af(e,t,n){const r=RA(e),o=RA(t);return void 0===r?void 0===o?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function cf(e,t,n,r){const o=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),i=n.enter("emphasis"),l=n.createTracker(r),a=l.move(o);let s=l.move(n.containerPhrasing(e,{after:o,before:a,...l.current()}));const A=s.charCodeAt(0),c=Af(r.before.charCodeAt(r.before.length-1),A,o);c.inside&&(s=sf(A)+s.slice(1));const u=s.charCodeAt(s.length-1),d=Af(r.after.charCodeAt(0),u,o);d.inside&&(s=s.slice(0,-1)+sf(u));const f=l.move(o);return i(),n.attentionEncodeSurroundingInfo={after:d.outside,before:c.outside},a+s+f}function uf(e){return e.value||""}function df(e,t,n,r){const o=af(n),i='"'===o?"Quote":"Apostrophe",l=n.enter("image");let a=n.enter("label");const s=n.createTracker(r);let A=s.move("![");return A+=s.move(n.safe(e.alt,{before:A,after:"]",...s.current()})),A+=s.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),A+=s.move("<"),A+=s.move(n.safe(e.url,{before:A,after:">",...s.current()})),A+=s.move(">")):(a=n.enter("destinationRaw"),A+=s.move(n.safe(e.url,{before:A,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=n.enter(`title${i}`),A+=s.move(" "+o),A+=s.move(n.safe(e.title,{before:A,after:o,...s.current()})),A+=s.move(o),a()),A+=s.move(")"),l(),A}function ff(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let l=n.enter("label");const a=n.createTracker(r);let s=a.move("![");const A=n.safe(e.alt,{before:s,after:"]",...a.current()});s+=a.move(A+"]["),l();const c=n.stack;n.stack=[],l=n.enter("reference");const u=n.safe(n.associationId(e),{before:s,after:"]",...a.current()});return l(),n.stack=c,i(),"full"!==o&&A&&A===u?"shortcut"===o?s=s.slice(0,-1):s+=a.move("]"):s+=a.move(u+"]"),s}function pf(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const e=n.unsafe[i],t=n.compilePattern(e);let o;if(e.atBreak)for(;o=t.exec(r);){let e=o.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(o.index+1)}}return o+r+o}function hf(e,t){const n=lA(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function gf(e,t,n,r){const o=af(n),i='"'===o?"Quote":"Apostrophe",l=n.createTracker(r);let a,s;if(hf(e,n)){const t=n.stack;n.stack=[],a=n.enter("autolink");let r=l.move("<");return r+=l.move(n.containerPhrasing(e,{before:r,after:">",...l.current()})),r+=l.move(">"),a(),n.stack=t,r}a=n.enter("link"),s=n.enter("label");let A=l.move("[");return A+=l.move(n.containerPhrasing(e,{before:A,after:"](",...l.current()})),A+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),A+=l.move("<"),A+=l.move(n.safe(e.url,{before:A,after:">",...l.current()})),A+=l.move(">")):(s=n.enter("destinationRaw"),A+=l.move(n.safe(e.url,{before:A,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),A+=l.move(" "+o),A+=l.move(n.safe(e.title,{before:A,after:o,...l.current()})),A+=l.move(o),s()),A+=l.move(")"),a(),A}function mf(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let l=n.enter("label");const a=n.createTracker(r);let s=a.move("[");const A=n.containerPhrasing(e,{before:s,after:"]",...a.current()});s+=a.move(A+"]["),l();const c=n.stack;n.stack=[],l=n.enter("reference");const u=n.safe(n.associationId(e),{before:s,after:"]",...a.current()});return l(),n.stack=c,i(),"full"!==o&&A&&A===u?"shortcut"===o?s=s.slice(0,-1):s+=a.move("]"):s+=a.move(u+"]"),s}function vf(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function yf(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}Jd.peek=function(){return"~"},cf.peek=function(e,t,n){return n.options.emphasis||"*"},uf.peek=function(){return"<"},df.peek=function(){return"!"},ff.peek=function(){return"!"},pf.peek=function(){return"`"},gf.peek=function(e,t,n){return hf(e,n)?"<":"["},mf.peek=function(){return"["};const wf=vu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function bf(e,t,n,r){const o=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),i=n.enter("strong"),l=n.createTracker(r),a=l.move(o+o);let s=l.move(n.containerPhrasing(e,{after:o,before:a,...l.current()}));const A=s.charCodeAt(0),c=Af(r.before.charCodeAt(r.before.length-1),A,o);c.inside&&(s=sf(A)+s.slice(1));const u=s.charCodeAt(s.length-1),d=Af(r.after.charCodeAt(0),u,o);d.inside&&(s=s.slice(0,-1)+sf(u));const f=l.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:d.outside,before:c.outside},a+s+f}bf.peek=function(e,t,n){return n.options.strong||"*"};const kf={blockquote:function(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const l=n.indentLines(n.containerFlow(e,i.current()),tf);return o(),l},break:of,code:function(e,t,n,r){const o=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),i=e.value||"",l="`"===o?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(i,lf);return e(),t}const a=n.createTracker(r),s=o.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,l=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===o?++i>l&&(l=i):i=1,o=r+t.length,r=n.indexOf(t,o);return l}(i,o)+1,3)),A=n.enter("codeFenced");let c=a.move(s);if(e.lang){const t=n.enter(`codeFencedLang${l}`);c+=a.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...a.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${l}`);c+=a.move(" "),c+=a.move(n.safe(e.meta,{before:c,after:"\n",encode:["`"],...a.current()})),t()}return c+=a.move("\n"),i&&(c+=a.move(i+"\n")),c+=a.move(s),A(),c},definition:function(e,t,n,r){const o=af(n),i='"'===o?"Quote":"Apostrophe",l=n.enter("definition");let a=n.enter("label");const s=n.createTracker(r);let A=s.move("[");return A+=s.move(n.safe(n.associationId(e),{before:A,after:"]",...s.current()})),A+=s.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),A+=s.move("<"),A+=s.move(n.safe(e.url,{before:A,after:">",...s.current()})),A+=s.move(">")):(a=n.enter("destinationRaw"),A+=s.move(n.safe(e.url,{before:A,after:e.title?" ":"\n",...s.current()}))),a(),e.title&&(a=n.enter(`title${i}`),A+=s.move(" "+o),A+=s.move(n.safe(e.title,{before:A,after:o,...s.current()})),A+=s.move(o),a()),l(),A},emphasis:cf,hardBreak:of,heading:function(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(function(e,t){let n=!1;return Pu(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,xu}),Boolean((!e.depth||e.depth<3)&&lA(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),l=n.containerPhrasing(e,{...i.current(),before:"\n",after:"\n"});return r(),t(),l+"\n"+(1===o?"=":"-").repeat(l.length-(Math.max(l.lastIndexOf("\r"),l.lastIndexOf("\n"))+1))}const l="#".repeat(o),a=n.enter("headingAtx"),s=n.enter("phrasing");i.move(l+" ");let A=n.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(A)&&(A=sf(A.charCodeAt(0))+A.slice(1)),A=A?l+" "+A:l,n.options.closeAtx&&(A+=" "+l),s(),a(),A},html:uf,image:df,imageReference:ff,inlineCode:pf,link:gf,linkReference:mf,list:function(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let l=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):vf(n);const a=e.ordered?"."===l?")":".":function(e){const t=vf(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let s=!(!t||!n.bulletLastUsed)&&l===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==l&&"-"!==l||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(s=!0),yf(n)===l&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){s=!0;break}}}}s&&(l=a),n.bulletCurrent=l;const A=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=i,o(),A},listItem:function(e,t,n,r){const o=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let i=n.bulletCurrent||vf(n);t&&"list"===t.type&&t.ordered&&(i=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+i);let l=i.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(l=4*Math.ceil(l/4));const a=n.createTracker(r);a.move(i+" ".repeat(l-i.length)),a.shift(l);const s=n.enter("listItem"),A=n.indentLines(n.containerFlow(e,a.current()),function(e,t,n){if(t)return(n?"":" ".repeat(l))+e;return(n?i:i+" ".repeat(l-i.length))+e});return s(),A},paragraph:function(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),l=n.containerPhrasing(e,r);return i(),o(),l},root:function(e,t,n,r){const o=e.children.some(function(e){return wf(e)});return(o?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:bf,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(yf(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function xf(e){const t=e._align;this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function Ef(e){this.exit(e),this.data.inTable=void 0}function Pf(e){this.enter({type:"tableRow",children:[]},e)}function Cf(e){this.exit(e)}function Sf(e){this.enter({type:"tableCell",children:[]},e)}function Df(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Bf));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Bf(e,t){return"|"===t?t:e}function If(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=kf.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return a(function(e,t,n){const r=e.children;let o=-1;const i=[],l=t.enter("table");for(;++o<r.length;)i[o]=s(r[o],t,n);return l(),i}(e,n,r),e.align)},tableCell:l,tableRow:function(e,t,n,r){const o=s(e,n,r),i=a([o]);return i.slice(0,i.indexOf("\n"))}}};function l(e,t,n,r){const o=n.enter("tableCell"),l=n.enter("phrasing"),a=n.containerPhrasing(e,{...r,before:i,after:i});return l(),o(),a}function a(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||Zd,i=[],l=[],a=[],s=[];let A=0,c=-1;for(;++c<e.length;){const t=[],r=[];let i=-1;for(e[c].length>A&&(A=e[c].length);++i<e[c].length;){const l=$d(e[c][i]);if(!1!==n.alignDelimiters){const e=o(l);r[i]=e,(void 0===s[i]||e>s[i])&&(s[i]=e)}t.push(l)}l[c]=t,a[c]=r}let u=-1;if("object"==typeof r&&"length"in r)for(;++u<A;)i[u]=ef(r[u]);else{const e=ef(r);for(;++u<A;)i[u]=e}u=-1;const d=[],f=[];for(;++u<A;){const e=i[u];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let o=!1===n.alignDelimiters?1:Math.max(1,s[u]-t.length-r.length);const l=t+"-".repeat(o)+r;!1!==n.alignDelimiters&&(o=t.length+o+r.length,o>s[u]&&(s[u]=o),f[u]=o),d[u]=l}l.splice(1,0,d),a.splice(1,0,f),c=-1;const p=[];for(;++c<l.length;){const e=l[c],t=a[c];u=-1;const r=[];for(;++u<A;){const o=e[u]||"";let l="",a="";if(!1!==n.alignDelimiters){const e=s[u]-(t[u]||0),n=i[u];114===n?l=" ".repeat(e):99===n?e%2?(l=" ".repeat(e/2+.5),a=" ".repeat(e/2-.5)):(l=" ".repeat(e/2),a=l):a=" ".repeat(e)}!1===n.delimiterStart||u||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===o||!1===n.delimiterStart&&!u||r.push(" "),!1!==n.alignDelimiters&&r.push(l),r.push(o),!1!==n.alignDelimiters&&r.push(a),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&u===A-1||r.push("|")}p.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return p.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:o})}function s(e,t,n){const r=e.children;let o=-1;const i=[],a=t.enter("tableRow");for(;++o<r.length;)i[o]=l(r[o],0,t,n);return a(),i}}function Tf(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function Qf(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let o,i=-1;for(;++i<r.length;){const e=r[i];if("paragraph"===e.type){o=e;break}}o===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Mf(e,t,n,r){const o=e.children[0],i="boolean"==typeof e.checked&&o&&"paragraph"===o.type,l="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);i&&a.move(l);let s=kf.listItem(e,t,n,{...r,...a.current()});return i&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+l})),s}const Of={tokenize:function(e,t,n){let r=0;return function t(i){if((87===i||119===i)&&r<3)return r++,e.consume(i),t;if(46===i&&3===r)return e.consume(i),o;return n(i)};function o(e){return null===e?n(e):t(e)}},partial:!0},Lf={tokenize:function(e,t,n){let r,o,i;return l;function l(t){return 46===t||95===t?e.check(Rf,s,a)(t):null===t||SA(t)||IA(t)||45!==t&&BA(t)?s(t):(i=!0,e.consume(t),l)}function a(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),l}function s(e){return o||r||!i?n(e):t(e)}},partial:!0},Nf={tokenize:function(e,t){let n=0,r=0;return o;function o(l){return 40===l?(n++,e.consume(l),o):41===l&&r<n?i(l):33===l||34===l||38===l||39===l||41===l||42===l||44===l||46===l||58===l||59===l||60===l||63===l||93===l||95===l||126===l?e.check(Rf,t,i)(l):null===l||SA(l)||IA(l)?t(l):(e.consume(l),o)}function i(t){return 41===t&&r++,e.consume(t),o}},partial:!0},Rf={tokenize:function(e,t,n){return r;function r(l){return 33===l||34===l||39===l||41===l||42===l||44===l||46===l||58===l||59===l||63===l||95===l||126===l?(e.consume(l),r):38===l?(e.consume(l),i):93===l?(e.consume(l),o):60===l||null===l||SA(l)||IA(l)?t(l):n(l)}function o(e){return null===e||40===e||91===e||SA(e)||IA(e)?t(e):r(e)}function i(e){return yA(e)?l(e):n(e)}function l(t){return 59===t?(e.consume(t),r):yA(t)?(e.consume(t),l):n(t)}},partial:!0},Hf={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return wA(e)?n(e):t(e)}},partial:!0},Ff={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!qf.call(r,r.previous)||Yf(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Of,e.attempt(Lf,e.attempt(Nf,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:qf},zf={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",i=!1;return function(t){if((72===t||104===t)&&Vf.call(r,r.previous)&&!Yf(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),l;return n(t)};function l(t){if(yA(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),l;if(58===t){const n=o.toLowerCase();if("http"===n||"https"===n)return e.consume(t),a}return n(t)}function a(t){return 47===t?(e.consume(t),i?s:(i=!0,a)):n(t)}function s(t){return null===t||kA(t)||SA(t)||IA(t)||BA(t)?n(t):e.attempt(Lf,e.attempt(Nf,A),n)(t)}function A(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:Vf},jf={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,i;return function(t){if(!Wf(t)||!Gf.call(r,r.previous)||Yf(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(t)};function l(t){return Wf(t)?(e.consume(t),l):64===t?(e.consume(t),a):n(t)}function a(t){return 46===t?e.check(Hf,A,s)(t):45===t||95===t||wA(t)?(i=!0,e.consume(t),a):A(t)}function s(t){return e.consume(t),o=!0,a}function A(l){return i&&o&&yA(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(l)):n(l)}},previous:Gf},Uf={};let _f=48;for(;_f<123;)Uf[_f]=jf,_f++,58===_f?_f=65:91===_f&&(_f=97);function qf(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||SA(e)}function Vf(e){return!yA(e)}function Gf(e){return!(47===e||Wf(e))}function Wf(e){return 43===e||45===e||46===e||95===e||wA(e)}function Yf(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}Uf[43]=jf,Uf[45]=jf,Uf[46]=jf,Uf[95]=jf,Uf[72]=[jf,zf],Uf[104]=[jf,zf],Uf[87]=[jf,Ff],Uf[119]=[jf,Ff];const Kf={tokenize:function(e,t,n){const r=this;return MA(e,function(e){const o=r.events[r.events.length-1];return o&&"gfmFootnoteDefinitionIndent"===o[1].type&&4===o[2].sliceSerialize(o[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function Xf(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;o--;){const e=r.events[o][1];if("labelImage"===e.type){l=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!l||!l._balanced)return n(o);const a=vA(r.sliceSerialize({start:l.end,end:r.now()}));if(94!==a.codePointAt(0)||!i.includes(a.slice(1)))return n(o);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)}}function Jf(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function Zf(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,l=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),a};function a(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",s)}function s(a){if(l>999||93===a&&!i||null===a||91===a||SA(a))return n(a);if(93===a){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes(vA(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(a)}return SA(a)||(i=!0),l++,e.consume(a),92===a?A:s}function A(t){return 91===t||92===t||93===t?(e.consume(t),l++,s):s(t)}}function $f(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,l,a=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),s};function s(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",A):n(t)}function A(t){if(a>999||93===t&&!l||null===t||91===t||SA(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return i=vA(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),u}return SA(t)||(l=!0),a++,e.consume(t),92===t?c:A}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,A):A(t)}function u(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(i)||o.push(i),MA(e,d,"gfmFootnoteDefinitionWhitespace")):n(t)}function d(e){return t(e)}}function ep(e,t,n){return e.check(UA,t,e.attempt(Kf,t,n))}function tp(e){e.exit("gfmFootnoteDefinition")}function np(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const o=this.previous,i=this.events;let l=0;return function(t){if(126===o&&"characterEscape"!==i[i.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),a(t)};function a(i){const s=RA(o);if(126===i)return l>1?r(i):(e.consume(i),l++,a);if(l<2&&!t)return r(i);const A=e.exit("strikethroughSequenceTemporary"),c=RA(i);return A._open=!c||2===c&&Boolean(s),A._close=!s||2===s&&Boolean(c),n(i)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const o={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},i={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},l=[["enter",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",i,t]],a=t.parser.constructs.insideSpan.null;a&&uA(l,l.length,0,HA(a,e.slice(r+1,n),t)),uA(l,l.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),uA(e,r-1,n-r+3,l),n=r+l.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class rp{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let o=0;if(0===n&&0===r.length)return;for(;o<e.map.length;){if(e.map[o][0]===t)return e.map[o][1]+=n,void e.map[o][2].push(...r);o+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function op(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if("enter"===o[0])"tableContent"===o[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===o[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===o[1].type)break}else"enter"===o[0]&&"tableDelimiterRow"===o[1].type&&(n=!0);t+=1}return r}function ip(e,t,n){const r=this;let o,i=0,l=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const o=t>-1?r.events[t][1].type:null,i="tableHead"===o||"tableRow"===o?w:a;if(i===w&&r.parser.lazy[r.now().line])return n(e);return i(e)};function a(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return s(e);return o=!0,l+=1,s(e)}(t)}function s(t){return null===t?n(t):CA(t)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),u):n(t):DA(t)?MA(e,s,"whitespace")(t):(l+=1,o&&(o=!1,i+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,s):(e.enter("data"),A(t)))}function A(t){return null===t||124===t||SA(t)?(e.exit("data"),s(t)):(e.consume(t),92===t?c:A)}function c(t){return 92===t||124===t?(e.consume(t),A):A(t)}function u(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),o=!1,DA(t)?MA(e,d,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):d(t))}function d(t){return 45===t||58===t?p(t):124===t?(o=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):y(t)}function f(t){return DA(t)?MA(e,p,"whitespace")(t):p(t)}function p(t){return 58===t?(l+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),h):45===t?(l+=1,h(t)):null===t||CA(t)?v(t):y(t)}function h(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):y(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):(e.exit("tableDelimiterFiller"),m(t))}function m(t){return DA(t)?MA(e,v,"whitespace")(t):v(t)}function v(n){return 124===n?d(n):(null===n||CA(n))&&o&&i===l?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):y(n)}function y(e){return n(e)}function w(t){return e.enter("tableRow"),b(t)}function b(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),b):null===n||CA(n)?(e.exit("tableRow"),t(n)):DA(n)?MA(e,b,"whitespace")(n):(e.enter("data"),k(n))}function k(t){return null===t||124===t||SA(t)?(e.exit("data"),b(t)):(e.consume(t),92===t?x:k)}function x(t){return 92===t||124===t?(e.consume(t),k):k(t)}}function lp(e,t){let n,r,o,i=-1,l=!0,a=0,s=[0,0,0,0],A=[0,0,0,0],c=!1,u=0;const d=new rp;for(;++i<e.length;){const f=e[i],p=f[1];"enter"===f[0]?"tableHead"===p.type?(c=!1,0!==u&&(sp(d,t,u,n,r),r=void 0,u=0),n={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(i,0,[["enter",n,t]])):"tableRow"===p.type||"tableDelimiterRow"===p.type?(l=!0,o=void 0,s=[0,0,0,0],A=[0,i+1,0,0],c&&(c=!1,r={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(i,0,[["enter",r,t]])),a="tableDelimiterRow"===p.type?2:r?3:1):!a||"data"!==p.type&&"tableDelimiterMarker"!==p.type&&"tableDelimiterFiller"!==p.type?"tableCellDivider"===p.type&&(l?l=!1:(0!==s[1]&&(A[0]=A[1],o=ap(d,t,s,a,void 0,o)),s=A,A=[s[1],i,0,0])):(l=!1,0===A[2]&&(0!==s[1]&&(A[0]=A[1],o=ap(d,t,s,a,void 0,o),s=[0,0,0,0]),A[2]=i)):"tableHead"===p.type?(c=!0,u=i):"tableRow"===p.type||"tableDelimiterRow"===p.type?(u=i,0!==s[1]?(A[0]=A[1],o=ap(d,t,s,a,i,o)):0!==A[1]&&(o=ap(d,t,A,a,i,o)),a=0):!a||"data"!==p.type&&"tableDelimiterMarker"!==p.type&&"tableDelimiterFiller"!==p.type||(A[3]=i)}for(0!==u&&sp(d,t,u,n,r),d.consume(t.events),i=-1;++i<t.events.length;){const e=t.events[i];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=op(t.events,i))}return e}function ap(e,t,n,r,o,i){const l=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(i.end=Object.assign({},Ap(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const a=Ap(t.events,n[1]);if(i={type:l,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",i,t]]),0!==n[2]){const o=Ap(t.events,n[2]),i=Ap(t.events,n[3]),l={type:"tableContent",start:Object.assign({},o),end:Object.assign({},i)};if(e.add(n[2],0,[["enter",l,t]]),2!==r){const r=t.events[n[2]],o=t.events[n[3]];if(r[1].end=Object.assign({},o[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",l,t]])}return void 0!==o&&(i.end=Object.assign({},Ap(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function sp(e,t,n,r,o){const i=[],l=Ap(t.events,n);o&&(o.end=Object.assign({},l),i.push(["exit",o,t])),r.end=Object.assign({},l),i.push(["exit",r,t]),e.add(n+1,0,i)}function Ap(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const cp={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),o};function o(t){return SA(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),i):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),i):n(t)}function i(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(t)}function l(r){return CA(r)?t(r):DA(r)?e.check({tokenize:up},t,n)(r):n(r)}}};function up(e,t,n){return MA(e,function(e){return null===e?n(e):t(e)},"whitespace")}const dp={};function fp(e){const t=e||dp,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return pA([{text:Uf},{document:{91:{name:"gfmFootnoteDefinition",tokenize:$f,continuation:{tokenize:ep},exit:tp}},text:{91:{name:"gfmFootnoteCall",tokenize:Zf},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Xf,resolveTo:Jf}}},np(e),{flow:{null:{name:"table",tokenize:ip,resolveAll:lp}}},{text:{91:cp}}])}(t)),o.push([{transforms:[Qd],enter:{literalAutolink:Cd,literalAutolinkEmail:Sd,literalAutolinkHttp:Sd,literalAutolinkWww:Sd},exit:{literalAutolink:Td,literalAutolinkEmail:Id,literalAutolinkHttp:Dd,literalAutolinkWww:Bd}},{enter:{gfmFootnoteCallString:Nd,gfmFootnoteCall:Rd,gfmFootnoteDefinitionLabelString:Hd,gfmFootnoteDefinition:Fd},exit:{gfmFootnoteCallString:zd,gfmFootnoteCall:jd,gfmFootnoteDefinitionLabelString:Ud,gfmFootnoteDefinition:_d}},{canContainEols:["delete"],enter:{strikethrough:Kd},exit:{strikethrough:Xd}},{enter:{table:xf,tableData:Sf,tableHeader:Sf,tableRow:Pf},exit:{codeText:Df,table:Ef,tableData:Cf,tableHeader:Cf,tableRow:Cf}},{exit:{taskListCheckValueChecked:Tf,taskListCheckValueUnchecked:Tf,paragraph:Qf}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ed,notInConstruct:Pd},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ed,notInConstruct:Pd},{character:":",before:"[ps]",after:"\\/",inConstruct:Ed,notInConstruct:Pd}]},Vd(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Yd}],handlers:{delete:Jd}},If(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Mf}}]}}(t))}const pp="rgba(0, 0, 0, 0.3)",hp={p:e=>{let{children:n}=e;return t.createElement("p",{style:{margin:0,marginBottom:"0.5em",lineHeight:1.4,textAlign:"left"}},n)},ul:e=>{let{children:n}=e;return t.createElement("ul",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"}},n)},ol:e=>{let{children:n}=e;return t.createElement("ol",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"}},n)},li:e=>{let{children:n}=e;return t.createElement("li",{style:{marginBottom:"1px",lineHeight:1.4}},n)},code:e=>{let{className:n,children:r}=e;return/\blanguage-/.test(n||"")?t.createElement("pre",{style:{backgroundColor:pp,padding:"8px",borderRadius:"4px",overflowX:"auto",margin:"0.5em 0",whiteSpace:"pre-wrap"}},t.createElement("code",null,r)):t.createElement("code",{style:{backgroundColor:pp,padding:"2px 4px",borderRadius:"4px",fontFamily:"inherit",fontSize:"0.95em"}},r)},blockquote:e=>{let{children:n}=e;return t.createElement("blockquote",{style:{margin:0,paddingLeft:"10px",borderLeft:"2px solid rgba(255, 255, 255, 0.4)",color:"inherit",fontStyle:"italic"}},n)},a:e=>{let{children:n,href:r}=e;return t.createElement("a",{href:r,target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"underline",fontWeight:600}},n)},table:e=>{let{children:n}=e;return t.createElement("table",{style:{borderCollapse:"collapse",width:"100%",margin:"0.5em 0",fontSize:"0.95em",color:"#fff"}},n)},th:e=>{let{children:n}=e;return t.createElement("th",{style:{border:"1px solid rgba(255, 255, 255, 0.4)",padding:"6px 10px",textAlign:"left",verticalAlign:"top",fontWeight:600,color:"#fff",backgroundColor:"rgba(255, 255, 255, 0.15)",overflowWrap:"normal",wordBreak:"normal"}},n)},td:e=>{let{children:n}=e;return t.createElement("td",{style:{border:"1px solid rgba(255, 255, 255, 0.4)",padding:"6px 10px",textAlign:"left",verticalAlign:"top",color:"#fff",overflowWrap:"normal",wordBreak:"normal"}},n)}},gp=e=>{let{children:n}=e;return t.createElement("div",{style:{whiteSpace:"normal"}},t.createElement(vd,{remarkPlugins:[fp],components:hp},"string"==typeof n?n:""))},mp=n((e,t)=>{let{embedded:n,currentOpen:r,enabled:o,onSetEnabled:i}=e;const a=en(),A=(()=>{const{isChatWindowOpen:e,toggleChatWindow:t,toggleIsBotTyping:n,scrollToBottom:r,getIsChatBotVisible:o}=oe();return{isChatWindowOpen:e,toggleChatWindow:t,toggleIsBotTyping:n,scrollToBottom:r,getIsChatBotVisible:o}})(),c=l(!1),u=l(!1);return s(()=>{!n&&A&&A.toggleChatWindow&&(c.current===r||u.current||(setTimeout(()=>{A&&A.toggleChatWindow&&A.toggleChatWindow(r)},0),c.current=null!=r&&r),u.current=!1)},[r,n,A]),s(()=>{const e=()=>{u.current=!0};return window.addEventListener("rcb-toggle-chat-window",e),()=>window.removeEventListener("rcb-toggle-chat-window",e)}),f(t,()=>({addMessage:e=>{a&&a.injectMessage&&a.injectMessage(e)},openChat:()=>{!n&&A&&A.toggleChatWindow&&A.toggleChatWindow(!0)},closeChat:()=>{!n&&A&&A.toggleChatWindow&&A.toggleChatWindow(!1)},toggleChat:()=>{!n&&A&&A.toggleChatWindow&&A.toggleChatWindow()},setBotEnabled:e=>{i&&i(e)}}),[a,A,n,i]),null});mp.displayName="BotController";const vp=r(null),yp=e=>{let{trackEvent:n,children:r}=e;const o=l(n);return o.current=n,t.createElement(vp.Provider,{value:{trackEvent:e=>o.current(e)}},r)},wp=()=>{const e=o(vp);return e||{trackEvent:()=>{}}},bp=e=>{let{loginUrl:n,className:r="",style:o,isHeaderButton:i=!1}=e;const{trackEvent:l}=wp(),a=i?{display:"inline-block",padding:"6px 12px",backgroundColor:"transparent",border:"1px solid #ccc",color:"white",textDecoration:"none",borderRadius:"4px",fontWeight:"normal",textAlign:"center",margin:"8px",fontSize:"12px",opacity:.8,transition:"all 0.2s ease"}:{display:"inline-block",padding:"10px 20px",backgroundColor:"white",border:"1px solid var(--primaryColor, #107180)",color:"var(--primaryColor, #107180)",textDecoration:"none",borderRadius:"4px",fontWeight:"bold",textAlign:"center",margin:"18px",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)"};return t.createElement(t.Fragment,null,i&&t.createElement("style",null,"\n .rcb-chat-header-container .qa-bot-header-login-button:hover {\n background-color: #0000001a !important;\n opacity: 1 !important;\n }\n "),t.createElement("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:`qa-bot-login-button ${i?"qa-bot-header-login-button":""} ${r}`,style:Object.assign(Object.assign({},a),o),onClick:()=>{l({type:"chatbot_login_clicked",loginUrl:n})}},"Log In"))},kp=()=>t.createElement("div",{className:"user-login-icon",style:{alignItems:"center",justifyContent:"center",width:"30px",height:"30px",borderRadius:"50%",backgroundColor:"var(--primaryColor, #1a5b6e)",marginRight:"5px",display:"flex"},role:"img","aria-label":"User logged in",title:"User logged in"},t.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},t.createElement("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),t.createElement("circle",{cx:"12",cy:"7",r:"4"}))),xp=[];for(let e=0;e<256;++e)xp.push((e+256).toString(16).slice(1));let Ep;const Pp=new Uint8Array(16);var Cp={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Sp(e,t,n){if(Cp.randomUUID&&!e)return Cp.randomUUID();const r=(e=e||{}).random??e.rng?.()??function(){if(!Ep){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ep=crypto.getRandomValues.bind(crypto)}return Ep(Pp)}();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(e,t=0){return(xp[e[t+0]]+xp[e[t+1]]+xp[e[t+2]]+xp[e[t+3]]+"-"+xp[e[t+4]]+xp[e[t+5]]+"-"+xp[e[t+6]]+xp[e[t+7]]+"-"+xp[e[t+8]]+xp[e[t+9]]+"-"+xp[e[t+10]]+xp[e[t+11]]+xp[e[t+12]]+xp[e[t+13]]+xp[e[t+14]]+xp[e[t+15]]).toLowerCase()}(r)}function Dp(){return"undefined"!=typeof localStorage&&"true"===localStorage.getItem("QA_BOT_DEBUG")}const Bp="background: #1a5b6e; color: white; padding: 2px 6px; border-radius: 3px;",Ip="background: #7c3aed; color: white; padding: 2px 6px; border-radius: 3px;",Tp="background: #059669; color: white; padding: 2px 6px; border-radius: 3px;",Qp="background: #f97316; color: white; padding: 2px 6px; border-radius: 3px;",Mp="background: #f59e0b; color: #000; padding: 2px 6px; border-radius: 3px 0 0 3px; font-weight: bold;",Op="background: #fbbf24; color: #000; padding: 2px 6px; border-radius: 0 3px 3px 0;",Lp=()=>{Dp()&&console.log("%c QA Bot Core %c v0.4.0 ",Mp,Op)},Np=function(e){if(Dp()){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];console.log(`%c[Session]%c ${e}`,Bp,"",...n)}},Rp=function(e){if(Dp()){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];console.log(`%c[History]%c ${e}`,Ip,"",...n)}},Hp=(e,t)=>{Dp()&&console.log(`%c[Message]%c ${e}`,Tp,"",t)},Fp=function(e){if(Dp()){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];console.log(`%c[Turnstile]%c ${e}`,Qp,"",...n)}},zp=function(){console.warn(...arguments)},jp=function(){console.error(...arguments)},Up="qa_bot_session_messages",_p=()=>`qa_bot_session_${Sp()}`,qp=()=>{try{const e=localStorage.getItem(Up);return e?JSON.parse(e):{}}catch(e){return{}}},Vp=(e,t,n,r,o)=>{const i=qp();!i[e]&&(i[e]={messages:[],startedAt:(new Date).toISOString(),preview:""},Rp("NEW session created",{sessionId:e.slice(-12)}));if(i[e].messages.some(e=>e.id===t))return void Rp("DUPLICATE message skipped",{sessionId:e.slice(-12),messageId:t.slice(-8),sender:r});const l={id:t,content:n,sender:r,type:o,timestamp:Date.now()};i[e].messages.push(l),Rp("MESSAGE added",{sessionId:e.slice(-12),messageId:t.slice(-8),sender:r,totalInSession:i[e].messages.length});const a=i[e].messages,s=a.find(e=>{var t;return"bot"===e.sender.toLowerCase()&&(null===(t=e.content)||void 0===t?void 0:t.trim())&&e.content.length>=100});if(s){const t=s.content;i[e].preview=t.slice(0,50)+(t.length>50?"...":"")}else{const t=a.find(e=>{var t;return"user"===e.sender.toLowerCase()&&(null===(t=e.content)||void 0===t?void 0:t.trim())});if(t&&!i[e].preview){const n=t.content;i[e].preview=n.slice(0,50)+(n.length>50?"...":"")}}(e=>{var t;const n=()=>Object.values(e).reduce((e,t)=>e+t.messages.length,0);for(;n()>100&&Object.keys(e).length>1;){const n=null===(t=Object.entries(e).sort((e,t)=>{let[,n]=e,[,r]=t;return new Date(n.startedAt).getTime()-new Date(r.startedAt).getTime()})[0])||void 0===t?void 0:t[0];if(!n)break;delete e[n]}localStorage.setItem(Up,JSON.stringify(e))})(i),Rp("STORAGE state",{ourSessions:Object.keys(i).length,ourTotalMessages:Object.values(i).reduce((e,t)=>e+t.messages.length,0)})},Gp=e=>{var t,n;return null!==(n=null===(t=qp()[e])||void 0===t?void 0:t.messages.length)&&void 0!==n?n:0},Wp=e=>{const t=qp()[e];return(null==t?void 0:t.startedAt)?Date.now()-new Date(t.startedAt).getTime():0},Yp=r(void 0),Kp=e=>{let{children:n,getSessionId:r,setSessionId:o,resetSession:i,clearResettingFlag:l}=e;return t.createElement(Yp.Provider,{value:{getSessionId:r,setSessionId:o,resetSession:i,clearResettingFlag:l}},n)},Xp=()=>{const e=o(Yp);if(!e)throw new Error("useSession must be used within a SessionProvider");return e},Jp=()=>{const[e,n]=a(!1),[r,o]=a([]),[i,A]=a(null),[c,u]=a(0),d=l(null),f=l(null),{replaceMessages:p}=en(),{toggleTextAreaDisabled:h}=rn(),{setSessionId:g,getSessionId:m}=Xp();s(()=>{var t,r;const o=e=>{d.current&&!d.current.contains(e.target)&&f.current&&!f.current.contains(e.target)&&n(!1)},i=null!==(r=null===(t=d.current)||void 0===t?void 0:t.getRootNode())&&void 0!==r?r:document;return e&&i.addEventListener("mousedown",o),()=>{i.removeEventListener("mousedown",o)}},[e]);const v=e=>{var t;const r=m();if(Rp("RESTORE requested",{targetSession:e.slice(-12),currentSession:null==r?void 0:r.slice(-12)}),e===r)return Rp("RESTORE skipped - already on this session"),void n(!1);const o=(e=>{var t;return(null===(t=qp()[e])||void 0===t?void 0:t.messages)||[]})(e).filter(e=>{var t;return null===(t=e.content)||void 0===t?void 0:t.trim()});Rp("Stored messages from our localStorage",{count:o.length,ids:o.map(e=>e.id.slice(-8))});const i=o.map(e=>({id:e.id,content:e.content,sender:e.sender.toUpperCase(),type:e.type||"string",timestamp:new Date(e.timestamp).toISOString()}));g(e),Rp("Session ID updated",{newSession:e.slice(-12)}),p(i),Rp("replaceMessages called",{count:i.length}),(e=>{setTimeout(()=>{const t=(e||document).querySelector(".rcb-chat-body-container");t&&t.querySelectorAll(".rcb-bot-message").forEach(e=>{var t;let n=e.innerHTML,r=!1;n.includes("](")&&(n=n.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>'),r=!0),n.includes("&lt;a href=")&&(n=n.replace(/&lt;a\s+href=["']([^"']+)["'][^&]*&gt;([^&]+)&lt;\/a&gt;/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),r=!0),(n.includes("&lt;a ")||(null===(t=e.textContent)||void 0===t?void 0:t.includes("<a href=")))&&(e.textContent||"").includes("<a href=")&&(n=n.replace(/&lt;a\s+href="([^"]+)"[^&]*&gt;([^&]+)&lt;\/a&gt;/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),r=!0),r&&(e.innerHTML=n)})},50)})(null===(t=f.current)||void 0===t?void 0:t.getRootNode()),h(!1),Rp("Chat input enabled after restore"),n(!1)};return t.createElement("div",{style:{position:"relative"}},t.createElement("button",{ref:f,className:"history-button",onClick:()=>{if(!e&&(o((()=>{const e=qp();return Object.entries(e).map(e=>{let[t,n]=e;return Object.assign({sessionId:t},n)}).sort((e,t)=>new Date(t.startedAt).getTime()-new Date(e.startedAt).getTime())})()),f.current)){const e=f.current.closest(".rcb-chat-window");if(e){const t=e.getBoundingClientRect(),n=f.current.getBoundingClientRect();A(t.width+3),u(t.right-n.right-18+4)}}n(!e)},style:{alignItems:"center",justifyContent:"center",width:"30px",height:"30px",borderRadius:"50%",backgroundColor:"var(--primaryColor, #1a5b6e)",marginRight:"18px",display:"flex",border:"none",cursor:"pointer",padding:0},"aria-label":"View chat history",title:"View chat history","aria-expanded":e,"aria-haspopup":"menu"},t.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},t.createElement("circle",{cx:"12",cy:"12",r:"10"}),t.createElement("polyline",{points:"12 6 12 12 16 14"}))),e&&t.createElement("div",{ref:d,role:"menu",style:{position:"absolute",right:c?`-${c}px`:"-18px",top:"100%",marginTop:"8px",width:i?`${i}px`:"550px",backgroundColor:"white",borderRadius:0,borderBottom:"3px solid var(--primaryColor, #1a5b6e)",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",maxHeight:"250px",overflowY:"auto",zIndex:1e3}},0===r.length?t.createElement("div",{style:{padding:"12px 16px",color:"#666",fontSize:"14px",textAlign:"center"}},"No chat history"):r.map(e=>t.createElement("button",{key:e.sessionId,role:"menuitem",onClick:()=>v(e.sessionId),style:{width:"100%",padding:"10px 14px",border:"none",backgroundColor:"transparent",cursor:"pointer",textAlign:"left",display:"flex",flexDirection:"column",gap:"2px",borderBottom:"1px solid #eee"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#f5f5f5"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent"}},t.createElement("span",{style:{fontSize:"14px",color:"#333",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},e.preview||"New conversation"),t.createElement("span",{style:{fontSize:"12px",color:"#888"}},(e=>{const t=new Date(e),n=(new Date).getTime()-t.getTime(),r=Math.floor(n/864e5);return 0===r?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):1===r?"Yesterday":r<7?t.toLocaleDateString([],{weekday:"short"}):t.toLocaleDateString([],{month:"short",day:"numeric"})})(e.startedAt))))))},Zp=e=>{var{width:n=24,height:r=24,color:o="currentColor",children:i}=e,l=b(e,["width","height","color","children"]);return t.createElement("svg",w({xmlns:"http://www.w3.org/2000/svg",width:n,height:r,viewBox:"0 0 24 24",fill:"none",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},l),i)},$p=e=>t.createElement(Zp,e,t.createElement("path",{d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})),eh=()=>{const{restartFlow:e}=$t(),{setTextAreaValue:n}=rn(),{getSessionId:r,resetSession:o,clearResettingFlag:i}=Xp(),{trackEvent:l}=wp();return t.createElement("button",{onClick:async()=>{const t=r(),a=t?Gp(t):0;l({type:"chatbot_new_chat",previousMessageCount:a}),o(),await n(""),await e(),setTimeout(()=>{i()},100)},tabIndex:0,"aria-label":"New chat conversation",style:{backgroundColor:"var(--primaryColor, #107180)",border:"none",color:"#ffffff",fontSize:"14px",cursor:"pointer",padding:"8px 12px",borderRadius:"4px",transition:"all 0.2s ease",display:"flex",alignItems:"center",gap:"6px",fontWeight:"500"},onMouseEnter:e=>{e.target.style.backgroundColor="var(--secondaryColor, #0d5f6b)"},onMouseLeave:e=>{e.target.style.backgroundColor="var(--primaryColor, #107180)"}},t.createElement($p,{width:16,height:16}),"New Chat")};function th(e){if("string"==typeof e)return e;if("number"==typeof e)return String(e);if(!e)return"";if(Array.isArray(e))return e.map(th).join("");if("object"==typeof e&&null!==e&&"props"in e){const t=e.props;if(t&&"children"in t)return th(t.children)}return""}const nh=()=>{const{getSessionId:e}=Xp(),t=i(t=>{var n;const r=null===(n=t.data)||void 0===n?void 0:n.message;if(!(null==r?void 0:r.id))return;const o=r.sender,i=r.type||"string";let l;if(l="string"==typeof r.content?r.content:th(r.content),Hp("TRACKED",{id:r.id,sender:o,content:l.substring(0,50)+(l.length>50?"...":"")}),l.includes("rcb-options-container"))return;if(!l.trim())return;const a=e();Vp(a,r.id,l,o,i)},[e]);return s(()=>(window.addEventListener("rcb-pre-inject-message",t),window.addEventListener("rcb-stop-stream-message",t),()=>{window.removeEventListener("rcb-pre-inject-message",t),window.removeEventListener("rcb-stop-stream-message",t)}),[t]),null},rh=()=>(s(()=>{const e=e=>{if(!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Enter"," ","Home","End"].includes(e.key))return;const n=document.activeElement;if(n&&("INPUT"===n.tagName||"TEXTAREA"===n.tagName||"true"===n.contentEditable||n.classList.contains("rcb-chat-input-textarea")))return;const r=document.querySelector(".rcb-chat-window");if(!r)return;const o=Array.from(r.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(e=>null!==e.offsetParent);if(o.length>0){const t=o[o.length-1].querySelector(".rcb-checkbox-container");if(t&&null!==t.offsetParent){const n=Array.from(t.querySelectorAll(".rcb-checkbox-row-container")),r=t.querySelector(".rcb-checkbox-next-button");if(n.length>0){const t=[...n];return r&&t.push(r),void((e,t)=>{e.preventDefault();let n=-1;for(let e=0;e<t.length;e++)if(t[e]===document.activeElement||t[e].contains(document.activeElement)){n=e;break}-1===n&&(n=0);let r=n;switch(e.key){case"ArrowDown":case"ArrowRight":r=n<t.length-1?n+1:0;break;case"ArrowUp":case"ArrowLeft":r=n>0?n-1:t.length-1;break;case"Home":r=0;break;case"End":r=t.length-1;break;case"Enter":case" ":{const e=t[n],r=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});return void e.dispatchEvent(r)}default:return}t[r].focus(),t[r].setAttribute("tabindex","0"),t[r].classList.add("keyboard-focused"),t.forEach((e,t)=>{t!==r&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))})})(e,t)}}}let i=[];if(o.length>0){const e=o[o.length-1],t=Array.from(e.querySelectorAll(".rcb-options-container")).filter(e=>null!==e.offsetParent);if(t.length>0){const e=t[t.length-1];i=Array.from(e.querySelectorAll(".rcb-options"))}}if(0===i.length)return;const l=i.findIndex(e=>e===document.activeElement);switch(e.key){case"ArrowDown":case"ArrowRight":{let t;e.preventDefault(),t=l<i.length-1?l+1:0,i[t].setAttribute("tabindex","0"),i.forEach((e,n)=>{n!==t&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))}),i[t].classList.add("keyboard-focused"),i[t].focus();break}case"ArrowUp":case"ArrowLeft":{let t;e.preventDefault(),t=l>0?l-1:i.length-1,i[t].setAttribute("tabindex","0"),i.forEach((e,n)=>{n!==t&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))}),i[t].classList.add("keyboard-focused"),i[t].focus();break}case"Enter":case" ":if(e.preventDefault(),document.activeElement&&i.includes(document.activeElement)){const e=document.activeElement;if(e.classList.contains("rcb-checkbox-row-container")||e.closest(".rcb-checkbox-row-container")){const n=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(n);const r=e.querySelector(".rcb-checkbox-label"),o=r?r.textContent:e.textContent||"checkbox",i=e.querySelector(".rcb-checkbox-mark"),l=i&&i.style.backgroundColor?"checked":"unchecked";t(`${o} ${l}`)}else{const n=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(n);const r=e.textContent||e.innerText;t(`Selected: ${r}`)}}break;case"Home":e.preventDefault(),i.length>0&&(i[0].setAttribute("tabindex","0"),i.forEach((e,t)=>{0!==t&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))}),i[0].classList.add("keyboard-focused"),i[0].focus());break;case"End":if(e.preventDefault(),i.length>0){const e=i.length-1;i[e].setAttribute("tabindex","0"),i.forEach((t,n)=>{n!==e&&(t.setAttribute("tabindex","-1"),t.classList.remove("keyboard-focused"))}),i[e].classList.add("keyboard-focused"),i[e].focus()}}},t=e=>{const t=document.createElement("div");t.setAttribute("aria-live","assertive"),t.setAttribute("aria-atomic","true"),t.className="sr-only",t.textContent=e,document.body.appendChild(t),setTimeout(()=>{document.body.contains(t)&&document.body.removeChild(t)},1e3)},n=(e=null)=>{let n=e;if(n||(n=document.querySelector(".rcb-chat-window"),n||(n=document.querySelector('[class*="rcb-chat"]')),n||(n=document.querySelector(".qa-bot"))),!n)return;const r=null!==n.closest(".embedded-qa-bot"),o=Array.from(n.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(e=>null!==e.offsetParent);if(0===o.length)return;const i=o[o.length-1],l=Array.from(i.querySelectorAll(".rcb-options-container")).filter(e=>null!==e.offsetParent);let a=[];if(l.length>0){const e=l[l.length-1];a=Array.from(e.querySelectorAll(".rcb-options"))}if(0===a.length){let e=i.querySelector(".rcb-checkbox-container");if(!e&&n&&(e=n.querySelector(".rcb-checkbox-container")),e&&null!==e.offsetParent){const t=Array.from(e.querySelectorAll(".rcb-checkbox-row-container")).filter(e=>null!==e.offsetParent&&"none"!==e.style.display);if(t.length>0){const n=e.querySelector(".rcb-checkbox-next-button"),o=[...t];if(n&&null!==n.offsetParent&&o.push(n),o.forEach((e,t)=>{e.setAttribute("tabindex",0===t?"0":"-1"),0===t?e.classList.add("keyboard-focused"):e.classList.remove("keyboard-focused")}),t.length>1){e.querySelectorAll(".keyboard-nav-hint").forEach(e=>e.remove());const t=document.createElement("div");t.className="keyboard-nav-hint",t.textContent="Use arrow keys ↕ to navigate, Enter to select/deselect, or click any option",t.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",e.insertBefore(t,e.firstChild)}return void setTimeout(()=>{o[0]&&null!==o[0].offsetParent&&!r&&o[0].focus()},150)}}}if(a.length>0){if(a.forEach((e,t)=>{const n=0===t?"0":"-1";e.setAttribute("tabindex",n),e.setAttribute("role","option"),e.setAttribute("aria-posinset",t+1),e.setAttribute("aria-setsize",a.length),0===t?e.classList.add("keyboard-focused"):e.classList.remove("keyboard-focused")}),a.length>1){const e=l.length>0?l[l.length-1]:null;if(e){e.querySelectorAll(".keyboard-nav-hint").forEach(e=>e.remove());const t=document.createElement("div");t.className="keyboard-nav-hint",t.textContent="Use arrow keys ↕ to navigate, Enter to select, or click any option",t.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",e.insertBefore(t,e.firstChild)}}else{const e=l.length>0?l[l.length-1]:null;if(e){e.querySelectorAll(".keyboard-nav-hint").forEach(e=>e.remove())}}setTimeout(()=>{a[0]&&null!==a[0].offsetParent&&!r&&(a[0].focus(),a.length>1&&t(`${a.length} options available. Use arrow keys to navigate.`))},200)}},r=new MutationObserver(e=>{e.forEach(e=>{if("childList"===e.type){const t=Array.from(e.addedNodes),r=t.some(e=>e.nodeType===Node.ELEMENT_NODE&&(e.classList?.contains("rcb-options-container")||e.classList?.contains("rcb-options")||e.querySelector?.(".rcb-options-container")||e.querySelector?.(".rcb-options"))),o=t.some(e=>e.nodeType===Node.ELEMENT_NODE&&(e.classList?.contains("rcb-checkbox-container")||e.querySelector?.(".rcb-checkbox-container")));if(r||o){let t=e.target;for(;t&&!t.classList?.contains("qa-bot")&&!t.classList?.contains("rcb-chat-window");)t=t.parentElement;(t||document).querySelectorAll(".rcb-options[tabindex], .rcb-checkbox-row-container[tabindex], .rcb-checkbox-next-button[tabindex]").forEach(e=>{e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused")}),setTimeout(()=>n(t),100)}}})});r.observe(document.body,{childList:!0,subtree:!0}),document.addEventListener("keydown",e),n();const o=setInterval(()=>{document.querySelectorAll(".qa-bot").forEach(e=>{const t=e.querySelectorAll(".rcb-options-container .rcb-options").length>0,r=e.querySelectorAll(".rcb-checkbox-row-container").length>0;if(t){const t=e.querySelectorAll(".rcb-options[tabindex]").length;e.querySelectorAll(".rcb-options").length>t&&n(e)}if(r){const t=e.querySelectorAll(".rcb-checkbox-row-container[tabindex]").length;e.querySelectorAll(".rcb-checkbox-row-container").length>t&&n(e)}})},1e3);return()=>{document.removeEventListener("keydown",e),r.disconnect(),clearInterval(o)}},[]),null);let oh=!1,ih=null;function lh(){return oh?Promise.resolve():ih||(ih=new Promise((e,t)=>{const n=document.createElement("script");n.src="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit",n.async=!0,n.onload=()=>{oh=!0,Fp("Script loaded"),e()},n.onerror=()=>{ih=null,t(new Error("Failed to load Turnstile script"))},document.head.appendChild(n)}),ih)}const ah=e=>{if(!e||"string"!=typeof e)return e;let t=e.replace(/\[(https?:\/\/[^\s]+?)\]/gi,"[$1]($1)");return t=t.replace(/(?<!\]\(|href=["']|\[)https?:\/\/[^\s[\]()]+/gi,e=>{let t=e,n="";const r=t.match(/([.,;:!?]+)$/);return r&&(n=r[1],t=t.slice(0,-n.length)),`[${t}](${t})${n}`}),t},sh=e=>{let{siteKey:n,onVerify:r,onError:o,loginUrl:A}=e;const c=l(null),u=l(null),d=l(!1),f=l(null),p=l(null),[h,g]=a(!1),[m,v]=a(0),w=l("widget_error"),b=l(null),k=A&&"/login"!==A,x=i(()=>{const e=window.turnstile;if(f.current&&(null==e?void 0:e.remove)){try{e.remove(f.current)}catch(e){}f.current=null}},[]),E=i(()=>{var e;x(),h?null==o||o(w.current,null!==(e=b.current)&&void 0!==e?e:void 0):null==o||o("user_cancelled")},[o,x,h]);s(()=>()=>{x()},[x]),s(()=>{var e;return p.current=document.activeElement,null===(e=u.current)||void 0===e||e.focus(),()=>{p.current&&"function"==typeof p.current.focus&&p.current.focus()}},[]),s(()=>{const e=e=>{if("Escape"===e.key)return e.preventDefault(),void E();if("Tab"===e.key&&u.current){const t=u.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(0===t.length)return;const n=t[0],r=t[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),r.focus()):e.shiftKey||document.activeElement!==r||(e.preventDefault(),n.focus())}};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[E]),s(()=>{d.current||!c.current||h||(d.current=!0,lh().then(()=>{const e=window.turnstile;if(!e||!c.current)return jp("Turnstile API not available after script load"),w.current="api_unavailable",void g(!0);f.current=e.render(c.current,{sitekey:n,callback:e=>{Fp("Visible challenge completed"),r(e)},"error-callback":e=>(jp("Turnstile challenge failed:",e),b.current=e,w.current="widget_error",x(),g(!0),!0),"expired-callback":()=>{jp("Turnstile token expired"),w.current="token_expired",x(),g(!0)}})}).catch(e=>{jp("Failed to load Turnstile script:",e),w.current="script_load_failed",g(!0)}))},[n,r,h,x]);const P=t.createElement(t.Fragment,null,t.createElement("div",{"aria-hidden":"true",style:{position:"fixed",inset:0,background:"rgba(0, 0, 0, 0.5)",zIndex:999998}}),t.createElement("div",{ref:u,role:"dialog","aria-modal":"true","aria-labelledby":"qa-bot-turnstile-label",tabIndex:-1,style:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:999999,background:"white",padding:"24px",borderRadius:"8px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.3)",maxWidth:"90vw",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'}},t.createElement("span",{id:"qa-bot-turnstile-label",className:"sr-only",style:{position:"absolute",width:"1px",height:"1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap"}},"Verification challenge"),h?t.createElement("div",{style:{fontSize:"14px",lineHeight:"1.5",color:"#333"}},0===m?t.createElement("p",{style:{margin:"0 0 16px 0"}},"Verification failed. You can try again",k&&t.createElement(t.Fragment,null,", or"," ",t.createElement("a",{href:A,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--primaryColor, #107180)",fontWeight:"bold"}},"log in")," ","to skip verification"),"."):t.createElement(t.Fragment,null,t.createElement("p",{style:{margin:"0 0 8px 0"}},"Verification is still not working. This can be caused by browser extensions (ad blockers, privacy tools) or VPN connections."),t.createElement("p",{style:{margin:"0 0 16px 0"}},"Try disabling extensions, using a private/incognito window,",k&&t.createElement(t.Fragment,null," ",t.createElement("a",{href:A,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--primaryColor, #107180)",fontWeight:"bold"}},"logging in"),",")," ","or using a different browser.")),t.createElement("div",{style:{display:"flex",gap:"8px"}},t.createElement("button",{type:"button",onClick:()=>{x(),d.current=!1,v(e=>e+1),g(!1)},style:{padding:"8px 16px",background:"var(--primaryColor, #107180)",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Try again"),t.createElement("button",{type:"button",onClick:E,style:{padding:"8px 16px",background:"#f0f0f0",color:"#333",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Close"))):t.createElement(t.Fragment,null,t.createElement("div",{ref:c,style:{borderRadius:"8px",overflow:"hidden"}}),t.createElement("button",{type:"button",onClick:E,style:{marginTop:"16px",padding:"8px 16px",background:"#f0f0f0",color:"#333",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Cancel"))));return y(P,document.body)};function Ah(e){const{confidence:t,tools_used:n,metadata:r}=e;if(!(t||n&&0!==n.length))return"";const o=[];return t&&o.push(`• Confidence: ${t}`),n&&n.length>0&&o.push(`• Tools used: ${n.join(", ")}`),(null==r?void 0:r.agent)&&o.push(`• Agent: ${r.agent}`),`---\n${o.join("\n")}`}function ch(e){let{getState:n,onResubmit:r,trackEvent:o,loginUrl:i}=e;var l,a;const[s,A]=t.useState(null),[c,u]=t.useState(0),d=n(),f=null!==(l=import.meta.env)&&void 0!==l?l:{},p="true"===f.VITE_FORCE_TURNSTILE_WIDGET,h=null!==(a=d.siteKey)&&void 0!==a?a:p?f.VITE_TURNSTILE_SITE_KEY:null;return h&&(p||s!==h)?t.createElement(sh,{key:c,siteKey:h,loginUrl:i,onVerify:async e=>{const t=h;d.token=e,null==o||o({type:"chatbot_turnstile_completed"});"needs_another_challenge"===await r(e)?u(e=>e+1):A(t)},onError:(e,t)=>{var n;const r=null===(n=d.pendingQuery)||void 0===n?void 0:n.queryId,i=h;d.token=null,d.pendingQuery=null,d.needsChallenge=!1,d.siteKey=null,A(i),null==o||o({type:"chatbot_turnstile_error",queryId:r,failureReason:e,cloudflareErrorCode:t})}}):null}const uh="#1a5b6e",dh="#107180",fh="Arial, sans-serif",ph="Q&A Bot",hh="/chat-icon.svg",gh="Type your question here...",mh="Select an option to continue",vh=!1,yh="Ask me a question!",wh="/login",bh={general:{showHeader:!0,showFooter:!0},tooltip:{mode:"CLOSE"},chatInput:{disabled:!1,characterLimit:5e3,showCharacterCount:!1,allowNewline:!0,blockSpam:!1},chatWindow:{defaultOpen:!1,showScrollbar:!1},botBubble:{simulateStream:!0,streamSpeed:10,showAvatar:!1},userBubble:{showAvatar:!1},notification:{disabled:!0,showCount:!1},audio:{disabled:!0},emoji:{disabled:!0},fileAttachment:{disabled:!0}},kh=n((e,n)=>{var r,o,c;const{apiKey:u,qaEndpoint:d,ratingEndpoint:f,agentRatingEndpoint:p,welcomeMessage:h,open:g,onOpenChange:m,isLoggedIn:v,allowAnonAccess:y=!1,actingUser:w,primaryColor:b,secondaryColor:x,botName:E,logo:P,placeholder:C,errorMessage:S,embedded:D,footerText:B,footerLink:I,tooltipText:T,loginUrl:Q,turnstileSiteKey:M,backendId:O,resourceContext:L,customFlow:N,onAnalyticsEvent:R}=e,H=l(`bot_${Math.random().toString(36).substr(2,9)}`);s(()=>{Lp()},[]);const F=l(null);null===F.current&&(F.current=_p(),Np("CREATED",F.current));const z=l(!1),j=l({getSessionId:()=>F.current,isResetting:()=>z.current}),U=l(null),_=function(e,t){const[n,r]=a(null),[o,A]=a("idle"),c=l(null),u=l(null),d=l(!0),f=i(()=>{const e=window.turnstile;if(u.current&&(null==e?void 0:e.remove)){try{e.remove(u.current)}catch(e){}u.current=null}c.current&&(c.current.remove(),c.current=null)},[]);return s(()=>{if(d.current=!0,!e)return A("idle"),void r(null);A("loading");const n=document.createElement("div");return n.style.position="fixed",n.style.left="-9999px",n.style.top="-9999px",n.style.width="0",n.style.height="0",n.style.overflow="hidden",n.setAttribute("aria-hidden","true"),document.body.appendChild(n),c.current=n,lh().then(()=>{if(!d.current)return;const n=window.turnstile;if(!n||!c.current)return jp("Turnstile API not available for silent verification"),A("failed"),void(null==t||t({type:"chatbot_turnstile_silent_failed",failureReason:"api_unavailable"}));const o=n.render(c.current,{sitekey:e,execution:"render","refresh-expired":"auto",callback:e=>{d.current&&(Fp("Silent verification succeeded"),r(e),A("verified"))},"error-callback":e=>!d.current||(jp("Turnstile silent verification failed:",e),r(null),A("failed"),null==t||t({type:"chatbot_turnstile_silent_failed",failureReason:"widget_error",cloudflareErrorCode:e}),!0),"expired-callback":()=>{d.current&&(Fp("Token expired, awaiting refresh"),r(null),A("loading"))}});u.current=o}).catch(e=>{d.current&&(jp("Failed to load Turnstile script for silent verification:",e),A("failed"),null==t||t({type:"chatbot_turnstile_silent_failed",failureReason:"script_load_failed"}))}),()=>{d.current=!1,f()}},[e,f]),{token:n,status:o,reset:i(()=>{const e=window.turnstile;u.current&&(null==e?void 0:e.reset)&&(r(null),A("loading"),e.reset(u.current),Fp("Token consumed, resetting widget for fresh token"))},[])}}(M,e=>{var t;null===(t=U.current)||void 0===t||t.call(U,e)}),q=l(null);q.current=_.token;const[V,G]=a(v);s(()=>{G(v)},[v]);const W=void 0!==D?D:vh,Y=i(e=>{var t;R&&R(Object.assign(Object.assign({},e),{timestamp:Date.now(),sessionId:null!==(t=F.current)&&void 0!==t?t:void 0,pageUrl:"undefined"!=typeof window?window.location.href:void 0,isEmbedded:W}))},[R,W]);s(()=>{U.current=e=>Y(e)},[Y]);const K=A(()=>{const e=Object.assign({},bh);e.general=Object.assign(Object.assign({},e.general),{primaryColor:b||uh,secondaryColor:x||dh,fontFamily:fh,embedded:W});const n=!1===V?[t.createElement(Jp,{key:"history-button"}),t.createElement(bp,{key:"login-button",loginUrl:Q||wh,isHeaderButton:!0})]:[t.createElement(Jp,{key:"history-button"}),t.createElement(kp,{key:"user-icon"})];e.header={title:t.createElement("span",{style:{fontSize:14,fontWeight:500}},E||ph),showAvatar:!0,avatar:P||hh,buttons:[...n,k.CLOSE_CHAT_BUTTON]},e.chatInput=Object.assign(Object.assign({},e.chatInput),{disabled:!1,enabledPlaceholderText:C||gh,disabledPlaceholderText:S||mh}),e.tooltip=Object.assign(Object.assign({},e.tooltip),{text:T||yh});const r=B?I?t.createElement("a",{href:I,target:"_blank",rel:"noopener noreferrer",key:"footer-link"},B):t.createElement("span",{key:"footer-text"},B):null;return e.footer={text:null!=r?r:void 0,buttons:[t.createElement(eh,{key:"new-chat-button"})]},e.chatWindow=Object.assign(Object.assign({},e.chatWindow),{defaultOpen:!!W}),e.event={rcbPreInjectMessage:!0,rcbPostInjectMessage:!0,rcbStopStreamMessage:!0,rcbUserSubmitText:!0,rcbChangePath:!0,rcbToggleChatWindow:!0},e},[b,x,E,P,C,S,W,T,V,Q,B,I]),X=l(null),J=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=A(()=>{const n=(t,n)=>{if(e.current){const n=getComputedStyle(e.current).getPropertyValue(t);if(n&&""!==n.trim())return n.trim();if(e.current.parentElement){const n=getComputedStyle(e.current.parentElement).getPropertyValue(t);if(n&&""!==n.trim())return n.trim()}}return n};return{primaryColor:n("--primaryColor",t.primaryColor),secondaryColor:n("--secondaryColor",t.secondaryColor),fontFamily:n("--fontFamily",t.fontFamily)}},[e,t]);return n}(X,K.general);((e,t)=>{s(()=>{t.current&&(e?t.current.classList.add("bot-logged-in"):t.current.classList.remove("bot-logged-in"))},[e,t])})(!1!==V,X),(e=>{let{settings:n,themeColors:r}=e;s(()=>{r&&(Object.entries(r).forEach(e=>{let[t,n]=e;n&&document.documentElement.style.setProperty(`--${t}`,n)}),r.primaryColor&&document.documentElement.style.setProperty("--rcb-header-background",r.primaryColor),r.secondaryColor&&document.documentElement.style.setProperty("--rcb-header-background-hover",r.secondaryColor))},[r]),s(()=>{var e,r;(null===(e=n.header)||void 0===e?void 0:e.title)&&"string"==typeof n.header.title&&(n.header.title=t.createElement("div",{key:"header-title"},t.createElement("h1",{className:"sr-only"},n.header.title),t.createElement("span",{"aria-hidden":"true"},n.header.title))),n.device={desktopEnabled:!0,mobileEnabled:!0,applyMobileOptimizations:!1},n.chatHistory={disabled:!0},n.chatButton=Object.assign(Object.assign({},n.chatButton),{icon:null===(r=n.header)||void 0===r?void 0:r.avatar}),n.event=Object.assign(Object.assign({},n.event),{rcbToggleChatWindow:!0})},[n])})({settings:K,themeColors:J});const Z=A(()=>{const e=(e=>{let{endpoint:n,ratingEndpoint:r,agentRatingEndpoint:o,apiKey:i,sessionId:l,isResetting:a=()=>!1,isLoggedIn:s,allowAnonAccess:A=!1,loginUrl:c="/login",trackEvent:u,getTurnstileToken:d,resetTurnstileToken:f,backendId:p,resourceContext:h}=e;if(!1===s&&!A)return null==u||u({type:"chatbot_login_prompt_shown"}),{qa_loop:{message:"To ask questions, please log in first.",component:t.createElement(bp,{loginUrl:c}),chatDisabled:!0,path:"qa_loop"}};let g=null,m=null,v=!1;const y={siteKey:null,token:null,pendingQuery:null,needsChallenge:!1};let w=null;if(!n)throw new Error("Q&A endpoint is required");return{qa_loop:{message:async e=>{var t;w=e.injectMessage.bind(e);const{userInput:s}=e;if((!a||!a())&&s&&""!==s.trim()){if("👍 Helpful"===s||"👎 Not helpful"===s){if(g){const e="👍 Helpful"===s,t="agent"===m?o:r;if(t)try{const n={"Content-Type":"application/json"};i&&(n["X-API-KEY"]=i);const r=l();r&&(n["X-Session-ID"]=r,n["X-Query-ID"]=g);const o="agent"===m?{query_id:g,rating:e?"helpful":"not_helpful",session_id:r}:{sessionId:r,queryId:g,rating:e?1:0};await fetch(t,{method:"POST",headers:n,credentials:"include",body:JSON.stringify(o)}),null==u||u({type:"chatbot_rating_sent",queryId:g,rating:e?"helpful":"not_helpful"})}catch(e){jp("Error sending feedback:",e)}}return"Thanks for the feedback!"}try{const r=Sp();g=r,null==u||u({type:"chatbot_question_sent",queryId:r,questionLength:s.length});const o={"Content-Type":"application/json"};i&&(o["X-API-KEY"]=i);const a=l();a&&(o["X-Session-ID"]=a,o["X-Query-ID"]=r),o["X-Origin"]=h||"access";const A={query:s,question_id:r};a&&(A.session_id=a),p&&(A._backend=p),h&&(A.rp_name=h,A.resource_context=h);const c=null==d?void 0:d();c&&(A.turnstile_token=c),Np("SENT to API",{session_id:a,question_id:r});const w=Date.now(),b=await fetch(n,{method:"POST",headers:o,credentials:"include",body:JSON.stringify(A)});if(!b.ok)throw new Error(`API returned ${b.status}`);if((b.headers.get("content-type")||"").includes("text/event-stream")){null==f||f();const n=null===(t=b.body)||void 0===t?void 0:t.getReader();if(!n)throw new Error("Response body is not readable");const o=new TextDecoder;let i="",l="",a=!1;try{for(;;){const{done:t,value:r}=await n.read();if(t)break;i+=o.decode(r,{stream:!0});let s=i.indexOf("\n\n");for(;-1!==s;){const t=i.slice(0,s);i=i.slice(s+2);let n,r="",o="";for(const e of t.split("\n"))e.startsWith("event: ")?r=e.slice(7):e.startsWith("data: ")&&(o=e.slice(6));if(r&&o){try{n=JSON.parse(o)}catch(e){zp("Failed to parse SSE data:",o),s=i.indexOf("\n\n");continue}if("status"===r){const t=n.message||"Processing...";await e.streamMessage(`_${t}_`,"BOT"),a=!0}else if("token"===r){l+=n.content||"";const t=ah(l);await e.streamMessage(t,"BOT")}else if("done"===r){const t=n.metadata||{};if(m=t.rating_target||null,v=!0===t.is_final_response,l)await e.endStreamMessage("BOT");else{const t=n.response||"";if(t){const n=ah(t);await e.streamMessage(n,"BOT"),a=!0}a&&await e.endStreamMessage("BOT")}}else if("error"===r){const t=n.message||"An error occurred";jp("SSE error event:",t),a?(await e.streamMessage(t,"BOT"),await e.endStreamMessage("BOT")):await e.injectMessage(t)}s=i.indexOf("\n\n")}else s=i.indexOf("\n\n")}}a&&await e.endStreamMessage("BOT")}catch(t){if(jp("Error reading SSE stream:",t),!a)throw t;await e.streamMessage("I had trouble completing the response. Please try again.","BOT"),await e.endStreamMessage("BOT")}const s=Date.now()-w;return void(null==u||u({type:"chatbot_answer_received",queryId:r,responseTimeMs:s,success:!0,responseLength:l.length}))}const k=Date.now()-w,x=await b.json();if(x.requires_turnstile)return null==u||u({type:"chatbot_turnstile_shown",queryId:r}),y.siteKey=x.site_key,y.pendingQuery={query:s,sessionId:a,queryId:r},y.needsChallenge=!0,"One moment — verifying your session…";null==f||f();const E=x.response||x.answer||x.text||x.message;if(!E)throw new Error("Invalid response format from API");const P=x.metadata||{};m=P.rating_target||null,v=!0===P.is_final_response;const C=ah(E),S=Dp()?Ah(x):"",D=S?`${C}\n\n${S}`:C;return await e.injectMessage(D),void(null==u||u({type:"chatbot_answer_received",queryId:r,responseTimeMs:k,success:!0,responseLength:E.length,hasMetadata:!!S}))}catch(e){return jp("Error in Q&A flow:",e),null==u||u({type:"chatbot_answer_error",queryId:null!=g?g:void 0,errorType:e instanceof Error?e.message:"unknown"}),"I apologize, but I'm having trouble processing your question. Please try again later."}}},options:e=>a&&a()||"👍 Helpful"===e.userInput||"👎 Not helpful"===e.userInput||y.needsChallenge?[]:v&&m&&("agent"===m?o:r)?["👍 Helpful","👎 Not helpful"]:[],renderMarkdown:["BOT"],chatDisabled:!1,component:t.createElement(ch,{getState:()=>y,onResubmit:async e=>{var t;if(!y.pendingQuery||!w)return jp("Turnstile resubmit called without pending query or injectMessage"),"error";try{const r={"Content-Type":"application/json"};i&&(r["X-API-KEY"]=i),y.pendingQuery.sessionId&&(r["X-Session-ID"]=y.pendingQuery.sessionId,r["X-Query-ID"]=y.pendingQuery.queryId),r["X-Origin"]=h||"access";const o={query:y.pendingQuery.query,question_id:y.pendingQuery.queryId,turnstile_token:e};y.pendingQuery.sessionId&&(o.session_id=y.pendingQuery.sessionId),p&&(o._backend=p),h&&(o.rp_name=h,o.resource_context=h);const l=await fetch(n,{method:"POST",headers:r,credentials:"include",body:JSON.stringify(o)}),a=y.pendingQuery.queryId;if(!l.ok)throw new Error(`API returned ${l.status} after Turnstile`);if((l.headers.get("content-type")||"").includes("text/event-stream")){const e=null===(t=l.body)||void 0===t?void 0:t.getReader();if(!e)throw new Error("Response body is not readable");const n=new TextDecoder;let r="",o="",i={};for(;;){const{done:t,value:l}=await e.read();if(t)break;r+=n.decode(l,{stream:!0});let a=r.indexOf("\n\n");for(;-1!==a;){const e=r.slice(0,a);r=r.slice(a+2);let t="",n="";for(const r of e.split("\n"))r.startsWith("event: ")?t=r.slice(7):r.startsWith("data: ")&&(n=r.slice(6));if(t&&n)try{const e=JSON.parse(n);"token"===t?o+=e.content||"":"done"===t&&(i=e.metadata||{})}catch(e){}a=r.indexOf("\n\n")}}if(y.token=null,y.pendingQuery=null,y.needsChallenge=!1,y.siteKey=null,!o)throw new Error("No content received from stream");m=i.rating_target||null,v=!0===i.is_final_response,g=a;const s=ah(o);return await w(s),null==u||u({type:"chatbot_answer_received",queryId:a,success:!0,responseLength:o.length}),"success"}const s=await l.json();if(s.requires_turnstile)return y.siteKey=s.site_key,y.token=null,await w("Still verifying — please complete the challenge again."),"needs_another_challenge";y.token=null,y.pendingQuery=null,y.needsChallenge=!1,y.siteKey=null;const A=s.response||s.answer||s.text||s.message;if(!A)throw new Error("Invalid response format from API");const c=s.metadata||{};m=c.rating_target||null,v=!0===c.is_final_response,g=a;const d=ah(A),f=Dp()?Ah(s):"",b=f?`${d}\n\n${f}`:d;return await w(b),null==u||u({type:"chatbot_answer_received",queryId:a,success:!0,responseLength:A.length}),"success"}catch(e){return jp("Error resubmitting after Turnstile:",e),y.token=null,y.pendingQuery=null,y.needsChallenge=!1,y.siteKey=null,await(null==w?void 0:w("I had trouble processing your question after verification. Please try again.")),"error"}},trackEvent:u,loginUrl:c}),path:"qa_loop"}}})({endpoint:d,ratingEndpoint:f,agentRatingEndpoint:p,apiKey:u,sessionId:j.current.getSessionId,isResetting:j.current.isResetting,isLoggedIn:V,allowAnonAccess:y,loginUrl:Q||wh,trackEvent:Y,getTurnstileToken:()=>q.current,resetTurnstileToken:()=>_.reset(),backendId:O,resourceContext:L}),n={message:h,renderMarkdown:["BOT"],transition:{duration:0},path:"qa_loop"};return Object.assign(Object.assign({start:n},e),N||{})},[u,d,f,p,h,V,y,Q,N,w,Y,L,O]),$=A(()=>{return[()=>On(t),ha({markdownComponent:gp}),()=>va(e)];var e,t},[]);return s(()=>{const e=()=>{const e=document.querySelector(".rcb-chat-window");if(!e)return;const t=e.querySelector(".rcb-send-button");t&&(t.hasAttribute("tabindex")||t.setAttribute("tabindex","0"),t.hasAttribute("data-keyboard-enabled")||(t.setAttribute("data-keyboard-enabled","true"),t.addEventListener("keydown",e=>{if("Enter"===e.key||" "===e.key){e.preventDefault();const n=t&&Object.keys(t).find(e=>e.startsWith("__reactProps"));if(n){const r=t[n],o=null==r?void 0:r.onMouseDown;if(o&&"function"==typeof o)return void o(e)}const r=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});t.dispatchEvent(r)}})))},t=setInterval(e,1e3);return e(),()=>clearInterval(t)},[]),rh(),s(()=>{const e=X.current;if(!e)return;const t=e=>{var t,n,r;const o=null===(n=(t=e.target).closest)||void 0===n?void 0:n.call(t,"a");o&&o.closest(".rcb-chat-body-container")&&(o.classList.contains("qa-bot-login-button")||o.closest(".rcb-options-container")||Y({type:"chatbot_link_clicked",linkUrl:o.href,linkText:(null===(r=o.textContent)||void 0===r?void 0:r.trim())||""}))};return e.addEventListener("click",t),()=>e.removeEventListener("click",t)},[Y]),s(()=>{if(!W){const e=e=>{const t=e.data.newState;null==m||m(t);const n=F.current;Y(t?{type:"chatbot_open"}:{type:"chatbot_close",messageCount:n?Gp(n):0,durationMs:n?Wp(n):0})};return window.addEventListener("rcb-toggle-chat-window",e),()=>{window.removeEventListener("rcb-toggle-chat-window",e)}}},[W,m,Y]),t.createElement("div",{className:"qa-bot "+((null===(r=K.general)||void 0===r?void 0:r.embedded)?"embedded-qa-bot":""),ref:X,role:"region","aria-label":`${E||ph}${(null===(o=K.general)||void 0===o?void 0:o.embedded)?" - Embedded":""}`},t.createElement(Kp,{getSessionId:()=>F.current,setSessionId:e=>{const t=F.current;F.current=e,Np("RESTORED",`${null==t?void 0:t.slice(-12)} -> ${e.slice(-12)}`)},resetSession:()=>{const e=F.current;z.current=!0,F.current=_p(),Np("RESET",`${null==e?void 0:e.slice(-12)} -> ${F.current.slice(-12)}`)},clearResettingFlag:()=>{z.current=!1}},t.createElement(yp,{trackEvent:Y},t.createElement(Wt,null,t.createElement("div",null,t.createElement(nh,null),t.createElement(mp,{ref:n,embedded:(null===(c=K.general)||void 0===c?void 0:c.embedded)||!1,currentOpen:g||!1,enabled:!1!==V,onSetEnabled:e=>G(!!e&&void 0)}),t.createElement(Jt,{key:`chatbot-${H.current}-${V}`,settings:K,flow:Z,plugins:$}),t.createElement("div",{role:"status","aria-live":"polite","aria-label":"Bot response updates",className:"sr-only",id:"bot-live-region",style:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0}}),t.createElement("div",{id:"chat-input-help",className:"sr-only",style:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0}},"Type your message and press Enter to send. Use arrow keys to navigate through response options."))))))});kh.displayName="QABot";const xh=()=>{const[e,t]=a(!1),n=()=>"undefined"!=typeof navigator&&void 0!==navigator.mediaDevices&&"function"==typeof navigator.mediaDevices.getDisplayMedia;return{captureScreenshot:async()=>{if(!n())throw new Error("Screen capture is not available in this environment");try{t(!0);const e=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser",cursor:"always",width:{ideal:1920},height:{ideal:1080}},audio:!1}),n=document.createElement("video");n.srcObject=e,await new Promise(e=>{n.onloadedmetadata=()=>{n.play(),e()}});const r=document.createElement("canvas");r.width=n.videoWidth,r.height=n.videoHeight;const o=r.getContext("2d");if(!o)throw new Error("Could not get canvas context");o.drawImage(n,0,0,r.width,r.height);const i=await new Promise(e=>r.toBlob(e,"image/png"));if(!i)throw new Error("Could not create image blob");const l=(new Date).toISOString().replace(/[:.]/g,"-"),a=new File([i],`screenshot-${l}.png`,{type:"image/png"});return e.getTracks().forEach(e=>e.stop()),t(!1),a}catch(e){throw jp("Error capturing screenshot:",e),t(!1),e}},isCapturing:e,isScreenCaptureAvailable:n()}},Eh=e=>t.createElement(Zp,e,t.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),t.createElement("polyline",{points:"17 8 12 3 7 8"}),t.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"15"})),Ph=e=>new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{if("string"!=typeof r.result)return void n(new Error(`Failed to read file ${e.name}`));const o=r.result.split(",")[1];t({fileName:e.name,contentType:e.type,size:e.size,fileData:o})},r.onerror=()=>n(new Error(`Failed to read file ${e.name}`)),r.readAsDataURL(e)}),Ch=e=>Promise.all(e.map(Ph)),Sh=function(e){const t=1024*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:10)*1024;return e.size<=t},Dh=e=>e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`,Bh=e=>{let{onFileUpload:n,maxSizeMB:r=10,acceptedTypes:o="image/*,application/pdf,text/*,.doc,.docx",enableScreenshot:i=!1,className:s}=e;const[A,c]=a(!1),[u,d]=a([]),[f,p]=a(null),h=l(null),{captureScreenshot:g,isCapturing:m,isScreenCaptureAvailable:v}=xh(),y=e=>{const t=document.createElement("div");t.setAttribute("aria-live","assertive"),t.setAttribute("aria-atomic","true"),t.className="sr-only",t.textContent=e,document.body.appendChild(t),setTimeout(()=>document.body.removeChild(t),1e3)},w=e=>{if(!e||0===e.length)return void zp("FileUploadComponent: No valid files provided to handleFiles");let t;try{t=Array.from(e)}catch(e){return jp("FileUploadComponent: Error converting files to array:",e),void y("Error processing selected files. Please try again.")}const r=[...u,...t];d(r);const o=t.length,i=t.map(e=>e.name).join(", ");y(`${o} file${o>1?"s":""} selected: ${i}`),setTimeout(()=>{const e=document.querySelector(".rcb-chat-content");e&&(e.scrollTop=e.scrollHeight)},100),n&&n(r)},b=e=>{e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?c(!0):"dragleave"===e.type&&c(!1)},k=()=>{try{h.current&&h.current.click()}catch(e){jp("FileUploadComponent: Error in handleButtonClick:",e),y("Error opening file selection dialog. Please try again.")}},x=()=>{p(null)},E=i&&v;return t.createElement("div",{className:`file-upload-container ${s||""}`,style:{padding:"16px",margin:"8px 0"}},E&&t.createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:"10px"}},t.createElement("button",{onClick:e=>{e.preventDefault(),(async()=>{try{const e=await g();w([e]),y("Screenshot captured successfully")}catch(e){y("Error capturing screenshot. Please try again.")}})()},disabled:m,"aria-describedby":"screenshot-help","aria-label":m?"Taking screenshot, please wait":"Take a screenshot to attach",style:{display:"flex",alignItems:"center",gap:"8px",backgroundColor:"#107180",color:"white",border:"none",borderRadius:"5px",padding:"8px 12px",cursor:m?"not-allowed":"pointer",fontSize:"14px",fontWeight:"500",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"}},t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},t.createElement("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),t.createElement("circle",{cx:"12",cy:"13",r:"4"})),m?"Taking screenshot...":"Take screenshot..."),t.createElement("span",{id:"screenshot-help",className:"sr-only"},"Captures the current screen and adds it as an attachment")),t.createElement("div",{className:"file-upload-dropzone "+(A?"active":""),onDragEnter:b,onDragLeave:b,onDragOver:b,onDrop:e=>{var t;e.preventDefault(),e.stopPropagation(),c(!1);try{(null===(t=e.dataTransfer)||void 0===t?void 0:t.files)&&e.dataTransfer.files.length>0&&w(e.dataTransfer.files)}catch(e){jp("FileUploadComponent: Error in handleDrop:",e),y("Error processing dropped files. Please try again.")}},role:"button",tabIndex:0,"aria-label":"File upload area. Click to select files or drag and drop files here.","aria-describedby":"upload-instructions",onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),k())},style:{padding:"20px",border:"2px dashed #ccc",borderRadius:"8px",backgroundColor:A?"#f0f8ff":"#fafafa",transition:"all 0.3s ease"}},t.createElement("input",{ref:h,type:"file",className:"file-input",onChange:e=>{var t;try{(null===(t=e.target)||void 0===t?void 0:t.files)&&e.target.files.length>0&&w(e.target.files)}catch(e){jp("FileUploadComponent: Error in handleFileSelect:",e),y("Error processing selected files. Please try again.")}},multiple:!0,style:{display:"none"},"aria-label":"Select files to upload",accept:o}),t.createElement("div",{className:"upload-content",onClick:k,style:{cursor:"pointer",flexDirection:"column",alignItems:"center",display:"flex",textAlign:"center",padding:"12px"}},t.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"}},t.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"10px"}},t.createElement(Eh,null),t.createElement("p",{style:{margin:0,fontWeight:"bold"}},"Upload Files")),t.createElement("p",{id:"upload-instructions",style:{margin:0,fontSize:"14px",color:"#666"}},"Drag and drop files here or click to select. (Max ",r,"MB each)")),u.length>0&&t.createElement("div",{className:"selected-files",style:{display:"flex",flexWrap:"wrap",gap:"8px",marginTop:"12px",alignItems:"center"}},t.createElement("span",{style:{fontWeight:400,color:"#888",fontSize:"13px",marginRight:"8px",alignSelf:"center"}},"Selected files:"),u.map((e,r)=>t.createElement("span",{key:r,style:{background:"#fff",color:"#107180",borderRadius:"5px",padding:"4px 12px",fontSize:"14px",marginRight:"4px",marginBottom:"4px",border:"1px solid #ccc",display:"flex",alignItems:"center",gap:"6px",cursor:"pointer"},onClick:t=>{t.stopPropagation(),(e=>{p(e)})(e)}},t.createElement("span",{onClick:e=>{e.stopPropagation(),(e=>{const t=u.filter((t,n)=>n!==e);d(t),n&&n(t)})(r)},style:{cursor:"pointer",color:"#888",fontWeight:"bold",fontSize:"15px",marginRight:"4px",userSelect:"none",lineHeight:1},title:"Remove file","aria-label":`Remove ${e.name}`},"×"),e.name," (",Dh(e.size),")"))))),(()=>{if(!f)return null;const e=f.type.startsWith("image/"),n=f.type.startsWith("text/"),r="application/pdf"===f.type;return t.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.7)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3},onClick:x},t.createElement("div",{style:{backgroundColor:"white",padding:"20px",borderRadius:"8px",maxWidth:"90%",maxHeight:"90%",overflow:"auto",position:"relative"},onClick:e=>e.stopPropagation()},t.createElement("button",{onClick:x,style:{position:"absolute",top:"10px",right:"10px",background:"none",border:"none",fontSize:"24px",cursor:"pointer",color:"#666"}},"×"),t.createElement("h3",{style:{marginTop:0,marginBottom:"16px"}},f.name),e&&t.createElement("img",{src:URL.createObjectURL(f),alt:f.name,style:{maxWidth:"100%",maxHeight:"70vh"}}),n&&t.createElement("pre",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word",maxHeight:"70vh",overflow:"auto",padding:"16px",backgroundColor:"#f5f5f5",borderRadius:"4px"}},URL.createObjectURL(f)),r&&t.createElement("iframe",{src:URL.createObjectURL(f),style:{width:"100%",height:"70vh",border:"none"},title:f.name}),!e&&!n&&!r&&t.createElement("div",{style:{padding:"20px",textAlign:"center"}},"Preview not available for this file type")))})())};function Ih(e,t){if(!t||0===Object.keys(t).length)return e;const n={};for(const[r,o]of Object.entries(e)){let e=Object.assign({},o);if(t.disableOnOptions&&void 0===e.chatDisabled){const t=!(!e.options&&!e.checkboxes);e.chatDisabled=t}n[r]=e}return n}function Th(e){return async t=>{await t.injectMessage(e)}}function Qh(e){return async t=>{const n=await e(t);await t.injectMessage(n)}}const Mh=t.forwardRef((e,n)=>{var{defaultOpen:r}=e,o=b(e,["defaultOpen"]);const[i,l]=t.useState(r||!1),a=t.useRef(null);return t.useImperativeHandle(n,()=>({addMessage:e=>{var t;null===(t=a.current)||void 0===t||t.addMessage(e)},setBotEnabled:e=>{var t;null===(t=a.current)||void 0===t||t.setBotEnabled(e)},openChat:()=>{var e;l(!0),null===(e=a.current)||void 0===e||e.openChat()},closeChat:()=>{var e;l(!1),null===(e=a.current)||void 0===e||e.closeChat()},toggleChat:()=>{var e;l(e=>!e),null===(e=a.current)||void 0===e||e.toggleChat()}}),[]),t.createElement(kh,w({ref:a},o,{open:i,onOpenChange:l}))});function Oh(e){if(!(e.target&&e.target instanceof HTMLElement))return void jp("QA Bot: A valid target DOM element is required");const{target:n}=e,r=b(e,["target"]),o=p.createRoot(n),i={current:null};return o.render(t.createElement(t.StrictMode,null,t.createElement(Mh,w({ref:e=>{i.current=e}},r)))),{addMessage:e=>{var t;return null===(t=i.current)||void 0===t?void 0:t.addMessage(e)},setBotEnabled:e=>{var t;return null===(t=i.current)||void 0===t?void 0:t.setBotEnabled(e)},openChat:()=>{var e;return null===(e=i.current)||void 0===e?void 0:e.openChat()},closeChat:()=>{var e;return null===(e=i.current)||void 0===e?void 0:e.closeChat()},toggleChat:()=>{var e;return null===(e=i.current)||void 0===e?void 0:e.toggleChat()},destroy:()=>{i.current=null,o.unmount()}}}Mh.displayName="ProgrammaticQABot";export{Bh as FileUploadComponent,kh as QABot,Ih as applyFlowSettings,Oh as default,Ph as fileToBase64,Ch as filesToBase64,Dh as formatFileSize,Oh as qaBot,xh as useScreenshotCapture,Sh as validateFileSize,Th as withHistory,Qh as withHistoryFn};
8
+ */var mn,vn;const yn=gn(function(){if(vn)return mn;vn=1;var e=/["'&<>]/;return mn=function(t){var n=""+t,r=e.exec(n);if(!r)return n;var o,i="",l=0,a=0;for(l=r.index;l<n.length;l++){switch(n.charCodeAt(l)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 39:o="&#39;";break;case 60:o="&lt;";break;case 62:o="&gt;";break;default:continue}a!==l&&(i+=n.substring(a,l)),a=l+1,i+=o}return a!==l?i+n.substring(a,l):i}}());function wn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const bn=/(url|image|image-set)\(/i;class kn extends hn{attribute(e,t){return"style"===e&&Object.keys(t).forEach(e=>{String(t[e]).match(bn)&&delete t[e]}),t}}const xn=/^<(!doctype|(html|head|body)(\s|>))/i,En=/^(aria-|data-|\w+:)/iu,Pn=/{{{(\w+)\/?}}}/;function Cn(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}let Sn=class{constructor(e,t={},n=[],r=[]){var o;if(wn(this,"allowed",void 0),wn(this,"banned",void 0),wn(this,"blocked",void 0),wn(this,"container",void 0),wn(this,"content",[]),wn(this,"props",void 0),wn(this,"matchers",void 0),wn(this,"filters",void 0),wn(this,"keyIndex",void 0),"production"!==process.env.NODE_ENV&&e&&"string"!=typeof e)throw new TypeError("Interweave parser requires a valid string.");this.props=t,this.matchers=n,this.filters=[...r,new kn],this.keyIndex=-1,this.container=this.createContainer(e||""),this.allowed=new Set(null!==(o=t.allowList)&&void 0!==o?o:cn),this.banned=new Set(An),this.blocked=new Set(t.blockList)}applyAttributeFilters(e,t){return this.filters.reduce((t,n)=>null!==t&&"function"==typeof n.attribute?n.attribute(e,t):t,t)}applyNodeFilters(e,t){return this.filters.reduce((t,n)=>null!==t&&"function"==typeof n.node?n.node(e,t):t,t)}applyMatchers(e,t){const n={},{props:r}=this;let o=e,i=0,l=null;return this.matchers.forEach(e=>{const a=e.asTag().toLowerCase(),s=this.getTagConfig(a);if(r[e.inverseName]||!this.isTagAllowed(a)||!this.canRenderChild(t,s))return;let A="";for(;o&&(l=e.match(o));){const{index:t,length:a,match:s,valid:c,void:u,...d}=l,f=e.propName+String(i);t>0&&(A+=o.slice(0,t)),c?(A+=u?`{{{${f}/}}}`:`{{{${f}}}}${s}{{{/${f}}}}`,this.keyIndex+=1,i+=1,n[f]={children:s,matcher:e,props:{...r,...d,key:this.keyIndex}}):A+=s,e.greedy?(o=A+o.slice(t+a),A=""):o=o.slice(t+(a||s.length))}e.greedy||(o=A+o)}),0===i?e:this.replaceTokens(o,n)}canRenderChild(e,t){return!(!e.tagName||!t.tagName||e.void)&&(e.children.length>0?e.children.includes(t.tagName):!(e.invalid.length>0&&e.invalid.includes(t.tagName))&&(t.parent.length>0?t.parent.includes(e.tagName):!(!e.self&&e.tagName===t.tagName)&&!!(e&&e.content&t.type)))}convertLineBreaks(e){const{noHtml:t,disableLineBreaks:n}=this.props;if(t||n||e.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return e;let r=e.replace(/\r\n/g,"\n");return r=r.replace(/\n{3,}/g,"\n\n\n"),r=r.replace(/\n/g,"<br/>"),r}createContainer(e){var t;const n=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||Cn)();if(!n)return;const r=null!==(t=this.props.containerTagName)&&void 0!==t?t:"body",o="body"===r||"fragment"===r?n.body:n.createElement(r);if(e.match(xn)){if("production"!==process.env.NODE_ENV)throw new Error("HTML documents as Interweave content are not supported.")}else o.innerHTML=this.convertLineBreaks(this.props.escapeHtml?yn(e):e);return o}extractAttributes(e){const{allowAttributes:t}=this.props,n={};let r=0;return 1===e.nodeType&&e.attributes&&([...e.attributes].forEach(o=>{const{name:i,value:l}=o,a=i.toLowerCase(),s=un[a]||un[i];if(!this.isSafe(e)||!a.match(En)&&(!t&&(!s||2===s)||a.startsWith("on")||l.replace(/(\s|\0|&#x0([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let A="style"===a?this.extractStyleAttribute(e):l;4===s?A=!0:3===s?A=Number.parseFloat(String(A)):5!==s&&(A=String(A)),n[dn[a]||a]=this.applyAttributeFilters(a,A),r+=1}),0!==r)?n:null}extractStyleAttribute(e){const t={};return Array.from(e.style).forEach(n=>{const r=e.style[n];("string"==typeof r||"number"==typeof r)&&(t[n.replace(/-([a-z])/g,(e,t)=>String(t).toUpperCase())]=r)}),t}getTagConfig(e){const t={children:[],content:0,invalid:[],parent:[],self:!0,tagName:"",type:0,void:!1};return sn[e]?{...t,...sn[e],tagName:e}:t}isSafe(e){if(typeof HTMLAnchorElement<"u"&&e instanceof HTMLAnchorElement){const t=e.getAttribute("href");if(null!=t&&t.startsWith("#"))return!0;const n=e.protocol.toLowerCase();return":"===n||"http:"===n||"https:"===n||"mailto:"===n||"tel:"===n}return!0}isTagAllowed(e){return!this.banned.has(e)&&!this.blocked.has(e)&&(this.props.allowElements||this.allowed.has(e))}parse(){return this.container?this.parseNode(this.container,this.getTagConfig(this.container.nodeName.toLowerCase())):[]}parseNode(e,n){const{noHtml:r,noHtmlExceptMatchers:o,allowElements:i,transform:l,transformOnlyAllowList:a}=this.props;let s=[],A="";return[...e.childNodes].forEach(e=>{if(1===e.nodeType){const u=e.nodeName.toLowerCase(),d=this.getTagConfig(u);A&&(s.push(A),A="");const f=this.applyNodeFilters(u,e);if(!f)return;let p;if(l&&(!a||this.isTagAllowed(u))){this.keyIndex+=1;const e=this.keyIndex;p=this.parseNode(f,d);const n=l(f,p,d);if(null===n)return;if(typeof n<"u")return void s.push(t.cloneElement(n,{key:e}));this.keyIndex=e-1}if(this.banned.has(u))return;if(r||o&&"br"!==u||!this.isTagAllowed(u)||!i&&!this.canRenderChild(n,d))s=[...s,...this.parseNode(f,d.tagName?d:n)];else{var c;this.keyIndex+=1;const e=this.extractAttributes(f),n={tagName:u};e&&(n.attributes=e),d.void&&(n.selfClose=d.void),s.push(t.createElement(pn,{...n,key:this.keyIndex},null!==(c=p)&&void 0!==c?c:this.parseNode(f,d)))}}else if(3===e.nodeType){const t=r&&!o?e.textContent:this.applyMatchers(e.textContent||"",n);Array.isArray(t)?s=[...s,...t]:A+=t}}),A&&s.push(A),s}replaceTokens(e,t){if(!e.includes("{{{"))return e;const n=[];let r=e,o=null;for(;o=r.match(Pn);){const[e,i]=o,l=o.index,a=e.includes("/");if("production"!==process.env.NODE_ENV&&!t[i])throw new Error(`Token "${i}" found but no matching element to replace with.`);l>0&&(n.push(r.slice(0,l)),r=r.slice(l));const{children:s,matcher:A,props:c}=t[i];let u;if(a)u=e.length,n.push(A.createElement(s,c));else{const o=r.match(new RegExp(`{{{/${i}}}}`));if("production"!==process.env.NODE_ENV&&!o)throw new Error(`Closing token missing for interpolated element "${i}".`);u=o.index+o[0].length,n.push(A.createElement(this.replaceTokens(r.slice(e.length,o.index),t),c))}r=r.slice(u)}return r.length>0&&n.push(r),0===n.length?"":1===n.length&&"string"==typeof n[0]?n[0]:n}};function Dn(e){var n;const{attributes:r,className:o,containerTagName:i,content:l,emptyContent:a,parsedContent:s,tagName:A,noWrap:c}=e,u=null!==(n=i??A)&&void 0!==n?n:"span",d="fragment"===u||c;let f;if(s)f=s;else{const t=new Sn(l??"",e).parse();t.length>0&&(f=t)}return f||(f=a),d?t.createElement(t.Fragment,null,f):t.createElement(pn,{attributes:r,className:o,tagName:u},f)}function Bn(e){const{attributes:n,className:r,content:o="",disableFilters:i=!1,disableMatchers:l=!1,emptyContent:a=null,filters:s=[],matchers:A=[],onAfterParse:c=null,onBeforeParse:u=null,tagName:d="span",noWrap:f=!1,...p}=e,h=l?[]:A,g=i?[]:s,m=u?[u]:[],v=c?[c]:[];h.forEach(e=>{e.onBeforeParse&&m.push(e.onBeforeParse.bind(e)),e.onAfterParse&&v.push(e.onAfterParse.bind(e))});const y=m.reduce((t,n)=>{const r=n(t,e);if("production"!==process.env.NODE_ENV&&"string"!=typeof r)throw new TypeError("Interweave `onBeforeParse` must return a valid HTML string.");return r},o??""),w=new Sn(y,p,h,g),b=v.reduce((t,n)=>{const r=n(t,e);if("production"!==process.env.NODE_ENV&&!Array.isArray(r))throw new TypeError("Interweave `onAfterParse` must return an array of strings and React elements.");return r},w.parse());return t.createElement(Dn,{attributes:n,className:r,containerTagName:e.containerTagName,emptyContent:a,noWrap:f,parsedContent:0===b.length?void 0:b,tagName:d})}const In=({children:e})=>h("div",{style:{whiteSpace:"normal"},children:h(Bn,{content:"string"==typeof e?e:""})}),Tn={autoConfig:!0},Qn=(e,t,n)=>{var r;if(!e.detail.currPath)return!1;const o=t[e.detail.currPath];return!!o&&((null==(r=o.renderHtml)?void 0:r.map(e=>e.toUpperCase()).includes(n))??!1)},Mn=e=>{const t=[];let n="",r=!1;for(let o=0;o<e.length;o++){const i=e[o];"<"===i?r?(t.push(n),n=i):(r=!0,n=i):">"===i?(n+=i,t.push(n),n="",r=!1):r?n+=i:t.push(i)}return""!==n&&t.push(n),t},On=e=>{const{getFlow:t}=$t(),{messages:n,replaceMessages:r}=en(),{settings:o}=nn(),{hasChatHistoryLoaded:i}=on(),l={...e,...Tn},a=l.htmlComponent?l.htmlComponent:In;s(()=>{var e,t;if(i){const i=[...n];for(let n=0;n<i.length&&n<((null==(e=o.chatHistory)?void 0:e.maxEntries)??30);n++){const e=i[n];null!=(t=e.tags)&&t.includes("rcb-html-renderer-plugin:parsed")&&(e.contentWrapper=a)}r(i)}},[i]);const A=async e=>{var n;const r=null==(n=e.data.message)?void 0:n.sender.toUpperCase();"string"==typeof e.data.message.content&&Qn(e,t(),r)&&("rcb-start-simulate-stream-message"===e.type&&(e.data.simulateStreamChunker=Mn),e.data.message.contentWrapper=a,e.data.message.tags||(e.data.message.tags=[]),e.data.message.tags.push("rcb-html-renderer-plugin:parsed"))};tn(J.PRE_INJECT_MESSAGE,A),tn(J.CHUNK_STREAM_MESSAGE,A),tn(J.START_STREAM_MESSAGE,A),tn(J.START_SIMULATE_STREAM_MESSAGE,A),tn(J.START_SPEAK_AUDIO,async e=>{Qn(e,t(),"BOT")&&(e.data.textToRead=(e=>typeof window.DOMParser<"u"?(new DOMParser).parseFromString(e,"text/html").body.textContent||"":e.replace(/<\/?[^>]+(>|$)/g,""))(e.data.textToRead))});const c={name:"@rcb-plugins/html-renderer"};return null!=l&&l.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0,rcbStartSpeakAudio:!0}}),c};const Ln=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Nn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Rn={};function Hn(e,t){return(Rn.jsx?Nn:Ln).test(e)}const Fn=/[ \t\n\f\r]/g;function zn(e){return""===e.replace(Fn,"")}class jn{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function Un(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new jn(n,r,t)}function _n(e){return e.toLowerCase()}jn.prototype.property={},jn.prototype.normal={},jn.prototype.space=null;class qn{constructor(e,t){this.property=e,this.attribute=t}}qn.prototype.space=null,qn.prototype.boolean=!1,qn.prototype.booleanish=!1,qn.prototype.overloadedBoolean=!1,qn.prototype.number=!1,qn.prototype.commaSeparated=!1,qn.prototype.spaceSeparated=!1,qn.prototype.commaOrSpaceSeparated=!1,qn.prototype.mustUseProperty=!1,qn.prototype.defined=!1;let Vn=0;const Gn=$n(),Wn=$n(),Yn=$n(),Kn=$n(),Xn=$n(),Jn=$n(),Zn=$n();function $n(){return 2**++Vn}const er=Object.freeze(Object.defineProperty({__proto__:null,boolean:Gn,booleanish:Wn,commaOrSpaceSeparated:Zn,commaSeparated:Jn,number:Kn,overloadedBoolean:Yn,spaceSeparated:Xn},Symbol.toStringTag,{value:"Module"})),tr=Object.keys(er);class nr extends qn{constructor(e,t,n,r){let o=-1;if(super(e,t),rr(this,"space",r),"number"==typeof n)for(;++o<tr.length;){const e=tr[o];rr(this,tr[o],(n&er[e])===er[e])}}}function rr(e,t,n){n&&(e[t]=n)}nr.prototype.defined=!0;const or={}.hasOwnProperty;function ir(e){const t={},n={};let r;for(r in e.properties)if(or.call(e.properties,r)){const o=e.properties[r],i=new nr(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[_n(r)]=r,n[_n(i.attribute)]=r}return new jn(t,n,e.space)}const lr=ir({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),ar=ir({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function sr(e,t){return t in e?e[t]:t}function Ar(e,t){return sr(e,t.toLowerCase())}const cr=ir({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Ar,properties:{xmlns:null,xmlnsXLink:null}}),ur=ir({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:Wn,ariaAutoComplete:null,ariaBusy:Wn,ariaChecked:Wn,ariaColCount:Kn,ariaColIndex:Kn,ariaColSpan:Kn,ariaControls:Xn,ariaCurrent:null,ariaDescribedBy:Xn,ariaDetails:null,ariaDisabled:Wn,ariaDropEffect:Xn,ariaErrorMessage:null,ariaExpanded:Wn,ariaFlowTo:Xn,ariaGrabbed:Wn,ariaHasPopup:null,ariaHidden:Wn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Xn,ariaLevel:Kn,ariaLive:null,ariaModal:Wn,ariaMultiLine:Wn,ariaMultiSelectable:Wn,ariaOrientation:null,ariaOwns:Xn,ariaPlaceholder:null,ariaPosInSet:Kn,ariaPressed:Wn,ariaReadOnly:Wn,ariaRelevant:null,ariaRequired:Wn,ariaRoleDescription:Xn,ariaRowCount:Kn,ariaRowIndex:Kn,ariaRowSpan:Kn,ariaSelected:Wn,ariaSetSize:Kn,ariaSort:null,ariaValueMax:Kn,ariaValueMin:Kn,ariaValueNow:Kn,ariaValueText:null,role:null}}),dr=ir({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Ar,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Jn,acceptCharset:Xn,accessKey:Xn,action:null,allow:null,allowFullScreen:Gn,allowPaymentRequest:Gn,allowUserMedia:Gn,alt:null,as:null,async:Gn,autoCapitalize:null,autoComplete:Xn,autoFocus:Gn,autoPlay:Gn,blocking:Xn,capture:null,charSet:null,checked:Gn,cite:null,className:Xn,cols:Kn,colSpan:null,content:null,contentEditable:Wn,controls:Gn,controlsList:Xn,coords:Kn|Jn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Gn,defer:Gn,dir:null,dirName:null,disabled:Gn,download:Yn,draggable:Wn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Gn,formTarget:null,headers:Xn,height:Kn,hidden:Gn,high:Kn,href:null,hrefLang:null,htmlFor:Xn,httpEquiv:Xn,id:null,imageSizes:null,imageSrcSet:null,inert:Gn,inputMode:null,integrity:null,is:null,isMap:Gn,itemId:null,itemProp:Xn,itemRef:Xn,itemScope:Gn,itemType:Xn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Gn,low:Kn,manifest:null,max:null,maxLength:Kn,media:null,method:null,min:null,minLength:Kn,multiple:Gn,muted:Gn,name:null,nonce:null,noModule:Gn,noValidate:Gn,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:Gn,optimum:Kn,pattern:null,ping:Xn,placeholder:null,playsInline:Gn,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Gn,referrerPolicy:null,rel:Xn,required:Gn,reversed:Gn,rows:Kn,rowSpan:Kn,sandbox:Xn,scope:null,scoped:Gn,seamless:Gn,selected:Gn,shadowRootClonable:Gn,shadowRootDelegatesFocus:Gn,shadowRootMode:null,shape:null,size:Kn,sizes:null,slot:null,span:Kn,spellCheck:Wn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Kn,step:null,style:null,tabIndex:Kn,target:null,title:null,translate:null,type:null,typeMustMatch:Gn,useMap:null,value:Wn,width:Kn,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Xn,axis:null,background:null,bgColor:null,border:Kn,borderColor:null,bottomMargin:Kn,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Gn,declare:Gn,event:null,face:null,frame:null,frameBorder:null,hSpace:Kn,leftMargin:Kn,link:null,longDesc:null,lowSrc:null,marginHeight:Kn,marginWidth:Kn,noResize:Gn,noHref:Gn,noShade:Gn,noWrap:Gn,object:null,profile:null,prompt:null,rev:null,rightMargin:Kn,rules:null,scheme:null,scrolling:Wn,standby:null,summary:null,text:null,topMargin:Kn,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Kn,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Gn,disableRemotePlayback:Gn,prefix:null,property:null,results:Kn,security:null,unselectable:null}}),fr=ir({space:"svg",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"},transform:sr,properties:{about:Zn,accentHeight:Kn,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Kn,amplitude:Kn,arabicForm:null,ascent:Kn,attributeName:null,attributeType:null,azimuth:Kn,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Kn,by:null,calcMode:null,capHeight:Kn,className:Xn,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:Kn,diffuseConstant:Kn,direction:null,display:null,dur:null,divisor:Kn,dominantBaseline:null,download:Gn,dx:null,dy:null,edgeMode:null,editable:null,elevation:Kn,enableBackground:null,end:null,event:null,exponent:Kn,externalResourcesRequired:null,fill:null,fillOpacity:Kn,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:Jn,g2:Jn,glyphName:Jn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Kn,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Kn,horizOriginX:Kn,horizOriginY:Kn,id:null,ideographic:Kn,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Kn,k:Kn,k1:Kn,k2:Kn,k3:Kn,k4:Kn,kernelMatrix:Zn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Kn,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:Kn,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:Kn,overlineThickness:Kn,paintOrder:null,panose1:null,path:null,pathLength:Kn,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Xn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Kn,pointsAtY:Kn,pointsAtZ:Kn,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Zn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Zn,rev:Zn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Zn,requiredFeatures:Zn,requiredFonts:Zn,requiredFormats:Zn,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:Kn,specularExponent:Kn,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Kn,strikethroughThickness:Kn,string:null,stroke:null,strokeDashArray:Zn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Kn,strokeOpacity:Kn,strokeWidth:null,style:null,surfaceScale:Kn,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Zn,tabIndex:Kn,tableValues:null,target:null,targetX:Kn,targetY:Kn,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Zn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Kn,underlineThickness:Kn,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Kn,values:null,vAlphabetic:Kn,vMathematical:Kn,vectorEffect:null,vHanging:Kn,vIdeographic:Kn,version:null,vertAdvY:Kn,vertOriginX:Kn,vertOriginY:Kn,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Kn,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),pr=/^data[-\w.:]+$/i,hr=/-[a-z]/g,gr=/[A-Z]/g;function mr(e){return"-"+e.toLowerCase()}function vr(e){return e.charAt(1).toUpperCase()}const yr={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"},wr=Un([ar,lr,cr,ur,dr],"html"),br=Un([ar,lr,cr,ur,fr],"svg");function kr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xr,Er,Pr,Cr={};var Sr=function(){if(Pr)return Cr;Pr=1;var e=Cr&&Cr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.default=function(e,n){var r=null;if(!e||"string"!=typeof e)return r;var o=(0,t.default)(e),i="function"==typeof n;return o.forEach(function(e){if("declaration"===e.type){var t=e.property,o=e.value;i?n(t,o,e):o&&((r=r||{})[t]=o)}}),r};var t=e(function(){if(Er)return xr;Er=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,s="";function A(e){return e?e.replace(a,s):s}return xr=function(a,c){if("string"!=typeof a)throw new TypeError("First argument must be a string");if(!a)return[];c=c||{};var u=1,d=1;function f(e){var n=e.match(t);n&&(u+=n.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function p(){var e={line:u,column:d};return function(t){return t.position=new h(e),v(),t}}function h(e){this.start=e,this.end={line:u,column:d},this.source=c.source}function g(e){var t=new Error(c.source+":"+u+":"+d+": "+e);if(t.reason=e,t.filename=c.source,t.line=u,t.column=d,t.source=a,!c.silent)throw t}function m(e){var t=e.exec(a);if(t){var n=t[0];return f(n),a=a.slice(n.length),t}}function v(){m(n)}function y(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var e=p();if("/"==a.charAt(0)&&"*"==a.charAt(1)){for(var t=2;s!=a.charAt(t)&&("*"!=a.charAt(t)||"/"!=a.charAt(t+1));)++t;if(t+=2,s===a.charAt(t-1))return g("End of comment missing");var n=a.slice(2,t-2);return d+=2,f(n),a=a.slice(t),d+=2,e({type:"comment",comment:n})}}function b(){var t=p(),n=m(r);if(n){if(w(),!m(o))return g("property missing ':'");var a=m(i),c=t({type:"declaration",property:A(n[0].replace(e,s)),value:a?A(a[0].replace(e,s)):s});return m(l),c}}return h.prototype.content=a,v(),function(){var e,t=[];for(y(t);e=b();)!1!==e&&(t.push(e),y(t));return t}()},xr}());return Cr}();const Dr=kr(Sr),Br=Dr.default||Dr,Ir=Qr("end"),Tr=Qr("start");function Qr(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function Mr(e){return e&&"object"==typeof e?"position"in e||"type"in e?Lr(e.position):"start"in e||"end"in e?Lr(e):"line"in e||"column"in e?Or(e):"":""}function Or(e){return Nr(e&&e.line)+":"+Nr(e&&e.column)}function Lr(e){return Or(e&&e.start)+"-"+Or(e&&e.end)}function Nr(e){return e&&"number"==typeof e?e:1}class Rr extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},i=!1;if(t&&(o="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!o.cause&&e&&(i=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){const e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.position)}const l=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=l?l.line:void 0,this.name=Mr(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=i&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Rr.prototype.file="",Rr.prototype.name="",Rr.prototype.reason="",Rr.prototype.message="",Rr.prototype.stack="",Rr.prototype.column=void 0,Rr.prototype.line=void 0,Rr.prototype.ancestors=void 0,Rr.prototype.cause=void 0,Rr.prototype.fatal=void 0,Rr.prototype.place=void 0,Rr.prototype.ruleId=void 0,Rr.prototype.source=void 0;const Hr={}.hasOwnProperty,Fr=new Map,zr=/[A-Z]/g,jr=/-([a-z])/g,Ur=new Set(["table","tbody","thead","tfoot","tr"]),_r=new Set(["td","th"]),qr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Vr(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,o,i){const l=Array.isArray(o.children),a=Tr(n);return t(r,o,i,l,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,o,i){const l=Array.isArray(o.children)?n:t;return i?l(r,o,i):l(r,o)}}(0,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?br:wr,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=Gr(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Gr(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(o=br,e.schema=o),e.ancestors.push(t);const i=Jr(e,t.tagName,!1),l=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&Hr.call(t.properties,o)){const i=Xr(e,o,t.properties[o]);if(i){const[o,l]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof l&&_r.has(t.tagName)?r=l:n[o]=l}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let a=Kr(e,t);return Ur.has(t.tagName)&&(a=a.filter(function(e){return"string"!=typeof e||!function(e){return"object"==typeof e?"text"===e.type&&zn(e.value):zn(e)}(e)})),Wr(e,l,i,t),Yr(l,a),e.ancestors.pop(),e.schema=r,e.create(t,i,l,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Zr(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.name&&"html"===r.space&&(o=br,e.schema=o),e.ancestors.push(t);const i=null===t.name?e.Fragment:Jr(e,t.name,!0),l=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];t.type;const o=t.expression;o.type;const i=o.properties[0];i.type,Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else Zr(e,t.position);else{const o=r.name;let i;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];t.type,i=e.evaluater.evaluateExpression(t.expression)}else Zr(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),a=Kr(e,t);return Wr(e,l,i,t),Yr(l,a),e.ancestors.pop(),e.schema=r,e.create(t,i,l,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Zr(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Yr(r,Kr(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function Wr(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Yr(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Kr(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Fr;for(;++r<t.children.length;){const i=t.children[r];let l;if(e.passKeys){const e="element"===i.type?i.tagName:"mdxJsxFlowElement"===i.type||"mdxJsxTextElement"===i.type?i.name:void 0;if(e){const t=o.get(e)||0;l=e+"-"+t,o.set(e,t+1)}}const a=Gr(e,i,l);void 0!==a&&n.push(a)}return n}function Xr(e,t,n){const r=function(e,t){const n=_n(t);let r=t,o=qn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&pr.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(hr,vr);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!hr.test(e)){let n=e.replace(gr,mr);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=nr}return new o(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):function(e){return e.join(" ").trim()}(n)),"style"===r.property){let t="object"==typeof n?n:function(e,t){const n={};try{Br(t,r)}catch(t){if(!e.ignoreInvalidStyle){const n=t,r=new Rr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=qr+"#cannot-parse-style-attribute",r}}return n;function r(e,t){let r=e;"--"!==r.slice(0,2)&&("-ms-"===r.slice(0,4)&&(r="ms-"+r.slice(4)),r=r.replace(jr,eo)),n[r]=t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Hr.call(e,n)&&(t[$r(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?yr[r.property]||r.property:r.attribute,n]}}function Jr(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=Hn(e[o])?{type:"Identifier",name:e[o]}:{type:"Literal",value:e[o]};n=n?{type:"MemberExpression",object:n,property:t,computed:!(!o||"Literal"!==t.type),optional:!1}:t}r=n}else r=Hn(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return Hr.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Zr(e)}function Zr(e,t){const n=new Rr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=qr+"#cannot-handle-mdx-estrees-without-createevaluater",n}function $r(e){let t=e.replace(zr,to);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function eo(e,t){return t.toUpperCase()}function to(e){return"-"+e.toLowerCase()}const no={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"]},ro={};function oo(e,t,n){if(function(e){return!(!e||"object"!=typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return io(e.children,t,n)}return Array.isArray(e)?io(e,t,n):""}function io(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=oo(e[o],t,n);return r.join("")}const lo=document.createElement("i");function ao(e){const t="&"+e+";";lo.innerHTML=t;const n=lo.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}function so(e,t,n,r){const o=e.length;let i,l=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);l<r.length;)i=r.slice(l,l+1e4),i.unshift(t,0),e.splice(...i),l+=1e4,t+=1e4}function Ao(e,t){return e.length>0?(so(e,e.length,0,t),e):t}const co={}.hasOwnProperty;function uo(e){const t={};let n=-1;for(;++n<e.length;)fo(t,e[n]);return t}function fo(e,t){let n;for(n in t){const r=(co.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){co.call(r,i)||(r[i]=[]);const e=o[i];po(r[i],Array.isArray(e)?e:e?[e]:[])}}}function po(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);so(e,0,0,r)}function ho(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function go(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const mo=Bo(/[A-Za-z]/),vo=Bo(/[\dA-Za-z]/),yo=Bo(/[#-'*+\--9=?A-Z^-~]/);function wo(e){return null!==e&&(e<32||127===e)}const bo=Bo(/\d/),ko=Bo(/[\dA-Fa-f]/),xo=Bo(/[!-/:-@[-`{-~]/);function Eo(e){return null!==e&&e<-2}function Po(e){return null!==e&&(e<0||32===e)}function Co(e){return-2===e||-1===e||32===e}const So=Bo(new RegExp("\\p{P}|\\p{S}","u")),Do=Bo(/\s/);function Bo(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function Io(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let l="";if(37===i&&vo(e.charCodeAt(n+1))&&vo(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(l=String.fromCharCode(i));else if(i>55295&&i<57344){const t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(l=String.fromCharCode(i,t),o=1):l="�"}else l=String.fromCharCode(i);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function To(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){return Co(r)?(e.enter(n),l(r)):t(r)};function l(r){return Co(r)&&i++<o?(e.consume(r),l):(e.exit(n),t(r))}}const Qo={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),To(e,t,"linePrefix")},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Eo(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const Mo={tokenize:function(e){const t=this,n=[];let r,o,i,l=0;return a;function a(r){if(l<n.length){const o=n[l];return t.containerState=o[1],e.attempt(o[0].continuation,s,A)(r)}return A(r)}function s(e){if(l++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&v();const n=t.events.length;let o,i=n;for(;i--;)if("exit"===t.events[i][0]&&"chunkFlow"===t.events[i][1].type){o=t.events[i][1].end;break}m(l);let a=n;for(;a<t.events.length;)t.events[a][1].end={...o},a++;return so(t.events,i+1,0,t.events.slice(n)),t.events.length=a,A(e)}return a(e)}function A(o){if(l===n.length){if(!r)return d(o);if(r.currentConstruct&&r.currentConstruct.concrete)return p(o);t.interrupt=!(!r.currentConstruct||r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Oo,c,u)(o)}function c(e){return r&&v(),m(l),d(e)}function u(e){return t.parser.lazy[t.now().line]=l!==n.length,i=t.now().offset,p(e)}function d(n){return t.containerState={},e.attempt(Oo,f,p)(n)}function f(e){return l++,n.push([t.currentConstruct,t.containerState]),d(e)}function p(n){return null===n?(r&&v(),m(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),h(n))}function h(n){return null===n?(g(e.exit("chunkFlow"),!0),m(0),void e.consume(n)):Eo(n)?(e.consume(n),g(e.exit("chunkFlow")),l=0,t.interrupt=void 0,a):(e.consume(n),h)}function g(e,n){const a=t.sliceStream(e);if(n&&a.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(a),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<i&&(!r.events[e][1].end||r.events[e][1].end.offset>i))return;const n=t.events.length;let o,a,s=n;for(;s--;)if("exit"===t.events[s][0]&&"chunkFlow"===t.events[s][1].type){if(o){a=t.events[s][1].end;break}o=!0}for(m(l),e=n;e<t.events.length;)t.events[e][1].end={...a},e++;so(t.events,s+1,0,t.events.slice(n)),t.events.length=e}}function m(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Oo={tokenize:function(e,t,n){return To(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function Lo(e){return null===e||Po(e)||Do(e)?1:So(e)?2:void 0}function No(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const Ro={name:"attention",resolveAll:function(e,t){let n,r,o,i,l,a,s,A,c=-1;for(;++c<e.length;)if("enter"===e[c][0]&&"attentionSequence"===e[c][1].type&&e[c][1]._close)for(n=c;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[c][1]).charCodeAt(0)){if((e[n][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;a=e[n][1].end.offset-e[n][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;const u={...e[n][1].end},d={...e[c][1].start};Ho(u,-a),Ho(d,a),i={type:a>1?"strongSequence":"emphasisSequence",start:u,end:{...e[n][1].end}},l={type:a>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:d},o={type:a>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[c][1].start}},r={type:a>1?"strong":"emphasis",start:{...i.start},end:{...l.end}},e[n][1].end={...i.start},e[c][1].start={...l.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=Ao(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=Ao(s,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),s=Ao(s,No(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),s=Ao(s,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(A=2,s=Ao(s,[["enter",e[c][1],t],["exit",e[c][1],t]])):A=0,so(e,n-1,c-n+3,s),c=n+s.length-A-2;break}for(c=-1;++c<e.length;)"attentionSequence"===e[c][1].type&&(e[c][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Lo(r);let i;return function(t){return i=t,e.enter("attentionSequence"),l(t)};function l(a){if(a===i)return e.consume(a),l;const s=e.exit("attentionSequence"),A=Lo(a),c=!A||2===A&&o||n.includes(a),u=!o||2===o&&A||n.includes(r);return s._open=!!(42===i?c:c&&(o||!u)),s._close=!!(42===i?u:u&&(A||!c)),t(a)}}};function Ho(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Fo={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return mo(t)?(e.consume(t),i):64===t?n(t):s(t)}function i(e){return 43===e||45===e||46===e||vo(e)?(r=1,l(e)):s(e)}function l(t){return 58===t?(e.consume(t),r=0,a):(43===t||45===t||46===t||vo(t))&&r++<32?(e.consume(t),l):(r=0,s(t))}function a(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||wo(r)?n(r):(e.consume(r),a)}function s(t){return 64===t?(e.consume(t),A):yo(t)?(e.consume(t),s):n(t)}function A(e){return vo(e)?c(e):n(e)}function c(n){return 46===n?(e.consume(n),r=0,A):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):u(n)}function u(t){if((45===t||vo(t))&&r++<63){const n=45===t?u:c;return e.consume(t),n}return n(t)}}};const zo={partial:!0,tokenize:function(e,t,n){return function(t){return Co(t)?To(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||Eo(e)?t(e):n(e)}}};const jo={continuation:{tokenize:function(e,t,n){const r=this;return function(t){return Co(t)?To(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):o(t)};function o(r){return e.attempt(jo,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return Co(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const Uo={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return xo(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const _o={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,l=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),o=31,i=vo,A(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=ko,A):(e.enter("characterReferenceValue"),o=7,i=bo,A(t))}function A(a){if(59===a&&l){const o=e.exit("characterReferenceValue");return i!==vo||ao(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return i(a)&&l++<o?(e.consume(a),A):n(a)}}};const qo={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},Vo={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return l;function l(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s}function s(t){return e.enter("codeFencedFence"),Co(t)?To(e,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):A(t)}function A(t){return t===i?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===i?(o++,e.consume(t),c):o>=a?(e.exit("codeFencedFenceSequence"),Co(t)?To(e,u,"whitespace")(t):u(t)):n(t)}function u(r){return null===r||Eo(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let i,l=0,a=0;return function(t){return function(t){const n=r.events[r.events.length-1];return l=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,i=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s(t)}(t)};function s(t){return t===i?(a++,e.consume(t),s):a<3?n(t):(e.exit("codeFencedFenceSequence"),Co(t)?To(e,A,"whitespace")(t):A(t))}function A(n){return null===n||Eo(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(qo,f,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(n))}function c(t){return null===t||Eo(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),A(t)):Co(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),To(e,u,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),c)}function u(t){return null===t||Eo(t)?A(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||Eo(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),A(t)):96===t&&t===i?n(t):(e.consume(t),d)}function f(t){return e.attempt(o,v,p)(t)}function p(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),h}function h(t){return l>0&&Co(t)?To(e,g,"linePrefix",l+1)(t):g(t)}function g(t){return null===t||Eo(t)?e.check(qo,f,v)(t):(e.enter("codeFlowValue"),m(t))}function m(t){return null===t||Eo(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),m)}function v(n){return e.exit("codeFenced"),t(n)}}};const Go={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),To(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?i(e):n(e)}function i(t){return null===t?a(t):Eo(t)?e.attempt(Wo,i,a)(t):(e.enter("codeFlowValue"),l(t))}function l(t){return null===t||Eo(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),l)}function a(n){return e.exit("codeIndented"),t(n)}}},Wo={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):Eo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):To(e,i,"linePrefix",5)(t)}function i(e){const i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):Eo(e)?o(e):n(e)}}};const Yo={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}for(t=o-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,o,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),l(t)};function l(t){return 96===t?(e.consume(t),i++,l):(e.exit("codeTextSequence"),a(t))}function a(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),a):96===t?(o=e.enter("codeTextSequence"),r=0,A(t)):Eo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):(e.enter("codeTextData"),s(t))}function s(t){return null===t||32===t||96===t||Eo(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),s)}function A(n){return 96===n?(e.consume(n),r++,A):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",s(n))}}};class Ko{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,t){const n=t??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Xo(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Xo(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Xo(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);Xo(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Xo(this.left,t.reverse())}}}function Xo(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Jo(e){const t={};let n,r,o,i,l,a,s,A=-1;const c=new Ko(e);for(;++A<c.length;){for(;A in t;)A=t[A];if(n=c.get(A),A&&"chunkFlow"===n[1].type&&"listItemPrefix"===c.get(A-1)[1].type&&(a=n[1]._tokenizer.events,o=0,o<a.length&&"lineEndingBlank"===a[o][1].type&&(o+=2),o<a.length&&"content"===a[o][1].type))for(;++o<a.length&&"content"!==a[o][1].type;)"chunkText"===a[o][1].type&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,Zo(c,A)),A=t[A],s=!0);else if(n[1]._container){for(o=A,r=void 0;o--;)if(i=c.get(o),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(r&&(c.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);else if("linePrefix"!==i[1].type)break;r&&(n[1].end={...c.get(r)[1].start},l=c.slice(r,A),l.unshift(n),c.splice(r,A-r+1,l))}}return so(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!s}function Zo(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[],l=n._tokenizer||r.parser[n.contentType](n.start),a=l.events,s=[],A={};let c,u,d=-1,f=n,p=0,h=0;const g=[h];for(;f;){for(;e.get(++o)[1]!==f;);i.push(o),f._tokenizer||(c=r.sliceStream(f),f.next||c.push(null),u&&l.defineSkip(f.start),f._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(c),f._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),u=f,f=f.next}for(f=n;++d<a.length;)"exit"===a[d][0]&&"enter"===a[d-1][0]&&a[d][1].type===a[d-1][1].type&&a[d][1].start.line!==a[d][1].end.line&&(h=d+1,g.push(h),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(l.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),d=g.length;d--;){const t=a.slice(g[d],g[d+1]),n=i.pop();s.push([n,n+t.length-1]),e.splice(n,2,t)}for(s.reverse(),d=-1;++d<s.length;)A[p+s[d][0]]=p+s[d][1],p+=s[d][1]-s[d][0]-1;return A}const $o={resolve:function(e){return Jo(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):Eo(t)?e.check(ei,i,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function i(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},ei={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),To(e,o,"linePrefix")};function o(o){if(null===o||Eo(o))return n(o);const i=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}};function ti(e,t,n,r,o,i,l,a,s){const A=s||Number.POSITIVE_INFINITY;let c=0;return function(t){return 60===t?(e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),u):null===t||32===t||41===t||wo(t)?n(t):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),p(t))};function u(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(a),u(t)):null===t||60===t||Eo(t)?n(t):(e.consume(t),92===t?f:d)}function f(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function p(o){return c||null!==o&&41!==o&&!Po(o)?c<A&&40===o?(e.consume(o),c++,p):41===o?(e.consume(o),c--,p):null===o||32===o||40===o||wo(o)?n(o):(e.consume(o),92===o?h:p):(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(o))}function h(t){return 40===t||41===t||92===t?(e.consume(t),p):p(t)}}function ni(e,t,n,r,o,i){const l=this;let a,s=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),A};function A(u){return s>999||null===u||91===u||93===u&&!a||94===u&&!s&&"_hiddenFootnoteSupport"in l.parser.constructs?n(u):93===u?(e.exit(i),e.enter(o),e.consume(u),e.exit(o),e.exit(r),t):Eo(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),A):(e.enter("chunkString",{contentType:"string"}),c(u))}function c(t){return null===t||91===t||93===t||Eo(t)||s++>999?(e.exit("chunkString"),A(t)):(e.consume(t),a||(a=!Co(t)),92===t?u:c)}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}}function ri(e,t,n,r,o,i){let l;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(o),e.consume(t),e.exit(o),l=40===t?41:t,a):n(t)};function a(n){return n===l?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),s(n))}function s(t){return t===l?(e.exit(i),a(l)):null===t?n(t):Eo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),To(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),A(t))}function A(t){return t===l||null===t||Eo(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?c:A)}function c(t){return t===l||92===t?(e.consume(t),A):A(t)}}function oi(e,t){let n;return function r(o){return Eo(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Co(o)?To(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const ii={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return ni.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=go(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),l):n(t)}function l(t){return Po(t)?oi(e,a)(t):a(t)}function a(t){return ti(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(li,A,A)(t)}function A(t){return Co(t)?To(e,c,"whitespace")(t):c(t)}function c(i){return null===i||Eo(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},li={partial:!0,tokenize:function(e,t,n){return function(t){return Po(t)?oi(e,r)(t):n(t)};function r(t){return ri(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return Co(t)?To(e,i,"whitespace")(t):i(t)}function i(e){return null===e||Eo(e)?t(e):n(e)}}};const ai={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return Eo(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const si={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,i=3;return"whitespace"===e[i][1].type&&(i+=2),o-2>i&&"whitespace"===e[o][1].type&&(o-=2),"atxHeadingSequence"===e[o][1].type&&(i===o-1||o-4>i&&"whitespace"===e[o-2][1].type)&&(o-=i+1===o?2:4),o>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},r={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},so(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||Po(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),l(n)):null===n||Eo(n)?(e.exit("atxHeading"),t(n)):Co(n)?To(e,i,"whitespace")(n):(e.enter("atxHeadingText"),a(n))}function l(t){return 35===t?(e.consume(t),l):(e.exit("atxHeadingSequence"),i(t))}function a(t){return null===t||35===t||Po(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),a)}}};const Ai=["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"],ci=["pre","script","style","textarea"],ui={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,n){const r=this;let o,i,l,a,s;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),A}(t)};function A(a){return 33===a?(e.consume(a),c):47===a?(e.consume(a),i=!0,f):63===a?(e.consume(a),o=3,r.interrupt?t:O):mo(a)?(e.consume(a),l=String.fromCharCode(a),p):n(a)}function c(i){return 45===i?(e.consume(i),o=2,u):91===i?(e.consume(i),o=5,a=0,d):mo(i)?(e.consume(i),o=4,r.interrupt?t:O):n(i)}function u(o){return 45===o?(e.consume(o),r.interrupt?t:O):n(o)}function d(o){const i="CDATA[";return o===i.charCodeAt(a++)?(e.consume(o),6===a?r.interrupt?t:C:d):n(o)}function f(t){return mo(t)?(e.consume(t),l=String.fromCharCode(t),p):n(t)}function p(a){if(null===a||47===a||62===a||Po(a)){const s=47===a,A=l.toLowerCase();return s||i||!ci.includes(A)?Ai.includes(l.toLowerCase())?(o=6,s?(e.consume(a),h):r.interrupt?t(a):C(a)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(a):i?g(a):m(a)):(o=1,r.interrupt?t(a):C(a))}return 45===a||vo(a)?(e.consume(a),l+=String.fromCharCode(a),p):n(a)}function h(o){return 62===o?(e.consume(o),r.interrupt?t:C):n(o)}function g(t){return Co(t)?(e.consume(t),g):E(t)}function m(t){return 47===t?(e.consume(t),E):58===t||95===t||mo(t)?(e.consume(t),v):Co(t)?(e.consume(t),m):E(t)}function v(t){return 45===t||46===t||58===t||95===t||vo(t)?(e.consume(t),v):y(t)}function y(t){return 61===t?(e.consume(t),w):Co(t)?(e.consume(t),y):m(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),s=t,b):Co(t)?(e.consume(t),w):k(t)}function b(t){return t===s?(e.consume(t),s=null,x):null===t||Eo(t)?n(t):(e.consume(t),b)}function k(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Po(t)?y(t):(e.consume(t),k)}function x(e){return 47===e||62===e||Co(e)?m(e):n(e)}function E(t){return 62===t?(e.consume(t),P):n(t)}function P(t){return null===t||Eo(t)?C(t):Co(t)?(e.consume(t),P):n(t)}function C(t){return 45===t&&2===o?(e.consume(t),I):60===t&&1===o?(e.consume(t),T):62===t&&4===o?(e.consume(t),L):63===t&&3===o?(e.consume(t),O):93===t&&5===o?(e.consume(t),M):!Eo(t)||6!==o&&7!==o?null===t||Eo(t)?(e.exit("htmlFlowData"),S(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(di,N,S)(t))}function S(t){return e.check(fi,D,N)(t)}function D(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),B}function B(t){return null===t||Eo(t)?S(t):(e.enter("htmlFlowData"),C(t))}function I(t){return 45===t?(e.consume(t),O):C(t)}function T(t){return 47===t?(e.consume(t),l="",Q):C(t)}function Q(t){if(62===t){const n=l.toLowerCase();return ci.includes(n)?(e.consume(t),L):C(t)}return mo(t)&&l.length<8?(e.consume(t),l+=String.fromCharCode(t),Q):C(t)}function M(t){return 93===t?(e.consume(t),O):C(t)}function O(t){return 62===t?(e.consume(t),L):45===t&&2===o?(e.consume(t),O):C(t)}function L(t){return null===t||Eo(t)?(e.exit("htmlFlowData"),N(t)):(e.consume(t),L)}function N(n){return e.exit("htmlFlow"),t(n)}}},di={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(zo,t,n)}}},fi={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return Eo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const pi={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,l;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),s):47===t?(e.consume(t),w):63===t?(e.consume(t),v):mo(t)?(e.consume(t),x):n(t)}function s(t){return 45===t?(e.consume(t),A):91===t?(e.consume(t),i=0,f):mo(t)?(e.consume(t),m):n(t)}function A(t){return 45===t?(e.consume(t),d):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),u):Eo(t)?(l=c,Q(t)):(e.consume(t),c)}function u(t){return 45===t?(e.consume(t),d):c(t)}function d(e){return 62===e?T(e):45===e?u(e):c(e)}function f(t){const r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),6===i?p:f):n(t)}function p(t){return null===t?n(t):93===t?(e.consume(t),h):Eo(t)?(l=p,Q(t)):(e.consume(t),p)}function h(t){return 93===t?(e.consume(t),g):p(t)}function g(t){return 62===t?T(t):93===t?(e.consume(t),g):p(t)}function m(t){return null===t||62===t?T(t):Eo(t)?(l=m,Q(t)):(e.consume(t),m)}function v(t){return null===t?n(t):63===t?(e.consume(t),y):Eo(t)?(l=v,Q(t)):(e.consume(t),v)}function y(e){return 62===e?T(e):v(e)}function w(t){return mo(t)?(e.consume(t),b):n(t)}function b(t){return 45===t||vo(t)?(e.consume(t),b):k(t)}function k(t){return Eo(t)?(l=k,Q(t)):Co(t)?(e.consume(t),k):T(t)}function x(t){return 45===t||vo(t)?(e.consume(t),x):47===t||62===t||Po(t)?E(t):n(t)}function E(t){return 47===t?(e.consume(t),T):58===t||95===t||mo(t)?(e.consume(t),P):Eo(t)?(l=E,Q(t)):Co(t)?(e.consume(t),E):T(t)}function P(t){return 45===t||46===t||58===t||95===t||vo(t)?(e.consume(t),P):C(t)}function C(t){return 61===t?(e.consume(t),S):Eo(t)?(l=C,Q(t)):Co(t)?(e.consume(t),C):E(t)}function S(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,D):Eo(t)?(l=S,Q(t)):Co(t)?(e.consume(t),S):(e.consume(t),B)}function D(t){return t===o?(e.consume(t),o=void 0,I):null===t?n(t):Eo(t)?(l=D,Q(t)):(e.consume(t),D)}function B(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||Po(t)?E(t):(e.consume(t),B)}function I(e){return 47===e||62===e||Po(e)?E(e):n(e)}function T(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function Q(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),M}function M(t){return Co(t)?To(e,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):O(t)}function O(t){return e.enter("htmlTextData"),l(t)}}};const hi={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}return e.length!==n.length&&so(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,o,i,l=e.length,a=0;for(;l--;)if(n=e[l][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[l][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[l][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=l,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(o=l);const s={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},A={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[r+a+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",s,t],["enter",A,t]],i=Ao(i,e.slice(r+1,r+a+3)),i=Ao(i,[["enter",c,t]]),i=Ao(i,No(t.parser.constructs.insideSpan.null,e.slice(r+a+4,o-3),t)),i=Ao(i,[["exit",c,t],e[o-2],e[o-1],["exit",A,t]]),i=Ao(i,e.slice(o+1)),i=Ao(i,[["exit",s,t]]),so(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,l=r.events.length;for(;l--;)if(("labelImage"===r.events[l][1].type||"labelLink"===r.events[l][1].type)&&!r.events[l][1]._balanced){o=r.events[l][1];break}return function(t){return o?o._inactive?c(t):(i=r.parser.defined.includes(go(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a):n(t)};function a(t){return 40===t?e.attempt(gi,A,i?A:c)(t):91===t?e.attempt(mi,A,i?s:c)(t):i?A(t):c(t)}function s(t){return e.attempt(vi,A,c)(t)}function A(e){return t(e)}function c(e){return o._balanced=!0,n(e)}}},gi={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return Po(t)?oi(e,o)(t):o(t)}function o(t){return 41===t?A(t):ti(e,i,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return Po(t)?oi(e,a)(t):A(t)}function l(e){return n(e)}function a(t){return 34===t||39===t||40===t?ri(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):A(t)}function s(t){return Po(t)?oi(e,A)(t):A(t)}function A(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},mi={tokenize:function(e,t,n){const r=this;return function(t){return ni.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(go(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},vi={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const yi={name:"labelStartImage",resolveAll:hi.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const wi={name:"labelStartLink",resolveAll:hi.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const bi={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),To(e,t,"linePrefix")}}};const ki={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,i(e)}(t)};function i(i){return i===r?(e.enter("thematicBreakSequence"),l(i)):o>=3&&(null===i||Eo(i))?(e.exit("thematicBreak"),t(i)):n(i)}function l(t){return t===r?(e.consume(t),o++,l):(e.exit("thematicBreakSequence"),Co(t)?To(e,i,"whitespace")(t):i(t))}}};const xi={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(zo,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,To(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!Co(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Pi,t,o)(n))});function o(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,To(e,e.attempt(xi,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,l=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:bo(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(ki,n,s)(t):s(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(t)}return n(t)};function a(t){return bo(t)&&++l<10?(e.consume(t),a):(!r.interrupt||l<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),s(t)):n(t)}function s(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(zo,r.interrupt?n:A,e.attempt(Ei,u,c))}function A(e){return r.containerState.initialBlankLine=!0,i++,u(e)}function c(t){return Co(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),u):n(t)}function u(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},Ei={partial:!0,tokenize:function(e,t,n){const r=this;return To(e,function(e){const o=r.events[r.events.length-1];return!Co(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Pi={partial:!0,tokenize:function(e,t,n){const r=this;return To(e,function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}};const Ci={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),!o&&"definition"===e[i][1].type&&(o=i);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",l,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=l,e.push(["exit",l,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let l,a=r.events.length;for(;a--;)if("lineEnding"!==r.events[a][1].type&&"linePrefix"!==r.events[a][1].type&&"content"!==r.events[a][1].type){l="paragraph"===r.events[a][1].type;break}return r.parser.lazy[r.now().line]||!r.interrupt&&!l?n(t):(e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),i(t)}(t))};function i(t){return t===o?(e.consume(t),i):(e.exit("setextHeadingLineSequence"),Co(t)?To(e,l,"lineSuffix")(t):l(t))}function l(r){return null===r||Eo(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const Si={tokenize:function(e){const t=this,n=e.attempt(zo,function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,r,To(e,e.attempt(this.parser.constructs.flow,r,e.attempt($o,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const Di={resolveAll:Qi()},Bi=Ti("string"),Ii=Ti("text");function Ti(e){return{resolveAll:Qi("text"===e?Mi:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,l);return i;function i(e){return s(e)?o(e):l(e)}function l(e){if(null!==e)return t.enter("data"),t.consume(e),a;t.consume(e)}function a(e){return s(e)?(t.exit("data"),o(e)):(t.consume(e),a)}function s(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function Qi(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):(!t[o]||"data"!==t[o][1].type)&&(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function Mi(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let i,l=o.length,a=-1,s=0;for(;l--;){const e=o[l];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)s++,a--;if(a)break;a=-1}else if(-2===e)i=!0,s++;else if(-1!==e){l++;break}}if(s){const o={type:n===e.length||i||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?a:r.start._bufferIndex+a,_index:r.start._index+l,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}const Oi={42:xi,43:xi,45:xi,48:xi,49:xi,50:xi,51:xi,52:xi,53:xi,54:xi,55:xi,56:xi,57:xi,62:jo},Li={91:ii},Ni={[-2]:Go,[-1]:Go,32:Go},Ri={35:si,42:ki,45:[Ci,ki],60:ui,61:Ci,95:ki,96:Vo,126:Vo},Hi={38:_o,92:Uo},Fi={[-5]:bi,[-4]:bi,[-3]:bi,33:yi,38:_o,42:Ro,60:[Fo,pi],91:wi,92:[ai,Uo],93:hi,95:Ro,96:Yo},zi={null:[Ro,Di]},ji=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:Li,disable:{null:[]},document:Oi,flow:Ri,flowInitial:Ni,insideSpan:zi,string:Hi,text:Fi},Symbol.toStringTag,{value:"Module"}));function Ui(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},i=[];let l=[],a=[];const s={attempt:h(function(e,t){g(e,t.from)}),check:h(p),consume:function(e){Eo(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,m()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),A.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=d(),A.events.push(["enter",n,A]),a.push(n),n},exit:function(e){const t=a.pop();return t.end=d(),A.events.push(["exit",t,A]),t},interrupt:h(p,{interrupt:!0})},A={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,m()},events:[],now:d,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let l;if("string"==typeof i)l=i;else switch(i){case-5:l="\r";break;case-4:l="\n";break;case-3:l="\r\n";break;case-2:l=t?" ":"\t";break;case-1:if(!t&&o)continue;l=" ";break;default:l=String.fromCharCode(i)}o=-2===i,r.push(l)}return r.join("")}(u(e),t)},sliceStream:u,write:function(e){return l=Ao(l,e),function(){let e;for(;r._index<l.length;){const t=l[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)f(t.charCodeAt(r._bufferIndex));else f(t)}}(),null!==l[l.length-1]?[]:(g(t,0),A.events=No(i,A.events,A),A.events)}};let c=t.tokenize.call(A,s);return t.resolveAll&&i.push(t),A;function u(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let l;if(n===o)l=[e[n].slice(r,i)];else{if(l=e.slice(n,o),r>-1){const e=l[0];"string"==typeof e?l[0]=e.slice(r):l.shift()}i>0&&l.push(e[o].slice(0,i))}return l}(l,e)}function d(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:i}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:i}}function f(e){c=c(e)}function p(e,t){t.restore()}function h(e,t){return function(n,o,i){let l,c,u,f;return Array.isArray(n)?p(n):"tokenize"in n?p([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return p([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function p(e){return l=e,c=0,0===e.length?i:h(e[c])}function h(e){return function(n){return f=function(){const e=d(),t=A.previous,n=A.currentConstruct,o=A.events.length,i=Array.from(a);return{from:o,restore:l};function l(){r=e,A.previous=t,A.currentConstruct=n,A.events.length=o,a=i,m()}}(),u=e,e.partial||(A.currentConstruct=e),e.name&&A.parser.constructs.disable.null.includes(e.name)?v():e.tokenize.call(t?Object.assign(Object.create(A),t):A,s,g,v)(n)}}function g(t){return e(u,f),o}function v(e){return f.restore(),++c<l.length?h(l[c]):i}}}function g(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&so(A.events,t,A.events.length-t,e.resolve(A.events.slice(t),A)),e.resolveTo&&(A.events=e.resolveTo(A.events,A))}function m(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const _i=/[\0\t\n\r]/g;const qi=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Vi(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return ho(n.slice(t?2:1),t?16:10)}return ao(n)||e}const Gi={}.hasOwnProperty;function Wi(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(te),autolinkProtocol:P,autolinkEmail:P,atxHeading:i(J),blockQuote:i(G),characterEscape:P,characterReference:P,codeFenced:i(W),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:i(W,l),codeText:i(Y,l),codeTextData:P,data:P,codeFlowValue:P,definition:i(K),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:i(X),hardBreakEscape:i(Z),hardBreakTrailing:i(Z),htmlFlow:i($,l),htmlFlowData:P,htmlText:i($,l),htmlTextData:P,image:i(ee),label:l,link:i(te),listItem:i(re),listItemValue:d,listOrdered:i(ne,u),listUnordered:i(ne),paragraph:i(oe),reference:F,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:i(J),strong:i(ie),thematicBreak:i(ae)},exit:{atxHeading:s(),atxHeadingSequence:b,autolink:s(),autolinkEmail:V,autolinkProtocol:q,blockQuote:s(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:j,characterReferenceMarkerNumeric:j,characterReferenceValue:U,characterReference:_,codeFenced:s(g),codeFencedFence:h,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:C,codeIndented:s(m),codeText:s(T),codeTextData:C,data:C,definition:s(),definitionDestinationString:w,definitionLabelString:v,definitionTitleString:y,emphasis:s(),hardBreakEscape:s(D),hardBreakTrailing:s(D),htmlFlow:s(B),htmlFlowData:C,htmlText:s(I),htmlTextData:C,image:s(M),label:L,labelText:O,lineEnding:S,link:s(Q),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:z,resourceDestinationString:N,resourceTitleString:R,resource:H,setextHeading:s(E),setextHeadingLineSequence:x,setextHeadingText:k,strong:s(),thematicBreak:s()}};Ki(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const i={stack:[r],tokenStack:[],config:t,enter:a,exit:A,buffer:l,resume:c,data:n},s=[];let u=-1;for(;++u<e.length;)if("listOrdered"===e[u][1].type||"listUnordered"===e[u][1].type)if("enter"===e[u][0])s.push(u);else{u=o(e,s.pop(),u)}for(u=-1;++u<e.length;){const n=t[e[u][0]];Gi.call(n,e[u][1].type)&&n[e[u][1].type].call(Object.assign({sliceSerialize:e[u][2].sliceSerialize},i),e[u][1])}if(i.tokenStack.length>0){const e=i.tokenStack[i.tokenStack.length-1];(e[1]||Ji).call(i,void 0,e[0])}for(r.position={start:Yi(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Yi(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},u=-1;++u<t.transforms.length;)r=t.transforms[u](r)||r;return r}function o(e,t,n){let r,o,i,l,a=t-1,s=-1,A=!1;for(;++a<=n;){const t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,l=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(r&&!l&&!s&&!i&&(i=a),l=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:l=void 0}if(!s&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===s&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let l=a;for(o=void 0;l--;){const t=e[l];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",A=!0),t[1].type="lineEnding",o=l}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}i&&(!o||i<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||a,0,["exit",r,t[2]]),a++,n++}if("listItemPrefix"===t[1].type){const o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(a,0,["enter",o,t[2]]),a++,n++,i=void 0,l=!0}}}return e[t][1]._spread=A,n}function i(e,t){return n;function n(n){a.call(this,e(n),n),t&&t.call(this,n)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Yi(t.start),end:void 0}}function s(e){return t;function t(t){e&&e.call(this,t),A.call(this,t)}}function A(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+Mr({start:e.start,end:e.end})+"): it’s not open");r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Ji).call(this,e,r[0])),n.position.end=Yi(e.end)}function c(){return function(e){return oo(e,"boolean"!=typeof ro.includeImageAlt||ro.includeImageAlt,"boolean"!=typeof ro.includeHtml||ro.includeHtml)}(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function d(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function f(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function p(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function v(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=go(this.sliceSerialize(e)).toLowerCase()}function y(){const e=this.resume();this.stack[this.stack.length-1].title=e}function w(){const e=this.resume();this.stack[this.stack.length-1].url=e}function b(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function x(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function P(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];(!n||"text"!==n.type)&&(n=le(),n.position={start:Yi(e.start),end:void 0},t.push(n)),this.stack.push(n)}function C(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Yi(e.end)}function S(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=Yi(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(P.call(this,e),C.call(this,e))}function D(){this.data.atHardBreak=!0}function B(){const e=this.resume();this.stack[this.stack.length-1].value=e}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.resume();this.stack[this.stack.length-1].value=e}function Q(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function O(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(qi,Vi)}(t),n.identifier=go(t).toLowerCase()}function L(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function N(){const e=this.resume();this.stack[this.stack.length-1].url=e}function R(){const e=this.resume();this.stack[this.stack.length-1].title=e}function H(){this.data.inReference=void 0}function F(){this.data.referenceType="collapsed"}function z(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=go(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function j(e){this.data.characterReferenceType=e.type}function U(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;n?(r=ho(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0):r=ao(t);this.stack[this.stack.length-1].value+=r}function _(e){this.stack.pop().position.end=Yi(e.end)}function q(e){C.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function V(e){C.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function G(){return{type:"blockquote",children:[]}}function W(){return{type:"code",lang:null,meta:null,value:""}}function Y(){return{type:"inlineCode",value:""}}function K(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function X(){return{type:"emphasis",children:[]}}function J(){return{type:"heading",depth:0,children:[]}}function Z(){return{type:"break"}}function $(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function ie(){return{type:"strong",children:[]}}function le(){return{type:"text",value:""}}function ae(){return{type:"thematicBreak"}}}(n)(function(e){for(;!Jo(e););return e}(function(e){const t={constructs:uo([ji,...(e||{}).extensions||[]]),content:n(Qo),defined:[],document:n(Mo),flow:n(Si),lazy:{},string:n(Bi),text:n(Ii)};return t;function n(e){return function(n){return Ui(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,l){const a=[];let s,A,c,u,d;for(o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),c=0,n="",r&&(65279===o.charCodeAt(0)&&c++,r=void 0);c<o.length;){if(_i.lastIndex=c,s=_i.exec(o),u=s&&void 0!==s.index?s.index:o.length,d=o.charCodeAt(u),!s){n=o.slice(c);break}if(10===d&&c===u&&e)a.push(-3),e=void 0;else switch(e&&(a.push(-5),e=void 0),c<u&&(a.push(o.slice(c,u)),t+=u-c),d){case 0:a.push(65533),t++;break;case 9:for(A=4*Math.ceil(t/4),a.push(-2);t++<A;)a.push(-1);break;case 10:a.push(-4),t=1;break;default:e=!0,t=1}c=u+1}return l&&(e&&a.push(-5),n&&a.push(n),a.push(null)),a}}()(e,t,!0))))}function Yi(e){return{line:e.line,column:e.column,offset:e.offset}}function Ki(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Ki(e,r):Xi(e,r)}}function Xi(e,t){let n;for(n in t)if(Gi.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Ji(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Mr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Mr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Mr({start:t.start,end:t.end})+") is still open")}function Zi(e){const t=this;t.parser=function(n){return Wi(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function $i(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&"text"===i.type?i.value="["+i.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&"text"===l.type?l.value+=r:o.push({type:"text",value:r}),o}function el(e){return e.spread??e.children.length>1}function tl(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(nl(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(nl(t.slice(o),o>0,!1)),i.join("")}function nl(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;9===t||32===t;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const rl={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=Io(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);void 0===a?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=i+1,a+=1,e.footnoteCounts.set(r,a);const s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,s);const A={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,A),e.applyData(t,A)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return $i(e,t);const o={src:Io(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){const n={src:Io(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return $i(e,t);const o={href:Io(r.url||"")};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){const n={href:Io(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),o=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=el(n[r])}return t}(n):el(t),i={},l=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const e=r[a];(o||0!==a||"element"!==e.type||"p"!==e.tagName)&&l.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?l.push(e):l.push(...e.children)}const s=r[r.length-1];s&&(o||"element"!==s.type||"p"!==s.tagName)&&l.push({type:"text",value:"\n"});const A={type:"element",tagName:"li",properties:i,children:l};return e.patch(t,A),e.applyData(t,A)},list:function(e,t){const n={},r=e.all(t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){const e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},i=Tr(t.children[1]),l=Ir(t.children[t.children.length-1]);i&&l&&(r.position={start:i,end:l}),o.push(r)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=0===(r?r.indexOf(t):1)?"th":"td",i=n&&"table"===n.type?n.align:void 0,l=i?i.length:t.children.length;let a=-1;const s=[];for(;++a<l;){const n=t.children[a],r={},l=i?i[a]:void 0;l&&(r.align=l);let A={type:"element",tagName:o,properties:r,children:[]};n&&(A.children=e.all(n),e.patch(n,A),A=e.applyData(n,A)),s.push(A)}const A={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,A),e.applyData(t,A)},text:function(e,t){const n={type:"text",value:tl(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:ol,yaml:ol,definition:ol,footnoteDefinition:ol};function ol(){}const il="object"==typeof self?self:globalThis,ll=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[i,l]=t[o];switch(i){case 0:case-1:return n(l,o);case 1:{const e=n([],o);for(const t of l)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of l)e[r(t)]=r(n);return e}case 3:return n(new Date(l),o);case 4:{const{source:e,flags:t}=l;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of l)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of l)e.add(r(t));return e}case 7:{const{name:e,message:t}=l;return n(new il[e](t),o)}case 8:return n(BigInt(l),o);case"BigInt":return n(Object(BigInt(l)),o);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:e}=new Uint8Array(l);return n(new DataView(e),l)}}return n(new il[i](l),o)};return r})(new Map,e)(0),al="",{toString:sl}={},{keys:Al}=Object,cl=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=sl.call(e).slice(8,-1);switch(n){case"Array":return[1,al];case"Object":return[2,al];case"Date":return[3,al];case"RegExp":return[4,al];case"Map":return[5,al];case"Set":return[6,al];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},ul=([e,t])=>0===e&&("function"===t||"symbol"===t),dl=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const o=(e,t)=>{const o=r.push(e)-1;return n.set(t,o),o},i=r=>{if(n.has(r))return n.get(r);let[l,a]=cl(r);switch(l){case 0:{let t=r;switch(a){case"bigint":l=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);t=null;break;case"undefined":return o([-1],r)}return o([l,t],r)}case 1:{if(a){let e=r;return"DataView"===a?e=new Uint8Array(r.buffer):"ArrayBuffer"===a&&(e=new Uint8Array(r)),o([a,[...e]],r)}const e=[],t=o([l,e],r);for(const t of r)e.push(i(t));return t}case 2:{if(a)switch(a){case"BigInt":return o([a,r.toString()],r);case"Boolean":case"Number":case"String":return o([a,r.valueOf()],r)}if(t&&"toJSON"in r)return i(r.toJSON());const n=[],s=o([l,n],r);for(const t of Al(r))(e||!ul(cl(r[t])))&&n.push([i(t),i(r[t])]);return s}case 3:return o([l,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([l,{source:e,flags:t}],r)}case 5:{const t=[],n=o([l,t],r);for(const[n,o]of r)(e||!ul(cl(n))&&!ul(cl(o)))&&t.push([i(n),i(o)]);return n}case 6:{const t=[],n=o([l,t],r);for(const n of r)(e||!ul(cl(n)))&&t.push(i(n));return n}}const{message:s}=r;return o([l,{name:a,message:s}],r)};return i})(!(t||n),!!t,new Map,r)(e),r},fl="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?ll(dl(e,t)):structuredClone(e):(e,t)=>ll(dl(e,t));function pl(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function hl(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const gl=function(e){if(null==e)return vl;if("function"==typeof e)return ml(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=gl(e[n]);return ml(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return ml(n);function n(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}}(e);if("string"==typeof e)return function(e){return ml(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function ml(e){return function(t,n,r){return!(!function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)||!e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function vl(){return!0}const yl=[],wl=!0,bl=!1;function kl(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=gl(o),l=r?-1:1;!function e(o,a,s){const A=o&&"object"==typeof o?o:{};if("string"==typeof A.type){const e="string"==typeof A.tagName?A.tagName:"string"==typeof A.name?A.name:void 0;Object.defineProperty(c,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return c;function c(){let A,c,u,d=yl;if((!t||i(o,a,s[s.length-1]||void 0))&&(d=function(e){return Array.isArray(e)?e:"number"==typeof e?[wl,e]:null==e?yl:[e]}(n(o,s)),d[0]===bl))return d;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==d[0])for(c=(r?t.children.length:-1)+l,u=s.concat(t);c>-1&&c<t.children.length;){const n=t.children[c];if(A=e(n,c,u)(),A[0]===bl)return A;c="number"==typeof A[1]?A[1]:c+l}}return d}}(e,void 0,[])()}function xl(e,t,n,r){let o,i,l;"function"==typeof t?(i=void 0,l=t,o=n):(i=t,l=n,o=r),kl(e,i,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return l(e,r,n)},o)}const El={}.hasOwnProperty,Pl={};function Cl(e,t){const n=t||Pl,r=new Map,o=new Map,i=new Map,l={...rl,...n.handlers},a={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=a.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(!Array.isArray(o)&&"text"===o.type&&(o.value=Tl(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=Tl(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:Dl,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:l,one:function(e,t){const n=e.type,r=a.handlers[n];if(El.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=fl(n);return r.children=a.all(e),r}return fl(e)}return(a.options.unknownHandler||Bl)(a,e,t)},options:n,patch:Sl,wrap:Il};return xl(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:o,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a}function Sl(e,t){e.position&&(t.position=function(e){const t=Tr(e),n=Ir(e);if(t&&n)return{start:t,end:n}}(e))}function Dl(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&o&&Object.assign(n.properties,fl(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Bl(e,t){const n=t.data||{},r=!("value"in t)||El.call(n,"hProperties")||El.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Il(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Tl(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ql(e,t){const n=Cl(e,t),r=n.one(e,void 0),o=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||pl,r=e.options.footnoteBackLabel||hl,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let s=-1;for(;++s<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[s]);if(!o)continue;const i=e.all(o),l=String(o.identifier).toUpperCase(),A=Io(l.toLowerCase());let c=0;const u=[],d=e.footnoteCounts.get(l);for(;void 0!==d&&++c<=d;){u.length>0&&u.push({type:"text",value:" "});let e="string"==typeof n?n:n(s,c);"string"==typeof e&&(e={type:"text",value:e}),u.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+A+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(s,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=i[i.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...u)}else i.push(...u);const p={type:"element",tagName:"li",properties:{id:t+"fn-"+A},children:e.wrap(i,!0)};e.patch(o,p),a.push(p)}if(0!==a.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...fl(l),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:"\n"}]}}(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:"\n"},o),i}function Ml(e,t){return e&&"run"in e?async function(n,r){const o=Ql(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Ql(n,{file:r,...e||t})}}function Ol(e){if(e)throw e}var Ll,Nl;var Rl=function(){if(Nl)return Ll;Nl=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return typeof r>"u"||e.call(n,r)},l=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},a=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return Ll=function e(){var t,n,r,s,A,c,u=arguments[0],d=1,f=arguments.length,p=!1;for("boolean"==typeof u&&(p=u,u=arguments[1]||{},d=2),(null==u||"object"!=typeof u&&"function"!=typeof u)&&(u={});d<f;++d)if(null!=(t=arguments[d]))for(n in t)r=a(u,n),u!==(s=a(t,n))&&(p&&s&&(i(s)||(A=o(s)))?(A?(A=!1,c=r&&o(r)?r:[]):c=r&&i(r)?r:{},l(u,{name:n,newValue:e(p,c,s)})):typeof s<"u"&&l(u,{name:n,newValue:s}));return u},Ll}();const Hl=kr(Rl);function Fl(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function zl(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(i,...l){const a=e[++n];let s=-1;if(i)r(i);else{for(;++s<t.length;)(null===l[s]||void 0===l[s])&&(l[s]=t[s]);t=l,a?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let l;r&&t.push(o);try{l=e.apply(this,t)}catch(e){if(r&&n)throw e;return o(e)}r||(l&&l.then&&"function"==typeof l.then?l.then(i,o):l instanceof Error?o(l):i(l))}function o(e,...r){n||(n=!0,t(e,...r))}function i(e){o(null,e)}}(a,o)(...l):r(null,...l)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const jl={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Ul(e);let n,r=0,o=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let l=-1,a=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else l<0&&(n=!0,l=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(o=i):(a=-1,o=l));return r===o?o=l:o<0&&(o=e.length),e.slice(r,o)},dirname:function(e){if(Ul(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){Ul(e);let t,n=e.length,r=-1,o=0,i=-1,l=0;for(;n--;){const a=e.codePointAt(n);if(47!==a)r<0&&(t=!0,r=n+1),46===a?i<0?i=n:1!==l&&(l=1):i>-1&&(l=-1);else if(t){o=n+1;break}}return i<0||r<0||0===l||1===l&&i===r-1&&i===o+1?"":e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)Ul(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Ul(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,l=-1,a=0,s=-1;for(;++s<=e.length;){if(s<e.length)n=e.codePointAt(s);else{if(47===n)break;n=47}if(47===n){if(l!==s-1&&1!==a)if(l!==s-1&&2===a){if(o.length<2||2!==i||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",i=0):(o=o.slice(0,r),i=o.length-1-o.lastIndexOf("/")),l=s,a=0;continue}}else if(o.length>0){o="",i=0,l=s,a=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(l+1,s):o=e.slice(l+1,s),i=s-l-1;l=s,a=0}else 46===n&&a>-1?a++:a=-1}return o}(e,!t);return 0===n.length&&!t&&(n="."),n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)},sep:"/"};function Ul(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const _l={cwd:function(){return"/"}};function ql(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Vl(e){if("string"==typeof e)e=new URL(e);else if(!ql(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const Gl=["history","path","basename","stem","extname","dirname"];class Wl{constructor(e){let t;var n;t=e?ql(e)?{path:e}:"string"==typeof e||(n=e)&&"object"==typeof n&&"byteLength"in n&&"byteOffset"in n?{value:e}:e:{},this.cwd="cwd"in t?"":_l.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r,o=-1;for(;++o<Gl.length;){const e=Gl[o];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(r in t)Gl.includes(r)||(this[r]=t[r])}get basename(){return"string"==typeof this.path?jl.basename(this.path):void 0}set basename(e){Kl(e,"basename"),Yl(e,"basename"),this.path=jl.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?jl.dirname(this.path):void 0}set dirname(e){Xl(this.basename,"dirname"),this.path=jl.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?jl.extname(this.path):void 0}set extname(e){if(Yl(e,"extname"),Xl(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=jl.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){ql(e)&&(e=Vl(e)),Kl(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?jl.basename(this.path,this.extname):void 0}set stem(e){Kl(e,"stem"),Yl(e,"stem"),this.path=jl.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new Rr(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function Yl(e,t){if(e&&e.includes(jl.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+jl.sep+"`")}function Kl(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Xl(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Jl=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},Zl={}.hasOwnProperty;class $l extends Jl{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=zl()}copy(){const e=new $l;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(Hl(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(ra("data",this.frozen),this.namespace[e]=t,this):Zl.call(this.namespace,e)&&this.namespace[e]||void 0:e?(ra("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=la(e),n=this.parser||this.Parser;return ta("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),ta("process",this.parser||this.Parser),na("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=la(e),l=n.parse(i);function a(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(l,i,function(e,t,r){if(e||!t||!r)return a(e);const o=t,i=n.stringify(o,r);var l;"string"==typeof(l=i)||function(e){return!!(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(l)?r.value=i:r.result=i,a(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),ta("processSync",this.parser||this.Parser),na("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,Ol(e),t=r}),ia("processSync","process",n),t}run(e,t,n){oa(e),this.freeze();const r=this.transformers;return!n&&"function"==typeof t&&(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,i){const l=la(t);r.run(e,l,function(t,r,l){const a=r||e;t?i(t):o?o(a):n(void 0,a,l)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){Ol(e),n=t,r=!0}),ia("runSync","run",r),n}stringify(e,t){this.freeze();const n=la(t),r=this.compiler||this.Compiler;return na("stringify",r),oa(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(ra("use",this.frozen),null!=e)if("function"==typeof e)a(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?l(e):i(e)}return this;function o(e){if("function"==typeof e)a(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;a(t,n)}else i(e)}}function i(e){if(!("plugins"in e)&&!("settings"in e))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");l(e.plugins),e.settings&&(r.settings=Hl(!0,r.settings,e.settings))}function l(e){let t=-1;if(null!=e){if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){o(e[t])}}}function a(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...i]=t;const l=n[o][1];Fl(l)&&Fl(r)&&(r=Hl(!0,l,r)),n[o]=[e,r,...i]}}}}const ea=(new $l).freeze();function ta(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function na(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function ra(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function oa(e){if(!Fl(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function ia(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function la(e){return function(e){return!!(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Wl(e)}const aa=[],sa={allowDangerousHtml:!0},Aa=/^(https?|ircs?|mailto|xmpp)$/i,ca=[{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 ua(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,l=e.disallowedElements,a=e.rehypePlugins||aa,s=e.remarkPlugins||aa,A=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...sa}:sa,c=e.skipHtml,u=e.unwrapDisallowed,d=e.urlTransform||da,f=ea().use(Zi).use(s).use(Ml,A).use(a),p=new Wl;"string"==typeof r&&(p.value=r);for(const t of ca)Object.hasOwn(e,t.from)&&(t.from,t.to&&t.to,t.id);const v=f.parse(p);let y=f.runSync(v,p);return o&&(y={type:"element",tagName:"div",properties:{className:o},children:"root"===y.type?y.children:[y]}),xl(y,function(e,r,o){if("raw"===e.type&&o&&"number"==typeof r)return c?o.children.splice(r,1):o.children[r]={type:"text",value:e.value},r;if("element"===e.type){let t;for(t in no)if(Object.hasOwn(no,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=no[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=d(String(n||""),t,e))}}if("element"===e.type){let i=t?!t.includes(e.tagName):!!l&&l.includes(e.tagName);if(!i&&n&&"number"==typeof r&&(i=!n(e,r,o)),i&&o&&"number"==typeof r)return u&&e.children?o.children.splice(r,1,...e.children):o.children.splice(r,1),r}}),Vr(y,{Fragment:m,components:i,ignoreInvalidStyle:!0,jsx:h,jsxs:g,passKeys:!0,passNode:!0})}function da(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return-1===t||-1!==o&&t>o||-1!==n&&t>n||-1!==r&&t>r||Aa.test(e.slice(0,t))?e:""}const fa=({children:e})=>h("div",{style:{whiteSpace:"normal"},children:h(ua,{components:{p:({...e})=>h("p",{style:{margin:0,marginBottom:"0.5em",lineHeight:1.4,textAlign:"left"},children:e.children}),ul:({...e})=>h("ul",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:e.children}),ol:({...e})=>h("ol",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:e.children}),li:({...e})=>h("li",{style:{marginBottom:"1px",lineHeight:1.4},children:e.children}),code:({inline:e,children:t})=>e?h("code",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"2px 4px",borderRadius:"4px",fontFamily:"inherit",fontSize:"0.95em"},children:t}):h("pre",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"8px",borderRadius:"4px",overflowX:"auto",margin:"0.5em 0",whiteSpace:"pre-wrap"},children:h("code",{children:t})}),blockquote:({...e})=>h("blockquote",{style:{margin:0,paddingLeft:"10px",borderLeft:"2px solid #ccc",color:"#666",fontStyle:"italic"},children:e.children})},children:"string"==typeof e?e:""})}),pa={autoConfig:!0},ha=e=>()=>(e=>{const{getFlow:t}=$t(),{messages:n,replaceMessages:r}=en(),{settings:o}=nn(),{hasChatHistoryLoaded:i}=on(),l={...e,...pa},a=l.markdownComponent?l.markdownComponent:fa;s(()=>{var e,t;if(i){const i=[...n];for(let n=0;n<i.length&&n<((null==(e=o.chatHistory)?void 0:e.maxEntries)??30);n++){const e=i[n];null!=(t=e.tags)&&t.includes("rcb-markdown-renderer-plugin:parsed")&&(e.contentWrapper=a)}r(i)}},[i]);const A=async e=>{var n;const r=null==(n=e.data.message)?void 0:n.sender.toUpperCase();((e,t,n)=>{var r;if("string"!=typeof e.data.message.content||!e.detail.currPath)return!1;const o=t[e.detail.currPath];return!!o&&((null==(r=o.renderMarkdown)?void 0:r.map(e=>e.toUpperCase()).includes(n))??!1)})(e,t(),r)&&(e.data.message.contentWrapper=a,e.data.message.tags||(e.data.message.tags=[]),e.data.message.tags.push("rcb-markdown-renderer-plugin:parsed"))};tn(J.PRE_INJECT_MESSAGE,A),tn(J.CHUNK_STREAM_MESSAGE,A),tn(J.START_STREAM_MESSAGE,A),tn(J.START_SIMULATE_STREAM_MESSAGE,A);const c={name:"@rcb-plugins/markdown-renderer"};return null!=l&&l.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0}}),c})(e),ga={autoConfig:!0,promptBaseColors:{info:"#007bff",warning:"#ffc107",error:"#dc3545",success:"#28a745"},promptHoveredColors:{info:"#0056b3",warning:"#d39e00",error:"#c82333",success:"#218838"},textAreaHighlightColors:{info:"#007bff",warning:"#ffc107",error:"#dc3545",success:"#28a745"}},ma=(e,t,n="validateTextInput")=>{var r;if(null==(r=e.detail)||!r.currPath)return;const o=t[e.detail.currPath];if(!o)return;const i=o[n];return"function"==typeof i?i:void 0},va=e=>{const{showToast:t}=(()=>{const{showToast:e,dismissToast:t,toasts:n,replaceToasts:r}=ct();return{showToast:e,dismissToast:t,toasts:n,replaceToasts:r}})(),{getFlow:n}=$t(),{styles:r,updateStyles:o,replaceStyles:i}=(()=>{const{styles:e,replaceStyles:t,updateStyles:n}=_t();return{styles:e,replaceStyles:t,updateStyles:n}})(),A=(e=>({...ga,...e,promptBaseColors:{...ga.promptBaseColors},promptHoveredColors:{...ga.promptHoveredColors},textAreaHighlightColors:{...ga.textAreaHighlightColors}}))(e),[c,u]=a(0),d=l({});tn(J.USER_SUBMIT_TEXT,e=>{const i=e,l=ma(i,n(),"validateTextInput");if(!l)return;const a=l(i.data.inputText);if(null!=a&&a.success||e.preventDefault(),!a.promptContent)return;0===c&&(d.current=structuredClone(r));const s=((e,t)=>{const n=e.promptType??"info";let r={};return t.advancedStyles&&(r=t.advancedStyles[n]),t.promptBaseColors&&(r.toastPromptStyle={color:t.promptBaseColors[n],borderColor:t.promptBaseColors[n]}),t.promptHoveredColors&&(r.toastPromptHoveredStyle={color:t.promptHoveredColors[n],borderColor:t.promptHoveredColors[n]}),t.textAreaHighlightColors&&(e.highlightTextArea??!0)&&(r.chatInputAreaStyle={boxShadow:`${t.textAreaHighlightColors[n]} 0px 0px 5px`}),r})(a,A);o(s),t(a.promptContent,a.promptDuration??3e3),u(e=>e+1)}),tn(J.USER_UPLOAD_FILE,e=>{var r,o;const i=e,l=null==(o=null==(r=i.data)?void 0:r.files)?void 0:o[0];if(!l)return console.error("No file uploaded."),void e.preventDefault();const a=ma(i,n(),"validateFileInput");if(!a)return void console.error("Validator not found for file input.");const s=a(l);if(!s.success)return console.error("Validation failed:",s),s.promptContent&&t(s.promptContent,s.promptDuration??3e3),void e.preventDefault();console.log("Validation successful:",s)}),tn(J.DISMISS_TOAST,()=>{u(e=>e-1)}),s(()=>{0===c&&setTimeout(()=>{i(d.current)})},[c,i]);const f={name:"@rcb-plugins/input-validator"};return A.autoConfig&&(f.settings={event:{rcbUserSubmitText:!0,rcbUserUploadFile:!0,rcbDismissToast:!0}}),f};function ya(){}function wa(){}const ba=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ka=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xa={};function Ea(e,t){return(xa.jsx?ka:ba).test(e)}const Pa=/[ \t\n\f\r]/g;function Ca(e){return""===e.replace(Pa,"")}class Sa{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function Da(e,t){const n={},r={};for(const t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Sa(n,r,t)}function Ba(e){return e.toLowerCase()}Sa.prototype.normal={},Sa.prototype.property={},Sa.prototype.space=void 0;class Ia{constructor(e,t){this.attribute=t,this.property=e}}Ia.prototype.attribute="",Ia.prototype.booleanish=!1,Ia.prototype.boolean=!1,Ia.prototype.commaOrSpaceSeparated=!1,Ia.prototype.commaSeparated=!1,Ia.prototype.defined=!1,Ia.prototype.mustUseProperty=!1,Ia.prototype.number=!1,Ia.prototype.overloadedBoolean=!1,Ia.prototype.property="",Ia.prototype.spaceSeparated=!1,Ia.prototype.space=void 0;let Ta=0;const Qa=Fa(),Ma=Fa(),Oa=Fa(),La=Fa(),Na=Fa(),Ra=Fa(),Ha=Fa();function Fa(){return 2**++Ta}var za=Object.freeze({__proto__:null,boolean:Qa,booleanish:Ma,commaOrSpaceSeparated:Ha,commaSeparated:Ra,number:La,overloadedBoolean:Oa,spaceSeparated:Na});const ja=Object.keys(za);class Ua extends Ia{constructor(e,t,n,r){let o=-1;if(super(e,t),_a(this,"space",r),"number"==typeof n)for(;++o<ja.length;){const e=ja[o];_a(this,ja[o],(n&za[e])===za[e])}}}function _a(e,t,n){n&&(e[t]=n)}function qa(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new Ua(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Ba(r)]=r,n[Ba(i.attribute)]=r}return new Sa(t,n,e.space)}Ua.prototype.defined=!0;const Va=qa({properties:{ariaActiveDescendant:null,ariaAtomic:Ma,ariaAutoComplete:null,ariaBusy:Ma,ariaChecked:Ma,ariaColCount:La,ariaColIndex:La,ariaColSpan:La,ariaControls:Na,ariaCurrent:null,ariaDescribedBy:Na,ariaDetails:null,ariaDisabled:Ma,ariaDropEffect:Na,ariaErrorMessage:null,ariaExpanded:Ma,ariaFlowTo:Na,ariaGrabbed:Ma,ariaHasPopup:null,ariaHidden:Ma,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Na,ariaLevel:La,ariaLive:null,ariaModal:Ma,ariaMultiLine:Ma,ariaMultiSelectable:Ma,ariaOrientation:null,ariaOwns:Na,ariaPlaceholder:null,ariaPosInSet:La,ariaPressed:Ma,ariaReadOnly:Ma,ariaRelevant:null,ariaRequired:Ma,ariaRoleDescription:Na,ariaRowCount:La,ariaRowIndex:La,ariaRowSpan:La,ariaSelected:Ma,ariaSetSize:La,ariaSort:null,ariaValueMax:La,ariaValueMin:La,ariaValueNow:La,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function Ga(e,t){return t in e?e[t]:t}function Wa(e,t){return Ga(e,t.toLowerCase())}const Ya=qa({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ra,acceptCharset:Na,accessKey:Na,action:null,allow:null,allowFullScreen:Qa,allowPaymentRequest:Qa,allowUserMedia:Qa,alt:null,as:null,async:Qa,autoCapitalize:null,autoComplete:Na,autoFocus:Qa,autoPlay:Qa,blocking:Na,capture:null,charSet:null,checked:Qa,cite:null,className:Na,cols:La,colSpan:null,content:null,contentEditable:Ma,controls:Qa,controlsList:Na,coords:La|Ra,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Qa,defer:Qa,dir:null,dirName:null,disabled:Qa,download:Oa,draggable:Ma,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Qa,formTarget:null,headers:Na,height:La,hidden:Oa,high:La,href:null,hrefLang:null,htmlFor:Na,httpEquiv:Na,id:null,imageSizes:null,imageSrcSet:null,inert:Qa,inputMode:null,integrity:null,is:null,isMap:Qa,itemId:null,itemProp:Na,itemRef:Na,itemScope:Qa,itemType:Na,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Qa,low:La,manifest:null,max:null,maxLength:La,media:null,method:null,min:null,minLength:La,multiple:Qa,muted:Qa,name:null,nonce:null,noModule:Qa,noValidate:Qa,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:Qa,optimum:La,pattern:null,ping:Na,placeholder:null,playsInline:Qa,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Qa,referrerPolicy:null,rel:Na,required:Qa,reversed:Qa,rows:La,rowSpan:La,sandbox:Na,scope:null,scoped:Qa,seamless:Qa,selected:Qa,shadowRootClonable:Qa,shadowRootDelegatesFocus:Qa,shadowRootMode:null,shape:null,size:La,sizes:null,slot:null,span:La,spellCheck:Ma,src:null,srcDoc:null,srcLang:null,srcSet:null,start:La,step:null,style:null,tabIndex:La,target:null,title:null,translate:null,type:null,typeMustMatch:Qa,useMap:null,value:Ma,width:La,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Na,axis:null,background:null,bgColor:null,border:La,borderColor:null,bottomMargin:La,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Qa,declare:Qa,event:null,face:null,frame:null,frameBorder:null,hSpace:La,leftMargin:La,link:null,longDesc:null,lowSrc:null,marginHeight:La,marginWidth:La,noResize:Qa,noHref:Qa,noShade:Qa,noWrap:Qa,object:null,profile:null,prompt:null,rev:null,rightMargin:La,rules:null,scheme:null,scrolling:Ma,standby:null,summary:null,text:null,topMargin:La,valueType:null,version:null,vAlign:null,vLink:null,vSpace:La,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Qa,disableRemotePlayback:Qa,prefix:null,property:null,results:La,security:null,unselectable:null},space:"html",transform:Wa}),Ka=qa({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:Ha,accentHeight:La,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:La,amplitude:La,arabicForm:null,ascent:La,attributeName:null,attributeType:null,azimuth:La,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:La,by:null,calcMode:null,capHeight:La,className:Na,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:La,diffuseConstant:La,direction:null,display:null,dur:null,divisor:La,dominantBaseline:null,download:Qa,dx:null,dy:null,edgeMode:null,editable:null,elevation:La,enableBackground:null,end:null,event:null,exponent:La,externalResourcesRequired:null,fill:null,fillOpacity:La,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:Ra,g2:Ra,glyphName:Ra,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:La,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:La,horizOriginX:La,horizOriginY:La,id:null,ideographic:La,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:La,k:La,k1:La,k2:La,k3:La,k4:La,kernelMatrix:Ha,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:La,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:La,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:La,overlineThickness:La,paintOrder:null,panose1:null,path:null,pathLength:La,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Na,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:La,pointsAtY:La,pointsAtZ:La,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ha,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ha,rev:Ha,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ha,requiredFeatures:Ha,requiredFonts:Ha,requiredFormats:Ha,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:La,specularExponent:La,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:La,strikethroughThickness:La,string:null,stroke:null,strokeDashArray:Ha,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:La,strokeOpacity:La,strokeWidth:null,style:null,surfaceScale:La,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ha,tabIndex:La,tableValues:null,target:null,targetX:La,targetY:La,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ha,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:La,underlineThickness:La,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:La,values:null,vAlphabetic:La,vMathematical:La,vectorEffect:null,vHanging:La,vIdeographic:La,version:null,vertAdvY:La,vertOriginX:La,vertOriginY:La,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:La,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ga}),Xa=qa({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),Ja=qa({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Wa}),Za=qa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),$a={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"},es=/[A-Z]/g,ts=/-[a-z]/g,ns=/^data[-\w.:]+$/i;function rs(e){return"-"+e.toLowerCase()}function os(e){return e.charAt(1).toUpperCase()}const is=Da([Va,Ya,Xa,Ja,Za],"html"),ls=Da([Va,Ka,Xa,Ja,Za],"svg");var as="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ss(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var As={},cs=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,us=/\n/g,ds=/^\s*/,fs=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,ps=/^:\s*/,hs=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,gs=/^[;\s]*/,ms=/^\s+|\s+$/g,vs="";function ys(e){return e?e.replace(ms,vs):vs}var ws=as&&as.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(As,"__esModule",{value:!0}),As.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,bs.default)(e),o="function"==typeof t;return r.forEach(function(e){if("declaration"===e.type){var r=e.property,i=e.value;o?t(r,i,e):i&&((n=n||{})[r]=i)}}),n};var bs=ws(function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(e){var t=e.match(us);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function i(){var e={line:n,column:r};return function(t){return t.position=new l(e),A(),t}}function l(e){this.start=e,this.end={line:n,column:r},this.source=t.source}function a(o){var i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i}function s(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function A(){s(ds)}function c(e){var t;for(e=e||[];t=u();)!1!==t&&e.push(t);return e}function u(){var t=i();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;vs!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,vs===e.charAt(n-1))return a("End of comment missing");var l=e.slice(2,n-2);return r+=2,o(l),e=e.slice(n),r+=2,t({type:"comment",comment:l})}}function d(){var e=i(),t=s(fs);if(t){if(u(),!s(ps))return a("property missing ':'");var n=s(hs),r=e({type:"declaration",property:ys(t[0].replace(cs,vs)),value:n?ys(n[0].replace(cs,vs)):vs});return s(gs),r}}return l.prototype.content=e,A(),function(){var e,t=[];for(c(t);e=d();)!1!==e&&(t.push(e),c(t));return t}()});var ks={};Object.defineProperty(ks,"__esModule",{value:!0}),ks.camelCase=void 0;var xs=/^--[a-zA-Z0-9_-]+$/,Es=/-([a-z])/g,Ps=/^[^-]+$/,Cs=/^-(webkit|moz|ms|o|khtml)-/,Ss=/^-(ms)-/,Ds=function(e,t){return t.toUpperCase()},Bs=function(e,t){return"".concat(t,"-")};ks.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||Ps.test(e)||xs.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(Ss,Bs):e.replace(Cs,Bs)).replace(Es,Ds))};var Is=(as&&as.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(As),Ts=ks;function Qs(e,t){var n={};return e&&"string"==typeof e?((0,Is.default)(e,function(e,r){e&&r&&(n[(0,Ts.camelCase)(e,t)]=r)}),n):n}Qs.default=Qs;var Ms=ss(Qs);const Os=Ns("end"),Ls=Ns("start");function Ns(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function Rs(e){return e&&"object"==typeof e?"position"in e||"type"in e?Fs(e.position):"start"in e||"end"in e?Fs(e):"line"in e||"column"in e?Hs(e):"":""}function Hs(e){return zs(e&&e.line)+":"+zs(e&&e.column)}function Fs(e){return Hs(e&&e.start)+"-"+Hs(e&&e.end)}function zs(e){return e&&"number"==typeof e?e:1}class js extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},i=!1;if(t&&(o="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!o.cause&&e&&(i=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){const e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.position)}const l=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=l?l.line:void 0,this.name=Rs(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=i&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}js.prototype.file="",js.prototype.name="",js.prototype.reason="",js.prototype.message="",js.prototype.stack="",js.prototype.column=void 0,js.prototype.line=void 0,js.prototype.ancestors=void 0,js.prototype.cause=void 0,js.prototype.fatal=void 0,js.prototype.place=void 0,js.prototype.ruleId=void 0,js.prototype.source=void 0;const Us={}.hasOwnProperty,_s=new Map,qs=/[A-Z]/g,Vs=new Set(["table","tbody","thead","tfoot","tr"]),Gs=new Set(["td","th"]),Ws="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ys(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,o,i){const l=Array.isArray(o.children),a=Ls(n);return t(r,o,i,l,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,o,i){const l=Array.isArray(o.children)?n:t;return i?l(r,o,i):l(r,o)}}(0,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?ls:is,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=Ks(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Ks(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(o=ls,e.schema=o);e.ancestors.push(t);const i=eA(e,t.tagName,!1),l=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&Us.call(t.properties,o)){const i=$s(e,o,t.properties[o]);if(i){const[o,l]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof l&&Gs.has(t.tagName)?r=l:n[o]=l}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let a=Zs(e,t);Vs.has(t.tagName)&&(a=a.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&Ca(t.value):Ca(t));var t}));return Xs(e,l,i,t),Js(l,a),e.ancestors.pop(),e.schema=r,e.create(t,i,l,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}tA(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.name&&"html"===r.space&&(o=ls,e.schema=o);e.ancestors.push(t);const i=null===t.name?e.Fragment:eA(e,t.name,!0),l=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];ya(t.type);const o=t.expression;ya(o.type);const i=o.properties[0];ya(i.type),Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else tA(e,t.position);else{const o=r.name;let i;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];ya(t.type),i=e.evaluater.evaluateExpression(t.expression)}else tA(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),a=Zs(e,t);return Xs(e,l,i,t),Js(l,a),e.ancestors.pop(),e.schema=r,e.create(t,i,l,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);tA(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Js(r,Zs(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function Xs(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Js(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Zs(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:_s;for(;++r<t.children.length;){const i=t.children[r];let l;if(e.passKeys){const e="element"===i.type?i.tagName:"mdxJsxFlowElement"===i.type||"mdxJsxTextElement"===i.type?i.name:void 0;if(e){const t=o.get(e)||0;l=e+"-"+t,o.set(e,t+1)}}const a=Ks(e,i,l);void 0!==a&&n.push(a)}return n}function $s(e,t,n){const r=function(e,t){const n=Ba(t);let r=t,o=Ia;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&ns.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(ts,os);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!ts.test(e)){let n=e.replace(es,rs);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=Ua}return new o(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return Ms(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const n=t,r=new js("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Ws+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Us.call(e,n)&&(t[nA(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?$a[r.property]||r.property:r.attribute,n]}}function eA(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=Ea(e[o])?{type:"Identifier",name:e[o]}:{type:"Literal",value:e[o]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(o&&"Literal"===t.type),optional:!1}:t}r=n}else r=Ea(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return Us.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);tA(e)}function tA(e,t){const n=new js("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Ws+"#cannot-handle-mdx-estrees-without-createevaluater",n}function nA(e){let t=e.replace(qs,rA);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function rA(e){return"-"+e.toLowerCase()}const oA={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"]},iA={};function lA(e,t){return aA(e,"boolean"!=typeof iA.includeImageAlt||iA.includeImageAlt,"boolean"!=typeof iA.includeHtml||iA.includeHtml)}function aA(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return sA(e.children,t,n)}return Array.isArray(e)?sA(e,t,n):""}function sA(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=aA(e[o],t,n);return r.join("")}const AA=document.createElement("i");function cA(e){const t="&"+e+";";AA.innerHTML=t;const n=AA.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function uA(e,t,n,r){const o=e.length;let i,l=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);l<r.length;)i=r.slice(l,l+1e4),i.unshift(t,0),e.splice(...i),l+=1e4,t+=1e4}function dA(e,t){return e.length>0?(uA(e,e.length,0,t),e):t}const fA={}.hasOwnProperty;function pA(e){const t={};let n=-1;for(;++n<e.length;)hA(t,e[n]);return t}function hA(e,t){let n;for(n in t){const r=(fA.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){fA.call(r,i)||(r[i]=[]);const e=o[i];gA(r[i],Array.isArray(e)?e:e?[e]:[])}}}function gA(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);uA(e,0,0,r)}function mA(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function vA(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const yA=TA(/[A-Za-z]/),wA=TA(/[\dA-Za-z]/),bA=TA(/[#-'*+\--9=?A-Z^-~]/);function kA(e){return null!==e&&(e<32||127===e)}const xA=TA(/\d/),EA=TA(/[\dA-Fa-f]/),PA=TA(/[!-/:-@[-`{-~]/);function CA(e){return null!==e&&e<-2}function SA(e){return null!==e&&(e<0||32===e)}function DA(e){return-2===e||-1===e||32===e}const BA=TA(/\p{P}|\p{S}/u),IA=TA(/\s/);function TA(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function QA(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let l="";if(37===i&&wA(e.charCodeAt(n+1))&&wA(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(l=String.fromCharCode(i));else if(i>55295&&i<57344){const t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(l=String.fromCharCode(i,t),o=1):l="�"}else l=String.fromCharCode(i);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function MA(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){if(DA(r))return e.enter(n),l(r);return t(r)};function l(r){return DA(r)&&i++<o?(e.consume(r),l):(e.exit(n),t(r))}}const OA={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),MA(e,t,"linePrefix")},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):CA(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const LA={tokenize:function(e){const t=this,n=[];let r,o,i,l=0;return a;function a(r){if(l<n.length){const o=n[l];return t.containerState=o[1],e.attempt(o[0].continuation,s,A)(r)}return A(r)}function s(e){if(l++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&v();const n=t.events.length;let o,i=n;for(;i--;)if("exit"===t.events[i][0]&&"chunkFlow"===t.events[i][1].type){o=t.events[i][1].end;break}m(l);let a=n;for(;a<t.events.length;)t.events[a][1].end={...o},a++;return uA(t.events,i+1,0,t.events.slice(n)),t.events.length=a,A(e)}return a(e)}function A(o){if(l===n.length){if(!r)return d(o);if(r.currentConstruct&&r.currentConstruct.concrete)return p(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(NA,c,u)(o)}function c(e){return r&&v(),m(l),d(e)}function u(e){return t.parser.lazy[t.now().line]=l!==n.length,i=t.now().offset,p(e)}function d(n){return t.containerState={},e.attempt(NA,f,p)(n)}function f(e){return l++,n.push([t.currentConstruct,t.containerState]),d(e)}function p(n){return null===n?(r&&v(),m(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),h(n))}function h(n){return null===n?(g(e.exit("chunkFlow"),!0),m(0),void e.consume(n)):CA(n)?(e.consume(n),g(e.exit("chunkFlow")),l=0,t.interrupt=void 0,a):(e.consume(n),h)}function g(e,n){const a=t.sliceStream(e);if(n&&a.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(a),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<i&&(!r.events[e][1].end||r.events[e][1].end.offset>i))return;const n=t.events.length;let o,a,s=n;for(;s--;)if("exit"===t.events[s][0]&&"chunkFlow"===t.events[s][1].type){if(o){a=t.events[s][1].end;break}o=!0}for(m(l),e=n;e<t.events.length;)t.events[e][1].end={...a},e++;uA(t.events,s+1,0,t.events.slice(n)),t.events.length=e}}function m(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},NA={tokenize:function(e,t,n){return MA(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function RA(e){return null===e||SA(e)||IA(e)?1:BA(e)?2:void 0}function HA(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const FA={name:"attention",resolveAll:function(e,t){let n,r,o,i,l,a,s,A,c=-1;for(;++c<e.length;)if("enter"===e[c][0]&&"attentionSequence"===e[c][1].type&&e[c][1]._close)for(n=c;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[c][1]).charCodeAt(0)){if((e[n][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;a=e[n][1].end.offset-e[n][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;const u={...e[n][1].end},d={...e[c][1].start};zA(u,-a),zA(d,a),i={type:a>1?"strongSequence":"emphasisSequence",start:u,end:{...e[n][1].end}},l={type:a>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:d},o={type:a>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[c][1].start}},r={type:a>1?"strong":"emphasis",start:{...i.start},end:{...l.end}},e[n][1].end={...i.start},e[c][1].start={...l.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=dA(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=dA(s,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),s=dA(s,HA(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),s=dA(s,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(A=2,s=dA(s,[["enter",e[c][1],t],["exit",e[c][1],t]])):A=0,uA(e,n-1,c-n+3,s),c=n+s.length-A-2;break}c=-1;for(;++c<e.length;)"attentionSequence"===e[c][1].type&&(e[c][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=RA(r);let i;return function(t){return i=t,e.enter("attentionSequence"),l(t)};function l(a){if(a===i)return e.consume(a),l;const s=e.exit("attentionSequence"),A=RA(a),c=!A||2===A&&o||n.includes(a),u=!o||2===o&&A||n.includes(r);return s._open=Boolean(42===i?c:c&&(o||!u)),s._close=Boolean(42===i?u:u&&(A||!c)),t(a)}}};function zA(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const jA={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return yA(t)?(e.consume(t),i):64===t?n(t):s(t)}function i(e){return 43===e||45===e||46===e||wA(e)?(r=1,l(e)):s(e)}function l(t){return 58===t?(e.consume(t),r=0,a):(43===t||45===t||46===t||wA(t))&&r++<32?(e.consume(t),l):(r=0,s(t))}function a(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||kA(r)?n(r):(e.consume(r),a)}function s(t){return 64===t?(e.consume(t),A):bA(t)?(e.consume(t),s):n(t)}function A(e){return wA(e)?c(e):n(e)}function c(n){return 46===n?(e.consume(n),r=0,A):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):u(n)}function u(t){if((45===t||wA(t))&&r++<63){const n=45===t?u:c;return e.consume(t),n}return n(t)}}};const UA={partial:!0,tokenize:function(e,t,n){return function(t){return DA(t)?MA(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||CA(e)?t(e):n(e)}}};const _A={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(DA(t))return MA(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(_A,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return DA(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const qA={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return PA(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const VA={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,l=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),o=31,i=wA,A(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=EA,A):(e.enter("characterReferenceValue"),o=7,i=xA,A(t))}function A(a){if(59===a&&l){const o=e.exit("characterReferenceValue");return i!==wA||cA(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return i(a)&&l++<o?(e.consume(a),A):n(a)}}};const GA={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},WA={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return l;function l(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s}function s(t){return e.enter("codeFencedFence"),DA(t)?MA(e,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):A(t)}function A(t){return t===i?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===i?(o++,e.consume(t),c):o>=a?(e.exit("codeFencedFenceSequence"),DA(t)?MA(e,u,"whitespace")(t):u(t)):n(t)}function u(r){return null===r||CA(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let i,l=0,a=0;return function(t){return function(t){const n=r.events[r.events.length-1];return l=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,i=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s(t)}(t)};function s(t){return t===i?(a++,e.consume(t),s):a<3?n(t):(e.exit("codeFencedFenceSequence"),DA(t)?MA(e,A,"whitespace")(t):A(t))}function A(n){return null===n||CA(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(GA,f,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(n))}function c(t){return null===t||CA(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),A(t)):DA(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),MA(e,u,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),c)}function u(t){return null===t||CA(t)?A(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||CA(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),A(t)):96===t&&t===i?n(t):(e.consume(t),d)}function f(t){return e.attempt(o,v,p)(t)}function p(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),h}function h(t){return l>0&&DA(t)?MA(e,g,"linePrefix",l+1)(t):g(t)}function g(t){return null===t||CA(t)?e.check(GA,f,v)(t):(e.enter("codeFlowValue"),m(t))}function m(t){return null===t||CA(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),m)}function v(n){return e.exit("codeFenced"),t(n)}}};const YA={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),MA(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?i(e):n(e)}function i(t){return null===t?a(t):CA(t)?e.attempt(KA,i,a)(t):(e.enter("codeFlowValue"),l(t))}function l(t){return null===t||CA(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),l)}function a(n){return e.exit("codeIndented"),t(n)}}},KA={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):CA(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):MA(e,i,"linePrefix",5)(t)}function i(e){const i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):CA(e)?o(e):n(e)}}};const XA={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}t=o-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,o,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),l(t)};function l(t){return 96===t?(e.consume(t),i++,l):(e.exit("codeTextSequence"),a(t))}function a(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),a):96===t?(o=e.enter("codeTextSequence"),r=0,A(t)):CA(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):(e.enter("codeTextData"),s(t))}function s(t){return null===t||32===t||96===t||CA(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),s)}function A(n){return 96===n?(e.consume(n),r++,A):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",s(n))}}};class JA{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,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&ZA(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),ZA(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),ZA(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);ZA(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);ZA(this.left,t.reverse())}}}function ZA(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function $A(e){const t={};let n,r,o,i,l,a,s,A=-1;const c=new JA(e);for(;++A<c.length;){for(;A in t;)A=t[A];if(n=c.get(A),A&&"chunkFlow"===n[1].type&&"listItemPrefix"===c.get(A-1)[1].type&&(a=n[1]._tokenizer.events,o=0,o<a.length&&"lineEndingBlank"===a[o][1].type&&(o+=2),o<a.length&&"content"===a[o][1].type))for(;++o<a.length&&"content"!==a[o][1].type;)"chunkText"===a[o][1].type&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,ec(c,A)),A=t[A],s=!0);else if(n[1]._container){for(o=A,r=void 0;o--;)if(i=c.get(o),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(r&&(c.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);else if("linePrefix"!==i[1].type&&"listItemIndent"!==i[1].type)break;r&&(n[1].end={...c.get(r)[1].start},l=c.slice(r,A),l.unshift(n),c.splice(r,A-r+1,l))}}return uA(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!s}function ec(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,s=[],A={};let c,u,d=-1,f=n,p=0,h=0;const g=[h];for(;f;){for(;e.get(++o)[1]!==f;);i.push(o),f._tokenizer||(c=r.sliceStream(f),f.next||c.push(null),u&&l.defineSkip(f.start),f._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(c),f._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),u=f,f=f.next}for(f=n;++d<a.length;)"exit"===a[d][0]&&"enter"===a[d-1][0]&&a[d][1].type===a[d-1][1].type&&a[d][1].start.line!==a[d][1].end.line&&(h=d+1,g.push(h),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(l.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),d=g.length;d--;){const t=a.slice(g[d],g[d+1]),n=i.pop();s.push([n,n+t.length-1]),e.splice(n,2,t)}for(s.reverse(),d=-1;++d<s.length;)A[p+s[d][0]]=p+s[d][1],p+=s[d][1]-s[d][0]-1;return A}const tc={resolve:function(e){return $A(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):CA(t)?e.check(nc,i,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function i(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},nc={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),MA(e,o,"linePrefix")};function o(o){if(null===o||CA(o))return n(o);const i=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}};function rc(e,t,n,r,o,i,l,a,s){const A=s||Number.POSITIVE_INFINITY;let c=0;return function(t){if(60===t)return e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),u;if(null===t||32===t||41===t||kA(t))return n(t);return e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),p(t)};function u(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(a),u(t)):null===t||60===t||CA(t)?n(t):(e.consume(t),92===t?f:d)}function f(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function p(o){return c||null!==o&&41!==o&&!SA(o)?c<A&&40===o?(e.consume(o),c++,p):41===o?(e.consume(o),c--,p):null===o||32===o||40===o||kA(o)?n(o):(e.consume(o),92===o?h:p):(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(o))}function h(t){return 40===t||41===t||92===t?(e.consume(t),p):p(t)}}function oc(e,t,n,r,o,i){const l=this;let a,s=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),A};function A(u){return s>999||null===u||91===u||93===u&&!a||94===u&&!s&&"_hiddenFootnoteSupport"in l.parser.constructs?n(u):93===u?(e.exit(i),e.enter(o),e.consume(u),e.exit(o),e.exit(r),t):CA(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),A):(e.enter("chunkString",{contentType:"string"}),c(u))}function c(t){return null===t||91===t||93===t||CA(t)||s++>999?(e.exit("chunkString"),A(t)):(e.consume(t),a||(a=!DA(t)),92===t?u:c)}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}}function ic(e,t,n,r,o,i){let l;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(o),e.consume(t),e.exit(o),l=40===t?41:t,a;return n(t)};function a(n){return n===l?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),s(n))}function s(t){return t===l?(e.exit(i),a(l)):null===t?n(t):CA(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),MA(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),A(t))}function A(t){return t===l||null===t||CA(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?c:A)}function c(t){return t===l||92===t?(e.consume(t),A):A(t)}}function lc(e,t){let n;return function r(o){if(CA(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(DA(o))return MA(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}const ac={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return oc.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=vA(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),l):n(t)}function l(t){return SA(t)?lc(e,a)(t):a(t)}function a(t){return rc(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(sc,A,A)(t)}function A(t){return DA(t)?MA(e,c,"whitespace")(t):c(t)}function c(i){return null===i||CA(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},sc={partial:!0,tokenize:function(e,t,n){return function(t){return SA(t)?lc(e,r)(t):n(t)};function r(t){return ic(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return DA(t)?MA(e,i,"whitespace")(t):i(t)}function i(e){return null===e||CA(e)?t(e):n(e)}}};const Ac={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return CA(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const cc={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,i=3;"whitespace"===e[i][1].type&&(i+=2);o-2>i&&"whitespace"===e[o][1].type&&(o-=2);"atxHeadingSequence"===e[o][1].type&&(i===o-1||o-4>i&&"whitespace"===e[o-2][1].type)&&(o-=i+1===o?2:4);o>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},r={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},uA(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||SA(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),l(n)):null===n||CA(n)?(e.exit("atxHeading"),t(n)):DA(n)?MA(e,i,"whitespace")(n):(e.enter("atxHeadingText"),a(n))}function l(t){return 35===t?(e.consume(t),l):(e.exit("atxHeadingSequence"),i(t))}function a(t){return null===t||35===t||SA(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),a)}}};const uc=["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"],dc=["pre","script","style","textarea"],fc={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let o,i,l,a,s;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),A}(t)};function A(a){return 33===a?(e.consume(a),c):47===a?(e.consume(a),i=!0,f):63===a?(e.consume(a),o=3,r.interrupt?t:O):yA(a)?(e.consume(a),l=String.fromCharCode(a),p):n(a)}function c(i){return 45===i?(e.consume(i),o=2,u):91===i?(e.consume(i),o=5,a=0,d):yA(i)?(e.consume(i),o=4,r.interrupt?t:O):n(i)}function u(o){return 45===o?(e.consume(o),r.interrupt?t:O):n(o)}function d(o){const i="CDATA[";return o===i.charCodeAt(a++)?(e.consume(o),6===a?r.interrupt?t:C:d):n(o)}function f(t){return yA(t)?(e.consume(t),l=String.fromCharCode(t),p):n(t)}function p(a){if(null===a||47===a||62===a||SA(a)){const s=47===a,A=l.toLowerCase();return s||i||!dc.includes(A)?uc.includes(l.toLowerCase())?(o=6,s?(e.consume(a),h):r.interrupt?t(a):C(a)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(a):i?g(a):m(a)):(o=1,r.interrupt?t(a):C(a))}return 45===a||wA(a)?(e.consume(a),l+=String.fromCharCode(a),p):n(a)}function h(o){return 62===o?(e.consume(o),r.interrupt?t:C):n(o)}function g(t){return DA(t)?(e.consume(t),g):E(t)}function m(t){return 47===t?(e.consume(t),E):58===t||95===t||yA(t)?(e.consume(t),v):DA(t)?(e.consume(t),m):E(t)}function v(t){return 45===t||46===t||58===t||95===t||wA(t)?(e.consume(t),v):y(t)}function y(t){return 61===t?(e.consume(t),w):DA(t)?(e.consume(t),y):m(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),s=t,b):DA(t)?(e.consume(t),w):k(t)}function b(t){return t===s?(e.consume(t),s=null,x):null===t||CA(t)?n(t):(e.consume(t),b)}function k(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||SA(t)?y(t):(e.consume(t),k)}function x(e){return 47===e||62===e||DA(e)?m(e):n(e)}function E(t){return 62===t?(e.consume(t),P):n(t)}function P(t){return null===t||CA(t)?C(t):DA(t)?(e.consume(t),P):n(t)}function C(t){return 45===t&&2===o?(e.consume(t),I):60===t&&1===o?(e.consume(t),T):62===t&&4===o?(e.consume(t),L):63===t&&3===o?(e.consume(t),O):93===t&&5===o?(e.consume(t),M):!CA(t)||6!==o&&7!==o?null===t||CA(t)?(e.exit("htmlFlowData"),S(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(pc,N,S)(t))}function S(t){return e.check(hc,D,N)(t)}function D(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),B}function B(t){return null===t||CA(t)?S(t):(e.enter("htmlFlowData"),C(t))}function I(t){return 45===t?(e.consume(t),O):C(t)}function T(t){return 47===t?(e.consume(t),l="",Q):C(t)}function Q(t){if(62===t){const n=l.toLowerCase();return dc.includes(n)?(e.consume(t),L):C(t)}return yA(t)&&l.length<8?(e.consume(t),l+=String.fromCharCode(t),Q):C(t)}function M(t){return 93===t?(e.consume(t),O):C(t)}function O(t){return 62===t?(e.consume(t),L):45===t&&2===o?(e.consume(t),O):C(t)}function L(t){return null===t||CA(t)?(e.exit("htmlFlowData"),N(t)):(e.consume(t),L)}function N(n){return e.exit("htmlFlow"),t(n)}}},pc={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(UA,t,n)}}},hc={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(CA(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o;return n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const gc={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,l;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),s):47===t?(e.consume(t),w):63===t?(e.consume(t),v):yA(t)?(e.consume(t),x):n(t)}function s(t){return 45===t?(e.consume(t),A):91===t?(e.consume(t),i=0,f):yA(t)?(e.consume(t),m):n(t)}function A(t){return 45===t?(e.consume(t),d):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),u):CA(t)?(l=c,Q(t)):(e.consume(t),c)}function u(t){return 45===t?(e.consume(t),d):c(t)}function d(e){return 62===e?T(e):45===e?u(e):c(e)}function f(t){const r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),6===i?p:f):n(t)}function p(t){return null===t?n(t):93===t?(e.consume(t),h):CA(t)?(l=p,Q(t)):(e.consume(t),p)}function h(t){return 93===t?(e.consume(t),g):p(t)}function g(t){return 62===t?T(t):93===t?(e.consume(t),g):p(t)}function m(t){return null===t||62===t?T(t):CA(t)?(l=m,Q(t)):(e.consume(t),m)}function v(t){return null===t?n(t):63===t?(e.consume(t),y):CA(t)?(l=v,Q(t)):(e.consume(t),v)}function y(e){return 62===e?T(e):v(e)}function w(t){return yA(t)?(e.consume(t),b):n(t)}function b(t){return 45===t||wA(t)?(e.consume(t),b):k(t)}function k(t){return CA(t)?(l=k,Q(t)):DA(t)?(e.consume(t),k):T(t)}function x(t){return 45===t||wA(t)?(e.consume(t),x):47===t||62===t||SA(t)?E(t):n(t)}function E(t){return 47===t?(e.consume(t),T):58===t||95===t||yA(t)?(e.consume(t),P):CA(t)?(l=E,Q(t)):DA(t)?(e.consume(t),E):T(t)}function P(t){return 45===t||46===t||58===t||95===t||wA(t)?(e.consume(t),P):C(t)}function C(t){return 61===t?(e.consume(t),S):CA(t)?(l=C,Q(t)):DA(t)?(e.consume(t),C):E(t)}function S(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,D):CA(t)?(l=S,Q(t)):DA(t)?(e.consume(t),S):(e.consume(t),B)}function D(t){return t===o?(e.consume(t),o=void 0,I):null===t?n(t):CA(t)?(l=D,Q(t)):(e.consume(t),D)}function B(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||SA(t)?E(t):(e.consume(t),B)}function I(e){return 47===e||62===e||SA(e)?E(e):n(e)}function T(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function Q(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),M}function M(t){return DA(t)?MA(e,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):O(t)}function O(t){return e.enter("htmlTextData"),l(t)}}};const mc={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&uA(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,o,i,l=e.length,a=0;for(;l--;)if(n=e[l][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[l][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[l][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=l,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(o=l);const s={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},A={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[r+a+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",s,t],["enter",A,t]],i=dA(i,e.slice(r+1,r+a+3)),i=dA(i,[["enter",c,t]]),i=dA(i,HA(t.parser.constructs.insideSpan.null,e.slice(r+a+4,o-3),t)),i=dA(i,[["exit",c,t],e[o-2],e[o-1],["exit",A,t]]),i=dA(i,e.slice(o+1)),i=dA(i,[["exit",s,t]]),uA(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,l=r.events.length;for(;l--;)if(("labelImage"===r.events[l][1].type||"labelLink"===r.events[l][1].type)&&!r.events[l][1]._balanced){o=r.events[l][1];break}return function(t){if(!o)return n(t);if(o._inactive)return c(t);return i=r.parser.defined.includes(vA(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a};function a(t){return 40===t?e.attempt(vc,A,i?A:c)(t):91===t?e.attempt(yc,A,i?s:c)(t):i?A(t):c(t)}function s(t){return e.attempt(wc,A,c)(t)}function A(e){return t(e)}function c(e){return o._balanced=!0,n(e)}}},vc={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return SA(t)?lc(e,o)(t):o(t)}function o(t){return 41===t?A(t):rc(e,i,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return SA(t)?lc(e,a)(t):A(t)}function l(e){return n(e)}function a(t){return 34===t||39===t||40===t?ic(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):A(t)}function s(t){return SA(t)?lc(e,A)(t):A(t)}function A(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},yc={tokenize:function(e,t,n){const r=this;return function(t){return oc.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(vA(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},wc={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const bc={name:"labelStartImage",resolveAll:mc.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const kc={name:"labelStartLink",resolveAll:mc.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const xc={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),MA(e,t,"linePrefix")}}};const Ec={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,i(e)}(t)};function i(i){return i===r?(e.enter("thematicBreakSequence"),l(i)):o>=3&&(null===i||CA(i))?(e.exit("thematicBreak"),t(i)):n(i)}function l(t){return t===r?(e.consume(t),o++,l):(e.exit("thematicBreakSequence"),DA(t)?MA(e,i,"whitespace")(t):i(t))}}};const Pc={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(UA,o,i);function o(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,MA(e,t,"listItemIndent",r.containerState.size+1)(n)}function i(n){return r.containerState.furtherBlankLines||!DA(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Sc,t,l)(n))}function l(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,MA(e,e.attempt(Pc,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,l=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:xA(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(Ec,n,s)(t):s(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(t)}return n(t)};function a(t){return xA(t)&&++l<10?(e.consume(t),a):(!r.interrupt||l<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),s(t)):n(t)}function s(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(UA,r.interrupt?n:A,e.attempt(Cc,u,c))}function A(e){return r.containerState.initialBlankLine=!0,i++,u(e)}function c(t){return DA(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),u):n(t)}function u(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},Cc={partial:!0,tokenize:function(e,t,n){const r=this;return MA(e,function(e){const o=r.events[r.events.length-1];return!DA(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Sc={partial:!0,tokenize:function(e,t,n){const r=this;return MA(e,function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}};const Dc={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),o||"definition"!==e[i][1].type||(o=i);const l={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",l,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=l;return e.push(["exit",l,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let l,a=r.events.length;for(;a--;)if("lineEnding"!==r.events[a][1].type&&"linePrefix"!==r.events[a][1].type&&"content"!==r.events[a][1].type){l="paragraph"===r.events[a][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||l))return e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),i(t)}(t);return n(t)};function i(t){return t===o?(e.consume(t),i):(e.exit("setextHeadingLineSequence"),DA(t)?MA(e,l,"lineSuffix")(t):l(t))}function l(r){return null===r||CA(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const Bc={tokenize:function(e){const t=this,n=e.attempt(UA,function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,r,MA(e,e.attempt(this.parser.constructs.flow,r,e.attempt(tc,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const Ic={resolveAll:Oc()},Tc=Mc("string"),Qc=Mc("text");function Mc(e){return{resolveAll:Oc("text"===e?Lc:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,l);return i;function i(e){return s(e)?o(e):l(e)}function l(e){if(null!==e)return t.enter("data"),t.consume(e),a;t.consume(e)}function a(e){return s(e)?(t.exit("data"),o(e)):(t.consume(e),a)}function s(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function Oc(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):t[o]&&"data"===t[o][1].type||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function Lc(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let i,l=o.length,a=-1,s=0;for(;l--;){const e=o[l];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)s++,a--;if(a)break;a=-1}else if(-2===e)i=!0,s++;else if(-1!==e){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const o={type:n===e.length||i||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?a:r.start._bufferIndex+a,_index:r.start._index+l,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}const Nc={42:Pc,43:Pc,45:Pc,48:Pc,49:Pc,50:Pc,51:Pc,52:Pc,53:Pc,54:Pc,55:Pc,56:Pc,57:Pc,62:_A},Rc={91:ac},Hc={[-2]:YA,[-1]:YA,32:YA},Fc={35:cc,42:Ec,45:[Dc,Ec],60:fc,61:Dc,95:Ec,96:WA,126:WA},zc={38:VA,92:qA},jc={[-5]:xc,[-4]:xc,[-3]:xc,33:bc,38:VA,42:FA,60:[jA,gc],91:kc,92:[Ac,qA],93:mc,95:FA,96:XA},Uc={null:[FA,Ic]};var _c=Object.freeze({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:Rc,disable:{null:[]},document:Nc,flow:Fc,flowInitial:Hc,insideSpan:Uc,string:zc,text:jc});function qc(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},i=[];let l=[],a=[];const s={attempt:g(function(e,t){m(e,t.from)}),check:g(h),consume:function(e){CA(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,v()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++));A.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=d(),A.events.push(["enter",n,A]),a.push(n),n},exit:function(e){const t=a.pop();return t.end=d(),A.events.push(["exit",t,A]),t},interrupt:g(h,{interrupt:!0})},A={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,v()},events:[],now:d,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let l;if("string"==typeof i)l=i;else switch(i){case-5:l="\r";break;case-4:l="\n";break;case-3:l="\r\n";break;case-2:l=t?" ":"\t";break;case-1:if(!t&&o)continue;l=" ";break;default:l=String.fromCharCode(i)}o=-2===i,r.push(l)}return r.join("")}(u(e),t)},sliceStream:u,write:function(e){if(l=dA(l,e),f(),null!==l[l.length-1])return[];return m(t,0),A.events=HA(i,A.events,A),A.events}};let c=t.tokenize.call(A,s);return t.resolveAll&&i.push(t),A;function u(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let l;if(n===o)l=[e[n].slice(r,i)];else{if(l=e.slice(n,o),r>-1){const e=l[0];"string"==typeof e?l[0]=e.slice(r):l.shift()}i>0&&l.push(e[o].slice(0,i))}return l}(l,e)}function d(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:i}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:i}}function f(){let e;for(;r._index<l.length;){const t=l[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)p(t.charCodeAt(r._bufferIndex));else p(t)}}function p(e){c=c(e)}function h(e,t){t.restore()}function g(e,t){return function(n,o,i){let l,c,u,f;return Array.isArray(n)?p(n):"tokenize"in n?p([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return p([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function p(e){return l=e,c=0,0===e.length?i:h(e[c])}function h(e){return function(n){f=function(){const e=d(),t=A.previous,n=A.currentConstruct,o=A.events.length,i=Array.from(a);return{from:o,restore:l};function l(){r=e,A.previous=t,A.currentConstruct=n,A.events.length=o,a=i,v()}}(),u=e,e.partial||(A.currentConstruct=e);if(e.name&&A.parser.constructs.disable.null.includes(e.name))return m();return e.tokenize.call(t?Object.assign(Object.create(A),t):A,s,g,m)(n)}}function g(t){return e(u,f),o}function m(e){return f.restore(),++c<l.length?h(l[c]):i}}}function m(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&uA(A.events,t,A.events.length-t,e.resolve(A.events.slice(t),A)),e.resolveTo&&(A.events=e.resolveTo(A.events,A))}function v(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const Vc=/[\0\t\n\r]/g;const Gc=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Wc(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return mA(n.slice(t?2:1),t?16:10)}return cA(n)||e}const Yc={}.hasOwnProperty;function Kc(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(te),autolinkProtocol:P,autolinkEmail:P,atxHeading:i(J),blockQuote:i(G),characterEscape:P,characterReference:P,codeFenced:i(W),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:i(W,l),codeText:i(Y,l),codeTextData:P,data:P,codeFlowValue:P,definition:i(K),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:i(X),hardBreakEscape:i(Z),hardBreakTrailing:i(Z),htmlFlow:i($,l),htmlFlowData:P,htmlText:i($,l),htmlTextData:P,image:i(ee),label:l,link:i(te),listItem:i(re),listItemValue:d,listOrdered:i(ne,u),listUnordered:i(ne),paragraph:i(oe),reference:F,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:i(J),strong:i(ie),thematicBreak:i(ae)},exit:{atxHeading:s(),atxHeadingSequence:b,autolink:s(),autolinkEmail:V,autolinkProtocol:q,blockQuote:s(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:j,characterReferenceMarkerNumeric:j,characterReferenceValue:U,characterReference:_,codeFenced:s(g),codeFencedFence:h,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:C,codeIndented:s(m),codeText:s(T),codeTextData:C,data:C,definition:s(),definitionDestinationString:w,definitionLabelString:v,definitionTitleString:y,emphasis:s(),hardBreakEscape:s(D),hardBreakTrailing:s(D),htmlFlow:s(B),htmlFlowData:C,htmlText:s(I),htmlTextData:C,image:s(M),label:L,labelText:O,lineEnding:S,link:s(Q),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:z,resourceDestinationString:N,resourceTitleString:R,resource:H,setextHeading:s(E),setextHeadingLineSequence:x,setextHeadingText:k,strong:s(),thematicBreak:s()}};Jc(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const i={stack:[r],tokenStack:[],config:t,enter:a,exit:A,buffer:l,resume:c,data:n},s=[];let u=-1;for(;++u<e.length;)if("listOrdered"===e[u][1].type||"listUnordered"===e[u][1].type)if("enter"===e[u][0])s.push(u);else{u=o(e,s.pop(),u)}for(u=-1;++u<e.length;){const n=t[e[u][0]];Yc.call(n,e[u][1].type)&&n[e[u][1].type].call(Object.assign({sliceSerialize:e[u][2].sliceSerialize},i),e[u][1])}if(i.tokenStack.length>0){const e=i.tokenStack[i.tokenStack.length-1];(e[1]||$c).call(i,void 0,e[0])}for(r.position={start:Xc(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Xc(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},u=-1;++u<t.transforms.length;)r=t.transforms[u](r)||r;return r}function o(e,t,n){let r,o,i,l,a=t-1,s=-1,A=!1;for(;++a<=n;){const t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,l=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||l||s||i||(i=a),l=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:l=void 0}if(!s&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===s&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let l=a;for(o=void 0;l--;){const t=e[l];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",A=!0),t[1].type="lineEnding",o=l}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}i&&(!o||i<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||a,0,["exit",r,t[2]]),a++,n++}if("listItemPrefix"===t[1].type){const o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(a,0,["enter",o,t[2]]),a++,n++,i=void 0,l=!0}}}return e[t][1]._spread=A,n}function i(e,t){return n;function n(n){a.call(this,e(n),n),t&&t.call(this,n)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Xc(t.start),end:void 0}}function s(e){return t;function t(t){e&&e.call(this,t),A.call(this,t)}}function A(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+Rs({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||$c).call(this,e,r[0])}n.position.end=Xc(e.end)}function c(){return lA(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function d(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function f(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function p(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function v(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=vA(this.sliceSerialize(e)).toLowerCase()}function y(){const e=this.resume();this.stack[this.stack.length-1].title=e}function w(){const e=this.resume();this.stack[this.stack.length-1].url=e}function b(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function x(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function P(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=le(),n.position={start:Xc(e.start),end:void 0},t.push(n)),this.stack.push(n)}function C(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Xc(e.end)}function S(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=Xc(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(P.call(this,e),C.call(this,e))}function D(){this.data.atHardBreak=!0}function B(){const e=this.resume();this.stack[this.stack.length-1].value=e}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.resume();this.stack[this.stack.length-1].value=e}function Q(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function O(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(Gc,Wc)}(t),n.identifier=vA(t).toLowerCase()}function L(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function N(){const e=this.resume();this.stack[this.stack.length-1].url=e}function R(){const e=this.resume();this.stack[this.stack.length-1].title=e}function H(){this.data.inReference=void 0}function F(){this.data.referenceType="collapsed"}function z(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=vA(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function j(e){this.data.characterReferenceType=e.type}function U(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=mA(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=cA(t)}this.stack[this.stack.length-1].value+=r}function _(e){this.stack.pop().position.end=Xc(e.end)}function q(e){C.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function V(e){C.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function G(){return{type:"blockquote",children:[]}}function W(){return{type:"code",lang:null,meta:null,value:""}}function Y(){return{type:"inlineCode",value:""}}function K(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function X(){return{type:"emphasis",children:[]}}function J(){return{type:"heading",depth:0,children:[]}}function Z(){return{type:"break"}}function $(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function ie(){return{type:"strong",children:[]}}function le(){return{type:"text",value:""}}function ae(){return{type:"thematicBreak"}}}(n)(function(e){for(;!$A(e););return e}(function(e){const t={constructs:pA([_c,...(e||{}).extensions||[]]),content:n(OA),defined:[],document:n(LA),flow:n(Bc),lazy:{},string:n(Tc),text:n(Qc)};return t;function n(e){return function(n){return qc(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,l){const a=[];let s,A,c,u,d;for(o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),c=0,n="",r&&(65279===o.charCodeAt(0)&&c++,r=void 0);c<o.length;){if(Vc.lastIndex=c,s=Vc.exec(o),u=s&&void 0!==s.index?s.index:o.length,d=o.charCodeAt(u),!s){n=o.slice(c);break}if(10===d&&c===u&&e)a.push(-3),e=void 0;else switch(e&&(a.push(-5),e=void 0),c<u&&(a.push(o.slice(c,u)),t+=u-c),d){case 0:a.push(65533),t++;break;case 9:for(A=4*Math.ceil(t/4),a.push(-2);t++<A;)a.push(-1);break;case 10:a.push(-4),t=1;break;default:e=!0,t=1}c=u+1}return l&&(e&&a.push(-5),n&&a.push(n),a.push(null)),a}}()(e,t,!0))))}function Xc(e){return{line:e.line,column:e.column,offset:e.offset}}function Jc(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Jc(e,r):Zc(e,r)}}function Zc(e,t){let n;for(n in t)if(Yc.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function $c(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Rs({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Rs({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Rs({start:t.start,end:t.end})+") is still open")}function eu(e){const t=this;t.parser=function(n){return Kc(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function tu(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&"text"===i.type?i.value="["+i.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&"text"===l.type?l.value+=r:o.push({type:"text",value:r}),o}function nu(e){const t=e.spread;return null==t?e.children.length>1:t}function ru(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(ou(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(ou(t.slice(o),o>0,!1)),i.join("")}function ou(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;9===t||32===t;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const iu={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=QA(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);void 0===a?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=i+1,a+=1,e.footnoteCounts.set(r,a);const s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,s);const A={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,A),e.applyData(t,A)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return tu(e,t);const o={src:QA(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){const n={src:QA(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return tu(e,t);const o={href:QA(r.url||"")};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){const n={href:QA(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),o=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=nu(n[r])}return t}(n):nu(t),i={},l=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const e=r[a];(o||0!==a||"element"!==e.type||"p"!==e.tagName)&&l.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?l.push(e):l.push(...e.children)}const s=r[r.length-1];s&&(o||"element"!==s.type||"p"!==s.tagName)&&l.push({type:"text",value:"\n"});const A={type:"element",tagName:"li",properties:i,children:l};return e.patch(t,A),e.applyData(t,A)},list:function(e,t){const n={},r=e.all(t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){const e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},i=Ls(t.children[1]),l=Os(t.children[t.children.length-1]);i&&l&&(r.position={start:i,end:l}),o.push(r)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=0===(r?r.indexOf(t):1)?"th":"td",i=n&&"table"===n.type?n.align:void 0,l=i?i.length:t.children.length;let a=-1;const s=[];for(;++a<l;){const n=t.children[a],r={},l=i?i[a]:void 0;l&&(r.align=l);let A={type:"element",tagName:o,properties:r,children:[]};n&&(A.children=e.all(n),e.patch(n,A),A=e.applyData(n,A)),s.push(A)}const A={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,A),e.applyData(t,A)},text:function(e,t){const n={type:"text",value:ru(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:lu,yaml:lu,definition:lu,footnoteDefinition:lu};function lu(){}const au="object"==typeof self?self:globalThis,su=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[i,l]=t[o];switch(i){case 0:case-1:return n(l,o);case 1:{const e=n([],o);for(const t of l)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of l)e[r(t)]=r(n);return e}case 3:return n(new Date(l),o);case 4:{const{source:e,flags:t}=l;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of l)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of l)e.add(r(t));return e}case 7:{const{name:e,message:t}=l;return n(new au[e](t),o)}case 8:return n(BigInt(l),o);case"BigInt":return n(Object(BigInt(l)),o);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:e}=new Uint8Array(l);return n(new DataView(e),l)}}return n(new au[i](l),o)};return r})(new Map,e)(0),Au="",{toString:cu}={},{keys:uu}=Object,du=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=cu.call(e).slice(8,-1);switch(n){case"Array":return[1,Au];case"Object":return[2,Au];case"Date":return[3,Au];case"RegExp":return[4,Au];case"Map":return[5,Au];case"Set":return[6,Au];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},fu=([e,t])=>0===e&&("function"===t||"symbol"===t),pu=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const o=(e,t)=>{const o=r.push(e)-1;return n.set(t,o),o},i=r=>{if(n.has(r))return n.get(r);let[l,a]=du(r);switch(l){case 0:{let t=r;switch(a){case"bigint":l=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);t=null;break;case"undefined":return o([-1],r)}return o([l,t],r)}case 1:{if(a){let e=r;return"DataView"===a?e=new Uint8Array(r.buffer):"ArrayBuffer"===a&&(e=new Uint8Array(r)),o([a,[...e]],r)}const e=[],t=o([l,e],r);for(const t of r)e.push(i(t));return t}case 2:{if(a)switch(a){case"BigInt":return o([a,r.toString()],r);case"Boolean":case"Number":case"String":return o([a,r.valueOf()],r)}if(t&&"toJSON"in r)return i(r.toJSON());const n=[],s=o([l,n],r);for(const t of uu(r))!e&&fu(du(r[t]))||n.push([i(t),i(r[t])]);return s}case 3:return o([l,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([l,{source:e,flags:t}],r)}case 5:{const t=[],n=o([l,t],r);for(const[n,o]of r)(e||!fu(du(n))&&!fu(du(o)))&&t.push([i(n),i(o)]);return n}case 6:{const t=[],n=o([l,t],r);for(const n of r)!e&&fu(du(n))||t.push(i(n));return n}}const{message:s}=r;return o([l,{name:a,message:s}],r)};return i})(!(t||n),!!t,new Map,r)(e),r};var hu="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?su(pu(e,t)):structuredClone(e):(e,t)=>su(pu(e,t));function gu(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function mu(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const vu=function(e){if(null==e)return wu;if("function"==typeof e)return yu(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=vu(e[n]);return yu(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return yu(n);function n(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}}(e);if("string"==typeof e)return function(e){return yu(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function yu(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function wu(){return!0}const bu=[],ku=!0,xu=!1;function Eu(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=vu(o),l=r?-1:1;!function e(o,a,s){const A=o&&"object"==typeof o?o:{};if("string"==typeof A.type){const e="string"==typeof A.tagName?A.tagName:"string"==typeof A.name?A.name:void 0;Object.defineProperty(c,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return c;function c(){let A,c,u,d=bu;if((!t||i(o,a,s[s.length-1]||void 0))&&(d=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[ku,e];return null==e?bu:[e]}(n(o,s)),d[0]===xu))return d;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==d[0])for(c=(r?t.children.length:-1)+l,u=s.concat(t);c>-1&&c<t.children.length;){const n=t.children[c];if(A=e(n,c,u)(),A[0]===xu)return A;c="number"==typeof A[1]?A[1]:c+l}}return d}}(e,void 0,[])()}function Pu(e,t,n,r){let o,i,l;"function"==typeof t&&"function"!=typeof n?(i=void 0,l=t,o=n):(i=t,l=n,o=r),Eu(e,i,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return l(e,r,n)},o)}const Cu={}.hasOwnProperty,Su={};function Du(e,t){e.position&&(t.position=function(e){const t=Ls(e),n=Os(e);if(t&&n)return{start:t,end:n}}(e))}function Bu(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&o&&Object.assign(n.properties,hu(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Iu(e,t){const n=t.data||{},r=!("value"in t)||Cu.call(n,"hProperties")||Cu.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Tu(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Qu(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Mu(e,t){const n=function(e,t){const n=t||Su,r=new Map,o=new Map,i=new Map,l={...iu,...n.handlers},a={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=a.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=Qu(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=Qu(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:Bu,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:l,one:function(e,t){const n=e.type,r=a.handlers[n];if(Cu.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=hu(n);return r.children=a.all(e),r}return hu(e)}return(a.options.unknownHandler||Iu)(a,e,t)},options:n,patch:Du,wrap:Tu};return Pu(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:o,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a}(e,t),r=n.one(e,void 0),o=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||gu,r=e.options.footnoteBackLabel||mu,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let s=-1;for(;++s<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[s]);if(!o)continue;const i=e.all(o),l=String(o.identifier).toUpperCase(),A=QA(l.toLowerCase());let c=0;const u=[],d=e.footnoteCounts.get(l);for(;void 0!==d&&++c<=d;){u.length>0&&u.push({type:"text",value:" "});let e="string"==typeof n?n:n(s,c);"string"==typeof e&&(e={type:"text",value:e}),u.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+A+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(s,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=i[i.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...u)}else i.push(...u);const p={type:"element",tagName:"li",properties:{id:t+"fn-"+A},children:e.wrap(i,!0)};e.patch(o,p),a.push(p)}if(0!==a.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...hu(l),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:"\n"}]}}(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:"\n"},o),i}function Ou(e,t){return e&&"run"in e?async function(n,r){const o=Mu(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Mu(n,{file:r,...e||t})}}function Lu(e){if(e)throw e}var Nu=Object.prototype.hasOwnProperty,Ru=Object.prototype.toString,Hu=Object.defineProperty,Fu=Object.getOwnPropertyDescriptor,zu=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Ru.call(e)},ju=function(e){if(!e||"[object Object]"!==Ru.call(e))return!1;var t,n=Nu.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Nu.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Nu.call(e,t)},Uu=function(e,t){Hu&&"__proto__"===t.name?Hu(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},_u=function(e,t){if("__proto__"===t){if(!Nu.call(e,t))return;if(Fu)return Fu(e,t).value}return e[t]},qu=function e(){var t,n,r,o,i,l,a=arguments[0],s=1,A=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[1]||{},s=2),(null==a||"object"!=typeof a&&"function"!=typeof a)&&(a={});s<A;++s)if(null!=(t=arguments[s]))for(n in t)r=_u(a,n),a!==(o=_u(t,n))&&(c&&o&&(ju(o)||(i=zu(o)))?(i?(i=!1,l=r&&zu(r)?r:[]):l=r&&ju(r)?r:{},Uu(a,{name:n,newValue:e(c,l,o)})):void 0!==o&&Uu(a,{name:n,newValue:o}));return a},Vu=ss(qu);function Gu(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function Wu(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(i,...l){const a=e[++n];let s=-1;if(i)r(i);else{for(;++s<t.length;)null!==l[s]&&void 0!==l[s]||(l[s]=t[s]);t=l,a?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let l;r&&t.push(o);try{l=e.apply(this,t)}catch(e){if(r&&n)throw e;return o(e)}r||(l&&l.then&&"function"==typeof l.then?l.then(i,o):l instanceof Error?o(l):i(l))}function o(e,...r){n||(n=!0,t(e,...r))}function i(e){o(null,e)}}(a,o)(...l):r(null,...l)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const Yu={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Ku(e);let n,r=0,o=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let l=-1,a=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else l<0&&(n=!0,l=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(o=i):(a=-1,o=l));r===o?o=l:o<0&&(o=e.length);return e.slice(r,o)},dirname:function(e){if(Ku(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){Ku(e);let t,n=e.length,r=-1,o=0,i=-1,l=0;for(;n--;){const a=e.codePointAt(n);if(47!==a)r<0&&(t=!0,r=n+1),46===a?i<0?i=n:1!==l&&(l=1):i>-1&&(l=-1);else if(t){o=n+1;break}}if(i<0||r<0||0===l||1===l&&i===r-1&&i===o+1)return"";return e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)Ku(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Ku(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,l=-1,a=0,s=-1;for(;++s<=e.length;){if(s<e.length)n=e.codePointAt(s);else{if(47===n)break;n=47}if(47===n){if(l===s-1||1===a);else if(l!==s-1&&2===a){if(o.length<2||2!==i||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",i=0):(o=o.slice(0,r),i=o.length-1-o.lastIndexOf("/")),l=s,a=0;continue}}else if(o.length>0){o="",i=0,l=s,a=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(l+1,s):o=e.slice(l+1,s),i=s-l-1;l=s,a=0}else 46===n&&a>-1?a++:a=-1}return o}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function Ku(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Xu={cwd:function(){return"/"}};function Ju(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Zu(e){if("string"==typeof e)e=new URL(e);else if(!Ju(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const $u=["history","path","basename","stem","extname","dirname"];class ed{constructor(e){let t;t=e?Ju(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":Xu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<$u.length;){const e=$u[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)$u.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?Yu.basename(this.path):void 0}set basename(e){nd(e,"basename"),td(e,"basename"),this.path=Yu.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?Yu.dirname(this.path):void 0}set dirname(e){rd(this.basename,"dirname"),this.path=Yu.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?Yu.extname(this.path):void 0}set extname(e){if(td(e,"extname"),rd(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Yu.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Ju(e)&&(e=Zu(e)),nd(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?Yu.basename(this.path,this.extname):void 0}set stem(e){nd(e,"stem"),td(e,"stem"),this.path=Yu.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new js(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function td(e,t){if(e&&e.includes(Yu.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Yu.sep+"`")}function nd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function rd(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const od=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},id={}.hasOwnProperty;class ld extends od{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=Wu()}copy(){const e=new ld;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(Vu(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(cd("data",this.frozen),this.namespace[e]=t,this):id.call(this.namespace,e)&&this.namespace[e]||void 0:e?(cd("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=fd(e),n=this.parser||this.Parser;return sd("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),sd("process",this.parser||this.Parser),Ad("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=fd(e),l=n.parse(i);function a(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(l,i,function(e,t,r){if(e||!t||!r)return a(e);const o=t,i=n.stringify(o,r);var l;"string"==typeof(l=i)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(l)?r.value=i:r.result=i,a(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),sd("processSync",this.parser||this.Parser),Ad("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,Lu(e),t=r}),dd("processSync","process",n),t}run(e,t,n){ud(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,i){const l=fd(t);r.run(e,l,function(t,r,l){const a=r||e;t?i(t):o?o(a):n(void 0,a,l)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){Lu(e),n=t,r=!0}),dd("runSync","run",r),n}stringify(e,t){this.freeze();const n=fd(t),r=this.compiler||this.Compiler;return Ad("stringify",r),ud(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(cd("use",this.frozen),null==e);else if("function"==typeof e)a(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?l(e):i(e)}return this;function o(e){if("function"==typeof e)a(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;a(t,n)}else i(e)}}function i(e){if(!("plugins"in e)&&!("settings"in e))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");l(e.plugins),e.settings&&(r.settings=Vu(!0,r.settings,e.settings))}function l(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){o(e[t])}}}function a(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...i]=t;const l=n[o][1];Gu(l)&&Gu(r)&&(r=Vu(!0,l,r)),n[o]=[e,r,...i]}}}}const ad=(new ld).freeze();function sd(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function Ad(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function cd(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ud(e){if(!Gu(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function dd(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function fd(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new ed(e)}const pd=[],hd={allowDangerousHtml:!0},gd=/^(https?|ircs?|mailto|xmpp)$/i,md=[{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 vd(e){const t=function(e){const t=e.rehypePlugins||pd,n=e.remarkPlugins||pd,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...hd}:hd,o=ad().use(eu).use(n).use(Ou,r).use(t);return o}(e),n=function(e){const t=e.children||"",n=new ed;"string"==typeof t&&(n.value=t);return n}(e);return function(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,i=t.disallowedElements,l=t.skipHtml,a=t.unwrapDisallowed,s=t.urlTransform||yd;for(const e of md)Object.hasOwn(t,e.from)&&wa((e.from,e.to&&e.to,e.id));t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:"root"===e.type?e.children:[e]});return Pu(e,A),Ys(e,{Fragment:m,components:o,ignoreInvalidStyle:!0,jsx:h,jsxs:g,passKeys:!0,passNode:!0});function A(e,t,o){if("raw"===e.type&&o&&"number"==typeof t)return l?o.children.splice(t,1):o.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in oA)if(Object.hasOwn(oA,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=oA[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=s(String(n||""),t,e))}}if("element"===e.type){let l=n?!n.includes(e.tagName):!!i&&i.includes(e.tagName);if(!l&&r&&"number"==typeof t&&(l=!r(e,t,o)),l&&o&&"number"==typeof t)return a&&e.children?o.children.splice(t,1,...e.children):o.children.splice(t,1),t}}}(t.runSync(t.parse(n),n),e)}function yd(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return-1===t||-1!==o&&t>o||-1!==n&&t>n||-1!==r&&t>r||gd.test(e.slice(0,t))?e:""}function wd(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}function bd(e,t,n){const r=vu((n||{}).ignore||[]),o=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([kd(e[0]),xd(e[1])])}return t}(t);let i=-1;for(;++i<o.length;)Eu(e,"text",l);function l(e,t){let n,l=-1;for(;++l<t.length;){const e=t[l],o=n?n.children:void 0;if(r(e,o?o.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=o[i][0],l=o[i][1];let a=0;const s=n.children.indexOf(e);let A=!1,c=[];r.lastIndex=0;let u=r.exec(e.value);for(;u;){const n=u.index,o={index:u.index,input:u.input,stack:[...t,e]};let i=l(...u,o);if("string"==typeof i&&(i=i.length>0?{type:"text",value:i}:void 0),!1===i?r.lastIndex=n+1:(a!==n&&c.push({type:"text",value:e.value.slice(a,n)}),Array.isArray(i)?c.push(...i):i&&c.push(i),a=n+u[0].length,A=!0),!r.global)break;u=r.exec(e.value)}A?(a<e.value.length&&c.push({type:"text",value:e.value.slice(a)}),n.children.splice(s,1,...c)):c=[e];return s+c.length}(e,t)}}function kd(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function xd(e){return"function"==typeof e?e:function(){return e}}const Ed="phrasing",Pd=["autolink","link","image","label"];function Cd(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Sd(e){this.config.enter.autolinkProtocol.call(this,e)}function Dd(e){this.config.exit.autolinkProtocol.call(this,e)}function Bd(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Id(e){this.config.exit.autolinkEmail.call(this,e)}function Td(e){this.exit(e)}function Qd(e){bd(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Md],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Od]],{ignore:["link","linkReference"]})}function Md(e,t,n,r,o){let i="";if(!Ld(o))return!1;if(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(n))return!1;const l=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=wd(e,"(");let i=wd(e,")");for(;-1!==r&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}(n+r);if(!l[0])return!1;const a={type:"link",title:null,url:i+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function Od(e,t,n,r){return!(!Ld(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Ld(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||IA(n)||BA(n))&&(!t||47!==n)}function Nd(){this.buffer()}function Rd(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Hd(){this.buffer()}function Fd(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function zd(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=vA(this.sliceSerialize(e)).toLowerCase(),n.label=t}function jd(e){this.exit(e)}function Ud(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=vA(this.sliceSerialize(e)).toLowerCase(),n.label=t}function _d(e){this.exit(e)}function qd(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const l=n.enter("footnoteReference"),a=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),a(),l(),i+=o.move("]"),i}function Vd(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,o){const i=r.createTracker(o);let l=i.move("[^");const a=r.enter("footnoteDefinition"),s=r.enter("label");l+=i.move(r.safe(r.associationId(e),{before:l,after:"]"})),s(),l+=i.move("]:"),e.children&&e.children.length>0&&(i.shift(4),l+=i.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,i.current()),t?Wd:Gd)));return a(),l},footnoteReference:qd},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function Gd(e,t,n){return 0===t?e:Wd(e,t,n)}function Wd(e,t,n){return(n?"":" ")+e}qd.peek=function(){return"["};const Yd=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function Kd(e){this.enter({type:"delete",children:[]},e)}function Xd(e){this.exit(e)}function Jd(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let l=o.move("~~");return l+=n.containerPhrasing(e,{...o.current(),before:l,after:"~"}),l+=o.move("~~"),i(),l}function Zd(e){return e.length}function $d(e){return null==e?"":String(e)}function ef(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function tf(e,t,n){return">"+(n?"":" ")+e}function nf(e,t){return rf(e,t.inConstruct,!0)&&!rf(e,t.notInConstruct,!1)}function rf(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function of(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if("\n"===n.unsafe[o].character&&nf(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function lf(e,t,n){return(n?"":" ")+e}function af(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function sf(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Af(e,t,n){const r=RA(e),o=RA(t);return void 0===r?void 0===o?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function cf(e,t,n,r){const o=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),i=n.enter("emphasis"),l=n.createTracker(r),a=l.move(o);let s=l.move(n.containerPhrasing(e,{after:o,before:a,...l.current()}));const A=s.charCodeAt(0),c=Af(r.before.charCodeAt(r.before.length-1),A,o);c.inside&&(s=sf(A)+s.slice(1));const u=s.charCodeAt(s.length-1),d=Af(r.after.charCodeAt(0),u,o);d.inside&&(s=s.slice(0,-1)+sf(u));const f=l.move(o);return i(),n.attentionEncodeSurroundingInfo={after:d.outside,before:c.outside},a+s+f}function uf(e){return e.value||""}function df(e,t,n,r){const o=af(n),i='"'===o?"Quote":"Apostrophe",l=n.enter("image");let a=n.enter("label");const s=n.createTracker(r);let A=s.move("![");return A+=s.move(n.safe(e.alt,{before:A,after:"]",...s.current()})),A+=s.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),A+=s.move("<"),A+=s.move(n.safe(e.url,{before:A,after:">",...s.current()})),A+=s.move(">")):(a=n.enter("destinationRaw"),A+=s.move(n.safe(e.url,{before:A,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=n.enter(`title${i}`),A+=s.move(" "+o),A+=s.move(n.safe(e.title,{before:A,after:o,...s.current()})),A+=s.move(o),a()),A+=s.move(")"),l(),A}function ff(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let l=n.enter("label");const a=n.createTracker(r);let s=a.move("![");const A=n.safe(e.alt,{before:s,after:"]",...a.current()});s+=a.move(A+"]["),l();const c=n.stack;n.stack=[],l=n.enter("reference");const u=n.safe(n.associationId(e),{before:s,after:"]",...a.current()});return l(),n.stack=c,i(),"full"!==o&&A&&A===u?"shortcut"===o?s=s.slice(0,-1):s+=a.move("]"):s+=a.move(u+"]"),s}function pf(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const e=n.unsafe[i],t=n.compilePattern(e);let o;if(e.atBreak)for(;o=t.exec(r);){let e=o.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(o.index+1)}}return o+r+o}function hf(e,t){const n=lA(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function gf(e,t,n,r){const o=af(n),i='"'===o?"Quote":"Apostrophe",l=n.createTracker(r);let a,s;if(hf(e,n)){const t=n.stack;n.stack=[],a=n.enter("autolink");let r=l.move("<");return r+=l.move(n.containerPhrasing(e,{before:r,after:">",...l.current()})),r+=l.move(">"),a(),n.stack=t,r}a=n.enter("link"),s=n.enter("label");let A=l.move("[");return A+=l.move(n.containerPhrasing(e,{before:A,after:"](",...l.current()})),A+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),A+=l.move("<"),A+=l.move(n.safe(e.url,{before:A,after:">",...l.current()})),A+=l.move(">")):(s=n.enter("destinationRaw"),A+=l.move(n.safe(e.url,{before:A,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),A+=l.move(" "+o),A+=l.move(n.safe(e.title,{before:A,after:o,...l.current()})),A+=l.move(o),s()),A+=l.move(")"),a(),A}function mf(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let l=n.enter("label");const a=n.createTracker(r);let s=a.move("[");const A=n.containerPhrasing(e,{before:s,after:"]",...a.current()});s+=a.move(A+"]["),l();const c=n.stack;n.stack=[],l=n.enter("reference");const u=n.safe(n.associationId(e),{before:s,after:"]",...a.current()});return l(),n.stack=c,i(),"full"!==o&&A&&A===u?"shortcut"===o?s=s.slice(0,-1):s+=a.move("]"):s+=a.move(u+"]"),s}function vf(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function yf(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}Jd.peek=function(){return"~"},cf.peek=function(e,t,n){return n.options.emphasis||"*"},uf.peek=function(){return"<"},df.peek=function(){return"!"},ff.peek=function(){return"!"},pf.peek=function(){return"`"},gf.peek=function(e,t,n){return hf(e,n)?"<":"["},mf.peek=function(){return"["};const wf=vu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function bf(e,t,n,r){const o=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),i=n.enter("strong"),l=n.createTracker(r),a=l.move(o+o);let s=l.move(n.containerPhrasing(e,{after:o,before:a,...l.current()}));const A=s.charCodeAt(0),c=Af(r.before.charCodeAt(r.before.length-1),A,o);c.inside&&(s=sf(A)+s.slice(1));const u=s.charCodeAt(s.length-1),d=Af(r.after.charCodeAt(0),u,o);d.inside&&(s=s.slice(0,-1)+sf(u));const f=l.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:d.outside,before:c.outside},a+s+f}bf.peek=function(e,t,n){return n.options.strong||"*"};const kf={blockquote:function(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const l=n.indentLines(n.containerFlow(e,i.current()),tf);return o(),l},break:of,code:function(e,t,n,r){const o=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),i=e.value||"",l="`"===o?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(i,lf);return e(),t}const a=n.createTracker(r),s=o.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,l=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===o?++i>l&&(l=i):i=1,o=r+t.length,r=n.indexOf(t,o);return l}(i,o)+1,3)),A=n.enter("codeFenced");let c=a.move(s);if(e.lang){const t=n.enter(`codeFencedLang${l}`);c+=a.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...a.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${l}`);c+=a.move(" "),c+=a.move(n.safe(e.meta,{before:c,after:"\n",encode:["`"],...a.current()})),t()}return c+=a.move("\n"),i&&(c+=a.move(i+"\n")),c+=a.move(s),A(),c},definition:function(e,t,n,r){const o=af(n),i='"'===o?"Quote":"Apostrophe",l=n.enter("definition");let a=n.enter("label");const s=n.createTracker(r);let A=s.move("[");return A+=s.move(n.safe(n.associationId(e),{before:A,after:"]",...s.current()})),A+=s.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),A+=s.move("<"),A+=s.move(n.safe(e.url,{before:A,after:">",...s.current()})),A+=s.move(">")):(a=n.enter("destinationRaw"),A+=s.move(n.safe(e.url,{before:A,after:e.title?" ":"\n",...s.current()}))),a(),e.title&&(a=n.enter(`title${i}`),A+=s.move(" "+o),A+=s.move(n.safe(e.title,{before:A,after:o,...s.current()})),A+=s.move(o),a()),l(),A},emphasis:cf,hardBreak:of,heading:function(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(function(e,t){let n=!1;return Pu(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,xu}),Boolean((!e.depth||e.depth<3)&&lA(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),l=n.containerPhrasing(e,{...i.current(),before:"\n",after:"\n"});return r(),t(),l+"\n"+(1===o?"=":"-").repeat(l.length-(Math.max(l.lastIndexOf("\r"),l.lastIndexOf("\n"))+1))}const l="#".repeat(o),a=n.enter("headingAtx"),s=n.enter("phrasing");i.move(l+" ");let A=n.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(A)&&(A=sf(A.charCodeAt(0))+A.slice(1)),A=A?l+" "+A:l,n.options.closeAtx&&(A+=" "+l),s(),a(),A},html:uf,image:df,imageReference:ff,inlineCode:pf,link:gf,linkReference:mf,list:function(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let l=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):vf(n);const a=e.ordered?"."===l?")":".":function(e){const t=vf(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let s=!(!t||!n.bulletLastUsed)&&l===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==l&&"-"!==l||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(s=!0),yf(n)===l&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){s=!0;break}}}}s&&(l=a),n.bulletCurrent=l;const A=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=i,o(),A},listItem:function(e,t,n,r){const o=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let i=n.bulletCurrent||vf(n);t&&"list"===t.type&&t.ordered&&(i=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+i);let l=i.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(l=4*Math.ceil(l/4));const a=n.createTracker(r);a.move(i+" ".repeat(l-i.length)),a.shift(l);const s=n.enter("listItem"),A=n.indentLines(n.containerFlow(e,a.current()),function(e,t,n){if(t)return(n?"":" ".repeat(l))+e;return(n?i:i+" ".repeat(l-i.length))+e});return s(),A},paragraph:function(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),l=n.containerPhrasing(e,r);return i(),o(),l},root:function(e,t,n,r){const o=e.children.some(function(e){return wf(e)});return(o?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:bf,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(yf(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function xf(e){const t=e._align;this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function Ef(e){this.exit(e),this.data.inTable=void 0}function Pf(e){this.enter({type:"tableRow",children:[]},e)}function Cf(e){this.exit(e)}function Sf(e){this.enter({type:"tableCell",children:[]},e)}function Df(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Bf));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Bf(e,t){return"|"===t?t:e}function If(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=kf.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return a(function(e,t,n){const r=e.children;let o=-1;const i=[],l=t.enter("table");for(;++o<r.length;)i[o]=s(r[o],t,n);return l(),i}(e,n,r),e.align)},tableCell:l,tableRow:function(e,t,n,r){const o=s(e,n,r),i=a([o]);return i.slice(0,i.indexOf("\n"))}}};function l(e,t,n,r){const o=n.enter("tableCell"),l=n.enter("phrasing"),a=n.containerPhrasing(e,{...r,before:i,after:i});return l(),o(),a}function a(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||Zd,i=[],l=[],a=[],s=[];let A=0,c=-1;for(;++c<e.length;){const t=[],r=[];let i=-1;for(e[c].length>A&&(A=e[c].length);++i<e[c].length;){const l=$d(e[c][i]);if(!1!==n.alignDelimiters){const e=o(l);r[i]=e,(void 0===s[i]||e>s[i])&&(s[i]=e)}t.push(l)}l[c]=t,a[c]=r}let u=-1;if("object"==typeof r&&"length"in r)for(;++u<A;)i[u]=ef(r[u]);else{const e=ef(r);for(;++u<A;)i[u]=e}u=-1;const d=[],f=[];for(;++u<A;){const e=i[u];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let o=!1===n.alignDelimiters?1:Math.max(1,s[u]-t.length-r.length);const l=t+"-".repeat(o)+r;!1!==n.alignDelimiters&&(o=t.length+o+r.length,o>s[u]&&(s[u]=o),f[u]=o),d[u]=l}l.splice(1,0,d),a.splice(1,0,f),c=-1;const p=[];for(;++c<l.length;){const e=l[c],t=a[c];u=-1;const r=[];for(;++u<A;){const o=e[u]||"";let l="",a="";if(!1!==n.alignDelimiters){const e=s[u]-(t[u]||0),n=i[u];114===n?l=" ".repeat(e):99===n?e%2?(l=" ".repeat(e/2+.5),a=" ".repeat(e/2-.5)):(l=" ".repeat(e/2),a=l):a=" ".repeat(e)}!1===n.delimiterStart||u||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===o||!1===n.delimiterStart&&!u||r.push(" "),!1!==n.alignDelimiters&&r.push(l),r.push(o),!1!==n.alignDelimiters&&r.push(a),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&u===A-1||r.push("|")}p.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return p.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:o})}function s(e,t,n){const r=e.children;let o=-1;const i=[],a=t.enter("tableRow");for(;++o<r.length;)i[o]=l(r[o],0,t,n);return a(),i}}function Tf(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function Qf(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let o,i=-1;for(;++i<r.length;){const e=r[i];if("paragraph"===e.type){o=e;break}}o===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Mf(e,t,n,r){const o=e.children[0],i="boolean"==typeof e.checked&&o&&"paragraph"===o.type,l="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);i&&a.move(l);let s=kf.listItem(e,t,n,{...r,...a.current()});return i&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+l})),s}const Of={tokenize:function(e,t,n){let r=0;return function t(i){if((87===i||119===i)&&r<3)return r++,e.consume(i),t;if(46===i&&3===r)return e.consume(i),o;return n(i)};function o(e){return null===e?n(e):t(e)}},partial:!0},Lf={tokenize:function(e,t,n){let r,o,i;return l;function l(t){return 46===t||95===t?e.check(Rf,s,a)(t):null===t||SA(t)||IA(t)||45!==t&&BA(t)?s(t):(i=!0,e.consume(t),l)}function a(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),l}function s(e){return o||r||!i?n(e):t(e)}},partial:!0},Nf={tokenize:function(e,t){let n=0,r=0;return o;function o(l){return 40===l?(n++,e.consume(l),o):41===l&&r<n?i(l):33===l||34===l||38===l||39===l||41===l||42===l||44===l||46===l||58===l||59===l||60===l||63===l||93===l||95===l||126===l?e.check(Rf,t,i)(l):null===l||SA(l)||IA(l)?t(l):(e.consume(l),o)}function i(t){return 41===t&&r++,e.consume(t),o}},partial:!0},Rf={tokenize:function(e,t,n){return r;function r(l){return 33===l||34===l||39===l||41===l||42===l||44===l||46===l||58===l||59===l||63===l||95===l||126===l?(e.consume(l),r):38===l?(e.consume(l),i):93===l?(e.consume(l),o):60===l||null===l||SA(l)||IA(l)?t(l):n(l)}function o(e){return null===e||40===e||91===e||SA(e)||IA(e)?t(e):r(e)}function i(e){return yA(e)?l(e):n(e)}function l(t){return 59===t?(e.consume(t),r):yA(t)?(e.consume(t),l):n(t)}},partial:!0},Hf={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return wA(e)?n(e):t(e)}},partial:!0},Ff={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!qf.call(r,r.previous)||Yf(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Of,e.attempt(Lf,e.attempt(Nf,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:qf},zf={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",i=!1;return function(t){if((72===t||104===t)&&Vf.call(r,r.previous)&&!Yf(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),l;return n(t)};function l(t){if(yA(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),l;if(58===t){const n=o.toLowerCase();if("http"===n||"https"===n)return e.consume(t),a}return n(t)}function a(t){return 47===t?(e.consume(t),i?s:(i=!0,a)):n(t)}function s(t){return null===t||kA(t)||SA(t)||IA(t)||BA(t)?n(t):e.attempt(Lf,e.attempt(Nf,A),n)(t)}function A(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:Vf},jf={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,i;return function(t){if(!Wf(t)||!Gf.call(r,r.previous)||Yf(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(t)};function l(t){return Wf(t)?(e.consume(t),l):64===t?(e.consume(t),a):n(t)}function a(t){return 46===t?e.check(Hf,A,s)(t):45===t||95===t||wA(t)?(i=!0,e.consume(t),a):A(t)}function s(t){return e.consume(t),o=!0,a}function A(l){return i&&o&&yA(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(l)):n(l)}},previous:Gf},Uf={};let _f=48;for(;_f<123;)Uf[_f]=jf,_f++,58===_f?_f=65:91===_f&&(_f=97);function qf(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||SA(e)}function Vf(e){return!yA(e)}function Gf(e){return!(47===e||Wf(e))}function Wf(e){return 43===e||45===e||46===e||95===e||wA(e)}function Yf(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}Uf[43]=jf,Uf[45]=jf,Uf[46]=jf,Uf[95]=jf,Uf[72]=[jf,zf],Uf[104]=[jf,zf],Uf[87]=[jf,Ff],Uf[119]=[jf,Ff];const Kf={tokenize:function(e,t,n){const r=this;return MA(e,function(e){const o=r.events[r.events.length-1];return o&&"gfmFootnoteDefinitionIndent"===o[1].type&&4===o[2].sliceSerialize(o[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function Xf(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;o--;){const e=r.events[o][1];if("labelImage"===e.type){l=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!l||!l._balanced)return n(o);const a=vA(r.sliceSerialize({start:l.end,end:r.now()}));if(94!==a.codePointAt(0)||!i.includes(a.slice(1)))return n(o);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)}}function Jf(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function Zf(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,l=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),a};function a(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",s)}function s(a){if(l>999||93===a&&!i||null===a||91===a||SA(a))return n(a);if(93===a){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes(vA(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(a)}return SA(a)||(i=!0),l++,e.consume(a),92===a?A:s}function A(t){return 91===t||92===t||93===t?(e.consume(t),l++,s):s(t)}}function $f(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,l,a=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),s};function s(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",A):n(t)}function A(t){if(a>999||93===t&&!l||null===t||91===t||SA(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return i=vA(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),u}return SA(t)||(l=!0),a++,e.consume(t),92===t?c:A}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,A):A(t)}function u(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(i)||o.push(i),MA(e,d,"gfmFootnoteDefinitionWhitespace")):n(t)}function d(e){return t(e)}}function ep(e,t,n){return e.check(UA,t,e.attempt(Kf,t,n))}function tp(e){e.exit("gfmFootnoteDefinition")}function np(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const o=this.previous,i=this.events;let l=0;return function(t){if(126===o&&"characterEscape"!==i[i.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),a(t)};function a(i){const s=RA(o);if(126===i)return l>1?r(i):(e.consume(i),l++,a);if(l<2&&!t)return r(i);const A=e.exit("strikethroughSequenceTemporary"),c=RA(i);return A._open=!c||2===c&&Boolean(s),A._close=!s||2===s&&Boolean(c),n(i)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const o={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},i={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},l=[["enter",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",i,t]],a=t.parser.constructs.insideSpan.null;a&&uA(l,l.length,0,HA(a,e.slice(r+1,n),t)),uA(l,l.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),uA(e,r-1,n-r+3,l),n=r+l.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class rp{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let o=0;if(0===n&&0===r.length)return;for(;o<e.map.length;){if(e.map[o][0]===t)return e.map[o][1]+=n,void e.map[o][2].push(...r);o+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function op(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if("enter"===o[0])"tableContent"===o[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===o[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===o[1].type)break}else"enter"===o[0]&&"tableDelimiterRow"===o[1].type&&(n=!0);t+=1}return r}function ip(e,t,n){const r=this;let o,i=0,l=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const o=t>-1?r.events[t][1].type:null,i="tableHead"===o||"tableRow"===o?w:a;if(i===w&&r.parser.lazy[r.now().line])return n(e);return i(e)};function a(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return s(e);return o=!0,l+=1,s(e)}(t)}function s(t){return null===t?n(t):CA(t)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),u):n(t):DA(t)?MA(e,s,"whitespace")(t):(l+=1,o&&(o=!1,i+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,s):(e.enter("data"),A(t)))}function A(t){return null===t||124===t||SA(t)?(e.exit("data"),s(t)):(e.consume(t),92===t?c:A)}function c(t){return 92===t||124===t?(e.consume(t),A):A(t)}function u(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),o=!1,DA(t)?MA(e,d,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):d(t))}function d(t){return 45===t||58===t?p(t):124===t?(o=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):y(t)}function f(t){return DA(t)?MA(e,p,"whitespace")(t):p(t)}function p(t){return 58===t?(l+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),h):45===t?(l+=1,h(t)):null===t||CA(t)?v(t):y(t)}function h(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):y(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):(e.exit("tableDelimiterFiller"),m(t))}function m(t){return DA(t)?MA(e,v,"whitespace")(t):v(t)}function v(n){return 124===n?d(n):(null===n||CA(n))&&o&&i===l?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):y(n)}function y(e){return n(e)}function w(t){return e.enter("tableRow"),b(t)}function b(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),b):null===n||CA(n)?(e.exit("tableRow"),t(n)):DA(n)?MA(e,b,"whitespace")(n):(e.enter("data"),k(n))}function k(t){return null===t||124===t||SA(t)?(e.exit("data"),b(t)):(e.consume(t),92===t?x:k)}function x(t){return 92===t||124===t?(e.consume(t),k):k(t)}}function lp(e,t){let n,r,o,i=-1,l=!0,a=0,s=[0,0,0,0],A=[0,0,0,0],c=!1,u=0;const d=new rp;for(;++i<e.length;){const f=e[i],p=f[1];"enter"===f[0]?"tableHead"===p.type?(c=!1,0!==u&&(sp(d,t,u,n,r),r=void 0,u=0),n={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(i,0,[["enter",n,t]])):"tableRow"===p.type||"tableDelimiterRow"===p.type?(l=!0,o=void 0,s=[0,0,0,0],A=[0,i+1,0,0],c&&(c=!1,r={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(i,0,[["enter",r,t]])),a="tableDelimiterRow"===p.type?2:r?3:1):!a||"data"!==p.type&&"tableDelimiterMarker"!==p.type&&"tableDelimiterFiller"!==p.type?"tableCellDivider"===p.type&&(l?l=!1:(0!==s[1]&&(A[0]=A[1],o=ap(d,t,s,a,void 0,o)),s=A,A=[s[1],i,0,0])):(l=!1,0===A[2]&&(0!==s[1]&&(A[0]=A[1],o=ap(d,t,s,a,void 0,o),s=[0,0,0,0]),A[2]=i)):"tableHead"===p.type?(c=!0,u=i):"tableRow"===p.type||"tableDelimiterRow"===p.type?(u=i,0!==s[1]?(A[0]=A[1],o=ap(d,t,s,a,i,o)):0!==A[1]&&(o=ap(d,t,A,a,i,o)),a=0):!a||"data"!==p.type&&"tableDelimiterMarker"!==p.type&&"tableDelimiterFiller"!==p.type||(A[3]=i)}for(0!==u&&sp(d,t,u,n,r),d.consume(t.events),i=-1;++i<t.events.length;){const e=t.events[i];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=op(t.events,i))}return e}function ap(e,t,n,r,o,i){const l=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(i.end=Object.assign({},Ap(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const a=Ap(t.events,n[1]);if(i={type:l,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",i,t]]),0!==n[2]){const o=Ap(t.events,n[2]),i=Ap(t.events,n[3]),l={type:"tableContent",start:Object.assign({},o),end:Object.assign({},i)};if(e.add(n[2],0,[["enter",l,t]]),2!==r){const r=t.events[n[2]],o=t.events[n[3]];if(r[1].end=Object.assign({},o[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",l,t]])}return void 0!==o&&(i.end=Object.assign({},Ap(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function sp(e,t,n,r,o){const i=[],l=Ap(t.events,n);o&&(o.end=Object.assign({},l),i.push(["exit",o,t])),r.end=Object.assign({},l),i.push(["exit",r,t]),e.add(n+1,0,i)}function Ap(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const cp={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),o};function o(t){return SA(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),i):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),i):n(t)}function i(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(t)}function l(r){return CA(r)?t(r):DA(r)?e.check({tokenize:up},t,n)(r):n(r)}}};function up(e,t,n){return MA(e,function(e){return null===e?n(e):t(e)},"whitespace")}const dp={};function fp(e){const t=e||dp,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return pA([{text:Uf},{document:{91:{name:"gfmFootnoteDefinition",tokenize:$f,continuation:{tokenize:ep},exit:tp}},text:{91:{name:"gfmFootnoteCall",tokenize:Zf},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Xf,resolveTo:Jf}}},np(e),{flow:{null:{name:"table",tokenize:ip,resolveAll:lp}}},{text:{91:cp}}])}(t)),o.push([{transforms:[Qd],enter:{literalAutolink:Cd,literalAutolinkEmail:Sd,literalAutolinkHttp:Sd,literalAutolinkWww:Sd},exit:{literalAutolink:Td,literalAutolinkEmail:Id,literalAutolinkHttp:Dd,literalAutolinkWww:Bd}},{enter:{gfmFootnoteCallString:Nd,gfmFootnoteCall:Rd,gfmFootnoteDefinitionLabelString:Hd,gfmFootnoteDefinition:Fd},exit:{gfmFootnoteCallString:zd,gfmFootnoteCall:jd,gfmFootnoteDefinitionLabelString:Ud,gfmFootnoteDefinition:_d}},{canContainEols:["delete"],enter:{strikethrough:Kd},exit:{strikethrough:Xd}},{enter:{table:xf,tableData:Sf,tableHeader:Sf,tableRow:Pf},exit:{codeText:Df,table:Ef,tableData:Cf,tableHeader:Cf,tableRow:Cf}},{exit:{taskListCheckValueChecked:Tf,taskListCheckValueUnchecked:Tf,paragraph:Qf}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ed,notInConstruct:Pd},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ed,notInConstruct:Pd},{character:":",before:"[ps]",after:"\\/",inConstruct:Ed,notInConstruct:Pd}]},Vd(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Yd}],handlers:{delete:Jd}},If(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Mf}}]}}(t))}const pp="rgba(0, 0, 0, 0.3)",hp={p:e=>{let{children:n}=e;return t.createElement("p",{style:{margin:0,marginBottom:"0.5em",lineHeight:1.4,textAlign:"left"}},n)},ul:e=>{let{children:n}=e;return t.createElement("ul",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"}},n)},ol:e=>{let{children:n}=e;return t.createElement("ol",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"}},n)},li:e=>{let{children:n}=e;return t.createElement("li",{style:{marginBottom:"1px",lineHeight:1.4}},n)},code:e=>{let{className:n,children:r}=e;return/\blanguage-/.test(n||"")?t.createElement("pre",{style:{backgroundColor:pp,padding:"8px",borderRadius:"4px",overflowX:"auto",margin:"0.5em 0",whiteSpace:"pre-wrap"}},t.createElement("code",null,r)):t.createElement("code",{style:{backgroundColor:pp,padding:"2px 4px",borderRadius:"4px",fontFamily:"inherit",fontSize:"0.95em"}},r)},blockquote:e=>{let{children:n}=e;return t.createElement("blockquote",{style:{margin:0,paddingLeft:"10px",borderLeft:"2px solid rgba(255, 255, 255, 0.4)",color:"inherit",fontStyle:"italic"}},n)},a:e=>{let{children:n,href:r}=e;return t.createElement("a",{href:r,target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"underline",fontWeight:600}},n)},table:e=>{let{children:n}=e;return t.createElement("table",{style:{borderCollapse:"collapse",width:"100%",margin:"0.5em 0",fontSize:"0.95em",color:"#fff"}},n)},th:e=>{let{children:n}=e;return t.createElement("th",{style:{border:"1px solid rgba(255, 255, 255, 0.4)",padding:"6px 10px",textAlign:"left",verticalAlign:"top",fontWeight:600,color:"#fff",backgroundColor:"rgba(255, 255, 255, 0.15)",overflowWrap:"normal",wordBreak:"normal"}},n)},td:e=>{let{children:n}=e;return t.createElement("td",{style:{border:"1px solid rgba(255, 255, 255, 0.4)",padding:"6px 10px",textAlign:"left",verticalAlign:"top",color:"#fff",overflowWrap:"normal",wordBreak:"normal"}},n)}},gp=e=>{let{children:n}=e;return t.createElement("div",{style:{whiteSpace:"normal"}},t.createElement(vd,{remarkPlugins:[fp],components:hp},"string"==typeof n?n:""))},mp=n((e,t)=>{let{embedded:n,currentOpen:r,enabled:o,onSetEnabled:i}=e;const a=en(),A=(()=>{const{isChatWindowOpen:e,toggleChatWindow:t,toggleIsBotTyping:n,scrollToBottom:r,getIsChatBotVisible:o}=oe();return{isChatWindowOpen:e,toggleChatWindow:t,toggleIsBotTyping:n,scrollToBottom:r,getIsChatBotVisible:o}})(),c=l(!1),u=l(!1);return s(()=>{!n&&A&&A.toggleChatWindow&&(c.current===r||u.current||(setTimeout(()=>{A&&A.toggleChatWindow&&A.toggleChatWindow(r)},0),c.current=null!=r&&r),u.current=!1)},[r,n,A]),s(()=>{const e=()=>{u.current=!0};return window.addEventListener("rcb-toggle-chat-window",e),()=>window.removeEventListener("rcb-toggle-chat-window",e)}),f(t,()=>({addMessage:e=>{a&&a.injectMessage&&a.injectMessage(e)},openChat:()=>{!n&&A&&A.toggleChatWindow&&A.toggleChatWindow(!0)},closeChat:()=>{!n&&A&&A.toggleChatWindow&&A.toggleChatWindow(!1)},toggleChat:()=>{!n&&A&&A.toggleChatWindow&&A.toggleChatWindow()},setBotEnabled:e=>{i&&i(e)}}),[a,A,n,i]),null});mp.displayName="BotController";const vp=r(null),yp=e=>{let{trackEvent:n,children:r}=e;const o=l(n);return o.current=n,t.createElement(vp.Provider,{value:{trackEvent:e=>o.current(e)}},r)},wp=()=>{const e=o(vp);return e||{trackEvent:()=>{}}},bp=e=>{let{loginUrl:n,className:r="",style:o,isHeaderButton:i=!1}=e;const{trackEvent:l}=wp(),a=i?{display:"inline-block",padding:"6px 12px",backgroundColor:"transparent",border:"1px solid #ccc",color:"white",textDecoration:"none",borderRadius:"4px",fontWeight:"normal",textAlign:"center",margin:"8px",fontSize:"12px",opacity:.8,transition:"all 0.2s ease"}:{display:"inline-block",padding:"10px 20px",backgroundColor:"white",border:"1px solid var(--primaryColor, #107180)",color:"var(--primaryColor, #107180)",textDecoration:"none",borderRadius:"4px",fontWeight:"bold",textAlign:"center",margin:"18px",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)"};return t.createElement(t.Fragment,null,i&&t.createElement("style",null,"\n .rcb-chat-header-container .qa-bot-header-login-button:hover {\n background-color: #0000001a !important;\n opacity: 1 !important;\n }\n "),t.createElement("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:`qa-bot-login-button ${i?"qa-bot-header-login-button":""} ${r}`,style:Object.assign(Object.assign({},a),o),onClick:()=>{l({type:"chatbot_login_clicked",loginUrl:n})}},"Log In"))},kp=()=>t.createElement("div",{className:"user-login-icon",style:{alignItems:"center",justifyContent:"center",width:"30px",height:"30px",borderRadius:"50%",backgroundColor:"var(--primaryColor, #1a5b6e)",marginRight:"5px",display:"flex"},role:"img","aria-label":"User logged in",title:"User logged in"},t.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},t.createElement("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),t.createElement("circle",{cx:"12",cy:"7",r:"4"}))),xp=[];for(let e=0;e<256;++e)xp.push((e+256).toString(16).slice(1));let Ep;const Pp=new Uint8Array(16);var Cp={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Sp(e,t,n){if(Cp.randomUUID&&!e)return Cp.randomUUID();const r=(e=e||{}).random??e.rng?.()??function(){if(!Ep){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ep=crypto.getRandomValues.bind(crypto)}return Ep(Pp)}();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(e,t=0){return(xp[e[t+0]]+xp[e[t+1]]+xp[e[t+2]]+xp[e[t+3]]+"-"+xp[e[t+4]]+xp[e[t+5]]+"-"+xp[e[t+6]]+xp[e[t+7]]+"-"+xp[e[t+8]]+xp[e[t+9]]+"-"+xp[e[t+10]]+xp[e[t+11]]+xp[e[t+12]]+xp[e[t+13]]+xp[e[t+14]]+xp[e[t+15]]).toLowerCase()}(r)}function Dp(){return"undefined"!=typeof localStorage&&"true"===localStorage.getItem("QA_BOT_DEBUG")}const Bp="background: #1a5b6e; color: white; padding: 2px 6px; border-radius: 3px;",Ip="background: #7c3aed; color: white; padding: 2px 6px; border-radius: 3px;",Tp="background: #059669; color: white; padding: 2px 6px; border-radius: 3px;",Qp="background: #f97316; color: white; padding: 2px 6px; border-radius: 3px;",Mp="background: #f59e0b; color: #000; padding: 2px 6px; border-radius: 3px 0 0 3px; font-weight: bold;",Op="background: #fbbf24; color: #000; padding: 2px 6px; border-radius: 0 3px 3px 0;",Lp=()=>{Dp()&&console.log("%c QA Bot Core %c v0.5.0 ",Mp,Op)},Np=function(e){if(Dp()){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];console.log(`%c[Session]%c ${e}`,Bp,"",...n)}},Rp=function(e){if(Dp()){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];console.log(`%c[History]%c ${e}`,Ip,"",...n)}},Hp=(e,t)=>{Dp()&&console.log(`%c[Message]%c ${e}`,Tp,"",t)},Fp=function(e){if(Dp()){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];console.log(`%c[Turnstile]%c ${e}`,Qp,"",...n)}},zp=function(){console.warn(...arguments)},jp=function(){console.error(...arguments)},Up="qa_bot_session_messages",_p=()=>`qa_bot_session_${Sp()}`,qp=()=>{try{const e=localStorage.getItem(Up);return e?JSON.parse(e):{}}catch(e){return{}}},Vp=(e,t,n,r,o)=>{const i=qp();!i[e]&&(i[e]={messages:[],startedAt:(new Date).toISOString(),preview:""},Rp("NEW session created",{sessionId:e.slice(-12)}));if(i[e].messages.some(e=>e.id===t))return void Rp("DUPLICATE message skipped",{sessionId:e.slice(-12),messageId:t.slice(-8),sender:r});const l={id:t,content:n,sender:r,type:o,timestamp:Date.now()};i[e].messages.push(l),Rp("MESSAGE added",{sessionId:e.slice(-12),messageId:t.slice(-8),sender:r,totalInSession:i[e].messages.length});const a=i[e].messages,s=a.find(e=>{var t;return"bot"===e.sender.toLowerCase()&&(null===(t=e.content)||void 0===t?void 0:t.trim())&&e.content.length>=100});if(s){const t=s.content;i[e].preview=t.slice(0,50)+(t.length>50?"...":"")}else{const t=a.find(e=>{var t;return"user"===e.sender.toLowerCase()&&(null===(t=e.content)||void 0===t?void 0:t.trim())});if(t&&!i[e].preview){const n=t.content;i[e].preview=n.slice(0,50)+(n.length>50?"...":"")}}(e=>{var t;const n=()=>Object.values(e).reduce((e,t)=>e+t.messages.length,0);for(;n()>100&&Object.keys(e).length>1;){const n=null===(t=Object.entries(e).sort((e,t)=>{let[,n]=e,[,r]=t;return new Date(n.startedAt).getTime()-new Date(r.startedAt).getTime()})[0])||void 0===t?void 0:t[0];if(!n)break;delete e[n]}localStorage.setItem(Up,JSON.stringify(e))})(i),Rp("STORAGE state",{ourSessions:Object.keys(i).length,ourTotalMessages:Object.values(i).reduce((e,t)=>e+t.messages.length,0)})},Gp=e=>{var t,n;return null!==(n=null===(t=qp()[e])||void 0===t?void 0:t.messages.length)&&void 0!==n?n:0},Wp=e=>{const t=qp()[e];return(null==t?void 0:t.startedAt)?Date.now()-new Date(t.startedAt).getTime():0},Yp=r(void 0),Kp=e=>{let{children:n,getSessionId:r,setSessionId:o,resetSession:i,clearResettingFlag:l}=e;return t.createElement(Yp.Provider,{value:{getSessionId:r,setSessionId:o,resetSession:i,clearResettingFlag:l}},n)},Xp=()=>{const e=o(Yp);if(!e)throw new Error("useSession must be used within a SessionProvider");return e},Jp=()=>{const[e,n]=a(!1),[r,o]=a([]),[i,A]=a(null),[c,u]=a(0),d=l(null),f=l(null),{replaceMessages:p}=en(),{toggleTextAreaDisabled:h}=rn(),{setSessionId:g,getSessionId:m}=Xp();s(()=>{var t,r;const o=e=>{d.current&&!d.current.contains(e.target)&&f.current&&!f.current.contains(e.target)&&n(!1)},i=null!==(r=null===(t=d.current)||void 0===t?void 0:t.getRootNode())&&void 0!==r?r:document;return e&&i.addEventListener("mousedown",o),()=>{i.removeEventListener("mousedown",o)}},[e]);const v=e=>{var t;const r=m();if(Rp("RESTORE requested",{targetSession:e.slice(-12),currentSession:null==r?void 0:r.slice(-12)}),e===r)return Rp("RESTORE skipped - already on this session"),void n(!1);const o=(e=>{var t;return(null===(t=qp()[e])||void 0===t?void 0:t.messages)||[]})(e).filter(e=>{var t;return null===(t=e.content)||void 0===t?void 0:t.trim()});Rp("Stored messages from our localStorage",{count:o.length,ids:o.map(e=>e.id.slice(-8))});const i=o.map(e=>({id:e.id,content:e.content,sender:e.sender.toUpperCase(),type:e.type||"string",timestamp:new Date(e.timestamp).toISOString()}));g(e),Rp("Session ID updated",{newSession:e.slice(-12)}),p(i),Rp("replaceMessages called",{count:i.length}),(e=>{setTimeout(()=>{const t=(e||document).querySelector(".rcb-chat-body-container");t&&t.querySelectorAll(".rcb-bot-message").forEach(e=>{var t;let n=e.innerHTML,r=!1;n.includes("](")&&(n=n.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>'),r=!0),n.includes("&lt;a href=")&&(n=n.replace(/&lt;a\s+href=["']([^"']+)["'][^&]*&gt;([^&]+)&lt;\/a&gt;/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),r=!0),(n.includes("&lt;a ")||(null===(t=e.textContent)||void 0===t?void 0:t.includes("<a href=")))&&(e.textContent||"").includes("<a href=")&&(n=n.replace(/&lt;a\s+href="([^"]+)"[^&]*&gt;([^&]+)&lt;\/a&gt;/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),r=!0),r&&(e.innerHTML=n)})},50)})(null===(t=f.current)||void 0===t?void 0:t.getRootNode()),h(!1),Rp("Chat input enabled after restore"),n(!1)};return t.createElement("div",{style:{position:"relative"}},t.createElement("button",{ref:f,className:"history-button",onClick:()=>{if(!e&&(o((()=>{const e=qp();return Object.entries(e).map(e=>{let[t,n]=e;return Object.assign({sessionId:t},n)}).sort((e,t)=>new Date(t.startedAt).getTime()-new Date(e.startedAt).getTime())})()),f.current)){const e=f.current.closest(".rcb-chat-window");if(e){const t=e.getBoundingClientRect(),n=f.current.getBoundingClientRect();A(t.width+3),u(t.right-n.right-18+4)}}n(!e)},style:{alignItems:"center",justifyContent:"center",width:"30px",height:"30px",borderRadius:"50%",backgroundColor:"var(--primaryColor, #1a5b6e)",marginRight:"18px",display:"flex",border:"none",cursor:"pointer",padding:0},"aria-label":"View chat history",title:"View chat history","aria-expanded":e,"aria-haspopup":"menu"},t.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},t.createElement("circle",{cx:"12",cy:"12",r:"10"}),t.createElement("polyline",{points:"12 6 12 12 16 14"}))),e&&t.createElement("div",{ref:d,role:"menu",style:{position:"absolute",right:c?`-${c}px`:"-18px",top:"100%",marginTop:"8px",width:i?`${i}px`:"550px",backgroundColor:"white",borderRadius:0,borderBottom:"3px solid var(--primaryColor, #1a5b6e)",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",maxHeight:"250px",overflowY:"auto",zIndex:1e3}},0===r.length?t.createElement("div",{style:{padding:"12px 16px",color:"#666",fontSize:"14px",textAlign:"center"}},"No chat history"):r.map(e=>t.createElement("button",{key:e.sessionId,role:"menuitem",onClick:()=>v(e.sessionId),style:{width:"100%",padding:"10px 14px",border:"none",backgroundColor:"transparent",cursor:"pointer",textAlign:"left",display:"flex",flexDirection:"column",gap:"2px",borderBottom:"1px solid #eee"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#f5f5f5"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent"}},t.createElement("span",{style:{fontSize:"14px",color:"#333",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},e.preview||"New conversation"),t.createElement("span",{style:{fontSize:"12px",color:"#888"}},(e=>{const t=new Date(e),n=(new Date).getTime()-t.getTime(),r=Math.floor(n/864e5);return 0===r?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):1===r?"Yesterday":r<7?t.toLocaleDateString([],{weekday:"short"}):t.toLocaleDateString([],{month:"short",day:"numeric"})})(e.startedAt))))))},Zp=e=>{var{width:n=24,height:r=24,color:o="currentColor",children:i}=e,l=b(e,["width","height","color","children"]);return t.createElement("svg",w({xmlns:"http://www.w3.org/2000/svg",width:n,height:r,viewBox:"0 0 24 24",fill:"none",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},l),i)},$p=e=>t.createElement(Zp,e,t.createElement("path",{d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})),eh=()=>{const{restartFlow:e}=$t(),{setTextAreaValue:n}=rn(),{getSessionId:r,resetSession:o,clearResettingFlag:i}=Xp(),{trackEvent:l}=wp();return t.createElement("button",{onClick:async()=>{const t=r(),a=t?Gp(t):0;l({type:"chatbot_new_chat",previousMessageCount:a}),o(),await n(""),await e(),setTimeout(()=>{i()},100)},tabIndex:0,"aria-label":"New chat conversation",style:{backgroundColor:"var(--primaryColor, #107180)",border:"none",color:"#ffffff",fontSize:"14px",cursor:"pointer",padding:"8px 12px",borderRadius:"4px",transition:"all 0.2s ease",display:"flex",alignItems:"center",gap:"6px",fontWeight:"500"},onMouseEnter:e=>{e.target.style.backgroundColor="var(--secondaryColor, #0d5f6b)"},onMouseLeave:e=>{e.target.style.backgroundColor="var(--primaryColor, #107180)"}},t.createElement($p,{width:16,height:16}),"New Chat")};function th(e){if("string"==typeof e)return e;if("number"==typeof e)return String(e);if(!e)return"";if(Array.isArray(e))return e.map(th).join("");if("object"==typeof e&&null!==e&&"props"in e){const t=e.props;if(t&&"children"in t)return th(t.children)}return""}const nh=()=>{const{getSessionId:e}=Xp(),t=i(t=>{var n;const r=null===(n=t.data)||void 0===n?void 0:n.message;if(!(null==r?void 0:r.id))return;const o=r.sender,i=r.type||"string";let l;if(l="string"==typeof r.content?r.content:th(r.content),Hp("TRACKED",{id:r.id,sender:o,content:l.substring(0,50)+(l.length>50?"...":"")}),l.includes("rcb-options-container"))return;if(!l.trim())return;const a=e();Vp(a,r.id,l,o,i)},[e]);return s(()=>(window.addEventListener("rcb-pre-inject-message",t),window.addEventListener("rcb-stop-stream-message",t),()=>{window.removeEventListener("rcb-pre-inject-message",t),window.removeEventListener("rcb-stop-stream-message",t)}),[t]),null},rh=()=>(s(()=>{const e=e=>{if(!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Enter"," ","Home","End"].includes(e.key))return;const n=document.activeElement;if(n&&("INPUT"===n.tagName||"TEXTAREA"===n.tagName||"true"===n.contentEditable||n.classList.contains("rcb-chat-input-textarea")))return;const r=document.querySelector(".rcb-chat-window");if(!r)return;const o=Array.from(r.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(e=>null!==e.offsetParent);if(o.length>0){const t=o[o.length-1].querySelector(".rcb-checkbox-container");if(t&&null!==t.offsetParent){const n=Array.from(t.querySelectorAll(".rcb-checkbox-row-container")),r=t.querySelector(".rcb-checkbox-next-button");if(n.length>0){const t=[...n];return r&&t.push(r),void((e,t)=>{e.preventDefault();let n=-1;for(let e=0;e<t.length;e++)if(t[e]===document.activeElement||t[e].contains(document.activeElement)){n=e;break}-1===n&&(n=0);let r=n;switch(e.key){case"ArrowDown":case"ArrowRight":r=n<t.length-1?n+1:0;break;case"ArrowUp":case"ArrowLeft":r=n>0?n-1:t.length-1;break;case"Home":r=0;break;case"End":r=t.length-1;break;case"Enter":case" ":{const e=t[n],r=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});return void e.dispatchEvent(r)}default:return}t[r].focus(),t[r].setAttribute("tabindex","0"),t[r].classList.add("keyboard-focused"),t.forEach((e,t)=>{t!==r&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))})})(e,t)}}}let i=[];if(o.length>0){const e=o[o.length-1],t=Array.from(e.querySelectorAll(".rcb-options-container")).filter(e=>null!==e.offsetParent);if(t.length>0){const e=t[t.length-1];i=Array.from(e.querySelectorAll(".rcb-options"))}}if(0===i.length)return;const l=i.findIndex(e=>e===document.activeElement);switch(e.key){case"ArrowDown":case"ArrowRight":{let t;e.preventDefault(),t=l<i.length-1?l+1:0,i[t].setAttribute("tabindex","0"),i.forEach((e,n)=>{n!==t&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))}),i[t].classList.add("keyboard-focused"),i[t].focus();break}case"ArrowUp":case"ArrowLeft":{let t;e.preventDefault(),t=l>0?l-1:i.length-1,i[t].setAttribute("tabindex","0"),i.forEach((e,n)=>{n!==t&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))}),i[t].classList.add("keyboard-focused"),i[t].focus();break}case"Enter":case" ":if(e.preventDefault(),document.activeElement&&i.includes(document.activeElement)){const e=document.activeElement;if(e.classList.contains("rcb-checkbox-row-container")||e.closest(".rcb-checkbox-row-container")){const n=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(n);const r=e.querySelector(".rcb-checkbox-label"),o=r?r.textContent:e.textContent||"checkbox",i=e.querySelector(".rcb-checkbox-mark"),l=i&&i.style.backgroundColor?"checked":"unchecked";t(`${o} ${l}`)}else{const n=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(n);const r=e.textContent||e.innerText;t(`Selected: ${r}`)}}break;case"Home":e.preventDefault(),i.length>0&&(i[0].setAttribute("tabindex","0"),i.forEach((e,t)=>{0!==t&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))}),i[0].classList.add("keyboard-focused"),i[0].focus());break;case"End":if(e.preventDefault(),i.length>0){const e=i.length-1;i[e].setAttribute("tabindex","0"),i.forEach((t,n)=>{n!==e&&(t.setAttribute("tabindex","-1"),t.classList.remove("keyboard-focused"))}),i[e].classList.add("keyboard-focused"),i[e].focus()}}},t=e=>{const t=document.createElement("div");t.setAttribute("aria-live","assertive"),t.setAttribute("aria-atomic","true"),t.className="sr-only",t.textContent=e,document.body.appendChild(t),setTimeout(()=>{document.body.contains(t)&&document.body.removeChild(t)},1e3)},n=(e=null)=>{let n=e;if(n||(n=document.querySelector(".rcb-chat-window"),n||(n=document.querySelector('[class*="rcb-chat"]')),n||(n=document.querySelector(".qa-bot"))),!n)return;const r=null!==n.closest(".embedded-qa-bot"),o=Array.from(n.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(e=>null!==e.offsetParent);if(0===o.length)return;const i=o[o.length-1],l=Array.from(i.querySelectorAll(".rcb-options-container")).filter(e=>null!==e.offsetParent);let a=[];if(l.length>0){const e=l[l.length-1];a=Array.from(e.querySelectorAll(".rcb-options"))}if(0===a.length){let e=i.querySelector(".rcb-checkbox-container");if(!e&&n&&(e=n.querySelector(".rcb-checkbox-container")),e&&null!==e.offsetParent){const t=Array.from(e.querySelectorAll(".rcb-checkbox-row-container")).filter(e=>null!==e.offsetParent&&"none"!==e.style.display);if(t.length>0){const n=e.querySelector(".rcb-checkbox-next-button"),o=[...t];if(n&&null!==n.offsetParent&&o.push(n),o.forEach((e,t)=>{e.setAttribute("tabindex",0===t?"0":"-1"),0===t?e.classList.add("keyboard-focused"):e.classList.remove("keyboard-focused")}),t.length>1){e.querySelectorAll(".keyboard-nav-hint").forEach(e=>e.remove());const t=document.createElement("div");t.className="keyboard-nav-hint",t.textContent="Use arrow keys ↕ to navigate, Enter to select/deselect, or click any option",t.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",e.insertBefore(t,e.firstChild)}return void setTimeout(()=>{o[0]&&null!==o[0].offsetParent&&!r&&o[0].focus()},150)}}}if(a.length>0){if(a.forEach((e,t)=>{const n=0===t?"0":"-1";e.setAttribute("tabindex",n),e.setAttribute("role","option"),e.setAttribute("aria-posinset",t+1),e.setAttribute("aria-setsize",a.length),0===t?e.classList.add("keyboard-focused"):e.classList.remove("keyboard-focused")}),a.length>1){const e=l.length>0?l[l.length-1]:null;if(e){e.querySelectorAll(".keyboard-nav-hint").forEach(e=>e.remove());const t=document.createElement("div");t.className="keyboard-nav-hint",t.textContent="Use arrow keys ↕ to navigate, Enter to select, or click any option",t.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",e.insertBefore(t,e.firstChild)}}else{const e=l.length>0?l[l.length-1]:null;if(e){e.querySelectorAll(".keyboard-nav-hint").forEach(e=>e.remove())}}setTimeout(()=>{a[0]&&null!==a[0].offsetParent&&!r&&(a[0].focus(),a.length>1&&t(`${a.length} options available. Use arrow keys to navigate.`))},200)}},r=new MutationObserver(e=>{e.forEach(e=>{if("childList"===e.type){const t=Array.from(e.addedNodes),r=t.some(e=>e.nodeType===Node.ELEMENT_NODE&&(e.classList?.contains("rcb-options-container")||e.classList?.contains("rcb-options")||e.querySelector?.(".rcb-options-container")||e.querySelector?.(".rcb-options"))),o=t.some(e=>e.nodeType===Node.ELEMENT_NODE&&(e.classList?.contains("rcb-checkbox-container")||e.querySelector?.(".rcb-checkbox-container")));if(r||o){let t=e.target;for(;t&&!t.classList?.contains("qa-bot")&&!t.classList?.contains("rcb-chat-window");)t=t.parentElement;(t||document).querySelectorAll(".rcb-options[tabindex], .rcb-checkbox-row-container[tabindex], .rcb-checkbox-next-button[tabindex]").forEach(e=>{e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused")}),setTimeout(()=>n(t),100)}}})});r.observe(document.body,{childList:!0,subtree:!0}),document.addEventListener("keydown",e),n();const o=setInterval(()=>{document.querySelectorAll(".qa-bot").forEach(e=>{const t=e.querySelectorAll(".rcb-options-container .rcb-options").length>0,r=e.querySelectorAll(".rcb-checkbox-row-container").length>0;if(t){const t=e.querySelectorAll(".rcb-options[tabindex]").length;e.querySelectorAll(".rcb-options").length>t&&n(e)}if(r){const t=e.querySelectorAll(".rcb-checkbox-row-container[tabindex]").length;e.querySelectorAll(".rcb-checkbox-row-container").length>t&&n(e)}})},1e3);return()=>{document.removeEventListener("keydown",e),r.disconnect(),clearInterval(o)}},[]),null);let oh=!1,ih=null;function lh(){return oh?Promise.resolve():ih||(ih=new Promise((e,t)=>{const n=document.createElement("script");n.src="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit",n.async=!0,n.onload=()=>{oh=!0,Fp("Script loaded"),e()},n.onerror=()=>{ih=null,t(new Error("Failed to load Turnstile script"))},document.head.appendChild(n)}),ih)}const ah=e=>{if(!e||"string"!=typeof e)return e;let t=e.replace(/\[(https?:\/\/[^\s]+?)\](?!\()/gi,"[$1]($1)");return t=t.replace(/(?<!\]\(|href=["']|\[)https?:\/\/[^\s[\]()]+/gi,e=>{let t=e,n="";const r=t.match(/([.,;:!?]+)$/);return r&&(n=r[1],t=t.slice(0,-n.length)),`[${t}](${t})${n}`}),t},sh=e=>{let{siteKey:n,onVerify:r,onError:o,loginUrl:A}=e;const c=l(null),u=l(null),d=l(!1),f=l(null),p=l(null),[h,g]=a(!1),[m,v]=a(0),w=l("widget_error"),b=l(null),k=A&&"/login"!==A,x=i(()=>{const e=window.turnstile;if(f.current&&(null==e?void 0:e.remove)){try{e.remove(f.current)}catch(e){}f.current=null}},[]),E=i(()=>{var e;x(),h?null==o||o(w.current,null!==(e=b.current)&&void 0!==e?e:void 0):null==o||o("user_cancelled")},[o,x,h]);s(()=>()=>{x()},[x]),s(()=>{var e;return p.current=document.activeElement,null===(e=u.current)||void 0===e||e.focus(),()=>{p.current&&"function"==typeof p.current.focus&&p.current.focus()}},[]),s(()=>{const e=e=>{if("Escape"===e.key)return e.preventDefault(),void E();if("Tab"===e.key&&u.current){const t=u.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(0===t.length)return;const n=t[0],r=t[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),r.focus()):e.shiftKey||document.activeElement!==r||(e.preventDefault(),n.focus())}};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[E]),s(()=>{d.current||!c.current||h||(d.current=!0,lh().then(()=>{const e=window.turnstile;if(!e||!c.current)return jp("Turnstile API not available after script load"),w.current="api_unavailable",void g(!0);f.current=e.render(c.current,{sitekey:n,callback:e=>{Fp("Visible challenge completed"),r(e)},"error-callback":e=>(jp("Turnstile challenge failed:",e),b.current=e,w.current="widget_error",x(),g(!0),!0),"expired-callback":()=>{jp("Turnstile token expired"),w.current="token_expired",x(),g(!0)}})}).catch(e=>{jp("Failed to load Turnstile script:",e),w.current="script_load_failed",g(!0)}))},[n,r,h,x]);const P=t.createElement(t.Fragment,null,t.createElement("div",{"aria-hidden":"true",style:{position:"fixed",inset:0,background:"rgba(0, 0, 0, 0.5)",zIndex:999998}}),t.createElement("div",{ref:u,role:"dialog","aria-modal":"true","aria-labelledby":"qa-bot-turnstile-label",tabIndex:-1,style:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:999999,background:"white",padding:"24px",borderRadius:"8px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.3)",maxWidth:"90vw",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'}},t.createElement("span",{id:"qa-bot-turnstile-label",className:"sr-only",style:{position:"absolute",width:"1px",height:"1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap"}},"Verification challenge"),h?t.createElement("div",{style:{fontSize:"14px",lineHeight:"1.5",color:"#333"}},0===m?t.createElement("p",{style:{margin:"0 0 16px 0"}},"Verification failed. You can try again",k&&t.createElement(t.Fragment,null,", or"," ",t.createElement("a",{href:A,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--primaryColor, #107180)",fontWeight:"bold"}},"log in")," ","to skip verification"),"."):t.createElement(t.Fragment,null,t.createElement("p",{style:{margin:"0 0 8px 0"}},"Verification is still not working. This can be caused by browser extensions (ad blockers, privacy tools) or VPN connections."),t.createElement("p",{style:{margin:"0 0 16px 0"}},"Try disabling extensions, using a private/incognito window,",k&&t.createElement(t.Fragment,null," ",t.createElement("a",{href:A,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--primaryColor, #107180)",fontWeight:"bold"}},"logging in"),",")," ","or using a different browser.")),t.createElement("div",{style:{display:"flex",gap:"8px"}},t.createElement("button",{type:"button",onClick:()=>{x(),d.current=!1,v(e=>e+1),g(!1)},style:{padding:"8px 16px",background:"var(--primaryColor, #107180)",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Try again"),t.createElement("button",{type:"button",onClick:E,style:{padding:"8px 16px",background:"#f0f0f0",color:"#333",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Close"))):t.createElement(t.Fragment,null,t.createElement("div",{ref:c,style:{borderRadius:"8px",overflow:"hidden"}}),t.createElement("button",{type:"button",onClick:E,style:{marginTop:"16px",padding:"8px 16px",background:"#f0f0f0",color:"#333",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Cancel"))));return y(P,document.body)};function Ah(e){const{confidence:t,tools_used:n,metadata:r}=e;if(!(t||n&&0!==n.length))return"";const o=[];return t&&o.push(`• Confidence: ${t}`),n&&n.length>0&&o.push(`• Tools used: ${n.join(", ")}`),(null==r?void 0:r.agent)&&o.push(`• Agent: ${r.agent}`),`---\n${o.join("\n")}`}function ch(e){let{getState:n,onResubmit:r,trackEvent:o,loginUrl:i}=e;var l,a;const[s,A]=t.useState(null),[c,u]=t.useState(0),d=n(),f=null!==(l=import.meta.env)&&void 0!==l?l:{},p="true"===f.VITE_FORCE_TURNSTILE_WIDGET,h=null!==(a=d.siteKey)&&void 0!==a?a:p?f.VITE_TURNSTILE_SITE_KEY:null;return h&&(p||s!==h)?t.createElement(sh,{key:c,siteKey:h,loginUrl:i,onVerify:async e=>{const t=h;d.token=e,null==o||o({type:"chatbot_turnstile_completed"});"needs_another_challenge"===await r(e)?u(e=>e+1):A(t)},onError:(e,t)=>{var n;const r=null===(n=d.pendingQuery)||void 0===n?void 0:n.queryId,i=h;d.token=null,d.pendingQuery=null,d.needsChallenge=!1,d.siteKey=null,A(i),null==o||o({type:"chatbot_turnstile_error",queryId:r,failureReason:e,cloudflareErrorCode:t})}}):null}const uh="#1a5b6e",dh="#107180",fh="Arial, sans-serif",ph="Q&A Bot",hh="/chat-icon.svg",gh="Type your question here...",mh="Select an option to continue",vh=!1,yh="Ask me a question!",wh="/login",bh={general:{showHeader:!0,showFooter:!0},tooltip:{mode:"CLOSE"},chatInput:{disabled:!1,characterLimit:5e3,showCharacterCount:!1,allowNewline:!0,blockSpam:!1},chatWindow:{defaultOpen:!1,showScrollbar:!1},botBubble:{simulateStream:!0,streamSpeed:10,showAvatar:!1},userBubble:{showAvatar:!1},notification:{disabled:!0,showCount:!1},audio:{disabled:!0},emoji:{disabled:!0},fileAttachment:{disabled:!0}},kh=n((e,n)=>{var r,o,c;const{apiKey:u,qaEndpoint:d,ratingEndpoint:f,agentRatingEndpoint:p,welcomeMessage:h,open:g,onOpenChange:m,isLoggedIn:v,allowAnonAccess:y=!1,actingUser:w,primaryColor:b,secondaryColor:x,botName:E,logo:P,placeholder:C,errorMessage:S,embedded:D,footerText:B,footerLink:I,tooltipText:T,loginUrl:Q,turnstileSiteKey:M,backendId:O,resourceContext:L,customFlow:N,onAnalyticsEvent:R}=e,H=l(`bot_${Math.random().toString(36).substr(2,9)}`);s(()=>{Lp()},[]);const F=l(null);null===F.current&&(F.current=_p(),Np("CREATED",F.current));const z=l(!1),j=l({getSessionId:()=>F.current,isResetting:()=>z.current}),U=l(null),_=function(e,t){const[n,r]=a(null),[o,A]=a("idle"),c=l(null),u=l(null),d=l(!0),f=i(()=>{const e=window.turnstile;if(u.current&&(null==e?void 0:e.remove)){try{e.remove(u.current)}catch(e){}u.current=null}c.current&&(c.current.remove(),c.current=null)},[]);return s(()=>{if(d.current=!0,!e)return A("idle"),void r(null);A("loading");const n=document.createElement("div");return n.style.position="fixed",n.style.left="-9999px",n.style.top="-9999px",n.style.width="0",n.style.height="0",n.style.overflow="hidden",n.setAttribute("aria-hidden","true"),document.body.appendChild(n),c.current=n,lh().then(()=>{if(!d.current)return;const n=window.turnstile;if(!n||!c.current)return jp("Turnstile API not available for silent verification"),A("failed"),void(null==t||t({type:"chatbot_turnstile_silent_failed",failureReason:"api_unavailable"}));const o=n.render(c.current,{sitekey:e,execution:"render","refresh-expired":"auto",callback:e=>{d.current&&(Fp("Silent verification succeeded"),r(e),A("verified"))},"error-callback":e=>!d.current||(jp("Turnstile silent verification failed:",e),r(null),A("failed"),null==t||t({type:"chatbot_turnstile_silent_failed",failureReason:"widget_error",cloudflareErrorCode:e}),!0),"expired-callback":()=>{d.current&&(Fp("Token expired, awaiting refresh"),r(null),A("loading"))}});u.current=o}).catch(e=>{d.current&&(jp("Failed to load Turnstile script for silent verification:",e),A("failed"),null==t||t({type:"chatbot_turnstile_silent_failed",failureReason:"script_load_failed"}))}),()=>{d.current=!1,f()}},[e,f]),{token:n,status:o,reset:i(()=>{const e=window.turnstile;u.current&&(null==e?void 0:e.reset)&&(r(null),A("loading"),e.reset(u.current),Fp("Token consumed, resetting widget for fresh token"))},[])}}(M,e=>{var t;null===(t=U.current)||void 0===t||t.call(U,e)}),q=l(null);q.current=_.token;const[V,G]=a(v);s(()=>{G(v)},[v]);const W=void 0!==D?D:vh,Y=i(e=>{var t;R&&R(Object.assign(Object.assign({},e),{timestamp:Date.now(),sessionId:null!==(t=F.current)&&void 0!==t?t:void 0,pageUrl:"undefined"!=typeof window?window.location.href:void 0,isEmbedded:W}))},[R,W]);s(()=>{U.current=e=>Y(e)},[Y]);const K=A(()=>{const e=Object.assign({},bh);e.general=Object.assign(Object.assign({},e.general),{primaryColor:b||uh,secondaryColor:x||dh,fontFamily:fh,embedded:W});const n=!1===V?[t.createElement(Jp,{key:"history-button"}),t.createElement(bp,{key:"login-button",loginUrl:Q||wh,isHeaderButton:!0})]:[t.createElement(Jp,{key:"history-button"}),t.createElement(kp,{key:"user-icon"})];e.header={title:t.createElement("span",{style:{fontSize:14,fontWeight:500}},E||ph),showAvatar:!0,avatar:P||hh,buttons:[...n,k.CLOSE_CHAT_BUTTON]},e.chatInput=Object.assign(Object.assign({},e.chatInput),{disabled:!1,enabledPlaceholderText:C||gh,disabledPlaceholderText:S||mh}),e.tooltip=Object.assign(Object.assign({},e.tooltip),{text:T||yh});const r=B?I?t.createElement("a",{href:I,target:"_blank",rel:"noopener noreferrer",key:"footer-link"},B):t.createElement("span",{key:"footer-text"},B):null;return e.footer={text:null!=r?r:void 0,buttons:[t.createElement(eh,{key:"new-chat-button"})]},e.chatWindow=Object.assign(Object.assign({},e.chatWindow),{defaultOpen:!!W}),e.event={rcbPreInjectMessage:!0,rcbPostInjectMessage:!0,rcbStopStreamMessage:!0,rcbUserSubmitText:!0,rcbChangePath:!0,rcbToggleChatWindow:!0},e},[b,x,E,P,C,S,W,T,V,Q,B,I]),X=l(null),J=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=A(()=>{const n=(t,n)=>{if(e.current){const n=getComputedStyle(e.current).getPropertyValue(t);if(n&&""!==n.trim())return n.trim();if(e.current.parentElement){const n=getComputedStyle(e.current.parentElement).getPropertyValue(t);if(n&&""!==n.trim())return n.trim()}}return n};return{primaryColor:n("--primaryColor",t.primaryColor),secondaryColor:n("--secondaryColor",t.secondaryColor),fontFamily:n("--fontFamily",t.fontFamily)}},[e,t]);return n}(X,K.general);((e,t)=>{s(()=>{t.current&&(e?t.current.classList.add("bot-logged-in"):t.current.classList.remove("bot-logged-in"))},[e,t])})(!1!==V,X),(e=>{let{settings:n,themeColors:r}=e;s(()=>{r&&(Object.entries(r).forEach(e=>{let[t,n]=e;n&&document.documentElement.style.setProperty(`--${t}`,n)}),r.primaryColor&&document.documentElement.style.setProperty("--rcb-header-background",r.primaryColor),r.secondaryColor&&document.documentElement.style.setProperty("--rcb-header-background-hover",r.secondaryColor))},[r]),s(()=>{var e,r;(null===(e=n.header)||void 0===e?void 0:e.title)&&"string"==typeof n.header.title&&(n.header.title=t.createElement("div",{key:"header-title"},t.createElement("h1",{className:"sr-only"},n.header.title),t.createElement("span",{"aria-hidden":"true"},n.header.title))),n.device={desktopEnabled:!0,mobileEnabled:!0,applyMobileOptimizations:!1},n.chatHistory={disabled:!0},n.chatButton=Object.assign(Object.assign({},n.chatButton),{icon:null===(r=n.header)||void 0===r?void 0:r.avatar}),n.event=Object.assign(Object.assign({},n.event),{rcbToggleChatWindow:!0})},[n])})({settings:K,themeColors:J});const Z=A(()=>{const e=(e=>{let{endpoint:n,ratingEndpoint:r,agentRatingEndpoint:o,apiKey:i,sessionId:l,isResetting:a=()=>!1,isLoggedIn:s,allowAnonAccess:A=!1,loginUrl:c="/login",trackEvent:u,getTurnstileToken:d,resetTurnstileToken:f,backendId:p,resourceContext:h}=e;if(!1===s&&!A)return null==u||u({type:"chatbot_login_prompt_shown"}),{qa_loop:{message:"To ask questions, please log in first.",component:t.createElement(bp,{loginUrl:c}),chatDisabled:!0,path:"qa_loop"}};let g=null,m=null,v=!1;const y={siteKey:null,token:null,pendingQuery:null,needsChallenge:!1};let w=null;if(!n)throw new Error("Q&A endpoint is required");return{qa_loop:{message:async e=>{var t;w=e.injectMessage.bind(e);const{userInput:s}=e;if((!a||!a())&&s&&""!==s.trim()){if("👍 Helpful"===s||"👎 Not helpful"===s){if(g){const e="👍 Helpful"===s,t="agent"===m?o:r;if(t)try{const n={"Content-Type":"application/json"};i&&(n["X-API-KEY"]=i);const r=l();r&&(n["X-Session-ID"]=r,n["X-Query-ID"]=g);const o="agent"===m?{query_id:g,rating:e?"helpful":"not_helpful",session_id:r}:{sessionId:r,queryId:g,rating:e?1:0};await fetch(t,{method:"POST",headers:n,credentials:"include",body:JSON.stringify(o)}),null==u||u({type:"chatbot_rating_sent",queryId:g,rating:e?"helpful":"not_helpful"})}catch(e){jp("Error sending feedback:",e)}}return"Thanks for the feedback!"}try{const r=Sp();g=r,null==u||u({type:"chatbot_question_sent",queryId:r,questionLength:s.length});const o={"Content-Type":"application/json"};i&&(o["X-API-KEY"]=i);const a=l();a&&(o["X-Session-ID"]=a,o["X-Query-ID"]=r),o["X-Origin"]=h||"access";const A={query:s,question_id:r};a&&(A.session_id=a),p&&(A._backend=p),h&&(A.rp_name=h,A.resource_context=h);const c=null==d?void 0:d();c&&(A.turnstile_token=c),Np("SENT to API",{session_id:a,question_id:r});const w=Date.now(),b=await fetch(n,{method:"POST",headers:o,credentials:"include",body:JSON.stringify(A)});if(!b.ok)throw new Error(`API returned ${b.status}`);if((b.headers.get("content-type")||"").includes("text/event-stream")){null==f||f();const n=null===(t=b.body)||void 0===t?void 0:t.getReader();if(!n)throw new Error("Response body is not readable");const o=new TextDecoder;let i="",l="",a=!1;try{for(;;){const{done:t,value:r}=await n.read();if(t)break;i+=o.decode(r,{stream:!0});let s=i.indexOf("\n\n");for(;-1!==s;){const t=i.slice(0,s);i=i.slice(s+2);let n,r="",o="";for(const e of t.split("\n"))e.startsWith("event: ")?r=e.slice(7):e.startsWith("data: ")&&(o=e.slice(6));if(r&&o){try{n=JSON.parse(o)}catch(e){zp("Failed to parse SSE data:",o),s=i.indexOf("\n\n");continue}if("status"===r){const t=n.message||"Processing...";await e.streamMessage(`_${t}_`,"BOT"),a=!0}else if("token"===r){l+=n.content||"";const t=ah(l);await e.streamMessage(t,"BOT")}else if("done"===r){const t=n.metadata||{};if(m=t.rating_target||null,v=!0===t.is_final_response,l)await e.endStreamMessage("BOT");else{const t=n.response||"";if(t){const n=ah(t);await e.streamMessage(n,"BOT"),a=!0}a&&await e.endStreamMessage("BOT")}}else if("error"===r){const t=n.message||"An error occurred";jp("SSE error event:",t),a?(await e.streamMessage(t,"BOT"),await e.endStreamMessage("BOT")):await e.injectMessage(t)}s=i.indexOf("\n\n")}else s=i.indexOf("\n\n")}}a&&await e.endStreamMessage("BOT")}catch(t){if(jp("Error reading SSE stream:",t),!a)throw t;await e.streamMessage("I had trouble completing the response. Please try again.","BOT"),await e.endStreamMessage("BOT")}const s=Date.now()-w;return void(null==u||u({type:"chatbot_answer_received",queryId:r,responseTimeMs:s,success:!0,responseLength:l.length}))}const k=Date.now()-w,x=await b.json();if(x.requires_turnstile)return null==u||u({type:"chatbot_turnstile_shown",queryId:r}),y.siteKey=x.site_key,y.pendingQuery={query:s,sessionId:a,queryId:r},y.needsChallenge=!0,"One moment — verifying your session…";null==f||f();const E=x.response||x.answer||x.text||x.message;if(!E)throw new Error("Invalid response format from API");const P=x.metadata||{};m=P.rating_target||null,v=!0===P.is_final_response;const C=ah(E),S=Dp()?Ah(x):"",D=S?`${C}\n\n${S}`:C;return await e.injectMessage(D),void(null==u||u({type:"chatbot_answer_received",queryId:r,responseTimeMs:k,success:!0,responseLength:E.length,hasMetadata:!!S}))}catch(e){return jp("Error in Q&A flow:",e),null==u||u({type:"chatbot_answer_error",queryId:null!=g?g:void 0,errorType:e instanceof Error?e.message:"unknown"}),"I apologize, but I'm having trouble processing your question. Please try again later."}}},options:e=>a&&a()||"👍 Helpful"===e.userInput||"👎 Not helpful"===e.userInput||y.needsChallenge?[]:v&&m&&("agent"===m?o:r)?["👍 Helpful","👎 Not helpful"]:[],renderMarkdown:["BOT"],chatDisabled:!1,component:t.createElement(ch,{getState:()=>y,onResubmit:async e=>{var t;if(!y.pendingQuery||!w)return jp("Turnstile resubmit called without pending query or injectMessage"),"error";try{const r={"Content-Type":"application/json"};i&&(r["X-API-KEY"]=i),y.pendingQuery.sessionId&&(r["X-Session-ID"]=y.pendingQuery.sessionId,r["X-Query-ID"]=y.pendingQuery.queryId),r["X-Origin"]=h||"access";const o={query:y.pendingQuery.query,question_id:y.pendingQuery.queryId,turnstile_token:e};y.pendingQuery.sessionId&&(o.session_id=y.pendingQuery.sessionId),p&&(o._backend=p),h&&(o.rp_name=h,o.resource_context=h);const l=await fetch(n,{method:"POST",headers:r,credentials:"include",body:JSON.stringify(o)}),a=y.pendingQuery.queryId;if(!l.ok)throw new Error(`API returned ${l.status} after Turnstile`);if((l.headers.get("content-type")||"").includes("text/event-stream")){const e=null===(t=l.body)||void 0===t?void 0:t.getReader();if(!e)throw new Error("Response body is not readable");const n=new TextDecoder;let r="",o="",i={};for(;;){const{done:t,value:l}=await e.read();if(t)break;r+=n.decode(l,{stream:!0});let a=r.indexOf("\n\n");for(;-1!==a;){const e=r.slice(0,a);r=r.slice(a+2);let t="",n="";for(const r of e.split("\n"))r.startsWith("event: ")?t=r.slice(7):r.startsWith("data: ")&&(n=r.slice(6));if(t&&n)try{const e=JSON.parse(n);"token"===t?o+=e.content||"":"done"===t&&(i=e.metadata||{})}catch(e){}a=r.indexOf("\n\n")}}if(y.token=null,y.pendingQuery=null,y.needsChallenge=!1,y.siteKey=null,!o)throw new Error("No content received from stream");m=i.rating_target||null,v=!0===i.is_final_response,g=a;const s=ah(o);return await w(s),null==u||u({type:"chatbot_answer_received",queryId:a,success:!0,responseLength:o.length}),"success"}const s=await l.json();if(s.requires_turnstile)return y.siteKey=s.site_key,y.token=null,await w("Still verifying — please complete the challenge again."),"needs_another_challenge";y.token=null,y.pendingQuery=null,y.needsChallenge=!1,y.siteKey=null;const A=s.response||s.answer||s.text||s.message;if(!A)throw new Error("Invalid response format from API");const c=s.metadata||{};m=c.rating_target||null,v=!0===c.is_final_response,g=a;const d=ah(A),f=Dp()?Ah(s):"",b=f?`${d}\n\n${f}`:d;return await w(b),null==u||u({type:"chatbot_answer_received",queryId:a,success:!0,responseLength:A.length}),"success"}catch(e){return jp("Error resubmitting after Turnstile:",e),y.token=null,y.pendingQuery=null,y.needsChallenge=!1,y.siteKey=null,await(null==w?void 0:w("I had trouble processing your question after verification. Please try again.")),"error"}},trackEvent:u,loginUrl:c}),path:"qa_loop"}}})({endpoint:d,ratingEndpoint:f,agentRatingEndpoint:p,apiKey:u,sessionId:j.current.getSessionId,isResetting:j.current.isResetting,isLoggedIn:V,allowAnonAccess:y,loginUrl:Q||wh,trackEvent:Y,getTurnstileToken:()=>q.current,resetTurnstileToken:()=>_.reset(),backendId:O,resourceContext:L}),n={message:h,renderMarkdown:["BOT"],transition:{duration:0},path:"qa_loop"};return Object.assign(Object.assign({start:n},e),N||{})},[u,d,f,p,h,V,y,Q,N,w,Y,L,O]),$=A(()=>{return[()=>On(t),ha({markdownComponent:gp}),()=>va(e)];var e,t},[]);return s(()=>{const e=()=>{const e=document.querySelector(".rcb-chat-window");if(!e)return;const t=e.querySelector(".rcb-send-button");t&&(t.hasAttribute("tabindex")||t.setAttribute("tabindex","0"),t.hasAttribute("data-keyboard-enabled")||(t.setAttribute("data-keyboard-enabled","true"),t.addEventListener("keydown",e=>{if("Enter"===e.key||" "===e.key){e.preventDefault();const n=t&&Object.keys(t).find(e=>e.startsWith("__reactProps"));if(n){const r=t[n],o=null==r?void 0:r.onMouseDown;if(o&&"function"==typeof o)return void o(e)}const r=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});t.dispatchEvent(r)}})))},t=setInterval(e,1e3);return e(),()=>clearInterval(t)},[]),rh(),s(()=>{const e=X.current;if(!e)return;const t=e=>{var t,n,r;const o=null===(n=(t=e.target).closest)||void 0===n?void 0:n.call(t,"a");o&&o.closest(".rcb-chat-body-container")&&(o.classList.contains("qa-bot-login-button")||o.closest(".rcb-options-container")||Y({type:"chatbot_link_clicked",linkUrl:o.href,linkText:(null===(r=o.textContent)||void 0===r?void 0:r.trim())||""}))};return e.addEventListener("click",t),()=>e.removeEventListener("click",t)},[Y]),s(()=>{if(!W){const e=e=>{const t=e.data.newState;null==m||m(t);const n=F.current;Y(t?{type:"chatbot_open"}:{type:"chatbot_close",messageCount:n?Gp(n):0,durationMs:n?Wp(n):0})};return window.addEventListener("rcb-toggle-chat-window",e),()=>{window.removeEventListener("rcb-toggle-chat-window",e)}}},[W,m,Y]),t.createElement("div",{className:"qa-bot "+((null===(r=K.general)||void 0===r?void 0:r.embedded)?"embedded-qa-bot":""),ref:X,role:"region","aria-label":`${E||ph}${(null===(o=K.general)||void 0===o?void 0:o.embedded)?" - Embedded":""}`},t.createElement(Kp,{getSessionId:()=>F.current,setSessionId:e=>{const t=F.current;F.current=e,Np("RESTORED",`${null==t?void 0:t.slice(-12)} -> ${e.slice(-12)}`)},resetSession:()=>{const e=F.current;z.current=!0,F.current=_p(),Np("RESET",`${null==e?void 0:e.slice(-12)} -> ${F.current.slice(-12)}`)},clearResettingFlag:()=>{z.current=!1}},t.createElement(yp,{trackEvent:Y},t.createElement(Wt,null,t.createElement("div",null,t.createElement(nh,null),t.createElement(mp,{ref:n,embedded:(null===(c=K.general)||void 0===c?void 0:c.embedded)||!1,currentOpen:g||!1,enabled:!1!==V,onSetEnabled:e=>G(!!e&&void 0)}),t.createElement(Jt,{key:`chatbot-${H.current}-${V}`,settings:K,flow:Z,plugins:$}),t.createElement("div",{role:"status","aria-live":"polite","aria-label":"Bot response updates",className:"sr-only",id:"bot-live-region",style:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0}}),t.createElement("div",{id:"chat-input-help",className:"sr-only",style:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0}},"Type your message and press Enter to send. Use arrow keys to navigate through response options."))))))});kh.displayName="QABot";const xh=()=>{const[e,t]=a(!1),n=()=>"undefined"!=typeof navigator&&void 0!==navigator.mediaDevices&&"function"==typeof navigator.mediaDevices.getDisplayMedia;return{captureScreenshot:async()=>{if(!n())throw new Error("Screen capture is not available in this environment");try{t(!0);const e=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser",cursor:"always",width:{ideal:1920},height:{ideal:1080}},audio:!1}),n=document.createElement("video");n.srcObject=e,await new Promise(e=>{n.onloadedmetadata=()=>{n.play(),e()}});const r=document.createElement("canvas");r.width=n.videoWidth,r.height=n.videoHeight;const o=r.getContext("2d");if(!o)throw new Error("Could not get canvas context");o.drawImage(n,0,0,r.width,r.height);const i=await new Promise(e=>r.toBlob(e,"image/png"));if(!i)throw new Error("Could not create image blob");const l=(new Date).toISOString().replace(/[:.]/g,"-"),a=new File([i],`screenshot-${l}.png`,{type:"image/png"});return e.getTracks().forEach(e=>e.stop()),t(!1),a}catch(e){throw jp("Error capturing screenshot:",e),t(!1),e}},isCapturing:e,isScreenCaptureAvailable:n()}},Eh=e=>t.createElement(Zp,e,t.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),t.createElement("polyline",{points:"17 8 12 3 7 8"}),t.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"15"})),Ph=e=>new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{if("string"!=typeof r.result)return void n(new Error(`Failed to read file ${e.name}`));const o=r.result.split(",")[1];t({fileName:e.name,contentType:e.type,size:e.size,fileData:o})},r.onerror=()=>n(new Error(`Failed to read file ${e.name}`)),r.readAsDataURL(e)}),Ch=e=>Promise.all(e.map(Ph)),Sh=function(e){const t=1024*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:10)*1024;return e.size<=t},Dh=e=>e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`,Bh=e=>{let{onFileUpload:n,maxSizeMB:r=10,acceptedTypes:o="image/*,application/pdf,text/*,.doc,.docx",enableScreenshot:i=!1,className:s}=e;const[A,c]=a(!1),[u,d]=a([]),[f,p]=a(null),h=l(null),{captureScreenshot:g,isCapturing:m,isScreenCaptureAvailable:v}=xh(),y=e=>{const t=document.createElement("div");t.setAttribute("aria-live","assertive"),t.setAttribute("aria-atomic","true"),t.className="sr-only",t.textContent=e,document.body.appendChild(t),setTimeout(()=>document.body.removeChild(t),1e3)},w=e=>{if(!e||0===e.length)return void zp("FileUploadComponent: No valid files provided to handleFiles");let t;try{t=Array.from(e)}catch(e){return jp("FileUploadComponent: Error converting files to array:",e),void y("Error processing selected files. Please try again.")}const r=[...u,...t];d(r);const o=t.length,i=t.map(e=>e.name).join(", ");y(`${o} file${o>1?"s":""} selected: ${i}`),setTimeout(()=>{const e=document.querySelector(".rcb-chat-content");e&&(e.scrollTop=e.scrollHeight)},100),n&&n(r)},b=e=>{e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?c(!0):"dragleave"===e.type&&c(!1)},k=()=>{try{h.current&&h.current.click()}catch(e){jp("FileUploadComponent: Error in handleButtonClick:",e),y("Error opening file selection dialog. Please try again.")}},x=()=>{p(null)},E=i&&v;return t.createElement("div",{className:`file-upload-container ${s||""}`,style:{padding:"16px",margin:"8px 0"}},E&&t.createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:"10px"}},t.createElement("button",{onClick:e=>{e.preventDefault(),(async()=>{try{const e=await g();w([e]),y("Screenshot captured successfully")}catch(e){y("Error capturing screenshot. Please try again.")}})()},disabled:m,"aria-describedby":"screenshot-help","aria-label":m?"Taking screenshot, please wait":"Take a screenshot to attach",style:{display:"flex",alignItems:"center",gap:"8px",backgroundColor:"#107180",color:"white",border:"none",borderRadius:"5px",padding:"8px 12px",cursor:m?"not-allowed":"pointer",fontSize:"14px",fontWeight:"500",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"}},t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},t.createElement("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),t.createElement("circle",{cx:"12",cy:"13",r:"4"})),m?"Taking screenshot...":"Take screenshot..."),t.createElement("span",{id:"screenshot-help",className:"sr-only"},"Captures the current screen and adds it as an attachment")),t.createElement("div",{className:"file-upload-dropzone "+(A?"active":""),onDragEnter:b,onDragLeave:b,onDragOver:b,onDrop:e=>{var t;e.preventDefault(),e.stopPropagation(),c(!1);try{(null===(t=e.dataTransfer)||void 0===t?void 0:t.files)&&e.dataTransfer.files.length>0&&w(e.dataTransfer.files)}catch(e){jp("FileUploadComponent: Error in handleDrop:",e),y("Error processing dropped files. Please try again.")}},role:"button",tabIndex:0,"aria-label":"File upload area. Click to select files or drag and drop files here.","aria-describedby":"upload-instructions",onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),k())},style:{padding:"20px",border:"2px dashed #ccc",borderRadius:"8px",backgroundColor:A?"#f0f8ff":"#fafafa",transition:"all 0.3s ease"}},t.createElement("input",{ref:h,type:"file",className:"file-input",onChange:e=>{var t;try{(null===(t=e.target)||void 0===t?void 0:t.files)&&e.target.files.length>0&&w(e.target.files)}catch(e){jp("FileUploadComponent: Error in handleFileSelect:",e),y("Error processing selected files. Please try again.")}},multiple:!0,style:{display:"none"},"aria-label":"Select files to upload",accept:o}),t.createElement("div",{className:"upload-content",onClick:k,style:{cursor:"pointer",flexDirection:"column",alignItems:"center",display:"flex",textAlign:"center",padding:"12px"}},t.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"}},t.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"10px"}},t.createElement(Eh,null),t.createElement("p",{style:{margin:0,fontWeight:"bold"}},"Upload Files")),t.createElement("p",{id:"upload-instructions",style:{margin:0,fontSize:"14px",color:"#666"}},"Drag and drop files here or click to select. (Max ",r,"MB each)")),u.length>0&&t.createElement("div",{className:"selected-files",style:{display:"flex",flexWrap:"wrap",gap:"8px",marginTop:"12px",alignItems:"center"}},t.createElement("span",{style:{fontWeight:400,color:"#888",fontSize:"13px",marginRight:"8px",alignSelf:"center"}},"Selected files:"),u.map((e,r)=>t.createElement("span",{key:r,style:{background:"#fff",color:"#107180",borderRadius:"5px",padding:"4px 12px",fontSize:"14px",marginRight:"4px",marginBottom:"4px",border:"1px solid #ccc",display:"flex",alignItems:"center",gap:"6px",cursor:"pointer"},onClick:t=>{t.stopPropagation(),(e=>{p(e)})(e)}},t.createElement("span",{onClick:e=>{e.stopPropagation(),(e=>{const t=u.filter((t,n)=>n!==e);d(t),n&&n(t)})(r)},style:{cursor:"pointer",color:"#888",fontWeight:"bold",fontSize:"15px",marginRight:"4px",userSelect:"none",lineHeight:1},title:"Remove file","aria-label":`Remove ${e.name}`},"×"),e.name," (",Dh(e.size),")"))))),(()=>{if(!f)return null;const e=f.type.startsWith("image/"),n=f.type.startsWith("text/"),r="application/pdf"===f.type;return t.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.7)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3},onClick:x},t.createElement("div",{style:{backgroundColor:"white",padding:"20px",borderRadius:"8px",maxWidth:"90%",maxHeight:"90%",overflow:"auto",position:"relative"},onClick:e=>e.stopPropagation()},t.createElement("button",{onClick:x,style:{position:"absolute",top:"10px",right:"10px",background:"none",border:"none",fontSize:"24px",cursor:"pointer",color:"#666"}},"×"),t.createElement("h3",{style:{marginTop:0,marginBottom:"16px"}},f.name),e&&t.createElement("img",{src:URL.createObjectURL(f),alt:f.name,style:{maxWidth:"100%",maxHeight:"70vh"}}),n&&t.createElement("pre",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word",maxHeight:"70vh",overflow:"auto",padding:"16px",backgroundColor:"#f5f5f5",borderRadius:"4px"}},URL.createObjectURL(f)),r&&t.createElement("iframe",{src:URL.createObjectURL(f),style:{width:"100%",height:"70vh",border:"none"},title:f.name}),!e&&!n&&!r&&t.createElement("div",{style:{padding:"20px",textAlign:"center"}},"Preview not available for this file type")))})())};function Ih(e,t){if(!t||0===Object.keys(t).length)return e;const n={};for(const[r,o]of Object.entries(e)){let e=Object.assign({},o);if(t.disableOnOptions&&void 0===e.chatDisabled){const t=!(!e.options&&!e.checkboxes);e.chatDisabled=t}n[r]=e}return n}function Th(e){return async t=>{await t.injectMessage(e)}}function Qh(e){return async t=>{const n=await e(t);await t.injectMessage(n)}}const Mh=t.forwardRef((e,n)=>{var{defaultOpen:r}=e,o=b(e,["defaultOpen"]);const[i,l]=t.useState(r||!1),a=t.useRef(null);return t.useImperativeHandle(n,()=>({addMessage:e=>{var t;null===(t=a.current)||void 0===t||t.addMessage(e)},setBotEnabled:e=>{var t;null===(t=a.current)||void 0===t||t.setBotEnabled(e)},openChat:()=>{var e;l(!0),null===(e=a.current)||void 0===e||e.openChat()},closeChat:()=>{var e;l(!1),null===(e=a.current)||void 0===e||e.closeChat()},toggleChat:()=>{var e;l(e=>!e),null===(e=a.current)||void 0===e||e.toggleChat()}}),[]),t.createElement(kh,w({ref:a},o,{open:i,onOpenChange:l}))});function Oh(e){if(!(e.target&&e.target instanceof HTMLElement))return void jp("QA Bot: A valid target DOM element is required");const{target:n}=e,r=b(e,["target"]),o=p.createRoot(n),i={current:null};return o.render(t.createElement(t.StrictMode,null,t.createElement(Mh,w({ref:e=>{i.current=e}},r)))),{addMessage:e=>{var t;return null===(t=i.current)||void 0===t?void 0:t.addMessage(e)},setBotEnabled:e=>{var t;return null===(t=i.current)||void 0===t?void 0:t.setBotEnabled(e)},openChat:()=>{var e;return null===(e=i.current)||void 0===e?void 0:e.openChat()},closeChat:()=>{var e;return null===(e=i.current)||void 0===e?void 0:e.closeChat()},toggleChat:()=>{var e;return null===(e=i.current)||void 0===e?void 0:e.toggleChat()},destroy:()=>{i.current=null,o.unmount()}}}Mh.displayName="ProgrammaticQABot";export{Bh as FileUploadComponent,kh as QABot,Ih as applyFlowSettings,Oh as default,Ph as fileToBase64,Ch as filesToBase64,Dh as formatFileSize,Oh as qaBot,xh as useScreenshotCapture,Sh as validateFileSize,Th as withHistory,Qh as withHistoryFn};
9
9
  //# sourceMappingURL=qa-bot-core.js.map