import{b as R}from"./antd-BmrhB3rb.js";import{r as w}from"./index-C_A6cd1S.js";function A(y,m){for(var c=0;cu[d]})}}}return Object.freeze(Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}))}var C={exports:{}};(function(y,m){(function(c){c(w())})(function(c){var u={addition:"positive",attributes:"attribute",bold:"strong",cite:"keyword",code:"atom",definitionList:"number",deletion:"negative",div:"punctuation",em:"em",footnote:"variable",footCite:"qualifier",header:"header",html:"comment",image:"string",italic:"em",link:"link",linkDefinition:"link",list1:"variable-2",list2:"variable-3",list3:"keyword",notextile:"string-2",pre:"operator",p:"property",quote:"bracket",span:"quote",specialChar:"tag",strong:"strong",sub:"builtin",sup:"builtin",table:"variable-3",tableHeading:"operator"};function d(t,e){e.mode=l.newLayout,e.tableHeading=!1,e.layoutType==="definitionList"&&e.spanningLayout&&t.match(r("definitionListEnd"),!1)&&(e.spanningLayout=!1)}function b(t,e,i){if(i==="_")return t.eat("_")?f(t,e,"italic",/__/,2):f(t,e,"em",/_/,1);if(i==="*")return t.eat("*")?f(t,e,"bold",/\*\*/,2):f(t,e,"strong",/\*/,1);if(i==="[")return t.match(/\d+\]/)&&(e.footCite=!0),a(e);if(i==="("){var o=t.match(/^(r|tm|c)\)/);if(o)return p(e,u.specialChar)}if(i==="<"&&t.match(/(\w+)[^>]+>[^<]+<\/\1>/))return p(e,u.html);if(i==="?"&&t.eat("?"))return f(t,e,"cite",/\?\?/,2);if(i==="="&&t.eat("="))return f(t,e,"notextile",/==/,2);if(i==="-"&&!t.eat("-"))return f(t,e,"deletion",/-/,1);if(i==="+")return f(t,e,"addition",/\+/,1);if(i==="~")return f(t,e,"sub",/~/,1);if(i==="^")return f(t,e,"sup",/\^/,1);if(i==="%")return f(t,e,"span",/%/,1);if(i==="@")return f(t,e,"code",/@/,1);if(i==="!"){var s=f(t,e,"image",/(?:\([^\)]+\))?!/,1);return t.match(/^:\S+/),s}return a(e)}function f(t,e,i,o,s){var g=t.pos>s?t.string.charAt(t.pos-s-1):null,h=t.peek();if(e[i]){if((!h||/\W/.test(h))&&g&&/\S/.test(g)){var L=a(e);return e[i]=!1,L}}else(!g||/\W/.test(g))&&h&&/\S/.test(h)&&t.match(new RegExp("^.*\\S"+o.source+"(?:\\W|$)"),!1)&&(e[i]=!0,e.mode=l.attributes);return a(e)}function a(t){var e=v(t);if(e)return e;var i=[];return t.layoutType&&i.push(u[t.layoutType]),i=i.concat(x(t,"addition","bold","cite","code","deletion","em","footCite","image","italic","link","span","strong","sub","sup","table","tableHeading")),t.layoutType==="header"&&i.push(u.header+"-"+t.header),i.length?i.join(" "):null}function v(t){var e=t.layoutType;switch(e){case"notextile":case"code":case"pre":return u[e];default:return t.notextile?u.notextile+(e?" "+u[e]:""):null}}function p(t,e){var i=v(t);if(i)return i;var o=a(t);return e?o?o+" "+e:e:o}function x(t){for(var e=[],i=1;i]+)?>(?:[^<]+<\/\1>)?/,link:/[^"]+":\S/,linkDefinition:/\[[^\s\]]+\]\S+/,list:/(?:#+|\*+)/,notextile:"notextile",para:"p",pre:"pre",table:"table",tableCellAttributes:/[\/\\]\d+/,tableHeading:/\|_\./,tableText:/[^"_\*\[\(\?\+~\^%@|-]+/,text:/[^!"_=\*\[\(<\?\+~\^%@-]+/},attributes:{align:/(?:<>|<|>|=)/,selector:/\([^\(][^\)]+\)/,lang:/\[[^\[\]]+\]/,pad:/(?:\(+|\)+){1,2}/,css:/\{[^\}]+\}/},createRe:function(t){switch(t){case"drawTable":return n.makeRe("^",n.single.drawTable,"$");case"html":return n.makeRe("^",n.single.html,"(?:",n.single.html,")*","$");case"linkDefinition":return n.makeRe("^",n.single.linkDefinition,"$");case"listLayout":return n.makeRe("^",n.single.list,r("allAttributes"),"*\\s+");case"tableCellAttributes":return n.makeRe("^",n.choiceRe(n.single.tableCellAttributes,r("allAttributes")),"+\\.");case"type":return n.makeRe("^",r("allTypes"));case"typeLayout":return n.makeRe("^",r("allTypes"),r("allAttributes"),"*\\.\\.?","(\\s+|$)");case"attributes":return n.makeRe("^",r("allAttributes"),"+");case"allTypes":return n.choiceRe(n.single.div,n.single.foot,n.single.header,n.single.bc,n.single.bq,n.single.notextile,n.single.pre,n.single.table,n.single.para);case"allAttributes":return n.choiceRe(n.attributes.selector,n.attributes.css,n.attributes.lang,n.attributes.align,n.attributes.pad);default:return n.makeRe("^",n.single[t])}},makeRe:function(){for(var t="",e=0;e