{"version":3,"file":"escape-html-84d56fd2.js","sources":["../../../node_modules/escape-html/index.js"],"sourcesContent":["/*!\n * escape-html\n * Copyright(c) 2012-2013 TJ Holowaychuk\n * Copyright(c) 2015 Andreas Lubbe\n * Copyright(c) 2015 Tiancheng \"Timothy\" Gu\n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module variables.\n * @private\n */\n\nvar matchHtmlRegExp = /[\"'&<>]/;\n\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = escapeHtml;\n\n/**\n * Escape special characters in the given string of html.\n *\n * @param {string} string The string to escape for inserting into HTML\n * @return {string}\n * @public\n */\n\nfunction escapeHtml(string) {\n var str = '' + string;\n var match = matchHtmlRegExp.exec(str);\n\n if (!match) {\n return str;\n }\n\n var escape;\n var html = '';\n var index = 0;\n var lastIndex = 0;\n\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34: // \"\n escape = '"';\n break;\n case 38: // &\n escape = '&';\n break;\n case 39: // '\n escape = ''';\n break;\n case 60: // <\n escape = '<';\n break;\n case 62: // >\n escape = '>';\n break;\n default:\n continue;\n }\n\n if (lastIndex !== index) {\n html += str.substring(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n\n return lastIndex !== index\n ? html + str.substring(lastIndex, index)\n : html;\n}\n"],"names":["matchHtmlRegExp","string","escape","str","match","exec","html","index","lastIndex","length","charCodeAt","substring"],"mappings":";;;;;;;GAeA,IAAIA,EAAkB,qBAiBtB,SAAoBC,GAClB,IAOIC,EAPAC,EAAM,GAAKF,EACXG,EAAQJ,EAAgBK,KAAKF,GAEjC,IAAKC,EACI,OAAAD,EAIT,IAAIG,EAAO,GACPC,EAAQ,EACRC,EAAY,EAEhB,IAAKD,EAAQH,EAAMG,MAAOA,EAAQJ,EAAIM,OAAQF,IAAS,CAC7C,OAAAJ,EAAIO,WAAWH,IACrB,KAAK,GACML,EAAA,SACT,MACF,KAAK,GACMA,EAAA,QACT,MACF,KAAK,GACMA,EAAA,QACT,MACF,KAAK,GACMA,EAAA,OACT,MACF,KAAK,GACMA,EAAA,OACT,MACF,QACE,SAGAM,IAAcD,IACRD,GAAAH,EAAIQ,UAAUH,EAAWD,IAGnCC,EAAYD,EAAQ,EACZD,GAAAJ,CACT,CAED,OAAOM,IAAcD,EACjBD,EAAOH,EAAIQ,UAAUH,EAAWD,GAChCD,CACN","x_google_ignoreList":[0]}