text: define(["module","text"],function(module){"use strict";function preProcessTemplate(e,r,a){return r=r.replace(/<%=\s+rp\(['"]([^'"]*)["']\)\s+%>/g,function(r,a){var t=e[a];return t?STATIC_URL_PLACEHOLDER+"/static/hashed/"+t[0]:(console.warn("Unresolved rp: "+a),a)}),a&&(r=r.replace(/<!-+\s+DEBUG_ONLY\s+-+>((?!END_DEBUG_ONLY)[\s\S])*<!-+\s+END_DEBUG_ONLY\s+-+>/g,""),r=r.replace(/<!--(.|\s)*?-->/g,"")),r}function jsEscape(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")}function makeWrapper(e){var r=jsEscape(e);return"(function () {\n     var isDefault = window.location.hostname === 'www.humblebundle.com';\n     var staticUrl = isDefault ? 'https://humblebundle-a.akamaihd.net' : '';\n     return '"+r+"'.replace(/"+STATIC_URL_PLACEHOLDER+"/g, staticUrl)\n})();\n"}var STATIC_URL_PLACEHOLDER="xSTATIC_URLx",buildMap={},hbTemplate={load:function(name,req,onLoad,config){var filePath=req.toUrl(name);if(config.isBuild){var resource_manifest=JSON.parse(fs.readFileSync(req.toUrl("resource_manifest.json"))),template=fs.readFileSync(filePath,"utf8"),preProcessed=makeWrapper(hbTemplate.preProcess(resource_manifest,template,!0));buildMap[name]=preProcessed,onLoad(preProcessed)}else req(["text!resource_manifest","text!"+name],function(resource_manifest,template){resource_manifest=JSON.parse(resource_manifest);var withStaticUrl=eval(makeWrapper(hbTemplate.preProcess(resource_manifest,template,!1)));onLoad(withStaticUrl)})},write:function(e,r,a){if(r in buildMap){var t=buildMap[r];a("define('"+e+"!"+r+"', function() { return "+t+"});\n")}},preProcess:preProcessTemplate};return hbTemplate});
  //# sourceMappingURL=hbTemplate.js.map