text: shadow$provide.module$node_modules$entities$lib$encode=function(global,process,require,module,exports,shadow$shims){function getInverseObj(obj){return Object.keys(obj).sort().reduce(function(inverse,name){inverse[obj[name]]="\x26"+name+";";return inverse},{})}function getInverseReplacer(inverse){var single=[],multiple=[];Object.keys(inverse).forEach(function(k){1===k.length?single.push("\\"+k):multiple.push(k)});multiple.unshift("["+single.join("")+"]");return new RegExp(multiple.join("|"),"g")}function singleCharReplacer(c){return"\x26#x"+
  c.charCodeAt(0).toString(16).toUpperCase()+";"}function astralReplacer(c){var high=c.charCodeAt(0);c=c.charCodeAt(1);return"\x26#x"+(1024*(high-55296)+c-56320+65536).toString(16).toUpperCase()+";"}function getInverse(inverse,re){function func(name){return inverse[name]}return function(data){return data.replace(re,func).replace(re_astralSymbols,astralReplacer).replace(re_nonASCII,singleCharReplacer)}}global=getInverseObj(require("module$node_modules$entities$maps$xml_json"));process=getInverseReplacer(global);
  exports.XML=getInverse(global,process);require=getInverseObj(require("module$node_modules$entities$maps$entities_json"));process=getInverseReplacer(require);exports.HTML=getInverse(require,process);var re_nonASCII=/[^\0-\x7F]/g,re_astralSymbols=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,re_xmlChars=getInverseReplacer(global);exports.escape=function(data){return data.replace(re_xmlChars,singleCharReplacer).replace(re_astralSymbols,astralReplacer).replace(re_nonASCII,singleCharReplacer)}}
  //# sourceMappingURL=module$node_modules$entities$lib$encode.js.map
  