/i;\nfunction inlineHTML(eat, value, silent) {\n var self = this;\n var length = value.length;\n var character;\n var subvalue;\n if (value.charAt(0) !== '<' || length < 3) {\n return;\n }\n character = value.charAt(1);\n if (!alphabetical(character) && character !== '?' && character !== '!' && character !== '/') {\n return;\n }\n subvalue = value.match(tag);\n if (!subvalue) {\n return;\n }\n\n /* istanbul ignore if - not used yet. */\n if (silent) {\n return true;\n }\n subvalue = subvalue[0];\n if (!self.inLink && EXPRESSION_HTML_LINK_OPEN.test(subvalue)) {\n self.inLink = true;\n } else if (self.inLink && EXPRESSION_HTML_LINK_CLOSE.test(subvalue)) {\n self.inLink = false;\n }\n return eat(subvalue)({\n type: 'html',\n value: subvalue\n });\n}","'use strict';\n\nmodule.exports = locate;\nvar PROTOCOLS = ['https://', 'http://', 'mailto:'];\nfunction locate(value, fromIndex) {\n var length = PROTOCOLS.length;\n var index = -1;\n var min = -1;\n var position;\n if (!this.options.gfm) {\n return -1;\n }\n while (++index < length) {\n position = value.indexOf(PROTOCOLS[index], fromIndex);\n if (position !== -1 && (position < min || min === -1)) {\n min = position;\n }\n }\n return min;\n}","'use strict';\n\n/* eslint-env browser */\nvar el;\nvar semicolon = 59; // ';'\n\nmodule.exports = decodeEntity;\nfunction decodeEntity(characters) {\n var entity = '&' + characters + ';';\n var char;\n el = el || document.createElement('i');\n el.innerHTML = entity;\n char = el.textContent;\n\n // Some entities do not require the closing semicolon (`¬` - for instance),\n // which leads to situations where parsing the assumed entity of ¬it; will\n // result in the string `¬it;`. When we encounter a trailing semicolon after\n // parsing and the entity to decode was not a semicolon (`;`), we can\n // assume that the matching was incomplete\n if (char.charCodeAt(char.length - 1) === semicolon && characters !== 'semi') {\n return false;\n }\n\n // If the decoded string is equal to the input, the entity was not valid\n return char === entity ? false : char;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.StickyContainer = exports.Sticky = undefined;\nvar _Sticky = require(\"./Sticky\");\nvar _Sticky2 = _interopRequireDefault(_Sticky);\nvar _Container = require(\"./Container\");\nvar _Container2 = _interopRequireDefault(_Container);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nexports.Sticky = _Sticky2.default;\nexports.StickyContainer = _Container2.default;\nexports.default = _Sticky2.default;","\"use strict\";\n\nexports.__esModule = true;\nexports.resetComponentClassCache = exports.inComponentClassCache = exports.activateCacheForComponentClass = void 0;\nvar componentClassCache = Object.create({});\n\nvar inComponentClassCache = function inComponentClassCache(className) {\n return componentClassCache[className] || false;\n};\n\nexports.inComponentClassCache = inComponentClassCache;\n\nvar activateCacheForComponentClass = function activateCacheForComponentClass(className) {\n if (className) {\n componentClassCache[className] = true;\n }\n};\n\nexports.activateCacheForComponentClass = activateCacheForComponentClass;\n\nvar resetComponentClassCache = function resetComponentClassCache() {\n for (var className in componentClassCache) {\n delete componentClassCache[className];\n }\n};\n\nexports.resetComponentClassCache = resetComponentClassCache;","'use strict';\n\nvar openCloseTag = require('../util/html').openCloseTag;\nmodule.exports = blockHTML;\nvar C_TAB = '\\t';\nvar C_SPACE = ' ';\nvar C_NEWLINE = '\\n';\nvar C_LT = '<';\nfunction blockHTML(eat, value, silent) {\n var self = this;\n var blocks = self.options.blocks;\n var length = value.length;\n var index = 0;\n var next;\n var line;\n var offset;\n var character;\n var count;\n var sequence;\n var subvalue;\n var sequences = [[/^<(script|pre|style)(?=(\\s|>|$))/i, /<\\/(script|pre|style)>/i, true], [/^/, true], [/^<\\?/, /\\?>/, true], [/^/, true], [/^/, true], [new RegExp('^?(' + blocks.join('|') + ')(?=(\\\\s|/?>|$))', 'i'), /^$/, true], [new RegExp(openCloseTag.source + '\\\\s*$'), /^$/, false]];\n\n /* Eat initial spacing. */\n while (index < length) {\n character = value.charAt(index);\n if (character !== C_TAB && character !== C_SPACE) {\n break;\n }\n index++;\n }\n if (value.charAt(index) !== C_LT) {\n return;\n }\n next = value.indexOf(C_NEWLINE, index + 1);\n next = next === -1 ? length : next;\n line = value.slice(index, next);\n offset = -1;\n count = sequences.length;\n while (++offset < count) {\n if (sequences[offset][0].test(line)) {\n sequence = sequences[offset];\n break;\n }\n }\n if (!sequence) {\n return;\n }\n if (silent) {\n return sequence[2];\n }\n index = next;\n if (!sequence[1].test(line)) {\n while (index < length) {\n next = value.indexOf(C_NEWLINE, index + 1);\n next = next === -1 ? length : next;\n line = value.slice(index + 1, next);\n if (sequence[1].test(line)) {\n if (line) {\n index = next;\n }\n break;\n }\n index = next;\n }\n }\n subvalue = value.slice(0, index);\n return eat(subvalue)({\n type: 'html',\n value: subvalue\n });\n}","'use strict';\n\nmodule.exports = decimal;\n\n// Check if the given character code, or the character code at the first\n// character, is decimal.\nfunction decimal(character) {\n var code = typeof character === 'string' ? character.charCodeAt(0) : character;\n return code >= 48 && code <= 57; /* 0-9 */\n}","'use strict';\n\nvar legacy = require('character-entities-legacy');\nvar invalid = require('character-reference-invalid');\nvar decimal = require('is-decimal');\nvar hexadecimal = require('is-hexadecimal');\nvar alphanumerical = require('is-alphanumerical');\nvar decodeEntity = require('./decode-entity');\nmodule.exports = parseEntities;\nvar own = {}.hasOwnProperty;\nvar fromCharCode = String.fromCharCode;\nvar noop = Function.prototype;\n\n// Default settings.\nvar defaults = {\n warning: null,\n reference: null,\n text: null,\n warningContext: null,\n referenceContext: null,\n textContext: null,\n position: {},\n additional: null,\n attribute: false,\n nonTerminated: true\n};\n\n// Characters.\nvar tab = 9; // '\\t'\nvar lineFeed = 10; // '\\n'\nvar formFeed = 12; // '\\f'\nvar space = 32; // ' '\nvar ampersand = 38; // '&'\nvar semicolon = 59; // ';'\nvar lessThan = 60; // '<'\nvar equalsTo = 61; // '='\nvar numberSign = 35; // '#'\nvar uppercaseX = 88; // 'X'\nvar lowercaseX = 120; // 'x'\nvar replacementCharacter = 65533; // '�'\n\n// Reference types.\nvar name = 'named';\nvar hexa = 'hexadecimal';\nvar deci = 'decimal';\n\n// Map of bases.\nvar bases = {};\nbases[hexa] = 16;\nbases[deci] = 10;\n\n// Map of types to tests.\n// Each type of character reference accepts different characters.\n// This test is used to detect whether a reference has ended (as the semicolon\n// is not strictly needed).\nvar tests = {};\ntests[name] = alphanumerical;\ntests[deci] = decimal;\ntests[hexa] = hexadecimal;\n\n// Warning types.\nvar namedNotTerminated = 1;\nvar numericNotTerminated = 2;\nvar namedEmpty = 3;\nvar numericEmpty = 4;\nvar namedUnknown = 5;\nvar numericDisallowed = 6;\nvar numericProhibited = 7;\n\n// Warning messages.\nvar messages = {};\nmessages[namedNotTerminated] = 'Named character references must be terminated by a semicolon';\nmessages[numericNotTerminated] = 'Numeric character references must be terminated by a semicolon';\nmessages[namedEmpty] = 'Named character references cannot be empty';\nmessages[numericEmpty] = 'Numeric character references cannot be empty';\nmessages[namedUnknown] = 'Named character references must be known';\nmessages[numericDisallowed] = 'Numeric character references cannot be disallowed';\nmessages[numericProhibited] = 'Numeric character references cannot be outside the permissible Unicode range';\n\n// Wrap to ensure clean parameters are given to `parse`.\nfunction parseEntities(value, options) {\n var settings = {};\n var option;\n var key;\n if (!options) {\n options = {};\n }\n for (key in defaults) {\n option = options[key];\n settings[key] = option === null || option === undefined ? defaults[key] : option;\n }\n if (settings.position.indent || settings.position.start) {\n settings.indent = settings.position.indent || [];\n settings.position = settings.position.start;\n }\n return parse(value, settings);\n}\n\n// Parse entities.\n// eslint-disable-next-line complexity\nfunction parse(value, settings) {\n var additional = settings.additional;\n var nonTerminated = settings.nonTerminated;\n var handleText = settings.text;\n var handleReference = settings.reference;\n var handleWarning = settings.warning;\n var textContext = settings.textContext;\n var referenceContext = settings.referenceContext;\n var warningContext = settings.warningContext;\n var pos = settings.position;\n var indent = settings.indent || [];\n var length = value.length;\n var index = 0;\n var lines = -1;\n var column = pos.column || 1;\n var line = pos.line || 1;\n var queue = '';\n var result = [];\n var entityCharacters;\n var namedEntity;\n var terminated;\n var characters;\n var character;\n var reference;\n var following;\n var warning;\n var reason;\n var output;\n var entity;\n var begin;\n var start;\n var type;\n var test;\n var prev;\n var next;\n var diff;\n var end;\n if (typeof additional === 'string') {\n additional = additional.charCodeAt(0);\n }\n\n // Cache the current point.\n prev = now();\n\n // Wrap `handleWarning`.\n warning = handleWarning ? parseError : noop;\n\n // Ensure the algorithm walks over the first character and the end (inclusive).\n index--;\n length++;\n while (++index < length) {\n // If the previous character was a newline.\n if (character === lineFeed) {\n column = indent[lines] || 1;\n }\n character = value.charCodeAt(index);\n if (character === ampersand) {\n following = value.charCodeAt(index + 1);\n\n // The behaviour depends on the identity of the next character.\n if (following === tab || following === lineFeed || following === formFeed || following === space || following === ampersand || following === lessThan || following !== following || additional && following === additional) {\n // Not a character reference.\n // No characters are consumed, and nothing is returned.\n // This is not an error, either.\n queue += fromCharCode(character);\n column++;\n continue;\n }\n start = index + 1;\n begin = start;\n end = start;\n if (following === numberSign) {\n // Numerical entity.\n end = ++begin;\n\n // The behaviour further depends on the next character.\n following = value.charCodeAt(end);\n if (following === uppercaseX || following === lowercaseX) {\n // ASCII hex digits.\n type = hexa;\n end = ++begin;\n } else {\n // ASCII digits.\n type = deci;\n }\n } else {\n // Named entity.\n type = name;\n }\n entityCharacters = '';\n entity = '';\n characters = '';\n test = tests[type];\n end--;\n while (++end < length) {\n following = value.charCodeAt(end);\n if (!test(following)) {\n break;\n }\n characters += fromCharCode(following);\n\n // Check if we can match a legacy named reference.\n // If so, we cache that as the last viable named reference.\n // This ensures we do not need to walk backwards later.\n if (type === name && own.call(legacy, characters)) {\n entityCharacters = characters;\n entity = legacy[characters];\n }\n }\n terminated = value.charCodeAt(end) === semicolon;\n if (terminated) {\n end++;\n namedEntity = type === name ? decodeEntity(characters) : false;\n if (namedEntity) {\n entityCharacters = characters;\n entity = namedEntity;\n }\n }\n diff = 1 + end - start;\n if (!terminated && !nonTerminated) {\n // Empty.\n } else if (!characters) {\n // An empty (possible) entity is valid, unless it’s numeric (thus an\n // ampersand followed by an octothorp).\n if (type !== name) {\n warning(numericEmpty, diff);\n }\n } else if (type === name) {\n // An ampersand followed by anything unknown, and not terminated, is\n // invalid.\n if (terminated && !entity) {\n warning(namedUnknown, 1);\n } else {\n // If theres something after an entity name which is not known, cap\n // the reference.\n if (entityCharacters !== characters) {\n end = begin + entityCharacters.length;\n diff = 1 + end - begin;\n terminated = false;\n }\n\n // If the reference is not terminated, warn.\n if (!terminated) {\n reason = entityCharacters ? namedNotTerminated : namedEmpty;\n if (settings.attribute) {\n following = value.charCodeAt(end);\n if (following === equalsTo) {\n warning(reason, diff);\n entity = null;\n } else if (alphanumerical(following)) {\n entity = null;\n } else {\n warning(reason, diff);\n }\n } else {\n warning(reason, diff);\n }\n }\n }\n reference = entity;\n } else {\n if (!terminated) {\n // All non-terminated numeric entities are not rendered, and trigger a\n // warning.\n warning(numericNotTerminated, diff);\n }\n\n // When terminated and number, parse as either hexadecimal or decimal.\n reference = parseInt(characters, bases[type]);\n\n // Trigger a warning when the parsed number is prohibited, and replace\n // with replacement character.\n if (prohibited(reference)) {\n warning(numericProhibited, diff);\n reference = fromCharCode(replacementCharacter);\n } else if (reference in invalid) {\n // Trigger a warning when the parsed number is disallowed, and replace\n // by an alternative.\n warning(numericDisallowed, diff);\n reference = invalid[reference];\n } else {\n // Parse the number.\n output = '';\n\n // Trigger a warning when the parsed number should not be used.\n if (disallowed(reference)) {\n warning(numericDisallowed, diff);\n }\n\n // Stringify the number.\n if (reference > 0xffff) {\n reference -= 0x10000;\n output += fromCharCode(reference >>> (10 & 0x3ff) | 0xd800);\n reference = 0xdc00 | reference & 0x3ff;\n }\n reference = output + fromCharCode(reference);\n }\n }\n\n // Found it!\n // First eat the queued characters as normal text, then eat an entity.\n if (reference) {\n flush();\n prev = now();\n index = end - 1;\n column += end - start + 1;\n result.push(reference);\n next = now();\n next.offset++;\n if (handleReference) {\n handleReference.call(referenceContext, reference, {\n start: prev,\n end: next\n }, value.slice(start - 1, end));\n }\n prev = next;\n } else {\n // If we could not find a reference, queue the checked characters (as\n // normal characters), and move the pointer to their end.\n // This is possible because we can be certain neither newlines nor\n // ampersands are included.\n characters = value.slice(start - 1, end);\n queue += characters;\n column += characters.length;\n index = end - 1;\n }\n } else {\n // Handle anything other than an ampersand, including newlines and EOF.\n if (character === 10 // Line feed\n ) {\n line++;\n lines++;\n column = 0;\n }\n if (character === character) {\n queue += fromCharCode(character);\n column++;\n } else {\n flush();\n }\n }\n }\n\n // Return the reduced nodes, and any possible warnings.\n return result.join('');\n\n // Get current position.\n function now() {\n return {\n line: line,\n column: column,\n offset: index + (pos.offset || 0)\n };\n }\n\n // “Throw” a parse-error: a warning.\n function parseError(code, offset) {\n var position = now();\n position.column += offset;\n position.offset += offset;\n handleWarning.call(warningContext, messages[code], position, code);\n }\n\n // Flush `queue` (normal text).\n // Macro invoked before each entity and at the end of `value`.\n // Does nothing when `queue` is empty.\n function flush() {\n if (queue) {\n result.push(queue);\n if (handleText) {\n handleText.call(textContext, queue, {\n start: prev,\n end: now()\n });\n }\n queue = '';\n }\n }\n}\n\n// Check if `character` is outside the permissible unicode range.\nfunction prohibited(code) {\n return code >= 0xd800 && code <= 0xdfff || code > 0x10ffff;\n}\n\n// Check if `character` is disallowed.\nfunction disallowed(code) {\n return code >= 0x0001 && code <= 0x0008 || code === 0x000b || code >= 0x000d && code <= 0x001f || code >= 0x007f && code <= 0x009f || code >= 0xfdd0 && code <= 0xfdef || (code & 0xffff) === 0xffff || (code & 0xffff) === 0xfffe;\n}","'use strict';\n\nmodule.exports = visit;\nvar visitParents = require('unist-util-visit-parents');\nvar CONTINUE = visitParents.CONTINUE;\nvar SKIP = visitParents.SKIP;\nvar EXIT = visitParents.EXIT;\nvisit.CONTINUE = CONTINUE;\nvisit.SKIP = SKIP;\nvisit.EXIT = EXIT;\nfunction visit(tree, test, visitor, reverse) {\n if (typeof test === 'function' && typeof visitor !== 'function') {\n reverse = visitor;\n visitor = test;\n test = null;\n }\n visitParents(tree, test, overload, reverse);\n function overload(node, parents) {\n var parent = parents[parents.length - 1];\n var index = parent ? parent.children.indexOf(node) : null;\n return visitor(node, index, parent);\n }\n}","'use strict';\n\nvar trim = require('trim');\nvar repeat = require('repeat-string');\nvar getIndent = require('./get-indentation');\nmodule.exports = indentation;\nvar C_SPACE = ' ';\nvar C_NEWLINE = '\\n';\nvar C_TAB = '\\t';\n\n/* Remove the minimum indent from every line in `value`.\n * Supports both tab, spaced, and mixed indentation (as\n * well as possible). */\nfunction indentation(value, maximum) {\n var values = value.split(C_NEWLINE);\n var position = values.length + 1;\n var minIndent = Infinity;\n var matrix = [];\n var index;\n var indentation;\n var stops;\n var padding;\n values.unshift(repeat(C_SPACE, maximum) + '!');\n while (position--) {\n indentation = getIndent(values[position]);\n matrix[position] = indentation.stops;\n if (trim(values[position]).length === 0) {\n continue;\n }\n if (indentation.indent) {\n if (indentation.indent > 0 && indentation.indent < minIndent) {\n minIndent = indentation.indent;\n }\n } else {\n minIndent = Infinity;\n break;\n }\n }\n if (minIndent !== Infinity) {\n position = values.length;\n while (position--) {\n stops = matrix[position];\n index = minIndent;\n while (index && !(index in stops)) {\n index--;\n }\n if (trim(values[position]).length !== 0 && minIndent && index !== minIndent) {\n padding = C_TAB;\n } else {\n padding = '';\n }\n values[position] = padding + values[position].slice(index in stops ? stops[index] + 1 : 0);\n }\n }\n values.shift();\n return values.join(C_NEWLINE);\n}","'use strict';\n\nmodule.exports = locate;\nfunction locate(value, fromIndex) {\n var index = value.indexOf('\\n', fromIndex);\n while (index > fromIndex) {\n if (value.charAt(index - 1) !== ' ') {\n break;\n }\n index--;\n }\n return index;\n}","'use strict';\n\nmodule.exports = locate;\nfunction locate(value, fromIndex) {\n return value.indexOf('<', fromIndex);\n}","require(\"core-js/modules/es.array.sort.js\");\nvar extend = require('xtend');\nvar mqTypes = ['blank', 'all', 'minWidth', 'minHeight', 'maxWidth', 'maxHeight', 'print'];\n\n/**\n * @param {Array} rules\n * @param {String} type\n * @param {String} prop\n *\n * @return {Boolean}\n */\nfunction itemsValid(rules, type, prop) {\n var flag = true;\n for (var i = 0, rulesLength = rules.length; i < rulesLength; i++) {\n if (typeof rules[i] !== type || prop && !rules[i].hasOwnProperty(prop)) {\n flag = false;\n break;\n }\n }\n return flag;\n}\n\n/**\n * @param {Array} rules\n * @param {String} type\n * @param {String} prop\n *\n * @return {Boolean}\n */\nfunction allValid(rules, type, prop) {\n if (!rules || !rules.length || typeof rules === 'string') {\n return 'none';\n }\n if (type === 'object' && (!prop || typeof prop !== 'string') || !itemsValid(rules, type, prop)) {\n return 'some';\n }\n return 'all';\n}\n\n/**\n * Normalize between array with strings and array with objects\n *\n * @param {Array} rules\n * @param {String} type\n * @param {String} prop\n *\n * @return {Object}\n */\nfunction prepareRules(rules, type, prop) {\n var collection = [];\n var o = {};\n for (var i = 0, rulesLength = rules.length; i < rulesLength; i++) {\n if (type === 'string') {\n o = extend({}, {\n __media: rules[i]\n });\n } else {\n o = extend({}, rules[i]);\n o.__media = rules[i][prop];\n }\n collection.push(o);\n }\n return collection;\n}\n\n/**\n * @param {Boolean} isMax\n *\n * @return {Function}\n */\nfunction determineSortOrder(isMax) {\n /**\n * Determine sort order based on provided arguments\n *\n * @param {Object} a\n * @param {Object} b\n *\n * @return {Integer}\n */\n return function (a, b) {\n var sortValA = a.sortVal;\n var sortValB = b.sortVal;\n var ruleA = a.item.__media;\n var ruleB = b.item.__media;\n isMax = typeof isMax !== 'undefined' ? isMax : false;\n\n // Consider print for sorting if sortVals are equal\n if (sortValA === sortValB) {\n if (ruleA.match(/print/)) {\n // a contains print and should be sorted after b\n return 1;\n }\n if (ruleB.match(/print/)) {\n // b contains print and should be sorted after a\n return -1;\n }\n }\n\n // Return descending sort order for max-(width|height) media queries\n if (isMax) {\n return sortValB - sortValA;\n }\n\n // Return ascending sort order\n return sortValA - sortValB;\n };\n}\n\n/**\n * @return {Object}\n */\nfunction createCollection() {\n var mqCollection = {};\n for (var i = 0, mqTypesLength = mqTypes.length; i < mqTypesLength; i++) {\n mqCollection[mqTypes[i]] = [];\n }\n return mqCollection;\n}\n\n/**\n * @param {Object} collection\n * @param {Array} rules\n *\n * @return {Object}\n */\nfunction addRulesToCollection(collection, rules) {\n // Sort media queries by kind, this is needed to output them in the right order\n for (var i = 0, rulesLength = rules.length; i < rulesLength; i++) {\n var item = rules[i];\n var rule = item.__media;\n var collectionType = 'blank';\n var valMatch = rule.match(/\\d+/g);\n if (rule.match(/min-width/)) {\n collectionType = 'minWidth';\n } else if (rule.match(/min-height/)) {\n collectionType = 'minHeight';\n } else if (rule.match(/max-width/)) {\n collectionType = 'maxWidth';\n } else if (rule.match(/max-height/)) {\n collectionType = 'maxHeight';\n } else if (rule.match(/print/)) {\n collectionType = 'print';\n } else if (rule.match(/all/)) {\n collectionType = 'all';\n }\n collection[collectionType].push({\n item: item,\n sortVal: valMatch ? valMatch[0] : 0\n });\n }\n return collection;\n}\n\n/**\n * @param {Object} collection\n *\n * @return {Object}\n */\nfunction sortCollection(collection) {\n var sorter;\n for (var collectionType in collection) {\n if (collection.hasOwnProperty(collectionType)) {\n sorter = determineSortOrder(false);\n if (collectionType === 'maxWidth' || collectionType === 'maxHeight') {\n sorter = determineSortOrder(true);\n }\n collection[collectionType].sort(sorter);\n }\n }\n return collection;\n}\n\n/**\n * @param {Object} collection\n * @param {String} type\n * @param {String} prop\n *\n * @return {Array}\n */\nfunction transformCollection(collection, type, prop) {\n var transformed = [];\n var collectionItem;\n function iterateCollectionItem(collectionItem) {\n var resultVal;\n for (var i = 0, typeLength = collectionItem.length; i < typeLength; i++) {\n if (type === 'string') {\n resultVal = collectionItem[i].item.__media;\n } else {\n resultVal = collectionItem[i].item;\n delete resultVal.__media;\n }\n transformed.push(resultVal);\n }\n }\n for (var i = 0, mqTypesLength = mqTypes.length; i < mqTypesLength; i++) {\n iterateCollectionItem(collection[mqTypes[i]]);\n }\n return transformed;\n}\n\n/**\n * @param {Array} rules\n * @param {String} type\n * @param {String} prop\n *\n * @return {Array}\n */\nfunction sortInit(rules, type, prop) {\n switch (allValid(rules, type, prop)) {\n case 'none':\n return [];\n case 'some':\n return rules;\n }\n var collection = createCollection();\n rules = prepareRules(rules, type, prop);\n addRulesToCollection(collection, rules);\n sortCollection(collection);\n return transformCollection(collection, type, prop);\n}\n\n/**\n * @param {Array} rules\n * @param {String} prop\n *\n * @return {Array}\n */\nmodule.exports = function (rules, prop) {\n if (rules) {\n if (prop) {\n return sortInit(rules, 'object', prop);\n }\n return sortInit(rules, 'string');\n }\n return [];\n};","'use strict';\n\nvar trim = require('trim');\nvar word = require('is-word-character');\nvar whitespace = require('is-whitespace-character');\nvar locate = require('../locate/emphasis');\nmodule.exports = emphasis;\nemphasis.locator = locate;\nvar C_ASTERISK = '*';\nvar C_UNDERSCORE = '_';\nfunction emphasis(eat, value, silent) {\n var self = this;\n var index = 0;\n var character = value.charAt(index);\n var now;\n var pedantic;\n var marker;\n var queue;\n var subvalue;\n var length;\n var prev;\n if (character !== C_ASTERISK && character !== C_UNDERSCORE) {\n return;\n }\n pedantic = self.options.pedantic;\n subvalue = character;\n marker = character;\n length = value.length;\n index++;\n queue = '';\n character = '';\n if (pedantic && whitespace(value.charAt(index))) {\n return;\n }\n while (index < length) {\n prev = character;\n character = value.charAt(index);\n if (character === marker && (!pedantic || !whitespace(prev))) {\n character = value.charAt(++index);\n if (character !== marker) {\n if (!trim(queue) || prev === marker) {\n return;\n }\n if (!pedantic && marker === C_UNDERSCORE && word(character)) {\n queue += marker;\n continue;\n }\n\n /* istanbul ignore if - never used (yet) */\n if (silent) {\n return true;\n }\n now = eat.now();\n now.column++;\n now.offset++;\n return eat(subvalue + queue + marker)({\n type: 'emphasis',\n children: self.tokenizeInline(queue, now)\n });\n }\n queue += marker;\n }\n if (!pedantic && character === '\\\\') {\n queue += character;\n character = value.charAt(++index);\n }\n queue += character;\n index++;\n }\n}","'use strict';\n\nvar visit = require('unist-util-visit');\nmodule.exports = removePosition;\nfunction removePosition(node, force) {\n visit(node, force ? hard : soft);\n return node;\n}\nfunction hard(node) {\n delete node.position;\n}\nfunction soft(node) {\n node.position = undefined;\n}","\"use strict\";\n\n/**\n * Naive, simple plugin to match inline nodes without attributes\n * This allows say foo, but not foo\n * For proper HTML support, you'll want a different plugin\n **/\nvar visit = require('unist-util-visit');\nvar type = 'virtualHtml';\nvar selfClosingRe = /^<(area|base|br|col|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)\\s*\\/?>$/i;\nvar simpleTagRe = /^<(\\/?)([a-z]+)\\s*>$/;\nmodule.exports = function (tree) {\n var open;\n var currentParent;\n visit(tree, 'html', function (node, index, parent) {\n if (currentParent !== parent) {\n open = [];\n currentParent = parent;\n }\n var selfClosing = getSelfClosing(node);\n if (selfClosing) {\n parent.children.splice(index, 1, {\n type: type,\n tag: selfClosing,\n position: node.position\n });\n return true;\n }\n var current = getSimpleTag(node, parent);\n if (!current) {\n return true;\n }\n var matching = findAndPull(open, current.tag);\n if (matching) {\n parent.children.splice(index, 0, virtual(current, matching, parent));\n } else if (!current.opening) {\n open.push(current);\n }\n return true;\n }, true // Iterate in reverse\n );\n\n return tree;\n};\nfunction findAndPull(open, matchingTag) {\n var i = open.length;\n while (i--) {\n if (open[i].tag === matchingTag) {\n return open.splice(i, 1)[0];\n }\n }\n return false;\n}\nfunction getSimpleTag(node, parent) {\n var match = node.value.match(simpleTagRe);\n return match ? {\n tag: match[2],\n opening: !match[1],\n node: node\n } : false;\n}\nfunction getSelfClosing(node) {\n var match = node.value.match(selfClosingRe);\n return match ? match[1] : false;\n}\nfunction virtual(fromNode, toNode, parent) {\n var fromIndex = parent.children.indexOf(fromNode.node);\n var toIndex = parent.children.indexOf(toNode.node);\n var extracted = parent.children.splice(fromIndex, toIndex - fromIndex + 1);\n var children = extracted.slice(1, -1);\n return {\n type: type,\n children: children,\n tag: fromNode.tag,\n position: {\n start: fromNode.node.position.start,\n end: toNode.node.position.end,\n indent: []\n }\n };\n}","'use strict';\n\nvar stringify = require('unist-util-stringify-position');\nmodule.exports = VMessage;\n\n// Inherit from `Error#`.\nfunction VMessagePrototype() {}\nVMessagePrototype.prototype = Error.prototype;\nVMessage.prototype = new VMessagePrototype();\n\n// Message properties.\nvar proto = VMessage.prototype;\nproto.file = '';\nproto.name = '';\nproto.reason = '';\nproto.message = '';\nproto.stack = '';\nproto.fatal = null;\nproto.column = null;\nproto.line = null;\n\n// Construct a new VMessage.\n//\n// Note: We cannot invoke `Error` on the created context, as that adds readonly\n// `line` and `column` attributes on Safari 9, thus throwing and failing the\n// data.\nfunction VMessage(reason, position, origin) {\n var parts;\n var range;\n var location;\n if (typeof position === 'string') {\n origin = position;\n position = null;\n }\n parts = parseOrigin(origin);\n range = stringify(position) || '1:1';\n location = {\n start: {\n line: null,\n column: null\n },\n end: {\n line: null,\n column: null\n }\n };\n\n // Node.\n if (position && position.position) {\n position = position.position;\n }\n if (position) {\n // Position.\n if (position.start) {\n location = position;\n position = position.start;\n } else {\n // Point.\n location.start = position;\n }\n }\n if (reason.stack) {\n this.stack = reason.stack;\n reason = reason.message;\n }\n this.message = reason;\n this.name = range;\n this.reason = reason;\n this.line = position ? position.line : null;\n this.column = position ? position.column : null;\n this.location = location;\n this.source = parts[0];\n this.ruleId = parts[1];\n}\nfunction parseOrigin(origin) {\n var result = [null, null];\n var index;\n if (typeof origin === 'string') {\n index = origin.indexOf(':');\n if (index === -1) {\n result[1] = origin;\n } else {\n result[0] = origin.slice(0, index);\n result[1] = origin.slice(index + 1);\n }\n }\n return result;\n}","module.exports = \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI0LjEuMiwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAxMzUgMjguNyIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTM1IDI4Ljc7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojRkZGRkZGO30KPC9zdHlsZT4KPGc+Cgk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMTIzLjEsMjguMWwwLjEtMTYuMmwtOC4xLDE2LjJoLTMuNUwxMDguNywxMkwxMDQsMjguMWgtNi45bDguNi0yNy42aDYuMmwzLjIsMTUuNmw4LTE1LjZoNi4ybDAuNSwyNy42SDEyMy4xCgkJeiBNOTIuNywxNS4zYzEtNC43LTAuNy04LjMtNC4zLTljLTMuOS0wLjgtNy40LDIuMi04LjUsNy4xYy0xLDQuNywwLjcsOC4zLDQuMyw5Qzg4LjEsMjMuMiw5MS42LDIwLjIsOTIuNywxNS4zIE04OC4xLDAuMQoJCWM3LjQsMC41LDEyLDYuNSwxMS4xLDE0LjZjLTAuOSw4LjMtNy41LDE0LjQtMTUuMSwxMy45Qzc2LjgsMjgsNzIuMiwyMiw3MywxNEM3My45LDUuNyw4MC42LTAuNSw4OC4xLDAuMSBNNzAuNiwyNy43CgkJYy0xLjgsMC45LTQuOCwxLTYuMSwxYy03LjgsMC0xMy01LjctMTIuOC0xMy43QzUyLDYuNiw1OC41LDAsNjYuNSwwYzIuOSwwLDUuMiwwLjcsNy45LDIuM2wtMS4zLDYuNmMtMS44LTEuNS0zLjgtMi4zLTYuMS0yLjMKCQljLTQuOCwwLTguMywzLjQtOC41LDhDNTguNCwxOSw2MS4yLDIyLDY1LjYsMjJjMS40LDAsNC4xLTAuMSw2LTFMNzAuNiwyNy43eiBNNDguNSwxNy42SDMxLjRsMS02LjRoMTcuMUw0OC41LDE3LjZ6IE01Mi40LDdIMzMKCQlsMS02LjRoMTkuNEw1Mi40LDd6IE01MC4yLDIxLjdIMzAuOGwtMSw2LjRoMTkuNEw1MC4yLDIxLjd6IE0xNC43LDE2LjdsNC05LjZoMC4xbDIsOS42SDE0Ljd6IE0yMy4zLDI4LjFoNi42TDIzLjUsMC41SDE2TDMsMjguMQoJCWg2LjlsMi4zLTUuNGg5LjlMMjMuMywyOC4xeiIvPgo8L2c+Cjwvc3ZnPgo=\"","// Generated by CoffeeScript 1.12.2\n(function () {\n var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;\n if (typeof performance !== \"undefined\" && performance !== null && performance.now) {\n module.exports = function () {\n return performance.now();\n };\n } else if (typeof process !== \"undefined\" && process !== null && process.hrtime) {\n module.exports = function () {\n return (getNanoSeconds() - nodeLoadTime) / 1e6;\n };\n hrtime = process.hrtime;\n getNanoSeconds = function getNanoSeconds() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n moduleLoadTime = getNanoSeconds();\n upTime = process.uptime() * 1e9;\n nodeLoadTime = moduleLoadTime - upTime;\n } else if (Date.now) {\n module.exports = function () {\n return Date.now() - loadTime;\n };\n loadTime = Date.now();\n } else {\n module.exports = function () {\n return new Date().getTime() - loadTime;\n };\n loadTime = new Date().getTime();\n }\n}).call(this);","'use strict';\n\nvar whitespace = require('is-whitespace-character');\nvar normalize = require('../util/normalize');\nmodule.exports = footnoteDefinition;\nfootnoteDefinition.notInList = true;\nfootnoteDefinition.notInBlock = true;\nvar C_BACKSLASH = '\\\\';\nvar C_NEWLINE = '\\n';\nvar C_TAB = '\\t';\nvar C_SPACE = ' ';\nvar C_BRACKET_OPEN = '[';\nvar C_BRACKET_CLOSE = ']';\nvar C_CARET = '^';\nvar C_COLON = ':';\nvar EXPRESSION_INITIAL_TAB = /^( {4}|\\t)?/gm;\nfunction footnoteDefinition(eat, value, silent) {\n var self = this;\n var offsets = self.offset;\n var index;\n var length;\n var subvalue;\n var now;\n var currentLine;\n var content;\n var queue;\n var subqueue;\n var character;\n var identifier;\n var add;\n var exit;\n if (!self.options.footnotes) {\n return;\n }\n index = 0;\n length = value.length;\n subvalue = '';\n now = eat.now();\n currentLine = now.line;\n while (index < length) {\n character = value.charAt(index);\n if (!whitespace(character)) {\n break;\n }\n subvalue += character;\n index++;\n }\n if (value.charAt(index) !== C_BRACKET_OPEN || value.charAt(index + 1) !== C_CARET) {\n return;\n }\n subvalue += C_BRACKET_OPEN + C_CARET;\n index = subvalue.length;\n queue = '';\n while (index < length) {\n character = value.charAt(index);\n if (character === C_BRACKET_CLOSE) {\n break;\n } else if (character === C_BACKSLASH) {\n queue += character;\n index++;\n character = value.charAt(index);\n }\n queue += character;\n index++;\n }\n if (!queue || value.charAt(index) !== C_BRACKET_CLOSE || value.charAt(index + 1) !== C_COLON) {\n return;\n }\n if (silent) {\n return true;\n }\n identifier = normalize(queue);\n subvalue += queue + C_BRACKET_CLOSE + C_COLON;\n index = subvalue.length;\n while (index < length) {\n character = value.charAt(index);\n if (character !== C_TAB && character !== C_SPACE) {\n break;\n }\n subvalue += character;\n index++;\n }\n now.column += subvalue.length;\n now.offset += subvalue.length;\n queue = '';\n content = '';\n subqueue = '';\n while (index < length) {\n character = value.charAt(index);\n if (character === C_NEWLINE) {\n subqueue = character;\n index++;\n while (index < length) {\n character = value.charAt(index);\n if (character !== C_NEWLINE) {\n break;\n }\n subqueue += character;\n index++;\n }\n queue += subqueue;\n subqueue = '';\n while (index < length) {\n character = value.charAt(index);\n if (character !== C_SPACE) {\n break;\n }\n subqueue += character;\n index++;\n }\n if (subqueue.length === 0) {\n break;\n }\n queue += subqueue;\n }\n if (queue) {\n content += queue;\n queue = '';\n }\n content += character;\n index++;\n }\n subvalue += content;\n content = content.replace(EXPRESSION_INITIAL_TAB, function (line) {\n offsets[currentLine] = (offsets[currentLine] || 0) + line.length;\n currentLine++;\n return '';\n });\n add = eat(subvalue);\n exit = self.enterBlock();\n content = self.tokenizeBlock(content, now);\n exit();\n return add({\n type: 'footnoteDefinition',\n identifier: identifier,\n children: content\n });\n}","'use strict';\n\nvar unherit = require('unherit');\nvar xtend = require('xtend');\nvar Parser = require('./lib/parser.js');\nmodule.exports = parse;\nparse.Parser = Parser;\nfunction parse(options) {\n var Local = unherit(Parser);\n Local.prototype.options = xtend(Local.prototype.options, this.data('settings'), options);\n this.Parser = Local;\n}","'use strict';\n\nvar xtend = require('xtend');\nvar toggle = require('state-toggle');\nvar vfileLocation = require('vfile-location');\nvar unescape = require('./unescape');\nvar decode = require('./decode');\nvar tokenizer = require('./tokenizer');\nmodule.exports = Parser;\nfunction Parser(doc, file) {\n this.file = file;\n this.offset = {};\n this.options = xtend(this.options);\n this.setOptions({});\n this.inList = false;\n this.inBlock = false;\n this.inLink = false;\n this.atStart = true;\n this.toOffset = vfileLocation(file).toOffset;\n this.unescape = unescape(this, 'escape');\n this.decode = decode(this);\n}\nvar proto = Parser.prototype;\n\n/* Expose core. */\nproto.setOptions = require('./set-options');\nproto.parse = require('./parse');\n\n/* Expose `defaults`. */\nproto.options = require('./defaults');\n\n/* Enter and exit helpers. */\nproto.exitStart = toggle('atStart', true);\nproto.enterList = toggle('inList', false);\nproto.enterLink = toggle('inLink', false);\nproto.enterBlock = toggle('inBlock', false);\n\n/* Nodes that can interupt a paragraph:\n *\n * ```markdown\n * A paragraph, followed by a thematic break.\n * ___\n * ```\n *\n * In the above example, the thematic break “interupts”\n * the paragraph. */\nproto.interruptParagraph = [['thematicBreak'], ['atxHeading'], ['fencedCode'], ['blockquote'], ['html'], ['setextHeading', {\n commonmark: false\n}], ['definition', {\n commonmark: false\n}], ['footnote', {\n commonmark: false\n}]];\n\n/* Nodes that can interupt a list:\n *\n * ```markdown\n * - One\n * ___\n * ```\n *\n * In the above example, the thematic break “interupts”\n * the list. */\nproto.interruptList = [['atxHeading', {\n pedantic: false\n}], ['fencedCode', {\n pedantic: false\n}], ['thematicBreak', {\n pedantic: false\n}], ['definition', {\n commonmark: false\n}], ['footnote', {\n commonmark: false\n}]];\n\n/* Nodes that can interupt a blockquote:\n *\n * ```markdown\n * > A paragraph.\n * ___\n * ```\n *\n * In the above example, the thematic break “interupts”\n * the blockquote. */\nproto.interruptBlockquote = [['indentedCode', {\n commonmark: true\n}], ['fencedCode', {\n commonmark: true\n}], ['atxHeading', {\n commonmark: true\n}], ['setextHeading', {\n commonmark: true\n}], ['thematicBreak', {\n commonmark: true\n}], ['html', {\n commonmark: true\n}], ['list', {\n commonmark: true\n}], ['definition', {\n commonmark: false\n}], ['footnote', {\n commonmark: false\n}]];\n\n/* Handlers. */\nproto.blockTokenizers = {\n newline: require('./tokenize/newline'),\n indentedCode: require('./tokenize/code-indented'),\n fencedCode: require('./tokenize/code-fenced'),\n blockquote: require('./tokenize/blockquote'),\n atxHeading: require('./tokenize/heading-atx'),\n thematicBreak: require('./tokenize/thematic-break'),\n list: require('./tokenize/list'),\n setextHeading: require('./tokenize/heading-setext'),\n html: require('./tokenize/html-block'),\n footnote: require('./tokenize/footnote-definition'),\n definition: require('./tokenize/definition'),\n table: require('./tokenize/table'),\n paragraph: require('./tokenize/paragraph')\n};\nproto.inlineTokenizers = {\n escape: require('./tokenize/escape'),\n autoLink: require('./tokenize/auto-link'),\n url: require('./tokenize/url'),\n html: require('./tokenize/html-inline'),\n link: require('./tokenize/link'),\n reference: require('./tokenize/reference'),\n strong: require('./tokenize/strong'),\n emphasis: require('./tokenize/emphasis'),\n deletion: require('./tokenize/delete'),\n code: require('./tokenize/code-inline'),\n break: require('./tokenize/break'),\n text: require('./tokenize/text')\n};\n\n/* Expose precedence. */\nproto.blockMethods = keys(proto.blockTokenizers);\nproto.inlineMethods = keys(proto.inlineTokenizers);\n\n/* Tokenizers. */\nproto.tokenizeBlock = tokenizer('block');\nproto.tokenizeInline = tokenizer('inline');\nproto.tokenizeFactory = tokenizer;\n\n/* Get all keys in `value`. */\nfunction keys(value) {\n var result = [];\n var key;\n for (key in value) {\n result.push(key);\n }\n return result;\n}","'use strict';\n\nmodule.exports = hexadecimal;\n\n// Check if the given character code, or the character code at the first\n// character, is hexadecimal.\nfunction hexadecimal(character) {\n var code = typeof character === 'string' ? character.charCodeAt(0) : character;\n return code >= 97 /* a */ && code <= 102 /* z */ || code >= 65 /* A */ && code <= 70 /* Z */ || code >= 48 /* A */ && code <= 57 /* Z */;\n}","import React from 'react'\nimport PropTypes from 'prop-types'\nimport Img from 'gatsby-image'\n\nconst StrapiImage = ({ imageInfo, style, imgStyle }) => {\n const imageStyle = style\n // console.log(imageInfo, style, imgStyle )\n // console.log(typeof imageInfo)\n // if(imageInfo !== undefined){\n // if(imageInfo.length === 0){\n // imageInfo = undefined\n // }\n // }\n // console.log(imageInfo)\n if (imageInfo === null || imageInfo === undefined || typeof imageInfo === \"string\") {\n return (<>>)\n\n } else {\n\n const { alt = '', childImageSharp, image } = imageInfo\n // console.log(alt)\n if (!!image && !!image.childImageSharp) {\n return (\n
\n )\n }\n\n if (!!childImageSharp) {\n return
\n }\n\n if (!childImageSharp && imageInfo.extension === 'svg') {\n return
\n }\n\n if (!!image && typeof image === 'string') {\n // console.log(\"hello\")\n return
\n\n }\n return null\n }\n}\n\n\nexport default StrapiImage\n","var _toConsumableArray = require(\"/datadrive/gatsby/ireland-annual-review/node_modules/@babel/runtime/helpers/toConsumableArray.js\");\nvar _defineProperty = require(\"/datadrive/gatsby/ireland-annual-review/node_modules/@babel/runtime/helpers/defineProperty.js\");\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n/**\n * Created by Samuel on 6/4/2016.\n * Simple wrapper functions to produce shorter UUIDs for cookies, maybe everything?\n */\n\nvar _require = require('uuid'),\n uuidv4 = _require.v4;\nvar anyBase = require('any-base');\nvar flickrBase58 = '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ';\nvar cookieBase90 = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~\";\nvar baseOptions = {\n consistentLength: true\n};\n\n// A default generator, instantiated only if used.\nvar toFlickr;\n\n/**\n * Takes a UUID, strips the dashes, and translates.\n * @param {string} longId\n * @param {function(string)} translator\n * @param {Object} [paddingParams]\n * @returns {string}\n */\nvar shortenUUID = function shortenUUID(longId, translator, paddingParams) {\n var translated = translator(longId.toLowerCase().replace(/-/g, ''));\n if (!paddingParams || !paddingParams.consistentLength) return translated;\n return translated.padStart(paddingParams.shortIdLength, paddingParams.paddingChar);\n};\n\n/**\n * Translate back to hex and turn back into UUID format, with dashes\n * @param {string} shortId\n * @param {function(string)} translator\n * @returns {string}\n */\nvar enlargeUUID = function enlargeUUID(shortId, translator) {\n var uu1 = translator(shortId).padStart(32, '0');\n\n // Join the zero padding and the UUID and then slice it up with match\n var m = uu1.match(/(\\w{8})(\\w{4})(\\w{4})(\\w{4})(\\w{12})/);\n\n // Accumulate the matches and join them.\n return [m[1], m[2], m[3], m[4], m[5]].join('-');\n};\n\n// Calculate length for the shortened ID\nvar getShortIdLength = function getShortIdLength(alphabetLength) {\n return Math.ceil(Math.log(Math.pow(2, 128)) / Math.log(alphabetLength));\n};\nmodule.exports = function () {\n /**\n * @param {string} toAlphabet - Defaults to flickrBase58 if not provided\n * @param {Object} [options]\n *\n * @returns {{new: (function()),\n * uuid: (function()),\n * fromUUID: (function(string)),\n * toUUID: (function(string)),\n * alphabet: (string)}}\n */\n var makeConvertor = function makeConvertor(toAlphabet, options) {\n // Default to Flickr 58\n var useAlphabet = toAlphabet || flickrBase58;\n\n // Default to baseOptions\n var selectedOptions = _objectSpread(_objectSpread({}, baseOptions), options);\n\n // Check alphabet for duplicate entries\n if (_toConsumableArray(new Set(Array.from(useAlphabet))).length !== useAlphabet.length) {\n throw new Error('The provided Alphabet has duplicate characters resulting in unreliable results');\n }\n var shortIdLength = getShortIdLength(useAlphabet.length);\n\n // Padding Params\n var paddingParams = {\n shortIdLength: shortIdLength,\n consistentLength: selectedOptions.consistentLength,\n paddingChar: useAlphabet[0]\n };\n\n // UUIDs are in hex, so we translate to and from.\n var fromHex = anyBase(anyBase.HEX, useAlphabet);\n var toHex = anyBase(useAlphabet, anyBase.HEX);\n var generate = function generate() {\n return shortenUUID(uuidv4(), fromHex, paddingParams);\n };\n var translator = {\n new: generate,\n generate: generate,\n uuid: uuidv4,\n fromUUID: function fromUUID(uuid) {\n return shortenUUID(uuid, fromHex, paddingParams);\n },\n toUUID: function toUUID(shortUuid) {\n return enlargeUUID(shortUuid, toHex);\n },\n alphabet: useAlphabet,\n maxLength: shortIdLength\n };\n Object.freeze(translator);\n return translator;\n };\n\n // Expose the constants for other purposes.\n makeConvertor.constants = {\n flickrBase58: flickrBase58,\n cookieBase90: cookieBase90\n };\n\n // Expose the generic v4 UUID generator for convenience\n makeConvertor.uuid = uuidv4;\n\n // Provide a generic generator\n makeConvertor.generate = function () {\n if (!toFlickr) {\n // Generate on first use;\n toFlickr = makeConvertor(flickrBase58).generate;\n }\n return toFlickr();\n };\n return makeConvertor;\n}();","\"use strict\";\n\nvar HtmlParser = '__RMD_HTML_PARSER__';\nexports.HtmlParser = typeof Symbol === 'undefined' ? HtmlParser : Symbol(HtmlParser);","'use strict';\n\nvar whitespace = require('is-whitespace-character');\nvar locate = require('../locate/link');\nmodule.exports = link;\nlink.locator = locate;\nvar own = {}.hasOwnProperty;\nvar C_BACKSLASH = '\\\\';\nvar C_BRACKET_OPEN = '[';\nvar C_BRACKET_CLOSE = ']';\nvar C_PAREN_OPEN = '(';\nvar C_PAREN_CLOSE = ')';\nvar C_LT = '<';\nvar C_GT = '>';\nvar C_TICK = '`';\nvar C_DOUBLE_QUOTE = '\"';\nvar C_SINGLE_QUOTE = '\\'';\n\n/* Map of characters, which can be used to mark link\n * and image titles. */\nvar LINK_MARKERS = {};\nLINK_MARKERS[C_DOUBLE_QUOTE] = C_DOUBLE_QUOTE;\nLINK_MARKERS[C_SINGLE_QUOTE] = C_SINGLE_QUOTE;\n\n/* Map of characters, which can be used to mark link\n * and image titles in commonmark-mode. */\nvar COMMONMARK_LINK_MARKERS = {};\nCOMMONMARK_LINK_MARKERS[C_DOUBLE_QUOTE] = C_DOUBLE_QUOTE;\nCOMMONMARK_LINK_MARKERS[C_SINGLE_QUOTE] = C_SINGLE_QUOTE;\nCOMMONMARK_LINK_MARKERS[C_PAREN_OPEN] = C_PAREN_CLOSE;\nfunction link(eat, value, silent) {\n var self = this;\n var subvalue = '';\n var index = 0;\n var character = value.charAt(0);\n var pedantic = self.options.pedantic;\n var commonmark = self.options.commonmark;\n var gfm = self.options.gfm;\n var closed;\n var count;\n var opening;\n var beforeURL;\n var beforeTitle;\n var subqueue;\n var hasMarker;\n var markers;\n var isImage;\n var content;\n var marker;\n var length;\n var title;\n var depth;\n var queue;\n var url;\n var now;\n var exit;\n var node;\n\n /* Detect whether this is an image. */\n if (character === '!') {\n isImage = true;\n subvalue = character;\n character = value.charAt(++index);\n }\n\n /* Eat the opening. */\n if (character !== C_BRACKET_OPEN) {\n return;\n }\n\n /* Exit when this is a link and we’re already inside\n * a link. */\n if (!isImage && self.inLink) {\n return;\n }\n subvalue += character;\n queue = '';\n index++;\n\n /* Eat the content. */\n length = value.length;\n now = eat.now();\n depth = 0;\n now.column += index;\n now.offset += index;\n while (index < length) {\n character = value.charAt(index);\n subqueue = character;\n if (character === C_TICK) {\n /* Inline-code in link content. */\n count = 1;\n while (value.charAt(index + 1) === C_TICK) {\n subqueue += character;\n index++;\n count++;\n }\n if (!opening) {\n opening = count;\n } else if (count >= opening) {\n opening = 0;\n }\n } else if (character === C_BACKSLASH) {\n /* Allow brackets to be escaped. */\n index++;\n subqueue += value.charAt(index);\n /* In GFM mode, brackets in code still count.\n * In all other modes, they don’t. This empty\n * block prevents the next statements are\n * entered. */\n } else if ((!opening || gfm) && character === C_BRACKET_OPEN) {\n depth++;\n } else if ((!opening || gfm) && character === C_BRACKET_CLOSE) {\n if (depth) {\n depth--;\n } else {\n /* Allow white-space between content and\n * url in GFM mode. */\n if (!pedantic) {\n while (index < length) {\n character = value.charAt(index + 1);\n if (!whitespace(character)) {\n break;\n }\n subqueue += character;\n index++;\n }\n }\n if (value.charAt(index + 1) !== C_PAREN_OPEN) {\n return;\n }\n subqueue += C_PAREN_OPEN;\n closed = true;\n index++;\n break;\n }\n }\n queue += subqueue;\n subqueue = '';\n index++;\n }\n\n /* Eat the content closing. */\n if (!closed) {\n return;\n }\n content = queue;\n subvalue += queue + subqueue;\n index++;\n\n /* Eat white-space. */\n while (index < length) {\n character = value.charAt(index);\n if (!whitespace(character)) {\n break;\n }\n subvalue += character;\n index++;\n }\n\n /* Eat the URL. */\n character = value.charAt(index);\n markers = commonmark ? COMMONMARK_LINK_MARKERS : LINK_MARKERS;\n queue = '';\n beforeURL = subvalue;\n if (character === C_LT) {\n index++;\n beforeURL += C_LT;\n while (index < length) {\n character = value.charAt(index);\n if (character === C_GT) {\n break;\n }\n if (commonmark && character === '\\n') {\n return;\n }\n queue += character;\n index++;\n }\n if (value.charAt(index) !== C_GT) {\n return;\n }\n subvalue += C_LT + queue + C_GT;\n url = queue;\n index++;\n } else {\n character = null;\n subqueue = '';\n while (index < length) {\n character = value.charAt(index);\n if (subqueue && own.call(markers, character)) {\n break;\n }\n if (whitespace(character)) {\n if (!pedantic) {\n break;\n }\n subqueue += character;\n } else {\n if (character === C_PAREN_OPEN) {\n depth++;\n } else if (character === C_PAREN_CLOSE) {\n if (depth === 0) {\n break;\n }\n depth--;\n }\n queue += subqueue;\n subqueue = '';\n if (character === C_BACKSLASH) {\n queue += C_BACKSLASH;\n character = value.charAt(++index);\n }\n queue += character;\n }\n index++;\n }\n subvalue += queue;\n url = queue;\n index = subvalue.length;\n }\n\n /* Eat white-space. */\n queue = '';\n while (index < length) {\n character = value.charAt(index);\n if (!whitespace(character)) {\n break;\n }\n queue += character;\n index++;\n }\n character = value.charAt(index);\n subvalue += queue;\n\n /* Eat the title. */\n if (queue && own.call(markers, character)) {\n index++;\n subvalue += character;\n queue = '';\n marker = markers[character];\n beforeTitle = subvalue;\n\n /* In commonmark-mode, things are pretty easy: the\n * marker cannot occur inside the title.\n *\n * Non-commonmark does, however, support nested\n * delimiters. */\n if (commonmark) {\n while (index < length) {\n character = value.charAt(index);\n if (character === marker) {\n break;\n }\n if (character === C_BACKSLASH) {\n queue += C_BACKSLASH;\n character = value.charAt(++index);\n }\n index++;\n queue += character;\n }\n character = value.charAt(index);\n if (character !== marker) {\n return;\n }\n title = queue;\n subvalue += queue + character;\n index++;\n while (index < length) {\n character = value.charAt(index);\n if (!whitespace(character)) {\n break;\n }\n subvalue += character;\n index++;\n }\n } else {\n subqueue = '';\n while (index < length) {\n character = value.charAt(index);\n if (character === marker) {\n if (hasMarker) {\n queue += marker + subqueue;\n subqueue = '';\n }\n hasMarker = true;\n } else if (!hasMarker) {\n queue += character;\n } else if (character === C_PAREN_CLOSE) {\n subvalue += queue + marker + subqueue;\n title = queue;\n break;\n } else if (whitespace(character)) {\n subqueue += character;\n } else {\n queue += marker + subqueue + character;\n subqueue = '';\n hasMarker = false;\n }\n index++;\n }\n }\n }\n if (value.charAt(index) !== C_PAREN_CLOSE) {\n return;\n }\n\n /* istanbul ignore if - never used (yet) */\n if (silent) {\n return true;\n }\n subvalue += C_PAREN_CLOSE;\n url = self.decode.raw(self.unescape(url), eat(beforeURL).test().end, {\n nonTerminated: false\n });\n if (title) {\n beforeTitle = eat(beforeTitle).test().end;\n title = self.decode.raw(self.unescape(title), beforeTitle);\n }\n node = {\n type: isImage ? 'image' : 'link',\n title: title || null,\n url: url\n };\n if (isImage) {\n node.alt = self.decode.raw(self.unescape(content), now) || null;\n } else {\n exit = self.enterLink();\n node.children = self.tokenizeInline(content, now);\n exit();\n }\n return eat(subvalue)(node);\n}","'use strict';\n\nvar collapseWhiteSpace = require('collapse-white-space');\nmodule.exports = normalize;\n\n/* Normalize an identifier. Collapses multiple white space\n * characters into a single space, and removes casing. */\nfunction normalize(value) {\n return collapseWhiteSpace(value).toLowerCase();\n}","'use strict';\n\nvar path = require('path');\nfunction replaceExt(npath, ext) {\n if (typeof npath !== 'string') {\n return npath;\n }\n if (npath.length === 0) {\n return npath;\n }\n var nFileName = path.basename(npath, path.extname(npath)) + ext;\n return path.join(path.dirname(npath), nFileName);\n}\nmodule.exports = replaceExt;","\"use strict\";\n\nexports.__esModule = true;\nexports.toKebabCase = exports.toCamelCase = exports.stringToArray = exports.isString = exports.isObject = exports.isBrowser = exports.hashString = exports.filteredJoin = exports.combineArray = exports.capitalize = void 0;\n\nvar isBrowser = function isBrowser() {\n return typeof window !== \"undefined\" && typeof window.document !== \"undefined\";\n};\n\nexports.isBrowser = isBrowser;\n\nvar isString = function isString(value) {\n return Object.prototype.toString.call(value) === '[object String]';\n};\n\nexports.isString = isString;\n\nvar isObject = function isObject(value) {\n return Object.prototype.toString.call(value) === '[object Object]';\n};\n\nexports.isObject = isObject;\n\nvar toCamelCase = function toCamelCase(str) {\n return isString(str) && str.indexOf('-') !== -1 && str.toLowerCase().replace(/(?:^\\w|-|[A-Z]|\\b\\w)/g, function (letter, index) {\n return index === 0 ? letter.toLowerCase() : letter.toUpperCase();\n }).replace(/\\s|\\W+/g, '') || str;\n};\n\nexports.toCamelCase = toCamelCase;\n\nvar toKebabCase = function toKebabCase(str) {\n return isString(str) && str.replace(/\\s|\\W+/g, '').replace(/[A-Z]/g, function (match) {\n return \"-\" + match.toLowerCase();\n });\n};\n\nexports.toKebabCase = toKebabCase;\n\nvar capitalize = function capitalize(str) {\n return (str === null || str === void 0 ? void 0 : str.charAt(0).toUpperCase()) + str.slice(1);\n};\n\nexports.capitalize = capitalize;\n\nvar stringToArray = function stringToArray(str, delimiter) {\n if (delimiter === void 0) {\n delimiter = \" \";\n }\n\n if (str instanceof Array) {\n return str;\n }\n\n if (isString(str)) {\n if (str.includes(delimiter)) {\n return str.split(delimiter);\n }\n\n return [str];\n }\n\n return false;\n};\n\nexports.stringToArray = stringToArray;\n\nvar hashString = function hashString(str) {\n return isString(str) && [].reduce.call(str, function (hash, item) {\n hash = (hash << 5) - hash + item.charCodeAt(0);\n return hash | 0;\n }, 0);\n};\n\nexports.hashString = hashString;\n\nvar filteredJoin = function filteredJoin(arrayToJoin) {\n return arrayToJoin.filter(function (item) {\n return item !== \"\";\n }).join();\n};\n\nexports.filteredJoin = filteredJoin;\n\nvar combineArray = function combineArray(fromArray, toArray) {\n if (!Array.isArray(fromArray)) {\n return [fromArray];\n }\n\n return fromArray.map(function (item, index) {\n return item || toArray && toArray[index];\n });\n};\n\nexports.combineArray = combineArray;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","'use strict';\n\nmodule.exports = convert;\nfunction convert(test) {\n if (typeof test === 'string') {\n return typeFactory(test);\n }\n if (test === null || test === undefined) {\n return ok;\n }\n if (typeof test === 'object') {\n return ('length' in test ? anyFactory : matchesFactory)(test);\n }\n if (typeof test === 'function') {\n return test;\n }\n throw new Error('Expected function, string, or object as test');\n}\nfunction convertAll(tests) {\n var results = [];\n var length = tests.length;\n var index = -1;\n while (++index < length) {\n results[index] = convert(tests[index]);\n }\n return results;\n}\n\n// Utility assert each property in `test` is represented in `node`, and each\n// values are strictly equal.\nfunction matchesFactory(test) {\n return matches;\n function matches(node) {\n var key;\n for (key in test) {\n if (node[key] !== test[key]) {\n return false;\n }\n }\n return true;\n }\n}\nfunction anyFactory(tests) {\n var checks = convertAll(tests);\n var length = checks.length;\n return matches;\n function matches() {\n var index = -1;\n while (++index < length) {\n if (checks[index].apply(this, arguments)) {\n return true;\n }\n }\n return false;\n }\n}\n\n// Utility to convert a string into a function which checks a given node’s type\n// for said string.\nfunction typeFactory(test) {\n return type;\n function type(node) {\n return Boolean(node && node.type === test);\n }\n}\n\n// Utility to return true.\nfunction ok() {\n return true;\n}","'use strict';\n\nmodule.exports = indentation;\n\n/* Map of characters, and their column length,\n * which can be used as indentation. */\nvar characters = {\n ' ': 1,\n '\\t': 4\n};\n\n/* Gets indentation information for a line. */\nfunction indentation(value) {\n var index = 0;\n var indent = 0;\n var character = value.charAt(index);\n var stops = {};\n var size;\n while (character in characters) {\n size = characters[character];\n indent += size;\n if (size > 1) {\n indent = Math.floor(indent / size) * size;\n }\n stops[indent] = index;\n character = value.charAt(++index);\n }\n return {\n indent: indent,\n stops: stops\n };\n}","'use strict';\n\nvar xtend = require('xtend');\nvar escapes = require('markdown-escapes');\nvar defaults = require('./defaults');\nmodule.exports = setOptions;\nfunction setOptions(options) {\n var self = this;\n var current = self.options;\n var key;\n var value;\n if (options == null) {\n options = {};\n } else if (typeof options === 'object') {\n options = xtend(options);\n } else {\n throw new Error('Invalid value `' + options + '` ' + 'for setting `options`');\n }\n for (key in defaults) {\n value = options[key];\n if (value == null) {\n value = current[key];\n }\n if (key !== 'blocks' && typeof value !== 'boolean' || key === 'blocks' && typeof value !== 'object') {\n throw new Error('Invalid value `' + value + '` for setting `options.' + key + '`');\n }\n options[key] = value;\n }\n self.options = options;\n self.escape = escapes(options);\n return self;\n}","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}\nmodule.exports = _toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","\"use strict\";\n\nexports.__esModule = true;\nexports.listenToIntersections = exports.getIO = exports.callbackIO = void 0;\n\nvar _SimpleUtils = require(\"./SimpleUtils\");\n\nvar io;\nvar listeners = new WeakMap();\n\nvar callbackIO = function callbackIO(entries) {\n entries.forEach(function (entry) {\n if (listeners.has(entry.target)) {\n var callback = listeners.get(entry.target);\n\n if (entry.isIntersecting || entry.intersectionRatio > 0) {\n io.unobserve(entry.target);\n listeners.delete(entry.target);\n callback();\n }\n }\n });\n};\n\nexports.callbackIO = callbackIO;\n\nvar getIO = function getIO(rootMargin) {\n if (typeof io === \"undefined\" && (0, _SimpleUtils.isBrowser)() && window.IntersectionObserver) {\n io = new window.IntersectionObserver(callbackIO, {\n rootMargin: rootMargin\n });\n }\n\n return io;\n};\n\nexports.getIO = getIO;\n\nvar listenToIntersections = function listenToIntersections(element, callback, rootMargin) {\n if (rootMargin === void 0) {\n rootMargin = \"200px\";\n }\n\n var observer = getIO(rootMargin);\n\n if (observer) {\n observer.observe(element);\n listeners.set(element, callback);\n return function () {\n observer.unobserve(element);\n listeners.delete(element);\n };\n }\n\n return function () {};\n};\n\nexports.listenToIntersections = listenToIntersections;","'use strict';\n\nmodule.exports = wordCharacter;\nvar fromCode = String.fromCharCode;\nvar re = /\\w/;\n\n// Check if the given character code, or the character code at the first\n// character, is a word character.\nfunction wordCharacter(character) {\n return re.test(typeof character === 'number' ? fromCode(character) : character.charAt(0));\n}","import React from 'react';\n\nexport const FormErrors = ({formErrors, field}) =>\n \n\n {\n Object.keys(formErrors).map((fieldName, i) => {\n\n if(field === fieldName && formErrors[fieldName].length > 0){\n return (\n {formErrors[fieldName]}\n )\n } else {\n return '';\n }\n })}\n
\n","\"use strict\";\n\nexports.__esModule = true;\nexports.switchImageSettings = void 0;\n\nvar _ImageUtils = require(\"./ImageUtils\");\n\nvar _MediaUtils = require(\"./MediaUtils\");\n\nvar _SimpleUtils = require(\"./SimpleUtils\");\n\nvar switchImageSettings = function switchImageSettings(_ref) {\n var image = _ref.image,\n bgImage = _ref.bgImage,\n imageRef = _ref.imageRef,\n state = _ref.state;\n var currentSources = (0, _ImageUtils.getCurrentFromData)({\n data: imageRef,\n propName: \"currentSrc\"\n });\n var returnArray = Array.isArray(image) && !(0, _MediaUtils.hasArtDirectionArray)({\n fluid: image\n });\n var lastImage = Array.isArray(bgImage) ? (0, _SimpleUtils.filteredJoin)(bgImage) : bgImage;\n var nextImage;\n var nextImageArray;\n var finalImage = returnArray && state.seenBefore && !!currentSources;\n\n if (returnArray) {\n if (!currentSources) {\n nextImage = (0, _ImageUtils.getCurrentFromData)({\n data: image,\n propName: \"tracedSVG\",\n returnArray: returnArray\n });\n nextImage = (0, _SimpleUtils.combineArray)((0, _ImageUtils.getCurrentFromData)({\n data: image,\n propName: \"base64\",\n returnArray: returnArray\n }), nextImage);\n }\n\n nextImage = (0, _SimpleUtils.combineArray)((0, _ImageUtils.getCurrentFromData)({\n data: image,\n propName: \"CSS_STRING\",\n addUrl: false,\n returnArray: returnArray\n }), nextImage);\n\n if ((state.imgLoaded || !!currentSources) && state.isVisible) {\n if (currentSources) {\n nextImage = (0, _SimpleUtils.combineArray)((0, _ImageUtils.getCurrentFromData)({\n data: imageRef,\n propName: \"currentSrc\",\n returnArray: returnArray\n }), nextImage);\n finalImage = true;\n } else {\n nextImage = (0, _SimpleUtils.combineArray)((0, _ImageUtils.getCurrentFromData)({\n data: imageRef,\n propName: \"src\",\n returnArray: returnArray\n }), nextImage);\n finalImage = true;\n }\n }\n\n nextImage = (0, _SimpleUtils.combineArray)(nextImage, bgImage);\n var dummyArray = (0, _ImageUtils.createDummyImageArray)(image.length);\n nextImage = (0, _SimpleUtils.combineArray)(nextImage, dummyArray);\n nextImageArray = nextImage;\n nextImage = (0, _SimpleUtils.filteredJoin)(nextImage);\n } else {\n nextImage = \"\";\n nextImage = (0, _ImageUtils.getCurrentFromData)({\n data: image,\n propName: \"tracedSVG\"\n }) || (0, _ImageUtils.getCurrentFromData)({\n data: image,\n propName: \"base64\"\n });\n\n if (state.imgLoaded && state.isVisible) {\n nextImage = currentSources;\n finalImage = true;\n }\n }\n\n var afterOpacity = state.imageState % 2;\n\n if (!returnArray && nextImage === \"\" && state.imgLoaded && state.isVisible && imageRef && !imageRef.currentSrc) {\n nextImage = (0, _ImageUtils.getCurrentFromData)({\n data: imageRef,\n propName: \"src\",\n checkLoaded: false\n });\n finalImage = true;\n }\n\n if (!nextImage) nextImage = lastImage;\n var newImageSettings = {\n lastImage: lastImage,\n nextImage: nextImage,\n afterOpacity: afterOpacity,\n finalImage: finalImage\n };\n if (nextImageArray) newImageSettings.nextImageArray = nextImageArray;\n return newImageSettings;\n};\n\nexports.switchImageSettings = switchImageSettings;","'use strict';\n\nmodule.exports = thematicBreak;\nvar C_NEWLINE = '\\n';\nvar C_TAB = '\\t';\nvar C_SPACE = ' ';\nvar C_ASTERISK = '*';\nvar C_UNDERSCORE = '_';\nvar C_DASH = '-';\nvar THEMATIC_BREAK_MARKER_COUNT = 3;\nfunction thematicBreak(eat, value, silent) {\n var index = -1;\n var length = value.length + 1;\n var subvalue = '';\n var character;\n var marker;\n var markerCount;\n var queue;\n while (++index < length) {\n character = value.charAt(index);\n if (character !== C_TAB && character !== C_SPACE) {\n break;\n }\n subvalue += character;\n }\n if (character !== C_ASTERISK && character !== C_DASH && character !== C_UNDERSCORE) {\n return;\n }\n marker = character;\n subvalue += character;\n markerCount = 1;\n queue = '';\n while (++index < length) {\n character = value.charAt(index);\n if (character === marker) {\n markerCount++;\n subvalue += queue + marker;\n queue = '';\n } else if (character === C_SPACE) {\n queue += character;\n } else if (markerCount >= THEMATIC_BREAK_MARKER_COUNT && (!character || character === C_NEWLINE)) {\n subvalue += queue;\n if (silent) {\n return true;\n }\n return eat(subvalue)({\n type: 'thematicBreak'\n });\n } else {\n return;\n }\n }\n}","'use strict';\n\n/* eslint-disable max-params */\nvar trim = require('trim');\nvar repeat = require('repeat-string');\nvar decimal = require('is-decimal');\nvar getIndent = require('../util/get-indentation');\nvar removeIndent = require('../util/remove-indentation');\nvar interrupt = require('../util/interrupt');\nmodule.exports = list;\nvar C_ASTERISK = '*';\nvar C_UNDERSCORE = '_';\nvar C_PLUS = '+';\nvar C_DASH = '-';\nvar C_DOT = '.';\nvar C_SPACE = ' ';\nvar C_NEWLINE = '\\n';\nvar C_TAB = '\\t';\nvar C_PAREN_CLOSE = ')';\nvar C_X_LOWER = 'x';\nvar TAB_SIZE = 4;\nvar EXPRESSION_LOOSE_LIST_ITEM = /\\n\\n(?!\\s*$)/;\nvar EXPRESSION_TASK_ITEM = /^\\[([ \\t]|x|X)][ \\t]/;\nvar EXPRESSION_BULLET = /^([ \\t]*)([*+-]|\\d+[.)])( {1,4}(?! )| |\\t|$|(?=\\n))([^\\n]*)/;\nvar EXPRESSION_PEDANTIC_BULLET = /^([ \\t]*)([*+-]|\\d+[.)])([ \\t]+)/;\nvar EXPRESSION_INITIAL_INDENT = /^( {1,4}|\\t)?/gm;\n\n/* Map of characters which can be used to mark\n * list-items. */\nvar LIST_UNORDERED_MARKERS = {};\nLIST_UNORDERED_MARKERS[C_ASTERISK] = true;\nLIST_UNORDERED_MARKERS[C_PLUS] = true;\nLIST_UNORDERED_MARKERS[C_DASH] = true;\n\n/* Map of characters which can be used to mark\n * list-items after a digit. */\nvar LIST_ORDERED_MARKERS = {};\nLIST_ORDERED_MARKERS[C_DOT] = true;\n\n/* Map of characters which can be used to mark\n * list-items after a digit. */\nvar LIST_ORDERED_COMMONMARK_MARKERS = {};\nLIST_ORDERED_COMMONMARK_MARKERS[C_DOT] = true;\nLIST_ORDERED_COMMONMARK_MARKERS[C_PAREN_CLOSE] = true;\nfunction list(eat, value, silent) {\n var self = this;\n var commonmark = self.options.commonmark;\n var pedantic = self.options.pedantic;\n var tokenizers = self.blockTokenizers;\n var interuptors = self.interruptList;\n var markers;\n var index = 0;\n var length = value.length;\n var start = null;\n var size = 0;\n var queue;\n var ordered;\n var character;\n var marker;\n var nextIndex;\n var startIndex;\n var prefixed;\n var currentMarker;\n var content;\n var line;\n var prevEmpty;\n var empty;\n var items;\n var allLines;\n var emptyLines;\n var item;\n var enterTop;\n var exitBlockquote;\n var isLoose;\n var node;\n var now;\n var end;\n var indented;\n while (index < length) {\n character = value.charAt(index);\n if (character === C_TAB) {\n size += TAB_SIZE - size % TAB_SIZE;\n } else if (character === C_SPACE) {\n size++;\n } else {\n break;\n }\n index++;\n }\n if (size >= TAB_SIZE) {\n return;\n }\n character = value.charAt(index);\n markers = commonmark ? LIST_ORDERED_COMMONMARK_MARKERS : LIST_ORDERED_MARKERS;\n if (LIST_UNORDERED_MARKERS[character] === true) {\n marker = character;\n ordered = false;\n } else {\n ordered = true;\n queue = '';\n while (index < length) {\n character = value.charAt(index);\n if (!decimal(character)) {\n break;\n }\n queue += character;\n index++;\n }\n character = value.charAt(index);\n if (!queue || markers[character] !== true) {\n return;\n }\n start = parseInt(queue, 10);\n marker = character;\n }\n character = value.charAt(++index);\n if (character !== C_SPACE && character !== C_TAB) {\n return;\n }\n if (silent) {\n return true;\n }\n index = 0;\n items = [];\n allLines = [];\n emptyLines = [];\n while (index < length) {\n nextIndex = value.indexOf(C_NEWLINE, index);\n startIndex = index;\n prefixed = false;\n indented = false;\n if (nextIndex === -1) {\n nextIndex = length;\n }\n end = index + TAB_SIZE;\n size = 0;\n while (index < length) {\n character = value.charAt(index);\n if (character === C_TAB) {\n size += TAB_SIZE - size % TAB_SIZE;\n } else if (character === C_SPACE) {\n size++;\n } else {\n break;\n }\n index++;\n }\n if (size >= TAB_SIZE) {\n indented = true;\n }\n if (item && size >= item.indent) {\n indented = true;\n }\n character = value.charAt(index);\n currentMarker = null;\n if (!indented) {\n if (LIST_UNORDERED_MARKERS[character] === true) {\n currentMarker = character;\n index++;\n size++;\n } else {\n queue = '';\n while (index < length) {\n character = value.charAt(index);\n if (!decimal(character)) {\n break;\n }\n queue += character;\n index++;\n }\n character = value.charAt(index);\n index++;\n if (queue && markers[character] === true) {\n currentMarker = character;\n size += queue.length + 1;\n }\n }\n if (currentMarker) {\n character = value.charAt(index);\n if (character === C_TAB) {\n size += TAB_SIZE - size % TAB_SIZE;\n index++;\n } else if (character === C_SPACE) {\n end = index + TAB_SIZE;\n while (index < end) {\n if (value.charAt(index) !== C_SPACE) {\n break;\n }\n index++;\n size++;\n }\n if (index === end && value.charAt(index) === C_SPACE) {\n index -= TAB_SIZE - 1;\n size -= TAB_SIZE - 1;\n }\n } else if (character !== C_NEWLINE && character !== '') {\n currentMarker = null;\n }\n }\n }\n if (currentMarker) {\n if (!pedantic && marker !== currentMarker) {\n break;\n }\n prefixed = true;\n } else {\n if (!commonmark && !indented && value.charAt(startIndex) === C_SPACE) {\n indented = true;\n } else if (commonmark && item) {\n indented = size >= item.indent || size > TAB_SIZE;\n }\n prefixed = false;\n index = startIndex;\n }\n line = value.slice(startIndex, nextIndex);\n content = startIndex === index ? line : value.slice(index, nextIndex);\n if (currentMarker === C_ASTERISK || currentMarker === C_UNDERSCORE || currentMarker === C_DASH) {\n if (tokenizers.thematicBreak.call(self, eat, line, true)) {\n break;\n }\n }\n prevEmpty = empty;\n empty = !trim(content).length;\n if (indented && item) {\n item.value = item.value.concat(emptyLines, line);\n allLines = allLines.concat(emptyLines, line);\n emptyLines = [];\n } else if (prefixed) {\n if (emptyLines.length !== 0) {\n item.value.push('');\n item.trail = emptyLines.concat();\n }\n item = {\n value: [line],\n indent: size,\n trail: []\n };\n items.push(item);\n allLines = allLines.concat(emptyLines, line);\n emptyLines = [];\n } else if (empty) {\n if (prevEmpty) {\n break;\n }\n emptyLines.push(line);\n } else {\n if (prevEmpty) {\n break;\n }\n if (interrupt(interuptors, tokenizers, self, [eat, line, true])) {\n break;\n }\n item.value = item.value.concat(emptyLines, line);\n allLines = allLines.concat(emptyLines, line);\n emptyLines = [];\n }\n index = nextIndex + 1;\n }\n node = eat(allLines.join(C_NEWLINE)).reset({\n type: 'list',\n ordered: ordered,\n start: start,\n loose: null,\n children: []\n });\n enterTop = self.enterList();\n exitBlockquote = self.enterBlock();\n isLoose = false;\n index = -1;\n length = items.length;\n while (++index < length) {\n item = items[index].value.join(C_NEWLINE);\n now = eat.now();\n item = eat(item)(listItem(self, item, now), node);\n if (item.loose) {\n isLoose = true;\n }\n item = items[index].trail.join(C_NEWLINE);\n if (index !== length - 1) {\n item += C_NEWLINE;\n }\n eat(item);\n }\n enterTop();\n exitBlockquote();\n node.loose = isLoose;\n return node;\n}\nfunction listItem(ctx, value, position) {\n var offsets = ctx.offset;\n var fn = ctx.options.pedantic ? pedanticListItem : normalListItem;\n var checked = null;\n var task;\n var indent;\n value = fn.apply(null, arguments);\n if (ctx.options.gfm) {\n task = value.match(EXPRESSION_TASK_ITEM);\n if (task) {\n indent = task[0].length;\n checked = task[1].toLowerCase() === C_X_LOWER;\n offsets[position.line] += indent;\n value = value.slice(indent);\n }\n }\n return {\n type: 'listItem',\n loose: EXPRESSION_LOOSE_LIST_ITEM.test(value) || value.charAt(value.length - 1) === C_NEWLINE,\n checked: checked,\n children: ctx.tokenizeBlock(value, position)\n };\n}\n\n/* Create a list-item using overly simple mechanics. */\nfunction pedanticListItem(ctx, value, position) {\n var offsets = ctx.offset;\n var line = position.line;\n\n /* Remove the list-item’s bullet. */\n value = value.replace(EXPRESSION_PEDANTIC_BULLET, replacer);\n\n /* The initial line was also matched by the below, so\n * we reset the `line`. */\n line = position.line;\n return value.replace(EXPRESSION_INITIAL_INDENT, replacer);\n\n /* A simple replacer which removed all matches,\n * and adds their length to `offset`. */\n function replacer($0) {\n offsets[line] = (offsets[line] || 0) + $0.length;\n line++;\n return '';\n }\n}\n\n/* Create a list-item using sane mechanics. */\nfunction normalListItem(ctx, value, position) {\n var offsets = ctx.offset;\n var line = position.line;\n var max;\n var bullet;\n var rest;\n var lines;\n var trimmedLines;\n var index;\n var length;\n\n /* Remove the list-item’s bullet. */\n value = value.replace(EXPRESSION_BULLET, replacer);\n lines = value.split(C_NEWLINE);\n trimmedLines = removeIndent(value, getIndent(max).indent).split(C_NEWLINE);\n\n /* We replaced the initial bullet with something\n * else above, which was used to trick\n * `removeIndentation` into removing some more\n * characters when possible. However, that could\n * result in the initial line to be stripped more\n * than it should be. */\n trimmedLines[0] = rest;\n offsets[line] = (offsets[line] || 0) + bullet.length;\n line++;\n index = 0;\n length = lines.length;\n while (++index < length) {\n offsets[line] = (offsets[line] || 0) + lines[index].length - trimmedLines[index].length;\n line++;\n }\n return trimmedLines.join(C_NEWLINE);\n function replacer($0, $1, $2, $3, $4) {\n bullet = $1 + $2 + $3;\n rest = $4;\n\n /* Make sure that the first nine numbered list items\n * can indent with an extra space. That is, when\n * the bullet did not receive an extra final space. */\n if (Number($2) < 10 && bullet.length % 2 === 1) {\n $2 = C_SPACE + $2;\n }\n max = $1 + repeat(C_SPACE, $2.length) + $3;\n return max + rest;\n }\n}","'use strict';\n\nvar locate = require('../locate/escape');\nmodule.exports = escape;\nescape.locator = locate;\nfunction escape(eat, value, silent) {\n var self = this;\n var character;\n var node;\n if (value.charAt(0) === '\\\\') {\n character = value.charAt(1);\n if (self.escape.indexOf(character) !== -1) {\n /* istanbul ignore if - never used (yet) */\n if (silent) {\n return true;\n }\n if (character === '\\n') {\n node = {\n type: 'break'\n };\n } else {\n node = {\n type: 'text',\n value: character\n };\n }\n return eat('\\\\' + character)(node);\n }\n }\n}","\"use strict\";\n\nvar visit = require('unist-util-visit');\nexports.ofType = function (types, mode) {\n return function (node) {\n types.forEach(function (type) {\n return visit(node, type, disallow, true);\n });\n return node;\n };\n function disallow(node, index, parent) {\n if (parent) {\n untangle(node, index, parent, mode);\n }\n }\n};\nexports.ifNotMatch = function (allowNode, mode) {\n return function (node) {\n visit(node, disallow, true);\n return node;\n };\n function disallow(node, index, parent) {\n if (parent && !allowNode(node, index, parent)) {\n untangle(node, index, parent, mode);\n }\n }\n};\nfunction untangle(node, index, parent, mode) {\n if (mode === 'remove') {\n parent.children.splice(index, 1);\n } else if (mode === 'unwrap') {\n var args = [index, 1];\n if (node.children) {\n args = args.concat(node.children);\n }\n Array.prototype.splice.apply(parent.children, args);\n }\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.stripRemainingProps = exports.convertProps = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _filterInvalidDomProps = _interopRequireDefault(require(\"filter-invalid-dom-props\"));\n\nvar _MediaUtils = require(\"./MediaUtils\");\n\nvar stripRemainingProps = function stripRemainingProps(props) {\n return (0, _filterInvalidDomProps.default)(props);\n};\n\nexports.stripRemainingProps = stripRemainingProps;\n\nvar convertProps = function convertProps(props) {\n var convertedProps = (0, _extends2.default)({}, props);\n var fixed = convertedProps.fixed,\n fluid = convertedProps.fluid;\n\n if (fluid && (0, _MediaUtils.hasArtDirectionSupport)(props, 'fluid')) {\n convertedProps.fluid = (0, _MediaUtils.groupByMedia)(convertedProps.fluid);\n }\n\n if (fixed && (0, _MediaUtils.hasArtDirectionSupport)(props, 'fixed')) {\n convertedProps.fixed = (0, _MediaUtils.groupByMedia)(convertedProps.fixed);\n }\n\n return convertedProps;\n};\n\nexports.convertProps = convertProps;","'use strict';\n\nvar whitespace = require('is-whitespace-character');\nmodule.exports = table;\nvar C_BACKSLASH = '\\\\';\nvar C_TICK = '`';\nvar C_DASH = '-';\nvar C_PIPE = '|';\nvar C_COLON = ':';\nvar C_SPACE = ' ';\nvar C_NEWLINE = '\\n';\nvar C_TAB = '\\t';\nvar MIN_TABLE_COLUMNS = 1;\nvar MIN_TABLE_ROWS = 2;\nvar TABLE_ALIGN_LEFT = 'left';\nvar TABLE_ALIGN_CENTER = 'center';\nvar TABLE_ALIGN_RIGHT = 'right';\nvar TABLE_ALIGN_NONE = null;\nfunction table(eat, value, silent) {\n var self = this;\n var index;\n var alignments;\n var alignment;\n var subvalue;\n var row;\n var length;\n var lines;\n var queue;\n var character;\n var hasDash;\n var align;\n var cell;\n var preamble;\n var count;\n var opening;\n var now;\n var position;\n var lineCount;\n var line;\n var rows;\n var table;\n var lineIndex;\n var pipeIndex;\n var first;\n\n /* Exit when not in gfm-mode. */\n if (!self.options.gfm) {\n return;\n }\n\n /* Get the rows.\n * Detecting tables soon is hard, so there are some\n * checks for performance here, such as the minimum\n * number of rows, and allowed characters in the\n * alignment row. */\n index = 0;\n lineCount = 0;\n length = value.length + 1;\n lines = [];\n while (index < length) {\n lineIndex = value.indexOf(C_NEWLINE, index);\n pipeIndex = value.indexOf(C_PIPE, index + 1);\n if (lineIndex === -1) {\n lineIndex = value.length;\n }\n if (pipeIndex === -1 || pipeIndex > lineIndex) {\n if (lineCount < MIN_TABLE_ROWS) {\n return;\n }\n break;\n }\n lines.push(value.slice(index, lineIndex));\n lineCount++;\n index = lineIndex + 1;\n }\n\n /* Parse the alignment row. */\n subvalue = lines.join(C_NEWLINE);\n alignments = lines.splice(1, 1)[0] || [];\n index = 0;\n length = alignments.length;\n lineCount--;\n alignment = false;\n align = [];\n while (index < length) {\n character = alignments.charAt(index);\n if (character === C_PIPE) {\n hasDash = null;\n if (alignment === false) {\n if (first === false) {\n return;\n }\n } else {\n align.push(alignment);\n alignment = false;\n }\n first = false;\n } else if (character === C_DASH) {\n hasDash = true;\n alignment = alignment || TABLE_ALIGN_NONE;\n } else if (character === C_COLON) {\n if (alignment === TABLE_ALIGN_LEFT) {\n alignment = TABLE_ALIGN_CENTER;\n } else if (hasDash && alignment === TABLE_ALIGN_NONE) {\n alignment = TABLE_ALIGN_RIGHT;\n } else {\n alignment = TABLE_ALIGN_LEFT;\n }\n } else if (!whitespace(character)) {\n return;\n }\n index++;\n }\n if (alignment !== false) {\n align.push(alignment);\n }\n\n /* Exit when without enough columns. */\n if (align.length < MIN_TABLE_COLUMNS) {\n return;\n }\n\n /* istanbul ignore if - never used (yet) */\n if (silent) {\n return true;\n }\n\n /* Parse the rows. */\n position = -1;\n rows = [];\n table = eat(subvalue).reset({\n type: 'table',\n align: align,\n children: rows\n });\n while (++position < lineCount) {\n line = lines[position];\n row = {\n type: 'tableRow',\n children: []\n };\n\n /* Eat a newline character when this is not the\n * first row. */\n if (position) {\n eat(C_NEWLINE);\n }\n\n /* Eat the row. */\n eat(line).reset(row, table);\n length = line.length + 1;\n index = 0;\n queue = '';\n cell = '';\n preamble = true;\n count = null;\n opening = null;\n while (index < length) {\n character = line.charAt(index);\n if (character === C_TAB || character === C_SPACE) {\n if (cell) {\n queue += character;\n } else {\n eat(character);\n }\n index++;\n continue;\n }\n if (character === '' || character === C_PIPE) {\n if (preamble) {\n eat(character);\n } else {\n if (character && opening) {\n queue += character;\n index++;\n continue;\n }\n if ((cell || character) && !preamble) {\n subvalue = cell;\n if (queue.length > 1) {\n if (character) {\n subvalue += queue.slice(0, queue.length - 1);\n queue = queue.charAt(queue.length - 1);\n } else {\n subvalue += queue;\n queue = '';\n }\n }\n now = eat.now();\n eat(subvalue)({\n type: 'tableCell',\n children: self.tokenizeInline(cell, now)\n }, row);\n }\n eat(queue + character);\n queue = '';\n cell = '';\n }\n } else {\n if (queue) {\n cell += queue;\n queue = '';\n }\n cell += character;\n if (character === C_BACKSLASH && index !== length - 2) {\n cell += line.charAt(index + 1);\n index++;\n }\n if (character === C_TICK) {\n count = 1;\n while (line.charAt(index + 1) === character) {\n cell += character;\n index++;\n count++;\n }\n if (!opening) {\n opening = count;\n } else if (count >= opening) {\n opening = 0;\n }\n }\n }\n preamble = false;\n index++;\n }\n\n /* Eat the alignment row. */\n if (!position) {\n eat(C_NEWLINE + alignments);\n }\n }\n return table;\n}","'use strict';\n\nmodule.exports = visitParents;\nvar convert = require('unist-util-is/convert');\nvar CONTINUE = true;\nvar SKIP = 'skip';\nvar EXIT = false;\nvisitParents.CONTINUE = CONTINUE;\nvisitParents.SKIP = SKIP;\nvisitParents.EXIT = EXIT;\nfunction visitParents(tree, test, visitor, reverse) {\n var is;\n if (typeof test === 'function' && typeof visitor !== 'function') {\n reverse = visitor;\n visitor = test;\n test = null;\n }\n is = convert(test);\n one(tree, null, []);\n\n // Visit a single node.\n function one(node, index, parents) {\n var result = [];\n var subresult;\n if (!test || is(node, index, parents[parents.length - 1] || null)) {\n result = toResult(visitor(node, parents));\n if (result[0] === EXIT) {\n return result;\n }\n }\n if (node.children && result[0] !== SKIP) {\n subresult = toResult(all(node.children, parents.concat(node)));\n return subresult[0] === EXIT ? subresult : result;\n }\n return result;\n }\n\n // Visit children in `parent`.\n function all(children, parents) {\n var min = -1;\n var step = reverse ? -1 : 1;\n var index = (reverse ? children.length : min) + step;\n var result;\n while (index > min && index < children.length) {\n result = one(children[index], index, parents);\n if (result[0] === EXIT) {\n return result;\n }\n index = typeof result[1] === 'number' ? result[1] : index + step;\n }\n }\n}\nfunction toResult(value) {\n if (value !== null && typeof value === 'object' && 'length' in value) {\n return value;\n }\n if (typeof value === 'number') {\n return [CONTINUE, value];\n }\n return [value];\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.resetImageCache = exports.inImageCache = exports.allInImageCache = exports.activateCacheForMultipleImages = exports.activateCacheForImage = void 0;\n\nvar _HelperUtils = require(\"./HelperUtils\");\n\nvar _MediaUtils = require(\"./MediaUtils\");\n\nvar _ImageUtils = require(\"./ImageUtils\");\n\nvar _SimpleUtils = require(\"./SimpleUtils\");\n\nvar imageCache = Object.create({});\n\nvar inImageCache = function inImageCache(props, index, isLoop) {\n if (index === void 0) {\n index = 0;\n }\n\n if (isLoop === void 0) {\n isLoop = false;\n }\n\n var convertedProps = (0, _HelperUtils.convertProps)(props);\n var isImageStack = (0, _ImageUtils.hasImageArray)(convertedProps) && !(0, _MediaUtils.hasArtDirectionArray)(convertedProps);\n\n if (isImageStack && !isLoop) {\n return allInImageCache(props);\n }\n\n var src = isImageStack ? (0, _ImageUtils.getSelectedImage)(convertedProps, index) : (0, _ImageUtils.getImageSrcKey)(convertedProps);\n\n if ((0, _SimpleUtils.isObject)(src)) {\n var objectSrc = (0, _ImageUtils.getImageSrcKey)({\n fluid: src,\n fixed: src\n });\n return imageCache[objectSrc] || false;\n }\n\n return imageCache[src] || false;\n};\n\nexports.inImageCache = inImageCache;\n\nvar allInImageCache = function allInImageCache(props) {\n var convertedProps = (0, _HelperUtils.convertProps)(props);\n var imageStack = convertedProps.fluid || convertedProps.fixed;\n return imageStack.every(function (imageData, index) {\n return inImageCache(convertedProps, index, true);\n });\n};\n\nexports.allInImageCache = allInImageCache;\n\nvar activateCacheForImage = function activateCacheForImage(props, index, isLoop) {\n if (index === void 0) {\n index = 0;\n }\n\n if (isLoop === void 0) {\n isLoop = false;\n }\n\n var convertedProps = (0, _HelperUtils.convertProps)(props);\n var isImageStack = (0, _ImageUtils.hasImageArray)(convertedProps) && !(0, _MediaUtils.hasArtDirectionArray)(convertedProps);\n\n if (isImageStack && !isLoop) {\n return activateCacheForMultipleImages(props);\n }\n\n var src = isImageStack ? (0, _ImageUtils.getSelectedImage)(convertedProps, index) : (0, _ImageUtils.getImageSrcKey)(convertedProps);\n\n if (src) {\n if ((0, _SimpleUtils.isObject)(src)) {\n var objectSrc = (0, _ImageUtils.getImageSrcKey)({\n fluid: src,\n fixed: src\n });\n imageCache[objectSrc] = true;\n } else {\n imageCache[src] = true;\n }\n }\n};\n\nexports.activateCacheForImage = activateCacheForImage;\n\nvar activateCacheForMultipleImages = function activateCacheForMultipleImages(props) {\n var convertedProps = (0, _HelperUtils.convertProps)(props);\n var imageStack = convertedProps.fluid || convertedProps.fixed;\n imageStack.forEach(function (imageData, index) {\n return activateCacheForImage(convertedProps, index, true);\n });\n};\n\nexports.activateCacheForMultipleImages = activateCacheForMultipleImages;\n\nvar resetImageCache = function resetImageCache() {\n for (var prop in imageCache) {\n delete imageCache[prop];\n }\n};\n\nexports.resetImageCache = resetImageCache;","'use strict';\n\nvar whitespace = require('is-whitespace-character');\nvar locate = require('../locate/link');\nvar normalize = require('../util/normalize');\nmodule.exports = reference;\nreference.locator = locate;\nvar T_LINK = 'link';\nvar T_IMAGE = 'image';\nvar T_FOOTNOTE = 'footnote';\nvar REFERENCE_TYPE_SHORTCUT = 'shortcut';\nvar REFERENCE_TYPE_COLLAPSED = 'collapsed';\nvar REFERENCE_TYPE_FULL = 'full';\nvar C_CARET = '^';\nvar C_BACKSLASH = '\\\\';\nvar C_BRACKET_OPEN = '[';\nvar C_BRACKET_CLOSE = ']';\nfunction reference(eat, value, silent) {\n var self = this;\n var character = value.charAt(0);\n var index = 0;\n var length = value.length;\n var subvalue = '';\n var intro = '';\n var type = T_LINK;\n var referenceType = REFERENCE_TYPE_SHORTCUT;\n var content;\n var identifier;\n var now;\n var node;\n var exit;\n var queue;\n var bracketed;\n var depth;\n\n /* Check whether we’re eating an image. */\n if (character === '!') {\n type = T_IMAGE;\n intro = character;\n character = value.charAt(++index);\n }\n if (character !== C_BRACKET_OPEN) {\n return;\n }\n index++;\n intro += character;\n queue = '';\n\n /* Check whether we’re eating a footnote. */\n if (self.options.footnotes && value.charAt(index) === C_CARET) {\n /* Exit if `![^` is found, so the `!` will be seen as text after this,\n * and we’ll enter this function again when `[^` is found. */\n if (type === T_IMAGE) {\n return;\n }\n intro += C_CARET;\n index++;\n type = T_FOOTNOTE;\n }\n\n /* Eat the text. */\n depth = 0;\n while (index < length) {\n character = value.charAt(index);\n if (character === C_BRACKET_OPEN) {\n bracketed = true;\n depth++;\n } else if (character === C_BRACKET_CLOSE) {\n if (!depth) {\n break;\n }\n depth--;\n }\n if (character === C_BACKSLASH) {\n queue += C_BACKSLASH;\n character = value.charAt(++index);\n }\n queue += character;\n index++;\n }\n subvalue = queue;\n content = queue;\n character = value.charAt(index);\n if (character !== C_BRACKET_CLOSE) {\n return;\n }\n index++;\n subvalue += character;\n queue = '';\n while (index < length) {\n character = value.charAt(index);\n if (!whitespace(character)) {\n break;\n }\n queue += character;\n index++;\n }\n character = value.charAt(index);\n\n /* Inline footnotes cannot have an identifier. */\n if (type !== T_FOOTNOTE && character === C_BRACKET_OPEN) {\n identifier = '';\n queue += character;\n index++;\n while (index < length) {\n character = value.charAt(index);\n if (character === C_BRACKET_OPEN || character === C_BRACKET_CLOSE) {\n break;\n }\n if (character === C_BACKSLASH) {\n identifier += C_BACKSLASH;\n character = value.charAt(++index);\n }\n identifier += character;\n index++;\n }\n character = value.charAt(index);\n if (character === C_BRACKET_CLOSE) {\n referenceType = identifier ? REFERENCE_TYPE_FULL : REFERENCE_TYPE_COLLAPSED;\n queue += identifier + character;\n index++;\n } else {\n identifier = '';\n }\n subvalue += queue;\n queue = '';\n } else {\n if (!content) {\n return;\n }\n identifier = content;\n }\n\n /* Brackets cannot be inside the identifier. */\n if (referenceType !== REFERENCE_TYPE_FULL && bracketed) {\n return;\n }\n subvalue = intro + subvalue;\n if (type === T_LINK && self.inLink) {\n return null;\n }\n\n /* istanbul ignore if - never used (yet) */\n if (silent) {\n return true;\n }\n if (type === T_FOOTNOTE && content.indexOf(' ') !== -1) {\n return eat(subvalue)({\n type: 'footnote',\n children: this.tokenizeInline(content, eat.now())\n });\n }\n now = eat.now();\n now.column += intro.length;\n now.offset += intro.length;\n identifier = referenceType === REFERENCE_TYPE_FULL ? identifier : content;\n node = {\n type: type + 'Reference',\n identifier: normalize(identifier)\n };\n if (type === T_LINK || type === T_IMAGE) {\n node.referenceType = referenceType;\n }\n if (type === T_LINK) {\n exit = self.enterLink();\n node.children = self.tokenizeInline(content, now);\n exit();\n } else if (type === T_IMAGE) {\n node.alt = self.decode.raw(self.unescape(content), now) || null;\n }\n return eat(subvalue)(node);\n}","var visitWithParents = require('unist-util-visit-parents');\nfunction addListMetadata() {\n return function (ast) {\n visitWithParents(ast, 'list', function (listNode, parents) {\n var depth = 0,\n i,\n n;\n for (i = 0, n = parents.length; i < n; i++) {\n if (parents[i].type === 'list') depth += 1;\n }\n for (i = 0, n = listNode.children.length; i < n; i++) {\n var child = listNode.children[i];\n child.index = i;\n child.ordered = listNode.ordered;\n }\n listNode.depth = depth;\n });\n return ast;\n };\n}\nmodule.exports = addListMetadata;","var now = require('performance-now'),\n root = typeof window === 'undefined' ? global : window,\n vendors = ['moz', 'webkit'],\n suffix = 'AnimationFrame',\n raf = root['request' + suffix],\n caf = root['cancel' + suffix] || root['cancelRequest' + suffix];\nfor (var i = 0; !raf && i < vendors.length; i++) {\n raf = root[vendors[i] + 'Request' + suffix];\n caf = root[vendors[i] + 'Cancel' + suffix] || root[vendors[i] + 'CancelRequest' + suffix];\n}\n\n// Some versions of FF have rAF but not cAF\nif (!raf || !caf) {\n var last = 0,\n id = 0,\n queue = [],\n frameDuration = 1000 / 60;\n raf = function raf(callback) {\n if (queue.length === 0) {\n var _now = now(),\n next = Math.max(0, frameDuration - (_now - last));\n last = next + _now;\n setTimeout(function () {\n var cp = queue.slice(0);\n // Clear queue here to prevent\n // callbacks from appending listeners\n // to the current frame's queue\n queue.length = 0;\n var _loop = function _loop() {\n if (!cp[i].cancelled) {\n try {\n cp[i].callback(last);\n } catch (e) {\n setTimeout(function () {\n throw e;\n }, 0);\n }\n }\n };\n for (var i = 0; i < cp.length; i++) {\n _loop();\n }\n }, Math.round(next));\n }\n queue.push({\n handle: ++id,\n callback: callback,\n cancelled: false\n });\n return id;\n };\n caf = function caf(handle) {\n for (var i = 0; i < queue.length; i++) {\n if (queue[i].handle === handle) {\n queue[i].cancelled = true;\n }\n }\n };\n}\nmodule.exports = function (fn) {\n // Wrap in a new function to prevent\n // `cancel` potentially being assigned\n // to the native rAF function\n return raf.call(root, fn);\n};\nmodule.exports.cancel = function () {\n caf.apply(root, arguments);\n};\nmodule.exports.polyfill = function (object) {\n if (!object) {\n object = root;\n }\n object.requestAnimationFrame = raf;\n object.cancelAnimationFrame = caf;\n};","'use strict';\n\nvar wrap = require('./wrap.js');\nmodule.exports = trough;\ntrough.wrap = wrap;\nvar slice = [].slice;\n\n// Create new middleware.\nfunction trough() {\n var fns = [];\n var middleware = {};\n middleware.run = run;\n middleware.use = use;\n return middleware;\n\n // Run `fns`. Last argument must be a completion handler.\n function run() {\n var index = -1;\n var input = slice.call(arguments, 0, -1);\n var done = arguments[arguments.length - 1];\n if (typeof done !== 'function') {\n throw new Error('Expected function as last argument, not ' + done);\n }\n next.apply(null, [null].concat(input));\n\n // Run the next `fn`, if any.\n function next(err) {\n var fn = fns[++index];\n var params = slice.call(arguments, 0);\n var values = params.slice(1);\n var length = input.length;\n var pos = -1;\n if (err) {\n done(err);\n return;\n }\n\n // Copy non-nully input into values.\n while (++pos < length) {\n if (values[pos] === null || values[pos] === undefined) {\n values[pos] = input[pos];\n }\n }\n input = values;\n\n // Next or done.\n if (fn) {\n wrap(fn, next).apply(null, input);\n } else {\n done.apply(null, [null].concat(input));\n }\n }\n }\n\n // Add `fn` to the list.\n function use(fn) {\n if (typeof fn !== 'function') {\n throw new Error('Expected `fn` to be a function, not ' + fn);\n }\n fns.push(fn);\n return middleware;\n }\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.getStyleRulesForClassName = exports.getStyleRules = exports.getBackgroundStylesForSingleClass = exports.default = void 0;\n\nvar _SimpleUtils = require(\"./SimpleUtils\");\n\nvar getStyleRulesForClassName = function getStyleRulesForClassName(className) {\n var styleSheets = (0, _SimpleUtils.isBrowser)() ? window.document.styleSheets : [];\n\n for (var i = 0; i < styleSheets.length; i++) {\n var classes = void 0;\n\n try {\n classes = typeof styleSheets[i].rules !== 'undefined' ? styleSheets[i].rules : typeof styleSheets[i].cssRules !== 'undefined' ? styleSheets[i].cssRules : '';\n } catch (e) {}\n\n if (classes) {\n var foundClass = Array.prototype.slice.call(classes).reduce(function (foundAcc, styleRule) {\n if (styleRule.selectorText === className) {\n foundAcc.push(styleRule);\n }\n\n return foundAcc;\n }, []);\n\n if (foundClass.length) {\n return foundClass;\n }\n }\n }\n\n return [];\n};\n\nexports.getStyleRulesForClassName = getStyleRulesForClassName;\n\nvar getStyleRules = function getStyleRules(cssStyleRules) {\n var styles = {};\n\n if (cssStyleRules.length > 0 && typeof cssStyleRules[0].style !== 'undefined') {\n var constructorName = cssStyleRules[0].style.constructor.name || cssStyleRules[0].style.constructor.toString();\n\n switch (constructorName) {\n case 'CSS2Properties':\n case '[object MSStyleCSSProperties]':\n Object.values(cssStyleRules[0].style).forEach(function (prop) {\n styles[(0, _SimpleUtils.toCamelCase)(prop)] = cssStyleRules[0].style[prop];\n });\n break;\n\n case 'CSSStyleDeclaration':\n styles = cssStyleRules[0].style;\n break;\n\n default:\n console.error('Unknown style object prototype');\n break;\n }\n }\n\n return styles;\n};\n\nexports.getStyleRules = getStyleRules;\n\nvar getBackgroundStylesForSingleClass = function getBackgroundStylesForSingleClass(className) {\n if (className && (0, _SimpleUtils.isString)(className)) {\n var cssStyleRules = getStyleRulesForClassName(\".\" + className);\n\n if ((cssStyleRules === null || cssStyleRules === void 0 ? void 0 : cssStyleRules.length) > 0 && typeof cssStyleRules[0].style !== 'undefined') {\n return Object.keys(getStyleRules(cssStyleRules)).filter(function (key) {\n return key.indexOf('background') === 0 && cssStyleRules[0].style[key] !== '';\n }).reduce(function (newData, key) {\n newData[(0, _SimpleUtils.toCamelCase)(key)] = cssStyleRules[0].style[key];\n return newData;\n }, {});\n }\n }\n\n return {};\n};\n\nexports.getBackgroundStylesForSingleClass = getBackgroundStylesForSingleClass;\n\nvar getBackgroundStyles = function getBackgroundStyles(className) {\n if ((0, _SimpleUtils.isBrowser)()) {\n var classes = (0, _SimpleUtils.stringToArray)(className);\n\n if (classes instanceof Array) {\n var classObjects = [];\n classes.forEach(function (item) {\n return classObjects.push(getBackgroundStylesForSingleClass(item));\n });\n return Object.assign.apply(Object, classObjects);\n }\n\n return getBackgroundStylesForSingleClass(className);\n }\n\n return {};\n};\n\nvar _default = getBackgroundStyles;\nexports.default = _default;","'use strict';\n\nvar xtend = require('xtend');\nvar removePosition = require('unist-util-remove-position');\nmodule.exports = parse;\nvar C_NEWLINE = '\\n';\nvar EXPRESSION_LINE_BREAKS = /\\r\\n|\\r/g;\n\n/* Parse the bound file. */\nfunction parse() {\n var self = this;\n var value = String(self.file);\n var start = {\n line: 1,\n column: 1,\n offset: 0\n };\n var content = xtend(start);\n var node;\n\n /* Clean non-unix newlines: `\\r\\n` and `\\r` are all\n * changed to `\\n`. This should not affect positional\n * information. */\n value = value.replace(EXPRESSION_LINE_BREAKS, C_NEWLINE);\n if (value.charCodeAt(0) === 0xFEFF) {\n value = value.slice(1);\n content.column++;\n content.offset++;\n }\n node = {\n type: 'root',\n children: self.tokenizeBlock(value, content),\n position: {\n start: start,\n end: self.eof || xtend(start)\n }\n };\n if (!self.options.position) {\n removePosition(node, true);\n }\n return node;\n}"],"sourceRoot":""}