arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nvar isBrowser = typeof window !== 'undefined';\nexports.isBrowser = isBrowser;\nvar isDevelopment = process.env.NODE_ENV !== 'production';\nexports.isDevelopment = isDevelopment;\n\nfunction logWarning(message) {\n if (isDevelopment) console.warn(message);\n}\n\nfunction scroller(target) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1000;\n (0, _scrollToElement[\"default\"])(target, {\n duration: duration,\n offset: offset\n });\n}\n\nfunction handleLinkClick(to, e, onAnchorLinkClick) {\n /**\n * Log warnings on click\n */\n var improperFormatting = !to.includes('/') || !to.includes('#');\n if (improperFormatting) logWarning(errorTypes.IMPROPPER_FORMATTING);\n\n if (isBrowser && to.includes('#')) {\n var _to$split = to.split('#'),\n _to$split2 = _slicedToArray(_to$split, 2),\n anchorPath = _to$split2[0],\n anchor = _to$split2[1];\n\n if (window.location.pathname === (0, _gatsby.withPrefix)(anchorPath)) {\n e.preventDefault();\n scroller(\"#\".concat(anchor), window.gatsby_scroll_offset, window.gatsby_scroll_duration);\n }\n }\n\n if (onAnchorLinkClick) onAnchorLinkClick();\n}\n\nfunction handleStrippedLinkClick(to, e, onAnchorLinkClick) {\n /**\n * Log warnings on click\n */\n var improperFormatting = !to.includes('/') || !to.includes('#');\n if (improperFormatting) logWarning(errorTypes.IMPROPPER_FORMATTING);\n\n var _to$split3 = to.split('#'),\n _to$split4 = _slicedToArray(_to$split3, 2),\n anchorPath = _to$split4[0],\n anchor = _to$split4[1];\n /**\n * Determine location, run scroller or set window variable\n */\n\n\n var isSamePage = isBrowser && window.location.pathname === anchorPath;\n var isDifferentPage = isBrowser && window.location.pathname !== anchorPath;\n\n if (isSamePage) {\n e.preventDefault();\n scroller(\"#\".concat(anchor), window.gatsby_scroll_offset, window.gatsby_scroll_duration);\n }\n\n if (isDifferentPage) {\n window.gatsby_scroll_hash = \"#\".concat(anchor);\n }\n\n if (onAnchorLinkClick) onAnchorLinkClick();\n}\n\nfunction stripHashedLocation(to) {\n return to.split('#')[0];\n}\n\nfunction checkHash(location, offset) {\n var hash = location.hash,\n selector = hash ? hash.substr(1) : null,\n validElement = selector ? document.getElementById(selector) : null;\n if (hash && Boolean(validElement)) scroller(hash, offset);else if (hash && selector && !validElement) logWarning(errorTypes.INVALID_HASH);\n}","import { Link } from \"gatsby\"\nimport PropTypes from \"prop-types\"\nimport React from \"react\"\nimport classNames from \"classnames\"\nimport { AnchorLink } from \"gatsby-plugin-anchor-links\"\n\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\"\nimport { faArrowRight } from \"@fortawesome/pro-regular-svg-icons/faArrowRight\"\nimport { faLongArrowLeft } from \"@fortawesome/pro-light-svg-icons/faLongArrowLeft\"\nimport { faFileDownload } from \"@fortawesome/pro-solid-svg-icons/faFileDownload\"\n\nconst Button = ({\n goBack,\n className,\n standalone,\n white,\n whiteMobile,\n border,\n minimal,\n contained,\n arrow,\n arrowSm,\n arrowSecondary,\n tel,\n href,\n buttonText,\n download,\n external,\n destination,\n appearance,\n anchor,\n animate = true\n}) => {\n const handleGoBack = () => {\n window.history.back()\n }\n\n const btnClass = classNames(\"standard-button\", className, {\n standalone: standalone,\n \"go-back-button-top-left\": goBack,\n white: white || appearance === \"white\",\n border: border ? border : false,\n minimal: minimal || appearance === \"minimal\",\n contained: contained || appearance === \"contained\",\n arrow: arrow || appearance === \"arrow\",\n \"arrow arrow-sm\": arrowSm || appearance === \"arrow-sm\",\n \"arrow arrow-secondary\": arrowSecondary || appearance === \"arrow-secondary\",\n animate\n })\n\n const backBtnClass = classNames(\"go-back-button\", className, {\n \"go-back-button\": true,\n \"go-back-button-top-left\": goBack,\n white: white ? white : false,\n \"white-mobile\": whiteMobile ? whiteMobile : false,\n minimal: minimal ? minimal : false\n })\n\n if (\n arrow ||\n arrowSm ||\n arrowSecondary ||\n appearance === \"arrow\" ||\n appearance === \"arrow-sm\" ||\n appearance === \"arrow-secondary\"\n ) {\n if (href) {\n return (\n \n {animate ? (\n \n Learn More\n \n \n ) : (\n \n )}\n \n )\n } else {\n return (\n \n {animate ? (\n \n Learn More\n \n \n ) : (\n \n )}\n
\n )\n }\n }\n\n // for telephone links\n if (tel || destination === \"tel\") {\n return (\n \n {buttonText}\n \n )\n }\n // for external links\n if (external || destination === \"external\") {\n return (\n \n {buttonText}\n \n )\n }\n if (anchor || destination === \"anchor\") {\n let href = href\n if (href.charAt(href.length - 1) === \"/\")\n href = href.substring(0, href.length - 1)\n return (\n \n {buttonText}\n \n )\n }\n // for downloads\n if (download || destination === \"download\") {\n return (\n \n \n {buttonText}\n \n )\n }\n // Insert long left arrow for Back \"Button\"\n else if (goBack && !href) {\n return (\n \n \n {buttonText}\n \n )\n } else if (goBack) {\n return (\n \n \n {buttonText}\n \n )\n }\n // Classic Gatsby Link styled as a button; assumed to not be external\n else {\n let btnHref = href\n if (href.charAt(0) !== \"/\") btnHref = \"/\" + href\n if (href.charAt(href.length - 1) !== \"/\") btnHref = href + \"/\"\n return (\n \n {buttonText}\n \n )\n }\n}\n\nButton.propTypes = {\n standalone: PropTypes.bool,\n anchor: PropTypes.bool,\n minimal: PropTypes.bool,\n white: PropTypes.bool,\n border: PropTypes.bool,\n contained: PropTypes.bool,\n goBack: PropTypes.bool,\n download: PropTypes.bool,\n textAlign: PropTypes.string,\n href: PropTypes.string,\n buttonText: PropTypes.string,\n className: PropTypes.string\n}\n\nexport default Button\n","import React from \"react\"\n\nconst Container = ({ children, size = \"\" }) => {\n const styles = {\n base: {\n width: \"100%\",\n maxWidth: \"1270px\",\n padding: \"0 20px\",\n marginInline: \"auto\"\n },\n large: {\n width: \"100%\",\n maxWidth: \"1400px\",\n padding: \"0 15px\",\n marginInline: \"auto\"\n },\n small: {\n width: \"100%\",\n maxWidth: \"1170px\",\n padding: \"0 15px\",\n marginInline: \"auto\"\n }\n }\n\n let container = styles.base\n\n if (size && size === \"small\") {\n container = styles.small\n }\n if (size && size === \"large\") {\n container = styles.large\n }\n return {children}
\n}\n\nexport default Container\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport classNames from \"classnames\"\n\nconst Section = ({\n children,\n colorBack = false,\n colorBackSecondary = false,\n largeSpacing,\n smallSpacing,\n zeroTop,\n zeroBottom,\n zeroTopMobile,\n zeroBottomMobile,\n zeroTopDesktop,\n zeroBottomDesktop,\n className,\n ...rest\n}) => {\n const wrapperClasses = classNames(className, {\n sctn: true,\n \"sctn--large\": largeSpacing,\n \"sctn--small\": smallSpacing,\n \"color-back\": colorBack,\n \"color-back--gray\": colorBackSecondary,\n \"mt-0\": zeroTop && !colorBack,\n \"mb-0\": zeroBottom && !colorBack,\n \"pt-0\": zeroTop && colorBack,\n \"pb-0\": zeroBottom && colorBack,\n \"mt-0--mobile\": zeroTopMobile && !colorBack,\n \"mb-0--mobile\": zeroBottomMobile && !colorBack,\n \"pt-0--mobile\": zeroTopMobile && colorBack,\n \"pb-0--mobile\": zeroBottomMobile && colorBack,\n \"mt-0--desktop\": zeroTopDesktop && !colorBack,\n \"mb-0--desktop\": zeroBottomDesktop && !colorBack,\n \"pt-0--desktop\": zeroTopDesktop && colorBack,\n \"pb-0--desktop\": zeroBottomDesktop && colorBack\n })\n\n return (\n \n )\n}\n\nexport default Section\n\nSection.propTypes = {\n children: PropTypes.node.isRequired,\n colorBack: PropTypes.bool,\n smallSpacing: PropTypes.bool,\n zeroTop: PropTypes.bool,\n zeroBottom: PropTypes.bool\n}\n","import React from \"react\"\nimport classNames from \"classnames\"\n\nconst Columns = ({\n children,\n rowReverse,\n className,\n verticallyCentered,\n sideColumnsSize\n}) => {\n const mainClasses = classNames(\"columns\", className, {\n \"is-vcentered\": verticallyCentered,\n \"flex-row-reverse\": rowReverse\n })\n return (\n \n {!!sideColumnsSize &&
}\n {children}\n {!!sideColumnsSize &&
}\n
\n )\n}\n\nexport default Columns\n","import React, { Component } from \"react\"\nimport classNames from \"classnames\"\nimport PropTypes from \"prop-types\"\n\nclass GeneralHours extends Component {\n constructor(props) {\n super(props)\n this.state = {\n dateLines: []\n }\n }\n\n componentDidMount() {\n this.sortDays(this.props.locationHours)\n }\n\n sortDays(arr) {\n if (!arr) throw \"No array of days to sort, \" + arr + \" was received.\"\n const groupBy = (items, key) =>\n items.reduce(\n (result, item) => ({\n ...result,\n [item[key]]: [...(result[item[key]] || []), item]\n }),\n {}\n )\n\n let newArr = []\n for (let i = 0; i < arr.length; i++) {\n let obj = arr[i]\n obj.combinedTime = `${obj.startTime}–${obj.endTime}`\n obj.shortWeekDay = whatShortWeekDay(obj.weekDay, this.props.language)\n obj.fullWeekDAy = whatWeekDay(obj.weekDay, this.props.language)\n newArr.push(obj)\n }\n\n const sortedDates = groupBy(newArr, \"combinedTime\")\n\n for (let i = 0; i < sortedDates.length; i++) {\n sortedDates[i].sort((a, b) => (a.weekDay > b.weekDay ? 1 : -1))\n }\n\n let dayLineArr = []\n let combinedTimeObjs = []\n\n for (let key in sortedDates) {\n const obj = sortedDates[key]\n let tempArr = []\n let tempArrFullObj = []\n for (let i = 0; i < obj.length; i++) {\n tempArr.push({\n shortWeekDay: obj[i].shortWeekDay,\n weekDay: obj[i].weekDay\n })\n tempArrFullObj.push(obj[i])\n }\n dayLineArr.push(tempArr)\n combinedTimeObjs.push(tempArrFullObj)\n tempArr = []\n tempArrFullObj = []\n }\n\n let dayLineDays = []\n let dayLineTimes = []\n\n function nonConsecutiveDays() {\n if (allDaysAreConsecutive(dayLineArr)) {\n for (let i = 0; i < dayLineArr.length; i++) {\n dayLineDays.push(joinWithDash(dayLineArr[i]))\n\n let tempDayTimes = combinedTimeObjs[i][0].combinedTime\n dayLineTimes.push(tempDayTimes)\n }\n } else {\n for (let i = 0; i < dayLineArr.length; i++) {\n if (dayLineArr[i].length === 1) {\n dayLineDays.push(dayLineArr[i][0].shortWeekDay + \": \")\n } else if (daysInLineAreConsecutive(dayLineArr[i])) {\n dayLineDays.push(joinWithDash(dayLineArr[i]))\n } else {\n dayLineDays.push(joinWithCommas(dayLineArr[i]))\n }\n\n let tempDayTimes = combinedTimeObjs[i][0].combinedTime\n dayLineTimes.push(tempDayTimes)\n }\n }\n\n let finalDateLines = []\n\n for (let i = 0; i < dayLineDays.length; i++) {\n let obj = {}\n\n obj.days = dayLineDays[i]\n obj.times = dayLineTimes[i]\n finalDateLines.push(obj)\n }\n\n return finalDateLines\n }\n\n // Only one array of days\n function allDaysAreConsecutive(days) {\n if (days.length === 1) {\n return true\n }\n return false\n }\n\n // Join length of consecutive days with dash\n function joinWithDash(dayLineArr) {\n let tempDayLine =\n dayLineArr[0].shortWeekDay +\n \"–\" +\n dayLineArr[dayLineArr.length - 1].shortWeekDay\n tempDayLine += \": \"\n return tempDayLine\n }\n\n // Join non-all consecutive days with dash\n function joinWithCommas(dayLineArr) {\n let tempDayLine = []\n for (let j = 0; j < dayLineArr.length; j++) {\n tempDayLine.push(dayLineArr[j].shortWeekDay)\n }\n tempDayLine = tempDayLine.join(\", \")\n tempDayLine += \": \"\n return tempDayLine\n }\n\n // Check if every day - 1 is equal to the day before\n function daysInLineAreConsecutive(daysObj) {\n let consecutive = true\n for (let j = 1; j < daysObj.length; j++) {\n if (\n parseInt(daysObj[j - 1].weekDay) + 1 !==\n parseInt(daysObj[j].weekDay)\n ) {\n consecutive = false\n }\n }\n return consecutive\n }\n\n // One-off for Mon-Fri, needs to be re-worked\n function allConsecutiveDays() {\n let startDay = combinedTimeObjs[0][0]\n let endDay = combinedTimeObjs[0][0]\n\n for (let i = 0; i < combinedTimeObjs[0].length - 1; i++) {\n if (\n parseInt(combinedTimeObjs[0][i + 1].weekDay) ===\n parseInt(endDay.weekDay) + 1\n ) {\n endDay = combinedTimeObjs[0][i + 1]\n }\n }\n\n let tempDayLine = startDay.shortWeekDay + \"–\" + endDay.shortWeekDay + \": \"\n let tempDayTimes = combinedTimeObjs[0][0].combinedTime\n dayLineDays.push(tempDayLine)\n dayLineTimes.push(tempDayTimes)\n let finalDateLines = []\n let obj = {}\n\n obj.days = dayLineDays[0]\n obj.times = dayLineTimes[0]\n finalDateLines.push(obj)\n\n return finalDateLines\n }\n\n // allConsecutiveDays();\n\n let finalDateLines = nonConsecutiveDays()\n // let finalDateLines = allConsecutiveDays()\n\n function linkConsecutiveDays(days) {}\n\n this.setState({\n dateLines: finalDateLines\n })\n\n function whatWeekDay(date, language) {\n let day = date\n if (language && language === \"es\") {\n switch (day) {\n case \"0\":\n day = \"Domingo\"\n return day\n\n case \"1\":\n day = \"Lunes\"\n return day\n\n case \"2\":\n day = \"Martes\"\n return day\n\n case \"3\":\n day = \"Miércoles\"\n return day\n\n case \"4\":\n day = \"Jueves\"\n return day\n\n case \"5\":\n day = \"Viernes\"\n return day\n\n case \"6\":\n day = \"Sábado\"\n return day\n }\n }\n switch (day) {\n case \"0\":\n day = \"Sunday\"\n return day\n\n case \"1\":\n day = \"Monday\"\n return day\n\n case \"2\":\n day = \"Tuesday\"\n return day\n\n case \"3\":\n day = \"Wednesday\"\n return day\n\n case \"4\":\n day = \"Thursday\"\n return day\n\n case \"5\":\n day = \"Friday\"\n return day\n\n case \"6\":\n day = \"Saturday\"\n return day\n }\n }\n\n function whatShortWeekDay(date, language) {\n let day = date\n if (language && language === \"es\") {\n switch (day) {\n case \"0\":\n day = \"Do\"\n return day\n\n case \"1\":\n day = \"Lu\"\n return day\n\n case \"2\":\n day = \"Ma\"\n return day\n\n case \"3\":\n day = \"Mi\"\n return day\n\n case \"4\":\n day = \"Ju\"\n return day\n\n case \"5\":\n day = \"Vi\"\n return day\n\n case \"6\":\n day = \"Sa\"\n return day\n }\n }\n switch (day) {\n case \"0\":\n day = \"Sun\"\n return day\n\n case \"1\":\n day = \"Mon\"\n return day\n\n case \"2\":\n day = \"Tues\"\n return day\n\n case \"3\":\n day = \"Wed\"\n return day\n\n case \"4\":\n day = \"Thur\"\n return day\n\n case \"5\":\n day = \"Fri\"\n return day\n\n case \"6\":\n day = \"Sat\"\n return day\n }\n }\n }\n\n render() {\n let dateLines = this.state.dateLines.map((line, i) => (\n \n {line.times === \"–\" ? (\n <>>\n ) : (\n \n \n {line.days} {line.times}\n
\n \n )}\n \n ))\n\n const wrapperClass = classNames(this.props.className, {\n \"footer-hours\": this.props.footer,\n \"contact-sidebar-block\": this.props.contact\n })\n\n const paragraphClassName = classNames({\n small: this.props.footer,\n \"contact-hours\": this.props.contact\n })\n\n return (\n \n {this.props.heading &&
{this.props.heading}
}\n {dateLines}\n \n )\n }\n}\n\nconst requiredPropsCheck = (props, propName, componentName) => {\n if (!props.footer && !props.contact) {\n return new Error(\n `One of 'footer' or 'contact' is required by '${componentName}' component.`\n )\n }\n if (props.footer && typeof props.footer !== \"boolean\") {\n return new Error(`'footer' is not a boolean`)\n }\n if (props.contact && typeof props.contact !== \"boolean\") {\n return new Error(`'contact' is not a boolean`)\n }\n}\n\nGeneralHours.propTypes = {\n className: PropTypes.string,\n locationHours: PropTypes.array.isRequired,\n language: PropTypes.string\n}\n\nexport default GeneralHours\n","/**\n * marked v4.3.0 - a markdown parser\n * Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed)\n * https://github.com/markedjs/marked\n */\n\n/**\n * DO NOT EDIT THIS FILE\n * The code in this file is generated from files in ./src/\n */\n\nfunction getDefaults() {\n return {\n async: false,\n baseUrl: null,\n breaks: false,\n extensions: null,\n gfm: true,\n headerIds: true,\n headerPrefix: '',\n highlight: null,\n hooks: null,\n langPrefix: 'language-',\n mangle: true,\n pedantic: false,\n renderer: null,\n sanitize: false,\n sanitizer: null,\n silent: false,\n smartypants: false,\n tokenizer: null,\n walkTokens: null,\n xhtml: false\n };\n}\n\nlet defaults = getDefaults();\n\nfunction changeDefaults(newDefaults) {\n defaults = newDefaults;\n}\n\n/**\n * Helpers\n */\nconst escapeTest = /[&<>\"']/;\nconst escapeReplace = new RegExp(escapeTest.source, 'g');\nconst escapeTestNoEncode = /[<>\"']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/;\nconst escapeReplaceNoEncode = new RegExp(escapeTestNoEncode.source, 'g');\nconst escapeReplacements = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n};\nconst getEscapeReplacement = (ch) => escapeReplacements[ch];\nfunction escape(html, encode) {\n if (encode) {\n if (escapeTest.test(html)) {\n return html.replace(escapeReplace, getEscapeReplacement);\n }\n } else {\n if (escapeTestNoEncode.test(html)) {\n return html.replace(escapeReplaceNoEncode, getEscapeReplacement);\n }\n }\n\n return html;\n}\n\nconst unescapeTest = /&(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/ig;\n\n/**\n * @param {string} html\n */\nfunction unescape(html) {\n // explicitly match decimal, hex, and named HTML entities\n return html.replace(unescapeTest, (_, n) => {\n n = n.toLowerCase();\n if (n === 'colon') return ':';\n if (n.charAt(0) === '#') {\n return n.charAt(1) === 'x'\n ? String.fromCharCode(parseInt(n.substring(2), 16))\n : String.fromCharCode(+n.substring(1));\n }\n return '';\n });\n}\n\nconst caret = /(^|[^\\[])\\^/g;\n\n/**\n * @param {string | RegExp} regex\n * @param {string} opt\n */\nfunction edit(regex, opt) {\n regex = typeof regex === 'string' ? regex : regex.source;\n opt = opt || '';\n const obj = {\n replace: (name, val) => {\n val = val.source || val;\n val = val.replace(caret, '$1');\n regex = regex.replace(name, val);\n return obj;\n },\n getRegex: () => {\n return new RegExp(regex, opt);\n }\n };\n return obj;\n}\n\nconst nonWordAndColonTest = /[^\\w:]/g;\nconst originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;\n\n/**\n * @param {boolean} sanitize\n * @param {string} base\n * @param {string} href\n */\nfunction cleanUrl(sanitize, base, href) {\n if (sanitize) {\n let prot;\n try {\n prot = decodeURIComponent(unescape(href))\n .replace(nonWordAndColonTest, '')\n .toLowerCase();\n } catch (e) {\n return null;\n }\n if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) {\n return null;\n }\n }\n if (base && !originIndependentUrl.test(href)) {\n href = resolveUrl(base, href);\n }\n try {\n href = encodeURI(href).replace(/%25/g, '%');\n } catch (e) {\n return null;\n }\n return href;\n}\n\nconst baseUrls = {};\nconst justDomain = /^[^:]+:\\/*[^/]*$/;\nconst protocol = /^([^:]+:)[\\s\\S]*$/;\nconst domain = /^([^:]+:\\/*[^/]*)[\\s\\S]*$/;\n\n/**\n * @param {string} base\n * @param {string} href\n */\nfunction resolveUrl(base, href) {\n if (!baseUrls[' ' + base]) {\n // we can ignore everything in base after the last slash of its path component,\n // but we might need to add _that_\n // https://tools.ietf.org/html/rfc3986#section-3\n if (justDomain.test(base)) {\n baseUrls[' ' + base] = base + '/';\n } else {\n baseUrls[' ' + base] = rtrim(base, '/', true);\n }\n }\n base = baseUrls[' ' + base];\n const relativeBase = base.indexOf(':') === -1;\n\n if (href.substring(0, 2) === '//') {\n if (relativeBase) {\n return href;\n }\n return base.replace(protocol, '$1') + href;\n } else if (href.charAt(0) === '/') {\n if (relativeBase) {\n return href;\n }\n return base.replace(domain, '$1') + href;\n } else {\n return base + href;\n }\n}\n\nconst noopTest = { exec: function noopTest() {} };\n\nfunction splitCells(tableRow, count) {\n // ensure that every cell-delimiting pipe has a space\n // before it to distinguish it from an escaped pipe\n const row = tableRow.replace(/\\|/g, (match, offset, str) => {\n let escaped = false,\n curr = offset;\n while (--curr >= 0 && str[curr] === '\\\\') escaped = !escaped;\n if (escaped) {\n // odd number of slashes means | is escaped\n // so we leave it alone\n return '|';\n } else {\n // add space before unescaped |\n return ' |';\n }\n }),\n cells = row.split(/ \\|/);\n let i = 0;\n\n // First/last cell in a row cannot be empty if it has no leading/trailing pipe\n if (!cells[0].trim()) { cells.shift(); }\n if (cells.length > 0 && !cells[cells.length - 1].trim()) { cells.pop(); }\n\n if (cells.length > count) {\n cells.splice(count);\n } else {\n while (cells.length < count) cells.push('');\n }\n\n for (; i < cells.length; i++) {\n // leading or trailing whitespace is ignored per the gfm spec\n cells[i] = cells[i].trim().replace(/\\\\\\|/g, '|');\n }\n return cells;\n}\n\n/**\n * Remove trailing 'c's. Equivalent to str.replace(/c*$/, '').\n * /c*$/ is vulnerable to REDOS.\n *\n * @param {string} str\n * @param {string} c\n * @param {boolean} invert Remove suffix of non-c chars instead. Default falsey.\n */\nfunction rtrim(str, c, invert) {\n const l = str.length;\n if (l === 0) {\n return '';\n }\n\n // Length of suffix matching the invert condition.\n let suffLen = 0;\n\n // Step left until we fail to match the invert condition.\n while (suffLen < l) {\n const currChar = str.charAt(l - suffLen - 1);\n if (currChar === c && !invert) {\n suffLen++;\n } else if (currChar !== c && invert) {\n suffLen++;\n } else {\n break;\n }\n }\n\n return str.slice(0, l - suffLen);\n}\n\nfunction findClosingBracket(str, b) {\n if (str.indexOf(b[1]) === -1) {\n return -1;\n }\n const l = str.length;\n let level = 0,\n i = 0;\n for (; i < l; i++) {\n if (str[i] === '\\\\') {\n i++;\n } else if (str[i] === b[0]) {\n level++;\n } else if (str[i] === b[1]) {\n level--;\n if (level < 0) {\n return i;\n }\n }\n }\n return -1;\n}\n\nfunction checkSanitizeDeprecation(opt) {\n if (opt && opt.sanitize && !opt.silent) {\n console.warn('marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options');\n }\n}\n\n// copied from https://stackoverflow.com/a/5450113/806777\n/**\n * @param {string} pattern\n * @param {number} count\n */\nfunction repeatString(pattern, count) {\n if (count < 1) {\n return '';\n }\n let result = '';\n while (count > 1) {\n if (count & 1) {\n result += pattern;\n }\n count >>= 1;\n pattern += pattern;\n }\n return result + pattern;\n}\n\nfunction outputLink(cap, link, raw, lexer) {\n const href = link.href;\n const title = link.title ? escape(link.title) : null;\n const text = cap[1].replace(/\\\\([\\[\\]])/g, '$1');\n\n if (cap[0].charAt(0) !== '!') {\n lexer.state.inLink = true;\n const token = {\n type: 'link',\n raw,\n href,\n title,\n text,\n tokens: lexer.inlineTokens(text)\n };\n lexer.state.inLink = false;\n return token;\n }\n return {\n type: 'image',\n raw,\n href,\n title,\n text: escape(text)\n };\n}\n\nfunction indentCodeCompensation(raw, text) {\n const matchIndentToCode = raw.match(/^(\\s+)(?:```)/);\n\n if (matchIndentToCode === null) {\n return text;\n }\n\n const indentToCode = matchIndentToCode[1];\n\n return text\n .split('\\n')\n .map(node => {\n const matchIndentInNode = node.match(/^\\s+/);\n if (matchIndentInNode === null) {\n return node;\n }\n\n const [indentInNode] = matchIndentInNode;\n\n if (indentInNode.length >= indentToCode.length) {\n return node.slice(indentToCode.length);\n }\n\n return node;\n })\n .join('\\n');\n}\n\n/**\n * Tokenizer\n */\nclass Tokenizer {\n constructor(options) {\n this.options = options || defaults;\n }\n\n space(src) {\n const cap = this.rules.block.newline.exec(src);\n if (cap && cap[0].length > 0) {\n return {\n type: 'space',\n raw: cap[0]\n };\n }\n }\n\n code(src) {\n const cap = this.rules.block.code.exec(src);\n if (cap) {\n const text = cap[0].replace(/^ {1,4}/gm, '');\n return {\n type: 'code',\n raw: cap[0],\n codeBlockStyle: 'indented',\n text: !this.options.pedantic\n ? rtrim(text, '\\n')\n : text\n };\n }\n }\n\n fences(src) {\n const cap = this.rules.block.fences.exec(src);\n if (cap) {\n const raw = cap[0];\n const text = indentCodeCompensation(raw, cap[3] || '');\n\n return {\n type: 'code',\n raw,\n lang: cap[2] ? cap[2].trim().replace(this.rules.inline._escapes, '$1') : cap[2],\n text\n };\n }\n }\n\n heading(src) {\n const cap = this.rules.block.heading.exec(src);\n if (cap) {\n let text = cap[2].trim();\n\n // remove trailing #s\n if (/#$/.test(text)) {\n const trimmed = rtrim(text, '#');\n if (this.options.pedantic) {\n text = trimmed.trim();\n } else if (!trimmed || / $/.test(trimmed)) {\n // CommonMark requires space before trailing #s\n text = trimmed.trim();\n }\n }\n\n return {\n type: 'heading',\n raw: cap[0],\n depth: cap[1].length,\n text,\n tokens: this.lexer.inline(text)\n };\n }\n }\n\n hr(src) {\n const cap = this.rules.block.hr.exec(src);\n if (cap) {\n return {\n type: 'hr',\n raw: cap[0]\n };\n }\n }\n\n blockquote(src) {\n const cap = this.rules.block.blockquote.exec(src);\n if (cap) {\n const text = cap[0].replace(/^ *>[ \\t]?/gm, '');\n const top = this.lexer.state.top;\n this.lexer.state.top = true;\n const tokens = this.lexer.blockTokens(text);\n this.lexer.state.top = top;\n return {\n type: 'blockquote',\n raw: cap[0],\n tokens,\n text\n };\n }\n }\n\n list(src) {\n let cap = this.rules.block.list.exec(src);\n if (cap) {\n let raw, istask, ischecked, indent, i, blankLine, endsWithBlankLine,\n line, nextLine, rawLine, itemContents, endEarly;\n\n let bull = cap[1].trim();\n const isordered = bull.length > 1;\n\n const list = {\n type: 'list',\n raw: '',\n ordered: isordered,\n start: isordered ? +bull.slice(0, -1) : '',\n loose: false,\n items: []\n };\n\n bull = isordered ? `\\\\d{1,9}\\\\${bull.slice(-1)}` : `\\\\${bull}`;\n\n if (this.options.pedantic) {\n bull = isordered ? bull : '[*+-]';\n }\n\n // Get next list item\n const itemRegex = new RegExp(`^( {0,3}${bull})((?:[\\t ][^\\\\n]*)?(?:\\\\n|$))`);\n\n // Check if current bullet point can start a new List Item\n while (src) {\n endEarly = false;\n if (!(cap = itemRegex.exec(src))) {\n break;\n }\n\n if (this.rules.block.hr.test(src)) { // End list if bullet was actually HR (possibly move into itemRegex?)\n break;\n }\n\n raw = cap[0];\n src = src.substring(raw.length);\n\n line = cap[2].split('\\n', 1)[0].replace(/^\\t+/, (t) => ' '.repeat(3 * t.length));\n nextLine = src.split('\\n', 1)[0];\n\n if (this.options.pedantic) {\n indent = 2;\n itemContents = line.trimLeft();\n } else {\n indent = cap[2].search(/[^ ]/); // Find first non-space char\n indent = indent > 4 ? 1 : indent; // Treat indented code blocks (> 4 spaces) as having only 1 indent\n itemContents = line.slice(indent);\n indent += cap[1].length;\n }\n\n blankLine = false;\n\n if (!line && /^ *$/.test(nextLine)) { // Items begin with at most one blank line\n raw += nextLine + '\\n';\n src = src.substring(nextLine.length + 1);\n endEarly = true;\n }\n\n if (!endEarly) {\n const nextBulletRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:[*+-]|\\\\d{1,9}[.)])((?:[ \\t][^\\\\n]*)?(?:\\\\n|$))`);\n const hrRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$)`);\n const fencesBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:\\`\\`\\`|~~~)`);\n const headingBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}#`);\n\n // Check if following lines should be included in List Item\n while (src) {\n rawLine = src.split('\\n', 1)[0];\n nextLine = rawLine;\n\n // Re-align to follow commonmark nesting rules\n if (this.options.pedantic) {\n nextLine = nextLine.replace(/^ {1,4}(?=( {4})*[^ ])/g, ' ');\n }\n\n // End list item if found code fences\n if (fencesBeginRegex.test(nextLine)) {\n break;\n }\n\n // End list item if found start of new heading\n if (headingBeginRegex.test(nextLine)) {\n break;\n }\n\n // End list item if found start of new bullet\n if (nextBulletRegex.test(nextLine)) {\n break;\n }\n\n // Horizontal rule found\n if (hrRegex.test(src)) {\n break;\n }\n\n if (nextLine.search(/[^ ]/) >= indent || !nextLine.trim()) { // Dedent if possible\n itemContents += '\\n' + nextLine.slice(indent);\n } else {\n // not enough indentation\n if (blankLine) {\n break;\n }\n\n // paragraph continuation unless last line was a different block level element\n if (line.search(/[^ ]/) >= 4) { // indented code block\n break;\n }\n if (fencesBeginRegex.test(line)) {\n break;\n }\n if (headingBeginRegex.test(line)) {\n break;\n }\n if (hrRegex.test(line)) {\n break;\n }\n\n itemContents += '\\n' + nextLine;\n }\n\n if (!blankLine && !nextLine.trim()) { // Check if current line is blank\n blankLine = true;\n }\n\n raw += rawLine + '\\n';\n src = src.substring(rawLine.length + 1);\n line = nextLine.slice(indent);\n }\n }\n\n if (!list.loose) {\n // If the previous item ended with a blank line, the list is loose\n if (endsWithBlankLine) {\n list.loose = true;\n } else if (/\\n *\\n *$/.test(raw)) {\n endsWithBlankLine = true;\n }\n }\n\n // Check for task list items\n if (this.options.gfm) {\n istask = /^\\[[ xX]\\] /.exec(itemContents);\n if (istask) {\n ischecked = istask[0] !== '[ ] ';\n itemContents = itemContents.replace(/^\\[[ xX]\\] +/, '');\n }\n }\n\n list.items.push({\n type: 'list_item',\n raw,\n task: !!istask,\n checked: ischecked,\n loose: false,\n text: itemContents\n });\n\n list.raw += raw;\n }\n\n // Do not consume newlines at end of final item. Alternatively, make itemRegex *start* with any newlines to simplify/speed up endsWithBlankLine logic\n list.items[list.items.length - 1].raw = raw.trimRight();\n list.items[list.items.length - 1].text = itemContents.trimRight();\n list.raw = list.raw.trimRight();\n\n const l = list.items.length;\n\n // Item child tokens handled here at end because we needed to have the final item to trim it first\n for (i = 0; i < l; i++) {\n this.lexer.state.top = false;\n list.items[i].tokens = this.lexer.blockTokens(list.items[i].text, []);\n\n if (!list.loose) {\n // Check if list should be loose\n const spacers = list.items[i].tokens.filter(t => t.type === 'space');\n const hasMultipleLineBreaks = spacers.length > 0 && spacers.some(t => /\\n.*\\n/.test(t.raw));\n\n list.loose = hasMultipleLineBreaks;\n }\n }\n\n // Set all items to loose if list is loose\n if (list.loose) {\n for (i = 0; i < l; i++) {\n list.items[i].loose = true;\n }\n }\n\n return list;\n }\n }\n\n html(src) {\n const cap = this.rules.block.html.exec(src);\n if (cap) {\n const token = {\n type: 'html',\n raw: cap[0],\n pre: !this.options.sanitizer\n && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'),\n text: cap[0]\n };\n if (this.options.sanitize) {\n const text = this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0]);\n token.type = 'paragraph';\n token.text = text;\n token.tokens = this.lexer.inline(text);\n }\n return token;\n }\n }\n\n def(src) {\n const cap = this.rules.block.def.exec(src);\n if (cap) {\n const tag = cap[1].toLowerCase().replace(/\\s+/g, ' ');\n const href = cap[2] ? cap[2].replace(/^<(.*)>$/, '$1').replace(this.rules.inline._escapes, '$1') : '';\n const title = cap[3] ? cap[3].substring(1, cap[3].length - 1).replace(this.rules.inline._escapes, '$1') : cap[3];\n return {\n type: 'def',\n tag,\n raw: cap[0],\n href,\n title\n };\n }\n }\n\n table(src) {\n const cap = this.rules.block.table.exec(src);\n if (cap) {\n const item = {\n type: 'table',\n header: splitCells(cap[1]).map(c => { return { text: c }; }),\n align: cap[2].replace(/^ *|\\| *$/g, '').split(/ *\\| */),\n rows: cap[3] && cap[3].trim() ? cap[3].replace(/\\n[ \\t]*$/, '').split('\\n') : []\n };\n\n if (item.header.length === item.align.length) {\n item.raw = cap[0];\n\n let l = item.align.length;\n let i, j, k, row;\n for (i = 0; i < l; i++) {\n if (/^ *-+: *$/.test(item.align[i])) {\n item.align[i] = 'right';\n } else if (/^ *:-+: *$/.test(item.align[i])) {\n item.align[i] = 'center';\n } else if (/^ *:-+ *$/.test(item.align[i])) {\n item.align[i] = 'left';\n } else {\n item.align[i] = null;\n }\n }\n\n l = item.rows.length;\n for (i = 0; i < l; i++) {\n item.rows[i] = splitCells(item.rows[i], item.header.length).map(c => { return { text: c }; });\n }\n\n // parse child tokens inside headers and cells\n\n // header child tokens\n l = item.header.length;\n for (j = 0; j < l; j++) {\n item.header[j].tokens = this.lexer.inline(item.header[j].text);\n }\n\n // cell child tokens\n l = item.rows.length;\n for (j = 0; j < l; j++) {\n row = item.rows[j];\n for (k = 0; k < row.length; k++) {\n row[k].tokens = this.lexer.inline(row[k].text);\n }\n }\n\n return item;\n }\n }\n }\n\n lheading(src) {\n const cap = this.rules.block.lheading.exec(src);\n if (cap) {\n return {\n type: 'heading',\n raw: cap[0],\n depth: cap[2].charAt(0) === '=' ? 1 : 2,\n text: cap[1],\n tokens: this.lexer.inline(cap[1])\n };\n }\n }\n\n paragraph(src) {\n const cap = this.rules.block.paragraph.exec(src);\n if (cap) {\n const text = cap[1].charAt(cap[1].length - 1) === '\\n'\n ? cap[1].slice(0, -1)\n : cap[1];\n return {\n type: 'paragraph',\n raw: cap[0],\n text,\n tokens: this.lexer.inline(text)\n };\n }\n }\n\n text(src) {\n const cap = this.rules.block.text.exec(src);\n if (cap) {\n return {\n type: 'text',\n raw: cap[0],\n text: cap[0],\n tokens: this.lexer.inline(cap[0])\n };\n }\n }\n\n escape(src) {\n const cap = this.rules.inline.escape.exec(src);\n if (cap) {\n return {\n type: 'escape',\n raw: cap[0],\n text: escape(cap[1])\n };\n }\n }\n\n tag(src) {\n const cap = this.rules.inline.tag.exec(src);\n if (cap) {\n if (!this.lexer.state.inLink && /^/i.test(cap[0])) {\n this.lexer.state.inLink = false;\n }\n if (!this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n this.lexer.state.inRawBlock = true;\n } else if (this.lexer.state.inRawBlock && /^<\\/(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n this.lexer.state.inRawBlock = false;\n }\n\n return {\n type: this.options.sanitize\n ? 'text'\n : 'html',\n raw: cap[0],\n inLink: this.lexer.state.inLink,\n inRawBlock: this.lexer.state.inRawBlock,\n text: this.options.sanitize\n ? (this.options.sanitizer\n ? this.options.sanitizer(cap[0])\n : escape(cap[0]))\n : cap[0]\n };\n }\n }\n\n link(src) {\n const cap = this.rules.inline.link.exec(src);\n if (cap) {\n const trimmedUrl = cap[2].trim();\n if (!this.options.pedantic && /^$/.test(trimmedUrl))) {\n return;\n }\n\n // ending angle bracket cannot be escaped\n const rtrimSlash = rtrim(trimmedUrl.slice(0, -1), '\\\\');\n if ((trimmedUrl.length - rtrimSlash.length) % 2 === 0) {\n return;\n }\n } else {\n // find closing parenthesis\n const lastParenIndex = findClosingBracket(cap[2], '()');\n if (lastParenIndex > -1) {\n const start = cap[0].indexOf('!') === 0 ? 5 : 4;\n const linkLen = start + cap[1].length + lastParenIndex;\n cap[2] = cap[2].substring(0, lastParenIndex);\n cap[0] = cap[0].substring(0, linkLen).trim();\n cap[3] = '';\n }\n }\n let href = cap[2];\n let title = '';\n if (this.options.pedantic) {\n // split pedantic href and title\n const link = /^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/.exec(href);\n\n if (link) {\n href = link[1];\n title = link[3];\n }\n } else {\n title = cap[3] ? cap[3].slice(1, -1) : '';\n }\n\n href = href.trim();\n if (/^$/.test(trimmedUrl))) {\n // pedantic allows starting angle bracket without ending angle bracket\n href = href.slice(1);\n } else {\n href = href.slice(1, -1);\n }\n }\n return outputLink(cap, {\n href: href ? href.replace(this.rules.inline._escapes, '$1') : href,\n title: title ? title.replace(this.rules.inline._escapes, '$1') : title\n }, cap[0], this.lexer);\n }\n }\n\n reflink(src, links) {\n let cap;\n if ((cap = this.rules.inline.reflink.exec(src))\n || (cap = this.rules.inline.nolink.exec(src))) {\n let link = (cap[2] || cap[1]).replace(/\\s+/g, ' ');\n link = links[link.toLowerCase()];\n if (!link) {\n const text = cap[0].charAt(0);\n return {\n type: 'text',\n raw: text,\n text\n };\n }\n return outputLink(cap, link, cap[0], this.lexer);\n }\n }\n\n emStrong(src, maskedSrc, prevChar = '') {\n let match = this.rules.inline.emStrong.lDelim.exec(src);\n if (!match) return;\n\n // _ can't be between two alphanumerics. \\p{L}\\p{N} includes non-english alphabet/numbers as well\n if (match[3] && prevChar.match(/[\\p{L}\\p{N}]/u)) return;\n\n const nextChar = match[1] || match[2] || '';\n\n if (!nextChar || (nextChar && (prevChar === '' || this.rules.inline.punctuation.exec(prevChar)))) {\n const lLength = match[0].length - 1;\n let rDelim, rLength, delimTotal = lLength, midDelimTotal = 0;\n\n const endReg = match[0][0] === '*' ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd;\n endReg.lastIndex = 0;\n\n // Clip maskedSrc to same section of string as src (move to lexer?)\n maskedSrc = maskedSrc.slice(-1 * src.length + lLength);\n\n while ((match = endReg.exec(maskedSrc)) != null) {\n rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];\n\n if (!rDelim) continue; // skip single * in __abc*abc__\n\n rLength = rDelim.length;\n\n if (match[3] || match[4]) { // found another Left Delim\n delimTotal += rLength;\n continue;\n } else if (match[5] || match[6]) { // either Left or Right Delim\n if (lLength % 3 && !((lLength + rLength) % 3)) {\n midDelimTotal += rLength;\n continue; // CommonMark Emphasis Rules 9-10\n }\n }\n\n delimTotal -= rLength;\n\n if (delimTotal > 0) continue; // Haven't found enough closing delimiters\n\n // Remove extra characters. *a*** -> *a*\n rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);\n\n const raw = src.slice(0, lLength + match.index + (match[0].length - rDelim.length) + rLength);\n\n // Create `em` if smallest delimiter has odd char count. *a***\n if (Math.min(lLength, rLength) % 2) {\n const text = raw.slice(1, -1);\n return {\n type: 'em',\n raw,\n text,\n tokens: this.lexer.inlineTokens(text)\n };\n }\n\n // Create 'strong' if smallest delimiter has even char count. **a***\n const text = raw.slice(2, -2);\n return {\n type: 'strong',\n raw,\n text,\n tokens: this.lexer.inlineTokens(text)\n };\n }\n }\n }\n\n codespan(src) {\n const cap = this.rules.inline.code.exec(src);\n if (cap) {\n let text = cap[2].replace(/\\n/g, ' ');\n const hasNonSpaceChars = /[^ ]/.test(text);\n const hasSpaceCharsOnBothEnds = /^ /.test(text) && / $/.test(text);\n if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {\n text = text.substring(1, text.length - 1);\n }\n text = escape(text, true);\n return {\n type: 'codespan',\n raw: cap[0],\n text\n };\n }\n }\n\n br(src) {\n const cap = this.rules.inline.br.exec(src);\n if (cap) {\n return {\n type: 'br',\n raw: cap[0]\n };\n }\n }\n\n del(src) {\n const cap = this.rules.inline.del.exec(src);\n if (cap) {\n return {\n type: 'del',\n raw: cap[0],\n text: cap[2],\n tokens: this.lexer.inlineTokens(cap[2])\n };\n }\n }\n\n autolink(src, mangle) {\n const cap = this.rules.inline.autolink.exec(src);\n if (cap) {\n let text, href;\n if (cap[2] === '@') {\n text = escape(this.options.mangle ? mangle(cap[1]) : cap[1]);\n href = 'mailto:' + text;\n } else {\n text = escape(cap[1]);\n href = text;\n }\n\n return {\n type: 'link',\n raw: cap[0],\n text,\n href,\n tokens: [\n {\n type: 'text',\n raw: text,\n text\n }\n ]\n };\n }\n }\n\n url(src, mangle) {\n let cap;\n if (cap = this.rules.inline.url.exec(src)) {\n let text, href;\n if (cap[2] === '@') {\n text = escape(this.options.mangle ? mangle(cap[0]) : cap[0]);\n href = 'mailto:' + text;\n } else {\n // do extended autolink path validation\n let prevCapZero;\n do {\n prevCapZero = cap[0];\n cap[0] = this.rules.inline._backpedal.exec(cap[0])[0];\n } while (prevCapZero !== cap[0]);\n text = escape(cap[0]);\n if (cap[1] === 'www.') {\n href = 'http://' + cap[0];\n } else {\n href = cap[0];\n }\n }\n return {\n type: 'link',\n raw: cap[0],\n text,\n href,\n tokens: [\n {\n type: 'text',\n raw: text,\n text\n }\n ]\n };\n }\n }\n\n inlineText(src, smartypants) {\n const cap = this.rules.inline.text.exec(src);\n if (cap) {\n let text;\n if (this.lexer.state.inRawBlock) {\n text = this.options.sanitize ? (this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0])) : cap[0];\n } else {\n text = escape(this.options.smartypants ? smartypants(cap[0]) : cap[0]);\n }\n return {\n type: 'text',\n raw: cap[0],\n text\n };\n }\n }\n}\n\n/**\n * Block-Level Grammar\n */\nconst block = {\n newline: /^(?: *(?:\\n|$))+/,\n code: /^( {4}[^\\n]+(?:\\n(?: *(?:\\n|$))*)?)+/,\n fences: /^ {0,3}(`{3,}(?=[^`\\n]*(?:\\n|$))|~{3,})([^\\n]*)(?:\\n|$)(?:|([\\s\\S]*?)(?:\\n|$))(?: {0,3}\\1[~`]* *(?=\\n|$)|$)/,\n hr: /^ {0,3}((?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/,\n heading: /^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/,\n blockquote: /^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/,\n list: /^( {0,3}bull)([ \\t][^\\n]+?)?(?:\\n|$)/,\n html: '^ {0,3}(?:' // optional indentation\n + '<(script|pre|style|textarea)[\\\\s>][\\\\s\\\\S]*?(?:\\\\1>[^\\\\n]*\\\\n+|$)' // (1)\n + '|comment[^\\\\n]*(\\\\n+|$)' // (2)\n + '|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>\\\\n*|$)' // (3)\n + '|\\\\n*|$)' // (4)\n + '|\\\\n*|$)' // (5)\n + '|?(tag)(?: +|\\\\n|/?>)[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (6)\n + '|<(?!script|pre|style|textarea)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (7) open tag\n + '|(?!script|pre|style|textarea)[a-z][\\\\w-]*\\\\s*>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (7) closing tag\n + ')',\n def: /^ {0,3}\\[(label)\\]: *(?:\\n *)?([^<\\s][^\\s]*|<.*?>)(?:(?: +(?:\\n *)?| *\\n *)(title))? *(?:\\n+|$)/,\n table: noopTest,\n lheading: /^((?:.|\\n(?!\\n))+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,\n // regex template, placeholders will be replaced according to different paragraph\n // interruption rules of commonmark and the original markdown spec:\n _paragraph: /^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\\n)[^\\n]+)*)/,\n text: /^[^\\n]+/\n};\n\nblock._label = /(?!\\s*\\])(?:\\\\.|[^\\[\\]\\\\])+/;\nblock._title = /(?:\"(?:\\\\\"?|[^\"\\\\])*\"|'[^'\\n]*(?:\\n[^'\\n]+)*\\n?'|\\([^()]*\\))/;\nblock.def = edit(block.def)\n .replace('label', block._label)\n .replace('title', block._title)\n .getRegex();\n\nblock.bullet = /(?:[*+-]|\\d{1,9}[.)])/;\nblock.listItemStart = edit(/^( *)(bull) */)\n .replace('bull', block.bullet)\n .getRegex();\n\nblock.list = edit(block.list)\n .replace(/bull/g, block.bullet)\n .replace('hr', '\\\\n+(?=\\\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$))')\n .replace('def', '\\\\n+(?=' + block.def.source + ')')\n .getRegex();\n\nblock._tag = 'address|article|aside|base|basefont|blockquote|body|caption'\n + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption'\n + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe'\n + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option'\n + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr'\n + '|track|ul';\nblock._comment = /|$)/;\nblock.html = edit(block.html, 'i')\n .replace('comment', block._comment)\n .replace('tag', block._tag)\n .replace('attribute', / +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/)\n .getRegex();\n\nblock.paragraph = edit(block._paragraph)\n .replace('hr', block.hr)\n .replace('heading', ' {0,3}#{1,6} ')\n .replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs\n .replace('|table', '')\n .replace('blockquote', ' {0,3}>')\n .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n')\n .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', '?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)')\n .replace('tag', block._tag) // pars can be interrupted by type (6) html blocks\n .getRegex();\n\nblock.blockquote = edit(block.blockquote)\n .replace('paragraph', block.paragraph)\n .getRegex();\n\n/**\n * Normal Block Grammar\n */\n\nblock.normal = { ...block };\n\n/**\n * GFM Block Grammar\n */\n\nblock.gfm = {\n ...block.normal,\n table: '^ *([^\\\\n ].*\\\\|.*)\\\\n' // Header\n + ' {0,3}(?:\\\\| *)?(:?-+:? *(?:\\\\| *:?-+:? *)*)(?:\\\\| *)?' // Align\n + '(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)' // Cells\n};\n\nblock.gfm.table = edit(block.gfm.table)\n .replace('hr', block.hr)\n .replace('heading', ' {0,3}#{1,6} ')\n .replace('blockquote', ' {0,3}>')\n .replace('code', ' {4}[^\\\\n]')\n .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n')\n .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', '?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)')\n .replace('tag', block._tag) // tables can be interrupted by type (6) html blocks\n .getRegex();\n\nblock.gfm.paragraph = edit(block._paragraph)\n .replace('hr', block.hr)\n .replace('heading', ' {0,3}#{1,6} ')\n .replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs\n .replace('table', block.gfm.table) // interrupt paragraphs with table\n .replace('blockquote', ' {0,3}>')\n .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n')\n .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', '?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)')\n .replace('tag', block._tag) // pars can be interrupted by type (6) html blocks\n .getRegex();\n/**\n * Pedantic grammar (original John Gruber's loose markdown specification)\n */\n\nblock.pedantic = {\n ...block.normal,\n html: edit(\n '^ *(?:comment *(?:\\\\n|\\\\s*$)'\n + '|<(tag)[\\\\s\\\\S]+?\\\\1> *(?:\\\\n{2,}|\\\\s*$)' // closed tag\n + '|\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))')\n .replace('comment', block._comment)\n .replace(/tag/g, '(?!(?:'\n + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub'\n + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)'\n + '\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b')\n .getRegex(),\n def: /^ *\\[([^\\]]+)\\]: *([^\\s>]+)>?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/,\n heading: /^(#{1,6})(.*)(?:\\n+|$)/,\n fences: noopTest, // fences not supported\n lheading: /^(.+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,\n paragraph: edit(block.normal._paragraph)\n .replace('hr', block.hr)\n .replace('heading', ' *#{1,6} *[^\\n]')\n .replace('lheading', block.lheading)\n .replace('blockquote', ' {0,3}>')\n .replace('|fences', '')\n .replace('|list', '')\n .replace('|html', '')\n .getRegex()\n};\n\n/**\n * Inline-Level Grammar\n */\nconst inline = {\n escape: /^\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/,\n autolink: /^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/,\n url: noopTest,\n tag: '^comment'\n + '|^[a-zA-Z][\\\\w:-]*\\\\s*>' // self-closing tag\n + '|^<[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?>' // open tag\n + '|^<\\\\?[\\\\s\\\\S]*?\\\\?>' // processing instruction, e.g. \n + '|^' // declaration, e.g. \n + '|^', // CDATA section\n link: /^!?\\[(label)\\]\\(\\s*(href)(?:\\s+(title))?\\s*\\)/,\n reflink: /^!?\\[(label)\\]\\[(ref)\\]/,\n nolink: /^!?\\[(ref)\\](?:\\[\\])?/,\n reflinkSearch: 'reflink|nolink(?!\\\\()',\n emStrong: {\n lDelim: /^(?:\\*+(?:([punct_])|[^\\s*]))|^_+(?:([punct*])|([^\\s_]))/,\n // (1) and (2) can only be a Right Delimiter. (3) and (4) can only be Left. (5) and (6) can be either Left or Right.\n // () Skip orphan inside strong () Consume to delim (1) #*** (2) a***#, a*** (3) #***a, ***a (4) ***# (5) #***# (6) a***a\n rDelimAst: /^(?:[^_*\\\\]|\\\\.)*?\\_\\_(?:[^_*\\\\]|\\\\.)*?\\*(?:[^_*\\\\]|\\\\.)*?(?=\\_\\_)|(?:[^*\\\\]|\\\\.)+(?=[^*])|[punct_](\\*+)(?=[\\s]|$)|(?:[^punct*_\\s\\\\]|\\\\.)(\\*+)(?=[punct_\\s]|$)|[punct_\\s](\\*+)(?=[^punct*_\\s])|[\\s](\\*+)(?=[punct_])|[punct_](\\*+)(?=[punct_])|(?:[^punct*_\\s\\\\]|\\\\.)(\\*+)(?=[^punct*_\\s])/,\n rDelimUnd: /^(?:[^_*\\\\]|\\\\.)*?\\*\\*(?:[^_*\\\\]|\\\\.)*?\\_(?:[^_*\\\\]|\\\\.)*?(?=\\*\\*)|(?:[^_\\\\]|\\\\.)+(?=[^_])|[punct*](\\_+)(?=[\\s]|$)|(?:[^punct*_\\s\\\\]|\\\\.)(\\_+)(?=[punct*\\s]|$)|[punct*\\s](\\_+)(?=[^punct*_\\s])|[\\s](\\_+)(?=[punct*])|[punct*](\\_+)(?=[punct*])/ // ^- Not allowed for _\n },\n code: /^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/,\n br: /^( {2,}|\\\\)\\n(?!\\s*$)/,\n del: noopTest,\n text: /^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\?@\\\\[\\\\]`^{|}~';\ninline.punctuation = edit(inline.punctuation).replace(/punctuation/g, inline._punctuation).getRegex();\n\n// sequences em should skip over [title](link), `code`, \ninline.blockSkip = /\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>/g;\n// lookbehind is not available on Safari as of version 16\n// inline.escapedEmSt = /(?<=(?:^|[^\\\\)(?:\\\\[^])*)\\\\[*_]/g;\ninline.escapedEmSt = /(?:^|[^\\\\])(?:\\\\\\\\)*\\\\[*_]/g;\n\ninline._comment = edit(block._comment).replace('(?:-->|$)', '-->').getRegex();\n\ninline.emStrong.lDelim = edit(inline.emStrong.lDelim)\n .replace(/punct/g, inline._punctuation)\n .getRegex();\n\ninline.emStrong.rDelimAst = edit(inline.emStrong.rDelimAst, 'g')\n .replace(/punct/g, inline._punctuation)\n .getRegex();\n\ninline.emStrong.rDelimUnd = edit(inline.emStrong.rDelimUnd, 'g')\n .replace(/punct/g, inline._punctuation)\n .getRegex();\n\ninline._escapes = /\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/g;\n\ninline._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;\ninline._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;\ninline.autolink = edit(inline.autolink)\n .replace('scheme', inline._scheme)\n .replace('email', inline._email)\n .getRegex();\n\ninline._attribute = /\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=<>`]+)?/;\n\ninline.tag = edit(inline.tag)\n .replace('comment', inline._comment)\n .replace('attribute', inline._attribute)\n .getRegex();\n\ninline._label = /(?:\\[(?:\\\\.|[^\\[\\]\\\\])*\\]|\\\\.|`[^`]*`|[^\\[\\]\\\\`])*?/;\ninline._href = /<(?:\\\\.|[^\\n<>\\\\])+>|[^\\s\\x00-\\x1f]*/;\ninline._title = /\"(?:\\\\\"?|[^\"\\\\])*\"|'(?:\\\\'?|[^'\\\\])*'|\\((?:\\\\\\)?|[^)\\\\])*\\)/;\n\ninline.link = edit(inline.link)\n .replace('label', inline._label)\n .replace('href', inline._href)\n .replace('title', inline._title)\n .getRegex();\n\ninline.reflink = edit(inline.reflink)\n .replace('label', inline._label)\n .replace('ref', block._label)\n .getRegex();\n\ninline.nolink = edit(inline.nolink)\n .replace('ref', block._label)\n .getRegex();\n\ninline.reflinkSearch = edit(inline.reflinkSearch, 'g')\n .replace('reflink', inline.reflink)\n .replace('nolink', inline.nolink)\n .getRegex();\n\n/**\n * Normal Inline Grammar\n */\n\ninline.normal = { ...inline };\n\n/**\n * Pedantic Inline Grammar\n */\n\ninline.pedantic = {\n ...inline.normal,\n strong: {\n start: /^__|\\*\\*/,\n middle: /^__(?=\\S)([\\s\\S]*?\\S)__(?!_)|^\\*\\*(?=\\S)([\\s\\S]*?\\S)\\*\\*(?!\\*)/,\n endAst: /\\*\\*(?!\\*)/g,\n endUnd: /__(?!_)/g\n },\n em: {\n start: /^_|\\*/,\n middle: /^()\\*(?=\\S)([\\s\\S]*?\\S)\\*(?!\\*)|^_(?=\\S)([\\s\\S]*?\\S)_(?!_)/,\n endAst: /\\*(?!\\*)/g,\n endUnd: /_(?!_)/g\n },\n link: edit(/^!?\\[(label)\\]\\((.*?)\\)/)\n .replace('label', inline._label)\n .getRegex(),\n reflink: edit(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/)\n .replace('label', inline._label)\n .getRegex()\n};\n\n/**\n * GFM Inline Grammar\n */\n\ninline.gfm = {\n ...inline.normal,\n escape: edit(inline.escape).replace('])', '~|])').getRegex(),\n _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,\n url: /^((?:ftp|https?):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/,\n _backpedal: /(?:[^?!.,:;*_'\"~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'\"~)]+(?!$))+/,\n del: /^(~~?)(?=[^\\s~])([\\s\\S]*?[^\\s~])\\1(?=[^~]|$)/,\n text: /^([`~]+|[^`~])(?:(?= {2,}\\n)|(?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@)|[\\s\\S]*?(?:(?=[\\\\ 0.5) {\n ch = 'x' + ch.toString(16);\n }\n out += '' + ch + ';';\n }\n\n return out;\n}\n\n/**\n * Block Lexer\n */\nclass Lexer {\n constructor(options) {\n this.tokens = [];\n this.tokens.links = Object.create(null);\n this.options = options || defaults;\n this.options.tokenizer = this.options.tokenizer || new Tokenizer();\n this.tokenizer = this.options.tokenizer;\n this.tokenizer.options = this.options;\n this.tokenizer.lexer = this;\n this.inlineQueue = [];\n this.state = {\n inLink: false,\n inRawBlock: false,\n top: true\n };\n\n const rules = {\n block: block.normal,\n inline: inline.normal\n };\n\n if (this.options.pedantic) {\n rules.block = block.pedantic;\n rules.inline = inline.pedantic;\n } else if (this.options.gfm) {\n rules.block = block.gfm;\n if (this.options.breaks) {\n rules.inline = inline.breaks;\n } else {\n rules.inline = inline.gfm;\n }\n }\n this.tokenizer.rules = rules;\n }\n\n /**\n * Expose Rules\n */\n static get rules() {\n return {\n block,\n inline\n };\n }\n\n /**\n * Static Lex Method\n */\n static lex(src, options) {\n const lexer = new Lexer(options);\n return lexer.lex(src);\n }\n\n /**\n * Static Lex Inline Method\n */\n static lexInline(src, options) {\n const lexer = new Lexer(options);\n return lexer.inlineTokens(src);\n }\n\n /**\n * Preprocessing\n */\n lex(src) {\n src = src\n .replace(/\\r\\n|\\r/g, '\\n');\n\n this.blockTokens(src, this.tokens);\n\n let next;\n while (next = this.inlineQueue.shift()) {\n this.inlineTokens(next.src, next.tokens);\n }\n\n return this.tokens;\n }\n\n /**\n * Lexing\n */\n blockTokens(src, tokens = []) {\n if (this.options.pedantic) {\n src = src.replace(/\\t/g, ' ').replace(/^ +$/gm, '');\n } else {\n src = src.replace(/^( *)(\\t+)/gm, (_, leading, tabs) => {\n return leading + ' '.repeat(tabs.length);\n });\n }\n\n let token, lastToken, cutSrc, lastParagraphClipped;\n\n while (src) {\n if (this.options.extensions\n && this.options.extensions.block\n && this.options.extensions.block.some((extTokenizer) => {\n if (token = extTokenizer.call({ lexer: this }, src, tokens)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n return true;\n }\n return false;\n })) {\n continue;\n }\n\n // newline\n if (token = this.tokenizer.space(src)) {\n src = src.substring(token.raw.length);\n if (token.raw.length === 1 && tokens.length > 0) {\n // if there's a single \\n as a spacer, it's terminating the last line,\n // so move it there so that we don't get unecessary paragraph tags\n tokens[tokens.length - 1].raw += '\\n';\n } else {\n tokens.push(token);\n }\n continue;\n }\n\n // code\n if (token = this.tokenizer.code(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n // An indented code block cannot interrupt a paragraph.\n if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n\n // fences\n if (token = this.tokenizer.fences(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // heading\n if (token = this.tokenizer.heading(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // hr\n if (token = this.tokenizer.hr(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // blockquote\n if (token = this.tokenizer.blockquote(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // list\n if (token = this.tokenizer.list(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // html\n if (token = this.tokenizer.html(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // def\n if (token = this.tokenizer.def(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.raw;\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n } else if (!this.tokens.links[token.tag]) {\n this.tokens.links[token.tag] = {\n href: token.href,\n title: token.title\n };\n }\n continue;\n }\n\n // table (gfm)\n if (token = this.tokenizer.table(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // lheading\n if (token = this.tokenizer.lheading(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // top-level paragraph\n // prevent paragraph consuming extensions by clipping 'src' to extension start\n cutSrc = src;\n if (this.options.extensions && this.options.extensions.startBlock) {\n let startIndex = Infinity;\n const tempSrc = src.slice(1);\n let tempStart;\n this.options.extensions.startBlock.forEach(function(getStartIndex) {\n tempStart = getStartIndex.call({ lexer: this }, tempSrc);\n if (typeof tempStart === 'number' && tempStart >= 0) { startIndex = Math.min(startIndex, tempStart); }\n });\n if (startIndex < Infinity && startIndex >= 0) {\n cutSrc = src.substring(0, startIndex + 1);\n }\n }\n if (this.state.top && (token = this.tokenizer.paragraph(cutSrc))) {\n lastToken = tokens[tokens.length - 1];\n if (lastParagraphClipped && lastToken.type === 'paragraph') {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n this.inlineQueue.pop();\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n } else {\n tokens.push(token);\n }\n lastParagraphClipped = (cutSrc.length !== src.length);\n src = src.substring(token.raw.length);\n continue;\n }\n\n // text\n if (token = this.tokenizer.text(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && lastToken.type === 'text') {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n this.inlineQueue.pop();\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n\n if (src) {\n const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n if (this.options.silent) {\n console.error(errMsg);\n break;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n\n this.state.top = true;\n return tokens;\n }\n\n inline(src, tokens = []) {\n this.inlineQueue.push({ src, tokens });\n return tokens;\n }\n\n /**\n * Lexing/Compiling\n */\n inlineTokens(src, tokens = []) {\n let token, lastToken, cutSrc;\n\n // String with links masked to avoid interference with em and strong\n let maskedSrc = src;\n let match;\n let keepPrevChar, prevChar;\n\n // Mask out reflinks\n if (this.tokens.links) {\n const links = Object.keys(this.tokens.links);\n if (links.length > 0) {\n while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) {\n if (links.includes(match[0].slice(match[0].lastIndexOf('[') + 1, -1))) {\n maskedSrc = maskedSrc.slice(0, match.index) + '[' + repeatString('a', match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex);\n }\n }\n }\n }\n // Mask out other blocks\n while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {\n maskedSrc = maskedSrc.slice(0, match.index) + '[' + repeatString('a', match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);\n }\n\n // Mask out escaped em & strong delimiters\n while ((match = this.tokenizer.rules.inline.escapedEmSt.exec(maskedSrc)) != null) {\n maskedSrc = maskedSrc.slice(0, match.index + match[0].length - 2) + '++' + maskedSrc.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);\n this.tokenizer.rules.inline.escapedEmSt.lastIndex--;\n }\n\n while (src) {\n if (!keepPrevChar) {\n prevChar = '';\n }\n keepPrevChar = false;\n\n // extensions\n if (this.options.extensions\n && this.options.extensions.inline\n && this.options.extensions.inline.some((extTokenizer) => {\n if (token = extTokenizer.call({ lexer: this }, src, tokens)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n return true;\n }\n return false;\n })) {\n continue;\n }\n\n // escape\n if (token = this.tokenizer.escape(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // tag\n if (token = this.tokenizer.tag(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && token.type === 'text' && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n\n // link\n if (token = this.tokenizer.link(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // reflink, nolink\n if (token = this.tokenizer.reflink(src, this.tokens.links)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && token.type === 'text' && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n\n // em & strong\n if (token = this.tokenizer.emStrong(src, maskedSrc, prevChar)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // code\n if (token = this.tokenizer.codespan(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // br\n if (token = this.tokenizer.br(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // del (gfm)\n if (token = this.tokenizer.del(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // autolink\n if (token = this.tokenizer.autolink(src, mangle)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // url (gfm)\n if (!this.state.inLink && (token = this.tokenizer.url(src, mangle))) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // text\n // prevent inlineText consuming extensions by clipping 'src' to extension start\n cutSrc = src;\n if (this.options.extensions && this.options.extensions.startInline) {\n let startIndex = Infinity;\n const tempSrc = src.slice(1);\n let tempStart;\n this.options.extensions.startInline.forEach(function(getStartIndex) {\n tempStart = getStartIndex.call({ lexer: this }, tempSrc);\n if (typeof tempStart === 'number' && tempStart >= 0) { startIndex = Math.min(startIndex, tempStart); }\n });\n if (startIndex < Infinity && startIndex >= 0) {\n cutSrc = src.substring(0, startIndex + 1);\n }\n }\n if (token = this.tokenizer.inlineText(cutSrc, smartypants)) {\n src = src.substring(token.raw.length);\n if (token.raw.slice(-1) !== '_') { // Track prevChar before string of ____ started\n prevChar = token.raw.slice(-1);\n }\n keepPrevChar = true;\n lastToken = tokens[tokens.length - 1];\n if (lastToken && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n\n if (src) {\n const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n if (this.options.silent) {\n console.error(errMsg);\n break;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n\n return tokens;\n }\n}\n\n/**\n * Renderer\n */\nclass Renderer {\n constructor(options) {\n this.options = options || defaults;\n }\n\n code(code, infostring, escaped) {\n const lang = (infostring || '').match(/\\S*/)[0];\n if (this.options.highlight) {\n const out = this.options.highlight(code, lang);\n if (out != null && out !== code) {\n escaped = true;\n code = out;\n }\n }\n\n code = code.replace(/\\n$/, '') + '\\n';\n\n if (!lang) {\n return ''\n + (escaped ? code : escape(code, true))\n + '
\\n';\n }\n\n return ''\n + (escaped ? code : escape(code, true))\n + '
\\n';\n }\n\n /**\n * @param {string} quote\n */\n blockquote(quote) {\n return `\\n${quote}
\\n`;\n }\n\n html(html) {\n return html;\n }\n\n /**\n * @param {string} text\n * @param {string} level\n * @param {string} raw\n * @param {any} slugger\n */\n heading(text, level, raw, slugger) {\n if (this.options.headerIds) {\n const id = this.options.headerPrefix + slugger.slug(raw);\n return `${text}\\n`;\n }\n\n // ignore IDs\n return `${text}\\n`;\n }\n\n hr() {\n return this.options.xhtml ? '
\\n' : '
\\n';\n }\n\n list(body, ordered, start) {\n const type = ordered ? 'ol' : 'ul',\n startatt = (ordered && start !== 1) ? (' start=\"' + start + '\"') : '';\n return '<' + type + startatt + '>\\n' + body + '' + type + '>\\n';\n }\n\n /**\n * @param {string} text\n */\n listitem(text) {\n return `${text}\\n`;\n }\n\n checkbox(checked) {\n return ' ';\n }\n\n /**\n * @param {string} text\n */\n paragraph(text) {\n return `${text}
\\n`;\n }\n\n /**\n * @param {string} header\n * @param {string} body\n */\n table(header, body) {\n if (body) body = `${body}`;\n\n return '\\n'\n + '\\n'\n + header\n + '\\n'\n + body\n + '
\\n';\n }\n\n /**\n * @param {string} content\n */\n tablerow(content) {\n return `\\n${content}
\\n`;\n }\n\n tablecell(content, flags) {\n const type = flags.header ? 'th' : 'td';\n const tag = flags.align\n ? `<${type} align=\"${flags.align}\">`\n : `<${type}>`;\n return tag + content + `${type}>\\n`;\n }\n\n /**\n * span level renderer\n * @param {string} text\n */\n strong(text) {\n return `${text}`;\n }\n\n /**\n * @param {string} text\n */\n em(text) {\n return `${text}`;\n }\n\n /**\n * @param {string} text\n */\n codespan(text) {\n return `${text}
`;\n }\n\n br() {\n return this.options.xhtml ? '
' : '
';\n }\n\n /**\n * @param {string} text\n */\n del(text) {\n return `${text}`;\n }\n\n /**\n * @param {string} href\n * @param {string} title\n * @param {string} text\n */\n link(href, title, text) {\n href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);\n if (href === null) {\n return text;\n }\n let out = '' + text + '';\n return out;\n }\n\n /**\n * @param {string} href\n * @param {string} title\n * @param {string} text\n */\n image(href, title, text) {\n href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);\n if (href === null) {\n return text;\n }\n\n let out = `
' : '>';\n return out;\n }\n\n text(text) {\n return text;\n }\n}\n\n/**\n * TextRenderer\n * returns only the textual part of the token\n */\nclass TextRenderer {\n // no need for block level renderers\n strong(text) {\n return text;\n }\n\n em(text) {\n return text;\n }\n\n codespan(text) {\n return text;\n }\n\n del(text) {\n return text;\n }\n\n html(text) {\n return text;\n }\n\n text(text) {\n return text;\n }\n\n link(href, title, text) {\n return '' + text;\n }\n\n image(href, title, text) {\n return '' + text;\n }\n\n br() {\n return '';\n }\n}\n\n/**\n * Slugger generates header id\n */\nclass Slugger {\n constructor() {\n this.seen = {};\n }\n\n /**\n * @param {string} value\n */\n serialize(value) {\n return value\n .toLowerCase()\n .trim()\n // remove html tags\n .replace(/<[!\\/a-z].*?>/ig, '')\n // remove unwanted chars\n .replace(/[\\u2000-\\u206F\\u2E00-\\u2E7F\\\\'!\"#$%&()*+,./:;<=>?@[\\]^`{|}~]/g, '')\n .replace(/\\s/g, '-');\n }\n\n /**\n * Finds the next safe (unique) slug to use\n * @param {string} originalSlug\n * @param {boolean} isDryRun\n */\n getNextSafeSlug(originalSlug, isDryRun) {\n let slug = originalSlug;\n let occurenceAccumulator = 0;\n if (this.seen.hasOwnProperty(slug)) {\n occurenceAccumulator = this.seen[originalSlug];\n do {\n occurenceAccumulator++;\n slug = originalSlug + '-' + occurenceAccumulator;\n } while (this.seen.hasOwnProperty(slug));\n }\n if (!isDryRun) {\n this.seen[originalSlug] = occurenceAccumulator;\n this.seen[slug] = 0;\n }\n return slug;\n }\n\n /**\n * Convert string to unique id\n * @param {object} [options]\n * @param {boolean} [options.dryrun] Generates the next unique slug without\n * updating the internal accumulator.\n */\n slug(value, options = {}) {\n const slug = this.serialize(value);\n return this.getNextSafeSlug(slug, options.dryrun);\n }\n}\n\n/**\n * Parsing & Compiling\n */\nclass Parser {\n constructor(options) {\n this.options = options || defaults;\n this.options.renderer = this.options.renderer || new Renderer();\n this.renderer = this.options.renderer;\n this.renderer.options = this.options;\n this.textRenderer = new TextRenderer();\n this.slugger = new Slugger();\n }\n\n /**\n * Static Parse Method\n */\n static parse(tokens, options) {\n const parser = new Parser(options);\n return parser.parse(tokens);\n }\n\n /**\n * Static Parse Inline Method\n */\n static parseInline(tokens, options) {\n const parser = new Parser(options);\n return parser.parseInline(tokens);\n }\n\n /**\n * Parse Loop\n */\n parse(tokens, top = true) {\n let out = '',\n i,\n j,\n k,\n l2,\n l3,\n row,\n cell,\n header,\n body,\n token,\n ordered,\n start,\n loose,\n itemBody,\n item,\n checked,\n task,\n checkbox,\n ret;\n\n const l = tokens.length;\n for (i = 0; i < l; i++) {\n token = tokens[i];\n\n // Run any renderer extensions\n if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[token.type]) {\n ret = this.options.extensions.renderers[token.type].call({ parser: this }, token);\n if (ret !== false || !['space', 'hr', 'heading', 'code', 'table', 'blockquote', 'list', 'html', 'paragraph', 'text'].includes(token.type)) {\n out += ret || '';\n continue;\n }\n }\n\n switch (token.type) {\n case 'space': {\n continue;\n }\n case 'hr': {\n out += this.renderer.hr();\n continue;\n }\n case 'heading': {\n out += this.renderer.heading(\n this.parseInline(token.tokens),\n token.depth,\n unescape(this.parseInline(token.tokens, this.textRenderer)),\n this.slugger);\n continue;\n }\n case 'code': {\n out += this.renderer.code(token.text,\n token.lang,\n token.escaped);\n continue;\n }\n case 'table': {\n header = '';\n\n // header\n cell = '';\n l2 = token.header.length;\n for (j = 0; j < l2; j++) {\n cell += this.renderer.tablecell(\n this.parseInline(token.header[j].tokens),\n { header: true, align: token.align[j] }\n );\n }\n header += this.renderer.tablerow(cell);\n\n body = '';\n l2 = token.rows.length;\n for (j = 0; j < l2; j++) {\n row = token.rows[j];\n\n cell = '';\n l3 = row.length;\n for (k = 0; k < l3; k++) {\n cell += this.renderer.tablecell(\n this.parseInline(row[k].tokens),\n { header: false, align: token.align[k] }\n );\n }\n\n body += this.renderer.tablerow(cell);\n }\n out += this.renderer.table(header, body);\n continue;\n }\n case 'blockquote': {\n body = this.parse(token.tokens);\n out += this.renderer.blockquote(body);\n continue;\n }\n case 'list': {\n ordered = token.ordered;\n start = token.start;\n loose = token.loose;\n l2 = token.items.length;\n\n body = '';\n for (j = 0; j < l2; j++) {\n item = token.items[j];\n checked = item.checked;\n task = item.task;\n\n itemBody = '';\n if (item.task) {\n checkbox = this.renderer.checkbox(checked);\n if (loose) {\n if (item.tokens.length > 0 && item.tokens[0].type === 'paragraph') {\n item.tokens[0].text = checkbox + ' ' + item.tokens[0].text;\n if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === 'text') {\n item.tokens[0].tokens[0].text = checkbox + ' ' + item.tokens[0].tokens[0].text;\n }\n } else {\n item.tokens.unshift({\n type: 'text',\n text: checkbox\n });\n }\n } else {\n itemBody += checkbox;\n }\n }\n\n itemBody += this.parse(item.tokens, loose);\n body += this.renderer.listitem(itemBody, task, checked);\n }\n\n out += this.renderer.list(body, ordered, start);\n continue;\n }\n case 'html': {\n // TODO parse inline content if parameter markdown=1\n out += this.renderer.html(token.text);\n continue;\n }\n case 'paragraph': {\n out += this.renderer.paragraph(this.parseInline(token.tokens));\n continue;\n }\n case 'text': {\n body = token.tokens ? this.parseInline(token.tokens) : token.text;\n while (i + 1 < l && tokens[i + 1].type === 'text') {\n token = tokens[++i];\n body += '\\n' + (token.tokens ? this.parseInline(token.tokens) : token.text);\n }\n out += top ? this.renderer.paragraph(body) : body;\n continue;\n }\n\n default: {\n const errMsg = 'Token with \"' + token.type + '\" type was not found.';\n if (this.options.silent) {\n console.error(errMsg);\n return;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n }\n\n return out;\n }\n\n /**\n * Parse Inline Tokens\n */\n parseInline(tokens, renderer) {\n renderer = renderer || this.renderer;\n let out = '',\n i,\n token,\n ret;\n\n const l = tokens.length;\n for (i = 0; i < l; i++) {\n token = tokens[i];\n\n // Run any renderer extensions\n if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[token.type]) {\n ret = this.options.extensions.renderers[token.type].call({ parser: this }, token);\n if (ret !== false || !['escape', 'html', 'link', 'image', 'strong', 'em', 'codespan', 'br', 'del', 'text'].includes(token.type)) {\n out += ret || '';\n continue;\n }\n }\n\n switch (token.type) {\n case 'escape': {\n out += renderer.text(token.text);\n break;\n }\n case 'html': {\n out += renderer.html(token.text);\n break;\n }\n case 'link': {\n out += renderer.link(token.href, token.title, this.parseInline(token.tokens, renderer));\n break;\n }\n case 'image': {\n out += renderer.image(token.href, token.title, token.text);\n break;\n }\n case 'strong': {\n out += renderer.strong(this.parseInline(token.tokens, renderer));\n break;\n }\n case 'em': {\n out += renderer.em(this.parseInline(token.tokens, renderer));\n break;\n }\n case 'codespan': {\n out += renderer.codespan(token.text);\n break;\n }\n case 'br': {\n out += renderer.br();\n break;\n }\n case 'del': {\n out += renderer.del(this.parseInline(token.tokens, renderer));\n break;\n }\n case 'text': {\n out += renderer.text(token.text);\n break;\n }\n default: {\n const errMsg = 'Token with \"' + token.type + '\" type was not found.';\n if (this.options.silent) {\n console.error(errMsg);\n return;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n }\n return out;\n }\n}\n\nclass Hooks {\n constructor(options) {\n this.options = options || defaults;\n }\n\n static passThroughHooks = new Set([\n 'preprocess',\n 'postprocess'\n ]);\n\n /**\n * Process markdown before marked\n */\n preprocess(markdown) {\n return markdown;\n }\n\n /**\n * Process HTML after marked is finished\n */\n postprocess(html) {\n return html;\n }\n}\n\nfunction onError(silent, async, callback) {\n return (e) => {\n e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n\n if (silent) {\n const msg = 'An error occurred:
'\n + escape(e.message + '', true)\n + '
';\n if (async) {\n return Promise.resolve(msg);\n }\n if (callback) {\n callback(null, msg);\n return;\n }\n return msg;\n }\n\n if (async) {\n return Promise.reject(e);\n }\n if (callback) {\n callback(e);\n return;\n }\n throw e;\n };\n}\n\nfunction parseMarkdown(lexer, parser) {\n return (src, opt, callback) => {\n if (typeof opt === 'function') {\n callback = opt;\n opt = null;\n }\n\n const origOpt = { ...opt };\n opt = { ...marked.defaults, ...origOpt };\n const throwError = onError(opt.silent, opt.async, callback);\n\n // throw error in case of non string input\n if (typeof src === 'undefined' || src === null) {\n return throwError(new Error('marked(): input parameter is undefined or null'));\n }\n if (typeof src !== 'string') {\n return throwError(new Error('marked(): input parameter is of type '\n + Object.prototype.toString.call(src) + ', string expected'));\n }\n\n checkSanitizeDeprecation(opt);\n\n if (opt.hooks) {\n opt.hooks.options = opt;\n }\n\n if (callback) {\n const highlight = opt.highlight;\n let tokens;\n\n try {\n if (opt.hooks) {\n src = opt.hooks.preprocess(src);\n }\n tokens = lexer(src, opt);\n } catch (e) {\n return throwError(e);\n }\n\n const done = function(err) {\n let out;\n\n if (!err) {\n try {\n if (opt.walkTokens) {\n marked.walkTokens(tokens, opt.walkTokens);\n }\n out = parser(tokens, opt);\n if (opt.hooks) {\n out = opt.hooks.postprocess(out);\n }\n } catch (e) {\n err = e;\n }\n }\n\n opt.highlight = highlight;\n\n return err\n ? throwError(err)\n : callback(null, out);\n };\n\n if (!highlight || highlight.length < 3) {\n return done();\n }\n\n delete opt.highlight;\n\n if (!tokens.length) return done();\n\n let pending = 0;\n marked.walkTokens(tokens, function(token) {\n if (token.type === 'code') {\n pending++;\n setTimeout(() => {\n highlight(token.text, token.lang, function(err, code) {\n if (err) {\n return done(err);\n }\n if (code != null && code !== token.text) {\n token.text = code;\n token.escaped = true;\n }\n\n pending--;\n if (pending === 0) {\n done();\n }\n });\n }, 0);\n }\n });\n\n if (pending === 0) {\n done();\n }\n\n return;\n }\n\n if (opt.async) {\n return Promise.resolve(opt.hooks ? opt.hooks.preprocess(src) : src)\n .then(src => lexer(src, opt))\n .then(tokens => opt.walkTokens ? Promise.all(marked.walkTokens(tokens, opt.walkTokens)).then(() => tokens) : tokens)\n .then(tokens => parser(tokens, opt))\n .then(html => opt.hooks ? opt.hooks.postprocess(html) : html)\n .catch(throwError);\n }\n\n try {\n if (opt.hooks) {\n src = opt.hooks.preprocess(src);\n }\n const tokens = lexer(src, opt);\n if (opt.walkTokens) {\n marked.walkTokens(tokens, opt.walkTokens);\n }\n let html = parser(tokens, opt);\n if (opt.hooks) {\n html = opt.hooks.postprocess(html);\n }\n return html;\n } catch (e) {\n return throwError(e);\n }\n };\n}\n\n/**\n * Marked\n */\nfunction marked(src, opt, callback) {\n return parseMarkdown(Lexer.lex, Parser.parse)(src, opt, callback);\n}\n\n/**\n * Options\n */\n\nmarked.options =\nmarked.setOptions = function(opt) {\n marked.defaults = { ...marked.defaults, ...opt };\n changeDefaults(marked.defaults);\n return marked;\n};\n\nmarked.getDefaults = getDefaults;\n\nmarked.defaults = defaults;\n\n/**\n * Use Extension\n */\n\nmarked.use = function(...args) {\n const extensions = marked.defaults.extensions || { renderers: {}, childTokens: {} };\n\n args.forEach((pack) => {\n // copy options to new object\n const opts = { ...pack };\n\n // set async to true if it was set to true before\n opts.async = marked.defaults.async || opts.async || false;\n\n // ==-- Parse \"addon\" extensions --== //\n if (pack.extensions) {\n pack.extensions.forEach((ext) => {\n if (!ext.name) {\n throw new Error('extension name required');\n }\n if (ext.renderer) { // Renderer extensions\n const prevRenderer = extensions.renderers[ext.name];\n if (prevRenderer) {\n // Replace extension with func to run new extension but fall back if false\n extensions.renderers[ext.name] = function(...args) {\n let ret = ext.renderer.apply(this, args);\n if (ret === false) {\n ret = prevRenderer.apply(this, args);\n }\n return ret;\n };\n } else {\n extensions.renderers[ext.name] = ext.renderer;\n }\n }\n if (ext.tokenizer) { // Tokenizer Extensions\n if (!ext.level || (ext.level !== 'block' && ext.level !== 'inline')) {\n throw new Error(\"extension level must be 'block' or 'inline'\");\n }\n if (extensions[ext.level]) {\n extensions[ext.level].unshift(ext.tokenizer);\n } else {\n extensions[ext.level] = [ext.tokenizer];\n }\n if (ext.start) { // Function to check for start of token\n if (ext.level === 'block') {\n if (extensions.startBlock) {\n extensions.startBlock.push(ext.start);\n } else {\n extensions.startBlock = [ext.start];\n }\n } else if (ext.level === 'inline') {\n if (extensions.startInline) {\n extensions.startInline.push(ext.start);\n } else {\n extensions.startInline = [ext.start];\n }\n }\n }\n }\n if (ext.childTokens) { // Child tokens to be visited by walkTokens\n extensions.childTokens[ext.name] = ext.childTokens;\n }\n });\n opts.extensions = extensions;\n }\n\n // ==-- Parse \"overwrite\" extensions --== //\n if (pack.renderer) {\n const renderer = marked.defaults.renderer || new Renderer();\n for (const prop in pack.renderer) {\n const prevRenderer = renderer[prop];\n // Replace renderer with func to run extension, but fall back if false\n renderer[prop] = (...args) => {\n let ret = pack.renderer[prop].apply(renderer, args);\n if (ret === false) {\n ret = prevRenderer.apply(renderer, args);\n }\n return ret;\n };\n }\n opts.renderer = renderer;\n }\n if (pack.tokenizer) {\n const tokenizer = marked.defaults.tokenizer || new Tokenizer();\n for (const prop in pack.tokenizer) {\n const prevTokenizer = tokenizer[prop];\n // Replace tokenizer with func to run extension, but fall back if false\n tokenizer[prop] = (...args) => {\n let ret = pack.tokenizer[prop].apply(tokenizer, args);\n if (ret === false) {\n ret = prevTokenizer.apply(tokenizer, args);\n }\n return ret;\n };\n }\n opts.tokenizer = tokenizer;\n }\n\n // ==-- Parse Hooks extensions --== //\n if (pack.hooks) {\n const hooks = marked.defaults.hooks || new Hooks();\n for (const prop in pack.hooks) {\n const prevHook = hooks[prop];\n if (Hooks.passThroughHooks.has(prop)) {\n hooks[prop] = (arg) => {\n if (marked.defaults.async) {\n return Promise.resolve(pack.hooks[prop].call(hooks, arg)).then(ret => {\n return prevHook.call(hooks, ret);\n });\n }\n\n const ret = pack.hooks[prop].call(hooks, arg);\n return prevHook.call(hooks, ret);\n };\n } else {\n hooks[prop] = (...args) => {\n let ret = pack.hooks[prop].apply(hooks, args);\n if (ret === false) {\n ret = prevHook.apply(hooks, args);\n }\n return ret;\n };\n }\n }\n opts.hooks = hooks;\n }\n\n // ==-- Parse WalkTokens extensions --== //\n if (pack.walkTokens) {\n const walkTokens = marked.defaults.walkTokens;\n opts.walkTokens = function(token) {\n let values = [];\n values.push(pack.walkTokens.call(this, token));\n if (walkTokens) {\n values = values.concat(walkTokens.call(this, token));\n }\n return values;\n };\n }\n\n marked.setOptions(opts);\n });\n};\n\n/**\n * Run callback for every token\n */\n\nmarked.walkTokens = function(tokens, callback) {\n let values = [];\n for (const token of tokens) {\n values = values.concat(callback.call(marked, token));\n switch (token.type) {\n case 'table': {\n for (const cell of token.header) {\n values = values.concat(marked.walkTokens(cell.tokens, callback));\n }\n for (const row of token.rows) {\n for (const cell of row) {\n values = values.concat(marked.walkTokens(cell.tokens, callback));\n }\n }\n break;\n }\n case 'list': {\n values = values.concat(marked.walkTokens(token.items, callback));\n break;\n }\n default: {\n if (marked.defaults.extensions && marked.defaults.extensions.childTokens && marked.defaults.extensions.childTokens[token.type]) { // Walk any extensions\n marked.defaults.extensions.childTokens[token.type].forEach(function(childTokens) {\n values = values.concat(marked.walkTokens(token[childTokens], callback));\n });\n } else if (token.tokens) {\n values = values.concat(marked.walkTokens(token.tokens, callback));\n }\n }\n }\n }\n return values;\n};\n\n/**\n * Parse Inline\n * @param {string} src\n */\nmarked.parseInline = parseMarkdown(Lexer.lexInline, Parser.parseInline);\n\n/**\n * Expose\n */\nmarked.Parser = Parser;\nmarked.parser = Parser.parse;\nmarked.Renderer = Renderer;\nmarked.TextRenderer = TextRenderer;\nmarked.Lexer = Lexer;\nmarked.lexer = Lexer.lex;\nmarked.Tokenizer = Tokenizer;\nmarked.Slugger = Slugger;\nmarked.Hooks = Hooks;\nmarked.parse = marked;\n\nconst options = marked.options;\nconst setOptions = marked.setOptions;\nconst use = marked.use;\nconst walkTokens = marked.walkTokens;\nconst parseInline = marked.parseInline;\nconst parse = marked;\nconst parser = Parser.parse;\nconst lexer = Lexer.lex;\n\nexport { Hooks, Lexer, Parser, Renderer, Slugger, TextRenderer, Tokenizer, defaults, getDefaults, lexer, marked, options, parse, parseInline, parser, setOptions, use, walkTokens };\n","import { useStaticQuery, graphql } from \"gatsby\"\n\nconst useStringVariables = (content, exclude = []) => {\n const data = useStaticQuery(graphql`\n query VarsQuery {\n allDataJson(filter: { optionsItem: { eq: \"string-variables\" } }) {\n nodes {\n vars {\n key\n value\n }\n optionsItem\n }\n }\n }\n `)\n\n const map = new Map()\n data.allDataJson.nodes[0].vars.forEach(obj => {\n // do not add key/value pair if string is found in exclude array\n //currently exludes when string var url matches the page url\n // if (exclude.find(item => obj.value === item)) {\n // return\n // }\n\n map.set(obj.key, obj.value)\n })\n\n const string = replaceStringVars(content, Object.fromEntries(map.entries()))\n\n return {\n string\n }\n}\n\nexport default useStringVariables\n\nfunction replaceStringVars(str, obj) {\n let s = str\n for (var prop in obj) {\n s = s.replace(\n new RegExp(\"(?!]*>)(\" + prop + \")(?![^<]*<\\\\/a>)\", \"g\"),\n obj[prop]\n )\n }\n return s\n}\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport classNames from \"classnames\"\nimport { marked } from \"marked\"\nimport { useLocation } from \"@reach/router\"\nimport useStringVariables from \"../../hooks/useStringVariables\"\n\nmarked.setOptions({\n renderer: new marked.Renderer(),\n smartLists: true\n})\n\nconst Text = ({\n text, // text content\n as = \"div\", // element type ex. \"h1\", \"h2\", \"span\" \"p\"...\n className,\n style,\n useStringReplace,\n animate = true,\n ...rest\n}) => {\n if (!text) return null\n const viewerClasses = classNames(\"marked\", className)\n\n // superscript symbols\n let convertedText = text\n\n if (useStringReplace) {\n const location = useLocation()\n const pathname = location.pathname.length >= 4 ? location.pathname : null // trying to filter out \"/\" \"/es/\" type of urls\n const { string } = useStringVariables(convertedText, [pathname])\n convertedText = string\n }\n\n convertedText = removeSymbols(convertedText)\n\n if (as === \"div\") {\n // use marked to convert markdown if using default \"div\"\n convertedText = marked(convertedText)\n }\n\n let attrs = {}\n if (animate) {\n attrs[\"data-aos\"] = \"fade-right\"\n }\n\n return React.createElement(as, {\n ...attrs,\n style: style,\n className: viewerClasses,\n ...rest,\n dangerouslySetInnerHTML: { __html: convertedText }\n })\n}\n\nexport default React.memo(Text)\n\nText.propTypes = {\n className: PropTypes.string,\n text: PropTypes.string.isRequired,\n as: PropTypes.string,\n style: PropTypes.object\n}\n\nfunction removeSymbols(str) {\n str = str.replace(/[™®©]/g, \"$&\")\n let title = str.match(/title='(.*?)'/gi)\n if (title) {\n let newStr = str\n for (let i = 0; i < title.length; i++) {\n let newTitle = title[i].replace(\"\", \"\").replace(\"\", \"\")\n newStr = newStr.replace(title[i], newTitle)\n }\n return newStr\n } else {\n return str\n }\n}\n","import React, { useMemo, useState } from \"react\"\nimport { useStaticQuery, graphql } from \"gatsby\"\nimport classNames from \"classnames\"\nimport PropTypes from \"prop-types\"\nimport { Image, Placeholder } from \"cloudinary-react\"\n\nconst NuvoImage = ({\n publicId,\n alt = \"\",\n quality,\n wrapperClassName,\n className,\n useAR = true,\n children,\n hasLoaded,\n placeholder = true,\n animate = true,\n ...rest\n}) => {\n const [isLoaded, setIsLoaded] = useState(false)\n if (!publicId) return <>>\n\n const data = useStaticQuery(\n graphql`\n query CloudinaryQuery {\n allCloudinaryJson {\n nodes {\n width\n height\n format\n context {\n custom {\n alt\n }\n }\n public_id\n resource_type\n }\n }\n }\n `\n )\n\n // default image object if match isn't found\n let image = { public_id: publicId, context: { custom: { alt: alt } } }\n\n // find image object\n const match = useMemo(\n () =>\n data.allCloudinaryJson.nodes.find(node => node.public_id === publicId),\n [data, publicId]\n )\n\n if (match) {\n image = match\n }\n\n const imageQuality = quality ?? 99\n\n const imageWrapperClasses = classNames(wrapperClassName, {\n \"image-meta__wrapper\": true\n })\n\n const imageClasses = classNames(className, {\n \"image-meta__image\": true\n })\n\n const handleLoaded = () => {\n setIsLoaded(true)\n\n if (hasLoaded) {\n hasLoaded(image.public_id)\n }\n }\n\n let attrs = {}\n if (animate) {\n attrs[\"data-aos\"] = \"fade-up\"\n }\n\n if (useAR) {\n return (\n \n {!isLoaded && (\n
\n )}\n
handleLoaded()}\n loading=\"lazy\"\n responsive\n quality={imageQuality}\n alt={image.context.custom.alt}\n {...rest}\n className={imageClasses}>\n {children}\n {placeholder && }\n \n
\n )\n } else {\n return (\n handleLoaded()}\n publicId={image.public_id}\n loading=\"lazy\"\n responsive\n quality={imageQuality}\n alt={image.context.custom.alt}\n {...rest}\n className={imageClasses}>\n {children}\n {placeholder && }\n \n )\n }\n}\n\nNuvoImage.propTypes = {\n publicId: PropTypes.string.isRequired,\n children: PropTypes.element,\n className: PropTypes.string,\n useAR: PropTypes.bool,\n wrapperClassName: PropTypes.string\n}\n\nexport default React.memo(NuvoImage)\n\nNuvoImage.defaultProps = {\n cloudName: \"nuvolum\",\n width: \"auto\"\n}\n","export default \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMSIgdmlld0JveD0iMCAwIDMyIDMxIj4KICAgIDxwYXRoIGZpbGw9IiNlZmJlMzMiIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTguMzQyIDMwLjUzM0wxNiAyNi41MDhsNy42NTggNC4wMjVjMS4zNi43MTUgMi45ODMtLjQzMyAyLjcxOS0xLjk3NGwtMS40NjUtOC41MjYgNi4xOTMtNi4wMzVjMS4xMTQtMS4wODQuNDk4LTIuOTc2LTEuMDM3LTMuMmwtOC41Ni0xLjI0Ny0zLjgyNi03Ljc1OGMtLjY4Ni0xLjM4My0yLjY3Mi0xLjQtMy4zNjQgMGwtMy44MjYgNy43NTgtOC41NiAxLjI0OGMtMS41MzYuMjIzLTIuMTUgMi4xMTUtMS4wMzcgMy4ybDYuMTkzIDYuMDM0LTEuNDY1IDguNTI2Yy0uMjY0IDEuNTQgMS4zNiAyLjY5NSAyLjcxOSAxLjk3NHoiLz4KPC9zdmc+Cg==\"","export default \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMyIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMzIDMyIj4KICAgIDxwYXRoIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0ibm9uemVybyIgc3Ryb2tlPSIjZWZiZTMzIiBkPSJNOS4wMTYgMzAuNzg0bDcuNjU4LTQuMDI2IDcuNjU4IDQuMDI2YzEuMzYuNzE1IDIuOTgyLS40MzQgMi43MTktMS45NzVsLTEuNDY1LTguNTI1IDYuMTkzLTYuMDM1YzEuMTE0LTEuMDg0LjQ5OC0yLjk3Ny0xLjAzNy0zLjJsLTguNTYtMS4yNDctMy44MjctNy43NThjLS42ODUtMS4zODMtMi42NzEtMS40LTMuMzYzIDBsLTMuODI2IDcuNzU4LTguNTYgMS4yNDhjLTEuNTM2LjIyMi0yLjE1IDIuMTE1LTEuMDM4IDMuMTk5bDYuMTk0IDYuMDM1LTEuNDY1IDguNTI1Yy0uMjY0IDEuNTQxIDEuMzYgMi42OTYgMi43MTkgMS45NzV6Ii8+Cjwvc3ZnPgo=\"","export default \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzNCIgaGVpZ2h0PSIzMSIgdmlld0JveD0iMCAwIDM0IDMxIj4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPHBhdGggc3Ryb2tlPSIjZWZiZTMzIiBkPSJNMjQuNTQyIDMwLjI4NGwtNy42NTgtNC4wMjUtNy42NTggNC4wMjVjLTEuMzYuNzE1LTIuOTgzLS40MzQtMi43Mi0xLjk3NWwxLjQ2Ni04LjUyNS02LjE5NC02LjAzNWMtMS4xMTMtMS4wODQtLjQ5OC0yLjk3NyAxLjAzNy0zLjE5OWw4LjU2LTEuMjQ4IDMuODI3LTcuNzU4Yy42ODYtMS4zODMgMi42NzItMS40MDEgMy4zNjMgMGwzLjgyNyA3Ljc1OCA4LjU2IDEuMjQ4YzEuNTM1LjIyMiAyLjE1IDIuMTE1IDEuMDM3IDMuMTk5bC02LjE5MyA2LjAzNSAxLjQ2NSA4LjUyNWMuMjYzIDEuNTQxLTEuMzYgMi42OTYtMi43MiAxLjk3NXoiLz4KICAgICAgICA8cGF0aCBmaWxsPSIjZWZiZTMzIiBkPSJNNy45NzIgMTkuNzg0bC02LjE5NC02LjAzNmMtMS4xMTMtMS4wODQtLjQ5OC0yLjk3NiAxLjAzOC0zLjE5OWw4LjgxMi0xLjI0OHYtLjUxbC4yNTIgMjAuMjMtMi42NTQgMS4yNjNjLTEuMzYuNzE0LTIuOTgzLS40MzQtMi43Mi0xLjk3NWwxLjQ2Ni04LjUyNXoiLz4KICAgIDwvZz4KPC9zdmc+Cg==\"","export default \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMyIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMzIDMyIj4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPHBhdGggc3Ryb2tlPSIjZWZiZTMzIiBkPSJNMjQuMzggMzAuOTY4bC03LjY1OC00LjAyNS03LjY1OCA0LjAyNWMtMS4zNi43MTUtMi45ODMtLjQzNC0yLjcyLTEuOTc1bDEuNDY2LTguNTI1LTYuMTk0LTYuMDM1Yy0xLjExMy0xLjA4NC0uNDk4LTIuOTc3IDEuMDM3LTMuMTk5bDguNTYtMS4yNDggMy44MjctNy43NThjLjY4Ni0xLjM4MyAyLjY3Mi0xLjQgMy4zNjMgMGwzLjgyNyA3Ljc1OCA4LjU2IDEuMjQ4YzEuNTM1LjIyMiAyLjE1IDIuMTE1IDEuMDM3IDMuMmwtNi4xOTMgNi4wMzQgMS40NjUgOC41MjVjLjI2MyAxLjU0MS0xLjM2IDIuNjk2LTIuNzIgMS45NzV6Ii8+CiAgICAgICAgPHBhdGggZmlsbD0iI2VmYmUzMyIgZD0iTTYuMzQ0IDI4Ljk5NGwxLjQ2NS04LjUyNi02LjE5NC02LjAzNmMtMS4xMTMtMS4wODQtLjQ5OC0yLjk3NiAxLjAzOC0zLjE5OWw4LjU2LTEuMjQ4IDMuODI2LTcuNzU3YTEuODYgMS44NiAwIDAgMSAxLjY4Mi0xLjA0NHYyNS43NThsLTcuNjU4IDQuMDI2Yy0xLjM2LjcxNS0yLjk4My0uNDMzLTIuNzE5LTEuOTc0Ii8+CiAgICA8L2c+Cjwvc3ZnPgo=\"","export default \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzNCIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDM0IDMyIj4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPHBhdGggZmlsbD0iI2VmYmUzMyIgZD0iTTkuMzYgMzAuNzg0Yy0xLjM2My43MTUtMi45OS0uNDM0LTIuNzI2LTEuOTc1bDEuNDY4LTguNTI1LTYuMjA2LTYuMDM1Yy0xLjExNi0xLjA4NC0uNDk5LTIuOTc3IDEuMDQtMy4ybDguNTc4LTEuMjQ3IDMuODM1LTcuNzU4Yy42ODctMS4zODMgMi42NzctMS40IDMuMzcgMGwzLjgzNSA3Ljc1OC4yNjQuMTEydjIwLjE0NWwtNS43ODQtMy4zLTcuNjc1IDQuMDI1eiIvPgogICAgICAgIDxwYXRoIHN0cm9rZT0iI2VmYmUzMyIgZD0iTTkuMzQyIDMwLjc4NEwxNyAyNi43NTlsNy42NTggNC4wMjVjMS4zNi43MTUgMi45ODMtLjQzNCAyLjcxOS0xLjk3NWwtMS40NjUtOC41MjUgNi4xOTQtNi4wMzVjMS4xMTMtMS4wODQuNDk4LTIuOTc3LTEuMDM3LTMuMTk5bC04LjU2MS0xLjI0OC0zLjgyNi03Ljc1OGMtLjY4Ni0xLjM4My0yLjY3Mi0xLjQwMS0zLjM2MyAwbC0zLjgyNyA3Ljc1OC04LjU2IDEuMjQ4Yy0xLjUzNS4yMjItMi4xNTEgMi4xMTUtMS4wMzcgMy4xOTlsNi4xOTMgNi4wMzUtMS40NjUgOC41MjVjLS4yNjMgMS41NDEgMS4zNiAyLjY5NiAyLjcxOSAxLjk3NXoiLz4KICAgIDwvZz4KPC9zdmc+Cg==\"","import React, { Fragment } from \"react\"\nimport fullStar from \"./s.svg\"\nimport emptyStar from \"./star-empty.svg\"\nimport quarterStar from \"./star-quarter.svg\"\nimport halfStar from \"./star-half.svg\"\nimport threeQuartersStar from \"./star-three-quarters.svg\"\n\nimport PropTypes from \"prop-types\"\n\nfunction Stars(props) {\n let rating = parseFloat(props.rating.toFixed(2))\n const stars = []\n\n let ones = Math.floor((rating / 1) % 10)\n let remainder = 5 - ones\n let decimalNumber = rating - Math.floor(rating)\n\n if (ones !== 5) {\n for (let i = 0; i < ones; i++) {\n stars.push(\n \n \n \n )\n }\n\n stars.push()\n\n for (let i = 0; i < remainder - 1; i++) {\n stars.push()\n }\n } else if (ones === 5) {\n for (let i = 0; i < 5; i++) {\n stars.push()\n }\n }\n\n return {stars}
\n}\n\nfunction Star(props) {\n let number = props.number\n\n if (number === 0) {\n return
\n } else if (number > 0 && number <= 0.25) {\n return
\n } else if (number > 0.25 && number <= 0.5) {\n return
\n } else if (number > 0.5 && number <= 0.9) {\n return (\n
\n )\n } else if (number > 0.9 && number <= 1) {\n return
\n } else {\n return
\n }\n}\n\nStars.propTypes = {\n rating: PropTypes.number\n}\n\nexport default Stars\n","import React from \"react\"\nimport classnames from \"classnames\"\nimport { useStaticQuery, graphql } from \"gatsby\"\nimport Stars from \"./Stars\"\nimport { Text } from \"../Core\"\nimport { Button, ButtonGroup } from \"../Button\"\n\nconst AllSocialReviews = ({\n language,\n heading,\n blurb,\n buttonHref,\n buttonText,\n isColumn,\n colorBack,\n animation,\n office\n}) => {\n const animate = animation ? \"fade-up\" : \"\"\n\n const wrapperClasses = classnames({\n \"home-section\": heading,\n \"ratings-review top-down\": true,\n \"color-back\": colorBack\n })\n\n const data = useStaticQuery(graphql`\n query SocialQuery {\n locations: allLocationsJson(sort: { fields: locationData___order }) {\n nodes {\n locationData {\n gmbId\n facebookId\n cityName\n locationName\n order\n gmbOverride\n }\n }\n }\n facebookSocials: allSocialJson(\n sort: { fields: data___totalReviews, order: DESC }\n filter: { data: { platform: { eq: \"facebook\" } } }\n ) {\n nodes {\n data {\n platformId\n rating\n totalReviews\n url\n platform\n }\n }\n }\n gmbSocials: allSocialJson(\n sort: { fields: data___totalReviews, order: DESC }\n filter: {\n data: { platform: { eq: \"googleMyBusiness\" }, rating: { gte: 4 } }\n }\n ) {\n nodes {\n data {\n platformId\n rating\n totalReviews\n url\n platform\n }\n }\n }\n }\n `)\n\n let locations = data.locations.nodes\n\n let googleReviews = []\n let facebookReviews = []\n let googles = data.gmbSocials.nodes\n let facebooks = data.facebookSocials.nodes\n\n googleReviews = matchSocialsWithLocations(locations, googles, \"google\")\n facebookReviews = matchSocialsWithLocations(\n locations,\n facebooks,\n \"facebook\",\n false\n )\n\n function matchSocialsWithLocations(\n locations,\n platformArr,\n platform,\n useCityName = true\n ) {\n let reviews = []\n let map = {}\n\n locations.forEach(location => {\n let reviewObj = {}\n\n if (platform === \"google\" && map[location.locationData.gmbId]) {\n return\n } else {\n map[location.locationData.gmbId] = platform\n }\n\n if (platform === \"facebook\" && map[location.locationData.facebookId]) {\n return\n } else {\n map[location.locationData.facebookId] = platform\n }\n\n for (let i = 0; i < platformArr.length; i++) {\n if (Math.round(platformArr[i].data.rating) < 3) continue\n\n if (\n platformArr[i].data.platformId === location.locationData.facebookId ||\n platformArr[i].data.platformId === location.locationData.gmbId\n ) {\n reviewObj = { ...platformArr[i].data }\n }\n }\n\n if (useCityName) {\n reviewObj.name = location.locationData.locationName\n }\n\n // Override the map google link, to a different gmb link\n if (platform === \"google\" && location.locationData.gmbOverride) {\n reviewObj.url = location.locationData.gmbOverride\n }\n\n reviewObj.order = location.locationData.order\n\n reviews.push(reviewObj)\n })\n\n return reviews\n }\n\n googleReviews.sort((a, b) => (a.order > b.order ? 1 : -1))\n // facebookReviews.sort((a, b) => (a.order > b.order ? 1 : -1))\n\n let consolidated = googleReviews.concat(facebookReviews)\n // let consolidated = googleReviews\n\n consolidated = consolidated.filter(rev => rev.rating || rev.platform)\n\n if (office) {\n consolidated = consolidated.filter(location => location.name == office)\n }\n\n let gridSize = `reviews-${consolidated.length}`\n\n const reviewsContainer = classnames({\n \"all-reviews-container-flex\": isColumn,\n \"all-reviews-container-grid\": !isColumn,\n [gridSize]: !isColumn\n })\n\n // add AOS animation attributes if using animation\n // otherwise will make links not clickable\n let attrs = {}\n if (animation) {\n ;(attrs[\"data-aos\"] = animate), (attrs[\"data-aos-duration\"] = 1200)\n }\n\n if (consolidated.length === 0) return <>>\n\n return (\n \n \n {heading && (\n
\n
\n
\n
{heading}
\n {blurb && }\n \n
\n
\n )}\n
\n {/*
*/}\n
\n {consolidated &&\n consolidated.map((review, i) => (\n
\n ))}\n
\n {/*
*/}\n
\n
\n\n {buttonHref && (\n \n )}\n \n )\n}\n\nexport default AllSocialReviews\n","import React from \"react\"\n\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\"\nimport { faFacebookF } from \"@fortawesome/free-brands-svg-icons/faFacebookF\"\nimport { faInstagram } from \"@fortawesome/free-brands-svg-icons/faInstagram\"\nimport { faGoogle } from \"@fortawesome/free-brands-svg-icons/faGoogle\"\nimport { faYoutube } from \"@fortawesome/free-brands-svg-icons/faYoutube\"\nimport { faMicrophone } from \"@fortawesome/free-solid-svg-icons/faMicrophone\"\n\nconst SocialIcon = ({ platform }) => {\n let icon\n if (platform === \"Facebook\") {\n icon = faFacebookF\n }\n if (platform === \"Instagram\") {\n icon = faInstagram\n }\n if (platform === \"Google\") {\n icon = faGoogle\n }\n if (platform === \"Youtube\") {\n icon = faYoutube\n }\n if (platform === \"Podcast\") {\n icon = faMicrophone\n }\n\n return (\n \n \n
\n )\n}\n\nexport default SocialIcon\n","import React from \"react\"\nimport { SocialIcon } from \".\"\n\nconst SocialIconLink = ({\n platform,\n link,\n className = \"\",\n iconColor,\n bgColor = \"#fff\",\n size,\n borderRadius\n}) => {\n if (!link || !platform) return \"\"\n\n const styles = {\n borderRadius: borderRadius || \"100%\"\n }\n\n return (\n \n \n \n )\n}\n\nexport default SocialIconLink\n","import PropTypes from \"prop-types\"\nimport { useStaticQuery, graphql } from \"gatsby\"\nimport React from \"react\"\nimport classNames from \"classnames\"\n\n// import { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\"\n// import { faPlay } from \"@fortawesome/pro-solid-svg-icons/faPlay\"\n\nconst VideoButton = props => {\n const query = useStaticQuery(graphql`\n query HeaderQuery {\n allTranslationsJson {\n nodes {\n watchVideo {\n en\n es\n }\n }\n }\n }\n `)\n\n const btnClass = classNames(props.buttonClass, {\n \"standard-button\": !(props.iconOnly || props.textOnly),\n \"button-video\": true,\n \"video-button\": props.overVideo === false ? false : true,\n \"icon-only\": props.iconOnly,\n \"z-1\": props.overVideo,\n \"sizzle-button-under\": props.sizzleButton,\n minimal: props.minimal ? props.minimal : false,\n \"btn-left\": props.textAlign === \"left\",\n \"btn-right\": props.textAlign === \"right\",\n \"btn-center\": props.textAlign === \"center\"\n })\n\n const { language } = props\n\n const translations = query.allTranslationsJson.nodes[0]\n\n let buttonText\n\n if (props.buttonText) {\n buttonText = props.buttonText\n } else {\n buttonText = translations.watchVideo[language]\n }\n\n if (props.textOnly) {\n return (\n \n {buttonText}\n \n )\n }\n\n return (\n \n {!props.iconOnly && buttonText}\n \n )\n}\n\nVideoButton.defaultProps = {\n language: \"en\"\n}\n\nVideoButton.propTypes = {\n minimal: PropTypes.bool,\n textAlign: PropTypes.string,\n href: PropTypes.string,\n buttonText: PropTypes.string,\n overVideo: PropTypes.bool,\n toggleTheater: PropTypes.func\n}\n\nexport default VideoButton\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\n\nvar classNames = require(\"classnames\")\n\nclass HamburgerIconTheater extends React.Component {\n constructor(props) {\n super(props)\n }\n\n render() {\n var HamburgerIconTheaterSpanClass = classNames({\n open: this.props.isOpen && !this.props.isClosing\n })\n\n var cMenuClass = classNames({\n \"c-menu-theater\": true,\n \"c-menu-theater--open\": this.props.isOpen,\n disabled: this.props.isOpening || this.props.isClosing\n })\n\n return (\n \n \n \n
\n )\n }\n}\nHamburgerIconTheater.propTypes = {\n isOpen: PropTypes.bool,\n isOpening: PropTypes.bool,\n isClosing: PropTypes.bool,\n toggleTheater: PropTypes.func\n}\nexport default HamburgerIconTheater\n","import React, { Component } from \"react\"\nimport ReactPlayer from \"react-player\"\nimport aosWatch from \"./animations/aosWatch.js\"\n\nclass ResponsivePlayer extends Component {\n constructor(props) {\n super(props)\n }\n\n render() {\n return (\n \n \n
\n )\n }\n}\n\nexport default ResponsivePlayer\n","import PropTypes from \"prop-types\"\nimport React from \"react\"\n\nimport VideoButton from \"./VideoButton\"\nimport HamburgerIconTheater from \"./HamburgerIconTheater.js\"\nimport ResponsivePlayer from \"../ResponsivePlayer.js\"\n\nvar classNames = require(\"classnames\")\n\n/* Due to various restrictions, ReactPlayer is not guaranteed to function properly on mobile devices. The YouTube player \ndocumentation, for example, explains that certain mobile browsers require user interaction before playing: */\n\nconst Video = props => {\n var sidebarClass = classNames({\n theater: true,\n \"theater--closed\": !props.isOpen,\n \"theater--open\": props.isOpen,\n \"theater--closing\": props.isClosing\n })\n\n return (\n \n {props.isOpen && !props.isOpening && (\n
\n )}\n
\n )\n}\nVideo.propTypes = {\n isOpen: PropTypes.bool,\n isOpening: PropTypes.bool,\n isClosing: PropTypes.bool,\n videoUrl: PropTypes.string,\n controls: PropTypes.bool,\n playing: PropTypes.bool\n}\n\nexport default Video\n","import PropTypes from \"prop-types\"\nimport React from \"react\"\nimport { createPortal } from \"react-dom\"\nimport Video from \"./Video\"\nimport HamburgerIconTheater from \"./HamburgerIconTheater.js\"\n\nvar classNames = require(\"classnames\")\n\nclass Overlay extends React.Component {\n constructor(props) {\n super(props)\n this.state = { width: 0, height: 0 }\n this.updateWindowDimensions = this.updateWindowDimensions.bind(this)\n }\n\n componentDidUpdate() {\n if (this.props.isClosing) {\n document.documentElement.classList.remove(\"theater-is-open\")\n } else if (this.props.isOpen) {\n document.documentElement.classList.add(\"theater-is-open\")\n }\n }\n\n updateWindowDimensions() {\n this.setState({ width: window.innerWidth, height: window.innerHeight })\n }\n\n // Generates keyframe style tag to be document.head.appendChild'ed;\n generateKeyframesStyle(width, height, modifier) {\n let radius = 5000\n if (width > height) {\n radius = width\n } else if (width < height) {\n radius = height\n } else {\n radius = width\n }\n\n // 2 is too low\n if (!modifier) {\n modifier = 3\n }\n\n radius = radius * modifier\n\n return `\n @keyframes menuAnimOpenBottomLeft {\n 0% {\n top: unset;\n bottom: ${-0.5 * radius}px;\n left: ${-0.5 * radius}px;\n width: 0;\n height: 0;\n border-radius: 50%;\n }\n 100% {\n top: unset;\n bottom: ${-0.5 * radius}px;\n left: ${-0.5 * radius}px;\n width: ${radius}px;\n height: ${radius}px;\n border-radius: 50%;\n }\n }\n @keyframes menuAnimCloseBottomLeft {\n 0% {\n top: unset;\n bottom: ${-0.5 * radius}px;\n left: ${-0.5 * radius}px;\n width: ${radius}px;\n height: ${radius}px;\n border-radius: 50%;\n }\n 100% {\n top: unset;\n bottom: ${-0.5 * radius}px;\n left: ${-0.5 * radius}px;\n width: 0;\n height: 0;\n border-radius: 50%;\n }\n }`\n }\n\n componentDidMount() {\n this.updateWindowDimensions()\n window.addEventListener(\"resize\", this.updateWindowDimensions)\n const menuKeyframes = this.generateKeyframesStyle(\n window.innerWidth,\n window.innerHeight\n )\n const $style = document.createElement(\"style\")\n $style.id = \"theater-animation\"\n\n if (!document.querySelector(\"#theater-animation\")) {\n $style.innerHTML = menuKeyframes\n document.head.appendChild($style)\n }\n }\n\n componentWillUnmount() {\n window.removeEventListener(\"resize\", this.updateWindowDimensions)\n }\n\n render() {\n let iconColor = \"#6d6e6f\"\n let iconClass = classNames({\n \"theater-icon\": true,\n open: this.props.isOpen\n })\n\n let containerClasses = classNames(this.props.className, {\n \"theater-container\": true\n })\n\n return (\n <>\n {this.props.isOpen &&\n createPortal(\n \n \n {this.props.isOpen && (\n \n )}\n
,\n document.body\n )}\n >\n )\n }\n}\nOverlay.propTypes = {\n isOpen: PropTypes.bool,\n isOpening: PropTypes.bool,\n isClosing: PropTypes.bool,\n toggleTheater: PropTypes.func,\n videoUrl: PropTypes.string,\n controls: PropTypes.bool,\n playing: PropTypes.bool\n}\n\nexport default Overlay\n","import PropTypes from \"prop-types\"\nimport React from \"react\"\n\nimport VideoButton from \"./VideoButton\"\nimport Overlay from \"./Overlay\"\nclass TheaterVideo extends React.Component {\n constructor(props) {\n super(props)\n this.state = {\n form: \"two-lines\",\n position: \"right\",\n isOpen: false,\n isOpening: false,\n isClosing: false\n }\n this.toggleTheater = this.toggleTheater.bind(this)\n this.escFunction = this.escFunction.bind(this)\n }\n componentDidMount() {\n var menu = document.getElementById(\"mainNav\")\n var pause = document.getElementById(\"sizzlePause\")\n this.menu = menu\n this.pauseButton = pause\n\n document.addEventListener(\"keydown\", this.escFunction, false)\n }\n componentWillUnmount() {\n document.removeEventListener(\"keydown\", this.escFunction, false)\n }\n\n escFunction(event) {\n if (event.keyCode === 27 && this.state.isOpen) {\n this.toggleTheater()\n }\n }\n\n toggleTheater(event) {\n const toggleOn = event === \"open\"\n const toggleOff = event === \"close\"\n\n if (toggleOff) {\n this.menu.style.zIndex = \"0\"\n if (this.pauseButton) {\n this.pauseButton.style.display = \"none\"\n }\n this.setState(prevState => ({\n ...prevState,\n isOpen: !prevState.isOpen,\n isOpening: !prevState.isOpening\n }))\n setTimeout(() => {\n this.setState(prevState => ({\n ...prevState,\n isOpening: !prevState.isOpening,\n playing: true\n }))\n }, 450)\n return\n }\n\n if (this.state.isOpen) {\n if (this.pauseButton) {\n setTimeout(() => {\n this.pauseButton.style.display = \"block\"\n }, 450)\n }\n\n this.setState(\n prevState => ({\n ...prevState,\n isClosing: !prevState.isClosing,\n playing: false\n }),\n function () {\n setTimeout(() => {\n this.setState(prevState => ({\n ...prevState,\n isOpen: !prevState.isOpen,\n isClosing: !prevState.isClosing\n }))\n this.menu.style.zIndex = \"100\"\n }, 450)\n }\n )\n // Make sure to sync this setTimeout time with the one in the .scss animation time\n } else if (!this.state.isOpen) {\n this.menu.style.zIndex = \"0\"\n if (this.pauseButton) {\n this.pauseButton.style.display = \"none\"\n }\n this.setState(prevState => ({\n ...prevState,\n isOpen: !prevState.isOpen,\n isOpening: !prevState.isOpening\n }))\n setTimeout(() => {\n this.setState(prevState => ({\n ...prevState,\n isOpening: !prevState.isOpening,\n playing: true\n }))\n }, 450)\n // Make sure to sync this setTimeout time with the one in the .scss animation time\n }\n }\n\n render() {\n const childrenWithProps = React.Children.map(this.props.children, child =>\n React.cloneElement(child, { onClick: this.toggleTheater })\n )\n\n var hasWatchVideo = true\n var onlyButton = false\n var asWrapper = this.props.asWrapper\n var overVideo = false\n var controls = true\n var playing = true\n var sizzleButton = false\n\n if (this.props.hasWatchVideo === false) {\n hasWatchVideo = false\n }\n if (this.props.onlyButton === true) {\n onlyButton = true\n } else {\n if (this.props.overVideo === true) {\n overVideo = true\n }\n }\n if (this.props.controls === false) {\n controls = false\n }\n if (this.props.playing === false) {\n playing = false\n }\n if (this.props.sizzleButton === true) {\n sizzleButton = true\n }\n\n if (asWrapper) {\n return (\n \n )\n }\n\n return (\n \n
\n\n {hasWatchVideo && !onlyButton && (\n
\n \n {this.props.children}\n
\n )}\n {onlyButton && sizzleButton && (\n
\n \n
\n )}\n {onlyButton && !sizzleButton && this.props.slideButton && (\n
\n \n
\n )}\n {onlyButton && !sizzleButton && !this.props.slideButton && (\n
\n )}\n {!hasWatchVideo && childrenWithProps}\n
\n )\n }\n}\n\nTheaterVideo.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node\n ]),\n videoUrl: PropTypes.string.isRequired,\n controls: PropTypes.bool,\n playing: PropTypes.bool,\n overVideo: PropTypes.bool,\n hasWatchVideo: PropTypes.bool,\n onlyButton: PropTypes.bool,\n sizzleButton: PropTypes.bool\n}\n\nexport default TheaterVideo\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nvar classNames = require(\"classnames\")\n\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\"\nimport { faTimes } from \"@fortawesome/pro-light-svg-icons/faTimes\"\n\nclass SearchInput extends React.Component {\n constructor(props) {\n super(props)\n this.escFunction = this.escFunction.bind(this)\n }\n\n componentDidMount() {\n document.addEventListener(\"keydown\", this.escFunction, false)\n }\n\n componentWillUnmount() {\n document.removeEventListener(\"keydown\", this.escFunction, false)\n }\n\n escFunction(event) {\n if (\n event.keyCode === 27 &&\n this.props.isOpen &&\n !this.props.isOpening &&\n !this.props.isClosing\n ) {\n this.props.toggleSearch()\n }\n }\n\n render() {\n return (\n \n )\n }\n}\n\nSearchInput.propTypes = {\n isOpen: PropTypes.bool,\n isOpening: PropTypes.bool,\n isClosing: PropTypes.bool,\n handleSearchInputChange: PropTypes.func,\n toggleSearch: PropTypes.func,\n language: PropTypes.string\n}\n\nclass Search extends React.Component {\n constructor(props) {\n super(props)\n }\n\n componentDidMount() {}\n\n render() {\n var searchClass = classNames({\n section: true,\n \"search-container\": true,\n \"opens-left\": this.props.opensLeft,\n \"search-container--open\": this.props.isOpen,\n \"search-container--closing\": this.props.isClosing\n })\n\n return (\n <>\n \n {/* */}\n >\n )\n }\n}\nSearch.propTypes = {\n isOpen: PropTypes.bool,\n isClosing: PropTypes.bool,\n handleSearchSubmit: PropTypes.func,\n handleSearchInputChange: PropTypes.func,\n toggleSearch: PropTypes.func,\n suggestion: PropTypes.string,\n suggestions: PropTypes.array,\n language: PropTypes.string\n}\nexport default Search\n","import React from \"react\"\n\nfunction Dots(props) {\n return (\n \n )\n}\n\nexport default Dots\n","import React from \"react\"\n\nfunction BurgerIcon(props) {\n let circleTheme =\n props.theme === \"light\" || props.theme === \"gray\" ? \"#1f2a33\" : \"white\"\n let lineTheme =\n props.theme === \"light\" || props.theme === \"gray\" ? \"white\" : \"#1f2a33\"\n return (\n \n )\n}\n\nexport default BurgerIcon\n","import React from \"react\"\n\nfunction ThreeLines(props) {\n return (\n \n )\n}\n\nexport default ThreeLines\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\n\nimport Dots from \"./Dots\"\nimport BurgerIcon from \"./BurgerIcon\"\nimport ThreeLines from \"./ThreeLines\"\n\nconst classNames = require(\"classnames\")\n\nclass HamburgerIcon extends React.Component {\n constructor(props) {\n super(props)\n }\n\n renderIcon(iconType) {\n const HamburgerIconSpanClass = classNames({\n open: this.props.isOpen && !this.props.isClosing\n })\n switch (iconType) {\n case \"twoLines\":\n return (\n <>\n \n \n >\n )\n case \"threeLines\":\n if (this.props.isOpen && !this.props.isClosing) {\n return (\n <>\n \n \n >\n )\n }\n return \n\n case \"burger\":\n if (this.props.isOpen && !this.props.isClosing) {\n return (\n <>\n \n \n >\n )\n }\n return \n\n case \"dots\":\n if (this.props.isOpen && !this.props.isClosing) {\n return (\n <>\n \n \n >\n )\n }\n return \n\n case \"word\":\n var menuWordClass = classNames({\n \"menu-word\": true,\n bold: this.props.boldMenu\n })\n if (this.props.isOpen && !this.props.isClosing) {\n return (\n <>\n \n \n >\n )\n }\n return this.props.language === \"es\" ? (\n menú
\n ) : (\n Menu
\n )\n }\n }\n\n render() {\n const cMenuClass = classNames({\n \"c-menu\":\n this.props.iconType !== \"word\" ||\n (this.props.isOpen && !this.props.isClosing),\n // \"menu-word-adjust\": this.props.iconType === \"word\" && this.props.isOpen,\n \"c-menu--open\": this.props.isOpen,\n disabled: this.props.isOpening || this.props.isClosing\n })\n\n const cMenuBurgerClass = classNames(\"c-menu\", {\n \"with-burger\": this.props.iconType === \"burger\"\n })\n\n return (\n <>\n \n {this.props.isOpen && !this.props.isClosing && (\n {}\n : this.props.toggleMenu\n }>\n {this.renderIcon(this.props.iconType)}\n
\n )}\n >\n )\n }\n}\nHamburgerIcon.propTypes = {\n isOpen: PropTypes.bool,\n isOpening: PropTypes.bool,\n isClosing: PropTypes.bool,\n toggleMenu: PropTypes.func\n}\nexport default HamburgerIcon\n","/* eslint-disable */\nimport { Link } from \"gatsby\"\nimport PropTypes from \"prop-types\"\nimport React, { Fragment, useState, useEffect } from \"react\"\n\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\"\nimport {\n faChevronRight,\n faChevronDown,\n faArrowLeft\n} from \"@fortawesome/free-solid-svg-icons\"\nimport { wrapSup } from \"../../utils/utils\"\nimport Button from \"../Button/Button.js\"\nimport { Text, Image } from \"../Core\"\nimport HamburgerIcon from \"./HamburgerIcon.js\"\n\nconst classNames = require(\"classnames\")\n\nclass HamburgerMenu extends React.Component {\n constructor(props) {\n super(props)\n this.state = { width: 0, height: 0 }\n this.updateWindowDimensions = this.updateWindowDimensions.bind(this)\n }\n\n updateWindowDimensions() {\n this.setState({ width: window.innerWidth, height: window.innerHeight })\n }\n\n // Generates keyframe style tag to be document.head.appendChild'ed;\n generateKeyframesStyle(width, height, modifier) {\n let radius = 5000\n if (width > height) {\n radius = width\n } else if (width < height) {\n radius = height\n } else {\n radius = width\n }\n\n // 2 is too low\n if (!modifier) {\n modifier = 2.5\n }\n\n radius *= modifier\n\n return `\n @keyframes menuAnimOpen {\n 0% {\n top: ${-0.5 * radius}px;\n right: ${-0.5 * radius}px;\n width: 0;\n height: 0;\n border-radius: 50%;\n }\n 100% {\n top: ${-0.5 * radius}px;\n right: ${-0.5 * radius}px;\n width: ${radius}px;\n height: ${radius}px;\n border-radius: 50%;\n }\n }\n\n @keyframes menuAnimClose {\n 0% {\n top: ${-0.5 * radius}px;\n right: ${-0.5 * radius}px;\n width: ${radius}px;\n height: ${radius}px;\n border-radius: 50%;\n }\n\n 100% {\n top: ${-0.5 * radius}px;\n right: ${-0.5 * radius}px;\n width: 0;\n height: 0;\n border-radius: 50%;\n }\n }`\n }\n\n componentDidMount() {\n this.updateWindowDimensions()\n const menuKeyframes = this.generateKeyframesStyle(\n window.innerWidth,\n window.innerHeight\n )\n const $style = document.createElement(\"style\")\n $style.id = \"menu-animation\"\n if (!document.querySelector(\"#menu-animation\")) {\n $style.innerHTML = menuKeyframes\n document.head.appendChild($style)\n }\n }\n\n render() {\n const iconColor = \"#6d6e6f\"\n const iconClass = classNames({\n \"hamburger-icon\": true,\n open: this.props.isOpen\n })\n // if (this.props.atTopOfPage) {\n // iconColor = \"white\"\n // }\n\n return (\n \n \n \n
\n )\n }\n}\nHamburgerMenu.propTypes = {\n isOpen: PropTypes.bool,\n isOpening: PropTypes.bool,\n isClosing: PropTypes.bool,\n toggleMenu: PropTypes.func\n}\n\nconst Sidebar = props => {\n const [activeMenu, setActiveMenu] = useState(\"\")\n const [activeLinks, setActiveLinks] = useState([])\n\n useEffect(() => {\n if (!props.isOpen) {\n setActiveMenu(\"\")\n setActiveLinks([])\n }\n }, [props.isOpen])\n\n const handleSubMenu = (menuName, menuLinks) => {\n if (activeMenu === menuName) {\n setActiveMenu(\"\")\n setActiveLinks([])\n } else {\n setActiveMenu(menuName)\n setActiveLinks(menuLinks)\n }\n }\n\n const sidebarClass = classNames({\n \"hamburger-menu\": true,\n columns: true,\n \"is-vcentered\": false,\n \"hamburger-menu--closed\": !props.isOpen,\n \"hamburger-menu--open\": props.isOpen,\n \"hamburger-menu--closing\": props.isClosing\n })\n\n const menuContentClass = classNames({\n \"hamburger-menu-content columns is-centered\": true,\n shown: props.isOpen && !props.isOpening && !props.isClosing\n })\n\n const handleSubmit = e => {\n e.preventDefault()\n document.getElementById(\"paymentForm\").submit()\n }\n\n return (\n \n )\n}\nSidebar.propTypes = {\n isOpen: PropTypes.bool,\n isOpening: PropTypes.bool,\n isClosing: PropTypes.bool\n}\n\nconst ActiveListMenu = ({ menu, language, toggleMenu }) => (\n <>\n {menu.map((item, i) => (\n \n \n {item.targetType === \"internal\" && (\n \n {item.title && item.title.includes(\"®\") ? (\n \n ) : (\n item.title\n )}\n \n )}\n {item.targetType === \"external\" && (\n \n {item.title}\n \n )}\n {item.targetType === \"dropdown\" && (\n \n )}\n \n \n ))}\n >\n)\n\nconst DropdownItem = ({ link, language, toggleMenu }) => {\n const [isOpen, setIsOpen] = useState(false)\n\n const chevronClasses = classNames({\n \"silo-chevron\": true,\n \"chevron-active\": isOpen\n })\n\n const siloLinkClasses = classNames({\n \"sub-menu\": true,\n \"silo-links-hidden\": !isOpen\n })\n\n return (\n <>\n setIsOpen(!isOpen)}>\n {link.title}\n \n \n\n {link.subMenu2 &&\n link.subMenu2.map((subLink, i) => (\n \n {subLink.title}\n \n ))}\n >\n )\n}\n\nexport default HamburgerMenu\n","import React from \"react\"\n\nfunction Logo(props) {\n let letterTheme =\n props.theme === \"dark\" || props.theme === \"dark-blue\" ? \"white\" : \"#1f2a33\"\n\n return (\n \n )\n}\n\nexport default Logo\n","import React, { useState } from \"react\"\nimport \"./Flyout.scss\"\nfunction DropdownMenu({ label, children }) {\n const [isVisible, setIsVisible] = useState(false)\n\n return (\n \n
\n
\n )\n}\n\nexport default DropdownMenu\n","import { Link, StaticQuery, graphql, navigate } from \"gatsby\"\nimport classNames from \"classnames\"\nimport PropTypes from \"prop-types\"\nimport React from \"react\"\nimport Fuse from \"fuse.js\"\nimport Search from \"./Search.js\"\n\nimport HamburgerMenu from \"./HamburgerMenu.js\"\nimport { Image, Text } from \"../Core/\"\n\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\"\nimport { faChevronDown } from \"@fortawesome/free-solid-svg-icons/faChevronDown\"\nimport { faSearch } from \"@fortawesome/pro-light-svg-icons/faSearch\"\n\n// import Logo from \"../../images/logo.inline.svg\"\nimport Logo from \"../Menu/Logo.js\"\nimport LogoMark from \"../../images/logo-mark.inline.svg\"\nimport Flyout from \"../Flyout.js\"\nimport Container from \"../Containers/Container.js\"\nimport Button from \"../Button/Button.js\"\n\nclass ComMenu extends React.Component {\n constructor(props) {\n super(props)\n this.state = {\n atTopOfPage: true,\n isAlwaysTransparent: false,\n logoChangesOnScroll: false,\n search: {\n hasSearch: true,\n isOpen: false,\n isOpening: false,\n isClosing: false,\n value: \"\",\n suggestions: [],\n items: [],\n searchTime: \"\"\n },\n ada: {\n hasADA: false\n },\n logo: {\n hasLogo: true,\n position: \"center\",\n fullLogo: true\n },\n hamburger: {\n form: \"two-lines\",\n position: \"left\",\n isOpen: false,\n isOpening: false,\n isClosing: false\n }\n }\n this.toggleMenu = this.toggleMenu.bind(this)\n this.toggleSearch = this.toggleSearch.bind(this)\n this.handleSearchInputChange = this.handleSearchInputChange.bind(this)\n this.handleSearchSubmit = this.handleSearchSubmit.bind(this)\n }\n\n componentDidMount() {\n window.onscroll = () => {\n if (this.props.browserStatus !== false) {\n if (window.pageYOffset !== 0) {\n this.setState({\n atTopOfPage: false\n })\n } else {\n this.setState({\n atTopOfPage: true\n })\n }\n }\n }\n if (this.state.hamburger.isOpen) {\n document.documentElement.classList.add(\"hamburger-menu-is-open\")\n } else if (this.state.hamburger.isClosing) {\n document.documentElement.classList.remove(\"hamburger-menu-is-open\")\n }\n\n let items = []\n if (this.props.language === \"es\") {\n items = this.props.searchIndex.es\n } else {\n items = this.props.searchIndex.en\n }\n\n this.setState(prevState => ({\n ...prevState,\n searchItems: items\n }))\n }\n\n componentDidUpdate() {\n if (this.state.hamburger.isClosing) {\n document.documentElement.classList.remove(\"hamburger-menu-is-open\")\n }\n }\n\n componentWillUnmount() {\n window.onscroll = null\n }\n\n toggleMenu() {\n if (this.state.hamburger.isOpen && this.props.browserStatus !== false) {\n this.setState(\n prevState => ({\n hamburger: {\n ...prevState.hamburger,\n isClosing: !prevState.hamburger.isClosing\n }\n }),\n function () {\n setTimeout(() => {\n this.setState(prevState => ({\n hamburger: {\n ...prevState.hamburger,\n isOpen: !prevState.hamburger.isOpen,\n isClosing: !prevState.hamburger.isClosing\n }\n }))\n }, 450)\n }\n )\n // Make sure to sync this setTimeout time with the one in the .scss animation time\n } else if (\n !this.state.hamburger.isOpen &&\n this.props.browserStatus !== false\n ) {\n this.setState(prevState => ({\n hamburger: {\n ...prevState.hamburger,\n isOpen: !prevState.hamburger.isOpen,\n isOpening: !prevState.hamburger.isOpening\n }\n }))\n setTimeout(() => {\n this.setState(prevState => ({\n hamburger: {\n ...prevState.hamburger,\n isOpening: !prevState.hamburger.isOpening\n }\n }))\n }, 450)\n // Make sure to sync this setTimeout time with the one in the .scss animation time\n }\n }\n\n toggleSearch() {\n if (this.state.search.isOpen && this.props.browserStatus !== false) {\n this.setState(prevState => ({\n search: {\n ...prevState.search,\n isClosing: !prevState.search.isClosing\n }\n }))\n setTimeout(() => {\n this.setState(prevState => ({\n search: {\n ...prevState.search,\n isOpen: !prevState.search.isOpen,\n isClosing: !prevState.search.isClosing\n }\n }))\n }, 450)\n // Make sure to sync this setTimeout time with the one in the .scss animation time\n } else if (\n !this.state.search.isOpen &&\n this.props.browserStatus !== false\n ) {\n this.setState(\n prevState => ({\n search: {\n ...prevState.search,\n isOpening: !prevState.search.isOpening,\n isOpen: !prevState.search.isOpen\n }\n }),\n function () {\n setTimeout(() => {\n this.setState(prevState => ({\n search: {\n ...prevState.search,\n isOpening: !prevState.search.isOpening\n }\n }))\n }, 1450)\n }\n )\n }\n }\n\n handleSearchInputChange(event) {\n if (this.props.browserStatus !== false) {\n var t0 = performance.now()\n var options\n this.setState({ value: event.target.value }, () => {\n options = {\n shouldSort: true,\n // tokenize: true,\n threshold: 0.4,\n location: 0,\n distance: 100,\n maxPatternLength: 32,\n minMatchCharLength: 1,\n keys: [\n {\n name: \"searchHeading\",\n weight: 0.7\n },\n {\n name: \"metaDescription\",\n weight: 0.3\n }\n ]\n }\n\n var fuse = new Fuse(this.state.searchItems, options) // \"list\" is the item array\n var result = fuse.search(this.state.value)\n var t1 = performance.now()\n var searchTime = parseFloat(((t1 - t0) / 1000).toFixed(2))\n if (searchTime === 0) {\n searchTime = 0.01\n }\n if (result[0]) {\n this.setState(prevState => ({\n search: {\n ...prevState.search,\n suggestions: result,\n searchTime: searchTime\n }\n }))\n } else {\n this.setState(prevState => ({\n search: {\n ...prevState.search,\n suggestions: [],\n searchTime: searchTime\n }\n }))\n }\n })\n }\n }\n\n handleSearchSubmit(event) {\n event.preventDefault()\n\n let suggestions = this.state.search.suggestions\n let searchInput = this.state.value\n let searchTime = this.state.search.searchTime\n if (this.props.language === \"es\") {\n navigate(\"/es/resultados-de-la-busqueda/\", {\n state: { suggestions, searchInput, searchTime }\n })\n } else {\n navigate(\"/search-results/\", {\n state: { suggestions, searchInput, searchTime }\n })\n }\n this.toggleSearch()\n }\n\n render() {\n var comMenuClass = classNames({\n \"com-menu\": true,\n columns: true,\n \"is-mobile\": true,\n \"is-vcentered\": true,\n \"is-centered\": true,\n \"com-menu--scrolled\": !this.state.atTopOfPage,\n transparent: this.state.isAlwaysTransparent,\n [`${!this.state.atTopOfPage ? \"light\" : this.props.theme}`]: true\n })\n\n const desktopLogoHeight = \"55px\"\n const mobileLogoWidth = \"75\"\n\n let theme = !this.state.atTopOfPage ? \"light\" : this.props.theme\n return (\n {\n // Define menu items from graphQL here\n let topLevelItems = data.allDataJson.nodes[0].topLevelItems\n let openMenuLeft = data.allDataJson.nodes[0].openMenuOrdered\n let openMenuRight = data.allDataJson.nodes[0].openMenuUnordered\n let popularPages = data.allDataJson.nodes[0].popularPages\n\n if (this.props.language === \"es\") {\n topLevelItems = data.navEs.nodes[0].topLevelItems\n openMenuLeft = data.navEs.nodes[0].openMenuOrdered\n openMenuRight = data.navEs.nodes[0].openMenuUnordered\n popularPages = data.navEs.nodes[0].popularPages\n }\n\n let searchOptions\n for (let i = 0; i < topLevelItems.length; i++) {\n if (topLevelItems[i].type === \"search\")\n searchOptions = topLevelItems[i]\n }\n let logoOptions\n for (let i = 0; i < topLevelItems.length; i++) {\n if (topLevelItems[i].type === \"logo\") logoOptions = topLevelItems[i]\n }\n let menuOptions\n for (let i = 0; i < topLevelItems.length; i++) {\n if (topLevelItems[i].type === \"menu\") menuOptions = topLevelItems[i]\n }\n\n const menuIcon = topLevelItems.find(\n item => item.type === \"menu\"\n ).iconType\n\n return (\n \n )\n }}\n />\n )\n }\n}\n\nComMenu.propTypes = {\n pageData: PropTypes.object,\n language: PropTypes.string,\n browserStatus: PropTypes.bool,\n boldMenu: PropTypes.bool\n}\n\nfunction MenuTextLinks(props) {\n if (props.type === \"navTextItem\") {\n if (props.isPhone) {\n return (\n \n {props.title}\n \n )\n } else if (props.hasDropdown) {\n return (\n \n \n \n
\n
\n \n
\n
\n {props.dropdownLinks.map((item, index) => (\n \n {item.title}\n \n ))}\n
\n
\n
\n
\n
\n \n \n )\n } else {\n return (\n <>\n {!props.opensNewTab ? (\n \n {props.title.includes(\"®\") ? (\n \n ) : (\n props.title\n )}\n \n ) : (\n \n {props.title}\n \n )}\n >\n )\n }\n } else {\n return \"\"\n }\n}\n\nfunction TopLevelItem(props) {\n if (props.type === \"logo\") {\n return (\n <>\n \n \n
\n >\n )\n } else if (props.type === \"navTextItem\") {\n if (props.isPhone) {\n return (\n \n )\n } else {\n return (\n \n \n {props.title}\n \n
\n )\n }\n } else if (props.type === \"search\") {\n return (\n \n \n
\n )\n } else if (props.type === \"menu\") {\n return (\n \n \n
\n )\n } else {\n return null\n }\n}\n\nfunction TopLevelItemsMobile(props) {\n return (\n \n
\n {/*
\n {props.language === \"es\" ? (\n \n English\n \n ) : (\n \n Español\n \n )} \n
*/}\n\n
\n \n \n \n
\n
\n
\n
\n )\n}\n\nconst SearchIcon = props => {\n return (\n \n )\n}\n\nconst SingleLink = props => {\n if (props.isPhone) {\n return (\n \n {props.title}\n \n )\n } else if (props.opensNewTab) {\n return (\n \n {props.title}\n \n )\n } else {\n return (\n \n {props.title}\n \n )\n }\n}\n\nSearchIcon.propTypes = {\n toggleSearch: PropTypes.func\n}\n\nexport default ComMenu\n","import React from \"react\"\nimport { useStaticQuery, graphql, Link } from \"gatsby\"\n\nimport { Text, Image } from \"../Core\"\nimport { SocialIconLink } from \"../SocialReviews\"\nimport { Columns } from \"../../components/Containers\"\nimport GeneralHours from \"../Core/GeneralHours\"\nimport { Office, Phone, Email } from \"../locations\"\nimport Logo from \"../../images/logo-mark.inline.svg\"\n\nconst Footer = ({ isHomePage, language, theme }) => {\n const { site, footerData, privacy, trans, socialAccounts, allLocations } =\n useStaticQuery(\n graphql`\n query {\n site {\n siteMetadata {\n fullPracticeName\n }\n }\n footerData: allDataJson(filter: { optionsItem: { eq: \"footer\" } }) {\n nodes {\n footerItems {\n blurbText\n blurbTextEs\n }\n }\n }\n privacy: allPrivacyPagesJson(sort: { order: ASC, fields: order }) {\n nodes {\n title\n name\n }\n }\n socialAccounts: allDataJson(\n filter: { optionsItem: { eq: \"siteVariables\" } }\n ) {\n nodes {\n hasWuwta\n hasStemodonctics\n socialAccounts {\n link\n platform\n }\n }\n }\n allLocations: allLocationsJson(\n filter: { useOnFooter: { eq: true } }\n sort: { fields: locationData___order }\n ) {\n nodes {\n title\n pageData {\n title\n hasThisPage\n }\n locationData {\n socialAccounts {\n platform\n link\n }\n cityName\n cityZip\n email\n googlePlaceLink\n locationHours {\n endTime\n startTime\n weekDay\n }\n locationName\n phone\n fax\n stateAbbr\n stateName\n streetName\n streetNumber\n }\n }\n }\n trans: allTranslationsJson {\n nodes {\n credit {\n en\n es\n }\n by {\n en\n es\n }\n phone {\n en\n es\n }\n email {\n en\n es\n }\n hours {\n en\n es\n }\n address {\n en\n es\n }\n giveUsACall {\n en\n es\n }\n getDirections {\n en\n es\n }\n }\n }\n }\n `\n )\n const translations = trans.nodes[0]\n const social = socialAccounts.nodes[0].socialAccounts\n const locations = allLocations.nodes\n const footerblurb = footerData.nodes[0].footerItems.blurbText\n const blurbTextEs = footerData.nodes[0].footerItems.blurbTextEs\n\n const hasOneLocation = locations.length === 1\n const useSiteVariableSocials = true // false === individual location page json socials\n\n const madeByNuvo = true\n const hasWuwta = socialAccounts.nodes[0].hasWuwta\n const hasStemodonctics = socialAccounts.nodes[0].hasStemodonctics\n\n const getServicesList1 = () => (\n \n \n About\n \n \n Services\n \n \n Contact Us\n \n
\n )\n\n const getServicesList2 = () => (\n \n \n Dr. Seeds\n \n \n Podcast\n \n \n Blogs\n \n
\n )\n\n return (\n \n )\n}\n\nexport default Footer\n","import React from \"react\"\nimport \"./SkipContent.scss\"\n\ntype Props = {\n id: string\n}\n\nconst SkipContent = ({ id }: Props) => {\n return (\n \n Skip to main content\n \n )\n}\n\nexport default SkipContent\n","import React from \"react\"\nimport classNames from \"classnames\"\nimport PropTypes from \"prop-types\"\nimport { graphql, StaticQuery } from \"gatsby\"\nimport { Helmet } from \"react-helmet\"\nimport ComMenu from \"./Menu/ComMenu.js\"\nimport \"../css/main.scss\"\nimport \"../../node_modules/aos/dist/aos.css\"\nimport { config } from \"@fortawesome/fontawesome-svg-core\"\nimport { CloudinaryContext } from \"cloudinary-react\"\nimport Footer from \"../components/footer/Footer\"\nimport { detectIE } from \"../components/Toast/comIEDetect\"\nimport SkipContent from \"./SkipContent/SkipContent\"\n// import ScrollTracker from \"../components/ScrollTracker\"\n\nconfig.autoAddCss = false\n\nclass Layout extends React.Component {\n constructor(props) {\n super(props)\n this.state = {\n showMenu: true,\n browserStatus: false,\n browserName: \"\",\n pageLoaded: false,\n scrollPercentage: 0,\n iPhoneBottomNavVisible: false\n }\n\n this.handleiPhoneScroll = this.handleiPhoneScroll.bind(this)\n }\n\n componentDidMount() {\n const isBrowser = typeof window !== \"undefined\"\n const AOS = isBrowser ? require(\"aos\") : undefined\n\n this.aos = AOS\n this.aos.init({ disable: \"mobile\", once: true, duration: 1200 })\n\n var that = this\n this.setState({\n innerHeight: window.innerHeight\n })\n var version = detectIE()\n if (version === false) {\n this.setState({ browserStatus: true }, () => {\n afterBrowserStatus(that)\n })\n }\n\n function afterBrowserStatus(that) {\n if (that.state.browserStatus) {\n that.setState({ pageLoaded: true })\n }\n }\n this.handleiPhoneScroll()\n }\n\n componentDidUpdate() {\n this.aos.refresh()\n document.documentElement.classList.remove(\"theater-is-open\")\n }\n\n handleiPhoneScroll() {\n let oldHeight = this.state.innerHeight\n if (window.innerHeight > oldHeight) {\n this.setState({\n innerHeight: window.innerHeight,\n iPhoneBottomNavVisible: true\n })\n } else {\n this.setState({\n innerHeight: window.innerHeight,\n iPhoneBottomNavVisible: false\n })\n }\n }\n\n render() {\n return (\n {\n const filterPages = (arr, lang) => {\n return arr\n .filter(\n page =>\n page.node.pageContext.hasThisPage &&\n page.node.pageContext.searchHeading &&\n page.node.pageContext.language === lang\n )\n .map(data => data.node.pageContext)\n }\n\n const esSearchIndex = filterPages(data.allStatefulPages.edges, \"es\")\n const enSearchIndex = filterPages(data.allStatefulPages.edges, \"en\")\n\n const mainClasses = classNames(\n this.props.pageTitle,\n this.props.className,\n this.props.language\n )\n\n const bodyClasses = classNames({\n \"nav-spacer\": this.props.navSpacer\n })\n\n // options: light | dark | gray\n const theme = !this.props.theme ? \"light\" : this.props.theme\n\n return (\n <>\n \n \n {/* */}\n \n \n
\n \n \n {this.props.children}\n
\n\n \n \n
\n \n >\n )\n }}\n />\n )\n }\n}\n\nLayout.propTypes = {\n children: PropTypes.node.isRequired\n}\n\nexport default Layout\n","import React from \"react\"\nimport classNames from \"classnames\"\n\nconst Office = ({\n city,\n gmb,\n heading,\n mode = \"dark\", // dark or light\n state,\n streetName,\n streetNumber,\n zip,\n linkTitle = \"Get directions to our office\"\n}) => {\n const streetFormat = `${streetNumber} ${streetName}`\n const cityStateFormat = `${city}, ${state} ${zip}`\n\n const wrapperClasses = classNames({\n \"office-address\": true,\n [`${mode}`]: true\n })\n\n return (\n \n )\n}\n\nexport default Office\n","import React from \"react\"\nimport classNames from \"classnames\"\nimport { telephoneStrip } from \"../../utils/utils\"\n\nconst Phone = ({\n phoneNumber,\n countryCode = \"1\",\n textOnly,\n className,\n language\n}) => {\n const cleanNumber = telephoneStrip(phoneNumber)\n const telTo = `tel:+${countryCode}${cleanNumber}`\n\n const classes = classNames(className, {\n phonenumber: true,\n phonenumber__link: !textOnly\n })\n\n return (\n <>\n {textOnly ? (\n {phoneNumber}
\n ) : (\n \n {phoneNumber}\n \n )}\n >\n )\n}\n\nexport default Phone\n","import React from \"react\"\nimport classNames from \"classnames\"\n\nconst Email = ({ email, textOnly, className, language }) => {\n const mailTo = `mailto:${email}`\n\n const classes = classNames(className, {\n email: true,\n email__link: !textOnly\n })\n\n return (\n <>\n {textOnly ? (\n {email}
\n ) : (\n \n {email}\n \n )}\n >\n )\n}\n\nexport default Email\n","import React, { Component } from \"react\"\nimport classNames from \"classnames\"\nimport PropTypes from \"prop-types\"\n\nclass GeneralHours extends Component {\n constructor(props) {\n super(props)\n this.state = {\n dateLines: []\n }\n }\n\n componentDidMount() {\n this.sortDays(this.props.locationHours)\n }\n\n sortDays(arr) {\n if (!arr) throw \"No array of days to sort, \" + arr + \" was received.\"\n const groupBy = (items, key) =>\n items.reduce(\n (result, item) => ({\n ...result,\n [item[key]]: [...(result[item[key]] || []), item]\n }),\n {}\n )\n\n let newArr = []\n for (let i = 0; i < arr.length; i++) {\n let obj = arr[i]\n obj.combinedTime = `${obj.startTime}–${obj.endTime}`\n obj.shortWeekDay = whatShortWeekDay(obj.weekDay, this.props.language)\n obj.fullWeekDAy = whatWeekDay(obj.weekDay, this.props.language)\n newArr.push(obj)\n }\n\n const sortedDates = groupBy(newArr, \"combinedTime\")\n\n for (let i = 0; i < sortedDates.length; i++) {\n sortedDates[i].sort((a, b) => (a.weekDay > b.weekDay ? 1 : -1))\n }\n\n let dayLineArr = []\n let combinedTimeObjs = []\n\n for (let key in sortedDates) {\n const obj = sortedDates[key]\n let tempArr = []\n let tempArrFullObj = []\n for (let i = 0; i < obj.length; i++) {\n tempArr.push({\n shortWeekDay: obj[i].shortWeekDay,\n weekDay: obj[i].weekDay\n })\n tempArrFullObj.push(obj[i])\n }\n dayLineArr.push(tempArr)\n combinedTimeObjs.push(tempArrFullObj)\n tempArr = []\n tempArrFullObj = []\n }\n\n let dayLineDays = []\n let dayLineTimes = []\n\n function nonConsecutiveDays() {\n if (allDaysAreConsecutive(dayLineArr)) {\n for (let i = 0; i < dayLineArr.length; i++) {\n dayLineDays.push(joinWithDash(dayLineArr[i]))\n\n let tempDayTimes = combinedTimeObjs[i][0].combinedTime\n dayLineTimes.push(tempDayTimes)\n }\n } else {\n for (let i = 0; i < dayLineArr.length; i++) {\n if (dayLineArr[i].length === 1) {\n dayLineDays.push(dayLineArr[i][0].shortWeekDay + \": \")\n } else if (daysInLineAreConsecutive(dayLineArr[i])) {\n dayLineDays.push(joinWithDash(dayLineArr[i]))\n } else {\n dayLineDays.push(joinWithCommas(dayLineArr[i]))\n }\n\n let tempDayTimes = combinedTimeObjs[i][0].combinedTime\n dayLineTimes.push(tempDayTimes)\n }\n }\n\n let finalDateLines = []\n\n for (let i = 0; i < dayLineDays.length; i++) {\n let obj = {}\n\n obj.days = dayLineDays[i]\n obj.times = dayLineTimes[i]\n finalDateLines.push(obj)\n }\n\n return finalDateLines\n }\n\n // Only one array of days\n function allDaysAreConsecutive(days) {\n if (days.length === 1) {\n return true\n }\n return false\n }\n\n // Join length of consecutive days with dash\n function joinWithDash(dayLineArr) {\n let tempDayLine =\n dayLineArr[0].shortWeekDay +\n \"–\" +\n dayLineArr[dayLineArr.length - 1].shortWeekDay\n tempDayLine += \": \"\n return tempDayLine\n }\n\n // Join non-all consecutive days with dash\n function joinWithCommas(dayLineArr) {\n let tempDayLine = []\n for (let j = 0; j < dayLineArr.length; j++) {\n tempDayLine.push(dayLineArr[j].shortWeekDay)\n }\n tempDayLine = tempDayLine.join(\", \")\n tempDayLine += \": \"\n return tempDayLine\n }\n\n // Check if every day - 1 is equal to the day before\n function daysInLineAreConsecutive(daysObj) {\n let consecutive = true\n for (let j = 1; j < daysObj.length; j++) {\n if (\n parseInt(daysObj[j - 1].weekDay) + 1 !==\n parseInt(daysObj[j].weekDay)\n ) {\n consecutive = false\n }\n }\n return consecutive\n }\n\n // One-off for Mon-Fri, needs to be re-worked\n function allConsecutiveDays() {\n let startDay = combinedTimeObjs[0][0]\n let endDay = combinedTimeObjs[0][0]\n\n for (let i = 0; i < combinedTimeObjs[0].length - 1; i++) {\n if (\n parseInt(combinedTimeObjs[0][i + 1].weekDay) ===\n parseInt(endDay.weekDay) + 1\n ) {\n endDay = combinedTimeObjs[0][i + 1]\n }\n }\n\n let tempDayLine = startDay.shortWeekDay + \"–\" + endDay.shortWeekDay + \": \"\n let tempDayTimes = combinedTimeObjs[0][0].combinedTime\n dayLineDays.push(tempDayLine)\n dayLineTimes.push(tempDayTimes)\n let finalDateLines = []\n let obj = {}\n\n obj.days = dayLineDays[0]\n obj.times = dayLineTimes[0]\n finalDateLines.push(obj)\n\n return finalDateLines\n }\n\n // allConsecutiveDays();\n\n let finalDateLines = nonConsecutiveDays()\n // let finalDateLines = allConsecutiveDays()\n\n function linkConsecutiveDays(days) {}\n\n this.setState({\n dateLines: finalDateLines\n })\n\n function whatWeekDay(date, language) {\n let day = date\n if (language && language === \"es\") {\n switch (day) {\n case \"0\":\n day = \"Domingo\"\n return day\n\n case \"1\":\n day = \"Lunes\"\n return day\n\n case \"2\":\n day = \"Martes\"\n return day\n\n case \"3\":\n day = \"Miércoles\"\n return day\n\n case \"4\":\n day = \"Jueves\"\n return day\n\n case \"5\":\n day = \"Viernes\"\n return day\n\n case \"6\":\n day = \"Sábado\"\n return day\n }\n }\n switch (day) {\n case \"0\":\n day = \"Sunday\"\n return day\n\n case \"1\":\n day = \"Monday\"\n return day\n\n case \"2\":\n day = \"Tuesday\"\n return day\n\n case \"3\":\n day = \"Wednesday\"\n return day\n\n case \"4\":\n day = \"Thursday\"\n return day\n\n case \"5\":\n day = \"Friday\"\n return day\n\n case \"6\":\n day = \"Saturday\"\n return day\n }\n }\n\n function whatShortWeekDay(date, language) {\n let day = date\n if (language && language === \"es\") {\n switch (day) {\n case \"0\":\n day = \"Do\"\n return day\n\n case \"1\":\n day = \"Lu\"\n return day\n\n case \"2\":\n day = \"Ma\"\n return day\n\n case \"3\":\n day = \"Mi\"\n return day\n\n case \"4\":\n day = \"Ju\"\n return day\n\n case \"5\":\n day = \"Vi\"\n return day\n\n case \"6\":\n day = \"Sa\"\n return day\n }\n }\n switch (day) {\n case \"0\":\n day = \"Sun\"\n return day\n\n case \"1\":\n day = \"Mon\"\n return day\n\n case \"2\":\n day = \"Tues\"\n return day\n\n case \"3\":\n day = \"Wed\"\n return day\n\n case \"4\":\n day = \"Thur\"\n return day\n\n case \"5\":\n day = \"Fri\"\n return day\n\n case \"6\":\n day = \"Sat\"\n return day\n }\n }\n }\n\n render() {\n let dateLines = this.state.dateLines.map((line, i) => (\n \n {line.times === \"–\" ? (\n <>>\n ) : (\n \n {line.days}\n {line.times}\n
\n \n )}\n \n ))\n\n const wrapperClass = classNames(this.props.className, {\n \"footer-hours\": this.props.footer,\n \"contact-sidebar-block\": this.props.contact\n })\n\n const paragraphClassName = classNames({\n small: this.props.footer,\n \"contact-hours\": this.props.contact\n })\n\n return (\n \n {this.props.heading &&
{this.props.heading}
}\n
{dateLines}
\n
\n )\n }\n}\n\nconst requiredPropsCheck = (props, propName, componentName) => {\n if (!props.footer && !props.contact) {\n return new Error(\n `One of 'footer' or 'contact' is required by '${componentName}' component.`\n )\n }\n if (props.footer && typeof props.footer !== \"boolean\") {\n return new Error(`'footer' is not a boolean`)\n }\n if (props.contact && typeof props.contact !== \"boolean\") {\n return new Error(`'contact' is not a boolean`)\n }\n}\n\nGeneralHours.propTypes = {\n className: PropTypes.string,\n locationHours: PropTypes.array.isRequired,\n language: PropTypes.string\n}\n\nexport default GeneralHours\n","import { useStaticQuery, graphql } from \"gatsby\"\nimport { telephoneStrip, convertTime12to24 } from \"../utils/utils\"\n\nconst useSchemas = schemaData => {\n const { site, siteVariables, locations } = useStaticQuery(graphql`\n query {\n site {\n siteMetadata {\n title\n siteUrl\n fullPracticeName\n }\n }\n siteVariables: allDataJson(\n filter: { optionsItem: { eq: \"siteVariables\" } }\n ) {\n nodes {\n datePublished\n socialImage\n logo\n clientType\n productontology {\n name\n link\n relatedLinks\n }\n socialAccounts {\n link\n platform\n }\n }\n }\n locations: allLocationsJson(filter: { isSilo: { eq: false } }) {\n nodes {\n locationData {\n locationHours {\n startTime\n weekDay\n endTime\n }\n coords {\n lat\n lng\n }\n areaServed\n stateAbbr\n stateName\n streetName\n streetNumber\n cityName\n cityZip\n phone\n googlePlaceLink\n }\n pageData {\n title\n }\n }\n }\n }\n `)\n const locationsFormatted = locations.nodes.map(l => ({\n ...l.locationData,\n slug: l.pageData.title\n }))\n\n const data = {\n ...schemaData,\n ...site.siteMetadata,\n ...siteVariables.nodes[0],\n locations: locationsFormatted\n }\n\n const clientTypes = {\n oms: \"http://www.productontology.org/id/Oral_and_maxillofacial_surgery\",\n dentist: \"http://www.productontology.org/id/Dentist\",\n ortho: \"http://www.productontology.org/id/Orthodontics\",\n endo: \"http://www.productontology.org/id/Endodontics\",\n plastic: \"http://www.productontology.org/id/Plastic_surgery\"\n }\n\n // @type: \"WebPage\"\n const createWebpageSchema = schema => ({\n \"@type\": \"WebPage\",\n \"@id\": `${schema.siteUrl + schema.path}#webpage`,\n url: schema.siteUrl + schema.path,\n inLanguage: schema.language === \"en\" ? \"en-US\" : null,\n name: schema.metaTitle || schema.fullPracticeName,\n datePublished: schema.datePublished,\n dateModified: schema.dateModified,\n description: schema.description\n })\n\n // @type: \"WebSite\"\n const createWebsiteSchema = schema => ({\n \"@type\": \"WebSite\",\n \"@id\": `${schema.siteUrl}/#website`,\n url: `${schema.siteUrl}/`,\n thumbnailUrl: schema.socialImage,\n name: schema.fullPracticeName,\n potentialAction: {\n \"@type\": \"SearchAction\",\n target: `${schema.siteUrl}/?s={search_term_string}`,\n \"query-input\": \"required name=search_term_string\"\n }\n })\n\n // @type: Organization\n const createOrganizationSchema = schema => {\n let sameAsArr = []\n const googleLinks = schema.locations.map(link => link.googlePlaceLink)\n const socials = schema.socialAccounts.map(link => link.link)\n\n sameAsArr = [...googleLinks, ...socials]\n\n return {\n \"@type\": \"Organization\",\n \"@id\": `${schema.siteUrl}/`,\n name: schema.fullPracticeName,\n url: `${schema.siteUrl}/`,\n logo: schema.logo,\n sameAs: sameAsArr\n }\n }\n\n // @type: localBusiness\n const createBusinessSchema = (schema, location, isSingle) => {\n // weekday info map\n const weekdays = {\n 0: { abbr: \"Su\", order: 7 },\n 1: { abbr: \"Mo\", order: 1 },\n 2: { abbr: \"Tu\", order: 2 },\n 3: { abbr: \"We\", order: 3 },\n 4: { abbr: \"Th\", order: 4 },\n 5: { abbr: \"Fr\", order: 5 },\n 6: { abbr: \"Sa\", order: 6 }\n }\n const h = location.locationHours\n\n // loop 7 times AKA 1 week\n for (let i = 0; i <= 6; i++) {\n // check if location has hours set for a day in 'weekdays' map\n const find = h.find(day => day.weekDay == i)\n\n if (!find) {\n // if no hours, set them the hours to 00000\n weekdays[i].abbr += \" 00:00-00:00\"\n } else {\n // else format hours to 24hour format\n const hours = `${convertTime12to24(find.startTime)}-${convertTime12to24(\n find.endTime\n )}`\n weekdays[find.weekDay].abbr += ` ${hours}`\n }\n }\n\n // sort hours by weekday. start on monday, end on sunday\n const sortedHours = Object.values(weekdays)\n .sort((a, b) => a.order - b.order)\n .map(days => days.abbr)\n\n // extra schema properties if a single location page\n let singleLocationValues = {}\n if (isSingle) {\n singleLocationValues = {\n geo: {\n \"@type\": \"GeoCoordinates\",\n latitude: location.coords.lat,\n longitude: location.coords.lng\n },\n areaServed: location.areaServed,\n priceRange: \"unset\"\n }\n }\n\n return {\n \"@type\": \"LocalBusiness\",\n // additionalType: [clientTypes[schema.clientType]],\n parentOrganization: {\n name: schema.fullPracticeName,\n \"@id\": `${schema.siteUrl}/#organization`\n },\n image: schema.socialImage,\n priceRange: \"unset\",\n name: `${schema.fullPracticeName} - ${location.cityName}`,\n address: {\n \"@type\": \"PostalAddress\",\n streetAddress: `${location.streetNumber} ${location.streetName}`,\n addressLocality: location.cityName,\n addressRegion: location.stateAbbr,\n postalCode: location.cityZip,\n telephone: `+1${telephoneStrip(location.phone)}`\n },\n openingHours: sortedHours,\n hasmap: location.googlePlaceLink,\n ...singleLocationValues\n }\n }\n\n // @type: MedicalProcedure\n const createMedicalProcedureSchema = schema => {\n const medical = {}\n\n // filter all productontology objects to use the ones single procedure page is asking for\n const findMatches = schema.productontology.filter(item =>\n schema.productontologyRelations.includes(item.name)\n )\n\n if (findMatches && findMatches.length > 0) {\n const types = []\n const related = []\n\n // loop through matches and push links to arrays\n findMatches.forEach(item => {\n types.push(item.link)\n if (item.relatedLinks) {\n item.relatedLinks.forEach(link => {\n related.push(link)\n })\n }\n })\n\n // create additionalType key/value\n medical.additionalType = types.length === 1 ? types[0] : types\n\n // create sameAs key/value if there are related links\n if (related.length > 0) {\n medical.sameAs = related\n }\n }\n\n return {\n \"@context\": \"https://schema.org/\",\n \"@type\": \"MedicalProcedure\",\n name: schema.procedureName,\n url: `${schema.siteUrl}${schema.path}`,\n image: schema.socialImage,\n description: schema.pageContent,\n ...medical\n }\n }\n\n // loop through schema presets and push final schemas into array\n const schemas = []\n\n if (data.presets && data.presets.length > 0) {\n // eslint-disable-next-line\n data.presets.forEach(type => {\n switch (type) {\n case \"webpage\":\n schemas.push(createWebpageSchema(data))\n break\n\n case \"website\":\n schemas.push(createWebsiteSchema(data))\n break\n\n case \"organization\":\n schemas.push(createOrganizationSchema(data))\n break\n\n case \"allLocations\":\n data.locations.forEach(location => {\n schemas.push(createBusinessSchema(data, location))\n })\n break\n\n case \"singleLocation\": {\n const find = data.locations.find(\n location =>\n `/${location.slug}` === `/${data.procedureLocation}` ||\n `/${location.slug}` === data.path\n )\n if (find) {\n schemas.push(createBusinessSchema(data, find, true))\n }\n break\n }\n\n case \"medicalQuery\":\n schemas.push(createMedicalProcedureSchema(data))\n break\n\n case \"singleMedical\":\n schemas.push(createMedicalProcedureSchema(data, true))\n break\n\n case \"custom\":\n schemas.push(data.customSchema)\n break\n default:\n return []\n }\n })\n }\n\n return {\n schemas\n }\n}\n\nexport default useSchemas\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport Helmet from \"react-helmet\"\nimport { useStaticQuery, graphql } from \"gatsby\"\nimport useSchemas from \"../hooks/useSchemas\"\n\nfunction SEO({\n description,\n lang,\n meta,\n title,\n pathname,\n robots,\n preload,\n youtubeSchemas = [],\n schemaData\n}) {\n const { site, schema, social } = useStaticQuery(\n graphql`\n query {\n site {\n siteMetadata {\n title\n description\n siteUrl\n fullPracticeName\n }\n }\n schema: allDataJson(filter: { schemaGeneral: { ne: null } }) {\n nodes {\n schemaGeneral\n }\n }\n social: allDataJson(filter: { optionsItem: { eq: \"siteVariables\" } }) {\n nodes {\n socialImage\n }\n }\n }\n `\n )\n\n const { schemas } = useSchemas(schemaData)\n const combinedSchemas = schemas.concat(youtubeSchemas)\n\n let schemaJson = JSON.stringify(\n {\n \"@context\": {\n \"@vocab\": \"https://schema.org/\"\n },\n \"@graph\": combinedSchemas\n },\n null,\n 2\n )\n\n const socialImage = social.nodes[0].socialImage\n\n const metaRobots = robots\n\n const metaDescription = description || site.siteMetadata.description\n\n const siteUrl = site.siteMetadata.siteUrl\n\n const practiceName = site.siteMetadata.fullPracticeName\n\n return (\n \n {preload &&\n preload.map(item => (\n \n ))}\n\n {combinedSchemas.length > 0 && (\n \n )}\n \n )\n}\n\nSEO.defaultProps = {\n lang: `en`,\n meta: [],\n description: ``\n}\n\nSEO.propTypes = {\n description: PropTypes.string,\n lang: PropTypes.string,\n meta: PropTypes.arrayOf(PropTypes.object),\n title: PropTypes.string.isRequired\n}\n\nexport default SEO\n","// CMS utils\nexport function getClientCloudinaryMedia(fileType, keyword, antiKeyword) {\n var cldImages = require(\"../_cloudinary/cloudinary.json\")\n let cldImagesFinal = []\n\n if (fileType) {\n for (let i = 0; i < cldImages.length; i++) {\n if (cldImages[i].format === fileType) {\n cldImagesFinal.push(cldImages[i].public_id)\n }\n }\n } else if (keyword) {\n for (let i = 0; i < cldImages.length; i++) {\n if (cldImages[i].public_id.includes(keyword)) {\n if (antiKeyword && !cldImages[i].public_id.includes(antiKeyword)) {\n cldImagesFinal.push(cldImages[i].public_id)\n } else if (!antiKeyword) {\n cldImagesFinal.push(cldImages[i].public_id)\n }\n }\n }\n } else {\n for (let i = 0; i < cldImages.length; i++) {\n cldImagesFinal.push(cldImages[i].public_id)\n }\n }\n return cldImagesFinal\n}\n\nexport function getPostObj(\n pageContext,\n englishNodes,\n spanishNodes,\n russianNodes\n) {\n let post\n let language\n\n try {\n post = setEnglishOrSpanishPost(\n pageContext.language,\n englishNodes,\n spanishNodes,\n russianNodes\n )\n language = pageContext.language\n } catch (err) {\n console.warn(err)\n post = englishNodes\n language = \"en\"\n }\n\n return { post: post, language: language }\n}\n\nfunction setEnglishOrSpanishPost(\n language,\n englishNodes,\n spanishNodes,\n russianNodes\n) {\n let post\n\n switch (language) {\n case \"en\":\n post = englishNodes\n break\n case \"es\":\n post = spanishNodes\n break\n case \"ru\":\n post = russianNodes\n break\n default:\n post = englishNodes\n }\n\n return post\n}\n\n// General Utils\nexport function sortArchive(archiveArray) {\n archiveArray.sort((a, b) => (a.order > b.order ? 1 : -1))\n}\n\nexport function shuffleArray(array) {\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1))\n ;[array[i], array[j]] = [array[j], array[i]]\n }\n}\n\nexport function getMonthYearFromStrings(year, month, language) {\n var localeLanguage\n if (language === \"es\") {\n localeLanguage = \"es-ES\"\n }\n const yearInt = parseInt(year)\n const monthInt = parseInt(month) - 1\n const date = new Date(yearInt, monthInt) // 2009-11-10\n const monthStr = date.toLocaleString(localeLanguage, { month: \"long\" })\n return capitalizeFirstLetter(monthStr) + \" \" + yearInt\n}\n\nexport function capitalizeFirstLetter(s) {\n if (typeof s !== \"string\") return \"\"\n return s.charAt(0).toUpperCase() + s.slice(1)\n}\n\nexport function getUnique(startingArray, targetProperty, valueToCompare) {\n let properties = []\n for (let i = 0; i < startingArray.length; i++) {\n properties.push(startingArray[i][targetProperty])\n }\n if (properties.includes(valueToCompare)) {\n return false\n }\n return true\n}\n\nexport function getUnrelatedReviews(targetArray, allElements, targetProperty) {\n var elementsWithTargetProperty = []\n var nonMatching = []\n\n elementsWithTargetProperty = getOnlyElementsWithTargetProperty(\n targetArray,\n targetProperty\n )\n nonMatching = getNonMatchingObjectsFromAllElements(\n elementsWithTargetProperty,\n allElements,\n targetProperty\n )\n return nonMatching\n}\n\nfunction getOnlyElementsWithTargetProperty(array, targetProperty) {\n var elementsWithTargetProperty = []\n for (let i = 0; i < array.length; i++) {\n if (array[i] && array[i].title) {\n elementsWithTargetProperty.push(array[i][targetProperty])\n }\n }\n return elementsWithTargetProperty\n}\nfunction getNonMatchingObjectsFromAllElements(\n elementsWithTargetProperty,\n allElements,\n targetProperty\n) {\n var nonMatching = []\n for (let i = 0; i < allElements.length; i++) {\n if (\n elementsWithTargetProperty.includes(allElements[i][targetProperty]) ===\n false\n ) {\n nonMatching.push(allElements[i])\n }\n }\n return nonMatching\n}\n\nexport function sortReviewsByDate(reviews) {\n reviews.sort(function (a, b) {\n var aYear = a.monthYear.year\n var bYear = b.monthYear.year\n var aMonth = a.monthYear.month\n var bMonth = b.monthYear.month\n\n return bYear - aYear || bMonth - aMonth\n })\n return reviews\n}\n\n// Procedures functions\nexport function getFeaturedProceduresAndOtherProceduresObject(procedures) {\n var featuredProcedures = []\n var otherProcedures = []\n for (let i = 0; i < procedures.length; i++) {\n if (procedures[i].procedureLevel === \"featured\") {\n featuredProcedures.push(procedures[i])\n } else {\n otherProcedures.push(procedures[i])\n }\n }\n return { featuredProcedures, otherProcedures }\n}\n\nexport function getHearFromHeadingAndBlurbObject(\n procedure,\n originalReviewCount\n) {\n var heading\n var blurb\n\n if (isFacewallTextGeneric(procedure, originalReviewCount)) {\n heading = \"Hear From Our Patients\"\n blurb = \"\"\n } else {\n heading = \"Hear From \".concat(\n removeRball(procedure.nameSingular),\n \" Patients\"\n )\n if (procedure.nameSingular.toLowerCase() === \"wisdom tooth removal\") {\n heading = \"Hear From Wisdom Teeth Removal Patients\"\n }\n blurb =\n \"These patients can tell you about their firsthand experience undergoing \".concat(\n removeRball(procedure.nameSingular).toLowerCase(),\n \" at our office.\"\n )\n if (procedure.nameSingular.toLowerCase() === \"dental implant\") {\n blurb =\n \"These patients can tell you about their firsthand experience undergoing dental implant treatment at our office.\"\n }\n if (procedure.nameSingular.toLowerCase() === \"impacted canines\") {\n blurb =\n \"These patients can tell you about their firsthand experience undergoing impacted canine treatment at our office.\"\n }\n if (procedure.nameSingular.toLowerCase() === \"oral pathology\") {\n blurb =\n \"These patients can tell you about their firsthand experience undergoing oral pathology treatment at our office.\"\n }\n if (procedure.nameSingular.toLowerCase().includes(\"all-on-4\")) {\n let nameSingular = removeRball(procedure.nameSingular).toLowerCase()\n nameSingular = capitalizeFirstLetter(nameSingular)\n\n blurb =\n \"These patients can tell you about their firsthand experience undergoing \" +\n nameSingular +\n \" at our office.\"\n }\n }\n\n return { heading, blurb }\n}\nexport function isFacewallTextGeneric(procedure, originalReviewCount) {\n // 4 because that is the number of reviews possible in the current FixedFacewall\n if (procedure.nameSingular === null || originalReviewCount < 4) {\n return true\n }\n return false\n}\n\nexport function createHtml(html) {\n return { __html: html }\n}\n\nexport function toCamelCase(string) {\n string = string.trim()\n try {\n let out = \"\"\n string.split(\" \").forEach((el, idx) => {\n let add = el.toLowerCase()\n out += idx === 0 ? add : add[0].toUpperCase() + add.slice(1)\n })\n return out\n } catch (err) {}\n}\n\nexport function splitCamelCaseToString(string) {\n return string.replace(/([A-Z])/g, \" $1\").replace(/^./, function (str) {\n return str.toUpperCase()\n })\n}\n\n//Turns query string like hello=1&another=2 into object {hello: 1, another: 2}\nexport function parseSearchQuery(queryString) {\n var query = {}\n var pairs = (\n queryString[0] === \"?\" ? queryString.substr(1) : queryString\n ).split(\"&\")\n for (var i = 0; i < pairs.length; i++) {\n var pair = pairs[i].split(\"=\")\n query[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1] || \"\")\n }\n return query\n}\n\nexport function pluralizeName(name) {\n const lastLetter = name.charAt(name.length - 1)\n if (lastLetter.toLowerCase() === \"s\") {\n return `${name}'`\n } else {\n return `${name}'s`\n }\n}\n\nexport function telephoneStrip(phone) {\n return phone.replace(/[^\\d]/g, \"\")\n}\n\nexport function wrapSup(string) {\n return string.replace(/((?!\\s*))®((?!\\s*<\\/sup>))/gi, \"®\")\n}\n\nexport function removeRball(string) {\n return string.replace(/((?!\\s*))®((?!\\s*<\\/sup>))/gi, \"\")\n}\n\n// Find variables in strings and replace them\n// Variables must be wrapped in curly brackets. ex. {MY_VARIABLE}\n// string = string\n// obj = object of matching variables\n// {\n// MY_VARIABLE: \"replaces variable with this text\"\n// }\nexport function replaceStringVars(string, obj) {\n let s = string\n for (var prop in obj) {\n s = s.replace(new RegExp(\"{\" + prop + \"}\", \"g\"), obj[prop])\n }\n return s\n}\n\n// Removes https, slashes, www from URLs\nexport function cleanURL(url) {\n return url.replace(/^(?:https?:\\/\\/)?(?:www\\.)?/i, \"\").split(\"/\")[0]\n}\n\nexport function convertTime12to24(time12h) {\n const [time, modifier] = time12h.split(\" \")\n\n let [hours, minutes] = time.split(\":\")\n\n if (hours === \"12\") {\n hours = \"00\"\n }\n\n if (modifier === \"PM\") {\n hours = parseInt(hours, 10) + 12\n }\n\n return `${hours}:${minutes}`\n}\n\nexport const toTitleCase = str => {\n return str.replace(/(^|\\s)\\S/g, function (t) {\n return t.toUpperCase()\n })\n}\n\nexport const toSentenceCase = str => {\n return str.replace(/\\.\\s+([a-z])[^\\.]|^(\\s*[a-z])[^\\.]/g, s =>\n s.replace(/([a-z])/, s => s.toUpperCase())\n )\n}\n","\nmodule.exports = function load (src, opts, cb) {\n var head = document.head || document.getElementsByTagName('head')[0]\n var script = document.createElement('script')\n\n if (typeof opts === 'function') {\n cb = opts\n opts = {}\n }\n\n opts = opts || {}\n cb = cb || function() {}\n\n script.type = opts.type || 'text/javascript'\n script.charset = opts.charset || 'utf8';\n script.async = 'async' in opts ? !!opts.async : true\n script.src = src\n\n if (opts.attrs) {\n setAttributes(script, opts.attrs)\n }\n\n if (opts.text) {\n script.text = '' + opts.text\n }\n\n var onend = 'onload' in script ? stdOnEnd : ieOnEnd\n onend(script, cb)\n\n // some good legacy browsers (firefox) fail the 'in' detection above\n // so as a fallback we always set onload\n // old IE will ignore this and new IE will set onload\n if (!script.onload) {\n stdOnEnd(script, cb);\n }\n\n head.appendChild(script)\n}\n\nfunction setAttributes(script, attrs) {\n for (var attr in attrs) {\n script.setAttribute(attr, attrs[attr]);\n }\n}\n\nfunction stdOnEnd (script, cb) {\n script.onload = function () {\n this.onerror = this.onload = null\n cb(null, script)\n }\n script.onerror = function () {\n // this.onload = null here is necessary\n // because even IE9 works not like others\n this.onerror = this.onload = null\n cb(new Error('Failed to load ' + this.src), script)\n }\n}\n\nfunction ieOnEnd (script, cb) {\n script.onreadystatechange = function () {\n if (this.readyState != 'complete' && this.readyState != 'loaded') return\n this.onreadystatechange = null\n cb(null, script) // there is no way to catch loading errors in IE8\n }\n}\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n","/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arrayIncludesWith;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction asciiToArray(string) {\n return string.split('');\n}\n\nmodule.exports = asciiToArray;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignMergeValue;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n arrayMap = require('./_arrayMap'),\n baseUnary = require('./_baseUnary'),\n cacheHas = require('./_cacheHas');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\nfunction baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseDifference;\n","/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n","var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n","var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n","var arrayFilter = require('./_arrayFilter'),\n isFunction = require('./isFunction');\n\n/**\n * The base implementation of `_.functions` which creates an array of\n * `object` function property names filtered from `props`.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} props The property names to filter.\n * @returns {Array} Returns the function names.\n */\nfunction baseFunctions(object, props) {\n return arrayFilter(props, function(key) {\n return isFunction(object[key]);\n });\n}\n\nmodule.exports = baseFunctions;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIsNaN = require('./_baseIsNaN'),\n strictIndexOf = require('./_strictIndexOf');\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","var Stack = require('./_Stack'),\n assignMergeValue = require('./_assignMergeValue'),\n baseFor = require('./_baseFor'),\n baseMergeDeep = require('./_baseMergeDeep'),\n isObject = require('./isObject'),\n keysIn = require('./keysIn'),\n safeGet = require('./_safeGet');\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\nmodule.exports = baseMerge;\n","var assignMergeValue = require('./_assignMergeValue'),\n cloneBuffer = require('./_cloneBuffer'),\n cloneTypedArray = require('./_cloneTypedArray'),\n copyArray = require('./_copyArray'),\n initCloneObject = require('./_initCloneObject'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isArrayLikeObject = require('./isArrayLikeObject'),\n isBuffer = require('./isBuffer'),\n isFunction = require('./isFunction'),\n isObject = require('./isObject'),\n isPlainObject = require('./isPlainObject'),\n isTypedArray = require('./isTypedArray'),\n safeGet = require('./_safeGet'),\n toPlainObject = require('./toPlainObject');\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\nmodule.exports = baseMergeDeep;\n","var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n","/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\nmodule.exports = baseSlice;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var arrayMap = require('./_arrayMap');\n\n/**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\nfunction baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n}\n\nmodule.exports = baseValues;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var baseSlice = require('./_baseSlice');\n\n/**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\nfunction castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n}\n\nmodule.exports = castSlice;\n","var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the last unmatched string symbol.\n */\nfunction charsEndIndex(strSymbols, chrSymbols) {\n var index = strSymbols.length;\n\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n}\n\nmodule.exports = charsEndIndex;\n","var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the first unmatched string symbol.\n */\nfunction charsStartIndex(strSymbols, chrSymbols) {\n var index = -1,\n length = strSymbols.length;\n\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n}\n\nmodule.exports = charsStartIndex;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var baseRest = require('./_baseRest'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\nmodule.exports = createAssigner;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsZWJ = '\\\\u200d';\n\n/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\nvar reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n/**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\nfunction hasUnicode(string) {\n return reHasUnicode.test(string);\n}\n\nmodule.exports = hasUnicode;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","var eq = require('./eq'),\n isArrayLike = require('./isArrayLike'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject');\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\nmodule.exports = safeGet;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n","var asciiToArray = require('./_asciiToArray'),\n hasUnicode = require('./_hasUnicode'),\n unicodeToArray = require('./_unicodeToArray');\n\n/**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n}\n\nmodule.exports = stringToArray;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsAstral = '[' + rsAstralRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\nvar reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n/**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction unicodeToArray(string) {\n return string.match(reUnicode) || [];\n}\n\nmodule.exports = unicodeToArray;\n","var assignValue = require('./_assignValue'),\n copyObject = require('./_copyObject'),\n createAssigner = require('./_createAssigner'),\n isArrayLike = require('./isArrayLike'),\n isPrototype = require('./_isPrototype'),\n keys = require('./keys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\nvar assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n});\n\nmodule.exports = assign;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\nfunction compact(array) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = compact;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","var baseDifference = require('./_baseDifference'),\n baseFlatten = require('./_baseFlatten'),\n baseRest = require('./_baseRest'),\n isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\nvar difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n});\n\nmodule.exports = difference;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseFunctions = require('./_baseFunctions'),\n keys = require('./keys');\n\n/**\n * Creates an array of function property names from own enumerable properties\n * of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functionsIn\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functions(new Foo);\n * // => ['a', 'b']\n */\nfunction functions(object) {\n return object == null ? [] : baseFunctions(object, keys(object));\n}\n\nmodule.exports = functions;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","var baseIndexOf = require('./_baseIndexOf'),\n isArrayLike = require('./isArrayLike'),\n isString = require('./isString'),\n toInteger = require('./toInteger'),\n values = require('./values');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\nfunction includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n}\n\nmodule.exports = includes;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var isArrayLike = require('./isArrayLike'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nmodule.exports = isArrayLikeObject;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var isObjectLike = require('./isObjectLike'),\n isPlainObject = require('./isPlainObject');\n\n/**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('');\n * // => false\n */\nfunction isElement(value) {\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n}\n\nmodule.exports = isElement;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseGetTag = require('./_baseGetTag'),\n isArray = require('./isArray'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nmodule.exports = isString;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","var baseMerge = require('./_baseMerge'),\n createAssigner = require('./_createAssigner');\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\n\nmodule.exports = merge;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\nmodule.exports = toPlainObject;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","var baseToString = require('./_baseToString'),\n baseTrim = require('./_baseTrim'),\n castSlice = require('./_castSlice'),\n charsEndIndex = require('./_charsEndIndex'),\n charsStartIndex = require('./_charsStartIndex'),\n stringToArray = require('./_stringToArray'),\n toString = require('./toString');\n\n/**\n * Removes leading and trailing whitespace or specified characters from `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to trim.\n * @param {string} [chars=whitespace] The characters to trim.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the trimmed string.\n * @example\n *\n * _.trim(' abc ');\n * // => 'abc'\n *\n * _.trim('-_-abc-_-', '_-');\n * // => 'abc'\n *\n * _.map([' foo ', ' bar '], _.trim);\n * // => ['foo', 'bar']\n */\nfunction trim(string, chars, guard) {\n string = toString(string);\n if (string && (guard || chars === undefined)) {\n return baseTrim(string);\n }\n if (!string || !(chars = baseToString(chars))) {\n return string;\n }\n var strSymbols = stringToArray(string),\n chrSymbols = stringToArray(chars),\n start = charsStartIndex(strSymbols, chrSymbols),\n end = charsEndIndex(strSymbols, chrSymbols) + 1;\n\n return castSlice(strSymbols, start, end).join('');\n}\n\nmodule.exports = trim;\n","var baseValues = require('./_baseValues'),\n keys = require('./keys');\n\n/**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\nfunction values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n}\n\nmodule.exports = values;\n","// Generated by CoffeeScript 1.12.2\n(function() {\n var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;\n\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() {\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\n}).call(this);\n\n//# sourceMappingURL=performance-now.js.map\n","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]\n\nfor(var i = 0; !raf && i < vendors.length; i++) {\n raf = root[vendors[i] + 'Request' + suffix]\n caf = root[vendors[i] + 'Cancel' + suffix]\n || 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\n raf = function(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 for(var i = 0; i < cp.length; i++) {\n if(!cp[i].cancelled) {\n try{\n cp[i].callback(last)\n } catch(e) {\n setTimeout(function() { throw e }, 0)\n }\n }\n }\n }, Math.round(next))\n }\n queue.push({\n handle: ++id,\n callback: callback,\n cancelled: false\n })\n return id\n }\n\n caf = function(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}\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}\n","'use strict';\n\nvar isArray = Array.isArray;\nvar keyList = Object.keys;\nvar hasProp = Object.prototype.hasOwnProperty;\nvar hasElementType = typeof Element !== 'undefined';\n\nfunction equal(a, b) {\n // fast-deep-equal index.js 2.0.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n var arrA = isArray(a)\n , arrB = isArray(b)\n , i\n , length\n , key;\n\n if (arrA && arrB) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n if (arrA != arrB) return false;\n\n var dateA = a instanceof Date\n , dateB = b instanceof Date;\n if (dateA != dateB) return false;\n if (dateA && dateB) return a.getTime() == b.getTime();\n\n var regexpA = a instanceof RegExp\n , regexpB = b instanceof RegExp;\n if (regexpA != regexpB) return false;\n if (regexpA && regexpB) return a.toString() == b.toString();\n\n var keys = keyList(a);\n length = keys.length;\n\n if (length !== keyList(b).length)\n return false;\n\n for (i = length; i-- !== 0;)\n if (!hasProp.call(b, keys[i])) return false;\n // end fast-deep-equal\n\n // start react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element && b instanceof Element)\n return a === b;\n\n // custom handling for React\n for (i = length; i-- !== 0;) {\n key = keys[i];\n if (key === '_owner' && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner.\n // _owner contains circular references\n // and is not needed when comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of a react element\n continue;\n } else {\n // all other properties should be traversed as usual\n if (!equal(a[key], b[key])) return false;\n }\n }\n // end react-fast-compare\n\n // fast-deep-equal index.js 2.0.1\n return true;\n }\n\n return a !== a && b !== b;\n}\n// end fast-deep-equal\n\nmodule.exports = function exportedEqual(a, b) {\n try {\n return equal(a, b);\n } catch (error) {\n if ((error.message && error.message.match(/stack|recursion/i)) || (error.number === -2146828260)) {\n // warn on circular references, don't crash\n // browsers give this different errors name and messages:\n // chrome/safari: \"RangeError\", \"Maximum call stack size exceeded\"\n // firefox: \"InternalError\", too much recursion\"\n // edge: \"Error\", \"Out of stack space\"\n console.warn('Warning: react-fast-compare does not handle circular references.', error.name, error.message);\n return false;\n }\n // some other error. we should definitely know about these\n throw error;\n }\n};\n","exports.__esModule = true;\nexports.Helmet = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require(\"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require(\"prop-types\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _reactSideEffect = require(\"react-side-effect\");\n\nvar _reactSideEffect2 = _interopRequireDefault(_reactSideEffect);\n\nvar _reactFastCompare = require(\"react-fast-compare\");\n\nvar _reactFastCompare2 = _interopRequireDefault(_reactFastCompare);\n\nvar _HelmetUtils = require(\"./HelmetUtils.js\");\n\nvar _HelmetConstants = require(\"./HelmetConstants.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Helmet = function Helmet(Component) {\n var _class, _temp;\n\n return _temp = _class = function (_React$Component) {\n _inherits(HelmetWrapper, _React$Component);\n\n function HelmetWrapper() {\n _classCallCheck(this, HelmetWrapper);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n HelmetWrapper.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n return !(0, _reactFastCompare2.default)(this.props, nextProps);\n };\n\n HelmetWrapper.prototype.mapNestedChildrenToProps = function mapNestedChildrenToProps(child, nestedChildren) {\n if (!nestedChildren) {\n return null;\n }\n\n switch (child.type) {\n case _HelmetConstants.TAG_NAMES.SCRIPT:\n case _HelmetConstants.TAG_NAMES.NOSCRIPT:\n return {\n innerHTML: nestedChildren\n };\n\n case _HelmetConstants.TAG_NAMES.STYLE:\n return {\n cssText: nestedChildren\n };\n }\n\n throw new Error(\"<\" + child.type + \" /> elements are self-closing and can not contain children. Refer to our API for more information.\");\n };\n\n HelmetWrapper.prototype.flattenArrayTypeChildren = function flattenArrayTypeChildren(_ref) {\n var _extends2;\n\n var child = _ref.child,\n arrayTypeChildren = _ref.arrayTypeChildren,\n newChildProps = _ref.newChildProps,\n nestedChildren = _ref.nestedChildren;\n\n return _extends({}, arrayTypeChildren, (_extends2 = {}, _extends2[child.type] = [].concat(arrayTypeChildren[child.type] || [], [_extends({}, newChildProps, this.mapNestedChildrenToProps(child, nestedChildren))]), _extends2));\n };\n\n HelmetWrapper.prototype.mapObjectTypeChildren = function mapObjectTypeChildren(_ref2) {\n var _extends3, _extends4;\n\n var child = _ref2.child,\n newProps = _ref2.newProps,\n newChildProps = _ref2.newChildProps,\n nestedChildren = _ref2.nestedChildren;\n\n switch (child.type) {\n case _HelmetConstants.TAG_NAMES.TITLE:\n return _extends({}, newProps, (_extends3 = {}, _extends3[child.type] = nestedChildren, _extends3.titleAttributes = _extends({}, newChildProps), _extends3));\n\n case _HelmetConstants.TAG_NAMES.BODY:\n return _extends({}, newProps, {\n bodyAttributes: _extends({}, newChildProps)\n });\n\n case _HelmetConstants.TAG_NAMES.HTML:\n return _extends({}, newProps, {\n htmlAttributes: _extends({}, newChildProps)\n });\n }\n\n return _extends({}, newProps, (_extends4 = {}, _extends4[child.type] = _extends({}, newChildProps), _extends4));\n };\n\n HelmetWrapper.prototype.mapArrayTypeChildrenToProps = function mapArrayTypeChildrenToProps(arrayTypeChildren, newProps) {\n var newFlattenedProps = _extends({}, newProps);\n\n Object.keys(arrayTypeChildren).forEach(function (arrayChildName) {\n var _extends5;\n\n newFlattenedProps = _extends({}, newFlattenedProps, (_extends5 = {}, _extends5[arrayChildName] = arrayTypeChildren[arrayChildName], _extends5));\n });\n\n return newFlattenedProps;\n };\n\n HelmetWrapper.prototype.warnOnInvalidChildren = function warnOnInvalidChildren(child, nestedChildren) {\n if (process.env.NODE_ENV !== \"production\") {\n if (!_HelmetConstants.VALID_TAG_NAMES.some(function (name) {\n return child.type === name;\n })) {\n if (typeof child.type === \"function\") {\n return (0, _HelmetUtils.warn)(\"You may be attempting to nest components within each other, which is not allowed. Refer to our API for more information.\");\n }\n\n return (0, _HelmetUtils.warn)(\"Only elements types \" + _HelmetConstants.VALID_TAG_NAMES.join(\", \") + \" are allowed. Helmet does not support rendering <\" + child.type + \"> elements. Refer to our API for more information.\");\n }\n\n if (nestedChildren && typeof nestedChildren !== \"string\" && (!Array.isArray(nestedChildren) || nestedChildren.some(function (nestedChild) {\n return typeof nestedChild !== \"string\";\n }))) {\n throw new Error(\"Helmet expects a string as a child of <\" + child.type + \">. Did you forget to wrap your children in braces? ( <\" + child.type + \">{``}\" + child.type + \"> ) Refer to our API for more information.\");\n }\n }\n\n return true;\n };\n\n HelmetWrapper.prototype.mapChildrenToProps = function mapChildrenToProps(children, newProps) {\n var _this2 = this;\n\n var arrayTypeChildren = {};\n\n _react2.default.Children.forEach(children, function (child) {\n if (!child || !child.props) {\n return;\n }\n\n var _child$props = child.props,\n nestedChildren = _child$props.children,\n childProps = _objectWithoutProperties(_child$props, [\"children\"]);\n\n var newChildProps = (0, _HelmetUtils.convertReactPropstoHtmlAttributes)(childProps);\n\n _this2.warnOnInvalidChildren(child, nestedChildren);\n\n switch (child.type) {\n case _HelmetConstants.TAG_NAMES.LINK:\n case _HelmetConstants.TAG_NAMES.META:\n case _HelmetConstants.TAG_NAMES.NOSCRIPT:\n case _HelmetConstants.TAG_NAMES.SCRIPT:\n case _HelmetConstants.TAG_NAMES.STYLE:\n arrayTypeChildren = _this2.flattenArrayTypeChildren({\n child: child,\n arrayTypeChildren: arrayTypeChildren,\n newChildProps: newChildProps,\n nestedChildren: nestedChildren\n });\n break;\n\n default:\n newProps = _this2.mapObjectTypeChildren({\n child: child,\n newProps: newProps,\n newChildProps: newChildProps,\n nestedChildren: nestedChildren\n });\n break;\n }\n });\n\n newProps = this.mapArrayTypeChildrenToProps(arrayTypeChildren, newProps);\n return newProps;\n };\n\n HelmetWrapper.prototype.render = function render() {\n var _props = this.props,\n children = _props.children,\n props = _objectWithoutProperties(_props, [\"children\"]);\n\n var newProps = _extends({}, props);\n\n if (children) {\n newProps = this.mapChildrenToProps(children, newProps);\n }\n\n return _react2.default.createElement(Component, newProps);\n };\n\n _createClass(HelmetWrapper, null, [{\n key: \"canUseDOM\",\n\n\n // Component.peek comes from react-side-effect:\n // For testing, you may use a static peek() method available on the returned component.\n // It lets you get the current state without resetting the mounted instance stack.\n // Don’t use it for anything other than testing.\n\n /**\n * @param {Object} base: {\"target\": \"_blank\", \"href\": \"http://mysite.com/\"}\n * @param {Object} bodyAttributes: {\"className\": \"root\"}\n * @param {String} defaultTitle: \"Default Title\"\n * @param {Boolean} defer: true\n * @param {Boolean} encodeSpecialCharacters: true\n * @param {Object} htmlAttributes: {\"lang\": \"en\", \"amp\": undefined}\n * @param {Array} link: [{\"rel\": \"canonical\", \"href\": \"http://mysite.com/example\"}]\n * @param {Array} meta: [{\"name\": \"description\", \"content\": \"Test description\"}]\n * @param {Array} noscript: [{\"innerHTML\": \"
console.log(newState)\"\n * @param {Array} script: [{\"type\": \"text/javascript\", \"src\": \"http://mysite.com/js/test.js\"}]\n * @param {Array} style: [{\"type\": \"text/css\", \"cssText\": \"div { display: block; color: blue; }\"}]\n * @param {String} title: \"Title\"\n * @param {Object} titleAttributes: {\"itemprop\": \"name\"}\n * @param {String} titleTemplate: \"MySite.com - %s\"\n */\n set: function set(canUseDOM) {\n Component.canUseDOM = canUseDOM;\n }\n }]);\n\n return HelmetWrapper;\n }(_react2.default.Component), _class.propTypes = {\n base: _propTypes2.default.object,\n bodyAttributes: _propTypes2.default.object,\n children: _propTypes2.default.oneOfType([_propTypes2.default.arrayOf(_propTypes2.default.node), _propTypes2.default.node]),\n defaultTitle: _propTypes2.default.string,\n defer: _propTypes2.default.bool,\n encodeSpecialCharacters: _propTypes2.default.bool,\n htmlAttributes: _propTypes2.default.object,\n link: _propTypes2.default.arrayOf(_propTypes2.default.object),\n meta: _propTypes2.default.arrayOf(_propTypes2.default.object),\n noscript: _propTypes2.default.arrayOf(_propTypes2.default.object),\n onChangeClientState: _propTypes2.default.func,\n script: _propTypes2.default.arrayOf(_propTypes2.default.object),\n style: _propTypes2.default.arrayOf(_propTypes2.default.object),\n title: _propTypes2.default.string,\n titleAttributes: _propTypes2.default.object,\n titleTemplate: _propTypes2.default.string\n }, _class.defaultProps = {\n defer: true,\n encodeSpecialCharacters: true\n }, _class.peek = Component.peek, _class.rewind = function () {\n var mappedState = Component.rewind();\n if (!mappedState) {\n // provide fallback if mappedState is undefined\n mappedState = (0, _HelmetUtils.mapStateOnServer)({\n baseTag: [],\n bodyAttributes: {},\n encodeSpecialCharacters: true,\n htmlAttributes: {},\n linkTags: [],\n metaTags: [],\n noscriptTags: [],\n scriptTags: [],\n styleTags: [],\n title: \"\",\n titleAttributes: {}\n });\n }\n\n return mappedState;\n }, _temp;\n};\n\nvar NullComponent = function NullComponent() {\n return null;\n};\n\nvar HelmetSideEffects = (0, _reactSideEffect2.default)(_HelmetUtils.reducePropsToState, _HelmetUtils.handleClientStateChange, _HelmetUtils.mapStateOnServer)(NullComponent);\n\nvar HelmetExport = Helmet(HelmetSideEffects);\nHelmetExport.renderStatic = HelmetExport.rewind;\n\nexports.Helmet = HelmetExport;\nexports.default = HelmetExport;","exports.__esModule = true;\nvar ATTRIBUTE_NAMES = exports.ATTRIBUTE_NAMES = {\n BODY: \"bodyAttributes\",\n HTML: \"htmlAttributes\",\n TITLE: \"titleAttributes\"\n};\n\nvar TAG_NAMES = exports.TAG_NAMES = {\n BASE: \"base\",\n BODY: \"body\",\n HEAD: \"head\",\n HTML: \"html\",\n LINK: \"link\",\n META: \"meta\",\n NOSCRIPT: \"noscript\",\n SCRIPT: \"script\",\n STYLE: \"style\",\n TITLE: \"title\"\n};\n\nvar VALID_TAG_NAMES = exports.VALID_TAG_NAMES = Object.keys(TAG_NAMES).map(function (name) {\n return TAG_NAMES[name];\n});\n\nvar TAG_PROPERTIES = exports.TAG_PROPERTIES = {\n CHARSET: \"charset\",\n CSS_TEXT: \"cssText\",\n HREF: \"href\",\n HTTPEQUIV: \"http-equiv\",\n INNER_HTML: \"innerHTML\",\n ITEM_PROP: \"itemprop\",\n NAME: \"name\",\n PROPERTY: \"property\",\n REL: \"rel\",\n SRC: \"src\"\n};\n\nvar REACT_TAG_MAP = exports.REACT_TAG_MAP = {\n accesskey: \"accessKey\",\n charset: \"charSet\",\n class: \"className\",\n contenteditable: \"contentEditable\",\n contextmenu: \"contextMenu\",\n \"http-equiv\": \"httpEquiv\",\n itemprop: \"itemProp\",\n tabindex: \"tabIndex\"\n};\n\nvar HELMET_PROPS = exports.HELMET_PROPS = {\n DEFAULT_TITLE: \"defaultTitle\",\n DEFER: \"defer\",\n ENCODE_SPECIAL_CHARACTERS: \"encodeSpecialCharacters\",\n ON_CHANGE_CLIENT_STATE: \"onChangeClientState\",\n TITLE_TEMPLATE: \"titleTemplate\"\n};\n\nvar HTML_TAG_MAP = exports.HTML_TAG_MAP = Object.keys(REACT_TAG_MAP).reduce(function (obj, key) {\n obj[REACT_TAG_MAP[key]] = key;\n return obj;\n}, {});\n\nvar SELF_CLOSING_TAGS = exports.SELF_CLOSING_TAGS = [TAG_NAMES.NOSCRIPT, TAG_NAMES.SCRIPT, TAG_NAMES.STYLE];\n\nvar HELMET_ATTRIBUTE = exports.HELMET_ATTRIBUTE = \"data-react-helmet\";","exports.__esModule = true;\nexports.warn = exports.requestAnimationFrame = exports.reducePropsToState = exports.mapStateOnServer = exports.handleClientStateChange = exports.convertReactPropstoHtmlAttributes = undefined;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require(\"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _objectAssign = require(\"object-assign\");\n\nvar _objectAssign2 = _interopRequireDefault(_objectAssign);\n\nvar _HelmetConstants = require(\"./HelmetConstants.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar encodeSpecialCharacters = function encodeSpecialCharacters(str) {\n var encode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n if (encode === false) {\n return String(str);\n }\n\n return String(str).replace(/&/g, \"&\").replace(//g, \">\").replace(/\"/g, \""\").replace(/'/g, \"'\");\n};\n\nvar getTitleFromPropsList = function getTitleFromPropsList(propsList) {\n var innermostTitle = getInnermostProperty(propsList, _HelmetConstants.TAG_NAMES.TITLE);\n var innermostTemplate = getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.TITLE_TEMPLATE);\n\n if (innermostTemplate && innermostTitle) {\n // use function arg to avoid need to escape $ characters\n return innermostTemplate.replace(/%s/g, function () {\n return innermostTitle;\n });\n }\n\n var innermostDefaultTitle = getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.DEFAULT_TITLE);\n\n return innermostTitle || innermostDefaultTitle || undefined;\n};\n\nvar getOnChangeClientState = function getOnChangeClientState(propsList) {\n return getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.ON_CHANGE_CLIENT_STATE) || function () {};\n};\n\nvar getAttributesFromPropsList = function getAttributesFromPropsList(tagType, propsList) {\n return propsList.filter(function (props) {\n return typeof props[tagType] !== \"undefined\";\n }).map(function (props) {\n return props[tagType];\n }).reduce(function (tagAttrs, current) {\n return _extends({}, tagAttrs, current);\n }, {});\n};\n\nvar getBaseTagFromPropsList = function getBaseTagFromPropsList(primaryAttributes, propsList) {\n return propsList.filter(function (props) {\n return typeof props[_HelmetConstants.TAG_NAMES.BASE] !== \"undefined\";\n }).map(function (props) {\n return props[_HelmetConstants.TAG_NAMES.BASE];\n }).reverse().reduce(function (innermostBaseTag, tag) {\n if (!innermostBaseTag.length) {\n var keys = Object.keys(tag);\n\n for (var i = 0; i < keys.length; i++) {\n var attributeKey = keys[i];\n var lowerCaseAttributeKey = attributeKey.toLowerCase();\n\n if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && tag[lowerCaseAttributeKey]) {\n return innermostBaseTag.concat(tag);\n }\n }\n }\n\n return innermostBaseTag;\n }, []);\n};\n\nvar getTagsFromPropsList = function getTagsFromPropsList(tagName, primaryAttributes, propsList) {\n // Calculate list of tags, giving priority innermost component (end of the propslist)\n var approvedSeenTags = {};\n\n return propsList.filter(function (props) {\n if (Array.isArray(props[tagName])) {\n return true;\n }\n if (typeof props[tagName] !== \"undefined\") {\n warn(\"Helmet: \" + tagName + \" should be of type \\\"Array\\\". Instead found type \\\"\" + _typeof(props[tagName]) + \"\\\"\");\n }\n return false;\n }).map(function (props) {\n return props[tagName];\n }).reverse().reduce(function (approvedTags, instanceTags) {\n var instanceSeenTags = {};\n\n instanceTags.filter(function (tag) {\n var primaryAttributeKey = void 0;\n var keys = Object.keys(tag);\n for (var i = 0; i < keys.length; i++) {\n var attributeKey = keys[i];\n var lowerCaseAttributeKey = attributeKey.toLowerCase();\n\n // Special rule with link tags, since rel and href are both primary tags, rel takes priority\n if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && !(primaryAttributeKey === _HelmetConstants.TAG_PROPERTIES.REL && tag[primaryAttributeKey].toLowerCase() === \"canonical\") && !(lowerCaseAttributeKey === _HelmetConstants.TAG_PROPERTIES.REL && tag[lowerCaseAttributeKey].toLowerCase() === \"stylesheet\")) {\n primaryAttributeKey = lowerCaseAttributeKey;\n }\n // Special case for innerHTML which doesn't work lowercased\n if (primaryAttributes.indexOf(attributeKey) !== -1 && (attributeKey === _HelmetConstants.TAG_PROPERTIES.INNER_HTML || attributeKey === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT || attributeKey === _HelmetConstants.TAG_PROPERTIES.ITEM_PROP)) {\n primaryAttributeKey = attributeKey;\n }\n }\n\n if (!primaryAttributeKey || !tag[primaryAttributeKey]) {\n return false;\n }\n\n var value = tag[primaryAttributeKey].toLowerCase();\n\n if (!approvedSeenTags[primaryAttributeKey]) {\n approvedSeenTags[primaryAttributeKey] = {};\n }\n\n if (!instanceSeenTags[primaryAttributeKey]) {\n instanceSeenTags[primaryAttributeKey] = {};\n }\n\n if (!approvedSeenTags[primaryAttributeKey][value]) {\n instanceSeenTags[primaryAttributeKey][value] = true;\n return true;\n }\n\n return false;\n }).reverse().forEach(function (tag) {\n return approvedTags.push(tag);\n });\n\n // Update seen tags with tags from this instance\n var keys = Object.keys(instanceSeenTags);\n for (var i = 0; i < keys.length; i++) {\n var attributeKey = keys[i];\n var tagUnion = (0, _objectAssign2.default)({}, approvedSeenTags[attributeKey], instanceSeenTags[attributeKey]);\n\n approvedSeenTags[attributeKey] = tagUnion;\n }\n\n return approvedTags;\n }, []).reverse();\n};\n\nvar getInnermostProperty = function getInnermostProperty(propsList, property) {\n for (var i = propsList.length - 1; i >= 0; i--) {\n var props = propsList[i];\n\n if (props.hasOwnProperty(property)) {\n return props[property];\n }\n }\n\n return null;\n};\n\nvar reducePropsToState = function reducePropsToState(propsList) {\n return {\n baseTag: getBaseTagFromPropsList([_HelmetConstants.TAG_PROPERTIES.HREF], propsList),\n bodyAttributes: getAttributesFromPropsList(_HelmetConstants.ATTRIBUTE_NAMES.BODY, propsList),\n defer: getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.DEFER),\n encode: getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS),\n htmlAttributes: getAttributesFromPropsList(_HelmetConstants.ATTRIBUTE_NAMES.HTML, propsList),\n linkTags: getTagsFromPropsList(_HelmetConstants.TAG_NAMES.LINK, [_HelmetConstants.TAG_PROPERTIES.REL, _HelmetConstants.TAG_PROPERTIES.HREF], propsList),\n metaTags: getTagsFromPropsList(_HelmetConstants.TAG_NAMES.META, [_HelmetConstants.TAG_PROPERTIES.NAME, _HelmetConstants.TAG_PROPERTIES.CHARSET, _HelmetConstants.TAG_PROPERTIES.HTTPEQUIV, _HelmetConstants.TAG_PROPERTIES.PROPERTY, _HelmetConstants.TAG_PROPERTIES.ITEM_PROP], propsList),\n noscriptTags: getTagsFromPropsList(_HelmetConstants.TAG_NAMES.NOSCRIPT, [_HelmetConstants.TAG_PROPERTIES.INNER_HTML], propsList),\n onChangeClientState: getOnChangeClientState(propsList),\n scriptTags: getTagsFromPropsList(_HelmetConstants.TAG_NAMES.SCRIPT, [_HelmetConstants.TAG_PROPERTIES.SRC, _HelmetConstants.TAG_PROPERTIES.INNER_HTML], propsList),\n styleTags: getTagsFromPropsList(_HelmetConstants.TAG_NAMES.STYLE, [_HelmetConstants.TAG_PROPERTIES.CSS_TEXT], propsList),\n title: getTitleFromPropsList(propsList),\n titleAttributes: getAttributesFromPropsList(_HelmetConstants.ATTRIBUTE_NAMES.TITLE, propsList)\n };\n};\n\nvar rafPolyfill = function () {\n var clock = Date.now();\n\n return function (callback) {\n var currentTime = Date.now();\n\n if (currentTime - clock > 16) {\n clock = currentTime;\n callback(currentTime);\n } else {\n setTimeout(function () {\n rafPolyfill(callback);\n }, 0);\n }\n };\n}();\n\nvar cafPolyfill = function cafPolyfill(id) {\n return clearTimeout(id);\n};\n\nvar requestAnimationFrame = typeof window !== \"undefined\" ? window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || rafPolyfill : global.requestAnimationFrame || rafPolyfill;\n\nvar cancelAnimationFrame = typeof window !== \"undefined\" ? window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || cafPolyfill : global.cancelAnimationFrame || cafPolyfill;\n\nvar warn = function warn(msg) {\n return console && typeof console.warn === \"function\" && console.warn(msg);\n};\n\nvar _helmetCallback = null;\n\nvar handleClientStateChange = function handleClientStateChange(newState) {\n if (_helmetCallback) {\n cancelAnimationFrame(_helmetCallback);\n }\n\n if (newState.defer) {\n _helmetCallback = requestAnimationFrame(function () {\n commitTagChanges(newState, function () {\n _helmetCallback = null;\n });\n });\n } else {\n commitTagChanges(newState);\n _helmetCallback = null;\n }\n};\n\nvar commitTagChanges = function commitTagChanges(newState, cb) {\n var baseTag = newState.baseTag,\n bodyAttributes = newState.bodyAttributes,\n htmlAttributes = newState.htmlAttributes,\n linkTags = newState.linkTags,\n metaTags = newState.metaTags,\n noscriptTags = newState.noscriptTags,\n onChangeClientState = newState.onChangeClientState,\n scriptTags = newState.scriptTags,\n styleTags = newState.styleTags,\n title = newState.title,\n titleAttributes = newState.titleAttributes;\n\n updateAttributes(_HelmetConstants.TAG_NAMES.BODY, bodyAttributes);\n updateAttributes(_HelmetConstants.TAG_NAMES.HTML, htmlAttributes);\n\n updateTitle(title, titleAttributes);\n\n var tagUpdates = {\n baseTag: updateTags(_HelmetConstants.TAG_NAMES.BASE, baseTag),\n linkTags: updateTags(_HelmetConstants.TAG_NAMES.LINK, linkTags),\n metaTags: updateTags(_HelmetConstants.TAG_NAMES.META, metaTags),\n noscriptTags: updateTags(_HelmetConstants.TAG_NAMES.NOSCRIPT, noscriptTags),\n scriptTags: updateTags(_HelmetConstants.TAG_NAMES.SCRIPT, scriptTags),\n styleTags: updateTags(_HelmetConstants.TAG_NAMES.STYLE, styleTags)\n };\n\n var addedTags = {};\n var removedTags = {};\n\n Object.keys(tagUpdates).forEach(function (tagType) {\n var _tagUpdates$tagType = tagUpdates[tagType],\n newTags = _tagUpdates$tagType.newTags,\n oldTags = _tagUpdates$tagType.oldTags;\n\n\n if (newTags.length) {\n addedTags[tagType] = newTags;\n }\n if (oldTags.length) {\n removedTags[tagType] = tagUpdates[tagType].oldTags;\n }\n });\n\n cb && cb();\n\n onChangeClientState(newState, addedTags, removedTags);\n};\n\nvar flattenArray = function flattenArray(possibleArray) {\n return Array.isArray(possibleArray) ? possibleArray.join(\"\") : possibleArray;\n};\n\nvar updateTitle = function updateTitle(title, attributes) {\n if (typeof title !== \"undefined\" && document.title !== title) {\n document.title = flattenArray(title);\n }\n\n updateAttributes(_HelmetConstants.TAG_NAMES.TITLE, attributes);\n};\n\nvar updateAttributes = function updateAttributes(tagName, attributes) {\n var elementTag = document.getElementsByTagName(tagName)[0];\n\n if (!elementTag) {\n return;\n }\n\n var helmetAttributeString = elementTag.getAttribute(_HelmetConstants.HELMET_ATTRIBUTE);\n var helmetAttributes = helmetAttributeString ? helmetAttributeString.split(\",\") : [];\n var attributesToRemove = [].concat(helmetAttributes);\n var attributeKeys = Object.keys(attributes);\n\n for (var i = 0; i < attributeKeys.length; i++) {\n var attribute = attributeKeys[i];\n var value = attributes[attribute] || \"\";\n\n if (elementTag.getAttribute(attribute) !== value) {\n elementTag.setAttribute(attribute, value);\n }\n\n if (helmetAttributes.indexOf(attribute) === -1) {\n helmetAttributes.push(attribute);\n }\n\n var indexToSave = attributesToRemove.indexOf(attribute);\n if (indexToSave !== -1) {\n attributesToRemove.splice(indexToSave, 1);\n }\n }\n\n for (var _i = attributesToRemove.length - 1; _i >= 0; _i--) {\n elementTag.removeAttribute(attributesToRemove[_i]);\n }\n\n if (helmetAttributes.length === attributesToRemove.length) {\n elementTag.removeAttribute(_HelmetConstants.HELMET_ATTRIBUTE);\n } else if (elementTag.getAttribute(_HelmetConstants.HELMET_ATTRIBUTE) !== attributeKeys.join(\",\")) {\n elementTag.setAttribute(_HelmetConstants.HELMET_ATTRIBUTE, attributeKeys.join(\",\"));\n }\n};\n\nvar updateTags = function updateTags(type, tags) {\n var headElement = document.head || document.querySelector(_HelmetConstants.TAG_NAMES.HEAD);\n var tagNodes = headElement.querySelectorAll(type + \"[\" + _HelmetConstants.HELMET_ATTRIBUTE + \"]\");\n var oldTags = Array.prototype.slice.call(tagNodes);\n var newTags = [];\n var indexToDelete = void 0;\n\n if (tags && tags.length) {\n tags.forEach(function (tag) {\n var newElement = document.createElement(type);\n\n for (var attribute in tag) {\n if (tag.hasOwnProperty(attribute)) {\n if (attribute === _HelmetConstants.TAG_PROPERTIES.INNER_HTML) {\n newElement.innerHTML = tag.innerHTML;\n } else if (attribute === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT) {\n if (newElement.styleSheet) {\n newElement.styleSheet.cssText = tag.cssText;\n } else {\n newElement.appendChild(document.createTextNode(tag.cssText));\n }\n } else {\n var value = typeof tag[attribute] === \"undefined\" ? \"\" : tag[attribute];\n newElement.setAttribute(attribute, value);\n }\n }\n }\n\n newElement.setAttribute(_HelmetConstants.HELMET_ATTRIBUTE, \"true\");\n\n // Remove a duplicate tag from domTagstoRemove, so it isn't cleared.\n if (oldTags.some(function (existingTag, index) {\n indexToDelete = index;\n return newElement.isEqualNode(existingTag);\n })) {\n oldTags.splice(indexToDelete, 1);\n } else {\n newTags.push(newElement);\n }\n });\n }\n\n oldTags.forEach(function (tag) {\n return tag.parentNode.removeChild(tag);\n });\n newTags.forEach(function (tag) {\n return headElement.appendChild(tag);\n });\n\n return {\n oldTags: oldTags,\n newTags: newTags\n };\n};\n\nvar generateElementAttributesAsString = function generateElementAttributesAsString(attributes) {\n return Object.keys(attributes).reduce(function (str, key) {\n var attr = typeof attributes[key] !== \"undefined\" ? key + \"=\\\"\" + attributes[key] + \"\\\"\" : \"\" + key;\n return str ? str + \" \" + attr : attr;\n }, \"\");\n};\n\nvar generateTitleAsString = function generateTitleAsString(type, title, attributes, encode) {\n var attributeString = generateElementAttributesAsString(attributes);\n var flattenedTitle = flattenArray(title);\n return attributeString ? \"<\" + type + \" \" + _HelmetConstants.HELMET_ATTRIBUTE + \"=\\\"true\\\" \" + attributeString + \">\" + encodeSpecialCharacters(flattenedTitle, encode) + \"\" + type + \">\" : \"<\" + type + \" \" + _HelmetConstants.HELMET_ATTRIBUTE + \"=\\\"true\\\">\" + encodeSpecialCharacters(flattenedTitle, encode) + \"\" + type + \">\";\n};\n\nvar generateTagsAsString = function generateTagsAsString(type, tags, encode) {\n return tags.reduce(function (str, tag) {\n var attributeHtml = Object.keys(tag).filter(function (attribute) {\n return !(attribute === _HelmetConstants.TAG_PROPERTIES.INNER_HTML || attribute === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT);\n }).reduce(function (string, attribute) {\n var attr = typeof tag[attribute] === \"undefined\" ? attribute : attribute + \"=\\\"\" + encodeSpecialCharacters(tag[attribute], encode) + \"\\\"\";\n return string ? string + \" \" + attr : attr;\n }, \"\");\n\n var tagContent = tag.innerHTML || tag.cssText || \"\";\n\n var isSelfClosing = _HelmetConstants.SELF_CLOSING_TAGS.indexOf(type) === -1;\n\n return str + \"<\" + type + \" \" + _HelmetConstants.HELMET_ATTRIBUTE + \"=\\\"true\\\" \" + attributeHtml + (isSelfClosing ? \"/>\" : \">\" + tagContent + \"\" + type + \">\");\n }, \"\");\n};\n\nvar convertElementAttributestoReactProps = function convertElementAttributestoReactProps(attributes) {\n var initProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n return Object.keys(attributes).reduce(function (obj, key) {\n obj[_HelmetConstants.REACT_TAG_MAP[key] || key] = attributes[key];\n return obj;\n }, initProps);\n};\n\nvar convertReactPropstoHtmlAttributes = function convertReactPropstoHtmlAttributes(props) {\n var initAttributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n return Object.keys(props).reduce(function (obj, key) {\n obj[_HelmetConstants.HTML_TAG_MAP[key] || key] = props[key];\n return obj;\n }, initAttributes);\n};\n\nvar generateTitleAsReactComponent = function generateTitleAsReactComponent(type, title, attributes) {\n var _initProps;\n\n // assigning into an array to define toString function on it\n var initProps = (_initProps = {\n key: title\n }, _initProps[_HelmetConstants.HELMET_ATTRIBUTE] = true, _initProps);\n var props = convertElementAttributestoReactProps(attributes, initProps);\n\n return [_react2.default.createElement(_HelmetConstants.TAG_NAMES.TITLE, props, title)];\n};\n\nvar generateTagsAsReactComponent = function generateTagsAsReactComponent(type, tags) {\n return tags.map(function (tag, i) {\n var _mappedTag;\n\n var mappedTag = (_mappedTag = {\n key: i\n }, _mappedTag[_HelmetConstants.HELMET_ATTRIBUTE] = true, _mappedTag);\n\n Object.keys(tag).forEach(function (attribute) {\n var mappedAttribute = _HelmetConstants.REACT_TAG_MAP[attribute] || attribute;\n\n if (mappedAttribute === _HelmetConstants.TAG_PROPERTIES.INNER_HTML || mappedAttribute === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT) {\n var content = tag.innerHTML || tag.cssText;\n mappedTag.dangerouslySetInnerHTML = { __html: content };\n } else {\n mappedTag[mappedAttribute] = tag[attribute];\n }\n });\n\n return _react2.default.createElement(type, mappedTag);\n });\n};\n\nvar getMethodsForTag = function getMethodsForTag(type, tags, encode) {\n switch (type) {\n case _HelmetConstants.TAG_NAMES.TITLE:\n return {\n toComponent: function toComponent() {\n return generateTitleAsReactComponent(type, tags.title, tags.titleAttributes, encode);\n },\n toString: function toString() {\n return generateTitleAsString(type, tags.title, tags.titleAttributes, encode);\n }\n };\n case _HelmetConstants.ATTRIBUTE_NAMES.BODY:\n case _HelmetConstants.ATTRIBUTE_NAMES.HTML:\n return {\n toComponent: function toComponent() {\n return convertElementAttributestoReactProps(tags);\n },\n toString: function toString() {\n return generateElementAttributesAsString(tags);\n }\n };\n default:\n return {\n toComponent: function toComponent() {\n return generateTagsAsReactComponent(type, tags);\n },\n toString: function toString() {\n return generateTagsAsString(type, tags, encode);\n }\n };\n }\n};\n\nvar mapStateOnServer = function mapStateOnServer(_ref) {\n var baseTag = _ref.baseTag,\n bodyAttributes = _ref.bodyAttributes,\n encode = _ref.encode,\n htmlAttributes = _ref.htmlAttributes,\n linkTags = _ref.linkTags,\n metaTags = _ref.metaTags,\n noscriptTags = _ref.noscriptTags,\n scriptTags = _ref.scriptTags,\n styleTags = _ref.styleTags,\n _ref$title = _ref.title,\n title = _ref$title === undefined ? \"\" : _ref$title,\n titleAttributes = _ref.titleAttributes;\n return {\n base: getMethodsForTag(_HelmetConstants.TAG_NAMES.BASE, baseTag, encode),\n bodyAttributes: getMethodsForTag(_HelmetConstants.ATTRIBUTE_NAMES.BODY, bodyAttributes, encode),\n htmlAttributes: getMethodsForTag(_HelmetConstants.ATTRIBUTE_NAMES.HTML, htmlAttributes, encode),\n link: getMethodsForTag(_HelmetConstants.TAG_NAMES.LINK, linkTags, encode),\n meta: getMethodsForTag(_HelmetConstants.TAG_NAMES.META, metaTags, encode),\n noscript: getMethodsForTag(_HelmetConstants.TAG_NAMES.NOSCRIPT, noscriptTags, encode),\n script: getMethodsForTag(_HelmetConstants.TAG_NAMES.SCRIPT, scriptTags, encode),\n style: getMethodsForTag(_HelmetConstants.TAG_NAMES.STYLE, styleTags, encode),\n title: getMethodsForTag(_HelmetConstants.TAG_NAMES.TITLE, { title: title, titleAttributes: titleAttributes }, encode)\n };\n};\n\nexports.convertReactPropstoHtmlAttributes = convertReactPropstoHtmlAttributes;\nexports.handleClientStateChange = handleClientStateChange;\nexports.mapStateOnServer = mapStateOnServer;\nexports.reducePropsToState = reducePropsToState;\nexports.requestAnimationFrame = requestAnimationFrame;\nexports.warn = warn;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _react = _interopRequireWildcard(require(\"react\"));\n\nvar _props = require(\"./props\");\n\nvar _utils = require(\"./utils\");\n\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \"function\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar SEEK_ON_PLAY_EXPIRY = 5000;\n\nvar Player = /*#__PURE__*/function (_Component) {\n _inherits(Player, _Component);\n\n var _super = _createSuper(Player);\n\n function Player() {\n var _this;\n\n _classCallCheck(this, Player);\n\n for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {\n _args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(_args));\n\n _defineProperty(_assertThisInitialized(_this), \"mounted\", false);\n\n _defineProperty(_assertThisInitialized(_this), \"isReady\", false);\n\n _defineProperty(_assertThisInitialized(_this), \"isPlaying\", false);\n\n _defineProperty(_assertThisInitialized(_this), \"isLoading\", true);\n\n _defineProperty(_assertThisInitialized(_this), \"loadOnReady\", null);\n\n _defineProperty(_assertThisInitialized(_this), \"startOnPlay\", true);\n\n _defineProperty(_assertThisInitialized(_this), \"seekOnPlay\", null);\n\n _defineProperty(_assertThisInitialized(_this), \"onDurationCalled\", false);\n\n _defineProperty(_assertThisInitialized(_this), \"getInternalPlayer\", function (key) {\n if (!_this.player) return null;\n return _this.player[key];\n });\n\n _defineProperty(_assertThisInitialized(_this), \"progress\", function () {\n if (_this.props.url && _this.player && _this.isReady) {\n var playedSeconds = _this.getCurrentTime() || 0;\n\n var loadedSeconds = _this.getSecondsLoaded();\n\n var duration = _this.getDuration();\n\n if (duration) {\n var progress = {\n playedSeconds: playedSeconds,\n played: playedSeconds / duration\n };\n\n if (loadedSeconds !== null) {\n progress.loadedSeconds = loadedSeconds;\n progress.loaded = loadedSeconds / duration;\n } // Only call onProgress if values have changed\n\n\n if (progress.playedSeconds !== _this.prevPlayed || progress.loadedSeconds !== _this.prevLoaded) {\n _this.props.onProgress(progress);\n }\n\n _this.prevPlayed = progress.playedSeconds;\n _this.prevLoaded = progress.loadedSeconds;\n }\n }\n\n _this.progressTimeout = setTimeout(_this.progress, _this.props.progressFrequency || _this.props.progressInterval);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleReady\", function () {\n if (!_this.mounted) return;\n _this.isReady = true;\n _this.isLoading = false;\n var _this$props = _this.props,\n onReady = _this$props.onReady,\n playing = _this$props.playing,\n volume = _this$props.volume,\n muted = _this$props.muted;\n onReady();\n\n if (!muted && volume !== null) {\n _this.player.setVolume(volume);\n }\n\n if (_this.loadOnReady) {\n _this.player.load(_this.loadOnReady, true);\n\n _this.loadOnReady = null;\n } else if (playing) {\n _this.player.play();\n }\n\n _this.handleDurationCheck();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handlePlay\", function () {\n _this.isPlaying = true;\n _this.isLoading = false;\n var _this$props2 = _this.props,\n onStart = _this$props2.onStart,\n onPlay = _this$props2.onPlay,\n playbackRate = _this$props2.playbackRate;\n\n if (_this.startOnPlay) {\n if (_this.player.setPlaybackRate && playbackRate !== 1) {\n _this.player.setPlaybackRate(playbackRate);\n }\n\n onStart();\n _this.startOnPlay = false;\n }\n\n onPlay();\n\n if (_this.seekOnPlay) {\n _this.seekTo(_this.seekOnPlay);\n\n _this.seekOnPlay = null;\n }\n\n _this.handleDurationCheck();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handlePause\", function (e) {\n _this.isPlaying = false;\n\n if (!_this.isLoading) {\n _this.props.onPause(e);\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleEnded\", function () {\n var _this$props3 = _this.props,\n activePlayer = _this$props3.activePlayer,\n loop = _this$props3.loop,\n onEnded = _this$props3.onEnded;\n\n if (activePlayer.loopOnEnded && loop) {\n _this.seekTo(0);\n }\n\n if (!loop) {\n _this.isPlaying = false;\n onEnded();\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleError\", function () {\n var _this$props4;\n\n _this.isLoading = false;\n\n (_this$props4 = _this.props).onError.apply(_this$props4, arguments);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleDurationCheck\", function () {\n clearTimeout(_this.durationCheckTimeout);\n\n var duration = _this.getDuration();\n\n if (duration) {\n if (!_this.onDurationCalled) {\n _this.props.onDuration(duration);\n\n _this.onDurationCalled = true;\n }\n } else {\n _this.durationCheckTimeout = setTimeout(_this.handleDurationCheck, 100);\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleLoaded\", function () {\n // Sometimes we know loading has stopped but onReady/onPlay are never called\n // so this provides a way for players to avoid getting stuck\n _this.isLoading = false;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"ref\", function (player) {\n if (player) {\n _this.player = player;\n }\n });\n\n return _this;\n }\n\n _createClass(Player, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.mounted = true;\n this.player.load(this.props.url);\n this.progress();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n clearTimeout(this.progressTimeout);\n clearTimeout(this.durationCheckTimeout);\n\n if (this.isReady) {\n this.player.stop();\n }\n\n if (this.player.disablePIP) {\n this.player.disablePIP();\n }\n\n this.mounted = false;\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var _this2 = this;\n\n // Invoke player methods based on changed props\n var _this$props5 = this.props,\n url = _this$props5.url,\n playing = _this$props5.playing,\n volume = _this$props5.volume,\n muted = _this$props5.muted,\n playbackRate = _this$props5.playbackRate,\n pip = _this$props5.pip,\n loop = _this$props5.loop,\n activePlayer = _this$props5.activePlayer;\n\n if (!(0, _utils.isEqual)(prevProps.url, url)) {\n if (this.isLoading && !activePlayer.forceLoad) {\n console.warn(\"ReactPlayer: the attempt to load \".concat(url, \" is being deferred until the player has loaded\"));\n this.loadOnReady = url;\n return;\n }\n\n this.isLoading = true;\n this.startOnPlay = true;\n this.onDurationCalled = false;\n this.player.load(url, this.isReady);\n }\n\n if (!prevProps.playing && playing && !this.isPlaying) {\n this.player.play();\n }\n\n if (prevProps.playing && !playing && this.isPlaying) {\n this.player.pause();\n }\n\n if (!prevProps.pip && pip && this.player.enablePIP) {\n this.player.enablePIP();\n }\n\n if (prevProps.pip && !pip && this.player.disablePIP) {\n this.player.disablePIP();\n }\n\n if (prevProps.volume !== volume && volume !== null) {\n this.player.setVolume(volume);\n }\n\n if (prevProps.muted !== muted) {\n if (muted) {\n this.player.mute();\n } else {\n this.player.unmute();\n\n if (volume !== null) {\n // Set volume next tick to fix a bug with DailyMotion\n setTimeout(function () {\n return _this2.player.setVolume(volume);\n });\n }\n }\n }\n\n if (prevProps.playbackRate !== playbackRate && this.player.setPlaybackRate) {\n this.player.setPlaybackRate(playbackRate);\n }\n\n if (prevProps.loop !== loop && this.player.setLoop) {\n this.player.setLoop(loop);\n }\n }\n }, {\n key: \"getDuration\",\n value: function getDuration() {\n if (!this.isReady) return null;\n return this.player.getDuration();\n }\n }, {\n key: \"getCurrentTime\",\n value: function getCurrentTime() {\n if (!this.isReady) return null;\n return this.player.getCurrentTime();\n }\n }, {\n key: \"getSecondsLoaded\",\n value: function getSecondsLoaded() {\n if (!this.isReady) return null;\n return this.player.getSecondsLoaded();\n }\n }, {\n key: \"seekTo\",\n value: function seekTo(amount, type) {\n var _this3 = this;\n\n // When seeking before player is ready, store value and seek later\n if (!this.isReady && amount !== 0) {\n this.seekOnPlay = amount;\n setTimeout(function () {\n _this3.seekOnPlay = null;\n }, SEEK_ON_PLAY_EXPIRY);\n return;\n }\n\n var isFraction = !type ? amount > 0 && amount < 1 : type === 'fraction';\n\n if (isFraction) {\n // Convert fraction to seconds based on duration\n var duration = this.player.getDuration();\n\n if (!duration) {\n console.warn('ReactPlayer: could not seek using fraction – duration not yet available');\n return;\n }\n\n this.player.seekTo(duration * amount);\n return;\n }\n\n this.player.seekTo(amount);\n }\n }, {\n key: \"render\",\n value: function render() {\n var Player = this.props.activePlayer;\n\n if (!Player) {\n return null;\n }\n\n return /*#__PURE__*/_react[\"default\"].createElement(Player, _extends({}, this.props, {\n ref: this.ref,\n onReady: this.handleReady,\n onPlay: this.handlePlay,\n onPause: this.handlePause,\n onEnded: this.handleEnded,\n onLoaded: this.handleLoaded,\n onError: this.handleError\n }));\n }\n }]);\n\n return Player;\n}(_react.Component);\n\nexports[\"default\"] = Player;\n\n_defineProperty(Player, \"displayName\", 'Player');\n\n_defineProperty(Player, \"propTypes\", _props.propTypes);\n\n_defineProperty(Player, \"defaultProps\", _props.defaultProps);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _react = _interopRequireWildcard(require(\"react\"));\n\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \"function\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar ICON_SIZE = '64px';\n\nvar Preview = /*#__PURE__*/function (_Component) {\n _inherits(Preview, _Component);\n\n var _super = _createSuper(Preview);\n\n function Preview() {\n var _this;\n\n _classCallCheck(this, Preview);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"mounted\", false);\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n image: null\n });\n\n return _this;\n }\n\n _createClass(Preview, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.mounted = true;\n this.fetchImage(this.props);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var _this$props = this.props,\n url = _this$props.url,\n light = _this$props.light;\n\n if (prevProps.url !== url || prevProps.light !== light) {\n this.fetchImage(this.props);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.mounted = false;\n }\n }, {\n key: \"fetchImage\",\n value: function fetchImage(_ref) {\n var _this2 = this;\n\n var url = _ref.url,\n light = _ref.light;\n\n if (typeof light === 'string') {\n this.setState({\n image: light\n });\n return;\n }\n\n this.setState({\n image: null\n });\n return window.fetch(\"https://noembed.com/embed?url=\".concat(url)).then(function (response) {\n return response.json();\n }).then(function (data) {\n if (data.thumbnail_url && _this2.mounted) {\n var image = data.thumbnail_url.replace('height=100', 'height=480');\n\n _this2.setState({\n image: image\n });\n }\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props2 = this.props,\n onClick = _this$props2.onClick,\n playIcon = _this$props2.playIcon;\n var image = this.state.image;\n var flexCenter = {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center'\n };\n var styles = {\n preview: _objectSpread({\n width: '100%',\n height: '100%',\n backgroundImage: image ? \"url(\".concat(image, \")\") : undefined,\n backgroundSize: 'cover',\n backgroundPosition: 'center',\n cursor: 'pointer'\n }, flexCenter),\n shadow: _objectSpread({\n background: 'radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)',\n borderRadius: ICON_SIZE,\n width: ICON_SIZE,\n height: ICON_SIZE\n }, flexCenter),\n playIcon: {\n borderStyle: 'solid',\n borderWidth: '16px 0 16px 26px',\n borderColor: 'transparent transparent transparent white',\n marginLeft: '7px'\n }\n };\n\n var defaultPlayIcon = /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n style: styles.shadow,\n className: \"react-player__shadow\"\n }, /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n style: styles.playIcon,\n className: \"react-player__play-icon\"\n }));\n\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n style: styles.preview,\n className: \"react-player__preview\",\n onClick: onClick\n }, playIcon || defaultPlayIcon);\n }\n }]);\n\n return Preview;\n}(_react.Component);\n\nexports[\"default\"] = Preview;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"FilePlayer\", {\n enumerable: true,\n get: function get() {\n return _FilePlayer[\"default\"];\n }\n});\nObject.defineProperty(exports, \"YouTube\", {\n enumerable: true,\n get: function get() {\n return _YouTube[\"default\"];\n }\n});\nObject.defineProperty(exports, \"SoundCloud\", {\n enumerable: true,\n get: function get() {\n return _SoundCloud[\"default\"];\n }\n});\nObject.defineProperty(exports, \"Vimeo\", {\n enumerable: true,\n get: function get() {\n return _Vimeo[\"default\"];\n }\n});\nObject.defineProperty(exports, \"Facebook\", {\n enumerable: true,\n get: function get() {\n return _Facebook[\"default\"];\n }\n});\nObject.defineProperty(exports, \"Streamable\", {\n enumerable: true,\n get: function get() {\n return _Streamable[\"default\"];\n }\n});\nObject.defineProperty(exports, \"Wistia\", {\n enumerable: true,\n get: function get() {\n return _Wistia[\"default\"];\n }\n});\nObject.defineProperty(exports, \"Twitch\", {\n enumerable: true,\n get: function get() {\n return _Twitch[\"default\"];\n }\n});\nObject.defineProperty(exports, \"DailyMotion\", {\n enumerable: true,\n get: function get() {\n return _DailyMotion[\"default\"];\n }\n});\nObject.defineProperty(exports, \"Mixcloud\", {\n enumerable: true,\n get: function get() {\n return _Mixcloud[\"default\"];\n }\n});\nexports[\"default\"] = void 0;\n\nvar _react = _interopRequireWildcard(require(\"react\"));\n\nvar _props = require(\"./props\");\n\nvar _utils = require(\"./utils\");\n\nvar _players = _interopRequireDefault(require(\"./players\"));\n\nvar _Player4 = _interopRequireDefault(require(\"./Player\"));\n\nvar _Preview = _interopRequireDefault(require(\"./Preview\"));\n\nvar _FilePlayer = _interopRequireWildcard(require(\"./players/FilePlayer\"));\n\nvar _preload = _interopRequireDefault(require(\"./preload\"));\n\nvar _YouTube = _interopRequireDefault(require(\"./players/YouTube\"));\n\nvar _SoundCloud = _interopRequireDefault(require(\"./players/SoundCloud\"));\n\nvar _Vimeo = _interopRequireDefault(require(\"./players/Vimeo\"));\n\nvar _Facebook = _interopRequireDefault(require(\"./players/Facebook\"));\n\nvar _Streamable = _interopRequireDefault(require(\"./players/Streamable\"));\n\nvar _Wistia = _interopRequireDefault(require(\"./players/Wistia\"));\n\nvar _Twitch = _interopRequireDefault(require(\"./players/Twitch\"));\n\nvar _DailyMotion = _interopRequireDefault(require(\"./players/DailyMotion\"));\n\nvar _Mixcloud = _interopRequireDefault(require(\"./players/Mixcloud\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \"function\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(n); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar SUPPORTED_PROPS = Object.keys(_props.propTypes);\nvar customPlayers = [];\n\nvar ReactPlayer = /*#__PURE__*/function (_Component) {\n _inherits(ReactPlayer, _Component);\n\n var _super = _createSuper(ReactPlayer);\n\n function ReactPlayer() {\n var _this;\n\n _classCallCheck(this, ReactPlayer);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"config\", (0, _utils.getConfig)(_this.props, _props.defaultProps, true));\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n showPreview: !!_this.props.light\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleClickPreview\", function () {\n _this.setState({\n showPreview: false\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"showPreview\", function () {\n _this.setState({\n showPreview: true\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getDuration\", function () {\n if (!_this.player) return null;\n return _this.player.getDuration();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getCurrentTime\", function () {\n if (!_this.player) return null;\n return _this.player.getCurrentTime();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getSecondsLoaded\", function () {\n if (!_this.player) return null;\n return _this.player.getSecondsLoaded();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getInternalPlayer\", function () {\n var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'player';\n if (!_this.player) return null;\n return _this.player.getInternalPlayer(key);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"seekTo\", function (fraction, type) {\n if (!_this.player) return null;\n\n _this.player.seekTo(fraction, type);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleReady\", function () {\n _this.props.onReady(_assertThisInitialized(_this));\n });\n\n _defineProperty(_assertThisInitialized(_this), \"wrapperRef\", function (wrapper) {\n _this.wrapper = wrapper;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"activePlayerRef\", function (player) {\n _this.player = player;\n });\n\n return _this;\n }\n\n _createClass(ReactPlayer, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (this.props.progressFrequency) {\n var message = 'ReactPlayer: %cprogressFrequency%c is deprecated, please use %cprogressInterval%c instead';\n console.warn(message, 'font-weight: bold', '', 'font-weight: bold', '');\n }\n }\n }, {\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(nextProps, nextState) {\n return !(0, _utils.isEqual)(this.props, nextProps) || !(0, _utils.isEqual)(this.state, nextState);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var light = this.props.light;\n this.config = (0, _utils.getConfig)(this.props, _props.defaultProps);\n\n if (!prevProps.light && light) {\n this.setState({\n showPreview: true\n });\n }\n\n if (prevProps.light && !light) {\n this.setState({\n showPreview: false\n });\n }\n }\n }, {\n key: \"getActivePlayer\",\n value: function getActivePlayer(url) {\n for (var _i = 0, _arr = [].concat(_toConsumableArray(customPlayers), _toConsumableArray(_players[\"default\"])); _i < _arr.length; _i++) {\n var _Player = _arr[_i];\n\n if (_Player.canPlay(url)) {\n return _Player;\n }\n } // Fall back to FilePlayer if nothing else can play the URL\n\n\n return _FilePlayer.FilePlayer;\n }\n }, {\n key: \"renderActivePlayer\",\n value: function renderActivePlayer(url, activePlayer) {\n if (!url) return null;\n return /*#__PURE__*/_react[\"default\"].createElement(_Player4[\"default\"], _extends({}, this.props, {\n key: activePlayer.displayName,\n ref: this.activePlayerRef,\n config: this.config,\n activePlayer: activePlayer,\n onReady: this.handleReady\n }));\n }\n }, {\n key: \"sortPlayers\",\n value: function sortPlayers(a, b) {\n // Retain player order to prevent weird iframe behaviour when switching players\n if (a && b) {\n return a.key < b.key ? -1 : 1;\n }\n\n return 0;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n url = _this$props.url,\n controls = _this$props.controls,\n style = _this$props.style,\n width = _this$props.width,\n height = _this$props.height,\n light = _this$props.light,\n playIcon = _this$props.playIcon,\n Wrapper = _this$props.wrapper;\n var showPreview = this.state.showPreview && url;\n var otherProps = (0, _utils.omit)(this.props, SUPPORTED_PROPS, _props.DEPRECATED_CONFIG_PROPS);\n var activePlayer = this.getActivePlayer(url);\n var renderedActivePlayer = this.renderActivePlayer(url, activePlayer);\n var preloadPlayers = (0, _preload[\"default\"])(url, controls, this.config);\n var players = [renderedActivePlayer].concat(_toConsumableArray(preloadPlayers)).sort(this.sortPlayers);\n\n var preview = /*#__PURE__*/_react[\"default\"].createElement(_Preview[\"default\"], {\n url: url,\n light: light,\n playIcon: playIcon,\n onClick: this.handleClickPreview\n });\n\n return /*#__PURE__*/_react[\"default\"].createElement(Wrapper, _extends({\n ref: this.wrapperRef,\n style: _objectSpread({}, style, {\n width: width,\n height: height\n })\n }, otherProps), showPreview ? preview : players);\n }\n }]);\n\n return ReactPlayer;\n}(_react.Component);\n\nexports[\"default\"] = ReactPlayer;\n\n_defineProperty(ReactPlayer, \"addCustomPlayer\", function (player) {\n customPlayers.push(player);\n});\n\n_defineProperty(ReactPlayer, \"removeCustomPlayers\", function () {\n customPlayers = [];\n});\n\n_defineProperty(ReactPlayer, \"displayName\", 'ReactPlayer');\n\n_defineProperty(ReactPlayer, \"propTypes\", _props.propTypes);\n\n_defineProperty(ReactPlayer, \"defaultProps\", _props.defaultProps);\n\n_defineProperty(ReactPlayer, \"canPlay\", function (url) {\n for (var _i2 = 0, _arr2 = [].concat(_toConsumableArray(customPlayers), _toConsumableArray(_players[\"default\"])); _i2 < _arr2.length; _i2++) {\n var _Player2 = _arr2[_i2];\n\n if (_Player2.canPlay(url)) {\n return true;\n }\n }\n\n return false;\n});\n\n_defineProperty(ReactPlayer, \"canEnablePIP\", function (url) {\n for (var _i3 = 0, _arr3 = [].concat(_toConsumableArray(customPlayers), _toConsumableArray(_players[\"default\"])); _i3 < _arr3.length; _i3++) {\n var _Player3 = _arr3[_i3];\n\n if (_Player3.canEnablePIP && _Player3.canEnablePIP(url)) {\n return true;\n }\n }\n\n return false;\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = exports.DailyMotion = void 0;\n\nvar _react = _interopRequireWildcard(require(\"react\"));\n\nvar _utils = require(\"../utils\");\n\nvar _singlePlayer = _interopRequireDefault(require(\"../singlePlayer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \"function\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(n); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar SDK_URL = 'https://api.dmcdn.net/all.js';\nvar SDK_GLOBAL = 'DM';\nvar SDK_GLOBAL_READY = 'dmAsyncInit';\nvar MATCH_URL = /^(?:(?:https?):)?(?:\\/\\/)?(?:www\\.)?(?:(?:dailymotion\\.com(?:\\/embed)?\\/video)|dai\\.ly)\\/([a-zA-Z0-9]+)(?:_[\\w_-]+)?$/;\n\nvar DailyMotion = /*#__PURE__*/function (_Component) {\n _inherits(DailyMotion, _Component);\n\n var _super = _createSuper(DailyMotion);\n\n function DailyMotion() {\n var _this;\n\n _classCallCheck(this, DailyMotion);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"callPlayer\", _utils.callPlayer);\n\n _defineProperty(_assertThisInitialized(_this), \"onDurationChange\", function () {\n var duration = _this.getDuration();\n\n _this.props.onDuration(duration);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"mute\", function () {\n _this.callPlayer('setMuted', true);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"unmute\", function () {\n _this.callPlayer('setMuted', false);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"ref\", function (container) {\n _this.container = container;\n });\n\n return _this;\n }\n\n _createClass(DailyMotion, [{\n key: \"load\",\n value: function load(url) {\n var _this2 = this;\n\n var _this$props = this.props,\n controls = _this$props.controls,\n config = _this$props.config,\n onError = _this$props.onError,\n playing = _this$props.playing;\n\n var _url$match = url.match(MATCH_URL),\n _url$match2 = _slicedToArray(_url$match, 2),\n id = _url$match2[1];\n\n if (this.player) {\n this.player.load(id, {\n start: (0, _utils.parseStartTime)(url),\n autoplay: playing\n });\n return;\n }\n\n (0, _utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY, function (DM) {\n return DM.player;\n }).then(function (DM) {\n if (!_this2.container) return;\n var Player = DM.player;\n _this2.player = new Player(_this2.container, {\n width: '100%',\n height: '100%',\n video: id,\n params: _objectSpread({\n controls: controls,\n autoplay: _this2.props.playing,\n mute: _this2.props.muted,\n start: (0, _utils.parseStartTime)(url),\n origin: window.location.origin\n }, config.dailymotion.params),\n events: {\n apiready: _this2.props.onReady,\n seeked: function seeked() {\n return _this2.props.onSeek(_this2.player.currentTime);\n },\n video_end: _this2.props.onEnded,\n durationchange: _this2.onDurationChange,\n pause: _this2.props.onPause,\n playing: _this2.props.onPlay,\n waiting: _this2.props.onBuffer,\n error: function error(event) {\n return onError(event);\n }\n }\n });\n }, onError);\n }\n }, {\n key: \"play\",\n value: function play() {\n this.callPlayer('play');\n }\n }, {\n key: \"pause\",\n value: function pause() {\n this.callPlayer('pause');\n }\n }, {\n key: \"stop\",\n value: function stop() {// Nothing to do\n }\n }, {\n key: \"seekTo\",\n value: function seekTo(seconds) {\n this.callPlayer('seek', seconds);\n }\n }, {\n key: \"setVolume\",\n value: function setVolume(fraction) {\n this.callPlayer('setVolume', fraction);\n }\n }, {\n key: \"getDuration\",\n value: function getDuration() {\n return this.player.duration || null;\n }\n }, {\n key: \"getCurrentTime\",\n value: function getCurrentTime() {\n return this.player.currentTime;\n }\n }, {\n key: \"getSecondsLoaded\",\n value: function getSecondsLoaded() {\n return this.player.bufferedTime;\n }\n }, {\n key: \"render\",\n value: function render() {\n var display = this.props.display;\n var style = {\n width: '100%',\n height: '100%',\n display: display\n };\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n style: style\n }, /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n ref: this.ref\n }));\n }\n }]);\n\n return DailyMotion;\n}(_react.Component);\n\nexports.DailyMotion = DailyMotion;\n\n_defineProperty(DailyMotion, \"displayName\", 'DailyMotion');\n\n_defineProperty(DailyMotion, \"canPlay\", function (url) {\n return MATCH_URL.test(url);\n});\n\n_defineProperty(DailyMotion, \"loopOnEnded\", true);\n\nvar _default = (0, _singlePlayer[\"default\"])(DailyMotion);\n\nexports[\"default\"] = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = exports.Facebook = void 0;\n\nvar _react = _interopRequireWildcard(require(\"react\"));\n\nvar _utils = require(\"../utils\");\n\nvar _singlePlayer = _interopRequireDefault(require(\"../singlePlayer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \"function\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar SDK_URL = 'https://connect.facebook.net/en_US/sdk.js';\nvar SDK_GLOBAL = 'FB';\nvar SDK_GLOBAL_READY = 'fbAsyncInit';\nvar MATCH_URL = /^https?:\\/\\/(www\\.)?facebook\\.com.*\\/(video(s)?|watch|story)(\\.php?|\\/).+$/;\nvar PLAYER_ID_PREFIX = 'facebook-player-';\n\nvar Facebook = /*#__PURE__*/function (_Component) {\n _inherits(Facebook, _Component);\n\n var _super = _createSuper(Facebook);\n\n function Facebook() {\n var _this;\n\n _classCallCheck(this, Facebook);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"callPlayer\", _utils.callPlayer);\n\n _defineProperty(_assertThisInitialized(_this), \"playerID\", _this.props.config.facebook.playerId || \"\".concat(PLAYER_ID_PREFIX).concat((0, _utils.randomString)()));\n\n _defineProperty(_assertThisInitialized(_this), \"mute\", function () {\n _this.callPlayer('mute');\n });\n\n _defineProperty(_assertThisInitialized(_this), \"unmute\", function () {\n _this.callPlayer('unmute');\n });\n\n return _this;\n }\n\n _createClass(Facebook, [{\n key: \"load\",\n value: function load(url, isReady) {\n var _this2 = this;\n\n if (isReady) {\n (0, _utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY).then(function (FB) {\n return FB.XFBML.parse();\n });\n return;\n }\n\n (0, _utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY).then(function (FB) {\n FB.init({\n appId: _this2.props.config.facebook.appId,\n xfbml: true,\n version: _this2.props.config.facebook.version\n });\n FB.Event.subscribe('xfbml.render', function (msg) {\n // Here we know the SDK has loaded, even if onReady/onPlay\n // is not called due to a video that cannot be embedded\n _this2.props.onLoaded();\n });\n FB.Event.subscribe('xfbml.ready', function (msg) {\n if (msg.type === 'video' && msg.id === _this2.playerID) {\n _this2.player = msg.instance;\n\n _this2.player.subscribe('startedPlaying', _this2.props.onPlay);\n\n _this2.player.subscribe('paused', _this2.props.onPause);\n\n _this2.player.subscribe('finishedPlaying', _this2.props.onEnded);\n\n _this2.player.subscribe('startedBuffering', _this2.props.onBuffer);\n\n _this2.player.subscribe('finishedBuffering', _this2.props.onBufferEnd);\n\n _this2.player.subscribe('error', _this2.props.onError);\n\n if (!_this2.props.muted) {\n // Player is muted by default\n _this2.callPlayer('unmute');\n }\n\n _this2.props.onReady(); // For some reason Facebook have added `visibility: hidden`\n // to the iframe when autoplay fails, so here we set it back\n\n\n document.getElementById(_this2.playerID).querySelector('iframe').style.visibility = 'visible';\n }\n });\n });\n }\n }, {\n key: \"play\",\n value: function play() {\n this.callPlayer('play');\n }\n }, {\n key: \"pause\",\n value: function pause() {\n this.callPlayer('pause');\n }\n }, {\n key: \"stop\",\n value: function stop() {// Nothing to do\n }\n }, {\n key: \"seekTo\",\n value: function seekTo(seconds) {\n this.callPlayer('seek', seconds);\n }\n }, {\n key: \"setVolume\",\n value: function setVolume(fraction) {\n this.callPlayer('setVolume', fraction);\n }\n }, {\n key: \"getDuration\",\n value: function getDuration() {\n return this.callPlayer('getDuration');\n }\n }, {\n key: \"getCurrentTime\",\n value: function getCurrentTime() {\n return this.callPlayer('getCurrentPosition');\n }\n }, {\n key: \"getSecondsLoaded\",\n value: function getSecondsLoaded() {\n return null;\n }\n }, {\n key: \"render\",\n value: function render() {\n var style = {\n width: '100%',\n height: '100%'\n };\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n style: style,\n id: this.playerID,\n className: \"fb-video\",\n \"data-href\": this.props.url,\n \"data-autoplay\": this.props.playing ? 'true' : 'false',\n \"data-allowfullscreen\": \"true\",\n \"data-controls\": this.props.controls ? 'true' : 'false'\n });\n }\n }]);\n\n return Facebook;\n}(_react.Component);\n\nexports.Facebook = Facebook;\n\n_defineProperty(Facebook, \"displayName\", 'Facebook');\n\n_defineProperty(Facebook, \"canPlay\", function (url) {\n return MATCH_URL.test(url);\n});\n\n_defineProperty(Facebook, \"loopOnEnded\", true);\n\nvar _default = (0, _singlePlayer[\"default\"])(Facebook);\n\nexports[\"default\"] = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = exports.FilePlayer = void 0;\n\nvar _react = _interopRequireWildcard(require(\"react\"));\n\nvar _utils = require(\"../utils\");\n\nvar _singlePlayer = _interopRequireDefault(require(\"../singlePlayer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \"function\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _createForOfIteratorHelper(o) { if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(n); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nvar IOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;\nvar AUDIO_EXTENSIONS = /\\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\\?)/i;\nvar VIDEO_EXTENSIONS = /\\.(mp4|og[gv]|webm|mov|m4v)($|\\?)/i;\nvar HLS_EXTENSIONS = /\\.(m3u8)($|\\?)/i;\nvar HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js';\nvar HLS_GLOBAL = 'Hls';\nvar DASH_EXTENSIONS = /\\.(mpd)($|\\?)/i;\nvar DASH_SDK_URL = 'https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js';\nvar DASH_GLOBAL = 'dashjs';\nvar MATCH_DROPBOX_URL = /www\\.dropbox\\.com\\/.+/;\n\nfunction canPlay(url) {\n if (url instanceof Array) {\n var _iterator = _createForOfIteratorHelper(url),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var item = _step.value;\n\n if (typeof item === 'string' && canPlay(item)) {\n return true;\n }\n\n if (canPlay(item.src)) {\n return true;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return false;\n }\n\n if ((0, _utils.isMediaStream)(url)) {\n return true;\n }\n\n return AUDIO_EXTENSIONS.test(url) || VIDEO_EXTENSIONS.test(url) || HLS_EXTENSIONS.test(url) || DASH_EXTENSIONS.test(url);\n}\n\nfunction supportsWebKitPresentationMode(video) {\n if (!video) video = document.createElement('video'); // Check if Safari supports PiP, and is not on mobile (other than iPad)\n // iPhone safari appears to \"support\" PiP through the check, however PiP does not function\n\n return video.webkitSupportsPresentationMode && typeof video.webkitSetPresentationMode === 'function' && !/iPhone|iPod/.test(navigator.userAgent);\n}\n\nfunction canEnablePIP(url) {\n return canPlay(url) && (!!document.pictureInPictureEnabled || supportsWebKitPresentationMode()) && !AUDIO_EXTENSIONS.test(url);\n}\n\nvar FilePlayer = /*#__PURE__*/function (_Component) {\n _inherits(FilePlayer, _Component);\n\n var _super = _createSuper(FilePlayer);\n\n function FilePlayer() {\n var _this;\n\n _classCallCheck(this, FilePlayer);\n\n for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {\n _args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(_args));\n\n _defineProperty(_assertThisInitialized(_this), \"onReady\", function () {\n var _this$props;\n\n return (_this$props = _this.props).onReady.apply(_this$props, arguments);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onPlay\", function () {\n var _this$props2;\n\n return (_this$props2 = _this.props).onPlay.apply(_this$props2, arguments);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onBuffer\", function () {\n var _this$props3;\n\n return (_this$props3 = _this.props).onBuffer.apply(_this$props3, arguments);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onBufferEnd\", function () {\n var _this$props4;\n\n return (_this$props4 = _this.props).onBufferEnd.apply(_this$props4, arguments);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onPause\", function () {\n var _this$props5;\n\n return (_this$props5 = _this.props).onPause.apply(_this$props5, arguments);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onEnded\", function () {\n var _this$props6;\n\n return (_this$props6 = _this.props).onEnded.apply(_this$props6, arguments);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onError\", function () {\n var _this$props7;\n\n return (_this$props7 = _this.props).onError.apply(_this$props7, arguments);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onEnablePIP\", function () {\n var _this$props8;\n\n return (_this$props8 = _this.props).onEnablePIP.apply(_this$props8, arguments);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDisablePIP\", function (e) {\n var _this$props9 = _this.props,\n onDisablePIP = _this$props9.onDisablePIP,\n playing = _this$props9.playing;\n onDisablePIP(e);\n\n if (playing) {\n _this.play();\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onPresentationModeChange\", function (e) {\n if (_this.player && supportsWebKitPresentationMode(_this.player)) {\n var webkitPresentationMode = _this.player.webkitPresentationMode;\n\n if (webkitPresentationMode === 'picture-in-picture') {\n _this.onEnablePIP(e);\n } else if (webkitPresentationMode === 'inline') {\n _this.onDisablePIP(e);\n }\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onSeek\", function (e) {\n _this.props.onSeek(e.target.currentTime);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"mute\", function () {\n _this.player.muted = true;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"unmute\", function () {\n _this.player.muted = false;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"renderSourceElement\", function (source, index) {\n if (typeof source === 'string') {\n return /*#__PURE__*/_react[\"default\"].createElement(\"source\", {\n key: index,\n src: source\n });\n }\n\n return /*#__PURE__*/_react[\"default\"].createElement(\"source\", _extends({\n key: index\n }, source));\n });\n\n _defineProperty(_assertThisInitialized(_this), \"renderTrack\", function (track, index) {\n return /*#__PURE__*/_react[\"default\"].createElement(\"track\", _extends({\n key: index\n }, track));\n });\n\n _defineProperty(_assertThisInitialized(_this), \"ref\", function (player) {\n if (_this.player) {\n // Store previous player to be used by removeListeners()\n _this.prevPlayer = _this.player;\n }\n\n _this.player = player;\n });\n\n return _this;\n }\n\n _createClass(FilePlayer, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.addListeners(this.player);\n\n if (IOS) {\n this.player.load();\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.shouldUseAudio(this.props) !== this.shouldUseAudio(prevProps)) {\n this.removeListeners(this.prevPlayer);\n this.addListeners(this.player);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.removeListeners(this.player);\n\n if (this.hls) {\n this.hls.destroy();\n }\n }\n }, {\n key: \"addListeners\",\n value: function addListeners(player) {\n var playsinline = this.props.playsinline;\n player.addEventListener('canplay', this.onReady);\n player.addEventListener('play', this.onPlay);\n player.addEventListener('waiting', this.onBuffer);\n player.addEventListener('playing', this.onBufferEnd);\n player.addEventListener('pause', this.onPause);\n player.addEventListener('seeked', this.onSeek);\n player.addEventListener('ended', this.onEnded);\n player.addEventListener('error', this.onError);\n player.addEventListener('enterpictureinpicture', this.onEnablePIP);\n player.addEventListener('leavepictureinpicture', this.onDisablePIP);\n player.addEventListener('webkitpresentationmodechanged', this.onPresentationModeChange);\n\n if (playsinline) {\n player.setAttribute('playsinline', '');\n player.setAttribute('webkit-playsinline', '');\n player.setAttribute('x5-playsinline', '');\n }\n }\n }, {\n key: \"removeListeners\",\n value: function removeListeners(player) {\n player.removeEventListener('canplay', this.onReady);\n player.removeEventListener('play', this.onPlay);\n player.removeEventListener('waiting', this.onBuffer);\n player.removeEventListener('playing', this.onBufferEnd);\n player.removeEventListener('pause', this.onPause);\n player.removeEventListener('seeked', this.onSeek);\n player.removeEventListener('ended', this.onEnded);\n player.removeEventListener('error', this.onError);\n player.removeEventListener('enterpictureinpicture', this.onEnablePIP);\n player.removeEventListener('leavepictureinpicture', this.onDisablePIP);\n player.removeEventListener('webkitpresentationmodechanged', this.onPresentationModeChange);\n } // Proxy methods to prevent listener leaks\n\n }, {\n key: \"shouldUseAudio\",\n value: function shouldUseAudio(props) {\n if (props.config.file.forceVideo) {\n return false;\n }\n\n if (props.config.file.attributes.poster) {\n return false; // Use