@factorialco/rjsf-f0 1.0.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/README.md ADDED
@@ -0,0 +1,80 @@
1
+ # @factorialco/rjsf-f0
2
+
3
+ The [f0](https://ds.factorial.dev) theme for [react-jsonschema-form](https://rjsf-team.github.io/react-jsonschema-form/). It renders an RJSF form with real f0 components — inputs, selects, checkboxes, buttons — instead of styling plain HTML to look like f0.
4
+
5
+ Use it inside an app that already runs f0 (the Factorial Code dashboard, the Factorial monolith). Apps that embed a form on an arbitrary page should keep the Forms SDK's own theme, which needs no design system: f0 cannot be tree-shaken, so pulling it in costs megabytes.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ pnpm add @factorialco/rjsf-f0
11
+ ```
12
+
13
+ Peers you must already have: `react`, `react-dom`, `@rjsf/core` 6, `@rjsf/utils` 6 and `@factorialco/f0-react` 4.39+.
14
+
15
+ ## Usage
16
+
17
+ With the Factorial Code Forms SDK — it keeps fetching the form spec and submitting, and only the rendering changes:
18
+
19
+ ```tsx
20
+ import FcodeForm from '@factorialco/fcode-react-forms';
21
+ import { Theme } from '@factorialco/rjsf-f0';
22
+ import '@factorialco/rjsf-f0/styles.css';
23
+
24
+ <FcodeForm
25
+ team="my-team"
26
+ processId="my-process"
27
+ rjsfTheme={Theme}
28
+ // Suppresses the SDK's standalone stylesheet, which resets inherited styles
29
+ // and would fight the host app's own.
30
+ options={{ theme: 'none', locale: 'en' }}
31
+ />;
32
+ ```
33
+
34
+ Standalone, as any RJSF theme:
35
+
36
+ ```tsx
37
+ import Form from '@factorialco/rjsf-f0';
38
+ import validator from '@rjsf/validator-ajv8';
39
+ import '@factorialco/rjsf-f0/styles.css';
40
+
41
+ <Form schema={schema} validator={validator} />;
42
+ ```
43
+
44
+ Also exported: `Theme`, `Templates`, `Widgets`, `generateTheme()` and `generateForm()`, matching the layout of the official `@rjsf/*` theme packages.
45
+
46
+ The host app must render f0's `F0Provider` above the form and import `@factorialco/f0-react/dist/styles.css`; this package assumes both and only ships the layout rules for the parts RJSF composes.
47
+
48
+ ## How the mapping works
49
+
50
+ | RJSF | f0 |
51
+ | --- | --- |
52
+ | text / email / url / password | `F0FormField` `text` |
53
+ | number / integer / `updown` / `range` | `F0FormField` `number` |
54
+ | `date` / `datetime-local` / `time` | `F0FormField` `date` / `datetime` / `time` |
55
+ | `textarea` | `F0FormField` `textarea` |
56
+ | enum select, multi-select | `F0FormField` `select` |
57
+ | boolean checkbox, `checkboxes` | `F0Checkbox` |
58
+ | `radio` | `F0FormField` `cardSelect` (f0 has no radio control) |
59
+ | submit, add/move/copy/remove | `F0Button` |
60
+ | error summary | `F0Alert` |
61
+ | section title | `F0Heading` |
62
+
63
+ Two deliberate consequences of that mapping:
64
+
65
+ - **RJSF keeps ownership of validation.** f0 fields normally validate with zod; here they are told about errors (`error`, `errorMessage`) rather than deriving them, so the schema stays the single source of truth.
66
+ - **Labels are rendered by the theme, not by f0.** Factorial Code form labels may contain markdown, which f0 takes as a plain string. The theme renders the markdown label itself and hands f0 the plain text so the control keeps an accessible name.
67
+
68
+ ### Not yet f0
69
+
70
+ - **File fields** keep RJSF's native `<input type="file">`. The SDK exchanges uploads as `data:` URLs, while f0's file field is built around an upload hook — bridging the two is not done yet.
71
+ - **`range`** renders as a number input rather than `F0Slider`.
72
+ - The Forms SDK's `sourceCode` field keeps its Monaco editor, which is not f0-styled.
73
+
74
+ ## Development
75
+
76
+ ```bash
77
+ pnpm test # vitest: renders forms through the theme and checks value round-trips
78
+ pnpm dev # vite playground with every widget
79
+ pnpm build # tsc + vitest + vite (es + cjs + types + styles.css)
80
+ ```
File without changes
@@ -0,0 +1,2 @@
1
+ export * from './src/index'
2
+ export {}
@@ -0,0 +1,18 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const vi=require("@rjsf/core"),_=require("react/jsx-runtime"),ut=require("react"),q=require("@rjsf/utils"),et=require("@factorialco/f0-react"),It=require("@factorialco/f0-react/icons/app");function Vl(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ql=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Wl=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$l={};function Lr(e,t){return($l.jsx?Wl:ql).test(e)}const Gl=/[ \t\n\f\r]/g;function Yl(e){return typeof e=="object"?e.type==="text"?vr(e.value):!1:vr(e)}function vr(e){return e.replace(Gl,"")===""}class $t{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}$t.prototype.normal={};$t.prototype.property={};$t.prototype.space=void 0;function Mi(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new $t(n,r,t)}function Gn(e){return e.toLowerCase()}class _e{constructor(t,n){this.attribute=n,this.property=t}}_e.prototype.attribute="";_e.prototype.booleanish=!1;_e.prototype.boolean=!1;_e.prototype.commaOrSpaceSeparated=!1;_e.prototype.commaSeparated=!1;_e.prototype.defined=!1;_e.prototype.mustUseProperty=!1;_e.prototype.number=!1;_e.prototype.overloadedBoolean=!1;_e.prototype.property="";_e.prototype.spaceSeparated=!1;_e.prototype.space=void 0;let Xl=0;const B=gt(),ue=gt(),Yn=gt(),w=gt(),ne=gt(),dt=gt(),Ne=gt();function gt(){return 2**++Xl}const Xn=Object.freeze(Object.defineProperty({__proto__:null,boolean:B,booleanish:ue,commaOrSpaceSeparated:Ne,commaSeparated:dt,number:w,overloadedBoolean:Yn,spaceSeparated:ne},Symbol.toStringTag,{value:"Module"})),On=Object.keys(Xn);class lr extends _e{constructor(t,n,r,i){let l=-1;if(super(t,n),Mr(this,"space",i),typeof r=="number")for(;++l<On.length;){const o=On[l];Mr(this,On[l],(r&Xn[o])===Xn[o])}}}lr.prototype.defined=!0;function Mr(e,t,n){n&&(e[t]=n)}function Ot(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const l=new lr(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[Gn(r)]=r,n[Gn(l.attribute)]=r}return new $t(t,n,e.space)}const Fi=Ot({properties:{ariaActiveDescendant:null,ariaAtomic:ue,ariaAutoComplete:null,ariaBusy:ue,ariaChecked:ue,ariaColCount:w,ariaColIndex:w,ariaColSpan:w,ariaControls:ne,ariaCurrent:null,ariaDescribedBy:ne,ariaDetails:null,ariaDisabled:ue,ariaDropEffect:ne,ariaErrorMessage:null,ariaExpanded:ue,ariaFlowTo:ne,ariaGrabbed:ue,ariaHasPopup:null,ariaHidden:ue,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ne,ariaLevel:w,ariaLive:null,ariaModal:ue,ariaMultiLine:ue,ariaMultiSelectable:ue,ariaOrientation:null,ariaOwns:ne,ariaPlaceholder:null,ariaPosInSet:w,ariaPressed:ue,ariaReadOnly:ue,ariaRelevant:null,ariaRequired:ue,ariaRoleDescription:ne,ariaRowCount:w,ariaRowIndex:w,ariaRowSpan:w,ariaSelected:ue,ariaSetSize:w,ariaSort:null,ariaValueMax:w,ariaValueMin:w,ariaValueNow:w,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function zi(e,t){return t in e?e[t]:t}function ji(e,t){return zi(e,t.toLowerCase())}const Kl=Ot({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:dt,acceptCharset:ne,accessKey:ne,action:null,allow:null,allowFullScreen:B,allowPaymentRequest:B,allowUserMedia:B,alpha:B,alt:null,as:null,async:B,autoCapitalize:null,autoComplete:ne,autoFocus:B,autoPlay:B,blocking:ne,capture:null,charSet:null,checked:B,cite:null,className:ne,closedBy:null,colorSpace:null,cols:w,colSpan:w,command:null,commandFor:null,content:null,contentEditable:ue,controls:B,controlsList:ne,coords:w|dt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:B,defer:B,dir:null,dirName:null,disabled:B,download:Yn,draggable:ue,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:B,formTarget:null,headers:ne,height:w,hidden:Yn,high:w,href:null,hrefLang:null,htmlFor:ne,httpEquiv:ne,id:null,imageSizes:null,imageSrcSet:null,inert:B,inputMode:null,integrity:null,is:null,isMap:B,itemId:null,itemProp:ne,itemRef:ne,itemScope:B,itemType:ne,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:B,low:w,manifest:null,max:null,maxLength:w,media:null,method:null,min:null,minLength:w,multiple:B,muted:B,name:null,nonce:null,noModule:B,noValidate:B,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:B,optimum:w,pattern:null,ping:ne,placeholder:null,playsInline:B,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:B,referrerPolicy:null,rel:ne,required:B,reversed:B,rows:w,rowSpan:w,sandbox:ne,scope:null,scoped:B,seamless:B,selected:B,shadowRootClonable:B,shadowRootCustomElementRegistry:B,shadowRootDelegatesFocus:B,shadowRootMode:null,shadowRootSerializable:B,shape:null,size:w,sizes:null,slot:null,span:w,spellCheck:ue,src:null,srcDoc:null,srcLang:null,srcSet:null,start:w,step:null,style:null,tabIndex:w,target:null,title:null,translate:null,type:null,typeMustMatch:B,useMap:null,value:ue,width:w,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ne,axis:null,background:null,bgColor:null,border:w,borderColor:null,bottomMargin:w,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:B,declare:B,event:null,face:null,frame:null,frameBorder:null,hSpace:w,leftMargin:w,link:null,longDesc:null,lowSrc:null,marginHeight:w,marginWidth:w,noResize:B,noHref:B,noShade:B,noWrap:B,object:null,profile:null,prompt:null,rev:null,rightMargin:w,rules:null,scheme:null,scrolling:ue,standby:null,summary:null,text:null,topMargin:w,valueType:null,version:null,vAlign:null,vLink:null,vSpace:w,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:B,disablePictureInPicture:B,disableRemotePlayback:B,exportParts:dt,part:ne,prefix:null,property:null,results:w,security:null,unselectable:null},space:"html",transform:ji}),Ql=Ot({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ne,accentHeight:w,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:w,amplitude:w,arabicForm:null,ascent:w,attributeName:null,attributeType:null,azimuth:w,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:w,by:null,calcMode:null,capHeight:w,className:ne,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:w,diffuseConstant:w,direction:null,display:null,dur:null,divisor:w,dominantBaseline:null,download:B,dx:null,dy:null,edgeMode:null,editable:null,elevation:w,enableBackground:null,end:null,event:null,exponent:w,externalResourcesRequired:null,fill:null,fillOpacity:w,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:dt,g2:dt,glyphName:dt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:w,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:w,horizOriginX:w,horizOriginY:w,id:null,ideographic:w,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:w,k:w,k1:w,k2:w,k3:w,k4:w,kernelMatrix:Ne,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:w,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:w,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:w,overlineThickness:w,paintOrder:null,panose1:null,path:null,pathLength:w,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ne,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:w,pointsAtY:w,pointsAtZ:w,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ne,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ne,rev:Ne,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ne,requiredFeatures:Ne,requiredFonts:Ne,requiredFormats:Ne,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:w,specularExponent:w,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:w,strikethroughThickness:w,string:null,stroke:null,strokeDashArray:Ne,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:w,strokeOpacity:w,strokeWidth:null,style:null,surfaceScale:w,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ne,tabIndex:w,tableValues:null,target:null,targetX:w,targetY:w,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ne,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:w,underlineThickness:w,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:w,values:null,vAlphabetic:w,vMathematical:w,vectorEffect:null,vHanging:w,vIdeographic:w,version:null,vertAdvY:w,vertOriginX:w,vertOriginY:w,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:w,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:zi}),Bi=Ot({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Ui=Ot({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ji}),Hi=Ot({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Jl={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"},Zl=/[A-Z]/g,Fr=/-[a-z]/g,eo=/^data[-\w.:]+$/i;function to(e,t){const n=Gn(t);let r=t,i=_e;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&eo.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Fr,ro);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Fr.test(l)){let o=l.replace(Zl,no);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=lr}return new i(r,t)}function no(e){return"-"+e.toLowerCase()}function ro(e){return e.charAt(1).toUpperCase()}const io=Mi([Fi,Kl,Bi,Ui,Hi],"html"),or=Mi([Fi,Ql,Bi,Ui,Hi],"svg");function lo(e){return e.join(" ").trim()}function Vi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Tt={},Nn,zr;function oo(){if(zr)return Nn;zr=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,a=/^\s+|\s+$/g,u=`
2
+ `,s="/",c="*",f="",m="comment",h="declaration";function T(I,b){if(typeof I!="string")throw new TypeError("First argument must be a string");if(!I)return[];b=b||{};var R=1,O=1;function U(v){var N=v.match(t);N&&(R+=N.length);var Q=v.lastIndexOf(u);O=~Q?v.length-Q:O+v.length}function W(){var v={line:R,column:O};return function(N){return N.position=new k(v),K(),N}}function k(v){this.start=v,this.end={line:R,column:O},this.source=b.source}k.prototype.content=I;function H(v){var N=new Error(b.source+":"+R+":"+O+": "+v);if(N.reason=v,N.filename=b.source,N.line=R,N.column=O,N.source=I,!b.silent)throw N}function Z(v){var N=v.exec(I);if(N){var Q=N[0];return U(Q),I=I.slice(Q.length),N}}function K(){Z(n)}function $(v){var N;for(v=v||[];N=L();)N!==!1&&v.push(N);return v}function L(){var v=W();if(!(s!=I.charAt(0)||c!=I.charAt(1))){for(var N=2;f!=I.charAt(N)&&(c!=I.charAt(N)||s!=I.charAt(N+1));)++N;if(N+=2,f===I.charAt(N-1))return H("End of comment missing");var Q=I.slice(2,N-2);return O+=2,U(Q),I=I.slice(N),O+=2,v({type:m,comment:Q})}}function P(){var v=W(),N=Z(r);if(N){if(L(),!Z(i))return H("property missing ':'");var Q=Z(l),ae=v({type:h,property:E(N[0].replace(e,f)),value:Q?E(Q[0].replace(e,f)):f});return Z(o),ae}}function ee(){var v=[];$(v);for(var N;N=P();)N!==!1&&(v.push(N),$(v));return v}return K(),ee()}function E(I){return I?I.replace(a,f):f}return Nn=T,Nn}var jr;function ao(){if(jr)return Tt;jr=1;var e=Tt&&Tt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.default=n;const t=e(oo());function n(r,i){let l=null;if(!r||typeof r!="string")return l;const o=(0,t.default)(r),a=typeof i=="function";return o.forEach(u=>{if(u.type!=="declaration")return;const{property:s,value:c}=u;a?i(s,c,u):c&&(l=l||{},l[s]=c)}),l}return Tt}var vt={},Br;function so(){if(Br)return vt;Br=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,l=function(s){return!s||n.test(s)||e.test(s)},o=function(s,c){return c.toUpperCase()},a=function(s,c){return"".concat(c,"-")},u=function(s,c){return c===void 0&&(c={}),l(s)?s:(s=s.toLowerCase(),c.reactCompat?s=s.replace(i,a):s=s.replace(r,a),s.replace(t,o))};return vt.camelCase=u,vt}var Mt,Ur;function uo(){if(Ur)return Mt;Ur=1;var e=Mt&&Mt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(ao()),n=so();function r(i,l){var o={};return!i||typeof i!="string"||(0,t.default)(i,function(a,u){a&&u&&(o[(0,n.camelCase)(a,l)]=u)}),o}return r.default=r,Mt=r,Mt}var co=uo();const fo=Vi(co),qi=Wi("end"),ar=Wi("start");function Wi(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function po(e){const t=ar(e),n=qi(e);if(t&&n)return{start:t,end:n}}function Ht(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Hr(e.position):"start"in e||"end"in e?Hr(e):"line"in e||"column"in e?Kn(e):""}function Kn(e){return Vr(e&&e.line)+":"+Vr(e&&e.column)}function Hr(e){return Kn(e&&e.start)+"-"+Kn(e&&e.end)}function Vr(e){return e&&typeof e=="number"?e:1}class ke extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",l={},o=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?i=t:!l.cause&&t&&(o=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?l.ruleId=r:(l.source=r.slice(0,u),l.ruleId=r.slice(u+1))}if(!l.place&&l.ancestors&&l.ancestors){const u=l.ancestors[l.ancestors.length-1];u&&(l.place=u.position)}const a=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=Ht(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ke.prototype.file="";ke.prototype.name="";ke.prototype.reason="";ke.prototype.message="";ke.prototype.stack="";ke.prototype.column=void 0;ke.prototype.line=void 0;ke.prototype.ancestors=void 0;ke.prototype.cause=void 0;ke.prototype.fatal=void 0;ke.prototype.place=void 0;ke.prototype.ruleId=void 0;ke.prototype.source=void 0;const sr={}.hasOwnProperty,ho=new Map,mo=/[A-Z]/g,go=new Set(["table","tbody","thead","tfoot","tr"]),yo=new Set(["td","th"]),$i="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function xo(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=_o(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Ao(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?or:io,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=Gi(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function Gi(e,t,n){if(t.type==="element")return bo(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return ko(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return So(e,t,n);if(t.type==="mdxjsEsm")return To(e,t);if(t.type==="root")return wo(e,t,n);if(t.type==="text")return Eo(e,t)}function bo(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=or,e.schema=i),e.ancestors.push(t);const l=Xi(e,t.tagName,!1),o=Co(e,t);let a=cr(e,t);return go.has(t.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!Yl(u):!0})),Yi(e,o,l,t),ur(o,a),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function ko(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Wt(e,t.position)}function To(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Wt(e,t.position)}function So(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=or,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:Xi(e,t.name,!0),o=Io(e,t),a=cr(e,t);return Yi(e,o,l,t),ur(o,a),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function wo(e,t,n){const r={};return ur(r,cr(e,t)),e.create(t,e.Fragment,r,n)}function Eo(e,t){return t.value}function Yi(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ur(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Ao(e,t,n){return r;function r(i,l,o,a){const s=Array.isArray(o.children)?n:t;return a?s(l,o,a):s(l,o)}}function _o(e,t){return n;function n(r,i,l,o){const a=Array.isArray(l.children),u=ar(r);return t(i,l,o,a,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Co(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&sr.call(t.properties,i)){const l=Oo(e,i,t.properties[i]);if(l){const[o,a]=l;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&yo.has(t.tagName)?r=a:n[o]=a}}if(r){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Io(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const a=o.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Wt(e,t.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,l=e.evaluater.evaluateExpression(a.expression)}else Wt(e,t.position);else l=r.value===null?!0:r.value;n[i]=l}return n}function cr(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:ho;for(;++r<t.children.length;){const l=t.children[r];let o;if(e.passKeys){const u=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(u){const s=i.get(u)||0;o=u+"-"+s,i.set(u,s+1)}}const a=Gi(e,l,o);a!==void 0&&n.push(a)}return n}function Oo(e,t,n){const r=to(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Vl(n):lo(n)),r.property==="style"){let i=typeof n=="object"?n:No(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Do(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Jl[r.property]||r.property:r.attribute,n]}}function No(e,t){try{return fo(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ke("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=$i+"#cannot-parse-style-attribute",i}}function Xi(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let l=-1,o;for(;++l<i.length;){const a=Lr(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};o=o?{type:"MemberExpression",object:o,property:a,computed:!!(l&&a.type==="Literal"),optional:!1}:a}r=o}else r=Lr(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return sr.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Wt(e)}function Wt(e,t){const n=new ke("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=$i+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Do(e){const t={};let n;for(n in e)sr.call(e,n)&&(t[Ro(n)]=e[n]);return t}function Ro(e){let t=e.replace(mo,Po);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Po(e){return"-"+e.toLowerCase()}const Dn={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"]},Lo={};function vo(e,t){const n=Lo,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ki(e,r,i)}function Ki(e,t,n){if(Mo(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return qr(e.children,t,n)}return Array.isArray(e)?qr(e,t,n):""}function qr(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ki(e[i],t,n);return r.join("")}function Mo(e){return!!(e&&typeof e=="object")}const Wr=document.createElement("i");function fr(e){const t="&"+e+";";Wr.innerHTML=t;const n=Wr.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ke(e,t,n,r){const i=e.length;let l=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);l<r.length;)o=r.slice(l,l+1e4),o.unshift(t,0),e.splice(...o),l+=1e4,t+=1e4}function Le(e,t){return e.length>0?(Ke(e,e.length,0,t),e):t}const $r={}.hasOwnProperty;function Fo(e){const t={};let n=-1;for(;++n<e.length;)zo(t,e[n]);return t}function zo(e,t){let n;for(n in t){const i=($r.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let o;if(l)for(o in l){$r.call(i,o)||(i[o]=[]);const a=l[o];jo(i[o],Array.isArray(a)?a:a?[a]:[])}}}function jo(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ke(e,0,0,r)}function Qi(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function _t(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Xe=ct(/[A-Za-z]/),De=ct(/[\dA-Za-z]/),Bo=ct(/[#-'*+\--9=?A-Z^-~]/);function Qn(e){return e!==null&&(e<32||e===127)}const Jn=ct(/\d/),Uo=ct(/[\dA-Fa-f]/),Ho=ct(/[!-/:-@[-`{-~]/);function z(e){return e!==null&&e<-2}function Ae(e){return e!==null&&(e<0||e===32)}function J(e){return e===-2||e===-1||e===32}const Vo=ct(new RegExp("\\p{P}|\\p{S}","u")),qo=ct(/\s/);function ct(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Nt(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const l=e.charCodeAt(n);let o="";if(l===37&&De(e.charCodeAt(n+1))&&De(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){const a=e.charCodeAt(n+1);l<56320&&a>56319&&a<57344?(o=String.fromCharCode(l,a),i=1):o="�"}else o=String.fromCharCode(l);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function re(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(u){return J(u)?(e.enter(n),a(u)):t(u)}function a(u){return J(u)&&l++<i?(e.consume(u),a):(e.exit(n),t(u))}}const Wo={tokenize:$o};function $o(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),re(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),l(a)}function l(a){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,o(a)}function o(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return z(a)?(e.consume(a),e.exit("chunkText"),l):(e.consume(a),o)}}const Go={tokenize:Yo},Gr={tokenize:Xo};function Yo(e){const t=this,n=[];let r=0,i,l,o;return a;function a(O){if(r<n.length){const U=n[r];return t.containerState=U[1],e.attempt(U[0].continuation,u,s)(O)}return s(O)}function u(O){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&R();const U=t.events.length;let W=U,k;for(;W--;)if(t.events[W][0]==="exit"&&t.events[W][1].type==="chunkFlow"){k=t.events[W][1].end;break}b(r);let H=U;for(;H<t.events.length;)t.events[H][1].end={...k},H++;return Ke(t.events,W+1,0,t.events.slice(U)),t.events.length=H,s(O)}return a(O)}function s(O){if(r===n.length){if(!i)return m(O);if(i.currentConstruct&&i.currentConstruct.concrete)return T(O);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Gr,c,f)(O)}function c(O){return i&&R(),b(r),m(O)}function f(O){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,T(O)}function m(O){return t.containerState={},e.attempt(Gr,h,T)(O)}function h(O){return r++,n.push([t.currentConstruct,t.containerState]),m(O)}function T(O){if(O===null){i&&R(),b(0),e.consume(O);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),E(O)}function E(O){if(O===null){I(e.exit("chunkFlow"),!0),b(0),e.consume(O);return}return z(O)?(e.consume(O),I(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(O),E)}function I(O,U){const W=t.sliceStream(O);if(U&&W.push(null),O.previous=l,l&&(l.next=O),l=O,i.defineSkip(O.start),i.write(W),t.parser.lazy[O.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<o&&(!i.events[k][1].end||i.events[k][1].end.offset>o))return;const H=t.events.length;let Z=H,K,$;for(;Z--;)if(t.events[Z][0]==="exit"&&t.events[Z][1].type==="chunkFlow"){if(K){$=t.events[Z][1].end;break}K=!0}for(b(r),k=H;k<t.events.length;)t.events[k][1].end={...$},k++;Ke(t.events,Z+1,0,t.events.slice(H)),t.events.length=k}}function b(O){let U=n.length;for(;U-- >O;){const W=n[U];t.containerState=W[1],W[0].exit.call(t,e)}n.length=O}function R(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Xo(e,t,n){return re(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Yr(e){if(e===null||Ae(e)||qo(e))return 1;if(Vo(e))return 2}function pr(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(t=l(t,n),r.push(l))}return t}const Zn={name:"attention",resolveAll:Ko,tokenize:Qo};function Ko(e,t){let n=-1,r,i,l,o,a,u,s,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},m={...e[n][1].start};Xr(f,-u),Xr(m,u),o={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:m},l={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[n][1].start={...a.end},s=[],e[r][1].end.offset-e[r][1].start.offset&&(s=Le(s,[["enter",e[r][1],t],["exit",e[r][1],t]])),s=Le(s,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",l,t]]),s=Le(s,pr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),s=Le(s,[["exit",l,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,s=Le(s,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Ke(e,r-1,n-r+3,s),n=r+s.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Qo(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Yr(r);let l;return o;function o(u){return l=u,e.enter("attentionSequence"),a(u)}function a(u){if(u===l)return e.consume(u),a;const s=e.exit("attentionSequence"),c=Yr(u),f=!c||c===2&&i||n.includes(u),m=!i||i===2&&c||n.includes(r);return s._open=!!(l===42?f:f&&(i||!m)),s._close=!!(l===42?m:m&&(c||!f)),t(u)}}function Xr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Jo={name:"autolink",tokenize:Zo};function Zo(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(h){return Xe(h)?(e.consume(h),o):h===64?n(h):s(h)}function o(h){return h===43||h===45||h===46||De(h)?(r=1,a(h)):s(h)}function a(h){return h===58?(e.consume(h),r=0,u):(h===43||h===45||h===46||De(h))&&r++<32?(e.consume(h),a):(r=0,s(h))}function u(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||Qn(h)?n(h):(e.consume(h),u)}function s(h){return h===64?(e.consume(h),c):Bo(h)?(e.consume(h),s):n(h)}function c(h){return De(h)?f(h):n(h)}function f(h){return h===46?(e.consume(h),r=0,c):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):m(h)}function m(h){if((h===45||De(h))&&r++<63){const T=h===45?m:f;return e.consume(h),T}return n(h)}}const dn={partial:!0,tokenize:ea};function ea(e,t,n){return r;function r(l){return J(l)?re(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||z(l)?t(l):n(l)}}const Ji={continuation:{tokenize:na},exit:ra,name:"blockQuote",tokenize:ta};function ta(e,t,n){const r=this;return i;function i(o){if(o===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),l}return n(o)}function l(o){return J(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function na(e,t,n){const r=this;return i;function i(o){return J(o)?re(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return e.attempt(Ji,t,n)(o)}}function ra(e){e.exit("blockQuote")}const Zi={name:"characterEscape",tokenize:ia};function ia(e,t,n){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return Ho(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const el={name:"characterReference",tokenize:la};function la(e,t,n){const r=this;let i=0,l,o;return a;function a(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),l=31,o=De,c(f))}function s(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=Uo,c):(e.enter("characterReferenceValue"),l=7,o=Jn,c(f))}function c(f){if(f===59&&i){const m=e.exit("characterReferenceValue");return o===De&&!fr(r.sliceSerialize(m))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(f)&&i++<l?(e.consume(f),c):n(f)}}const Kr={partial:!0,tokenize:aa},Qr={concrete:!0,name:"codeFenced",tokenize:oa};function oa(e,t,n){const r=this,i={partial:!0,tokenize:W};let l=0,o=0,a;return u;function u(k){return s(k)}function s(k){const H=r.events[r.events.length-1];return l=H&&H[1].type==="linePrefix"?H[2].sliceSerialize(H[1],!0).length:0,a=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(k)}function c(k){return k===a?(o++,e.consume(k),c):o<3?n(k):(e.exit("codeFencedFenceSequence"),J(k)?re(e,f,"whitespace")(k):f(k))}function f(k){return k===null||z(k)?(e.exit("codeFencedFence"),r.interrupt?t(k):e.check(Kr,E,U)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(k))}function m(k){return k===null||z(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(k)):J(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),re(e,h,"whitespace")(k)):k===96&&k===a?n(k):(e.consume(k),m)}function h(k){return k===null||z(k)?f(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),T(k))}function T(k){return k===null||z(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(k)):k===96&&k===a?n(k):(e.consume(k),T)}function E(k){return e.attempt(i,U,I)(k)}function I(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),b}function b(k){return l>0&&J(k)?re(e,R,"linePrefix",l+1)(k):R(k)}function R(k){return k===null||z(k)?e.check(Kr,E,U)(k):(e.enter("codeFlowValue"),O(k))}function O(k){return k===null||z(k)?(e.exit("codeFlowValue"),R(k)):(e.consume(k),O)}function U(k){return e.exit("codeFenced"),t(k)}function W(k,H,Z){let K=0;return $;function $(N){return k.enter("lineEnding"),k.consume(N),k.exit("lineEnding"),L}function L(N){return k.enter("codeFencedFence"),J(N)?re(k,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):P(N)}function P(N){return N===a?(k.enter("codeFencedFenceSequence"),ee(N)):Z(N)}function ee(N){return N===a?(K++,k.consume(N),ee):K>=o?(k.exit("codeFencedFenceSequence"),J(N)?re(k,v,"whitespace")(N):v(N)):Z(N)}function v(N){return N===null||z(N)?(k.exit("codeFencedFence"),H(N)):Z(N)}}}function aa(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const Rn={name:"codeIndented",tokenize:ua},sa={partial:!0,tokenize:ca};function ua(e,t,n){const r=this;return i;function i(s){return e.enter("codeIndented"),re(e,l,"linePrefix",5)(s)}function l(s){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(s):n(s)}function o(s){return s===null?u(s):z(s)?e.attempt(sa,o,u)(s):(e.enter("codeFlowValue"),a(s))}function a(s){return s===null||z(s)?(e.exit("codeFlowValue"),o(s)):(e.consume(s),a)}function u(s){return e.exit("codeIndented"),t(s)}}function ca(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):z(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):re(e,l,"linePrefix",5)(o)}function l(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):z(o)?i(o):n(o)}}const fa={name:"codeText",previous:ha,resolve:pa,tokenize:ma};function pa(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function ha(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ma(e,t,n){let r=0,i,l;return o;function o(f){return e.enter("codeText"),e.enter("codeTextSequence"),a(f)}function a(f){return f===96?(e.consume(f),r++,a):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(l=e.enter("codeTextSequence"),i=0,c(f)):z(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),s(f))}function s(f){return f===null||f===32||f===96||z(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),s)}function c(f){return f===96?(e.consume(f),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(l.type="codeTextData",s(f))}}class da{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ft(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ft(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ft(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ft(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ft(this.left,n.reverse())}}}function Ft(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 tl(e){const t={};let n=-1,r,i,l,o,a,u,s;const c=new da(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,l=0,l<u.length&&u[l][1].type==="lineEndingBlank"&&(l+=2),l<u.length&&u[l][1].type==="content"))for(;++l<u.length&&u[l][1].type!=="content";)u[l][1].type==="chunkText"&&(u[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,ga(c,n)),n=t[n],s=!0);else if(r[1]._container){for(l=n,i=void 0;l--;)if(o=c.get(l),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=l);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},a=c.slice(i,n),a.unshift(r),c.splice(i,n-i+1,a))}}return Ke(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!s}function ga(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const l=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const a=o.events,u=[],s={};let c,f,m=-1,h=n,T=0,E=0;const I=[E];for(;h;){for(;e.get(++i)[1]!==h;);l.push(i),h._tokenizer||(c=r.sliceStream(h),h.next||c.push(null),f&&o.defineSkip(h.start),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=n;++m<a.length;)a[m][0]==="exit"&&a[m-1][0]==="enter"&&a[m][1].type===a[m-1][1].type&&a[m][1].start.line!==a[m][1].end.line&&(E=m+1,I.push(E),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(o.events=[],h?(h._tokenizer=void 0,h.previous=void 0):I.pop(),m=I.length;m--;){const b=a.slice(I[m],I[m+1]),R=l.pop();u.push([R,R+b.length-1]),e.splice(R,2,b)}for(u.reverse(),m=-1;++m<u.length;)s[T+u[m][0]]=T+u[m][1],T+=u[m][1]-u[m][0]-1;return s}const ya={resolve:ba,tokenize:ka},xa={partial:!0,tokenize:Ta};function ba(e){return tl(e),e}function ka(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?l(a):z(a)?e.check(xa,o,l)(a):(e.consume(a),i)}function l(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function o(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Ta(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),re(e,l,"linePrefix")}function l(o){if(o===null||z(o))return n(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function nl(e,t,n,r,i,l,o,a,u){const s=u||Number.POSITIVE_INFINITY;let c=0;return f;function f(b){return b===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(b),e.exit(l),m):b===null||b===32||b===41||Qn(b)?n(b):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),E(b))}function m(b){return b===62?(e.enter(l),e.consume(b),e.exit(l),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(b))}function h(b){return b===62?(e.exit("chunkString"),e.exit(a),m(b)):b===null||b===60||z(b)?n(b):(e.consume(b),b===92?T:h)}function T(b){return b===60||b===62||b===92?(e.consume(b),h):h(b)}function E(b){return!c&&(b===null||b===41||Ae(b))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),t(b)):c<s&&b===40?(e.consume(b),c++,E):b===41?(e.consume(b),c--,E):b===null||b===32||b===40||Qn(b)?n(b):(e.consume(b),b===92?I:E)}function I(b){return b===40||b===41||b===92?(e.consume(b),E):E(b)}}function rl(e,t,n,r,i,l){const o=this;let a=0,u;return s;function s(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(l),c}function c(h){return a>999||h===null||h===91||h===93&&!u||h===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?n(h):h===93?(e.exit(l),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):z(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||z(h)||a++>999?(e.exit("chunkString"),c(h)):(e.consume(h),u||(u=!J(h)),h===92?m:f)}function m(h){return h===91||h===92||h===93?(e.consume(h),a++,f):f(h)}}function il(e,t,n,r,i,l){let o;return a;function a(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),o=m===40?41:m,u):n(m)}function u(m){return m===o?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(l),s(m))}function s(m){return m===o?(e.exit(l),u(o)):m===null?n(m):z(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),re(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(m))}function c(m){return m===o||m===null||z(m)?(e.exit("chunkString"),s(m)):(e.consume(m),m===92?f:c)}function f(m){return m===o||m===92?(e.consume(m),c):c(m)}}function Vt(e,t){let n;return r;function r(i){return z(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):J(i)?re(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Sa={name:"definition",tokenize:Ea},wa={partial:!0,tokenize:Aa};function Ea(e,t,n){const r=this;let i;return l;function l(h){return e.enter("definition"),o(h)}function o(h){return rl.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=_t(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):n(h)}function u(h){return Ae(h)?Vt(e,s)(h):s(h)}function s(h){return nl(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(wa,f,f)(h)}function f(h){return J(h)?re(e,m,"whitespace")(h):m(h)}function m(h){return h===null||z(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function Aa(e,t,n){return r;function r(a){return Ae(a)?Vt(e,i)(a):n(a)}function i(a){return il(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function l(a){return J(a)?re(e,o,"whitespace")(a):o(a)}function o(a){return a===null||z(a)?t(a):n(a)}}const _a={name:"hardBreakEscape",tokenize:Ca};function Ca(e,t,n){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return z(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const Ia={name:"headingAtx",resolve:Oa,tokenize:Na};function Oa(e,t){let n=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},l={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Ke(e,r,n-r+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])),e}function Na(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),l(c)}function l(c){return e.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&r++<6?(e.consume(c),o):c===null||Ae(c)?(e.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||z(c)?(e.exit("atxHeading"),t(c)):J(c)?re(e,a,"whitespace")(c):(e.enter("atxHeadingText"),s(c))}function u(c){return c===35?(e.consume(c),u):(e.exit("atxHeadingSequence"),a(c))}function s(c){return c===null||c===35||Ae(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),s)}}const Da=["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"],Jr=["pre","script","style","textarea"],Ra={concrete:!0,name:"htmlFlow",resolveTo:va,tokenize:Ma},Pa={partial:!0,tokenize:za},La={partial:!0,tokenize:Fa};function va(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Ma(e,t,n){const r=this;let i,l,o,a,u;return s;function s(g){return c(g)}function c(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),f}function f(g){return g===33?(e.consume(g),m):g===47?(e.consume(g),l=!0,E):g===63?(e.consume(g),i=3,r.interrupt?t:d):Xe(g)?(e.consume(g),o=String.fromCharCode(g),I):n(g)}function m(g){return g===45?(e.consume(g),i=2,h):g===91?(e.consume(g),i=5,a=0,T):Xe(g)?(e.consume(g),i=4,r.interrupt?t:d):n(g)}function h(g){return g===45?(e.consume(g),r.interrupt?t:d):n(g)}function T(g){const Ie="CDATA[";return g===Ie.charCodeAt(a++)?(e.consume(g),a===Ie.length?r.interrupt?t:P:T):n(g)}function E(g){return Xe(g)?(e.consume(g),o=String.fromCharCode(g),I):n(g)}function I(g){if(g===null||g===47||g===62||Ae(g)){const Ie=g===47,Qe=o.toLowerCase();return!Ie&&!l&&Jr.includes(Qe)?(i=1,r.interrupt?t(g):P(g)):Da.includes(o.toLowerCase())?(i=6,Ie?(e.consume(g),b):r.interrupt?t(g):P(g)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(g):l?R(g):O(g))}return g===45||De(g)?(e.consume(g),o+=String.fromCharCode(g),I):n(g)}function b(g){return g===62?(e.consume(g),r.interrupt?t:P):n(g)}function R(g){return J(g)?(e.consume(g),R):$(g)}function O(g){return g===47?(e.consume(g),$):g===58||g===95||Xe(g)?(e.consume(g),U):J(g)?(e.consume(g),O):$(g)}function U(g){return g===45||g===46||g===58||g===95||De(g)?(e.consume(g),U):W(g)}function W(g){return g===61?(e.consume(g),k):J(g)?(e.consume(g),W):O(g)}function k(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),u=g,H):J(g)?(e.consume(g),k):Z(g)}function H(g){return g===u?(e.consume(g),u=null,K):g===null||z(g)?n(g):(e.consume(g),H)}function Z(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||Ae(g)?W(g):(e.consume(g),Z)}function K(g){return g===47||g===62||J(g)?O(g):n(g)}function $(g){return g===62?(e.consume(g),L):n(g)}function L(g){return g===null||z(g)?P(g):J(g)?(e.consume(g),L):n(g)}function P(g){return g===45&&i===2?(e.consume(g),Q):g===60&&i===1?(e.consume(g),ae):g===62&&i===4?(e.consume(g),G):g===63&&i===3?(e.consume(g),d):g===93&&i===5?(e.consume(g),ve):z(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Pa,Me,ee)(g)):g===null||z(g)?(e.exit("htmlFlowData"),ee(g)):(e.consume(g),P)}function ee(g){return e.check(La,v,Me)(g)}function v(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),N}function N(g){return g===null||z(g)?ee(g):(e.enter("htmlFlowData"),P(g))}function Q(g){return g===45?(e.consume(g),d):P(g)}function ae(g){return g===47?(e.consume(g),o="",Ce):P(g)}function Ce(g){if(g===62){const Ie=o.toLowerCase();return Jr.includes(Ie)?(e.consume(g),G):P(g)}return Xe(g)&&o.length<8?(e.consume(g),o+=String.fromCharCode(g),Ce):P(g)}function ve(g){return g===93?(e.consume(g),d):P(g)}function d(g){return g===62?(e.consume(g),G):g===45&&i===2?(e.consume(g),d):P(g)}function G(g){return g===null||z(g)?(e.exit("htmlFlowData"),Me(g)):(e.consume(g),G)}function Me(g){return e.exit("htmlFlow"),t(g)}}function Fa(e,t,n){const r=this;return i;function i(o){return z(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):n(o)}function l(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function za(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(dn,t,n)}}const ja={name:"htmlText",tokenize:Ba};function Ba(e,t,n){const r=this;let i,l,o;return a;function a(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),u}function u(d){return d===33?(e.consume(d),s):d===47?(e.consume(d),W):d===63?(e.consume(d),O):Xe(d)?(e.consume(d),Z):n(d)}function s(d){return d===45?(e.consume(d),c):d===91?(e.consume(d),l=0,T):Xe(d)?(e.consume(d),R):n(d)}function c(d){return d===45?(e.consume(d),h):n(d)}function f(d){return d===null?n(d):d===45?(e.consume(d),m):z(d)?(o=f,ae(d)):(e.consume(d),f)}function m(d){return d===45?(e.consume(d),h):f(d)}function h(d){return d===62?Q(d):d===45?m(d):f(d)}function T(d){const G="CDATA[";return d===G.charCodeAt(l++)?(e.consume(d),l===G.length?E:T):n(d)}function E(d){return d===null?n(d):d===93?(e.consume(d),I):z(d)?(o=E,ae(d)):(e.consume(d),E)}function I(d){return d===93?(e.consume(d),b):E(d)}function b(d){return d===62?Q(d):d===93?(e.consume(d),b):E(d)}function R(d){return d===null||d===62?Q(d):z(d)?(o=R,ae(d)):(e.consume(d),R)}function O(d){return d===null?n(d):d===63?(e.consume(d),U):z(d)?(o=O,ae(d)):(e.consume(d),O)}function U(d){return d===62?Q(d):O(d)}function W(d){return Xe(d)?(e.consume(d),k):n(d)}function k(d){return d===45||De(d)?(e.consume(d),k):H(d)}function H(d){return z(d)?(o=H,ae(d)):J(d)?(e.consume(d),H):Q(d)}function Z(d){return d===45||De(d)?(e.consume(d),Z):d===47||d===62||Ae(d)?K(d):n(d)}function K(d){return d===47?(e.consume(d),Q):d===58||d===95||Xe(d)?(e.consume(d),$):z(d)?(o=K,ae(d)):J(d)?(e.consume(d),K):Q(d)}function $(d){return d===45||d===46||d===58||d===95||De(d)?(e.consume(d),$):L(d)}function L(d){return d===61?(e.consume(d),P):z(d)?(o=L,ae(d)):J(d)?(e.consume(d),L):K(d)}function P(d){return d===null||d===60||d===61||d===62||d===96?n(d):d===34||d===39?(e.consume(d),i=d,ee):z(d)?(o=P,ae(d)):J(d)?(e.consume(d),P):(e.consume(d),v)}function ee(d){return d===i?(e.consume(d),i=void 0,N):d===null?n(d):z(d)?(o=ee,ae(d)):(e.consume(d),ee)}function v(d){return d===null||d===34||d===39||d===60||d===61||d===96?n(d):d===47||d===62||Ae(d)?K(d):(e.consume(d),v)}function N(d){return d===47||d===62||Ae(d)?K(d):n(d)}function Q(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),t):n(d)}function ae(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Ce}function Ce(d){return J(d)?re(e,ve,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):ve(d)}function ve(d){return e.enter("htmlTextData"),o(d)}}const hr={name:"labelEnd",resolveAll:qa,resolveTo:Wa,tokenize:$a},Ua={tokenize:Ga},Ha={tokenize:Ya},Va={tokenize:Xa};function qa(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Ke(e,0,e.length,n),e}function Wa(e,t){let n=e.length,r=0,i,l,o,a;for(;n--;)if(i=e[n][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const u={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},s={type:"label",start:{...e[l][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",u,t],["enter",s,t]],a=Le(a,e.slice(l+1,l+r+3)),a=Le(a,[["enter",c,t]]),a=Le(a,pr(t.parser.constructs.insideSpan.null,e.slice(l+r+4,o-3),t)),a=Le(a,[["exit",c,t],e[o-2],e[o-1],["exit",s,t]]),a=Le(a,e.slice(o+1)),a=Le(a,[["exit",u,t]]),Ke(e,l,e.length,a),e}function $a(e,t,n){const r=this;let i=r.events.length,l,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return a;function a(m){return l?l._inactive?f(m):(o=r.parser.defined.includes(_t(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),u):n(m)}function u(m){return m===40?e.attempt(Ua,c,o?c:f)(m):m===91?e.attempt(Ha,c,o?s:f)(m):o?c(m):f(m)}function s(m){return e.attempt(Va,c,f)(m)}function c(m){return t(m)}function f(m){return l._balanced=!0,n(m)}}function Ga(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return Ae(f)?Vt(e,l)(f):l(f)}function l(f){return f===41?c(f):nl(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return Ae(f)?Vt(e,u)(f):c(f)}function a(f){return n(f)}function u(f){return f===34||f===39||f===40?il(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function s(f){return Ae(f)?Vt(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function Ya(e,t,n){const r=this;return i;function i(a){return rl.call(r,e,l,o,"reference","referenceMarker","referenceString")(a)}function l(a){return r.parser.defined.includes(_t(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function o(a){return n(a)}}function Xa(e,t,n){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const Ka={name:"labelStartImage",resolveAll:hr.resolveAll,tokenize:Qa};function Qa(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),l}function l(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),o):n(a)}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Ja={name:"labelStartLink",resolveAll:hr.resolveAll,tokenize:Za};function Za(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),l}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Pn={name:"lineEnding",tokenize:es};function es(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),re(e,t,"linePrefix")}}const cn={name:"thematicBreak",tokenize:ts};function ts(e,t,n){let r=0,i;return l;function l(s){return e.enter("thematicBreak"),o(s)}function o(s){return i=s,a(s)}function a(s){return s===i?(e.enter("thematicBreakSequence"),u(s)):r>=3&&(s===null||z(s))?(e.exit("thematicBreak"),t(s)):n(s)}function u(s){return s===i?(e.consume(s),r++,u):(e.exit("thematicBreakSequence"),J(s)?re(e,a,"whitespace")(s):a(s))}}const Ee={continuation:{tokenize:ls},exit:as,name:"list",tokenize:is},ns={partial:!0,tokenize:ss},rs={partial:!0,tokenize:os};function is(e,t,n){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(h){const T=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(T==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Jn(h)){if(r.containerState.type||(r.containerState.type=T,e.enter(T,{_container:!0})),T==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(cn,n,s)(h):s(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return n(h)}function u(h){return Jn(h)&&++o<10?(e.consume(h),u):(!r.interrupt||o<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),s(h)):n(h)}function s(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(dn,r.interrupt?n:c,e.attempt(ns,m,f))}function c(h){return r.containerState.initialBlankLine=!0,l++,m(h)}function f(h){return J(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),m):n(h)}function m(h){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function ls(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(dn,i,l);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,re(e,t,"listItemIndent",r.containerState.size+1)(a)}function l(a){return r.containerState.furtherBlankLines||!J(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(rs,t,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,re(e,e.attempt(Ee,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function os(e,t,n){const r=this;return re(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(l):n(l)}}function as(e){e.exit(this.containerState.type)}function ss(e,t,n){const r=this;return re(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!J(l)&&o&&o[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const Zr={name:"setextUnderline",resolveTo:us,tokenize:cs};function us(e,t){let n=e.length,r,i,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,t]),e.splice(l+1,0,["exit",e[r][1],t]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function cs(e,t,n){const r=this;let i;return l;function l(s){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=s,o(s)):n(s)}function o(s){return e.enter("setextHeadingLineSequence"),a(s)}function a(s){return s===i?(e.consume(s),a):(e.exit("setextHeadingLineSequence"),J(s)?re(e,u,"lineSuffix")(s):u(s))}function u(s){return s===null||z(s)?(e.exit("setextHeadingLine"),t(s)):n(s)}}const fs={tokenize:ps};function ps(e){const t=this,n=e.attempt(dn,r,e.attempt(this.parser.constructs.flowInitial,i,re(e,e.attempt(this.parser.constructs.flow,i,e.attempt(ya,i)),"linePrefix")));return n;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const hs={resolveAll:ol()},ms=ll("string"),ds=ll("text");function ll(e){return{resolveAll:ol(e==="text"?gs:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],l=n.attempt(i,o,a);return o;function o(c){return s(c)?l(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),u}function u(c){return s(c)?(n.exit("data"),l(c)):(n.consume(c),u)}function s(c){if(c===null)return!0;const f=i[c];let m=-1;if(f)for(;++m<f.length;){const h=f[m];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function ol(e){return t;function t(n,r){let i=-1,l;for(;++i<=n.length;)l===void 0?n[i]&&n[i][1].type==="data"&&(l=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==l+2&&(n[l][1].end=n[i-1][1].end,n.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(n,r):n}}function gs(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let l=i.length,o=-1,a=0,u;for(;l--;){const s=i[l];if(typeof s=="string"){for(o=s.length;s.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(s===-2)u=!0,a++;else if(s!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const s={type:n===e.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?o:r.start._bufferIndex+o,_index:r.start._index+l,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...s.start},r.start.offset===r.end.offset?Object.assign(r,s):(e.splice(n,0,["enter",s,t],["exit",s,t]),n+=2)}n++}return e}const ys={42:Ee,43:Ee,45:Ee,48:Ee,49:Ee,50:Ee,51:Ee,52:Ee,53:Ee,54:Ee,55:Ee,56:Ee,57:Ee,62:Ji},xs={91:Sa},bs={[-2]:Rn,[-1]:Rn,32:Rn},ks={35:Ia,42:cn,45:[Zr,cn],60:Ra,61:Zr,95:cn,96:Qr,126:Qr},Ts={38:el,92:Zi},Ss={[-5]:Pn,[-4]:Pn,[-3]:Pn,33:Ka,38:el,42:Zn,60:[Jo,ja],91:Ja,92:[_a,Zi],93:hr,95:Zn,96:fa},ws={null:[Zn,hs]},Es={null:[42,95]},As={null:[]},_s=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Es,contentInitial:xs,disable:As,document:ys,flow:ks,flowInitial:bs,insideSpan:ws,string:Ts,text:Ss},Symbol.toStringTag,{value:"Module"}));function Cs(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 i={},l=[];let o=[],a=[];const u={attempt:H(W),check:H(k),consume:R,enter:O,exit:U,interrupt:H(k,{interrupt:!0})},s={code:null,containerState:{},defineSkip:E,events:[],now:T,parser:e,previous:null,sliceSerialize:m,sliceStream:h,write:f};let c=t.tokenize.call(s,u);return t.resolveAll&&l.push(t),s;function f(L){return o=Le(o,L),I(),o[o.length-1]!==null?[]:(Z(t,0),s.events=pr(l,s.events,s),s.events)}function m(L,P){return Os(h(L),P)}function h(L){return Is(o,L)}function T(){const{_bufferIndex:L,_index:P,line:ee,column:v,offset:N}=r;return{_bufferIndex:L,_index:P,line:ee,column:v,offset:N}}function E(L){i[L.line]=L.column,$()}function I(){let L;for(;r._index<o.length;){const P=o[r._index];if(typeof P=="string")for(L=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===L&&r._bufferIndex<P.length;)b(P.charCodeAt(r._bufferIndex));else b(P)}}function b(L){c=c(L)}function R(L){z(L)?(r.line++,r.column=1,r.offset+=L===-3?2:1,$()):L!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),s.previous=L}function O(L,P){const ee=P||{};return ee.type=L,ee.start=T(),s.events.push(["enter",ee,s]),a.push(ee),ee}function U(L){const P=a.pop();return P.end=T(),s.events.push(["exit",P,s]),P}function W(L,P){Z(L,P.from)}function k(L,P){P.restore()}function H(L,P){return ee;function ee(v,N,Q){let ae,Ce,ve,d;return Array.isArray(v)?Me(v):"tokenize"in v?Me([v]):G(v);function G(fe){return ft;function ft(Fe){const tt=Fe!==null&&fe[Fe],Je=Fe!==null&&fe.null,te=[...Array.isArray(tt)?tt:tt?[tt]:[],...Array.isArray(Je)?Je:Je?[Je]:[]];return Me(te)(Fe)}}function Me(fe){return ae=fe,Ce=0,fe.length===0?Q:g(fe[Ce])}function g(fe){return ft;function ft(Fe){return d=K(),ve=fe,fe.partial||(s.currentConstruct=fe),fe.name&&s.parser.constructs.disable.null.includes(fe.name)?Qe():fe.tokenize.call(P?Object.assign(Object.create(s),P):s,u,Ie,Qe)(Fe)}}function Ie(fe){return L(ve,d),N}function Qe(fe){return d.restore(),++Ce<ae.length?g(ae[Ce]):Q}}}function Z(L,P){L.resolveAll&&!l.includes(L)&&l.push(L),L.resolve&&Ke(s.events,P,s.events.length-P,L.resolve(s.events.slice(P),s)),L.resolveTo&&(s.events=L.resolveTo(s.events,s))}function K(){const L=T(),P=s.previous,ee=s.currentConstruct,v=s.events.length,N=Array.from(a);return{from:v,restore:Q};function Q(){r=L,s.previous=P,s.currentConstruct=ee,s.events.length=v,a=N,$()}}function $(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Is(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,l=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,l)];else{if(o=e.slice(n,i),r>-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function Os(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const l=e[n];let o;if(typeof l=="string")o=l;else switch(l){case-5:{o="\r";break}case-4:{o=`
3
+ `;break}case-3:{o=`\r
4
+ `;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(l)}i=l===-2,r.push(o)}return r.join("")}function Ns(e){const r={constructs:Fo([_s,...(e||{}).extensions||[]]),content:i(Wo),defined:[],document:i(Go),flow:i(fs),lazy:{},string:i(ms),text:i(ds)};return r;function i(l){return o;function o(a){return Cs(r,l,a)}}}function Ds(e){for(;!tl(e););return e}const ei=/[\0\t\n\r]/g;function Rs(){let e=1,t="",n=!0,r;return i;function i(l,o,a){const u=[];let s,c,f,m,h;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(o||void 0).decode(l)),f=0,t="",n&&(l.charCodeAt(0)===65279&&f++,n=void 0);f<l.length;){if(ei.lastIndex=f,s=ei.exec(l),m=s&&s.index!==void 0?s.index:l.length,h=l.charCodeAt(m),!s){t=l.slice(f);break}if(h===10&&f===m&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),f<m&&(u.push(l.slice(f,m)),e+=m-f),h){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}f=m+1}return a&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const Ps=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ls(e){return e.replace(Ps,vs)}function vs(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),l=i===120||i===88;return Qi(n.slice(l?2:1),l?16:10)}return fr(n)||e}const al={}.hasOwnProperty;function Ms(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Fs(n)(Ds(Ns(n).document().write(Rs()(e,t,!0))))}function Fs(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Rt),autolinkProtocol:K,autolinkEmail:K,atxHeading:l(ie),blockQuote:l(Je),characterEscape:K,characterReference:K,codeFenced:l(te),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:l(te,o),codeText:l(Xt,o),codeTextData:K,data:K,codeFlowValue:K,definition:l(le),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:l(Kt),hardBreakEscape:l(nt),hardBreakTrailing:l(nt),htmlFlow:l(Dt,o),htmlFlowData:K,htmlText:l(Dt,o),htmlTextData:K,image:l(Be),label:o,link:l(Rt),listItem:l(Qt),listItemValue:m,listOrdered:l(yt,f),listUnordered:l(yt),paragraph:l(Jt),reference:g,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:l(ie),strong:l(Ue),thematicBreak:l(Ze)},exit:{atxHeading:u(),atxHeadingSequence:W,autolink:u(),autolinkEmail:tt,autolinkProtocol:Fe,blockQuote:u(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:Qe,characterReferenceMarkerNumeric:Qe,characterReferenceValue:fe,characterReference:ft,codeFenced:u(I),codeFencedFence:E,codeFencedFenceInfo:h,codeFencedFenceMeta:T,codeFlowValue:$,codeIndented:u(b),codeText:u(N),codeTextData:$,data:$,definition:u(),definitionDestinationString:U,definitionLabelString:R,definitionTitleString:O,emphasis:u(),hardBreakEscape:u(P),hardBreakTrailing:u(P),htmlFlow:u(ee),htmlFlowData:$,htmlText:u(v),htmlTextData:$,image:u(ae),label:ve,labelText:Ce,lineEnding:L,link:u(Q),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Ie,resourceDestinationString:d,resourceTitleString:G,resource:Me,setextHeading:u(Z),setextHeadingLineSequence:H,setextHeadingText:k,strong:u(),thematicBreak:u()}};sl(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(x){let C={type:"root",children:[]};const F={stack:[C],tokenStack:[],config:t,enter:a,exit:s,buffer:o,resume:c,data:n},V=[];let Y=-1;for(;++Y<x.length;)if(x[Y][1].type==="listOrdered"||x[Y][1].type==="listUnordered")if(x[Y][0]==="enter")V.push(Y);else{const ye=V.pop();Y=i(x,ye,Y)}for(Y=-1;++Y<x.length;){const ye=t[x[Y][0]];al.call(ye,x[Y][1].type)&&ye[x[Y][1].type].call(Object.assign({sliceSerialize:x[Y][2].sliceSerialize},F),x[Y][1])}if(F.tokenStack.length>0){const ye=F.tokenStack[F.tokenStack.length-1];(ye[1]||ti).call(F,void 0,ye[0])}for(C.position={start:ot(x.length>0?x[0][1].start:{line:1,column:1,offset:0}),end:ot(x.length>0?x[x.length-2][1].end:{line:1,column:1,offset:0})},Y=-1;++Y<t.transforms.length;)C=t.transforms[Y](C)||C;return C}function i(x,C,F){let V=C-1,Y=-1,ye=!1,Re,Pe,rt,it;for(;++V<=F;){const me=x[V];switch(me[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{me[0]==="enter"?Y++:Y--,it=void 0;break}case"lineEndingBlank":{me[0]==="enter"&&(Re&&!it&&!Y&&!rt&&(rt=V),it=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:it=void 0}if(!Y&&me[0]==="enter"&&me[1].type==="listItemPrefix"||Y===-1&&me[0]==="exit"&&(me[1].type==="listUnordered"||me[1].type==="listOrdered")){if(Re){let Ve=V;for(Pe=void 0;Ve--;){const xe=x[Ve];if(xe[1].type==="lineEnding"||xe[1].type==="lineEndingBlank"){if(xe[0]==="exit")continue;Pe&&(x[Pe][1].type="lineEndingBlank",ye=!0),xe[1].type="lineEnding",Pe=Ve}else if(!(xe[1].type==="linePrefix"||xe[1].type==="blockQuotePrefix"||xe[1].type==="blockQuotePrefixWhitespace"||xe[1].type==="blockQuoteMarker"||xe[1].type==="listItemIndent"))break}rt&&(!Pe||rt<Pe)&&(Re._spread=!0),Re.end=Object.assign({},Pe?x[Pe][1].start:me[1].end),x.splice(Pe||V,0,["exit",Re,me[2]]),V++,F++}if(me[1].type==="listItemPrefix"){const Ve={type:"listItem",_spread:!1,start:Object.assign({},me[1].start),end:void 0};Re=Ve,x.splice(V,0,["enter",Ve,me[2]]),V++,F++,rt=void 0,it=!0}}}return x[C][1]._spread=ye,F}function l(x,C){return F;function F(V){a.call(this,x(V),V),C&&C.call(this,V)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(x,C,F){this.stack[this.stack.length-1].children.push(x),this.stack.push(x),this.tokenStack.push([C,F||void 0]),x.position={start:ot(C.start),end:void 0}}function u(x){return C;function C(F){x&&x.call(this,F),s.call(this,F)}}function s(x,C){const F=this.stack.pop(),V=this.tokenStack.pop();if(V)V[0].type!==x.type&&(C?C.call(this,x,V[0]):(V[1]||ti).call(this,x,V[0]));else throw new Error("Cannot close `"+x.type+"` ("+Ht({start:x.start,end:x.end})+"): it’s not open");F.position.end=ot(x.end)}function c(){return vo(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function m(x){if(this.data.expectingFirstListItemValue){const C=this.stack[this.stack.length-2];C.start=Number.parseInt(this.sliceSerialize(x),10),this.data.expectingFirstListItemValue=void 0}}function h(){const x=this.resume(),C=this.stack[this.stack.length-1];C.lang=x}function T(){const x=this.resume(),C=this.stack[this.stack.length-1];C.meta=x}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function I(){const x=this.resume(),C=this.stack[this.stack.length-1];C.value=x.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const x=this.resume(),C=this.stack[this.stack.length-1];C.value=x.replace(/(\r?\n|\r)$/g,"")}function R(x){const C=this.resume(),F=this.stack[this.stack.length-1];F.label=C,F.identifier=_t(this.sliceSerialize(x)).toLowerCase()}function O(){const x=this.resume(),C=this.stack[this.stack.length-1];C.title=x}function U(){const x=this.resume(),C=this.stack[this.stack.length-1];C.url=x}function W(x){const C=this.stack[this.stack.length-1];if(!C.depth){const F=this.sliceSerialize(x).length;C.depth=F}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function H(x){const C=this.stack[this.stack.length-1];C.depth=this.sliceSerialize(x).codePointAt(0)===61?1:2}function Z(){this.data.setextHeadingSlurpLineEnding=void 0}function K(x){const F=this.stack[this.stack.length-1].children;let V=F[F.length-1];(!V||V.type!=="text")&&(V=He(),V.position={start:ot(x.start),end:void 0},F.push(V)),this.stack.push(V)}function $(x){const C=this.stack.pop();C.value+=this.sliceSerialize(x),C.position.end=ot(x.end)}function L(x){const C=this.stack[this.stack.length-1];if(this.data.atHardBreak){const F=C.children[C.children.length-1];F.position.end=ot(x.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(C.type)&&(K.call(this,x),$.call(this,x))}function P(){this.data.atHardBreak=!0}function ee(){const x=this.resume(),C=this.stack[this.stack.length-1];C.value=x}function v(){const x=this.resume(),C=this.stack[this.stack.length-1];C.value=x}function N(){const x=this.resume(),C=this.stack[this.stack.length-1];C.value=x}function Q(){const x=this.stack[this.stack.length-1];if(this.data.inReference){const C=this.data.referenceType||"shortcut";x.type+="Reference",x.referenceType=C,delete x.url,delete x.title}else delete x.identifier,delete x.label;this.data.referenceType=void 0}function ae(){const x=this.stack[this.stack.length-1];if(this.data.inReference){const C=this.data.referenceType||"shortcut";x.type+="Reference",x.referenceType=C,delete x.url,delete x.title}else delete x.identifier,delete x.label;this.data.referenceType=void 0}function Ce(x){const C=this.sliceSerialize(x),F=this.stack[this.stack.length-2];F.label=Ls(C),F.identifier=_t(C).toLowerCase()}function ve(){const x=this.stack[this.stack.length-1],C=this.resume(),F=this.stack[this.stack.length-1];if(this.data.inReference=!0,F.type==="link"){const V=x.children;F.children=V}else F.alt=C}function d(){const x=this.resume(),C=this.stack[this.stack.length-1];C.url=x}function G(){const x=this.resume(),C=this.stack[this.stack.length-1];C.title=x}function Me(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function Ie(x){const C=this.resume(),F=this.stack[this.stack.length-1];F.label=C,F.identifier=_t(this.sliceSerialize(x)).toLowerCase(),this.data.referenceType="full"}function Qe(x){this.data.characterReferenceType=x.type}function fe(x){const C=this.sliceSerialize(x),F=this.data.characterReferenceType;let V;F?(V=Qi(C,F==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):V=fr(C);const Y=this.stack[this.stack.length-1];Y.value+=V}function ft(x){const C=this.stack.pop();C.position.end=ot(x.end)}function Fe(x){$.call(this,x);const C=this.stack[this.stack.length-1];C.url=this.sliceSerialize(x)}function tt(x){$.call(this,x);const C=this.stack[this.stack.length-1];C.url="mailto:"+this.sliceSerialize(x)}function Je(){return{type:"blockquote",children:[]}}function te(){return{type:"code",lang:null,meta:null,value:""}}function Xt(){return{type:"inlineCode",value:""}}function le(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Kt(){return{type:"emphasis",children:[]}}function ie(){return{type:"heading",depth:0,children:[]}}function nt(){return{type:"break"}}function Dt(){return{type:"html",value:""}}function Be(){return{type:"image",title:null,url:"",alt:null}}function Rt(){return{type:"link",title:null,url:"",children:[]}}function yt(x){return{type:"list",ordered:x.type==="listOrdered",start:null,spread:x._spread,children:[]}}function Qt(x){return{type:"listItem",spread:x._spread,checked:null,children:[]}}function Jt(){return{type:"paragraph",children:[]}}function Ue(){return{type:"strong",children:[]}}function He(){return{type:"text",value:""}}function Ze(){return{type:"thematicBreak"}}}function ot(e){return{line:e.line,column:e.column,offset:e.offset}}function sl(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?sl(e,r):zs(e,r)}}function zs(e,t){let n;for(n in t)if(al.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 ti(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ht({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ht({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ht({start:t.start,end:t.end})+") is still open")}function js(e){const t=this;t.parser=n;function n(r){return Ms(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Bs(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Us(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
5
+ `}]}function Hs(e,t){const n=t.value?t.value+`
6
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function Vs(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qs(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ws(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Nt(r.toLowerCase()),l=e.footnoteOrder.indexOf(r);let o,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=l+1,a+=1,e.footnoteCounts.set(r,a);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,u);const s={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,s),e.applyData(t,s)}function $s(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Gs(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ul(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function Ys(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ul(e,t);const i={src:Nt(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)}function Xs(e,t){const n={src:Nt(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Ks(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Qs(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ul(e,t);const i={href:Nt(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function Js(e,t){const n={href:Nt(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Zs(e,t,n){const r=e.all(t),i=n?eu(n):cl(t),l={},o=[];if(typeof t.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const c=r[a];(i||a!==0||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
7
+ `}),c.type==="element"&&c.tagName==="p"&&!i?o.push(...c.children):o.push(c)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:`
8
+ `});const s={type:"element",tagName:"li",properties:l,children:o};return e.patch(t,s),e.applyData(t,s)}function eu(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=cl(n[r])}return t}function cl(e){const t=e.spread;return t??e.children.length>1}function tu(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,l),e.applyData(t,l)}function nu(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ru(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function iu(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lu(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=ar(t.children[1]),u=qi(t.children[t.children.length-1]);a&&u&&(o.position={start:a,end:u}),i.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function ou(e,t,n){const r=n?n.children:void 0,l=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,a=o?o.length:t.children.length;let u=-1;const s=[];for(;++u<a;){const f=t.children[u],m={},h=o?o[u]:void 0;h&&(m.align=h);let T={type:"element",tagName:l,properties:m,children:[]};f&&(T.children=e.all(f),e.patch(f,T),T=e.applyData(f,T)),s.push(T)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,c),e.applyData(t,c)}function au(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const ni=9,ri=32;function su(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const l=[];for(;r;)l.push(ii(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return l.push(ii(t.slice(i),i>0,!1)),l.join("")}function ii(e,t,n){let r=0,i=e.length;if(t){let l=e.codePointAt(r);for(;l===ni||l===ri;)r++,l=e.codePointAt(r)}if(n){let l=e.codePointAt(i-1);for(;l===ni||l===ri;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function uu(e,t){const n={type:"text",value:su(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function cu(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const fu={blockquote:Bs,break:Us,code:Hs,delete:Vs,emphasis:qs,footnoteReference:Ws,heading:$s,html:Gs,imageReference:Ys,image:Xs,inlineCode:Ks,linkReference:Qs,link:Js,listItem:Zs,list:tu,paragraph:nu,root:ru,strong:iu,table:lu,tableCell:au,tableRow:ou,text:uu,thematicBreak:cu,toml:on,yaml:on,definition:on,footnoteDefinition:on};function on(){}const fl=-1,gn=0,qt=1,fn=2,mr=3,dr=4,gr=5,yr=6,pl=7,hl=8,pu=typeof self=="object"?self:globalThis,li=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new pu[e](t)},hu=(e,t)=>{const n=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,o]=t[i];switch(l){case gn:case fl:return n(o,i);case qt:{const a=n([],i);for(const u of o)a.push(r(u));return a}case fn:{const a=n({},i);for(const[u,s]of o)a[r(u)]=r(s);return a}case mr:return n(new Date(o),i);case dr:{const{source:a,flags:u}=o;return n(new RegExp(a,u),i)}case gr:{const a=n(new Map,i);for(const[u,s]of o)a.set(r(u),r(s));return a}case yr:{const a=n(new Set,i);for(const u of o)a.add(r(u));return a}case pl:{const{name:a,message:u}=o;return n(li(a,u),i)}case hl:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:a}=new Uint8Array(o);return n(new DataView(a),o)}}return n(li(l,o),i)};return r},oi=e=>hu(new Map,e)(0),St="",{toString:mu}={},{keys:du}=Object,zt=e=>{const t=typeof e;if(t!=="object"||!e)return[gn,t];const n=mu.call(e).slice(8,-1);switch(n){case"Array":return[qt,St];case"Object":return[fn,St];case"Date":return[mr,St];case"RegExp":return[dr,St];case"Map":return[gr,St];case"Set":return[yr,St];case"DataView":return[qt,n]}return n.includes("Array")?[qt,n]:n.includes("Error")?[pl,n]:[fn,n]},an=([e,t])=>e===gn&&(t==="function"||t==="symbol"),gu=(e,t,n,r)=>{const i=(o,a)=>{const u=r.push(o)-1;return n.set(a,u),u},l=o=>{if(n.has(o))return n.get(o);let[a,u]=zt(o);switch(a){case gn:{let c=o;switch(u){case"bigint":a=hl,c=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([fl],o)}return i([a,c],o)}case qt:{if(u){let m=o;return u==="DataView"?m=new Uint8Array(o.buffer):u==="ArrayBuffer"&&(m=new Uint8Array(o)),i([u,[...m]],o)}const c=[],f=i([a,c],o);for(const m of o)c.push(l(m));return f}case fn:{if(u)switch(u){case"BigInt":return i([u,o.toString()],o);case"Boolean":case"Number":case"String":return i([u,o.valueOf()],o)}if(t&&"toJSON"in o)return l(o.toJSON());const c=[],f=i([a,c],o);for(const m of du(o))(e||!an(zt(o[m])))&&c.push([l(m),l(o[m])]);return f}case mr:return i([a,o.toISOString()],o);case dr:{const{source:c,flags:f}=o;return i([a,{source:c,flags:f}],o)}case gr:{const c=[],f=i([a,c],o);for(const[m,h]of o)(e||!(an(zt(m))||an(zt(h))))&&c.push([l(m),l(h)]);return f}case yr:{const c=[],f=i([a,c],o);for(const m of o)(e||!an(zt(m)))&&c.push(l(m));return f}}const{message:s}=o;return i([a,{name:u,message:s}],o)};return l},ai=(e,{json:t,lossy:n}={})=>{const r=[];return gu(!(t||n),!!t,new Map,r)(e),r},pn=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?oi(ai(e,t)):structuredClone(e):(e,t)=>oi(ai(e,t));function yu(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 xu(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function bu(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||yu,r=e.options.footnoteBackLabel||xu,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let u=-1;for(;++u<e.footnoteOrder.length;){const s=e.footnoteById.get(e.footnoteOrder[u]);if(!s)continue;const c=e.all(s),f=String(s.identifier).toUpperCase(),m=Nt(f.toLowerCase());let h=0;const T=[],E=e.footnoteCounts.get(f);for(;E!==void 0&&++h<=E;){T.length>0&&T.push({type:"text",value:" "});let R=typeof n=="string"?n:n(u,h);typeof R=="string"&&(R={type:"text",value:R}),T.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,h),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const I=c[c.length-1];if(I&&I.type==="element"&&I.tagName==="p"){const R=I.children[I.children.length-1];R&&R.type==="text"?R.value+=" ":I.children.push({type:"text",value:" "}),I.children.push(...T)}else c.push(...T);const b={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(c,!0)};e.patch(s,b),a.push(b)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...pn(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
9
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
10
+ `}]}}const ml=(function(e){if(e==null)return wu;if(typeof e=="function")return yn(e);if(typeof e=="object")return Array.isArray(e)?ku(e):Tu(e);if(typeof e=="string")return Su(e);throw new Error("Expected function, string, or object as test")});function ku(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ml(e[n]);return yn(r);function r(...i){let l=-1;for(;++l<t.length;)if(t[l].apply(this,i))return!0;return!1}}function Tu(e){const t=e;return yn(n);function n(r){const i=r;let l;for(l in e)if(i[l]!==t[l])return!1;return!0}}function Su(e){return yn(t);function t(n){return n&&n.type===e}}function yn(e){return t;function t(n,r,i){return!!(Eu(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function wu(){return!0}function Eu(e){return e!==null&&typeof e=="object"&&"type"in e}const dl=[],Au=!0,si=!1,_u="skip";function Cu(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const l=ml(i),o=r?-1:1;a(e,void 0,[])();function a(u,s,c){const f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){const h=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(u.type+(h?"<"+h+">":""))+")"})}return m;function m(){let h=dl,T,E,I;if((!t||l(u,s,c[c.length-1]||void 0))&&(h=Iu(n(u,c)),h[0]===si))return h;if("children"in u&&u.children){const b=u;if(b.children&&h[0]!==_u)for(E=(r?b.children.length:-1)+o,I=c.concat(b);E>-1&&E<b.children.length;){const R=b.children[E];if(T=a(R,E,I)(),T[0]===si)return T;E=typeof T[1]=="number"?T[1]:E+o}}return h}}}function Iu(e){return Array.isArray(e)?e:typeof e=="number"?[Au,e]:e==null?dl:[e]}function gl(e,t,n,r){let i,l,o;typeof t=="function"&&typeof n!="function"?(l=void 0,o=t,i=n):(l=t,o=n,i=r),Cu(e,l,a,i);function a(u,s){const c=s[s.length-1],f=c?c.children.indexOf(u):void 0;return o(u,f,c)}}const er={}.hasOwnProperty,Ou={};function Nu(e,t){const n=t||Ou,r=new Map,i=new Map,l=new Map,o={...fu,...n.handlers},a={all:s,applyData:Ru,definitionById:r,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:o,one:u,options:n,patch:Du,wrap:Lu};return gl(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const f=c.type==="definition"?r:i,m=String(c.identifier).toUpperCase();f.has(m)||f.set(m,c)}}),a;function u(c,f){const m=c.type,h=a.handlers[m];if(er.call(a.handlers,m)&&h)return h(a,c,f);if(a.options.passThrough&&a.options.passThrough.includes(m)){if("children"in c){const{children:E,...I}=c,b=pn(I);return b.children=a.all(c),b}return pn(c)}return(a.options.unknownHandler||Pu)(a,c,f)}function s(c){const f=[];if("children"in c){const m=c.children;let h=-1;for(;++h<m.length;){const T=a.one(m[h],c);if(T){if(h&&m[h-1].type==="break"&&(!Array.isArray(T)&&T.type==="text"&&(T.value=ui(T.value)),!Array.isArray(T)&&T.type==="element")){const E=T.children[0];E&&E.type==="text"&&(E.value=ui(E.value))}Array.isArray(T)?f.push(...T):f.push(T)}}}return f}}function Du(e,t){e.position&&(t.position=po(e))}function Ru(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&l&&Object.assign(n.properties,pn(l)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Pu(e,t){const n=t.data||{},r="value"in t&&!(er.call(n,"hProperties")||er.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Lu(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
11
+ `});++r<e.length;)r&&n.push({type:"text",value:`
12
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
13
+ `}),n}function ui(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ci(e,t){const n=Nu(e,t),r=n.one(e,void 0),i=bu(n),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
14
+ `},i),l}function vu(e,t){return e&&"run"in e?async function(n,r){const i=ci(n,{file:r,...t});await e.run(i,r)}:function(n,r){return ci(n,{file:r,...e||t})}}function fi(e){if(e)throw e}var Ln,pi;function Mu(){if(pi)return Ln;pi=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(s){return typeof Array.isArray=="function"?Array.isArray(s):t.call(s)==="[object Array]"},l=function(s){if(!s||t.call(s)!=="[object Object]")return!1;var c=e.call(s,"constructor"),f=s.constructor&&s.constructor.prototype&&e.call(s.constructor.prototype,"isPrototypeOf");if(s.constructor&&!c&&!f)return!1;var m;for(m in s);return typeof m>"u"||e.call(s,m)},o=function(s,c){n&&c.name==="__proto__"?n(s,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):s[c.name]=c.newValue},a=function(s,c){if(c==="__proto__")if(e.call(s,c)){if(r)return r(s,c).value}else return;return s[c]};return Ln=function u(){var s,c,f,m,h,T,E=arguments[0],I=1,b=arguments.length,R=!1;for(typeof E=="boolean"&&(R=E,E=arguments[1]||{},I=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});I<b;++I)if(s=arguments[I],s!=null)for(c in s)f=a(E,c),m=a(s,c),E!==m&&(R&&m&&(l(m)||(h=i(m)))?(h?(h=!1,T=f&&i(f)?f:[]):T=f&&l(f)?f:{},o(E,{name:c,newValue:u(R,T,m)})):typeof m<"u"&&o(E,{name:c,newValue:m}));return E},Ln}var Fu=Mu();const vn=Vi(Fu);function tr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function zu(){const e=[],t={run:n,use:r};return t;function n(...i){let l=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(u,...s){const c=e[++l];let f=-1;if(u){o(u);return}for(;++f<i.length;)(s[f]===null||s[f]===void 0)&&(s[f]=i[f]);i=s,c?ju(c,a)(...s):o(null,...s)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function ju(e,t){let n;return r;function r(...o){const a=e.length>o.length;let u;a&&o.push(i);try{u=e.apply(this,o)}catch(s){const c=s;if(a&&n)throw c;return i(c)}a||(u&&u.then&&typeof u.then=="function"?u.then(l,i):u instanceof Error?i(u):l(u))}function i(o,...a){n||(n=!0,t(o,...a))}function l(o){i(null,o)}}const Ye={basename:Bu,dirname:Uu,extname:Hu,join:Vu,sep:"/"};function Bu(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Gt(e);let n=0,r=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else o<0&&(l=!0,o=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Uu(e){if(Gt(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Hu(e){Gt(e);let t=e.length,n=-1,r=0,i=-1,l=0,o;for(;t--;){const a=e.codePointAt(t);if(a===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),a===46?i<0?i=t:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||n<0||l===0||l===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Vu(...e){let t=-1,n;for(;++t<e.length;)Gt(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":qu(n)}function qu(e){Gt(e);const t=e.codePointAt(0)===47;let n=Wu(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Wu(e,t){let n="",r=0,i=-1,l=0,o=-1,a,u;for(;++o<=e.length;){if(o<e.length)a=e.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||l===1))if(i!==o-1&&l===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=o,l=0;continue}}else if(n.length>0){n="",r=0,i=o,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,l=0}else a===46&&l>-1?l++:l=-1}return n}function Gt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const $u={cwd:Gu};function Gu(){return"/"}function nr(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Yu(e){if(typeof e=="string")e=new URL(e);else if(!nr(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Xu(e)}function Xu(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Mn=["history","path","basename","stem","extname","dirname"];class yl{constructor(t){let n;t?nr(t)?n={path:t}:typeof t=="string"||Ku(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":$u.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Mn.length;){const l=Mn[r];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let i;for(i in n)Mn.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Ye.basename(this.path):void 0}set basename(t){zn(t,"basename"),Fn(t,"basename"),this.path=Ye.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ye.dirname(this.path):void 0}set dirname(t){hi(this.basename,"dirname"),this.path=Ye.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ye.extname(this.path):void 0}set extname(t){if(Fn(t,"extname"),hi(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ye.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){nr(t)&&(t=Yu(t)),zn(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ye.basename(this.path,this.extname):void 0}set stem(t){zn(t,"stem"),Fn(t,"stem"),this.path=Ye.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new ke(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Fn(e,t){if(e&&e.includes(Ye.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ye.sep+"`")}function zn(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function hi(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Ku(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Qu=(function(e){const r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l}),Ju={}.hasOwnProperty;class xr extends Qu{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=zu()}copy(){const t=new xr;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(vn(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Un("data",this.frozen),this.namespace[t]=n,this):Ju.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Un("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=sn(t),r=this.parser||this.Parser;return jn("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),jn("process",this.parser||this.Parser),Bn("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(l,o){const a=sn(t),u=r.parse(a);r.run(u,a,function(c,f,m){if(c||!f||!m)return s(c);const h=f,T=r.stringify(h,m);tc(T)?m.value=T:m.result=T,s(c,m)});function s(c,f){c||!f?o(c):l?l(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),jn("processSync",this.parser||this.Parser),Bn("processSync",this.compiler||this.Compiler),this.process(t,i),di("processSync","process",n),r;function i(l,o){n=!0,fi(l),r=o}}run(t,n,r){mi(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?l(void 0,r):new Promise(l);function l(o,a){const u=sn(n);i.run(t,u,s);function s(c,f,m){const h=f||t;c?a(c):o?o(h):r(void 0,h,m)}}}runSync(t,n){let r=!1,i;return this.run(t,n,l),di("runSync","run",r),i;function l(o,a){fi(o),i=a,r=!0}}stringify(t,n){this.freeze();const r=sn(n),i=this.compiler||this.Compiler;return Bn("stringify",i),mi(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Un("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(s){if(typeof s=="function")u(s,[]);else if(typeof s=="object")if(Array.isArray(s)){const[c,...f]=s;u(c,f)}else o(s);else throw new TypeError("Expected usable value, not `"+s+"`")}function o(s){if(!("plugins"in s)&&!("settings"in s))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(s.plugins),s.settings&&(i.settings=vn(!0,i.settings,s.settings))}function a(s){let c=-1;if(s!=null)if(Array.isArray(s))for(;++c<s.length;){const f=s[c];l(f)}else throw new TypeError("Expected a list of plugins, not `"+s+"`")}function u(s,c){let f=-1,m=-1;for(;++f<r.length;)if(r[f][0]===s){m=f;break}if(m===-1)r.push([s,...c]);else if(c.length>0){let[h,...T]=c;const E=r[m][1];tr(E)&&tr(h)&&(h=vn(!0,E,h)),r[m]=[s,h,...T]}}}}const Zu=new xr().freeze();function jn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Bn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Un(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 mi(e){if(!tr(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function di(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function sn(e){return ec(e)?e:new yl(e)}function ec(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function tc(e){return typeof e=="string"||nc(e)}function nc(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rc="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",gi=[],yi={allowDangerousHtml:!0},ic=/^(https?|ircs?|mailto|xmpp)$/i,lc=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function oc(e){const t=ac(e),n=sc(e);return uc(t.runSync(t.parse(n),n),e)}function ac(e){const t=e.rehypePlugins||gi,n=e.remarkPlugins||gi,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...yi}:yi;return Zu().use(js).use(n).use(vu,r).use(t)}function sc(e){const t=e.children||"",n=new yl;return typeof t=="string"&&(n.value=t),n}function uc(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,l=t.disallowedElements,o=t.skipHtml,a=t.unwrapDisallowed,u=t.urlTransform||cc;for(const c of lc)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+rc+c.id,void 0);return gl(e,s),xo(e,{Fragment:_.Fragment,components:i,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function s(c,f,m){if(c.type==="raw"&&m&&typeof f=="number")return o?m.children.splice(f,1):m.children[f]={type:"text",value:c.value},f;if(c.type==="element"){let h;for(h in Dn)if(Object.hasOwn(Dn,h)&&Object.hasOwn(c.properties,h)){const T=c.properties[h],E=Dn[h];(E===null||E.includes(c.tagName))&&(c.properties[h]=u(String(T||""),h,c))}}if(c.type==="element"){let h=n?!n.includes(c.tagName):l?l.includes(c.tagName):!1;if(!h&&r&&typeof f=="number"&&(h=!r(c,f,m)),h&&m&&typeof f=="number")return a&&c.children?m.children.splice(f,1,...c.children):m.children.splice(f,1),f}}}function cc(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||ic.test(e.slice(0,t))?e:""}const fc=oc,pc=e=>_.jsx("a",{href:e.href,target:"_blank",rel:"noreferrer",children:e.children});function Ct(e){const t=e.components||{};return t.a||(t.a=pc),_.jsx(fc,{...e,components:t,allowedElements:["a","p","em","img","strong","ul","ol","li"]})}/*! @license DOMPurify 3.4.12 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.12/LICENSE */function xi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function hc(e){if(Array.isArray(e))return e}function mc(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,o,a=[],u=!0,s=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(u=(r=l.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(c){s=!0,i=c}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return a}}function dc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
15
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gc(e,t){return hc(e)||mc(e,t)||yc(e,t)||dc()}function yc(e,t){if(e){if(typeof e=="string")return xi(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xi(e,t):void 0}}const xl=Object.entries,bi=Object.setPrototypeOf,xc=Object.isFrozen,bc=Object.getPrototypeOf,kc=Object.getOwnPropertyDescriptor;let de=Object.freeze,ge=Object.seal,At=Object.create,bl=typeof Reflect<"u"&&Reflect,rr=bl.apply,ir=bl.construct;de||(de=function(t){return t});ge||(ge=function(t){return t});rr||(rr=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),l=2;l<r;l++)i[l-2]=arguments[l];return t.apply(n,i)});ir||(ir=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return new t(...r)});const wt=ce(Array.prototype.forEach),Tc=ce(Array.prototype.lastIndexOf),ki=ce(Array.prototype.pop),Et=ce(Array.prototype.push),Sc=ce(Array.prototype.splice),st=Array.isArray,Ut=ce(String.prototype.toLowerCase),Hn=ce(String.prototype.toString),Ti=ce(String.prototype.match),jt=ce(String.prototype.replace),Si=ce(String.prototype.indexOf),wc=ce(String.prototype.trim),Ec=ce(Number.prototype.toString),Ac=ce(Boolean.prototype.toString),wi=typeof BigInt>"u"?null:ce(BigInt.prototype.toString),Ei=typeof Symbol>"u"?null:ce(Symbol.prototype.toString),he=ce(Object.prototype.hasOwnProperty),Bt=ce(Object.prototype.toString),pe=ce(RegExp.prototype.test),ht=_c(TypeError);function ce(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return rr(e,t,r)}}function _c(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ir(e,n)}}function X(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ut;if(bi&&bi(e,null),!st(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const l=n(i);l!==i&&(xc(t)||(t[r]=l),i=l)}e[i]=!0}return e}function Cc(e){for(let t=0;t<e.length;t++)he(e,t)||(e[t]=null);return e}function Se(e){const t=At(null);for(const r of xl(e)){var n=gc(r,2);const i=n[0],l=n[1];he(e,i)&&(st(l)?t[i]=Cc(l):l&&typeof l=="object"&&l.constructor===Object?t[i]=Se(l):t[i]=l)}return t}function Ic(e){switch(typeof e){case"string":return e;case"number":return Ec(e);case"boolean":return Ac(e);case"bigint":return wi?wi(e):"0";case"symbol":return Ei?Ei(e):"Symbol()";case"undefined":return Bt(e);case"function":case"object":{if(e===null)return Bt(e);const t=e,n=Ge(t,"toString");if(typeof n=="function"){const r=n(t);return typeof r=="string"?r:Bt(r)}return Bt(e)}default:return Bt(e)}}function Ge(e,t){for(;e!==null;){const r=kc(e,t);if(r){if(r.get)return ce(r.get);if(typeof r.value=="function")return ce(r.value)}e=bc(e)}function n(){return null}return n}function Oc(e){try{return pe(e,""),!0}catch{return!1}}const Ai=de(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Vn=de(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),qn=de(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Nc=de(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Wn=de(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Dc=de(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),_i=de(["#text"]),Ci=de(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),$n=de(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ii=de(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),un=de(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Rc=ge(/{{[\w\W]*|^[\w\W]*}}/g),Pc=ge(/<%[\w\W]*|^[\w\W]*%>/g),Lc=ge(/\${[\w\W]*/g),vc=ge(/^data-[\-\w.\u00B7-\uFFFF]+$/),Mc=ge(/^aria-[\-\w]+$/),Oi=ge(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Fc=ge(/^(?:\w+script|data):/i),zc=ge(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),jc=ge(/^html$/i),Bc=ge(/^[a-z][.\w]*(-[.\w]+)+$/i),Ni=ge(/<[/\w!]/g),Di=ge(/<[/\w]/g),Uc=ge(/<\/no(script|embed|frames)/i),Hc=ge(/\/>/i),Oe={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Vc=function(){return typeof window>"u"?null:window},qc=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const l="dompurify"+(r?"#"+r:"");try{return t.createPolicy(l,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},Ri=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},at=function(t,n,r,i){return he(t,n)&&st(t[n])?X(i.base?Se(i.base):{},t[n],i.transform):r};function kl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Vc();const t=A=>kl(A);if(t.version="3.4.12",t.removed=[],!e||!e.document||e.document.nodeType!==Oe.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const r=n,i=r.currentScript;e.DocumentFragment;const l=e.HTMLTemplateElement,o=e.Node,a=e.Element,u=e.NodeFilter,s=e.NamedNodeMap;s===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,f=e.trustedTypes,m=a.prototype,h=Ge(m,"cloneNode"),T=Ge(m,"remove"),E=Ge(m,"nextSibling"),I=Ge(m,"childNodes"),b=Ge(m,"parentNode"),R=Ge(m,"shadowRoot"),O=Ge(m,"attributes"),U=o&&o.prototype?Ge(o.prototype,"nodeType"):null,W=o&&o.prototype?Ge(o.prototype,"nodeName"):null;if(typeof l=="function"){const A=n.createElement("template");A.content&&A.content.ownerDocument&&(n=A.content.ownerDocument)}let k,H="",Z,K=!1,$=0;const L=function(){if($>0)throw ht('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},P=function(p){L(),$++;try{return k.createHTML(p)}finally{$--}},ee=function(p){L(),$++;try{return k.createScriptURL(p)}finally{$--}},v=function(){return K||(Z=qc(f,i),K=!0),Z},N=n,Q=N.implementation,ae=N.createNodeIterator,Ce=N.createDocumentFragment,ve=N.getElementsByTagName,d=r.importNode;let G=Ri();t.isSupported=typeof xl=="function"&&typeof b=="function"&&Q&&Q.createHTMLDocument!==void 0;const Me=Rc,g=Pc,Ie=Lc,Qe=vc,fe=Mc,ft=Fc,Fe=zc,tt=Bc;let Je=Oi,te=null;const Xt=X({},[...Ai,...Vn,...qn,...Wn,..._i]);let le=null;const Kt=X({},[...Ci,...$n,...Ii,...un]);let ie=Object.seal(At(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),nt=null,Dt=null;const Be=Object.seal(At(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Rt=!0,yt=!0,Qt=!1,Jt=!0,Ue=!1,He=!0,Ze=!1,x=!1,C=null,F=null,V=!1,Y=!1,ye=!1,Re=!1,Pe=!0,rt=!1;const it="user-content-";let me=!0,Ve=!1,xe={},qe=null;const bn=X({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let kr=null;const Tr=X({},["audio","video","img","source","image","track"]);let kn=null;const Sr=X({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Zt="http://www.w3.org/1998/Math/MathML",en="http://www.w3.org/2000/svg",We="http://www.w3.org/1999/xhtml";let xt=We,Tn=!1,Sn=null;const Cl=X({},[Zt,en,We],Hn),wr=de(["mi","mo","mn","ms","mtext"]);let wn=X({},wr);const Er=de(["annotation-xml"]);let En=X({},Er);const Il=X({},["title","style","font","a","script"]);let Pt=null;const Ol=["application/xhtml+xml","text/html"],Nl="text/html";let oe=null,bt=null;const Dl=n.createElement("form"),Ar=function(p){return p instanceof RegExp||p instanceof Function},An=function(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(bt&&bt===p)return;(!p||typeof p!="object")&&(p={}),p=Se(p),Pt=Ol.indexOf(p.PARSER_MEDIA_TYPE)===-1?Nl:p.PARSER_MEDIA_TYPE,oe=Pt==="application/xhtml+xml"?Hn:Ut,te=at(p,"ALLOWED_TAGS",Xt,{transform:oe}),le=at(p,"ALLOWED_ATTR",Kt,{transform:oe}),Sn=at(p,"ALLOWED_NAMESPACES",Cl,{transform:Hn}),kn=at(p,"ADD_URI_SAFE_ATTR",Sr,{transform:oe,base:Sr}),kr=at(p,"ADD_DATA_URI_TAGS",Tr,{transform:oe,base:Tr}),qe=at(p,"FORBID_CONTENTS",bn,{transform:oe}),nt=at(p,"FORBID_TAGS",Se({}),{transform:oe}),Dt=at(p,"FORBID_ATTR",Se({}),{transform:oe}),xe=he(p,"USE_PROFILES")?p.USE_PROFILES&&typeof p.USE_PROFILES=="object"?Se(p.USE_PROFILES):p.USE_PROFILES:!1,Rt=p.ALLOW_ARIA_ATTR!==!1,yt=p.ALLOW_DATA_ATTR!==!1,Qt=p.ALLOW_UNKNOWN_PROTOCOLS||!1,Jt=p.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ue=p.SAFE_FOR_TEMPLATES||!1,He=p.SAFE_FOR_XML!==!1,Ze=p.WHOLE_DOCUMENT||!1,Y=p.RETURN_DOM||!1,ye=p.RETURN_DOM_FRAGMENT||!1,Re=p.RETURN_TRUSTED_TYPE||!1,V=p.FORCE_BODY||!1,Pe=p.SANITIZE_DOM!==!1,rt=p.SANITIZE_NAMED_PROPS||!1,me=p.KEEP_CONTENT!==!1,Ve=p.IN_PLACE||!1,Je=Oc(p.ALLOWED_URI_REGEXP)?p.ALLOWED_URI_REGEXP:Oi,xt=typeof p.NAMESPACE=="string"?p.NAMESPACE:We,wn=he(p,"MATHML_TEXT_INTEGRATION_POINTS")&&p.MATHML_TEXT_INTEGRATION_POINTS&&typeof p.MATHML_TEXT_INTEGRATION_POINTS=="object"?Se(p.MATHML_TEXT_INTEGRATION_POINTS):X({},wr),En=he(p,"HTML_INTEGRATION_POINTS")&&p.HTML_INTEGRATION_POINTS&&typeof p.HTML_INTEGRATION_POINTS=="object"?Se(p.HTML_INTEGRATION_POINTS):X({},Er);const y=he(p,"CUSTOM_ELEMENT_HANDLING")&&p.CUSTOM_ELEMENT_HANDLING&&typeof p.CUSTOM_ELEMENT_HANDLING=="object"?Se(p.CUSTOM_ELEMENT_HANDLING):At(null);if(ie=At(null),he(y,"tagNameCheck")&&Ar(y.tagNameCheck)&&(ie.tagNameCheck=y.tagNameCheck),he(y,"attributeNameCheck")&&Ar(y.attributeNameCheck)&&(ie.attributeNameCheck=y.attributeNameCheck),he(y,"allowCustomizedBuiltInElements")&&typeof y.allowCustomizedBuiltInElements=="boolean"&&(ie.allowCustomizedBuiltInElements=y.allowCustomizedBuiltInElements),ge(ie),Ue&&(yt=!1),ye&&(Y=!0),xe&&(te=X({},_i),le=At(null),xe.html===!0&&(X(te,Ai),X(le,Ci)),xe.svg===!0&&(X(te,Vn),X(le,$n),X(le,un)),xe.svgFilters===!0&&(X(te,qn),X(le,$n),X(le,un)),xe.mathMl===!0&&(X(te,Wn),X(le,Ii),X(le,un))),Be.tagCheck=null,Be.attributeCheck=null,he(p,"ADD_TAGS")&&(typeof p.ADD_TAGS=="function"?Be.tagCheck=p.ADD_TAGS:st(p.ADD_TAGS)&&(te===Xt&&(te=Se(te)),X(te,p.ADD_TAGS,oe))),he(p,"ADD_ATTR")&&(typeof p.ADD_ATTR=="function"?Be.attributeCheck=p.ADD_ATTR:st(p.ADD_ATTR)&&(le===Kt&&(le=Se(le)),X(le,p.ADD_ATTR,oe))),he(p,"ADD_URI_SAFE_ATTR")&&st(p.ADD_URI_SAFE_ATTR)&&X(kn,p.ADD_URI_SAFE_ATTR,oe),he(p,"FORBID_CONTENTS")&&st(p.FORBID_CONTENTS)&&(qe===bn&&(qe=Se(qe)),X(qe,p.FORBID_CONTENTS,oe)),he(p,"ADD_FORBID_CONTENTS")&&st(p.ADD_FORBID_CONTENTS)&&(qe===bn&&(qe=Se(qe)),X(qe,p.ADD_FORBID_CONTENTS,oe)),me&&(te["#text"]=!0),Ze&&X(te,["html","head","body"]),te.table&&(X(te,["tbody"]),delete nt.tbody),p.TRUSTED_TYPES_POLICY){if(typeof p.TRUSTED_TYPES_POLICY.createHTML!="function")throw ht('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof p.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ht('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const S=k;k=p.TRUSTED_TYPES_POLICY;try{H=P("")}catch(D){throw k=S,D}}else p.TRUSTED_TYPES_POLICY===null?(k=void 0,H=""):(k===void 0&&(k=v()),k&&typeof H=="string"&&(H=P("")));de&&de(p),bt=p},_r=X({},[...Vn,...qn,...Nc]),Cr=X({},[...Wn,...Dc]),Rl=function(p,y,S){return y.namespaceURI===We?p==="svg":y.namespaceURI===Zt?p==="svg"&&(S==="annotation-xml"||wn[S]):!!_r[p]},Pl=function(p,y,S){return y.namespaceURI===We?p==="math":y.namespaceURI===en?p==="math"&&En[S]:!!Cr[p]},Ll=function(p,y,S){return y.namespaceURI===en&&!En[S]||y.namespaceURI===Zt&&!wn[S]?!1:!Cr[p]&&(Il[p]||!_r[p])},vl=function(p){let y=b(p);(!y||!y.tagName)&&(y={namespaceURI:xt,tagName:"template"});const S=Ut(p.tagName),D=Ut(y.tagName);return Sn[p.namespaceURI]?p.namespaceURI===en?Rl(S,y,D):p.namespaceURI===Zt?Pl(S,y,D):p.namespaceURI===We?Ll(S,y,D):!!(Pt==="application/xhtml+xml"&&Sn[p.namespaceURI]):!1},lt=function(p){Et(t.removed,{element:p});try{b(p).removeChild(p)}catch{if(T(p),!b(p))throw ht("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},tn=function(p){_n(p);const y=I(p);if(y){const D=[];wt(y,M=>{Et(D,M)}),wt(D,M=>{try{T(M)}catch{}})}const S=O(p);if(S)for(let D=S.length-1;D>=0;--D){const M=S[D],j=M&&M.name;if(typeof j=="string")try{p.removeAttribute(j)}catch{}}},pt=function(p,y){try{Et(t.removed,{attribute:y.getAttributeNode(p),from:y})}catch{Et(t.removed,{attribute:null,from:y})}if(y.removeAttribute(p),p==="is")if(Y||ye)try{lt(y)}catch{}else try{y.setAttribute(p,"")}catch{}},Ml=function(p){const y=O(p);if(y)for(let S=y.length-1;S>=0;--S){const D=y[S],M=D&&D.name;if(!(typeof M!="string"||le[oe(M)]))try{p.removeAttribute(M)}catch{}}},_n=function(p){const y=[p];for(;y.length>0;){const S=y.pop();(U?U(S):S.nodeType)===Oe.element&&Ml(S);const M=I(S);if(M)for(let j=M.length-1;j>=0;--j)y.push(M[j])}},Fl=function(p){if(!He)return;const y=[p];for(;y.length>0;){const S=y.pop(),D=U?U(S):S.nodeType;if(D===Oe.processingInstruction||D===Oe.comment&&pe(Di,S.data)){try{T(S)}catch{}continue}if(D===Oe.element){const j=S,se=oe(W?W(S):S.nodeName);try{j.hasAttribute&&j.hasAttribute("patchsrc")&&j.removeAttribute("patchsrc"),j.hasAttribute&&j.hasAttribute("for")&&se!=="label"&&se!=="output"&&j.removeAttribute("for")}catch{}}const M=I(S);if(M)for(let j=M.length-1;j>=0;--j)y.push(M[j])}},Ir=function(p){let y=null,S=null;if(V)p="<remove></remove>"+p;else{const j=Ti(p,/^[\r\n\t ]+/);S=j&&j[0]}Pt==="application/xhtml+xml"&&xt===We&&(p='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+p+"</body></html>");const D=k?P(p):p;if(xt===We)try{y=new c().parseFromString(D,Pt)}catch{}if(!y||!y.documentElement){y=Q.createDocument(xt,"template",null);try{y.documentElement.innerHTML=Tn?H:D}catch{}}const M=y.body||y.documentElement;return p&&S&&M.insertBefore(n.createTextNode(S),M.childNodes[0]||null),xt===We?ve.call(y,Ze?"html":"body")[0]:Ze?y.documentElement:M},Or=function(p){return ae.call(p.ownerDocument||p,p,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},nn=function(p){return p=jt(p,Me," "),p=jt(p,g," "),p=jt(p,Ie," "),p},Cn=function(p){var y;p.normalize();const S=ae.call(p.ownerDocument||p,p,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let D=S.nextNode();for(;D;)D.data=nn(D.data),D=S.nextNode();const M=(y=p.querySelectorAll)===null||y===void 0?void 0:y.call(p,"template");M&&wt(M,j=>{kt(j.content)&&Cn(j.content)})},rn=function(p){const y=W?W(p):null;return typeof y!="string"||oe(y)!=="form"?!1:typeof p.nodeName!="string"||typeof p.textContent!="string"||typeof p.removeChild!="function"||p.attributes!==O(p)||typeof p.removeAttribute!="function"||typeof p.setAttribute!="function"||typeof p.namespaceURI!="string"||typeof p.insertBefore!="function"||typeof p.hasChildNodes!="function"||p.nodeType!==U(p)||p.childNodes!==I(p)},kt=function(p){if(!U||typeof p!="object"||p===null)return!1;try{return U(p)===Oe.documentFragment}catch{return!1}},Lt=function(p){if(!U||typeof p!="object"||p===null)return!1;try{return typeof U(p)=="number"}catch{return!1}};function $e(A,p,y){A.length!==0&&wt(A,S=>{S.call(t,p,y,bt)})}const zl=function(p,y){return!!(He&&p.hasChildNodes()&&!Lt(p.firstElementChild)&&pe(Ni,p.textContent)&&pe(Ni,p.innerHTML)||He&&p.namespaceURI===We&&y==="style"&&Lt(p.firstElementChild)||p.nodeType===Oe.processingInstruction||He&&p.nodeType===Oe.comment&&pe(Di,p.data))},jl=function(p,y){if(!nt[y]&&Rr(y)&&(ie.tagNameCheck instanceof RegExp&&pe(ie.tagNameCheck,y)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(y)))return!1;if(me&&!qe[y]){const S=b(p),D=I(p);if(D&&S){const M=D.length;for(let j=M-1;j>=0;--j){const se=Ve?D[j]:h(D[j],!0);S.insertBefore(se,E(p))}}}return lt(p),!0},Nr=function(p,y){if($e(G.beforeSanitizeElements,p,null),p!==y&&b(p)===null)return!0;if(rn(p))return lt(p),!0;const S=oe(W?W(p):p.nodeName);if($e(G.uponSanitizeElement,p,{tagName:S,allowedTags:te}),p!==y&&b(p)===null)return!0;if(zl(p,S))return lt(p),!0;if(nt[S]||!(Be.tagCheck instanceof Function&&Be.tagCheck(S))&&!te[S]){const M=jl(p,S);return M===!1&&$e(G.afterSanitizeElements,p,null),M}if((U?U(p):p.nodeType)===Oe.element&&!vl(p)||(S==="noscript"||S==="noembed"||S==="noframes")&&pe(Uc,p.innerHTML))return lt(p),!0;if(Ue&&p.nodeType===Oe.text){const M=nn(p.textContent);p.textContent!==M&&(Et(t.removed,{element:p.cloneNode()}),p.textContent=M)}return $e(G.afterSanitizeElements,p,null),!1},Dr=function(p,y,S){if(Dt[y]||He&&y==="patchsrc"||He&&y==="for"&&p!=="label"&&p!=="output"||Pe&&(y==="id"||y==="name")&&(S in n||S in Dl))return!1;const D=le[y]||Be.attributeCheck instanceof Function&&Be.attributeCheck(y,p);if(!(yt&&pe(Qe,y))){if(!(Rt&&pe(fe,y))){if(D){if(!kn[y]){if(!pe(Je,jt(S,Fe,""))){if(!((y==="src"||y==="xlink:href"||y==="href")&&p!=="script"&&Si(S,"data:")===0&&kr[p])){if(!(Qt&&!pe(ft,jt(S,Fe,"")))){if(S)return!1}}}}}else if(!(Rr(p)&&(ie.tagNameCheck instanceof RegExp&&pe(ie.tagNameCheck,p)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(p))&&(ie.attributeNameCheck instanceof RegExp&&pe(ie.attributeNameCheck,y)||ie.attributeNameCheck instanceof Function&&ie.attributeNameCheck(y,p))||y==="is"&&ie.allowCustomizedBuiltInElements&&(ie.tagNameCheck instanceof RegExp&&pe(ie.tagNameCheck,S)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(S))))return!1}}return!0},Bl=X({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Rr=function(p){return!Bl[Ut(p)]&&pe(tt,p)},Ul=function(p,y,S,D){if(k&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!S)switch(f.getAttributeType(p,y)){case"TrustedHTML":return P(D);case"TrustedScriptURL":return ee(D)}return D},Hl=function(p,y,S,D){try{S?p.setAttributeNS(S,y,D):p.setAttribute(y,D),rn(p)?lt(p):ki(t.removed)}catch{pt(y,p)}},Pr=function(p){$e(G.beforeSanitizeAttributes,p,null);const y=p.attributes;if(!y||rn(p))return;const S={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:le,forceKeepAttr:void 0};let D=y.length;const M=oe(p.nodeName);for(;D--;){const j=y[D],se=j.name,be=j.namespaceURI,ze=j.value,we=oe(se),je=ze;let Te=se==="value"?je:wc(je);if(S.attrName=we,S.attrValue=Te,S.keepAttr=!0,S.forceKeepAttr=void 0,$e(G.uponSanitizeAttribute,p,S),Te=S.attrValue,rt&&(we==="id"||we==="name")&&Si(Te,it)!==0&&(pt(se,p),Te=it+Te),He&&pe(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Te)){pt(se,p);continue}if(we==="attributename"&&Ti(Te,"href")){pt(se,p);continue}if(!S.forceKeepAttr){if(!S.keepAttr){pt(se,p);continue}if(!Jt&&pe(Hc,Te)){pt(se,p);continue}if(Ue&&(Te=nn(Te)),!Dr(M,we,Te)){pt(se,p);continue}Te=Ul(M,we,be,Te),Te!==je&&Hl(p,se,be,Te)}}$e(G.afterSanitizeAttributes,p,null)},ln=function(p){let y=null;const S=Or(p);for($e(G.beforeSanitizeShadowDOM,p,null);y=S.nextNode();)if($e(G.uponSanitizeShadowNode,y,null),Nr(y,p),Pr(y),kt(y.content)&&ln(y.content),(U?U(y):y.nodeType)===Oe.element){const M=R(y);kt(M)&&(In(M),ln(M))}$e(G.afterSanitizeShadowDOM,p,null)},In=function(p){const y=[{node:p,shadow:null}];for(;y.length>0;){const S=y.pop();if(S.shadow){ln(S.shadow);continue}const D=S.node,j=(U?U(D):D.nodeType)===Oe.element,se=I(D);if(se)for(let be=se.length-1;be>=0;--be)y.push({node:se[be],shadow:null});if(j){const be=W?W(D):null;if(typeof be=="string"&&oe(be)==="template"){const ze=D.content;kt(ze)&&y.push({node:ze,shadow:null})}}if(j){const be=R(D);kt(be)&&y.push({node:null,shadow:be},{node:be,shadow:null})}}};return t.sanitize=function(A){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=null,S=null,D=null,M=null;if(Tn=!A,Tn&&(A="<!-->"),typeof A!="string"&&!Lt(A)&&(A=Ic(A),typeof A!="string"))throw ht("dirty is not a string, aborting");if(!t.isSupported)return A;x?(te=C,le=F):An(p),(G.uponSanitizeElement.length>0||G.uponSanitizeAttribute.length>0)&&(te=Se(te)),G.uponSanitizeAttribute.length>0&&(le=Se(le)),t.removed=[];const j=Ve&&typeof A!="string"&&Lt(A);if(j){Fl(A);const we=W?W(A):A.nodeName;if(typeof we=="string"){const je=oe(we);if(!te[je]||nt[je])throw tn(A),ht("root node is forbidden and cannot be sanitized in-place")}if(rn(A))throw tn(A),ht("root node is clobbered and cannot be sanitized in-place");try{In(A)}catch(je){throw tn(A),je}}else if(Lt(A))y=Ir("<!---->"),S=y.ownerDocument.importNode(A,!0),S.nodeType===Oe.element&&S.nodeName==="BODY"||S.nodeName==="HTML"?y=S:y.appendChild(S),In(S);else{if(!Y&&!Ue&&!Ze&&A.indexOf("<")===-1)return k&&Re?P(A):A;if(y=Ir(A),!y)return Y?null:Re?H:""}y&&V&&lt(y.firstChild);const se=j?A:y,be=Or(se);try{for(;D=be.nextNode();)Nr(D,se),Pr(D),kt(D.content)&&ln(D.content)}catch(we){throw j&&(tn(A),wt(t.removed,je=>{je.element&&_n(je.element)})),we}if(j)return wt(t.removed,we=>{we.element&&_n(we.element)}),Ue&&Cn(A),A;if(Y){if(Ue&&Cn(y),ye)for(M=Ce.call(y.ownerDocument);y.firstChild;)M.appendChild(y.firstChild);else M=y;return(le.shadowroot||le.shadowrootmode)&&(M=d.call(r,M,!0)),M}let ze=Ze?y.outerHTML:y.innerHTML;return Ze&&te["!doctype"]&&y.ownerDocument&&y.ownerDocument.doctype&&y.ownerDocument.doctype.name&&pe(jc,y.ownerDocument.doctype.name)&&(ze="<!DOCTYPE "+y.ownerDocument.doctype.name+`>
16
+ `+ze),Ue&&(ze=nn(ze)),k&&Re?P(ze):ze},t.setConfig=function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};An(A),x=!0,C=te,F=le},t.clearConfig=function(){bt=null,x=!1,C=null,F=null,k=Z,H=""},t.isValidAttribute=function(A,p,y){bt||An({});const S=oe(A),D=oe(p);return Dr(S,D,y)},t.addHook=function(A,p){typeof p=="function"&&he(G,A)&&Et(G[A],p)},t.removeHook=function(A,p){if(he(G,A)){if(p!==void 0){const y=Tc(G[A],p);return y===-1?void 0:Sc(G[A],y,1)[0]}return ki(G[A])}},t.removeHooks=function(A){he(G,A)&&(G[A]=[])},t.removeAllHooks=function(){G=Ri()},t}var hn=kl();const Wc=["script","iframe","object","embed","base","form"],$c=["srcdoc","formaction"];hn.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noreferrer")});const Gc=(e,t)=>hn.removed.length>0||t===""&&e.trim()!=="";function Yc(e){const t=hn.sanitize(e,{USE_PROFILES:{html:!0},FORBID_TAGS:Wc,FORBID_ATTR:$c,ADD_ATTR:["target"]});return Gc(e,t)&&console.warn("Factorial Code forms: removed unsafe HTML while rendering authored content. Scripts, event handlers and javascript: URLs are not executed — use the onSuccess/onNextStep/onError callbacks for behaviour.",hn.removed),t}const Pi=({content:e})=>{const t=ut.useMemo(()=>Yc(e),[e]);return _.jsx("div",{dangerouslySetInnerHTML:{__html:t}})};function Xc(e){var R,O;const{id:t,children:n,displayLabel:r,rawErrors:i=[],errors:l,help:o,rawDescription:a,hidden:u,label:s,required:c,schema:f,uiSchema:m,registry:h}=e,T=q.getUiOptions(m),E=q.getTemplate("WrapIfAdditionalTemplate",h,T);if(u)return _.jsx("div",{className:"rjsf-f0-hidden",children:n});const I=T.widget==="checkbox"||f.type==="boolean",b=r&&!I&&!!s;return _.jsxs(_.Fragment,{children:[((R=f==null?void 0:f.rawHtml)==null?void 0:R.before)&&_.jsx(Pi,{content:f.rawHtml.before}),_.jsx(E,{...e,children:_.jsxs("div",{className:"rjsf-f0-field",children:[b&&_.jsxs("label",{className:"rjsf-f0-label",htmlFor:t,children:[_.jsx(Ct,{components:{p:"span"},children:s}),c&&_.jsx("span",{"aria-hidden":"true",children:" *"})]}),n,r&&a&&_.jsx("div",{className:"rjsf-f0-help",children:_.jsx(Ct,{children:a})}),i.length>0&&l,o]})}),((O=f==null?void 0:f.rawHtml)==null?void 0:O.after)&&_.jsx(Pi,{content:f.rawHtml.after})]})}function Tl(e){return ut.useCallback(t=>{t.preventDefault(),e==null||e(t)},[e])}function Yt({icon:e,label:t,variant:n="outline",disabled:r,onClick:i,id:l,registry:o,uiSchema:a,iconType:u,...s}){const c=Tl(i);return _.jsx(et.F0Button,{...s,"data-testid":l,label:t,hideLabel:!0,icon:e,size:"sm",variant:n,disabled:r,onClick:c})}function Kc(e){const{translateString:t}=e.registry;return _.jsx(Yt,{...e,icon:It.Files,label:t(q.TranslatableString.CopyButton)})}function Qc(e){const{translateString:t}=e.registry;return _.jsx(Yt,{...e,icon:It.ArrowUp,label:t(q.TranslatableString.MoveUpButton)})}function Jc(e){const{translateString:t}=e.registry;return _.jsx(Yt,{...e,icon:It.ArrowDown,label:t(q.TranslatableString.MoveDownButton)})}function Zc(e){const{translateString:t}=e.registry;return _.jsx(Yt,{...e,icon:It.Delete,variant:"critical",label:t(q.TranslatableString.RemoveButton)})}function ef(e){const{translateString:t}=e.registry;return _.jsx(Yt,{...e,icon:It.Delete,variant:"ghost",label:t(q.TranslatableString.ClearButton)})}function tf(e){const{translateString:t}=e.registry,{disabled:n,onClick:r,id:i}=e,l=Tl(r),o=t(q.TranslatableString.AddItemButton);return _.jsx(et.F0Button,{"data-testid":i,label:o,icon:It.Add,size:"sm",variant:"outline",disabled:n,onClick:l})}function nf({uiSchema:e}){const{submitText:t,norender:n,props:r={}}=q.getSubmitButtonOptions(e);return n?null:_.jsx("div",{className:"rjsf-f0-submit",children:_.jsx(et.F0Button,{label:t,variant:"default",disabled:r.disabled})})}const rf={SubmitButton:nf,AddButton:tf,CopyButton:Kc,MoveDownButton:Jc,MoveUpButton:Qc,RemoveButton:Zc,ClearButton:ef};function lf({id:e,title:t,uiSchema:n,optionalDataControl:r}){const l=q.getUiOptions(n).title||t;return l?_.jsxs("div",{id:e,className:"rjsf-f0-title",children:[_.jsx(et.F0Heading,{as:"h5",variant:"heading",content:l}),r]}):null}function of({id:e,description:t}){return t?_.jsx("div",{id:e,className:"rjsf-f0-section-description",children:typeof t=="string"?_.jsx(Ct,{children:t}):t}):null}function af({errors:e=[],fieldPathId:t}){const n=e.filter(Boolean);return n.length<2?null:_.jsx("ul",{className:"rjsf-f0-errors",id:q.errorId(t),children:n.map((r,i)=>_.jsx("li",{children:typeof r=="string"?_.jsx(Ct,{components:{p:"span"},children:r}):r},`${r}-${i}`))})}function sf({fieldPathId:e,help:t}){return t?_.jsx("div",{className:"rjsf-f0-help",id:q.helpId(e),children:t}):null}function uf({errors:e,registry:t}){const{translateString:n}=t;return _.jsx("div",{className:"rjsf-f0-error-list",children:_.jsx(et.F0Alert,{variant:"critical",title:n(q.TranslatableString.ErrorsLabel),description:e.map(r=>r.stack).join(`
17
+ `)})})}function cf(e){const{id:t,classNames:n,style:r,disabled:i,label:l,onKeyRename:o,onRemoveProperty:a,readonly:u,required:s,schema:c,children:f,uiSchema:m,registry:h}=e,{templates:T,translateString:E}=h,{RemoveButton:I}=T.ButtonTemplates,[b,R]=ut.useState(l);if(!(q.ADDITIONAL_PROPERTY_FLAG in c))return _.jsx("div",{className:n,style:r,children:f});const O=`${t}-key`;return _.jsx("div",{className:n,style:r,children:_.jsxs("div",{className:"rjsf-f0-additional-property",children:[_.jsx(et.F0TextInput,{id:O,name:O,label:E(q.TranslatableString.KeyLabel,[l]),value:b,required:s,disabled:i||u,onChange:R,onBlur:u?void 0:()=>{b!==l&&o(b)}}),f,_.jsx(I,{disabled:i||u,onClick:a,uiSchema:m,registry:h})]})})}function ff(e){const{description:t,disabled:n,formData:r,fieldPathId:i,onAddProperty:l,optionalDataControl:o,properties:a,readonly:u,registry:s,required:c,schema:f,title:m,uiSchema:h}=e,T=q.getUiOptions(h),E=q.getTemplate("TitleFieldTemplate",s,T),I=q.getTemplate("DescriptionFieldTemplate",s,T),{AddButton:b}=s.templates.ButtonTemplates;if((f.oneOf||f.anyOf)&&!f.properties&&a.length===0)return null;const R=!u&&!n;return _.jsxs("div",{className:"rjsf-f0-object",children:[m&&_.jsx(E,{id:q.titleId(i),title:m,required:c,schema:f,uiSchema:h,registry:s,optionalDataControl:R?o:void 0}),t&&_.jsx(I,{id:q.descriptionId(i),description:t,schema:f,uiSchema:h,registry:s}),R?void 0:o,a.map(O=>_.jsx("div",{className:O.hidden?"rjsf-f0-hidden":"rjsf-f0-row",children:O.content},O.name)),q.canExpand(f,h,r)&&_.jsx("div",{className:"rjsf-f0-add",children:_.jsx(b,{id:q.buttonId(i,"add"),onClick:l,disabled:n||u,uiSchema:h,registry:s})})]})}function pf(e){const{canAdd:t,disabled:n,fieldPathId:r,items:i,optionalDataControl:l,onAddClick:o,readonly:a,registry:u,required:s,schema:c,title:f,uiSchema:m}=e,h=q.getUiOptions(m),T=q.getTemplate("ArrayFieldTitleTemplate",u,h),E=q.getTemplate("ArrayFieldDescriptionTemplate",u,h),{AddButton:I}=u.templates.ButtonTemplates,b=!a&&!n;return _.jsxs("div",{className:"rjsf-f0-array",children:[_.jsx(T,{fieldPathId:r,title:h.title||f,required:s,schema:c,uiSchema:m,registry:u,optionalDataControl:b?l:void 0}),_.jsx(E,{fieldPathId:r,description:h.description||c.description,schema:c,uiSchema:m,registry:u}),b?void 0:l,_.jsx("div",{className:"rjsf-f0-array-items",children:i}),t&&_.jsx("div",{className:"rjsf-f0-add",children:_.jsx(I,{id:q.buttonId(r,"add"),onClick:o,disabled:n||a,uiSchema:m,registry:u})})]})}function hf(e){const{children:t,buttonsProps:n,hasToolbar:r,registry:i,schema:l,uiSchema:o}=e,a=q.getUiOptions(o),u=q.getTemplate("ArrayFieldItemButtonsTemplate",i,a),s=l.type==="object"||l.type==="array";return _.jsxs("div",{className:s?"rjsf-f0-array-item rjsf-f0-array-item-composite":"rjsf-f0-array-item",children:[_.jsx("div",{className:"rjsf-f0-array-item-content",children:t}),r&&_.jsx("div",{className:"rjsf-f0-array-item-toolbar",children:_.jsx(u,{...n})})]})}function mf(e){const{disabled:t,hasCopy:n,hasMoveDown:r,hasMoveUp:i,hasRemove:l,fieldPathId:o,onCopyItem:a,onRemoveItem:u,onMoveDownItem:s,onMoveUpItem:c,readonly:f,registry:m,uiSchema:h}=e,{CopyButton:T,MoveDownButton:E,MoveUpButton:I,RemoveButton:b}=m.templates.ButtonTemplates,R={uiSchema:h,registry:m};return _.jsxs(_.Fragment,{children:[(i||r)&&_.jsx(I,{id:q.buttonId(o,"moveUp"),disabled:t||f||!i,onClick:c,...R}),(i||r)&&_.jsx(E,{id:q.buttonId(o,"moveDown"),disabled:t||f||!r,onClick:s,...R}),n&&_.jsx(T,{id:q.buttonId(o,"copy"),disabled:t||f,onClick:a,...R}),l&&_.jsx(b,{id:q.buttonId(o,"remove"),disabled:t||f,onClick:u,...R})]})}function df({children:e,className:t,column:n,...r}){return _.jsx("div",{className:t??(n?void 0:"rjsf-f0-grid"),...r,children:e})}function gf({selector:e,optionSchemaField:t}){return _.jsxs("div",{className:"rjsf-f0-multischema",children:[_.jsx("div",{className:"rjsf-f0-row",children:e}),t]})}function xn(e){return e?e.replace(/!?\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/[*_~`]/g,"").replace(/\s+/g," ").trim():""}function Sl(e){return!!e&&xn(e)!==e.trim()}function mt({field:e,toFieldValue:t,fromFieldValue:n,id:r,label:i,value:l,required:o,disabled:a,readonly:u,placeholder:s,rawErrors:c,onChange:f,onBlur:m}){const h=ut.useCallback(b=>f(n?n(b):b),[f,n]),T=ut.useCallback(()=>m(r,l),[m,r,l]),E=ut.useMemo(()=>({id:r,label:xn(i)||r,placeholder:s,helpText:void 0,...e}),[r,i,s,e]),[I]=c??[];return _.jsx(et.F0FormField,{field:E,value:t?t(l):l,onChange:h,onBlur:T,error:!!I,errorMessage:I,required:o,disabled:a||u,hideLabel:!0})}const Li=e=>{if(!e||typeof e!="string")return;const t=new Date(e);return Number.isNaN(t.getTime())?void 0:t},mn=e=>String(e).padStart(2,"0"),wl=e=>{if(!(!(e instanceof Date)||Number.isNaN(e.getTime())))return`${e.getFullYear()}-${mn(e.getMonth()+1)}-${mn(e.getDate())}`},yf=e=>{const t=wl(e);if(!(!t||!(e instanceof Date)))return`${t}T${mn(e.getHours())}:${mn(e.getMinutes())}`},xf={number:"number",integer:"number",range:"number",date:"date","datetime-local":"datetime",time:"time"};function bf(e){const{type:t,schema:n,options:r}=e,i=t||(n.type==="number"||n.type==="integer"?"number":"text"),l=xf[i]??"text";return l==="date"?_.jsx(mt,{...e,field:{type:"date"},toFieldValue:Li,fromFieldValue:wl}):l==="datetime"?_.jsx(mt,{...e,field:{type:"datetime"},toFieldValue:Li,fromFieldValue:yf}):l==="number"?_.jsx(mt,{...e,field:{type:"number",...n.minimum!==void 0&&{min:n.minimum},...n.maximum!==void 0&&{max:n.maximum},...n.type==="integer"&&{maxDecimals:0}},fromFieldValue:o=>o===""||o===null?void 0:o}):_.jsx(mt,{...e,field:{type:l},fromFieldValue:o=>o===""?r.emptyValue:o})}const kf=5;function Tf(e){const{options:t}=e;return _.jsx(mt,{...e,field:{type:"textarea",rows:t.rows||kf},fromFieldValue:n=>n===""?t.emptyValue:n})}const Sf=e=>(Array.isArray(e)?e:[]).map((t,n)=>({value:String(n),label:String(t.label)}));function wf(e){const{options:t,multiple:n,value:r,schema:i}=e,{enumOptions:l,enumDisabled:o}=t,a=Array.isArray(l)?l:[],u=f=>a.findIndex(m=>q.enumOptionsIsSelected(m.value,f)),s=ut.useCallback(f=>{if(n)return(Array.isArray(f)?f:[]).map(T=>u(T)).filter(T=>T>=0).map(String);const m=u(f);return m>=0?String(m):void 0},[n,a]),c=ut.useCallback(f=>{var m;return n?(Array.isArray(f)?f:[]).map(T=>{var E;return(E=a[Number(T)])==null?void 0:E.value}):f==null||f===""?t.emptyValue:(m=a[Number(f)])==null?void 0:m.value},[n,a,t.emptyValue]);return _.jsx(mt,{...e,field:{type:"select",options:Sf(l).filter((f,m)=>{var h;return!(Array.isArray(o)&&o.includes((h=a[m])==null?void 0:h.value))}),multiple:n,clearable:!i.default&&!e.required,showSearchBox:a.length>8},value:r,toFieldValue:s,fromFieldValue:c})}function Ef({id:e,value:t,label:n,hideLabel:r,disabled:i,readonly:l,onChange:o}){const a=!r&&Sl(n);return _.jsxs("div",{className:"rjsf-f0-checkbox",children:[_.jsx(et.F0Checkbox,{id:e,title:xn(n),checked:t===!0,hideLabel:r||a,disabled:i||l,onCheckedChange:u=>o(u===!0)}),a&&_.jsx("label",{className:"rjsf-f0-checkbox-label",htmlFor:e,children:_.jsx(Ct,{components:{p:"span"},children:n})})]})}function Af({id:e,disabled:t,readonly:n,options:r,value:i,onChange:l}){const{enumOptions:o,enumDisabled:a}=r,u=Array.isArray(i)?i:[];return _.jsx("div",{className:"rjsf-f0-checkboxes",children:(Array.isArray(o)?o:[]).map((s,c)=>{const f=q.enumOptionsIsSelected(s.value,u),m=Array.isArray(a)&&a.includes(s.value),h=q.optionId(e,c),T=String(s.label),E=Sl(T);return _.jsxs("div",{className:"rjsf-f0-checkbox",children:[_.jsx(et.F0Checkbox,{id:h,title:xn(T),checked:f,hideLabel:E,disabled:t||n||m,onCheckedChange:I=>l(I===!0?q.enumOptionsSelectValue(c,u,o):q.enumOptionsDeselectValue(c,u,o))}),E&&_.jsx("label",{className:"rjsf-f0-checkbox-label",htmlFor:h,children:_.jsx(Ct,{components:{p:"span"},children:T})})]},String(s.value))})})}function _f(e){const{options:t,required:n}=e,r=Array.isArray(t.enumOptions)?t.enumOptions:[];return _.jsx(mt,{...e,field:{type:"cardSelect",grouped:!0,options:r.map((i,l)=>{var o;return{value:String(l),label:String(i.label),...(o=i.schema)!=null&&o.description?{description:String(i.schema.description)}:{}}})},toFieldValue:i=>{const l=r.findIndex(o=>q.enumOptionsIsSelected(o.value,i));return l>=0?String(l):void 0},fromFieldValue:i=>{var l;return i===void 0||i===""?t.emptyValue:(l=r[Number(i)])==null?void 0:l.value},required:n})}const El={ArrayFieldItemButtonsTemplate:mf,ArrayFieldItemTemplate:hf,ArrayFieldTemplate:pf,BaseInputTemplate:bf,ButtonTemplates:rf,DescriptionFieldTemplate:of,ErrorListTemplate:uf,FieldErrorTemplate:af,FieldHelpTemplate:sf,FieldTemplate:Xc,GridTemplate:df,MultiSchemaFieldTemplate:gf,ObjectFieldTemplate:ff,TitleFieldTemplate:lf,WrapIfAdditionalTemplate:cf},Al={CheckboxWidget:Ef,CheckboxesWidget:Af,RadioWidget:_f,SelectWidget:wf,TextareaWidget:Tf};function br(){return{templates:El,widgets:Al}}const _l=br();function Cf(){return vi.withTheme(br())}const If=vi.withTheme(_l);exports.Form=If;exports.Templates=El;exports.Theme=_l;exports.Widgets=Al;exports.generateForm=Cf;exports.generateTheme=br;
18
+ //# sourceMappingURL=rjsf-f0.cjs.js.map