var Handlebars={};Handlebars.VERSION="1.0.beta.6";Handlebars.helpers={};Handlebars.partials={};Handlebars.registerHelper=function(a,b,c){if(c){b.not=c}this.helpers[a]=b};Handlebars.registerPartial=function(a,b){this.partials[a]=b};Handlebars.registerHelper("helperMissing",function(a){if(arguments.length===2){return undefined}else{throw new Error("Could not find property '"+a+"'")}});var toString=Object.prototype.toString,functionType="[object Function]";Handlebars.registerHelper("blockHelperMissing",function(a,b){var c=b.inverse||function(){},d=b.fn;var e="";var f=toString.call(a);if(f===functionType){a=a.call(this)}if(a===true){return d(this)}else if(a===false||a==null){return c(this)}else if(f==="[object Array]"){if(a.length>0){for(var g=0,h=a.length;g0){for(var f=0,g=a.length;f2){z.push("'"+this.terminals_[w]+"'")}var A="";if(this.lexer.showPosition){A="Parse error on line "+(h+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+z.join(", ")+", got '"+this.terminals_[p]+"'"}else{A="Parse error on line "+(h+1)+": Unexpected "+(p==1?"end of input":"'"+(this.terminals_[p]||p)+"'")}this.parseError(A,{text:this.lexer.match,token:this.terminals_[p]||p,line:this.lexer.yylineno,loc:m,expected:z})}}if(s[0]instanceof Array&&s.length>1){throw new Error("Parse Error: multiple actions possible at state: "+r+", token: "+p)}switch(s[0]){case 1:c.push(p);d.push(this.lexer.yytext);e.push(this.lexer.yylloc);c.push(s[1]);p=null;if(!q){i=this.lexer.yyleng;g=this.lexer.yytext;h=this.lexer.yylineno;m=this.lexer.yylloc;if(j>0)j--}else{p=q;q=null}break;case 2:x=this.productions_[s[1]][1];v.$=d[d.length-x];v._$={first_line:e[e.length-(x||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(x||1)].first_column,last_column:e[e.length-1].last_column};u=this.performAction.call(v,g,i,h,this.yy,s[1],d,e);if(typeof u!=="undefined"){return u}if(x){c=c.slice(0,-1*x*2);d=d.slice(0,-1*x);e=e.slice(0,-1*x)}c.push(this.productions_[s[1]][0]);d.push(v.$);e.push(v._$);y=f[c[c.length-2]][c[c.length-1]];c.push(y);break;case 3:return true}}return true}};var b=function(){var a={EOF:1,parseError:function b(a,b){if(this.yy.parseError){this.yy.parseError(a,b)}else{throw new Error(a)}},setInput:function(a){this._input=a;this._more=this._less=this.done=false;this.yylineno=this.yyleng=0;this.yytext=this.matched=this.match="";this.conditionStack=["INITIAL"];this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0};return this},input:function(){var a=this._input[0];this.yytext+=a;this.yyleng++;this.match+=a;this.matched+=a;var b=a.match(/\n/);if(b)this.yylineno++;this._input=this._input.slice(1);return a},unput:function(a){this._input=a+this._input;return this},more:function(){this._more=true;return this},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;if(a.length<20){a+=this._input.substr(0,20-a.length)}return(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput();var b=(new Array(a.length+1)).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done){return this.EOF}if(!this._input)this.done=true;var a,b,c,d;if(!this._more){this.yytext="";this.match=""}var e=this._currentRules();for(var f=0;f/,/^\{\{#/,/^\{\{\//,/^\{\{\^/,/^\{\{\s*else\b/,/^\{\{\{/,/^\{\{&/,/^\{\{![\s\S]*?\}\}/,/^\{\{/,/^=/,/^\.(?=[} ])/,/^\.\./,/^[\/.]/,/^\s+/,/^\}\}\}/,/^\}\}/,/^"(\\["]|[^"])*"/,/^true(?=[}\s])/,/^false(?=[}\s])/,/^[0-9]+(?=[}\s])/,/^[a-zA-Z0-9_$-]+(?=[=}\s\/.])/,/^\[[^\]]*\]/,/^./,/^$/];a.conditions={mu:{rules:[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26],inclusive:false},emu:{rules:[2],inclusive:false},INITIAL:{rules:[0,1,26],inclusive:true}};return a}();a.lexer=b;return a}();if(typeof require!=="undefined"&&typeof exports!=="undefined"){exports.parser=handlebars;exports.parse=function(){return handlebars.parse.apply(handlebars,arguments)};exports.main=function a(a){if(!a[1])throw new Error("Usage: "+a[0]+" FILE");if(typeof process!=="undefined"){var b=require("fs").readFileSync(require("path").join(process.cwd(),a[1]),"utf8")}else{var c=require("file").path(require("file").cwd());var b=c.join(a[1]).read({charset:"utf-8"})}return exports.parser.parse(b)};if(typeof module!=="undefined"&&require.main===module){exports.main(typeof process!=="undefined"?process.argv.slice(1):require("system").args)}}Handlebars.Parser=handlebars;Handlebars.parse=function(a){Handlebars.Parser.yy=Handlebars.AST;return Handlebars.Parser.parse(a)};Handlebars.print=function(a){return(new Handlebars.PrintVisitor).accept(a)};Handlebars.logger={DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(a,b){}};Handlebars.log=function(a,b){Handlebars.logger.log(a,b)};(function(){Handlebars.AST={};Handlebars.AST.ProgramNode=function(a,b){this.type="program";this.statements=a;if(b){this.inverse=new Handlebars.AST.ProgramNode(b)}};Handlebars.AST.MustacheNode=function(a,b,c){this.type="mustache";this.id=a[0];this.params=a.slice(1);this.hash=b;this.escaped=!c};Handlebars.AST.PartialNode=function(a,b){this.type="partial";this.id=a;this.context=b};var a=function(a,b){if(a.original!==b.original){throw new Handlebars.Exception(a.original+" doesn't match "+b.original)}};Handlebars.AST.BlockNode=function(b,c,d){a(b.id,d);this.type="block";this.mustache=b;this.program=c};Handlebars.AST.InverseNode=function(b,c,d){a(b.id,d);this.type="inverse";this.mustache=b;this.program=c};Handlebars.AST.ContentNode=function(a){this.type="content";this.string=a};Handlebars.AST.HashNode=function(a){this.type="hash";this.pairs=a};Handlebars.AST.IdNode=function(a){this.type="ID";this.original=a.join(".");var b=[],c=0;for(var d=0,e=a.length;d":">",'"':""","'":"'","`":"`"};var b=/&(?!\w+;)|[<>"'`]/g;var c=/[&<>"'`]/;var d=function(b){return a[b]||"&"};Handlebars.Utils={escapeExpression:function(a){if(a instanceof Handlebars.SafeString){return a.toString()}else if(a==null||a===false){return""}if(!c.test(a)){return a}return a.replace(b,d)},isEmpty:function(a){if(typeof a==="undefined"){return true}else if(a===null){return true}else if(a===false){return true}else if(Object.prototype.toString.call(a)==="[object Array]"&&a.length===0){return true}else{return false}}}})();Handlebars.Compiler=function(){};Handlebars.JavaScriptCompiler=function(){};(function(a,b){a.OPCODE_MAP={appendContent:1,getContext:2,lookupWithHelpers:3,lookup:4,append:5,invokeMustache:6,appendEscaped:7,pushString:8,truthyOrFallback:9,functionOrFallback:10,invokeProgram:11,invokePartial:12,push:13,assignToHash:15,pushStringParam:16};a.MULTI_PARAM_OPCODES={appendContent:1,getContext:1,lookupWithHelpers:2,lookup:1,invokeMustache:3,pushString:1,truthyOrFallback:1,functionOrFallback:1,invokeProgram:3,invokePartial:1,push:1,assignToHash:1,pushStringParam:1};a.DISASSEMBLE_MAP={};for(var c in a.OPCODE_MAP){var d=a.OPCODE_MAP[c];a.DISASSEMBLE_MAP[d]=c}a.multiParamSize=function(b){return a.MULTI_PARAM_OPCODES[a.DISASSEMBLE_MAP[b]]};a.prototype={compiler:a,disassemble:function(){var b=this.opcodes,c,d;var e=[],f,g,h;for(var i=0,j=b.length;i0){this.source[1]=this.source[1]+", "+b.join(", ")}if(!this.isChild){var c=[];for(var d in this.context.aliases){this.source[1]=this.source[1]+", "+d+"="+this.context.aliases[d]}}if(this.source[1]){this.source[1]="var "+this.source[1].substring(2)+";"}if(!this.isChild){this.source[1]+="\n"+this.context.programs.join("\n")+"\n"}if(!this.environment.isSimple){this.source.push("return buffer;")}var e=this.isChild?["depth0","data"]:["Handlebars","depth0","helpers","partials","data"];for(var f=0,g=this.environment.depths.list.length;fthis.stackVars.length){this.stackVars.push("stack"+this.stackSlot)}return"stack"+this.stackSlot},popStack:function(){return"stack"+this.stackSlot--},topStack:function(){return"stack"+this.stackSlot},quotedString:function(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r")+'"'}};var e=("break else new var"+" case finally return void"+" catch for switch while"+" continue function this with"+" default if throw"+" delete in try"+" do instanceof typeof"+" abstract enum int short"+" boolean export interface static"+" byte extends long super"+" char final native synchronized"+" class float package throws"+" const goto private transient"+" debugger implements protected volatile"+" double import public let yield").split(" ");var f=b.RESERVED_WORDS={};for(var g=0,h=e.length;g