@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.
- package/build/static/css/main.css +1 -1
- package/build/static/css/main.css.map +1 -1
- package/build/static/js/main.js +1 -1
- package/build/static/js/main.js.map +1 -1
- package/dist/qa-bot-core.css +1 -1
- package/dist/qa-bot-core.js +1 -1
- package/dist/qa-bot-core.js.map +1 -1
- package/dist/qa-bot-core.standalone.js +1 -1
- package/dist/qa-bot-core.standalone.js.map +1 -1
- package/dist/qa-bot-core.umd.cjs +1 -1
- package/dist/qa-bot-core.umd.cjs.map +1 -1
- package/dist/types/utils/getProcessedText.test.d.ts +1 -0
- package/dist/types/utils/logger.d.ts +1 -1
- package/package.json +1 -1
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
* Copyright(c) 2015 Andreas Lubbe
|
|
34
34
|
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
|
35
35
|
* MIT Licensed
|
|
36
|
-
*/var Wy,Yy;var Gy=function(){if(Yy)return Wy;Yy=1;var e=/["'&<>]/;return Wy=function(t){var n=""+t,r=e.exec(n);if(!r)return n;var o,i="",a=0,l=0;for(a=r.index;a<n.length;a++){switch(n.charCodeAt(a)){case 34:o=""";break;case 38:o="&";break;case 39:o="'";break;case 60:o="<";break;case 62:o=">";break;default:continue}l!==a&&(i+=n.substring(l,a)),l=a+1,i+=o}return l!==a?i+n.substring(l,a):i},Wy}();const Xy=Vy(Gy);function Ky(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Jy=/(url|image|image-set)\(/i;class $y extends qy{attribute(e,t){return"style"===e&&Object.keys(t).forEach(e=>{String(t[e]).match(Jy)&&delete t[e]}),t}}const Zy=/^<(!doctype|(html|head|body)(\s|>))/i,eb=/^(aria-|data-|\w+:)/iu,tb=/{{{(\w+)\/?}}}/;function nb(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}let rb=class{constructor(e,t={},n=[],r=[]){var o;Ky(this,"allowed",void 0),Ky(this,"banned",void 0),Ky(this,"blocked",void 0),Ky(this,"container",void 0),Ky(this,"content",[]),Ky(this,"props",void 0),Ky(this,"matchers",void 0),Ky(this,"filters",void 0),Ky(this,"keyIndex",void 0),this.props=t,this.matchers=n,this.filters=[...r,new $y],this.keyIndex=-1,this.container=this.createContainer(e||""),this.allowed=new Set(null!==(o=t.allowList)&&void 0!==o?o:zy),this.banned=new Set(Fy),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,a=null;return this.matchers.forEach(e=>{const l=e.asTag().toLowerCase(),s=this.getTagConfig(l);if(r[e.inverseName]||!this.isTagAllowed(l)||!this.canRenderChild(t,s))return;let c="";for(;o&&(a=e.match(o));){const{index:t,length:l,match:s,valid:u,void:A,...d}=a,f=e.propName+String(i);t>0&&(c+=o.slice(0,t)),u?(c+=A?`{{{${f}/}}}`:`{{{${f}}}}${s}{{{/${f}}}}`,this.keyIndex+=1,i+=1,n[f]={children:s,matcher:e,props:{...r,...d,key:this.keyIndex}}):c+=s,e.greedy?(o=c+o.slice(t+l),c=""):o=o.slice(t+(l||s.length))}e.greedy||(o=c+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||nb)();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);return e.match(Zy)||(o.innerHTML=this.convertLineBreaks(this.props.escapeHtml?Xy(e):e)),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:a}=o,l=i.toLowerCase(),s=_y[l]||_y[i];if(!this.isSafe(e)||!l.match(eb)&&(!t&&(!s||2===s)||l.startsWith("on")||a.replace(/(\s|\0|�([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let c="style"===l?this.extractStyleAttribute(e):a;4===s?c=!0:3===s?c=Number.parseFloat(String(c)):5!==s&&(c=String(c)),n[jy[l]||l]=this.applyAttributeFilters(l,c),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 Ny[e]?{...t,...Ny[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,t){const{noHtml:n,noHtmlExceptMatchers:r,allowElements:o,transform:i,transformOnlyAllowList:a}=this.props;let l=[],s="";return[...e.childNodes].forEach(e=>{if(1===e.nodeType){const u=e.nodeName.toLowerCase(),A=this.getTagConfig(u);s&&(l.push(s),s="");const d=this.applyNodeFilters(u,e);if(!d)return;let f;if(i&&(!a||this.isTagAllowed(u))){this.keyIndex+=1;const e=this.keyIndex;f=this.parseNode(d,A);const t=i(d,f,A);if(null===t)return;if(typeof t<"u")return void l.push(j.cloneElement(t,{key:e}));this.keyIndex=e-1}if(this.banned.has(u))return;if(n||r&&"br"!==u||!this.isTagAllowed(u)||!o&&!this.canRenderChild(t,A))l=[...l,...this.parseNode(d,A.tagName?A:t)];else{var c;this.keyIndex+=1;const e=this.extractAttributes(d),t={tagName:u};e&&(t.attributes=e),A.void&&(t.selfClose=A.void),l.push(j.createElement(Uy,{...t,key:this.keyIndex},null!==(c=f)&&void 0!==c?c:this.parseNode(d,A)))}}else if(3===e.nodeType){const o=n&&!r?e.textContent:this.applyMatchers(e.textContent||"",t);Array.isArray(o)?l=[...l,...o]:s+=o}}),s&&l.push(s),l}replaceTokens(e,t){if(!e.includes("{{{"))return e;const n=[];let r=e,o=null;for(;o=r.match(tb);){const[e,i]=o,a=o.index,l=e.includes("/");a>0&&(n.push(r.slice(0,a)),r=r.slice(a));const{children:s,matcher:c,props:u}=t[i];let A;if(l)A=e.length,n.push(c.createElement(s,u));else{const o=r.match(new RegExp(`{{{/${i}}}}`));A=o.index+o[0].length,n.push(c.createElement(this.replaceTokens(r.slice(e.length,o.index),t),u))}r=r.slice(A)}return r.length>0&&n.push(r),0===n.length?"":1===n.length&&"string"==typeof n[0]?n[0]:n}};function ob(e){var t;const{attributes:n,className:r,containerTagName:o,content:i,emptyContent:a,parsedContent:l,tagName:s,noWrap:c}=e,u=null!==(t=o??s)&&void 0!==t?t:"span",A="fragment"===u||c;let d;if(l)d=l;else{const t=new rb(i??"",e).parse();t.length>0&&(d=t)}return d||(d=a),A?j.createElement(j.Fragment,null,d):j.createElement(Uy,{attributes:n,className:r,tagName:u},d)}function ib(e){const{attributes:t,className:n,content:r="",disableFilters:o=!1,disableMatchers:i=!1,emptyContent:a=null,filters:l=[],matchers:s=[],onAfterParse:c=null,onBeforeParse:u=null,tagName:A="span",noWrap:d=!1,...f}=e,p=i?[]:s,h=o?[]:l,g=u?[u]:[],m=c?[c]:[];p.forEach(e=>{e.onBeforeParse&&g.push(e.onBeforeParse.bind(e)),e.onAfterParse&&m.push(e.onAfterParse.bind(e))});const v=g.reduce((t,n)=>n(t,e),r??""),y=new rb(v,f,p,h),b=m.reduce((t,n)=>n(t,e),y.parse());return j.createElement(ob,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:a,noWrap:d,parsedContent:0===b.length?void 0:b,tagName:A})}const ab=({children:e})=>lA.jsx("div",{style:{whiteSpace:"normal"},children:lA.jsx(ib,{content:"string"==typeof e?e:""})}),lb={autoConfig:!0},sb=(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)},cb=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},ub=e=>{const{getFlow:t}=By(),{messages:n,replaceMessages:r}=Ty(),{settings:o}=My(),{hasChatHistoryLoaded:i}=Oy(),a={...e,...lb},l=a.htmlComponent?a.htmlComponent:ab;_.useEffect(()=>{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=l)}r(i)}},[i]);const s=async e=>{var n;const r=null==(n=e.data.message)?void 0:n.sender.toUpperCase();"string"==typeof e.data.message.content&&sb(e,t(),r)&&("rcb-start-simulate-stream-message"===e.type&&(e.data.simulateStreamChunker=cb),e.data.message.contentWrapper=l,e.data.message.tags||(e.data.message.tags=[]),e.data.message.tags.push("rcb-html-renderer-plugin:parsed"))};Iy(Pm.PRE_INJECT_MESSAGE,s),Iy(Pm.CHUNK_STREAM_MESSAGE,s),Iy(Pm.START_STREAM_MESSAGE,s),Iy(Pm.START_SIMULATE_STREAM_MESSAGE,s),Iy(Pm.START_SPEAK_AUDIO,async e=>{sb(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!=a&&a.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0,rcbStartSpeakAudio:!0}}),c},Ab=e=>()=>ub(e);const db=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fb=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,pb={};function hb(e,t){return(pb.jsx?fb:db).test(e)}const gb=/[ \t\n\f\r]/g;function mb(e){return""===e.replace(gb,"")}class vb{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function yb(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 vb(n,r,t)}function bb(e){return e.toLowerCase()}vb.prototype.property={},vb.prototype.normal={},vb.prototype.space=null;class wb{constructor(e,t){this.property=e,this.attribute=t}}wb.prototype.space=null,wb.prototype.boolean=!1,wb.prototype.booleanish=!1,wb.prototype.overloadedBoolean=!1,wb.prototype.number=!1,wb.prototype.commaSeparated=!1,wb.prototype.spaceSeparated=!1,wb.prototype.commaOrSpaceSeparated=!1,wb.prototype.mustUseProperty=!1,wb.prototype.defined=!1;let xb=0;const kb=Tb(),Sb=Tb(),Eb=Tb(),Cb=Tb(),Pb=Tb(),Db=Tb(),Bb=Tb();function Tb(){return 2**++xb}const Ib=Object.freeze(Object.defineProperty({__proto__:null,boolean:kb,booleanish:Sb,commaOrSpaceSeparated:Bb,commaSeparated:Db,number:Cb,overloadedBoolean:Eb,spaceSeparated:Pb},Symbol.toStringTag,{value:"Module"})),Mb=Object.keys(Ib);class Lb extends wb{constructor(e,t,n,r){let o=-1;if(super(e,t),Ob(this,"space",r),"number"==typeof n)for(;++o<Mb.length;){const e=Mb[o];Ob(this,Mb[o],(n&Ib[e])===Ib[e])}}}function Ob(e,t,n){n&&(e[t]=n)}Lb.prototype.defined=!0;const Qb={}.hasOwnProperty;function Rb(e){const t={},n={};let r;for(r in e.properties)if(Qb.call(e.properties,r)){const o=e.properties[r],i=new Lb(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[bb(r)]=r,n[bb(i.attribute)]=r}return new vb(t,n,e.space)}const Nb=Rb({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}}),Fb=Rb({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function zb(e,t){return t in e?e[t]:t}function _b(e,t){return zb(e,t.toLowerCase())}const jb=Rb({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:_b,properties:{xmlns:null,xmlnsXLink:null}}),Hb=Rb({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:Sb,ariaAutoComplete:null,ariaBusy:Sb,ariaChecked:Sb,ariaColCount:Cb,ariaColIndex:Cb,ariaColSpan:Cb,ariaControls:Pb,ariaCurrent:null,ariaDescribedBy:Pb,ariaDetails:null,ariaDisabled:Sb,ariaDropEffect:Pb,ariaErrorMessage:null,ariaExpanded:Sb,ariaFlowTo:Pb,ariaGrabbed:Sb,ariaHasPopup:null,ariaHidden:Sb,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Pb,ariaLevel:Cb,ariaLive:null,ariaModal:Sb,ariaMultiLine:Sb,ariaMultiSelectable:Sb,ariaOrientation:null,ariaOwns:Pb,ariaPlaceholder:null,ariaPosInSet:Cb,ariaPressed:Sb,ariaReadOnly:Sb,ariaRelevant:null,ariaRequired:Sb,ariaRoleDescription:Pb,ariaRowCount:Cb,ariaRowIndex:Cb,ariaRowSpan:Cb,ariaSelected:Sb,ariaSetSize:Cb,ariaSort:null,ariaValueMax:Cb,ariaValueMin:Cb,ariaValueNow:Cb,ariaValueText:null,role:null}}),Ub=Rb({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:_b,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Db,acceptCharset:Pb,accessKey:Pb,action:null,allow:null,allowFullScreen:kb,allowPaymentRequest:kb,allowUserMedia:kb,alt:null,as:null,async:kb,autoCapitalize:null,autoComplete:Pb,autoFocus:kb,autoPlay:kb,blocking:Pb,capture:null,charSet:null,checked:kb,cite:null,className:Pb,cols:Cb,colSpan:null,content:null,contentEditable:Sb,controls:kb,controlsList:Pb,coords:Cb|Db,crossOrigin:null,data:null,dateTime:null,decoding:null,default:kb,defer:kb,dir:null,dirName:null,disabled:kb,download:Eb,draggable:Sb,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:kb,formTarget:null,headers:Pb,height:Cb,hidden:kb,high:Cb,href:null,hrefLang:null,htmlFor:Pb,httpEquiv:Pb,id:null,imageSizes:null,imageSrcSet:null,inert:kb,inputMode:null,integrity:null,is:null,isMap:kb,itemId:null,itemProp:Pb,itemRef:Pb,itemScope:kb,itemType:Pb,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:kb,low:Cb,manifest:null,max:null,maxLength:Cb,media:null,method:null,min:null,minLength:Cb,multiple:kb,muted:kb,name:null,nonce:null,noModule:kb,noValidate:kb,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:kb,optimum:Cb,pattern:null,ping:Pb,placeholder:null,playsInline:kb,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:kb,referrerPolicy:null,rel:Pb,required:kb,reversed:kb,rows:Cb,rowSpan:Cb,sandbox:Pb,scope:null,scoped:kb,seamless:kb,selected:kb,shadowRootClonable:kb,shadowRootDelegatesFocus:kb,shadowRootMode:null,shape:null,size:Cb,sizes:null,slot:null,span:Cb,spellCheck:Sb,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Cb,step:null,style:null,tabIndex:Cb,target:null,title:null,translate:null,type:null,typeMustMatch:kb,useMap:null,value:Sb,width:Cb,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Pb,axis:null,background:null,bgColor:null,border:Cb,borderColor:null,bottomMargin:Cb,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:kb,declare:kb,event:null,face:null,frame:null,frameBorder:null,hSpace:Cb,leftMargin:Cb,link:null,longDesc:null,lowSrc:null,marginHeight:Cb,marginWidth:Cb,noResize:kb,noHref:kb,noShade:kb,noWrap:kb,object:null,profile:null,prompt:null,rev:null,rightMargin:Cb,rules:null,scheme:null,scrolling:Sb,standby:null,summary:null,text:null,topMargin:Cb,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Cb,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:kb,disableRemotePlayback:kb,prefix:null,property:null,results:Cb,security:null,unselectable:null}}),qb=Rb({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:zb,properties:{about:Bb,accentHeight:Cb,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Cb,amplitude:Cb,arabicForm:null,ascent:Cb,attributeName:null,attributeType:null,azimuth:Cb,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Cb,by:null,calcMode:null,capHeight:Cb,className:Pb,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:Cb,diffuseConstant:Cb,direction:null,display:null,dur:null,divisor:Cb,dominantBaseline:null,download:kb,dx:null,dy:null,edgeMode:null,editable:null,elevation:Cb,enableBackground:null,end:null,event:null,exponent:Cb,externalResourcesRequired:null,fill:null,fillOpacity:Cb,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:Db,g2:Db,glyphName:Db,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Cb,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Cb,horizOriginX:Cb,horizOriginY:Cb,id:null,ideographic:Cb,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Cb,k:Cb,k1:Cb,k2:Cb,k3:Cb,k4:Cb,kernelMatrix:Bb,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Cb,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:Cb,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:Cb,overlineThickness:Cb,paintOrder:null,panose1:null,path:null,pathLength:Cb,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Pb,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Cb,pointsAtY:Cb,pointsAtZ:Cb,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Bb,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Bb,rev:Bb,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Bb,requiredFeatures:Bb,requiredFonts:Bb,requiredFormats:Bb,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:Cb,specularExponent:Cb,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Cb,strikethroughThickness:Cb,string:null,stroke:null,strokeDashArray:Bb,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Cb,strokeOpacity:Cb,strokeWidth:null,style:null,surfaceScale:Cb,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Bb,tabIndex:Cb,tableValues:null,target:null,targetX:Cb,targetY:Cb,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Bb,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Cb,underlineThickness:Cb,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Cb,values:null,vAlphabetic:Cb,vMathematical:Cb,vectorEffect:null,vHanging:Cb,vIdeographic:Cb,version:null,vertAdvY:Cb,vertOriginX:Cb,vertOriginY:Cb,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Cb,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Vb=/^data[-\w.:]+$/i,Wb=/-[a-z]/g,Yb=/[A-Z]/g;function Gb(e){return"-"+e.toLowerCase()}function Xb(e){return e.charAt(1).toUpperCase()}const Kb={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"},Jb=yb([Fb,Nb,jb,Hb,Ub],"html"),$b=yb([Fb,Nb,jb,Hb,qb],"svg");function Zb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ew,tw,nw,rw={};var ow=function(){if(nw)return rw;nw=1;var e=rw&&rw.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(rw,"__esModule",{value:!0}),rw.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(tw)return ew;tw=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,s="";function c(e){return e?e.replace(l,s):s}return ew=function(l,u){if("string"!=typeof l)throw new TypeError("First argument must be a string");if(!l)return[];u=u||{};var A=1,d=1;function f(e){var n=e.match(t);n&&(A+=n.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function p(){var e={line:A,column:d};return function(t){return t.position=new h(e),v(),t}}function h(e){this.start=e,this.end={line:A,column:d},this.source=u.source}function g(e){var t=new Error(u.source+":"+A+":"+d+": "+e);if(t.reason=e,t.filename=u.source,t.line=A,t.column=d,t.source=l,!u.silent)throw t}function m(e){var t=e.exec(l);if(t){var n=t[0];return f(n),l=l.slice(n.length),t}}function v(){m(n)}function y(e){var t;for(e=e||[];t=b();)!1!==t&&e.push(t);return e}function b(){var e=p();if("/"==l.charAt(0)&&"*"==l.charAt(1)){for(var t=2;s!=l.charAt(t)&&("*"!=l.charAt(t)||"/"!=l.charAt(t+1));)++t;if(t+=2,s===l.charAt(t-1))return g("End of comment missing");var n=l.slice(2,t-2);return d+=2,f(n),l=l.slice(t),d+=2,e({type:"comment",comment:n})}}function w(){var t=p(),n=m(r);if(n){if(b(),!m(o))return g("property missing ':'");var l=m(i),u=t({type:"declaration",property:c(n[0].replace(e,s)),value:l?c(l[0].replace(e,s)):s});return m(a),u}}return h.prototype.content=l,v(),function(){var e,t=[];for(y(t);e=w();)!1!==e&&(t.push(e),y(t));return t}()},ew}());return rw}();const iw=Zb(ow),aw=iw.default||iw,lw=cw("end"),sw=cw("start");function cw(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 uw(e){return e&&"object"==typeof e?"position"in e||"type"in e?dw(e.position):"start"in e||"end"in e?dw(e):"line"in e||"column"in e?Aw(e):"":""}function Aw(e){return fw(e&&e.line)+":"+fw(e&&e.column)}function dw(e){return Aw(e&&e.start)+"-"+Aw(e&&e.end)}function fw(e){return e&&"number"==typeof e?e:1}class pw 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 a=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=a?a.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=a?a.line:void 0,this.name=uw(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}}pw.prototype.file="",pw.prototype.name="",pw.prototype.reason="",pw.prototype.message="",pw.prototype.stack="",pw.prototype.column=void 0,pw.prototype.line=void 0,pw.prototype.ancestors=void 0,pw.prototype.cause=void 0,pw.prototype.fatal=void 0,pw.prototype.place=void 0,pw.prototype.ruleId=void 0,pw.prototype.source=void 0;const hw={}.hasOwnProperty,gw=new Map,mw=/[A-Z]/g,vw=/-([a-z])/g,yw=new Set(["table","tbody","thead","tfoot","tr"]),bw=new Set(["td","th"]),ww="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function xw(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 a=Array.isArray(o.children),l=sw(n);return t(r,o,i,a,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.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 a=Array.isArray(o.children)?n:t;return i?a(r,o,i):a(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?$b:Jb,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=kw(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function kw(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=$b,e.schema=o),e.ancestors.push(t);const i=Dw(e,t.tagName,!1),a=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&hw.call(t.properties,o)){const i=Pw(e,o,t.properties[o]);if(i){const[o,a]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof a&&bw.has(t.tagName)?r=a:n[o]=a}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let l=Cw(e,t);return yw.has(t.tagName)&&(l=l.filter(function(e){return"string"!=typeof e||!function(e){return"object"==typeof e?"text"===e.type&&mb(e.value):mb(e)}(e)})),Sw(e,a,i,t),Ew(a,l),e.ancestors.pop(),e.schema=r,e.create(t,i,a,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)}Bw(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=$b,e.schema=o),e.ancestors.push(t);const i=null===t.name?e.Fragment:Dw(e,t.name,!0),a=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 Bw(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 Bw(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),l=Cw(e,t);return Sw(e,a,i,t),Ew(a,l),e.ancestors.pop(),e.schema=r,e.create(t,i,a,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);Bw(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Ew(r,Cw(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 Sw(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ew(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Cw(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:gw;for(;++r<t.children.length;){const i=t.children[r];let a;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;a=e+"-"+t,o.set(e,t+1)}}const l=kw(e,i,a);void 0!==l&&n.push(l)}return n}function Pw(e,t,n){const r=function(e,t){const n=bb(t);let r=t,o=wb;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&Vb.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Wb,Xb);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Wb.test(e)){let n=e.replace(Yb,Gb);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=Lb}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{aw(t,r)}catch(t){if(!e.ignoreInvalidStyle){const n=t,r=new pw("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=ww+"#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(vw,Iw)),n[r]=t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)hw.call(e,n)&&(t[Tw(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?Kb[r.property]||r.property:r.attribute,n]}}function Dw(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=hb(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=hb(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 hw.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Bw(e)}function Bw(e,t){const n=new pw("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=ww+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Tw(e){let t=e.replace(mw,Mw);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function Iw(e,t){return t.toUpperCase()}function Mw(e){return"-"+e.toLowerCase()}const Lw={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"]},Ow={};function Qw(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 Rw(e.children,t,n)}return Array.isArray(e)?Rw(e,t,n):""}function Rw(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Qw(e[o],t,n);return r.join("")}const Nw=document.createElement("i");function Fw(e){const t="&"+e+";";Nw.innerHTML=t;const n=Nw.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}function zw(e,t,n,r){const o=e.length;let i,a=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);a<r.length;)i=r.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function _w(e,t){return e.length>0?(zw(e,e.length,0,t),e):t}const jw={}.hasOwnProperty;function Hw(e){const t={};let n=-1;for(;++n<e.length;)Uw(t,e[n]);return t}function Uw(e,t){let n;for(n in t){const r=(jw.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){jw.call(r,i)||(r[i]=[]);const e=o[i];qw(r[i],Array.isArray(e)?e:e?[e]:[])}}}function qw(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);zw(e,0,0,r)}function Vw(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 Ww(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Yw=ix(/[A-Za-z]/),Gw=ix(/[\dA-Za-z]/),Xw=ix(/[#-'*+\--9=?A-Z^-~]/);function Kw(e){return null!==e&&(e<32||127===e)}const Jw=ix(/\d/),$w=ix(/[\dA-Fa-f]/),Zw=ix(/[!-/:-@[-`{-~]/);function ex(e){return null!==e&&e<-2}function tx(e){return null!==e&&(e<0||32===e)}function nx(e){return-2===e||-1===e||32===e}const rx=ix(new RegExp("\\p{P}|\\p{S}","u")),ox=ix(/\s/);function ix(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function ax(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(37===i&&Gw(e.charCodeAt(n+1))&&Gw(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(a=String.fromCharCode(i,t),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function lx(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){return nx(r)?(e.enter(n),a(r)):t(r)};function a(r){return nx(r)&&i++<o?(e.consume(r),a):(e.exit(n),t(r))}}const sx={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"),lx(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)):ex(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const cx={tokenize:function(e){const t=this,n=[];let r,o,i,a=0;return l;function l(r){if(a<n.length){const o=n[a];return t.containerState=o[1],e.attempt(o[0].continuation,s,c)(r)}return c(r)}function s(e){if(a++,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(a);let l=n;for(;l<t.events.length;)t.events[l][1].end={...o},l++;return zw(t.events,i+1,0,t.events.slice(n)),t.events.length=l,c(e)}return l(e)}function c(o){if(a===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(ux,u,A)(o)}function u(e){return r&&v(),m(a),d(e)}function A(e){return t.parser.lazy[t.now().line]=a!==n.length,i=t.now().offset,p(e)}function d(n){return t.containerState={},e.attempt(ux,f,p)(n)}function f(e){return a++,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)):ex(n)?(e.consume(n),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,l):(e.consume(n),h)}function g(e,n){const l=t.sliceStream(e);if(n&&l.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(l),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,l,s=n;for(;s--;)if("exit"===t.events[s][0]&&"chunkFlow"===t.events[s][1].type){if(o){l=t.events[s][1].end;break}o=!0}for(m(a),e=n;e<t.events.length;)t.events[e][1].end={...l},e++;zw(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}}},ux={tokenize:function(e,t,n){return lx(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function Ax(e){return null===e||tx(e)||ox(e)?1:rx(e)?2:void 0}function dx(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 fx={name:"attention",resolveAll:function(e,t){let n,r,o,i,a,l,s,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;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[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const A={...e[n][1].end},d={...e[u][1].start};px(A,-l),px(d,l),i={type:l>1?"strongSequence":"emphasisSequence",start:A,end:{...e[n][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:d},o={type:l>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:l>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},e[n][1].end={...i.start},e[u][1].start={...a.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=_w(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=_w(s,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),s=_w(s,dx(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),s=_w(s,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,s=_w(s,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,zw(e,n-1,u-n+3,s),u=n+s.length-c-2;break}for(u=-1;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Ax(r);let i;return function(t){return i=t,e.enter("attentionSequence"),a(t)};function a(l){if(l===i)return e.consume(l),a;const s=e.exit("attentionSequence"),c=Ax(l),u=!c||2===c&&o||n.includes(l),A=!o||2===o&&c||n.includes(r);return s._open=!!(42===i?u:u&&(o||!A)),s._close=!!(42===i?A:A&&(c||!u)),t(l)}}};function px(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const hx={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 Yw(t)?(e.consume(t),i):64===t?n(t):s(t)}function i(e){return 43===e||45===e||46===e||Gw(e)?(r=1,a(e)):s(e)}function a(t){return 58===t?(e.consume(t),r=0,l):(43===t||45===t||46===t||Gw(t))&&r++<32?(e.consume(t),a):(r=0,s(t))}function l(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||Kw(r)?n(r):(e.consume(r),l)}function s(t){return 64===t?(e.consume(t),c):Xw(t)?(e.consume(t),s):n(t)}function c(e){return Gw(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):A(n)}function A(t){if((45===t||Gw(t))&&r++<63){const n=45===t?A:u;return e.consume(t),n}return n(t)}}};const gx={partial:!0,tokenize:function(e,t,n){return function(t){return nx(t)?lx(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||ex(e)?t(e):n(e)}}};const mx={continuation:{tokenize:function(e,t,n){const r=this;return function(t){return nx(t)?lx(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):o(t)};function o(r){return e.attempt(mx,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 nx(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const vx={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 Zw(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const yx={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),l};function l(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),o=31,i=Gw,c(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=$w,c):(e.enter("characterReferenceValue"),o=7,i=Jw,c(t))}function c(l){if(59===l&&a){const o=e.exit("characterReferenceValue");return i!==Gw||Fw(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(l),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(l)}return i(l)&&a++<o?(e.consume(l),c):n(l)}}};const bx={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)}}},wx={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return a;function a(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s}function s(t){return e.enter("codeFencedFence"),nx(t)?lx(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===i?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===i?(o++,e.consume(t),u):o>=l?(e.exit("codeFencedFenceSequence"),nx(t)?lx(e,A,"whitespace")(t):A(t)):n(t)}function A(r){return null===r||ex(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let i,a=0,l=0;return function(t){return function(t){const n=r.events[r.events.length-1];return a=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?(l++,e.consume(t),s):l<3?n(t):(e.exit("codeFencedFenceSequence"),nx(t)?lx(e,c,"whitespace")(t):c(t))}function c(n){return null===n||ex(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(bx,f,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||ex(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):nx(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),lx(e,A,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),u)}function A(t){return null===t||ex(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||ex(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(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 a>0&&nx(t)?lx(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||ex(t)?e.check(bx,f,v)(t):(e.enter("codeFlowValue"),m(t))}function m(t){return null===t||ex(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),m)}function v(n){return e.exit("codeFenced"),t(n)}}};const xx={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),lx(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?l(t):ex(t)?e.attempt(kx,i,l)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||ex(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),a)}function l(n){return e.exit("codeIndented"),t(n)}}},kx={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):ex(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):lx(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):ex(e)?o(e):n(e)}}};const Sx={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"),a(t)};function a(t){return 96===t?(e.consume(t),i++,a):(e.exit("codeTextSequence"),l(t))}function l(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),l):96===t?(o=e.enter("codeTextSequence"),r=0,c(t)):ex(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):(e.enter("codeTextData"),s(t))}function s(t){return null===t||32===t||96===t||ex(t)?(e.exit("codeTextData"),l(t)):(e.consume(t),s)}function c(n){return 96===n?(e.consume(n),r++,c):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",s(n))}}};class Ex{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&&Cx(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),Cx(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Cx(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);Cx(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Cx(this.left,t.reverse())}}}function Cx(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 Px(e){const t={};let n,r,o,i,a,l,s,c=-1;const u=new Ex(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(l=n[1]._tokenizer.events,o=0,o<l.length&&"lineEndingBlank"===l[o][1].type&&(o+=2),o<l.length&&"content"===l[o][1].type))for(;++o<l.length&&"content"!==l[o][1].type;)"chunkText"===l[o][1].type&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,Dx(u,c)),c=t[c],s=!0);else if(n[1]._container){for(o=c,r=void 0;o--;)if(i=u.get(o),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);else if("linePrefix"!==i[1].type)break;r&&(n[1].end={...u.get(r)[1].start},a=u.slice(r,c),a.unshift(n),u.splice(r,c-r+1,a))}}return zw(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!s}function Dx(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[],a=n._tokenizer||r.parser[n.contentType](n.start),l=a.events,s=[],c={};let u,A,d=-1,f=n,p=0,h=0;const g=[h];for(;f;){for(;e.get(++o)[1]!==f;);i.push(o),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),A&&a.defineSkip(f.start),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),A=f,f=f.next}for(f=n;++d<l.length;)"exit"===l[d][0]&&"enter"===l[d-1][0]&&l[d][1].type===l[d-1][1].type&&l[d][1].start.line!==l[d][1].end.line&&(h=d+1,g.push(h),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(a.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),d=g.length;d--;){const t=l.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;)c[p+s[d][0]]=p+s[d][1],p+=s[d][1]-s[d][0]-1;return c}const Bx={resolve:function(e){return Px(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):ex(t)?e.check(Tx,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}}},Tx={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"),lx(e,o,"linePrefix")};function o(o){if(null===o||ex(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 Ix(e,t,n,r,o,i,a,l,s){const c=s||Number.POSITIVE_INFINITY;let u=0;return function(t){return 60===t?(e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),A):null===t||32===t||41===t||Kw(t)?n(t):(e.enter(r),e.enter(a),e.enter(l),e.enter("chunkString",{contentType:"string"}),p(t))};function A(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(l),A(t)):null===t||60===t||ex(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 u||null!==o&&41!==o&&!tx(o)?u<c&&40===o?(e.consume(o),u++,p):41===o?(e.consume(o),u--,p):null===o||32===o||40===o||Kw(o)?n(o):(e.consume(o),92===o?h:p):(e.exit("chunkString"),e.exit(l),e.exit(a),e.exit(r),t(o))}function h(t){return 40===t||41===t||92===t?(e.consume(t),p):p(t)}}function Mx(e,t,n,r,o,i){const a=this;let l,s=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),c};function c(A){return s>999||null===A||91===A||93===A&&!l||94===A&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(A):93===A?(e.exit(i),e.enter(o),e.consume(A),e.exit(o),e.exit(r),t):ex(A)?(e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(A))}function u(t){return null===t||91===t||93===t||ex(t)||s++>999?(e.exit("chunkString"),c(t)):(e.consume(t),l||(l=!nx(t)),92===t?A:u)}function A(t){return 91===t||92===t||93===t?(e.consume(t),s++,u):u(t)}}function Lx(e,t,n,r,o,i){let a;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(o),e.consume(t),e.exit(o),a=40===t?41:t,l):n(t)};function l(n){return n===a?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),s(n))}function s(t){return t===a?(e.exit(i),l(a)):null===t?n(t):ex(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),lx(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||ex(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?u:c)}function u(t){return t===a||92===t?(e.consume(t),c):c(t)}}function Ox(e,t){let n;return function r(o){return ex(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):nx(o)?lx(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const Qx={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return Mx.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=Ww(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return tx(t)?Ox(e,l)(t):l(t)}function l(t){return Ix(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(Rx,c,c)(t)}function c(t){return nx(t)?lx(e,u,"whitespace")(t):u(t)}function u(i){return null===i||ex(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},Rx={partial:!0,tokenize:function(e,t,n){return function(t){return tx(t)?Ox(e,r)(t):n(t)};function r(t){return Lx(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return nx(t)?lx(e,i,"whitespace")(t):i(t)}function i(e){return null===e||ex(e)?t(e):n(e)}}};const Nx={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return ex(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const Fx={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"},zw(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||tx(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||ex(n)?(e.exit("atxHeading"),t(n)):nx(n)?lx(e,i,"whitespace")(n):(e.enter("atxHeadingText"),l(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),i(t))}function l(t){return null===t||35===t||tx(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),l)}}};const zx=["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"],_x=["pre","script","style","textarea"],jx={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,a,l,s;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(l){return 33===l?(e.consume(l),u):47===l?(e.consume(l),i=!0,f):63===l?(e.consume(l),o=3,r.interrupt?t:O):Yw(l)?(e.consume(l),a=String.fromCharCode(l),p):n(l)}function u(i){return 45===i?(e.consume(i),o=2,A):91===i?(e.consume(i),o=5,l=0,d):Yw(i)?(e.consume(i),o=4,r.interrupt?t:O):n(i)}function A(o){return 45===o?(e.consume(o),r.interrupt?t:O):n(o)}function d(o){const i="CDATA[";return o===i.charCodeAt(l++)?(e.consume(o),6===l?r.interrupt?t:C:d):n(o)}function f(t){return Yw(t)?(e.consume(t),a=String.fromCharCode(t),p):n(t)}function p(l){if(null===l||47===l||62===l||tx(l)){const s=47===l,c=a.toLowerCase();return s||i||!_x.includes(c)?zx.includes(a.toLowerCase())?(o=6,s?(e.consume(l),h):r.interrupt?t(l):C(l)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(l):i?g(l):m(l)):(o=1,r.interrupt?t(l):C(l))}return 45===l||Gw(l)?(e.consume(l),a+=String.fromCharCode(l),p):n(l)}function h(o){return 62===o?(e.consume(o),r.interrupt?t:C):n(o)}function g(t){return nx(t)?(e.consume(t),g):S(t)}function m(t){return 47===t?(e.consume(t),S):58===t||95===t||Yw(t)?(e.consume(t),v):nx(t)?(e.consume(t),m):S(t)}function v(t){return 45===t||46===t||58===t||95===t||Gw(t)?(e.consume(t),v):y(t)}function y(t){return 61===t?(e.consume(t),b):nx(t)?(e.consume(t),y):m(t)}function b(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),s=t,w):nx(t)?(e.consume(t),b):x(t)}function w(t){return t===s?(e.consume(t),s=null,k):null===t||ex(t)?n(t):(e.consume(t),w)}function x(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||tx(t)?y(t):(e.consume(t),x)}function k(e){return 47===e||62===e||nx(e)?m(e):n(e)}function S(t){return 62===t?(e.consume(t),E):n(t)}function E(t){return null===t||ex(t)?C(t):nx(t)?(e.consume(t),E):n(t)}function C(t){return 45===t&&2===o?(e.consume(t),T):60===t&&1===o?(e.consume(t),I):62===t&&4===o?(e.consume(t),Q):63===t&&3===o?(e.consume(t),O):93===t&&5===o?(e.consume(t),L):!ex(t)||6!==o&&7!==o?null===t||ex(t)?(e.exit("htmlFlowData"),P(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(Hx,R,P)(t))}function P(t){return e.check(Ux,D,R)(t)}function D(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),B}function B(t){return null===t||ex(t)?P(t):(e.enter("htmlFlowData"),C(t))}function T(t){return 45===t?(e.consume(t),O):C(t)}function I(t){return 47===t?(e.consume(t),a="",M):C(t)}function M(t){if(62===t){const n=a.toLowerCase();return _x.includes(n)?(e.consume(t),Q):C(t)}return Yw(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),M):C(t)}function L(t){return 93===t?(e.consume(t),O):C(t)}function O(t){return 62===t?(e.consume(t),Q):45===t&&2===o?(e.consume(t),O):C(t)}function Q(t){return null===t||ex(t)?(e.exit("htmlFlowData"),R(t)):(e.consume(t),Q)}function R(n){return e.exit("htmlFlow"),t(n)}}},Hx={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(gx,t,n)}}},Ux={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return ex(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 qx={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),l};function l(t){return 33===t?(e.consume(t),s):47===t?(e.consume(t),b):63===t?(e.consume(t),v):Yw(t)?(e.consume(t),k):n(t)}function s(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,f):Yw(t)?(e.consume(t),m):n(t)}function c(t){return 45===t?(e.consume(t),d):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),A):ex(t)?(a=u,M(t)):(e.consume(t),u)}function A(t){return 45===t?(e.consume(t),d):u(t)}function d(e){return 62===e?I(e):45===e?A(e):u(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):ex(t)?(a=p,M(t)):(e.consume(t),p)}function h(t){return 93===t?(e.consume(t),g):p(t)}function g(t){return 62===t?I(t):93===t?(e.consume(t),g):p(t)}function m(t){return null===t||62===t?I(t):ex(t)?(a=m,M(t)):(e.consume(t),m)}function v(t){return null===t?n(t):63===t?(e.consume(t),y):ex(t)?(a=v,M(t)):(e.consume(t),v)}function y(e){return 62===e?I(e):v(e)}function b(t){return Yw(t)?(e.consume(t),w):n(t)}function w(t){return 45===t||Gw(t)?(e.consume(t),w):x(t)}function x(t){return ex(t)?(a=x,M(t)):nx(t)?(e.consume(t),x):I(t)}function k(t){return 45===t||Gw(t)?(e.consume(t),k):47===t||62===t||tx(t)?S(t):n(t)}function S(t){return 47===t?(e.consume(t),I):58===t||95===t||Yw(t)?(e.consume(t),E):ex(t)?(a=S,M(t)):nx(t)?(e.consume(t),S):I(t)}function E(t){return 45===t||46===t||58===t||95===t||Gw(t)?(e.consume(t),E):C(t)}function C(t){return 61===t?(e.consume(t),P):ex(t)?(a=C,M(t)):nx(t)?(e.consume(t),C):S(t)}function P(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,D):ex(t)?(a=P,M(t)):nx(t)?(e.consume(t),P):(e.consume(t),B)}function D(t){return t===o?(e.consume(t),o=void 0,T):null===t?n(t):ex(t)?(a=D,M(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||tx(t)?S(t):(e.consume(t),B)}function T(e){return 47===e||62===e||tx(e)?S(e):n(e)}function I(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function M(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),L}function L(t){return nx(t)?lx(e,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):O(t)}function O(t){return e.enter("htmlTextData"),a(t)}}};const Vx={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&&zw(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,o,i,a=e.length,l=0;for(;a--;)if(n=e[a][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[a][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[a][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=a,"labelLink"!==n.type)){l=2;break}}else"labelEnd"===n.type&&(o=a);const s={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[r+l+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",s,t],["enter",c,t]],i=_w(i,e.slice(r+1,r+l+3)),i=_w(i,[["enter",u,t]]),i=_w(i,dx(t.parser.constructs.insideSpan.null,e.slice(r+l+4,o-3),t)),i=_w(i,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),i=_w(i,e.slice(o+1)),i=_w(i,[["exit",s,t]]),zw(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,a=r.events.length;for(;a--;)if(("labelImage"===r.events[a][1].type||"labelLink"===r.events[a][1].type)&&!r.events[a][1]._balanced){o=r.events[a][1];break}return function(t){return o?o._inactive?u(t):(i=r.parser.defined.includes(Ww(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),l):n(t)};function l(t){return 40===t?e.attempt(Wx,c,i?c:u)(t):91===t?e.attempt(Yx,c,i?s:u)(t):i?c(t):u(t)}function s(t){return e.attempt(Gx,c,u)(t)}function c(e){return t(e)}function u(e){return o._balanced=!0,n(e)}}},Wx={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 tx(t)?Ox(e,o)(t):o(t)}function o(t){return 41===t?c(t):Ix(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return tx(t)?Ox(e,l)(t):c(t)}function a(e){return n(e)}function l(t){return 34===t||39===t||40===t?Lx(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function s(t){return tx(t)?Ox(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},Yx={tokenize:function(e,t,n){const r=this;return function(t){return Mx.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(Ww(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},Gx={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 Xx={name:"labelStartImage",resolveAll:Vx.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 Kx={name:"labelStartLink",resolveAll:Vx.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 Jx={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),lx(e,t,"linePrefix")}}};const $x={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"),a(i)):o>=3&&(null===i||ex(i))?(e.exit("thematicBreak"),t(i)):n(i)}function a(t){return t===r?(e.consume(t),o++,a):(e.exit("thematicBreakSequence"),nx(t)?lx(e,i,"whitespace")(t):i(t))}}};const Zx={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(gx,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,lx(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!nx(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(tk,t,o)(n))});function o(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,lx(e,e.attempt(Zx,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,a=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:Jw(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($x,n,s)(t):s(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(t)}return n(t)};function l(t){return Jw(t)&&++a<10?(e.consume(t),l):(!r.interrupt||a<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(gx,r.interrupt?n:c,e.attempt(ek,A,u))}function c(e){return r.containerState.initialBlankLine=!0,i++,A(e)}function u(t){return nx(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),A):n(t)}function A(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},ek={partial:!0,tokenize:function(e,t,n){const r=this;return lx(e,function(e){const o=r.events[r.events.length-1];return!nx(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},tk={partial:!0,tokenize:function(e,t,n){const r=this;return lx(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 nk={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 a={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",a,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=a,e.push(["exit",a,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let a,l=r.events.length;for(;l--;)if("lineEnding"!==r.events[l][1].type&&"linePrefix"!==r.events[l][1].type&&"content"!==r.events[l][1].type){a="paragraph"===r.events[l][1].type;break}return r.parser.lazy[r.now().line]||!r.interrupt&&!a?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"),nx(t)?lx(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||ex(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const rk={tokenize:function(e){const t=this,n=e.attempt(gx,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,lx(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Bx,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 ok={resolveAll:sk()},ik=lk("string"),ak=lk("text");function lk(e){return{resolveAll:sk("text"===e?ck:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,a);return i;function i(e){return s(e)?o(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),l;t.consume(e)}function l(e){return s(e)?(t.exit("data"),o(e)):(t.consume(e),l)}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 sk(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 ck(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,a=o.length,l=-1,s=0;for(;a--;){const e=o[a];if("string"==typeof e){for(l=e.length;32===e.charCodeAt(l-1);)s++,l--;if(l)break;l=-1}else if(-2===e)i=!0,s++;else if(-1!==e){a++;break}}if(s){const o={type:n===e.length||i||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,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 uk={42:Zx,43:Zx,45:Zx,48:Zx,49:Zx,50:Zx,51:Zx,52:Zx,53:Zx,54:Zx,55:Zx,56:Zx,57:Zx,62:mx},Ak={91:Qx},dk={[-2]:xx,[-1]:xx,32:xx},fk={35:Fx,42:$x,45:[nk,$x],60:jx,61:nk,95:$x,96:wx,126:wx},pk={38:yx,92:vx},hk={[-5]:Jx,[-4]:Jx,[-3]:Jx,33:Xx,38:yx,42:fx,60:[hx,qx],91:Kx,92:[Nx,vx],93:Vx,95:fx,96:Sx},gk={null:[fx,ok]},mk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:Ak,disable:{null:[]},document:uk,flow:fk,flowInitial:dk,insideSpan:gk,string:pk,text:hk},Symbol.toStringTag,{value:"Module"}));function vk(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 a=[],l=[];const s={attempt:h(function(e,t){g(e,t.from)}),check:h(p),consume:function(e){ex(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===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=d(),c.events.push(["enter",n,c]),l.push(n),n},exit:function(e){const t=l.pop();return t.end=d(),c.events.push(["exit",t,c]),t},interrupt:h(p,{interrupt:!0})},c={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 a;if("string"==typeof i)a=i;else switch(i){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&o)continue;a=" ";break;default:a=String.fromCharCode(i)}o=-2===i,r.push(a)}return r.join("")}(A(e),t)},sliceStream:A,write:function(e){return a=_w(a,e),function(){let e;for(;r._index<a.length;){const t=a[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!==a[a.length-1]?[]:(g(t,0),c.events=dx(i,c.events,c),c.events)}};let u=t.tokenize.call(c,s);return t.resolveAll&&i.push(t),c;function A(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}(a,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){u=u(e)}function p(e,t){t.restore()}function h(e,t){return function(n,o,i){let a,u,A,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 a=e,u=0,0===e.length?i:h(e[u])}function h(e){return function(n){return f=function(){const e=d(),t=c.previous,n=c.currentConstruct,o=c.events.length,i=Array.from(l);return{from:o,restore:a};function a(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=o,l=i,m()}}(),A=e,e.partial||(c.currentConstruct=e),e.name&&c.parser.constructs.disable.null.includes(e.name)?v():e.tokenize.call(t?Object.assign(Object.create(c),t):c,s,g,v)(n)}}function g(t){return e(A,f),o}function v(e){return f.restore(),++u<a.length?h(a[u]):i}}}function g(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&zw(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function m(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const yk=/[\0\t\n\r]/g;const bk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function wk(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return Vw(n.slice(t?2:1),t?16:10)}return Fw(n)||e}const xk={}.hasOwnProperty;function kk(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:E,autolinkEmail:E,atxHeading:i(J),blockQuote:i(W),characterEscape:E,characterReference:E,codeFenced:i(Y),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(Y,a),codeText:i(G,a),codeTextData:E,data:E,codeFlowValue:E,definition:i(X),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(K),hardBreakEscape:i($),hardBreakTrailing:i($),htmlFlow:i(Z,a),htmlFlowData:E,htmlText:i(Z,a),htmlTextData:E,image:i(ee),label:a,link:i(te),listItem:i(re),listItemValue:d,listOrdered:i(ne,A),listUnordered:i(ne),paragraph:i(oe),reference:z,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(J),strong:i(ie),thematicBreak:i(le)},exit:{atxHeading:s(),atxHeadingSequence:w,autolink:s(),autolinkEmail:V,autolinkProtocol:q,blockQuote:s(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:j,characterReferenceMarkerNumeric:j,characterReferenceValue:H,characterReference:U,codeFenced:s(g),codeFencedFence:h,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:C,codeIndented:s(m),codeText:s(I),codeTextData:C,data:C,definition:s(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:s(),hardBreakEscape:s(D),hardBreakTrailing:s(D),htmlFlow:s(B),htmlFlowData:C,htmlText:s(T),htmlTextData:C,image:s(L),label:Q,labelText:O,lineEnding:P,link:s(M),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:_,resourceDestinationString:R,resourceTitleString:N,resource:F,setextHeading:s(S),setextHeadingLineSequence:k,setextHeadingText:x,strong:s(),thematicBreak:s()}};Ek(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const i={stack:[r],tokenStack:[],config:t,enter:l,exit:c,buffer:a,resume:u,data:n},s=[];let A=-1;for(;++A<e.length;)if("listOrdered"===e[A][1].type||"listUnordered"===e[A][1].type)if("enter"===e[A][0])s.push(A);else{A=o(e,s.pop(),A)}for(A=-1;++A<e.length;){const n=t[e[A][0]];xk.call(n,e[A][1].type)&&n[e[A][1].type].call(Object.assign({sliceSerialize:e[A][2].sliceSerialize},i),e[A][1])}if(i.tokenStack.length>0){const e=i.tokenStack[i.tokenStack.length-1];(e[1]||Pk).call(i,void 0,e[0])}for(r.position={start:Sk(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Sk(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},A=-1;++A<t.transforms.length;)r=t.transforms[A](r)||r;return r}function o(e,t,n){let r,o,i,a,l=t-1,s=-1,c=!1;for(;++l<=n;){const t=e[l];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(r&&!a&&!s&&!i&&(i=l),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=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 a=l;for(o=void 0;a--;){const t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",o=a}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||l,0,["exit",r,t[2]]),l++,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(l,0,["enter",o,t[2]]),l++,n++,i=void 0,a=!0}}}return e[t][1]._spread=c,n}function i(e,t){return n;function n(n){l.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function l(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:Sk(t.start),end:void 0}}function s(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+uw({start:e.start,end:e.end})+"): it’s not open");r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Pk).call(this,e,r[0])),n.position.end=Sk(e.end)}function u(){return function(e){return Qw(e,"boolean"!=typeof Ow.includeImageAlt||Ow.includeImageAlt,"boolean"!=typeof Ow.includeHtml||Ow.includeHtml)}(this.stack.pop())}function A(){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=Ww(this.sliceSerialize(e)).toLowerCase()}function y(){const e=this.resume();this.stack[this.stack.length-1].title=e}function b(){const e=this.resume();this.stack[this.stack.length-1].url=e}function w(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function x(){this.data.setextHeadingSlurpLineEnding=!0}function k(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function S(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];(!n||"text"!==n.type)&&(n=ae(),n.position={start:Sk(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=Sk(e.end)}function P(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=Sk(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.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 T(){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 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 L(){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(bk,wk)}(t),n.identifier=Ww(t).toLowerCase()}function Q(){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 R(){const e=this.resume();this.stack[this.stack.length-1].url=e}function N(){const e=this.resume();this.stack[this.stack.length-1].title=e}function F(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function _(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Ww(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function j(e){this.data.characterReferenceType=e.type}function H(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;n?(r=Vw(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0):r=Fw(t);this.stack[this.stack.length-1].value+=r}function U(e){this.stack.pop().position.end=Sk(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 W(){return{type:"blockquote",children:[]}}function Y(){return{type:"code",lang:null,meta:null,value:""}}function G(){return{type:"inlineCode",value:""}}function X(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function K(){return{type:"emphasis",children:[]}}function J(){return{type:"heading",depth:0,children:[]}}function $(){return{type:"break"}}function Z(){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 ae(){return{type:"text",value:""}}function le(){return{type:"thematicBreak"}}}(n)(function(e){for(;!Px(e););return e}(function(e){const t={constructs:Hw([mk,...(e||{}).extensions||[]]),content:n(sx),defined:[],document:n(cx),flow:n(rk),lazy:{},string:n(ik),text:n(ak)};return t;function n(e){return function(n){return vk(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,a){const l=[];let s,c,u,A,d;for(o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),u=0,n="",r&&(65279===o.charCodeAt(0)&&u++,r=void 0);u<o.length;){if(yk.lastIndex=u,s=yk.exec(o),A=s&&void 0!==s.index?s.index:o.length,d=o.charCodeAt(A),!s){n=o.slice(u);break}if(10===d&&u===A&&e)l.push(-3),e=void 0;else switch(e&&(l.push(-5),e=void 0),u<A&&(l.push(o.slice(u,A)),t+=A-u),d){case 0:l.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),l.push(-2);t++<c;)l.push(-1);break;case 10:l.push(-4),t=1;break;default:e=!0,t=1}u=A+1}return a&&(e&&l.push(-5),n&&l.push(n),l.push(null)),l}}()(e,t,!0))))}function Sk(e){return{line:e.line,column:e.column,offset:e.offset}}function Ek(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Ek(e,r):Ck(e,r)}}function Ck(e,t){let n;for(n in t)if(xk.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 Pk(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+uw({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+uw({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+uw({start:t.start,end:t.end})+") is still open")}function Dk(e){const t=this;t.parser=function(n){return kk(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Bk(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 a=o[o.length-1];return a&&"text"===a.type?a.value+=r:o.push({type:"text",value:r}),o}function Tk(e){return e.spread??e.children.length>1}function Ik(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(Mk(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(Mk(t.slice(o),o>0,!1)),i.join("")}function Mk(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 Lk={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=ax(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,l=e.footnoteCounts.get(r);void 0===l?(l=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,l+=1,e.footnoteCounts.set(r,l);const s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,s);const c={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,c),e.applyData(t,c)},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 Bk(e,t);const o={src:ax(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:ax(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 Bk(e,t);const o={href:ax(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:ax(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=Tk(n[r])}return t}(n):Tk(t),i={},a=[];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 l=-1;for(;++l<r.length;){const e=r[l];(o||0!==l||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?a.push(e):a.push(...e.children)}const s=r[r.length-1];s&&(o||"element"!==s.type||"p"!==s.tagName)&&a.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,c),e.applyData(t,c)},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=sw(t.children[1]),a=lw(t.children[t.children.length-1]);i&&a&&(r.position={start:i,end:a}),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,a=i?i.length:t.children.length;let l=-1;const s=[];for(;++l<a;){const n=t.children[l],r={},a=i?i[l]:void 0;a&&(r.align=a);let c={type:"element",tagName:o,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),s.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:Ik(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:Ok,yaml:Ok,definition:Ok,footnoteDefinition:Ok};function Ok(){}const Qk="object"==typeof self?self:globalThis,Rk=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case 0:case-1:return n(a,o);case 1:{const e=n([],o);for(const t of a)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of a)e[r(t)]=r(n);return e}case 3:return n(new Date(a),o);case 4:{const{source:e,flags:t}=a;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of a)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of a)e.add(r(t));return e}case 7:{const{name:e,message:t}=a;return n(new Qk[e](t),o)}case 8:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:e}=new Uint8Array(a);return n(new DataView(e),a)}}return n(new Qk[i](a),o)};return r})(new Map,e)(0),Nk="",{toString:Fk}={},{keys:zk}=Object,_k=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=Fk.call(e).slice(8,-1);switch(n){case"Array":return[1,Nk];case"Object":return[2,Nk];case"Date":return[3,Nk];case"RegExp":return[4,Nk];case"Map":return[5,Nk];case"Set":return[6,Nk];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},jk=([e,t])=>0===e&&("function"===t||"symbol"===t),Hk=(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[a,l]=_k(r);switch(a){case 0:{let t=r;switch(l){case"bigint":a=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);t=null;break;case"undefined":return o([-1],r)}return o([a,t],r)}case 1:{if(l){let e=r;return"DataView"===l?e=new Uint8Array(r.buffer):"ArrayBuffer"===l&&(e=new Uint8Array(r)),o([l,[...e]],r)}const e=[],t=o([a,e],r);for(const t of r)e.push(i(t));return t}case 2:{if(l)switch(l){case"BigInt":return o([l,r.toString()],r);case"Boolean":case"Number":case"String":return o([l,r.valueOf()],r)}if(t&&"toJSON"in r)return i(r.toJSON());const n=[],s=o([a,n],r);for(const t of zk(r))(e||!jk(_k(r[t])))&&n.push([i(t),i(r[t])]);return s}case 3:return o([a,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([a,{source:e,flags:t}],r)}case 5:{const t=[],n=o([a,t],r);for(const[n,o]of r)(e||!jk(_k(n))&&!jk(_k(o)))&&t.push([i(n),i(o)]);return n}case 6:{const t=[],n=o([a,t],r);for(const n of r)(e||!jk(_k(n)))&&t.push(i(n));return n}}const{message:s}=r;return o([a,{name:l,message:s}],r)};return i})(!(t||n),!!t,new Map,r)(e),r},Uk="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?Rk(Hk(e,t)):structuredClone(e):(e,t)=>Rk(Hk(e,t));function qk(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 Vk(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const Wk=function(e){if(null==e)return Gk;if("function"==typeof e)return Yk(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Wk(e[n]);return Yk(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 Yk(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 Yk(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function Yk(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 Gk(){return!0}const Xk=[],Kk=!0,Jk=!1;function $k(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=Wk(o),a=r?-1:1;!function e(o,l,s){const c=o&&"object"==typeof o?o:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,A,d=Xk;if((!t||i(o,l,s[s.length-1]||void 0))&&(d=function(e){return Array.isArray(e)?e:"number"==typeof e?[Kk,e]:null==e?Xk:[e]}(n(o,s)),d[0]===Jk))return d;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==d[0])for(u=(r?t.children.length:-1)+a,A=s.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,A)(),c[0]===Jk)return c;u="number"==typeof c[1]?c[1]:u+a}}return d}}(e,void 0,[])()}function Zk(e,t,n,r){let o,i,a;"function"==typeof t?(i=void 0,a=t,o=n):(i=t,a=n,o=r),$k(e,i,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return a(e,r,n)},o)}const eS={}.hasOwnProperty,tS={};function nS(e,t){const n=t||tS,r=new Map,o=new Map,i=new Map,a={...Lk,...n.handlers},l={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=l.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(!Array.isArray(o)&&"text"===o.type&&(o.value=lS(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=lS(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:oS,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:function(e,t){const n=e.type,r=l.handlers[n];if(eS.call(l.handlers,n)&&r)return r(l,e,t);if(l.options.passThrough&&l.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=Uk(n);return r.children=l.all(e),r}return Uk(e)}return(l.options.unknownHandler||iS)(l,e,t)},options:n,patch:rS,wrap:aS};return Zk(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)}}),l}function rS(e,t){e.position&&(t.position=function(e){const t=sw(e),n=lw(e);if(t&&n)return{start:t,end:n}}(e))}function oS(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,Uk(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function iS(e,t){const n=t.data||{},r=!("value"in t)||eS.call(n,"hProperties")||eS.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 aS(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 lS(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function sS(e,t){const n=nS(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||qk,r=e.options.footnoteBackLabel||Vk,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let s=-1;for(;++s<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[s]);if(!o)continue;const i=e.all(o),a=String(o.identifier).toUpperCase(),c=ax(a.toLowerCase());let u=0;const A=[],d=e.footnoteCounts.get(a);for(;void 0!==d&&++u<=d;){A.length>0&&A.push({type:"text",value:" "});let e="string"==typeof n?n:n(s,u);"string"==typeof e&&(e={type:"text",value:e}),A.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(s,u),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(...A)}else i.push(...A);const p={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(i,!0)};e.patch(o,p),l.push(p)}if(0!==l.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Uk(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!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 cS(e,t){return e&&"run"in e?async function(n,r){const o=sS(n,{file:r,...t});await e.run(o,r)}:function(n,r){return sS(n,{file:r,...e||t})}}function uS(e){if(e)throw e}var AS,dS;var fS=function(){if(dS)return AS;dS=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)},a=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},l=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return AS=function e(){var t,n,r,s,c,u,A=arguments[0],d=1,f=arguments.length,p=!1;for("boolean"==typeof A&&(p=A,A=arguments[1]||{},d=2),(null==A||"object"!=typeof A&&"function"!=typeof A)&&(A={});d<f;++d)if(null!=(t=arguments[d]))for(n in t)r=l(A,n),A!==(s=l(t,n))&&(p&&s&&(i(s)||(c=o(s)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(A,{name:n,newValue:e(p,u,s)})):typeof s<"u"&&a(A,{name:n,newValue:s}));return A},AS}();const pS=Zb(fS);function hS(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 gS(){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,...a){const l=e[++n];let s=-1;if(i)r(i);else{for(;++s<t.length;)(null===a[s]||void 0===a[s])&&(a[s]=t[s]);t=a,l?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let a;r&&t.push(o);try{a=e.apply(this,t)}catch(e){if(r&&n)throw e;return o(e)}r||(a&&a.then&&"function"==typeof a.then?a.then(i,o):a instanceof Error?o(a):i(a))}function o(e,...r){n||(n=!0,t(e,...r))}function i(e){o(null,e)}}(l,o)(...a):r(null,...a)}}(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 mS={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');vS(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 a=-1,l=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else a<0&&(n=!0,a=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(o=i):(l=-1,o=a));return r===o?o=a:o<0&&(o=e.length),e.slice(r,o)},dirname:function(e){if(vS(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){vS(e);let t,n=e.length,r=-1,o=0,i=-1,a=0;for(;n--;){const l=e.codePointAt(n);if(47!==l)r<0&&(t=!0,r=n+1),46===l?i<0?i=n:1!==a&&(a=1):i>-1&&(a=-1);else if(t){o=n+1;break}}return i<0||r<0||0===a||1===a&&i===r-1&&i===o+1?"":e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)vS(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){vS(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,a=-1,l=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(a!==s-1&&1!==l)if(a!==s-1&&2===l){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("/")),a=s,l=0;continue}}else if(o.length>0){o="",i=0,a=s,l=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(a+1,s):o=e.slice(a+1,s),i=s-a-1;a=s,l=0}else 46===n&&l>-1?l++:l=-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 vS(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const yS={cwd:function(){return"/"}};function bS(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function wS(e){if("string"==typeof e)e=new URL(e);else if(!bS(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 xS=["history","path","basename","stem","extname","dirname"];class kS{constructor(e){let t;var n;t=e?bS(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?"":yS.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r,o=-1;for(;++o<xS.length;){const e=xS[o];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(r in t)xS.includes(r)||(this[r]=t[r])}get basename(){return"string"==typeof this.path?mS.basename(this.path):void 0}set basename(e){ES(e,"basename"),SS(e,"basename"),this.path=mS.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?mS.dirname(this.path):void 0}set dirname(e){CS(this.basename,"dirname"),this.path=mS.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?mS.extname(this.path):void 0}set extname(e){if(SS(e,"extname"),CS(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=mS.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){bS(e)&&(e=wS(e)),ES(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?mS.basename(this.path,this.extname):void 0}set stem(e){ES(e,"stem"),SS(e,"stem"),this.path=mS.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 pw(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 SS(e,t){if(e&&e.includes(mS.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+mS.sep+"`")}function ES(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function CS(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const PS=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},DS={}.hasOwnProperty;class BS extends PS{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=gS()}copy(){const e=new BS;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(pS(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(LS("data",this.frozen),this.namespace[e]=t,this):DS.call(this.namespace,e)&&this.namespace[e]||void 0:e?(LS("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=RS(e),n=this.parser||this.Parser;return IS("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),IS("process",this.parser||this.Parser),MS("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=RS(e),a=n.parse(i);function l(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(a,i,function(e,t,r){if(e||!t||!r)return l(e);const o=t,i=n.stringify(o,r);var a;"string"==typeof(a=i)||function(e){return!!(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(a)?r.value=i:r.result=i,l(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),IS("processSync",this.parser||this.Parser),MS("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,uS(e),t=r}),QS("processSync","process",n),t}run(e,t,n){OS(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 a=RS(t);r.run(e,a,function(t,r,a){const l=r||e;t?i(t):o?o(l):n(void 0,l,a)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){uS(e),n=t,r=!0}),QS("runSync","run",r),n}stringify(e,t){this.freeze();const n=RS(t),r=this.compiler||this.Compiler;return MS("stringify",r),OS(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(LS("use",this.frozen),null!=e)if("function"==typeof e)l(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?a(e):i(e)}return this;function o(e){if("function"==typeof e)l(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;l(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");a(e.plugins),e.settings&&(r.settings=pS(!0,r.settings,e.settings))}function a(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 l(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 a=n[o][1];hS(a)&&hS(r)&&(r=pS(!0,a,r)),n[o]=[e,r,...i]}}}}const TS=(new BS).freeze();function IS(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function MS(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function LS(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 OS(e){if(!hS(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function QS(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function RS(e){return function(e){return!!(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new kS(e)}const NS=[],FS={allowDangerousHtml:!0},zS=/^(https?|ircs?|mailto|xmpp)$/i,_S=[{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 jS(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,a=e.disallowedElements,l=e.rehypePlugins||NS,s=e.remarkPlugins||NS,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...FS}:FS,u=e.skipHtml,A=e.unwrapDisallowed,d=e.urlTransform||HS,f=TS().use(Dk).use(s).use(cS,c).use(l),p=new kS;"string"==typeof r&&(p.value=r);for(const t of _S)Object.hasOwn(e,t.from)&&(t.from,t.to&&t.to,t.id);const h=f.parse(p);let g=f.runSync(h,p);return o&&(g={type:"element",tagName:"div",properties:{className:o},children:"root"===g.type?g.children:[g]}),Zk(g,function(e,r,o){if("raw"===e.type&&o&&"number"==typeof r)return u?o.children.splice(r,1):o.children[r]={type:"text",value:e.value},r;if("element"===e.type){let t;for(t in Lw)if(Object.hasOwn(Lw,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=Lw[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):!!a&&a.includes(e.tagName);if(!i&&n&&"number"==typeof r&&(i=!n(e,r,o)),i&&o&&"number"==typeof r)return A&&e.children?o.children.splice(r,1,...e.children):o.children.splice(r,1),r}}),xw(g,{Fragment:lA.Fragment,components:i,ignoreInvalidStyle:!0,jsx:lA.jsx,jsxs:lA.jsxs,passKeys:!0,passNode:!0})}function HS(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||zS.test(e.slice(0,t))?e:""}const US=({children:e})=>lA.jsx("div",{style:{whiteSpace:"normal"},children:lA.jsx(jS,{components:{p:({...e})=>lA.jsx("p",{style:{margin:0,marginBottom:"0.5em",lineHeight:1.4,textAlign:"left"},children:e.children}),ul:({...e})=>lA.jsx("ul",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:e.children}),ol:({...e})=>lA.jsx("ol",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:e.children}),li:({...e})=>lA.jsx("li",{style:{marginBottom:"1px",lineHeight:1.4},children:e.children}),code:({inline:e,children:t})=>e?lA.jsx("code",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"2px 4px",borderRadius:"4px",fontFamily:"inherit",fontSize:"0.95em"},children:t}):lA.jsx("pre",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"8px",borderRadius:"4px",overflowX:"auto",margin:"0.5em 0",whiteSpace:"pre-wrap"},children:lA.jsx("code",{children:t})}),blockquote:({...e})=>lA.jsx("blockquote",{style:{margin:0,paddingLeft:"10px",borderLeft:"2px solid #ccc",color:"#666",fontStyle:"italic"},children:e.children})},children:"string"==typeof e?e:""})}),qS={autoConfig:!0},VS=e=>()=>(e=>{const{getFlow:t}=By(),{messages:n,replaceMessages:r}=Ty(),{settings:o}=My(),{hasChatHistoryLoaded:i}=Oy(),a={...e,...qS},l=a.markdownComponent?a.markdownComponent:US;_.useEffect(()=>{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=l)}r(i)}},[i]);const s=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=l,e.data.message.tags||(e.data.message.tags=[]),e.data.message.tags.push("rcb-markdown-renderer-plugin:parsed"))};Iy(Pm.PRE_INJECT_MESSAGE,s),Iy(Pm.CHUNK_STREAM_MESSAGE,s),Iy(Pm.START_STREAM_MESSAGE,s),Iy(Pm.START_SIMULATE_STREAM_MESSAGE,s);const c={name:"@rcb-plugins/markdown-renderer"};return null!=a&&a.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0}}),c})(e),WS={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"}},YS=(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},GS=e=>{const{showToast:t}=(()=>{const{showToast:e,dismissToast:t,toasts:n,replaceToasts:r}=_v();return{showToast:e,dismissToast:t,toasts:n,replaceToasts:r}})(),{getFlow:n}=By(),{styles:r,updateStyles:o,replaceStyles:i}=(()=>{const{styles:e,replaceStyles:t,updateStyles:n}=yy();return{styles:e,replaceStyles:t,updateStyles:n}})(),a=(e=>({...WS,...e,promptBaseColors:{...WS.promptBaseColors},promptHoveredColors:{...WS.promptHoveredColors},textAreaHighlightColors:{...WS.textAreaHighlightColors}}))(e),[l,s]=_.useState(0),c=_.useRef({});Iy(Pm.USER_SUBMIT_TEXT,e=>{const i=e,u=YS(i,n(),"validateTextInput");if(!u)return;const A=u(i.data.inputText);if(null!=A&&A.success||e.preventDefault(),!A.promptContent)return;0===l&&(c.current=structuredClone(r));const d=((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(d),t(A.promptContent,A.promptDuration??3e3),s(e=>e+1)}),Iy(Pm.USER_UPLOAD_FILE,e=>{var r,o;const i=e,a=null==(o=null==(r=i.data)?void 0:r.files)?void 0:o[0];if(!a)return console.error("No file uploaded."),void e.preventDefault();const l=YS(i,n(),"validateFileInput");if(!l)return void console.error("Validator not found for file input.");const s=l(a);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)}),Iy(Pm.DISMISS_TOAST,()=>{s(e=>e-1)}),_.useEffect(()=>{0===l&&setTimeout(()=>{i(c.current)})},[l,i]);const u={name:"@rcb-plugins/input-validator"};return a.autoConfig&&(u.settings={event:{rcbUserSubmitText:!0,rcbUserUploadFile:!0,rcbDismissToast:!0}}),u},XS=e=>()=>GS(e);function KS(){}function JS(){}const $S=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ZS=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eE={};function tE(e,t){return(eE.jsx?ZS:$S).test(e)}const nE=/[ \t\n\f\r]/g;function rE(e){return""===e.replace(nE,"")}class oE{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function iE(e,t){const n={},r={};for(const t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new oE(n,r,t)}function aE(e){return e.toLowerCase()}oE.prototype.normal={},oE.prototype.property={},oE.prototype.space=void 0;class lE{constructor(e,t){this.attribute=t,this.property=e}}lE.prototype.attribute="",lE.prototype.booleanish=!1,lE.prototype.boolean=!1,lE.prototype.commaOrSpaceSeparated=!1,lE.prototype.commaSeparated=!1,lE.prototype.defined=!1,lE.prototype.mustUseProperty=!1,lE.prototype.number=!1,lE.prototype.overloadedBoolean=!1,lE.prototype.property="",lE.prototype.spaceSeparated=!1,lE.prototype.space=void 0;let sE=0;const cE=gE(),uE=gE(),AE=gE(),dE=gE(),fE=gE(),pE=gE(),hE=gE();function gE(){return 2**++sE}var mE=Object.freeze({__proto__:null,boolean:cE,booleanish:uE,commaOrSpaceSeparated:hE,commaSeparated:pE,number:dE,overloadedBoolean:AE,spaceSeparated:fE});const vE=Object.keys(mE);class yE extends lE{constructor(e,t,n,r){let o=-1;if(super(e,t),bE(this,"space",r),"number"==typeof n)for(;++o<vE.length;){const e=vE[o];bE(this,vE[o],(n&mE[e])===mE[e])}}}function bE(e,t,n){n&&(e[t]=n)}function wE(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new yE(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[aE(r)]=r,n[aE(i.attribute)]=r}return new oE(t,n,e.space)}yE.prototype.defined=!0;const xE=wE({properties:{ariaActiveDescendant:null,ariaAtomic:uE,ariaAutoComplete:null,ariaBusy:uE,ariaChecked:uE,ariaColCount:dE,ariaColIndex:dE,ariaColSpan:dE,ariaControls:fE,ariaCurrent:null,ariaDescribedBy:fE,ariaDetails:null,ariaDisabled:uE,ariaDropEffect:fE,ariaErrorMessage:null,ariaExpanded:uE,ariaFlowTo:fE,ariaGrabbed:uE,ariaHasPopup:null,ariaHidden:uE,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:fE,ariaLevel:dE,ariaLive:null,ariaModal:uE,ariaMultiLine:uE,ariaMultiSelectable:uE,ariaOrientation:null,ariaOwns:fE,ariaPlaceholder:null,ariaPosInSet:dE,ariaPressed:uE,ariaReadOnly:uE,ariaRelevant:null,ariaRequired:uE,ariaRoleDescription:fE,ariaRowCount:dE,ariaRowIndex:dE,ariaRowSpan:dE,ariaSelected:uE,ariaSetSize:dE,ariaSort:null,ariaValueMax:dE,ariaValueMin:dE,ariaValueNow:dE,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function kE(e,t){return t in e?e[t]:t}function SE(e,t){return kE(e,t.toLowerCase())}const EE=wE({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:pE,acceptCharset:fE,accessKey:fE,action:null,allow:null,allowFullScreen:cE,allowPaymentRequest:cE,allowUserMedia:cE,alt:null,as:null,async:cE,autoCapitalize:null,autoComplete:fE,autoFocus:cE,autoPlay:cE,blocking:fE,capture:null,charSet:null,checked:cE,cite:null,className:fE,cols:dE,colSpan:null,content:null,contentEditable:uE,controls:cE,controlsList:fE,coords:dE|pE,crossOrigin:null,data:null,dateTime:null,decoding:null,default:cE,defer:cE,dir:null,dirName:null,disabled:cE,download:AE,draggable:uE,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:cE,formTarget:null,headers:fE,height:dE,hidden:AE,high:dE,href:null,hrefLang:null,htmlFor:fE,httpEquiv:fE,id:null,imageSizes:null,imageSrcSet:null,inert:cE,inputMode:null,integrity:null,is:null,isMap:cE,itemId:null,itemProp:fE,itemRef:fE,itemScope:cE,itemType:fE,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:cE,low:dE,manifest:null,max:null,maxLength:dE,media:null,method:null,min:null,minLength:dE,multiple:cE,muted:cE,name:null,nonce:null,noModule:cE,noValidate:cE,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:cE,optimum:dE,pattern:null,ping:fE,placeholder:null,playsInline:cE,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:cE,referrerPolicy:null,rel:fE,required:cE,reversed:cE,rows:dE,rowSpan:dE,sandbox:fE,scope:null,scoped:cE,seamless:cE,selected:cE,shadowRootClonable:cE,shadowRootDelegatesFocus:cE,shadowRootMode:null,shape:null,size:dE,sizes:null,slot:null,span:dE,spellCheck:uE,src:null,srcDoc:null,srcLang:null,srcSet:null,start:dE,step:null,style:null,tabIndex:dE,target:null,title:null,translate:null,type:null,typeMustMatch:cE,useMap:null,value:uE,width:dE,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:fE,axis:null,background:null,bgColor:null,border:dE,borderColor:null,bottomMargin:dE,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:cE,declare:cE,event:null,face:null,frame:null,frameBorder:null,hSpace:dE,leftMargin:dE,link:null,longDesc:null,lowSrc:null,marginHeight:dE,marginWidth:dE,noResize:cE,noHref:cE,noShade:cE,noWrap:cE,object:null,profile:null,prompt:null,rev:null,rightMargin:dE,rules:null,scheme:null,scrolling:uE,standby:null,summary:null,text:null,topMargin:dE,valueType:null,version:null,vAlign:null,vLink:null,vSpace:dE,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:cE,disableRemotePlayback:cE,prefix:null,property:null,results:dE,security:null,unselectable:null},space:"html",transform:SE}),CE=wE({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:hE,accentHeight:dE,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:dE,amplitude:dE,arabicForm:null,ascent:dE,attributeName:null,attributeType:null,azimuth:dE,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:dE,by:null,calcMode:null,capHeight:dE,className:fE,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:dE,diffuseConstant:dE,direction:null,display:null,dur:null,divisor:dE,dominantBaseline:null,download:cE,dx:null,dy:null,edgeMode:null,editable:null,elevation:dE,enableBackground:null,end:null,event:null,exponent:dE,externalResourcesRequired:null,fill:null,fillOpacity:dE,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:pE,g2:pE,glyphName:pE,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:dE,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:dE,horizOriginX:dE,horizOriginY:dE,id:null,ideographic:dE,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:dE,k:dE,k1:dE,k2:dE,k3:dE,k4:dE,kernelMatrix:hE,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:dE,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:dE,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:dE,overlineThickness:dE,paintOrder:null,panose1:null,path:null,pathLength:dE,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:fE,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:dE,pointsAtY:dE,pointsAtZ:dE,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:hE,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:hE,rev:hE,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:hE,requiredFeatures:hE,requiredFonts:hE,requiredFormats:hE,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:dE,specularExponent:dE,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:dE,strikethroughThickness:dE,string:null,stroke:null,strokeDashArray:hE,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:dE,strokeOpacity:dE,strokeWidth:null,style:null,surfaceScale:dE,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:hE,tabIndex:dE,tableValues:null,target:null,targetX:dE,targetY:dE,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:hE,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:dE,underlineThickness:dE,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:dE,values:null,vAlphabetic:dE,vMathematical:dE,vectorEffect:null,vHanging:dE,vIdeographic:dE,version:null,vertAdvY:dE,vertOriginX:dE,vertOriginY:dE,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:dE,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:kE}),PE=wE({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()}),DE=wE({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:SE}),BE=wE({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),TE={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"},IE=/[A-Z]/g,ME=/-[a-z]/g,LE=/^data[-\w.:]+$/i;function OE(e){return"-"+e.toLowerCase()}function QE(e){return e.charAt(1).toUpperCase()}const RE=iE([xE,EE,PE,DE,BE],"html"),NE=iE([xE,CE,PE,DE,BE],"svg");var FE={},zE=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,_E=/\n/g,jE=/^\s*/,HE=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,UE=/^:\s*/,qE=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,VE=/^[;\s]*/,WE=/^\s+|\s+$/g,YE="";function GE(e){return e?e.replace(WE,YE):YE}var XE=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(FE,"__esModule",{value:!0}),FE.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,KE.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 KE=XE(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(_E);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 a(e),c(),t}}function a(e){this.start=e,this.end={line:n,column:r},this.source=t.source}function l(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 c(){s(jE)}function u(e){var t;for(e=e||[];t=A();)!1!==t&&e.push(t);return e}function A(){var t=i();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;YE!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,YE===e.charAt(n-1))return l("End of comment missing");var a=e.slice(2,n-2);return r+=2,o(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function d(){var e=i(),t=s(HE);if(t){if(A(),!s(UE))return l("property missing ':'");var n=s(qE),r=e({type:"declaration",property:GE(t[0].replace(zE,YE)),value:n?GE(n[0].replace(zE,YE)):YE});return s(VE),r}}return a.prototype.content=e,c(),function(){var e,t=[];for(u(t);e=d();)!1!==e&&(t.push(e),u(t));return t}()});var JE={};Object.defineProperty(JE,"__esModule",{value:!0}),JE.camelCase=void 0;var $E=/^--[a-zA-Z0-9_-]+$/,ZE=/-([a-z])/g,eC=/^[^-]+$/,tC=/^-(webkit|moz|ms|o|khtml)-/,nC=/^-(ms)-/,rC=function(e,t){return t.toUpperCase()},oC=function(e,t){return"".concat(t,"-")};JE.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||eC.test(e)||$E.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(nC,oC):e.replace(tC,oC)).replace(ZE,rC))};var iC=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(FE),aC=JE;function lC(e,t){var n={};return e&&"string"==typeof e?((0,iC.default)(e,function(e,r){e&&r&&(n[(0,aC.camelCase)(e,t)]=r)}),n):n}lC.default=lC;var sC=r(lC);const cC=AC("end"),uC=AC("start");function AC(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 dC(e){return e&&"object"==typeof e?"position"in e||"type"in e?pC(e.position):"start"in e||"end"in e?pC(e):"line"in e||"column"in e?fC(e):"":""}function fC(e){return hC(e&&e.line)+":"+hC(e&&e.column)}function pC(e){return fC(e&&e.start)+"-"+fC(e&&e.end)}function hC(e){return e&&"number"==typeof e?e:1}class gC 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 a=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=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=a?a.line:void 0,this.name=dC(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}}gC.prototype.file="",gC.prototype.name="",gC.prototype.reason="",gC.prototype.message="",gC.prototype.stack="",gC.prototype.column=void 0,gC.prototype.line=void 0,gC.prototype.ancestors=void 0,gC.prototype.cause=void 0,gC.prototype.fatal=void 0,gC.prototype.place=void 0,gC.prototype.ruleId=void 0,gC.prototype.source=void 0;const mC={}.hasOwnProperty,vC=new Map,yC=/[A-Z]/g,bC=new Set(["table","tbody","thead","tfoot","tr"]),wC=new Set(["td","th"]),xC="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function kC(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 a=Array.isArray(o.children),l=uC(n);return t(r,o,i,a,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.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 a=Array.isArray(o.children)?n:t;return i?a(r,o,i):a(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?NE:RE,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=SC(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function SC(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=NE,e.schema=o);e.ancestors.push(t);const i=BC(e,t.tagName,!1),a=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&mC.call(t.properties,o)){const i=DC(e,o,t.properties[o]);if(i){const[o,a]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof a&&wC.has(t.tagName)?r=a:n[o]=a}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let l=PC(e,t);bC.has(t.tagName)&&(l=l.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&rE(t.value):rE(t));var t}));return EC(e,a,i,t),CC(a,l),e.ancestors.pop(),e.schema=r,e.create(t,i,a,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)}TC(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=NE,e.schema=o);e.ancestors.push(t);const i=null===t.name?e.Fragment:BC(e,t.name,!0),a=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];KS(t.type);const o=t.expression;KS(o.type);const i=o.properties[0];KS(i.type),Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else TC(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];KS(t.type),i=e.evaluater.evaluateExpression(t.expression)}else TC(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),l=PC(e,t);return EC(e,a,i,t),CC(a,l),e.ancestors.pop(),e.schema=r,e.create(t,i,a,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);TC(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return CC(r,PC(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 EC(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function CC(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function PC(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:vC;for(;++r<t.children.length;){const i=t.children[r];let a;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;a=e+"-"+t,o.set(e,t+1)}}const l=SC(e,i,a);void 0!==l&&n.push(l)}return n}function DC(e,t,n){const r=function(e,t){const n=aE(t);let r=t,o=lE;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&LE.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(ME,QE);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!ME.test(e)){let n=e.replace(IE,OE);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=yE}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 sC(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const n=t,r=new gC("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=xC+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)mC.call(e,n)&&(t[IC(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?TE[r.property]||r.property:r.attribute,n]}}function BC(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=tE(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=tE(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 mC.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);TC(e)}function TC(e,t){const n=new gC("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=xC+"#cannot-handle-mdx-estrees-without-createevaluater",n}function IC(e){let t=e.replace(yC,MC);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function MC(e){return"-"+e.toLowerCase()}const LC={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"]},OC={};function QC(e,t){return RC(e,"boolean"!=typeof OC.includeImageAlt||OC.includeImageAlt,"boolean"!=typeof OC.includeHtml||OC.includeHtml)}function RC(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 NC(e.children,t,n)}return Array.isArray(e)?NC(e,t,n):""}function NC(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=RC(e[o],t,n);return r.join("")}const FC=document.createElement("i");function zC(e){const t="&"+e+";";FC.innerHTML=t;const n=FC.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function _C(e,t,n,r){const o=e.length;let i,a=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);a<r.length;)i=r.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function jC(e,t){return e.length>0?(_C(e,e.length,0,t),e):t}const HC={}.hasOwnProperty;function UC(e){const t={};let n=-1;for(;++n<e.length;)qC(t,e[n]);return t}function qC(e,t){let n;for(n in t){const r=(HC.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){HC.call(r,i)||(r[i]=[]);const e=o[i];VC(r[i],Array.isArray(e)?e:e?[e]:[])}}}function VC(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);_C(e,0,0,r)}function WC(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 YC(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const GC=aP(/[A-Za-z]/),XC=aP(/[\dA-Za-z]/),KC=aP(/[#-'*+\--9=?A-Z^-~]/);function JC(e){return null!==e&&(e<32||127===e)}const $C=aP(/\d/),ZC=aP(/[\dA-Fa-f]/),eP=aP(/[!-/:-@[-`{-~]/);function tP(e){return null!==e&&e<-2}function nP(e){return null!==e&&(e<0||32===e)}function rP(e){return-2===e||-1===e||32===e}const oP=aP(/\p{P}|\p{S}/u),iP=aP(/\s/);function aP(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function lP(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(37===i&&XC(e.charCodeAt(n+1))&&XC(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(a=String.fromCharCode(i,t),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function sP(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){if(rP(r))return e.enter(n),a(r);return t(r)};function a(r){return rP(r)&&i++<o?(e.consume(r),a):(e.exit(n),t(r))}}const cP={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"),sP(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)):tP(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const uP={tokenize:function(e){const t=this,n=[];let r,o,i,a=0;return l;function l(r){if(a<n.length){const o=n[a];return t.containerState=o[1],e.attempt(o[0].continuation,s,c)(r)}return c(r)}function s(e){if(a++,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(a);let l=n;for(;l<t.events.length;)t.events[l][1].end={...o},l++;return _C(t.events,i+1,0,t.events.slice(n)),t.events.length=l,c(e)}return l(e)}function c(o){if(a===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(AP,u,A)(o)}function u(e){return r&&v(),m(a),d(e)}function A(e){return t.parser.lazy[t.now().line]=a!==n.length,i=t.now().offset,p(e)}function d(n){return t.containerState={},e.attempt(AP,f,p)(n)}function f(e){return a++,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)):tP(n)?(e.consume(n),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,l):(e.consume(n),h)}function g(e,n){const l=t.sliceStream(e);if(n&&l.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(l),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,l,s=n;for(;s--;)if("exit"===t.events[s][0]&&"chunkFlow"===t.events[s][1].type){if(o){l=t.events[s][1].end;break}o=!0}for(m(a),e=n;e<t.events.length;)t.events[e][1].end={...l},e++;_C(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}}},AP={tokenize:function(e,t,n){return sP(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function dP(e){return null===e||nP(e)||iP(e)?1:oP(e)?2:void 0}function fP(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 pP={name:"attention",resolveAll:function(e,t){let n,r,o,i,a,l,s,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;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[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const A={...e[n][1].end},d={...e[u][1].start};hP(A,-l),hP(d,l),i={type:l>1?"strongSequence":"emphasisSequence",start:A,end:{...e[n][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:d},o={type:l>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:l>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},e[n][1].end={...i.start},e[u][1].start={...a.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=jC(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=jC(s,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),s=jC(s,fP(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),s=jC(s,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,s=jC(s,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,_C(e,n-1,u-n+3,s),u=n+s.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=dP(r);let i;return function(t){return i=t,e.enter("attentionSequence"),a(t)};function a(l){if(l===i)return e.consume(l),a;const s=e.exit("attentionSequence"),c=dP(l),u=!c||2===c&&o||n.includes(l),A=!o||2===o&&c||n.includes(r);return s._open=Boolean(42===i?u:u&&(o||!A)),s._close=Boolean(42===i?A:A&&(c||!u)),t(l)}}};function hP(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const gP={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 GC(t)?(e.consume(t),i):64===t?n(t):s(t)}function i(e){return 43===e||45===e||46===e||XC(e)?(r=1,a(e)):s(e)}function a(t){return 58===t?(e.consume(t),r=0,l):(43===t||45===t||46===t||XC(t))&&r++<32?(e.consume(t),a):(r=0,s(t))}function l(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||JC(r)?n(r):(e.consume(r),l)}function s(t){return 64===t?(e.consume(t),c):KC(t)?(e.consume(t),s):n(t)}function c(e){return XC(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):A(n)}function A(t){if((45===t||XC(t))&&r++<63){const n=45===t?A:u;return e.consume(t),n}return n(t)}}};const mP={partial:!0,tokenize:function(e,t,n){return function(t){return rP(t)?sP(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||tP(e)?t(e):n(e)}}};const vP={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(rP(t))return sP(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(vP,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 rP(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const yP={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 eP(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const bP={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),l};function l(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),o=31,i=XC,c(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=ZC,c):(e.enter("characterReferenceValue"),o=7,i=$C,c(t))}function c(l){if(59===l&&a){const o=e.exit("characterReferenceValue");return i!==XC||zC(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(l),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(l)}return i(l)&&a++<o?(e.consume(l),c):n(l)}}};const wP={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)}}},xP={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return a;function a(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s}function s(t){return e.enter("codeFencedFence"),rP(t)?sP(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===i?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===i?(o++,e.consume(t),u):o>=l?(e.exit("codeFencedFenceSequence"),rP(t)?sP(e,A,"whitespace")(t):A(t)):n(t)}function A(r){return null===r||tP(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let i,a=0,l=0;return function(t){return function(t){const n=r.events[r.events.length-1];return a=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?(l++,e.consume(t),s):l<3?n(t):(e.exit("codeFencedFenceSequence"),rP(t)?sP(e,c,"whitespace")(t):c(t))}function c(n){return null===n||tP(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(wP,f,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||tP(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):rP(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),sP(e,A,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),u)}function A(t){return null===t||tP(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||tP(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(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 a>0&&rP(t)?sP(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||tP(t)?e.check(wP,f,v)(t):(e.enter("codeFlowValue"),m(t))}function m(t){return null===t||tP(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),m)}function v(n){return e.exit("codeFenced"),t(n)}}};const kP={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),sP(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?l(t):tP(t)?e.attempt(SP,i,l)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||tP(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),a)}function l(n){return e.exit("codeIndented"),t(n)}}},SP={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):tP(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):sP(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):tP(e)?o(e):n(e)}}};const EP={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"),a(t)};function a(t){return 96===t?(e.consume(t),i++,a):(e.exit("codeTextSequence"),l(t))}function l(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),l):96===t?(o=e.enter("codeTextSequence"),r=0,c(t)):tP(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):(e.enter("codeTextData"),s(t))}function s(t){return null===t||32===t||96===t||tP(t)?(e.exit("codeTextData"),l(t)):(e.consume(t),s)}function c(n){return 96===n?(e.consume(n),r++,c):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",s(n))}}};class CP{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&&PP(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),PP(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),PP(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);PP(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);PP(this.left,t.reverse())}}}function PP(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 DP(e){const t={};let n,r,o,i,a,l,s,c=-1;const u=new CP(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(l=n[1]._tokenizer.events,o=0,o<l.length&&"lineEndingBlank"===l[o][1].type&&(o+=2),o<l.length&&"content"===l[o][1].type))for(;++o<l.length&&"content"!==l[o][1].type;)"chunkText"===l[o][1].type&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,BP(u,c)),c=t[c],s=!0);else if(n[1]._container){for(o=c,r=void 0;o--;)if(i=u.get(o),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(r&&(u.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={...u.get(r)[1].start},a=u.slice(r,c),a.unshift(n),u.splice(r,c-r+1,a))}}return _C(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!s}function BP(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const l=a.events,s=[],c={};let u,A,d=-1,f=n,p=0,h=0;const g=[h];for(;f;){for(;e.get(++o)[1]!==f;);i.push(o),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),A&&a.defineSkip(f.start),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),A=f,f=f.next}for(f=n;++d<l.length;)"exit"===l[d][0]&&"enter"===l[d-1][0]&&l[d][1].type===l[d-1][1].type&&l[d][1].start.line!==l[d][1].end.line&&(h=d+1,g.push(h),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(a.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),d=g.length;d--;){const t=l.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;)c[p+s[d][0]]=p+s[d][1],p+=s[d][1]-s[d][0]-1;return c}const TP={resolve:function(e){return DP(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):tP(t)?e.check(IP,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}}},IP={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"),sP(e,o,"linePrefix")};function o(o){if(null===o||tP(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 MP(e,t,n,r,o,i,a,l,s){const c=s||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),A;if(null===t||32===t||41===t||JC(t))return n(t);return e.enter(r),e.enter(a),e.enter(l),e.enter("chunkString",{contentType:"string"}),p(t)};function A(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(l),A(t)):null===t||60===t||tP(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 u||null!==o&&41!==o&&!nP(o)?u<c&&40===o?(e.consume(o),u++,p):41===o?(e.consume(o),u--,p):null===o||32===o||40===o||JC(o)?n(o):(e.consume(o),92===o?h:p):(e.exit("chunkString"),e.exit(l),e.exit(a),e.exit(r),t(o))}function h(t){return 40===t||41===t||92===t?(e.consume(t),p):p(t)}}function LP(e,t,n,r,o,i){const a=this;let l,s=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),c};function c(A){return s>999||null===A||91===A||93===A&&!l||94===A&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(A):93===A?(e.exit(i),e.enter(o),e.consume(A),e.exit(o),e.exit(r),t):tP(A)?(e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(A))}function u(t){return null===t||91===t||93===t||tP(t)||s++>999?(e.exit("chunkString"),c(t)):(e.consume(t),l||(l=!rP(t)),92===t?A:u)}function A(t){return 91===t||92===t||93===t?(e.consume(t),s++,u):u(t)}}function OP(e,t,n,r,o,i){let a;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(o),e.consume(t),e.exit(o),a=40===t?41:t,l;return n(t)};function l(n){return n===a?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),s(n))}function s(t){return t===a?(e.exit(i),l(a)):null===t?n(t):tP(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),sP(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||tP(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?u:c)}function u(t){return t===a||92===t?(e.consume(t),c):c(t)}}function QP(e,t){let n;return function r(o){if(tP(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(rP(o))return sP(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}const RP={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return LP.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=YC(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return nP(t)?QP(e,l)(t):l(t)}function l(t){return MP(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(NP,c,c)(t)}function c(t){return rP(t)?sP(e,u,"whitespace")(t):u(t)}function u(i){return null===i||tP(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},NP={partial:!0,tokenize:function(e,t,n){return function(t){return nP(t)?QP(e,r)(t):n(t)};function r(t){return OP(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return rP(t)?sP(e,i,"whitespace")(t):i(t)}function i(e){return null===e||tP(e)?t(e):n(e)}}};const FP={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return tP(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const zP={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"},_C(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||nP(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||tP(n)?(e.exit("atxHeading"),t(n)):rP(n)?sP(e,i,"whitespace")(n):(e.enter("atxHeadingText"),l(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),i(t))}function l(t){return null===t||35===t||nP(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),l)}}};const _P=["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"],jP=["pre","script","style","textarea"],HP={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,a,l,s;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(l){return 33===l?(e.consume(l),u):47===l?(e.consume(l),i=!0,f):63===l?(e.consume(l),o=3,r.interrupt?t:O):GC(l)?(e.consume(l),a=String.fromCharCode(l),p):n(l)}function u(i){return 45===i?(e.consume(i),o=2,A):91===i?(e.consume(i),o=5,l=0,d):GC(i)?(e.consume(i),o=4,r.interrupt?t:O):n(i)}function A(o){return 45===o?(e.consume(o),r.interrupt?t:O):n(o)}function d(o){const i="CDATA[";return o===i.charCodeAt(l++)?(e.consume(o),6===l?r.interrupt?t:C:d):n(o)}function f(t){return GC(t)?(e.consume(t),a=String.fromCharCode(t),p):n(t)}function p(l){if(null===l||47===l||62===l||nP(l)){const s=47===l,c=a.toLowerCase();return s||i||!jP.includes(c)?_P.includes(a.toLowerCase())?(o=6,s?(e.consume(l),h):r.interrupt?t(l):C(l)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(l):i?g(l):m(l)):(o=1,r.interrupt?t(l):C(l))}return 45===l||XC(l)?(e.consume(l),a+=String.fromCharCode(l),p):n(l)}function h(o){return 62===o?(e.consume(o),r.interrupt?t:C):n(o)}function g(t){return rP(t)?(e.consume(t),g):S(t)}function m(t){return 47===t?(e.consume(t),S):58===t||95===t||GC(t)?(e.consume(t),v):rP(t)?(e.consume(t),m):S(t)}function v(t){return 45===t||46===t||58===t||95===t||XC(t)?(e.consume(t),v):y(t)}function y(t){return 61===t?(e.consume(t),b):rP(t)?(e.consume(t),y):m(t)}function b(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),s=t,w):rP(t)?(e.consume(t),b):x(t)}function w(t){return t===s?(e.consume(t),s=null,k):null===t||tP(t)?n(t):(e.consume(t),w)}function x(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||nP(t)?y(t):(e.consume(t),x)}function k(e){return 47===e||62===e||rP(e)?m(e):n(e)}function S(t){return 62===t?(e.consume(t),E):n(t)}function E(t){return null===t||tP(t)?C(t):rP(t)?(e.consume(t),E):n(t)}function C(t){return 45===t&&2===o?(e.consume(t),T):60===t&&1===o?(e.consume(t),I):62===t&&4===o?(e.consume(t),Q):63===t&&3===o?(e.consume(t),O):93===t&&5===o?(e.consume(t),L):!tP(t)||6!==o&&7!==o?null===t||tP(t)?(e.exit("htmlFlowData"),P(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(UP,R,P)(t))}function P(t){return e.check(qP,D,R)(t)}function D(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),B}function B(t){return null===t||tP(t)?P(t):(e.enter("htmlFlowData"),C(t))}function T(t){return 45===t?(e.consume(t),O):C(t)}function I(t){return 47===t?(e.consume(t),a="",M):C(t)}function M(t){if(62===t){const n=a.toLowerCase();return jP.includes(n)?(e.consume(t),Q):C(t)}return GC(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),M):C(t)}function L(t){return 93===t?(e.consume(t),O):C(t)}function O(t){return 62===t?(e.consume(t),Q):45===t&&2===o?(e.consume(t),O):C(t)}function Q(t){return null===t||tP(t)?(e.exit("htmlFlowData"),R(t)):(e.consume(t),Q)}function R(n){return e.exit("htmlFlow"),t(n)}}},UP={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(mP,t,n)}}},qP={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(tP(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 VP={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),l};function l(t){return 33===t?(e.consume(t),s):47===t?(e.consume(t),b):63===t?(e.consume(t),v):GC(t)?(e.consume(t),k):n(t)}function s(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,f):GC(t)?(e.consume(t),m):n(t)}function c(t){return 45===t?(e.consume(t),d):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),A):tP(t)?(a=u,M(t)):(e.consume(t),u)}function A(t){return 45===t?(e.consume(t),d):u(t)}function d(e){return 62===e?I(e):45===e?A(e):u(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):tP(t)?(a=p,M(t)):(e.consume(t),p)}function h(t){return 93===t?(e.consume(t),g):p(t)}function g(t){return 62===t?I(t):93===t?(e.consume(t),g):p(t)}function m(t){return null===t||62===t?I(t):tP(t)?(a=m,M(t)):(e.consume(t),m)}function v(t){return null===t?n(t):63===t?(e.consume(t),y):tP(t)?(a=v,M(t)):(e.consume(t),v)}function y(e){return 62===e?I(e):v(e)}function b(t){return GC(t)?(e.consume(t),w):n(t)}function w(t){return 45===t||XC(t)?(e.consume(t),w):x(t)}function x(t){return tP(t)?(a=x,M(t)):rP(t)?(e.consume(t),x):I(t)}function k(t){return 45===t||XC(t)?(e.consume(t),k):47===t||62===t||nP(t)?S(t):n(t)}function S(t){return 47===t?(e.consume(t),I):58===t||95===t||GC(t)?(e.consume(t),E):tP(t)?(a=S,M(t)):rP(t)?(e.consume(t),S):I(t)}function E(t){return 45===t||46===t||58===t||95===t||XC(t)?(e.consume(t),E):C(t)}function C(t){return 61===t?(e.consume(t),P):tP(t)?(a=C,M(t)):rP(t)?(e.consume(t),C):S(t)}function P(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,D):tP(t)?(a=P,M(t)):rP(t)?(e.consume(t),P):(e.consume(t),B)}function D(t){return t===o?(e.consume(t),o=void 0,T):null===t?n(t):tP(t)?(a=D,M(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||nP(t)?S(t):(e.consume(t),B)}function T(e){return 47===e||62===e||nP(e)?S(e):n(e)}function I(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function M(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),L}function L(t){return rP(t)?sP(e,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):O(t)}function O(t){return e.enter("htmlTextData"),a(t)}}};const WP={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&&_C(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,o,i,a=e.length,l=0;for(;a--;)if(n=e[a][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[a][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[a][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=a,"labelLink"!==n.type)){l=2;break}}else"labelEnd"===n.type&&(o=a);const s={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[r+l+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",s,t],["enter",c,t]],i=jC(i,e.slice(r+1,r+l+3)),i=jC(i,[["enter",u,t]]),i=jC(i,fP(t.parser.constructs.insideSpan.null,e.slice(r+l+4,o-3),t)),i=jC(i,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),i=jC(i,e.slice(o+1)),i=jC(i,[["exit",s,t]]),_C(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,a=r.events.length;for(;a--;)if(("labelImage"===r.events[a][1].type||"labelLink"===r.events[a][1].type)&&!r.events[a][1]._balanced){o=r.events[a][1];break}return function(t){if(!o)return n(t);if(o._inactive)return u(t);return i=r.parser.defined.includes(YC(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),l};function l(t){return 40===t?e.attempt(YP,c,i?c:u)(t):91===t?e.attempt(GP,c,i?s:u)(t):i?c(t):u(t)}function s(t){return e.attempt(XP,c,u)(t)}function c(e){return t(e)}function u(e){return o._balanced=!0,n(e)}}},YP={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 nP(t)?QP(e,o)(t):o(t)}function o(t){return 41===t?c(t):MP(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return nP(t)?QP(e,l)(t):c(t)}function a(e){return n(e)}function l(t){return 34===t||39===t||40===t?OP(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function s(t){return nP(t)?QP(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},GP={tokenize:function(e,t,n){const r=this;return function(t){return LP.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(YC(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},XP={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 KP={name:"labelStartImage",resolveAll:WP.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 JP={name:"labelStartLink",resolveAll:WP.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 $P={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),sP(e,t,"linePrefix")}}};const ZP={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"),a(i)):o>=3&&(null===i||tP(i))?(e.exit("thematicBreak"),t(i)):n(i)}function a(t){return t===r?(e.consume(t),o++,a):(e.exit("thematicBreakSequence"),rP(t)?sP(e,i,"whitespace")(t):i(t))}}};const eD={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(mP,o,i);function o(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,sP(e,t,"listItemIndent",r.containerState.size+1)(n)}function i(n){return r.containerState.furtherBlankLines||!rP(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(nD,t,a)(n))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,sP(e,e.attempt(eD,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,a=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:$C(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(ZP,n,s)(t):s(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(t)}return n(t)};function l(t){return $C(t)&&++a<10?(e.consume(t),l):(!r.interrupt||a<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(mP,r.interrupt?n:c,e.attempt(tD,A,u))}function c(e){return r.containerState.initialBlankLine=!0,i++,A(e)}function u(t){return rP(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),A):n(t)}function A(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},tD={partial:!0,tokenize:function(e,t,n){const r=this;return sP(e,function(e){const o=r.events[r.events.length-1];return!rP(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},nD={partial:!0,tokenize:function(e,t,n){const r=this;return sP(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 rD={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 a={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",a,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=a;return e.push(["exit",a,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let a,l=r.events.length;for(;l--;)if("lineEnding"!==r.events[l][1].type&&"linePrefix"!==r.events[l][1].type&&"content"!==r.events[l][1].type){a="paragraph"===r.events[l][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||a))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"),rP(t)?sP(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||tP(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const oD={tokenize:function(e){const t=this,n=e.attempt(mP,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,sP(e,e.attempt(this.parser.constructs.flow,r,e.attempt(TP,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 iD={resolveAll:cD()},aD=sD("string"),lD=sD("text");function sD(e){return{resolveAll:cD("text"===e?uD:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,a);return i;function i(e){return s(e)?o(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),l;t.consume(e)}function l(e){return s(e)?(t.exit("data"),o(e)):(t.consume(e),l)}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 cD(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 uD(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,a=o.length,l=-1,s=0;for(;a--;){const e=o[a];if("string"==typeof e){for(l=e.length;32===e.charCodeAt(l-1);)s++,l--;if(l)break;l=-1}else if(-2===e)i=!0,s++;else if(-1!==e){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const o={type:n===e.length||i||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,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 AD={42:eD,43:eD,45:eD,48:eD,49:eD,50:eD,51:eD,52:eD,53:eD,54:eD,55:eD,56:eD,57:eD,62:vP},dD={91:RP},fD={[-2]:kP,[-1]:kP,32:kP},pD={35:zP,42:ZP,45:[rD,ZP],60:HP,61:rD,95:ZP,96:xP,126:xP},hD={38:bP,92:yP},gD={[-5]:$P,[-4]:$P,[-3]:$P,33:KP,38:bP,42:pP,60:[gP,VP],91:JP,92:[FP,yP],93:WP,95:pP,96:EP},mD={null:[pP,iD]};var vD=Object.freeze({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:dD,disable:{null:[]},document:AD,flow:pD,flowInitial:fD,insideSpan:mD,string:hD,text:gD});function yD(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 a=[],l=[];const s={attempt:g(function(e,t){m(e,t.from)}),check:g(h),consume:function(e){tP(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===a[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=d(),c.events.push(["enter",n,c]),l.push(n),n},exit:function(e){const t=l.pop();return t.end=d(),c.events.push(["exit",t,c]),t},interrupt:g(h,{interrupt:!0})},c={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 a;if("string"==typeof i)a=i;else switch(i){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&o)continue;a=" ";break;default:a=String.fromCharCode(i)}o=-2===i,r.push(a)}return r.join("")}(A(e),t)},sliceStream:A,write:function(e){if(a=jC(a,e),f(),null!==a[a.length-1])return[];return m(t,0),c.events=fP(i,c.events,c),c.events}};let u=t.tokenize.call(c,s);return t.resolveAll&&i.push(t),c;function A(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}(a,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<a.length;){const t=a[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){u=u(e)}function h(e,t){t.restore()}function g(e,t){return function(n,o,i){let a,u,A,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 a=e,u=0,0===e.length?i:h(e[u])}function h(e){return function(n){f=function(){const e=d(),t=c.previous,n=c.currentConstruct,o=c.events.length,i=Array.from(l);return{from:o,restore:a};function a(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=o,l=i,v()}}(),A=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return m();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,s,g,m)(n)}}function g(t){return e(A,f),o}function m(e){return f.restore(),++u<a.length?h(a[u]):i}}}function m(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&_C(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function v(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const bD=/[\0\t\n\r]/g;const wD=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function xD(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return WC(n.slice(t?2:1),t?16:10)}return zC(n)||e}const kD={}.hasOwnProperty;function SD(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:E,autolinkEmail:E,atxHeading:i(J),blockQuote:i(W),characterEscape:E,characterReference:E,codeFenced:i(Y),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(Y,a),codeText:i(G,a),codeTextData:E,data:E,codeFlowValue:E,definition:i(X),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(K),hardBreakEscape:i($),hardBreakTrailing:i($),htmlFlow:i(Z,a),htmlFlowData:E,htmlText:i(Z,a),htmlTextData:E,image:i(ee),label:a,link:i(te),listItem:i(re),listItemValue:d,listOrdered:i(ne,A),listUnordered:i(ne),paragraph:i(oe),reference:z,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(J),strong:i(ie),thematicBreak:i(le)},exit:{atxHeading:s(),atxHeadingSequence:w,autolink:s(),autolinkEmail:V,autolinkProtocol:q,blockQuote:s(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:j,characterReferenceMarkerNumeric:j,characterReferenceValue:H,characterReference:U,codeFenced:s(g),codeFencedFence:h,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:C,codeIndented:s(m),codeText:s(I),codeTextData:C,data:C,definition:s(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:s(),hardBreakEscape:s(D),hardBreakTrailing:s(D),htmlFlow:s(B),htmlFlowData:C,htmlText:s(T),htmlTextData:C,image:s(L),label:Q,labelText:O,lineEnding:P,link:s(M),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:_,resourceDestinationString:R,resourceTitleString:N,resource:F,setextHeading:s(S),setextHeadingLineSequence:k,setextHeadingText:x,strong:s(),thematicBreak:s()}};CD(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const i={stack:[r],tokenStack:[],config:t,enter:l,exit:c,buffer:a,resume:u,data:n},s=[];let A=-1;for(;++A<e.length;)if("listOrdered"===e[A][1].type||"listUnordered"===e[A][1].type)if("enter"===e[A][0])s.push(A);else{A=o(e,s.pop(),A)}for(A=-1;++A<e.length;){const n=t[e[A][0]];kD.call(n,e[A][1].type)&&n[e[A][1].type].call(Object.assign({sliceSerialize:e[A][2].sliceSerialize},i),e[A][1])}if(i.tokenStack.length>0){const e=i.tokenStack[i.tokenStack.length-1];(e[1]||DD).call(i,void 0,e[0])}for(r.position={start:ED(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:ED(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},A=-1;++A<t.transforms.length;)r=t.transforms[A](r)||r;return r}function o(e,t,n){let r,o,i,a,l=t-1,s=-1,c=!1;for(;++l<=n;){const t=e[l];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||a||s||i||(i=l),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=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 a=l;for(o=void 0;a--;){const t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",o=a}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||l,0,["exit",r,t[2]]),l++,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(l,0,["enter",o,t[2]]),l++,n++,i=void 0,a=!0}}}return e[t][1]._spread=c,n}function i(e,t){return n;function n(n){l.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function l(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:ED(t.start),end:void 0}}function s(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+dC({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]||DD).call(this,e,r[0])}n.position.end=ED(e.end)}function u(){return QC(this.stack.pop())}function A(){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=YC(this.sliceSerialize(e)).toLowerCase()}function y(){const e=this.resume();this.stack[this.stack.length-1].title=e}function b(){const e=this.resume();this.stack[this.stack.length-1].url=e}function w(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function x(){this.data.setextHeadingSlurpLineEnding=!0}function k(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function S(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ae(),n.position={start:ED(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=ED(e.end)}function P(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=ED(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.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 T(){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 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 L(){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(wD,xD)}(t),n.identifier=YC(t).toLowerCase()}function Q(){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 R(){const e=this.resume();this.stack[this.stack.length-1].url=e}function N(){const e=this.resume();this.stack[this.stack.length-1].title=e}function F(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function _(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=YC(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function j(e){this.data.characterReferenceType=e.type}function H(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=WC(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=zC(t)}this.stack[this.stack.length-1].value+=r}function U(e){this.stack.pop().position.end=ED(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 W(){return{type:"blockquote",children:[]}}function Y(){return{type:"code",lang:null,meta:null,value:""}}function G(){return{type:"inlineCode",value:""}}function X(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function K(){return{type:"emphasis",children:[]}}function J(){return{type:"heading",depth:0,children:[]}}function $(){return{type:"break"}}function Z(){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 ae(){return{type:"text",value:""}}function le(){return{type:"thematicBreak"}}}(n)(function(e){for(;!DP(e););return e}(function(e){const t={constructs:UC([vD,...(e||{}).extensions||[]]),content:n(cP),defined:[],document:n(uP),flow:n(oD),lazy:{},string:n(aD),text:n(lD)};return t;function n(e){return function(n){return yD(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,a){const l=[];let s,c,u,A,d;for(o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),u=0,n="",r&&(65279===o.charCodeAt(0)&&u++,r=void 0);u<o.length;){if(bD.lastIndex=u,s=bD.exec(o),A=s&&void 0!==s.index?s.index:o.length,d=o.charCodeAt(A),!s){n=o.slice(u);break}if(10===d&&u===A&&e)l.push(-3),e=void 0;else switch(e&&(l.push(-5),e=void 0),u<A&&(l.push(o.slice(u,A)),t+=A-u),d){case 0:l.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),l.push(-2);t++<c;)l.push(-1);break;case 10:l.push(-4),t=1;break;default:e=!0,t=1}u=A+1}return a&&(e&&l.push(-5),n&&l.push(n),l.push(null)),l}}()(e,t,!0))))}function ED(e){return{line:e.line,column:e.column,offset:e.offset}}function CD(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?CD(e,r):PD(e,r)}}function PD(e,t){let n;for(n in t)if(kD.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 DD(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+dC({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+dC({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+dC({start:t.start,end:t.end})+") is still open")}function BD(e){const t=this;t.parser=function(n){return SD(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function TD(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 a=o[o.length-1];return a&&"text"===a.type?a.value+=r:o.push({type:"text",value:r}),o}function ID(e){const t=e.spread;return null==t?e.children.length>1:t}function MD(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(LD(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(LD(t.slice(o),o>0,!1)),i.join("")}function LD(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 OD={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=lP(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,l=e.footnoteCounts.get(r);void 0===l?(l=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,l+=1,e.footnoteCounts.set(r,l);const s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,s);const c={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,c),e.applyData(t,c)},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 TD(e,t);const o={src:lP(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:lP(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 TD(e,t);const o={href:lP(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:lP(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=ID(n[r])}return t}(n):ID(t),i={},a=[];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 l=-1;for(;++l<r.length;){const e=r[l];(o||0!==l||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?a.push(e):a.push(...e.children)}const s=r[r.length-1];s&&(o||"element"!==s.type||"p"!==s.tagName)&&a.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,c),e.applyData(t,c)},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=uC(t.children[1]),a=cC(t.children[t.children.length-1]);i&&a&&(r.position={start:i,end:a}),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,a=i?i.length:t.children.length;let l=-1;const s=[];for(;++l<a;){const n=t.children[l],r={},a=i?i[l]:void 0;a&&(r.align=a);let c={type:"element",tagName:o,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),s.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:MD(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:QD,yaml:QD,definition:QD,footnoteDefinition:QD};function QD(){}const RD="object"==typeof self?self:globalThis,ND=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case 0:case-1:return n(a,o);case 1:{const e=n([],o);for(const t of a)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of a)e[r(t)]=r(n);return e}case 3:return n(new Date(a),o);case 4:{const{source:e,flags:t}=a;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of a)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of a)e.add(r(t));return e}case 7:{const{name:e,message:t}=a;return n(new RD[e](t),o)}case 8:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:e}=new Uint8Array(a);return n(new DataView(e),a)}}return n(new RD[i](a),o)};return r})(new Map,e)(0),FD="",{toString:zD}={},{keys:_D}=Object,jD=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=zD.call(e).slice(8,-1);switch(n){case"Array":return[1,FD];case"Object":return[2,FD];case"Date":return[3,FD];case"RegExp":return[4,FD];case"Map":return[5,FD];case"Set":return[6,FD];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},HD=([e,t])=>0===e&&("function"===t||"symbol"===t),UD=(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[a,l]=jD(r);switch(a){case 0:{let t=r;switch(l){case"bigint":a=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);t=null;break;case"undefined":return o([-1],r)}return o([a,t],r)}case 1:{if(l){let e=r;return"DataView"===l?e=new Uint8Array(r.buffer):"ArrayBuffer"===l&&(e=new Uint8Array(r)),o([l,[...e]],r)}const e=[],t=o([a,e],r);for(const t of r)e.push(i(t));return t}case 2:{if(l)switch(l){case"BigInt":return o([l,r.toString()],r);case"Boolean":case"Number":case"String":return o([l,r.valueOf()],r)}if(t&&"toJSON"in r)return i(r.toJSON());const n=[],s=o([a,n],r);for(const t of _D(r))!e&&HD(jD(r[t]))||n.push([i(t),i(r[t])]);return s}case 3:return o([a,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([a,{source:e,flags:t}],r)}case 5:{const t=[],n=o([a,t],r);for(const[n,o]of r)(e||!HD(jD(n))&&!HD(jD(o)))&&t.push([i(n),i(o)]);return n}case 6:{const t=[],n=o([a,t],r);for(const n of r)!e&&HD(jD(n))||t.push(i(n));return n}}const{message:s}=r;return o([a,{name:l,message:s}],r)};return i})(!(t||n),!!t,new Map,r)(e),r};var qD="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?ND(UD(e,t)):structuredClone(e):(e,t)=>ND(UD(e,t));function VD(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 WD(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const YD=function(e){if(null==e)return XD;if("function"==typeof e)return GD(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=YD(e[n]);return GD(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 GD(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 GD(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function GD(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 XD(){return!0}const KD=[],JD=!0,$D=!1;function ZD(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=YD(o),a=r?-1:1;!function e(o,l,s){const c=o&&"object"==typeof o?o:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,A,d=KD;if((!t||i(o,l,s[s.length-1]||void 0))&&(d=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[JD,e];return null==e?KD:[e]}(n(o,s)),d[0]===$D))return d;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==d[0])for(u=(r?t.children.length:-1)+a,A=s.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,A)(),c[0]===$D)return c;u="number"==typeof c[1]?c[1]:u+a}}return d}}(e,void 0,[])()}function eB(e,t,n,r){let o,i,a;"function"==typeof t&&"function"!=typeof n?(i=void 0,a=t,o=n):(i=t,a=n,o=r),ZD(e,i,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return a(e,r,n)},o)}const tB={}.hasOwnProperty,nB={};function rB(e,t){e.position&&(t.position=function(e){const t=uC(e),n=cC(e);if(t&&n)return{start:t,end:n}}(e))}function oB(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,qD(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function iB(e,t){const n=t.data||{},r=!("value"in t)||tB.call(n,"hProperties")||tB.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 aB(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 lB(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function sB(e,t){const n=function(e,t){const n=t||nB,r=new Map,o=new Map,i=new Map,a={...OD,...n.handlers},l={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=l.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=lB(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=lB(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:oB,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:function(e,t){const n=e.type,r=l.handlers[n];if(tB.call(l.handlers,n)&&r)return r(l,e,t);if(l.options.passThrough&&l.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=qD(n);return r.children=l.all(e),r}return qD(e)}return(l.options.unknownHandler||iB)(l,e,t)},options:n,patch:rB,wrap:aB};return eB(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)}}),l}(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||VD,r=e.options.footnoteBackLabel||WD,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let s=-1;for(;++s<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[s]);if(!o)continue;const i=e.all(o),a=String(o.identifier).toUpperCase(),c=lP(a.toLowerCase());let u=0;const A=[],d=e.footnoteCounts.get(a);for(;void 0!==d&&++u<=d;){A.length>0&&A.push({type:"text",value:" "});let e="string"==typeof n?n:n(s,u);"string"==typeof e&&(e={type:"text",value:e}),A.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(s,u),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(...A)}else i.push(...A);const p={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(i,!0)};e.patch(o,p),l.push(p)}if(0!==l.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...qD(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!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 cB(e,t){return e&&"run"in e?async function(n,r){const o=sB(n,{file:r,...t});await e.run(o,r)}:function(n,r){return sB(n,{file:r,...e||t})}}function uB(e){if(e)throw e}var AB=Object.prototype.hasOwnProperty,dB=Object.prototype.toString,fB=Object.defineProperty,pB=Object.getOwnPropertyDescriptor,hB=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===dB.call(e)},gB=function(e){if(!e||"[object Object]"!==dB.call(e))return!1;var t,n=AB.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&AB.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||AB.call(e,t)},mB=function(e,t){fB&&"__proto__"===t.name?fB(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},vB=function(e,t){if("__proto__"===t){if(!AB.call(e,t))return;if(pB)return pB(e,t).value}return e[t]},yB=function e(){var t,n,r,o,i,a,l=arguments[0],s=1,c=arguments.length,u=!1;for("boolean"==typeof l&&(u=l,l=arguments[1]||{},s=2),(null==l||"object"!=typeof l&&"function"!=typeof l)&&(l={});s<c;++s)if(null!=(t=arguments[s]))for(n in t)r=vB(l,n),l!==(o=vB(t,n))&&(u&&o&&(gB(o)||(i=hB(o)))?(i?(i=!1,a=r&&hB(r)?r:[]):a=r&&gB(r)?r:{},mB(l,{name:n,newValue:e(u,a,o)})):void 0!==o&&mB(l,{name:n,newValue:o}));return l},bB=r(yB);function wB(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 xB(){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,...a){const l=e[++n];let s=-1;if(i)r(i);else{for(;++s<t.length;)null!==a[s]&&void 0!==a[s]||(a[s]=t[s]);t=a,l?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let a;r&&t.push(o);try{a=e.apply(this,t)}catch(e){if(r&&n)throw e;return o(e)}r||(a&&a.then&&"function"==typeof a.then?a.then(i,o):a instanceof Error?o(a):i(a))}function o(e,...r){n||(n=!0,t(e,...r))}function i(e){o(null,e)}}(l,o)(...a):r(null,...a)}}(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 kB={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');SB(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 a=-1,l=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else a<0&&(n=!0,a=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(o=i):(l=-1,o=a));r===o?o=a:o<0&&(o=e.length);return e.slice(r,o)},dirname:function(e){if(SB(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){SB(e);let t,n=e.length,r=-1,o=0,i=-1,a=0;for(;n--;){const l=e.codePointAt(n);if(47!==l)r<0&&(t=!0,r=n+1),46===l?i<0?i=n:1!==a&&(a=1):i>-1&&(a=-1);else if(t){o=n+1;break}}if(i<0||r<0||0===a||1===a&&i===r-1&&i===o+1)return"";return e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)SB(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){SB(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,a=-1,l=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(a===s-1||1===l);else if(a!==s-1&&2===l){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("/")),a=s,l=0;continue}}else if(o.length>0){o="",i=0,a=s,l=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(a+1,s):o=e.slice(a+1,s),i=s-a-1;a=s,l=0}else 46===n&&l>-1?l++:l=-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 SB(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const EB={cwd:function(){return"/"}};function CB(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function PB(e){if("string"==typeof e)e=new URL(e);else if(!CB(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 DB=["history","path","basename","stem","extname","dirname"];class BB{constructor(e){let t;t=e?CB(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?"":EB.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<DB.length;){const e=DB[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)DB.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?kB.basename(this.path):void 0}set basename(e){IB(e,"basename"),TB(e,"basename"),this.path=kB.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?kB.dirname(this.path):void 0}set dirname(e){MB(this.basename,"dirname"),this.path=kB.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?kB.extname(this.path):void 0}set extname(e){if(TB(e,"extname"),MB(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=kB.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){CB(e)&&(e=PB(e)),IB(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?kB.basename(this.path,this.extname):void 0}set stem(e){IB(e,"stem"),TB(e,"stem"),this.path=kB.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 gC(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 TB(e,t){if(e&&e.includes(kB.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+kB.sep+"`")}function IB(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function MB(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const LB=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},OB={}.hasOwnProperty;class QB extends LB{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=xB()}copy(){const e=new QB;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(bB(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(zB("data",this.frozen),this.namespace[e]=t,this):OB.call(this.namespace,e)&&this.namespace[e]||void 0:e?(zB("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=HB(e),n=this.parser||this.Parser;return NB("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),NB("process",this.parser||this.Parser),FB("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=HB(e),a=n.parse(i);function l(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(a,i,function(e,t,r){if(e||!t||!r)return l(e);const o=t,i=n.stringify(o,r);var a;"string"==typeof(a=i)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(a)?r.value=i:r.result=i,l(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),NB("processSync",this.parser||this.Parser),FB("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,uB(e),t=r}),jB("processSync","process",n),t}run(e,t,n){_B(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 a=HB(t);r.run(e,a,function(t,r,a){const l=r||e;t?i(t):o?o(l):n(void 0,l,a)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){uB(e),n=t,r=!0}),jB("runSync","run",r),n}stringify(e,t){this.freeze();const n=HB(t),r=this.compiler||this.Compiler;return FB("stringify",r),_B(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(zB("use",this.frozen),null==e);else if("function"==typeof e)l(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?a(e):i(e)}return this;function o(e){if("function"==typeof e)l(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;l(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");a(e.plugins),e.settings&&(r.settings=bB(!0,r.settings,e.settings))}function a(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 l(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 a=n[o][1];wB(a)&&wB(r)&&(r=bB(!0,a,r)),n[o]=[e,r,...i]}}}}const RB=(new QB).freeze();function NB(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function FB(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function zB(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 _B(e){if(!wB(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function jB(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function HB(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new BB(e)}const UB=[],qB={allowDangerousHtml:!0},VB=/^(https?|ircs?|mailto|xmpp)$/i,WB=[{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 YB(e){const t=function(e){const t=e.rehypePlugins||UB,n=e.remarkPlugins||UB,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...qB}:qB,o=RB().use(BD).use(n).use(cB,r).use(t);return o}(e),n=function(e){const t=e.children||"",n=new BB;"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,a=t.skipHtml,l=t.unwrapDisallowed,s=t.urlTransform||GB;for(const e of WB)Object.hasOwn(t,e.from)&&JS((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 eB(e,c),kC(e,{Fragment:lA.Fragment,components:o,ignoreInvalidStyle:!0,jsx:lA.jsx,jsxs:lA.jsxs,passKeys:!0,passNode:!0});function c(e,t,o){if("raw"===e.type&&o&&"number"==typeof t)return a?o.children.splice(t,1):o.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in LC)if(Object.hasOwn(LC,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=LC[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=s(String(n||""),t,e))}}if("element"===e.type){let a=n?!n.includes(e.tagName):!!i&&i.includes(e.tagName);if(!a&&r&&"number"==typeof t&&(a=!r(e,t,o)),a&&o&&"number"==typeof t)return l&&e.children?o.children.splice(t,1,...e.children):o.children.splice(t,1),t}}}(t.runSync(t.parse(n),n),e)}function GB(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||VB.test(e.slice(0,t))?e:""}function XB(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 KB(e,t,n){const r=YD((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([JB(e[0]),$B(e[1])])}return t}(t);let i=-1;for(;++i<o.length;)ZD(e,"text",a);function a(e,t){let n,a=-1;for(;++a<t.length;){const e=t[a],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],a=o[i][1];let l=0;const s=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let A=r.exec(e.value);for(;A;){const n=A.index,o={index:A.index,input:A.input,stack:[...t,e]};let i=a(...A,o);if("string"==typeof i&&(i=i.length>0?{type:"text",value:i}:void 0),!1===i?r.lastIndex=n+1:(l!==n&&u.push({type:"text",value:e.value.slice(l,n)}),Array.isArray(i)?u.push(...i):i&&u.push(i),l=n+A[0].length,c=!0),!r.global)break;A=r.exec(e.value)}c?(l<e.value.length&&u.push({type:"text",value:e.value.slice(l)}),n.children.splice(s,1,...u)):u=[e];return s+u.length}(e,t)}}function JB(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 $B(e){return"function"==typeof e?e:function(){return e}}const ZB="phrasing",eT=["autolink","link","image","label"];function tT(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function nT(e){this.config.enter.autolinkProtocol.call(this,e)}function rT(e){this.config.exit.autolinkProtocol.call(this,e)}function oT(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 iT(e){this.config.exit.autolinkEmail.call(this,e)}function aT(e){this.exit(e)}function lT(e){KB(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,sT],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,cT]],{ignore:["link","linkReference"]})}function sT(e,t,n,r,o){let i="";if(!uT(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 a=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=XB(e,"(");let i=XB(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(!a[0])return!1;const l={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[l,{type:"text",value:a[1]}]:l}function cT(e,t,n,r){return!(!uT(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function uT(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||iP(n)||oP(n))&&(!t||47!==n)}function AT(){this.buffer()}function dT(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function fT(){this.buffer()}function pT(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function hT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=YC(this.sliceSerialize(e)).toLowerCase(),n.label=t}function gT(e){this.exit(e)}function mT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=YC(this.sliceSerialize(e)).toLowerCase(),n.label=t}function vT(e){this.exit(e)}function yT(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),l=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),l(),a(),i+=o.move("]"),i}function bT(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,o){const i=r.createTracker(o);let a=i.move("[^");const l=r.enter("footnoteDefinition"),s=r.enter("label");a+=i.move(r.safe(r.associationId(e),{before:a,after:"]"})),s(),a+=i.move("]:"),e.children&&e.children.length>0&&(i.shift(4),a+=i.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,i.current()),t?xT:wT)));return l(),a},footnoteReference:yT},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function wT(e,t,n){return 0===t?e:xT(e,t,n)}function xT(e,t,n){return(n?"":" ")+e}yT.peek=function(){return"["};const kT=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function ST(e){this.enter({type:"delete",children:[]},e)}function ET(e){this.exit(e)}function CT(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function PT(e){return e.length}function DT(e){return null==e?"":String(e)}function BT(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 TT(e,t,n){return">"+(n?"":" ")+e}function IT(e,t){return MT(e,t.inConstruct,!0)&&!MT(e,t.notInConstruct,!1)}function MT(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 LT(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if("\n"===n.unsafe[o].character&&IT(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function OT(e,t,n){return(n?"":" ")+e}function QT(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 RT(e){return"&#x"+e.toString(16).toUpperCase()+";"}function NT(e,t,n){const r=dP(e),o=dP(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 FT(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"),a=n.createTracker(r),l=a.move(o);let s=a.move(n.containerPhrasing(e,{after:o,before:l,...a.current()}));const c=s.charCodeAt(0),u=NT(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(s=RT(c)+s.slice(1));const A=s.charCodeAt(s.length-1),d=NT(r.after.charCodeAt(0),A,o);d.inside&&(s=s.slice(0,-1)+RT(A));const f=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:d.outside,before:u.outside},l+s+f}function zT(e){return e.value||""}function _T(e,t,n,r){const o=QT(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("image");let l=n.enter("label");const s=n.createTracker(r);let c=s.move("![");return c+=s.move(n.safe(e.alt,{before:c,after:"]",...s.current()})),c+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=s.move(" "+o),c+=s.move(n.safe(e.title,{before:c,after:o,...s.current()})),c+=s.move(o),l()),c+=s.move(")"),a(),c}function jT(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const l=n.createTracker(r);let s=l.move("![");const c=n.safe(e.alt,{before:s,after:"]",...l.current()});s+=l.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const A=n.safe(n.associationId(e),{before:s,after:"]",...l.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===A?"shortcut"===o?s=s.slice(0,-1):s+=l.move("]"):s+=l.move(A+"]"),s}function HT(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 UT(e,t){const n=QC(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 qT(e,t,n,r){const o=QT(n),i='"'===o?"Quote":"Apostrophe",a=n.createTracker(r);let l,s;if(UT(e,n)){const t=n.stack;n.stack=[],l=n.enter("autolink");let r=a.move("<");return r+=a.move(n.containerPhrasing(e,{before:r,after:">",...a.current()})),r+=a.move(">"),l(),n.stack=t,r}l=n.enter("link"),s=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(s=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=a.move(" "+o),c+=a.move(n.safe(e.title,{before:c,after:o,...a.current()})),c+=a.move(o),s()),c+=a.move(")"),l(),c}function VT(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const l=n.createTracker(r);let s=l.move("[");const c=n.containerPhrasing(e,{before:s,after:"]",...l.current()});s+=l.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const A=n.safe(n.associationId(e),{before:s,after:"]",...l.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===A?"shortcut"===o?s=s.slice(0,-1):s+=l.move("]"):s+=l.move(A+"]"),s}function WT(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 YT(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}CT.peek=function(){return"~"},FT.peek=function(e,t,n){return n.options.emphasis||"*"},zT.peek=function(){return"<"},_T.peek=function(){return"!"},jT.peek=function(){return"!"},HT.peek=function(){return"`"},qT.peek=function(e,t,n){return UT(e,n)?"<":"["},VT.peek=function(){return"["};const GT=YD(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function XT(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"),a=n.createTracker(r),l=a.move(o+o);let s=a.move(n.containerPhrasing(e,{after:o,before:l,...a.current()}));const c=s.charCodeAt(0),u=NT(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(s=RT(c)+s.slice(1));const A=s.charCodeAt(s.length-1),d=NT(r.after.charCodeAt(0),A,o);d.inside&&(s=s.slice(0,-1)+RT(A));const f=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:d.outside,before:u.outside},l+s+f}XT.peek=function(e,t,n){return n.options.strong||"*"};const KT={blockquote:function(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),TT);return o(),a},break:LT,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||"",a="`"===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,OT);return e(),t}const l=n.createTracker(r),s=o.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,a=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===o?++i>a&&(a=i):i=1,o=r+t.length,r=n.indexOf(t,o);return a}(i,o)+1,3)),c=n.enter("codeFenced");let u=l.move(s);if(e.lang){const t=n.enter(`codeFencedLang${a}`);u+=l.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...l.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${a}`);u+=l.move(" "),u+=l.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...l.current()})),t()}return u+=l.move("\n"),i&&(u+=l.move(i+"\n")),u+=l.move(s),c(),u},definition:function(e,t,n,r){const o=QT(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("definition");let l=n.enter("label");const s=n.createTracker(r);let c=s.move("[");return c+=s.move(n.safe(n.associationId(e),{before:c,after:"]",...s.current()})),c+=s.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...s.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=s.move(" "+o),c+=s.move(n.safe(e.title,{before:c,after:o,...s.current()})),c+=s.move(o),l()),a(),c},emphasis:FT,hardBreak:LT,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 eB(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,$D}),Boolean((!e.depth||e.depth<3)&&QC(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),a=n.containerPhrasing(e,{...i.current(),before:"\n",after:"\n"});return r(),t(),a+"\n"+(1===o?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}const a="#".repeat(o),l=n.enter("headingAtx"),s=n.enter("phrasing");i.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(c)&&(c=RT(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),s(),l(),c},html:zT,image:_T,imageReference:jT,inlineCode:HT,link:qT,linkReference:VT,list:function(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=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):WT(n);const l=e.ordered?"."===a?")":".":function(e){const t=WT(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)&&a===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==a&&"-"!==a||!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),YT(n)===a&&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&&(a=l),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),c},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||WT(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 a=i.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));const l=n.createTracker(r);l.move(i+" ".repeat(a-i.length)),l.shift(a);const s=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,l.current()),function(e,t,n){if(t)return(n?"":" ".repeat(a))+e;return(n?i:i+" ".repeat(a-i.length))+e});return s(),c},paragraph:function(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a},root:function(e,t,n,r){const o=e.children.some(function(e){return GT(e)});return(o?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:XT,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(YT(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 JT(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 $T(e){this.exit(e),this.data.inTable=void 0}function ZT(e){this.enter({type:"tableRow",children:[]},e)}function eI(e){this.exit(e)}function tI(e){this.enter({type:"tableCell",children:[]},e)}function nI(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,rI));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function rI(e,t){return"|"===t?t:e}function oI(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=KT.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return l(function(e,t,n){const r=e.children;let o=-1;const i=[],a=t.enter("table");for(;++o<r.length;)i[o]=s(r[o],t,n);return a(),i}(e,n,r),e.align)},tableCell:a,tableRow:function(e,t,n,r){const o=s(e,n,r),i=l([o]);return i.slice(0,i.indexOf("\n"))}}};function a(e,t,n,r){const o=n.enter("tableCell"),a=n.enter("phrasing"),l=n.containerPhrasing(e,{...r,before:i,after:i});return a(),o(),l}function l(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||PT,i=[],a=[],l=[],s=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let i=-1;for(e[u].length>c&&(c=e[u].length);++i<e[u].length;){const a=DT(e[u][i]);if(!1!==n.alignDelimiters){const e=o(a);r[i]=e,(void 0===s[i]||e>s[i])&&(s[i]=e)}t.push(a)}a[u]=t,l[u]=r}let A=-1;if("object"==typeof r&&"length"in r)for(;++A<c;)i[A]=BT(r[A]);else{const e=BT(r);for(;++A<c;)i[A]=e}A=-1;const d=[],f=[];for(;++A<c;){const e=i[A];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let o=!1===n.alignDelimiters?1:Math.max(1,s[A]-t.length-r.length);const a=t+"-".repeat(o)+r;!1!==n.alignDelimiters&&(o=t.length+o+r.length,o>s[A]&&(s[A]=o),f[A]=o),d[A]=a}a.splice(1,0,d),l.splice(1,0,f),u=-1;const p=[];for(;++u<a.length;){const e=a[u],t=l[u];A=-1;const r=[];for(;++A<c;){const o=e[A]||"";let a="",l="";if(!1!==n.alignDelimiters){const e=s[A]-(t[A]||0),n=i[A];114===n?a=" ".repeat(e):99===n?e%2?(a=" ".repeat(e/2+.5),l=" ".repeat(e/2-.5)):(a=" ".repeat(e/2),l=a):l=" ".repeat(e)}!1===n.delimiterStart||A||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===o||!1===n.delimiterStart&&!A||r.push(" "),!1!==n.alignDelimiters&&r.push(a),r.push(o),!1!==n.alignDelimiters&&r.push(l),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&A===c-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=[],l=t.enter("tableRow");for(;++o<r.length;)i[o]=a(r[o],0,t,n);return l(),i}}function iI(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function aI(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 lI(e,t,n,r){const o=e.children[0],i="boolean"==typeof e.checked&&o&&"paragraph"===o.type,a="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);i&&l.move(a);let s=KT.listItem(e,t,n,{...r,...l.current()});return i&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+a})),s}const sI={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},cI={tokenize:function(e,t,n){let r,o,i;return a;function a(t){return 46===t||95===t?e.check(AI,s,l)(t):null===t||nP(t)||iP(t)||45!==t&&oP(t)?s(t):(i=!0,e.consume(t),a)}function l(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),a}function s(e){return o||r||!i?n(e):t(e)}},partial:!0},uI={tokenize:function(e,t){let n=0,r=0;return o;function o(a){return 40===a?(n++,e.consume(a),o):41===a&&r<n?i(a):33===a||34===a||38===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||60===a||63===a||93===a||95===a||126===a?e.check(AI,t,i)(a):null===a||nP(a)||iP(a)?t(a):(e.consume(a),o)}function i(t){return 41===t&&r++,e.consume(t),o}},partial:!0},AI={tokenize:function(e,t,n){return r;function r(a){return 33===a||34===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||63===a||95===a||126===a?(e.consume(a),r):38===a?(e.consume(a),i):93===a?(e.consume(a),o):60===a||null===a||nP(a)||iP(a)?t(a):n(a)}function o(e){return null===e||40===e||91===e||nP(e)||iP(e)?t(e):r(e)}function i(e){return GC(e)?a(e):n(e)}function a(t){return 59===t?(e.consume(t),r):GC(t)?(e.consume(t),a):n(t)}},partial:!0},dI={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return XC(e)?n(e):t(e)}},partial:!0},fI={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!vI.call(r,r.previous)||xI(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(sI,e.attempt(cI,e.attempt(uI,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:vI},pI={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",i=!1;return function(t){if((72===t||104===t)&&yI.call(r,r.previous)&&!xI(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),a;return n(t)};function a(t){if(GC(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),a;if(58===t){const n=o.toLowerCase();if("http"===n||"https"===n)return e.consume(t),l}return n(t)}function l(t){return 47===t?(e.consume(t),i?s:(i=!0,l)):n(t)}function s(t){return null===t||JC(t)||nP(t)||iP(t)||oP(t)?n(t):e.attempt(cI,e.attempt(uI,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:yI},hI={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,i;return function(t){if(!wI(t)||!bI.call(r,r.previous)||xI(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return wI(t)?(e.consume(t),a):64===t?(e.consume(t),l):n(t)}function l(t){return 46===t?e.check(dI,c,s)(t):45===t||95===t||XC(t)?(i=!0,e.consume(t),l):c(t)}function s(t){return e.consume(t),o=!0,l}function c(a){return i&&o&&GC(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}},previous:bI},gI={};let mI=48;for(;mI<123;)gI[mI]=hI,mI++,58===mI?mI=65:91===mI&&(mI=97);function vI(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||nP(e)}function yI(e){return!GC(e)}function bI(e){return!(47===e||wI(e))}function wI(e){return 43===e||45===e||46===e||95===e||XC(e)}function xI(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}gI[43]=hI,gI[45]=hI,gI[46]=hI,gI[95]=hI,gI[72]=[hI,pI],gI[104]=[hI,pI],gI[87]=[hI,fI],gI[119]=[hI,fI];const kI={tokenize:function(e,t,n){const r=this;return sP(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 SI(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const e=r.events[o][1];if("labelImage"===e.type){a=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!a||!a._balanced)return n(o);const l=YC(r.sliceSerialize({start:a.end,end:r.now()}));if(94!==l.codePointAt(0)||!i.includes(l.slice(1)))return n(o);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)}}function EI(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)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},l=[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",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function CI(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),l};function l(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(l){if(a>999||93===l&&!i||null===l||91===l||nP(l))return n(l);if(93===l){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes(YC(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(l)}return nP(l)||(i=!0),a++,e.consume(l),92===l?c:s}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,s):s(t)}}function PI(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a,l=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",c):n(t)}function c(t){if(l>999||93===t&&!a||null===t||91===t||nP(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return i=YC(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),A}return nP(t)||(a=!0),l++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),l++,c):c(t)}function A(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(i)||o.push(i),sP(e,d,"gfmFootnoteDefinitionWhitespace")):n(t)}function d(e){return t(e)}}function DI(e,t,n){return e.check(mP,t,e.attempt(kI,t,n))}function BI(e){e.exit("gfmFootnoteDefinition")}function TI(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const o=this.previous,i=this.events;let a=0;return function(t){if(126===o&&"characterEscape"!==i[i.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),l(t)};function l(i){const s=dP(o);if(126===i)return a>1?r(i):(e.consume(i),a++,l);if(a<2&&!t)return r(i);const c=e.exit("strikethroughSequenceTemporary"),u=dP(i);return c._open=!u||2===u&&Boolean(s),c._close=!s||2===s&&Boolean(u),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)},a=[["enter",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",i,t]],l=t.parser.constructs.insideSpan.null;l&&_C(a,a.length,0,fP(l,e.slice(r+1,n),t)),_C(a,a.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),_C(e,r-1,n-r+3,a),n=r+a.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 II{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 MI(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 LI(e,t,n){const r=this;let o,i=0,a=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?b:l;if(i===b&&r.parser.lazy[r.now().line])return n(e);return i(e)};function l(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return s(e);return o=!0,a+=1,s(e)}(t)}function s(t){return null===t?n(t):tP(t)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),A):n(t):rP(t)?sP(e,s,"whitespace")(t):(a+=1,o&&(o=!1,i+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,s):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||nP(t)?(e.exit("data"),s(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function A(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),o=!1,rP(t)?sP(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 rP(t)?sP(e,p,"whitespace")(t):p(t)}function p(t){return 58===t?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),h):45===t?(a+=1,h(t)):null===t||tP(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 rP(t)?sP(e,v,"whitespace")(t):v(t)}function v(n){return 124===n?d(n):(null===n||tP(n))&&o&&i===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):y(n)}function y(e){return n(e)}function b(t){return e.enter("tableRow"),w(t)}function w(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),w):null===n||tP(n)?(e.exit("tableRow"),t(n)):rP(n)?sP(e,w,"whitespace")(n):(e.enter("data"),x(n))}function x(t){return null===t||124===t||nP(t)?(e.exit("data"),w(t)):(e.consume(t),92===t?k:x)}function k(t){return 92===t||124===t?(e.consume(t),x):x(t)}}function OI(e,t){let n,r,o,i=-1,a=!0,l=0,s=[0,0,0,0],c=[0,0,0,0],u=!1,A=0;const d=new II;for(;++i<e.length;){const f=e[i],p=f[1];"enter"===f[0]?"tableHead"===p.type?(u=!1,0!==A&&(RI(d,t,A,n,r),r=void 0,A=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?(a=!0,o=void 0,s=[0,0,0,0],c=[0,i+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(i,0,[["enter",r,t]])),l="tableDelimiterRow"===p.type?2:r?3:1):!l||"data"!==p.type&&"tableDelimiterMarker"!==p.type&&"tableDelimiterFiller"!==p.type?"tableCellDivider"===p.type&&(a?a=!1:(0!==s[1]&&(c[0]=c[1],o=QI(d,t,s,l,void 0,o)),s=c,c=[s[1],i,0,0])):(a=!1,0===c[2]&&(0!==s[1]&&(c[0]=c[1],o=QI(d,t,s,l,void 0,o),s=[0,0,0,0]),c[2]=i)):"tableHead"===p.type?(u=!0,A=i):"tableRow"===p.type||"tableDelimiterRow"===p.type?(A=i,0!==s[1]?(c[0]=c[1],o=QI(d,t,s,l,i,o)):0!==c[1]&&(o=QI(d,t,c,l,i,o)),l=0):!l||"data"!==p.type&&"tableDelimiterMarker"!==p.type&&"tableDelimiterFiller"!==p.type||(c[3]=i)}for(0!==A&&RI(d,t,A,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=MI(t.events,i))}return e}function QI(e,t,n,r,o,i){const a=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(i.end=Object.assign({},NI(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=NI(t.events,n[1]);if(i={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",i,t]]),0!==n[2]){const o=NI(t.events,n[2]),i=NI(t.events,n[3]),a={type:"tableContent",start:Object.assign({},o),end:Object.assign({},i)};if(e.add(n[2],0,[["enter",a,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",a,t]])}return void 0!==o&&(i.end=Object.assign({},NI(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function RI(e,t,n,r,o){const i=[],a=NI(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function NI(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const FI={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 nP(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"),a):n(t)}function a(r){return tP(r)?t(r):rP(r)?e.check({tokenize:zI},t,n)(r):n(r)}}};function zI(e,t,n){return sP(e,function(e){return null===e?n(e):t(e)},"whitespace")}const _I={};function jI(e){const t=e||_I,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return UC([{text:gI},{document:{91:{name:"gfmFootnoteDefinition",tokenize:PI,continuation:{tokenize:DI},exit:BI}},text:{91:{name:"gfmFootnoteCall",tokenize:CI},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:SI,resolveTo:EI}}},TI(e),{flow:{null:{name:"table",tokenize:LI,resolveAll:OI}}},{text:{91:FI}}])}(t)),o.push([{transforms:[lT],enter:{literalAutolink:tT,literalAutolinkEmail:nT,literalAutolinkHttp:nT,literalAutolinkWww:nT},exit:{literalAutolink:aT,literalAutolinkEmail:iT,literalAutolinkHttp:rT,literalAutolinkWww:oT}},{enter:{gfmFootnoteCallString:AT,gfmFootnoteCall:dT,gfmFootnoteDefinitionLabelString:fT,gfmFootnoteDefinition:pT},exit:{gfmFootnoteCallString:hT,gfmFootnoteCall:gT,gfmFootnoteDefinitionLabelString:mT,gfmFootnoteDefinition:vT}},{canContainEols:["delete"],enter:{strikethrough:ST},exit:{strikethrough:ET}},{enter:{table:JT,tableData:tI,tableHeader:tI,tableRow:ZT},exit:{codeText:nI,table:$T,tableData:eI,tableHeader:eI,tableRow:eI}},{exit:{taskListCheckValueChecked:iI,taskListCheckValueUnchecked:iI,paragraph:aI}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ZB,notInConstruct:eT},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ZB,notInConstruct:eT},{character:":",before:"[ps]",after:"\\/",inConstruct:ZB,notInConstruct:eT}]},bT(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:kT}],handlers:{delete:CT}},oI(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:lI}}]}}(t))}const HI="rgba(0, 0, 0, 0.3)",UI={p:({children:e})=>j.createElement("p",{style:{margin:0,marginBottom:"0.5em",lineHeight:1.4,textAlign:"left"}},e),ul:({children:e})=>j.createElement("ul",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"}},e),ol:({children:e})=>j.createElement("ol",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"}},e),li:({children:e})=>j.createElement("li",{style:{marginBottom:"1px",lineHeight:1.4}},e),code:({className:e,children:t})=>/\blanguage-/.test(e||"")?j.createElement("pre",{style:{backgroundColor:HI,padding:"8px",borderRadius:"4px",overflowX:"auto",margin:"0.5em 0",whiteSpace:"pre-wrap"}},j.createElement("code",null,t)):j.createElement("code",{style:{backgroundColor:HI,padding:"2px 4px",borderRadius:"4px",fontFamily:"inherit",fontSize:"0.95em"}},t),blockquote:({children:e})=>j.createElement("blockquote",{style:{margin:0,paddingLeft:"10px",borderLeft:"2px solid rgba(255, 255, 255, 0.4)",color:"inherit",fontStyle:"italic"}},e),a:({children:e,href:t})=>j.createElement("a",{href:t,target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"underline",fontWeight:600}},e),table:({children:e})=>j.createElement("table",{style:{borderCollapse:"collapse",width:"100%",margin:"0.5em 0",fontSize:"0.95em",color:"#fff"}},e),th:({children:e})=>j.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"}},e),td:({children:e})=>j.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"}},e)},qI=({children:e})=>j.createElement("div",{style:{whiteSpace:"normal"}},j.createElement(YB,{remarkPlugins:[jI],components:UI},"string"==typeof e?e:"")),VI=_.forwardRef(({embedded:e,currentOpen:t,enabled:n,onSetEnabled:r},o)=>{const i=Ty(),a=(()=>{const{isChatWindowOpen:e,toggleChatWindow:t,toggleIsBotTyping:n,scrollToBottom:r,getIsChatBotVisible:o}=Om();return{isChatWindowOpen:e,toggleChatWindow:t,toggleIsBotTyping:n,scrollToBottom:r,getIsChatBotVisible:o}})(),l=_.useRef(!1),s=_.useRef(!1);return _.useEffect(()=>{!e&&a&&a.toggleChatWindow&&(l.current===t||s.current||(setTimeout(()=>{a&&a.toggleChatWindow&&a.toggleChatWindow(t)},0),l.current=null!=t&&t),s.current=!1)},[t,e,a]),_.useEffect(()=>{const e=()=>{s.current=!0};return window.addEventListener("rcb-toggle-chat-window",e),()=>window.removeEventListener("rcb-toggle-chat-window",e)}),_.useImperativeHandle(o,()=>({addMessage:e=>{i&&i.injectMessage&&i.injectMessage(e)},openChat:()=>{!e&&a&&a.toggleChatWindow&&a.toggleChatWindow(!0)},closeChat:()=>{!e&&a&&a.toggleChatWindow&&a.toggleChatWindow(!1)},toggleChat:()=>{!e&&a&&a.toggleChatWindow&&a.toggleChatWindow()},setBotEnabled:e=>{r&&r(e)}}),[i,a,e,r]),null});VI.displayName="BotController";const WI=_.createContext(null),YI=({trackEvent:e,children:t})=>{const n=_.useRef(e);return n.current=e,j.createElement(WI.Provider,{value:{trackEvent:e=>n.current(e)}},t)},GI=()=>{const e=_.useContext(WI);return e||{trackEvent:()=>{}}},XI=({loginUrl:e,className:t="",style:n,isHeaderButton:r=!1})=>{const{trackEvent:o}=GI(),i=r?{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 j.createElement(j.Fragment,null,r&&j.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 "),j.createElement("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:`qa-bot-login-button ${r?"qa-bot-header-login-button":""} ${t}`,style:Object.assign(Object.assign({},i),n),onClick:()=>{o({type:"chatbot_login_clicked",loginUrl:e})}},"Log In"))},KI=()=>j.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"},j.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"},j.createElement("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),j.createElement("circle",{cx:"12",cy:"7",r:"4"}))),JI=[];for(let e=0;e<256;++e)JI.push((e+256).toString(16).slice(1));let $I;const ZI=new Uint8Array(16);var eM={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function tM(e,t,n){if(eM.randomUUID&&!e)return eM.randomUUID();const r=(e=e||{}).random??e.rng?.()??function(){if(!$I){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");$I=crypto.getRandomValues.bind(crypto)}return $I(ZI)}();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(JI[e[t+0]]+JI[e[t+1]]+JI[e[t+2]]+JI[e[t+3]]+"-"+JI[e[t+4]]+JI[e[t+5]]+"-"+JI[e[t+6]]+JI[e[t+7]]+"-"+JI[e[t+8]]+JI[e[t+9]]+"-"+JI[e[t+10]]+JI[e[t+11]]+JI[e[t+12]]+JI[e[t+13]]+JI[e[t+14]]+JI[e[t+15]]).toLowerCase()}(r)}function nM(){return"undefined"!=typeof localStorage&&"true"===localStorage.getItem("QA_BOT_DEBUG")}const rM="background: #1a5b6e; color: white; padding: 2px 6px; border-radius: 3px;",oM="background: #7c3aed; color: white; padding: 2px 6px; border-radius: 3px;",iM="background: #059669; color: white; padding: 2px 6px; border-radius: 3px;",aM="background: #f97316; color: white; padding: 2px 6px; border-radius: 3px;",lM="background: #f59e0b; color: #000; padding: 2px 6px; border-radius: 3px 0 0 3px; font-weight: bold;",sM="background: #fbbf24; color: #000; padding: 2px 6px; border-radius: 0 3px 3px 0;",cM=()=>{nM()&&console.log("%c QA Bot Core %c v0.4.0 ",lM,sM)},uM=(e,...t)=>{nM()&&console.log(`%c[Session]%c ${e}`,rM,"",...t)},AM=(e,...t)=>{nM()&&console.log(`%c[History]%c ${e}`,oM,"",...t)},dM=(e,t)=>{nM()&&console.log(`%c[Message]%c ${e}`,iM,"",t)},fM=(e,...t)=>{nM()&&console.log(`%c[Turnstile]%c ${e}`,aM,"",...t)},pM=(...e)=>{console.warn(...e)},hM=(...e)=>{console.error(...e)},gM="qa_bot_session_messages",mM=()=>`qa_bot_session_${tM()}`,vM=()=>{try{const e=localStorage.getItem(gM);return e?JSON.parse(e):{}}catch(e){return{}}},yM=(e,t,n,r,o)=>{const i=vM();!i[e]&&(i[e]={messages:[],startedAt:(new Date).toISOString(),preview:""},AM("NEW session created",{sessionId:e.slice(-12)}));const a=i[e].messages.some(e=>e.id===t);if(a)return void AM("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),AM("MESSAGE added",{sessionId:e.slice(-12),messageId:t.slice(-8),sender:r,totalInSession:i[e].messages.length});const s=i[e].messages,c=s.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(c){const t=c.content;i[e].preview=t.slice(0,50)+(t.length>50?"...":"")}else{const t=s.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])=>new Date(e.startedAt).getTime()-new Date(t.startedAt).getTime())[0])||void 0===t?void 0:t[0];if(!n)break;delete e[n]}localStorage.setItem(gM,JSON.stringify(e))})(i),AM("STORAGE state",{ourSessions:Object.keys(i).length,ourTotalMessages:Object.values(i).reduce((e,t)=>e+t.messages.length,0)})},bM=e=>{var t,n;return null!==(n=null===(t=vM()[e])||void 0===t?void 0:t.messages.length)&&void 0!==n?n:0},wM=e=>{const t=vM()[e];return(null==t?void 0:t.startedAt)?Date.now()-new Date(t.startedAt).getTime():0},xM=_.createContext(void 0),kM=({children:e,getSessionId:t,setSessionId:n,resetSession:r,clearResettingFlag:o})=>j.createElement(xM.Provider,{value:{getSessionId:t,setSessionId:n,resetSession:r,clearResettingFlag:o}},e),SM=()=>{const e=_.useContext(xM);if(!e)throw new Error("useSession must be used within a SessionProvider");return e},EM=()=>{const[e,t]=_.useState(!1),[n,r]=_.useState([]),[o,i]=_.useState(null),[a,l]=_.useState(0),s=_.useRef(null),c=_.useRef(null),{replaceMessages:u}=Ty(),{toggleTextAreaDisabled:A}=Ly(),{setSessionId:d,getSessionId:f}=SM();_.useEffect(()=>{var n,r;const o=e=>{s.current&&!s.current.contains(e.target)&&c.current&&!c.current.contains(e.target)&&t(!1)},i=null!==(r=null===(n=s.current)||void 0===n?void 0:n.getRootNode())&&void 0!==r?r:document;return e&&i.addEventListener("mousedown",o),()=>{i.removeEventListener("mousedown",o)}},[e]);const p=e=>{var n;const r=f();if(AM("RESTORE requested",{targetSession:e.slice(-12),currentSession:null==r?void 0:r.slice(-12)}),e===r)return AM("RESTORE skipped - already on this session"),void t(!1);const o=(e=>{var t;return(null===(t=vM()[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()});AM("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()}));d(e),AM("Session ID updated",{newSession:e.slice(-12)}),u(i),AM("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("<a href=")&&(n=n.replace(/<a\s+href=["']([^"']+)["'][^&]*>([^&]+)<\/a>/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),r=!0),(n.includes("<a ")||(null===(t=e.textContent)||void 0===t?void 0:t.includes("<a href=")))&&(e.textContent||"").includes("<a href=")&&(n=n.replace(/<a\s+href="([^"]+)"[^&]*>([^&]+)<\/a>/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),r=!0),r&&(e.innerHTML=n)})},50)})(null===(n=c.current)||void 0===n?void 0:n.getRootNode()),A(!1),AM("Chat input enabled after restore"),t(!1)};return j.createElement("div",{style:{position:"relative"}},j.createElement("button",{ref:c,className:"history-button",onClick:()=>{if(!e&&(r((()=>{const e=vM();return Object.entries(e).map(([e,t])=>Object.assign({sessionId:e},t)).sort((e,t)=>new Date(t.startedAt).getTime()-new Date(e.startedAt).getTime())})()),c.current)){const e=c.current.closest(".rcb-chat-window");if(e){const t=e.getBoundingClientRect(),n=c.current.getBoundingClientRect();i(t.width+3),l(t.right-n.right-18+4)}}t(!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"},j.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"},j.createElement("circle",{cx:"12",cy:"12",r:"10"}),j.createElement("polyline",{points:"12 6 12 12 16 14"}))),e&&j.createElement("div",{ref:s,role:"menu",style:{position:"absolute",right:a?`-${a}px`:"-18px",top:"100%",marginTop:"8px",width:o?`${o}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===n.length?j.createElement("div",{style:{padding:"12px 16px",color:"#666",fontSize:"14px",textAlign:"center"}},"No chat history"):n.map(e=>j.createElement("button",{key:e.sessionId,role:"menuitem",onClick:()=>p(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"}},j.createElement("span",{style:{fontSize:"14px",color:"#333",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},e.preview||"New conversation"),j.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))))))},CM=n=>{var{width:r=24,height:o=24,color:i="currentColor",children:a}=n,l=t(n,["width","height","color","children"]);return j.createElement("svg",e({xmlns:"http://www.w3.org/2000/svg",width:r,height:o,viewBox:"0 0 24 24",fill:"none",stroke:i,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},l),a)},PM=e=>j.createElement(CM,e,j.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"})),DM=()=>{const{restartFlow:e}=By(),{setTextAreaValue:t}=Ly(),{getSessionId:n,resetSession:r,clearResettingFlag:o}=SM(),{trackEvent:i}=GI();return j.createElement("button",{onClick:async()=>{const a=n(),l=a?bM(a):0;i({type:"chatbot_new_chat",previousMessageCount:l}),r(),await t(""),await e(),setTimeout(()=>{o()},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)"}},j.createElement(PM,{width:16,height:16}),"New Chat")};function BM(e){if("string"==typeof e)return e;if("number"==typeof e)return String(e);if(!e)return"";if(Array.isArray(e))return e.map(BM).join("");if("object"==typeof e&&null!==e&&"props"in e){const t=e.props;if(t&&"children"in t)return BM(t.children)}return""}const TM=()=>{const{getSessionId:e}=SM(),t=_.useCallback(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 a;if(a="string"==typeof r.content?r.content:BM(r.content),dM("TRACKED",{id:r.id,sender:o,content:a.substring(0,50)+(a.length>50?"...":"")}),a.includes("rcb-options-container"))return;if(!a.trim())return;const l=e();yM(l,r.id,a,o,i)},[e]);return _.useEffect(()=>(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},IM=()=>(_.useEffect(()=>{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 a=i.findIndex(e=>e===document.activeElement);switch(e.key){case"ArrowDown":case"ArrowRight":{let t;e.preventDefault(),t=a<i.length-1?a+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=a>0?a-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"),a=i&&i.style.backgroundColor?"checked":"unchecked";t(`${o} ${a}`)}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],a=Array.from(i.querySelectorAll(".rcb-options-container")).filter(e=>null!==e.offsetParent);let l=[];if(a.length>0){const e=a[a.length-1];l=Array.from(e.querySelectorAll(".rcb-options"))}if(0===l.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(l.length>0){if(l.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",l.length),0===t?e.classList.add("keyboard-focused"):e.classList.remove("keyboard-focused")}),l.length>1){const e=a.length>0?a[a.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=a.length>0?a[a.length-1]:null;if(e){e.querySelectorAll(".keyboard-nav-hint").forEach(e=>e.remove())}}setTimeout(()=>{l[0]&&null!==l[0].offsetParent&&!r&&(l[0].focus(),l.length>1&&t(`${l.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 MM=!1,LM=null;function OM(){return MM?Promise.resolve():LM||(LM=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=()=>{MM=!0,fM("Script loaded"),e()},n.onerror=()=>{LM=null,t(new Error("Failed to load Turnstile script"))},document.head.appendChild(n)}),LM)}const QM=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},RM=({siteKey:e,onVerify:t,onError:n,loginUrl:r})=>{const o=_.useRef(null),i=_.useRef(null),a=_.useRef(!1),l=_.useRef(null),s=_.useRef(null),[c,u]=_.useState(!1),[A,d]=_.useState(0),f=_.useRef("widget_error"),p=_.useRef(null),h=r&&"/login"!==r,g=_.useCallback(()=>{const e=window.turnstile;if(l.current&&(null==e?void 0:e.remove)){try{e.remove(l.current)}catch(e){}l.current=null}},[]),m=_.useCallback(()=>{var e;g(),c?null==n||n(f.current,null!==(e=p.current)&&void 0!==e?e:void 0):null==n||n("user_cancelled")},[n,g,c]);_.useEffect(()=>()=>{g()},[g]),_.useEffect(()=>{var e;return s.current=document.activeElement,null===(e=i.current)||void 0===e||e.focus(),()=>{s.current&&"function"==typeof s.current.focus&&s.current.focus()}},[]),_.useEffect(()=>{const e=e=>{if("Escape"===e.key)return e.preventDefault(),void m();if("Tab"===e.key&&i.current){const t=i.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)},[m]),_.useEffect(()=>{a.current||!o.current||c||(a.current=!0,OM().then(()=>{const n=window.turnstile;if(!n||!o.current)return hM("Turnstile API not available after script load"),f.current="api_unavailable",void u(!0);l.current=n.render(o.current,{sitekey:e,callback:e=>{fM("Visible challenge completed"),t(e)},"error-callback":e=>(hM("Turnstile challenge failed:",e),p.current=e,f.current="widget_error",g(),u(!0),!0),"expired-callback":()=>{hM("Turnstile token expired"),f.current="token_expired",g(),u(!0)}})}).catch(e=>{hM("Failed to load Turnstile script:",e),f.current="script_load_failed",u(!0)}))},[e,t,c,g]);const v=j.createElement(j.Fragment,null,j.createElement("div",{"aria-hidden":"true",style:{position:"fixed",inset:0,background:"rgba(0, 0, 0, 0.5)",zIndex:999998}}),j.createElement("div",{ref:i,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'}},j.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"),c?j.createElement("div",{style:{fontSize:"14px",lineHeight:"1.5",color:"#333"}},0===A?j.createElement("p",{style:{margin:"0 0 16px 0"}},"Verification failed. You can try again",h&&j.createElement(j.Fragment,null,", or"," ",j.createElement("a",{href:r,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--primaryColor, #107180)",fontWeight:"bold"}},"log in")," ","to skip verification"),"."):j.createElement(j.Fragment,null,j.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."),j.createElement("p",{style:{margin:"0 0 16px 0"}},"Try disabling extensions, using a private/incognito window,",h&&j.createElement(j.Fragment,null," ",j.createElement("a",{href:r,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--primaryColor, #107180)",fontWeight:"bold"}},"logging in"),",")," ","or using a different browser.")),j.createElement("div",{style:{display:"flex",gap:"8px"}},j.createElement("button",{type:"button",onClick:()=>{g(),a.current=!1,d(e=>e+1),u(!1)},style:{padding:"8px 16px",background:"var(--primaryColor, #107180)",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Try again"),j.createElement("button",{type:"button",onClick:m,style:{padding:"8px 16px",background:"#f0f0f0",color:"#333",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Close"))):j.createElement(j.Fragment,null,j.createElement("div",{ref:o,style:{borderRadius:"8px",overflow:"hidden"}}),j.createElement("button",{type:"button",onClick:m,style:{marginTop:"16px",padding:"8px 16px",background:"#f0f0f0",color:"#333",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Cancel"))));return Xu.createPortal(v,document.body)};function NM(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 FM({getState:e,onResubmit:t,trackEvent:n,loginUrl:r}){var o;const[i,a]=j.useState(null),[l,s]=j.useState(0),c=e(),u={},A="true"===u.VITE_FORCE_TURNSTILE_WIDGET,d=null!==(o=c.siteKey)&&void 0!==o?o:A?u.VITE_TURNSTILE_SITE_KEY:null;return d&&(A||i!==d)?j.createElement(RM,{key:l,siteKey:d,loginUrl:r,onVerify:async e=>{const r=d;c.token=e,null==n||n({type:"chatbot_turnstile_completed"});"needs_another_challenge"===await t(e)?s(e=>e+1):a(r)},onError:(e,t)=>{var r;const o=null===(r=c.pendingQuery)||void 0===r?void 0:r.queryId,i=d;c.token=null,c.pendingQuery=null,c.needsChallenge=!1,c.siteKey=null,a(i),null==n||n({type:"chatbot_turnstile_error",queryId:o,failureReason:e,cloudflareErrorCode:t})}}):null}const zM="#1a5b6e",_M="#107180",jM="Arial, sans-serif",HM="Q&A Bot",UM="/chat-icon.svg",qM="Type your question here...",VM="Select an option to continue",WM=!1,YM="Ask me a question!",GM="/login",XM={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}},KM=_.forwardRef((e,t)=>{var n,r,o;const{apiKey:i,qaEndpoint:a,ratingEndpoint:l,agentRatingEndpoint:s,welcomeMessage:c,open:u,onOpenChange:A,isLoggedIn:d,allowAnonAccess:f=!1,actingUser:p,primaryColor:h,secondaryColor:g,botName:m,logo:v,placeholder:y,errorMessage:b,embedded:w,footerText:x,footerLink:k,tooltipText:S,loginUrl:E,turnstileSiteKey:C,backendId:P,resourceContext:D,customFlow:B,onAnalyticsEvent:T}=e,I=_.useRef(`bot_${Math.random().toString(36).substr(2,9)}`);_.useEffect(()=>{cM()},[]);const M=_.useRef(null);null===M.current&&(M.current=mM(),uM("CREATED",M.current));const L=_.useRef(!1),O=_.useRef({getSessionId:()=>M.current,isResetting:()=>L.current}),Q=_.useRef(null),R=function(e,t){const[n,r]=_.useState(null),[o,i]=_.useState("idle"),a=_.useRef(null),l=_.useRef(null),s=_.useRef(!0),c=_.useCallback(()=>{const e=window.turnstile;if(l.current&&(null==e?void 0:e.remove)){try{e.remove(l.current)}catch(e){}l.current=null}a.current&&(a.current.remove(),a.current=null)},[]);return _.useEffect(()=>{if(s.current=!0,!e)return i("idle"),void r(null);i("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),a.current=n,OM().then(()=>{if(!s.current)return;const n=window.turnstile;if(!n||!a.current)return hM("Turnstile API not available for silent verification"),i("failed"),void(null==t||t({type:"chatbot_turnstile_silent_failed",failureReason:"api_unavailable"}));const o=n.render(a.current,{sitekey:e,execution:"render","refresh-expired":"auto",callback:e=>{s.current&&(fM("Silent verification succeeded"),r(e),i("verified"))},"error-callback":e=>!s.current||(hM("Turnstile silent verification failed:",e),r(null),i("failed"),null==t||t({type:"chatbot_turnstile_silent_failed",failureReason:"widget_error",cloudflareErrorCode:e}),!0),"expired-callback":()=>{s.current&&(fM("Token expired, awaiting refresh"),r(null),i("loading"))}});l.current=o}).catch(e=>{s.current&&(hM("Failed to load Turnstile script for silent verification:",e),i("failed"),null==t||t({type:"chatbot_turnstile_silent_failed",failureReason:"script_load_failed"}))}),()=>{s.current=!1,c()}},[e,c]),{token:n,status:o,reset:_.useCallback(()=>{const e=window.turnstile;l.current&&(null==e?void 0:e.reset)&&(r(null),i("loading"),e.reset(l.current),fM("Token consumed, resetting widget for fresh token"))},[])}}(C,e=>{var t;null===(t=Q.current)||void 0===t||t.call(Q,e)}),N=_.useRef(null);N.current=R.token;const[F,z]=_.useState(d);_.useEffect(()=>{z(d)},[d]);const H=void 0!==w?w:WM,U=_.useCallback(e=>{var t;T&&T(Object.assign(Object.assign({},e),{timestamp:Date.now(),sessionId:null!==(t=M.current)&&void 0!==t?t:void 0,pageUrl:"undefined"!=typeof window?window.location.href:void 0,isEmbedded:H}))},[T,H]);_.useEffect(()=>{Q.current=e=>U(e)},[U]);const q=_.useMemo(()=>{const e=Object.assign({},XM);e.general=Object.assign(Object.assign({},e.general),{primaryColor:h||zM,secondaryColor:g||_M,fontFamily:jM,embedded:H});const t=!1===F?[j.createElement(EM,{key:"history-button"}),j.createElement(XI,{key:"login-button",loginUrl:E||GM,isHeaderButton:!0})]:[j.createElement(EM,{key:"history-button"}),j.createElement(KI,{key:"user-icon"})];e.header={title:j.createElement("span",{style:{fontSize:14,fontWeight:500}},m||HM),showAvatar:!0,avatar:v||UM,buttons:[...t,$g.CLOSE_CHAT_BUTTON]},e.chatInput=Object.assign(Object.assign({},e.chatInput),{disabled:!1,enabledPlaceholderText:y||qM,disabledPlaceholderText:b||VM}),e.tooltip=Object.assign(Object.assign({},e.tooltip),{text:S||YM});const n=x?k?j.createElement("a",{href:k,target:"_blank",rel:"noopener noreferrer",key:"footer-link"},x):j.createElement("span",{key:"footer-text"},x):null;return e.footer={text:null!=n?n:void 0,buttons:[j.createElement(DM,{key:"new-chat-button"})]},e.chatWindow=Object.assign(Object.assign({},e.chatWindow),{defaultOpen:!!H}),e.event={rcbPreInjectMessage:!0,rcbPostInjectMessage:!0,rcbStopStreamMessage:!0,rcbUserSubmitText:!0,rcbChangePath:!0,rcbToggleChatWindow:!0},e},[h,g,m,v,y,b,H,S,F,E,x,k]),V=_.useRef(null),W=((e,t={})=>{const n=_.useMemo(()=>{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})(V,q.general);((e,t)=>{_.useEffect(()=>{t.current&&(e?t.current.classList.add("bot-logged-in"):t.current.classList.remove("bot-logged-in"))},[e,t])})(!1!==F,V),(({settings:e,themeColors:t})=>{_.useEffect(()=>{t&&(Object.entries(t).forEach(([e,t])=>{t&&document.documentElement.style.setProperty(`--${e}`,t)}),t.primaryColor&&document.documentElement.style.setProperty("--rcb-header-background",t.primaryColor),t.secondaryColor&&document.documentElement.style.setProperty("--rcb-header-background-hover",t.secondaryColor))},[t]),_.useEffect(()=>{var t,n;(null===(t=e.header)||void 0===t?void 0:t.title)&&"string"==typeof e.header.title&&(e.header.title=j.createElement("div",{key:"header-title"},j.createElement("h1",{className:"sr-only"},e.header.title),j.createElement("span",{"aria-hidden":"true"},e.header.title))),e.device={desktopEnabled:!0,mobileEnabled:!0,applyMobileOptimizations:!1},e.chatHistory={disabled:!0},e.chatButton=Object.assign(Object.assign({},e.chatButton),{icon:null===(n=e.header)||void 0===n?void 0:n.avatar}),e.event=Object.assign(Object.assign({},e.event),{rcbToggleChatWindow:!0})},[e])})({settings:q,themeColors:W});const Y=_.useMemo(()=>{const e=(({endpoint:e,ratingEndpoint:t,agentRatingEndpoint:n,apiKey:r,sessionId:o,isResetting:i=()=>!1,isLoggedIn:a,allowAnonAccess:l=!1,loginUrl:s="/login",actingUser:c,trackEvent:u,getTurnstileToken:A,resetTurnstileToken:d,backendId:f,resourceContext:p})=>{if(!1===a&&!l)return null==u||u({type:"chatbot_login_prompt_shown"}),{qa_loop:{message:"To ask questions, please log in first.",component:j.createElement(XI,{loginUrl:s}),chatDisabled:!0,path:"qa_loop"}};let h=null,g=null,m=!1;const v={siteKey:null,token:null,pendingQuery:null,needsChallenge:!1};let y=null;if(!e)throw new Error("Q&A endpoint is required");return{qa_loop:{message:async a=>{var l;y=a.injectMessage.bind(a);const{userInput:s}=a;if((!i||!i())&&s&&""!==s.trim()){if("👍 Helpful"===s||"👎 Not helpful"===s){if(h){const e="👍 Helpful"===s,i="agent"===g?n:t;if(i)try{const t={"Content-Type":"application/json"};r&&(t["X-API-KEY"]=r);const n=o();n&&(t["X-Session-ID"]=n,t["X-Query-ID"]=h);const a="agent"===g?{query_id:h,rating:e?"helpful":"not_helpful",session_id:n}:{sessionId:n,queryId:h,rating:e?1:0};await fetch(i,{method:"POST",headers:t,credentials:"include",body:JSON.stringify(a)}),null==u||u({type:"chatbot_rating_sent",queryId:h,rating:e?"helpful":"not_helpful"})}catch(e){hM("Error sending feedback:",e)}}return"Thanks for the feedback!"}try{const t=tM();h=t,null==u||u({type:"chatbot_question_sent",queryId:t,questionLength:s.length});const n={"Content-Type":"application/json"};r&&(n["X-API-KEY"]=r);const i=o();i&&(n["X-Session-ID"]=i,n["X-Query-ID"]=t),n["X-Origin"]=p||"access";const c={query:s,question_id:t};i&&(c.session_id=i),f&&(c._backend=f),p&&(c.rp_name=p,c.resource_context=p);const y=null==A?void 0:A();y&&(c.turnstile_token=y),uM("SENT to API",{session_id:i,question_id:t});const b=Date.now(),w=await fetch(e,{method:"POST",headers:n,credentials:"include",body:JSON.stringify(c)});if(!w.ok)throw new Error(`API returned ${w.status}`);if((w.headers.get("content-type")||"").includes("text/event-stream")){null==d||d();const e=null===(l=w.body)||void 0===l?void 0:l.getReader();if(!e)throw new Error("Response body is not readable");const n=new TextDecoder;let r="",o="",i=!1;try{for(;;){const{done:t,value:l}=await e.read();if(t)break;r+=n.decode(l,{stream:!0});let s=r.indexOf("\n\n");for(;-1!==s;){const e=r.slice(0,s);r=r.slice(s+2);let t,n="",l="";for(const t of e.split("\n"))t.startsWith("event: ")?n=t.slice(7):t.startsWith("data: ")&&(l=t.slice(6));if(n&&l){try{t=JSON.parse(l)}catch(e){pM("Failed to parse SSE data:",l),s=r.indexOf("\n\n");continue}if("status"===n){const e=t.message||"Processing...";await a.streamMessage(`_${e}_`,"BOT"),i=!0}else if("token"===n){o+=t.content||"";const e=QM(o);await a.streamMessage(e,"BOT")}else if("done"===n){const e=t.metadata||{};if(g=e.rating_target||null,m=!0===e.is_final_response,o)await a.endStreamMessage("BOT");else{const e=t.response||"";if(e){const t=QM(e);await a.streamMessage(t,"BOT"),i=!0}i&&await a.endStreamMessage("BOT")}}else if("error"===n){const e=t.message||"An error occurred";hM("SSE error event:",e),i?(await a.streamMessage(e,"BOT"),await a.endStreamMessage("BOT")):await a.injectMessage(e)}s=r.indexOf("\n\n")}else s=r.indexOf("\n\n")}}i&&await a.endStreamMessage("BOT")}catch(e){if(hM("Error reading SSE stream:",e),!i)throw e;await a.streamMessage("I had trouble completing the response. Please try again.","BOT"),await a.endStreamMessage("BOT")}const s=Date.now()-b;return void(null==u||u({type:"chatbot_answer_received",queryId:t,responseTimeMs:s,success:!0,responseLength:o.length}))}const x=Date.now()-b,k=await w.json();if(k.requires_turnstile)return null==u||u({type:"chatbot_turnstile_shown",queryId:t}),v.siteKey=k.site_key,v.pendingQuery={query:s,sessionId:i,queryId:t},v.needsChallenge=!0,"One moment — verifying your session…";null==d||d();const S=k.response||k.answer||k.text||k.message;if(!S)throw new Error("Invalid response format from API");const E=k.metadata||{};g=E.rating_target||null,m=!0===E.is_final_response;const C=QM(S),P=nM()?NM(k):"",D=P?`${C}\n\n${P}`:C;return await a.injectMessage(D),void(null==u||u({type:"chatbot_answer_received",queryId:t,responseTimeMs:x,success:!0,responseLength:S.length,hasMetadata:!!P}))}catch(e){return hM("Error in Q&A flow:",e),null==u||u({type:"chatbot_answer_error",queryId:null!=h?h: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=>i&&i()||"👍 Helpful"===e.userInput||"👎 Not helpful"===e.userInput||v.needsChallenge?[]:m&&g&&("agent"===g?n:t)?["👍 Helpful","👎 Not helpful"]:[],renderMarkdown:["BOT"],chatDisabled:!1,component:j.createElement(FM,{getState:()=>v,onResubmit:async t=>{var n;if(!v.pendingQuery||!y)return hM("Turnstile resubmit called without pending query or injectMessage"),"error";try{const o={"Content-Type":"application/json"};r&&(o["X-API-KEY"]=r),v.pendingQuery.sessionId&&(o["X-Session-ID"]=v.pendingQuery.sessionId,o["X-Query-ID"]=v.pendingQuery.queryId),o["X-Origin"]=p||"access";const i={query:v.pendingQuery.query,question_id:v.pendingQuery.queryId,turnstile_token:t};v.pendingQuery.sessionId&&(i.session_id=v.pendingQuery.sessionId),f&&(i._backend=f),p&&(i.rp_name=p,i.resource_context=p);const a=await fetch(e,{method:"POST",headers:o,credentials:"include",body:JSON.stringify(i)}),l=v.pendingQuery.queryId;if(!a.ok)throw new Error(`API returned ${a.status} after Turnstile`);if((a.headers.get("content-type")||"").includes("text/event-stream")){const e=null===(n=a.body)||void 0===n?void 0:n.getReader();if(!e)throw new Error("Response body is not readable");const t=new TextDecoder;let r="",o="",i={};for(;;){const{done:n,value:a}=await e.read();if(n)break;r+=t.decode(a,{stream:!0});let l=r.indexOf("\n\n");for(;-1!==l;){const e=r.slice(0,l);r=r.slice(l+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){}l=r.indexOf("\n\n")}}if(v.token=null,v.pendingQuery=null,v.needsChallenge=!1,v.siteKey=null,!o)throw new Error("No content received from stream");g=i.rating_target||null,m=!0===i.is_final_response,h=l;const s=QM(o);return await y(s),null==u||u({type:"chatbot_answer_received",queryId:l,success:!0,responseLength:o.length}),"success"}const s=await a.json();if(s.requires_turnstile)return v.siteKey=s.site_key,v.token=null,await y("Still verifying — please complete the challenge again."),"needs_another_challenge";v.token=null,v.pendingQuery=null,v.needsChallenge=!1,v.siteKey=null;const c=s.response||s.answer||s.text||s.message;if(!c)throw new Error("Invalid response format from API");const A=s.metadata||{};g=A.rating_target||null,m=!0===A.is_final_response,h=l;const d=QM(c),b=nM()?NM(s):"",w=b?`${d}\n\n${b}`:d;return await y(w),null==u||u({type:"chatbot_answer_received",queryId:l,success:!0,responseLength:c.length}),"success"}catch(e){return hM("Error resubmitting after Turnstile:",e),v.token=null,v.pendingQuery=null,v.needsChallenge=!1,v.siteKey=null,await(null==y?void 0:y("I had trouble processing your question after verification. Please try again.")),"error"}},trackEvent:u,loginUrl:s}),path:"qa_loop"}}})({endpoint:a,ratingEndpoint:l,agentRatingEndpoint:s,apiKey:i,sessionId:O.current.getSessionId,isResetting:O.current.isResetting,isLoggedIn:F,allowAnonAccess:f,loginUrl:E||GM,actingUser:p,trackEvent:U,getTurnstileToken:()=>N.current,resetTurnstileToken:()=>R.reset(),backendId:P,resourceContext:D}),t={message:c,renderMarkdown:["BOT"],transition:{duration:0},path:"qa_loop"};return Object.assign(Object.assign({start:t},e),B||{})},[i,a,l,s,c,F,f,E,B,p,U,D,P]),G=_.useMemo(()=>[Ab(),VS({markdownComponent:qI}),XS()],[]);return _.useEffect(()=>{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)},[]),IM(),_.useEffect(()=>{const e=V.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")||U({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)},[U]),_.useEffect(()=>{if(!H){const e=e=>{const t=e.data.newState;null==A||A(t);const n=M.current;U(t?{type:"chatbot_open"}:{type:"chatbot_close",messageCount:n?bM(n):0,durationMs:n?wM(n):0})};return window.addEventListener("rcb-toggle-chat-window",e),()=>{window.removeEventListener("rcb-toggle-chat-window",e)}}},[H,A,U]),j.createElement("div",{className:"qa-bot "+((null===(n=q.general)||void 0===n?void 0:n.embedded)?"embedded-qa-bot":""),ref:V,role:"region","aria-label":`${m||HM}${(null===(r=q.general)||void 0===r?void 0:r.embedded)?" - Embedded":""}`},j.createElement(kM,{getSessionId:()=>M.current,setSessionId:e=>{const t=M.current;M.current=e,uM("RESTORED",`${null==t?void 0:t.slice(-12)} -> ${e.slice(-12)}`)},resetSession:()=>{const e=M.current;L.current=!0,M.current=mM(),uM("RESET",`${null==e?void 0:e.slice(-12)} -> ${M.current.slice(-12)}`)},clearResettingFlag:()=>{L.current=!1}},j.createElement(YI,{trackEvent:U},j.createElement(ky,null,j.createElement("div",null,j.createElement(TM,null),j.createElement(VI,{ref:t,embedded:(null===(o=q.general)||void 0===o?void 0:o.embedded)||!1,currentOpen:u||!1,enabled:!1!==F,onSetEnabled:e=>z(!!e&&void 0)}),j.createElement(Py,{key:`chatbot-${I.current}-${F}`,settings:q,flow:Y,plugins:G}),j.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}}),j.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."))))))});KM.displayName="QABot";Ju('.rcb-chat-window{height:800px!important;max-height:80vh!important;max-width:100%;width:550px!important}.rcb-chat-window .rcb-chat-header{align-items:center;display:flex;flex-direction:row;font-weight:700}.rcb-chat-window .rcb-chat-input-textarea{overflow-y:auto}.rcb-chat-window .rcb-chat-footer-container{font-size:10px}.qa-bot .user-login-icon{display:none!important}.qa-bot .history-button,.qa-bot.bot-logged-in .user-login-icon{display:flex!important;transform:scale(1.3) translateY(-2px)}.qa-bot .history-button:hover{opacity:.8}.qa-bot .history-button:focus{outline:2px solid #fff;outline-offset:2px}.embedded-qa-bot .rcb-chat-window{max-width:100%;width:100%!important}.qa-bot.hidden{display:none}.embedded-qa-bot .rcb-bot-message,.embedded-qa-bot .rcb-user-message{max-width:90%!important;word-break:break-word}.embedded-qa-bot .rcb-chat-input-textarea{width:100%!important}.qa-bot-container{max-width:100%;width:100%}.rcb-chat-tooltip>span:not(.rcb-chat-tooltip-tail){background-color:#107180;color:#fff}.rcb-chat-tooltip-tail{border-color:#0000 #0000 #0000 #1a5b6e}@keyframes phone-ring{0%{transform:translateX(0) translateY(0) rotate(0deg)}2%{transform:translateX(0) translateY(-8px) rotate(-2deg)}4%{transform:translateX(0) translateY(-6px) rotate(2deg)}6%{transform:translateX(0) translateY(-8px) rotate(-1deg)}8%{transform:translateX(0) translateY(-6px) rotate(1deg)}10%{transform:translateX(0) translateY(-8px) rotate(-2deg)}12%{transform:translateX(0) translateY(-6px) rotate(2deg)}20%{transform:translateX(0) translateY(0) rotate(0deg)}30%{transform:translateX(0) translateY(0) rotate(0deg)}40%{transform:translateX(0) translateY(0) rotate(0deg)}49%{transform:translateX(0) translateY(0) rotate(0deg)}50%{transform:translateX(0) translateY(-8px) rotate(-2deg)}52%{transform:translateX(0) translateY(-6px) rotate(2deg)}54%{transform:translateX(0) translateY(-8px) rotate(-1deg)}56%{transform:translateX(0) translateY(-6px) rotate(1deg)}58%{transform:translateX(0) translateY(-8px) rotate(-2deg)}60%{transform:translateX(0) translateY(-6px) rotate(2deg)}70%{transform:translateX(0) translateY(0) rotate(0deg)}to{transform:translateX(0) translateY(0) rotate(0deg)}}@media (max-width:768px){.rcb-chat-window{max-height:calc(100vh - 100px)!important;max-width:calc(100vw - 40px)!important;width:550px!important}.embedded-chat-container.open{height:400px}.embedded-chat-closed{font-size:14px;height:40px}.embedded-chat-open-btn{font-size:12px;padding:3px 10px}.rcb-bot-message,.rcb-user-message{max-width:85%!important}.rcb-chat-input-textarea{font-size:16px!important;min-height:44px!important}.rcb-chat-header{padding:12px 16px!important}.rcb-chat-tooltip,.rcb-chat-tooltip-tail{display:none!important}}@media (max-width:480px){.rcb-chat-window{bottom:10px!important;left:10px!important;max-height:calc(100vh - 80px)!important;max-width:calc(100vw - 20px)!important;right:10px!important;width:calc(100vw - 20px)!important}.embedded-chat-container.open{height:350px}.rcb-bot-message,.rcb-user-message{margin-bottom:8px!important;max-width:90%!important}.rcb-chat-header{font-size:14px!important;padding:8px 12px!important}.rcb-chat-button{bottom:20px!important;height:50px!important;right:20px!important;width:50px!important}.rcb-chat-footer-container{font-size:9px!important;padding:8px 12px!important}}@media (max-width:360px){.rcb-chat-window{left:5px!important;max-width:calc(100vw - 10px)!important;right:5px!important;width:calc(100vw - 10px)!important}.rcb-chat-header{font-size:13px!important;padding:6px 8px!important}}.rcb-checkbox-container{display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin-left:16px!important;max-width:100%!important;padding-top:12px!important}.rcb-checkbox-row-container{align-items:center!important;background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:var(--primaryColor,#107180)!important;cursor:pointer!important;display:flex!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;margin:0!important;max-height:auto!important;min-height:auto!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-checkbox-row-container:hover{background-color:#e8f4f8!important;border-color:var(--primaryColor,#107180)!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.rcb-checkbox-row-container[data-checked=true]{background-color:var(--primaryColor,#107180)!important;border-color:var(--primaryColor,#107180)!important;color:#fff!important}.rcb-checkbox-row{margin-left:0!important}.rcb-checkbox-mark{height:14px!important;margin-right:6px!important;width:14px!important}.rcb-checkbox-label{font-size:13px!important;margin:0!important;white-space:nowrap!important}.rcb-checkbox-next-button{align-items:center!important;background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:var(--secondaryColor,#107180)!important;cursor:pointer!important;display:flex!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;justify-content:center!important;line-height:24px!important;margin:0!important;max-height:auto!important;min-height:auto!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-checkbox-next-button:hover{background-color:#e8f4f8!important;border-color:var(--secondaryColor,#107180)!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.sr-only{clip:rect(0,0,0,0)!important;border:0!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}.rcb-chat-input-send-button:focus,.rcb-chat-input-textarea:focus{outline:2px solid var(--primaryColor,#107180)!important;outline-offset:2px!important}.rcb-bot-message h1,.rcb-bot-message h2,.rcb-bot-message h3,.rcb-bot-message h4,.rcb-bot-message h5,.rcb-bot-message h6{line-height:1.3!important;margin:.6em 0 .3em!important}.rcb-bot-message h1:first-child,.rcb-bot-message h2:first-child,.rcb-bot-message h3:first-child,.rcb-bot-message h4:first-child,.rcb-bot-message h5:first-child,.rcb-bot-message h6:first-child{margin-top:0!important}.rcb-bot-message ol,.rcb-bot-message ul{list-style-position:outside!important;margin:.5em 0!important;padding-left:1.5em!important}.rcb-bot-message li{margin-bottom:.25em!important}.rcb-bot-message li>p{display:inline!important;margin:0!important}.rcb-user-message{word-wrap:break-word!important;overflow:hidden!important;word-break:break-word!important}:focus-visible{outline:2px solid var(--primaryColor,#107180)!important;outline-offset:2px!important}.rcb-options-container{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;gap:8px!important;margin:16px!important;padding:0!important}.rcb-options{background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:var(--secondaryColor,#107180)!important;cursor:pointer!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;outline:none!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-options:hover{background-color:#e8f4f8!important;border-color:var(--secondaryColor,#107180)!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.rcb-bot-message-container:has(.rcb-options-container):has(~.rcb-bot-message-container .rcb-options-container) .rcb-options,.rcb-bot-message-container:has(.rcb-options-container):has(~.rcb-user-message-container) .rcb-options{cursor:default!important;opacity:.5!important;pointer-events:none!important}.rcb-checkbox-next-button.keyboard-focused,.rcb-checkbox-next-button:focus,.rcb-checkbox-next-button:focus-visible,.rcb-checkbox-row-container.keyboard-focused,.rcb-checkbox-row-container:focus,.rcb-checkbox-row-container:focus-visible,.rcb-options.keyboard-focused,.rcb-options:focus,.rcb-options:focus-visible{background-color:#e8f4f8!important;border-color:var(--secondaryColor,#107180)!important;outline:none!important}.rcb-options:active{background-color:var(--secondaryColor,#107180)!important;border-color:var(--secondaryColor,#107180)!important;color:#fff!important;transform:translateY(0)!important}.keyboard-nav-hint{color:#666!important;font-size:12px!important;font-style:italic!important;margin-bottom:8px!important}@media (prefers-reduced-motion:reduce){.keyboard-nav-hint{display:none!important}}.rcb-options-container [role=button][tabindex="0"],.rcb-options-container button[tabindex="0"]{position:relative!important}.rcb-options-container [role=button][tabindex="0"]:after,.rcb-options-container button[tabindex="0"]:after{color:var(--secondaryColor,#107180)!important;content:"←"!important;font-size:16px!important;opacity:0!important;position:absolute!important;right:12px!important;top:50%!important;transform:translateY(-50%)!important;transition:opacity .2s ease!important}.rcb-options-container [role=button][tabindex="0"]:focus:after,.rcb-options-container button[tabindex="0"]:focus:after{opacity:1!important}.rcb-chat-input-send-button{cursor:pointer!important;opacity:1!important;pointer-events:auto!important;visibility:visible!important}.rcb-chat-input-send-button:not([tabindex]){-webkit-user-select:none;-moz-user-select:none;user-select:none}.rcb-chat-input-container [onclick],.rcb-chat-input-container [role=button],.rcb-chat-input-container div[style*=cursor],.rcb-chat-input-container svg:last-child,.rcb-chat-input-container>div:last-child{tabindex:0!important;cursor:pointer!important}.rcb-chat-footer{margin-top:4px!important;padding-top:0!important}.rcb-chat-footer-container{align-items:center!important;display:flex!important;margin-top:4px!important;padding-top:4px!important}.rcb-chat-footer-container button{order:1!important}.rcb-chat-footer-container a[href*=qa-bot-core]{tab-index:0!important;order:2!important}.rcb-chat-footer-container a[href*=feedback]{tab-index:0!important;order:3!important}@media (prefers-contrast:high){.rcb-chat-window a{background-color:#fff!important;border:1px solid #000!important;color:#000!important}}@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}.rcb-chat-input-textarea{user-select:text!important}.rcb-chat-body-container,.rcb-chat-input-textarea,.rcb-chat-window{touch-action:pan-y!important}.embedded-qa-bot,.rcb-chat-window{-webkit-overflow-scrolling:touch!important}.embedded-qa-bot .rcb-chat-input-textarea{touch-action:pan-y!important;user-select:text!important}.embedded-qa-bot .rcb-chat-body-container,.embedded-qa-bot .rcb-chat-window{touch-action:pan-y!important}.rcb-chat-header-container{background:var(--primaryColor,#1a5b6e)!important;background:linear-gradient(135deg,var(--primaryColor,#1a5b6e) 0,var(--secondaryColor,#107180) 100%)!important}.rcb-toggle-button{align-items:center!important;background:var(--primaryColor,#1a5b6e)!important;display:flex!important;justify-content:center!important}.rcb-toggle-button svg{stroke:#fff!important;color:#fff!important}.rcb-toggle-button *,.rcb-toggle-button img,.rcb-toggle-button svg,.rcb-toggle-button>*{box-sizing:border-box!important;height:50px!important;left:0!important;margin:0 auto!important;max-height:50px!important;max-width:50px!important;min-height:50px!important;min-width:50px!important;padding:2px!important;position:relative!important;top:0!important;width:50px!important}.rcb-send-button{background-color:var(--primaryColor,#1a5b6e)!important}',{insertAt:"top"});const JM=j.forwardRef((n,r)=>{var{defaultOpen:o}=n,i=t(n,["defaultOpen"]);const[a,l]=j.useState(o||!1),s=j.useRef(null);return j.useImperativeHandle(r,()=>({addMessage:e=>{var t;null===(t=s.current)||void 0===t||t.addMessage(e)},setBotEnabled:e=>{var t;null===(t=s.current)||void 0===t||t.setBotEnabled(e)},openChat:()=>{var e;l(!0),null===(e=s.current)||void 0===e||e.openChat()},closeChat:()=>{var e;l(!1),null===(e=s.current)||void 0===e||e.closeChat()},toggleChat:()=>{var e;l(e=>!e),null===(e=s.current)||void 0===e||e.toggleChat()}}),[]),j.createElement(KM,e({ref:s},i,{open:a,onOpenChange:l}))});return JM.displayName="ProgrammaticQABot",function(n){if(!(n.target&&n.target instanceof HTMLElement))return void hM("QA Bot: A valid target DOM element is required");const{target:r}=n,o=t(n,["target"]),i=H.createRoot(r),a={current:null};return i.render(j.createElement(j.StrictMode,null,j.createElement(JM,e({ref:e=>{a.current=e}},o)))),{addMessage:e=>{var t;return null===(t=a.current)||void 0===t?void 0:t.addMessage(e)},setBotEnabled:e=>{var t;return null===(t=a.current)||void 0===t?void 0:t.setBotEnabled(e)},openChat:()=>{var e;return null===(e=a.current)||void 0===e?void 0:e.openChat()},closeChat:()=>{var e;return null===(e=a.current)||void 0===e?void 0:e.closeChat()},toggleChat:()=>{var e;return null===(e=a.current)||void 0===e?void 0:e.toggleChat()},destroy:()=>{a.current=null,i.unmount()}}}});
|
|
36
|
+
*/var Wy,Yy;var Gy=function(){if(Yy)return Wy;Yy=1;var e=/["'&<>]/;return Wy=function(t){var n=""+t,r=e.exec(n);if(!r)return n;var o,i="",a=0,l=0;for(a=r.index;a<n.length;a++){switch(n.charCodeAt(a)){case 34:o=""";break;case 38:o="&";break;case 39:o="'";break;case 60:o="<";break;case 62:o=">";break;default:continue}l!==a&&(i+=n.substring(l,a)),l=a+1,i+=o}return l!==a?i+n.substring(l,a):i},Wy}();const Xy=Vy(Gy);function Ky(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Jy=/(url|image|image-set)\(/i;class $y extends qy{attribute(e,t){return"style"===e&&Object.keys(t).forEach(e=>{String(t[e]).match(Jy)&&delete t[e]}),t}}const Zy=/^<(!doctype|(html|head|body)(\s|>))/i,eb=/^(aria-|data-|\w+:)/iu,tb=/{{{(\w+)\/?}}}/;function nb(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}let rb=class{constructor(e,t={},n=[],r=[]){var o;Ky(this,"allowed",void 0),Ky(this,"banned",void 0),Ky(this,"blocked",void 0),Ky(this,"container",void 0),Ky(this,"content",[]),Ky(this,"props",void 0),Ky(this,"matchers",void 0),Ky(this,"filters",void 0),Ky(this,"keyIndex",void 0),this.props=t,this.matchers=n,this.filters=[...r,new $y],this.keyIndex=-1,this.container=this.createContainer(e||""),this.allowed=new Set(null!==(o=t.allowList)&&void 0!==o?o:zy),this.banned=new Set(Fy),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,a=null;return this.matchers.forEach(e=>{const l=e.asTag().toLowerCase(),s=this.getTagConfig(l);if(r[e.inverseName]||!this.isTagAllowed(l)||!this.canRenderChild(t,s))return;let c="";for(;o&&(a=e.match(o));){const{index:t,length:l,match:s,valid:u,void:A,...d}=a,f=e.propName+String(i);t>0&&(c+=o.slice(0,t)),u?(c+=A?`{{{${f}/}}}`:`{{{${f}}}}${s}{{{/${f}}}}`,this.keyIndex+=1,i+=1,n[f]={children:s,matcher:e,props:{...r,...d,key:this.keyIndex}}):c+=s,e.greedy?(o=c+o.slice(t+l),c=""):o=o.slice(t+(l||s.length))}e.greedy||(o=c+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||nb)();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);return e.match(Zy)||(o.innerHTML=this.convertLineBreaks(this.props.escapeHtml?Xy(e):e)),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:a}=o,l=i.toLowerCase(),s=_y[l]||_y[i];if(!this.isSafe(e)||!l.match(eb)&&(!t&&(!s||2===s)||l.startsWith("on")||a.replace(/(\s|\0|�([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let c="style"===l?this.extractStyleAttribute(e):a;4===s?c=!0:3===s?c=Number.parseFloat(String(c)):5!==s&&(c=String(c)),n[jy[l]||l]=this.applyAttributeFilters(l,c),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 Ny[e]?{...t,...Ny[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,t){const{noHtml:n,noHtmlExceptMatchers:r,allowElements:o,transform:i,transformOnlyAllowList:a}=this.props;let l=[],s="";return[...e.childNodes].forEach(e=>{if(1===e.nodeType){const u=e.nodeName.toLowerCase(),A=this.getTagConfig(u);s&&(l.push(s),s="");const d=this.applyNodeFilters(u,e);if(!d)return;let f;if(i&&(!a||this.isTagAllowed(u))){this.keyIndex+=1;const e=this.keyIndex;f=this.parseNode(d,A);const t=i(d,f,A);if(null===t)return;if(typeof t<"u")return void l.push(j.cloneElement(t,{key:e}));this.keyIndex=e-1}if(this.banned.has(u))return;if(n||r&&"br"!==u||!this.isTagAllowed(u)||!o&&!this.canRenderChild(t,A))l=[...l,...this.parseNode(d,A.tagName?A:t)];else{var c;this.keyIndex+=1;const e=this.extractAttributes(d),t={tagName:u};e&&(t.attributes=e),A.void&&(t.selfClose=A.void),l.push(j.createElement(Uy,{...t,key:this.keyIndex},null!==(c=f)&&void 0!==c?c:this.parseNode(d,A)))}}else if(3===e.nodeType){const o=n&&!r?e.textContent:this.applyMatchers(e.textContent||"",t);Array.isArray(o)?l=[...l,...o]:s+=o}}),s&&l.push(s),l}replaceTokens(e,t){if(!e.includes("{{{"))return e;const n=[];let r=e,o=null;for(;o=r.match(tb);){const[e,i]=o,a=o.index,l=e.includes("/");a>0&&(n.push(r.slice(0,a)),r=r.slice(a));const{children:s,matcher:c,props:u}=t[i];let A;if(l)A=e.length,n.push(c.createElement(s,u));else{const o=r.match(new RegExp(`{{{/${i}}}}`));A=o.index+o[0].length,n.push(c.createElement(this.replaceTokens(r.slice(e.length,o.index),t),u))}r=r.slice(A)}return r.length>0&&n.push(r),0===n.length?"":1===n.length&&"string"==typeof n[0]?n[0]:n}};function ob(e){var t;const{attributes:n,className:r,containerTagName:o,content:i,emptyContent:a,parsedContent:l,tagName:s,noWrap:c}=e,u=null!==(t=o??s)&&void 0!==t?t:"span",A="fragment"===u||c;let d;if(l)d=l;else{const t=new rb(i??"",e).parse();t.length>0&&(d=t)}return d||(d=a),A?j.createElement(j.Fragment,null,d):j.createElement(Uy,{attributes:n,className:r,tagName:u},d)}function ib(e){const{attributes:t,className:n,content:r="",disableFilters:o=!1,disableMatchers:i=!1,emptyContent:a=null,filters:l=[],matchers:s=[],onAfterParse:c=null,onBeforeParse:u=null,tagName:A="span",noWrap:d=!1,...f}=e,p=i?[]:s,h=o?[]:l,g=u?[u]:[],m=c?[c]:[];p.forEach(e=>{e.onBeforeParse&&g.push(e.onBeforeParse.bind(e)),e.onAfterParse&&m.push(e.onAfterParse.bind(e))});const v=g.reduce((t,n)=>n(t,e),r??""),y=new rb(v,f,p,h),b=m.reduce((t,n)=>n(t,e),y.parse());return j.createElement(ob,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:a,noWrap:d,parsedContent:0===b.length?void 0:b,tagName:A})}const ab=({children:e})=>lA.jsx("div",{style:{whiteSpace:"normal"},children:lA.jsx(ib,{content:"string"==typeof e?e:""})}),lb={autoConfig:!0},sb=(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)},cb=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},ub=e=>{const{getFlow:t}=By(),{messages:n,replaceMessages:r}=Ty(),{settings:o}=My(),{hasChatHistoryLoaded:i}=Oy(),a={...e,...lb},l=a.htmlComponent?a.htmlComponent:ab;_.useEffect(()=>{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=l)}r(i)}},[i]);const s=async e=>{var n;const r=null==(n=e.data.message)?void 0:n.sender.toUpperCase();"string"==typeof e.data.message.content&&sb(e,t(),r)&&("rcb-start-simulate-stream-message"===e.type&&(e.data.simulateStreamChunker=cb),e.data.message.contentWrapper=l,e.data.message.tags||(e.data.message.tags=[]),e.data.message.tags.push("rcb-html-renderer-plugin:parsed"))};Iy(Pm.PRE_INJECT_MESSAGE,s),Iy(Pm.CHUNK_STREAM_MESSAGE,s),Iy(Pm.START_STREAM_MESSAGE,s),Iy(Pm.START_SIMULATE_STREAM_MESSAGE,s),Iy(Pm.START_SPEAK_AUDIO,async e=>{sb(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!=a&&a.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0,rcbStartSpeakAudio:!0}}),c},Ab=e=>()=>ub(e);const db=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fb=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,pb={};function hb(e,t){return(pb.jsx?fb:db).test(e)}const gb=/[ \t\n\f\r]/g;function mb(e){return""===e.replace(gb,"")}class vb{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function yb(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 vb(n,r,t)}function bb(e){return e.toLowerCase()}vb.prototype.property={},vb.prototype.normal={},vb.prototype.space=null;class wb{constructor(e,t){this.property=e,this.attribute=t}}wb.prototype.space=null,wb.prototype.boolean=!1,wb.prototype.booleanish=!1,wb.prototype.overloadedBoolean=!1,wb.prototype.number=!1,wb.prototype.commaSeparated=!1,wb.prototype.spaceSeparated=!1,wb.prototype.commaOrSpaceSeparated=!1,wb.prototype.mustUseProperty=!1,wb.prototype.defined=!1;let xb=0;const kb=Tb(),Sb=Tb(),Eb=Tb(),Cb=Tb(),Pb=Tb(),Db=Tb(),Bb=Tb();function Tb(){return 2**++xb}const Ib=Object.freeze(Object.defineProperty({__proto__:null,boolean:kb,booleanish:Sb,commaOrSpaceSeparated:Bb,commaSeparated:Db,number:Cb,overloadedBoolean:Eb,spaceSeparated:Pb},Symbol.toStringTag,{value:"Module"})),Mb=Object.keys(Ib);class Lb extends wb{constructor(e,t,n,r){let o=-1;if(super(e,t),Ob(this,"space",r),"number"==typeof n)for(;++o<Mb.length;){const e=Mb[o];Ob(this,Mb[o],(n&Ib[e])===Ib[e])}}}function Ob(e,t,n){n&&(e[t]=n)}Lb.prototype.defined=!0;const Qb={}.hasOwnProperty;function Rb(e){const t={},n={};let r;for(r in e.properties)if(Qb.call(e.properties,r)){const o=e.properties[r],i=new Lb(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[bb(r)]=r,n[bb(i.attribute)]=r}return new vb(t,n,e.space)}const Nb=Rb({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}}),Fb=Rb({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function zb(e,t){return t in e?e[t]:t}function _b(e,t){return zb(e,t.toLowerCase())}const jb=Rb({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:_b,properties:{xmlns:null,xmlnsXLink:null}}),Hb=Rb({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:Sb,ariaAutoComplete:null,ariaBusy:Sb,ariaChecked:Sb,ariaColCount:Cb,ariaColIndex:Cb,ariaColSpan:Cb,ariaControls:Pb,ariaCurrent:null,ariaDescribedBy:Pb,ariaDetails:null,ariaDisabled:Sb,ariaDropEffect:Pb,ariaErrorMessage:null,ariaExpanded:Sb,ariaFlowTo:Pb,ariaGrabbed:Sb,ariaHasPopup:null,ariaHidden:Sb,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Pb,ariaLevel:Cb,ariaLive:null,ariaModal:Sb,ariaMultiLine:Sb,ariaMultiSelectable:Sb,ariaOrientation:null,ariaOwns:Pb,ariaPlaceholder:null,ariaPosInSet:Cb,ariaPressed:Sb,ariaReadOnly:Sb,ariaRelevant:null,ariaRequired:Sb,ariaRoleDescription:Pb,ariaRowCount:Cb,ariaRowIndex:Cb,ariaRowSpan:Cb,ariaSelected:Sb,ariaSetSize:Cb,ariaSort:null,ariaValueMax:Cb,ariaValueMin:Cb,ariaValueNow:Cb,ariaValueText:null,role:null}}),Ub=Rb({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:_b,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Db,acceptCharset:Pb,accessKey:Pb,action:null,allow:null,allowFullScreen:kb,allowPaymentRequest:kb,allowUserMedia:kb,alt:null,as:null,async:kb,autoCapitalize:null,autoComplete:Pb,autoFocus:kb,autoPlay:kb,blocking:Pb,capture:null,charSet:null,checked:kb,cite:null,className:Pb,cols:Cb,colSpan:null,content:null,contentEditable:Sb,controls:kb,controlsList:Pb,coords:Cb|Db,crossOrigin:null,data:null,dateTime:null,decoding:null,default:kb,defer:kb,dir:null,dirName:null,disabled:kb,download:Eb,draggable:Sb,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:kb,formTarget:null,headers:Pb,height:Cb,hidden:kb,high:Cb,href:null,hrefLang:null,htmlFor:Pb,httpEquiv:Pb,id:null,imageSizes:null,imageSrcSet:null,inert:kb,inputMode:null,integrity:null,is:null,isMap:kb,itemId:null,itemProp:Pb,itemRef:Pb,itemScope:kb,itemType:Pb,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:kb,low:Cb,manifest:null,max:null,maxLength:Cb,media:null,method:null,min:null,minLength:Cb,multiple:kb,muted:kb,name:null,nonce:null,noModule:kb,noValidate:kb,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:kb,optimum:Cb,pattern:null,ping:Pb,placeholder:null,playsInline:kb,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:kb,referrerPolicy:null,rel:Pb,required:kb,reversed:kb,rows:Cb,rowSpan:Cb,sandbox:Pb,scope:null,scoped:kb,seamless:kb,selected:kb,shadowRootClonable:kb,shadowRootDelegatesFocus:kb,shadowRootMode:null,shape:null,size:Cb,sizes:null,slot:null,span:Cb,spellCheck:Sb,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Cb,step:null,style:null,tabIndex:Cb,target:null,title:null,translate:null,type:null,typeMustMatch:kb,useMap:null,value:Sb,width:Cb,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Pb,axis:null,background:null,bgColor:null,border:Cb,borderColor:null,bottomMargin:Cb,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:kb,declare:kb,event:null,face:null,frame:null,frameBorder:null,hSpace:Cb,leftMargin:Cb,link:null,longDesc:null,lowSrc:null,marginHeight:Cb,marginWidth:Cb,noResize:kb,noHref:kb,noShade:kb,noWrap:kb,object:null,profile:null,prompt:null,rev:null,rightMargin:Cb,rules:null,scheme:null,scrolling:Sb,standby:null,summary:null,text:null,topMargin:Cb,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Cb,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:kb,disableRemotePlayback:kb,prefix:null,property:null,results:Cb,security:null,unselectable:null}}),qb=Rb({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:zb,properties:{about:Bb,accentHeight:Cb,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Cb,amplitude:Cb,arabicForm:null,ascent:Cb,attributeName:null,attributeType:null,azimuth:Cb,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Cb,by:null,calcMode:null,capHeight:Cb,className:Pb,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:Cb,diffuseConstant:Cb,direction:null,display:null,dur:null,divisor:Cb,dominantBaseline:null,download:kb,dx:null,dy:null,edgeMode:null,editable:null,elevation:Cb,enableBackground:null,end:null,event:null,exponent:Cb,externalResourcesRequired:null,fill:null,fillOpacity:Cb,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:Db,g2:Db,glyphName:Db,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Cb,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Cb,horizOriginX:Cb,horizOriginY:Cb,id:null,ideographic:Cb,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Cb,k:Cb,k1:Cb,k2:Cb,k3:Cb,k4:Cb,kernelMatrix:Bb,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Cb,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:Cb,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:Cb,overlineThickness:Cb,paintOrder:null,panose1:null,path:null,pathLength:Cb,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Pb,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Cb,pointsAtY:Cb,pointsAtZ:Cb,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Bb,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Bb,rev:Bb,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Bb,requiredFeatures:Bb,requiredFonts:Bb,requiredFormats:Bb,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:Cb,specularExponent:Cb,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Cb,strikethroughThickness:Cb,string:null,stroke:null,strokeDashArray:Bb,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Cb,strokeOpacity:Cb,strokeWidth:null,style:null,surfaceScale:Cb,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Bb,tabIndex:Cb,tableValues:null,target:null,targetX:Cb,targetY:Cb,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Bb,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Cb,underlineThickness:Cb,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Cb,values:null,vAlphabetic:Cb,vMathematical:Cb,vectorEffect:null,vHanging:Cb,vIdeographic:Cb,version:null,vertAdvY:Cb,vertOriginX:Cb,vertOriginY:Cb,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Cb,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Vb=/^data[-\w.:]+$/i,Wb=/-[a-z]/g,Yb=/[A-Z]/g;function Gb(e){return"-"+e.toLowerCase()}function Xb(e){return e.charAt(1).toUpperCase()}const Kb={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"},Jb=yb([Fb,Nb,jb,Hb,Ub],"html"),$b=yb([Fb,Nb,jb,Hb,qb],"svg");function Zb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ew,tw,nw,rw={};var ow=function(){if(nw)return rw;nw=1;var e=rw&&rw.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(rw,"__esModule",{value:!0}),rw.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(tw)return ew;tw=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,s="";function c(e){return e?e.replace(l,s):s}return ew=function(l,u){if("string"!=typeof l)throw new TypeError("First argument must be a string");if(!l)return[];u=u||{};var A=1,d=1;function f(e){var n=e.match(t);n&&(A+=n.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function p(){var e={line:A,column:d};return function(t){return t.position=new h(e),v(),t}}function h(e){this.start=e,this.end={line:A,column:d},this.source=u.source}function g(e){var t=new Error(u.source+":"+A+":"+d+": "+e);if(t.reason=e,t.filename=u.source,t.line=A,t.column=d,t.source=l,!u.silent)throw t}function m(e){var t=e.exec(l);if(t){var n=t[0];return f(n),l=l.slice(n.length),t}}function v(){m(n)}function y(e){var t;for(e=e||[];t=b();)!1!==t&&e.push(t);return e}function b(){var e=p();if("/"==l.charAt(0)&&"*"==l.charAt(1)){for(var t=2;s!=l.charAt(t)&&("*"!=l.charAt(t)||"/"!=l.charAt(t+1));)++t;if(t+=2,s===l.charAt(t-1))return g("End of comment missing");var n=l.slice(2,t-2);return d+=2,f(n),l=l.slice(t),d+=2,e({type:"comment",comment:n})}}function w(){var t=p(),n=m(r);if(n){if(b(),!m(o))return g("property missing ':'");var l=m(i),u=t({type:"declaration",property:c(n[0].replace(e,s)),value:l?c(l[0].replace(e,s)):s});return m(a),u}}return h.prototype.content=l,v(),function(){var e,t=[];for(y(t);e=w();)!1!==e&&(t.push(e),y(t));return t}()},ew}());return rw}();const iw=Zb(ow),aw=iw.default||iw,lw=cw("end"),sw=cw("start");function cw(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 uw(e){return e&&"object"==typeof e?"position"in e||"type"in e?dw(e.position):"start"in e||"end"in e?dw(e):"line"in e||"column"in e?Aw(e):"":""}function Aw(e){return fw(e&&e.line)+":"+fw(e&&e.column)}function dw(e){return Aw(e&&e.start)+"-"+Aw(e&&e.end)}function fw(e){return e&&"number"==typeof e?e:1}class pw 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 a=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=a?a.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=a?a.line:void 0,this.name=uw(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}}pw.prototype.file="",pw.prototype.name="",pw.prototype.reason="",pw.prototype.message="",pw.prototype.stack="",pw.prototype.column=void 0,pw.prototype.line=void 0,pw.prototype.ancestors=void 0,pw.prototype.cause=void 0,pw.prototype.fatal=void 0,pw.prototype.place=void 0,pw.prototype.ruleId=void 0,pw.prototype.source=void 0;const hw={}.hasOwnProperty,gw=new Map,mw=/[A-Z]/g,vw=/-([a-z])/g,yw=new Set(["table","tbody","thead","tfoot","tr"]),bw=new Set(["td","th"]),ww="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function xw(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 a=Array.isArray(o.children),l=sw(n);return t(r,o,i,a,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.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 a=Array.isArray(o.children)?n:t;return i?a(r,o,i):a(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?$b:Jb,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=kw(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function kw(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=$b,e.schema=o),e.ancestors.push(t);const i=Dw(e,t.tagName,!1),a=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&hw.call(t.properties,o)){const i=Pw(e,o,t.properties[o]);if(i){const[o,a]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof a&&bw.has(t.tagName)?r=a:n[o]=a}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let l=Cw(e,t);return yw.has(t.tagName)&&(l=l.filter(function(e){return"string"!=typeof e||!function(e){return"object"==typeof e?"text"===e.type&&mb(e.value):mb(e)}(e)})),Sw(e,a,i,t),Ew(a,l),e.ancestors.pop(),e.schema=r,e.create(t,i,a,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)}Bw(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=$b,e.schema=o),e.ancestors.push(t);const i=null===t.name?e.Fragment:Dw(e,t.name,!0),a=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 Bw(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 Bw(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),l=Cw(e,t);return Sw(e,a,i,t),Ew(a,l),e.ancestors.pop(),e.schema=r,e.create(t,i,a,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);Bw(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Ew(r,Cw(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 Sw(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ew(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Cw(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:gw;for(;++r<t.children.length;){const i=t.children[r];let a;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;a=e+"-"+t,o.set(e,t+1)}}const l=kw(e,i,a);void 0!==l&&n.push(l)}return n}function Pw(e,t,n){const r=function(e,t){const n=bb(t);let r=t,o=wb;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&Vb.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Wb,Xb);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Wb.test(e)){let n=e.replace(Yb,Gb);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=Lb}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{aw(t,r)}catch(t){if(!e.ignoreInvalidStyle){const n=t,r=new pw("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=ww+"#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(vw,Iw)),n[r]=t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)hw.call(e,n)&&(t[Tw(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?Kb[r.property]||r.property:r.attribute,n]}}function Dw(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=hb(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=hb(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 hw.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Bw(e)}function Bw(e,t){const n=new pw("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=ww+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Tw(e){let t=e.replace(mw,Mw);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function Iw(e,t){return t.toUpperCase()}function Mw(e){return"-"+e.toLowerCase()}const Lw={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"]},Ow={};function Qw(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 Rw(e.children,t,n)}return Array.isArray(e)?Rw(e,t,n):""}function Rw(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Qw(e[o],t,n);return r.join("")}const Nw=document.createElement("i");function Fw(e){const t="&"+e+";";Nw.innerHTML=t;const n=Nw.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}function zw(e,t,n,r){const o=e.length;let i,a=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);a<r.length;)i=r.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function _w(e,t){return e.length>0?(zw(e,e.length,0,t),e):t}const jw={}.hasOwnProperty;function Hw(e){const t={};let n=-1;for(;++n<e.length;)Uw(t,e[n]);return t}function Uw(e,t){let n;for(n in t){const r=(jw.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){jw.call(r,i)||(r[i]=[]);const e=o[i];qw(r[i],Array.isArray(e)?e:e?[e]:[])}}}function qw(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);zw(e,0,0,r)}function Vw(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 Ww(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Yw=ix(/[A-Za-z]/),Gw=ix(/[\dA-Za-z]/),Xw=ix(/[#-'*+\--9=?A-Z^-~]/);function Kw(e){return null!==e&&(e<32||127===e)}const Jw=ix(/\d/),$w=ix(/[\dA-Fa-f]/),Zw=ix(/[!-/:-@[-`{-~]/);function ex(e){return null!==e&&e<-2}function tx(e){return null!==e&&(e<0||32===e)}function nx(e){return-2===e||-1===e||32===e}const rx=ix(new RegExp("\\p{P}|\\p{S}","u")),ox=ix(/\s/);function ix(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function ax(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(37===i&&Gw(e.charCodeAt(n+1))&&Gw(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(a=String.fromCharCode(i,t),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function lx(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){return nx(r)?(e.enter(n),a(r)):t(r)};function a(r){return nx(r)&&i++<o?(e.consume(r),a):(e.exit(n),t(r))}}const sx={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"),lx(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)):ex(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const cx={tokenize:function(e){const t=this,n=[];let r,o,i,a=0;return l;function l(r){if(a<n.length){const o=n[a];return t.containerState=o[1],e.attempt(o[0].continuation,s,c)(r)}return c(r)}function s(e){if(a++,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(a);let l=n;for(;l<t.events.length;)t.events[l][1].end={...o},l++;return zw(t.events,i+1,0,t.events.slice(n)),t.events.length=l,c(e)}return l(e)}function c(o){if(a===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(ux,u,A)(o)}function u(e){return r&&v(),m(a),d(e)}function A(e){return t.parser.lazy[t.now().line]=a!==n.length,i=t.now().offset,p(e)}function d(n){return t.containerState={},e.attempt(ux,f,p)(n)}function f(e){return a++,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)):ex(n)?(e.consume(n),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,l):(e.consume(n),h)}function g(e,n){const l=t.sliceStream(e);if(n&&l.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(l),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,l,s=n;for(;s--;)if("exit"===t.events[s][0]&&"chunkFlow"===t.events[s][1].type){if(o){l=t.events[s][1].end;break}o=!0}for(m(a),e=n;e<t.events.length;)t.events[e][1].end={...l},e++;zw(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}}},ux={tokenize:function(e,t,n){return lx(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function Ax(e){return null===e||tx(e)||ox(e)?1:rx(e)?2:void 0}function dx(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 fx={name:"attention",resolveAll:function(e,t){let n,r,o,i,a,l,s,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;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[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const A={...e[n][1].end},d={...e[u][1].start};px(A,-l),px(d,l),i={type:l>1?"strongSequence":"emphasisSequence",start:A,end:{...e[n][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:d},o={type:l>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:l>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},e[n][1].end={...i.start},e[u][1].start={...a.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=_w(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=_w(s,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),s=_w(s,dx(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),s=_w(s,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,s=_w(s,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,zw(e,n-1,u-n+3,s),u=n+s.length-c-2;break}for(u=-1;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Ax(r);let i;return function(t){return i=t,e.enter("attentionSequence"),a(t)};function a(l){if(l===i)return e.consume(l),a;const s=e.exit("attentionSequence"),c=Ax(l),u=!c||2===c&&o||n.includes(l),A=!o||2===o&&c||n.includes(r);return s._open=!!(42===i?u:u&&(o||!A)),s._close=!!(42===i?A:A&&(c||!u)),t(l)}}};function px(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const hx={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 Yw(t)?(e.consume(t),i):64===t?n(t):s(t)}function i(e){return 43===e||45===e||46===e||Gw(e)?(r=1,a(e)):s(e)}function a(t){return 58===t?(e.consume(t),r=0,l):(43===t||45===t||46===t||Gw(t))&&r++<32?(e.consume(t),a):(r=0,s(t))}function l(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||Kw(r)?n(r):(e.consume(r),l)}function s(t){return 64===t?(e.consume(t),c):Xw(t)?(e.consume(t),s):n(t)}function c(e){return Gw(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):A(n)}function A(t){if((45===t||Gw(t))&&r++<63){const n=45===t?A:u;return e.consume(t),n}return n(t)}}};const gx={partial:!0,tokenize:function(e,t,n){return function(t){return nx(t)?lx(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||ex(e)?t(e):n(e)}}};const mx={continuation:{tokenize:function(e,t,n){const r=this;return function(t){return nx(t)?lx(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):o(t)};function o(r){return e.attempt(mx,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 nx(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const vx={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 Zw(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const yx={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),l};function l(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),o=31,i=Gw,c(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=$w,c):(e.enter("characterReferenceValue"),o=7,i=Jw,c(t))}function c(l){if(59===l&&a){const o=e.exit("characterReferenceValue");return i!==Gw||Fw(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(l),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(l)}return i(l)&&a++<o?(e.consume(l),c):n(l)}}};const bx={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)}}},wx={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return a;function a(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s}function s(t){return e.enter("codeFencedFence"),nx(t)?lx(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===i?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===i?(o++,e.consume(t),u):o>=l?(e.exit("codeFencedFenceSequence"),nx(t)?lx(e,A,"whitespace")(t):A(t)):n(t)}function A(r){return null===r||ex(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let i,a=0,l=0;return function(t){return function(t){const n=r.events[r.events.length-1];return a=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?(l++,e.consume(t),s):l<3?n(t):(e.exit("codeFencedFenceSequence"),nx(t)?lx(e,c,"whitespace")(t):c(t))}function c(n){return null===n||ex(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(bx,f,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||ex(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):nx(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),lx(e,A,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),u)}function A(t){return null===t||ex(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||ex(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(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 a>0&&nx(t)?lx(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||ex(t)?e.check(bx,f,v)(t):(e.enter("codeFlowValue"),m(t))}function m(t){return null===t||ex(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),m)}function v(n){return e.exit("codeFenced"),t(n)}}};const xx={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),lx(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?l(t):ex(t)?e.attempt(kx,i,l)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||ex(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),a)}function l(n){return e.exit("codeIndented"),t(n)}}},kx={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):ex(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):lx(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):ex(e)?o(e):n(e)}}};const Sx={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"),a(t)};function a(t){return 96===t?(e.consume(t),i++,a):(e.exit("codeTextSequence"),l(t))}function l(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),l):96===t?(o=e.enter("codeTextSequence"),r=0,c(t)):ex(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):(e.enter("codeTextData"),s(t))}function s(t){return null===t||32===t||96===t||ex(t)?(e.exit("codeTextData"),l(t)):(e.consume(t),s)}function c(n){return 96===n?(e.consume(n),r++,c):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",s(n))}}};class Ex{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&&Cx(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),Cx(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Cx(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);Cx(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Cx(this.left,t.reverse())}}}function Cx(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 Px(e){const t={};let n,r,o,i,a,l,s,c=-1;const u=new Ex(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(l=n[1]._tokenizer.events,o=0,o<l.length&&"lineEndingBlank"===l[o][1].type&&(o+=2),o<l.length&&"content"===l[o][1].type))for(;++o<l.length&&"content"!==l[o][1].type;)"chunkText"===l[o][1].type&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,Dx(u,c)),c=t[c],s=!0);else if(n[1]._container){for(o=c,r=void 0;o--;)if(i=u.get(o),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);else if("linePrefix"!==i[1].type)break;r&&(n[1].end={...u.get(r)[1].start},a=u.slice(r,c),a.unshift(n),u.splice(r,c-r+1,a))}}return zw(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!s}function Dx(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[],a=n._tokenizer||r.parser[n.contentType](n.start),l=a.events,s=[],c={};let u,A,d=-1,f=n,p=0,h=0;const g=[h];for(;f;){for(;e.get(++o)[1]!==f;);i.push(o),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),A&&a.defineSkip(f.start),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),A=f,f=f.next}for(f=n;++d<l.length;)"exit"===l[d][0]&&"enter"===l[d-1][0]&&l[d][1].type===l[d-1][1].type&&l[d][1].start.line!==l[d][1].end.line&&(h=d+1,g.push(h),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(a.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),d=g.length;d--;){const t=l.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;)c[p+s[d][0]]=p+s[d][1],p+=s[d][1]-s[d][0]-1;return c}const Bx={resolve:function(e){return Px(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):ex(t)?e.check(Tx,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}}},Tx={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"),lx(e,o,"linePrefix")};function o(o){if(null===o||ex(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 Ix(e,t,n,r,o,i,a,l,s){const c=s||Number.POSITIVE_INFINITY;let u=0;return function(t){return 60===t?(e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),A):null===t||32===t||41===t||Kw(t)?n(t):(e.enter(r),e.enter(a),e.enter(l),e.enter("chunkString",{contentType:"string"}),p(t))};function A(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(l),A(t)):null===t||60===t||ex(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 u||null!==o&&41!==o&&!tx(o)?u<c&&40===o?(e.consume(o),u++,p):41===o?(e.consume(o),u--,p):null===o||32===o||40===o||Kw(o)?n(o):(e.consume(o),92===o?h:p):(e.exit("chunkString"),e.exit(l),e.exit(a),e.exit(r),t(o))}function h(t){return 40===t||41===t||92===t?(e.consume(t),p):p(t)}}function Mx(e,t,n,r,o,i){const a=this;let l,s=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),c};function c(A){return s>999||null===A||91===A||93===A&&!l||94===A&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(A):93===A?(e.exit(i),e.enter(o),e.consume(A),e.exit(o),e.exit(r),t):ex(A)?(e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(A))}function u(t){return null===t||91===t||93===t||ex(t)||s++>999?(e.exit("chunkString"),c(t)):(e.consume(t),l||(l=!nx(t)),92===t?A:u)}function A(t){return 91===t||92===t||93===t?(e.consume(t),s++,u):u(t)}}function Lx(e,t,n,r,o,i){let a;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(o),e.consume(t),e.exit(o),a=40===t?41:t,l):n(t)};function l(n){return n===a?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),s(n))}function s(t){return t===a?(e.exit(i),l(a)):null===t?n(t):ex(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),lx(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||ex(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?u:c)}function u(t){return t===a||92===t?(e.consume(t),c):c(t)}}function Ox(e,t){let n;return function r(o){return ex(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):nx(o)?lx(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const Qx={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return Mx.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=Ww(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return tx(t)?Ox(e,l)(t):l(t)}function l(t){return Ix(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(Rx,c,c)(t)}function c(t){return nx(t)?lx(e,u,"whitespace")(t):u(t)}function u(i){return null===i||ex(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},Rx={partial:!0,tokenize:function(e,t,n){return function(t){return tx(t)?Ox(e,r)(t):n(t)};function r(t){return Lx(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return nx(t)?lx(e,i,"whitespace")(t):i(t)}function i(e){return null===e||ex(e)?t(e):n(e)}}};const Nx={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return ex(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const Fx={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"},zw(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||tx(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||ex(n)?(e.exit("atxHeading"),t(n)):nx(n)?lx(e,i,"whitespace")(n):(e.enter("atxHeadingText"),l(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),i(t))}function l(t){return null===t||35===t||tx(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),l)}}};const zx=["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"],_x=["pre","script","style","textarea"],jx={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,a,l,s;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(l){return 33===l?(e.consume(l),u):47===l?(e.consume(l),i=!0,f):63===l?(e.consume(l),o=3,r.interrupt?t:O):Yw(l)?(e.consume(l),a=String.fromCharCode(l),p):n(l)}function u(i){return 45===i?(e.consume(i),o=2,A):91===i?(e.consume(i),o=5,l=0,d):Yw(i)?(e.consume(i),o=4,r.interrupt?t:O):n(i)}function A(o){return 45===o?(e.consume(o),r.interrupt?t:O):n(o)}function d(o){const i="CDATA[";return o===i.charCodeAt(l++)?(e.consume(o),6===l?r.interrupt?t:C:d):n(o)}function f(t){return Yw(t)?(e.consume(t),a=String.fromCharCode(t),p):n(t)}function p(l){if(null===l||47===l||62===l||tx(l)){const s=47===l,c=a.toLowerCase();return s||i||!_x.includes(c)?zx.includes(a.toLowerCase())?(o=6,s?(e.consume(l),h):r.interrupt?t(l):C(l)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(l):i?g(l):m(l)):(o=1,r.interrupt?t(l):C(l))}return 45===l||Gw(l)?(e.consume(l),a+=String.fromCharCode(l),p):n(l)}function h(o){return 62===o?(e.consume(o),r.interrupt?t:C):n(o)}function g(t){return nx(t)?(e.consume(t),g):S(t)}function m(t){return 47===t?(e.consume(t),S):58===t||95===t||Yw(t)?(e.consume(t),v):nx(t)?(e.consume(t),m):S(t)}function v(t){return 45===t||46===t||58===t||95===t||Gw(t)?(e.consume(t),v):y(t)}function y(t){return 61===t?(e.consume(t),b):nx(t)?(e.consume(t),y):m(t)}function b(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),s=t,w):nx(t)?(e.consume(t),b):x(t)}function w(t){return t===s?(e.consume(t),s=null,k):null===t||ex(t)?n(t):(e.consume(t),w)}function x(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||tx(t)?y(t):(e.consume(t),x)}function k(e){return 47===e||62===e||nx(e)?m(e):n(e)}function S(t){return 62===t?(e.consume(t),E):n(t)}function E(t){return null===t||ex(t)?C(t):nx(t)?(e.consume(t),E):n(t)}function C(t){return 45===t&&2===o?(e.consume(t),T):60===t&&1===o?(e.consume(t),I):62===t&&4===o?(e.consume(t),Q):63===t&&3===o?(e.consume(t),O):93===t&&5===o?(e.consume(t),L):!ex(t)||6!==o&&7!==o?null===t||ex(t)?(e.exit("htmlFlowData"),P(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(Hx,R,P)(t))}function P(t){return e.check(Ux,D,R)(t)}function D(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),B}function B(t){return null===t||ex(t)?P(t):(e.enter("htmlFlowData"),C(t))}function T(t){return 45===t?(e.consume(t),O):C(t)}function I(t){return 47===t?(e.consume(t),a="",M):C(t)}function M(t){if(62===t){const n=a.toLowerCase();return _x.includes(n)?(e.consume(t),Q):C(t)}return Yw(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),M):C(t)}function L(t){return 93===t?(e.consume(t),O):C(t)}function O(t){return 62===t?(e.consume(t),Q):45===t&&2===o?(e.consume(t),O):C(t)}function Q(t){return null===t||ex(t)?(e.exit("htmlFlowData"),R(t)):(e.consume(t),Q)}function R(n){return e.exit("htmlFlow"),t(n)}}},Hx={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(gx,t,n)}}},Ux={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return ex(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 qx={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),l};function l(t){return 33===t?(e.consume(t),s):47===t?(e.consume(t),b):63===t?(e.consume(t),v):Yw(t)?(e.consume(t),k):n(t)}function s(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,f):Yw(t)?(e.consume(t),m):n(t)}function c(t){return 45===t?(e.consume(t),d):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),A):ex(t)?(a=u,M(t)):(e.consume(t),u)}function A(t){return 45===t?(e.consume(t),d):u(t)}function d(e){return 62===e?I(e):45===e?A(e):u(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):ex(t)?(a=p,M(t)):(e.consume(t),p)}function h(t){return 93===t?(e.consume(t),g):p(t)}function g(t){return 62===t?I(t):93===t?(e.consume(t),g):p(t)}function m(t){return null===t||62===t?I(t):ex(t)?(a=m,M(t)):(e.consume(t),m)}function v(t){return null===t?n(t):63===t?(e.consume(t),y):ex(t)?(a=v,M(t)):(e.consume(t),v)}function y(e){return 62===e?I(e):v(e)}function b(t){return Yw(t)?(e.consume(t),w):n(t)}function w(t){return 45===t||Gw(t)?(e.consume(t),w):x(t)}function x(t){return ex(t)?(a=x,M(t)):nx(t)?(e.consume(t),x):I(t)}function k(t){return 45===t||Gw(t)?(e.consume(t),k):47===t||62===t||tx(t)?S(t):n(t)}function S(t){return 47===t?(e.consume(t),I):58===t||95===t||Yw(t)?(e.consume(t),E):ex(t)?(a=S,M(t)):nx(t)?(e.consume(t),S):I(t)}function E(t){return 45===t||46===t||58===t||95===t||Gw(t)?(e.consume(t),E):C(t)}function C(t){return 61===t?(e.consume(t),P):ex(t)?(a=C,M(t)):nx(t)?(e.consume(t),C):S(t)}function P(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,D):ex(t)?(a=P,M(t)):nx(t)?(e.consume(t),P):(e.consume(t),B)}function D(t){return t===o?(e.consume(t),o=void 0,T):null===t?n(t):ex(t)?(a=D,M(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||tx(t)?S(t):(e.consume(t),B)}function T(e){return 47===e||62===e||tx(e)?S(e):n(e)}function I(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function M(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),L}function L(t){return nx(t)?lx(e,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):O(t)}function O(t){return e.enter("htmlTextData"),a(t)}}};const Vx={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&&zw(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,o,i,a=e.length,l=0;for(;a--;)if(n=e[a][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[a][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[a][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=a,"labelLink"!==n.type)){l=2;break}}else"labelEnd"===n.type&&(o=a);const s={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[r+l+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",s,t],["enter",c,t]],i=_w(i,e.slice(r+1,r+l+3)),i=_w(i,[["enter",u,t]]),i=_w(i,dx(t.parser.constructs.insideSpan.null,e.slice(r+l+4,o-3),t)),i=_w(i,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),i=_w(i,e.slice(o+1)),i=_w(i,[["exit",s,t]]),zw(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,a=r.events.length;for(;a--;)if(("labelImage"===r.events[a][1].type||"labelLink"===r.events[a][1].type)&&!r.events[a][1]._balanced){o=r.events[a][1];break}return function(t){return o?o._inactive?u(t):(i=r.parser.defined.includes(Ww(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),l):n(t)};function l(t){return 40===t?e.attempt(Wx,c,i?c:u)(t):91===t?e.attempt(Yx,c,i?s:u)(t):i?c(t):u(t)}function s(t){return e.attempt(Gx,c,u)(t)}function c(e){return t(e)}function u(e){return o._balanced=!0,n(e)}}},Wx={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 tx(t)?Ox(e,o)(t):o(t)}function o(t){return 41===t?c(t):Ix(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return tx(t)?Ox(e,l)(t):c(t)}function a(e){return n(e)}function l(t){return 34===t||39===t||40===t?Lx(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function s(t){return tx(t)?Ox(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},Yx={tokenize:function(e,t,n){const r=this;return function(t){return Mx.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(Ww(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},Gx={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 Xx={name:"labelStartImage",resolveAll:Vx.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 Kx={name:"labelStartLink",resolveAll:Vx.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 Jx={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),lx(e,t,"linePrefix")}}};const $x={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"),a(i)):o>=3&&(null===i||ex(i))?(e.exit("thematicBreak"),t(i)):n(i)}function a(t){return t===r?(e.consume(t),o++,a):(e.exit("thematicBreakSequence"),nx(t)?lx(e,i,"whitespace")(t):i(t))}}};const Zx={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(gx,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,lx(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!nx(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(tk,t,o)(n))});function o(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,lx(e,e.attempt(Zx,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,a=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:Jw(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($x,n,s)(t):s(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(t)}return n(t)};function l(t){return Jw(t)&&++a<10?(e.consume(t),l):(!r.interrupt||a<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(gx,r.interrupt?n:c,e.attempt(ek,A,u))}function c(e){return r.containerState.initialBlankLine=!0,i++,A(e)}function u(t){return nx(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),A):n(t)}function A(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},ek={partial:!0,tokenize:function(e,t,n){const r=this;return lx(e,function(e){const o=r.events[r.events.length-1];return!nx(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},tk={partial:!0,tokenize:function(e,t,n){const r=this;return lx(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 nk={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 a={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",a,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=a,e.push(["exit",a,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let a,l=r.events.length;for(;l--;)if("lineEnding"!==r.events[l][1].type&&"linePrefix"!==r.events[l][1].type&&"content"!==r.events[l][1].type){a="paragraph"===r.events[l][1].type;break}return r.parser.lazy[r.now().line]||!r.interrupt&&!a?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"),nx(t)?lx(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||ex(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const rk={tokenize:function(e){const t=this,n=e.attempt(gx,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,lx(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Bx,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 ok={resolveAll:sk()},ik=lk("string"),ak=lk("text");function lk(e){return{resolveAll:sk("text"===e?ck:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,a);return i;function i(e){return s(e)?o(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),l;t.consume(e)}function l(e){return s(e)?(t.exit("data"),o(e)):(t.consume(e),l)}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 sk(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 ck(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,a=o.length,l=-1,s=0;for(;a--;){const e=o[a];if("string"==typeof e){for(l=e.length;32===e.charCodeAt(l-1);)s++,l--;if(l)break;l=-1}else if(-2===e)i=!0,s++;else if(-1!==e){a++;break}}if(s){const o={type:n===e.length||i||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,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 uk={42:Zx,43:Zx,45:Zx,48:Zx,49:Zx,50:Zx,51:Zx,52:Zx,53:Zx,54:Zx,55:Zx,56:Zx,57:Zx,62:mx},Ak={91:Qx},dk={[-2]:xx,[-1]:xx,32:xx},fk={35:Fx,42:$x,45:[nk,$x],60:jx,61:nk,95:$x,96:wx,126:wx},pk={38:yx,92:vx},hk={[-5]:Jx,[-4]:Jx,[-3]:Jx,33:Xx,38:yx,42:fx,60:[hx,qx],91:Kx,92:[Nx,vx],93:Vx,95:fx,96:Sx},gk={null:[fx,ok]},mk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:Ak,disable:{null:[]},document:uk,flow:fk,flowInitial:dk,insideSpan:gk,string:pk,text:hk},Symbol.toStringTag,{value:"Module"}));function vk(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 a=[],l=[];const s={attempt:h(function(e,t){g(e,t.from)}),check:h(p),consume:function(e){ex(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===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=d(),c.events.push(["enter",n,c]),l.push(n),n},exit:function(e){const t=l.pop();return t.end=d(),c.events.push(["exit",t,c]),t},interrupt:h(p,{interrupt:!0})},c={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 a;if("string"==typeof i)a=i;else switch(i){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&o)continue;a=" ";break;default:a=String.fromCharCode(i)}o=-2===i,r.push(a)}return r.join("")}(A(e),t)},sliceStream:A,write:function(e){return a=_w(a,e),function(){let e;for(;r._index<a.length;){const t=a[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!==a[a.length-1]?[]:(g(t,0),c.events=dx(i,c.events,c),c.events)}};let u=t.tokenize.call(c,s);return t.resolveAll&&i.push(t),c;function A(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}(a,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){u=u(e)}function p(e,t){t.restore()}function h(e,t){return function(n,o,i){let a,u,A,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 a=e,u=0,0===e.length?i:h(e[u])}function h(e){return function(n){return f=function(){const e=d(),t=c.previous,n=c.currentConstruct,o=c.events.length,i=Array.from(l);return{from:o,restore:a};function a(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=o,l=i,m()}}(),A=e,e.partial||(c.currentConstruct=e),e.name&&c.parser.constructs.disable.null.includes(e.name)?v():e.tokenize.call(t?Object.assign(Object.create(c),t):c,s,g,v)(n)}}function g(t){return e(A,f),o}function v(e){return f.restore(),++u<a.length?h(a[u]):i}}}function g(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&zw(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function m(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const yk=/[\0\t\n\r]/g;const bk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function wk(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return Vw(n.slice(t?2:1),t?16:10)}return Fw(n)||e}const xk={}.hasOwnProperty;function kk(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:E,autolinkEmail:E,atxHeading:i(J),blockQuote:i(W),characterEscape:E,characterReference:E,codeFenced:i(Y),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(Y,a),codeText:i(G,a),codeTextData:E,data:E,codeFlowValue:E,definition:i(X),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(K),hardBreakEscape:i($),hardBreakTrailing:i($),htmlFlow:i(Z,a),htmlFlowData:E,htmlText:i(Z,a),htmlTextData:E,image:i(ee),label:a,link:i(te),listItem:i(re),listItemValue:d,listOrdered:i(ne,A),listUnordered:i(ne),paragraph:i(oe),reference:z,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(J),strong:i(ie),thematicBreak:i(le)},exit:{atxHeading:s(),atxHeadingSequence:w,autolink:s(),autolinkEmail:V,autolinkProtocol:q,blockQuote:s(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:j,characterReferenceMarkerNumeric:j,characterReferenceValue:H,characterReference:U,codeFenced:s(g),codeFencedFence:h,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:C,codeIndented:s(m),codeText:s(I),codeTextData:C,data:C,definition:s(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:s(),hardBreakEscape:s(D),hardBreakTrailing:s(D),htmlFlow:s(B),htmlFlowData:C,htmlText:s(T),htmlTextData:C,image:s(L),label:Q,labelText:O,lineEnding:P,link:s(M),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:_,resourceDestinationString:R,resourceTitleString:N,resource:F,setextHeading:s(S),setextHeadingLineSequence:k,setextHeadingText:x,strong:s(),thematicBreak:s()}};Ek(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const i={stack:[r],tokenStack:[],config:t,enter:l,exit:c,buffer:a,resume:u,data:n},s=[];let A=-1;for(;++A<e.length;)if("listOrdered"===e[A][1].type||"listUnordered"===e[A][1].type)if("enter"===e[A][0])s.push(A);else{A=o(e,s.pop(),A)}for(A=-1;++A<e.length;){const n=t[e[A][0]];xk.call(n,e[A][1].type)&&n[e[A][1].type].call(Object.assign({sliceSerialize:e[A][2].sliceSerialize},i),e[A][1])}if(i.tokenStack.length>0){const e=i.tokenStack[i.tokenStack.length-1];(e[1]||Pk).call(i,void 0,e[0])}for(r.position={start:Sk(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Sk(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},A=-1;++A<t.transforms.length;)r=t.transforms[A](r)||r;return r}function o(e,t,n){let r,o,i,a,l=t-1,s=-1,c=!1;for(;++l<=n;){const t=e[l];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(r&&!a&&!s&&!i&&(i=l),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=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 a=l;for(o=void 0;a--;){const t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",o=a}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||l,0,["exit",r,t[2]]),l++,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(l,0,["enter",o,t[2]]),l++,n++,i=void 0,a=!0}}}return e[t][1]._spread=c,n}function i(e,t){return n;function n(n){l.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function l(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:Sk(t.start),end:void 0}}function s(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+uw({start:e.start,end:e.end})+"): it’s not open");r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Pk).call(this,e,r[0])),n.position.end=Sk(e.end)}function u(){return function(e){return Qw(e,"boolean"!=typeof Ow.includeImageAlt||Ow.includeImageAlt,"boolean"!=typeof Ow.includeHtml||Ow.includeHtml)}(this.stack.pop())}function A(){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=Ww(this.sliceSerialize(e)).toLowerCase()}function y(){const e=this.resume();this.stack[this.stack.length-1].title=e}function b(){const e=this.resume();this.stack[this.stack.length-1].url=e}function w(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function x(){this.data.setextHeadingSlurpLineEnding=!0}function k(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function S(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];(!n||"text"!==n.type)&&(n=ae(),n.position={start:Sk(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=Sk(e.end)}function P(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=Sk(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.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 T(){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 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 L(){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(bk,wk)}(t),n.identifier=Ww(t).toLowerCase()}function Q(){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 R(){const e=this.resume();this.stack[this.stack.length-1].url=e}function N(){const e=this.resume();this.stack[this.stack.length-1].title=e}function F(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function _(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Ww(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function j(e){this.data.characterReferenceType=e.type}function H(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;n?(r=Vw(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0):r=Fw(t);this.stack[this.stack.length-1].value+=r}function U(e){this.stack.pop().position.end=Sk(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 W(){return{type:"blockquote",children:[]}}function Y(){return{type:"code",lang:null,meta:null,value:""}}function G(){return{type:"inlineCode",value:""}}function X(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function K(){return{type:"emphasis",children:[]}}function J(){return{type:"heading",depth:0,children:[]}}function $(){return{type:"break"}}function Z(){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 ae(){return{type:"text",value:""}}function le(){return{type:"thematicBreak"}}}(n)(function(e){for(;!Px(e););return e}(function(e){const t={constructs:Hw([mk,...(e||{}).extensions||[]]),content:n(sx),defined:[],document:n(cx),flow:n(rk),lazy:{},string:n(ik),text:n(ak)};return t;function n(e){return function(n){return vk(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,a){const l=[];let s,c,u,A,d;for(o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),u=0,n="",r&&(65279===o.charCodeAt(0)&&u++,r=void 0);u<o.length;){if(yk.lastIndex=u,s=yk.exec(o),A=s&&void 0!==s.index?s.index:o.length,d=o.charCodeAt(A),!s){n=o.slice(u);break}if(10===d&&u===A&&e)l.push(-3),e=void 0;else switch(e&&(l.push(-5),e=void 0),u<A&&(l.push(o.slice(u,A)),t+=A-u),d){case 0:l.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),l.push(-2);t++<c;)l.push(-1);break;case 10:l.push(-4),t=1;break;default:e=!0,t=1}u=A+1}return a&&(e&&l.push(-5),n&&l.push(n),l.push(null)),l}}()(e,t,!0))))}function Sk(e){return{line:e.line,column:e.column,offset:e.offset}}function Ek(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Ek(e,r):Ck(e,r)}}function Ck(e,t){let n;for(n in t)if(xk.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 Pk(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+uw({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+uw({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+uw({start:t.start,end:t.end})+") is still open")}function Dk(e){const t=this;t.parser=function(n){return kk(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Bk(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 a=o[o.length-1];return a&&"text"===a.type?a.value+=r:o.push({type:"text",value:r}),o}function Tk(e){return e.spread??e.children.length>1}function Ik(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(Mk(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(Mk(t.slice(o),o>0,!1)),i.join("")}function Mk(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 Lk={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=ax(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,l=e.footnoteCounts.get(r);void 0===l?(l=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,l+=1,e.footnoteCounts.set(r,l);const s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,s);const c={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,c),e.applyData(t,c)},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 Bk(e,t);const o={src:ax(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:ax(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 Bk(e,t);const o={href:ax(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:ax(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=Tk(n[r])}return t}(n):Tk(t),i={},a=[];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 l=-1;for(;++l<r.length;){const e=r[l];(o||0!==l||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?a.push(e):a.push(...e.children)}const s=r[r.length-1];s&&(o||"element"!==s.type||"p"!==s.tagName)&&a.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,c),e.applyData(t,c)},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=sw(t.children[1]),a=lw(t.children[t.children.length-1]);i&&a&&(r.position={start:i,end:a}),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,a=i?i.length:t.children.length;let l=-1;const s=[];for(;++l<a;){const n=t.children[l],r={},a=i?i[l]:void 0;a&&(r.align=a);let c={type:"element",tagName:o,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),s.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:Ik(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:Ok,yaml:Ok,definition:Ok,footnoteDefinition:Ok};function Ok(){}const Qk="object"==typeof self?self:globalThis,Rk=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case 0:case-1:return n(a,o);case 1:{const e=n([],o);for(const t of a)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of a)e[r(t)]=r(n);return e}case 3:return n(new Date(a),o);case 4:{const{source:e,flags:t}=a;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of a)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of a)e.add(r(t));return e}case 7:{const{name:e,message:t}=a;return n(new Qk[e](t),o)}case 8:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:e}=new Uint8Array(a);return n(new DataView(e),a)}}return n(new Qk[i](a),o)};return r})(new Map,e)(0),Nk="",{toString:Fk}={},{keys:zk}=Object,_k=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=Fk.call(e).slice(8,-1);switch(n){case"Array":return[1,Nk];case"Object":return[2,Nk];case"Date":return[3,Nk];case"RegExp":return[4,Nk];case"Map":return[5,Nk];case"Set":return[6,Nk];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},jk=([e,t])=>0===e&&("function"===t||"symbol"===t),Hk=(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[a,l]=_k(r);switch(a){case 0:{let t=r;switch(l){case"bigint":a=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);t=null;break;case"undefined":return o([-1],r)}return o([a,t],r)}case 1:{if(l){let e=r;return"DataView"===l?e=new Uint8Array(r.buffer):"ArrayBuffer"===l&&(e=new Uint8Array(r)),o([l,[...e]],r)}const e=[],t=o([a,e],r);for(const t of r)e.push(i(t));return t}case 2:{if(l)switch(l){case"BigInt":return o([l,r.toString()],r);case"Boolean":case"Number":case"String":return o([l,r.valueOf()],r)}if(t&&"toJSON"in r)return i(r.toJSON());const n=[],s=o([a,n],r);for(const t of zk(r))(e||!jk(_k(r[t])))&&n.push([i(t),i(r[t])]);return s}case 3:return o([a,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([a,{source:e,flags:t}],r)}case 5:{const t=[],n=o([a,t],r);for(const[n,o]of r)(e||!jk(_k(n))&&!jk(_k(o)))&&t.push([i(n),i(o)]);return n}case 6:{const t=[],n=o([a,t],r);for(const n of r)(e||!jk(_k(n)))&&t.push(i(n));return n}}const{message:s}=r;return o([a,{name:l,message:s}],r)};return i})(!(t||n),!!t,new Map,r)(e),r},Uk="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?Rk(Hk(e,t)):structuredClone(e):(e,t)=>Rk(Hk(e,t));function qk(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 Vk(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const Wk=function(e){if(null==e)return Gk;if("function"==typeof e)return Yk(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Wk(e[n]);return Yk(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 Yk(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 Yk(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function Yk(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 Gk(){return!0}const Xk=[],Kk=!0,Jk=!1;function $k(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=Wk(o),a=r?-1:1;!function e(o,l,s){const c=o&&"object"==typeof o?o:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,A,d=Xk;if((!t||i(o,l,s[s.length-1]||void 0))&&(d=function(e){return Array.isArray(e)?e:"number"==typeof e?[Kk,e]:null==e?Xk:[e]}(n(o,s)),d[0]===Jk))return d;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==d[0])for(u=(r?t.children.length:-1)+a,A=s.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,A)(),c[0]===Jk)return c;u="number"==typeof c[1]?c[1]:u+a}}return d}}(e,void 0,[])()}function Zk(e,t,n,r){let o,i,a;"function"==typeof t?(i=void 0,a=t,o=n):(i=t,a=n,o=r),$k(e,i,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return a(e,r,n)},o)}const eS={}.hasOwnProperty,tS={};function nS(e,t){const n=t||tS,r=new Map,o=new Map,i=new Map,a={...Lk,...n.handlers},l={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=l.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(!Array.isArray(o)&&"text"===o.type&&(o.value=lS(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=lS(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:oS,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:function(e,t){const n=e.type,r=l.handlers[n];if(eS.call(l.handlers,n)&&r)return r(l,e,t);if(l.options.passThrough&&l.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=Uk(n);return r.children=l.all(e),r}return Uk(e)}return(l.options.unknownHandler||iS)(l,e,t)},options:n,patch:rS,wrap:aS};return Zk(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)}}),l}function rS(e,t){e.position&&(t.position=function(e){const t=sw(e),n=lw(e);if(t&&n)return{start:t,end:n}}(e))}function oS(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,Uk(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function iS(e,t){const n=t.data||{},r=!("value"in t)||eS.call(n,"hProperties")||eS.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 aS(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 lS(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function sS(e,t){const n=nS(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||qk,r=e.options.footnoteBackLabel||Vk,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let s=-1;for(;++s<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[s]);if(!o)continue;const i=e.all(o),a=String(o.identifier).toUpperCase(),c=ax(a.toLowerCase());let u=0;const A=[],d=e.footnoteCounts.get(a);for(;void 0!==d&&++u<=d;){A.length>0&&A.push({type:"text",value:" "});let e="string"==typeof n?n:n(s,u);"string"==typeof e&&(e={type:"text",value:e}),A.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(s,u),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(...A)}else i.push(...A);const p={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(i,!0)};e.patch(o,p),l.push(p)}if(0!==l.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Uk(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!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 cS(e,t){return e&&"run"in e?async function(n,r){const o=sS(n,{file:r,...t});await e.run(o,r)}:function(n,r){return sS(n,{file:r,...e||t})}}function uS(e){if(e)throw e}var AS,dS;var fS=function(){if(dS)return AS;dS=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)},a=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},l=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return AS=function e(){var t,n,r,s,c,u,A=arguments[0],d=1,f=arguments.length,p=!1;for("boolean"==typeof A&&(p=A,A=arguments[1]||{},d=2),(null==A||"object"!=typeof A&&"function"!=typeof A)&&(A={});d<f;++d)if(null!=(t=arguments[d]))for(n in t)r=l(A,n),A!==(s=l(t,n))&&(p&&s&&(i(s)||(c=o(s)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(A,{name:n,newValue:e(p,u,s)})):typeof s<"u"&&a(A,{name:n,newValue:s}));return A},AS}();const pS=Zb(fS);function hS(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 gS(){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,...a){const l=e[++n];let s=-1;if(i)r(i);else{for(;++s<t.length;)(null===a[s]||void 0===a[s])&&(a[s]=t[s]);t=a,l?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let a;r&&t.push(o);try{a=e.apply(this,t)}catch(e){if(r&&n)throw e;return o(e)}r||(a&&a.then&&"function"==typeof a.then?a.then(i,o):a instanceof Error?o(a):i(a))}function o(e,...r){n||(n=!0,t(e,...r))}function i(e){o(null,e)}}(l,o)(...a):r(null,...a)}}(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 mS={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');vS(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 a=-1,l=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else a<0&&(n=!0,a=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(o=i):(l=-1,o=a));return r===o?o=a:o<0&&(o=e.length),e.slice(r,o)},dirname:function(e){if(vS(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){vS(e);let t,n=e.length,r=-1,o=0,i=-1,a=0;for(;n--;){const l=e.codePointAt(n);if(47!==l)r<0&&(t=!0,r=n+1),46===l?i<0?i=n:1!==a&&(a=1):i>-1&&(a=-1);else if(t){o=n+1;break}}return i<0||r<0||0===a||1===a&&i===r-1&&i===o+1?"":e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)vS(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){vS(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,a=-1,l=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(a!==s-1&&1!==l)if(a!==s-1&&2===l){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("/")),a=s,l=0;continue}}else if(o.length>0){o="",i=0,a=s,l=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(a+1,s):o=e.slice(a+1,s),i=s-a-1;a=s,l=0}else 46===n&&l>-1?l++:l=-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 vS(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const yS={cwd:function(){return"/"}};function bS(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function wS(e){if("string"==typeof e)e=new URL(e);else if(!bS(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 xS=["history","path","basename","stem","extname","dirname"];class kS{constructor(e){let t;var n;t=e?bS(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?"":yS.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r,o=-1;for(;++o<xS.length;){const e=xS[o];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(r in t)xS.includes(r)||(this[r]=t[r])}get basename(){return"string"==typeof this.path?mS.basename(this.path):void 0}set basename(e){ES(e,"basename"),SS(e,"basename"),this.path=mS.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?mS.dirname(this.path):void 0}set dirname(e){CS(this.basename,"dirname"),this.path=mS.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?mS.extname(this.path):void 0}set extname(e){if(SS(e,"extname"),CS(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=mS.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){bS(e)&&(e=wS(e)),ES(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?mS.basename(this.path,this.extname):void 0}set stem(e){ES(e,"stem"),SS(e,"stem"),this.path=mS.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 pw(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 SS(e,t){if(e&&e.includes(mS.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+mS.sep+"`")}function ES(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function CS(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const PS=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},DS={}.hasOwnProperty;class BS extends PS{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=gS()}copy(){const e=new BS;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(pS(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(LS("data",this.frozen),this.namespace[e]=t,this):DS.call(this.namespace,e)&&this.namespace[e]||void 0:e?(LS("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=RS(e),n=this.parser||this.Parser;return IS("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),IS("process",this.parser||this.Parser),MS("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=RS(e),a=n.parse(i);function l(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(a,i,function(e,t,r){if(e||!t||!r)return l(e);const o=t,i=n.stringify(o,r);var a;"string"==typeof(a=i)||function(e){return!!(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(a)?r.value=i:r.result=i,l(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),IS("processSync",this.parser||this.Parser),MS("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,uS(e),t=r}),QS("processSync","process",n),t}run(e,t,n){OS(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 a=RS(t);r.run(e,a,function(t,r,a){const l=r||e;t?i(t):o?o(l):n(void 0,l,a)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){uS(e),n=t,r=!0}),QS("runSync","run",r),n}stringify(e,t){this.freeze();const n=RS(t),r=this.compiler||this.Compiler;return MS("stringify",r),OS(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(LS("use",this.frozen),null!=e)if("function"==typeof e)l(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?a(e):i(e)}return this;function o(e){if("function"==typeof e)l(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;l(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");a(e.plugins),e.settings&&(r.settings=pS(!0,r.settings,e.settings))}function a(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 l(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 a=n[o][1];hS(a)&&hS(r)&&(r=pS(!0,a,r)),n[o]=[e,r,...i]}}}}const TS=(new BS).freeze();function IS(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function MS(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function LS(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 OS(e){if(!hS(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function QS(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function RS(e){return function(e){return!!(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new kS(e)}const NS=[],FS={allowDangerousHtml:!0},zS=/^(https?|ircs?|mailto|xmpp)$/i,_S=[{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 jS(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,a=e.disallowedElements,l=e.rehypePlugins||NS,s=e.remarkPlugins||NS,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...FS}:FS,u=e.skipHtml,A=e.unwrapDisallowed,d=e.urlTransform||HS,f=TS().use(Dk).use(s).use(cS,c).use(l),p=new kS;"string"==typeof r&&(p.value=r);for(const t of _S)Object.hasOwn(e,t.from)&&(t.from,t.to&&t.to,t.id);const h=f.parse(p);let g=f.runSync(h,p);return o&&(g={type:"element",tagName:"div",properties:{className:o},children:"root"===g.type?g.children:[g]}),Zk(g,function(e,r,o){if("raw"===e.type&&o&&"number"==typeof r)return u?o.children.splice(r,1):o.children[r]={type:"text",value:e.value},r;if("element"===e.type){let t;for(t in Lw)if(Object.hasOwn(Lw,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=Lw[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):!!a&&a.includes(e.tagName);if(!i&&n&&"number"==typeof r&&(i=!n(e,r,o)),i&&o&&"number"==typeof r)return A&&e.children?o.children.splice(r,1,...e.children):o.children.splice(r,1),r}}),xw(g,{Fragment:lA.Fragment,components:i,ignoreInvalidStyle:!0,jsx:lA.jsx,jsxs:lA.jsxs,passKeys:!0,passNode:!0})}function HS(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||zS.test(e.slice(0,t))?e:""}const US=({children:e})=>lA.jsx("div",{style:{whiteSpace:"normal"},children:lA.jsx(jS,{components:{p:({...e})=>lA.jsx("p",{style:{margin:0,marginBottom:"0.5em",lineHeight:1.4,textAlign:"left"},children:e.children}),ul:({...e})=>lA.jsx("ul",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:e.children}),ol:({...e})=>lA.jsx("ol",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:e.children}),li:({...e})=>lA.jsx("li",{style:{marginBottom:"1px",lineHeight:1.4},children:e.children}),code:({inline:e,children:t})=>e?lA.jsx("code",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"2px 4px",borderRadius:"4px",fontFamily:"inherit",fontSize:"0.95em"},children:t}):lA.jsx("pre",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"8px",borderRadius:"4px",overflowX:"auto",margin:"0.5em 0",whiteSpace:"pre-wrap"},children:lA.jsx("code",{children:t})}),blockquote:({...e})=>lA.jsx("blockquote",{style:{margin:0,paddingLeft:"10px",borderLeft:"2px solid #ccc",color:"#666",fontStyle:"italic"},children:e.children})},children:"string"==typeof e?e:""})}),qS={autoConfig:!0},VS=e=>()=>(e=>{const{getFlow:t}=By(),{messages:n,replaceMessages:r}=Ty(),{settings:o}=My(),{hasChatHistoryLoaded:i}=Oy(),a={...e,...qS},l=a.markdownComponent?a.markdownComponent:US;_.useEffect(()=>{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=l)}r(i)}},[i]);const s=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=l,e.data.message.tags||(e.data.message.tags=[]),e.data.message.tags.push("rcb-markdown-renderer-plugin:parsed"))};Iy(Pm.PRE_INJECT_MESSAGE,s),Iy(Pm.CHUNK_STREAM_MESSAGE,s),Iy(Pm.START_STREAM_MESSAGE,s),Iy(Pm.START_SIMULATE_STREAM_MESSAGE,s);const c={name:"@rcb-plugins/markdown-renderer"};return null!=a&&a.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0}}),c})(e),WS={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"}},YS=(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},GS=e=>{const{showToast:t}=(()=>{const{showToast:e,dismissToast:t,toasts:n,replaceToasts:r}=_v();return{showToast:e,dismissToast:t,toasts:n,replaceToasts:r}})(),{getFlow:n}=By(),{styles:r,updateStyles:o,replaceStyles:i}=(()=>{const{styles:e,replaceStyles:t,updateStyles:n}=yy();return{styles:e,replaceStyles:t,updateStyles:n}})(),a=(e=>({...WS,...e,promptBaseColors:{...WS.promptBaseColors},promptHoveredColors:{...WS.promptHoveredColors},textAreaHighlightColors:{...WS.textAreaHighlightColors}}))(e),[l,s]=_.useState(0),c=_.useRef({});Iy(Pm.USER_SUBMIT_TEXT,e=>{const i=e,u=YS(i,n(),"validateTextInput");if(!u)return;const A=u(i.data.inputText);if(null!=A&&A.success||e.preventDefault(),!A.promptContent)return;0===l&&(c.current=structuredClone(r));const d=((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(d),t(A.promptContent,A.promptDuration??3e3),s(e=>e+1)}),Iy(Pm.USER_UPLOAD_FILE,e=>{var r,o;const i=e,a=null==(o=null==(r=i.data)?void 0:r.files)?void 0:o[0];if(!a)return console.error("No file uploaded."),void e.preventDefault();const l=YS(i,n(),"validateFileInput");if(!l)return void console.error("Validator not found for file input.");const s=l(a);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)}),Iy(Pm.DISMISS_TOAST,()=>{s(e=>e-1)}),_.useEffect(()=>{0===l&&setTimeout(()=>{i(c.current)})},[l,i]);const u={name:"@rcb-plugins/input-validator"};return a.autoConfig&&(u.settings={event:{rcbUserSubmitText:!0,rcbUserUploadFile:!0,rcbDismissToast:!0}}),u},XS=e=>()=>GS(e);function KS(){}function JS(){}const $S=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ZS=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eE={};function tE(e,t){return(eE.jsx?ZS:$S).test(e)}const nE=/[ \t\n\f\r]/g;function rE(e){return""===e.replace(nE,"")}class oE{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function iE(e,t){const n={},r={};for(const t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new oE(n,r,t)}function aE(e){return e.toLowerCase()}oE.prototype.normal={},oE.prototype.property={},oE.prototype.space=void 0;class lE{constructor(e,t){this.attribute=t,this.property=e}}lE.prototype.attribute="",lE.prototype.booleanish=!1,lE.prototype.boolean=!1,lE.prototype.commaOrSpaceSeparated=!1,lE.prototype.commaSeparated=!1,lE.prototype.defined=!1,lE.prototype.mustUseProperty=!1,lE.prototype.number=!1,lE.prototype.overloadedBoolean=!1,lE.prototype.property="",lE.prototype.spaceSeparated=!1,lE.prototype.space=void 0;let sE=0;const cE=gE(),uE=gE(),AE=gE(),dE=gE(),fE=gE(),pE=gE(),hE=gE();function gE(){return 2**++sE}var mE=Object.freeze({__proto__:null,boolean:cE,booleanish:uE,commaOrSpaceSeparated:hE,commaSeparated:pE,number:dE,overloadedBoolean:AE,spaceSeparated:fE});const vE=Object.keys(mE);class yE extends lE{constructor(e,t,n,r){let o=-1;if(super(e,t),bE(this,"space",r),"number"==typeof n)for(;++o<vE.length;){const e=vE[o];bE(this,vE[o],(n&mE[e])===mE[e])}}}function bE(e,t,n){n&&(e[t]=n)}function wE(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new yE(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[aE(r)]=r,n[aE(i.attribute)]=r}return new oE(t,n,e.space)}yE.prototype.defined=!0;const xE=wE({properties:{ariaActiveDescendant:null,ariaAtomic:uE,ariaAutoComplete:null,ariaBusy:uE,ariaChecked:uE,ariaColCount:dE,ariaColIndex:dE,ariaColSpan:dE,ariaControls:fE,ariaCurrent:null,ariaDescribedBy:fE,ariaDetails:null,ariaDisabled:uE,ariaDropEffect:fE,ariaErrorMessage:null,ariaExpanded:uE,ariaFlowTo:fE,ariaGrabbed:uE,ariaHasPopup:null,ariaHidden:uE,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:fE,ariaLevel:dE,ariaLive:null,ariaModal:uE,ariaMultiLine:uE,ariaMultiSelectable:uE,ariaOrientation:null,ariaOwns:fE,ariaPlaceholder:null,ariaPosInSet:dE,ariaPressed:uE,ariaReadOnly:uE,ariaRelevant:null,ariaRequired:uE,ariaRoleDescription:fE,ariaRowCount:dE,ariaRowIndex:dE,ariaRowSpan:dE,ariaSelected:uE,ariaSetSize:dE,ariaSort:null,ariaValueMax:dE,ariaValueMin:dE,ariaValueNow:dE,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function kE(e,t){return t in e?e[t]:t}function SE(e,t){return kE(e,t.toLowerCase())}const EE=wE({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:pE,acceptCharset:fE,accessKey:fE,action:null,allow:null,allowFullScreen:cE,allowPaymentRequest:cE,allowUserMedia:cE,alt:null,as:null,async:cE,autoCapitalize:null,autoComplete:fE,autoFocus:cE,autoPlay:cE,blocking:fE,capture:null,charSet:null,checked:cE,cite:null,className:fE,cols:dE,colSpan:null,content:null,contentEditable:uE,controls:cE,controlsList:fE,coords:dE|pE,crossOrigin:null,data:null,dateTime:null,decoding:null,default:cE,defer:cE,dir:null,dirName:null,disabled:cE,download:AE,draggable:uE,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:cE,formTarget:null,headers:fE,height:dE,hidden:AE,high:dE,href:null,hrefLang:null,htmlFor:fE,httpEquiv:fE,id:null,imageSizes:null,imageSrcSet:null,inert:cE,inputMode:null,integrity:null,is:null,isMap:cE,itemId:null,itemProp:fE,itemRef:fE,itemScope:cE,itemType:fE,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:cE,low:dE,manifest:null,max:null,maxLength:dE,media:null,method:null,min:null,minLength:dE,multiple:cE,muted:cE,name:null,nonce:null,noModule:cE,noValidate:cE,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:cE,optimum:dE,pattern:null,ping:fE,placeholder:null,playsInline:cE,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:cE,referrerPolicy:null,rel:fE,required:cE,reversed:cE,rows:dE,rowSpan:dE,sandbox:fE,scope:null,scoped:cE,seamless:cE,selected:cE,shadowRootClonable:cE,shadowRootDelegatesFocus:cE,shadowRootMode:null,shape:null,size:dE,sizes:null,slot:null,span:dE,spellCheck:uE,src:null,srcDoc:null,srcLang:null,srcSet:null,start:dE,step:null,style:null,tabIndex:dE,target:null,title:null,translate:null,type:null,typeMustMatch:cE,useMap:null,value:uE,width:dE,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:fE,axis:null,background:null,bgColor:null,border:dE,borderColor:null,bottomMargin:dE,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:cE,declare:cE,event:null,face:null,frame:null,frameBorder:null,hSpace:dE,leftMargin:dE,link:null,longDesc:null,lowSrc:null,marginHeight:dE,marginWidth:dE,noResize:cE,noHref:cE,noShade:cE,noWrap:cE,object:null,profile:null,prompt:null,rev:null,rightMargin:dE,rules:null,scheme:null,scrolling:uE,standby:null,summary:null,text:null,topMargin:dE,valueType:null,version:null,vAlign:null,vLink:null,vSpace:dE,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:cE,disableRemotePlayback:cE,prefix:null,property:null,results:dE,security:null,unselectable:null},space:"html",transform:SE}),CE=wE({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:hE,accentHeight:dE,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:dE,amplitude:dE,arabicForm:null,ascent:dE,attributeName:null,attributeType:null,azimuth:dE,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:dE,by:null,calcMode:null,capHeight:dE,className:fE,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:dE,diffuseConstant:dE,direction:null,display:null,dur:null,divisor:dE,dominantBaseline:null,download:cE,dx:null,dy:null,edgeMode:null,editable:null,elevation:dE,enableBackground:null,end:null,event:null,exponent:dE,externalResourcesRequired:null,fill:null,fillOpacity:dE,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:pE,g2:pE,glyphName:pE,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:dE,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:dE,horizOriginX:dE,horizOriginY:dE,id:null,ideographic:dE,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:dE,k:dE,k1:dE,k2:dE,k3:dE,k4:dE,kernelMatrix:hE,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:dE,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:dE,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:dE,overlineThickness:dE,paintOrder:null,panose1:null,path:null,pathLength:dE,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:fE,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:dE,pointsAtY:dE,pointsAtZ:dE,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:hE,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:hE,rev:hE,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:hE,requiredFeatures:hE,requiredFonts:hE,requiredFormats:hE,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:dE,specularExponent:dE,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:dE,strikethroughThickness:dE,string:null,stroke:null,strokeDashArray:hE,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:dE,strokeOpacity:dE,strokeWidth:null,style:null,surfaceScale:dE,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:hE,tabIndex:dE,tableValues:null,target:null,targetX:dE,targetY:dE,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:hE,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:dE,underlineThickness:dE,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:dE,values:null,vAlphabetic:dE,vMathematical:dE,vectorEffect:null,vHanging:dE,vIdeographic:dE,version:null,vertAdvY:dE,vertOriginX:dE,vertOriginY:dE,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:dE,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:kE}),PE=wE({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()}),DE=wE({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:SE}),BE=wE({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),TE={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"},IE=/[A-Z]/g,ME=/-[a-z]/g,LE=/^data[-\w.:]+$/i;function OE(e){return"-"+e.toLowerCase()}function QE(e){return e.charAt(1).toUpperCase()}const RE=iE([xE,EE,PE,DE,BE],"html"),NE=iE([xE,CE,PE,DE,BE],"svg");var FE={},zE=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,_E=/\n/g,jE=/^\s*/,HE=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,UE=/^:\s*/,qE=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,VE=/^[;\s]*/,WE=/^\s+|\s+$/g,YE="";function GE(e){return e?e.replace(WE,YE):YE}var XE=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(FE,"__esModule",{value:!0}),FE.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,KE.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 KE=XE(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(_E);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 a(e),c(),t}}function a(e){this.start=e,this.end={line:n,column:r},this.source=t.source}function l(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 c(){s(jE)}function u(e){var t;for(e=e||[];t=A();)!1!==t&&e.push(t);return e}function A(){var t=i();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;YE!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,YE===e.charAt(n-1))return l("End of comment missing");var a=e.slice(2,n-2);return r+=2,o(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function d(){var e=i(),t=s(HE);if(t){if(A(),!s(UE))return l("property missing ':'");var n=s(qE),r=e({type:"declaration",property:GE(t[0].replace(zE,YE)),value:n?GE(n[0].replace(zE,YE)):YE});return s(VE),r}}return a.prototype.content=e,c(),function(){var e,t=[];for(u(t);e=d();)!1!==e&&(t.push(e),u(t));return t}()});var JE={};Object.defineProperty(JE,"__esModule",{value:!0}),JE.camelCase=void 0;var $E=/^--[a-zA-Z0-9_-]+$/,ZE=/-([a-z])/g,eC=/^[^-]+$/,tC=/^-(webkit|moz|ms|o|khtml)-/,nC=/^-(ms)-/,rC=function(e,t){return t.toUpperCase()},oC=function(e,t){return"".concat(t,"-")};JE.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||eC.test(e)||$E.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(nC,oC):e.replace(tC,oC)).replace(ZE,rC))};var iC=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(FE),aC=JE;function lC(e,t){var n={};return e&&"string"==typeof e?((0,iC.default)(e,function(e,r){e&&r&&(n[(0,aC.camelCase)(e,t)]=r)}),n):n}lC.default=lC;var sC=r(lC);const cC=AC("end"),uC=AC("start");function AC(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 dC(e){return e&&"object"==typeof e?"position"in e||"type"in e?pC(e.position):"start"in e||"end"in e?pC(e):"line"in e||"column"in e?fC(e):"":""}function fC(e){return hC(e&&e.line)+":"+hC(e&&e.column)}function pC(e){return fC(e&&e.start)+"-"+fC(e&&e.end)}function hC(e){return e&&"number"==typeof e?e:1}class gC 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 a=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=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=a?a.line:void 0,this.name=dC(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}}gC.prototype.file="",gC.prototype.name="",gC.prototype.reason="",gC.prototype.message="",gC.prototype.stack="",gC.prototype.column=void 0,gC.prototype.line=void 0,gC.prototype.ancestors=void 0,gC.prototype.cause=void 0,gC.prototype.fatal=void 0,gC.prototype.place=void 0,gC.prototype.ruleId=void 0,gC.prototype.source=void 0;const mC={}.hasOwnProperty,vC=new Map,yC=/[A-Z]/g,bC=new Set(["table","tbody","thead","tfoot","tr"]),wC=new Set(["td","th"]),xC="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function kC(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 a=Array.isArray(o.children),l=uC(n);return t(r,o,i,a,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.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 a=Array.isArray(o.children)?n:t;return i?a(r,o,i):a(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?NE:RE,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=SC(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function SC(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=NE,e.schema=o);e.ancestors.push(t);const i=BC(e,t.tagName,!1),a=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&mC.call(t.properties,o)){const i=DC(e,o,t.properties[o]);if(i){const[o,a]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof a&&wC.has(t.tagName)?r=a:n[o]=a}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let l=PC(e,t);bC.has(t.tagName)&&(l=l.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&rE(t.value):rE(t));var t}));return EC(e,a,i,t),CC(a,l),e.ancestors.pop(),e.schema=r,e.create(t,i,a,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)}TC(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=NE,e.schema=o);e.ancestors.push(t);const i=null===t.name?e.Fragment:BC(e,t.name,!0),a=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];KS(t.type);const o=t.expression;KS(o.type);const i=o.properties[0];KS(i.type),Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else TC(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];KS(t.type),i=e.evaluater.evaluateExpression(t.expression)}else TC(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),l=PC(e,t);return EC(e,a,i,t),CC(a,l),e.ancestors.pop(),e.schema=r,e.create(t,i,a,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);TC(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return CC(r,PC(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 EC(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function CC(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function PC(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:vC;for(;++r<t.children.length;){const i=t.children[r];let a;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;a=e+"-"+t,o.set(e,t+1)}}const l=SC(e,i,a);void 0!==l&&n.push(l)}return n}function DC(e,t,n){const r=function(e,t){const n=aE(t);let r=t,o=lE;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&LE.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(ME,QE);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!ME.test(e)){let n=e.replace(IE,OE);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=yE}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 sC(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const n=t,r=new gC("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=xC+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)mC.call(e,n)&&(t[IC(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?TE[r.property]||r.property:r.attribute,n]}}function BC(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=tE(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=tE(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 mC.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);TC(e)}function TC(e,t){const n=new gC("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=xC+"#cannot-handle-mdx-estrees-without-createevaluater",n}function IC(e){let t=e.replace(yC,MC);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function MC(e){return"-"+e.toLowerCase()}const LC={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"]},OC={};function QC(e,t){return RC(e,"boolean"!=typeof OC.includeImageAlt||OC.includeImageAlt,"boolean"!=typeof OC.includeHtml||OC.includeHtml)}function RC(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 NC(e.children,t,n)}return Array.isArray(e)?NC(e,t,n):""}function NC(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=RC(e[o],t,n);return r.join("")}const FC=document.createElement("i");function zC(e){const t="&"+e+";";FC.innerHTML=t;const n=FC.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function _C(e,t,n,r){const o=e.length;let i,a=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);a<r.length;)i=r.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function jC(e,t){return e.length>0?(_C(e,e.length,0,t),e):t}const HC={}.hasOwnProperty;function UC(e){const t={};let n=-1;for(;++n<e.length;)qC(t,e[n]);return t}function qC(e,t){let n;for(n in t){const r=(HC.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){HC.call(r,i)||(r[i]=[]);const e=o[i];VC(r[i],Array.isArray(e)?e:e?[e]:[])}}}function VC(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);_C(e,0,0,r)}function WC(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 YC(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const GC=aP(/[A-Za-z]/),XC=aP(/[\dA-Za-z]/),KC=aP(/[#-'*+\--9=?A-Z^-~]/);function JC(e){return null!==e&&(e<32||127===e)}const $C=aP(/\d/),ZC=aP(/[\dA-Fa-f]/),eP=aP(/[!-/:-@[-`{-~]/);function tP(e){return null!==e&&e<-2}function nP(e){return null!==e&&(e<0||32===e)}function rP(e){return-2===e||-1===e||32===e}const oP=aP(/\p{P}|\p{S}/u),iP=aP(/\s/);function aP(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function lP(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(37===i&&XC(e.charCodeAt(n+1))&&XC(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(a=String.fromCharCode(i,t),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function sP(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){if(rP(r))return e.enter(n),a(r);return t(r)};function a(r){return rP(r)&&i++<o?(e.consume(r),a):(e.exit(n),t(r))}}const cP={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"),sP(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)):tP(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const uP={tokenize:function(e){const t=this,n=[];let r,o,i,a=0;return l;function l(r){if(a<n.length){const o=n[a];return t.containerState=o[1],e.attempt(o[0].continuation,s,c)(r)}return c(r)}function s(e){if(a++,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(a);let l=n;for(;l<t.events.length;)t.events[l][1].end={...o},l++;return _C(t.events,i+1,0,t.events.slice(n)),t.events.length=l,c(e)}return l(e)}function c(o){if(a===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(AP,u,A)(o)}function u(e){return r&&v(),m(a),d(e)}function A(e){return t.parser.lazy[t.now().line]=a!==n.length,i=t.now().offset,p(e)}function d(n){return t.containerState={},e.attempt(AP,f,p)(n)}function f(e){return a++,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)):tP(n)?(e.consume(n),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,l):(e.consume(n),h)}function g(e,n){const l=t.sliceStream(e);if(n&&l.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(l),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,l,s=n;for(;s--;)if("exit"===t.events[s][0]&&"chunkFlow"===t.events[s][1].type){if(o){l=t.events[s][1].end;break}o=!0}for(m(a),e=n;e<t.events.length;)t.events[e][1].end={...l},e++;_C(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}}},AP={tokenize:function(e,t,n){return sP(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function dP(e){return null===e||nP(e)||iP(e)?1:oP(e)?2:void 0}function fP(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 pP={name:"attention",resolveAll:function(e,t){let n,r,o,i,a,l,s,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;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[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const A={...e[n][1].end},d={...e[u][1].start};hP(A,-l),hP(d,l),i={type:l>1?"strongSequence":"emphasisSequence",start:A,end:{...e[n][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:d},o={type:l>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:l>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},e[n][1].end={...i.start},e[u][1].start={...a.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=jC(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=jC(s,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),s=jC(s,fP(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),s=jC(s,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,s=jC(s,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,_C(e,n-1,u-n+3,s),u=n+s.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=dP(r);let i;return function(t){return i=t,e.enter("attentionSequence"),a(t)};function a(l){if(l===i)return e.consume(l),a;const s=e.exit("attentionSequence"),c=dP(l),u=!c||2===c&&o||n.includes(l),A=!o||2===o&&c||n.includes(r);return s._open=Boolean(42===i?u:u&&(o||!A)),s._close=Boolean(42===i?A:A&&(c||!u)),t(l)}}};function hP(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const gP={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 GC(t)?(e.consume(t),i):64===t?n(t):s(t)}function i(e){return 43===e||45===e||46===e||XC(e)?(r=1,a(e)):s(e)}function a(t){return 58===t?(e.consume(t),r=0,l):(43===t||45===t||46===t||XC(t))&&r++<32?(e.consume(t),a):(r=0,s(t))}function l(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||JC(r)?n(r):(e.consume(r),l)}function s(t){return 64===t?(e.consume(t),c):KC(t)?(e.consume(t),s):n(t)}function c(e){return XC(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):A(n)}function A(t){if((45===t||XC(t))&&r++<63){const n=45===t?A:u;return e.consume(t),n}return n(t)}}};const mP={partial:!0,tokenize:function(e,t,n){return function(t){return rP(t)?sP(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||tP(e)?t(e):n(e)}}};const vP={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(rP(t))return sP(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(vP,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 rP(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const yP={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 eP(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const bP={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),l};function l(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),o=31,i=XC,c(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=ZC,c):(e.enter("characterReferenceValue"),o=7,i=$C,c(t))}function c(l){if(59===l&&a){const o=e.exit("characterReferenceValue");return i!==XC||zC(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(l),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(l)}return i(l)&&a++<o?(e.consume(l),c):n(l)}}};const wP={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)}}},xP={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return a;function a(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s}function s(t){return e.enter("codeFencedFence"),rP(t)?sP(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===i?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===i?(o++,e.consume(t),u):o>=l?(e.exit("codeFencedFenceSequence"),rP(t)?sP(e,A,"whitespace")(t):A(t)):n(t)}function A(r){return null===r||tP(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let i,a=0,l=0;return function(t){return function(t){const n=r.events[r.events.length-1];return a=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?(l++,e.consume(t),s):l<3?n(t):(e.exit("codeFencedFenceSequence"),rP(t)?sP(e,c,"whitespace")(t):c(t))}function c(n){return null===n||tP(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(wP,f,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||tP(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):rP(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),sP(e,A,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),u)}function A(t){return null===t||tP(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||tP(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(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 a>0&&rP(t)?sP(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||tP(t)?e.check(wP,f,v)(t):(e.enter("codeFlowValue"),m(t))}function m(t){return null===t||tP(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),m)}function v(n){return e.exit("codeFenced"),t(n)}}};const kP={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),sP(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?l(t):tP(t)?e.attempt(SP,i,l)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||tP(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),a)}function l(n){return e.exit("codeIndented"),t(n)}}},SP={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):tP(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):sP(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):tP(e)?o(e):n(e)}}};const EP={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"),a(t)};function a(t){return 96===t?(e.consume(t),i++,a):(e.exit("codeTextSequence"),l(t))}function l(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),l):96===t?(o=e.enter("codeTextSequence"),r=0,c(t)):tP(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):(e.enter("codeTextData"),s(t))}function s(t){return null===t||32===t||96===t||tP(t)?(e.exit("codeTextData"),l(t)):(e.consume(t),s)}function c(n){return 96===n?(e.consume(n),r++,c):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",s(n))}}};class CP{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&&PP(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),PP(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),PP(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);PP(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);PP(this.left,t.reverse())}}}function PP(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 DP(e){const t={};let n,r,o,i,a,l,s,c=-1;const u=new CP(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(l=n[1]._tokenizer.events,o=0,o<l.length&&"lineEndingBlank"===l[o][1].type&&(o+=2),o<l.length&&"content"===l[o][1].type))for(;++o<l.length&&"content"!==l[o][1].type;)"chunkText"===l[o][1].type&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,BP(u,c)),c=t[c],s=!0);else if(n[1]._container){for(o=c,r=void 0;o--;)if(i=u.get(o),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(r&&(u.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={...u.get(r)[1].start},a=u.slice(r,c),a.unshift(n),u.splice(r,c-r+1,a))}}return _C(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!s}function BP(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const l=a.events,s=[],c={};let u,A,d=-1,f=n,p=0,h=0;const g=[h];for(;f;){for(;e.get(++o)[1]!==f;);i.push(o),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),A&&a.defineSkip(f.start),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),A=f,f=f.next}for(f=n;++d<l.length;)"exit"===l[d][0]&&"enter"===l[d-1][0]&&l[d][1].type===l[d-1][1].type&&l[d][1].start.line!==l[d][1].end.line&&(h=d+1,g.push(h),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(a.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),d=g.length;d--;){const t=l.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;)c[p+s[d][0]]=p+s[d][1],p+=s[d][1]-s[d][0]-1;return c}const TP={resolve:function(e){return DP(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):tP(t)?e.check(IP,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}}},IP={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"),sP(e,o,"linePrefix")};function o(o){if(null===o||tP(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 MP(e,t,n,r,o,i,a,l,s){const c=s||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),A;if(null===t||32===t||41===t||JC(t))return n(t);return e.enter(r),e.enter(a),e.enter(l),e.enter("chunkString",{contentType:"string"}),p(t)};function A(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(l),A(t)):null===t||60===t||tP(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 u||null!==o&&41!==o&&!nP(o)?u<c&&40===o?(e.consume(o),u++,p):41===o?(e.consume(o),u--,p):null===o||32===o||40===o||JC(o)?n(o):(e.consume(o),92===o?h:p):(e.exit("chunkString"),e.exit(l),e.exit(a),e.exit(r),t(o))}function h(t){return 40===t||41===t||92===t?(e.consume(t),p):p(t)}}function LP(e,t,n,r,o,i){const a=this;let l,s=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),c};function c(A){return s>999||null===A||91===A||93===A&&!l||94===A&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(A):93===A?(e.exit(i),e.enter(o),e.consume(A),e.exit(o),e.exit(r),t):tP(A)?(e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(A))}function u(t){return null===t||91===t||93===t||tP(t)||s++>999?(e.exit("chunkString"),c(t)):(e.consume(t),l||(l=!rP(t)),92===t?A:u)}function A(t){return 91===t||92===t||93===t?(e.consume(t),s++,u):u(t)}}function OP(e,t,n,r,o,i){let a;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(o),e.consume(t),e.exit(o),a=40===t?41:t,l;return n(t)};function l(n){return n===a?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),s(n))}function s(t){return t===a?(e.exit(i),l(a)):null===t?n(t):tP(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),sP(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||tP(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?u:c)}function u(t){return t===a||92===t?(e.consume(t),c):c(t)}}function QP(e,t){let n;return function r(o){if(tP(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(rP(o))return sP(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}const RP={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return LP.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=YC(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return nP(t)?QP(e,l)(t):l(t)}function l(t){return MP(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(NP,c,c)(t)}function c(t){return rP(t)?sP(e,u,"whitespace")(t):u(t)}function u(i){return null===i||tP(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},NP={partial:!0,tokenize:function(e,t,n){return function(t){return nP(t)?QP(e,r)(t):n(t)};function r(t){return OP(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return rP(t)?sP(e,i,"whitespace")(t):i(t)}function i(e){return null===e||tP(e)?t(e):n(e)}}};const FP={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return tP(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const zP={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"},_C(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||nP(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||tP(n)?(e.exit("atxHeading"),t(n)):rP(n)?sP(e,i,"whitespace")(n):(e.enter("atxHeadingText"),l(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),i(t))}function l(t){return null===t||35===t||nP(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),l)}}};const _P=["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"],jP=["pre","script","style","textarea"],HP={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,a,l,s;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(l){return 33===l?(e.consume(l),u):47===l?(e.consume(l),i=!0,f):63===l?(e.consume(l),o=3,r.interrupt?t:O):GC(l)?(e.consume(l),a=String.fromCharCode(l),p):n(l)}function u(i){return 45===i?(e.consume(i),o=2,A):91===i?(e.consume(i),o=5,l=0,d):GC(i)?(e.consume(i),o=4,r.interrupt?t:O):n(i)}function A(o){return 45===o?(e.consume(o),r.interrupt?t:O):n(o)}function d(o){const i="CDATA[";return o===i.charCodeAt(l++)?(e.consume(o),6===l?r.interrupt?t:C:d):n(o)}function f(t){return GC(t)?(e.consume(t),a=String.fromCharCode(t),p):n(t)}function p(l){if(null===l||47===l||62===l||nP(l)){const s=47===l,c=a.toLowerCase();return s||i||!jP.includes(c)?_P.includes(a.toLowerCase())?(o=6,s?(e.consume(l),h):r.interrupt?t(l):C(l)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(l):i?g(l):m(l)):(o=1,r.interrupt?t(l):C(l))}return 45===l||XC(l)?(e.consume(l),a+=String.fromCharCode(l),p):n(l)}function h(o){return 62===o?(e.consume(o),r.interrupt?t:C):n(o)}function g(t){return rP(t)?(e.consume(t),g):S(t)}function m(t){return 47===t?(e.consume(t),S):58===t||95===t||GC(t)?(e.consume(t),v):rP(t)?(e.consume(t),m):S(t)}function v(t){return 45===t||46===t||58===t||95===t||XC(t)?(e.consume(t),v):y(t)}function y(t){return 61===t?(e.consume(t),b):rP(t)?(e.consume(t),y):m(t)}function b(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),s=t,w):rP(t)?(e.consume(t),b):x(t)}function w(t){return t===s?(e.consume(t),s=null,k):null===t||tP(t)?n(t):(e.consume(t),w)}function x(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||nP(t)?y(t):(e.consume(t),x)}function k(e){return 47===e||62===e||rP(e)?m(e):n(e)}function S(t){return 62===t?(e.consume(t),E):n(t)}function E(t){return null===t||tP(t)?C(t):rP(t)?(e.consume(t),E):n(t)}function C(t){return 45===t&&2===o?(e.consume(t),T):60===t&&1===o?(e.consume(t),I):62===t&&4===o?(e.consume(t),Q):63===t&&3===o?(e.consume(t),O):93===t&&5===o?(e.consume(t),L):!tP(t)||6!==o&&7!==o?null===t||tP(t)?(e.exit("htmlFlowData"),P(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(UP,R,P)(t))}function P(t){return e.check(qP,D,R)(t)}function D(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),B}function B(t){return null===t||tP(t)?P(t):(e.enter("htmlFlowData"),C(t))}function T(t){return 45===t?(e.consume(t),O):C(t)}function I(t){return 47===t?(e.consume(t),a="",M):C(t)}function M(t){if(62===t){const n=a.toLowerCase();return jP.includes(n)?(e.consume(t),Q):C(t)}return GC(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),M):C(t)}function L(t){return 93===t?(e.consume(t),O):C(t)}function O(t){return 62===t?(e.consume(t),Q):45===t&&2===o?(e.consume(t),O):C(t)}function Q(t){return null===t||tP(t)?(e.exit("htmlFlowData"),R(t)):(e.consume(t),Q)}function R(n){return e.exit("htmlFlow"),t(n)}}},UP={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(mP,t,n)}}},qP={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(tP(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 VP={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),l};function l(t){return 33===t?(e.consume(t),s):47===t?(e.consume(t),b):63===t?(e.consume(t),v):GC(t)?(e.consume(t),k):n(t)}function s(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,f):GC(t)?(e.consume(t),m):n(t)}function c(t){return 45===t?(e.consume(t),d):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),A):tP(t)?(a=u,M(t)):(e.consume(t),u)}function A(t){return 45===t?(e.consume(t),d):u(t)}function d(e){return 62===e?I(e):45===e?A(e):u(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):tP(t)?(a=p,M(t)):(e.consume(t),p)}function h(t){return 93===t?(e.consume(t),g):p(t)}function g(t){return 62===t?I(t):93===t?(e.consume(t),g):p(t)}function m(t){return null===t||62===t?I(t):tP(t)?(a=m,M(t)):(e.consume(t),m)}function v(t){return null===t?n(t):63===t?(e.consume(t),y):tP(t)?(a=v,M(t)):(e.consume(t),v)}function y(e){return 62===e?I(e):v(e)}function b(t){return GC(t)?(e.consume(t),w):n(t)}function w(t){return 45===t||XC(t)?(e.consume(t),w):x(t)}function x(t){return tP(t)?(a=x,M(t)):rP(t)?(e.consume(t),x):I(t)}function k(t){return 45===t||XC(t)?(e.consume(t),k):47===t||62===t||nP(t)?S(t):n(t)}function S(t){return 47===t?(e.consume(t),I):58===t||95===t||GC(t)?(e.consume(t),E):tP(t)?(a=S,M(t)):rP(t)?(e.consume(t),S):I(t)}function E(t){return 45===t||46===t||58===t||95===t||XC(t)?(e.consume(t),E):C(t)}function C(t){return 61===t?(e.consume(t),P):tP(t)?(a=C,M(t)):rP(t)?(e.consume(t),C):S(t)}function P(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,D):tP(t)?(a=P,M(t)):rP(t)?(e.consume(t),P):(e.consume(t),B)}function D(t){return t===o?(e.consume(t),o=void 0,T):null===t?n(t):tP(t)?(a=D,M(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||nP(t)?S(t):(e.consume(t),B)}function T(e){return 47===e||62===e||nP(e)?S(e):n(e)}function I(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function M(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),L}function L(t){return rP(t)?sP(e,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):O(t)}function O(t){return e.enter("htmlTextData"),a(t)}}};const WP={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&&_C(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,o,i,a=e.length,l=0;for(;a--;)if(n=e[a][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[a][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[a][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=a,"labelLink"!==n.type)){l=2;break}}else"labelEnd"===n.type&&(o=a);const s={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[r+l+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",s,t],["enter",c,t]],i=jC(i,e.slice(r+1,r+l+3)),i=jC(i,[["enter",u,t]]),i=jC(i,fP(t.parser.constructs.insideSpan.null,e.slice(r+l+4,o-3),t)),i=jC(i,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),i=jC(i,e.slice(o+1)),i=jC(i,[["exit",s,t]]),_C(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,a=r.events.length;for(;a--;)if(("labelImage"===r.events[a][1].type||"labelLink"===r.events[a][1].type)&&!r.events[a][1]._balanced){o=r.events[a][1];break}return function(t){if(!o)return n(t);if(o._inactive)return u(t);return i=r.parser.defined.includes(YC(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),l};function l(t){return 40===t?e.attempt(YP,c,i?c:u)(t):91===t?e.attempt(GP,c,i?s:u)(t):i?c(t):u(t)}function s(t){return e.attempt(XP,c,u)(t)}function c(e){return t(e)}function u(e){return o._balanced=!0,n(e)}}},YP={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 nP(t)?QP(e,o)(t):o(t)}function o(t){return 41===t?c(t):MP(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return nP(t)?QP(e,l)(t):c(t)}function a(e){return n(e)}function l(t){return 34===t||39===t||40===t?OP(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function s(t){return nP(t)?QP(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},GP={tokenize:function(e,t,n){const r=this;return function(t){return LP.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(YC(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},XP={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 KP={name:"labelStartImage",resolveAll:WP.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 JP={name:"labelStartLink",resolveAll:WP.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 $P={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),sP(e,t,"linePrefix")}}};const ZP={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"),a(i)):o>=3&&(null===i||tP(i))?(e.exit("thematicBreak"),t(i)):n(i)}function a(t){return t===r?(e.consume(t),o++,a):(e.exit("thematicBreakSequence"),rP(t)?sP(e,i,"whitespace")(t):i(t))}}};const eD={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(mP,o,i);function o(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,sP(e,t,"listItemIndent",r.containerState.size+1)(n)}function i(n){return r.containerState.furtherBlankLines||!rP(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(nD,t,a)(n))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,sP(e,e.attempt(eD,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,a=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:$C(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(ZP,n,s)(t):s(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(t)}return n(t)};function l(t){return $C(t)&&++a<10?(e.consume(t),l):(!r.interrupt||a<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(mP,r.interrupt?n:c,e.attempt(tD,A,u))}function c(e){return r.containerState.initialBlankLine=!0,i++,A(e)}function u(t){return rP(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),A):n(t)}function A(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},tD={partial:!0,tokenize:function(e,t,n){const r=this;return sP(e,function(e){const o=r.events[r.events.length-1];return!rP(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},nD={partial:!0,tokenize:function(e,t,n){const r=this;return sP(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 rD={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 a={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",a,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=a;return e.push(["exit",a,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let a,l=r.events.length;for(;l--;)if("lineEnding"!==r.events[l][1].type&&"linePrefix"!==r.events[l][1].type&&"content"!==r.events[l][1].type){a="paragraph"===r.events[l][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||a))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"),rP(t)?sP(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||tP(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const oD={tokenize:function(e){const t=this,n=e.attempt(mP,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,sP(e,e.attempt(this.parser.constructs.flow,r,e.attempt(TP,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 iD={resolveAll:cD()},aD=sD("string"),lD=sD("text");function sD(e){return{resolveAll:cD("text"===e?uD:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,a);return i;function i(e){return s(e)?o(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),l;t.consume(e)}function l(e){return s(e)?(t.exit("data"),o(e)):(t.consume(e),l)}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 cD(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 uD(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,a=o.length,l=-1,s=0;for(;a--;){const e=o[a];if("string"==typeof e){for(l=e.length;32===e.charCodeAt(l-1);)s++,l--;if(l)break;l=-1}else if(-2===e)i=!0,s++;else if(-1!==e){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const o={type:n===e.length||i||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,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 AD={42:eD,43:eD,45:eD,48:eD,49:eD,50:eD,51:eD,52:eD,53:eD,54:eD,55:eD,56:eD,57:eD,62:vP},dD={91:RP},fD={[-2]:kP,[-1]:kP,32:kP},pD={35:zP,42:ZP,45:[rD,ZP],60:HP,61:rD,95:ZP,96:xP,126:xP},hD={38:bP,92:yP},gD={[-5]:$P,[-4]:$P,[-3]:$P,33:KP,38:bP,42:pP,60:[gP,VP],91:JP,92:[FP,yP],93:WP,95:pP,96:EP},mD={null:[pP,iD]};var vD=Object.freeze({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:dD,disable:{null:[]},document:AD,flow:pD,flowInitial:fD,insideSpan:mD,string:hD,text:gD});function yD(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 a=[],l=[];const s={attempt:g(function(e,t){m(e,t.from)}),check:g(h),consume:function(e){tP(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===a[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=d(),c.events.push(["enter",n,c]),l.push(n),n},exit:function(e){const t=l.pop();return t.end=d(),c.events.push(["exit",t,c]),t},interrupt:g(h,{interrupt:!0})},c={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 a;if("string"==typeof i)a=i;else switch(i){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&o)continue;a=" ";break;default:a=String.fromCharCode(i)}o=-2===i,r.push(a)}return r.join("")}(A(e),t)},sliceStream:A,write:function(e){if(a=jC(a,e),f(),null!==a[a.length-1])return[];return m(t,0),c.events=fP(i,c.events,c),c.events}};let u=t.tokenize.call(c,s);return t.resolveAll&&i.push(t),c;function A(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}(a,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<a.length;){const t=a[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){u=u(e)}function h(e,t){t.restore()}function g(e,t){return function(n,o,i){let a,u,A,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 a=e,u=0,0===e.length?i:h(e[u])}function h(e){return function(n){f=function(){const e=d(),t=c.previous,n=c.currentConstruct,o=c.events.length,i=Array.from(l);return{from:o,restore:a};function a(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=o,l=i,v()}}(),A=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return m();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,s,g,m)(n)}}function g(t){return e(A,f),o}function m(e){return f.restore(),++u<a.length?h(a[u]):i}}}function m(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&_C(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function v(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const bD=/[\0\t\n\r]/g;const wD=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function xD(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return WC(n.slice(t?2:1),t?16:10)}return zC(n)||e}const kD={}.hasOwnProperty;function SD(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:E,autolinkEmail:E,atxHeading:i(J),blockQuote:i(W),characterEscape:E,characterReference:E,codeFenced:i(Y),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(Y,a),codeText:i(G,a),codeTextData:E,data:E,codeFlowValue:E,definition:i(X),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(K),hardBreakEscape:i($),hardBreakTrailing:i($),htmlFlow:i(Z,a),htmlFlowData:E,htmlText:i(Z,a),htmlTextData:E,image:i(ee),label:a,link:i(te),listItem:i(re),listItemValue:d,listOrdered:i(ne,A),listUnordered:i(ne),paragraph:i(oe),reference:z,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(J),strong:i(ie),thematicBreak:i(le)},exit:{atxHeading:s(),atxHeadingSequence:w,autolink:s(),autolinkEmail:V,autolinkProtocol:q,blockQuote:s(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:j,characterReferenceMarkerNumeric:j,characterReferenceValue:H,characterReference:U,codeFenced:s(g),codeFencedFence:h,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:C,codeIndented:s(m),codeText:s(I),codeTextData:C,data:C,definition:s(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:s(),hardBreakEscape:s(D),hardBreakTrailing:s(D),htmlFlow:s(B),htmlFlowData:C,htmlText:s(T),htmlTextData:C,image:s(L),label:Q,labelText:O,lineEnding:P,link:s(M),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:_,resourceDestinationString:R,resourceTitleString:N,resource:F,setextHeading:s(S),setextHeadingLineSequence:k,setextHeadingText:x,strong:s(),thematicBreak:s()}};CD(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const i={stack:[r],tokenStack:[],config:t,enter:l,exit:c,buffer:a,resume:u,data:n},s=[];let A=-1;for(;++A<e.length;)if("listOrdered"===e[A][1].type||"listUnordered"===e[A][1].type)if("enter"===e[A][0])s.push(A);else{A=o(e,s.pop(),A)}for(A=-1;++A<e.length;){const n=t[e[A][0]];kD.call(n,e[A][1].type)&&n[e[A][1].type].call(Object.assign({sliceSerialize:e[A][2].sliceSerialize},i),e[A][1])}if(i.tokenStack.length>0){const e=i.tokenStack[i.tokenStack.length-1];(e[1]||DD).call(i,void 0,e[0])}for(r.position={start:ED(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:ED(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},A=-1;++A<t.transforms.length;)r=t.transforms[A](r)||r;return r}function o(e,t,n){let r,o,i,a,l=t-1,s=-1,c=!1;for(;++l<=n;){const t=e[l];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||a||s||i||(i=l),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=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 a=l;for(o=void 0;a--;){const t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",o=a}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||l,0,["exit",r,t[2]]),l++,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(l,0,["enter",o,t[2]]),l++,n++,i=void 0,a=!0}}}return e[t][1]._spread=c,n}function i(e,t){return n;function n(n){l.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function l(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:ED(t.start),end:void 0}}function s(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+dC({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]||DD).call(this,e,r[0])}n.position.end=ED(e.end)}function u(){return QC(this.stack.pop())}function A(){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=YC(this.sliceSerialize(e)).toLowerCase()}function y(){const e=this.resume();this.stack[this.stack.length-1].title=e}function b(){const e=this.resume();this.stack[this.stack.length-1].url=e}function w(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function x(){this.data.setextHeadingSlurpLineEnding=!0}function k(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function S(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ae(),n.position={start:ED(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=ED(e.end)}function P(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=ED(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.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 T(){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 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 L(){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(wD,xD)}(t),n.identifier=YC(t).toLowerCase()}function Q(){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 R(){const e=this.resume();this.stack[this.stack.length-1].url=e}function N(){const e=this.resume();this.stack[this.stack.length-1].title=e}function F(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function _(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=YC(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function j(e){this.data.characterReferenceType=e.type}function H(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=WC(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=zC(t)}this.stack[this.stack.length-1].value+=r}function U(e){this.stack.pop().position.end=ED(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 W(){return{type:"blockquote",children:[]}}function Y(){return{type:"code",lang:null,meta:null,value:""}}function G(){return{type:"inlineCode",value:""}}function X(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function K(){return{type:"emphasis",children:[]}}function J(){return{type:"heading",depth:0,children:[]}}function $(){return{type:"break"}}function Z(){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 ae(){return{type:"text",value:""}}function le(){return{type:"thematicBreak"}}}(n)(function(e){for(;!DP(e););return e}(function(e){const t={constructs:UC([vD,...(e||{}).extensions||[]]),content:n(cP),defined:[],document:n(uP),flow:n(oD),lazy:{},string:n(aD),text:n(lD)};return t;function n(e){return function(n){return yD(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,a){const l=[];let s,c,u,A,d;for(o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),u=0,n="",r&&(65279===o.charCodeAt(0)&&u++,r=void 0);u<o.length;){if(bD.lastIndex=u,s=bD.exec(o),A=s&&void 0!==s.index?s.index:o.length,d=o.charCodeAt(A),!s){n=o.slice(u);break}if(10===d&&u===A&&e)l.push(-3),e=void 0;else switch(e&&(l.push(-5),e=void 0),u<A&&(l.push(o.slice(u,A)),t+=A-u),d){case 0:l.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),l.push(-2);t++<c;)l.push(-1);break;case 10:l.push(-4),t=1;break;default:e=!0,t=1}u=A+1}return a&&(e&&l.push(-5),n&&l.push(n),l.push(null)),l}}()(e,t,!0))))}function ED(e){return{line:e.line,column:e.column,offset:e.offset}}function CD(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?CD(e,r):PD(e,r)}}function PD(e,t){let n;for(n in t)if(kD.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 DD(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+dC({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+dC({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+dC({start:t.start,end:t.end})+") is still open")}function BD(e){const t=this;t.parser=function(n){return SD(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function TD(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 a=o[o.length-1];return a&&"text"===a.type?a.value+=r:o.push({type:"text",value:r}),o}function ID(e){const t=e.spread;return null==t?e.children.length>1:t}function MD(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(LD(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(LD(t.slice(o),o>0,!1)),i.join("")}function LD(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 OD={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=lP(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,l=e.footnoteCounts.get(r);void 0===l?(l=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,l+=1,e.footnoteCounts.set(r,l);const s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,s);const c={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,c),e.applyData(t,c)},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 TD(e,t);const o={src:lP(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:lP(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 TD(e,t);const o={href:lP(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:lP(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=ID(n[r])}return t}(n):ID(t),i={},a=[];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 l=-1;for(;++l<r.length;){const e=r[l];(o||0!==l||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?a.push(e):a.push(...e.children)}const s=r[r.length-1];s&&(o||"element"!==s.type||"p"!==s.tagName)&&a.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,c),e.applyData(t,c)},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=uC(t.children[1]),a=cC(t.children[t.children.length-1]);i&&a&&(r.position={start:i,end:a}),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,a=i?i.length:t.children.length;let l=-1;const s=[];for(;++l<a;){const n=t.children[l],r={},a=i?i[l]:void 0;a&&(r.align=a);let c={type:"element",tagName:o,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),s.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:MD(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:QD,yaml:QD,definition:QD,footnoteDefinition:QD};function QD(){}const RD="object"==typeof self?self:globalThis,ND=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case 0:case-1:return n(a,o);case 1:{const e=n([],o);for(const t of a)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of a)e[r(t)]=r(n);return e}case 3:return n(new Date(a),o);case 4:{const{source:e,flags:t}=a;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of a)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of a)e.add(r(t));return e}case 7:{const{name:e,message:t}=a;return n(new RD[e](t),o)}case 8:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:e}=new Uint8Array(a);return n(new DataView(e),a)}}return n(new RD[i](a),o)};return r})(new Map,e)(0),FD="",{toString:zD}={},{keys:_D}=Object,jD=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=zD.call(e).slice(8,-1);switch(n){case"Array":return[1,FD];case"Object":return[2,FD];case"Date":return[3,FD];case"RegExp":return[4,FD];case"Map":return[5,FD];case"Set":return[6,FD];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},HD=([e,t])=>0===e&&("function"===t||"symbol"===t),UD=(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[a,l]=jD(r);switch(a){case 0:{let t=r;switch(l){case"bigint":a=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);t=null;break;case"undefined":return o([-1],r)}return o([a,t],r)}case 1:{if(l){let e=r;return"DataView"===l?e=new Uint8Array(r.buffer):"ArrayBuffer"===l&&(e=new Uint8Array(r)),o([l,[...e]],r)}const e=[],t=o([a,e],r);for(const t of r)e.push(i(t));return t}case 2:{if(l)switch(l){case"BigInt":return o([l,r.toString()],r);case"Boolean":case"Number":case"String":return o([l,r.valueOf()],r)}if(t&&"toJSON"in r)return i(r.toJSON());const n=[],s=o([a,n],r);for(const t of _D(r))!e&&HD(jD(r[t]))||n.push([i(t),i(r[t])]);return s}case 3:return o([a,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([a,{source:e,flags:t}],r)}case 5:{const t=[],n=o([a,t],r);for(const[n,o]of r)(e||!HD(jD(n))&&!HD(jD(o)))&&t.push([i(n),i(o)]);return n}case 6:{const t=[],n=o([a,t],r);for(const n of r)!e&&HD(jD(n))||t.push(i(n));return n}}const{message:s}=r;return o([a,{name:l,message:s}],r)};return i})(!(t||n),!!t,new Map,r)(e),r};var qD="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?ND(UD(e,t)):structuredClone(e):(e,t)=>ND(UD(e,t));function VD(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 WD(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const YD=function(e){if(null==e)return XD;if("function"==typeof e)return GD(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=YD(e[n]);return GD(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 GD(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 GD(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function GD(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 XD(){return!0}const KD=[],JD=!0,$D=!1;function ZD(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=YD(o),a=r?-1:1;!function e(o,l,s){const c=o&&"object"==typeof o?o:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,A,d=KD;if((!t||i(o,l,s[s.length-1]||void 0))&&(d=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[JD,e];return null==e?KD:[e]}(n(o,s)),d[0]===$D))return d;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==d[0])for(u=(r?t.children.length:-1)+a,A=s.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,A)(),c[0]===$D)return c;u="number"==typeof c[1]?c[1]:u+a}}return d}}(e,void 0,[])()}function eB(e,t,n,r){let o,i,a;"function"==typeof t&&"function"!=typeof n?(i=void 0,a=t,o=n):(i=t,a=n,o=r),ZD(e,i,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return a(e,r,n)},o)}const tB={}.hasOwnProperty,nB={};function rB(e,t){e.position&&(t.position=function(e){const t=uC(e),n=cC(e);if(t&&n)return{start:t,end:n}}(e))}function oB(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,qD(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function iB(e,t){const n=t.data||{},r=!("value"in t)||tB.call(n,"hProperties")||tB.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 aB(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 lB(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function sB(e,t){const n=function(e,t){const n=t||nB,r=new Map,o=new Map,i=new Map,a={...OD,...n.handlers},l={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=l.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=lB(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=lB(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:oB,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:function(e,t){const n=e.type,r=l.handlers[n];if(tB.call(l.handlers,n)&&r)return r(l,e,t);if(l.options.passThrough&&l.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=qD(n);return r.children=l.all(e),r}return qD(e)}return(l.options.unknownHandler||iB)(l,e,t)},options:n,patch:rB,wrap:aB};return eB(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)}}),l}(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||VD,r=e.options.footnoteBackLabel||WD,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let s=-1;for(;++s<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[s]);if(!o)continue;const i=e.all(o),a=String(o.identifier).toUpperCase(),c=lP(a.toLowerCase());let u=0;const A=[],d=e.footnoteCounts.get(a);for(;void 0!==d&&++u<=d;){A.length>0&&A.push({type:"text",value:" "});let e="string"==typeof n?n:n(s,u);"string"==typeof e&&(e={type:"text",value:e}),A.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(s,u),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(...A)}else i.push(...A);const p={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(i,!0)};e.patch(o,p),l.push(p)}if(0!==l.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...qD(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!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 cB(e,t){return e&&"run"in e?async function(n,r){const o=sB(n,{file:r,...t});await e.run(o,r)}:function(n,r){return sB(n,{file:r,...e||t})}}function uB(e){if(e)throw e}var AB=Object.prototype.hasOwnProperty,dB=Object.prototype.toString,fB=Object.defineProperty,pB=Object.getOwnPropertyDescriptor,hB=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===dB.call(e)},gB=function(e){if(!e||"[object Object]"!==dB.call(e))return!1;var t,n=AB.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&AB.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||AB.call(e,t)},mB=function(e,t){fB&&"__proto__"===t.name?fB(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},vB=function(e,t){if("__proto__"===t){if(!AB.call(e,t))return;if(pB)return pB(e,t).value}return e[t]},yB=function e(){var t,n,r,o,i,a,l=arguments[0],s=1,c=arguments.length,u=!1;for("boolean"==typeof l&&(u=l,l=arguments[1]||{},s=2),(null==l||"object"!=typeof l&&"function"!=typeof l)&&(l={});s<c;++s)if(null!=(t=arguments[s]))for(n in t)r=vB(l,n),l!==(o=vB(t,n))&&(u&&o&&(gB(o)||(i=hB(o)))?(i?(i=!1,a=r&&hB(r)?r:[]):a=r&&gB(r)?r:{},mB(l,{name:n,newValue:e(u,a,o)})):void 0!==o&&mB(l,{name:n,newValue:o}));return l},bB=r(yB);function wB(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 xB(){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,...a){const l=e[++n];let s=-1;if(i)r(i);else{for(;++s<t.length;)null!==a[s]&&void 0!==a[s]||(a[s]=t[s]);t=a,l?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let a;r&&t.push(o);try{a=e.apply(this,t)}catch(e){if(r&&n)throw e;return o(e)}r||(a&&a.then&&"function"==typeof a.then?a.then(i,o):a instanceof Error?o(a):i(a))}function o(e,...r){n||(n=!0,t(e,...r))}function i(e){o(null,e)}}(l,o)(...a):r(null,...a)}}(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 kB={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');SB(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 a=-1,l=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else a<0&&(n=!0,a=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(o=i):(l=-1,o=a));r===o?o=a:o<0&&(o=e.length);return e.slice(r,o)},dirname:function(e){if(SB(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){SB(e);let t,n=e.length,r=-1,o=0,i=-1,a=0;for(;n--;){const l=e.codePointAt(n);if(47!==l)r<0&&(t=!0,r=n+1),46===l?i<0?i=n:1!==a&&(a=1):i>-1&&(a=-1);else if(t){o=n+1;break}}if(i<0||r<0||0===a||1===a&&i===r-1&&i===o+1)return"";return e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)SB(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){SB(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,a=-1,l=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(a===s-1||1===l);else if(a!==s-1&&2===l){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("/")),a=s,l=0;continue}}else if(o.length>0){o="",i=0,a=s,l=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(a+1,s):o=e.slice(a+1,s),i=s-a-1;a=s,l=0}else 46===n&&l>-1?l++:l=-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 SB(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const EB={cwd:function(){return"/"}};function CB(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function PB(e){if("string"==typeof e)e=new URL(e);else if(!CB(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 DB=["history","path","basename","stem","extname","dirname"];class BB{constructor(e){let t;t=e?CB(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?"":EB.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<DB.length;){const e=DB[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)DB.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?kB.basename(this.path):void 0}set basename(e){IB(e,"basename"),TB(e,"basename"),this.path=kB.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?kB.dirname(this.path):void 0}set dirname(e){MB(this.basename,"dirname"),this.path=kB.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?kB.extname(this.path):void 0}set extname(e){if(TB(e,"extname"),MB(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=kB.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){CB(e)&&(e=PB(e)),IB(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?kB.basename(this.path,this.extname):void 0}set stem(e){IB(e,"stem"),TB(e,"stem"),this.path=kB.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 gC(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 TB(e,t){if(e&&e.includes(kB.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+kB.sep+"`")}function IB(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function MB(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const LB=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},OB={}.hasOwnProperty;class QB extends LB{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=xB()}copy(){const e=new QB;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(bB(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(zB("data",this.frozen),this.namespace[e]=t,this):OB.call(this.namespace,e)&&this.namespace[e]||void 0:e?(zB("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=HB(e),n=this.parser||this.Parser;return NB("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),NB("process",this.parser||this.Parser),FB("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=HB(e),a=n.parse(i);function l(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(a,i,function(e,t,r){if(e||!t||!r)return l(e);const o=t,i=n.stringify(o,r);var a;"string"==typeof(a=i)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(a)?r.value=i:r.result=i,l(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),NB("processSync",this.parser||this.Parser),FB("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,uB(e),t=r}),jB("processSync","process",n),t}run(e,t,n){_B(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 a=HB(t);r.run(e,a,function(t,r,a){const l=r||e;t?i(t):o?o(l):n(void 0,l,a)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){uB(e),n=t,r=!0}),jB("runSync","run",r),n}stringify(e,t){this.freeze();const n=HB(t),r=this.compiler||this.Compiler;return FB("stringify",r),_B(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(zB("use",this.frozen),null==e);else if("function"==typeof e)l(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?a(e):i(e)}return this;function o(e){if("function"==typeof e)l(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;l(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");a(e.plugins),e.settings&&(r.settings=bB(!0,r.settings,e.settings))}function a(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 l(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 a=n[o][1];wB(a)&&wB(r)&&(r=bB(!0,a,r)),n[o]=[e,r,...i]}}}}const RB=(new QB).freeze();function NB(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function FB(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function zB(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 _B(e){if(!wB(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function jB(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function HB(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new BB(e)}const UB=[],qB={allowDangerousHtml:!0},VB=/^(https?|ircs?|mailto|xmpp)$/i,WB=[{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 YB(e){const t=function(e){const t=e.rehypePlugins||UB,n=e.remarkPlugins||UB,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...qB}:qB,o=RB().use(BD).use(n).use(cB,r).use(t);return o}(e),n=function(e){const t=e.children||"",n=new BB;"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,a=t.skipHtml,l=t.unwrapDisallowed,s=t.urlTransform||GB;for(const e of WB)Object.hasOwn(t,e.from)&&JS((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 eB(e,c),kC(e,{Fragment:lA.Fragment,components:o,ignoreInvalidStyle:!0,jsx:lA.jsx,jsxs:lA.jsxs,passKeys:!0,passNode:!0});function c(e,t,o){if("raw"===e.type&&o&&"number"==typeof t)return a?o.children.splice(t,1):o.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in LC)if(Object.hasOwn(LC,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=LC[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=s(String(n||""),t,e))}}if("element"===e.type){let a=n?!n.includes(e.tagName):!!i&&i.includes(e.tagName);if(!a&&r&&"number"==typeof t&&(a=!r(e,t,o)),a&&o&&"number"==typeof t)return l&&e.children?o.children.splice(t,1,...e.children):o.children.splice(t,1),t}}}(t.runSync(t.parse(n),n),e)}function GB(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||VB.test(e.slice(0,t))?e:""}function XB(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 KB(e,t,n){const r=YD((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([JB(e[0]),$B(e[1])])}return t}(t);let i=-1;for(;++i<o.length;)ZD(e,"text",a);function a(e,t){let n,a=-1;for(;++a<t.length;){const e=t[a],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],a=o[i][1];let l=0;const s=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let A=r.exec(e.value);for(;A;){const n=A.index,o={index:A.index,input:A.input,stack:[...t,e]};let i=a(...A,o);if("string"==typeof i&&(i=i.length>0?{type:"text",value:i}:void 0),!1===i?r.lastIndex=n+1:(l!==n&&u.push({type:"text",value:e.value.slice(l,n)}),Array.isArray(i)?u.push(...i):i&&u.push(i),l=n+A[0].length,c=!0),!r.global)break;A=r.exec(e.value)}c?(l<e.value.length&&u.push({type:"text",value:e.value.slice(l)}),n.children.splice(s,1,...u)):u=[e];return s+u.length}(e,t)}}function JB(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 $B(e){return"function"==typeof e?e:function(){return e}}const ZB="phrasing",eT=["autolink","link","image","label"];function tT(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function nT(e){this.config.enter.autolinkProtocol.call(this,e)}function rT(e){this.config.exit.autolinkProtocol.call(this,e)}function oT(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 iT(e){this.config.exit.autolinkEmail.call(this,e)}function aT(e){this.exit(e)}function lT(e){KB(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,sT],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,cT]],{ignore:["link","linkReference"]})}function sT(e,t,n,r,o){let i="";if(!uT(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 a=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=XB(e,"(");let i=XB(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(!a[0])return!1;const l={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[l,{type:"text",value:a[1]}]:l}function cT(e,t,n,r){return!(!uT(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function uT(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||iP(n)||oP(n))&&(!t||47!==n)}function AT(){this.buffer()}function dT(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function fT(){this.buffer()}function pT(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function hT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=YC(this.sliceSerialize(e)).toLowerCase(),n.label=t}function gT(e){this.exit(e)}function mT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=YC(this.sliceSerialize(e)).toLowerCase(),n.label=t}function vT(e){this.exit(e)}function yT(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),l=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),l(),a(),i+=o.move("]"),i}function bT(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,o){const i=r.createTracker(o);let a=i.move("[^");const l=r.enter("footnoteDefinition"),s=r.enter("label");a+=i.move(r.safe(r.associationId(e),{before:a,after:"]"})),s(),a+=i.move("]:"),e.children&&e.children.length>0&&(i.shift(4),a+=i.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,i.current()),t?xT:wT)));return l(),a},footnoteReference:yT},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function wT(e,t,n){return 0===t?e:xT(e,t,n)}function xT(e,t,n){return(n?"":" ")+e}yT.peek=function(){return"["};const kT=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function ST(e){this.enter({type:"delete",children:[]},e)}function ET(e){this.exit(e)}function CT(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function PT(e){return e.length}function DT(e){return null==e?"":String(e)}function BT(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 TT(e,t,n){return">"+(n?"":" ")+e}function IT(e,t){return MT(e,t.inConstruct,!0)&&!MT(e,t.notInConstruct,!1)}function MT(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 LT(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if("\n"===n.unsafe[o].character&&IT(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function OT(e,t,n){return(n?"":" ")+e}function QT(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 RT(e){return"&#x"+e.toString(16).toUpperCase()+";"}function NT(e,t,n){const r=dP(e),o=dP(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 FT(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"),a=n.createTracker(r),l=a.move(o);let s=a.move(n.containerPhrasing(e,{after:o,before:l,...a.current()}));const c=s.charCodeAt(0),u=NT(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(s=RT(c)+s.slice(1));const A=s.charCodeAt(s.length-1),d=NT(r.after.charCodeAt(0),A,o);d.inside&&(s=s.slice(0,-1)+RT(A));const f=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:d.outside,before:u.outside},l+s+f}function zT(e){return e.value||""}function _T(e,t,n,r){const o=QT(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("image");let l=n.enter("label");const s=n.createTracker(r);let c=s.move("![");return c+=s.move(n.safe(e.alt,{before:c,after:"]",...s.current()})),c+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=s.move(" "+o),c+=s.move(n.safe(e.title,{before:c,after:o,...s.current()})),c+=s.move(o),l()),c+=s.move(")"),a(),c}function jT(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const l=n.createTracker(r);let s=l.move("![");const c=n.safe(e.alt,{before:s,after:"]",...l.current()});s+=l.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const A=n.safe(n.associationId(e),{before:s,after:"]",...l.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===A?"shortcut"===o?s=s.slice(0,-1):s+=l.move("]"):s+=l.move(A+"]"),s}function HT(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 UT(e,t){const n=QC(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 qT(e,t,n,r){const o=QT(n),i='"'===o?"Quote":"Apostrophe",a=n.createTracker(r);let l,s;if(UT(e,n)){const t=n.stack;n.stack=[],l=n.enter("autolink");let r=a.move("<");return r+=a.move(n.containerPhrasing(e,{before:r,after:">",...a.current()})),r+=a.move(">"),l(),n.stack=t,r}l=n.enter("link"),s=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(s=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=a.move(" "+o),c+=a.move(n.safe(e.title,{before:c,after:o,...a.current()})),c+=a.move(o),s()),c+=a.move(")"),l(),c}function VT(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const l=n.createTracker(r);let s=l.move("[");const c=n.containerPhrasing(e,{before:s,after:"]",...l.current()});s+=l.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const A=n.safe(n.associationId(e),{before:s,after:"]",...l.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===A?"shortcut"===o?s=s.slice(0,-1):s+=l.move("]"):s+=l.move(A+"]"),s}function WT(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 YT(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}CT.peek=function(){return"~"},FT.peek=function(e,t,n){return n.options.emphasis||"*"},zT.peek=function(){return"<"},_T.peek=function(){return"!"},jT.peek=function(){return"!"},HT.peek=function(){return"`"},qT.peek=function(e,t,n){return UT(e,n)?"<":"["},VT.peek=function(){return"["};const GT=YD(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function XT(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"),a=n.createTracker(r),l=a.move(o+o);let s=a.move(n.containerPhrasing(e,{after:o,before:l,...a.current()}));const c=s.charCodeAt(0),u=NT(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(s=RT(c)+s.slice(1));const A=s.charCodeAt(s.length-1),d=NT(r.after.charCodeAt(0),A,o);d.inside&&(s=s.slice(0,-1)+RT(A));const f=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:d.outside,before:u.outside},l+s+f}XT.peek=function(e,t,n){return n.options.strong||"*"};const KT={blockquote:function(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),TT);return o(),a},break:LT,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||"",a="`"===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,OT);return e(),t}const l=n.createTracker(r),s=o.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,a=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===o?++i>a&&(a=i):i=1,o=r+t.length,r=n.indexOf(t,o);return a}(i,o)+1,3)),c=n.enter("codeFenced");let u=l.move(s);if(e.lang){const t=n.enter(`codeFencedLang${a}`);u+=l.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...l.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${a}`);u+=l.move(" "),u+=l.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...l.current()})),t()}return u+=l.move("\n"),i&&(u+=l.move(i+"\n")),u+=l.move(s),c(),u},definition:function(e,t,n,r){const o=QT(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("definition");let l=n.enter("label");const s=n.createTracker(r);let c=s.move("[");return c+=s.move(n.safe(n.associationId(e),{before:c,after:"]",...s.current()})),c+=s.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...s.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=s.move(" "+o),c+=s.move(n.safe(e.title,{before:c,after:o,...s.current()})),c+=s.move(o),l()),a(),c},emphasis:FT,hardBreak:LT,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 eB(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,$D}),Boolean((!e.depth||e.depth<3)&&QC(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),a=n.containerPhrasing(e,{...i.current(),before:"\n",after:"\n"});return r(),t(),a+"\n"+(1===o?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}const a="#".repeat(o),l=n.enter("headingAtx"),s=n.enter("phrasing");i.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(c)&&(c=RT(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),s(),l(),c},html:zT,image:_T,imageReference:jT,inlineCode:HT,link:qT,linkReference:VT,list:function(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=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):WT(n);const l=e.ordered?"."===a?")":".":function(e){const t=WT(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)&&a===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==a&&"-"!==a||!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),YT(n)===a&&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&&(a=l),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),c},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||WT(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 a=i.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));const l=n.createTracker(r);l.move(i+" ".repeat(a-i.length)),l.shift(a);const s=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,l.current()),function(e,t,n){if(t)return(n?"":" ".repeat(a))+e;return(n?i:i+" ".repeat(a-i.length))+e});return s(),c},paragraph:function(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a},root:function(e,t,n,r){const o=e.children.some(function(e){return GT(e)});return(o?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:XT,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(YT(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 JT(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 $T(e){this.exit(e),this.data.inTable=void 0}function ZT(e){this.enter({type:"tableRow",children:[]},e)}function eI(e){this.exit(e)}function tI(e){this.enter({type:"tableCell",children:[]},e)}function nI(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,rI));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function rI(e,t){return"|"===t?t:e}function oI(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=KT.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return l(function(e,t,n){const r=e.children;let o=-1;const i=[],a=t.enter("table");for(;++o<r.length;)i[o]=s(r[o],t,n);return a(),i}(e,n,r),e.align)},tableCell:a,tableRow:function(e,t,n,r){const o=s(e,n,r),i=l([o]);return i.slice(0,i.indexOf("\n"))}}};function a(e,t,n,r){const o=n.enter("tableCell"),a=n.enter("phrasing"),l=n.containerPhrasing(e,{...r,before:i,after:i});return a(),o(),l}function l(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||PT,i=[],a=[],l=[],s=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let i=-1;for(e[u].length>c&&(c=e[u].length);++i<e[u].length;){const a=DT(e[u][i]);if(!1!==n.alignDelimiters){const e=o(a);r[i]=e,(void 0===s[i]||e>s[i])&&(s[i]=e)}t.push(a)}a[u]=t,l[u]=r}let A=-1;if("object"==typeof r&&"length"in r)for(;++A<c;)i[A]=BT(r[A]);else{const e=BT(r);for(;++A<c;)i[A]=e}A=-1;const d=[],f=[];for(;++A<c;){const e=i[A];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let o=!1===n.alignDelimiters?1:Math.max(1,s[A]-t.length-r.length);const a=t+"-".repeat(o)+r;!1!==n.alignDelimiters&&(o=t.length+o+r.length,o>s[A]&&(s[A]=o),f[A]=o),d[A]=a}a.splice(1,0,d),l.splice(1,0,f),u=-1;const p=[];for(;++u<a.length;){const e=a[u],t=l[u];A=-1;const r=[];for(;++A<c;){const o=e[A]||"";let a="",l="";if(!1!==n.alignDelimiters){const e=s[A]-(t[A]||0),n=i[A];114===n?a=" ".repeat(e):99===n?e%2?(a=" ".repeat(e/2+.5),l=" ".repeat(e/2-.5)):(a=" ".repeat(e/2),l=a):l=" ".repeat(e)}!1===n.delimiterStart||A||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===o||!1===n.delimiterStart&&!A||r.push(" "),!1!==n.alignDelimiters&&r.push(a),r.push(o),!1!==n.alignDelimiters&&r.push(l),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&A===c-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=[],l=t.enter("tableRow");for(;++o<r.length;)i[o]=a(r[o],0,t,n);return l(),i}}function iI(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function aI(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 lI(e,t,n,r){const o=e.children[0],i="boolean"==typeof e.checked&&o&&"paragraph"===o.type,a="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);i&&l.move(a);let s=KT.listItem(e,t,n,{...r,...l.current()});return i&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+a})),s}const sI={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},cI={tokenize:function(e,t,n){let r,o,i;return a;function a(t){return 46===t||95===t?e.check(AI,s,l)(t):null===t||nP(t)||iP(t)||45!==t&&oP(t)?s(t):(i=!0,e.consume(t),a)}function l(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),a}function s(e){return o||r||!i?n(e):t(e)}},partial:!0},uI={tokenize:function(e,t){let n=0,r=0;return o;function o(a){return 40===a?(n++,e.consume(a),o):41===a&&r<n?i(a):33===a||34===a||38===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||60===a||63===a||93===a||95===a||126===a?e.check(AI,t,i)(a):null===a||nP(a)||iP(a)?t(a):(e.consume(a),o)}function i(t){return 41===t&&r++,e.consume(t),o}},partial:!0},AI={tokenize:function(e,t,n){return r;function r(a){return 33===a||34===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||63===a||95===a||126===a?(e.consume(a),r):38===a?(e.consume(a),i):93===a?(e.consume(a),o):60===a||null===a||nP(a)||iP(a)?t(a):n(a)}function o(e){return null===e||40===e||91===e||nP(e)||iP(e)?t(e):r(e)}function i(e){return GC(e)?a(e):n(e)}function a(t){return 59===t?(e.consume(t),r):GC(t)?(e.consume(t),a):n(t)}},partial:!0},dI={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return XC(e)?n(e):t(e)}},partial:!0},fI={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!vI.call(r,r.previous)||xI(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(sI,e.attempt(cI,e.attempt(uI,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:vI},pI={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",i=!1;return function(t){if((72===t||104===t)&&yI.call(r,r.previous)&&!xI(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),a;return n(t)};function a(t){if(GC(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),a;if(58===t){const n=o.toLowerCase();if("http"===n||"https"===n)return e.consume(t),l}return n(t)}function l(t){return 47===t?(e.consume(t),i?s:(i=!0,l)):n(t)}function s(t){return null===t||JC(t)||nP(t)||iP(t)||oP(t)?n(t):e.attempt(cI,e.attempt(uI,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:yI},hI={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,i;return function(t){if(!wI(t)||!bI.call(r,r.previous)||xI(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return wI(t)?(e.consume(t),a):64===t?(e.consume(t),l):n(t)}function l(t){return 46===t?e.check(dI,c,s)(t):45===t||95===t||XC(t)?(i=!0,e.consume(t),l):c(t)}function s(t){return e.consume(t),o=!0,l}function c(a){return i&&o&&GC(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}},previous:bI},gI={};let mI=48;for(;mI<123;)gI[mI]=hI,mI++,58===mI?mI=65:91===mI&&(mI=97);function vI(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||nP(e)}function yI(e){return!GC(e)}function bI(e){return!(47===e||wI(e))}function wI(e){return 43===e||45===e||46===e||95===e||XC(e)}function xI(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}gI[43]=hI,gI[45]=hI,gI[46]=hI,gI[95]=hI,gI[72]=[hI,pI],gI[104]=[hI,pI],gI[87]=[hI,fI],gI[119]=[hI,fI];const kI={tokenize:function(e,t,n){const r=this;return sP(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 SI(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const e=r.events[o][1];if("labelImage"===e.type){a=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!a||!a._balanced)return n(o);const l=YC(r.sliceSerialize({start:a.end,end:r.now()}));if(94!==l.codePointAt(0)||!i.includes(l.slice(1)))return n(o);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)}}function EI(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)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},l=[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",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function CI(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),l};function l(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(l){if(a>999||93===l&&!i||null===l||91===l||nP(l))return n(l);if(93===l){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes(YC(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(l)}return nP(l)||(i=!0),a++,e.consume(l),92===l?c:s}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,s):s(t)}}function PI(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a,l=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",c):n(t)}function c(t){if(l>999||93===t&&!a||null===t||91===t||nP(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return i=YC(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),A}return nP(t)||(a=!0),l++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),l++,c):c(t)}function A(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(i)||o.push(i),sP(e,d,"gfmFootnoteDefinitionWhitespace")):n(t)}function d(e){return t(e)}}function DI(e,t,n){return e.check(mP,t,e.attempt(kI,t,n))}function BI(e){e.exit("gfmFootnoteDefinition")}function TI(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const o=this.previous,i=this.events;let a=0;return function(t){if(126===o&&"characterEscape"!==i[i.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),l(t)};function l(i){const s=dP(o);if(126===i)return a>1?r(i):(e.consume(i),a++,l);if(a<2&&!t)return r(i);const c=e.exit("strikethroughSequenceTemporary"),u=dP(i);return c._open=!u||2===u&&Boolean(s),c._close=!s||2===s&&Boolean(u),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)},a=[["enter",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",i,t]],l=t.parser.constructs.insideSpan.null;l&&_C(a,a.length,0,fP(l,e.slice(r+1,n),t)),_C(a,a.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),_C(e,r-1,n-r+3,a),n=r+a.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 II{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 MI(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 LI(e,t,n){const r=this;let o,i=0,a=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?b:l;if(i===b&&r.parser.lazy[r.now().line])return n(e);return i(e)};function l(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return s(e);return o=!0,a+=1,s(e)}(t)}function s(t){return null===t?n(t):tP(t)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),A):n(t):rP(t)?sP(e,s,"whitespace")(t):(a+=1,o&&(o=!1,i+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,s):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||nP(t)?(e.exit("data"),s(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function A(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),o=!1,rP(t)?sP(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 rP(t)?sP(e,p,"whitespace")(t):p(t)}function p(t){return 58===t?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),h):45===t?(a+=1,h(t)):null===t||tP(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 rP(t)?sP(e,v,"whitespace")(t):v(t)}function v(n){return 124===n?d(n):(null===n||tP(n))&&o&&i===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):y(n)}function y(e){return n(e)}function b(t){return e.enter("tableRow"),w(t)}function w(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),w):null===n||tP(n)?(e.exit("tableRow"),t(n)):rP(n)?sP(e,w,"whitespace")(n):(e.enter("data"),x(n))}function x(t){return null===t||124===t||nP(t)?(e.exit("data"),w(t)):(e.consume(t),92===t?k:x)}function k(t){return 92===t||124===t?(e.consume(t),x):x(t)}}function OI(e,t){let n,r,o,i=-1,a=!0,l=0,s=[0,0,0,0],c=[0,0,0,0],u=!1,A=0;const d=new II;for(;++i<e.length;){const f=e[i],p=f[1];"enter"===f[0]?"tableHead"===p.type?(u=!1,0!==A&&(RI(d,t,A,n,r),r=void 0,A=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?(a=!0,o=void 0,s=[0,0,0,0],c=[0,i+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(i,0,[["enter",r,t]])),l="tableDelimiterRow"===p.type?2:r?3:1):!l||"data"!==p.type&&"tableDelimiterMarker"!==p.type&&"tableDelimiterFiller"!==p.type?"tableCellDivider"===p.type&&(a?a=!1:(0!==s[1]&&(c[0]=c[1],o=QI(d,t,s,l,void 0,o)),s=c,c=[s[1],i,0,0])):(a=!1,0===c[2]&&(0!==s[1]&&(c[0]=c[1],o=QI(d,t,s,l,void 0,o),s=[0,0,0,0]),c[2]=i)):"tableHead"===p.type?(u=!0,A=i):"tableRow"===p.type||"tableDelimiterRow"===p.type?(A=i,0!==s[1]?(c[0]=c[1],o=QI(d,t,s,l,i,o)):0!==c[1]&&(o=QI(d,t,c,l,i,o)),l=0):!l||"data"!==p.type&&"tableDelimiterMarker"!==p.type&&"tableDelimiterFiller"!==p.type||(c[3]=i)}for(0!==A&&RI(d,t,A,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=MI(t.events,i))}return e}function QI(e,t,n,r,o,i){const a=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(i.end=Object.assign({},NI(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=NI(t.events,n[1]);if(i={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",i,t]]),0!==n[2]){const o=NI(t.events,n[2]),i=NI(t.events,n[3]),a={type:"tableContent",start:Object.assign({},o),end:Object.assign({},i)};if(e.add(n[2],0,[["enter",a,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",a,t]])}return void 0!==o&&(i.end=Object.assign({},NI(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function RI(e,t,n,r,o){const i=[],a=NI(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function NI(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const FI={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 nP(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"),a):n(t)}function a(r){return tP(r)?t(r):rP(r)?e.check({tokenize:zI},t,n)(r):n(r)}}};function zI(e,t,n){return sP(e,function(e){return null===e?n(e):t(e)},"whitespace")}const _I={};function jI(e){const t=e||_I,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return UC([{text:gI},{document:{91:{name:"gfmFootnoteDefinition",tokenize:PI,continuation:{tokenize:DI},exit:BI}},text:{91:{name:"gfmFootnoteCall",tokenize:CI},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:SI,resolveTo:EI}}},TI(e),{flow:{null:{name:"table",tokenize:LI,resolveAll:OI}}},{text:{91:FI}}])}(t)),o.push([{transforms:[lT],enter:{literalAutolink:tT,literalAutolinkEmail:nT,literalAutolinkHttp:nT,literalAutolinkWww:nT},exit:{literalAutolink:aT,literalAutolinkEmail:iT,literalAutolinkHttp:rT,literalAutolinkWww:oT}},{enter:{gfmFootnoteCallString:AT,gfmFootnoteCall:dT,gfmFootnoteDefinitionLabelString:fT,gfmFootnoteDefinition:pT},exit:{gfmFootnoteCallString:hT,gfmFootnoteCall:gT,gfmFootnoteDefinitionLabelString:mT,gfmFootnoteDefinition:vT}},{canContainEols:["delete"],enter:{strikethrough:ST},exit:{strikethrough:ET}},{enter:{table:JT,tableData:tI,tableHeader:tI,tableRow:ZT},exit:{codeText:nI,table:$T,tableData:eI,tableHeader:eI,tableRow:eI}},{exit:{taskListCheckValueChecked:iI,taskListCheckValueUnchecked:iI,paragraph:aI}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ZB,notInConstruct:eT},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ZB,notInConstruct:eT},{character:":",before:"[ps]",after:"\\/",inConstruct:ZB,notInConstruct:eT}]},bT(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:kT}],handlers:{delete:CT}},oI(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:lI}}]}}(t))}const HI="rgba(0, 0, 0, 0.3)",UI={p:({children:e})=>j.createElement("p",{style:{margin:0,marginBottom:"0.5em",lineHeight:1.4,textAlign:"left"}},e),ul:({children:e})=>j.createElement("ul",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"}},e),ol:({children:e})=>j.createElement("ol",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"}},e),li:({children:e})=>j.createElement("li",{style:{marginBottom:"1px",lineHeight:1.4}},e),code:({className:e,children:t})=>/\blanguage-/.test(e||"")?j.createElement("pre",{style:{backgroundColor:HI,padding:"8px",borderRadius:"4px",overflowX:"auto",margin:"0.5em 0",whiteSpace:"pre-wrap"}},j.createElement("code",null,t)):j.createElement("code",{style:{backgroundColor:HI,padding:"2px 4px",borderRadius:"4px",fontFamily:"inherit",fontSize:"0.95em"}},t),blockquote:({children:e})=>j.createElement("blockquote",{style:{margin:0,paddingLeft:"10px",borderLeft:"2px solid rgba(255, 255, 255, 0.4)",color:"inherit",fontStyle:"italic"}},e),a:({children:e,href:t})=>j.createElement("a",{href:t,target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"underline",fontWeight:600}},e),table:({children:e})=>j.createElement("table",{style:{borderCollapse:"collapse",width:"100%",margin:"0.5em 0",fontSize:"0.95em",color:"#fff"}},e),th:({children:e})=>j.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"}},e),td:({children:e})=>j.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"}},e)},qI=({children:e})=>j.createElement("div",{style:{whiteSpace:"normal"}},j.createElement(YB,{remarkPlugins:[jI],components:UI},"string"==typeof e?e:"")),VI=_.forwardRef(({embedded:e,currentOpen:t,enabled:n,onSetEnabled:r},o)=>{const i=Ty(),a=(()=>{const{isChatWindowOpen:e,toggleChatWindow:t,toggleIsBotTyping:n,scrollToBottom:r,getIsChatBotVisible:o}=Om();return{isChatWindowOpen:e,toggleChatWindow:t,toggleIsBotTyping:n,scrollToBottom:r,getIsChatBotVisible:o}})(),l=_.useRef(!1),s=_.useRef(!1);return _.useEffect(()=>{!e&&a&&a.toggleChatWindow&&(l.current===t||s.current||(setTimeout(()=>{a&&a.toggleChatWindow&&a.toggleChatWindow(t)},0),l.current=null!=t&&t),s.current=!1)},[t,e,a]),_.useEffect(()=>{const e=()=>{s.current=!0};return window.addEventListener("rcb-toggle-chat-window",e),()=>window.removeEventListener("rcb-toggle-chat-window",e)}),_.useImperativeHandle(o,()=>({addMessage:e=>{i&&i.injectMessage&&i.injectMessage(e)},openChat:()=>{!e&&a&&a.toggleChatWindow&&a.toggleChatWindow(!0)},closeChat:()=>{!e&&a&&a.toggleChatWindow&&a.toggleChatWindow(!1)},toggleChat:()=>{!e&&a&&a.toggleChatWindow&&a.toggleChatWindow()},setBotEnabled:e=>{r&&r(e)}}),[i,a,e,r]),null});VI.displayName="BotController";const WI=_.createContext(null),YI=({trackEvent:e,children:t})=>{const n=_.useRef(e);return n.current=e,j.createElement(WI.Provider,{value:{trackEvent:e=>n.current(e)}},t)},GI=()=>{const e=_.useContext(WI);return e||{trackEvent:()=>{}}},XI=({loginUrl:e,className:t="",style:n,isHeaderButton:r=!1})=>{const{trackEvent:o}=GI(),i=r?{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 j.createElement(j.Fragment,null,r&&j.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 "),j.createElement("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:`qa-bot-login-button ${r?"qa-bot-header-login-button":""} ${t}`,style:Object.assign(Object.assign({},i),n),onClick:()=>{o({type:"chatbot_login_clicked",loginUrl:e})}},"Log In"))},KI=()=>j.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"},j.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"},j.createElement("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),j.createElement("circle",{cx:"12",cy:"7",r:"4"}))),JI=[];for(let e=0;e<256;++e)JI.push((e+256).toString(16).slice(1));let $I;const ZI=new Uint8Array(16);var eM={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function tM(e,t,n){if(eM.randomUUID&&!e)return eM.randomUUID();const r=(e=e||{}).random??e.rng?.()??function(){if(!$I){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");$I=crypto.getRandomValues.bind(crypto)}return $I(ZI)}();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(JI[e[t+0]]+JI[e[t+1]]+JI[e[t+2]]+JI[e[t+3]]+"-"+JI[e[t+4]]+JI[e[t+5]]+"-"+JI[e[t+6]]+JI[e[t+7]]+"-"+JI[e[t+8]]+JI[e[t+9]]+"-"+JI[e[t+10]]+JI[e[t+11]]+JI[e[t+12]]+JI[e[t+13]]+JI[e[t+14]]+JI[e[t+15]]).toLowerCase()}(r)}function nM(){return"undefined"!=typeof localStorage&&"true"===localStorage.getItem("QA_BOT_DEBUG")}const rM="background: #1a5b6e; color: white; padding: 2px 6px; border-radius: 3px;",oM="background: #7c3aed; color: white; padding: 2px 6px; border-radius: 3px;",iM="background: #059669; color: white; padding: 2px 6px; border-radius: 3px;",aM="background: #f97316; color: white; padding: 2px 6px; border-radius: 3px;",lM="background: #f59e0b; color: #000; padding: 2px 6px; border-radius: 3px 0 0 3px; font-weight: bold;",sM="background: #fbbf24; color: #000; padding: 2px 6px; border-radius: 0 3px 3px 0;",cM=()=>{nM()&&console.log("%c QA Bot Core %c v0.5.0 ",lM,sM)},uM=(e,...t)=>{nM()&&console.log(`%c[Session]%c ${e}`,rM,"",...t)},AM=(e,...t)=>{nM()&&console.log(`%c[History]%c ${e}`,oM,"",...t)},dM=(e,t)=>{nM()&&console.log(`%c[Message]%c ${e}`,iM,"",t)},fM=(e,...t)=>{nM()&&console.log(`%c[Turnstile]%c ${e}`,aM,"",...t)},pM=(...e)=>{console.warn(...e)},hM=(...e)=>{console.error(...e)},gM="qa_bot_session_messages",mM=()=>`qa_bot_session_${tM()}`,vM=()=>{try{const e=localStorage.getItem(gM);return e?JSON.parse(e):{}}catch(e){return{}}},yM=(e,t,n,r,o)=>{const i=vM();!i[e]&&(i[e]={messages:[],startedAt:(new Date).toISOString(),preview:""},AM("NEW session created",{sessionId:e.slice(-12)}));const a=i[e].messages.some(e=>e.id===t);if(a)return void AM("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),AM("MESSAGE added",{sessionId:e.slice(-12),messageId:t.slice(-8),sender:r,totalInSession:i[e].messages.length});const s=i[e].messages,c=s.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(c){const t=c.content;i[e].preview=t.slice(0,50)+(t.length>50?"...":"")}else{const t=s.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])=>new Date(e.startedAt).getTime()-new Date(t.startedAt).getTime())[0])||void 0===t?void 0:t[0];if(!n)break;delete e[n]}localStorage.setItem(gM,JSON.stringify(e))})(i),AM("STORAGE state",{ourSessions:Object.keys(i).length,ourTotalMessages:Object.values(i).reduce((e,t)=>e+t.messages.length,0)})},bM=e=>{var t,n;return null!==(n=null===(t=vM()[e])||void 0===t?void 0:t.messages.length)&&void 0!==n?n:0},wM=e=>{const t=vM()[e];return(null==t?void 0:t.startedAt)?Date.now()-new Date(t.startedAt).getTime():0},xM=_.createContext(void 0),kM=({children:e,getSessionId:t,setSessionId:n,resetSession:r,clearResettingFlag:o})=>j.createElement(xM.Provider,{value:{getSessionId:t,setSessionId:n,resetSession:r,clearResettingFlag:o}},e),SM=()=>{const e=_.useContext(xM);if(!e)throw new Error("useSession must be used within a SessionProvider");return e},EM=()=>{const[e,t]=_.useState(!1),[n,r]=_.useState([]),[o,i]=_.useState(null),[a,l]=_.useState(0),s=_.useRef(null),c=_.useRef(null),{replaceMessages:u}=Ty(),{toggleTextAreaDisabled:A}=Ly(),{setSessionId:d,getSessionId:f}=SM();_.useEffect(()=>{var n,r;const o=e=>{s.current&&!s.current.contains(e.target)&&c.current&&!c.current.contains(e.target)&&t(!1)},i=null!==(r=null===(n=s.current)||void 0===n?void 0:n.getRootNode())&&void 0!==r?r:document;return e&&i.addEventListener("mousedown",o),()=>{i.removeEventListener("mousedown",o)}},[e]);const p=e=>{var n;const r=f();if(AM("RESTORE requested",{targetSession:e.slice(-12),currentSession:null==r?void 0:r.slice(-12)}),e===r)return AM("RESTORE skipped - already on this session"),void t(!1);const o=(e=>{var t;return(null===(t=vM()[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()});AM("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()}));d(e),AM("Session ID updated",{newSession:e.slice(-12)}),u(i),AM("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("<a href=")&&(n=n.replace(/<a\s+href=["']([^"']+)["'][^&]*>([^&]+)<\/a>/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),r=!0),(n.includes("<a ")||(null===(t=e.textContent)||void 0===t?void 0:t.includes("<a href=")))&&(e.textContent||"").includes("<a href=")&&(n=n.replace(/<a\s+href="([^"]+)"[^&]*>([^&]+)<\/a>/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),r=!0),r&&(e.innerHTML=n)})},50)})(null===(n=c.current)||void 0===n?void 0:n.getRootNode()),A(!1),AM("Chat input enabled after restore"),t(!1)};return j.createElement("div",{style:{position:"relative"}},j.createElement("button",{ref:c,className:"history-button",onClick:()=>{if(!e&&(r((()=>{const e=vM();return Object.entries(e).map(([e,t])=>Object.assign({sessionId:e},t)).sort((e,t)=>new Date(t.startedAt).getTime()-new Date(e.startedAt).getTime())})()),c.current)){const e=c.current.closest(".rcb-chat-window");if(e){const t=e.getBoundingClientRect(),n=c.current.getBoundingClientRect();i(t.width+3),l(t.right-n.right-18+4)}}t(!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"},j.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"},j.createElement("circle",{cx:"12",cy:"12",r:"10"}),j.createElement("polyline",{points:"12 6 12 12 16 14"}))),e&&j.createElement("div",{ref:s,role:"menu",style:{position:"absolute",right:a?`-${a}px`:"-18px",top:"100%",marginTop:"8px",width:o?`${o}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===n.length?j.createElement("div",{style:{padding:"12px 16px",color:"#666",fontSize:"14px",textAlign:"center"}},"No chat history"):n.map(e=>j.createElement("button",{key:e.sessionId,role:"menuitem",onClick:()=>p(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"}},j.createElement("span",{style:{fontSize:"14px",color:"#333",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},e.preview||"New conversation"),j.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))))))},CM=n=>{var{width:r=24,height:o=24,color:i="currentColor",children:a}=n,l=t(n,["width","height","color","children"]);return j.createElement("svg",e({xmlns:"http://www.w3.org/2000/svg",width:r,height:o,viewBox:"0 0 24 24",fill:"none",stroke:i,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},l),a)},PM=e=>j.createElement(CM,e,j.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"})),DM=()=>{const{restartFlow:e}=By(),{setTextAreaValue:t}=Ly(),{getSessionId:n,resetSession:r,clearResettingFlag:o}=SM(),{trackEvent:i}=GI();return j.createElement("button",{onClick:async()=>{const a=n(),l=a?bM(a):0;i({type:"chatbot_new_chat",previousMessageCount:l}),r(),await t(""),await e(),setTimeout(()=>{o()},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)"}},j.createElement(PM,{width:16,height:16}),"New Chat")};function BM(e){if("string"==typeof e)return e;if("number"==typeof e)return String(e);if(!e)return"";if(Array.isArray(e))return e.map(BM).join("");if("object"==typeof e&&null!==e&&"props"in e){const t=e.props;if(t&&"children"in t)return BM(t.children)}return""}const TM=()=>{const{getSessionId:e}=SM(),t=_.useCallback(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 a;if(a="string"==typeof r.content?r.content:BM(r.content),dM("TRACKED",{id:r.id,sender:o,content:a.substring(0,50)+(a.length>50?"...":"")}),a.includes("rcb-options-container"))return;if(!a.trim())return;const l=e();yM(l,r.id,a,o,i)},[e]);return _.useEffect(()=>(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},IM=()=>(_.useEffect(()=>{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 a=i.findIndex(e=>e===document.activeElement);switch(e.key){case"ArrowDown":case"ArrowRight":{let t;e.preventDefault(),t=a<i.length-1?a+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=a>0?a-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"),a=i&&i.style.backgroundColor?"checked":"unchecked";t(`${o} ${a}`)}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],a=Array.from(i.querySelectorAll(".rcb-options-container")).filter(e=>null!==e.offsetParent);let l=[];if(a.length>0){const e=a[a.length-1];l=Array.from(e.querySelectorAll(".rcb-options"))}if(0===l.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(l.length>0){if(l.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",l.length),0===t?e.classList.add("keyboard-focused"):e.classList.remove("keyboard-focused")}),l.length>1){const e=a.length>0?a[a.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=a.length>0?a[a.length-1]:null;if(e){e.querySelectorAll(".keyboard-nav-hint").forEach(e=>e.remove())}}setTimeout(()=>{l[0]&&null!==l[0].offsetParent&&!r&&(l[0].focus(),l.length>1&&t(`${l.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 MM=!1,LM=null;function OM(){return MM?Promise.resolve():LM||(LM=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=()=>{MM=!0,fM("Script loaded"),e()},n.onerror=()=>{LM=null,t(new Error("Failed to load Turnstile script"))},document.head.appendChild(n)}),LM)}const QM=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},RM=({siteKey:e,onVerify:t,onError:n,loginUrl:r})=>{const o=_.useRef(null),i=_.useRef(null),a=_.useRef(!1),l=_.useRef(null),s=_.useRef(null),[c,u]=_.useState(!1),[A,d]=_.useState(0),f=_.useRef("widget_error"),p=_.useRef(null),h=r&&"/login"!==r,g=_.useCallback(()=>{const e=window.turnstile;if(l.current&&(null==e?void 0:e.remove)){try{e.remove(l.current)}catch(e){}l.current=null}},[]),m=_.useCallback(()=>{var e;g(),c?null==n||n(f.current,null!==(e=p.current)&&void 0!==e?e:void 0):null==n||n("user_cancelled")},[n,g,c]);_.useEffect(()=>()=>{g()},[g]),_.useEffect(()=>{var e;return s.current=document.activeElement,null===(e=i.current)||void 0===e||e.focus(),()=>{s.current&&"function"==typeof s.current.focus&&s.current.focus()}},[]),_.useEffect(()=>{const e=e=>{if("Escape"===e.key)return e.preventDefault(),void m();if("Tab"===e.key&&i.current){const t=i.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)},[m]),_.useEffect(()=>{a.current||!o.current||c||(a.current=!0,OM().then(()=>{const n=window.turnstile;if(!n||!o.current)return hM("Turnstile API not available after script load"),f.current="api_unavailable",void u(!0);l.current=n.render(o.current,{sitekey:e,callback:e=>{fM("Visible challenge completed"),t(e)},"error-callback":e=>(hM("Turnstile challenge failed:",e),p.current=e,f.current="widget_error",g(),u(!0),!0),"expired-callback":()=>{hM("Turnstile token expired"),f.current="token_expired",g(),u(!0)}})}).catch(e=>{hM("Failed to load Turnstile script:",e),f.current="script_load_failed",u(!0)}))},[e,t,c,g]);const v=j.createElement(j.Fragment,null,j.createElement("div",{"aria-hidden":"true",style:{position:"fixed",inset:0,background:"rgba(0, 0, 0, 0.5)",zIndex:999998}}),j.createElement("div",{ref:i,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'}},j.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"),c?j.createElement("div",{style:{fontSize:"14px",lineHeight:"1.5",color:"#333"}},0===A?j.createElement("p",{style:{margin:"0 0 16px 0"}},"Verification failed. You can try again",h&&j.createElement(j.Fragment,null,", or"," ",j.createElement("a",{href:r,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--primaryColor, #107180)",fontWeight:"bold"}},"log in")," ","to skip verification"),"."):j.createElement(j.Fragment,null,j.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."),j.createElement("p",{style:{margin:"0 0 16px 0"}},"Try disabling extensions, using a private/incognito window,",h&&j.createElement(j.Fragment,null," ",j.createElement("a",{href:r,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--primaryColor, #107180)",fontWeight:"bold"}},"logging in"),",")," ","or using a different browser.")),j.createElement("div",{style:{display:"flex",gap:"8px"}},j.createElement("button",{type:"button",onClick:()=>{g(),a.current=!1,d(e=>e+1),u(!1)},style:{padding:"8px 16px",background:"var(--primaryColor, #107180)",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Try again"),j.createElement("button",{type:"button",onClick:m,style:{padding:"8px 16px",background:"#f0f0f0",color:"#333",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Close"))):j.createElement(j.Fragment,null,j.createElement("div",{ref:o,style:{borderRadius:"8px",overflow:"hidden"}}),j.createElement("button",{type:"button",onClick:m,style:{marginTop:"16px",padding:"8px 16px",background:"#f0f0f0",color:"#333",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Cancel"))));return Xu.createPortal(v,document.body)};function NM(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 FM({getState:e,onResubmit:t,trackEvent:n,loginUrl:r}){var o;const[i,a]=j.useState(null),[l,s]=j.useState(0),c=e(),u={},A="true"===u.VITE_FORCE_TURNSTILE_WIDGET,d=null!==(o=c.siteKey)&&void 0!==o?o:A?u.VITE_TURNSTILE_SITE_KEY:null;return d&&(A||i!==d)?j.createElement(RM,{key:l,siteKey:d,loginUrl:r,onVerify:async e=>{const r=d;c.token=e,null==n||n({type:"chatbot_turnstile_completed"});"needs_another_challenge"===await t(e)?s(e=>e+1):a(r)},onError:(e,t)=>{var r;const o=null===(r=c.pendingQuery)||void 0===r?void 0:r.queryId,i=d;c.token=null,c.pendingQuery=null,c.needsChallenge=!1,c.siteKey=null,a(i),null==n||n({type:"chatbot_turnstile_error",queryId:o,failureReason:e,cloudflareErrorCode:t})}}):null}const zM="#1a5b6e",_M="#107180",jM="Arial, sans-serif",HM="Q&A Bot",UM="/chat-icon.svg",qM="Type your question here...",VM="Select an option to continue",WM=!1,YM="Ask me a question!",GM="/login",XM={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}},KM=_.forwardRef((e,t)=>{var n,r,o;const{apiKey:i,qaEndpoint:a,ratingEndpoint:l,agentRatingEndpoint:s,welcomeMessage:c,open:u,onOpenChange:A,isLoggedIn:d,allowAnonAccess:f=!1,actingUser:p,primaryColor:h,secondaryColor:g,botName:m,logo:v,placeholder:y,errorMessage:b,embedded:w,footerText:x,footerLink:k,tooltipText:S,loginUrl:E,turnstileSiteKey:C,backendId:P,resourceContext:D,customFlow:B,onAnalyticsEvent:T}=e,I=_.useRef(`bot_${Math.random().toString(36).substr(2,9)}`);_.useEffect(()=>{cM()},[]);const M=_.useRef(null);null===M.current&&(M.current=mM(),uM("CREATED",M.current));const L=_.useRef(!1),O=_.useRef({getSessionId:()=>M.current,isResetting:()=>L.current}),Q=_.useRef(null),R=function(e,t){const[n,r]=_.useState(null),[o,i]=_.useState("idle"),a=_.useRef(null),l=_.useRef(null),s=_.useRef(!0),c=_.useCallback(()=>{const e=window.turnstile;if(l.current&&(null==e?void 0:e.remove)){try{e.remove(l.current)}catch(e){}l.current=null}a.current&&(a.current.remove(),a.current=null)},[]);return _.useEffect(()=>{if(s.current=!0,!e)return i("idle"),void r(null);i("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),a.current=n,OM().then(()=>{if(!s.current)return;const n=window.turnstile;if(!n||!a.current)return hM("Turnstile API not available for silent verification"),i("failed"),void(null==t||t({type:"chatbot_turnstile_silent_failed",failureReason:"api_unavailable"}));const o=n.render(a.current,{sitekey:e,execution:"render","refresh-expired":"auto",callback:e=>{s.current&&(fM("Silent verification succeeded"),r(e),i("verified"))},"error-callback":e=>!s.current||(hM("Turnstile silent verification failed:",e),r(null),i("failed"),null==t||t({type:"chatbot_turnstile_silent_failed",failureReason:"widget_error",cloudflareErrorCode:e}),!0),"expired-callback":()=>{s.current&&(fM("Token expired, awaiting refresh"),r(null),i("loading"))}});l.current=o}).catch(e=>{s.current&&(hM("Failed to load Turnstile script for silent verification:",e),i("failed"),null==t||t({type:"chatbot_turnstile_silent_failed",failureReason:"script_load_failed"}))}),()=>{s.current=!1,c()}},[e,c]),{token:n,status:o,reset:_.useCallback(()=>{const e=window.turnstile;l.current&&(null==e?void 0:e.reset)&&(r(null),i("loading"),e.reset(l.current),fM("Token consumed, resetting widget for fresh token"))},[])}}(C,e=>{var t;null===(t=Q.current)||void 0===t||t.call(Q,e)}),N=_.useRef(null);N.current=R.token;const[F,z]=_.useState(d);_.useEffect(()=>{z(d)},[d]);const H=void 0!==w?w:WM,U=_.useCallback(e=>{var t;T&&T(Object.assign(Object.assign({},e),{timestamp:Date.now(),sessionId:null!==(t=M.current)&&void 0!==t?t:void 0,pageUrl:"undefined"!=typeof window?window.location.href:void 0,isEmbedded:H}))},[T,H]);_.useEffect(()=>{Q.current=e=>U(e)},[U]);const q=_.useMemo(()=>{const e=Object.assign({},XM);e.general=Object.assign(Object.assign({},e.general),{primaryColor:h||zM,secondaryColor:g||_M,fontFamily:jM,embedded:H});const t=!1===F?[j.createElement(EM,{key:"history-button"}),j.createElement(XI,{key:"login-button",loginUrl:E||GM,isHeaderButton:!0})]:[j.createElement(EM,{key:"history-button"}),j.createElement(KI,{key:"user-icon"})];e.header={title:j.createElement("span",{style:{fontSize:14,fontWeight:500}},m||HM),showAvatar:!0,avatar:v||UM,buttons:[...t,$g.CLOSE_CHAT_BUTTON]},e.chatInput=Object.assign(Object.assign({},e.chatInput),{disabled:!1,enabledPlaceholderText:y||qM,disabledPlaceholderText:b||VM}),e.tooltip=Object.assign(Object.assign({},e.tooltip),{text:S||YM});const n=x?k?j.createElement("a",{href:k,target:"_blank",rel:"noopener noreferrer",key:"footer-link"},x):j.createElement("span",{key:"footer-text"},x):null;return e.footer={text:null!=n?n:void 0,buttons:[j.createElement(DM,{key:"new-chat-button"})]},e.chatWindow=Object.assign(Object.assign({},e.chatWindow),{defaultOpen:!!H}),e.event={rcbPreInjectMessage:!0,rcbPostInjectMessage:!0,rcbStopStreamMessage:!0,rcbUserSubmitText:!0,rcbChangePath:!0,rcbToggleChatWindow:!0},e},[h,g,m,v,y,b,H,S,F,E,x,k]),V=_.useRef(null),W=((e,t={})=>{const n=_.useMemo(()=>{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})(V,q.general);((e,t)=>{_.useEffect(()=>{t.current&&(e?t.current.classList.add("bot-logged-in"):t.current.classList.remove("bot-logged-in"))},[e,t])})(!1!==F,V),(({settings:e,themeColors:t})=>{_.useEffect(()=>{t&&(Object.entries(t).forEach(([e,t])=>{t&&document.documentElement.style.setProperty(`--${e}`,t)}),t.primaryColor&&document.documentElement.style.setProperty("--rcb-header-background",t.primaryColor),t.secondaryColor&&document.documentElement.style.setProperty("--rcb-header-background-hover",t.secondaryColor))},[t]),_.useEffect(()=>{var t,n;(null===(t=e.header)||void 0===t?void 0:t.title)&&"string"==typeof e.header.title&&(e.header.title=j.createElement("div",{key:"header-title"},j.createElement("h1",{className:"sr-only"},e.header.title),j.createElement("span",{"aria-hidden":"true"},e.header.title))),e.device={desktopEnabled:!0,mobileEnabled:!0,applyMobileOptimizations:!1},e.chatHistory={disabled:!0},e.chatButton=Object.assign(Object.assign({},e.chatButton),{icon:null===(n=e.header)||void 0===n?void 0:n.avatar}),e.event=Object.assign(Object.assign({},e.event),{rcbToggleChatWindow:!0})},[e])})({settings:q,themeColors:W});const Y=_.useMemo(()=>{const e=(({endpoint:e,ratingEndpoint:t,agentRatingEndpoint:n,apiKey:r,sessionId:o,isResetting:i=()=>!1,isLoggedIn:a,allowAnonAccess:l=!1,loginUrl:s="/login",actingUser:c,trackEvent:u,getTurnstileToken:A,resetTurnstileToken:d,backendId:f,resourceContext:p})=>{if(!1===a&&!l)return null==u||u({type:"chatbot_login_prompt_shown"}),{qa_loop:{message:"To ask questions, please log in first.",component:j.createElement(XI,{loginUrl:s}),chatDisabled:!0,path:"qa_loop"}};let h=null,g=null,m=!1;const v={siteKey:null,token:null,pendingQuery:null,needsChallenge:!1};let y=null;if(!e)throw new Error("Q&A endpoint is required");return{qa_loop:{message:async a=>{var l;y=a.injectMessage.bind(a);const{userInput:s}=a;if((!i||!i())&&s&&""!==s.trim()){if("👍 Helpful"===s||"👎 Not helpful"===s){if(h){const e="👍 Helpful"===s,i="agent"===g?n:t;if(i)try{const t={"Content-Type":"application/json"};r&&(t["X-API-KEY"]=r);const n=o();n&&(t["X-Session-ID"]=n,t["X-Query-ID"]=h);const a="agent"===g?{query_id:h,rating:e?"helpful":"not_helpful",session_id:n}:{sessionId:n,queryId:h,rating:e?1:0};await fetch(i,{method:"POST",headers:t,credentials:"include",body:JSON.stringify(a)}),null==u||u({type:"chatbot_rating_sent",queryId:h,rating:e?"helpful":"not_helpful"})}catch(e){hM("Error sending feedback:",e)}}return"Thanks for the feedback!"}try{const t=tM();h=t,null==u||u({type:"chatbot_question_sent",queryId:t,questionLength:s.length});const n={"Content-Type":"application/json"};r&&(n["X-API-KEY"]=r);const i=o();i&&(n["X-Session-ID"]=i,n["X-Query-ID"]=t),n["X-Origin"]=p||"access";const c={query:s,question_id:t};i&&(c.session_id=i),f&&(c._backend=f),p&&(c.rp_name=p,c.resource_context=p);const y=null==A?void 0:A();y&&(c.turnstile_token=y),uM("SENT to API",{session_id:i,question_id:t});const b=Date.now(),w=await fetch(e,{method:"POST",headers:n,credentials:"include",body:JSON.stringify(c)});if(!w.ok)throw new Error(`API returned ${w.status}`);if((w.headers.get("content-type")||"").includes("text/event-stream")){null==d||d();const e=null===(l=w.body)||void 0===l?void 0:l.getReader();if(!e)throw new Error("Response body is not readable");const n=new TextDecoder;let r="",o="",i=!1;try{for(;;){const{done:t,value:l}=await e.read();if(t)break;r+=n.decode(l,{stream:!0});let s=r.indexOf("\n\n");for(;-1!==s;){const e=r.slice(0,s);r=r.slice(s+2);let t,n="",l="";for(const t of e.split("\n"))t.startsWith("event: ")?n=t.slice(7):t.startsWith("data: ")&&(l=t.slice(6));if(n&&l){try{t=JSON.parse(l)}catch(e){pM("Failed to parse SSE data:",l),s=r.indexOf("\n\n");continue}if("status"===n){const e=t.message||"Processing...";await a.streamMessage(`_${e}_`,"BOT"),i=!0}else if("token"===n){o+=t.content||"";const e=QM(o);await a.streamMessage(e,"BOT")}else if("done"===n){const e=t.metadata||{};if(g=e.rating_target||null,m=!0===e.is_final_response,o)await a.endStreamMessage("BOT");else{const e=t.response||"";if(e){const t=QM(e);await a.streamMessage(t,"BOT"),i=!0}i&&await a.endStreamMessage("BOT")}}else if("error"===n){const e=t.message||"An error occurred";hM("SSE error event:",e),i?(await a.streamMessage(e,"BOT"),await a.endStreamMessage("BOT")):await a.injectMessage(e)}s=r.indexOf("\n\n")}else s=r.indexOf("\n\n")}}i&&await a.endStreamMessage("BOT")}catch(e){if(hM("Error reading SSE stream:",e),!i)throw e;await a.streamMessage("I had trouble completing the response. Please try again.","BOT"),await a.endStreamMessage("BOT")}const s=Date.now()-b;return void(null==u||u({type:"chatbot_answer_received",queryId:t,responseTimeMs:s,success:!0,responseLength:o.length}))}const x=Date.now()-b,k=await w.json();if(k.requires_turnstile)return null==u||u({type:"chatbot_turnstile_shown",queryId:t}),v.siteKey=k.site_key,v.pendingQuery={query:s,sessionId:i,queryId:t},v.needsChallenge=!0,"One moment — verifying your session…";null==d||d();const S=k.response||k.answer||k.text||k.message;if(!S)throw new Error("Invalid response format from API");const E=k.metadata||{};g=E.rating_target||null,m=!0===E.is_final_response;const C=QM(S),P=nM()?NM(k):"",D=P?`${C}\n\n${P}`:C;return await a.injectMessage(D),void(null==u||u({type:"chatbot_answer_received",queryId:t,responseTimeMs:x,success:!0,responseLength:S.length,hasMetadata:!!P}))}catch(e){return hM("Error in Q&A flow:",e),null==u||u({type:"chatbot_answer_error",queryId:null!=h?h: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=>i&&i()||"👍 Helpful"===e.userInput||"👎 Not helpful"===e.userInput||v.needsChallenge?[]:m&&g&&("agent"===g?n:t)?["👍 Helpful","👎 Not helpful"]:[],renderMarkdown:["BOT"],chatDisabled:!1,component:j.createElement(FM,{getState:()=>v,onResubmit:async t=>{var n;if(!v.pendingQuery||!y)return hM("Turnstile resubmit called without pending query or injectMessage"),"error";try{const o={"Content-Type":"application/json"};r&&(o["X-API-KEY"]=r),v.pendingQuery.sessionId&&(o["X-Session-ID"]=v.pendingQuery.sessionId,o["X-Query-ID"]=v.pendingQuery.queryId),o["X-Origin"]=p||"access";const i={query:v.pendingQuery.query,question_id:v.pendingQuery.queryId,turnstile_token:t};v.pendingQuery.sessionId&&(i.session_id=v.pendingQuery.sessionId),f&&(i._backend=f),p&&(i.rp_name=p,i.resource_context=p);const a=await fetch(e,{method:"POST",headers:o,credentials:"include",body:JSON.stringify(i)}),l=v.pendingQuery.queryId;if(!a.ok)throw new Error(`API returned ${a.status} after Turnstile`);if((a.headers.get("content-type")||"").includes("text/event-stream")){const e=null===(n=a.body)||void 0===n?void 0:n.getReader();if(!e)throw new Error("Response body is not readable");const t=new TextDecoder;let r="",o="",i={};for(;;){const{done:n,value:a}=await e.read();if(n)break;r+=t.decode(a,{stream:!0});let l=r.indexOf("\n\n");for(;-1!==l;){const e=r.slice(0,l);r=r.slice(l+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){}l=r.indexOf("\n\n")}}if(v.token=null,v.pendingQuery=null,v.needsChallenge=!1,v.siteKey=null,!o)throw new Error("No content received from stream");g=i.rating_target||null,m=!0===i.is_final_response,h=l;const s=QM(o);return await y(s),null==u||u({type:"chatbot_answer_received",queryId:l,success:!0,responseLength:o.length}),"success"}const s=await a.json();if(s.requires_turnstile)return v.siteKey=s.site_key,v.token=null,await y("Still verifying — please complete the challenge again."),"needs_another_challenge";v.token=null,v.pendingQuery=null,v.needsChallenge=!1,v.siteKey=null;const c=s.response||s.answer||s.text||s.message;if(!c)throw new Error("Invalid response format from API");const A=s.metadata||{};g=A.rating_target||null,m=!0===A.is_final_response,h=l;const d=QM(c),b=nM()?NM(s):"",w=b?`${d}\n\n${b}`:d;return await y(w),null==u||u({type:"chatbot_answer_received",queryId:l,success:!0,responseLength:c.length}),"success"}catch(e){return hM("Error resubmitting after Turnstile:",e),v.token=null,v.pendingQuery=null,v.needsChallenge=!1,v.siteKey=null,await(null==y?void 0:y("I had trouble processing your question after verification. Please try again.")),"error"}},trackEvent:u,loginUrl:s}),path:"qa_loop"}}})({endpoint:a,ratingEndpoint:l,agentRatingEndpoint:s,apiKey:i,sessionId:O.current.getSessionId,isResetting:O.current.isResetting,isLoggedIn:F,allowAnonAccess:f,loginUrl:E||GM,actingUser:p,trackEvent:U,getTurnstileToken:()=>N.current,resetTurnstileToken:()=>R.reset(),backendId:P,resourceContext:D}),t={message:c,renderMarkdown:["BOT"],transition:{duration:0},path:"qa_loop"};return Object.assign(Object.assign({start:t},e),B||{})},[i,a,l,s,c,F,f,E,B,p,U,D,P]),G=_.useMemo(()=>[Ab(),VS({markdownComponent:qI}),XS()],[]);return _.useEffect(()=>{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)},[]),IM(),_.useEffect(()=>{const e=V.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")||U({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)},[U]),_.useEffect(()=>{if(!H){const e=e=>{const t=e.data.newState;null==A||A(t);const n=M.current;U(t?{type:"chatbot_open"}:{type:"chatbot_close",messageCount:n?bM(n):0,durationMs:n?wM(n):0})};return window.addEventListener("rcb-toggle-chat-window",e),()=>{window.removeEventListener("rcb-toggle-chat-window",e)}}},[H,A,U]),j.createElement("div",{className:"qa-bot "+((null===(n=q.general)||void 0===n?void 0:n.embedded)?"embedded-qa-bot":""),ref:V,role:"region","aria-label":`${m||HM}${(null===(r=q.general)||void 0===r?void 0:r.embedded)?" - Embedded":""}`},j.createElement(kM,{getSessionId:()=>M.current,setSessionId:e=>{const t=M.current;M.current=e,uM("RESTORED",`${null==t?void 0:t.slice(-12)} -> ${e.slice(-12)}`)},resetSession:()=>{const e=M.current;L.current=!0,M.current=mM(),uM("RESET",`${null==e?void 0:e.slice(-12)} -> ${M.current.slice(-12)}`)},clearResettingFlag:()=>{L.current=!1}},j.createElement(YI,{trackEvent:U},j.createElement(ky,null,j.createElement("div",null,j.createElement(TM,null),j.createElement(VI,{ref:t,embedded:(null===(o=q.general)||void 0===o?void 0:o.embedded)||!1,currentOpen:u||!1,enabled:!1!==F,onSetEnabled:e=>z(!!e&&void 0)}),j.createElement(Py,{key:`chatbot-${I.current}-${F}`,settings:q,flow:Y,plugins:G}),j.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}}),j.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."))))))});KM.displayName="QABot";Ju('.rcb-chat-window{height:800px!important;max-height:80vh!important;max-width:100%;width:550px!important}.rcb-chat-window .rcb-chat-header{align-items:center;display:flex;flex-direction:row;font-weight:700}.rcb-chat-window .rcb-chat-input-textarea{overflow-y:auto}.rcb-chat-window .rcb-chat-footer-container{font-size:10px}.qa-bot .user-login-icon{display:none!important}.qa-bot .history-button,.qa-bot.bot-logged-in .user-login-icon{display:flex!important;transform:scale(1.3) translateY(-2px)}.qa-bot .history-button:hover{opacity:.8}.qa-bot .history-button:focus{outline:2px solid #fff;outline-offset:2px}.embedded-qa-bot .rcb-chat-window{height:fit-content!important;max-height:80vh!important;max-width:100%;width:100%!important}.qa-bot.hidden{display:none}.embedded-qa-bot .rcb-bot-message,.embedded-qa-bot .rcb-user-message{max-width:90%!important;word-break:break-word}.embedded-qa-bot .rcb-chat-input-textarea{width:100%!important}.qa-bot-container{max-width:100%;width:100%}.rcb-chat-tooltip>span:not(.rcb-chat-tooltip-tail){background-color:#107180;color:#fff}.rcb-chat-tooltip-tail{border-color:#0000 #0000 #0000 #1a5b6e}@keyframes phone-ring{0%{transform:translateX(0) translateY(0) rotate(0deg)}2%{transform:translateX(0) translateY(-8px) rotate(-2deg)}4%{transform:translateX(0) translateY(-6px) rotate(2deg)}6%{transform:translateX(0) translateY(-8px) rotate(-1deg)}8%{transform:translateX(0) translateY(-6px) rotate(1deg)}10%{transform:translateX(0) translateY(-8px) rotate(-2deg)}12%{transform:translateX(0) translateY(-6px) rotate(2deg)}20%{transform:translateX(0) translateY(0) rotate(0deg)}30%{transform:translateX(0) translateY(0) rotate(0deg)}40%{transform:translateX(0) translateY(0) rotate(0deg)}49%{transform:translateX(0) translateY(0) rotate(0deg)}50%{transform:translateX(0) translateY(-8px) rotate(-2deg)}52%{transform:translateX(0) translateY(-6px) rotate(2deg)}54%{transform:translateX(0) translateY(-8px) rotate(-1deg)}56%{transform:translateX(0) translateY(-6px) rotate(1deg)}58%{transform:translateX(0) translateY(-8px) rotate(-2deg)}60%{transform:translateX(0) translateY(-6px) rotate(2deg)}70%{transform:translateX(0) translateY(0) rotate(0deg)}to{transform:translateX(0) translateY(0) rotate(0deg)}}@media (max-width:768px){.rcb-chat-window{max-height:calc(100vh - 100px)!important;max-width:calc(100vw - 40px)!important;width:550px!important}.embedded-chat-container.open{height:400px}.embedded-chat-closed{font-size:14px;height:40px}.embedded-chat-open-btn{font-size:12px;padding:3px 10px}.rcb-bot-message,.rcb-user-message{max-width:85%!important}.rcb-chat-input-textarea{font-size:16px!important;min-height:44px!important}.rcb-chat-header{padding:12px 16px!important}.rcb-chat-tooltip,.rcb-chat-tooltip-tail{display:none!important}}@media (max-width:480px){.rcb-chat-window{bottom:10px!important;left:10px!important;max-height:calc(100vh - 80px)!important;max-width:calc(100vw - 20px)!important;right:10px!important;width:calc(100vw - 20px)!important}.embedded-chat-container.open{height:350px}.rcb-bot-message,.rcb-user-message{margin-bottom:8px!important;max-width:90%!important}.rcb-chat-header{font-size:14px!important;padding:8px 12px!important}.rcb-chat-button{bottom:20px!important;height:50px!important;right:20px!important;width:50px!important}.rcb-chat-footer-container{font-size:9px!important;padding:8px 12px!important}}@media (max-width:360px){.rcb-chat-window{left:5px!important;max-width:calc(100vw - 10px)!important;right:5px!important;width:calc(100vw - 10px)!important}.rcb-chat-header{font-size:13px!important;padding:6px 8px!important}}.rcb-checkbox-container{display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin-left:16px!important;max-width:100%!important;padding-top:12px!important}.rcb-checkbox-row-container{align-items:center!important;background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:var(--primaryColor,#107180)!important;cursor:pointer!important;display:flex!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;margin:0!important;max-height:auto!important;min-height:auto!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-checkbox-row-container:hover{background-color:#e8f4f8!important;border-color:var(--primaryColor,#107180)!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.rcb-checkbox-row-container[data-checked=true]{background-color:var(--primaryColor,#107180)!important;border-color:var(--primaryColor,#107180)!important;color:#fff!important}.rcb-checkbox-row{margin-left:0!important}.rcb-checkbox-mark{height:14px!important;margin-right:6px!important;width:14px!important}.rcb-checkbox-label{font-size:13px!important;margin:0!important;white-space:nowrap!important}.rcb-checkbox-next-button{align-items:center!important;background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:var(--secondaryColor,#107180)!important;cursor:pointer!important;display:flex!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;justify-content:center!important;line-height:24px!important;margin:0!important;max-height:auto!important;min-height:auto!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-checkbox-next-button:hover{background-color:#e8f4f8!important;border-color:var(--secondaryColor,#107180)!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.sr-only{clip:rect(0,0,0,0)!important;border:0!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}.rcb-chat-input-send-button:focus,.rcb-chat-input-textarea:focus{outline:2px solid var(--primaryColor,#107180)!important;outline-offset:2px!important}.rcb-bot-message h1,.rcb-bot-message h2,.rcb-bot-message h3,.rcb-bot-message h4,.rcb-bot-message h5,.rcb-bot-message h6{line-height:1.3!important;margin:.6em 0 .3em!important}.rcb-bot-message h1:first-child,.rcb-bot-message h2:first-child,.rcb-bot-message h3:first-child,.rcb-bot-message h4:first-child,.rcb-bot-message h5:first-child,.rcb-bot-message h6:first-child{margin-top:0!important}.rcb-bot-message ol,.rcb-bot-message ul{list-style-position:outside!important;margin:.5em 0!important;padding-left:1.5em!important}.rcb-bot-message li{margin-bottom:.25em!important}.rcb-bot-message li>p{display:inline!important;margin:0!important}.rcb-user-message{word-wrap:break-word!important;overflow:hidden!important;word-break:break-word!important}:focus-visible{outline:2px solid var(--primaryColor,#107180)!important;outline-offset:2px!important}.rcb-options-container{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;gap:8px!important;margin:16px!important;padding:0!important}.rcb-options{background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:var(--secondaryColor,#107180)!important;cursor:pointer!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;outline:none!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-options:hover{background-color:#e8f4f8!important;border-color:var(--secondaryColor,#107180)!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.rcb-bot-message-container:has(.rcb-options-container):has(~.rcb-bot-message-container .rcb-options-container) .rcb-options,.rcb-bot-message-container:has(.rcb-options-container):has(~.rcb-user-message-container) .rcb-options{cursor:default!important;opacity:.5!important;pointer-events:none!important}.rcb-checkbox-next-button.keyboard-focused,.rcb-checkbox-next-button:focus,.rcb-checkbox-next-button:focus-visible,.rcb-checkbox-row-container.keyboard-focused,.rcb-checkbox-row-container:focus,.rcb-checkbox-row-container:focus-visible,.rcb-options.keyboard-focused,.rcb-options:focus,.rcb-options:focus-visible{background-color:#e8f4f8!important;border-color:var(--secondaryColor,#107180)!important;outline:none!important}.rcb-options:active{background-color:var(--secondaryColor,#107180)!important;border-color:var(--secondaryColor,#107180)!important;color:#fff!important;transform:translateY(0)!important}.keyboard-nav-hint{color:#666!important;font-size:12px!important;font-style:italic!important;margin-bottom:8px!important}@media (prefers-reduced-motion:reduce){.keyboard-nav-hint{display:none!important}}.rcb-options-container [role=button][tabindex="0"],.rcb-options-container button[tabindex="0"]{position:relative!important}.rcb-options-container [role=button][tabindex="0"]:after,.rcb-options-container button[tabindex="0"]:after{color:var(--secondaryColor,#107180)!important;content:"←"!important;font-size:16px!important;opacity:0!important;position:absolute!important;right:12px!important;top:50%!important;transform:translateY(-50%)!important;transition:opacity .2s ease!important}.rcb-options-container [role=button][tabindex="0"]:focus:after,.rcb-options-container button[tabindex="0"]:focus:after{opacity:1!important}.rcb-chat-input-send-button{cursor:pointer!important;opacity:1!important;pointer-events:auto!important;visibility:visible!important}.rcb-chat-input-send-button:not([tabindex]){-webkit-user-select:none;-moz-user-select:none;user-select:none}.rcb-chat-input-container [onclick],.rcb-chat-input-container [role=button],.rcb-chat-input-container div[style*=cursor],.rcb-chat-input-container svg:last-child,.rcb-chat-input-container>div:last-child{tabindex:0!important;cursor:pointer!important}.rcb-chat-footer{margin-top:4px!important;padding-top:0!important}.rcb-chat-footer-container{align-items:center!important;display:flex!important;margin-top:4px!important;padding-top:4px!important}.rcb-chat-footer-container button{order:1!important}.rcb-chat-footer-container a[href*=qa-bot-core]{tab-index:0!important;order:2!important}.rcb-chat-footer-container a[href*=feedback]{tab-index:0!important;order:3!important}@media (prefers-contrast:high){.rcb-chat-window a{background-color:#fff!important;border:1px solid #000!important;color:#000!important}}@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}.rcb-chat-input-textarea{user-select:text!important}.rcb-chat-body-container,.rcb-chat-input-textarea,.rcb-chat-window{touch-action:pan-y!important}.embedded-qa-bot,.rcb-chat-window{-webkit-overflow-scrolling:touch!important}.embedded-qa-bot .rcb-chat-input-textarea{touch-action:pan-y!important;user-select:text!important}.embedded-qa-bot .rcb-chat-body-container,.embedded-qa-bot .rcb-chat-window{touch-action:pan-y!important}.rcb-chat-header-container{background:var(--primaryColor,#1a5b6e)!important;background:linear-gradient(135deg,var(--primaryColor,#1a5b6e) 0,var(--secondaryColor,#107180) 100%)!important}.rcb-toggle-button{align-items:center!important;background:var(--primaryColor,#1a5b6e)!important;display:flex!important;justify-content:center!important}.rcb-toggle-button svg{stroke:#fff!important;color:#fff!important}.rcb-toggle-button *,.rcb-toggle-button img,.rcb-toggle-button svg,.rcb-toggle-button>*{box-sizing:border-box!important;height:50px!important;left:0!important;margin:0 auto!important;max-height:50px!important;max-width:50px!important;min-height:50px!important;min-width:50px!important;padding:2px!important;position:relative!important;top:0!important;width:50px!important}.rcb-send-button{background-color:var(--primaryColor,#1a5b6e)!important}',{insertAt:"top"});const JM=j.forwardRef((n,r)=>{var{defaultOpen:o}=n,i=t(n,["defaultOpen"]);const[a,l]=j.useState(o||!1),s=j.useRef(null);return j.useImperativeHandle(r,()=>({addMessage:e=>{var t;null===(t=s.current)||void 0===t||t.addMessage(e)},setBotEnabled:e=>{var t;null===(t=s.current)||void 0===t||t.setBotEnabled(e)},openChat:()=>{var e;l(!0),null===(e=s.current)||void 0===e||e.openChat()},closeChat:()=>{var e;l(!1),null===(e=s.current)||void 0===e||e.closeChat()},toggleChat:()=>{var e;l(e=>!e),null===(e=s.current)||void 0===e||e.toggleChat()}}),[]),j.createElement(KM,e({ref:s},i,{open:a,onOpenChange:l}))});return JM.displayName="ProgrammaticQABot",function(n){if(!(n.target&&n.target instanceof HTMLElement))return void hM("QA Bot: A valid target DOM element is required");const{target:r}=n,o=t(n,["target"]),i=H.createRoot(r),a={current:null};return i.render(j.createElement(j.StrictMode,null,j.createElement(JM,e({ref:e=>{a.current=e}},o)))),{addMessage:e=>{var t;return null===(t=a.current)||void 0===t?void 0:t.addMessage(e)},setBotEnabled:e=>{var t;return null===(t=a.current)||void 0===t?void 0:t.setBotEnabled(e)},openChat:()=>{var e;return null===(e=a.current)||void 0===e?void 0:e.openChat()},closeChat:()=>{var e;return null===(e=a.current)||void 0===e?void 0:e.closeChat()},toggleChat:()=>{var e;return null===(e=a.current)||void 0===e?void 0:e.toggleChat()},destroy:()=>{a.current=null,i.unmount()}}}});
|
|
37
37
|
//# sourceMappingURL=qa-bot-core.standalone.js.map
|