var bet365=bet365||{},handlebars,errorProps,lobbyAnimation,ticker,poller;bet365.AdvancedTicketPurchase=bet365.AdvancedTicketPurchase||{};$(window).load(function(){"use strict";bet365.AdvancedTicketPurchase.BindClick($)});bet365.AdvancedTicketPurchase={BindClick:function(n){n(".AdvancedTicket").click(function(){var t=n(this),i=t.attr("data-schedule-key"),r=t.attr("data-game-name"),u=t.attr("data-game-type");bet365.AdvancedTicketPurchase.Popup(n,i,r,u)})},Popup:function(n,t,i,r){var u=bet365.cmsCore.getPageAttributes(n),f=u.appPath+"BingoAdvancedTicket/Purchase?ScheduleKey="+t+"&GameName="+i+"&GameType="+r;window.open(f,"GGG","height=500,width=500,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes")}};this.Handlebars={},function(n){n.VERSION="1.0.0-rc.3";n.COMPILER_REVISION=2;n.REVISION_CHANGES={1:"<= 1.0.rc.2",2:">= 1.0.0-rc.3"};n.helpers={};n.partials={};n.registerHelper=function(n,t,i){i&&(t.not=i);this.helpers[n]=t};n.registerPartial=function(n,t){this.partials[n]=t};n.registerHelper("helperMissing",function(n){if(arguments.length===2)return undefined;throw new Error("Could not find property '"+n+"'");});var t=Object.prototype.toString,i="[object Function]";n.registerHelper("blockHelperMissing",function(r,u){var f=u.inverse||function(){},e=u.fn,o=t.call(r);return o===i&&(r=r.call(this)),r===!0?e(this):r===!1||r==null?f(this):o==="[object Array]"?r.length>0?n.helpers.each(r,u):f(this):e(r)});n.K=function(){};n.createFrame=Object.create||function(t){n.K.prototype=t;var i=new n.K;return n.K.prototype=null,i};n.logger={DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,methodMap:{0:"debug",1:"info",2:"warn",3:"error"},log:function(t,i){if(n.logger.level<=t){var r=n.logger.methodMap[t];typeof console!="undefined"&&console[r]&&console[r].call(console,i)}}};n.log=function(t,i){n.logger.log(t,i)};n.registerHelper("each",function(t,i){var o=i.fn,h=i.inverse,u=0,f="",r,s,e;if(i.data&&(r=n.createFrame(i.data)),t&&typeof t=="object")if(t instanceof Array)for(s=t.length;u<s;u++)r&&(r.index=u),f=f+o(t[u],{data:r});else for(e in t)t.hasOwnProperty(e)&&(r&&(r.key=e),f=f+o(t[e],{data:r}),u++);return u===0&&(f=h(this)),f});n.registerHelper("if",function(r,u){var f=t.call(r);return f===i&&(r=r.call(this)),!r||n.Utils.isEmpty(r)?u.inverse(this):u.fn(this)});n.registerHelper("unless",function(t,i){var r=i.fn,u=i.inverse;return i.fn=u,i.inverse=r,n.helpers["if"].call(this,t,i)});n.registerHelper("with",function(n,t){return t.fn(n)});n.registerHelper("log",function(t,i){var r=i.data&&i.data.level!=null?parseInt(i.data.level,10):1;n.log(r,t)})}(this.Handlebars);handlebars=function(){function t(){this.yy={}}var n={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,simpleInverse:6,statements:7,statement:8,openInverse:9,closeBlock:10,openBlock:11,mustache:12,partial:13,CONTENT:14,COMMENT:15,OPEN_BLOCK:16,inMustache:17,CLOSE:18,OPEN_INVERSE:19,OPEN_ENDBLOCK:20,path:21,OPEN:22,OPEN_UNESCAPED:23,OPEN_PARTIAL:24,partialName:25,params:26,hash:27,DATA:28,param:29,STRING:30,INTEGER:31,BOOLEAN:32,hashSegments:33,hashSegment:34,ID:35,EQUALS:36,PARTIAL_NAME:37,pathSegments:38,SEP:39,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"OPEN_PARTIAL",28:"DATA",30:"STRING",31:"INTEGER",32:"BOOLEAN",35:"ID",36:"EQUALS",37:"PARTIAL_NAME",39:"SEP"},productions_:[0,[3,2],[4,2],[4,3],[4,2],[4,1],[4,1],[4,0],[7,1],[7,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,3],[13,4],[6,2],[17,3],[17,2],[17,2],[17,1],[17,1],[26,2],[26,1],[29,1],[29,1],[29,1],[29,1],[29,1],[27,1],[33,2],[33,1],[34,3],[34,3],[34,3],[34,3],[34,3],[25,1],[21,1],[38,3],[38,1]],performAction:function(n,t,i,r,u,f){var e=f.length-1;switch(u){case 1:return f[e-1];case 2:this.$=new r.ProgramNode([],f[e]);break;case 3:this.$=new r.ProgramNode(f[e-2],f[e]);break;case 4:this.$=new r.ProgramNode(f[e-1],[]);break;case 5:this.$=new r.ProgramNode(f[e]);break;case 6:this.$=new r.ProgramNode([],[]);break;case 7:this.$=new r.ProgramNode([]);break;case 8:this.$=[f[e]];break;case 9:f[e-1].push(f[e]);this.$=f[e-1];break;case 10:this.$=new r.BlockNode(f[e-2],f[e-1].inverse,f[e-1],f[e]);break;case 11:this.$=new r.BlockNode(f[e-2],f[e-1],f[e-1].inverse,f[e]);break;case 12:this.$=f[e];break;case 13:this.$=f[e];break;case 14:this.$=new r.ContentNode(f[e]);break;case 15:this.$=new r.CommentNode(f[e]);break;case 16:this.$=new r.MustacheNode(f[e-1][0],f[e-1][1]);break;case 17:this.$=new r.MustacheNode(f[e-1][0],f[e-1][1]);break;case 18:this.$=f[e-1];break;case 19:this.$=new r.MustacheNode(f[e-1][0],f[e-1][1]);break;case 20:this.$=new r.MustacheNode(f[e-1][0],f[e-1][1],!0);break;case 21:this.$=new r.PartialNode(f[e-1]);break;case 22:this.$=new r.PartialNode(f[e-2],f[e-1]);break;case 24:this.$=[[f[e-2]].concat(f[e-1]),f[e]];break;case 25:this.$=[[f[e-1]].concat(f[e]),null];break;case 26:this.$=[[f[e-1]],f[e]];break;case 27:this.$=[[f[e]],null];break;case 28:this.$=[[new r.DataNode(f[e])],null];break;case 29:f[e-1].push(f[e]);this.$=f[e-1];break;case 30:this.$=[f[e]];break;case 31:this.$=f[e];break;case 32:this.$=new r.StringNode(f[e]);break;case 33:this.$=new r.IntegerNode(f[e]);break;case 34:this.$=new r.BooleanNode(f[e]);break;case 35:this.$=new r.DataNode(f[e]);break;case 36:this.$=new r.HashNode(f[e]);break;case 37:f[e-1].push(f[e]);this.$=f[e-1];break;case 38:this.$=[f[e]];break;case 39:this.$=[f[e-2],f[e]];break;case 40:this.$=[f[e-2],new r.StringNode(f[e])];break;case 41:this.$=[f[e-2],new r.IntegerNode(f[e])];break;case 42:this.$=[f[e-2],new r.BooleanNode(f[e])];break;case 43:this.$=[f[e-2],new r.DataNode(f[e])];break;case 44:this.$=new r.PartialNameNode(f[e]);break;case 45:this.$=new r.IdNode(f[e]);break;case 46:f[e-2].push(f[e]);this.$=f[e-2];break;case 47:this.$=[f[e]]}},table:[{3:1,4:2,5:[2,7],6:3,7:4,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],22:[1,14],23:[1,15],24:[1,16]},{1:[3]},{5:[1,17]},{5:[2,6],7:18,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,6],22:[1,14],23:[1,15],24:[1,16]},{5:[2,5],6:20,8:21,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],20:[2,5],22:[1,14],23:[1,15],24:[1,16]},{17:23,18:[1,22],21:24,28:[1,25],35:[1,27],38:26},{5:[2,8],14:[2,8],15:[2,8],16:[2,8],19:[2,8],20:[2,8],22:[2,8],23:[2,8],24:[2,8]},{4:28,6:3,7:4,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],20:[2,7],22:[1,14],23:[1,15],24:[1,16]},{4:29,6:3,7:4,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],20:[2,7],22:[1,14],23:[1,15],24:[1,16]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],24:[2,12]},{5:[2,13],14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],24:[2,13]},{5:[2,14],14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],24:[2,14]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],24:[2,15]},{17:30,21:24,28:[1,25],35:[1,27],38:26},{17:31,21:24,28:[1,25],35:[1,27],38:26},{17:32,21:24,28:[1,25],35:[1,27],38:26},{25:33,37:[1,34]},{1:[2,1]},{5:[2,2],8:21,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,2],22:[1,14],23:[1,15],24:[1,16]},{17:23,21:24,28:[1,25],35:[1,27],38:26},{5:[2,4],7:35,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,4],22:[1,14],23:[1,15],24:[1,16]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],24:[2,9]},{5:[2,23],14:[2,23],15:[2,23],16:[2,23],19:[2,23],20:[2,23],22:[2,23],23:[2,23],24:[2,23]},{18:[1,36]},{18:[2,27],21:41,26:37,27:38,28:[1,45],29:39,30:[1,42],31:[1,43],32:[1,44],33:40,34:46,35:[1,47],38:26},{18:[2,28]},{18:[2,45],28:[2,45],30:[2,45],31:[2,45],32:[2,45],35:[2,45],39:[1,48]},{18:[2,47],28:[2,47],30:[2,47],31:[2,47],32:[2,47],35:[2,47],39:[2,47]},{10:49,20:[1,50]},{10:51,20:[1,50]},{18:[1,52]},{18:[1,53]},{18:[1,54]},{18:[1,55],21:56,35:[1,27],38:26},{18:[2,44],35:[2,44]},{5:[2,3],8:21,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,3],22:[1,14],23:[1,15],24:[1,16]},{14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],24:[2,17]},{18:[2,25],21:41,27:57,28:[1,45],29:58,30:[1,42],31:[1,43],32:[1,44],33:40,34:46,35:[1,47],38:26},{18:[2,26]},{18:[2,30],28:[2,30],30:[2,30],31:[2,30],32:[2,30],35:[2,30]},{18:[2,36],34:59,35:[1,60]},{18:[2,31],28:[2,31],30:[2,31],31:[2,31],32:[2,31],35:[2,31]},{18:[2,32],28:[2,32],30:[2,32],31:[2,32],32:[2,32],35:[2,32]},{18:[2,33],28:[2,33],30:[2,33],31:[2,33],32:[2,33],35:[2,33]},{18:[2,34],28:[2,34],30:[2,34],31:[2,34],32:[2,34],35:[2,34]},{18:[2,35],28:[2,35],30:[2,35],31:[2,35],32:[2,35],35:[2,35]},{18:[2,38],35:[2,38]},{18:[2,47],28:[2,47],30:[2,47],31:[2,47],32:[2,47],35:[2,47],36:[1,61],39:[2,47]},{35:[1,62]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],24:[2,10]},{21:63,35:[1,27],38:26},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],24:[2,11]},{14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],24:[2,16]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],24:[2,19]},{5:[2,20],14:[2,20],15:[2,20],16:[2,20],19:[2,20],20:[2,20],22:[2,20],23:[2,20],24:[2,20]},{5:[2,21],14:[2,21],15:[2,21],16:[2,21],19:[2,21],20:[2,21],22:[2,21],23:[2,21],24:[2,21]},{18:[1,64]},{18:[2,24]},{18:[2,29],28:[2,29],30:[2,29],31:[2,29],32:[2,29],35:[2,29]},{18:[2,37],35:[2,37]},{36:[1,61]},{21:65,28:[1,69],30:[1,66],31:[1,67],32:[1,68],35:[1,27],38:26},{18:[2,46],28:[2,46],30:[2,46],31:[2,46],32:[2,46],35:[2,46],39:[2,46]},{18:[1,70]},{5:[2,22],14:[2,22],15:[2,22],16:[2,22],19:[2,22],20:[2,22],22:[2,22],23:[2,22],24:[2,22]},{18:[2,39],35:[2,39]},{18:[2,40],35:[2,40]},{18:[2,41],35:[2,41]},{18:[2,42],35:[2,42]},{18:[2,43],35:[2,43]},{5:[2,18],14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],24:[2,18]}],defaultActions:{17:[2,1],25:[2,28],38:[2,26],57:[2,24]},parseError:function(n){throw new Error(n);},parse:function(n){function it(){var n;return n=k.lexer.lex()||1,typeof n!="number"&&(n=k.symbols_[n]||n),n}var k=this,r=[0],f=[null],t=[],h=this.table,d="",c=0,g=0,y=0,l,nt,i,p,o,u,w,s,a,e,tt,v,b;for(this.lexer.setInput(n),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc=="undefined"&&(this.lexer.yylloc={}),l=this.lexer.yylloc,t.push(l),nt=this.lexer.options&&this.lexer.options.ranges,typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError),s={};;){if(o=r[r.length-1],this.defaultActions[o]?u=this.defaultActions[o]:((i===null||typeof i=="undefined")&&(i=it()),u=h[o]&&h[o][i]),(typeof u=="undefined"||!u.length||!u[0])&&(b="",!y)){v=[];for(a in h[o])this.terminals_[a]&&a>2&&v.push("'"+this.terminals_[a]+"'");b=this.lexer.showPosition?"Parse error on line "+(c+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[i]||i)+"'":"Parse error on line "+(c+1)+": Unexpected "+(i==1?"end of input":"'"+(this.terminals_[i]||i)+"'");this.parseError(b,{text:this.lexer.match,token:this.terminals_[i]||i,line:this.lexer.yylineno,loc:l,expected:v})}if(u[0]instanceof Array&&u.length>1)throw new Error("Parse Error: multiple actions possible at state: "+o+", token: "+i);switch(u[0]){case 1:r.push(i);f.push(this.lexer.yytext);t.push(this.lexer.yylloc);r.push(u[1]);i=null;p?(i=p,p=null):(g=this.lexer.yyleng,d=this.lexer.yytext,c=this.lexer.yylineno,l=this.lexer.yylloc,y>0&&y--);break;case 2:if(e=this.productions_[u[1]][1],s.$=f[f.length-e],s._$={first_line:t[t.length-(e||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(e||1)].first_column,last_column:t[t.length-1].last_column},nt&&(s._$.range=[t[t.length-(e||1)].range[0],t[t.length-1].range[1]]),w=this.performAction.call(s,d,g,c,this.yy,u[1],f,t),typeof w!="undefined")return w;e&&(r=r.slice(0,-2*e),f=f.slice(0,-1*e),t=t.slice(0,-1*e));r.push(this.productions_[u[1]][0]);f.push(s.$);t.push(s._$);tt=h[r[r.length-2]][r[r.length-1]];r.push(tt);break;case 3:return!0}}return!0}},i=function(){var n={EOF:1,parseError:function(n,t){if(this.yy.parser)this.yy.parser.parseError(n,t);else throw new Error(n);},setInput:function(n){return this._input=n,this._more=this._less=this.done=!1,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},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var n=this._input[0],t;return this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n,t=n.match(/(?:\r\n?|\n).*/g),t?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},unput:function(n){var i=n.length,t=n.split(/(?:\r\n?|\n)/g),r,u;return this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i-1),this.offset-=i,r=this.match.split(/(?:\r\n?|\n)/g),this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),t.length-1&&(this.yylineno-=t.length-1),u=this.yylloc.range,this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:t?(t.length===r.length?this.yylloc.first_column:0)+r[r.length-t.length].length-t[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-i]),this},more:function(){return this._more=!0,this},less:function(n){this.unput(this.match.slice(n))},pastInput:function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var n=this.pastInput(),t=new Array(n.length+1).join("-");return n+this.upcomingInput()+"\n"+t+"^"},next:function(){var f,n,r,e,t,u,i;if(this.done)return this.EOF;for(this._input||(this.done=!0),this._more||(this.yytext="",this.match=""),u=this._currentRules(),i=0;i<u.length;i++)if(r=this._input.match(this.rules[u[i]]),r&&(!n||r[0].length>n[0].length)&&(n=r,e=i,!this.options.flex))break;return n?(t=n[0].match(/(?:\r\n?|\n).*/g),t&&(this.yylineno+=t.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:t?t[t.length-1].length-t[t.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(n[0].length),this.matched+=n[0],f=this.performAction.call(this,this.yy,this,u[e],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),f)?f:void 0:this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var n=this.next();return typeof n!="undefined"?n:this.lex()},begin:function(n){this.conditionStack.push(n)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(n){this.begin(n)}};return n.options={},n.performAction=function(n,t,i,r){var u=r;switch(i){case 0:if(t.yytext.slice(-1)!=="\\"&&this.begin("mu"),t.yytext.slice(-1)==="\\"&&(t.yytext=t.yytext.substr(0,t.yyleng-1),this.begin("emu")),t.yytext)return 14;break;case 1:return 14;case 2:return t.yytext.slice(-1)!=="\\"&&this.popState(),t.yytext.slice(-1)==="\\"&&(t.yytext=t.yytext.substr(0,t.yyleng-1)),14;case 3:return t.yytext=t.yytext.substr(0,t.yyleng-4),this.popState(),15;case 4:return this.begin("par"),24;case 5:return 16;case 6:return 20;case 7:return 19;case 8:return 19;case 9:return 23;case 10:return 23;case 11:this.popState();this.begin("com");break;case 12:return t.yytext=t.yytext.substr(3,t.yyleng-5),this.popState(),15;case 13:return 22;case 14:return 36;case 15:return 35;case 16:return 35;case 17:return 39;case 19:return this.popState(),18;case 20:return this.popState(),18;case 21:return t.yytext=t.yytext.substr(1,t.yyleng-2).replace(/\\"/g,'"'),30;case 22:return t.yytext=t.yytext.substr(1,t.yyleng-2).replace(/\\'/g,"'"),30;case 23:return t.yytext=t.yytext.substr(1),28;case 24:return 32;case 25:return 32;case 26:return 31;case 27:return 35;case 28:return t.yytext=t.yytext.substr(1,t.yyleng-2),35;case 29:return"INVALID";case 31:return this.popState(),37;case 32:return 5}},n.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\{\{>)/,/^(?:\{\{#)/,/^(?:\{\{\/)/,/^(?:\{\{\^)/,/^(?:\{\{\s*else\b)/,/^(?:\{\{\{)/,/^(?:\{\{&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{)/,/^(?:=)/,/^(?:\.(?=[} ]))/,/^(?:\.\.)/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}\}\})/,/^(?:\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@[a-zA-Z]+)/,/^(?:true(?=[}\s]))/,/^(?:false(?=[}\s]))/,/^(?:[0-9]+(?=[}\s]))/,/^(?:[a-zA-Z0-9_$-]+(?=[=}\s\/.]))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:\s+)/,/^(?:[a-zA-Z0-9_$-/]+)/,/^(?:$)/],n.conditions={mu:{rules:[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,32],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[3],inclusive:!1},par:{rules:[30,31],inclusive:!1},INITIAL:{rules:[0,1,32],inclusive:!0}},n}();return n.lexer=i,t.prototype=n,n.Parser=t,new t}();Handlebars.Parser=handlebars;Handlebars.parse=function(n){return n.constructor===Handlebars.AST.ProgramNode?n:(Handlebars.Parser.yy=Handlebars.AST,Handlebars.Parser.parse(n))};Handlebars.print=function(n){return(new Handlebars.PrintVisitor).accept(n)},function(){Handlebars.AST={};Handlebars.AST.ProgramNode=function(n,t){this.type="program";this.statements=n;t&&(this.inverse=new Handlebars.AST.ProgramNode(t))};Handlebars.AST.MustacheNode=function(n,t,i){this.type="mustache";this.escaped=!i;this.hash=t;var r=this.id=n[0],u=this.params=n.slice(1),f=this.eligibleHelper=r.isSimple;this.isHelper=f&&(u.length||t)};Handlebars.AST.PartialNode=function(n,t){this.type="partial";this.partialName=n;this.context=t};var n=function(n,t){if(n.original!==t.original)throw new Handlebars.Exception(n.original+" doesn't match "+t.original);};Handlebars.AST.BlockNode=function(t,i,r,u){n(t.id,u);this.type="block";this.mustache=t;this.program=i;this.inverse=r;this.inverse&&!this.program&&(this.isInverse=!0)};Handlebars.AST.ContentNode=function(n){this.type="content";this.string=n};Handlebars.AST.HashNode=function(n){this.type="hash";this.pairs=n};Handlebars.AST.IdNode=function(n){var i,r,u,f,t;for(this.type="ID",this.original=n.join("."),i=[],r=0,u=0,f=n.length;u<f;u++)if(t=n[u],t===".."||t==="."||t==="this")if(i.length>0)throw new Handlebars.Exception("Invalid path: "+this.original);else t===".."?r++:this.isScoped=!0;else i.push(t);this.parts=i;this.string=i.join(".");this.depth=r;this.isSimple=n.length===1&&!this.isScoped&&r===0;this.stringModeValue=this.string};Handlebars.AST.PartialNameNode=function(n){this.type="PARTIAL_NAME";this.name=n};Handlebars.AST.DataNode=function(n){this.type="DATA";this.id=n};Handlebars.AST.StringNode=function(n){this.type="STRING";this.string=n;this.stringModeValue=n};Handlebars.AST.IntegerNode=function(n){this.type="INTEGER";this.integer=n;this.stringModeValue=Number(n)};Handlebars.AST.BooleanNode=function(n){this.type="BOOLEAN";this.bool=n;this.stringModeValue=n==="true"};Handlebars.AST.CommentNode=function(n){this.type="comment";this.comment=n}}();errorProps=["description","fileName","lineNumber","message","name","number","stack"];Handlebars.Exception=function(){for(var t=Error.prototype.constructor.apply(this,arguments),n=0;n<errorProps.length;n++)this[errorProps[n]]=t[errorProps[n]]};Handlebars.Exception.prototype=new Error;Handlebars.SafeString=function(n){this.string=n};Handlebars.SafeString.prototype.toString=function(){return this.string.toString()},function(){var n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},t=/[&<>"'`]/g,i=/[&<>"'`]/,r=function(t){return n[t]||"&amp;"};Handlebars.Utils={escapeExpression:function(n){return n instanceof Handlebars.SafeString?n.toString():n==null||n===!1?"":i.test(n)?n.replace(t,r):n},isEmpty:function(n){return n||n===0?Object.prototype.toString.call(n)==="[object Array]"&&n.length===0?!0:!1:!0}}}();Handlebars.Compiler=function(){};Handlebars.JavaScriptCompiler=function(){},function(n,t){var i,f,e,r,u;for(n.prototype={compiler:n,disassemble:function(){for(var i,e=this.opcodes,n,r=[],u,t,f=0,o=e.length;f<o;f++)if(n=e[f],n.opcode==="DECLARE")r.push("DECLARE "+n.name+"="+n.value);else{for(u=[],i=0;i<n.args.length;i++)t=n.args[i],typeof t=="string"&&(t='"'+t.replace("\n","\\n")+'"'),u.push(t);r.push(n.opcode+" "+u.join(" "))}return r.join("\n")},equals:function(n){var f=this.opcodes.length,t,i,u,r;if(n.opcodes.length!==f)return!1;for(t=0;t<f;t++){if(i=this.opcodes[t],u=n.opcodes[t],i.opcode!==u.opcode||i.args.length!==u.args.length)return!1;for(r=0;r<i.args.length;r++)if(i.args[r]!==u.args[r])return!1}return!0},guid:0,compile:function(n,t){var i,r;if(this.children=[],this.depths={list:[]},this.options=t,i=this.options.knownHelpers,this.options.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0},i)for(r in i)this.options.knownHelpers[r]=i[r];return this.program(n)},accept:function(n){return this[n.type](n)},program:function(n){var u=n.statements,i,t,r;for(this.opcodes=[],t=0,r=u.length;t<r;t++)i=u[t],this[i.type](i);return this.isSimple=r===1,this.depths.list=this.depths.list.sort(function(n,t){return n-t}),this},compileProgram:function(n){var t=(new this.compiler).compile(n,this.options),u=this.guid++,r,i,f;for(this.usePartial=this.usePartial||t.usePartial,this.children[u]=t,i=0,f=t.depths.list.length;i<f;i++)if(r=t.depths.list[i],r<2)continue;else this.addDepth(r-1);return u},block:function(n){var r=n.mustache,t=n.program,i=n.inverse,u;t&&(t=this.compileProgram(t));i&&(i=this.compileProgram(i));u=this.classifyMustache(r);u==="helper"?this.helperMustache(r,t,i):u==="simple"?(this.simpleMustache(r),this.opcode("pushProgram",t),this.opcode("pushProgram",i),this.opcode("emptyHash"),this.opcode("blockValue")):(this.ambiguousMustache(r,t,i),this.opcode("pushProgram",t),this.opcode("pushProgram",i),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue"));this.opcode("append")},hash:function(n){var u=n.pairs,r,t,i,f;for(this.opcode("pushHash"),i=0,f=u.length;i<f;i++)r=u[i],t=r[1],this.options.stringParams?this.opcode("pushStringParam",t.stringModeValue,t.type):this.accept(t),this.opcode("assignToHash",r[0]);this.opcode("popHash")},partial:function(n){var t=n.partialName;this.usePartial=!0;n.context?this.ID(n.context):this.opcode("push","depth0");this.opcode("invokePartial",t.name);this.opcode("append")},content:function(n){this.opcode("appendContent",n.string)},mustache:function(n){var i=this.options,t=this.classifyMustache(n);t==="simple"?this.simpleMustache(n):t==="helper"?this.helperMustache(n):this.ambiguousMustache(n);n.escaped&&!i.noEscape?this.opcode("appendEscaped"):this.opcode("append")},ambiguousMustache:function(n,t,i){var r=n.id,u=r.parts[0],f=t!=null||i!=null;this.opcode("getContext",r.depth);this.opcode("pushProgram",t);this.opcode("pushProgram",i);this.opcode("invokeAmbiguous",u,f)},simpleMustache:function(n){var t=n.id;t.type==="DATA"?this.DATA(t):t.parts.length?this.ID(t):(this.addDepth(t.depth),this.opcode("getContext",t.depth),this.opcode("pushContext"));this.opcode("resolvePossibleLambda")},helperMustache:function(n,t,i){var u=this.setupFullMustacheParams(n,t,i),r=n.id.parts[0];if(this.options.knownHelpers[r])this.opcode("invokeKnownHelper",u.length,r);else if(this.knownHelpersOnly)throw new Error("You specified knownHelpersOnly, but used the unknown helper "+r);else this.opcode("invokeHelper",u.length,r)},ID:function(n){var i,t,r;for(this.addDepth(n.depth),this.opcode("getContext",n.depth),i=n.parts[0],i?this.opcode("lookupOnContext",n.parts[0]):this.opcode("pushContext"),t=1,r=n.parts.length;t<r;t++)this.opcode("lookup",n.parts[t])},DATA:function(n){this.options.data=!0;this.opcode("lookupData",n.id)},STRING:function(n){this.opcode("pushString",n.string)},INTEGER:function(n){this.opcode("pushLiteral",n.integer)},BOOLEAN:function(n){this.opcode("pushLiteral",n.bool)},comment:function(){},opcode:function(n){this.opcodes.push({opcode:n,args:[].slice.call(arguments,1)})},declare:function(n,t){this.opcodes.push({opcode:"DECLARE",name:n,value:t})},addDepth:function(n){if(isNaN(n))throw new Error("EWOT");n!==0&&(this.depths[n]||(this.depths[n]=!0,this.depths.list.push(n)))},classifyMustache:function(n){var t=n.isHelper,i=n.eligibleHelper,r=this.options,u;return i&&!t&&(u=n.id.parts[0],r.knownHelpers[u]?t=!0:r.knownHelpersOnly&&(i=!1)),t?"helper":i?"ambiguous":"simple"},pushParams:function(n){for(var i=n.length,t;i--;)t=n[i],this.options.stringParams?(t.depth&&this.addDepth(t.depth),this.opcode("getContext",t.depth||0),this.opcode("pushStringParam",t.stringModeValue,t.type)):this[t.type](t)},setupMustacheParams:function(n){var t=n.params;return this.pushParams(t),n.hash?this.hash(n.hash):this.opcode("emptyHash"),t},setupFullMustacheParams:function(n,t,i){var r=n.params;return this.pushParams(r),this.opcode("pushProgram",t),this.opcode("pushProgram",i),n.hash?this.hash(n.hash):this.opcode("emptyHash"),r}},i=function(n){this.value=n},t.prototype={nameLookup:function(n,i){return/^[0-9]+$/.test(i)?n+"["+i+"]":t.isValidJavaScriptVariableName(i)?n+"."+i:n+"['"+i+"']"},appendToBuffer:function(n){return this.environment.isSimple?"return "+n+";":{appendToBuffer:!0,content:n,toString:function(){return"buffer += "+n+";"}}},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(n,t,i,r){this.environment=n;this.options=t||{};Handlebars.log(Handlebars.logger.DEBUG,this.environment.disassemble()+"\n\n");this.name=this.environment.name;this.isChild=!!i;this.context=i||{programs:[],environments:[],aliases:{}};this.preamble();this.stackSlot=0;this.stackVars=[];this.registers={list:[]};this.compileStack=[];this.inlineStack=[];this.compileChildren(n,t);var e=n.opcodes,f;for(this.i=0,u=e.length;this.i<u;this.i++)f=e[this.i],f.opcode==="DECLARE"?this[f.name]=f.value:this[f.opcode].apply(this,f.args);return this.createFunctionContext(r)},nextOpcode:function(){var n=this.environment.opcodes;return n[this.i+1]},eat:function(){this.i=this.i+1},preamble:function(){var t=[],i,n;this.isChild?t.push(""):(i=this.namespace,n="helpers = helpers || "+i+".helpers;",this.environment.usePartial&&(n=n+" partials = partials || "+i+".partials;"),this.options.data&&(n=n+" data = data || {};"),t.push(n));this.environment.isSimple?t.push(""):t.push(", buffer = "+this.initializeBuffer());this.lastContext=0;this.source=t},createFunctionContext:function(n){var o=this.stackVars.concat(this.registers.list),u,t,r,s,i,f,h,e;if(o.length>0&&(this.source[1]=this.source[1]+", "+o.join(", ")),!this.isChild)for(u in this.context.aliases)this.source[1]=this.source[1]+", "+u+"="+this.context.aliases[u];for(this.source[1]&&(this.source[1]="var "+this.source[1].substring(2)+";"),this.isChild||(this.source[1]+="\n"+this.context.programs.join("\n")+"\n"),this.environment.isSimple||this.source.push("return buffer;"),t=this.isChild?["depth0","data"]:["Handlebars","depth0","helpers","partials","data"],r=0,s=this.environment.depths.list.length;r<s;r++)t.push("depth"+this.environment.depths.list[r]);return i=this.mergeSource(),this.isChild||(f=Handlebars.COMPILER_REVISION,h=Handlebars.REVISION_CHANGES[f],i="this.compilerInfo = ["+f+",'"+h+"'];\n"+i),n?(t.push(i),Function.apply(this,t)):(e="function "+(this.name||"")+"("+t.join(",")+") {\n  "+i+"}",Handlebars.log(Handlebars.logger.DEBUG,e+"\n\n"),e)},mergeSource:function(){for(var t,i="",n,r=0,u=this.source.length;r<u;r++)t=this.source[r],t.appendToBuffer?n=n?n+"\n    + "+t.content:t.content:(n&&(i+="buffer += "+n+";\n  ",n=undefined),i+=t+"\n  ");return i},blockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var n=["depth0"];this.setupParams(0,n);this.replaceStack(function(t){return n.splice(1,0,t),"blockHelperMissing.call("+n.join(", ")+")"})},ambiguousBlockValue:function(){var n,t;this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";n=["depth0"];this.setupParams(0,n);t=this.topStack();n.splice(1,0,t);n[n.length-1]="options";this.source.push("if (!"+this.lastHelper+") { "+t+" = blockHelperMissing.call("+n.join(", ")+"); }")},appendContent:function(n){this.source.push(this.appendToBuffer(this.quotedString(n)))},append:function(){this.flushInline();var n=this.popStack();this.source.push("if("+n+" || "+n+" === 0) { "+this.appendToBuffer(n)+" }");this.environment.isSimple&&this.source.push("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){this.context.aliases.escapeExpression="this.escapeExpression";this.source.push(this.appendToBuffer("escapeExpression("+this.popStack()+")"))},getContext:function(n){this.lastContext!==n&&(this.lastContext=n)},lookupOnContext:function(n){this.push(this.nameLookup("depth"+this.lastContext,n,"context"))},pushContext:function(){this.pushStackLiteral("depth"+this.lastContext)},resolvePossibleLambda:function(){this.context.aliases.functionType='"function"';this.replaceStack(function(n){return"typeof "+n+" === functionType ? "+n+".apply(depth0) : "+n})},lookup:function(n){this.replaceStack(function(t){return t+" == null || "+t+" === false ? "+t+" : "+this.nameLookup(t,n,"context")})},lookupData:function(n){this.push(this.nameLookup("data",n,"data"))},pushStringParam:function(n,t){this.pushStackLiteral("depth"+this.lastContext);this.pushString(t);typeof n=="string"?this.pushString(n):this.pushStackLiteral(n)},emptyHash:function(){this.pushStackLiteral("{}");this.options.stringParams&&this.register("hashTypes","{}")},pushHash:function(){this.hash={values:[],types:[]}},popHash:function(){var n=this.hash;this.hash=undefined;this.options.stringParams&&this.register("hashTypes","{"+n.types.join(",")+"}");this.push("{\n    "+n.values.join(",\n    ")+"\n  }")},pushString:function(n){this.pushStackLiteral(this.quotedString(n))},push:function(n){return this.inlineStack.push(n),n},pushLiteral:function(n){this.pushStackLiteral(n)},pushProgram:function(n){n!=null?this.pushStackLiteral(this.programExpression(n)):this.pushStackLiteral(null)},invokeHelper:function(n,t){this.context.aliases.helperMissing="helpers.helperMissing";var i=this.lastHelper=this.setupHelper(n,t,!0);this.push(i.name);this.replaceStack(function(n){return n+" ? "+n+".call("+i.callParams+") : helperMissing.call("+i.helperMissingParams+")"})},invokeKnownHelper:function(n,t){var i=this.setupHelper(n,t);this.push(i.name+".call("+i.callParams+")")},invokeAmbiguous:function(n,t){this.context.aliases.functionType='"function"';this.pushStackLiteral("{}");var r=this.setupHelper(0,n,t),u=this.lastHelper=this.nameLookup("helpers",n,"helper"),f=this.nameLookup("depth"+this.lastContext,n,"context"),i=this.nextStack();this.source.push("if ("+i+" = "+u+") { "+i+" = "+i+".call("+r.callParams+"); }");this.source.push("else { "+i+" = "+f+"; "+i+" = typeof "+i+" === functionType ? "+i+".apply(depth0) : "+i+"; }")},invokePartial:function(n){var t=[this.nameLookup("partials",n,"partial"),"'"+n+"'",this.popStack(),"helpers","partials"];this.options.data&&t.push("data");this.context.aliases.self="this";this.push("self.invokePartial("+t.join(", ")+")")},assignToHash:function(n){var r=this.popStack(),t,i;this.options.stringParams&&(t=this.popStack(),this.popStack());i=this.hash;t&&i.types.push("'"+n+"': "+t);i.values.push("'"+n+"': ("+r+")")},compiler:t,compileChildren:function(n,t){for(var i,f=n.children,r,e,u=0,o=f.length;u<o;u++)r=f[u],e=new this.compiler,i=this.matchExistingProgram(r),i==null?(this.context.programs.push(""),i=this.context.programs.length,r.index=i,r.name="program"+i,this.context.programs[i]=e.compile(r,t,this.context),this.context.environments[i]=r):(r.index=i,r.name="program"+i)},matchExistingProgram:function(n){for(var i,t=0,r=this.context.environments.length;t<r;t++)if(i=this.context.environments[t],i&&i.equals(n))return t},programExpression:function(n){var i,e;if(this.context.aliases.self="this",n==null)return"self.noop";var r=this.environment.children[n],u=r.depths.list,f,t=[r.index,r.name,"data"];for(i=0,e=u.length;i<e;i++)f=u[i],f===1?t.push("depth0"):t.push("depth"+(f-1));return u.length===0?"self.program("+t.join(", ")+")":(t.shift(),"self.programWithDepth("+t.join(", ")+")")},register:function(n,t){this.useRegister(n);this.source.push(n+" = "+t+";")},useRegister:function(n){this.registers[n]||(this.registers[n]=!0,this.registers.list.push(n))},pushStackLiteral:function(n){return this.push(new i(n))},pushStack:function(n){this.flushInline();var t=this.incrStack();return n&&this.source.push(t+" = "+n+";"),this.compileStack.push(t),t},replaceStack:function(n){var u="",e=this.isInline(),t,r,o,f;return e?(r=this.popStack(!0),r instanceof i?t=r.value:(o=this.stackSlot?this.topStackName():this.incrStack(),u="("+this.push(o)+" = "+r+"),",t=this.topStack())):t=this.topStack(),f=n.call(this,t),e?((this.inlineStack.length||this.compileStack.length)&&this.popStack(),this.push("("+u+f+")")):(/^stack/.test(t)||(t=this.nextStack()),this.source.push(t+" = ("+u+f+");")),t},nextStack:function(){return this.pushStack()},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var r=this.inlineStack,n,u,t;if(r.length)for(this.inlineStack=[],n=0,u=r.length;n<u;n++)t=r[n],t instanceof i?this.compileStack.push(t):this.pushStack(t)},isInline:function(){return this.inlineStack.length},popStack:function(n){var r=this.isInline(),t=(r?this.inlineStack:this.compileStack).pop();return!n&&t instanceof i?t.value:(r||this.stackSlot--,t)},topStack:function(n){var r=this.isInline()?this.inlineStack:this.compileStack,t=r[r.length-1];return!n&&t instanceof i?t.value:t},quotedString:function(n){return'"'+n.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r")+'"'},setupHelper:function(n,t,i){var r=[],u;return this.setupParams(n,r,i),u=this.nameLookup("helpers",t,"helper"),{params:r,name:u,callParams:["depth0"].concat(r).join(", "),helperMissingParams:i&&["depth0",this.quotedString(t)].concat(r).join(", ")}},setupParams:function(n,t,i){var r=[],o=[],s=[],h,u,f,e;for(r.push("hash:"+this.popStack()),u=this.popStack(),f=this.popStack(),(f||u)&&(f||(this.context.aliases.self="this",f="self.noop"),u||(this.context.aliases.self="this",u="self.noop"),r.push("inverse:"+u),r.push("fn:"+f)),e=0;e<n;e++)h=this.popStack(),t.push(h),this.options.stringParams&&(s.push(this.popStack()),o.push(this.popStack()));return this.options.stringParams&&(r.push("contexts:["+o.join(",")+"]"),r.push("types:["+s.join(",")+"]"),r.push("hashTypes:hashTypes")),this.options.data&&r.push("data:data"),r="{"+r.join(",")+"}",i?(this.register("options",r),t.push("options")):t.push(r),t.join(", ")}},f="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(" "),e=t.RESERVED_WORDS={},r=0,u=f.length;r<u;r++)e[f[r]]=!0;t.isValidJavaScriptVariableName=function(n){return!t.RESERVED_WORDS[n]&&/^[a-zA-Z_$][0-9a-zA-Z_$]+$/.test(n)?!0:!1}}(Handlebars.Compiler,Handlebars.JavaScriptCompiler);Handlebars.precompile=function(n,t){if(!n||typeof n!="string"&&n.constructor!==Handlebars.AST.ProgramNode)throw new Handlebars.Exception("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+n);t=t||{};"data"in t||(t.data=!0);var i=Handlebars.parse(n),r=(new Handlebars.Compiler).compile(i,t);return(new Handlebars.JavaScriptCompiler).compile(r,t)};Handlebars.compile=function(n,t){function r(){var i=Handlebars.parse(n),r=(new Handlebars.Compiler).compile(i,t),u=(new Handlebars.JavaScriptCompiler).compile(r,t,undefined,!0);return Handlebars.template(u)}if(!n||typeof n!="string"&&n.constructor!==Handlebars.AST.ProgramNode)throw new Handlebars.Exception("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+n);t=t||{};"data"in t||(t.data=!0);var i;return function(n,t){return i||(i=r()),i.call(this,n,t)}};Handlebars.VM={template:function(n){var t={escapeExpression:Handlebars.Utils.escapeExpression,invokePartial:Handlebars.VM.invokePartial,programs:[],program:function(n,t,i){var r=this.programs[n];return i?Handlebars.VM.program(t,i):r?r:this.programs[n]=Handlebars.VM.program(t)},programWithDepth:Handlebars.VM.programWithDepth,noop:Handlebars.VM.noop,compilerInfo:null};return function(i,r){var o,s;r=r||{};var h=n.call(t,Handlebars,i,r.helpers,r.partials,r.data),e=t.compilerInfo||[],u=e[0]||1,f=Handlebars.COMPILER_REVISION;if(u!==f)if(u<f){o=Handlebars.REVISION_CHANGES[f];s=Handlebars.REVISION_CHANGES[u];throw"Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+o+") or downgrade your runtime to an older version ("+s+").";}else throw"Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").";return h}},programWithDepth:function(n,t){var i=Array.prototype.slice.call(arguments,2);return function(r,u){return u=u||{},n.apply(this,[r,u.data||t].concat(i))}},program:function(n,t){return function(i,r){return r=r||{},n(i,r.data||t)}},noop:function(){return""},invokePartial:function(n,t,i,r,u,f){var e={helpers:r,partials:u,data:f};if(n===undefined)throw new Handlebars.Exception("The partial "+t+" could not be found");else{if(n instanceof Function)return n(i,e);if(Handlebars.compile)return u[t]=Handlebars.compile(n,{data:f!==undefined}),u[t](i,e);throw new Handlebars.Exception("The partial "+t+" could not be compiled when running in runtime-only mode");}}};Handlebars.template=Handlebars.VM.template;bet365=bet365||{};bet365.BingoMostPopularSlider=bet365.BingoMostPopularSlider||{};$(window).load(function(){"use strict";bet365.BingoMostPopularSlider.InitialiseAll(".Mostpopular-Slider")});bet365.BingoMostPopularSlider={InitialiseAll:function(n){"use strict";var t=$(n);t.each(function(n,t){bet365.BingoMostPopularSlider.Initialise($(t))});bet365.cmsCore.gameLaunchMechanism.bindClickEvents($,"div.focusedSlides");bet365.product.bingo.gamepods.bindSpecificChildrenPodHover($,"div.focusedSlides")},Initialise:function(n){"use strict";var i,u,f,t,r,o,e,s,h,c,l;i=$(n.children(".position"));u=i.children(".focusedSlides");f=i.children(".blurredSlides");c=i.children("div.scroll.left");l=i.children("div.scroll.right");t=f.children("div.gameLaunch");r=$(t[0]).width();e=u.width();o=e*6;s=bet365.BingoMostPopularSlider.CalculateCurrentWidthOfSlides(t,r);h=o-s;t=bet365.BingoMostPopularSlider.RepeatItemsToOccupyRequiredWidth(f,t.clone(),h,r);bet365.BingoMostPopularSlider.SetupSlidePositions(t,-e,r);bet365.BingoMostPopularSlider.DuplicateBluredSlidesIntoFocusedContainer(t,u,-(e*3),r);bet365.BingoMostPopularSlider.BindLeftAndRightButtons(i.find("div.slide"),900,r,4,f,u,c,l)},DuplicateBluredSlidesIntoFocusedContainer:function(n,t,i,r){var u=n.clone();u.appendTo(t);bet365.BingoMostPopularSlider.SetupSlidePositions(u,i,r)},BindLeftAndRightButtons:function(n,t,i,r,u,f,e,o){var s=!1;e.click(function(){s===!1&&(s=!0,bet365.BingoMostPopularSlider.MoveSlidesToStart(u,r,i),bet365.BingoMostPopularSlider.MoveSlidesToStart(f,r,i),bet365.BingoMostPopularSlider.AnimateLeft(n,t,i,r,function(){s=!1}))});o.click(function(){s===!1&&(s=!0,bet365.BingoMostPopularSlider.MoveSlidesToEnd(u,r,i),bet365.BingoMostPopularSlider.MoveSlidesToEnd(f,r,i),bet365.BingoMostPopularSlider.AnimateRight(n,t,i,r,function(){s=!1}))})},AnimateLeft:function(n,t,i,r,u){bet365.BingoMostPopularSlider.AnimateSlideCoordinates(n,i*r,t,u)},AnimateRight:function(n,t,i,r,u){bet365.BingoMostPopularSlider.AnimateSlideCoordinates(n,-(i*r),t,u)},AnimateSlideCoordinates:function(n,t,i,r){n.each(function(n,u){var f=$(u),e=parseInt(f.css("left"));f.animate({left:e+t},i,function(){r()})})},CalculateCurrentWidthOfSlides:function(n,t){"use strict";return n.length*t},RepeatItemsToOccupyRequiredWidth:function(n,t,i,r){"use strict";for(var f=i,u,e;f>0;)for(u=0;u<t.length;u=u+1)e=$(t[u]).clone(),n.append(e),f-=r;return n.children("div.gameLaunch")},SetupSlidePositions:function(n,t,i){"use strict";for(var f=t,u,r=0;r<n.length;r=r+1)u=$(n[r]),u.css("position","absolute"),u.css("left",f),f+=i},MoveSlidesToStart:function(n,t,i){var r=n.children("div.slide"),u;bet365.BingoMostPopularSlider.SortSlides(r);var e=parseInt($(r[0]).css("left")),o=r.length-t,f=1;for(u=o;u<r.length;u++)$(r[u]).css("left",e-f*i),f++},MoveSlidesToEnd:function(n,t,i){var u=n.children("div.slide"),f,r;for(bet365.BingoMostPopularSlider.SortSlides(u),f=parseInt($(u[u.length-1]).css("left"))+i,r=0;r<t;r++)$(u[r]).css("left",f+r*i)},SortSlides:function(n){n.sort(function(n,t){var i=parseInt($(n).css("left")),r=parseInt($(t).css("left"));return i>r?1:i<r?-1:0})}};bet365=bet365||{};bet365.product=bet365.product||{};bet365.product.bingo=bet365.product.bingo||{};bet365.product.bingo.lobby=bet365.product.bingo.lobby||{};$(document).ready(function(){"use strict";var n=$(".BingoLobbyWrapper");n&&n.length!==0&&(bet365.product.bingo.lobby.start($),bet365.product.bingo.lobby.setupVisibilityEvents($))});bet365.product.bingo.lobby.setupVisibilityEvents=function(){function n(n){var i="visible",r="hidden",u={focus:i,focusin:i,pageshow:i,blur:r,focusout:r,pagehide:r};n=n||window.event;n.type in u?u[n.type]==="hidden"?(poller.stop(),ticker.stop()):(lobbyAnimation.resolve(),poller.start(),ticker.start()):this[t]?(poller.stop(),ticker.stop()):(lobbyAnimation.resolve(),poller.start(),ticker.start())}var t="hidden",i;"onpageshow"in window?window.onpageshow=window.onpagehide=n:t in document?document.addEventListener("visibilitychange",n):(t="mozHidden")in document?document.addEventListener("mozvisibilitychange",n):(t="webkitHidden")in document?document.addEventListener("webkitvisibilitychange",n):(t="msHidden")in document?document.addEventListener("msvisibilitychange",n):(i="onfocusin"in document,i||(window.onfocus=window.onblur=n))};bet365.product.bingo.lobby.start=function(n){"use strict";var i,r,u,t;if(lobbyAnimation=n.Deferred(),lobbyAnimation.resolve(),i=bet365.cmsCore.getPageAttributes(n),r=new bet365.product.bingo.lobby.TimeFormatter,u=n("#BingoLobbySchedule").data("providerimplementations"),ticker=new bet365.product.bingo.lobby.Ticker(n,r,i,Handlebars),poller=new bet365.product.bingo.lobby.Poller(n,r,i,Handlebars,u),n("#initialSchedule").html()){for(bet365.product.bingo.lobby.Schedule=n.parseJSON(n("#initialSchedule").html()).Schedule,t=0;t<5&&t<bet365.product.bingo.lobby.Schedule.length;++t)bet365.product.bingo.lobby.Schedule[t].showing=!0;ticker.loop();poller.loop()}};bet365.product.bingo.lobby.Ticker=bet365.product.bingo.lobby.Ticker||function(n,t,i,r){"use strict";var f=this,u;return this.tick=function(){for(var h,i,e,o,s,u=0;u<bet365.product.bingo.lobby.Schedule.length;++u)bet365.product.bingo.lobby.Schedule[u].Strt-=1,bet365.product.bingo.lobby.Schedule[u].Strt<30&&bet365.product.bingo.lobby.Schedule.splice(u,1);h=n("#BingoLobbySchedule").children().length;n(".lobbyGame").each(function(u,c){if(i=n(c).data("seconds"),i-=1,n(c).data("seconds",i),n(c).find(".countdown").text(t.format(i)),i<30&&n(c).data("active")==!0){lobbyAnimation=n.Deferred();n(c).data("active",!1);n(c).children(".play").children(".playButton").addClass("hidden");o=n(c).children(".play").children(".playButton").data("gameid");s=!1;n(".lobbyGame").filter(function(){return n(this).data("active")==!0}).children(".play").children(".playButton").each(function(t,i){n(i).data("gameid")!=o||s||(n(i).removeClass("hidden"),s=!0)});o=null;var l;l=f.getNextGame();l&&(l.zIndex=h+u,e=new bet365.product.bingo.lobby.Templating(r),n("#BingoLobbySchedule").append(e.lobbyGameTemplate(l)),bet365.cmsCore.gameLaunchMechanism.bindClickEventsToElement(n,n("#BingoLobbySchedule .lobbyGame:last .playButton")),e=null);n("#BingoLobbySchedule").queue(function(){var t=this;n(c).slideUp(1e3,function(){n(this).remove();n.dequeue(t);n(t).queue().length==0&&lobbyAnimation.resolve()})});/\bMSIE 6/.test(navigator.userAgent)&&!window.opera&&n("#BingoLobbySchedule").supersleight()}})},this.getNextGame=function(){for(var r,u=0,f=[];!r&&u<bet365.product.bingo.lobby.Schedule.length;)bet365.product.bingo.lobby.Schedule[u].showing||(bet365.product.bingo.lobby.Schedule[u].showing=!0,r=bet365.product.bingo.lobby.Schedule[u]),++u;return n(".lobbyGame").filter(function(){return n(this).data("active")==!0}).children(".play").children(".playButton").each(function(t,i){f.push(n(i).data("gameid"))}),r&&(r.clockImage=i.scheduleClockImage,r.prizeImage=i.schedulePrizeImage,r.playNowText=i.schedulePlayNowText,r.Pri==0&&(r.freeTicket=!0),r.freeTicketText=i.scheduleFreeTicketText,f.indexOf(r.Id)>-1&&(r.hidePlay=!0),r.formattedStartTime=t.format(r.Strt)),f=null,r},{loop:function(){var n=this;u=setTimeout(function(){f.tick();n.loop()},1e3)},start:function(){clearTimeout(u);this.loop()},stop:function(){clearTimeout(u)}}};bet365.product.bingo.lobby.TimeFormatter=bet365.product.bingo.lobby.TimeFormatter||function(){"use strict";return{format:function(n){var t,i;return t=Math.floor(n/60),i=n-t*60,String("00"+t).slice(-2)+":"+String("00"+i).slice(-2)}}};bet365.product.bingo.lobby.Poller=bet365.product.bingo.lobby.Poller||function(n,t,i,r,u){"use strict";var f,e,o;return f=this,e=!1,this.getData=function(){n.ajax({type:"POST",dataType:"json",url:i.appPath+"BingoSchedule/Poll",data:{providerImplementationId:u},cache:!1,async:!1,success:function(n){n?(lobbyAnimation.done(function(){bet365.product.bingo.lobby.Schedule=n.Schedule;f.redrawSchedule()}),e=!0):e=!1}})},this.redrawSchedule=function(){for(var e="",o=[],f,s=new bet365.product.bingo.lobby.Templating(r),u=0;u<bet365.product.bingo.lobby.Schedule.length&&bet365.product.bingo.lobby.Schedule[u].Strt<30;)bet365.product.bingo.lobby.Schedule.splice(u,1),++u;for(u=0;u<5;++u)bet365.product.bingo.lobby.Schedule[u].showing=!0,o.indexOf(bet365.product.bingo.lobby.Schedule[u].Id)==-1?o.push(bet365.product.bingo.lobby.Schedule[u].Id):bet365.product.bingo.lobby.Schedule[u].hidePlay=!0,f=bet365.product.bingo.lobby.Schedule[u],f.clockImage=i.scheduleClockImage,f.prizeImage=i.schedulePrizeImage,f.playNowText=i.schedulePlayNowText,f.Pri==0&&(f.freeTicket=!0),f.freeTicketText=i.scheduleFreeTicketText,f.formattedStartTime=t.format(bet365.product.bingo.lobby.Schedule[u].Strt),f.zIndex=u,e+=s.lobbyGameTemplate(f),f=null;n("#BingoLobbySchedule").html(e);s=null;o=null;e=null;/\bMSIE 6/.test(navigator.userAgent)&&!window.opera&&n("#BingoLobbySchedule").supersleight();bet365.cmsCore.gameLaunchMechanism.bindClickEvents(n,"#BingoLobbySchedule")},{loop:function(){var n=this;o=setTimeout(function(){f.getData();e&&n.loop()},i.schedulePollInterval)},start:function(){clearTimeout(o);f.getData();this.loop()},stop:function(){clearTimeout(o)}}};bet365.product.bingo.lobby.Templating=bet365.product.bingo.lobby.Templating||function(n){"use strict";return{lobbyGameTemplate:n.compile('<div class="lobbyGame border-xs-bottom border-light-purple" style="z-index:{{zIndex}}" data-seconds="{{Strt}}" data-active="true">    <div class="time border-md-right border-light-purple">        <div class="dark countdown" style="background-image: url({{clockImage}});">{{formattedStartTime}}<\/div>   <\/div>   <div class="play border-md-left border-light-purple">       <div class="gameButton playButton small blue button {{#if hidePlay}}hidden{{/if}}" data-gameid="{{Id}}" data-launchmechanismid="{{LMId}}">{{playNowText}}<\/div>   <\/div>   <div class="prizecell border-md-left">       <div class="prize dark" style="background-image: url({{prizeImage}});">{{Prz}}<\/div>   <\/div>   <div class="room">       <div class="roomname dark">{{Rnm}}<\/div>{{#if freeTicket}}       <div class="cost light">{{freeTicketText}}<\/div>{{else}}       <div class="cost light">{{FPri}}<\/div>{{/if}}       <div class="type light">{{Ty}}<\/div>   <\/div><\/div>')}};bet365=bet365||{};bet365.cmsCore=bet365.cmsCore||{};bet365.cmsCore.jackpots=bet365.cmsCore.jackpots||{};bet365.cmsCore.jackpots.initialData=bet365.cmsCore.jackpots.initialData||[];bet365.cmsCore.jackpots.startAgain=function(n){"use strict";var t,i;t=bet365.cmsCore.getPageAttributes(n);i=new bet365.cmsCore.jackpots.Formatter(t);bet365.cmsCore.jackpots.setup(n,i)};bet365.cmsCore.jackpots.start=function(n){"use strict";var i,t,r,u;i=bet365.cmsCore.getPageAttributes(n);t=new bet365.cmsCore.jackpots.Formatter(i);r=new bet365.cmsCore.jackpots.Poller(n,i,t);u=new bet365.cmsCore.jackpots.Ticker(n,t);bet365.cmsCore.jackpots.setup(n,t);r.loop();u.loop();bet365.cmsCore.jackpots.start=function(n){bet365.cmsCore.jackpots.startAgain(n)}};bet365.cmsCore.jackpots.startFromElement=function(n){"use strict";var r=bet365.cmsCore.getPageAttributes(n),i,u,t,f;if(!r.jackpotDisplayFormat&&(i=["jackpotDisplayFormat","jackpotPeriodSymbol","jackpotDividerSymbol","jackpotCurrencyCode","jackpotScriptTimeoutInterval"],u=n(".PodJackpot[data-jackpot-display-format]"),u.length>0))for(f=u.data(),t=0;t<i.length;t+=1)!r[i[t]]&&f[i[t]]&&(r[i[t]]=f[i[t]]);n(".PodJackpot[data-amount]").each(function(){var t=n(this);bet365.cmsCore.jackpots.initialData.push({G:t.data("gameid"),I:parseFloat(t.attr("data-amount")),S:parseFloat(t.attr("data-step"))})});bet365.cmsCore.jackpots.start(n)};bet365.cmsCore.jackpots.Formatter=bet365.cmsCore.jackpots.Formatter||function(n){"use strict";var t=this;return this.addSeperators=function(n,t){var r,i,f,u;for(n+="",r=n.split("."),i=r[0],f=r.length>1?"."+r[1]:"",u=/(\d+)(\d{3})/;u.test(i);)i=i.replace(u,"$1"+t+"$2");return i+f},{format:function(i){return i=i.toFixed(2),i=n.jackpotDisplayFormat.replace("[AMOUNT]",i),i=i.replace(".",n.jackpotPeriodSymbol),t.addSeperators(i,n.jackpotDividerSymbol)}}};bet365.cmsCore.jackpots.setup=function(n,t){"use strict";var r,i,u;if(bet365.cmsCore.jackpots.initialData)for(u=0;u<bet365.cmsCore.jackpots.initialData.length;u+=1)r=bet365.cmsCore.jackpots.initialData[u],i=n(".PodJackpot").filter('[data-gameid="'+r.G+'"]'),i&&(i.attr("data-active",!0),i.attr("data-amount",r.I),i.attr("data-step",r.S),i.text(t.format(r.I)),i.show())};bet365.cmsCore.jackpots.Poller=bet365.cmsCore.jackpots.Poller||function(n,t,i){"use strict";var r,u;return r=this,u=!1,this.getData=function(){n.ajax({type:"POST",dataType:"json",url:t.appPath+"Jackpots/Poll",cache:!1,async:!1,data:{currencyCode:t.jackpotCurrencyCode},success:function(n){n&&n.Success?(r.updatePods(n.Amounts),u=!0):u=!1}})},r.updatePods=function(t){var u,r;n(".PodJackpot").filter('[data-active="true"]').each(function(f,e){r=n(e).data("gameid");r&&t[r]&&(u=i.format(t[r]),n(e).data("amount",t[r]),n(e).text(u))})},{loop:function(){var n=this;setTimeout(function(){r.getData();u&&n.loop()},t.jackpotScriptTimeoutInterval)}}};bet365.cmsCore.jackpots.Ticker=bet365.cmsCore.jackpots.Ticker||function(n,t){"use strict";var i=this;return this.tick=function(){var i,r;n(".PodJackpot").filter('[data-active="true"]').each(function(u,f){i=parseFloat(n(f).data("amount"));r=parseFloat(n(f).data("step"));i+=r;n(f).data("amount",i);n(f).text(t.format(i))})},{loop:function(){var n=this;setTimeout(function(){i.tick();n.loop()},1e3)}}};bet365=bet365||{};bet365.cmsCore.jackpots=bet365.cmsCore.jackpots||{};$(document).ready(function(){"use strict";bet365.cmsCore.jackpots.start($)})