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AAG,QAEtE,OAAO,EADS,OAAO,UAAU,EAAG,GACZ,CAC1B,CAcA,OA1KA,EAAgB,UAAY,CAS1B,SAAU,SAAU,GAClB,IA4JJ,SAAoB,GAClB,OAAgB,MAAT,IAAmC,iBAAV,GAAsB,EAAM,WAAgC,IAAnB,EAAM,UAAqC,IAAnB,EAAM,UAAqC,KAAnB,EAAM,UACjI,CA9JS,CAAW,GACd,MAAM,IAAI,UAAU,EAAQ,2DAE9B,GAAc,KAAV,EAAc,MAAO,GACzB,IAAI,EAAS,EAAQ,KAAK,KAAM,IAAI,EAAS,EAAO,KAAK,UACzD,OAAO,EAAY,KAAK,KAAM,EAChC,EASA,IAAK,SAAU,GACb,GAAI,MAAM,QAAQ,GAChB,IAAK,IAAI,EAAI,EAAG,EAAI,EAAO,OAAQ,IAAK,KAAK,IAAI,EAAO,QACnD,IAAsB,mBAAX,EAGhB,MAAM,IAAI,UAAU,sDAFpB,EAAO,KAGT,CACA,OAAO,IACT,EAUA,QAAS,SAAU,EAAK,GAEtB,OADA,KAAK,MAAM,IAAI,EAAK,GACb,IACT,EASA,KAAM,SAAU,GAEd,OADA,KAAK,MAAM,KAAK,GACT,IACT,EASA,OAAQ,SAAU,GAEhB,OADA,KAAK,MAAM,OAAO,GACX,IACT,EASA,OAAQ,SAAU,GAChB,OAAO,EAAe,EACxB,GAwFK,CAER,CA/xBqB","file":"/npm/turndown@7.2.4/dist/turndown.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/turndown@7.2.4/dist/turndown.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","var TurndownService = (function () {\n  'use strict';\n\n  function extend(destination) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) destination[key] = source[key];\n      }\n    }\n    return destination;\n  }\n  function repeat(character, count) {\n    return Array(count + 1).join(character);\n  }\n  function trimLeadingNewlines(string) {\n    return string.replace(/^\\n*/, '');\n  }\n  function trimTrailingNewlines(string) {\n    // avoid match-at-end regexp bottleneck, see #370\n    var indexEnd = string.length;\n    while (indexEnd > 0 && string[indexEnd - 1] === '\\n') indexEnd--;\n    return string.substring(0, indexEnd);\n  }\n  function trimNewlines(string) {\n    return trimTrailingNewlines(trimLeadingNewlines(string));\n  }\n  var blockElements = ['ADDRESS', 'ARTICLE', 'ASIDE', 'AUDIO', 'BLOCKQUOTE', 'BODY', 'CANVAS', 'CENTER', 'DD', 'DIR', 'DIV', 'DL', 'DT', 'FIELDSET', 'FIGCAPTION', 'FIGURE', 'FOOTER', 'FORM', 'FRAMESET', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'HEADER', 'HGROUP', 'HR', 'HTML', 'ISINDEX', 'LI', 'MAIN', 'MENU', 'NAV', 'NOFRAMES', 'NOSCRIPT', 'OL', 'OUTPUT', 'P', 'PRE', 'SECTION', 'TABLE', 'TBODY', 'TD', 'TFOOT', 'TH', 'THEAD', 'TR', 'UL'];\n  function isBlock(node) {\n    return is(node, blockElements);\n  }\n  var voidElements = ['AREA', 'BASE', 'BR', 'COL', 'COMMAND', 'EMBED', 'HR', 'IMG', 'INPUT', 'KEYGEN', 'LINK', 'META', 'PARAM', 'SOURCE', 'TRACK', 'WBR'];\n  function isVoid(node) {\n    return is(node, voidElements);\n  }\n  function hasVoid(node) {\n    return has(node, voidElements);\n  }\n  var meaningfulWhenBlankElements = ['A', 'TABLE', 'THEAD', 'TBODY', 'TFOOT', 'TH', 'TD', 'IFRAME', 'SCRIPT', 'AUDIO', 'VIDEO'];\n  function isMeaningfulWhenBlank(node) {\n    return is(node, meaningfulWhenBlankElements);\n  }\n  function hasMeaningfulWhenBlank(node) {\n    return has(node, meaningfulWhenBlankElements);\n  }\n  function is(node, tagNames) {\n    return tagNames.indexOf(node.nodeName) >= 0;\n  }\n  function has(node, tagNames) {\n    return node.getElementsByTagName && tagNames.some(function (tagName) {\n      return node.getElementsByTagName(tagName).length;\n    });\n  }\n  var markdownEscapes = [[/\\\\/g, '\\\\\\\\'], [/\\*/g, '\\\\*'], [/^-/g, '\\\\-'], [/^\\+ /g, '\\\\+ '], [/^(=+)/g, '\\\\$1'], [/^(#{1,6}) /g, '\\\\$1 '], [/`/g, '\\\\`'], [/^~~~/g, '\\\\~~~'], [/\\[/g, '\\\\['], [/\\]/g, '\\\\]'], [/^>/g, '\\\\>'], [/_/g, '\\\\_'], [/^(\\d+)\\. /g, '$1\\\\. ']];\n  function escapeMarkdown(string) {\n    return markdownEscapes.reduce(function (accumulator, escape) {\n      return accumulator.replace(escape[0], escape[1]);\n    }, string);\n  }\n\n  var rules = {};\n  rules.paragraph = {\n    filter: 'p',\n    replacement: function (content) {\n      return '\\n\\n' + content + '\\n\\n';\n    }\n  };\n  rules.lineBreak = {\n    filter: 'br',\n    replacement: function (content, node, options) {\n      return options.br + '\\n';\n    }\n  };\n  rules.heading = {\n    filter: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],\n    replacement: function (content, node, options) {\n      var hLevel = Number(node.nodeName.charAt(1));\n      if (options.headingStyle === 'setext' && hLevel < 3) {\n        var underline = repeat(hLevel === 1 ? '=' : '-', content.length);\n        return '\\n\\n' + content + '\\n' + underline + '\\n\\n';\n      } else {\n        return '\\n\\n' + repeat('#', hLevel) + ' ' + content + '\\n\\n';\n      }\n    }\n  };\n  rules.blockquote = {\n    filter: 'blockquote',\n    replacement: function (content) {\n      content = trimNewlines(content).replace(/^/gm, '> ');\n      return '\\n\\n' + content + '\\n\\n';\n    }\n  };\n  rules.list = {\n    filter: ['ul', 'ol'],\n    replacement: function (content, node) {\n      var parent = node.parentNode;\n      if (parent.nodeName === 'LI' && parent.lastElementChild === node) {\n        return '\\n' + content;\n      } else {\n        return '\\n\\n' + content + '\\n\\n';\n      }\n    }\n  };\n  rules.listItem = {\n    filter: 'li',\n    replacement: function (content, node, options) {\n      var prefix = options.bulletListMarker + '   ';\n      var parent = node.parentNode;\n      if (parent.nodeName === 'OL') {\n        var start = parent.getAttribute('start');\n        var index = Array.prototype.indexOf.call(parent.children, node);\n        prefix = (start ? Number(start) + index : index + 1) + '.  ';\n      }\n      var isParagraph = /\\n$/.test(content);\n      content = trimNewlines(content) + (isParagraph ? '\\n' : '');\n      content = content.replace(/\\n/gm, '\\n' + ' '.repeat(prefix.length)); // indent\n      return prefix + content + (node.nextSibling ? '\\n' : '');\n    }\n  };\n  rules.indentedCodeBlock = {\n    filter: function (node, options) {\n      return options.codeBlockStyle === 'indented' && node.nodeName === 'PRE' && node.firstChild && node.firstChild.nodeName === 'CODE';\n    },\n    replacement: function (content, node, options) {\n      return '\\n\\n    ' + node.firstChild.textContent.replace(/\\n/g, '\\n    ') + '\\n\\n';\n    }\n  };\n  rules.fencedCodeBlock = {\n    filter: function (node, options) {\n      return options.codeBlockStyle === 'fenced' && node.nodeName === 'PRE' && node.firstChild && node.firstChild.nodeName === 'CODE';\n    },\n    replacement: function (content, node, options) {\n      var className = node.firstChild.getAttribute('class') || '';\n      var language = (className.match(/language-(\\S+)/) || [null, ''])[1];\n      var code = node.firstChild.textContent;\n      var fenceChar = options.fence.charAt(0);\n      var fenceSize = 3;\n      var fenceInCodeRegex = new RegExp('^' + fenceChar + '{3,}', 'gm');\n      var match;\n      while (match = fenceInCodeRegex.exec(code)) {\n        if (match[0].length >= fenceSize) {\n          fenceSize = match[0].length + 1;\n        }\n      }\n      var fence = repeat(fenceChar, fenceSize);\n      return '\\n\\n' + fence + language + '\\n' + code.replace(/\\n$/, '') + '\\n' + fence + '\\n\\n';\n    }\n  };\n  rules.horizontalRule = {\n    filter: 'hr',\n    replacement: function (content, node, options) {\n      return '\\n\\n' + options.hr + '\\n\\n';\n    }\n  };\n  rules.inlineLink = {\n    filter: function (node, options) {\n      return options.linkStyle === 'inlined' && node.nodeName === 'A' && node.getAttribute('href');\n    },\n    replacement: function (content, node) {\n      var href = escapeLinkDestination(node.getAttribute('href'));\n      var title = escapeLinkTitle(cleanAttribute(node.getAttribute('title')));\n      var titlePart = title ? ' \"' + title + '\"' : '';\n      return '[' + content + '](' + href + titlePart + ')';\n    }\n  };\n  rules.referenceLink = {\n    filter: function (node, options) {\n      return options.linkStyle === 'referenced' && node.nodeName === 'A' && node.getAttribute('href');\n    },\n    replacement: function (content, node, options) {\n      var href = escapeLinkDestination(node.getAttribute('href'));\n      var title = cleanAttribute(node.getAttribute('title'));\n      if (title) title = ' \"' + escapeLinkTitle(title) + '\"';\n      var replacement;\n      var reference;\n      switch (options.linkReferenceStyle) {\n        case 'collapsed':\n          replacement = '[' + content + '][]';\n          reference = '[' + content + ']: ' + href + title;\n          break;\n        case 'shortcut':\n          replacement = '[' + content + ']';\n          reference = '[' + content + ']: ' + href + title;\n          break;\n        default:\n          var id = this.references.length + 1;\n          replacement = '[' + content + '][' + id + ']';\n          reference = '[' + id + ']: ' + href + title;\n      }\n      this.references.push(reference);\n      return replacement;\n    },\n    references: [],\n    append: function (options) {\n      var references = '';\n      if (this.references.length) {\n        references = '\\n\\n' + this.references.join('\\n') + '\\n\\n';\n        this.references = []; // Reset references\n      }\n      return references;\n    }\n  };\n  rules.emphasis = {\n    filter: ['em', 'i'],\n    replacement: function (content, node, options) {\n      if (!content.trim()) return '';\n      return options.emDelimiter + content + options.emDelimiter;\n    }\n  };\n  rules.strong = {\n    filter: ['strong', 'b'],\n    replacement: function (content, node, options) {\n      if (!content.trim()) return '';\n      return options.strongDelimiter + content + options.strongDelimiter;\n    }\n  };\n  rules.code = {\n    filter: function (node) {\n      var hasSiblings = node.previousSibling || node.nextSibling;\n      var isCodeBlock = node.parentNode.nodeName === 'PRE' && !hasSiblings;\n      return node.nodeName === 'CODE' && !isCodeBlock;\n    },\n    replacement: function (content) {\n      if (!content) return '';\n      content = content.replace(/\\r?\\n|\\r/g, ' ');\n      var extraSpace = /^`|^ .*?[^ ].* $|`$/.test(content) ? ' ' : '';\n      var delimiter = '`';\n      var matches = content.match(/`+/gm) || [];\n      while (matches.indexOf(delimiter) !== -1) delimiter = delimiter + '`';\n      return delimiter + extraSpace + content + extraSpace + delimiter;\n    }\n  };\n  rules.image = {\n    filter: 'img',\n    replacement: function (content, node) {\n      var alt = escapeMarkdown(cleanAttribute(node.getAttribute('alt')));\n      var src = escapeLinkDestination(node.getAttribute('src') || '');\n      var title = cleanAttribute(node.getAttribute('title'));\n      var titlePart = title ? ' \"' + escapeLinkTitle(title) + '\"' : '';\n      return src ? '![' + alt + ']' + '(' + src + titlePart + ')' : '';\n    }\n  };\n  function cleanAttribute(attribute) {\n    return attribute ? attribute.replace(/(\\n+\\s*)+/g, '\\n') : '';\n  }\n  function escapeLinkDestination(destination) {\n    var escaped = destination.replace(/([<>()])/g, '\\\\$1');\n    return escaped.indexOf(' ') >= 0 ? '<' + escaped + '>' : escaped;\n  }\n  function escapeLinkTitle(title) {\n    return title.replace(/\"/g, '\\\\\"');\n  }\n\n  /**\n   * Manages a collection of rules used to convert HTML to Markdown\n   */\n\n  function Rules(options) {\n    this.options = options;\n    this._keep = [];\n    this._remove = [];\n    this.blankRule = {\n      replacement: options.blankReplacement\n    };\n    this.keepReplacement = options.keepReplacement;\n    this.defaultRule = {\n      replacement: options.defaultReplacement\n    };\n    this.array = [];\n    for (var key in options.rules) this.array.push(options.rules[key]);\n  }\n  Rules.prototype = {\n    add: function (key, rule) {\n      this.array.unshift(rule);\n    },\n    keep: function (filter) {\n      this._keep.unshift({\n        filter: filter,\n        replacement: this.keepReplacement\n      });\n    },\n    remove: function (filter) {\n      this._remove.unshift({\n        filter: filter,\n        replacement: function () {\n          return '';\n        }\n      });\n    },\n    forNode: function (node) {\n      if (node.isBlank) return this.blankRule;\n      var rule;\n      if (rule = findRule(this.array, node, this.options)) return rule;\n      if (rule = findRule(this._keep, node, this.options)) return rule;\n      if (rule = findRule(this._remove, node, this.options)) return rule;\n      return this.defaultRule;\n    },\n    forEach: function (fn) {\n      for (var i = 0; i < this.array.length; i++) fn(this.array[i], i);\n    }\n  };\n  function findRule(rules, node, options) {\n    for (var i = 0; i < rules.length; i++) {\n      var rule = rules[i];\n      if (filterValue(rule, node, options)) return rule;\n    }\n    return undefined;\n  }\n  function filterValue(rule, node, options) {\n    var filter = rule.filter;\n    if (typeof filter === 'string') {\n      if (filter === node.nodeName.toLowerCase()) return true;\n    } else if (Array.isArray(filter)) {\n      if (filter.indexOf(node.nodeName.toLowerCase()) > -1) return true;\n    } else if (typeof filter === 'function') {\n      if (filter.call(rule, node, options)) return true;\n    } else {\n      throw new TypeError('`filter` needs to be a string, array, or function');\n    }\n  }\n\n  /**\n   * The collapseWhitespace function is adapted from collapse-whitespace\n   * by Luc Thevenard.\n   *\n   * The MIT License (MIT)\n   *\n   * Copyright (c) 2014 Luc Thevenard <lucthevenard@gmail.com>\n   *\n   * Permission is hereby granted, free of charge, to any person obtaining a copy\n   * of this software and associated documentation files (the \"Software\"), to deal\n   * in the Software without restriction, including without limitation the rights\n   * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n   * copies of the Software, and to permit persons to whom the Software is\n   * furnished to do so, subject to the following conditions:\n   *\n   * The above copyright notice and this permission notice shall be included in\n   * all copies or substantial portions of the Software.\n   *\n   * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n   * THE SOFTWARE.\n   */\n\n  /**\n   * collapseWhitespace(options) removes extraneous whitespace from an the given element.\n   *\n   * @param {Object} options\n   */\n  function collapseWhitespace(options) {\n    var element = options.element;\n    var isBlock = options.isBlock;\n    var isVoid = options.isVoid;\n    var isPre = options.isPre || function (node) {\n      return node.nodeName === 'PRE';\n    };\n    if (!element.firstChild || isPre(element)) return;\n    var prevText = null;\n    var keepLeadingWs = false;\n    var prev = null;\n    var node = next(prev, element, isPre);\n    while (node !== element) {\n      if (node.nodeType === 3 || node.nodeType === 4) {\n        // Node.TEXT_NODE or Node.CDATA_SECTION_NODE\n        var text = node.data.replace(/[ \\r\\n\\t]+/g, ' ');\n        if ((!prevText || / $/.test(prevText.data)) && !keepLeadingWs && text[0] === ' ') {\n          text = text.substr(1);\n        }\n\n        // `text` might be empty at this point.\n        if (!text) {\n          node = remove(node);\n          continue;\n        }\n        node.data = text;\n        prevText = node;\n      } else if (node.nodeType === 1) {\n        // Node.ELEMENT_NODE\n        if (isBlock(node) || node.nodeName === 'BR') {\n          if (prevText) {\n            prevText.data = prevText.data.replace(/ $/, '');\n          }\n          prevText = null;\n          keepLeadingWs = false;\n        } else if (isVoid(node) || isPre(node)) {\n          // Avoid trimming space around non-block, non-BR void elements and inline PRE.\n          prevText = null;\n          keepLeadingWs = true;\n        } else if (prevText) {\n          // Drop protection if set previously.\n          keepLeadingWs = false;\n        }\n      } else {\n        node = remove(node);\n        continue;\n      }\n      var nextNode = next(prev, node, isPre);\n      prev = node;\n      node = nextNode;\n    }\n    if (prevText) {\n      prevText.data = prevText.data.replace(/ $/, '');\n      if (!prevText.data) {\n        remove(prevText);\n      }\n    }\n  }\n\n  /**\n   * remove(node) removes the given node from the DOM and returns the\n   * next node in the sequence.\n   *\n   * @param {Node} node\n   * @return {Node} node\n   */\n  function remove(node) {\n    var next = node.nextSibling || node.parentNode;\n    node.parentNode.removeChild(node);\n    return next;\n  }\n\n  /**\n   * next(prev, current, isPre) returns the next node in the sequence, given the\n   * current and previous nodes.\n   *\n   * @param {Node} prev\n   * @param {Node} current\n   * @param {Function} isPre\n   * @return {Node}\n   */\n  function next(prev, current, isPre) {\n    if (prev && prev.parentNode === current || isPre(current)) {\n      return current.nextSibling || current.parentNode;\n    }\n    return current.firstChild || current.nextSibling || current.parentNode;\n  }\n\n  /*\n   * Set up window for Node.js\n   */\n\n  var root = typeof window !== 'undefined' ? window : {};\n\n  /*\n   * Parsing HTML strings\n   */\n\n  function canParseHTMLNatively() {\n    var Parser = root.DOMParser;\n    var canParse = false;\n\n    // Adapted from https://gist.github.com/1129031\n    // Firefox/Opera/IE throw errors on unsupported types\n    try {\n      // WebKit returns null on unsupported types\n      if (new Parser().parseFromString('', 'text/html')) {\n        canParse = true;\n      }\n    } catch (e) {}\n    return canParse;\n  }\n  function createHTMLParser() {\n    var Parser = function () {};\n    {\n      if (shouldUseActiveX()) {\n        Parser.prototype.parseFromString = function (string) {\n          var doc = new window.ActiveXObject('htmlfile');\n          doc.designMode = 'on'; // disable on-page scripts\n          doc.open();\n          doc.write(string);\n          doc.close();\n          return doc;\n        };\n      } else {\n        Parser.prototype.parseFromString = function (string) {\n          var doc = document.implementation.createHTMLDocument('');\n          doc.open();\n          doc.write(string);\n          doc.close();\n          return doc;\n        };\n      }\n    }\n    return Parser;\n  }\n  function shouldUseActiveX() {\n    var useActiveX = false;\n    try {\n      document.implementation.createHTMLDocument('').open();\n    } catch (e) {\n      if (root.ActiveXObject) useActiveX = true;\n    }\n    return useActiveX;\n  }\n  var HTMLParser = canParseHTMLNatively() ? root.DOMParser : createHTMLParser();\n\n  function RootNode(input, options) {\n    var root;\n    if (typeof input === 'string') {\n      var doc = htmlParser().parseFromString(\n      // DOM parsers arrange elements in the <head> and <body>.\n      // Wrapping in a custom element ensures elements are reliably arranged in\n      // a single element.\n      '<x-turndown id=\"turndown-root\">' + input + '</x-turndown>', 'text/html');\n      root = doc.getElementById('turndown-root');\n    } else {\n      root = input.cloneNode(true);\n    }\n    collapseWhitespace({\n      element: root,\n      isBlock: isBlock,\n      isVoid: isVoid,\n      isPre: options.preformattedCode ? isPreOrCode : null\n    });\n    return root;\n  }\n  var _htmlParser;\n  function htmlParser() {\n    _htmlParser = _htmlParser || new HTMLParser();\n    return _htmlParser;\n  }\n  function isPreOrCode(node) {\n    return node.nodeName === 'PRE' || node.nodeName === 'CODE';\n  }\n\n  function Node(node, options) {\n    node.isBlock = isBlock(node);\n    node.isCode = node.nodeName === 'CODE' || node.parentNode.isCode;\n    node.isBlank = isBlank(node);\n    node.flankingWhitespace = flankingWhitespace(node, options);\n    return node;\n  }\n  function isBlank(node) {\n    return !isVoid(node) && !isMeaningfulWhenBlank(node) && /^\\s*$/i.test(node.textContent) && !hasVoid(node) && !hasMeaningfulWhenBlank(node);\n  }\n  function flankingWhitespace(node, options) {\n    if (node.isBlock || options.preformattedCode && node.isCode) {\n      return {\n        leading: '',\n        trailing: ''\n      };\n    }\n    var edges = edgeWhitespace(node.textContent);\n\n    // abandon leading ASCII WS if left-flanked by ASCII WS\n    if (edges.leadingAscii && isFlankedByWhitespace('left', node, options)) {\n      edges.leading = edges.leadingNonAscii;\n    }\n\n    // abandon trailing ASCII WS if right-flanked by ASCII WS\n    if (edges.trailingAscii && isFlankedByWhitespace('right', node, options)) {\n      edges.trailing = edges.trailingNonAscii;\n    }\n    return {\n      leading: edges.leading,\n      trailing: edges.trailing\n    };\n  }\n  function edgeWhitespace(string) {\n    var m = string.match(/^(([ \\t\\r\\n]*)(\\s*))(?:(?=\\S)[\\s\\S]*\\S)?((\\s*?)([ \\t\\r\\n]*))$/);\n    return {\n      leading: m[1],\n      // whole string for whitespace-only strings\n      leadingAscii: m[2],\n      leadingNonAscii: m[3],\n      trailing: m[4],\n      // empty for whitespace-only strings\n      trailingNonAscii: m[5],\n      trailingAscii: m[6]\n    };\n  }\n  function isFlankedByWhitespace(side, node, options) {\n    var sibling;\n    var regExp;\n    var isFlanked;\n    if (side === 'left') {\n      sibling = node.previousSibling;\n      regExp = / $/;\n    } else {\n      sibling = node.nextSibling;\n      regExp = /^ /;\n    }\n    if (sibling) {\n      if (sibling.nodeType === 3) {\n        isFlanked = regExp.test(sibling.nodeValue);\n      } else if (options.preformattedCode && sibling.nodeName === 'CODE') {\n        isFlanked = false;\n      } else if (sibling.nodeType === 1 && !isBlock(sibling)) {\n        isFlanked = regExp.test(sibling.textContent);\n      }\n    }\n    return isFlanked;\n  }\n\n  var reduce = Array.prototype.reduce;\n  function TurndownService(options) {\n    if (!(this instanceof TurndownService)) return new TurndownService(options);\n    var defaults = {\n      rules: rules,\n      headingStyle: 'setext',\n      hr: '* * *',\n      bulletListMarker: '*',\n      codeBlockStyle: 'indented',\n      fence: '```',\n      emDelimiter: '_',\n      strongDelimiter: '**',\n      linkStyle: 'inlined',\n      linkReferenceStyle: 'full',\n      br: '  ',\n      preformattedCode: false,\n      blankReplacement: function (content, node) {\n        return node.isBlock ? '\\n\\n' : '';\n      },\n      keepReplacement: function (content, node) {\n        return node.isBlock ? '\\n\\n' + node.outerHTML + '\\n\\n' : node.outerHTML;\n      },\n      defaultReplacement: function (content, node) {\n        return node.isBlock ? '\\n\\n' + content + '\\n\\n' : content;\n      }\n    };\n    this.options = extend({}, defaults, options);\n    this.rules = new Rules(this.options);\n  }\n  TurndownService.prototype = {\n    /**\n     * The entry point for converting a string or DOM node to Markdown\n     * @public\n     * @param {String|HTMLElement} input The string or DOM node to convert\n     * @returns A Markdown representation of the input\n     * @type String\n     */\n\n    turndown: function (input) {\n      if (!canConvert(input)) {\n        throw new TypeError(input + ' is not a string, or an element/document/fragment node.');\n      }\n      if (input === '') return '';\n      var output = process.call(this, new RootNode(input, this.options));\n      return postProcess.call(this, output);\n    },\n    /**\n     * Add one or more plugins\n     * @public\n     * @param {Function|Array} plugin The plugin or array of plugins to add\n     * @returns The Turndown instance for chaining\n     * @type Object\n     */\n\n    use: function (plugin) {\n      if (Array.isArray(plugin)) {\n        for (var i = 0; i < plugin.length; i++) this.use(plugin[i]);\n      } else if (typeof plugin === 'function') {\n        plugin(this);\n      } else {\n        throw new TypeError('plugin must be a Function or an Array of Functions');\n      }\n      return this;\n    },\n    /**\n     * Adds a rule\n     * @public\n     * @param {String} key The unique key of the rule\n     * @param {Object} rule The rule\n     * @returns The Turndown instance for chaining\n     * @type Object\n     */\n\n    addRule: function (key, rule) {\n      this.rules.add(key, rule);\n      return this;\n    },\n    /**\n     * Keep a node (as HTML) that matches the filter\n     * @public\n     * @param {String|Array|Function} filter The unique key of the rule\n     * @returns The Turndown instance for chaining\n     * @type Object\n     */\n\n    keep: function (filter) {\n      this.rules.keep(filter);\n      return this;\n    },\n    /**\n     * Remove a node that matches the filter\n     * @public\n     * @param {String|Array|Function} filter The unique key of the rule\n     * @returns The Turndown instance for chaining\n     * @type Object\n     */\n\n    remove: function (filter) {\n      this.rules.remove(filter);\n      return this;\n    },\n    /**\n     * Escapes Markdown syntax\n     * @public\n     * @param {String} string The string to escape\n     * @returns A string with Markdown syntax escaped\n     * @type String\n     */\n\n    escape: function (string) {\n      return escapeMarkdown(string);\n    }\n  };\n\n  /**\n   * Reduces a DOM node down to its Markdown string equivalent\n   * @private\n   * @param {HTMLElement} parentNode The node to convert\n   * @returns A Markdown representation of the node\n   * @type String\n   */\n\n  function process(parentNode) {\n    var self = this;\n    return reduce.call(parentNode.childNodes, function (output, node) {\n      node = new Node(node, self.options);\n      var replacement = '';\n      if (node.nodeType === 3) {\n        replacement = node.isCode ? node.nodeValue : self.escape(node.nodeValue);\n      } else if (node.nodeType === 1) {\n        replacement = replacementForNode.call(self, node);\n      }\n      return join(output, replacement);\n    }, '');\n  }\n\n  /**\n   * Appends strings as each rule requires and trims the output\n   * @private\n   * @param {String} output The conversion output\n   * @returns A trimmed version of the ouput\n   * @type String\n   */\n\n  function postProcess(output) {\n    var self = this;\n    this.rules.forEach(function (rule) {\n      if (typeof rule.append === 'function') {\n        output = join(output, rule.append(self.options));\n      }\n    });\n    return output.replace(/^[\\t\\r\\n]+/, '').replace(/[\\t\\r\\n\\s]+$/, '');\n  }\n\n  /**\n   * Converts an element node to its Markdown equivalent\n   * @private\n   * @param {HTMLElement} node The node to convert\n   * @returns A Markdown representation of the node\n   * @type String\n   */\n\n  function replacementForNode(node) {\n    var rule = this.rules.forNode(node);\n    var content = process.call(this, node);\n    var whitespace = node.flankingWhitespace;\n    if (whitespace.leading || whitespace.trailing) content = content.trim();\n    return whitespace.leading + rule.replacement(content, node, this.options) + whitespace.trailing;\n  }\n\n  /**\n   * Joins replacement to the current output with appropriate number of new lines\n   * @private\n   * @param {String} output The current conversion output\n   * @param {String} replacement The string to append to the output\n   * @returns Joined output\n   * @type String\n   */\n\n  function join(output, replacement) {\n    var s1 = trimTrailingNewlines(output);\n    var s2 = trimLeadingNewlines(replacement);\n    var nls = Math.max(output.length - s1.length, replacement.length - s2.length);\n    var separator = '\\n\\n'.substring(0, nls);\n    return s1 + separator + s2;\n  }\n\n  /**\n   * Determines whether an input can be converted\n   * @private\n   * @param {String|HTMLElement} input Describe this parameter\n   * @returns Describe what it returns\n   * @type String|Object|Array|Boolean|Number\n   */\n\n  function canConvert(input) {\n    return input != null && (typeof input === 'string' || input.nodeType && (input.nodeType === 1 || input.nodeType === 9 || input.nodeType === 11));\n  }\n\n  return TurndownService;\n\n})();\n"]}