(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)