(function(f){if(typeofexports==="object"&&typeofmodule!=="undefined"){module.exports=f()}elseif(typeofdefine==="function"&&define.amd){define([],f)}else{varg;if(typeofwindow!=="undefined"){g=window}elseif(typeofglobal!=="undefined"){g=global}elseif(typeofself!=="undefined"){g=self}else{g=this}g.ejs=f()}})(function(){vardefine,module,exports;returnfunction(){functione(t,n,r){functions(o,u){if(!n[o]){if(!t[o]){vara=typeofrequire=="function"&&require;if(!u&&a)returna(o,!0);if(i)returni(o,!0);varf=newError("Cannot find module '"+o+"'");throwf.code="MODULE_NOT_FOUND",f}varl=n[o]={exports:{}};t[o][0].call(l.exports,function(e){varn=t[o][1][e];returns(n?n:e)},l,l.exports,e,t,n,r)}returnn[o].exports}vari=typeofrequire=="function"&&require;for(varo=0;o<r.length;o++)s(r[o]);returns}returne}()({1:[function(require,module,exports){"use strict";varfs=require("fs");varpath=require("path");varutils=require("./utils");varscopeOptionWarned=false;var_VERSION_STRING=require("../package.json").version;var_DEFAULT_DELIMITER="%";var_DEFAULT_LOCALS_NAME="locals";var_NAME="ejs";var_REGEX_STRING="(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)";var_OPTS_PASSABLE_WITH_DATA=["delimiter","scope","context","debug","compileDebug","client","_with","rmWhitespace","strict","filename","async"];var_OPTS_PASSABLE_WITH_DATA_EXPRESS=_OPTS_PASSABLE_WITH_DATA.concat("cache");var_BOM=/^\uFEFF/;exports.cache=utils.cache;exports.fileLoader=fs.readFileSync;exports.localsName=_DEFAULT_LOCALS_NAME;exports.promiseImpl=newFunction("return this;")().Promise;exports.resolveInclude=function(name,filename,isDir){vardirname=path.dirname;varextname=path.extname;varresolve=path.resolve;varincludePath=resolve(isDir?filename:dirname(filename),name);varext=extname(name);if(!ext){includePath+=".ejs"}returnincludePath};functiongetIncludePath(path,options){varincludePath;varfilePath;varviews=options.views;if(path.charAt(0)=="/"){includePath=exports.resolveInclude(path.replace(/^\/*/,""),options.root||"/",true)}else{if(options.filename){filePath=exports.resolveInclude(path,options.filename);if(fs.existsSync(filePath)){includePath=filePath}}if(!includePath){if(Array.isArray(views)&&views.some(function(v){filePath=exports.resolveInclude(path,v,true);returnfs.existsSync(filePath)})){includePath=filePath}}if(!includePath){thrownewError('Could not find the include file "'+options.escapeFunction(path)+'"')}}returnincludePath}functionhandleCache(options,template){varfunc;varfilename=options.filename;varhasTemplate=arguments.length>1;if(options.cache){if(!filename){thrownewError("cache option requires a filename")}func=exports.cache.get(filename);if(func){returnfunc}if(!hasTemplate){template=fileLoader(filename).toString().replace(_BOM,"")}}elseif(!hasTemplate){if(!filename){thrownewError("Internal EJS error: no file name or template "+"provided")}template=fileLoader(filename).toString().replace(_BOM,"")}func=exports.compile(template,options);if(options.cache){exports.cache.set(filename,func)}returnfunc}functiontryHandleCache(options,data,cb){varresult;if(!cb){if(typeofexports.promiseImpl=="function"){returnnewexports.promiseImpl(function(resolve,reject){try{result=handleCache(options)(data);resolve(result)}catch(err){reject(err)}})}else{thrownewError("Please provide a callback function")}}else{try{result=handleCache(options)(data)}catch(err){returncb(err)}cb(null,result)}}functionfileLoader(filePath){returnexports.fileLoader(filePath)}functionincludeFile(path,options){varopts=utils.shallowCopy({},options);opts.filename=getIncludePath(path,opts);returnhandleCache(opts)}functionincludeSource(path,options){varopts=utils.shallowCopy({},options);varincludePath;vartemplate;includePath=getIncludePath(path,opts);template=fileLoader(includePath).toString().replace(_BOM,"");opts.filename=includePath;vartempl=newTemplate(template,opts);templ.generateSource();return{source:templ.source,filename:includePath,template:template}}functionrethrow(err,str,flnm,lineno,esc){varlines=str.split("\n");varstart=Math.max(lineno-3,0);varend=Math.min(lines.length,lineno+3);varfilename=esc(flnm);varcontext=lines.slice(start,end).map(function(line,i){varcurr=i+start+1;return(curr==lineno?" >> ":" ")+curr+"| "+line}).join("\n");err.path=filename;err.message=(filename||"ejs")+":"+lineno+"\n"+context+"\n\n"+err.message;throwerr}functionstripSemi(str){returnstr.replace(/;(\s*$)/,"$1")}exports.compile=functioncompile(template,opts){vartempl;if(opts&&opts.scope){if(!scopeOptionWarned){console.warn("`scope` option is deprecated and will be removed in EJS 3");scopeOptionWarned=true}if(!opts.context){opts.context=opts.scope}deleteopts.scope}templ=newTemplate(template,opts);returntempl.compile()};exports.render=function(template,d,o){vardata=d||{};varopts=o||{};if(arguments.length==2){utils.shallowCopyFromList(opts,data,_OPTS_PASSABLE_WITH_DATA)}returnhandleCache(opts,template)(data)};exports.renderFile=function(){varargs=Array.prototype.slice.call(arguments);varfilename=args.shift();varcb;varopts={filename:filename};vardata;varviewOpts;if(typeofarguments[arguments.length-1]=="function"){cb=args.pop()}if(args.length){data=args.shift();if(args.length){utils.shallowCopy(opts,args.pop())}else{if(data.settings){if(data.settings.views){opts.views=data.settings.views}if(data.settings["view cache"]){opts.cache=true}viewOpts=data.settings["view options"];if(viewOpts){utils.shallowCopy(opts,viewOpts)}}utils.shallowCopyFromList(opts,data,_OPTS_PASSABLE_WITH_DATA_EXPRESS)}opts.filename=filename}else{data={}}returntryHandleCache(opts,data,cb)};exports.clearCache=function(){exports.cache.reset()};functionTemplate(text,opts){opts=opts||{};varoptions={};this.templateText=text;this.mode=null;this.truncate=false;this.currentLine=1;this.source="";this.dependencies=[];options.client=opts.client||false;options.escapeFunction=opts.escape||utils.escapeXML;options.compileDebug=opts.compileDebug!==false;options.debug=!!opts.debug;options.filename=opts.filename;options.delimiter=opts.delimiter||exports.delimiter||_DEFAULT_DELIMITER;options.strict=opts.strict||false;options.context=opts.context;options.cache=opts.cache||false;options.rmWhitespace=opts.rmWhitespace;options.root=opts.root;options.outputFunctionName=opts.outputFunctionName;options.localsName=opts.localsName||exports.localsName||_DEFAULT_LOCALS_NAME;options.views=opts.views;options.async=opts.async;if(options.strict){options._with=false}else{options._with=typeofopts._with!="undefined"?opts._with:true}this.opts=options;this.regex=this.createRegex()}Template.modes={EVAL:"eval",ESCAPED:"escaped",RAW:"raw",COMMENT:"comment",LITERAL:"literal"};Template.prototype={createRegex:function(){varstr=_REGEX_STRING;vardelim=utils.escapeRegExpChars(this.opts.delimiter);str=str.replace(/%/g,delim);returnnewRegExp(str)},compile:function(){varsrc;varfn;varopts=this.opts;varprepended="";varappended="";varescapeFn=opts.escapeFunction;varasyncCtor;if(!this.source){this.generateSource();prepended+=" var __output = [], __append = __output.push.bind(__output);"+"\n";if(opts.outputFunctionName){prepended+=" var "+opts.outputFunctionName+" = __append;"+"\n"}if(opts._with!==false){prepended+=" with ("+opts.localsName+" || {}) {"+"\n";appended+=" }"+"\n"}appended+=' return __output.join("");'+"\n";this.source=prepended+this.source+appended}if(opts.compileDebug){src="var __line = 1"+"\n"+" , __lines = "+JSON.stringify(this.templateText)+"\n"+" , __filename = "+(opts.filename?JSON.stringify(opts.filename):"undefined")+";"+"\n"+"try {"+"\n"+this.source+"} catch (e) {"+"\n"+" rethrow(e, __lines, __filename, __line, escapeFn);"+"\n"+"}"+"\n"}else{src=this.source}if(opts.client){src="escapeFn = escapeFn || "+escapeFn.toString()+";"+"\n"+src;if(opts.compileDebug){src="rethrow = rethrow || "+rethrow.toString()+";"+"\n"+src}}if(opts.strict){src='"use strict";\n'+src}if(opts.debug){console.log(src)}try{if(opts.async){try{asyncCtor=newFunction("return (async function(){}).constructor;")()}catch(e){if(einstanceofSyntaxError){thrownewError("This environment does not support async/await")}else{throwe}}}else{asyncCtor=Function}fn=newasyncCtor(opts.localsName+", escapeFn, include, rethrow",src)}catch(e){if(einstanceofSyntaxError){if(opts.filename){e.message+=" in "+opts.filename}e.message+=" while compiling ejs\n\n";e.message+="If the above error is not helpful, you may want to try EJS-Lint:\n";e.message+="https://github.com/RyanZim/EJS-Lint";if(!e.async){e.message+="\n";e.message+="Or, if you meant to create an async function, pass async: true as an option."}}throwe}if(opts.client){fn.dependencies=this.dependencies;returnfn}varreturnedFn=function(data){varinclude=function(path,includeData){vard=utils.shallowCopy({},data);if(includeData){d=utils.shallowCopy(d,includeData)}returnincludeFile(path,opts)(d)};returnfn.apply(opts.context,[data||{},escapeFn,include,rethrow])};returnedFn.dependencies=this.dependencies;returnreturnedFn},generateSource:function(){varopts=this.opts;if(opts.rmWhitespace){this.templateText=this.templateText.replace(/\r/g,"").replace(/^\s+|\s+$/gm,"")}this.templateText=this.templateText.replace(/[\t]*<%_/gm,"<%_").replace(/_%>[\t]*/gm,"_%>");varself=this;varmatches=this.parseTemplateText();vard=this.opts.delimiter;if(matches&&matches.length){matches.forEach(function(line,index){varopening;varclosing;varinclude;varincludeOpts;varincludeObj;varincludeSrc;if(line.indexOf("<"+d)===0&&line.indexOf("<"+d+d)!==0){closing=matches[index+2];if(!(closing==d+">"||closing=="-"+d+">"||closing=="_"+d+">")){thrownewError('Could not find matching close tag for "'+line+'".')}}if(include=line.match(/^\s*include\s+(\S+)/)){opening=matches[index-1];if(opening&&(opening=="<"+d||opening=="<"+d+"-"||opening=="<"+d+"_")){includeOpts=utils.shallowCopy({},self.opts);includeObj=includeSource(include[1],includeOpts);if(self.opts.compileDebug){includeSrc=" ; (function(){"+"\n"+" var __line = 1"+"\n"+" , __lines = "+JSON.stringify(includeObj.template)+"\n"+" , __filename = "+JSON.stringify(includeObj.filename)+";"+"\n"+" try {"+"\n"+includeObj.source+" } catch (e) {"+"\n"+" rethrow(e, __lines, __filename, __line, escapeFn);"+"\n"+" }"+"\n"+" ; }).call(this)"+"\n"}else{includeSrc=" ; (function(){"+"\n"+includeObj.source+" ; }).call(this)"+"\n"}self.source+=includeSrc;self.dependencies.push(exports.resolveInclude(include[1],includeOpts.filename));return}}self.scanLine(line)})}},parseTemplateText:function(){varstr=this.templateText;varpat=this.regex;varresult=pat.exec(str);vararr=[];varfirstPos;while(result){firstPos=result.index;if(firstPos!==0){arr.push(str.substring(0,firstPos));str=str.slice(firstPos)}arr.push(result[0]);str=str.slice(result[0].length);result=pat.exec(str)}if(str){arr.push(str)}returnarr},_addOutput:function(line){if(this.truncate){line=line.replace(/^(?:\r\n|\r|\n)/,"");this.truncate=false}elseif(this.opts.rmWhitespace){line=line.replace(/^\n/,"")}if(!line){returnline}line=line.replace(/\\/g,"\\\\");line=line.replace(/\n/g,"\\n");line=line.replace(/\r/g,"\\r");line=line.replace(/"/g,'\\"');this.source+=' ; __append("'+line+'")'+"\n"},scanLine:function(line){varself=this;vard=this.opts.delimiter;varnewLineCount=0;newLineCount=line.split("\n").length-1;switch(line){case"<"+d:case"<"+d+"_":this.mode=Template.modes.EVAL;break;case"<"+d+"=":this.mode=Template.modes.ESCAPED;break;case"<"+d+"-":this.mode=Template.modes.RAW;break;case"<"+d+"#":this.mode=Template.modes.COMMENT;break;case"<"+d+d:this.mode=Template.modes.LITERAL;this.source+=' ; __append("'+line.replace("<"+d+d,"<"+d)+'")'+"\n";break;cased+d+">":this.mode=Template.modes.LITERAL;this.source+=' ; __append("'+line.replace(d+d+">",d+">")+'")'+"\n";break;cased+">":case"-"+d+">":case"_"+d+">":if(this.mode==Template.modes.LITERAL){this._addOutput(line)}this.mode=null;this.truncate=line.indexOf("-")===0||line.indexOf("_")===0;break;default:if(this.mode){switch(this.mode){caseTemplate.modes.EVAL:caseTemplate.modes.ESCAPED:caseTemplate.modes.RAW:if(line.lastIndexOf("//")>line.lastIndexOf("\n")){line+="\n"}}switch(this.mode){caseTemplate.modes.EVAL:this.source+=" ; "+line+"\n";break;caseTemplate.modes.ESCAPED:this.source+=" ; __append(escapeFn("+stripSemi(line)+"))"+"\n";break;caseTemplate.modes.RAW:this.source+=" ; __append("+stripSemi(line)+")"+"\n";break;caseTemplate.modes.COMMENT:break;caseTemplate.modes.LITERAL:this._addOutput(line);break}}else{this._addOutput(line)}}if(self.opts.compileDebug&&newLineCount){this.currentLine+=newLineCount;this.source+=" ; __line = "+this.currentLine+"\n"}}};exports.escapeXML=utils.escapeXML;exports.__express=exports.renderFile;if(require.extensions){require.extensions[".ejs"]=function(module,flnm){varfilename=flnm||module.filename;varoptions={filename:filename,client:true};vartemplate=fileLoader(filename).toString();varfn=exports.compile(template,options);module._compile("module.exports = "+fn.toString()+";",filename)}}exports.VERSION=_VERSION_STRING;exports.name=_NAME;if(typeofwindow!="undefined"){window.ejs=exports}},{"../package.json":6,"./utils":2,fs:3,path:4}],2:[function(require,module,exports){"use strict";varregExpChars=/[|\\{}()[\]^$+*?.]/g;exports.escapeRegExpChars=function(string){if(!string){return""}returnString(string).replace(regExpChars,"\\$&")};var_ENCODE_HTML_RULES={"&":"&","<":"<",">":">",'"':""","'":"'"};var_MATCH_HTML=/[&<>'"]/g;functionencode_char(c){return_ENCODE_HTML_RULES[c]||c}varescapeFuncStr="var _ENCODE_HTML_RULES = {\n"+' "&": "&"\n'+' , "<": "<"\n'+' , ">": ">"\n'+' , \'"\': """\n'+' , "\'": "'"\n'+" }\n"+" , _MATCH_HTML = /[&<>'\"]/g;\n"+"function encode_char(c) {\n"+" return _ENCODE_HTML_RULES[c] || c;\n"+"};\n";exports.escapeXML=function(markup){returnmarkup==undefined?"":String(markup).replace(_MATCH_HTML,encode_char)};exports.escapeXML.toString=function(){returnFunction.prototype.toString.call(this)+";\n"+escapeFuncStr};exports.shallowCopy=function(to,from){from=from||{};for(varpinfrom){to[p]=from[p]}returnto};exports.shallowCopyFromList=function(to,from,list){for(vari=0;i<list.length;i++){varp=list[i];if(typeoffrom[p]!="undefined"){to[p]=from[p]}}returnto};exports.cache={_data:{},set:function(key,val){this._data[key]=val},get:function(key){returnthis._data[key]},reset:function(){this._data={}}}},{}],3:[function(require,module,exports){},{}],4:[function(require,module,exports){(function(process){functionnormalizeArray(parts,allowAboveRoot){varup=0;for(vari=parts.length-1;i>=0;i--){varlast=parts[i];if(last==="."){parts.splice(i,1)}elseif(last===".."){parts.splice(i,1);up++}elseif(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}returnparts}varsplitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;varsplitPath=function(filename){returnsplitPathRe.exec(filename).slice(1)};exports.resolve=function(){varresolvedPath="",resolvedAbsolute=false;for(vari=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){varpath=i>=0?arguments[i]:process.cwd();if(typeofpath!=="string"){thrownewTypeError("Arguments to path.resolve must be strings")}elseif(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){varisAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){returnpath.charAt(0)==="/"};exports.join=function(){varpaths=Array.prototype.slice.call(arguments,0);returnexports.normalize(filter(paths,function(p,index){if(typeofp!=="string"){thrownewTypeError("Arguments to path.join must be strings")}returnp}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);functiontrim(arr){varstart=0;for(;start<arr.length;start++){if(arr[start]!=="")break}varend=arr.length-1;for(;end>=0;end--){if(arr[end]!=="")break}if(start>end)return[];returnarr.slice(start,end-start+1)}varfromParts=trim(from.split("/"));vartoParts=trim(to.split("/"));varlength=Math.min(fromParts.length,toParts.length);varsamePartsLength=length;for(vari=0;i<length;i++){if(fromParts[i]!==toParts[i]){samePartsLength=i;break}}varoutputParts=[];for(vari=samePartsLength;i<fromParts.length;i++){outputParts.push("..")}outputParts=outputParts.concat(toParts.slice(samePartsLength));returnoutputParts.join("/")};exports.sep="/";exports.delimiter=":";exports.dirname=function(path){varresult=splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}returnroot+dir};exports.basename=function(path,ext){varf=splitPath(path)[2];if(ext&&f.substr(-1*ext.length)===ext){f=f.substr(0,f.length-ext.length)}returnf};exports.extname=function(path){returnsplitPath(path)[3]};functionfilter(xs,f){if(xs.filter)returnxs.filter(f);varres=[];for(vari=0;i<xs.length;i++){if(f(xs[i],i,xs))res.push(xs[i])}returnres}varsubstr="ab".substr(-1)==="b"?function(str,start,len){returnstr.substr(start,len)}:function(str,start,len){if(start<0)start=str.length+start;returnstr.substr(start,len)}}).call(this,require("_process"))},{_process:5}],5:[function(require,module,exports){varprocess=module.exports={};varcachedSetTimeout;varcachedClearTimeout;functiondefaultSetTimout(){thrownewError("setTimeout has not been defined")}functiondefaultClearTimeout(){thrownewError("clearTimeout has not been defined")}(function(){try{if(typeofsetTimeout==="function"){cachedSetTimeout=setTimeout}else{cachedSetTimeout=defaultSetTimout}}catch(e){cachedSetTimeout=defaultSetTimout}try{if(typeofclearTimeout==="function"){cachedClearTimeout=clearTimeout}else{cachedClearTimeout=defaultClearTimeout}}catch(e){cachedClearTimeout=defaultClearTimeout}})();functionrunTimeout(fun){if(cachedSetTimeout===setTimeout){returnsetTimeout(fun,0)}if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout){cachedSetTimeout=setTimeout;returnsetTimeout(fun,0)}try{returncachedSetTimeout(fun,0)}catch(e){try{returncachedSetTimeout.call(null,fun,0)}catch(e){returncachedSetTimeout.call(this,fun,0)}}}functionrunClearTimeout(marker){if(cachedClearTimeout===clearTimeout){returnclearTimeout(marker)}if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout){cachedClearTimeout=clearTimeout;returnclearTimeout(marker)}try{returncachedClearTimeout(marker)}catch(e){try{returncachedClearTimeout.call(null,marker)}catch(e){returncachedClearTimeout.call(this,marker)}}}varqueue=[];vardraining=false;varcurrentQueue;varqueueIndex=-1;functioncleanUpNextTick(){if(!draining||!currentQueue){return}draining=false;if(currentQueue.length){queue=currentQueue.concat(queue)}else{queueIndex=-1}if(queue.length){drainQueue()}}functiondrainQueue(){if(draining){return}vartimeout=runTimeout(cleanUpNextTick);draining=true;varlen=queue.length;while(len){currentQueue=queue;queue=[];while(++queueIndex<len){if(currentQueue){currentQueue[queueIndex].run()}}queueIndex=-1;len=queue.length}currentQueue=null;draining=false;runClearTimeout(timeout)}process.nextTick=function(fun){varargs=newArray(arguments.length-1);if(arguments.length>1){for(vari=1;i<arguments.length;i++){args[i-1]=arguments[i]}}queue.push(newItem(fun,args));if(queue.length===1&&!draining){runTimeout(drainQueue)}};functionItem(fun,array){this.fun=fun;this.array=array}Item.prototype.run=function(){this.fun.apply(null,this.array)};process.title="browser";process.browser=true;process.env={};process.argv=[];process.version="";process.versions={};functionnoop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.prependListener=noop;process.prependOnceListener=noop;process.listeners=function(name){return[]};process.binding=function(name){thrownewError("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(dir){thrownewError("process.chdir is not supported")};process.umask=function(){return0}},{}],6:[function(require,module,exports){module.exports={name:"ejs",description:"Embedded JavaScript templates",keywords:["template","engine","ejs"],version:"2.6.0",author:"Matthew Eernisse <mde@fleegix.org> (http://fleegix.org)",contributors:["Timothy Gu <timothygu99@gmail.com> (https://timothygu.github.io)"],license:"Apache-2.0",main:"./lib/ejs.js",repository:{type:"git",url:"git://github.com/mde/ejs.git"},bugs:"https://github.com/mde/ejs/issues",homepage:"https://github.com/mde/ejs",dependencies:{},devDependencies:{browserify:"^13.1.1",eslint:"^4.14.0","git-directory-deploy":"^1.5.1",istanbul:"~0.4.3",jake:"^8.0.16",jsdoc:"^3.4.0","lru-cache":"^4.0.1",mocha:"^5.0.5","uglify-js":"^3.3.16"},engines:{node:">=0.10.0"},scripts:{test:"jake test",lint:'eslint "**/*.js" Jakefile',coverage:"istanbul cover node_modules/mocha/bin/_mocha",doc:"jake doc",devdoc:"jake doc[dev]"}}},{}]},{},[1])(1)});