You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
112 KiB
14 lines
112 KiB
(globalThis.utooChunk_ant_design_pro||(globalThis.utooChunk_ant_design_pro=[])).push(["object"==typeof document?document.currentScript:void 0,188702,(e,t,n)=>{"use strict";var r,i;Object.defineProperty(n,"__esModule",{value:!0}),n.Doctype=n.CDATA=n.Tag=n.Style=n.Script=n.Comment=n.Directive=n.Text=n.Root=n.isTag=n.ElementType=void 0,(i=r=n.ElementType||(n.ElementType={})).Root="root",i.Text="text",i.Directive="directive",i.Comment="comment",i.Script="script",i.Style="style",i.Tag="tag",i.CDATA="cdata",i.Doctype="doctype",n.isTag=function(e){return e.type===r.Tag||e.type===r.Script||e.type===r.Style},n.Root=r.Root,n.Text=r.Text,n.Directive=r.Directive,n.Comment=r.Comment,n.Script=r.Script,n.Style=r.Style,n.Tag=r.Tag,n.CDATA=r.CDATA,n.Doctype=r.Doctype},146234,(e,t,n)=>{"use strict";var r,i=e.e&&e.e.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=e.e&&e.e.__assign||function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(n,"__esModule",{value:!0}),n.cloneNode=n.hasChildren=n.isDocument=n.isDirective=n.isComment=n.isText=n.isCDATA=n.isTag=n.Element=n.Document=n.CDATA=n.NodeWithChildren=n.ProcessingInstruction=n.Comment=n.Text=n.DataNode=n.Node=void 0;var o=e.r(188702),l=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),E(this,e)},e}();n.Node=l;var s=function(e){function t(t){var n=e.call(this)||this;return n.data=t,n}return i(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(l);n.DataNode=s;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=o.ElementType.Text,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(s);n.Text=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=o.ElementType.Comment,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(s);n.Comment=u;var p=function(e){function t(t,n){var r=e.call(this,n)||this;return r.name=t,r.type=o.ElementType.Directive,r}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(s);n.ProcessingInstruction=p;var d=function(e){function t(t){var n=e.call(this)||this;return n.children=t,n}return i(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!=(e=this.children[0])?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(l);n.NodeWithChildren=d;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=o.ElementType.CDATA,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(d);n.CDATA=h;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=o.ElementType.Root,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(d);n.Document=f;var m=function(e){function t(t,n,r,i){void 0===r&&(r=[]),void 0===i&&(i="script"===t?o.ElementType.Script:"style"===t?o.ElementType.Style:o.ElementType.Tag);var a=e.call(this,r)||this;return a.name=t,a.attribs=n,a.type=i,a}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map(function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null==(n=e["x-attribsNamespace"])?void 0:n[t],prefix:null==(r=e["x-attribsPrefix"])?void 0:r[t]}})},enumerable:!1,configurable:!0}),t}(d);function g(e){return(0,o.isTag)(e)}function k(e){return e.type===o.ElementType.CDATA}function b(e){return e.type===o.ElementType.Text}function y(e){return e.type===o.ElementType.Comment}function x(e){return e.type===o.ElementType.Directive}function T(e){return e.type===o.ElementType.Root}function E(e,t){if(void 0===t&&(t=!1),b(e))n=new c(e.data);else if(y(e))n=new u(e.data);else if(g(e)){var n,r=t?w(e.children):[],i=new m(e.name,a({},e.attribs),r);r.forEach(function(e){return e.parent=i}),null!=e.namespace&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=a({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=a({},e["x-attribsPrefix"])),n=i}else if(k(e)){var r=t?w(e.children):[],o=new h(r);r.forEach(function(e){return e.parent=o}),n=o}else if(T(e)){var r=t?w(e.children):[],l=new f(r);r.forEach(function(e){return e.parent=l}),e["x-mode"]&&(l["x-mode"]=e["x-mode"]),n=l}else if(x(e)){var s=new p(e.name,e.data);null!=e["x-name"]&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),n=s}else throw Error("Not implemented yet: ".concat(e.type));return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function w(e){for(var t=e.map(function(e){return E(e,!0)}),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}n.Element=m,n.isTag=g,n.isCDATA=k,n.isText=b,n.isComment=y,n.isDirective=x,n.isDocument=T,n.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},n.cloneNode=E},207435,(e,t,n)=>{"use strict";var r=e.e&&e.e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=e.e&&e.e.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.DomHandler=void 0;var a=e.r(188702),o=e.r(146234);i(e.r(146234),n);var l={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function e(e,t,n){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=l),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:l,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?a.ElementType.Tag:void 0,r=new o.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===a.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new o.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===a.ElementType.Comment){this.lastNode.data+=e;return}var t=new o.Comment(e);this.addNode(t),this.lastNode=t},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new o.Text(""),t=new o.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new o.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();n.DomHandler=s,n.default=s},817971,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CARRIAGE_RETURN_PLACEHOLDER_REGEX=n.CARRIAGE_RETURN_PLACEHOLDER=n.CARRIAGE_RETURN_REGEX=n.CARRIAGE_RETURN=n.CASE_SENSITIVE_TAG_NAMES_MAP=n.CASE_SENSITIVE_TAG_NAMES=void 0,n.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],n.CASE_SENSITIVE_TAG_NAMES_MAP=n.CASE_SENSITIVE_TAG_NAMES.reduce(function(e,t){return e[t.toLowerCase()]=t,e},{}),n.CARRIAGE_RETURN="\r",n.CARRIAGE_RETURN_REGEX=RegExp(n.CARRIAGE_RETURN,"g"),n.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now().toString(),"__"),n.CARRIAGE_RETURN_PLACEHOLDER_REGEX=RegExp(n.CARRIAGE_RETURN_PLACEHOLDER,"g")},460067,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.formatAttributes=a,n.hasOpenTag=function(e,t){var n="<"+t,r=e.toLowerCase().indexOf(n);if(-1===r)return!1;var i=e[r+n.length];return">"===i||" "===i||" "===i||"\n"===i||"\r"===i||"/"===i},n.escapeSpecialCharacters=function(e){return e.replace(i.CARRIAGE_RETURN_REGEX,i.CARRIAGE_RETURN_PLACEHOLDER)},n.revertEscapedCharacters=o,n.formatDOM=function e(t,n,l){void 0===n&&(n=null);for(var s,c,u,p,d,h=[],f=0,m=t.length;f<m;f++){var g=t[f];switch(g.nodeType){case 1:var k=function(e){var t,n=(t=e=e.toLowerCase(),i.CASE_SENSITIVE_TAG_NAMES_MAP[t]);return n||e}(g.nodeName);(d=new r.Element(k,a(g.attributes))).children=e("template"===k?g.content.childNodes:g.childNodes,d);break;case 3:d=new r.Text(o(null!=(s=g.nodeValue)?s:""));break;case 8:d=new r.Comment(null!=(c=g.nodeValue)?c:"");break;default:continue}var b=null!=(u=h[f-1])?u:null;b&&(b.next=d),d.parent=n,d.prev=b,d.next=null,h.push(d)}return l&&((d=new r.ProcessingInstruction(l.substring(0,l.indexOf(" ")).toLowerCase(),l)).next=null!=(p=h[0])?p:null,d.parent=n,h.unshift(d),h[1]&&(h[1].prev=h[0])),h};var r=e.r(207435),i=e.r(817971);function a(e){for(var t={},n=0,r=e.length;n<r;n++){var i=e[n];t[i.name]=i.value}return t}function o(e){return e.replace(i.CARRIAGE_RETURN_PLACEHOLDER_REGEX,i.CARRIAGE_RETURN)}},991201,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){var t,n,p,d,h,f,g=s.exec(e=(0,i.escapeSpecialCharacters)(e)),k=null==(t=null==g?void 0:g[1])?void 0:t.toLowerCase();switch(k){case a:var b=u(e);if(!(0,i.hasOpenTag)(e,o)){var y=b.querySelector(o);null==(n=null==y?void 0:y.parentNode)||n.removeChild(y)}if(!(0,i.hasOpenTag)(e,l)){var y=b.querySelector(l);null==(p=null==y?void 0:y.parentNode)||p.removeChild(y)}return b.querySelectorAll(a);case o:case l:var x=c(e).querySelectorAll(k);if((0,i.hasOpenTag)(e,l)&&(0,i.hasOpenTag)(e,o))return null!=(h=null==(d=x[0].parentNode)?void 0:d.childNodes)?h:m();return x;default:if(r)return r(e);var y=c(e,l).querySelector(l);return null!=(f=null==y?void 0:y.childNodes)?f:m()}};var r,i=e.r(460067),a="html",o="head",l="body",s=/<([a-zA-Z]+[0-9]?)/,c=function(e,t){throw Error("This browser does not support `document.implementation.createHTMLDocument`")},u=function(e,t){throw Error("This browser does not support `DOMParser.prototype.parseFromString`")},p="object"==typeof window&&window.DOMParser;if("function"==typeof p){var d=new p;c=u=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var h=document.implementation.createHTMLDocument();c=function(e,t){if(t){var n=h.documentElement.querySelector(t);return n&&(n.innerHTML=e),h}return h.documentElement.innerHTML=e,h}}var f="object"==typeof document&&document.createElement("template");f&&f.content&&(r=function(e){return f.innerHTML=e,f.content.childNodes});var m=function(){return document.createDocumentFragment().childNodes}},572495,(e,t,n)=>{"use strict";var r=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){if("string"!=typeof e)throw TypeError("First argument must be a string");if(!e)return[];var t=o.exec(e),n=t?t[1]:void 0;return(0,a.formatDOM)((0,i.default)(e),null,n)};var i=r(e.r(991201)),a=e.r(460067),o=/<(![a-zA-Z\s]+)>/},207503,(e,t,n)=>{n.SAME=0,n.CAMELCASE=1,n.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},943708,(e,t,n)=>{"use strict";function r(e,t,n,r,i,a,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}let i={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(e=>{i[e]=new r(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([e,t])=>{i[e]=new r(e,1,!1,t,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(e=>{i[e]=new r(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(e=>{i[e]=new r(e,2,!1,e,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(e=>{i[e]=new r(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(e=>{i[e]=new r(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(e=>{i[e]=new r(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(e=>{i[e]=new r(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(e=>{i[e]=new r(e,5,!1,e.toLowerCase(),null,!1,!1)});let a=/[\-\:]([a-z])/g,o=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(e=>{let t=e.replace(a,o);i[t]=new r(t,1,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(e=>{let t=e.replace(a,o);i[t]=new r(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(e=>{let t=e.replace(a,o);i[t]=new r(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(e=>{i[e]=new r(e,1,!1,e.toLowerCase(),null,!1,!1)}),i.xlinkHref=new r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(e=>{i[e]=new r(e,1,!1,e.toLowerCase(),null,!0,!0)});let{CAMELCASE:l,SAME:s,possibleStandardNames:c}=e.r(207503),u=RegExp.prototype.test.bind(RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),p=Object.keys(c).reduce((e,t)=>{let n=c[t];return n===s?e[t]=t:n===l?e[t.toLowerCase()]=t:e[t]=n,e},{});n.BOOLEAN=3,n.BOOLEANISH_STRING=2,n.NUMERIC=5,n.OVERLOADED_BOOLEAN=4,n.POSITIVE_NUMERIC=6,n.RESERVED=0,n.STRING=1,n.getPropertyInfo=function(e){return i.hasOwnProperty(e)?i[e]:null},n.isCustomAttribute=u,n.possibleStandardNames=p},403326,(e,t,n)=>{"use strict";var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,a=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,u=/^\s+|\s+$/g;function p(e){return e?e.replace(u,""):""}t.exports=function(e,t){if("string"!=typeof e)throw TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,u=1;function d(e){var t=e.match(i);t&&(n+=t.length);var r=e.lastIndexOf("\n");u=~r?e.length-r:u+e.length}function h(){var e={line:n,column:u};return function(t){return t.position=new f(e),g(a),t}}function f(e){this.start=e,this.end={line:n,column:u},this.source=t.source}function m(r){var i=Error(t.source+":"+n+":"+u+": "+r);if(i.reason=r,i.filename=t.source,i.line=n,i.column=u,i.source=e,t.silent);else throw i}function g(t){var n=t.exec(e);if(n){var r=n[0];return d(r),e=e.slice(r.length),n}}function k(e){var t;for(e=e||[];t=b();)!1!==t&&e.push(t);return e}function b(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;""!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return m("End of comment missing");var r=e.slice(2,n-2);return u+=2,d(r),e=e.slice(n),u+=2,t({type:"comment",comment:r})}}f.prototype.content=e,g(a);var y,x=[];for(k(x);y=function(){var e=h(),t=g(o);if(t){if(b(),!g(l))return m("property missing ':'");var n=g(s),i=e({type:"declaration",property:p(t[0].replace(r,"")),value:n?p(n[0].replace(r,"")):""});return g(c),i}}();)!1!==y&&(x.push(y),k(x));return x}},379805,(e,t,n)=>{"use strict";var r=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;let r=(0,i.default)(e),a="function"==typeof t;return r.forEach(e=>{if("declaration"!==e.type)return;let{property:r,value:i}=e;a?t(r,i,e):i&&((n=n||{})[r]=i)}),n};let i=r(e.r(403326))},341847,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.camelCase=void 0;var r=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,a=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},c=function(e,t){return"".concat(t,"-")};n.camelCase=function(e,t){var n;return(void 0===t&&(t={}),!(n=e)||a.test(n)||r.test(n))?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(l,c):e.replace(o,c)).replace(i,s))}},974224,(e,t,n)=>{"use strict";var r=(e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(e.r(379805)),i=e.r(341847);function a(e,t){var n={};return e&&"string"==typeof e&&(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}a.default=a,t.exports=a},985641,(e,t,n)=>{"use strict";var r=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.returnFirstArg=n.canTextBeChildOfNode=n.ELEMENTS_WITH_NO_TEXT_CHILDREN=n.PRESERVE_CUSTOM_ATTRIBUTES=void 0,n.isCustomComponent=function(e,t){return e.includes("-")?!o.has(e):!!(t&&"string"==typeof t.is)},n.setStyleProp=function(e,t){if("string"==typeof e){if(!e.trim()){t.style={};return}try{t.style=(0,a.default)(e,l)}catch(e){t.style={}}}};var i=e.r(191788),a=r(e.r(974224)),o=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),l={reactCompat:!0};n.PRESERVE_CUSTOM_ATTRIBUTES=Number(i.version.split(".")[0])>=16,n.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),n.canTextBeChildOfNode=function(e){return!n.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},n.returnFirstArg=function(e){return e}},30252,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){void 0===e&&(e={});var n={},c=!!(e.type&&l[e.type]);for(var u in e){var p=e[u];if((0,r.isCustomAttribute)(u)){n[u]=p;continue}var d=u.toLowerCase(),h=s(d);if(h){var f=(0,r.getPropertyInfo)(h);switch(a.includes(h)&&o.includes(t)&&!c&&(h=s("default"+d)),n[h]=p,null==f?void 0:f.type){case r.BOOLEAN:n[h]=!0;break;case r.OVERLOADED_BOOLEAN:""===p&&(n[h]=!0)}continue}i.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=p)}return(0,i.setStyleProp)(e.style,n),n};var r=e.r(943708),i=e.r(985641),a=["checked","value"],o=["input","select","textarea"],l={reset:!0,submit:!0};function s(e){return r.possibleStandardNames[e]}},833007,(e,t,n)=>{"use strict";var r=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.default=function e(t,n){void 0===n&&(n={});for(var r,i,s,c,u,p=[],d="function"==typeof n.replace,h=null!=(r=n.transform)?r:o.returnFirstArg,f=null!=(i=n.library)?i:l,m=f.cloneElement,g=f.createElement,k=f.isValidElement,b=t.length,y=0;y<b;y++){var x,T=t[y];if(d){var E=null==(s=n.replace)?void 0:s.call(n,T,y);if(k(E)){b>1&&(E=m(E,{key:null!=(c=E.key)?c:y})),p.push(h(E,T,y));continue}}if("text"===T.type){var w=!T.data.trim().length;if(w&&T.parent&&!(0,o.canTextBeChildOfNode)(T.parent)||n.trim&&w)continue;p.push(h(T.data,T,y));continue}var v={};(x=T,o.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===x.type&&(0,o.isCustomComponent)(x.name,x.attribs))?((0,o.setStyleProp)(T.attribs.style,T.attribs),v=T.attribs):T.attribs&&(v=(0,a.default)(T.attribs,T.name));var A=void 0;switch(T.type){case"script":case"style":T.children[0]&&(v.dangerouslySetInnerHTML={__html:T.children[0].data});break;case"tag":"textarea"===T.name&&T.children[0]?v.defaultValue=T.children[0].data:(null==(u=T.children)?void 0:u.length)&&(A=e(T.children,n));break;default:continue}b>1&&(v.key=y),p.push(h(g(T.name,v,A),T,y))}return 1===p.length?p[0]:p};var i=e.r(191788),a=r(e.r(30252)),o=e.r(985641),l={cloneElement:i.cloneElement,createElement:i.createElement,isValidElement:i.isValidElement}},630,(e,t,n)=>{"use strict";var r=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.htmlToDOM=n.domToReact=n.attributesToProps=n.Text=n.ProcessingInstruction=n.Element=n.Comment=void 0,n.default=function(e,t){var n;if("string"!=typeof e)throw TypeError("First argument must be a string");return e?(0,a.default)((0,i.default)(e,null!=(n=null==t?void 0:t.htmlparser2)?n:l),t):[]};var i=r(e.r(572495));n.htmlToDOM=i.default,n.attributesToProps=r(e.r(30252)).default;var a=r(e.r(833007));n.domToReact=a.default;var o=e.r(207435);Object.defineProperty(n,"Comment",{enumerable:!0,get:function(){return o.Comment}}),Object.defineProperty(n,"Element",{enumerable:!0,get:function(){return o.Element}}),Object.defineProperty(n,"ProcessingInstruction",{enumerable:!0,get:function(){return o.ProcessingInstruction}}),Object.defineProperty(n,"Text",{enumerable:!0,get:function(){return o.Text}});var l={lowerCaseAttributeNames:!1}},202601,568160,e=>{"use strict";var t,n,r=e.i(56206),i=e.i(191788);function a(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var o=a(),l={exec:()=>null};function s(e,t=""){let n="string"==typeof e?e:e.source,r={replace:(e,t)=>{let i="string"==typeof t?t:t.source;return i=i.replace(c.caret,"$1"),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var c={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},u=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,p=/(?:[*+-]|\d{1,9}[.)])/,d=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,h=s(d).replace(/bull/g,p).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),f=s(d).replace(/bull/g,p).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),m=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,g=/(?!\s*\])(?:\\.|[^\[\]\\])+/,k=s(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",g).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),b=s(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,p).getRegex(),y="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",x=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,T=s("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",x).replace("tag",y).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),E=s(m).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",y).getRegex(),w={blockquote:s(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",E).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:k,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:u,html:T,lheading:h,list:b,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:E,table:l,text:/^[^\n]+/},v=s("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",y).getRegex(),A={...w,lheading:f,table:v,paragraph:s(m).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",v).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",y).getRegex()},S={...w,html:s("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",x).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:l,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:s(m).replace("hr",u).replace("heading"," *#{1,6} *[^\n]").replace("lheading",h).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},_=/^( {2,}|\\)\n(?!\s*$)/,R=/[\p{P}\p{S}]/u,C=/[\s\p{P}\p{S}]/u,N=/[^\s\p{P}\p{S}]/u,I=s(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,C).getRegex(),O=/(?!~)[\p{P}\p{S}]/u,D=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,L=s(D,"u").replace(/punct/g,R).getRegex(),P=s(D,"u").replace(/punct/g,O).getRegex(),M="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",z=s(M,"gu").replace(/notPunctSpace/g,N).replace(/punctSpace/g,C).replace(/punct/g,R).getRegex(),$=s(M,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,O).getRegex(),F=s("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,N).replace(/punctSpace/g,C).replace(/punct/g,R).getRegex(),H=s(/\\(punct)/,"gu").replace(/punct/g,R).getRegex(),j=s(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),B=s(x).replace("(?:-->|$)","-->").getRegex(),U=s("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",B).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),G=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,W=s(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",G).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),q=s(/^!?\[(label)\]\[(ref)\]/).replace("label",G).replace("ref",g).getRegex(),X=s(/^!?\[(ref)\](?:\[\])?/).replace("ref",g).getRegex(),V=s("reflink|nolink(?!\\()","g").replace("reflink",q).replace("nolink",X).getRegex(),Y={_backpedal:l,anyPunctuation:H,autolink:j,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:_,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:l,emStrongLDelim:L,emStrongRDelimAst:z,emStrongRDelimUnd:F,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:W,nolink:X,punctuation:I,reflink:q,reflinkSearch:V,tag:U,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:l},Z={...Y,link:s(/^!?\[(label)\]\((.*?)\)/).replace("label",G).getRegex(),reflink:s(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",G).getRegex()},Q={...Y,emStrongRDelimAst:$,emStrongLDelim:P,url:s(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},K={...Q,br:s(_).replace("{2,}","*").getRegex(),text:s(Q.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},J={normal:w,gfm:A,pedantic:S},ee={normal:Y,gfm:Q,breaks:K,pedantic:Z},et={"&":"&","<":"<",">":">",'"':""","'":"'"},en=e=>et[e];function er(e,t){if(t){if(c.escapeTest.test(e))return e.replace(c.escapeReplace,en)}else if(c.escapeTestNoEncode.test(e))return e.replace(c.escapeReplaceNoEncode,en);return e}function ei(e){try{e=encodeURI(e).replace(c.percentDecode,"%")}catch{return null}return e}function ea(e,t){let n=e.replace(c.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(c.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(c.slashPipe,"|");return n}function eo(e,t,n){let r=e.length;if(0===r)return"";let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a!==t||n)if(a!==t&&n)i++;else break;else i++}return e.slice(0,r-i)}function el(e,t,n,r,i){let a=t.href,o=t.title||null,l=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let s={type:"!"===e[0].charAt(0)?"image":"link",raw:n,href:a,title:o,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,s}var es=class{options;rules;lexer;constructor(e){this.options=e||o}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:eo(e,"\n")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=function(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(null===r)return t;let i=r[1];return t.split("\n").map(e=>{let t=e.match(n.other.beginningSpace);if(null===t)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=eo(e,"#");this.options.pedantic?e=t.trim():(!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:eo(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=eo(t[0],"\n").split("\n"),n="",r="",i=[];for(;e.length>0;){let t,a=!1,o=[];for(t=0;t<e.length;t++)if(this.rules.other.blockquoteStart.test(e[t]))o.push(e[t]),a=!0;else if(a)break;else o.push(e[t]);e=e.slice(t);let l=o.join("\n"),s=l.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
${l}`:l,r=r?`${r}
|
|
${s}`:s;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(s,i,!0),this.lexer.state.top=c,0===e.length)break;let u=i.at(-1);if(u?.type==="code")break;if(u?.type==="blockquote"){let t=u.raw+"\n"+e.join("\n"),a=this.blockquote(t);i[i.length-1]=a,n=n.substring(0,n.length-u.raw.length)+a.raw,r=r.substring(0,r.length-u.text.length)+a.text;break}if(u?.type==="list"){let t=u.raw+"\n"+e.join("\n"),a=this.list(t);i[i.length-1]=a,n=n.substring(0,n.length-u.raw.length)+a.raw,r=r.substring(0,r.length-u.raw.length)+a.raw,e=t.substring(i.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n,r=!1,l="",s="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;l=t[0],e=e.substring(l.length);let c=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),u=e.split("\n",1)[0],p=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):p?d=t[1].length+1:(d=(d=t[2].search(this.rules.other.nonSpaceChar))>4?1:d,s=c.slice(d),d+=t[1].length),p&&this.rules.other.blankLine.test(u)&&(l+=u+"\n",e=e.substring(u.length+1),r=!0),!r){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),r=this.rules.other.fencesBeginRegex(d),i=this.rules.other.headingBeginRegex(d),a=this.rules.other.htmlBeginRegex(d);for(;e;){let o,h=e.split("\n",1)[0];if(u=h,o=this.options.pedantic?u=u.replace(this.rules.other.listReplaceNesting," "):u.replace(this.rules.other.tabCharGlobal," "),r.test(u)||i.test(u)||a.test(u)||t.test(u)||n.test(u))break;if(o.search(this.rules.other.nonSpaceChar)>=d||!u.trim())s+="\n"+o.slice(d);else{if(p||c.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||r.test(c)||i.test(c)||n.test(c))break;s+="\n"+u}p||u.trim()||(p=!0),l+=h+"\n",e=e.substring(h.length+1),c=o.slice(d)}}!i.loose&&(o?i.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(o=!0));let h=null;this.options.gfm&&(h=this.rules.other.listIsTask.exec(s))&&(n="[ ] "!==h[0],s=s.replace(this.rules.other.listReplaceTask,"")),i.items.push({type:"list_item",raw:l,task:!!h,checked:n,loose:!1,text:s,tokens:[]}),i.raw+=l}let l=i.items.at(-1);if(!l)return;l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd(),i.raw=i.raw.trimEnd();for(let e=0;e<i.items.length;e++)if(this.lexer.state.top=!1,i.items[e].tokens=this.lexer.blockTokens(i.items[e].text,[]),!i.loose){let t=i.items[e].tokens.filter(e=>"space"===e.type);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}if(i.loose)for(let e=0;e<i.items.length;e++)i.items[e].loose=!0;return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=ea(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push("right"):this.rules.other.tableAlignCenter.test(e)?a.align.push("center"):this.rules.other.tableAlignLeft.test(e)?a.align.push("left"):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(ea(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=eo(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let e=function(e){if(-1===e.indexOf(")"))return -1;let t=0;for(let n=0;n<e.length;n++)if("\\"===e[n])n++;else if("("===e[n])t++;else if(")"===e[n]&&--t<0)return n;return t>0?-2:-1}(t[2]);if(-2===e)return;if(e>-1){let n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),el(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return el(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,l=0,s="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=s.exec(t));){if(!(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6]))continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}if((r[5]||r[6])&&n%3&&!((n+a)%3)){l+=a;continue}if((o-=a)>0)continue;a=Math.min(a,a+o+l);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=s.slice(1,-1);return{type:"em",raw:s,text:e,tokens:this.lexer.inlineTokens(e)}}let c=s.slice(2,-2);return{type:"strong",raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return n="@"===t[2]?"mailto:"+(e=t[1]):e=t[1],{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])n="mailto:"+(e=t[0]);else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(r!==t[0])e=t[0],n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},ec=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||o,this.options.tokenizer=this.options.tokenizer||new es,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={other:c,block:J.normal,inline:ee.normal};this.options.pedantic?(t.block=J.pedantic,t.inline=ee.pedantic):this.options.gfm&&(t.block=J.gfm,this.options.breaks?t.inline=ee.breaks:t.inline=ee.gfm),this.tokenizer.rules=t}static get rules(){return{block:J,inline:ee}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(c.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace(c.tabCharGlobal," ").replace(c.spaceLine,""));e;){let r;if(this.options.extensions?.block?.some(n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);1===r.raw.length&&void 0!==n?n.raw+="\n":t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type==="paragraph"||n?.type==="text"?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if((r=this.tokenizer.fences(e))||(r=this.tokenizer.heading(e))||(r=this.tokenizer.hr(e))||(r=this.tokenizer.blockquote(e))||(r=this.tokenizer.list(e))||(r=this.tokenizer.html(e))){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type==="paragraph"||n?.type==="text"?(n.raw+="\n"+r.raw,n.text+="\n"+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if((r=this.tokenizer.table(e))||(r=this.tokenizer.lheading(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t,n=1/0,r=e.slice(1);this.options.extensions.startBlock.forEach(e=>{"number"==typeof(t=e.call({lexer:this},r))&&t>=0&&(n=Math.min(n,t))}),n<1/0&&n>=0&&(i=e.substring(0,n+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type==="paragraph"?(a.raw+="\n"+r.raw,a.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type==="text"?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(n));)e.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.anyPunctuation.exec(n));)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(n));)n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,a="";for(;e;){let r;if(i||(a=""),i=!1,this.options.extensions?.inline?.some(n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))continue;if((r=this.tokenizer.escape(e))||(r=this.tokenizer.tag(e))||(r=this.tokenizer.link(e))){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);"text"===r.type&&n?.type==="text"?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if((r=this.tokenizer.emStrong(e,n,a))||(r=this.tokenizer.codespan(e))||(r=this.tokenizer.br(e))||(r=this.tokenizer.del(e))||(r=this.tokenizer.autolink(e))||!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let o=e;if(this.options.extensions?.startInline){let t,n=1/0,r=e.slice(1);this.options.extensions.startInline.forEach(e=>{"number"==typeof(t=e.call({lexer:this},r))&&t>=0&&(n=Math.min(n,t))}),n<1/0&&n>=0&&(o=e.substring(0,n+1))}if(r=this.tokenizer.inlineText(o)){e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(a=r.raw.slice(-1)),i=!0;let n=t.at(-1);n?.type==="text"?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return t}},eu=class{options;parser;constructor(e){this.options=e||o}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(c.notSpaceStart)?.[0],i=e.replace(c.endingNewline,"")+"\n";return r?'<pre><code class="language-'+er(r)+'">'+(n?i:er(i,!0))+"</code></pre>\n":"<pre><code>"+(n?i:er(i,!0))+"</code></pre>\n"}blockquote({tokens:e}){let t=this.parser.parse(e);return`<blockquote>
|
|
${t}</blockquote>
|
|
`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
`}hr(e){return"<hr>\n"}list(e){let t=e.ordered,n=e.start,r="";for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?"ol":"ul";return"<"+i+(t&&1!==n?' start="'+n+'"':"")+">\n"+r+"</"+i+">\n"}listitem(e){let t="";if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+er(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
|
|
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
`}table(e){let t="",n="";for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r="";for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n="";for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+r+"</table>\n"}tablerow({text:e}){return`<tr>
|
|
${e}</tr>
|
|
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${er(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=ei(e);if(null===i)return r;let a='<a href="'+(e=i)+'"';return t&&(a+=' title="'+er(t)+'"'),a+=">"+r+"</a>"}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=ei(e);if(null===i)return er(n);e=i;let a=`<img src="${e}" alt="${n}"`;return t&&(a+=` title="${er(t)}"`),a+=">"}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:er(e.text)}},ep=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},ed=class e{options;renderer;textRenderer;constructor(e){this.options=e||o,this.options.renderer=this.options.renderer||new eu,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ep}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e,t=!0){let n="";for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(i.type)){n+=e||"";continue}}switch(i.type){case"space":n+=this.renderer.space(i);continue;case"hr":n+=this.renderer.hr(i);continue;case"heading":n+=this.renderer.heading(i);continue;case"code":n+=this.renderer.code(i);continue;case"table":n+=this.renderer.table(i);continue;case"blockquote":n+=this.renderer.blockquote(i);continue;case"list":n+=this.renderer.list(i);continue;case"html":n+=this.renderer.html(i);continue;case"paragraph":n+=this.renderer.paragraph(i);continue;case"text":{let a=i,o=this.renderer.text(a);for(;r+1<e.length&&"text"===e[r+1].type;)a=e[++r],o+="\n"+this.renderer.text(a);t?n+=this.renderer.paragraph({type:"paragraph",raw:o,text:o,tokens:[{type:"text",raw:o,text:o,escaped:!0}]}):n+=o;continue}default:{let e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw Error(e)}}}return n}parseInline(e,t=this.renderer){let n="";for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=e||"";continue}}switch(i.type){case"escape":case"text":n+=t.text(i);break;case"html":n+=t.html(i);break;case"link":n+=t.link(i);break;case"image":n+=t.image(i);break;case"strong":n+=t.strong(i);break;case"em":n+=t.em(i);break;case"codespan":n+=t.codespan(i);break;case"br":n+=t.br(i);break;case"del":n+=t.del(i);break;default:{let e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw Error(e)}}}return n}},eh=class{options;block;constructor(e){this.options=e||o}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?ec.lex:ec.lexInline}provideParser(){return this.block?ed.parse:ed.parseInline}},ef=class{defaults=a();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ed;Renderer=eu;TextRenderer=ep;Lexer=ec;Tokenizer=es;Hooks=eh;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":for(let e of r.header)n=n.concat(this.walkTokens(e.tokens,t));for(let e of r.rows)for(let r of e)n=n.concat(this.walkTokens(r.tokens,t));break;case"list":n=n.concat(this.walkTokens(r.items,t));break;default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error("extension name required");if("renderer"in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw Error("extension level must be 'block' or 'inline'");let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new eu(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let r=e.renderer[n],i=t[n];t[n]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=i.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new es(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let r=e.tokenizer[n],i=t[n];t[n]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new eh;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let r=e.hooks[n],i=t[n];eh.passThroughHooks.has(n)?t[n]=e=>{if(this.defaults.async)return Promise.resolve(r.call(t,e)).then(e=>i.call(t,e));let n=r.call(t,e);return i.call(t,n)}:t[n]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ec.lex(e,t??this.defaults)}parser(e,t){return ed.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===r.async)return a(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==t)return a(Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return a(Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=e);let o=i.hooks?i.hooks.provideLexer():e?ec.lex:ec.lexInline,l=i.hooks?i.hooks.provideParser():e?ed.parse:ed.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(t):t).then(e=>o(e,i)).then(e=>i.hooks?i.hooks.processAllTokens(e):e).then(e=>i.walkTokens?Promise.all(this.walkTokens(e,i.walkTokens)).then(()=>e):e).then(e=>l(e,i)).then(e=>i.hooks?i.hooks.postprocess(e):e).catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let e=o(t,i);i.hooks&&(e=i.hooks.processAllTokens(e)),i.walkTokens&&this.walkTokens(e,i.walkTokens);let n=l(e,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){let e="<p>An error occurred:</p><pre>"+er(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},em=new ef;function eg(e,t){return em.parse(e,t)}eg.options=eg.setOptions=function(e){return em.setOptions(e),eg.defaults=em.defaults,o=eg.defaults,eg},eg.getDefaults=a,eg.defaults=o,eg.use=function(...e){return em.use(...e),eg.defaults=em.defaults,o=eg.defaults,eg},eg.walkTokens=function(e,t){return em.walkTokens(e,t)},eg.parseInline=em.parseInline,eg.Parser=ed,eg.parser=ed.parse,eg.Renderer=eu,eg.TextRenderer=ep,eg.Lexer=ec,eg.lexer=ec.lex,eg.Tokenizer=es,eg.Hooks=eh,eg.parse=eg,eg.options,eg.setOptions,eg.use,eg.walkTokens,eg.parseInline,ed.parse,ec.lex;let ek=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,eb=/[&<>"'/]/,ey=/^\S*/,ex=/\n$/,eT=/[&<>"'/]/g,eE=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,ew=/^ {0,3}(`{3,}|~{3,})([\s\S]*?)\n {0,3}\1[ \n\t]*$/,ev={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},eA=e=>ev[e];function eS(e,t){if(t){if(eb.test(e))return e.replace(eT,eA)}else if(ek.test(e))return e.replace(eE,eA);return e}let e_=Symbol("tailMarker");var eR=class{options;markdownInstance;injectTail=!1;constructor(e={}){this.options=e,this.markdownInstance=new ef,this.configureLinkRenderer(),this.configureParagraphRenderer(),this.configureCodeRenderer(),this.configureHtmlEscapeRenderer(),this.configureTailInjection(),this.markdownInstance.use(e.markedConfig||{})}configureHtmlEscapeRenderer(){this.options.escapeRawHtml&&this.markdownInstance.use({renderer:{html(e){let{raw:t="",text:n=""}=e;return eS(t||n,!0)}}})}configureLinkRenderer(){this.options.openLinksInNewTab&&this.markdownInstance.use({renderer:{link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=t?` title="${t}"`:"";return`<a href="${e}"${i} target="_blank" rel="noopener noreferrer">${r}</a>`}}})}configureParagraphRenderer(){let{paragraphTag:e}=this.options;e&&this.markdownInstance.use({renderer:{paragraph({tokens:t}){return`<${e}>${this.parser.parseInline(t)}</${e}>
|
|
`}}})}configureCodeRenderer(){this.markdownInstance.use({renderer:{code({text:e,raw:t,lang:n,escaped:r,codeBlockStyle:i}){let a=(n||"").trim(),o=a.match(ey)?.[0],l=`${e.replace(ex,"")}
|
|
`,s="indented"===i||ew.test(t)?"done":"loading",c=r?l:eS(l,!0),u=o?` class="language-${eS(o)}"`:"",p=` data-block="true" data-state="${s}"`+(a?` data-lang="${eS(a)}"`:"");return`<pre><code${p}${u}>${c}</code></pre>
|
|
`}}})}configureTailInjection(){let e=this;this.markdownInstance.use({hooks:{processAllTokens(t){if(!e.injectTail)return t;let n=e.findLastTextToken(t);return n&&(n[e_]=!0),t}},renderer:{text(e){let t="tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"text"in e?e.text:"";return e[e_]?`${t}<xmd-tail></xmd-tail>`:t}}})}protectCustomTags(e){let t=new Map,n=Object.keys(this.options.components||{});if(0===n.length)return{protected:e,placeholders:t};let r=0,i=n.map(e=>e.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),a=RegExp(`<(${i})(?:\\s[^>]*)?>`,"gi"),o=RegExp(`</(${i})>`,"gi"),l=[],s=a.exec(e);for(;null!==s;)l.push({index:s.index,type:"open",tagName:s[1].toLowerCase(),match:s[0]}),s=a.exec(e);for(o.lastIndex=0,s=o.exec(e);null!==s;)l.push({index:s.index,type:"close",tagName:s[1].toLowerCase(),match:s[0]}),s=o.exec(e);l.sort((e,t)=>e.index-t.index);let c=[],u=[],p=0;for(let n of l)if("open"===n.type)n.match.endsWith("/>")||c.push({tagName:n.tagName,start:n.index,openTag:n.match});else if("close"===n.type&&c.length>0&&c[c.length-1].tagName===n.tagName){let i=c.pop();if(0===c.length){let a=i.start,o=n.index+n.match.length,l=i.openTag,s=n.match,c=e.slice(a+l.length,n.index);if(p<a&&u.push(e.slice(p,a)),c.includes("\n\n")){let e=c.replace(/\n\n/g,()=>{let e=`__X_MD_PLACEHOLDER_${r++}__`;return t.set(e,"\n\n"),e});u.push(l+e+s)}else u.push(l+c+s);p=o}}return p<e.length&&u.push(e.slice(p)),{protected:u.join(""),placeholders:t}}restorePlaceholders(e,t){return 0===t.size?e:e.replace(/__X_MD_PLACEHOLDER_\d+__/g,e=>t.get(e)??e)}findLastNonEmptyToken(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if("list"===n.type&&"items"in n&&Array.isArray(n.items))for(let e=n.items.length-1;e>=0;e--){let t=n.items[e];if("tokens"in t&&t.tokens&&t.tokens.length>0){let e=this.findLastNonEmptyToken(t.tokens);if(e)return e}}if("tokens"in n&&n.tokens&&n.tokens.length>0){let e=this.findLastNonEmptyToken(n.tokens);if(e)return e}if("text"===n.type){if(("text"in n?n.text:"").trim())return n}else if("html"===n.type||"tag"===n.type)return n}return null}findLastTextToken(e){let t=this.findLastNonEmptyToken(e);return t&&"text"===t.type?t:null}parse(e,t){if(this.injectTail=t?.injectTail??!1,this.options.protectCustomTagNewlines){let{protected:t,placeholders:n}=this.protectCustomTags(e),r=this.markdownInstance.parse(t);return this.restorePlaceholders(r,n)}return this.markdownInstance.parse(e)}};let{entries:eC,setPrototypeOf:eN,isFrozen:eI,getPrototypeOf:eO,getOwnPropertyDescriptor:eD}=Object,{freeze:eL,seal:eP,create:eM}=Object,{apply:ez,construct:e$}="u">typeof Reflect&&Reflect;eL||(eL=function(e){return e}),eP||(eP=function(e){return e}),ez||(ez=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)}),e$||(e$=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});let eF=e5(Array.prototype.forEach),eH=e5(Array.prototype.lastIndexOf),ej=e5(Array.prototype.pop),eB=e5(Array.prototype.push),eU=e5(Array.prototype.splice),eG=Array.isArray,eW=e5(String.prototype.toLowerCase),eq=e5(String.prototype.toString),eX=e5(String.prototype.match),eV=e5(String.prototype.replace),eY=e5(String.prototype.indexOf),eZ=e5(String.prototype.trim),eQ=e5(Number.prototype.toString),eK=e5(Boolean.prototype.toString),eJ="u"<typeof BigInt?null:e5(BigInt.prototype.toString),e0="u"<typeof Symbol?null:e5(Symbol.prototype.toString),e1=e5(Object.prototype.hasOwnProperty),e2=e5(Object.prototype.toString),e3=e5(RegExp.prototype.test),e9=(t=TypeError,function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return e$(t,n)});function e5(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return ez(e,t,r)}}function e4(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:eW;if(eN&&eN(e,null),!eG(t))return e;let r=t.length;for(;r--;){let i=t[r];if("string"==typeof i){let e=n(i);e!==i&&(eI(t)||(t[r]=e),i=e)}e[i]=!0}return e}function e6(e){let t=eM(null);for(let[n,r]of eC(e))e1(e,n)&&(eG(r)?t[n]=function(e){for(let t=0;t<e.length;t++)e1(e,t)||(e[t]=null);return e}(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=e6(r):t[n]=r);return t}function e7(e,t){for(;null!==e;){let n=eD(e,t);if(n){if(n.get)return e5(n.get);if("function"==typeof n.value)return e5(n.value)}e=eO(e)}return function(){return null}}let e8=eL(["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"]),te=eL(["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"]),tt=eL(["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"]),tn=eL(["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"]),tr=eL(["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"]),ti=eL(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ta=eL(["#text"]),to=eL(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","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"]),tl=eL(["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","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-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"]),ts=eL(["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"]),tc=eL(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),tu=eP(/\{\{[\w\W]*|[\w\W]*\}\}/gm),tp=eP(/<%[\w\W]*|[\w\W]*%>/gm),td=eP(/\$\{[\w\W]*/gm),th=eP(/^data-[\-\w.\u00B7-\uFFFF]+$/),tf=eP(/^aria-[\-\w]+$/),tm=eP(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),tg=eP(/^(?:\w+script|data):/i),tk=eP(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),tb=eP(/^html$/i);var ty=Object.freeze({__proto__:null,ARIA_ATTR:tf,ATTR_WHITESPACE:tk,CUSTOM_ELEMENT:eP(/^[a-z][.\w]*(-[.\w]+)+$/i),DATA_ATTR:th,DOCTYPE_NAME:tb,ERB_EXPR:tp,IS_ALLOWED_URI:tm,IS_SCRIPT_OR_DATA:tg,MUSTACHE_EXPR:tu,TMPLIT_EXPR:td});let tx=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null,r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}},tT=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};var tE=function e(){let t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"u"<typeof window?null:window,r=t=>e(t);if(r.version="3.4.2",r.removed=[],!n||!n.document||9!==n.document.nodeType||!n.Element)return r.isSupported=!1,r;let{document:i}=n,a=i,o=a.currentScript,{DocumentFragment:l,HTMLTemplateElement:s,Node:c,Element:u,NodeFilter:p,NamedNodeMap:d=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:h,DOMParser:f,trustedTypes:m}=n,g=u.prototype,k=e7(g,"cloneNode"),b=e7(g,"remove"),y=e7(g,"nextSibling"),x=e7(g,"childNodes"),T=e7(g,"parentNode");if("function"==typeof s){let e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let E="",{implementation:w,createNodeIterator:v,createDocumentFragment:A,getElementsByTagName:S}=i,{importNode:_}=a,R=tT();r.isSupported="function"==typeof eC&&"function"==typeof T&&w&&void 0!==w.createHTMLDocument;let{MUSTACHE_EXPR:C,ERB_EXPR:N,TMPLIT_EXPR:I,DATA_ATTR:O,ARIA_ATTR:D,IS_SCRIPT_OR_DATA:L,ATTR_WHITESPACE:P,CUSTOM_ELEMENT:M}=ty,{IS_ALLOWED_URI:z}=ty,$=null,F=e4({},[...e8,...te,...tt,...tr,...ta]),H=null,j=e4({},[...to,...tl,...ts,...tc]),B=Object.seal(eM(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}})),U=null,G=null,W=Object.seal(eM(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),q=!0,X=!0,V=!1,Y=!0,Z=!1,Q=!0,K=!1,J=!1,ee=!1,et=!1,en=!1,er=!1,ei=!0,ea=!1,eo="user-content-",el=!0,es=!1,ec={},eu=null,ep=e4({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ed=null,eh=e4({},["audio","video","img","source","image","track"]),ef=null,em=e4({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),eg="http://www.w3.org/1998/Math/MathML",ek="http://www.w3.org/2000/svg",eb="http://www.w3.org/1999/xhtml",ey=eb,ex=!1,eT=null,eE=e4({},[eg,ek,eb],eq),ew=e4({},["mi","mo","mn","ms","mtext"]),ev=e4({},["annotation-xml"]),eA=e4({},["title","style","font","a","script"]),eS=null,e_=["application/xhtml+xml","text/html"],eR=null,eN=null,eI=i.createElement("form"),eO=function(e){return e instanceof RegExp||e instanceof Function},eD=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(eN&&eN===e)return;e&&"object"==typeof e||(e={}),e=e6(e),eR="application/xhtml+xml"===(eS=-1===e_.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE)?eq:eW,$=e1(e,"ALLOWED_TAGS")&&eG(e.ALLOWED_TAGS)?e4({},e.ALLOWED_TAGS,eR):F,H=e1(e,"ALLOWED_ATTR")&&eG(e.ALLOWED_ATTR)?e4({},e.ALLOWED_ATTR,eR):j,eT=e1(e,"ALLOWED_NAMESPACES")&&eG(e.ALLOWED_NAMESPACES)?e4({},e.ALLOWED_NAMESPACES,eq):eE,ef=e1(e,"ADD_URI_SAFE_ATTR")&&eG(e.ADD_URI_SAFE_ATTR)?e4(e6(em),e.ADD_URI_SAFE_ATTR,eR):em,ed=e1(e,"ADD_DATA_URI_TAGS")&&eG(e.ADD_DATA_URI_TAGS)?e4(e6(eh),e.ADD_DATA_URI_TAGS,eR):eh,eu=e1(e,"FORBID_CONTENTS")&&eG(e.FORBID_CONTENTS)?e4({},e.FORBID_CONTENTS,eR):ep,U=e1(e,"FORBID_TAGS")&&eG(e.FORBID_TAGS)?e4({},e.FORBID_TAGS,eR):e6({}),G=e1(e,"FORBID_ATTR")&&eG(e.FORBID_ATTR)?e4({},e.FORBID_ATTR,eR):e6({}),ec=!!e1(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?e6(e.USE_PROFILES):e.USE_PROFILES),q=!1!==e.ALLOW_ARIA_ATTR,X=!1!==e.ALLOW_DATA_ATTR,V=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Y=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Z=e.SAFE_FOR_TEMPLATES||!1,Q=!1!==e.SAFE_FOR_XML,K=e.WHOLE_DOCUMENT||!1,et=e.RETURN_DOM||!1,en=e.RETURN_DOM_FRAGMENT||!1,er=e.RETURN_TRUSTED_TYPE||!1,ee=e.FORCE_BODY||!1,ei=!1!==e.SANITIZE_DOM,ea=e.SANITIZE_NAMED_PROPS||!1,el=!1!==e.KEEP_CONTENT,es=e.IN_PLACE||!1,z=!function(e){try{return e3(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?tm:e.ALLOWED_URI_REGEXP,ey="string"==typeof e.NAMESPACE?e.NAMESPACE:eb,ew=e1(e,"MATHML_TEXT_INTEGRATION_POINTS")&&e.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof e.MATHML_TEXT_INTEGRATION_POINTS?e6(e.MATHML_TEXT_INTEGRATION_POINTS):e4({},["mi","mo","mn","ms","mtext"]),ev=e1(e,"HTML_INTEGRATION_POINTS")&&e.HTML_INTEGRATION_POINTS&&"object"==typeof e.HTML_INTEGRATION_POINTS?e6(e.HTML_INTEGRATION_POINTS):e4({},["annotation-xml"]);let n=e1(e,"CUSTOM_ELEMENT_HANDLING")&&e.CUSTOM_ELEMENT_HANDLING&&"object"==typeof e.CUSTOM_ELEMENT_HANDLING?e6(e.CUSTOM_ELEMENT_HANDLING):eM(null);if(B=eM(null),e1(n,"tagNameCheck")&&eO(n.tagNameCheck)&&(B.tagNameCheck=n.tagNameCheck),e1(n,"attributeNameCheck")&&eO(n.attributeNameCheck)&&(B.attributeNameCheck=n.attributeNameCheck),e1(n,"allowCustomizedBuiltInElements")&&"boolean"==typeof n.allowCustomizedBuiltInElements&&(B.allowCustomizedBuiltInElements=n.allowCustomizedBuiltInElements),Z&&(X=!1),en&&(et=!0),ec&&($=e4({},ta),H=eM(null),!0===ec.html&&(e4($,e8),e4(H,to)),!0===ec.svg&&(e4($,te),e4(H,tl),e4(H,tc)),!0===ec.svgFilters&&(e4($,tt),e4(H,tl),e4(H,tc)),!0===ec.mathMl&&(e4($,tr),e4(H,ts),e4(H,tc))),W.tagCheck=null,W.attributeCheck=null,e1(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?W.tagCheck=e.ADD_TAGS:eG(e.ADD_TAGS)&&($===F&&($=e6($)),e4($,e.ADD_TAGS,eR))),e1(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?W.attributeCheck=e.ADD_ATTR:eG(e.ADD_ATTR)&&(H===j&&(H=e6(H)),e4(H,e.ADD_ATTR,eR))),e1(e,"ADD_URI_SAFE_ATTR")&&eG(e.ADD_URI_SAFE_ATTR)&&e4(ef,e.ADD_URI_SAFE_ATTR,eR),e1(e,"FORBID_CONTENTS")&&eG(e.FORBID_CONTENTS)&&(eu===ep&&(eu=e6(eu)),e4(eu,e.FORBID_CONTENTS,eR)),e1(e,"ADD_FORBID_CONTENTS")&&eG(e.ADD_FORBID_CONTENTS)&&(eu===ep&&(eu=e6(eu)),e4(eu,e.ADD_FORBID_CONTENTS,eR)),el&&($["#text"]=!0),K&&e4($,["html","head","body"]),$.table&&(e4($,["tbody"]),delete U.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw e9('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw e9('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=(t=e.TRUSTED_TYPES_POLICY).createHTML("")}else void 0===t&&(t=tx(m,o)),null!==t&&"string"==typeof E&&(E=t.createHTML(""));eL&&eL(e),eN=e},eP=e4({},[...te,...tt,...tn]),ez=e4({},[...tr,...ti]),e$=function(e){let t=T(e);t&&t.tagName||(t={namespaceURI:ey,tagName:"template"});let n=eW(e.tagName),r=eW(t.tagName);return!!eT[e.namespaceURI]&&(e.namespaceURI===ek?t.namespaceURI===eb?"svg"===n:t.namespaceURI===eg?"svg"===n&&("annotation-xml"===r||ew[r]):!!eP[n]:e.namespaceURI===eg?t.namespaceURI===eb?"math"===n:t.namespaceURI===ek?"math"===n&&ev[r]:!!ez[n]:e.namespaceURI===eb?(t.namespaceURI!==ek||!!ev[r])&&(t.namespaceURI!==eg||!!ew[r])&&!ez[n]&&(eA[n]||!eP[n]):"application/xhtml+xml"===eS&&!!eT[e.namespaceURI])},e5=function(e){eB(r.removed,{element:e});try{T(e).removeChild(e)}catch(t){b(e)}},tu=function(e,t){try{eB(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){eB(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(et||en)try{e5(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},tp=function(e){let n=null,r=null;if(ee)e="<remove></remove>"+e;else{let t=eX(e,/^[\r\n\t ]+/);r=t&&t[0]}"application/xhtml+xml"===eS&&ey===eb&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");let a=t?t.createHTML(e):e;if(ey===eb)try{n=new f().parseFromString(a,eS)}catch(e){}if(!n||!n.documentElement){n=w.createDocument(ey,"template",null);try{n.documentElement.innerHTML=ex?E:a}catch(e){}}let o=n.body||n.documentElement;return(e&&r&&o.insertBefore(i.createTextNode(r),o.childNodes[0]||null),ey===eb)?S.call(n,K?"html":"body")[0]:K?n.documentElement:o},td=function(e){return v.call(e.ownerDocument||e,e,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},th=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},tf=function(e){return"function"==typeof c&&e instanceof c};function tg(e,t,n){eF(e,e=>{e.call(r,t,n,eN)})}let tk=function(e){let t=null;if(tg(R.beforeSanitizeElements,e,null),th(e))return e5(e),!0;let n=eR(e.nodeName);if(tg(R.uponSanitizeElement,e,{tagName:n,allowedTags:$}),Q&&e.hasChildNodes()&&!tf(e.firstElementChild)&&e3(/<[/\w!]/g,e.innerHTML)&&e3(/<[/\w!]/g,e.textContent)||Q&&e.namespaceURI===eb&&"style"===n&&tf(e.firstElementChild)||7===e.nodeType||Q&&8===e.nodeType&&e3(/<[/\w]/g,e.data))return e5(e),!0;if(U[n]||!(W.tagCheck instanceof Function&&W.tagCheck(n))&&!$[n]){if(!U[n]&&tv(n)&&(B.tagNameCheck instanceof RegExp&&e3(B.tagNameCheck,n)||B.tagNameCheck instanceof Function&&B.tagNameCheck(n)))return!1;if(el&&!eu[n]){let t=T(e)||e.parentNode,n=x(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=k(n[i],!0);t.insertBefore(r,y(e))}}}return e5(e),!0}return e instanceof u&&!e$(e)||("noscript"===n||"noembed"===n||"noframes"===n)&&e3(/<\/no(script|embed|frames)/i,e.innerHTML)?(e5(e),!0):(Z&&3===e.nodeType&&(t=e.textContent,eF([C,N,I],e=>{t=eV(t,e," ")}),e.textContent!==t&&(eB(r.removed,{element:e.cloneNode()}),e.textContent=t)),tg(R.afterSanitizeElements,e,null),!1)},tE=function(e,t,n){if(G[t]||ei&&("id"===t||"name"===t)&&(n in i||n in eI))return!1;let r=H[t]||W.attributeCheck instanceof Function&&W.attributeCheck(t,e);if(X&&!G[t]&&e3(O,t));else if(q&&e3(D,t));else if(!r||G[t]){if(!(tv(e)&&(B.tagNameCheck instanceof RegExp&&e3(B.tagNameCheck,e)||B.tagNameCheck instanceof Function&&B.tagNameCheck(e))&&(B.attributeNameCheck instanceof RegExp&&e3(B.attributeNameCheck,t)||B.attributeNameCheck instanceof Function&&B.attributeNameCheck(t,e))||"is"===t&&B.allowCustomizedBuiltInElements&&(B.tagNameCheck instanceof RegExp&&e3(B.tagNameCheck,n)||B.tagNameCheck instanceof Function&&B.tagNameCheck(n))))return!1}else if(ef[t]);else if(e3(z,eV(n,P,"")));else if(("src"===t||"xlink:href"===t||"href"===t)&&"script"!==e&&0===eY(n,"data:")&&ed[e]);else if(V&&!e3(L,eV(n,P,"")));else if(n)return!1;return!0},tw=e4({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),tv=function(e){return!tw[eW(e)]&&e3(M,e)},tA=function(e){tg(R.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||th(e))return;let i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H,forceKeepAttr:void 0},a=n.length;for(;a--;){let{name:o,namespaceURI:l,value:s}=n[a],c=eR(o),u="value"===o?s:eZ(s);if(i.attrName=c,i.attrValue=u,i.keepAttr=!0,i.forceKeepAttr=void 0,tg(R.uponSanitizeAttribute,e,i),u=i.attrValue,ea&&("id"===c||"name"===c)&&0!==eY(u,eo)&&(tu(o,e),u=eo+u),Q&&e3(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)||"attributename"===c&&eX(u,"href")){tu(o,e);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr||!Y&&e3(/\/>/i,u)){tu(o,e);continue}Z&&eF([C,N,I],e=>{u=eV(u,e," ")});let p=eR(e.nodeName);if(!tE(p,c,u)){tu(o,e);continue}if(t&&"object"==typeof m&&"function"==typeof m.getAttributeType)if(l);else switch(m.getAttributeType(p,c)){case"TrustedHTML":u=t.createHTML(u);break;case"TrustedScriptURL":u=t.createScriptURL(u)}if(u!==s)try{l?e.setAttributeNS(l,o,u):e.setAttribute(o,u),th(e)?e5(e):ej(r.removed)}catch(t){tu(o,e)}}tg(R.afterSanitizeAttributes,e,null)},tS=function(e){let t=null,n=td(e);for(tg(R.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)tg(R.uponSanitizeShadowNode,t,null),tk(t),tA(t),t.content instanceof l&&tS(t.content);tg(R.afterSanitizeShadowDOM,e,null)};return r.sanitize=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,o=null,s=null,u=null;if((ex=!e)&&(e="<!-->"),"string"!=typeof e&&!tf(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return eQ(e);case"boolean":return eK(e);case"bigint":return eJ?eJ(e):"0";case"symbol":return e0?e0(e):"Symbol()";case"undefined":default:return e2(e);case"function":case"object":{if(null===e)return e2(e);let t=e7(e,"toString");if("function"==typeof t){let n=t(e);return"string"==typeof n?n:e2(n)}return e2(e)}}}(e)))throw e9("dirty is not a string, aborting");if(!r.isSupported)return e;if(J||eD(n),r.removed=[],"string"==typeof e&&(es=!1),es){let t=e.nodeName;if("string"==typeof t){let e=eR(t);if(!$[e]||U[e])throw e9("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)1===(o=(i=tp("<!---->")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?i=o:i.appendChild(o);else{if(!et&&!Z&&!K&&-1===e.indexOf("<"))return t&&er?t.createHTML(e):e;if(!(i=tp(e)))return et?null:er?E:""}i&&ee&&e5(i.firstChild);let p=td(es?e:i);for(;s=p.nextNode();)tk(s),tA(s),s.content instanceof l&&tS(s.content);if(es)return e;if(et){if(Z){i.normalize();let e=i.innerHTML;eF([C,N,I],t=>{e=eV(e,t," ")}),i.innerHTML=e}if(en)for(u=A.call(i.ownerDocument);i.firstChild;)u.appendChild(i.firstChild);else u=i;return(H.shadowroot||H.shadowrootmode)&&(u=_.call(a,u,!0)),u}let d=K?i.outerHTML:i.innerHTML;return K&&$["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&e3(tb,i.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+d),Z&&eF([C,N,I],e=>{d=eV(d,e," ")}),t&&er?t.createHTML(d):d},r.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};eD(e),J=!0},r.clearConfig=function(){eN=null,J=!1},r.isValidAttribute=function(e,t,n){return eN||eD({}),tE(eR(e),eR(t),n)},r.addHook=function(e,t){"function"==typeof t&&eB(R[e],t)},r.removeHook=function(e,t){if(void 0!==t){let n=eH(R[e],t);return -1===n?void 0:eU(R[e],n,1)[0]}return ej(R[e])},r.removeHooks=function(e){R[e]=[]},r.removeAllHooks=function(){R=tT()},r}(),tw=e.i(630),tv=tw.default.default||tw.default;e.s(["default",()=>tv],568160),e.i(568160);let tA=i.default.memo(e=>{let{text:t,animationConfig:n}=e,{fadeDuration:r=200,easing:a="ease-in-out"}=n||{},[o,l]=(0,i.useState)([]),s=(0,i.useRef)("");(0,i.useEffect)(()=>{if(t===s.current)return;if(!(s.current&&0===t.indexOf(s.current))){l([t]),s.current=t;return}let e=t.slice(s.current.length);e&&(l(t=>[...t,e]),s.current=t)},[t]);let c=(0,i.useMemo)(()=>({animation:`x-markdown-fade-in ${r}ms ${a} forwards`,color:"inherit"}),[r,a]);return i.default.createElement(i.default.Fragment,null,o.map((e,t)=>i.default.createElement("span",{style:c,key:`animation-text-${t}`},e)))}),tS=/\s/,t_=/[a-zA-Z0-9-]/,tR=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),tC="<!--",tN="<![CDATA[",tI=(e,t)=>`${e}-${t}`,tO=(e,t)=>{if(!e.startsWith(tC,t))return t;let n=e.indexOf("-->",t+tC.length);return -1===n?e.length:n+3},tD=(e,t)=>{if(!e.startsWith(tN,t))return t;let n=e.indexOf("]]>",t+tN.length);return -1===n?e.length:n+3},tL=(e,t)=>{if("/"!==e[t+1])return null;let n=t+2,r="";for(;n<e.length&&tS.test(e[n]);)n++;for(;n<e.length&&t_.test(e[n]);)r+=e[n],n++;for(;n<e.length&&tS.test(e[n]);)n++;return r&&">"===e[n]?{tagName:r.toLowerCase(),endPos:n+1}:null},tP=(e,t)=>{let n=t+1,r="";for(;n<e.length&&t_.test(e[n]);)r+=e[n],n++;if(!r)return null;let i=!1,a=!1;for(;n<e.length;){if(">"===e[n]){i=!0,a="/"===e[n-1];break}if('"'===e[n]||"'"===e[n]){let t=e[n];for(n++;n<e.length;){if("\\"===e[n]&&n+1<e.length){n+=2;continue}if(e[n]===t){n++;break}n++}continue}n++}return{tagName:r.toLowerCase(),endPos:i?n+1:e.length,foundEnd:i,isSelfClosing:a}};class tM{options;static NON_WHITESPACE_REGEX=/[^\r\n\s]+/;constructor(e){this.options=e}detectUnclosedTags(e){return function(e,t){let n=new Set(Array.from(t,e=>e.toLowerCase()));if(0===n.size||0===e.length)return new Set;let r=new Set,i={},a={},o=0;for(;o<e.length;){let t=tO(e,o);if(t!==o){o=t;continue}let s=tD(e,o);if(s!==o){o=s;continue}if("<"!==e[o]){o++;continue}let c=tL(e,o);if(c){let e=a[c.tagName];n.has(c.tagName)&&e?.length&&e.pop(),o=c.endPos;continue}let u=tP(e,o);if(!u||!n.has(u.tagName)){o++;continue}i[u.tagName]=(i[u.tagName]??0)+1;let p=i[u.tagName];if(u.foundEnd){if(!u.isSelfClosing&&!tR.has(u.tagName)){var l;a[l=u.tagName]??(a[l]=[]),a[u.tagName].push(p)}}else r.add(tI(u.tagName,p));o=u.endPos}for(let[e,t]of Object.entries(a))t.forEach(t=>{r.add(tI(e,t))});return r}(e,Object.keys(this.options.components??{}))}configureDOMPurify(){let e=Object.keys(this.options.components||{}),t=this.options.dompurifyConfig||{},n=Array.isArray(t.ADD_TAGS)?t.ADD_TAGS:[],r=Array.isArray(t.ADD_ATTR)?t.ADD_ATTR:[];return{...t,ADD_TAGS:Array.from(new Set([...e,...n])),ADD_ATTR:Array.from(new Set(["target","rel",...r]))}}createReplaceElement(e,t){let{enableAnimation:n,animationConfig:r}=this.options.streaming||{};return a=>{let o=`x-markdown-component-${t.current++}`,l="text"===a.type&&a.data&&tM.NON_WHITESPACE_REGEX.test(a.data),s=a.parent?.name,c=s&&this.options.components?.[s];if(n&&l&&!c)return i.default.createElement(tA,{text:a.data,key:o,animationConfig:r});if(!("name"in a))return;let{name:u,attribs:p,children:d}=a,h=this.options.components?.[u];if(h){t.tagIndexes[u]=(t.tagIndexes[u]??0)+1;let n={domNode:a,streamStatus:e?.has(tI(u,t.tagIndexes[u]))?"loading":"done",key:o,...p,...void 0!==p.disabled&&{disabled:!0},...void 0!==p.checked&&{checked:!0}},r=[n.className,n.classname,n.class].filter(Boolean).join(" ").trim();if(n.className=r||"","code"===u){let{"data-block":e="false","data-state":t="done"}=p||{};n.block="true"===e,n.streamStatus="loading"===t?"loading":"done";let r=p?.["data-lang"],i=p?.class?.match(/(?:^|\s)language-([^\s]+)/)?.[1]??p?.class?.match(/(?:^|\s)lang-([^\s]+)/)?.[1],a=r||i;a&&(n.lang=a)}return d&&(n.children=this.processChildren(d,e,t)),i.default.createElement(h,n)}}}processChildren(e,t,n){return(0,tw.domToReact)(e,{replace:this.createReplaceElement(t,n)})}processHtml(e){let t=this.detectUnclosedTags(e),n=this.configureDOMPurify();return tv(tE.sanitize(e,n),{replace:this.createReplaceElement(t,{current:0,tagIndexes:{}})})}render(e){return this.processHtml(e)}}let tz=55,t$=40,tF="#52c41a",tH="#faad14",tj="#ff4d4f",tB={WIDTH:750,HEIGHT:400,PADDING:80};var tU=()=>{let[e,t]=(0,i.useState)(0),[n,r]=(0,i.useState)(0),[a,o]=(0,i.useState)(!1),[l,s]=(0,i.useState)(!1),[c,u]=(0,i.useState)([]),[p,d]=(0,i.useState)("u"<typeof window?{x:12,y:12}:{x:window.innerWidth-220,y:window.innerHeight/2-100}),[h,f]=(0,i.useState)(!1),m=(0,i.useRef)([]),g=(0,i.useRef)([]),k=(0,i.useRef)(0),b=(0,i.useRef)(0),y=(0,i.useRef)(void 0),x=(0,i.useRef)({isDragging:!1,startX:0,startY:0,initialX:0,initialY:0});(0,i.useEffect)(()=>{if("u"<typeof window)return;h||(f(!0),k.current=performance.now());let e=()=>{let n=performance.now(),i=n-k.current;if(g.current.push(i),g.current.length>60&&g.current.shift(),b.current++,i>=1e3){let e=Math.round(1e3*b.current/i),o=T();t(e),r(o),a&&m.current.push({timestamp:Date.now(),fps:e,memory:o}),b.current=0,k.current=n}y.current=requestAnimationFrame(e)};return y.current=requestAnimationFrame(e),()=>{void 0!==y.current&&cancelAnimationFrame(y.current)}},[a,h]);let T=()=>{let e=performance;return e.memory?Math.round(e.memory.usedJSHeapSize/1024/1024):0},E=e=>e<1?`${Math.round(1024*e)} KB`:e>=1024?`${(e/1024).toFixed(2)} GB`:`${e.toFixed(2)} MB`,w=e=>e>=tz?tF:e>=t$?tH:tj,v=(0,i.useCallback)(()=>{a?(o(!1),u([...m.current]),s(!0)):(m.current=[],o(!0))},[a]),A=(0,i.useCallback)(e=>{e.target.closest(".x-markdown-debug-action")||(x.current={isDragging:!0,startX:e.clientX,startY:e.clientY,initialX:p.x,initialY:p.y})},[p]),S=(0,i.useCallback)(e=>{if(!x.current.isDragging)return;let t=e.clientX-x.current.startX,n=e.clientY-x.current.startY;d({x:x.current.initialX+t,y:x.current.initialY+n})},[]),_=(0,i.useCallback)(()=>{x.current.isDragging=!1},[]);return(0,i.useEffect)(()=>{if("u">typeof window)return document.addEventListener("mousemove",S),document.addEventListener("mouseup",_),()=>{document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",_)}},[S,_]),i.default.createElement(i.default.Fragment,null,i.default.createElement("div",{className:"x-markdown-debug-panel",style:{left:p.x,top:p.y,cursor:x.current.isDragging?"grabbing":"grab"},onMouseDown:A},i.default.createElement("div",{className:"x-markdown-debug-row"},i.default.createElement("span",{className:"x-markdown-debug-label"},"FPS"),i.default.createElement("span",{className:"x-markdown-debug-value",style:{color:w(e)}},e)),i.default.createElement("div",{className:"x-markdown-debug-row"},i.default.createElement("span",{className:"x-markdown-debug-label"},"Memory"),i.default.createElement("span",{className:"x-markdown-debug-value"},E(n))),i.default.createElement("div",{className:"x-markdown-debug-actions"},i.default.createElement("button",{type:"button",className:`x-markdown-debug-action x-markdown-debug-record-btn ${a?"recording":""}`,onClick:v},a?"⏹ Stop":"⏺ Record"),c.length>0&&!a&&i.default.createElement("button",{type:"button",className:"x-markdown-debug-action",onClick:()=>s(!0)},"📊 View"))),l&&c.length>0?i.default.createElement("div",{className:"x-markdown-debug-modal-overlay",onClick:()=>s(!1)},i.default.createElement("div",{className:"x-markdown-debug-modal",onClick:e=>e.stopPropagation()},i.default.createElement("div",{className:"x-markdown-debug-modal-header"},i.default.createElement("span",{style:{color:"#fff",fontSize:18,fontWeight:"600"}},"Performance Recording"),i.default.createElement("button",{type:"button",className:"x-markdown-debug-close-btn",onClick:()=>s(!1)},"✕")),i.default.createElement(()=>{if(!c.length)return null;let{WIDTH:e,HEIGHT:t,PADDING:n}=tB,r=e-2*n,a=t-2*n,o=c[0]?.timestamp??0,l=(c[c.length-1]?.timestamp??0)-o||1,s=Math.max(...c.map(e=>e.fps),60),u=1.1*Math.max(...c.map(e=>e.memory),0),p=c.length>0?c.reduce((e,t)=>e+t.fps,0)/c.length:0,d=c.length>0?c.reduce((e,t)=>e+t.memory,0)/c.length:0,h=c.length>0?Math.min(...c.map(e=>e.fps)):0,f=c.length>0?Math.max(...c.map(e=>e.fps)):0,m=(e,t)=>c.map(i=>{let s=n+(i.timestamp-o)/l*r,c=n+a-i[e]/t*a;return`${s},${c}`}).join(" ");return i.default.createElement("div",{className:"x-markdown-debug-modal-content"},i.default.createElement("div",{className:"x-markdown-debug-stats-summary"},i.default.createElement("div",{className:"x-markdown-debug-stat-item"},i.default.createElement("div",{className:"x-markdown-debug-stat-label"},"Duration"),i.default.createElement("div",{className:"x-markdown-debug-stat-value"},(l/1e3).toFixed(2),"s")),i.default.createElement("div",{className:"x-markdown-debug-stat-item"},i.default.createElement("div",{className:"x-markdown-debug-stat-label"},"FPS Avg"),i.default.createElement("div",{className:"x-markdown-debug-stat-value",style:{color:w(p)}},p.toFixed(1))),i.default.createElement("div",{className:"x-markdown-debug-stat-item"},i.default.createElement("div",{className:"x-markdown-debug-stat-label"},"FPS Range"),i.default.createElement("div",{className:"x-markdown-debug-stat-value"},h," - ",f)),i.default.createElement("div",{className:"x-markdown-debug-stat-item"},i.default.createElement("div",{className:"x-markdown-debug-stat-label"},"Memory Avg"),i.default.createElement("div",{className:"x-markdown-debug-stat-value"},E(d)))),i.default.createElement("svg",{width:e,height:t,className:"x-markdown-debug-chart-full",role:"img","aria-label":"Performance chart showing FPS and memory usage over time"},i.default.createElement("title",null,"Performance Chart"),[0,.25,.5,.75,1].map(o=>i.default.createElement("g",{key:o},i.default.createElement("line",{x1:n,y1:n+a*o,x2:e-n,y2:n+a*o,stroke:"rgba(255,255,255,0.1)",strokeWidth:"1"}),i.default.createElement("line",{x1:n+r*o,y1:n,x2:n+r*o,y2:t-n,stroke:"rgba(255,255,255,0.1)",strokeWidth:"1"}))),i.default.createElement("polyline",{points:m("fps",s),fill:"none",stroke:tF,strokeWidth:"2",className:"fps-line"}),i.default.createElement("polyline",{points:m("memory",u),fill:"none",stroke:"#1890ff",strokeWidth:"2",className:"memory-line"}),i.default.createElement("text",{x:n-10,y:n,fill:tF,fontSize:"12",textAnchor:"end"},s.toFixed(0)),i.default.createElement("text",{x:n-10,y:t-n,fill:tF,fontSize:"12",textAnchor:"end"},"0"),i.default.createElement("text",{x:n-10,y:n-15,fill:tF,fontSize:"14",fontWeight:"bold",textAnchor:"end"},"FPS"),i.default.createElement("text",{x:e-n+10,y:n+20,fill:"#1890ff",fontSize:"12",textAnchor:"start"},E(u)),i.default.createElement("text",{x:e-n+10,y:t-n,fill:"#1890ff",fontSize:"12",textAnchor:"start"},E(0)),i.default.createElement("text",{x:e-n+10,y:n+5,fill:"#1890ff",fontSize:"14",fontWeight:"bold",textAnchor:"start"},"Memory"),i.default.createElement("text",{x:n,y:t-n+20,fill:"rgba(255,255,255,0.6)",fontSize:"12",textAnchor:"middle"},"0s"),i.default.createElement("text",{x:e-n,y:t-n+20,fill:"rgba(255,255,255,0.6)",fontSize:"12",textAnchor:"middle"},(l/1e3).toFixed(1),"s")),i.default.createElement("div",{className:"x-markdown-debug-legend"},i.default.createElement("div",{className:"x-markdown-debug-legend-item"},i.default.createElement("span",{className:"x-markdown-debug-legend-color",style:{backgroundColor:tF}}),i.default.createElement("span",null,"FPS")),i.default.createElement("div",{className:"x-markdown-debug-legend-item"},i.default.createElement("span",{className:"x-markdown-debug-legend-color",style:{backgroundColor:"#1890ff"}}),i.default.createElement("span",null,"Memory"))))},null))):null)};let tG=((n={}).Text="text",n.Link="link",n.Image="image",n.Html="html",n.Emphasis="emphasis",n.List="list",n.Table="table",n.InlineCode="inline-code",n),tW=[/^!\[[^\]\r\n]{0,1000}$/,/^!\[[^\r\n]{0,1000}\]\(*[^)\r\n]{0,1000}$/],tq=[/^\[[^\]\r\n]{0,1000}$/,/^\[[^\r\n]{0,1000}\]\(*[^)\r\n]{0,1000}$/],tX=[/^<\/$/,/^<\/?[a-zA-Z][a-zA-Z0-9-]{0,100}[^>\r\n]{0,1000}$/],tV=[/^(\*{1,3}|_{1,3})(?!\s)(?!.*\1$)[^\r\n]{0,1000}$/],tY=[/^[-+*]\s{0,3}$/,/^[-+*]\s{1,3}(\*{1,3}|_{1,3})(?!\s)(?!.*\1$)[^\r\n]{0,1000}$/],tZ=[/^`[^`\r\n]{0,300}$/],tQ={[tG.Link]:{tokenType:tG.Link,isStartOfToken:e=>e.startsWith("["),isStreamingValid:e=>tq.some(t=>t.test(e))},[tG.Image]:{tokenType:tG.Image,isStartOfToken:e=>e.startsWith("!"),isStreamingValid:e=>tW.some(t=>t.test(e))},[tG.Html]:{tokenType:tG.Html,isStartOfToken:e=>e.startsWith("<"),isStreamingValid:e=>tX.some(t=>t.test(e))},[tG.Emphasis]:{tokenType:tG.Emphasis,isStartOfToken:e=>e.startsWith("*")||e.startsWith("_"),isStreamingValid:e=>tV.some(t=>t.test(e))},[tG.List]:{tokenType:tG.List,isStartOfToken:e=>/^[-+*]/.test(e),isStreamingValid:e=>tY.some(t=>t.test(e)),getCommitPrefix:e=>{let t=e.match(/^([-+*]\s{0,3})/)?.[1],n=t?e.slice(t.length):"";return t&&n.startsWith("`")?t:null}},[tG.Table]:{tokenType:tG.Table,isStartOfToken:e=>e.startsWith("|"),isStreamingValid:e=>{if(e.includes("\n\n"))return!1;let t=e.split("\n");if(t.length<=1)return!0;let[n,r]=t,i=n.trim();if(!/^\|.*\|$/.test(i))return!1;let a=r.trim().split("|").map(e=>e.trim()).filter(Boolean),o=/^:?-+:?$/;return a.every((e,t)=>t===a.length-1&&":"===e||o.test(e))}},[tG.InlineCode]:{tokenType:tG.InlineCode,isStartOfToken:e=>e.startsWith("`"),isStreamingValid:e=>tZ.some(t=>t.test(e))}},tK=Object.values(tQ).map(e=>({tokenType:e.tokenType,recognize:t=>((e,t)=>{let n=tQ[t];if(!n)return;let{token:r,pending:i}=e;if(r===tG.Text&&n.isStartOfToken(i)){e.token=t;return}if(r===t&&!n.isStreamingValid(i)){let t=n.getCommitPrefix?.(i);if(t){e.completeMarkdown+=t,e.pending=i.slice(t.length),e.token=tG.Text;return}t0(e)}})(t,e.tokenType)})),tJ=()=>({pending:"",token:tG.Text,processedLength:0,completeMarkdown:""}),t0=e=>{e.pending&&(e.completeMarkdown+=e.pending,e.pending=""),e.token=tG.Text},t1=(e,t=!1)=>{let n=e.split("\n"),r=!1,i="",a=0;for(let e=0;e<n.length;e++){let o=n[e],l=(o.endsWith("\r")?o.slice(0,-1):o).match(/^(`{3,}|~{3,})(.*)$/);if(l){let o=l[1],s=l[2],c=o[0],u=o.length;r?c===i&&u>=a&&/^\s*$/.test(s)&&(t||e<n.length-1)&&(r=!1,i="",a=0):(r=!0,i=c,a=u)}}return r},t2=i.default.memo(e=>{let{streaming:t,config:n,components:a,paragraphTag:o,content:l,children:s,rootClassName:c,className:u,style:p,openLinksInNewTab:d,dompurifyConfig:h,protectCustomTagNewlines:f,escapeRawHtml:m,debug:g}=e,k=(0,i.useMemo)(()=>{var e;return(e=t?.tail)?"boolean"==typeof e?"▋":e.content||"▋":null},[t?.tail]),b="object"==typeof t?.tail?t.tail.component:void 0,y=!!t?.hasNextChunk&&k,x=(0,r.clsx)("x-markdown",c,u),T=((e,t)=>{let{streaming:n,components:r={}}=t||{},{hasNextChunk:a=!1,incompleteMarkdownComponentMap:o}=n||{},[l,s]=(0,i.useState)(""),c=(0,i.useRef)(tJ()),u=(0,i.useCallback)(e=>{let{token:t,pending:n}=e;if(t===tG.Text||t===tG.Image&&"!"===n)return;if(t===tG.Table&&n.split("\n").length>2)return n;let i=(o||{})[t]||`incomplete-${t}`,a=(e=>{try{return encodeURIComponent(e)}catch(t){if(t instanceof URIError)return encodeURIComponent((e=>{let t="";for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r>=55296&&r<=56319?n+1<e.length&&e.charCodeAt(n+1)>=56320&&57343>=e.charCodeAt(n+1)&&(t+=e[n]+e[n+1],n++):(r<56320||r>57343)&&(t+=e[n])}return t})(e));return""}})(n);return r?.[i]?`<${i} data-raw="${a}" />`:void 0},[o,r]),p=(0,i.useCallback)(e=>{if(!e){s(""),c.current=tJ();return}let t=c.current.completeMarkdown+c.current.pending;e.startsWith(t)||(c.current=tJ());let n=c.current,r=e.slice(n.processedLength);if(!r)return;for(let e of(n.processedLength+=r.length,r)){if(n.pending+=e,t1(n.completeMarkdown+n.pending)){t0(n);continue}if(n.token===tG.Text)for(let e of tK)e.recognize(n);else{let e=tK.find(e=>e.tokenType===n.token);if(e?.recognize(n),n.token===tG.Text)for(let e of tK)e.recognize(n)}n.token===tG.Text&&t0(n)}let i=u(n);s(n.completeMarkdown+(i||""))},[u]);return(0,i.useEffect)(()=>{if("string"!=typeof e){console.error(`X-Markdown: input must be string, not ${typeof e}.`),s("");return}a?p(e):s(e)},[e,a,p]),l})(l||s||"",{streaming:t,components:a}),E=(0,i.useMemo)(()=>{if(!y)return a;let e=b?i.default.createElement(b,{content:k}):i.default.createElement("span",{className:"xmd-tail"},k);return{...a,"xmd-tail":()=>e}},[y,a,b,k]),w=(0,i.useMemo)(()=>new eR({markedConfig:n,paragraphTag:o,openLinksInNewTab:d,components:E,protectCustomTagNewlines:f,escapeRawHtml:m}),[n,o,d,E,f,m]),v=(0,i.useMemo)(()=>new tM({components:E,dompurifyConfig:h,streaming:t}),[E,h,t]),A=(0,i.useMemo)(()=>T?w.parse(T,{injectTail:!!y}):"",[T,w,y]),S=(0,i.useMemo)(()=>A?v.render(A):null,[A,v]);return T?i.default.createElement(i.default.Fragment,null,i.default.createElement("div",{className:x,style:p},S),g?i.default.createElement(tU,null):null):null});e.s(["default",()=>t2],202601)}]);
|