2026-07-23 10:11:24 +00:00
// Module ID: 3829
2026-07-24 07:16:23 +00:00
// Function ID: 31812
2026-07-20 16:05:17 +00:00
// Name: t
// Dependencies: []
2026-07-23 10:11:24 +00:00
// Module 3829 (t)
2026-07-20 16:05:17 +00:00
const self = this ;
const fn = function t ( ) {
2026-07-23 10:11:24 +00:00
const re7 = /\r\n?/g ;
const re8 = /\t/g ;
const re9 = /\f/g ;
2026-07-20 16:05:17 +00:00
function preprocess ( str ) {
str = str . replace ( closure _7 , "\n" ) ;
return str . replace ( closure _7 , "\n" ) . replace ( closure _9 , "" ) . replace ( closure _8 , " " ) ;
}
function populateInitialState ( arg0 , obj ) {
obj = arg0 ;
if ( ! arg0 ) {
obj = { } ;
}
if ( null != obj ) {
for ( const key10006 in arg1 ) {
let tmp3 = key10006 ;
let _Object = Object ;
if ( ! hasOwnProperty . call ( arg1 , key10006 ) ) {
continue ;
} else {
obj [ key10006 ] = arg1 [ key10006 ] ;
2026-07-23 10:11:24 +00:00
continue ;
2026-07-20 16:05:17 +00:00
}
continue ;
}
}
return obj ;
}
function parserFor ( rules ) {
let closure _0 = rules ;
let closure _1 = arg1 ;
const keys = Object . keys ( rules ) ;
const found = keys . filter ( ( arg0 ) => {
2026-07-23 10:11:24 +00:00
if ( null != dependencyMap [ arg0 ] ) {
2026-07-20 16:05:17 +00:00
if ( null != str . match ) {
const order = str . order ;
let isFiniteResult = "number" === typeof order ;
if ( isFiniteResult ) {
const _isFinite = isFinite ;
isFiniteResult = isFinite ( order ) ;
}
if ( ! isFiniteResult ) {
const _console = console ;
isFiniteResult = "undefined" === typeof console ;
}
if ( ! isFiniteResult ) {
const _console2 = console ;
const _String = String ;
2026-07-23 10:11:24 +00:00
const text = ` simple-markdown: Invalid order for rule \` ${ arg0 } ` ;
console . warn ( ` ${ ` simple-markdown: Invalid order for rule \` ${ arg0 } ` } \` : ${ String ( order ) } ` ) ;
2026-07-20 16:05:17 +00:00
}
return true ;
}
}
return false ;
} ) ;
const sorted = found . sort ( ( arg0 , arg1 ) => {
const order = tmp . order ;
const order2 = tmp2 . order ;
if ( order !== order2 ) {
return order - order2 ;
} else {
let num2 = 1 ;
if ( tmp . quality ) {
num2 = 0 ;
}
let num3 = 1 ;
if ( tmp2 . quality ) {
num3 = 0 ;
}
if ( num2 !== num3 ) {
let num4 = num2 - num3 ;
} else {
num4 = - 1 ;
if ( arg0 >= arg1 ) {
let num5 = 0 ;
if ( arg0 > arg1 ) {
num5 = 1 ;
}
num4 = num5 ;
}
}
return num4 ;
}
} ) ;
2026-07-23 10:11:24 +00:00
const map = new Map ( ) ;
let items = [ ] ;
2026-07-20 16:05:17 +00:00
for ( let num = 0 ; num < found . length ; num = num + 1 ) {
let tmp3 = found [ num ] ;
let parseTableRow = tmp3 ;
let prop = rules [ tmp3 ] . requiredFirstCharacters ;
if ( null == prop ) {
let arr = items . push ( tmp3 ) ;
} else {
let mapped = prop . map ( ( str ) => {
const charCodeAtResult = str . charCodeAt ( 0 ) ;
if ( ! map . has ( charCodeAtResult ) ) {
const result = map . set ( charCodeAtResult , [ ] ) ;
}
const value = map . get ( charCodeAtResult ) ;
2026-07-23 10:11:24 +00:00
value . push ( closure _6 ) ;
2026-07-20 16:05:17 +00:00
} ) ;
}
}
2026-07-23 10:11:24 +00:00
function nestedParse ( content , closure _3 ) {
let tmp = closure _3 ;
2026-07-20 16:05:17 +00:00
const items = [ ] ;
2026-07-23 10:11:24 +00:00
if ( ! closure _3 ) {
2026-07-20 16:05:17 +00:00
tmp = merged ;
}
2026-07-23 10:11:24 +00:00
merged = tmp ;
2026-07-20 16:05:17 +00:00
const _parseDepth = tmp . _parseDepth ;
let num = 0 ;
if ( null != _parseDepth ) {
num = _parseDepth ;
}
const sum = num + 1 ;
if ( sum > 1000 ) {
if ( content ) {
let obj = { type : "text" , content } ;
items . push ( obj ) ;
}
return items ;
} else {
const _Object = Object ;
obj = { _parseDepth : sum } ;
merged = Object . assign ( { } , tmp , obj ) ;
let str3 = content ;
if ( content ) {
while ( true ) {
let tmp3 = map ;
let items1 = [ map . get ( str3 . charCodeAt ( 0 ) ) , ] ;
let tmp4 = items ;
items1 [ 1 ] = items ;
let tmp5 = str3 ;
let num2 = tmp18 ;
let tmp6 = tmp19 ;
let tmp7 = tmp20 ;
let tmp8 = tmp21 ;
let tmp9 = tmp22 ;
let tmp10 = tmp23 ;
let tmp11 = tmp24 ;
let tmp12 = null ;
let tmp13 = null ;
let tmp14 = null ;
let num3 = - 100000 ;
let num4 = 100000 ;
let num5 = 0 ;
let tmp15 = null ;
let tmp16 = null ;
let tmp17 = null ;
if ( 0 < items1 . length ) {
do {
let arr3 = items1 [ num5 ] ;
let tmp25 = tmp12 ;
let tmp26 = tmp13 ;
let tmp27 = tmp14 ;
let tmp28 = num3 ;
let tmp29 = num4 ;
let tmp30 = tmp6 ;
let tmp31 = tmp7 ;
let tmp32 = tmp8 ;
let tmp33 = tmp9 ;
let tmp34 = tmp10 ;
let tmp35 = tmp11 ;
if ( null != arr3 ) {
let tmp47 = tmp12 ;
let tmp48 = tmp13 ;
let tmp49 = tmp14 ;
let tmp50 = num3 ;
let tmp51 = num4 ;
let num7 = 0 ;
let tmp52 = tmp9 ;
let tmp53 = tmp10 ;
let tmp46 = tmp11 ;
tmp25 = tmp12 ;
tmp26 = tmp13 ;
tmp27 = tmp14 ;
tmp28 = num3 ;
tmp29 = num4 ;
num2 = 0 ;
tmp30 = tmp6 ;
tmp31 = tmp7 ;
tmp32 = tmp8 ;
tmp33 = tmp9 ;
tmp34 = tmp10 ;
tmp35 = tmp11 ;
if ( 0 < arr3 . length ) {
let tmp36 = arr3 [ num7 ] ;
2026-07-23 10:11:24 +00:00
let tmp37 = dependencyMap ;
let str = dependencyMap [ tmp36 ] ;
2026-07-20 16:05:17 +00:00
let order = str . order ;
tmp33 = tmp52 ;
tmp34 = tmp53 ;
tmp25 = tmp47 ;
tmp26 = tmp48 ;
tmp27 = tmp49 ;
tmp28 = tmp50 ;
num2 = num7 ;
tmp30 = tmp36 ;
tmp31 = str ;
tmp32 = order ;
tmp35 = tmp46 ;
tmp29 = tmp51 ;
while ( order <= tmp51 ) {
let str2 = "" ;
if ( null != merged . prevCapture ) {
str2 = merged . prevCapture [ 0 ] ;
}
let match = str . match ( str3 , merged , str2 ) ;
let tmp39 = str2 ;
let tmp40 = tmp47 ;
let tmp41 = tmp48 ;
let tmp42 = tmp49 ;
let tmp43 = tmp50 ;
let tmp44 = tmp51 ;
if ( match ) {
let num6 = 0 ;
if ( str . quality ) {
num6 = str . quality ( match , merged , str2 ) ;
}
let tmp45 = order < tmp51 || num6 > tmp50 ;
tmp40 = tmp47 ;
tmp41 = tmp48 ;
tmp42 = tmp49 ;
tmp43 = tmp50 ;
tmp44 = tmp51 ;
tmp46 = num6 ;
if ( tmp45 ) {
tmp40 = tmp36 ;
tmp41 = str ;
tmp42 = match ;
tmp43 = num6 ;
tmp44 = order ;
tmp46 = num6 ;
}
}
num7 = num7 + 1 ;
tmp47 = tmp40 ;
tmp48 = tmp41 ;
tmp49 = tmp42 ;
tmp50 = tmp43 ;
tmp51 = tmp44 ;
tmp52 = str2 ;
tmp53 = match ;
tmp25 = tmp40 ;
tmp26 = tmp41 ;
tmp27 = tmp42 ;
tmp28 = tmp43 ;
tmp29 = tmp44 ;
tmp30 = tmp36 ;
tmp31 = str ;
tmp32 = order ;
tmp33 = str2 ;
tmp34 = match ;
tmp35 = tmp46 ;
num2 = num7 ;
if ( num7 >= arr3 . length ) {
break ;
}
}
}
}
num5 = num5 + 1 ;
tmp12 = tmp25 ;
tmp13 = tmp26 ;
tmp14 = tmp27 ;
num3 = tmp28 ;
num4 = tmp29 ;
tmp6 = tmp30 ;
tmp7 = tmp31 ;
tmp8 = tmp32 ;
tmp9 = tmp33 ;
tmp10 = tmp34 ;
tmp11 = tmp35 ;
tmp15 = tmp25 ;
tmp16 = tmp26 ;
tmp17 = tmp27 ;
let tmp54 = arr3 ;
2026-07-23 10:11:24 +00:00
tmp18 = num2 ;
tmp19 = tmp30 ;
tmp20 = tmp31 ;
tmp21 = tmp32 ;
tmp22 = tmp33 ;
tmp23 = tmp34 ;
tmp24 = tmp35 ;
2026-07-20 16:05:17 +00:00
} while ( num5 < items1 . length ) ;
}
if ( null == tmp16 ) {
break ;
} else if ( null == tmp17 ) {
break ;
} else if ( tmp17 . index ) {
let _Error = Error ;
let tmp59 = new . target ;
let str4 = "`match` must return a capture starting at index 0 (the current parse index). Did you forget a ^ at the start of the RegExp?" ;
let tmp60 = new . target ;
let error = new Error ( "`match` must return a capture starting at index 0 (the current parse index). Did you forget a ^ at the start of the RegExp?" ) ;
let tmp62 = error ;
throw error ;
} else {
let tmp55 = nestedParse ;
let parsed = tmp16 . parse ( tmp17 , nestedParse , merged ) ;
let _Array = Array ;
if ( Array . isArray ( parsed ) ) {
let _Array2 = Array ;
let applyResult = push . apply ( items , parsed ) ;
} else {
if ( null == parsed . type ) {
parsed . type = tmp15 ;
}
let arr = items . push ( parsed ) ;
}
merged . prevCapture = tmp17 ;
str3 = str3 . substring ( merged . prevCapture [ 0 ] . length ) ;
}
}
const _Error2 = Error ;
2026-07-23 10:11:24 +00:00
const error1 = new Error ( "Could not find a matching rule for the below content. The rule with highest `order` should always match content provided to it. Check the definition of `match` for '" + found [ found . length - 1 ] + "'. It seems to not match the following source:\n" + str3 ) ;
2026-07-20 16:05:17 +00:00
throw error1 ;
}
return items ;
}
}
function outerParse ( arg0 , arg1 ) {
2026-07-23 10:11:24 +00:00
const tmp = outer1 _11 ( arg1 , closure _1 ) ;
2026-07-20 16:05:17 +00:00
let disableAutoBlockNewlines = tmp . inline ;
if ( ! disableAutoBlockNewlines ) {
2026-07-23 10:11:24 +00:00
disableAutoBlockNewlines = obj . disableAutoBlockNewlines ;
2026-07-20 16:05:17 +00:00
}
let text = arg0 ;
if ( ! disableAutoBlockNewlines ) {
text = ` ${ arg0 }
` ;
}
tmp . prevCapture = null ;
2026-07-23 10:11:24 +00:00
return nestedParse ( outer1 _10 ( text ) , tmp ) ;
2026-07-20 16:05:17 +00:00
}
nestedParse . rules = rules ;
outerParse . rules = rules ;
return outerParse ;
}
function inlineRegex ( _RegExp5 ) {
let closure _0 = _RegExp5 ;
function match ( arg0 , inline ) {
let match = null ;
if ( inline . inline ) {
2026-07-23 10:11:24 +00:00
match = regex . exec ( arg0 ) ;
2026-07-20 16:05:17 +00:00
}
return match ;
}
match . regex = _RegExp5 ;
return match ;
}
function blockRegex ( NPTABLE _REGEX ) {
let closure _0 = NPTABLE _REGEX ;
function match ( arg0 , inline ) {
let match = null ;
if ( ! inline . inline ) {
2026-07-23 10:11:24 +00:00
match = NPTABLE _REGEX . exec ( arg0 ) ;
2026-07-20 16:05:17 +00:00
}
return match ;
}
match . regex = NPTABLE _REGEX ;
return match ;
}
function anyScopeRegex ( MARKDOWN _SPOILER _REGEXP ) {
let closure _0 = MARKDOWN _SPOILER _REGEXP ;
function match ( arg0 , arg1 ) {
2026-07-23 10:11:24 +00:00
return MARKDOWN _SPOILER _REGEXP . exec ( arg0 ) ;
2026-07-20 16:05:17 +00:00
}
match . regex = MARKDOWN _SPOILER _REGEXP ;
return match ;
}
let _for = "function" === typeof Symbol ;
if ( _for ) {
const _Symbol = Symbol ;
_for = Symbol . for ;
}
if ( _for ) {
const _Symbol2 = Symbol ;
_for = Symbol . for ( "react.transitional.element" ) ;
}
let num = _for ;
if ( ! _for ) {
num = 60103 ;
}
function reactElement ( code , key , closure _15 ) {
const obj = { $$typeof : num , type : code } ;
let tmp ;
if ( null != key ) {
tmp = key ;
}
obj . key = tmp ;
obj . ref = null ;
obj . props = closure _15 ;
obj . _owner = null ;
return obj ;
}
function htmlTag ( code , joined , arg2 , arg3 ) {
let obj = arg2 ;
if ( ! arg2 ) {
obj = { } ;
}
let str = "" ;
let str2 = "" ;
const keys = Object . keys ( ) ;
if ( keys !== undefined ) {
str2 = str ;
while ( keys [ tmp ] !== undefined ) {
let tmp13 = tmp5 ;
let tmp14 = obj [ tmp5 ] ;
let _Object = Object ;
let tmp6 = hasOwnProperty . call ( obj , tmp5 ) && tmp14 ;
if ( ! tmp6 ) {
continue ;
} else {
let tmp7 = sanitizeText ;
let tmp9 = sanitizeText ;
2026-07-23 10:11:24 +00:00
let text = ` ${ sanitizeText ( tmp5 ) } ` ;
str = ` ${ tmp4 } ${ ` ${ sanitizeText ( tmp5 ) } ` } =" ${ sanitizeText ( tmp14 ) } " ` ;
continue ;
2026-07-20 16:05:17 +00:00
}
continue ;
}
}
const text1 = ` ${ "<" + code + str2 } > ` ;
let text2 = text1 ;
if ( tmp2 ) {
text2 = ` ${ ` ${ "<" + code + str2 } > ` + joined + "</" + code } > ` ;
}
return text2 ;
}
let closure _15 = { } ;
function sanitizeUrl ( target ) {
if ( null == target ) {
return null ;
} else {
const _URL = URL ;
const uRL = new URL ( tmp , "https://localhost" ) ;
const protocol = uRL . protocol ;
if ( 0 !== protocol . indexOf ( "javascript:" ) ) {
if ( 0 !== arr2 . indexOf ( "vbscript:" ) ) {
if ( 0 !== arr2 . indexOf ( "data:" ) ) {
return target ;
}
}
}
return null ;
}
}
2026-07-23 10:11:24 +00:00
const re17 = /[<>&"']/g ;
let closure _18 = { "<" : "<" , ">" : ">" , "&" : "&" , "\"" : """ , "'" : "'" , "/" : "/" , "`" : "`" } ;
2026-07-20 16:05:17 +00:00
function sanitizeText ( content ) {
2026-07-23 10:11:24 +00:00
return String ( content ) . replace ( closure _17 , ( arg0 ) => outer1 _18 [ arg0 ] ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const re20 = /\\([^0-9A-Za-z\s])/g ;
2026-07-20 16:05:17 +00:00
function unescapeUrl ( str ) {
return str . replace ( closure _20 , "$1" ) ;
}
function parseInline ( arg0 , formatted , inline ) {
inline . inline = true ;
inline . inline = inline . inline || false ;
return arg0 ( formatted , inline ) ;
}
function parseCaptureInline ( arg0 , arg1 , inline ) {
return { content : parseInline ( arg1 , arg0 [ 1 ] , inline ) } ;
}
function ignoreCapture ( ) {
return { } ;
}
2026-07-23 10:11:24 +00:00
let regExp = new RegExp ( "^( *)((?:[*+-]|\\d+\\.)) +" ) ;
2026-07-20 16:05:17 +00:00
const regExp1 = new RegExp ( "( *)((?:[*+-]|\\d+\\.)) +[^\\n]*(?:\\n(?!\\1(?:[*+-]|\\d+\\.) )[^\\n]*)*(\n|$)" , "gm" ) ;
2026-07-23 10:11:24 +00:00
let tmp3 = /\n{2,}$/ ;
let closure _25 = tmp3 ;
const re26 = /^ (?= *`)|(` *) $/g ;
let closure _27 = tmp3 ;
const re28 = / *\n+$/ ;
2026-07-20 16:05:17 +00:00
const regExp2 = new RegExp ( "^( *)((?:[*+-]|\\d+\\.)) [\\s\\S]+?(?:\n{2,}(?! )(?!\\1(?:[*+-]|\\d+\\.) )\\n*|\\s*\n*$)" ) ;
2026-07-23 10:11:24 +00:00
const re30 = /(?:^|\n)( *)$/ ;
const re0 = /^ *\| *| *\| *$/g ;
const re1 = / *$/ ;
const re2 = /^ *-+: *$/ ;
const re3 = /^ *:-+: *$/ ;
const re4 = /^ *:-+ *$/ ;
2026-07-20 16:05:17 +00:00
function parseTableAlignCapture ( arg0 ) {
let str = "right" ;
if ( ! regex . test ( arg0 ) ) {
let str2 = "center" ;
if ( ! regex2 . test ( arg0 ) ) {
let str3 = null ;
if ( regex3 . test ( arg0 ) ) {
str3 = "left" ;
}
str2 = str3 ;
}
str = str2 ;
}
return str ;
}
function parseTableRow ( str , arg1 , inTable ) {
let closure _0 = arg3 ;
inTable . inTable = true ;
2026-07-23 10:11:24 +00:00
let arr = arg1 ( str . trim ( ) , inTable ) ;
2026-07-20 16:05:17 +00:00
inTable . inTable = inTable . inTable ;
const items = [ [ ] ] ;
const item = arr . forEach ( ( type ) => {
if ( "tableSeparator" === type . type ) {
2026-07-23 10:11:24 +00:00
let tmp10 = ! closure _0 ;
2026-07-20 16:05:17 +00:00
if ( ! tmp10 ) {
let tmp11 = 0 !== arg1 ;
if ( tmp11 ) {
tmp11 = arg1 !== arr . length - 1 ;
}
tmp10 = tmp11 ;
}
if ( tmp10 ) {
2026-07-23 10:11:24 +00:00
arr = items . push ( [ ] ) ;
2026-07-20 16:05:17 +00:00
}
} else {
let tmp5 = "text" !== type . type ;
if ( ! tmp5 ) {
let tmp3 = null != arr [ arg1 + 1 ] ;
if ( tmp3 ) {
tmp3 = "tableSeparator" !== arr [ arg1 + 1 ] . type ;
}
tmp5 = tmp3 ;
}
if ( ! tmp5 ) {
type . content = type . content . replace ( arr , "" ) ;
const str = type . content ;
}
2026-07-23 10:11:24 +00:00
arr = items [ items . length - 1 ] ;
2026-07-20 16:05:17 +00:00
arr = arr . push ( type ) ;
}
} ) ;
return items ;
}
let obj = { parseTable : parseTable ( true ) , parseNpTable : parseTable ( false ) , TABLE _REGEX : /^ *(\|.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/ , NPTABLE _REGEX : /^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/ } ;
2026-07-23 10:11:24 +00:00
parseTable = function parseTable ( arg0 ) {
2026-07-20 16:05:17 +00:00
let closure _0 = arg0 ;
return ( arg0 , arg1 , arg2 ) => {
arg2 . inline = true ;
let str2 = str ;
2026-07-23 10:11:24 +00:00
if ( closure _0 ) {
str2 = str . replace ( closure _0 , "" ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const tmp = closure _0 ;
const tmp2 = outer1 _6 ( arg0 [ 1 ] , arg1 , arg2 , closure _0 ) ;
let parts = str2 . trim ( ) . split ( "|" ) ;
const mapped = parts . map ( outer1 _5 ) ;
2026-07-20 16:05:17 +00:00
arg2 . inline = false ;
const str4 = str2 . trim ( ) ;
return {
type : "table" ,
header : tmp2 ,
align : mapped ,
2026-07-23 10:11:24 +00:00
cells : ( function parseTableCells ( str , arg1 , arg2 , arg3 ) {
let closure _0 = arg1 ;
let closure _1 = arg2 ;
let closure _2 = arg3 ;
2026-07-20 16:05:17 +00:00
const parts = str . trim ( ) . split ( "\n" ) ;
2026-07-23 10:11:24 +00:00
return parts . map ( ( arg0 ) => outer3 _6 ( arg0 , closure _0 , closure _1 , closure _2 ) ) ;
} ) ( arg0 [ 3 ] , arg1 , arg2 , tmp )
2026-07-20 16:05:17 +00:00
} ;
} ;
2026-07-23 10:11:24 +00:00
} ;
const re31 = /mailto:/i ;
2026-07-20 16:05:17 +00:00
function parseRef ( alt , _defs , arg2 ) {
let str = alt [ 2 ] ;
if ( ! str ) {
str = alt [ 1 ] ;
}
const formatted = str . replace ( /\s+/g , " " ) . toLowerCase ( ) ;
if ( _defs . _defs ) {
if ( _defs . _defs [ formatted ] ) {
( { target : arg2 . target , title : arg2 . title } = _defs . _defs [ formatted ] ) ;
}
}
_defs . _refs = _defs . _refs || { } ;
let items = _defs . _refs [ formatted ] ;
if ( ! items ) {
items = [ ] ;
}
_defs . _refs [ formatted ] = items ;
_defs . _refs [ formatted ] . push ( arg2 ) ;
return arg2 ;
}
const regExp3 = new RegExp ( "(?<=a)" ) ;
const regExp4 = new RegExp ( "(?<!a)" ) ;
while ( true ) {
let num2 = 0 ;
let num3 = 0 ;
obj = { } ;
obj = {
react ( arg0 , arg1 , key ) {
const items = [ ] ;
let num = 0 ;
let num2 = 0 ;
if ( 0 < arg0 . length ) {
do {
key . key = "" + num2 ;
let tmp = arg0 [ num2 ] ;
let tmp2 = num2 ;
let tmp3 = tmp ;
if ( "text" === tmp . type ) {
let obj = { type : "text" , content : tmp . content } ;
tmp2 = num2 ;
tmp3 = obj ;
if ( num2 + 1 < arg0 . length ) {
let tmp4 = num2 ;
tmp2 = num2 ;
tmp3 = obj ;
if ( "text" === arg0 [ num2 + 1 ] . type ) {
obj . content = obj . content + arg0 [ tmp4 + 1 ] . content ;
let sum = tmp4 + 1 ;
tmp2 = sum ;
tmp3 = obj ;
while ( sum + 1 < arg0 . length ) {
tmp4 = sum ;
tmp2 = sum ;
tmp3 = obj ;
if ( "text" !== arg0 [ sum + 1 ] . type ) {
break ;
}
}
}
}
}
let arr = items . push ( arg1 ( tmp3 , key ) ) ;
num2 = tmp2 + 1 ;
num = num + 1 ;
} while ( num2 < arg0 . length ) ;
}
key . key = key . key ;
return items ;
} ,
html ( arg0 , arg1 , arg2 ) {
let num = 0 ;
let str = "" ;
let str2 = "" ;
if ( 0 < arg0 . length ) {
do {
let tmp = arg0 [ num ] ;
let tmp2 = num ;
let tmp3 = tmp ;
if ( "text" === tmp . type ) {
let obj = { type : "text" , content : tmp . content } ;
tmp2 = num ;
tmp3 = obj ;
if ( num + 1 < arg0 . length ) {
let tmp4 = num ;
tmp2 = num ;
tmp3 = obj ;
if ( "text" === arg0 [ num + 1 ] . type ) {
obj . content = obj . content + arg0 [ tmp4 + 1 ] . content ;
let sum = tmp4 + 1 ;
tmp2 = sum ;
tmp3 = obj ;
while ( sum + 1 < arg0 . length ) {
tmp4 = sum ;
tmp2 = sum ;
tmp3 = obj ;
if ( "text" !== arg0 [ sum + 1 ] . type ) {
break ;
}
}
}
}
}
str = str + arg1 ( tmp3 , arg2 ) ;
num = tmp2 + 1 ;
str2 = str ;
} while ( num < arg0 . length ) ;
}
return str2 ;
}
} ;
obj . Array = obj ;
let obj1 = { } ;
let num4 = 1 ;
obj1 . order = 0 ;
let tmp7 = blockRegex ;
obj1 . match = blockRegex ( /^ *(#{1,6})([^\n]+?)#* *(?:\n *)+\n/ ) ;
obj1 . parse = function parse ( level , arg1 , inline ) {
return { level : level [ 1 ] . length , content : parseInline ( arg1 , str . trim ( ) , inline ) } ;
} ;
obj1 . react = function react ( content , arg1 , key ) {
return reactElement ( ` h ${ content . level } ` , key . key , { children : arg1 ( content . content , key ) } ) ;
} ;
obj1 . html = function html ( content ) {
return htmlTag ( ` h ${ content . level } ` , arg1 ( content . content , arg2 ) ) ;
} ;
obj . heading = obj1 ;
2026-07-23 10:11:24 +00:00
let obj2 = { order : 1 , match : null , parse : null , react : null , html : null } ;
2026-07-20 16:05:17 +00:00
let num5 = 2 ;
obj2 . match = blockRegex ( obj . NPTABLE _REGEX ) ;
obj2 . parse = obj . parseNpTable ;
obj . nptable = obj2 ;
2026-07-23 10:11:24 +00:00
let obj3 = { order : 2 , match : null , parse : null , react : null , html : null } ;
2026-07-20 16:05:17 +00:00
let num6 = 3 ;
let num7 = 3 ;
obj3 . match = blockRegex ( /^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/ ) ;
obj3 . parse = function parse ( arg0 , arg1 , inline ) {
const obj = { type : "heading" } ;
let num = 2 ;
if ( "=" === arg0 [ 2 ] ) {
num = 1 ;
}
obj . level = num ;
obj . content = parseInline ( arg1 , arg0 [ 1 ] , inline ) ;
return obj ;
} ;
obj . lheading = obj3 ;
let obj4 = { } ;
let num8 = 4 ;
let num9 = 4 ;
obj4 . order = 3 ;
obj4 . match = blockRegex ( /^( *[-*_]){3,} *(?:\n *)+\n/ ) ;
let tmp8 = ignoreCapture ;
obj4 . parse = ignoreCapture ;
obj4 . react = function react ( arg0 , arg1 , key ) {
return reactElement ( "hr" , key . key , closure _15 ) ;
} ;
obj4 . html = function html ( arg0 , arg1 , arg2 ) {
return "<hr>" ;
} ;
obj . hr = obj4 ;
let obj5 = { } ;
let num10 = 5 ;
obj5 . order = 4 ;
obj5 . match = blockRegex ( /^(?: [^\n]+\n*)+(?:\n *)+\n/ ) ;
obj5 . parse = function parse ( arg0 , arg1 , arg2 ) {
const obj = { lang : undefined , content : arg0 [ 0 ] . replace ( /^ /gm , "" ) . replace ( /\n+$/ , "" ) } ;
return obj ;
} ;
obj5 . react = function react ( lang , arg1 , key ) {
let text ;
if ( lang . lang ) {
text = ` markdown-code- ${ lang . lang } ` ;
}
2026-07-23 10:11:24 +00:00
obj = { children : reactElement ( "code" , null , obj ) } ;
2026-07-20 16:05:17 +00:00
obj = { className : text , children : lang . content } ;
return reactElement ( "pre" , key . key , obj ) ;
} ;
obj5 . html = function html ( lang ) {
let text ;
if ( lang . lang ) {
text = ` markdown-code- ${ lang . lang } ` ;
}
const obj = { class : text } ;
return htmlTag ( "pre" , htmlTag ( "code" , sanitizeText ( lang . content ) , obj ) ) ;
} ;
obj . codeBlock = obj5 ;
2026-07-23 10:11:24 +00:00
let obj6 = { order : 5 , match : null , parse : null , react : null , html : null } ;
2026-07-20 16:05:17 +00:00
let num11 = 6 ;
let num12 = 6 ;
obj6 . match = blockRegex ( /^ *(`{3,}|~{3,}) *(?:(\S+) *)?\n([\s\S]+?)\n?\1 *(?:\n *)+\n/ ) ;
obj6 . parse = function parse ( content ) {
return { type : "codeBlock" , lang : tmp , content : content [ 3 ] } ;
} ;
obj . fence = obj6 ;
let obj7 = { } ;
let num13 = 7 ;
let num14 = 7 ;
obj7 . order = 6 ;
obj7 . match = blockRegex ( /^( *>[^\n]+(\n[^\n]+)*\n*)+\n{2,}/ ) ;
obj7 . parse = function parse ( arg0 , arg1 , arg2 ) {
return { content : arg1 ( str . replace ( /^ *> ?/gm , "" ) , arg2 ) } ;
} ;
obj7 . react = function react ( content , arg1 , key ) {
return reactElement ( "blockquote" , key . key , { children : arg1 ( content . content , key ) } ) ;
} ;
obj7 . html = function html ( content ) {
return htmlTag ( "blockquote" , arg1 ( content . content , arg2 ) ) ;
} ;
obj . blockQuote = obj7 ;
let obj8 = { } ;
let num15 = 8 ;
let num16 = 8 ;
obj8 . order = 7 ;
obj8 . match = function match ( arg0 , prevCapture ) {
let str = "" ;
if ( null != prevCapture . prevCapture ) {
str = prevCapture . prevCapture [ 0 ] ;
}
const match = regex4 . exec ( str ) ;
let match1 = null ;
if ( match ) {
match1 = null ;
if ( tmp2 ) {
match1 = regExp2 . exec ( match [ 1 ] + arg0 ) ;
}
}
return match1 ;
} ;
obj8 . parse = function parse ( arg0 , arg1 , arg2 ) {
let closure _0 = arg1 ;
let closure _1 = arg2 ;
let tmp2 ;
if ( arg0 [ 2 ] . length > 1 ) {
tmp2 = + arr ;
}
2026-07-23 10:11:24 +00:00
let match = arg0 [ 0 ] . replace ( closure _27 , "\n" ) . match ( regExp1 ) ;
let c3 = false ;
2026-07-20 16:05:17 +00:00
const obj = {
ordered : arg0 [ 2 ] . length > 1 ,
start : tmp2 ,
items : match . map ( ( str ) => {
let _list ;
let inline ;
2026-07-23 10:11:24 +00:00
const match = outer1 _23 . exec ( str ) ;
2026-07-20 16:05:17 +00:00
let num = 0 ;
if ( match ) {
num = match [ 0 ] . length ;
}
const regExp = new RegExp ( "^ {1," + num + "}" , "gm" ) ;
2026-07-23 10:11:24 +00:00
const replaced = str . replace ( regExp , "" ) . replace ( outer1 _23 , "" ) ;
2026-07-20 16:05:17 +00:00
let tmp3 = arg1 === match . length - 1 ;
let tmp4 = - 1 !== replaced . indexOf ( "\n\n" ) ;
if ( ! tmp4 ) {
if ( tmp3 ) {
2026-07-23 10:11:24 +00:00
tmp3 = c3 ;
2026-07-20 16:05:17 +00:00
}
tmp4 = tmp3 ;
}
2026-07-23 10:11:24 +00:00
c3 = tmp4 ;
closure _1 . _list = true ;
( { inline , _list } = closure _1 ) ;
2026-07-20 16:05:17 +00:00
if ( tmp4 ) {
tmp5 . inline = false ;
2026-07-23 10:11:24 +00:00
let replaced1 = replaced . replace ( outer1 _28 , "\n\n" ) ;
2026-07-20 16:05:17 +00:00
} else {
tmp5 . inline = true ;
2026-07-23 10:11:24 +00:00
replaced1 = replaced . replace ( outer1 _28 , "" ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
closure _1 . inline = inline ;
closure _1 . _list = _list ;
return callback ( replaced1 , closure _1 ) ;
2026-07-20 16:05:17 +00:00
} )
} ;
return obj ;
} ;
obj8 . react = function react ( ordered , arg1 , key ) {
let closure _0 = arg1 ;
let closure _1 = key ;
let str = "ul" ;
if ( ordered . ordered ) {
str = "ol" ;
}
const items = ordered . items ;
2026-07-23 10:11:24 +00:00
return reactElement ( str , key . key , { start : ordered . start , children : items . map ( ( arg0 , arg1 ) => outer1 _13 ( "li" , ` ${ arg1 } ` , { children : callback ( arg0 , closure _1 ) } ) ) } ) ;
2026-07-20 16:05:17 +00:00
} ;
obj8 . html = function html ( items ) {
let closure _0 = arg1 ;
let closure _1 = arg2 ;
items = items . items ;
2026-07-23 10:11:24 +00:00
const mapped = items . map ( ( arg0 ) => outer1 _14 ( "li" , callback ( arg0 , closure _1 ) ) ) ;
2026-07-20 16:05:17 +00:00
let str = "ul" ;
const joined = mapped . join ( "" ) ;
if ( items . ordered ) {
str = "ol" ;
}
return htmlTag ( str , joined , { start : items . start } ) ;
} ;
obj . list = obj8 ;
let obj9 = { } ;
let num17 = 9 ;
let num18 = 9 ;
obj9 . order = 8 ;
obj9 . match = blockRegex ( /^ *\[([^\]]+)\]: *<?([^\s>]*)>?(?: +["(]([^\n]+)[")])? *\n(?: *\n)*/ ) ;
obj9 . parse = function parse ( arg0 , arg1 , _refs ) {
const def = arg0 [ 1 ] . replace ( /\s+/g , " " ) . toLowerCase ( ) ;
const target = arg0 [ 2 ] ;
const title = arg0 [ 3 ] ;
if ( tmp4 ) {
const item = _refs . _refs [ def ] . forEach ( ( arg0 ) => {
arg0 . target = target ;
arg0 . title = title ;
} ) ;
const arr = _refs . _refs [ def ] ;
}
_refs . _defs = _refs . _defs || { } ;
_refs . _defs [ def ] = { target , title } ;
return { def , target , title } ;
} ;
obj9 . react = function react ( ) {
return null ;
} ;
obj9 . html = function html ( ) {
return "" ;
} ;
obj . def = obj9 ;
let obj10 = { } ;
let num19 = 10 ;
let num20 = 10 ;
obj10 . order = 9 ;
obj10 . match = blockRegex ( obj . TABLE _REGEX ) ;
obj10 . parse = obj . parseTable ;
obj10 . react = function react ( arg0 , arg1 , key ) {
let cells ;
let header ;
let closure _0 = arg0 ;
let closure _1 = arg1 ;
let closure _2 = key ;
function getStyle ( arg0 ) {
2026-07-23 10:11:24 +00:00
if ( null == closure _0 . align [ arg0 ] ) {
2026-07-20 16:05:17 +00:00
let obj = { } ;
} else {
2026-07-23 10:11:24 +00:00
obj = { textAlign : closure _0 . align [ arg0 ] } ;
2026-07-20 16:05:17 +00:00
}
return obj ;
}
( { header , cells } = arg0 ) ;
2026-07-23 10:11:24 +00:00
const mapped = header . map ( ( arg0 , arg1 ) => outer1 _13 ( "th" , ` ${ arg1 } ` , { style : getStyle ( arg1 ) , scope : "col" , children : callback ( arg0 , closure _2 ) } ) ) ;
2026-07-20 16:05:17 +00:00
let obj = { } ;
obj = { } ;
2026-07-23 10:11:24 +00:00
const mapped1 = cells . map ( ( arr ) => outer1 _13 ( "tr" , ` ${ arg1 } ` , { children : arr . map ( ( arg0 , arg1 ) => outer2 _13 ( "td" , ` ${ arg1 } ` , { style : outer1 _3 ( arg1 ) , children : outer1 _1 ( arg0 , outer1 _2 ) } ) ) } ) ) ;
2026-07-20 16:05:17 +00:00
obj . children = reactElement ( "tr" , null , { children : mapped } ) ;
const items = [ reactElement ( "thead" , "thead" , obj ) , reactElement ( "tbody" , "tbody" , { children : mapped1 } ) ] ;
obj . children = items ;
return reactElement ( "table" , key . key , obj ) ;
} ;
obj10 . html = function html ( header ) {
let closure _0 = header ;
let closure _1 = arg1 ;
let closure _2 = arg2 ;
function getStyle ( arg0 ) {
let str = "" ;
2026-07-23 10:11:24 +00:00
if ( null != header . align [ arg0 ] ) {
2026-07-20 16:05:17 +00:00
str = ` ${ "text-align:" + closure _0 . align [ arg0 ] } ; ` ;
}
return str ;
}
header = header . header ;
2026-07-23 10:11:24 +00:00
let mapped = header . map ( ( arg0 , arg1 ) => {
2026-07-20 16:05:17 +00:00
const obj = { style : getStyle ( arg1 ) , scope : "col" } ;
2026-07-23 10:11:24 +00:00
return outer1 _14 ( "th" , callback ( arg0 , closure _2 ) , obj ) ;
2026-07-20 16:05:17 +00:00
} ) ;
const cells = header . cells ;
const joined = mapped . join ( "" ) ;
const mapped1 = cells . map ( ( arr ) => {
const mapped = arr . map ( ( arg0 , arg1 ) => {
2026-07-23 10:11:24 +00:00
const obj = { style : outer1 _3 ( arg1 ) } ;
return outer2 _14 ( "td" , outer1 _1 ( arg0 , outer1 _2 ) , obj ) ;
2026-07-20 16:05:17 +00:00
} ) ;
2026-07-23 10:11:24 +00:00
return outer1 _14 ( "tr" , mapped . join ( "" ) ) ;
2026-07-20 16:05:17 +00:00
} ) ;
const joined1 = mapped1 . join ( "" ) ;
return htmlTag ( "table" , htmlTag ( "thead" , htmlTag ( "tr" , joined ) ) + htmlTag ( "tbody" , joined1 ) ) ;
} ;
obj . table = obj10 ;
let obj11 = { } ;
let num21 = 11 ;
let num22 = 11 ;
obj11 . order = 10 ;
2026-07-23 10:11:24 +00:00
obj11 . requiredFirstCharacters = [ "\n" ] ;
2026-07-20 16:05:17 +00:00
obj11 . match = blockRegex ( /^(?:\n *)*\n/ ) ;
obj11 . parse = ignoreCapture ;
obj11 . react = function react ( arg0 , arg1 , arg2 ) {
return "\n" ;
} ;
obj11 . html = function html ( arg0 , arg1 , arg2 ) {
return "\n" ;
} ;
obj . newline = obj11 ;
let obj12 = { } ;
let num23 = 12 ;
obj12 . order = 11 ;
obj12 . match = blockRegex ( /^((?:[^\n]|\n(?! *\n))+)(?:\n *)+\n/ ) ;
let tmp9 = parseCaptureInline ;
obj12 . parse = parseCaptureInline ;
obj12 . react = function react ( content , arg1 , key ) {
return reactElement ( "div" , key . key , { className : "paragraph" , children : arg1 ( content . content , key ) } ) ;
} ;
obj12 . html = function html ( content ) {
return htmlTag ( "div" , arg1 ( content . content , arg2 ) , { class : "paragraph" } ) ;
} ;
obj . paragraph = obj12 ;
2026-07-23 10:11:24 +00:00
let obj13 = { order : 12 , requiredFirstCharacters : null , match : null , parse : null , react : null , html : null } ;
2026-07-20 16:05:17 +00:00
let num24 = 13 ;
let num25 = 13 ;
2026-07-23 10:11:24 +00:00
obj13 . requiredFirstCharacters = [ "\\" ] ;
2026-07-20 16:05:17 +00:00
let tmp10 = inlineRegex ;
obj13 . match = inlineRegex ( /^\\([^0-9A-Za-z\s])/ ) ;
obj13 . parse = function parse ( content ) {
return { type : "text" , content : content [ 1 ] } ;
} ;
obj . escape = obj13 ;
let obj14 = { } ;
let num26 = 14 ;
obj14 . order = 13 ;
obj14 . match = function match ( arg0 , inTable ) {
let match = null ;
if ( inTable . inTable ) {
match = /^ *\| */ . exec ( arg0 ) ;
const obj = /^ *\| */ ;
}
return match ;
} ;
obj14 . parse = function parse ( ) {
return { type : "tableSeparator" } ;
} ;
obj14 . react = function react ( ) {
return " | " ;
} ;
obj14 . html = function html ( ) {
return " | " ;
} ;
obj . tableSeparator = obj14 ;
2026-07-23 10:11:24 +00:00
let obj15 = { order : 14 , requiredFirstCharacters : null , match : null , parse : null , react : null , html : null } ;
2026-07-20 16:05:17 +00:00
let num27 = 15 ;
2026-07-23 10:11:24 +00:00
obj15 . requiredFirstCharacters = [ "<" ] ;
2026-07-20 16:05:17 +00:00
obj15 . match = inlineRegex ( /^<([^: >]+:\/[^ >]+)>/ ) ;
obj15 . parse = function parse ( content ) {
let obj = { type : "link" , content : items , target : content [ 1 ] } ;
obj = { type : "text" , content : content [ 1 ] } ;
2026-07-23 10:11:24 +00:00
items = [ obj ] ;
2026-07-20 16:05:17 +00:00
return obj ;
} ;
obj . autolink = obj15 ;
2026-07-23 10:11:24 +00:00
let obj16 = { order : 15 , match : null , parse : null , react : null , html : null } ;
2026-07-20 16:05:17 +00:00
let num28 = 16 ;
obj16 . match = inlineRegex ( /^<([^ >]+@[^ >]+)>/ ) ;
obj16 . parse = function parse ( content ) {
let text = tmp ;
if ( ! regex5 . test ( content [ 1 ] ) ) {
text = ` mailto: ${ tmp } ` ;
}
const obj = { type : "link" , content : items } ;
2026-07-23 10:11:24 +00:00
items = [ { type : "text" , content : content [ 1 ] } ] ;
2026-07-20 16:05:17 +00:00
obj . target = text ;
return obj ;
} ;
obj . mailto = obj16 ;
2026-07-23 10:11:24 +00:00
let obj17 = { order : 16 , requiredFirstCharacters : null , match : null , parse : null , react : null , html : null } ;
2026-07-20 16:05:17 +00:00
let num29 = 17 ;
let num30 = 17 ;
2026-07-23 10:11:24 +00:00
obj17 . requiredFirstCharacters = [ "h" ] ;
2026-07-20 16:05:17 +00:00
obj17 . match = inlineRegex ( /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/ ) ;
obj17 . parse = function parse ( content ) {
let obj = { type : "link" , content : items , target : content [ 1 ] , title : undefined } ;
obj = { type : "text" , content : content [ 1 ] } ;
2026-07-23 10:11:24 +00:00
items = [ obj ] ;
2026-07-20 16:05:17 +00:00
return obj ;
} ;
obj . url = obj17 ;
let obj18 = { } ;
let num31 = 18 ;
let num32 = 18 ;
obj18 . order = 17 ;
2026-07-23 10:11:24 +00:00
obj18 . requiredFirstCharacters = [ "[" ] ;
2026-07-20 16:05:17 +00:00
let _RegExp = RegExp ;
let tmp11 = new . target ;
let str2 = "^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*\\)" ;
let tmp12 = new . target ;
let regExp5 = new RegExp ( "^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*\\)" ) ;
let tmp14 = regExp5 ;
obj18 . match = inlineRegex ( regExp5 ) ;
obj18 . parse = function parse ( title ) {
return { content : arg1 ( title [ 1 ] , arg2 ) , target : unescapeUrl ( title [ 2 ] ) , title : title [ 3 ] } ;
} ;
obj18 . react = function react ( target , arg1 , key ) {
return reactElement ( "a" , key . key , { href : sanitizeUrl ( target . target ) , title : target . title , children : arg1 ( target . content , key ) } ) ;
} ;
obj18 . html = function html ( target ) {
return htmlTag ( "a" , arg1 ( target . content , arg2 ) , { href : sanitizeUrl ( target . target ) , title : target . title } ) ;
} ;
obj . link = obj18 ;
let obj19 = { } ;
let num33 = 19 ;
obj19 . order = 18 ;
let _RegExp2 = RegExp ;
let tmp15 = new . target ;
let str3 = "^!\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*\\)" ;
let tmp16 = new . target ;
let regExp6 = new RegExp ( "^!\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*\\)" ) ;
let tmp18 = regExp6 ;
obj19 . match = inlineRegex ( regExp6 ) ;
obj19 . parse = function parse ( alt ) {
return { alt : alt [ 1 ] , target : unescapeUrl ( alt [ 2 ] ) , title : alt [ 3 ] } ;
} ;
obj19 . react = function react ( alt , arg1 , key ) {
return reactElement ( "img" , key . key , { src : sanitizeUrl ( alt . target ) , alt : alt . alt , title : alt . title } ) ;
} ;
obj19 . html = function html ( alt ) {
return htmlTag ( "img" , "" , { src : sanitizeUrl ( alt . target ) , alt : alt . alt , title : alt . title } , false ) ;
} ;
obj . image = obj19 ;
2026-07-23 10:11:24 +00:00
let obj20 = { order : 19 , match : null , parse : null , react : null , html : null } ;
2026-07-20 16:05:17 +00:00
let num34 = 20 ;
let _RegExp3 = RegExp ;
let tmp19 = new . target ;
let str4 = "^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\s*\\[([^\\]]*)\\]" ;
let tmp20 = new . target ;
let regExp7 = new RegExp ( "^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\s*\\[([^\\]]*)\\]" ) ;
let tmp22 = regExp7 ;
obj20 . match = inlineRegex ( regExp7 ) ;
obj20 . parse = function parse ( alt , arg1 , _defs ) {
return parseRef ( alt , _defs , { type : "link" , content : arg1 ( alt [ 1 ] , _defs ) } ) ;
} ;
obj . reflink = obj20 ;
2026-07-23 10:11:24 +00:00
let obj21 = { order : 20 , match : null , parse : null , react : null , html : null } ;
2026-07-20 16:05:17 +00:00
let num35 = 21 ;
let num36 = 21 ;
let _RegExp4 = RegExp ;
let tmp23 = new . target ;
let str5 = "^!\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\s*\\[([^\\]]*)\\]" ;
let tmp24 = new . target ;
let regExp8 = new RegExp ( "^!\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\s*\\[([^\\]]*)\\]" ) ;
let tmp26 = regExp8 ;
obj21 . match = inlineRegex ( regExp8 ) ;
obj21 . parse = function parse ( alt , arg1 , _defs ) {
return parseRef ( alt , _defs , { type : "image" , alt : alt [ 1 ] } ) ;
} ;
obj . refimage = obj21 ;
let obj22 = { order : 21 } ;
let _RegExp5 = RegExp ;
let str6 = "^\\b_((?:__|\\\\[\\s\\S]|[^\\\\_])+?)_\\b" ;
break ;
let prototype5 = _RegExp5 . prototype ;
let tmp27 = new . target ;
let str7 = "|^\\*(?=\\S)((?:\\*\\*|\\\\[\\s\\S]|\\s+(?:\\\\[\\s\\S]|[^\\s\\*\\\\]|\\*\\*)|[^\\s\\*\\\\])+?)\\*(?!\\*)" ;
let tmp28 = new . target ;
_RegExp5 = new _RegExp5 ( str6 + "|^\\*(?=\\S)((?:\\*\\*|\\\\[\\s\\S]|\\s+(?:\\\\[\\s\\S]|[^\\s\\*\\\\]|\\*\\*)|[^\\s\\*\\\\])+?)\\*(?!\\*)" ) ;
let tmp30 = _RegExp5 ;
obj22 . match = inlineRegex ( _RegExp5 ) ;
obj22 . quality = function quality ( arg0 ) {
return arg0 [ 0 ] . length + 0.2 ;
} ;
obj22 . parse = function parse ( arg0 , arg1 , arg2 ) {
const obj = { } ;
let tmp = arg0 [ 2 ] ;
if ( ! tmp ) {
tmp = arg0 [ 1 ] ;
}
obj . content = arg1 ( tmp , arg2 ) ;
return obj ;
} ;
obj22 . react = function react ( content , arg1 , key ) {
return reactElement ( "em" , key . key , { children : arg1 ( content . content , key ) } ) ;
} ;
obj22 . html = function html ( content ) {
return htmlTag ( "em" , arg1 ( content . content , arg2 ) ) ;
} ;
obj . em = obj22 ;
let obj23 = { } ;
let num37 = 21 ;
obj23 . order = num36 ;
2026-07-23 10:11:24 +00:00
obj23 . requiredFirstCharacters = [ "*" ] ;
2026-07-20 16:05:17 +00:00
obj23 . match = inlineRegex ( /^\*\*((?:\\[\s\S]|[^\\])+?)\*\*(?!\*)/ ) ;
obj23 . quality = function quality ( arg0 ) {
return arg0 [ 0 ] . length + 0.1 ;
} ;
obj23 . parse = parseCaptureInline ;
obj23 . react = function react ( content , arg1 , key ) {
return reactElement ( "strong" , key . key , { children : arg1 ( content . content , key ) } ) ;
} ;
obj23 . html = function html ( content ) {
return htmlTag ( "strong" , arg1 ( content . content , arg2 ) ) ;
} ;
obj . strong = obj23 ;
let obj24 = { } ;
let tmp31 = + num36 ;
let sum = tmp31 + 1 ;
let tmp33 = sum ;
obj24 . order = tmp31 ;
2026-07-23 10:11:24 +00:00
obj24 . requiredFirstCharacters = [ "_" ] ;
2026-07-20 16:05:17 +00:00
obj24 . match = inlineRegex ( /^__((?:\\[\s\S]|[^\\])+?)__(?!_)/ ) ;
obj24 . quality = function quality ( arg0 ) {
return arg0 [ 0 ] . length ;
} ;
obj24 . parse = parseCaptureInline ;
obj24 . react = function react ( content , arg1 , key ) {
return reactElement ( "u" , key . key , { children : arg1 ( content . content , key ) } ) ;
} ;
obj24 . html = function html ( content ) {
return htmlTag ( "u" , arg1 ( content . content , arg2 ) ) ;
} ;
obj . u = obj24 ;
let obj25 = { } ;
let tmp34 = + sum ;
let sum1 = tmp34 + 1 ;
let tmp36 = sum1 ;
obj25 . order = tmp34 ;
2026-07-23 10:11:24 +00:00
obj25 . requiredFirstCharacters = [ "~" ] ;
2026-07-20 16:05:17 +00:00
obj25 . match = inlineRegex ( /^~~(?=\S)((?:\\[\s\S]|~(?!~)|[^\s~]|\s(?!~~))+?)~~/ ) ;
obj25 . parse = parseCaptureInline ;
obj25 . react = function react ( content , arg1 , key ) {
return reactElement ( "del" , key . key , { children : arg1 ( content . content , key ) } ) ;
} ;
obj25 . html = function html ( content ) {
return htmlTag ( "del" , arg1 ( content . content , arg2 ) ) ;
} ;
obj . del = obj25 ;
let obj26 = { } ;
let tmp37 = + sum1 ;
let sum2 = tmp37 + 1 ;
let tmp39 = sum2 ;
obj26 . order = tmp37 ;
2026-07-23 10:11:24 +00:00
obj26 . requiredFirstCharacters = [ "`" ] ;
2026-07-20 16:05:17 +00:00
obj26 . match = inlineRegex ( /^(`+)([\s\S]*?[^`])\1(?!`)/ ) ;
obj26 . parse = function parse ( arg0 , arg1 , arg2 ) {
return { content : str . replace ( closure _26 , "$1" ) } ;
} ;
obj26 . react = function react ( children , arg1 , key ) {
return reactElement ( "code" , key . key , { children : children . content } ) ;
} ;
obj26 . html = function html ( content ) {
return htmlTag ( "code" , sanitizeText ( content . content ) ) ;
} ;
obj . inlineCode = obj26 ;
let obj27 = { } ;
let tmp40 = + sum2 ;
let sum3 = tmp40 + 1 ;
let tmp42 = sum3 ;
obj27 . order = tmp40 ;
2026-07-23 10:11:24 +00:00
obj27 . requiredFirstCharacters = [ " " ] ;
2026-07-20 16:05:17 +00:00
let tmp43 = anyScopeRegex ;
obj27 . match = anyScopeRegex ( /^ {2,}\n/ ) ;
obj27 . parse = ignoreCapture ;
obj27 . react = function react ( arg0 , arg1 , key ) {
return reactElement ( "br" , key . key , closure _15 ) ;
} ;
obj27 . html = function html ( arg0 , arg1 , arg2 ) {
return "<br>" ;
} ;
obj . br = obj27 ;
let obj28 = { } ;
let tmp44 = + sum3 ;
let sum4 = tmp44 + 1 ;
obj28 . order = tmp44 ;
obj28 . match = anyScopeRegex ( /^[\s\S]+?(?=[^0-9A-Za-z\s\u00c0-\uffff]|\n\n| {2,}\n|\w+:\S|$)/ ) ;
obj28 . parse = function parse ( content ) {
return { content : content [ 0 ] } ;
} ;
obj28 . react = function react ( content ) {
return content . content ;
} ;
obj28 . html = function html ( content ) {
return sanitizeText ( content . content ) ;
} ;
obj . text = obj28 ;
function outputFor ( Array , html ) {
let closure _0 = Array ;
let closure _1 = html ;
let closure _2 = arg2 ;
if ( html ) {
let _Array = Array . Array ;
if ( ! _Array ) {
_Array = obj . Array ;
}
if ( _Array [ html ] ) {
let closure _4 = tmp7 ;
function nestedOutput ( arg0 , arg1 ) {
2026-07-23 10:11:24 +00:00
let tmp = arg1 ;
if ( ! arg1 ) {
tmp = closure _3 ;
}
closure _3 = tmp ;
2026-07-20 16:05:17 +00:00
if ( Array . isArray ( arg0 ) ) {
let tmp6 = tmp7 ( arg0 , nestedOutput , tmp ) ;
} else {
2026-07-23 10:11:24 +00:00
tmp6 = _Array [ arg0 . type ] [ closure _1 ] ( arg0 , nestedOutput , tmp ) ;
const tmp3 = _Array [ arg0 . type ] ;
2026-07-20 16:05:17 +00:00
}
return tmp6 ;
}
return function outerOutput ( arg0 , arg1 ) {
2026-07-23 10:11:24 +00:00
const tmp = outer1 _11 ( arg1 , closure _2 ) ;
let closure _3 = tmp ;
2026-07-20 16:05:17 +00:00
return nestedOutput ( arg0 , tmp ) ;
} ;
} else {
const _Error2 = Error ;
const error = new Error ( "simple-markdown: outputFor: to join nodes of type `" + html + "` you must provide an `Array:` joiner rule with that type, Please see the docs for details on specifying an Array rule." ) ;
throw error ;
}
} else {
const _Error = Error ;
const error1 = new Error ( "simple-markdown: outputFor: `property` must be defined. if you just upgraded, you probably need to replace `outputFor` with `reactFor`" ) ;
throw error1 ;
}
}
let tmp46 = parserFor ;
let parserForResult = parserFor ( obj ) ;
function defaultBlockParse ( source , arg1 ) {
let obj = arg1 ;
if ( ! arg1 ) {
obj = { } ;
}
obj . inline = false ;
return parserForResult ( source , obj ) ;
}
function defaultImplicitParse ( arg0 , arg1 ) {
let obj = arg1 ;
const isMatch = tmp3 . test ( arg0 ) ;
if ( ! arg1 ) {
obj = { } ;
}
obj . inline = ! isMatch ;
return parserForResult ( arg0 , obj ) ;
}
let str8 = "react" ;
let outputForResult = outputFor ( obj , "react" ) ;
let str9 = "html" ;
let outputForResult1 = outputFor ( obj , "html" ) ;
function markdownToReact ( source ) {
return outputForResult ( defaultBlockParse ( source , arg1 ) , arg1 ) ;
}
let obj29 = {
defaultRules : obj ,
parserFor ,
outputFor ,
inlineRegex ,
blockRegex ,
anyScopeRegex ,
parseInline ,
parseBlock ( arg0 , arg1 , inline ) {
inline . inline = false ;
inline . inline = inline . inline || false ;
return arg0 ( arg1 + "\n\n" , inline ) ;
} ,
markdownToReact ,
markdownToHtml ( source ) {
return outputForResult1 ( defaultBlockParse ( source , arg1 ) , arg1 ) ;
} ,
ReactMarkdown ( obj ) {
obj = { } ;
for ( const key10006 in arg0 ) {
let tmp2 = key10006 ;
let callResult = "source" !== key10006 ;
if ( callResult ) {
let _Object = Object ;
callResult = hasOwnProperty . call ( arg0 , key10006 ) ;
}
if ( ! callResult ) {
continue ;
} else {
obj [ key10006 ] = arg0 [ key10006 ] ;
2026-07-23 10:11:24 +00:00
continue ;
2026-07-20 16:05:17 +00:00
}
continue ;
}
obj . children = markdownToReact ( obj . source ) ;
return reactElement ( "div" , null , obj ) ;
} ,
defaultBlockParse ,
defaultInlineParse ( arg0 , arg1 ) {
let obj = arg1 ;
if ( ! arg1 ) {
obj = { } ;
}
obj . inline = true ;
return parserForResult ( arg0 , obj ) ;
} ,
defaultImplicitParse ,
defaultReactOutput : outputForResult ,
defaultHtmlOutput : outputForResult1 ,
preprocess ,
sanitizeText ,
sanitizeUrl ,
unescapeUrl ,
htmlTag ,
reactElement ,
defaultRawParse : parserForResult ,
2026-07-23 10:11:24 +00:00
ruleOutput ( closure _2 , react ) {
2026-07-20 16:05:17 +00:00
let tmp = react ;
2026-07-23 10:11:24 +00:00
let closure _0 = closure _2 ;
2026-07-20 16:05:17 +00:00
let closure _1 = react ;
if ( ! react ) {
const _console = console ;
tmp = "undefined" === typeof console ;
}
if ( ! tmp ) {
const _console2 = console ;
console . warn ( "simple-markdown ruleOutput should take 'react' or 'html' as the second argument." ) ;
}
return function nestedRuleOutput ( arg0 , arg1 , arg2 ) {
2026-07-23 10:11:24 +00:00
return table [ arg0 . type ] [ closure _1 ] ( arg0 , arg1 , arg2 ) ;
2026-07-20 16:05:17 +00:00
} ;
} ,
reactFor ( arg0 ) {
let closure _0 = arg0 ;
function nestedOutput ( arg0 , arg1 ) {
let obj = arg1 ;
if ( ! arg1 ) {
obj = { } ;
}
if ( Array . isArray ( arg0 ) ) {
const items = [ ] ;
let num = 0 ;
let tmp3 = null ;
if ( 0 < arg0 . length ) {
while ( true ) {
obj . key = "" + num ;
let tmp4 = nestedOutput ;
let tmp5 = nestedOutput ( arg0 [ num ] , obj ) ;
if ( "string" === typeof tmp5 ) {
if ( "string" === typeof tmp3 ) {
let sum = tmp3 + tmp5 ;
items [ items . length - 1 ] = sum ;
let tmp7 = sum ;
num = num + 1 ;
tmp3 = tmp7 ;
if ( num >= arg0 . length ) {
break ;
}
}
}
let arr = items . push ( tmp5 ) ;
tmp7 = tmp5 ;
}
}
obj . key = obj . key ;
return items ;
} else {
2026-07-23 10:11:24 +00:00
return callback ( arg0 , nestedOutput , obj ) ;
2026-07-20 16:05:17 +00:00
}
}
return nestedOutput ;
} ,
htmlFor ( arg0 ) {
let closure _0 = arg0 ;
function nestedOutput ( arr ) {
let obj = arg1 ;
2026-07-23 10:11:24 +00:00
obj = arg1 ;
2026-07-20 16:05:17 +00:00
if ( ! arg1 ) {
obj = { } ;
}
if ( Array . isArray ( arr ) ) {
2026-07-23 10:11:24 +00:00
const mapped = arr . map ( ( arg0 ) => outer1 _1 ( arg0 , obj ) ) ;
2026-07-20 16:05:17 +00:00
let joined = mapped . join ( "" ) ;
} else {
2026-07-23 10:11:24 +00:00
joined = obj ( arr , nestedOutput , obj ) ;
2026-07-20 16:05:17 +00:00
}
return joined ;
}
return nestedOutput ;
} ,
defaultParse ( ) {
if ( "undefined" !== typeof console ) {
const _console = console ;
console . warn ( "defaultParse is deprecated, please use `defaultImplicitParse`" ) ;
}
return defaultImplicitParse ( ... arguments ) ;
} ,
defaultOutput ( ) {
if ( "undefined" !== typeof console ) {
const _console = console ;
console . warn ( "defaultOutput is deprecated, please use `defaultReactOutput`" ) ;
}
return outputForResult ( ... arguments ) ;
}
} ;
return obj29 ;
}
} ;
if ( "object" === typeof exports ) {
if ( undefined !== module ) {
module . exports = fn ( ) ;
}
}
if ( "function" === typeof globalThis . define ) {
if ( globalThis . define . amd ) {
globalThis . define ( fn ) ;
}
}
self . SimpleMarkdown = fn ( ) ;